@phonghq/go-chat 1.0.31 β†’ 1.0.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -12,4 +12,4 @@
12
12
  `;)Te+=Ie,Wt();return}Aj()}function Aj(){for(Ge=hr;Ie!=="";)Te+=Ie,Wt();throw new On('Syntax error in part "'+Te+'"',Kt-Te.length)}function ps(){if(Ge===bn&&Te==="{"){if(bt(),Ge===bn&&Te==="}"){bt();return}for(;;){if((Ge===mr||Ge===vr)&&(Ge=So,Te='"'.concat(Te,'"')),Ge!==So)throw new On("Object key expected",Kt-Te.length);if(bt(),Ge===bn&&Te===":")bt();else if(Vl())ot=ar(ot,":");else throw new On("Colon expected",Kt-Te.length);if(ps(),Ge===bn&&Te===","){if(bt(),Ge===bn&&Te==="}"){ot=jl(ot,",");break}if(Te===""){ot=jl(ot,",");break}}else if(gj())ot=ar(ot,",");else break}Ge===bn&&Te==="}"?bt():ot=ar(ot,"}");return}Rj()}function Rj(){if(Ge===bn&&Te==="["){if(bt(),Ge===bn&&Te==="]"){bt();return}for(;;)if(ps(),Ge===bn&&Te===","){if(bt(),Ge===bn&&Te==="]"){ot=jl(ot,",");break}if(Te===""){ot=jl(ot,",");break}}else if(Vl())ot=ar(ot,",");else break;Ge===bn&&Te==="]"?bt():ot=ar(ot,"]");return}Mj()}function Mj(){if(Ge===So){for(bt();Ge===bn&&Te==="+";)if(Te="",bt(),Ge===So){var e=ot.lastIndexOf('"');ot=ot.substring(0,e)+Te.substring(1),Te="",bt()}return}Nj()}function Nj(){if(Ge===vr){bt();return}Oj()}function Oj(){if(Ge===mr){if(mj[Te]){bt();return}if(iR[Te]){Te=iR[Te],bt();return}var e=Te,n=ot.length;if(Te="",bt(),Ge===bn&&Te==="("){Te="",bt(),ps(),Ge===bn&&Te===")"&&(Te="",bt(),Ge===bn&&Te===";"&&(Te="",bt()));return}for(ot=pj(ot,'"'.concat(e),n);Ge===mr||Ge===vr;)bt();ot+='"';return}wj()}function wj(){throw Te===""?new On("Unexpected end of json string",Kt-Te.length):new On("Value expected",Kt-Te.length)}let as,Fl;const sR=()=>window.self!==window.top,xj=e=>{try{JSON.parse(e)}catch{return!1}return!0};class Pj{constructor(n){this.Context={API_KEY:"",API_SECRET_KEY:"",G_CLIENTID:"",API_VERSION:wc.V1,USER_AGENT:"",initialize:function(t){const i=[];if(t.API_KEY.length||i.push("API_KEY"),t.API_SECRET_KEY.length||i.push("API_SECRET_KEY"),t.API_SECRET_KEY.length||i.push("G_CLIENTID"),i.length)throw new Q5(`Cannot initialize GAP Library. Missing values for: ${i.join(", ")}`);this.API_KEY=t.API_KEY,this.API_SECRET_KEY=t.API_SECRET_KEY,this.G_CLIENTID=t.G_CLIENTID,this.API_VERSION=t.API_VERSION},throwIfUninitialized:function(){throw new Error("Function not implemented.")}},n&&(this._logger=n),window.GapMiniApp=this}detectPlatform(){if(sR())return Sn.WEB;const n=t=>t.test(window.navigator.userAgent);if(n(/GapAndroid/))return Sn.ANDROID;if(n(/GapIOS/))return Sn.IOS;if(n(/GapWindow/))return Sn.WINDOW;if(n(/Android/i))return Sn.ANDROID;if(n(/iOS|iPad|iPhone|iPod|Macintosh/i))return Sn.IOS;if(n(/EdgGapWindow/i))return Sn.WINDOW}setPlatformExecutor(n,t){switch(n){case Sn.WINDOW:window.MiniAppBridge=new Ul(new Z5,t);break;case Sn.ANDROID:window.MiniAppBridge=new Ul(new tj,t);break;case Sn.IOS:window.MiniAppBridge=new Ul(new rj,t);break;case Sn.WEB:if(!sR())throw new W5("Platform not supported yet");as&&clearInterval(as);const i=()=>{if(window&&window.addEventListener){Fl&&window.removeEventListener("message",Fl),Fl=o=>{var r,s,u,l,d,c;if(((r=o.data)===null||r===void 0?void 0:r.type)==="execSuccessCallback"){let _=(s=o==null?void 0:o.data)===null||s===void 0?void 0:s.data;xj(_)||(_=JSON.stringify(_)),this.getBridge().execSuccessCallback((u=o.data)===null||u===void 0?void 0:u.id,_)}((l=o.data)===null||l===void 0?void 0:l.type)==="execErrorCallback"&&this.getBridge().execErrorCallback((d=o.data)===null||d===void 0?void 0:d.id,(c=o.data)===null||c===void 0?void 0:c.message)},window.addEventListener("message",Fl),as&&clearInterval(as);return}as=setInterval(i,500)};i(),window.MiniAppBridge=new Ul(new ij,t);break;default:throw new $5("Missing platform data")}return n}getBridge(){return Je()}navigateTo(n){return new Promise((t,i)=>{Je().navigateToMiniApp(n).then(o=>{t(o)}).catch(o=>{i(this.tryParseJson(o))})})}closeApp(){return new Promise((n,t)=>{Je().closeMiniApp().then(i=>{n(i)}).catch(i=>{t(this.tryParseJson(i))})})}getAppId(){throw new Error("Method not implemented.")}getLoginStatus(){return new Promise((n,t)=>{Je().getAccessToken().then(i=>{n(i==="true")}).catch(i=>{t(this.tryParseJson(i))})})}getAccessToken(){return new Promise((n,t)=>{Je().getAccessToken().then(i=>{n(this.tryParseJson(i))}).catch(i=>{t(this.tryParseJson(i))})})}getAppVersion(){return Je().getAppVersion()}getSystemInfo(){return new Promise((n,t)=>{Je().getSystemInfo().then(i=>{n(this.tryParseJson(i))}).catch(i=>{t(this.tryParseJson(i))})})}getBusinessInfo(){return new Promise((n,t)=>{Je().getBusinessInfo().then(i=>{n(this.tryParseJson(i))}).catch(i=>{t(this.tryParseJson(i))})})}getBusinessConfig(){return new Promise((n,t)=>{Je().getBusinessConfig().then(i=>{n(this.tryParseJson(i))}).catch(i=>{t(this.tryParseJson(i))})})}doPayment(n){var t;return(t=this._logger)===null||t===void 0||t.info(JSON.stringify(n)),new Promise((i,o)=>{Je().doPayment(n).then(r=>{var s;(s=this._logger)===null||s===void 0||s.info(JSON.stringify(r)),i(this.tryParseJson(r))}).catch(r=>{var s;(s=this._logger)===null||s===void 0||s.info(JSON.stringify(r)),o(this.tryParseJson(r))})})}doAdjust(n){var t;return(t=this._logger)===null||t===void 0||t.info(JSON.stringify(n)),new Promise((i,o)=>{Je().doAdjust(n).then(r=>{var s;(s=this._logger)===null||s===void 0||s.info(JSON.stringify(r)),i(this.tryParseJson(r))}).catch(r=>{var s;(s=this._logger)===null||s===void 0||s.info(JSON.stringify(r)),o(this.tryParseJson(r))})})}doVoid(n){var t;return(t=this._logger)===null||t===void 0||t.info(JSON.stringify(n)),new Promise((i,o)=>{Je().doVoid(n).then(r=>{var s;(s=this._logger)===null||s===void 0||s.info(JSON.stringify(r)),i(this.tryParseJson(r))}).catch(r=>{var s;(s=this._logger)===null||s===void 0||s.info(JSON.stringify(r)),o(this.tryParseJson(r))})})}doRefund(n){var t;return(t=this._logger)===null||t===void 0||t.info(JSON.stringify(n)),new Promise((i,o)=>{Je().doRefund(n).then(r=>{var s;(s=this._logger)===null||s===void 0||s.info(JSON.stringify(r)),i(this.tryParseJson(r))}).catch(r=>{var s;(s=this._logger)===null||s===void 0||s.info(JSON.stringify(r)),o(this.tryParseJson(r))})})}doBatchClose(){return new Promise((n,t)=>{Je().doBatchClose().then(i=>{var o;(o=this._logger)===null||o===void 0||o.info(JSON.stringify(i)),n(this.tryParseJson(i))}).catch(i=>{var o;(o=this._logger)===null||o===void 0||o.info(JSON.stringify(i)),t(this.tryParseJson(i))})})}doRetrieve(n){var t;return(t=this._logger)===null||t===void 0||t.info(JSON.stringify(n)),new Promise((i,o)=>{Je().doRetrieve(n).then(r=>{var s;(s=this._logger)===null||s===void 0||s.info(JSON.stringify(r)),i(this.tryParseJson(r))}).catch(r=>{var s;(s=this._logger)===null||s===void 0||s.info(JSON.stringify(r)),o(this.tryParseJson(r))})})}doPaymentPopup(n){var t;return(t=this._logger)===null||t===void 0||t.info(JSON.stringify(n)),new Promise((i,o)=>{Je().doPaymentPopup(n).then(r=>{var s;(s=this._logger)===null||s===void 0||s.info(JSON.stringify(r)),i(this.tryParseJson(r))}).catch(r=>{var s;(s=this._logger)===null||s===void 0||s.info(JSON.stringify(r)),o(this.tryParseJson(r))})})}scanQr(){return new Promise((n,t)=>{Je().scanQr().then(i=>{n(this.tryParseJson(i))}).catch(i=>{t(this.tryParseJson(i))})})}getNetworkStatus(){return new Promise((n,t)=>{Je().getNetworkStatus().then(i=>{n(this.tryParseJson(i))}).catch(i=>{t(this.tryParseJson(i))})})}scanNetworkDevice(n){return new Promise((t,i)=>{Je().scanNetworkDevice(n).then(o=>{t(this.tryParseJson(o))}).catch(o=>{i(this.tryParseJson(o))})})}pingNetworkDevice(n){return new Promise((t,i)=>{Je().pingNetworkDevice(n).then(o=>{t(this.tryParseJson(o))}).catch(o=>{i(this.tryParseJson(o))})})}scanUsbDevice(){return new Promise((n,t)=>{Je().scanUsbDevice().then(i=>{n(this.tryParseJson(i))}).catch(i=>{t(this.tryParseJson(i))})})}getBluetoothStatus(){return new Promise((n,t)=>{Je().getBluetoothStatus().then(i=>{n(this.tryParseJson(i))}).catch(i=>{t(this.tryParseJson(i))})})}scanBluetoothDevice(n){return new Promise((t,i)=>{Je().scanBluetoothDevice(n).then(o=>{t(this.tryParseJson(o))}).catch(o=>{i(this.tryParseJson(o))})})}printEscPos(n){return new Promise((t,i)=>{Je().printEscPos(n).then(o=>{t(this.tryParseJson(o))}).catch(o=>{i(this.tryParseJson(o))})})}getStorageItem(n){return new Promise((t,i)=>{Je().getStorageItem(n).then(o=>{t(this.tryParseJson(o))}).catch(o=>{i(this.tryParseJson(o))})})}setStorageItem(n){return new Promise((t,i)=>{Je().setStorageItem(n).then(o=>{t(this.tryParseJson(o))}).catch(o=>{i(this.tryParseJson(o))})})}pairClover(n){return new Promise((t,i)=>{Je().pairClover(n).then(o=>{t(this.tryParseJson(o))}).catch(o=>{i(this.tryParseJson(o))})})}getAuthTokenClover(n){return new Promise((t,i)=>{Je().getAuthTokenClover(n).then(o=>{t(this.tryParseJson(o))}).catch(o=>{i(this.tryParseJson(o))})})}checkConnectionClover(n){return new Promise((t,i)=>{Je().checkConnectionClover(n).then(o=>{t(this.tryParseJson(o))}).catch(o=>{i(this.tryParseJson(o))})})}setLoginToken(n){return new Promise((t,i)=>{Je().setLoginToken(n).then(o=>{t(this.tryParseJson(o))}).catch(o=>{i(this.tryParseJson(o))})})}logout(){return new Promise((n,t)=>{Je().logout().then(i=>{n(this.tryParseJson(i))}).catch(i=>{t(this.tryParseJson(i))})})}paymentRequest(n){return new Promise((t,i)=>{Je().paymentRequest(n).then(o=>{t(this.tryParseJson(o))}).catch(o=>{i(this.tryParseJson(o))})})}gapHttpRequest(n){return new Promise((t,i)=>{Je().gapHttpRequest(n).then(o=>{t(this.tryParseJson(o))}).catch(o=>{i(this.tryParseJson(o))})})}getCardData(n){return new Promise((t,i)=>{Je().getCardData(n).then(o=>{t(this.tryParseJson(o))}).catch(o=>{i(this.tryParseJson(o))})})}scanComPort(){return new Promise((n,t)=>{Je().scanComPort().then(i=>{n(this.tryParseJson(i))}).catch(i=>{t(this.tryParseJson(i))})})}connectComPort(n){return new Promise((t,i)=>{Je().connectComPort(n).then(o=>{t(this.tryParseJson(o))}).catch(o=>{i(this.tryParseJson(o))})})}checkConnectionComPort(n){return new Promise((t,i)=>{Je().checkConnectionComPort(n).then(o=>{t(this.tryParseJson(o))}).catch(o=>{i(this.tryParseJson(o))})})}sendRequestComPort(n){return new Promise((t,i)=>{Je().sendRequestComPort(n).then(o=>{t(this.tryParseJson(o))}).catch(o=>{i(this.tryParseJson(o))})})}disconnectComPort(n){return new Promise((t,i)=>{Je().disconnectComPort(n).then(o=>{t(this.tryParseJson(o))}).catch(o=>{i(this.tryParseJson(o))})})}logMiniApp(n){return new Promise((t,i)=>{Je().logMiniApp(n).then(o=>{t(this.tryParseJson(o))}).catch(o=>{i(this.tryParseJson(o))})})}deviceRequest(n){return new Promise((t,i)=>{Je().deviceRequest(n).then(o=>{t(this.tryParseJson(o))}).catch(o=>{i(this.tryParseJson(o))})})}reInitializeWebview(){return new Promise((n,t)=>{Je().reInitializeWebview().then(i=>{n(this.tryParseJson(i))}).catch(i=>{t(this.tryParseJson(i))})})}checkKeyboardVisible(){return new Promise((n,t)=>{Je().checkKeyboardVisible().then(i=>{n(this.tryParseJson(i))}).catch(i=>{t(this.tryParseJson(i))})})}tryParseJson(n){try{return n=hj(n),JSON.parse(n)}catch{return n}}}var lR;(function(e){e.LOCATION="location",e.CONTACT="contact",e.MICROPHONE="microphone",e.CAMERA="camera",e.MEDIA_LIBRARY="media_library",e.SEND_MESSAGE="send_message"})(lR||(lR={}));var uR;(function(e){e.ALLOWED="ALLOWED",e.DENIED="DENIED",e.PERMISSION_NOT_AVAILABLE="PERMISSION_NOT_AVAILABLE"})(uR||(uR={}));var dR;(function(e){e.POWER_OFF="1",e.POWER_ON="2",e.PAIRING_SUCCESS="3",e.WAITING_PAYMENT="4",e.PAYMENT_SUCCESS="5",e.PAYMENT_FAIL="6"})(dR||(dR={}));var cR;(function(e){e.SET_PROXY="set_proxy",e.SCAN_WIFI="scan_wifi",e.CONNECT_WIFI="connect_wifi",e.DISCONNECT_WIFI="disconnect_wifi",e.FORGET_NETWORK="forget_network",e.TURN_ON_WIFI="turn_on_wifi",e.TURN_OFF_WIFI="turn_off_wifi",e.SET_DHCP="set_dhcp",e.SET_STATIC_IP="set_static_ip",e.SET_METERED_CONNECTION="set_metered_connection",e.SET_BRIGHTNESS="set_brightness",e.SET_VOLUME="set_volume",e.WIFI_STATE="wifi_state",e.NETWORK_TYPE="network_type"})(cR||(cR={}));var _R={exports:{}};(function(e){(function(n,t){e.exports?e.exports=t():n.log=t()})(Cn,function(){var n=function(){},t="undefined",i=typeof window!==t&&typeof window.navigator!==t&&/Trident\/|MSIE /.test(window.navigator.userAgent),o=["trace","debug","info","warn","error"],r={},s=null;function u(v,m){var g=v[m];if(typeof g.bind=="function")return g.bind(v);try{return Function.prototype.bind.call(g,v)}catch{return function(){return Function.prototype.apply.apply(g,[v,arguments])}}}function l(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function d(v){return v==="debug"&&(v="log"),typeof console===t?!1:v==="trace"&&i?l:console[v]!==void 0?u(console,v):console.log!==void 0?u(console,"log"):n}function c(){for(var v=this.getLevel(),m=0;m<o.length;m++){var g=o[m];this[g]=m<v?n:this.methodFactory(g,v,this.name)}if(this.log=this.debug,typeof console===t&&v<this.levels.SILENT)return"No console available for logging"}function _(v){return function(){typeof console!==t&&(c.call(this),this[v].apply(this,arguments))}}function f(v,m,g){return d(v)||_.apply(this,arguments)}function p(v,m){var g=this,E,y,S,C="loglevel";typeof v=="string"?C+=":"+v:typeof v=="symbol"&&(C=void 0);function T(I){var A=(o[I]||"silent").toUpperCase();if(!(typeof window===t||!C)){try{window.localStorage[C]=A;return}catch{}try{window.document.cookie=encodeURIComponent(C)+"="+A+";"}catch{}}}function R(){var I;if(!(typeof window===t||!C)){try{I=window.localStorage[C]}catch{}if(typeof I===t)try{var A=window.document.cookie,M=encodeURIComponent(C),w=A.indexOf(M+"=");w!==-1&&(I=/^([^;]+)/.exec(A.slice(w+M.length+1))[1])}catch{}return g.levels[I]===void 0&&(I=void 0),I}}function O(){if(!(typeof window===t||!C)){try{window.localStorage.removeItem(C)}catch{}try{window.document.cookie=encodeURIComponent(C)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch{}}}function B(I){var A=I;if(typeof A=="string"&&g.levels[A.toUpperCase()]!==void 0&&(A=g.levels[A.toUpperCase()]),typeof A=="number"&&A>=0&&A<=g.levels.SILENT)return A;throw new TypeError("log.setLevel() called with invalid level: "+I)}g.name=v,g.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},g.methodFactory=m||f,g.getLevel=function(){return S??y??E},g.setLevel=function(I,A){return S=B(I),A!==!1&&T(S),c.call(g)},g.setDefaultLevel=function(I){y=B(I),R()||g.setLevel(I,!1)},g.resetLevel=function(){S=null,O(),c.call(g)},g.enableAll=function(I){g.setLevel(g.levels.TRACE,I)},g.disableAll=function(I){g.setLevel(g.levels.SILENT,I)},g.rebuild=function(){if(s!==g&&(E=B(s.getLevel())),c.call(g),s===g)for(var I in r)r[I].rebuild()},E=B(s?s.getLevel():"WARN");var j=R();j!=null&&(S=B(j)),c.call(g)}s=new p,s.getLogger=function(m){if(typeof m!="symbol"&&typeof m!="string"||m==="")throw new TypeError("You must supply a name when creating a logger.");var g=r[m];return g||(g=r[m]=new p(m,s.methodFactory)),g};var a=typeof window!==t?window.log:void 0;return s.noConflict=function(){return typeof window!==t&&window.log===s&&(window.log=a),s},s.getLoggers=function(){return r},s.default=s,s})})(_R);var Dj=_R.exports;let fR=Oi(Dj);fR.setLevel("trace");const vs=qt.create({timeout:2e4,headers:{"Content-Type":"application/json"}}),kj=(e,n,t)=>{vs.defaults.headers.common.Authorization=`Bearer ${e}`,vs.defaults.baseURL=n,vs.defaults.headers.common["G-ClientID"]=t||""};vs.interceptors.response.use(e=>{var t,i,o;console.log(e);const n=e==null?void 0:e.data;return(n==null?void 0:n.status)=="OK"&&((t=n==null?void 0:n.result)==null?void 0:t.status)=="OK"&&((i=n==null?void 0:n.result)!=null&&i.data)?Promise.resolve((o=n==null?void 0:n.result)==null?void 0:o.data):Promise.reject((n==null?void 0:n.message)??"Error")},async e=>{var n;return Promise.reject(((n=e.response)==null?void 0:n.data)||e)}),new QA.BaseApi(be.V1);const Un=function(){let e;function n(){return new Pj(fR)}return{getInstance:function(){return e||(e=n()),e},getAccessToken:async function(){let t="",i="",o="";try{let r;if(Un.getInstance().detectPlatform()&&(r=Un.getInstance().detectPlatform()),r){Un.getInstance().setPlatformExecutor(r);const s=await Un.getInstance().getAccessToken();s&&typeof s.token<"u"&&s.token!=""&&(t=s.domain,i=s.gClientId,o=s.token)}}catch(r){console.error(r)}return{domain:t,gClient:i,token:o}}}}(),Lj=e=>new Promise(async(n,t)=>{let i=!1;try{let{domain:o,gClient:r,token:s}=await Un.getAccessToken();if(o=e.domain||o||"",r=e.id||r||"",s=e.token||s||"",!o||!r||!s){n({status:i,tenant_error:!0});return}kj(s,o,r),await zj({tenant_id:r}),i=!0,Hj(r,s,o),localStorage.setItem("chat_id",r),localStorage.setItem("chat_accessToken",s),localStorage.setItem("chat_domain",o),n({status:i})}catch(o){n({status:i,tenant_error:!0}),console.error(o)}});function ql(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var pR={exports:{}};(function(e,n){(function(t){e.exports=t()})(function(){return function(){return function t(i,o,r){function s(d,c){if(!o[d]){if(!i[d]){var _=typeof ql=="function"&&ql;if(!c&&_)return _(d,!0);if(u)return u(d,!0);var f=new Error("Cannot find module '"+d+"'");throw f.code="MODULE_NOT_FOUND",f}var p=o[d]={exports:{}};i[d][0].call(p.exports,function(a){return s(i[d][1][a]||a)},p,p.exports,t,i,o,r)}return o[d].exports}for(var u=typeof ql=="function"&&ql,l=0;l<r.length;l++)s(r[l]);return s}}()({1:[function(t,i,o){(function(r,s){(function(){const u=t("events").EventEmitter,l=t("./store"),d=t("./topic-alias-recv"),c=t("./topic-alias-send"),_=t("mqtt-packet"),f=t("./default-message-id-provider"),p=t("readable-stream").Writable,a=t("inherits"),v=t("reinterval"),m=t("rfdc/default"),g=t("./validations"),E=t("xtend"),y=t("debug")("mqttjs:client"),S=r?r.nextTick:function(M){setTimeout(M,0)},C=s.setImmediate||function(M){S(M)},T={keepalive:60,reschedulePings:!0,protocolId:"MQTT",protocolVersion:4,reconnectPeriod:1e3,connectTimeout:3e4,clean:!0,resubscribe:!0},R={0:"",1:"Unacceptable protocol version",2:"Identifier rejected",3:"Server unavailable",4:"Bad username or password",5:"Not authorized",16:"No matching subscribers",17:"No subscription existed",128:"Unspecified error",129:"Malformed Packet",130:"Protocol Error",131:"Implementation specific error",132:"Unsupported Protocol Version",133:"Client Identifier not valid",134:"Bad User Name or Password",135:"Not authorized",136:"Server unavailable",137:"Server busy",138:"Banned",139:"Server shutting down",140:"Bad authentication method",141:"Keep Alive timeout",142:"Session taken over",143:"Topic Filter invalid",144:"Topic Name invalid",145:"Packet identifier in use",146:"Packet Identifier not found",147:"Receive Maximum exceeded",148:"Topic Alias invalid",149:"Packet too large",150:"Message rate too high",151:"Quota exceeded",152:"Administrative action",153:"Payload format invalid",154:"Retain not supported",155:"QoS not supported",156:"Use another server",157:"Server moved",158:"Shared Subscriptions not supported",159:"Connection rate exceeded",160:"Maximum connect time",161:"Subscription Identifiers not supported",162:"Wildcard Subscriptions not supported"};function O(M,w){let x;w.properties&&(x=w.properties.topicAlias);let k=w.topic.toString();if(k.length===0){if(x===void 0)return new Error("Unregistered Topic Alias");if((k=M.topicAliasSend.getTopicByAlias(x))===void 0)return new Error("Unregistered Topic Alias");w.topic=k}x&&delete w.properties.topicAlias}function B(M,w,x){y("sendPacket :: packet: %O",w),y("sendPacket :: emitting `packetsend`"),M.emit("packetsend",w),y("sendPacket :: writing to stream");const k=_.writeToStream(w,M.stream,M.options);y("sendPacket :: writeToStream result %s",k),!k&&x&&x!==I?(y("sendPacket :: handle events on `drain` once through callback."),M.stream.once("drain",x)):x&&(y("sendPacket :: invoking cb"),x())}function j(M,w,x,k){y("storeAndSend :: store packet with cmd %s to outgoingStore",w.cmd);let V,L=w;if(L.cmd==="publish"&&(L=m(w),V=O(M,L)))return x&&x(V);M.outgoingStore.put(L,function(D){if(D)return x&&x(D);k(),B(M,w,x)})}function I(M){y("nop ::",M)}function A(M,w){let x;const k=this;if(!(this instanceof A))return new A(M,w);for(x in this.options=w||{},T)this.options[x]===void 0?this.options[x]=T[x]:this.options[x]=w[x];y("MqttClient :: options.protocol",w.protocol),y("MqttClient :: options.protocolVersion",w.protocolVersion),y("MqttClient :: options.username",w.username),y("MqttClient :: options.keepalive",w.keepalive),y("MqttClient :: options.reconnectPeriod",w.reconnectPeriod),y("MqttClient :: options.rejectUnauthorized",w.rejectUnauthorized),y("MqttClient :: options.topicAliasMaximum",w.topicAliasMaximum),this.options.clientId=typeof w.clientId=="string"?w.clientId:"mqttjs_"+Math.random().toString(16).substr(2,8),y("MqttClient :: clientId",this.options.clientId),this.options.customHandleAcks=w.protocolVersion===5&&w.customHandleAcks?w.customHandleAcks:function(){arguments[3](0)},this.streamBuilder=M,this.messageIdProvider=this.options.messageIdProvider===void 0?new f:this.options.messageIdProvider,this.outgoingStore=w.outgoingStore||new l,this.incomingStore=w.incomingStore||new l,this.queueQoSZero=w.queueQoSZero===void 0||w.queueQoSZero,this._resubscribeTopics={},this.messageIdToTopic={},this.pingTimer=null,this.connected=!1,this.disconnecting=!1,this.queue=[],this.connackTimer=null,this.reconnectTimer=null,this._storeProcessing=!1,this._packetIdsDuringStoreProcessing={},this._storeProcessingQueue=[],this.outgoing={},this._firstConnection=!0,w.topicAliasMaximum>0&&(w.topicAliasMaximum>65535?y("MqttClient :: options.topicAliasMaximum is out of range"):this.topicAliasRecv=new d(w.topicAliasMaximum)),this.on("connect",function(){const V=this.queue;y("connect :: sending queued packets"),function L(){const D=V.shift();y("deliver :: entry %o",D);let F=null;if(!D)return void k._resubscribe();F=D.packet,y("deliver :: call _sendPacket for %o",F);let G=!0;F.messageId&&F.messageId!==0&&(k.messageIdProvider.register(F.messageId)||(G=!1)),G?k._sendPacket(F,function(q){D.cb&&D.cb(q),L()}):(y("messageId: %d has already used. The message is skipped and removed.",F.messageId),L())}()}),this.on("close",function(){y("close :: connected set to `false`"),this.connected=!1,y("close :: clearing connackTimer"),clearTimeout(this.connackTimer),y("close :: clearing ping timer"),k.pingTimer!==null&&(k.pingTimer.clear(),k.pingTimer=null),this.topicAliasRecv&&this.topicAliasRecv.clear(),y("close :: calling _setupReconnect"),this._setupReconnect()}),u.call(this),y("MqttClient :: setting up stream"),this._setupStream()}a(A,u),A.prototype._setupStream=function(){const M=this,w=new p,x=_.parser(this.options);let k=null;const V=[];function L(){if(V.length)S(D);else{const G=k;k=null,G()}}function D(){y("work :: getting next packet in queue");const G=V.shift();if(G)y("work :: packet pulled from queue"),M._handlePacket(G,L);else{y("work :: no packets in queue");const q=k;k=null,y("work :: done flag is %s",!!q),q&&q()}}y("_setupStream :: calling method to clear reconnect"),this._clearReconnect(),y("_setupStream :: using streamBuilder provided to client to create stream"),this.stream=this.streamBuilder(this),x.on("packet",function(G){y("parser :: on packet push to packets array."),V.push(G)}),w._write=function(G,q,Y){k=Y,y("writable stream :: parsing buffer"),x.parse(G),D()},y("_setupStream :: pipe stream to writable stream"),this.stream.pipe(w),this.stream.on("error",function(G){y("streamErrorHandler :: error",G.message),G.code?(y("streamErrorHandler :: emitting error"),M.emit("error",G)):I(G)}),this.stream.on("close",function(){var G;y("(%s)stream :: on close",M.options.clientId),(G=M.outgoing)&&(y("flushVolatile :: deleting volatile messages from the queue and setting their callbacks as error function"),Object.keys(G).forEach(function(q){G[q].volatile&&typeof G[q].cb=="function"&&(G[q].cb(new Error("Connection closed")),delete G[q])})),y("stream: emit close to MqttClient"),M.emit("close")}),y("_setupStream: sending packet `connect`");const F=Object.create(this.options);if(F.cmd="connect",this.topicAliasRecv&&(F.properties||(F.properties={}),this.topicAliasRecv&&(F.properties.topicAliasMaximum=this.topicAliasRecv.max)),B(this,F),x.on("error",this.emit.bind(this,"error")),this.options.properties){if(!this.options.properties.authenticationMethod&&this.options.properties.authenticationData)return M.end(()=>this.emit("error",new Error("Packet has no Authentication Method"))),this;this.options.properties.authenticationMethod&&this.options.authPacket&&typeof this.options.authPacket=="object"&&B(this,E({cmd:"auth",reasonCode:0},this.options.authPacket))}this.stream.setMaxListeners(1e3),clearTimeout(this.connackTimer),this.connackTimer=setTimeout(function(){y("!!connectTimeout hit!! Calling _cleanUp with force `true`"),M._cleanUp(!0)},this.options.connectTimeout)},A.prototype._handlePacket=function(M,w){const x=this.options;if(x.protocolVersion===5&&x.properties&&x.properties.maximumPacketSize&&x.properties.maximumPacketSize<M.length)return this.emit("error",new Error("exceeding packets size "+M.cmd)),this.end({reasonCode:149,properties:{reasonString:"Maximum packet size was exceeded"}}),this;switch(y("_handlePacket :: emitting packetreceive"),this.emit("packetreceive",M),M.cmd){case"publish":this._handlePublish(M,w);break;case"puback":case"pubrec":case"pubcomp":case"suback":case"unsuback":this._handleAck(M),w();break;case"pubrel":this._handlePubrel(M,w);break;case"connack":this._handleConnack(M),w();break;case"auth":this._handleAuth(M),w();break;case"pingresp":this._handlePingresp(M),w();break;case"disconnect":this._handleDisconnect(M),w()}},A.prototype._checkDisconnecting=function(M){return this.disconnecting&&(M&&M!==I?M(new Error("client disconnecting")):this.emit("error",new Error("client disconnecting"))),this.disconnecting},A.prototype.publish=function(M,w,x,k){y("publish :: message `%s` to topic `%s`",w,M);const V=this.options;if(typeof x=="function"&&(k=x,x=null),x=E({qos:0,retain:!1,dup:!1},x),this._checkDisconnecting(k))return this;const L=this,D=function(){let F=0;if((x.qos===1||x.qos===2)&&(F=L._nextId())===null)return y("No messageId left"),!1;const G={cmd:"publish",topic:M,payload:w,qos:x.qos,retain:x.retain,messageId:F,dup:x.dup};switch(V.protocolVersion===5&&(G.properties=x.properties),y("publish :: qos",x.qos),x.qos){case 1:case 2:L.outgoing[G.messageId]={volatile:!1,cb:k||I},y("MqttClient:publish: packet cmd: %s",G.cmd),L._sendPacket(G,void 0,x.cbStorePut);break;default:y("MqttClient:publish: packet cmd: %s",G.cmd),L._sendPacket(G,k,x.cbStorePut)}return!0};return(this._storeProcessing||this._storeProcessingQueue.length>0||!D())&&this._storeProcessingQueue.push({invoke:D,cbStorePut:x.cbStorePut,callback:k}),this},A.prototype.subscribe=function(){const M=this,w=new Array(arguments.length);for(let K=0;K<arguments.length;K++)w[K]=arguments[K];const x=[];let k=w.shift();const V=k.resubscribe;let L=w.pop()||I,D=w.pop();const F=this.options.protocolVersion;delete k.resubscribe,typeof k=="string"&&(k=[k]),typeof L!="function"&&(D=L,L=I);const G=g.validateTopics(k);if(G!==null)return C(L,new Error("Invalid topic "+G)),this;if(this._checkDisconnecting(L))return y("subscribe: discconecting true"),this;const q={qos:0};if(F===5&&(q.nl=!1,q.rap=!1,q.rh=0),D=E(q,D),Array.isArray(k)?k.forEach(function(K){if(y("subscribe: array topic %s",K),!Object.prototype.hasOwnProperty.call(M._resubscribeTopics,K)||M._resubscribeTopics[K].qos<D.qos||V){const W={topic:K,qos:D.qos};F===5&&(W.nl=D.nl,W.rap=D.rap,W.rh=D.rh,W.properties=D.properties),y("subscribe: pushing topic `%s` and qos `%s` to subs list",W.topic,W.qos),x.push(W)}}):Object.keys(k).forEach(function(K){if(y("subscribe: object topic %s",K),!Object.prototype.hasOwnProperty.call(M._resubscribeTopics,K)||M._resubscribeTopics[K].qos<k[K].qos||V){const W={topic:K,qos:k[K].qos};F===5&&(W.nl=k[K].nl,W.rap=k[K].rap,W.rh=k[K].rh,W.properties=D.properties),y("subscribe: pushing `%s` to subs list",W),x.push(W)}}),!x.length)return L(null,[]),this;const Y=function(){const K=M._nextId();if(K===null)return y("No messageId left"),!1;const W={cmd:"subscribe",subscriptions:x,qos:1,retain:!1,dup:!1,messageId:K};if(D.properties&&(W.properties=D.properties),M.options.resubscribe){y("subscribe :: resubscribe true");const X=[];x.forEach(function(J){if(M.options.reconnectPeriod>0){const Z={qos:J.qos};F===5&&(Z.nl=J.nl||!1,Z.rap=J.rap||!1,Z.rh=J.rh||0,Z.properties=J.properties),M._resubscribeTopics[J.topic]=Z,X.push(J.topic)}}),M.messageIdToTopic[W.messageId]=X}return M.outgoing[W.messageId]={volatile:!0,cb:function(X,J){if(!X){const Z=J.granted;for(let b=0;b<Z.length;b+=1)x[b].qos=Z[b]}L(X,x)}},y("subscribe :: call _sendPacket"),M._sendPacket(W),!0};return(this._storeProcessing||this._storeProcessingQueue.length>0||!Y())&&this._storeProcessingQueue.push({invoke:Y,callback:L}),this},A.prototype.unsubscribe=function(){const M=this,w=new Array(arguments.length);for(let F=0;F<arguments.length;F++)w[F]=arguments[F];let x=w.shift(),k=w.pop()||I,V=w.pop();typeof x=="string"&&(x=[x]),typeof k!="function"&&(V=k,k=I);const L=g.validateTopics(x);if(L!==null)return C(k,new Error("Invalid topic "+L)),this;if(M._checkDisconnecting(k))return this;const D=function(){const F=M._nextId();if(F===null)return y("No messageId left"),!1;const G={cmd:"unsubscribe",qos:1,messageId:F};return typeof x=="string"?G.unsubscriptions=[x]:Array.isArray(x)&&(G.unsubscriptions=x),M.options.resubscribe&&G.unsubscriptions.forEach(function(q){delete M._resubscribeTopics[q]}),typeof V=="object"&&V.properties&&(G.properties=V.properties),M.outgoing[G.messageId]={volatile:!0,cb:k},y("unsubscribe: call _sendPacket"),M._sendPacket(G),!0};return(this._storeProcessing||this._storeProcessingQueue.length>0||!D())&&this._storeProcessingQueue.push({invoke:D,callback:k}),this},A.prototype.end=function(M,w,x){const k=this;function V(){y("end :: (%s) :: finish :: calling _cleanUp with force %s",k.options.clientId,M),k._cleanUp(M,()=>{y("end :: finish :: calling process.nextTick on closeStores"),S((function(){y("end :: closeStores: closing incoming and outgoing stores"),k.disconnected=!0,k.incomingStore.close(function(L){k.outgoingStore.close(function(D){if(y("end :: closeStores: emitting end"),k.emit("end"),x){const F=L||D;y("end :: closeStores: invoking callback with args"),x(F)}})}),k._deferredReconnect&&k._deferredReconnect()}).bind(k))},w)}return y("end :: (%s)",this.options.clientId),M!=null&&typeof M=="boolean"||(x=w||I,w=M,M=!1,typeof w!="object"&&(x=w,w=null,typeof x!="function"&&(x=I))),typeof w!="object"&&(x=w,w=null),y("end :: cb? %s",!!x),x=x||I,this.disconnecting?(x(),this):(this._clearReconnect(),this.disconnecting=!0,!M&&Object.keys(this.outgoing).length>0?(y("end :: (%s) :: calling finish in 10ms once outgoing is empty",k.options.clientId),this.once("outgoingEmpty",setTimeout.bind(null,V,10))):(y("end :: (%s) :: immediately calling finish",k.options.clientId),V()),this)},A.prototype.removeOutgoingMessage=function(M){const w=this.outgoing[M]?this.outgoing[M].cb:null;return delete this.outgoing[M],this.outgoingStore.del({messageId:M},function(){w(new Error("Message removed"))}),this},A.prototype.reconnect=function(M){y("client reconnect");const w=this,x=function(){M?(w.options.incomingStore=M.incomingStore,w.options.outgoingStore=M.outgoingStore):(w.options.incomingStore=null,w.options.outgoingStore=null),w.incomingStore=w.options.incomingStore||new l,w.outgoingStore=w.options.outgoingStore||new l,w.disconnecting=!1,w.disconnected=!1,w._deferredReconnect=null,w._reconnect()};return this.disconnecting&&!this.disconnected?this._deferredReconnect=x:x(),this},A.prototype._reconnect=function(){y("_reconnect: emitting reconnect to client"),this.emit("reconnect"),this.connected?(this.end(()=>{this._setupStream()}),y("client already connected. disconnecting first.")):(y("_reconnect: calling _setupStream"),this._setupStream())},A.prototype._setupReconnect=function(){const M=this;!M.disconnecting&&!M.reconnectTimer&&M.options.reconnectPeriod>0?(this.reconnecting||(y("_setupReconnect :: emit `offline` state"),this.emit("offline"),y("_setupReconnect :: set `reconnecting` to `true`"),this.reconnecting=!0),y("_setupReconnect :: setting reconnectTimer for %d ms",M.options.reconnectPeriod),M.reconnectTimer=setInterval(function(){y("reconnectTimer :: reconnect triggered!"),M._reconnect()},M.options.reconnectPeriod)):y("_setupReconnect :: doing nothing...")},A.prototype._clearReconnect=function(){y("_clearReconnect : clearing reconnect timer"),this.reconnectTimer&&(clearInterval(this.reconnectTimer),this.reconnectTimer=null)},A.prototype._cleanUp=function(M,w){const x=arguments[2];if(w&&(y("_cleanUp :: done callback provided for on stream close"),this.stream.on("close",w)),y("_cleanUp :: forced? %s",M),M)this.options.reconnectPeriod===0&&this.options.clean&&(k=this.outgoing)&&(y("flush: queue exists? %b",!!k),Object.keys(k).forEach(function(V){typeof k[V].cb=="function"&&(k[V].cb(new Error("Connection closed")),delete k[V])})),y("_cleanUp :: (%s) :: destroying stream",this.options.clientId),this.stream.destroy();else{const V=E({cmd:"disconnect"},x);y("_cleanUp :: (%s) :: call _sendPacket with disconnect packet",this.options.clientId),this._sendPacket(V,C.bind(null,this.stream.end.bind(this.stream)))}var k;this.disconnecting||(y("_cleanUp :: client not disconnecting. Clearing and resetting reconnect."),this._clearReconnect(),this._setupReconnect()),this.pingTimer!==null&&(y("_cleanUp :: clearing pingTimer"),this.pingTimer.clear(),this.pingTimer=null),w&&!this.connected&&(y("_cleanUp :: (%s) :: removing stream `done` callback `close` listener",this.options.clientId),this.stream.removeListener("close",w),w())},A.prototype._sendPacket=function(M,w,x){y("_sendPacket :: (%s) :: start",this.options.clientId),x=x||I,w=w||I;const k=function(V,L){if(V.options.protocolVersion===5&&L.cmd==="publish"){let D;L.properties&&(D=L.properties.topicAlias);const F=L.topic.toString();if(V.topicAliasSend)if(D){if(F.length!==0&&(y("applyTopicAlias :: register topic: %s - alias: %d",F,D),!V.topicAliasSend.put(F,D)))return y("applyTopicAlias :: error out of range. topic: %s - alias: %d",F,D),new Error("Sending Topic Alias out of range")}else F.length!==0&&(V.options.autoAssignTopicAlias?(D=V.topicAliasSend.getAliasByTopic(F))?(L.topic="",L.properties={...L.properties,topicAlias:D},y("applyTopicAlias :: auto assign(use) topic: %s - alias: %d",F,D)):(D=V.topicAliasSend.getLruAlias(),V.topicAliasSend.put(F,D),L.properties={...L.properties,topicAlias:D},y("applyTopicAlias :: auto assign topic: %s - alias: %d",F,D)):V.options.autoUseTopicAlias&&(D=V.topicAliasSend.getAliasByTopic(F))&&(L.topic="",L.properties={...L.properties,topicAlias:D},y("applyTopicAlias :: auto use topic: %s - alias: %d",F,D)));else if(D)return y("applyTopicAlias :: error out of range. topic: %s - alias: %d",F,D),new Error("Sending Topic Alias out of range")}}(this,M);if(k)w(k);else{if(!this.connected)return M.cmd==="auth"?(this._shiftPingInterval(),void B(this,M,w)):(y("_sendPacket :: client not connected. Storing packet offline."),void this._storePacket(M,w,x));switch(this._shiftPingInterval(),M.cmd){case"publish":break;case"pubrel":return void j(this,M,w,x);default:return void B(this,M,w)}switch(M.qos){case 2:case 1:j(this,M,w,x);break;case 0:default:B(this,M,w)}y("_sendPacket :: (%s) :: end",this.options.clientId)}},A.prototype._storePacket=function(M,w,x){y("_storePacket :: packet: %o",M),y("_storePacket :: cb? %s",!!w),x=x||I;let k=M;if(k.cmd==="publish"){const V=O(this,k=m(M));if(V)return w&&w(V)}(k.qos||0)===0&&this.queueQoSZero||k.cmd!=="publish"?this.queue.push({packet:k,cb:w}):k.qos>0?(w=this.outgoing[k.messageId]?this.outgoing[k.messageId].cb:null,this.outgoingStore.put(k,function(V){if(V)return w&&w(V);x()})):w&&w(new Error("No connection to broker"))},A.prototype._setupPingTimer=function(){y("_setupPingTimer :: keepalive %d (seconds)",this.options.keepalive);const M=this;!this.pingTimer&&this.options.keepalive&&(this.pingResp=!0,this.pingTimer=v(function(){M._checkPing()},1e3*this.options.keepalive))},A.prototype._shiftPingInterval=function(){this.pingTimer&&this.options.keepalive&&this.options.reschedulePings&&this.pingTimer.reschedule(1e3*this.options.keepalive)},A.prototype._checkPing=function(){y("_checkPing :: checking ping..."),this.pingResp?(y("_checkPing :: ping response received. Clearing flag and sending `pingreq`"),this.pingResp=!1,this._sendPacket({cmd:"pingreq"})):(y("_checkPing :: calling _cleanUp with force true"),this._cleanUp(!0))},A.prototype._handlePingresp=function(){this.pingResp=!0},A.prototype._handleConnack=function(M){y("_handleConnack");const w=this.options,x=w.protocolVersion===5?M.reasonCode:M.returnCode;if(clearTimeout(this.connackTimer),delete this.topicAliasSend,M.properties){if(M.properties.topicAliasMaximum){if(M.properties.topicAliasMaximum>65535)return void this.emit("error",new Error("topicAliasMaximum from broker is out of range"));M.properties.topicAliasMaximum>0&&(this.topicAliasSend=new c(M.properties.topicAliasMaximum))}M.properties.serverKeepAlive&&w.keepalive&&(w.keepalive=M.properties.serverKeepAlive,this._shiftPingInterval()),M.properties.maximumPacketSize&&(w.properties||(w.properties={}),w.properties.maximumPacketSize=M.properties.maximumPacketSize)}if(x===0)this.reconnecting=!1,this._onConnect(M);else if(x>0){const k=new Error("Connection refused: "+R[x]);k.code=x,this.emit("error",k)}},A.prototype._handleAuth=function(M){const w=this.options.protocolVersion,x=w===5?M.reasonCode:M.returnCode;if(w!==5){const V=new Error("Protocol error: Auth packets are only supported in MQTT 5. Your version:"+w);return V.code=x,void this.emit("error",V)}const k=this;this.handleAuth(M,function(V,L){if(V)k.emit("error",V);else if(x===24)k.reconnecting=!1,k._sendPacket(L);else{const D=new Error("Connection refused: "+R[x]);V.code=x,k.emit("error",D)}})},A.prototype.handleAuth=function(M,w){w()},A.prototype._handlePublish=function(M,w){y("_handlePublish: packet %o",M),w=w!==void 0?w:I;let x=M.topic.toString();const k=M.payload,V=M.qos,L=M.messageId,D=this,F=this.options,G=[0,16,128,131,135,144,145,151,153];if(this.options.protocolVersion===5){let q;if(M.properties&&(q=M.properties.topicAlias),q!==void 0)if(x.length===0){if(!(q>0&&q<=65535))return y("_handlePublish :: topic alias out of range. alias: %d",q),void this.emit("error",new Error("Received Topic Alias is out of range"));{const Y=this.topicAliasRecv.getTopicByAlias(q);if(!Y)return y("_handlePublish :: unregistered topic alias. alias: %d",q),void this.emit("error",new Error("Received unregistered Topic Alias"));y("_handlePublish :: topic complemented by alias. topic: %s - alias: %d",x=Y,q)}}else{if(!this.topicAliasRecv.put(x,q))return y("_handlePublish :: topic alias out of range. alias: %d",q),void this.emit("error",new Error("Received Topic Alias is out of range"));y("_handlePublish :: registered topic: %s - alias: %d",x,q)}}switch(y("_handlePublish: qos %d",V),V){case 2:F.customHandleAcks(x,k,M,function(q,Y){return q instanceof Error||(Y=q,q=null),q?D.emit("error",q):G.indexOf(Y)===-1?D.emit("error",new Error("Wrong reason code for pubrec")):void(Y?D._sendPacket({cmd:"pubrec",messageId:L,reasonCode:Y},w):D.incomingStore.put(M,function(){D._sendPacket({cmd:"pubrec",messageId:L},w)}))});break;case 1:F.customHandleAcks(x,k,M,function(q,Y){return q instanceof Error||(Y=q,q=null),q?D.emit("error",q):G.indexOf(Y)===-1?D.emit("error",new Error("Wrong reason code for puback")):(Y||D.emit("message",x,k,M),void D.handleMessage(M,function(K){if(K)return w&&w(K);D._sendPacket({cmd:"puback",messageId:L,reasonCode:Y},w)}))});break;case 0:this.emit("message",x,k,M),this.handleMessage(M,w);break;default:y("_handlePublish: unknown QoS. Doing nothing.")}},A.prototype.handleMessage=function(M,w){w()},A.prototype._handleAck=function(M){const w=M.messageId,x=M.cmd;let k=null;const V=this.outgoing[w]?this.outgoing[w].cb:null,L=this;let D;if(V){switch(y("_handleAck :: packet type",x),x){case"pubcomp":case"puback":{const F=M.reasonCode;F&&F>0&&F!==16&&((D=new Error("Publish error: "+R[F])).code=F,V(D,M)),delete this.outgoing[w],this.outgoingStore.del(M,V),this.messageIdProvider.deallocate(w),this._invokeStoreProcessingQueue();break}case"pubrec":{k={cmd:"pubrel",qos:2,messageId:w};const F=M.reasonCode;F&&F>0&&F!==16?((D=new Error("Publish error: "+R[F])).code=F,V(D,M)):this._sendPacket(k);break}case"suback":delete this.outgoing[w],this.messageIdProvider.deallocate(w);for(let F=0;F<M.granted.length;F++)if(128&M.granted[F]){const G=this.messageIdToTopic[w];G&&G.forEach(function(q){delete L._resubscribeTopics[q]})}this._invokeStoreProcessingQueue(),V(null,M);break;case"unsuback":delete this.outgoing[w],this.messageIdProvider.deallocate(w),this._invokeStoreProcessingQueue(),V(null);break;default:L.emit("error",new Error("unrecognized packet type"))}this.disconnecting&&Object.keys(this.outgoing).length===0&&this.emit("outgoingEmpty")}else y("_handleAck :: Server sent an ack in error. Ignoring.")},A.prototype._handlePubrel=function(M,w){y("handling pubrel packet"),w=w!==void 0?w:I;const x=this,k={cmd:"pubcomp",messageId:M.messageId};x.incomingStore.get(M,function(V,L){V?x._sendPacket(k,w):(x.emit("message",L.topic,L.payload,L),x.handleMessage(L,function(D){if(D)return w(D);x.incomingStore.del(L,I),x._sendPacket(k,w)}))})},A.prototype._handleDisconnect=function(M){this.emit("disconnect",M)},A.prototype._nextId=function(){return this.messageIdProvider.allocate()},A.prototype.getLastMessageId=function(){return this.messageIdProvider.getLastAllocated()},A.prototype._resubscribe=function(){y("_resubscribe");const M=Object.keys(this._resubscribeTopics);if(!this._firstConnection&&(this.options.clean||this.options.protocolVersion===5&&!this.connackPacket.sessionPresent)&&M.length>0)if(this.options.resubscribe)if(this.options.protocolVersion===5){y("_resubscribe: protocolVersion 5");for(let w=0;w<M.length;w++){const x={};x[M[w]]=this._resubscribeTopics[M[w]],x.resubscribe=!0,this.subscribe(x,{properties:x[M[w]].properties})}}else this._resubscribeTopics.resubscribe=!0,this.subscribe(this._resubscribeTopics);else this._resubscribeTopics={};this._firstConnection=!1},A.prototype._onConnect=function(M){if(this.disconnected)return void this.emit("connect",M);const w=this;this.connackPacket=M,this.messageIdProvider.clear(),this._setupPingTimer(),this.connected=!0,function x(){let k=w.outgoingStore.createStream();function V(){w._storeProcessing=!1,w._packetIdsDuringStoreProcessing={}}function L(){k.destroy(),k=null,w._flushStoreProcessingQueue(),V()}w.once("close",L),k.on("error",function(D){V(),w._flushStoreProcessingQueue(),w.removeListener("close",L),w.emit("error",D)}),k.on("end",function(){let D=!0;for(const F in w._packetIdsDuringStoreProcessing)if(!w._packetIdsDuringStoreProcessing[F]){D=!1;break}D?(V(),w.removeListener("close",L),w._invokeAllStoreProcessingQueue(),w.emit("connect",M)):x()}),function D(){if(!k)return;w._storeProcessing=!0;const F=k.read(1);let G;F?w._packetIdsDuringStoreProcessing[F.messageId]?D():w.disconnecting||w.reconnectTimer?k.destroy&&k.destroy():(G=w.outgoing[F.messageId]?w.outgoing[F.messageId].cb:null,w.outgoing[F.messageId]={volatile:!1,cb:function(q,Y){G&&G(q,Y),D()}},w._packetIdsDuringStoreProcessing[F.messageId]=!0,w.messageIdProvider.register(F.messageId)?w._sendPacket(F):y("messageId: %d has already used.",F.messageId)):k.once("readable",D)}()}()},A.prototype._invokeStoreProcessingQueue=function(){if(this._storeProcessingQueue.length>0){const M=this._storeProcessingQueue[0];if(M&&M.invoke())return this._storeProcessingQueue.shift(),!0}return!1},A.prototype._invokeAllStoreProcessingQueue=function(){for(;this._invokeStoreProcessingQueue(););},A.prototype._flushStoreProcessingQueue=function(){for(const M of this._storeProcessingQueue)M.cbStorePut&&M.cbStorePut(new Error("Connection closed")),M.callback&&M.callback(new Error("Connection closed"));this._storeProcessingQueue.splice(0)},i.exports=A}).call(this)}).call(this,t("_process"),typeof Cn<"u"?Cn:typeof self<"u"?self:typeof window<"u"?window:{})},{"./default-message-id-provider":7,"./store":8,"./topic-alias-recv":9,"./topic-alias-send":10,"./validations":11,_process:50,debug:18,events:22,inherits:24,"mqtt-packet":40,"readable-stream":69,reinterval:70,"rfdc/default":71,xtend:81}],2:[function(t,i,o){const{Buffer:r}=t("buffer"),s=t("readable-stream").Transform,u=t("duplexify");let l,d,c,_=!1;i.exports=function(f,p){if(p.hostname=p.hostname||p.host,!p.hostname)throw new Error("Could not determine host. Specify host manually.");const a=p.protocolId==="MQIsdp"&&p.protocolVersion===3?"mqttv3.1":"mqtt";(function(m){m.hostname||(m.hostname="localhost"),m.path||(m.path="/"),m.wsOptions||(m.wsOptions={})})(p);const v=function(m,g){const E=m.protocol==="alis"?"wss":"ws";let y=E+"://"+m.hostname+m.path;return m.port&&m.port!==80&&m.port!==443&&(y=E+"://"+m.hostname+":"+m.port+m.path),typeof m.transformWsUrl=="function"&&(y=m.transformWsUrl(y,m,g)),y}(p,f);return(l=p.my).connectSocket({url:v,protocols:a}),d=function(){const m=new s;return m._write=function(g,E,y){l.sendSocketMessage({data:g.buffer,success:function(){y()},fail:function(){y(new Error)}})},m._flush=function(g){l.closeSocket({success:function(){g()}})},m}(),c=u.obj(),_||(_=!0,l.onSocketOpen(function(){c.setReadable(d),c.setWritable(d),c.emit("connect")}),l.onSocketMessage(function(m){if(typeof m.data=="string"){const g=r.from(m.data,"base64");d.push(g)}else{const g=new FileReader;g.addEventListener("load",function(){let E=g.result;E=E instanceof ArrayBuffer?r.from(E):r.from(E,"utf8"),d.push(E)}),g.readAsArrayBuffer(m.data)}}),l.onSocketClose(function(){c.end(),c.destroy()}),l.onSocketError(function(m){c.destroy(m)})),c}},{buffer:17,duplexify:20,"readable-stream":69}],3:[function(t,i,o){const r=t("net"),s=t("debug")("mqttjs:tcp");i.exports=function(u,l){l.port=l.port||1883,l.hostname=l.hostname||l.host||"localhost";const d=l.port,c=l.hostname;return s("port %d and host %s",d,c),r.createConnection(d,c)}},{debug:18,net:16}],4:[function(t,i,o){const r=t("tls"),s=t("net"),u=t("debug")("mqttjs:tls");i.exports=function(l,d){d.port=d.port||8883,d.host=d.hostname||d.host||"localhost",s.isIP(d.host)===0&&(d.servername=d.host),d.rejectUnauthorized=d.rejectUnauthorized!==!1,delete d.path,u("port %d host %s rejectUnauthorized %b",d.port,d.host,d.rejectUnauthorized);const c=r.connect(d);function _(f){d.rejectUnauthorized&&l.emit("error",f),c.end()}return c.on("secureConnect",function(){d.rejectUnauthorized&&!c.authorized?c.emit("error",new Error("TLS not authorized")):c.removeListener("error",_)}),c.on("error",_),c}},{debug:18,net:16,tls:16}],5:[function(t,i,o){(function(r){(function(){const{Buffer:s}=t("buffer"),u=t("ws"),l=t("debug")("mqttjs:ws"),d=t("duplexify"),c=t("readable-stream").Transform,_=["rejectUnauthorized","ca","cert","key","pfx","passphrase"],f=r!==void 0&&r.title==="browser"||typeof __webpack_require__=="function";function p(v,m){let g=v.protocol+"://"+v.hostname+":"+v.port+v.path;return typeof v.transformWsUrl=="function"&&(g=v.transformWsUrl(g,v,m)),g}function a(v){const m=v;return v.hostname||(m.hostname="localhost"),v.port||(v.protocol==="wss"?m.port=443:m.port=80),v.path||(m.path="/"),v.wsOptions||(m.wsOptions={}),f||v.protocol!=="wss"||_.forEach(function(g){Object.prototype.hasOwnProperty.call(v,g)&&!Object.prototype.hasOwnProperty.call(v.wsOptions,g)&&(m.wsOptions[g]=v[g])}),m}i.exports=f?function(v,m){let g;l("browserStreamBuilder");const E=function(M){const w=a(M);if(w.hostname||(w.hostname=w.host),!w.hostname){if(typeof document>"u")throw new Error("Could not determine host. Specify host manually.");const x=new URL(document.URL);w.hostname=x.hostname,w.port||(w.port=x.port)}return w.objectMode===void 0&&(w.objectMode=!(w.binary===!0||w.binary===void 0)),w}(m).browserBufferSize||524288,y=m.browserBufferTimeout||1e3,S=!m.objectMode,C=function(M,w){const x=w.protocolId==="MQIsdp"&&w.protocolVersion===3?"mqttv3.1":"mqtt",k=p(w,M),V=new WebSocket(k,[x]);return V.binaryType="arraybuffer",V}(v,m),T=function(M,w,x){const k=new c({objectModeMode:M.objectMode});return k._write=w,k._flush=x,k}(m,function M(w,x,k){C.bufferedAmount>E&&setTimeout(M,y,w,x,k),S&&typeof w=="string"&&(w=s.from(w,"utf8"));try{C.send(w)}catch(V){return k(V)}k()},function(M){C.close(),M()});m.objectMode||(T._writev=A),T.on("close",()=>{C.close()});const R=C.addEventListener!==void 0;function O(){g.setReadable(T),g.setWritable(T),g.emit("connect")}function B(){g.end(),g.destroy()}function j(M){g.destroy(M)}function I(M){let w=M.data;w=w instanceof ArrayBuffer?s.from(w):s.from(w,"utf8"),T.push(w)}function A(M,w){const x=new Array(M.length);for(let k=0;k<M.length;k++)typeof M[k].chunk=="string"?x[k]=s.from(M[k],"utf8"):x[k]=M[k].chunk;this._write(s.concat(x),"binary",w)}return C.readyState===C.OPEN?g=T:(g=g=d(void 0,void 0,m),m.objectMode||(g._writev=A),R?C.addEventListener("open",O):C.onopen=O),g.socket=C,R?(C.addEventListener("close",B),C.addEventListener("error",j),C.addEventListener("message",I)):(C.onclose=B,C.onerror=j,C.onmessage=I),g}:function(v,m){l("streamBuilder");const g=a(m),E=p(g,v),y=function(C,T,R){l("createWebSocket"),l("protocol: "+R.protocolId+" "+R.protocolVersion);const O=R.protocolId==="MQIsdp"&&R.protocolVersion===3?"mqttv3.1":"mqtt";return l("creating new Websocket for url: "+T+" and protocol: "+O),new u(T,[O],R.wsOptions)}(0,E,g),S=u.createWebSocketStream(y,g.wsOptions);return S.url=E,y.on("close",()=>{S.destroy()}),S}}).call(this)}).call(this,t("_process"))},{_process:50,buffer:17,debug:18,duplexify:20,"readable-stream":69,ws:80}],6:[function(t,i,o){const{Buffer:r}=t("buffer"),s=t("readable-stream").Transform,u=t("duplexify");let l,d,c;i.exports=function(_,f){if(f.hostname=f.hostname||f.host,!f.hostname)throw new Error("Could not determine host. Specify host manually.");const p=f.protocolId==="MQIsdp"&&f.protocolVersion===3?"mqttv3.1":"mqtt";(function(m){m.hostname||(m.hostname="localhost"),m.path||(m.path="/"),m.wsOptions||(m.wsOptions={})})(f);const a=function(m,g){const E=m.protocol==="wxs"?"wss":"ws";let y=E+"://"+m.hostname+m.path;return m.port&&m.port!==80&&m.port!==443&&(y=E+"://"+m.hostname+":"+m.port+m.path),typeof m.transformWsUrl=="function"&&(y=m.transformWsUrl(y,m,g)),y}(f,_);l=wx.connectSocket({url:a,protocols:[p]}),d=function(){const m=new s;return m._write=function(g,E,y){l.send({data:g.buffer,success:function(){y()},fail:function(S){y(new Error(S))}})},m._flush=function(g){l.close({success:function(){g()}})},m}(),(c=u.obj())._destroy=function(m,g){l.close({success:function(){g&&g(m)}})};const v=c.destroy;return c.destroy=(function(){c.destroy=v;const m=this;setTimeout(function(){l.close({fail:function(){m._destroy(new Error)}})},0)}).bind(c),l.onOpen(function(){c.setReadable(d),c.setWritable(d),c.emit("connect")}),l.onMessage(function(m){let g=m.data;g=g instanceof ArrayBuffer?r.from(g):r.from(g,"utf8"),d.push(g)}),l.onClose(function(){c.end(),c.destroy()}),l.onError(function(m){c.destroy(new Error(m.errMsg))}),c}},{buffer:17,duplexify:20,"readable-stream":69}],7:[function(t,i,o){function r(){if(!(this instanceof r))return new r;this.nextId=Math.max(1,Math.floor(65535*Math.random()))}r.prototype.allocate=function(){const s=this.nextId++;return this.nextId===65536&&(this.nextId=1),s},r.prototype.getLastAllocated=function(){return this.nextId===1?65535:this.nextId-1},r.prototype.register=function(s){return!0},r.prototype.deallocate=function(s){},r.prototype.clear=function(){},i.exports=r},{}],8:[function(t,i,o){const r=t("xtend"),s=t("readable-stream").Readable,u={objectMode:!0},l={clean:!0};function d(c){if(!(this instanceof d))return new d(c);this.options=c||{},this.options=r(l,c),this._inflights=new Map}d.prototype.put=function(c,_){return this._inflights.set(c.messageId,c),_&&_(),this},d.prototype.createStream=function(){const c=new s(u),_=[];let f=!1,p=0;return this._inflights.forEach(function(a,v){_.push(a)}),c._read=function(){!f&&p<_.length?this.push(_[p++]):this.push(null)},c.destroy=function(){if(f)return;const a=this;f=!0,setTimeout(function(){a.emit("close")},0)},c},d.prototype.del=function(c,_){return(c=this._inflights.get(c.messageId))?(this._inflights.delete(c.messageId),_(null,c)):_&&_(new Error("missing packet")),this},d.prototype.get=function(c,_){return(c=this._inflights.get(c.messageId))?_(null,c):_&&_(new Error("missing packet")),this},d.prototype.close=function(c){this.options.clean&&(this._inflights=null),c&&c()},i.exports=d},{"readable-stream":69,xtend:81}],9:[function(t,i,o){function r(s){if(!(this instanceof r))return new r(s);this.aliasToTopic={},this.max=s}r.prototype.put=function(s,u){return!(u===0||u>this.max)&&(this.aliasToTopic[u]=s,this.length=Object.keys(this.aliasToTopic).length,!0)},r.prototype.getTopicByAlias=function(s){return this.aliasToTopic[s]},r.prototype.clear=function(){this.aliasToTopic={}},i.exports=r},{}],10:[function(t,i,o){const r=t("lru-cache"),s=t("number-allocator").NumberAllocator;function u(l){if(!(this instanceof u))return new u(l);l>0&&(this.aliasToTopic=new r({max:l}),this.topicToAlias={},this.numberAllocator=new s(1,l),this.max=l,this.length=0)}u.prototype.put=function(l,d){if(d===0||d>this.max)return!1;const c=this.aliasToTopic.get(d);return c&&delete this.topicToAlias[c],this.aliasToTopic.set(d,l),this.topicToAlias[l]=d,this.numberAllocator.use(d),this.length=this.aliasToTopic.length,!0},u.prototype.getTopicByAlias=function(l){return this.aliasToTopic.get(l)},u.prototype.getAliasByTopic=function(l){const d=this.topicToAlias[l];return d!==void 0&&this.aliasToTopic.get(d),d},u.prototype.clear=function(){this.aliasToTopic.reset(),this.topicToAlias={},this.numberAllocator.clear(),this.length=0},u.prototype.getLruAlias=function(){return this.numberAllocator.firstVacant()||this.aliasToTopic.keys()[this.aliasToTopic.length-1]},i.exports=u},{"lru-cache":37,"number-allocator":46}],11:[function(t,i,o){function r(s){const u=s.split("/");for(let l=0;l<u.length;l++)if(u[l]!=="+"){if(u[l]==="#")return l===u.length-1;if(u[l].indexOf("+")!==-1||u[l].indexOf("#")!==-1)return!1}return!0}i.exports={validateTopics:function(s){if(s.length===0)return"empty_topic_list";for(let u=0;u<s.length;u++)if(!r(s[u]))return s[u];return null}}},{}],12:[function(t,i,o){(function(r){(function(){const s=t("../client"),u=t("../store"),l=t("url"),d=t("xtend"),c=t("debug")("mqttjs"),_={};function f(p,a){if(c("connecting to an MQTT broker..."),typeof p!="object"||a||(a=p,p=null),a=a||{},p){const m=l.parse(p,!0);if(m.port!=null&&(m.port=Number(m.port)),(a=d(m,a)).protocol===null)throw new Error("Missing protocol");a.protocol=a.protocol.replace(/:$/,"")}if(function(m){let g;m.auth&&((g=m.auth.match(/^(.+):(.+)$/))?(m.username=g[1],m.password=g[2]):m.username=m.auth)}(a),a.query&&typeof a.query.clientId=="string"&&(a.clientId=a.query.clientId),a.cert&&a.key){if(!a.protocol)throw new Error("Missing secure protocol key");if(["mqtts","wss","wxs","alis"].indexOf(a.protocol)===-1)switch(a.protocol){case"mqtt":a.protocol="mqtts";break;case"ws":a.protocol="wss";break;case"wx":a.protocol="wxs";break;case"ali":a.protocol="alis";break;default:throw new Error('Unknown protocol for secure connection: "'+a.protocol+'"!')}}if(!_[a.protocol]){const m=["mqtts","wss"].indexOf(a.protocol)!==-1;a.protocol=["mqtt","mqtts","ws","wss","wx","wxs","ali","alis"].filter(function(g,E){return(!m||E%2!=0)&&typeof _[g]=="function"})[0]}if(a.clean===!1&&!a.clientId)throw new Error("Missing clientId for unclean clients");a.protocol&&(a.defaultProtocol=a.protocol);const v=new s(function(m){return a.servers&&(m._reconnectCount&&m._reconnectCount!==a.servers.length||(m._reconnectCount=0),a.host=a.servers[m._reconnectCount].host,a.port=a.servers[m._reconnectCount].port,a.protocol=a.servers[m._reconnectCount].protocol?a.servers[m._reconnectCount].protocol:a.defaultProtocol,a.hostname=a.host,m._reconnectCount++),c("calling streambuilder for",a.protocol),_[a.protocol](m,a)},a);return v.on("error",function(){}),v}r!==void 0&&r.title!=="browser"||typeof __webpack_require__!="function"?(_.mqtt=t("./tcp"),_.tcp=t("./tcp"),_.ssl=t("./tls"),_.tls=t("./tls"),_.mqtts=t("./tls")):(_.wx=t("./wx"),_.wxs=t("./wx"),_.ali=t("./ali"),_.alis=t("./ali")),_.ws=t("./ws"),_.wss=t("./ws"),i.exports=f,i.exports.connect=f,i.exports.MqttClient=s,i.exports.Store=u}).call(this)}).call(this,t("_process"))},{"../client":1,"../store":8,"./ali":2,"./tcp":3,"./tls":4,"./ws":5,"./wx":6,_process:50,debug:18,url:76,xtend:81}],13:[function(t,i,o){o.byteLength=function(p){var a=_(p),v=a[0],m=a[1];return 3*(v+m)/4-m},o.toByteArray=function(p){var a,v,m=_(p),g=m[0],E=m[1],y=new u(function(T,R,O){return 3*(R+O)/4-O}(0,g,E)),S=0,C=E>0?g-4:g;for(v=0;v<C;v+=4)a=s[p.charCodeAt(v)]<<18|s[p.charCodeAt(v+1)]<<12|s[p.charCodeAt(v+2)]<<6|s[p.charCodeAt(v+3)],y[S++]=a>>16&255,y[S++]=a>>8&255,y[S++]=255&a;return E===2&&(a=s[p.charCodeAt(v)]<<2|s[p.charCodeAt(v+1)]>>4,y[S++]=255&a),E===1&&(a=s[p.charCodeAt(v)]<<10|s[p.charCodeAt(v+1)]<<4|s[p.charCodeAt(v+2)]>>2,y[S++]=a>>8&255,y[S++]=255&a),y},o.fromByteArray=function(p){for(var a,v=p.length,m=v%3,g=[],E=0,y=v-m;E<y;E+=16383)g.push(f(p,E,E+16383>y?y:E+16383));return m===1?(a=p[v-1],g.push(r[a>>2]+r[a<<4&63]+"==")):m===2&&(a=(p[v-2]<<8)+p[v-1],g.push(r[a>>10]+r[a>>4&63]+r[a<<2&63]+"=")),g.join("")};for(var r=[],s=[],u=typeof Uint8Array<"u"?Uint8Array:Array,l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",d=0,c=l.length;d<c;++d)r[d]=l[d],s[l.charCodeAt(d)]=d;function _(p){var a=p.length;if(a%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var v=p.indexOf("=");return v===-1&&(v=a),[v,v===a?0:4-v%4]}function f(p,a,v){for(var m,g,E=[],y=a;y<v;y+=3)m=(p[y]<<16&16711680)+(p[y+1]<<8&65280)+(255&p[y+2]),E.push(r[(g=m)>>18&63]+r[g>>12&63]+r[g>>6&63]+r[63&g]);return E.join("")}s[45]=62,s[95]=63},{}],14:[function(t,i,o){const{Buffer:r}=t("buffer"),s=Symbol.for("BufferList");function u(l){if(!(this instanceof u))return new u(l);u._init.call(this,l)}u._init=function(l){Object.defineProperty(this,s,{value:!0}),this._bufs=[],this.length=0,l&&this.append(l)},u.prototype._new=function(l){return new u(l)},u.prototype._offset=function(l){if(l===0)return[0,0];let d=0;for(let c=0;c<this._bufs.length;c++){const _=d+this._bufs[c].length;if(l<_||c===this._bufs.length-1)return[c,l-d];d=_}},u.prototype._reverseOffset=function(l){const d=l[0];let c=l[1];for(let _=0;_<d;_++)c+=this._bufs[_].length;return c},u.prototype.get=function(l){if(l>this.length||l<0)return;const d=this._offset(l);return this._bufs[d[0]][d[1]]},u.prototype.slice=function(l,d){return typeof l=="number"&&l<0&&(l+=this.length),typeof d=="number"&&d<0&&(d+=this.length),this.copy(null,0,l,d)},u.prototype.copy=function(l,d,c,_){if((typeof c!="number"||c<0)&&(c=0),(typeof _!="number"||_>this.length)&&(_=this.length),c>=this.length||_<=0)return l||r.alloc(0);const f=!!l,p=this._offset(c),a=_-c;let v=a,m=f&&d||0,g=p[1];if(c===0&&_===this.length){if(!f)return this._bufs.length===1?this._bufs[0]:r.concat(this._bufs,this.length);for(let E=0;E<this._bufs.length;E++)this._bufs[E].copy(l,m),m+=this._bufs[E].length;return l}if(v<=this._bufs[p[0]].length-g)return f?this._bufs[p[0]].copy(l,d,g,g+v):this._bufs[p[0]].slice(g,g+v);f||(l=r.allocUnsafe(a));for(let E=p[0];E<this._bufs.length;E++){const y=this._bufs[E].length-g;if(!(v>y)){this._bufs[E].copy(l,m,g,g+v),m+=y;break}this._bufs[E].copy(l,m,g),m+=y,v-=y,g&&(g=0)}return l.length>m?l.slice(0,m):l},u.prototype.shallowSlice=function(l,d){if(l=l||0,d=typeof d!="number"?this.length:d,l<0&&(l+=this.length),d<0&&(d+=this.length),l===d)return this._new();const c=this._offset(l),_=this._offset(d),f=this._bufs.slice(c[0],_[0]+1);return _[1]===0?f.pop():f[f.length-1]=f[f.length-1].slice(0,_[1]),c[1]!==0&&(f[0]=f[0].slice(c[1])),this._new(f)},u.prototype.toString=function(l,d,c){return this.slice(d,c).toString(l)},u.prototype.consume=function(l){if(l=Math.trunc(l),Number.isNaN(l)||l<=0)return this;for(;this._bufs.length;){if(!(l>=this._bufs[0].length)){this._bufs[0]=this._bufs[0].slice(l),this.length-=l;break}l-=this._bufs[0].length,this.length-=this._bufs[0].length,this._bufs.shift()}return this},u.prototype.duplicate=function(){const l=this._new();for(let d=0;d<this._bufs.length;d++)l.append(this._bufs[d]);return l},u.prototype.append=function(l){if(l==null)return this;if(l.buffer)this._appendBuffer(r.from(l.buffer,l.byteOffset,l.byteLength));else if(Array.isArray(l))for(let d=0;d<l.length;d++)this.append(l[d]);else if(this._isBufferList(l))for(let d=0;d<l._bufs.length;d++)this.append(l._bufs[d]);else typeof l=="number"&&(l=l.toString()),this._appendBuffer(r.from(l));return this},u.prototype._appendBuffer=function(l){this._bufs.push(l),this.length+=l.length},u.prototype.indexOf=function(l,d,c){if(c===void 0&&typeof d=="string"&&(c=d,d=void 0),typeof l=="function"||Array.isArray(l))throw new TypeError('The "value" argument must be one of type string, Buffer, BufferList, or Uint8Array.');if(typeof l=="number"?l=r.from([l]):typeof l=="string"?l=r.from(l,c):this._isBufferList(l)?l=l.slice():Array.isArray(l.buffer)?l=r.from(l.buffer,l.byteOffset,l.byteLength):r.isBuffer(l)||(l=r.from(l)),d=Number(d||0),isNaN(d)&&(d=0),d<0&&(d=this.length+d),d<0&&(d=0),l.length===0)return d>this.length?this.length:d;const _=this._offset(d);let f=_[0],p=_[1];for(;f<this._bufs.length;f++){const a=this._bufs[f];for(;p<a.length;)if(a.length-p>=l.length){const v=a.indexOf(l,p);if(v!==-1)return this._reverseOffset([f,v]);p=a.length-l.length+1}else{const v=this._reverseOffset([f,p]);if(this._match(v,l))return v;p++}p=0}return-1},u.prototype._match=function(l,d){if(this.length-l<d.length)return!1;for(let c=0;c<d.length;c++)if(this.get(l+c)!==d[c])return!1;return!0},function(){const l={readDoubleBE:8,readDoubleLE:8,readFloatBE:4,readFloatLE:4,readInt32BE:4,readInt32LE:4,readUInt32BE:4,readUInt32LE:4,readInt16BE:2,readInt16LE:2,readUInt16BE:2,readUInt16LE:2,readInt8:1,readUInt8:1,readIntBE:null,readIntLE:null,readUIntBE:null,readUIntLE:null};for(const d in l)(function(c){u.prototype[c]=l[c]===null?function(_,f){return this.slice(_,_+f)[c](0,f)}:function(_=0){return this.slice(_,_+l[c])[c](0)}})(d)}(),u.prototype._isBufferList=function(l){return l instanceof u||u.isBufferList(l)},u.isBufferList=function(l){return l!=null&&l[s]},i.exports=u},{buffer:17}],15:[function(t,i,o){const r=t("readable-stream").Duplex,s=t("inherits"),u=t("./BufferList");function l(d){if(!(this instanceof l))return new l(d);if(typeof d=="function"){this._callback=d;const c=(function(_){this._callback&&(this._callback(_),this._callback=null)}).bind(this);this.on("pipe",function(_){_.on("error",c)}),this.on("unpipe",function(_){_.removeListener("error",c)}),d=null}u._init.call(this,d),r.call(this)}s(l,r),Object.assign(l.prototype,u.prototype),l.prototype._new=function(d){return new l(d)},l.prototype._write=function(d,c,_){this._appendBuffer(d),typeof _=="function"&&_()},l.prototype._read=function(d){if(!this.length)return this.push(null);d=Math.min(d,this.length),this.push(this.slice(0,d)),this.consume(d)},l.prototype.end=function(d){r.prototype.end.call(this,d),this._callback&&(this._callback(null,this.slice()),this._callback=null)},l.prototype._destroy=function(d,c){this._bufs.length=0,this.length=0,c(d)},l.prototype._isBufferList=function(d){return d instanceof l||d instanceof u||l.isBufferList(d)},l.isBufferList=u.isBufferList,i.exports=l,i.exports.BufferListStream=l,i.exports.BufferList=u},{"./BufferList":14,inherits:24,"readable-stream":69}],16:[function(t,i,o){},{}],17:[function(t,i,o){(function(r){(function(){var s=t("base64-js"),u=t("ieee754");o.Buffer=c,o.SlowBuffer=function(b){return+b!=b&&(b=0),c.alloc(+b)},o.INSPECT_MAX_BYTES=50;var l=2147483647;function d(b){if(b>l)throw new RangeError('The value "'+b+'" is invalid for option "size"');var N=new Uint8Array(b);return N.__proto__=c.prototype,N}function c(b,N,U){if(typeof b=="number"){if(typeof N=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return p(b)}return _(b,N,U)}function _(b,N,U){if(typeof b=="string")return function(Q,ee){if(typeof ee=="string"&&ee!==""||(ee="utf8"),!c.isEncoding(ee))throw new TypeError("Unknown encoding: "+ee);var oe=0|m(Q,ee),te=d(oe),ie=te.write(Q,ee);return ie!==oe&&(te=te.slice(0,ie)),te}(b,N);if(ArrayBuffer.isView(b))return a(b);if(b==null)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof b);if(J(b,ArrayBuffer)||b&&J(b.buffer,ArrayBuffer))return function(Q,ee,oe){if(ee<0||Q.byteLength<ee)throw new RangeError('"offset" is outside of buffer bounds');if(Q.byteLength<ee+(oe||0))throw new RangeError('"length" is outside of buffer bounds');var te;return te=ee===void 0&&oe===void 0?new Uint8Array(Q):oe===void 0?new Uint8Array(Q,ee):new Uint8Array(Q,ee,oe),te.__proto__=c.prototype,te}(b,N,U);if(typeof b=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var z=b.valueOf&&b.valueOf();if(z!=null&&z!==b)return c.from(z,N,U);var $=function(Q){if(c.isBuffer(Q)){var ee=0|v(Q.length),oe=d(ee);return oe.length===0||Q.copy(oe,0,0,ee),oe}if(Q.length!==void 0)return typeof Q.length!="number"||Z(Q.length)?d(0):a(Q);if(Q.type==="Buffer"&&Array.isArray(Q.data))return a(Q.data)}(b);if($)return $;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof b[Symbol.toPrimitive]=="function")return c.from(b[Symbol.toPrimitive]("string"),N,U);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof b)}function f(b){if(typeof b!="number")throw new TypeError('"size" argument must be of type number');if(b<0)throw new RangeError('The value "'+b+'" is invalid for option "size"')}function p(b){return f(b),d(b<0?0:0|v(b))}function a(b){for(var N=b.length<0?0:0|v(b.length),U=d(N),z=0;z<N;z+=1)U[z]=255&b[z];return U}function v(b){if(b>=l)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+l.toString(16)+" bytes");return 0|b}function m(b,N){if(c.isBuffer(b))return b.length;if(ArrayBuffer.isView(b)||J(b,ArrayBuffer))return b.byteLength;if(typeof b!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof b);var U=b.length,z=arguments.length>2&&arguments[2]===!0;if(!z&&U===0)return 0;for(var $=!1;;)switch(N){case"ascii":case"latin1":case"binary":return U;case"utf8":case"utf-8":return K(b).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*U;case"hex":return U>>>1;case"base64":return W(b).length;default:if($)return z?-1:K(b).length;N=(""+N).toLowerCase(),$=!0}}function g(b,N,U){var z=b[N];b[N]=b[U],b[U]=z}function E(b,N,U,z,$){if(b.length===0)return-1;if(typeof U=="string"?(z=U,U=0):U>2147483647?U=2147483647:U<-2147483648&&(U=-2147483648),Z(U=+U)&&(U=$?0:b.length-1),U<0&&(U=b.length+U),U>=b.length){if($)return-1;U=b.length-1}else if(U<0){if(!$)return-1;U=0}if(typeof N=="string"&&(N=c.from(N,z)),c.isBuffer(N))return N.length===0?-1:y(b,N,U,z,$);if(typeof N=="number")return N&=255,typeof Uint8Array.prototype.indexOf=="function"?$?Uint8Array.prototype.indexOf.call(b,N,U):Uint8Array.prototype.lastIndexOf.call(b,N,U):y(b,[N],U,z,$);throw new TypeError("val must be string, number or Buffer")}function y(b,N,U,z,$){var Q,ee=1,oe=b.length,te=N.length;if(z!==void 0&&((z=String(z).toLowerCase())==="ucs2"||z==="ucs-2"||z==="utf16le"||z==="utf-16le")){if(b.length<2||N.length<2)return-1;ee=2,oe/=2,te/=2,U/=2}function ie(ve,de){return ee===1?ve[de]:ve.readUInt16BE(de*ee)}if($){var se=-1;for(Q=U;Q<oe;Q++)if(ie(b,Q)===ie(N,se===-1?0:Q-se)){if(se===-1&&(se=Q),Q-se+1===te)return se*ee}else se!==-1&&(Q-=Q-se),se=-1}else for(U+te>oe&&(U=oe-te),Q=U;Q>=0;Q--){for(var fe=!0,pe=0;pe<te;pe++)if(ie(b,Q+pe)!==ie(N,pe)){fe=!1;break}if(fe)return Q}return-1}function S(b,N,U,z){U=Number(U)||0;var $=b.length-U;z?(z=Number(z))>$&&(z=$):z=$;var Q=N.length;z>Q/2&&(z=Q/2);for(var ee=0;ee<z;++ee){var oe=parseInt(N.substr(2*ee,2),16);if(Z(oe))return ee;b[U+ee]=oe}return ee}function C(b,N,U,z){return X(K(N,b.length-U),b,U,z)}function T(b,N,U,z){return X(function($){for(var Q=[],ee=0;ee<$.length;++ee)Q.push(255&$.charCodeAt(ee));return Q}(N),b,U,z)}function R(b,N,U,z){return T(b,N,U,z)}function O(b,N,U,z){return X(W(N),b,U,z)}function B(b,N,U,z){return X(function($,Q){for(var ee,oe,te,ie=[],se=0;se<$.length&&!((Q-=2)<0);++se)ee=$.charCodeAt(se),oe=ee>>8,te=ee%256,ie.push(te),ie.push(oe);return ie}(N,b.length-U),b,U,z)}function j(b,N,U){return N===0&&U===b.length?s.fromByteArray(b):s.fromByteArray(b.slice(N,U))}function I(b,N,U){U=Math.min(b.length,U);for(var z=[],$=N;$<U;){var Q,ee,oe,te,ie=b[$],se=null,fe=ie>239?4:ie>223?3:ie>191?2:1;if($+fe<=U)switch(fe){case 1:ie<128&&(se=ie);break;case 2:(192&(Q=b[$+1]))==128&&(te=(31&ie)<<6|63&Q)>127&&(se=te);break;case 3:Q=b[$+1],ee=b[$+2],(192&Q)==128&&(192&ee)==128&&(te=(15&ie)<<12|(63&Q)<<6|63&ee)>2047&&(te<55296||te>57343)&&(se=te);break;case 4:Q=b[$+1],ee=b[$+2],oe=b[$+3],(192&Q)==128&&(192&ee)==128&&(192&oe)==128&&(te=(15&ie)<<18|(63&Q)<<12|(63&ee)<<6|63&oe)>65535&&te<1114112&&(se=te)}se===null?(se=65533,fe=1):se>65535&&(se-=65536,z.push(se>>>10&1023|55296),se=56320|1023&se),z.push(se),$+=fe}return function(pe){var ve=pe.length;if(ve<=A)return String.fromCharCode.apply(String,pe);for(var de="",ae=0;ae<ve;)de+=String.fromCharCode.apply(String,pe.slice(ae,ae+=A));return de}(z)}o.kMaxLength=l,c.TYPED_ARRAY_SUPPORT=function(){try{var b=new Uint8Array(1);return b.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},b.foo()===42}catch{return!1}}(),c.TYPED_ARRAY_SUPPORT||typeof console>"u"||typeof console.error!="function"||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(c.prototype,"parent",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.buffer}}),Object.defineProperty(c.prototype,"offset",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.byteOffset}}),typeof Symbol<"u"&&Symbol.species!=null&&c[Symbol.species]===c&&Object.defineProperty(c,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),c.poolSize=8192,c.from=function(b,N,U){return _(b,N,U)},c.prototype.__proto__=Uint8Array.prototype,c.__proto__=Uint8Array,c.alloc=function(b,N,U){return function(z,$,Q){return f(z),z<=0?d(z):$!==void 0?typeof Q=="string"?d(z).fill($,Q):d(z).fill($):d(z)}(b,N,U)},c.allocUnsafe=function(b){return p(b)},c.allocUnsafeSlow=function(b){return p(b)},c.isBuffer=function(b){return b!=null&&b._isBuffer===!0&&b!==c.prototype},c.compare=function(b,N){if(J(b,Uint8Array)&&(b=c.from(b,b.offset,b.byteLength)),J(N,Uint8Array)&&(N=c.from(N,N.offset,N.byteLength)),!c.isBuffer(b)||!c.isBuffer(N))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(b===N)return 0;for(var U=b.length,z=N.length,$=0,Q=Math.min(U,z);$<Q;++$)if(b[$]!==N[$]){U=b[$],z=N[$];break}return U<z?-1:z<U?1:0},c.isEncoding=function(b){switch(String(b).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},c.concat=function(b,N){if(!Array.isArray(b))throw new TypeError('"list" argument must be an Array of Buffers');if(b.length===0)return c.alloc(0);var U;if(N===void 0)for(N=0,U=0;U<b.length;++U)N+=b[U].length;var z=c.allocUnsafe(N),$=0;for(U=0;U<b.length;++U){var Q=b[U];if(J(Q,Uint8Array)&&(Q=c.from(Q)),!c.isBuffer(Q))throw new TypeError('"list" argument must be an Array of Buffers');Q.copy(z,$),$+=Q.length}return z},c.byteLength=m,c.prototype._isBuffer=!0,c.prototype.swap16=function(){var b=this.length;if(b%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var N=0;N<b;N+=2)g(this,N,N+1);return this},c.prototype.swap32=function(){var b=this.length;if(b%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var N=0;N<b;N+=4)g(this,N,N+3),g(this,N+1,N+2);return this},c.prototype.swap64=function(){var b=this.length;if(b%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var N=0;N<b;N+=8)g(this,N,N+7),g(this,N+1,N+6),g(this,N+2,N+5),g(this,N+3,N+4);return this},c.prototype.toString=function(){var b=this.length;return b===0?"":arguments.length===0?I(this,0,b):(function(N,U,z){var $=!1;if((U===void 0||U<0)&&(U=0),U>this.length||((z===void 0||z>this.length)&&(z=this.length),z<=0)||(z>>>=0)<=(U>>>=0))return"";for(N||(N="utf8");;)switch(N){case"hex":return x(this,U,z);case"utf8":case"utf-8":return I(this,U,z);case"ascii":return M(this,U,z);case"latin1":case"binary":return w(this,U,z);case"base64":return j(this,U,z);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,U,z);default:if($)throw new TypeError("Unknown encoding: "+N);N=(N+"").toLowerCase(),$=!0}}).apply(this,arguments)},c.prototype.toLocaleString=c.prototype.toString,c.prototype.equals=function(b){if(!c.isBuffer(b))throw new TypeError("Argument must be a Buffer");return this===b||c.compare(this,b)===0},c.prototype.inspect=function(){var b="",N=o.INSPECT_MAX_BYTES;return b=this.toString("hex",0,N).replace(/(.{2})/g,"$1 ").trim(),this.length>N&&(b+=" ... "),"<Buffer "+b+">"},c.prototype.compare=function(b,N,U,z,$){if(J(b,Uint8Array)&&(b=c.from(b,b.offset,b.byteLength)),!c.isBuffer(b))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof b);if(N===void 0&&(N=0),U===void 0&&(U=b?b.length:0),z===void 0&&(z=0),$===void 0&&($=this.length),N<0||U>b.length||z<0||$>this.length)throw new RangeError("out of range index");if(z>=$&&N>=U)return 0;if(z>=$)return-1;if(N>=U)return 1;if(N>>>=0,U>>>=0,z>>>=0,$>>>=0,this===b)return 0;for(var Q=$-z,ee=U-N,oe=Math.min(Q,ee),te=this.slice(z,$),ie=b.slice(N,U),se=0;se<oe;++se)if(te[se]!==ie[se]){Q=te[se],ee=ie[se];break}return Q<ee?-1:ee<Q?1:0},c.prototype.includes=function(b,N,U){return this.indexOf(b,N,U)!==-1},c.prototype.indexOf=function(b,N,U){return E(this,b,N,U,!0)},c.prototype.lastIndexOf=function(b,N,U){return E(this,b,N,U,!1)},c.prototype.write=function(b,N,U,z){if(N===void 0)z="utf8",U=this.length,N=0;else if(U===void 0&&typeof N=="string")z=N,U=this.length,N=0;else{if(!isFinite(N))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");N>>>=0,isFinite(U)?(U>>>=0,z===void 0&&(z="utf8")):(z=U,U=void 0)}var $=this.length-N;if((U===void 0||U>$)&&(U=$),b.length>0&&(U<0||N<0)||N>this.length)throw new RangeError("Attempt to write outside buffer bounds");z||(z="utf8");for(var Q=!1;;)switch(z){case"hex":return S(this,b,N,U);case"utf8":case"utf-8":return C(this,b,N,U);case"ascii":return T(this,b,N,U);case"latin1":case"binary":return R(this,b,N,U);case"base64":return O(this,b,N,U);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return B(this,b,N,U);default:if(Q)throw new TypeError("Unknown encoding: "+z);z=(""+z).toLowerCase(),Q=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var A=4096;function M(b,N,U){var z="";U=Math.min(b.length,U);for(var $=N;$<U;++$)z+=String.fromCharCode(127&b[$]);return z}function w(b,N,U){var z="";U=Math.min(b.length,U);for(var $=N;$<U;++$)z+=String.fromCharCode(b[$]);return z}function x(b,N,U){var z=b.length;(!N||N<0)&&(N=0),(!U||U<0||U>z)&&(U=z);for(var $="",Q=N;Q<U;++Q)$+=Y(b[Q]);return $}function k(b,N,U){for(var z=b.slice(N,U),$="",Q=0;Q<z.length;Q+=2)$+=String.fromCharCode(z[Q]+256*z[Q+1]);return $}function V(b,N,U){if(b%1!=0||b<0)throw new RangeError("offset is not uint");if(b+N>U)throw new RangeError("Trying to access beyond buffer length")}function L(b,N,U,z,$,Q){if(!c.isBuffer(b))throw new TypeError('"buffer" argument must be a Buffer instance');if(N>$||N<Q)throw new RangeError('"value" argument is out of bounds');if(U+z>b.length)throw new RangeError("Index out of range")}function D(b,N,U,z,$,Q){if(U+z>b.length)throw new RangeError("Index out of range");if(U<0)throw new RangeError("Index out of range")}function F(b,N,U,z,$){return N=+N,U>>>=0,$||D(b,0,U,4),u.write(b,N,U,z,23,4),U+4}function G(b,N,U,z,$){return N=+N,U>>>=0,$||D(b,0,U,8),u.write(b,N,U,z,52,8),U+8}c.prototype.slice=function(b,N){var U=this.length;b=~~b,N=N===void 0?U:~~N,b<0?(b+=U)<0&&(b=0):b>U&&(b=U),N<0?(N+=U)<0&&(N=0):N>U&&(N=U),N<b&&(N=b);var z=this.subarray(b,N);return z.__proto__=c.prototype,z},c.prototype.readUIntLE=function(b,N,U){b>>>=0,N>>>=0,U||V(b,N,this.length);for(var z=this[b],$=1,Q=0;++Q<N&&($*=256);)z+=this[b+Q]*$;return z},c.prototype.readUIntBE=function(b,N,U){b>>>=0,N>>>=0,U||V(b,N,this.length);for(var z=this[b+--N],$=1;N>0&&($*=256);)z+=this[b+--N]*$;return z},c.prototype.readUInt8=function(b,N){return b>>>=0,N||V(b,1,this.length),this[b]},c.prototype.readUInt16LE=function(b,N){return b>>>=0,N||V(b,2,this.length),this[b]|this[b+1]<<8},c.prototype.readUInt16BE=function(b,N){return b>>>=0,N||V(b,2,this.length),this[b]<<8|this[b+1]},c.prototype.readUInt32LE=function(b,N){return b>>>=0,N||V(b,4,this.length),(this[b]|this[b+1]<<8|this[b+2]<<16)+16777216*this[b+3]},c.prototype.readUInt32BE=function(b,N){return b>>>=0,N||V(b,4,this.length),16777216*this[b]+(this[b+1]<<16|this[b+2]<<8|this[b+3])},c.prototype.readIntLE=function(b,N,U){b>>>=0,N>>>=0,U||V(b,N,this.length);for(var z=this[b],$=1,Q=0;++Q<N&&($*=256);)z+=this[b+Q]*$;return z>=($*=128)&&(z-=Math.pow(2,8*N)),z},c.prototype.readIntBE=function(b,N,U){b>>>=0,N>>>=0,U||V(b,N,this.length);for(var z=N,$=1,Q=this[b+--z];z>0&&($*=256);)Q+=this[b+--z]*$;return Q>=($*=128)&&(Q-=Math.pow(2,8*N)),Q},c.prototype.readInt8=function(b,N){return b>>>=0,N||V(b,1,this.length),128&this[b]?-1*(255-this[b]+1):this[b]},c.prototype.readInt16LE=function(b,N){b>>>=0,N||V(b,2,this.length);var U=this[b]|this[b+1]<<8;return 32768&U?4294901760|U:U},c.prototype.readInt16BE=function(b,N){b>>>=0,N||V(b,2,this.length);var U=this[b+1]|this[b]<<8;return 32768&U?4294901760|U:U},c.prototype.readInt32LE=function(b,N){return b>>>=0,N||V(b,4,this.length),this[b]|this[b+1]<<8|this[b+2]<<16|this[b+3]<<24},c.prototype.readInt32BE=function(b,N){return b>>>=0,N||V(b,4,this.length),this[b]<<24|this[b+1]<<16|this[b+2]<<8|this[b+3]},c.prototype.readFloatLE=function(b,N){return b>>>=0,N||V(b,4,this.length),u.read(this,b,!0,23,4)},c.prototype.readFloatBE=function(b,N){return b>>>=0,N||V(b,4,this.length),u.read(this,b,!1,23,4)},c.prototype.readDoubleLE=function(b,N){return b>>>=0,N||V(b,8,this.length),u.read(this,b,!0,52,8)},c.prototype.readDoubleBE=function(b,N){return b>>>=0,N||V(b,8,this.length),u.read(this,b,!1,52,8)},c.prototype.writeUIntLE=function(b,N,U,z){b=+b,N>>>=0,U>>>=0,z||L(this,b,N,U,Math.pow(2,8*U)-1,0);var $=1,Q=0;for(this[N]=255&b;++Q<U&&($*=256);)this[N+Q]=b/$&255;return N+U},c.prototype.writeUIntBE=function(b,N,U,z){b=+b,N>>>=0,U>>>=0,z||L(this,b,N,U,Math.pow(2,8*U)-1,0);var $=U-1,Q=1;for(this[N+$]=255&b;--$>=0&&(Q*=256);)this[N+$]=b/Q&255;return N+U},c.prototype.writeUInt8=function(b,N,U){return b=+b,N>>>=0,U||L(this,b,N,1,255,0),this[N]=255&b,N+1},c.prototype.writeUInt16LE=function(b,N,U){return b=+b,N>>>=0,U||L(this,b,N,2,65535,0),this[N]=255&b,this[N+1]=b>>>8,N+2},c.prototype.writeUInt16BE=function(b,N,U){return b=+b,N>>>=0,U||L(this,b,N,2,65535,0),this[N]=b>>>8,this[N+1]=255&b,N+2},c.prototype.writeUInt32LE=function(b,N,U){return b=+b,N>>>=0,U||L(this,b,N,4,4294967295,0),this[N+3]=b>>>24,this[N+2]=b>>>16,this[N+1]=b>>>8,this[N]=255&b,N+4},c.prototype.writeUInt32BE=function(b,N,U){return b=+b,N>>>=0,U||L(this,b,N,4,4294967295,0),this[N]=b>>>24,this[N+1]=b>>>16,this[N+2]=b>>>8,this[N+3]=255&b,N+4},c.prototype.writeIntLE=function(b,N,U,z){if(b=+b,N>>>=0,!z){var $=Math.pow(2,8*U-1);L(this,b,N,U,$-1,-$)}var Q=0,ee=1,oe=0;for(this[N]=255&b;++Q<U&&(ee*=256);)b<0&&oe===0&&this[N+Q-1]!==0&&(oe=1),this[N+Q]=(b/ee>>0)-oe&255;return N+U},c.prototype.writeIntBE=function(b,N,U,z){if(b=+b,N>>>=0,!z){var $=Math.pow(2,8*U-1);L(this,b,N,U,$-1,-$)}var Q=U-1,ee=1,oe=0;for(this[N+Q]=255&b;--Q>=0&&(ee*=256);)b<0&&oe===0&&this[N+Q+1]!==0&&(oe=1),this[N+Q]=(b/ee>>0)-oe&255;return N+U},c.prototype.writeInt8=function(b,N,U){return b=+b,N>>>=0,U||L(this,b,N,1,127,-128),b<0&&(b=255+b+1),this[N]=255&b,N+1},c.prototype.writeInt16LE=function(b,N,U){return b=+b,N>>>=0,U||L(this,b,N,2,32767,-32768),this[N]=255&b,this[N+1]=b>>>8,N+2},c.prototype.writeInt16BE=function(b,N,U){return b=+b,N>>>=0,U||L(this,b,N,2,32767,-32768),this[N]=b>>>8,this[N+1]=255&b,N+2},c.prototype.writeInt32LE=function(b,N,U){return b=+b,N>>>=0,U||L(this,b,N,4,2147483647,-2147483648),this[N]=255&b,this[N+1]=b>>>8,this[N+2]=b>>>16,this[N+3]=b>>>24,N+4},c.prototype.writeInt32BE=function(b,N,U){return b=+b,N>>>=0,U||L(this,b,N,4,2147483647,-2147483648),b<0&&(b=4294967295+b+1),this[N]=b>>>24,this[N+1]=b>>>16,this[N+2]=b>>>8,this[N+3]=255&b,N+4},c.prototype.writeFloatLE=function(b,N,U){return F(this,b,N,!0,U)},c.prototype.writeFloatBE=function(b,N,U){return F(this,b,N,!1,U)},c.prototype.writeDoubleLE=function(b,N,U){return G(this,b,N,!0,U)},c.prototype.writeDoubleBE=function(b,N,U){return G(this,b,N,!1,U)},c.prototype.copy=function(b,N,U,z){if(!c.isBuffer(b))throw new TypeError("argument should be a Buffer");if(U||(U=0),z||z===0||(z=this.length),N>=b.length&&(N=b.length),N||(N=0),z>0&&z<U&&(z=U),z===U||b.length===0||this.length===0)return 0;if(N<0)throw new RangeError("targetStart out of bounds");if(U<0||U>=this.length)throw new RangeError("Index out of range");if(z<0)throw new RangeError("sourceEnd out of bounds");z>this.length&&(z=this.length),b.length-N<z-U&&(z=b.length-N+U);var $=z-U;if(this===b&&typeof Uint8Array.prototype.copyWithin=="function")this.copyWithin(N,U,z);else if(this===b&&U<N&&N<z)for(var Q=$-1;Q>=0;--Q)b[Q+N]=this[Q+U];else Uint8Array.prototype.set.call(b,this.subarray(U,z),N);return $},c.prototype.fill=function(b,N,U,z){if(typeof b=="string"){if(typeof N=="string"?(z=N,N=0,U=this.length):typeof U=="string"&&(z=U,U=this.length),z!==void 0&&typeof z!="string")throw new TypeError("encoding must be a string");if(typeof z=="string"&&!c.isEncoding(z))throw new TypeError("Unknown encoding: "+z);if(b.length===1){var $=b.charCodeAt(0);(z==="utf8"&&$<128||z==="latin1")&&(b=$)}}else typeof b=="number"&&(b&=255);if(N<0||this.length<N||this.length<U)throw new RangeError("Out of range index");if(U<=N)return this;var Q;if(N>>>=0,U=U===void 0?this.length:U>>>0,b||(b=0),typeof b=="number")for(Q=N;Q<U;++Q)this[Q]=b;else{var ee=c.isBuffer(b)?b:c.from(b,z),oe=ee.length;if(oe===0)throw new TypeError('The value "'+b+'" is invalid for argument "value"');for(Q=0;Q<U-N;++Q)this[Q+N]=ee[Q%oe]}return this};var q=/[^+/0-9A-Za-z-_]/g;function Y(b){return b<16?"0"+b.toString(16):b.toString(16)}function K(b,N){var U;N=N||1/0;for(var z=b.length,$=null,Q=[],ee=0;ee<z;++ee){if((U=b.charCodeAt(ee))>55295&&U<57344){if(!$){if(U>56319){(N-=3)>-1&&Q.push(239,191,189);continue}if(ee+1===z){(N-=3)>-1&&Q.push(239,191,189);continue}$=U;continue}if(U<56320){(N-=3)>-1&&Q.push(239,191,189),$=U;continue}U=65536+($-55296<<10|U-56320)}else $&&(N-=3)>-1&&Q.push(239,191,189);if($=null,U<128){if((N-=1)<0)break;Q.push(U)}else if(U<2048){if((N-=2)<0)break;Q.push(U>>6|192,63&U|128)}else if(U<65536){if((N-=3)<0)break;Q.push(U>>12|224,U>>6&63|128,63&U|128)}else{if(!(U<1114112))throw new Error("Invalid code point");if((N-=4)<0)break;Q.push(U>>18|240,U>>12&63|128,U>>6&63|128,63&U|128)}}return Q}function W(b){return s.toByteArray(function(N){if((N=(N=N.split("=")[0]).trim().replace(q,"")).length<2)return"";for(;N.length%4!=0;)N+="=";return N}(b))}function X(b,N,U,z){for(var $=0;$<z&&!($+U>=N.length||$>=b.length);++$)N[$+U]=b[$];return $}function J(b,N){return b instanceof N||b!=null&&b.constructor!=null&&b.constructor.name!=null&&b.constructor.name===N.name}function Z(b){return b!=b}}).call(this)}).call(this,t("buffer").Buffer)},{"base64-js":13,buffer:17,ieee754:23}],18:[function(t,i,o){(function(r){(function(){o.formatArgs=function(u){if(u[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+u[0]+(this.useColors?"%c ":" ")+"+"+i.exports.humanize(this.diff),!this.useColors)return;const l="color: "+this.color;u.splice(1,0,l,"color: inherit");let d=0,c=0;u[0].replace(/%[a-zA-Z%]/g,_=>{_!=="%%"&&_==="%c"&&(c=++d)}),u.splice(c,0,l)},o.save=function(u){try{u?o.storage.setItem("debug",u):o.storage.removeItem("debug")}catch{}},o.load=function(){let u;try{u=o.storage.getItem("debug")}catch{}return!u&&r!==void 0&&"env"in r&&(u=r.env.DEBUG),u},o.useColors=function(){return typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},o.storage=function(){try{return localStorage}catch{}}(),o.destroy=(()=>{let u=!1;return()=>{u||(u=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),o.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],o.log=console.debug||console.log||(()=>{}),i.exports=t("./common")(o);const{formatters:s}=i.exports;s.j=function(u){try{return JSON.stringify(u)}catch(l){return"[UnexpectedJSONParseError]: "+l.message}}}).call(this)}).call(this,t("_process"))},{"./common":19,_process:50}],19:[function(t,i,o){i.exports=function(r){function s(d){let c,_,f,p=null;function a(...v){if(!a.enabled)return;const m=a,g=Number(new Date),E=g-(c||g);m.diff=E,m.prev=c,m.curr=g,c=g,v[0]=s.coerce(v[0]),typeof v[0]!="string"&&v.unshift("%O");let y=0;v[0]=v[0].replace(/%([a-zA-Z%])/g,(S,C)=>{if(S==="%%")return"%";y++;const T=s.formatters[C];if(typeof T=="function"){const R=v[y];S=T.call(m,R),v.splice(y,1),y--}return S}),s.formatArgs.call(m,v),(m.log||s.log).apply(m,v)}return a.namespace=d,a.useColors=s.useColors(),a.color=s.selectColor(d),a.extend=u,a.destroy=s.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:()=>p!==null?p:(_!==s.namespaces&&(_=s.namespaces,f=s.enabled(d)),f),set:v=>{p=v}}),typeof s.init=="function"&&s.init(a),a}function u(d,c){const _=s(this.namespace+(c===void 0?":":c)+d);return _.log=this.log,_}function l(d){return d.toString().substring(2,d.toString().length-2).replace(/\.\*\?$/,"*")}return s.debug=s,s.default=s,s.coerce=function(d){return d instanceof Error?d.stack||d.message:d},s.disable=function(){const d=[...s.names.map(l),...s.skips.map(l).map(c=>"-"+c)].join(",");return s.enable(""),d},s.enable=function(d){let c;s.save(d),s.namespaces=d,s.names=[],s.skips=[];const _=(typeof d=="string"?d:"").split(/[\s,]+/),f=_.length;for(c=0;c<f;c++)_[c]&&((d=_[c].replace(/\*/g,".*?"))[0]==="-"?s.skips.push(new RegExp("^"+d.substr(1)+"$")):s.names.push(new RegExp("^"+d+"$")))},s.enabled=function(d){if(d[d.length-1]==="*")return!0;let c,_;for(c=0,_=s.skips.length;c<_;c++)if(s.skips[c].test(d))return!1;for(c=0,_=s.names.length;c<_;c++)if(s.names[c].test(d))return!0;return!1},s.humanize=t("ms"),s.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(r).forEach(d=>{s[d]=r[d]}),s.names=[],s.skips=[],s.formatters={},s.selectColor=function(d){let c=0;for(let _=0;_<d.length;_++)c=(c<<5)-c+d.charCodeAt(_),c|=0;return s.colors[Math.abs(c)%s.colors.length]},s.enable(s.load()),s}},{ms:45}],20:[function(t,i,o){(function(r,s){(function(){var u=t("readable-stream"),l=t("end-of-stream"),d=t("inherits"),c=t("stream-shift"),_=s.from&&s.from!==Uint8Array.from?s.from([0]):new s([0]),f=function(m,g){m._corked?m.once("uncork",g):g()},p=function(m,g){return function(E){E?function(y,S){y._autoDestroy&&y.destroy(S)}(m,E.message==="premature close"?null:E):g&&!m._ended&&m.end()}},a=function(){},v=function(m,g,E){if(!(this instanceof v))return new v(m,g,E);u.Duplex.call(this,E),this._writable=null,this._readable=null,this._readable2=null,this._autoDestroy=!E||E.autoDestroy!==!1,this._forwardDestroy=!E||E.destroy!==!1,this._forwardEnd=!E||E.end!==!1,this._corked=1,this._ondrain=null,this._drained=!1,this._forwarding=!1,this._unwrite=null,this._unread=null,this._ended=!1,this.destroyed=!1,m&&this.setWritable(m),g&&this.setReadable(g)};d(v,u.Duplex),v.obj=function(m,g,E){return E||(E={}),E.objectMode=!0,E.highWaterMark=16,new v(m,g,E)},v.prototype.cork=function(){++this._corked==1&&this.emit("cork")},v.prototype.uncork=function(){this._corked&&--this._corked==0&&this.emit("uncork")},v.prototype.setWritable=function(m){if(this._unwrite&&this._unwrite(),this.destroyed)m&&m.destroy&&m.destroy();else if(m!==null&&m!==!1){var g=this,E=l(m,{writable:!0,readable:!1},p(this,this._forwardEnd)),y=function(){var S=g._ondrain;g._ondrain=null,S&&S()};this._unwrite&&r.nextTick(y),this._writable=m,this._writable.on("drain",y),this._unwrite=function(){g._writable.removeListener("drain",y),E()},this.uncork()}else this.end()},v.prototype.setReadable=function(m){if(this._unread&&this._unread(),this.destroyed)m&&m.destroy&&m.destroy();else{if(m===null||m===!1)return this.push(null),void this.resume();var g,E=this,y=l(m,{writable:!1,readable:!0},p(this)),S=function(){E._forward()},C=function(){E.push(null)};this._drained=!0,this._readable=m,this._readable2=m._readableState?m:(g=m,new u.Readable({objectMode:!0,highWaterMark:16}).wrap(g)),this._readable2.on("readable",S),this._readable2.on("end",C),this._unread=function(){E._readable2.removeListener("readable",S),E._readable2.removeListener("end",C),y()},this._forward()}},v.prototype._read=function(){this._drained=!0,this._forward()},v.prototype._forward=function(){if(!this._forwarding&&this._readable2&&this._drained){var m;for(this._forwarding=!0;this._drained&&(m=c(this._readable2))!==null;)this.destroyed||(this._drained=this.push(m));this._forwarding=!1}},v.prototype.destroy=function(m,g){if(g||(g=a),this.destroyed)return g(null);this.destroyed=!0;var E=this;r.nextTick(function(){E._destroy(m),g(null)})},v.prototype._destroy=function(m){if(m){var g=this._ondrain;this._ondrain=null,g?g(m):this.emit("error",m)}this._forwardDestroy&&(this._readable&&this._readable.destroy&&this._readable.destroy(),this._writable&&this._writable.destroy&&this._writable.destroy()),this.emit("close")},v.prototype._write=function(m,g,E){if(!this.destroyed)return this._corked?f(this,this._write.bind(this,m,g,E)):m===_?this._finish(E):this._writable?void(this._writable.write(m)===!1?this._ondrain=E:this.destroyed||E()):E()},v.prototype._finish=function(m){var g=this;this.emit("preend"),f(this,function(){var E,y;E=g._forwardEnd&&g._writable,y=function(){g._writableState.prefinished===!1&&(g._writableState.prefinished=!0),g.emit("prefinish"),f(g,m)},E?E._writableState&&E._writableState.finished?y():E._writableState?E.end(y):(E.end(),y()):y()})},v.prototype.end=function(m,g,E){return typeof m=="function"?this.end(null,null,m):typeof g=="function"?this.end(m,null,g):(this._ended=!0,m&&this.write(m),this._writableState.ending||this._writableState.destroyed||this.write(_),u.Writable.prototype.end.call(this,E))},i.exports=v}).call(this)}).call(this,t("_process"),t("buffer").Buffer)},{_process:50,buffer:17,"end-of-stream":21,inherits:24,"readable-stream":69,"stream-shift":74}],21:[function(t,i,o){(function(r){(function(){var s=t("once"),u=function(){},l=function(d,c,_){if(typeof c=="function")return l(d,null,c);c||(c={}),_=s(_||u);var f=d._writableState,p=d._readableState,a=c.readable||c.readable!==!1&&d.readable,v=c.writable||c.writable!==!1&&d.writable,m=!1,g=function(){d.writable||E()},E=function(){v=!1,a||_.call(d)},y=function(){a=!1,v||_.call(d)},S=function(B){_.call(d,B?new Error("exited with error code: "+B):null)},C=function(B){_.call(d,B)},T=function(){r.nextTick(R)},R=function(){if(!m)return(!a||p&&p.ended&&!p.destroyed)&&(!v||f&&f.ended&&!f.destroyed)?void 0:_.call(d,new Error("premature close"))},O=function(){d.req.on("finish",E)};return function(B){return B.setHeader&&typeof B.abort=="function"}(d)?(d.on("complete",E),d.on("abort",T),d.req?O():d.on("request",O)):v&&!f&&(d.on("end",g),d.on("close",g)),function(B){return B.stdio&&Array.isArray(B.stdio)&&B.stdio.length===3}(d)&&d.on("exit",S),d.on("end",y),d.on("finish",E),c.error!==!1&&d.on("error",C),d.on("close",T),function(){m=!0,d.removeListener("complete",E),d.removeListener("abort",T),d.removeListener("request",O),d.req&&d.req.removeListener("finish",E),d.removeListener("end",g),d.removeListener("close",g),d.removeListener("finish",E),d.removeListener("exit",S),d.removeListener("end",y),d.removeListener("error",C),d.removeListener("close",T)}};i.exports=l}).call(this)}).call(this,t("_process"))},{_process:50,once:48}],22:[function(t,i,o){var r=Object.create||function(y){var S=function(){};return S.prototype=y,new S},s=Object.keys||function(y){var S=[];for(var C in y)Object.prototype.hasOwnProperty.call(y,C)&&S.push(C);return C},u=Function.prototype.bind||function(y){var S=this;return function(){return S.apply(y,arguments)}};function l(){this._events&&Object.prototype.hasOwnProperty.call(this,"_events")||(this._events=r(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0}i.exports=l,l.EventEmitter=l,l.prototype._events=void 0,l.prototype._maxListeners=void 0;var d,c=10;try{var _={};Object.defineProperty&&Object.defineProperty(_,"x",{value:0}),d=_.x===0}catch{d=!1}function f(y){return y._maxListeners===void 0?l.defaultMaxListeners:y._maxListeners}function p(y,S,C,T){var R,O,B;if(typeof C!="function")throw new TypeError('"listener" argument must be a function');if((O=y._events)?(O.newListener&&(y.emit("newListener",S,C.listener?C.listener:C),O=y._events),B=O[S]):(O=y._events=r(null),y._eventsCount=0),B){if(typeof B=="function"?B=O[S]=T?[C,B]:[B,C]:T?B.unshift(C):B.push(C),!B.warned&&(R=f(y))&&R>0&&B.length>R){B.warned=!0;var j=new Error("Possible EventEmitter memory leak detected. "+B.length+' "'+String(S)+'" listeners added. Use emitter.setMaxListeners() to increase limit.');j.name="MaxListenersExceededWarning",j.emitter=y,j.type=S,j.count=B.length,typeof console=="object"&&console.warn&&console.warn("%s: %s",j.name,j.message)}}else B=O[S]=C,++y._eventsCount;return y}function a(){if(!this.fired)switch(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length){case 0:return this.listener.call(this.target);case 1:return this.listener.call(this.target,arguments[0]);case 2:return this.listener.call(this.target,arguments[0],arguments[1]);case 3:return this.listener.call(this.target,arguments[0],arguments[1],arguments[2]);default:for(var y=new Array(arguments.length),S=0;S<y.length;++S)y[S]=arguments[S];this.listener.apply(this.target,y)}}function v(y,S,C){var T={fired:!1,wrapFn:void 0,target:y,type:S,listener:C},R=u.call(a,T);return R.listener=C,T.wrapFn=R,R}function m(y,S,C){var T=y._events;if(!T)return[];var R=T[S];return R?typeof R=="function"?C?[R.listener||R]:[R]:C?function(O){for(var B=new Array(O.length),j=0;j<B.length;++j)B[j]=O[j].listener||O[j];return B}(R):E(R,R.length):[]}function g(y){var S=this._events;if(S){var C=S[y];if(typeof C=="function")return 1;if(C)return C.length}return 0}function E(y,S){for(var C=new Array(S),T=0;T<S;++T)C[T]=y[T];return C}d?Object.defineProperty(l,"defaultMaxListeners",{enumerable:!0,get:function(){return c},set:function(y){if(typeof y!="number"||y<0||y!=y)throw new TypeError('"defaultMaxListeners" must be a positive number');c=y}}):l.defaultMaxListeners=c,l.prototype.setMaxListeners=function(y){if(typeof y!="number"||y<0||isNaN(y))throw new TypeError('"n" argument must be a positive number');return this._maxListeners=y,this},l.prototype.getMaxListeners=function(){return f(this)},l.prototype.emit=function(y){var S,C,T,R,O,B,j=y==="error";if(B=this._events)j=j&&B.error==null;else if(!j)return!1;if(j){if(arguments.length>1&&(S=arguments[1]),S instanceof Error)throw S;var I=new Error('Unhandled "error" event. ('+S+")");throw I.context=S,I}if(!(C=B[y]))return!1;var A=typeof C=="function";switch(T=arguments.length){case 1:(function(M,w,x){if(w)M.call(x);else for(var k=M.length,V=E(M,k),L=0;L<k;++L)V[L].call(x)})(C,A,this);break;case 2:(function(M,w,x,k){if(w)M.call(x,k);else for(var V=M.length,L=E(M,V),D=0;D<V;++D)L[D].call(x,k)})(C,A,this,arguments[1]);break;case 3:(function(M,w,x,k,V){if(w)M.call(x,k,V);else for(var L=M.length,D=E(M,L),F=0;F<L;++F)D[F].call(x,k,V)})(C,A,this,arguments[1],arguments[2]);break;case 4:(function(M,w,x,k,V,L){if(w)M.call(x,k,V,L);else for(var D=M.length,F=E(M,D),G=0;G<D;++G)F[G].call(x,k,V,L)})(C,A,this,arguments[1],arguments[2],arguments[3]);break;default:for(R=new Array(T-1),O=1;O<T;O++)R[O-1]=arguments[O];(function(M,w,x,k){if(w)M.apply(x,k);else for(var V=M.length,L=E(M,V),D=0;D<V;++D)L[D].apply(x,k)})(C,A,this,R)}return!0},l.prototype.addListener=function(y,S){return p(this,y,S,!1)},l.prototype.on=l.prototype.addListener,l.prototype.prependListener=function(y,S){return p(this,y,S,!0)},l.prototype.once=function(y,S){if(typeof S!="function")throw new TypeError('"listener" argument must be a function');return this.on(y,v(this,y,S)),this},l.prototype.prependOnceListener=function(y,S){if(typeof S!="function")throw new TypeError('"listener" argument must be a function');return this.prependListener(y,v(this,y,S)),this},l.prototype.removeListener=function(y,S){var C,T,R,O,B;if(typeof S!="function")throw new TypeError('"listener" argument must be a function');if(!(T=this._events))return this;if(!(C=T[y]))return this;if(C===S||C.listener===S)--this._eventsCount==0?this._events=r(null):(delete T[y],T.removeListener&&this.emit("removeListener",y,C.listener||S));else if(typeof C!="function"){for(R=-1,O=C.length-1;O>=0;O--)if(C[O]===S||C[O].listener===S){B=C[O].listener,R=O;break}if(R<0)return this;R===0?C.shift():function(j,I){for(var A=I,M=A+1,w=j.length;M<w;A+=1,M+=1)j[A]=j[M];j.pop()}(C,R),C.length===1&&(T[y]=C[0]),T.removeListener&&this.emit("removeListener",y,B||S)}return this},l.prototype.removeAllListeners=function(y){var S,C,T;if(!(C=this._events))return this;if(!C.removeListener)return arguments.length===0?(this._events=r(null),this._eventsCount=0):C[y]&&(--this._eventsCount==0?this._events=r(null):delete C[y]),this;if(arguments.length===0){var R,O=s(C);for(T=0;T<O.length;++T)(R=O[T])!=="removeListener"&&this.removeAllListeners(R);return this.removeAllListeners("removeListener"),this._events=r(null),this._eventsCount=0,this}if(typeof(S=C[y])=="function")this.removeListener(y,S);else if(S)for(T=S.length-1;T>=0;T--)this.removeListener(y,S[T]);return this},l.prototype.listeners=function(y){return m(this,y,!0)},l.prototype.rawListeners=function(y){return m(this,y,!1)},l.listenerCount=function(y,S){return typeof y.listenerCount=="function"?y.listenerCount(S):g.call(y,S)},l.prototype.listenerCount=g,l.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]}},{}],23:[function(t,i,o){o.read=function(r,s,u,l,d){var c,_,f=8*d-l-1,p=(1<<f)-1,a=p>>1,v=-7,m=u?d-1:0,g=u?-1:1,E=r[s+m];for(m+=g,c=E&(1<<-v)-1,E>>=-v,v+=f;v>0;c=256*c+r[s+m],m+=g,v-=8);for(_=c&(1<<-v)-1,c>>=-v,v+=l;v>0;_=256*_+r[s+m],m+=g,v-=8);if(c===0)c=1-a;else{if(c===p)return _?NaN:1/0*(E?-1:1);_+=Math.pow(2,l),c-=a}return(E?-1:1)*_*Math.pow(2,c-l)},o.write=function(r,s,u,l,d,c){var _,f,p,a=8*c-d-1,v=(1<<a)-1,m=v>>1,g=d===23?Math.pow(2,-24)-Math.pow(2,-77):0,E=l?0:c-1,y=l?1:-1,S=s<0||s===0&&1/s<0?1:0;for(s=Math.abs(s),isNaN(s)||s===1/0?(f=isNaN(s)?1:0,_=v):(_=Math.floor(Math.log(s)/Math.LN2),s*(p=Math.pow(2,-_))<1&&(_--,p*=2),(s+=_+m>=1?g/p:g*Math.pow(2,1-m))*p>=2&&(_++,p/=2),_+m>=v?(f=0,_=v):_+m>=1?(f=(s*p-1)*Math.pow(2,d),_+=m):(f=s*Math.pow(2,m-1)*Math.pow(2,d),_=0));d>=8;r[u+E]=255&f,E+=y,f/=256,d-=8);for(_=_<<d|f,a+=d;a>0;r[u+E]=255&_,E+=y,_/=256,a-=8);r[u+E-y]|=128*S}},{}],24:[function(t,i,o){typeof Object.create=="function"?i.exports=function(r,s){s&&(r.super_=s,r.prototype=Object.create(s.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}))}:i.exports=function(r,s){if(s){r.super_=s;var u=function(){};u.prototype=s.prototype,r.prototype=new u,r.prototype.constructor=r}}},{}],25:[function(t,i,o){Object.defineProperty(o,"__esModule",{value:!0});var r=function(){function s(u,l){this.color=!0,this.key=void 0,this.value=void 0,this.parent=void 0,this.brother=void 0,this.leftChild=void 0,this.rightChild=void 0,this.key=u,this.value=l}return s.prototype.rotateLeft=function(){var u=this.parent,l=this.brother,d=this.leftChild,c=this.rightChild;if(!c)throw new Error("unknown error");var _=c.leftChild,f=c.rightChild;return u&&(u.leftChild===this?u.leftChild=c:u.rightChild===this&&(u.rightChild=c)),c.parent=u,c.brother=l,c.leftChild=this,c.rightChild=f,l&&(l.brother=c),this.parent=c,this.brother=f,this.leftChild=d,this.rightChild=_,f&&(f.parent=c,f.brother=this),d&&(d.parent=this,d.brother=_),_&&(_.parent=this,_.brother=d),c},s.prototype.rotateRight=function(){var u=this.parent,l=this.brother,d=this.leftChild;if(!d)throw new Error("unknown error");var c=this.rightChild,_=d.leftChild,f=d.rightChild;return u&&(u.leftChild===this?u.leftChild=d:u.rightChild===this&&(u.rightChild=d)),d.parent=u,d.brother=l,d.leftChild=_,d.rightChild=this,l&&(l.brother=d),_&&(_.parent=d,_.brother=this),this.parent=d,this.brother=_,this.leftChild=f,this.rightChild=c,f&&(f.parent=this,f.brother=c),c&&(c.parent=this,c.brother=f),d},s.prototype.remove=function(){if(this.leftChild||this.rightChild)throw new Error("can only remove leaf node");this.parent&&(this===this.parent.leftChild?this.parent.leftChild=void 0:this===this.parent.rightChild&&(this.parent.rightChild=void 0)),this.brother&&(this.brother.brother=void 0),this.key=void 0,this.value=void 0,this.parent=void 0,this.brother=void 0},s.TreeNodeColorType={red:!0,black:!1},s}();Object.freeze(r),o.default=r},{}],26:[function(t,i,o){var r=this&&this.__generator||function(u,l){var d,c,_,f,p={label:0,sent:function(){if(1&_[0])throw _[1];return _[1]},trys:[],ops:[]};return f={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(f[Symbol.iterator]=function(){return this}),f;function a(v){return function(m){return function(g){if(d)throw new TypeError("Generator is already executing.");for(;p;)try{if(d=1,c&&(_=2&g[0]?c.return:g[0]?c.throw||((_=c.return)&&_.call(c),0):c.next)&&!(_=_.call(c,g[1])).done)return _;switch(c=0,_&&(g=[2&g[0],_.value]),g[0]){case 0:case 1:_=g;break;case 4:return p.label++,{value:g[1],done:!1};case 5:p.label++,c=g[1],g=[0];continue;case 7:g=p.ops.pop(),p.trys.pop();continue;default:if(!(_=(_=p.trys).length>0&&_[_.length-1])&&(g[0]===6||g[0]===2)){p=0;continue}if(g[0]===3&&(!_||g[1]>_[0]&&g[1]<_[3])){p.label=g[1];break}if(g[0]===6&&p.label<_[1]){p.label=_[1],_=g;break}if(_&&p.label<_[2]){p.label=_[2],p.ops.push(g);break}_[2]&&p.ops.pop(),p.trys.pop();continue}g=l.call(u,p)}catch(E){g=[6,E],c=0}finally{d=_=0}if(5&g[0])throw g[1];return{value:g[0]?g[1]:void 0,done:!0}}([v,m])}}};function s(u){var l=this;u===void 0&&(u=[]);var d=[],c=0,_=0,f=0,p=0,a=0,v=0;this.size=function(){return v},this.empty=function(){return v===0},this.clear=function(){c=f=_=p=a=v=0,g.call(this,s.bucketSize),v=0},this.front=function(){return d[c][_]},this.back=function(){return d[f][p]},this.forEach=function(E){if(!this.empty()){var y=0;if(c!==f){for(C=_;C<s.bucketSize;++C)E(d[c][C],y++);for(C=c+1;C<f;++C)for(var S=0;S<s.bucketSize;++S)E(d[C][S],y++);for(C=0;C<=p;++C)E(d[f][C],y++)}else for(var C=_;C<=p;++C)E(d[c][C],y++)}};var m=function(E){var y=c*s.bucketSize+_,S=y+E,C=f*s.bucketSize+p;if(S<y||S>C)throw new Error("pos should more than 0 and less than queue's size");return{curNodeBucketIndex:Math.floor(S/s.bucketSize),curNodePointerIndex:S%s.bucketSize}};this.getElementByPos=function(E){var y=m(E),S=y.curNodeBucketIndex,C=y.curNodePointerIndex;return d[S][C]},this.eraseElementByPos=function(E){var y=this;if(E<0||E>v)throw new Error("pos should more than 0 and less than queue's size");if(E===0)this.popFront();else if(E===this.size())this.popBack();else{for(var S=[],C=E+1;C<v;++C)S.push(this.getElementByPos(C));this.cut(E),this.popBack(),S.forEach(function(T){return y.pushBack(T)})}},this.eraseElementByValue=function(E){if(!this.empty()){var y=[];this.forEach(function(T){T!==E&&y.push(T)});for(var S=y.length,C=0;C<S;++C)this.setElementByPos(C,y[C]);this.cut(S-1)}};var g=function(E){for(var y=[],S=E*s.sigma,C=Math.max(Math.ceil(S/s.bucketSize),2),T=0;T<C;++T)y.push(new Array(s.bucketSize));var R=Math.ceil(E/s.bucketSize),O=Math.floor(C/2)-Math.floor(R/2),B=O,j=0;if(this.size())for(T=0;T<R;++T){for(var I=0;I<s.bucketSize;++I)if(y[O+T][I]=this.front(),this.popFront(),this.empty()){B=O+T,j=I;break}if(this.empty())break}d=y,c=O,_=0,f=B,p=j,a=C,v=E};this.pushBack=function(E){this.empty()||(f===a-1&&p===s.bucketSize-1&&g.call(this,this.size()),p<s.bucketSize-1?++p:f<a-1&&(++f,p=0)),++v,d[f][p]=E},this.popBack=function(){this.empty()||(this.size()!==1&&(p>0?--p:c<f&&(--f,p=s.bucketSize-1)),v>0&&--v)},this.setElementByPos=function(E,y){var S=m(E),C=S.curNodeBucketIndex,T=S.curNodePointerIndex;d[C][T]=y},this.insert=function(E,y,S){var C=this;if(S===void 0&&(S=1),E===0)for(;S--;)this.pushFront(y);else if(E===this.size())for(;S--;)this.pushBack(y);else{for(var T=[],R=E;R<v;++R)T.push(this.getElementByPos(R));for(this.cut(E-1),R=0;R<S;++R)this.pushBack(y);T.forEach(function(O){return C.pushBack(O)})}},this.find=function(E){if(c===f){for(var y=_;y<=p;++y)if(d[c][y]===E)return!0;return!1}for(y=_;y<s.bucketSize;++y)if(d[c][y]===E)return!0;for(y=c+1;y<f;++y)for(var S=0;S<s.bucketSize;++S)if(d[y][S]===E)return!0;for(y=0;y<=p;++y)if(d[f][y]===E)return!0;return!1},this.reverse=function(){for(var E=0,y=v-1;E<y;){var S=this.getElementByPos(E);this.setElementByPos(E,this.getElementByPos(y)),this.setElementByPos(y,S),++E,--y}},this.unique=function(){if(!this.empty()){var E=[],y=this.front();this.forEach(function(C,T){T!==0&&C===y||(E.push(C),y=C)});for(var S=0;S<v;++S)this.setElementByPos(S,E[S]);this.cut(E.length-1)}},this.sort=function(E){var y=[];this.forEach(function(C){y.push(C)}),y.sort(E);for(var S=0;S<v;++S)this.setElementByPos(S,y[S])},this.pushFront=function(E){this.empty()||(c===0&&_===0&&g.call(this,this.size()),_>0?--_:c>0&&(--c,_=s.bucketSize-1)),++v,d[c][_]=E},this.popFront=function(){this.empty()||(this.size()!==1&&(_<s.bucketSize-1?++_:c<f&&(++c,_=0)),v>0&&--v)},this.shrinkToFit=function(){var E=this,y=[];this.forEach(function(R){y.push(R)});var S=y.length;d=[];for(var C=Math.ceil(S/s.bucketSize),T=0;T<C;++T)d.push(new Array(s.bucketSize));this.clear(),y.forEach(function(R){return E.pushBack(R)})},this.cut=function(E){if(E<0)this.clear();else{var y=m(E),S=y.curNodeBucketIndex,C=y.curNodePointerIndex;f=S,p=C,v=E+1}},this[Symbol.iterator]=function(){return function(){var E,y;return r(this,function(S){switch(S.label){case 0:if(v===0)return[2];if(c!==f)return[3,5];y=_,S.label=1;case 1:return y<=p?[4,d[c][y]]:[3,4];case 2:S.sent(),S.label=3;case 3:return++y,[3,1];case 4:return[2];case 5:y=_,S.label=6;case 6:return y<s.bucketSize?[4,d[c][y]]:[3,9];case 7:S.sent(),S.label=8;case 8:return++y,[3,6];case 9:y=c+1,S.label=10;case 10:if(!(y<f))return[3,15];E=0,S.label=11;case 11:return E<s.bucketSize?[4,d[y][E]]:[3,14];case 12:S.sent(),S.label=13;case 13:return++E,[3,11];case 14:return++y,[3,10];case 15:y=0,S.label=16;case 16:return y<=p?[4,d[f][y]]:[3,19];case 17:S.sent(),S.label=18;case 18:return++y,[3,16];case 19:return[2]}})}()},function(){var E=s.bucketSize;u.size?E=u.size():u.length&&(E=u.length);var y=E*s.sigma;a=Math.ceil(y/s.bucketSize),a=Math.max(a,3);for(var S=0;S<a;++S)d.push(new Array(s.bucketSize));var C=Math.ceil(E/s.bucketSize);c=Math.floor(a/2)-Math.floor(C/2),f=c,u.forEach(function(T){return l.pushBack(T)})}(),Object.freeze(this)}Object.defineProperty(o,"__esModule",{value:!0}),s.sigma=3,s.bucketSize=5e3,Object.freeze(s),o.default=s},{}],27:[function(t,i,o){var r=this&&this.__generator||function(c,_){var f,p,a,v,m={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return v={next:g(0),throw:g(1),return:g(2)},typeof Symbol=="function"&&(v[Symbol.iterator]=function(){return this}),v;function g(E){return function(y){return function(S){if(f)throw new TypeError("Generator is already executing.");for(;m;)try{if(f=1,p&&(a=2&S[0]?p.return:S[0]?p.throw||((a=p.return)&&a.call(p),0):p.next)&&!(a=a.call(p,S[1])).done)return a;switch(p=0,a&&(S=[2&S[0],a.value]),S[0]){case 0:case 1:a=S;break;case 4:return m.label++,{value:S[1],done:!1};case 5:m.label++,p=S[1],S=[0];continue;case 7:S=m.ops.pop(),m.trys.pop();continue;default:if(!(a=(a=m.trys).length>0&&a[a.length-1])&&(S[0]===6||S[0]===2)){m=0;continue}if(S[0]===3&&(!a||S[1]>a[0]&&S[1]<a[3])){m.label=S[1];break}if(S[0]===6&&m.label<a[1]){m.label=a[1],a=S;break}if(a&&m.label<a[2]){m.label=a[2],m.ops.push(S);break}a[2]&&m.ops.pop(),m.trys.pop();continue}S=_.call(c,m)}catch(C){S=[6,C],p=0}finally{f=a=0}if(5&S[0])throw S[1];return{value:S[0]?S[1]:void 0,done:!0}}([E,y])}}},s=this&&this.__values||function(c){var _=typeof Symbol=="function"&&Symbol.iterator,f=_&&c[_],p=0;if(f)return f.call(c);if(c&&typeof c.length=="number")return{next:function(){return c&&p>=c.length&&(c=void 0),{value:c&&c[p++],done:!c}}};throw new TypeError(_?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(o,"__esModule",{value:!0});var u=t("../LinkList/LinkList"),l=t("../Map/Map");function d(c,_,f){var p=this;if(c===void 0&&(c=[]),_===void 0&&(_=d.initSize),f=f||function(g){var E,y,S=0,C="";if(typeof g=="number")S=((S=Math.floor(g))<<5)-S,S&=S;else{C=typeof g!="string"?JSON.stringify(g):g;try{for(var T=s(C),R=T.next();!R.done;R=T.next())S=(S<<5)-S+R.value.charCodeAt(0),S&=S}catch(O){E={error:O}}finally{try{R&&!R.done&&(y=T.return)&&y.call(T)}finally{if(E)throw E.error}}}return S^=S>>>16},(_&_-1)!=0)throw new Error("initBucketNum must be 2 to the power of n");var a=0,v=[],m=Math.max(d.initSize,Math.min(d.maxSize,_));this.size=function(){return a},this.empty=function(){return a===0},this.clear=function(){a=0,m=_,v=[]},this.forEach=function(g){var E=0;v.forEach(function(y){y.forEach(function(S){g(S,E++)})})},this.setElement=function(g,E){var y,S;if(g==null)throw new Error("to avoid some unnecessary errors, we don't suggest you insert null or undefined here");if(E!=null){var C=f(g)&m-1;if(v[C]){var T=v[C].size();if(v[C]instanceof u.default){try{for(var R=s(v[C]),O=R.next();!O.done;O=R.next()){var B=O.value;if(B.key===g)return void(B.value=E)}}catch(I){y={error:I}}finally{try{O&&!O.done&&(S=R.return)&&S.call(R)}finally{if(y)throw y.error}}v[C].pushBack({key:g,value:E}),v[C].size()>=d.treeifyThreshold&&(v[C]=new l.default(v[C]))}else v[C].setElement(g,E);var j=v[C].size();a+=j-T}else++a,v[C]=new u.default([{key:g,value:E}]);a>m*d.sigma&&(function(I){if(!(I>=d.maxSize)){m=2*I;var A=[];v.forEach(function(M,w){if(!M.empty()){if(M instanceof u.default&&M.size()===1){var x=M.front(),k=x.key,V=x.value;A[f(k)&m-1]=new u.default([{key:k,value:V}])}else if(M instanceof l.default){var L=new u.default,D=new u.default;M.forEach(function(q){f(q.key)&I?D.pushBack(q):L.pushBack(q)}),L.size()>d.untreeifyThreshold?A[w]=new l.default(L):L.size()&&(A[w]=L),D.size()>d.untreeifyThreshold?A[w+I]=new l.default(D):D.size()&&(A[w+I]=D)}else{var F=new u.default,G=new u.default;M.forEach(function(q){f(q.key)&I?G.pushBack(q):F.pushBack(q)}),F.size()&&(A[w]=F),G.size()&&(A[w+I]=G)}v[w].clear()}}),v=A}}).call(this,m)}else this.eraseElementByKey(g)},this.getElementByKey=function(g){var E,y,S=f(g)&m-1;if(v[S]){if(v[S]instanceof l.default)return v[S].getElementByKey(g);try{for(var C=s(v[S]),T=C.next();!T.done;T=C.next()){var R=T.value;if(R.key===g)return R.value}}catch(O){E={error:O}}finally{try{T&&!T.done&&(y=C.return)&&y.call(C)}finally{if(E)throw E.error}}}},this.eraseElementByKey=function(g){var E,y,S=f(g)&m-1;if(v[S]){var C=v[S].size();if(v[S]instanceof l.default)v[S].eraseElementByKey(g),v[S].size()<=d.untreeifyThreshold&&(v[S]=new u.default(v[S]));else{var T=-1;try{for(var R=s(v[S]),O=R.next();!O.done;O=R.next())if(++T,O.value.key===g){v[S].eraseElementByPos(T);break}}catch(j){E={error:j}}finally{try{O&&!O.done&&(y=R.return)&&y.call(R)}finally{if(E)throw E.error}}}var B=v[S].size();a+=B-C}},this.find=function(g){var E,y,S=f(g)&m-1;if(!v[S])return!1;if(v[S]instanceof l.default)return v[S].find(g);try{for(var C=s(v[S]),T=C.next();!T.done;T=C.next())if(T.value.key===g)return!0}catch(R){E={error:R}}finally{try{T&&!T.done&&(y=C.return)&&y.call(C)}finally{if(E)throw E.error}}return!1},this[Symbol.iterator]=function(){return function(){var g,E,y,S,C,T;return r(this,function(R){switch(R.label){case 0:g=0,R.label=1;case 1:if(!(g<m))return[3,10];for(;g<m&&!v[g];)++g;if(g>=m)return[3,10];R.label=2;case 2:R.trys.push([2,7,8,9]),C=void 0,E=s(v[g]),y=E.next(),R.label=3;case 3:return y.done?[3,6]:[4,y.value];case 4:R.sent(),R.label=5;case 5:return y=E.next(),[3,3];case 6:return[3,9];case 7:return S=R.sent(),C={error:S},[3,9];case 8:try{y&&!y.done&&(T=E.return)&&T.call(E)}finally{if(C)throw C.error}return[7];case 9:return++g,[3,1];case 10:return[2]}})}()},c.forEach(function(g){var E=g.key,y=g.value;return p.setElement(E,y)}),Object.freeze(this)}d.initSize=16,d.maxSize=1<<30,d.sigma=.75,d.treeifyThreshold=8,d.untreeifyThreshold=6,d.minTreeifySize=64,Object.freeze(d),o.default=d},{"../LinkList/LinkList":29,"../Map/Map":30}],28:[function(t,i,o){var r=this&&this.__generator||function(c,_){var f,p,a,v,m={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return v={next:g(0),throw:g(1),return:g(2)},typeof Symbol=="function"&&(v[Symbol.iterator]=function(){return this}),v;function g(E){return function(y){return function(S){if(f)throw new TypeError("Generator is already executing.");for(;m;)try{if(f=1,p&&(a=2&S[0]?p.return:S[0]?p.throw||((a=p.return)&&a.call(p),0):p.next)&&!(a=a.call(p,S[1])).done)return a;switch(p=0,a&&(S=[2&S[0],a.value]),S[0]){case 0:case 1:a=S;break;case 4:return m.label++,{value:S[1],done:!1};case 5:m.label++,p=S[1],S=[0];continue;case 7:S=m.ops.pop(),m.trys.pop();continue;default:if(!(a=(a=m.trys).length>0&&a[a.length-1])&&(S[0]===6||S[0]===2)){m=0;continue}if(S[0]===3&&(!a||S[1]>a[0]&&S[1]<a[3])){m.label=S[1];break}if(S[0]===6&&m.label<a[1]){m.label=a[1],a=S;break}if(a&&m.label<a[2]){m.label=a[2],m.ops.push(S);break}a[2]&&m.ops.pop(),m.trys.pop();continue}S=_.call(c,m)}catch(C){S=[6,C],p=0}finally{f=a=0}if(5&S[0])throw S[1];return{value:S[0]?S[1]:void 0,done:!0}}([E,y])}}},s=this&&this.__values||function(c){var _=typeof Symbol=="function"&&Symbol.iterator,f=_&&c[_],p=0;if(f)return f.call(c);if(c&&typeof c.length=="number")return{next:function(){return c&&p>=c.length&&(c=void 0),{value:c&&c[p++],done:!c}}};throw new TypeError(_?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(o,"__esModule",{value:!0});var u=t("../Set/Set"),l=t("../LinkList/LinkList");function d(c,_,f){var p=this;if(c===void 0&&(c=[]),_===void 0&&(_=d.initSize),f=f||function(g){var E=0,y="";if(typeof g=="number")E=((E=Math.floor(g))<<5)-E,E&=E;else{y=typeof g!="string"?JSON.stringify(g):g;for(var S=0;S<y.length;S++)E=(E<<5)-E+y.charCodeAt(S),E&=E}return E^=E>>>16},(_&_-1)!=0)throw new Error("initBucketNum must be 2 to the power of n");var a=0,v=[],m=Math.max(d.initSize,Math.min(d.maxSize,_));this.size=function(){return a},this.empty=function(){return a===0},this.clear=function(){a=0,m=_,v=[]},this.forEach=function(g){var E=0;v.forEach(function(y){y.forEach(function(S){g(S,E++)})})},this.insert=function(g){if(g==null)throw new Error("to avoid some unnecessary errors, we don't suggest you insert null or undefined here");var E=f(g)&m-1;if(v[E]){var y=v[E].size();if(v[E]instanceof l.default){if(v[E].find(g))return;v[E].pushBack(g),v[E].size()>=d.treeifyThreshold&&(v[E]=new u.default(v[E]))}else v[E].insert(g);var S=v[E].size();a+=S-y}else v[E]=new l.default([g]),++a;a>m*d.sigma&&(function(C){if(!(C>=d.maxSize)){m=2*C;var T=[];v.forEach(function(R,O){if(!R.empty()){if(R instanceof l.default&&R.size()===1){var B=R.front();if(B===void 0)throw new Error("unknown error");T[f(B)&m-1]=new l.default([B])}else if(R instanceof u.default){var j=new l.default,I=new l.default;R.forEach(function(w){f(w)&C?I.pushBack(w):j.pushBack(w)}),j.size()>d.untreeifyThreshold?T[O]=new u.default(j):j.size()&&(T[O]=j),I.size()>d.untreeifyThreshold?T[O+C]=new u.default(I):I.size()&&(T[O+C]=I)}else{var A=new l.default,M=new l.default;R.forEach(function(w){f(w)&C?M.pushBack(w):A.pushBack(w)}),A.size()&&(T[O]=A),M.size()&&(T[O+C]=M)}v[O].clear()}}),v=T}}).call(this,m)},this.eraseElementByValue=function(g){var E=f(g)&m-1;if(v[E]){var y=v[E].size();v[E].eraseElementByValue(g),v[E]instanceof u.default&&v[E].size()<=d.untreeifyThreshold&&(v[E]=new l.default(v[E]));var S=v[E].size();a+=S-y}},this.find=function(g){var E=f(g)&m-1;return!!v[E]&&v[E].find(g)},this[Symbol.iterator]=function(){return function(){var g,E,y,S,C,T;return r(this,function(R){switch(R.label){case 0:g=0,R.label=1;case 1:if(!(g<m))return[3,10];for(;g<m&&!v[g];)++g;if(g>=m)return[3,10];R.label=2;case 2:R.trys.push([2,7,8,9]),C=void 0,E=s(v[g]),y=E.next(),R.label=3;case 3:return y.done?[3,6]:[4,y.value];case 4:R.sent(),R.label=5;case 5:return y=E.next(),[3,3];case 6:return[3,9];case 7:return S=R.sent(),C={error:S},[3,9];case 8:try{y&&!y.done&&(T=E.return)&&T.call(E)}finally{if(C)throw C.error}return[7];case 9:return++g,[3,1];case 10:return[2]}})}()},c.forEach(function(g){return p.insert(g)}),Object.freeze(this)}d.initSize=16,d.maxSize=1<<30,d.sigma=.75,d.treeifyThreshold=8,d.untreeifyThreshold=6,d.minTreeifySize=64,Object.freeze(d),o.default=d},{"../LinkList/LinkList":29,"../Set/Set":33}],29:[function(t,i,o){var r=this&&this.__generator||function(l,d){var c,_,f,p,a={label:0,sent:function(){if(1&f[0])throw f[1];return f[1]},trys:[],ops:[]};return p={next:v(0),throw:v(1),return:v(2)},typeof Symbol=="function"&&(p[Symbol.iterator]=function(){return this}),p;function v(m){return function(g){return function(E){if(c)throw new TypeError("Generator is already executing.");for(;a;)try{if(c=1,_&&(f=2&E[0]?_.return:E[0]?_.throw||((f=_.return)&&f.call(_),0):_.next)&&!(f=f.call(_,E[1])).done)return f;switch(_=0,f&&(E=[2&E[0],f.value]),E[0]){case 0:case 1:f=E;break;case 4:return a.label++,{value:E[1],done:!1};case 5:a.label++,_=E[1],E=[0];continue;case 7:E=a.ops.pop(),a.trys.pop();continue;default:if(!(f=(f=a.trys).length>0&&f[f.length-1])&&(E[0]===6||E[0]===2)){a=0;continue}if(E[0]===3&&(!f||E[1]>f[0]&&E[1]<f[3])){a.label=E[1];break}if(E[0]===6&&a.label<f[1]){a.label=f[1],f=E;break}if(f&&a.label<f[2]){a.label=f[2],a.ops.push(E);break}f[2]&&a.ops.pop(),a.trys.pop();continue}E=d.call(l,a)}catch(y){E=[6,y],_=0}finally{c=f=0}if(5&E[0])throw E[1];return{value:E[0]?E[1]:void 0,done:!0}}([m,g])}}};Object.defineProperty(o,"__esModule",{value:!0});var s=function(){return function(l){this.value=void 0,this.pre=void 0,this.next=void 0,this.value=l}}();function u(l){var d=this;l===void 0&&(l=[]);var c=0,_=void 0,f=void 0;this.size=function(){return c},this.empty=function(){return c===0},this.clear=function(){_=f=void 0,c=0},this.front=function(){return _==null?void 0:_.value},this.back=function(){return f==null?void 0:f.value},this.forEach=function(p){for(var a=_,v=0;a;){if(a.value===void 0)throw new Error("unknown error");p(a.value,v++),a=a.next}},this.getElementByPos=function(p){if(p<0||p>=c)throw new Error("pos must more then 0 and less then the list length");for(var a=_;p--&&a;)a=a.next;if(!a||a.value===void 0)throw new Error("unknown error");return a.value},this.eraseElementByPos=function(p){if(p<0||p>=c)throw new Error("erase pos must more then 0 and less then the list length");if(p===0)this.popFront();else if(p===c-1)this.popBack();else{for(var a=_;p--;){if(!(a!=null&&a.next))throw new Error("unknown error");a=a.next}if(!a||!a.pre||!a.next)throw new Error("unknown error");var v=a.pre,m=a.next;m.pre=v,v.next=m,c>0&&--c}},this.eraseElementByValue=function(p){for(;_&&_.value===p;)this.popFront();for(;f&&f.value===p;)this.popBack();if(_)for(var a=_;a;){if(a.value===p){var v=a.pre,m=a.next;m&&(m.pre=v),v&&(v.next=m),c>0&&--c}a=a.next}},this.pushBack=function(p){if(p==null)throw new Error("you can't push null or undefined here");++c;var a=new s(p);f?(f.next=a,a.pre=f,f=a):_=f=a},this.popBack=function(){f&&(c>0&&--c,f&&(_===f?_=f=void 0:(f=f.pre)&&(f.next=void 0)))},this.setElementByPos=function(p,a){if(a==null)throw new Error("you can't set null or undefined here");if(p<0||p>=c)throw new Error("pos must more then 0 and less then the list length");for(var v=_;p--;){if(!v)throw new Error("unknown error");v=v.next}v&&(v.value=a)},this.insert=function(p,a,v){if(v===void 0&&(v=1),a==null)throw new Error("you can't insert null or undefined here");if(p<0||p>c)throw new Error("insert pos must more then 0 and less then or equal to the list length");if(v<0)throw new Error("insert size must more than 0");if(p===0)for(;v--;)this.pushFront(a);else if(p===c)for(;v--;)this.pushBack(a);else{for(var m=_,g=1;g<p;++g){if(!(m!=null&&m.next))throw new Error("unknown error");m=m==null?void 0:m.next}if(!m)throw new Error("unknown error");var E=m.next;for(c+=v;v--;)m.next=new s(a),m.next.pre=m,m=m.next;m.next=E,E&&(E.pre=m)}},this.find=function(p){for(var a=_;a;){if(a.value===p)return!0;a=a.next}return!1},this.reverse=function(){for(var p=_,a=f,v=0;p&&a&&2*v<c;){var m=p.value;p.value=a.value,a.value=m,p=p.next,a=a.pre,++v}},this.unique=function(){for(var p=_;p;){for(var a=p;a&&a.next&&a.value===a.next.value;)a=a.next,c>0&&--c;p.next=a.next,p.next&&(p.next.pre=p),p=p.next}},this.sort=function(p){var a=[];this.forEach(function(m){a.push(m)}),a.sort(p);var v=_;a.forEach(function(m){v&&(v.value=m,v=v.next)})},this.pushFront=function(p){if(p==null)throw new Error("you can't push null or undefined here");++c;var a=new s(p);_?(a.next=_,_.pre=a,_=a):_=f=a},this.popFront=function(){_&&(c>0&&--c,_&&(_===f?_=f=void 0:(_=_.next)&&(_.pre=void 0)))},this.merge=function(p){var a=this,v=_;p.forEach(function(m){for(;v&&v.value!==void 0&&v.value<=m;)v=v.next;if(v===void 0)a.pushBack(m),v=f;else if(v===_)a.pushFront(m),v=_;else{++c;var g=v.pre;g&&(g.next=new s(m),g.next.pre=g,g.next.next=v,v&&(v.pre=g.next))}})},this[Symbol.iterator]=function(){return function(){var p;return r(this,function(a){switch(a.label){case 0:p=_,a.label=1;case 1:if(p===void 0)return[3,3];if(!p.value)throw new Error("unknown error");return[4,p.value];case 2:return a.sent(),p=p.next,[3,1];case 3:return[2]}})}()},l.forEach(function(p){return d.pushBack(p)}),Object.freeze(this)}Object.freeze(u),o.default=u},{}],30:[function(t,i,o){var r=this&&this.__generator||function(d,c){var _,f,p,a,v={label:0,sent:function(){if(1&p[0])throw p[1];return p[1]},trys:[],ops:[]};return a={next:m(0),throw:m(1),return:m(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function m(g){return function(E){return function(y){if(_)throw new TypeError("Generator is already executing.");for(;v;)try{if(_=1,f&&(p=2&y[0]?f.return:y[0]?f.throw||((p=f.return)&&p.call(f),0):f.next)&&!(p=p.call(f,y[1])).done)return p;switch(f=0,p&&(y=[2&y[0],p.value]),y[0]){case 0:case 1:p=y;break;case 4:return v.label++,{value:y[1],done:!1};case 5:v.label++,f=y[1],y=[0];continue;case 7:y=v.ops.pop(),v.trys.pop();continue;default:if(!(p=(p=v.trys).length>0&&p[p.length-1])&&(y[0]===6||y[0]===2)){v=0;continue}if(y[0]===3&&(!p||y[1]>p[0]&&y[1]<p[3])){v.label=y[1];break}if(y[0]===6&&v.label<p[1]){v.label=p[1],p=y;break}if(p&&v.label<p[2]){v.label=p[2],v.ops.push(y);break}p[2]&&v.ops.pop(),v.trys.pop();continue}y=c.call(d,v)}catch(S){y=[6,S],f=0}finally{_=p=0}if(5&y[0])throw y[1];return{value:y[0]?y[1]:void 0,done:!0}}([g,E])}}},s=this&&this.__values||function(d){var c=typeof Symbol=="function"&&Symbol.iterator,_=c&&d[c],f=0;if(_)return _.call(d);if(d&&typeof d.length=="number")return{next:function(){return d&&f>=d.length&&(d=void 0),{value:d&&d[f++],done:!d}}};throw new TypeError(c?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(o,"__esModule",{value:!0});var u=t("../Base/TreeNode");function l(d,c){var _=this;d===void 0&&(d=[]),c=c||function(I,A){return I<A?-1:I>A?1:0};var f=0,p=new u.default;p.color=u.default.TreeNodeColorType.black,this.size=function(){return f},this.empty=function(){return f===0},this.clear=function(){f=0,p.key=p.value=void 0,p.leftChild=p.rightChild=p.brother=void 0};var a=function(I){if(!I||I.key===void 0)throw new Error("unknown error");return I.leftChild?a(I.leftChild):I},v=function(I){if(!I||I.key===void 0)throw new Error("unknown error");return I.rightChild?v(I.rightChild):I};this.front=function(){if(!this.empty()){var I=a(p);if(I.key===void 0||I.value===void 0)throw new Error("unknown error");return{key:I.key,value:I.value}}},this.back=function(){if(!this.empty()){var I=v(p);if(I.key===void 0||I.value===void 0)throw new Error("unknown error");return{key:I.key,value:I.value}}},this.forEach=function(I){var A,M,w=0;try{for(var x=s(this),k=x.next();!k.done;k=x.next())I(k.value,w++)}catch(V){A={error:V}}finally{try{k&&!k.done&&(M=x.return)&&M.call(x)}finally{if(A)throw A.error}}},this.getElementByPos=function(I){var A,M;if(I<0||I>=this.size())throw new Error("pos must more than 0 and less than set's size");var w=0;try{for(var x=s(this),k=x.next();!k.done;k=x.next()){var V=k.value;if(w===I)return V;++w}}catch(L){A={error:L}}finally{try{k&&!k.done&&(M=x.return)&&M.call(x)}finally{if(A)throw A.error}}throw new Error("unknown Error")};var m=function(I,A){if(I&&I.key!==void 0&&I.value!==void 0){var M=c(I.key,A);return M===0?{key:I.key,value:I.value}:M<0?m(I.rightChild,A):m(I.leftChild,A)||{key:I.key,value:I.value}}};this.lowerBound=function(I){return m(p,I)};var g=function(I,A){if(I&&I.key!==void 0&&I.value!==void 0)return c(I.key,A)<=0?g(I.rightChild,A):g(I.leftChild,A)||{key:I.key,value:I.value}};this.upperBound=function(I){return g(p,I)};var E=function(I,A){if(I&&I.key!==void 0&&I.value!==void 0){var M=c(I.key,A);return M===0?{key:I.key,value:I.value}:M>0?E(I.leftChild,A):E(I.rightChild,A)||{key:I.key,value:I.value}}};this.reverseLowerBound=function(I){return E(p,I)};var y=function(I,A){if(I&&I.key!==void 0&&I.value!==void 0)return c(I.key,A)>=0?y(I.leftChild,A):y(I.rightChild,A)||{key:I.key,value:I.value}};this.reverseUpperBound=function(I){return y(p,I)};var S=function(I){var A=I.parent;if(!A){if(I===p)return;throw new Error("unknown error")}if(I.color!==u.default.TreeNodeColorType.red){var M=I.brother;if(!M)throw new Error("unknown error");if(I===A.leftChild)if(M.color===u.default.TreeNodeColorType.red){M.color=u.default.TreeNodeColorType.black,A.color=u.default.TreeNodeColorType.red;var w=A.rotateLeft();p===A&&(p=w),S(I)}else M.color===u.default.TreeNodeColorType.black&&(M.rightChild&&M.rightChild.color===u.default.TreeNodeColorType.red?(M.color=A.color,A.color=u.default.TreeNodeColorType.black,M.rightChild&&(M.rightChild.color=u.default.TreeNodeColorType.black),w=A.rotateLeft(),p===A&&(p=w),I.color=u.default.TreeNodeColorType.black):M.rightChild&&M.rightChild.color!==u.default.TreeNodeColorType.black||!M.leftChild||M.leftChild.color!==u.default.TreeNodeColorType.red?M.leftChild&&M.leftChild.color!==u.default.TreeNodeColorType.black||M.rightChild&&M.rightChild.color!==u.default.TreeNodeColorType.black||(M.color=u.default.TreeNodeColorType.red,S(A)):(M.color=u.default.TreeNodeColorType.red,M.leftChild&&(M.leftChild.color=u.default.TreeNodeColorType.black),w=M.rotateRight(),p===M&&(p=w),S(I)));else I===A.rightChild&&(M.color===u.default.TreeNodeColorType.red?(M.color=u.default.TreeNodeColorType.black,A.color=u.default.TreeNodeColorType.red,w=A.rotateRight(),p===A&&(p=w),S(I)):M.color===u.default.TreeNodeColorType.black&&(M.leftChild&&M.leftChild.color===u.default.TreeNodeColorType.red?(M.color=A.color,A.color=u.default.TreeNodeColorType.black,M.leftChild&&(M.leftChild.color=u.default.TreeNodeColorType.black),w=A.rotateRight(),p===A&&(p=w),I.color=u.default.TreeNodeColorType.black):M.leftChild&&M.leftChild.color!==u.default.TreeNodeColorType.black||!M.rightChild||M.rightChild.color!==u.default.TreeNodeColorType.red?M.leftChild&&M.leftChild.color!==u.default.TreeNodeColorType.black||M.rightChild&&M.rightChild.color!==u.default.TreeNodeColorType.black||(M.color=u.default.TreeNodeColorType.red,S(A)):(M.color=u.default.TreeNodeColorType.red,M.rightChild&&(M.rightChild.color=u.default.TreeNodeColorType.black),w=M.rotateLeft(),p===M&&(p=w),S(I))))}else I.color=u.default.TreeNodeColorType.black},C=function(I){for(var A=I;A.leftChild||A.rightChild;){if(A.rightChild){A=a(A.rightChild);var M=I.key;I.key=A.key,A.key=M;var w=I.value;I.value=A.value,A.value=w,I=A}A.leftChild&&(A=v(A.leftChild),M=I.key,I.key=A.key,A.key=M,w=I.value,I.value=A.value,A.value=w,I=A)}S(A),A&&A.remove(),--f,p.color=u.default.TreeNodeColorType.black},T=function(I,A){return!(!I||I.key===void 0)&&(!!T(I.leftChild,A)||!!A(I)||T(I.rightChild,A))};this.eraseElementByPos=function(I){if(I<0||I>=f)throw new Error("pos must more than 0 and less than set's size");var A=0;T(p,function(M){return I===A?(C(M),!0):(++A,!1)})},this.eraseElementByKey=function(I){if(!this.empty()){var A=B(p,I);A!==void 0&&A.key!==void 0&&c(A.key,I)===0&&C(A)}};var R=function(I,A){if(!I||I.key===void 0)throw new Error("unknown error");var M=c(A,I.key);return M<0?I.leftChild?R(I.leftChild,A):(I.leftChild=new u.default,I.leftChild.parent=I,I.leftChild.brother=I.rightChild,I.rightChild&&(I.rightChild.brother=I.leftChild),I.leftChild):M>0?I.rightChild?R(I.rightChild,A):(I.rightChild=new u.default,I.rightChild.parent=I,I.rightChild.brother=I.leftChild,I.leftChild&&(I.leftChild.brother=I.rightChild),I.rightChild):I},O=function(I){var A=I.parent;if(!A){if(I===p)return;throw new Error("unknown error")}if(A.color!==u.default.TreeNodeColorType.black&&A.color===u.default.TreeNodeColorType.red){var M=A.brother,w=A.parent;if(!w)throw new Error("unknown error");if(M&&M.color===u.default.TreeNodeColorType.red)M.color=A.color=u.default.TreeNodeColorType.black,w.color=u.default.TreeNodeColorType.red,O(w);else if(!M||M.color===u.default.TreeNodeColorType.black)if(A===w.leftChild)if(I===A.leftChild){A.color=u.default.TreeNodeColorType.black,w.color=u.default.TreeNodeColorType.red;var x=w.rotateRight();w===p&&(p=x)}else I===A.rightChild&&(x=A.rotateLeft(),w===p&&(p=x),O(A));else A===w.rightChild&&(I===A.leftChild?(x=A.rotateRight(),w===p&&(p=x),O(A)):I===A.rightChild&&(A.color=u.default.TreeNodeColorType.black,w.color=u.default.TreeNodeColorType.red,x=w.rotateLeft(),w===p&&(p=x)))}};this.setElement=function(I,A){if(I==null)throw new Error("to avoid some unnecessary errors, we don't suggest you insert null or undefined here");if(A!=null){if(this.empty())return++f,p.key=I,p.value=A,void(p.color=u.default.TreeNodeColorType.black);var M=R(p,I);M.key===void 0||c(M.key,I)!==0?(++f,M.key=I,M.value=A,O(M),p.color=u.default.TreeNodeColorType.black):M.value=A}else this.eraseElementByKey(I)};var B=function(I,A){if(I&&I.key!==void 0){var M=c(A,I.key);return M<0?B(I.leftChild,A):M>0?B(I.rightChild,A):I}};this.find=function(I){return!!B(p,I)},this.getElementByKey=function(I){var A=B(p,I);if((A==null?void 0:A.key)===void 0||(A==null?void 0:A.value)===void 0)throw new Error("unknown error");return A.value},this.union=function(I){var A=this;I.forEach(function(M){var w=M.key,x=M.value;return A.setElement(w,x)})},this.getHeight=function(){if(this.empty())return 0;var I=function(A){return A?Math.max(I(A.leftChild),I(A.rightChild))+1:1};return I(p)};var j=function(I){return r(this,function(A){switch(A.label){case 0:return I&&I.key!==void 0&&I.value!==void 0?[5,s(j(I.leftChild))]:[2];case 1:return A.sent(),[4,{key:I.key,value:I.value}];case 2:return A.sent(),[5,s(j(I.rightChild))];case 3:return A.sent(),[2]}})};this[Symbol.iterator]=function(){return j(p)},d.forEach(function(I){var A=I.key,M=I.value;return _.setElement(A,M)}),Object.freeze(this)}Object.freeze(l),o.default=l},{"../Base/TreeNode":25}],31:[function(t,i,o){function r(s,u){s===void 0&&(s=[]),u=u||function(f,p){return f>p?-1:f<p?1:0};var l=[];s.forEach(function(f){return l.push(f)});var d=l.length,c=function(f,p){if(f<0||f>=d)throw new Error("unknown error");if(p<0||p>=d)throw new Error("unknown error");var a=l[f];l[f]=l[p],l[p]=a},_=function(f){if(f<0||f>=d)throw new Error("unknown error");var p=2*f+1,a=2*f+2;p<d&&u(l[f],l[p])>0&&c(f,p),a<d&&u(l[f],l[a])>0&&c(f,a)};(function(){for(var f=Math.floor((d-1)/2);f>=0;--f)for(var p=f,a=2*p+1;a<d;){var v=a+1,m=a;if(v<d&&u(l[a],l[v])>0&&(m=v),u(l[p],l[m])<=0)break;c(p,m),a=2*(p=m)+1}})(),this.size=function(){return d},this.empty=function(){return d===0},this.clear=function(){d=0,l.length=0},this.push=function(f){if(l.push(f),++d!==1)for(var p=d-1;p>0;){var a=Math.floor((p-1)/2);if(u(l[a],f)<=0)break;_(a),p=a}},this.pop=function(){if(!this.empty())if(this.size()!==1){var f=l[d-1];--d;for(var p=0;p<this.size();){var a=2*p+1,v=2*p+2;if(a>=this.size())break;var m=a;if(v<this.size()&&u(l[a],l[v])>0&&(m=v),u(l[m],f)>=0)break;l[p]=l[m],p=m}l[p]=f}else--d},this.top=function(){return l[0]},Object.freeze(this)}Object.defineProperty(o,"__esModule",{value:!0}),Object.freeze(r),o.default=r},{}],32:[function(t,i,o){Object.defineProperty(o,"__esModule",{value:!0});var r=t("../LinkList/LinkList");function s(u){u===void 0&&(u=[]);var l=new r.default(u);this.size=function(){return l.size()},this.empty=function(){return l.empty()},this.clear=function(){l.clear()},this.push=function(d){l.pushBack(d)},this.pop=function(){l.popFront()},this.front=function(){return l.front()},Object.freeze(this)}Object.freeze(s),o.default=s},{"../LinkList/LinkList":29}],33:[function(t,i,o){var r=this&&this.__generator||function(d,c){var _,f,p,a,v={label:0,sent:function(){if(1&p[0])throw p[1];return p[1]},trys:[],ops:[]};return a={next:m(0),throw:m(1),return:m(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function m(g){return function(E){return function(y){if(_)throw new TypeError("Generator is already executing.");for(;v;)try{if(_=1,f&&(p=2&y[0]?f.return:y[0]?f.throw||((p=f.return)&&p.call(f),0):f.next)&&!(p=p.call(f,y[1])).done)return p;switch(f=0,p&&(y=[2&y[0],p.value]),y[0]){case 0:case 1:p=y;break;case 4:return v.label++,{value:y[1],done:!1};case 5:v.label++,f=y[1],y=[0];continue;case 7:y=v.ops.pop(),v.trys.pop();continue;default:if(!(p=(p=v.trys).length>0&&p[p.length-1])&&(y[0]===6||y[0]===2)){v=0;continue}if(y[0]===3&&(!p||y[1]>p[0]&&y[1]<p[3])){v.label=y[1];break}if(y[0]===6&&v.label<p[1]){v.label=p[1],p=y;break}if(p&&v.label<p[2]){v.label=p[2],v.ops.push(y);break}p[2]&&v.ops.pop(),v.trys.pop();continue}y=c.call(d,v)}catch(S){y=[6,S],f=0}finally{_=p=0}if(5&y[0])throw y[1];return{value:y[0]?y[1]:void 0,done:!0}}([g,E])}}},s=this&&this.__values||function(d){var c=typeof Symbol=="function"&&Symbol.iterator,_=c&&d[c],f=0;if(_)return _.call(d);if(d&&typeof d.length=="number")return{next:function(){return d&&f>=d.length&&(d=void 0),{value:d&&d[f++],done:!d}}};throw new TypeError(c?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(o,"__esModule",{value:!0});var u=t("../Base/TreeNode");function l(d,c){var _=this;d===void 0&&(d=[]),c=c||function(I,A){return I<A?-1:I>A?1:0};var f=0,p=new u.default;p.color=u.default.TreeNodeColorType.black,this.size=function(){return f},this.empty=function(){return f===0},this.clear=function(){f=0,p.key=void 0,p.leftChild=p.rightChild=p.brother=p.parent=void 0,p.color=u.default.TreeNodeColorType.black};var a=function(I){if(!I||I.key===void 0)throw new Error("unknown error");return I.leftChild?a(I.leftChild):I},v=function(I){if(!I||I.key===void 0)throw new Error("unknown error");return I.rightChild?v(I.rightChild):I};this.front=function(){if(!this.empty())return a(p).key},this.back=function(){if(!this.empty())return v(p).key},this.forEach=function(I){var A,M,w=0;try{for(var x=s(this),k=x.next();!k.done;k=x.next())I(k.value,w++)}catch(V){A={error:V}}finally{try{k&&!k.done&&(M=x.return)&&M.call(x)}finally{if(A)throw A.error}}},this.getElementByPos=function(I){var A,M;if(I<0||I>=this.size())throw new Error("pos must more than 0 and less than set's size");var w=0;try{for(var x=s(this),k=x.next();!k.done;k=x.next()){var V=k.value;if(w===I)return V;++w}}catch(L){A={error:L}}finally{try{k&&!k.done&&(M=x.return)&&M.call(x)}finally{if(A)throw A.error}}throw new Error("unknown error")};var m=function(I){var A=I.parent;if(!A){if(I===p)return;throw new Error("unknown error")}if(I.color!==u.default.TreeNodeColorType.red){var M=I.brother;if(!M)throw new Error("unknown error");if(I===A.leftChild)if(M.color===u.default.TreeNodeColorType.red){M.color=u.default.TreeNodeColorType.black,A.color=u.default.TreeNodeColorType.red;var w=A.rotateLeft();p===A&&(p=w),m(I)}else M.color===u.default.TreeNodeColorType.black&&(M.rightChild&&M.rightChild.color===u.default.TreeNodeColorType.red?(M.color=A.color,A.color=u.default.TreeNodeColorType.black,M.rightChild&&(M.rightChild.color=u.default.TreeNodeColorType.black),w=A.rotateLeft(),p===A&&(p=w),I.color=u.default.TreeNodeColorType.black):M.rightChild&&M.rightChild.color!==u.default.TreeNodeColorType.black||!M.leftChild||M.leftChild.color!==u.default.TreeNodeColorType.red?M.leftChild&&M.leftChild.color!==u.default.TreeNodeColorType.black||M.rightChild&&M.rightChild.color!==u.default.TreeNodeColorType.black||(M.color=u.default.TreeNodeColorType.red,m(A)):(M.color=u.default.TreeNodeColorType.red,M.leftChild&&(M.leftChild.color=u.default.TreeNodeColorType.black),w=M.rotateRight(),p===M&&(p=w),m(I)));else I===A.rightChild&&(M.color===u.default.TreeNodeColorType.red?(M.color=u.default.TreeNodeColorType.black,A.color=u.default.TreeNodeColorType.red,w=A.rotateRight(),p===A&&(p=w),m(I)):M.color===u.default.TreeNodeColorType.black&&(M.leftChild&&M.leftChild.color===u.default.TreeNodeColorType.red?(M.color=A.color,A.color=u.default.TreeNodeColorType.black,M.leftChild&&(M.leftChild.color=u.default.TreeNodeColorType.black),w=A.rotateRight(),p===A&&(p=w),I.color=u.default.TreeNodeColorType.black):M.leftChild&&M.leftChild.color!==u.default.TreeNodeColorType.black||!M.rightChild||M.rightChild.color!==u.default.TreeNodeColorType.red?M.leftChild&&M.leftChild.color!==u.default.TreeNodeColorType.black||M.rightChild&&M.rightChild.color!==u.default.TreeNodeColorType.black||(M.color=u.default.TreeNodeColorType.red,m(A)):(M.color=u.default.TreeNodeColorType.red,M.rightChild&&(M.rightChild.color=u.default.TreeNodeColorType.black),w=M.rotateLeft(),p===M&&(p=w),m(I))))}else I.color=u.default.TreeNodeColorType.black},g=function(I){for(var A=I;A.leftChild||A.rightChild;){if(A.rightChild){A=a(A.rightChild);var M=I.key;I.key=A.key,A.key=M,I=A}A.leftChild&&(A=v(A.leftChild),M=I.key,I.key=A.key,A.key=M,I=A)}m(A),A&&A.remove(),--f,p.color=u.default.TreeNodeColorType.black},E=function(I,A){return!(!I||I.key===void 0)&&(!!E(I.leftChild,A)||!!A(I)||E(I.rightChild,A))};this.eraseElementByPos=function(I){if(I<0||I>=f)throw new Error("pos must more than 0 and less than set's size");var A=0;E(p,function(M){return I===A?(g(M),!0):(++A,!1)})},this.eraseElementByValue=function(I){if(!this.empty()){var A=C(p,I);A!==void 0&&A.key!==void 0&&c(A.key,I)===0&&g(A)}};var y=function(I,A){if(!I||I.key===void 0)throw new Error("unknown error");var M=c(A,I.key);return M<0?I.leftChild?y(I.leftChild,A):(I.leftChild=new u.default,I.leftChild.parent=I,I.leftChild.brother=I.rightChild,I.rightChild&&(I.rightChild.brother=I.leftChild),I.leftChild):M>0?I.rightChild?y(I.rightChild,A):(I.rightChild=new u.default,I.rightChild.parent=I,I.rightChild.brother=I.leftChild,I.leftChild&&(I.leftChild.brother=I.rightChild),I.rightChild):I},S=function(I){var A=I.parent;if(!A){if(I===p)return;throw new Error("unknown error")}if(A.color!==u.default.TreeNodeColorType.black&&A.color===u.default.TreeNodeColorType.red){var M=A.brother,w=A.parent;if(!w)throw new Error("unknown error");if(M&&M.color===u.default.TreeNodeColorType.red)M.color=A.color=u.default.TreeNodeColorType.black,w.color=u.default.TreeNodeColorType.red,S(w);else if(!M||M.color===u.default.TreeNodeColorType.black)if(A===w.leftChild)if(I===A.leftChild){A.color=u.default.TreeNodeColorType.black,w.color=u.default.TreeNodeColorType.red;var x=w.rotateRight();w===p&&(p=x)}else I===A.rightChild&&(x=A.rotateLeft(),w===p&&(p=x),S(A));else A===w.rightChild&&(I===A.leftChild?(x=A.rotateRight(),w===p&&(p=x),S(A)):I===A.rightChild&&(A.color=u.default.TreeNodeColorType.black,w.color=u.default.TreeNodeColorType.red,x=w.rotateLeft(),w===p&&(p=x)))}};this.insert=function(I){if(I==null)throw new Error("to avoid some unnecessary errors, we don't suggest you insert null or undefined here");if(this.empty())return++f,p.key=I,void(p.color=u.default.TreeNodeColorType.black);var A=y(p,I);A.key!==void 0&&c(A.key,I)===0||(++f,A.key=I,S(A),p.color=u.default.TreeNodeColorType.black)};var C=function(I,A){if(I&&I.key!==void 0){var M=c(A,I.key);return M<0?C(I.leftChild,A):M>0?C(I.rightChild,A):I}};this.find=function(I){var A=C(p,I);return A!==void 0&&A.key!==void 0&&c(A.key,I)===0};var T=function(I,A){if(I&&I.key!==void 0){var M=c(I.key,A);if(M===0)return I.key;if(M<0)return T(I.rightChild,A);var w=T(I.leftChild,A);return w!==void 0?w:I.key}};this.lowerBound=function(I){return T(p,I)};var R=function(I,A){if(I&&I.key!==void 0){if(c(I.key,A)<=0)return R(I.rightChild,A);var M=R(I.leftChild,A);return M!==void 0?M:I.key}};this.upperBound=function(I){return R(p,I)};var O=function(I,A){if(I&&I.key!==void 0){var M=c(I.key,A);if(M===0)return I.key;if(M>0)return O(I.leftChild,A);var w=O(I.rightChild,A);return w!==void 0?w:I.key}};this.reverseLowerBound=function(I){return O(p,I)};var B=function(I,A){if(I&&I.key!==void 0){if(c(I.key,A)>=0)return B(I.leftChild,A);var M=B(I.rightChild,A);return M!==void 0?M:I.key}};this.reverseUpperBound=function(I){return B(p,I)},this.union=function(I){var A=this;I.forEach(function(M){return A.insert(M)})},this.getHeight=function(){if(this.empty())return 0;var I=function(A){return A?Math.max(I(A.leftChild),I(A.rightChild))+1:1};return I(p)};var j=function(I){return r(this,function(A){switch(A.label){case 0:return I&&I.key!==void 0?[5,s(j(I.leftChild))]:[2];case 1:return A.sent(),[4,I.key];case 2:return A.sent(),[5,s(j(I.rightChild))];case 3:return A.sent(),[2]}})};this[Symbol.iterator]=function(){return j(p)},d.forEach(function(I){return _.insert(I)}),Object.freeze(this)}Object.freeze(l),o.default=l},{"../Base/TreeNode":25}],34:[function(t,i,o){function r(s){var u=this;s===void 0&&(s=[]);var l=0,d=[];this.size=function(){return l},this.empty=function(){return l===0},this.clear=function(){l=0,d.length=0},this.push=function(c){d.push(c),++l},this.pop=function(){d.pop(),l>0&&--l},this.top=function(){return d[l-1]},s.forEach(function(c){return u.push(c)}),Object.freeze(this)}Object.defineProperty(o,"__esModule",{value:!0}),Object.freeze(r),o.default=r},{}],35:[function(t,i,o){var r=this&&this.__generator||function(c,_){var f,p,a,v,m={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return v={next:g(0),throw:g(1),return:g(2)},typeof Symbol=="function"&&(v[Symbol.iterator]=function(){return this}),v;function g(E){return function(y){return function(S){if(f)throw new TypeError("Generator is already executing.");for(;m;)try{if(f=1,p&&(a=2&S[0]?p.return:S[0]?p.throw||((a=p.return)&&a.call(p),0):p.next)&&!(a=a.call(p,S[1])).done)return a;switch(p=0,a&&(S=[2&S[0],a.value]),S[0]){case 0:case 1:a=S;break;case 4:return m.label++,{value:S[1],done:!1};case 5:m.label++,p=S[1],S=[0];continue;case 7:S=m.ops.pop(),m.trys.pop();continue;default:if(!(a=(a=m.trys).length>0&&a[a.length-1])&&(S[0]===6||S[0]===2)){m=0;continue}if(S[0]===3&&(!a||S[1]>a[0]&&S[1]<a[3])){m.label=S[1];break}if(S[0]===6&&m.label<a[1]){m.label=a[1],a=S;break}if(a&&m.label<a[2]){m.label=a[2],m.ops.push(S);break}a[2]&&m.ops.pop(),m.trys.pop();continue}S=_.call(c,m)}catch(C){S=[6,C],p=0}finally{f=a=0}if(5&S[0])throw S[1];return{value:S[0]?S[1]:void 0,done:!0}}([E,y])}}},s=this&&this.__read||function(c,_){var f=typeof Symbol=="function"&&c[Symbol.iterator];if(!f)return c;var p,a,v=f.call(c),m=[];try{for(;(_===void 0||_-- >0)&&!(p=v.next()).done;)m.push(p.value)}catch(g){a={error:g}}finally{try{p&&!p.done&&(f=v.return)&&f.call(v)}finally{if(a)throw a.error}}return m},u=this&&this.__spreadArray||function(c,_,f){if(f||arguments.length===2)for(var p,a=0,v=_.length;a<v;a++)!p&&a in _||(p||(p=Array.prototype.slice.call(_,0,a)),p[a]=_[a]);return c.concat(p||Array.prototype.slice.call(_))},l=this&&this.__values||function(c){var _=typeof Symbol=="function"&&Symbol.iterator,f=_&&c[_],p=0;if(f)return f.call(c);if(c&&typeof c.length=="number")return{next:function(){return c&&p>=c.length&&(c=void 0),{value:c&&c[p++],done:!c}}};throw new TypeError(_?"Object is not iterable.":"Symbol.iterator is not defined.")};function d(c){var _=this;c===void 0&&(c=[]);var f=0,p=[];this.size=function(){return f},this.empty=function(){return f===0},this.clear=function(){f=0,p.length=0},this.front=function(){if(!this.empty())return p[0]},this.back=function(){if(!this.empty())return p[f-1]},this.forEach=function(a){p.forEach(a)},this.getElementByPos=function(a){if(a<0||a>=f)throw new Error("pos must more than 0 and less than vector's size");return p[a]},this.eraseElementByPos=function(a){if(a<0||a>=f)throw new Error("pos must more than 0 and less than vector's size");for(var v=a;v<f-1;++v)p[v]=p[v+1];this.popBack()},this.eraseElementByValue=function(a){var v=[];this.forEach(function(g){g!==a&&v.push(g)}),v.forEach(function(g,E){p[E]=g});for(var m=v.length;f>m;)this.popBack()},this.pushBack=function(a){p.push(a),++f},this.popBack=function(){p.pop(),f>0&&--f},this.setElementByPos=function(a,v){if(a<0||a>=f)throw new Error("pos must more than 0 and less than vector's size");p[a]=v},this.insert=function(a,v,m){if(m===void 0&&(m=1),a<0||a>f)throw new Error("pos must more than 0 and less than or equal to vector's size");p.splice.apply(p,u([a,0],s(new Array(m).fill(v)),!1)),f+=m},this.find=function(a){return p.includes(a)},this.reverse=function(){p.reverse()},this.unique=function(){var a,v=[];this.forEach(function(g,E){E!==0&&g===a||(v.push(g),a=g)}),v.forEach(function(g,E){p[E]=g});for(var m=v.length;f>m;)this.popBack()},this.sort=function(a){p.sort(a)},this[Symbol.iterator]=function(){return function(){return r(this,function(a){switch(a.label){case 0:return[5,l(p)];case 1:return[2,a.sent()]}})}()},c.forEach(function(a){return _.pushBack(a)}),Object.freeze(this)}Object.defineProperty(o,"__esModule",{value:!0}),Object.freeze(d),o.default=d},{}],36:[function(t,i,o){Object.defineProperty(o,"__esModule",{value:!0}),o.HashMap=o.HashSet=o.Map=o.Set=o.PriorityQueue=o.Deque=o.LinkList=o.Queue=o.Stack=o.Vector=void 0;var r=t("./Vector/Vector");o.Vector=r.default;var s=t("./Stack/Stack");o.Stack=s.default;var u=t("./Queue/Queue");o.Queue=u.default;var l=t("./LinkList/LinkList");o.LinkList=l.default;var d=t("./Deque/Deque");o.Deque=d.default;var c=t("./PriorityQueue/PriorityQueue");o.PriorityQueue=c.default;var _=t("./Set/Set");o.Set=_.default;var f=t("./Map/Map");o.Map=f.default;var p=t("./HashSet/HashSet");o.HashSet=p.default;var a=t("./HashMap/HashMap");o.HashMap=a.default},{"./Deque/Deque":26,"./HashMap/HashMap":27,"./HashSet/HashSet":28,"./LinkList/LinkList":29,"./Map/Map":30,"./PriorityQueue/PriorityQueue":31,"./Queue/Queue":32,"./Set/Set":33,"./Stack/Stack":34,"./Vector/Vector":35}],37:[function(t,i,o){const r=t("yallist"),s=Symbol("max"),u=Symbol("length"),l=Symbol("lengthCalculator"),d=Symbol("allowStale"),c=Symbol("maxAge"),_=Symbol("dispose"),f=Symbol("noDisposeOnSet"),p=Symbol("lruList"),a=Symbol("cache"),v=Symbol("updateAgeOnGet"),m=()=>1,g=(R,O,B)=>{const j=R[a].get(O);if(j){const I=j.value;if(E(R,I)){if(S(R,j),!R[d])return}else B&&(R[v]&&(j.value.now=Date.now()),R[p].unshiftNode(j));return I.value}},E=(R,O)=>{if(!O||!O.maxAge&&!R[c])return!1;const B=Date.now()-O.now;return O.maxAge?B>O.maxAge:R[c]&&B>R[c]},y=R=>{if(R[u]>R[s])for(let O=R[p].tail;R[u]>R[s]&&O!==null;){const B=O.prev;S(R,O),O=B}},S=(R,O)=>{if(O){const B=O.value;R[_]&&R[_](B.key,B.value),R[u]-=B.length,R[a].delete(B.key),R[p].removeNode(O)}};class C{constructor(O,B,j,I,A){this.key=O,this.value=B,this.length=j,this.now=I,this.maxAge=A||0}}const T=(R,O,B,j)=>{let I=B.value;E(R,I)&&(S(R,B),R[d]||(I=void 0)),I&&O.call(j,I.value,I.key,R)};i.exports=class{constructor(R){if(typeof R=="number"&&(R={max:R}),R||(R={}),R.max&&(typeof R.max!="number"||R.max<0))throw new TypeError("max must be a non-negative number");this[s]=R.max||1/0;const O=R.length||m;if(this[l]=typeof O!="function"?m:O,this[d]=R.stale||!1,R.maxAge&&typeof R.maxAge!="number")throw new TypeError("maxAge must be a number");this[c]=R.maxAge||0,this[_]=R.dispose,this[f]=R.noDisposeOnSet||!1,this[v]=R.updateAgeOnGet||!1,this.reset()}set max(R){if(typeof R!="number"||R<0)throw new TypeError("max must be a non-negative number");this[s]=R||1/0,y(this)}get max(){return this[s]}set allowStale(R){this[d]=!!R}get allowStale(){return this[d]}set maxAge(R){if(typeof R!="number")throw new TypeError("maxAge must be a non-negative number");this[c]=R,y(this)}get maxAge(){return this[c]}set lengthCalculator(R){typeof R!="function"&&(R=m),R!==this[l]&&(this[l]=R,this[u]=0,this[p].forEach(O=>{O.length=this[l](O.value,O.key),this[u]+=O.length})),y(this)}get lengthCalculator(){return this[l]}get length(){return this[u]}get itemCount(){return this[p].length}rforEach(R,O){O=O||this;for(let B=this[p].tail;B!==null;){const j=B.prev;T(this,R,B,O),B=j}}forEach(R,O){O=O||this;for(let B=this[p].head;B!==null;){const j=B.next;T(this,R,B,O),B=j}}keys(){return this[p].toArray().map(R=>R.key)}values(){return this[p].toArray().map(R=>R.value)}reset(){this[_]&&this[p]&&this[p].length&&this[p].forEach(R=>this[_](R.key,R.value)),this[a]=new Map,this[p]=new r,this[u]=0}dump(){return this[p].map(R=>!E(this,R)&&{k:R.key,v:R.value,e:R.now+(R.maxAge||0)}).toArray().filter(R=>R)}dumpLru(){return this[p]}set(R,O,B){if((B=B||this[c])&&typeof B!="number")throw new TypeError("maxAge must be a number");const j=B?Date.now():0,I=this[l](O,R);if(this[a].has(R)){if(I>this[s])return S(this,this[a].get(R)),!1;const M=this[a].get(R).value;return this[_]&&(this[f]||this[_](R,M.value)),M.now=j,M.maxAge=B,M.value=O,this[u]+=I-M.length,M.length=I,this.get(R),y(this),!0}const A=new C(R,O,I,j,B);return A.length>this[s]?(this[_]&&this[_](R,O),!1):(this[u]+=A.length,this[p].unshift(A),this[a].set(R,this[p].head),y(this),!0)}has(R){if(!this[a].has(R))return!1;const O=this[a].get(R).value;return!E(this,O)}get(R){return g(this,R,!0)}peek(R){return g(this,R,!1)}pop(){const R=this[p].tail;return R?(S(this,R),R.value):null}del(R){S(this,this[a].get(R))}load(R){this.reset();const O=Date.now();for(let B=R.length-1;B>=0;B--){const j=R[B],I=j.e||0;if(I===0)this.set(j.k,j.v);else{const A=I-O;A>0&&this.set(j.k,j.v,A)}}}prune(){this[a].forEach((R,O)=>g(this,O,!1))}}},{yallist:83}],38:[function(t,i,o){(function(r){(function(){const s=i.exports;s.types={0:"reserved",1:"connect",2:"connack",3:"publish",4:"puback",5:"pubrec",6:"pubrel",7:"pubcomp",8:"subscribe",9:"suback",10:"unsubscribe",11:"unsuback",12:"pingreq",13:"pingresp",14:"disconnect",15:"auth"},s.codes={};for(const l in s.types){const d=s.types[l];s.codes[d]=l}s.CMD_SHIFT=4,s.CMD_MASK=240,s.DUP_MASK=8,s.QOS_MASK=3,s.QOS_SHIFT=1,s.RETAIN_MASK=1,s.VARBYTEINT_MASK=127,s.VARBYTEINT_FIN_MASK=128,s.VARBYTEINT_MAX=268435455,s.SESSIONPRESENT_MASK=1,s.SESSIONPRESENT_HEADER=r.from([s.SESSIONPRESENT_MASK]),s.CONNACK_HEADER=r.from([s.codes.connack<<s.CMD_SHIFT]),s.USERNAME_MASK=128,s.PASSWORD_MASK=64,s.WILL_RETAIN_MASK=32,s.WILL_QOS_MASK=24,s.WILL_QOS_SHIFT=3,s.WILL_FLAG_MASK=4,s.CLEAN_SESSION_MASK=2,s.CONNECT_HEADER=r.from([s.codes.connect<<s.CMD_SHIFT]),s.properties={sessionExpiryInterval:17,willDelayInterval:24,receiveMaximum:33,maximumPacketSize:39,topicAliasMaximum:34,requestResponseInformation:25,requestProblemInformation:23,userProperties:38,authenticationMethod:21,authenticationData:22,payloadFormatIndicator:1,messageExpiryInterval:2,contentType:3,responseTopic:8,correlationData:9,maximumQoS:36,retainAvailable:37,assignedClientIdentifier:18,reasonString:31,wildcardSubscriptionAvailable:40,subscriptionIdentifiersAvailable:41,sharedSubscriptionAvailable:42,serverKeepAlive:19,responseInformation:26,serverReference:28,topicAlias:35,subscriptionIdentifier:11},s.propertiesCodes={};for(const l in s.properties){const d=s.properties[l];s.propertiesCodes[d]=l}function u(l){return[0,1,2].map(d=>[0,1].map(c=>[0,1].map(_=>{const f=r.alloc(1);return f.writeUInt8(s.codes[l]<<s.CMD_SHIFT|(c?s.DUP_MASK:0)|d<<s.QOS_SHIFT|_,0,!0),f})))}s.propertiesTypes={sessionExpiryInterval:"int32",willDelayInterval:"int32",receiveMaximum:"int16",maximumPacketSize:"int32",topicAliasMaximum:"int16",requestResponseInformation:"byte",requestProblemInformation:"byte",userProperties:"pair",authenticationMethod:"string",authenticationData:"binary",payloadFormatIndicator:"byte",messageExpiryInterval:"int32",contentType:"string",responseTopic:"string",correlationData:"binary",maximumQoS:"int8",retainAvailable:"byte",assignedClientIdentifier:"string",reasonString:"string",wildcardSubscriptionAvailable:"byte",subscriptionIdentifiersAvailable:"byte",sharedSubscriptionAvailable:"byte",serverKeepAlive:"int16",responseInformation:"string",serverReference:"string",topicAlias:"int16",subscriptionIdentifier:"var"},s.PUBLISH_HEADER=u("publish"),s.SUBSCRIBE_HEADER=u("subscribe"),s.SUBSCRIBE_OPTIONS_QOS_MASK=3,s.SUBSCRIBE_OPTIONS_NL_MASK=1,s.SUBSCRIBE_OPTIONS_NL_SHIFT=2,s.SUBSCRIBE_OPTIONS_RAP_MASK=1,s.SUBSCRIBE_OPTIONS_RAP_SHIFT=3,s.SUBSCRIBE_OPTIONS_RH_MASK=3,s.SUBSCRIBE_OPTIONS_RH_SHIFT=4,s.SUBSCRIBE_OPTIONS_RH=[0,16,32],s.SUBSCRIBE_OPTIONS_NL=4,s.SUBSCRIBE_OPTIONS_RAP=8,s.SUBSCRIBE_OPTIONS_QOS=[0,1,2],s.UNSUBSCRIBE_HEADER=u("unsubscribe"),s.ACKS={unsuback:u("unsuback"),puback:u("puback"),pubcomp:u("pubcomp"),pubrel:u("pubrel"),pubrec:u("pubrec")},s.SUBACK_HEADER=r.from([s.codes.suback<<s.CMD_SHIFT]),s.VERSION3=r.from([3]),s.VERSION4=r.from([4]),s.VERSION5=r.from([5]),s.VERSION131=r.from([131]),s.VERSION132=r.from([132]),s.QOS=[0,1,2].map(l=>r.from([l])),s.EMPTY={pingreq:r.from([s.codes.pingreq<<4,0]),pingresp:r.from([s.codes.pingresp<<4,0]),disconnect:r.from([s.codes.disconnect<<4,0])}}).call(this)}).call(this,t("buffer").Buffer)},{buffer:17}],39:[function(t,i,o){(function(r){(function(){const s=t("./writeToStream"),u=t("events");class l extends u{constructor(){super(),this._array=new Array(20),this._i=0}write(c){return this._array[this._i++]=c,!0}concat(){let c=0;const _=new Array(this._array.length),f=this._array;let p,a=0;for(p=0;p<f.length&&f[p]!==void 0;p++)typeof f[p]!="string"?_[p]=f[p].length:_[p]=r.byteLength(f[p]),c+=_[p];const v=r.allocUnsafe(c);for(p=0;p<f.length&&f[p]!==void 0;p++)typeof f[p]!="string"?(f[p].copy(v,a),a+=_[p]):(v.write(f[p],a),a+=_[p]);return v}}i.exports=function(d,c){const _=new l;return s(d,_,c),_.concat()}}).call(this)}).call(this,t("buffer").Buffer)},{"./writeToStream":44,buffer:17,events:22}],40:[function(t,i,o){o.parser=t("./parser").parser,o.generate=t("./generate"),o.writeToStream=t("./writeToStream")},{"./generate":39,"./parser":43,"./writeToStream":44}],41:[function(t,i,o){(function(r){(function(){const u={},l=r.isBuffer(r.from([1,2]).subarray(0,1));function d(c){const _=r.allocUnsafe(2);return _.writeUInt8(c>>8,0),_.writeUInt8(255&c,1),_}i.exports={cache:u,generateCache:function(){for(let c=0;c<65536;c++)u[c]=d(c)},generateNumber:d,genBufVariableByteInt:function(c){let _=0,f=0;const p=r.allocUnsafe(4);do _=c%128|0,(c=c/128|0)>0&&(_|=128),p.writeUInt8(_,f++);while(c>0&&f<4);return c>0&&(f=0),l?p.subarray(0,f):p.slice(0,f)},generate4ByteBuffer:function(c){const _=r.allocUnsafe(4);return _.writeUInt32BE(c,0),_}}}).call(this)}).call(this,t("buffer").Buffer)},{buffer:17}],42:[function(t,i,o){i.exports=class{constructor(){this.cmd=null,this.retain=!1,this.qos=0,this.dup=!1,this.length=-1,this.topic=null,this.payload=null}}},{}],43:[function(t,i,o){const r=t("bl"),s=t("events"),u=t("./packet"),l=t("./constants"),d=t("debug")("mqtt-packet:parser");class c extends s{constructor(){super(),this.parser=this.constructor.parser}static parser(f){return this instanceof c?(this.settings=f||{},this._states=["_parseHeader","_parseLength","_parsePayload","_newPacket"],this._resetState(),this):new c().parser(f)}_resetState(){d("_resetState: resetting packet, error, _list, and _stateCounter"),this.packet=new u,this.error=null,this._list=r(),this._stateCounter=0}parse(f){for(this.error&&this._resetState(),this._list.append(f),d("parse: current state: %s",this._states[this._stateCounter]);(this.packet.length!==-1||this._list.length>0)&&this[this._states[this._stateCounter]]()&&!this.error;)this._stateCounter++,d("parse: state complete. _stateCounter is now: %d",this._stateCounter),d("parse: packet.length: %d, buffer list length: %d",this.packet.length,this._list.length),this._stateCounter>=this._states.length&&(this._stateCounter=0);return d("parse: exited while loop. packet: %d, buffer list length: %d",this.packet.length,this._list.length),this._list.length}_parseHeader(){const f=this._list.readUInt8(0);return this.packet.cmd=l.types[f>>l.CMD_SHIFT],this.packet.retain=(f&l.RETAIN_MASK)!=0,this.packet.qos=f>>l.QOS_SHIFT&l.QOS_MASK,this.packet.dup=(f&l.DUP_MASK)!=0,d("_parseHeader: packet: %o",this.packet),this._list.consume(1),!0}_parseLength(){const f=this._parseVarByteNum(!0);return f&&(this.packet.length=f.value,this._list.consume(f.bytes)),d("_parseLength %d",f.value),!!f}_parsePayload(){d("_parsePayload: payload %O",this._list);let f=!1;if(this.packet.length===0||this._list.length>=this.packet.length){switch(this._pos=0,this.packet.cmd){case"connect":this._parseConnect();break;case"connack":this._parseConnack();break;case"publish":this._parsePublish();break;case"puback":case"pubrec":case"pubrel":case"pubcomp":this._parseConfirmation();break;case"subscribe":this._parseSubscribe();break;case"suback":this._parseSuback();break;case"unsubscribe":this._parseUnsubscribe();break;case"unsuback":this._parseUnsuback();break;case"pingreq":case"pingresp":break;case"disconnect":this._parseDisconnect();break;case"auth":this._parseAuth();break;default:this._emitError(new Error("Not supported"))}f=!0}return d("_parsePayload complete result: %s",f),f}_parseConnect(){let f,p,a,v;d("_parseConnect");const m={},g=this.packet,E=this._parseString();if(E===null)return this._emitError(new Error("Cannot parse protocolId"));if(E!=="MQTT"&&E!=="MQIsdp")return this._emitError(new Error("Invalid protocolId"));if(g.protocolId=E,this._pos>=this._list.length)return this._emitError(new Error("Packet too short"));if(g.protocolVersion=this._list.readUInt8(this._pos),g.protocolVersion>=128&&(g.bridgeMode=!0,g.protocolVersion=g.protocolVersion-128),g.protocolVersion!==3&&g.protocolVersion!==4&&g.protocolVersion!==5)return this._emitError(new Error("Invalid protocol version"));if(this._pos++,this._pos>=this._list.length)return this._emitError(new Error("Packet too short"));if(m.username=this._list.readUInt8(this._pos)&l.USERNAME_MASK,m.password=this._list.readUInt8(this._pos)&l.PASSWORD_MASK,m.will=this._list.readUInt8(this._pos)&l.WILL_FLAG_MASK,m.will&&(g.will={},g.will.retain=(this._list.readUInt8(this._pos)&l.WILL_RETAIN_MASK)!=0,g.will.qos=(this._list.readUInt8(this._pos)&l.WILL_QOS_MASK)>>l.WILL_QOS_SHIFT),g.clean=(this._list.readUInt8(this._pos)&l.CLEAN_SESSION_MASK)!=0,this._pos++,g.keepalive=this._parseNum(),g.keepalive===-1)return this._emitError(new Error("Packet too short"));if(g.protocolVersion===5){const S=this._parseProperties();Object.getOwnPropertyNames(S).length&&(g.properties=S)}const y=this._parseString();if(y===null)return this._emitError(new Error("Packet too short"));if(g.clientId=y,d("_parseConnect: packet.clientId: %s",g.clientId),m.will){if(g.protocolVersion===5){const S=this._parseProperties();Object.getOwnPropertyNames(S).length&&(g.will.properties=S)}if((f=this._parseString())===null)return this._emitError(new Error("Cannot parse will topic"));if(g.will.topic=f,d("_parseConnect: packet.will.topic: %s",g.will.topic),(p=this._parseBuffer())===null)return this._emitError(new Error("Cannot parse will payload"));g.will.payload=p,d("_parseConnect: packet.will.paylaod: %s",g.will.payload)}if(m.username){if((v=this._parseString())===null)return this._emitError(new Error("Cannot parse username"));g.username=v,d("_parseConnect: packet.username: %s",g.username)}if(m.password){if((a=this._parseBuffer())===null)return this._emitError(new Error("Cannot parse password"));g.password=a}return this.settings=g,d("_parseConnect: complete"),g}_parseConnack(){d("_parseConnack");const f=this.packet;if(this._list.length<1)return null;if(f.sessionPresent=!!(this._list.readUInt8(this._pos++)&l.SESSIONPRESENT_MASK),this.settings.protocolVersion===5)this._list.length>=2?f.reasonCode=this._list.readUInt8(this._pos++):f.reasonCode=0;else{if(this._list.length<2)return null;f.returnCode=this._list.readUInt8(this._pos++)}if(f.returnCode===-1||f.reasonCode===-1)return this._emitError(new Error("Cannot parse return code"));if(this.settings.protocolVersion===5){const p=this._parseProperties();Object.getOwnPropertyNames(p).length&&(f.properties=p)}d("_parseConnack: complete")}_parsePublish(){d("_parsePublish");const f=this.packet;if(f.topic=this._parseString(),f.topic===null)return this._emitError(new Error("Cannot parse topic"));if(!(f.qos>0)||this._parseMessageId()){if(this.settings.protocolVersion===5){const p=this._parseProperties();Object.getOwnPropertyNames(p).length&&(f.properties=p)}f.payload=this._list.slice(this._pos,f.length),d("_parsePublish: payload from buffer list: %o",f.payload)}}_parseSubscribe(){d("_parseSubscribe");const f=this.packet;let p,a,v,m,g,E,y;if(f.qos!==1)return this._emitError(new Error("Wrong subscribe header"));if(f.subscriptions=[],this._parseMessageId()){if(this.settings.protocolVersion===5){const S=this._parseProperties();Object.getOwnPropertyNames(S).length&&(f.properties=S)}for(;this._pos<f.length;){if((p=this._parseString())===null)return this._emitError(new Error("Cannot parse topic"));if(this._pos>=f.length)return this._emitError(new Error("Malformed Subscribe Payload"));v=(a=this._parseByte())&l.SUBSCRIBE_OPTIONS_QOS_MASK,E=(a>>l.SUBSCRIBE_OPTIONS_NL_SHIFT&l.SUBSCRIBE_OPTIONS_NL_MASK)!=0,g=(a>>l.SUBSCRIBE_OPTIONS_RAP_SHIFT&l.SUBSCRIBE_OPTIONS_RAP_MASK)!=0,m=a>>l.SUBSCRIBE_OPTIONS_RH_SHIFT&l.SUBSCRIBE_OPTIONS_RH_MASK,y={topic:p,qos:v},this.settings.protocolVersion===5?(y.nl=E,y.rap=g,y.rh=m):this.settings.bridgeMode&&(y.rh=0,y.rap=!0,y.nl=!0),d("_parseSubscribe: push subscription `%s` to subscription",y),f.subscriptions.push(y)}}}_parseSuback(){d("_parseSuback");const f=this.packet;if(this.packet.granted=[],this._parseMessageId()){if(this.settings.protocolVersion===5){const p=this._parseProperties();Object.getOwnPropertyNames(p).length&&(f.properties=p)}for(;this._pos<this.packet.length;)this.packet.granted.push(this._list.readUInt8(this._pos++))}}_parseUnsubscribe(){d("_parseUnsubscribe");const f=this.packet;if(f.unsubscriptions=[],this._parseMessageId()){if(this.settings.protocolVersion===5){const p=this._parseProperties();Object.getOwnPropertyNames(p).length&&(f.properties=p)}for(;this._pos<f.length;){const p=this._parseString();if(p===null)return this._emitError(new Error("Cannot parse topic"));d("_parseUnsubscribe: push topic `%s` to unsubscriptions",p),f.unsubscriptions.push(p)}}}_parseUnsuback(){d("_parseUnsuback");const f=this.packet;if(!this._parseMessageId())return this._emitError(new Error("Cannot parse messageId"));if(this.settings.protocolVersion===5){const p=this._parseProperties();for(Object.getOwnPropertyNames(p).length&&(f.properties=p),f.granted=[];this._pos<this.packet.length;)this.packet.granted.push(this._list.readUInt8(this._pos++))}}_parseConfirmation(){d("_parseConfirmation: packet.cmd: `%s`",this.packet.cmd);const f=this.packet;if(this._parseMessageId(),this.settings.protocolVersion===5&&(f.length>2?(f.reasonCode=this._parseByte(),d("_parseConfirmation: packet.reasonCode `%d`",f.reasonCode)):f.reasonCode=0,f.length>3)){const p=this._parseProperties();Object.getOwnPropertyNames(p).length&&(f.properties=p)}return!0}_parseDisconnect(){const f=this.packet;if(d("_parseDisconnect"),this.settings.protocolVersion===5){this._list.length>0?f.reasonCode=this._parseByte():f.reasonCode=0;const p=this._parseProperties();Object.getOwnPropertyNames(p).length&&(f.properties=p)}return d("_parseDisconnect result: true"),!0}_parseAuth(){d("_parseAuth");const f=this.packet;if(this.settings.protocolVersion!==5)return this._emitError(new Error("Not supported auth packet for this version MQTT"));f.reasonCode=this._parseByte();const p=this._parseProperties();return Object.getOwnPropertyNames(p).length&&(f.properties=p),d("_parseAuth: result: true"),!0}_parseMessageId(){const f=this.packet;return f.messageId=this._parseNum(),f.messageId===null?(this._emitError(new Error("Cannot parse messageId")),!1):(d("_parseMessageId: packet.messageId %d",f.messageId),!0)}_parseString(f){const p=this._parseNum(),a=p+this._pos;if(p===-1||a>this._list.length||a>this.packet.length)return null;const v=this._list.toString("utf8",this._pos,a);return this._pos+=p,d("_parseString: result: %s",v),v}_parseStringPair(){return d("_parseStringPair"),{name:this._parseString(),value:this._parseString()}}_parseBuffer(){const f=this._parseNum(),p=f+this._pos;if(f===-1||p>this._list.length||p>this.packet.length)return null;const a=this._list.slice(this._pos,p);return this._pos+=f,d("_parseBuffer: result: %o",a),a}_parseNum(){if(this._list.length-this._pos<2)return-1;const f=this._list.readUInt16BE(this._pos);return this._pos+=2,d("_parseNum: result: %s",f),f}_parse4ByteNum(){if(this._list.length-this._pos<4)return-1;const f=this._list.readUInt32BE(this._pos);return this._pos+=4,d("_parse4ByteNum: result: %s",f),f}_parseVarByteNum(f){d("_parseVarByteNum");let p,a=0,v=1,m=0,g=!1;const E=this._pos?this._pos:0;for(;a<4&&E+a<this._list.length;){if(m+=v*((p=this._list.readUInt8(E+a++))&l.VARBYTEINT_MASK),v*=128,(p&l.VARBYTEINT_FIN_MASK)==0){g=!0;break}if(this._list.length<=a)break}return!g&&a===4&&this._list.length>=a&&this._emitError(new Error("Invalid variable byte integer")),E&&(this._pos+=a),d("_parseVarByteNum: result: %o",g=!!g&&(f?{bytes:a,value:m}:m)),g}_parseByte(){let f;return this._pos<this._list.length&&(f=this._list.readUInt8(this._pos),this._pos++),d("_parseByte: result: %o",f),f}_parseByType(f){switch(d("_parseByType: type: %s",f),f){case"byte":return this._parseByte()!==0;case"int8":return this._parseByte();case"int16":return this._parseNum();case"int32":return this._parse4ByteNum();case"var":return this._parseVarByteNum();case"string":return this._parseString();case"pair":return this._parseStringPair();case"binary":return this._parseBuffer()}}_parseProperties(){d("_parseProperties");const f=this._parseVarByteNum(),p=this._pos+f,a={};for(;this._pos<p;){const v=this._parseByte();if(!v)return this._emitError(new Error("Cannot parse property code type")),!1;const m=l.propertiesCodes[v];if(!m)return this._emitError(new Error("Unknown property")),!1;if(m!=="userProperties")a[m]?Array.isArray(a[m])?a[m].push(this._parseByType(l.propertiesTypes[m])):(a[m]=[a[m]],a[m].push(this._parseByType(l.propertiesTypes[m]))):a[m]=this._parseByType(l.propertiesTypes[m]);else{a[m]||(a[m]=Object.create(null));const g=this._parseByType(l.propertiesTypes[m]);if(a[m][g.name])if(Array.isArray(a[m][g.name]))a[m][g.name].push(g.value);else{const E=a[m][g.name];a[m][g.name]=[E],a[m][g.name].push(g.value)}else a[m][g.name]=g.value}}return a}_newPacket(){return d("_newPacket"),this.packet&&(this._list.consume(this.packet.length),d("_newPacket: parser emit packet: packet.cmd: %s, packet.payload: %s, packet.length: %d",this.packet.cmd,this.packet.payload,this.packet.length),this.emit("packet",this.packet)),d("_newPacket: new packet"),this.packet=new u,this._pos=0,!0}_emitError(f){d("_emitError"),this.error=f,this.emit("error",f)}}i.exports=c},{"./constants":38,"./packet":42,bl:15,debug:18,events:22}],44:[function(t,i,o){(function(r){(function(){const s=t("./constants"),u=r.allocUnsafe(0),l=r.from([0]),d=t("./numbers"),c=t("process-nextick-args").nextTick,_=t("debug")("mqtt-packet:writeToStream"),f=d.cache,p=d.generateNumber,a=d.generateCache,v=d.genBufVariableByteInt,m=d.generate4ByteBuffer;let g=B,E=!0;function y(L,D,F){switch(_("generate called"),D.cork&&(D.cork(),c(S,D)),E&&(E=!1,a()),_("generate: packet.cmd: %s",L.cmd),L.cmd){case"connect":return function(G,q,Y){const K=G||{},W=K.protocolId||"MQTT";let X=K.protocolVersion||4;const J=K.will;let Z=K.clean;const b=K.keepalive||0,N=K.clientId||"",U=K.username,z=K.password,$=K.properties;Z===void 0&&(Z=!0);let Q=0;if(!W||typeof W!="string"&&!r.isBuffer(W))return q.emit("error",new Error("Invalid protocolId")),!1;if(Q+=W.length+2,X!==3&&X!==4&&X!==5)return q.emit("error",new Error("Invalid protocol version")),!1;if(Q+=1,(typeof N=="string"||r.isBuffer(N))&&(N||X>=4)&&(N||Z))Q+=r.byteLength(N)+2;else{if(X<4)return q.emit("error",new Error("clientId must be supplied before 3.1.1")),!1;if(1*Z==0)return q.emit("error",new Error("clientId must be given if cleanSession set to 0")),!1}if(typeof b!="number"||b<0||b>65535||b%1!=0)return q.emit("error",new Error("Invalid keepalive")),!1;if(Q+=2,Q+=1,X===5){var ee=A(q,$);if(!ee)return!1;Q+=ee.length}if(J){if(typeof J!="object")return q.emit("error",new Error("Invalid will")),!1;if(!J.topic||typeof J.topic!="string")return q.emit("error",new Error("Invalid will topic")),!1;if(Q+=r.byteLength(J.topic)+2,Q+=2,J.payload){if(!(J.payload.length>=0))return q.emit("error",new Error("Invalid will payload")),!1;typeof J.payload=="string"?Q+=r.byteLength(J.payload):Q+=J.payload.length}var oe={};if(X===5){if(!(oe=A(q,J.properties)))return!1;Q+=oe.length}}let te=!1;if(U!=null){if(!V(U))return q.emit("error",new Error("Invalid username")),!1;te=!0,Q+=r.byteLength(U)+2}if(z!=null){if(!te)return q.emit("error",new Error("Username is required to use password")),!1;if(!V(z))return q.emit("error",new Error("Invalid password")),!1;Q+=k(z)+2}q.write(s.CONNECT_HEADER),T(q,Q),I(q,W),K.bridgeMode&&(X+=128),q.write(X===131?s.VERSION131:X===132?s.VERSION132:X===4?s.VERSION4:X===5?s.VERSION5:s.VERSION3);let ie=0;return ie|=U!=null?s.USERNAME_MASK:0,ie|=z!=null?s.PASSWORD_MASK:0,ie|=J&&J.retain?s.WILL_RETAIN_MASK:0,ie|=J&&J.qos?J.qos<<s.WILL_QOS_SHIFT:0,ie|=J?s.WILL_FLAG_MASK:0,ie|=Z?s.CLEAN_SESSION_MASK:0,q.write(r.from([ie])),g(q,b),X===5&&ee.write(),I(q,N),J&&(X===5&&oe.write(),R(q,J.topic),I(q,J.payload)),U!=null&&I(q,U),z!=null&&I(q,z),!0}(L,D);case"connack":return function(G,q,Y){const K=Y?Y.protocolVersion:4,W=G||{},X=K===5?W.reasonCode:W.returnCode,J=W.properties;let Z=2;if(typeof X!="number")return q.emit("error",new Error("Invalid return code")),!1;let b=null;if(K===5){if(!(b=A(q,J)))return!1;Z+=b.length}return q.write(s.CONNACK_HEADER),T(q,Z),q.write(W.sessionPresent?s.SESSIONPRESENT_HEADER:l),q.write(r.from([X])),b!=null&&b.write(),!0}(L,D,F);case"publish":return function(G,q,Y){_("publish: packet: %o",G);const K=Y?Y.protocolVersion:4,W=G||{},X=W.qos||0,J=W.retain?s.RETAIN_MASK:0,Z=W.topic,b=W.payload||u,N=W.messageId,U=W.properties;let z=0;if(typeof Z=="string")z+=r.byteLength(Z)+2;else{if(!r.isBuffer(Z))return q.emit("error",new Error("Invalid topic")),!1;z+=Z.length+2}if(r.isBuffer(b)?z+=b.length:z+=r.byteLength(b),X&&typeof N!="number")return q.emit("error",new Error("Invalid messageId")),!1;X&&(z+=2);let $=null;if(K===5){if(!($=A(q,U)))return!1;z+=$.length}return q.write(s.PUBLISH_HEADER[X][W.dup?1:0][J?1:0]),T(q,z),g(q,k(Z)),q.write(Z),X>0&&g(q,N),$!=null&&$.write(),_("publish: payload: %o",b),q.write(b)}(L,D,F);case"puback":case"pubrec":case"pubrel":case"pubcomp":return function(G,q,Y){const K=Y?Y.protocolVersion:4,W=G||{},X=W.cmd||"puback",J=W.messageId,Z=W.dup&&X==="pubrel"?s.DUP_MASK:0;let b=0;const N=W.reasonCode,U=W.properties;let z=K===5?3:2;if(X==="pubrel"&&(b=1),typeof J!="number")return q.emit("error",new Error("Invalid messageId")),!1;let $=null;if(K===5&&typeof U=="object"){if(!($=M(q,U,Y,z)))return!1;z+=$.length}return q.write(s.ACKS[X][b][Z][0]),T(q,z),g(q,J),K===5&&q.write(r.from([N])),$!==null&&$.write(),!0}(L,D,F);case"subscribe":return function(G,q,Y){_("subscribe: packet: ");const K=Y?Y.protocolVersion:4,W=G||{},X=W.dup?s.DUP_MASK:0,J=W.messageId,Z=W.subscriptions,b=W.properties;let N=0;if(typeof J!="number")return q.emit("error",new Error("Invalid messageId")),!1;N+=2;let U=null;if(K===5){if(!(U=A(q,b)))return!1;N+=U.length}if(typeof Z!="object"||!Z.length)return q.emit("error",new Error("Invalid subscriptions")),!1;for(let $=0;$<Z.length;$+=1){const Q=Z[$].topic,ee=Z[$].qos;if(typeof Q!="string")return q.emit("error",new Error("Invalid subscriptions - invalid topic")),!1;if(typeof ee!="number")return q.emit("error",new Error("Invalid subscriptions - invalid qos")),!1;if(K===5){if(typeof(Z[$].nl||!1)!="boolean")return q.emit("error",new Error("Invalid subscriptions - invalid No Local")),!1;if(typeof(Z[$].rap||!1)!="boolean")return q.emit("error",new Error("Invalid subscriptions - invalid Retain as Published")),!1;const ie=Z[$].rh||0;if(typeof ie!="number"||ie>2)return q.emit("error",new Error("Invalid subscriptions - invalid Retain Handling")),!1}N+=r.byteLength(Q)+2+1}_("subscribe: writing to stream: %o",s.SUBSCRIBE_HEADER),q.write(s.SUBSCRIBE_HEADER[1][X?1:0][0]),T(q,N),g(q,J),U!==null&&U.write();let z=!0;for(const $ of Z){const Q=$.topic,ee=$.qos,oe=+$.nl,te=+$.rap,ie=$.rh;let se;R(q,Q),se=s.SUBSCRIBE_OPTIONS_QOS[ee],K===5&&(se|=oe?s.SUBSCRIBE_OPTIONS_NL:0,se|=te?s.SUBSCRIBE_OPTIONS_RAP:0,se|=ie?s.SUBSCRIBE_OPTIONS_RH[ie]:0),z=q.write(r.from([se]))}return z}(L,D,F);case"suback":return function(G,q,Y){const K=Y?Y.protocolVersion:4,W=G||{},X=W.messageId,J=W.granted,Z=W.properties;let b=0;if(typeof X!="number")return q.emit("error",new Error("Invalid messageId")),!1;if(b+=2,typeof J!="object"||!J.length)return q.emit("error",new Error("Invalid qos vector")),!1;for(let U=0;U<J.length;U+=1){if(typeof J[U]!="number")return q.emit("error",new Error("Invalid qos vector")),!1;b+=1}let N=null;if(K===5){if(!(N=M(q,Z,Y,b)))return!1;b+=N.length}return q.write(s.SUBACK_HEADER),T(q,b),g(q,X),N!==null&&N.write(),q.write(r.from(J))}(L,D,F);case"unsubscribe":return function(G,q,Y){const K=Y?Y.protocolVersion:4,W=G||{},X=W.messageId,J=W.dup?s.DUP_MASK:0,Z=W.unsubscriptions,b=W.properties;let N=0;if(typeof X!="number")return q.emit("error",new Error("Invalid messageId")),!1;if(N+=2,typeof Z!="object"||!Z.length)return q.emit("error",new Error("Invalid unsubscriptions")),!1;for(let $=0;$<Z.length;$+=1){if(typeof Z[$]!="string")return q.emit("error",new Error("Invalid unsubscriptions")),!1;N+=r.byteLength(Z[$])+2}let U=null;if(K===5){if(!(U=A(q,b)))return!1;N+=U.length}q.write(s.UNSUBSCRIBE_HEADER[1][J?1:0][0]),T(q,N),g(q,X),U!==null&&U.write();let z=!0;for(let $=0;$<Z.length;$++)z=R(q,Z[$]);return z}(L,D,F);case"unsuback":return function(G,q,Y){const K=Y?Y.protocolVersion:4,W=G||{},X=W.messageId,J=W.dup?s.DUP_MASK:0,Z=W.granted,b=W.properties,N=W.cmd;let U=2;if(typeof X!="number")return q.emit("error",new Error("Invalid messageId")),!1;if(K===5){if(typeof Z!="object"||!Z.length)return q.emit("error",new Error("Invalid qos vector")),!1;for(let $=0;$<Z.length;$+=1){if(typeof Z[$]!="number")return q.emit("error",new Error("Invalid qos vector")),!1;U+=1}}let z=null;if(K===5){if(!(z=M(q,b,Y,U)))return!1;U+=z.length}return q.write(s.ACKS[N][0][J][0]),T(q,U),g(q,X),z!==null&&z.write(),K===5&&q.write(r.from(Z)),!0}(L,D,F);case"pingreq":case"pingresp":return function(G,q,Y){return q.write(s.EMPTY[G.cmd])}(L,D);case"disconnect":return function(G,q,Y){const K=Y?Y.protocolVersion:4,W=G||{},X=W.reasonCode,J=W.properties;let Z=K===5?1:0,b=null;if(K===5){if(!(b=M(q,J,Y,Z)))return!1;Z+=b.length}return q.write(r.from([s.codes.disconnect<<4])),T(q,Z),K===5&&q.write(r.from([X])),b!==null&&b.write(),!0}(L,D,F);case"auth":return function(G,q,Y){const K=Y?Y.protocolVersion:4,W=G||{},X=W.reasonCode,J=W.properties;let Z=K===5?1:0;K!==5&&q.emit("error",new Error("Invalid mqtt version for auth packet"));const b=M(q,J,Y,Z);return b?(Z+=b.length,q.write(r.from([s.codes.auth<<4])),T(q,Z),q.write(r.from([X])),b!==null&&b.write(),!0):!1}(L,D,F);default:return D.emit("error",new Error("Unknown command")),!1}}function S(L){L.uncork()}Object.defineProperty(y,"cacheNumbers",{get:()=>g===B,set(L){L?(f&&Object.keys(f).length!==0||(E=!0),g=B):(E=!1,g=j)}});const C={};function T(L,D){if(D>s.VARBYTEINT_MAX)return L.emit("error",new Error(`Invalid variable byte integer: ${D}`)),!1;let F=C[D];return F||(F=v(D),D<16384&&(C[D]=F)),_("writeVarByteInt: writing to stream: %o",F),L.write(F)}function R(L,D){const F=r.byteLength(D);return g(L,F),_("writeString: %s",D),L.write(D,"utf8")}function O(L,D,F){R(L,D),R(L,F)}function B(L,D){return _("writeNumberCached: number: %d",D),_("writeNumberCached: %o",f[D]),L.write(f[D])}function j(L,D){const F=p(D);return _("writeNumberGenerated: %o",F),L.write(F)}function I(L,D){typeof D=="string"?R(L,D):D?(g(L,D.length),L.write(D)):g(L,0)}function A(L,D){if(typeof D!="object"||D.length!=null)return{length:1,write(){x(L,{},0)}};let F=0;function G(q,Y){let K=0;switch(s.propertiesTypes[q]){case"byte":if(typeof Y!="boolean")return L.emit("error",new Error(`Invalid ${q}: ${Y}`)),!1;K+=2;break;case"int8":if(typeof Y!="number"||Y<0||Y>255)return L.emit("error",new Error(`Invalid ${q}: ${Y}`)),!1;K+=2;break;case"binary":if(Y&&Y===null)return L.emit("error",new Error(`Invalid ${q}: ${Y}`)),!1;K+=1+r.byteLength(Y)+2;break;case"int16":if(typeof Y!="number"||Y<0||Y>65535)return L.emit("error",new Error(`Invalid ${q}: ${Y}`)),!1;K+=3;break;case"int32":if(typeof Y!="number"||Y<0||Y>4294967295)return L.emit("error",new Error(`Invalid ${q}: ${Y}`)),!1;K+=5;break;case"var":if(typeof Y!="number"||Y<0||Y>268435455)return L.emit("error",new Error(`Invalid ${q}: ${Y}`)),!1;K+=1+r.byteLength(v(Y));break;case"string":if(typeof Y!="string")return L.emit("error",new Error(`Invalid ${q}: ${Y}`)),!1;K+=3+r.byteLength(Y.toString());break;case"pair":if(typeof Y!="object")return L.emit("error",new Error(`Invalid ${q}: ${Y}`)),!1;K+=Object.getOwnPropertyNames(Y).reduce((W,X)=>{const J=Y[X];return Array.isArray(J)?W+=J.reduce((Z,b)=>Z+=3+r.byteLength(X.toString())+2+r.byteLength(b.toString()),0):W+=3+r.byteLength(X.toString())+2+r.byteLength(Y[X].toString()),W},0);break;default:return L.emit("error",new Error(`Invalid property ${q}: ${Y}`)),!1}return K}if(D)for(const q in D){let Y=0,K=0;const W=D[q];if(Array.isArray(W))for(let X=0;X<W.length;X++){if(!(K=G(q,W[X])))return!1;Y+=K}else{if(!(K=G(q,W)))return!1;Y=K}if(!Y)return!1;F+=Y}return{length:r.byteLength(v(F))+F,write(){x(L,D,F)}}}function M(L,D,F,G){const q=["reasonString","userProperties"],Y=F&&F.properties&&F.properties.maximumPacketSize?F.properties.maximumPacketSize:0;let K=A(L,D);if(Y)for(;G+K.length>Y;){const W=q.shift();if(!W||!D[W])return!1;delete D[W],K=A(L,D)}return K}function w(L,D,F){switch(s.propertiesTypes[D]){case"byte":L.write(r.from([s.properties[D]])),L.write(r.from([+F]));break;case"int8":L.write(r.from([s.properties[D]])),L.write(r.from([F]));break;case"binary":L.write(r.from([s.properties[D]])),I(L,F);break;case"int16":L.write(r.from([s.properties[D]])),g(L,F);break;case"int32":L.write(r.from([s.properties[D]])),function(G,q){const Y=m(q);_("write4ByteNumber: %o",Y),G.write(Y)}(L,F);break;case"var":L.write(r.from([s.properties[D]])),T(L,F);break;case"string":L.write(r.from([s.properties[D]])),R(L,F);break;case"pair":Object.getOwnPropertyNames(F).forEach(G=>{const q=F[G];Array.isArray(q)?q.forEach(Y=>{L.write(r.from([s.properties[D]])),O(L,G.toString(),Y.toString())}):(L.write(r.from([s.properties[D]])),O(L,G.toString(),q.toString()))});break;default:return L.emit("error",new Error(`Invalid property ${D} value: ${F}`)),!1}}function x(L,D,F){T(L,F);for(const G in D)if(Object.prototype.hasOwnProperty.call(D,G)&&D[G]!==null){const q=D[G];if(Array.isArray(q))for(let Y=0;Y<q.length;Y++)w(L,G,q[Y]);else w(L,G,q)}}function k(L){return L?L instanceof r?L.length:r.byteLength(L):0}function V(L){return typeof L=="string"||L instanceof r}i.exports=y}).call(this)}).call(this,t("buffer").Buffer)},{"./constants":38,"./numbers":41,buffer:17,debug:18,"process-nextick-args":49}],45:[function(t,i,o){var r=1e3,s=60*r,u=60*s,l=24*u,d=7*l,c=365.25*l;function _(f,p,a,v){var m=p>=1.5*a;return Math.round(f/a)+" "+v+(m?"s":"")}i.exports=function(f,p){p=p||{};var a=typeof f;if(a==="string"&&f.length>0)return function(v){if(!((v=String(v)).length>100)){var m=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(v);if(m){var g=parseFloat(m[1]);switch((m[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return g*c;case"weeks":case"week":case"w":return g*d;case"days":case"day":case"d":return g*l;case"hours":case"hour":case"hrs":case"hr":case"h":return g*u;case"minutes":case"minute":case"mins":case"min":case"m":return g*s;case"seconds":case"second":case"secs":case"sec":case"s":return g*r;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return g;default:return}}}}(f);if(a==="number"&&isFinite(f))return p.long?function(v){var m=Math.abs(v);return m>=l?_(v,m,l,"day"):m>=u?_(v,m,u,"hour"):m>=s?_(v,m,s,"minute"):m>=r?_(v,m,r,"second"):v+" ms"}(f):function(v){var m=Math.abs(v);return m>=l?Math.round(v/l)+"d":m>=u?Math.round(v/u)+"h":m>=s?Math.round(v/s)+"m":m>=r?Math.round(v/r)+"s":v+"ms"}(f);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(f))}},{}],46:[function(t,i,o){const r=t("./lib/number-allocator.js");i.exports.NumberAllocator=r},{"./lib/number-allocator.js":47}],47:[function(t,i,o){const r=t("js-sdsl").Set,s=t("debug")("number-allocator:trace"),u=t("debug")("number-allocator:error");function l(c,_){this.low=c,this.high=_}function d(c,_){if(!(this instanceof d))return new d(c,_);this.min=c,this.max=_,this.ss=new r([],(f,p)=>f.compare(p)),s("Create"),this.clear()}l.prototype.equals=function(c){return this.low===c.low&&this.high===c.high},l.prototype.compare=function(c){return this.low<c.low&&this.high<c.low?-1:c.low<this.low&&c.high<this.low?1:0},d.prototype.firstVacant=function(){return this.ss.size()===0?null:this.ss.front().low},d.prototype.alloc=function(){if(this.ss.size()===0)return s("alloc():empty"),null;const c=this.ss.front(),_=c.low;return _+1<=c.high?++c.low:this.ss.eraseElementByPos(0),s("alloc():"+_),_},d.prototype.use=function(c){const _=new l(c,c),f=this.ss.lowerBound(_);if(f){if(f.equals(_))return this.ss.eraseElementByValue(f),s("use():"+c),!0;if(f.low>c)return!1;if(f.low===c)return++f.low,s("use():"+c),!0;if(f.high===c)return--f.high,s("use():"+c),!0;const p=f.low;return f.low=c+1,this.ss.insert(new l(p,c-1)),s("use():"+c),!0}return s("use():failed"),!1},d.prototype.free=function(c){if(c<this.min||c>this.max)return void u("free():"+c+" is out of range");const _=new l(c,c),f=this.ss.lowerBound(_);if(f){if(f.low<=c&&c<=f.high)return void u("free():"+c+" has already been vacant");if(f===this.ss.front())c+1===f.low?--f.low:this.ss.insert(_);else{const p=this.ss.reverseLowerBound(_);p.high+1===c?c+1===f.low?(this.ss.eraseElementByValue(p),f.low=p.low):p.high=c:c+1===f.low?f.low=c:this.ss.insert(_)}}else{if(f===this.ss.front())return void this.ss.insert(_);const p=this.ss.reverseLowerBound(_);p.high+1===c?p.high=c:this.ss.insert(_)}s("free():"+c)},d.prototype.clear=function(){s("clear()"),this.ss.clear(),this.ss.insert(new l(this.min,this.max))},d.prototype.intervalCount=function(){return this.ss.size()},d.prototype.dump=function(){console.log("length:"+this.ss.size());for(const c of this.ss)console.log(c)},i.exports=d},{debug:18,"js-sdsl":36}],48:[function(t,i,o){var r=t("wrappy");function s(l){var d=function(){return d.called?d.value:(d.called=!0,d.value=l.apply(this,arguments))};return d.called=!1,d}function u(l){var d=function(){if(d.called)throw new Error(d.onceError);return d.called=!0,d.value=l.apply(this,arguments)},c=l.name||"Function wrapped with `once`";return d.onceError=c+" shouldn't be called more than once",d.called=!1,d}i.exports=r(s),i.exports.strict=r(u),s.proto=s(function(){Object.defineProperty(Function.prototype,"once",{value:function(){return s(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return u(this)},configurable:!0})})},{wrappy:79}],49:[function(t,i,o){(function(r){(function(){r===void 0||!r.version||r.version.indexOf("v0.")===0||r.version.indexOf("v1.")===0&&r.version.indexOf("v1.8.")!==0?i.exports={nextTick:function(s,u,l,d){if(typeof s!="function")throw new TypeError('"callback" argument must be a function');var c,_,f=arguments.length;switch(f){case 0:case 1:return r.nextTick(s);case 2:return r.nextTick(function(){s.call(null,u)});case 3:return r.nextTick(function(){s.call(null,u,l)});case 4:return r.nextTick(function(){s.call(null,u,l,d)});default:for(c=new Array(f-1),_=0;_<c.length;)c[_++]=arguments[_];return r.nextTick(function(){s.apply(null,c)})}}}:i.exports=r}).call(this)}).call(this,t("_process"))},{_process:50}],50:[function(t,i,o){var r,s,u=i.exports={};function l(){throw new Error("setTimeout has not been defined")}function d(){throw new Error("clearTimeout has not been defined")}function c(y){if(r===setTimeout)return setTimeout(y,0);if((r===l||!r)&&setTimeout)return r=setTimeout,setTimeout(y,0);try{return r(y,0)}catch{try{return r.call(null,y,0)}catch{return r.call(this,y,0)}}}(function(){try{r=typeof setTimeout=="function"?setTimeout:l}catch{r=l}try{s=typeof clearTimeout=="function"?clearTimeout:d}catch{s=d}})();var _,f=[],p=!1,a=-1;function v(){p&&_&&(p=!1,_.length?f=_.concat(f):a=-1,f.length&&m())}function m(){if(!p){var y=c(v);p=!0;for(var S=f.length;S;){for(_=f,f=[];++a<S;)_&&_[a].run();a=-1,S=f.length}_=null,p=!1,function(C){if(s===clearTimeout)return clearTimeout(C);if((s===d||!s)&&clearTimeout)return s=clearTimeout,clearTimeout(C);try{s(C)}catch{try{return s.call(null,C)}catch{return s.call(this,C)}}}(y)}}function g(y,S){this.fun=y,this.array=S}function E(){}u.nextTick=function(y){var S=new Array(arguments.length-1);if(arguments.length>1)for(var C=1;C<arguments.length;C++)S[C-1]=arguments[C];f.push(new g(y,S)),f.length!==1||p||c(m)},g.prototype.run=function(){this.fun.apply(null,this.array)},u.title="browser",u.browser=!0,u.env={},u.argv=[],u.version="",u.versions={},u.on=E,u.addListener=E,u.once=E,u.off=E,u.removeListener=E,u.removeAllListeners=E,u.emit=E,u.prependListener=E,u.prependOnceListener=E,u.listeners=function(y){return[]},u.binding=function(y){throw new Error("process.binding is not supported")},u.cwd=function(){return"/"},u.chdir=function(y){throw new Error("process.chdir is not supported")},u.umask=function(){return 0}},{}],51:[function(t,i,o){(function(r){(function(){(function(s){var u=typeof o=="object"&&o&&!o.nodeType&&o,l=typeof i=="object"&&i&&!i.nodeType&&i,d=typeof r=="object"&&r;d.global!==d&&d.window!==d&&d.self!==d||(s=d);var c,_,f=2147483647,p=36,a=1,v=26,m=38,g=700,E=72,y=128,S="-",C=/^xn--/,T=/[^\x20-\x7E]/,R=/[\x2E\u3002\uFF0E\uFF61]/g,O={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},B=p-a,j=Math.floor,I=String.fromCharCode;function A(G){throw new RangeError(O[G])}function M(G,q){for(var Y=G.length,K=[];Y--;)K[Y]=q(G[Y]);return K}function w(G,q){var Y=G.split("@"),K="";return Y.length>1&&(K=Y[0]+"@",G=Y[1]),K+M((G=G.replace(R,".")).split("."),q).join(".")}function x(G){for(var q,Y,K=[],W=0,X=G.length;W<X;)(q=G.charCodeAt(W++))>=55296&&q<=56319&&W<X?(64512&(Y=G.charCodeAt(W++)))==56320?K.push(((1023&q)<<10)+(1023&Y)+65536):(K.push(q),W--):K.push(q);return K}function k(G){return M(G,function(q){var Y="";return q>65535&&(Y+=I((q-=65536)>>>10&1023|55296),q=56320|1023&q),Y+=I(q)}).join("")}function V(G,q){return G+22+75*(G<26)-((q!=0)<<5)}function L(G,q,Y){var K=0;for(G=Y?j(G/g):G>>1,G+=j(G/q);G>B*v>>1;K+=p)G=j(G/B);return j(K+(B+1)*G/(G+m))}function D(G){var q,Y,K,W,X,J,Z,b,N,U,z,$=[],Q=G.length,ee=0,oe=y,te=E;for((Y=G.lastIndexOf(S))<0&&(Y=0),K=0;K<Y;++K)G.charCodeAt(K)>=128&&A("not-basic"),$.push(G.charCodeAt(K));for(W=Y>0?Y+1:0;W<Q;){for(X=ee,J=1,Z=p;W>=Q&&A("invalid-input"),((b=(z=G.charCodeAt(W++))-48<10?z-22:z-65<26?z-65:z-97<26?z-97:p)>=p||b>j((f-ee)/J))&&A("overflow"),ee+=b*J,!(b<(N=Z<=te?a:Z>=te+v?v:Z-te));Z+=p)J>j(f/(U=p-N))&&A("overflow"),J*=U;te=L(ee-X,q=$.length+1,X==0),j(ee/q)>f-oe&&A("overflow"),oe+=j(ee/q),ee%=q,$.splice(ee++,0,oe)}return k($)}function F(G){var q,Y,K,W,X,J,Z,b,N,U,z,$,Q,ee,oe,te=[];for($=(G=x(G)).length,q=y,Y=0,X=E,J=0;J<$;++J)(z=G[J])<128&&te.push(I(z));for(K=W=te.length,W&&te.push(S);K<$;){for(Z=f,J=0;J<$;++J)(z=G[J])>=q&&z<Z&&(Z=z);for(Z-q>j((f-Y)/(Q=K+1))&&A("overflow"),Y+=(Z-q)*Q,q=Z,J=0;J<$;++J)if((z=G[J])<q&&++Y>f&&A("overflow"),z==q){for(b=Y,N=p;!(b<(U=N<=X?a:N>=X+v?v:N-X));N+=p)oe=b-U,ee=p-U,te.push(I(V(U+oe%ee,0))),b=j(oe/ee);te.push(I(V(b,0))),X=L(Y,Q,K==W),Y=0,++K}++Y,++q}return te.join("")}if(c={version:"1.4.1",ucs2:{decode:x,encode:k},decode:D,encode:F,toASCII:function(G){return w(G,function(q){return T.test(q)?"xn--"+F(q):q})},toUnicode:function(G){return w(G,function(q){return C.test(q)?D(q.slice(4).toLowerCase()):q})}},u&&l)if(i.exports==u)l.exports=c;else for(_ in c)c.hasOwnProperty(_)&&(u[_]=c[_]);else s.punycode=c})(this)}).call(this)}).call(this,typeof Cn<"u"?Cn:typeof self<"u"?self:typeof window<"u"?window:{})},{}],52:[function(t,i,o){function r(u,l){return Object.prototype.hasOwnProperty.call(u,l)}i.exports=function(u,l,d,c){l=l||"&",d=d||"=";var _={};if(typeof u!="string"||u.length===0)return _;var f=/\+/g;u=u.split(l);var p=1e3;c&&typeof c.maxKeys=="number"&&(p=c.maxKeys);var a=u.length;p>0&&a>p&&(a=p);for(var v=0;v<a;++v){var m,g,E,y,S=u[v].replace(f,"%20"),C=S.indexOf(d);C>=0?(m=S.substr(0,C),g=S.substr(C+1)):(m=S,g=""),E=decodeURIComponent(m),y=decodeURIComponent(g),r(_,E)?s(_[E])?_[E].push(y):_[E]=[_[E],y]:_[E]=y}return _};var s=Array.isArray||function(u){return Object.prototype.toString.call(u)==="[object Array]"}},{}],53:[function(t,i,o){var r=function(d){switch(typeof d){case"string":return d;case"boolean":return d?"true":"false";case"number":return isFinite(d)?d:"";default:return""}};i.exports=function(d,c,_,f){return c=c||"&",_=_||"=",d===null&&(d=void 0),typeof d=="object"?u(l(d),function(p){var a=encodeURIComponent(r(p))+_;return s(d[p])?u(d[p],function(v){return a+encodeURIComponent(r(v))}).join(c):a+encodeURIComponent(r(d[p]))}).join(c):f?encodeURIComponent(r(f))+_+encodeURIComponent(r(d)):""};var s=Array.isArray||function(d){return Object.prototype.toString.call(d)==="[object Array]"};function u(d,c){if(d.map)return d.map(c);for(var _=[],f=0;f<d.length;f++)_.push(c(d[f],f));return _}var l=Object.keys||function(d){var c=[];for(var _ in d)Object.prototype.hasOwnProperty.call(d,_)&&c.push(_);return c}},{}],54:[function(t,i,o){o.decode=o.parse=t("./decode"),o.encode=o.stringify=t("./encode")},{"./decode":52,"./encode":53}],55:[function(t,i,o){var r={};function s(l,d,c){c||(c=Error);var _=function(f){var p,a;function v(m,g,E){return f.call(this,function(y,S,C){return typeof d=="string"?d:d(y,S,C)}(m,g,E))||this}return a=f,(p=v).prototype=Object.create(a.prototype),p.prototype.constructor=p,p.__proto__=a,v}(c);_.prototype.name=c.name,_.prototype.code=l,r[l]=_}function u(l,d){if(Array.isArray(l)){var c=l.length;return l=l.map(function(_){return String(_)}),c>2?"one of ".concat(d," ").concat(l.slice(0,c-1).join(", "),", or ")+l[c-1]:c===2?"one of ".concat(d," ").concat(l[0]," or ").concat(l[1]):"of ".concat(d," ").concat(l[0])}return"of ".concat(d," ").concat(String(l))}s("ERR_INVALID_OPT_VALUE",function(l,d){return'The value "'+d+'" is invalid for option "'+l+'"'},TypeError),s("ERR_INVALID_ARG_TYPE",function(l,d,c){var _,f,p;if(typeof d=="string"&&(f="not ",d.substr(0,f.length)===f)?(_="must not be",d=d.replace(/^not /,"")):_="must be",function(v,m,g){return(g===void 0||g>v.length)&&(g=v.length),v.substring(g-m.length,g)===m}(l," argument"))p="The ".concat(l," ").concat(_," ").concat(u(d,"type"));else{var a=function(v,m,g){return typeof g!="number"&&(g=0),!(g+m.length>v.length)&&v.indexOf(m,g)!==-1}(l,".")?"property":"argument";p='The "'.concat(l,'" ').concat(a," ").concat(_," ").concat(u(d,"type"))}return p+=". Received type ".concat(typeof c)},TypeError),s("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),s("ERR_METHOD_NOT_IMPLEMENTED",function(l){return"The "+l+" method is not implemented"}),s("ERR_STREAM_PREMATURE_CLOSE","Premature close"),s("ERR_STREAM_DESTROYED",function(l){return"Cannot call "+l+" after a stream was destroyed"}),s("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),s("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),s("ERR_STREAM_WRITE_AFTER_END","write after end"),s("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),s("ERR_UNKNOWN_ENCODING",function(l){return"Unknown encoding: "+l},TypeError),s("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),i.exports.codes=r},{}],56:[function(t,i,o){(function(r){(function(){var s=Object.keys||function(v){var m=[];for(var g in v)m.push(g);return m};i.exports=f;var u=t("./_stream_readable"),l=t("./_stream_writable");t("inherits")(f,u);for(var d=s(l.prototype),c=0;c<d.length;c++){var _=d[c];f.prototype[_]||(f.prototype[_]=l.prototype[_])}function f(v){if(!(this instanceof f))return new f(v);u.call(this,v),l.call(this,v),this.allowHalfOpen=!0,v&&(v.readable===!1&&(this.readable=!1),v.writable===!1&&(this.writable=!1),v.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",p)))}function p(){this._writableState.ended||r.nextTick(a,this)}function a(v){v.end()}Object.defineProperty(f.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(f.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(f.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(f.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState!==void 0&&this._writableState!==void 0&&this._readableState.destroyed&&this._writableState.destroyed},set:function(v){this._readableState!==void 0&&this._writableState!==void 0&&(this._readableState.destroyed=v,this._writableState.destroyed=v)}})}).call(this)}).call(this,t("_process"))},{"./_stream_readable":58,"./_stream_writable":60,_process:50,inherits:24}],57:[function(t,i,o){i.exports=s;var r=t("./_stream_transform");function s(u){if(!(this instanceof s))return new s(u);r.call(this,u)}t("inherits")(s,r),s.prototype._transform=function(u,l,d){d(null,u)}},{"./_stream_transform":59,inherits:24}],58:[function(t,i,o){(function(r,s){(function(){var u;i.exports=A,A.ReadableState=I,t("events").EventEmitter;var l=function(b,N){return b.listeners(N).length},d=t("./internal/streams/stream"),c=t("buffer").Buffer,_=s.Uint8Array||function(){},f,p=t("util");f=p&&p.debuglog?p.debuglog("stream"):function(){};var a,v,m,g=t("./internal/streams/buffer_list"),E=t("./internal/streams/destroy"),y=t("./internal/streams/state").getHighWaterMark,S=t("../errors").codes,C=S.ERR_INVALID_ARG_TYPE,T=S.ERR_STREAM_PUSH_AFTER_EOF,R=S.ERR_METHOD_NOT_IMPLEMENTED,O=S.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;t("inherits")(A,d);var B=E.errorOrDestroy,j=["error","close","destroy","pause","resume"];function I(b,N,U){u=u||t("./_stream_duplex"),b=b||{},typeof U!="boolean"&&(U=N instanceof u),this.objectMode=!!b.objectMode,U&&(this.objectMode=this.objectMode||!!b.readableObjectMode),this.highWaterMark=y(this,b,"readableHighWaterMark",U),this.buffer=new g,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=b.emitClose!==!1,this.autoDestroy=!!b.autoDestroy,this.destroyed=!1,this.defaultEncoding=b.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,b.encoding&&(a||(a=t("string_decoder/").StringDecoder),this.decoder=new a(b.encoding),this.encoding=b.encoding)}function A(b){if(u=u||t("./_stream_duplex"),!(this instanceof A))return new A(b);var N=this instanceof u;this._readableState=new I(b,this,N),this.readable=!0,b&&(typeof b.read=="function"&&(this._read=b.read),typeof b.destroy=="function"&&(this._destroy=b.destroy)),d.call(this)}function M(b,N,U,z,$){f("readableAddChunk",N);var Q,ee=b._readableState;if(N===null)ee.reading=!1,function(oe,te){if(f("onEofChunk"),!te.ended){if(te.decoder){var ie=te.decoder.end();ie&&ie.length&&(te.buffer.push(ie),te.length+=te.objectMode?1:ie.length)}te.ended=!0,te.sync?V(oe):(te.needReadable=!1,te.emittedReadable||(te.emittedReadable=!0,L(oe)))}}(b,ee);else if($||(Q=function(oe,te){var ie;se=te,c.isBuffer(se)||se instanceof _||typeof te=="string"||te===void 0||oe.objectMode||(ie=new C("chunk",["string","Buffer","Uint8Array"],te));var se;return ie}(ee,N)),Q)B(b,Q);else if(ee.objectMode||N&&N.length>0)if(typeof N=="string"||ee.objectMode||Object.getPrototypeOf(N)===c.prototype||(N=function(oe){return c.from(oe)}(N)),z)ee.endEmitted?B(b,new O):w(b,ee,N,!0);else if(ee.ended)B(b,new T);else{if(ee.destroyed)return!1;ee.reading=!1,ee.decoder&&!U?(N=ee.decoder.write(N),ee.objectMode||N.length!==0?w(b,ee,N,!1):D(b,ee)):w(b,ee,N,!1)}else z||(ee.reading=!1,D(b,ee));return!ee.ended&&(ee.length<ee.highWaterMark||ee.length===0)}function w(b,N,U,z){N.flowing&&N.length===0&&!N.sync?(N.awaitDrain=0,b.emit("data",U)):(N.length+=N.objectMode?1:U.length,z?N.buffer.unshift(U):N.buffer.push(U),N.needReadable&&V(b)),D(b,N)}Object.defineProperty(A.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState!==void 0&&this._readableState.destroyed},set:function(b){this._readableState&&(this._readableState.destroyed=b)}}),A.prototype.destroy=E.destroy,A.prototype._undestroy=E.undestroy,A.prototype._destroy=function(b,N){N(b)},A.prototype.push=function(b,N){var U,z=this._readableState;return z.objectMode?U=!0:typeof b=="string"&&((N=N||z.defaultEncoding)!==z.encoding&&(b=c.from(b,N),N=""),U=!0),M(this,b,N,!1,U)},A.prototype.unshift=function(b){return M(this,b,null,!0,!1)},A.prototype.isPaused=function(){return this._readableState.flowing===!1},A.prototype.setEncoding=function(b){a||(a=t("string_decoder/").StringDecoder);var N=new a(b);this._readableState.decoder=N,this._readableState.encoding=this._readableState.decoder.encoding;for(var U=this._readableState.buffer.head,z="";U!==null;)z+=N.write(U.data),U=U.next;return this._readableState.buffer.clear(),z!==""&&this._readableState.buffer.push(z),this._readableState.length=z.length,this};var x=1073741824;function k(b,N){return b<=0||N.length===0&&N.ended?0:N.objectMode?1:b!=b?N.flowing&&N.length?N.buffer.head.data.length:N.length:(b>N.highWaterMark&&(N.highWaterMark=function(U){return U>=x?U=x:(U--,U|=U>>>1,U|=U>>>2,U|=U>>>4,U|=U>>>8,U|=U>>>16,U++),U}(b)),b<=N.length?b:N.ended?N.length:(N.needReadable=!0,0))}function V(b){var N=b._readableState;f("emitReadable",N.needReadable,N.emittedReadable),N.needReadable=!1,N.emittedReadable||(f("emitReadable",N.flowing),N.emittedReadable=!0,r.nextTick(L,b))}function L(b){var N=b._readableState;f("emitReadable_",N.destroyed,N.length,N.ended),N.destroyed||!N.length&&!N.ended||(b.emit("readable"),N.emittedReadable=!1),N.needReadable=!N.flowing&&!N.ended&&N.length<=N.highWaterMark,K(b)}function D(b,N){N.readingMore||(N.readingMore=!0,r.nextTick(F,b,N))}function F(b,N){for(;!N.reading&&!N.ended&&(N.length<N.highWaterMark||N.flowing&&N.length===0);){var U=N.length;if(f("maybeReadMore read 0"),b.read(0),U===N.length)break}N.readingMore=!1}function G(b){var N=b._readableState;N.readableListening=b.listenerCount("readable")>0,N.resumeScheduled&&!N.paused?N.flowing=!0:b.listenerCount("data")>0&&b.resume()}function q(b){f("readable nexttick read 0"),b.read(0)}function Y(b,N){f("resume",N.reading),N.reading||b.read(0),N.resumeScheduled=!1,b.emit("resume"),K(b),N.flowing&&!N.reading&&b.read(0)}function K(b){var N=b._readableState;for(f("flow",N.flowing);N.flowing&&b.read()!==null;);}function W(b,N){return N.length===0?null:(N.objectMode?U=N.buffer.shift():!b||b>=N.length?(U=N.decoder?N.buffer.join(""):N.buffer.length===1?N.buffer.first():N.buffer.concat(N.length),N.buffer.clear()):U=N.buffer.consume(b,N.decoder),U);var U}function X(b){var N=b._readableState;f("endReadable",N.endEmitted),N.endEmitted||(N.ended=!0,r.nextTick(J,N,b))}function J(b,N){if(f("endReadableNT",b.endEmitted,b.length),!b.endEmitted&&b.length===0&&(b.endEmitted=!0,N.readable=!1,N.emit("end"),b.autoDestroy)){var U=N._writableState;(!U||U.autoDestroy&&U.finished)&&N.destroy()}}function Z(b,N){for(var U=0,z=b.length;U<z;U++)if(b[U]===N)return U;return-1}A.prototype.read=function(b){f("read",b),b=parseInt(b,10);var N=this._readableState,U=b;if(b!==0&&(N.emittedReadable=!1),b===0&&N.needReadable&&((N.highWaterMark!==0?N.length>=N.highWaterMark:N.length>0)||N.ended))return f("read: emitReadable",N.length,N.ended),N.length===0&&N.ended?X(this):V(this),null;if((b=k(b,N))===0&&N.ended)return N.length===0&&X(this),null;var z,$=N.needReadable;return f("need readable",$),(N.length===0||N.length-b<N.highWaterMark)&&f("length less than watermark",$=!0),N.ended||N.reading?f("reading or ended",$=!1):$&&(f("do read"),N.reading=!0,N.sync=!0,N.length===0&&(N.needReadable=!0),this._read(N.highWaterMark),N.sync=!1,N.reading||(b=k(U,N))),(z=b>0?W(b,N):null)===null?(N.needReadable=N.length<=N.highWaterMark,b=0):(N.length-=b,N.awaitDrain=0),N.length===0&&(N.ended||(N.needReadable=!0),U!==b&&N.ended&&X(this)),z!==null&&this.emit("data",z),z},A.prototype._read=function(b){B(this,new R("_read()"))},A.prototype.pipe=function(b,N){var U=this,z=this._readableState;switch(z.pipesCount){case 0:z.pipes=b;break;case 1:z.pipes=[z.pipes,b];break;default:z.pipes.push(b)}z.pipesCount+=1,f("pipe count=%d opts=%j",z.pipesCount,N);var $=(!N||N.end!==!1)&&b!==r.stdout&&b!==r.stderr?ee:ve;function Q(de,ae){f("onunpipe"),de===U&&ae&&ae.hasUnpiped===!1&&(ae.hasUnpiped=!0,f("cleanup"),b.removeListener("close",fe),b.removeListener("finish",pe),b.removeListener("drain",oe),b.removeListener("error",se),b.removeListener("unpipe",Q),U.removeListener("end",ee),U.removeListener("end",ve),U.removeListener("data",ie),te=!0,!z.awaitDrain||b._writableState&&!b._writableState.needDrain||oe())}function ee(){f("onend"),b.end()}z.endEmitted?r.nextTick($):U.once("end",$),b.on("unpipe",Q);var oe=function(de){return function(){var ae=de._readableState;f("pipeOnDrain",ae.awaitDrain),ae.awaitDrain&&ae.awaitDrain--,ae.awaitDrain===0&&l(de,"data")&&(ae.flowing=!0,K(de))}}(U);b.on("drain",oe);var te=!1;function ie(de){f("ondata");var ae=b.write(de);f("dest.write",ae),ae===!1&&((z.pipesCount===1&&z.pipes===b||z.pipesCount>1&&Z(z.pipes,b)!==-1)&&!te&&(f("false write response, pause",z.awaitDrain),z.awaitDrain++),U.pause())}function se(de){f("onerror",de),ve(),b.removeListener("error",se),l(b,"error")===0&&B(b,de)}function fe(){b.removeListener("finish",pe),ve()}function pe(){f("onfinish"),b.removeListener("close",fe),ve()}function ve(){f("unpipe"),U.unpipe(b)}return U.on("data",ie),function(de,ae,ge){if(typeof de.prependListener=="function")return de.prependListener(ae,ge);de._events&&de._events[ae]?Array.isArray(de._events[ae])?de._events[ae].unshift(ge):de._events[ae]=[ge,de._events[ae]]:de.on(ae,ge)}(b,"error",se),b.once("close",fe),b.once("finish",pe),b.emit("pipe",U),z.flowing||(f("pipe resume"),U.resume()),b},A.prototype.unpipe=function(b){var N=this._readableState,U={hasUnpiped:!1};if(N.pipesCount===0)return this;if(N.pipesCount===1)return b&&b!==N.pipes?this:(b||(b=N.pipes),N.pipes=null,N.pipesCount=0,N.flowing=!1,b&&b.emit("unpipe",this,U),this);if(!b){var z=N.pipes,$=N.pipesCount;N.pipes=null,N.pipesCount=0,N.flowing=!1;for(var Q=0;Q<$;Q++)z[Q].emit("unpipe",this,{hasUnpiped:!1});return this}var ee=Z(N.pipes,b);return ee===-1?this:(N.pipes.splice(ee,1),N.pipesCount-=1,N.pipesCount===1&&(N.pipes=N.pipes[0]),b.emit("unpipe",this,U),this)},A.prototype.on=function(b,N){var U=d.prototype.on.call(this,b,N),z=this._readableState;return b==="data"?(z.readableListening=this.listenerCount("readable")>0,z.flowing!==!1&&this.resume()):b==="readable"&&(z.endEmitted||z.readableListening||(z.readableListening=z.needReadable=!0,z.flowing=!1,z.emittedReadable=!1,f("on readable",z.length,z.reading),z.length?V(this):z.reading||r.nextTick(q,this))),U},A.prototype.addListener=A.prototype.on,A.prototype.removeListener=function(b,N){var U=d.prototype.removeListener.call(this,b,N);return b==="readable"&&r.nextTick(G,this),U},A.prototype.removeAllListeners=function(b){var N=d.prototype.removeAllListeners.apply(this,arguments);return b!=="readable"&&b!==void 0||r.nextTick(G,this),N},A.prototype.resume=function(){var b=this._readableState;return b.flowing||(f("resume"),b.flowing=!b.readableListening,function(N,U){U.resumeScheduled||(U.resumeScheduled=!0,r.nextTick(Y,N,U))}(this,b)),b.paused=!1,this},A.prototype.pause=function(){return f("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(f("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},A.prototype.wrap=function(b){var N=this,U=this._readableState,z=!1;for(var $ in b.on("end",function(){if(f("wrapped end"),U.decoder&&!U.ended){var ee=U.decoder.end();ee&&ee.length&&N.push(ee)}N.push(null)}),b.on("data",function(ee){f("wrapped data"),U.decoder&&(ee=U.decoder.write(ee)),(!U.objectMode||ee!=null)&&(U.objectMode||ee&&ee.length)&&(N.push(ee)||(z=!0,b.pause()))}),b)this[$]===void 0&&typeof b[$]=="function"&&(this[$]=function(ee){return function(){return b[ee].apply(b,arguments)}}($));for(var Q=0;Q<j.length;Q++)b.on(j[Q],this.emit.bind(this,j[Q]));return this._read=function(ee){f("wrapped _read",ee),z&&(z=!1,b.resume())},this},typeof Symbol=="function"&&(A.prototype[Symbol.asyncIterator]=function(){return v===void 0&&(v=t("./internal/streams/async_iterator")),v(this)}),Object.defineProperty(A.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(A.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(A.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(b){this._readableState&&(this._readableState.flowing=b)}}),A._fromList=W,Object.defineProperty(A.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),typeof Symbol=="function"&&(A.from=function(b,N){return m===void 0&&(m=t("./internal/streams/from")),m(A,b,N)})}).call(this)}).call(this,t("_process"),typeof Cn<"u"?Cn:typeof self<"u"?self:typeof window<"u"?window:{})},{"../errors":55,"./_stream_duplex":56,"./internal/streams/async_iterator":61,"./internal/streams/buffer_list":62,"./internal/streams/destroy":63,"./internal/streams/from":65,"./internal/streams/state":67,"./internal/streams/stream":68,_process:50,buffer:17,events:22,inherits:24,"string_decoder/":75,util:16}],59:[function(t,i,o){i.exports=_;var r=t("../errors").codes,s=r.ERR_METHOD_NOT_IMPLEMENTED,u=r.ERR_MULTIPLE_CALLBACK,l=r.ERR_TRANSFORM_ALREADY_TRANSFORMING,d=r.ERR_TRANSFORM_WITH_LENGTH_0,c=t("./_stream_duplex");function _(a){if(!(this instanceof _))return new _(a);c.call(this,a),this._transformState={afterTransform:(function(v,m){var g=this._transformState;g.transforming=!1;var E=g.writecb;if(E===null)return this.emit("error",new u);g.writechunk=null,g.writecb=null,m!=null&&this.push(m),E(v);var y=this._readableState;y.reading=!1,(y.needReadable||y.length<y.highWaterMark)&&this._read(y.highWaterMark)}).bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,a&&(typeof a.transform=="function"&&(this._transform=a.transform),typeof a.flush=="function"&&(this._flush=a.flush)),this.on("prefinish",f)}function f(){var a=this;typeof this._flush!="function"||this._readableState.destroyed?p(this,null,null):this._flush(function(v,m){p(a,v,m)})}function p(a,v,m){if(v)return a.emit("error",v);if(m!=null&&a.push(m),a._writableState.length)throw new d;if(a._transformState.transforming)throw new l;return a.push(null)}t("inherits")(_,c),_.prototype.push=function(a,v){return this._transformState.needTransform=!1,c.prototype.push.call(this,a,v)},_.prototype._transform=function(a,v,m){m(new s("_transform()"))},_.prototype._write=function(a,v,m){var g=this._transformState;if(g.writecb=m,g.writechunk=a,g.writeencoding=v,!g.transforming){var E=this._readableState;(g.needTransform||E.needReadable||E.length<E.highWaterMark)&&this._read(E.highWaterMark)}},_.prototype._read=function(a){var v=this._transformState;v.writechunk===null||v.transforming?v.needTransform=!0:(v.transforming=!0,this._transform(v.writechunk,v.writeencoding,v.afterTransform))},_.prototype._destroy=function(a,v){c.prototype._destroy.call(this,a,function(m){v(m)})}},{"../errors":55,"./_stream_duplex":56,inherits:24}],60:[function(t,i,o){(function(r,s){(function(){function u(D){var F=this;this.next=null,this.entry=null,this.finish=function(){(function(G,q,Y){var K=G.entry;for(G.entry=null;K;){var W=K.callback;q.pendingcb--,W(Y),K=K.next}q.corkedRequestsFree.next=G})(F,D)}}var l;i.exports=A,A.WritableState=I;var d={deprecate:t("util-deprecate")},c=t("./internal/streams/stream"),_=t("buffer").Buffer,f=s.Uint8Array||function(){},p,a=t("./internal/streams/destroy"),v=t("./internal/streams/state").getHighWaterMark,m=t("../errors").codes,g=m.ERR_INVALID_ARG_TYPE,E=m.ERR_METHOD_NOT_IMPLEMENTED,y=m.ERR_MULTIPLE_CALLBACK,S=m.ERR_STREAM_CANNOT_PIPE,C=m.ERR_STREAM_DESTROYED,T=m.ERR_STREAM_NULL_VALUES,R=m.ERR_STREAM_WRITE_AFTER_END,O=m.ERR_UNKNOWN_ENCODING,B=a.errorOrDestroy;function j(){}function I(D,F,G){l=l||t("./_stream_duplex"),D=D||{},typeof G!="boolean"&&(G=F instanceof l),this.objectMode=!!D.objectMode,G&&(this.objectMode=this.objectMode||!!D.writableObjectMode),this.highWaterMark=v(this,D,"writableHighWaterMark",G),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var q=D.decodeStrings===!1;this.decodeStrings=!q,this.defaultEncoding=D.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(Y){(function(K,W){var X=K._writableState,J=X.sync,Z=X.writecb;if(typeof Z!="function")throw new y;if(function(N){N.writing=!1,N.writecb=null,N.length-=N.writelen,N.writelen=0}(X),W)(function(N,U,z,$,Q){--U.pendingcb,z?(r.nextTick(Q,$),r.nextTick(L,N,U),N._writableState.errorEmitted=!0,B(N,$)):(Q($),N._writableState.errorEmitted=!0,B(N,$),L(N,U))})(K,X,J,W,Z);else{var b=k(X)||K.destroyed;b||X.corked||X.bufferProcessing||!X.bufferedRequest||x(K,X),J?r.nextTick(w,K,X,b,Z):w(K,X,b,Z)}})(F,Y)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=D.emitClose!==!1,this.autoDestroy=!!D.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new u(this)}function A(D){var F=this instanceof(l=l||t("./_stream_duplex"));if(!F&&!p.call(A,this))return new A(D);this._writableState=new I(D,this,F),this.writable=!0,D&&(typeof D.write=="function"&&(this._write=D.write),typeof D.writev=="function"&&(this._writev=D.writev),typeof D.destroy=="function"&&(this._destroy=D.destroy),typeof D.final=="function"&&(this._final=D.final)),c.call(this)}function M(D,F,G,q,Y,K,W){F.writelen=q,F.writecb=W,F.writing=!0,F.sync=!0,F.destroyed?F.onwrite(new C("write")):G?D._writev(Y,F.onwrite):D._write(Y,K,F.onwrite),F.sync=!1}function w(D,F,G,q){G||function(Y,K){K.length===0&&K.needDrain&&(K.needDrain=!1,Y.emit("drain"))}(D,F),F.pendingcb--,q(),L(D,F)}function x(D,F){F.bufferProcessing=!0;var G=F.bufferedRequest;if(D._writev&&G&&G.next){var q=F.bufferedRequestCount,Y=new Array(q),K=F.corkedRequestsFree;K.entry=G;for(var W=0,X=!0;G;)Y[W]=G,G.isBuf||(X=!1),G=G.next,W+=1;Y.allBuffers=X,M(D,F,!0,F.length,Y,"",K.finish),F.pendingcb++,F.lastBufferedRequest=null,K.next?(F.corkedRequestsFree=K.next,K.next=null):F.corkedRequestsFree=new u(F),F.bufferedRequestCount=0}else{for(;G;){var J=G.chunk,Z=G.encoding,b=G.callback;if(M(D,F,!1,F.objectMode?1:J.length,J,Z,b),G=G.next,F.bufferedRequestCount--,F.writing)break}G===null&&(F.lastBufferedRequest=null)}F.bufferedRequest=G,F.bufferProcessing=!1}function k(D){return D.ending&&D.length===0&&D.bufferedRequest===null&&!D.finished&&!D.writing}function V(D,F){D._final(function(G){F.pendingcb--,G&&B(D,G),F.prefinished=!0,D.emit("prefinish"),L(D,F)})}function L(D,F){var G=k(F);if(G&&(function(Y,K){K.prefinished||K.finalCalled||(typeof Y._final!="function"||K.destroyed?(K.prefinished=!0,Y.emit("prefinish")):(K.pendingcb++,K.finalCalled=!0,r.nextTick(V,Y,K)))}(D,F),F.pendingcb===0&&(F.finished=!0,D.emit("finish"),F.autoDestroy))){var q=D._readableState;(!q||q.autoDestroy&&q.endEmitted)&&D.destroy()}return G}t("inherits")(A,c),I.prototype.getBuffer=function(){for(var D=this.bufferedRequest,F=[];D;)F.push(D),D=D.next;return F},function(){try{Object.defineProperty(I.prototype,"buffer",{get:d.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}(),typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(p=Function.prototype[Symbol.hasInstance],Object.defineProperty(A,Symbol.hasInstance,{value:function(D){return!!p.call(this,D)||this===A&&D&&D._writableState instanceof I}})):p=function(D){return D instanceof this},A.prototype.pipe=function(){B(this,new S)},A.prototype.write=function(D,F,G){var q,Y=this._writableState,K=!1,W=!Y.objectMode&&(q=D,_.isBuffer(q)||q instanceof f);return W&&!_.isBuffer(D)&&(D=function(X){return _.from(X)}(D)),typeof F=="function"&&(G=F,F=null),W?F="buffer":F||(F=Y.defaultEncoding),typeof G!="function"&&(G=j),Y.ending?function(X,J){var Z=new R;B(X,Z),r.nextTick(J,Z)}(this,G):(W||function(X,J,Z,b){var N;return Z===null?N=new T:typeof Z=="string"||J.objectMode||(N=new g("chunk",["string","Buffer"],Z)),!N||(B(X,N),r.nextTick(b,N),!1)}(this,Y,D,G))&&(Y.pendingcb++,K=function(X,J,Z,b,N,U){if(!Z){var z=function(oe,te,ie){return oe.objectMode||oe.decodeStrings===!1||typeof te!="string"||(te=_.from(te,ie)),te}(J,b,N);b!==z&&(Z=!0,N="buffer",b=z)}var $=J.objectMode?1:b.length;J.length+=$;var Q=J.length<J.highWaterMark;if(Q||(J.needDrain=!0),J.writing||J.corked){var ee=J.lastBufferedRequest;J.lastBufferedRequest={chunk:b,encoding:N,isBuf:Z,callback:U,next:null},ee?ee.next=J.lastBufferedRequest:J.bufferedRequest=J.lastBufferedRequest,J.bufferedRequestCount+=1}else M(X,J,!1,$,b,N,U);return Q}(this,Y,W,D,F,G)),K},A.prototype.cork=function(){this._writableState.corked++},A.prototype.uncork=function(){var D=this._writableState;D.corked&&(D.corked--,D.writing||D.corked||D.bufferProcessing||!D.bufferedRequest||x(this,D))},A.prototype.setDefaultEncoding=function(D){if(typeof D=="string"&&(D=D.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((D+"").toLowerCase())>-1))throw new O(D);return this._writableState.defaultEncoding=D,this},Object.defineProperty(A.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(A.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),A.prototype._write=function(D,F,G){G(new E("_write()"))},A.prototype._writev=null,A.prototype.end=function(D,F,G){var q=this._writableState;return typeof D=="function"?(G=D,D=null,F=null):typeof F=="function"&&(G=F,F=null),D!=null&&this.write(D,F),q.corked&&(q.corked=1,this.uncork()),q.ending||function(Y,K,W){K.ending=!0,L(Y,K),W&&(K.finished?r.nextTick(W):Y.once("finish",W)),K.ended=!0,Y.writable=!1}(this,q,G),this},Object.defineProperty(A.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(A.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState!==void 0&&this._writableState.destroyed},set:function(D){this._writableState&&(this._writableState.destroyed=D)}}),A.prototype.destroy=a.destroy,A.prototype._undestroy=a.undestroy,A.prototype._destroy=function(D,F){F(D)}}).call(this)}).call(this,t("_process"),typeof Cn<"u"?Cn:typeof self<"u"?self:typeof window<"u"?window:{})},{"../errors":55,"./_stream_duplex":56,"./internal/streams/destroy":63,"./internal/streams/state":67,"./internal/streams/stream":68,_process:50,buffer:17,inherits:24,"util-deprecate":78}],61:[function(t,i,o){(function(r){(function(){var s;function u(S,C,T){return C in S?Object.defineProperty(S,C,{value:T,enumerable:!0,configurable:!0,writable:!0}):S[C]=T,S}var l=t("./end-of-stream"),d=Symbol("lastResolve"),c=Symbol("lastReject"),_=Symbol("error"),f=Symbol("ended"),p=Symbol("lastPromise"),a=Symbol("handlePromise"),v=Symbol("stream");function m(S,C){return{value:S,done:C}}function g(S){var C=S[d];if(C!==null){var T=S[v].read();T!==null&&(S[p]=null,S[d]=null,S[c]=null,C(m(T,!1)))}}var E=Object.getPrototypeOf(function(){}),y=Object.setPrototypeOf((u(s={get stream(){return this[v]},next:function(){var S=this,C=this[_];if(C!==null)return Promise.reject(C);if(this[f])return Promise.resolve(m(void 0,!0));if(this[v].destroyed)return new Promise(function(B,j){r.nextTick(function(){S[_]?j(S[_]):B(m(void 0,!0))})});var T,R=this[p];if(R)T=new Promise(function(B,j){return function(I,A){B.then(function(){j[f]?I(m(void 0,!0)):j[a](I,A)},A)}}(R,this));else{var O=this[v].read();if(O!==null)return Promise.resolve(m(O,!1));T=new Promise(this[a])}return this[p]=T,T}},Symbol.asyncIterator,function(){return this}),u(s,"return",function(){var S=this;return new Promise(function(C,T){S[v].destroy(null,function(R){R?T(R):C(m(void 0,!0))})})}),s),E);i.exports=function(S){var C,T=Object.create(y,(u(C={},v,{value:S,writable:!0}),u(C,d,{value:null,writable:!0}),u(C,c,{value:null,writable:!0}),u(C,_,{value:null,writable:!0}),u(C,f,{value:S._readableState.endEmitted,writable:!0}),u(C,a,{value:function(R,O){var B=T[v].read();B?(T[p]=null,T[d]=null,T[c]=null,R(m(B,!1))):(T[d]=R,T[c]=O)},writable:!0}),C));return T[p]=null,l(S,function(R){if(R&&R.code!=="ERR_STREAM_PREMATURE_CLOSE"){var O=T[c];return O!==null&&(T[p]=null,T[d]=null,T[c]=null,O(R)),void(T[_]=R)}var B=T[d];B!==null&&(T[p]=null,T[d]=null,T[c]=null,B(m(void 0,!0))),T[f]=!0}),S.on("readable",(function(R){r.nextTick(g,R)}).bind(null,T)),T}}).call(this)}).call(this,t("_process"))},{"./end-of-stream":64,_process:50}],62:[function(t,i,o){function r(_,f){var p=Object.keys(_);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(_);f&&(a=a.filter(function(v){return Object.getOwnPropertyDescriptor(_,v).enumerable})),p.push.apply(p,a)}return p}function s(_,f,p){return f in _?Object.defineProperty(_,f,{value:p,enumerable:!0,configurable:!0,writable:!0}):_[f]=p,_}function u(_,f){for(var p=0;p<f.length;p++){var a=f[p];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(_,a.key,a)}}var l=t("buffer").Buffer,d=t("util").inspect,c=d&&d.custom||"inspect";i.exports=function(){function _(){(function(a,v){if(!(a instanceof v))throw new TypeError("Cannot call a class as a function")})(this,_),this.head=null,this.tail=null,this.length=0}var f,p;return f=_,(p=[{key:"push",value:function(a){var v={data:a,next:null};this.length>0?this.tail.next=v:this.head=v,this.tail=v,++this.length}},{key:"unshift",value:function(a){var v={data:a,next:this.head};this.length===0&&(this.tail=v),this.head=v,++this.length}},{key:"shift",value:function(){if(this.length!==0){var a=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,a}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(a){if(this.length===0)return"";for(var v=this.head,m=""+v.data;v=v.next;)m+=a+v.data;return m}},{key:"concat",value:function(a){if(this.length===0)return l.alloc(0);for(var v,m,g,E=l.allocUnsafe(a>>>0),y=this.head,S=0;y;)v=y.data,m=E,g=S,l.prototype.copy.call(v,m,g),S+=y.data.length,y=y.next;return E}},{key:"consume",value:function(a,v){var m;return a<this.head.data.length?(m=this.head.data.slice(0,a),this.head.data=this.head.data.slice(a)):m=a===this.head.data.length?this.shift():v?this._getString(a):this._getBuffer(a),m}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(a){var v=this.head,m=1,g=v.data;for(a-=g.length;v=v.next;){var E=v.data,y=a>E.length?E.length:a;if(y===E.length?g+=E:g+=E.slice(0,a),(a-=y)===0){y===E.length?(++m,v.next?this.head=v.next:this.head=this.tail=null):(this.head=v,v.data=E.slice(y));break}++m}return this.length-=m,g}},{key:"_getBuffer",value:function(a){var v=l.allocUnsafe(a),m=this.head,g=1;for(m.data.copy(v),a-=m.data.length;m=m.next;){var E=m.data,y=a>E.length?E.length:a;if(E.copy(v,v.length-a,0,y),(a-=y)===0){y===E.length?(++g,m.next?this.head=m.next:this.head=this.tail=null):(this.head=m,m.data=E.slice(y));break}++g}return this.length-=g,v}},{key:c,value:function(a,v){return d(this,function(m){for(var g=1;g<arguments.length;g++){var E=arguments[g]!=null?arguments[g]:{};g%2?r(Object(E),!0).forEach(function(y){s(m,y,E[y])}):Object.getOwnPropertyDescriptors?Object.defineProperties(m,Object.getOwnPropertyDescriptors(E)):r(Object(E)).forEach(function(y){Object.defineProperty(m,y,Object.getOwnPropertyDescriptor(E,y))})}return m}({},v,{depth:0,customInspect:!1}))}}])&&u(f.prototype,p),_}()},{buffer:17,util:16}],63:[function(t,i,o){(function(r){(function(){function s(d,c){l(d,c),u(d)}function u(d){d._writableState&&!d._writableState.emitClose||d._readableState&&!d._readableState.emitClose||d.emit("close")}function l(d,c){d.emit("error",c)}i.exports={destroy:function(d,c){var _=this,f=this._readableState&&this._readableState.destroyed,p=this._writableState&&this._writableState.destroyed;return f||p?(c?c(d):d&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,r.nextTick(l,this,d)):r.nextTick(l,this,d)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(d||null,function(a){!c&&a?_._writableState?_._writableState.errorEmitted?r.nextTick(u,_):(_._writableState.errorEmitted=!0,r.nextTick(s,_,a)):r.nextTick(s,_,a):c?(r.nextTick(u,_),c(a)):r.nextTick(u,_)}),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(d,c){var _=d._readableState,f=d._writableState;_&&_.autoDestroy||f&&f.autoDestroy?d.destroy(c):d.emit("error",c)}}}).call(this)}).call(this,t("_process"))},{_process:50}],64:[function(t,i,o){var r=t("../../../errors").codes.ERR_STREAM_PREMATURE_CLOSE;function s(){}i.exports=function u(l,d,c){if(typeof d=="function")return u(l,null,d);d||(d={}),c=function(C){var T=!1;return function(){if(!T){T=!0;for(var R=arguments.length,O=new Array(R),B=0;B<R;B++)O[B]=arguments[B];C.apply(this,O)}}}(c||s);var _=d.readable||d.readable!==!1&&l.readable,f=d.writable||d.writable!==!1&&l.writable,p=function(){l.writable||v()},a=l._writableState&&l._writableState.finished,v=function(){f=!1,a=!0,_||c.call(l)},m=l._readableState&&l._readableState.endEmitted,g=function(){_=!1,m=!0,f||c.call(l)},E=function(C){c.call(l,C)},y=function(){var C;return _&&!m?(l._readableState&&l._readableState.ended||(C=new r),c.call(l,C)):f&&!a?(l._writableState&&l._writableState.ended||(C=new r),c.call(l,C)):void 0},S=function(){l.req.on("finish",v)};return function(C){return C.setHeader&&typeof C.abort=="function"}(l)?(l.on("complete",v),l.on("abort",y),l.req?S():l.on("request",S)):f&&!l._writableState&&(l.on("end",p),l.on("close",p)),l.on("end",g),l.on("finish",v),d.error!==!1&&l.on("error",E),l.on("close",y),function(){l.removeListener("complete",v),l.removeListener("abort",y),l.removeListener("request",S),l.req&&l.req.removeListener("finish",v),l.removeListener("end",p),l.removeListener("close",p),l.removeListener("finish",v),l.removeListener("end",g),l.removeListener("error",E),l.removeListener("close",y)}}},{"../../../errors":55}],65:[function(t,i,o){i.exports=function(){throw new Error("Readable.from is not available in the browser")}},{}],66:[function(t,i,o){var r,s=t("../../../errors").codes,u=s.ERR_MISSING_ARGS,l=s.ERR_STREAM_DESTROYED;function d(f){if(f)throw f}function c(f){f()}function _(f,p){return f.pipe(p)}i.exports=function(){for(var f=arguments.length,p=new Array(f),a=0;a<f;a++)p[a]=arguments[a];var v,m=function(E){return E.length?typeof E[E.length-1]!="function"?d:E.pop():d}(p);if(Array.isArray(p[0])&&(p=p[0]),p.length<2)throw new u("streams");var g=p.map(function(E,y){var S=y<p.length-1;return function(C,T,R,O){O=function(I){var A=!1;return function(){A||(A=!0,I.apply(void 0,arguments))}}(O);var B=!1;C.on("close",function(){B=!0}),r===void 0&&(r=t("./end-of-stream")),r(C,{readable:T,writable:R},function(I){if(I)return O(I);B=!0,O()});var j=!1;return function(I){if(!B&&!j)return j=!0,function(A){return A.setHeader&&typeof A.abort=="function"}(C)?C.abort():typeof C.destroy=="function"?C.destroy():void O(I||new l("pipe"))}}(E,S,y>0,function(C){v||(v=C),C&&g.forEach(c),S||(g.forEach(c),m(v))})});return p.reduce(_)}},{"../../../errors":55,"./end-of-stream":64}],67:[function(t,i,o){var r=t("../../../errors").codes.ERR_INVALID_OPT_VALUE;i.exports={getHighWaterMark:function(s,u,l,d){var c=function(_,f,p){return _.highWaterMark!=null?_.highWaterMark:f?_[p]:null}(u,d,l);if(c!=null){if(!isFinite(c)||Math.floor(c)!==c||c<0)throw new r(d?l:"highWaterMark",c);return Math.floor(c)}return s.objectMode?16:16384}}},{"../../../errors":55}],68:[function(t,i,o){i.exports=t("events").EventEmitter},{events:22}],69:[function(t,i,o){(o=i.exports=t("./lib/_stream_readable.js")).Stream=o,o.Readable=o,o.Writable=t("./lib/_stream_writable.js"),o.Duplex=t("./lib/_stream_duplex.js"),o.Transform=t("./lib/_stream_transform.js"),o.PassThrough=t("./lib/_stream_passthrough.js"),o.finished=t("./lib/internal/streams/end-of-stream.js"),o.pipeline=t("./lib/internal/streams/pipeline.js")},{"./lib/_stream_duplex.js":56,"./lib/_stream_passthrough.js":57,"./lib/_stream_readable.js":58,"./lib/_stream_transform.js":59,"./lib/_stream_writable.js":60,"./lib/internal/streams/end-of-stream.js":64,"./lib/internal/streams/pipeline.js":66}],70:[function(t,i,o){i.exports=function(){if(typeof arguments[0]!="function")throw new Error("callback needed");if(typeof arguments[1]!="number")throw new Error("interval needed");var r;if(arguments.length>0){r=new Array(arguments.length-2);for(var s=0;s<r.length;s++)r[s]=arguments[s+2]}return new function(u,l,d){var c=this;this._callback=u,this._args=d,this._interval=setInterval(u,l,this._args),this.reschedule=function(_){_||(_=c._interval),c._interval&&clearInterval(c._interval),c._interval=setInterval(c._callback,_,c._args)},this.clear=function(){c._interval&&(clearInterval(c._interval),c._interval=void 0)},this.destroy=function(){c._interval&&clearInterval(c._interval),c._callback=void 0,c._interval=void 0,c._args=void 0}}(arguments[0],arguments[1],r)}},{}],71:[function(t,i,o){i.exports=t("./index.js")()},{"./index.js":72}],72:[function(t,i,o){(function(r){(function(){function s(u){return u instanceof r?r.from(u):new u.constructor(u.buffer.slice(),u.byteOffset,u.length)}i.exports=function(u){return(u=u||{}).circles?function(d){var c=[],_=[];return d.proto?function p(a){if(typeof a!="object"||a===null)return a;if(a instanceof Date)return new Date(a);if(Array.isArray(a))return f(a,p);if(a instanceof Map)return new Map(f(Array.from(a),p));if(a instanceof Set)return new Set(f(Array.from(a),p));var v={};for(var m in c.push(a),_.push(v),a){var g=a[m];if(typeof g!="object"||g===null)v[m]=g;else if(g instanceof Date)v[m]=new Date(g);else if(g instanceof Map)v[m]=new Map(f(Array.from(g),p));else if(g instanceof Set)v[m]=new Set(f(Array.from(g),p));else if(ArrayBuffer.isView(g))v[m]=s(g);else{var E=c.indexOf(g);v[m]=E!==-1?_[E]:p(g)}}return c.pop(),_.pop(),v}:function p(a){if(typeof a!="object"||a===null)return a;if(a instanceof Date)return new Date(a);if(Array.isArray(a))return f(a,p);if(a instanceof Map)return new Map(f(Array.from(a),p));if(a instanceof Set)return new Set(f(Array.from(a),p));var v={};for(var m in c.push(a),_.push(v),a)if(Object.hasOwnProperty.call(a,m)!==!1){var g=a[m];if(typeof g!="object"||g===null)v[m]=g;else if(g instanceof Date)v[m]=new Date(g);else if(g instanceof Map)v[m]=new Map(f(Array.from(g),p));else if(g instanceof Set)v[m]=new Set(f(Array.from(g),p));else if(ArrayBuffer.isView(g))v[m]=s(g);else{var E=c.indexOf(g);v[m]=E!==-1?_[E]:p(g)}}return c.pop(),_.pop(),v};function f(p,a){for(var v=Object.keys(p),m=new Array(v.length),g=0;g<v.length;g++){var E=v[g],y=p[E];if(typeof y!="object"||y===null)m[E]=y;else if(y instanceof Date)m[E]=new Date(y);else if(ArrayBuffer.isView(y))m[E]=s(y);else{var S=c.indexOf(y);m[E]=S!==-1?_[S]:a(y)}}return m}}(u):u.proto?function d(c){if(typeof c!="object"||c===null)return c;if(c instanceof Date)return new Date(c);if(Array.isArray(c))return l(c,d);if(c instanceof Map)return new Map(l(Array.from(c),d));if(c instanceof Set)return new Set(l(Array.from(c),d));var _={};for(var f in c){var p=c[f];typeof p!="object"||p===null?_[f]=p:p instanceof Date?_[f]=new Date(p):p instanceof Map?_[f]=new Map(l(Array.from(p),d)):p instanceof Set?_[f]=new Set(l(Array.from(p),d)):ArrayBuffer.isView(p)?_[f]=s(p):_[f]=d(p)}return _}:function d(c){if(typeof c!="object"||c===null)return c;if(c instanceof Date)return new Date(c);if(Array.isArray(c))return l(c,d);if(c instanceof Map)return new Map(l(Array.from(c),d));if(c instanceof Set)return new Set(l(Array.from(c),d));var _={};for(var f in c)if(Object.hasOwnProperty.call(c,f)!==!1){var p=c[f];typeof p!="object"||p===null?_[f]=p:p instanceof Date?_[f]=new Date(p):p instanceof Map?_[f]=new Map(l(Array.from(p),d)):p instanceof Set?_[f]=new Set(l(Array.from(p),d)):ArrayBuffer.isView(p)?_[f]=s(p):_[f]=d(p)}return _};function l(d,c){for(var _=Object.keys(d),f=new Array(_.length),p=0;p<_.length;p++){var a=_[p],v=d[a];typeof v!="object"||v===null?f[a]=v:v instanceof Date?f[a]=new Date(v):ArrayBuffer.isView(v)?f[a]=s(v):f[a]=c(v)}return f}}}).call(this)}).call(this,t("buffer").Buffer)},{buffer:17}],73:[function(t,i,o){var r=t("buffer"),s=r.Buffer;function u(d,c){for(var _ in d)c[_]=d[_]}function l(d,c,_){return s(d,c,_)}s.from&&s.alloc&&s.allocUnsafe&&s.allocUnsafeSlow?i.exports=r:(u(r,o),o.Buffer=l),l.prototype=Object.create(s.prototype),u(s,l),l.from=function(d,c,_){if(typeof d=="number")throw new TypeError("Argument must not be a number");return s(d,c,_)},l.alloc=function(d,c,_){if(typeof d!="number")throw new TypeError("Argument must be a number");var f=s(d);return c!==void 0?typeof _=="string"?f.fill(c,_):f.fill(c):f.fill(0),f},l.allocUnsafe=function(d){if(typeof d!="number")throw new TypeError("Argument must be a number");return s(d)},l.allocUnsafeSlow=function(d){if(typeof d!="number")throw new TypeError("Argument must be a number");return r.SlowBuffer(d)}},{buffer:17}],74:[function(t,i,o){i.exports=function(r){var s=r._readableState;return s?s.objectMode||typeof r._duplexState=="number"?r.read():r.read((u=s,u.buffer.length?u.buffer.head?u.buffer.head.data.length:u.buffer[0].length:u.length)):null;var u}},{}],75:[function(t,i,o){var r=t("safe-buffer").Buffer,s=r.isEncoding||function(m){switch((m=""+m)&&m.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function u(m){var g;switch(this.encoding=function(E){var y=function(S){if(!S)return"utf8";for(var C;;)switch(S){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return S;default:if(C)return;S=(""+S).toLowerCase(),C=!0}}(E);if(typeof y!="string"&&(r.isEncoding===s||!s(E)))throw new Error("Unknown encoding: "+E);return y||E}(m),this.encoding){case"utf16le":this.text=c,this.end=_,g=4;break;case"utf8":this.fillLast=d,g=4;break;case"base64":this.text=f,this.end=p,g=3;break;default:return this.write=a,void(this.end=v)}this.lastNeed=0,this.lastTotal=0,this.lastChar=r.allocUnsafe(g)}function l(m){return m<=127?0:m>>5==6?2:m>>4==14?3:m>>3==30?4:m>>6==2?-1:-2}function d(m){var g=this.lastTotal-this.lastNeed,E=function(y,S,C){if((192&S[0])!=128)return y.lastNeed=0,"οΏ½";if(y.lastNeed>1&&S.length>1){if((192&S[1])!=128)return y.lastNeed=1,"οΏ½";if(y.lastNeed>2&&S.length>2&&(192&S[2])!=128)return y.lastNeed=2,"οΏ½"}}(this,m);return E!==void 0?E:this.lastNeed<=m.length?(m.copy(this.lastChar,g,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(m.copy(this.lastChar,g,0,m.length),void(this.lastNeed-=m.length))}function c(m,g){if((m.length-g)%2==0){var E=m.toString("utf16le",g);if(E){var y=E.charCodeAt(E.length-1);if(y>=55296&&y<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=m[m.length-2],this.lastChar[1]=m[m.length-1],E.slice(0,-1)}return E}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=m[m.length-1],m.toString("utf16le",g,m.length-1)}function _(m){var g=m&&m.length?this.write(m):"";if(this.lastNeed){var E=this.lastTotal-this.lastNeed;return g+this.lastChar.toString("utf16le",0,E)}return g}function f(m,g){var E=(m.length-g)%3;return E===0?m.toString("base64",g):(this.lastNeed=3-E,this.lastTotal=3,E===1?this.lastChar[0]=m[m.length-1]:(this.lastChar[0]=m[m.length-2],this.lastChar[1]=m[m.length-1]),m.toString("base64",g,m.length-E))}function p(m){var g=m&&m.length?this.write(m):"";return this.lastNeed?g+this.lastChar.toString("base64",0,3-this.lastNeed):g}function a(m){return m.toString(this.encoding)}function v(m){return m&&m.length?this.write(m):""}o.StringDecoder=u,u.prototype.write=function(m){if(m.length===0)return"";var g,E;if(this.lastNeed){if((g=this.fillLast(m))===void 0)return"";E=this.lastNeed,this.lastNeed=0}else E=0;return E<m.length?g?g+this.text(m,E):this.text(m,E):g||""},u.prototype.end=function(m){var g=m&&m.length?this.write(m):"";return this.lastNeed?g+"οΏ½":g},u.prototype.text=function(m,g){var E=function(S,C,T){var R=C.length-1;if(R<T)return 0;var O=l(C[R]);return O>=0?(O>0&&(S.lastNeed=O-1),O):--R<T||O===-2?0:(O=l(C[R]))>=0?(O>0&&(S.lastNeed=O-2),O):--R<T||O===-2?0:(O=l(C[R]))>=0?(O>0&&(O===2?O=0:S.lastNeed=O-3),O):0}(this,m,g);if(!this.lastNeed)return m.toString("utf8",g);this.lastTotal=E;var y=m.length-(E-this.lastNeed);return m.copy(this.lastChar,0,y),m.toString("utf8",g,y)},u.prototype.fillLast=function(m){if(this.lastNeed<=m.length)return m.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);m.copy(this.lastChar,this.lastTotal-this.lastNeed,0,m.length),this.lastNeed-=m.length}},{"safe-buffer":73}],76:[function(t,i,o){var r=t("punycode"),s=t("./util");function u(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}o.parse=C,o.resolve=function(T,R){return C(T,!1,!0).resolve(R)},o.resolveObject=function(T,R){return T?C(T,!1,!0).resolveObject(R):R},o.format=function(T){return s.isString(T)&&(T=C(T)),T instanceof u?T.format():u.prototype.format.call(T)},o.Url=u;var l=/^([a-z0-9.+-]+:)/i,d=/:[0-9]*$/,c=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,_=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r",`
13
13
  `," "]),f=["'"].concat(_),p=["%","/","?",";","#"].concat(f),a=["/","?","#"],v=/^[+a-z0-9A-Z_-]{0,63}$/,m=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,g={javascript:!0,"javascript:":!0},E={javascript:!0,"javascript:":!0},y={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},S=t("querystring");function C(T,R,O){if(T&&s.isObject(T)&&T instanceof u)return T;var B=new u;return B.parse(T,R,O),B}u.prototype.parse=function(T,R,O){if(!s.isString(T))throw new TypeError("Parameter 'url' must be a string, not "+typeof T);var B=T.indexOf("?"),j=B!==-1&&B<T.indexOf("#")?"?":"#",I=T.split(j);I[0]=I[0].replace(/\\/g,"/");var A=T=I.join(j);if(A=A.trim(),!O&&T.split("#").length===1){var M=c.exec(A);if(M)return this.path=A,this.href=A,this.pathname=M[1],M[2]?(this.search=M[2],this.query=R?S.parse(this.search.substr(1)):this.search.substr(1)):R&&(this.search="",this.query={}),this}var w=l.exec(A);if(w){var x=(w=w[0]).toLowerCase();this.protocol=x,A=A.substr(w.length)}if(O||w||A.match(/^\/\/[^@\/]+@[^@\/]+/)){var k=A.substr(0,2)==="//";!k||w&&E[w]||(A=A.substr(2),this.slashes=!0)}if(!E[w]&&(k||w&&!y[w])){for(var V,L,D=-1,F=0;F<a.length;F++)(G=A.indexOf(a[F]))!==-1&&(D===-1||G<D)&&(D=G);for((L=D===-1?A.lastIndexOf("@"):A.lastIndexOf("@",D))!==-1&&(V=A.slice(0,L),A=A.slice(L+1),this.auth=decodeURIComponent(V)),D=-1,F=0;F<p.length;F++){var G;(G=A.indexOf(p[F]))!==-1&&(D===-1||G<D)&&(D=G)}D===-1&&(D=A.length),this.host=A.slice(0,D),A=A.slice(D),this.parseHost(),this.hostname=this.hostname||"";var q=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!q)for(var Y=this.hostname.split(/\./),K=(F=0,Y.length);F<K;F++){var W=Y[F];if(W&&!W.match(v)){for(var X="",J=0,Z=W.length;J<Z;J++)W.charCodeAt(J)>127?X+="x":X+=W[J];if(!X.match(v)){var b=Y.slice(0,F),N=Y.slice(F+1),U=W.match(m);U&&(b.push(U[1]),N.unshift(U[2])),N.length&&(A="/"+N.join(".")+A),this.hostname=b.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),q||(this.hostname=r.toASCII(this.hostname));var z=this.port?":"+this.port:"",$=this.hostname||"";this.host=$+z,this.href+=this.host,q&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),A[0]!=="/"&&(A="/"+A))}if(!g[x])for(F=0,K=f.length;F<K;F++){var Q=f[F];if(A.indexOf(Q)!==-1){var ee=encodeURIComponent(Q);ee===Q&&(ee=escape(Q)),A=A.split(Q).join(ee)}}var oe=A.indexOf("#");oe!==-1&&(this.hash=A.substr(oe),A=A.slice(0,oe));var te=A.indexOf("?");if(te!==-1?(this.search=A.substr(te),this.query=A.substr(te+1),R&&(this.query=S.parse(this.query)),A=A.slice(0,te)):R&&(this.search="",this.query={}),A&&(this.pathname=A),y[x]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){z=this.pathname||"";var ie=this.search||"";this.path=z+ie}return this.href=this.format(),this},u.prototype.format=function(){var T=this.auth||"";T&&(T=(T=encodeURIComponent(T)).replace(/%3A/i,":"),T+="@");var R=this.protocol||"",O=this.pathname||"",B=this.hash||"",j=!1,I="";this.host?j=T+this.host:this.hostname&&(j=T+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(j+=":"+this.port)),this.query&&s.isObject(this.query)&&Object.keys(this.query).length&&(I=S.stringify(this.query));var A=this.search||I&&"?"+I||"";return R&&R.substr(-1)!==":"&&(R+=":"),this.slashes||(!R||y[R])&&j!==!1?(j="//"+(j||""),O&&O.charAt(0)!=="/"&&(O="/"+O)):j||(j=""),B&&B.charAt(0)!=="#"&&(B="#"+B),A&&A.charAt(0)!=="?"&&(A="?"+A),R+j+(O=O.replace(/[?#]/g,function(M){return encodeURIComponent(M)}))+(A=A.replace("#","%23"))+B},u.prototype.resolve=function(T){return this.resolveObject(C(T,!1,!0)).format()},u.prototype.resolveObject=function(T){if(s.isString(T)){var R=new u;R.parse(T,!1,!0),T=R}for(var O=new u,B=Object.keys(this),j=0;j<B.length;j++){var I=B[j];O[I]=this[I]}if(O.hash=T.hash,T.href==="")return O.href=O.format(),O;if(T.slashes&&!T.protocol){for(var A=Object.keys(T),M=0;M<A.length;M++){var w=A[M];w!=="protocol"&&(O[w]=T[w])}return y[O.protocol]&&O.hostname&&!O.pathname&&(O.path=O.pathname="/"),O.href=O.format(),O}if(T.protocol&&T.protocol!==O.protocol){if(!y[T.protocol]){for(var x=Object.keys(T),k=0;k<x.length;k++){var V=x[k];O[V]=T[V]}return O.href=O.format(),O}if(O.protocol=T.protocol,T.host||E[T.protocol])O.pathname=T.pathname;else{for(var L=(T.pathname||"").split("/");L.length&&!(T.host=L.shift()););T.host||(T.host=""),T.hostname||(T.hostname=""),L[0]!==""&&L.unshift(""),L.length<2&&L.unshift(""),O.pathname=L.join("/")}if(O.search=T.search,O.query=T.query,O.host=T.host||"",O.auth=T.auth,O.hostname=T.hostname||T.host,O.port=T.port,O.pathname||O.search){var D=O.pathname||"",F=O.search||"";O.path=D+F}return O.slashes=O.slashes||T.slashes,O.href=O.format(),O}var G=O.pathname&&O.pathname.charAt(0)==="/",q=T.host||T.pathname&&T.pathname.charAt(0)==="/",Y=q||G||O.host&&T.pathname,K=Y,W=O.pathname&&O.pathname.split("/")||[],X=(L=T.pathname&&T.pathname.split("/")||[],O.protocol&&!y[O.protocol]);if(X&&(O.hostname="",O.port=null,O.host&&(W[0]===""?W[0]=O.host:W.unshift(O.host)),O.host="",T.protocol&&(T.hostname=null,T.port=null,T.host&&(L[0]===""?L[0]=T.host:L.unshift(T.host)),T.host=null),Y=Y&&(L[0]===""||W[0]==="")),q)O.host=T.host||T.host===""?T.host:O.host,O.hostname=T.hostname||T.hostname===""?T.hostname:O.hostname,O.search=T.search,O.query=T.query,W=L;else if(L.length)W||(W=[]),W.pop(),W=W.concat(L),O.search=T.search,O.query=T.query;else if(!s.isNullOrUndefined(T.search))return X&&(O.hostname=O.host=W.shift(),(U=!!(O.host&&O.host.indexOf("@")>0)&&O.host.split("@"))&&(O.auth=U.shift(),O.host=O.hostname=U.shift())),O.search=T.search,O.query=T.query,s.isNull(O.pathname)&&s.isNull(O.search)||(O.path=(O.pathname?O.pathname:"")+(O.search?O.search:"")),O.href=O.format(),O;if(!W.length)return O.pathname=null,O.search?O.path="/"+O.search:O.path=null,O.href=O.format(),O;for(var J=W.slice(-1)[0],Z=(O.host||T.host||W.length>1)&&(J==="."||J==="..")||J==="",b=0,N=W.length;N>=0;N--)(J=W[N])==="."?W.splice(N,1):J===".."?(W.splice(N,1),b++):b&&(W.splice(N,1),b--);if(!Y&&!K)for(;b--;b)W.unshift("..");!Y||W[0]===""||W[0]&&W[0].charAt(0)==="/"||W.unshift(""),Z&&W.join("/").substr(-1)!=="/"&&W.push("");var U,z=W[0]===""||W[0]&&W[0].charAt(0)==="/";return X&&(O.hostname=O.host=z?"":W.length?W.shift():"",(U=!!(O.host&&O.host.indexOf("@")>0)&&O.host.split("@"))&&(O.auth=U.shift(),O.host=O.hostname=U.shift())),(Y=Y||O.host&&W.length)&&!z&&W.unshift(""),W.length?O.pathname=W.join("/"):(O.pathname=null,O.path=null),s.isNull(O.pathname)&&s.isNull(O.search)||(O.path=(O.pathname?O.pathname:"")+(O.search?O.search:"")),O.auth=T.auth||O.auth,O.slashes=O.slashes||T.slashes,O.href=O.format(),O},u.prototype.parseHost=function(){var T=this.host,R=d.exec(T);R&&((R=R[0])!==":"&&(this.port=R.substr(1)),T=T.substr(0,T.length-R.length)),T&&(this.hostname=T)}},{"./util":77,punycode:51,querystring:54}],77:[function(t,i,o){i.exports={isString:function(r){return typeof r=="string"},isObject:function(r){return typeof r=="object"&&r!==null},isNull:function(r){return r===null},isNullOrUndefined:function(r){return r==null}}},{}],78:[function(t,i,o){(function(r){(function(){function s(u){try{if(!r.localStorage)return!1}catch{return!1}var l=r.localStorage[u];return l!=null&&String(l).toLowerCase()==="true"}i.exports=function(u,l){if(s("noDeprecation"))return u;var d=!1;return function(){if(!d){if(s("throwDeprecation"))throw new Error(l);s("traceDeprecation")?console.trace(l):console.warn(l),d=!0}return u.apply(this,arguments)}}}).call(this)}).call(this,typeof Cn<"u"?Cn:typeof self<"u"?self:typeof window<"u"?window:{})},{}],79:[function(t,i,o){i.exports=function r(s,u){if(s&&u)return r(s)(u);if(typeof s!="function")throw new TypeError("need wrapper function");return Object.keys(s).forEach(function(d){l[d]=s[d]}),l;function l(){for(var d=new Array(arguments.length),c=0;c<d.length;c++)d[c]=arguments[c];var _=s.apply(this,d),f=d[d.length-1];return typeof _=="function"&&_!==f&&Object.keys(f).forEach(function(p){_[p]=f[p]}),_}}},{}],80:[function(t,i,o){i.exports=function(){throw new Error("ws does not work in the browser. Browser clients must use the native WebSocket object")}},{}],81:[function(t,i,o){i.exports=function(){for(var s={},u=0;u<arguments.length;u++){var l=arguments[u];for(var d in l)r.call(l,d)&&(s[d]=l[d])}return s};var r=Object.prototype.hasOwnProperty},{}],82:[function(t,i,o){i.exports=function(r){r.prototype[Symbol.iterator]=function*(){for(let s=this.head;s;s=s.next)yield s.value}}},{}],83:[function(t,i,o){function r(c){var _=this;if(_ instanceof r||(_=new r),_.tail=null,_.head=null,_.length=0,c&&typeof c.forEach=="function")c.forEach(function(a){_.push(a)});else if(arguments.length>0)for(var f=0,p=arguments.length;f<p;f++)_.push(arguments[f]);return _}function s(c,_,f){var p=_===c.head?new d(f,null,_,c):new d(f,_,_.next,c);return p.next===null&&(c.tail=p),p.prev===null&&(c.head=p),c.length++,p}function u(c,_){c.tail=new d(_,c.tail,null,c),c.head||(c.head=c.tail),c.length++}function l(c,_){c.head=new d(_,null,c.head,c),c.tail||(c.tail=c.head),c.length++}function d(c,_,f,p){if(!(this instanceof d))return new d(c,_,f,p);this.list=p,this.value=c,_?(_.next=this,this.prev=_):this.prev=null,f?(f.prev=this,this.next=f):this.next=null}i.exports=r,r.Node=d,r.create=r,r.prototype.removeNode=function(c){if(c.list!==this)throw new Error("removing node which does not belong to this list");var _=c.next,f=c.prev;return _&&(_.prev=f),f&&(f.next=_),c===this.head&&(this.head=_),c===this.tail&&(this.tail=f),c.list.length--,c.next=null,c.prev=null,c.list=null,_},r.prototype.unshiftNode=function(c){if(c!==this.head){c.list&&c.list.removeNode(c);var _=this.head;c.list=this,c.next=_,_&&(_.prev=c),this.head=c,this.tail||(this.tail=c),this.length++}},r.prototype.pushNode=function(c){if(c!==this.tail){c.list&&c.list.removeNode(c);var _=this.tail;c.list=this,c.prev=_,_&&(_.next=c),this.tail=c,this.head||(this.head=c),this.length++}},r.prototype.push=function(){for(var c=0,_=arguments.length;c<_;c++)u(this,arguments[c]);return this.length},r.prototype.unshift=function(){for(var c=0,_=arguments.length;c<_;c++)l(this,arguments[c]);return this.length},r.prototype.pop=function(){if(this.tail){var c=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,c}},r.prototype.shift=function(){if(this.head){var c=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,c}},r.prototype.forEach=function(c,_){_=_||this;for(var f=this.head,p=0;f!==null;p++)c.call(_,f.value,p,this),f=f.next},r.prototype.forEachReverse=function(c,_){_=_||this;for(var f=this.tail,p=this.length-1;f!==null;p--)c.call(_,f.value,p,this),f=f.prev},r.prototype.get=function(c){for(var _=0,f=this.head;f!==null&&_<c;_++)f=f.next;if(_===c&&f!==null)return f.value},r.prototype.getReverse=function(c){for(var _=0,f=this.tail;f!==null&&_<c;_++)f=f.prev;if(_===c&&f!==null)return f.value},r.prototype.map=function(c,_){_=_||this;for(var f=new r,p=this.head;p!==null;)f.push(c.call(_,p.value,this)),p=p.next;return f},r.prototype.mapReverse=function(c,_){_=_||this;for(var f=new r,p=this.tail;p!==null;)f.push(c.call(_,p.value,this)),p=p.prev;return f},r.prototype.reduce=function(c,_){var f,p=this.head;if(arguments.length>1)f=_;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");p=this.head.next,f=this.head.value}for(var a=0;p!==null;a++)f=c(f,p.value,a),p=p.next;return f},r.prototype.reduceReverse=function(c,_){var f,p=this.tail;if(arguments.length>1)f=_;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");p=this.tail.prev,f=this.tail.value}for(var a=this.length-1;p!==null;a--)f=c(f,p.value,a),p=p.prev;return f},r.prototype.toArray=function(){for(var c=new Array(this.length),_=0,f=this.head;f!==null;_++)c[_]=f.value,f=f.next;return c},r.prototype.toArrayReverse=function(){for(var c=new Array(this.length),_=0,f=this.tail;f!==null;_++)c[_]=f.value,f=f.prev;return c},r.prototype.slice=function(c,_){(_=_||this.length)<0&&(_+=this.length),(c=c||0)<0&&(c+=this.length);var f=new r;if(_<c||_<0)return f;c<0&&(c=0),_>this.length&&(_=this.length);for(var p=0,a=this.head;a!==null&&p<c;p++)a=a.next;for(;a!==null&&p<_;p++,a=a.next)f.push(a.value);return f},r.prototype.sliceReverse=function(c,_){(_=_||this.length)<0&&(_+=this.length),(c=c||0)<0&&(c+=this.length);var f=new r;if(_<c||_<0)return f;c<0&&(c=0),_>this.length&&(_=this.length);for(var p=this.length,a=this.tail;a!==null&&p>_;p--)a=a.prev;for(;a!==null&&p>c;p--,a=a.prev)f.push(a.value);return f},r.prototype.splice=function(c,_,...f){c>this.length&&(c=this.length-1),c<0&&(c=this.length+c);for(var p=0,a=this.head;a!==null&&p<c;p++)a=a.next;var v=[];for(p=0;a&&p<_;p++)v.push(a.value),a=this.removeNode(a);for(a===null&&(a=this.tail),a!==this.head&&a!==this.tail&&(a=a.prev),p=0;p<f.length;p++)a=s(this,a,f[p]);return v},r.prototype.reverse=function(){for(var c=this.head,_=this.tail,f=c;f!==null;f=f.prev){var p=f.prev;f.prev=f.next,f.next=p}return this.head=_,this.tail=c,this};try{t("./iterator.js")(r)}catch{}},{"./iterator.js":82}]},{},[12])(12)})})(pR);var Uj=pR.exports;const Bj=Oi(Uj),jj={qos:1,retain:!1};let $e=null;const Gl=new Set;let Hl=[],Lc=0;const Vj=5,Uc=()=>new Promise((e,n)=>{if(Lc=0,$e&&($e!=null&&$e.connected))return e();const t=JSON.parse(localStorage.getItem("user")||"{}"),o={clientId:`${t==null?void 0:t.id}_${Date.now()}_${Math.floor(Math.random()*1e3)}`,host:"mqtt-digital-signage.dev01.dtsmart.dev",port:443,protocol:"wss",username:"admin123",password:"admin123",clean:!0,reconnectPeriod:1e3,path:"/mqtt"},{host:r,port:s,path:u,...l}=o,d=`wss://${r}:${s}${u}`;$e=Bj.connect(d,l),$e==null||$e.on("connect",()=>{Gl.forEach(c=>$e==null?void 0:$e.subscribe(c)),$e==null||$e.on("message",(c,_)=>{try{let f=_;if(_ instanceof Uint8Array){const p=new TextDecoder("utf-8");f=JSON.parse(p.decode(_))}Hl.filter(p=>p.topic===c).forEach(p=>{p.callBack(c,f)})}catch(f){console.error("Error parsing message:",f)}}),e()}),$e==null||$e.on("reconnect",()=>{Lc++,Lc>=Vj&&($e==null||$e.end(!0),$e=null,e())}),$e==null||$e.on("close",()=>{}),$e==null||$e.on("error",c=>{n(c)})}),yr=e=>{Gl.has(e)||($e!=null&&$e.connected,$e==null||$e.subscribe(e,jj,n=>{n?console.error(`Failed to subscribe ${e}`,n):(Gl.add(e),console.log(`Subscribed to ${e}`))}))},zl=e=>{$e!=null&&$e.connected,$e==null||$e.unsubscribe(e,n=>{n?console.error(`Failed to unsubscribe ${e}`,n):(Gl.delete(e),console.log(`Unsubscribed from ${e}`))})},Yl=(e,n)=>{if($e!=null&&$e.connected&&n){const t=typeof n!="string"?JSON.stringify(n):n;$e==null||$e.publish(e,t,{qos:1,retain:!1},i=>{i&&console.error(`Failed to publish message to ${e}`,i)})}else console.warn("MQTT not connected, cannot publish")},Bc=(e,n,t)=>{Kl(e),Hl.push({key:e,callBack:t,topic:n})},Kl=e=>{const n=Hl.findIndex(t=>t.key===e);n>-1&&Hl.splice(n,1)},Fj="chat/message/",aR="call/message/",bo=["chat/conversation/update/","chat/conversation/read_message/","chat/conversation/update_list/"],qj="sms-outbound/",gr="user/status/",Fe=h.ref(null),Gj=h.ref(null);let Er={id:"",token:"",domain:""};const Hj=(e,n,t)=>{Er={id:e,token:n,domain:t}},zj=async e=>{const n=await yn.post("/api/v1/message/tenant/login",e);return localStorage.setItem("chat_token",n==null?void 0:n.token),localStorage.setItem("refresh_token",n==null?void 0:n.refresh_token),Er.id=e.tenant_id,Er.token=n==null?void 0:n.token,Fe.value=n,n},Yj=async e=>{const n=await yn.get("/api/v1/message/tenant/gci-link",{params:e});return localStorage.setItem("chat_token",n==null?void 0:n.token),localStorage.setItem("refresh_token",n==null?void 0:n.refresh_token),Er.id=e.tenant_id,Er.token=n==null?void 0:n.token,Gj.value=n,n},Kj=async()=>{const e=await yn.get("/api/v1/message/user/me");return localStorage.setItem("chat_user",JSON.stringify(e)),Fe.value=e,e},Wj=async()=>{var t;const e=localStorage.getItem("chat_id"),n=await yn.get(`/api/v1/message/tenant/get-info?tenant_name=${e}`);if(n.error||!(n!=null&&n.data))throw new Error(n.error);return Fe.value&&(Fe.value.tenant_phone=""),Fe.value&&(Fe.value.tenant_phone_limit=Number(((t=n==null?void 0:n.data)==null?void 0:t.go_chat_phone_limit)??0)),n},vR=async()=>{var e,n,t,i;Er={id:"",token:"",domain:""},Fe.value=null,localStorage.removeItem("chat_accessToken"),localStorage.removeItem("chat_domain"),localStorage.removeItem("chat_id");try{(n=(e=Un==null?void 0:Un.getInstance())==null?void 0:e.closeApp)==null||n.call(e),(t=Un==null?void 0:Un.getInstance())!=null&&t.getBridge()?(i=Un==null?void 0:Un.getInstance())==null||i.closeApp():window.location.href="/login"}catch{}};var mR={exports:{}};(function(e,n){(function(t,i){e.exports=i()})(Cn,function(){return function(t,i,o){t=t||{};var r=i.prototype,s={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function u(d,c,_,f){return r.fromToBase(d,c,_,f)}o.en.relativeTime=s,r.fromToBase=function(d,c,_,f,p){for(var a,v,m,g=_.$locale().relativeTime||s,E=t.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],y=E.length,S=0;S<y;S+=1){var C=E[S];C.d&&(a=f?o(d).diff(_,C.d,!0):_.diff(d,C.d,!0));var T=(t.rounding||Math.round)(Math.abs(a));if(m=a>0,T<=C.r||!C.r){T<=1&&S>0&&(C=E[S-1]);var R=g[C.l];p&&(T=p(""+T)),v=typeof R=="string"?R.replace("%d",T):R(T,c,C.l,m);break}}if(c)return v;var O=m?g.future:g.past;return typeof O=="function"?O(v):O.replace("%s",v)},r.to=function(d,c){return u(d,c,this,!0)},r.from=function(d,c){return u(d,c,this)};var l=function(d){return d.$u?o.utc():o()};r.toNow=function(d){return this.to(l(this),d)},r.fromNow=function(d){return this.from(l(this),d)}}})})(mR);var $j=mR.exports;const Qj=Oi($j);var hR={exports:{}};(function(e,n){(function(t,i){e.exports=i()})(Cn,function(){return function(t,i,o){o.updateLocale=function(r,s){var u=o.Ls[r];if(u)return(s?Object.keys(s):[]).forEach(function(l){u[l]=s[l]}),u}}})})(hR);var Jj=hR.exports;const Xj=Oi(Jj);var yR={exports:{}};(function(e,n){(function(t,i){e.exports=i()})(Cn,function(){var t="minute",i=/[+-]\d\d(?::?\d\d)?/g,o=/([+-]|\d\d)/g;return function(r,s,u){var l=s.prototype;u.utc=function(v){var m={date:v,utc:!0,args:arguments};return new s(m)},l.utc=function(v){var m=u(this.toDate(),{locale:this.$L,utc:!0});return v?m.add(this.utcOffset(),t):m},l.local=function(){return u(this.toDate(),{locale:this.$L,utc:!1})};var d=l.parse;l.parse=function(v){v.utc&&(this.$u=!0),this.$utils().u(v.$offset)||(this.$offset=v.$offset),d.call(this,v)};var c=l.init;l.init=function(){if(this.$u){var v=this.$d;this.$y=v.getUTCFullYear(),this.$M=v.getUTCMonth(),this.$D=v.getUTCDate(),this.$W=v.getUTCDay(),this.$H=v.getUTCHours(),this.$m=v.getUTCMinutes(),this.$s=v.getUTCSeconds(),this.$ms=v.getUTCMilliseconds()}else c.call(this)};var _=l.utcOffset;l.utcOffset=function(v,m){var g=this.$utils().u;if(g(v))return this.$u?0:g(this.$offset)?_.call(this):this.$offset;if(typeof v=="string"&&(v=function(C){C===void 0&&(C="");var T=C.match(i);if(!T)return null;var R=(""+T[0]).match(o)||["-",0,0],O=R[0],B=60*+R[1]+ +R[2];return B===0?0:O==="+"?B:-B}(v),v===null))return this;var E=Math.abs(v)<=16?60*v:v,y=this;if(m)return y.$offset=E,y.$u=v===0,y;if(v!==0){var S=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(y=this.local().add(E+S,t)).$offset=E,y.$x.$localOffset=S}else y=this.utc();return y};var f=l.format;l.format=function(v){var m=v||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return f.call(this,m)},l.valueOf=function(){var v=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*v},l.isUTC=function(){return!!this.$u},l.toISOString=function(){return this.toDate().toISOString()},l.toString=function(){return this.toDate().toUTCString()};var p=l.toDate;l.toDate=function(v){return v==="s"&&this.$offset?u(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():p.call(this)};var a=l.diff;l.diff=function(v,m,g){if(v&&this.$u===v.$u)return a.call(this,v,m,g);var E=this.local(),y=u(v).local();return a.call(E,y,m,g)}}})})(yR);var Zj=yR.exports;const eV=Oi(Zj);var gR={exports:{}};(function(e,n){(function(t,i){e.exports=i()})(Cn,function(){var t={year:0,month:1,day:2,hour:3,minute:4,second:5},i={};return function(o,r,s){var u,l=function(f,p,a){a===void 0&&(a={});var v=new Date(f),m=function(g,E){E===void 0&&(E={});var y=E.timeZoneName||"short",S=g+"|"+y,C=i[S];return C||(C=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:g,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:y}),i[S]=C),C}(p,a);return m.formatToParts(v)},d=function(f,p){for(var a=l(f,p),v=[],m=0;m<a.length;m+=1){var g=a[m],E=g.type,y=g.value,S=t[E];S>=0&&(v[S]=parseInt(y,10))}var C=v[3],T=C===24?0:C,R=v[0]+"-"+v[1]+"-"+v[2]+" "+T+":"+v[4]+":"+v[5]+":000",O=+f;return(s.utc(R).valueOf()-(O-=O%1e3))/6e4},c=r.prototype;c.tz=function(f,p){f===void 0&&(f=u);var a,v=this.utcOffset(),m=this.toDate(),g=m.toLocaleString("en-US",{timeZone:f}),E=Math.round((m-new Date(g))/1e3/60),y=15*-Math.round(m.getTimezoneOffset()/15)-E;if(!Number(y))a=this.utcOffset(0,p);else if(a=s(g,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(y,!0),p){var S=a.utcOffset();a=a.add(v-S,"minute")}return a.$x.$timezone=f,a},c.offsetName=function(f){var p=this.$x.$timezone||s.tz.guess(),a=l(this.valueOf(),p,{timeZoneName:f}).find(function(v){return v.type.toLowerCase()==="timezonename"});return a&&a.value};var _=c.startOf;c.startOf=function(f,p){if(!this.$x||!this.$x.$timezone)return _.call(this,f,p);var a=s(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return _.call(a,f,p).tz(this.$x.$timezone,!0)},s.tz=function(f,p,a){var v=a&&p,m=a||p||u,g=d(+s(),m);if(typeof f!="string")return s(f).tz(m);var E=function(T,R,O){var B=T-60*R*1e3,j=d(B,O);if(R===j)return[B,R];var I=d(B-=60*(j-R)*1e3,O);return j===I?[B,j]:[T-60*Math.min(j,I)*1e3,Math.max(j,I)]}(s.utc(f,v).valueOf(),g,m),y=E[0],S=E[1],C=s(y).utcOffset(S);return C.$x.$timezone=m,C},s.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},s.tz.setDefault=function(f){u=f}}})})(gR);var tV=gR.exports;const nV=Oi(tV),Tr={DATE_FORMAT:"YYYY-MM-DD",DATE_FORMAT_FULL:"YYYY-MM-DD HH:mm:ss",TIME_12_FORMAT:"hh:mm A"},jc="Africa/Freetown",iV={},oV={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24"};function rV(e,n){return h.openBlock(),h.createElementBlock("svg",oV,n[0]||(n[0]=[h.createElementVNode("circle",{cx:"12",cy:"12",r:"12",fill:"#1DA1F2"},null,-1),h.createElementVNode("path",{d:"M9 12.5l2 2 4-4",fill:"none",stroke:"#fff","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]))}const sV=Et(iV,[["render",rV]]),lV={class:"w-full"},uV={class:"flex p-1 bg-chat-haze-200 w-max rounded-xl"},dV=["onClick"],cV={class:"mt-4"},_V=h.defineComponent({__name:"TabBase",props:h.mergeModels({tabs:{}},{active:{},activeModifiers:{}}),emits:h.mergeModels(["change"],["update:active"]),setup(e,{emit:n}){const t=n,i=h.useModel(e,"active"),o=r=>{i.value=r.value,t("change",r.value)};return(r,s)=>(h.openBlock(),h.createElementBlock("div",lV,[h.createElementVNode("div",uV,[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(r.tabs,u=>(h.openBlock(),h.createElementBlock("button",{key:u.value,class:h.normalizeClass(["px-4 py-2 rounded-xl text-sm font-medium relative",i.value===u.value?"bg-white":""]),onClick:l=>o(u)},[h.withDirectives(h.createElementVNode("div",{class:"w-5 h-5 bg-chat-error rounded-full absolute -top-[8px] -right-2 text-white"},h.toDisplayString(u.badge),513),[[h.vShow,u.badge]]),h.createTextVNode(" "+h.toDisplayString(u.label),1)],10,dV))),128))]),h.createElementVNode("div",cV,[h.renderSlot(r.$slots,i.value)])]))}}),fV=async e=>await yn.get("/api/v1/message/message/get-message",{params:e}),pV=async e=>await yn.get(`/api/v1/message/message/get-user?receiver_id=${e}`),aV=async e=>{if(e)return yn.post(`/api/v1/message/message/mark-as-read?conversation_id=${e}`)},vV=async e=>await yn.post("/api/v1/message/message/send-message",e,{headers:{"Content-Type":"multipart/form-data"}}),mV=async e=>await yn.get("/api/v1/message/message/unread-count",{params:e}),hV=async e=>await yn.post("/api/v1/general/storage/upload",e,{headers:{"Content-Type":"multipart/form-data"}}),yV=async e=>await yn.post("/api/v1/message/message/active-sms",e,{}),gV=async e=>await yn.get("/api/v1/message/conversation/get-conversation",{params:e}),ER=async e=>{var s,u,l,d,c,_,f,p,a,v,m,g,E,y,S,C,T,R,O;const n=await mV({conversation_id:((s=e.infoUser)==null?void 0:s.conversation_id)??0,receiver_id:Number((u=e.infoUser)==null?void 0:u.id)});let t=e.message??"";e.isSendImg?t="You sent images":e.isCall!=null&&(e.isCall=="call"?t="You sent call":t=`${((l=e.infoUser)==null?void 0:l.username)??""} sent call`);const i=Ct().tz(jc).format(Tr.DATE_FORMAT_FULL),o={id:((d=e.infoUser)==null?void 0:d.conversation_id)??0,receiver_id:Number(((c=Fe.value)==null?void 0:c.id)??0),username:((_=Fe.value)==null?void 0:_.username)??"",phone:((f=Fe.value)==null?void 0:f.phone)??"",avatar:((p=Fe.value)==null?void 0:p.avatar)??"",last_message:t,last_message_time:i,created_at:i,updated_at:i,unread_count:(n==null?void 0:n.unread_count)??0,status:1,color:((a=Fe.value)==null?void 0:a.color)??"",is_call:((v=Fe.value)==null?void 0:v.color)??"",is_unknown:0};Yl(`${bo[0]+Number((m=e.infoUser)==null?void 0:m.id)}`,JSON.stringify(o));const r={id:((g=e.infoUser)==null?void 0:g.conversation_id)??0,receiver_id:Number(((E=Fe.value)==null?void 0:E.id)??0),username:((y=e.infoUser)==null?void 0:y.username)??"",phone:((S=e.infoUser)==null?void 0:S.phone)??"",avatar:((C=e.infoUser)==null?void 0:C.avatar)??"",last_message:t,last_message_time:i,created_at:i,updated_at:i,unread_count:0,status:1,color:(T=e.infoUser)==null?void 0:T.color,is_unknown:((R=e.infoUser)==null?void 0:R.is_unknown)??0};Yl(`${bo[0]+Number((O=Fe.value)==null?void 0:O.id)}`,JSON.stringify(r))},{digibotData:EV,digibotId:TV}=Gf(),TR=e=>{let n=0;const t=h.ref([]),i=h.ref({page:1,search:""});h.ref(!1),h.onMounted(()=>{r()}),h.onUnmounted(()=>{});const o=()=>{var c,_;bo.forEach(f=>{var p;zl(f+((p=Fe.value)==null?void 0:p.id)),Kl("chat-list-"+f+"-"+e)}),((c=Fe.value)==null?void 0:c.user_type)=="tenant"&&(yr(gr+((_=Fe.value)==null?void 0:_.id)),Kl("chat-list-"+gr+"-"+e))},r=async()=>{var c,_;try{Fe.value&&(await Uc(),bo.forEach(f=>{var p,a;yr(f+((p=Fe.value)==null?void 0:p.id)),Bc("chat-list-"+f+"-"+e,f+((a=Fe.value)==null?void 0:a.id),s)}),yr(gr+((c=Fe.value)==null?void 0:c.id)),Bc("chat-list-"+gr+"-"+e,gr+((_=Fe.value)==null?void 0:_.id),s))}catch(f){console.error(f)}},s=(c,_)=>{var f,p,a,v;if((_.is_unknown??0)==e){if(u(),c===bo[0]+((f=Fe.value)==null?void 0:f.id)){const m=t.value.findIndex(E=>E.id===_.id),g=t.value.findIndex(E=>E.id===TV);m!=-1&&t.value.splice(m,1),g>-1?t.value.splice(1,0,_):t.value.unshift(_)}if(c===bo[1]+((p=Fe.value)==null?void 0:p.id)){const m=t.value.findIndex(g=>g.id===_.id);m!=-1&&(t.value[m].unread_count=0)}if(c===bo[2]+((a=Fe.value)==null?void 0:a.id)&&t.value.unshift(_==null?void 0:_.conversations),c===gr+((v=Fe.value)==null?void 0:v.id)){const m=t.value.findIndex(g=>g.receiver_id==Number(_==null?void 0:_.customer_id));m!=-1&&(t.value[m].status=_.is_online?1:0)}}},u=Vr(()=>{l(void 0,{hideLoading:!0,reset:!0})},5e3),l=async(c,_)=>{var f,p,a;try{i.value={...i.value,...c??{}};const v=await gV({...i.value,is_unknown:e});_!=null&&_.reset&&(t.value=[],e==0&&((f=Fe.value)==null?void 0:f.user_type)=="tenant"&&t.value.push(EV),await h.nextTick()),t.value.push(...(v==null?void 0:v.items)??[]),i.value.page=((p=v==null?void 0:v._meta)==null?void 0:p.currentPage)||1,n=((a=v==null?void 0:v._meta)==null?void 0:a.pageCount)||1}catch(v){console.error(v)}finally{}};return{listConversations:t,params:i,pageCount:n,getData:l,handleReadMessage:c=>{const _=t.value.findIndex(f=>f.receiver_id==c);_>-1&&t.value[_].unread_count&&(aV(t.value[_].id),t.value[_].unread_count=0)}}},SV={class:"h-full flex flex-col chat-box-white pt-6"},bV={class:"shrink-0 w-full px-6 flex gap-2 mb-4"},IV={class:"h-11 w-11 rounded-full flex-center bg-[#C7DEFF]"},CV={class:"grow relative overflow-hidden"},AV=["onClick"],RV={class:"grow ml-3 overflow-hidden"},MV={class:"flex justify-between items-center gap-4"},NV={class:"truncate text-left"},OV={class:"flex items-center"},wV={class:"truncate font-semibold"},xV={key:1,class:"shrink-0 ml-2 bg-[#E60000] text-white text-xs font-bold px-2 py-[1px] flex-center rounded-full"},PV={class:"shrink-0 text-sm text-right text-chat-gray-4 w-[130px]"},SR=h.defineComponent({__name:"ChatList",props:h.mergeModels({responsive:{}},{receiverId:{},receiverIdModifiers:{}}),emits:h.mergeModels(["selectReceiver"],["update:receiverId"]),setup(e,{expose:n,emit:t}){Ct.extend(Xj),Ct.extend(Qj),Ct.extend(eV),Ct.extend(nV),Ct.updateLocale("en",{relativeTime:{future:"%s",past:"%s",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"}});const i=e,o=t,r={ALL:0,UNKNOWN:1},s=h.computed(()=>{var D;return[{label:"All",value:r.ALL},{label:"Message Requests",value:r.UNKNOWN,badge:(((D=a.value)==null?void 0:D.length)||"").toString()}]}),{digibotData:u,digibotId:l}=Gf(),{listConversations:d,getData:c,params:_,pageCount:f,handleReadMessage:p}=TR(r.ALL),{listConversations:a,getData:v,params:m,pageCount:g,handleReadMessage:E}=TR(r.UNKNOWN),y=h.useModel(e,"receiverId"),S=h.computed(()=>T.value==r.ALL?d.value:a.value),C=h.ref(""),T=h.ref(r.ALL),R=h.ref(null),O=h.ref(!1),B=async(D,F)=>{try{F!=null&&F.hideLoading||(O.value=!0),T.value==r.ALL?await c(D,F):T.value==r.UNKNOWN&&await v(D,F),I(),F!=null&&F.reset&&j()}catch(G){console.error(G)}finally{O.value=!1}},j=async()=>{var D,F;if(T.value==r.ALL)for(;_.value.page<f&&!((D=R.value)!=null&&D.canScroll());){let G=_.value.page+1;await B({page:G})}else if(T.value==r.UNKNOWN)for(;m.value.page<g&&!((F=R.value)!=null&&F.canScroll());){let G=m.value.page+1;await B({page:G})}},I=()=>{var F,G;const D=(F=S.value)==null?void 0:F.some(q=>q.receiver_id===y.value&&y.value);i.responsive=="tablet"&&(D||(G=S.value)!=null&&G.length&&o("selectReceiver",S.value[0]))},A=D=>{B({search:D},{reset:!0})},M=Vr(async()=>{var D,F,G,q;if(T.value==r.ALL){if(_.value.page>=f){(D=R.value)==null||D.hideLoading();return}let Y=_.value.page+1;await B({page:Y}),(F=R.value)==null||F.hideLoading()}else if(T.value==r.UNKNOWN){if(m.value.page>=g){(G=R.value)==null||G.hideLoading();return}let Y=m.value.page+1;await B({page:Y}),(q=R.value)==null||q.hideLoading()}},200),w=D=>{o("selectReceiver",D)},x=()=>{T.value==r.ALL?p(y.value):T.value==r.UNKNOWN&&E(y.value)},k=D=>D&&Ct(D).isValid()?Ct.tz(D,jc).local().fromNow():D??"",V=async D=>{var F,G;D==r.ALL&&!((F=d.value)!=null&&F.length)?await B({},{reset:!0}):D==r.UNKNOWN&&!((G=a.value)!=null&&G.length)&&await B({},{reset:!0}),I()},L=()=>{var D;return(D=S.value)==null?void 0:D.find(F=>F.receiver_id==y.value)};return V(r.ALL),n({handleReadMessage:x,listConversationsAll:d,getCurrentConversation:L}),(D,F)=>{var G;return h.openBlock(),h.createElementBlock("div",SV,[h.createElementVNode("div",bV,[h.createVNode(UN,{class:"h-11 grow",responsive:D.responsive,modelValue:C.value,"onUpdate:modelValue":F[0]||(F[0]=q=>C.value=q),onSearch:A},null,8,["responsive","modelValue"]),h.createElementVNode("button",IV,[h.createVNode(qf,{class:"text-[#004AB3]"})])]),((G=h.unref(Fe))==null?void 0:G.user_type)=="tenant"?(h.openBlock(),h.createBlock(_V,{key:0,class:"shrink-0 px-6",tabs:s.value,onChange:V,active:T.value,"onUpdate:active":F[1]||(F[1]=q=>T.value=q)},null,8,["tabs","active"])):h.createCommentVNode("",!0),h.createElementVNode("div",CV,[h.createVNode(Hf,{ref_key:"scrollEventRef",ref:R,class:"h-full overflow-auto",onGetDataBottom:h.unref(M),bottom:""},{default:h.withCtx(()=>[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(S.value,q=>(h.openBlock(),h.createElementBlock("div",{class:"",key:q.id,onClick:Y=>w(q)},[h.createElementVNode("div",{class:h.normalizeClass(["w-full overflow-hidden flex items-center hover:bg-[#EDF5FF] cursor-pointer px-6 py-2",{"bg-[#EDF5FF]":y.value==q.receiver_id&&D.responsive=="tablet"}])},[h.createVNode(Yo,{id:q.id,class:"shrink-0",src:q.avatar??"",color:q.color,name:q.username??""},null,8,["id","src","color","name"]),h.createElementVNode("div",RV,[h.createElementVNode("div",MV,[h.createElementVNode("div",NV,[h.createElementVNode("div",OV,[h.createElementVNode("p",wV,h.toDisplayString(q.username),1),q.id==h.unref(l)?(h.openBlock(),h.createBlock(sV,{key:0,class:"ml-2"})):h.createCommentVNode("",!0),q.unread_count?(h.openBlock(),h.createElementBlock("span",xV,h.toDisplayString(q.unread_count),1)):h.createCommentVNode("",!0)]),h.createElementVNode("p",{class:h.normalizeClass(["text-sm truncate",{"font-semibold":q.unread_count,"text-chat-gray-3":!q.unread_count}])},h.toDisplayString(q.last_message??"No messages"),3)]),h.createElementVNode("span",PV,h.toDisplayString(k(q.last_message_time??"")),1)])])],2)],8,AV))),128))]),_:1},8,["onGetDataBottom"])])])}}}),DV={},kV={width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function LV(e,n){return h.openBlock(),h.createElementBlock("svg",kV,n[0]||(n[0]=[h.createElementVNode("path",{d:"M16.5001 12.69V14.94C16.5009 15.1488 16.4581 15.3556 16.3745 15.547C16.2908 15.7383 16.168 15.9101 16.0141 16.0513C15.8602 16.1926 15.6785 16.3001 15.4806 16.367C15.2828 16.4339 15.0731 16.4588 14.8651 16.44C12.5572 16.1892 10.3403 15.4006 8.39257 14.1375C6.58044 12.9859 5.04407 11.4496 3.89257 9.63745C2.62506 7.68085 1.83625 5.4532 1.59007 3.13495C1.57133 2.92755 1.59598 2.71852 1.66245 2.52117C1.72892 2.32382 1.83575 2.14247 1.97615 1.98867C2.11654 1.83487 2.28743 1.71198 2.47792 1.62784C2.6684 1.5437 2.87433 1.50015 3.08257 1.49995H5.33257C5.69655 1.49637 6.04942 1.62526 6.32539 1.8626C6.60137 2.09994 6.78163 2.42954 6.83257 2.78995C6.92754 3.51 7.10366 4.217 7.35757 4.89745C7.45848 5.16589 7.48032 5.45764 7.4205 5.73811C7.36069 6.01859 7.22172 6.27603 7.02007 6.47995L6.06757 7.43245C7.13524 9.31011 8.68991 10.8648 10.5676 11.9325L11.5201 10.98C11.724 10.7783 11.9814 10.6393 12.2619 10.5795C12.5424 10.5197 12.8341 10.5415 13.1026 10.6425C13.783 10.8964 14.49 11.0725 15.2101 11.1675C15.5744 11.2188 15.9071 11.4024 16.145 11.6831C16.3828 11.9638 16.5092 12.3221 16.5001 12.69Z",fill:"currentColor"},null,-1)]))}const UV=Et(DV,[["render",LV]]);var He=(e=>(e.HOME="home",e.CUSTOMER_DETAIL="customer_detail",e.CUSTOMER_CHECK_IN="customer_check_in",e.CUSTOMER_APPOINTMENT="customer_appointment",e.TENANT_ERROR="tenant_error",e.CHAT_LIST="chat_list",e.REGISTER_TENANT="register_tenant",e.REGISTER_SUCCESS="register_success",e))(He||{});const At=h.ref(He.HOME),In=e=>{At.value=e},Io=h.ref(null),Bn=h.ref(null),BV=async e=>await vs.get(`/v1/pos/customer/site/history?phone=${e}`),jV=async e=>await yn.get("/api/v1/message/customer/info",{params:e});function bR(e,n="created_at"){let t=[];if(e!=null&&e.length){let i=Ct(e[0][n]).format("YYYY"),o=[];for(let r=0;r<e.length;r++){o.push(e[r]);let s=e[r+1]?Ct(e[r+1][n]).format("YYYY"):i;s!=i&&(t.push({year:i,items:[...o]}),i=s,o=[])}t.push({year:i,items:[...o]})}return t}const VV={},FV={width:"36",height:"36",viewBox:"0 0 36 36",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function qV(e,n){return h.openBlock(),h.createElementBlock("svg",FV,n[0]||(n[0]=[h.createElementVNode("path",{d:"M6.00003 17.9998H30",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),h.createElementVNode("path",{d:"M13.4994 25.5L5.99951 18L13.4995 10.5",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]))}const Vc=Et(VV,[["render",qV]]),GV={class:"px-8 pb-4 border-b border-chat-gray-5"},HV={class:"flex items-center gap-2"},zV={class:"grow overflow-x-hidden"},YV={class:"w-full flex justify-between items-center gap-4"},KV={class:"flex items-center"},WV={class:"font-semibold truncate"},$V=h.defineComponent({__name:"HomeHeader",props:{data:{},responsive:{}},emits:["call","back"],setup(e,{emit:n}){const t=e,i=n,o=()=>{var r,s;((r=t.data)==null?void 0:r.id)!=Fr.toString()&&((s=Fe.value)==null?void 0:s.user_type)=="tenant"&&(Io.value=t.data,In(He.CUSTOMER_DETAIL))};return(r,s)=>{var u,l,d,c,_,f,p,a,v,m;return h.openBlock(),h.createElementBlock("div",GV,[h.createElementVNode("div",HV,[h.createElementVNode("button",{class:"shrink-0 flex items-center",onClick:s[0]||(s[0]=g=>i("back"))},[h.createVNode(Vc)]),h.createVNode(Yo,{class:h.normalizeClass(["shrink-0",{"cursor-pointer":((u=h.unref(Fe))==null?void 0:u.user_type)=="tenant"}]),src:((l=r.data)==null?void 0:l.avatar)??"",id:((d=r.data)==null?void 0:d.id)??"",color:(c=r.data)==null?void 0:c.color,name:(_=r.data)==null?void 0:_.username,onClick:o},null,8,["class","src","id","color","name"]),h.createElementVNode("div",zV,[h.createElementVNode("div",YV,[h.createElementVNode("div",{class:h.normalizeClass(["grow overflow-x-hidden",{"cursor-pointer":((f=h.unref(Fe))==null?void 0:f.user_type)=="tenant"}]),onClick:o},[h.createElementVNode("div",KV,[h.createElementVNode("p",WV,h.toDisplayString(((p=r.data)==null?void 0:p.username)??"n/a"),1)])],2),(a=r.data)!=null&&a.id&&((v=r.data)==null?void 0:v.id)!=h.unref(Fr).toString()&&((m=h.unref(Fe))==null?void 0:m.user_type)=="tenant"?(h.openBlock(),h.createElementBlock("button",{key:0,class:"shrink-0 flex-center text-[#0051E6] bg-chat-haze-200 w-9 h-9 rounded-lg",onClick:s[1]||(s[1]=g=>i("call"))},[h.createVNode(UV)])):h.createCommentVNode("",!0)])])])])}}}),QV="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAYAAAA7MK6iAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAOpSURBVHgB7VZbaxNBFD4zmw1t4iWNF1pb2rXaiLfYKOqLYqrggwjWHyDGV1Er2l/gg09eKvrgmxHfRLDi5UHQRhRERVPT4qVV2UCtkpo2WpJKNrvjnKkJuW2yyat+sDCzMzvfnLPnO+cA/GsgUAdOhk+6bFQPGAQShq6FBnxXVagRNRNzUkWW2dCXmagCwKCzqUPVNOob8A0kajnHVmmxf+SYHwzqNwhT0TKAhoRs0y+Oxj4oo1MfxB7N0JQ17lXX+PAgekKW9F7GiJIx0sFKniDmlh3tZpSFuWWwwO6E5c6lIFMZ1EQUXky+Kdjra94IHvdqvARM/PoGSS0JK10d4CQNPed8V0JQi8UStQWGYxEYm/4M1RD+PiKefGi6Bpubvb18GCr3DQVzuNLcgnqB1huMLTZbNyUmlHXgretFMp0CQkAxPT9/kpUJv86Bmd+//A+/PM6tOeRG2NTqFeOx2DjEU9O5te4VXmi0N0I8OQ1jU+PinSzJ0NOxE5oaFoUMBteLZUfySHMywQCKpX4U3HCJww1n952ZJ+aHn39yKbd2elcfeJZ1wfPoCwi+ulHwXevCFvEUyy7nahs1Akj6cvJ1CWkxkGRPVw9YwdfZb/CSq+Bj/JMivPkXOWJGjGGn3QFWsX/dPuEFq3DITsBMV0J83ntlcLlj6bDHvarqISltTvzzwNZDYAXrl62F1gUt6gXv5WAJMSKToQc38E3VcPPtLUFu1eUrXe2g6+mCjSVysqJdjN577+6LMbocra8EO894xSgg5lF9GyPaCh6Nh0R0I2mbq63i3tGp92CzydfKEp+KHA9MzyW6s8nfClA66PJqwLQbS8X9pyPHekuIKQNXLDkFtQCTSNbl1SAyGaPd2XmuSGQMKehxd/XZJbvydXZS6C8fc9yyu+8ezBMm47n36HLG8xC6fCIxUULIlQIKr1TK4nY1o6eD2ffFKVOhku6nBA5jyhxSn4pkXy/2du4WKRMMuIOG5TcLpvW4f+T40JD6zF8ti5mhdVEL7GjbHjq38XJZvZlWJ2aQqKOGTFYMlBBjoJqtV6rHiXL6swrsVighP83WTTsQQo1Bz5LVfVjenDzPtnHX4WEojfD3SMHebSu2iOyUbX3SvI53NrXzQzJB0/OhAjDYsGoR3uxpujSIwdEfOREcm/l8OEvua/bCGnfnoJaRjvCpSwQnb/aAGvz/lu+3qhKbXMYlSSys/owqOEeZ6Hrt7W29Df287HjSKZbJf5jhD7eYnonr3cU0AAAAAElFTkSuQmCC",JV={class:"flex flex-col items-center justify-center text-center"},XV={class:"flex items-center gap-1"},ZV={class:"text-2xl font-semibold"},IR=h.defineComponent({__name:"NewCustomer",props:{data:{}},setup(e){return(n,t)=>{var i,o,r,s,u;return h.openBlock(),h.createElementBlock("div",JV,[h.createVNode(Yo,{class:"mb-4",src:((i=n.data)==null?void 0:i.avatar)??"",id:((o=n.data)==null?void 0:o.id)??"",color:(r=n.data)==null?void 0:r.color,name:(s=n.data)==null?void 0:s.username,size:"xxl"},null,8,["src","id","color","name"]),h.createElementVNode("div",XV,[h.createElementVNode("h2",ZV,h.toDisplayString(((u=n.data)==null?void 0:u.username)??"n/a"),1),t[0]||(t[0]=h.createElementVNode("img",{src:QV},null,-1))]),t[1]||(t[1]=h.createElementVNode("p",{class:"text-chat-haze-400 text-sm mt-3 max-w-md"}," You and the customer haven't had any conversations yet. Please send a message to start the conversation. ",-1))])}}}),e9={},t9={width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function n9(e,n){return h.openBlock(),h.createElementBlock("svg",t9,n[0]||(n[0]=[h.createElementVNode("path",{d:"M17.8325 0.166404C17.9118 0.245875 17.9661 0.346908 17.9885 0.456951C18.0109 0.566994 18.0005 0.681198 17.9585 0.785376L11.2894 17.4598C11.2306 17.6066 11.1325 17.7344 11.0058 17.8291C10.8791 17.9237 10.7287 17.9816 10.5712 17.9963C10.4137 18.011 10.2553 17.9819 10.1132 17.9124C9.97122 17.8428 9.85114 17.7354 9.76621 17.6019L6.12391 11.8764L0.399134 8.23367C0.265405 8.14883 0.15771 8.02869 0.0879332 7.88651C0.0181566 7.74432 -0.0109891 7.58562 0.00371211 7.42792C0.0184133 7.27022 0.0763899 7.11964 0.171244 6.99281C0.266099 6.86598 0.394144 6.76782 0.541251 6.70917L17.2136 0.0414633C17.3177 -0.000475161 17.4319 -0.0108827 17.542 0.0115334C17.652 0.0339496 17.753 0.0882016 17.8325 0.16755V0.166404ZM7.26772 11.5417L10.4321 16.5141L15.8566 2.95178L7.26772 11.5417ZM15.0463 2.14138L1.48564 7.56656L6.45857 10.7302L15.0474 2.14138H15.0463Z",fill:"#333333"},null,-1)]))}const i9=Et(e9,[["render",n9]]),CR="https://cdn.jsdelivr.net/npm/emoji-datasource-apple@6.0.1/img/apple/64",AR={recent:"Recently used",smileys_people:"Smiles & People",animals_nature:"Animals & Nature",food_drink:"Food & Drink",activities:"Activities",travel_places:"Travel places",objects:"Objects",symbols:"Symbols",flags:"Flags"},RR="u",Wl="n",$l="v",ms="r",o9={[Wl]:["grinning face","grinning"],[RR]:"1f600",[ms]:"1f600"},Ql="neutral",r9=[Ql,"1f3fb","1f3fc","1f3fd","1f3fe","1f3ff"],s9={placeholder:"Search emoji",skinTone:"Skin tone"},l9=["light","dark","auto"];var u9={smileys_people:[{n:["grinning face","grinning"],u:"1f600"},{n:["grinning face with smiling eyes","grin"],u:"1f601"},{n:["face with tears of joy","joy"],u:"1f602"},{n:["rolling on the floor laughing","rolling_on_the_floor_laughing"],u:"1f923"},{n:["smiling face with open mouth","smiley"],u:"1f603"},{n:["smiling face with open mouth and smiling eyes","smile"],u:"1f604"},{n:["smiling face with open mouth and cold sweat","sweat_smile"],u:"1f605"},{n:["smiling face with open mouth and tightly-closed eyes","laughing","satisfied"],u:"1f606"},{n:["winking face","wink"],u:"1f609"},{n:["smiling face with smiling eyes","blush"],u:"1f60a"},{n:["face savouring delicious food","yum"],u:"1f60b"},{n:["smiling face with sunglasses","sunglasses"],u:"1f60e"},{n:["smiling face with heart-shaped eyes","heart_eyes"],u:"1f60d"},{n:["face throwing a kiss","kissing_heart"],u:"1f618"},{n:["kissing face","kissing"],u:"1f617"},{n:["kissing face with smiling eyes","kissing_smiling_eyes"],u:"1f619"},{n:["kissing face with closed eyes","kissing_closed_eyes"],u:"1f61a"},{n:["white smiling face","relaxed"],u:"263a-fe0f"},{n:["slightly smiling face","slightly_smiling_face"],u:"1f642"},{n:["hugging face","hugging_face"],u:"1f917"},{n:["grinning face with star eyes","star-struck","grinning_face_with_star_eyes"],u:"1f929"},{n:["thinking face","thinking_face"],u:"1f914"},{n:["face with one eyebrow raised","face_with_raised_eyebrow","face_with_one_eyebrow_raised"],u:"1f928"},{n:["neutral face","neutral_face"],u:"1f610"},{n:["expressionless face","expressionless"],u:"1f611"},{n:["face without mouth","no_mouth"],u:"1f636"},{n:["face with rolling eyes","face_with_rolling_eyes"],u:"1f644"},{n:["smirking face","smirk"],u:"1f60f"},{n:["persevering face","persevere"],u:"1f623"},{n:["disappointed but relieved face","disappointed_relieved"],u:"1f625"},{n:["face with open mouth","open_mouth"],u:"1f62e"},{n:["zipper-mouth face","zipper_mouth_face"],u:"1f910"},{n:["hushed face","hushed"],u:"1f62f"},{n:["sleepy face","sleepy"],u:"1f62a"},{n:["tired face","tired_face"],u:"1f62b"},{n:["sleeping face","sleeping"],u:"1f634"},{n:["relieved face","relieved"],u:"1f60c"},{n:["face with stuck-out tongue","stuck_out_tongue"],u:"1f61b"},{n:["face with stuck-out tongue and winking eye","stuck_out_tongue_winking_eye"],u:"1f61c"},{n:["face with stuck-out tongue and tightly-closed eyes","stuck_out_tongue_closed_eyes"],u:"1f61d"},{n:["drooling face","drooling_face"],u:"1f924"},{n:["unamused face","unamused"],u:"1f612"},{n:["face with cold sweat","sweat"],u:"1f613"},{n:["pensive face","pensive"],u:"1f614"},{n:["confused face","confused"],u:"1f615"},{n:["upside-down face","upside_down_face"],u:"1f643"},{n:["money-mouth face","money_mouth_face"],u:"1f911"},{n:["astonished face","astonished"],u:"1f632"},{n:["white_frowning_face"],u:"2639-fe0f"},{n:["slightly frowning face","slightly_frowning_face"],u:"1f641"},{n:["confounded face","confounded"],u:"1f616"},{n:["disappointed face","disappointed"],u:"1f61e"},{n:["worried face","worried"],u:"1f61f"},{n:["face with look of triumph","triumph"],u:"1f624"},{n:["crying face","cry"],u:"1f622"},{n:["loudly crying face","sob"],u:"1f62d"},{n:["frowning face with open mouth","frowning"],u:"1f626"},{n:["anguished face","anguished"],u:"1f627"},{n:["fearful face","fearful"],u:"1f628"},{n:["weary face","weary"],u:"1f629"},{n:["shocked face with exploding head","exploding_head","shocked_face_with_exploding_head"],u:"1f92f"},{n:["grimacing face","grimacing"],u:"1f62c"},{n:["face with open mouth and cold sweat","cold_sweat"],u:"1f630"},{n:["face screaming in fear","scream"],u:"1f631"},{n:["flushed face","flushed"],u:"1f633"},{n:["grinning face with one large and one small eye","zany_face","grinning_face_with_one_large_and_one_small_eye"],u:"1f92a"},{n:["dizzy face","dizzy_face"],u:"1f635"},{n:["pouting face","rage"],u:"1f621"},{n:["angry face","angry"],u:"1f620"},{n:["serious face with symbols covering mouth","face_with_symbols_on_mouth","serious_face_with_symbols_covering_mouth"],u:"1f92c"},{n:["face with medical mask","mask"],u:"1f637"},{n:["face with thermometer","face_with_thermometer"],u:"1f912"},{n:["face with head-bandage","face_with_head_bandage"],u:"1f915"},{n:["nauseated face","nauseated_face"],u:"1f922"},{n:["face with open mouth vomiting","face_vomiting","face_with_open_mouth_vomiting"],u:"1f92e"},{n:["sneezing face","sneezing_face"],u:"1f927"},{n:["smiling face with halo","innocent"],u:"1f607"},{n:["face with cowboy hat","face_with_cowboy_hat"],u:"1f920"},{n:["clown face","clown_face"],u:"1f921"},{n:["lying face","lying_face"],u:"1f925"},{n:["face with finger covering closed lips","shushing_face","face_with_finger_covering_closed_lips"],u:"1f92b"},{n:["smiling face with smiling eyes and hand covering mouth","face_with_hand_over_mouth","smiling_face_with_smiling_eyes_and_hand_covering_mouth"],u:"1f92d"},{n:["face with monocle","face_with_monocle"],u:"1f9d0"},{n:["nerd face","nerd_face"],u:"1f913"},{n:["smiling face with horns","smiling_imp"],u:"1f608"},{n:["imp"],u:"1f47f"},{n:["japanese ogre","japanese_ogre"],u:"1f479"},{n:["japanese goblin","japanese_goblin"],u:"1f47a"},{n:["skull"],u:"1f480"},{n:["skull_and_crossbones"],u:"2620-fe0f"},{n:["ghost"],u:"1f47b"},{n:["extraterrestrial alien","alien"],u:"1f47d"},{n:["alien monster","space_invader"],u:"1f47e"},{n:["robot face","robot_face"],u:"1f916"},{n:["pile of poo","hankey","poop","shit"],u:"1f4a9"},{n:["smiling cat face with open mouth","smiley_cat"],u:"1f63a"},{n:["grinning cat face with smiling eyes","smile_cat"],u:"1f638"},{n:["cat face with tears of joy","joy_cat"],u:"1f639"},{n:["smiling cat face with heart-shaped eyes","heart_eyes_cat"],u:"1f63b"},{n:["cat face with wry smile","smirk_cat"],u:"1f63c"},{n:["kissing cat face with closed eyes","kissing_cat"],u:"1f63d"},{n:["weary cat face","scream_cat"],u:"1f640"},{n:["crying cat face","crying_cat_face"],u:"1f63f"},{n:["pouting cat face","pouting_cat"],u:"1f63e"},{n:["see-no-evil monkey","see_no_evil"],u:"1f648"},{n:["hear-no-evil monkey","hear_no_evil"],u:"1f649"},{n:["speak-no-evil monkey","speak_no_evil"],u:"1f64a"},{n:["baby"],u:"1f476",v:["1f476-1f3fb","1f476-1f3fc","1f476-1f3fd","1f476-1f3fe","1f476-1f3ff"]},{n:["child"],u:"1f9d2",v:["1f9d2-1f3fb","1f9d2-1f3fc","1f9d2-1f3fd","1f9d2-1f3fe","1f9d2-1f3ff"]},{n:["boy"],u:"1f466",v:["1f466-1f3fb","1f466-1f3fc","1f466-1f3fd","1f466-1f3fe","1f466-1f3ff"]},{n:["girl"],u:"1f467",v:["1f467-1f3fb","1f467-1f3fc","1f467-1f3fd","1f467-1f3fe","1f467-1f3ff"]},{n:["adult"],u:"1f9d1",v:["1f9d1-1f3fb","1f9d1-1f3fc","1f9d1-1f3fd","1f9d1-1f3fe","1f9d1-1f3ff"]},{n:["man"],u:"1f468",v:["1f468-1f3fb","1f468-1f3fc","1f468-1f3fd","1f468-1f3fe","1f468-1f3ff"]},{n:["woman"],u:"1f469",v:["1f469-1f3fb","1f469-1f3fc","1f469-1f3fd","1f469-1f3fe","1f469-1f3ff"]},{n:["older adult","older_adult"],u:"1f9d3",v:["1f9d3-1f3fb","1f9d3-1f3fc","1f9d3-1f3fd","1f9d3-1f3fe","1f9d3-1f3ff"]},{n:["older man","older_man"],u:"1f474",v:["1f474-1f3fb","1f474-1f3fc","1f474-1f3fd","1f474-1f3fe","1f474-1f3ff"]},{n:["older woman","older_woman"],u:"1f475",v:["1f475-1f3fb","1f475-1f3fc","1f475-1f3fd","1f475-1f3fe","1f475-1f3ff"]},{n:["male-doctor"],u:"1f468-200d-2695-fe0f",v:["1f468-1f3fb-200d-2695-fe0f","1f468-1f3fc-200d-2695-fe0f","1f468-1f3fd-200d-2695-fe0f","1f468-1f3fe-200d-2695-fe0f","1f468-1f3ff-200d-2695-fe0f"]},{n:["female-doctor"],u:"1f469-200d-2695-fe0f",v:["1f469-1f3fb-200d-2695-fe0f","1f469-1f3fc-200d-2695-fe0f","1f469-1f3fd-200d-2695-fe0f","1f469-1f3fe-200d-2695-fe0f","1f469-1f3ff-200d-2695-fe0f"]},{n:["male-student"],u:"1f468-200d-1f393",v:["1f468-1f3fb-200d-1f393","1f468-1f3fc-200d-1f393","1f468-1f3fd-200d-1f393","1f468-1f3fe-200d-1f393","1f468-1f3ff-200d-1f393"]},{n:["female-student"],u:"1f469-200d-1f393",v:["1f469-1f3fb-200d-1f393","1f469-1f3fc-200d-1f393","1f469-1f3fd-200d-1f393","1f469-1f3fe-200d-1f393","1f469-1f3ff-200d-1f393"]},{n:["male-teacher"],u:"1f468-200d-1f3eb",v:["1f468-1f3fb-200d-1f3eb","1f468-1f3fc-200d-1f3eb","1f468-1f3fd-200d-1f3eb","1f468-1f3fe-200d-1f3eb","1f468-1f3ff-200d-1f3eb"]},{n:["female-teacher"],u:"1f469-200d-1f3eb",v:["1f469-1f3fb-200d-1f3eb","1f469-1f3fc-200d-1f3eb","1f469-1f3fd-200d-1f3eb","1f469-1f3fe-200d-1f3eb","1f469-1f3ff-200d-1f3eb"]},{n:["male-judge"],u:"1f468-200d-2696-fe0f",v:["1f468-1f3fb-200d-2696-fe0f","1f468-1f3fc-200d-2696-fe0f","1f468-1f3fd-200d-2696-fe0f","1f468-1f3fe-200d-2696-fe0f","1f468-1f3ff-200d-2696-fe0f"]},{n:["female-judge"],u:"1f469-200d-2696-fe0f",v:["1f469-1f3fb-200d-2696-fe0f","1f469-1f3fc-200d-2696-fe0f","1f469-1f3fd-200d-2696-fe0f","1f469-1f3fe-200d-2696-fe0f","1f469-1f3ff-200d-2696-fe0f"]},{n:["male-farmer"],u:"1f468-200d-1f33e",v:["1f468-1f3fb-200d-1f33e","1f468-1f3fc-200d-1f33e","1f468-1f3fd-200d-1f33e","1f468-1f3fe-200d-1f33e","1f468-1f3ff-200d-1f33e"]},{n:["female-farmer"],u:"1f469-200d-1f33e",v:["1f469-1f3fb-200d-1f33e","1f469-1f3fc-200d-1f33e","1f469-1f3fd-200d-1f33e","1f469-1f3fe-200d-1f33e","1f469-1f3ff-200d-1f33e"]},{n:["male-cook"],u:"1f468-200d-1f373",v:["1f468-1f3fb-200d-1f373","1f468-1f3fc-200d-1f373","1f468-1f3fd-200d-1f373","1f468-1f3fe-200d-1f373","1f468-1f3ff-200d-1f373"]},{n:["female-cook"],u:"1f469-200d-1f373",v:["1f469-1f3fb-200d-1f373","1f469-1f3fc-200d-1f373","1f469-1f3fd-200d-1f373","1f469-1f3fe-200d-1f373","1f469-1f3ff-200d-1f373"]},{n:["male-mechanic"],u:"1f468-200d-1f527",v:["1f468-1f3fb-200d-1f527","1f468-1f3fc-200d-1f527","1f468-1f3fd-200d-1f527","1f468-1f3fe-200d-1f527","1f468-1f3ff-200d-1f527"]},{n:["female-mechanic"],u:"1f469-200d-1f527",v:["1f469-1f3fb-200d-1f527","1f469-1f3fc-200d-1f527","1f469-1f3fd-200d-1f527","1f469-1f3fe-200d-1f527","1f469-1f3ff-200d-1f527"]},{n:["male-factory-worker"],u:"1f468-200d-1f3ed",v:["1f468-1f3fb-200d-1f3ed","1f468-1f3fc-200d-1f3ed","1f468-1f3fd-200d-1f3ed","1f468-1f3fe-200d-1f3ed","1f468-1f3ff-200d-1f3ed"]},{n:["female-factory-worker"],u:"1f469-200d-1f3ed",v:["1f469-1f3fb-200d-1f3ed","1f469-1f3fc-200d-1f3ed","1f469-1f3fd-200d-1f3ed","1f469-1f3fe-200d-1f3ed","1f469-1f3ff-200d-1f3ed"]},{n:["male-office-worker"],u:"1f468-200d-1f4bc",v:["1f468-1f3fb-200d-1f4bc","1f468-1f3fc-200d-1f4bc","1f468-1f3fd-200d-1f4bc","1f468-1f3fe-200d-1f4bc","1f468-1f3ff-200d-1f4bc"]},{n:["female-office-worker"],u:"1f469-200d-1f4bc",v:["1f469-1f3fb-200d-1f4bc","1f469-1f3fc-200d-1f4bc","1f469-1f3fd-200d-1f4bc","1f469-1f3fe-200d-1f4bc","1f469-1f3ff-200d-1f4bc"]},{n:["male-scientist"],u:"1f468-200d-1f52c",v:["1f468-1f3fb-200d-1f52c","1f468-1f3fc-200d-1f52c","1f468-1f3fd-200d-1f52c","1f468-1f3fe-200d-1f52c","1f468-1f3ff-200d-1f52c"]},{n:["female-scientist"],u:"1f469-200d-1f52c",v:["1f469-1f3fb-200d-1f52c","1f469-1f3fc-200d-1f52c","1f469-1f3fd-200d-1f52c","1f469-1f3fe-200d-1f52c","1f469-1f3ff-200d-1f52c"]},{n:["male-technologist"],u:"1f468-200d-1f4bb",v:["1f468-1f3fb-200d-1f4bb","1f468-1f3fc-200d-1f4bb","1f468-1f3fd-200d-1f4bb","1f468-1f3fe-200d-1f4bb","1f468-1f3ff-200d-1f4bb"]},{n:["female-technologist"],u:"1f469-200d-1f4bb",v:["1f469-1f3fb-200d-1f4bb","1f469-1f3fc-200d-1f4bb","1f469-1f3fd-200d-1f4bb","1f469-1f3fe-200d-1f4bb","1f469-1f3ff-200d-1f4bb"]},{n:["male-singer"],u:"1f468-200d-1f3a4",v:["1f468-1f3fb-200d-1f3a4","1f468-1f3fc-200d-1f3a4","1f468-1f3fd-200d-1f3a4","1f468-1f3fe-200d-1f3a4","1f468-1f3ff-200d-1f3a4"]},{n:["female-singer"],u:"1f469-200d-1f3a4",v:["1f469-1f3fb-200d-1f3a4","1f469-1f3fc-200d-1f3a4","1f469-1f3fd-200d-1f3a4","1f469-1f3fe-200d-1f3a4","1f469-1f3ff-200d-1f3a4"]},{n:["male-artist"],u:"1f468-200d-1f3a8",v:["1f468-1f3fb-200d-1f3a8","1f468-1f3fc-200d-1f3a8","1f468-1f3fd-200d-1f3a8","1f468-1f3fe-200d-1f3a8","1f468-1f3ff-200d-1f3a8"]},{n:["female-artist"],u:"1f469-200d-1f3a8",v:["1f469-1f3fb-200d-1f3a8","1f469-1f3fc-200d-1f3a8","1f469-1f3fd-200d-1f3a8","1f469-1f3fe-200d-1f3a8","1f469-1f3ff-200d-1f3a8"]},{n:["male-pilot"],u:"1f468-200d-2708-fe0f",v:["1f468-1f3fb-200d-2708-fe0f","1f468-1f3fc-200d-2708-fe0f","1f468-1f3fd-200d-2708-fe0f","1f468-1f3fe-200d-2708-fe0f","1f468-1f3ff-200d-2708-fe0f"]},{n:["female-pilot"],u:"1f469-200d-2708-fe0f",v:["1f469-1f3fb-200d-2708-fe0f","1f469-1f3fc-200d-2708-fe0f","1f469-1f3fd-200d-2708-fe0f","1f469-1f3fe-200d-2708-fe0f","1f469-1f3ff-200d-2708-fe0f"]},{n:["male-astronaut"],u:"1f468-200d-1f680",v:["1f468-1f3fb-200d-1f680","1f468-1f3fc-200d-1f680","1f468-1f3fd-200d-1f680","1f468-1f3fe-200d-1f680","1f468-1f3ff-200d-1f680"]},{n:["female-astronaut"],u:"1f469-200d-1f680",v:["1f469-1f3fb-200d-1f680","1f469-1f3fc-200d-1f680","1f469-1f3fd-200d-1f680","1f469-1f3fe-200d-1f680","1f469-1f3ff-200d-1f680"]},{n:["male-firefighter"],u:"1f468-200d-1f692",v:["1f468-1f3fb-200d-1f692","1f468-1f3fc-200d-1f692","1f468-1f3fd-200d-1f692","1f468-1f3fe-200d-1f692","1f468-1f3ff-200d-1f692"]},{n:["female-firefighter"],u:"1f469-200d-1f692",v:["1f469-1f3fb-200d-1f692","1f469-1f3fc-200d-1f692","1f469-1f3fd-200d-1f692","1f469-1f3fe-200d-1f692","1f469-1f3ff-200d-1f692"]},{n:["police officer","cop"],u:"1f46e",v:["1f46e-1f3fb","1f46e-1f3fc","1f46e-1f3fd","1f46e-1f3fe","1f46e-1f3ff"]},{n:["male-police-officer"],u:"1f46e-200d-2642-fe0f",v:["1f46e-1f3fb-200d-2642-fe0f","1f46e-1f3fc-200d-2642-fe0f","1f46e-1f3fd-200d-2642-fe0f","1f46e-1f3fe-200d-2642-fe0f","1f46e-1f3ff-200d-2642-fe0f"]},{n:["female-police-officer"],u:"1f46e-200d-2640-fe0f",v:["1f46e-1f3fb-200d-2640-fe0f","1f46e-1f3fc-200d-2640-fe0f","1f46e-1f3fd-200d-2640-fe0f","1f46e-1f3fe-200d-2640-fe0f","1f46e-1f3ff-200d-2640-fe0f"]},{n:["sleuth_or_spy"],u:"1f575-fe0f",v:["1f575-1f3fb","1f575-1f3fc","1f575-1f3fd","1f575-1f3fe","1f575-1f3ff"]},{n:["male-detective"],u:"1f575-fe0f-200d-2642-fe0f",v:["1f575-1f3fb-200d-2642-fe0f","1f575-1f3fc-200d-2642-fe0f","1f575-1f3fd-200d-2642-fe0f","1f575-1f3fe-200d-2642-fe0f","1f575-1f3ff-200d-2642-fe0f"]},{n:["female-detective"],u:"1f575-fe0f-200d-2640-fe0f",v:["1f575-1f3fb-200d-2640-fe0f","1f575-1f3fc-200d-2640-fe0f","1f575-1f3fd-200d-2640-fe0f","1f575-1f3fe-200d-2640-fe0f","1f575-1f3ff-200d-2640-fe0f"]},{n:["guardsman"],u:"1f482",v:["1f482-1f3fb","1f482-1f3fc","1f482-1f3fd","1f482-1f3fe","1f482-1f3ff"]},{n:["male-guard"],u:"1f482-200d-2642-fe0f",v:["1f482-1f3fb-200d-2642-fe0f","1f482-1f3fc-200d-2642-fe0f","1f482-1f3fd-200d-2642-fe0f","1f482-1f3fe-200d-2642-fe0f","1f482-1f3ff-200d-2642-fe0f"]},{n:["female-guard"],u:"1f482-200d-2640-fe0f",v:["1f482-1f3fb-200d-2640-fe0f","1f482-1f3fc-200d-2640-fe0f","1f482-1f3fd-200d-2640-fe0f","1f482-1f3fe-200d-2640-fe0f","1f482-1f3ff-200d-2640-fe0f"]},{n:["construction worker","construction_worker"],u:"1f477",v:["1f477-1f3fb","1f477-1f3fc","1f477-1f3fd","1f477-1f3fe","1f477-1f3ff"]},{n:["male-construction-worker"],u:"1f477-200d-2642-fe0f",v:["1f477-1f3fb-200d-2642-fe0f","1f477-1f3fc-200d-2642-fe0f","1f477-1f3fd-200d-2642-fe0f","1f477-1f3fe-200d-2642-fe0f","1f477-1f3ff-200d-2642-fe0f"]},{n:["female-construction-worker"],u:"1f477-200d-2640-fe0f",v:["1f477-1f3fb-200d-2640-fe0f","1f477-1f3fc-200d-2640-fe0f","1f477-1f3fd-200d-2640-fe0f","1f477-1f3fe-200d-2640-fe0f","1f477-1f3ff-200d-2640-fe0f"]},{n:["prince"],u:"1f934",v:["1f934-1f3fb","1f934-1f3fc","1f934-1f3fd","1f934-1f3fe","1f934-1f3ff"]},{n:["princess"],u:"1f478",v:["1f478-1f3fb","1f478-1f3fc","1f478-1f3fd","1f478-1f3fe","1f478-1f3ff"]},{n:["man with turban","man_with_turban"],u:"1f473",v:["1f473-1f3fb","1f473-1f3fc","1f473-1f3fd","1f473-1f3fe","1f473-1f3ff"]},{n:["man-wearing-turban"],u:"1f473-200d-2642-fe0f",v:["1f473-1f3fb-200d-2642-fe0f","1f473-1f3fc-200d-2642-fe0f","1f473-1f3fd-200d-2642-fe0f","1f473-1f3fe-200d-2642-fe0f","1f473-1f3ff-200d-2642-fe0f"]},{n:["woman-wearing-turban"],u:"1f473-200d-2640-fe0f",v:["1f473-1f3fb-200d-2640-fe0f","1f473-1f3fc-200d-2640-fe0f","1f473-1f3fd-200d-2640-fe0f","1f473-1f3fe-200d-2640-fe0f","1f473-1f3ff-200d-2640-fe0f"]},{n:["man with gua pi mao","man_with_gua_pi_mao"],u:"1f472",v:["1f472-1f3fb","1f472-1f3fc","1f472-1f3fd","1f472-1f3fe","1f472-1f3ff"]},{n:["person with headscarf","person_with_headscarf"],u:"1f9d5",v:["1f9d5-1f3fb","1f9d5-1f3fc","1f9d5-1f3fd","1f9d5-1f3fe","1f9d5-1f3ff"]},{n:["bearded person","bearded_person"],u:"1f9d4",v:["1f9d4-1f3fb","1f9d4-1f3fc","1f9d4-1f3fd","1f9d4-1f3fe","1f9d4-1f3ff"]},{n:["person with blond hair","person_with_blond_hair"],u:"1f471",v:["1f471-1f3fb","1f471-1f3fc","1f471-1f3fd","1f471-1f3fe","1f471-1f3ff"]},{n:["blond-haired-man"],u:"1f471-200d-2642-fe0f",v:["1f471-1f3fb-200d-2642-fe0f","1f471-1f3fc-200d-2642-fe0f","1f471-1f3fd-200d-2642-fe0f","1f471-1f3fe-200d-2642-fe0f","1f471-1f3ff-200d-2642-fe0f"]},{n:["blond-haired-woman"],u:"1f471-200d-2640-fe0f",v:["1f471-1f3fb-200d-2640-fe0f","1f471-1f3fc-200d-2640-fe0f","1f471-1f3fd-200d-2640-fe0f","1f471-1f3fe-200d-2640-fe0f","1f471-1f3ff-200d-2640-fe0f"]},{n:["man in tuxedo","man_in_tuxedo"],u:"1f935",v:["1f935-1f3fb","1f935-1f3fc","1f935-1f3fd","1f935-1f3fe","1f935-1f3ff"]},{n:["bride with veil","bride_with_veil"],u:"1f470",v:["1f470-1f3fb","1f470-1f3fc","1f470-1f3fd","1f470-1f3fe","1f470-1f3ff"]},{n:["pregnant woman","pregnant_woman"],u:"1f930",v:["1f930-1f3fb","1f930-1f3fc","1f930-1f3fd","1f930-1f3fe","1f930-1f3ff"]},{n:["breast-feeding"],u:"1f931",v:["1f931-1f3fb","1f931-1f3fc","1f931-1f3fd","1f931-1f3fe","1f931-1f3ff"]},{n:["baby angel","angel"],u:"1f47c",v:["1f47c-1f3fb","1f47c-1f3fc","1f47c-1f3fd","1f47c-1f3fe","1f47c-1f3ff"]},{n:["father christmas","santa"],u:"1f385",v:["1f385-1f3fb","1f385-1f3fc","1f385-1f3fd","1f385-1f3fe","1f385-1f3ff"]},{n:["mother christmas","mrs_claus","mother_christmas"],u:"1f936",v:["1f936-1f3fb","1f936-1f3fc","1f936-1f3fd","1f936-1f3fe","1f936-1f3ff"]},{n:["mage"],u:"1f9d9",v:["1f9d9-1f3fb","1f9d9-1f3fc","1f9d9-1f3fd","1f9d9-1f3fe","1f9d9-1f3ff"]},{n:["female_mage"],u:"1f9d9-200d-2640-fe0f",v:["1f9d9-1f3fb-200d-2640-fe0f","1f9d9-1f3fc-200d-2640-fe0f","1f9d9-1f3fd-200d-2640-fe0f","1f9d9-1f3fe-200d-2640-fe0f","1f9d9-1f3ff-200d-2640-fe0f"]},{n:["male_mage"],u:"1f9d9-200d-2642-fe0f",v:["1f9d9-1f3fb-200d-2642-fe0f","1f9d9-1f3fc-200d-2642-fe0f","1f9d9-1f3fd-200d-2642-fe0f","1f9d9-1f3fe-200d-2642-fe0f","1f9d9-1f3ff-200d-2642-fe0f"]},{n:["fairy"],u:"1f9da",v:["1f9da-1f3fb","1f9da-1f3fc","1f9da-1f3fd","1f9da-1f3fe","1f9da-1f3ff"]},{n:["female_fairy"],u:"1f9da-200d-2640-fe0f",v:["1f9da-1f3fb-200d-2640-fe0f","1f9da-1f3fc-200d-2640-fe0f","1f9da-1f3fd-200d-2640-fe0f","1f9da-1f3fe-200d-2640-fe0f","1f9da-1f3ff-200d-2640-fe0f"]},{n:["male_fairy"],u:"1f9da-200d-2642-fe0f",v:["1f9da-1f3fb-200d-2642-fe0f","1f9da-1f3fc-200d-2642-fe0f","1f9da-1f3fd-200d-2642-fe0f","1f9da-1f3fe-200d-2642-fe0f","1f9da-1f3ff-200d-2642-fe0f"]},{n:["vampire"],u:"1f9db",v:["1f9db-1f3fb","1f9db-1f3fc","1f9db-1f3fd","1f9db-1f3fe","1f9db-1f3ff"]},{n:["female_vampire"],u:"1f9db-200d-2640-fe0f",v:["1f9db-1f3fb-200d-2640-fe0f","1f9db-1f3fc-200d-2640-fe0f","1f9db-1f3fd-200d-2640-fe0f","1f9db-1f3fe-200d-2640-fe0f","1f9db-1f3ff-200d-2640-fe0f"]},{n:["male_vampire"],u:"1f9db-200d-2642-fe0f",v:["1f9db-1f3fb-200d-2642-fe0f","1f9db-1f3fc-200d-2642-fe0f","1f9db-1f3fd-200d-2642-fe0f","1f9db-1f3fe-200d-2642-fe0f","1f9db-1f3ff-200d-2642-fe0f"]},{n:["merperson"],u:"1f9dc",v:["1f9dc-1f3fb","1f9dc-1f3fc","1f9dc-1f3fd","1f9dc-1f3fe","1f9dc-1f3ff"]},{n:["mermaid"],u:"1f9dc-200d-2640-fe0f",v:["1f9dc-1f3fb-200d-2640-fe0f","1f9dc-1f3fc-200d-2640-fe0f","1f9dc-1f3fd-200d-2640-fe0f","1f9dc-1f3fe-200d-2640-fe0f","1f9dc-1f3ff-200d-2640-fe0f"]},{n:["merman"],u:"1f9dc-200d-2642-fe0f",v:["1f9dc-1f3fb-200d-2642-fe0f","1f9dc-1f3fc-200d-2642-fe0f","1f9dc-1f3fd-200d-2642-fe0f","1f9dc-1f3fe-200d-2642-fe0f","1f9dc-1f3ff-200d-2642-fe0f"]},{n:["elf"],u:"1f9dd",v:["1f9dd-1f3fb","1f9dd-1f3fc","1f9dd-1f3fd","1f9dd-1f3fe","1f9dd-1f3ff"]},{n:["female_elf"],u:"1f9dd-200d-2640-fe0f",v:["1f9dd-1f3fb-200d-2640-fe0f","1f9dd-1f3fc-200d-2640-fe0f","1f9dd-1f3fd-200d-2640-fe0f","1f9dd-1f3fe-200d-2640-fe0f","1f9dd-1f3ff-200d-2640-fe0f"]},{n:["male_elf"],u:"1f9dd-200d-2642-fe0f",v:["1f9dd-1f3fb-200d-2642-fe0f","1f9dd-1f3fc-200d-2642-fe0f","1f9dd-1f3fd-200d-2642-fe0f","1f9dd-1f3fe-200d-2642-fe0f","1f9dd-1f3ff-200d-2642-fe0f"]},{n:["genie"],u:"1f9de"},{n:["female_genie"],u:"1f9de-200d-2640-fe0f"},{n:["male_genie"],u:"1f9de-200d-2642-fe0f"},{n:["zombie"],u:"1f9df"},{n:["female_zombie"],u:"1f9df-200d-2640-fe0f"},{n:["male_zombie"],u:"1f9df-200d-2642-fe0f"},{n:["person frowning","person_frowning"],u:"1f64d",v:["1f64d-1f3fb","1f64d-1f3fc","1f64d-1f3fd","1f64d-1f3fe","1f64d-1f3ff"]},{n:["man-frowning"],u:"1f64d-200d-2642-fe0f",v:["1f64d-1f3fb-200d-2642-fe0f","1f64d-1f3fc-200d-2642-fe0f","1f64d-1f3fd-200d-2642-fe0f","1f64d-1f3fe-200d-2642-fe0f","1f64d-1f3ff-200d-2642-fe0f"]},{n:["woman-frowning"],u:"1f64d-200d-2640-fe0f",v:["1f64d-1f3fb-200d-2640-fe0f","1f64d-1f3fc-200d-2640-fe0f","1f64d-1f3fd-200d-2640-fe0f","1f64d-1f3fe-200d-2640-fe0f","1f64d-1f3ff-200d-2640-fe0f"]},{n:["person with pouting face","person_with_pouting_face"],u:"1f64e",v:["1f64e-1f3fb","1f64e-1f3fc","1f64e-1f3fd","1f64e-1f3fe","1f64e-1f3ff"]},{n:["man-pouting"],u:"1f64e-200d-2642-fe0f",v:["1f64e-1f3fb-200d-2642-fe0f","1f64e-1f3fc-200d-2642-fe0f","1f64e-1f3fd-200d-2642-fe0f","1f64e-1f3fe-200d-2642-fe0f","1f64e-1f3ff-200d-2642-fe0f"]},{n:["woman-pouting"],u:"1f64e-200d-2640-fe0f",v:["1f64e-1f3fb-200d-2640-fe0f","1f64e-1f3fc-200d-2640-fe0f","1f64e-1f3fd-200d-2640-fe0f","1f64e-1f3fe-200d-2640-fe0f","1f64e-1f3ff-200d-2640-fe0f"]},{n:["face with no good gesture","no_good"],u:"1f645",v:["1f645-1f3fb","1f645-1f3fc","1f645-1f3fd","1f645-1f3fe","1f645-1f3ff"]},{n:["man-gesturing-no"],u:"1f645-200d-2642-fe0f",v:["1f645-1f3fb-200d-2642-fe0f","1f645-1f3fc-200d-2642-fe0f","1f645-1f3fd-200d-2642-fe0f","1f645-1f3fe-200d-2642-fe0f","1f645-1f3ff-200d-2642-fe0f"]},{n:["woman-gesturing-no"],u:"1f645-200d-2640-fe0f",v:["1f645-1f3fb-200d-2640-fe0f","1f645-1f3fc-200d-2640-fe0f","1f645-1f3fd-200d-2640-fe0f","1f645-1f3fe-200d-2640-fe0f","1f645-1f3ff-200d-2640-fe0f"]},{n:["face with ok gesture","ok_woman"],u:"1f646",v:["1f646-1f3fb","1f646-1f3fc","1f646-1f3fd","1f646-1f3fe","1f646-1f3ff"]},{n:["man-gesturing-ok"],u:"1f646-200d-2642-fe0f",v:["1f646-1f3fb-200d-2642-fe0f","1f646-1f3fc-200d-2642-fe0f","1f646-1f3fd-200d-2642-fe0f","1f646-1f3fe-200d-2642-fe0f","1f646-1f3ff-200d-2642-fe0f"]},{n:["woman-gesturing-ok"],u:"1f646-200d-2640-fe0f",v:["1f646-1f3fb-200d-2640-fe0f","1f646-1f3fc-200d-2640-fe0f","1f646-1f3fd-200d-2640-fe0f","1f646-1f3fe-200d-2640-fe0f","1f646-1f3ff-200d-2640-fe0f"]},{n:["information desk person","information_desk_person"],u:"1f481",v:["1f481-1f3fb","1f481-1f3fc","1f481-1f3fd","1f481-1f3fe","1f481-1f3ff"]},{n:["man-tipping-hand"],u:"1f481-200d-2642-fe0f",v:["1f481-1f3fb-200d-2642-fe0f","1f481-1f3fc-200d-2642-fe0f","1f481-1f3fd-200d-2642-fe0f","1f481-1f3fe-200d-2642-fe0f","1f481-1f3ff-200d-2642-fe0f"]},{n:["woman-tipping-hand"],u:"1f481-200d-2640-fe0f",v:["1f481-1f3fb-200d-2640-fe0f","1f481-1f3fc-200d-2640-fe0f","1f481-1f3fd-200d-2640-fe0f","1f481-1f3fe-200d-2640-fe0f","1f481-1f3ff-200d-2640-fe0f"]},{n:["happy person raising one hand","raising_hand"],u:"1f64b",v:["1f64b-1f3fb","1f64b-1f3fc","1f64b-1f3fd","1f64b-1f3fe","1f64b-1f3ff"]},{n:["man-raising-hand"],u:"1f64b-200d-2642-fe0f",v:["1f64b-1f3fb-200d-2642-fe0f","1f64b-1f3fc-200d-2642-fe0f","1f64b-1f3fd-200d-2642-fe0f","1f64b-1f3fe-200d-2642-fe0f","1f64b-1f3ff-200d-2642-fe0f"]},{n:["woman-raising-hand"],u:"1f64b-200d-2640-fe0f",v:["1f64b-1f3fb-200d-2640-fe0f","1f64b-1f3fc-200d-2640-fe0f","1f64b-1f3fd-200d-2640-fe0f","1f64b-1f3fe-200d-2640-fe0f","1f64b-1f3ff-200d-2640-fe0f"]},{n:["person bowing deeply","bow"],u:"1f647",v:["1f647-1f3fb","1f647-1f3fc","1f647-1f3fd","1f647-1f3fe","1f647-1f3ff"]},{n:["man-bowing"],u:"1f647-200d-2642-fe0f",v:["1f647-1f3fb-200d-2642-fe0f","1f647-1f3fc-200d-2642-fe0f","1f647-1f3fd-200d-2642-fe0f","1f647-1f3fe-200d-2642-fe0f","1f647-1f3ff-200d-2642-fe0f"]},{n:["woman-bowing"],u:"1f647-200d-2640-fe0f",v:["1f647-1f3fb-200d-2640-fe0f","1f647-1f3fc-200d-2640-fe0f","1f647-1f3fd-200d-2640-fe0f","1f647-1f3fe-200d-2640-fe0f","1f647-1f3ff-200d-2640-fe0f"]},{n:["face palm","face_palm"],u:"1f926",v:["1f926-1f3fb","1f926-1f3fc","1f926-1f3fd","1f926-1f3fe","1f926-1f3ff"]},{n:["man-facepalming"],u:"1f926-200d-2642-fe0f",v:["1f926-1f3fb-200d-2642-fe0f","1f926-1f3fc-200d-2642-fe0f","1f926-1f3fd-200d-2642-fe0f","1f926-1f3fe-200d-2642-fe0f","1f926-1f3ff-200d-2642-fe0f"]},{n:["woman-facepalming"],u:"1f926-200d-2640-fe0f",v:["1f926-1f3fb-200d-2640-fe0f","1f926-1f3fc-200d-2640-fe0f","1f926-1f3fd-200d-2640-fe0f","1f926-1f3fe-200d-2640-fe0f","1f926-1f3ff-200d-2640-fe0f"]},{n:["shrug"],u:"1f937",v:["1f937-1f3fb","1f937-1f3fc","1f937-1f3fd","1f937-1f3fe","1f937-1f3ff"]},{n:["man-shrugging"],u:"1f937-200d-2642-fe0f",v:["1f937-1f3fb-200d-2642-fe0f","1f937-1f3fc-200d-2642-fe0f","1f937-1f3fd-200d-2642-fe0f","1f937-1f3fe-200d-2642-fe0f","1f937-1f3ff-200d-2642-fe0f"]},{n:["woman-shrugging"],u:"1f937-200d-2640-fe0f",v:["1f937-1f3fb-200d-2640-fe0f","1f937-1f3fc-200d-2640-fe0f","1f937-1f3fd-200d-2640-fe0f","1f937-1f3fe-200d-2640-fe0f","1f937-1f3ff-200d-2640-fe0f"]},{n:["face massage","massage"],u:"1f486",v:["1f486-1f3fb","1f486-1f3fc","1f486-1f3fd","1f486-1f3fe","1f486-1f3ff"]},{n:["man-getting-massage"],u:"1f486-200d-2642-fe0f",v:["1f486-1f3fb-200d-2642-fe0f","1f486-1f3fc-200d-2642-fe0f","1f486-1f3fd-200d-2642-fe0f","1f486-1f3fe-200d-2642-fe0f","1f486-1f3ff-200d-2642-fe0f"]},{n:["woman-getting-massage"],u:"1f486-200d-2640-fe0f",v:["1f486-1f3fb-200d-2640-fe0f","1f486-1f3fc-200d-2640-fe0f","1f486-1f3fd-200d-2640-fe0f","1f486-1f3fe-200d-2640-fe0f","1f486-1f3ff-200d-2640-fe0f"]},{n:["haircut"],u:"1f487",v:["1f487-1f3fb","1f487-1f3fc","1f487-1f3fd","1f487-1f3fe","1f487-1f3ff"]},{n:["man-getting-haircut"],u:"1f487-200d-2642-fe0f",v:["1f487-1f3fb-200d-2642-fe0f","1f487-1f3fc-200d-2642-fe0f","1f487-1f3fd-200d-2642-fe0f","1f487-1f3fe-200d-2642-fe0f","1f487-1f3ff-200d-2642-fe0f"]},{n:["woman-getting-haircut"],u:"1f487-200d-2640-fe0f",v:["1f487-1f3fb-200d-2640-fe0f","1f487-1f3fc-200d-2640-fe0f","1f487-1f3fd-200d-2640-fe0f","1f487-1f3fe-200d-2640-fe0f","1f487-1f3ff-200d-2640-fe0f"]},{n:["pedestrian","walking"],u:"1f6b6",v:["1f6b6-1f3fb","1f6b6-1f3fc","1f6b6-1f3fd","1f6b6-1f3fe","1f6b6-1f3ff"]},{n:["man-walking"],u:"1f6b6-200d-2642-fe0f",v:["1f6b6-1f3fb-200d-2642-fe0f","1f6b6-1f3fc-200d-2642-fe0f","1f6b6-1f3fd-200d-2642-fe0f","1f6b6-1f3fe-200d-2642-fe0f","1f6b6-1f3ff-200d-2642-fe0f"]},{n:["woman-walking"],u:"1f6b6-200d-2640-fe0f",v:["1f6b6-1f3fb-200d-2640-fe0f","1f6b6-1f3fc-200d-2640-fe0f","1f6b6-1f3fd-200d-2640-fe0f","1f6b6-1f3fe-200d-2640-fe0f","1f6b6-1f3ff-200d-2640-fe0f"]},{n:["runner","running"],u:"1f3c3",v:["1f3c3-1f3fb","1f3c3-1f3fc","1f3c3-1f3fd","1f3c3-1f3fe","1f3c3-1f3ff"]},{n:["man-running"],u:"1f3c3-200d-2642-fe0f",v:["1f3c3-1f3fb-200d-2642-fe0f","1f3c3-1f3fc-200d-2642-fe0f","1f3c3-1f3fd-200d-2642-fe0f","1f3c3-1f3fe-200d-2642-fe0f","1f3c3-1f3ff-200d-2642-fe0f"]},{n:["woman-running"],u:"1f3c3-200d-2640-fe0f",v:["1f3c3-1f3fb-200d-2640-fe0f","1f3c3-1f3fc-200d-2640-fe0f","1f3c3-1f3fd-200d-2640-fe0f","1f3c3-1f3fe-200d-2640-fe0f","1f3c3-1f3ff-200d-2640-fe0f"]},{n:["dancer"],u:"1f483",v:["1f483-1f3fb","1f483-1f3fc","1f483-1f3fd","1f483-1f3fe","1f483-1f3ff"]},{n:["man dancing","man_dancing"],u:"1f57a",v:["1f57a-1f3fb","1f57a-1f3fc","1f57a-1f3fd","1f57a-1f3fe","1f57a-1f3ff"]},{n:["woman with bunny ears","dancers"],u:"1f46f"},{n:["man-with-bunny-ears-partying"],u:"1f46f-200d-2642-fe0f"},{n:["woman-with-bunny-ears-partying"],u:"1f46f-200d-2640-fe0f"},{n:["person in steamy room","person_in_steamy_room"],u:"1f9d6",v:["1f9d6-1f3fb","1f9d6-1f3fc","1f9d6-1f3fd","1f9d6-1f3fe","1f9d6-1f3ff"]},{n:["woman_in_steamy_room"],u:"1f9d6-200d-2640-fe0f",v:["1f9d6-1f3fb-200d-2640-fe0f","1f9d6-1f3fc-200d-2640-fe0f","1f9d6-1f3fd-200d-2640-fe0f","1f9d6-1f3fe-200d-2640-fe0f","1f9d6-1f3ff-200d-2640-fe0f"]},{n:["man_in_steamy_room"],u:"1f9d6-200d-2642-fe0f",v:["1f9d6-1f3fb-200d-2642-fe0f","1f9d6-1f3fc-200d-2642-fe0f","1f9d6-1f3fd-200d-2642-fe0f","1f9d6-1f3fe-200d-2642-fe0f","1f9d6-1f3ff-200d-2642-fe0f"]},{n:["person climbing","person_climbing"],u:"1f9d7",v:["1f9d7-1f3fb","1f9d7-1f3fc","1f9d7-1f3fd","1f9d7-1f3fe","1f9d7-1f3ff"]},{n:["woman_climbing"],u:"1f9d7-200d-2640-fe0f",v:["1f9d7-1f3fb-200d-2640-fe0f","1f9d7-1f3fc-200d-2640-fe0f","1f9d7-1f3fd-200d-2640-fe0f","1f9d7-1f3fe-200d-2640-fe0f","1f9d7-1f3ff-200d-2640-fe0f"]},{n:["man_climbing"],u:"1f9d7-200d-2642-fe0f",v:["1f9d7-1f3fb-200d-2642-fe0f","1f9d7-1f3fc-200d-2642-fe0f","1f9d7-1f3fd-200d-2642-fe0f","1f9d7-1f3fe-200d-2642-fe0f","1f9d7-1f3ff-200d-2642-fe0f"]},{n:["person in lotus position","person_in_lotus_position"],u:"1f9d8",v:["1f9d8-1f3fb","1f9d8-1f3fc","1f9d8-1f3fd","1f9d8-1f3fe","1f9d8-1f3ff"]},{n:["woman_in_lotus_position"],u:"1f9d8-200d-2640-fe0f",v:["1f9d8-1f3fb-200d-2640-fe0f","1f9d8-1f3fc-200d-2640-fe0f","1f9d8-1f3fd-200d-2640-fe0f","1f9d8-1f3fe-200d-2640-fe0f","1f9d8-1f3ff-200d-2640-fe0f"]},{n:["man_in_lotus_position"],u:"1f9d8-200d-2642-fe0f",v:["1f9d8-1f3fb-200d-2642-fe0f","1f9d8-1f3fc-200d-2642-fe0f","1f9d8-1f3fd-200d-2642-fe0f","1f9d8-1f3fe-200d-2642-fe0f","1f9d8-1f3ff-200d-2642-fe0f"]},{n:["bath"],u:"1f6c0",v:["1f6c0-1f3fb","1f6c0-1f3fc","1f6c0-1f3fd","1f6c0-1f3fe","1f6c0-1f3ff"]},{n:["sleeping accommodation","sleeping_accommodation"],u:"1f6cc",v:["1f6cc-1f3fb","1f6cc-1f3fc","1f6cc-1f3fd","1f6cc-1f3fe","1f6cc-1f3ff"]},{n:["man_in_business_suit_levitating"],u:"1f574-fe0f",v:["1f574-1f3fb","1f574-1f3fc","1f574-1f3fd","1f574-1f3fe","1f574-1f3ff"]},{n:["speaking_head_in_silhouette"],u:"1f5e3-fe0f"},{n:["bust in silhouette","bust_in_silhouette"],u:"1f464"},{n:["busts in silhouette","busts_in_silhouette"],u:"1f465"},{n:["fencer"],u:"1f93a"},{n:["horse racing","horse_racing"],u:"1f3c7",v:["1f3c7-1f3fb","1f3c7-1f3fc","1f3c7-1f3fd","1f3c7-1f3fe","1f3c7-1f3ff"]},{n:["skier"],u:"26f7-fe0f"},{n:["snowboarder"],u:"1f3c2",v:["1f3c2-1f3fb","1f3c2-1f3fc","1f3c2-1f3fd","1f3c2-1f3fe","1f3c2-1f3ff"]},{n:["golfer"],u:"1f3cc-fe0f",v:["1f3cc-1f3fb","1f3cc-1f3fc","1f3cc-1f3fd","1f3cc-1f3fe","1f3cc-1f3ff"]},{n:["man-golfing"],u:"1f3cc-fe0f-200d-2642-fe0f",v:["1f3cc-1f3fb-200d-2642-fe0f","1f3cc-1f3fc-200d-2642-fe0f","1f3cc-1f3fd-200d-2642-fe0f","1f3cc-1f3fe-200d-2642-fe0f","1f3cc-1f3ff-200d-2642-fe0f"]},{n:["woman-golfing"],u:"1f3cc-fe0f-200d-2640-fe0f",v:["1f3cc-1f3fb-200d-2640-fe0f","1f3cc-1f3fc-200d-2640-fe0f","1f3cc-1f3fd-200d-2640-fe0f","1f3cc-1f3fe-200d-2640-fe0f","1f3cc-1f3ff-200d-2640-fe0f"]},{n:["surfer"],u:"1f3c4",v:["1f3c4-1f3fb","1f3c4-1f3fc","1f3c4-1f3fd","1f3c4-1f3fe","1f3c4-1f3ff"]},{n:["man-surfing"],u:"1f3c4-200d-2642-fe0f",v:["1f3c4-1f3fb-200d-2642-fe0f","1f3c4-1f3fc-200d-2642-fe0f","1f3c4-1f3fd-200d-2642-fe0f","1f3c4-1f3fe-200d-2642-fe0f","1f3c4-1f3ff-200d-2642-fe0f"]},{n:["woman-surfing"],u:"1f3c4-200d-2640-fe0f",v:["1f3c4-1f3fb-200d-2640-fe0f","1f3c4-1f3fc-200d-2640-fe0f","1f3c4-1f3fd-200d-2640-fe0f","1f3c4-1f3fe-200d-2640-fe0f","1f3c4-1f3ff-200d-2640-fe0f"]},{n:["rowboat"],u:"1f6a3",v:["1f6a3-1f3fb","1f6a3-1f3fc","1f6a3-1f3fd","1f6a3-1f3fe","1f6a3-1f3ff"]},{n:["man-rowing-boat"],u:"1f6a3-200d-2642-fe0f",v:["1f6a3-1f3fb-200d-2642-fe0f","1f6a3-1f3fc-200d-2642-fe0f","1f6a3-1f3fd-200d-2642-fe0f","1f6a3-1f3fe-200d-2642-fe0f","1f6a3-1f3ff-200d-2642-fe0f"]},{n:["woman-rowing-boat"],u:"1f6a3-200d-2640-fe0f",v:["1f6a3-1f3fb-200d-2640-fe0f","1f6a3-1f3fc-200d-2640-fe0f","1f6a3-1f3fd-200d-2640-fe0f","1f6a3-1f3fe-200d-2640-fe0f","1f6a3-1f3ff-200d-2640-fe0f"]},{n:["swimmer"],u:"1f3ca",v:["1f3ca-1f3fb","1f3ca-1f3fc","1f3ca-1f3fd","1f3ca-1f3fe","1f3ca-1f3ff"]},{n:["man-swimming"],u:"1f3ca-200d-2642-fe0f",v:["1f3ca-1f3fb-200d-2642-fe0f","1f3ca-1f3fc-200d-2642-fe0f","1f3ca-1f3fd-200d-2642-fe0f","1f3ca-1f3fe-200d-2642-fe0f","1f3ca-1f3ff-200d-2642-fe0f"]},{n:["woman-swimming"],u:"1f3ca-200d-2640-fe0f",v:["1f3ca-1f3fb-200d-2640-fe0f","1f3ca-1f3fc-200d-2640-fe0f","1f3ca-1f3fd-200d-2640-fe0f","1f3ca-1f3fe-200d-2640-fe0f","1f3ca-1f3ff-200d-2640-fe0f"]},{n:["person_with_ball"],u:"26f9-fe0f",v:["26f9-1f3fb","26f9-1f3fc","26f9-1f3fd","26f9-1f3fe","26f9-1f3ff"]},{n:["man-bouncing-ball"],u:"26f9-fe0f-200d-2642-fe0f",v:["26f9-1f3fb-200d-2642-fe0f","26f9-1f3fc-200d-2642-fe0f","26f9-1f3fd-200d-2642-fe0f","26f9-1f3fe-200d-2642-fe0f","26f9-1f3ff-200d-2642-fe0f"]},{n:["woman-bouncing-ball"],u:"26f9-fe0f-200d-2640-fe0f",v:["26f9-1f3fb-200d-2640-fe0f","26f9-1f3fc-200d-2640-fe0f","26f9-1f3fd-200d-2640-fe0f","26f9-1f3fe-200d-2640-fe0f","26f9-1f3ff-200d-2640-fe0f"]},{n:["weight_lifter"],u:"1f3cb-fe0f",v:["1f3cb-1f3fb","1f3cb-1f3fc","1f3cb-1f3fd","1f3cb-1f3fe","1f3cb-1f3ff"]},{n:["man-lifting-weights"],u:"1f3cb-fe0f-200d-2642-fe0f",v:["1f3cb-1f3fb-200d-2642-fe0f","1f3cb-1f3fc-200d-2642-fe0f","1f3cb-1f3fd-200d-2642-fe0f","1f3cb-1f3fe-200d-2642-fe0f","1f3cb-1f3ff-200d-2642-fe0f"]},{n:["woman-lifting-weights"],u:"1f3cb-fe0f-200d-2640-fe0f",v:["1f3cb-1f3fb-200d-2640-fe0f","1f3cb-1f3fc-200d-2640-fe0f","1f3cb-1f3fd-200d-2640-fe0f","1f3cb-1f3fe-200d-2640-fe0f","1f3cb-1f3ff-200d-2640-fe0f"]},{n:["bicyclist"],u:"1f6b4",v:["1f6b4-1f3fb","1f6b4-1f3fc","1f6b4-1f3fd","1f6b4-1f3fe","1f6b4-1f3ff"]},{n:["man-biking"],u:"1f6b4-200d-2642-fe0f",v:["1f6b4-1f3fb-200d-2642-fe0f","1f6b4-1f3fc-200d-2642-fe0f","1f6b4-1f3fd-200d-2642-fe0f","1f6b4-1f3fe-200d-2642-fe0f","1f6b4-1f3ff-200d-2642-fe0f"]},{n:["woman-biking"],u:"1f6b4-200d-2640-fe0f",v:["1f6b4-1f3fb-200d-2640-fe0f","1f6b4-1f3fc-200d-2640-fe0f","1f6b4-1f3fd-200d-2640-fe0f","1f6b4-1f3fe-200d-2640-fe0f","1f6b4-1f3ff-200d-2640-fe0f"]},{n:["mountain bicyclist","mountain_bicyclist"],u:"1f6b5",v:["1f6b5-1f3fb","1f6b5-1f3fc","1f6b5-1f3fd","1f6b5-1f3fe","1f6b5-1f3ff"]},{n:["man-mountain-biking"],u:"1f6b5-200d-2642-fe0f",v:["1f6b5-1f3fb-200d-2642-fe0f","1f6b5-1f3fc-200d-2642-fe0f","1f6b5-1f3fd-200d-2642-fe0f","1f6b5-1f3fe-200d-2642-fe0f","1f6b5-1f3ff-200d-2642-fe0f"]},{n:["woman-mountain-biking"],u:"1f6b5-200d-2640-fe0f",v:["1f6b5-1f3fb-200d-2640-fe0f","1f6b5-1f3fc-200d-2640-fe0f","1f6b5-1f3fd-200d-2640-fe0f","1f6b5-1f3fe-200d-2640-fe0f","1f6b5-1f3ff-200d-2640-fe0f"]},{n:["racing_car"],u:"1f3ce-fe0f"},{n:["racing_motorcycle"],u:"1f3cd-fe0f"},{n:["person doing cartwheel","person_doing_cartwheel"],u:"1f938",v:["1f938-1f3fb","1f938-1f3fc","1f938-1f3fd","1f938-1f3fe","1f938-1f3ff"]},{n:["man-cartwheeling"],u:"1f938-200d-2642-fe0f",v:["1f938-1f3fb-200d-2642-fe0f","1f938-1f3fc-200d-2642-fe0f","1f938-1f3fd-200d-2642-fe0f","1f938-1f3fe-200d-2642-fe0f","1f938-1f3ff-200d-2642-fe0f"]},{n:["woman-cartwheeling"],u:"1f938-200d-2640-fe0f",v:["1f938-1f3fb-200d-2640-fe0f","1f938-1f3fc-200d-2640-fe0f","1f938-1f3fd-200d-2640-fe0f","1f938-1f3fe-200d-2640-fe0f","1f938-1f3ff-200d-2640-fe0f"]},{n:["wrestlers"],u:"1f93c"},{n:["man-wrestling"],u:"1f93c-200d-2642-fe0f"},{n:["woman-wrestling"],u:"1f93c-200d-2640-fe0f"},{n:["water polo","water_polo"],u:"1f93d",v:["1f93d-1f3fb","1f93d-1f3fc","1f93d-1f3fd","1f93d-1f3fe","1f93d-1f3ff"]},{n:["man-playing-water-polo"],u:"1f93d-200d-2642-fe0f",v:["1f93d-1f3fb-200d-2642-fe0f","1f93d-1f3fc-200d-2642-fe0f","1f93d-1f3fd-200d-2642-fe0f","1f93d-1f3fe-200d-2642-fe0f","1f93d-1f3ff-200d-2642-fe0f"]},{n:["woman-playing-water-polo"],u:"1f93d-200d-2640-fe0f",v:["1f93d-1f3fb-200d-2640-fe0f","1f93d-1f3fc-200d-2640-fe0f","1f93d-1f3fd-200d-2640-fe0f","1f93d-1f3fe-200d-2640-fe0f","1f93d-1f3ff-200d-2640-fe0f"]},{n:["handball"],u:"1f93e",v:["1f93e-1f3fb","1f93e-1f3fc","1f93e-1f3fd","1f93e-1f3fe","1f93e-1f3ff"]},{n:["man-playing-handball"],u:"1f93e-200d-2642-fe0f",v:["1f93e-1f3fb-200d-2642-fe0f","1f93e-1f3fc-200d-2642-fe0f","1f93e-1f3fd-200d-2642-fe0f","1f93e-1f3fe-200d-2642-fe0f","1f93e-1f3ff-200d-2642-fe0f"]},{n:["woman-playing-handball"],u:"1f93e-200d-2640-fe0f",v:["1f93e-1f3fb-200d-2640-fe0f","1f93e-1f3fc-200d-2640-fe0f","1f93e-1f3fd-200d-2640-fe0f","1f93e-1f3fe-200d-2640-fe0f","1f93e-1f3ff-200d-2640-fe0f"]},{n:["juggling"],u:"1f939",v:["1f939-1f3fb","1f939-1f3fc","1f939-1f3fd","1f939-1f3fe","1f939-1f3ff"]},{n:["man-juggling"],u:"1f939-200d-2642-fe0f",v:["1f939-1f3fb-200d-2642-fe0f","1f939-1f3fc-200d-2642-fe0f","1f939-1f3fd-200d-2642-fe0f","1f939-1f3fe-200d-2642-fe0f","1f939-1f3ff-200d-2642-fe0f"]},{n:["woman-juggling"],u:"1f939-200d-2640-fe0f",v:["1f939-1f3fb-200d-2640-fe0f","1f939-1f3fc-200d-2640-fe0f","1f939-1f3fd-200d-2640-fe0f","1f939-1f3fe-200d-2640-fe0f","1f939-1f3ff-200d-2640-fe0f"]},{n:["man and woman holding hands","couple","man_and_woman_holding_hands"],u:"1f46b"},{n:["two men holding hands","two_men_holding_hands"],u:"1f46c"},{n:["two women holding hands","two_women_holding_hands"],u:"1f46d"},{n:["kiss","couplekiss"],u:"1f48f"},{n:["woman-kiss-man"],u:"1f469-200d-2764-fe0f-200d-1f48b-200d-1f468"},{n:["man-kiss-man"],u:"1f468-200d-2764-fe0f-200d-1f48b-200d-1f468"},{n:["woman-kiss-woman"],u:"1f469-200d-2764-fe0f-200d-1f48b-200d-1f469"},{n:["couple with heart","couple_with_heart"],u:"1f491"},{n:["woman-heart-man"],u:"1f469-200d-2764-fe0f-200d-1f468"},{n:["man-heart-man"],u:"1f468-200d-2764-fe0f-200d-1f468"},{n:["woman-heart-woman"],u:"1f469-200d-2764-fe0f-200d-1f469"},{n:["family","man-woman-boy"],u:"1f46a"},{n:["man-woman-boy","family"],u:"1f468-200d-1f469-200d-1f466"},{n:["man-woman-girl"],u:"1f468-200d-1f469-200d-1f467"},{n:["man-woman-girl-boy"],u:"1f468-200d-1f469-200d-1f467-200d-1f466"},{n:["man-woman-boy-boy"],u:"1f468-200d-1f469-200d-1f466-200d-1f466"},{n:["man-woman-girl-girl"],u:"1f468-200d-1f469-200d-1f467-200d-1f467"},{n:["man-man-boy"],u:"1f468-200d-1f468-200d-1f466"},{n:["man-man-girl"],u:"1f468-200d-1f468-200d-1f467"},{n:["man-man-girl-boy"],u:"1f468-200d-1f468-200d-1f467-200d-1f466"},{n:["man-man-boy-boy"],u:"1f468-200d-1f468-200d-1f466-200d-1f466"},{n:["man-man-girl-girl"],u:"1f468-200d-1f468-200d-1f467-200d-1f467"},{n:["woman-woman-boy"],u:"1f469-200d-1f469-200d-1f466"},{n:["woman-woman-girl"],u:"1f469-200d-1f469-200d-1f467"},{n:["woman-woman-girl-boy"],u:"1f469-200d-1f469-200d-1f467-200d-1f466"},{n:["woman-woman-boy-boy"],u:"1f469-200d-1f469-200d-1f466-200d-1f466"},{n:["woman-woman-girl-girl"],u:"1f469-200d-1f469-200d-1f467-200d-1f467"},{n:["man-boy"],u:"1f468-200d-1f466"},{n:["man-boy-boy"],u:"1f468-200d-1f466-200d-1f466"},{n:["man-girl"],u:"1f468-200d-1f467"},{n:["man-girl-boy"],u:"1f468-200d-1f467-200d-1f466"},{n:["man-girl-girl"],u:"1f468-200d-1f467-200d-1f467"},{n:["woman-boy"],u:"1f469-200d-1f466"},{n:["woman-boy-boy"],u:"1f469-200d-1f466-200d-1f466"},{n:["woman-girl"],u:"1f469-200d-1f467"},{n:["woman-girl-boy"],u:"1f469-200d-1f467-200d-1f466"},{n:["woman-girl-girl"],u:"1f469-200d-1f467-200d-1f467"},{n:["selfie"],u:"1f933",v:["1f933-1f3fb","1f933-1f3fc","1f933-1f3fd","1f933-1f3fe","1f933-1f3ff"]},{n:["flexed biceps","muscle"],u:"1f4aa",v:["1f4aa-1f3fb","1f4aa-1f3fc","1f4aa-1f3fd","1f4aa-1f3fe","1f4aa-1f3ff"]},{n:["white left pointing backhand index","point_left"],u:"1f448",v:["1f448-1f3fb","1f448-1f3fc","1f448-1f3fd","1f448-1f3fe","1f448-1f3ff"]},{n:["white right pointing backhand index","point_right"],u:"1f449",v:["1f449-1f3fb","1f449-1f3fc","1f449-1f3fd","1f449-1f3fe","1f449-1f3ff"]},{n:["white up pointing index","point_up"],u:"261d-fe0f",v:["261d-1f3fb","261d-1f3fc","261d-1f3fd","261d-1f3fe","261d-1f3ff"]},{n:["white up pointing backhand index","point_up_2"],u:"1f446",v:["1f446-1f3fb","1f446-1f3fc","1f446-1f3fd","1f446-1f3fe","1f446-1f3ff"]},{n:["reversed hand with middle finger extended","middle_finger","reversed_hand_with_middle_finger_extended"],u:"1f595",v:["1f595-1f3fb","1f595-1f3fc","1f595-1f3fd","1f595-1f3fe","1f595-1f3ff"]},{n:["white down pointing backhand index","point_down"],u:"1f447",v:["1f447-1f3fb","1f447-1f3fc","1f447-1f3fd","1f447-1f3fe","1f447-1f3ff"]},{n:["victory hand","v"],u:"270c-fe0f",v:["270c-1f3fb","270c-1f3fc","270c-1f3fd","270c-1f3fe","270c-1f3ff"]},{n:["hand with index and middle fingers crossed","crossed_fingers","hand_with_index_and_middle_fingers_crossed"],u:"1f91e",v:["1f91e-1f3fb","1f91e-1f3fc","1f91e-1f3fd","1f91e-1f3fe","1f91e-1f3ff"]},{n:["raised hand with part between middle and ring fingers","spock-hand"],u:"1f596",v:["1f596-1f3fb","1f596-1f3fc","1f596-1f3fd","1f596-1f3fe","1f596-1f3ff"]},{n:["sign of the horns","the_horns","sign_of_the_horns"],u:"1f918",v:["1f918-1f3fb","1f918-1f3fc","1f918-1f3fd","1f918-1f3fe","1f918-1f3ff"]},{n:["call me hand","call_me_hand"],u:"1f919",v:["1f919-1f3fb","1f919-1f3fc","1f919-1f3fd","1f919-1f3fe","1f919-1f3ff"]},{n:["raised_hand_with_fingers_splayed"],u:"1f590-fe0f",v:["1f590-1f3fb","1f590-1f3fc","1f590-1f3fd","1f590-1f3fe","1f590-1f3ff"]},{n:["raised hand","hand","raised_hand"],u:"270b",v:["270b-1f3fb","270b-1f3fc","270b-1f3fd","270b-1f3fe","270b-1f3ff"]},{n:["ok hand sign","ok_hand"],u:"1f44c",v:["1f44c-1f3fb","1f44c-1f3fc","1f44c-1f3fd","1f44c-1f3fe","1f44c-1f3ff"]},{n:["thumbs up sign","+1","thumbsup"],u:"1f44d",v:["1f44d-1f3fb","1f44d-1f3fc","1f44d-1f3fd","1f44d-1f3fe","1f44d-1f3ff"]},{n:["thumbs down sign","-1","thumbsdown"],u:"1f44e",v:["1f44e-1f3fb","1f44e-1f3fc","1f44e-1f3fd","1f44e-1f3fe","1f44e-1f3ff"]},{n:["raised fist","fist"],u:"270a",v:["270a-1f3fb","270a-1f3fc","270a-1f3fd","270a-1f3fe","270a-1f3ff"]},{n:["fisted hand sign","facepunch","punch"],u:"1f44a",v:["1f44a-1f3fb","1f44a-1f3fc","1f44a-1f3fd","1f44a-1f3fe","1f44a-1f3ff"]},{n:["left-facing fist","left-facing_fist"],u:"1f91b",v:["1f91b-1f3fb","1f91b-1f3fc","1f91b-1f3fd","1f91b-1f3fe","1f91b-1f3ff"]},{n:["right-facing fist","right-facing_fist"],u:"1f91c",v:["1f91c-1f3fb","1f91c-1f3fc","1f91c-1f3fd","1f91c-1f3fe","1f91c-1f3ff"]},{n:["raised back of hand","raised_back_of_hand"],u:"1f91a",v:["1f91a-1f3fb","1f91a-1f3fc","1f91a-1f3fd","1f91a-1f3fe","1f91a-1f3ff"]},{n:["waving hand sign","wave"],u:"1f44b",v:["1f44b-1f3fb","1f44b-1f3fc","1f44b-1f3fd","1f44b-1f3fe","1f44b-1f3ff"]},{n:["i love you hand sign","i_love_you_hand_sign"],u:"1f91f",v:["1f91f-1f3fb","1f91f-1f3fc","1f91f-1f3fd","1f91f-1f3fe","1f91f-1f3ff"]},{n:["writing_hand"],u:"270d-fe0f",v:["270d-1f3fb","270d-1f3fc","270d-1f3fd","270d-1f3fe","270d-1f3ff"]},{n:["clapping hands sign","clap"],u:"1f44f",v:["1f44f-1f3fb","1f44f-1f3fc","1f44f-1f3fd","1f44f-1f3fe","1f44f-1f3ff"]},{n:["open hands sign","open_hands"],u:"1f450",v:["1f450-1f3fb","1f450-1f3fc","1f450-1f3fd","1f450-1f3fe","1f450-1f3ff"]},{n:["person raising both hands in celebration","raised_hands"],u:"1f64c",v:["1f64c-1f3fb","1f64c-1f3fc","1f64c-1f3fd","1f64c-1f3fe","1f64c-1f3ff"]},{n:["palms up together","palms_up_together"],u:"1f932",v:["1f932-1f3fb","1f932-1f3fc","1f932-1f3fd","1f932-1f3fe","1f932-1f3ff"]},{n:["person with folded hands","pray"],u:"1f64f",v:["1f64f-1f3fb","1f64f-1f3fc","1f64f-1f3fd","1f64f-1f3fe","1f64f-1f3ff"]},{n:["handshake"],u:"1f91d"},{n:["nail polish","nail_care"],u:"1f485",v:["1f485-1f3fb","1f485-1f3fc","1f485-1f3fd","1f485-1f3fe","1f485-1f3ff"]},{n:["ear"],u:"1f442",v:["1f442-1f3fb","1f442-1f3fc","1f442-1f3fd","1f442-1f3fe","1f442-1f3ff"]},{n:["nose"],u:"1f443",v:["1f443-1f3fb","1f443-1f3fc","1f443-1f3fd","1f443-1f3fe","1f443-1f3ff"]},{n:["footprints"],u:"1f463"},{n:["eyes"],u:"1f440"},{n:["eye"],u:"1f441-fe0f"},{n:["eye-in-speech-bubble"],u:"1f441-fe0f-200d-1f5e8-fe0f"},{n:["brain"],u:"1f9e0"},{n:["tongue"],u:"1f445"},{n:["mouth","lips"],u:"1f444"},{n:["kiss mark","kiss"],u:"1f48b"},{n:["heart with arrow","cupid"],u:"1f498"},{n:["heavy black heart","heart"],u:"2764-fe0f"},{n:["beating heart","heartbeat"],u:"1f493"},{n:["broken heart","broken_heart"],u:"1f494"},{n:["two hearts","two_hearts"],u:"1f495"},{n:["sparkling heart","sparkling_heart"],u:"1f496"},{n:["growing heart","heartpulse"],u:"1f497"},{n:["blue heart","blue_heart"],u:"1f499"},{n:["green heart","green_heart"],u:"1f49a"},{n:["yellow heart","yellow_heart"],u:"1f49b"},{n:["orange heart","orange_heart"],u:"1f9e1"},{n:["purple heart","purple_heart"],u:"1f49c"},{n:["black heart","black_heart"],u:"1f5a4"},{n:["heart with ribbon","gift_heart"],u:"1f49d"},{n:["revolving hearts","revolving_hearts"],u:"1f49e"},{n:["heart decoration","heart_decoration"],u:"1f49f"},{n:["heavy_heart_exclamation_mark_ornament"],u:"2763-fe0f"},{n:["love letter","love_letter"],u:"1f48c"},{n:["sleeping symbol","zzz"],u:"1f4a4"},{n:["anger symbol","anger"],u:"1f4a2"},{n:["bomb"],u:"1f4a3"},{n:["collision symbol","boom","collision"],u:"1f4a5"},{n:["splashing sweat symbol","sweat_drops"],u:"1f4a6"},{n:["dash symbol","dash"],u:"1f4a8"},{n:["dizzy symbol","dizzy"],u:"1f4ab"},{n:["speech balloon","speech_balloon"],u:"1f4ac"},{n:["left_speech_bubble"],u:"1f5e8-fe0f"},{n:["right_anger_bubble"],u:"1f5ef-fe0f"},{n:["thought balloon","thought_balloon"],u:"1f4ad"},{n:["hole"],u:"1f573-fe0f"},{n:["eyeglasses"],u:"1f453"},{n:["dark_sunglasses"],u:"1f576-fe0f"},{n:["necktie"],u:"1f454"},{n:["t-shirt","shirt","tshirt"],u:"1f455"},{n:["jeans"],u:"1f456"},{n:["scarf"],u:"1f9e3"},{n:["gloves"],u:"1f9e4"},{n:["coat"],u:"1f9e5"},{n:["socks"],u:"1f9e6"},{n:["dress"],u:"1f457"},{n:["kimono"],u:"1f458"},{n:["bikini"],u:"1f459"},{n:["womans clothes","womans_clothes"],u:"1f45a"},{n:["purse"],u:"1f45b"},{n:["handbag"],u:"1f45c"},{n:["pouch"],u:"1f45d"},{n:["shopping_bags"],u:"1f6cd-fe0f"},{n:["school satchel","school_satchel"],u:"1f392"},{n:["mans shoe","mans_shoe","shoe"],u:"1f45e"},{n:["athletic shoe","athletic_shoe"],u:"1f45f"},{n:["high-heeled shoe","high_heel"],u:"1f460"},{n:["womans sandal","sandal"],u:"1f461"},{n:["womans boots","boot"],u:"1f462"},{n:["crown"],u:"1f451"},{n:["womans hat","womans_hat"],u:"1f452"},{n:["top hat","tophat"],u:"1f3a9"},{n:["graduation cap","mortar_board"],u:"1f393"},{n:["billed cap","billed_cap"],u:"1f9e2"},{n:["helmet_with_white_cross"],u:"26d1-fe0f"},{n:["prayer beads","prayer_beads"],u:"1f4ff"},{n:["lipstick"],u:"1f484"},{n:["ring"],u:"1f48d"},{n:["gem stone","gem"],u:"1f48e"}],animals_nature:[{n:["monkey face","monkey_face"],u:"1f435"},{n:["monkey"],u:"1f412"},{n:["gorilla"],u:"1f98d"},{n:["dog face","dog"],u:"1f436"},{n:["dog","dog2"],u:"1f415"},{n:["poodle"],u:"1f429"},{n:["wolf face","wolf"],u:"1f43a"},{n:["fox face","fox_face"],u:"1f98a"},{n:["cat face","cat"],u:"1f431"},{n:["cat","cat2"],u:"1f408"},{n:["lion face","lion_face"],u:"1f981"},{n:["tiger face","tiger"],u:"1f42f"},{n:["tiger","tiger2"],u:"1f405"},{n:["leopard"],u:"1f406"},{n:["horse face","horse"],u:"1f434"},{n:["horse","racehorse"],u:"1f40e"},{n:["unicorn face","unicorn_face"],u:"1f984"},{n:["zebra face","zebra_face"],u:"1f993"},{n:["deer"],u:"1f98c"},{n:["cow face","cow"],u:"1f42e"},{n:["ox"],u:"1f402"},{n:["water buffalo","water_buffalo"],u:"1f403"},{n:["cow","cow2"],u:"1f404"},{n:["pig face","pig"],u:"1f437"},{n:["pig","pig2"],u:"1f416"},{n:["boar"],u:"1f417"},{n:["pig nose","pig_nose"],u:"1f43d"},{n:["ram"],u:"1f40f"},{n:["sheep"],u:"1f411"},{n:["goat"],u:"1f410"},{n:["dromedary camel","dromedary_camel"],u:"1f42a"},{n:["bactrian camel","camel"],u:"1f42b"},{n:["giraffe face","giraffe_face"],u:"1f992"},{n:["elephant"],u:"1f418"},{n:["rhinoceros"],u:"1f98f"},{n:["mouse face","mouse"],u:"1f42d"},{n:["mouse","mouse2"],u:"1f401"},{n:["rat"],u:"1f400"},{n:["hamster face","hamster"],u:"1f439"},{n:["rabbit face","rabbit"],u:"1f430"},{n:["rabbit","rabbit2"],u:"1f407"},{n:["chipmunk"],u:"1f43f-fe0f"},{n:["hedgehog"],u:"1f994"},{n:["bat"],u:"1f987"},{n:["bear face","bear"],u:"1f43b"},{n:["koala"],u:"1f428"},{n:["panda face","panda_face"],u:"1f43c"},{n:["paw prints","feet","paw_prints"],u:"1f43e"},{n:["turkey"],u:"1f983"},{n:["chicken"],u:"1f414"},{n:["rooster"],u:"1f413"},{n:["hatching chick","hatching_chick"],u:"1f423"},{n:["baby chick","baby_chick"],u:"1f424"},{n:["front-facing baby chick","hatched_chick"],u:"1f425"},{n:["bird"],u:"1f426"},{n:["penguin"],u:"1f427"},{n:["dove_of_peace"],u:"1f54a-fe0f"},{n:["eagle"],u:"1f985"},{n:["duck"],u:"1f986"},{n:["owl"],u:"1f989"},{n:["frog face","frog"],u:"1f438"},{n:["crocodile"],u:"1f40a"},{n:["turtle"],u:"1f422"},{n:["lizard"],u:"1f98e"},{n:["snake"],u:"1f40d"},{n:["dragon face","dragon_face"],u:"1f432"},{n:["dragon"],u:"1f409"},{n:["sauropod"],u:"1f995"},{n:["t-rex"],u:"1f996"},{n:["spouting whale","whale"],u:"1f433"},{n:["whale","whale2"],u:"1f40b"},{n:["dolphin","flipper"],u:"1f42c"},{n:["fish"],u:"1f41f"},{n:["tropical fish","tropical_fish"],u:"1f420"},{n:["blowfish"],u:"1f421"},{n:["shark"],u:"1f988"},{n:["octopus"],u:"1f419"},{n:["spiral shell","shell"],u:"1f41a"},{n:["crab"],u:"1f980"},{n:["shrimp"],u:"1f990"},{n:["squid"],u:"1f991"},{n:["snail"],u:"1f40c"},{n:["butterfly"],u:"1f98b"},{n:["bug"],u:"1f41b"},{n:["ant"],u:"1f41c"},{n:["honeybee","bee"],u:"1f41d"},{n:["lady beetle","beetle"],u:"1f41e"},{n:["cricket"],u:"1f997"},{n:["spider"],u:"1f577-fe0f"},{n:["spider_web"],u:"1f578-fe0f"},{n:["scorpion"],u:"1f982"},{n:["bouquet"],u:"1f490"},{n:["cherry blossom","cherry_blossom"],u:"1f338"},{n:["white flower","white_flower"],u:"1f4ae"},{n:["rosette"],u:"1f3f5-fe0f"},{n:["rose"],u:"1f339"},{n:["wilted flower","wilted_flower"],u:"1f940"},{n:["hibiscus"],u:"1f33a"},{n:["sunflower"],u:"1f33b"},{n:["blossom"],u:"1f33c"},{n:["tulip"],u:"1f337"},{n:["seedling"],u:"1f331"},{n:["evergreen tree","evergreen_tree"],u:"1f332"},{n:["deciduous tree","deciduous_tree"],u:"1f333"},{n:["palm tree","palm_tree"],u:"1f334"},{n:["cactus"],u:"1f335"},{n:["ear of rice","ear_of_rice"],u:"1f33e"},{n:["herb"],u:"1f33f"},{n:["shamrock"],u:"2618-fe0f"},{n:["four leaf clover","four_leaf_clover"],u:"1f340"},{n:["maple leaf","maple_leaf"],u:"1f341"},{n:["fallen leaf","fallen_leaf"],u:"1f342"},{n:["leaf fluttering in wind","leaves"],u:"1f343"}],food_drink:[{n:["grapes"],u:"1f347"},{n:["melon"],u:"1f348"},{n:["watermelon"],u:"1f349"},{n:["tangerine"],u:"1f34a"},{n:["lemon"],u:"1f34b"},{n:["banana"],u:"1f34c"},{n:["pineapple"],u:"1f34d"},{n:["red apple","apple"],u:"1f34e"},{n:["green apple","green_apple"],u:"1f34f"},{n:["pear"],u:"1f350"},{n:["peach"],u:"1f351"},{n:["cherries"],u:"1f352"},{n:["strawberry"],u:"1f353"},{n:["kiwifruit"],u:"1f95d"},{n:["tomato"],u:"1f345"},{n:["coconut"],u:"1f965"},{n:["avocado"],u:"1f951"},{n:["aubergine","eggplant"],u:"1f346"},{n:["potato"],u:"1f954"},{n:["carrot"],u:"1f955"},{n:["ear of maize","corn"],u:"1f33d"},{n:["hot_pepper"],u:"1f336-fe0f"},{n:["cucumber"],u:"1f952"},{n:["broccoli"],u:"1f966"},{n:["mushroom"],u:"1f344"},{n:["peanuts"],u:"1f95c"},{n:["chestnut"],u:"1f330"},{n:["bread"],u:"1f35e"},{n:["croissant"],u:"1f950"},{n:["baguette bread","baguette_bread"],u:"1f956"},{n:["pretzel"],u:"1f968"},{n:["pancakes"],u:"1f95e"},{n:["cheese wedge","cheese_wedge"],u:"1f9c0"},{n:["meat on bone","meat_on_bone"],u:"1f356"},{n:["poultry leg","poultry_leg"],u:"1f357"},{n:["cut of meat","cut_of_meat"],u:"1f969"},{n:["bacon"],u:"1f953"},{n:["hamburger"],u:"1f354"},{n:["french fries","fries"],u:"1f35f"},{n:["slice of pizza","pizza"],u:"1f355"},{n:["hot dog","hotdog"],u:"1f32d"},{n:["sandwich"],u:"1f96a"},{n:["taco"],u:"1f32e"},{n:["burrito"],u:"1f32f"},{n:["stuffed flatbread","stuffed_flatbread"],u:"1f959"},{n:["egg"],u:"1f95a"},{n:["cooking","fried_egg"],u:"1f373"},{n:["shallow pan of food","shallow_pan_of_food"],u:"1f958"},{n:["pot of food","stew"],u:"1f372"},{n:["bowl with spoon","bowl_with_spoon"],u:"1f963"},{n:["green salad","green_salad"],u:"1f957"},{n:["popcorn"],u:"1f37f"},{n:["canned food","canned_food"],u:"1f96b"},{n:["bento box","bento"],u:"1f371"},{n:["rice cracker","rice_cracker"],u:"1f358"},{n:["rice ball","rice_ball"],u:"1f359"},{n:["cooked rice","rice"],u:"1f35a"},{n:["curry and rice","curry"],u:"1f35b"},{n:["steaming bowl","ramen"],u:"1f35c"},{n:["spaghetti"],u:"1f35d"},{n:["roasted sweet potato","sweet_potato"],u:"1f360"},{n:["oden"],u:"1f362"},{n:["sushi"],u:"1f363"},{n:["fried shrimp","fried_shrimp"],u:"1f364"},{n:["fish cake with swirl design","fish_cake"],u:"1f365"},{n:["dango"],u:"1f361"},{n:["dumpling"],u:"1f95f"},{n:["fortune cookie","fortune_cookie"],u:"1f960"},{n:["takeout box","takeout_box"],u:"1f961"},{n:["soft ice cream","icecream"],u:"1f366"},{n:["shaved ice","shaved_ice"],u:"1f367"},{n:["ice cream","ice_cream"],u:"1f368"},{n:["doughnut"],u:"1f369"},{n:["cookie"],u:"1f36a"},{n:["birthday cake","birthday"],u:"1f382"},{n:["shortcake","cake"],u:"1f370"},{n:["pie"],u:"1f967"},{n:["chocolate bar","chocolate_bar"],u:"1f36b"},{n:["candy"],u:"1f36c"},{n:["lollipop"],u:"1f36d"},{n:["custard"],u:"1f36e"},{n:["honey pot","honey_pot"],u:"1f36f"},{n:["baby bottle","baby_bottle"],u:"1f37c"},{n:["glass of milk","glass_of_milk"],u:"1f95b"},{n:["hot beverage","coffee"],u:"2615"},{n:["teacup without handle","tea"],u:"1f375"},{n:["sake bottle and cup","sake"],u:"1f376"},{n:["bottle with popping cork","champagne"],u:"1f37e"},{n:["wine glass","wine_glass"],u:"1f377"},{n:["cocktail glass","cocktail"],u:"1f378"},{n:["tropical drink","tropical_drink"],u:"1f379"},{n:["beer mug","beer"],u:"1f37a"},{n:["clinking beer mugs","beers"],u:"1f37b"},{n:["clinking glasses","clinking_glasses"],u:"1f942"},{n:["tumbler glass","tumbler_glass"],u:"1f943"},{n:["cup with straw","cup_with_straw"],u:"1f964"},{n:["chopsticks"],u:"1f962"},{n:["knife_fork_plate"],u:"1f37d-fe0f"},{n:["fork and knife","fork_and_knife"],u:"1f374"},{n:["spoon"],u:"1f944"},{n:["hocho","knife"],u:"1f52a"},{n:["amphora"],u:"1f3fa"}],activities:[{n:["jack-o-lantern","jack_o_lantern"],u:"1f383"},{n:["christmas tree","christmas_tree"],u:"1f384"},{n:["fireworks"],u:"1f386"},{n:["firework sparkler","sparkler"],u:"1f387"},{n:["sparkles"],u:"2728"},{n:["balloon"],u:"1f388"},{n:["party popper","tada"],u:"1f389"},{n:["confetti ball","confetti_ball"],u:"1f38a"},{n:["tanabata tree","tanabata_tree"],u:"1f38b"},{n:["pine decoration","bamboo"],u:"1f38d"},{n:["japanese dolls","dolls"],u:"1f38e"},{n:["carp streamer","flags"],u:"1f38f"},{n:["wind chime","wind_chime"],u:"1f390"},{n:["moon viewing ceremony","rice_scene"],u:"1f391"},{n:["ribbon"],u:"1f380"},{n:["wrapped present","gift"],u:"1f381"},{n:["reminder_ribbon"],u:"1f397-fe0f"},{n:["admission_tickets"],u:"1f39f-fe0f"},{n:["ticket"],u:"1f3ab"},{n:["medal"],u:"1f396-fe0f"},{n:["trophy"],u:"1f3c6"},{n:["sports medal","sports_medal"],u:"1f3c5"},{n:["first place medal","first_place_medal"],u:"1f947"},{n:["second place medal","second_place_medal"],u:"1f948"},{n:["third place medal","third_place_medal"],u:"1f949"},{n:["soccer ball","soccer"],u:"26bd"},{n:["baseball"],u:"26be"},{n:["basketball and hoop","basketball"],u:"1f3c0"},{n:["volleyball"],u:"1f3d0"},{n:["american football","football"],u:"1f3c8"},{n:["rugby football","rugby_football"],u:"1f3c9"},{n:["tennis racquet and ball","tennis"],u:"1f3be"},{n:["billiards","8ball"],u:"1f3b1"},{n:["bowling"],u:"1f3b3"},{n:["cricket bat and ball","cricket_bat_and_ball"],u:"1f3cf"},{n:["field hockey stick and ball","field_hockey_stick_and_ball"],u:"1f3d1"},{n:["ice hockey stick and puck","ice_hockey_stick_and_puck"],u:"1f3d2"},{n:["table tennis paddle and ball","table_tennis_paddle_and_ball"],u:"1f3d3"},{n:["badminton racquet and shuttlecock","badminton_racquet_and_shuttlecock"],u:"1f3f8"},{n:["boxing glove","boxing_glove"],u:"1f94a"},{n:["martial arts uniform","martial_arts_uniform"],u:"1f94b"},{n:["goal net","goal_net"],u:"1f945"},{n:["direct hit","dart"],u:"1f3af"},{n:["flag in hole","golf"],u:"26f3"},{n:["ice_skate"],u:"26f8-fe0f"},{n:["fishing pole and fish","fishing_pole_and_fish"],u:"1f3a3"},{n:["running shirt with sash","running_shirt_with_sash"],u:"1f3bd"},{n:["ski and ski boot","ski"],u:"1f3bf"},{n:["sled"],u:"1f6f7"},{n:["curling stone","curling_stone"],u:"1f94c"},{n:["video game","video_game"],u:"1f3ae"},{n:["joystick"],u:"1f579-fe0f"},{n:["game die","game_die"],u:"1f3b2"},{n:["black spade suit","spades"],u:"2660-fe0f"},{n:["black heart suit","hearts"],u:"2665-fe0f"},{n:["black diamond suit","diamonds"],u:"2666-fe0f"},{n:["black club suit","clubs"],u:"2663-fe0f"},{n:["playing card black joker","black_joker"],u:"1f0cf"},{n:["mahjong tile red dragon","mahjong"],u:"1f004"},{n:["flower playing cards","flower_playing_cards"],u:"1f3b4"}],travel_places:[{n:["earth globe europe-africa","earth_africa"],u:"1f30d"},{n:["earth globe americas","earth_americas"],u:"1f30e"},{n:["earth globe asia-australia","earth_asia"],u:"1f30f"},{n:["globe with meridians","globe_with_meridians"],u:"1f310"},{n:["world_map"],u:"1f5fa-fe0f"},{n:["silhouette of japan","japan"],u:"1f5fe"},{n:["snow_capped_mountain"],u:"1f3d4-fe0f"},{n:["mountain"],u:"26f0-fe0f"},{n:["volcano"],u:"1f30b"},{n:["mount fuji","mount_fuji"],u:"1f5fb"},{n:["camping"],u:"1f3d5-fe0f"},{n:["beach_with_umbrella"],u:"1f3d6-fe0f"},{n:["desert"],u:"1f3dc-fe0f"},{n:["desert_island"],u:"1f3dd-fe0f"},{n:["national_park"],u:"1f3de-fe0f"},{n:["stadium"],u:"1f3df-fe0f"},{n:["classical_building"],u:"1f3db-fe0f"},{n:["building_construction"],u:"1f3d7-fe0f"},{n:["house_buildings"],u:"1f3d8-fe0f"},{n:["cityscape"],u:"1f3d9-fe0f"},{n:["derelict_house_building"],u:"1f3da-fe0f"},{n:["house building","house"],u:"1f3e0"},{n:["house with garden","house_with_garden"],u:"1f3e1"},{n:["office building","office"],u:"1f3e2"},{n:["japanese post office","post_office"],u:"1f3e3"},{n:["european post office","european_post_office"],u:"1f3e4"},{n:["hospital"],u:"1f3e5"},{n:["bank"],u:"1f3e6"},{n:["hotel"],u:"1f3e8"},{n:["love hotel","love_hotel"],u:"1f3e9"},{n:["convenience store","convenience_store"],u:"1f3ea"},{n:["school"],u:"1f3eb"},{n:["department store","department_store"],u:"1f3ec"},{n:["factory"],u:"1f3ed"},{n:["japanese castle","japanese_castle"],u:"1f3ef"},{n:["european castle","european_castle"],u:"1f3f0"},{n:["wedding"],u:"1f492"},{n:["tokyo tower","tokyo_tower"],u:"1f5fc"},{n:["statue of liberty","statue_of_liberty"],u:"1f5fd"},{n:["church"],u:"26ea"},{n:["mosque"],u:"1f54c"},{n:["synagogue"],u:"1f54d"},{n:["shinto_shrine"],u:"26e9-fe0f"},{n:["kaaba"],u:"1f54b"},{n:["fountain"],u:"26f2"},{n:["tent"],u:"26fa"},{n:["foggy"],u:"1f301"},{n:["night with stars","night_with_stars"],u:"1f303"},{n:["sunrise over mountains","sunrise_over_mountains"],u:"1f304"},{n:["sunrise"],u:"1f305"},{n:["cityscape at dusk","city_sunset"],u:"1f306"},{n:["sunset over buildings","city_sunrise"],u:"1f307"},{n:["bridge at night","bridge_at_night"],u:"1f309"},{n:["hot springs","hotsprings"],u:"2668-fe0f"},{n:["milky way","milky_way"],u:"1f30c"},{n:["carousel horse","carousel_horse"],u:"1f3a0"},{n:["ferris wheel","ferris_wheel"],u:"1f3a1"},{n:["roller coaster","roller_coaster"],u:"1f3a2"},{n:["barber pole","barber"],u:"1f488"},{n:["circus tent","circus_tent"],u:"1f3aa"},{n:["performing arts","performing_arts"],u:"1f3ad"},{n:["frame_with_picture"],u:"1f5bc-fe0f"},{n:["artist palette","art"],u:"1f3a8"},{n:["slot machine","slot_machine"],u:"1f3b0"},{n:["steam locomotive","steam_locomotive"],u:"1f682"},{n:["railway car","railway_car"],u:"1f683"},{n:["high-speed train","bullettrain_side"],u:"1f684"},{n:["high-speed train with bullet nose","bullettrain_front"],u:"1f685"},{n:["train","train2"],u:"1f686"},{n:["metro"],u:"1f687"},{n:["light rail","light_rail"],u:"1f688"},{n:["station"],u:"1f689"},{n:["tram"],u:"1f68a"},{n:["monorail"],u:"1f69d"},{n:["mountain railway","mountain_railway"],u:"1f69e"},{n:["tram car","train"],u:"1f68b"},{n:["bus"],u:"1f68c"},{n:["oncoming bus","oncoming_bus"],u:"1f68d"},{n:["trolleybus"],u:"1f68e"},{n:["minibus"],u:"1f690"},{n:["ambulance"],u:"1f691"},{n:["fire engine","fire_engine"],u:"1f692"},{n:["police car","police_car"],u:"1f693"},{n:["oncoming police car","oncoming_police_car"],u:"1f694"},{n:["taxi"],u:"1f695"},{n:["oncoming taxi","oncoming_taxi"],u:"1f696"},{n:["automobile","car","red_car"],u:"1f697"},{n:["oncoming automobile","oncoming_automobile"],u:"1f698"},{n:["recreational vehicle","blue_car"],u:"1f699"},{n:["delivery truck","truck"],u:"1f69a"},{n:["articulated lorry","articulated_lorry"],u:"1f69b"},{n:["tractor"],u:"1f69c"},{n:["bicycle","bike"],u:"1f6b2"},{n:["scooter"],u:"1f6f4"},{n:["motor scooter","motor_scooter"],u:"1f6f5"},{n:["bus stop","busstop"],u:"1f68f"},{n:["motorway"],u:"1f6e3-fe0f"},{n:["railway_track"],u:"1f6e4-fe0f"},{n:["fuel pump","fuelpump"],u:"26fd"},{n:["police cars revolving light","rotating_light"],u:"1f6a8"},{n:["horizontal traffic light","traffic_light"],u:"1f6a5"},{n:["vertical traffic light","vertical_traffic_light"],u:"1f6a6"},{n:["construction sign","construction"],u:"1f6a7"},{n:["octagonal sign","octagonal_sign"],u:"1f6d1"},{n:["anchor"],u:"2693"},{n:["sailboat","boat"],u:"26f5"},{n:["canoe"],u:"1f6f6"},{n:["speedboat"],u:"1f6a4"},{n:["passenger_ship"],u:"1f6f3-fe0f"},{n:["ferry"],u:"26f4-fe0f"},{n:["motor_boat"],u:"1f6e5-fe0f"},{n:["ship"],u:"1f6a2"},{n:["airplane"],u:"2708-fe0f"},{n:["small_airplane"],u:"1f6e9-fe0f"},{n:["airplane departure","airplane_departure"],u:"1f6eb"},{n:["airplane arriving","airplane_arriving"],u:"1f6ec"},{n:["seat"],u:"1f4ba"},{n:["helicopter"],u:"1f681"},{n:["suspension railway","suspension_railway"],u:"1f69f"},{n:["mountain cableway","mountain_cableway"],u:"1f6a0"},{n:["aerial tramway","aerial_tramway"],u:"1f6a1"},{n:["satellite"],u:"1f6f0-fe0f"},{n:["rocket"],u:"1f680"},{n:["flying saucer","flying_saucer"],u:"1f6f8"},{n:["bellhop_bell"],u:"1f6ce-fe0f"},{n:["door"],u:"1f6aa"},{n:["bed"],u:"1f6cf-fe0f"},{n:["couch_and_lamp"],u:"1f6cb-fe0f"},{n:["toilet"],u:"1f6bd"},{n:["shower"],u:"1f6bf"},{n:["bathtub"],u:"1f6c1"},{n:["hourglass"],u:"231b"},{n:["hourglass with flowing sand","hourglass_flowing_sand"],u:"23f3"},{n:["watch"],u:"231a"},{n:["alarm clock","alarm_clock"],u:"23f0"},{n:["stopwatch"],u:"23f1-fe0f"},{n:["timer_clock"],u:"23f2-fe0f"},{n:["mantelpiece_clock"],u:"1f570-fe0f"},{n:["clock face twelve oclock","clock12"],u:"1f55b"},{n:["clock face twelve-thirty","clock1230"],u:"1f567"},{n:["clock face one oclock","clock1"],u:"1f550"},{n:["clock face one-thirty","clock130"],u:"1f55c"},{n:["clock face two oclock","clock2"],u:"1f551"},{n:["clock face two-thirty","clock230"],u:"1f55d"},{n:["clock face three oclock","clock3"],u:"1f552"},{n:["clock face three-thirty","clock330"],u:"1f55e"},{n:["clock face four oclock","clock4"],u:"1f553"},{n:["clock face four-thirty","clock430"],u:"1f55f"},{n:["clock face five oclock","clock5"],u:"1f554"},{n:["clock face five-thirty","clock530"],u:"1f560"},{n:["clock face six oclock","clock6"],u:"1f555"},{n:["clock face six-thirty","clock630"],u:"1f561"},{n:["clock face seven oclock","clock7"],u:"1f556"},{n:["clock face seven-thirty","clock730"],u:"1f562"},{n:["clock face eight oclock","clock8"],u:"1f557"},{n:["clock face eight-thirty","clock830"],u:"1f563"},{n:["clock face nine oclock","clock9"],u:"1f558"},{n:["clock face nine-thirty","clock930"],u:"1f564"},{n:["clock face ten oclock","clock10"],u:"1f559"},{n:["clock face ten-thirty","clock1030"],u:"1f565"},{n:["clock face eleven oclock","clock11"],u:"1f55a"},{n:["clock face eleven-thirty","clock1130"],u:"1f566"},{n:["new moon symbol","new_moon"],u:"1f311"},{n:["waxing crescent moon symbol","waxing_crescent_moon"],u:"1f312"},{n:["first quarter moon symbol","first_quarter_moon"],u:"1f313"},{n:["waxing gibbous moon symbol","moon","waxing_gibbous_moon"],u:"1f314"},{n:["full moon symbol","full_moon"],u:"1f315"},{n:["waning gibbous moon symbol","waning_gibbous_moon"],u:"1f316"},{n:["last quarter moon symbol","last_quarter_moon"],u:"1f317"},{n:["waning crescent moon symbol","waning_crescent_moon"],u:"1f318"},{n:["crescent moon","crescent_moon"],u:"1f319"},{n:["new moon with face","new_moon_with_face"],u:"1f31a"},{n:["first quarter moon with face","first_quarter_moon_with_face"],u:"1f31b"},{n:["last quarter moon with face","last_quarter_moon_with_face"],u:"1f31c"},{n:["thermometer"],u:"1f321-fe0f"},{n:["black sun with rays","sunny"],u:"2600-fe0f"},{n:["full moon with face","full_moon_with_face"],u:"1f31d"},{n:["sun with face","sun_with_face"],u:"1f31e"},{n:["white medium star","star"],u:"2b50"},{n:["glowing star","star2"],u:"1f31f"},{n:["shooting star","stars"],u:"1f320"},{n:["cloud"],u:"2601-fe0f"},{n:["sun behind cloud","partly_sunny"],u:"26c5"},{n:["thunder_cloud_and_rain"],u:"26c8-fe0f"},{n:["mostly_sunny","sun_small_cloud"],u:"1f324-fe0f"},{n:["barely_sunny","sun_behind_cloud"],u:"1f325-fe0f"},{n:["partly_sunny_rain","sun_behind_rain_cloud"],u:"1f326-fe0f"},{n:["rain_cloud"],u:"1f327-fe0f"},{n:["snow_cloud"],u:"1f328-fe0f"},{n:["lightning","lightning_cloud"],u:"1f329-fe0f"},{n:["tornado","tornado_cloud"],u:"1f32a-fe0f"},{n:["fog"],u:"1f32b-fe0f"},{n:["wind_blowing_face"],u:"1f32c-fe0f"},{n:["cyclone"],u:"1f300"},{n:["rainbow"],u:"1f308"},{n:["closed umbrella","closed_umbrella"],u:"1f302"},{n:["umbrella"],u:"2602-fe0f"},{n:["umbrella with rain drops","umbrella_with_rain_drops"],u:"2614"},{n:["umbrella_on_ground"],u:"26f1-fe0f"},{n:["high voltage sign","zap"],u:"26a1"},{n:["snowflake"],u:"2744-fe0f"},{n:["snowman"],u:"2603-fe0f"},{n:["snowman without snow","snowman_without_snow"],u:"26c4"},{n:["comet"],u:"2604-fe0f"},{n:["fire"],u:"1f525"},{n:["droplet"],u:"1f4a7"},{n:["water wave","ocean"],u:"1f30a"}],objects:[{n:["speaker with cancellation stroke","mute"],u:"1f507"},{n:["speaker"],u:"1f508"},{n:["speaker with one sound wave","sound"],u:"1f509"},{n:["speaker with three sound waves","loud_sound"],u:"1f50a"},{n:["public address loudspeaker","loudspeaker"],u:"1f4e2"},{n:["cheering megaphone","mega"],u:"1f4e3"},{n:["postal horn","postal_horn"],u:"1f4ef"},{n:["bell"],u:"1f514"},{n:["bell with cancellation stroke","no_bell"],u:"1f515"},{n:["musical score","musical_score"],u:"1f3bc"},{n:["musical note","musical_note"],u:"1f3b5"},{n:["multiple musical notes","notes"],u:"1f3b6"},{n:["studio_microphone"],u:"1f399-fe0f"},{n:["level_slider"],u:"1f39a-fe0f"},{n:["control_knobs"],u:"1f39b-fe0f"},{n:["microphone"],u:"1f3a4"},{n:["headphone","headphones"],u:"1f3a7"},{n:["radio"],u:"1f4fb"},{n:["saxophone"],u:"1f3b7"},{n:["guitar"],u:"1f3b8"},{n:["musical keyboard","musical_keyboard"],u:"1f3b9"},{n:["trumpet"],u:"1f3ba"},{n:["violin"],u:"1f3bb"},{n:["drum with drumsticks","drum_with_drumsticks"],u:"1f941"},{n:["mobile phone","iphone"],u:"1f4f1"},{n:["mobile phone with rightwards arrow at left","calling"],u:"1f4f2"},{n:["black telephone","phone","telephone"],u:"260e-fe0f"},{n:["telephone receiver","telephone_receiver"],u:"1f4de"},{n:["pager"],u:"1f4df"},{n:["fax machine","fax"],u:"1f4e0"},{n:["battery"],u:"1f50b"},{n:["electric plug","electric_plug"],u:"1f50c"},{n:["personal computer","computer"],u:"1f4bb"},{n:["desktop_computer"],u:"1f5a5-fe0f"},{n:["printer"],u:"1f5a8-fe0f"},{n:["keyboard"],u:"2328-fe0f"},{n:["three_button_mouse"],u:"1f5b1-fe0f"},{n:["trackball"],u:"1f5b2-fe0f"},{n:["minidisc"],u:"1f4bd"},{n:["floppy disk","floppy_disk"],u:"1f4be"},{n:["optical disc","cd"],u:"1f4bf"},{n:["dvd"],u:"1f4c0"},{n:["movie camera","movie_camera"],u:"1f3a5"},{n:["film_frames"],u:"1f39e-fe0f"},{n:["film_projector"],u:"1f4fd-fe0f"},{n:["clapper board","clapper"],u:"1f3ac"},{n:["television","tv"],u:"1f4fa"},{n:["camera"],u:"1f4f7"},{n:["camera with flash","camera_with_flash"],u:"1f4f8"},{n:["video camera","video_camera"],u:"1f4f9"},{n:["videocassette","vhs"],u:"1f4fc"},{n:["left-pointing magnifying glass","mag"],u:"1f50d"},{n:["right-pointing magnifying glass","mag_right"],u:"1f50e"},{n:["microscope"],u:"1f52c"},{n:["telescope"],u:"1f52d"},{n:["satellite antenna","satellite_antenna"],u:"1f4e1"},{n:["candle"],u:"1f56f-fe0f"},{n:["electric light bulb","bulb"],u:"1f4a1"},{n:["electric torch","flashlight"],u:"1f526"},{n:["izakaya lantern","izakaya_lantern","lantern"],u:"1f3ee"},{n:["notebook with decorative cover","notebook_with_decorative_cover"],u:"1f4d4"},{n:["closed book","closed_book"],u:"1f4d5"},{n:["open book","book","open_book"],u:"1f4d6"},{n:["green book","green_book"],u:"1f4d7"},{n:["blue book","blue_book"],u:"1f4d8"},{n:["orange book","orange_book"],u:"1f4d9"},{n:["books"],u:"1f4da"},{n:["notebook"],u:"1f4d3"},{n:["ledger"],u:"1f4d2"},{n:["page with curl","page_with_curl"],u:"1f4c3"},{n:["scroll"],u:"1f4dc"},{n:["page facing up","page_facing_up"],u:"1f4c4"},{n:["newspaper"],u:"1f4f0"},{n:["rolled_up_newspaper"],u:"1f5de-fe0f"},{n:["bookmark tabs","bookmark_tabs"],u:"1f4d1"},{n:["bookmark"],u:"1f516"},{n:["label"],u:"1f3f7-fe0f"},{n:["money bag","moneybag"],u:"1f4b0"},{n:["banknote with yen sign","yen"],u:"1f4b4"},{n:["banknote with dollar sign","dollar"],u:"1f4b5"},{n:["banknote with euro sign","euro"],u:"1f4b6"},{n:["banknote with pound sign","pound"],u:"1f4b7"},{n:["money with wings","money_with_wings"],u:"1f4b8"},{n:["credit card","credit_card"],u:"1f4b3"},{n:["chart with upwards trend and yen sign","chart"],u:"1f4b9"},{n:["currency exchange","currency_exchange"],u:"1f4b1"},{n:["heavy dollar sign","heavy_dollar_sign"],u:"1f4b2"},{n:["envelope","email"],u:"2709-fe0f"},{n:["e-mail symbol","e-mail"],u:"1f4e7"},{n:["incoming envelope","incoming_envelope"],u:"1f4e8"},{n:["envelope with downwards arrow above","envelope_with_arrow"],u:"1f4e9"},{n:["outbox tray","outbox_tray"],u:"1f4e4"},{n:["inbox tray","inbox_tray"],u:"1f4e5"},{n:["package"],u:"1f4e6"},{n:["closed mailbox with raised flag","mailbox"],u:"1f4eb"},{n:["closed mailbox with lowered flag","mailbox_closed"],u:"1f4ea"},{n:["open mailbox with raised flag","mailbox_with_mail"],u:"1f4ec"},{n:["open mailbox with lowered flag","mailbox_with_no_mail"],u:"1f4ed"},{n:["postbox"],u:"1f4ee"},{n:["ballot_box_with_ballot"],u:"1f5f3-fe0f"},{n:["pencil","pencil2"],u:"270f-fe0f"},{n:["black nib","black_nib"],u:"2712-fe0f"},{n:["lower_left_fountain_pen"],u:"1f58b-fe0f"},{n:["lower_left_ballpoint_pen"],u:"1f58a-fe0f"},{n:["lower_left_paintbrush"],u:"1f58c-fe0f"},{n:["lower_left_crayon"],u:"1f58d-fe0f"},{n:["memo","pencil"],u:"1f4dd"},{n:["briefcase"],u:"1f4bc"},{n:["file folder","file_folder"],u:"1f4c1"},{n:["open file folder","open_file_folder"],u:"1f4c2"},{n:["card_index_dividers"],u:"1f5c2-fe0f"},{n:["calendar","date"],u:"1f4c5"},{n:["tear-off calendar","calendar"],u:"1f4c6"},{n:["spiral_note_pad"],u:"1f5d2-fe0f"},{n:["spiral_calendar_pad"],u:"1f5d3-fe0f"},{n:["card index","card_index"],u:"1f4c7"},{n:["chart with upwards trend","chart_with_upwards_trend"],u:"1f4c8"},{n:["chart with downwards trend","chart_with_downwards_trend"],u:"1f4c9"},{n:["bar chart","bar_chart"],u:"1f4ca"},{n:["clipboard"],u:"1f4cb"},{n:["pushpin"],u:"1f4cc"},{n:["round pushpin","round_pushpin"],u:"1f4cd"},{n:["paperclip"],u:"1f4ce"},{n:["linked_paperclips"],u:"1f587-fe0f"},{n:["straight ruler","straight_ruler"],u:"1f4cf"},{n:["triangular ruler","triangular_ruler"],u:"1f4d0"},{n:["black scissors","scissors"],u:"2702-fe0f"},{n:["card_file_box"],u:"1f5c3-fe0f"},{n:["file_cabinet"],u:"1f5c4-fe0f"},{n:["wastebasket"],u:"1f5d1-fe0f"},{n:["lock"],u:"1f512"},{n:["open lock","unlock"],u:"1f513"},{n:["lock with ink pen","lock_with_ink_pen"],u:"1f50f"},{n:["closed lock with key","closed_lock_with_key"],u:"1f510"},{n:["key"],u:"1f511"},{n:["old_key"],u:"1f5dd-fe0f"},{n:["hammer"],u:"1f528"},{n:["pick"],u:"26cf-fe0f"},{n:["hammer_and_pick"],u:"2692-fe0f"},{n:["hammer_and_wrench"],u:"1f6e0-fe0f"},{n:["dagger_knife"],u:"1f5e1-fe0f"},{n:["crossed_swords"],u:"2694-fe0f"},{n:["pistol","gun"],u:"1f52b"},{n:["bow and arrow","bow_and_arrow"],u:"1f3f9"},{n:["shield"],u:"1f6e1-fe0f"},{n:["wrench"],u:"1f527"},{n:["nut and bolt","nut_and_bolt"],u:"1f529"},{n:["gear"],u:"2699-fe0f"},{n:["compression"],u:"1f5dc-fe0f"},{n:["alembic"],u:"2697-fe0f"},{n:["scales"],u:"2696-fe0f"},{n:["link symbol","link"],u:"1f517"},{n:["chains"],u:"26d3-fe0f"},{n:["syringe"],u:"1f489"},{n:["pill"],u:"1f48a"},{n:["smoking symbol","smoking"],u:"1f6ac"},{n:["coffin"],u:"26b0-fe0f"},{n:["funeral_urn"],u:"26b1-fe0f"},{n:["moyai"],u:"1f5ff"},{n:["oil_drum"],u:"1f6e2-fe0f"},{n:["crystal ball","crystal_ball"],u:"1f52e"},{n:["shopping trolley","shopping_trolley"],u:"1f6d2"}],symbols:[{n:["automated teller machine","atm"],u:"1f3e7"},{n:["put litter in its place symbol","put_litter_in_its_place"],u:"1f6ae"},{n:["potable water symbol","potable_water"],u:"1f6b0"},{n:["wheelchair symbol","wheelchair"],u:"267f"},{n:["mens symbol","mens"],u:"1f6b9"},{n:["womens symbol","womens"],u:"1f6ba"},{n:["restroom"],u:"1f6bb"},{n:["baby symbol","baby_symbol"],u:"1f6bc"},{n:["water closet","wc"],u:"1f6be"},{n:["passport control","passport_control"],u:"1f6c2"},{n:["customs"],u:"1f6c3"},{n:["baggage claim","baggage_claim"],u:"1f6c4"},{n:["left luggage","left_luggage"],u:"1f6c5"},{n:["warning sign","warning"],u:"26a0-fe0f"},{n:["children crossing","children_crossing"],u:"1f6b8"},{n:["no entry","no_entry"],u:"26d4"},{n:["no entry sign","no_entry_sign"],u:"1f6ab"},{n:["no bicycles","no_bicycles"],u:"1f6b3"},{n:["no smoking symbol","no_smoking"],u:"1f6ad"},{n:["do not litter symbol","do_not_litter"],u:"1f6af"},{n:["non-potable water symbol","non-potable_water"],u:"1f6b1"},{n:["no pedestrians","no_pedestrians"],u:"1f6b7"},{n:["no mobile phones","no_mobile_phones"],u:"1f4f5"},{n:["no one under eighteen symbol","underage"],u:"1f51e"},{n:["radioactive_sign"],u:"2622-fe0f"},{n:["biohazard_sign"],u:"2623-fe0f"},{n:["upwards black arrow","arrow_up"],u:"2b06-fe0f"},{n:["north east arrow","arrow_upper_right"],u:"2197-fe0f"},{n:["black rightwards arrow","arrow_right"],u:"27a1-fe0f"},{n:["south east arrow","arrow_lower_right"],u:"2198-fe0f"},{n:["downwards black arrow","arrow_down"],u:"2b07-fe0f"},{n:["south west arrow","arrow_lower_left"],u:"2199-fe0f"},{n:["leftwards black arrow","arrow_left"],u:"2b05-fe0f"},{n:["north west arrow","arrow_upper_left"],u:"2196-fe0f"},{n:["up down arrow","arrow_up_down"],u:"2195-fe0f"},{n:["left right arrow","left_right_arrow"],u:"2194-fe0f"},{n:["leftwards arrow with hook","leftwards_arrow_with_hook"],u:"21a9-fe0f"},{n:["rightwards arrow with hook","arrow_right_hook"],u:"21aa-fe0f"},{n:["arrow pointing rightwards then curving upwards","arrow_heading_up"],u:"2934-fe0f"},{n:["arrow pointing rightwards then curving downwards","arrow_heading_down"],u:"2935-fe0f"},{n:["clockwise downwards and upwards open circle arrows","arrows_clockwise"],u:"1f503"},{n:["anticlockwise downwards and upwards open circle arrows","arrows_counterclockwise"],u:"1f504"},{n:["back with leftwards arrow above","back"],u:"1f519"},{n:["end with leftwards arrow above","end"],u:"1f51a"},{n:["on with exclamation mark with left right arrow above","on"],u:"1f51b"},{n:["soon with rightwards arrow above","soon"],u:"1f51c"},{n:["top with upwards arrow above","top"],u:"1f51d"},{n:["place of worship","place_of_worship"],u:"1f6d0"},{n:["atom_symbol"],u:"269b-fe0f"},{n:["om_symbol"],u:"1f549-fe0f"},{n:["star_of_david"],u:"2721-fe0f"},{n:["wheel_of_dharma"],u:"2638-fe0f"},{n:["yin_yang"],u:"262f-fe0f"},{n:["latin_cross"],u:"271d-fe0f"},{n:["orthodox_cross"],u:"2626-fe0f"},{n:["star_and_crescent"],u:"262a-fe0f"},{n:["peace_symbol"],u:"262e-fe0f"},{n:["menorah with nine branches","menorah_with_nine_branches"],u:"1f54e"},{n:["six pointed star with middle dot","six_pointed_star"],u:"1f52f"},{n:["aries"],u:"2648"},{n:["taurus"],u:"2649"},{n:["gemini"],u:"264a"},{n:["cancer"],u:"264b"},{n:["leo"],u:"264c"},{n:["virgo"],u:"264d"},{n:["libra"],u:"264e"},{n:["scorpius"],u:"264f"},{n:["sagittarius"],u:"2650"},{n:["capricorn"],u:"2651"},{n:["aquarius"],u:"2652"},{n:["pisces"],u:"2653"},{n:["ophiuchus"],u:"26ce"},{n:["twisted rightwards arrows","twisted_rightwards_arrows"],u:"1f500"},{n:["clockwise rightwards and leftwards open circle arrows","repeat"],u:"1f501"},{n:["clockwise rightwards and leftwards open circle arrows with circled one overlay","repeat_one"],u:"1f502"},{n:["black right-pointing triangle","arrow_forward"],u:"25b6-fe0f"},{n:["black right-pointing double triangle","fast_forward"],u:"23e9"},{n:["black_right_pointing_double_triangle_with_vertical_bar"],u:"23ed-fe0f"},{n:["black_right_pointing_triangle_with_double_vertical_bar"],u:"23ef-fe0f"},{n:["black left-pointing triangle","arrow_backward"],u:"25c0-fe0f"},{n:["black left-pointing double triangle","rewind"],u:"23ea"},{n:["black_left_pointing_double_triangle_with_vertical_bar"],u:"23ee-fe0f"},{n:["up-pointing small red triangle","arrow_up_small"],u:"1f53c"},{n:["black up-pointing double triangle","arrow_double_up"],u:"23eb"},{n:["down-pointing small red triangle","arrow_down_small"],u:"1f53d"},{n:["black down-pointing double triangle","arrow_double_down"],u:"23ec"},{n:["double_vertical_bar"],u:"23f8-fe0f"},{n:["black_square_for_stop"],u:"23f9-fe0f"},{n:["black_circle_for_record"],u:"23fa-fe0f"},{n:["eject"],u:"23cf-fe0f"},{n:["cinema"],u:"1f3a6"},{n:["low brightness symbol","low_brightness"],u:"1f505"},{n:["high brightness symbol","high_brightness"],u:"1f506"},{n:["antenna with bars","signal_strength"],u:"1f4f6"},{n:["vibration mode","vibration_mode"],u:"1f4f3"},{n:["mobile phone off","mobile_phone_off"],u:"1f4f4"},{n:["female_sign"],u:"2640-fe0f"},{n:["male_sign"],u:"2642-fe0f"},{n:["medical_symbol","staff_of_aesculapius"],u:"2695-fe0f"},{n:["black universal recycling symbol","recycle"],u:"267b-fe0f"},{n:["fleur_de_lis"],u:"269c-fe0f"},{n:["trident emblem","trident"],u:"1f531"},{n:["name badge","name_badge"],u:"1f4db"},{n:["japanese symbol for beginner","beginner"],u:"1f530"},{n:["heavy large circle","o"],u:"2b55"},{n:["white heavy check mark","white_check_mark"],u:"2705"},{n:["ballot box with check","ballot_box_with_check"],u:"2611-fe0f"},{n:["heavy check mark","heavy_check_mark"],u:"2714-fe0f"},{n:["heavy multiplication x","heavy_multiplication_x"],u:"2716-fe0f"},{n:["cross mark","x"],u:"274c"},{n:["negative squared cross mark","negative_squared_cross_mark"],u:"274e"},{n:["heavy plus sign","heavy_plus_sign"],u:"2795"},{n:["heavy minus sign","heavy_minus_sign"],u:"2796"},{n:["heavy division sign","heavy_division_sign"],u:"2797"},{n:["curly loop","curly_loop"],u:"27b0"},{n:["double curly loop","loop"],u:"27bf"},{n:["part alternation mark","part_alternation_mark"],u:"303d-fe0f"},{n:["eight spoked asterisk","eight_spoked_asterisk"],u:"2733-fe0f"},{n:["eight pointed black star","eight_pointed_black_star"],u:"2734-fe0f"},{n:["sparkle"],u:"2747-fe0f"},{n:["double exclamation mark","bangbang"],u:"203c-fe0f"},{n:["exclamation question mark","interrobang"],u:"2049-fe0f"},{n:["black question mark ornament","question"],u:"2753"},{n:["white question mark ornament","grey_question"],u:"2754"},{n:["white exclamation mark ornament","grey_exclamation"],u:"2755"},{n:["heavy exclamation mark symbol","exclamation","heavy_exclamation_mark"],u:"2757"},{n:["wavy dash","wavy_dash"],u:"3030-fe0f"},{n:["copyright sign","copyright"],u:"00a9-fe0f"},{n:["registered sign","registered"],u:"00ae-fe0f"},{n:["trade mark sign","tm"],u:"2122-fe0f"},{n:["hash key","hash"],u:"0023-fe0f-20e3"},{n:["keycap_star"],u:"002a-fe0f-20e3"},{n:["keycap 0","zero"],u:"0030-fe0f-20e3"},{n:["keycap 1","one"],u:"0031-fe0f-20e3"},{n:["keycap 2","two"],u:"0032-fe0f-20e3"},{n:["keycap 3","three"],u:"0033-fe0f-20e3"},{n:["keycap 4","four"],u:"0034-fe0f-20e3"},{n:["keycap 5","five"],u:"0035-fe0f-20e3"},{n:["keycap 6","six"],u:"0036-fe0f-20e3"},{n:["keycap 7","seven"],u:"0037-fe0f-20e3"},{n:["keycap 8","eight"],u:"0038-fe0f-20e3"},{n:["keycap 9","nine"],u:"0039-fe0f-20e3"},{n:["keycap ten","keycap_ten"],u:"1f51f"},{n:["hundred points symbol","100"],u:"1f4af"},{n:["input symbol for latin capital letters","capital_abcd"],u:"1f520"},{n:["input symbol for latin small letters","abcd"],u:"1f521"},{n:["input symbol for numbers","1234"],u:"1f522"},{n:["input symbol for symbols","symbols"],u:"1f523"},{n:["input symbol for latin letters","abc"],u:"1f524"},{n:["negative squared latin capital letter a","a"],u:"1f170-fe0f"},{n:["negative squared ab","ab"],u:"1f18e"},{n:["negative squared latin capital letter b","b"],u:"1f171-fe0f"},{n:["squared cl","cl"],u:"1f191"},{n:["squared cool","cool"],u:"1f192"},{n:["squared free","free"],u:"1f193"},{n:["information source","information_source"],u:"2139-fe0f"},{n:["squared id","id"],u:"1f194"},{n:["circled latin capital letter m","m"],u:"24c2-fe0f"},{n:["squared new","new"],u:"1f195"},{n:["squared ng","ng"],u:"1f196"},{n:["negative squared latin capital letter o","o2"],u:"1f17e-fe0f"},{n:["squared ok","ok"],u:"1f197"},{n:["negative squared latin capital letter p","parking"],u:"1f17f-fe0f"},{n:["squared sos","sos"],u:"1f198"},{n:["squared up with exclamation mark","up"],u:"1f199"},{n:["squared vs","vs"],u:"1f19a"},{n:["squared katakana koko","koko"],u:"1f201"},{n:["squared katakana sa","sa"],u:"1f202-fe0f"},{n:["squared cjk unified ideograph-6708","u6708"],u:"1f237-fe0f"},{n:["squared cjk unified ideograph-6709","u6709"],u:"1f236"},{n:["squared cjk unified ideograph-6307","u6307"],u:"1f22f"},{n:["circled ideograph advantage","ideograph_advantage"],u:"1f250"},{n:["squared cjk unified ideograph-5272","u5272"],u:"1f239"},{n:["squared cjk unified ideograph-7121","u7121"],u:"1f21a"},{n:["squared cjk unified ideograph-7981","u7981"],u:"1f232"},{n:["circled ideograph accept","accept"],u:"1f251"},{n:["squared cjk unified ideograph-7533","u7533"],u:"1f238"},{n:["squared cjk unified ideograph-5408","u5408"],u:"1f234"},{n:["squared cjk unified ideograph-7a7a","u7a7a"],u:"1f233"},{n:["circled ideograph congratulation","congratulations"],u:"3297-fe0f"},{n:["circled ideograph secret","secret"],u:"3299-fe0f"},{n:["squared cjk unified ideograph-55b6","u55b6"],u:"1f23a"},{n:["squared cjk unified ideograph-6e80","u6e80"],u:"1f235"},{n:["black small square","black_small_square"],u:"25aa-fe0f"},{n:["white small square","white_small_square"],u:"25ab-fe0f"},{n:["white medium square","white_medium_square"],u:"25fb-fe0f"},{n:["black medium square","black_medium_square"],u:"25fc-fe0f"},{n:["white medium small square","white_medium_small_square"],u:"25fd"},{n:["black medium small square","black_medium_small_square"],u:"25fe"},{n:["black large square","black_large_square"],u:"2b1b"},{n:["white large square","white_large_square"],u:"2b1c"},{n:["large orange diamond","large_orange_diamond"],u:"1f536"},{n:["large blue diamond","large_blue_diamond"],u:"1f537"},{n:["small orange diamond","small_orange_diamond"],u:"1f538"},{n:["small blue diamond","small_blue_diamond"],u:"1f539"},{n:["up-pointing red triangle","small_red_triangle"],u:"1f53a"},{n:["down-pointing red triangle","small_red_triangle_down"],u:"1f53b"},{n:["diamond shape with a dot inside","diamond_shape_with_a_dot_inside"],u:"1f4a0"},{n:["radio button","radio_button"],u:"1f518"},{n:["black square button","black_square_button"],u:"1f532"},{n:["white square button","white_square_button"],u:"1f533"},{n:["medium white circle","white_circle"],u:"26aa"},{n:["medium black circle","black_circle"],u:"26ab"},{n:["large red circle","red_circle"],u:"1f534"},{n:["large blue circle","large_blue_circle"],u:"1f535"}],flags:[{n:["chequered flag","checkered_flag"],u:"1f3c1"},{n:["triangular flag on post","triangular_flag_on_post"],u:"1f6a9"},{n:["crossed flags","crossed_flags"],u:"1f38c"},{n:["waving black flag","waving_black_flag"],u:"1f3f4"},{n:["waving_white_flag"],u:"1f3f3-fe0f"},{n:["rainbow-flag"],u:"1f3f3-fe0f-200d-1f308"},{n:["ascension island flag","flag-ac"],u:"1f1e6-1f1e8"},{n:["andorra flag","flag-ad"],u:"1f1e6-1f1e9"},{n:["united arab emirates flag","flag-ae"],u:"1f1e6-1f1ea"},{n:["afghanistan flag","flag-af"],u:"1f1e6-1f1eb"},{n:["antigua & barbuda flag","flag-ag"],u:"1f1e6-1f1ec"},{n:["anguilla flag","flag-ai"],u:"1f1e6-1f1ee"},{n:["albania flag","flag-al"],u:"1f1e6-1f1f1"},{n:["armenia flag","flag-am"],u:"1f1e6-1f1f2"},{n:["angola flag","flag-ao"],u:"1f1e6-1f1f4"},{n:["antarctica flag","flag-aq"],u:"1f1e6-1f1f6"},{n:["argentina flag","flag-ar"],u:"1f1e6-1f1f7"},{n:["american samoa flag","flag-as"],u:"1f1e6-1f1f8"},{n:["austria flag","flag-at"],u:"1f1e6-1f1f9"},{n:["australia flag","flag-au"],u:"1f1e6-1f1fa"},{n:["aruba flag","flag-aw"],u:"1f1e6-1f1fc"},{n:["Γ₯land islands flag","flag-ax"],u:"1f1e6-1f1fd"},{n:["azerbaijan flag","flag-az"],u:"1f1e6-1f1ff"},{n:["bosnia & herzegovina flag","flag-ba"],u:"1f1e7-1f1e6"},{n:["barbados flag","flag-bb"],u:"1f1e7-1f1e7"},{n:["bangladesh flag","flag-bd"],u:"1f1e7-1f1e9"},{n:["belgium flag","flag-be"],u:"1f1e7-1f1ea"},{n:["burkina faso flag","flag-bf"],u:"1f1e7-1f1eb"},{n:["bulgaria flag","flag-bg"],u:"1f1e7-1f1ec"},{n:["bahrain flag","flag-bh"],u:"1f1e7-1f1ed"},{n:["burundi flag","flag-bi"],u:"1f1e7-1f1ee"},{n:["benin flag","flag-bj"],u:"1f1e7-1f1ef"},{n:["st. barthΓ©lemy flag","flag-bl"],u:"1f1e7-1f1f1"},{n:["bermuda flag","flag-bm"],u:"1f1e7-1f1f2"},{n:["brunei flag","flag-bn"],u:"1f1e7-1f1f3"},{n:["bolivia flag","flag-bo"],u:"1f1e7-1f1f4"},{n:["caribbean netherlands flag","flag-bq"],u:"1f1e7-1f1f6"},{n:["brazil flag","flag-br"],u:"1f1e7-1f1f7"},{n:["bahamas flag","flag-bs"],u:"1f1e7-1f1f8"},{n:["bhutan flag","flag-bt"],u:"1f1e7-1f1f9"},{n:["bouvet island flag","flag-bv"],u:"1f1e7-1f1fb"},{n:["botswana flag","flag-bw"],u:"1f1e7-1f1fc"},{n:["belarus flag","flag-by"],u:"1f1e7-1f1fe"},{n:["belize flag","flag-bz"],u:"1f1e7-1f1ff"},{n:["canada flag","flag-ca"],u:"1f1e8-1f1e6"},{n:["cocos (keeling) islands flag","flag-cc"],u:"1f1e8-1f1e8"},{n:["congo - kinshasa flag","flag-cd"],u:"1f1e8-1f1e9"},{n:["central african republic flag","flag-cf"],u:"1f1e8-1f1eb"},{n:["congo - brazzaville flag","flag-cg"],u:"1f1e8-1f1ec"},{n:["switzerland flag","flag-ch"],u:"1f1e8-1f1ed"},{n:["cΓ΄te d’ivoire flag","flag-ci"],u:"1f1e8-1f1ee"},{n:["cook islands flag","flag-ck"],u:"1f1e8-1f1f0"},{n:["chile flag","flag-cl"],u:"1f1e8-1f1f1"},{n:["cameroon flag","flag-cm"],u:"1f1e8-1f1f2"},{n:["china flag","cn","flag-cn"],u:"1f1e8-1f1f3"},{n:["colombia flag","flag-co"],u:"1f1e8-1f1f4"},{n:["clipperton island flag","flag-cp"],u:"1f1e8-1f1f5"},{n:["costa rica flag","flag-cr"],u:"1f1e8-1f1f7"},{n:["cuba flag","flag-cu"],u:"1f1e8-1f1fa"},{n:["cape verde flag","flag-cv"],u:"1f1e8-1f1fb"},{n:["curaΓ§ao flag","flag-cw"],u:"1f1e8-1f1fc"},{n:["christmas island flag","flag-cx"],u:"1f1e8-1f1fd"},{n:["cyprus flag","flag-cy"],u:"1f1e8-1f1fe"},{n:["czechia flag","flag-cz"],u:"1f1e8-1f1ff"},{n:["germany flag","de","flag-de"],u:"1f1e9-1f1ea"},{n:["diego garcia flag","flag-dg"],u:"1f1e9-1f1ec"},{n:["djibouti flag","flag-dj"],u:"1f1e9-1f1ef"},{n:["denmark flag","flag-dk"],u:"1f1e9-1f1f0"},{n:["dominica flag","flag-dm"],u:"1f1e9-1f1f2"},{n:["dominican republic flag","flag-do"],u:"1f1e9-1f1f4"},{n:["algeria flag","flag-dz"],u:"1f1e9-1f1ff"},{n:["ceuta & melilla flag","flag-ea"],u:"1f1ea-1f1e6"},{n:["ecuador flag","flag-ec"],u:"1f1ea-1f1e8"},{n:["estonia flag","flag-ee"],u:"1f1ea-1f1ea"},{n:["egypt flag","flag-eg"],u:"1f1ea-1f1ec"},{n:["western sahara flag","flag-eh"],u:"1f1ea-1f1ed"},{n:["eritrea flag","flag-er"],u:"1f1ea-1f1f7"},{n:["spain flag","es","flag-es"],u:"1f1ea-1f1f8"},{n:["ethiopia flag","flag-et"],u:"1f1ea-1f1f9"},{n:["european union flag","flag-eu"],u:"1f1ea-1f1fa"},{n:["finland flag","flag-fi"],u:"1f1eb-1f1ee"},{n:["fiji flag","flag-fj"],u:"1f1eb-1f1ef"},{n:["falkland islands flag","flag-fk"],u:"1f1eb-1f1f0"},{n:["micronesia flag","flag-fm"],u:"1f1eb-1f1f2"},{n:["faroe islands flag","flag-fo"],u:"1f1eb-1f1f4"},{n:["france flag","fr","flag-fr"],u:"1f1eb-1f1f7"},{n:["gabon flag","flag-ga"],u:"1f1ec-1f1e6"},{n:["united kingdom flag","gb","uk","flag-gb"],u:"1f1ec-1f1e7"},{n:["grenada flag","flag-gd"],u:"1f1ec-1f1e9"},{n:["georgia flag","flag-ge"],u:"1f1ec-1f1ea"},{n:["french guiana flag","flag-gf"],u:"1f1ec-1f1eb"},{n:["guernsey flag","flag-gg"],u:"1f1ec-1f1ec"},{n:["ghana flag","flag-gh"],u:"1f1ec-1f1ed"},{n:["gibraltar flag","flag-gi"],u:"1f1ec-1f1ee"},{n:["greenland flag","flag-gl"],u:"1f1ec-1f1f1"},{n:["gambia flag","flag-gm"],u:"1f1ec-1f1f2"},{n:["guinea flag","flag-gn"],u:"1f1ec-1f1f3"},{n:["guadeloupe flag","flag-gp"],u:"1f1ec-1f1f5"},{n:["equatorial guinea flag","flag-gq"],u:"1f1ec-1f1f6"},{n:["greece flag","flag-gr"],u:"1f1ec-1f1f7"},{n:["south georgia & south sandwich islands flag","flag-gs"],u:"1f1ec-1f1f8"},{n:["guatemala flag","flag-gt"],u:"1f1ec-1f1f9"},{n:["guam flag","flag-gu"],u:"1f1ec-1f1fa"},{n:["guinea-bissau flag","flag-gw"],u:"1f1ec-1f1fc"},{n:["guyana flag","flag-gy"],u:"1f1ec-1f1fe"},{n:["hong kong sar china flag","flag-hk"],u:"1f1ed-1f1f0"},{n:["heard & mcdonald islands flag","flag-hm"],u:"1f1ed-1f1f2"},{n:["honduras flag","flag-hn"],u:"1f1ed-1f1f3"},{n:["croatia flag","flag-hr"],u:"1f1ed-1f1f7"},{n:["haiti flag","flag-ht"],u:"1f1ed-1f1f9"},{n:["hungary flag","flag-hu"],u:"1f1ed-1f1fa"},{n:["canary islands flag","flag-ic"],u:"1f1ee-1f1e8"},{n:["indonesia flag","flag-id"],u:"1f1ee-1f1e9"},{n:["ireland flag","flag-ie"],u:"1f1ee-1f1ea"},{n:["israel flag","flag-il"],u:"1f1ee-1f1f1"},{n:["isle of man flag","flag-im"],u:"1f1ee-1f1f2"},{n:["india flag","flag-in"],u:"1f1ee-1f1f3"},{n:["british indian ocean territory flag","flag-io"],u:"1f1ee-1f1f4"},{n:["iraq flag","flag-iq"],u:"1f1ee-1f1f6"},{n:["iran flag","flag-ir"],u:"1f1ee-1f1f7"},{n:["iceland flag","flag-is"],u:"1f1ee-1f1f8"},{n:["italy flag","it","flag-it"],u:"1f1ee-1f1f9"},{n:["jersey flag","flag-je"],u:"1f1ef-1f1ea"},{n:["jamaica flag","flag-jm"],u:"1f1ef-1f1f2"},{n:["jordan flag","flag-jo"],u:"1f1ef-1f1f4"},{n:["japan flag","jp","flag-jp"],u:"1f1ef-1f1f5"},{n:["kenya flag","flag-ke"],u:"1f1f0-1f1ea"},{n:["kyrgyzstan flag","flag-kg"],u:"1f1f0-1f1ec"},{n:["cambodia flag","flag-kh"],u:"1f1f0-1f1ed"},{n:["kiribati flag","flag-ki"],u:"1f1f0-1f1ee"},{n:["comoros flag","flag-km"],u:"1f1f0-1f1f2"},{n:["st. kitts & nevis flag","flag-kn"],u:"1f1f0-1f1f3"},{n:["north korea flag","flag-kp"],u:"1f1f0-1f1f5"},{n:["south korea flag","kr","flag-kr"],u:"1f1f0-1f1f7"},{n:["kuwait flag","flag-kw"],u:"1f1f0-1f1fc"},{n:["cayman islands flag","flag-ky"],u:"1f1f0-1f1fe"},{n:["kazakhstan flag","flag-kz"],u:"1f1f0-1f1ff"},{n:["laos flag","flag-la"],u:"1f1f1-1f1e6"},{n:["lebanon flag","flag-lb"],u:"1f1f1-1f1e7"},{n:["st. lucia flag","flag-lc"],u:"1f1f1-1f1e8"},{n:["liechtenstein flag","flag-li"],u:"1f1f1-1f1ee"},{n:["sri lanka flag","flag-lk"],u:"1f1f1-1f1f0"},{n:["liberia flag","flag-lr"],u:"1f1f1-1f1f7"},{n:["lesotho flag","flag-ls"],u:"1f1f1-1f1f8"},{n:["lithuania flag","flag-lt"],u:"1f1f1-1f1f9"},{n:["luxembourg flag","flag-lu"],u:"1f1f1-1f1fa"},{n:["latvia flag","flag-lv"],u:"1f1f1-1f1fb"},{n:["libya flag","flag-ly"],u:"1f1f1-1f1fe"},{n:["morocco flag","flag-ma"],u:"1f1f2-1f1e6"},{n:["monaco flag","flag-mc"],u:"1f1f2-1f1e8"},{n:["moldova flag","flag-md"],u:"1f1f2-1f1e9"},{n:["montenegro flag","flag-me"],u:"1f1f2-1f1ea"},{n:["st. martin flag","flag-mf"],u:"1f1f2-1f1eb"},{n:["madagascar flag","flag-mg"],u:"1f1f2-1f1ec"},{n:["marshall islands flag","flag-mh"],u:"1f1f2-1f1ed"},{n:["macedonia flag","flag-mk"],u:"1f1f2-1f1f0"},{n:["mali flag","flag-ml"],u:"1f1f2-1f1f1"},{n:["myanmar (burma) flag","flag-mm"],u:"1f1f2-1f1f2"},{n:["mongolia flag","flag-mn"],u:"1f1f2-1f1f3"},{n:["macau sar china flag","flag-mo"],u:"1f1f2-1f1f4"},{n:["northern mariana islands flag","flag-mp"],u:"1f1f2-1f1f5"},{n:["martinique flag","flag-mq"],u:"1f1f2-1f1f6"},{n:["mauritania flag","flag-mr"],u:"1f1f2-1f1f7"},{n:["montserrat flag","flag-ms"],u:"1f1f2-1f1f8"},{n:["malta flag","flag-mt"],u:"1f1f2-1f1f9"},{n:["mauritius flag","flag-mu"],u:"1f1f2-1f1fa"},{n:["maldives flag","flag-mv"],u:"1f1f2-1f1fb"},{n:["malawi flag","flag-mw"],u:"1f1f2-1f1fc"},{n:["mexico flag","flag-mx"],u:"1f1f2-1f1fd"},{n:["malaysia flag","flag-my"],u:"1f1f2-1f1fe"},{n:["mozambique flag","flag-mz"],u:"1f1f2-1f1ff"},{n:["namibia flag","flag-na"],u:"1f1f3-1f1e6"},{n:["new caledonia flag","flag-nc"],u:"1f1f3-1f1e8"},{n:["niger flag","flag-ne"],u:"1f1f3-1f1ea"},{n:["norfolk island flag","flag-nf"],u:"1f1f3-1f1eb"},{n:["nigeria flag","flag-ng"],u:"1f1f3-1f1ec"},{n:["nicaragua flag","flag-ni"],u:"1f1f3-1f1ee"},{n:["netherlands flag","flag-nl"],u:"1f1f3-1f1f1"},{n:["norway flag","flag-no"],u:"1f1f3-1f1f4"},{n:["nepal flag","flag-np"],u:"1f1f3-1f1f5"},{n:["nauru flag","flag-nr"],u:"1f1f3-1f1f7"},{n:["niue flag","flag-nu"],u:"1f1f3-1f1fa"},{n:["new zealand flag","flag-nz"],u:"1f1f3-1f1ff"},{n:["oman flag","flag-om"],u:"1f1f4-1f1f2"},{n:["panama flag","flag-pa"],u:"1f1f5-1f1e6"},{n:["peru flag","flag-pe"],u:"1f1f5-1f1ea"},{n:["french polynesia flag","flag-pf"],u:"1f1f5-1f1eb"},{n:["papua new guinea flag","flag-pg"],u:"1f1f5-1f1ec"},{n:["philippines flag","flag-ph"],u:"1f1f5-1f1ed"},{n:["pakistan flag","flag-pk"],u:"1f1f5-1f1f0"},{n:["poland flag","flag-pl"],u:"1f1f5-1f1f1"},{n:["st. pierre & miquelon flag","flag-pm"],u:"1f1f5-1f1f2"},{n:["pitcairn islands flag","flag-pn"],u:"1f1f5-1f1f3"},{n:["puerto rico flag","flag-pr"],u:"1f1f5-1f1f7"},{n:["palestinian territories flag","flag-ps"],u:"1f1f5-1f1f8"},{n:["portugal flag","flag-pt"],u:"1f1f5-1f1f9"},{n:["palau flag","flag-pw"],u:"1f1f5-1f1fc"},{n:["paraguay flag","flag-py"],u:"1f1f5-1f1fe"},{n:["qatar flag","flag-qa"],u:"1f1f6-1f1e6"},{n:["rΓ©union flag","flag-re"],u:"1f1f7-1f1ea"},{n:["romania flag","flag-ro"],u:"1f1f7-1f1f4"},{n:["serbia flag","flag-rs"],u:"1f1f7-1f1f8"},{n:["russia flag","ru","flag-ru"],u:"1f1f7-1f1fa"},{n:["rwanda flag","flag-rw"],u:"1f1f7-1f1fc"},{n:["saudi arabia flag","flag-sa"],u:"1f1f8-1f1e6"},{n:["solomon islands flag","flag-sb"],u:"1f1f8-1f1e7"},{n:["seychelles flag","flag-sc"],u:"1f1f8-1f1e8"},{n:["sudan flag","flag-sd"],u:"1f1f8-1f1e9"},{n:["sweden flag","flag-se"],u:"1f1f8-1f1ea"},{n:["singapore flag","flag-sg"],u:"1f1f8-1f1ec"},{n:["st. helena flag","flag-sh"],u:"1f1f8-1f1ed"},{n:["slovenia flag","flag-si"],u:"1f1f8-1f1ee"},{n:["svalbard & jan mayen flag","flag-sj"],u:"1f1f8-1f1ef"},{n:["slovakia flag","flag-sk"],u:"1f1f8-1f1f0"},{n:["sierra leone flag","flag-sl"],u:"1f1f8-1f1f1"},{n:["san marino flag","flag-sm"],u:"1f1f8-1f1f2"},{n:["senegal flag","flag-sn"],u:"1f1f8-1f1f3"},{n:["somalia flag","flag-so"],u:"1f1f8-1f1f4"},{n:["suriname flag","flag-sr"],u:"1f1f8-1f1f7"},{n:["south sudan flag","flag-ss"],u:"1f1f8-1f1f8"},{n:["sΓ£o tomΓ© & prΓ­ncipe flag","flag-st"],u:"1f1f8-1f1f9"},{n:["el salvador flag","flag-sv"],u:"1f1f8-1f1fb"},{n:["sint maarten flag","flag-sx"],u:"1f1f8-1f1fd"},{n:["syria flag","flag-sy"],u:"1f1f8-1f1fe"},{n:["swaziland flag","flag-sz"],u:"1f1f8-1f1ff"},{n:["tristan da cunha flag","flag-ta"],u:"1f1f9-1f1e6"},{n:["turks & caicos islands flag","flag-tc"],u:"1f1f9-1f1e8"},{n:["chad flag","flag-td"],u:"1f1f9-1f1e9"},{n:["french southern territories flag","flag-tf"],u:"1f1f9-1f1eb"},{n:["togo flag","flag-tg"],u:"1f1f9-1f1ec"},{n:["thailand flag","flag-th"],u:"1f1f9-1f1ed"},{n:["tajikistan flag","flag-tj"],u:"1f1f9-1f1ef"},{n:["tokelau flag","flag-tk"],u:"1f1f9-1f1f0"},{n:["timor-leste flag","flag-tl"],u:"1f1f9-1f1f1"},{n:["turkmenistan flag","flag-tm"],u:"1f1f9-1f1f2"},{n:["tunisia flag","flag-tn"],u:"1f1f9-1f1f3"},{n:["tonga flag","flag-to"],u:"1f1f9-1f1f4"},{n:["turkey flag","flag-tr"],u:"1f1f9-1f1f7"},{n:["trinidad & tobago flag","flag-tt"],u:"1f1f9-1f1f9"},{n:["tuvalu flag","flag-tv"],u:"1f1f9-1f1fb"},{n:["taiwan flag","flag-tw"],u:"1f1f9-1f1fc"},{n:["tanzania flag","flag-tz"],u:"1f1f9-1f1ff"},{n:["ukraine flag","flag-ua"],u:"1f1fa-1f1e6"},{n:["uganda flag","flag-ug"],u:"1f1fa-1f1ec"},{n:["u.s. outlying islands flag","flag-um"],u:"1f1fa-1f1f2"},{n:["united nations flag","flag-un"],u:"1f1fa-1f1f3"},{n:["united states flag","us","flag-us"],u:"1f1fa-1f1f8"},{n:["uruguay flag","flag-uy"],u:"1f1fa-1f1fe"},{n:["uzbekistan flag","flag-uz"],u:"1f1fa-1f1ff"},{n:["vatican city flag","flag-va"],u:"1f1fb-1f1e6"},{n:["st. vincent & grenadines flag","flag-vc"],u:"1f1fb-1f1e8"},{n:["venezuela flag","flag-ve"],u:"1f1fb-1f1ea"},{n:["british virgin islands flag","flag-vg"],u:"1f1fb-1f1ec"},{n:["u.s. virgin islands flag","flag-vi"],u:"1f1fb-1f1ee"},{n:["vietnam flag","flag-vn"],u:"1f1fb-1f1f3"},{n:["vanuatu flag","flag-vu"],u:"1f1fb-1f1fa"},{n:["wallis & futuna flag","flag-wf"],u:"1f1fc-1f1eb"},{n:["samoa flag","flag-ws"],u:"1f1fc-1f1f8"},{n:["kosovo flag","flag-xk"],u:"1f1fd-1f1f0"},{n:["yemen flag","flag-ye"],u:"1f1fe-1f1ea"},{n:["mayotte flag","flag-yt"],u:"1f1fe-1f1f9"},{n:["south africa flag","flag-za"],u:"1f1ff-1f1e6"},{n:["zambia flag","flag-zm"],u:"1f1ff-1f1f2"},{n:["zimbabwe flag","flag-zw"],u:"1f1ff-1f1fc"},{n:["england flag","flag-england"],u:"1f3f4-e0067-e0062-e0065-e006e-e0067-e007f"},{n:["scotland flag","flag-scotland"],u:"1f3f4-e0067-e0062-e0073-e0063-e0074-e007f"},{n:["wales flag","flag-wales"],u:"1f3f4-e0067-e0062-e0077-e006c-e0073-e007f"}]},MR=[{key:"recent",title:"Recently Used",u:"1f551"},{key:"smileys_people",title:"Smiles & People",u:"1f600"},{key:"animals_nature",title:"Animals & Nature",u:"1F431"},{key:"food_drink",title:"Food & Drink",u:"2615"},{key:"activities",title:"Activities",u:"26BD"},{key:"travel_places",title:"Travel & Places",u:"1F697"},{key:"objects",title:"Objects",u:"1F4A1"},{key:"symbols",title:"Symbols",u:"1f4af"},{key:"flags",title:"Flags",u:"1f3f3-fe0f"}];const d9=(e,n)=>n.some(t=>e instanceof t);let NR,OR;function c9(){return NR||(NR=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function _9(){return OR||(OR=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const wR=new WeakMap,Fc=new WeakMap,xR=new WeakMap,qc=new WeakMap,Gc=new WeakMap;function f9(e){const n=new Promise((t,i)=>{const o=()=>{e.removeEventListener("success",r),e.removeEventListener("error",s)},r=()=>{t(Xi(e.result)),o()},s=()=>{i(e.error),o()};e.addEventListener("success",r),e.addEventListener("error",s)});return n.then(t=>{t instanceof IDBCursor&&wR.set(t,e)}).catch(()=>{}),Gc.set(n,e),n}function p9(e){if(Fc.has(e))return;const n=new Promise((t,i)=>{const o=()=>{e.removeEventListener("complete",r),e.removeEventListener("error",s),e.removeEventListener("abort",s)},r=()=>{t(),o()},s=()=>{i(e.error||new DOMException("AbortError","AbortError")),o()};e.addEventListener("complete",r),e.addEventListener("error",s),e.addEventListener("abort",s)});Fc.set(e,n)}let Hc={get(e,n,t){if(e instanceof IDBTransaction){if(n==="done")return Fc.get(e);if(n==="objectStoreNames")return e.objectStoreNames||xR.get(e);if(n==="store")return t.objectStoreNames[1]?void 0:t.objectStore(t.objectStoreNames[0])}return Xi(e[n])},set(e,n,t){return e[n]=t,!0},has(e,n){return e instanceof IDBTransaction&&(n==="done"||n==="store")?!0:n in e}};function a9(e){Hc=e(Hc)}function v9(e){return e===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(n,...t){const i=e.call(zc(this),n,...t);return xR.set(i,n.sort?n.sort():[n]),Xi(i)}:_9().includes(e)?function(...n){return e.apply(zc(this),n),Xi(wR.get(this))}:function(...n){return Xi(e.apply(zc(this),n))}}function m9(e){return typeof e=="function"?v9(e):(e instanceof IDBTransaction&&p9(e),d9(e,c9())?new Proxy(e,Hc):e)}function Xi(e){if(e instanceof IDBRequest)return f9(e);if(qc.has(e))return qc.get(e);const n=m9(e);return n!==e&&(qc.set(e,n),Gc.set(n,e)),n}const zc=e=>Gc.get(e);function Yc(e,n,{blocked:t,upgrade:i,blocking:o,terminated:r}={}){const s=indexedDB.open(e,n),u=Xi(s);return i&&s.addEventListener("upgradeneeded",l=>{i(Xi(s.result),l.oldVersion,l.newVersion,Xi(s.transaction),l)}),t&&s.addEventListener("blocked",l=>t(l.oldVersion,l.newVersion,l)),u.then(l=>{r&&l.addEventListener("close",()=>r()),o&&l.addEventListener("versionchange",d=>o(d.oldVersion,d.newVersion,d))}).catch(()=>{}),u}const h9=["get","getKey","getAll","getAllKeys","count"],y9=["put","add","delete","clear"],Kc=new Map;function PR(e,n){if(!(e instanceof IDBDatabase&&!(n in e)&&typeof n=="string"))return;if(Kc.get(n))return Kc.get(n);const t=n.replace(/FromIndex$/,""),i=n!==t,o=y9.includes(t);if(!(t in(i?IDBIndex:IDBObjectStore).prototype)||!(o||h9.includes(t)))return;const r=async function(s,...u){const l=this.transaction(s,o?"readwrite":"readonly");let d=l.store;return i&&(d=d.index(u.shift())),(await Promise.all([d[t](...u),o&&l.done]))[0]};return Kc.set(n,r),r}a9(e=>({...e,get:(n,t,i)=>PR(n,t)||e.get(n,t,i),has:(n,t)=>!!PR(n,t)||e.has(n,t)}));const Wc="EMJ",Sr="emojis",$c=3;async function g9(){(await Yc(Wc,$c,{upgrade(n,t){n.objectStoreNames.contains(Sr)||n.createObjectStore(Sr,{keyPath:"id",autoIncrement:!0}).createIndex("id","id",{unique:!0})}})).close()}g9();const E9={native:!1,hideSearch:!0,hideGroupIcons:!1,hideGroupNames:!1,staticTexts:{},disabledGroups:[],groupNames:{},displayRecent:!1,additionalGroups:{},groupOrder:[],groupIcons:{}};async function T9(){return await(await Yc(Wc,$c)).transaction(Sr,"readonly").objectStore(Sr).getAll()}function S9(){const e=h.reactive({search:"",emoji:o9,activeGroup:"",skinTone:Ql,options:E9,additionalGroups:{},recent:[],get emojis(){return{recent:this.recent,...this.options.additionalGroups,...u9}},get disabled(){let _=Array.isArray(this.options.disabledGroups)?this.options.disabledGroups:[];return this.options.displayRecent||(_=["recent",..._]),_},get groups(){return MR.filter(_=>!this.disabled.includes(_.key))},get orderedGroupKeys(){const _=[...this.options.groupOrder,...Object.keys(this.options.additionalGroups),...MR.map(f=>f.key)];return[...new Set(_)].filter(f=>!this.disabled.includes(f))}});function n(){e.options.displayRecent&&i()}async function t(){var _;let f=await T9();return Array.isArray(f)&&f.length?f=JSON.parse(((_=f[0])==null?void 0:_.value)||""):f=[],f}function i(){t().then(_=>{e.recent=_,d()})}const o=_=>{e.search=_},r=_=>{e.emoji=_},s=_=>{e.activeGroup=_},u=(_=Ql)=>{e.skinTone=_},l=_=>{e.options=Object.assign({},e.options,_),n()};async function d(){(await Yc(Wc,$c)).transaction(Sr,"readwrite").objectStore(Sr).put({id:0,value:JSON.stringify(e.recent)})}const c=_=>{if(e.options.displayRecent!==!0)return;const f=e.recent.findIndex(a=>a.u===_.u);if(f>0&&e.recent.splice(f,1),f===0)return;const p={u:_.u,n:h.toRaw(_.n)};e.recent=[p,...e.recent],e.recent.length>24&&(e.recent.length=24),d()};return{state:h.readonly(e),updateSearch:o,updateEmoji:r,updateActiveGroup:s,updateSkinTone:u,updateOptions:l,updateSelect:c}}var jn="top",ni="bottom",ii="right",Vn="left",Qc="auto",hs=[jn,ni,ii,Vn],br="start",ys="end",b9="clippingParents",DR="viewport",gs="popper",I9="reference",kR=hs.reduce(function(e,n){return e.concat([n+"-"+br,n+"-"+ys])},[]),LR=[].concat(hs,[Qc]).reduce(function(e,n){return e.concat([n,n+"-"+br,n+"-"+ys])},[]),C9="beforeRead",A9="read",R9="afterRead",M9="beforeMain",N9="main",O9="afterMain",w9="beforeWrite",x9="write",P9="afterWrite",D9=[C9,A9,R9,M9,N9,O9,w9,x9,P9];function Si(e){return e?(e.nodeName||"").toLowerCase():null}function di(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var n=e.ownerDocument;return n&&n.defaultView||window}return e}function Ir(e){var n=di(e).Element;return e instanceof n||e instanceof Element}function oi(e){var n=di(e).HTMLElement;return e instanceof n||e instanceof HTMLElement}function UR(e){if(typeof ShadowRoot>"u")return!1;var n=di(e).ShadowRoot;return e instanceof n||e instanceof ShadowRoot}function k9(e){var n=e.state;Object.keys(n.elements).forEach(function(t){var i=n.styles[t]||{},o=n.attributes[t]||{},r=n.elements[t];!oi(r)||!Si(r)||(Object.assign(r.style,i),Object.keys(o).forEach(function(s){var u=o[s];u===!1?r.removeAttribute(s):r.setAttribute(s,u===!0?"":u)}))})}function L9(e){var n=e.state,t={popper:{position:n.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(n.elements.popper.style,t.popper),n.styles=t,n.elements.arrow&&Object.assign(n.elements.arrow.style,t.arrow),function(){Object.keys(n.elements).forEach(function(i){var o=n.elements[i],r=n.attributes[i]||{},s=Object.keys(n.styles.hasOwnProperty(i)?n.styles[i]:t[i]),u=s.reduce(function(l,d){return l[d]="",l},{});!oi(o)||!Si(o)||(Object.assign(o.style,u),Object.keys(r).forEach(function(l){o.removeAttribute(l)}))})}}var U9={name:"applyStyles",enabled:!0,phase:"write",fn:k9,effect:L9,requires:["computeStyles"]};function bi(e){return e.split("-")[0]}var Co=Math.max,Jl=Math.min,Cr=Math.round;function Ar(e,n){n===void 0&&(n=!1);var t=e.getBoundingClientRect(),i=1,o=1;if(oi(e)&&n){var r=e.offsetHeight,s=e.offsetWidth;s>0&&(i=Cr(t.width)/s||1),r>0&&(o=Cr(t.height)/r||1)}return{width:t.width/i,height:t.height/o,top:t.top/o,right:t.right/i,bottom:t.bottom/o,left:t.left/i,x:t.left/i,y:t.top/o}}function Jc(e){var n=Ar(e),t=e.offsetWidth,i=e.offsetHeight;return Math.abs(n.width-t)<=1&&(t=n.width),Math.abs(n.height-i)<=1&&(i=n.height),{x:e.offsetLeft,y:e.offsetTop,width:t,height:i}}function BR(e,n){var t=n.getRootNode&&n.getRootNode();if(e.contains(n))return!0;if(t&&UR(t)){var i=n;do{if(i&&e.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function Ii(e){return di(e).getComputedStyle(e)}function B9(e){return["table","td","th"].indexOf(Si(e))>=0}function Zi(e){return((Ir(e)?e.ownerDocument:e.document)||window.document).documentElement}function Xl(e){return Si(e)==="html"?e:e.assignedSlot||e.parentNode||(UR(e)?e.host:null)||Zi(e)}function jR(e){return!oi(e)||Ii(e).position==="fixed"?null:e.offsetParent}function j9(e){var n=navigator.userAgent.toLowerCase().indexOf("firefox")!==-1,t=navigator.userAgent.indexOf("Trident")!==-1;if(t&&oi(e)){var i=Ii(e);if(i.position==="fixed")return null}for(var o=Xl(e);oi(o)&&["html","body"].indexOf(Si(o))<0;){var r=Ii(o);if(r.transform!=="none"||r.perspective!=="none"||r.contain==="paint"||["transform","perspective"].indexOf(r.willChange)!==-1||n&&r.willChange==="filter"||n&&r.filter&&r.filter!=="none")return o;o=o.parentNode}return null}function Es(e){for(var n=di(e),t=jR(e);t&&B9(t)&&Ii(t).position==="static";)t=jR(t);return t&&(Si(t)==="html"||Si(t)==="body"&&Ii(t).position==="static")?n:t||j9(e)||n}function Xc(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Ts(e,n,t){return Co(e,Jl(n,t))}function V9(e,n,t){var i=Ts(e,n,t);return i>t?t:i}function VR(){return{top:0,right:0,bottom:0,left:0}}function FR(e){return Object.assign({},VR(),e)}function qR(e,n){return n.reduce(function(t,i){return t[i]=e,t},{})}var F9=function(n,t){return n=typeof n=="function"?n(Object.assign({},t.rects,{placement:t.placement})):n,FR(typeof n!="number"?n:qR(n,hs))};function q9(e){var n,t=e.state,i=e.name,o=e.options,r=t.elements.arrow,s=t.modifiersData.popperOffsets,u=bi(t.placement),l=Xc(u),d=[Vn,ii].indexOf(u)>=0,c=d?"height":"width";if(!(!r||!s)){var _=F9(o.padding,t),f=Jc(r),p=l==="y"?jn:Vn,a=l==="y"?ni:ii,v=t.rects.reference[c]+t.rects.reference[l]-s[l]-t.rects.popper[c],m=s[l]-t.rects.reference[l],g=Es(r),E=g?l==="y"?g.clientHeight||0:g.clientWidth||0:0,y=v/2-m/2,S=_[p],C=E-f[c]-_[a],T=E/2-f[c]/2+y,R=Ts(S,T,C),O=l;t.modifiersData[i]=(n={},n[O]=R,n.centerOffset=R-T,n)}}function G9(e){var n=e.state,t=e.options,i=t.element,o=i===void 0?"[data-popper-arrow]":i;o!=null&&(typeof o=="string"&&(o=n.elements.popper.querySelector(o),!o)||BR(n.elements.popper,o)&&(n.elements.arrow=o))}var H9={name:"arrow",enabled:!0,phase:"main",fn:q9,effect:G9,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Rr(e){return e.split("-")[1]}var z9={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Y9(e){var n=e.x,t=e.y,i=window,o=i.devicePixelRatio||1;return{x:Cr(n*o)/o||0,y:Cr(t*o)/o||0}}function GR(e){var n,t=e.popper,i=e.popperRect,o=e.placement,r=e.variation,s=e.offsets,u=e.position,l=e.gpuAcceleration,d=e.adaptive,c=e.roundOffsets,_=e.isFixed,f=c===!0?Y9(s):typeof c=="function"?c(s):s,p=f.x,a=p===void 0?0:p,v=f.y,m=v===void 0?0:v,g=s.hasOwnProperty("x"),E=s.hasOwnProperty("y"),y=Vn,S=jn,C=window;if(d){var T=Es(t),R="clientHeight",O="clientWidth";if(T===di(t)&&(T=Zi(t),Ii(T).position!=="static"&&u==="absolute"&&(R="scrollHeight",O="scrollWidth")),T=T,o===jn||(o===Vn||o===ii)&&r===ys){S=ni;var B=_&&C.visualViewport?C.visualViewport.height:T[R];m-=B-i.height,m*=l?1:-1}if(o===Vn||(o===jn||o===ni)&&r===ys){y=ii;var j=_&&C.visualViewport?C.visualViewport.width:T[O];a-=j-i.width,a*=l?1:-1}}var I=Object.assign({position:u},d&&z9);if(l){var A;return Object.assign({},I,(A={},A[S]=E?"0":"",A[y]=g?"0":"",A.transform=(C.devicePixelRatio||1)<=1?"translate("+a+"px, "+m+"px)":"translate3d("+a+"px, "+m+"px, 0)",A))}return Object.assign({},I,(n={},n[S]=E?m+"px":"",n[y]=g?a+"px":"",n.transform="",n))}function K9(e){var n=e.state,t=e.options,i=t.gpuAcceleration,o=i===void 0?!0:i,r=t.adaptive,s=r===void 0?!0:r,u=t.roundOffsets,l=u===void 0?!0:u,d={placement:bi(n.placement),variation:Rr(n.placement),popper:n.elements.popper,popperRect:n.rects.popper,gpuAcceleration:o,isFixed:n.options.strategy==="fixed"};n.modifiersData.popperOffsets!=null&&(n.styles.popper=Object.assign({},n.styles.popper,GR(Object.assign({},d,{offsets:n.modifiersData.popperOffsets,position:n.options.strategy,adaptive:s,roundOffsets:l})))),n.modifiersData.arrow!=null&&(n.styles.arrow=Object.assign({},n.styles.arrow,GR(Object.assign({},d,{offsets:n.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),n.attributes.popper=Object.assign({},n.attributes.popper,{"data-popper-placement":n.placement})}var W9={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:K9,data:{}},Zl={passive:!0};function $9(e){var n=e.state,t=e.instance,i=e.options,o=i.scroll,r=o===void 0?!0:o,s=i.resize,u=s===void 0?!0:s,l=di(n.elements.popper),d=[].concat(n.scrollParents.reference,n.scrollParents.popper);return r&&d.forEach(function(c){c.addEventListener("scroll",t.update,Zl)}),u&&l.addEventListener("resize",t.update,Zl),function(){r&&d.forEach(function(c){c.removeEventListener("scroll",t.update,Zl)}),u&&l.removeEventListener("resize",t.update,Zl)}}var Q9={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:$9,data:{}},J9={left:"right",right:"left",bottom:"top",top:"bottom"};function eu(e){return e.replace(/left|right|bottom|top/g,function(n){return J9[n]})}var X9={start:"end",end:"start"};function HR(e){return e.replace(/start|end/g,function(n){return X9[n]})}function Zc(e){var n=di(e),t=n.pageXOffset,i=n.pageYOffset;return{scrollLeft:t,scrollTop:i}}function e_(e){return Ar(Zi(e)).left+Zc(e).scrollLeft}function Z9(e){var n=di(e),t=Zi(e),i=n.visualViewport,o=t.clientWidth,r=t.clientHeight,s=0,u=0;return i&&(o=i.width,r=i.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(s=i.offsetLeft,u=i.offsetTop)),{width:o,height:r,x:s+e_(e),y:u}}function eF(e){var n,t=Zi(e),i=Zc(e),o=(n=e.ownerDocument)==null?void 0:n.body,r=Co(t.scrollWidth,t.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),s=Co(t.scrollHeight,t.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),u=-i.scrollLeft+e_(e),l=-i.scrollTop;return Ii(o||t).direction==="rtl"&&(u+=Co(t.clientWidth,o?o.clientWidth:0)-r),{width:r,height:s,x:u,y:l}}function t_(e){var n=Ii(e),t=n.overflow,i=n.overflowX,o=n.overflowY;return/auto|scroll|overlay|hidden/.test(t+o+i)}function zR(e){return["html","body","#document"].indexOf(Si(e))>=0?e.ownerDocument.body:oi(e)&&t_(e)?e:zR(Xl(e))}function Ss(e,n){var t;n===void 0&&(n=[]);var i=zR(e),o=i===((t=e.ownerDocument)==null?void 0:t.body),r=di(i),s=o?[r].concat(r.visualViewport||[],t_(i)?i:[]):i,u=n.concat(s);return o?u:u.concat(Ss(Xl(s)))}function n_(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function tF(e){var n=Ar(e);return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function YR(e,n){return n===DR?n_(Z9(e)):Ir(n)?tF(n):n_(eF(Zi(e)))}function nF(e){var n=Ss(Xl(e)),t=["absolute","fixed"].indexOf(Ii(e).position)>=0,i=t&&oi(e)?Es(e):e;return Ir(i)?n.filter(function(o){return Ir(o)&&BR(o,i)&&Si(o)!=="body"&&(t?Ii(o).position!=="static":!0)}):[]}function iF(e,n,t){var i=n==="clippingParents"?nF(e):[].concat(n),o=[].concat(i,[t]),r=o[0],s=o.reduce(function(u,l){var d=YR(e,l);return u.top=Co(d.top,u.top),u.right=Jl(d.right,u.right),u.bottom=Jl(d.bottom,u.bottom),u.left=Co(d.left,u.left),u},YR(e,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function KR(e){var n=e.reference,t=e.element,i=e.placement,o=i?bi(i):null,r=i?Rr(i):null,s=n.x+n.width/2-t.width/2,u=n.y+n.height/2-t.height/2,l;switch(o){case jn:l={x:s,y:n.y-t.height};break;case ni:l={x:s,y:n.y+n.height};break;case ii:l={x:n.x+n.width,y:u};break;case Vn:l={x:n.x-t.width,y:u};break;default:l={x:n.x,y:n.y}}var d=o?Xc(o):null;if(d!=null){var c=d==="y"?"height":"width";switch(r){case br:l[d]=l[d]-(n[c]/2-t[c]/2);break;case ys:l[d]=l[d]+(n[c]/2-t[c]/2);break}}return l}function bs(e,n){n===void 0&&(n={});var t=n,i=t.placement,o=i===void 0?e.placement:i,r=t.boundary,s=r===void 0?b9:r,u=t.rootBoundary,l=u===void 0?DR:u,d=t.elementContext,c=d===void 0?gs:d,_=t.altBoundary,f=_===void 0?!1:_,p=t.padding,a=p===void 0?0:p,v=FR(typeof a!="number"?a:qR(a,hs)),m=c===gs?I9:gs,g=e.rects.popper,E=e.elements[f?m:c],y=iF(Ir(E)?E:E.contextElement||Zi(e.elements.popper),s,l),S=Ar(e.elements.reference),C=KR({reference:S,element:g,strategy:"absolute",placement:o}),T=n_(Object.assign({},g,C)),R=c===gs?T:S,O={top:y.top-R.top+v.top,bottom:R.bottom-y.bottom+v.bottom,left:y.left-R.left+v.left,right:R.right-y.right+v.right},B=e.modifiersData.offset;if(c===gs&&B){var j=B[o];Object.keys(O).forEach(function(I){var A=[ii,ni].indexOf(I)>=0?1:-1,M=[jn,ni].indexOf(I)>=0?"y":"x";O[I]+=j[M]*A})}return O}function oF(e,n){n===void 0&&(n={});var t=n,i=t.placement,o=t.boundary,r=t.rootBoundary,s=t.padding,u=t.flipVariations,l=t.allowedAutoPlacements,d=l===void 0?LR:l,c=Rr(i),_=c?u?kR:kR.filter(function(a){return Rr(a)===c}):hs,f=_.filter(function(a){return d.indexOf(a)>=0});f.length===0&&(f=_);var p=f.reduce(function(a,v){return a[v]=bs(e,{placement:v,boundary:o,rootBoundary:r,padding:s})[bi(v)],a},{});return Object.keys(p).sort(function(a,v){return p[a]-p[v]})}function rF(e){if(bi(e)===Qc)return[];var n=eu(e);return[HR(e),n,HR(n)]}function sF(e){var n=e.state,t=e.options,i=e.name;if(!n.modifiersData[i]._skip){for(var o=t.mainAxis,r=o===void 0?!0:o,s=t.altAxis,u=s===void 0?!0:s,l=t.fallbackPlacements,d=t.padding,c=t.boundary,_=t.rootBoundary,f=t.altBoundary,p=t.flipVariations,a=p===void 0?!0:p,v=t.allowedAutoPlacements,m=n.options.placement,g=bi(m),E=g===m,y=l||(E||!a?[eu(m)]:rF(m)),S=[m].concat(y).reduce(function(K,W){return K.concat(bi(W)===Qc?oF(n,{placement:W,boundary:c,rootBoundary:_,padding:d,flipVariations:a,allowedAutoPlacements:v}):W)},[]),C=n.rects.reference,T=n.rects.popper,R=new Map,O=!0,B=S[0],j=0;j<S.length;j++){var I=S[j],A=bi(I),M=Rr(I)===br,w=[jn,ni].indexOf(A)>=0,x=w?"width":"height",k=bs(n,{placement:I,boundary:c,rootBoundary:_,altBoundary:f,padding:d}),V=w?M?ii:Vn:M?ni:jn;C[x]>T[x]&&(V=eu(V));var L=eu(V),D=[];if(r&&D.push(k[A]<=0),u&&D.push(k[V]<=0,k[L]<=0),D.every(function(K){return K})){B=I,O=!1;break}R.set(I,D)}if(O)for(var F=a?3:1,G=function(W){var X=S.find(function(J){var Z=R.get(J);if(Z)return Z.slice(0,W).every(function(b){return b})});if(X)return B=X,"break"},q=F;q>0;q--){var Y=G(q);if(Y==="break")break}n.placement!==B&&(n.modifiersData[i]._skip=!0,n.placement=B,n.reset=!0)}}var lF={name:"flip",enabled:!0,phase:"main",fn:sF,requiresIfExists:["offset"],data:{_skip:!1}};function WR(e,n,t){return t===void 0&&(t={x:0,y:0}),{top:e.top-n.height-t.y,right:e.right-n.width+t.x,bottom:e.bottom-n.height+t.y,left:e.left-n.width-t.x}}function $R(e){return[jn,ii,ni,Vn].some(function(n){return e[n]>=0})}function uF(e){var n=e.state,t=e.name,i=n.rects.reference,o=n.rects.popper,r=n.modifiersData.preventOverflow,s=bs(n,{elementContext:"reference"}),u=bs(n,{altBoundary:!0}),l=WR(s,i),d=WR(u,o,r),c=$R(l),_=$R(d);n.modifiersData[t]={referenceClippingOffsets:l,popperEscapeOffsets:d,isReferenceHidden:c,hasPopperEscaped:_},n.attributes.popper=Object.assign({},n.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":_})}var dF={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:uF};function cF(e,n,t){var i=bi(e),o=[Vn,jn].indexOf(i)>=0?-1:1,r=typeof t=="function"?t(Object.assign({},n,{placement:e})):t,s=r[0],u=r[1];return s=s||0,u=(u||0)*o,[Vn,ii].indexOf(i)>=0?{x:u,y:s}:{x:s,y:u}}function _F(e){var n=e.state,t=e.options,i=e.name,o=t.offset,r=o===void 0?[0,0]:o,s=LR.reduce(function(c,_){return c[_]=cF(_,n.rects,r),c},{}),u=s[n.placement],l=u.x,d=u.y;n.modifiersData.popperOffsets!=null&&(n.modifiersData.popperOffsets.x+=l,n.modifiersData.popperOffsets.y+=d),n.modifiersData[i]=s}var fF={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:_F};function pF(e){var n=e.state,t=e.name;n.modifiersData[t]=KR({reference:n.rects.reference,element:n.rects.popper,strategy:"absolute",placement:n.placement})}var aF={name:"popperOffsets",enabled:!0,phase:"read",fn:pF,data:{}};function vF(e){return e==="x"?"y":"x"}function mF(e){var n=e.state,t=e.options,i=e.name,o=t.mainAxis,r=o===void 0?!0:o,s=t.altAxis,u=s===void 0?!1:s,l=t.boundary,d=t.rootBoundary,c=t.altBoundary,_=t.padding,f=t.tether,p=f===void 0?!0:f,a=t.tetherOffset,v=a===void 0?0:a,m=bs(n,{boundary:l,rootBoundary:d,padding:_,altBoundary:c}),g=bi(n.placement),E=Rr(n.placement),y=!E,S=Xc(g),C=vF(S),T=n.modifiersData.popperOffsets,R=n.rects.reference,O=n.rects.popper,B=typeof v=="function"?v(Object.assign({},n.rects,{placement:n.placement})):v,j=typeof B=="number"?{mainAxis:B,altAxis:B}:Object.assign({mainAxis:0,altAxis:0},B),I=n.modifiersData.offset?n.modifiersData.offset[n.placement]:null,A={x:0,y:0};if(T){if(r){var M,w=S==="y"?jn:Vn,x=S==="y"?ni:ii,k=S==="y"?"height":"width",V=T[S],L=V+m[w],D=V-m[x],F=p?-O[k]/2:0,G=E===br?R[k]:O[k],q=E===br?-O[k]:-R[k],Y=n.elements.arrow,K=p&&Y?Jc(Y):{width:0,height:0},W=n.modifiersData["arrow#persistent"]?n.modifiersData["arrow#persistent"].padding:VR(),X=W[w],J=W[x],Z=Ts(0,R[k],K[k]),b=y?R[k]/2-F-Z-X-j.mainAxis:G-Z-X-j.mainAxis,N=y?-R[k]/2+F+Z+J+j.mainAxis:q+Z+J+j.mainAxis,U=n.elements.arrow&&Es(n.elements.arrow),z=U?S==="y"?U.clientTop||0:U.clientLeft||0:0,$=(M=I==null?void 0:I[S])!=null?M:0,Q=V+b-$-z,ee=V+N-$,oe=Ts(p?Jl(L,Q):L,V,p?Co(D,ee):D);T[S]=oe,A[S]=oe-V}if(u){var te,ie=S==="x"?jn:Vn,se=S==="x"?ni:ii,fe=T[C],pe=C==="y"?"height":"width",ve=fe+m[ie],de=fe-m[se],ae=[jn,Vn].indexOf(g)!==-1,ge=(te=I==null?void 0:I[C])!=null?te:0,Ce=ae?ve:fe-R[pe]-O[pe]-ge+j.altAxis,Ae=ae?fe+R[pe]+O[pe]-ge-j.altAxis:de,Re=p&&ae?V9(Ce,fe,Ae):Ts(p?Ce:ve,fe,p?Ae:de);T[C]=Re,A[C]=Re-fe}n.modifiersData[i]=A}}var hF={name:"preventOverflow",enabled:!0,phase:"main",fn:mF,requiresIfExists:["offset"]};function yF(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function gF(e){return e===di(e)||!oi(e)?Zc(e):yF(e)}function EF(e){var n=e.getBoundingClientRect(),t=Cr(n.width)/e.offsetWidth||1,i=Cr(n.height)/e.offsetHeight||1;return t!==1||i!==1}function TF(e,n,t){t===void 0&&(t=!1);var i=oi(n),o=oi(n)&&EF(n),r=Zi(n),s=Ar(e,o),u={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(i||!i&&!t)&&((Si(n)!=="body"||t_(r))&&(u=gF(n)),oi(n)?(l=Ar(n,!0),l.x+=n.clientLeft,l.y+=n.clientTop):r&&(l.x=e_(r))),{x:s.left+u.scrollLeft-l.x,y:s.top+u.scrollTop-l.y,width:s.width,height:s.height}}function SF(e){var n=new Map,t=new Set,i=[];e.forEach(function(r){n.set(r.name,r)});function o(r){t.add(r.name);var s=[].concat(r.requires||[],r.requiresIfExists||[]);s.forEach(function(u){if(!t.has(u)){var l=n.get(u);l&&o(l)}}),i.push(r)}return e.forEach(function(r){t.has(r.name)||o(r)}),i}function bF(e){var n=SF(e);return D9.reduce(function(t,i){return t.concat(n.filter(function(o){return o.phase===i}))},[])}function IF(e){var n;return function(){return n||(n=new Promise(function(t){Promise.resolve().then(function(){n=void 0,t(e())})})),n}}function CF(e){var n=e.reduce(function(t,i){var o=t[i.name];return t[i.name]=o?Object.assign({},o,i,{options:Object.assign({},o.options,i.options),data:Object.assign({},o.data,i.data)}):i,t},{});return Object.keys(n).map(function(t){return n[t]})}var QR={placement:"bottom",modifiers:[],strategy:"absolute"};function JR(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];return!n.some(function(i){return!(i&&typeof i.getBoundingClientRect=="function")})}function AF(e){e===void 0&&(e={});var n=e,t=n.defaultModifiers,i=t===void 0?[]:t,o=n.defaultOptions,r=o===void 0?QR:o;return function(u,l,d){d===void 0&&(d=r);var c={placement:"bottom",orderedModifiers:[],options:Object.assign({},QR,r),modifiersData:{},elements:{reference:u,popper:l},attributes:{},styles:{}},_=[],f=!1,p={state:c,setOptions:function(g){var E=typeof g=="function"?g(c.options):g;v(),c.options=Object.assign({},r,c.options,E),c.scrollParents={reference:Ir(u)?Ss(u):u.contextElement?Ss(u.contextElement):[],popper:Ss(l)};var y=bF(CF([].concat(i,c.options.modifiers)));return c.orderedModifiers=y.filter(function(S){return S.enabled}),a(),p.update()},forceUpdate:function(){if(!f){var g=c.elements,E=g.reference,y=g.popper;if(JR(E,y)){c.rects={reference:TF(E,Es(y),c.options.strategy==="fixed"),popper:Jc(y)},c.reset=!1,c.placement=c.options.placement,c.orderedModifiers.forEach(function(j){return c.modifiersData[j.name]=Object.assign({},j.data)});for(var S=0;S<c.orderedModifiers.length;S++){if(c.reset===!0){c.reset=!1,S=-1;continue}var C=c.orderedModifiers[S],T=C.fn,R=C.options,O=R===void 0?{}:R,B=C.name;typeof T=="function"&&(c=T({state:c,options:O,name:B,instance:p})||c)}}}},update:IF(function(){return new Promise(function(m){p.forceUpdate(),m(c)})}),destroy:function(){v(),f=!0}};if(!JR(u,l))return p;p.setOptions(d).then(function(m){!f&&d.onFirstUpdate&&d.onFirstUpdate(m)});function a(){c.orderedModifiers.forEach(function(m){var g=m.name,E=m.options,y=E===void 0?{}:E,S=m.effect;if(typeof S=="function"){var C=S({state:c,name:g,instance:p,options:y}),T=function(){};_.push(C||T)}})}function v(){_.forEach(function(m){return m()}),_=[]}return p}}var RF=[Q9,aF,W9,U9,fF,lF,hF,H9,dF],MF=AF({defaultModifiers:RF}),XR="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzMiAzMiI+PHBhdGggZD0iTSAxNiA0IEMgOS4zODI4MTMgNCA0IDkuMzgyODEzIDQgMTYgQyA0IDIyLjYxNzE4OCA5LjM4MjgxMyAyOCAxNiAyOCBDIDIyLjYxNzE4OCAyOCAyOCAyMi42MTcxODggMjggMTYgQyAyOCA5LjM4MjgxMyAyMi42MTcxODggNCAxNiA0IFogTSAxNiA2IEMgMjEuNTM1MTU2IDYgMjYgMTAuNDY0ODQ0IDI2IDE2IEMgMjYgMjEuNTM1MTU2IDIxLjUzNTE1NiAyNiAxNiAyNiBDIDEwLjQ2NDg0NCAyNiA2IDIxLjUzNTE1NiA2IDE2IEMgNiAxMC40NjQ4NDQgMTAuNDY0ODQ0IDYgMTYgNiBaIE0gMTEuNSAxMiBDIDEwLjY3MTg3NSAxMiAxMCAxMi42NzE4NzUgMTAgMTMuNSBDIDEwIDE0LjMyODEyNSAxMC42NzE4NzUgMTUgMTEuNSAxNSBDIDEyLjMyODEyNSAxNSAxMyAxNC4zMjgxMjUgMTMgMTMuNSBDIDEzIDEyLjY3MTg3NSAxMi4zMjgxMjUgMTIgMTEuNSAxMiBaIE0gMjAuNSAxMiBDIDE5LjY3MTg3NSAxMiAxOSAxMi42NzE4NzUgMTkgMTMuNSBDIDE5IDE0LjMyODEyNSAxOS42NzE4NzUgMTUgMjAuNSAxNSBDIDIxLjMyODEyNSAxNSAyMiAxNC4zMjgxMjUgMjIgMTMuNSBDIDIyIDEyLjY3MTg3NSAyMS4zMjgxMjUgMTIgMjAuNSAxMiBaIE0gMTAuODEyNSAxOSBMIDkuMDkzNzUgMjAgQyAxMC40NzY1NjMgMjIuMzg2NzE5IDEzLjA0Njg3NSAyNCAxNiAyNCBDIDE4Ljk1MzEyNSAyNCAyMS41MjM0MzggMjIuMzg2NzE5IDIyLjkwNjI1IDIwIEwgMjEuMTg3NSAxOSBDIDIwLjE0ODQzOCAyMC43OTI5NjkgMTguMjI2NTYzIDIyIDE2IDIyIEMgMTMuNzczNDM4IDIyIDExLjg1MTU2MyAyMC43OTI5NjkgMTAuODEyNSAxOSBaIi8+PC9zdmc+";function tu(e){return e.split("-").map(n=>parseInt(n,16)).map(n=>String.fromCodePoint(n)).join("")}function NF(e,n,t,i=[]){const o={};return Object.keys(e).forEach(r=>{if(i.includes(r))return;const s=[];e[r].forEach(u=>{var l;if(u[Wl][0].includes(n.toLocaleLowerCase())){let d=u[RR];if(t!==Ql&&Array.isArray(u[$l])){const c=((l=u[$l])==null?void 0:l.findIndex(_=>_.includes(t)))||-1;c!==-1&&u[$l]&&(d=u[$l][c])}return s.push({...u,[ms]:d})}}),s.length&&(o[r]=s)}),o}function ZR(){var e;return(((e=navigator==null?void 0:navigator.userAgentData)==null?void 0:e.platform)||(navigator==null?void 0:navigator.platform)||"unknown").toUpperCase().indexOf("MAC")!==-1}function eM(e){return e.replace(/^_*(.)|_+(.)/g,(n,t,i)=>t?t.toUpperCase():" "+i.toUpperCase())}var Is=(e,n)=>{const t=e.__vccOpts||e;for(const[i,o]of n)t[i]=o;return t};const OF=h.defineComponent({name:"Body",emits:{select:e=>!0},setup(){const{state:e,updateEmoji:n,updateSelect:t}=h.inject("store"),i=h.ref(null),o=h.computed(()=>NF(e.emojis,e.search,e.skinTone,e.options.disabledGroups)),r=h.getCurrentInstance(),s=h.computed(()=>!e.options.hideGroupNames),u=h.computed(()=>!e.options.disableStickyGroupNames),l=h.toRaw(e.options.groupNames),d=e.orderedGroupKeys;e.options.additionalGroups&&Object.keys(e.options.additionalGroups).map(a=>{e.options.groupNames[a]?l[a]=e.options.groupNames[a]:l[a]=eM(a)});const c=ZR()?"is-mac":"";function _(a){n(a)}function f(a){t(a),r==null||r.emit("select",{...a,t:e.skinTone,i:tu(a.r)})}function p(a,v){var m;const g=(m=a==null?void 0:a.target)==null?void 0:m.closest("button");g&&(g.innerHTML=`<span>${tu(v)}</span>`)}return h.watch(()=>e.activeGroup,()=>{var a;const v=(a=i.value)==null?void 0:a.querySelector("#"+e.activeGroup);v&&(v.parentNode.scrollTop=v.offsetTop-v.parentNode.offsetTop)}),{emojis:o,bodyInner:i,EMOJI_REMOTE_SRC:CR,GROUP_NAMES:AR,handleClick:f,handleError:p,handleMouseEnter:_,native:e.options.native,unicodeToEmoji:tu,EMOJI_RESULT_KEY:ms,EMOJI_NAME_KEY:Wl,hasGroupNames:s,isSticky:u,platform:c,groupNames:l,orderedKeys:d}}}),wF={class:"v3-body"},xF=["id"],PF={class:"v3-emojis"},DF=["onMouseenter","onClick"],kF={key:0},LF=["src","alt","onError"],UF={key:1,class:"v3-no-result"};function BF(e,n,t,i,o,r){return h.openBlock(),h.createElementBlock("div",wF,[h.createElementVNode("div",{ref:"bodyInner",class:h.normalizeClass([e.platform,"v3-body-inner"])},[e.orderedKeys.length?(h.openBlock(!0),h.createElementBlock(h.Fragment,{key:0},h.renderList(e.orderedKeys,s=>(h.openBlock(),h.createElementBlock("div",{id:s,key:s,class:"v3-group"},[e.hasGroupNames?h.withDirectives((h.openBlock(),h.createElementBlock("h5",{key:0,class:h.normalizeClass(e.isSticky?"v3-sticky":"")},h.toDisplayString(e.groupNames[s]),3)),[[h.vShow,e.emojis[s]]]):h.createCommentVNode("",!0),h.withDirectives(h.createElementVNode("div",PF,[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(e.emojis[s],u=>(h.openBlock(),h.createElementBlock("button",{key:u.r,type:"button",onMouseenter:l=>e.handleMouseEnter(u),onClick:l=>e.handleClick(u)},[e.native?(h.openBlock(),h.createElementBlock("span",kF,h.toDisplayString(e.unicodeToEmoji(u.r)),1)):(h.openBlock(),h.createElementBlock("img",{key:1,src:e.EMOJI_REMOTE_SRC+`/${u.r}.png`,alt:u.n[0],onError:l=>e.handleError(l,u.r)},null,40,LF))],40,DF))),128))],512),[[h.vShow,e.emojis[s]]])],8,xF))),128)):(h.openBlock(),h.createElementBlock("span",UF," No emoji has been found! "))],2)])}var jF=Is(OF,[["render",BF]]),VF="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzMiAzMiI+PHBhdGggZD0iTSAxMi41IDUgQyAxMS40Mjk2ODggNSAxMC41IDUuNjA5Mzc1IDkuOTA2MjUgNi40Mzc1IEMgOS4zMTI1IDcuMjY1NjI1IDkgOC4zMzk4NDQgOSA5LjUgQyA5IDEwLjY2MDE1NiA5LjMxMjUgMTEuNzM0Mzc1IDkuOTA2MjUgMTIuNTYyNSBDIDEwLjUgMTMuMzkwNjI1IDExLjQyOTY4OCAxNCAxMi41IDE0IEMgMTMuNTcwMzEzIDE0IDE0LjUgMTMuMzkwNjI1IDE1LjA5Mzc1IDEyLjU2MjUgQyAxNS42ODc1IDExLjczNDM3NSAxNiAxMC42NjAxNTYgMTYgOS41IEMgMTYgOC4zMzk4NDQgMTUuNjg3NSA3LjI2NTYyNSAxNS4wOTM3NSA2LjQzNzUgQyAxNC41IDUuNjA5Mzc1IDEzLjU3MDMxMyA1IDEyLjUgNSBaIE0gMTYgOS41IEMgMTYgMTAuNjYwMTU2IDE2LjMxMjUgMTEuNzM0Mzc1IDE2LjkwNjI1IDEyLjU2MjUgQyAxNy41IDEzL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AyMi42MTcxODggOS4zODI4MTMgMjggMTYgMjggQyAyMi42MTcxODggMjggMjggMjIuNjE3MTg4IDI4IDE2IEMgMjggOS4zODI4MTMgMjIuNjE3MTg4IDQgMTYgNCBaIE0gMTUgOCBMIDE1IDE3IEwgMjIgMTcgTCAyMiAxNSBMIDE3IDE1IEwgMTcgOCBaIi8+PC9zdmc+Cg==";const WF=h.defineComponent({name:"Header",setup(e){const{state:n,updateSearch:t,updateActiveGroup:i}=h.inject("store"),o=h.computed(()=>!n.options.hideSearch),r=h.computed(()=>!n.options.hideGroupIcons),s=JSON.parse(JSON.stringify(n.orderedGroupKeys)),u=h.computed(()=>n.options.staticTexts.placeholder||""),l=h.computed({get:()=>n.search,set:_=>t(_)}),d=[...n.groups,...Object.keys(n.options.additionalGroups).map(_=>({key:_,title:n.options.groupNames[_]?n.options.groupNames[_]:eM(_)}))],c=[];return s.forEach(_=>{const f=d.findIndex(p=>p.key===_);f!==-1&&(c.push(d[f]),d.splice(f,1))}),{orderedGroups:c,orderedKeys:s,searchValue:l,updateActiveGroup:i,hasSearch:o,hasGroupIcons:r,placeholder:u,icons:{smileys_people:XR,animals_nature:VF,food_drink:FF,activities:qF,travel_places:GF,objects:HF,symbols:zF,flags:YF,...n.options.groupIcons,recent:KF}}}}),$F={key:0,class:"v3-header"},QF={key:0,class:"v3-groups"},JF=["onClick"],XF=["title"],ZF=["src"],eq={key:1,class:"v3-spacing"},tq={key:2,class:"v3-search"},nq=["placeholder"];function iq(e,n,t,i,o,r){return e.hasGroupIcons||e.hasSearch?(h.openBlock(),h.createElementBlock("div",$F,[e.hasGroupIcons?(h.openBlock(),h.createElementBlock("div",QF,[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(e.orderedGroups,s=>(h.openBlock(),h.createElementBlock("button",{key:s.key,type:"button",class:h.normalizeClass(["v3-group",{"v3-is-hidden":!e.icons[s.key]}]),onClick:u=>e.updateActiveGroup(s.key)},[h.createElementVNode("span",{title:s.title,class:"v3-icon"},[h.createElementVNode("img",{src:e.icons[s.key],alt:""},null,8,ZF)],8,XF)],10,JF))),128))])):h.createCommentVNode("",!0),e.hasGroupIcons&&e.hasSearch?(h.openBlock(),h.createElementBlock("div",eq)):h.createCommentVNode("",!0),e.hasSearch?(h.openBlock(),h.createElementBlock("div",tq,[h.withDirectives(h.createElementVNode("input",{"onUpdate:modelValue":n[0]||(n[0]=s=>e.searchValue=s),type:"text",placeholder:e.placeholder},null,8,nq),[[h.vModelText,e.searchValue]])])):h.createCommentVNode("",!0)])):h.createCommentVNode("",!0)}var oq=Is(WF,[["render",iq]]);const rq=h.defineComponent({name:"Header",setup(){const{state:e,updateSkinTone:n}=h.inject("store"),t=h.ref(!1),i=h.ref(!1),o=h.computed(()=>e.skinTone),r=h.computed(()=>e.options.staticTexts.skinTone||"Skin tone"),s=h.computed(()=>!e.options.disableSkinTones),u=ZR()?"is-mac":"",l=h.computed(()=>({...e.emoji,src:CR+"/"+e.emoji[ms]+".png"}));function d(f=!0){t.value=f}function c(){t.value=!t.value}function _(f){n(f),d(!1)}return h.watch(()=>e.emoji,()=>{i.value=!1}),{emoji:l,SKIN_TONES:r9,updateSkinToneState:d,skinTone:t,stateSkinTone:o,selectSkinTone:_,toggleSkinToneState:c,EMOJI_RESULT_KEY:ms,EMOJI_NAME_KEY:Wl,skinToneText:r,hasSkinTones:s,native:e.options.native,unicodeToEmoji:tu,platform:u,hasError:i}}}),sq={class:"v3-foot-left"},lq={key:0},uq=["alt","src"],dq={class:"v3-text"},cq={class:"v3-text"},_q=["onClick"];function fq(e,n,t,i,o,r){return h.openBlock(),h.createElementBlock("div",{class:"v3-footer",onMouseleave:n[2]||(n[2]=s=>e.updateSkinToneState(!1))},[h.createElementVNode("div",sq,[h.createElementVNode("span",{class:h.normalizeClass([e.platform,"v3-icon"])},[e.native||e.hasError?(h.openBlock(),h.createElementBlock("span",lq,h.toDisplayString(e.unicodeToEmoji(e.emoji.r)),1)):(h.openBlock(),h.createElementBlock("img",{key:1,alt:e.unicodeToEmoji(e.emoji.r),src:e.emoji.src,onError:n[0]||(n[0]=s=>e.hasError=!0)},null,40,uq))],2),h.createElementVNode("span",dq," :"+h.toDisplayString(e.emoji[e.EMOJI_NAME_KEY][1]||e.emoji[e.EMOJI_NAME_KEY][0])+": ",1)]),e.hasSkinTones?(h.openBlock(),h.createElementBlock(h.Fragment,{key:0},[h.createElementVNode("button",{type:"button",class:"v3-tone",onClick:n[1]||(n[1]=(...s)=>e.toggleSkinToneState&&e.toggleSkinToneState(...s))},[h.createElementVNode("span",cq,h.toDisplayString(e.skinToneText),1),h.createElementVNode("span",{class:h.normalizeClass(`v3-icon v3-tone-${e.stateSkinTone}`)},null,2)]),h.createElementVNode("div",{class:h.normalizeClass([e.skinTone?"v3-is-open":"","v3-skin-tones"])},[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(e.SKIN_TONES,s=>(h.openBlock(),h.createElementBlock("button",{key:s,type:"button",class:h.normalizeClass(["v3-skin-tone-"+s,"v3-skin-tone"]),onClick:u=>e.selectSkinTone(s)},null,10,_q))),128))],2)],64)):h.createCommentVNode("",!0)],32)}var pq=Is(rq,[["render",fq]]);const aq=h.defineComponent({name:"PickerRoot",components:{Header:oq,Body:jF,Footer:pq},props:{type:{type:String,default:""},text:{type:String,default:""},additionalGroups:{type:Object,default:()=>({})},groupOrder:{type:Array,default:()=>[]},groupIcons:{type:Object,default:()=>({})},groupNames:{type:Object,default:()=>({})}},emits:{select:e=>!0,"update:text":e=>!0},setup(e,{emit:n}){const t=h.ref(),i=h.ref(),o=h.ref(),r=h.ref(!1),s=h.ref(e.text),u=e.type==="input"||e.type==="textarea";let l=-1;const{state:d}=h.inject("store"),c=h.computed(()=>d.options.colorTheme);function _(m){if(u){const g=d.options.mode;g==="prepend"?s.value=m.i+s.value:g==="insert"&&l!==-1?(s.value=`${s.value.slice(0,l)}${m.i}${s.value.slice(l)}`,l+=m.i.length):s.value+=m.i,n("update:text",s.value)}n("select",m)}function f(){var m;t.value&&(l=((m=t.value)==null?void 0:m.selectionEnd)||-1)}function p(m){var g;!((g=m.target)!=null&&g.closest(".v3-input-picker-wrap"))&&r.value&&(r.value=!1)}function a(){if(i.value&&o.value&&u){let m=d.options.offset;typeof m!="number"&&(m=6),MF(i.value,o.value,{placement:"bottom-end",modifiers:[{name:"offset",options:{offset:[0,m]}}]}),document.body.addEventListener("click",p)}}function v(m){s.value=m.target.value||"",n("update:text",s.value)}return h.onMounted(()=>{a()}),h.onBeforeUnmount(()=>{document.body.removeEventListener("click",p)}),{face:XR,open:r,onSelect:_,input:s,elem:t,updateCursor:f,button:i,picker:o,isInputType:u,onChangeText:v,colorTheme:c}}}),vq={key:0,class:"v3-input-emoji-picker"},mq={class:"v3-input-picker-root"},hq=["value"],yq=["value"],gq=["src"];function Eq(e,n,t,i,o,r){const s=h.resolveComponent("Header"),u=h.resolveComponent("Body"),l=h.resolveComponent("Footer");return e.isInputType?(h.openBlock(),h.createElementBlock("div",vq,[h.createElementVNode("div",mq,[e.type==="input"?(h.openBlock(),h.createElementBlock("input",{key:0,ref:"elem",value:e.input,type:"text",class:"v3-emoji-picker-input",onInput:n[0]||(n[0]=(...d)=>e.onChangeText&&e.onChangeText(...d)),onBlur:n[1]||(n[1]=(...d)=>e.updateCursor&&e.updateCursor(...d))},null,40,hq)):(h.openBlock(),h.createElementBlock("textarea",{key:1,ref:"elem",value:e.input,class:"v3-emoji-picker-textarea",onInput:n[2]||(n[2]=(...d)=>e.onChangeText&&e.onChangeText(...d)),onBlur:n[3]||(n[3]=(...d)=>e.updateCursor&&e.updateCursor(...d))},null,40,yq)),h.createElementVNode("div",{class:h.normalizeClass(["v3-input-picker-wrap",e.open?"v3-picker-is-open":""])},[h.createElementVNode("button",{ref:"button",type:"button",class:"v3-input-picker-icon",onClick:n[4]||(n[4]=d=>e.open=!e.open)},[h.createElementVNode("img",{src:e.face,alt:""},null,8,gq)],512),h.createElementVNode("div",{ref:"picker",class:h.normalizeClass(["v3-emoji-picker","v3-color-theme-"+e.colorTheme])},[h.createVNode(s),h.createVNode(u,{onSelect:e.onSelect},null,8,["onSelect"]),h.createVNode(l)],2)],2)])])):(h.openBlock(),h.createElementBlock("div",{key:1,class:h.normalizeClass(["v3-emoji-picker","v3-color-theme-"+e.colorTheme])},[h.createVNode(s),h.createVNode(u,{onSelect:e.onSelect},null,8,["onSelect"]),h.createVNode(l)],2))}var Tq=Is(aq,[["render",Eq]]);const Sq=h.defineComponent({name:"Picker",components:{PickerRoot:Tq},props:{native:{type:Boolean,default:!1},hideSearch:{type:Boolean,default:!1},hideGroupIcons:{type:Boolean,default:!1},hideGroupNames:{type:Boolean,default:!1},staticTexts:{type:Object,default:()=>({})},disableStickyGroupNames:{type:Boolean,default:!1},disabledGroups:{type:Array,default:()=>[]},groupNames:{type:Object,default:()=>({})},disableSkinTones:{type:Boolean,default:!1},text:{type:String,default:""},mode:{type:String,default:"insert"},offset:{type:Number,default:6},additionalGroups:{type:Object,default:()=>({})},groupOrder:{type:Array,default:()=>[]},groupIcons:{type:Object,default:()=>({})},pickerType:{type:String,default:""},displayRecent:{type:Boolean,default:!1},theme:{type:String,default:"light"}},emits:{"update:text":e=>!0,select:e=>!0},setup(e,{emit:n}){const t=h.ref(e.text);function i(r){t.value=r||"",n("update:text",t.value)}const o=S9();return o.updateOptions({native:e.native,hideSearch:e.hideSearch,hideGroupIcons:e.hideGroupIcons,hideGroupNames:e.hideGroupNames,staticTexts:{...s9,...e.staticTexts},disableStickyGroupNames:e.disableStickyGroupNames,disabledGroups:e.disabledGroups,groupNames:{...AR,...e.groupNames},disableSkinTones:e.disableSkinTones,displayRecent:e.displayRecent,additionalGroups:e.additionalGroups,mode:e.mode,offset:e.offset,groupOrder:e.groupOrder,groupIcons:e.groupIcons,colorTheme:l9.includes(e.theme)?e.theme:"light"}),h.provide("store",o),{type:e.pickerType,input:t,onChangeText:i}}});function bq(e,n,t,i,o,r){const s=h.resolveComponent("picker-root");return h.openBlock(),h.createBlock(s,{type:e.type,text:e.input,onSelect:n[0]||(n[0]=u=>e.$emit("select",u)),"onUpdate:text":e.onChangeText},null,8,["type","text","onUpdate:text"])}var Iq=Is(Sq,[["render",bq]]);function Cs(e,n){const t=typeof e=="string"&&!n?`${e}Context`:n,i=Symbol(t);return[s=>{const u=h.inject(i,s);if(u||u===null)return u;throw new Error(`Injection \`${i.toString()}\` not found. Component must be used within ${Array.isArray(e)?`one of the following components: ${e.join(", ")}`:`\`${e}\``}`)},s=>(h.provide(i,s),s)]}function Mr(){let e=document.activeElement;if(e==null)return null;for(;e!=null&&e.shadowRoot!=null&&e.shadowRoot.activeElement!=null;)e=e.shadowRoot.activeElement;return e}function tM(e,n,t){const i=t.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:t});n&&i.addEventListener(e,n,{once:!0}),i.dispatchEvent(o)}function i_(e){return e?e.flatMap(n=>n.type===h.Fragment?i_(n.children):[n]):[]}const[nM,fW]=Cs("ConfigProvider");function Cq(e,n){var t;const i=h.shallowRef();return h.watchEffect(()=>{i.value=e()},{...n,flush:(t=void 0)!=null?t:"sync"}),h.readonly(i)}function iM(e){return h.getCurrentScope()?(h.onScopeDispose(e),!0):!1}function Aq(e){let n=!1,t;const i=h.effectScope(!0);return(...o)=>(n||(t=i.run(()=>e(...o)),n=!0),t)}function Rq(e){let n=0,t,i;const o=()=>{n-=1,i&&n<=0&&(i.stop(),t=void 0,i=void 0)};return(...r)=>(n+=1,i||(i=h.effectScope(!0),t=i.run(()=>e(...r))),iM(o),t)}function Mq(e){if(!h.isRef(e))return h.reactive(e);const n=new Proxy({},{get(t,i,o){return h.unref(Reflect.get(e.value,i,o))},set(t,i,o){return h.isRef(e.value[i])&&!h.isRef(o)?e.value[i].value=o:e.value[i]=o,!0},deleteProperty(t,i){return Reflect.deleteProperty(e.value,i)},has(t,i){return Reflect.has(e.value,i)},ownKeys(){return Object.keys(e.value)},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}}});return h.reactive(n)}function Nq(e){return Mq(h.computed(e))}function Oq(e,...n){const t=n.flat(),i=t[0];return Nq(()=>Object.fromEntries(typeof i=="function"?Object.entries(h.toRefs(e)).filter(([o,r])=>!i(h.toValue(r),o)):Object.entries(h.toRefs(e)).filter(o=>!t.includes(o[0]))))}const eo=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const wq=e=>typeof e<"u",xq=Object.prototype.toString,Pq=e=>xq.call(e)==="[object Object]",oM=Dq();function Dq(){var e,n;return eo&&((e=window==null?void 0:window.navigator)==null?void 0:e.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((n=window==null?void 0:window.navigator)==null?void 0:n.maxTouchPoints)>2&&/iPad|Macintosh/.test(window==null?void 0:window.navigator.userAgent))}function kq(e){return h.getCurrentInstance()}function o_(e){return Array.isArray(e)?e:[e]}function Lq(e,n){kq()&&h.onBeforeUnmount(e,n)}function Uq(e,n,t){return h.watch(e,n,{...t,immediate:!0})}const r_=eo?window:void 0;function As(e){var n;const t=h.toValue(e);return(n=t==null?void 0:t.$el)!=null?n:t}function s_(...e){const n=[],t=()=>{n.forEach(u=>u()),n.length=0},i=(u,l,d,c)=>(u.addEventListener(l,d,c),()=>u.removeEventListener(l,d,c)),o=h.computed(()=>{const u=o_(h.toValue(e[0])).filter(l=>l!=null);return u.every(l=>typeof l!="string")?u:void 0}),r=Uq(()=>{var u,l;return[(l=(u=o.value)==null?void 0:u.map(d=>As(d)))!=null?l:[r_].filter(d=>d!=null),o_(h.toValue(o.value?e[1]:e[0])),o_(h.unref(o.value?e[2]:e[1])),h.toValue(o.value?e[3]:e[2])]},([u,l,d,c])=>{if(t(),!(u!=null&&u.length)||!(l!=null&&l.length)||!(d!=null&&d.length))return;const _=Pq(c)?{...c}:c;n.push(...u.flatMap(f=>l.flatMap(p=>d.map(a=>i(f,p,a,_)))))},{flush:"post"}),s=()=>{r(),t()};return iM(t),s}function Bq(){const e=h.shallowRef(!1),n=h.getCurrentInstance();return n&&h.onMounted(()=>{e.value=!0},n),e}function jq(e){return typeof e=="function"?e:typeof e=="string"?n=>n.key===e:Array.isArray(e)?n=>e.includes(n.key):()=>!0}function Vq(...e){let n,t,i={};e.length===3?(n=e[0],t=e[1],i=e[2]):e.length===2?typeof e[1]=="object"?(n=!0,t=e[0],i=e[1]):(n=e[0],t=e[1]):(n=!0,t=e[0]);const{target:o=r_,eventName:r="keydown",passive:s=!1,dedupe:u=!1}=i,l=jq(n);return s_(o,r,c=>{c.repeat&&h.toValue(u)||l(c)&&t(c)},s)}function Fq(e){return JSON.parse(JSON.stringify(e))}function rM(e,n,t,i={}){var o,r,s;const{clone:u=!1,passive:l=!1,eventName:d,deep:c=!1,defaultValue:_,shouldEmit:f}=i,p=h.getCurrentInstance(),a=t||(p==null?void 0:p.emit)||((o=p==null?void 0:p.$emit)==null?void 0:o.bind(p))||((s=(r=p==null?void 0:p.proxy)==null?void 0:r.$emit)==null?void 0:s.bind(p==null?void 0:p.proxy));let v=d;v=v||`update:${n.toString()}`;const m=y=>u?typeof u=="function"?u(y):Fq(y):y,g=()=>wq(e[n])?m(e[n]):_,E=y=>{f?f(y)&&a(v,y):a(v,y)};if(l){const y=g(),S=h.ref(y);let C=!1;return h.watch(()=>e[n],T=>{C||(C=!0,S.value=m(T),h.nextTick(()=>C=!1))}),h.watch(S,T=>{!C&&(T!==e[n]||c)&&E(T)},{deep:c}),S}else return h.computed({get(){return g()},set(y){E(y)}})}function l_(e){if(e===null||typeof e!="object")return!1;const n=Object.getPrototypeOf(e);return n!==null&&n!==Object.prototype&&Object.getPrototypeOf(n)!==null||Symbol.iterator in e?!1:Symbol.toStringTag in e?Object.prototype.toString.call(e)==="[object Module]":!0}function u_(e,n,t=".",i){if(!l_(n))return u_(e,{},t,i);const o=Object.assign({},n);for(const r in e){if(r==="__proto__"||r==="constructor")continue;const s=e[r];s!=null&&(i&&i(o,r,s,t)||(Array.isArray(s)&&Array.isArray(o[r])?o[r]=[...s,...o[r]]:l_(s)&&l_(o[r])?o[r]=u_(s,o[r],(t?`${t}.`:"")+r.toString(),i):o[r]=s))}return o}function qq(e){return(...n)=>n.reduce((t,i)=>u_(t,i,"",e),{})}const Gq=qq(),Hq=Rq(()=>{const e=h.ref(new Map),n=h.ref(),t=h.computed(()=>{for(const s of e.value.values())if(s)return!0;return!1}),i=nM({scrollBody:h.ref(!0)});let o=null;const r=()=>{document.body.style.paddingRight="",document.body.style.marginRight="",document.body.style.pointerEvents="",document.documentElement.style.removeProperty("--scrollbar-width"),document.body.style.overflow=n.value??"",oM&&(o==null||o()),n.value=void 0};return h.watch(t,(s,u)=>{var _;if(!eo)return;if(!s){u&&r();return}n.value===void 0&&(n.value=document.body.style.overflow);const l=window.innerWidth-document.documentElement.clientWidth,d={padding:l,margin:0},c=(_=i.scrollBody)!=null&&_.value?typeof i.scrollBody.value=="object"?Gq({padding:i.scrollBody.value.padding===!0?l:i.scrollBody.value.padding,margin:i.scrollBody.value.margin===!0?l:i.scrollBody.value.margin},d):d:{padding:0,margin:0};l>0&&(document.body.style.paddingRight=typeof c.padding=="number"?`${c.padding}px`:String(c.padding),document.body.style.marginRight=typeof c.margin=="number"?`${c.margin}px`:String(c.margin),document.documentElement.style.setProperty("--scrollbar-width",`${l}px`),document.body.style.overflow="hidden"),oM&&(o=s_(document,"touchmove",f=>Yq(f),{passive:!1})),h.nextTick(()=>{document.body.style.pointerEvents="none",document.body.style.overflow="hidden"})},{immediate:!0,flush:"sync"}),e});function zq(e){const n=Math.random().toString(36).substring(2,7),t=Hq();t.value.set(n,e);const i=h.computed({get:()=>t.value.get(n)??!1,set:o=>t.value.set(n,o)});return Lq(()=>{t.value.delete(n)}),i}function sM(e){const n=window.getComputedStyle(e);if(n.overflowX==="scroll"||n.overflowY==="scroll"||n.overflowX==="auto"&&e.clientWidth<e.scrollWidth||n.overflowY==="auto"&&e.clientHeight<e.scrollHeight)return!0;{const t=e.parentNode;return!(t instanceof Element)||t.tagName==="BODY"?!1:sM(t)}}function Yq(e){const n=e||window.event,t=n.target;return t instanceof Element&&sM(t)?!1:n.touches.length>1?!0:(n.preventDefault&&n.cancelable&&n.preventDefault(),!1)}function Kq(e){const n=h.getCurrentInstance(),t=n==null?void 0:n.type.emits,i={};return t!=null&&t.length||console.warn(`No emitted event found. Please check component: ${n==null?void 0:n.type.__name}`),t==null||t.forEach(o=>{i[h.toHandlerKey(h.camelize(o))]=(...r)=>e(o,...r)}),i}let d_=0;function Wq(){h.watchEffect(e=>{if(!eo)return;const n=document.querySelectorAll("[data-reka-focus-guard]");document.body.insertAdjacentElement("afterbegin",n[0]??lM()),document.body.insertAdjacentElement("beforeend",n[1]??lM()),d_++,e(()=>{d_===1&&document.querySelectorAll("[data-reka-focus-guard]").forEach(t=>t.remove()),d_--})})}function lM(){const e=document.createElement("span");return e.setAttribute("data-reka-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}function ci(){const e=h.getCurrentInstance(),n=h.ref(),t=h.computed(()=>{var s,u;return["#text","#comment"].includes((s=n.value)==null?void 0:s.$el.nodeName)?(u=n.value)==null?void 0:u.$el.nextElementSibling:As(n)}),i=Object.assign({},e.exposed),o={};for(const s in e.props)Object.defineProperty(o,s,{enumerable:!0,configurable:!0,get:()=>e.props[s]});if(Object.keys(i).length>0)for(const s in i)Object.defineProperty(o,s,{enumerable:!0,configurable:!0,get:()=>i[s]});Object.defineProperty(o,"$el",{enumerable:!0,configurable:!0,get:()=>e.vnode.el}),e.exposed=o;function r(s){n.value=s,s&&(Object.defineProperty(o,"$el",{enumerable:!0,configurable:!0,get:()=>s instanceof Element?s:s.$el}),e.exposed=o)}return{forwardRef:r,currentRef:n,currentElement:t}}function uM(e){const n=h.getCurrentInstance(),t=Object.keys((n==null?void 0:n.type.props)??{}).reduce((o,r)=>{const s=(n==null?void 0:n.type.props[r]).default;return s!==void 0&&(o[r]=s),o},{}),i=h.toRef(e);return h.computed(()=>{const o={},r=(n==null?void 0:n.vnode.props)??{};return Object.keys(r).forEach(s=>{o[h.camelize(s)]=r[s]}),Object.keys({...t,...o}).reduce((s,u)=>(i.value[u]!==void 0&&(s[u]=i.value[u]),s),{})})}function Nr(e,n){const t=uM(e),i=n?Kq(n):{};return h.computed(()=>({...t.value,...i}))}var $q=function(e){if(typeof document>"u")return null;var n=Array.isArray(e)?e[0]:e;return n.ownerDocument.body},Or=new WeakMap,nu=new WeakMap,iu={},c_=0,dM=function(e){return e&&(e.host||dM(e.parentNode))},Qq=function(e,n){return n.map(function(t){if(e.contains(t))return t;var i=dM(t);return i&&e.contains(i)?i:(console.error("aria-hidden",t,"in not contained inside",e,". Doing nothing"),null)}).filter(function(t){return!!t})},Jq=function(e,n,t,i){var o=Qq(n,Array.isArray(e)?e:[e]);iu[t]||(iu[t]=new WeakMap);var r=iu[t],s=[],u=new Set,l=new Set(o),d=function(_){!_||u.has(_)||(u.add(_),d(_.parentNode))};o.forEach(d);var c=function(_){!_||l.has(_)||Array.prototype.forEach.call(_.children,function(f){if(u.has(f))c(f);else try{var p=f.getAttribute(i),a=p!==null&&p!=="false",v=(Or.get(f)||0)+1,m=(r.get(f)||0)+1;Or.set(f,v),r.set(f,m),s.push(f),v===1&&a&&nu.set(f,!0),m===1&&f.setAttribute(t,"true"),a||f.setAttribute(i,"true")}catch(g){console.error("aria-hidden: cannot operate on ",f,g)}})};return c(n),u.clear(),c_++,function(){s.forEach(function(_){var f=Or.get(_)-1,p=r.get(_)-1;Or.set(_,f),r.set(_,p),f||(nu.has(_)||_.removeAttribute(i),nu.delete(_)),p||_.removeAttribute(t)}),c_--,c_||(Or=new WeakMap,Or=new WeakMap,nu=new WeakMap,iu={})}},Xq=function(e,n,t){t===void 0&&(t="data-aria-hidden");var i=Array.from(Array.isArray(e)?e:[e]),o=$q(e);return o?(i.push.apply(i,Array.from(o.querySelectorAll("[aria-live], script"))),Jq(i,o,t,"aria-hidden")):function(){return null}};function Zq(e){let n;h.watch(()=>As(e),t=>{t?n=Xq(t):n&&n()}),h.onUnmounted(()=>{n&&n()})}let e8=0;function __(e,n="reka"){var i;if("useId"in Ps)return`${n}-${(i=Ps.useId)==null?void 0:i.call(Ps)}`;const t=nM({useId:void 0});return t.useId?`${n}-${t.useId()}`:`${n}-${++e8}`}function t8(e){const n=h.ref(),t=h.computed(()=>{var o;return((o=n.value)==null?void 0:o.width)??0}),i=h.computed(()=>{var o;return((o=n.value)==null?void 0:o.height)??0});return h.onMounted(()=>{const o=As(e);if(o){n.value={width:o.offsetWidth,height:o.offsetHeight};const r=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const u=s[0];let l,d;if("borderBoxSize"in u){const c=u.borderBoxSize,_=Array.isArray(c)?c[0]:c;l=_.inlineSize,d=_.blockSize}else l=o.offsetWidth,d=o.offsetHeight;n.value={width:l,height:d}});return r.observe(o,{box:"border-box"}),()=>r.unobserve(o)}else n.value=void 0}),{width:t,height:i}}function n8(e,n){const t=h.ref(e);function i(r){return n[t.value][r]??t.value}return{state:t,dispatch:r=>{t.value=i(r)}}}function i8(e,n){var m;const t=h.ref({}),i=h.ref("none"),o=h.ref(e),r=e.value?"mounted":"unmounted";let s;const u=((m=n.value)==null?void 0:m.ownerDocument.defaultView)??r_,{state:l,dispatch:d}=n8(r,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}}),c=g=>{var E;if(eo){const y=new CustomEvent(g,{bubbles:!1,cancelable:!1});(E=n.value)==null||E.dispatchEvent(y)}};h.watch(e,async(g,E)=>{var S;const y=E!==g;if(await h.nextTick(),y){const C=i.value,T=ou(n.value);g?(d("MOUNT"),c("enter"),T==="none"&&c("after-enter")):T==="none"||T==="undefined"||((S=t.value)==null?void 0:S.display)==="none"?(d("UNMOUNT"),c("leave"),c("after-leave")):E&&C!==T?(d("ANIMATION_OUT"),c("leave")):(d("UNMOUNT"),c("after-leave"))}},{immediate:!0});const _=g=>{const E=ou(n.value),y=E.includes(CSS.escape(g.animationName)),S=l.value==="mounted"?"enter":"leave";if(g.target===n.value&&y&&(c(`after-${S}`),d("ANIMATION_END"),!o.value)){const C=n.value.style.animationFillMode;n.value.style.animationFillMode="forwards",s=u==null?void 0:u.setTimeout(()=>{var T;((T=n.value)==null?void 0:T.style.animationFillMode)==="forwards"&&(n.value.style.animationFillMode=C)})}g.target===n.value&&E==="none"&&d("ANIMATION_END")},f=g=>{g.target===n.value&&(i.value=ou(n.value))},p=h.watch(n,(g,E)=>{g?(t.value=getComputedStyle(g),g.addEventListener("animationstart",f),g.addEventListener("animationcancel",_),g.addEventListener("animationend",_)):(d("ANIMATION_END"),s!==void 0&&(u==null||u.clearTimeout(s)),E==null||E.removeEventListener("animationstart",f),E==null||E.removeEventListener("animationcancel",_),E==null||E.removeEventListener("animationend",_))},{immediate:!0}),a=h.watch(l,()=>{const g=ou(n.value);i.value=l.value==="mounted"?g:"none"});return h.onUnmounted(()=>{p(),a()}),{isPresent:h.computed(()=>["mounted","unmountSuspended"].includes(l.value))}}function ou(e){return e&&getComputedStyle(e).animationName||"none"}var cM=h.defineComponent({name:"Presence",props:{present:{type:Boolean,required:!0},forceMount:{type:Boolean}},slots:{},setup(e,{slots:n,expose:t}){var d;const{present:i,forceMount:o}=h.toRefs(e),r=h.ref(),{isPresent:s}=i8(i,r);t({present:s});let u=n.default({present:s.value});u=i_(u||[]);const l=h.getCurrentInstance();if(u&&(u==null?void 0:u.length)>1){const c=(d=l==null?void 0:l.parent)!=null&&d.type.name?`<${l.parent.type.name} />`:"component";throw new Error([`Detected an invalid children for \`${c}\` for \`Presence\` component.`,"","Note: Presence works similarly to `v-if` directly, but it waits for animation/transition to finished before unmounting. So it expect only one direct child of valid VNode type.","You can apply a few solutions:",["Provide a single child element so that `presence` directive attach correctly.","Ensure the first child is an actual element instead of a raw text node or comment node."].map(_=>` - ${_}`).join(`
14
14
  `)].join(`
15
- `))}return()=>o.value||i.value||s.value?h.h(n.default({present:s.value})[0],{ref:c=>{const _=As(c);return typeof(_==null?void 0:_.hasAttribute)>"u"||(_!=null&&_.hasAttribute("data-reka-popper-content-wrapper")?r.value=_.firstElementChild:r.value=_),_}}):null}});const o8=h.defineComponent({name:"PrimitiveSlot",inheritAttrs:!1,setup(e,{attrs:n,slots:t}){return()=>{var l;if(!t.default)return null;const i=i_(t.default()),o=i.findIndex(d=>d.type!==h.Comment);if(o===-1)return i;const r=i[o];(l=r.props)==null||delete l.ref;const s=r.props?h.mergeProps(n,r.props):n,u=h.cloneVNode({...r,props:{}},s);return i.length===1?u:(i[o]=u,i)}}}),r8=["area","img","input"],Ci=h.defineComponent({name:"Primitive",inheritAttrs:!1,props:{asChild:{type:Boolean,default:!1},as:{type:[String,Object],default:"div"}},setup(e,{attrs:n,slots:t}){const i=e.asChild?"template":e.as;return typeof i=="string"&&r8.includes(i)?()=>h.h(i,n):i!=="template"?()=>h.h(e.as,n,{default:t.default}):()=>h.h(o8,n,{default:t.default})}}),[_M,s8]=Cs("CollapsibleRoot");var l8=h.defineComponent({__name:"CollapsibleRoot",props:{defaultOpen:{type:Boolean,required:!1,default:!1},open:{type:Boolean,required:!1,default:void 0},disabled:{type:Boolean,required:!1},unmountOnHide:{type:Boolean,required:!1,default:!0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["update:open"],setup(e,{expose:n,emit:t}){const i=e,r=rM(i,"open",t,{defaultValue:i.defaultOpen,passive:i.open===void 0}),{disabled:s,unmountOnHide:u}=h.toRefs(i);return s8({contentId:"",disabled:s,open:r,unmountOnHide:u,onOpenToggle:()=>{s.value||(r.value=!r.value)}}),n({open:r}),ci(),(l,d)=>(h.openBlock(),h.createBlock(h.unref(Ci),{as:l.as,"as-child":i.asChild,"data-state":h.unref(r)?"open":"closed","data-disabled":h.unref(s)?"":void 0},{default:h.withCtx(()=>[h.renderSlot(l.$slots,"default",{open:h.unref(r)})]),_:3},8,["as","as-child","data-state","data-disabled"]))}}),u8=l8,d8=h.defineComponent({inheritAttrs:!1,__name:"CollapsibleContent",props:{forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["contentFound"],setup(e,{emit:n}){const t=e,i=n,o=_M();o.contentId||(o.contentId=__(void 0,"reka-collapsible-content"));const r=h.ref(),{forwardRef:s,currentElement:u}=ci(),l=h.ref(0),d=h.ref(0),c=h.computed(()=>o.open.value),_=h.ref(c.value),f=h.ref();h.watch(()=>{var a;return[c.value,(a=r.value)==null?void 0:a.present]},async()=>{await h.nextTick();const a=u.value;if(!a)return;f.value=f.value||{transitionDuration:a.style.transitionDuration,animationName:a.style.animationName},a.style.transitionDuration="0s",a.style.animationName="none";const v=a.getBoundingClientRect();d.value=v.height,l.value=v.width,_.value||(a.style.transitionDuration=f.value.transitionDuration,a.style.animationName=f.value.animationName)},{immediate:!0});const p=h.computed(()=>_.value&&o.open.value);return h.onMounted(()=>{requestAnimationFrame(()=>{_.value=!1})}),s_(u,"beforematch",a=>{requestAnimationFrame(()=>{o.onOpenToggle(),i("contentFound")})}),(a,v)=>(h.openBlock(),h.createBlock(h.unref(cM),{ref_key:"presentRef",ref:r,present:a.forceMount||h.unref(o).open.value,"force-mount":!0},{default:h.withCtx(({present:m})=>{var g;return[h.createVNode(h.unref(Ci),h.mergeProps(a.$attrs,{id:h.unref(o).contentId,ref:h.unref(s),"as-child":t.asChild,as:a.as,hidden:m?void 0:h.unref(o).unmountOnHide.value?"":"until-found","data-state":p.value?void 0:h.unref(o).open.value?"open":"closed","data-disabled":(g=h.unref(o).disabled)!=null&&g.value?"":void 0,style:{"--reka-collapsible-content-height":`${d.value}px`,"--reka-collapsible-content-width":`${l.value}px`}}),{default:h.withCtx(()=>[!h.unref(o).unmountOnHide.value||m?h.renderSlot(a.$slots,"default",{key:0}):h.createCommentVNode("v-if",!0)]),_:2},1040,["id","as-child","as","hidden","data-state","data-disabled","style"])]}),_:3},8,["present"]))}}),c8=d8,_8=h.defineComponent({__name:"CollapsibleTrigger",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(e){const n=e;ci();const t=_M();return(i,o)=>{var r,s;return h.openBlock(),h.createBlock(h.unref(Ci),{type:i.as==="button"?"button":void 0,as:i.as,"as-child":n.asChild,"aria-controls":h.unref(t).contentId,"aria-expanded":h.unref(t).open.value,"data-state":h.unref(t).open.value?"open":"closed","data-disabled":(r=h.unref(t).disabled)!=null&&r.value?"":void 0,disabled:(s=h.unref(t).disabled)==null?void 0:s.value,onClick:h.unref(t).onOpenToggle},{default:h.withCtx(()=>[h.renderSlot(i.$slots,"default")]),_:3},8,["type","as","as-child","aria-controls","aria-expanded","data-state","data-disabled","disabled","onClick"])}}}),f8=_8;const p8="dismissableLayer.pointerDownOutside",a8="dismissableLayer.focusOutside";function fM(e,n){const t=n.closest("[data-dismissable-layer]"),i=e.dataset.dismissableLayer===""?e:e.querySelector("[data-dismissable-layer]"),o=Array.from(e.ownerDocument.querySelectorAll("[data-dismissable-layer]"));return!!(t&&(i===t||o.indexOf(i)<o.indexOf(t)))}function v8(e,n,t=!0){var s;const i=((s=n==null?void 0:n.value)==null?void 0:s.ownerDocument)??(globalThis==null?void 0:globalThis.document),o=h.ref(!1),r=h.ref(()=>{});return h.watchEffect(u=>{if(!eo||!h.toValue(t))return;const l=async c=>{const _=c.target;if(!(!(n!=null&&n.value)||!_)){if(fM(n.value,_)){o.value=!1;return}if(c.target&&!o.value){let p=function(){tM(p8,e,f)};const f={originalEvent:c};c.pointerType==="touch"?(i.removeEventListener("click",r.value),r.value=p,i.addEventListener("click",r.value,{once:!0})):p()}else i.removeEventListener("click",r.value);o.value=!1}},d=window.setTimeout(()=>{i.addEventListener("pointerdown",l)},0);u(()=>{window.clearTimeout(d),i.removeEventListener("pointerdown",l),i.removeEventListener("click",r.value)})}),{onPointerDownCapture:()=>{h.toValue(t)&&(o.value=!0)}}}function m8(e,n,t=!0){var r;const i=((r=n==null?void 0:n.value)==null?void 0:r.ownerDocument)??(globalThis==null?void 0:globalThis.document),o=h.ref(!1);return h.watchEffect(s=>{if(!eo||!h.toValue(t))return;const u=async l=>{if(!(n!=null&&n.value))return;await h.nextTick(),await h.nextTick();const d=l.target;!n.value||!d||fM(n.value,d)||l.target&&!o.value&&tM(a8,e,{originalEvent:l})};i.addEventListener("focusin",u),s(()=>i.removeEventListener("focusin",u))}),{onFocusCapture:()=>{h.toValue(t)&&(o.value=!0)},onBlurCapture:()=>{h.toValue(t)&&(o.value=!1)}}}const Ui=h.reactive({layersRoot:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set});var h8=h.defineComponent({__name:"DismissableLayer",props:{disableOutsidePointerEvents:{type:Boolean,required:!1,default:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","dismiss"],setup(e,{emit:n}){const t=e,i=n,{forwardRef:o,currentElement:r}=ci(),s=h.computed(()=>{var a;return((a=r.value)==null?void 0:a.ownerDocument)??globalThis.document}),u=h.computed(()=>Ui.layersRoot),l=h.computed(()=>r.value?Array.from(u.value).indexOf(r.value):-1),d=h.computed(()=>Ui.layersWithOutsidePointerEventsDisabled.size>0),c=h.computed(()=>{const a=Array.from(u.value),[v]=[...Ui.layersWithOutsidePointerEventsDisabled].slice(-1),m=a.indexOf(v);return l.value>=m}),_=v8(async a=>{const v=[...Ui.branches].some(m=>m==null?void 0:m.contains(a.target));!c.value||v||(i("pointerDownOutside",a),i("interactOutside",a),await h.nextTick(),a.defaultPrevented||i("dismiss"))},r),f=m8(a=>{[...Ui.branches].some(m=>m==null?void 0:m.contains(a.target))||(i("focusOutside",a),i("interactOutside",a),a.defaultPrevented||i("dismiss"))},r);Vq("Escape",a=>{l.value===u.value.size-1&&(i("escapeKeyDown",a),a.defaultPrevented||i("dismiss"))});let p;return h.watchEffect(a=>{r.value&&(t.disableOutsidePointerEvents&&(Ui.layersWithOutsidePointerEventsDisabled.size===0&&(p=s.value.body.style.pointerEvents,s.value.body.style.pointerEvents="none"),Ui.layersWithOutsidePointerEventsDisabled.add(r.value)),u.value.add(r.value),a(()=>{t.disableOutsidePointerEvents&&Ui.layersWithOutsidePointerEventsDisabled.size===1&&(s.value.body.style.pointerEvents=p)}))}),h.watchEffect(a=>{a(()=>{r.value&&(u.value.delete(r.value),Ui.layersWithOutsidePointerEventsDisabled.delete(r.value))})}),(a,v)=>(h.openBlock(),h.createBlock(h.unref(Ci),{ref:h.unref(o),"as-child":a.asChild,as:a.as,"data-dismissable-layer":"",style:h.normalizeStyle({pointerEvents:d.value?c.value?"auto":"none":void 0}),onFocusCapture:h.unref(f).onFocusCapture,onBlurCapture:h.unref(f).onBlurCapture,onPointerdownCapture:h.unref(_).onPointerDownCapture},{default:h.withCtx(()=>[h.renderSlot(a.$slots,"default")]),_:3},8,["as-child","as","style","onFocusCapture","onBlurCapture","onPointerdownCapture"]))}}),y8=h8;const g8=Aq(()=>h.ref([]));function E8(){const e=g8();return{add(n){const t=e.value[0];n!==t&&(t==null||t.pause()),e.value=pM(e.value,n),e.value.unshift(n)},remove(n){var t;e.value=pM(e.value,n),(t=e.value[0])==null||t.resume()}}}function pM(e,n){const t=[...e],i=t.indexOf(n);return i!==-1&&t.splice(i,1),t}function T8(e){return e.filter(n=>n.tagName!=="A")}const f_="focusScope.autoFocusOnMount",p_="focusScope.autoFocusOnUnmount",aM={bubbles:!1,cancelable:!0};function S8(e,{select:n=!1}={}){const t=Mr();for(const i of e)if(to(i,{select:n}),Mr()!==t)return!0}function b8(e){const n=vM(e),t=mM(n,e),i=mM(n.reverse(),e);return[t,i]}function vM(e){const n=[],t=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:i=>{const o=i.tagName==="INPUT"&&i.type==="hidden";return i.disabled||i.hidden||o?NodeFilter.FILTER_SKIP:i.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;t.nextNode();)n.push(t.currentNode);return n}function mM(e,n){for(const t of e)if(!I8(t,{upTo:n}))return t}function I8(e,{upTo:n}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(n!==void 0&&e===n)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function C8(e){return e instanceof HTMLInputElement&&"select"in e}function to(e,{select:n=!1}={}){if(e&&e.focus){const t=Mr();e.focus({preventScroll:!0}),e!==t&&C8(e)&&n&&e.select()}}var A8=h.defineComponent({__name:"FocusScope",props:{loop:{type:Boolean,required:!1,default:!1},trapped:{type:Boolean,required:!1,default:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["mountAutoFocus","unmountAutoFocus"],setup(e,{emit:n}){const t=e,i=n,{currentRef:o,currentElement:r}=ci(),s=h.ref(null),u=E8(),l=h.reactive({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}});h.watchEffect(c=>{if(!eo)return;const _=r.value;if(!t.trapped)return;function f(m){if(l.paused||!_)return;const g=m.target;_.contains(g)?s.value=g:to(s.value,{select:!0})}function p(m){if(l.paused||!_)return;const g=m.relatedTarget;g!==null&&(_.contains(g)||to(s.value,{select:!0}))}function a(m){_.contains(s.value)||to(_)}document.addEventListener("focusin",f),document.addEventListener("focusout",p);const v=new MutationObserver(a);_&&v.observe(_,{childList:!0,subtree:!0}),c(()=>{document.removeEventListener("focusin",f),document.removeEventListener("focusout",p),v.disconnect()})}),h.watchEffect(async c=>{const _=r.value;if(await h.nextTick(),!_)return;u.add(l);const f=Mr();if(!_.contains(f)){const a=new CustomEvent(f_,aM);_.addEventListener(f_,v=>i("mountAutoFocus",v)),_.dispatchEvent(a),a.defaultPrevented||(S8(T8(vM(_)),{select:!0}),Mr()===f&&to(_))}c(()=>{_.removeEventListener(f_,m=>i("mountAutoFocus",m));const a=new CustomEvent(p_,aM),v=m=>{i("unmountAutoFocus",m)};_.addEventListener(p_,v),_.dispatchEvent(a),setTimeout(()=>{a.defaultPrevented||to(f??document.body,{select:!0}),_.removeEventListener(p_,v),u.remove(l)},0)})});function d(c){if(!t.loop&&!t.trapped||l.paused)return;const _=c.key==="Tab"&&!c.altKey&&!c.ctrlKey&&!c.metaKey,f=Mr();if(_&&f){const p=c.currentTarget,[a,v]=b8(p);a&&v?!c.shiftKey&&f===v?(c.preventDefault(),t.loop&&to(a,{select:!0})):c.shiftKey&&f===a&&(c.preventDefault(),t.loop&&to(v,{select:!0})):f===p&&c.preventDefault()}}return(c,_)=>(h.openBlock(),h.createBlock(h.unref(Ci),{ref_key:"currentRef",ref:o,tabindex:"-1","as-child":c.asChild,as:c.as,onKeydown:d},{default:h.withCtx(()=>[h.renderSlot(c.$slots,"default")]),_:3},8,["as-child","as"]))}}),R8=A8,M8=h.defineComponent({__name:"Teleport",props:{to:{type:null,required:!1,default:"body"},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(e){const n=Bq();return(t,i)=>h.unref(n)||t.forceMount?(h.openBlock(),h.createBlock(h.Teleport,{key:0,to:t.to,disabled:t.disabled,defer:t.defer},[h.renderSlot(t.$slots,"default")],8,["to","disabled","defer"])):h.createCommentVNode("v-if",!0)}}),N8=M8;const[hM,O8]=Cs("PopperRoot");var w8=h.defineComponent({inheritAttrs:!1,__name:"PopperRoot",setup(e){const n=h.ref();return O8({anchor:n,onAnchorChange:t=>n.value=t}),(t,i)=>h.renderSlot(t.$slots,"default")}}),x8=w8,P8=h.defineComponent({__name:"PopperAnchor",props:{reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const n=e,{forwardRef:t,currentElement:i}=ci(),o=hM();return h.watchPostEffect(()=>{o.onAnchorChange(n.reference??i.value)}),(r,s)=>(h.openBlock(),h.createBlock(h.unref(Ci),{ref:h.unref(t),as:r.as,"as-child":r.asChild},{default:h.withCtx(()=>[h.renderSlot(r.$slots,"default")]),_:3},8,["as","as-child"]))}}),D8=P8;function k8(e){return e!==null}function L8(e){return{name:"transformOrigin",options:e,fn(n){var m,g,E;const{placement:t,rects:i,middlewareData:o}=n,s=((m=o.arrow)==null?void 0:m.centerOffset)!==0,u=s?0:e.arrowWidth,l=s?0:e.arrowHeight,[d,c]=a_(t),_={start:"0%",center:"50%",end:"100%"}[c],f=(((g=o.arrow)==null?void 0:g.x)??0)+u/2,p=(((E=o.arrow)==null?void 0:E.y)??0)+l/2;let a="",v="";return d==="bottom"?(a=s?_:`${f}px`,v=`${-l}px`):d==="top"?(a=s?_:`${f}px`,v=`${i.floating.height+l}px`):d==="right"?(a=`${-l}px`,v=s?_:`${p}px`):d==="left"&&(a=`${i.floating.width+l}px`,v=s?_:`${p}px`),{data:{x:a,y:v}}}}}function a_(e){const[n,t="center"]=e.split("-");return[n,t]}const U8=["top","right","bottom","left"],no=Math.min,Yn=Math.max,ru=Math.round,su=Math.floor,Ai=e=>({x:e,y:e}),B8={left:"right",right:"left",bottom:"top",top:"bottom"},j8={start:"end",end:"start"};function v_(e,n,t){return Yn(e,no(n,t))}function Bi(e,n){return typeof e=="function"?e(n):e}function ji(e){return e.split("-")[0]}function wr(e){return e.split("-")[1]}function m_(e){return e==="x"?"y":"x"}function h_(e){return e==="y"?"height":"width"}const V8=new Set(["top","bottom"]);function Ri(e){return V8.has(ji(e))?"y":"x"}function y_(e){return m_(Ri(e))}function F8(e,n,t){t===void 0&&(t=!1);const i=wr(e),o=y_(e),r=h_(o);let s=o==="x"?i===(t?"end":"start")?"right":"left":i==="start"?"bottom":"top";return n.reference[r]>n.floating[r]&&(s=lu(s)),[s,lu(s)]}function q8(e){const n=lu(e);return[g_(e),n,g_(n)]}function g_(e){return e.replace(/start|end/g,n=>j8[n])}const yM=["left","right"],gM=["right","left"],G8=["top","bottom"],H8=["bottom","top"];function z8(e,n,t){switch(e){case"top":case"bottom":return t?n?gM:yM:n?yM:gM;case"left":case"right":return n?G8:H8;default:return[]}}function Y8(e,n,t,i){const o=wr(e);let r=z8(ji(e),t==="start",i);return o&&(r=r.map(s=>s+"-"+o),n&&(r=r.concat(r.map(g_)))),r}function lu(e){return e.replace(/left|right|bottom|top/g,n=>B8[n])}function K8(e){return{top:0,right:0,bottom:0,left:0,...e}}function EM(e){return typeof e!="number"?K8(e):{top:e,right:e,bottom:e,left:e}}function uu(e){const{x:n,y:t,width:i,height:o}=e;return{width:i,height:o,top:t,left:n,right:n+i,bottom:t+o,x:n,y:t}}function TM(e,n,t){let{reference:i,floating:o}=e;const r=Ri(n),s=y_(n),u=h_(s),l=ji(n),d=r==="y",c=i.x+i.width/2-o.width/2,_=i.y+i.height/2-o.height/2,f=i[u]/2-o[u]/2;let p;switch(l){case"top":p={x:c,y:i.y-o.height};break;case"bottom":p={x:c,y:i.y+i.height};break;case"right":p={x:i.x+i.width,y:_};break;case"left":p={x:i.x-o.width,y:_};break;default:p={x:i.x,y:i.y}}switch(wr(n)){case"start":p[s]-=f*(t&&d?-1:1);break;case"end":p[s]+=f*(t&&d?-1:1);break}return p}const W8=async(e,n,t)=>{const{placement:i="bottom",strategy:o="absolute",middleware:r=[],platform:s}=t,u=r.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(n));let d=await s.getElementRects({reference:e,floating:n,strategy:o}),{x:c,y:_}=TM(d,i,l),f=i,p={},a=0;for(let v=0;v<u.length;v++){const{name:m,fn:g}=u[v],{x:E,y,data:S,reset:C}=await g({x:c,y:_,initialPlacement:i,placement:f,strategy:o,middlewareData:p,rects:d,platform:s,elements:{reference:e,floating:n}});c=E??c,_=y??_,p={...p,[m]:{...p[m],...S}},C&&a<=50&&(a++,typeof C=="object"&&(C.placement&&(f=C.placement),C.rects&&(d=C.rects===!0?await s.getElementRects({reference:e,floating:n,strategy:o}):C.rects),{x:c,y:_}=TM(d,f,l)),v=-1)}return{x:c,y:_,placement:f,strategy:o,middlewareData:p}};async function Rs(e,n){var t;n===void 0&&(n={});const{x:i,y:o,platform:r,rects:s,elements:u,strategy:l}=e,{boundary:d="clippingAncestors",rootBoundary:c="viewport",elementContext:_="floating",altBoundary:f=!1,padding:p=0}=Bi(n,e),a=EM(p),m=u[f?_==="floating"?"reference":"floating":_],g=uu(await r.getClippingRect({element:(t=await(r.isElement==null?void 0:r.isElement(m)))==null||t?m:m.contextElement||await(r.getDocumentElement==null?void 0:r.getDocumentElement(u.floating)),boundary:d,rootBoundary:c,strategy:l})),E=_==="floating"?{x:i,y:o,width:s.floating.width,height:s.floating.height}:s.reference,y=await(r.getOffsetParent==null?void 0:r.getOffsetParent(u.floating)),S=await(r.isElement==null?void 0:r.isElement(y))?await(r.getScale==null?void 0:r.getScale(y))||{x:1,y:1}:{x:1,y:1},C=uu(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:u,rect:E,offsetParent:y,strategy:l}):E);return{top:(g.top-C.top+a.top)/S.y,bottom:(C.bottom-g.bottom+a.bottom)/S.y,left:(g.left-C.left+a.left)/S.x,right:(C.right-g.right+a.right)/S.x}}const $8=e=>({name:"arrow",options:e,async fn(n){const{x:t,y:i,placement:o,rects:r,platform:s,elements:u,middlewareData:l}=n,{element:d,padding:c=0}=Bi(e,n)||{};if(d==null)return{};const _=EM(c),f={x:t,y:i},p=y_(o),a=h_(p),v=await s.getDimensions(d),m=p==="y",g=m?"top":"left",E=m?"bottom":"right",y=m?"clientHeight":"clientWidth",S=r.reference[a]+r.reference[p]-f[p]-r.floating[a],C=f[p]-r.reference[p],T=await(s.getOffsetParent==null?void 0:s.getOffsetParent(d));let R=T?T[y]:0;(!R||!await(s.isElement==null?void 0:s.isElement(T)))&&(R=u.floating[y]||r.floating[a]);const O=S/2-C/2,B=R/2-v[a]/2-1,j=no(_[g],B),I=no(_[E],B),A=j,M=R-v[a]-I,w=R/2-v[a]/2+O,x=v_(A,w,M),k=!l.arrow&&wr(o)!=null&&w!==x&&r.reference[a]/2-(w<A?j:I)-v[a]/2<0,V=k?w<A?w-A:w-M:0;return{[p]:f[p]+V,data:{[p]:x,centerOffset:w-x-V,...k&&{alignmentOffset:V}},reset:k}}}),Q8=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(n){var t,i;const{placement:o,middlewareData:r,rects:s,initialPlacement:u,platform:l,elements:d}=n,{mainAxis:c=!0,crossAxis:_=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:a="none",flipAlignment:v=!0,...m}=Bi(e,n);if((t=r.arrow)!=null&&t.alignmentOffset)return{};const g=ji(o),E=Ri(u),y=ji(u)===u,S=await(l.isRTL==null?void 0:l.isRTL(d.floating)),C=f||(y||!v?[lu(u)]:q8(u)),T=a!=="none";!f&&T&&C.push(...Y8(u,v,a,S));const R=[u,...C],O=await Rs(n,m),B=[];let j=((i=r.flip)==null?void 0:i.overflows)||[];if(c&&B.push(O[g]),_){const w=F8(o,s,S);B.push(O[w[0]],O[w[1]])}if(j=[...j,{placement:o,overflows:B}],!B.every(w=>w<=0)){var I,A;const w=(((I=r.flip)==null?void 0:I.index)||0)+1,x=R[w];if(x&&(!(_==="alignment"?E!==Ri(x):!1)||j.every(L=>Ri(L.placement)===E?L.overflows[0]>0:!0)))return{data:{index:w,overflows:j},reset:{placement:x}};let k=(A=j.filter(V=>V.overflows[0]<=0).sort((V,L)=>V.overflows[1]-L.overflows[1])[0])==null?void 0:A.placement;if(!k)switch(p){case"bestFit":{var M;const V=(M=j.filter(L=>{if(T){const D=Ri(L.placement);return D===E||D==="y"}return!0}).map(L=>[L.placement,L.overflows.filter(D=>D>0).reduce((D,F)=>D+F,0)]).sort((L,D)=>L[1]-D[1])[0])==null?void 0:M[0];V&&(k=V);break}case"initialPlacement":k=u;break}if(o!==k)return{reset:{placement:k}}}return{}}}};function SM(e,n){return{top:e.top-n.height,right:e.right-n.width,bottom:e.bottom-n.height,left:e.left-n.width}}function bM(e){return U8.some(n=>e[n]>=0)}const J8=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(n){const{rects:t}=n,{strategy:i="referenceHidden",...o}=Bi(e,n);switch(i){case"referenceHidden":{const r=await Rs(n,{...o,elementContext:"reference"}),s=SM(r,t.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:bM(s)}}}case"escaped":{const r=await Rs(n,{...o,altBoundary:!0}),s=SM(r,t.floating);return{data:{escapedOffsets:s,escaped:bM(s)}}}default:return{}}}}},IM=new Set(["left","top"]);async function X8(e,n){const{placement:t,platform:i,elements:o}=e,r=await(i.isRTL==null?void 0:i.isRTL(o.floating)),s=ji(t),u=wr(t),l=Ri(t)==="y",d=IM.has(s)?-1:1,c=r&&l?-1:1,_=Bi(n,e);let{mainAxis:f,crossAxis:p,alignmentAxis:a}=typeof _=="number"?{mainAxis:_,crossAxis:0,alignmentAxis:null}:{mainAxis:_.mainAxis||0,crossAxis:_.crossAxis||0,alignmentAxis:_.alignmentAxis};return u&&typeof a=="number"&&(p=u==="end"?a*-1:a),l?{x:p*c,y:f*d}:{x:f*d,y:p*c}}const Z8=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(n){var t,i;const{x:o,y:r,placement:s,middlewareData:u}=n,l=await X8(n,e);return s===((t=u.offset)==null?void 0:t.placement)&&(i=u.arrow)!=null&&i.alignmentOffset?{}:{x:o+l.x,y:r+l.y,data:{...l,placement:s}}}}},eG=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(n){const{x:t,y:i,placement:o}=n,{mainAxis:r=!0,crossAxis:s=!1,limiter:u={fn:m=>{let{x:g,y:E}=m;return{x:g,y:E}}},...l}=Bi(e,n),d={x:t,y:i},c=await Rs(n,l),_=Ri(ji(o)),f=m_(_);let p=d[f],a=d[_];if(r){const m=f==="y"?"top":"left",g=f==="y"?"bottom":"right",E=p+c[m],y=p-c[g];p=v_(E,p,y)}if(s){const m=_==="y"?"top":"left",g=_==="y"?"bottom":"right",E=a+c[m],y=a-c[g];a=v_(E,a,y)}const v=u.fn({...n,[f]:p,[_]:a});return{...v,data:{x:v.x-t,y:v.y-i,enabled:{[f]:r,[_]:s}}}}}},tG=function(e){return e===void 0&&(e={}),{options:e,fn(n){const{x:t,y:i,placement:o,rects:r,middlewareData:s}=n,{offset:u=0,mainAxis:l=!0,crossAxis:d=!0}=Bi(e,n),c={x:t,y:i},_=Ri(o),f=m_(_);let p=c[f],a=c[_];const v=Bi(u,n),m=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(l){const y=f==="y"?"height":"width",S=r.reference[f]-r.floating[y]+m.mainAxis,C=r.reference[f]+r.reference[y]-m.mainAxis;p<S?p=S:p>C&&(p=C)}if(d){var g,E;const y=f==="y"?"width":"height",S=IM.has(ji(o)),C=r.reference[_]-r.floating[y]+(S&&((g=s.offset)==null?void 0:g[_])||0)+(S?0:m.crossAxis),T=r.reference[_]+r.reference[y]+(S?0:((E=s.offset)==null?void 0:E[_])||0)-(S?m.crossAxis:0);a<C?a=C:a>T&&(a=T)}return{[f]:p,[_]:a}}}},nG=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(n){var t,i;const{placement:o,rects:r,platform:s,elements:u}=n,{apply:l=()=>{},...d}=Bi(e,n),c=await Rs(n,d),_=ji(o),f=wr(o),p=Ri(o)==="y",{width:a,height:v}=r.floating;let m,g;_==="top"||_==="bottom"?(m=_,g=f===(await(s.isRTL==null?void 0:s.isRTL(u.floating))?"start":"end")?"left":"right"):(g=_,m=f==="end"?"top":"bottom");const E=v-c.top-c.bottom,y=a-c.left-c.right,S=no(v-c[m],E),C=no(a-c[g],y),T=!n.middlewareData.shift;let R=S,O=C;if((t=n.middlewareData.shift)!=null&&t.enabled.x&&(O=y),(i=n.middlewareData.shift)!=null&&i.enabled.y&&(R=E),T&&!f){const j=Yn(c.left,0),I=Yn(c.right,0),A=Yn(c.top,0),M=Yn(c.bottom,0);p?O=a-2*(j!==0||I!==0?j+I:Yn(c.left,c.right)):R=v-2*(A!==0||M!==0?A+M:Yn(c.top,c.bottom))}await l({...n,availableWidth:O,availableHeight:R});const B=await s.getDimensions(u.floating);return a!==B.width||v!==B.height?{reset:{rects:!0}}:{}}}};function du(){return typeof window<"u"}function Ao(e){return E_(e)?(e.nodeName||"").toLowerCase():"#document"}function Kn(e){var n;return(e==null||(n=e.ownerDocument)==null?void 0:n.defaultView)||window}function Mi(e){var n;return(n=(E_(e)?e.ownerDocument:e.document)||window.document)==null?void 0:n.documentElement}function E_(e){return du()?e instanceof Node||e instanceof Kn(e).Node:!1}function _i(e){return du()?e instanceof Element||e instanceof Kn(e).Element:!1}function Ni(e){return du()?e instanceof HTMLElement||e instanceof Kn(e).HTMLElement:!1}function CM(e){return!du()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Kn(e).ShadowRoot}const iG=new Set(["inline","contents"]);function Ms(e){const{overflow:n,overflowX:t,overflowY:i,display:o}=fi(e);return/auto|scroll|overlay|hidden|clip/.test(n+i+t)&&!iG.has(o)}const oG=new Set(["table","td","th"]);function rG(e){return oG.has(Ao(e))}const sG=[":popover-open",":modal"];function cu(e){return sG.some(n=>{try{return e.matches(n)}catch{return!1}})}const lG=["transform","translate","scale","rotate","perspective"],uG=["transform","translate","scale","rotate","perspective","filter"],dG=["paint","layout","strict","content"];function T_(e){const n=S_(),t=_i(e)?fi(e):e;return lG.some(i=>t[i]?t[i]!=="none":!1)||(t.containerType?t.containerType!=="normal":!1)||!n&&(t.backdropFilter?t.backdropFilter!=="none":!1)||!n&&(t.filter?t.filter!=="none":!1)||uG.some(i=>(t.willChange||"").includes(i))||dG.some(i=>(t.contain||"").includes(i))}function cG(e){let n=io(e);for(;Ni(n)&&!xr(n);){if(T_(n))return n;if(cu(n))return null;n=io(n)}return null}function S_(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const _G=new Set(["html","body","#document"]);function xr(e){return _G.has(Ao(e))}function fi(e){return Kn(e).getComputedStyle(e)}function _u(e){return _i(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function io(e){if(Ao(e)==="html")return e;const n=e.assignedSlot||e.parentNode||CM(e)&&e.host||Mi(e);return CM(n)?n.host:n}function AM(e){const n=io(e);return xr(n)?e.ownerDocument?e.ownerDocument.body:e.body:Ni(n)&&Ms(n)?n:AM(n)}function Ns(e,n,t){var i;n===void 0&&(n=[]),t===void 0&&(t=!0);const o=AM(e),r=o===((i=e.ownerDocument)==null?void 0:i.body),s=Kn(o);if(r){const u=b_(s);return n.concat(s,s.visualViewport||[],Ms(o)?o:[],u&&t?Ns(u):[])}return n.concat(o,Ns(o,[],t))}function b_(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function RM(e){const n=fi(e);let t=parseFloat(n.width)||0,i=parseFloat(n.height)||0;const o=Ni(e),r=o?e.offsetWidth:t,s=o?e.offsetHeight:i,u=ru(t)!==r||ru(i)!==s;return u&&(t=r,i=s),{width:t,height:i,$:u}}function I_(e){return _i(e)?e:e.contextElement}function Pr(e){const n=I_(e);if(!Ni(n))return Ai(1);const t=n.getBoundingClientRect(),{width:i,height:o,$:r}=RM(n);let s=(r?ru(t.width):t.width)/i,u=(r?ru(t.height):t.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!u||!Number.isFinite(u))&&(u=1),{x:s,y:u}}const fG=Ai(0);function MM(e){const n=Kn(e);return!S_()||!n.visualViewport?fG:{x:n.visualViewport.offsetLeft,y:n.visualViewport.offsetTop}}function pG(e,n,t){return n===void 0&&(n=!1),!t||n&&t!==Kn(e)?!1:n}function Ro(e,n,t,i){n===void 0&&(n=!1),t===void 0&&(t=!1);const o=e.getBoundingClientRect(),r=I_(e);let s=Ai(1);n&&(i?_i(i)&&(s=Pr(i)):s=Pr(e));const u=pG(r,t,i)?MM(r):Ai(0);let l=(o.left+u.x)/s.x,d=(o.top+u.y)/s.y,c=o.width/s.x,_=o.height/s.y;if(r){const f=Kn(r),p=i&&_i(i)?Kn(i):i;let a=f,v=b_(a);for(;v&&i&&p!==a;){const m=Pr(v),g=v.getBoundingClientRect(),E=fi(v),y=g.left+(v.clientLeft+parseFloat(E.paddingLeft))*m.x,S=g.top+(v.clientTop+parseFloat(E.paddingTop))*m.y;l*=m.x,d*=m.y,c*=m.x,_*=m.y,l+=y,d+=S,a=Kn(v),v=b_(a)}}return uu({width:c,height:_,x:l,y:d})}function C_(e,n){const t=_u(e).scrollLeft;return n?n.left+t:Ro(Mi(e)).left+t}function NM(e,n,t){t===void 0&&(t=!1);const i=e.getBoundingClientRect(),o=i.left+n.scrollLeft-(t?0:C_(e,i)),r=i.top+n.scrollTop;return{x:o,y:r}}function aG(e){let{elements:n,rect:t,offsetParent:i,strategy:o}=e;const r=o==="fixed",s=Mi(i),u=n?cu(n.floating):!1;if(i===s||u&&r)return t;let l={scrollLeft:0,scrollTop:0},d=Ai(1);const c=Ai(0),_=Ni(i);if((_||!_&&!r)&&((Ao(i)!=="body"||Ms(s))&&(l=_u(i)),Ni(i))){const p=Ro(i);d=Pr(i),c.x=p.x+i.clientLeft,c.y=p.y+i.clientTop}const f=s&&!_&&!r?NM(s,l,!0):Ai(0);return{width:t.width*d.x,height:t.height*d.y,x:t.x*d.x-l.scrollLeft*d.x+c.x+f.x,y:t.y*d.y-l.scrollTop*d.y+c.y+f.y}}function vG(e){return Array.from(e.getClientRects())}function mG(e){const n=Mi(e),t=_u(e),i=e.ownerDocument.body,o=Yn(n.scrollWidth,n.clientWidth,i.scrollWidth,i.clientWidth),r=Yn(n.scrollHeight,n.clientHeight,i.scrollHeight,i.clientHeight);let s=-t.scrollLeft+C_(e);const u=-t.scrollTop;return fi(i).direction==="rtl"&&(s+=Yn(n.clientWidth,i.clientWidth)-o),{width:o,height:r,x:s,y:u}}function hG(e,n){const t=Kn(e),i=Mi(e),o=t.visualViewport;let r=i.clientWidth,s=i.clientHeight,u=0,l=0;if(o){r=o.width,s=o.height;const d=S_();(!d||d&&n==="fixed")&&(u=o.offsetLeft,l=o.offsetTop)}return{width:r,height:s,x:u,y:l}}const yG=new Set(["absolute","fixed"]);function gG(e,n){const t=Ro(e,!0,n==="fixed"),i=t.top+e.clientTop,o=t.left+e.clientLeft,r=Ni(e)?Pr(e):Ai(1),s=e.clientWidth*r.x,u=e.clientHeight*r.y,l=o*r.x,d=i*r.y;return{width:s,height:u,x:l,y:d}}function OM(e,n,t){let i;if(n==="viewport")i=hG(e,t);else if(n==="document")i=mG(Mi(e));else if(_i(n))i=gG(n,t);else{const o=MM(e);i={x:n.x-o.x,y:n.y-o.y,width:n.width,height:n.height}}return uu(i)}function wM(e,n){const t=io(e);return t===n||!_i(t)||xr(t)?!1:fi(t).position==="fixed"||wM(t,n)}function EG(e,n){const t=n.get(e);if(t)return t;let i=Ns(e,[],!1).filter(u=>_i(u)&&Ao(u)!=="body"),o=null;const r=fi(e).position==="fixed";let s=r?io(e):e;for(;_i(s)&&!xr(s);){const u=fi(s),l=T_(s);!l&&u.position==="fixed"&&(o=null),(r?!l&&!o:!l&&u.position==="static"&&!!o&&yG.has(o.position)||Ms(s)&&!l&&wM(e,s))?i=i.filter(c=>c!==s):o=u,s=io(s)}return n.set(e,i),i}function TG(e){let{element:n,boundary:t,rootBoundary:i,strategy:o}=e;const s=[...t==="clippingAncestors"?cu(n)?[]:EG(n,this._c):[].concat(t),i],u=s[0],l=s.reduce((d,c)=>{const _=OM(n,c,o);return d.top=Yn(_.top,d.top),d.right=no(_.right,d.right),d.bottom=no(_.bottom,d.bottom),d.left=Yn(_.left,d.left),d},OM(n,u,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function SG(e){const{width:n,height:t}=RM(e);return{width:n,height:t}}function bG(e,n,t){const i=Ni(n),o=Mi(n),r=t==="fixed",s=Ro(e,!0,r,n);let u={scrollLeft:0,scrollTop:0};const l=Ai(0);function d(){l.x=C_(o)}if(i||!i&&!r)if((Ao(n)!=="body"||Ms(o))&&(u=_u(n)),i){const p=Ro(n,!0,r,n);l.x=p.x+n.clientLeft,l.y=p.y+n.clientTop}else o&&d();r&&!i&&o&&d();const c=o&&!i&&!r?NM(o,u):Ai(0),_=s.left+u.scrollLeft-l.x-c.x,f=s.top+u.scrollTop-l.y-c.y;return{x:_,y:f,width:s.width,height:s.height}}function A_(e){return fi(e).position==="static"}function xM(e,n){if(!Ni(e)||fi(e).position==="fixed")return null;if(n)return n(e);let t=e.offsetParent;return Mi(e)===t&&(t=t.ownerDocument.body),t}function PM(e,n){const t=Kn(e);if(cu(e))return t;if(!Ni(e)){let o=io(e);for(;o&&!xr(o);){if(_i(o)&&!A_(o))return o;o=io(o)}return t}let i=xM(e,n);for(;i&&rG(i)&&A_(i);)i=xM(i,n);return i&&xr(i)&&A_(i)&&!T_(i)?t:i||cG(e)||t}const IG=async function(e){const n=this.getOffsetParent||PM,t=this.getDimensions,i=await t(e.floating);return{reference:bG(e.reference,await n(e.floating),e.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function CG(e){return fi(e).direction==="rtl"}const AG={convertOffsetParentRelativeRectToViewportRelativeRect:aG,getDocumentElement:Mi,getClippingRect:TG,getOffsetParent:PM,getElementRects:IG,getClientRects:vG,getDimensions:SG,getScale:Pr,isElement:_i,isRTL:CG};function DM(e,n){return e.x===n.x&&e.y===n.y&&e.width===n.width&&e.height===n.height}function RG(e,n){let t=null,i;const o=Mi(e);function r(){var u;clearTimeout(i),(u=t)==null||u.disconnect(),t=null}function s(u,l){u===void 0&&(u=!1),l===void 0&&(l=1),r();const d=e.getBoundingClientRect(),{left:c,top:_,width:f,height:p}=d;if(u||n(),!f||!p)return;const a=su(_),v=su(o.clientWidth-(c+f)),m=su(o.clientHeight-(_+p)),g=su(c),y={rootMargin:-a+"px "+-v+"px "+-m+"px "+-g+"px",threshold:Yn(0,no(1,l))||1};let S=!0;function C(T){const R=T[0].intersectionRatio;if(R!==l){if(!S)return s();R?s(!1,R):i=setTimeout(()=>{s(!1,1e-7)},1e3)}R===1&&!DM(d,e.getBoundingClientRect())&&s(),S=!1}try{t=new IntersectionObserver(C,{...y,root:o.ownerDocument})}catch{t=new IntersectionObserver(C,y)}t.observe(e)}return s(!0),r}function MG(e,n,t,i){i===void 0&&(i={});const{ancestorScroll:o=!0,ancestorResize:r=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:u=typeof IntersectionObserver=="function",animationFrame:l=!1}=i,d=I_(e),c=o||r?[...d?Ns(d):[],...Ns(n)]:[];c.forEach(g=>{o&&g.addEventListener("scroll",t,{passive:!0}),r&&g.addEventListener("resize",t)});const _=d&&u?RG(d,t):null;let f=-1,p=null;s&&(p=new ResizeObserver(g=>{let[E]=g;E&&E.target===d&&p&&(p.unobserve(n),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var y;(y=p)==null||y.observe(n)})),t()}),d&&!l&&p.observe(d),p.observe(n));let a,v=l?Ro(e):null;l&&m();function m(){const g=Ro(e);v&&!DM(v,g)&&t(),v=g,a=requestAnimationFrame(m)}return t(),()=>{var g;c.forEach(E=>{o&&E.removeEventListener("scroll",t),r&&E.removeEventListener("resize",t)}),_==null||_(),(g=p)==null||g.disconnect(),p=null,l&&cancelAnimationFrame(a)}}const NG=Z8,OG=eG,kM=Q8,wG=nG,xG=J8,PG=$8,DG=tG,kG=(e,n,t)=>{const i=new Map,o={platform:AG,...t},r={...o.platform,_c:i};return W8(e,n,{...o,platform:r})};function LG(e){return e!=null&&typeof e=="object"&&"$el"in e}function R_(e){if(LG(e)){const n=e.$el;return E_(n)&&Ao(n)==="#comment"?null:n}return e}function Dr(e){return typeof e=="function"?e():h.unref(e)}function UG(e){return{name:"arrow",options:e,fn(n){const t=R_(Dr(e.element));return t==null?{}:PG({element:t,padding:e.padding}).fn(n)}}}function LM(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function UM(e,n){const t=LM(e);return Math.round(n*t)/t}function BG(e,n,t){t===void 0&&(t={});const i=t.whileElementsMounted,o=h.computed(()=>{var R;return(R=Dr(t.open))!=null?R:!0}),r=h.computed(()=>Dr(t.middleware)),s=h.computed(()=>{var R;return(R=Dr(t.placement))!=null?R:"bottom"}),u=h.computed(()=>{var R;return(R=Dr(t.strategy))!=null?R:"absolute"}),l=h.computed(()=>{var R;return(R=Dr(t.transform))!=null?R:!0}),d=h.computed(()=>R_(e.value)),c=h.computed(()=>R_(n.value)),_=h.ref(0),f=h.ref(0),p=h.ref(u.value),a=h.ref(s.value),v=h.shallowRef({}),m=h.ref(!1),g=h.computed(()=>{const R={position:p.value,left:"0",top:"0"};if(!c.value)return R;const O=UM(c.value,_.value),B=UM(c.value,f.value);return l.value?{...R,transform:"translate("+O+"px, "+B+"px)",...LM(c.value)>=1.5&&{willChange:"transform"}}:{position:p.value,left:O+"px",top:B+"px"}});let E;function y(){if(d.value==null||c.value==null)return;const R=o.value;kG(d.value,c.value,{middleware:r.value,placement:s.value,strategy:u.value}).then(O=>{_.value=O.x,f.value=O.y,p.value=O.strategy,a.value=O.placement,v.value=O.middlewareData,m.value=R!==!1})}function S(){typeof E=="function"&&(E(),E=void 0)}function C(){if(S(),i===void 0){y();return}if(d.value!=null&&c.value!=null){E=i(d.value,c.value,y);return}}function T(){o.value||(m.value=!1)}return h.watch([r,s,u,o],y,{flush:"sync"}),h.watch([d,c],C,{flush:"sync"}),h.watch(o,T,{flush:"sync"}),h.getCurrentScope()&&h.onScopeDispose(S),{x:h.shallowReadonly(_),y:h.shallowReadonly(f),strategy:h.shallowReadonly(p),placement:h.shallowReadonly(a),middlewareData:h.shallowReadonly(v),isPositioned:h.shallowReadonly(m),floatingStyles:g,update:y}}const jG={side:"bottom",sideOffset:0,sideFlip:!0,align:"center",alignOffset:0,alignFlip:!0,arrowPadding:0,avoidCollisions:!0,collisionBoundary:()=>[],collisionPadding:0,sticky:"partial",hideWhenDetached:!1,positionStrategy:"fixed",updatePositionStrategy:"optimized",prioritizePosition:!1},[pW,VG]=Cs("PopperContent");var FG=h.defineComponent({inheritAttrs:!1,__name:"PopperContent",props:h.mergeDefaults({side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},{...jG}),emits:["placed"],setup(e,{emit:n}){const t=e,i=n,o=hM(),{forwardRef:r,currentElement:s}=ci(),u=h.ref(),l=h.ref(),{width:d,height:c}=t8(l),_=h.computed(()=>t.side+(t.align!=="center"?`-${t.align}`:"")),f=h.computed(()=>typeof t.collisionPadding=="number"?t.collisionPadding:{top:0,right:0,bottom:0,left:0,...t.collisionPadding}),p=h.computed(()=>Array.isArray(t.collisionBoundary)?t.collisionBoundary:[t.collisionBoundary]),a=h.computed(()=>({padding:f.value,boundary:p.value.filter(k8),altBoundary:p.value.length>0})),v=h.computed(()=>({mainAxis:t.sideFlip,crossAxis:t.alignFlip})),m=Cq(()=>[NG({mainAxis:t.sideOffset+c.value,alignmentAxis:t.alignOffset}),t.prioritizePosition&&t.avoidCollisions&&kM({...a.value,...v.value}),t.avoidCollisions&&OG({mainAxis:!0,crossAxis:!!t.prioritizePosition,limiter:t.sticky==="partial"?DG():void 0,...a.value}),!t.prioritizePosition&&t.avoidCollisions&&kM({...a.value,...v.value}),wG({...a.value,apply:({elements:M,rects:w,availableWidth:x,availableHeight:k})=>{const{width:V,height:L}=w.reference,D=M.floating.style;D.setProperty("--reka-popper-available-width",`${x}px`),D.setProperty("--reka-popper-available-height",`${k}px`),D.setProperty("--reka-popper-anchor-width",`${V}px`),D.setProperty("--reka-popper-anchor-height",`${L}px`)}}),l.value&&UG({element:l.value,padding:t.arrowPadding}),L8({arrowWidth:d.value,arrowHeight:c.value}),t.hideWhenDetached&&xG({strategy:"referenceHidden",...a.value})]),g=h.computed(()=>t.reference??o.anchor.value),{floatingStyles:E,placement:y,isPositioned:S,middlewareData:C,update:T}=BG(g,u,{strategy:t.positionStrategy,placement:_,whileElementsMounted:(...M)=>MG(...M,{layoutShift:!t.disableUpdateOnLayoutShift,animationFrame:t.updatePositionStrategy==="always"}),middleware:m}),R=h.computed(()=>a_(y.value)[0]),O=h.computed(()=>a_(y.value)[1]);h.watchPostEffect(()=>{S.value&&i("placed")});const B=h.computed(()=>{var M;return((M=C.value.arrow)==null?void 0:M.centerOffset)!==0}),j=h.ref("");h.watchEffect(()=>{s.value&&(j.value=window.getComputedStyle(s.value).zIndex)});const I=h.computed(()=>{var M;return((M=C.value.arrow)==null?void 0:M.x)??0}),A=h.computed(()=>{var M;return((M=C.value.arrow)==null?void 0:M.y)??0});return VG({placedSide:R,onArrowChange:M=>l.value=M,arrowX:I,arrowY:A,shouldHideArrow:B}),(M,w)=>{var x,k,V;return h.openBlock(),h.createElementBlock("div",{ref_key:"floatingRef",ref:u,"data-reka-popper-content-wrapper":"",style:h.normalizeStyle({...h.unref(E),transform:h.unref(S)?h.unref(E).transform:"translate(0, -200%)",minWidth:"max-content",zIndex:j.value,"--reka-popper-transform-origin":[(x=h.unref(C).transformOrigin)==null?void 0:x.x,(k=h.unref(C).transformOrigin)==null?void 0:k.y].join(" "),...((V=h.unref(C).hide)==null?void 0:V.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}})},[h.createVNode(h.unref(Ci),h.mergeProps({ref:h.unref(r)},M.$attrs,{"as-child":t.asChild,as:M.as,"data-side":R.value,"data-align":O.value,style:{animation:h.unref(S)?void 0:"none"}}),{default:h.withCtx(()=>[h.renderSlot(M.$slots,"default")]),_:3},16,["as-child","as","data-side","data-align","style"])],4)}}}),qG=FG;const[Os,GG]=Cs("PopoverRoot");var HG=h.defineComponent({__name:"PopoverRoot",props:{defaultOpen:{type:Boolean,required:!1,default:!1},open:{type:Boolean,required:!1,default:void 0},modal:{type:Boolean,required:!1,default:!1}},emits:["update:open"],setup(e,{emit:n}){const t=e,i=n,{modal:o}=h.toRefs(t),r=rM(t,"open",i,{defaultValue:t.defaultOpen,passive:t.open===void 0}),s=h.ref(),u=h.ref(!1);return GG({contentId:"",triggerId:"",modal:o,open:r,onOpenChange:l=>{r.value=l},onOpenToggle:()=>{r.value=!r.value},triggerElement:s,hasCustomAnchor:u}),(l,d)=>(h.openBlock(),h.createBlock(h.unref(x8),null,{default:h.withCtx(()=>[h.renderSlot(l.$slots,"default",{open:h.unref(r),close:()=>r.value=!1})]),_:3}))}}),zG=HG,YG=h.defineComponent({__name:"PopoverContentImpl",props:{trapFocus:{type:Boolean,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(e,{emit:n}){const t=e,i=n,o=uM(Oq(t,"trapFocus","disableOutsidePointerEvents")),{forwardRef:r}=ci(),s=Os();return Wq(),(u,l)=>(h.openBlock(),h.createBlock(h.unref(R8),{"as-child":"",loop:"",trapped:u.trapFocus,onMountAutoFocus:l[5]||(l[5]=d=>i("openAutoFocus",d)),onUnmountAutoFocus:l[6]||(l[6]=d=>i("closeAutoFocus",d))},{default:h.withCtx(()=>[h.createVNode(h.unref(y8),{"as-child":"","disable-outside-pointer-events":u.disableOutsidePointerEvents,onPointerDownOutside:l[0]||(l[0]=d=>i("pointerDownOutside",d)),onInteractOutside:l[1]||(l[1]=d=>i("interactOutside",d)),onEscapeKeyDown:l[2]||(l[2]=d=>i("escapeKeyDown",d)),onFocusOutside:l[3]||(l[3]=d=>i("focusOutside",d)),onDismiss:l[4]||(l[4]=d=>h.unref(s).onOpenChange(!1))},{default:h.withCtx(()=>[h.createVNode(h.unref(qG),h.mergeProps(h.unref(o),{id:h.unref(s).contentId,ref:h.unref(r),"data-state":h.unref(s).open.value?"open":"closed","aria-labelledby":h.unref(s).triggerId,style:{"--reka-popover-content-transform-origin":"var(--reka-popper-transform-origin)","--reka-popover-content-available-width":"var(--reka-popper-available-width)","--reka-popover-content-available-height":"var(--reka-popper-available-height)","--reka-popover-trigger-width":"var(--reka-popper-anchor-width)","--reka-popover-trigger-height":"var(--reka-popper-anchor-height)"},role:"dialog"}),{default:h.withCtx(()=>[h.renderSlot(u.$slots,"default")]),_:3},16,["id","data-state","aria-labelledby"])]),_:3},8,["disable-outside-pointer-events"])]),_:3},8,["trapped"]))}}),BM=YG,KG=h.defineComponent({__name:"PopoverContentModal",props:{side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(e,{emit:n}){const t=e,i=n,o=Os(),r=h.ref(!1);zq(!0);const s=Nr(t,i),{forwardRef:u,currentElement:l}=ci();return Zq(l),(d,c)=>(h.openBlock(),h.createBlock(BM,h.mergeProps(h.unref(s),{ref:h.unref(u),"trap-focus":h.unref(o).open.value,"disable-outside-pointer-events":"",onCloseAutoFocus:c[0]||(c[0]=h.withModifiers(_=>{var f;i("closeAutoFocus",_),r.value||(f=h.unref(o).triggerElement.value)==null||f.focus()},["prevent"])),onPointerDownOutside:c[1]||(c[1]=_=>{i("pointerDownOutside",_);const f=_.detail.originalEvent,p=f.button===0&&f.ctrlKey===!0,a=f.button===2||p;r.value=a}),onFocusOutside:c[2]||(c[2]=h.withModifiers(()=>{},["prevent"]))}),{default:h.withCtx(()=>[h.renderSlot(d.$slots,"default")]),_:3},16,["trap-focus"]))}}),WG=KG,$G=h.defineComponent({__name:"PopoverContentNonModal",props:{side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(e,{emit:n}){const t=e,i=n,o=Os(),r=h.ref(!1),s=h.ref(!1),u=Nr(t,i);return(l,d)=>(h.openBlock(),h.createBlock(BM,h.mergeProps(h.unref(u),{"trap-focus":!1,"disable-outside-pointer-events":!1,onCloseAutoFocus:d[0]||(d[0]=c=>{var _;i("closeAutoFocus",c),c.defaultPrevented||(r.value||(_=h.unref(o).triggerElement.value)==null||_.focus(),c.preventDefault()),r.value=!1,s.value=!1}),onInteractOutside:d[1]||(d[1]=async c=>{var p;i("interactOutside",c),c.defaultPrevented||(r.value=!0,c.detail.originalEvent.type==="pointerdown"&&(s.value=!0));const _=c.target;((p=h.unref(o).triggerElement.value)==null?void 0:p.contains(_))&&c.preventDefault(),c.detail.originalEvent.type==="focusin"&&s.value&&c.preventDefault()})}),{default:h.withCtx(()=>[h.renderSlot(l.$slots,"default")]),_:3},16))}}),QG=$G,JG=h.defineComponent({__name:"PopoverContent",props:{forceMount:{type:Boolean,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(e,{emit:n}){const t=e,i=n,o=Os(),r=Nr(t,i),{forwardRef:s}=ci();return o.contentId||(o.contentId=__(void 0,"reka-popover-content")),(u,l)=>(h.openBlock(),h.createBlock(h.unref(cM),{present:u.forceMount||h.unref(o).open.value},{default:h.withCtx(()=>[h.unref(o).modal.value?(h.openBlock(),h.createBlock(WG,h.mergeProps({key:0},h.unref(r),{ref:h.unref(s)}),{default:h.withCtx(()=>[h.renderSlot(u.$slots,"default")]),_:3},16)):(h.openBlock(),h.createBlock(QG,h.mergeProps({key:1},h.unref(r),{ref:h.unref(s)}),{default:h.withCtx(()=>[h.renderSlot(u.$slots,"default")]),_:3},16))]),_:3},8,["present"]))}}),XG=JG,ZG=h.defineComponent({__name:"PopoverPortal",props:{to:{type:null,required:!1},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(e){const n=e;return(t,i)=>(h.openBlock(),h.createBlock(h.unref(N8),h.normalizeProps(h.guardReactiveProps(n)),{default:h.withCtx(()=>[h.renderSlot(t.$slots,"default")]),_:3},16))}}),e7=ZG,t7=h.defineComponent({__name:"PopoverTrigger",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(e){const n=e,t=Os(),{forwardRef:i,currentElement:o}=ci();return t.triggerId||(t.triggerId=__(void 0,"reka-popover-trigger")),h.onMounted(()=>{t.triggerElement.value=o.value}),(r,s)=>(h.openBlock(),h.createBlock(h.resolveDynamicComponent(h.unref(t).hasCustomAnchor.value?h.unref(Ci):h.unref(D8)),{"as-child":""},{default:h.withCtx(()=>[h.createVNode(h.unref(Ci),{id:h.unref(t).triggerId,ref:h.unref(i),type:r.as==="button"?"button":void 0,"aria-haspopup":"dialog","aria-expanded":h.unref(t).open.value,"aria-controls":h.unref(t).contentId,"data-state":h.unref(t).open.value?"open":"closed",as:r.as,"as-child":n.asChild,onClick:h.unref(t).onOpenToggle},{default:h.withCtx(()=>[h.renderSlot(r.$slots,"default")]),_:3},8,["id","type","aria-expanded","aria-controls","data-state","as","as-child","onClick"])]),_:3}))}}),n7=t7;const i7=h.defineComponent({__name:"Popover",props:{defaultOpen:{type:Boolean},open:{type:Boolean},modal:{type:Boolean}},emits:["update:open"],setup(e,{emit:n}){const o=Nr(e,n);return(r,s)=>(h.openBlock(),h.createBlock(h.unref(zG),h.normalizeProps(h.guardReactiveProps(h.unref(o))),{default:h.withCtx(()=>[h.renderSlot(r.$slots,"default")]),_:3},16))}});function o7(e){if(!h.isRef(e))return h.reactive(e);const n=new Proxy({},{get(t,i,o){return h.unref(Reflect.get(e.value,i,o))},set(t,i,o){return h.isRef(e.value[i])&&!h.isRef(o)?e.value[i].value=o:e.value[i]=o,!0},deleteProperty(t,i){return Reflect.deleteProperty(e.value,i)},has(t,i){return Reflect.has(e.value,i)},ownKeys(){return Object.keys(e.value)},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}}});return h.reactive(n)}function r7(e){return o7(h.computed(e))}function s7(e,...n){const t=n.flat(),i=t[0];return r7(()=>Object.fromEntries(typeof i=="function"?Object.entries(h.toRefs(e)).filter(([o,r])=>!i(h.toValue(r),o)):Object.entries(h.toRefs(e)).filter(o=>!t.includes(o[0]))))}typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;function jM(e){var n,t,i="";if(typeof e=="string"||typeof e=="number")i+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(n=0;n<o;n++)e[n]&&(t=jM(e[n]))&&(i&&(i+=" "),i+=t)}else for(t in e)e[t]&&(i&&(i+=" "),i+=t);return i}function VM(){for(var e,n,t=0,i="",o=arguments.length;t<o;t++)(e=arguments[t])&&(n=jM(e))&&(i&&(i+=" "),i+=n);return i}const M_="-",l7=e=>{const n=d7(e),{conflictingClassGroups:t,conflictingClassGroupModifiers:i}=e;return{getClassGroupId:s=>{const u=s.split(M_);return u[0]===""&&u.length!==1&&u.shift(),FM(u,n)||u7(s)},getConflictingClassGroupIds:(s,u)=>{const l=t[s]||[];return u&&i[s]?[...l,...i[s]]:l}}},FM=(e,n)=>{var s;if(e.length===0)return n.classGroupId;const t=e[0],i=n.nextPart.get(t),o=i?FM(e.slice(1),i):void 0;if(o)return o;if(n.validators.length===0)return;const r=e.join(M_);return(s=n.validators.find(({validator:u})=>u(r)))==null?void 0:s.classGroupId},qM=/^\[(.+)\]$/,u7=e=>{if(qM.test(e)){const n=qM.exec(e)[1],t=n==null?void 0:n.substring(0,n.indexOf(":"));if(t)return"arbitrary.."+t}},d7=e=>{const{theme:n,classGroups:t}=e,i={nextPart:new Map,validators:[]};for(const o in t)N_(t[o],i,o,n);return i},N_=(e,n,t,i)=>{e.forEach(o=>{if(typeof o=="string"){const r=o===""?n:GM(n,o);r.classGroupId=t;return}if(typeof o=="function"){if(c7(o)){N_(o(i),n,t,i);return}n.validators.push({validator:o,classGroupId:t});return}Object.entries(o).forEach(([r,s])=>{N_(s,GM(n,r),t,i)})})},GM=(e,n)=>{let t=e;return n.split(M_).forEach(i=>{t.nextPart.has(i)||t.nextPart.set(i,{nextPart:new Map,validators:[]}),t=t.nextPart.get(i)}),t},c7=e=>e.isThemeGetter,_7=e=>{if(e<1)return{get:()=>{},set:()=>{}};let n=0,t=new Map,i=new Map;const o=(r,s)=>{t.set(r,s),n++,n>e&&(n=0,i=t,t=new Map)};return{get(r){let s=t.get(r);if(s!==void 0)return s;if((s=i.get(r))!==void 0)return o(r,s),s},set(r,s){t.has(r)?t.set(r,s):o(r,s)}}},O_="!",w_=":",f7=w_.length,p7=e=>{const{prefix:n,experimentalParseClassName:t}=e;let i=o=>{const r=[];let s=0,u=0,l=0,d;for(let a=0;a<o.length;a++){let v=o[a];if(s===0&&u===0){if(v===w_){r.push(o.slice(l,a)),l=a+f7;continue}if(v==="/"){d=a;continue}}v==="["?s++:v==="]"?s--:v==="("?u++:v===")"&&u--}const c=r.length===0?o:o.substring(l),_=a7(c),f=_!==c,p=d&&d>l?d-l:void 0;return{modifiers:r,hasImportantModifier:f,baseClassName:_,maybePostfixModifierPosition:p}};if(n){const o=n+w_,r=i;i=s=>s.startsWith(o)?r(s.substring(o.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:s,maybePostfixModifierPosition:void 0}}if(t){const o=i;i=r=>t({className:r,parseClassName:o})}return i},a7=e=>e.endsWith(O_)?e.substring(0,e.length-1):e.startsWith(O_)?e.substring(1):e,v7=e=>{const n=Object.fromEntries(e.orderSensitiveModifiers.map(i=>[i,!0]));return i=>{if(i.length<=1)return i;const o=[];let r=[];return i.forEach(s=>{s[0]==="["||n[s]?(o.push(...r.sort(),s),r=[]):r.push(s)}),o.push(...r.sort()),o}},m7=e=>({cache:_7(e.cacheSize),parseClassName:p7(e),sortModifiers:v7(e),...l7(e)}),h7=/\s+/,y7=(e,n)=>{const{parseClassName:t,getClassGroupId:i,getConflictingClassGroupIds:o,sortModifiers:r}=n,s=[],u=e.trim().split(h7);let l="";for(let d=u.length-1;d>=0;d-=1){const c=u[d],{isExternal:_,modifiers:f,hasImportantModifier:p,baseClassName:a,maybePostfixModifierPosition:v}=t(c);if(_){l=c+(l.length>0?" "+l:l);continue}let m=!!v,g=i(m?a.substring(0,v):a);if(!g){if(!m){l=c+(l.length>0?" "+l:l);continue}if(g=i(a),!g){l=c+(l.length>0?" "+l:l);continue}m=!1}const E=r(f).join(":"),y=p?E+O_:E,S=y+g;if(s.includes(S))continue;s.push(S);const C=o(g,m);for(let T=0;T<C.length;++T){const R=C[T];s.push(y+R)}l=c+(l.length>0?" "+l:l)}return l};function g7(){let e=0,n,t,i="";for(;e<arguments.length;)(n=arguments[e++])&&(t=HM(n))&&(i&&(i+=" "),i+=t);return i}const HM=e=>{if(typeof e=="string")return e;let n,t="";for(let i=0;i<e.length;i++)e[i]&&(n=HM(e[i]))&&(t&&(t+=" "),t+=n);return t};function E7(e,...n){let t,i,o,r=s;function s(l){const d=n.reduce((c,_)=>_(c),e());return t=m7(d),i=t.cache.get,o=t.cache.set,r=u,u(l)}function u(l){const d=i(l);if(d)return d;const c=y7(l,t);return o(l,c),c}return function(){return r(g7.apply(null,arguments))}}const Jt=e=>{const n=t=>t[e]||[];return n.isThemeGetter=!0,n},zM=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,YM=/^\((?:(\w[\w-]*):)?(.+)\)$/i,T7=/^\d+\/\d+$/,S7=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,b7=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,I7=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,C7=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,A7=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,kr=e=>T7.test(e),Ze=e=>!!e&&!Number.isNaN(Number(e)),oo=e=>!!e&&Number.isInteger(Number(e)),x_=e=>e.endsWith("%")&&Ze(e.slice(0,-1)),Vi=e=>S7.test(e),R7=()=>!0,M7=e=>b7.test(e)&&!I7.test(e),KM=()=>!1,N7=e=>C7.test(e),O7=e=>A7.test(e),w7=e=>!Oe(e)&&!we(e),x7=e=>Lr(e,XM,KM),Oe=e=>zM.test(e),Mo=e=>Lr(e,ZM,M7),P_=e=>Lr(e,U7,Ze),WM=e=>Lr(e,QM,KM),P7=e=>Lr(e,JM,O7),fu=e=>Lr(e,eN,N7),we=e=>YM.test(e),ws=e=>Ur(e,ZM),D7=e=>Ur(e,B7),$M=e=>Ur(e,QM),k7=e=>Ur(e,XM),L7=e=>Ur(e,JM),pu=e=>Ur(e,eN,!0),Lr=(e,n,t)=>{const i=zM.exec(e);return i?i[1]?n(i[1]):t(i[2]):!1},Ur=(e,n,t=!1)=>{const i=YM.exec(e);return i?i[1]?n(i[1]):t:!1},QM=e=>e==="position"||e==="percentage",JM=e=>e==="image"||e==="url",XM=e=>e==="length"||e==="size"||e==="bg-size",ZM=e=>e==="length",U7=e=>e==="number",B7=e=>e==="family-name",eN=e=>e==="shadow",j7=E7(()=>{const e=Jt("color"),n=Jt("font"),t=Jt("text"),i=Jt("font-weight"),o=Jt("tracking"),r=Jt("leading"),s=Jt("breakpoint"),u=Jt("container"),l=Jt("spacing"),d=Jt("radius"),c=Jt("shadow"),_=Jt("inset-shadow"),f=Jt("text-shadow"),p=Jt("drop-shadow"),a=Jt("blur"),v=Jt("perspective"),m=Jt("aspect"),g=Jt("ease"),E=Jt("animate"),y=()=>["auto","avoid","all","avoid-page","page","left","right","column"],S=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],C=()=>[...S(),we,Oe],T=()=>["auto","hidden","clip","visible","scroll"],R=()=>["auto","contain","none"],O=()=>[we,Oe,l],B=()=>[kr,"full","auto",...O()],j=()=>[oo,"none","subgrid",we,Oe],I=()=>["auto",{span:["full",oo,we,Oe]},oo,we,Oe],A=()=>[oo,"auto",we,Oe],M=()=>["auto","min","max","fr",we,Oe],w=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],x=()=>["start","end","center","stretch","center-safe","end-safe"],k=()=>["auto",...O()],V=()=>[kr,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...O()],L=()=>[e,we,Oe],D=()=>[...S(),$M,WM,{position:[we,Oe]}],F=()=>["no-repeat",{repeat:["","x","y","space","round"]}],G=()=>["auto","cover","contain",k7,x7,{size:[we,Oe]}],q=()=>[x_,ws,Mo],Y=()=>["","none","full",d,we,Oe],K=()=>["",Ze,ws,Mo],W=()=>["solid","dashed","dotted","double"],X=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],J=()=>[Ze,x_,$M,WM],Z=()=>["","none",a,we,Oe],b=()=>["none",Ze,we,Oe],N=()=>["none",Ze,we,Oe],U=()=>[Ze,we,Oe],z=()=>[kr,"full",...O()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Vi],breakpoint:[Vi],color:[R7],container:[Vi],"drop-shadow":[Vi],ease:["in","out","in-out"],font:[w7],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Vi],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Vi],shadow:[Vi],spacing:["px",Ze],text:[Vi],"text-shadow":[Vi],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",kr,Oe,we,m]}],container:["container"],columns:[{columns:[Ze,Oe,we,u]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:C()}],overflow:[{overflow:T()}],"overflow-x":[{"overflow-x":T()}],"overflow-y":[{"overflow-y":T()}],overscroll:[{overscroll:R()}],"overscroll-x":[{"overscroll-x":R()}],"overscroll-y":[{"overscroll-y":R()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:B()}],"inset-x":[{"inset-x":B()}],"inset-y":[{"inset-y":B()}],start:[{start:B()}],end:[{end:B()}],top:[{top:B()}],right:[{right:B()}],bottom:[{bottom:B()}],left:[{left:B()}],visibility:["visible","invisible","collapse"],z:[{z:[oo,"auto",we,Oe]}],basis:[{basis:[kr,"full","auto",u,...O()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Ze,kr,"auto","initial","none",Oe]}],grow:[{grow:["",Ze,we,Oe]}],shrink:[{shrink:["",Ze,we,Oe]}],order:[{order:[oo,"first","last","none",we,Oe]}],"grid-cols":[{"grid-cols":j()}],"col-start-end":[{col:I()}],"col-start":[{"col-start":A()}],"col-end":[{"col-end":A()}],"grid-rows":[{"grid-rows":j()}],"row-start-end":[{row:I()}],"row-start":[{"row-start":A()}],"row-end":[{"row-end":A()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":M()}],"auto-rows":[{"auto-rows":M()}],gap:[{gap:O()}],"gap-x":[{"gap-x":O()}],"gap-y":[{"gap-y":O()}],"justify-content":[{justify:[...w(),"normal"]}],"justify-items":[{"justify-items":[...x(),"normal"]}],"justify-self":[{"justify-self":["auto",...x()]}],"align-content":[{content:["normal",...w()]}],"align-items":[{items:[...x(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...x(),{baseline:["","last"]}]}],"place-content":[{"place-content":w()}],"place-items":[{"place-items":[...x(),"baseline"]}],"place-self":[{"place-self":["auto",...x()]}],p:[{p:O()}],px:[{px:O()}],py:[{py:O()}],ps:[{ps:O()}],pe:[{pe:O()}],pt:[{pt:O()}],pr:[{pr:O()}],pb:[{pb:O()}],pl:[{pl:O()}],m:[{m:k()}],mx:[{mx:k()}],my:[{my:k()}],ms:[{ms:k()}],me:[{me:k()}],mt:[{mt:k()}],mr:[{mr:k()}],mb:[{mb:k()}],ml:[{ml:k()}],"space-x":[{"space-x":O()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":O()}],"space-y-reverse":["space-y-reverse"],size:[{size:V()}],w:[{w:[u,"screen",...V()]}],"min-w":[{"min-w":[u,"screen","none",...V()]}],"max-w":[{"max-w":[u,"screen","none","prose",{screen:[s]},...V()]}],h:[{h:["screen","lh",...V()]}],"min-h":[{"min-h":["screen","lh","none",...V()]}],"max-h":[{"max-h":["screen","lh",...V()]}],"font-size":[{text:["base",t,ws,Mo]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[i,we,P_]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",x_,Oe]}],"font-family":[{font:[D7,Oe,n]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,we,Oe]}],"line-clamp":[{"line-clamp":[Ze,"none",we,P_]}],leading:[{leading:[r,...O()]}],"list-image":[{"list-image":["none",we,Oe]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",we,Oe]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:L()}],"text-color":[{text:L()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...W(),"wavy"]}],"text-decoration-thickness":[{decoration:[Ze,"from-font","auto",we,Mo]}],"text-decoration-color":[{decoration:L()}],"underline-offset":[{"underline-offset":[Ze,"auto",we,Oe]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:O()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",we,Oe]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",we,Oe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:D()}],"bg-repeat":[{bg:F()}],"bg-size":[{bg:G()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},oo,we,Oe],radial:["",we,Oe],conic:[oo,we,Oe]},L7,P7]}],"bg-color":[{bg:L()}],"gradient-from-pos":[{from:q()}],"gradient-via-pos":[{via:q()}],"gradient-to-pos":[{to:q()}],"gradient-from":[{from:L()}],"gradient-via":[{via:L()}],"gradient-to":[{to:L()}],rounded:[{rounded:Y()}],"rounded-s":[{"rounded-s":Y()}],"rounded-e":[{"rounded-e":Y()}],"rounded-t":[{"rounded-t":Y()}],"rounded-r":[{"rounded-r":Y()}],"rounded-b":[{"rounded-b":Y()}],"rounded-l":[{"rounded-l":Y()}],"rounded-ss":[{"rounded-ss":Y()}],"rounded-se":[{"rounded-se":Y()}],"rounded-ee":[{"rounded-ee":Y()}],"rounded-es":[{"rounded-es":Y()}],"rounded-tl":[{"rounded-tl":Y()}],"rounded-tr":[{"rounded-tr":Y()}],"rounded-br":[{"rounded-br":Y()}],"rounded-bl":[{"rounded-bl":Y()}],"border-w":[{border:K()}],"border-w-x":[{"border-x":K()}],"border-w-y":[{"border-y":K()}],"border-w-s":[{"border-s":K()}],"border-w-e":[{"border-e":K()}],"border-w-t":[{"border-t":K()}],"border-w-r":[{"border-r":K()}],"border-w-b":[{"border-b":K()}],"border-w-l":[{"border-l":K()}],"divide-x":[{"divide-x":K()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":K()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...W(),"hidden","none"]}],"divide-style":[{divide:[...W(),"hidden","none"]}],"border-color":[{border:L()}],"border-color-x":[{"border-x":L()}],"border-color-y":[{"border-y":L()}],"border-color-s":[{"border-s":L()}],"border-color-e":[{"border-e":L()}],"border-color-t":[{"border-t":L()}],"border-color-r":[{"border-r":L()}],"border-color-b":[{"border-b":L()}],"border-color-l":[{"border-l":L()}],"divide-color":[{divide:L()}],"outline-style":[{outline:[...W(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Ze,we,Oe]}],"outline-w":[{outline:["",Ze,ws,Mo]}],"outline-color":[{outline:L()}],shadow:[{shadow:["","none",c,pu,fu]}],"shadow-color":[{shadow:L()}],"inset-shadow":[{"inset-shadow":["none",_,pu,fu]}],"inset-shadow-color":[{"inset-shadow":L()}],"ring-w":[{ring:K()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:L()}],"ring-offset-w":[{"ring-offset":[Ze,Mo]}],"ring-offset-color":[{"ring-offset":L()}],"inset-ring-w":[{"inset-ring":K()}],"inset-ring-color":[{"inset-ring":L()}],"text-shadow":[{"text-shadow":["none",f,pu,fu]}],"text-shadow-color":[{"text-shadow":L()}],opacity:[{opacity:[Ze,we,Oe]}],"mix-blend":[{"mix-blend":[...X(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":X()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Ze]}],"mask-image-linear-from-pos":[{"mask-linear-from":J()}],"mask-image-linear-to-pos":[{"mask-linear-to":J()}],"mask-image-linear-from-color":[{"mask-linear-from":L()}],"mask-image-linear-to-color":[{"mask-linear-to":L()}],"mask-image-t-from-pos":[{"mask-t-from":J()}],"mask-image-t-to-pos":[{"mask-t-to":J()}],"mask-image-t-from-color":[{"mask-t-from":L()}],"mask-image-t-to-color":[{"mask-t-to":L()}],"mask-image-r-from-pos":[{"mask-r-from":J()}],"mask-image-r-to-pos":[{"mask-r-to":J()}],"mask-image-r-from-color":[{"mask-r-from":L()}],"mask-image-r-to-color":[{"mask-r-to":L()}],"mask-image-b-from-pos":[{"mask-b-from":J()}],"mask-image-b-to-pos":[{"mask-b-to":J()}],"mask-image-b-from-color":[{"mask-b-from":L()}],"mask-image-b-to-color":[{"mask-b-to":L()}],"mask-image-l-from-pos":[{"mask-l-from":J()}],"mask-image-l-to-pos":[{"mask-l-to":J()}],"mask-image-l-from-color":[{"mask-l-from":L()}],"mask-image-l-to-color":[{"mask-l-to":L()}],"mask-image-x-from-pos":[{"mask-x-from":J()}],"mask-image-x-to-pos":[{"mask-x-to":J()}],"mask-image-x-from-color":[{"mask-x-from":L()}],"mask-image-x-to-color":[{"mask-x-to":L()}],"mask-image-y-from-pos":[{"mask-y-from":J()}],"mask-image-y-to-pos":[{"mask-y-to":J()}],"mask-image-y-from-color":[{"mask-y-from":L()}],"mask-image-y-to-color":[{"mask-y-to":L()}],"mask-image-radial":[{"mask-radial":[we,Oe]}],"mask-image-radial-from-pos":[{"mask-radial-from":J()}],"mask-image-radial-to-pos":[{"mask-radial-to":J()}],"mask-image-radial-from-color":[{"mask-radial-from":L()}],"mask-image-radial-to-color":[{"mask-radial-to":L()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":S()}],"mask-image-conic-pos":[{"mask-conic":[Ze]}],"mask-image-conic-from-pos":[{"mask-conic-from":J()}],"mask-image-conic-to-pos":[{"mask-conic-to":J()}],"mask-image-conic-from-color":[{"mask-conic-from":L()}],"mask-image-conic-to-color":[{"mask-conic-to":L()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:D()}],"mask-repeat":[{mask:F()}],"mask-size":[{mask:G()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",we,Oe]}],filter:[{filter:["","none",we,Oe]}],blur:[{blur:Z()}],brightness:[{brightness:[Ze,we,Oe]}],contrast:[{contrast:[Ze,we,Oe]}],"drop-shadow":[{"drop-shadow":["","none",p,pu,fu]}],"drop-shadow-color":[{"drop-shadow":L()}],grayscale:[{grayscale:["",Ze,we,Oe]}],"hue-rotate":[{"hue-rotate":[Ze,we,Oe]}],invert:[{invert:["",Ze,we,Oe]}],saturate:[{saturate:[Ze,we,Oe]}],sepia:[{sepia:["",Ze,we,Oe]}],"backdrop-filter":[{"backdrop-filter":["","none",we,Oe]}],"backdrop-blur":[{"backdrop-blur":Z()}],"backdrop-brightness":[{"backdrop-brightness":[Ze,we,Oe]}],"backdrop-contrast":[{"backdrop-contrast":[Ze,we,Oe]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Ze,we,Oe]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ze,we,Oe]}],"backdrop-invert":[{"backdrop-invert":["",Ze,we,Oe]}],"backdrop-opacity":[{"backdrop-opacity":[Ze,we,Oe]}],"backdrop-saturate":[{"backdrop-saturate":[Ze,we,Oe]}],"backdrop-sepia":[{"backdrop-sepia":["",Ze,we,Oe]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":O()}],"border-spacing-x":[{"border-spacing-x":O()}],"border-spacing-y":[{"border-spacing-y":O()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",we,Oe]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Ze,"initial",we,Oe]}],ease:[{ease:["linear","initial",g,we,Oe]}],delay:[{delay:[Ze,we,Oe]}],animate:[{animate:["none",E,we,Oe]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[v,we,Oe]}],"perspective-origin":[{"perspective-origin":C()}],rotate:[{rotate:b()}],"rotate-x":[{"rotate-x":b()}],"rotate-y":[{"rotate-y":b()}],"rotate-z":[{"rotate-z":b()}],scale:[{scale:N()}],"scale-x":[{"scale-x":N()}],"scale-y":[{"scale-y":N()}],"scale-z":[{"scale-z":N()}],"scale-3d":["scale-3d"],skew:[{skew:U()}],"skew-x":[{"skew-x":U()}],"skew-y":[{"skew-y":U()}],transform:[{transform:[we,Oe,"","none","gpu","cpu"]}],"transform-origin":[{origin:C()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:z()}],"translate-x":[{"translate-x":z()}],"translate-y":[{"translate-y":z()}],"translate-z":[{"translate-z":z()}],"translate-none":["translate-none"],accent:[{accent:L()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:L()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",we,Oe]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":O()}],"scroll-mx":[{"scroll-mx":O()}],"scroll-my":[{"scroll-my":O()}],"scroll-ms":[{"scroll-ms":O()}],"scroll-me":[{"scroll-me":O()}],"scroll-mt":[{"scroll-mt":O()}],"scroll-mr":[{"scroll-mr":O()}],"scroll-mb":[{"scroll-mb":O()}],"scroll-ml":[{"scroll-ml":O()}],"scroll-p":[{"scroll-p":O()}],"scroll-px":[{"scroll-px":O()}],"scroll-py":[{"scroll-py":O()}],"scroll-ps":[{"scroll-ps":O()}],"scroll-pe":[{"scroll-pe":O()}],"scroll-pt":[{"scroll-pt":O()}],"scroll-pr":[{"scroll-pr":O()}],"scroll-pb":[{"scroll-pb":O()}],"scroll-pl":[{"scroll-pl":O()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",we,Oe]}],fill:[{fill:["none",...L()]}],"stroke-w":[{stroke:[Ze,ws,Mo,P_]}],stroke:[{stroke:["none",...L()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}});function tN(...e){return j7(VM(e))}const V7=h.defineComponent({inheritAttrs:!1,__name:"PopoverContent",props:{forceMount:{type:Boolean},side:{},sideOffset:{},sideFlip:{type:Boolean},align:{},alignOffset:{},alignFlip:{type:Boolean},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},positionStrategy:{},updatePositionStrategy:{},disableUpdateOnLayoutShift:{type:Boolean},prioritizePosition:{type:Boolean},reference:{},asChild:{type:Boolean},as:{},disableOutsidePointerEvents:{type:Boolean},class:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(e,{emit:n}){const t=e,i=n,o=s7(t,"class"),r=Nr(o,i);return(s,u)=>(h.openBlock(),h.createBlock(h.unref(e7),null,{default:h.withCtx(()=>[h.createVNode(h.unref(XG),h.mergeProps({...h.unref(r),...s.$attrs},{class:h.unref(tN)("z-[2000] min-w-72 w-max rounded-md bg-white outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t.class)}),{default:h.withCtx(()=>[h.renderSlot(s.$slots,"default")]),_:3},16,["class"])]),_:3}))}}),F7=h.defineComponent({__name:"PopoverTrigger",props:{asChild:{type:Boolean},as:{}},setup(e){const n=e;return(t,i)=>(h.openBlock(),h.createBlock(h.unref(n7),h.normalizeProps(h.guardReactiveProps(n)),{default:h.withCtx(()=>[h.renderSlot(t.$slots,"default")]),_:3},16))}}),q7=h.defineComponent({__name:"PopoverBase",props:h.mergeModels({side:{},align:{default:"center"},sideOffset:{default:4},delay:{default:100},trigger:{default:"click"},triggerClass:{default:""},disabled:{type:Boolean}},{open:{type:Boolean},openModifiers:{}}),emits:["update:open"],setup(e){const n=e;let t=null;const i=h.useModel(e,"open");function o(l,d){if(!n.disabled){if(t&&(clearTimeout(t),t=null),d===0){r(l);return}t=setTimeout(()=>{r(l),t=null},d)}}const r=l=>{i.value=l};function s(){n.trigger=="hover"&&o(!0,n.delay)}const u=()=>{n.trigger=="hover"&&o(!1,n.delay)};return(l,d)=>(h.openBlock(),h.createBlock(h.unref(i7),{open:i.value,"onUpdate:open":d[0]||(d[0]=c=>i.value=c)},{default:h.withCtx(()=>[h.createVNode(h.unref(F7),{class:h.normalizeClass(n.triggerClass),onMouseenter:s,onMouseleave:u},{default:h.withCtx(()=>[h.renderSlot(l.$slots,"default")]),_:3},8,["class"]),l.disabled?h.createCommentVNode("",!0):(h.openBlock(),h.createBlock(h.unref(V7),{key:0,side:l.side,align:l.align,onMouseenter:s,onMouseleave:u},{default:h.withCtx(()=>[h.renderSlot(l.$slots,"content")]),_:3},8,["side","align"]))]),_:3},8,["open"]))}}),G7={class:"font-semibold"},H7=h.defineComponent({__name:"SwitchBase",props:h.mergeModels({label:{}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:h.mergeModels(["change"],["update:modelValue"]),setup(e,{emit:n}){const t=n,i=h.useModel(e,"modelValue"),o=()=>{const r=!i.value;i.value=r,t("change",r)};return(r,s)=>(h.openBlock(),h.createElementBlock("div",{class:"flex items-center gap-2 cursor-pointer w-max",onClick:s[0]||(s[0]=u=>o())},[h.createElementVNode("div",{class:h.normalizeClass(["w-10 h-5 flex items-center bg-chat-haze-300 rounded-full p-1 cursor-pointer transition",i.value?"bg-chat-primary":"bg-chat-haze-300"])},[h.createElementVNode("div",{class:h.normalizeClass(["bg-white w-4 h-4 rounded-full shadow transform transition",i.value?"translate-x-4":""])},null,2)],2),h.createElementVNode("span",G7,h.toDisplayString(r.label??""),1)]))}}),nN=Et(h.defineComponent({__name:"BaseSpin",props:{size:{default:48},border:{default:5},color:{}},setup(e){const n=e,t=h.computed(()=>{let i={};return i.width=n.size+"px",i.height=n.size+"px",i.borderWidth=n.border+"px",n.color&&(i.borderColor=n.color),i.borderBottomColor="transparent",i});return(i,o)=>(h.openBlock(),h.createElementBlock("span",{class:"loader",style:h.normalizeStyle(t.value)},null,4))}}),[["__scopeId","data-v-8aad0b79"]]),z7={class:"z-10",style:{"box-shadow":"0 2px 6px rgba(0, 0, 0, 0.12)"}},Y7={key:0,class:"flex gap-2 mb-2"},K7={class:"flex gap-2 items-end h-max"},W7={class:"relative grow"},$7={class:"flex gap-2 absolute right-0 bottom-2"},Q7={class:"shrink-0 cursor-pointer relative -translate-y-1"},J7={class:"h-11 w-11 rounded-full flex-center bg-[#002E6B]"},X7=h.defineComponent({__name:"InputChat",props:h.mergeModels({data:{}},{modelValue:{},modelModifiers:{}}),emits:h.mergeModels(["sendMessage","focus"],["update:modelValue"]),setup(e,{expose:n,emit:t}){const i=e,o=t,r=[{value:"0",label:"Go Chat"},{value:"1",label:"Go sms"}];h.computed(()=>{var T;return((T=r.find(R=>R.value===p.value))==null?void 0:T.label)??""});const s=h.useModel(e,"modelValue");let u=1;const l=h.ref(null);h.ref([]);const d=h.ref(!1),c=h.ref(!1),_=h.ref(null),f=h.ref(!1),p=h.ref("0"),a=async T=>{var A,M,w;const R=Date.now();let O="",B=[];if(T=="message"){if(!s.value)return;O=s.value,s.value=""}else if(T=="file"){const x=v();if(!x)return;const k=URL.createObjectURL(x);B=[{file_name:String(R),file_path:k,file_local:x}]}s.value="",u++;const j=((A=i.data)==null?void 0:A.id.toString())+"-"+u,I={conversation_id:135,created_at:Ct().tz(jc).format(Tr.DATE_FORMAT_FULL),id:j,message:O,receiver_id:((M=i.data)==null?void 0:M.id)||0,sender_id:(w=Fe.value)==null?void 0:w.id,status:"read",attachments:B};o("sendMessage",I)},v=()=>!l.value||!l.value.files||l.value.files.length===0?null:l.value.files[0],m=()=>{a("file")},g=T=>{var R,O,B;s.value=(s.value??"")+(((R=T==null?void 0:T.i)==null?void 0:R.replace("undefined",""))??""),f.value=!1,(B=(O=_.value)==null?void 0:O.focus)==null||B.call(O)},E=async T=>{var R;try{c.value=!0,await yV({id:(R=Fe.value)==null?void 0:R.id,is_sms:T?1:0})}catch(O){d.value=!T,console.log(O)}c.value=!1},y=()=>{const T=_.value;T.style.height="auto",T.style.height=T.scrollHeight+"px"},S=()=>{o("focus")};return n({clearInput:()=>{s.value=""}}),(T,R)=>{var O;return h.openBlock(),h.createElementBlock("div",z7,[((O=h.unref(Fe))==null?void 0:O.user_type)=="tenant"?(h.openBlock(),h.createElementBlock("div",Y7,[h.createVNode(H7,{modelValue:d.value,"onUpdate:modelValue":R[0]||(R[0]=B=>d.value=B),label:"Active sms",onChange:E},null,8,["modelValue"]),c.value?(h.openBlock(),h.createBlock(nN,{key:0,size:24,border:3})):h.createCommentVNode("",!0)])):h.createCommentVNode("",!0),h.createElementVNode("div",K7,[h.createElementVNode("div",W7,[h.withDirectives(h.createElementVNode("textarea",{class:"w-full min-h-11 resize-none overflow-hidden chat-input !rounded-xl pl-4 py-2 pr-[96px] border border-chat-haze-200",ref_key:"chatInputRef",ref:_,placeholder:"Send Message",rows:"1",onKeydown:R[1]||(R[1]=h.withKeys(B=>a("message"),["enter"])),onFocus:R[2]||(R[2]=B=>S()),onInput:R[3]||(R[3]=B=>y()),"onUpdate:modelValue":R[4]||(R[4]=B=>s.value=B)},null,544),[[h.vModelText,s.value]]),h.createElementVNode("div",$7,[h.createVNode(q7,{open:f.value,"onUpdate:open":R[6]||(R[6]=B=>f.value=B),align:"end",side:"top"},{content:h.withCtx(()=>[h.createVNode(h.unref(Iq),{class:"!w-[300px]",native:!0,offset:2,"hide-search":"",onSelect:g})]),default:h.withCtx(()=>[h.createElementVNode("button",{onClick:R[5]||(R[5]=h.withModifiers(B=>f.value=!f.value,["stop"])),class:"h-11 w-10"}," 😊 ")]),_:1},8,["open"]),h.createElementVNode("button",{class:"h-11 w-10",onClick:R[7]||(R[7]=B=>a("message"))},[h.createVNode(i9)])])]),h.createElementVNode("label",Q7,[h.createElementVNode("input",{type:"file",class:"hidden",ref_key:"refInputImage",ref:l,accept:".png, .jpeg, .jpg",onChange:m},null,544),h.createElementVNode("div",J7,[h.createVNode(qf,{class:"text-white"})])])])])}}}),wn={Sending:"sending",Sent:"sent",Read:"read",Failed:"failed",Uploading:"uploading",Uploaded:"uploaded"},Z7={},eH={width:"32",height:"32",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function tH(e,n){return h.openBlock(),h.createElementBlock("svg",eH,n[0]||(n[0]=[h.createElementVNode("path",{d:"M3 6.5C3 14.5081 9.49187 21 17.5 21C18.166 21 18.8216 20.9551 19.4637 20.8682C20.3747 20.7448 21 19.9292 21 19.01V16.4415C21 15.5807 20.4491 14.8164 19.6325 14.5442L16.4841 13.4947C15.6836 13.2279 14.8252 13.699 14.6206 14.5177C14.3475 15.6102 12.987 15.987 12.1907 15.1907L8.80926 11.8093C8.01301 11.013 8.38984 9.65254 9.48229 9.37943C10.301 9.17476 10.7721 8.31644 10.5053 7.51586L9.45585 4.36754C9.18362 3.55086 8.41934 3 7.55848 3H4.99004C4.0708 3 3.25518 3.62533 3.13185 4.53627C3.0449 5.17845 3 5.83398 3 6.5Z",stroke:"currentColor","stroke-width":"1.5","stroke-linejoin":"round"},null,-1),h.createElementVNode("path",{d:"M15 3L21 9",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),h.createElementVNode("path",{d:"M21 3L15 9",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]))}const iN=Et(Z7,[["render",tH]]),Ye={CONNECTING:"Connecting...",CALLING:"calling",RINGING:"ringing",CONNECT_FAILED:"failed",CALL_START:"in-progress",CALL_END:"completed",NO_ANSWER:"no-answer",CANCEL:"cancel",TIME_OUT:"timeout",BUSY:"busy"},nH={},iH={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function oH(e,n){return h.openBlock(),h.createElementBlock("svg",iH,n[0]||(n[0]=[h.createElementVNode("path",{d:"M9.15826 5.71223L8.7556 4.80625C8.49232 4.21388 8.36068 3.91768 8.16381 3.69101C7.91708 3.40694 7.59547 3.19794 7.23568 3.08785C6.94859 3 6.62446 3 5.97621 3C5.02791 3 4.55376 3 4.15573 3.18229C3.68687 3.39702 3.26344 3.86328 3.09473 4.3506C2.95151 4.76429 2.99254 5.18943 3.07458 6.0397C3.94791 15.0902 8.90982 20.0521 17.9603 20.9254C18.8106 21.0075 19.2358 21.0485 19.6494 20.9053C20.1368 20.7366 20.603 20.3131 20.8178 19.8443C21 19.4462 21 18.9721 21 18.0238C21 17.3755 21 17.0514 20.9122 16.7643C20.8021 16.4045 20.5931 16.0829 20.309 15.8362C20.0824 15.6393 19.7862 15.5077 19.1938 15.2444L18.2878 14.8417C17.6463 14.5566 17.3255 14.4141 16.9996 14.3831C16.6876 14.3534 16.3731 14.3972 16.0811 14.5109C15.776 14.6297 15.5064 14.8544 14.967 15.3038C14.4302 15.7512 14.1618 15.9749 13.8338 16.0947C13.543 16.2009 13.1586 16.2403 12.8524 16.1951C12.5069 16.1442 12.2424 16.0029 11.7133 15.7201C10.0673 14.8405 9.15953 13.9328 8.27987 12.2867C7.99714 11.7577 7.85578 11.4931 7.80487 11.1477C7.75974 10.8414 7.79908 10.457 7.9053 10.1663C8.02512 9.83828 8.24881 9.56986 8.69619 9.033C9.14562 8.49368 9.37034 8.22402 9.48915 7.91891C9.60285 7.62694 9.64662 7.3124 9.61695 7.00048C9.58594 6.67452 9.44338 6.35376 9.15826 5.71223Z",stroke:"currentColor","stroke-width":"1.25","stroke-linecap":"round"},null,-1)]))}const oN=Et(nH,[["render",oH]]),rH={key:0,class:"flex flex-col gap-2 w-[200px]"},sH={class:"flex items-center gap-2 shrink-0"},lH={class:"overflow-hidden w-8 h-8 rounded-full text-white"},uH={key:0,class:"bg-chat-success flex-center w-full h-full"},dH={key:1,class:"bg-chat-error flex-center w-full h-full"},cH={key:1},_H=["innerHTML"],fH={key:2},pH=["src"],aH={key:3,class:"text-sm mt-1"},vH=h.defineComponent({__name:"ChatMessageItem",props:{message:{},responsive:{},isEndMessage:{type:Boolean},isMyMessage:{type:Boolean},isLastMessage:{type:Boolean},shouldShowAvatar:{type:Boolean},isChatFinished:{type:Boolean},data:{}},emits:["callAgain"],setup(e,{emit:n}){const t=e,i=n,o=h.computed(()=>{var l,d,c,_,f,p,a,v,m;if(t.isMyMessage){if(((l=t.message)==null?void 0:l.call_status)==Ye.CONNECT_FAILED)return"Call canceled";if(((d=t.message)==null?void 0:d.call_status)==Ye.CALL_END)return"Outgoing audio call";if(((c=t.message)==null?void 0:c.call_status)==Ye.CANCEL)return"Call canceled"}else{if(((_=t.message)==null?void 0:_.call_status)==Ye.CONNECT_FAILED||((f=t.message)==null?void 0:f.call_status)==Ye.TIME_OUT||((p=t.message)==null?void 0:p.call_status)==Ye.CANCEL||((a=t.message)==null?void 0:a.call_status)==Ye.NO_ANSWER||((v=t.message)==null?void 0:v.call_status)==Ye.BUSY)return"Call missed";if(((m=t.message)==null?void 0:m.call_status)==Ye.CALL_END)return"Incomming audio call"}return""}),r=()=>{h.nextTick(()=>{const l=document.getElementById("content-chat");l&&(l.scrollTop=l.scrollHeight)})},s=l=>{const d=Math.floor(l/60),c=l%60;return`${d} min${d>1?"s":""} ${c} sec`},u=l=>{switch(l.state){case wn.Sending:return"Sending...";case wn.Uploading:return"Uploading...";case wn.Sent:return"";case wn.Read:return"Seen";case wn.Failed:return l.error||"Message failed";default:return""}};return(l,d)=>{var c,_,f,p,a,v,m,g;return h.openBlock(),h.createElementBlock("div",{class:h.normalizeClass(["flex items-end mt-2",{"mt-4":l.shouldShowAvatar,"flex-col justify-end pl-[60px]":l.isMyMessage,"gap-2":!l.isMyMessage}])},[l.message.state!=h.unref(wn).Sending?(h.openBlock(),h.createElementBlock(h.Fragment,{key:0},[l.isMyMessage?h.createCommentVNode("",!0):(h.openBlock(),h.createElementBlock(h.Fragment,{key:0},[l.shouldShowAvatar?(h.openBlock(),h.createBlock(Yo,{key:0,class:h.normalizeClass(["shrink-0",l.responsive=="mobile"?"translate-y-[-2px]":""]),src:((c=l.data)==null?void 0:c.avatar)??"",color:(_=l.data)==null?void 0:_.color,name:(f=l.data)==null?void 0:f.username,size:l.responsive=="mobile"?"sm":"md"},null,8,["src","color","name","size","class"])):(h.openBlock(),h.createElementBlock("div",{key:1,class:h.normalizeClass(["shrink-0",l.responsive=="mobile"?"w-8":"w-12"])},null,2))],64)),h.createElementVNode("div",{class:h.normalizeClass(["px-3 py-2 rounded-2xl max-w-xs text-left",{"rounded-tl-none":!l.shouldShowAvatar&&!l.isMyMessage,"rounded-bl-none":!l.isEndMessage&&!l.isMyMessage,"rounded-tr-none":!l.shouldShowAvatar&&l.isMyMessage,"rounded-br-none":!l.isEndMessage&&l.isMyMessage,"!text-[#14532D] !bg-[#d4f8d4]":l.message.message_uuid&&!l.message.is_call,"bg-[#D0DFEC] text-[#266699]":l.isMyMessage,"bg-[#E4E4E4D4] text-chat-haze-600 w-max ":!l.isMyMessage}])},[l.message.is_call==1?(h.openBlock(),h.createElementBlock("div",rH,[h.createElementVNode("p",{class:h.normalizeClass(["font-medium",{"text-chat-error":l.message.call_status!==h.unref(Ye).CALL_END}])},h.toDisplayString(o.value),3),h.createElementVNode("div",sH,[h.createElementVNode("div",lH,[l.message.call_status==h.unref(Ye).CALL_END?(h.openBlock(),h.createElementBlock("div",uH,[h.createVNode(oN,{class:"w-5 h-5"})])):(h.openBlock(),h.createElementBlock("div",dH,[h.createVNode(iN,{class:"w-5 h-5"})]))]),h.createElementVNode("span",null,h.toDisplayString(s(((p=l.message)==null?void 0:p.duration)??0)),1)]),h.createElementVNode("button",{onClick:d[0]||(d[0]=E=>i("callAgain")),class:"flex-center h-10 rounded-xl bg-chat-haze-200 font-semibold"},d[2]||(d[2]=[h.createElementVNode("p",null,"Call back",-1)]))])):l.message.message?(h.openBlock(),h.createElementBlock("div",cH,[h.createElementVNode("div",{innerHTML:l.message.message,style:{wordBreak:"break-word"}},null,8,_H)])):(v=(a=l.message)==null?void 0:a.attachments)!=null&&v.length?(h.openBlock(),h.createElementBlock("div",fH,[h.createElementVNode("img",{src:(m=l.message.attachments[0])==null?void 0:m.file_path,alt:"avatar",onLoad:d[1]||(d[1]=()=>{l.isLastMessage&&r()})},null,40,pH)])):h.createCommentVNode("",!0),l.isChatFinished?(h.openBlock(),h.createElementBlock("p",aH,h.toDisplayString(h.unref(Ct)((g=l.message)==null?void 0:g.created_at).format(h.unref(Tr).TIME_12_FORMAT)),1)):h.createCommentVNode("",!0)],2),l.isMyMessage?(h.openBlock(),h.createElementBlock(h.Fragment,{key:1},[l.isLastMessage&&u(l.message)||l.message.state==h.unref(wn).Failed?(h.openBlock(),h.createElementBlock("span",{key:0,class:h.normalizeClass(["text-chat-haze-200 text-xs mt-1",{"!text-chat-error":l.message.state==h.unref(wn).Failed}])},h.toDisplayString(u(l.message)),3)):h.createCommentVNode("",!0)],64)):h.createCommentVNode("",!0)],64)):h.createCommentVNode("",!0)],2)}}}),mH={class:"relative overflow-hidden"},hH={key:0,class:"shrink-0 h-[500px] chat-padding-page"},yH={class:"chat-padding-page"},gH=h.defineComponent({__name:"ChatMessage",props:{data:{},message:{},responsive:{},showNewCustomer:{type:Boolean}},emits:["scrollTop","callBack"],setup(e,{expose:n,emit:t}){const i=e,o=t,r=h.ref(null),s=()=>{h.nextTick(()=>{const p=document.getElementById("content-chat");p&&(p.scrollTop=p.scrollHeight)})},u=p=>p===0?!0:i.message[p-1].sender_id!==i.message[p].sender_id,l=p=>{var a;return((a=i.message)==null?void 0:a.length)==p+1?!0:i.message[p+1].sender_id!==i.message[p].sender_id},d=p=>{if(l(p))return!0;const a=Ct(i.message[p].created_at);return Ct(i.message[p+1].created_at).diff(a,"minute")>10},c=()=>{o("scrollTop")};return n({scrollBottom:s,hideScrollEvent:()=>{var p;(p=r.value)==null||p.hideLoading()},fixedScroll:()=>{var p;(p=r.value)==null||p.fixedScroll()}}),(p,a)=>(h.openBlock(),h.createElementBlock("div",mH,[h.createVNode(Hf,{class:"bg-white h-full flex flex-col overflow-auto",id:"content-chat",top:"",ref_key:"scrollEventRef",ref:r,onGetDataTop:c},{default:h.withCtx(()=>[p.showNewCustomer?(h.openBlock(),h.createElementBlock("div",hH,[h.createVNode(IR,{class:"h-full",data:p.data},null,8,["data"])])):h.createCommentVNode("",!0),h.createElementVNode("div",yH,[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(p.message,(v,m)=>{var g;return h.openBlock(),h.createBlock(vH,{key:v.id,onCallAgain:a[0]||(a[0]=E=>o("callBack")),message:v,index:m,responsive:p.responsive,"is-my-message":v.sender_id==((g=h.unref(Fe))==null?void 0:g.id),data:p.data,"should-show-avatar":u(m),"is-last-message":m==p.message.length-1,"is-end-message":l(m),"is-chat-finished":d(m)},null,8,["message","index","responsive","is-my-message","data","should-show-avatar","is-last-message","is-end-message","is-chat-finished"])}),128))])]),_:1},512)]))}}),EH={class:"h-full flex flex-col overflow-hidden"},TH={key:2,class:"grow"},rN=h.defineComponent({__name:"Home",props:{receiverId:{},responsive:{}},emits:["call","inputFocus","back"],setup(e,{expose:n,emit:t}){const i=e,o=t,r=h.computed(()=>f.value.slice().reverse());let s=1,u=1,l="",d="";const c=h.ref(!1),_=h.shallowRef(null),f=h.ref([]),p=h.ref(null),a=h.ref(null);h.onMounted(()=>{}),h.onUnmounted(()=>{m()});const v=async()=>{var j,I;try{await Uc(),l=Fj+((j=_.value)==null?void 0:j.conversation_id),d=qj+((I=_.value)==null?void 0:I.conversation_id),yr(l),yr(d),Bc("chat-home",l,g)}catch(A){console.error(A)}},m=async()=>{zl(l),zl(d),Kl("chat-home")},g=(j,I)=>{var A,M,w,x,k;if(console.log(I),(A=_.value)!=null&&A.id&&((M=I==null?void 0:I.sender_id)==null?void 0:M.toString())==((x=(w=_.value)==null?void 0:w.id)==null?void 0:x.toString())){const V=f.value.findIndex(L=>L.id===(I==null?void 0:I.id));V<0?f.value.unshift(I):f.value[V]=I,(k=p.value)==null||k.scrollBottom()}},E=async j=>{var I,A,M;try{const w=i.receiverId,x={page:j!=null&&j.resetList?1:s,receiver_id:i.receiverId};let k=await fV(x);s=((I=k._meta)==null?void 0:I.currentPage)||1,u=((A=k._meta)==null?void 0:A.pageCount)||1,w==i.receiverId&&(j!=null&&j.resetList?(f.value=k.items,(M=p.value)==null||M.scrollBottom()):f.value.push(...k.items))}catch(w){console.error(w)}},y=async()=>{var j,I,A;if(s>=u){(j=p.value)==null||j.hideScrollEvent();return}s=s+1,await E(),(I=p.value)==null||I.hideScrollEvent(),(A=p.value)==null||A.fixedScroll()},S=async j=>{const I=i.receiverId;j&&(_.value={...j,conversation_id:j.id});const A=await pV(i.receiverId)??null;I==i.receiverId&&(_.value=A,m(),await v())},C=async j=>{var I,A;try{c.value=!0,f.value=[],(I=a.value)==null||I.clearInput(),S(j),await Promise.allSettled([E({resetList:!0})]),await h.nextTick(),(A=p.value)==null||A.scrollBottom()}catch(M){console.error(M)}finally{c.value=!1}},T=(j,I)=>{const A=f.value.findIndex(M=>M.id==j);if(A>-1){const M=f.value[A];f.value[A]={...M,...I}}},R=async j=>{var I,A,M,w,x,k,V;try{f.value.unshift({...j,state:wn.Sending}),Yl(l,{...j,state:wn.Sending});let L=[];(I=j==null?void 0:j.attachments)!=null&&I.length&&(T(j.id,{state:wn.Uploading}),L=await O(j==null?void 0:j.attachments[0].file_local)),T(j.id,{state:wn.Sending}),(A=p.value)==null||A.scrollBottom();const D=new FormData;D.append("message",j.message??""),D.append("receiver_id",((M=_.value)==null?void 0:M.id)??""),L!=null&&L.length&&D.append("url",((w=L[0])==null?void 0:w.url)??""),await vV(D),Yl(l,{...j,state:wn.Sent,attachments:L?[{file_name:((x=j.attachments[0])==null?void 0:x.file_name)??"",file_path:((k=L[0])==null?void 0:k.url)??""}]:[]}),T(j.id,{state:wn.Sent}),(V=p.value)==null||V.scrollBottom(),ER({message:(j==null?void 0:j.message)??"",isSendImg:!!(L!=null&&L.length),infoUser:_.value})}catch(L){console.log(L),T(j.id,{state:wn.Failed,error:typeof(L==null?void 0:L.message)=="string"?L.message:""})}},O=async j=>{if(j==null||j==null)return[];if(j.size>1*1024*1024)throw new Error("File size exceeds limit");const I=new FormData;return I.append("file",j),await hV(I)},B=()=>{_.value&&o("call",_.value)};return n({getData:C,handleGetMessage:E,infoUser:_}),(j,I)=>{var A;return h.openBlock(),h.createElementBlock("div",EH,[h.createVNode($V,{class:"shrink-0",data:_.value,onCall:B,responsive:j.responsive,onBack:I[0]||(I[0]=M=>o("back"))},null,8,["data","responsive"]),(A=f.value)!=null&&A.length?(h.openBlock(),h.createBlock(gH,{key:0,ref_key:"chatMessageRef",ref:p,onScrollTop:y,data:_.value,message:r.value,class:"grow",responsive:j.responsive,"show-new-customer":h.unref(s)>=h.unref(u),onCallBack:B},null,8,["data","message","responsive","show-new-customer"])):c.value?(h.openBlock(),h.createElementBlock("span",TH)):(h.openBlock(),h.createBlock(IR,{key:1,data:_.value,class:"grow"},null,8,["data"])),h.createVNode(X7,{data:_.value,onSendMessage:R,onFocus:I[1]||(I[1]=M=>o("inputFocus")),ref_key:"inputChatRef",ref:a,class:"p-6"},null,8,["data"])])}}}),SH={},bH={width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function IH(e,n){return h.openBlock(),h.createElementBlock("svg",bH,n[0]||(n[0]=[h.createElementVNode("path",{d:"M6.00003 4L10 8L6 12",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]))}const sN=Et(SH,[["render",IH]]),CH={class:"w-full"},AH={class:"text-chat-haze-500 font-semibold"},RH={class:"bg-white rounded-xl border border-chat-haze-100 mt-1 p-4 space-y-4"},MH=["onClick"],NH={class:"flex items-center gap-1 grow text-chat-haze-900"},OH={key:0,class:"flex items-center text-chat-haze-300"},wH={class:"ml-1"},xH={class:"border-chat-haze-100 mx-6"},D_=h.defineComponent({__name:"SubInformation",props:{information:{default:[]},title:{default:""}},setup(e){return(n,t)=>(h.openBlock(),h.createElementBlock("div",CH,[h.createElementVNode("h2",AH,h.toDisplayString(n.title),1),h.createElementVNode("div",RH,[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(n.information,(i,o)=>(h.openBlock(),h.createElementBlock(h.Fragment,{key:o},[h.createElementVNode("div",{class:h.normalizeClass(["flex items-center gap-1",{"cursor-pointer":i.click}]),onClick:r=>{var s;return(s=i.click)==null?void 0:s.call(i)}},[h.createElementVNode("div",NH,[(h.openBlock(),h.createBlock(h.resolveDynamicComponent(i.icon))),h.createElementVNode("span",null,h.toDisplayString(i.label),1)]),i.value?(h.openBlock(),h.createElementBlock("div",OH,[h.createTextVNode(h.toDisplayString(i.value)+" ",1),h.createElementVNode("span",wH,[h.createVNode(sN)])])):h.createCommentVNode("",!0)],10,MH),h.withDirectives(h.createElementVNode("hr",xH,null,512),[[h.vShow,o<n.information.length-1]])],64))),128))])]))}}),PH={},DH={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function kH(e,n){return h.openBlock(),h.createElementBlock("svg",DH,n[0]||(n[0]=[h.createElementVNode("path",{d:"M7 8.5L9.94202 10.2394C11.6572 11.2535 12.3428 11.2535 14.058 10.2394L17 8.5",stroke:"currentColor","stroke-width":"1.25","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),h.createElementVNode("path",{d:"M2.01577 13.4756C2.08114 16.5411 2.11383 18.0739 3.24496 19.2093C4.37609 20.3448 5.95034 20.3843 9.09884 20.4634C11.0393 20.5122 12.9607 20.5122 14.9012 20.4634C18.0497 20.3843 19.6239 20.3448 20.755 19.2093C21.8862 18.0739 21.9189 16.5411 21.9842 13.4756C22.0053 12.4899 22.0053 11.51 21.9842 10.5244C21.9189 7.45886 21.8862 5.92609 20.755 4.79066C19.6239 3.65523 18.0497 3.61568 14.9012 3.53657C12.9607 3.48781 11.0393 3.48781 9.09882 3.53656C5.95034 3.61566 4.37609 3.65521 3.24496 4.79065C2.11383 5.92608 2.08114 7.45885 2.01577 10.5243C1.99474 11.51 1.99474 12.4899 2.01577 13.4756Z",stroke:"#363E44","stroke-width":"1.25","stroke-linejoin":"round"},null,-1)]))}const LH=Et(PH,[["render",kH]]),UH={},BH={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function jH(e,n){return h.openBlock(),h.createElementBlock("svg",BH,n[0]||(n[0]=[h.createElementVNode("path",{d:"M18.9905 19H19M18.9905 19C18.3678 19.6175 17.2393 19.4637 16.4479 19.4637C15.4765 19.4637 15.0087 19.6537 14.3154 20.347C13.7251 20.9374 12.9337 22 12 22C11.0663 22 10.2749 20.9374 9.68457 20.347C8.99128 19.6537 8.52349 19.4637 7.55206 19.4637C6.76068 19.4637 5.63218 19.6175 5.00949 19C4.38181 18.3776 4.53628 17.2444 4.53628 16.4479C4.53628 15.4414 4.31616 14.9786 3.59938 14.2618C2.53314 13.1956 2.00002 12.6624 2 12C2.00001 11.3375 2.53312 10.8044 3.59935 9.73817C4.2392 9.09832 4.53628 8.46428 4.53628 7.55206C4.53628 6.76065 4.38249 5.63214 5 5.00944C5.62243 4.38178 6.7556 4.53626 7.55208 4.53626C8.46427 4.53626 9.09832 4.2392 9.73815 3.59937C10.8044 2.53312 11.3375 2 12 2C12.6625 2 13.1956 2.53312 14.2618 3.59937C14.9015 4.23907 15.5355 4.53626 16.4479 4.53626C17.2393 4.53626 18.3679 4.38247 18.9906 5C19.6182 5.62243 19.4637 6.75559 19.4637 7.55206C19.4637 8.55858 19.6839 9.02137 20.4006 9.73817C21.4669 10.8044 22 11.3375 22 12C22 12.6624 21.4669 13.1956 20.4006 14.2618C19.6838 14.9786 19.4637 15.4414 19.4637 16.4479C19.4637 17.2444 19.6182 18.3776 18.9905 19Z",stroke:"#363E44","stroke-width":"1.25"},null,-1),h.createElementVNode("path",{d:"M9 12.8929C9 12.8929 10.2 13.5447 10.8 14.5C10.8 14.5 12.6 10.75 15 9.5",stroke:"currentColor","stroke-width":"1.25","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]))}const VH=Et(UH,[["render",jH]]),FH={},qH={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function GH(e,n){return h.openBlock(),h.createElementBlock("svg",qH,n[0]||(n[0]=[h.createElementVNode("path",{d:"M16 2V6M8 2V6",stroke:"currentColor","stroke-width":"1.25","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),h.createElementVNode("path",{d:"M13 4H11C7.22876 4 5.34315 4 4.17157 5.17157C3 6.34315 3 8.22876 3 12V14C3 17.7712 3 19.6569 4.17157 20.8284C5.34315 22 7.22876 22 11 22H13C16.7712 22 18.6569 22 19.8284 20.8284C21 19.6569 21 17.7712 21 14V12C21 8.22876 21 6.34315 19.8284 5.17157C18.6569 4 16.7712 4 13 4Z",stroke:"currentColor","stroke-width":"1.25","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),h.createElementVNode("path",{d:"M3 10H21",stroke:"currentColor","stroke-width":"1.25","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),h.createElementVNode("path",{d:"M9 16.5C9 16.5 10.5 17 11 18.5C11 18.5 13.1765 14.5 16 13.5",stroke:"currentColor","stroke-width":"1.25","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]))}const HH=Et(FH,[["render",GH]]),zH={},YH={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function KH(e,n){return h.openBlock(),h.createElementBlock("svg",YH,n[0]||(n[0]=[h.createStaticVNode('<path d="M13.0289 7.4183C13.0098 7.2816 13 7.14195 13 7C13 5.34314 14.3432 4 16 4C17.6568 4 19 5.34314 19 7C19 8.65686 17.6568 10 16 10C15.4416 10 14.9188 9.84745 14.4711 9.58172" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"></path><path d="M21 14.9498C21 12.2161 18.7614 10 16 10C13.2386 10 11 12.2161 11 14.9498" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"></path><path d="M14 9C14 6.79086 12.2091 5 10 5C7.79086 5 6 6.79086 6 9C6 11.2091 7.79086 13 10 13C12.2091 13 14 11.2091 14 9Z" fill="white" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"></path><path d="M17 18.6569C17 15.5327 13.866 13 10 13C6.134 13 3 15.5327 3 18.6569" fill="white"></path><path d="M17 18.6569C17 15.5327 13.866 13 10 13C6.134 13 3 15.5327 3 18.6569C3 21.781 17 21.781 17 18.6569Z" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"></path>',5)]))}const WH=Et(zH,[["render",KH]]),$H={},QH={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function JH(e,n){return h.openBlock(),h.createElementBlock("svg",QH,n[0]||(n[0]=[h.createElementVNode("path",{d:"M3 11C3 7.25027 3 5.3754 3.95491 4.06107C4.26331 3.6366 4.6366 3.26331 5.06107 2.95491C6.3754 2 8.25027 2 12 2C15.7497 2 17.6246 2 18.9389 2.95491C19.3634 3.26331 19.7367 3.6366 20.0451 4.06107C21 5.3754 21 7.25027 21 11V13C21 16.7497 21 18.6246 20.0451 19.9389C19.7367 20.3634 19.3634 20.7367 18.9389 21.0451C17.6246 22 15.7497 22 12 22C8.25027 22 6.3754 22 5.06107 21.0451C4.6366 20.7367 4.26331 20.3634 3.95491 19.9389C3 18.6246 3 16.7497 3 13V11Z",stroke:"currentColor","stroke-width":"1.25","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),h.createElementVNode("path",{d:"M15 9.5H7M10 14.5H7",stroke:"currentColor","stroke-width":"1.25","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]))}const XH=Et($H,[["render",JH]]),ZH={},ez={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function tz(e,n){return h.openBlock(),h.createElementBlock("svg",ez,n[0]||(n[0]=[h.createElementVNode("path",{d:"M17 17L21 21",stroke:"currentColor","stroke-width":"1.25","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),h.createElementVNode("path",{d:"M19 11C19 6.58172 15.4183 3 11 3C6.58172 3 3 6.58172 3 11C3 15.4183 6.58172 19 11 19C15.4183 19 19 15.4183 19 11Z",stroke:"currentColor","stroke-width":"1.25","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]))}const nz=Et(ZH,[["render",tz]]),iz={},oz={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function rz(e,n){return h.openBlock(),h.createElementBlock("svg",oz,n[0]||(n[0]=[h.createElementVNode("path",{d:"M3 21L8 16",stroke:"currentColor","stroke-width":"1.25","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),h.createElementVNode("path",{d:"M13.2585 18.8714C9.51516 18.0215 5.97844 14.4848 5.12853 10.7415C4.99399 10.1489 4.92672 9.85266 5.12161 9.37197C5.3165 8.89129 5.55457 8.74255 6.03071 8.44509C7.10705 7.77265 8.27254 7.55888 9.48209 7.66586C11.1793 7.81598 12.0279 7.89104 12.4512 7.67048C12.8746 7.44991 13.1622 6.93417 13.7376 5.90269L14.4664 4.59604C14.9465 3.73528 15.1866 3.3049 15.7513 3.10202C16.316 2.89913 16.6558 3.02199 17.3355 3.26771C18.9249 3.84236 20.1576 5.07505 20.7323 6.66449C20.978 7.34417 21.1009 7.68401 20.898 8.2487C20.6951 8.8134 20.2647 9.05346 19.4039 9.53358L18.0672 10.2792C17.0376 10.8534 16.5229 11.1406 16.3024 11.568C16.0819 11.9955 16.162 12.8256 16.3221 14.4859C16.4399 15.7068 16.2369 16.88 15.5555 17.9697C15.2577 18.4458 15.1088 18.6839 14.6283 18.8786C14.1477 19.0733 13.8513 19.006 13.2585 18.8714Z",stroke:"currentColor","stroke-width":"1.25","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]))}const sz=Et(iz,[["render",rz]]),lz=(e,n=1)=>{let t=(""+e||"").replace(/[^\d*]/g,"");return t.length>10&&(t=t.substring(t.length-10)),t.length==10?(n==4&&(t=(t||"").replace(/(\d{3})(\d{3})(\d{4})/,"*** $3")),n==3&&(t=(t||"").replace(/(\d{3})(\d{3})(\d{4})/,"($3)")),n==2?t=(t||"").replace(/(\d{3})(\d{3})(\d{4})/,"***-***-$3"):t=(t||"").replace(/(\d{3})(\d{3})(\d{4})/,"(***) ***-$3"),t):""},uz={class:"chat-padding-page overflow-auto"},dz={class:"flex flex-col items-center mx-auto"},cz={class:"flex items-center gap-1 mt-3"},_z={class:"text-lg font-semibold text-gray-800"},fz={class:"w-full flex items-center justify-center gap-1"},pz={class:"text-lg font-semibold text-chat-haze-900"},az=["src"],vz={class:"text-chat-haze-400"},mz={class:"w-full py-6"},lN=h.defineComponent({__name:"CustomerDetail",props:{receiverId:{},responsive:{}},setup(e){const n=h.computed(()=>{var s,u,l;return[{label:"Points",value:((s=Bn.value)==null?void 0:s.lifetime_point)??0},{label:"Total Visit",value:((u=Bn.value)==null?void 0:u.visit_count)??0},{label:"Spent",value:((l=Bn.value)==null?void 0:l.total_money)??0}]}),t=h.computed(()=>{var s;return[{icon:LH,label:""},{icon:oN,label:lz(((s=Io.value)==null?void 0:s.phone)??"",2)}]}),i=h.computed(()=>{var s,u,l,d,c,_,f,p,a,v;return[{icon:VH,label:"Check In",value:(s=Bn.value)!=null&&s.visit_count?((u=Bn.value)==null?void 0:u.visit_count)+(((l=Bn.value)==null?void 0:l.visit_count)>1?" times":" time"):"",click:(d=Bn.value)!=null&&d.visit_count?()=>{In(He.CUSTOMER_CHECK_IN)}:null},{icon:XH,label:"Orders",value:((_=(c=Bn.value)==null?void 0:c.order)==null?void 0:_.length)??""},{icon:HH,label:"Appointments",value:((p=(f=Bn.value)==null?void 0:f.appointment)==null?void 0:p.length)??"",click:(v=(a=Bn.value)==null?void 0:a.appointment)!=null&&v.length?()=>{In(He.CUSTOMER_APPOINTMENT)}:null}]}),o=[{icon:nz,label:"Search in the conversation"},{icon:sz,label:"Pin Message"},{icon:WH,label:"Add Groups"}];return(async()=>{var s,u;Bn.value=null,Bn.value=await BV(((u=(s=Io.value)==null?void 0:s.phone)==null?void 0:u.slice(1))??"")})(),(s,u)=>{var l,d,c,_;return h.openBlock(),h.createElementBlock("div",uz,[h.createElementVNode("div",dz,[h.createVNode(Yo,{src:((l=h.unref(Io))==null?void 0:l.avatar)??"",color:((d=h.unref(Io))==null?void 0:d.color)??"",name:((c=h.unref(Io))==null?void 0:c.username)??"",size:"xl"},null,8,["src","color","name"]),h.createElementVNode("div",cz,[h.createElementVNode("h2",_z,h.toDisplayString(((_=h.unref(Io))==null?void 0:_.username)??"n/a"),1)])]),h.createElementVNode("div",{class:h.normalizeClass(["mt-5 text-center mx-auto",{"flex justify-between w-max":s.responsive=="tablet","grid grid-cols-3 w-full":s.responsive=="mobile"}])},[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(n.value,(f,p)=>(h.openBlock(),h.createElementBlock("div",{class:h.normalizeClass(["border-l border-chat-haze-100 first:border-none",{"w-full":s.responsive=="mobile","w-[130px]":s.responsive=="tablet"}]),key:p},[h.createElementVNode("div",fz,[h.createElementVNode("p",pz,h.toDisplayString(f.value),1),f.icon?(h.openBlock(),h.createElementBlock("img",{key:0,src:f.icon},null,8,az)):h.createCommentVNode("",!0)]),h.createElementVNode("p",vz,h.toDisplayString(f.label),1)],2))),128))],2),h.createElementVNode("div",mz,[h.createVNode(D_,{class:"mb-6",information:t.value,title:"Information"},null,8,["information"]),h.createVNode(D_,{class:"mb-6",information:i.value,title:"History"},null,8,["information"]),h.createVNode(D_,{class:"",information:o,title:"Other Action"})])])}}}),hz={},yz={class:"bg-white border border-chat-haze-200 rounded-lg p-4"};function gz(e,n){return h.openBlock(),h.createElementBlock("div",yz,[h.renderSlot(e.$slots,"header"),n[0]||(n[0]=h.createElementVNode("div",{class:"border-t border-dashed border-chat-haze-200 my-2"},null,-1)),h.renderSlot(e.$slots,"content")])}const uN=Et(hz,[["render",gz]]);var dN=(e=>(e.Orange="#F2994A",e.Blue_Teal="#F2994A",e))(dN||{});function Ez(){var n,t,i;const e=document.querySelector(":root");e&&((n=e.style)==null||n.setProperty("--chat-color-primary","#0051E6"),(t=e.style)==null||t.setProperty("--chat-color-error","#EF4444"),(i=e.style)==null||i.setProperty("--chat-color-success","#22C55E"))}const Tz=h.defineComponent({__name:"Collapsible",props:{defaultOpen:{type:Boolean},open:{type:Boolean},disabled:{type:Boolean},unmountOnHide:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["update:open"],setup(e,{emit:n}){const o=Nr(e,n);return(r,s)=>(h.openBlock(),h.createBlock(h.unref(u8),h.normalizeProps(h.guardReactiveProps(h.unref(o))),{default:h.withCtx(({open:u})=>[h.renderSlot(r.$slots,"default",{open:u})]),_:3},16))}}),Sz=h.defineComponent({__name:"CollapsibleContent",props:{forceMount:{type:Boolean},asChild:{type:Boolean},as:{}},setup(e){const n=e;return(t,i)=>(h.openBlock(),h.createBlock(h.unref(c8),h.mergeProps(n,{class:"overflow-hidden transition-all data-[state=closed]:animate-collapsible-up data-[state=open]:animate-collapsible-down"}),{default:h.withCtx(()=>[h.renderSlot(t.$slots,"default")]),_:3},16))}}),bz=h.defineComponent({__name:"CollapsibleTrigger",props:{asChild:{type:Boolean},as:{}},setup(e){const n=e;return(t,i)=>(h.openBlock(),h.createBlock(h.unref(f8),h.normalizeProps(h.guardReactiveProps(n)),{default:h.withCtx(()=>[h.renderSlot(t.$slots,"default")]),_:3},16))}}),Iz=h.defineComponent({__name:"CollapseBase",props:{open:{type:Boolean},openModifiers:{}},emits:["update:open"],setup(e){const n=h.useModel(e,"open");return(t,i)=>(h.openBlock(),h.createBlock(h.unref(Tz),{open:n.value,"onUpdate:open":i[0]||(i[0]=o=>n.value=o)},{default:h.withCtx(()=>[h.createVNode(h.unref(bz),null,{default:h.withCtx(()=>[h.renderSlot(t.$slots,"trigger")]),_:3}),h.createVNode(h.unref(Sz),null,{default:h.withCtx(()=>[h.renderSlot(t.$slots,"default")]),_:3})]),_:3},8,["open"]))}}),Cz={class:"flex items-center text-chat-haze-400 mb-3"},Az={class:"font-semibold text-lg"},cN=h.defineComponent({__name:"CollapseCheckIn",props:{title:{}},setup(e){const n=h.ref(!0);return(t,i)=>(h.openBlock(),h.createBlock(Iz,{class:"relative",open:n.value,"onUpdate:open":i[0]||(i[0]=o=>n.value=o)},{trigger:h.withCtx(()=>[i[1]||(i[1]=h.createElementVNode("div",{class:"w-2 h-2 bg-chat-haze-400 rounded-full absolute left-[-20px] top-2"},null,-1)),h.createElementVNode("div",Cz,[h.createElementVNode("span",Az,h.toDisplayString(t.title),1),h.createVNode(sN,{class:h.normalizeClass(n.value?"rotate-90":"rotate-0")},null,8,["class"])])]),default:h.withCtx(()=>[h.renderSlot(t.$slots,"default")]),_:3},8,["open"]))}}),Rz={class:"chat-padding-page"},Mz={class:"relative pl-4 h-max"},Nz={class:"flex justify-between items-center"},Oz={class:"text-chat-haze-600 font-bold"},wz={class:"flex justify-between items-center"},xz={class:"text-chat-haze-400 font-normal"},_N=h.defineComponent({__name:"CustomerCheckIn",setup(e){const n=h.computed(()=>{var t;return bR(((t=Bn.value)==null?void 0:t.checkin)??[])});return h.ref(!0),h.ref(!0),(t,i)=>(h.openBlock(),h.createElementBlock("div",Rz,[i[1]||(i[1]=h.createElementVNode("p",{class:"font-semibold mb-4"},"Total Point: 666",-1)),h.createElementVNode("div",Mz,[i[0]||(i[0]=h.createElementVNode("div",{class:"absolute left-0 top-0 border-l border-dashed border-chat-haze-400 h-full w-1 mt-2"},null,-1)),(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(n.value,(o,r)=>(h.openBlock(),h.createBlock(cN,{class:"relative",title:o.year,key:r},{default:h.withCtx(()=>[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(o.items,s=>(h.openBlock(),h.createElementBlock("div",{class:"flex flex-col gap-y-3",key:s.id},[h.createVNode(uN,null,{header:h.withCtx(()=>[h.createElementVNode("div",Nz,[h.createElementVNode("p",Oz,"ID: "+h.toDisplayString(s.id),1),h.createElementVNode("p",{class:"font-bold",style:h.normalizeStyle({color:h.unref(dN).Orange})},h.toDisplayString(s.status),5)])]),content:h.withCtx(()=>[h.createElementVNode("div",wz,[h.createElementVNode("p",xz,h.toDisplayString(h.unref(Ct)(s.created_at).format(h.unref(Tr).DATE_FORMAT)),1),h.withDirectives(h.createElementVNode("p",{class:"text-chat-success"},"+"+h.toDisplayString(s.point_bonus)+" points",513),[[h.vShow,s.point_bonus>0]]),h.withDirectives(h.createElementVNode("p",{class:""},"+"+h.toDisplayString(s.point_bonus)+" points",513),[[h.vShow,!s.point_bonus]])])]),_:2},1024)]))),128))]),_:2},1032,["title"]))),128))])]))}}),Pz={},Dz={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function kz(e,n){return h.openBlock(),h.createElementBlock("svg",Dz,n[0]||(n[0]=[h.createStaticVNode('<path d="M5.8335 17.5V15" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"></path><path d="M14.1665 17.5V12.5" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"></path><path d="M14.1665 5V2.5" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"></path><path d="M5.8335 7.5V2.5" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"></path><path d="M5.8335 15C5.05693 15 4.66865 15 4.36235 14.8732C3.95398 14.704 3.62952 14.3795 3.46036 13.9712C3.3335 13.6648 3.3335 13.2766 3.3335 12.5C3.3335 11.7234 3.3335 11.3352 3.46036 11.0288C3.62952 10.6205 3.95398 10.296 4.36235 10.1268C4.66865 10 5.05693 10 5.8335 10C6.61006 10 6.99835 10 7.30464 10.1268C7.71301 10.296 8.03747 10.6205 8.20663 11.0288C8.3335 11.3352 8.3335 11.7234 8.3335 12.5C8.3335 13.2766 8.3335 13.6648 8.20663 13.9712C8.03747 14.3795 7.71301 14.704 7.30464 14.8732C6.99835 15 6.61006 15 5.8335 15Z" stroke="currentColor" stroke-width="1.25"></path><path d="M14.1665 10C13.3899 10 13.0017 10 12.6953 9.87317C12.287 9.704 11.9625 9.3795 11.7933 8.97117C11.6665 8.66483 11.6665 8.27657 11.6665 7.5C11.6665 6.72343 11.6665 6.33515 11.7933 6.02886C11.9625 5.62048 12.287 5.29602 12.6953 5.12687C13.0017 5 13.3899 5 14.1665 5C14.9431 5 15.3313 5 15.6377 5.12687C16.046 5.29602 16.3705 5.62048 16.5397 6.02886C16.6665 6.33515 16.6665 6.72343 16.6665 7.5C16.6665 8.27657 16.6665 8.66483 16.5397 8.97117C16.3705 9.3795 16.046 9.704 15.6377 9.87317C15.3313 10 14.9431 10 14.1665 10Z" stroke="currentColor" stroke-width="1.25"></path>',6)]))}const Lz=Et(Pz,[["render",kz]]);var Br=(e=>(e.Confirmed="confirmed",e.Scheduled="scheduled",e.Canceled="canceled",e.Done="done",e.Reminder="reminder",e.Waiting="wait_list",e))(Br||{});const Uz={class:"chat-padding-page"},Bz={class:"flex justify-between items-center mb-5"},jz={class:"flex text-chat-haze-300 border border-chat-haze-300 rounded-[99px] px-2"},Vz={class:"relative pl-4 h-max"},Fz={class:"flex flex-col gap-y-3"},qz={class:"flex justify-between items-center"},Gz={class:"text-lg text-chat-haze-600 font-bold"},Hz={class:"translate-y-[-4px]"},zz={class:"flex justify-between items-end"},Yz={class:"text-chat-haze-400"},Kz={class:"text-chat-haze-400"},Wz={class:"text-chat-haze-409 font-medium"},$z={class:"text-chat-haze-409 font-medium"},fN=h.defineComponent({__name:"CustomerAppointment",setup(e){const n=h.computed(()=>{var i;return bR(((i=Bn.value)==null?void 0:i.appointment)??[],"start_time")}),t=i=>{switch(i){case Br.Confirmed:return"background-color: #E3FFF1; color: #06C270";case Br.Scheduled:return"background-color: #FFF0FF; color: #6600CC";case Br.Canceled:return"background-color: #FFE4DC; color: #F15220";case Br.Done:return"background-color: #E5F0FF; color: #0063F7";case Br.Waiting:return"background-color: #FFF0E0; color: #D96A2B";case"website":return"background-color: #FFF3B6; color: #F5B02A";case"checkin":return"background-color: #fff; color: #00b1bc";default:return""}};return(i,o)=>(h.openBlock(),h.createElementBlock("div",Uz,[h.createElementVNode("div",Bz,[o[1]||(o[1]=h.createElementVNode("p",{class:"text-chat-haze-900 font-semibold"},"All Appointment",-1)),h.createElementVNode("button",jz,[o[0]||(o[0]=h.createElementVNode("span",{class:"font-medium"},"Filter",-1)),h.createVNode(Lz)])]),h.createElementVNode("div",Vz,[o[2]||(o[2]=h.createElementVNode("div",{class:"absolute left-0 top-0 border-l border-dashed border-chat-haze-400 h-full w-1 mt-2"},null,-1)),(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(n.value,(r,s)=>(h.openBlock(),h.createBlock(cN,{class:"relative",title:r.year,key:s},{default:h.withCtx(()=>[h.createElementVNode("div",Fz,[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(r.items,u=>(h.openBlock(),h.createBlock(uN,{key:u.id},{header:h.withCtx(()=>[h.createElementVNode("div",qz,[h.createElementVNode("p",Gz,"ID: "+h.toDisplayString(u.id),1),h.createElementVNode("div",Hz,[h.createElementVNode("div",{class:"w-max rounded-[6px] text-14px px-2 py-1 mt-2",style:h.normalizeStyle(t(u.status))},h.toDisplayString(u.status),5)])]),h.createElementVNode("div",zz,[h.createElementVNode("p",Yz,h.toDisplayString(h.unref(Ct)(u.start_time).format(h.unref(Tr).DATE_FORMAT)),1),h.createElementVNode("p",Kz," start time: "+h.toDisplayString(h.unref(Ct)(u.start_time).format(h.unref(Tr).TIME_12_FORMAT)),1)])]),content:h.withCtx(()=>[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(u.services,(l,d)=>(h.openBlock(),h.createElementBlock("div",{class:"flex justify-between items-center",key:d},[h.createElementVNode("p",Wz,h.toDisplayString(l.employee_name),1),h.createElementVNode("p",$z,h.toDisplayString(l.name),1)]))),128))]),_:2},1024))),128))])]),_:2},1032,["title"]))),128))])]))}});class Wn extends Error{constructor(n){var t,i,o,r;super("ClientResponseError"),this.url="",this.status=0,this.response={},this.isAbort=!1,this.originalError=null,Object.setPrototypeOf(this,Wn.prototype),n!==null&&typeof n=="object"&&(this.url=typeof n.url=="string"?n.url:"",this.status=typeof n.status=="number"?n.status:0,this.isAbort=!!n.isAbort,this.originalError=n.originalError,n.response!==null&&typeof n.response=="object"?this.response=n.response:n.data!==null&&typeof n.data=="object"?this.response=n.data:this.response={}),this.originalError||n instanceof Wn||(this.originalError=n),typeof DOMException<"u"&&n instanceof DOMException&&(n.name=="AbortError"||n.code==20)&&(this.isAbort=!0),this.name="ClientResponseError "+this.status,this.message=(t=this.response)==null?void 0:t.message,this.message||(this.isAbort?this.message="The request was autocancelled. You can find more info in https://github.com/pocketbase/js-sdk#auto-cancellation.":(r=(o=(i=this.originalError)==null?void 0:i.cause)==null?void 0:o.message)!=null&&r.includes("ECONNREFUSED ::1")?this.message="Failed to connect to the PocketBase server. Try changing the SDK URL from localhost to 127.0.0.1 (https://github.com/pocketbase/js-sdk/issues/21).":this.message="Something went wrong."),this.cause=this.originalError}get data(){return this.response}toJSON(){return{...this}}}const au=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function Qz(e,n){const t={};if(typeof e!="string")return t;const i=Object.assign({},{}).decode||Jz;let o=0;for(;o<e.length;){const r=e.indexOf("=",o);if(r===-1)break;let s=e.indexOf(";",o);if(s===-1)s=e.length;else if(s<r){o=e.lastIndexOf(";",r-1)+1;continue}const u=e.slice(o,r).trim();if(t[u]===void 0){let l=e.slice(r+1,s).trim();l.charCodeAt(0)===34&&(l=l.slice(1,-1));try{t[u]=i(l)}catch{t[u]=l}}o=s+1}return t}function pN(e,n,t){const i=Object.assign({},t||{}),o=i.encode||Xz;if(!au.test(e))throw new TypeError("argument name is invalid");const r=o(n);if(r&&!au.test(r))throw new TypeError("argument val is invalid");let s=e+"="+r;if(i.maxAge!=null){const u=i.maxAge-0;if(isNaN(u)||!isFinite(u))throw new TypeError("option maxAge is invalid");s+="; Max-Age="+Math.floor(u)}if(i.domain){if(!au.test(i.domain))throw new TypeError("option domain is invalid");s+="; Domain="+i.domain}if(i.path){if(!au.test(i.path))throw new TypeError("option path is invalid");s+="; Path="+i.path}if(i.expires){if(!function(l){return Object.prototype.toString.call(l)==="[object Date]"||l instanceof Date}(i.expires)||isNaN(i.expires.valueOf()))throw new TypeError("option expires is invalid");s+="; Expires="+i.expires.toUTCString()}if(i.httpOnly&&(s+="; HttpOnly"),i.secure&&(s+="; Secure"),i.priority)switch(typeof i.priority=="string"?i.priority.toLowerCase():i.priority){case"low":s+="; Priority=Low";break;case"medium":s+="; Priority=Medium";break;case"high":s+="; Priority=High";break;default:throw new TypeError("option priority is invalid")}if(i.sameSite)switch(typeof i.sameSite=="string"?i.sameSite.toLowerCase():i.sameSite){case!0:s+="; SameSite=Strict";break;case"lax":s+="; SameSite=Lax";break;case"strict":s+="; SameSite=Strict";break;case"none":s+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return s}function Jz(e){return e.indexOf("%")!==-1?decodeURIComponent(e):e}function Xz(e){return encodeURIComponent(e)}const Zz=typeof navigator<"u"&&navigator.product==="ReactNative"||typeof global<"u"&&global.HermesInternal;let aN;function jr(e){if(e)try{const n=decodeURIComponent(aN(e.split(".")[1]).split("").map(function(t){return"%"+("00"+t.charCodeAt(0).toString(16)).slice(-2)}).join(""));return JSON.parse(n)||{}}catch{}return{}}function vN(e,n=0){let t=jr(e);return!(Object.keys(t).length>0&&(!t.exp||t.exp-n>Date.now()/1e3))}aN=typeof atob!="function"||Zz?e=>{let n=String(e).replace(/=+$/,"");if(n.length%4==1)throw new Error("'atob' failed: The string to be decoded is not correctly encoded.");for(var t,i,o=0,r=0,s="";i=n.charAt(r++);~i&&(t=o%4?64*t+i:i,o++%4)?s+=String.fromCharCode(255&t>>(-2*o&6)):0)i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(i);return s}:atob;const mN="pb_auth";class k_{constructor(){this.baseToken="",this.baseModel=null,this._onChangeCallbacks=[]}get token(){return this.baseToken}get record(){return this.baseModel}get model(){return this.baseModel}get isValid(){return!vN(this.token)}get isSuperuser(){var t,i;let n=jr(this.token);return n.type=="auth"&&(((t=this.record)==null?void 0:t.collectionName)=="_superusers"||!((i=this.record)!=null&&i.collectionName)&&n.collectionId=="pbc_3142635823")}get isAdmin(){return console.warn("Please replace pb.authStore.isAdmin with pb.authStore.isSuperuser OR simply check the value of pb.authStore.record?.collectionName"),this.isSuperuser}get isAuthRecord(){return console.warn("Please replace pb.authStore.isAuthRecord with !pb.authStore.isSuperuser OR simply check the value of pb.authStore.record?.collectionName"),jr(this.token).type=="auth"&&!this.isSuperuser}save(n,t){this.baseToken=n||"",this.baseModel=t||null,this.triggerChange()}clear(){this.baseToken="",this.baseModel=null,this.triggerChange()}loadFromCookie(n,t=mN){const i=Qz(n||"")[t]||"";let o={};try{o=JSON.parse(i),(typeof o===null||typeof o!="object"||Array.isArray(o))&&(o={})}catch{}this.save(o.token||"",o.record||o.model||null)}exportToCookie(n,t=mN){var l,d;const i={secure:!0,sameSite:!0,httpOnly:!0,path:"/"},o=jr(this.token);i.expires=o!=null&&o.exp?new Date(1e3*o.exp):new Date("1970-01-01"),n=Object.assign({},i,n);const r={token:this.token,record:this.record?JSON.parse(JSON.stringify(this.record)):null};let s=pN(t,JSON.stringify(r),n);const u=typeof Blob<"u"?new Blob([s]).size:s.length;if(r.record&&u>4096){r.record={id:(l=r.record)==null?void 0:l.id,email:(d=r.record)==null?void 0:d.email};const c=["collectionId","collectionName","verified"];for(const _ in this.record)c.includes(_)&&(r.record[_]=this.record[_]);s=pN(t,JSON.stringify(r),n)}return s}onChange(n,t=!1){return this._onChangeCallbacks.push(n),t&&n(this.token,this.record),()=>{for(let i=this._onChangeCallbacks.length-1;i>=0;i--)if(this._onChangeCallbacks[i]==n)return delete this._onChangeCallbacks[i],void this._onChangeCallbacks.splice(i,1)}}triggerChange(){for(const n of this._onChangeCallbacks)n&&n(this.token,this.record)}}class eY extends k_{constructor(n="pocketbase_auth"){super(),this.storageFallback={},this.storageKey=n,this._bindStorageEvent()}get token(){return(this._storageGet(this.storageKey)||{}).token||""}get record(){const n=this._storageGet(this.storageKey)||{};return n.record||n.model||null}get model(){return this.record}save(n,t){this._storageSet(this.storageKey,{token:n,record:t}),super.save(n,t)}clear(){this._storageRemove(this.storageKey),super.clear()}_storageGet(n){if(typeof window<"u"&&(window!=null&&window.localStorage)){const t=window.localStorage.getItem(n)||"";try{return JSON.parse(t)}catch{return t}}return this.storageFallback[n]}_storageSet(n,t){if(typeof window<"u"&&(window!=null&&window.localStorage)){let i=t;typeof t!="string"&&(i=JSON.stringify(t)),window.localStorage.setItem(n,i)}else this.storageFallback[n]=t}_storageRemove(n){var t;typeof window<"u"&&(window!=null&&window.localStorage)&&((t=window.localStorage)==null||t.removeItem(n)),delete this.storageFallback[n]}_bindStorageEvent(){typeof window<"u"&&(window!=null&&window.localStorage)&&window.addEventListener&&window.addEventListener("storage",n=>{if(n.key!=this.storageKey)return;const t=this._storageGet(this.storageKey)||{};super.save(t.token||"",t.record||t.model||null)})}}class Fi{constructor(n){this.client=n}}class tY extends Fi{async getAll(n){return n=Object.assign({method:"GET"},n),this.client.send("/api/settings",n)}async update(n,t){return t=Object.assign({method:"PATCH",body:n},t),this.client.send("/api/settings",t)}async testS3(n="storage",t){return t=Object.assign({method:"POST",body:{filesystem:n}},t),this.client.send("/api/settings/test/s3",t).then(()=>!0)}async testEmail(n,t,i,o){return o=Object.assign({method:"POST",body:{email:t,template:i,collection:n}},o),this.client.send("/api/settings/test/email",o).then(()=>!0)}async generateAppleClientSecret(n,t,i,o,r,s){return s=Object.assign({method:"POST",body:{clientId:n,teamId:t,keyId:i,privateKey:o,duration:r}},s),this.client.send("/api/settings/apple/generate-client-secret",s)}}const nY=["requestKey","$cancelKey","$autoCancel","fetch","headers","body","query","params","cache","credentials","headers","integrity","keepalive","method","mode","redirect","referrer","referrerPolicy","signal","window"];function L_(e){if(e){e.query=e.query||{};for(let n in e)nY.includes(n)||(e.query[n]=e[n],delete e[n])}}function hN(e){const n=[];for(const t in e){const i=encodeURIComponent(t),o=Array.isArray(e[t])?e[t]:[e[t]];for(let r of o)r=iY(r),r!==null&&n.push(i+"="+r)}return n.join("&")}function iY(e){return e==null?null:e instanceof Date?encodeURIComponent(e.toISOString().replace("T"," ")):encodeURIComponent(typeof e=="object"?JSON.stringify(e):e)}class yN extends Fi{constructor(){super(...arguments),this.clientId="",this.eventSource=null,this.subscriptions={},this.lastSentSubscriptions=[],this.maxConnectTimeout=15e3,this.reconnectAttempts=0,this.maxReconnectAttempts=1/0,this.predefinedReconnectIntervals=[200,300,500,1e3,1200,1500,2e3],this.pendingConnects=[]}get isConnected(){return!!this.eventSource&&!!this.clientId&&!this.pendingConnects.length}async subscribe(n,t,i){var s;if(!n)throw new Error("topic must be set.");let o=n;if(i){L_(i=Object.assign({},i));const u="options="+encodeURIComponent(JSON.stringify({query:i.query,headers:i.headers}));o+=(o.includes("?")?"&":"?")+u}const r=function(u){const l=u;let d;try{d=JSON.parse(l==null?void 0:l.data)}catch{}t(d||{})};return this.subscriptions[o]||(this.subscriptions[o]=[]),this.subscriptions[o].push(r),this.isConnected?this.subscriptions[o].length===1?await this.submitSubscriptions():(s=this.eventSource)==null||s.addEventListener(o,r):await this.connect(),async()=>this.unsubscribeByTopicAndListener(n,r)}async unsubscribe(n){var i;let t=!1;if(n){const o=this.getSubscriptionsByTopic(n);for(let r in o)if(this.hasSubscriptionListeners(r)){for(let s of this.subscriptions[r])(i=this.eventSource)==null||i.removeEventListener(r,s);delete this.subscriptions[r],t||(t=!0)}}else this.subscriptions={};this.hasSubscriptionListeners()?t&&await this.submitSubscriptions():this.disconnect()}async unsubscribeByPrefix(n){var i;let t=!1;for(let o in this.subscriptions)if((o+"?").startsWith(n)){t=!0;for(let r of this.subscriptions[o])(i=this.eventSource)==null||i.removeEventListener(o,r);delete this.subscriptions[o]}t&&(this.hasSubscriptionListeners()?await this.submitSubscriptions():this.disconnect())}async unsubscribeByTopicAndListener(n,t){var r;let i=!1;const o=this.getSubscriptionsByTopic(n);for(let s in o){if(!Array.isArray(this.subscriptions[s])||!this.subscriptions[s].length)continue;let u=!1;for(let l=this.subscriptions[s].length-1;l>=0;l--)this.subscriptions[s][l]===t&&(u=!0,delete this.subscriptions[s][l],this.subscriptions[s].splice(l,1),(r=this.eventSource)==null||r.removeEventListener(s,t));u&&(this.subscriptions[s].length||delete this.subscriptions[s],i||this.hasSubscriptionListeners(s)||(i=!0))}this.hasSubscriptionListeners()?i&&await this.submitSubscriptions():this.disconnect()}hasSubscriptionListeners(n){var t,i;if(this.subscriptions=this.subscriptions||{},n)return!!((t=this.subscriptions[n])!=null&&t.length);for(let o in this.subscriptions)if((i=this.subscriptions[o])!=null&&i.length)return!0;return!1}async submitSubscriptions(){if(this.clientId)return this.addAllSubscriptionListeners(),this.lastSentSubscriptions=this.getNonEmptySubscriptionKeys(),this.client.send("/api/realtime",{method:"POST",body:{clientId:this.clientId,subscriptions:this.lastSentSubscriptions},requestKey:this.getSubscriptionsCancelKey()}).catch(n=>{if(!(n!=null&&n.isAbort))throw n})}getSubscriptionsCancelKey(){return"realtime_"+this.clientId}getSubscriptionsByTopic(n){const t={};n=n.includes("?")?n:n+"?";for(let i in this.subscriptions)(i+"?").startsWith(n)&&(t[i]=this.subscriptions[i]);return t}getNonEmptySubscriptionKeys(){const n=[];for(let t in this.subscriptions)this.subscriptions[t].length&&n.push(t);return n}addAllSubscriptionListeners(){if(this.eventSource){this.removeAllSubscriptionListeners();for(let n in this.subscriptions)for(let t of this.subscriptions[n])this.eventSource.addEventListener(n,t)}}removeAllSubscriptionListeners(){if(this.eventSource)for(let n in this.subscriptions)for(let t of this.subscriptions[n])this.eventSource.removeEventListener(n,t)}async connect(){if(!(this.reconnectAttempts>0))return new Promise((n,t)=>{this.pendingConnects.push({resolve:n,reject:t}),this.pendingConnects.length>1||this.initConnect()})}initConnect(){this.disconnect(!0),clearTimeout(this.connectTimeoutId),this.connectTimeoutId=setTimeout(()=>{this.connectErrorHandler(new Error("EventSource connect took too long."))},this.maxConnectTimeout),this.eventSource=new EventSource(this.client.buildURL("/api/realtime")),this.eventSource.onerror=n=>{this.connectErrorHandler(new Error("Failed to establish realtime connection."))},this.eventSource.addEventListener("PB_CONNECT",n=>{const t=n;this.clientId=t==null?void 0:t.lastEventId,this.submitSubscriptions().then(async()=>{let i=3;for(;this.hasUnsentSubscriptions()&&i>0;)i--,await this.submitSubscriptions()}).then(()=>{for(let o of this.pendingConnects)o.resolve();this.pendingConnects=[],this.reconnectAttempts=0,clearTimeout(this.reconnectTimeoutId),clearTimeout(this.connectTimeoutId);const i=this.getSubscriptionsByTopic("PB_CONNECT");for(let o in i)for(let r of i[o])r(n)}).catch(i=>{this.clientId="",this.connectErrorHandler(i)})})}hasUnsentSubscriptions(){const n=this.getNonEmptySubscriptionKeys();if(n.length!=this.lastSentSubscriptions.length)return!0;for(const t of n)if(!this.lastSentSubscriptions.includes(t))return!0;return!1}connectErrorHandler(n){if(clearTimeout(this.connectTimeoutId),clearTimeout(this.reconnectTimeoutId),!this.clientId&&!this.reconnectAttempts||this.reconnectAttempts>this.maxReconnectAttempts){for(let i of this.pendingConnects)i.reject(new Wn(n));return this.pendingConnects=[],void this.disconnect()}this.disconnect(!0);const t=this.predefinedReconnectIntervals[this.reconnectAttempts]||this.predefinedReconnectIntervals[this.predefinedReconnectIntervals.length-1];this.reconnectAttempts++,this.reconnectTimeoutId=setTimeout(()=>{this.initConnect()},t)}disconnect(n=!1){var t;if(this.clientId&&this.onDisconnect&&this.onDisconnect(Object.keys(this.subscriptions)),clearTimeout(this.connectTimeoutId),clearTimeout(this.reconnectTimeoutId),this.removeAllSubscriptionListeners(),this.client.cancelRequest(this.getSubscriptionsCancelKey()),(t=this.eventSource)==null||t.close(),this.eventSource=null,this.clientId="",!n){this.reconnectAttempts=0;for(let i of this.pendingConnects)i.resolve();this.pendingConnects=[]}}}class gN extends Fi{decode(n){return n}async getFullList(n,t){if(typeof n=="number")return this._getFullList(n,t);let i=500;return(t=Object.assign({},n,t)).batch&&(i=t.batch,delete t.batch),this._getFullList(i,t)}async getList(n=1,t=30,i){return(i=Object.assign({method:"GET"},i)).query=Object.assign({page:n,perPage:t},i.query),this.client.send(this.baseCrudPath,i).then(o=>{var r;return o.items=((r=o.items)==null?void 0:r.map(s=>this.decode(s)))||[],o})}async getFirstListItem(n,t){return(t=Object.assign({requestKey:"one_by_filter_"+this.baseCrudPath+"_"+n},t)).query=Object.assign({filter:n,skipTotal:1},t.query),this.getList(1,1,t).then(i=>{var o;if(!((o=i==null?void 0:i.items)!=null&&o.length))throw new Wn({status:404,response:{code:404,message:"The requested resource wasn't found.",data:{}}});return i.items[0]})}async getOne(n,t){if(!n)throw new Wn({url:this.client.buildURL(this.baseCrudPath+"/"),status:404,response:{code:404,message:"Missing required record id.",data:{}}});return t=Object.assign({method:"GET"},t),this.client.send(this.baseCrudPath+"/"+encodeURIComponent(n),t).then(i=>this.decode(i))}async create(n,t){return t=Object.assign({method:"POST",body:n},t),this.client.send(this.baseCrudPath,t).then(i=>this.decode(i))}async update(n,t,i){return i=Object.assign({method:"PATCH",body:t},i),this.client.send(this.baseCrudPath+"/"+encodeURIComponent(n),i).then(o=>this.decode(o))}async delete(n,t){return t=Object.assign({method:"DELETE"},t),this.client.send(this.baseCrudPath+"/"+encodeURIComponent(n),t).then(()=>!0)}_getFullList(n=500,t){(t=t||{}).query=Object.assign({skipTotal:1},t.query);let i=[],o=async r=>this.getList(r,n||500,t).then(s=>{const u=s.items;return i=i.concat(u),u.length==s.perPage?o(r+1):i});return o(1)}}function ro(e,n,t,i){const o=i!==void 0;return o||t!==void 0?o?(console.warn(e),n.body=Object.assign({},n.body,t),n.query=Object.assign({},n.query,i),n):Object.assign(n,t):n}function U_(e){var n;(n=e._resetAutoRefresh)==null||n.call(e)}class oY extends gN{constructor(n,t){super(n),this.collectionIdOrName=t}get baseCrudPath(){return this.baseCollectionPath+"/records"}get baseCollectionPath(){return"/api/collections/"+encodeURIComponent(this.collectionIdOrName)}get isSuperusers(){return this.collectionIdOrName=="_superusers"||this.collectionIdOrName=="_pbc_2773867675"}async subscribe(n,t,i){if(!n)throw new Error("Missing topic.");if(!t)throw new Error("Missing subscription callback.");return this.client.realtime.subscribe(this.collectionIdOrName+"/"+n,t,i)}async unsubscribe(n){return n?this.client.realtime.unsubscribe(this.collectionIdOrName+"/"+n):this.client.realtime.unsubscribeByPrefix(this.collectionIdOrName)}async getFullList(n,t){if(typeof n=="number")return super.getFullList(n,t);const i=Object.assign({},n,t);return super.getFullList(i)}async getList(n=1,t=30,i){return super.getList(n,t,i)}async getFirstListItem(n,t){return super.getFirstListItem(n,t)}async getOne(n,t){return super.getOne(n,t)}async create(n,t){return super.create(n,t)}async update(n,t,i){return super.update(n,t,i).then(o=>{var r,s,u;if(((r=this.client.authStore.record)==null?void 0:r.id)===(o==null?void 0:o.id)&&(((s=this.client.authStore.record)==null?void 0:s.collectionId)===this.collectionIdOrName||((u=this.client.authStore.record)==null?void 0:u.collectionName)===this.collectionIdOrName)){let l=Object.assign({},this.client.authStore.record.expand),d=Object.assign({},this.client.authStore.record,o);l&&(d.expand=Object.assign(l,o.expand)),this.client.authStore.save(this.client.authStore.token,d)}return o})}async delete(n,t){return super.delete(n,t).then(i=>{var o,r,s;return!i||((o=this.client.authStore.record)==null?void 0:o.id)!==n||((r=this.client.authStore.record)==null?void 0:r.collectionId)!==this.collectionIdOrName&&((s=this.client.authStore.record)==null?void 0:s.collectionName)!==this.collectionIdOrName||this.client.authStore.clear(),i})}authResponse(n){const t=this.decode((n==null?void 0:n.record)||{});return this.client.authStore.save(n==null?void 0:n.token,t),Object.assign({},n,{token:(n==null?void 0:n.token)||"",record:t})}async listAuthMethods(n){return n=Object.assign({method:"GET",fields:"mfa,otp,password,oauth2"},n),this.client.send(this.baseCollectionPath+"/auth-methods",n)}async authWithPassword(n,t,i){let o;i=Object.assign({method:"POST",body:{identity:n,password:t}},i),this.isSuperusers&&(o=i.autoRefreshThreshold,delete i.autoRefreshThreshold,i.autoRefresh||U_(this.client));let r=await this.client.send(this.baseCollectionPath+"/auth-with-password",i);return r=this.authResponse(r),o&&this.isSuperusers&&function(u,l,d,c){U_(u);const _=u.beforeSend,f=u.authStore.record,p=u.authStore.onChange((a,v)=>{(!a||(v==null?void 0:v.id)!=(f==null?void 0:f.id)||(v!=null&&v.collectionId||f!=null&&f.collectionId)&&(v==null?void 0:v.collectionId)!=(f==null?void 0:f.collectionId))&&U_(u)});u._resetAutoRefresh=function(){p(),u.beforeSend=_,delete u._resetAutoRefresh},u.beforeSend=async(a,v)=>{var y;const m=u.authStore.token;if((y=v.query)!=null&&y.autoRefresh)return _?_(a,v):{url:a,sendOptions:v};let g=u.authStore.isValid;if(g&&vN(u.authStore.token,l))try{await d()}catch{g=!1}g||await c();const E=v.headers||{};for(let S in E)if(S.toLowerCase()=="authorization"&&m==E[S]&&u.authStore.token){E[S]=u.authStore.token;break}return v.headers=E,_?_(a,v):{url:a,sendOptions:v}}}(this.client,o,()=>this.authRefresh({autoRefresh:!0}),()=>this.authWithPassword(n,t,Object.assign({autoRefresh:!0},i))),r}async authWithOAuth2Code(n,t,i,o,r,s,u){let l={method:"POST",body:{provider:n,code:t,codeVerifier:i,redirectURL:o,createData:r}};return l=ro("This form of authWithOAuth2Code(provider, code, codeVerifier, redirectURL, createData?, body?, query?) is deprecated. Consider replacing it with authWithOAuth2Code(provider, code, codeVerifier, redirectURL, createData?, options?).",l,s,u),this.client.send(this.baseCollectionPath+"/auth-with-oauth2",l).then(d=>this.authResponse(d))}authWithOAuth2(...n){if(n.length>1||typeof(n==null?void 0:n[0])=="string")return console.warn("PocketBase: This form of authWithOAuth2() is deprecated and may get removed in the future. Please replace with authWithOAuth2Code() OR use the authWithOAuth2() realtime form as shown in https://pocketbase.io/docs/authentication/#oauth2-integration."),this.authWithOAuth2Code((n==null?void 0:n[0])||"",(n==null?void 0:n[1])||"",(n==null?void 0:n[2])||"",(n==null?void 0:n[3])||"",(n==null?void 0:n[4])||{},(n==null?void 0:n[5])||{},(n==null?void 0:n[6])||{});const t=(n==null?void 0:n[0])||{};let i=null;t.urlCallback||(i=EN(void 0));const o=new yN(this.client);function r(){i==null||i.close(),o.unsubscribe()}const s={},u=t.requestKey;return u&&(s.requestKey=u),this.listAuthMethods(s).then(l=>{var f;const d=l.oauth2.providers.find(p=>p.name===t.provider);if(!d)throw new Wn(new Error(`Missing or invalid provider "${t.provider}".`));const c=this.client.buildURL("/api/oauth2-redirect"),_=u?(f=this.client.cancelControllers)==null?void 0:f[u]:void 0;return _&&(_.signal.onabort=()=>{r()}),new Promise(async(p,a)=>{var v;try{await o.subscribe("@oauth2",async y=>{var C;const S=o.clientId;try{if(!y.state||S!==y.state)throw new Error("State parameters don't match.");if(y.error||!y.code)throw new Error("OAuth2 redirect error or missing code: "+y.error);const T=Object.assign({},t);delete T.provider,delete T.scopes,delete T.createData,delete T.urlCallback,(C=_==null?void 0:_.signal)!=null&&C.onabort&&(_.signal.onabort=null);const R=await this.authWithOAuth2Code(d.name,y.code,d.codeVerifier,c,t.createData,T);p(R)}catch(T){a(new Wn(T))}r()});const m={state:o.clientId};(v=t.scopes)!=null&&v.length&&(m.scope=t.scopes.join(" "));const g=this._replaceQueryParams(d.authURL+c,m);await(t.urlCallback||function(y){i?i.location.href=y:i=EN(y)})(g)}catch(m){r(),a(new Wn(m))}})}).catch(l=>{throw r(),l})}async authRefresh(n,t){let i={method:"POST"};return i=ro("This form of authRefresh(body?, query?) is deprecated. Consider replacing it with authRefresh(options?).",i,n,t),this.client.send(this.baseCollectionPath+"/auth-refresh",i).then(o=>this.authResponse(o))}async requestPasswordReset(n,t,i){let o={method:"POST",body:{email:n}};return o=ro("This form of requestPasswordReset(email, body?, query?) is deprecated. Consider replacing it with requestPasswordReset(email, options?).",o,t,i),this.client.send(this.baseCollectionPath+"/request-password-reset",o).then(()=>!0)}async confirmPasswordReset(n,t,i,o,r){let s={method:"POST",body:{token:n,password:t,passwordConfirm:i}};return s=ro("This form of confirmPasswordReset(token, password, passwordConfirm, body?, query?) is deprecated. Consider replacing it with confirmPasswordReset(token, password, passwordConfirm, options?).",s,o,r),this.client.send(this.baseCollectionPath+"/confirm-password-reset",s).then(()=>!0)}async requestVerification(n,t,i){let o={method:"POST",body:{email:n}};return o=ro("This form of requestVerification(email, body?, query?) is deprecated. Consider replacing it with requestVerification(email, options?).",o,t,i),this.client.send(this.baseCollectionPath+"/request-verification",o).then(()=>!0)}async confirmVerification(n,t,i){let o={method:"POST",body:{token:n}};return o=ro("This form of confirmVerification(token, body?, query?) is deprecated. Consider replacing it with confirmVerification(token, options?).",o,t,i),this.client.send(this.baseCollectionPath+"/confirm-verification",o).then(()=>{const r=jr(n),s=this.client.authStore.record;return s&&!s.verified&&s.id===r.id&&s.collectionId===r.collectionId&&(s.verified=!0,this.client.authStore.save(this.client.authStore.token,s)),!0})}async requestEmailChange(n,t,i){let o={method:"POST",body:{newEmail:n}};return o=ro("This form of requestEmailChange(newEmail, body?, query?) is deprecated. Consider replacing it with requestEmailChange(newEmail, options?).",o,t,i),this.client.send(this.baseCollectionPath+"/request-email-change",o).then(()=>!0)}async confirmEmailChange(n,t,i,o){let r={method:"POST",body:{token:n,password:t}};return r=ro("This form of confirmEmailChange(token, password, body?, query?) is deprecated. Consider replacing it with confirmEmailChange(token, password, options?).",r,i,o),this.client.send(this.baseCollectionPath+"/confirm-email-change",r).then(()=>{const s=jr(n),u=this.client.authStore.record;return u&&u.id===s.id&&u.collectionId===s.collectionId&&this.client.authStore.clear(),!0})}async listExternalAuths(n,t){return this.client.collection("_externalAuths").getFullList(Object.assign({},t,{filter:this.client.filter("recordRef = {:id}",{id:n})}))}async unlinkExternalAuth(n,t,i){const o=await this.client.collection("_externalAuths").getFirstListItem(this.client.filter("recordRef = {:recordId} && provider = {:provider}",{recordId:n,provider:t}));return this.client.collection("_externalAuths").delete(o.id,i).then(()=>!0)}async requestOTP(n,t){return t=Object.assign({method:"POST",body:{email:n}},t),this.client.send(this.baseCollectionPath+"/request-otp",t)}async authWithOTP(n,t,i){return i=Object.assign({method:"POST",body:{otpId:n,password:t}},i),this.client.send(this.baseCollectionPath+"/auth-with-otp",i).then(o=>this.authResponse(o))}async impersonate(n,t,i){(i=Object.assign({method:"POST",body:{duration:t}},i)).headers=i.headers||{},i.headers.Authorization||(i.headers.Authorization=this.client.authStore.token);const o=new bN(this.client.baseURL,new k_,this.client.lang),r=await o.send(this.baseCollectionPath+"/impersonate/"+encodeURIComponent(n),i);return o.authStore.save(r==null?void 0:r.token,this.decode((r==null?void 0:r.record)||{})),o}_replaceQueryParams(n,t={}){let i=n,o="";n.indexOf("?")>=0&&(i=n.substring(0,n.indexOf("?")),o=n.substring(n.indexOf("?")+1));const r={},s=o.split("&");for(const u of s){if(u=="")continue;const l=u.split("=");r[decodeURIComponent(l[0].replace(/\+/g," "))]=decodeURIComponent((l[1]||"").replace(/\+/g," "))}for(let u in t)t.hasOwnProperty(u)&&(t[u]==null?delete r[u]:r[u]=t[u]);o="";for(let u in r)r.hasOwnProperty(u)&&(o!=""&&(o+="&"),o+=encodeURIComponent(u.replace(/%20/g,"+"))+"="+encodeURIComponent(r[u].replace(/%20/g,"+")));return o!=""?i+"?"+o:i}}function EN(e){if(typeof window>"u"||!(window!=null&&window.open))throw new Wn(new Error("Not in a browser context - please pass a custom urlCallback function."));let n=1024,t=768,i=window.innerWidth,o=window.innerHeight;n=n>i?i:n,t=t>o?o:t;let r=i/2-n/2,s=o/2-t/2;return window.open(e,"popup_window","width="+n+",height="+t+",top="+s+",left="+r+",resizable,menubar=no")}class rY extends gN{get baseCrudPath(){return"/api/collections"}async import(n,t=!1,i){return i=Object.assign({method:"PUT",body:{collections:n,deleteMissing:t}},i),this.client.send(this.baseCrudPath+"/import",i).then(()=>!0)}async getScaffolds(n){return n=Object.assign({method:"GET"},n),this.client.send(this.baseCrudPath+"/meta/scaffolds",n)}async truncate(n,t){return t=Object.assign({method:"DELETE"},t),this.client.send(this.baseCrudPath+"/"+encodeURIComponent(n)+"/truncate",t).then(()=>!0)}}class sY extends Fi{async getList(n=1,t=30,i){return(i=Object.assign({method:"GET"},i)).query=Object.assign({page:n,perPage:t},i.query),this.client.send("/api/logs",i)}async getOne(n,t){if(!n)throw new Wn({url:this.client.buildURL("/api/logs/"),status:404,response:{code:404,message:"Missing required log id.",data:{}}});return t=Object.assign({method:"GET"},t),this.client.send("/api/logs/"+encodeURIComponent(n),t)}async getStats(n){return n=Object.assign({method:"GET"},n),this.client.send("/api/logs/stats",n)}}class lY extends Fi{async check(n){return n=Object.assign({method:"GET"},n),this.client.send("/api/health",n)}}class uY extends Fi{getUrl(n,t,i={}){return console.warn("Please replace pb.files.getUrl() with pb.files.getURL()"),this.getURL(n,t,i)}getURL(n,t,i={}){if(!t||!(n!=null&&n.id)||!(n!=null&&n.collectionId)&&!(n!=null&&n.collectionName))return"";const o=[];o.push("api"),o.push("files"),o.push(encodeURIComponent(n.collectionId||n.collectionName)),o.push(encodeURIComponent(n.id)),o.push(encodeURIComponent(t));let r=this.client.buildURL(o.join("/"));if(Object.keys(i).length){i.download===!1&&delete i.download;const s=new URLSearchParams(i);r+=(r.includes("?")?"&":"?")+s}return r}async getToken(n){return n=Object.assign({method:"POST"},n),this.client.send("/api/files/token",n).then(t=>(t==null?void 0:t.token)||"")}}class dY extends Fi{async getFullList(n){return n=Object.assign({method:"GET"},n),this.client.send("/api/backups",n)}async create(n,t){return t=Object.assign({method:"POST",body:{name:n}},t),this.client.send("/api/backups",t).then(()=>!0)}async upload(n,t){return t=Object.assign({method:"POST",body:n},t),this.client.send("/api/backups/upload",t).then(()=>!0)}async delete(n,t){return t=Object.assign({method:"DELETE"},t),this.client.send(`/api/backups/${encodeURIComponent(n)}`,t).then(()=>!0)}async restore(n,t){return t=Object.assign({method:"POST"},t),this.client.send(`/api/backups/${encodeURIComponent(n)}/restore`,t).then(()=>!0)}getDownloadUrl(n,t){return console.warn("Please replace pb.backups.getDownloadUrl() with pb.backups.getDownloadURL()"),this.getDownloadURL(n,t)}getDownloadURL(n,t){return this.client.buildURL(`/api/backups/${encodeURIComponent(t)}?token=${encodeURIComponent(n)}`)}}class cY extends Fi{async getFullList(n){return n=Object.assign({method:"GET"},n),this.client.send("/api/crons",n)}async run(n,t){return t=Object.assign({method:"POST"},t),this.client.send(`/api/crons/${encodeURIComponent(n)}`,t).then(()=>!0)}}function B_(e){return typeof Blob<"u"&&e instanceof Blob||typeof File<"u"&&e instanceof File||e!==null&&typeof e=="object"&&e.uri&&(typeof navigator<"u"&&navigator.product==="ReactNative"||typeof global<"u"&&global.HermesInternal)}function j_(e){var n;return e&&(((n=e.constructor)==null?void 0:n.name)==="FormData"||typeof FormData<"u"&&e instanceof FormData)}function TN(e){for(const n in e){const t=Array.isArray(e[n])?e[n]:[e[n]];for(const i of t)if(B_(i))return!0}return!1}const _Y=/^[\-\.\d]+$/;function SN(e){if(typeof e!="string")return e;if(e=="true")return!0;if(e=="false")return!1;if((e[0]==="-"||e[0]>="0"&&e[0]<="9")&&_Y.test(e)){let n=+e;if(""+n===e)return n}return e}class fY extends Fi{constructor(){super(...arguments),this.requests=[],this.subs={}}collection(n){return this.subs[n]||(this.subs[n]=new pY(this.requests,n)),this.subs[n]}async send(n){const t=new FormData,i=[];for(let o=0;o<this.requests.length;o++){const r=this.requests[o];if(i.push({method:r.method,url:r.url,headers:r.headers,body:r.json}),r.files)for(let s in r.files){const u=r.files[s]||[];for(let l of u)t.append("requests."+o+"."+s,l)}}return t.append("@jsonPayload",JSON.stringify({requests:i})),n=Object.assign({method:"POST",body:t},n),this.client.send("/api/batch",n)}}class pY{constructor(n,t){this.requests=[],this.requests=n,this.collectionIdOrName=t}upsert(n,t){t=Object.assign({body:n||{}},t);const i={method:"PUT",url:"/api/collections/"+encodeURIComponent(this.collectionIdOrName)+"/records"};this.prepareRequest(i,t),this.requests.push(i)}create(n,t){t=Object.assign({body:n||{}},t);const i={method:"POST",url:"/api/collections/"+encodeURIComponent(this.collectionIdOrName)+"/records"};this.prepareRequest(i,t),this.requests.push(i)}update(n,t,i){i=Object.assign({body:t||{}},i);const o={method:"PATCH",url:"/api/collections/"+encodeURIComponent(this.collectionIdOrName)+"/records/"+encodeURIComponent(n)};this.prepareRequest(o,i),this.requests.push(o)}delete(n,t){t=Object.assign({},t);const i={method:"DELETE",url:"/api/collections/"+encodeURIComponent(this.collectionIdOrName)+"/records/"+encodeURIComponent(n)};this.prepareRequest(i,t),this.requests.push(i)}prepareRequest(n,t){if(L_(t),n.headers=t.headers,n.json={},n.files={},t.query!==void 0){const o=hN(t.query);o&&(n.url+=(n.url.includes("?")?"&":"?")+o)}let i=t.body;j_(i)&&(i=function(r){let s={};return r.forEach((u,l)=>{if(l==="@jsonPayload"&&typeof u=="string")try{let d=JSON.parse(u);Object.assign(s,d)}catch(d){console.warn("@jsonPayload error:",d)}else s[l]!==void 0?(Array.isArray(s[l])||(s[l]=[s[l]]),s[l].push(SN(u))):s[l]=SN(u)}),s}(i));for(const o in i){const r=i[o];if(B_(r))n.files[o]=n.files[o]||[],n.files[o].push(r);else if(Array.isArray(r)){const s=[],u=[];for(const l of r)B_(l)?s.push(l):u.push(l);if(s.length>0&&s.length==r.length){n.files[o]=n.files[o]||[];for(let l of s)n.files[o].push(l)}else if(n.json[o]=u,s.length>0){let l=o;o.startsWith("+")||o.endsWith("+")||(l+="+"),n.files[l]=n.files[l]||[];for(let d of s)n.files[l].push(d)}}else n.json[o]=r}}}class bN{get baseUrl(){return this.baseURL}set baseUrl(n){this.baseURL=n}constructor(n="/",t,i="en-US"){this.cancelControllers={},this.recordServices={},this.enableAutoCancellation=!0,this.baseURL=n,this.lang=i,t?this.authStore=t:typeof window<"u"&&window.Deno?this.authStore=new k_:this.authStore=new eY,this.collections=new rY(this),this.files=new uY(this),this.logs=new sY(this),this.settings=new tY(this),this.realtime=new yN(this),this.health=new lY(this),this.backups=new dY(this),this.crons=new cY(this)}get admins(){return this.collection("_superusers")}createBatch(){return new fY(this)}collection(n){return this.recordServices[n]||(this.recordServices[n]=new oY(this,n)),this.recordServices[n]}autoCancellation(n){return this.enableAutoCancellation=!!n,this}cancelRequest(n){return this.cancelControllers[n]&&(this.cancelControllers[n].abort(),delete this.cancelControllers[n]),this}cancelAllRequests(){for(let n in this.cancelControllers)this.cancelControllers[n].abort();return this.cancelControllers={},this}filter(n,t){if(!t)return n;for(let i in t){let o=t[i];switch(typeof o){case"boolean":case"number":o=""+o;break;case"string":o="'"+o.replace(/'/g,"\\'")+"'";break;default:o=o===null?"null":o instanceof Date?"'"+o.toISOString().replace("T"," ")+"'":"'"+JSON.stringify(o).replace(/'/g,"\\'")+"'"}n=n.replaceAll("{:"+i+"}",o)}return n}getFileUrl(n,t,i={}){return console.warn("Please replace pb.getFileUrl() with pb.files.getURL()"),this.files.getURL(n,t,i)}buildUrl(n){return console.warn("Please replace pb.buildUrl() with pb.buildURL()"),this.buildURL(n)}buildURL(n){var i;let t=this.baseURL;return typeof window>"u"||!window.location||t.startsWith("https://")||t.startsWith("http://")||(t=(i=window.location.origin)!=null&&i.endsWith("/")?window.location.origin.substring(0,window.location.origin.length-1):window.location.origin||"",this.baseURL.startsWith("/")||(t+=window.location.pathname||"/",t+=t.endsWith("/")?"":"/"),t+=this.baseURL),n&&(t+=t.endsWith("/")?"":"/",t+=n.startsWith("/")?n.substring(1):n),t}async send(n,t){t=this.initSendOptions(n,t);let i=this.buildURL(n);if(this.beforeSend){const o=Object.assign({},await this.beforeSend(i,t));o.url!==void 0||o.options!==void 0?(i=o.url||i,t=o.options||t):Object.keys(o).length&&(t=o,console!=null&&console.warn&&console.warn("Deprecated format of beforeSend return: please use `return { url, options }`, instead of `return options`."))}if(t.query!==void 0){const o=hN(t.query);o&&(i+=(i.includes("?")?"&":"?")+o),delete t.query}return this.getHeader(t.headers,"Content-Type")=="application/json"&&t.body&&typeof t.body!="string"&&(t.body=JSON.stringify(t.body)),(t.fetch||fetch)(i,t).then(async o=>{var s;let r={};try{r=await o.json()}catch(u){if((s=t.signal)!=null&&s.aborted||typeof DOMException<"u"&&u instanceof DOMException&&(u.name=="AbortError"||u.code==20))throw u}if(this.afterSend&&(r=await this.afterSend(o,r,t)),o.status>=400)throw new Wn({url:o.url,status:o.status,data:r});return r}).catch(o=>{throw new Wn(o)})}initSendOptions(n,t){if((t=Object.assign({method:"GET"},t)).body=function(o){if(typeof FormData>"u"||o===void 0||typeof o!="object"||o===null||j_(o)||!TN(o))return o;const r=new FormData;for(const s in o){const u=o[s];if(u!==void 0)if(typeof u!="object"||TN({data:u})){const l=Array.isArray(u)?u:[u];for(let d of l)r.append(s,d)}else{let l={};l[s]=u,r.append("@jsonPayload",JSON.stringify(l))}}return r}(t.body),L_(t),t.query=Object.assign({},t.params,t.query),t.requestKey===void 0&&(t.$autoCancel===!1||t.query.$autoCancel===!1?t.requestKey=null:(t.$cancelKey||t.query.$cancelKey)&&(t.requestKey=t.$cancelKey||t.query.$cancelKey)),delete t.$autoCancel,delete t.query.$autoCancel,delete t.$cancelKey,delete t.query.$cancelKey,this.getHeader(t.headers,"Content-Type")!==null||j_(t.body)||(t.headers=Object.assign({},t.headers,{"Content-Type":"application/json"})),this.getHeader(t.headers,"Accept-Language")===null&&(t.headers=Object.assign({},t.headers,{"Accept-Language":this.lang})),this.authStore.token&&this.getHeader(t.headers,"Authorization")===null&&(t.headers=Object.assign({},t.headers,{Authorization:this.authStore.token})),this.enableAutoCancellation&&t.requestKey!==null){const i=t.requestKey||(t.method||"GET")+n;delete t.requestKey,this.cancelRequest(i);const o=new AbortController;this.cancelControllers[i]=o,t.signal=o.signal}return t}getHeader(n,t){n=n||{},t=t.toLowerCase();for(let i in n)if(i.toLowerCase()==t)return n[i];return null}}const IN=new bN("https://gap-calendar-log.gci-app.dtsmart.dev/"),aY=async e=>{await IN.collection("go_chat_service").create(e)},vY=async e=>{try{const n=await IN.collection("go_chat_service").getFirstListItem(`tenant_id="${e}"`);return!0}catch{return!1}},V_=h.ref(!1);function mY(){const e="notifyIdAppointment",n=async r=>{try{if(V_.value=!1,(await Lj(r.props)).tenant_error){const u=await i()}await t(r.props,r.response),await Uc()}catch(s){console.log(s)}finally{V_.value=!0}},t=async(r,s)=>{var u,l,d,c;await Kj(),((u=Fe.value)==null?void 0:u.user_type)=="tenant"&&(await Wj(),Fe.value&&(Fe.value.has_business_tenant_phone=await vY((l=Fe.value)==null?void 0:l.tenant_id))),zl(aR+((d=Fe.value)==null?void 0:d.id)),yr(aR+((c=Fe.value)==null?void 0:c.id)),s=="mobile"?In(He.CHAT_LIST):In(He.HOME)},i=async()=>{try{const r=window.location.search,s=new URLSearchParams(r),u=s.get("tenant_id")||"",l=s.get("phone")||"",d=s.get("message")||"",c=s.get("customer_name")||"",_=s.get("business_name")||"";return!u||!l||!d||!c||!_?{client_error:!0}:(await Yj({tenant_id:u,phone:l,message:d,customer_name:c,business_name:_}),o(),{})}catch(r){return console.log(r),{client_error:!0}}finally{}},o=()=>{const r=new URL(window.location.href);r.search="",window.history.replaceState({},document.title,r)};return{NOTIFY_ID_APPOINTMENT_NAME:e,initPage:n}}const hY={class:"m-auto w-max"},yY={class:"flex gap-4"},gY=h.defineComponent({__name:"Error",setup(e){const n=()=>window.location.reload();return(t,i)=>(h.openBlock(),h.createElementBlock("div",hY,[i[2]||(i[2]=h.createElementVNode("h1",{class:"font-bold text-chat-haze-900 text-center mb-2",style:{"font-size":"56px"}}," 404 ",-1)),i[3]||(i[3]=h.createElementVNode("p",{class:"text-chat-haze-500 text-center mb-8",style:{"font-size":"20px"}}," Page not found. ",-1)),h.createElementVNode("div",yY,[h.createElementVNode("button",{onClick:i[0]||(i[0]=o=>n()),class:"px-6 py-2 bg-[#004AB3] text-white rounded-lg"}," Try Again "),h.createElementVNode("button",{onClick:i[1]||(i[1]=o=>h.unref(vR)()),class:"px-6 py-2 bg-[#004AB3] text-white rounded-lg"}," Logout ")])]))}}),EY={},TY={width:"32",height:"32",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function SY(e,n){return h.openBlock(),h.createElementBlock("svg",TY,n[0]||(n[0]=[h.createElementVNode("path",{d:"M3 6.5C3 14.5081 9.49187 21 17.5 21C18.166 21 18.8216 20.9551 19.4637 20.8682C20.3747 20.7448 21 19.9292 21 19.01V16.4415C21 15.5807 20.4491 14.8164 19.6325 14.5442L16.4841 13.4947C15.6836 13.2279 14.8252 13.699 14.6206 14.5177C14.3475 15.6102 12.987 15.987 12.1907 15.1907L8.80926 11.8093C8.01301 11.013 8.38984 9.65254 9.48229 9.37943C10.301 9.17476 10.7721 8.31644 10.5053 7.51586L9.45585 4.36754C9.18362 3.55086 8.41934 3 7.55848 3H4.99004C4.0708 3 3.25518 3.62533 3.13185 4.53627C3.0449 5.17845 3 5.83398 3 6.5Z",stroke:"currentColor","stroke-width":"1.5","stroke-linejoin":"round"},null,-1),h.createElementVNode("path",{d:"M21 3L15.5 8.5",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),h.createElementVNode("path",{d:"M15 5V8.5V8.5C15 8.77614 15.2239 9 15.5 9V9H19",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]))}const bY=Et(EY,[["render",SY]]),CN="https://web-socket.dev01.dtsmart.dev",IY=async e=>{const n=CN+"/ws/download-record",t=await fetch(n,{method:"POST",body:JSON.stringify({url:e}),headers:{"Content-Type":"application/json"}});if(!t.ok)throw new Error(`Response status: ${t.status}`);const i=await t.blob(),o=window.URL.createObjectURL(i),r=document.createElement("a");r.href=o,r.download="recording.mp3",r.click(),r.remove()},CY=async()=>{var i,o;const e=CN+"/ws/generate-token",n=await fetch(e,{method:"POST",body:JSON.stringify({username:(o=(i=Fe.value)==null?void 0:i.id)==null?void 0:o.toString()}),headers:{"Content-Type":"application/json"}});if(!n.ok)throw new Error(`Response status: ${n.status}`);const t=await n.json();return t==null?void 0:t.accessToken},AY={class:"relative w-full h-full"},RY={class:"edit-scrollbar grow overflow-auto w-full min-w-full drawer-content"},MY=Et(h.defineComponent({__name:"DrawerBaseCustom",props:{showTitle:{type:Boolean,default:!0},position:{default:"right"},width:{default:550},responsive:{},disabledClose:{type:Boolean},absolute:{type:Boolean}},emits:["update:modelValue","afterClose"],setup(e,{expose:n,emit:t}){const i=e,o=t,r=h.ref(!1),s=h.computed(()=>{let d="";return r.value?d="translateX(0)":i.position==="right"?d="translateX(100%)":i.position==="left"&&(d="translateX(-100%)"),{width:i.responsive=="mobile"?"100%":i.width+"px",[i.position]:"0",transform:d}}),u=()=>{r.value=!0},l=async()=>{await o("afterClose"),r.value=!1};return n({close:l,open:u}),(d,c)=>(h.openBlock(),h.createElementBlock("div",{class:h.normalizeClass(["top-0 bottom-0 right-0 left-0 z-[1500] drawer",{"opacity-1":r.value,"pointer-events-none opacity-0 delay-300":!r.value,absolute:d.absolute,fixed:!d.absolute}])},[d.disabledClose?h.createCommentVNode("",!0):(h.openBlock(),h.createElementBlock("div",{key:0,class:"absolute w-full h-full z-[1500]",onClick:l,onTouchstart:h.withModifiers(l,["prevent"])},null,32)),h.createElementVNode("div",AY,[h.createElementVNode("div",{class:"duration-300 ease-out absolute top-0 bg-white flex flex-col drawer-box",style:h.normalizeStyle(s.value)},[h.createElementVNode("div",RY,[h.renderSlot(d.$slots,"content",{},()=>[c[0]||(c[0]=h.createElementVNode("div",{class:"flex p-4 content"},[h.createElementVNode("p")],-1))],!0)])],4)])],2))}}),[["__scopeId","data-v-b581d868"]]),AN=(e,n="1")=>{let t=e.replace(/\D/g,"");return t!=null&&t.startsWith(n)?t.slice(n.length):t},NY={},OY={width:"32",height:"32",viewBox:"0 0 24 24",id:"Layer_1","data-name":"Layer 1",xmlns:"http://www.w3.org/2000/svg"};function wY(e,n){return h.openBlock(),h.createElementBlock("svg",OY,n[0]||(n[0]=[h.createStaticVNode('<line class="cls-1" x1="12" y1="11.05" x2="12" y2="18.68" data-v-e06799fb></line><line class="cls-1" x1="15.82" y1="12.95" x2="15.82" y2="16.77" data-v-e06799fb></line><line class="cls-1" x1="8.18" y1="12.95" x2="8.18" y2="16.77" data-v-e06799fb></line><polygon class="cls-1" points="20.59 6.27 20.59 22.5 3.41 22.5 3.41 1.5 15.82 1.5 20.59 6.27" data-v-e06799fb></polygon><polygon class="cls-1" points="20.59 6.27 20.59 7.23 14.86 7.23 14.86 1.5 15.82 1.5 20.59 6.27" data-v-e06799fb></polygon>',5)]))}const xY=Et(NY,[["render",wY],["__scopeId","data-v-e06799fb"]]),PY={},DY={width:"32",height:"32",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function kY(e,n){return h.openBlock(),h.createElementBlock("svg",DY,n[0]||(n[0]=[h.createElementVNode("g",{id:"Menu / Close_MD"},[h.createElementVNode("path",{id:"Vector",d:"M18 18L12 12M12 12L6 6M12 12L18 6M12 12L6 18",stroke:"#000000","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)]))}const LY=Et(PY,[["render",kY]]);function UY(e){var n={debug:"ALL",deviceParams:{micEnabled:!0,audioConstraints:{audio:!0,video:!1}}},t=null;let i="",o=null,r=null;const s=async T=>{var R,O,B,j,I,A,M,w,x;try{t||(t=new window.Plivo(n)),(O=(R=t==null?void 0:t.client)==null?void 0:R.on)==null||O.call(R,"onCallAnswered",V=>{c(V)}),(j=(B=t==null?void 0:t.client)==null?void 0:B.on)==null||j.call(B,"onCallTerminated",(V,L)=>_(V,L)),t.client.on("onCallFailed",(V,L)=>{y(V,L)}),t.client.on("onIncomingCallCanceled",V=>{S(V)}),(A=(I=t==null?void 0:t.client)==null?void 0:I.on)==null||A.call(I,"onIncomingCall",(V,L,D)=>{l(D)}),t.client.on("onCallRemoteRinging",V=>d(V)),t.client.on("onMediaPermission",V=>C(V)),(w=(M=t==null?void 0:t.client)==null?void 0:M.on)==null||w.call(M,"onLoginFailed",V=>u(V));const k=JSON.parse(atob(T.split(".")[1]));await((x=t==null?void 0:t.client)==null?void 0:x.loginWithAccessToken(T))}catch(k){console.log("Login error: "+k)}},u=T=>{console.log("Login failed",T)},l=T=>{console.log(T);const R={phone:f(T.src)};e(Ye.RINGING,R),i=T==null?void 0:T.callUUID},d=T=>{i=T.callUUID,e(Ye.CALLING),o==null||o()},c=T=>{T.callUUID==i&&(o==null||o(),e(Ye.CALL_START))},_=(T,R)=>{console.log(T,R),i===R.callUUID&&(e(Ye.CALL_END,{message:T==null?void 0:T.reason}),i="")},f=(T,R="1")=>{let O=T.replace(/[^0-9]/g,"");return O!=null&&O.startsWith(R)?O.slice(R.toString().length):O},p=(T=3e3)=>new Promise((R,O)=>{o=null;const B=setTimeout(()=>{O("Time out error!"),o=null,r=null},T);o=()=>{R(!0),o=null,clearTimeout(B)},r=j=>{O(j),r=null,clearTimeout(B)}}),a=async()=>{var T,R;(R=(T=t==null?void 0:t.client)==null?void 0:T.answer)==null||R.call(T,i),await p(3e3)},v=()=>{var T,R;(R=(T=t==null?void 0:t.client)==null?void 0:T.reject)==null||R.call(T,i)},m=T=>{var R,O,B,j,I;(R=t==null?void 0:t.client)==null||R.mute(),T?(B=(O=t==null?void 0:t.client)==null?void 0:O.mute)==null||B.call(O):(I=(j=t==null?void 0:t.client)==null?void 0:j.unmute)==null||I.call(j)},g=async T=>{t.client.call("+"+T,{number_phone:T}),await p(5e3)},E=T=>{var R,O,B,j;T==Ye.RINGING?(O=(R=t==null?void 0:t.client)==null?void 0:R.reject)==null||O.call(R,i):(T==Ye.CALL_START||T==Ye.CALLING)&&((j=(B=t==null?void 0:t.client)==null?void 0:B.hangup)==null||j.call(B))},y=(T,R)=>{console.log("handleCallFailed",T),r&&(r==null||r(T)),e(Ye.CALL_END,{message:T}),T=="User Denied Media Access"&&alert("Microphone access is blocked. Please enable the microphone permission to make a call.")},S=T=>{e(Ye.CALL_END,{reason:T.reason??""})},C=T=>{console.log("MediaPermission",T)};return{plivoLogin:s,plivoCallAnswer:a,plivoCallReject:v,plivoCall:g,plivoEndCall:E,plivoCallSwishMute:m}}const BY={width:"32",height:"32",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},jY={width:"32",height:"32",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},VY=h.defineComponent({__name:"IconMic",props:{mute:{type:Boolean,default:!1}},setup(e){return(n,t)=>(h.openBlock(),h.createElementBlock(h.Fragment,null,[h.withDirectives((h.openBlock(),h.createElementBlock("svg",BY,t[0]||(t[0]=[h.createStaticVNode('<path d="M9.40135 12.5C9.63354 12.9014 9.95606 13.244 10.3411 13.5M9.17071 4C9.58254 2.83481 10.6938 2 12 2C13.6569 2 15 3.34315 15 5L15 10.5" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path><path d="M6 11C6 14.3137 8.68629 17 12 17C12.4675 17 12.9225 16.9465 13.3592 16.8454M18 11C18 11.854 17.8216 12.6663 17.5 13.4017" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path><line x1="12" y1="18" x2="12" y2="20" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></line><line x1="10" y1="21" x2="14" y2="21" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></line><line x1="2.4137" y1="2.03821" x2="19.0382" y2="19.5863" stroke="currentColor" stroke-width="2" stroke-linecap="round"></line>',5)]),512)),[[h.vShow,e.mute]]),h.withDirectives((h.openBlock(),h.createElementBlock("svg",jY,t[1]||(t[1]=[h.createElementVNode("path",{d:"M9 5C9 3.34315 10.3431 2 12 2C13.6569 2 15 3.34315 15 5V11C15 12.6569 13.6569 14 12 14C10.3431 14 9 12.6569 9 11V5Z",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),h.createElementVNode("path",{d:"M6 11C6 14.3137 8.68629 17 12 17C15.3137 17 18 14.3137 18 11",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),h.createElementVNode("line",{x1:"12",y1:"18",x2:"12",y2:"20",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),h.createElementVNode("line",{x1:"10",y1:"21",x2:"14",y2:"21",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]),512)),[[h.vShow,!e.mute]])],64))}}),FY={class:"flex flex-col items-center justify-center h-full bg-chat-haze-300 text-white relative"},qY={class:"h-40 w-40 rounded-full overflow-hidden mb-4 border-4 border-gray-700 flex-center"},GY={class:"text-center"},HY={class:"text-2xl font-semibold"},zY={class:"text-gray-400 mt-1"},YY={class:"flex items-center justify-center gap-8 mt-10"},KY=["href"],WY={class:"absolute bottom-6 text-gray-500 text-sm"},RN=h.defineComponent({__name:"Calling",props:{responsive:{}},emits:["userCalling","endCall"],setup(e,{expose:n,emit:t}){const i=t,o=(k,V)=>{if(k==Ye.RINGING)M((V==null?void 0:V.phone)??""),f.value=Ye.RINGING,B();else if(k==Ye.CONNECT_FAILED||k==Ye.NO_ANSWER)O(),f.value=k;else if(k==Ye.CALL_END){m.value=(V==null?void 0:V.message)??"";const L=(V==null?void 0:V.reason)=="ORIGINATOR_CANCEL";O({closeModal:L}),f.value=k}else k==Ye.CALL_START&&(f.value=k,R())},{plivoLogin:r,plivoCallAnswer:s,plivoCall:u,plivoEndCall:l,plivoCallSwishMute:d}=UY(o),c=h.computed(()=>({[Ye.CONNECTING]:"Connecting...",[Ye.CALLING]:"Calling...",[Ye.RINGING]:"Ringing...",[Ye.CONNECT_FAILED]:m.value||"Connect Error",[Ye.CALL_START]:"",[Ye.CALL_END]:m.value||"Call Ended",[Ye.NO_ANSWER]:"No Answer",[Ye.CANCEL]:"",[Ye.TIME_OUT]:"",[Ye.BUSY]:""})),_=h.computed(()=>c.value[f.value]??""),f=h.ref(Ye.CONNECTING),p=h.ref("00:00"),a=h.ref(!1),v=h.ref(!1),m=h.ref(""),g=h.ref(""),E=h.ref(null),y=h.ref(null),S=h.ref(!1);let C=null,T="call";h.onMounted(async()=>{var k;if((k=Fe.value)!=null&&k.tenant_phone){const V=await CY();await r(V)}}),h.onUnmounted(()=>{C&&clearInterval(C),m.value=""});function R(){let k=0;C=setInterval(()=>{k++;const V=String(Math.floor(k/60)).padStart(2,"0"),L=String(k%60).padStart(2,"0");p.value=`${V}:${L}`},1e3)}function O(k){var V;k!=null&&k.closeModal&&(a.value=!1,(V=E.value)==null||V.close()),l(f.value),f.value=Ye.CALL_END,clearInterval(C),v.value=!1,S.value=!1,p.value="00:00",C&&clearInterval(C),i("endCall",y.value,T),T=""}const B=()=>{var k;a.value=!0,v.value=!0,(k=E.value)==null||k.open()},j=()=>{d(!S.value),S.value=!S.value},I=async k=>{try{f.value=Ye.CONNECTING,y.value=k,B(),T="call",await u(k.phone),f.value=Ye.CALLING}catch(V){O(),console.log(V),m.value=(V==null?void 0:V.message)||JSON.stringify(V),f.value=Ye.CONNECT_FAILED}},A=async()=>{try{await s()}catch(k){O(),f.value=Ye.CONNECT_FAILED,m.value=(k==null?void 0:k.message)||JSON.stringify(k)}},M=async k=>{var D;let V=null;try{y.value=null;let F={phone:AN(k,"1"),client_id:((D=Fe.value)==null?void 0:D.tenant_id)??""};V=await jV(F)}catch(F){console.log(F)}const L={username:(V==null?void 0:V.full_name)||"Unknown Name",phone:"1"+(V==null?void 0:V.phone)};y.value=L,i("userCalling",y.value)},w=async()=>{IY(g.value)},x=()=>{g.value=""};return n({startCall:I,endCall:O,userRemoter:y,callStatus:f,answer:A,label:_}),(k,V)=>(h.openBlock(),h.createBlock(MY,{ref_key:"drawerVisibleRef",ref:E,width:500,"disabled-close":v.value,responsive:k.responsive,onAfterClose:x,absolute:""},{content:h.withCtx(()=>{var L,D,F,G,q,Y;return[h.createElementVNode("div",FY,[h.createElementVNode("div",qY,[h.createVNode(Yo,{class:"",src:((L=y.value)==null?void 0:L.avatar)??"",id:((D=y.value)==null?void 0:D.id)??"",color:(F=y.value)==null?void 0:F.color,name:(G=y.value)==null?void 0:G.username,size:"xxl"},null,8,["src","id","color","name"])]),h.createElementVNode("div",GY,[h.createElementVNode("h2",HY,h.toDisplayString(((q=y.value)==null?void 0:q.username)||h.unref(AN)(((Y=y.value)==null?void 0:Y.phone)??"")),1),h.createElementVNode("p",zY,h.toDisplayString(c.value[f.value]),1)]),h.createElementVNode("div",YY,[f.value==h.unref(Ye).RINGING?(h.openBlock(),h.createElementBlock("button",{key:0,onClick:A,class:"w-16 h-16 bg-chat-success hover:bg-green-600 text-white rounded-full flex items-center justify-center shadow-lg transition"},[h.createVNode(bY)])):h.createCommentVNode("",!0),g.value&&f.value==h.unref(Ye).CALL_END?(h.openBlock(),h.createElementBlock("button",{key:1,href:g.value,download:"recording.mp3",onClick:w,class:"w-16 h-16 bg-white hover:bg-green-600 text-white rounded-full flex items-center justify-center shadow-lg transition"},[h.createVNode(xY)],8,KY)):h.createCommentVNode("",!0),f.value==h.unref(Ye).CALL_START?(h.openBlock(),h.createElementBlock("button",{key:2,onClick:V[0]||(V[0]=K=>j()),class:"w-16 h-16 bg-white hover:bg-green-600 text-black rounded-full flex items-center justify-center shadow-lg transition"},[h.createVNode(VY,{mute:S.value},null,8,["mute"])])):h.createCommentVNode("",!0),f.value==h.unref(Ye).CALL_END?(h.openBlock(),h.createElementBlock("button",{key:3,onClick:V[1]||(V[1]=K=>O({closeModal:!0})),class:"w-16 h-16 bg-white hover:bg-green-600 text-white rounded-full flex items-center justify-center shadow-lg transition"},[h.createVNode(LY)])):h.createCommentVNode("",!0),f.value!=h.unref(Ye).CALL_END?(h.openBlock(),h.createElementBlock("button",{key:4,onClick:V[2]||(V[2]=K=>O()),class:"w-16 h-16 rounded-full bg-chat-error hover:bg-red-700 flex items-center justify-center"},[h.createVNode(iN)])):h.createCommentVNode("",!0)]),h.createElementVNode("p",WY,"Duration: "+h.toDisplayString(p.value),1)])]}),_:1},8,["disabled-close","responsive"]))}}),$Y="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAInSURBVHgBzVVNTttQEJ55xgltF303qDlBc4T0BGELqBJZNAh1kWRREGKBs0ARdNGyqCLoIpFayJYj+AjpCXBv4G5owPEbZmJhQf6I5SDxSc9+42fPN5558z2AZwY+9UKz1XaMyWmljB5fHfh722Uf0hA0W7+KaskuIZlVNh2YL8weEPaiqN8YJXxE8PVn94CIXAAKeMnj+R804JMygTEQPHxXKdBolCYFDiK+52+K/I3mufvl01pjjODeuQE46ds3rlsuB5ACzVbXsSxTY5dVIqjvbq1/Twgkz5aVv2Kzs1NZK0MGHJ1edBChdG3frEiQSh5akCvKPQzNCWTEAEki169u85tiDwmYocDXYP/zRg8yYr8iPiggjDdITAD4ji8+LAzIqcG3CQHnTHM1UhV1pnvkYJGchGAajs8urmTMa0/CTAIBpbRHsTRrcaeyvpLGnoThH3CX/uVQHFgctInwX0KAKNIAGhYEVgQHFPkJAT8QQx/+OC9ARhyetQuiSQTUSwhyubAjzWHbqgoZYcNy7CNSntwSsTs6/V1DVN9EjybJ7lNw2239ZpBnwYQaZ6Sxu7XhPiKISc5dltsDiFe88Jbq9/Ih54RlWVXACbWKN4gznD5Q0jGC2FHXUYqYiEqcwctru19/HS7zn9GmpJEDGNMrqaGcHf851aMyP/XI5A6VHrrkIYV3RiObF1MbjZk9Zljl4Zso+rC3/dGDReOYt60UD14y7gClAO8fcj4wXgAAAABJRU5ErkJggg==",QY="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAFASURBVHgBtZXPUYNAFMa/h+N4lJMz5iLpICWQCkKswBasINCBR49WoOlASsAKWMc/XPEYNfvcBRQQQ9A8fzMM7Czsj33sfgD/DG29I0g9YN8F2O12vissxwq/EgQPPrA3A1FgBvUwjATECfRr9F3YFpxmCzCH2AWiENfHUVcgMfgnjHMsRxe1IMg8M8UUcuTg1diUK3fK9tqHLGZBHJzZi0qACcTRXkPgnEAahw5rAZELaZi8WrCB9PKoOIa2f6JXIEG5TOfZrZmTD1li3Iym5QxY30Maxos9VSXiHOJo1RA4CvIkDcHqCnZ7i/IW1wKTGeY7RJCC+Su223EdPIVm0y2wC40k7QoKiUlWaCuaoQitFraMSecZYgVNd0WpbTWaXdjE/Jn73mwofTs5rs4KvJ7+ZfDtBI8T89OXD0JJPgAwJmyx5BPTjwAAAABJRU5ErkJggg==",JY="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAKdSURBVHgBtVVNbtpAFH7jMZh0xRHICaAnKJyg2SaoIiyaCHWRsGgiVphFhaAbsqgQYWFQBcmu9ASlJwg3CL2BuwnFMDN9D0zq2KFYIfmkke3n9/83AC8MFpax/qWXgggr07sQ02KpkB+HkQtloNq0EpwbPwBUHEVsJMXvItNdM5+3N8lqEAKcx8jzhBDaayFYBg1BbGaYYWQ3GiDvUeEhet4pFfbHdJSCCxTMmZYV39qA6z3mHSorWjTqNCiKHSd6upUBv/crenGZ+y5j7GTJsx6694NC3nGMtAYyoRhLYgfsKVA25r3iF8R6NDiXOSp+rX090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hYPF7WwCaSZZ77PBuRRkXgPaYKmzlKoCLd/5ajIJsyarzgDYf9cVlxVxye3qpXjwAEJAWy69XFzhZxWGipBGUz5VksumxqBcY+ixRihlWoyfbFLcHyJSay9I8/eUSa17L/LzIOhQsF/He8TAOCECN4noqhB+95AxPzjrD4pJP09cgL0SS4AypL6ZpZny4oeTRoUQRPKOsiAPllmOEhDJOPYzMaQUgMvf6zxJhZFfl1Dn3x27ySQDEACYwiQztKFTRPkOqj2XHcMtlinamHQ9YGD8EyDUmXEsDPHk+BzMhOh4lM35yvU6JLuCr1EC0JEmSG+uvPM0dJ7Nr2+u3V7XtTFkb67NlU+eLtW1VGnTyVOGrryGJZKJkFzToj/N4OBHh8VO5tw+fHuG778MlAHbo/vTqD//xn3IgSWCGfnVSOxYnzQWKy3im1ztBtsq1DFjx7ZXbevJHFqvfqBUvAV7luB+uIjj9sKS9TlOR99lIRHfZDPY0YBWvsHedaR6slwMyB51LlF+mEfKCspetExB+iMtihLIphp/T2VaBC9e1sczOO5cJd7tWSuZQoRuJJTRvyF5qr20Fa56wqQcQwaF+RwO352h/9NHxuRuSsvG/3CG0huzyoNprb8kkF54Xwap4MxeAKbMGptAUBh/BeGoDVlIcOlBKrgbyHM2+PUMEmxUUR2GUub+BHtCLH4+Het4X/Mv/m/2GwzhUiYSevSbAAAAAElFTkSuQmCC",iK={class:"bg-white rounded-t-3xl shadow-lg pb-2 flex grid grid-cols-4 h-[80px]"},oK=["disabled","onClick"],rK=["src"],sK=["src"],lK=h.defineComponent({__name:"Footer",setup(e){const n=[{icon:$Y,iconActive:QY,title:"Chat",value:He.CHAT_LIST,click:()=>{At.value!=He.CHAT_LIST&&In(He.CHAT_LIST)}},{icon:JY,iconActive:XY,title:"Review",value:He.TENANT_ERROR,disabled:!0},{icon:ZY,iconActive:eK,title:"Booking",value:He.TENANT_ERROR,disabled:!0},{icon:tK,iconActive:nK,title:"Go Admin",value:He.TENANT_ERROR,disabled:!0}];return(t,i)=>(h.openBlock(),h.createElementBlock("div",iK,[(h.openBlock(),h.createElementBlock(h.Fragment,null,h.renderList(n,o=>h.createElementVNode("button",{class:h.normalizeClass(["flex flex-col justify-center items-center text-blue-600",{"opacity-[0.6]":o.disabled}]),key:o.value,disabled:o.disabled,onClick:r=>{var s;return(s=o.click)==null?void 0:s.call(o)}},[h.withDirectives(h.createElementVNode("img",{src:o.icon},null,8,rK),[[h.vShow,h.unref(At)!=o.value]]),h.withDirectives(h.createElementVNode("img",{src:o.iconActive},null,8,sK),[[h.vShow,h.unref(At)==o.value]]),h.createElementVNode("span",{class:h.normalizeClass(["text-sm text-chat-haze-400 font-medium mt-1",{"text-chat-primary":h.unref(At)==o.value}])},h.toDisplayString(o.title),3)],10,oK)),64))]))}}),uK=["onClick"],dK={class:"cursor-pointer"},cK=h.defineComponent({__name:"SelectBase",props:{modelValue:{},options:{},placement:{},disabled:{type:Boolean}},emits:["update:modelValue","select"],setup(e,{emit:n}){const t=e,i=n,o=h.ref(!1);h.computed(()=>{var l;return((l=t.options.find(d=>d.value===t.modelValue))==null?void 0:l.label)??""});const r=h.computed(()=>t.placement==="bottom"?"top-2 translate-y-full":"-top-4 -translate-y-full");function s(){t.disabled||(o.value=!o.value)}function u(l){i("update:modelValue",l.value),i("select",l.value),o.value=!1}return(l,d)=>(h.openBlock(),h.createElementBlock("div",{class:"relative inline-block w-full",tabindex:"0",onBlur:d[0]||(d[0]=c=>o.value=!1),onClick:s},[h.withDirectives(h.createElementVNode("ul",{class:h.normalizeClass(["w-max absolute -translate-y-full left-0 z-10 mt-1 max-h-48 overflow-auto rounded-md shadow-custom bg-white shadow-lg",r.value])},[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(l.options,(c,_)=>(h.openBlock(),h.createElementBlock("li",{key:_,class:"cursor-pointer text-black px-6 py-2 hover:bg-chat-haze-200 border-b border-chat-haze-200",onClick:h.withModifiers(f=>u(c),["stop"])},h.toDisplayString(c.label),9,uK))),128))],2),[[h.vShow,o.value]]),h.createElementVNode("div",dK,[h.renderSlot(l.$slots,"default")])],32))}}),MN=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,NN=VM,_K=((e,n)=>t=>{var i;if((n==null?void 0:n.variants)==null)return NN(e,t==null?void 0:t.class,t==null?void 0:t.className);const{variants:o,defaultVariants:r}=n,s=Object.keys(o).map(d=>{const c=t==null?void 0:t[d],_=r==null?void 0:r[d];if(c===null)return null;const f=MN(c)||MN(_);return o[d][f]}),u=t&&Object.entries(t).reduce((d,c)=>{let[_,f]=c;return f===void 0||(d[_]=f),d},{}),l=n==null||(i=n.compoundVariants)===null||i===void 0?void 0:i.reduce((d,c)=>{let{class:_,className:f,...p}=c;return Object.entries(p).every(a=>{let[v,m]=a;return Array.isArray(m)?m.includes({...r,...u}[v]):{...r,...u}[v]===m})?[...d,_,f]:d},[]);return NN(e,s,l,t==null?void 0:t.class,t==null?void 0:t.className)})("inline-flex flex-center gap-2 whitespace-nowrap rounded-[8px] text-base font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 hover:duration-100",{variants:{variant:{default:"bg-chat-primary text-white hover:bg-chat-primary-hover [&_.loader::before]:border-white",primary:"bg-chat-primary text-white hover:bg-chat-primary-hover [&_.loader::before]:border-white","danger-outline":"bg-white border border-chat-error border-[1.5px] text-chat-error hover:bg-chat-error hover:text-white [&_.loader::before]:border-chat-error",success:"bg-chat-success text-white hover:bg-chat-success-hover [&_.loader::before]:border-white",danger:"bg-chat-error text-white hover:bg-chat-error-hover [&_.loader::before]:border-white","primary-outline":"bg-white text-chat-primary hover:bg-chat-primary border hover:text-white border-primary border-[1.5px] [&_.loader::before]:border-primary",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-chat-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),fK=h.defineComponent({__name:"CButton",props:{variant:{},size:{},class:{},asChild:{type:Boolean},as:{default:"button"}},setup(e){const n=e;return(t,i)=>(h.openBlock(),h.createBlock(h.unref(Ci),{as:t.as,"as-child":t.asChild,class:h.normalizeClass(h.unref(tN)(h.unref(_K)({variant:t.variant,size:t.size}),n.class))},{default:h.withCtx(()=>[h.renderSlot(t.$slots,"default")]),_:3},8,["as","as-child","class"]))}}),pK=h.defineComponent({__name:"CSpin",props:{size:{default:48},border:{default:5}},setup(e){const n=e,t=h.computed(()=>{let i={};return i.width=n.size+"px",i.height=n.size+"px",i.borderWidth=n.border+"px",i});return h.onMounted(()=>{}),(i,o)=>(h.openBlock(),h.createElementBlock("span",{class:"loader",style:h.normalizeStyle(t.value)},null,4))}}),aK=Et(h.defineComponent({__name:"ButtonBase",props:{disabled:{type:Boolean,default:!1},type:{},isReverseIcon:{type:Boolean},loading:{type:Boolean,default:!1}},setup(e){const n=e,t=h.computed(()=>{switch(n.type){case"primary":return"default";default:return n.type}});return(i,o)=>(h.openBlock(),h.createBlock(fK,{variant:t.value,disabled:i.disabled},{default:h.withCtx(()=>[i.loading?(h.openBlock(),h.createBlock(pK,{key:0,size:24,border:3})):(h.openBlock(),h.createElementBlock(h.Fragment,{key:1},[h.renderSlot(i.$slots,"icon",{},void 0,!0),h.renderSlot(i.$slots,"default",{},void 0,!0)],64))]),_:3},8,["variant","disabled"]))}}),[["__scopeId","data-v-caae24ef"]]),vK={class:"mx-auto w-full h-full max-w-[700px] flex flex-col gap-4 justify-center px-5"},mK={class:"chat-input border border-chat-haze-200 p-2 bg-white shadow-md"},hK={class:"flex items-center gap-2 chat-input border border-chat-haze-200 p-2 bg-white shadow-md"},yK={class:"relative"},gK={class:"flex items-center gap-1 px-2 py-1 rounded-lg hover:bg-gray-100"},EK={class:"text-sm text-chat-haze-700"},TK={class:"relative"},SK={class:"flex-center mt-2"},bK=h.defineComponent({__name:"Setting",setup(e){h.ref(!1);const n=h.ref(""),t=h.ref(""),i=[{value:"US",label:"+1 US",dial:1,flag:"πŸ‡ΊπŸ‡Έ"}],o=h.ref(i[0]),r=h.ref(""),s=h.ref(!1),u=()=>{r.value="",n.value=l(n.value)},l=_=>_.replace(/\D/g,""),d=(_,f)=>(f.replace("+",""),f.startsWith(_.toString())),c=async()=>{var _;try{if(console.log(d(o.value.dial,n.value)),!t.value){r.value="Business name is required.";return}if(!n.value||l(n.value).length>10){r.value="Phone number must contain 10 digits";return}if(d(o.value.dial,n.value)){r.value=`Phone number does not match country code ${o.value.value}`;return}s.value=!0;const f={tenant_id:(_=Fe.value)==null?void 0:_.tenant_id,phone_forward:o.value.dial+n.value,tenant_name:t.value};await aY(f),In(He.REGISTER_SUCCESS)}catch(f){console.log(f),r.value=(f==null?void 0:f.message)||"Something error!"}s.value=!1};return(_,f)=>(h.openBlock(),h.createElementBlock("div",vK,[f[7]||(f[7]=h.createElementVNode("div",{class:"flex gap-4"},[h.createElementVNode("p",{class:"text-3xl md:text-3xl text-chat-haze-800 font-bold text-center mb-2"}," Go Chat Access Registration Form ")],-1)),h.createElementVNode("div",null,[f[3]||(f[3]=h.createElementVNode("p",{class:"text-xl font-semibold text-chat-haze-600 mb-2"},"Business name",-1)),h.createElementVNode("div",mK,[h.withDirectives(h.createElementVNode("input",{class:"!outline-none h-8 px-2 w-full","onUpdate:modelValue":f[0]||(f[0]=p=>t.value=p),placeholder:"Enter business name"},null,512),[[h.vModelText,t.value]])])]),h.createElementVNode("div",null,[f[5]||(f[5]=h.createElementVNode("p",{class:"text-xl font-semibold text-chat-haze-600 mb-2"},"Set up phone forward",-1)),h.createElementVNode("div",hK,[h.createElementVNode("div",yK,[h.createVNode(cK,{options:i,placement:"bottom"},{default:h.withCtx(()=>[h.createElementVNode("button",gK,[h.createElementVNode("span",null,h.toDisplayString(o.value.flag),1),h.createElementVNode("span",EK,"+"+h.toDisplayString(o.value.dial),1),f[4]||(f[4]=h.createElementVNode("svg",{class:"w-4 h-4 text-chat-haze-500",fill:"none",stroke:"currentColor",viewBox:"0 0 20 20"},[h.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 7l5 5 5-5"})],-1))])]),_:1})]),h.withDirectives(h.createElementVNode("input",{class:"!outline-none",type:"tel",maxlength:10,onInput:u,"onUpdate:modelValue":f[1]||(f[1]=p=>n.value=p),placeholder:"Enter phone number"},null,544),[[h.vModelText,n.value]])])]),h.createElementVNode("div",TK,[h.withDirectives(h.createElementVNode("p",{class:"text-chat-error absolute -top-4 left-4"},h.toDisplayString(r.value),513),[[h.vShow,r.value]])]),h.createElementVNode("div",SK,[h.createVNode(aK,{loading:s.value,type:"primary",class:"w-[150px] h-12 font-medium",onClick:f[2]||(f[2]=p=>c())},{default:h.withCtx(()=>f[6]||(f[6]=[h.createTextVNode("Submit ")])),_:1},8,["loading"])])]))}}),IK="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHQAAAB0CAYAAABUmhYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAADKQSURBVHgBzX0JtB3FdeCt6n67/qK/aEf7LrEICYEsxI63+BgwjjHJYOItiUlyPJMZ52SxZ5w5k5zx2J7k5CQ5yXFijMB2EscL2I7MGITZwQiBQAto/VrQ+vX3995/S3fNrerX79++Xf2+BAhToPPf6666devu91Z1PwHv/ibxnx+50tnZCZmhGsip3YUZbUtqg8U3Oq5Zfrc7NTerXverHTesuFumnJSqeSAagwUdn3JA1vza0Nbd9ykp095Q8fjoc3s3O5nMVJl1C8Uzw/vh8PChSfF4FzYB786m8VLNb3MgN6V3znpPybpMyymFVbPf59W9ktvbPi+/Yua13mj1rGzL9Dquk/aVr1Id+V4lEIaa4EIEIH6RSqna8PhpJfFbza/7Y+XTIKUr8+nO8t6TTw/9Ys83RLEyprLZwviR4gvQ3z+aiN+7qL3bGEoJJQuXX3SzLKRzmaVzNnXctOIz0pGO7/vKyaULoHyQriugkEaOKRCVGngK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Ouz7TM3Wx05ud3XnTqnswf+uCui/1j4ebH5zRBB2vml8jVjL6Iwg2/8fNsK3CRH2r6acfNMUyppNLQfiArFeu+UK/tKt/9OzwI7v+3hsqvuEdHdk/tuPwY5Ot6Z1sv2qG0sYJIQvr5t4oc7l8Zum0azpuXPUZ4coU1Oo12Z5vl4U0QONIk46WHR8LF/rzuI6cfaUmFDkW6QYMVcZPO1nzrgJMGCU4Gdfc1DtFqlSF+nBpROBOkvJ8b/iRPf9c2Xvycb9UKhdfPPoovMVdkQvV3k0MpY0zN59dM+cKoWRd+TXZcd2qT+Yvnn2TX66OqKpfc9qy3U7azaLvxe2oXK/Uzw6qSZRE+0A9YKR8Gm2qi4677A+Xz+IGQ8rJpNvLu449MvT43m8KdOMO1qfHzvT9Eo5BuQWO74r2bmUobfGgort7dmFBYQVGxeOqXDtTWL/gDndG5xL9W6gdNyy/yy1k8vqdha2aSLugiuPFka2vP6ByTqF6amRv6bmD35P5dI+TT2VVX2l3qb//+KS4vMva/wfAYUtYHdkZRwAAAABJRU5ErkJggg==",CK={},AK={class:"mx-auto w-full h-full max-w-[700px] flex flex-col gap-4 justify-center items-center px-5"};function RK(e,n){return h.openBlock(),h.createElementBlock("div",AK,n[0]||(n[0]=[h.createElementVNode("img",{class:"w-[130px] h-auto",src:IK},null,-1),h.createElementVNode("p",{class:"font-semibold text-center text-2xl"},"Your request has been submitted successfully. Please wait for a response within 24 to 72 hours.",-1)]))}const MK=Et(CK,[["render",RK]]),NK={key:0,class:"m-auto flex-center sc-full"},OK={key:4,class:"relative flex flex-col mx-auto w-full h-full bg-[#F9FAFC] overflow-hidden chat-mobile pt-4"},wK={key:0,class:"text-[#141B34] px-6 shrink-0"},xK={class:"text-xl font-semibold text-chat-haze-900 ml-3"},PK={class:"grow overflow-hidden"},DK={key:5,class:"flex gap-4 h-full relative"},kK={class:"chat-box-white grow flex flex-col h-full pt-6 overflow-hidden"},LK={key:0,class:"text-[#141B34] px-6"},UK={class:"text-xl font-semibold text-chat-haze-900 ml-3"},BK={class:"grow overflow-hidden"},jK=h.defineComponent({__name:"App",props:{token:{},id:{},domain:{},response:{default:"tablet"},isLib:{type:Boolean}},emits:["userCalling","error:noPhoneTenant"],setup(e,{expose:n,emit:t}){const i=[{id:He.HOME,backFunc:null,backTitle:""},{id:He.CUSTOMER_DETAIL,backFunc:()=>{In(He.HOME)},backTitle:""},{id:He.CUSTOMER_APPOINTMENT,backFunc:()=>{In(He.CUSTOMER_DETAIL)},backTitle:"Appointments"},{id:He.CUSTOMER_CHECK_IN,backFunc:()=>{In(He.CUSTOMER_DETAIL)},backTitle:"Checkins"}],o=h.computed(()=>[{id:He.CHAT_LIST,backFunc:r.isLib?void 0:()=>{vR()},backTitle:"ChatBiz"},{id:He.HOME,backFunc:()=>{In(He.CHAT_LIST)},backTitle:"",isHidden:!0},{id:He.CUSTOMER_DETAIL,backFunc:()=>{In(He.HOME)},backTitle:""},{id:He.CUSTOMER_APPOINTMENT,backFunc:()=>{In(He.CUSTOMER_DETAIL)},backTitle:"Appointments"},{id:He.CUSTOMER_CHECK_IN,backFunc:()=>{In(He.CUSTOMER_DETAIL)},backTitle:"Checkins"}]),r=e,s=t,{initPage:u}=mY();h.onMounted(()=>{r.isLib&&Ez(),R(),window.addEventListener("resize",O),B()}),h.onUnmounted(()=>{window.removeEventListener("resize",O)});const l=h.computed(()=>d.value==="mobile"?o.value.find(M=>M.id==At.value):i.find(M=>M.id==At.value)),d=h.computed(()=>r.response=="mobile"?r.response:p.value),c=h.computed(()=>{var M;return((M=y.value)==null?void 0:M.listConversationsAll)??[]}),_=h.computed(()=>{var M;return((M=c.value)==null?void 0:M.reduce((w,x)=>w+((x==null?void 0:x.unread_count)??0),0))??0}),f=h.computed(()=>{var M;return((M=v.value)==null?void 0:M.callStatus)??null}),p=h.ref("tablet"),a=h.ref(),v=h.ref(null),m=h.ref(null),g=h.ref(null),E=h.ref(null),y=h.ref(null),S=h.ref(null),C=async M=>{var w,x;(m.value!=(M==null?void 0:M.receiver_id)||d.value==="mobile")&&(At.value!=He.HOME&&In(He.HOME),m.value=M==null?void 0:M.receiver_id,await h.nextTick(),(w=y.value)==null||w.handleReadMessage(),(x=E.value)==null||x.getData(M))},T=M=>{var w;(w=v.value)==null||w.startCall(M)},R=()=>{var w;if(!a.value)return;(((w=a.value)==null?void 0:w.offsetWidth)??0)>=640?p.value!="tablet"&&(p.value="tablet"):p.value!="mobile"&&(At.value==He.HOME&&(At.value=He.CHAT_LIST),p.value="mobile")},O=Vr(()=>{R()},50),B=async()=>{var M,w,x;await u({props:r,response:d.value}),!((M=Fe.value)!=null&&M.tenant_phone)&&((w=Fe.value)==null?void 0:w.user_type)=="tenant"&&((x=Fe.value)!=null&&x.has_business_tenant_phone?In(He.REGISTER_SUCCESS):In(He.REGISTER_TENANT))},j=(M,w)=>{setTimeout(()=>{var x,k,V,L;M!=null&&M.phone&&((k=(x=E.value)==null?void 0:x.infoUser)==null?void 0:k.phone)==(M==null?void 0:M.phone)&&((V=E.value)==null||V.handleGetMessage({resetList:!0})),ER({infoUser:((L=E.value)==null?void 0:L.infoUser)??null,isCall:w})},2e3)},I=()=>{var M;(M=S.value)==null||M.open()},A=()=>{var M;(M=y.value)==null||M.handleReadMessage()};return n({get unreadCount(){return _.value},get callStatus(){return f.value},get callLabel(){var M;return((M=v.value)==null?void 0:M.label)??""},getUserRemote:()=>{var M;return((M=v.value)==null?void 0:M.userRemoter)??null},startCall:async()=>{var M;await((M=v.value)==null?void 0:M.answer())},endCall:()=>{var M;return(M=v.value)==null?void 0:M.endCall()},openSettings:I}),(M,w)=>{var x,k;return h.openBlock(),h.createElementBlock("div",{class:h.normalizeClass(["go-chat-main max-w-full p-0 overscroll-x-none",{"md:p-8":!M.isLib}]),id:"appChatMain",ref_key:"appChatRef",ref:a},[h.unref(V_)?h.unref(At)==h.unref(He).TENANT_ERROR?(h.openBlock(),h.createBlock(gY,{key:1})):h.unref(At)==h.unref(He).REGISTER_TENANT?(h.openBlock(),h.createBlock(bK,{key:2})):h.unref(At)==h.unref(He).REGISTER_SUCCESS?(h.openBlock(),h.createBlock(MK,{key:3})):d.value=="mobile"?(h.openBlock(),h.createElementBlock("div",OK,[h.createVNode(RN,{ref_key:"callingRef",ref:v,onUserCalling:w[0]||(w[0]=V=>s("userCalling",V)),onEndCall:j,responsive:d.value},null,8,["responsive"]),(x=l.value)!=null&&x.backFunc&&!l.value.isHidden?(h.openBlock(),h.createElementBlock("div",wK,[h.createElementVNode("button",{class:"flex items-center",onClick:w[1]||(w[1]=V=>l.value.backFunc())},[h.createVNode(Vc),h.createElementVNode("span",xK,h.toDisplayString(l.value.backTitle??""),1)])])):h.createCommentVNode("",!0),h.createElementVNode("div",PK,[h.withDirectives(h.createVNode(SR,{ref_key:"chatListRef",ref:y,class:"w-full max-w-[500px] !bg-[#F9FAFC]",responsive:d.value,onSelectReceiver:C,"receiver-id":m.value,"onUpdate:receiverId":w[2]||(w[2]=V=>m.value=V)},null,8,["responsive","receiver-id"]),[[h.vShow,h.unref(At)==h.unref(He).CHAT_LIST]]),h.withDirectives(h.createVNode(rN,{ref_key:"homeComponentRef",ref:E,"receiver-id":m.value,class:"h-full pt-4",onCall:T,onBack:w[3]||(w[3]=V=>{var L,D;return(D=(L=l.value).backFunc)==null?void 0:D.call(L)}),onInputFocus:A,responsive:d.value},null,8,["receiver-id","responsive"]),[[h.vShow,h.unref(At)==h.unref(He).HOME]]),h.unref(At)==h.unref(He).CUSTOMER_DETAIL?(h.openBlock(),h.createBlock(lN,{key:0,ref_key:"customerDetailRef",ref:g,"receiver-id":m.value,class:"w-full h-full",responsive:d.value},null,8,["receiver-id","responsive"])):h.createCommentVNode("",!0),h.unref(At)==h.unref(He).CUSTOMER_CHECK_IN?(h.openBlock(),h.createBlock(_N,{key:1,class:"w-full h-full"})):h.createCommentVNode("",!0),h.unref(At)==h.unref(He).CUSTOMER_APPOINTMENT?(h.openBlock(),h.createBlock(fN,{key:2,class:"w-full h-full"})):h.createCommentVNode("",!0)]),h.unref(At)!=h.unref(He).HOME?(h.openBlock(),h.createBlock(lK,{key:1,class:"shrink-0"})):h.createCommentVNode("",!0)])):(h.openBlock(),h.createElementBlock("div",DK,[h.createVNode(SR,{ref_key:"chatListRef",ref:y,class:"w-[38%] max-w-[500px] min-w-[450px]",responsive:d.value,onSelectReceiver:C,"receiver-id":m.value,"onUpdate:receiverId":w[4]||(w[4]=V=>m.value=V)},null,8,["responsive","receiver-id"]),h.createElementVNode("div",kK,[(k=l.value)!=null&&k.backFunc?(h.openBlock(),h.createElementBlock("div",LK,[h.createElementVNode("button",{class:"flex items-center",onClick:w[5]||(w[5]=V=>l.value.backFunc())},[h.createVNode(Vc),h.createElementVNode("span",UK,h.toDisplayString(l.value.backTitle??""),1)])])):h.createCommentVNode("",!0),h.createElementVNode("div",BK,[h.withDirectives(h.createVNode(rN,{ref_key:"homeComponentRef",ref:E,"receiver-id":m.value,class:"h-full",onCall:T,onInputFocus:A,responsive:d.value},null,8,["receiver-id","responsive"]),[[h.vShow,h.unref(At)==h.unref(He).HOME&&m.value]]),h.unref(At)==h.unref(He).CUSTOMER_DETAIL?(h.openBlock(),h.createBlock(lN,{key:0,ref_key:"customerDetailRef",ref:g,"receiver-id":m.value,class:"h-full",responsive:d.value},null,8,["receiver-id","responsive"])):h.createCommentVNode("",!0),h.unref(At)==h.unref(He).CUSTOMER_CHECK_IN?(h.openBlock(),h.createBlock(_N,{key:1,class:"h-full"})):h.createCommentVNode("",!0),h.unref(At)==h.unref(He).CUSTOMER_APPOINTMENT?(h.openBlock(),h.createBlock(fN,{key:2,class:"h-full"})):h.createCommentVNode("",!0)]),h.createVNode(RN,{ref_key:"callingRef",ref:v,responsive:d.value,onUserCalling:w[6]||(w[6]=V=>s("userCalling",V)),onEndCall:j},null,8,["responsive"])])])):(h.openBlock(),h.createElementBlock("div",NK,[h.createVNode(nN)]))],2)}}});qi.PLIVO_CALL_STATUS=Ye,qi.default=jK,Object.defineProperties(qi,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
15
+ `))}return()=>o.value||i.value||s.value?h.h(n.default({present:s.value})[0],{ref:c=>{const _=As(c);return typeof(_==null?void 0:_.hasAttribute)>"u"||(_!=null&&_.hasAttribute("data-reka-popper-content-wrapper")?r.value=_.firstElementChild:r.value=_),_}}):null}});const o8=h.defineComponent({name:"PrimitiveSlot",inheritAttrs:!1,setup(e,{attrs:n,slots:t}){return()=>{var l;if(!t.default)return null;const i=i_(t.default()),o=i.findIndex(d=>d.type!==h.Comment);if(o===-1)return i;const r=i[o];(l=r.props)==null||delete l.ref;const s=r.props?h.mergeProps(n,r.props):n,u=h.cloneVNode({...r,props:{}},s);return i.length===1?u:(i[o]=u,i)}}}),r8=["area","img","input"],Ci=h.defineComponent({name:"Primitive",inheritAttrs:!1,props:{asChild:{type:Boolean,default:!1},as:{type:[String,Object],default:"div"}},setup(e,{attrs:n,slots:t}){const i=e.asChild?"template":e.as;return typeof i=="string"&&r8.includes(i)?()=>h.h(i,n):i!=="template"?()=>h.h(e.as,n,{default:t.default}):()=>h.h(o8,n,{default:t.default})}}),[_M,s8]=Cs("CollapsibleRoot");var l8=h.defineComponent({__name:"CollapsibleRoot",props:{defaultOpen:{type:Boolean,required:!1,default:!1},open:{type:Boolean,required:!1,default:void 0},disabled:{type:Boolean,required:!1},unmountOnHide:{type:Boolean,required:!1,default:!0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["update:open"],setup(e,{expose:n,emit:t}){const i=e,r=rM(i,"open",t,{defaultValue:i.defaultOpen,passive:i.open===void 0}),{disabled:s,unmountOnHide:u}=h.toRefs(i);return s8({contentId:"",disabled:s,open:r,unmountOnHide:u,onOpenToggle:()=>{s.value||(r.value=!r.value)}}),n({open:r}),ci(),(l,d)=>(h.openBlock(),h.createBlock(h.unref(Ci),{as:l.as,"as-child":i.asChild,"data-state":h.unref(r)?"open":"closed","data-disabled":h.unref(s)?"":void 0},{default:h.withCtx(()=>[h.renderSlot(l.$slots,"default",{open:h.unref(r)})]),_:3},8,["as","as-child","data-state","data-disabled"]))}}),u8=l8,d8=h.defineComponent({inheritAttrs:!1,__name:"CollapsibleContent",props:{forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["contentFound"],setup(e,{emit:n}){const t=e,i=n,o=_M();o.contentId||(o.contentId=__(void 0,"reka-collapsible-content"));const r=h.ref(),{forwardRef:s,currentElement:u}=ci(),l=h.ref(0),d=h.ref(0),c=h.computed(()=>o.open.value),_=h.ref(c.value),f=h.ref();h.watch(()=>{var a;return[c.value,(a=r.value)==null?void 0:a.present]},async()=>{await h.nextTick();const a=u.value;if(!a)return;f.value=f.value||{transitionDuration:a.style.transitionDuration,animationName:a.style.animationName},a.style.transitionDuration="0s",a.style.animationName="none";const v=a.getBoundingClientRect();d.value=v.height,l.value=v.width,_.value||(a.style.transitionDuration=f.value.transitionDuration,a.style.animationName=f.value.animationName)},{immediate:!0});const p=h.computed(()=>_.value&&o.open.value);return h.onMounted(()=>{requestAnimationFrame(()=>{_.value=!1})}),s_(u,"beforematch",a=>{requestAnimationFrame(()=>{o.onOpenToggle(),i("contentFound")})}),(a,v)=>(h.openBlock(),h.createBlock(h.unref(cM),{ref_key:"presentRef",ref:r,present:a.forceMount||h.unref(o).open.value,"force-mount":!0},{default:h.withCtx(({present:m})=>{var g;return[h.createVNode(h.unref(Ci),h.mergeProps(a.$attrs,{id:h.unref(o).contentId,ref:h.unref(s),"as-child":t.asChild,as:a.as,hidden:m?void 0:h.unref(o).unmountOnHide.value?"":"until-found","data-state":p.value?void 0:h.unref(o).open.value?"open":"closed","data-disabled":(g=h.unref(o).disabled)!=null&&g.value?"":void 0,style:{"--reka-collapsible-content-height":`${d.value}px`,"--reka-collapsible-content-width":`${l.value}px`}}),{default:h.withCtx(()=>[!h.unref(o).unmountOnHide.value||m?h.renderSlot(a.$slots,"default",{key:0}):h.createCommentVNode("v-if",!0)]),_:2},1040,["id","as-child","as","hidden","data-state","data-disabled","style"])]}),_:3},8,["present"]))}}),c8=d8,_8=h.defineComponent({__name:"CollapsibleTrigger",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(e){const n=e;ci();const t=_M();return(i,o)=>{var r,s;return h.openBlock(),h.createBlock(h.unref(Ci),{type:i.as==="button"?"button":void 0,as:i.as,"as-child":n.asChild,"aria-controls":h.unref(t).contentId,"aria-expanded":h.unref(t).open.value,"data-state":h.unref(t).open.value?"open":"closed","data-disabled":(r=h.unref(t).disabled)!=null&&r.value?"":void 0,disabled:(s=h.unref(t).disabled)==null?void 0:s.value,onClick:h.unref(t).onOpenToggle},{default:h.withCtx(()=>[h.renderSlot(i.$slots,"default")]),_:3},8,["type","as","as-child","aria-controls","aria-expanded","data-state","data-disabled","disabled","onClick"])}}}),f8=_8;const p8="dismissableLayer.pointerDownOutside",a8="dismissableLayer.focusOutside";function fM(e,n){const t=n.closest("[data-dismissable-layer]"),i=e.dataset.dismissableLayer===""?e:e.querySelector("[data-dismissable-layer]"),o=Array.from(e.ownerDocument.querySelectorAll("[data-dismissable-layer]"));return!!(t&&(i===t||o.indexOf(i)<o.indexOf(t)))}function v8(e,n,t=!0){var s;const i=((s=n==null?void 0:n.value)==null?void 0:s.ownerDocument)??(globalThis==null?void 0:globalThis.document),o=h.ref(!1),r=h.ref(()=>{});return h.watchEffect(u=>{if(!eo||!h.toValue(t))return;const l=async c=>{const _=c.target;if(!(!(n!=null&&n.value)||!_)){if(fM(n.value,_)){o.value=!1;return}if(c.target&&!o.value){let p=function(){tM(p8,e,f)};const f={originalEvent:c};c.pointerType==="touch"?(i.removeEventListener("click",r.value),r.value=p,i.addEventListener("click",r.value,{once:!0})):p()}else i.removeEventListener("click",r.value);o.value=!1}},d=window.setTimeout(()=>{i.addEventListener("pointerdown",l)},0);u(()=>{window.clearTimeout(d),i.removeEventListener("pointerdown",l),i.removeEventListener("click",r.value)})}),{onPointerDownCapture:()=>{h.toValue(t)&&(o.value=!0)}}}function m8(e,n,t=!0){var r;const i=((r=n==null?void 0:n.value)==null?void 0:r.ownerDocument)??(globalThis==null?void 0:globalThis.document),o=h.ref(!1);return h.watchEffect(s=>{if(!eo||!h.toValue(t))return;const u=async l=>{if(!(n!=null&&n.value))return;await h.nextTick(),await h.nextTick();const d=l.target;!n.value||!d||fM(n.value,d)||l.target&&!o.value&&tM(a8,e,{originalEvent:l})};i.addEventListener("focusin",u),s(()=>i.removeEventListener("focusin",u))}),{onFocusCapture:()=>{h.toValue(t)&&(o.value=!0)},onBlurCapture:()=>{h.toValue(t)&&(o.value=!1)}}}const Ui=h.reactive({layersRoot:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set});var h8=h.defineComponent({__name:"DismissableLayer",props:{disableOutsidePointerEvents:{type:Boolean,required:!1,default:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","dismiss"],setup(e,{emit:n}){const t=e,i=n,{forwardRef:o,currentElement:r}=ci(),s=h.computed(()=>{var a;return((a=r.value)==null?void 0:a.ownerDocument)??globalThis.document}),u=h.computed(()=>Ui.layersRoot),l=h.computed(()=>r.value?Array.from(u.value).indexOf(r.value):-1),d=h.computed(()=>Ui.layersWithOutsidePointerEventsDisabled.size>0),c=h.computed(()=>{const a=Array.from(u.value),[v]=[...Ui.layersWithOutsidePointerEventsDisabled].slice(-1),m=a.indexOf(v);return l.value>=m}),_=v8(async a=>{const v=[...Ui.branches].some(m=>m==null?void 0:m.contains(a.target));!c.value||v||(i("pointerDownOutside",a),i("interactOutside",a),await h.nextTick(),a.defaultPrevented||i("dismiss"))},r),f=m8(a=>{[...Ui.branches].some(m=>m==null?void 0:m.contains(a.target))||(i("focusOutside",a),i("interactOutside",a),a.defaultPrevented||i("dismiss"))},r);Vq("Escape",a=>{l.value===u.value.size-1&&(i("escapeKeyDown",a),a.defaultPrevented||i("dismiss"))});let p;return h.watchEffect(a=>{r.value&&(t.disableOutsidePointerEvents&&(Ui.layersWithOutsidePointerEventsDisabled.size===0&&(p=s.value.body.style.pointerEvents,s.value.body.style.pointerEvents="none"),Ui.layersWithOutsidePointerEventsDisabled.add(r.value)),u.value.add(r.value),a(()=>{t.disableOutsidePointerEvents&&Ui.layersWithOutsidePointerEventsDisabled.size===1&&(s.value.body.style.pointerEvents=p)}))}),h.watchEffect(a=>{a(()=>{r.value&&(u.value.delete(r.value),Ui.layersWithOutsidePointerEventsDisabled.delete(r.value))})}),(a,v)=>(h.openBlock(),h.createBlock(h.unref(Ci),{ref:h.unref(o),"as-child":a.asChild,as:a.as,"data-dismissable-layer":"",style:h.normalizeStyle({pointerEvents:d.value?c.value?"auto":"none":void 0}),onFocusCapture:h.unref(f).onFocusCapture,onBlurCapture:h.unref(f).onBlurCapture,onPointerdownCapture:h.unref(_).onPointerDownCapture},{default:h.withCtx(()=>[h.renderSlot(a.$slots,"default")]),_:3},8,["as-child","as","style","onFocusCapture","onBlurCapture","onPointerdownCapture"]))}}),y8=h8;const g8=Aq(()=>h.ref([]));function E8(){const e=g8();return{add(n){const t=e.value[0];n!==t&&(t==null||t.pause()),e.value=pM(e.value,n),e.value.unshift(n)},remove(n){var t;e.value=pM(e.value,n),(t=e.value[0])==null||t.resume()}}}function pM(e,n){const t=[...e],i=t.indexOf(n);return i!==-1&&t.splice(i,1),t}function T8(e){return e.filter(n=>n.tagName!=="A")}const f_="focusScope.autoFocusOnMount",p_="focusScope.autoFocusOnUnmount",aM={bubbles:!1,cancelable:!0};function S8(e,{select:n=!1}={}){const t=Mr();for(const i of e)if(to(i,{select:n}),Mr()!==t)return!0}function b8(e){const n=vM(e),t=mM(n,e),i=mM(n.reverse(),e);return[t,i]}function vM(e){const n=[],t=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:i=>{const o=i.tagName==="INPUT"&&i.type==="hidden";return i.disabled||i.hidden||o?NodeFilter.FILTER_SKIP:i.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;t.nextNode();)n.push(t.currentNode);return n}function mM(e,n){for(const t of e)if(!I8(t,{upTo:n}))return t}function I8(e,{upTo:n}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(n!==void 0&&e===n)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function C8(e){return e instanceof HTMLInputElement&&"select"in e}function to(e,{select:n=!1}={}){if(e&&e.focus){const t=Mr();e.focus({preventScroll:!0}),e!==t&&C8(e)&&n&&e.select()}}var A8=h.defineComponent({__name:"FocusScope",props:{loop:{type:Boolean,required:!1,default:!1},trapped:{type:Boolean,required:!1,default:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["mountAutoFocus","unmountAutoFocus"],setup(e,{emit:n}){const t=e,i=n,{currentRef:o,currentElement:r}=ci(),s=h.ref(null),u=E8(),l=h.reactive({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}});h.watchEffect(c=>{if(!eo)return;const _=r.value;if(!t.trapped)return;function f(m){if(l.paused||!_)return;const g=m.target;_.contains(g)?s.value=g:to(s.value,{select:!0})}function p(m){if(l.paused||!_)return;const g=m.relatedTarget;g!==null&&(_.contains(g)||to(s.value,{select:!0}))}function a(m){_.contains(s.value)||to(_)}document.addEventListener("focusin",f),document.addEventListener("focusout",p);const v=new MutationObserver(a);_&&v.observe(_,{childList:!0,subtree:!0}),c(()=>{document.removeEventListener("focusin",f),document.removeEventListener("focusout",p),v.disconnect()})}),h.watchEffect(async c=>{const _=r.value;if(await h.nextTick(),!_)return;u.add(l);const f=Mr();if(!_.contains(f)){const a=new CustomEvent(f_,aM);_.addEventListener(f_,v=>i("mountAutoFocus",v)),_.dispatchEvent(a),a.defaultPrevented||(S8(T8(vM(_)),{select:!0}),Mr()===f&&to(_))}c(()=>{_.removeEventListener(f_,m=>i("mountAutoFocus",m));const a=new CustomEvent(p_,aM),v=m=>{i("unmountAutoFocus",m)};_.addEventListener(p_,v),_.dispatchEvent(a),setTimeout(()=>{a.defaultPrevented||to(f??document.body,{select:!0}),_.removeEventListener(p_,v),u.remove(l)},0)})});function d(c){if(!t.loop&&!t.trapped||l.paused)return;const _=c.key==="Tab"&&!c.altKey&&!c.ctrlKey&&!c.metaKey,f=Mr();if(_&&f){const p=c.currentTarget,[a,v]=b8(p);a&&v?!c.shiftKey&&f===v?(c.preventDefault(),t.loop&&to(a,{select:!0})):c.shiftKey&&f===a&&(c.preventDefault(),t.loop&&to(v,{select:!0})):f===p&&c.preventDefault()}}return(c,_)=>(h.openBlock(),h.createBlock(h.unref(Ci),{ref_key:"currentRef",ref:o,tabindex:"-1","as-child":c.asChild,as:c.as,onKeydown:d},{default:h.withCtx(()=>[h.renderSlot(c.$slots,"default")]),_:3},8,["as-child","as"]))}}),R8=A8,M8=h.defineComponent({__name:"Teleport",props:{to:{type:null,required:!1,default:"body"},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(e){const n=Bq();return(t,i)=>h.unref(n)||t.forceMount?(h.openBlock(),h.createBlock(h.Teleport,{key:0,to:t.to,disabled:t.disabled,defer:t.defer},[h.renderSlot(t.$slots,"default")],8,["to","disabled","defer"])):h.createCommentVNode("v-if",!0)}}),N8=M8;const[hM,O8]=Cs("PopperRoot");var w8=h.defineComponent({inheritAttrs:!1,__name:"PopperRoot",setup(e){const n=h.ref();return O8({anchor:n,onAnchorChange:t=>n.value=t}),(t,i)=>h.renderSlot(t.$slots,"default")}}),x8=w8,P8=h.defineComponent({__name:"PopperAnchor",props:{reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const n=e,{forwardRef:t,currentElement:i}=ci(),o=hM();return h.watchPostEffect(()=>{o.onAnchorChange(n.reference??i.value)}),(r,s)=>(h.openBlock(),h.createBlock(h.unref(Ci),{ref:h.unref(t),as:r.as,"as-child":r.asChild},{default:h.withCtx(()=>[h.renderSlot(r.$slots,"default")]),_:3},8,["as","as-child"]))}}),D8=P8;function k8(e){return e!==null}function L8(e){return{name:"transformOrigin",options:e,fn(n){var m,g,E;const{placement:t,rects:i,middlewareData:o}=n,s=((m=o.arrow)==null?void 0:m.centerOffset)!==0,u=s?0:e.arrowWidth,l=s?0:e.arrowHeight,[d,c]=a_(t),_={start:"0%",center:"50%",end:"100%"}[c],f=(((g=o.arrow)==null?void 0:g.x)??0)+u/2,p=(((E=o.arrow)==null?void 0:E.y)??0)+l/2;let a="",v="";return d==="bottom"?(a=s?_:`${f}px`,v=`${-l}px`):d==="top"?(a=s?_:`${f}px`,v=`${i.floating.height+l}px`):d==="right"?(a=`${-l}px`,v=s?_:`${p}px`):d==="left"&&(a=`${i.floating.width+l}px`,v=s?_:`${p}px`),{data:{x:a,y:v}}}}}function a_(e){const[n,t="center"]=e.split("-");return[n,t]}const U8=["top","right","bottom","left"],no=Math.min,Yn=Math.max,ru=Math.round,su=Math.floor,Ai=e=>({x:e,y:e}),B8={left:"right",right:"left",bottom:"top",top:"bottom"},j8={start:"end",end:"start"};function v_(e,n,t){return Yn(e,no(n,t))}function Bi(e,n){return typeof e=="function"?e(n):e}function ji(e){return e.split("-")[0]}function wr(e){return e.split("-")[1]}function m_(e){return e==="x"?"y":"x"}function h_(e){return e==="y"?"height":"width"}const V8=new Set(["top","bottom"]);function Ri(e){return V8.has(ji(e))?"y":"x"}function y_(e){return m_(Ri(e))}function F8(e,n,t){t===void 0&&(t=!1);const i=wr(e),o=y_(e),r=h_(o);let s=o==="x"?i===(t?"end":"start")?"right":"left":i==="start"?"bottom":"top";return n.reference[r]>n.floating[r]&&(s=lu(s)),[s,lu(s)]}function q8(e){const n=lu(e);return[g_(e),n,g_(n)]}function g_(e){return e.replace(/start|end/g,n=>j8[n])}const yM=["left","right"],gM=["right","left"],G8=["top","bottom"],H8=["bottom","top"];function z8(e,n,t){switch(e){case"top":case"bottom":return t?n?gM:yM:n?yM:gM;case"left":case"right":return n?G8:H8;default:return[]}}function Y8(e,n,t,i){const o=wr(e);let r=z8(ji(e),t==="start",i);return o&&(r=r.map(s=>s+"-"+o),n&&(r=r.concat(r.map(g_)))),r}function lu(e){return e.replace(/left|right|bottom|top/g,n=>B8[n])}function K8(e){return{top:0,right:0,bottom:0,left:0,...e}}function EM(e){return typeof e!="number"?K8(e):{top:e,right:e,bottom:e,left:e}}function uu(e){const{x:n,y:t,width:i,height:o}=e;return{width:i,height:o,top:t,left:n,right:n+i,bottom:t+o,x:n,y:t}}function TM(e,n,t){let{reference:i,floating:o}=e;const r=Ri(n),s=y_(n),u=h_(s),l=ji(n),d=r==="y",c=i.x+i.width/2-o.width/2,_=i.y+i.height/2-o.height/2,f=i[u]/2-o[u]/2;let p;switch(l){case"top":p={x:c,y:i.y-o.height};break;case"bottom":p={x:c,y:i.y+i.height};break;case"right":p={x:i.x+i.width,y:_};break;case"left":p={x:i.x-o.width,y:_};break;default:p={x:i.x,y:i.y}}switch(wr(n)){case"start":p[s]-=f*(t&&d?-1:1);break;case"end":p[s]+=f*(t&&d?-1:1);break}return p}const W8=async(e,n,t)=>{const{placement:i="bottom",strategy:o="absolute",middleware:r=[],platform:s}=t,u=r.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(n));let d=await s.getElementRects({reference:e,floating:n,strategy:o}),{x:c,y:_}=TM(d,i,l),f=i,p={},a=0;for(let v=0;v<u.length;v++){const{name:m,fn:g}=u[v],{x:E,y,data:S,reset:C}=await g({x:c,y:_,initialPlacement:i,placement:f,strategy:o,middlewareData:p,rects:d,platform:s,elements:{reference:e,floating:n}});c=E??c,_=y??_,p={...p,[m]:{...p[m],...S}},C&&a<=50&&(a++,typeof C=="object"&&(C.placement&&(f=C.placement),C.rects&&(d=C.rects===!0?await s.getElementRects({reference:e,floating:n,strategy:o}):C.rects),{x:c,y:_}=TM(d,f,l)),v=-1)}return{x:c,y:_,placement:f,strategy:o,middlewareData:p}};async function Rs(e,n){var t;n===void 0&&(n={});const{x:i,y:o,platform:r,rects:s,elements:u,strategy:l}=e,{boundary:d="clippingAncestors",rootBoundary:c="viewport",elementContext:_="floating",altBoundary:f=!1,padding:p=0}=Bi(n,e),a=EM(p),m=u[f?_==="floating"?"reference":"floating":_],g=uu(await r.getClippingRect({element:(t=await(r.isElement==null?void 0:r.isElement(m)))==null||t?m:m.contextElement||await(r.getDocumentElement==null?void 0:r.getDocumentElement(u.floating)),boundary:d,rootBoundary:c,strategy:l})),E=_==="floating"?{x:i,y:o,width:s.floating.width,height:s.floating.height}:s.reference,y=await(r.getOffsetParent==null?void 0:r.getOffsetParent(u.floating)),S=await(r.isElement==null?void 0:r.isElement(y))?await(r.getScale==null?void 0:r.getScale(y))||{x:1,y:1}:{x:1,y:1},C=uu(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:u,rect:E,offsetParent:y,strategy:l}):E);return{top:(g.top-C.top+a.top)/S.y,bottom:(C.bottom-g.bottom+a.bottom)/S.y,left:(g.left-C.left+a.left)/S.x,right:(C.right-g.right+a.right)/S.x}}const $8=e=>({name:"arrow",options:e,async fn(n){const{x:t,y:i,placement:o,rects:r,platform:s,elements:u,middlewareData:l}=n,{element:d,padding:c=0}=Bi(e,n)||{};if(d==null)return{};const _=EM(c),f={x:t,y:i},p=y_(o),a=h_(p),v=await s.getDimensions(d),m=p==="y",g=m?"top":"left",E=m?"bottom":"right",y=m?"clientHeight":"clientWidth",S=r.reference[a]+r.reference[p]-f[p]-r.floating[a],C=f[p]-r.reference[p],T=await(s.getOffsetParent==null?void 0:s.getOffsetParent(d));let R=T?T[y]:0;(!R||!await(s.isElement==null?void 0:s.isElement(T)))&&(R=u.floating[y]||r.floating[a]);const O=S/2-C/2,B=R/2-v[a]/2-1,j=no(_[g],B),I=no(_[E],B),A=j,M=R-v[a]-I,w=R/2-v[a]/2+O,x=v_(A,w,M),k=!l.arrow&&wr(o)!=null&&w!==x&&r.reference[a]/2-(w<A?j:I)-v[a]/2<0,V=k?w<A?w-A:w-M:0;return{[p]:f[p]+V,data:{[p]:x,centerOffset:w-x-V,...k&&{alignmentOffset:V}},reset:k}}}),Q8=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(n){var t,i;const{placement:o,middlewareData:r,rects:s,initialPlacement:u,platform:l,elements:d}=n,{mainAxis:c=!0,crossAxis:_=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:a="none",flipAlignment:v=!0,...m}=Bi(e,n);if((t=r.arrow)!=null&&t.alignmentOffset)return{};const g=ji(o),E=Ri(u),y=ji(u)===u,S=await(l.isRTL==null?void 0:l.isRTL(d.floating)),C=f||(y||!v?[lu(u)]:q8(u)),T=a!=="none";!f&&T&&C.push(...Y8(u,v,a,S));const R=[u,...C],O=await Rs(n,m),B=[];let j=((i=r.flip)==null?void 0:i.overflows)||[];if(c&&B.push(O[g]),_){const w=F8(o,s,S);B.push(O[w[0]],O[w[1]])}if(j=[...j,{placement:o,overflows:B}],!B.every(w=>w<=0)){var I,A;const w=(((I=r.flip)==null?void 0:I.index)||0)+1,x=R[w];if(x&&(!(_==="alignment"?E!==Ri(x):!1)||j.every(L=>Ri(L.placement)===E?L.overflows[0]>0:!0)))return{data:{index:w,overflows:j},reset:{placement:x}};let k=(A=j.filter(V=>V.overflows[0]<=0).sort((V,L)=>V.overflows[1]-L.overflows[1])[0])==null?void 0:A.placement;if(!k)switch(p){case"bestFit":{var M;const V=(M=j.filter(L=>{if(T){const D=Ri(L.placement);return D===E||D==="y"}return!0}).map(L=>[L.placement,L.overflows.filter(D=>D>0).reduce((D,F)=>D+F,0)]).sort((L,D)=>L[1]-D[1])[0])==null?void 0:M[0];V&&(k=V);break}case"initialPlacement":k=u;break}if(o!==k)return{reset:{placement:k}}}return{}}}};function SM(e,n){return{top:e.top-n.height,right:e.right-n.width,bottom:e.bottom-n.height,left:e.left-n.width}}function bM(e){return U8.some(n=>e[n]>=0)}const J8=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(n){const{rects:t}=n,{strategy:i="referenceHidden",...o}=Bi(e,n);switch(i){case"referenceHidden":{const r=await Rs(n,{...o,elementContext:"reference"}),s=SM(r,t.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:bM(s)}}}case"escaped":{const r=await Rs(n,{...o,altBoundary:!0}),s=SM(r,t.floating);return{data:{escapedOffsets:s,escaped:bM(s)}}}default:return{}}}}},IM=new Set(["left","top"]);async function X8(e,n){const{placement:t,platform:i,elements:o}=e,r=await(i.isRTL==null?void 0:i.isRTL(o.floating)),s=ji(t),u=wr(t),l=Ri(t)==="y",d=IM.has(s)?-1:1,c=r&&l?-1:1,_=Bi(n,e);let{mainAxis:f,crossAxis:p,alignmentAxis:a}=typeof _=="number"?{mainAxis:_,crossAxis:0,alignmentAxis:null}:{mainAxis:_.mainAxis||0,crossAxis:_.crossAxis||0,alignmentAxis:_.alignmentAxis};return u&&typeof a=="number"&&(p=u==="end"?a*-1:a),l?{x:p*c,y:f*d}:{x:f*d,y:p*c}}const Z8=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(n){var t,i;const{x:o,y:r,placement:s,middlewareData:u}=n,l=await X8(n,e);return s===((t=u.offset)==null?void 0:t.placement)&&(i=u.arrow)!=null&&i.alignmentOffset?{}:{x:o+l.x,y:r+l.y,data:{...l,placement:s}}}}},eG=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(n){const{x:t,y:i,placement:o}=n,{mainAxis:r=!0,crossAxis:s=!1,limiter:u={fn:m=>{let{x:g,y:E}=m;return{x:g,y:E}}},...l}=Bi(e,n),d={x:t,y:i},c=await Rs(n,l),_=Ri(ji(o)),f=m_(_);let p=d[f],a=d[_];if(r){const m=f==="y"?"top":"left",g=f==="y"?"bottom":"right",E=p+c[m],y=p-c[g];p=v_(E,p,y)}if(s){const m=_==="y"?"top":"left",g=_==="y"?"bottom":"right",E=a+c[m],y=a-c[g];a=v_(E,a,y)}const v=u.fn({...n,[f]:p,[_]:a});return{...v,data:{x:v.x-t,y:v.y-i,enabled:{[f]:r,[_]:s}}}}}},tG=function(e){return e===void 0&&(e={}),{options:e,fn(n){const{x:t,y:i,placement:o,rects:r,middlewareData:s}=n,{offset:u=0,mainAxis:l=!0,crossAxis:d=!0}=Bi(e,n),c={x:t,y:i},_=Ri(o),f=m_(_);let p=c[f],a=c[_];const v=Bi(u,n),m=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(l){const y=f==="y"?"height":"width",S=r.reference[f]-r.floating[y]+m.mainAxis,C=r.reference[f]+r.reference[y]-m.mainAxis;p<S?p=S:p>C&&(p=C)}if(d){var g,E;const y=f==="y"?"width":"height",S=IM.has(ji(o)),C=r.reference[_]-r.floating[y]+(S&&((g=s.offset)==null?void 0:g[_])||0)+(S?0:m.crossAxis),T=r.reference[_]+r.reference[y]+(S?0:((E=s.offset)==null?void 0:E[_])||0)-(S?m.crossAxis:0);a<C?a=C:a>T&&(a=T)}return{[f]:p,[_]:a}}}},nG=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(n){var t,i;const{placement:o,rects:r,platform:s,elements:u}=n,{apply:l=()=>{},...d}=Bi(e,n),c=await Rs(n,d),_=ji(o),f=wr(o),p=Ri(o)==="y",{width:a,height:v}=r.floating;let m,g;_==="top"||_==="bottom"?(m=_,g=f===(await(s.isRTL==null?void 0:s.isRTL(u.floating))?"start":"end")?"left":"right"):(g=_,m=f==="end"?"top":"bottom");const E=v-c.top-c.bottom,y=a-c.left-c.right,S=no(v-c[m],E),C=no(a-c[g],y),T=!n.middlewareData.shift;let R=S,O=C;if((t=n.middlewareData.shift)!=null&&t.enabled.x&&(O=y),(i=n.middlewareData.shift)!=null&&i.enabled.y&&(R=E),T&&!f){const j=Yn(c.left,0),I=Yn(c.right,0),A=Yn(c.top,0),M=Yn(c.bottom,0);p?O=a-2*(j!==0||I!==0?j+I:Yn(c.left,c.right)):R=v-2*(A!==0||M!==0?A+M:Yn(c.top,c.bottom))}await l({...n,availableWidth:O,availableHeight:R});const B=await s.getDimensions(u.floating);return a!==B.width||v!==B.height?{reset:{rects:!0}}:{}}}};function du(){return typeof window<"u"}function Ao(e){return E_(e)?(e.nodeName||"").toLowerCase():"#document"}function Kn(e){var n;return(e==null||(n=e.ownerDocument)==null?void 0:n.defaultView)||window}function Mi(e){var n;return(n=(E_(e)?e.ownerDocument:e.document)||window.document)==null?void 0:n.documentElement}function E_(e){return du()?e instanceof Node||e instanceof Kn(e).Node:!1}function _i(e){return du()?e instanceof Element||e instanceof Kn(e).Element:!1}function Ni(e){return du()?e instanceof HTMLElement||e instanceof Kn(e).HTMLElement:!1}function CM(e){return!du()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Kn(e).ShadowRoot}const iG=new Set(["inline","contents"]);function Ms(e){const{overflow:n,overflowX:t,overflowY:i,display:o}=fi(e);return/auto|scroll|overlay|hidden|clip/.test(n+i+t)&&!iG.has(o)}const oG=new Set(["table","td","th"]);function rG(e){return oG.has(Ao(e))}const sG=[":popover-open",":modal"];function cu(e){return sG.some(n=>{try{return e.matches(n)}catch{return!1}})}const lG=["transform","translate","scale","rotate","perspective"],uG=["transform","translate","scale","rotate","perspective","filter"],dG=["paint","layout","strict","content"];function T_(e){const n=S_(),t=_i(e)?fi(e):e;return lG.some(i=>t[i]?t[i]!=="none":!1)||(t.containerType?t.containerType!=="normal":!1)||!n&&(t.backdropFilter?t.backdropFilter!=="none":!1)||!n&&(t.filter?t.filter!=="none":!1)||uG.some(i=>(t.willChange||"").includes(i))||dG.some(i=>(t.contain||"").includes(i))}function cG(e){let n=io(e);for(;Ni(n)&&!xr(n);){if(T_(n))return n;if(cu(n))return null;n=io(n)}return null}function S_(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const _G=new Set(["html","body","#document"]);function xr(e){return _G.has(Ao(e))}function fi(e){return Kn(e).getComputedStyle(e)}function _u(e){return _i(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function io(e){if(Ao(e)==="html")return e;const n=e.assignedSlot||e.parentNode||CM(e)&&e.host||Mi(e);return CM(n)?n.host:n}function AM(e){const n=io(e);return xr(n)?e.ownerDocument?e.ownerDocument.body:e.body:Ni(n)&&Ms(n)?n:AM(n)}function Ns(e,n,t){var i;n===void 0&&(n=[]),t===void 0&&(t=!0);const o=AM(e),r=o===((i=e.ownerDocument)==null?void 0:i.body),s=Kn(o);if(r){const u=b_(s);return n.concat(s,s.visualViewport||[],Ms(o)?o:[],u&&t?Ns(u):[])}return n.concat(o,Ns(o,[],t))}function b_(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function RM(e){const n=fi(e);let t=parseFloat(n.width)||0,i=parseFloat(n.height)||0;const o=Ni(e),r=o?e.offsetWidth:t,s=o?e.offsetHeight:i,u=ru(t)!==r||ru(i)!==s;return u&&(t=r,i=s),{width:t,height:i,$:u}}function I_(e){return _i(e)?e:e.contextElement}function Pr(e){const n=I_(e);if(!Ni(n))return Ai(1);const t=n.getBoundingClientRect(),{width:i,height:o,$:r}=RM(n);let s=(r?ru(t.width):t.width)/i,u=(r?ru(t.height):t.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!u||!Number.isFinite(u))&&(u=1),{x:s,y:u}}const fG=Ai(0);function MM(e){const n=Kn(e);return!S_()||!n.visualViewport?fG:{x:n.visualViewport.offsetLeft,y:n.visualViewport.offsetTop}}function pG(e,n,t){return n===void 0&&(n=!1),!t||n&&t!==Kn(e)?!1:n}function Ro(e,n,t,i){n===void 0&&(n=!1),t===void 0&&(t=!1);const o=e.getBoundingClientRect(),r=I_(e);let s=Ai(1);n&&(i?_i(i)&&(s=Pr(i)):s=Pr(e));const u=pG(r,t,i)?MM(r):Ai(0);let l=(o.left+u.x)/s.x,d=(o.top+u.y)/s.y,c=o.width/s.x,_=o.height/s.y;if(r){const f=Kn(r),p=i&&_i(i)?Kn(i):i;let a=f,v=b_(a);for(;v&&i&&p!==a;){const m=Pr(v),g=v.getBoundingClientRect(),E=fi(v),y=g.left+(v.clientLeft+parseFloat(E.paddingLeft))*m.x,S=g.top+(v.clientTop+parseFloat(E.paddingTop))*m.y;l*=m.x,d*=m.y,c*=m.x,_*=m.y,l+=y,d+=S,a=Kn(v),v=b_(a)}}return uu({width:c,height:_,x:l,y:d})}function C_(e,n){const t=_u(e).scrollLeft;return n?n.left+t:Ro(Mi(e)).left+t}function NM(e,n,t){t===void 0&&(t=!1);const i=e.getBoundingClientRect(),o=i.left+n.scrollLeft-(t?0:C_(e,i)),r=i.top+n.scrollTop;return{x:o,y:r}}function aG(e){let{elements:n,rect:t,offsetParent:i,strategy:o}=e;const r=o==="fixed",s=Mi(i),u=n?cu(n.floating):!1;if(i===s||u&&r)return t;let l={scrollLeft:0,scrollTop:0},d=Ai(1);const c=Ai(0),_=Ni(i);if((_||!_&&!r)&&((Ao(i)!=="body"||Ms(s))&&(l=_u(i)),Ni(i))){const p=Ro(i);d=Pr(i),c.x=p.x+i.clientLeft,c.y=p.y+i.clientTop}const f=s&&!_&&!r?NM(s,l,!0):Ai(0);return{width:t.width*d.x,height:t.height*d.y,x:t.x*d.x-l.scrollLeft*d.x+c.x+f.x,y:t.y*d.y-l.scrollTop*d.y+c.y+f.y}}function vG(e){return Array.from(e.getClientRects())}function mG(e){const n=Mi(e),t=_u(e),i=e.ownerDocument.body,o=Yn(n.scrollWidth,n.clientWidth,i.scrollWidth,i.clientWidth),r=Yn(n.scrollHeight,n.clientHeight,i.scrollHeight,i.clientHeight);let s=-t.scrollLeft+C_(e);const u=-t.scrollTop;return fi(i).direction==="rtl"&&(s+=Yn(n.clientWidth,i.clientWidth)-o),{width:o,height:r,x:s,y:u}}function hG(e,n){const t=Kn(e),i=Mi(e),o=t.visualViewport;let r=i.clientWidth,s=i.clientHeight,u=0,l=0;if(o){r=o.width,s=o.height;const d=S_();(!d||d&&n==="fixed")&&(u=o.offsetLeft,l=o.offsetTop)}return{width:r,height:s,x:u,y:l}}const yG=new Set(["absolute","fixed"]);function gG(e,n){const t=Ro(e,!0,n==="fixed"),i=t.top+e.clientTop,o=t.left+e.clientLeft,r=Ni(e)?Pr(e):Ai(1),s=e.clientWidth*r.x,u=e.clientHeight*r.y,l=o*r.x,d=i*r.y;return{width:s,height:u,x:l,y:d}}function OM(e,n,t){let i;if(n==="viewport")i=hG(e,t);else if(n==="document")i=mG(Mi(e));else if(_i(n))i=gG(n,t);else{const o=MM(e);i={x:n.x-o.x,y:n.y-o.y,width:n.width,height:n.height}}return uu(i)}function wM(e,n){const t=io(e);return t===n||!_i(t)||xr(t)?!1:fi(t).position==="fixed"||wM(t,n)}function EG(e,n){const t=n.get(e);if(t)return t;let i=Ns(e,[],!1).filter(u=>_i(u)&&Ao(u)!=="body"),o=null;const r=fi(e).position==="fixed";let s=r?io(e):e;for(;_i(s)&&!xr(s);){const u=fi(s),l=T_(s);!l&&u.position==="fixed"&&(o=null),(r?!l&&!o:!l&&u.position==="static"&&!!o&&yG.has(o.position)||Ms(s)&&!l&&wM(e,s))?i=i.filter(c=>c!==s):o=u,s=io(s)}return n.set(e,i),i}function TG(e){let{element:n,boundary:t,rootBoundary:i,strategy:o}=e;const s=[...t==="clippingAncestors"?cu(n)?[]:EG(n,this._c):[].concat(t),i],u=s[0],l=s.reduce((d,c)=>{const _=OM(n,c,o);return d.top=Yn(_.top,d.top),d.right=no(_.right,d.right),d.bottom=no(_.bottom,d.bottom),d.left=Yn(_.left,d.left),d},OM(n,u,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function SG(e){const{width:n,height:t}=RM(e);return{width:n,height:t}}function bG(e,n,t){const i=Ni(n),o=Mi(n),r=t==="fixed",s=Ro(e,!0,r,n);let u={scrollLeft:0,scrollTop:0};const l=Ai(0);function d(){l.x=C_(o)}if(i||!i&&!r)if((Ao(n)!=="body"||Ms(o))&&(u=_u(n)),i){const p=Ro(n,!0,r,n);l.x=p.x+n.clientLeft,l.y=p.y+n.clientTop}else o&&d();r&&!i&&o&&d();const c=o&&!i&&!r?NM(o,u):Ai(0),_=s.left+u.scrollLeft-l.x-c.x,f=s.top+u.scrollTop-l.y-c.y;return{x:_,y:f,width:s.width,height:s.height}}function A_(e){return fi(e).position==="static"}function xM(e,n){if(!Ni(e)||fi(e).position==="fixed")return null;if(n)return n(e);let t=e.offsetParent;return Mi(e)===t&&(t=t.ownerDocument.body),t}function PM(e,n){const t=Kn(e);if(cu(e))return t;if(!Ni(e)){let o=io(e);for(;o&&!xr(o);){if(_i(o)&&!A_(o))return o;o=io(o)}return t}let i=xM(e,n);for(;i&&rG(i)&&A_(i);)i=xM(i,n);return i&&xr(i)&&A_(i)&&!T_(i)?t:i||cG(e)||t}const IG=async function(e){const n=this.getOffsetParent||PM,t=this.getDimensions,i=await t(e.floating);return{reference:bG(e.reference,await n(e.floating),e.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function CG(e){return fi(e).direction==="rtl"}const AG={convertOffsetParentRelativeRectToViewportRelativeRect:aG,getDocumentElement:Mi,getClippingRect:TG,getOffsetParent:PM,getElementRects:IG,getClientRects:vG,getDimensions:SG,getScale:Pr,isElement:_i,isRTL:CG};function DM(e,n){return e.x===n.x&&e.y===n.y&&e.width===n.width&&e.height===n.height}function RG(e,n){let t=null,i;const o=Mi(e);function r(){var u;clearTimeout(i),(u=t)==null||u.disconnect(),t=null}function s(u,l){u===void 0&&(u=!1),l===void 0&&(l=1),r();const d=e.getBoundingClientRect(),{left:c,top:_,width:f,height:p}=d;if(u||n(),!f||!p)return;const a=su(_),v=su(o.clientWidth-(c+f)),m=su(o.clientHeight-(_+p)),g=su(c),y={rootMargin:-a+"px "+-v+"px "+-m+"px "+-g+"px",threshold:Yn(0,no(1,l))||1};let S=!0;function C(T){const R=T[0].intersectionRatio;if(R!==l){if(!S)return s();R?s(!1,R):i=setTimeout(()=>{s(!1,1e-7)},1e3)}R===1&&!DM(d,e.getBoundingClientRect())&&s(),S=!1}try{t=new IntersectionObserver(C,{...y,root:o.ownerDocument})}catch{t=new IntersectionObserver(C,y)}t.observe(e)}return s(!0),r}function MG(e,n,t,i){i===void 0&&(i={});const{ancestorScroll:o=!0,ancestorResize:r=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:u=typeof IntersectionObserver=="function",animationFrame:l=!1}=i,d=I_(e),c=o||r?[...d?Ns(d):[],...Ns(n)]:[];c.forEach(g=>{o&&g.addEventListener("scroll",t,{passive:!0}),r&&g.addEventListener("resize",t)});const _=d&&u?RG(d,t):null;let f=-1,p=null;s&&(p=new ResizeObserver(g=>{let[E]=g;E&&E.target===d&&p&&(p.unobserve(n),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var y;(y=p)==null||y.observe(n)})),t()}),d&&!l&&p.observe(d),p.observe(n));let a,v=l?Ro(e):null;l&&m();function m(){const g=Ro(e);v&&!DM(v,g)&&t(),v=g,a=requestAnimationFrame(m)}return t(),()=>{var g;c.forEach(E=>{o&&E.removeEventListener("scroll",t),r&&E.removeEventListener("resize",t)}),_==null||_(),(g=p)==null||g.disconnect(),p=null,l&&cancelAnimationFrame(a)}}const NG=Z8,OG=eG,kM=Q8,wG=nG,xG=J8,PG=$8,DG=tG,kG=(e,n,t)=>{const i=new Map,o={platform:AG,...t},r={...o.platform,_c:i};return W8(e,n,{...o,platform:r})};function LG(e){return e!=null&&typeof e=="object"&&"$el"in e}function R_(e){if(LG(e)){const n=e.$el;return E_(n)&&Ao(n)==="#comment"?null:n}return e}function Dr(e){return typeof e=="function"?e():h.unref(e)}function UG(e){return{name:"arrow",options:e,fn(n){const t=R_(Dr(e.element));return t==null?{}:PG({element:t,padding:e.padding}).fn(n)}}}function LM(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function UM(e,n){const t=LM(e);return Math.round(n*t)/t}function BG(e,n,t){t===void 0&&(t={});const i=t.whileElementsMounted,o=h.computed(()=>{var R;return(R=Dr(t.open))!=null?R:!0}),r=h.computed(()=>Dr(t.middleware)),s=h.computed(()=>{var R;return(R=Dr(t.placement))!=null?R:"bottom"}),u=h.computed(()=>{var R;return(R=Dr(t.strategy))!=null?R:"absolute"}),l=h.computed(()=>{var R;return(R=Dr(t.transform))!=null?R:!0}),d=h.computed(()=>R_(e.value)),c=h.computed(()=>R_(n.value)),_=h.ref(0),f=h.ref(0),p=h.ref(u.value),a=h.ref(s.value),v=h.shallowRef({}),m=h.ref(!1),g=h.computed(()=>{const R={position:p.value,left:"0",top:"0"};if(!c.value)return R;const O=UM(c.value,_.value),B=UM(c.value,f.value);return l.value?{...R,transform:"translate("+O+"px, "+B+"px)",...LM(c.value)>=1.5&&{willChange:"transform"}}:{position:p.value,left:O+"px",top:B+"px"}});let E;function y(){if(d.value==null||c.value==null)return;const R=o.value;kG(d.value,c.value,{middleware:r.value,placement:s.value,strategy:u.value}).then(O=>{_.value=O.x,f.value=O.y,p.value=O.strategy,a.value=O.placement,v.value=O.middlewareData,m.value=R!==!1})}function S(){typeof E=="function"&&(E(),E=void 0)}function C(){if(S(),i===void 0){y();return}if(d.value!=null&&c.value!=null){E=i(d.value,c.value,y);return}}function T(){o.value||(m.value=!1)}return h.watch([r,s,u,o],y,{flush:"sync"}),h.watch([d,c],C,{flush:"sync"}),h.watch(o,T,{flush:"sync"}),h.getCurrentScope()&&h.onScopeDispose(S),{x:h.shallowReadonly(_),y:h.shallowReadonly(f),strategy:h.shallowReadonly(p),placement:h.shallowReadonly(a),middlewareData:h.shallowReadonly(v),isPositioned:h.shallowReadonly(m),floatingStyles:g,update:y}}const jG={side:"bottom",sideOffset:0,sideFlip:!0,align:"center",alignOffset:0,alignFlip:!0,arrowPadding:0,avoidCollisions:!0,collisionBoundary:()=>[],collisionPadding:0,sticky:"partial",hideWhenDetached:!1,positionStrategy:"fixed",updatePositionStrategy:"optimized",prioritizePosition:!1},[pW,VG]=Cs("PopperContent");var FG=h.defineComponent({inheritAttrs:!1,__name:"PopperContent",props:h.mergeDefaults({side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},{...jG}),emits:["placed"],setup(e,{emit:n}){const t=e,i=n,o=hM(),{forwardRef:r,currentElement:s}=ci(),u=h.ref(),l=h.ref(),{width:d,height:c}=t8(l),_=h.computed(()=>t.side+(t.align!=="center"?`-${t.align}`:"")),f=h.computed(()=>typeof t.collisionPadding=="number"?t.collisionPadding:{top:0,right:0,bottom:0,left:0,...t.collisionPadding}),p=h.computed(()=>Array.isArray(t.collisionBoundary)?t.collisionBoundary:[t.collisionBoundary]),a=h.computed(()=>({padding:f.value,boundary:p.value.filter(k8),altBoundary:p.value.length>0})),v=h.computed(()=>({mainAxis:t.sideFlip,crossAxis:t.alignFlip})),m=Cq(()=>[NG({mainAxis:t.sideOffset+c.value,alignmentAxis:t.alignOffset}),t.prioritizePosition&&t.avoidCollisions&&kM({...a.value,...v.value}),t.avoidCollisions&&OG({mainAxis:!0,crossAxis:!!t.prioritizePosition,limiter:t.sticky==="partial"?DG():void 0,...a.value}),!t.prioritizePosition&&t.avoidCollisions&&kM({...a.value,...v.value}),wG({...a.value,apply:({elements:M,rects:w,availableWidth:x,availableHeight:k})=>{const{width:V,height:L}=w.reference,D=M.floating.style;D.setProperty("--reka-popper-available-width",`${x}px`),D.setProperty("--reka-popper-available-height",`${k}px`),D.setProperty("--reka-popper-anchor-width",`${V}px`),D.setProperty("--reka-popper-anchor-height",`${L}px`)}}),l.value&&UG({element:l.value,padding:t.arrowPadding}),L8({arrowWidth:d.value,arrowHeight:c.value}),t.hideWhenDetached&&xG({strategy:"referenceHidden",...a.value})]),g=h.computed(()=>t.reference??o.anchor.value),{floatingStyles:E,placement:y,isPositioned:S,middlewareData:C,update:T}=BG(g,u,{strategy:t.positionStrategy,placement:_,whileElementsMounted:(...M)=>MG(...M,{layoutShift:!t.disableUpdateOnLayoutShift,animationFrame:t.updatePositionStrategy==="always"}),middleware:m}),R=h.computed(()=>a_(y.value)[0]),O=h.computed(()=>a_(y.value)[1]);h.watchPostEffect(()=>{S.value&&i("placed")});const B=h.computed(()=>{var M;return((M=C.value.arrow)==null?void 0:M.centerOffset)!==0}),j=h.ref("");h.watchEffect(()=>{s.value&&(j.value=window.getComputedStyle(s.value).zIndex)});const I=h.computed(()=>{var M;return((M=C.value.arrow)==null?void 0:M.x)??0}),A=h.computed(()=>{var M;return((M=C.value.arrow)==null?void 0:M.y)??0});return VG({placedSide:R,onArrowChange:M=>l.value=M,arrowX:I,arrowY:A,shouldHideArrow:B}),(M,w)=>{var x,k,V;return h.openBlock(),h.createElementBlock("div",{ref_key:"floatingRef",ref:u,"data-reka-popper-content-wrapper":"",style:h.normalizeStyle({...h.unref(E),transform:h.unref(S)?h.unref(E).transform:"translate(0, -200%)",minWidth:"max-content",zIndex:j.value,"--reka-popper-transform-origin":[(x=h.unref(C).transformOrigin)==null?void 0:x.x,(k=h.unref(C).transformOrigin)==null?void 0:k.y].join(" "),...((V=h.unref(C).hide)==null?void 0:V.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}})},[h.createVNode(h.unref(Ci),h.mergeProps({ref:h.unref(r)},M.$attrs,{"as-child":t.asChild,as:M.as,"data-side":R.value,"data-align":O.value,style:{animation:h.unref(S)?void 0:"none"}}),{default:h.withCtx(()=>[h.renderSlot(M.$slots,"default")]),_:3},16,["as-child","as","data-side","data-align","style"])],4)}}}),qG=FG;const[Os,GG]=Cs("PopoverRoot");var HG=h.defineComponent({__name:"PopoverRoot",props:{defaultOpen:{type:Boolean,required:!1,default:!1},open:{type:Boolean,required:!1,default:void 0},modal:{type:Boolean,required:!1,default:!1}},emits:["update:open"],setup(e,{emit:n}){const t=e,i=n,{modal:o}=h.toRefs(t),r=rM(t,"open",i,{defaultValue:t.defaultOpen,passive:t.open===void 0}),s=h.ref(),u=h.ref(!1);return GG({contentId:"",triggerId:"",modal:o,open:r,onOpenChange:l=>{r.value=l},onOpenToggle:()=>{r.value=!r.value},triggerElement:s,hasCustomAnchor:u}),(l,d)=>(h.openBlock(),h.createBlock(h.unref(x8),null,{default:h.withCtx(()=>[h.renderSlot(l.$slots,"default",{open:h.unref(r),close:()=>r.value=!1})]),_:3}))}}),zG=HG,YG=h.defineComponent({__name:"PopoverContentImpl",props:{trapFocus:{type:Boolean,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(e,{emit:n}){const t=e,i=n,o=uM(Oq(t,"trapFocus","disableOutsidePointerEvents")),{forwardRef:r}=ci(),s=Os();return Wq(),(u,l)=>(h.openBlock(),h.createBlock(h.unref(R8),{"as-child":"",loop:"",trapped:u.trapFocus,onMountAutoFocus:l[5]||(l[5]=d=>i("openAutoFocus",d)),onUnmountAutoFocus:l[6]||(l[6]=d=>i("closeAutoFocus",d))},{default:h.withCtx(()=>[h.createVNode(h.unref(y8),{"as-child":"","disable-outside-pointer-events":u.disableOutsidePointerEvents,onPointerDownOutside:l[0]||(l[0]=d=>i("pointerDownOutside",d)),onInteractOutside:l[1]||(l[1]=d=>i("interactOutside",d)),onEscapeKeyDown:l[2]||(l[2]=d=>i("escapeKeyDown",d)),onFocusOutside:l[3]||(l[3]=d=>i("focusOutside",d)),onDismiss:l[4]||(l[4]=d=>h.unref(s).onOpenChange(!1))},{default:h.withCtx(()=>[h.createVNode(h.unref(qG),h.mergeProps(h.unref(o),{id:h.unref(s).contentId,ref:h.unref(r),"data-state":h.unref(s).open.value?"open":"closed","aria-labelledby":h.unref(s).triggerId,style:{"--reka-popover-content-transform-origin":"var(--reka-popper-transform-origin)","--reka-popover-content-available-width":"var(--reka-popper-available-width)","--reka-popover-content-available-height":"var(--reka-popper-available-height)","--reka-popover-trigger-width":"var(--reka-popper-anchor-width)","--reka-popover-trigger-height":"var(--reka-popper-anchor-height)"},role:"dialog"}),{default:h.withCtx(()=>[h.renderSlot(u.$slots,"default")]),_:3},16,["id","data-state","aria-labelledby"])]),_:3},8,["disable-outside-pointer-events"])]),_:3},8,["trapped"]))}}),BM=YG,KG=h.defineComponent({__name:"PopoverContentModal",props:{side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(e,{emit:n}){const t=e,i=n,o=Os(),r=h.ref(!1);zq(!0);const s=Nr(t,i),{forwardRef:u,currentElement:l}=ci();return Zq(l),(d,c)=>(h.openBlock(),h.createBlock(BM,h.mergeProps(h.unref(s),{ref:h.unref(u),"trap-focus":h.unref(o).open.value,"disable-outside-pointer-events":"",onCloseAutoFocus:c[0]||(c[0]=h.withModifiers(_=>{var f;i("closeAutoFocus",_),r.value||(f=h.unref(o).triggerElement.value)==null||f.focus()},["prevent"])),onPointerDownOutside:c[1]||(c[1]=_=>{i("pointerDownOutside",_);const f=_.detail.originalEvent,p=f.button===0&&f.ctrlKey===!0,a=f.button===2||p;r.value=a}),onFocusOutside:c[2]||(c[2]=h.withModifiers(()=>{},["prevent"]))}),{default:h.withCtx(()=>[h.renderSlot(d.$slots,"default")]),_:3},16,["trap-focus"]))}}),WG=KG,$G=h.defineComponent({__name:"PopoverContentNonModal",props:{side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(e,{emit:n}){const t=e,i=n,o=Os(),r=h.ref(!1),s=h.ref(!1),u=Nr(t,i);return(l,d)=>(h.openBlock(),h.createBlock(BM,h.mergeProps(h.unref(u),{"trap-focus":!1,"disable-outside-pointer-events":!1,onCloseAutoFocus:d[0]||(d[0]=c=>{var _;i("closeAutoFocus",c),c.defaultPrevented||(r.value||(_=h.unref(o).triggerElement.value)==null||_.focus(),c.preventDefault()),r.value=!1,s.value=!1}),onInteractOutside:d[1]||(d[1]=async c=>{var p;i("interactOutside",c),c.defaultPrevented||(r.value=!0,c.detail.originalEvent.type==="pointerdown"&&(s.value=!0));const _=c.target;((p=h.unref(o).triggerElement.value)==null?void 0:p.contains(_))&&c.preventDefault(),c.detail.originalEvent.type==="focusin"&&s.value&&c.preventDefault()})}),{default:h.withCtx(()=>[h.renderSlot(l.$slots,"default")]),_:3},16))}}),QG=$G,JG=h.defineComponent({__name:"PopoverContent",props:{forceMount:{type:Boolean,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(e,{emit:n}){const t=e,i=n,o=Os(),r=Nr(t,i),{forwardRef:s}=ci();return o.contentId||(o.contentId=__(void 0,"reka-popover-content")),(u,l)=>(h.openBlock(),h.createBlock(h.unref(cM),{present:u.forceMount||h.unref(o).open.value},{default:h.withCtx(()=>[h.unref(o).modal.value?(h.openBlock(),h.createBlock(WG,h.mergeProps({key:0},h.unref(r),{ref:h.unref(s)}),{default:h.withCtx(()=>[h.renderSlot(u.$slots,"default")]),_:3},16)):(h.openBlock(),h.createBlock(QG,h.mergeProps({key:1},h.unref(r),{ref:h.unref(s)}),{default:h.withCtx(()=>[h.renderSlot(u.$slots,"default")]),_:3},16))]),_:3},8,["present"]))}}),XG=JG,ZG=h.defineComponent({__name:"PopoverPortal",props:{to:{type:null,required:!1},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(e){const n=e;return(t,i)=>(h.openBlock(),h.createBlock(h.unref(N8),h.normalizeProps(h.guardReactiveProps(n)),{default:h.withCtx(()=>[h.renderSlot(t.$slots,"default")]),_:3},16))}}),e7=ZG,t7=h.defineComponent({__name:"PopoverTrigger",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(e){const n=e,t=Os(),{forwardRef:i,currentElement:o}=ci();return t.triggerId||(t.triggerId=__(void 0,"reka-popover-trigger")),h.onMounted(()=>{t.triggerElement.value=o.value}),(r,s)=>(h.openBlock(),h.createBlock(h.resolveDynamicComponent(h.unref(t).hasCustomAnchor.value?h.unref(Ci):h.unref(D8)),{"as-child":""},{default:h.withCtx(()=>[h.createVNode(h.unref(Ci),{id:h.unref(t).triggerId,ref:h.unref(i),type:r.as==="button"?"button":void 0,"aria-haspopup":"dialog","aria-expanded":h.unref(t).open.value,"aria-controls":h.unref(t).contentId,"data-state":h.unref(t).open.value?"open":"closed",as:r.as,"as-child":n.asChild,onClick:h.unref(t).onOpenToggle},{default:h.withCtx(()=>[h.renderSlot(r.$slots,"default")]),_:3},8,["id","type","aria-expanded","aria-controls","data-state","as","as-child","onClick"])]),_:3}))}}),n7=t7;const i7=h.defineComponent({__name:"Popover",props:{defaultOpen:{type:Boolean},open:{type:Boolean},modal:{type:Boolean}},emits:["update:open"],setup(e,{emit:n}){const o=Nr(e,n);return(r,s)=>(h.openBlock(),h.createBlock(h.unref(zG),h.normalizeProps(h.guardReactiveProps(h.unref(o))),{default:h.withCtx(()=>[h.renderSlot(r.$slots,"default")]),_:3},16))}});function o7(e){if(!h.isRef(e))return h.reactive(e);const n=new Proxy({},{get(t,i,o){return h.unref(Reflect.get(e.value,i,o))},set(t,i,o){return h.isRef(e.value[i])&&!h.isRef(o)?e.value[i].value=o:e.value[i]=o,!0},deleteProperty(t,i){return Reflect.deleteProperty(e.value,i)},has(t,i){return Reflect.has(e.value,i)},ownKeys(){return Object.keys(e.value)},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}}});return h.reactive(n)}function r7(e){return o7(h.computed(e))}function s7(e,...n){const t=n.flat(),i=t[0];return r7(()=>Object.fromEntries(typeof i=="function"?Object.entries(h.toRefs(e)).filter(([o,r])=>!i(h.toValue(r),o)):Object.entries(h.toRefs(e)).filter(o=>!t.includes(o[0]))))}typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;function jM(e){var n,t,i="";if(typeof e=="string"||typeof e=="number")i+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(n=0;n<o;n++)e[n]&&(t=jM(e[n]))&&(i&&(i+=" "),i+=t)}else for(t in e)e[t]&&(i&&(i+=" "),i+=t);return i}function VM(){for(var e,n,t=0,i="",o=arguments.length;t<o;t++)(e=arguments[t])&&(n=jM(e))&&(i&&(i+=" "),i+=n);return i}const M_="-",l7=e=>{const n=d7(e),{conflictingClassGroups:t,conflictingClassGroupModifiers:i}=e;return{getClassGroupId:s=>{const u=s.split(M_);return u[0]===""&&u.length!==1&&u.shift(),FM(u,n)||u7(s)},getConflictingClassGroupIds:(s,u)=>{const l=t[s]||[];return u&&i[s]?[...l,...i[s]]:l}}},FM=(e,n)=>{var s;if(e.length===0)return n.classGroupId;const t=e[0],i=n.nextPart.get(t),o=i?FM(e.slice(1),i):void 0;if(o)return o;if(n.validators.length===0)return;const r=e.join(M_);return(s=n.validators.find(({validator:u})=>u(r)))==null?void 0:s.classGroupId},qM=/^\[(.+)\]$/,u7=e=>{if(qM.test(e)){const n=qM.exec(e)[1],t=n==null?void 0:n.substring(0,n.indexOf(":"));if(t)return"arbitrary.."+t}},d7=e=>{const{theme:n,classGroups:t}=e,i={nextPart:new Map,validators:[]};for(const o in t)N_(t[o],i,o,n);return i},N_=(e,n,t,i)=>{e.forEach(o=>{if(typeof o=="string"){const r=o===""?n:GM(n,o);r.classGroupId=t;return}if(typeof o=="function"){if(c7(o)){N_(o(i),n,t,i);return}n.validators.push({validator:o,classGroupId:t});return}Object.entries(o).forEach(([r,s])=>{N_(s,GM(n,r),t,i)})})},GM=(e,n)=>{let t=e;return n.split(M_).forEach(i=>{t.nextPart.has(i)||t.nextPart.set(i,{nextPart:new Map,validators:[]}),t=t.nextPart.get(i)}),t},c7=e=>e.isThemeGetter,_7=e=>{if(e<1)return{get:()=>{},set:()=>{}};let n=0,t=new Map,i=new Map;const o=(r,s)=>{t.set(r,s),n++,n>e&&(n=0,i=t,t=new Map)};return{get(r){let s=t.get(r);if(s!==void 0)return s;if((s=i.get(r))!==void 0)return o(r,s),s},set(r,s){t.has(r)?t.set(r,s):o(r,s)}}},O_="!",w_=":",f7=w_.length,p7=e=>{const{prefix:n,experimentalParseClassName:t}=e;let i=o=>{const r=[];let s=0,u=0,l=0,d;for(let a=0;a<o.length;a++){let v=o[a];if(s===0&&u===0){if(v===w_){r.push(o.slice(l,a)),l=a+f7;continue}if(v==="/"){d=a;continue}}v==="["?s++:v==="]"?s--:v==="("?u++:v===")"&&u--}const c=r.length===0?o:o.substring(l),_=a7(c),f=_!==c,p=d&&d>l?d-l:void 0;return{modifiers:r,hasImportantModifier:f,baseClassName:_,maybePostfixModifierPosition:p}};if(n){const o=n+w_,r=i;i=s=>s.startsWith(o)?r(s.substring(o.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:s,maybePostfixModifierPosition:void 0}}if(t){const o=i;i=r=>t({className:r,parseClassName:o})}return i},a7=e=>e.endsWith(O_)?e.substring(0,e.length-1):e.startsWith(O_)?e.substring(1):e,v7=e=>{const n=Object.fromEntries(e.orderSensitiveModifiers.map(i=>[i,!0]));return i=>{if(i.length<=1)return i;const o=[];let r=[];return i.forEach(s=>{s[0]==="["||n[s]?(o.push(...r.sort(),s),r=[]):r.push(s)}),o.push(...r.sort()),o}},m7=e=>({cache:_7(e.cacheSize),parseClassName:p7(e),sortModifiers:v7(e),...l7(e)}),h7=/\s+/,y7=(e,n)=>{const{parseClassName:t,getClassGroupId:i,getConflictingClassGroupIds:o,sortModifiers:r}=n,s=[],u=e.trim().split(h7);let l="";for(let d=u.length-1;d>=0;d-=1){const c=u[d],{isExternal:_,modifiers:f,hasImportantModifier:p,baseClassName:a,maybePostfixModifierPosition:v}=t(c);if(_){l=c+(l.length>0?" "+l:l);continue}let m=!!v,g=i(m?a.substring(0,v):a);if(!g){if(!m){l=c+(l.length>0?" "+l:l);continue}if(g=i(a),!g){l=c+(l.length>0?" "+l:l);continue}m=!1}const E=r(f).join(":"),y=p?E+O_:E,S=y+g;if(s.includes(S))continue;s.push(S);const C=o(g,m);for(let T=0;T<C.length;++T){const R=C[T];s.push(y+R)}l=c+(l.length>0?" "+l:l)}return l};function g7(){let e=0,n,t,i="";for(;e<arguments.length;)(n=arguments[e++])&&(t=HM(n))&&(i&&(i+=" "),i+=t);return i}const HM=e=>{if(typeof e=="string")return e;let n,t="";for(let i=0;i<e.length;i++)e[i]&&(n=HM(e[i]))&&(t&&(t+=" "),t+=n);return t};function E7(e,...n){let t,i,o,r=s;function s(l){const d=n.reduce((c,_)=>_(c),e());return t=m7(d),i=t.cache.get,o=t.cache.set,r=u,u(l)}function u(l){const d=i(l);if(d)return d;const c=y7(l,t);return o(l,c),c}return function(){return r(g7.apply(null,arguments))}}const Jt=e=>{const n=t=>t[e]||[];return n.isThemeGetter=!0,n},zM=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,YM=/^\((?:(\w[\w-]*):)?(.+)\)$/i,T7=/^\d+\/\d+$/,S7=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,b7=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,I7=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,C7=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,A7=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,kr=e=>T7.test(e),Ze=e=>!!e&&!Number.isNaN(Number(e)),oo=e=>!!e&&Number.isInteger(Number(e)),x_=e=>e.endsWith("%")&&Ze(e.slice(0,-1)),Vi=e=>S7.test(e),R7=()=>!0,M7=e=>b7.test(e)&&!I7.test(e),KM=()=>!1,N7=e=>C7.test(e),O7=e=>A7.test(e),w7=e=>!Oe(e)&&!we(e),x7=e=>Lr(e,XM,KM),Oe=e=>zM.test(e),Mo=e=>Lr(e,ZM,M7),P_=e=>Lr(e,U7,Ze),WM=e=>Lr(e,QM,KM),P7=e=>Lr(e,JM,O7),fu=e=>Lr(e,eN,N7),we=e=>YM.test(e),ws=e=>Ur(e,ZM),D7=e=>Ur(e,B7),$M=e=>Ur(e,QM),k7=e=>Ur(e,XM),L7=e=>Ur(e,JM),pu=e=>Ur(e,eN,!0),Lr=(e,n,t)=>{const i=zM.exec(e);return i?i[1]?n(i[1]):t(i[2]):!1},Ur=(e,n,t=!1)=>{const i=YM.exec(e);return i?i[1]?n(i[1]):t:!1},QM=e=>e==="position"||e==="percentage",JM=e=>e==="image"||e==="url",XM=e=>e==="length"||e==="size"||e==="bg-size",ZM=e=>e==="length",U7=e=>e==="number",B7=e=>e==="family-name",eN=e=>e==="shadow",j7=E7(()=>{const e=Jt("color"),n=Jt("font"),t=Jt("text"),i=Jt("font-weight"),o=Jt("tracking"),r=Jt("leading"),s=Jt("breakpoint"),u=Jt("container"),l=Jt("spacing"),d=Jt("radius"),c=Jt("shadow"),_=Jt("inset-shadow"),f=Jt("text-shadow"),p=Jt("drop-shadow"),a=Jt("blur"),v=Jt("perspective"),m=Jt("aspect"),g=Jt("ease"),E=Jt("animate"),y=()=>["auto","avoid","all","avoid-page","page","left","right","column"],S=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],C=()=>[...S(),we,Oe],T=()=>["auto","hidden","clip","visible","scroll"],R=()=>["auto","contain","none"],O=()=>[we,Oe,l],B=()=>[kr,"full","auto",...O()],j=()=>[oo,"none","subgrid",we,Oe],I=()=>["auto",{span:["full",oo,we,Oe]},oo,we,Oe],A=()=>[oo,"auto",we,Oe],M=()=>["auto","min","max","fr",we,Oe],w=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],x=()=>["start","end","center","stretch","center-safe","end-safe"],k=()=>["auto",...O()],V=()=>[kr,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...O()],L=()=>[e,we,Oe],D=()=>[...S(),$M,WM,{position:[we,Oe]}],F=()=>["no-repeat",{repeat:["","x","y","space","round"]}],G=()=>["auto","cover","contain",k7,x7,{size:[we,Oe]}],q=()=>[x_,ws,Mo],Y=()=>["","none","full",d,we,Oe],K=()=>["",Ze,ws,Mo],W=()=>["solid","dashed","dotted","double"],X=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],J=()=>[Ze,x_,$M,WM],Z=()=>["","none",a,we,Oe],b=()=>["none",Ze,we,Oe],N=()=>["none",Ze,we,Oe],U=()=>[Ze,we,Oe],z=()=>[kr,"full",...O()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Vi],breakpoint:[Vi],color:[R7],container:[Vi],"drop-shadow":[Vi],ease:["in","out","in-out"],font:[w7],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Vi],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Vi],shadow:[Vi],spacing:["px",Ze],text:[Vi],"text-shadow":[Vi],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",kr,Oe,we,m]}],container:["container"],columns:[{columns:[Ze,Oe,we,u]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:C()}],overflow:[{overflow:T()}],"overflow-x":[{"overflow-x":T()}],"overflow-y":[{"overflow-y":T()}],overscroll:[{overscroll:R()}],"overscroll-x":[{"overscroll-x":R()}],"overscroll-y":[{"overscroll-y":R()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:B()}],"inset-x":[{"inset-x":B()}],"inset-y":[{"inset-y":B()}],start:[{start:B()}],end:[{end:B()}],top:[{top:B()}],right:[{right:B()}],bottom:[{bottom:B()}],left:[{left:B()}],visibility:["visible","invisible","collapse"],z:[{z:[oo,"auto",we,Oe]}],basis:[{basis:[kr,"full","auto",u,...O()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Ze,kr,"auto","initial","none",Oe]}],grow:[{grow:["",Ze,we,Oe]}],shrink:[{shrink:["",Ze,we,Oe]}],order:[{order:[oo,"first","last","none",we,Oe]}],"grid-cols":[{"grid-cols":j()}],"col-start-end":[{col:I()}],"col-start":[{"col-start":A()}],"col-end":[{"col-end":A()}],"grid-rows":[{"grid-rows":j()}],"row-start-end":[{row:I()}],"row-start":[{"row-start":A()}],"row-end":[{"row-end":A()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":M()}],"auto-rows":[{"auto-rows":M()}],gap:[{gap:O()}],"gap-x":[{"gap-x":O()}],"gap-y":[{"gap-y":O()}],"justify-content":[{justify:[...w(),"normal"]}],"justify-items":[{"justify-items":[...x(),"normal"]}],"justify-self":[{"justify-self":["auto",...x()]}],"align-content":[{content:["normal",...w()]}],"align-items":[{items:[...x(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...x(),{baseline:["","last"]}]}],"place-content":[{"place-content":w()}],"place-items":[{"place-items":[...x(),"baseline"]}],"place-self":[{"place-self":["auto",...x()]}],p:[{p:O()}],px:[{px:O()}],py:[{py:O()}],ps:[{ps:O()}],pe:[{pe:O()}],pt:[{pt:O()}],pr:[{pr:O()}],pb:[{pb:O()}],pl:[{pl:O()}],m:[{m:k()}],mx:[{mx:k()}],my:[{my:k()}],ms:[{ms:k()}],me:[{me:k()}],mt:[{mt:k()}],mr:[{mr:k()}],mb:[{mb:k()}],ml:[{ml:k()}],"space-x":[{"space-x":O()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":O()}],"space-y-reverse":["space-y-reverse"],size:[{size:V()}],w:[{w:[u,"screen",...V()]}],"min-w":[{"min-w":[u,"screen","none",...V()]}],"max-w":[{"max-w":[u,"screen","none","prose",{screen:[s]},...V()]}],h:[{h:["screen","lh",...V()]}],"min-h":[{"min-h":["screen","lh","none",...V()]}],"max-h":[{"max-h":["screen","lh",...V()]}],"font-size":[{text:["base",t,ws,Mo]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[i,we,P_]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",x_,Oe]}],"font-family":[{font:[D7,Oe,n]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,we,Oe]}],"line-clamp":[{"line-clamp":[Ze,"none",we,P_]}],leading:[{leading:[r,...O()]}],"list-image":[{"list-image":["none",we,Oe]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",we,Oe]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:L()}],"text-color":[{text:L()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...W(),"wavy"]}],"text-decoration-thickness":[{decoration:[Ze,"from-font","auto",we,Mo]}],"text-decoration-color":[{decoration:L()}],"underline-offset":[{"underline-offset":[Ze,"auto",we,Oe]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:O()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",we,Oe]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",we,Oe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:D()}],"bg-repeat":[{bg:F()}],"bg-size":[{bg:G()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},oo,we,Oe],radial:["",we,Oe],conic:[oo,we,Oe]},L7,P7]}],"bg-color":[{bg:L()}],"gradient-from-pos":[{from:q()}],"gradient-via-pos":[{via:q()}],"gradient-to-pos":[{to:q()}],"gradient-from":[{from:L()}],"gradient-via":[{via:L()}],"gradient-to":[{to:L()}],rounded:[{rounded:Y()}],"rounded-s":[{"rounded-s":Y()}],"rounded-e":[{"rounded-e":Y()}],"rounded-t":[{"rounded-t":Y()}],"rounded-r":[{"rounded-r":Y()}],"rounded-b":[{"rounded-b":Y()}],"rounded-l":[{"rounded-l":Y()}],"rounded-ss":[{"rounded-ss":Y()}],"rounded-se":[{"rounded-se":Y()}],"rounded-ee":[{"rounded-ee":Y()}],"rounded-es":[{"rounded-es":Y()}],"rounded-tl":[{"rounded-tl":Y()}],"rounded-tr":[{"rounded-tr":Y()}],"rounded-br":[{"rounded-br":Y()}],"rounded-bl":[{"rounded-bl":Y()}],"border-w":[{border:K()}],"border-w-x":[{"border-x":K()}],"border-w-y":[{"border-y":K()}],"border-w-s":[{"border-s":K()}],"border-w-e":[{"border-e":K()}],"border-w-t":[{"border-t":K()}],"border-w-r":[{"border-r":K()}],"border-w-b":[{"border-b":K()}],"border-w-l":[{"border-l":K()}],"divide-x":[{"divide-x":K()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":K()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...W(),"hidden","none"]}],"divide-style":[{divide:[...W(),"hidden","none"]}],"border-color":[{border:L()}],"border-color-x":[{"border-x":L()}],"border-color-y":[{"border-y":L()}],"border-color-s":[{"border-s":L()}],"border-color-e":[{"border-e":L()}],"border-color-t":[{"border-t":L()}],"border-color-r":[{"border-r":L()}],"border-color-b":[{"border-b":L()}],"border-color-l":[{"border-l":L()}],"divide-color":[{divide:L()}],"outline-style":[{outline:[...W(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Ze,we,Oe]}],"outline-w":[{outline:["",Ze,ws,Mo]}],"outline-color":[{outline:L()}],shadow:[{shadow:["","none",c,pu,fu]}],"shadow-color":[{shadow:L()}],"inset-shadow":[{"inset-shadow":["none",_,pu,fu]}],"inset-shadow-color":[{"inset-shadow":L()}],"ring-w":[{ring:K()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:L()}],"ring-offset-w":[{"ring-offset":[Ze,Mo]}],"ring-offset-color":[{"ring-offset":L()}],"inset-ring-w":[{"inset-ring":K()}],"inset-ring-color":[{"inset-ring":L()}],"text-shadow":[{"text-shadow":["none",f,pu,fu]}],"text-shadow-color":[{"text-shadow":L()}],opacity:[{opacity:[Ze,we,Oe]}],"mix-blend":[{"mix-blend":[...X(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":X()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Ze]}],"mask-image-linear-from-pos":[{"mask-linear-from":J()}],"mask-image-linear-to-pos":[{"mask-linear-to":J()}],"mask-image-linear-from-color":[{"mask-linear-from":L()}],"mask-image-linear-to-color":[{"mask-linear-to":L()}],"mask-image-t-from-pos":[{"mask-t-from":J()}],"mask-image-t-to-pos":[{"mask-t-to":J()}],"mask-image-t-from-color":[{"mask-t-from":L()}],"mask-image-t-to-color":[{"mask-t-to":L()}],"mask-image-r-from-pos":[{"mask-r-from":J()}],"mask-image-r-to-pos":[{"mask-r-to":J()}],"mask-image-r-from-color":[{"mask-r-from":L()}],"mask-image-r-to-color":[{"mask-r-to":L()}],"mask-image-b-from-pos":[{"mask-b-from":J()}],"mask-image-b-to-pos":[{"mask-b-to":J()}],"mask-image-b-from-color":[{"mask-b-from":L()}],"mask-image-b-to-color":[{"mask-b-to":L()}],"mask-image-l-from-pos":[{"mask-l-from":J()}],"mask-image-l-to-pos":[{"mask-l-to":J()}],"mask-image-l-from-color":[{"mask-l-from":L()}],"mask-image-l-to-color":[{"mask-l-to":L()}],"mask-image-x-from-pos":[{"mask-x-from":J()}],"mask-image-x-to-pos":[{"mask-x-to":J()}],"mask-image-x-from-color":[{"mask-x-from":L()}],"mask-image-x-to-color":[{"mask-x-to":L()}],"mask-image-y-from-pos":[{"mask-y-from":J()}],"mask-image-y-to-pos":[{"mask-y-to":J()}],"mask-image-y-from-color":[{"mask-y-from":L()}],"mask-image-y-to-color":[{"mask-y-to":L()}],"mask-image-radial":[{"mask-radial":[we,Oe]}],"mask-image-radial-from-pos":[{"mask-radial-from":J()}],"mask-image-radial-to-pos":[{"mask-radial-to":J()}],"mask-image-radial-from-color":[{"mask-radial-from":L()}],"mask-image-radial-to-color":[{"mask-radial-to":L()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":S()}],"mask-image-conic-pos":[{"mask-conic":[Ze]}],"mask-image-conic-from-pos":[{"mask-conic-from":J()}],"mask-image-conic-to-pos":[{"mask-conic-to":J()}],"mask-image-conic-from-color":[{"mask-conic-from":L()}],"mask-image-conic-to-color":[{"mask-conic-to":L()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:D()}],"mask-repeat":[{mask:F()}],"mask-size":[{mask:G()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",we,Oe]}],filter:[{filter:["","none",we,Oe]}],blur:[{blur:Z()}],brightness:[{brightness:[Ze,we,Oe]}],contrast:[{contrast:[Ze,we,Oe]}],"drop-shadow":[{"drop-shadow":["","none",p,pu,fu]}],"drop-shadow-color":[{"drop-shadow":L()}],grayscale:[{grayscale:["",Ze,we,Oe]}],"hue-rotate":[{"hue-rotate":[Ze,we,Oe]}],invert:[{invert:["",Ze,we,Oe]}],saturate:[{saturate:[Ze,we,Oe]}],sepia:[{sepia:["",Ze,we,Oe]}],"backdrop-filter":[{"backdrop-filter":["","none",we,Oe]}],"backdrop-blur":[{"backdrop-blur":Z()}],"backdrop-brightness":[{"backdrop-brightness":[Ze,we,Oe]}],"backdrop-contrast":[{"backdrop-contrast":[Ze,we,Oe]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Ze,we,Oe]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ze,we,Oe]}],"backdrop-invert":[{"backdrop-invert":["",Ze,we,Oe]}],"backdrop-opacity":[{"backdrop-opacity":[Ze,we,Oe]}],"backdrop-saturate":[{"backdrop-saturate":[Ze,we,Oe]}],"backdrop-sepia":[{"backdrop-sepia":["",Ze,we,Oe]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":O()}],"border-spacing-x":[{"border-spacing-x":O()}],"border-spacing-y":[{"border-spacing-y":O()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",we,Oe]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Ze,"initial",we,Oe]}],ease:[{ease:["linear","initial",g,we,Oe]}],delay:[{delay:[Ze,we,Oe]}],animate:[{animate:["none",E,we,Oe]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[v,we,Oe]}],"perspective-origin":[{"perspective-origin":C()}],rotate:[{rotate:b()}],"rotate-x":[{"rotate-x":b()}],"rotate-y":[{"rotate-y":b()}],"rotate-z":[{"rotate-z":b()}],scale:[{scale:N()}],"scale-x":[{"scale-x":N()}],"scale-y":[{"scale-y":N()}],"scale-z":[{"scale-z":N()}],"scale-3d":["scale-3d"],skew:[{skew:U()}],"skew-x":[{"skew-x":U()}],"skew-y":[{"skew-y":U()}],transform:[{transform:[we,Oe,"","none","gpu","cpu"]}],"transform-origin":[{origin:C()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:z()}],"translate-x":[{"translate-x":z()}],"translate-y":[{"translate-y":z()}],"translate-z":[{"translate-z":z()}],"translate-none":["translate-none"],accent:[{accent:L()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:L()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",we,Oe]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":O()}],"scroll-mx":[{"scroll-mx":O()}],"scroll-my":[{"scroll-my":O()}],"scroll-ms":[{"scroll-ms":O()}],"scroll-me":[{"scroll-me":O()}],"scroll-mt":[{"scroll-mt":O()}],"scroll-mr":[{"scroll-mr":O()}],"scroll-mb":[{"scroll-mb":O()}],"scroll-ml":[{"scroll-ml":O()}],"scroll-p":[{"scroll-p":O()}],"scroll-px":[{"scroll-px":O()}],"scroll-py":[{"scroll-py":O()}],"scroll-ps":[{"scroll-ps":O()}],"scroll-pe":[{"scroll-pe":O()}],"scroll-pt":[{"scroll-pt":O()}],"scroll-pr":[{"scroll-pr":O()}],"scroll-pb":[{"scroll-pb":O()}],"scroll-pl":[{"scroll-pl":O()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",we,Oe]}],fill:[{fill:["none",...L()]}],"stroke-w":[{stroke:[Ze,ws,Mo,P_]}],stroke:[{stroke:["none",...L()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}});function tN(...e){return j7(VM(e))}const V7=h.defineComponent({inheritAttrs:!1,__name:"PopoverContent",props:{forceMount:{type:Boolean},side:{},sideOffset:{},sideFlip:{type:Boolean},align:{},alignOffset:{},alignFlip:{type:Boolean},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},positionStrategy:{},updatePositionStrategy:{},disableUpdateOnLayoutShift:{type:Boolean},prioritizePosition:{type:Boolean},reference:{},asChild:{type:Boolean},as:{},disableOutsidePointerEvents:{type:Boolean},class:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(e,{emit:n}){const t=e,i=n,o=s7(t,"class"),r=Nr(o,i);return(s,u)=>(h.openBlock(),h.createBlock(h.unref(e7),null,{default:h.withCtx(()=>[h.createVNode(h.unref(XG),h.mergeProps({...h.unref(r),...s.$attrs},{class:h.unref(tN)("z-[2000] min-w-72 w-max rounded-md bg-white outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t.class)}),{default:h.withCtx(()=>[h.renderSlot(s.$slots,"default")]),_:3},16,["class"])]),_:3}))}}),F7=h.defineComponent({__name:"PopoverTrigger",props:{asChild:{type:Boolean},as:{}},setup(e){const n=e;return(t,i)=>(h.openBlock(),h.createBlock(h.unref(n7),h.normalizeProps(h.guardReactiveProps(n)),{default:h.withCtx(()=>[h.renderSlot(t.$slots,"default")]),_:3},16))}}),q7=h.defineComponent({__name:"PopoverBase",props:h.mergeModels({side:{},align:{default:"center"},sideOffset:{default:4},delay:{default:100},trigger:{default:"click"},triggerClass:{default:""},disabled:{type:Boolean}},{open:{type:Boolean},openModifiers:{}}),emits:["update:open"],setup(e){const n=e;let t=null;const i=h.useModel(e,"open");function o(l,d){if(!n.disabled){if(t&&(clearTimeout(t),t=null),d===0){r(l);return}t=setTimeout(()=>{r(l),t=null},d)}}const r=l=>{i.value=l};function s(){n.trigger=="hover"&&o(!0,n.delay)}const u=()=>{n.trigger=="hover"&&o(!1,n.delay)};return(l,d)=>(h.openBlock(),h.createBlock(h.unref(i7),{open:i.value,"onUpdate:open":d[0]||(d[0]=c=>i.value=c)},{default:h.withCtx(()=>[h.createVNode(h.unref(F7),{class:h.normalizeClass(n.triggerClass),onMouseenter:s,onMouseleave:u},{default:h.withCtx(()=>[h.renderSlot(l.$slots,"default")]),_:3},8,["class"]),l.disabled?h.createCommentVNode("",!0):(h.openBlock(),h.createBlock(h.unref(V7),{key:0,side:l.side,align:l.align,onMouseenter:s,onMouseleave:u},{default:h.withCtx(()=>[h.renderSlot(l.$slots,"content")]),_:3},8,["side","align"]))]),_:3},8,["open"]))}}),G7={class:"font-semibold"},H7=h.defineComponent({__name:"SwitchBase",props:h.mergeModels({label:{}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:h.mergeModels(["change"],["update:modelValue"]),setup(e,{emit:n}){const t=n,i=h.useModel(e,"modelValue"),o=()=>{const r=!i.value;i.value=r,t("change",r)};return(r,s)=>(h.openBlock(),h.createElementBlock("div",{class:"flex items-center gap-2 cursor-pointer w-max",onClick:s[0]||(s[0]=u=>o())},[h.createElementVNode("div",{class:h.normalizeClass(["w-10 h-5 flex items-center bg-chat-haze-300 rounded-full p-1 cursor-pointer transition",i.value?"bg-chat-primary":"bg-chat-haze-300"])},[h.createElementVNode("div",{class:h.normalizeClass(["bg-white w-4 h-4 rounded-full shadow transform transition",i.value?"translate-x-4":""])},null,2)],2),h.createElementVNode("span",G7,h.toDisplayString(r.label??""),1)]))}}),nN=Et(h.defineComponent({__name:"BaseSpin",props:{size:{default:48},border:{default:5},color:{}},setup(e){const n=e,t=h.computed(()=>{let i={};return i.width=n.size+"px",i.height=n.size+"px",i.borderWidth=n.border+"px",n.color&&(i.borderColor=n.color),i.borderBottomColor="transparent",i});return(i,o)=>(h.openBlock(),h.createElementBlock("span",{class:"loader",style:h.normalizeStyle(t.value)},null,4))}}),[["__scopeId","data-v-8aad0b79"]]),z7={class:"z-10",style:{"box-shadow":"0 2px 6px rgba(0, 0, 0, 0.12)"}},Y7={key:0,class:"flex gap-2 mb-2"},K7={class:"flex gap-2 items-end h-max"},W7={class:"relative grow"},$7={class:"flex gap-2 absolute right-0 bottom-2"},Q7={class:"shrink-0 cursor-pointer relative -translate-y-1"},J7={class:"h-11 w-11 rounded-full flex-center bg-[#002E6B]"},X7=h.defineComponent({__name:"InputChat",props:h.mergeModels({data:{}},{modelValue:{},modelModifiers:{}}),emits:h.mergeModels(["sendMessage","focus"],["update:modelValue"]),setup(e,{expose:n,emit:t}){const i=e,o=t,r=[{value:"0",label:"Go Chat"},{value:"1",label:"Go sms"}];h.computed(()=>{var T;return((T=r.find(R=>R.value===p.value))==null?void 0:T.label)??""});const s=h.useModel(e,"modelValue");let u=1;const l=h.ref(null);h.ref([]);const d=h.ref(!1),c=h.ref(!1),_=h.ref(null),f=h.ref(!1),p=h.ref("0"),a=async T=>{var A,M,w;const R=Date.now();let O="",B=[];if(T=="message"){if(!s.value)return;O=s.value,s.value=""}else if(T=="file"){const x=v();if(!x)return;const k=URL.createObjectURL(x);B=[{file_name:String(R),file_path:k,file_local:x}]}s.value="",u++;const j=((A=i.data)==null?void 0:A.id.toString())+"-"+u,I={conversation_id:135,created_at:Ct().tz(jc).format(Tr.DATE_FORMAT_FULL),id:j,message:O,receiver_id:((M=i.data)==null?void 0:M.id)||0,sender_id:(w=Fe.value)==null?void 0:w.id,status:"read",attachments:B};o("sendMessage",I)},v=()=>!l.value||!l.value.files||l.value.files.length===0?null:l.value.files[0],m=()=>{a("file")},g=T=>{var R,O,B;s.value=(s.value??"")+(((R=T==null?void 0:T.i)==null?void 0:R.replace("undefined",""))??""),f.value=!1,(B=(O=_.value)==null?void 0:O.focus)==null||B.call(O)},E=async T=>{var R;try{c.value=!0,await yV({id:(R=Fe.value)==null?void 0:R.id,is_sms:T?1:0})}catch(O){d.value=!T,console.log(O)}c.value=!1},y=()=>{const T=_.value;T.style.height="auto",T.style.height=T.scrollHeight+"px"},S=()=>{o("focus")};return n({clearInput:()=>{s.value=""}}),(T,R)=>{var O;return h.openBlock(),h.createElementBlock("div",z7,[((O=h.unref(Fe))==null?void 0:O.user_type)=="tenant"?(h.openBlock(),h.createElementBlock("div",Y7,[h.createVNode(H7,{modelValue:d.value,"onUpdate:modelValue":R[0]||(R[0]=B=>d.value=B),label:"Active sms",onChange:E},null,8,["modelValue"]),c.value?(h.openBlock(),h.createBlock(nN,{key:0,size:24,border:3})):h.createCommentVNode("",!0)])):h.createCommentVNode("",!0),h.createElementVNode("div",K7,[h.createElementVNode("div",W7,[h.withDirectives(h.createElementVNode("textarea",{class:"w-full min-h-11 resize-none overflow-hidden chat-input !rounded-xl pl-4 py-2 pr-[96px] border border-chat-haze-200",ref_key:"chatInputRef",ref:_,placeholder:"Send Message",rows:"1",onKeydown:R[1]||(R[1]=h.withKeys(B=>a("message"),["enter"])),onFocus:R[2]||(R[2]=B=>S()),onInput:R[3]||(R[3]=B=>y()),"onUpdate:modelValue":R[4]||(R[4]=B=>s.value=B)},null,544),[[h.vModelText,s.value]]),h.createElementVNode("div",$7,[h.createVNode(q7,{open:f.value,"onUpdate:open":R[6]||(R[6]=B=>f.value=B),align:"end",side:"top"},{content:h.withCtx(()=>[h.createVNode(h.unref(Iq),{class:"!w-[300px]",native:!0,offset:2,"hide-search":"",onSelect:g})]),default:h.withCtx(()=>[h.createElementVNode("button",{onClick:R[5]||(R[5]=h.withModifiers(B=>f.value=!f.value,["stop"])),class:"h-11 w-10"}," 😊 ")]),_:1},8,["open"]),h.createElementVNode("button",{class:"h-11 w-10",onClick:R[7]||(R[7]=B=>a("message"))},[h.createVNode(i9)])])]),h.createElementVNode("label",Q7,[h.createElementVNode("input",{type:"file",class:"hidden",ref_key:"refInputImage",ref:l,accept:".png, .jpeg, .jpg",onChange:m},null,544),h.createElementVNode("div",J7,[h.createVNode(qf,{class:"text-white"})])])])])}}}),wn={Sending:"sending",Sent:"sent",Read:"read",Failed:"failed",Uploading:"uploading",Uploaded:"uploaded"},Z7={},eH={width:"32",height:"32",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function tH(e,n){return h.openBlock(),h.createElementBlock("svg",eH,n[0]||(n[0]=[h.createElementVNode("path",{d:"M3 6.5C3 14.5081 9.49187 21 17.5 21C18.166 21 18.8216 20.9551 19.4637 20.8682C20.3747 20.7448 21 19.9292 21 19.01V16.4415C21 15.5807 20.4491 14.8164 19.6325 14.5442L16.4841 13.4947C15.6836 13.2279 14.8252 13.699 14.6206 14.5177C14.3475 15.6102 12.987 15.987 12.1907 15.1907L8.80926 11.8093C8.01301 11.013 8.38984 9.65254 9.48229 9.37943C10.301 9.17476 10.7721 8.31644 10.5053 7.51586L9.45585 4.36754C9.18362 3.55086 8.41934 3 7.55848 3H4.99004C4.0708 3 3.25518 3.62533 3.13185 4.53627C3.0449 5.17845 3 5.83398 3 6.5Z",stroke:"currentColor","stroke-width":"1.5","stroke-linejoin":"round"},null,-1),h.createElementVNode("path",{d:"M15 3L21 9",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),h.createElementVNode("path",{d:"M21 3L15 9",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]))}const iN=Et(Z7,[["render",tH]]),Ye={CONNECTING:"Connecting...",CALLING:"calling",RINGING:"ringing",CONNECT_FAILED:"failed",CALL_START:"in-progress",CALL_END:"completed",NO_ANSWER:"no-answer",CANCEL:"cancel",TIME_OUT:"timeout",BUSY:"busy"},nH={},iH={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function oH(e,n){return h.openBlock(),h.createElementBlock("svg",iH,n[0]||(n[0]=[h.createElementVNode("path",{d:"M9.15826 5.71223L8.7556 4.80625C8.49232 4.21388 8.36068 3.91768 8.16381 3.69101C7.91708 3.40694 7.59547 3.19794 7.23568 3.08785C6.94859 3 6.62446 3 5.97621 3C5.02791 3 4.55376 3 4.15573 3.18229C3.68687 3.39702 3.26344 3.86328 3.09473 4.3506C2.95151 4.76429 2.99254 5.18943 3.07458 6.0397C3.94791 15.0902 8.90982 20.0521 17.9603 20.9254C18.8106 21.0075 19.2358 21.0485 19.6494 20.9053C20.1368 20.7366 20.603 20.3131 20.8178 19.8443C21 19.4462 21 18.9721 21 18.0238C21 17.3755 21 17.0514 20.9122 16.7643C20.8021 16.4045 20.5931 16.0829 20.309 15.8362C20.0824 15.6393 19.7862 15.5077 19.1938 15.2444L18.2878 14.8417C17.6463 14.5566 17.3255 14.4141 16.9996 14.3831C16.6876 14.3534 16.3731 14.3972 16.0811 14.5109C15.776 14.6297 15.5064 14.8544 14.967 15.3038C14.4302 15.7512 14.1618 15.9749 13.8338 16.0947C13.543 16.2009 13.1586 16.2403 12.8524 16.1951C12.5069 16.1442 12.2424 16.0029 11.7133 15.7201C10.0673 14.8405 9.15953 13.9328 8.27987 12.2867C7.99714 11.7577 7.85578 11.4931 7.80487 11.1477C7.75974 10.8414 7.79908 10.457 7.9053 10.1663C8.02512 9.83828 8.24881 9.56986 8.69619 9.033C9.14562 8.49368 9.37034 8.22402 9.48915 7.91891C9.60285 7.62694 9.64662 7.3124 9.61695 7.00048C9.58594 6.67452 9.44338 6.35376 9.15826 5.71223Z",stroke:"currentColor","stroke-width":"1.25","stroke-linecap":"round"},null,-1)]))}const oN=Et(nH,[["render",oH]]),rH={key:0,class:"flex flex-col gap-2 w-[200px]"},sH={class:"flex items-center gap-2 shrink-0"},lH={class:"overflow-hidden w-8 h-8 rounded-full text-white"},uH={key:0,class:"bg-chat-success flex-center w-full h-full"},dH={key:1,class:"bg-chat-error flex-center w-full h-full"},cH={key:1},_H=["innerHTML"],fH={key:2},pH=["src"],aH={key:3,class:"text-sm mt-1"},vH=h.defineComponent({__name:"ChatMessageItem",props:{message:{},responsive:{},isEndMessage:{type:Boolean},isMyMessage:{type:Boolean},isLastMessage:{type:Boolean},shouldShowAvatar:{type:Boolean},isChatFinished:{type:Boolean},data:{}},emits:["callAgain"],setup(e,{emit:n}){const t=e,i=n,o=h.computed(()=>{var l,d,c,_,f,p,a,v,m;if(t.isMyMessage){if(((l=t.message)==null?void 0:l.call_status)==Ye.CONNECT_FAILED)return"Call canceled";if(((d=t.message)==null?void 0:d.call_status)==Ye.CALL_END)return"Outgoing audio call";if(((c=t.message)==null?void 0:c.call_status)==Ye.CANCEL)return"Call canceled"}else{if(((_=t.message)==null?void 0:_.call_status)==Ye.CONNECT_FAILED||((f=t.message)==null?void 0:f.call_status)==Ye.TIME_OUT||((p=t.message)==null?void 0:p.call_status)==Ye.CANCEL||((a=t.message)==null?void 0:a.call_status)==Ye.NO_ANSWER||((v=t.message)==null?void 0:v.call_status)==Ye.BUSY)return"Call missed";if(((m=t.message)==null?void 0:m.call_status)==Ye.CALL_END)return"Incomming audio call"}return""}),r=()=>{h.nextTick(()=>{const l=document.getElementById("content-chat");l&&(l.scrollTop=l.scrollHeight)})},s=l=>{const d=Math.floor(l/60),c=l%60;return`${d} min${d>1?"s":""} ${c} sec`},u=l=>{switch(l.state){case wn.Sending:return"Sending...";case wn.Uploading:return"Uploading...";case wn.Sent:return"";case wn.Read:return"Seen";case wn.Failed:return l.error||"Message failed";default:return""}};return(l,d)=>{var c,_,f,p,a,v,m,g;return h.openBlock(),h.createElementBlock("div",{class:h.normalizeClass(["flex items-end mt-2",{"mt-4":l.shouldShowAvatar,"flex-col justify-end pl-[60px]":l.isMyMessage,"gap-2":!l.isMyMessage}])},[l.message.state!=h.unref(wn).Sending?(h.openBlock(),h.createElementBlock(h.Fragment,{key:0},[l.isMyMessage?h.createCommentVNode("",!0):(h.openBlock(),h.createElementBlock(h.Fragment,{key:0},[l.shouldShowAvatar?(h.openBlock(),h.createBlock(Yo,{key:0,class:h.normalizeClass(["shrink-0",l.responsive=="mobile"?"translate-y-[-2px]":""]),src:((c=l.data)==null?void 0:c.avatar)??"",color:(_=l.data)==null?void 0:_.color,name:(f=l.data)==null?void 0:f.username,size:l.responsive=="mobile"?"sm":"md"},null,8,["src","color","name","size","class"])):(h.openBlock(),h.createElementBlock("div",{key:1,class:h.normalizeClass(["shrink-0",l.responsive=="mobile"?"w-8":"w-12"])},null,2))],64)),h.createElementVNode("div",{class:h.normalizeClass(["px-3 py-2 rounded-2xl max-w-xs text-left",{"rounded-tl-none":!l.shouldShowAvatar&&!l.isMyMessage,"rounded-bl-none":!l.isEndMessage&&!l.isMyMessage,"rounded-tr-none":!l.shouldShowAvatar&&l.isMyMessage,"rounded-br-none":!l.isEndMessage&&l.isMyMessage,"!text-[#14532D] !bg-[#d4f8d4]":l.message.message_uuid&&!l.message.is_call,"bg-[#D0DFEC] text-[#266699]":l.isMyMessage,"bg-[#E4E4E4D4] text-chat-haze-600 w-max ":!l.isMyMessage}])},[l.message.is_call==1?(h.openBlock(),h.createElementBlock("div",rH,[h.createElementVNode("p",{class:h.normalizeClass(["font-medium",{"text-chat-error":l.message.call_status!==h.unref(Ye).CALL_END}])},h.toDisplayString(o.value),3),h.createElementVNode("div",sH,[h.createElementVNode("div",lH,[l.message.call_status==h.unref(Ye).CALL_END?(h.openBlock(),h.createElementBlock("div",uH,[h.createVNode(oN,{class:"w-5 h-5"})])):(h.openBlock(),h.createElementBlock("div",dH,[h.createVNode(iN,{class:"w-5 h-5"})]))]),h.createElementVNode("span",null,h.toDisplayString(s(((p=l.message)==null?void 0:p.duration)??0)),1)]),h.createElementVNode("button",{onClick:d[0]||(d[0]=E=>i("callAgain")),class:"flex-center h-10 rounded-xl bg-chat-haze-200 font-semibold"},d[2]||(d[2]=[h.createElementVNode("p",null,"Call back",-1)]))])):l.message.message?(h.openBlock(),h.createElementBlock("div",cH,[h.createElementVNode("div",{innerHTML:l.message.message,style:{wordBreak:"break-word"}},null,8,_H)])):(v=(a=l.message)==null?void 0:a.attachments)!=null&&v.length?(h.openBlock(),h.createElementBlock("div",fH,[h.createElementVNode("img",{src:(m=l.message.attachments[0])==null?void 0:m.file_path,alt:"avatar",onLoad:d[1]||(d[1]=()=>{l.isLastMessage&&r()})},null,40,pH)])):h.createCommentVNode("",!0),l.isChatFinished?(h.openBlock(),h.createElementBlock("p",aH,h.toDisplayString(h.unref(Ct)((g=l.message)==null?void 0:g.created_at).format(h.unref(Tr).TIME_12_FORMAT)),1)):h.createCommentVNode("",!0)],2),l.isMyMessage?(h.openBlock(),h.createElementBlock(h.Fragment,{key:1},[l.isLastMessage&&u(l.message)||l.message.state==h.unref(wn).Failed?(h.openBlock(),h.createElementBlock("span",{key:0,class:h.normalizeClass(["text-chat-haze-200 text-xs mt-1",{"!text-chat-error":l.message.state==h.unref(wn).Failed}])},h.toDisplayString(u(l.message)),3)):h.createCommentVNode("",!0)],64)):h.createCommentVNode("",!0)],64)):h.createCommentVNode("",!0)],2)}}}),mH={class:"relative overflow-hidden"},hH={key:0,class:"shrink-0 h-[500px] chat-padding-page"},yH={class:"chat-padding-page"},gH=h.defineComponent({__name:"ChatMessage",props:{data:{},message:{},responsive:{},showNewCustomer:{type:Boolean}},emits:["scrollTop","callBack"],setup(e,{expose:n,emit:t}){const i=e,o=t,r=h.ref(null),s=()=>{h.nextTick(()=>{const p=document.getElementById("content-chat");p&&(p.scrollTop=p.scrollHeight)})},u=p=>p===0?!0:i.message[p-1].sender_id!==i.message[p].sender_id,l=p=>{var a;return((a=i.message)==null?void 0:a.length)==p+1?!0:i.message[p+1].sender_id!==i.message[p].sender_id},d=p=>{if(l(p))return!0;const a=Ct(i.message[p].created_at);return Ct(i.message[p+1].created_at).diff(a,"minute")>10},c=()=>{o("scrollTop")};return n({scrollBottom:s,hideScrollEvent:()=>{var p;(p=r.value)==null||p.hideLoading()},fixedScroll:()=>{var p;(p=r.value)==null||p.fixedScroll()}}),(p,a)=>(h.openBlock(),h.createElementBlock("div",mH,[h.createVNode(Hf,{class:"bg-white h-full flex flex-col overflow-auto",id:"content-chat",top:"",ref_key:"scrollEventRef",ref:r,onGetDataTop:c},{default:h.withCtx(()=>[p.showNewCustomer?(h.openBlock(),h.createElementBlock("div",hH,[h.createVNode(IR,{class:"h-full",data:p.data},null,8,["data"])])):h.createCommentVNode("",!0),h.createElementVNode("div",yH,[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(p.message,(v,m)=>{var g;return h.openBlock(),h.createBlock(vH,{key:v.id,onCallAgain:a[0]||(a[0]=E=>o("callBack")),message:v,index:m,responsive:p.responsive,"is-my-message":v.sender_id==((g=h.unref(Fe))==null?void 0:g.id),data:p.data,"should-show-avatar":u(m),"is-last-message":m==p.message.length-1,"is-end-message":l(m),"is-chat-finished":d(m)},null,8,["message","index","responsive","is-my-message","data","should-show-avatar","is-last-message","is-end-message","is-chat-finished"])}),128))])]),_:1},512)]))}}),EH={class:"h-full flex flex-col overflow-hidden"},TH={key:2,class:"grow"},rN=h.defineComponent({__name:"Home",props:{receiverId:{},responsive:{}},emits:["call","inputFocus","back"],setup(e,{expose:n,emit:t}){const i=e,o=t,r=h.computed(()=>f.value.slice().reverse());let s=1,u=1,l="",d="";const c=h.ref(!1),_=h.shallowRef(null),f=h.ref([]),p=h.ref(null),a=h.ref(null);h.onMounted(()=>{}),h.onUnmounted(()=>{m()});const v=async()=>{var j,I;try{await Uc(),l=Fj+((j=_.value)==null?void 0:j.conversation_id),d=qj+((I=_.value)==null?void 0:I.conversation_id),yr(l),yr(d),Bc("chat-home",l,g)}catch(A){console.error(A)}},m=async()=>{zl(l),zl(d),Kl("chat-home")},g=(j,I)=>{var A,M,w,x,k;if(console.log(I),(A=_.value)!=null&&A.id&&((M=I==null?void 0:I.sender_id)==null?void 0:M.toString())==((x=(w=_.value)==null?void 0:w.id)==null?void 0:x.toString())){const V=f.value.findIndex(L=>L.id===(I==null?void 0:I.id));V<0?f.value.unshift(I):f.value[V]=I,(k=p.value)==null||k.scrollBottom()}},E=async j=>{var I,A,M;try{const w=i.receiverId,x={page:j!=null&&j.resetList?1:s,receiver_id:i.receiverId};let k=await fV(x);s=((I=k._meta)==null?void 0:I.currentPage)||1,u=((A=k._meta)==null?void 0:A.pageCount)||1,w==i.receiverId&&(j!=null&&j.resetList?(f.value=k.items,(M=p.value)==null||M.scrollBottom()):f.value.push(...k.items))}catch(w){console.error(w)}},y=async()=>{var j,I,A;if(s>=u){(j=p.value)==null||j.hideScrollEvent();return}s=s+1,await E(),(I=p.value)==null||I.hideScrollEvent(),(A=p.value)==null||A.fixedScroll()},S=async j=>{const I=i.receiverId;j&&(_.value={...j,conversation_id:j.id});const A=await pV(i.receiverId)??null;I==i.receiverId&&(_.value=A,m(),await v())},C=async j=>{var I,A;try{c.value=!0,f.value=[],(I=a.value)==null||I.clearInput(),S(j),await Promise.allSettled([E({resetList:!0})]),await h.nextTick(),(A=p.value)==null||A.scrollBottom()}catch(M){console.error(M)}finally{c.value=!1}},T=(j,I)=>{const A=f.value.findIndex(M=>M.id==j);if(A>-1){const M=f.value[A];f.value[A]={...M,...I}}},R=async j=>{var I,A,M,w,x,k,V;try{f.value.unshift({...j,state:wn.Sending}),Yl(l,{...j,state:wn.Sending});let L=[];(I=j==null?void 0:j.attachments)!=null&&I.length&&(T(j.id,{state:wn.Uploading}),L=await O(j==null?void 0:j.attachments[0].file_local)),T(j.id,{state:wn.Sending}),(A=p.value)==null||A.scrollBottom();const D=new FormData;D.append("message",j.message??""),D.append("receiver_id",((M=_.value)==null?void 0:M.id)??""),L!=null&&L.length&&D.append("url",((w=L[0])==null?void 0:w.url)??""),await vV(D),Yl(l,{...j,state:wn.Sent,attachments:L?[{file_name:((x=j.attachments[0])==null?void 0:x.file_name)??"",file_path:((k=L[0])==null?void 0:k.url)??""}]:[]}),T(j.id,{state:wn.Sent}),(V=p.value)==null||V.scrollBottom(),ER({message:(j==null?void 0:j.message)??"",isSendImg:!!(L!=null&&L.length),infoUser:_.value})}catch(L){console.log(L),T(j.id,{state:wn.Failed,error:typeof(L==null?void 0:L.message)=="string"?L.message:""})}},O=async j=>{if(j==null||j==null)return[];if(j.size>1*1024*1024)throw new Error("File size exceeds limit");const I=new FormData;return I.append("file",j),await hV(I)},B=()=>{_.value&&o("call",_.value)};return n({getData:C,handleGetMessage:E,infoUser:_}),(j,I)=>{var A;return h.openBlock(),h.createElementBlock("div",EH,[h.createVNode($V,{class:"shrink-0",data:_.value,onCall:B,responsive:j.responsive,onBack:I[0]||(I[0]=M=>o("back"))},null,8,["data","responsive"]),(A=f.value)!=null&&A.length?(h.openBlock(),h.createBlock(gH,{key:0,ref_key:"chatMessageRef",ref:p,onScrollTop:y,data:_.value,message:r.value,class:"grow",responsive:j.responsive,"show-new-customer":h.unref(s)>=h.unref(u),onCallBack:B},null,8,["data","message","responsive","show-new-customer"])):c.value?(h.openBlock(),h.createElementBlock("span",TH)):(h.openBlock(),h.createBlock(IR,{key:1,data:_.value,class:"grow"},null,8,["data"])),h.createVNode(X7,{data:_.value,onSendMessage:R,onFocus:I[1]||(I[1]=M=>o("inputFocus")),ref_key:"inputChatRef",ref:a,class:"p-6"},null,8,["data"])])}}}),SH={},bH={width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function IH(e,n){return h.openBlock(),h.createElementBlock("svg",bH,n[0]||(n[0]=[h.createElementVNode("path",{d:"M6.00003 4L10 8L6 12",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]))}const sN=Et(SH,[["render",IH]]),CH={class:"w-full"},AH={class:"text-chat-haze-500 font-semibold"},RH={class:"bg-white rounded-xl border border-chat-haze-100 mt-1 p-4 space-y-4"},MH=["onClick"],NH={class:"flex items-center gap-1 grow text-chat-haze-900"},OH={key:0,class:"flex items-center text-chat-haze-300"},wH={class:"ml-1"},xH={class:"border-chat-haze-100 mx-6"},D_=h.defineComponent({__name:"SubInformation",props:{information:{default:[]},title:{default:""}},setup(e){return(n,t)=>(h.openBlock(),h.createElementBlock("div",CH,[h.createElementVNode("h2",AH,h.toDisplayString(n.title),1),h.createElementVNode("div",RH,[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(n.information,(i,o)=>(h.openBlock(),h.createElementBlock(h.Fragment,{key:o},[h.createElementVNode("div",{class:h.normalizeClass(["flex items-center gap-1",{"cursor-pointer":i.click}]),onClick:r=>{var s;return(s=i.click)==null?void 0:s.call(i)}},[h.createElementVNode("div",NH,[(h.openBlock(),h.createBlock(h.resolveDynamicComponent(i.icon))),h.createElementVNode("span",null,h.toDisplayString(i.label),1)]),i.value?(h.openBlock(),h.createElementBlock("div",OH,[h.createTextVNode(h.toDisplayString(i.value)+" ",1),h.createElementVNode("span",wH,[h.createVNode(sN)])])):h.createCommentVNode("",!0)],10,MH),h.withDirectives(h.createElementVNode("hr",xH,null,512),[[h.vShow,o<n.information.length-1]])],64))),128))])]))}}),PH={},DH={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function kH(e,n){return h.openBlock(),h.createElementBlock("svg",DH,n[0]||(n[0]=[h.createElementVNode("path",{d:"M7 8.5L9.94202 10.2394C11.6572 11.2535 12.3428 11.2535 14.058 10.2394L17 8.5",stroke:"currentColor","stroke-width":"1.25","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),h.createElementVNode("path",{d:"M2.01577 13.4756C2.08114 16.5411 2.11383 18.0739 3.24496 19.2093C4.37609 20.3448 5.95034 20.3843 9.09884 20.4634C11.0393 20.5122 12.9607 20.5122 14.9012 20.4634C18.0497 20.3843 19.6239 20.3448 20.755 19.2093C21.8862 18.0739 21.9189 16.5411 21.9842 13.4756C22.0053 12.4899 22.0053 11.51 21.9842 10.5244C21.9189 7.45886 21.8862 5.92609 20.755 4.79066C19.6239 3.65523 18.0497 3.61568 14.9012 3.53657C12.9607 3.48781 11.0393 3.48781 9.09882 3.53656C5.95034 3.61566 4.37609 3.65521 3.24496 4.79065C2.11383 5.92608 2.08114 7.45885 2.01577 10.5243C1.99474 11.51 1.99474 12.4899 2.01577 13.4756Z",stroke:"#363E44","stroke-width":"1.25","stroke-linejoin":"round"},null,-1)]))}const LH=Et(PH,[["render",kH]]),UH={},BH={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function jH(e,n){return h.openBlock(),h.createElementBlock("svg",BH,n[0]||(n[0]=[h.createElementVNode("path",{d:"M18.9905 19H19M18.9905 19C18.3678 19.6175 17.2393 19.4637 16.4479 19.4637C15.4765 19.4637 15.0087 19.6537 14.3154 20.347C13.7251 20.9374 12.9337 22 12 22C11.0663 22 10.2749 20.9374 9.68457 20.347C8.99128 19.6537 8.52349 19.4637 7.55206 19.4637C6.76068 19.4637 5.63218 19.6175 5.00949 19C4.38181 18.3776 4.53628 17.2444 4.53628 16.4479C4.53628 15.4414 4.31616 14.9786 3.59938 14.2618C2.53314 13.1956 2.00002 12.6624 2 12C2.00001 11.3375 2.53312 10.8044 3.59935 9.73817C4.2392 9.09832 4.53628 8.46428 4.53628 7.55206C4.53628 6.76065 4.38249 5.63214 5 5.00944C5.62243 4.38178 6.7556 4.53626 7.55208 4.53626C8.46427 4.53626 9.09832 4.2392 9.73815 3.59937C10.8044 2.53312 11.3375 2 12 2C12.6625 2 13.1956 2.53312 14.2618 3.59937C14.9015 4.23907 15.5355 4.53626 16.4479 4.53626C17.2393 4.53626 18.3679 4.38247 18.9906 5C19.6182 5.62243 19.4637 6.75559 19.4637 7.55206C19.4637 8.55858 19.6839 9.02137 20.4006 9.73817C21.4669 10.8044 22 11.3375 22 12C22 12.6624 21.4669 13.1956 20.4006 14.2618C19.6838 14.9786 19.4637 15.4414 19.4637 16.4479C19.4637 17.2444 19.6182 18.3776 18.9905 19Z",stroke:"#363E44","stroke-width":"1.25"},null,-1),h.createElementVNode("path",{d:"M9 12.8929C9 12.8929 10.2 13.5447 10.8 14.5C10.8 14.5 12.6 10.75 15 9.5",stroke:"currentColor","stroke-width":"1.25","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]))}const VH=Et(UH,[["render",jH]]),FH={},qH={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function GH(e,n){return h.openBlock(),h.createElementBlock("svg",qH,n[0]||(n[0]=[h.createElementVNode("path",{d:"M16 2V6M8 2V6",stroke:"currentColor","stroke-width":"1.25","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),h.createElementVNode("path",{d:"M13 4H11C7.22876 4 5.34315 4 4.17157 5.17157C3 6.34315 3 8.22876 3 12V14C3 17.7712 3 19.6569 4.17157 20.8284C5.34315 22 7.22876 22 11 22H13C16.7712 22 18.6569 22 19.8284 20.8284C21 19.6569 21 17.7712 21 14V12C21 8.22876 21 6.34315 19.8284 5.17157C18.6569 4 16.7712 4 13 4Z",stroke:"currentColor","stroke-width":"1.25","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),h.createElementVNode("path",{d:"M3 10H21",stroke:"currentColor","stroke-width":"1.25","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),h.createElementVNode("path",{d:"M9 16.5C9 16.5 10.5 17 11 18.5C11 18.5 13.1765 14.5 16 13.5",stroke:"currentColor","stroke-width":"1.25","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]))}const HH=Et(FH,[["render",GH]]),zH={},YH={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function KH(e,n){return h.openBlock(),h.createElementBlock("svg",YH,n[0]||(n[0]=[h.createStaticVNode('<path d="M13.0289 7.4183C13.0098 7.2816 13 7.14195 13 7C13 5.34314 14.3432 4 16 4C17.6568 4 19 5.34314 19 7C19 8.65686 17.6568 10 16 10C15.4416 10 14.9188 9.84745 14.4711 9.58172" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"></path><path d="M21 14.9498C21 12.2161 18.7614 10 16 10C13.2386 10 11 12.2161 11 14.9498" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"></path><path d="M14 9C14 6.79086 12.2091 5 10 5C7.79086 5 6 6.79086 6 9C6 11.2091 7.79086 13 10 13C12.2091 13 14 11.2091 14 9Z" fill="white" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"></path><path d="M17 18.6569C17 15.5327 13.866 13 10 13C6.134 13 3 15.5327 3 18.6569" fill="white"></path><path d="M17 18.6569C17 15.5327 13.866 13 10 13C6.134 13 3 15.5327 3 18.6569C3 21.781 17 21.781 17 18.6569Z" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"></path>',5)]))}const WH=Et(zH,[["render",KH]]),$H={},QH={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function JH(e,n){return h.openBlock(),h.createElementBlock("svg",QH,n[0]||(n[0]=[h.createElementVNode("path",{d:"M3 11C3 7.25027 3 5.3754 3.95491 4.06107C4.26331 3.6366 4.6366 3.26331 5.06107 2.95491C6.3754 2 8.25027 2 12 2C15.7497 2 17.6246 2 18.9389 2.95491C19.3634 3.26331 19.7367 3.6366 20.0451 4.06107C21 5.3754 21 7.25027 21 11V13C21 16.7497 21 18.6246 20.0451 19.9389C19.7367 20.3634 19.3634 20.7367 18.9389 21.0451C17.6246 22 15.7497 22 12 22C8.25027 22 6.3754 22 5.06107 21.0451C4.6366 20.7367 4.26331 20.3634 3.95491 19.9389C3 18.6246 3 16.7497 3 13V11Z",stroke:"currentColor","stroke-width":"1.25","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),h.createElementVNode("path",{d:"M15 9.5H7M10 14.5H7",stroke:"currentColor","stroke-width":"1.25","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]))}const XH=Et($H,[["render",JH]]),ZH={},ez={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function tz(e,n){return h.openBlock(),h.createElementBlock("svg",ez,n[0]||(n[0]=[h.createElementVNode("path",{d:"M17 17L21 21",stroke:"currentColor","stroke-width":"1.25","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),h.createElementVNode("path",{d:"M19 11C19 6.58172 15.4183 3 11 3C6.58172 3 3 6.58172 3 11C3 15.4183 6.58172 19 11 19C15.4183 19 19 15.4183 19 11Z",stroke:"currentColor","stroke-width":"1.25","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]))}const nz=Et(ZH,[["render",tz]]),iz={},oz={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function rz(e,n){return h.openBlock(),h.createElementBlock("svg",oz,n[0]||(n[0]=[h.createElementVNode("path",{d:"M3 21L8 16",stroke:"currentColor","stroke-width":"1.25","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),h.createElementVNode("path",{d:"M13.2585 18.8714C9.51516 18.0215 5.97844 14.4848 5.12853 10.7415C4.99399 10.1489 4.92672 9.85266 5.12161 9.37197C5.3165 8.89129 5.55457 8.74255 6.03071 8.44509C7.10705 7.77265 8.27254 7.55888 9.48209 7.66586C11.1793 7.81598 12.0279 7.89104 12.4512 7.67048C12.8746 7.44991 13.1622 6.93417 13.7376 5.90269L14.4664 4.59604C14.9465 3.73528 15.1866 3.3049 15.7513 3.10202C16.316 2.89913 16.6558 3.02199 17.3355 3.26771C18.9249 3.84236 20.1576 5.07505 20.7323 6.66449C20.978 7.34417 21.1009 7.68401 20.898 8.2487C20.6951 8.8134 20.2647 9.05346 19.4039 9.53358L18.0672 10.2792C17.0376 10.8534 16.5229 11.1406 16.3024 11.568C16.0819 11.9955 16.162 12.8256 16.3221 14.4859C16.4399 15.7068 16.2369 16.88 15.5555 17.9697C15.2577 18.4458 15.1088 18.6839 14.6283 18.8786C14.1477 19.0733 13.8513 19.006 13.2585 18.8714Z",stroke:"currentColor","stroke-width":"1.25","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]))}const sz=Et(iz,[["render",rz]]),lz=(e,n=1)=>{let t=(""+e||"").replace(/[^\d*]/g,"");return t.length>10&&(t=t.substring(t.length-10)),t.length==10?(n==4&&(t=(t||"").replace(/(\d{3})(\d{3})(\d{4})/,"*** $3")),n==3&&(t=(t||"").replace(/(\d{3})(\d{3})(\d{4})/,"($3)")),n==2?t=(t||"").replace(/(\d{3})(\d{3})(\d{4})/,"***-***-$3"):t=(t||"").replace(/(\d{3})(\d{3})(\d{4})/,"(***) ***-$3"),t):""},uz={class:"chat-padding-page overflow-auto"},dz={class:"flex flex-col items-center mx-auto"},cz={class:"flex items-center gap-1 mt-3"},_z={class:"text-lg font-semibold text-gray-800"},fz={class:"w-full flex items-center justify-center gap-1"},pz={class:"text-lg font-semibold text-chat-haze-900"},az=["src"],vz={class:"text-chat-haze-400"},mz={class:"w-full py-6"},lN=h.defineComponent({__name:"CustomerDetail",props:{receiverId:{},responsive:{}},setup(e){const n=h.computed(()=>{var s,u,l;return[{label:"Points",value:((s=Bn.value)==null?void 0:s.lifetime_point)??0},{label:"Total Visit",value:((u=Bn.value)==null?void 0:u.visit_count)??0},{label:"Spent",value:((l=Bn.value)==null?void 0:l.total_money)??0}]}),t=h.computed(()=>{var s;return[{icon:LH,label:""},{icon:oN,label:lz(((s=Io.value)==null?void 0:s.phone)??"",2)}]}),i=h.computed(()=>{var s,u,l,d,c,_,f,p,a,v;return[{icon:VH,label:"Check In",value:(s=Bn.value)!=null&&s.visit_count?((u=Bn.value)==null?void 0:u.visit_count)+(((l=Bn.value)==null?void 0:l.visit_count)>1?" times":" time"):"",click:(d=Bn.value)!=null&&d.visit_count?()=>{In(He.CUSTOMER_CHECK_IN)}:null},{icon:XH,label:"Orders",value:((_=(c=Bn.value)==null?void 0:c.order)==null?void 0:_.length)??""},{icon:HH,label:"Appointments",value:((p=(f=Bn.value)==null?void 0:f.appointment)==null?void 0:p.length)??"",click:(v=(a=Bn.value)==null?void 0:a.appointment)!=null&&v.length?()=>{In(He.CUSTOMER_APPOINTMENT)}:null}]}),o=[{icon:nz,label:"Search in the conversation"},{icon:sz,label:"Pin Message"},{icon:WH,label:"Add Groups"}];return(async()=>{var s,u;Bn.value=null,Bn.value=await BV(((u=(s=Io.value)==null?void 0:s.phone)==null?void 0:u.slice(1))??"")})(),(s,u)=>{var l,d,c,_;return h.openBlock(),h.createElementBlock("div",uz,[h.createElementVNode("div",dz,[h.createVNode(Yo,{src:((l=h.unref(Io))==null?void 0:l.avatar)??"",color:((d=h.unref(Io))==null?void 0:d.color)??"",name:((c=h.unref(Io))==null?void 0:c.username)??"",size:"xl"},null,8,["src","color","name"]),h.createElementVNode("div",cz,[h.createElementVNode("h2",_z,h.toDisplayString(((_=h.unref(Io))==null?void 0:_.username)??"n/a"),1)])]),h.createElementVNode("div",{class:h.normalizeClass(["mt-5 text-center mx-auto",{"flex justify-between w-max":s.responsive=="tablet","grid grid-cols-3 w-full":s.responsive=="mobile"}])},[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(n.value,(f,p)=>(h.openBlock(),h.createElementBlock("div",{class:h.normalizeClass(["border-l border-chat-haze-100 first:border-none",{"w-full":s.responsive=="mobile","w-[130px]":s.responsive=="tablet"}]),key:p},[h.createElementVNode("div",fz,[h.createElementVNode("p",pz,h.toDisplayString(f.value),1),f.icon?(h.openBlock(),h.createElementBlock("img",{key:0,src:f.icon},null,8,az)):h.createCommentVNode("",!0)]),h.createElementVNode("p",vz,h.toDisplayString(f.label),1)],2))),128))],2),h.createElementVNode("div",mz,[h.createVNode(D_,{class:"mb-6",information:t.value,title:"Information"},null,8,["information"]),h.createVNode(D_,{class:"mb-6",information:i.value,title:"History"},null,8,["information"]),h.createVNode(D_,{class:"",information:o,title:"Other Action"})])])}}}),hz={},yz={class:"bg-white border border-chat-haze-200 rounded-lg p-4"};function gz(e,n){return h.openBlock(),h.createElementBlock("div",yz,[h.renderSlot(e.$slots,"header"),n[0]||(n[0]=h.createElementVNode("div",{class:"border-t border-dashed border-chat-haze-200 my-2"},null,-1)),h.renderSlot(e.$slots,"content")])}const uN=Et(hz,[["render",gz]]);var dN=(e=>(e.Orange="#F2994A",e.Blue_Teal="#F2994A",e))(dN||{});function Ez(){var n,t,i;const e=document.querySelector(":root");e&&((n=e.style)==null||n.setProperty("--chat-color-primary","#0051E6"),(t=e.style)==null||t.setProperty("--chat-color-error","#EF4444"),(i=e.style)==null||i.setProperty("--chat-color-success","#22C55E"))}const Tz=h.defineComponent({__name:"Collapsible",props:{defaultOpen:{type:Boolean},open:{type:Boolean},disabled:{type:Boolean},unmountOnHide:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["update:open"],setup(e,{emit:n}){const o=Nr(e,n);return(r,s)=>(h.openBlock(),h.createBlock(h.unref(u8),h.normalizeProps(h.guardReactiveProps(h.unref(o))),{default:h.withCtx(({open:u})=>[h.renderSlot(r.$slots,"default",{open:u})]),_:3},16))}}),Sz=h.defineComponent({__name:"CollapsibleContent",props:{forceMount:{type:Boolean},asChild:{type:Boolean},as:{}},setup(e){const n=e;return(t,i)=>(h.openBlock(),h.createBlock(h.unref(c8),h.mergeProps(n,{class:"overflow-hidden transition-all data-[state=closed]:animate-collapsible-up data-[state=open]:animate-collapsible-down"}),{default:h.withCtx(()=>[h.renderSlot(t.$slots,"default")]),_:3},16))}}),bz=h.defineComponent({__name:"CollapsibleTrigger",props:{asChild:{type:Boolean},as:{}},setup(e){const n=e;return(t,i)=>(h.openBlock(),h.createBlock(h.unref(f8),h.normalizeProps(h.guardReactiveProps(n)),{default:h.withCtx(()=>[h.renderSlot(t.$slots,"default")]),_:3},16))}}),Iz=h.defineComponent({__name:"CollapseBase",props:{open:{type:Boolean},openModifiers:{}},emits:["update:open"],setup(e){const n=h.useModel(e,"open");return(t,i)=>(h.openBlock(),h.createBlock(h.unref(Tz),{open:n.value,"onUpdate:open":i[0]||(i[0]=o=>n.value=o)},{default:h.withCtx(()=>[h.createVNode(h.unref(bz),null,{default:h.withCtx(()=>[h.renderSlot(t.$slots,"trigger")]),_:3}),h.createVNode(h.unref(Sz),null,{default:h.withCtx(()=>[h.renderSlot(t.$slots,"default")]),_:3})]),_:3},8,["open"]))}}),Cz={class:"flex items-center text-chat-haze-400 mb-3"},Az={class:"font-semibold text-lg"},cN=h.defineComponent({__name:"CollapseCheckIn",props:{title:{}},setup(e){const n=h.ref(!0);return(t,i)=>(h.openBlock(),h.createBlock(Iz,{class:"relative",open:n.value,"onUpdate:open":i[0]||(i[0]=o=>n.value=o)},{trigger:h.withCtx(()=>[i[1]||(i[1]=h.createElementVNode("div",{class:"w-2 h-2 bg-chat-haze-400 rounded-full absolute left-[-20px] top-2"},null,-1)),h.createElementVNode("div",Cz,[h.createElementVNode("span",Az,h.toDisplayString(t.title),1),h.createVNode(sN,{class:h.normalizeClass(n.value?"rotate-90":"rotate-0")},null,8,["class"])])]),default:h.withCtx(()=>[h.renderSlot(t.$slots,"default")]),_:3},8,["open"]))}}),Rz={class:"chat-padding-page"},Mz={class:"relative pl-4 h-max"},Nz={class:"flex justify-between items-center"},Oz={class:"text-chat-haze-600 font-bold"},wz={class:"flex justify-between items-center"},xz={class:"text-chat-haze-400 font-normal"},_N=h.defineComponent({__name:"CustomerCheckIn",setup(e){const n=h.computed(()=>{var t;return bR(((t=Bn.value)==null?void 0:t.checkin)??[])});return h.ref(!0),h.ref(!0),(t,i)=>(h.openBlock(),h.createElementBlock("div",Rz,[i[1]||(i[1]=h.createElementVNode("p",{class:"font-semibold mb-4"},"Total Point: 666",-1)),h.createElementVNode("div",Mz,[i[0]||(i[0]=h.createElementVNode("div",{class:"absolute left-0 top-0 border-l border-dashed border-chat-haze-400 h-full w-1 mt-2"},null,-1)),(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(n.value,(o,r)=>(h.openBlock(),h.createBlock(cN,{class:"relative",title:o.year,key:r},{default:h.withCtx(()=>[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(o.items,s=>(h.openBlock(),h.createElementBlock("div",{class:"flex flex-col gap-y-3",key:s.id},[h.createVNode(uN,null,{header:h.withCtx(()=>[h.createElementVNode("div",Nz,[h.createElementVNode("p",Oz,"ID: "+h.toDisplayString(s.id),1),h.createElementVNode("p",{class:"font-bold",style:h.normalizeStyle({color:h.unref(dN).Orange})},h.toDisplayString(s.status),5)])]),content:h.withCtx(()=>[h.createElementVNode("div",wz,[h.createElementVNode("p",xz,h.toDisplayString(h.unref(Ct)(s.created_at).format(h.unref(Tr).DATE_FORMAT)),1),h.withDirectives(h.createElementVNode("p",{class:"text-chat-success"},"+"+h.toDisplayString(s.point_bonus)+" points",513),[[h.vShow,s.point_bonus>0]]),h.withDirectives(h.createElementVNode("p",{class:""},"+"+h.toDisplayString(s.point_bonus)+" points",513),[[h.vShow,!s.point_bonus]])])]),_:2},1024)]))),128))]),_:2},1032,["title"]))),128))])]))}}),Pz={},Dz={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function kz(e,n){return h.openBlock(),h.createElementBlock("svg",Dz,n[0]||(n[0]=[h.createStaticVNode('<path d="M5.8335 17.5V15" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"></path><path d="M14.1665 17.5V12.5" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"></path><path d="M14.1665 5V2.5" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"></path><path d="M5.8335 7.5V2.5" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"></path><path d="M5.8335 15C5.05693 15 4.66865 15 4.36235 14.8732C3.95398 14.704 3.62952 14.3795 3.46036 13.9712C3.3335 13.6648 3.3335 13.2766 3.3335 12.5C3.3335 11.7234 3.3335 11.3352 3.46036 11.0288C3.62952 10.6205 3.95398 10.296 4.36235 10.1268C4.66865 10 5.05693 10 5.8335 10C6.61006 10 6.99835 10 7.30464 10.1268C7.71301 10.296 8.03747 10.6205 8.20663 11.0288C8.3335 11.3352 8.3335 11.7234 8.3335 12.5C8.3335 13.2766 8.3335 13.6648 8.20663 13.9712C8.03747 14.3795 7.71301 14.704 7.30464 14.8732C6.99835 15 6.61006 15 5.8335 15Z" stroke="currentColor" stroke-width="1.25"></path><path d="M14.1665 10C13.3899 10 13.0017 10 12.6953 9.87317C12.287 9.704 11.9625 9.3795 11.7933 8.97117C11.6665 8.66483 11.6665 8.27657 11.6665 7.5C11.6665 6.72343 11.6665 6.33515 11.7933 6.02886C11.9625 5.62048 12.287 5.29602 12.6953 5.12687C13.0017 5 13.3899 5 14.1665 5C14.9431 5 15.3313 5 15.6377 5.12687C16.046 5.29602 16.3705 5.62048 16.5397 6.02886C16.6665 6.33515 16.6665 6.72343 16.6665 7.5C16.6665 8.27657 16.6665 8.66483 16.5397 8.97117C16.3705 9.3795 16.046 9.704 15.6377 9.87317C15.3313 10 14.9431 10 14.1665 10Z" stroke="currentColor" stroke-width="1.25"></path>',6)]))}const Lz=Et(Pz,[["render",kz]]);var Br=(e=>(e.Confirmed="confirmed",e.Scheduled="scheduled",e.Canceled="canceled",e.Done="done",e.Reminder="reminder",e.Waiting="wait_list",e))(Br||{});const Uz={class:"chat-padding-page"},Bz={class:"flex justify-between items-center mb-5"},jz={class:"flex text-chat-haze-300 border border-chat-haze-300 rounded-[99px] px-2"},Vz={class:"relative pl-4 h-max"},Fz={class:"flex flex-col gap-y-3"},qz={class:"flex justify-between items-center"},Gz={class:"text-lg text-chat-haze-600 font-bold"},Hz={class:"translate-y-[-4px]"},zz={class:"flex justify-between items-end"},Yz={class:"text-chat-haze-400"},Kz={class:"text-chat-haze-400"},Wz={class:"text-chat-haze-409 font-medium"},$z={class:"text-chat-haze-409 font-medium"},fN=h.defineComponent({__name:"CustomerAppointment",setup(e){const n=h.computed(()=>{var i;return bR(((i=Bn.value)==null?void 0:i.appointment)??[],"start_time")}),t=i=>{switch(i){case Br.Confirmed:return"background-color: #E3FFF1; color: #06C270";case Br.Scheduled:return"background-color: #FFF0FF; color: #6600CC";case Br.Canceled:return"background-color: #FFE4DC; color: #F15220";case Br.Done:return"background-color: #E5F0FF; color: #0063F7";case Br.Waiting:return"background-color: #FFF0E0; color: #D96A2B";case"website":return"background-color: #FFF3B6; color: #F5B02A";case"checkin":return"background-color: #fff; color: #00b1bc";default:return""}};return(i,o)=>(h.openBlock(),h.createElementBlock("div",Uz,[h.createElementVNode("div",Bz,[o[1]||(o[1]=h.createElementVNode("p",{class:"text-chat-haze-900 font-semibold"},"All Appointment",-1)),h.createElementVNode("button",jz,[o[0]||(o[0]=h.createElementVNode("span",{class:"font-medium"},"Filter",-1)),h.createVNode(Lz)])]),h.createElementVNode("div",Vz,[o[2]||(o[2]=h.createElementVNode("div",{class:"absolute left-0 top-0 border-l border-dashed border-chat-haze-400 h-full w-1 mt-2"},null,-1)),(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(n.value,(r,s)=>(h.openBlock(),h.createBlock(cN,{class:"relative",title:r.year,key:s},{default:h.withCtx(()=>[h.createElementVNode("div",Fz,[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(r.items,u=>(h.openBlock(),h.createBlock(uN,{key:u.id},{header:h.withCtx(()=>[h.createElementVNode("div",qz,[h.createElementVNode("p",Gz,"ID: "+h.toDisplayString(u.id),1),h.createElementVNode("div",Hz,[h.createElementVNode("div",{class:"w-max rounded-[6px] text-14px px-2 py-1 mt-2",style:h.normalizeStyle(t(u.status))},h.toDisplayString(u.status),5)])]),h.createElementVNode("div",zz,[h.createElementVNode("p",Yz,h.toDisplayString(h.unref(Ct)(u.start_time).format(h.unref(Tr).DATE_FORMAT)),1),h.createElementVNode("p",Kz," start time: "+h.toDisplayString(h.unref(Ct)(u.start_time).format(h.unref(Tr).TIME_12_FORMAT)),1)])]),content:h.withCtx(()=>[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(u.services,(l,d)=>(h.openBlock(),h.createElementBlock("div",{class:"flex justify-between items-center",key:d},[h.createElementVNode("p",Wz,h.toDisplayString(l.employee_name),1),h.createElementVNode("p",$z,h.toDisplayString(l.name),1)]))),128))]),_:2},1024))),128))])]),_:2},1032,["title"]))),128))])]))}});class Wn extends Error{constructor(n){var t,i,o,r;super("ClientResponseError"),this.url="",this.status=0,this.response={},this.isAbort=!1,this.originalError=null,Object.setPrototypeOf(this,Wn.prototype),n!==null&&typeof n=="object"&&(this.url=typeof n.url=="string"?n.url:"",this.status=typeof n.status=="number"?n.status:0,this.isAbort=!!n.isAbort,this.originalError=n.originalError,n.response!==null&&typeof n.response=="object"?this.response=n.response:n.data!==null&&typeof n.data=="object"?this.response=n.data:this.response={}),this.originalError||n instanceof Wn||(this.originalError=n),typeof DOMException<"u"&&n instanceof DOMException&&(n.name=="AbortError"||n.code==20)&&(this.isAbort=!0),this.name="ClientResponseError "+this.status,this.message=(t=this.response)==null?void 0:t.message,this.message||(this.isAbort?this.message="The request was autocancelled. You can find more info in https://github.com/pocketbase/js-sdk#auto-cancellation.":(r=(o=(i=this.originalError)==null?void 0:i.cause)==null?void 0:o.message)!=null&&r.includes("ECONNREFUSED ::1")?this.message="Failed to connect to the PocketBase server. Try changing the SDK URL from localhost to 127.0.0.1 (https://github.com/pocketbase/js-sdk/issues/21).":this.message="Something went wrong."),this.cause=this.originalError}get data(){return this.response}toJSON(){return{...this}}}const au=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function Qz(e,n){const t={};if(typeof e!="string")return t;const i=Object.assign({},{}).decode||Jz;let o=0;for(;o<e.length;){const r=e.indexOf("=",o);if(r===-1)break;let s=e.indexOf(";",o);if(s===-1)s=e.length;else if(s<r){o=e.lastIndexOf(";",r-1)+1;continue}const u=e.slice(o,r).trim();if(t[u]===void 0){let l=e.slice(r+1,s).trim();l.charCodeAt(0)===34&&(l=l.slice(1,-1));try{t[u]=i(l)}catch{t[u]=l}}o=s+1}return t}function pN(e,n,t){const i=Object.assign({},t||{}),o=i.encode||Xz;if(!au.test(e))throw new TypeError("argument name is invalid");const r=o(n);if(r&&!au.test(r))throw new TypeError("argument val is invalid");let s=e+"="+r;if(i.maxAge!=null){const u=i.maxAge-0;if(isNaN(u)||!isFinite(u))throw new TypeError("option maxAge is invalid");s+="; Max-Age="+Math.floor(u)}if(i.domain){if(!au.test(i.domain))throw new TypeError("option domain is invalid");s+="; Domain="+i.domain}if(i.path){if(!au.test(i.path))throw new TypeError("option path is invalid");s+="; Path="+i.path}if(i.expires){if(!function(l){return Object.prototype.toString.call(l)==="[object Date]"||l instanceof Date}(i.expires)||isNaN(i.expires.valueOf()))throw new TypeError("option expires is invalid");s+="; Expires="+i.expires.toUTCString()}if(i.httpOnly&&(s+="; HttpOnly"),i.secure&&(s+="; Secure"),i.priority)switch(typeof i.priority=="string"?i.priority.toLowerCase():i.priority){case"low":s+="; Priority=Low";break;case"medium":s+="; Priority=Medium";break;case"high":s+="; Priority=High";break;default:throw new TypeError("option priority is invalid")}if(i.sameSite)switch(typeof i.sameSite=="string"?i.sameSite.toLowerCase():i.sameSite){case!0:s+="; SameSite=Strict";break;case"lax":s+="; SameSite=Lax";break;case"strict":s+="; SameSite=Strict";break;case"none":s+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return s}function Jz(e){return e.indexOf("%")!==-1?decodeURIComponent(e):e}function Xz(e){return encodeURIComponent(e)}const Zz=typeof navigator<"u"&&navigator.product==="ReactNative"||typeof global<"u"&&global.HermesInternal;let aN;function jr(e){if(e)try{const n=decodeURIComponent(aN(e.split(".")[1]).split("").map(function(t){return"%"+("00"+t.charCodeAt(0).toString(16)).slice(-2)}).join(""));return JSON.parse(n)||{}}catch{}return{}}function vN(e,n=0){let t=jr(e);return!(Object.keys(t).length>0&&(!t.exp||t.exp-n>Date.now()/1e3))}aN=typeof atob!="function"||Zz?e=>{let n=String(e).replace(/=+$/,"");if(n.length%4==1)throw new Error("'atob' failed: The string to be decoded is not correctly encoded.");for(var t,i,o=0,r=0,s="";i=n.charAt(r++);~i&&(t=o%4?64*t+i:i,o++%4)?s+=String.fromCharCode(255&t>>(-2*o&6)):0)i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(i);return s}:atob;const mN="pb_auth";class k_{constructor(){this.baseToken="",this.baseModel=null,this._onChangeCallbacks=[]}get token(){return this.baseToken}get record(){return this.baseModel}get model(){return this.baseModel}get isValid(){return!vN(this.token)}get isSuperuser(){var t,i;let n=jr(this.token);return n.type=="auth"&&(((t=this.record)==null?void 0:t.collectionName)=="_superusers"||!((i=this.record)!=null&&i.collectionName)&&n.collectionId=="pbc_3142635823")}get isAdmin(){return console.warn("Please replace pb.authStore.isAdmin with pb.authStore.isSuperuser OR simply check the value of pb.authStore.record?.collectionName"),this.isSuperuser}get isAuthRecord(){return console.warn("Please replace pb.authStore.isAuthRecord with !pb.authStore.isSuperuser OR simply check the value of pb.authStore.record?.collectionName"),jr(this.token).type=="auth"&&!this.isSuperuser}save(n,t){this.baseToken=n||"",this.baseModel=t||null,this.triggerChange()}clear(){this.baseToken="",this.baseModel=null,this.triggerChange()}loadFromCookie(n,t=mN){const i=Qz(n||"")[t]||"";let o={};try{o=JSON.parse(i),(typeof o===null||typeof o!="object"||Array.isArray(o))&&(o={})}catch{}this.save(o.token||"",o.record||o.model||null)}exportToCookie(n,t=mN){var l,d;const i={secure:!0,sameSite:!0,httpOnly:!0,path:"/"},o=jr(this.token);i.expires=o!=null&&o.exp?new Date(1e3*o.exp):new Date("1970-01-01"),n=Object.assign({},i,n);const r={token:this.token,record:this.record?JSON.parse(JSON.stringify(this.record)):null};let s=pN(t,JSON.stringify(r),n);const u=typeof Blob<"u"?new Blob([s]).size:s.length;if(r.record&&u>4096){r.record={id:(l=r.record)==null?void 0:l.id,email:(d=r.record)==null?void 0:d.email};const c=["collectionId","collectionName","verified"];for(const _ in this.record)c.includes(_)&&(r.record[_]=this.record[_]);s=pN(t,JSON.stringify(r),n)}return s}onChange(n,t=!1){return this._onChangeCallbacks.push(n),t&&n(this.token,this.record),()=>{for(let i=this._onChangeCallbacks.length-1;i>=0;i--)if(this._onChangeCallbacks[i]==n)return delete this._onChangeCallbacks[i],void this._onChangeCallbacks.splice(i,1)}}triggerChange(){for(const n of this._onChangeCallbacks)n&&n(this.token,this.record)}}class eY extends k_{constructor(n="pocketbase_auth"){super(),this.storageFallback={},this.storageKey=n,this._bindStorageEvent()}get token(){return(this._storageGet(this.storageKey)||{}).token||""}get record(){const n=this._storageGet(this.storageKey)||{};return n.record||n.model||null}get model(){return this.record}save(n,t){this._storageSet(this.storageKey,{token:n,record:t}),super.save(n,t)}clear(){this._storageRemove(this.storageKey),super.clear()}_storageGet(n){if(typeof window<"u"&&(window!=null&&window.localStorage)){const t=window.localStorage.getItem(n)||"";try{return JSON.parse(t)}catch{return t}}return this.storageFallback[n]}_storageSet(n,t){if(typeof window<"u"&&(window!=null&&window.localStorage)){let i=t;typeof t!="string"&&(i=JSON.stringify(t)),window.localStorage.setItem(n,i)}else this.storageFallback[n]=t}_storageRemove(n){var t;typeof window<"u"&&(window!=null&&window.localStorage)&&((t=window.localStorage)==null||t.removeItem(n)),delete this.storageFallback[n]}_bindStorageEvent(){typeof window<"u"&&(window!=null&&window.localStorage)&&window.addEventListener&&window.addEventListener("storage",n=>{if(n.key!=this.storageKey)return;const t=this._storageGet(this.storageKey)||{};super.save(t.token||"",t.record||t.model||null)})}}class Fi{constructor(n){this.client=n}}class tY extends Fi{async getAll(n){return n=Object.assign({method:"GET"},n),this.client.send("/api/settings",n)}async update(n,t){return t=Object.assign({method:"PATCH",body:n},t),this.client.send("/api/settings",t)}async testS3(n="storage",t){return t=Object.assign({method:"POST",body:{filesystem:n}},t),this.client.send("/api/settings/test/s3",t).then(()=>!0)}async testEmail(n,t,i,o){return o=Object.assign({method:"POST",body:{email:t,template:i,collection:n}},o),this.client.send("/api/settings/test/email",o).then(()=>!0)}async generateAppleClientSecret(n,t,i,o,r,s){return s=Object.assign({method:"POST",body:{clientId:n,teamId:t,keyId:i,privateKey:o,duration:r}},s),this.client.send("/api/settings/apple/generate-client-secret",s)}}const nY=["requestKey","$cancelKey","$autoCancel","fetch","headers","body","query","params","cache","credentials","headers","integrity","keepalive","method","mode","redirect","referrer","referrerPolicy","signal","window"];function L_(e){if(e){e.query=e.query||{};for(let n in e)nY.includes(n)||(e.query[n]=e[n],delete e[n])}}function hN(e){const n=[];for(const t in e){const i=encodeURIComponent(t),o=Array.isArray(e[t])?e[t]:[e[t]];for(let r of o)r=iY(r),r!==null&&n.push(i+"="+r)}return n.join("&")}function iY(e){return e==null?null:e instanceof Date?encodeURIComponent(e.toISOString().replace("T"," ")):encodeURIComponent(typeof e=="object"?JSON.stringify(e):e)}class yN extends Fi{constructor(){super(...arguments),this.clientId="",this.eventSource=null,this.subscriptions={},this.lastSentSubscriptions=[],this.maxConnectTimeout=15e3,this.reconnectAttempts=0,this.maxReconnectAttempts=1/0,this.predefinedReconnectIntervals=[200,300,500,1e3,1200,1500,2e3],this.pendingConnects=[]}get isConnected(){return!!this.eventSource&&!!this.clientId&&!this.pendingConnects.length}async subscribe(n,t,i){var s;if(!n)throw new Error("topic must be set.");let o=n;if(i){L_(i=Object.assign({},i));const u="options="+encodeURIComponent(JSON.stringify({query:i.query,headers:i.headers}));o+=(o.includes("?")?"&":"?")+u}const r=function(u){const l=u;let d;try{d=JSON.parse(l==null?void 0:l.data)}catch{}t(d||{})};return this.subscriptions[o]||(this.subscriptions[o]=[]),this.subscriptions[o].push(r),this.isConnected?this.subscriptions[o].length===1?await this.submitSubscriptions():(s=this.eventSource)==null||s.addEventListener(o,r):await this.connect(),async()=>this.unsubscribeByTopicAndListener(n,r)}async unsubscribe(n){var i;let t=!1;if(n){const o=this.getSubscriptionsByTopic(n);for(let r in o)if(this.hasSubscriptionListeners(r)){for(let s of this.subscriptions[r])(i=this.eventSource)==null||i.removeEventListener(r,s);delete this.subscriptions[r],t||(t=!0)}}else this.subscriptions={};this.hasSubscriptionListeners()?t&&await this.submitSubscriptions():this.disconnect()}async unsubscribeByPrefix(n){var i;let t=!1;for(let o in this.subscriptions)if((o+"?").startsWith(n)){t=!0;for(let r of this.subscriptions[o])(i=this.eventSource)==null||i.removeEventListener(o,r);delete this.subscriptions[o]}t&&(this.hasSubscriptionListeners()?await this.submitSubscriptions():this.disconnect())}async unsubscribeByTopicAndListener(n,t){var r;let i=!1;const o=this.getSubscriptionsByTopic(n);for(let s in o){if(!Array.isArray(this.subscriptions[s])||!this.subscriptions[s].length)continue;let u=!1;for(let l=this.subscriptions[s].length-1;l>=0;l--)this.subscriptions[s][l]===t&&(u=!0,delete this.subscriptions[s][l],this.subscriptions[s].splice(l,1),(r=this.eventSource)==null||r.removeEventListener(s,t));u&&(this.subscriptions[s].length||delete this.subscriptions[s],i||this.hasSubscriptionListeners(s)||(i=!0))}this.hasSubscriptionListeners()?i&&await this.submitSubscriptions():this.disconnect()}hasSubscriptionListeners(n){var t,i;if(this.subscriptions=this.subscriptions||{},n)return!!((t=this.subscriptions[n])!=null&&t.length);for(let o in this.subscriptions)if((i=this.subscriptions[o])!=null&&i.length)return!0;return!1}async submitSubscriptions(){if(this.clientId)return this.addAllSubscriptionListeners(),this.lastSentSubscriptions=this.getNonEmptySubscriptionKeys(),this.client.send("/api/realtime",{method:"POST",body:{clientId:this.clientId,subscriptions:this.lastSentSubscriptions},requestKey:this.getSubscriptionsCancelKey()}).catch(n=>{if(!(n!=null&&n.isAbort))throw n})}getSubscriptionsCancelKey(){return"realtime_"+this.clientId}getSubscriptionsByTopic(n){const t={};n=n.includes("?")?n:n+"?";for(let i in this.subscriptions)(i+"?").startsWith(n)&&(t[i]=this.subscriptions[i]);return t}getNonEmptySubscriptionKeys(){const n=[];for(let t in this.subscriptions)this.subscriptions[t].length&&n.push(t);return n}addAllSubscriptionListeners(){if(this.eventSource){this.removeAllSubscriptionListeners();for(let n in this.subscriptions)for(let t of this.subscriptions[n])this.eventSource.addEventListener(n,t)}}removeAllSubscriptionListeners(){if(this.eventSource)for(let n in this.subscriptions)for(let t of this.subscriptions[n])this.eventSource.removeEventListener(n,t)}async connect(){if(!(this.reconnectAttempts>0))return new Promise((n,t)=>{this.pendingConnects.push({resolve:n,reject:t}),this.pendingConnects.length>1||this.initConnect()})}initConnect(){this.disconnect(!0),clearTimeout(this.connectTimeoutId),this.connectTimeoutId=setTimeout(()=>{this.connectErrorHandler(new Error("EventSource connect took too long."))},this.maxConnectTimeout),this.eventSource=new EventSource(this.client.buildURL("/api/realtime")),this.eventSource.onerror=n=>{this.connectErrorHandler(new Error("Failed to establish realtime connection."))},this.eventSource.addEventListener("PB_CONNECT",n=>{const t=n;this.clientId=t==null?void 0:t.lastEventId,this.submitSubscriptions().then(async()=>{let i=3;for(;this.hasUnsentSubscriptions()&&i>0;)i--,await this.submitSubscriptions()}).then(()=>{for(let o of this.pendingConnects)o.resolve();this.pendingConnects=[],this.reconnectAttempts=0,clearTimeout(this.reconnectTimeoutId),clearTimeout(this.connectTimeoutId);const i=this.getSubscriptionsByTopic("PB_CONNECT");for(let o in i)for(let r of i[o])r(n)}).catch(i=>{this.clientId="",this.connectErrorHandler(i)})})}hasUnsentSubscriptions(){const n=this.getNonEmptySubscriptionKeys();if(n.length!=this.lastSentSubscriptions.length)return!0;for(const t of n)if(!this.lastSentSubscriptions.includes(t))return!0;return!1}connectErrorHandler(n){if(clearTimeout(this.connectTimeoutId),clearTimeout(this.reconnectTimeoutId),!this.clientId&&!this.reconnectAttempts||this.reconnectAttempts>this.maxReconnectAttempts){for(let i of this.pendingConnects)i.reject(new Wn(n));return this.pendingConnects=[],void this.disconnect()}this.disconnect(!0);const t=this.predefinedReconnectIntervals[this.reconnectAttempts]||this.predefinedReconnectIntervals[this.predefinedReconnectIntervals.length-1];this.reconnectAttempts++,this.reconnectTimeoutId=setTimeout(()=>{this.initConnect()},t)}disconnect(n=!1){var t;if(this.clientId&&this.onDisconnect&&this.onDisconnect(Object.keys(this.subscriptions)),clearTimeout(this.connectTimeoutId),clearTimeout(this.reconnectTimeoutId),this.removeAllSubscriptionListeners(),this.client.cancelRequest(this.getSubscriptionsCancelKey()),(t=this.eventSource)==null||t.close(),this.eventSource=null,this.clientId="",!n){this.reconnectAttempts=0;for(let i of this.pendingConnects)i.resolve();this.pendingConnects=[]}}}class gN extends Fi{decode(n){return n}async getFullList(n,t){if(typeof n=="number")return this._getFullList(n,t);let i=500;return(t=Object.assign({},n,t)).batch&&(i=t.batch,delete t.batch),this._getFullList(i,t)}async getList(n=1,t=30,i){return(i=Object.assign({method:"GET"},i)).query=Object.assign({page:n,perPage:t},i.query),this.client.send(this.baseCrudPath,i).then(o=>{var r;return o.items=((r=o.items)==null?void 0:r.map(s=>this.decode(s)))||[],o})}async getFirstListItem(n,t){return(t=Object.assign({requestKey:"one_by_filter_"+this.baseCrudPath+"_"+n},t)).query=Object.assign({filter:n,skipTotal:1},t.query),this.getList(1,1,t).then(i=>{var o;if(!((o=i==null?void 0:i.items)!=null&&o.length))throw new Wn({status:404,response:{code:404,message:"The requested resource wasn't found.",data:{}}});return i.items[0]})}async getOne(n,t){if(!n)throw new Wn({url:this.client.buildURL(this.baseCrudPath+"/"),status:404,response:{code:404,message:"Missing required record id.",data:{}}});return t=Object.assign({method:"GET"},t),this.client.send(this.baseCrudPath+"/"+encodeURIComponent(n),t).then(i=>this.decode(i))}async create(n,t){return t=Object.assign({method:"POST",body:n},t),this.client.send(this.baseCrudPath,t).then(i=>this.decode(i))}async update(n,t,i){return i=Object.assign({method:"PATCH",body:t},i),this.client.send(this.baseCrudPath+"/"+encodeURIComponent(n),i).then(o=>this.decode(o))}async delete(n,t){return t=Object.assign({method:"DELETE"},t),this.client.send(this.baseCrudPath+"/"+encodeURIComponent(n),t).then(()=>!0)}_getFullList(n=500,t){(t=t||{}).query=Object.assign({skipTotal:1},t.query);let i=[],o=async r=>this.getList(r,n||500,t).then(s=>{const u=s.items;return i=i.concat(u),u.length==s.perPage?o(r+1):i});return o(1)}}function ro(e,n,t,i){const o=i!==void 0;return o||t!==void 0?o?(console.warn(e),n.body=Object.assign({},n.body,t),n.query=Object.assign({},n.query,i),n):Object.assign(n,t):n}function U_(e){var n;(n=e._resetAutoRefresh)==null||n.call(e)}class oY extends gN{constructor(n,t){super(n),this.collectionIdOrName=t}get baseCrudPath(){return this.baseCollectionPath+"/records"}get baseCollectionPath(){return"/api/collections/"+encodeURIComponent(this.collectionIdOrName)}get isSuperusers(){return this.collectionIdOrName=="_superusers"||this.collectionIdOrName=="_pbc_2773867675"}async subscribe(n,t,i){if(!n)throw new Error("Missing topic.");if(!t)throw new Error("Missing subscription callback.");return this.client.realtime.subscribe(this.collectionIdOrName+"/"+n,t,i)}async unsubscribe(n){return n?this.client.realtime.unsubscribe(this.collectionIdOrName+"/"+n):this.client.realtime.unsubscribeByPrefix(this.collectionIdOrName)}async getFullList(n,t){if(typeof n=="number")return super.getFullList(n,t);const i=Object.assign({},n,t);return super.getFullList(i)}async getList(n=1,t=30,i){return super.getList(n,t,i)}async getFirstListItem(n,t){return super.getFirstListItem(n,t)}async getOne(n,t){return super.getOne(n,t)}async create(n,t){return super.create(n,t)}async update(n,t,i){return super.update(n,t,i).then(o=>{var r,s,u;if(((r=this.client.authStore.record)==null?void 0:r.id)===(o==null?void 0:o.id)&&(((s=this.client.authStore.record)==null?void 0:s.collectionId)===this.collectionIdOrName||((u=this.client.authStore.record)==null?void 0:u.collectionName)===this.collectionIdOrName)){let l=Object.assign({},this.client.authStore.record.expand),d=Object.assign({},this.client.authStore.record,o);l&&(d.expand=Object.assign(l,o.expand)),this.client.authStore.save(this.client.authStore.token,d)}return o})}async delete(n,t){return super.delete(n,t).then(i=>{var o,r,s;return!i||((o=this.client.authStore.record)==null?void 0:o.id)!==n||((r=this.client.authStore.record)==null?void 0:r.collectionId)!==this.collectionIdOrName&&((s=this.client.authStore.record)==null?void 0:s.collectionName)!==this.collectionIdOrName||this.client.authStore.clear(),i})}authResponse(n){const t=this.decode((n==null?void 0:n.record)||{});return this.client.authStore.save(n==null?void 0:n.token,t),Object.assign({},n,{token:(n==null?void 0:n.token)||"",record:t})}async listAuthMethods(n){return n=Object.assign({method:"GET",fields:"mfa,otp,password,oauth2"},n),this.client.send(this.baseCollectionPath+"/auth-methods",n)}async authWithPassword(n,t,i){let o;i=Object.assign({method:"POST",body:{identity:n,password:t}},i),this.isSuperusers&&(o=i.autoRefreshThreshold,delete i.autoRefreshThreshold,i.autoRefresh||U_(this.client));let r=await this.client.send(this.baseCollectionPath+"/auth-with-password",i);return r=this.authResponse(r),o&&this.isSuperusers&&function(u,l,d,c){U_(u);const _=u.beforeSend,f=u.authStore.record,p=u.authStore.onChange((a,v)=>{(!a||(v==null?void 0:v.id)!=(f==null?void 0:f.id)||(v!=null&&v.collectionId||f!=null&&f.collectionId)&&(v==null?void 0:v.collectionId)!=(f==null?void 0:f.collectionId))&&U_(u)});u._resetAutoRefresh=function(){p(),u.beforeSend=_,delete u._resetAutoRefresh},u.beforeSend=async(a,v)=>{var y;const m=u.authStore.token;if((y=v.query)!=null&&y.autoRefresh)return _?_(a,v):{url:a,sendOptions:v};let g=u.authStore.isValid;if(g&&vN(u.authStore.token,l))try{await d()}catch{g=!1}g||await c();const E=v.headers||{};for(let S in E)if(S.toLowerCase()=="authorization"&&m==E[S]&&u.authStore.token){E[S]=u.authStore.token;break}return v.headers=E,_?_(a,v):{url:a,sendOptions:v}}}(this.client,o,()=>this.authRefresh({autoRefresh:!0}),()=>this.authWithPassword(n,t,Object.assign({autoRefresh:!0},i))),r}async authWithOAuth2Code(n,t,i,o,r,s,u){let l={method:"POST",body:{provider:n,code:t,codeVerifier:i,redirectURL:o,createData:r}};return l=ro("This form of authWithOAuth2Code(provider, code, codeVerifier, redirectURL, createData?, body?, query?) is deprecated. Consider replacing it with authWithOAuth2Code(provider, code, codeVerifier, redirectURL, createData?, options?).",l,s,u),this.client.send(this.baseCollectionPath+"/auth-with-oauth2",l).then(d=>this.authResponse(d))}authWithOAuth2(...n){if(n.length>1||typeof(n==null?void 0:n[0])=="string")return console.warn("PocketBase: This form of authWithOAuth2() is deprecated and may get removed in the future. Please replace with authWithOAuth2Code() OR use the authWithOAuth2() realtime form as shown in https://pocketbase.io/docs/authentication/#oauth2-integration."),this.authWithOAuth2Code((n==null?void 0:n[0])||"",(n==null?void 0:n[1])||"",(n==null?void 0:n[2])||"",(n==null?void 0:n[3])||"",(n==null?void 0:n[4])||{},(n==null?void 0:n[5])||{},(n==null?void 0:n[6])||{});const t=(n==null?void 0:n[0])||{};let i=null;t.urlCallback||(i=EN(void 0));const o=new yN(this.client);function r(){i==null||i.close(),o.unsubscribe()}const s={},u=t.requestKey;return u&&(s.requestKey=u),this.listAuthMethods(s).then(l=>{var f;const d=l.oauth2.providers.find(p=>p.name===t.provider);if(!d)throw new Wn(new Error(`Missing or invalid provider "${t.provider}".`));const c=this.client.buildURL("/api/oauth2-redirect"),_=u?(f=this.client.cancelControllers)==null?void 0:f[u]:void 0;return _&&(_.signal.onabort=()=>{r()}),new Promise(async(p,a)=>{var v;try{await o.subscribe("@oauth2",async y=>{var C;const S=o.clientId;try{if(!y.state||S!==y.state)throw new Error("State parameters don't match.");if(y.error||!y.code)throw new Error("OAuth2 redirect error or missing code: "+y.error);const T=Object.assign({},t);delete T.provider,delete T.scopes,delete T.createData,delete T.urlCallback,(C=_==null?void 0:_.signal)!=null&&C.onabort&&(_.signal.onabort=null);const R=await this.authWithOAuth2Code(d.name,y.code,d.codeVerifier,c,t.createData,T);p(R)}catch(T){a(new Wn(T))}r()});const m={state:o.clientId};(v=t.scopes)!=null&&v.length&&(m.scope=t.scopes.join(" "));const g=this._replaceQueryParams(d.authURL+c,m);await(t.urlCallback||function(y){i?i.location.href=y:i=EN(y)})(g)}catch(m){r(),a(new Wn(m))}})}).catch(l=>{throw r(),l})}async authRefresh(n,t){let i={method:"POST"};return i=ro("This form of authRefresh(body?, query?) is deprecated. Consider replacing it with authRefresh(options?).",i,n,t),this.client.send(this.baseCollectionPath+"/auth-refresh",i).then(o=>this.authResponse(o))}async requestPasswordReset(n,t,i){let o={method:"POST",body:{email:n}};return o=ro("This form of requestPasswordReset(email, body?, query?) is deprecated. Consider replacing it with requestPasswordReset(email, options?).",o,t,i),this.client.send(this.baseCollectionPath+"/request-password-reset",o).then(()=>!0)}async confirmPasswordReset(n,t,i,o,r){let s={method:"POST",body:{token:n,password:t,passwordConfirm:i}};return s=ro("This form of confirmPasswordReset(token, password, passwordConfirm, body?, query?) is deprecated. Consider replacing it with confirmPasswordReset(token, password, passwordConfirm, options?).",s,o,r),this.client.send(this.baseCollectionPath+"/confirm-password-reset",s).then(()=>!0)}async requestVerification(n,t,i){let o={method:"POST",body:{email:n}};return o=ro("This form of requestVerification(email, body?, query?) is deprecated. Consider replacing it with requestVerification(email, options?).",o,t,i),this.client.send(this.baseCollectionPath+"/request-verification",o).then(()=>!0)}async confirmVerification(n,t,i){let o={method:"POST",body:{token:n}};return o=ro("This form of confirmVerification(token, body?, query?) is deprecated. Consider replacing it with confirmVerification(token, options?).",o,t,i),this.client.send(this.baseCollectionPath+"/confirm-verification",o).then(()=>{const r=jr(n),s=this.client.authStore.record;return s&&!s.verified&&s.id===r.id&&s.collectionId===r.collectionId&&(s.verified=!0,this.client.authStore.save(this.client.authStore.token,s)),!0})}async requestEmailChange(n,t,i){let o={method:"POST",body:{newEmail:n}};return o=ro("This form of requestEmailChange(newEmail, body?, query?) is deprecated. Consider replacing it with requestEmailChange(newEmail, options?).",o,t,i),this.client.send(this.baseCollectionPath+"/request-email-change",o).then(()=>!0)}async confirmEmailChange(n,t,i,o){let r={method:"POST",body:{token:n,password:t}};return r=ro("This form of confirmEmailChange(token, password, body?, query?) is deprecated. Consider replacing it with confirmEmailChange(token, password, options?).",r,i,o),this.client.send(this.baseCollectionPath+"/confirm-email-change",r).then(()=>{const s=jr(n),u=this.client.authStore.record;return u&&u.id===s.id&&u.collectionId===s.collectionId&&this.client.authStore.clear(),!0})}async listExternalAuths(n,t){return this.client.collection("_externalAuths").getFullList(Object.assign({},t,{filter:this.client.filter("recordRef = {:id}",{id:n})}))}async unlinkExternalAuth(n,t,i){const o=await this.client.collection("_externalAuths").getFirstListItem(this.client.filter("recordRef = {:recordId} && provider = {:provider}",{recordId:n,provider:t}));return this.client.collection("_externalAuths").delete(o.id,i).then(()=>!0)}async requestOTP(n,t){return t=Object.assign({method:"POST",body:{email:n}},t),this.client.send(this.baseCollectionPath+"/request-otp",t)}async authWithOTP(n,t,i){return i=Object.assign({method:"POST",body:{otpId:n,password:t}},i),this.client.send(this.baseCollectionPath+"/auth-with-otp",i).then(o=>this.authResponse(o))}async impersonate(n,t,i){(i=Object.assign({method:"POST",body:{duration:t}},i)).headers=i.headers||{},i.headers.Authorization||(i.headers.Authorization=this.client.authStore.token);const o=new bN(this.client.baseURL,new k_,this.client.lang),r=await o.send(this.baseCollectionPath+"/impersonate/"+encodeURIComponent(n),i);return o.authStore.save(r==null?void 0:r.token,this.decode((r==null?void 0:r.record)||{})),o}_replaceQueryParams(n,t={}){let i=n,o="";n.indexOf("?")>=0&&(i=n.substring(0,n.indexOf("?")),o=n.substring(n.indexOf("?")+1));const r={},s=o.split("&");for(const u of s){if(u=="")continue;const l=u.split("=");r[decodeURIComponent(l[0].replace(/\+/g," "))]=decodeURIComponent((l[1]||"").replace(/\+/g," "))}for(let u in t)t.hasOwnProperty(u)&&(t[u]==null?delete r[u]:r[u]=t[u]);o="";for(let u in r)r.hasOwnProperty(u)&&(o!=""&&(o+="&"),o+=encodeURIComponent(u.replace(/%20/g,"+"))+"="+encodeURIComponent(r[u].replace(/%20/g,"+")));return o!=""?i+"?"+o:i}}function EN(e){if(typeof window>"u"||!(window!=null&&window.open))throw new Wn(new Error("Not in a browser context - please pass a custom urlCallback function."));let n=1024,t=768,i=window.innerWidth,o=window.innerHeight;n=n>i?i:n,t=t>o?o:t;let r=i/2-n/2,s=o/2-t/2;return window.open(e,"popup_window","width="+n+",height="+t+",top="+s+",left="+r+",resizable,menubar=no")}class rY extends gN{get baseCrudPath(){return"/api/collections"}async import(n,t=!1,i){return i=Object.assign({method:"PUT",body:{collections:n,deleteMissing:t}},i),this.client.send(this.baseCrudPath+"/import",i).then(()=>!0)}async getScaffolds(n){return n=Object.assign({method:"GET"},n),this.client.send(this.baseCrudPath+"/meta/scaffolds",n)}async truncate(n,t){return t=Object.assign({method:"DELETE"},t),this.client.send(this.baseCrudPath+"/"+encodeURIComponent(n)+"/truncate",t).then(()=>!0)}}class sY extends Fi{async getList(n=1,t=30,i){return(i=Object.assign({method:"GET"},i)).query=Object.assign({page:n,perPage:t},i.query),this.client.send("/api/logs",i)}async getOne(n,t){if(!n)throw new Wn({url:this.client.buildURL("/api/logs/"),status:404,response:{code:404,message:"Missing required log id.",data:{}}});return t=Object.assign({method:"GET"},t),this.client.send("/api/logs/"+encodeURIComponent(n),t)}async getStats(n){return n=Object.assign({method:"GET"},n),this.client.send("/api/logs/stats",n)}}class lY extends Fi{async check(n){return n=Object.assign({method:"GET"},n),this.client.send("/api/health",n)}}class uY extends Fi{getUrl(n,t,i={}){return console.warn("Please replace pb.files.getUrl() with pb.files.getURL()"),this.getURL(n,t,i)}getURL(n,t,i={}){if(!t||!(n!=null&&n.id)||!(n!=null&&n.collectionId)&&!(n!=null&&n.collectionName))return"";const o=[];o.push("api"),o.push("files"),o.push(encodeURIComponent(n.collectionId||n.collectionName)),o.push(encodeURIComponent(n.id)),o.push(encodeURIComponent(t));let r=this.client.buildURL(o.join("/"));if(Object.keys(i).length){i.download===!1&&delete i.download;const s=new URLSearchParams(i);r+=(r.includes("?")?"&":"?")+s}return r}async getToken(n){return n=Object.assign({method:"POST"},n),this.client.send("/api/files/token",n).then(t=>(t==null?void 0:t.token)||"")}}class dY extends Fi{async getFullList(n){return n=Object.assign({method:"GET"},n),this.client.send("/api/backups",n)}async create(n,t){return t=Object.assign({method:"POST",body:{name:n}},t),this.client.send("/api/backups",t).then(()=>!0)}async upload(n,t){return t=Object.assign({method:"POST",body:n},t),this.client.send("/api/backups/upload",t).then(()=>!0)}async delete(n,t){return t=Object.assign({method:"DELETE"},t),this.client.send(`/api/backups/${encodeURIComponent(n)}`,t).then(()=>!0)}async restore(n,t){return t=Object.assign({method:"POST"},t),this.client.send(`/api/backups/${encodeURIComponent(n)}/restore`,t).then(()=>!0)}getDownloadUrl(n,t){return console.warn("Please replace pb.backups.getDownloadUrl() with pb.backups.getDownloadURL()"),this.getDownloadURL(n,t)}getDownloadURL(n,t){return this.client.buildURL(`/api/backups/${encodeURIComponent(t)}?token=${encodeURIComponent(n)}`)}}class cY extends Fi{async getFullList(n){return n=Object.assign({method:"GET"},n),this.client.send("/api/crons",n)}async run(n,t){return t=Object.assign({method:"POST"},t),this.client.send(`/api/crons/${encodeURIComponent(n)}`,t).then(()=>!0)}}function B_(e){return typeof Blob<"u"&&e instanceof Blob||typeof File<"u"&&e instanceof File||e!==null&&typeof e=="object"&&e.uri&&(typeof navigator<"u"&&navigator.product==="ReactNative"||typeof global<"u"&&global.HermesInternal)}function j_(e){var n;return e&&(((n=e.constructor)==null?void 0:n.name)==="FormData"||typeof FormData<"u"&&e instanceof FormData)}function TN(e){for(const n in e){const t=Array.isArray(e[n])?e[n]:[e[n]];for(const i of t)if(B_(i))return!0}return!1}const _Y=/^[\-\.\d]+$/;function SN(e){if(typeof e!="string")return e;if(e=="true")return!0;if(e=="false")return!1;if((e[0]==="-"||e[0]>="0"&&e[0]<="9")&&_Y.test(e)){let n=+e;if(""+n===e)return n}return e}class fY extends Fi{constructor(){super(...arguments),this.requests=[],this.subs={}}collection(n){return this.subs[n]||(this.subs[n]=new pY(this.requests,n)),this.subs[n]}async send(n){const t=new FormData,i=[];for(let o=0;o<this.requests.length;o++){const r=this.requests[o];if(i.push({method:r.method,url:r.url,headers:r.headers,body:r.json}),r.files)for(let s in r.files){const u=r.files[s]||[];for(let l of u)t.append("requests."+o+"."+s,l)}}return t.append("@jsonPayload",JSON.stringify({requests:i})),n=Object.assign({method:"POST",body:t},n),this.client.send("/api/batch",n)}}class pY{constructor(n,t){this.requests=[],this.requests=n,this.collectionIdOrName=t}upsert(n,t){t=Object.assign({body:n||{}},t);const i={method:"PUT",url:"/api/collections/"+encodeURIComponent(this.collectionIdOrName)+"/records"};this.prepareRequest(i,t),this.requests.push(i)}create(n,t){t=Object.assign({body:n||{}},t);const i={method:"POST",url:"/api/collections/"+encodeURIComponent(this.collectionIdOrName)+"/records"};this.prepareRequest(i,t),this.requests.push(i)}update(n,t,i){i=Object.assign({body:t||{}},i);const o={method:"PATCH",url:"/api/collections/"+encodeURIComponent(this.collectionIdOrName)+"/records/"+encodeURIComponent(n)};this.prepareRequest(o,i),this.requests.push(o)}delete(n,t){t=Object.assign({},t);const i={method:"DELETE",url:"/api/collections/"+encodeURIComponent(this.collectionIdOrName)+"/records/"+encodeURIComponent(n)};this.prepareRequest(i,t),this.requests.push(i)}prepareRequest(n,t){if(L_(t),n.headers=t.headers,n.json={},n.files={},t.query!==void 0){const o=hN(t.query);o&&(n.url+=(n.url.includes("?")?"&":"?")+o)}let i=t.body;j_(i)&&(i=function(r){let s={};return r.forEach((u,l)=>{if(l==="@jsonPayload"&&typeof u=="string")try{let d=JSON.parse(u);Object.assign(s,d)}catch(d){console.warn("@jsonPayload error:",d)}else s[l]!==void 0?(Array.isArray(s[l])||(s[l]=[s[l]]),s[l].push(SN(u))):s[l]=SN(u)}),s}(i));for(const o in i){const r=i[o];if(B_(r))n.files[o]=n.files[o]||[],n.files[o].push(r);else if(Array.isArray(r)){const s=[],u=[];for(const l of r)B_(l)?s.push(l):u.push(l);if(s.length>0&&s.length==r.length){n.files[o]=n.files[o]||[];for(let l of s)n.files[o].push(l)}else if(n.json[o]=u,s.length>0){let l=o;o.startsWith("+")||o.endsWith("+")||(l+="+"),n.files[l]=n.files[l]||[];for(let d of s)n.files[l].push(d)}}else n.json[o]=r}}}class bN{get baseUrl(){return this.baseURL}set baseUrl(n){this.baseURL=n}constructor(n="/",t,i="en-US"){this.cancelControllers={},this.recordServices={},this.enableAutoCancellation=!0,this.baseURL=n,this.lang=i,t?this.authStore=t:typeof window<"u"&&window.Deno?this.authStore=new k_:this.authStore=new eY,this.collections=new rY(this),this.files=new uY(this),this.logs=new sY(this),this.settings=new tY(this),this.realtime=new yN(this),this.health=new lY(this),this.backups=new dY(this),this.crons=new cY(this)}get admins(){return this.collection("_superusers")}createBatch(){return new fY(this)}collection(n){return this.recordServices[n]||(this.recordServices[n]=new oY(this,n)),this.recordServices[n]}autoCancellation(n){return this.enableAutoCancellation=!!n,this}cancelRequest(n){return this.cancelControllers[n]&&(this.cancelControllers[n].abort(),delete this.cancelControllers[n]),this}cancelAllRequests(){for(let n in this.cancelControllers)this.cancelControllers[n].abort();return this.cancelControllers={},this}filter(n,t){if(!t)return n;for(let i in t){let o=t[i];switch(typeof o){case"boolean":case"number":o=""+o;break;case"string":o="'"+o.replace(/'/g,"\\'")+"'";break;default:o=o===null?"null":o instanceof Date?"'"+o.toISOString().replace("T"," ")+"'":"'"+JSON.stringify(o).replace(/'/g,"\\'")+"'"}n=n.replaceAll("{:"+i+"}",o)}return n}getFileUrl(n,t,i={}){return console.warn("Please replace pb.getFileUrl() with pb.files.getURL()"),this.files.getURL(n,t,i)}buildUrl(n){return console.warn("Please replace pb.buildUrl() with pb.buildURL()"),this.buildURL(n)}buildURL(n){var i;let t=this.baseURL;return typeof window>"u"||!window.location||t.startsWith("https://")||t.startsWith("http://")||(t=(i=window.location.origin)!=null&&i.endsWith("/")?window.location.origin.substring(0,window.location.origin.length-1):window.location.origin||"",this.baseURL.startsWith("/")||(t+=window.location.pathname||"/",t+=t.endsWith("/")?"":"/"),t+=this.baseURL),n&&(t+=t.endsWith("/")?"":"/",t+=n.startsWith("/")?n.substring(1):n),t}async send(n,t){t=this.initSendOptions(n,t);let i=this.buildURL(n);if(this.beforeSend){const o=Object.assign({},await this.beforeSend(i,t));o.url!==void 0||o.options!==void 0?(i=o.url||i,t=o.options||t):Object.keys(o).length&&(t=o,console!=null&&console.warn&&console.warn("Deprecated format of beforeSend return: please use `return { url, options }`, instead of `return options`."))}if(t.query!==void 0){const o=hN(t.query);o&&(i+=(i.includes("?")?"&":"?")+o),delete t.query}return this.getHeader(t.headers,"Content-Type")=="application/json"&&t.body&&typeof t.body!="string"&&(t.body=JSON.stringify(t.body)),(t.fetch||fetch)(i,t).then(async o=>{var s;let r={};try{r=await o.json()}catch(u){if((s=t.signal)!=null&&s.aborted||typeof DOMException<"u"&&u instanceof DOMException&&(u.name=="AbortError"||u.code==20))throw u}if(this.afterSend&&(r=await this.afterSend(o,r,t)),o.status>=400)throw new Wn({url:o.url,status:o.status,data:r});return r}).catch(o=>{throw new Wn(o)})}initSendOptions(n,t){if((t=Object.assign({method:"GET"},t)).body=function(o){if(typeof FormData>"u"||o===void 0||typeof o!="object"||o===null||j_(o)||!TN(o))return o;const r=new FormData;for(const s in o){const u=o[s];if(u!==void 0)if(typeof u!="object"||TN({data:u})){const l=Array.isArray(u)?u:[u];for(let d of l)r.append(s,d)}else{let l={};l[s]=u,r.append("@jsonPayload",JSON.stringify(l))}}return r}(t.body),L_(t),t.query=Object.assign({},t.params,t.query),t.requestKey===void 0&&(t.$autoCancel===!1||t.query.$autoCancel===!1?t.requestKey=null:(t.$cancelKey||t.query.$cancelKey)&&(t.requestKey=t.$cancelKey||t.query.$cancelKey)),delete t.$autoCancel,delete t.query.$autoCancel,delete t.$cancelKey,delete t.query.$cancelKey,this.getHeader(t.headers,"Content-Type")!==null||j_(t.body)||(t.headers=Object.assign({},t.headers,{"Content-Type":"application/json"})),this.getHeader(t.headers,"Accept-Language")===null&&(t.headers=Object.assign({},t.headers,{"Accept-Language":this.lang})),this.authStore.token&&this.getHeader(t.headers,"Authorization")===null&&(t.headers=Object.assign({},t.headers,{Authorization:this.authStore.token})),this.enableAutoCancellation&&t.requestKey!==null){const i=t.requestKey||(t.method||"GET")+n;delete t.requestKey,this.cancelRequest(i);const o=new AbortController;this.cancelControllers[i]=o,t.signal=o.signal}return t}getHeader(n,t){n=n||{},t=t.toLowerCase();for(let i in n)if(i.toLowerCase()==t)return n[i];return null}}const IN=new bN("https://gap-calendar-log.gci-app.dtsmart.dev/"),aY=async e=>{await IN.collection("go_chat_service").create(e)},vY=async e=>{try{const n=await IN.collection("go_chat_service").getFirstListItem(`tenant_id="${e}"`);return!0}catch{return!1}},V_=h.ref(!1);function mY(){const e="notifyIdAppointment",n=async r=>{try{if(V_.value=!1,(await Lj(r.props)).tenant_error){const u=await i()}await t(r.props,r.response),await Uc()}catch(s){console.log(s)}finally{V_.value=!0}},t=async(r,s)=>{var u,l,d,c;await Kj(),((u=Fe.value)==null?void 0:u.user_type)=="tenant"&&(await Wj(),Fe.value&&(Fe.value.has_business_tenant_phone=await vY((l=Fe.value)==null?void 0:l.tenant_id))),zl(aR+((d=Fe.value)==null?void 0:d.id)),yr(aR+((c=Fe.value)==null?void 0:c.id)),s=="mobile"?In(He.CHAT_LIST):In(He.HOME)},i=async()=>{try{const r=window.location.search,s=new URLSearchParams(r),u=s.get("tenant_id")||"",l=s.get("phone")||"",d=s.get("message")||"",c=s.get("customer_name")||"",_=s.get("business_name")||"";return!u||!l||!d||!c||!_?{client_error:!0}:(await Yj({tenant_id:u,phone:l,message:d,customer_name:c,business_name:_}),o(),{})}catch(r){return console.log(r),{client_error:!0}}finally{}},o=()=>{const r=new URL(window.location.href);r.search="",window.history.replaceState({},document.title,r)};return{NOTIFY_ID_APPOINTMENT_NAME:e,initPage:n}}const hY={class:"m-auto w-max"},yY={class:"flex gap-4"},gY=h.defineComponent({__name:"Error",setup(e){const n=()=>window.location.reload();return(t,i)=>(h.openBlock(),h.createElementBlock("div",hY,[i[2]||(i[2]=h.createElementVNode("h1",{class:"font-bold text-chat-haze-900 text-center mb-2",style:{"font-size":"56px"}}," 404 ",-1)),i[3]||(i[3]=h.createElementVNode("p",{class:"text-chat-haze-500 text-center mb-8",style:{"font-size":"20px"}}," Page not found. ",-1)),h.createElementVNode("div",yY,[h.createElementVNode("button",{onClick:i[0]||(i[0]=o=>n()),class:"px-6 py-2 bg-[#004AB3] text-white rounded-lg"}," Try Again "),h.createElementVNode("button",{onClick:i[1]||(i[1]=o=>h.unref(vR)()),class:"px-6 py-2 bg-[#004AB3] text-white rounded-lg"}," Logout ")])]))}}),EY={},TY={width:"32",height:"32",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function SY(e,n){return h.openBlock(),h.createElementBlock("svg",TY,n[0]||(n[0]=[h.createElementVNode("path",{d:"M3 6.5C3 14.5081 9.49187 21 17.5 21C18.166 21 18.8216 20.9551 19.4637 20.8682C20.3747 20.7448 21 19.9292 21 19.01V16.4415C21 15.5807 20.4491 14.8164 19.6325 14.5442L16.4841 13.4947C15.6836 13.2279 14.8252 13.699 14.6206 14.5177C14.3475 15.6102 12.987 15.987 12.1907 15.1907L8.80926 11.8093C8.01301 11.013 8.38984 9.65254 9.48229 9.37943C10.301 9.17476 10.7721 8.31644 10.5053 7.51586L9.45585 4.36754C9.18362 3.55086 8.41934 3 7.55848 3H4.99004C4.0708 3 3.25518 3.62533 3.13185 4.53627C3.0449 5.17845 3 5.83398 3 6.5Z",stroke:"currentColor","stroke-width":"1.5","stroke-linejoin":"round"},null,-1),h.createElementVNode("path",{d:"M21 3L15.5 8.5",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),h.createElementVNode("path",{d:"M15 5V8.5V8.5C15 8.77614 15.2239 9 15.5 9V9H19",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]))}const bY=Et(EY,[["render",SY]]),CN="https://web-socket.dev01.dtsmart.dev",IY=async e=>{const n=CN+"/ws/download-record",t=await fetch(n,{method:"POST",body:JSON.stringify({url:e}),headers:{"Content-Type":"application/json"}});if(!t.ok)throw new Error(`Response status: ${t.status}`);const i=await t.blob(),o=window.URL.createObjectURL(i),r=document.createElement("a");r.href=o,r.download="recording.mp3",r.click(),r.remove()},CY=async()=>{var i,o;const e=CN+"/ws/generate-token",n=await fetch(e,{method:"POST",body:JSON.stringify({username:(o=(i=Fe.value)==null?void 0:i.id)==null?void 0:o.toString()}),headers:{"Content-Type":"application/json"}});if(!n.ok)throw new Error(`Response status: ${n.status}`);const t=await n.json();return t==null?void 0:t.accessToken},AY={class:"relative w-full h-full"},RY={class:"edit-scrollbar grow overflow-auto w-full min-w-full drawer-content"},MY=Et(h.defineComponent({__name:"DrawerBaseCustom",props:{showTitle:{type:Boolean,default:!0},position:{default:"right"},width:{default:550},responsive:{},disabledClose:{type:Boolean},absolute:{type:Boolean}},emits:["update:modelValue","afterClose"],setup(e,{expose:n,emit:t}){const i=e,o=t,r=h.ref(!1),s=h.computed(()=>{let d="";return r.value?d="translateX(0)":i.position==="right"?d="translateX(100%)":i.position==="left"&&(d="translateX(-100%)"),{width:i.responsive=="mobile"?"100%":i.width+"px",[i.position]:"0",transform:d}}),u=()=>{r.value=!0},l=async()=>{await o("afterClose"),r.value=!1};return n({close:l,open:u}),(d,c)=>(h.openBlock(),h.createElementBlock("div",{class:h.normalizeClass(["top-0 bottom-0 right-0 left-0 z-[1500] drawer",{"opacity-1":r.value,"pointer-events-none opacity-0 delay-300":!r.value,absolute:d.absolute,fixed:!d.absolute}])},[d.disabledClose?h.createCommentVNode("",!0):(h.openBlock(),h.createElementBlock("div",{key:0,class:"absolute w-full h-full z-[1500]",onClick:l,onTouchstart:h.withModifiers(l,["prevent"])},null,32)),h.createElementVNode("div",AY,[h.createElementVNode("div",{class:"duration-300 ease-out absolute top-0 bg-white flex flex-col drawer-box",style:h.normalizeStyle(s.value)},[h.createElementVNode("div",RY,[h.renderSlot(d.$slots,"content",{},()=>[c[0]||(c[0]=h.createElementVNode("div",{class:"flex p-4 content"},[h.createElementVNode("p")],-1))],!0)])],4)])],2))}}),[["__scopeId","data-v-b581d868"]]),AN=(e,n="1")=>{let t=e.replace(/\D/g,"");return t!=null&&t.startsWith(n)?t.slice(n.length):t},NY={},OY={width:"32",height:"32",viewBox:"0 0 24 24",id:"Layer_1","data-name":"Layer 1",xmlns:"http://www.w3.org/2000/svg"};function wY(e,n){return h.openBlock(),h.createElementBlock("svg",OY,n[0]||(n[0]=[h.createStaticVNode('<line class="cls-1" x1="12" y1="11.05" x2="12" y2="18.68" data-v-e06799fb></line><line class="cls-1" x1="15.82" y1="12.95" x2="15.82" y2="16.77" data-v-e06799fb></line><line class="cls-1" x1="8.18" y1="12.95" x2="8.18" y2="16.77" data-v-e06799fb></line><polygon class="cls-1" points="20.59 6.27 20.59 22.5 3.41 22.5 3.41 1.5 15.82 1.5 20.59 6.27" data-v-e06799fb></polygon><polygon class="cls-1" points="20.59 6.27 20.59 7.23 14.86 7.23 14.86 1.5 15.82 1.5 20.59 6.27" data-v-e06799fb></polygon>',5)]))}const xY=Et(NY,[["render",wY],["__scopeId","data-v-e06799fb"]]),PY={},DY={width:"32",height:"32",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function kY(e,n){return h.openBlock(),h.createElementBlock("svg",DY,n[0]||(n[0]=[h.createElementVNode("g",{id:"Menu / Close_MD"},[h.createElementVNode("path",{id:"Vector",d:"M18 18L12 12M12 12L6 6M12 12L18 6M12 12L6 18",stroke:"#000000","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)]))}const LY=Et(PY,[["render",kY]]);function UY(e){var n={debug:"ALL",deviceParams:{micEnabled:!0,audioConstraints:{audio:!0,video:!1}}},t=null;let i="",o=null,r=null;const s=async T=>{var R,O,B,j,I,A,M,w,x;try{t||(t=new window.Plivo(n)),(O=(R=t==null?void 0:t.client)==null?void 0:R.on)==null||O.call(R,"onCallAnswered",V=>{c(V)}),(j=(B=t==null?void 0:t.client)==null?void 0:B.on)==null||j.call(B,"onCallTerminated",(V,L)=>_(V,L)),t.client.on("onCallFailed",(V,L)=>{y(V,L)}),t.client.on("onIncomingCallCanceled",V=>{S(V)}),(A=(I=t==null?void 0:t.client)==null?void 0:I.on)==null||A.call(I,"onIncomingCall",(V,L,D)=>{l(D)}),t.client.on("onCallRemoteRinging",V=>d(V)),t.client.on("onMediaPermission",V=>C(V)),(w=(M=t==null?void 0:t.client)==null?void 0:M.on)==null||w.call(M,"onLoginFailed",V=>u(V));const k=JSON.parse(atob(T.split(".")[1]));await((x=t==null?void 0:t.client)==null?void 0:x.loginWithAccessToken(T))}catch(k){console.log("Login error: "+k)}},u=T=>{console.log("Login failed",T)},l=T=>{console.log(T);const R={phone:f(T.src)};e(Ye.RINGING,R),i=T==null?void 0:T.callUUID},d=T=>{i=T.callUUID,e(Ye.CALLING),o==null||o()},c=T=>{T.callUUID==i&&(o==null||o(),e(Ye.CALL_START))},_=(T,R)=>{console.log(T,R),i===R.callUUID&&(e(Ye.CALL_END,{message:T==null?void 0:T.reason}),i="")},f=(T,R="1")=>{let O=T.replace(/[^0-9]/g,"");return O!=null&&O.startsWith(R)?O.slice(R.toString().length):O},p=(T=3e3)=>new Promise((R,O)=>{o=null;const B=setTimeout(()=>{O("Time out error!"),o=null,r=null},T);o=()=>{R(!0),o=null,clearTimeout(B)},r=j=>{O(j),r=null,clearTimeout(B)}}),a=async()=>{var T,R;(R=(T=t==null?void 0:t.client)==null?void 0:T.answer)==null||R.call(T,i),await p(3e3)},v=()=>{var T,R;(R=(T=t==null?void 0:t.client)==null?void 0:T.reject)==null||R.call(T,i)},m=T=>{var R,O,B,j,I;(R=t==null?void 0:t.client)==null||R.mute(),T?(B=(O=t==null?void 0:t.client)==null?void 0:O.mute)==null||B.call(O):(I=(j=t==null?void 0:t.client)==null?void 0:j.unmute)==null||I.call(j)},g=async T=>{t.client.call("+"+T,{number_phone:T}),await p(5e3)},E=T=>{var R,O,B,j;T==Ye.RINGING?(O=(R=t==null?void 0:t.client)==null?void 0:R.reject)==null||O.call(R,i):(T==Ye.CALL_START||T==Ye.CALLING)&&((j=(B=t==null?void 0:t.client)==null?void 0:B.hangup)==null||j.call(B))},y=(T,R)=>{console.log("handleCallFailed",T),r&&(r==null||r(T)),e(Ye.CALL_END,{message:T}),T=="User Denied Media Access"&&alert("Microphone access is blocked. Please enable the microphone permission to make a call.")},S=T=>{e(Ye.CALL_END,{reason:T.reason??""})},C=T=>{console.log("MediaPermission",T)};return{plivoLogin:s,plivoCallAnswer:a,plivoCallReject:v,plivoCall:g,plivoEndCall:E,plivoCallSwishMute:m}}const BY={width:"32",height:"32",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},jY={width:"32",height:"32",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},VY=h.defineComponent({__name:"IconMic",props:{mute:{type:Boolean,default:!1}},setup(e){return(n,t)=>(h.openBlock(),h.createElementBlock(h.Fragment,null,[h.withDirectives((h.openBlock(),h.createElementBlock("svg",BY,t[0]||(t[0]=[h.createStaticVNode('<path d="M9.40135 12.5C9.63354 12.9014 9.95606 13.244 10.3411 13.5M9.17071 4C9.58254 2.83481 10.6938 2 12 2C13.6569 2 15 3.34315 15 5L15 10.5" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path><path d="M6 11C6 14.3137 8.68629 17 12 17C12.4675 17 12.9225 16.9465 13.3592 16.8454M18 11C18 11.854 17.8216 12.6663 17.5 13.4017" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path><line x1="12" y1="18" x2="12" y2="20" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></line><line x1="10" y1="21" x2="14" y2="21" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></line><line x1="2.4137" y1="2.03821" x2="19.0382" y2="19.5863" stroke="currentColor" stroke-width="2" stroke-linecap="round"></line>',5)]),512)),[[h.vShow,e.mute]]),h.withDirectives((h.openBlock(),h.createElementBlock("svg",jY,t[1]||(t[1]=[h.createElementVNode("path",{d:"M9 5C9 3.34315 10.3431 2 12 2C13.6569 2 15 3.34315 15 5V11C15 12.6569 13.6569 14 12 14C10.3431 14 9 12.6569 9 11V5Z",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),h.createElementVNode("path",{d:"M6 11C6 14.3137 8.68629 17 12 17C15.3137 17 18 14.3137 18 11",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),h.createElementVNode("line",{x1:"12",y1:"18",x2:"12",y2:"20",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),h.createElementVNode("line",{x1:"10",y1:"21",x2:"14",y2:"21",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]),512)),[[h.vShow,!e.mute]])],64))}}),FY={class:"flex flex-col items-center justify-center h-full bg-chat-haze-300 text-white relative"},qY={class:"h-40 w-40 rounded-full overflow-hidden mb-4 border-4 border-gray-700 flex-center"},GY={class:"text-center"},HY={class:"text-2xl font-semibold"},zY={class:"text-gray-400 mt-1"},YY={class:"flex items-center justify-center gap-8 mt-10"},KY=["href"],WY={class:"absolute bottom-6 text-gray-500 text-sm"},RN=h.defineComponent({__name:"Calling",props:{responsive:{}},emits:["userCalling","endCall"],setup(e,{expose:n,emit:t}){const i=t,o=(k,V)=>{if(k==Ye.RINGING)M((V==null?void 0:V.phone)??""),f.value=Ye.RINGING,B();else if(k==Ye.CONNECT_FAILED||k==Ye.NO_ANSWER)O(),f.value=k;else if(k==Ye.CALL_END){m.value=(V==null?void 0:V.message)??"";const L=(V==null?void 0:V.reason)=="ORIGINATOR_CANCEL";O({closeModal:L}),f.value=k}else k==Ye.CALL_START&&(f.value=k,R())},{plivoLogin:r,plivoCallAnswer:s,plivoCall:u,plivoEndCall:l,plivoCallSwishMute:d}=UY(o),c=h.computed(()=>({[Ye.CONNECTING]:"Connecting...",[Ye.CALLING]:"Calling...",[Ye.RINGING]:"Ringing...",[Ye.CONNECT_FAILED]:m.value||"Connect Error",[Ye.CALL_START]:"",[Ye.CALL_END]:m.value||"Call Ended",[Ye.NO_ANSWER]:"No Answer",[Ye.CANCEL]:"",[Ye.TIME_OUT]:"",[Ye.BUSY]:""})),_=h.computed(()=>c.value[f.value]??""),f=h.ref(Ye.CONNECTING),p=h.ref("00:00"),a=h.ref(!1),v=h.ref(!1),m=h.ref(""),g=h.ref(""),E=h.ref(null),y=h.ref(null),S=h.ref(!1);let C=null,T="call";h.onMounted(async()=>{var k;if((k=Fe.value)!=null&&k.tenant_phone){const V=await CY();await r(V)}}),h.onUnmounted(()=>{C&&clearInterval(C),m.value=""});function R(){let k=0;C=setInterval(()=>{k++;const V=String(Math.floor(k/60)).padStart(2,"0"),L=String(k%60).padStart(2,"0");p.value=`${V}:${L}`},1e3)}function O(k){var V;k!=null&&k.closeModal&&(a.value=!1,(V=E.value)==null||V.close()),l(f.value),f.value=Ye.CALL_END,clearInterval(C),v.value=!1,S.value=!1,p.value="00:00",C&&clearInterval(C),i("endCall",y.value,T),T=""}const B=()=>{var k;a.value=!0,v.value=!0,(k=E.value)==null||k.open()},j=()=>{d(!S.value),S.value=!S.value},I=async k=>{try{f.value=Ye.CONNECTING,y.value=k,B(),T="call",await u(k.phone),f.value=Ye.CALLING}catch(V){O(),console.log(V),m.value=(V==null?void 0:V.message)||JSON.stringify(V),f.value=Ye.CONNECT_FAILED}},A=async()=>{try{await s()}catch(k){O(),f.value=Ye.CONNECT_FAILED,m.value=(k==null?void 0:k.message)||JSON.stringify(k)}},M=async k=>{var D;let V=null;try{y.value=null;let F={phone:AN(k,"1"),client_id:((D=Fe.value)==null?void 0:D.tenant_id)??""};V=await jV(F)}catch(F){console.log(F)}const L={username:(V==null?void 0:V.full_name)||"Unknown Name",phone:"1"+(V==null?void 0:V.phone)};y.value=L,i("userCalling",y.value)},w=async()=>{IY(g.value)},x=()=>{g.value=""};return n({startCall:I,endCall:O,userRemoter:y,callStatus:f,answer:A,label:_}),(k,V)=>(h.openBlock(),h.createBlock(MY,{ref_key:"drawerVisibleRef",ref:E,width:500,"disabled-close":v.value,responsive:k.responsive,onAfterClose:x,absolute:""},{content:h.withCtx(()=>{var L,D,F,G,q,Y;return[h.createElementVNode("div",FY,[h.createElementVNode("div",qY,[h.createVNode(Yo,{class:"",src:((L=y.value)==null?void 0:L.avatar)??"",id:((D=y.value)==null?void 0:D.id)??"",color:(F=y.value)==null?void 0:F.color,name:(G=y.value)==null?void 0:G.username,size:"xxl"},null,8,["src","id","color","name"])]),h.createElementVNode("div",GY,[h.createElementVNode("h2",HY,h.toDisplayString(((q=y.value)==null?void 0:q.username)||h.unref(AN)(((Y=y.value)==null?void 0:Y.phone)??"")),1),h.createElementVNode("p",zY,h.toDisplayString(c.value[f.value]),1)]),h.createElementVNode("div",YY,[f.value==h.unref(Ye).RINGING?(h.openBlock(),h.createElementBlock("button",{key:0,onClick:A,class:"w-16 h-16 bg-chat-success hover:bg-green-600 text-white rounded-full flex items-center justify-center shadow-lg transition"},[h.createVNode(bY)])):h.createCommentVNode("",!0),g.value&&f.value==h.unref(Ye).CALL_END?(h.openBlock(),h.createElementBlock("button",{key:1,href:g.value,download:"recording.mp3",onClick:w,class:"w-16 h-16 bg-white hover:bg-green-600 text-white rounded-full flex items-center justify-center shadow-lg transition"},[h.createVNode(xY)],8,KY)):h.createCommentVNode("",!0),f.value==h.unref(Ye).CALL_START?(h.openBlock(),h.createElementBlock("button",{key:2,onClick:V[0]||(V[0]=K=>j()),class:"w-16 h-16 bg-white hover:bg-green-600 text-black rounded-full flex items-center justify-center shadow-lg transition"},[h.createVNode(VY,{mute:S.value},null,8,["mute"])])):h.createCommentVNode("",!0),f.value==h.unref(Ye).CALL_END?(h.openBlock(),h.createElementBlock("button",{key:3,onClick:V[1]||(V[1]=K=>O({closeModal:!0})),class:"w-16 h-16 bg-white hover:bg-green-600 text-white rounded-full flex items-center justify-center shadow-lg transition"},[h.createVNode(LY)])):h.createCommentVNode("",!0),f.value!=h.unref(Ye).CALL_END?(h.openBlock(),h.createElementBlock("button",{key:4,onClick:V[2]||(V[2]=K=>O()),class:"w-16 h-16 rounded-full bg-chat-error hover:bg-red-700 flex items-center justify-center"},[h.createVNode(iN)])):h.createCommentVNode("",!0)]),h.createElementVNode("p",WY,"Duration: "+h.toDisplayString(p.value),1)])]}),_:1},8,["disabled-close","responsive"]))}}),$Y="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAInSURBVHgBzVVNTttQEJ55xgltF303qDlBc4T0BGELqBJZNAh1kWRREGKBs0ARdNGyqCLoIpFayJYj+AjpCXBv4G5owPEbZmJhQf6I5SDxSc9+42fPN5558z2AZwY+9UKz1XaMyWmljB5fHfh722Uf0hA0W7+KaskuIZlVNh2YL8weEPaiqN8YJXxE8PVn94CIXAAKeMnj+R804JMygTEQPHxXKdBolCYFDiK+52+K/I3mufvl01pjjODeuQE46ds3rlsuB5ACzVbXsSxTY5dVIqjvbq1/Twgkz5aVv2Kzs1NZK0MGHJ1edBChdG3frEiQSh5akCvKPQzNCWTEAEki169u85tiDwmYocDXYP/zRg8yYr8iPiggjDdITAD4ji8+LAzIqcG3CQHnTHM1UhV1pnvkYJGchGAajs8urmTMa0/CTAIBpbRHsTRrcaeyvpLGnoThH3CX/uVQHFgctInwX0KAKNIAGhYEVgQHFPkJAT8QQx/+OC9ARhyetQuiSQTUSwhyubAjzWHbqgoZYcNy7CNSntwSsTs6/V1DVN9EjybJ7lNw2239ZpBnwYQaZ6Sxu7XhPiKISc5dltsDiFe88Jbq9/Ih54RlWVXACbWKN4gznD5Q0jGC2FHXUYqYiEqcwctru19/HS7zn9GmpJEDGNMrqaGcHf851aMyP/XI5A6VHrrkIYV3RiObF1MbjZk9Zljl4Zso+rC3/dGDReOYt60UD14y7gClAO8fcj4wXgAAAABJRU5ErkJggg==",QY="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAFASURBVHgBtZXPUYNAFMa/h+N4lJMz5iLpICWQCkKswBasINCBR49WoOlASsAKWMc/XPEYNfvcBRQQQ9A8fzMM7Czsj33sfgD/DG29I0g9YN8F2O12vissxwq/EgQPPrA3A1FgBvUwjATECfRr9F3YFpxmCzCH2AWiENfHUVcgMfgnjHMsRxe1IMg8M8UUcuTg1diUK3fK9tqHLGZBHJzZi0qACcTRXkPgnEAahw5rAZELaZi8WrCB9PKoOIa2f6JXIEG5TOfZrZmTD1li3Iym5QxY30Maxos9VSXiHOJo1RA4CvIkDcHqCnZ7i/IW1wKTGeY7RJCC+Su223EdPIVm0y2wC40k7QoKiUlWaCuaoQitFraMSecZYgVNd0WpbTWaXdjE/Jn73mwofTs5rs4KvJ7+ZfDtBI8T89OXD0JJPgAwJmyx5BPTjwAAAABJRU5ErkJggg==",JY="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAKdSURBVHgBtVVNbtpAFH7jMZh0xRHICaAnKJyg2SaoIiyaCHWRsGgiVphFhaAbsqgQYWFQBcmu9ASlJwg3CL2BuwnFMDN9D0zq2KFYIfmkke3n9/83AC8MFpax/qWXgggr07sQ02KpkB+HkQtloNq0EpwbPwBUHEVsJMXvItNdM5+3N8lqEAKcx8jzhBDaayFYBg1BbGaYYWQ3GiDvUeEhet4pFfbHdJSCCxTMmZYV39qA6z3mHSorWjTqNCiKHSd6upUBv/crenGZ+y5j7GTJsx6694NC3nGMtAYyoRhLYgf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XiJv9lcEmZ16SbqL0mIGhyxhYPF7WwCaSZZ77PBuRRkXgPaYKmzlKoCLd/5ajIJsyarzgDYf9cVlxVxye3qpXjwAEJAWy69XFzhZxWGipBGUz5VksumxqBcY+ixRihlWoyfbFLcHyJSay9I8/eUSa17L/LzIOhQsF/He8TAOCECN4noqhB+95AxPzjrD4pJP09cgL0SS4AypL6ZpZny4oeTRoUQRPKOsiAPllmOEhDJOPYzMaQUgMvf6zxJhZFfl1Dn3x27ySQDEACYwiQztKFTRPkOqj2XHcMtlinamHQ9YGD8EyDUmXEsDPHk+BzMhOh4lM35yvU6JLuCr1EC0JEmSG+uvPM0dJ7Nr2+u3V7XtTFkb67NlU+eLtW1VGnTyVOGrryGJZKJkFzToj/N4OBHh8VO5tw+fHuG778MlAHbo/vTqD//xn3IgSWCGfnVSOxYnzQWKy3im1ztBtsq1DFjx7ZXbevJHFqvfqBUvAV7luB+uIjj9sKS9TlOR99lIRHfZDPY0YBWvsHedaR6slwMyB51LlF+mEfKCspetExB+iMtihLIphp/T2VaBC9e1sczOO5cJd7tWSuZQoRuJJTRvyF5qr20Fa56wqQcQwaF+RwO352h/9NHxuRuSsvG/3CG0huzyoNprb8kkF54Xwap4MxeAKbMGptAUBh/BeGoDVlIcOlBKrgbyHM2+PUMEmxUUR2GUub+BHtCLH4+Het4X/Mv/m/2GwzhUiYSevSbAAAAAElFTkSuQmCC",iK={class:"bg-white rounded-t-3xl shadow-lg pb-2 flex grid grid-cols-4 h-[80px]"},oK=["disabled","onClick"],rK=["src"],sK=["src"],lK=h.defineComponent({__name:"Footer",setup(e){const n=[{icon:$Y,iconActive:QY,title:"Chat",value:He.CHAT_LIST,click:()=>{At.value!=He.CHAT_LIST&&In(He.CHAT_LIST)}},{icon:JY,iconActive:XY,title:"Review",value:He.TENANT_ERROR,disabled:!0},{icon:ZY,iconActive:eK,title:"Booking",value:He.TENANT_ERROR,disabled:!0},{icon:tK,iconActive:nK,title:"Go Admin",value:He.TENANT_ERROR,disabled:!0}];return(t,i)=>(h.openBlock(),h.createElementBlock("div",iK,[(h.openBlock(),h.createElementBlock(h.Fragment,null,h.renderList(n,o=>h.createElementVNode("button",{class:h.normalizeClass(["flex flex-col justify-center items-center text-blue-600",{"opacity-[0.6]":o.disabled}]),key:o.value,disabled:o.disabled,onClick:r=>{var s;return(s=o.click)==null?void 0:s.call(o)}},[h.withDirectives(h.createElementVNode("img",{src:o.icon},null,8,rK),[[h.vShow,h.unref(At)!=o.value]]),h.withDirectives(h.createElementVNode("img",{src:o.iconActive},null,8,sK),[[h.vShow,h.unref(At)==o.value]]),h.createElementVNode("span",{class:h.normalizeClass(["text-sm text-chat-haze-400 font-medium mt-1",{"text-chat-primary":h.unref(At)==o.value}])},h.toDisplayString(o.title),3)],10,oK)),64))]))}}),uK=["onClick"],dK={class:"cursor-pointer"},cK=h.defineComponent({__name:"SelectBase",props:{modelValue:{},options:{},placement:{},disabled:{type:Boolean}},emits:["update:modelValue","select"],setup(e,{emit:n}){const t=e,i=n,o=h.ref(!1);h.computed(()=>{var l;return((l=t.options.find(d=>d.value===t.modelValue))==null?void 0:l.label)??""});const r=h.computed(()=>t.placement==="bottom"?"top-2 translate-y-full":"-top-4 -translate-y-full");function s(){t.disabled||(o.value=!o.value)}function u(l){i("update:modelValue",l.value),i("select",l.value),o.value=!1}return(l,d)=>(h.openBlock(),h.createElementBlock("div",{class:"relative inline-block w-full",tabindex:"0",onBlur:d[0]||(d[0]=c=>o.value=!1),onClick:s},[h.withDirectives(h.createElementVNode("ul",{class:h.normalizeClass(["w-max absolute -translate-y-full left-0 z-10 mt-1 max-h-48 overflow-auto rounded-md shadow-custom bg-white shadow-lg",r.value])},[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(l.options,(c,_)=>(h.openBlock(),h.createElementBlock("li",{key:_,class:"cursor-pointer text-black px-6 py-2 hover:bg-chat-haze-200 border-b border-chat-haze-200",onClick:h.withModifiers(f=>u(c),["stop"])},h.toDisplayString(c.label),9,uK))),128))],2),[[h.vShow,o.value]]),h.createElementVNode("div",dK,[h.renderSlot(l.$slots,"default")])],32))}}),MN=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,NN=VM,_K=((e,n)=>t=>{var i;if((n==null?void 0:n.variants)==null)return NN(e,t==null?void 0:t.class,t==null?void 0:t.className);const{variants:o,defaultVariants:r}=n,s=Object.keys(o).map(d=>{const c=t==null?void 0:t[d],_=r==null?void 0:r[d];if(c===null)return null;const f=MN(c)||MN(_);return o[d][f]}),u=t&&Object.entries(t).reduce((d,c)=>{let[_,f]=c;return f===void 0||(d[_]=f),d},{}),l=n==null||(i=n.compoundVariants)===null||i===void 0?void 0:i.reduce((d,c)=>{let{class:_,className:f,...p}=c;return Object.entries(p).every(a=>{let[v,m]=a;return Array.isArray(m)?m.includes({...r,...u}[v]):{...r,...u}[v]===m})?[...d,_,f]:d},[]);return NN(e,s,l,t==null?void 0:t.class,t==null?void 0:t.className)})("inline-flex flex-center gap-2 whitespace-nowrap rounded-[8px] text-base font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 hover:duration-100",{variants:{variant:{default:"bg-chat-primary text-white hover:bg-chat-primary-hover [&_.loader::before]:border-white",primary:"bg-chat-primary text-white hover:bg-chat-primary-hover [&_.loader::before]:border-white","danger-outline":"bg-white border border-chat-error border-[1.5px] text-chat-error hover:bg-chat-error hover:text-white [&_.loader::before]:border-chat-error",success:"bg-chat-success text-white hover:bg-chat-success-hover [&_.loader::before]:border-white",danger:"bg-chat-error text-white hover:bg-chat-error-hover [&_.loader::before]:border-white","primary-outline":"bg-white text-chat-primary hover:bg-chat-primary border hover:text-white border-primary border-[1.5px] [&_.loader::before]:border-primary",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-chat-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),fK=h.defineComponent({__name:"CButton",props:{variant:{},size:{},class:{},asChild:{type:Boolean},as:{default:"button"}},setup(e){const n=e;return(t,i)=>(h.openBlock(),h.createBlock(h.unref(Ci),{as:t.as,"as-child":t.asChild,class:h.normalizeClass(h.unref(tN)(h.unref(_K)({variant:t.variant,size:t.size}),n.class))},{default:h.withCtx(()=>[h.renderSlot(t.$slots,"default")]),_:3},8,["as","as-child","class"]))}}),pK=h.defineComponent({__name:"CSpin",props:{size:{default:48},border:{default:5}},setup(e){const n=e,t=h.computed(()=>{let i={};return i.width=n.size+"px",i.height=n.size+"px",i.borderWidth=n.border+"px",i});return h.onMounted(()=>{}),(i,o)=>(h.openBlock(),h.createElementBlock("span",{class:"loader",style:h.normalizeStyle(t.value)},null,4))}}),aK=Et(h.defineComponent({__name:"ButtonBase",props:{disabled:{type:Boolean,default:!1},type:{},isReverseIcon:{type:Boolean},loading:{type:Boolean,default:!1}},setup(e){const n=e,t=h.computed(()=>{switch(n.type){case"primary":return"default";default:return n.type}});return(i,o)=>(h.openBlock(),h.createBlock(fK,{variant:t.value,disabled:i.disabled},{default:h.withCtx(()=>[i.loading?(h.openBlock(),h.createBlock(pK,{key:0,size:24,border:3})):(h.openBlock(),h.createElementBlock(h.Fragment,{key:1},[h.renderSlot(i.$slots,"icon",{},void 0,!0),h.renderSlot(i.$slots,"default",{},void 0,!0)],64))]),_:3},8,["variant","disabled"]))}}),[["__scopeId","data-v-caae24ef"]]),vK={class:"mx-auto w-full h-full max-w-[700px] flex flex-col gap-4 justify-center px-5"},mK={class:"chat-input border border-chat-haze-200 p-2 bg-white shadow-md"},hK={class:"flex items-center gap-2 chat-input border border-chat-haze-200 p-2 bg-white shadow-md"},yK={class:"relative"},gK={class:"flex items-center gap-1 px-2 py-1 rounded-lg hover:bg-gray-100"},EK={class:"text-sm text-chat-haze-700"},TK={class:"relative"},SK={class:"flex-center mt-2"},bK=h.defineComponent({__name:"Setting",setup(e){h.ref(!1);const n=h.ref(""),t=h.ref(""),i=[{value:"US",label:"+1 US",dial:1,flag:"πŸ‡ΊπŸ‡Έ"}],o=h.ref(i[0]),r=h.ref(""),s=h.ref(!1),u=()=>{r.value="",n.value=l(n.value)},l=_=>_.replace(/\D/g,""),d=(_,f)=>(f.replace("+",""),f.startsWith(_.toString())),c=async()=>{var _;try{if(console.log(d(o.value.dial,n.value)),!t.value){r.value="Business name is required.";return}if(!n.value||l(n.value).length>10){r.value="Phone number must contain 10 digits";return}if(d(o.value.dial,n.value)){r.value=`Phone number does not match country code ${o.value.value}`;return}s.value=!0;const f={tenant_id:(_=Fe.value)==null?void 0:_.tenant_id,phone_forward:o.value.dial+n.value,tenant_name:t.value};await aY(f),In(He.REGISTER_SUCCESS)}catch(f){console.log(f),r.value=(f==null?void 0:f.message)||"Something error!"}s.value=!1};return(_,f)=>(h.openBlock(),h.createElementBlock("div",vK,[f[7]||(f[7]=h.createElementVNode("div",{class:"flex gap-4"},[h.createElementVNode("p",{class:"text-3xl md:text-3xl text-chat-haze-800 font-bold text-center mb-2"}," Go Chat Access Registration Form ")],-1)),h.createElementVNode("div",null,[f[3]||(f[3]=h.createElementVNode("p",{class:"text-xl text-left font-semibold text-chat-haze-600 mb-2"},"Business name",-1)),h.createElementVNode("div",mK,[h.withDirectives(h.createElementVNode("input",{class:"!outline-none h-8 px-2 w-full","onUpdate:modelValue":f[0]||(f[0]=p=>t.value=p),placeholder:"Enter business name"},null,512),[[h.vModelText,t.value]])])]),h.createElementVNode("div",null,[f[5]||(f[5]=h.createElementVNode("p",{class:"text-xl text-left font-semibold text-chat-haze-600 mb-2"},"Set up phone forward",-1)),h.createElementVNode("div",hK,[h.createElementVNode("div",yK,[h.createVNode(cK,{options:i,placement:"bottom"},{default:h.withCtx(()=>[h.createElementVNode("button",gK,[h.createElementVNode("span",null,h.toDisplayString(o.value.flag),1),h.createElementVNode("span",EK,"+"+h.toDisplayString(o.value.dial),1),f[4]||(f[4]=h.createElementVNode("svg",{class:"w-4 h-4 text-chat-haze-500",fill:"none",stroke:"currentColor",viewBox:"0 0 20 20"},[h.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 7l5 5 5-5"})],-1))])]),_:1})]),h.withDirectives(h.createElementVNode("input",{class:"!outline-none",type:"tel",maxlength:10,onInput:u,"onUpdate:modelValue":f[1]||(f[1]=p=>n.value=p),placeholder:"Enter phone number"},null,544),[[h.vModelText,n.value]])])]),h.createElementVNode("div",TK,[h.withDirectives(h.createElementVNode("p",{class:"text-chat-error absolute -top-4 left-4"},h.toDisplayString(r.value),513),[[h.vShow,r.value]])]),h.createElementVNode("div",SK,[h.createVNode(aK,{loading:s.value,type:"primary",class:"w-[150px] h-12 font-medium",onClick:f[2]||(f[2]=p=>c())},{default:h.withCtx(()=>f[6]||(f[6]=[h.createTextVNode("Submit ")])),_:1},8,["loading"])])]))}}),IK="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHQAAAB0CAYAAABUmhYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAADKQSURBVHgBzX0JtB3FdeCt6n67/qK/aEf7LrEICYEsxI63+BgwjjHJYOItiUlyPJMZ52SxZ5w5k5zx2J7k5CQ5yXFijMB2EscL2I7MGITZwQiBQAto/VrQ+vX3995/S3fNrerX79++Xf2+BAhToPPf6666devu91Z1PwHv/ibxnx+50tnZCZmhGsip3YUZbUtqg8U3Oq5Zfrc7NTerXverHTesuFumnJSqeSAagwUdn3JA1vza0Nbd9ykp095Q8fjoc3s3O5nMVJl1C8Uzw/vh8PChSfF4FzYB786m8VLNb3MgN6V3znpPybpMyymFVbPf59W9ktvbPi+/Yua13mj1rGzL9Dquk/aVr1Id+V4lEIaa4EIEIH6RSqna8PhpJfFbza/7Y+XTIKUr8+nO8t6TTw/9Ys83RLEyprLZwviR4gvQ3z+aiN+7qL3bGEoJJQuXX3SzLKRzmaVzNnXctOI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Hv1d65cT2ydb4TrRfFUPp/JFFZ9fOuz7TM3Wx05ud3XnTqnswf+uCui/1j4ebH5zRBB2vml8jVjL6Iwg2/8fNsK3CRH2r6acfNMUyppNLQfiArFeu+UK/tKt/9OzwI7v+3hsqvuEdHdk/tuPwY5Ot6Z1sv2qG0sYJIQvr5t4oc7l8Zum0azpuXPUZ4coU1Oo12Z5vl4U0QONIk46WHR8LF/rzuI6cfaUmFDkW6QYMVcZPO1nzrgJMGCU4Gdfc1DtFqlSF+nBpROBOkvJ8b/iRPf9c2Xvycb9UKhdfPPoovMVdkQvV3k0MpY0zN59dM+cKoWRd+TXZcd2qT+Yvnn2TX66OqKpfc9qy3U7azaLvxe2oXK/Uzw6qSZRE+0A9YKR8Gm2qi4677A+Xz+IGQ8rJpNvLu449MvT43m8KdOMO1qfHzvT9Eo5BuQWO74r2bmUobfGgort7dmFBYQVGxeOqXDtTWL/gDndG5xL9W6gdNyy/yy1k8vqdha2aSLugiuPFka2vP6ByTqF6amRv6bmD35P5dI+TT2VVX2l3qb//+KS4vMva/wfAYUtYHdkZRwAAAABJRU5ErkJggg==",CK={},AK={class:"mx-auto w-full h-full max-w-[700px] flex flex-col gap-4 justify-center items-center px-5"};function RK(e,n){return h.openBlock(),h.createElementBlock("div",AK,n[0]||(n[0]=[h.createElementVNode("img",{class:"w-[130px] h-auto",src:IK},null,-1),h.createElementVNode("p",{class:"font-semibold text-center text-2xl"},"Your request has been submitted successfully. Please wait for a response within 24 to 72 hours.",-1)]))}const MK=Et(CK,[["render",RK]]),NK={key:0,class:"m-auto flex-center sc-full"},OK={key:4,class:"relative flex flex-col mx-auto w-full h-full bg-[#F9FAFC] overflow-hidden chat-mobile pt-4"},wK={key:0,class:"text-[#141B34] px-6 shrink-0"},xK={class:"text-xl font-semibold text-chat-haze-900 ml-3"},PK={class:"grow overflow-hidden"},DK={key:5,class:"flex gap-4 h-full relative"},kK={class:"chat-box-white grow flex flex-col h-full pt-6 overflow-hidden"},LK={key:0,class:"text-[#141B34] px-6"},UK={class:"text-xl font-semibold text-chat-haze-900 ml-3"},BK={class:"grow overflow-hidden"},jK=h.defineComponent({__name:"App",props:{token:{},id:{},domain:{},response:{default:"tablet"},isLib:{type:Boolean}},emits:["userCalling","error:noPhoneTenant"],setup(e,{expose:n,emit:t}){const i=[{id:He.HOME,backFunc:null,backTitle:""},{id:He.CUSTOMER_DETAIL,backFunc:()=>{In(He.HOME)},backTitle:""},{id:He.CUSTOMER_APPOINTMENT,backFunc:()=>{In(He.CUSTOMER_DETAIL)},backTitle:"Appointments"},{id:He.CUSTOMER_CHECK_IN,backFunc:()=>{In(He.CUSTOMER_DETAIL)},backTitle:"Checkins"}],o=h.computed(()=>[{id:He.CHAT_LIST,backFunc:r.isLib?void 0:()=>{vR()},backTitle:"ChatBiz"},{id:He.HOME,backFunc:()=>{In(He.CHAT_LIST)},backTitle:"",isHidden:!0},{id:He.CUSTOMER_DETAIL,backFunc:()=>{In(He.HOME)},backTitle:""},{id:He.CUSTOMER_APPOINTMENT,backFunc:()=>{In(He.CUSTOMER_DETAIL)},backTitle:"Appointments"},{id:He.CUSTOMER_CHECK_IN,backFunc:()=>{In(He.CUSTOMER_DETAIL)},backTitle:"Checkins"}]),r=e,s=t,{initPage:u}=mY();h.onMounted(()=>{r.isLib&&Ez(),R(),window.addEventListener("resize",O),B()}),h.onUnmounted(()=>{window.removeEventListener("resize",O)});const l=h.computed(()=>d.value==="mobile"?o.value.find(M=>M.id==At.value):i.find(M=>M.id==At.value)),d=h.computed(()=>r.response=="mobile"?r.response:p.value),c=h.computed(()=>{var M;return((M=y.value)==null?void 0:M.listConversationsAll)??[]}),_=h.computed(()=>{var M;return((M=c.value)==null?void 0:M.reduce((w,x)=>w+((x==null?void 0:x.unread_count)??0),0))??0}),f=h.computed(()=>{var M;return((M=v.value)==null?void 0:M.callStatus)??null}),p=h.ref("tablet"),a=h.ref(),v=h.ref(null),m=h.ref(null),g=h.ref(null),E=h.ref(null),y=h.ref(null),S=h.ref(null),C=async M=>{var w,x;(m.value!=(M==null?void 0:M.receiver_id)||d.value==="mobile")&&(At.value!=He.HOME&&In(He.HOME),m.value=M==null?void 0:M.receiver_id,await h.nextTick(),(w=y.value)==null||w.handleReadMessage(),(x=E.value)==null||x.getData(M))},T=M=>{var w;(w=v.value)==null||w.startCall(M)},R=()=>{var w;if(!a.value)return;(((w=a.value)==null?void 0:w.offsetWidth)??0)>=640?p.value!="tablet"&&(p.value="tablet"):p.value!="mobile"&&(At.value==He.HOME&&(At.value=He.CHAT_LIST),p.value="mobile")},O=Vr(()=>{R()},50),B=async()=>{var M,w,x;await u({props:r,response:d.value}),!((M=Fe.value)!=null&&M.tenant_phone)&&((w=Fe.value)==null?void 0:w.user_type)=="tenant"&&((x=Fe.value)!=null&&x.has_business_tenant_phone?In(He.REGISTER_SUCCESS):In(He.REGISTER_TENANT))},j=(M,w)=>{setTimeout(()=>{var x,k,V,L;M!=null&&M.phone&&((k=(x=E.value)==null?void 0:x.infoUser)==null?void 0:k.phone)==(M==null?void 0:M.phone)&&((V=E.value)==null||V.handleGetMessage({resetList:!0})),ER({infoUser:((L=E.value)==null?void 0:L.infoUser)??null,isCall:w})},2e3)},I=()=>{var M;(M=S.value)==null||M.open()},A=()=>{var M;(M=y.value)==null||M.handleReadMessage()};return n({get unreadCount(){return _.value},get callStatus(){return f.value},get callLabel(){var M;return((M=v.value)==null?void 0:M.label)??""},getUserRemote:()=>{var M;return((M=v.value)==null?void 0:M.userRemoter)??null},startCall:async()=>{var M;await((M=v.value)==null?void 0:M.answer())},endCall:()=>{var M;return(M=v.value)==null?void 0:M.endCall()},openSettings:I}),(M,w)=>{var x,k;return h.openBlock(),h.createElementBlock("div",{class:h.normalizeClass(["go-chat-main max-w-full p-0 overscroll-x-none",{"md:p-8":!M.isLib}]),id:"appChatMain",ref_key:"appChatRef",ref:a},[h.unref(V_)?h.unref(At)==h.unref(He).TENANT_ERROR?(h.openBlock(),h.createBlock(gY,{key:1})):h.unref(At)==h.unref(He).REGISTER_TENANT?(h.openBlock(),h.createBlock(bK,{key:2})):h.unref(At)==h.unref(He).REGISTER_SUCCESS?(h.openBlock(),h.createBlock(MK,{key:3})):d.value=="mobile"?(h.openBlock(),h.createElementBlock("div",OK,[h.createVNode(RN,{ref_key:"callingRef",ref:v,onUserCalling:w[0]||(w[0]=V=>s("userCalling",V)),onEndCall:j,responsive:d.value},null,8,["responsive"]),(x=l.value)!=null&&x.backFunc&&!l.value.isHidden?(h.openBlock(),h.createElementBlock("div",wK,[h.createElementVNode("button",{class:"flex items-center",onClick:w[1]||(w[1]=V=>l.value.backFunc())},[h.createVNode(Vc),h.createElementVNode("span",xK,h.toDisplayString(l.value.backTitle??""),1)])])):h.createCommentVNode("",!0),h.createElementVNode("div",PK,[h.withDirectives(h.createVNode(SR,{ref_key:"chatListRef",ref:y,class:"w-full max-w-[500px] !bg-[#F9FAFC]",responsive:d.value,onSelectReceiver:C,"receiver-id":m.value,"onUpdate:receiverId":w[2]||(w[2]=V=>m.value=V)},null,8,["responsive","receiver-id"]),[[h.vShow,h.unref(At)==h.unref(He).CHAT_LIST]]),h.withDirectives(h.createVNode(rN,{ref_key:"homeComponentRef",ref:E,"receiver-id":m.value,class:"h-full pt-4",onCall:T,onBack:w[3]||(w[3]=V=>{var L,D;return(D=(L=l.value).backFunc)==null?void 0:D.call(L)}),onInputFocus:A,responsive:d.value},null,8,["receiver-id","responsive"]),[[h.vShow,h.unref(At)==h.unref(He).HOME]]),h.unref(At)==h.unref(He).CUSTOMER_DETAIL?(h.openBlock(),h.createBlock(lN,{key:0,ref_key:"customerDetailRef",ref:g,"receiver-id":m.value,class:"w-full h-full",responsive:d.value},null,8,["receiver-id","responsive"])):h.createCommentVNode("",!0),h.unref(At)==h.unref(He).CUSTOMER_CHECK_IN?(h.openBlock(),h.createBlock(_N,{key:1,class:"w-full h-full"})):h.createCommentVNode("",!0),h.unref(At)==h.unref(He).CUSTOMER_APPOINTMENT?(h.openBlock(),h.createBlock(fN,{key:2,class:"w-full h-full"})):h.createCommentVNode("",!0)]),h.unref(At)!=h.unref(He).HOME?(h.openBlock(),h.createBlock(lK,{key:1,class:"shrink-0"})):h.createCommentVNode("",!0)])):(h.openBlock(),h.createElementBlock("div",DK,[h.createVNode(SR,{ref_key:"chatListRef",ref:y,class:"w-[38%] max-w-[500px] min-w-[450px]",responsive:d.value,onSelectReceiver:C,"receiver-id":m.value,"onUpdate:receiverId":w[4]||(w[4]=V=>m.value=V)},null,8,["responsive","receiver-id"]),h.createElementVNode("div",kK,[(k=l.value)!=null&&k.backFunc?(h.openBlock(),h.createElementBlock("div",LK,[h.createElementVNode("button",{class:"flex items-center",onClick:w[5]||(w[5]=V=>l.value.backFunc())},[h.createVNode(Vc),h.createElementVNode("span",UK,h.toDisplayString(l.value.backTitle??""),1)])])):h.createCommentVNode("",!0),h.createElementVNode("div",BK,[h.withDirectives(h.createVNode(rN,{ref_key:"homeComponentRef",ref:E,"receiver-id":m.value,class:"h-full",onCall:T,onInputFocus:A,responsive:d.value},null,8,["receiver-id","responsive"]),[[h.vShow,h.unref(At)==h.unref(He).HOME&&m.value]]),h.unref(At)==h.unref(He).CUSTOMER_DETAIL?(h.openBlock(),h.createBlock(lN,{key:0,ref_key:"customerDetailRef",ref:g,"receiver-id":m.value,class:"h-full",responsive:d.value},null,8,["receiver-id","responsive"])):h.createCommentVNode("",!0),h.unref(At)==h.unref(He).CUSTOMER_CHECK_IN?(h.openBlock(),h.createBlock(_N,{key:1,class:"h-full"})):h.createCommentVNode("",!0),h.unref(At)==h.unref(He).CUSTOMER_APPOINTMENT?(h.openBlock(),h.createBlock(fN,{key:2,class:"h-full"})):h.createCommentVNode("",!0)]),h.createVNode(RN,{ref_key:"callingRef",ref:v,responsive:d.value,onUserCalling:w[6]||(w[6]=V=>s("userCalling",V)),onEndCall:j},null,8,["responsive"])])])):(h.openBlock(),h.createElementBlock("div",NK,[h.createVNode(nN)]))],2)}}});qi.PLIVO_CALL_STATUS=Ye,qi.default=jK,Object.defineProperties(qi,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});