PluginProbe
Assistant – Every Day Productivity Apps / 1.5.5.1
Assistant – Every Day Productivity Apps v1.5.5.1
1.5.5.1 1.5.5 trunk 0.1.0 0.2.0 0.2.1 0.2.2 0.3.0 0.3.1 0.4 0.4.1 0.4.2 0.5.0 0.5.1 0.6.0 0.7.0 0.7.0.2 0.7.0.3 0.7.0.4 0.7.0.5 0.7.0.6 0.7.0.7 0.7.0.8 0.7.0.9 0.7.1 All 72 releases
← All changes | build/vendor-bb-cloud.js +1 -1 0.7.1 → 1.5.5.1 View file →
@@ -1 +1 @@
1 -(()=>{"use strict";var e={d:(t,r)=>{for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})}};e.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),e.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),e.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var t={};e.r(t),e.d(t,{appendFormDataObject:()=>Yn,createCloudClient:()=>go,useApiRequest:()=>Qn});const r=React;var n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==e.g?e.g:"undefined"!=typeof self?self:{};var o={exports:{}},i=function(e,t){return function(){for(var r=new Array(arguments.length),n=0;n<r.length;n++)r[n]=arguments[n];return e.apply(t,r)}},a=i,u=Object.prototype.toString;function c(e){return"[object Array]"===u.call(e)}function s(e){return void 0===e}function f(e){return null!==e&&"object"==typeof e}function l(e){if("[object Object]"!==u.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function p(e){return"[object Function]"===u.call(e)}function y(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),c(e))for(var r=0,n=e.length;r<n;r++)t.call(null,e[r],r,e);else for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.call(null,e[o],o,e)}var d={isArray:c,isArrayBuffer:function(e){return"[object ArrayBuffer]"===u.call(e)},isBuffer:function(e){return null!==e&&!s(e)&&null!==e.constructor&&!s(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){return"undefined"!=typeof FormData&&e instanceof FormData},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:f,isPlainObject:l,isUndefined:s,isDate:function(e){return"[object Date]"===u.call(e)},isFile:function(e){return"[object File]"===u.call(e)},isBlob:function(e){return"[object Blob]"===u.call(e)},isFunction:p,isStream:function(e){return f(e)&&p(e.pipe)},isURLSearchParams:function(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&"undefined"!=typeof window&&"undefined"!=typeof document},forEach:y,merge:function e(){var t={};function r(r,n){l(t[n])&&l(r)?t[n]=e(t[n],r):l(r)?t[n]=e({},r):c(r)?t[n]=r.slice():t[n]=r}for(var n=0,o=arguments.length;n<o;n++)y(arguments[n],r);return t},extend:function(e,t,r){return y(t,(function(t,n){e[n]=r&&"function"==typeof t?a(t,r):t})),e},trim:function(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e}},h=d;function m(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var g=function(e,t,r){if(!t)return e;var n;if(r)n=r(t);else if(h.isURLSearchParams(t))n=t.toString();else{var o=[];h.forEach(t,(function(e,t){null!=e&&(h.isArray(e)?t+="[]":e=[e],h.forEach(e,(function(e){h.isDate(e)?e=e.toISOString():h.isObject(e)&&(e=JSON.stringify(e)),o.push(m(t)+"="+m(e))})))})),n=o.join("&")}if(n){var i=e.indexOf("#");-1!==i&&(e=e.slice(0,i)),e+=(-1===e.indexOf("?")?"?":"&")+n}return e},b=d;function v(){this.handlers=[]}v.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},v.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},v.prototype.forEach=function(e){b.forEach(this.handlers,(function(t){null!==t&&e(t)}))};var w=v,j=d,O=function(e){return!(!e||!e.__CANCEL__)},S=d,P=function(e,t,r,n,o){return function(e,t,r,n,o){return e.config=t,r&&(e.code=r),e.request=n,e.response=o,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},e}(new Error(e),t,r,n,o)},A=P,_=d,E=_.isStandardBrowserEnv()?{write:function(e,t,r,n,o,i){var a=[];a.push(e+"="+encodeURIComponent(t)),_.isNumber(r)&&a.push("expires="+new Date(r).toGMTString()),_.isString(n)&&a.push("path="+n),_.isString(o)&&a.push("domain="+o),!0===i&&a.push("secure"),document.cookie=a.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}},k=d,x=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"],T=d,R=T.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function n(e){var n=e;return t&&(r.setAttribute("href",n),n=r.href),r.setAttribute("href",n),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}return e=n(window.location.href),function(t){var r=T.isString(t)?n(t):t;return r.protocol===e.protocol&&r.host===e.host}}():function(){return!0},I=d,U=E,C=g,F=R,D=P,N=d,q=function(e,t){S.forEach(e,(function(r,n){n!==t&&n.toUpperCase()===t.toUpperCase()&&(e[t]=r,delete e[n])}))},M={"Content-Type":"application/x-www-form-urlencoded"};function B(e,t){!N.isUndefined(e)&&N.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var L,W={adapter:(("undefined"!=typeof XMLHttpRequest||"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(L=function(e){return new Promise((function(t,r){var n=e.data,o=e.headers;I.isFormData(n)&&delete o["Content-Type"];var i=new XMLHttpRequest;if(e.auth){var a=e.auth.username||"",u=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.Authorization="Basic "+btoa(a+":"+u)}var c=function(e,t){return e&&!function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}(t)?function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}(e.baseURL,e.url);if(i.open(e.method.toUpperCase(),C(c,e.params,e.paramsSerializer),!0),i.timeout=e.timeout,i.onreadystatechange=function(){if(i&&4===i.readyState&&(0!==i.status||i.responseURL&&0===i.responseURL.indexOf("file:"))){var n="getAllResponseHeaders"in i?function(e){var t,r,n,o={};return e?(k.forEach(e.split("\n"),(function(e){if(n=e.indexOf(":"),t=k.trim(e.substr(0,n)).toLowerCase(),r=k.trim(e.substr(n+1)),t){if(o[t]&&x.indexOf(t)>=0)return;o[t]="set-cookie"===t?(o[t]?o[t]:[]).concat([r]):o[t]?o[t]+", "+r:r}})),o):o}(i.getAllResponseHeaders()):null,o={data:e.responseType&&"text"!==e.responseType?i.response:i.responseText,status:i.status,statusText:i.statusText,headers:n,config:e,request:i};(function(e,t,r){var n=r.config.validateStatus;r.status&&n&&!n(r.status)?t(A("Request failed with status code "+r.status,r.config,null,r.request,r)):e(r)})(t,r,o),i=null}},i.onabort=function(){i&&(r(D("Request aborted",e,"ECONNABORTED",i)),i=null)},i.onerror=function(){r(D("Network Error",e,null,i)),i=null},i.ontimeout=function(){var t="timeout of "+e.timeout+"ms exceeded";e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),r(D(t,e,"ECONNABORTED",i)),i=null},I.isStandardBrowserEnv()){var s=(e.withCredentials||F(c))&&e.xsrfCookieName?U.read(e.xsrfCookieName):void 0;s&&(o[e.xsrfHeaderName]=s)}if("setRequestHeader"in i&&I.forEach(o,(function(e,t){void 0===n&&"content-type"===t.toLowerCase()?delete o[t]:i.setRequestHeader(t,e)})),I.isUndefined(e.withCredentials)||(i.withCredentials=!!e.withCredentials),e.responseType)try{i.responseType=e.responseType}catch(t){if("json"!==e.responseType)throw t}"function"==typeof e.onDownloadProgress&&i.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&i.upload&&i.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then((function(e){i&&(i.abort(),r(e),i=null)})),n||(n=null),i.send(n)}))}),L),transformRequest:[function(e,t){return q(t,"Accept"),q(t,"Content-Type"),N.isFormData(e)||N.isArrayBuffer(e)||N.isBuffer(e)||N.isStream(e)||N.isFile(e)||N.isBlob(e)?e:N.isArrayBufferView(e)?e.buffer:N.isURLSearchParams(e)?(B(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):N.isObject(e)?(B(t,"application/json;charset=utf-8"),JSON.stringify(e)):e}],transformResponse:[function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};N.forEach(["delete","get","head"],(function(e){W.headers[e]={}})),N.forEach(["post","put","patch"],(function(e){W.headers[e]=N.merge(M)}));var V=W,z=d,H=function(e,t,r){return j.forEach(r,(function(r){e=r(e,t)})),e},G=O,X=V;function $(e){e.cancelToken&&e.cancelToken.throwIfRequested()}var J=d,Q=function(e,t){t=t||{};var r={},n=["url","method","data"],o=["headers","auth","proxy","params"],i=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],a=["validateStatus"];function u(e,t){return J.isPlainObject(e)&&J.isPlainObject(t)?J.merge(e,t):J.isPlainObject(t)?J.merge({},t):J.isArray(t)?t.slice():t}function c(n){J.isUndefined(t[n])?J.isUndefined(e[n])||(r[n]=u(void 0,e[n])):r[n]=u(e[n],t[n])}J.forEach(n,(function(e){J.isUndefined(t[e])||(r[e]=u(void 0,t[e]))})),J.forEach(o,c),J.forEach(i,(function(n){J.isUndefined(t[n])?J.isUndefined(e[n])||(r[n]=u(void 0,e[n])):r[n]=u(void 0,t[n])})),J.forEach(a,(function(n){n in t?r[n]=u(e[n],t[n]):n in e&&(r[n]=u(void 0,e[n]))}));var s=n.concat(o).concat(i).concat(a),f=Object.keys(e).concat(Object.keys(t)).filter((function(e){return-1===s.indexOf(e)}));return J.forEach(f,c),r},K=d,Z=g,Y=w,ee=function(e){return $(e),e.headers=e.headers||{},e.data=H(e.data,e.headers,e.transformRequest),e.headers=z.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),z.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||X.adapter)(e).then((function(t){return $(e),t.data=H(t.data,t.headers,e.transformResponse),t}),(function(t){return G(t)||($(e),t&&t.response&&(t.response.data=H(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))},te=Q;function re(e){this.defaults=e,this.interceptors={request:new Y,response:new Y}}re.prototype.request=function(e){"string"==typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=te(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=[ee,void 0],r=Promise.resolve(e);for(this.interceptors.request.forEach((function(e){t.unshift(e.fulfilled,e.rejected)})),this.interceptors.response.forEach((function(e){t.push(e.fulfilled,e.rejected)}));t.length;)r=r.then(t.shift(),t.shift());return r},re.prototype.getUri=function(e){return e=te(this.defaults,e),Z(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},K.forEach(["delete","get","head","options"],(function(e){re.prototype[e]=function(t,r){return this.request(te(r||{},{method:e,url:t,data:(r||{}).data}))}})),K.forEach(["post","put","patch"],(function(e){re.prototype[e]=function(t,r,n){return this.request(te(n||{},{method:e,url:t,data:r}))}}));var ne=re;function oe(e){this.message=e}oe.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},oe.prototype.__CANCEL__=!0;var ie=oe,ae=ie;function ue(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var r=this;e((function(e){r.reason||(r.reason=new ae(e),t(r.reason))}))}ue.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},ue.source=function(){var e;return{token:new ue((function(t){e=t})),cancel:e}};var ce=ue,se=d,fe=i,le=ne,pe=Q;function ye(e){var t=new le(e),r=fe(le.prototype.request,t);return se.extend(r,le.prototype,t),se.extend(r,t),r}var de=ye(V);de.Axios=le,de.create=function(e){return ye(pe(de.defaults,e))},de.Cancel=ie,de.CancelToken=ce,de.isCancel=O,de.all=function(e){return Promise.all(e)},de.spread=function(e){return function(t){return e.apply(null,t)}},de.isAxiosError=function(e){return"object"==typeof e&&!0===e.isAxiosError},o.exports=de,o.exports.default=de;var he=o.exports,me=ge;function ge(e){ve.length||be(),ve[ve.length]=e}var be,ve=[],we=0;function je(){for(;we<ve.length;){var e=we;if(we+=1,ve[e].call(),we>1024){for(var t=0,r=ve.length-we;t<r;t++)ve[t]=ve[t+we];ve.length-=we,we=0}}ve.length=0,we=0}var Oe,Se,Pe,Ae=void 0!==n?n:self,_e=Ae.MutationObserver||Ae.WebKitMutationObserver;function Ee(e){return function(){var t=setTimeout(n,0),r=setInterval(n,50);function n(){clearTimeout(t),clearInterval(r),e()}}}"function"==typeof _e?(Oe=1,Se=new _e(je),Pe=document.createTextNode(""),Se.observe(Pe,{characterData:!0}),be=function(){Oe=-Oe,Pe.data=Oe}):be=Ee(je),ge.requestFlush=be,ge.makeRequestCallFromTimer=Ee;var ke=me;function xe(){}var Te=null,Re={},Ie=Ue;function Ue(e){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("Promise constructor's argument is not a function");this._U=0,this._V=0,this._W=null,this._X=null,e!==xe&&Me(e,this)}function Ce(e,t){for(;3===e._V;)e=e._W;if(Ue._Y&&Ue._Y(e),0===e._V)return 0===e._U?(e._U=1,void(e._X=t)):1===e._U?(e._U=2,void(e._X=[e._X,t])):void e._X.push(t);!function(e,t){ke((function(){var r=1===e._V?t.onFulfilled:t.onRejected;if(null!==r){var n=function(e,t){try{return e(t)}catch(e){return Te=e,Re}}(r,e._W);n===Re?De(t.promise,Te):Fe(t.promise,n)}else 1===e._V?Fe(t.promise,e._W):De(t.promise,e._W)}))}(e,t)}function Fe(e,t){if(t===e)return De(e,new TypeError("A promise cannot be resolved with itself."));if(t&&("object"==typeof t||"function"==typeof t)){var r=function(e){try{return e.then}catch(e){return Te=e,Re}}(t);if(r===Re)return De(e,Te);if(r===e.then&&t instanceof Ue)return e._V=3,e._W=t,void Ne(e);if("function"==typeof r)return void Me(r.bind(t),e)}e._V=1,e._W=t,Ne(e)}function De(e,t){e._V=2,e._W=t,Ue._Z&&Ue._Z(e,t),Ne(e)}function Ne(e){if(1===e._U&&(Ce(e,e._X),e._X=null),2===e._U){for(var t=0;t<e._X.length;t++)Ce(e,e._X[t]);e._X=null}}function qe(e,t,r){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.promise=r}function Me(e,t){var r=!1,n=function(e,t,r){try{e(t,r)}catch(e){return Te=e,Re}}(e,(function(e){r||(r=!0,Fe(t,e))}),(function(e){r||(r=!0,De(t,e))}));r||n!==Re||(r=!0,De(t,Te))}Ue._Y=null,Ue._Z=null,Ue._0=xe,Ue.prototype.then=function(e,t){if(this.constructor!==Ue)return function(e,t,r){return new e.constructor((function(n,o){var i=new Ue(xe);i.then(n,o),Ce(e,new qe(t,r,i))}))}(this,e,t);var r=new Ue(xe);return Ce(this,new qe(e,t,r)),r},Ie.prototype.done=function(e,t){var r=arguments.length?this.then.apply(this,arguments):this;r.then(null,(function(e){setTimeout((function(){throw e}),0)}))};var Be=Ie;Be.prototype.finally=function(e){return this.then((function(t){return Be.resolve(e()).then((function(){return t}))}),(function(t){return Be.resolve(e()).then((function(){throw t}))}))};var Le=Ie,We=$e(!0),Ve=$e(!1),ze=$e(null),He=$e(void 0),Ge=$e(0),Xe=$e("");function $e(e){var t=new Le(Le._0);return t._V=1,t._W=e,t}Le.resolve=function(e){if(e instanceof Le)return e;if(null===e)return ze;if(void 0===e)return He;if(!0===e)return We;if(!1===e)return Ve;if(0===e)return Ge;if(""===e)return Xe;if("object"==typeof e||"function"==typeof e)try{var t=e.then;if("function"==typeof t)return new Le(t.bind(e))}catch(e){return new Le((function(t,r){r(e)}))}return $e(e)};var Je=function(e){return"function"==typeof Array.from?(Je=Array.from,Array.from(e)):(Je=function(e){return Array.prototype.slice.call(e)},Array.prototype.slice.call(e))};Le.all=function(e){var t=Je(e);return new Le((function(e,r){if(0===t.length)return e([]);var n=t.length;function o(i,a){if(a&&("object"==typeof a||"function"==typeof a)){if(a instanceof Le&&a.then===Le.prototype.then){for(;3===a._V;)a=a._W;return 1===a._V?o(i,a._W):(2===a._V&&r(a._W),void a.then((function(e){o(i,e)}),r))}var u=a.then;if("function"==typeof u)return void new Le(u.bind(a)).then((function(e){o(i,e)}),r)}t[i]=a,0==--n&&e(t)}for(var i=0;i<t.length;i++)o(i,t[i])}))},Le.reject=function(e){return new Le((function(t,r){r(e)}))},Le.race=function(e){return new Le((function(t,r){Je(e).forEach((function(e){Le.resolve(e).then(t,r)}))}))},Le.prototype.catch=function(e){return this.then(null,e)};var Qe=me,Ke=[],Ze=[],Ye=Qe.makeRequestCallFromTimer((function(){if(Ze.length)throw Ze.shift()})),et=tt;function tt(e){var t;(t=Ke.length?Ke.pop():new rt).task=e,Qe(t)}function rt(){this.task=null}rt.prototype.call=function(){try{this.task.call()}catch(e){tt.onerror?tt.onerror(e):(Ze.push(e),Ye())}finally{this.task=null,Ke[Ke.length]=this}};var nt=Ie,ot=et;nt.denodeify=function(e,t){return"number"==typeof t&&t!==1/0?function(e,t){for(var r=[],n=0;n<t;n++)r.push("a"+n);var o=["return function ("+r.join(",")+") {","var self = this;","return new Promise(function (rs, rj) {","var res = fn.call(",["self"].concat(r).concat([it]).join(","),");","if (res &&",'(typeof res === "object" || typeof res === "function") &&','typeof res.then === "function"',") {rs(res);}","});","};"].join("");return Function(["Promise","fn"],o)(nt,e)}(e,t):function(e){for(var t=Math.max(e.length-1,3),r=[],n=0;n<t;n++)r.push("a"+n);var o=["return function ("+r.join(",")+") {","var self = this;","var args;","var argLength = arguments.length;","if (arguments.length > "+t+") {","args = new Array(arguments.length + 1);","for (var i = 0; i < arguments.length; i++) {","args[i] = arguments[i];","}","}","return new Promise(function (rs, rj) {","var cb = "+it+";","var res;","switch (argLength) {",r.concat(["extra"]).map((function(e,t){return"case "+t+":res = fn.call("+["self"].concat(r.slice(0,t)).concat("cb").join(",")+");break;"})).join(""),"default:","args[argLength] = cb;","res = fn.apply(self, args);","}","if (res &&",'(typeof res === "object" || typeof res === "function") &&','typeof res.then === "function"',") {rs(res);}","});","};"].join("");return Function(["Promise","fn"],o)(nt,e)}(e)};var it="function (err, res) {if (err) { rj(err); } else { rs(res); }}";nt.nodeify=function(e){return function(){var t=Array.prototype.slice.call(arguments),r="function"==typeof t[t.length-1]?t.pop():null,n=this;try{return e.apply(this,arguments).nodeify(r,n)}catch(e){if(null==r)return new nt((function(t,r){r(e)}));ot((function(){r.call(n,e)}))}}},nt.prototype.nodeify=function(e,t){if("function"!=typeof e)return this;this.then((function(r){ot((function(){e.call(t,null,r)}))}),(function(r){ot((function(){e.call(t,r)}))}))};var at=Ie;at.enableSynchronous=function(){at.prototype.isPending=function(){return 0==this.getState()},at.prototype.isFulfilled=function(){return 1==this.getState()},at.prototype.isRejected=function(){return 2==this.getState()},at.prototype.getValue=function(){if(3===this._V)return this._W.getValue();if(!this.isFulfilled())throw new Error("Cannot get a value of an unfulfilled promise.");return this._W},at.prototype.getReason=function(){if(3===this._V)return this._W.getReason();if(!this.isRejected())throw new Error("Cannot get a rejection reason of a non-rejected promise.");return this._W},at.prototype.getState=function(){return 3===this._V?this._W.getState():-1===this._V||-2===this._V?0:this._V}},at.disableSynchronous=function(){at.prototype.isPending=void 0,at.prototype.isFulfilled=void 0,at.prototype.isRejected=void 0,at.prototype.getValue=void 0,at.prototype.getReason=void 0,at.prototype.getState=void 0};var ut=Ie;function ct(e){return(ct="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var st=function(e,t){if("string"!=typeof e)throw new TypeError("argument str must be a string");for(var r={},n=t||{},o=e.split(yt),i=n.decode||lt,a=0;a<o.length;a++){var u=o[a],c=u.indexOf("=");if(!(c<0)){var s=u.substr(0,c).trim(),f=u.substr(++c,u.length).trim();'"'==f[0]&&(f=f.slice(1,-1)),null==r[s]&&(r[s]=ht(f,i))}}return r},ft=function(e,t,r){var n=r||{},o=n.encode||pt;if("function"!=typeof o)throw new TypeError("option encode is invalid");if(!dt.test(e))throw new TypeError("argument name is invalid");var i=o(t);if(i&&!dt.test(i))throw new TypeError("argument val is invalid");var a=e+"="+i;if(null!=n.maxAge){var u=n.maxAge-0;if(isNaN(u)||!isFinite(u))throw new TypeError("option maxAge is invalid");a+="; Max-Age="+Math.floor(u)}if(n.domain){if(!dt.test(n.domain))throw new TypeError("option domain is invalid");a+="; Domain="+n.domain}if(n.path){if(!dt.test(n.path))throw new TypeError("option path is invalid");a+="; Path="+n.path}if(n.expires){if("function"!=typeof n.expires.toUTCString)throw new TypeError("option expires is invalid");a+="; Expires="+n.expires.toUTCString()}if(n.httpOnly&&(a+="; HttpOnly"),n.secure&&(a+="; Secure"),n.sameSite)switch("string"==typeof n.sameSite?n.sameSite.toLowerCase():n.sameSite){case!0:case"strict":a+="; SameSite=Strict";break;case"lax":a+="; SameSite=Lax";break;case"none":a+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return a},lt=decodeURIComponent,pt=encodeURIComponent,yt=/; */,dt=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function ht(e,t){try{return t(e)}catch(t){return e}}var mt=[],gt=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;mt.map((function(r){return r({token:e,user:t})}))},bt=function(e,t,r){St(e,r),kt(t,r),gt(e,t)},vt=function(){Pt(),xt(),gt()},wt=function(e){return!(!e||"string"!=typeof e)},jt=function(){return wt(Ot())},Ot=function(){return Rt("fl-cloud-token")},St=function(e,t){Tt("fl-cloud-token",e,t)},Pt=function(){It("fl-cloud-token")},At=function(e){return!(!e||"object"!==ct(e)||!e.email)},_t=function(){return At(Et())},Et=function(){var e=Rt("fl-cloud-user");return e?JSON.parse(e):null},kt=function(e,t){var r={id:e.id,name:e.name,email:e.email,is_admin:e.is_admin};Tt("fl-cloud-user",JSON.stringify(r),t)},xt=function(){It("fl-cloud-user")},Tt=function(e,t,r){if("undefined"!=typeof document){var n={path:"/"};r&&(n.expires=new Date(Date.now()+12096e5)),document.cookie=ft(e,t,n)}},Rt=function(e){if("undefined"!=typeof document){var t=st(document.cookie);return t[e]?t[e]:null}},It=function(e){if("undefined"!=typeof document){var t={path:"/",expires:new Date(Date.now()-12096e5)};document.cookie=ft(e,"",t)}},Ut=Object.freeze({__proto__:null,subscribe:function(e){mt.push(e)},create:bt,destroy:vt,isValidToken:wt,hasToken:jt,getToken:Ot,setToken:St,removeToken:Pt,isValidUser:At,hasUser:_t,getUser:Et,setUser:kt,removeUser:xt}),Ct=function(e){var t={register:function(t,r,n,o,i){var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},u={first_name:t,last_name:r,username:n,email:o,password:i,password_confirmation:i};return new ut((function(t,r){e.post("/account/user/register",u,a).then((function(e){if(e.response)r(e.response.data);else{var n=e.data,o=n.token,i=n.user;t({token:o,user:i})}})).catch(r)}))},authenticate:function(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return new ut((function(o,i){e.post("/iam/authenticate",{email:t,password:r},n).then((function(e){if(e.response)i(e.response.data);else{var t=e.data,r=t.token,n=t.user;o({token:r,user:n})}})).catch(i)}))},login:function(e,r,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return new ut((function(i,a){t.authenticate(e,r,o).then((function(e){var t=e.token,r=e.user;bt(t,r,n),i({token:t,user:r})})).catch(a)}))},logout:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new ut((function(r,n){e.post("/iam/token/destroy",{},t).then((function(){vt(),r()})).catch(n)}))},refresh:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new ut((function(r,n){e.post("/iam/token/refresh",{},t).then((function(e){if(!e.data||!e.data.token)return vt(),void n(e);var t=e.data.token;St(t),r(e.data)})).catch((function(e){vt(),n(e)}))}))},forgotPassword:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new ut((function(n,o){e.post("/iam/password/forgot",{email:t},r).then((function(e){e.response?o(e.response.data):n()})).catch(o)}))},resetPassword:function(t,r,n,o){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},a={email:t,password:r,password_confirmation:n,token:o};return new ut((function(t,r){e.post("/iam/password/reset",a,i).then((function(e){e.response?r(e.response.data):t()})).catch(r)}))},changePassword:function(t,r,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i={current_password:t,new_password:r,new_password_confirmation:n};return new ut((function(t,r){e.post("/iam/password/change",i,o).then((function(e){e.response?r(e.response.data):t()})).catch(r)}))},verifyEmail:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new ut((function(n,o){e.get(t,r).then((function(e){e.response?o(e.response.data):(kt(e.data.user),n(e))})).catch(o)}))},resendVerificationEmail:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new ut((function(r,n){e.get("/iam/verification/resend",t).then((function(e){e.response?n(e.response.data):r(e)})).catch(n)}))},isConnected:function(){return jt()&&_t()}};return t};function Ft(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Dt(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i=[],a=!0,u=!1;try{for(r=r.call(e);!(a=(n=r.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==r.return||r.return()}finally{if(u)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Ft(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ft(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Nt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function qt(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Mt(e,t,r){return t&&qt(e.prototype,t),r&&qt(e,r),e}function Bt(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Lt="undefined"!=typeof Symbol&&Symbol,Wt="Function.prototype.bind called on incompatible ",Vt=Array.prototype.slice,zt=Object.prototype.toString,Ht=Function.prototype.bind||function(e){var t=this;if("function"!=typeof t||"[object Function]"!==zt.call(t))throw new TypeError(Wt+t);for(var r,n=Vt.call(arguments,1),o=function(){if(this instanceof r){var o=t.apply(this,n.concat(Vt.call(arguments)));return Object(o)===o?o:this}return t.apply(e,n.concat(Vt.call(arguments)))},i=Math.max(0,t.length-n.length),a=[],u=0;u<i;u++)a.push("$"+u);if(r=Function("binder","return function ("+a.join(",")+"){ return binder.apply(this,arguments); }")(o),t.prototype){var c=function(){};c.prototype=t.prototype,r.prototype=new c,c.prototype=null}return r},Gt=Ht.call(Function.call,Object.prototype.hasOwnProperty),Xt=SyntaxError,$t=Function,Jt=TypeError,Qt=function(e){try{return $t('"use strict"; return ('+e+").constructor;")()}catch(e){}},Kt=Object.getOwnPropertyDescriptor;if(Kt)try{Kt({},"")}catch(e){Kt=null}var Zt=function(){throw new Jt},Yt=Kt?function(){try{return Zt}catch(e){try{return Kt(arguments,"callee").get}catch(e){return Zt}}}():Zt,er="function"==typeof Lt&&"function"==typeof Symbol&&"symbol"==typeof Lt("foo")&&"symbol"==typeof Symbol("bar")&&function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),r=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var n=Object.getOwnPropertySymbols(e);if(1!==n.length||n[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}(),tr=Object.getPrototypeOf||function(e){return e.__proto__},rr={},nr="undefined"==typeof Uint8Array?void 0:tr(Uint8Array),or={"%AggregateError%":"undefined"==typeof AggregateError?void 0:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?void 0:ArrayBuffer,"%ArrayIteratorPrototype%":er?tr([][Symbol.iterator]()):void 0,"%AsyncFromSyncIteratorPrototype%":void 0,"%AsyncFunction%":rr,"%AsyncGenerator%":rr,"%AsyncGeneratorFunction%":rr,"%AsyncIteratorPrototype%":rr,"%Atomics%":"undefined"==typeof Atomics?void 0:Atomics,"%BigInt%":"undefined"==typeof BigInt?void 0:BigInt,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?void 0:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?void 0:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?void 0:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?void 0:FinalizationRegistry,"%Function%":$t,"%GeneratorFunction%":rr,"%Int8Array%":"undefined"==typeof Int8Array?void 0:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?void 0:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?void 0:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":er?tr(tr([][Symbol.iterator]())):void 0,"%JSON%":"object"==typeof JSON?JSON:void 0,"%Map%":"undefined"==typeof Map?void 0:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&er?tr((new Map)[Symbol.iterator]()):void 0,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?void 0:Promise,"%Proxy%":"undefined"==typeof Proxy?void 0:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?void 0:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?void 0:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&er?tr((new Set)[Symbol.iterator]()):void 0,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?void 0:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":er?tr(""[Symbol.iterator]()):void 0,"%Symbol%":er?Symbol:void 0,"%SyntaxError%":Xt,"%ThrowTypeError%":Yt,"%TypedArray%":nr,"%TypeError%":Jt,"%Uint8Array%":"undefined"==typeof Uint8Array?void 0:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?void 0:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?void 0:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?void 0:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?void 0:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?void 0:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?void 0:WeakSet},ir=function e(t){var r;if("%AsyncFunction%"===t)r=Qt("async function () {}");else if("%GeneratorFunction%"===t)r=Qt("function* () {}");else if("%AsyncGeneratorFunction%"===t)r=Qt("async function* () {}");else if("%AsyncGenerator%"===t){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===t){var o=e("%AsyncGenerator%");o&&(r=tr(o.prototype))}return or[t]=r,r},ar={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},ur=Ht,cr=Gt,sr=ur.call(Function.call,Array.prototype.concat),fr=ur.call(Function.apply,Array.prototype.splice),lr=ur.call(Function.call,String.prototype.replace),pr=ur.call(Function.call,String.prototype.slice),yr=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,dr=/\\(\\)?/g,hr=function(e){var t=pr(e,0,1),r=pr(e,-1);if("%"===t&&"%"!==r)throw new Xt("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==t)throw new Xt("invalid intrinsic syntax, expected opening `%`");var n=[];return lr(e,yr,(function(e,t,r,o){n[n.length]=r?lr(o,dr,"$1"):t||e})),n},mr=function(e,t){var r,n=e;if(cr(ar,n)&&(n="%"+(r=ar[n])[0]+"%"),cr(or,n)){var o=or[n];if(o===rr&&(o=ir(n)),void 0===o&&!t)throw new Jt("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:o}}throw new Xt("intrinsic "+e+" does not exist!")},gr=function(e,t){if("string"!=typeof e||0===e.length)throw new Jt("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new Jt('"allowMissing" argument must be a boolean');var r=hr(e),n=r.length>0?r[0]:"",o=mr("%"+n+"%",t),i=o.name,a=o.value,u=!1,c=o.alias;c&&(n=c[0],fr(r,sr([0,1],c)));for(var s=1,f=!0;s<r.length;s+=1){var l=r[s],p=pr(l,0,1),y=pr(l,-1);if(('"'===p||"'"===p||"`"===p||'"'===y||"'"===y||"`"===y)&&p!==y)throw new Xt("property names with quotes must have matching quotes");if("constructor"!==l&&f||(u=!0),cr(or,i="%"+(n+="."+l)+"%"))a=or[i];else if(null!=a){if(!(l in a)){if(!t)throw new Jt("base intrinsic for "+e+" exists, but the property is not available.");return}if(Kt&&s+1>=r.length){var d=Kt(a,l);a=(f=!!d)&&"get"in d&&!("originalValue"in d.get)?d.get:a[l]}else f=cr(a,l),a=a[l];f&&!u&&(or[i]=a)}}return a},br={exports:{}};!function(e){var t=Ht,r=gr,n=r("%Function.prototype.apply%"),o=r("%Function.prototype.call%"),i=r("%Reflect.apply%",!0)||t.call(o,n),a=r("%Object.getOwnPropertyDescriptor%",!0),u=r("%Object.defineProperty%",!0),c=r("%Math.max%");if(u)try{u({},"a",{value:1})}catch(e){u=null}e.exports=function(e){var r=i(t,o,arguments);if(a&&u){var n=a(r,"length");n.configurable&&u(r,"length",{value:1+c(0,e.length-(arguments.length-1))})}return r};var s=function(){return i(t,n,arguments)};u?u(e.exports,"apply",{value:s}):e.exports.apply=s}(br);var vr=gr,wr=br.exports,jr=wr(vr("String.prototype.indexOf")),Or=function(e){if(e.__esModule)return e;var t=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(e).forEach((function(r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})})),t}(Object.freeze({__proto__:null,default:{}})),Sr="function"==typeof Map&&Map.prototype,Pr=Object.getOwnPropertyDescriptor&&Sr?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Ar=Sr&&Pr&&"function"==typeof Pr.get?Pr.get:null,_r=Sr&&Map.prototype.forEach,Er="function"==typeof Set&&Set.prototype,kr=Object.getOwnPropertyDescriptor&&Er?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,xr=Er&&kr&&"function"==typeof kr.get?kr.get:null,Tr=Er&&Set.prototype.forEach,Rr="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,Ir="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,Ur="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,Cr=Boolean.prototype.valueOf,Fr=Object.prototype.toString,Dr=Function.prototype.toString,Nr=String.prototype.match,qr="function"==typeof BigInt?BigInt.prototype.valueOf:null,Mr=Object.getOwnPropertySymbols,Br="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,Lr="function"==typeof Symbol&&"object"==typeof Symbol.iterator,Wr=Object.prototype.propertyIsEnumerable,Vr=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null),zr=Or.custom,Hr=zr&&Qr(zr)?zr:null,Gr="function"==typeof Symbol&&void 0!==Symbol.toStringTag?Symbol.toStringTag:null;function Xr(e,t,r){var n="double"===(r.quoteStyle||t)?'"':"'";return n+e+n}function $r(e){return String(e).replace(/"/g,"&quot;")}function Jr(e){return!("[object Array]"!==Yr(e)||Gr&&"object"==typeof e&&Gr in e)}function Qr(e){if(Lr)return e&&"object"==typeof e&&e instanceof Symbol;if("symbol"==typeof e)return!0;if(!e||"object"!=typeof e||!Br)return!1;try{return Br.call(e),!0}catch(e){}return!1}var Kr=Object.prototype.hasOwnProperty||function(e){return e in this};function Zr(e,t){return Kr.call(e,t)}function Yr(e){return Fr.call(e)}function en(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}function tn(e,t){if(e.length>t.maxStringLength){var r=e.length-t.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return tn(e.slice(0,t.maxStringLength),t)+n}return Xr(e.replace(/(['\\])/g,"\\$1").replace(/[\x00-\x1f]/g,rn),"single",t)}function rn(e){var t=e.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return r?"\\"+r:"\\x"+(t<16?"0":"")+t.toString(16).toUpperCase()}function nn(e){return"Object("+e+")"}function on(e){return e+" { ? }"}function an(e,t,r,n){return e+" ("+t+") {"+(n?un(r,n):r.join(", "))+"}"}function un(e,t){if(0===e.length)return"";var r="\n"+t.prev+t.base;return r+e.join(","+r)+"\n"+t.prev}function cn(e,t){var r=Jr(e),n=[];if(r){n.length=e.length;for(var o=0;o<e.length;o++)n[o]=Zr(e,o)?t(e[o],e):""}var i,a="function"==typeof Mr?Mr(e):[];if(Lr){i={};for(var u=0;u<a.length;u++)i["$"+a[u]]=a[u]}for(var c in e)Zr(e,c)&&(r&&String(Number(c))===c&&c<e.length||Lr&&i["$"+c]instanceof Symbol||(/[^\w$]/.test(c)?n.push(t(c,e)+": "+t(e[c],e)):n.push(c+": "+t(e[c],e))));if("function"==typeof Mr)for(var s=0;s<a.length;s++)Wr.call(e,a[s])&&n.push("["+t(a[s])+"]: "+t(e[a[s]],e));return n}var sn=gr,fn=function(e,t){var r=vr(e,!!t);return"function"==typeof r&&jr(e,".prototype.")>-1?wr(r):r},ln=function e(t,r,n,o){var i=r||{};if(Zr(i,"quoteStyle")&&"single"!==i.quoteStyle&&"double"!==i.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Zr(i,"maxStringLength")&&("number"==typeof i.maxStringLength?i.maxStringLength<0&&i.maxStringLength!==1/0:null!==i.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var a=!Zr(i,"customInspect")||i.customInspect;if("boolean"!=typeof a&&"symbol"!==a)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Zr(i,"indent")&&null!==i.indent&&"\t"!==i.indent&&!(parseInt(i.indent,10)===i.indent&&i.indent>0))throw new TypeError('options "indent" must be "\\t", an integer > 0, or `null`');if(void 0===t)return"undefined";if(null===t)return"null";if("boolean"==typeof t)return t?"true":"false";if("string"==typeof t)return tn(t,i);if("number"==typeof t)return 0===t?1/0/t>0?"0":"-0":String(t);if("bigint"==typeof t)return String(t)+"n";var u=void 0===i.depth?5:i.depth;if(void 0===n&&(n=0),n>=u&&u>0&&"object"==typeof t)return Jr(t)?"[Array]":"[Object]";var c=function(e,t){var r;if("\t"===e.indent)r="\t";else{if(!("number"==typeof e.indent&&e.indent>0))return null;r=Array(e.indent+1).join(" ")}return{base:r,prev:Array(t+1).join(r)}}(i,n);if(void 0===o)o=[];else if(en(o,t)>=0)return"[Circular]";function s(t,r,a){if(r&&(o=o.slice()).push(r),a){var u={depth:i.depth};return Zr(i,"quoteStyle")&&(u.quoteStyle=i.quoteStyle),e(t,u,n+1,o)}return e(t,i,n+1,o)}if("function"==typeof t){var f=function(e){if(e.name)return e.name;var t=Nr.call(Dr.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}(t),l=cn(t,s);return"[Function"+(f?": "+f:" (anonymous)")+"]"+(l.length>0?" { "+l.join(", ")+" }":"")}if(Qr(t)){var p=Lr?String(t).replace(/^(Symbol\(.*\))_[^)]*$/,"$1"):Br.call(t);return"object"!=typeof t||Lr?p:nn(p)}if(function(e){return!(!e||"object"!=typeof e)&&("undefined"!=typeof HTMLElement&&e instanceof HTMLElement||"string"==typeof e.nodeName&&"function"==typeof e.getAttribute)}(t)){for(var y="<"+String(t.nodeName).toLowerCase(),d=t.attributes||[],h=0;h<d.length;h++)y+=" "+d[h].name+"="+Xr($r(d[h].value),"double",i);return y+=">",t.childNodes&&t.childNodes.length&&(y+="..."),y+"</"+String(t.nodeName).toLowerCase()+">"}if(Jr(t)){if(0===t.length)return"[]";var m=cn(t,s);return c&&!function(e){for(var t=0;t<e.length;t++)if(en(e[t],"\n")>=0)return!1;return!0}(m)?"["+un(m,c)+"]":"[ "+m.join(", ")+" ]"}if(function(e){return!("[object Error]"!==Yr(e)||Gr&&"object"==typeof e&&Gr in e)}(t)){var g=cn(t,s);return 0===g.length?"["+String(t)+"]":"{ ["+String(t)+"] "+g.join(", ")+" }"}if("object"==typeof t&&a){if(Hr&&"function"==typeof t[Hr])return t[Hr]();if("symbol"!==a&&"function"==typeof t.inspect)return t.inspect()}if(function(e){if(!Ar||!e||"object"!=typeof e)return!1;try{Ar.call(e);try{xr.call(e)}catch(e){return!0}return e instanceof Map}catch(e){}return!1}(t)){var b=[];return _r.call(t,(function(e,r){b.push(s(r,t,!0)+" => "+s(e,t))})),an("Map",Ar.call(t),b,c)}if(function(e){if(!xr||!e||"object"!=typeof e)return!1;try{xr.call(e);try{Ar.call(e)}catch(e){return!0}return e instanceof Set}catch(e){}return!1}(t)){var v=[];return Tr.call(t,(function(e){v.push(s(e,t))})),an("Set",xr.call(t),v,c)}if(function(e){if(!Rr||!e||"object"!=typeof e)return!1;try{Rr.call(e,Rr);try{Ir.call(e,Ir)}catch(e){return!0}return e instanceof WeakMap}catch(e){}return!1}(t))return on("WeakMap");if(function(e){if(!Ir||!e||"object"!=typeof e)return!1;try{Ir.call(e,Ir);try{Rr.call(e,Rr)}catch(e){return!0}return e instanceof WeakSet}catch(e){}return!1}(t))return on("WeakSet");if(function(e){if(!Ur||!e||"object"!=typeof e)return!1;try{return Ur.call(e),!0}catch(e){}return!1}(t))return on("WeakRef");if(function(e){return!("[object Number]"!==Yr(e)||Gr&&"object"==typeof e&&Gr in e)}(t))return nn(s(Number(t)));if(function(e){if(!e||"object"!=typeof e||!qr)return!1;try{return qr.call(e),!0}catch(e){}return!1}(t))return nn(s(qr.call(t)));if(function(e){return!("[object Boolean]"!==Yr(e)||Gr&&"object"==typeof e&&Gr in e)}(t))return nn(Cr.call(t));if(function(e){return!("[object String]"!==Yr(e)||Gr&&"object"==typeof e&&Gr in e)}(t))return nn(s(String(t)));if(!function(e){return!("[object Date]"!==Yr(e)||Gr&&"object"==typeof e&&Gr in e)}(t)&&!function(e){return!("[object RegExp]"!==Yr(e)||Gr&&"object"==typeof e&&Gr in e)}(t)){var w=cn(t,s),j=Vr?Vr(t)===Object.prototype:t instanceof Object||t.constructor===Object,O=t instanceof Object?"":"null prototype",S=!j&&Gr&&Object(t)===t&&Gr in t?Yr(t).slice(8,-1):O?"Object":"",P=(j||"function"!=typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(S||O?"["+[].concat(S||[],O||[]).join(": ")+"] ":"");return 0===w.length?P+"{}":c?P+"{"+un(w,c)+"}":P+"{ "+w.join(", ")+" }"}return String(t)},pn=sn("%TypeError%"),yn=sn("%WeakMap%",!0),dn=sn("%Map%",!0),hn=fn("WeakMap.prototype.get",!0),mn=fn("WeakMap.prototype.set",!0),gn=fn("WeakMap.prototype.has",!0),bn=fn("Map.prototype.get",!0),vn=fn("Map.prototype.set",!0),wn=fn("Map.prototype.has",!0),jn=function(e,t){for(var r,n=e;null!==(r=n.next);n=r)if(r.key===t)return n.next=r.next,r.next=e.next,e.next=r,r},On=String.prototype.replace,Sn=/%20/g,Pn="RFC3986",An={default:Pn,formatters:{RFC1738:function(e){return On.call(e,Sn,"+")},RFC3986:function(e){return String(e)}},RFC1738:"RFC1738",RFC3986:Pn},_n=An,En=Object.prototype.hasOwnProperty,kn=Array.isArray,xn=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),Tn=function(e,t){for(var r=t&&t.plainObjects?Object.create(null):{},n=0;n<e.length;++n)void 0!==e[n]&&(r[n]=e[n]);return r},Rn={arrayToObject:Tn,assign:function(e,t){return Object.keys(t).reduce((function(e,r){return e[r]=t[r],e}),e)},combine:function(e,t){return[].concat(e,t)},compact:function(e){for(var t=[{obj:{o:e},prop:"o"}],r=[],n=0;n<t.length;++n)for(var o=t[n],i=o.obj[o.prop],a=Object.keys(i),u=0;u<a.length;++u){var c=a[u],s=i[c];"object"==typeof s&&null!==s&&-1===r.indexOf(s)&&(t.push({obj:i,prop:c}),r.push(s))}return function(e){for(;e.length>1;){var t=e.pop(),r=t.obj[t.prop];if(kn(r)){for(var n=[],o=0;o<r.length;++o)void 0!==r[o]&&n.push(r[o]);t.obj[t.prop]=n}}}(t),e},decode:function(e,t,r){var n=e.replace(/\+/g," ");if("iso-8859-1"===r)return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch(e){return n}},encode:function(e,t,r,n,o){if(0===e.length)return e;var i=e;if("symbol"==typeof e?i=Symbol.prototype.toString.call(e):"string"!=typeof e&&(i=String(e)),"iso-8859-1"===r)return escape(i).replace(/%u[0-9a-f]{4}/gi,(function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"}));for(var a="",u=0;u<i.length;++u){var c=i.charCodeAt(u);45===c||46===c||95===c||126===c||c>=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122||o===_n.RFC1738&&(40===c||41===c)?a+=i.charAt(u):c<128?a+=xn[c]:c<2048?a+=xn[192|c>>6]+xn[128|63&c]:c<55296||c>=57344?a+=xn[224|c>>12]+xn[128|c>>6&63]+xn[128|63&c]:(u+=1,c=65536+((1023&c)<<10|1023&i.charCodeAt(u)),a+=xn[240|c>>18]+xn[128|c>>12&63]+xn[128|c>>6&63]+xn[128|63&c])}return a},isBuffer:function(e){return!(!e||"object"!=typeof e||!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e)))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(kn(e)){for(var r=[],n=0;n<e.length;n+=1)r.push(t(e[n]));return r}return t(e)},merge:function e(t,r,n){if(!r)return t;if("object"!=typeof r){if(kn(t))t.push(r);else{if(!t||"object"!=typeof t)return[t,r];(n&&(n.plainObjects||n.allowPrototypes)||!En.call(Object.prototype,r))&&(t[r]=!0)}return t}if(!t||"object"!=typeof t)return[t].concat(r);var o=t;return kn(t)&&!kn(r)&&(o=Tn(t,n)),kn(t)&&kn(r)?(r.forEach((function(r,o){if(En.call(t,o)){var i=t[o];i&&"object"==typeof i&&r&&"object"==typeof r?t[o]=e(i,r,n):t.push(r)}else t[o]=r})),t):Object.keys(r).reduce((function(t,o){var i=r[o];return En.call(t,o)?t[o]=e(t[o],i,n):t[o]=i,t}),o)}},In=function(){var e,t,r,n={assert:function(e){if(!n.has(e))throw new pn("Side channel does not contain "+ln(e))},get:function(n){if(yn&&n&&("object"==typeof n||"function"==typeof n)){if(e)return hn(e,n)}else if(dn){if(t)return bn(t,n)}else if(r)return function(e,t){var r=jn(e,t);return r&&r.value}(r,n)},has:function(n){if(yn&&n&&("object"==typeof n||"function"==typeof n)){if(e)return gn(e,n)}else if(dn){if(t)return wn(t,n)}else if(r)return function(e,t){return!!jn(e,t)}(r,n);return!1},set:function(n,o){yn&&n&&("object"==typeof n||"function"==typeof n)?(e||(e=new yn),mn(e,n,o)):dn?(t||(t=new dn),vn(t,n,o)):(r||(r={key:{},next:null}),function(e,t,r){var n=jn(e,t);n?n.value=r:e.next={key:t,next:e.next,value:r}}(r,n,o))}};return n},Un=Rn,Cn=An,Fn=Object.prototype.hasOwnProperty,Dn={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},Nn=Array.isArray,qn=Array.prototype.push,Mn=function(e,t){qn.apply(e,Nn(t)?t:[t])},Bn=Date.prototype.toISOString,Ln=Cn.default,Wn={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:Un.encode,encodeValuesOnly:!1,format:Ln,formatter:Cn.formatters[Ln],indices:!1,serializeDate:function(e){return Bn.call(e)},skipNulls:!1,strictNullHandling:!1},Vn=function e(t,r,n,o,i,a,u,c,s,f,l,p,y,d,h){var m,g=t;if(h.has(t))throw new RangeError("Cyclic object value");if("function"==typeof u?g=u(r,g):g instanceof Date?g=f(g):"comma"===n&&Nn(g)&&(g=Un.maybeMap(g,(function(e){return e instanceof Date?f(e):e}))),null===g){if(o)return a&&!y?a(r,Wn.encoder,d,"key",l):r;g=""}if("string"==typeof(m=g)||"number"==typeof m||"boolean"==typeof m||"symbol"==typeof m||"bigint"==typeof m||Un.isBuffer(g))return a?[p(y?r:a(r,Wn.encoder,d,"key",l))+"="+p(a(g,Wn.encoder,d,"value",l))]:[p(r)+"="+p(String(g))];var b,v=[];if(void 0===g)return v;if("comma"===n&&Nn(g))b=[{value:g.length>0?g.join(",")||null:void 0}];else if(Nn(u))b=u;else{var w=Object.keys(g);b=c?w.sort(c):w}for(var j=0;j<b.length;++j){var O=b[j],S="object"==typeof O&&void 0!==O.value?O.value:g[O];if(!i||null!==S){var P=Nn(g)?"function"==typeof n?n(r,O):r:r+(s?"."+O:"["+O+"]");h.set(t,!0);var A=In();Mn(v,e(S,P,n,o,i,a,u,c,s,f,l,p,y,d,A))}}return v},zn=Rn,Hn=(Object.prototype.hasOwnProperty,Array.isArray,zn.decode,function(e,t){var r,n=e,o=function(e){if(!e)return Wn;if(null!==e.encoder&&void 0!==e.encoder&&"function"!=typeof e.encoder)throw new TypeError("Encoder has to be a function.");var t=e.charset||Wn.charset;if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=Cn.default;if(void 0!==e.format){if(!Fn.call(Cn.formatters,e.format))throw new TypeError("Unknown format option provided.");r=e.format}var n=Cn.formatters[r],o=Wn.filter;return("function"==typeof e.filter||Nn(e.filter))&&(o=e.filter),{addQueryPrefix:"boolean"==typeof e.addQueryPrefix?e.addQueryPrefix:Wn.addQueryPrefix,allowDots:void 0===e.allowDots?Wn.allowDots:!!e.allowDots,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:Wn.charsetSentinel,delimiter:void 0===e.delimiter?Wn.delimiter:e.delimiter,encode:"boolean"==typeof e.encode?e.encode:Wn.encode,encoder:"function"==typeof e.encoder?e.encoder:Wn.encoder,encodeValuesOnly:"boolean"==typeof e.encodeValuesOnly?e.encodeValuesOnly:Wn.encodeValuesOnly,filter:o,format:r,formatter:n,serializeDate:"function"==typeof e.serializeDate?e.serializeDate:Wn.serializeDate,skipNulls:"boolean"==typeof e.skipNulls?e.skipNulls:Wn.skipNulls,sort:"function"==typeof e.sort?e.sort:null,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:Wn.strictNullHandling}}(t);"function"==typeof o.filter?n=(0,o.filter)("",n):Nn(o.filter)&&(r=o.filter);var i,a=[];if("object"!=typeof n||null===n)return"";i=t&&t.arrayFormat in Dn?t.arrayFormat:t&&"indices"in t?t.indices?"indices":"repeat":"indices";var u=Dn[i];r||(r=Object.keys(n)),o.sort&&r.sort(o.sort);for(var c=In(),s=0;s<r.length;++s){var f=r[s];o.skipNulls&&null===n[f]||Mn(a,Vn(n[f],f,u,o.strictNullHandling,o.skipNulls,o.encode?o.encoder:null,o.filter,o.sort,o.allowDots,o.serializeDate,o.format,o.formatter,o.encodeValuesOnly,o.charset,c))}var l=a.join(o.delimiter),p=!0===o.addQueryPrefix?"?":"";return o.charsetSentinel&&("iso-8859-1"===o.charset?p+="utf8=%26%2310003%3B&":p+="utf8=%E2%9C%93&"),l.length>0?p+l:""}),Gn=function(){function e(t){Nt(this,e),this.query=t,this.uri=""}return Mt(e,[{key:"parse",value:function(){return this.includes(),this.appends(),this.fields(),this.filters(),this.sorts(),this.page(),this.limit(),this.params(),this.uri}},{key:"prepend",value:function(){return""===this.uri?"?":"&"}},{key:"includes",value:function(){!this.query.include.length>0||(this.uri+="".concat(this.prepend()+this.query.queryParameters.includes,"=").concat(this.query.include))}},{key:"appends",value:function(){!this.query.append.length>0||(this.uri+="".concat(this.prepend()+this.query.queryParameters.appends,"=").concat(this.query.append))}},{key:"fields",value:function(){if(!(!Object.keys(this.query.fields).length>0)){var e=Bt({},"".concat(this.query.queryParameters.fields,"[").concat(this.query.model,"]"),this.query.fields);this.uri+=this.prepend()+Hn(e,{encode:!1})}}},{key:"filters",value:function(){if(!(!Object.keys(this.query.filters).length>0)){var e=Bt({},this.query.queryParameters.filters,this.query.filters);this.uri+=this.prepend()+Hn(e,{encode:!1})}}},{key:"sorts",value:function(){!this.query.sorts.length>0||(this.uri+="".concat(this.prepend()+this.query.queryParameters.sort,"=").concat(this.query.sorts))}},{key:"page",value:function(){null!==this.query.pageValue&&(this.uri+="".concat(this.prepend()+this.query.queryParameters.page,"=").concat(this.query.pageValue))}},{key:"limit",value:function(){null!==this.query.limitValue&&(this.uri+="".concat(this.prepend()+this.query.queryParameters.limit,"=").concat(this.query.limitValue))}},{key:"params",value:function(){null!==this.query.paramsObj&&(this.uri+=this.prepend()+Hn(this.query.paramsObj,{encode:!1}))}}]),e}(),Xn=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Nt(this,e),this.model=null,this.base_url=t.base_url||null,this.queryParameters=t.queryParameters||{filters:"filter",fields:"fields",includes:"include",appends:"append",page:"page",limit:"limit",sort:"sort"},this.include=[],this.append=[],this.sorts=[],this.fields={},this.filters={},this.pageValue=null,this.limitValue=null,this.paramsObj=null,this.parser=new Gn(this)}return Mt(e,[{key:"for",value:function(e){return this.model=e,this}},{key:"get",value:function(){var e=this.base_url?this.base_url+this.parseQuery():this.parseQuery();return this.reset(),e}},{key:"url",value:function(){return this.get()}},{key:"reset",value:function(){this.parser.uri=""}},{key:"parseQuery",value:function(){if(!this.model)throw new Error("Please call the for() method before adding filters or calling url() / get().");return"/".concat(this.model).concat(this.parser.parse())}},{key:"includes",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];if(!t.length)throw new Error("The ".concat(this.queryParameters.includes,"s() function takes at least one argument."));return this.include=t,this}},{key:"appends",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];if(!t.length)throw new Error("The ".concat(this.queryParameters.appends,"s() function takes at least one argument."));return this.append=t,this}},{key:"select",value:function(){for(var e=this,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];if(!r.length)throw new Error("The ".concat(this.queryParameters.fields,"() function takes a single argument of an array."));return(r[0].constructor===String||Array.isArray(r[0]))&&(this.fields=r.join(",")),r[0].constructor===Object&&Object.entries(r[0]).forEach((function(t){var r=Dt(t,2),n=r[0],o=r[1];e.fields[n]=o.join(",")})),this}},{key:"where",value:function(e,t){if(void 0===e||void 0===t)throw new Error("The where() function takes 2 arguments both of string values.");if(Array.isArray(t)||t instanceof Object)throw new Error("The second argument to the where() function must be a string. Use whereIn() if you need to pass in an array.");return this.filters[e]=t,this}},{key:"whereIn",value:function(e,t){if(!e||!t)throw new Error("The whereIn() function takes 2 arguments of (string, array).");if(!e&&Array.isArray(e)||"object"===ct(e))throw new Error("The first argument for the whereIn() function must be a string or integer.");if(!Array.isArray(t))throw new Error("The second argument for the whereIn() function must be an array.");return this.filters[e]=t.join(","),this}},{key:"sort",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.sorts=t,this}},{key:"page",value:function(e){if(!Number.isInteger(e))throw new Error("The page() function takes a single argument of a number");return this.pageValue=e,this}},{key:"limit",value:function(e){if(!Number.isInteger(e))throw new Error("The limit() function takes a single argument of a number.");return this.limitValue=e,this}},{key:"params",value:function(e){if(void 0===e||e.constructor!==Object)throw new Error("The params() function takes a single argument of an object.");return this.paramsObj=e,this}}]),e}(),$n=function(e,t){return{create:function(r){return t.post(e,r)},update:function(r,n){return t.put("".concat(e,"/").concat(r),n)},delete:function(r){return t.delete("".concat(e,"/").concat(r))},get:function(r){return t.get("".concat(e,"/").concat(r))},getAll:function(){return t.get(e)},search:function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){},n=r((new Xn).for(e)).get();return t.get(n.replace("//","/"))}}},Jn="undefined"==typeof arguments?void 0:arguments,Qn=function(e){var t=Dt((0,r.useState)(!1),2),n=t[0],o=t[1];return[function(){return o(!0),e.apply(null,Jn).finally((function(){return o(!1)}))},n]},Kn=function(e,t){var n=t.model,o=t.getter,i=t.subscribe,a=t.unsubscribe,u=Dt((0,r.useState)(null),2),c=u[0],s=u[1];return(0,r.useEffect)((function(){o(e).then((function(e){return s(e.data)}))}),[e]),(0,r.useEffect)((function(){if(c&&i)return i(e,"updated",(function(e){return s(e[n])})),i(e,"deleted",(function(){return s(null)})),function(){return a&&a(e)}}),[c]),[c,s]},Zn=function(e){var t=e.model,n=e.getter,o=e.subscribe,i=e.unsubscribe,a=Dt((0,r.useState)(null),2),u=a[0],c=a[1];return(0,r.useEffect)((function(){c(null),n().then((function(e){return c(e.data)}))}),[n]),(0,r.useEffect)((function(){if(o&&u)return o(null,"created",(function(e){var r=!1;u.map((function(n){n.id===e[t].id&&(r=!0)})),r||c(u.concat([e[t]]))})),u.map((function(e){var r=e.id;o(r,"updated",(function(e){c(u.map((function(n){return n.id===r?e[t]:n})))})),o(r,"deleted",(function(){c(u.filter((function(e){return e.id!==r})))}))})),function(){return u.map((function(e){return i(e.id)}))}}),[u]),[u,c]},Yn=function e(t,r,n){n instanceof Array?n.map((function(n,o){var i=r+("object"===ct(n)?"":"[".concat(o,"]"));e(t,i,n)})):null==n?t.append(r,""):"object"===ct(n)?Object.entries(n).map((function(n){var o=Dt(n,2),i=o[0],a=o[1];e(t,"".concat(r,"[").concat(i,"]"),a)})):t.append(r,n)};function eo(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function to(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?eo(Object(r),!0).forEach((function(t){Bt(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):eo(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var ro=function(e){if(e&&"undefined"!=typeof localStorage){var t=localStorage.getItem("fl-mockup-cache-".concat(e));if(t)return JSON.parse(t)}return null},no=function(e,t){e&&"undefined"!=typeof localStorage&&localStorage.setItem("fl-mockup-cache-".concat(e),JSON.stringify(t))},oo={"/users/12121212":{get:function(e){return e.selectRow("users",12121212)}},"/libraries?filter[owner_id]=12121212&filter[owner_type]=user&filter[visibility]=public":{get:function(e){return[e.selectRow("libraries",24242424)]}},"/libraries/24242424":{get:function(e){return e.selectRow("libraries",24242424)}},"/libraries/24242424/library-items?sort=name":{get:function(e){return[e.selectRow("library_items",35353535)]}},"/library-items/35353535":{get:function(e){return e.selectRow("library_items",35353535)}}},io={users:{schema:{first_name:null,last_name:null,name:null,gravatar:{sm:"https://i.pravatar.cc/75",md:"https://i.pravatar.cc/200",lg:"https://i.pravatar.cc/300"}},rows:[{id:12121212,first_name:"Test",last_name:"User",name:"Test User"}]},libraries:{schema:{visibility:"public",name:null,description:null,owner_id:null,owner_type:"user",owner_name:null,created_by:null,created_at:"2020-09-14T02:18:55.000000Z",updated_at:"2020-09-14T02:18:55.000000Z",collections:[],permissions:{owner:!1,shared:!1,role:null,update:!1,delete:!1,edit_collections:!1,edit_items:!1,view_team:!1},media:{thumb:{id:1,uuid:"a6f7ffba-f977-47b8-9e7e-74cb7fede885",file_name:"screenshot.png",mime_type:"image/png",size:"875.64 KB",model_type:"library-item",model_id:690,upload_hash:"5cbc0832b7a6235f6938221a7bd5532e655a32b3",url:"https://www.fillmurray.com/640/360",sizes:{large:{width:1e3,height:1e3,url:"https://www.fillmurray.com/640/360"},small:{width:250,height:250,url:"https://www.fillmurray.com/640/360"},thumb:{width:300,height:300,url:"https://www.fillmurray.com/640/360"},medium:{width:500,height:500,url:"https://www.fillmurray.com/640/360"},original:{width:1e3,height:1e3,url:"https://www.fillmurray.com/640/360"}}}}},rows:[{id:24242424,name:"Fill Murray",description:"Some images of the man himself.",owner_id:99999999,owner_type:"user",owner_name:"Test User",created_by:99999999}]},library_items:{schema:{library_id:null,type:null,name:null,description:"",collections:[],data:[],created_at:"2020-10-26T17:34:46.000000Z",updated_at:"2020-10-26T17:34:46.000000Z",media:{file:{id:1,uuid:"a6f7ffba-f977-47b8-9e7e-74cb7fede885",file_name:"screenshot.png",mime_type:"image/png",size:"875.64 KB",model_type:"library-item",model_id:690,upload_hash:"5cbc0832b7a6235f6938221a7bd5532e655a32b3",url:"https://www.fillmurray.com/640/360",sizes:{large:{width:1e3,height:1e3,url:"https://www.fillmurray.com/640/360"},small:{width:250,height:250,url:"https://www.fillmurray.com/640/360"},thumb:{width:300,height:300,url:"https://www.fillmurray.com/640/360"},medium:{width:500,height:500,url:"https://www.fillmurray.com/640/360"},original:{width:1e3,height:1e3,url:"https://www.fillmurray.com/640/360"}}}}},rows:[{id:35353535,library_id:24242424,type:"image",name:"Sample Image"}]}};function ao(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function uo(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ao(Object(r),!0).forEach((function(t){Bt(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ao(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function co(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function so(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?co(Object(r),!0).forEach((function(t){Bt(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):co(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function fo(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function lo(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?fo(Object(r),!0).forEach((function(t){Bt(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):fo(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function po(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function yo(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?po(Object(r),!0).forEach((function(t){Bt(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):po(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var ho={auth:Ct,accounts:function(e){return uo(uo({},{publicInfo:function(t,r){return e.get("/accounts/info/".concat(t,"/").concat(r))},publicInfoByUsername:function(t){return e.get("/accounts/info-by-name/".concat(t))},usernameExists:function(t){return e.get("/accounts/exists/".concat(t))}}),{})},user:function(e){return so(so({},{get:function(){return e.get("/account/user")},update:function(t){return t.append?t.append("_method","PUT"):t._method="PUT",e.post("/account/user/update",t)},delete:function(){return e.post("/account/user/delete")},getInvites:function(){return e.get("/account/user/invite")},invite:function(t){return e.post("/account/user/invite",{email:t})},resendInvite:function(t){return e.post("/account/user/invite/".concat(t,"/resend"))},cancelInvite:function(t){return e.post("/account/user/invite/".concat(t,"/cancel"))},verifyInvite:function(t){return e.post("/account/user/invite/".concat(t,"/verify"))}}),{})},teams:function(e){var t=lo(lo({},$n("/account/teams",e)),{},{update:function(t,r){return r.append?r.append("_method","PUT"):r._method="PUT",e.post("/account/teams/".concat(t),r)},getInvites:function(t){return e.get("/account/teams/".concat(t,"/invite"))},invite:function(t,r,n){return e.post("/account/teams/".concat(t,"/invite"),{email:r,role:n})},acceptInvite:function(t){return e.post("/account/teams/invite/".concat(t,"/accept"))},resendInvite:function(t){return e.post("/account/teams/invite/".concat(t,"/resend"))},cancelInvite:function(t){return e.post("/account/teams/invite/".concat(t,"/cancel"))},getMembers:function(t){return e.get("/account/teams/".concat(t,"/members"))},switchRole:function(t,r,n){return e.put("/account/teams/".concat(t,"/members/").concat(r,"/role"),{role:n})},transferToMember:function(t,r){return e.put("/account/teams/".concat(t,"/members/").concat(r,"/transfer"))},removeMember:function(t,r){return e.delete("/account/teams/".concat(t,"/members/").concat(r))},leaveTeam:function(t){return e.delete("/account/teams/".concat(t,"/members/leave"))}}),n={useAll:function(){return Zn({getter:t.getAll})},useOne:function(e){return Kn(e,{getter:t.get})},useInvites:function(e){return Zn({getter:(0,r.useCallback)((function(){return t.getInvites(e)}),[e])})}};return lo(lo({},t),n)},drip:function(e){return{subscribe:function(t){return e.post("/account/drip/subscribe",t)}}},libraries:function(e,t){var n={getAll:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"user",t=arguments.length>1?arguments[1]:void 0;return n.search((function(r){return e&&!t?"object"===ct(e)?r.whereIn("owner_type",e):r.where("owner_type",e):t&&(r.where("owner_type","team"),r.where("owner_id",t)),r}))},getAllSortedByOwner:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"ASC",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"name",r={user:[],team:{},shared:[]},o=function(r){return r.sort(("ASC"===e?"":"-")+t),r.whereIn("owner_type",["user","shared","team"]),r};return n.search(o).then((function(e){return e.data.map((function(e){e.permissions.shared&&!e.permissions.view_team?r.shared.push(e):"user"===e.owner_type?r.user.push(e):"team"===e.owner_type&&(r.team[e.owner_id]||(r.team[e.owner_id]=[]),r.team[e.owner_id].push(e))})),r}))},get:function(t){return e.get("/libraries/".concat(t))},create:function(t){return e.post("/libraries",t)},update:function(t,r){return r.append?r.append("_method","PUT"):r._method="PUT",e.post("/libraries/".concat(t),r)},delete:function(t){return e.delete("/libraries/".concat(t))},duplicate:function(t){return e.post("/libraries/".concat(t,"/duplicate"))},search:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(e){return e},r=(new Xn).for("/libraries"),n=t(r).get().replace("//","/");return e.get(n)},subscribe:function(e,t,r){},unsubscribe:function(e){},getCollections:function(t){return e.get("/libraries/".concat(t,"/library-collections"))},getCollection:function(t){return e.get("/library-collections/".concat(t))},createCollection:function(t,r){return e.post("/libraries/".concat(t,"/library-collections"),r)},updateCollection:function(t,r){return e.put("/library-collections/".concat(t),r)},deleteCollection:function(t){return e.delete("/library-collections/".concat(t))},getItems:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.get("/libraries/".concat(t,"/library-items"),{params:r})},getItem:function(t){return e.get("/library-items/".concat(t))},createItem:function(t,r){return e.post("/libraries/".concat(t,"/library-items"),r)},updateItem:function(t,r){return r.append?r.append("_method","PUT"):r._method="PUT",e.post("/library-items/".concat(t),r)},deleteItem:function(t){return e.delete("/library-items/".concat(t))},searchItems:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(e){return e},n="/libraries/".concat(t,"/library-items"),o=(new Xn).for(n),i=r(o).get().replace("//","/");return e.get(i)},moveItem:function(t,r){return e.put("/library-items/".concat(r,"/move"),{library_id:t})},getInvites:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"share";return e.get("/libraries/".concat(t,"/invite?type=").concat(r))},invite:function(t,r,n){return e.post("/libraries/".concat(t,"/invite"),{email:r,role:n})},requestTransfer:function(t,r){return e.put("/libraries/".concat(t,"/invite/transfer"),{username:r})},acceptInvite:function(t){return e.post("/libraries/invite/".concat(t,"/accept"))},resendInvite:function(t){return e.post("/libraries/invite/".concat(t,"/resend"))},cancelInvite:function(t){return e.post("/libraries/invite/".concat(t,"/cancel"))},join:function(t){return e.put("/libraries/".concat(t,"/members/join"))},getMembers:function(t){return e.get("/libraries/".concat(t,"/members"))},switchRole:function(t,r,n){return e.put("/libraries/".concat(t,"/members/").concat(r,"/role"),{role:n})},transferToMember:function(t,r){return e.put("/libraries/".concat(t,"/members/").concat(r,"/transfer"))},removeMember:function(t,r){return e.delete("/libraries/".concat(t,"/members/").concat(r))},leaveLibrary:function(t){return e.delete("/libraries/".concat(t,"/members/leave"))}},o={useAll:function(e,t){return Zn({model:"library",getter:(0,r.useCallback)((function(){return n.getAll(e,t)}),[e,t])})},useOne:function(e){return Kn(e,{model:"library",getter:n.get})},useCollections:function(e){return Zn({getter:(0,r.useCallback)((function(){return n.getCollections(e)}),[e])})},useCollection:function(e){return Kn(e,{getter:n.getCollection})},useItems:function(e){return Zn({getter:(0,r.useCallback)((function(){return n.getItems(e)}),[e])})},useItem:function(e){return Kn(e,{getter:n.getItem})}};return yo(yo({},n),o)},billing:function(e){var t={getSubscriptionData:function(){return e.get("/billing/subscription/subscription-data")},getTeamSubscriptionData:function(t){return e.get("/billing/subscription/team-subscription-data/".concat(t))},getSubscriptionPricing:function(t){return e.get("/billing/subscription/subscription-pricing",{params:t})},subscribe:function(t){return e.post("/billing/subscription/subscribe",t)},subscribeTeam:function(t,r){return e.post("/billing/subscription/subscribe-team/".concat(t),r)},cancelSubscription:function(){return e.post("/billing/subscription/cancel-subscription")},cancelTeamSubscription:function(t){return e.post("/billing/subscription/cancel-team-subscription/".concat(t))},currentUserHasPlan:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,r=FL.Assistant.data.getSystemState(),n=r.user,o=r.cloudUser;return n?t.userHasPlan(n,e):!!o&&t.userHasPlan(o,e)},userHasPlan:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=e.subscription_plan;return void 0!==r&&void 0!==r.slug&&"free"!==r.slug&&(!t||t===r.slug)},teamHasPlan:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=e.subscription_plan;return void 0!==r&&void 0!==r.slug&&"free"!==r.slug&&(!t||t===r.slug)}};return t}},mo={users:function(e){return $n("/admin/users",e)},teams:function(e){return $n("/admin/teams",e)}},go=function(e){var t=e.apiUrl,r=function(e){var t=e.apiUrl,r=void 0===t?"":t,n=he.create({baseURL:"".concat(r,"/api"),crossDomain:!0,headers:{common:{Accept:"application/json","Content-Type":"application/json","X-Requested-With":"XMLHttpRequest","Access-Control-Allow-Origin":"*"}}});n.interceptors.request.use((function(e){return jt()&&(e.headers.Authorization="Bearer "+Ot()),e.data instanceof FormData&&(e.headers.common["Content-Type"]="multipart/form-data"),e}),ut.reject);var o=[],i=!1;return n.interceptors.response.use((function(e){return e}),(function(e){var t=e.config,r=e.response;return!r||401!==r.status||t.url.includes("/iam/")?ut.reject(e):(i||(i=!0,Ct(n).refresh().then((function(){o.map((function(e){e.config.headers.Authorization="Bearer "+Ot(),e.resolve(n(e.config))}))})).finally((function(){o=[],i=!1}))),new ut((function(e,r){o.push({config:t,resolve:e,reject:r})})))})),n}({apiUrl:void 0===t?"":t}),n={http:r,session:Ut,admin:{}};for(var o in function(e){var t=function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).cacheKey,t=ro(e),r=t?to({},t):{tables:{},schema:{}},n=function(e){for(var t in e){var r=e[t],n=r.schema,i=r.rows;o(t,n,i)}},o=function(t,n){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];r[t]||(r.tables[t]=[],r.schema[t]=n,o.map((function(e){return i(t,e)})),no(e,r))},i=function(t,n){r.tables[t].push(to(to({id:(new Date).getTime()+r.tables[t].length},r.schema[t]),n)),no(e,r)},a=function(e,t){return r.tables[e].filter((function(e){return e.id===t})).pop()},u=function(t,n,o){var i=r.tables[t];r.tables[t]=i.map((function(e){return e.id===n?to(to({},e),o):e})),no(e,r)},c=function(t,n){var o=r.tables[t];r.tables[t]=o.filter((function(e){return e.id!==n})),no(e,r)};return{db:r,createTables:n,createTable:o,insertRow:i,selectRow:a,updateRow:u,deleteRow:c}}({cacheKey:"cloud"});t.createTables(io),function(e,t){e.interceptors.request.use((function(e){if(oo[e.url]){var t=new Error;return t.methods=oo[e.url],t.config=e,ut.reject(t)}return e}),ut.reject),e.interceptors.response.use((function(e){return e}),(function(e){if(e.methods){var r=e.methods[e.config.method];return r?ut.resolve({data:r(t),status:200,statusText:"OK",headers:{},mockup:!0,config:e.config}):ut.reject(e)}return ut.reject(e)}))}(e,t)}(r),ho)n[o]=ho[o](r);for(var i in mo)n.admin[i]=mo[i](r);return n};window.FL=window.FL||{},FL.vendors=FL.vendors||{},FL.vendors.BBCloud=t})();
1 +(()=>{var t={1928:t=>{"use strict";function e(t){this.message=t}e.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},e.prototype.__CANCEL__=!0,t.exports=e},2012:(t,e,r)=>{"use strict";var n=r(9516),o=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];t.exports=function(t){var e,r,i,a={};return t?(n.forEach(t.split("\n"),(function(t){if(i=t.indexOf(":"),e=n.trim(t.substr(0,i)).toLowerCase(),r=n.trim(t.substr(i+1)),e){if(a[e]&&o.indexOf(e)>=0)return;a[e]="set-cookie"===e?(a[e]?a[e]:[]).concat([r]):a[e]?a[e]+", "+r:r}})),a):a}},2505:(t,e,r)=>{t.exports=r(8015)},2881:(t,e,r)=>{"use strict";var n=r(9516),o=r(6987);t.exports=function(t,e,r){var i=this||o;return n.forEach(r,(function(r){t=r.call(i,t,e)})),t}},3191:(t,e,r)=>{"use strict";var n=r(1928);function o(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");var e;this.promise=new Promise((function(t){e=t}));var r=this;this.promise.then((function(t){if(r._listeners){var e,n=r._listeners.length;for(e=0;e<n;e++)r._listeners[e](t);r._listeners=null}})),this.promise.then=function(t){var e,n=new Promise((function(t){r.subscribe(t),e=t})).then(t);return n.cancel=function(){r.unsubscribe(e)},n},t((function(t){r.reason||(r.reason=new n(t),e(r.reason))}))}o.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},o.prototype.subscribe=function(t){this.reason?t(this.reason):this._listeners?this._listeners.push(t):this._listeners=[t]},o.prototype.unsubscribe=function(t){if(this._listeners){var e=this._listeners.indexOf(t);-1!==e&&this._listeners.splice(e,1)}},o.source=function(){var t;return{token:new o((function(e){t=e})),cancel:t}},t.exports=o},3471:(t,e,r)=>{"use strict";var n=r(9516);function o(){this.handlers=[]}o.prototype.use=function(t,e,r){return this.handlers.push({fulfilled:t,rejected:e,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1},o.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)},o.prototype.forEach=function(t){n.forEach(this.handlers,(function(e){null!==e&&t(e)}))},t.exports=o},3864:t=>{"use strict";t.exports=function(t){return!(!t||!t.__CANCEL__)}},3948:(t,e,r)=>{"use strict";var n=r(9516);t.exports=n.isStandardBrowserEnv()?{write:function(t,e,r,o,i,a){var u=[];u.push(t+"="+encodeURIComponent(e)),n.isNumber(r)&&u.push("expires="+new Date(r).toGMTString()),n.isString(o)&&u.push("path="+o),n.isString(i)&&u.push("domain="+i),!0===a&&u.push("secure"),document.cookie=u.join("; ")},read:function(t){var e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},4202:(t,e,r)=>{"use strict";var n=r(9516);t.exports=n.isStandardBrowserEnv()?function(){var t,e=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function o(t){var n=t;return e&&(r.setAttribute("href",n),n=r.href),r.setAttribute("href",n),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}return t=o(window.location.href),function(e){var r=n.isString(e)?o(e):e;return r.protocol===t.protocol&&r.host===t.host}}():function(){return!0}},4490:(t,e,r)=>{"use strict";var n=r(9516),o=r(2881),i=r(3864),a=r(6987),u=r(1928);function c(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new u("canceled")}t.exports=function(t){return c(t),t.headers=t.headers||{},t.data=o.call(t,t.data,t.headers,t.transformRequest),t.headers=n.merge(t.headers.common||{},t.headers[t.method]||{},t.headers),n.forEach(["delete","get","head","post","put","patch","common"],(function(e){delete t.headers[e]})),(t.adapter||a.adapter)(t).then((function(e){return c(t),e.data=o.call(t,e.data,e.headers,t.transformResponse),e}),(function(e){return i(e)||(c(t),e&&e.response&&(e.response.data=o.call(t,e.response.data,e.response.headers,t.transformResponse))),Promise.reject(e)}))}},4680:t=>{"use strict";t.exports=function(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}},4841:(t,e,r)=>{"use strict";var n=r(9641).version,o={};["object","boolean","number","function","string","symbol"].forEach((function(t,e){o[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}}));var i={};o.transitional=function(t,e,r){function o(t,e){return"[Axios v"+n+"] Transitional option '"+t+"'"+e+(r?". "+r:"")}return function(r,n,a){if(!1===t)throw new Error(o(n," has been removed"+(e?" in "+e:"")));return e&&!i[n]&&(i[n]=!0,console.warn(o(n," has been deprecated since v"+e+" and will be removed in the near future"))),!t||t(r,n,a)}},t.exports={assertOptions:function(t,e,r){if("object"!=typeof t)throw new TypeError("options must be an object");for(var n=Object.keys(t),o=n.length;o-- >0;){var i=n[o],a=e[i];if(a){var u=t[i],c=void 0===u||a(u,i,t);if(!0!==c)throw new TypeError("option "+i+" must be "+c)}else if(!0!==r)throw Error("Unknown option "+i)}},validators:o}},5019:t=>{"use strict";t.exports=function(t){return"object"==typeof t&&!0===t.isAxiosError}},5155:(t,e,r)=>{"use strict";var n=r(9516),o=r(9106),i=r(3471),a=r(4490),u=r(5343),c=r(4841),s=c.validators;function f(t){this.defaults=t,this.interceptors={request:new i,response:new i}}f.prototype.request=function(t){"string"==typeof t?(t=arguments[1]||{}).url=arguments[0]:t=t||{},(t=u(this.defaults,t)).method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var e=t.transitional;void 0!==e&&c.assertOptions(e,{silentJSONParsing:s.transitional(s.boolean),forcedJSONParsing:s.transitional(s.boolean),clarifyTimeoutError:s.transitional(s.boolean)},!1);var r=[],n=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(n=n&&e.synchronous,r.unshift(e.fulfilled,e.rejected))}));var o,i=[];if(this.interceptors.response.forEach((function(t){i.push(t.fulfilled,t.rejected)})),!n){var f=[a,void 0];for(Array.prototype.unshift.apply(f,r),f=f.concat(i),o=Promise.resolve(t);f.length;)o=o.then(f.shift(),f.shift());return o}for(var l=t;r.length;){var p=r.shift(),y=r.shift();try{l=p(l)}catch(t){y(t);break}}try{o=a(l)}catch(t){return Promise.reject(t)}for(;i.length;)o=o.then(i.shift(),i.shift());return o},f.prototype.getUri=function(t){return t=u(this.defaults,t),o(t.url,t.params,t.paramsSerializer).replace(/^\?/,"")},n.forEach(["delete","get","head","options"],(function(t){f.prototype[t]=function(e,r){return this.request(u(r||{},{method:t,url:e,data:(r||{}).data}))}})),n.forEach(["post","put","patch"],(function(t){f.prototype[t]=function(e,r,n){return this.request(u(n||{},{method:t,url:e,data:r}))}})),t.exports=f},5343:(t,e,r)=>{"use strict";var n=r(9516);t.exports=function(t,e){e=e||{};var r={};function o(t,e){return n.isPlainObject(t)&&n.isPlainObject(e)?n.merge(t,e):n.isPlainObject(e)?n.merge({},e):n.isArray(e)?e.slice():e}function i(r){return n.isUndefined(e[r])?n.isUndefined(t[r])?void 0:o(void 0,t[r]):o(t[r],e[r])}function a(t){if(!n.isUndefined(e[t]))return o(void 0,e[t])}function u(r){return n.isUndefined(e[r])?n.isUndefined(t[r])?void 0:o(void 0,t[r]):o(void 0,e[r])}function c(r){return r in e?o(t[r],e[r]):r in t?o(void 0,t[r]):void 0}var s={url:a,method:a,data:a,baseURL:u,transformRequest:u,transformResponse:u,paramsSerializer:u,timeout:u,timeoutMessage:u,withCredentials:u,adapter:u,responseType:u,xsrfCookieName:u,xsrfHeaderName:u,onUploadProgress:u,onDownloadProgress:u,decompress:u,maxContentLength:u,maxBodyLength:u,transport:u,httpAgent:u,httpsAgent:u,cancelToken:u,socketPath:u,responseEncoding:u,validateStatus:c};return n.forEach(Object.keys(t).concat(Object.keys(e)),(function(t){var e=s[t]||i,o=e(t);n.isUndefined(o)&&e!==c||(r[t]=o)})),r}},5449:t=>{"use strict";t.exports=function(t,e,r,n,o){return t.config=e,r&&(t.code=r),t.request=n,t.response=o,t.isAxiosError=!0,t.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}},t}},5592:(t,e,r)=>{"use strict";var n=r(9516),o=r(7522),i=r(3948),a=r(9106),u=r(9615),c=r(2012),s=r(4202),f=r(7763),l=r(6987),p=r(1928);t.exports=function(t){return new Promise((function(e,r){var y,h=t.data,d=t.headers,m=t.responseType;function g(){t.cancelToken&&t.cancelToken.unsubscribe(y),t.signal&&t.signal.removeEventListener("abort",y)}n.isFormData(h)&&delete d["Content-Type"];var v=new XMLHttpRequest;if(t.auth){var b=t.auth.username||"",w=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";d.Authorization="Basic "+btoa(b+":"+w)}var S=u(t.baseURL,t.url);function j(){if(v){var n="getAllResponseHeaders"in v?c(v.getAllResponseHeaders()):null,i={data:m&&"text"!==m&&"json"!==m?v.response:v.responseText,status:v.status,statusText:v.statusText,headers:n,config:t,request:v};o((function(t){e(t),g()}),(function(t){r(t),g()}),i),v=null}}if(v.open(t.method.toUpperCase(),a(S,t.params,t.paramsSerializer),!0),v.timeout=t.timeout,"onloadend"in v?v.onloadend=j:v.onreadystatechange=function(){v&&4===v.readyState&&(0!==v.status||v.responseURL&&0===v.responseURL.indexOf("file:"))&&setTimeout(j)},v.onabort=function(){v&&(r(f("Request aborted",t,"ECONNABORTED",v)),v=null)},v.onerror=function(){r(f("Network Error",t,null,v)),v=null},v.ontimeout=function(){var e="timeout of "+t.timeout+"ms exceeded",n=t.transitional||l.transitional;t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),r(f(e,t,n.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",v)),v=null},n.isStandardBrowserEnv()){var O=(t.withCredentials||s(S))&&t.xsrfCookieName?i.read(t.xsrfCookieName):void 0;O&&(d[t.xsrfHeaderName]=O)}"setRequestHeader"in v&&n.forEach(d,(function(t,e){void 0===h&&"content-type"===e.toLowerCase()?delete d[e]:v.setRequestHeader(e,t)})),n.isUndefined(t.withCredentials)||(v.withCredentials=!!t.withCredentials),m&&"json"!==m&&(v.responseType=t.responseType),"function"==typeof t.onDownloadProgress&&v.addEventListener("progress",t.onDownloadProgress),"function"==typeof t.onUploadProgress&&v.upload&&v.upload.addEventListener("progress",t.onUploadProgress),(t.cancelToken||t.signal)&&(y=function(t){v&&(r(!t||t&&t.type?new p("canceled"):t),v.abort(),v=null)},t.cancelToken&&t.cancelToken.subscribe(y),t.signal&&(t.signal.aborted?y():t.signal.addEventListener("abort",y))),h||(h=null),v.send(h)}))}},6987:(t,e,r)=>{"use strict";var n=r(9516),o=r(7018),i=r(5449),a={"Content-Type":"application/x-www-form-urlencoded"};function u(t,e){!n.isUndefined(t)&&n.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}var c,s={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:(("undefined"!=typeof XMLHttpRequest||"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(c=r(5592)),c),transformRequest:[function(t,e){return o(e,"Accept"),o(e,"Content-Type"),n.isFormData(t)||n.isArrayBuffer(t)||n.isBuffer(t)||n.isStream(t)||n.isFile(t)||n.isBlob(t)?t:n.isArrayBufferView(t)?t.buffer:n.isURLSearchParams(t)?(u(e,"application/x-www-form-urlencoded;charset=utf-8"),t.toString()):n.isObject(t)||e&&"application/json"===e["Content-Type"]?(u(e,"application/json"),function(t,e,r){if(n.isString(t))try{return(e||JSON.parse)(t),n.trim(t)}catch(t){if("SyntaxError"!==t.name)throw t}return(r||JSON.stringify)(t)}(t)):t}],transformResponse:[function(t){var e=this.transitional||s.transitional,r=e&&e.silentJSONParsing,o=e&&e.forcedJSONParsing,a=!r&&"json"===this.responseType;if(a||o&&n.isString(t)&&t.length)try{return JSON.parse(t)}catch(t){if(a){if("SyntaxError"===t.name)throw i(t,this,"E_JSON_PARSE");throw t}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};n.forEach(["delete","get","head"],(function(t){s.headers[t]={}})),n.forEach(["post","put","patch"],(function(t){s.headers[t]=n.merge(a)})),t.exports=s},7018:(t,e,r)=>{"use strict";var n=r(9516);t.exports=function(t,e){n.forEach(t,(function(r,n){n!==e&&n.toUpperCase()===e.toUpperCase()&&(t[e]=r,delete t[n])}))}},7522:(t,e,r)=>{"use strict";var n=r(7763);t.exports=function(t,e,r){var o=r.config.validateStatus;r.status&&o&&!o(r.status)?e(n("Request failed with status code "+r.status,r.config,null,r.request,r)):t(r)}},7763:(t,e,r)=>{"use strict";var n=r(5449);t.exports=function(t,e,r,o,i){var a=new Error(t);return n(a,e,r,o,i)}},7980:t=>{"use strict";t.exports=function(t){return function(e){return t.apply(null,e)}}},8015:(t,e,r)=>{"use strict";var n=r(9516),o=r(9012),i=r(5155),a=r(5343);var u=function t(e){var r=new i(e),u=o(i.prototype.request,r);return n.extend(u,i.prototype,r),n.extend(u,r),u.create=function(r){return t(a(e,r))},u}(r(6987));u.Axios=i,u.Cancel=r(1928),u.CancelToken=r(3191),u.isCancel=r(3864),u.VERSION=r(9641).version,u.all=function(t){return Promise.all(t)},u.spread=r(7980),u.isAxiosError=r(5019),t.exports=u,t.exports.default=u},9012:t=>{"use strict";t.exports=function(t,e){return function(){for(var r=new Array(arguments.length),n=0;n<r.length;n++)r[n]=arguments[n];return t.apply(e,r)}}},9106:(t,e,r)=>{"use strict";var n=r(9516);function o(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}t.exports=function(t,e,r){if(!e)return t;var i;if(r)i=r(e);else if(n.isURLSearchParams(e))i=e.toString();else{var a=[];n.forEach(e,(function(t,e){null!=t&&(n.isArray(t)?e+="[]":t=[t],n.forEach(t,(function(t){n.isDate(t)?t=t.toISOString():n.isObject(t)&&(t=JSON.stringify(t)),a.push(o(e)+"="+o(t))})))})),i=a.join("&")}if(i){var u=t.indexOf("#");-1!==u&&(t=t.slice(0,u)),t+=(-1===t.indexOf("?")?"?":"&")+i}return t}},9137:t=>{"use strict";t.exports=function(t){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(t)}},9516:(t,e,r)=>{"use strict";var n=r(9012),o=Object.prototype.toString;function i(t){return"[object Array]"===o.call(t)}function a(t){return void 0===t}function u(t){return null!==t&&"object"==typeof t}function c(t){if("[object Object]"!==o.call(t))return!1;var e=Object.getPrototypeOf(t);return null===e||e===Object.prototype}function s(t){return"[object Function]"===o.call(t)}function f(t,e){if(null!=t)if("object"!=typeof t&&(t=[t]),i(t))for(var r=0,n=t.length;r<n;r++)e.call(null,t[r],r,t);else for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.call(null,t[o],o,t)}t.exports={isArray:i,isArrayBuffer:function(t){return"[object ArrayBuffer]"===o.call(t)},isBuffer:function(t){return null!==t&&!a(t)&&null!==t.constructor&&!a(t.constructor)&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)},isFormData:function(t){return"undefined"!=typeof FormData&&t instanceof FormData},isArrayBufferView:function(t){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&t.buffer instanceof ArrayBuffer},isString:function(t){return"string"==typeof t},isNumber:function(t){return"number"==typeof t},isObject:u,isPlainObject:c,isUndefined:a,isDate:function(t){return"[object Date]"===o.call(t)},isFile:function(t){return"[object File]"===o.call(t)},isBlob:function(t){return"[object Blob]"===o.call(t)},isFunction:s,isStream:function(t){return u(t)&&s(t.pipe)},isURLSearchParams:function(t){return"undefined"!=typeof URLSearchParams&&t instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:f,merge:function t(){var e={};function r(r,n){c(e[n])&&c(r)?e[n]=t(e[n],r):c(r)?e[n]=t({},r):i(r)?e[n]=r.slice():e[n]=r}for(var n=0,o=arguments.length;n<o;n++)f(arguments[n],r);return e},extend:function(t,e,r){return f(e,(function(e,o){t[o]=r&&"function"==typeof e?n(e,r):e})),t},trim:function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")},stripBOM:function(t){return 65279===t.charCodeAt(0)&&(t=t.slice(1)),t}}},9615:(t,e,r)=>{"use strict";var n=r(9137),o=r(4680);t.exports=function(t,e){return t&&!n(e)?o(t,e):e}},9641:t=>{t.exports={version:"0.22.0"}}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var i=e[n]={exports:{}};return t[n](i,i.exports,r),i.exports}r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{"use strict";var t={};r.r(t),r.d(t,{appendFormDataObject:()=>un,createCloudClient:()=>An,useApiRequest:()=>nn});var e=r(2505),n=r.n(e);const o=React;var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==r.g?r.g:"undefined"!=typeof self?self:{};var a=u;function u(t){s.length||c(),s[s.length]=t}var c,s=[],f=0;function l(){for(;f<s.length;){var t=f;if(f+=1,s[t].call(),f>1024){for(var e=0,r=s.length-f;e<r;e++)s[e]=s[e+f];s.length-=f,f=0}}s.length=0,f=0}var p,y,h,d=void 0!==i?i:self,m=d.MutationObserver||d.WebKitMutationObserver;function g(t){return function(){var e=setTimeout(n,0),r=setInterval(n,50);function n(){clearTimeout(e),clearInterval(r),t()}}}"function"==typeof m?(p=1,y=new m(l),h=document.createTextNode(""),y.observe(h,{characterData:!0}),c=function(){p=-p,h.data=p}):c=g(l),u.requestFlush=c,u.makeRequestCallFromTimer=g;var v=a;function b(){}var w=null,S={},j=O;function O(t){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof t)throw new TypeError("Promise constructor's argument is not a function");this._U=0,this._V=0,this._W=null,this._X=null,t!==b&&k(t,this)}function A(t,e){for(;3===t._V;)t=t._W;if(O._Y&&O._Y(t),0===t._V)return 0===t._U?(t._U=1,void(t._X=e)):1===t._U?(t._U=2,void(t._X=[t._X,e])):void t._X.push(e);!function(t,e){v((function(){var r=1===t._V?e.onFulfilled:e.onRejected;if(null!==r){var n=function(t,e){try{return t(e)}catch(t){return w=t,S}}(r,t._W);n===S?x(e.promise,w):P(e.promise,n)}else 1===t._V?P(e.promise,t._W):x(e.promise,t._W)}))}(t,e)}function P(t,e){if(e===t)return x(t,new TypeError("A promise cannot be resolved with itself."));if(e&&("object"==typeof e||"function"==typeof e)){var r=function(t){try{return t.then}catch(t){return w=t,S}}(e);if(r===S)return x(t,w);if(r===t.then&&e instanceof O)return t._V=3,t._W=e,void E(t);if("function"==typeof r)return void k(r.bind(e),t)}t._V=1,t._W=e,E(t)}function x(t,e){t._V=2,t._W=e,O._Z&&O._Z(t,e),E(t)}function E(t){if(1===t._U&&(A(t,t._X),t._X=null),2===t._U){for(var e=0;e<t._X.length;e++)A(t,t._X[e]);t._X=null}}function _(t,e,r){this.onFulfilled="function"==typeof t?t:null,this.onRejected="function"==typeof e?e:null,this.promise=r}function k(t,e){var r=!1,n=function(t,e,r){try{t(e,r)}catch(t){return w=t,S}}(t,(function(t){r||(r=!0,P(e,t))}),(function(t){r||(r=!0,x(e,t))}));r||n!==S||(r=!0,x(e,w))}O._Y=null,O._Z=null,O._0=b,O.prototype.then=function(t,e){if(this.constructor!==O)return function(t,e,r){return new t.constructor((function(n,o){var i=new O(b);i.then(n,o),A(t,new _(e,r,i))}))}(this,t,e);var r=new O(b);return A(this,new _(t,e,r)),r},j.prototype.done=function(t,e){(arguments.length?this.then.apply(this,arguments):this).then(null,(function(t){setTimeout((function(){throw t}),0)}))};var T=j;T.prototype.finally=function(t){return this.then((function(e){return T.resolve(t()).then((function(){return e}))}),(function(e){return T.resolve(t()).then((function(){throw e}))}))};var I=j,C=D(!0),R=D(!1),U=D(null),F=D(void 0),N=D(0),L=D("");function D(t){var e=new I(I._0);return e._V=1,e._W=t,e}I.resolve=function(t){if(t instanceof I)return t;if(null===t)return U;if(void 0===t)return F;if(!0===t)return C;if(!1===t)return R;if(0===t)return N;if(""===t)return L;if("object"==typeof t||"function"==typeof t)try{var e=t.then;if("function"==typeof e)return new I(e.bind(t))}catch(t){return new I((function(e,r){r(t)}))}return D(t)};var B=function(t){return"function"==typeof Array.from?(B=Array.from,Array.from(t)):(B=function(t){return Array.prototype.slice.call(t)},Array.prototype.slice.call(t))};I.all=function(t){var e=B(t);return new I((function(t,r){if(0===e.length)return t([]);var n=e.length;function o(i,a){if(a&&("object"==typeof a||"function"==typeof a)){if(a instanceof I&&a.then===I.prototype.then){for(;3===a._V;)a=a._W;return 1===a._V?o(i,a._W):(2===a._V&&r(a._W),void a.then((function(t){o(i,t)}),r))}var u=a.then;if("function"==typeof u)return void new I(u.bind(a)).then((function(t){o(i,t)}),r)}e[i]=a,0==--n&&t(e)}for(var i=0;i<e.length;i++)o(i,e[i])}))},I.reject=function(t){return new I((function(e,r){r(t)}))},I.race=function(t){return new I((function(e,r){B(t).forEach((function(t){I.resolve(t).then(e,r)}))}))},I.prototype.catch=function(t){return this.then(null,t)};var q=a,M=[],W=[],V=q.makeRequestCallFromTimer((function(){if(W.length)throw W.shift()})),G=H;function H(t){var e;(e=M.length?M.pop():new z).task=t,q(e)}function z(){this.task=null}z.prototype.call=function(){try{this.task.call()}catch(t){H.onerror?H.onerror(t):(W.push(t),V())}finally{this.task=null,M[M.length]=this}};var J=j,X=G;J.denodeify=function(t,e){return"number"==typeof e&&e!==1/0?function(t,e){for(var r=[],n=0;n<e;n++)r.push("a"+n);var o=["return function ("+r.join(",")+") {","var self = this;","return new Promise(function (rs, rj) {","var res = fn.call(",["self"].concat(r).concat([$]).join(","),");","if (res &&",'(typeof res === "object" || typeof res === "function") &&','typeof res.then === "function"',") {rs(res);}","});","};"].join("");return Function(["Promise","fn"],o)(J,t)}(t,e):function(t){for(var e=Math.max(t.length-1,3),r=[],n=0;n<e;n++)r.push("a"+n);var o=["return function ("+r.join(",")+") {","var self = this;","var args;","var argLength = arguments.length;","if (arguments.length > "+e+") {","args = new Array(arguments.length + 1);","for (var i = 0; i < arguments.length; i++) {","args[i] = arguments[i];","}","}","return new Promise(function (rs, rj) {","var cb = "+$+";","var res;","switch (argLength) {",r.concat(["extra"]).map((function(t,e){return"case "+e+":res = fn.call("+["self"].concat(r.slice(0,e)).concat("cb").join(",")+");break;"})).join(""),"default:","args[argLength] = cb;","res = fn.apply(self, args);","}","if (res &&",'(typeof res === "object" || typeof res === "function") &&','typeof res.then === "function"',") {rs(res);}","});","};"].join("");return Function(["Promise","fn"],o)(J,t)}(t)};var $="function (err, res) {if (err) { rj(err); } else { rs(res); }}";J.nodeify=function(t){return function(){var e=Array.prototype.slice.call(arguments),r="function"==typeof e[e.length-1]?e.pop():null,n=this;try{return t.apply(this,arguments).nodeify(r,n)}catch(t){if(null==r)return new J((function(e,r){r(t)}));X((function(){r.call(n,t)}))}}},J.prototype.nodeify=function(t,e){if("function"!=typeof t)return this;this.then((function(r){X((function(){t.call(e,null,r)}))}),(function(r){X((function(){t.call(e,r)}))}))};var Q=j;Q.enableSynchronous=function(){Q.prototype.isPending=function(){return 0==this.getState()},Q.prototype.isFulfilled=function(){return 1==this.getState()},Q.prototype.isRejected=function(){return 2==this.getState()},Q.prototype.getValue=function(){if(3===this._V)return this._W.getValue();if(!this.isFulfilled())throw new Error("Cannot get a value of an unfulfilled promise.");return this._W},Q.prototype.getReason=function(){if(3===this._V)return this._W.getReason();if(!this.isRejected())throw new Error("Cannot get a rejection reason of a non-rejected promise.");return this._W},Q.prototype.getState=function(){return 3===this._V?this._W.getState():-1===this._V||-2===this._V?0:this._V}},Q.disableSynchronous=function(){Q.prototype.isPending=void 0,Q.prototype.isFulfilled=void 0,Q.prototype.isRejected=void 0,Q.prototype.getValue=void 0,Q.prototype.getReason=void 0,Q.prototype.getState=void 0};var Y=j;function Z(t){return Z="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Z(t)}var K=function(t,e){if("string"!=typeof t)throw new TypeError("argument str must be a string");for(var r={},n=e||{},o=t.split(nt),i=n.decode||et,a=0;a<o.length;a++){var u=o[a],c=u.indexOf("=");if(!(c<0)){var s=u.substr(0,c).trim(),f=u.substr(++c,u.length).trim();'"'==f[0]&&(f=f.slice(1,-1)),null==r[s]&&(r[s]=it(f,i))}}return r},tt=function(t,e,r){var n=r||{},o=n.encode||rt;if("function"!=typeof o)throw new TypeError("option encode is invalid");if(!ot.test(t))throw new TypeError("argument name is invalid");var i=o(e);if(i&&!ot.test(i))throw new TypeError("argument val is invalid");var a=t+"="+i;if(null!=n.maxAge){var u=n.maxAge-0;if(isNaN(u)||!isFinite(u))throw new TypeError("option maxAge is invalid");a+="; Max-Age="+Math.floor(u)}if(n.domain){if(!ot.test(n.domain))throw new TypeError("option domain is invalid");a+="; Domain="+n.domain}if(n.path){if(!ot.test(n.path))throw new TypeError("option path is invalid");a+="; Path="+n.path}if(n.expires){if("function"!=typeof n.expires.toUTCString)throw new TypeError("option expires is invalid");a+="; Expires="+n.expires.toUTCString()}if(n.httpOnly&&(a+="; HttpOnly"),n.secure&&(a+="; Secure"),n.sameSite)switch("string"==typeof n.sameSite?n.sameSite.toLowerCase():n.sameSite){case!0:a+="; SameSite=Strict";break;case"lax":a+="; SameSite=Lax";break;case"strict":a+="; SameSite=Strict";break;case"none":a+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return a},et=decodeURIComponent,rt=encodeURIComponent,nt=/; */,ot=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function it(t,e){try{return e(t)}catch(e){return t}}var at,ut,ct={exports:{}},st={exports:{}};at="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ut={rotl:function(t,e){return t<<e|t>>>32-e},rotr:function(t,e){return t<<32-e|t>>>e},endian:function(t){if(t.constructor==Number)return 16711935&ut.rotl(t,8)|4278255360&ut.rotl(t,24);for(var e=0;e<t.length;e++)t[e]=ut.endian(t[e]);return t},randomBytes:function(t){for(var e=[];t>0;t--)e.push(Math.floor(256*Math.random()));return e},bytesToWords:function(t){for(var e=[],r=0,n=0;r<t.length;r++,n+=8)e[n>>>5]|=t[r]<<24-n%32;return e},wordsToBytes:function(t){for(var e=[],r=0;r<32*t.length;r+=8)e.push(t[r>>>5]>>>24-r%32&255);return e},bytesToHex:function(t){for(var e=[],r=0;r<t.length;r++)e.push((t[r]>>>4).toString(16)),e.push((15&t[r]).toString(16));return e.join("")},hexToBytes:function(t){for(var e=[],r=0;r<t.length;r+=2)e.push(parseInt(t.substr(r,2),16));return e},bytesToBase64:function(t){for(var e=[],r=0;r<t.length;r+=3)for(var n=t[r]<<16|t[r+1]<<8|t[r+2],o=0;o<4;o++)8*r+6*o<=8*t.length?e.push(at.charAt(n>>>6*(3-o)&63)):e.push("=");return e.join("")},base64ToBytes:function(t){t=t.replace(/[^A-Z0-9+\/]/gi,"");for(var e=[],r=0,n=0;r<t.length;n=++r%4)0!=n&&e.push((at.indexOf(t.charAt(r-1))&Math.pow(2,-2*n+8)-1)<<2*n|at.indexOf(t.charAt(r))>>>6-2*n);return e}},st.exports=ut;var ft={utf8:{stringToBytes:function(t){return ft.bin.stringToBytes(unescape(encodeURIComponent(t)))},bytesToString:function(t){return decodeURIComponent(escape(ft.bin.bytesToString(t)))}},bin:{stringToBytes:function(t){for(var e=[],r=0;r<t.length;r++)e.push(255&t.charCodeAt(r));return e},bytesToString:function(t){for(var e=[],r=0;r<t.length;r++)e.push(String.fromCharCode(t[r]));return e.join("")}}},lt=ft,pt=function(t){return null!=t&&(yt(t)||function(t){return"function"==typeof t.readFloatLE&&"function"==typeof t.slice&&yt(t.slice(0,0))}(t)||!!t._isBuffer)};function yt(t){return!!t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}!function(){var t=st.exports,e=lt.utf8,r=pt,n=lt.bin,o=function(i,a){i.constructor==String?i=a&&"binary"===a.encoding?n.stringToBytes(i):e.stringToBytes(i):r(i)?i=Array.prototype.slice.call(i,0):Array.isArray(i)||i.constructor===Uint8Array||(i=i.toString());for(var u=t.bytesToWords(i),c=8*i.length,s=1732584193,f=-271733879,l=-1732584194,p=271733878,y=0;y<u.length;y++)u[y]=16711935&(u[y]<<8|u[y]>>>24)|4278255360&(u[y]<<24|u[y]>>>8);u[c>>>5]|=128<<c%32,u[14+(c+64>>>9<<4)]=c;var h=o._ff,d=o._gg,m=o._hh,g=o._ii;for(y=0;y<u.length;y+=16){var v=s,b=f,w=l,S=p;s=h(s,f,l,p,u[y+0],7,-680876936),p=h(p,s,f,l,u[y+1],12,-389564586),l=h(l,p,s,f,u[y+2],17,606105819),f=h(f,l,p,s,u[y+3],22,-1044525330),s=h(s,f,l,p,u[y+4],7,-176418897),p=h(p,s,f,l,u[y+5],12,1200080426),l=h(l,p,s,f,u[y+6],17,-1473231341),f=h(f,l,p,s,u[y+7],22,-45705983),s=h(s,f,l,p,u[y+8],7,1770035416),p=h(p,s,f,l,u[y+9],12,-1958414417),l=h(l,p,s,f,u[y+10],17,-42063),f=h(f,l,p,s,u[y+11],22,-1990404162),s=h(s,f,l,p,u[y+12],7,1804603682),p=h(p,s,f,l,u[y+13],12,-40341101),l=h(l,p,s,f,u[y+14],17,-1502002290),s=d(s,f=h(f,l,p,s,u[y+15],22,1236535329),l,p,u[y+1],5,-165796510),p=d(p,s,f,l,u[y+6],9,-1069501632),l=d(l,p,s,f,u[y+11],14,643717713),f=d(f,l,p,s,u[y+0],20,-373897302),s=d(s,f,l,p,u[y+5],5,-701558691),p=d(p,s,f,l,u[y+10],9,38016083),l=d(l,p,s,f,u[y+15],14,-660478335),f=d(f,l,p,s,u[y+4],20,-405537848),s=d(s,f,l,p,u[y+9],5,568446438),p=d(p,s,f,l,u[y+14],9,-1019803690),l=d(l,p,s,f,u[y+3],14,-187363961),f=d(f,l,p,s,u[y+8],20,1163531501),s=d(s,f,l,p,u[y+13],5,-1444681467),p=d(p,s,f,l,u[y+2],9,-51403784),l=d(l,p,s,f,u[y+7],14,1735328473),s=m(s,f=d(f,l,p,s,u[y+12],20,-1926607734),l,p,u[y+5],4,-378558),p=m(p,s,f,l,u[y+8],11,-2022574463),l=m(l,p,s,f,u[y+11],16,1839030562),f=m(f,l,p,s,u[y+14],23,-35309556),s=m(s,f,l,p,u[y+1],4,-1530992060),p=m(p,s,f,l,u[y+4],11,1272893353),l=m(l,p,s,f,u[y+7],16,-155497632),f=m(f,l,p,s,u[y+10],23,-1094730640),s=m(s,f,l,p,u[y+13],4,681279174),p=m(p,s,f,l,u[y+0],11,-358537222),l=m(l,p,s,f,u[y+3],16,-722521979),f=m(f,l,p,s,u[y+6],23,76029189),s=m(s,f,l,p,u[y+9],4,-640364487),p=m(p,s,f,l,u[y+12],11,-421815835),l=m(l,p,s,f,u[y+15],16,530742520),s=g(s,f=m(f,l,p,s,u[y+2],23,-995338651),l,p,u[y+0],6,-198630844),p=g(p,s,f,l,u[y+7],10,1126891415),l=g(l,p,s,f,u[y+14],15,-1416354905),f=g(f,l,p,s,u[y+5],21,-57434055),s=g(s,f,l,p,u[y+12],6,1700485571),p=g(p,s,f,l,u[y+3],10,-1894986606),l=g(l,p,s,f,u[y+10],15,-1051523),f=g(f,l,p,s,u[y+1],21,-2054922799),s=g(s,f,l,p,u[y+8],6,1873313359),p=g(p,s,f,l,u[y+15],10,-30611744),l=g(l,p,s,f,u[y+6],15,-1560198380),f=g(f,l,p,s,u[y+13],21,1309151649),s=g(s,f,l,p,u[y+4],6,-145523070),p=g(p,s,f,l,u[y+11],10,-1120210379),l=g(l,p,s,f,u[y+2],15,718787259),f=g(f,l,p,s,u[y+9],21,-343485551),s=s+v>>>0,f=f+b>>>0,l=l+w>>>0,p=p+S>>>0}return t.endian([s,f,l,p])};o._ff=function(t,e,r,n,o,i,a){var u=t+(e&r|~e&n)+(o>>>0)+a;return(u<<i|u>>>32-i)+e},o._gg=function(t,e,r,n,o,i,a){var u=t+(e&n|r&~n)+(o>>>0)+a;return(u<<i|u>>>32-i)+e},o._hh=function(t,e,r,n,o,i,a){var u=t+(e^r^n)+(o>>>0)+a;return(u<<i|u>>>32-i)+e},o._ii=function(t,e,r,n,o,i,a){var u=t+(r^(e|~n))+(o>>>0)+a;return(u<<i|u>>>32-i)+e},o._blocksize=16,o._digestsize=16,ct.exports=function(e,r){if(null==e)throw new Error("Illegal argument "+e);var i=t.wordsToBytes(o(e,r));return r&&r.asBytes?i:r&&r.asString?n.bytesToString(i):t.bytesToHex(i)}}();var ht=ct.exports,dt="fl-cloud-token",mt="fl-cloud-bb-ext",gt="fl-cloud-user",vt="fl-cloud-admin",bt=12096e5,wt=[],St=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;wt.map((function(n){return n({token:t,user:e,adminUser:r})}))},jt=function(t,e,r){Et(t,r),Ut(e,r),St(t,e,Rt())},Ot=function(){_t(),Lt(),St()},At=function(t){return!(!t||"string"!=typeof t)},Pt=function(){return At(xt())},xt=function(){return qt(dt)},Et=function(t,e){Bt(dt,t,e)},_t=function(){Mt(dt)},kt=function(t){return!(!t||"object"!==Z(t)||!t.email)},Tt=function(){return kt(Ct())},It=function(){return kt(Rt())},Ct=function(){var t=qt(gt);return t?JSON.parse(t):null},Rt=function(){var t=qt(vt);return t?JSON.parse(t):null},Ut=function(t,e){var r={id:t.id,name:t.name,email:t.email,is_admin:t.is_admin};Bt(gt,JSON.stringify(r),e)},Ft=function(){var t=Ct();kt(t)&&t.is_admin&&(t.token=xt(),Bt(vt,JSON.stringify(t),!1))},Nt=function(){var t=Rt();if(kt(t)){var e=t.token;delete t.token,t.email_verified_at=!0,Et(e,!1),Ut(t,!1),Mt(vt),St(e,t)}},Lt=function(){Mt(vt),Mt(gt)},Dt=function(t){return"undefined"!=typeof FL_ASSISTANT_CONFIG?t+"-"+ht(FL_ASSISTANT_CONFIG.homeUrl):t},Bt=function(t,e,n){var o=Dt(t),i={path:"/"};n&&(i.expires=new Date(Date.now()+bt)),"undefined"==typeof window?r.g.cookie=tt(o,e,i):window.parent.document.cookie=tt(o,e,i)},qt=function(t){var e=K("undefined"==typeof window?r.g.cookie:window.parent.document.cookie),n=Dt(t);return e[n]?e[n]:null},Mt=function(t){var e=Dt(t),n={path:"/",expires:new Date(Date.now()-bt)};"undefined"==typeof window?r.g.cookie=tt(e,"",n):window.parent.document.cookie=tt(e,"",n)},Wt=Object.freeze({__proto__:null,subscribe:function(t){wt.push(t)},create:jt,destroy:Ot,isValidToken:At,hasToken:Pt,getToken:xt,setToken:Et,removeToken:_t,isValidUser:kt,hasUser:Tt,hasAdminUser:It,getUser:Ct,getAdminUser:Rt,setUser:Ut,rememberAdmin:Ft,restoreAdmin:Nt,removeUser:Lt,getBBExt:function(){return qt(mt)},setBBExt:function(t,e){Bt(mt,t,e)},isBBExtension:function(){return"site"==qt(mt)}}),Vt=function(t){var e={register:function(e,r,n,o,i){var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},u={first_name:e,last_name:r,username:n,email:o,password:i,password_confirmation:i};return new Y((function(e,r){t.post("/account/user/register",u,a).then((function(t){if(t.response)r(t.response.data);else{var n=t.data,o=n.token,i=n.user;e({token:o,user:i})}})).catch(r)}))},authenticate:function(e,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return new Y((function(o,i){t.post("/iam/authenticate",{email:e,password:r},n).then((function(t){if(t.response)i(t.response.data);else{var e=t.data,r=e.token,n=e.user;o({token:r,user:n})}})).catch(i)}))},login:function(t,r,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return new Y((function(i,a){e.authenticate(t,r,o).then((function(t){var e=t.token,r=t.user;jt(e,r,n),i({token:e,user:r})})).catch(a)}))},loginAsUser:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Y((function(n,o){t.post("/iam/authenticate-as-user",{user_id:e},r).then((function(t){if(t.response)o(t.response.data);else{var e=t.data,r=e.token,i=e.user;Ft(),jt(r,i,!1),n({token:r,user:i})}})).catch(o)}))},me:function(){return t.get("/iam/me")},logoutAsUser:function(){Nt()},logout:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new Y((function(r,n){t.post("/iam/token/destroy",{},e).then((function(){Ot(),r()})).catch(n)}))},refresh:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new Y((function(r,n){t.post("/iam/token/refresh",{},e).then((function(t){if(!t.data||!t.data.token)return Ot(),void n(t);var e=t.data.token;Et(e),r(t.data)})).catch((function(t){Ot(),n(t)}))}))},forgotPassword:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Y((function(n,o){t.post("/iam/password/forgot",{email:e},r).then((function(t){t.response?o(t.response.data):n()})).catch(o)}))},resetPassword:function(e,r,n,o){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},a={email:e,password:r,password_confirmation:n,token:o};return new Y((function(e,r){t.post("/iam/password/reset",a,i).then((function(t){t.response?r(t.response.data):e()})).catch(r)}))},changePassword:function(e,r,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i={current_password:e,new_password:r,new_password_confirmation:n};return new Y((function(e,r){t.post("/iam/password/change",i,o).then((function(t){t.response?r(t.response.data):e()})).catch(r)}))},verifyEmail:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Y((function(n,o){t.get(e,r).then((function(t){t.response?o(t.response.data):(Ut(t.data.user),n(t))})).catch(o)}))},resendVerificationEmail:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new Y((function(r,n){t.get("/iam/verification/resend",e).then((function(t){t.response?n(t.response.data):r(t)})).catch(n)}))},isConnected:function(){return Pt()&&Tt()},isLoggedInAs:function(){return It()}};return e};function Gt(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Ht(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i=[],a=!0,u=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(u)throw o}}return i}}(t,e)||function(t,e){if(t){if("string"==typeof t)return Gt(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Gt(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function zt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Jt(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Xt(t,e,r){return e&&Jt(t.prototype,e),r&&Jt(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function $t(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Qt,Yt="undefined"!=typeof Symbol&&Symbol,Zt=Array.prototype.slice,Kt=Object.prototype.toString,te=Function.prototype.bind||function(t){var e=this;if("function"!=typeof e||"[object Function]"!==Kt.call(e))throw new TypeError("Function.prototype.bind called on incompatible "+e);for(var r,n=Zt.call(arguments,1),o=Math.max(0,e.length-n.length),i=[],a=0;a<o;a++)i.push("$"+a);if(r=Function("binder","return function ("+i.join(",")+"){ return binder.apply(this,arguments); }")((function(){if(this instanceof r){var o=e.apply(this,n.concat(Zt.call(arguments)));return Object(o)===o?o:this}return e.apply(t,n.concat(Zt.call(arguments)))})),e.prototype){var u=function(){};u.prototype=e.prototype,r.prototype=new u,u.prototype=null}return r},ee=te.call(Function.call,Object.prototype.hasOwnProperty),re=SyntaxError,ne=Function,oe=TypeError,ie=function(t){try{return ne('"use strict"; return ('+t+").constructor;")()}catch(t){}},ae=Object.getOwnPropertyDescriptor;if(ae)try{ae({},"")}catch(t){ae=null}var ue=function(){throw new oe},ce=ae?function(){try{return ue}catch(t){try{return ae(arguments,"callee").get}catch(t){return ue}}}():ue,se="function"==typeof Yt&&"function"==typeof Symbol&&"symbol"==typeof Yt("foo")&&"symbol"==typeof Symbol("bar")&&function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var t={},e=Symbol("test"),r=Object(e);if("string"==typeof e)return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(e in t[e]=42,t)return!1;if("function"==typeof Object.keys&&0!==Object.keys(t).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var n=Object.getOwnPropertySymbols(t);if(1!==n.length||n[0]!==e)return!1;if(!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(t,e);if(42!==o.value||!0!==o.enumerable)return!1}return!0}(),fe=Object.getPrototypeOf||function(t){return t.__proto__},le={},pe="undefined"==typeof Uint8Array?Qt:fe(Uint8Array),ye={"%AggregateError%":"undefined"==typeof AggregateError?Qt:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?Qt:ArrayBuffer,"%ArrayIteratorPrototype%":se?fe([][Symbol.iterator]()):Qt,"%AsyncFromSyncIteratorPrototype%":Qt,"%AsyncFunction%":le,"%AsyncGenerator%":le,"%AsyncGeneratorFunction%":le,"%AsyncIteratorPrototype%":le,"%Atomics%":"undefined"==typeof Atomics?Qt:Atomics,"%BigInt%":"undefined"==typeof BigInt?Qt:BigInt,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?Qt:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?Qt:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?Qt:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?Qt:FinalizationRegistry,"%Function%":ne,"%GeneratorFunction%":le,"%Int8Array%":"undefined"==typeof Int8Array?Qt:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?Qt:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?Qt:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":se?fe(fe([][Symbol.iterator]())):Qt,"%JSON%":"object"==typeof JSON?JSON:Qt,"%Map%":"undefined"==typeof Map?Qt:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&se?fe((new Map)[Symbol.iterator]()):Qt,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?Qt:Promise,"%Proxy%":"undefined"==typeof Proxy?Qt:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?Qt:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?Qt:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&se?fe((new Set)[Symbol.iterator]()):Qt,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?Qt:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":se?fe(""[Symbol.iterator]()):Qt,"%Symbol%":se?Symbol:Qt,"%SyntaxError%":re,"%ThrowTypeError%":ce,"%TypedArray%":pe,"%TypeError%":oe,"%Uint8Array%":"undefined"==typeof Uint8Array?Qt:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?Qt:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?Qt:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?Qt:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?Qt:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?Qt:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?Qt:WeakSet},he=function t(e){var r;if("%AsyncFunction%"===e)r=ie("async function () {}");else if("%GeneratorFunction%"===e)r=ie("function* () {}");else if("%AsyncGeneratorFunction%"===e)r=ie("async function* () {}");else if("%AsyncGenerator%"===e){var n=t("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===e){var o=t("%AsyncGenerator%");o&&(r=fe(o.prototype))}return ye[e]=r,r},de={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},me=te,ge=ee,ve=me.call(Function.call,Array.prototype.concat),be=me.call(Function.apply,Array.prototype.splice),we=me.call(Function.call,String.prototype.replace),Se=me.call(Function.call,String.prototype.slice),je=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Oe=/\\(\\)?/g,Ae=function(t,e){var r,n=t;if(ge(de,n)&&(n="%"+(r=de[n])[0]+"%"),ge(ye,n)){var o=ye[n];if(o===le&&(o=he(n)),void 0===o&&!e)throw new oe("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:o}}throw new re("intrinsic "+t+" does not exist!")},Pe=function(t,e){if("string"!=typeof t||0===t.length)throw new oe("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof e)throw new oe('"allowMissing" argument must be a boolean');var r=function(t){var e=Se(t,0,1),r=Se(t,-1);if("%"===e&&"%"!==r)throw new re("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==e)throw new re("invalid intrinsic syntax, expected opening `%`");var n=[];return we(t,je,(function(t,e,r,o){n[n.length]=r?we(o,Oe,"$1"):e||t})),n}(t),n=r.length>0?r[0]:"",o=Ae("%"+n+"%",e),i=o.name,a=o.value,u=!1,c=o.alias;c&&(n=c[0],be(r,ve([0,1],c)));for(var s=1,f=!0;s<r.length;s+=1){var l=r[s],p=Se(l,0,1),y=Se(l,-1);if(('"'===p||"'"===p||"`"===p||'"'===y||"'"===y||"`"===y)&&p!==y)throw new re("property names with quotes must have matching quotes");if("constructor"!==l&&f||(u=!0),ge(ye,i="%"+(n+="."+l)+"%"))a=ye[i];else if(null!=a){if(!(l in a)){if(!e)throw new oe("base intrinsic for "+t+" exists, but the property is not available.");return}if(ae&&s+1>=r.length){var h=ae(a,l);a=(f=!!h)&&"get"in h&&!("originalValue"in h.get)?h.get:a[l]}else f=ge(a,l),a=a[l];f&&!u&&(ye[i]=a)}}return a},xe={exports:{}};!function(t){var e=te,r=Pe,n=r("%Function.prototype.apply%"),o=r("%Function.prototype.call%"),i=r("%Reflect.apply%",!0)||e.call(o,n),a=r("%Object.getOwnPropertyDescriptor%",!0),u=r("%Object.defineProperty%",!0),c=r("%Math.max%");if(u)try{u({},"a",{value:1})}catch(t){u=null}t.exports=function(t){var r=i(e,o,arguments);return a&&u&&a(r,"length").configurable&&u(r,"length",{value:1+c(0,t.length-(arguments.length-1))}),r};var s=function(){return i(e,n,arguments)};u?u(t.exports,"apply",{value:s}):t.exports.apply=s}(xe);var Ee=Pe,_e=xe.exports,ke=_e(Ee("String.prototype.indexOf")),Te=function(t){if(t.__esModule)return t;var e=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(t).forEach((function(r){var n=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,n.get?n:{enumerable:!0,get:function(){return t[r]}})})),e}(Object.freeze({__proto__:null,default:{}})),Ie="function"==typeof Map&&Map.prototype,Ce=Object.getOwnPropertyDescriptor&&Ie?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Re=Ie&&Ce&&"function"==typeof Ce.get?Ce.get:null,Ue=Ie&&Map.prototype.forEach,Fe="function"==typeof Set&&Set.prototype,Ne=Object.getOwnPropertyDescriptor&&Fe?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Le=Fe&&Ne&&"function"==typeof Ne.get?Ne.get:null,De=Fe&&Set.prototype.forEach,Be="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,qe="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,Me="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,We=Boolean.prototype.valueOf,Ve=Object.prototype.toString,Ge=Function.prototype.toString,He=String.prototype.match,ze="function"==typeof BigInt?BigInt.prototype.valueOf:null,Je=Object.getOwnPropertySymbols,Xe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,$e="function"==typeof Symbol&&"object"==typeof Symbol.iterator,Qe=Object.prototype.propertyIsEnumerable,Ye=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null),Ze=Te.custom,Ke=Ze&&or(Ze)?Ze:null,tr="function"==typeof Symbol&&void 0!==Symbol.toStringTag?Symbol.toStringTag:null;function er(t,e,r){var n="double"===(r.quoteStyle||e)?'"':"'";return n+t+n}function rr(t){return String(t).replace(/"/g,"&quot;")}function nr(t){return!("[object Array]"!==ur(t)||tr&&"object"==typeof t&&tr in t)}function or(t){if($e)return t&&"object"==typeof t&&t instanceof Symbol;if("symbol"==typeof t)return!0;if(!t||"object"!=typeof t||!Xe)return!1;try{return Xe.call(t),!0}catch(t){}return!1}var ir=Object.prototype.hasOwnProperty||function(t){return t in this};function ar(t,e){return ir.call(t,e)}function ur(t){return Ve.call(t)}function cr(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}function sr(t,e){if(t.length>e.maxStringLength){var r=t.length-e.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return sr(t.slice(0,e.maxStringLength),e)+n}return er(t.replace(/(['\\])/g,"\\$1").replace(/[\x00-\x1f]/g,fr),"single",e)}function fr(t){var e=t.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return r?"\\"+r:"\\x"+(e<16?"0":"")+e.toString(16).toUpperCase()}function lr(t){return"Object("+t+")"}function pr(t){return t+" { ? }"}function yr(t,e,r,n){return t+" ("+e+") {"+(n?hr(r,n):r.join(", "))+"}"}function hr(t,e){if(0===t.length)return"";var r="\n"+e.prev+e.base;return r+t.join(","+r)+"\n"+e.prev}function dr(t,e){var r=nr(t),n=[];if(r){n.length=t.length;for(var o=0;o<t.length;o++)n[o]=ar(t,o)?e(t[o],t):""}var i,a="function"==typeof Je?Je(t):[];if($e){i={};for(var u=0;u<a.length;u++)i["$"+a[u]]=a[u]}for(var c in t)ar(t,c)&&(r&&String(Number(c))===c&&c<t.length||$e&&i["$"+c]instanceof Symbol||(/[^\w$]/.test(c)?n.push(e(c,t)+": "+e(t[c],t)):n.push(c+": "+e(t[c],t))));if("function"==typeof Je)for(var s=0;s<a.length;s++)Qe.call(t,a[s])&&n.push("["+e(a[s])+"]: "+e(t[a[s]],t));return n}var mr=Pe,gr=function(t,e){var r=Ee(t,!!e);return"function"==typeof r&&ke(t,".prototype.")>-1?_e(r):r},vr=function t(e,r,n,o){var i=r||{};if(ar(i,"quoteStyle")&&"single"!==i.quoteStyle&&"double"!==i.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(ar(i,"maxStringLength")&&("number"==typeof i.maxStringLength?i.maxStringLength<0&&i.maxStringLength!==1/0:null!==i.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var a=!ar(i,"customInspect")||i.customInspect;if("boolean"!=typeof a&&"symbol"!==a)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(ar(i,"indent")&&null!==i.indent&&"\t"!==i.indent&&!(parseInt(i.indent,10)===i.indent&&i.indent>0))throw new TypeError('options "indent" must be "\\t", an integer > 0, or `null`');if(void 0===e)return"undefined";if(null===e)return"null";if("boolean"==typeof e)return e?"true":"false";if("string"==typeof e)return sr(e,i);if("number"==typeof e)return 0===e?1/0/e>0?"0":"-0":String(e);if("bigint"==typeof e)return String(e)+"n";var u=void 0===i.depth?5:i.depth;if(void 0===n&&(n=0),n>=u&&u>0&&"object"==typeof e)return nr(e)?"[Array]":"[Object]";var c=function(t,e){var r;if("\t"===t.indent)r="\t";else{if(!("number"==typeof t.indent&&t.indent>0))return null;r=Array(t.indent+1).join(" ")}return{base:r,prev:Array(e+1).join(r)}}(i,n);if(void 0===o)o=[];else if(cr(o,e)>=0)return"[Circular]";function s(e,r,a){if(r&&(o=o.slice()).push(r),a){var u={depth:i.depth};return ar(i,"quoteStyle")&&(u.quoteStyle=i.quoteStyle),t(e,u,n+1,o)}return t(e,i,n+1,o)}if("function"==typeof e){var f=function(t){if(t.name)return t.name;var e=He.call(Ge.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}(e),l=dr(e,s);return"[Function"+(f?": "+f:" (anonymous)")+"]"+(l.length>0?" { "+l.join(", ")+" }":"")}if(or(e)){var p=$e?String(e).replace(/^(Symbol\(.*\))_[^)]*$/,"$1"):Xe.call(e);return"object"!=typeof e||$e?p:lr(p)}if(function(t){return!(!t||"object"!=typeof t)&&("undefined"!=typeof HTMLElement&&t instanceof HTMLElement||"string"==typeof t.nodeName&&"function"==typeof t.getAttribute)}(e)){for(var y="<"+String(e.nodeName).toLowerCase(),h=e.attributes||[],d=0;d<h.length;d++)y+=" "+h[d].name+"="+er(rr(h[d].value),"double",i);return y+=">",e.childNodes&&e.childNodes.length&&(y+="..."),y+"</"+String(e.nodeName).toLowerCase()+">"}if(nr(e)){if(0===e.length)return"[]";var m=dr(e,s);return c&&!function(t){for(var e=0;e<t.length;e++)if(cr(t[e],"\n")>=0)return!1;return!0}(m)?"["+hr(m,c)+"]":"[ "+m.join(", ")+" ]"}if(function(t){return!("[object Error]"!==ur(t)||tr&&"object"==typeof t&&tr in t)}(e)){var g=dr(e,s);return 0===g.length?"["+String(e)+"]":"{ ["+String(e)+"] "+g.join(", ")+" }"}if("object"==typeof e&&a){if(Ke&&"function"==typeof e[Ke])return e[Ke]();if("symbol"!==a&&"function"==typeof e.inspect)return e.inspect()}if(function(t){if(!Re||!t||"object"!=typeof t)return!1;try{Re.call(t);try{Le.call(t)}catch(t){return!0}return t instanceof Map}catch(t){}return!1}(e)){var v=[];return Ue.call(e,(function(t,r){v.push(s(r,e,!0)+" => "+s(t,e))})),yr("Map",Re.call(e),v,c)}if(function(t){if(!Le||!t||"object"!=typeof t)return!1;try{Le.call(t);try{Re.call(t)}catch(t){return!0}return t instanceof Set}catch(t){}return!1}(e)){var b=[];return De.call(e,(function(t){b.push(s(t,e))})),yr("Set",Le.call(e),b,c)}if(function(t){if(!Be||!t||"object"!=typeof t)return!1;try{Be.call(t,Be);try{qe.call(t,qe)}catch(t){return!0}return t instanceof WeakMap}catch(t){}return!1}(e))return pr("WeakMap");if(function(t){if(!qe||!t||"object"!=typeof t)return!1;try{qe.call(t,qe);try{Be.call(t,Be)}catch(t){return!0}return t instanceof WeakSet}catch(t){}return!1}(e))return pr("WeakSet");if(function(t){if(!Me||!t||"object"!=typeof t)return!1;try{return Me.call(t),!0}catch(t){}return!1}(e))return pr("WeakRef");if(function(t){return!("[object Number]"!==ur(t)||tr&&"object"==typeof t&&tr in t)}(e))return lr(s(Number(e)));if(function(t){if(!t||"object"!=typeof t||!ze)return!1;try{return ze.call(t),!0}catch(t){}return!1}(e))return lr(s(ze.call(e)));if(function(t){return!("[object Boolean]"!==ur(t)||tr&&"object"==typeof t&&tr in t)}(e))return lr(We.call(e));if(function(t){return!("[object String]"!==ur(t)||tr&&"object"==typeof t&&tr in t)}(e))return lr(s(String(e)));if(!function(t){return!("[object Date]"!==ur(t)||tr&&"object"==typeof t&&tr in t)}(e)&&!function(t){return!("[object RegExp]"!==ur(t)||tr&&"object"==typeof t&&tr in t)}(e)){var w=dr(e,s),S=Ye?Ye(e)===Object.prototype:e instanceof Object||e.constructor===Object,j=e instanceof Object?"":"null prototype",O=!S&&tr&&Object(e)===e&&tr in e?ur(e).slice(8,-1):j?"Object":"",A=(S||"function"!=typeof e.constructor?"":e.constructor.name?e.constructor.name+" ":"")+(O||j?"["+[].concat(O||[],j||[]).join(": ")+"] ":"");return 0===w.length?A+"{}":c?A+"{"+hr(w,c)+"}":A+"{ "+w.join(", ")+" }"}return String(e)},br=mr("%TypeError%"),wr=mr("%WeakMap%",!0),Sr=mr("%Map%",!0),jr=gr("WeakMap.prototype.get",!0),Or=gr("WeakMap.prototype.set",!0),Ar=gr("WeakMap.prototype.has",!0),Pr=gr("Map.prototype.get",!0),xr=gr("Map.prototype.set",!0),Er=gr("Map.prototype.has",!0),_r=function(t,e){for(var r,n=t;null!==(r=n.next);n=r)if(r.key===e)return n.next=r.next,r.next=t.next,t.next=r,r},kr=String.prototype.replace,Tr=/%20/g,Ir="RFC3986",Cr={default:Ir,formatters:{RFC1738:function(t){return kr.call(t,Tr,"+")},RFC3986:function(t){return String(t)}},RFC1738:"RFC1738",RFC3986:Ir},Rr=Cr,Ur=Object.prototype.hasOwnProperty,Fr=Array.isArray,Nr=function(){for(var t=[],e=0;e<256;++e)t.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return t}(),Lr=function(t,e){for(var r=e&&e.plainObjects?Object.create(null):{},n=0;n<t.length;++n)void 0!==t[n]&&(r[n]=t[n]);return r},Dr={arrayToObject:Lr,assign:function(t,e){return Object.keys(e).reduce((function(t,r){return t[r]=e[r],t}),t)},combine:function(t,e){return[].concat(t,e)},compact:function(t){for(var e=[{obj:{o:t},prop:"o"}],r=[],n=0;n<e.length;++n)for(var o=e[n],i=o.obj[o.prop],a=Object.keys(i),u=0;u<a.length;++u){var c=a[u],s=i[c];"object"==typeof s&&null!==s&&-1===r.indexOf(s)&&(e.push({obj:i,prop:c}),r.push(s))}return function(t){for(;t.length>1;){var e=t.pop(),r=e.obj[e.prop];if(Fr(r)){for(var n=[],o=0;o<r.length;++o)void 0!==r[o]&&n.push(r[o]);e.obj[e.prop]=n}}}(e),t},decode:function(t,e,r){var n=t.replace(/\+/g," ");if("iso-8859-1"===r)return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch(t){return n}},encode:function(t,e,r,n,o){if(0===t.length)return t;var i=t;if("symbol"==typeof t?i=Symbol.prototype.toString.call(t):"string"!=typeof t&&(i=String(t)),"iso-8859-1"===r)return escape(i).replace(/%u[0-9a-f]{4}/gi,(function(t){return"%26%23"+parseInt(t.slice(2),16)+"%3B"}));for(var a="",u=0;u<i.length;++u){var c=i.charCodeAt(u);45===c||46===c||95===c||126===c||c>=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122||o===Rr.RFC1738&&(40===c||41===c)?a+=i.charAt(u):c<128?a+=Nr[c]:c<2048?a+=Nr[192|c>>6]+Nr[128|63&c]:c<55296||c>=57344?a+=Nr[224|c>>12]+Nr[128|c>>6&63]+Nr[128|63&c]:(u+=1,c=65536+((1023&c)<<10|1023&i.charCodeAt(u)),a+=Nr[240|c>>18]+Nr[128|c>>12&63]+Nr[128|c>>6&63]+Nr[128|63&c])}return a},isBuffer:function(t){return!(!t||"object"!=typeof t||!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t)))},isRegExp:function(t){return"[object RegExp]"===Object.prototype.toString.call(t)},maybeMap:function(t,e){if(Fr(t)){for(var r=[],n=0;n<t.length;n+=1)r.push(e(t[n]));return r}return e(t)},merge:function t(e,r,n){if(!r)return e;if("object"!=typeof r){if(Fr(e))e.push(r);else{if(!e||"object"!=typeof e)return[e,r];(n&&(n.plainObjects||n.allowPrototypes)||!Ur.call(Object.prototype,r))&&(e[r]=!0)}return e}if(!e||"object"!=typeof e)return[e].concat(r);var o=e;return Fr(e)&&!Fr(r)&&(o=Lr(e,n)),Fr(e)&&Fr(r)?(r.forEach((function(r,o){if(Ur.call(e,o)){var i=e[o];i&&"object"==typeof i&&r&&"object"==typeof r?e[o]=t(i,r,n):e.push(r)}else e[o]=r})),e):Object.keys(r).reduce((function(e,o){var i=r[o];return Ur.call(e,o)?e[o]=t(e[o],i,n):e[o]=i,e}),o)}},Br=function(){var t,e,r,n={assert:function(t){if(!n.has(t))throw new br("Side channel does not contain "+vr(t))},get:function(n){if(wr&&n&&("object"==typeof n||"function"==typeof n)){if(t)return jr(t,n)}else if(Sr){if(e)return Pr(e,n)}else if(r)return function(t,e){var r=_r(t,e);return r&&r.value}(r,n)},has:function(n){if(wr&&n&&("object"==typeof n||"function"==typeof n)){if(t)return Ar(t,n)}else if(Sr){if(e)return Er(e,n)}else if(r)return function(t,e){return!!_r(t,e)}(r,n);return!1},set:function(n,o){wr&&n&&("object"==typeof n||"function"==typeof n)?(t||(t=new wr),Or(t,n,o)):Sr?(e||(e=new Sr),xr(e,n,o)):(r||(r={key:{},next:null}),function(t,e,r){var n=_r(t,e);n?n.value=r:t.next={key:e,next:t.next,value:r}}(r,n,o))}};return n},qr=Dr,Mr=Cr,Wr=Object.prototype.hasOwnProperty,Vr={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,e){return t+"["+e+"]"},repeat:function(t){return t}},Gr=Array.isArray,Hr=Array.prototype.push,zr=function(t,e){Hr.apply(t,Gr(e)?e:[e])},Jr=Date.prototype.toISOString,Xr=Mr.default,$r={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:qr.encode,encodeValuesOnly:!1,format:Xr,formatter:Mr.formatters[Xr],indices:!1,serializeDate:function(t){return Jr.call(t)},skipNulls:!1,strictNullHandling:!1},Qr=function t(e,r,n,o,i,a,u,c,s,f,l,p,y,h,d){var m,g=e;if(d.has(e))throw new RangeError("Cyclic object value");if("function"==typeof u?g=u(r,g):g instanceof Date?g=f(g):"comma"===n&&Gr(g)&&(g=qr.maybeMap(g,(function(t){return t instanceof Date?f(t):t}))),null===g){if(o)return a&&!y?a(r,$r.encoder,h,"key",l):r;g=""}if("string"==typeof(m=g)||"number"==typeof m||"boolean"==typeof m||"symbol"==typeof m||"bigint"==typeof m||qr.isBuffer(g))return a?[p(y?r:a(r,$r.encoder,h,"key",l))+"="+p(a(g,$r.encoder,h,"value",l))]:[p(r)+"="+p(String(g))];var v,b=[];if(void 0===g)return b;if("comma"===n&&Gr(g))v=[{value:g.length>0?g.join(",")||null:void 0}];else if(Gr(u))v=u;else{var w=Object.keys(g);v=c?w.sort(c):w}for(var S=0;S<v.length;++S){var j=v[S],O="object"==typeof j&&void 0!==j.value?j.value:g[j];if(!i||null!==O){var A=Gr(g)?"function"==typeof n?n(r,j):r:r+(s?"."+j:"["+j+"]");d.set(e,!0);var P=Br();zr(b,t(O,A,n,o,i,a,u,c,s,f,l,p,y,h,P))}}return b},Yr=Dr,Zr=(Object.prototype.hasOwnProperty,Array.isArray,Yr.decode,function(t,e){var r,n=t,o=function(t){if(!t)return $r;if(null!==t.encoder&&void 0!==t.encoder&&"function"!=typeof t.encoder)throw new TypeError("Encoder has to be a function.");var e=t.charset||$r.charset;if(void 0!==t.charset&&"utf-8"!==t.charset&&"iso-8859-1"!==t.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=Mr.default;if(void 0!==t.format){if(!Wr.call(Mr.formatters,t.format))throw new TypeError("Unknown format option provided.");r=t.format}var n=Mr.formatters[r],o=$r.filter;return("function"==typeof t.filter||Gr(t.filter))&&(o=t.filter),{addQueryPrefix:"boolean"==typeof t.addQueryPrefix?t.addQueryPrefix:$r.addQueryPrefix,allowDots:void 0===t.allowDots?$r.allowDots:!!t.allowDots,charset:e,charsetSentinel:"boolean"==typeof t.charsetSentinel?t.charsetSentinel:$r.charsetSentinel,delimiter:void 0===t.delimiter?$r.delimiter:t.delimiter,encode:"boolean"==typeof t.encode?t.encode:$r.encode,encoder:"function"==typeof t.encoder?t.encoder:$r.encoder,encodeValuesOnly:"boolean"==typeof t.encodeValuesOnly?t.encodeValuesOnly:$r.encodeValuesOnly,filter:o,format:r,formatter:n,serializeDate:"function"==typeof t.serializeDate?t.serializeDate:$r.serializeDate,skipNulls:"boolean"==typeof t.skipNulls?t.skipNulls:$r.skipNulls,sort:"function"==typeof t.sort?t.sort:null,strictNullHandling:"boolean"==typeof t.strictNullHandling?t.strictNullHandling:$r.strictNullHandling}}(e);"function"==typeof o.filter?n=(0,o.filter)("",n):Gr(o.filter)&&(r=o.filter);var i,a=[];if("object"!=typeof n||null===n)return"";i=e&&e.arrayFormat in Vr?e.arrayFormat:e&&"indices"in e?e.indices?"indices":"repeat":"indices";var u=Vr[i];r||(r=Object.keys(n)),o.sort&&r.sort(o.sort);for(var c=Br(),s=0;s<r.length;++s){var f=r[s];o.skipNulls&&null===n[f]||zr(a,Qr(n[f],f,u,o.strictNullHandling,o.skipNulls,o.encode?o.encoder:null,o.filter,o.sort,o.allowDots,o.serializeDate,o.format,o.formatter,o.encodeValuesOnly,o.charset,c))}var l=a.join(o.delimiter),p=!0===o.addQueryPrefix?"?":"";return o.charsetSentinel&&("iso-8859-1"===o.charset?p+="utf8=%26%2310003%3B&":p+="utf8=%E2%9C%93&"),l.length>0?p+l:""}),Kr=function(){function t(e){zt(this,t),this.query=e,this.uri=""}return Xt(t,[{key:"parse",value:function(){return this.includes(),this.appends(),this.fields(),this.filters(),this.sorts(),this.page(),this.limit(),this.params(),this.uri}},{key:"prepend",value:function(){return""===this.uri?"?":"&"}},{key:"includes",value:function(){!this.query.include.length>0||(this.uri+="".concat(this.prepend()+this.query.queryParameters.includes,"=").concat(this.query.include))}},{key:"appends",value:function(){!this.query.append.length>0||(this.uri+="".concat(this.prepend()+this.query.queryParameters.appends,"=").concat(this.query.append))}},{key:"fields",value:function(){if(!(!Object.keys(this.query.fields).length>0)){var t=$t({},"".concat(this.query.queryParameters.fields,"[").concat(this.query.model,"]"),this.query.fields);this.uri+=this.prepend()+Zr(t,{encode:!1})}}},{key:"filters",value:function(){if(!(!Object.keys(this.query.filters).length>0)){var t=$t({},this.query.queryParameters.filters,this.query.filters);this.uri+=this.prepend()+Zr(t,{encode:!1})}}},{key:"sorts",value:function(){!this.query.sorts.length>0||(this.uri+="".concat(this.prepend()+this.query.queryParameters.sort,"=").concat(this.query.sorts))}},{key:"page",value:function(){null!==this.query.pageValue&&(this.uri+="".concat(this.prepend()+this.query.queryParameters.page,"=").concat(this.query.pageValue))}},{key:"limit",value:function(){null!==this.query.limitValue&&(this.uri+="".concat(this.prepend()+this.query.queryParameters.limit,"=").concat(this.query.limitValue))}},{key:"params",value:function(){null!==this.query.paramsObj&&(this.uri+=this.prepend()+Zr(this.query.paramsObj,{encode:!1}))}}]),t}(),tn=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};zt(this,t),this.model=null,this.base_url=e.base_url||null,this.queryParameters=e.queryParameters||{filters:"filter",fields:"fields",includes:"include",appends:"append",page:"page",limit:"limit",sort:"sort"},this.include=[],this.append=[],this.sorts=[],this.fields={},this.filters={},this.pageValue=null,this.limitValue=null,this.paramsObj=null,this.parser=new Kr(this)}return Xt(t,[{key:"for",value:function(t){return this.model=t,this}},{key:"get",value:function(){var t=this.base_url?this.base_url+this.parseQuery():this.parseQuery();return this.reset(),t}},{key:"url",value:function(){return this.get()}},{key:"reset",value:function(){this.parser.uri=""}},{key:"parseQuery",value:function(){if(!this.model)throw new Error("Please call the for() method before adding filters or calling url() / get().");return"/".concat(this.model).concat(this.parser.parse())}},{key:"includes",value:function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];if(!e.length)throw new Error("The ".concat(this.queryParameters.includes,"s() function takes at least one argument."));return this.include=e,this}},{key:"appends",value:function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];if(!e.length)throw new Error("The ".concat(this.queryParameters.appends,"s() function takes at least one argument."));return this.append=e,this}},{key:"select",value:function(){for(var t=this,e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];if(!r.length)throw new Error("The ".concat(this.queryParameters.fields,"() function takes a single argument of an array."));return(r[0].constructor===String||Array.isArray(r[0]))&&(this.fields=r.join(",")),r[0].constructor===Object&&Object.entries(r[0]).forEach((function(e){var r=Ht(e,2),n=r[0],o=r[1];t.fields[n]=o.join(",")})),this}},{key:"where",value:function(t,e){if(void 0===t||void 0===e)throw new Error("The where() function takes 2 arguments both of string values.");if(Array.isArray(e)||e instanceof Object)throw new Error("The second argument to the where() function must be a string. Use whereIn() if you need to pass in an array.");return this.filters[t]=e,this}},{key:"whereIn",value:function(t,e){if(!t||!e)throw new Error("The whereIn() function takes 2 arguments of (string, array).");if(!t&&Array.isArray(t)||"object"===Z(t))throw new Error("The first argument for the whereIn() function must be a string or integer.");if(!Array.isArray(e))throw new Error("The second argument for the whereIn() function must be an array.");return this.filters[t]=e.join(","),this}},{key:"sort",value:function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return this.sorts=e,this}},{key:"page",value:function(t){if(!Number.isInteger(t))throw new Error("The page() function takes a single argument of a number");return this.pageValue=t,this}},{key:"limit",value:function(t){if(!Number.isInteger(t))throw new Error("The limit() function takes a single argument of a number.");return this.limitValue=t,this}},{key:"params",value:function(t){if(void 0===t||t.constructor!==Object)throw new Error("The params() function takes a single argument of an object.");return this.paramsObj=t,this}}]),t}(),en=function(t,e){return{create:function(r){return e.post(t,r)},update:function(r,n){return e.put("".concat(t,"/").concat(r),n)},delete:function(r){return e.delete("".concat(t,"/").concat(r))},get:function(r){return e.get("".concat(t,"/").concat(r))},getAll:function(){return e.get(t)},search:function(){var r=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){})((new tn).for(t)).get();return e.get(r.replace("//","/"))}}},rn="undefined"==typeof arguments?void 0:arguments,nn=function(t){var e=Ht((0,o.useState)(!1),2),r=e[0],n=e[1];return[function(){return n(!0),t.apply(null,rn).finally((function(){return n(!1)}))},r]},on=function(t,e){var r=e.model,n=e.getter,i=e.subscribe,a=e.unsubscribe,u=Ht((0,o.useState)(null),2),c=u[0],s=u[1];return(0,o.useEffect)((function(){n(t).then((function(t){return s(t.data)}))}),[t]),(0,o.useEffect)((function(){if(c&&i)return i(t,"updated",(function(t){return s(t[r])})),i(t,"deleted",(function(){return s(null)})),function(){return a&&a(t)}}),[c]),[c,s]},an=function(t){var e=t.model,r=t.getter,n=t.subscribe,i=t.unsubscribe,a=Ht((0,o.useState)(null),2),u=a[0],c=a[1];return(0,o.useEffect)((function(){c(null),r().then((function(t){return c(t.data)}))}),[r]),(0,o.useEffect)((function(){if(n&&u)return n(null,"created",(function(t){var r=!1;u.map((function(n){n.id===t[e].id&&(r=!0)})),r||c(u.concat([t[e]]))})),u.map((function(t){var r=t.id;n(r,"updated",(function(t){c(u.map((function(n){return n.id===r?t[e]:n})))})),n(r,"deleted",(function(){c(u.filter((function(t){return t.id!==r})))}))})),function(){return u.map((function(t){return i(t.id)}))}}),[u]),[u,c]},un=function t(e,r,n){n instanceof Array?n.map((function(n,o){var i=r+("object"===Z(n)?"":"[".concat(o,"]"));t(e,i,n)})):null==n?e.append(r,""):"object"===Z(n)?Object.entries(n).map((function(n){var o=Ht(n,2),i=o[0],a=o[1];t(e,"".concat(r,"[").concat(i,"]"),a)})):e.append(r,n)};function cn(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function sn(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?cn(Object(r),!0).forEach((function(e){$t(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):cn(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function fn(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function ln(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?fn(Object(r),!0).forEach((function(e){$t(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):fn(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function pn(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function yn(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?pn(Object(r),!0).forEach((function(e){$t(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):pn(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function hn(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}function dn(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){hn(i,n,o,a,u,"next",t)}function u(t){hn(i,n,o,a,u,"throw",t)}a(void 0)}))}}var mn={exports:{}};!function(t){var e=function(t){var e,r=Object.prototype,n=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,i=Object.create(o.prototype),a=new _(n||[]);return i._invoke=function(t,e,r){var n=l;return function(o,i){if(n===y)throw new Error("Generator is already running");if(n===h){if("throw"===o)throw i;return T()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var u=P(a,r);if(u){if(u===d)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===l)throw n=h,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=y;var c=f(t,e,r);if("normal"===c.type){if(n=r.done?h:p,c.arg===d)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n=h,r.method="throw",r.arg=c.arg)}}}(t,r,a),i}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var l="suspendedStart",p="suspendedYield",y="executing",h="completed",d={};function m(){}function g(){}function v(){}var b={};c(b,i,(function(){return this}));var w=Object.getPrototypeOf,S=w&&w(w(k([])));S&&S!==r&&n.call(S,i)&&(b=S);var j=v.prototype=m.prototype=Object.create(b);function O(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function A(t,e){function r(o,i,a,u){var c=f(t[o],t,i);if("throw"!==c.type){var s=c.arg,l=s.value;return l&&"object"==typeof l&&n.call(l,"__await")?e.resolve(l.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(l).then((function(t){s.value=t,a(s)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var o;this._invoke=function(t,n){function i(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(i,i):i()}}function P(t,r){var n=t.iterator[r.method];if(n===e){if(r.delegate=null,"throw"===r.method){if(t.iterator.return&&(r.method="return",r.arg=e,P(t,r),"throw"===r.method))return d;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var o=f(n,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,d;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,d):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function x(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function _(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(x,this),this.reset(!0)}function k(t){if(t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o<t.length;)if(n.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return a.next=a}}return{next:T}}function T(){return{value:e,done:!0}}return g.prototype=v,c(j,"constructor",v),c(v,"constructor",g),g.displayName=c(v,u,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,u,"GeneratorFunction")),t.prototype=Object.create(j),t},t.awrap=function(t){return{__await:t}},O(A.prototype),c(A.prototype,a,(function(){return this})),t.AsyncIterator=A,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new A(s(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},O(j),c(j,u,"Generator"),c(j,i,(function(){return this})),c(j,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=k,_.prototype={constructor:_,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(E),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function o(n,o){return u.type="throw",u.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),s=n.call(a,"finallyLoc");if(c&&s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),E(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:k(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),d}},t}(t.exports);try{regeneratorRuntime=e}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}}(mn);var gn=mn.exports;function vn(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function bn(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?vn(Object(r),!0).forEach((function(e){$t(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):vn(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function wn(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Sn(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?wn(Object(r),!0).forEach((function(e){$t(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):wn(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var jn={auth:Vt,accounts:function(t){return sn(sn({},{publicInfo:function(e,r){return t.get("/accounts/info/".concat(e,"/").concat(r))},publicInfoByUsername:function(e){return t.get("/accounts/info-by-name/".concat(e))},usernameExists:function(e){return t.get("/accounts/exists/".concat(e))},featuredCreators:function(){return t.get("/accounts/featured-creators")}}),{})},user:function(t){return ln(ln({},{get:function(){return t.get("/account/user")},update:function(e){return e.append?e.append("_method","PUT"):e._method="PUT",t.post("/account/user/update",e)},delete:function(){return t.post("/account/user/delete")},getInvites:function(){return t.get("/account/user/invite")},invite:function(e){return t.post("/account/user/invite",{email:e})},resendInvite:function(e){return t.post("/account/user/invite/".concat(e,"/resend"))},cancelInvite:function(e){return t.post("/account/user/invite/".concat(e,"/cancel"))},verifyInvite:function(e){return t.post("/account/user/invite/".concat(e,"/verify"))},getSellerAccount:function(){return t.get("account/user/seller")},createSellerAccount:function(e){return t.post("/account/user/seller/create",e)},stripeDashboard:function(){return t.post("/account/user/seller/stripe-dashboard")}}),{})},teams:function(t){var e=yn(yn({},en("/account/teams",t)),{},{update:function(e,r){return r.append?r.append("_method","PUT"):r._method="PUT",t.post("/account/teams/".concat(e),r)},getInvites:function(e){return t.get("/account/teams/".concat(e,"/invite"))},invite:function(e,r,n){return t.post("/account/teams/".concat(e,"/invite"),{email:r,role:n})},acceptInvite:function(e){return t.post("/account/teams/invite/".concat(e,"/accept"))},resendInvite:function(e){return t.post("/account/teams/invite/".concat(e,"/resend"))},cancelInvite:function(e){return t.post("/account/teams/invite/".concat(e,"/cancel"))},getMembers:function(e){return t.get("/account/teams/".concat(e,"/members"))},switchRole:function(e,r,n){return t.put("/account/teams/".concat(e,"/members/").concat(r,"/role"),{role:n})},transferToMember:function(e,r){return t.put("/account/teams/".concat(e,"/members/").concat(r,"/transfer"))},removeMember:function(e,r){return t.delete("/account/teams/".concat(e,"/members/").concat(r))},leaveTeam:function(e){return t.delete("/account/teams/".concat(e,"/members/leave"))}}),r={useAll:function(){return an({getter:e.getAll})},useOne:function(t){return on(t,{getter:e.get})},useInvites:function(t){return an({getter:(0,o.useCallback)((function(){return e.getInvites(t)}),[t])})}};return yn(yn({},e),r)},drip:function(t){return{subscribe:function(e){return t.post("/account/drip/subscribe",e)}}},libraries:function(t,e){var r,n,i={getAll:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"user",e=arguments.length>1?arguments[1]:void 0;return i.search((function(r){return t&&!e?"object"===Z(t)?r.whereIn("owner_type",t):r.where("owner_type",t):e&&(r.where("owner_type","team"),r.where("owner_id",e)),r}))},getAllSortedByOwner:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"ASC",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"name",r={user:[],team:{},shared:[],access:[]};return i.search((function(r){return r.sort(("ASC"===t?"":"-")+e),r.whereIn("owner_type",["user","shared","team","access"]),r})).then((function(t){return t.data.map((function(t){t.permissions.shared&&!t.permissions.view_team?r.shared.push(t):!0===t.has_access?r.access.push(t):"user"===t.owner_type?r.user.push(t):"team"===t.owner_type&&(r.team[t.owner_id]||(r.team[t.owner_id]=[]),r.team[t.owner_id].push(t))})),r}))},get:function(e){return t.get("/libraries/".concat(e))},create:function(e){return t.post("/libraries",e)},update:function(e,r){return r.append?r.append("_method","PUT"):r._method="PUT",t.post("/libraries/".concat(e),r)},updateItems:function(e,r){return t.post("/libraries/".concat(e,"/items"),{items:r})},getCommunityStats:function(e){return t.get("/libraries/".concat(e,"/stats"))},getAccess:function(e){return t.post("/libraries/".concat(e,"/get-access"))},archive:function(e){return t.post("/libraries/".concat(e,"/archive"))},unarchive:function(e){return t.post("/libraries/".concat(e,"/unarchive"))},hideAccess:function(e){return t.post("/libraries/".concat(e,"/hide-access"))},showAccess:function(e){return t.post("/libraries/".concat(e,"/show-access"))},removeAccess:function(e){return t.post("/libraries/".concat(e,"/remove-access"))},hideFromPublic:function(e){return t.post("/admin/libraries/".concat(e,"/hide-from-public"))},unhideFromPublic:function(e){return t.post("/admin/libraries/".concat(e,"/unhide-from-public"))},delete:(n=dn(gn.mark((function e(r){return gn.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!Array.isArray(r)){e.next=4;break}return e.next=3,Promise.all(r.map((function(e){return t.delete("/libraries/".concat(e))})));case 3:return e.abrupt("return",e.sent);case 4:return e.abrupt("return",t.delete("/libraries/".concat(r)));case 5:case"end":return e.stop()}}),e)}))),function(t){return n.apply(this,arguments)}),duplicate:function(e){return t.post("/libraries/".concat(e,"/duplicate"))},search:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(t){return t})((new tn).for("/libraries")).get().replace("//","/");return t.get(e)},getUserLibraries:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"ASC",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"name",n=(new tn).for("/libraries/user");n.sort(("ASC"===e?"":"-")+r);var o=n.get().replace("//","/");return t.get(o)},getCommunityLibraries:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"ASC",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"name",n=(new tn).for("/libraries/community");n.sort(("ASC"===e?"":"-")+r);var o=n.get().replace("//","/");return t.get(o)},getTeamLibraries:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"ASC",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"name",o=(new tn).for("/libraries/team/".concat(e));o.sort(("ASC"===r?"":"-")+n);var i=o.get().replace("//","/");return t.get(i)},subscribe:function(t,e,r){},unsubscribe:function(t){},contactAuthor:function(e,r){return t.post("/libraries/".concat(e,"/contact-author"),r)},getCollections:function(e){return t.get("/libraries/".concat(e,"/library-collections"))},getCollection:function(e){return t.get("/library-collections/".concat(e))},createCollection:function(e,r){return t.post("/libraries/".concat(e,"/library-collections"),r)},updateCollection:function(e,r){return t.put("/library-collections/".concat(e),r)},deleteCollection:function(e){return t.delete("/library-collections/".concat(e))},getItems:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.get("/libraries/".concat(e,"/library-items"),{params:r})},getItem:function(e){return t.get("/library-items/".concat(e))},createItem:function(e,r){return t.post("/libraries/".concat(e,"/library-items"),r)},updateItem:function(e,r){return r.append?r.append("_method","PUT"):r._method="PUT",t.post("/library-items/".concat(e),r)},deleteItem:function(e){return t.delete("/library-items/".concat(e))},deleteItems:(r=dn(gn.mark((function e(){var r,n=arguments;return gn.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=n.length>0&&void 0!==n[0]?n[0]:[],e.next=3,Promise.all(r.map((function(e){t.delete("/library-items/".concat(e))})));case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e)}))),function(){return r.apply(this,arguments)}),searchItems:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(t){return t},n=arguments.length>2?arguments[2]:void 0,o="/libraries/".concat(e,"/library-items"),i=r((new tn).for(o)).get().replace("//","/");return t.get(i,n)},moveItem:function(e,r){return t.put("/library-items/".concat(r,"/move"),{library_id:e})},favoriteItem:function(e){return t.post("/library-items/".concat(e,"/favorite"))},unfavoriteItem:function(e){return t.post("/library-items/".concat(e,"/unfavorite"))},favorite:function(e){return t.post("/libraries/".concat(e,"/favorite"))},unfavorite:function(e){return t.post("/libraries/".concat(e,"/unfavorite"))},favoriteLibraryItem:function(e){return t.post("/libraries/".concat(e,"/favorite"))},unfavoriteLibraryItem:function(e){return t.post("/libraries/".concat(e,"/unfavorite"))},getInvites:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"share";return t.get("/libraries/".concat(e,"/invite?type=").concat(r))},invite:function(e,r,n){return t.post("/libraries/".concat(e,"/invite"),{email:r,role:n})},requestTransfer:function(e,r){return t.put("/libraries/".concat(e,"/invite/transfer"),{username:r})},acceptInvite:function(e){return t.post("/libraries/invite/".concat(e,"/accept"))},resendInvite:function(e){return t.post("/libraries/invite/".concat(e,"/resend"))},cancelInvite:function(e){return t.post("/libraries/invite/".concat(e,"/cancel"))},join:function(e){return t.put("/libraries/".concat(e,"/members/join"))},getMembers:function(e){return t.get("/libraries/".concat(e,"/members"))},switchRole:function(e,r,n){return t.put("/libraries/".concat(e,"/members/").concat(r,"/role"),{role:n})},transferToMember:function(e,r){return t.put("/libraries/".concat(e,"/members/").concat(r,"/transfer"))},removeMember:function(e,r){return t.delete("/libraries/".concat(e,"/members/").concat(r))},leaveLibrary:function(e){return t.delete("/libraries/".concat(e,"/members/leave"))},requestDownload:function(e){return t.post("/libraries/".concat(e,"/download"),null,{responseType:"blob"})},getDownloadStatus:function(e){return t.get("/libraries/download/status/".concat(e)).then((function(t){return t.data}))},getDownloadBlob:function(e){return t.get("/libraries/download/".concat(e),{responseType:"blob"})}},a={useAll:function(t,e){return an({model:"library",getter:(0,o.useCallback)((function(){return i.getAll(t,e)}),[t,e])})},useOne:function(t){return on(t,{model:"library",getter:i.get})},useCollections:function(t){return an({getter:(0,o.useCallback)((function(){return i.getCollections(t)}),[t])})},useCollection:function(t){return on(t,{getter:i.getCollection})},useItems:function(t){return an({getter:(0,o.useCallback)((function(){return i.getItems(t)}),[t])})},useItem:function(t){return on(t,{getter:i.getItem})}};return bn(bn({},i),a)},billing:function(t){var e={getSubscriptionData:function(){return t.get("/billing/subscription/subscription-data")},getTeamSubscriptionData:function(e){return t.get("/billing/subscription/team-subscription-data/".concat(e))},getSubscriptionPricing:function(e){return t.get("/billing/subscription/subscription-pricing",{params:e})},subscribe:function(e){return t.post("/billing/subscription/subscribe",e)},subscribeTeam:function(e,r){return t.post("/billing/subscription/subscribe-team/".concat(e),r)},cancelSubscription:function(){return t.post("/billing/subscription/cancel-subscription")},cancelTeamSubscription:function(e){return t.post("/billing/subscription/cancel-team-subscription/".concat(e))},manageSubscription:function(){return t.post("/billing/subscription/manage-subscription")},manageTeamSubscription:function(e){return t.post("/billing/subscription/manage-team-subscription/".concat(e))},currentUserHasPlan:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,r=FL.Assistant.data.getSystemState(),n=r.user,o=r.cloudUser;return n?e.userHasPlan(n,t):!!o&&e.userHasPlan(o,t)},userHasPlan:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=t.owns_paid_team,n=t.subscription_plan;return!!r||void 0!==n&&void 0!==n.slug&&"free"!==n.slug&&(!e||e===n.slug)},teamHasPlan:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=t.subscription_plan;return void 0!==r&&void 0!==r.slug&&"free"!==r.slug&&(!e||e===r.slug)}};return e},marketplace:function(t){return{purchaseForTeam:function(e){return t.post("/marketplace/purchase-for-team",e)},submitPurchaseData:function(e){return t.post("/marketplace/purchase-data",e)},receipt:function(e){return t.get("/marketplace/purchase-history/".concat(e,"/receipt"))}}},updateNotifications:function(t){var e={getLatest:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:10;return t.get("/update-notifications",{params:{limit:e}})}};return Sn(Sn({},e),{})}},On={users:function(t){return en("/admin/users",t)},teams:function(t){return en("/admin/teams",t)}},An=function(t){var e=t.apiUrl,r=function(t){var e=t.apiUrl,r=void 0===e?"":e,o=n().create({baseURL:"".concat(r,"/api"),crossDomain:!0,headers:{common:{Accept:"application/json","Content-Type":"application/json","X-Requested-With":"XMLHttpRequest","Access-Control-Allow-Origin":"*"}}});"undefined"!=typeof window&&window.FL_ASSISTANT_CONFIG&&window.FL_ASSISTANT_CONFIG.name&&(o.defaults.headers.common["X-Application-Name"]=window.FL_ASSISTANT_CONFIG.name,o.defaults.headers.common["X-Application-Version"]=window.FL_ASSISTANT_CONFIG.version),o.interceptors.request.use((function(t){return Pt()&&(t.headers.Authorization="Bearer "+xt()),"undefined"!=typeof FormData&&t.data instanceof FormData&&(t.headers.common["Content-Type"]="multipart/form-data"),t}),Y.reject);var i=[],a=!1;return o.interceptors.response.use((function(t){return t}),(function(t){var e=xt(),r=t.config,n=t.response;return e&&n&&[401].includes(n.status)&&!r.url.includes("/iam/")?(a||(a=!0,Vt(o).refresh().then((function(){i.map((function(t){t.config.headers.Authorization="Bearer "+xt(),t.resolve(o(t.config))}))})).finally((function(){i=[],a=!1}))),new Y((function(t,e){i.push({config:r,resolve:t,reject:e})}))):Y.reject(t)})),o}({apiUrl:void 0===e?"":e}),o={http:r,session:Wt,admin:{}};for(var i in jn)o[i]=jn[i](r);for(var a in On)o.admin[a]=On[a](r);return o};window.FL=window.FL||{},FL.vendors=FL.vendors||{},FL.vendors.BBCloud=t})()})();