@selfcommunity/api-services 0.4.0-alpha.6 → 0.4.0-alpha.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/umd/api-services.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/*! For license information please see api-services.js.LICENSE.txt */
|
|
2
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.SelfCommunityApiServices=t():e.SelfCommunityApiServices=t()}(self,(()=>(()=>{var e={9644:(e,t,r)=>{e.exports=r(5644)},353:(e,t,r)=>{"use strict";var a=r(3044),s=r(6955),i=r(2233),n=r(8030),o=r(7948),c=r(1875),u=r(842),l=r(8618),d=r(1439),p=r(6714);e.exports=function(e){return new Promise((function(t,r){var h,m=e.data,g=e.headers,f=e.responseType;function y(){e.cancelToken&&e.cancelToken.unsubscribe(h),e.signal&&e.signal.removeEventListener("abort",h)}a.isFormData(m)&&delete g["Content-Type"];var b=new XMLHttpRequest;if(e.auth){var C=e.auth.username||"",v=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";g.Authorization="Basic "+btoa(C+":"+v)}var S=o(e.baseURL,e.url);function w(){if(b){var a="getAllResponseHeaders"in b?c(b.getAllResponseHeaders()):null,i={data:f&&"text"!==f&&"json"!==f?b.response:b.responseText,status:b.status,statusText:b.statusText,headers:a,config:e,request:b};s((function(e){t(e),y()}),(function(e){r(e),y()}),i),b=null}}if(b.open(e.method.toUpperCase(),n(S,e.params,e.paramsSerializer),!0),b.timeout=e.timeout,"onloadend"in b?b.onloadend=w:b.onreadystatechange=function(){b&&4===b.readyState&&(0!==b.status||b.responseURL&&0===b.responseURL.indexOf("file:"))&&setTimeout(w)},b.onabort=function(){b&&(r(l("Request aborted",e,"ECONNABORTED",b)),b=null)},b.onerror=function(){r(l("Network Error",e,null,b)),b=null},b.ontimeout=function(){var t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",a=e.transitional||d.transitional;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),r(l(t,e,a.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",b)),b=null},a.isStandardBrowserEnv()){var A=(e.withCredentials||u(S))&&e.xsrfCookieName?i.read(e.xsrfCookieName):void 0;A&&(g[e.xsrfHeaderName]=A)}"setRequestHeader"in b&&a.forEach(g,(function(e,t){void 0===m&&"content-type"===t.toLowerCase()?delete g[t]:b.setRequestHeader(t,e)})),a.isUndefined(e.withCredentials)||(b.withCredentials=!!e.withCredentials),f&&"json"!==f&&(b.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&b.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&b.upload&&b.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(h=function(e){b&&(r(!e||e&&e.type?new p("canceled"):e),b.abort(),b=null)},e.cancelToken&&e.cancelToken.subscribe(h),e.signal&&(e.signal.aborted?h():e.signal.addEventListener("abort",h))),m||(m=null),b.send(m)}))}},5644:(e,t,r)=>{"use strict";var a=r(3044),s=r(3644),i=r(2215),n=r(2937),o=function e(t){var r=new i(t),o=s(i.prototype.request,r);return a.extend(o,i.prototype,r),a.extend(o,r),o.create=function(r){return e(n(t,r))},o}(r(1439));o.Axios=i,o.Cancel=r(6714),o.CancelToken=r(4089),o.isCancel=r(8041),o.VERSION=r(9241).version,o.all=function(e){return Promise.all(e)},o.spread=r(783),o.isAxiosError=r(5587),e.exports=o,e.exports.default=o},6714:e=>{"use strict";function t(e){this.message=e}t.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},t.prototype.__CANCEL__=!0,e.exports=t},4089:(e,t,r)=>{"use strict";var a=r(6714);function s(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;this.promise.then((function(e){if(r._listeners){var t,a=r._listeners.length;for(t=0;t<a;t++)r._listeners[t](e);r._listeners=null}})),this.promise.then=function(e){var t,a=new Promise((function(e){r.subscribe(e),t=e})).then(e);return a.cancel=function(){r.unsubscribe(t)},a},e((function(e){r.reason||(r.reason=new a(e),t(r.reason))}))}s.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},s.prototype.subscribe=function(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]},s.prototype.unsubscribe=function(e){if(this._listeners){var t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}},s.source=function(){var e;return{token:new s((function(t){e=t})),cancel:e}},e.exports=s},8041:e=>{"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},2215:(e,t,r)=>{"use strict";var a=r(3044),s=r(8030),i=r(946),n=r(6895),o=r(2937),c=r(7525),u=c.validators;function l(e){this.defaults=e,this.interceptors={request:new i,response:new i}}l.prototype.request=function(e){"string"==typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=o(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=e.transitional;void 0!==t&&c.assertOptions(t,{silentJSONParsing:u.transitional(u.boolean),forcedJSONParsing:u.transitional(u.boolean),clarifyTimeoutError:u.transitional(u.boolean)},!1);var r=[],a=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(a=a&&t.synchronous,r.unshift(t.fulfilled,t.rejected))}));var s,i=[];if(this.interceptors.response.forEach((function(e){i.push(e.fulfilled,e.rejected)})),!a){var l=[n,void 0];for(Array.prototype.unshift.apply(l,r),l=l.concat(i),s=Promise.resolve(e);l.length;)s=s.then(l.shift(),l.shift());return s}for(var d=e;r.length;){var p=r.shift(),h=r.shift();try{d=p(d)}catch(e){h(e);break}}try{s=n(d)}catch(e){return Promise.reject(e)}for(;i.length;)s=s.then(i.shift(),i.shift());return s},l.prototype.getUri=function(e){return e=o(this.defaults,e),s(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},a.forEach(["delete","get","head","options"],(function(e){l.prototype[e]=function(t,r){return this.request(o(r||{},{method:e,url:t,data:(r||{}).data}))}})),a.forEach(["post","put","patch"],(function(e){l.prototype[e]=function(t,r,a){return this.request(o(a||{},{method:e,url:t,data:r}))}})),e.exports=l},946:(e,t,r)=>{"use strict";var a=r(3044);function s(){this.handlers=[]}s.prototype.use=function(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1},s.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},s.prototype.forEach=function(e){a.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=s},7948:(e,t,r)=>{"use strict";var a=r(9192),s=r(8762);e.exports=function(e,t){return e&&!a(t)?s(e,t):t}},8618:(e,t,r)=>{"use strict";var a=r(1935);e.exports=function(e,t,r,s,i){var n=new Error(e);return a(n,t,r,s,i)}},6895:(e,t,r)=>{"use strict";var a=r(3044),s=r(8556),i=r(8041),n=r(1439),o=r(6714);function c(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new o("canceled")}e.exports=function(e){return c(e),e.headers=e.headers||{},e.data=s.call(e,e.data,e.headers,e.transformRequest),e.headers=a.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),a.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||n.adapter)(e).then((function(t){return c(e),t.data=s.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return i(t)||(c(e),t&&t.response&&(t.response.data=s.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},1935:e=>{"use strict";e.exports=function(e,t,r,a,s){return e.config=t,r&&(e.code=r),e.request=a,e.response=s,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,status:this.response&&this.response.status?this.response.status:null}},e}},2937:(e,t,r)=>{"use strict";var a=r(3044);e.exports=function(e,t){t=t||{};var r={};function s(e,t){return a.isPlainObject(e)&&a.isPlainObject(t)?a.merge(e,t):a.isPlainObject(t)?a.merge({},t):a.isArray(t)?t.slice():t}function i(r){return a.isUndefined(t[r])?a.isUndefined(e[r])?void 0:s(void 0,e[r]):s(e[r],t[r])}function n(e){if(!a.isUndefined(t[e]))return s(void 0,t[e])}function o(r){return a.isUndefined(t[r])?a.isUndefined(e[r])?void 0:s(void 0,e[r]):s(void 0,t[r])}function c(r){return r in t?s(e[r],t[r]):r in e?s(void 0,e[r]):void 0}var u={url:n,method:n,data:n,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:c};return a.forEach(Object.keys(e).concat(Object.keys(t)),(function(e){var t=u[e]||i,s=t(e);a.isUndefined(s)&&t!==c||(r[e]=s)})),r}},6955:(e,t,r)=>{"use strict";var a=r(8618);e.exports=function(e,t,r){var s=r.config.validateStatus;r.status&&s&&!s(r.status)?t(a("Request failed with status code "+r.status,r.config,null,r.request,r)):e(r)}},8556:(e,t,r)=>{"use strict";var a=r(3044),s=r(1439);e.exports=function(e,t,r){var i=this||s;return a.forEach(r,(function(r){e=r.call(i,e,t)})),e}},1439:(e,t,r)=>{"use strict";var a=r(3044),s=r(8868),i=r(1935),n={"Content-Type":"application/x-www-form-urlencoded"};function o(e,t){!a.isUndefined(e)&&a.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var c,u={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:(("undefined"!=typeof XMLHttpRequest||"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(c=r(353)),c),transformRequest:[function(e,t){return s(t,"Accept"),s(t,"Content-Type"),a.isFormData(e)||a.isArrayBuffer(e)||a.isBuffer(e)||a.isStream(e)||a.isFile(e)||a.isBlob(e)?e:a.isArrayBufferView(e)?e.buffer:a.isURLSearchParams(e)?(o(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):a.isObject(e)||t&&"application/json"===t["Content-Type"]?(o(t,"application/json"),function(e,t,r){if(a.isString(e))try{return(0,JSON.parse)(e),a.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional||u.transitional,r=t&&t.silentJSONParsing,s=t&&t.forcedJSONParsing,n=!r&&"json"===this.responseType;if(n||s&&a.isString(e)&&e.length)try{return JSON.parse(e)}catch(e){if(n){if("SyntaxError"===e.name)throw i(e,this,"E_JSON_PARSE");throw 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, */*"}}};a.forEach(["delete","get","head"],(function(e){u.headers[e]={}})),a.forEach(["post","put","patch"],(function(e){u.headers[e]=a.merge(n)})),e.exports=u},9241:e=>{e.exports={version:"0.23.0"}},3644:e=>{"use strict";e.exports=function(e,t){return function(){for(var r=new Array(arguments.length),a=0;a<r.length;a++)r[a]=arguments[a];return e.apply(t,r)}}},8030:(e,t,r)=>{"use strict";var a=r(3044);function s(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,r){if(!t)return e;var i;if(r)i=r(t);else if(a.isURLSearchParams(t))i=t.toString();else{var n=[];a.forEach(t,(function(e,t){null!=e&&(a.isArray(e)?t+="[]":e=[e],a.forEach(e,(function(e){a.isDate(e)?e=e.toISOString():a.isObject(e)&&(e=JSON.stringify(e)),n.push(s(t)+"="+s(e))})))})),i=n.join("&")}if(i){var o=e.indexOf("#");-1!==o&&(e=e.slice(0,o)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}},8762:e=>{"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},2233:(e,t,r)=>{"use strict";var a=r(3044);e.exports=a.isStandardBrowserEnv()?{write:function(e,t,r,s,i,n){var o=[];o.push(e+"="+encodeURIComponent(t)),a.isNumber(r)&&o.push("expires="+new Date(r).toGMTString()),a.isString(s)&&o.push("path="+s),a.isString(i)&&o.push("domain="+i),!0===n&&o.push("secure"),document.cookie=o.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(){}}},9192:e=>{"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},5587:e=>{"use strict";e.exports=function(e){return"object"==typeof e&&!0===e.isAxiosError}},842:(e,t,r)=>{"use strict";var a=r(3044);e.exports=a.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function s(e){var a=e;return t&&(r.setAttribute("href",a),a=r.href),r.setAttribute("href",a),{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=s(window.location.href),function(t){var r=a.isString(t)?s(t):t;return r.protocol===e.protocol&&r.host===e.host}}():function(){return!0}},8868:(e,t,r)=>{"use strict";var a=r(3044);e.exports=function(e,t){a.forEach(e,(function(r,a){a!==t&&a.toUpperCase()===t.toUpperCase()&&(e[t]=r,delete e[a])}))}},1875:(e,t,r)=>{"use strict";var a=r(3044),s=["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"];e.exports=function(e){var t,r,i,n={};return e?(a.forEach(e.split("\n"),(function(e){if(i=e.indexOf(":"),t=a.trim(e.substr(0,i)).toLowerCase(),r=a.trim(e.substr(i+1)),t){if(n[t]&&s.indexOf(t)>=0)return;n[t]="set-cookie"===t?(n[t]?n[t]:[]).concat([r]):n[t]?n[t]+", "+r:r}})),n):n}},783:e=>{"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},7525:(e,t,r)=>{"use strict";var a=r(9241).version,s={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){s[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}}));var i={};s.transitional=function(e,t,r){function s(e,t){return"[Axios v"+a+"] Transitional option '"+e+"'"+t+(r?". "+r:"")}return function(r,a,n){if(!1===e)throw new Error(s(a," has been removed"+(t?" in "+t:"")));return t&&!i[a]&&(i[a]=!0,console.warn(s(a," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,a,n)}},e.exports={assertOptions:function(e,t,r){if("object"!=typeof e)throw new TypeError("options must be an object");for(var a=Object.keys(e),s=a.length;s-- >0;){var i=a[s],n=t[i];if(n){var o=e[i],c=void 0===o||n(o,i,e);if(!0!==c)throw new TypeError("option "+i+" must be "+c)}else if(!0!==r)throw Error("Unknown option "+i)}},validators:s}},3044:(e,t,r)=>{"use strict";var a=r(3644),s=Object.prototype.toString;function i(e){return"[object Array]"===s.call(e)}function n(e){return void 0===e}function o(e){return null!==e&&"object"==typeof e}function c(e){if("[object Object]"!==s.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function u(e){return"[object Function]"===s.call(e)}function l(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),i(e))for(var r=0,a=e.length;r<a;r++)t.call(null,e[r],r,e);else for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.call(null,e[s],s,e)}e.exports={isArray:i,isArrayBuffer:function(e){return"[object ArrayBuffer]"===s.call(e)},isBuffer:function(e){return null!==e&&!n(e)&&null!==e.constructor&&!n(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:o,isPlainObject:c,isUndefined:n,isDate:function(e){return"[object Date]"===s.call(e)},isFile:function(e){return"[object File]"===s.call(e)},isBlob:function(e){return"[object Blob]"===s.call(e)},isFunction:u,isStream:function(e){return o(e)&&u(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:l,merge:function e(){var t={};function r(r,a){c(t[a])&&c(r)?t[a]=e(t[a],r):c(r)?t[a]=e({},r):i(r)?t[a]=r.slice():t[a]=r}for(var a=0,s=arguments.length;a<s;a++)l(arguments[a],r);return t},extend:function(e,t,r){return l(t,(function(t,s){e[s]=r&&"function"==typeof t?a(t,r):t})),e},trim:function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e}}},2037:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=t.ApiClient=void 0;var a,s=(a=r(9644))&&a.__esModule?a:{default:a};class i{createClient(e){return s.default.create(Object.assign({},e&&e.baseURL&&{baseURL:e.baseURL},{responseType:"json",headers:Object.assign({},e&&e.accessToken&&{Authorization:`Token ${e.accessToken}`}),timeout:i.DEFAULT_TIMEOUT}))}constructor(e){this.setDefaultHeader=({name:e,value:t,methods:r})=>{const a=this.client.defaults.headers;Array.isArray(r)?r.forEach((r=>{a[r]&&(a[r][e]=t)})):a.common[e]=t},this.deleteDefaultHeader=({name:e,methods:t})=>{const r=this.client.defaults.headers;Array.isArray(t)?t.forEach((t=>{r[t]&&delete r[t][e]})):delete r.common[e]},this.client=this.createClient(e),this.setDefaultHeader({name:"Content-Type",value:"application/x-www-form-urlencoded",methods:["post"]})}getClientInstance(){return this.client}config(e){this.client(e)}setSupportWithCredentials(e){this.client.defaults.withCredentials=e}setBasePortal(e){this.client.defaults.baseURL=e}setAuthorizeToken(e){e?this.setDefaultHeader({name:"Authorization",value:`Bearer ${e}`}):this.deleteDefaultHeader({name:"Authorization"})}request(e){return this.client.request(e)}get(e,t){return this.client.get(e,t)}post(e,t,r){return r?this.client.post(e,t,r):this.client.post(e,t)}patch(e,t){return this.client.patch(e,t)}put(e,t){return this.client.put(e,t)}}t.ApiClient=i,i.DEFAULT_TIMEOUT=1e4;var n=new i;t.default=n},5368:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=void 0;var a=r(2990),s={AccountCreate:{url:(0,a.urlReplacer)("/api/v2/account/create/"),method:"POST"},AccountVerify:{url:(0,a.urlReplacer)("/api/v2/account/verify/"),method:"POST"},AccountRecover:{url:(0,a.urlReplacer)("/api/v2/account/recover/"),method:"POST"},AccountReset:{url:(0,a.urlReplacer)("/api/v2/account/reset/"),method:"POST"},AccountSearch:{url:(0,a.urlReplacer)("/api/v2/account/search/"),method:"GET"},InviteCode:{url:(0,a.urlReplacer)("/api/v2/invite_code/$(code)/"),method:"GET"},PromoCode:{url:(0,a.urlReplacer)("/api/v2/promo_code/$(code)/"),method:"GET"},OAuthToken:{url:(0,a.urlReplacer)("/oauth/token/"),method:"POST"},Preferences:{url:(0,a.urlReplacer)("/api/v2/dynamic_preference/"),method:"GET"},GetPreference:{url:(0,a.urlReplacer)("/api/v2/dynamic_preference/$(id)/"),method:"GET"},SignIn:{url:(0,a.urlReplacer)("/api/v2/sso/signin/"),method:"POST"},SignUp:{url:(0,a.urlReplacer)("/api/v2/sso/signup/"),method:"POST"},Feature:{url:(0,a.urlReplacer)("/api/v2/feature/"),method:"GET"},FeedObjectList:{url:(0,a.urlReplacer)("/api/v2/$(type)/"),method:"GET"},FeedObjectsUncommented:{url:(0,a.urlReplacer)("/api/v2/$(type)/uncommented/"),method:"GET"},SearchFeedObject:{url:(0,a.urlReplacer)("/api/v2/$(type)/search/"),method:"GET"},CreateFeedObject:{url:(0,a.urlReplacer)("/api/v2/$(type)/"),method:"POST"},FeedObject:{url:(0,a.urlReplacer)("/api/v2/$(type)/$(id)/"),method:"GET"},UpdateFeedObject:{url:(0,a.urlReplacer)("/api/v2/$(type)/$(id)/"),method:"PUT"},DeleteFeedObject:{url:(0,a.urlReplacer)("/api/v2/$(type)/$(id)/"),method:"DELETE"},FeedObjectContributorsList:{url:(0,a.urlReplacer)("/api/v2/$(type)/$(id)/contributors/"),method:"GET"},FeedObjectSharesList:{url:(0,a.urlReplacer)("/api/v2/$(type)/$(id)/shares/"),method:"GET"},FeedObjectUserSharesList:{url:(0,a.urlReplacer)("/api/v2/$(type)/$(id)/shares_users/"),method:"GET"},RestoreFeedObject:{url:(0,a.urlReplacer)("/api/v2/$(type)/$(id)/restore/"),method:"POST"},RelatedFeedObjects:{url:(0,a.urlReplacer)("/api/v2/$(type)/$(id)/related/"),method:"GET"},HideFeedObject:{url:(0,a.urlReplacer)("/api/v2/$(type)/$(id)/hide/"),method:"POST"},FeedObjectHideStatus:{url:(0,a.urlReplacer)("/api/v2/$(type)/$(id)/hide/status/"),method:"GET"},CheckIfFollowingFeedObject:{url:(0,a.urlReplacer)("/api/v2/$(type)/$(id)/following/"),method:"GET"},FeedObjectFollowingList:{url:(0,a.urlReplacer)("/api/v2/$(type)/following/"),method:"GET"},FeedObjectFlagList:{url:(0,a.urlReplacer)("/api/v2/$(type)/$(id)/flag/"),method:"POST"},Comment:{url:(0,a.urlReplacer)("/api/v2/comment/$(id)/"),method:"GET"},NewComment:{url:(0,a.urlReplacer)("/api/v2/comment/"),method:"POST"},UpdateComment:{url:(0,a.urlReplacer)("/api/v2/comment/$(id)/"),method:"PUT"},DeleteComment:{url:(0,a.urlReplacer)("/api/v2/comment/$(id)/"),method:"DELETE"},RestoreComment:{url:(0,a.urlReplacer)("/api/v2/comment/$(id)/restore/"),method:"POST"},Comments:{url:(0,a.urlReplacer)("/api/v2/comment/"),method:"GET"},CommentVote:{url:(0,a.urlReplacer)("/api/v2/comment/$(id)/vote/"),method:"POST"},CommentVotesList:{url:(0,a.urlReplacer)("/api/v2/comment/$(id)/vote/"),method:"GET"},CommentRestore:{url:(0,a.urlReplacer)("/api/v2/comment/$(id)/restore"),method:"POST"},CommentFlagList:{url:(0,a.urlReplacer)("/api/v2/comment/$(id)/flag/"),method:"GET"},FlagComment:{url:(0,a.urlReplacer)("/api/v2/comment/$(id)/flag/"),method:"POST"},CommentFlagStatus:{url:(0,a.urlReplacer)("/api/v2/comment/$(id)/flag/status/"),method:"GET"},FlagStatus:{url:(0,a.urlReplacer)("/api/v2/$(type)/$(id)/flag/status/"),method:"GET"},Flag:{url:(0,a.urlReplacer)("/api/v2/$(type)/$(id)/flag/"),method:"POST"},CategoryList:{url:(0,a.urlReplacer)("/api/v2/category/"),method:"GET"},SearchCategory:{url:(0,a.urlReplacer)("/api/v2/category/search/"),method:"GET"},CreateCategory:{url:(0,a.urlReplacer)("/api/v2/category/"),method:"POST"},UpdateCategory:{url:(0,a.urlReplacer)("/api/v2/category/$(id)/"),method:"PUT"},PatchCategory:{url:(0,a.urlReplacer)("/api/v2/category/$(id)/"),method:"PATCH"},DeleteCategory:{url:(0,a.urlReplacer)("/api/v2/category/$(id)/"),method:"DELETE"},CategoryAudience:{url:(0,a.urlReplacer)("/api/v2/category/$(id)/audience/"),method:"GET"},Category:{url:(0,a.urlReplacer)("/api/v2/category/$(id)/"),method:"GET"},CategoriesFollowed:{url:(0,a.urlReplacer)("/api/v2/category/followed/"),method:"GET"},CategoryFollowers:{url:(0,a.urlReplacer)("/api/v2/category/$(id)/followers/"),method:"GET"},CategoryTrendingFeed:{url:(0,a.urlReplacer)("/api/v2/category/$(id)/feed/trending/"),method:"GET"},CategoryTrendingPeople:{url:(0,a.urlReplacer)("/api/v2/category/$(id)/followers/trending/"),method:"GET"},FollowCategory:{url:(0,a.urlReplacer)("/api/v2/category/$(id)/follow/"),method:"POST"},CheckCategoryIsFollowed:{url:(0,a.urlReplacer)("/api/v2/category/$(id)/is_followed/"),method:"GET"},PopularCategories:{url:(0,a.urlReplacer)("/api/v2/category/popular/"),method:"GET"},TagsList:{url:(0,a.urlReplacer)("/api/v2/tag/"),method:"GET"},CreateTag:{url:(0,a.urlReplacer)("/api/v2/tag/"),method:"POST"},SearchTag:{url:(0,a.urlReplacer)("/api/v2/tag/"),method:"GET"},Tag:{url:(0,a.urlReplacer)("/api/v2/tag/$(id)/"),method:"GET"},UpdateTag:{url:(0,a.urlReplacer)("/api/v2/tag/$(id)/"),method:"PUT"},PatchTag:{url:(0,a.urlReplacer)("/api/v2/tag/$(id)/"),method:"PATCH"},AssignTag:{url:(0,a.urlReplacer)("/api/v2/tag/$(id)/assign/"),method:"POST"},UserList:{url:(0,a.urlReplacer)("/api/v2/user/"),method:"GET"},ListHiddenUsers:{url:(0,a.urlReplacer)("/api/v2/user/hidden_users/"),method:"GET"},UserAutocomplete:{url:(0,a.urlReplacer)("/api/v2/user/autocomplete/"),method:"GET"},UserSearch:{url:(0,a.urlReplacer)("/api/v2/user/search/"),method:"GET"},User:{url:(0,a.urlReplacer)("/api/v2/user/$(id)/"),method:"GET"},UserCounters:{url:(0,a.urlReplacer)("/api/v2/user/$(id)/counters/"),method:"GET"},UserUpdate:{url:(0,a.urlReplacer)("/api/v2/user/$(id)/"),method:"PUT"},UserPatch:{url:(0,a.urlReplacer)("/api/v2/user/$(id)/"),method:"PATCH"},UserDelete:{url:(0,a.urlReplacer)("/api/v2/user/$(id)/"),method:"DELETE"},ChangeUserMail:{url:(0,a.urlReplacer)("/api/v2/user/$(id)/change_email/"),method:"PATCH"},ConfirmUserChangeMail:{url:(0,a.urlReplacer)("/api/v2/user/$(id)/confirm_email/"),method:"POST"},ChangeUserPassword:{url:(0,a.urlReplacer)("/api/v2/user/$(id)/change_password/"),method:"PATCH"},UserSettings:{url:(0,a.urlReplacer)("/api/v2/user/$(id)/settings/"),method:"GET"},UserSettingsPatch:{url:(0,a.urlReplacer)("/api/v2/user/$(id)/settings/"),method:"PATCH"},Me:{url:(0,a.urlReplacer)("/api/v2/user/me/"),method:"GET"},MyAvatar:{url:(0,a.urlReplacer)("/api/v2/user/me/avatar/"),method:"GET"},Permission:{url:(0,a.urlReplacer)("/api/v2/user/me/permission/"),method:"GET"},Platform:{url:(0,a.urlReplacer)("/api/v2/user/me/platform_url/"),method:"GET"},FollowedCategories:{url:(0,a.urlReplacer)("/api/v2/user/$(id)/categories/"),method:"GET"},UserFollowers:{url:(0,a.urlReplacer)("/api/v2/user/$(id)/followers/"),method:"GET"},UserFollowings:{url:(0,a.urlReplacer)("/api/v2/user/$(id)/followings/"),method:"GET"},FollowUser:{url:(0,a.urlReplacer)("/api/v2/user/$(id)/follow/"),method:"POST"},CheckUserFollowed:{url:(0,a.urlReplacer)("/api/v2/user/$(id)/is_followed/"),method:"GET"},CheckUserFollower:{url:(0,a.urlReplacer)("/api/v2/user/$(id)/is_follower/"),method:"GET"},UserConnections:{url:(0,a.urlReplacer)("/api/v2/user/$(id)/connections/"),method:"GET"},UserCheckConnection:{url:(0,a.urlReplacer)("/api/v2/user/$(id)/is_connection/"),method:"GET"},UserConnectionRequests:{url:(0,a.urlReplacer)("/api/v2/user/$(id)/connection/requests/"),method:"GET"},UserRequestConnectionsSent:{url:(0,a.urlReplacer)("/api/v2/user/$(id)/connection/requests_sent/"),method:"GET"},UserAcceptRequestConnection:{url:(0,a.urlReplacer)("/api/v2/user/$(id)/connection/accept/"),method:"POST"},UserRequestConnection:{url:(0,a.urlReplacer)("/api/v2/user/$(id)/connection/request/"),method:"POST"},UserRemoveConnection:{url:(0,a.urlReplacer)("/api/v2/user/$(id)/connection/remove/"),method:"POST"},UserCancelRejectConnectionRequest:{url:(0,a.urlReplacer)("/api/v2/user/$(id)/connection/cancel_reject/"),method:"POST"},UserCancelRequestConnection:{url:(0,a.urlReplacer)("/api/v2/user/$(id)/connection/cancel_request/"),method:"POST"},UserRejectConnectionRequest:{url:(0,a.urlReplacer)("/api/v2/user/$(id)/connection/reject/"),method:"POST"},UserMarkSeenConnectionRequest:{url:(0,a.urlReplacer)("/api/v2/user/$(id)/connection_requests/mark_seen/"),method:"POST"},UserShowHide:{url:(0,a.urlReplacer)("/api/v2/user/$(id)/hide/"),method:"POST"},CheckUserHidden:{url:(0,a.urlReplacer)("/api/v2/user/$(id)/is_hidden/"),method:"GET"},CheckUserHiddenBy:{url:(0,a.urlReplacer)("/api/v2/user/$(id)/is_hidden_by/"),method:"GET"},GetUserLoyaltyPoints:{url:(0,a.urlReplacer)("/api/v2/user/$(id)/loyalty/points/"),method:"GET"},UserConnectionStatuses:{url:(0,a.urlReplacer)("/api/v2/user/connection/statuses/"),method:"POST"},UserTagToAddressContribution:{url:(0,a.urlReplacer)("/api/v2/user/tag/tags_to_address_a_contribution/"),method:"GET"},CheckEmailToken:{url:(0,a.urlReplacer)("/api/v2/user/$(id)/check_email_token/"),method:"GET"},AddAvatar:{url:(0,a.urlReplacer)("/api/v2/user/avatar/"),method:"POST"},GetAvatars:{url:(0,a.urlReplacer)("/api/v2/user/avatar/"),method:"GET"},RemoveAvatar:{url:(0,a.urlReplacer)("/api/v2/user/avatar/"),method:"DELETE"},SetPrimaryAvatar:{url:(0,a.urlReplacer)("/api/v2/user/avatar/"),method:"PATCH"},ProviderAssociations:{url:(0,a.urlReplacer)("/api/v2/user/$(id)/provider/"),method:"GET"},CreateProviderAssociation:{url:(0,a.urlReplacer)("/api/v2/user/$(id)/provider/"),method:"POST"},DeleteProviderAssociation:{url:(0,a.urlReplacer)("/api/v2/user/$(id)/provider/"),method:"DELETE"},BroadcastMessagesList:{url:(0,a.urlReplacer)("/api/v2/notification/banner/"),method:"GET"},BroadcastMessagesMarkRead:{url:(0,a.urlReplacer)("/api/v2/notification/banner/read/"),method:"POST"},BroadcastMessagesDispose:{url:(0,a.urlReplacer)("/api/v2/notification/banner/dispose/"),method:"POST"},BroadcastMessagesUnseenCount:{url:(0,a.urlReplacer)("/api/v2/notification/banner/unseen/count/"),method:"GET"},BroadcastMessagesUndisposedCount:{url:(0,a.urlReplacer)("/api/v2/notification/banner/undisposed/count/"),method:"GET"},UserNotificationList:{url:(0,a.urlReplacer)("/api/v2/notification/"),method:"GET"},UserMarkReadNotification:{url:(0,a.urlReplacer)("/api/v2/notification/read/"),method:"POST"},UserUnseenNotificationCount:{url:(0,a.urlReplacer)("/api/v2/notification/unseen/count/"),method:"GET"},CreateCustomNotification:{url:(0,a.urlReplacer)("/api/v2/notification/notify/"),method:"POST"},UserSuspendContributionNotification:{url:(0,a.urlReplacer)("/api/v2/$(type)/$(id)/suspend/"),method:"POST"},UserCheckContributionNotificationSuspended:{url:(0,a.urlReplacer)("/api/v2/$(type)/$(id)/suspended/"),method:"GET"},UserListContributionNotificationSuspended:{url:(0,a.urlReplacer)("/api/v2/$(type)/suspended/"),method:"GET"},CategoriesSuggestion:{url:(0,a.urlReplacer)("/api/v2/suggestion/category/"),method:"GET"},GetIncubatorSuggestion:{url:(0,a.urlReplacer)("/api/v2/suggestion/incubator/"),method:"GET"},PollSuggestion:{url:(0,a.urlReplacer)("/api/v2/suggestion/poll/"),method:"GET"},UserSuggestion:{url:(0,a.urlReplacer)("/api/v2/suggestion/user/"),method:"GET"},SearchSuggestion:{url:(0,a.urlReplacer)("/api/v2/suggestion/"),method:"GET"},FollowContribution:{url:(0,a.urlReplacer)("/api/v2/$(type)/$(id)/follow/"),method:"POST"},Vote:{url:(0,a.urlReplacer)("/api/v2/$(type)/$(id)/vote/"),method:"POST"},VotesList:{url:(0,a.urlReplacer)("/api/v2/$(type)/$(id)/vote/"),method:"GET"},ShareUsersList:{url:(0,a.urlReplacer)("/api/v2/$(type)/$(id)/shares_users/"),method:"GET"},PollVote:{url:(0,a.urlReplacer)("/api/v2/$(type)/$(id)/poll/vote/"),method:"POST"},PollVotesList:{url:(0,a.urlReplacer)("/api/v2/$(type)/$(id)/poll/vote/"),method:"GET"},Contributors:{url:(0,a.urlReplacer)("/api/v2/$(type)/$(id)/contributors/"),method:"GET"},GetPrizes:{url:(0,a.urlReplacer)("/api/v2/loyalty/prize/"),method:"GET"},CreatePrize:{url:(0,a.urlReplacer)("/api/v2/loyalty/prize/"),method:"POST"},GetSpecificPrize:{url:(0,a.urlReplacer)("/api/v2/loyalty/prize/$(id)/"),method:"GET"},UpdatePrize:{url:(0,a.urlReplacer)("/api/v2/loyalty/prize/$(id)/"),method:"PUT"},PatchPrize:{url:(0,a.urlReplacer)("/api/v2/loyalty/prize/$(id)/"),method:"PATCH"},GetPrizeRequests:{url:(0,a.urlReplacer)("/api/v2/loyalty/request/"),method:"GET"},CreatePrizeRequest:{url:(0,a.urlReplacer)("/api/v2/loyalty/request/"),method:"POST"},GetSpecificPrizeRequest:{url:(0,a.urlReplacer)("/api/v2/loyalty/request/$(id)/"),method:"GET"},PatchPrizeRequest:{url:(0,a.urlReplacer)("/api/v2/loyalty/request/$(id)/"),method:"PATCH"},Composer:{url:(0,a.urlReplacer)("/api/v2/$(type)/"),method:"POST"},ComposerEdit:{url:(0,a.urlReplacer)("/api/v2/$(type)/$(id)/"),method:"PUT"},ComposerChunkUploadMedia:{url:(0,a.urlReplacer)("/api/v2/media/upload/chunk/"),method:"POST"},ComposerChunkUploadMediaComplete:{url:(0,a.urlReplacer)("/api/v2/media/upload/complete/"),method:"POST"},ComposerMediaCreate:{url:(0,a.urlReplacer)("/api/v2/media/"),method:"POST"},ComposerCategoryList:{url:(0,a.urlReplacer)("/api/v2/category/"),method:"GET"},ComposerAddressingTagList:{url:(0,a.urlReplacer)("/api/v2/user/tag/tags_to_address_a_contribution/"),method:"GET"},ComposerLocalitySearch:{url:(0,a.urlReplacer)("/api/v2/locality/search/"),method:"GET"},GetMedia:{url:(0,a.urlReplacer)("/api/v2/media/$(id)/"),method:"GET"},UpdateMedia:{url:(0,a.urlReplacer)("/api/v2/media/$(id)/"),method:"PUT"},DeleteMedia:{url:(0,a.urlReplacer)("/api/v2/media/$(id)/"),method:"DELETE"},MediaClickTracker:{url:(0,a.urlReplacer)("/api/v2/media/$(id)/click/"),method:"POST"},GetLocalities:{url:(0,a.urlReplacer)("/api/v2/locality/"),method:"GET"},CustomAdvList:{url:(0,a.urlReplacer)("/api/v2/custom_adv/"),method:"GET"},CustomAdv:{url:(0,a.urlReplacer)("/api/v2/custom_adv/$(id)/"),method:"GET"},CustomAdvSearch:{url:(0,a.urlReplacer)("/api/v2/custom_adv/search/"),method:"GET"},MainFeed:{url:(0,a.urlReplacer)("/api/v2/feed/"),method:"GET"},MainFeedUnseenCount:{url:(0,a.urlReplacer)("/api/v2/feed/unseen/count/"),method:"GET"},FeedObjectMarkRead:{url:(0,a.urlReplacer)("/api/v2/feed/read/"),method:"POST"},ExploreFeed:{url:(0,a.urlReplacer)("/api/v2/feed/explore/"),method:"GET"},FeedLikeThese:{url:(0,a.urlReplacer)("/api/v2/feed/likethis/"),method:"POST"},CategoryFeed:{url:(0,a.urlReplacer)("/api/v2/category/$(id)/feed/"),method:"GET"},UserFeed:{url:(0,a.urlReplacer)("/api/v2/user/$(id)/feed/"),method:"GET"},EmbedFeed:{url:(0,a.urlReplacer)("/api/v2/embed/feed/"),method:"GET"},EmbedList:{url:(0,a.urlReplacer)("/api/v2/embed/"),method:"GET"},EmbedCreate:{url:(0,a.urlReplacer)("/api/v2/embed/"),method:"POST"},EmbedSearch:{url:(0,a.urlReplacer)("/api/v2/embed/search/"),method:"GET"},Embed:{url:(0,a.urlReplacer)("/api/v2/embed/$(id)/"),method:"GET"},UpdateEmbed:{url:(0,a.urlReplacer)("/api/v2/embed/$(id)/"),method:"PUT"},PatchEmbed:{url:(0,a.urlReplacer)("/api/v2/embed/$(id)/"),method:"PATCH"},SpecificEmbedFeed:{url:(0,a.urlReplacer)("/api/v2/embed/$(id)/feed/"),method:"GET"},GetSnippets:{url:(0,a.urlReplacer)("/api/v2/pm/"),method:"GET"},GetASingleMessage:{url:(0,a.urlReplacer)("/api/v2/pm/$(id)/"),method:"GET"},SendMessage:{url:(0,a.urlReplacer)("/api/v2/pm/"),method:"POST"},GetAThread:{url:(0,a.urlReplacer)("/api/v2/pm/"),method:"GET"},PrivateMessageUploadMedia:{url:(0,a.urlReplacer)("/api/v2/pm/upload/"),method:"POST"},PrivateMessageUploadThumbnail:{url:(0,a.urlReplacer)("/api/v2/pm/upload/"),method:"POST"},PrivateMessageUploadMediaInChunks:{url:(0,a.urlReplacer)("/api/v2/pm/upload/"),method:"POST"},PrivateMessageChunkUploadDone:{url:(0,a.urlReplacer)("/api/v2/pm/upload/?done"),method:"POST"},DeleteASingleMessage:{url:(0,a.urlReplacer)("/api/v2/pm/$(id)/"),method:"DELETE"},DeleteAThread:{url:(0,a.urlReplacer)("/api/v2/pm/"),method:"DELETE"},PrivateMessageSearchUser:{url:(0,a.urlReplacer)("/api/v2/pm/search/?user=$(search)"),method:"GET"},Device:{url:(0,a.urlReplacer)("/api/v2/device/$(type)/$(id)/"),method:"GET"},NewDevice:{url:(0,a.urlReplacer)("/api/v2/device/$(type)/"),method:"POST"},DeleteDevice:{url:(0,a.urlReplacer)("/api/v2/device/$(type)/$(id)/"),method:"DELETE"},UsersForModeration:{url:(0,a.urlReplacer)("/api/v2/moderation/user/"),method:"GET"},ModerateUser:{url:(0,a.urlReplacer)("/api/v2/moderation/user/$(id)/"),method:"PATCH"},FlaggedContributions:{url:(0,a.urlReplacer)("/api/v2/moderation/contribution/"),method:"GET"},FlagsForSpecificContribution:{url:(0,a.urlReplacer)("/api/v2/moderation/contribution/$(id)/flag/?contribution_type=$(contribution_type)"),method:"GET"},ModerateContribution:{url:(0,a.urlReplacer)("/api/v2/moderation/contribution/$(id)/"),method:"PATCH"},ModerateContributionStatus:{url:(0,a.urlReplacer)("/api/v2/moderation/contribution/$(id)/status/?contribution_type=$(contribution_type)"),method:"GET"},InsightBestContribution:{url:(0,a.urlReplacer)("/api/v2/insight/contribution/"),method:"GET"},InsightBestEmbed:{url:(0,a.urlReplacer)("/api/v2/insight/embed/"),method:"GET"},InsightBestUser:{url:(0,a.urlReplacer)("/api/v2/insight/user/"),method:"GET"},InsightContributionCounter:{url:(0,a.urlReplacer)("/api/v2/insight/contribution/counters/?contribution_id=$(id)"),method:"GET"},InsightEmbedCounter:{url:(0,a.urlReplacer)("/api/v2/insight/embed/counters/?embed_type=$(type)&embed_id=$(id)"),method:"GET"},InsightUserCounter:{url:(0,a.urlReplacer)("/api/v2/insight/user/counters/?user_id=$(id)"),method:"GET"},GetAllIncubators:{url:(0,a.urlReplacer)("/api/v2/incubator/"),method:"GET"},SearchIncubators:{url:(0,a.urlReplacer)("/api/v2/incubator/search/"),method:"GET"},GetASpecificIncubator:{url:(0,a.urlReplacer)("/api/v2/incubator/$(id)/"),method:"GET"},CheckIncubatorSubscription:{url:(0,a.urlReplacer)("/api/v2/incubator/$(id)/subscribed/"),method:"GET"},SubscribeToIncubator:{url:(0,a.urlReplacer)("/api/v2/incubator/$(id)/subscribe/"),method:"POST"},CreateAnIncubator:{url:(0,a.urlReplacer)("/api/v2/incubator/"),method:"POST"},GetIncubatorSubscribers:{url:(0,a.urlReplacer)("/api/v2/incubator/$(id)/subscribers/"),method:"GET"},GetCustomMenus:{url:(0,a.urlReplacer)("/api/v2/custom_menu/"),method:"GET"},CustomMenu:{url:(0,a.urlReplacer)("/api/v2/custom_menu/$(id)/"),method:"GET"},CustomMenuSearch:{url:(0,a.urlReplacer)("/api/v2/custom_menu/search/"),method:"GET"},GetCustomPages:{url:(0,a.urlReplacer)("/api/v2/custom_page/"),method:"GET"},CustomPage:{url:(0,a.urlReplacer)("/api/v2/custom_page/$(id)/"),method:"GET"},CustomPageSearch:{url:(0,a.urlReplacer)("/api/v2/custom_page/search/"),method:"GET"},LegalPage:{url:(0,a.urlReplacer)("/api/v2/legal_page/$(id)/"),method:"GET"},GetLegalPages:{url:(0,a.urlReplacer)("/api/v2/legal_page/"),method:"GET"},SearchLegalPages:{url:(0,a.urlReplacer)("/api/v2/legal_page/search/"),method:"GET"},LegalPagesLastRevision:{url:(0,a.urlReplacer)("/api/v2/legal_page/last_revisions/"),method:"GET"},LegalPageLastRevision:{url:(0,a.urlReplacer)("/api/v2/legal_page/$(policy)/"),method:"GET"},LegalPageRevisions:{url:(0,a.urlReplacer)("/api/v2/legal_page/$(policy)/revisions/"),method:"GET"},AckLegalPage:{url:(0,a.urlReplacer)("/api/v2/legal_page/$(id)/ack/"),method:"POST"},SpecificUserAck:{url:(0,a.urlReplacer)("/api/v2/legal_page/$(id)/user_ack/"),method:"GET"},UserAckList:{url:(0,a.urlReplacer)("/api/v2/legal_page/user_acks/"),method:"GET"},WebhookEndpointsList:{url:(0,a.urlReplacer)("/api/v2/webhook/endpoint/"),method:"GET"},WebhookEventsList:{url:(0,a.urlReplacer)("/api/v2/webhook/endpoint/event/"),method:"GET"},WebhookCreate:{url:(0,a.urlReplacer)("/api/v2/webhook/endpoint/"),method:"POST"},GetSpecificWebhook:{url:(0,a.urlReplacer)("/api/v2/webhook/endpoint/$(id)/"),method:"GET"},WebhookUpdate:{url:(0,a.urlReplacer)("/api/v2/webhook/endpoint/$(id)/"),method:"PUT"},WebhookPatch:{url:(0,a.urlReplacer)("/api/v2/webhook/endpoint/$(id)/"),method:"PATCH"},WebhookDelete:{url:(0,a.urlReplacer)("/api/v2/webhook/endpoint/$(id)/"),method:"DELETE"},WebhookEndpointAttempts:{url:(0,a.urlReplacer)("/api/v2/webhook/endpoint/$(id)/attempt/"),method:"GET"},WebhookExpireSigningSecret:{url:(0,a.urlReplacer)("/api/v2/webhook/endpoint/$(id)/secret/expire/"),method:"POST"},WebhookRevealSigningSecret:{url:(0,a.urlReplacer)("/api/v2/webhook/endpoint/$(id)/secret/reveal/"),method:"POST"},WebhookResendEndpointEvent:{url:(0,a.urlReplacer)("/api/v2/webhook/endpoint/$(id)/event/resend/"),method:"POST"},WebhookResendMultipleEndpointEvent:{url:(0,a.urlReplacer)("/api/v2/webhook/endpoint/$(id)/event/resend/bulk/"),method:"POST"},GenerateDataPortability:{url:(0,a.urlReplacer)("/api/v2/udp/"),method:"POST"},DataPortabilityStatus:{url:(0,a.urlReplacer)("/api/v2/udp/"),method:"GET"},DataPortabilityDownload:{url:(0,a.urlReplacer)("/api/v2/udp/download"),method:"GET"},ScoresList:{url:(0,a.urlReplacer)("/api/v2/score/"),method:"GET"},SearchScore:{url:(0,a.urlReplacer)("/api/v2/score/search/"),method:"GET"},AddScore:{url:(0,a.urlReplacer)("/api/v2/score/"),method:"POST"},GetReactions:{url:(0,a.urlReplacer)("/api/v2/reaction/"),method:"GET"},GetSpecificReaction:{url:(0,a.urlReplacer)("/api/v2/reaction/$(id)/"),method:"GET"}};t.default=s},8634:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=t.AccountApiClient=void 0;var a,s=(a=r(5368))&&a.__esModule?a:{default:a},i=r(2746);class n{static create(e,t){return(0,i.apiRequest)(Object.assign({},t,{data:e,url:s.default.AccountCreate.url({}),method:s.default.AccountCreate.method}))}static verify(e,t){return(0,i.apiRequest)(Object.assign({},t,{data:e,url:s.default.AccountVerify.url({}),method:s.default.AccountVerify.method}))}static recover(e,t){return(0,i.apiRequest)(Object.assign({},t,{data:e,url:s.default.AccountRecover.url({}),method:s.default.AccountRecover.method}))}static reset(e,t){return(0,i.apiRequest)(Object.assign({},t,{data:e,url:s.default.AccountReset.url({}),method:s.default.AccountReset.method}))}static search(e,t){return(0,i.apiRequest)(Object.assign({},t,{params:e,url:s.default.AccountSearch.url({}),method:s.default.AccountSearch.method}))}}t.AccountApiClient=n,t.default=class{static async create(e,t){return n.create(e,t)}static async verify(e,t){return n.verify(e,t)}static async recover(e,t){return n.recover(e,t)}static async reset(e,t){return n.reset(e,t)}static async search(e,t){return n.search(e,t)}}},707:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=t.CategoryApiClient=void 0;var a,s=(a=r(5368))&&a.__esModule?a:{default:a},i=r(2746),n=r(735);class o{static getAllCategories(e,t){const r=(0,n.urlParams)(e);return(0,i.apiRequest)(Object.assign({url:`${s.default.CategoryList.url({})}?${r.toString()}`,method:s.default.CategoryList.method},t))}static searchCategory(e,t){const r=(0,n.urlParams)(e);return(0,i.apiRequest)(Object.assign({url:`${s.default.SearchCategory.url({})}?${r.toString()}`,method:s.default.SearchCategory.method},t))}static createCategory(e,t){return(0,i.apiRequest)(Object.assign({url:s.default.CreateCategory.url({}),method:s.default.CreateCategory.method,data:e},t))}static getSpecificCategory(e,t){return(0,i.apiRequest)(Object.assign({url:s.default.Category.url({id:e}),method:s.default.Category.method},t))}static updateASpecificCategory(e,t,r){return(0,i.apiRequest)(Object.assign({url:s.default.UpdateCategory.url({id:e}),method:s.default.UpdateCategory.method,data:t},r))}static patchASpecificCategory(e,t,r){return(0,i.apiRequest)(Object.assign({url:s.default.PatchCategory.url({id:e}),method:s.default.PatchCategory.method,data:t},r))}static deleteASpecificCategory(e,t){return(0,i.apiRequest)(Object.assign({url:s.default.DeleteCategory.url({id:e}),method:s.default.DeleteCategory.method},t))}static getCategoryAudience(e,t){return(0,i.apiRequest)(Object.assign({url:s.default.CategoryAudience.url({id:e}),method:s.default.CategoryAudience.method},t))}static getCategoryFollowers(e,t,r){return(0,i.apiRequest)(Object.assign({url:s.default.CategoryFollowers.url({id:e}),method:s.default.CategoryFollowers.method,params:t},r))}static getCategoryFeed(e,t,r){return(0,i.apiRequest)(Object.assign({url:s.default.CategoryFeed.url({id:e}),method:s.default.CategoryFeed.method,params:t},r))}static getCategoryTrendingFeed(e,t,r){const a=(0,n.urlParams)(t);return(0,i.apiRequest)(Object.assign({url:`${s.default.CategoryTrendingFeed.url({id:e})}?${a.toString()}`,method:s.default.CategoryTrendingFeed.method},r))}static getCategoryTrendingFollowers(e,t,r){return(0,i.apiRequest)(Object.assign({url:s.default.CategoryTrendingPeople.url({id:e}),method:s.default.CategoryTrendingPeople.method,params:t},r))}static followCategory(e,t){return(0,i.apiRequest)(Object.assign({url:s.default.FollowCategory.url({id:e}),method:s.default.FollowCategory.method},t))}static checkCategoryIsFollowed(e,t){return(0,i.apiRequest)(Object.assign({url:s.default.CheckCategoryIsFollowed.url({id:e}),method:s.default.CheckCategoryIsFollowed.method},t))}static getFollowedCategories(e,t){const r=(0,n.urlParams)(e);return(0,i.apiRequest)(Object.assign({url:`${s.default.CategoriesFollowed.url({})}?${r.toString()}`,method:s.default.CategoriesFollowed.method},t))}static getPopularCategories(e,t){const r=(0,n.urlParams)(e);return(0,i.apiRequest)(Object.assign({},t,{url:`${s.default.PopularCategories.url({})}?${r.toString()}`,method:s.default.PopularCategories.method}))}}t.CategoryApiClient=o,t.default=class{static async getAllCategories(e,t){return o.getAllCategories(e,t)}static async searchCategory(e,t){return o.searchCategory(e,t)}static async createCategory(e,t){return o.createCategory(e,t)}static async getSpecificCategory(e,t){return o.getSpecificCategory(e,t)}static async updateASpecificCategory(e,t,r){return o.updateASpecificCategory(e,t,r)}static async patchASpecificCategory(e,t,r){return o.patchASpecificCategory(e,t,r)}static async deleteASpecificCategory(e,t){return o.deleteASpecificCategory(e,t)}static async getCategoryAudience(e,t){return o.getCategoryAudience(e,t)}static async getCategoryFollowers(e,t,r){return o.getCategoryFollowers(e,t,r)}static async getCategoryFeed(e,t,r){return o.getCategoryFeed(e,t,r)}static async getCategoryTrendingFeed(e,t,r){return o.getCategoryTrendingFeed(e,t,r)}static async getCategoryTrendingFollowers(e,t,r){return o.getCategoryTrendingFollowers(e,t,r)}static async followCategory(e,t){return o.followCategory(e,t)}static async checkCategoryIsFollowed(e,t){return o.checkCategoryIsFollowed(e,t)}static async getFollowedCategories(e,t){return o.getFollowedCategories(e,t)}static async getPopularCategories(e,t){return o.getPopularCategories(e,t)}}},6527:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=t.CommentApiClient=void 0;var a,s=(a=r(5368))&&a.__esModule?a:{default:a},i=r(2746),n=r(735);class o{static getAllComments(e,t){const r=(0,n.urlParams)(e);return(0,i.apiRequest)(Object.assign({},t,{url:`${s.default.Comments.url({})}?${r.toString()}`,method:s.default.Comments.method}))}static createComment(e,t){return(0,i.apiRequest)(Object.assign({},t,{url:s.default.NewComment.url({}),method:s.default.NewComment.method,data:e}))}static getASpecificComment(e,t){return(0,i.apiRequest)(Object.assign({},t,{url:s.default.Comment.url({id:e}),method:s.default.Comment.method}))}static updateComment(e,t,r){return(0,i.apiRequest)(Object.assign({},r,{url:s.default.UpdateComment.url({id:e}),method:s.default.UpdateComment.method,data:{text:t}}))}static deleteComment(e,t){return(0,i.apiRequest)(Object.assign({},t,{url:s.default.DeleteComment.url({id:e}),method:s.default.DeleteComment.method}))}static restoreComment(e,t){return(0,i.apiRequest)(Object.assign({},t,{url:s.default.RestoreComment.url({id:e}),method:s.default.RestoreComment.method}))}static getSpecificCommentVotesList(e,t){return(0,i.apiRequest)(Object.assign({},t,{url:s.default.CommentVotesList.url({id:e}),method:s.default.CommentVotesList.method}))}static upvoteComment(e,t){return(0,i.apiRequest)(Object.assign({},t,{url:s.default.CommentVote.url({id:e}),method:s.default.CommentVote.method}))}static getSpecificCommentFlags(e,t){return(0,i.apiRequest)(Object.assign({},t,{url:s.default.CommentFlagList.url({id:e}),method:s.default.CommentFlagList.method}))}static flagComment(e,t,r){return(0,i.apiRequest)(Object.assign({},r,{url:s.default.FlagComment.url({id:e}),method:s.default.FlagComment.method,data:{flagType:t}}))}static getSpecificCommentFlagStatus(e,t){return(0,i.apiRequest)(Object.assign({},t,{url:s.default.CommentFlagStatus.url({id:e}),method:s.default.CommentFlagStatus.method}))}}t.CommentApiClient=o,t.default=class{static async getAllComments(e,t){return o.getAllComments(e,t)}static async createComment(e,t){return o.createComment(e,t)}static async getASpecificComment(e,t){return o.getASpecificComment(e,t)}static async updateComment(e,t,r){return o.updateComment(e,t,r)}static async deleteComment(e,t){return o.deleteComment(e,t)}static async restoreComment(e,t){return o.restoreComment(e,t)}static async getSpecificCommentVotesList(e,t){return o.getSpecificCommentVotesList(e,t)}static async upvoteComment(e,t){return o.upvoteComment(e,t)}static async getSpecificCommentFlags(e,t){return o.getSpecificCommentFlags(e,t)}static async flagComment(e,t,r){return o.flagComment(e,t,r)}static async getSpecificCommentFlagStatus(e,t){return o.getSpecificCommentFlagStatus(e,t)}}},9741:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=t.CustomAdvApiClient=void 0;var a,s=r(2746),i=(a=r(5368))&&a.__esModule?a:{default:a},n=r(735);class o{static getASpecificCustomAdv(e,t){return(0,s.apiRequest)(Object.assign({},t,{url:i.default.CustomAdv.url({id:e}),method:i.default.CustomAdv.method}))}static getAllCustomAdv(e,t){const r=(0,n.urlParams)(e);return(0,s.apiRequest)(Object.assign({},t,{url:`${i.default.CustomAdvList.url({})}?${r.toString()}`,method:i.default.CustomAdvList.method}))}static searchCustomAdv(e,t){const r=(0,n.urlParams)(e);return(0,s.apiRequest)(Object.assign({},t,{url:`${i.default.CustomAdvSearch.url({})}?${r.toString()}`,method:i.default.CustomAdvSearch.method}))}}t.CustomAdvApiClient=o,t.default=class{static async getASpecificCustomAdv(e,t){return o.getASpecificCustomAdv(e,t)}static async getAllCustomAdv(e,t){return o.getAllCustomAdv(e,t)}static async searchCustomAdv(e,t){return o.searchCustomAdv(e,t)}}},4315:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=t.CustomMenuApiClient=void 0;var a,s=(a=r(5368))&&a.__esModule?a:{default:a},i=r(2746),n=r(735);class o{static getASpecificCustomMenu(e,t){return(0,i.apiRequest)(Object.assign({},t,{url:s.default.CustomMenu.url({id:e}),method:s.default.CustomMenu.method}))}static getAllCustomMenus(e,t){const r=(0,n.urlParams)(e);return(0,i.apiRequest)(Object.assign({},t,{url:`${s.default.GetCustomMenus.url({})}?${r.toString()}`,method:s.default.GetCustomMenus.method}))}static getBaseCustomMenu(e){return(0,i.apiRequest)(Object.assign({},e,{url:s.default.CustomMenu.url({id:"base"}),method:s.default.CustomMenu.method}))}static searchCustomMenus(e,t){const r=(0,n.urlParams)(e);return(0,i.apiRequest)(Object.assign({},t,{url:`${s.default.CustomMenuSearch.url({})}?${r.toString()}`,method:s.default.CustomMenuSearch.method}))}}t.CustomMenuApiClient=o,t.default=class{static async getASpecificCustomMenu(e,t){return o.getASpecificCustomMenu(e,t)}static async getAllCustomMenus(e,t){return o.getAllCustomMenus(e,t)}static async getBaseCustomMenu(e){return o.getBaseCustomMenu(e)}static async searchCustomMenus(e,t){return o.searchCustomMenus(e,t)}}},9984:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=t.CustomPageApiClient=void 0;var a,s=(a=r(5368))&&a.__esModule?a:{default:a},i=r(2746),n=r(735);class o{static getASpecificCustomPage(e,t){return(0,i.apiRequest)(Object.assign({},t,{url:s.default.CustomPage.url({id:e}),method:s.default.CustomPage.method}))}static getAllCustomPages(e,t){const r=(0,n.urlParams)(e);return(0,i.apiRequest)(Object.assign({},t,{url:`${s.default.GetCustomPages.url({})}?${r.toString()}`,method:s.default.GetCustomPages.method}))}static searchCustomPages(e,t){const r=(0,n.urlParams)(e);return(0,i.apiRequest)(Object.assign({},t,{url:`${s.default.CustomPageSearch.url({})}?${r.toString()}`,method:s.default.CustomPageSearch.method}))}}t.CustomPageApiClient=o,t.default=class{static async getASpecificCustomPage(e,t){return o.getASpecificCustomPage(e,t)}static async getAllCustomPages(e,t){return o.getAllCustomPages(e,t)}static async searchCustomPages(e,t){return o.searchCustomPages(e,t)}}},6560:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=t.DataPortabilityApiClient=void 0;var a,s=r(2746),i=(a=r(5368))&&a.__esModule?a:{default:a};class n{static generateDataPortability(e){return(0,s.apiRequest)(Object.assign({url:i.default.GenerateDataPortability.url({}),method:i.default.GenerateDataPortability.method},e))}static downloadDataPortability(e){return(0,s.apiRequest)(Object.assign({url:i.default.DataPortabilityDownload.url({}),method:i.default.DataPortabilityDownload.method,responseType:"blob"},e))}static dataPortabilityStatus(e){return(0,s.apiRequest)(Object.assign({url:i.default.DataPortabilityStatus.url({}),method:i.default.DataPortabilityStatus.method},e))}}t.DataPortabilityApiClient=n,t.default=class{static async generateDataPortability(e){return n.generateDataPortability(e)}static async downloadDataPortability(e){return n.downloadDataPortability(e)}static async dataPortabilityStatus(e){return n.dataPortabilityStatus(e)}}},13:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=t.EmbedApiClient=void 0;var a,s=r(2746),i=(a=r(5368))&&a.__esModule?a:{default:a},n=r(735);class o{static getAllEmbeds(e,t){const r=(0,n.urlParams)(e);return(0,s.apiRequest)(Object.assign({},t,{url:`${i.default.EmbedList.url({})}?${r.toString()}`,method:i.default.EmbedList.method}))}static createEmbed(e,t){return(0,s.apiRequest)(Object.assign({},t,{url:i.default.EmbedCreate.url({}),method:i.default.EmbedCreate.method,data:e}))}static searchEmbed(e,t){const r=(0,n.urlParams)(e);return(0,s.apiRequest)(Object.assign({},t,{url:`${i.default.EmbedSearch.url({})}?${r.toString()}`,method:i.default.EmbedSearch.method}))}static getSpecificEmbed(e,t){return(0,s.apiRequest)(Object.assign({},t,{url:i.default.Embed.url({id:e}),method:i.default.Embed.method}))}static updateASpecificEmbed(e,t,r){return(0,s.apiRequest)(Object.assign({},r,{url:i.default.UpdateEmbed.url({id:e}),method:i.default.UpdateEmbed.method,data:t}))}static patchASpecificEmbed(e,t,r){return(0,s.apiRequest)(Object.assign({},r,{url:i.default.PatchEmbed.url({id:e}),method:i.default.PatchEmbed.method,data:t}))}static getEmbedFeed(e,t,r){const a=(0,n.urlParams)(Object.assign({},e&&{embed_type:e},t&&{embed_id:t}));return(0,s.apiRequest)(Object.assign({},r,{url:`${i.default.EmbedFeed.url({})}?${a.toString()}`,method:i.default.EmbedFeed.method}))}static getSpecificEmbedFeed(e,t){return(0,s.apiRequest)(Object.assign({},t,{url:i.default.SpecificEmbedFeed.url({id:e}),method:i.default.SpecificEmbedFeed.method}))}}t.EmbedApiClient=o,t.default=class{static async getAllEmbeds(e,t){return o.getAllEmbeds(e,t)}static async searchEmbed(e,t){return o.searchEmbed(e,t)}static async createEmbed(e,t){return o.createEmbed(e,t)}static async getSpecificEmbed(e,t){return o.getSpecificEmbed(e,t)}static async updateASpecificEmbed(e,t,r){return o.updateASpecificEmbed(e,t,r)}static async patchASpecificEmbed(e,t,r){return o.patchASpecificEmbed(e,t,r)}static async getEmbedFeed(e,t,r){return o.getEmbedFeed(e,t,r)}static async getSpecificEmbedFeed(e,t){return o.getSpecificEmbedFeed(e,t)}}},6334:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=t.FeatureApiClient=void 0;var a,s=r(2746),i=(a=r(5368))&&a.__esModule?a:{default:a},n=r(735);class o{static getAllFeatures(e,t){const r=(0,n.urlParams)(e);return(0,s.apiRequest)(Object.assign({},t,{url:`${i.default.Feature.url({})}?${r.toString()}`,method:i.default.Feature.method}))}}t.FeatureApiClient=o,t.default=class{static async getAllFeatures(e,t){return o.getAllFeatures(e,t)}}},7980:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=t.FeedApiClient=void 0;var a,s=r(2746),i=(a=r(5368))&&a.__esModule?a:{default:a},n=r(735);class o{static getMainFeed(e,t){const r=(0,n.urlParams)(e);return(0,s.apiRequest)(Object.assign({},t,{url:`${i.default.MainFeed.url({})}?${r.toString()}`,method:i.default.MainFeed.method}))}static getExploreFeed(e,t){const r=(0,n.urlParams)(e);return(0,s.apiRequest)(Object.assign({},t,{url:`${i.default.ExploreFeed.url({})}?${r.toString()}`,method:i.default.ExploreFeed.method}))}static getMainFeedUnseenCount(e){return(0,s.apiRequest)(Object.assign({},e,{url:i.default.MainFeedUnseenCount.url({}),method:i.default.MainFeedUnseenCount.method}))}static markReadASpecificFeedObj(e,t){return(0,s.apiRequest)(Object.assign({},t,{url:i.default.FeedObjectMarkRead.url({}),method:i.default.FeedObjectMarkRead.method,data:{object:e}}))}static likeFeedObjs(e,t){return(0,s.apiRequest)(Object.assign({},t,{url:i.default.FeedLikeThese.url({}),method:i.default.FeedLikeThese.method,data:{object:e}}))}}t.FeedApiClient=o,t.default=class{static async getMainFeed(e,t){return o.getMainFeed(e,t)}static async getExploreFeed(e,t){return o.getExploreFeed(e,t)}static async getMainFeedUnseenCount(e){return o.getMainFeedUnseenCount(e)}static async markReadASpecificFeedObj(e,t){return o.markReadASpecificFeedObj(e,t)}static async likeFeedObjs(e,t){return o.likeFeedObjs(e,t)}}},5564:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=t.FeedObjectApiClient=void 0;var a,s=r(2746),i=(a=r(5368))&&a.__esModule?a:{default:a},n=r(735);class o{static getAllFeedObjects(e,t,r){const a=(0,n.urlParams)(t);return(0,s.apiRequest)(Object.assign({},r,{url:`${i.default.FeedObjectList.url({type:e})}?${a.toString()}`,method:i.default.FeedObjectList.method}))}static getUncommentedFeedObjects(e,t,r){const a=(0,n.urlParams)(t);return(0,s.apiRequest)(Object.assign({},r,{url:`${i.default.FeedObjectsUncommented.url({type:e})}?${a.toString()}`,method:i.default.FeedObjectsUncommented.method}))}static searchFeedObject(e,t,r){const a=(0,n.urlParams)(t);return(0,s.apiRequest)(Object.assign({},r,{url:`${i.default.SearchFeedObject.url({type:e})}?${a.toString()}`,method:i.default.SearchFeedObject.method}))}static createFeedObject(e,t,r){return(0,s.apiRequest)(Object.assign({},r,{url:i.default.CreateFeedObject.url({type:e}),method:i.default.CreateFeedObject.method,data:t}))}static getSpecificFeedObject(e,t,r){return(0,s.apiRequest)(Object.assign({},r,{url:i.default.FeedObject.url({type:e,id:t}),method:i.default.FeedObject.method}))}static updateFeedObject(e,t,r,a){return(0,s.apiRequest)(Object.assign({},a,{url:i.default.UpdateFeedObject.url({id:t,type:e}),method:i.default.UpdateFeedObject.method,data:r}))}static deleteFeedObject(e,t,r){return(0,s.apiRequest)(Object.assign({},r,{url:i.default.DeleteFeedObject.url({type:e,id:t}),method:i.default.DeleteFeedObject.method}))}static feedObjectContributorsList(e,t,r,a){const o=(0,n.urlParams)(r);return(0,s.apiRequest)(Object.assign({},a,{url:`${i.default.FeedObjectContributorsList.url({type:e,id:t})}?${o.toString()}`,method:i.default.FeedObjectContributorsList.method}))}static feedObjectSharesList(e,t,r,a){const o=(0,n.urlParams)(r);return(0,s.apiRequest)(Object.assign({},a,{url:`${i.default.FeedObjectSharesList.url({type:e,id:t})}?${o.toString()}`,method:i.default.FeedObjectSharesList.method}))}static feedObjectUserSharesList(e,t,r,a){const o=(0,n.urlParams)(r);return(0,s.apiRequest)(Object.assign({},a,{url:`${i.default.FeedObjectUserSharesList.url({type:e,id:t})}?${o.toString()}`,method:i.default.FeedObjectUserSharesList.method}))}static restoreFeedObject(e,t,r){return(0,s.apiRequest)(Object.assign({},r,{url:i.default.RestoreFeedObject.url({type:e,id:t}),method:i.default.RestoreFeedObject.method}))}static relatedFeedObjects(e,t,r,a){const o=(0,n.urlParams)(r);return(0,s.apiRequest)(Object.assign({},a,{url:`${i.default.RelatedFeedObjects.url({type:e,id:t})}?${o.toString()}`,method:i.default.RelatedFeedObjects.method}))}static voteFeedObject(e,t,r,a){const o=(0,n.urlParams)(Object.assign({},r&&{reaction:r}));return(0,s.apiRequest)(Object.assign({},a,{url:`${i.default.Vote.url({type:e,id:t})}?${o.toString()}`,method:i.default.Vote.method}))}static feedObjectVotes(e,t,r,a){const o=(0,n.urlParams)(r);return(0,s.apiRequest)(Object.assign({},a,{url:`${i.default.VotesList.url({type:e,id:t})}?${o.toString()}`,method:i.default.VotesList.method}))}static feedObjectPollVote(e,t,r,a){return(0,s.apiRequest)(Object.assign({},a,{url:i.default.PollVote.url({type:e,id:t}),method:i.default.PollVote.method,data:{choice:r}}))}static feedObjectPollVotesList(e,t,r,a){const o=(0,n.urlParams)(r);return(0,s.apiRequest)(Object.assign({},a,{url:`${i.default.PollVotesList.url({type:e,id:t})}?${o.toString()}`,method:i.default.PollVotesList.method}))}static followFeedObject(e,t,r){return(0,s.apiRequest)(Object.assign({},r,{url:i.default.FollowContribution.url({id:t}),method:i.default.FollowContribution.method}))}static feedObjectFollowingList(e,t,r){const a=(0,n.urlParams)(t);return(0,s.apiRequest)(Object.assign({},r,{url:`${i.default.FeedObjectFollowingList.url({type:e})}?${a.toString()}`,method:i.default.FeedObjectFollowingList.method}))}static checkIfFollowingFeedObject(e,t,r){return(0,s.apiRequest)(Object.assign({},r,{url:i.default.CheckIfFollowingFeedObject.url({type:e,id:t}),method:i.default.CheckIfFollowingFeedObject.method}))}static suspendFeedObject(e,t,r){return(0,s.apiRequest)(Object.assign({},r,{url:i.default.UserSuspendContributionNotification.url({type:e,id:t}),method:i.default.UserSuspendContributionNotification.method}))}static checkIfSuspendedFeedObject(e,t,r){return(0,s.apiRequest)(Object.assign({},r,{url:i.default.UserCheckContributionNotificationSuspended.url({type:e,id:t}),method:i.default.UserCheckContributionNotificationSuspended.method}))}static feedObjectSuspendedList(e,t,r){const a=(0,n.urlParams)(t);return(0,s.apiRequest)(Object.assign({},r,{url:`${i.default.UserListContributionNotificationSuspended.url({type:e})}?${a.toString()}`,method:i.default.UserListContributionNotificationSuspended.method}))}static flagFeedObject(e,t,r,a){return(0,s.apiRequest)(Object.assign({},a,{url:i.default.Flag.url({type:e,id:t}),method:i.default.Flag.method,data:r}))}static feedObjectFlagStatus(e,t,r){return(0,s.apiRequest)(Object.assign({},r,{url:i.default.FlagStatus.url({type:e,id:t}),method:i.default.FlagStatus.method}))}static feedObjectFlagList(e,t,r){return(0,s.apiRequest)(Object.assign({},r,{url:i.default.FeedObjectFlagList.url({type:e,id:t}),method:i.default.FeedObjectFlagList.method}))}static hideFeedObject(e,t,r){return(0,s.apiRequest)(Object.assign({},r,{url:i.default.HideFeedObject.url({type:e,id:t}),method:i.default.HideFeedObject.method}))}static feedObjectHideStatus(e,t,r){return(0,s.apiRequest)(Object.assign({},r,{url:i.default.FeedObjectHideStatus.url({type:e,id:t}),method:i.default.FeedObjectHideStatus.method}))}}t.FeedObjectApiClient=o,t.default=class{static async getAllFeedObjects(e,t,r){return o.getAllFeedObjects(e,t,r)}static async getUncommentedFeedObjects(e,t,r){return o.getUncommentedFeedObjects(e,t,r)}static async searchFeedObject(e,t,r){return o.searchFeedObject(e,t,r)}static async createFeedObject(e,t,r){return o.createFeedObject(e,t,r)}static async getSpecificFeedObject(e,t,r){return o.getSpecificFeedObject(e,t,r)}static async updateFeedObject(e,t,r,a){return o.updateFeedObject(e,t,r,a)}static async deleteFeedObject(e,t,r){return o.deleteFeedObject(e,t,r)}static async feedObjectContributorsList(e,t,r,a){return o.feedObjectContributorsList(e,t,r,a)}static async feedObjectSharesList(e,t,r,a){return o.feedObjectSharesList(e,t,r,a)}static async feedObjectUserSharesList(e,t,r){return o.feedObjectUserSharesList(e,t,r)}static async restoreFeedObject(e,t,r){return o.restoreFeedObject(e,t,r)}static async relatedFeedObjects(e,t,r,a){return o.relatedFeedObjects(e,t,r,a)}static async voteFeedObject(e,t,r,a){return o.voteFeedObject(e,t,r,a)}static async feedObjectVotes(e,t,r,a){return o.feedObjectVotes(e,t,r,a)}static async feedObjectPollVote(e,t,r,a){return o.feedObjectPollVote(e,t,r,a)}static async feedObjectPollVotesList(e,t,r,a){return o.feedObjectPollVotesList(e,t,r,a)}static async followFeedObject(e,t,r){return o.followFeedObject(e,t,r)}static async feedObjectFollowingList(e,t,r){return o.feedObjectFollowingList(e,t,r)}static async checkIfFollowingFeedObject(e,t,r){return o.checkIfFollowingFeedObject(e,t,r)}static async suspendFeedObject(e,t,r){return o.suspendFeedObject(e,t,r)}static async checkIfSuspendedFeedObject(e,t,r){return o.checkIfSuspendedFeedObject(e,t,r)}static async feedObjectSuspendedList(e,t,r){return o.feedObjectSuspendedList(e,t,r)}static async flagFeedObject(e,t,r,a){return o.flagFeedObject(e,t,r,a)}static async feedObjectFlagList(e,t,r){return o.feedObjectFlagList(e,t,r)}static async feedObjectFlagStatus(e,t,r){return o.feedObjectFlagStatus(e,t,r)}static async hideFeedObject(e,t,r){return o.hideFeedObject(e,t,r)}static async feedObjectHideStatus(e,t,r){return o.feedObjectHideStatus(e,t,r)}}},6984:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=t.IncubatorApiClient=void 0;var a,s=r(2746),i=(a=r(5368))&&a.__esModule?a:{default:a},n=r(735);class o{static getAllIncubators(e,t){const r=(0,n.urlParams)(e);return(0,s.apiRequest)(Object.assign({},t,{url:`${i.default.GetAllIncubators.url({})}?${r.toString()}`,method:i.default.GetAllIncubators.method}))}static searchIncubators(e,t){const r=(0,n.urlParams)(e);return(0,s.apiRequest)(Object.assign({},t,{url:`${i.default.SearchIncubators.url({})}?${r.toString()}`,method:i.default.SearchIncubators.method}))}static getSpecificIncubator(e,t){return(0,s.apiRequest)(Object.assign({},t,{url:i.default.GetASpecificIncubator.url({id:e}),method:i.default.GetASpecificIncubator.method}))}static createIncubator(e,t){return(0,s.apiRequest)(Object.assign({},t,{url:i.default.CreateAnIncubator.url({}),method:i.default.CreateAnIncubator.method,data:e}))}static getIncubatorSubscribers(e,t){return(0,s.apiRequest)(Object.assign({},t,{url:i.default.GetIncubatorSubscribers.url({id:e}),method:i.default.GetIncubatorSubscribers.method}))}static subscribeToIncubator(e,t){return(0,s.apiRequest)(Object.assign({},t,{url:i.default.SubscribeToIncubator.url({id:e}),method:i.default.SubscribeToIncubator.method}))}static checkIncubatorSubscription(e,t){return(0,s.apiRequest)(Object.assign({},t,{url:i.default.CheckIncubatorSubscription.url({id:e}),method:i.default.CheckIncubatorSubscription.method}))}}t.IncubatorApiClient=o,t.default=class{static async getAllIncubators(e,t){return o.getAllIncubators(e,t)}static async searchIncubators(e,t){return o.searchIncubators(e,t)}static async getSpecificIncubator(e,t){return o.getSpecificIncubator(e,t)}static async createIncubator(e,t){return o.createIncubator(e,t)}static async getIncubatorSubscribers(e,t){return o.getIncubatorSubscribers(e,t)}static async subscribeToIncubator(e,t){return o.subscribeToIncubator(e,t)}static async checkIncubatorSubscription(e,t){return o.checkIncubatorSubscription(e,t)}}},1415:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=t.InsightApiClient=void 0;var a,s=r(2746),i=(a=r(5368))&&a.__esModule?a:{default:a},n=r(735);class o{static getBestContributionInsight(e,t){const r=(0,n.urlParams)(e);return(0,s.apiRequest)(Object.assign({},t,{url:`${i.default.InsightBestContribution.url({})}?${r.toString()}`,method:i.default.InsightBestContribution.method}))}static getBestEmbedInsight(e,t){const r=(0,n.urlParams)(e);return(0,s.apiRequest)(Object.assign({},t,{url:`${i.default.InsightBestEmbed.url({})}?${r.toString()}`,method:i.default.InsightBestEmbed.method}))}static getBestUsersInsight(e,t){const r=(0,n.urlParams)(e);return(0,s.apiRequest)(Object.assign({},t,{url:`${i.default.InsightBestUser.url({})}?${r.toString()}`,method:i.default.InsightBestUser.method}))}static getContributionsInsightCounters(e,t){return(0,s.apiRequest)(Object.assign({},t,{url:i.default.InsightContributionCounter.url({id:e}),method:i.default.InsightContributionCounter.method}))}static getEmbedsInsightCounters(e,t,r){return(0,s.apiRequest)(Object.assign({},r,{url:i.default.InsightEmbedCounter.url({type:e,id:t}),method:i.default.InsightEmbedCounter.method}))}static getUsersInsightCounters(e,t){return(0,s.apiRequest)(Object.assign({},t,{url:i.default.InsightUserCounter.url({id:e}),method:i.default.InsightUserCounter.method}))}}t.InsightApiClient=o,t.default=class{static async getBestContributionInsight(e,t){return o.getBestContributionInsight(e,t)}static async getBestEmbedInsight(e,t){return o.getBestEmbedInsight(e,t)}static async getBestUsersInsight(e,t){return o.getBestUsersInsight(e,t)}static async getContributionsInsightCounters(e,t){return o.getContributionsInsightCounters(e,t)}static async getEmbedsInsightCounters(e,t,r){return o.getEmbedsInsightCounters(e,t,r)}static async getUsersInsightCounters(e,t){return o.getUsersInsightCounters(e,t)}}},922:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=t.InviteApiClient=void 0;var a,s=(a=r(5368))&&a.__esModule?a:{default:a},i=r(2746);class n{static getSpecificInvite(e,t){return(0,i.apiRequest)(Object.assign({},t,{url:s.default.InviteCode.url({code:e}),method:s.default.User.method}))}}t.InviteApiClient=n,t.default=class{static async getSpecificInvite(e,t){return n.getSpecificInvite(e,t)}}},507:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=t.LegalPageApiClient=void 0;var a,s=(a=r(5368))&&a.__esModule?a:{default:a},i=r(2746),n=r(735);class o{static getLegalPages(e,t){const r=(0,n.urlParams)(e);return(0,i.apiRequest)(Object.assign({},t,{url:`${s.default.GetLegalPages.url({})}?${r.toString()}`,method:s.default.GetLegalPages.method}))}static getSpecificLegalPage(e,t){return(0,i.apiRequest)(Object.assign({},t,{url:s.default.LegalPage.url({id:e}),method:s.default.LegalPage.method}))}static getAllRevisionsOfLegalPage(e,t){return(0,i.apiRequest)(Object.assign({},t,{url:s.default.LegalPageRevisions.url({policy:e}),method:s.default.LegalPageRevisions.method}))}static getAllLastRevisionsOfLegalPages(e){return(0,i.apiRequest)(Object.assign({},e,{url:s.default.LegalPagesLastRevision.url({}),method:s.default.LegalPagesLastRevision.method}))}static getLastRevisionOfLegalPage(e,t){return(0,i.apiRequest)(Object.assign({},t,{url:s.default.LegalPageLastRevision.url({policy:e}),method:s.default.LegalPageLastRevision.method}))}static searchLegalPages(e,t){const r=(0,n.urlParams)(e);return(0,i.apiRequest)(Object.assign({},t,{url:`${s.default.SearchLegalPages.url({})}?${r.toString()}`,method:s.default.SearchLegalPages.method}))}static ackLegalPage(e,t,r){var a;return(0,i.apiRequest)(Object.assign({},r,{url:s.default.AckLegalPage.url({id:e}),method:s.default.AckLegalPage.method,data:null!=(a={accept:t})?a:null}))}static getSpecificUserAck(e,t){return(0,i.apiRequest)(Object.assign({},t,{url:s.default.SpecificUserAck.url({id:e}),method:s.default.SpecificUserAck.method}))}static userAckList(e){return(0,i.apiRequest)(Object.assign({},e,{url:s.default.UserAckList.url({}),method:s.default.UserAckList.method}))}}t.LegalPageApiClient=o,t.default=class{static async getLegalPages(e,t){return o.getLegalPages(e,t)}static async getSpecificLegalPage(e,t){return o.getSpecificLegalPage(e,t)}static async getAllRevisionsOfLegalPage(e,t){return o.getAllRevisionsOfLegalPage(e,t)}static async getAllLastRevisionsOfLegalPages(e){return o.getAllLastRevisionsOfLegalPages(e)}static async getLastRevisionOfLegalPage(e,t){return o.getLastRevisionOfLegalPage(e,t)}static async searchLegalPages(e,t){return o.searchLegalPages(e,t)}static async ackLegalPage(e,t,r){return o.ackLegalPage(e,t,r)}static async getSpecificUserAck(e,t){return o.getSpecificUserAck(e,t)}static async userAckList(e){return o.userAckList(e)}}},5600:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=t.LocalityApiClient=void 0;var a,s=(a=r(5368))&&a.__esModule?a:{default:a},i=r(2746),n=r(735);class o{static getLocalities(e,t){const r=(0,n.urlParams)(e);return(0,i.apiRequest)(Object.assign({},t,{url:`${s.default.GetLocalities.url({})}?${r.toString()}`,method:s.default.GetLocalities.method}))}static searchLocalities(e,t){const r=(0,n.urlParams)(e);return(0,i.apiRequest)(Object.assign({},t,{url:`${s.default.ComposerLocalitySearch.url({})}?${r.toString()}`,method:s.default.ComposerLocalitySearch.method}))}}t.LocalityApiClient=o,t.default=class{static async getLocalities(e,t){return o.getLocalities(e,t)}static async searchLocalities(e,t){return o.searchLocalities(e,t)}}},9902:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=t.LoyaltyApiClient=void 0;var a,s=r(2746),i=(a=r(5368))&&a.__esModule?a:{default:a};class n{static getPrizes(e){return(0,s.apiRequest)(Object.assign({},e,{url:i.default.GetPrizes.url({}),method:i.default.GetPrizes.method}))}static createPrize(e,t){return(0,s.apiRequest)(Object.assign({},t,{url:i.default.CreatePrize.url({}),method:i.default.CreatePrize.method,data:e}))}static getSpecificPrize(e,t){return(0,s.apiRequest)(Object.assign({},t,{url:i.default.GetSpecificPrize.url({id:e}),method:i.default.GetSpecificPrize.method}))}static updatePrize(e,t,r){return(0,s.apiRequest)(Object.assign({},r,{url:i.default.UpdatePrize.url({id:e}),method:i.default.UpdatePrize.method,data:t}))}static patchPrize(e,t,r){return(0,s.apiRequest)(Object.assign({},r,{url:i.default.PatchPrize.url({id:e}),method:i.default.PatchPrize.method,data:t}))}static getAllPrizeRequests(e){return(0,s.apiRequest)(Object.assign({},e,{url:i.default.GetPrizeRequests.url({}),method:i.default.GetPrizeRequests.method}))}static createPrizeRequest(e,t){return(0,s.apiRequest)(Object.assign({},t,{url:i.default.CreatePrizeRequest.url({}),method:i.default.CreatePrizeRequest.method,data:{prize:e}}))}static getSpecificPrizeRequest(e,t){return(0,s.apiRequest)(Object.assign({},t,{url:i.default.GetSpecificPrizeRequest.url({id:e}),method:i.default.GetSpecificPrizeRequest.method}))}static patchPrizeRequest(e,t,r){return(0,s.apiRequest)(Object.assign({},r,{url:i.default.PatchPrizeRequest.url({id:e}),method:i.default.PatchPrizeRequest.method,data:{status:t}}))}}t.LoyaltyApiClient=n,t.default=class{static async getPrizes(e){return n.getPrizes(e)}static async createPrize(e,t){return n.createPrize(e,t)}static async getSpecificPrize(e,t){return n.getSpecificPrize(e,t)}static async updatePrize(e,t,r){return n.updatePrize(e,t,r)}static async patchPrize(e,t,r){return n.patchPrize(e,t,r)}static async getAllPrizeRequests(e){return n.getAllPrizeRequests(e)}static async createPrizeRequest(e,t){return n.createPrizeRequest(e,t)}static async getSpecificPrizeRequest(e,t){return n.getSpecificPrizeRequest(e,t)}static async patchPrizeRequest(e,t,r){return n.patchPrizeRequest(e,t,r)}}},4170:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=t.MediaApiClient=void 0;var a,s=r(2746),i=(a=r(5368))&&a.__esModule?a:{default:a};class n{static chunkUploadMedia(e,t,r,a,n){return(0,s.apiRequest)(Object.assign({},n,{url:i.default.ComposerChunkUploadMedia.url({}),method:i.default.ComposerChunkUploadMedia.method,data:e,headers:{"Content-Range":`bytes ${t}-${r}/${a}`}}))}static chunkUploadMediaComplete(e,t){return(0,s.apiRequest)(Object.assign({},t,{url:i.default.ComposerChunkUploadMediaComplete.url({}),method:i.default.ComposerChunkUploadMediaComplete.method,data:e}))}static createMedia(e,t){return(0,s.apiRequest)(Object.assign({},t,{url:i.default.ComposerMediaCreate.url({}),method:i.default.ComposerMediaCreate.method,data:e}))}static clickMedia(e,t,r){var a;return(0,s.apiRequest)(Object.assign({},r,{url:i.default.MediaClickTracker.url({id:e}),method:i.default.MediaClickTracker.method,data:null!=(a={ip:t})?a:null}))}static getSpecificMedia(e,t){return(0,s.apiRequest)(Object.assign({},t,{url:i.default.GetMedia.url({id:e}),method:i.default.GetMedia.method}))}static updateMedia(e,t,r){return(0,s.apiRequest)(Object.assign({},r,{url:i.default.UpdateMedia.url({id:e}),method:i.default.UpdateMedia.method,data:{image:t}}))}static deleteMedia(e,t){return(0,s.apiRequest)(Object.assign({},t,{url:i.default.DeleteMedia.url({id:e}),method:i.default.DeleteMedia.method}))}}t.MediaApiClient=n,t.default=class{static async chunkUploadMedia(e,t,r,a,s){return n.chunkUploadMedia(e,t,r,a,s)}static async chunkUploadMediaComplete(e,t){return n.chunkUploadMediaComplete(e,t)}static async createMedia(e,t){return n.createMedia(e,t)}static async clickMedia(e,t,r){return n.clickMedia(e,t,r)}static async getSpecificMedia(e,t){return n.getSpecificMedia(e,t)}static async updateMedia(e,t,r){return n.updateMedia(e,t,r)}static async deleteMedia(e,t){return n.deleteMedia(e,t)}}},2123:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=t.ModerationApiClient=void 0;var a,s=r(2746),i=(a=r(5368))&&a.__esModule?a:{default:a},n=r(735);class o{static getUsersForModeration(e,t){const r=(0,n.urlParams)(e);return(0,s.apiRequest)(Object.assign({},t,{url:`${i.default.UsersForModeration.url({})}?${r.toString()}`,method:i.default.UsersForModeration.method}))}static moderateASpecificUser(e,t,r,a,o){const c=(0,n.urlParams)(Object.assign({},r&&{days_blocked:r},a&&{hard:a}));return(0,s.apiRequest)(Object.assign({},o,{url:`${i.default.ModerateUser.url({id:e})}?${c.toString()}`,method:i.default.ModerateUser.method,data:{status:t}}))}static getAllFlaggedContributions(e,t){const r=(0,n.urlParams)(e);return(0,s.apiRequest)(Object.assign({},t,{url:`${i.default.FlaggedContributions.url({})}?${r.toString()}`,method:i.default.FlaggedContributions.method}))}static getAllFlagsForSpecificContribution(e,t,r,a){return(0,s.apiRequest)(Object.assign({},a,{url:i.default.FlagsForSpecificContribution.url({id:e,contribution_type:t}),method:i.default.FlagsForSpecificContribution.method,data:{flag_type:null!=r?r:null}}))}static moderateAContribution(e,t,r){return(0,s.apiRequest)(Object.assign({},r,{url:i.default.ModerateContribution.url({id:e}),method:i.default.ModerateContribution.method,data:t}))}static getContributionModerationStatus(e,t,r){return(0,s.apiRequest)(Object.assign({},r,{url:i.default.ModerateContributionStatus.url({id:e,contribution_type:t}),method:i.default.ModerateContributionStatus.method}))}}t.ModerationApiClient=o,t.default=class{static async getUsersForModeration(e,t){return o.getUsersForModeration(e,t)}static async moderateASpecificUser(e,t,r,a,s){return o.moderateASpecificUser(e,t,r,a,s)}static async getAllFlaggedContributions(e,t){return o.getAllFlaggedContributions(e,t)}static async getAllFlagsForSpecificContribution(e,t,r,a){return o.getAllFlagsForSpecificContribution(e,t,r,a)}static async moderateAContribution(e,t,r){return o.moderateAContribution(e,t,r)}static async getContributionModerationStatus(e,t,r){return o.getContributionModerationStatus(e,t,r)}}},1584:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=t.NotificationApiClient=void 0;var a,s=r(2746),i=(a=r(5368))&&a.__esModule?a:{default:a};class n{static listUserNotification(e){return(0,s.apiRequest)(Object.assign({},e,{url:i.default.UserNotificationList.url({}),method:i.default.UserNotificationList.method}))}static markReadNotification(e,t){return(0,s.apiRequest)(Object.assign({},t,{url:i.default.UserMarkReadNotification.url({}),method:i.default.UserMarkReadNotification.method,data:{sids:e}}))}static getUnseenNotification(e){return(0,s.apiRequest)(Object.assign({},e,{url:i.default.UserUnseenNotificationCount.url({}),method:i.default.UserUnseenNotificationCount.method}))}static createCustomNotification(e,t){return(0,s.apiRequest)(Object.assign({},t,{url:i.default.CreateCustomNotification.url({}),method:i.default.CreateCustomNotification.method,data:e}))}static listBroadcastMessages(e){return(0,s.apiRequest)(Object.assign({},e,{url:i.default.BroadcastMessagesList.url({}),method:i.default.BroadcastMessagesList.method}))}static listBroadcastMessagesUnseenCount(e){return(0,s.apiRequest)(Object.assign({},e,{url:i.default.BroadcastMessagesUnseenCount.url({}),method:i.default.BroadcastMessagesUnseenCount.method}))}static listBroadcastMessagesUndisposedCount(e){return(0,s.apiRequest)(Object.assign({},e,{url:i.default.BroadcastMessagesUndisposedCount.url({}),method:i.default.BroadcastMessagesUndisposedCount.method}))}static markReadBroadcastMessages(e,t){return(0,s.apiRequest)(Object.assign({},t,{url:i.default.BroadcastMessagesMarkRead.url({}),method:i.default.BroadcastMessagesMarkRead.method,data:{banner_ids:e}}))}static disposeBroadcastMessages(e,t){return(0,s.apiRequest)(Object.assign({},t,{url:i.default.BroadcastMessagesDispose.url({}),method:i.default.BroadcastMessagesDispose.method,data:{banner_ids:e}}))}}t.NotificationApiClient=n,t.default=class{static async listUserNotification(e){return n.listUserNotification(e)}static async markReadNotification(e,t){return n.markReadNotification(e,t)}static async getUnseenNotification(e){return n.getUnseenNotification(e)}static async createCustomNotification(e,t){return n.createCustomNotification(e,t)}static async listBroadcastMessages(e){return n.listBroadcastMessages(e)}static async listBroadcastMessagesUnseenCount(e){return n.listBroadcastMessagesUnseenCount(e)}static async listBroadcastMessagesUndisposedCount(e){return n.listBroadcastMessagesUndisposedCount(e)}static async disposeBroadcastMessages(e,t){return n.disposeBroadcastMessages(e,t)}static async markReadBroadcastMessages(e,t){return n.markReadBroadcastMessages(e,t)}}},6329:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=t.PreferenceApiClient=void 0;var a,s=r(2746),i=(a=r(5368))&&a.__esModule?a:{default:a},n=r(735);class o{static getAllPreferences(e){return(0,s.apiRequest)(Object.assign({},e,{url:i.default.Preferences.url({}),method:i.default.Preferences.method}))}static searchPreferences(e,t,r,a,o){const c=(0,n.urlParams)(Object.assign({},e&&{search:e},t&&{section:t},r&&{keys:r},a&&{ordering:a}));return(0,s.apiRequest)(Object.assign({},o,{url:`${i.default.Preferences.url({})}?${c.toString()}`,method:i.default.Preferences.method}))}static getSpecificPreference(e,t){return(0,s.apiRequest)(Object.assign({},t,{url:i.default.GetPreference.url({id:e}),method:i.default.Preferences.method}))}}t.PreferenceApiClient=o,t.default=class{static async getAllPreferences(e){return o.getAllPreferences(e)}static async searchPreferences(e,t,r,a,s){return o.searchPreferences(e,t,r,a,s)}static async getSpecificPreference(e,t){return o.getSpecificPreference(e,t)}}},8938:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=t.PrivateMessageApiClient=void 0;var a,s=r(2746),i=(a=r(5368))&&a.__esModule?a:{default:a},n=r(735);class o{static getAllSnippets(e){return(0,s.apiRequest)(Object.assign({},e,{url:i.default.GetSnippets.url({}),method:i.default.GetSnippets.method}))}static getAThread(e,t){const r=(0,n.urlParams)(e);return(0,s.apiRequest)(Object.assign({},t,{url:`${i.default.GetAThread.url({})}?${r.toString()}`,method:i.default.GetAThread.method}))}static getASingleMessage(e,t){return(0,s.apiRequest)(Object.assign({},t,{url:i.default.GetASingleMessage.url({id:e}),method:i.default.GetASingleMessage.method}))}static sendAMessage(e,t){return(0,s.apiRequest)(Object.assign({},t,{data:e,url:i.default.SendMessage.url({}),method:i.default.SendMessage.method}))}static deleteAMessage(e,t){return(0,s.apiRequest)(Object.assign({},t,{url:i.default.DeleteASingleMessage.url({id:e}),method:i.default.DeleteASingleMessage.method}))}static deleteAThread(e,t){const r=(0,n.urlParams)(e);return(0,s.apiRequest)(Object.assign({},t,{url:`${i.default.DeleteAThread.url({})}?${r.toString()}`,method:i.default.DeleteAThread.method}))}static uploadMedia(e,t){return(0,s.apiRequest)(Object.assign({},t,{data:e,url:i.default.PrivateMessageUploadMedia.url({}),method:i.default.PrivateMessageUploadMedia.method}))}static uploadThumbnail(e,t){return(0,s.apiRequest)(Object.assign({},t,{data:e,url:i.default.PrivateMessageUploadThumbnail.url({}),method:i.default.PrivateMessageUploadThumbnail.method}))}static uploadMediaInChunks(e,t){return(0,s.apiRequest)(Object.assign({},t,{data:e,url:i.default.PrivateMessageUploadMediaInChunks.url({}),method:i.default.PrivateMessageUploadMediaInChunks.method}))}static chunkUploadDone(e,t){return(0,s.apiRequest)(Object.assign({},t,{url:i.default.PrivateMessageChunkUploadDone.url({}),method:i.default.PrivateMessageChunkUploadDone.method,data:e}))}static searchUser(e,t){return(0,s.apiRequest)(Object.assign({},t,{url:i.default.PrivateMessageSearchUser.url({search:e}),method:i.default.PrivateMessageSearchUser.method}))}}t.PrivateMessageApiClient=o,t.default=class{static async getAllSnippets(e){return o.getAllSnippets(e)}static async getAThread(e,t){return o.getAThread(e,t)}static async getASingleMessage(e,t){return o.getASingleMessage(e,t)}static async sendAMessage(e,t){return o.sendAMessage(e,t)}static async deleteAMessage(e,t){return o.deleteAMessage(e,t)}static async deleteAThread(e,t){return o.deleteAThread(e,t)}static async uploadMedia(e,t){return o.uploadMedia(e,t)}static async uploadThumbnail(e,t){return o.uploadThumbnail(e,t)}static async uploadMediaInChunks(e,t){return o.uploadMediaInChunks(e,t)}static async chunkUploadDone(e,t){return o.chunkUploadDone(e,t)}static async searchUser(e,t){return o.searchUser(e,t)}}},4524:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=t.PromoApiClient=void 0;var a,s=(a=r(5368))&&a.__esModule?a:{default:a},i=r(2746);class n{static getSpecificPromo(e,t){return(0,i.apiRequest)(Object.assign({},t,{url:s.default.PromoCode.url({code:e}),method:s.default.User.method}))}}t.PromoApiClient=n,t.default=class{static async getSpecificPromo(e,t){return n.getSpecificPromo(e,t)}}},3661:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=t.ReactionApiClient=void 0;var a,s=r(2746),i=(a=r(5368))&&a.__esModule?a:{default:a},n=r(735);class o{static getAllReactions(e,t){const r=(0,n.urlParams)(e);return(0,s.apiRequest)(Object.assign({},t,{url:`${i.default.GetReactions.url({})}?${r.toString()}`,method:i.default.GetReactions.method}))}static getSpecificReaction(e,t){return(0,s.apiRequest)(Object.assign({url:i.default.GetSpecificReaction.url({id:e}),method:i.default.GetSpecificReaction.method},t))}}t.ReactionApiClient=o,t.default=class{static async getAllReactions(e,t){return o.getAllReactions(e,t)}static async getSpecificReaction(e,t){return o.getSpecificReaction(e,t)}}},6919:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=t.ScoreApiClient=void 0;var a,s=r(2746),i=(a=r(5368))&&a.__esModule?a:{default:a},n=r(735);class o{static getAllScores(e,t){const r=(0,n.urlParams)(e);return(0,s.apiRequest)(Object.assign({},t,{url:`${i.default.ScoresList.url({})}?${r.toString()}`,method:i.default.ScoresList.method}))}static searchScore(e,t){const r=(0,n.urlParams)(e);return(0,s.apiRequest)(Object.assign({},t,{url:`${i.default.SearchScore.url({})}?${r.toString()}`,method:i.default.SearchScore.method}))}static addScore(e,t){return(0,s.apiRequest)(Object.assign({},t,{url:i.default.AddScore.url({}),method:i.default.AddScore.method,data:e}))}}t.ScoreApiClient=o,t.default=class{static async getAllScores(e,t){return o.getAllScores(e,t)}static async searchScore(e,t){return o.searchScore(e,t)}static async addScore(e,t){return o.addScore(e,t)}}},5727:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=t.SSOApiClient=void 0;var a,s=r(2746),i=(a=r(5368))&&a.__esModule?a:{default:a};class n{static SignIn(e){return(0,s.apiRequest)(Object.assign({},e,{url:i.default.SignIn.url({}),method:i.default.SignIn.method}))}static SignUp(e,t){return(0,s.apiRequest)(Object.assign({},t,{url:i.default.SignUp.url({}),method:i.default.SignUp.method,data:e}))}}t.SSOApiClient=n,t.default=class{static async SignIn(e){return n.SignIn(e)}static async SignUp(e,t){return n.SignUp(e,t)}}},8086:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=t.SuggestionApiClient=void 0;var a,s=r(2746),i=(a=r(5368))&&a.__esModule?a:{default:a},n=r(735);class o{static getCategorySuggestion(e,t){return(0,s.apiRequest)(Object.assign({},t,{url:i.default.CategoriesSuggestion.url({}),method:i.default.CategoriesSuggestion.method,params:e}))}static getIncubatorSuggestion(e,t){return(0,s.apiRequest)(Object.assign({},t,{url:i.default.GetIncubatorSuggestion.url({}),method:i.default.GetIncubatorSuggestion.method,params:e}))}static getPollSuggestion(e,t){return(0,s.apiRequest)(Object.assign({},t,{url:i.default.PollSuggestion.url({}),method:i.default.PollSuggestion.method,params:e}))}static getUserSuggestion(e,t){return(0,s.apiRequest)(Object.assign({},t,{url:i.default.UserSuggestion.url({}),method:i.default.UserSuggestion.method,params:e}))}static getSearchSuggestion(e,t,r){const a=(0,n.urlParams)({search:e});return(0,s.apiRequest)(Object.assign({},r,{url:`${i.default.SearchSuggestion.url({})}?${a.toString()}`,method:i.default.UserSuggestion.method,params:t}))}}t.SuggestionApiClient=o,t.default=class{static async getCategorySuggestion(e,t){return o.getCategorySuggestion(e,t)}static async getIncubatorSuggestion(e,t){return o.getIncubatorSuggestion(e,t)}static async getPollSuggestion(e,t){return o.getPollSuggestion(e,t)}static async getUserSuggestion(e,t){return o.getUserSuggestion(e,t)}static async getSearchSuggestion(e,t,r){return o.getSearchSuggestion(e,t,r)}}},5830:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=t.TagApiClient=void 0;var a,s=r(2746),i=(a=r(5368))&&a.__esModule?a:{default:a},n=r(735);class o{static getAllTags(e,t){const r=(0,n.urlParams)(e);return(0,s.apiRequest)(Object.assign({},t,{url:`${i.default.TagsList.url({})}?${r.toString()}`,method:i.default.TagsList.method}))}static createTag(e,t){return(0,s.apiRequest)(Object.assign({},t,{url:i.default.CreateTag.url({}),method:i.default.CreateTag.method,data:e}))}static searchTag(e,t){const r=(0,n.urlParams)(e);return(0,s.apiRequest)(Object.assign({},t,{url:`${i.default.SearchTag.url({})}?${r.toString()}`,method:i.default.SearchTag.method}))}static getSpecificTag(e,t){return(0,s.apiRequest)(Object.assign({},t,{url:i.default.Tag.url({id:e}),method:i.default.Tag.method}))}static updateTag(e,t,r){return(0,s.apiRequest)(Object.assign({},r,{url:i.default.UpdateTag.url({id:e}),method:i.default.UpdateTag.method,data:null!=t?t:null}))}static patchTag(e,t,r){return(0,s.apiRequest)(Object.assign({},r,{url:i.default.PatchTag.url({id:e}),method:i.default.PatchTag.method,data:null!=t?t:null}))}static assignATag(e,t,r,a){return(0,s.apiRequest)(Object.assign({},a,{url:i.default.AssignTag.url({id:e}),method:i.default.AssignTag.method,data:t?{user:t}:{category:r}}))}}t.TagApiClient=o,t.default=class{static async getAllTags(e,t){return o.getAllTags(e,t)}static async createTag(e,t){return o.createTag(e,t)}static async searchTag(e,t){return o.searchTag(e,t)}static async getSpecificTag(e,t){return o.getSpecificTag(e,t)}static async updateTag(e,t,r){return o.updateTag(e,t,r)}static async patchTag(e,t,r){return o.patchTag(e,t,r)}static async assignATag(e,t,r,a){return o.assignATag(e,t,r,a)}}},671:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=t.UserApiClient=void 0;var a,s=r(2746),i=(a=r(5368))&&a.__esModule?a:{default:a},n=r(735);class o{static getAllUsers(e,t){const r=(0,n.urlParams)(e);return(0,s.apiRequest)(Object.assign({},t,{url:`${i.default.UserList.url({})}?${r.toString()}`,method:i.default.UserList.method}))}static getHiddenUsers(e,t){const r=(0,n.urlParams)(e);return(0,s.apiRequest)(Object.assign({},t,{url:`${i.default.ListHiddenUsers.url({})}?${r.toString()}`,method:i.default.ListHiddenUsers.method}))}static userAutocomplete(e,t){const r=(0,n.urlParams)(e);return(0,s.apiRequest)(Object.assign({},t,{url:`${i.default.UserAutocomplete.url({})}?${r.toString()}`,method:i.default.UserAutocomplete.method}))}static userSearch(e,t){const r=(0,n.urlParams)(e);return(0,s.apiRequest)(Object.assign({},t,{url:`${i.default.UserSearch.url({})}?${r.toString()}`,method:i.default.UserSearch.method}))}static getSpecificUser(e,t){return(0,s.apiRequest)(Object.assign({},t,{url:i.default.User.url({id:e}),method:i.default.User.method}))}static getUserCounters(e,t){return(0,s.apiRequest)(Object.assign({},t,{url:i.default.UserCounters.url({id:e}),method:i.default.UserCounters.method}))}static userUpdate(e,t,r){return(0,s.apiRequest)(Object.assign({},r,{url:i.default.UserUpdate.url({id:e}),method:i.default.UserUpdate.method,data:t}))}static userPatch(e,t,r){return(0,s.apiRequest)(Object.assign({},r,{url:i.default.UserPatch.url({id:e}),method:i.default.UserPatch.method,data:t}))}static userDelete(e,t,r){const a=(0,n.urlParams)(Object.assign({},t&&{hard:t}));return(0,s.apiRequest)(Object.assign({},r,{url:`${i.default.UserDelete.url({id:e})}?${a.toString()}`,method:i.default.UserDelete.method}))}static changeUserMail(e,t,r,a){return(0,s.apiRequest)(Object.assign({},a,{url:i.default.ChangeUserMail.url({id:e}),method:i.default.ChangeUserMail.method,data:{new_email:t,confirm:r}}))}static confirmChangeUserMail(e,t,r,a){return(0,s.apiRequest)(Object.assign({},a,{url:i.default.ConfirmUserChangeMail.url({id:e}),method:i.default.ConfirmUserChangeMail.method,data:{new_email:t,validation_code:r}}))}static changeUserPassword(e,t,r,a){return(0,s.apiRequest)(Object.assign({},a,{url:i.default.ChangeUserPassword.url({id:e}),method:i.default.ChangeUserPassword.method,data:{password:t,new_password:r}}))}static userSettings(e,t){return(0,s.apiRequest)(Object.assign({},t,{url:i.default.UserSettings.url({id:e}),method:i.default.UserSettings.method}))}static userSettingsPatch(e,t,r){return(0,s.apiRequest)(Object.assign({},r,{url:i.default.UserSettingsPatch.url({id:e}),method:i.default.UserSettingsPatch.method,data:null!=t?t:null}))}static getCurrentUser(e){return(0,s.apiRequest)(Object.assign({},e,{url:i.default.Me.url(),method:i.default.Me.method}))}static getCurrentUserAvatar(e){return(0,s.apiRequest)(Object.assign({},e,{url:i.default.MyAvatar.url({}),method:i.default.MyAvatar.method}))}static getCurrentUserPermission(e){return(0,s.apiRequest)(Object.assign({},e,{url:i.default.Permission.url({}),method:i.default.Permission.method}))}static getCurrentUserPlatform(e,t){const r=(0,n.urlParams)(Object.assign({},e&&{next:e}));return(0,s.apiRequest)(Object.assign({},t,{url:`${i.default.Platform.url({})}?${r.toString()}`,method:i.default.Platform.method}))}static getUserFollowedCategories(e,t,r){const a=(0,n.urlParams)(Object.assign({},t&&{mutual:t}));return(0,s.apiRequest)(Object.assign({},r,{url:`${i.default.FollowedCategories.url({id:e})}?${a.toString()}`,method:i.default.FollowedCategories.method}))}static getUserFeed(e,t,r){return(0,s.apiRequest)(Object.assign({},r,{url:i.default.UserFeed.url({id:e}),method:i.default.UserFeed.method,params:t}))}static getUserFollowers(e,t,r){return(0,s.apiRequest)(Object.assign({},r,{url:i.default.UserFollowers.url({id:e}),method:i.default.UserFollowers.method,params:t}))}static getUserFollowings(e,t,r){return(0,s.apiRequest)(Object.assign({},r,{url:i.default.UserFollowings.url({id:e}),method:i.default.UserFollowings.method,params:t}))}static followUser(e,t){return(0,s.apiRequest)(Object.assign({},t,{url:i.default.FollowUser.url({id:e}),method:i.default.FollowUser.method}))}static checkUserFollowed(e,t){return(0,s.apiRequest)(Object.assign({},t,{url:i.default.CheckUserFollowed.url({id:e}),method:i.default.CheckUserFollowed.method}))}static checkUserFollower(e,t){return(0,s.apiRequest)(Object.assign({},t,{url:i.default.CheckUserFollower.url({id:e}),method:i.default.CheckUserFollower.method}))}static getUserConnections(e,t,r){const a=(0,n.urlParams)(Object.assign({},t&&{mutual:t}));return(0,s.apiRequest)(Object.assign({},r,{url:`${i.default.UserConnections.url({id:e})}?${a.toString()}`,method:i.default.UserConnections.method}))}static checkUserConnections(e,t){return(0,s.apiRequest)(Object.assign({},t,{url:i.default.UserCheckConnection.url({id:e}),method:i.default.UserCheckConnection.method}))}static getUserConnectionRequests(e,t){return(0,s.apiRequest)(Object.assign({},t,{url:i.default.UserConnectionRequests.url({id:e}),method:i.default.UserConnectionRequests.method}))}static getUserRequestConnectionsSent(e,t){return(0,s.apiRequest)(Object.assign({},t,{url:i.default.UserRequestConnectionsSent.url({id:e}),method:i.default.UserRequestConnectionsSent.method}))}static userAcceptRequestConnection(e,t){return(0,s.apiRequest)(Object.assign({},t,{url:i.default.UserAcceptRequestConnection.url({id:e}),method:i.default.UserAcceptRequestConnection.method}))}static userRequestConnection(e,t){return(0,s.apiRequest)(Object.assign({},t,{url:i.default.UserRequestConnection.url({id:e}),method:i.default.UserRequestConnection.method}))}static userRemoveConnection(e,t){return(0,s.apiRequest)(Object.assign({},t,{url:i.default.UserRemoveConnection.url({id:e}),method:i.default.UserRemoveConnection.method}))}static userCancelRejectConnectionRequest(e,t){return(0,s.apiRequest)(Object.assign({},t,{url:i.default.UserCancelRejectConnectionRequest.url({id:e}),method:i.default.UserCancelRejectConnectionRequest.method}))}static userCancelRequestConnection(e,t){return(0,s.apiRequest)(Object.assign({},t,{url:i.default.UserCancelRequestConnection.url({id:e}),method:i.default.UserCancelRequestConnection.method}))}static userRejectConnectionRequest(e,t){return(0,s.apiRequest)(Object.assign({},t,{url:i.default.UserRejectConnectionRequest.url({id:e}),method:i.default.UserRejectConnectionRequest.method}))}static userMarkSeenConnectionRequest(e,t){return(0,s.apiRequest)(Object.assign({},t,{url:i.default.UserMarkSeenConnectionRequest.url({id:e}),method:i.default.UserMarkSeenConnectionRequest.method}))}static showHideUser(e,t){return(0,s.apiRequest)(Object.assign({},t,{url:i.default.UserShowHide.url({id:e}),method:i.default.UserShowHide.method}))}static checkUserHidden(e,t){return(0,s.apiRequest)(Object.assign({},t,{url:i.default.CheckUserHidden.url({id:e}),method:i.default.CheckUserHidden.method}))}static checkUserHiddenBy(e,t){return(0,s.apiRequest)(Object.assign({},t,{url:i.default.CheckUserHiddenBy.url({id:e}),method:i.default.CheckUserHiddenBy.method}))}static getUserLoyaltyPoints(e,t){return(0,s.apiRequest)(Object.assign({},t,{url:i.default.GetUserLoyaltyPoints.url({id:e}),method:i.default.GetUserLoyaltyPoints.method}))}static getUserConnectionStatuses(e,t){return(0,s.apiRequest)(Object.assign({},t,{url:i.default.UserConnectionStatuses.url({}),method:i.default.UserConnectionStatuses.method,data:{users:e}}))}static userTagToAddressContribution(e){return(0,s.apiRequest)(Object.assign({},e,{url:i.default.UserTagToAddressContribution.url({}),method:i.default.UserTagToAddressContribution.method}))}static checkUserEmailToken(e,t,r){const a=(0,n.urlParams)({email_token:t});return(0,s.apiRequest)(Object.assign({},r,{url:`${i.default.CheckEmailToken.url({id:e})}?${a.toString()}`,method:i.default.CheckEmailToken.method}))}static addUserAvatar(e,t){return(0,s.apiRequest)(Object.assign({url:i.default.AddAvatar.url({}),method:i.default.AddAvatar.method,data:e},t))}static getUserAvatars(e){return(0,s.apiRequest)(Object.assign({url:i.default.GetAvatars.url({}),method:i.default.GetAvatars.method},e))}static removeUserAvatar(e,t){return(0,s.apiRequest)(Object.assign({url:i.default.RemoveAvatar.url({}),method:i.default.RemoveAvatar.method,data:{avatar_id:e}},t))}static setUserPrimaryAvatar(e,t){return(0,s.apiRequest)(Object.assign({url:i.default.SetPrimaryAvatar.url({}),method:i.default.SetPrimaryAvatar.method,data:{avatar_id:e}},t))}static getProviderAssociations(e,t){return(0,s.apiRequest)(Object.assign({},t,{url:i.default.ProviderAssociations.url({id:e}),method:i.default.ProviderAssociations.method}))}static createProviderAssociation(e,t){return(0,s.apiRequest)(Object.assign({},t,{data:e,url:i.default.CreateProviderAssociation.url({id:e.user_id}),method:i.default.CreateProviderAssociation.method}))}static deleteProviderAssociation(e,t){return(0,s.apiRequest)(Object.assign({},t,{data:e,url:i.default.DeleteProviderAssociation.url({id:e.user_id}),method:i.default.DeleteProviderAssociation.method}))}}t.UserApiClient=o,t.default=class{static async getAllUsers(e,t){return o.getAllUsers(e,t)}static async getHiddenUsers(e,t){return o.getHiddenUsers(e,t)}static async userAutocomplete(e,t){return o.userAutocomplete(e,t)}static async userSearch(e,t){return o.userSearch(e,t)}static async getSpecificUser(e,t){return o.getSpecificUser(e,t)}static async getUserCounters(e,t){return o.getUserCounters(e,t)}static async userUpdate(e,t,r){return o.userUpdate(e,t,r)}static async userPatch(e,t,r){return o.userPatch(e,t,r)}static async userDelete(e,t,r){return o.userDelete(e,t,r)}static async changeUserMail(e,t,r,a){return o.changeUserMail(e,t,r,a)}static async confirmChangeUserMail(e,t,r,a){return o.confirmChangeUserMail(e,t,r,a)}static async changeUserPassword(e,t,r,a){return o.changeUserPassword(e,t,r,a)}static async userSettings(e,t){return o.userSettings(e,t)}static async userSettingsPatch(e,t,r){return o.userSettingsPatch(e,t,r)}static async getCurrentUser(e){return o.getCurrentUser(e)}static async getCurrentUserAvatar(e){return o.getCurrentUserAvatar(e)}static async getCurrentUserPermission(e){return o.getCurrentUserPermission(e)}static async getCurrentUserPlatform(e,t){return o.getCurrentUserPlatform(e,t)}static async getUserFollowedCategories(e,t,r){return o.getUserFollowedCategories(e,t,r)}static async getUserFeed(e,t,r){return o.getUserFeed(e,t,r)}static async getUserFollowers(e,t,r){return o.getUserFollowers(e,t,r)}static async getUserFollowings(e,t,r){return o.getUserFollowings(e,t,r)}static async followUser(e,t){return o.followUser(e,t)}static async checkUserFollowed(e,t){return o.checkUserFollowed(e,t)}static async checkUserFollower(e,t){return o.checkUserFollower(e,t)}static async getUserConnections(e,t,r){return o.getUserConnections(e,t,r)}static async checkUserConnections(e,t){return o.checkUserConnections(e,t)}static async getUserConnectionRequests(e,t){return o.getUserConnectionRequests(e,t)}static async getUserRequestConnectionsSent(e,t){return o.getUserRequestConnectionsSent(e,t)}static async userAcceptRequestConnection(e,t){return o.userAcceptRequestConnection(e,t)}static async userRequestConnection(e,t){return o.userRequestConnection(e,t)}static async userRemoveConnection(e,t){return o.userRemoveConnection(e,t)}static async userCancelRejectConnectionRequest(e,t){return o.userCancelRejectConnectionRequest(e,t)}static async userCancelRequestConnection(e,t){return o.userCancelRequestConnection(e,t)}static async userRejectConnectionRequest(e,t){return o.userRejectConnectionRequest(e,t)}static async userMarkSeenConnectionRequest(e,t){return o.userMarkSeenConnectionRequest(e,t)}static async showHideUser(e,t){return o.showHideUser(e,t)}static async checkUserHidden(e,t){return o.checkUserHidden(e,t)}static async checkUserHiddenBy(e,t){return o.checkUserHiddenBy(e,t)}static async getUserLoyaltyPoints(e,t){return o.getUserLoyaltyPoints(e,t)}static async getUserConnectionStatuses(e,t){return o.getUserConnectionStatuses(e,t)}static async userTagToAddressContribution(e){return o.userTagToAddressContribution(e)}static async checkUserEmailToken(e,t,r){return o.checkUserEmailToken(e,t,r)}static async addUserAvatar(e,t){return o.addUserAvatar(e,t)}static async getUserAvatars(e){return o.getUserAvatars(e)}static async removeUserAvatar(e,t){return o.removeUserAvatar(e,t)}static async setUserPrimaryAvatar(e,t){return o.setUserPrimaryAvatar(e,t)}static async getProviderAssociations(e,t){return o.getProviderAssociations(e,t)}static async createProviderAssociation(e,t){return o.createProviderAssociation(e,t)}static async deleteProviderAssociation(e,t){return o.deleteProviderAssociation(e,t)}}},3796:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=t.WebhookApiClient=void 0;var a,s=(a=r(5368))&&a.__esModule?a:{default:a},i=r(2746);class n{static getAllWebhookEndpoints(e){return(0,i.apiRequest)(Object.assign({},e,{url:s.default.WebhookEndpointsList.url({}),method:s.default.WebhookEndpointsList.method}))}static getAllWebhookEvents(e){return(0,i.apiRequest)(Object.assign({},e,{url:s.default.WebhookEventsList.url({}),method:s.default.WebhookEventsList.method}))}static createWebhookEndpoint(e,t){return(0,i.apiRequest)(Object.assign({},t,{url:s.default.WebhookCreate.url({}),method:s.default.WebhookCreate.method,data:e}))}static getASpecificWebhookEndpoint(e,t){return(0,i.apiRequest)(Object.assign({},t,{url:s.default.GetSpecificWebhook.url({id:e}),method:s.default.GetSpecificWebhook.method}))}static updateASpecificWebhookEndpoint(e,t,r){return(0,i.apiRequest)(Object.assign({},r,{url:s.default.WebhookUpdate.url({id:e}),method:s.default.WebhookUpdate.method,data:t}))}static updateASingleWebhookEndpointField(e,t,r){return(0,i.apiRequest)(Object.assign({},r,{url:s.default.WebhookPatch.url({id:e}),method:s.default.WebhookPatch.method,data:t}))}static deleteWebhookEndpoint(e,t){return(0,i.apiRequest)(Object.assign({},t,{url:s.default.WebhookDelete.url({id:e}),method:s.default.WebhookDelete.method}))}static getAllWebhookEndpointAttempts(e,t){return(0,i.apiRequest)(Object.assign({},t,{url:s.default.WebhookEndpointAttempts.url({id:e}),method:s.default.WebhookEndpointAttempts.method}))}static expireWebhookSigningSecret(e,t){return(0,i.apiRequest)(Object.assign({},t,{url:s.default.WebhookExpireSigningSecret.url({id:e}),method:s.default.WebhookExpireSigningSecret.method}))}static revealWebhookSigningSecret(e,t){return(0,i.apiRequest)(Object.assign({},t,{url:s.default.WebhookRevealSigningSecret.url({id:e}),method:s.default.WebhookRevealSigningSecret.method}))}static resendWebhookEndpointEvent(e,t,r){return(0,i.apiRequest)(Object.assign({},r,{url:s.default.WebhookResendEndpointEvent.url({id:e}),method:s.default.WebhookResendEndpointEvent.method,data:{event:t}}))}static resendMultipleWebhookEndpointEvent(e,t,r){return(0,i.apiRequest)(Object.assign({},r,{url:s.default.WebhookResendMultipleEndpointEvent.url({id:e}),method:s.default.WebhookResendMultipleEndpointEvent.method,data:{event:t}}))}}t.WebhookApiClient=n,t.default=class{static async getAllWebhookEndpoints(e){return n.getAllWebhookEndpoints(e)}static async getAllWebhookEvents(e){return n.getAllWebhookEvents(e)}static async createWebhookEndpoint(e,t){return n.createWebhookEndpoint(e,t)}static async getASpecificWebhookEndpoint(e,t){return n.getASpecificWebhookEndpoint(e,t)}static async updateASpecificWebhookEndpoint(e,t,r){return n.updateASpecificWebhookEndpoint(e,t,r)}static async updateASingleWebhookEndpointField(e,t,r){return n.updateASingleWebhookEndpointField(e,t,r)}static async deleteWebhookEndpoint(e,t){return n.deleteWebhookEndpoint(e,t)}static async getAllWebhookEndpointAttempts(e,t){return n.getAllWebhookEndpointAttempts(e,t)}static async expireWebhookSigningSecret(e,t){return n.expireWebhookSigningSecret(e,t)}static async revealWebhookSigningSecret(e,t){return n.revealWebhookSigningSecret(e,t)}static async resendWebhookEndpointEvent(e,t,r){return n.resendWebhookEndpointEvent(e,t,r)}static async resendMultipleWebhookEndpointEvent(e,t,r){return n.resendMultipleWebhookEndpointEvent(e,t,r)}}},2319:(e,t)=>{"use strict";t.__esModule=!0},432:(e,t)=>{"use strict";t.__esModule=!0},1511:(e,t)=>{"use strict";t.__esModule=!0},3444:(e,t)=>{"use strict";t.__esModule=!0},5386:(e,t)=>{"use strict";t.__esModule=!0},4767:(e,t)=>{"use strict";t.__esModule=!0},6797:(e,t)=>{"use strict";t.__esModule=!0},7022:(e,t)=>{"use strict";t.__esModule=!0},4505:(e,t)=>{"use strict";t.__esModule=!0},5469:(e,t)=>{"use strict";t.__esModule=!0},8947:(e,t)=>{"use strict";t.__esModule=!0},994:(e,t,r)=>{"use strict";t.__esModule=!0;var a=r(2319);t.AccountCreateParams=a.AccountCreateParams,t.AccountVerifyParams=a.AccountVerifyParams,t.AccountRecoverParams=a.AccountRecoverParams,t.AccountResetParams=a.AccountResetParams,t.AccountSearchParams=a.AccountSearchParams;var s=r(5998);t.SCPaginatedResponse=s.SCPaginatedResponse;var i=r(419);t.WebhookParamType=i.WebhookParamType,t.WebhookEventsType=i.WebhookEventsType;var n=r(469);t.SSOSignUpParams=n.SSOSignUpParams;var o=r(3444);t.CommentListParams=o.CommentListParams,t.CommentCreateParams=o.CommentCreateParams;var c=r(8947);t.IncubatorCreateParams=c.IncubatorCreateParams,t.IncubatorSearchParams=c.IncubatorSearchParams;var u=r(1303);t.LoyaltyPrizeParams=u.LoyaltyPrizeParams;var l=r(4960);t.ModerationParams=l.ModerationParams,t.ModerateContributionParams=l.ModerateContributionParams,t.FlaggedContributionParams=l.FlaggedContributionParams;var d=r(6768);t.CustomNotificationParams=d.CustomNotificationParams;var p=r(5967);t.UserGetParams=p.UserGetParams,t.UserAutocompleteParams=p.UserAutocompleteParams,t.UserScoreParams=p.UserScoreParams,t.UserSearchParams=p.UserSearchParams;var h=r(5549);t.TagParams=h.TagParams,t.TagGetParams=h.TagGetParams;var m=r(7398);t.MediaCreateParams=m.MediaCreateParams,t.MediaTypes=m.MediaTypes,t.ChunkUploadParams=m.ChunkUploadParams,t.ChunkUploadCompleteParams=m.ChunkUploadCompleteParams;var g=r(6461);t.ThreadParams=g.ThreadParams,t.MessageCreateParams=g.MessageCreateParams,t.MessageMediaUploadParams=g.MessageMediaUploadParams,t.MessageThumbnailUploadParams=g.MessageThumbnailUploadParams,t.MessageChunkUploadDoneParams=g.MessageChunkUploadDoneParams,t.MessageMediaChunksParams=g.MessageMediaChunksParams,t.ThreadDeleteParams=g.ThreadDeleteParams;var f=r(1511);t.CategoryParams=f.CategoryParams;var y=r(5386);t.CustomAdvParams=y.CustomAdvParams;var b=r(4767);t.CustomPageParams=b.CustomPageParams,t.CustomPageSearchParams=b.CustomPageSearchParams;var C=r(6797);t.EmbedUpdateParams=C.EmbedUpdateParams,t.EmbedSearchParams=C.EmbedSearchParams;var v=r(432);t.BaseGetParams=v.BaseGetParams,t.BaseSearchParams=v.BaseSearchParams;var S=r(5469);t.FeedObjGetParams=S.FeedObjGetParams,t.FeedObjCreateParams=S.FeedObjCreateParams,t.FeedObjectPollVotesSearch=S.FeedObjectPollVotesSearch;var w=r(4505);t.FeedParams=w.FeedParams;var A=r(2460);t.LegalPageFilterParams=A.LegalPageFilterParams;var P=r(7022);t.FeatureParams=P.FeatureParams;var E=r(2846);t.ScoreParams=E.ScoreParams;var R=r(8291);t.InsightCommonParams=R.InsightCommonParams,t.InsightEmbedParams=R.InsightEmbedParams,t.InsightUserParams=R.InsightUserParams,t.InsightContributionParams=R.InsightContributionParams;var O=r(7844);t.ReactionParams=O.ReactionParams},8291:(e,t)=>{"use strict";t.__esModule=!0},2460:(e,t)=>{"use strict";t.__esModule=!0},7398:(e,t)=>{"use strict";let r;t.__esModule=!0,t.MediaTypes=void 0,t.MediaTypes=r,function(e){e.URL="url",e.SHARE="share",e.EMBED="embed"}(r||(t.MediaTypes=r={}))},4960:(e,t)=>{"use strict";t.__esModule=!0},6768:(e,t)=>{"use strict";t.__esModule=!0},5998:(e,t)=>{"use strict";t.__esModule=!0},6461:(e,t)=>{"use strict";t.__esModule=!0},1303:(e,t)=>{"use strict";t.__esModule=!0},7844:(e,t)=>{"use strict";t.__esModule=!0},2846:(e,t)=>{"use strict";t.__esModule=!0},469:(e,t)=>{"use strict";t.__esModule=!0},5549:(e,t)=>{"use strict";t.__esModule=!0},5967:(e,t)=>{"use strict";t.__esModule=!0},419:(e,t)=>{"use strict";t.__esModule=!0},2746:(e,t,r)=>{"use strict";t.__esModule=!0,t.apiRequest=function(e){return s.default.request(e).then((t=>t.status>=300?(console.log(`Unable to ${e.method} ${e.url} (Response code: ${t.status}).`),Promise.reject(t)):Promise.resolve(t.data))).catch((t=>(console.log(`Unable to ${e.method} ${e.url} ${t}`),Promise.reject(t))))};var a,s=(a=r(2037))&&a.__esModule?a:{default:a}},6021:(e,t,r)=>{"use strict";t.__esModule=!0,t.defaultError=n,t.formatHttpError=function(e){let t={};return e.response&&e.response.data&&"object"==typeof e.response.data&&e.response.data.errors?t=Object.assign({},o(e.response.data.errors)):n(e),t},t.getCancelTokenSourceRequest=function(){return i.default.CancelToken.source()};var a,s=r(2990),i=(a=r(9644))&&a.__esModule?a:{default:a};function n(e){e.request?console.log(e.request):console.log("Error",e.message)}const o=e=>{const t={};if(Array.isArray(e))for(let r=0;r<e.length;r++){const a=e[r];a.field?t[`${(0,s.camelCase)(a.field)}Error`]=Array.isArray(a.messages)?o(a.messages):a.messages:t.error=a.message}else t.error=e.errors;return t}},6789:(e,t,r)=>{"use strict";t.__esModule=!0,t.generateJWTToken=async function(e,t,r="2h"){let s={token_type:"access",user_id:e,jti:(new Date).getTime().toString()};const i=(new TextEncoder).encode(t);return await new a.SignJWT(s).setProtectedHeader({alg:"HS256",typ:"JWT"}).setIssuedAt().setExpirationTime(r||"2h").sign(i)},t.parseJwt=function(e){let t=e.split(".")[1].replace(/-/g,"+").replace(/_/g,"/"),r=decodeURIComponent(atob(t).split("").map((function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)})).join(""));return JSON.parse(r)};var a=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=s(t);if(r&&r.has(e))return r.get(e);var a={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e)if("default"!==n&&Object.prototype.hasOwnProperty.call(e,n)){var o=i?Object.getOwnPropertyDescriptor(e,n):null;o&&(o.get||o.set)?Object.defineProperty(a,n,o):a[n]=e[n]}return a.default=e,r&&r.set(e,a),a}(r(4893));function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(s=function(e){return e?r:t})(e)}},735:(e,t)=>{"use strict";t.__esModule=!0,t.urlParams=void 0,t.urlParams=e=>new URLSearchParams(e)},2990:(e,t,r)=>{"use strict";t.__esModule=!0;var a=r(4136);t.capitalize=a.capitalize,t.isString=a.isString,t.stripHtml=a.stripHtml,t.camelCase=a.camelCase,t.copyTextToClipboard=a.copyTextToClipboard,t.fallbackCopyTextToClipboard=a.fallbackCopyTextToClipboard,t.random=a.random,t.slugify=a.slugify;var s=r(8234);t.isValidUrl=s.isValidUrl,t.isValidUrls=s.isValidUrls,t.urlReplacer=s.urlReplacer,t.getDomain=s.getDomain,t.appendURLSearchParams=s.appendURLSearchParams,t.urlB64ToUint8Array=s.urlB64ToUint8Array,t.getQueryStringParameter=s.getQueryStringParameter,t.updateQueryStringParameter=s.updateQueryStringParameter;var i=r(1405);t.getHighestSafeWindowContext=i.getHighestSafeWindowContext,t.getWindowWidth=i.getWindowWidth,t.getWindowHeight=i.getWindowHeight,t.isClientSideRendering=i.isClientSideRendering;var n=r(1371);t.mergeDeep=n.mergeDeep,t.isObject=n.isObject,t.objectWithoutProperties=n.objectWithoutProperties;var o=r(873);t.arraysEqual=o.arraysEqual;var c=r(7288);t.loadVersionBrowser=c.loadVersionBrowser;var u=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=h(t);if(r&&r.has(e))return r.get(e);var a={},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var n=s?Object.getOwnPropertyDescriptor(e,i):null;n&&(n.get||n.set)?Object.defineProperty(a,i,n):a[i]=e[i]}return a.default=e,r&&r.set(e,a),a}(r(2789));t.LRUCache=u.default,t.LruCache=u.LruCache,t.CacheStrategies=u.CacheStrategies;var l=r(9040);t.Logger=l.Logger;var d,p=(d=r(1521))&&d.__esModule?d:{default:d};function h(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(h=function(e){return e?r:t})(e)}t.WSClient=p.default},873:(e,t)=>{"use strict";t.__esModule=!0,t.arraysEqual=void 0,t.arraysEqual=(e,t)=>{if(e===t)return!0;if(null==e||null==t)return!1;if(e.length!==t.length)return!1;for(let r=0;r<e.length;++r)if(e[r]!==t[r])return!1;return!0}},7288:(e,t)=>{"use strict";t.__esModule=!0,t.loadVersionBrowser=void 0,t.loadVersionBrowser=()=>{if("userAgentData"in navigator){const e=navigator.userAgentData;let t,r,a=null;for(let s=0;s<e.brands.length;s++){const i=e.brands[s].brand;if(r=e.brands[s].version,null!==i.match(/opera|chrome|edge|safari|firefox|msie|trident/i)){if(null===i.match(/chrome/i))return t=i.substr(i.indexOf(" ")+1),{name:t,version:r};a=r}}if(null!==a)return{name:"chrome",version:a}}let e,t=navigator.userAgent,r=t.match(/(opera|chrome|safari|firefox|msie|trident(?=\/))\/?\s*(\d+)/i)||[];return/trident/i.test(r[1])?(e=/\brv[ :]+(\d+)/g.exec(t)||[],{name:"IE",version:e[1]||""}):"Chrome"===r[1]&&(e=t.match(/\bOPR\/(\d+)/),null!=e)?{name:"Opera",version:e[1]}:(r=r[2]?[r[1],r[2]]:[navigator.appName,navigator.appVersion,"-?"],null!=(e=t.match(/version\/(\d+)/i))&&r.splice(1,1,e[1]),{name:r[0],version:r[1]})}},2789:(e,t)=>{"use strict";t.__esModule=!0,t.default=t.LruCache=t.CacheStrategies=void 0;class r{constructor(e=1e4){this.values=new Map,this.maxEntries=e,"undefined"!=typeof window&&(window.__viewSCCache=this.values)}get(e,t){let r;return this.values.has(e)?(r=this.values.get(e),this.values.delete(e),this.values.set(e,r)):t&&(r=t,this.values.set(e,r)),r}set(e,t){if(this.values.size>=this.maxEntries){const e=this.values.keys().next().value;this.values.delete(e)}this.values.set(e,t)}hasKey(e){return this.values.has(e)}delete(e){this.values.has(e)&&this.values.delete(e)}deleteKeys(e){e.forEach((e=>{this.values.has(e)&&this.values.delete(e)}))}deleteKeysWithPrefix(e){this.values.forEach(((t,r)=>{r.startsWith(e)&&this.values.delete(r)}))}clean(){this.values=new Map}evaluate(){console.log(this.values)}}var a;t.LruCache=r,t.CacheStrategies=a,function(e){e.CACHE_FIRST="Cache-first",e.NETWORK_ONLY="Network-only",e.STALE_WHILE_REVALIDATE="Stale-While-Revalidate"}(a||(t.CacheStrategies=a={}));var s=new r;t.default=s},9040:(e,t)=>{"use strict";t.__esModule=!0,t.Logger=void 0,t.Logger=class{static info(e,t){console.info(`%c[${e}]`,"color:#008080",` ${t}`)}static warn(e,t){console.warn(`%c[${e}]`,"color:#008080",` ${t}`)}static error(e,t){console.error(`%c[${e}]`,"color:#008080",` ${t}`)}static log(e,t){console.log(`%c[${e}]`,"color:#008080",` ${t}`)}static debug(e,t){console.debug(`%c[${e}]`,"color:#008080",` ${t}`)}}},1371:(e,t)=>{"use strict";function r(e){return"object"==typeof e&&!Array.isArray(e)&&null!==e}t.__esModule=!0,t.isObject=r,t.mergeDeep=function e(t,a){let s=Object.assign({},t);return r(t)&&r(a)&&Object.keys(a).forEach((i=>{r(a[i])?i in t?s[i]=e(t[i],a[i]):Object.assign(s,{[i]:a[i]}):Object.assign(s,{[i]:a[i]})})),s},t.objectWithoutProperties=function(e,t){let r=e?Object.assign({},e):null;return t.forEach((function(e){r&&e in r&&delete r[e]})),r}},4136:(e,t)=>{"use strict";function r(e){let t=document.createElement("textarea");t.value=e,t.style.top="0",t.style.left="0",t.style.position="fixed",document.body.appendChild(t),t.focus(),t.select();try{return document.execCommand("copy"),document.body.removeChild(t),Promise.resolve()}catch(e){return document.body.removeChild(t),Promise.reject(e)}}t.__esModule=!0,t.camelCase=function(e){return e.toLowerCase().replace(/[-_]+/g," ").replace(/[^\w\s]/g,"").replace(/ (.)/g,(e=>e.toUpperCase())).replace(/ /g,"")},t.capitalize=function(e){let t="",r=e.split(" ");for(let e=0;e<r.length;e++)t+=r[e].substring(0,1).toUpperCase()+r[e].substring(1,r[e].length);return t},t.copyTextToClipboard=function(e){return navigator.clipboard?navigator.clipboard.writeText(e):r(e)},t.fallbackCopyTextToClipboard=r,t.isString=function(e){return"string"==typeof e||e instanceof String},t.random=function(){return(Math.random()+1).toString(36).substring(7)},t.slugify=function(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")},t.stripHtml=function(e){return e.replace(/<[^>]*>?/gm,"").trim()}},8234:(e,t)=>{"use strict";t.__esModule=!0,t.appendURLSearchParams=function(e,t){let r=e;if(t.length&&r){const e=Object.keys(t[0])[0];r+=(r.split("?")[1]?"&":"?")+`${e}=${t[0][e]}`,t.slice(1).map((e=>{const t=Object.keys(e)[0];r+=`&${t}=${e[t]}`}))}return r},t.urlReplacer=t.urlB64ToUint8Array=t.updateQueryStringParameter=t.isValidUrls=t.isValidUrl=t.getQueryStringParameter=t.getDomain=void 0,t.urlReplacer=e=>t=>function(e,t){const r=/\$\(([^)]+)?\)/g;let a=r.exec(e);for(;a;)e=e.replace(a[0],t[a[1]]),r.lastIndex=0,a=r.exec(e);return e}(e,t),t.getDomain=e=>{const t=e.match(/^https?\:\/\/([^\/?#]+)(?:[\/?#]|$)/i);return t&&t[1]?t[1]:""};const r=e=>/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-/]))?/.test(e);t.isValidUrl=r,t.isValidUrls=(e,t)=>e.trim().split(t).every(r),t.urlB64ToUint8Array=e=>{const t=(e+"=".repeat((4-e.length%4)%4)).replace(/-/g,"+").replace(/_/g,"/"),r=window.atob(t),a=new Uint8Array(r.length);for(let e=0;e<r.length;++e)a[e]=r.charCodeAt(e);return a},t.getQueryStringParameter=(e,t)=>e&&t?new URL(e).searchParams.get(t):null,t.updateQueryStringParameter=(e,t,r)=>{if(e&&t&&r){let a=new RegExp("([?&])"+t+"=.*?(&|$)","i"),s=-1!==e.indexOf("?")?"&":"?";return e.match(a)?e.replace(a,"$1"+t+"="+r+"$2"):e+s+t+"="+r}return e}},1521:(e,t)=>{"use strict";t.__esModule=!0,t.default=void 0;class r{constructor(e){this._attempts=1,this._heartbeatInterval=null,this._missedHeartbeats=0,this.isValidOptions(e)&&(this._cfg=Object.assign({},{heartbeatMsg:null,debug:!1,mustReconnect:!0},e),this.connect())}static getInstance(e){return this._instance=this._instance||new r(e),this._instance}connect(){try{if(this._ws&&(this.isConnecting()||this.isConnected()))return void(this._cfg.debug&&console.info("Websocket is connecting or already connected."));"function"==typeof this._cfg.connecting&&this._cfg.connecting(),this._cfg.debug&&console.info(`Connecting to ${this._cfg.uri} ...`),this._ws=new WebSocket(this._cfg.uri,this._cfg.protocols),this._ws.onopen=this.onOpen.bind(this),this._ws.onmessage=this.onMessage.bind(this),this._ws.onerror=this.onError.bind(this),this._ws.onclose=this.onClose.bind(this),this._timer=null}catch(e){console.error(e),this.tryToReconnect()}}isValidOptions(e){let t=!1;return e?(e.uri||(console.error("Invalid WSClient Uri options."),t=!0),e&&e.connecting&&"function"!=typeof e.connecting&&(console.error("Invalid WSClient connecting options."),t=!0),e&&e.connected&&"function"!=typeof e.connected&&(console.error("Invalid WSClient connected options."),t=!0),e&&e.receiveMessage&&"function"!=typeof e.receiveMessage&&(console.error("Invalid WSClient receiveMessage options."),t=!0),e&&e.disconnected&&"function"!=typeof e.disconnected&&(console.error("Invalid WSClient connecting options."),t=!0),e&&e.heartbeatMsg&&"string"!=typeof e.heartbeatMsg&&(console.error("Invalid WSClient heartbeatMsg options."),t=!0),e&&e.debug&&"boolean"!=typeof e.debug&&(console.error("Invalid WSClient debug options."),t=!0),!t):(console.error("Invalid WSClient options."),t)}tryToReconnect(){if(this._cfg.mustReconnect&&!this._timer){this._cfg.debug&&console.info("Reconnecting...");let e=this.generateInterval(this._attempts);this._timer=setTimeout(this.reconnect.bind(this),e)}}reconnect(){this._attempts++,this.connect()}sendHeartbeat(){try{if(this._missedHeartbeats++,this._missedHeartbeats>3)throw new Error("Too many missed heartbeats.");this._ws.send(this._cfg.heartbeatMsg)}catch(e){clearInterval(this._heartbeatInterval),this._heartbeatInterval=null,this._cfg.debug&&console.warn(`Closing connection. Reason: ${e.message}`),this.isClosing()||this.isClosed()||this.close()}}onOpen(){this._cfg.debug&&console.info("Connected!"),this._attempts=1,this._cfg.heartbeatMsg&&null===this._heartbeatInterval&&(this._missedHeartbeats=0,this._heartbeatInterval=setInterval(this.sendHeartbeat.bind(this),5e3)),"function"==typeof this._cfg.connected&&this._cfg.connected()}onClose(e){this._cfg.debug&&console.info("Connection closed!"),"function"==typeof this._cfg.disconnected&&this._cfg.disconnected(e),this.tryToReconnect()}onError(e){this._cfg.debug&&console.error("Websocket connection is broken!"),this._cfg.debug&&console.error(e)}onMessage(e){if(this._cfg.heartbeatMsg&&e.data===this._cfg.heartbeatMsg)this._missedHeartbeats=0;else if("function"==typeof this._cfg.receiveMessage)return this._cfg.receiveMessage(e.data)}generateInterval(e){let t=1e3*(Math.pow(2,e)-1);return t>3e4&&(t=3e4),Math.random()*t}sendMessage(e){this._ws&&this._ws.send(e)}getState(){return this._ws&&this._ws.readyState}isConnecting(){return this._ws&&0===this._ws.readyState}isConnected(){return this._ws&&1===this._ws.readyState}isClosing(){return this._ws&&2===this._ws.readyState}isClosed(){return this._ws&&3===this._ws.readyState}close(){clearInterval(this._heartbeatInterval),this._cfg.mustReconnect=!1,this.isClosing()&&this.isClosed()||(this._ws.close(),this._cfg.debug&&console.error("Websocket closed."))}}t.default=r},1405:(e,t,r)=>{"use strict";t.__esModule=!0,t.getHighestSafeWindowContext=function e(t=r.g.window.self){return t===r.g.window.top||(()=>{try{return r.g.window.location.hostname!==r.g.window.parent.location.hostname}catch(e){return!0}})()?t:e(t.parent)},t.getWindowHeight=function(){return void 0!==r.g.window?r.g.window.innerHeight:0},t.getWindowWidth=function(){return void 0!==r.g.window?r.g.window.innerWidth:0},t.isClientSideRendering=function(){return"undefined"!=typeof window}},4893:(e,t,r)=>{"use strict";r.r(t),r.d(t,{CompactEncrypt:()=>et,CompactSign:()=>rt,EmbeddedJWK:()=>dt,EncryptJWT:()=>ot,FlattenedEncrypt:()=>qe,FlattenedSign:()=>tt,GeneralEncrypt:()=>Ge,GeneralSign:()=>st,SignJWT:()=>nt,UnsecuredJWT:()=>bt,base64url:()=>s,calculateJwkThumbprint:()=>ut,calculateJwkThumbprintUri:()=>lt,compactDecrypt:()=>ke,compactVerify:()=>Je,createLocalJWKSet:()=>gt,createRemoteJWKSet:()=>yt,decodeJwt:()=>wt,decodeProtectedHeader:()=>St,errors:()=>a,exportJWK:()=>$e,exportPKCS8:()=>Ie,exportSPKI:()=>He,flattenedDecrypt:()=>je,flattenedVerify:()=>xe,generalDecrypt:()=>Me,generalVerify:()=>Ne,generateKeyPair:()=>Pt,generateSecret:()=>Et,importJWK:()=>Re,importPKCS8:()=>Ee,importSPKI:()=>Ae,importX509:()=>Pe,jwtDecrypt:()=>Ze,jwtVerify:()=>Qe});var a={};r.r(a),r.d(a,{JOSEAlgNotAllowed:()=>A,JOSEError:()=>v,JOSENotSupported:()=>P,JWEDecryptionFailed:()=>E,JWEInvalid:()=>R,JWKInvalid:()=>T,JWKSInvalid:()=>U,JWKSMultipleMatchingKeys:()=>k,JWKSNoMatchingKey:()=>j,JWKSTimeout:()=>M,JWSInvalid:()=>O,JWSSignatureVerificationFailed:()=>H,JWTClaimValidationFailed:()=>S,JWTExpired:()=>w,JWTInvalid:()=>_});var s={};r.r(s),r.d(s,{decode:()=>vt,encode:()=>Ct});const i=crypto,n=e=>e instanceof CryptoKey,o=async(e,t)=>{const r=`SHA-${e.slice(-3)}`;return new Uint8Array(await i.subtle.digest(r,t))},c=new TextEncoder,u=new TextDecoder,l=2**32;function d(...e){const t=e.reduce(((e,{length:t})=>e+t),0),r=new Uint8Array(t);let a=0;return e.forEach((e=>{r.set(e,a),a+=e.length})),r}function p(e,t,r){if(t<0||t>=l)throw new RangeError(`value must be >= 0 and <= 4294967295. Received ${t}`);e.set([t>>>24,t>>>16,t>>>8,255&t],r)}function h(e){const t=Math.floor(e/l),r=e%l,a=new Uint8Array(8);return p(a,t,0),p(a,r,4),a}function m(e){const t=new Uint8Array(4);return p(t,e),t}function g(e){return d(m(e.length),e)}const f=e=>{let t=e;"string"==typeof t&&(t=c.encode(t));const r=[];for(let e=0;e<t.length;e+=32768)r.push(String.fromCharCode.apply(null,t.subarray(e,e+32768)));return btoa(r.join(""))},y=e=>f(e).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_"),b=e=>{const t=atob(e),r=new Uint8Array(t.length);for(let e=0;e<t.length;e++)r[e]=t.charCodeAt(e);return r},C=e=>{let t=e;t instanceof Uint8Array&&(t=u.decode(t)),t=t.replace(/-/g,"+").replace(/_/g,"/").replace(/\s/g,"");try{return b(t)}catch(e){throw new TypeError("The input to be decoded is not correctly encoded.")}};class v extends Error{constructor(e){var t;super(e),this.code="ERR_JOSE_GENERIC",this.name=this.constructor.name,null===(t=Error.captureStackTrace)||void 0===t||t.call(Error,this,this.constructor)}static get code(){return"ERR_JOSE_GENERIC"}}class S extends v{constructor(e,t="unspecified",r="unspecified"){super(e),this.code="ERR_JWT_CLAIM_VALIDATION_FAILED",this.claim=t,this.reason=r}static get code(){return"ERR_JWT_CLAIM_VALIDATION_FAILED"}}class w extends v{constructor(e,t="unspecified",r="unspecified"){super(e),this.code="ERR_JWT_EXPIRED",this.claim=t,this.reason=r}static get code(){return"ERR_JWT_EXPIRED"}}class A extends v{constructor(){super(...arguments),this.code="ERR_JOSE_ALG_NOT_ALLOWED"}static get code(){return"ERR_JOSE_ALG_NOT_ALLOWED"}}class P extends v{constructor(){super(...arguments),this.code="ERR_JOSE_NOT_SUPPORTED"}static get code(){return"ERR_JOSE_NOT_SUPPORTED"}}class E extends v{constructor(){super(...arguments),this.code="ERR_JWE_DECRYPTION_FAILED",this.message="decryption operation failed"}static get code(){return"ERR_JWE_DECRYPTION_FAILED"}}class R extends v{constructor(){super(...arguments),this.code="ERR_JWE_INVALID"}static get code(){return"ERR_JWE_INVALID"}}class O extends v{constructor(){super(...arguments),this.code="ERR_JWS_INVALID"}static get code(){return"ERR_JWS_INVALID"}}class _ extends v{constructor(){super(...arguments),this.code="ERR_JWT_INVALID"}static get code(){return"ERR_JWT_INVALID"}}class T extends v{constructor(){super(...arguments),this.code="ERR_JWK_INVALID"}static get code(){return"ERR_JWK_INVALID"}}class U extends v{constructor(){super(...arguments),this.code="ERR_JWKS_INVALID"}static get code(){return"ERR_JWKS_INVALID"}}class j extends v{constructor(){super(...arguments),this.code="ERR_JWKS_NO_MATCHING_KEY",this.message="no applicable key found in the JSON Web Key Set"}static get code(){return"ERR_JWKS_NO_MATCHING_KEY"}}class k extends v{constructor(){super(...arguments),this.code="ERR_JWKS_MULTIPLE_MATCHING_KEYS",this.message="multiple matching keys found in the JSON Web Key Set"}static get code(){return"ERR_JWKS_MULTIPLE_MATCHING_KEYS"}}class M extends v{constructor(){super(...arguments),this.code="ERR_JWKS_TIMEOUT",this.message="request timed out"}static get code(){return"ERR_JWKS_TIMEOUT"}}class H extends v{constructor(){super(...arguments),this.code="ERR_JWS_SIGNATURE_VERIFICATION_FAILED",this.message="signature verification failed"}static get code(){return"ERR_JWS_SIGNATURE_VERIFICATION_FAILED"}}const I=i.getRandomValues.bind(i);function $(e){switch(e){case"A128GCM":case"A128GCMKW":case"A192GCM":case"A192GCMKW":case"A256GCM":case"A256GCMKW":return 96;case"A128CBC-HS256":case"A192CBC-HS384":case"A256CBC-HS512":return 128;default:throw new P(`Unsupported JWE Algorithm: ${e}`)}}const F=e=>I(new Uint8Array($(e)>>3)),W=(e,t)=>{if(t.length<<3!==$(e))throw new R("Invalid Initialization Vector length")},q=(e,t)=>{const r=e.byteLength<<3;if(r!==t)throw new R(`Invalid Content Encryption Key length. Expected ${t} bits, got ${r} bits`)};function L(){return"undefined"!=typeof WebSocketPair||"undefined"!=typeof navigator&&"Cloudflare-Workers"===navigator.userAgent||"undefined"!=typeof EdgeRuntime&&"vercel"===EdgeRuntime}function G(e,t="algorithm.name"){return new TypeError(`CryptoKey does not support this operation, its ${t} must be ${e}`)}function D(e,t){return e.name===t}function K(e){return parseInt(e.name.slice(4),10)}function x(e,t){if(t.length&&!t.some((t=>e.usages.includes(t)))){let e="CryptoKey does not support this operation, its usages must include ";if(t.length>2){const r=t.pop();e+=`one of ${t.join(", ")}, or ${r}.`}else 2===t.length?e+=`one of ${t[0]} or ${t[1]}.`:e+=`${t[0]}.`;throw new TypeError(e)}}function J(e,t,...r){switch(t){case"A128GCM":case"A192GCM":case"A256GCM":{if(!D(e.algorithm,"AES-GCM"))throw G("AES-GCM");const r=parseInt(t.slice(1,4),10);if(e.algorithm.length!==r)throw G(r,"algorithm.length");break}case"A128KW":case"A192KW":case"A256KW":{if(!D(e.algorithm,"AES-KW"))throw G("AES-KW");const r=parseInt(t.slice(1,4),10);if(e.algorithm.length!==r)throw G(r,"algorithm.length");break}case"ECDH":switch(e.algorithm.name){case"ECDH":case"X25519":case"X448":break;default:throw G("ECDH, X25519, or X448")}break;case"PBES2-HS256+A128KW":case"PBES2-HS384+A192KW":case"PBES2-HS512+A256KW":if(!D(e.algorithm,"PBKDF2"))throw G("PBKDF2");break;case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":{if(!D(e.algorithm,"RSA-OAEP"))throw G("RSA-OAEP");const r=parseInt(t.slice(9),10)||1;if(K(e.algorithm.hash)!==r)throw G(`SHA-${r}`,"algorithm.hash");break}default:throw new TypeError("CryptoKey does not support this operation")}x(e,r)}function N(e,t,...r){if(r.length>2){const t=r.pop();e+=`one of type ${r.join(", ")}, or ${t}.`}else 2===r.length?e+=`one of type ${r[0]} or ${r[1]}.`:e+=`of type ${r[0]}.`;return null==t?e+=` Received ${t}`:"function"==typeof t&&t.name?e+=` Received function ${t.name}`:"object"==typeof t&&null!=t&&t.constructor&&t.constructor.name&&(e+=` Received an instance of ${t.constructor.name}`),e}const B=(e,...t)=>N("Key must be ",e,...t);function z(e,t,...r){return N(`Key for the ${e} algorithm must be `,t,...r)}const V=e=>n(e),X=["CryptoKey"],Y=async(e,t,r,a,s,o)=>{if(!(n(t)||t instanceof Uint8Array))throw new TypeError(B(t,...X,"Uint8Array"));switch(W(e,a),e){case"A128CBC-HS256":case"A192CBC-HS384":case"A256CBC-HS512":return t instanceof Uint8Array&&q(t,parseInt(e.slice(-3),10)),async function(e,t,r,a,s,n){if(!(t instanceof Uint8Array))throw new TypeError(B(t,"Uint8Array"));const o=parseInt(e.slice(1,4),10),c=await i.subtle.importKey("raw",t.subarray(o>>3),"AES-CBC",!1,["decrypt"]),u=await i.subtle.importKey("raw",t.subarray(0,o>>3),{hash:"SHA-"+(o<<1),name:"HMAC"},!1,["sign"]),l=d(n,a,r,h(n.length<<3)),p=new Uint8Array((await i.subtle.sign("HMAC",u,l)).slice(0,o>>3));let m,g;try{m=((e,t)=>{if(!(e instanceof Uint8Array))throw new TypeError("First argument must be a buffer");if(!(t instanceof Uint8Array))throw new TypeError("Second argument must be a buffer");if(e.length!==t.length)throw new TypeError("Input buffers must have the same length");const r=e.length;let a=0,s=-1;for(;++s<r;)a|=e[s]^t[s];return 0===a})(s,p)}catch(e){}if(!m)throw new E;try{g=new Uint8Array(await i.subtle.decrypt({iv:a,name:"AES-CBC"},c,r))}catch(e){}if(!g)throw new E;return g}(e,t,r,a,s,o);case"A128GCM":case"A192GCM":case"A256GCM":return t instanceof Uint8Array&&q(t,parseInt(e.slice(1,4),10)),async function(e,t,r,a,s,n){let o;t instanceof Uint8Array?o=await i.subtle.importKey("raw",t,"AES-GCM",!1,["decrypt"]):(J(t,e,"decrypt"),o=t);try{return new Uint8Array(await i.subtle.decrypt({additionalData:n,iv:a,name:"AES-GCM",tagLength:128},o,d(r,s)))}catch(e){throw new E}}(e,t,r,a,s,o);default:throw new P("Unsupported JWE Content Encryption Algorithm")}},Q=async()=>{throw new P('JWE "zip" (Compression Algorithm) Header Parameter is not supported by your javascript runtime. You need to use the `inflateRaw` decrypt option to provide Inflate Raw implementation.')},Z=async()=>{throw new P('JWE "zip" (Compression Algorithm) Header Parameter is not supported by your javascript runtime. You need to use the `deflateRaw` encrypt option to provide Deflate Raw implementation.')},ee=(...e)=>{const t=e.filter(Boolean);if(0===t.length||1===t.length)return!0;let r;for(const e of t){const t=Object.keys(e);if(r&&0!==r.size)for(const e of t){if(r.has(e))return!1;r.add(e)}else r=new Set(t)}return!0};function te(e){if("object"!=typeof(t=e)||null===t||"[object Object]"!==Object.prototype.toString.call(e))return!1;var t;if(null===Object.getPrototypeOf(e))return!0;let r=e;for(;null!==Object.getPrototypeOf(r);)r=Object.getPrototypeOf(r);return Object.getPrototypeOf(e)===r}const re=[{hash:"SHA-256",name:"HMAC"},!0,["sign"]];function ae(e,t){if(e.algorithm.length!==parseInt(t.slice(1,4),10))throw new TypeError(`Invalid key size for alg: ${t}`)}function se(e,t,r){if(n(e))return J(e,t,r),e;if(e instanceof Uint8Array)return i.subtle.importKey("raw",e,"AES-KW",!0,[r]);throw new TypeError(B(e,...X,"Uint8Array"))}const ie=async(e,t,r)=>{const a=await se(t,e,"wrapKey");ae(a,e);const s=await i.subtle.importKey("raw",r,...re);return new Uint8Array(await i.subtle.wrapKey("raw",s,a,"AES-KW"))},ne=async(e,t,r)=>{const a=await se(t,e,"unwrapKey");ae(a,e);const s=await i.subtle.unwrapKey("raw",r,a,"AES-KW",...re);return new Uint8Array(await i.subtle.exportKey("raw",s))};async function oe(e,t,r,a,s=new Uint8Array(0),u=new Uint8Array(0)){if(!n(e))throw new TypeError(B(e,...X));if(J(e,"ECDH"),!n(t))throw new TypeError(B(t,...X));J(t,"ECDH","deriveBits");const l=d(g(c.encode(r)),g(s),g(u),m(a));let p;return p="X25519"===e.algorithm.name?256:"X448"===e.algorithm.name?448:Math.ceil(parseInt(e.algorithm.namedCurve.substr(-3),10)/8)<<3,async function(e,t,r){const a=Math.ceil((t>>3)/32),s=new Uint8Array(32*a);for(let t=0;t<a;t++){const a=new Uint8Array(4+e.length+r.length);a.set(m(t+1)),a.set(e,4),a.set(r,4+e.length),s.set(await o("sha256",a),32*t)}return s.slice(0,t>>3)}(new Uint8Array(await i.subtle.deriveBits({name:e.algorithm.name,public:e},t,p)),a,l)}function ce(e){if(!n(e))throw new TypeError(B(e,...X));return["P-256","P-384","P-521"].includes(e.algorithm.namedCurve)||"X25519"===e.algorithm.name||"X448"===e.algorithm.name}async function ue(e,t,r,a){!function(e){if(!(e instanceof Uint8Array)||e.length<8)throw new R("PBES2 Salt Input must be 8 or more octets")}(e);const s=function(e,t){return d(c.encode(e),new Uint8Array([0]),t)}(t,e),o=parseInt(t.slice(13,16),10),u={hash:`SHA-${t.slice(8,11)}`,iterations:r,name:"PBKDF2",salt:s},l={length:o,name:"AES-KW"},p=await function(e,t){if(e instanceof Uint8Array)return i.subtle.importKey("raw",e,"PBKDF2",!1,["deriveBits"]);if(n(e))return J(e,t,"deriveBits","deriveKey"),e;throw new TypeError(B(e,...X,"Uint8Array"))}(a,t);if(p.usages.includes("deriveBits"))return new Uint8Array(await i.subtle.deriveBits(u,p,o));if(p.usages.includes("deriveKey"))return i.subtle.deriveKey(u,p,l,!1,["wrapKey","unwrapKey"]);throw new TypeError('PBKDF2 key "usages" must include "deriveBits" or "deriveKey"')}function le(e){switch(e){case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":return"RSA-OAEP";default:throw new P(`alg ${e} is not supported either by JOSE or your javascript runtime`)}}const de=(e,t)=>{if(e.startsWith("RS")||e.startsWith("PS")){const{modulusLength:r}=t.algorithm;if("number"!=typeof r||r<2048)throw new TypeError(`${e} requires key modulusLength to be 2048 bits or larger`)}};function pe(e){switch(e){case"A128GCM":return 128;case"A192GCM":return 192;case"A256GCM":case"A128CBC-HS256":return 256;case"A192CBC-HS384":return 384;case"A256CBC-HS512":return 512;default:throw new P(`Unsupported JWE Algorithm: ${e}`)}}const he=e=>I(new Uint8Array(pe(e)>>3)),me=(e,t)=>`-----BEGIN ${t}-----\n${(e.match(/.{1,64}/g)||[]).join("\n")}\n-----END ${t}-----`,ge=async(e,t,r)=>{if(!n(r))throw new TypeError(B(r,...X));if(!r.extractable)throw new TypeError("CryptoKey is not extractable");if(r.type!==e)throw new TypeError(`key is not a ${e} key`);return me(f(new Uint8Array(await i.subtle.exportKey(t,r))),`${e.toUpperCase()} KEY`)},fe=(e,t,r=0)=>{0===r&&(t.unshift(t.length),t.unshift(6));let a=e.indexOf(t[0],r);if(-1===a)return!1;const s=e.subarray(a,a+t.length);return s.length===t.length&&(s.every(((e,r)=>e===t[r]))||fe(e,t,a+1))},ye=e=>{switch(!0){case fe(e,[42,134,72,206,61,3,1,7]):return"P-256";case fe(e,[43,129,4,0,34]):return"P-384";case fe(e,[43,129,4,0,35]):return"P-521";case fe(e,[43,101,110]):return"X25519";case fe(e,[43,101,111]):return"X448";case fe(e,[43,101,112]):return"Ed25519";case fe(e,[43,101,113]):return"Ed448";default:throw new P("Invalid or unsupported EC Key Curve or OKP Key Sub Type")}},be=async(e,t,r,a,s)=>{var n;let o,c;const u=new Uint8Array(atob(r.replace(e,"")).split("").map((e=>e.charCodeAt(0)))),l="spki"===t;switch(a){case"PS256":case"PS384":case"PS512":o={name:"RSA-PSS",hash:`SHA-${a.slice(-3)}`},c=l?["verify"]:["sign"];break;case"RS256":case"RS384":case"RS512":o={name:"RSASSA-PKCS1-v1_5",hash:`SHA-${a.slice(-3)}`},c=l?["verify"]:["sign"];break;case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":o={name:"RSA-OAEP",hash:`SHA-${parseInt(a.slice(-3),10)||1}`},c=l?["encrypt","wrapKey"]:["decrypt","unwrapKey"];break;case"ES256":o={name:"ECDSA",namedCurve:"P-256"},c=l?["verify"]:["sign"];break;case"ES384":o={name:"ECDSA",namedCurve:"P-384"},c=l?["verify"]:["sign"];break;case"ES512":o={name:"ECDSA",namedCurve:"P-521"},c=l?["verify"]:["sign"];break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":{const e=ye(u);o=e.startsWith("P-")?{name:"ECDH",namedCurve:e}:{name:e},c=l?[]:["deriveBits"];break}case L()&&"EdDSA":{const e=ye(u).toUpperCase();o={name:`NODE-${e}`,namedCurve:`NODE-${e}`},c=l?["verify"]:["sign"];break}case"EdDSA":o={name:ye(u)},c=l?["verify"]:["sign"];break;default:throw new P('Invalid or unsupported "alg" (Algorithm) value')}return i.subtle.importKey(t,u,o,null!==(n=null==s?void 0:s.extractable)&&void 0!==n&&n,c)},Ce=(e,t,r)=>be(/(?:-----(?:BEGIN|END) PUBLIC KEY-----|\s)/g,"spki",e,t,r),ve=async e=>{var t,r;const{algorithm:a,keyUsages:s}=function(e){let t,r;switch(e.kty){case"oct":switch(e.alg){case"HS256":case"HS384":case"HS512":t={name:"HMAC",hash:`SHA-${e.alg.slice(-3)}`},r=["sign","verify"];break;case"A128CBC-HS256":case"A192CBC-HS384":case"A256CBC-HS512":throw new P(`${e.alg} keys cannot be imported as CryptoKey instances`);case"A128GCM":case"A192GCM":case"A256GCM":case"A128GCMKW":case"A192GCMKW":case"A256GCMKW":t={name:"AES-GCM"},r=["encrypt","decrypt"];break;case"A128KW":case"A192KW":case"A256KW":t={name:"AES-KW"},r=["wrapKey","unwrapKey"];break;case"PBES2-HS256+A128KW":case"PBES2-HS384+A192KW":case"PBES2-HS512+A256KW":t={name:"PBKDF2"},r=["deriveBits"];break;default:throw new P('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break;case"RSA":switch(e.alg){case"PS256":case"PS384":case"PS512":t={name:"RSA-PSS",hash:`SHA-${e.alg.slice(-3)}`},r=e.d?["sign"]:["verify"];break;case"RS256":case"RS384":case"RS512":t={name:"RSASSA-PKCS1-v1_5",hash:`SHA-${e.alg.slice(-3)}`},r=e.d?["sign"]:["verify"];break;case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":t={name:"RSA-OAEP",hash:`SHA-${parseInt(e.alg.slice(-3),10)||1}`},r=e.d?["decrypt","unwrapKey"]:["encrypt","wrapKey"];break;default:throw new P('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break;case"EC":switch(e.alg){case"ES256":t={name:"ECDSA",namedCurve:"P-256"},r=e.d?["sign"]:["verify"];break;case"ES384":t={name:"ECDSA",namedCurve:"P-384"},r=e.d?["sign"]:["verify"];break;case"ES512":t={name:"ECDSA",namedCurve:"P-521"},r=e.d?["sign"]:["verify"];break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":t={name:"ECDH",namedCurve:e.crv},r=e.d?["deriveBits"]:[];break;default:throw new P('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break;case L()&&"OKP":if("EdDSA"!==e.alg)throw new P('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');if("Ed25519"!==e.crv)throw new P('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');t={name:"NODE-ED25519",namedCurve:"NODE-ED25519"},r=e.d?["sign"]:["verify"];break;case"OKP":switch(e.alg){case"EdDSA":t={name:e.crv},r=e.d?["sign"]:["verify"];break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":t={name:e.crv},r=e.d?["deriveBits"]:[];break;default:throw new P('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break;default:throw new P('Invalid or unsupported JWK "kty" (Key Type) Parameter value')}return{algorithm:t,keyUsages:r}}(e),n=[a,null!==(t=e.ext)&&void 0!==t&&t,null!==(r=e.key_ops)&&void 0!==r?r:s];if("PBKDF2"===a.name)return i.subtle.importKey("raw",C(e.k),...n);const o={...e};return delete o.alg,i.subtle.importKey("jwk",o,...n)};function Se(e){let t=[],r=0;for(;r<e.length;){let a=we(e.subarray(r));t.push(a),r+=a.byteLength}return t}function we(e){let t=0,r=31&e[0];if(t++,31===r){for(r=0;e[t]>=128;)r=128*r+e[t]-128,t++;r=128*r+e[t]-128,t++}let a=0;if(e[t]<128)a=e[t],t++;else{if(128===a){for(a=0;0!==e[t+a]||0!==e[t+a+1];){if(a>e.byteLength)throw new TypeError("invalid indefinite form length");a++}const r=t+a+2;return{byteLength:r,contents:e.subarray(t,t+a),raw:e.subarray(0,r)}}{let r=127&e[t];t++,a=0;for(let s=0;s<r;s++)a=256*a+e[t],t++}}const s=t+a;return{byteLength:s,contents:e.subarray(t,s),raw:e.subarray(0,s)}}async function Ae(e,t,r){if("string"!=typeof e||0!==e.indexOf("-----BEGIN PUBLIC KEY-----"))throw new TypeError('"spki" must be SPKI formatted string');return Ce(e,t,r)}async function Pe(e,t,r){if("string"!=typeof e||0!==e.indexOf("-----BEGIN CERTIFICATE-----"))throw new TypeError('"x509" must be X.509 formatted string');let a;try{a=function(e){const t=e.replace(/(?:-----(?:BEGIN|END) CERTIFICATE-----|\s)/g,""),r=b(t);return me(function(e){const t=Se(Se(we(e).contents)[0].contents);return f(t[160===t[0].raw[0]?6:5].raw)}(r),"PUBLIC KEY")}(e)}catch(e){throw new TypeError("failed to parse the X.509 certificate",{cause:e})}return Ce(a,t,r)}async function Ee(e,t,r){if("string"!=typeof e||0!==e.indexOf("-----BEGIN PRIVATE KEY-----"))throw new TypeError('"pkcs8" must be PCKS8 formatted string');return((e,t,r)=>be(/(?:-----(?:BEGIN|END) PRIVATE KEY-----|\s)/g,"pkcs8",e,t,r))(e,t,r)}async function Re(e,t,r){if(!te(e))throw new TypeError("JWK must be an object");if(t||(t=e.alg),"string"!=typeof t||!t)throw new TypeError('"alg" argument is required when "jwk.alg" is not present');switch(e.kty){case"oct":if("string"!=typeof e.k||!e.k)throw new TypeError('missing "k" (Key Value) Parameter value');return null!=r||(r=!0!==e.ext),r?ve({...e,alg:t,ext:!1}):C(e.k);case"RSA":if(void 0!==e.oth)throw new P('RSA JWK "oth" (Other Primes Info) Parameter value is not supported');case"EC":case"OKP":return ve({...e,alg:t});default:throw new P('Unsupported "kty" (Key Type) Parameter value')}}const Oe=(e,t,r)=>{e.startsWith("HS")||"dir"===e||e.startsWith("PBES2")||/^A\d{3}(?:GCM)?KW$/.test(e)?((e,t)=>{if(!(t instanceof Uint8Array)){if(!V(t))throw new TypeError(z(e,t,...X,"Uint8Array"));if("secret"!==t.type)throw new TypeError(`${X.join(" or ")} instances for symmetric algorithms must be of type "secret"`)}})(e,t):((e,t,r)=>{if(!V(t))throw new TypeError(z(e,t,...X));if("secret"===t.type)throw new TypeError(`${X.join(" or ")} instances for asymmetric algorithms must not be of type "secret"`);if("sign"===r&&"public"===t.type)throw new TypeError(`${X.join(" or ")} instances for asymmetric algorithm signing must be of type "private"`);if("decrypt"===r&&"public"===t.type)throw new TypeError(`${X.join(" or ")} instances for asymmetric algorithm decryption must be of type "private"`);if(t.algorithm&&"verify"===r&&"private"===t.type)throw new TypeError(`${X.join(" or ")} instances for asymmetric algorithm verifying must be of type "public"`);if(t.algorithm&&"encrypt"===r&&"private"===t.type)throw new TypeError(`${X.join(" or ")} instances for asymmetric algorithm encryption must be of type "public"`)})(e,t,r)},_e=async(e,t,r,a,s)=>{if(!(n(r)||r instanceof Uint8Array))throw new TypeError(B(r,...X,"Uint8Array"));switch(W(e,a),e){case"A128CBC-HS256":case"A192CBC-HS384":case"A256CBC-HS512":return r instanceof Uint8Array&&q(r,parseInt(e.slice(-3),10)),async function(e,t,r,a,s){if(!(r instanceof Uint8Array))throw new TypeError(B(r,"Uint8Array"));const n=parseInt(e.slice(1,4),10),o=await i.subtle.importKey("raw",r.subarray(n>>3),"AES-CBC",!1,["encrypt"]),c=await i.subtle.importKey("raw",r.subarray(0,n>>3),{hash:"SHA-"+(n<<1),name:"HMAC"},!1,["sign"]),u=new Uint8Array(await i.subtle.encrypt({iv:a,name:"AES-CBC"},o,t)),l=d(s,a,u,h(s.length<<3));return{ciphertext:u,tag:new Uint8Array((await i.subtle.sign("HMAC",c,l)).slice(0,n>>3))}}(e,t,r,a,s);case"A128GCM":case"A192GCM":case"A256GCM":return r instanceof Uint8Array&&q(r,parseInt(e.slice(1,4),10)),async function(e,t,r,a,s){let n;r instanceof Uint8Array?n=await i.subtle.importKey("raw",r,"AES-GCM",!1,["encrypt"]):(J(r,e,"encrypt"),n=r);const o=new Uint8Array(await i.subtle.encrypt({additionalData:s,iv:a,name:"AES-GCM",tagLength:128},n,t)),c=o.slice(-16);return{ciphertext:o.slice(0,-16),tag:c}}(e,t,r,a,s);default:throw new P("Unsupported JWE Content Encryption Algorithm")}},Te=function(e,t,r,a,s){if(void 0!==s.crit&&void 0===a.crit)throw new e('"crit" (Critical) Header Parameter MUST be integrity protected');if(!a||void 0===a.crit)return new Set;if(!Array.isArray(a.crit)||0===a.crit.length||a.crit.some((e=>"string"!=typeof e||0===e.length)))throw new e('"crit" (Critical) Header Parameter MUST be an array of non-empty strings when present');let i;i=void 0!==r?new Map([...Object.entries(r),...t.entries()]):t;for(const t of a.crit){if(!i.has(t))throw new P(`Extension Header Parameter "${t}" is not recognized`);if(void 0===s[t])throw new e(`Extension Header Parameter "${t}" is missing`);if(i.get(t)&&void 0===a[t])throw new e(`Extension Header Parameter "${t}" MUST be integrity protected`)}return new Set(a.crit)},Ue=(e,t)=>{if(void 0!==t&&(!Array.isArray(t)||t.some((e=>"string"!=typeof e))))throw new TypeError(`"${e}" option must be an array of strings`);if(t)return new Set(t)};async function je(e,t,r){var a;if(!te(e))throw new R("Flattened JWE must be an object");if(void 0===e.protected&&void 0===e.header&&void 0===e.unprotected)throw new R("JOSE Header missing");if("string"!=typeof e.iv)throw new R("JWE Initialization Vector missing or incorrect type");if("string"!=typeof e.ciphertext)throw new R("JWE Ciphertext missing or incorrect type");if("string"!=typeof e.tag)throw new R("JWE Authentication Tag missing or incorrect type");if(void 0!==e.protected&&"string"!=typeof e.protected)throw new R("JWE Protected Header incorrect type");if(void 0!==e.encrypted_key&&"string"!=typeof e.encrypted_key)throw new R("JWE Encrypted Key incorrect type");if(void 0!==e.aad&&"string"!=typeof e.aad)throw new R("JWE AAD incorrect type");if(void 0!==e.header&&!te(e.header))throw new R("JWE Shared Unprotected Header incorrect type");if(void 0!==e.unprotected&&!te(e.unprotected))throw new R("JWE Per-Recipient Unprotected Header incorrect type");let s;if(e.protected)try{const t=C(e.protected);s=JSON.parse(u.decode(t))}catch(e){throw new R("JWE Protected Header is invalid")}if(!ee(s,e.header,e.unprotected))throw new R("JWE Protected, JWE Unprotected Header, and JWE Per-Recipient Unprotected Header Parameter names must be disjoint");const o={...s,...e.header,...e.unprotected};if(Te(R,new Map,null==r?void 0:r.crit,s,o),void 0!==o.zip){if(!s||!s.zip)throw new R('JWE "zip" (Compression Algorithm) Header MUST be integrity protected');if("DEF"!==o.zip)throw new P('Unsupported JWE "zip" (Compression Algorithm) Header Parameter value')}const{alg:l,enc:p}=o;if("string"!=typeof l||!l)throw new R("missing JWE Algorithm (alg) in JWE Header");if("string"!=typeof p||!p)throw new R("missing JWE Encryption Algorithm (enc) in JWE Header");const h=r&&Ue("keyManagementAlgorithms",r.keyManagementAlgorithms),m=r&&Ue("contentEncryptionAlgorithms",r.contentEncryptionAlgorithms);if(h&&!h.has(l))throw new A('"alg" (Algorithm) Header Parameter not allowed');if(m&&!m.has(p))throw new A('"enc" (Encryption Algorithm) Header Parameter not allowed');let g;void 0!==e.encrypted_key&&(g=C(e.encrypted_key));let f,y=!1;"function"==typeof t&&(t=await t(s,e),y=!0);try{f=await async function(e,t,r,a,s){switch(Oe(e,t,"decrypt"),e){case"dir":if(void 0!==r)throw new R("Encountered unexpected JWE Encrypted Key");return t;case"ECDH-ES":if(void 0!==r)throw new R("Encountered unexpected JWE Encrypted Key");case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":{if(!te(a.epk))throw new R('JOSE Header "epk" (Ephemeral Public Key) missing or invalid');if(!ce(t))throw new P("ECDH with the provided key is not allowed or not supported by your javascript runtime");const s=await Re(a.epk,e);let i,n;if(void 0!==a.apu){if("string"!=typeof a.apu)throw new R('JOSE Header "apu" (Agreement PartyUInfo) invalid');i=C(a.apu)}if(void 0!==a.apv){if("string"!=typeof a.apv)throw new R('JOSE Header "apv" (Agreement PartyVInfo) invalid');n=C(a.apv)}const o=await oe(s,t,"ECDH-ES"===e?a.enc:e,"ECDH-ES"===e?pe(a.enc):parseInt(e.slice(-5,-2),10),i,n);if("ECDH-ES"===e)return o;if(void 0===r)throw new R("JWE Encrypted Key missing");return ne(e.slice(-6),o,r)}case"RSA1_5":case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":if(void 0===r)throw new R("JWE Encrypted Key missing");return(async(e,t,r)=>{if(!n(t))throw new TypeError(B(t,...X));if(J(t,e,"decrypt","unwrapKey"),de(e,t),t.usages.includes("decrypt"))return new Uint8Array(await i.subtle.decrypt(le(e),t,r));if(t.usages.includes("unwrapKey")){const a=await i.subtle.unwrapKey("raw",r,t,le(e),...re);return new Uint8Array(await i.subtle.exportKey("raw",a))}throw new TypeError('RSA-OAEP key "usages" must include "decrypt" or "unwrapKey" for this operation')})(e,t,r);case"PBES2-HS256+A128KW":case"PBES2-HS384+A192KW":case"PBES2-HS512+A256KW":{if(void 0===r)throw new R("JWE Encrypted Key missing");if("number"!=typeof a.p2c)throw new R('JOSE Header "p2c" (PBES2 Count) missing or invalid');const i=(null==s?void 0:s.maxPBES2Count)||1e4;if(a.p2c>i)throw new R('JOSE Header "p2c" (PBES2 Count) out is of acceptable bounds');if("string"!=typeof a.p2s)throw new R('JOSE Header "p2s" (PBES2 Salt) missing or invalid');return(async(e,t,r,a,s)=>{const i=await ue(s,e,a,t);return ne(e.slice(-6),i,r)})(e,t,r,a.p2c,C(a.p2s))}case"A128KW":case"A192KW":case"A256KW":if(void 0===r)throw new R("JWE Encrypted Key missing");return ne(e,t,r);case"A128GCMKW":case"A192GCMKW":case"A256GCMKW":if(void 0===r)throw new R("JWE Encrypted Key missing");if("string"!=typeof a.iv)throw new R('JOSE Header "iv" (Initialization Vector) missing or invalid');if("string"!=typeof a.tag)throw new R('JOSE Header "tag" (Authentication Tag) missing or invalid');return async function(e,t,r,a,s){const i=e.slice(0,7);return Y(i,t,r,a,s,new Uint8Array(0))}(e,t,r,C(a.iv),C(a.tag));default:throw new P('Invalid or unsupported "alg" (JWE Algorithm) header value')}}(l,t,g,o,r)}catch(e){if(e instanceof TypeError||e instanceof R||e instanceof P)throw e;f=he(p)}const b=C(e.iv),v=C(e.tag),S=c.encode(null!==(a=e.protected)&&void 0!==a?a:"");let w;w=void 0!==e.aad?d(S,c.encode("."),c.encode(e.aad)):S;let E=await Y(p,f,C(e.ciphertext),b,v,w);"DEF"===o.zip&&(E=await((null==r?void 0:r.inflateRaw)||Q)(E));const O={plaintext:E};return void 0!==e.protected&&(O.protectedHeader=s),void 0!==e.aad&&(O.additionalAuthenticatedData=C(e.aad)),void 0!==e.unprotected&&(O.sharedUnprotectedHeader=e.unprotected),void 0!==e.header&&(O.unprotectedHeader=e.header),y?{...O,key:t}:O}async function ke(e,t,r){if(e instanceof Uint8Array&&(e=u.decode(e)),"string"!=typeof e)throw new R("Compact JWE must be a string or Uint8Array");const{0:a,1:s,2:i,3:n,4:o,length:c}=e.split(".");if(5!==c)throw new R("Invalid Compact JWE");const l=await je({ciphertext:n,iv:i||void 0,protected:a||void 0,tag:o||void 0,encrypted_key:s||void 0},t,r),d={plaintext:l.plaintext,protectedHeader:l.protectedHeader};return"function"==typeof t?{...d,key:l.key}:d}async function Me(e,t,r){if(!te(e))throw new R("General JWE must be an object");if(!Array.isArray(e.recipients)||!e.recipients.every(te))throw new R("JWE Recipients missing or incorrect type");if(!e.recipients.length)throw new R("JWE Recipients has no members");for(const a of e.recipients)try{return await je({aad:e.aad,ciphertext:e.ciphertext,encrypted_key:a.encrypted_key,header:a.header,iv:e.iv,protected:e.protected,tag:e.tag,unprotected:e.unprotected},t,r)}catch(e){}throw new E}async function He(e){return(e=>ge("public","spki",e))(e)}async function Ie(e){return(e=>ge("private","pkcs8",e))(e)}async function $e(e){return(async e=>{if(e instanceof Uint8Array)return{kty:"oct",k:y(e)};if(!n(e))throw new TypeError(B(e,...X,"Uint8Array"));if(!e.extractable)throw new TypeError("non-extractable CryptoKey cannot be exported as a JWK");const{ext:t,key_ops:r,alg:a,use:s,...o}=await i.subtle.exportKey("jwk",e);return o})(e)}const Fe=async function(e,t,r,a,s={}){let o,c,u;switch(Oe(e,r,"encrypt"),e){case"dir":u=r;break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":{if(!ce(r))throw new P("ECDH with the provided key is not allowed or not supported by your javascript runtime");const{apu:l,apv:d}=s;let{epk:p}=s;p||(p=(await async function(e){if(!n(e))throw new TypeError(B(e,...X));return i.subtle.generateKey(e.algorithm,!0,["deriveBits"])}(r)).privateKey);const{x:h,y:m,crv:g,kty:f}=await $e(p),b=await oe(r,p,"ECDH-ES"===e?t:e,"ECDH-ES"===e?pe(t):parseInt(e.slice(-5,-2),10),l,d);if(c={epk:{x:h,crv:g,kty:f}},"EC"===f&&(c.epk.y=m),l&&(c.apu=y(l)),d&&(c.apv=y(d)),"ECDH-ES"===e){u=b;break}u=a||he(t);const C=e.slice(-6);o=await ie(C,b,u);break}case"RSA1_5":case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":u=a||he(t),o=await(async(e,t,r)=>{if(!n(t))throw new TypeError(B(t,...X));if(J(t,e,"encrypt","wrapKey"),de(e,t),t.usages.includes("encrypt"))return new Uint8Array(await i.subtle.encrypt(le(e),t,r));if(t.usages.includes("wrapKey")){const a=await i.subtle.importKey("raw",r,...re);return new Uint8Array(await i.subtle.wrapKey("raw",a,t,le(e)))}throw new TypeError('RSA-OAEP key "usages" must include "encrypt" or "wrapKey" for this operation')})(e,r,u);break;case"PBES2-HS256+A128KW":case"PBES2-HS384+A192KW":case"PBES2-HS512+A256KW":{u=a||he(t);const{p2c:i,p2s:n}=s;({encryptedKey:o,...c}=await(async(e,t,r,a=2048,s=I(new Uint8Array(16)))=>{const i=await ue(s,e,a,t);return{encryptedKey:await ie(e.slice(-6),i,r),p2c:a,p2s:y(s)}})(e,r,u,i,n));break}case"A128KW":case"A192KW":case"A256KW":u=a||he(t),o=await ie(e,r,u);break;case"A128GCMKW":case"A192GCMKW":case"A256GCMKW":{u=a||he(t);const{iv:i}=s;({encryptedKey:o,...c}=await async function(e,t,r,a){const s=e.slice(0,7);a||(a=F(s));const{ciphertext:i,tag:n}=await _e(s,r,t,a,new Uint8Array(0));return{encryptedKey:i,iv:y(a),tag:y(n)}}(e,r,u,i));break}default:throw new P('Invalid or unsupported "alg" (JWE Algorithm) header value')}return{cek:u,encryptedKey:o,parameters:c}},We=Symbol();class qe{constructor(e){if(!(e instanceof Uint8Array))throw new TypeError("plaintext must be an instance of Uint8Array");this._plaintext=e}setKeyManagementParameters(e){if(this._keyManagementParameters)throw new TypeError("setKeyManagementParameters can only be called once");return this._keyManagementParameters=e,this}setProtectedHeader(e){if(this._protectedHeader)throw new TypeError("setProtectedHeader can only be called once");return this._protectedHeader=e,this}setSharedUnprotectedHeader(e){if(this._sharedUnprotectedHeader)throw new TypeError("setSharedUnprotectedHeader can only be called once");return this._sharedUnprotectedHeader=e,this}setUnprotectedHeader(e){if(this._unprotectedHeader)throw new TypeError("setUnprotectedHeader can only be called once");return this._unprotectedHeader=e,this}setAdditionalAuthenticatedData(e){return this._aad=e,this}setContentEncryptionKey(e){if(this._cek)throw new TypeError("setContentEncryptionKey can only be called once");return this._cek=e,this}setInitializationVector(e){if(this._iv)throw new TypeError("setInitializationVector can only be called once");return this._iv=e,this}async encrypt(e,t){if(!this._protectedHeader&&!this._unprotectedHeader&&!this._sharedUnprotectedHeader)throw new R("either setProtectedHeader, setUnprotectedHeader, or sharedUnprotectedHeader must be called before #encrypt()");if(!ee(this._protectedHeader,this._unprotectedHeader,this._sharedUnprotectedHeader))throw new R("JWE Protected, JWE Shared Unprotected and JWE Per-Recipient Header Parameter names must be disjoint");const r={...this._protectedHeader,...this._unprotectedHeader,...this._sharedUnprotectedHeader};if(Te(R,new Map,null==t?void 0:t.crit,this._protectedHeader,r),void 0!==r.zip){if(!this._protectedHeader||!this._protectedHeader.zip)throw new R('JWE "zip" (Compression Algorithm) Header MUST be integrity protected');if("DEF"!==r.zip)throw new P('Unsupported JWE "zip" (Compression Algorithm) Header Parameter value')}const{alg:a,enc:s}=r;if("string"!=typeof a||!a)throw new R('JWE "alg" (Algorithm) Header Parameter missing or invalid');if("string"!=typeof s||!s)throw new R('JWE "enc" (Encryption Algorithm) Header Parameter missing or invalid');let i,n,o,l,p,h,m;if("dir"===a){if(this._cek)throw new TypeError("setContentEncryptionKey cannot be called when using Direct Encryption")}else if("ECDH-ES"===a&&this._cek)throw new TypeError("setContentEncryptionKey cannot be called when using Direct Key Agreement");{let r;({cek:n,encryptedKey:i,parameters:r}=await Fe(a,s,e,this._cek,this._keyManagementParameters)),r&&(t&&We in t?this._unprotectedHeader?this._unprotectedHeader={...this._unprotectedHeader,...r}:this.setUnprotectedHeader(r):this._protectedHeader?this._protectedHeader={...this._protectedHeader,...r}:this.setProtectedHeader(r))}if(this._iv||(this._iv=F(s)),l=this._protectedHeader?c.encode(y(JSON.stringify(this._protectedHeader))):c.encode(""),this._aad?(p=y(this._aad),o=d(l,c.encode("."),c.encode(p))):o=l,"DEF"===r.zip){const e=await((null==t?void 0:t.deflateRaw)||Z)(this._plaintext);({ciphertext:h,tag:m}=await _e(s,e,n,this._iv,o))}else({ciphertext:h,tag:m}=await _e(s,this._plaintext,n,this._iv,o));const g={ciphertext:y(h),iv:y(this._iv),tag:y(m)};return i&&(g.encrypted_key=y(i)),p&&(g.aad=p),this._protectedHeader&&(g.protected=u.decode(l)),this._sharedUnprotectedHeader&&(g.unprotected=this._sharedUnprotectedHeader),this._unprotectedHeader&&(g.header=this._unprotectedHeader),g}}class Le{constructor(e,t,r){this.parent=e,this.key=t,this.options=r}setUnprotectedHeader(e){if(this.unprotectedHeader)throw new TypeError("setUnprotectedHeader can only be called once");return this.unprotectedHeader=e,this}addRecipient(...e){return this.parent.addRecipient(...e)}encrypt(...e){return this.parent.encrypt(...e)}done(){return this.parent}}class Ge{constructor(e){this._recipients=[],this._plaintext=e}addRecipient(e,t){const r=new Le(this,e,{crit:null==t?void 0:t.crit});return this._recipients.push(r),r}setProtectedHeader(e){if(this._protectedHeader)throw new TypeError("setProtectedHeader can only be called once");return this._protectedHeader=e,this}setSharedUnprotectedHeader(e){if(this._unprotectedHeader)throw new TypeError("setSharedUnprotectedHeader can only be called once");return this._unprotectedHeader=e,this}setAdditionalAuthenticatedData(e){return this._aad=e,this}async encrypt(e){var t,r,a;if(!this._recipients.length)throw new R("at least one recipient must be added");if(e={deflateRaw:null==e?void 0:e.deflateRaw},1===this._recipients.length){const[t]=this._recipients,r=await new qe(this._plaintext).setAdditionalAuthenticatedData(this._aad).setProtectedHeader(this._protectedHeader).setSharedUnprotectedHeader(this._unprotectedHeader).setUnprotectedHeader(t.unprotectedHeader).encrypt(t.key,{...t.options,...e});let a={ciphertext:r.ciphertext,iv:r.iv,recipients:[{}],tag:r.tag};return r.aad&&(a.aad=r.aad),r.protected&&(a.protected=r.protected),r.unprotected&&(a.unprotected=r.unprotected),r.encrypted_key&&(a.recipients[0].encrypted_key=r.encrypted_key),r.header&&(a.recipients[0].header=r.header),a}let s;for(let e=0;e<this._recipients.length;e++){const t=this._recipients[e];if(!ee(this._protectedHeader,this._unprotectedHeader,t.unprotectedHeader))throw new R("JWE Protected, JWE Shared Unprotected and JWE Per-Recipient Header Parameter names must be disjoint");const r={...this._protectedHeader,...this._unprotectedHeader,...t.unprotectedHeader},{alg:a}=r;if("string"!=typeof a||!a)throw new R('JWE "alg" (Algorithm) Header Parameter missing or invalid');if("dir"===a||"ECDH-ES"===a)throw new R('"dir" and "ECDH-ES" alg may only be used with a single recipient');if("string"!=typeof r.enc||!r.enc)throw new R('JWE "enc" (Encryption Algorithm) Header Parameter missing or invalid');if(s){if(s!==r.enc)throw new R('JWE "enc" (Encryption Algorithm) Header Parameter must be the same for all recipients')}else s=r.enc;if(Te(R,new Map,t.options.crit,this._protectedHeader,r),!(void 0===r.zip||this._protectedHeader&&this._protectedHeader.zip))throw new R('JWE "zip" (Compression Algorithm) Header MUST be integrity protected')}const i=he(s);let n={ciphertext:"",iv:"",recipients:[],tag:""};for(let o=0;o<this._recipients.length;o++){const c=this._recipients[o],u={};n.recipients.push(u);const l={...this._protectedHeader,...this._unprotectedHeader,...c.unprotectedHeader}.alg.startsWith("PBES2")?2048+o:void 0;if(0===o){const t=await new qe(this._plaintext).setAdditionalAuthenticatedData(this._aad).setContentEncryptionKey(i).setProtectedHeader(this._protectedHeader).setSharedUnprotectedHeader(this._unprotectedHeader).setUnprotectedHeader(c.unprotectedHeader).setKeyManagementParameters({p2c:l}).encrypt(c.key,{...c.options,...e,[We]:!0});n.ciphertext=t.ciphertext,n.iv=t.iv,n.tag=t.tag,t.aad&&(n.aad=t.aad),t.protected&&(n.protected=t.protected),t.unprotected&&(n.unprotected=t.unprotected),u.encrypted_key=t.encrypted_key,t.header&&(u.header=t.header);continue}const{encryptedKey:d,parameters:p}=await Fe((null===(t=c.unprotectedHeader)||void 0===t?void 0:t.alg)||(null===(r=this._protectedHeader)||void 0===r?void 0:r.alg)||(null===(a=this._unprotectedHeader)||void 0===a?void 0:a.alg),s,c.key,i,{p2c:l});u.encrypted_key=y(d),(c.unprotectedHeader||p)&&(u.header={...c.unprotectedHeader,...p})}return n}}function De(e,t){const r=`SHA-${e.slice(-3)}`;switch(e){case"HS256":case"HS384":case"HS512":return{hash:r,name:"HMAC"};case"PS256":case"PS384":case"PS512":return{hash:r,name:"RSA-PSS",saltLength:e.slice(-3)>>3};case"RS256":case"RS384":case"RS512":return{hash:r,name:"RSASSA-PKCS1-v1_5"};case"ES256":case"ES384":case"ES512":return{hash:r,name:"ECDSA",namedCurve:t.namedCurve};case L()&&"EdDSA":const{namedCurve:a}=t;return{name:a,namedCurve:a};case"EdDSA":return{name:t.name};default:throw new P(`alg ${e} is not supported either by JOSE or your javascript runtime`)}}function Ke(e,t,r){if(n(t))return function(e,t,...r){switch(t){case"HS256":case"HS384":case"HS512":{if(!D(e.algorithm,"HMAC"))throw G("HMAC");const r=parseInt(t.slice(2),10);if(K(e.algorithm.hash)!==r)throw G(`SHA-${r}`,"algorithm.hash");break}case"RS256":case"RS384":case"RS512":{if(!D(e.algorithm,"RSASSA-PKCS1-v1_5"))throw G("RSASSA-PKCS1-v1_5");const r=parseInt(t.slice(2),10);if(K(e.algorithm.hash)!==r)throw G(`SHA-${r}`,"algorithm.hash");break}case"PS256":case"PS384":case"PS512":{if(!D(e.algorithm,"RSA-PSS"))throw G("RSA-PSS");const r=parseInt(t.slice(2),10);if(K(e.algorithm.hash)!==r)throw G(`SHA-${r}`,"algorithm.hash");break}case L()&&"EdDSA":if(!D(e.algorithm,"NODE-ED25519"))throw G("NODE-ED25519");break;case"EdDSA":if("Ed25519"!==e.algorithm.name&&"Ed448"!==e.algorithm.name)throw G("Ed25519 or Ed448");break;case"ES256":case"ES384":case"ES512":{if(!D(e.algorithm,"ECDSA"))throw G("ECDSA");const r=function(e){switch(e){case"ES256":return"P-256";case"ES384":return"P-384";case"ES512":return"P-521";default:throw new Error("unreachable")}}(t);if(e.algorithm.namedCurve!==r)throw G(r,"algorithm.namedCurve");break}default:throw new TypeError("CryptoKey does not support this operation")}x(e,r)}(t,e,r),t;if(t instanceof Uint8Array){if(!e.startsWith("HS"))throw new TypeError(B(t,...X));return i.subtle.importKey("raw",t,{hash:`SHA-${e.slice(-3)}`,name:"HMAC"},!1,[r])}throw new TypeError(B(t,...X,"Uint8Array"))}async function xe(e,t,r){var a;if(!te(e))throw new O("Flattened JWS must be an object");if(void 0===e.protected&&void 0===e.header)throw new O('Flattened JWS must have either of the "protected" or "header" members');if(void 0!==e.protected&&"string"!=typeof e.protected)throw new O("JWS Protected Header incorrect type");if(void 0===e.payload)throw new O("JWS Payload missing");if("string"!=typeof e.signature)throw new O("JWS Signature missing or incorrect type");if(void 0!==e.header&&!te(e.header))throw new O("JWS Unprotected Header incorrect type");let s={};if(e.protected)try{const t=C(e.protected);s=JSON.parse(u.decode(t))}catch(e){throw new O("JWS Protected Header is invalid")}if(!ee(s,e.header))throw new O("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");const n={...s,...e.header};let o=!0;if(Te(O,new Map([["b64",!0]]),null==r?void 0:r.crit,s,n).has("b64")&&(o=s.b64,"boolean"!=typeof o))throw new O('The "b64" (base64url-encode payload) Header Parameter must be a boolean');const{alg:l}=n;if("string"!=typeof l||!l)throw new O('JWS "alg" (Algorithm) Header Parameter missing or invalid');const p=r&&Ue("algorithms",r.algorithms);if(p&&!p.has(l))throw new A('"alg" (Algorithm) Header Parameter not allowed');if(o){if("string"!=typeof e.payload)throw new O("JWS Payload must be a string")}else if("string"!=typeof e.payload&&!(e.payload instanceof Uint8Array))throw new O("JWS Payload must be a string or an Uint8Array instance");let h=!1;"function"==typeof t&&(t=await t(s,e),h=!0),Oe(l,t,"verify");const m=d(c.encode(null!==(a=e.protected)&&void 0!==a?a:""),c.encode("."),"string"==typeof e.payload?c.encode(e.payload):e.payload),g=C(e.signature);if(!await(async(e,t,r,a)=>{const s=await Ke(e,t,"verify");de(e,s);const n=De(e,s.algorithm);try{return await i.subtle.verify(n,s,r,a)}catch(e){return!1}})(l,t,g,m))throw new H;let f;f=o?C(e.payload):"string"==typeof e.payload?c.encode(e.payload):e.payload;const y={payload:f};return void 0!==e.protected&&(y.protectedHeader=s),void 0!==e.header&&(y.unprotectedHeader=e.header),h?{...y,key:t}:y}async function Je(e,t,r){if(e instanceof Uint8Array&&(e=u.decode(e)),"string"!=typeof e)throw new O("Compact JWS must be a string or Uint8Array");const{0:a,1:s,2:i,length:n}=e.split(".");if(3!==n)throw new O("Invalid Compact JWS");const o=await xe({payload:s,protected:a,signature:i},t,r),c={payload:o.payload,protectedHeader:o.protectedHeader};return"function"==typeof t?{...c,key:o.key}:c}async function Ne(e,t,r){if(!te(e))throw new O("General JWS must be an object");if(!Array.isArray(e.signatures)||!e.signatures.every(te))throw new O("JWS Signatures missing or incorrect type");for(const a of e.signatures)try{return await xe({header:a.header,payload:e.payload,protected:a.protected,signature:a.signature},t,r)}catch(e){}throw new H}const Be=e=>Math.floor(e.getTime()/1e3),ze=/^(\d+|\d+\.\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)$/i,Ve=e=>{const t=ze.exec(e);if(!t)throw new TypeError("Invalid time period format");const r=parseFloat(t[1]);switch(t[2].toLowerCase()){case"sec":case"secs":case"second":case"seconds":case"s":return Math.round(r);case"minute":case"minutes":case"min":case"mins":case"m":return Math.round(60*r);case"hour":case"hours":case"hr":case"hrs":case"h":return Math.round(3600*r);case"day":case"days":case"d":return Math.round(86400*r);case"week":case"weeks":case"w":return Math.round(604800*r);default:return Math.round(31557600*r)}},Xe=e=>e.toLowerCase().replace(/^application\//,""),Ye=(e,t,r={})=>{const{typ:a}=r;if(a&&("string"!=typeof e.typ||Xe(e.typ)!==Xe(a)))throw new S('unexpected "typ" JWT header value',"typ","check_failed");let s;try{s=JSON.parse(u.decode(t))}catch(e){}if(!te(s))throw new _("JWT Claims Set must be a top-level JSON object");const{issuer:i}=r;if(i&&!(Array.isArray(i)?i:[i]).includes(s.iss))throw new S('unexpected "iss" claim value',"iss","check_failed");const{subject:n}=r;if(n&&s.sub!==n)throw new S('unexpected "sub" claim value',"sub","check_failed");const{audience:o}=r;if(o&&(l="string"==typeof o?[o]:o,!("string"==typeof(c=s.aud)?l.includes(c):Array.isArray(c)&&l.some(Set.prototype.has.bind(new Set(c))))))throw new S('unexpected "aud" claim value',"aud","check_failed");var c,l;let d;switch(typeof r.clockTolerance){case"string":d=Ve(r.clockTolerance);break;case"number":d=r.clockTolerance;break;case"undefined":d=0;break;default:throw new TypeError("Invalid clockTolerance option type")}const{currentDate:p}=r,h=Be(p||new Date);if((void 0!==s.iat||r.maxTokenAge)&&"number"!=typeof s.iat)throw new S('"iat" claim must be a number',"iat","invalid");if(void 0!==s.nbf){if("number"!=typeof s.nbf)throw new S('"nbf" claim must be a number',"nbf","invalid");if(s.nbf>h+d)throw new S('"nbf" claim timestamp check failed',"nbf","check_failed")}if(void 0!==s.exp){if("number"!=typeof s.exp)throw new S('"exp" claim must be a number',"exp","invalid");if(s.exp<=h-d)throw new w('"exp" claim timestamp check failed',"exp","check_failed")}if(r.maxTokenAge){const e=h-s.iat;if(e-d>("number"==typeof r.maxTokenAge?r.maxTokenAge:Ve(r.maxTokenAge)))throw new w('"iat" claim timestamp check failed (too far in the past)',"iat","check_failed");if(e<0-d)throw new S('"iat" claim timestamp check failed (it should be in the past)',"iat","check_failed")}return s};async function Qe(e,t,r){var a;const s=await Je(e,t,r);if((null===(a=s.protectedHeader.crit)||void 0===a?void 0:a.includes("b64"))&&!1===s.protectedHeader.b64)throw new _("JWTs MUST NOT use unencoded payload");const i={payload:Ye(s.protectedHeader,s.payload,r),protectedHeader:s.protectedHeader};return"function"==typeof t?{...i,key:s.key}:i}async function Ze(e,t,r){const a=await ke(e,t,r),s=Ye(a.protectedHeader,a.plaintext,r),{protectedHeader:i}=a;if(void 0!==i.iss&&i.iss!==s.iss)throw new S('replicated "iss" claim header parameter mismatch',"iss","mismatch");if(void 0!==i.sub&&i.sub!==s.sub)throw new S('replicated "sub" claim header parameter mismatch',"sub","mismatch");if(void 0!==i.aud&&JSON.stringify(i.aud)!==JSON.stringify(s.aud))throw new S('replicated "aud" claim header parameter mismatch',"aud","mismatch");const n={payload:s,protectedHeader:i};return"function"==typeof t?{...n,key:a.key}:n}class et{constructor(e){this._flattened=new qe(e)}setContentEncryptionKey(e){return this._flattened.setContentEncryptionKey(e),this}setInitializationVector(e){return this._flattened.setInitializationVector(e),this}setProtectedHeader(e){return this._flattened.setProtectedHeader(e),this}setKeyManagementParameters(e){return this._flattened.setKeyManagementParameters(e),this}async encrypt(e,t){const r=await this._flattened.encrypt(e,t);return[r.protected,r.encrypted_key,r.iv,r.ciphertext,r.tag].join(".")}}class tt{constructor(e){if(!(e instanceof Uint8Array))throw new TypeError("payload must be an instance of Uint8Array");this._payload=e}setProtectedHeader(e){if(this._protectedHeader)throw new TypeError("setProtectedHeader can only be called once");return this._protectedHeader=e,this}setUnprotectedHeader(e){if(this._unprotectedHeader)throw new TypeError("setUnprotectedHeader can only be called once");return this._unprotectedHeader=e,this}async sign(e,t){if(!this._protectedHeader&&!this._unprotectedHeader)throw new O("either setProtectedHeader or setUnprotectedHeader must be called before #sign()");if(!ee(this._protectedHeader,this._unprotectedHeader))throw new O("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");const r={...this._protectedHeader,...this._unprotectedHeader};let a=!0;if(Te(O,new Map([["b64",!0]]),null==t?void 0:t.crit,this._protectedHeader,r).has("b64")&&(a=this._protectedHeader.b64,"boolean"!=typeof a))throw new O('The "b64" (base64url-encode payload) Header Parameter must be a boolean');const{alg:s}=r;if("string"!=typeof s||!s)throw new O('JWS "alg" (Algorithm) Header Parameter missing or invalid');Oe(s,e,"sign");let n,o=this._payload;a&&(o=c.encode(y(o))),n=this._protectedHeader?c.encode(y(JSON.stringify(this._protectedHeader))):c.encode("");const l=d(n,c.encode("."),o),p=await(async(e,t,r)=>{const a=await Ke(e,t,"sign");de(e,a);const s=await i.subtle.sign(De(e,a.algorithm),a,r);return new Uint8Array(s)})(s,e,l),h={signature:y(p),payload:""};return a&&(h.payload=u.decode(o)),this._unprotectedHeader&&(h.header=this._unprotectedHeader),this._protectedHeader&&(h.protected=u.decode(n)),h}}class rt{constructor(e){this._flattened=new tt(e)}setProtectedHeader(e){return this._flattened.setProtectedHeader(e),this}async sign(e,t){const r=await this._flattened.sign(e,t);if(void 0===r.payload)throw new TypeError("use the flattened module for creating JWS with b64: false");return`${r.protected}.${r.payload}.${r.signature}`}}class at{constructor(e,t,r){this.parent=e,this.key=t,this.options=r}setProtectedHeader(e){if(this.protectedHeader)throw new TypeError("setProtectedHeader can only be called once");return this.protectedHeader=e,this}setUnprotectedHeader(e){if(this.unprotectedHeader)throw new TypeError("setUnprotectedHeader can only be called once");return this.unprotectedHeader=e,this}addSignature(...e){return this.parent.addSignature(...e)}sign(...e){return this.parent.sign(...e)}done(){return this.parent}}class st{constructor(e){this._signatures=[],this._payload=e}addSignature(e,t){const r=new at(this,e,t);return this._signatures.push(r),r}async sign(){if(!this._signatures.length)throw new O("at least one signature must be added");const e={signatures:[],payload:""};for(let t=0;t<this._signatures.length;t++){const r=this._signatures[t],a=new tt(this._payload);a.setProtectedHeader(r.protectedHeader),a.setUnprotectedHeader(r.unprotectedHeader);const{payload:s,...i}=await a.sign(r.key,r.options);if(0===t)e.payload=s;else if(e.payload!==s)throw new O("inconsistent use of JWS Unencoded Payload Option (RFC7797)");e.signatures.push(i)}return e}}class it{constructor(e){if(!te(e))throw new TypeError("JWT Claims Set MUST be an object");this._payload=e}setIssuer(e){return this._payload={...this._payload,iss:e},this}setSubject(e){return this._payload={...this._payload,sub:e},this}setAudience(e){return this._payload={...this._payload,aud:e},this}setJti(e){return this._payload={...this._payload,jti:e},this}setNotBefore(e){return this._payload="number"==typeof e?{...this._payload,nbf:e}:{...this._payload,nbf:Be(new Date)+Ve(e)},this}setExpirationTime(e){return this._payload="number"==typeof e?{...this._payload,exp:e}:{...this._payload,exp:Be(new Date)+Ve(e)},this}setIssuedAt(e){return this._payload=void 0===e?{...this._payload,iat:Be(new Date)}:{...this._payload,iat:e},this}}class nt extends it{setProtectedHeader(e){return this._protectedHeader=e,this}async sign(e,t){var r;const a=new rt(c.encode(JSON.stringify(this._payload)));if(a.setProtectedHeader(this._protectedHeader),Array.isArray(null===(r=this._protectedHeader)||void 0===r?void 0:r.crit)&&this._protectedHeader.crit.includes("b64")&&!1===this._protectedHeader.b64)throw new _("JWTs MUST NOT use unencoded payload");return a.sign(e,t)}}class ot extends it{setProtectedHeader(e){if(this._protectedHeader)throw new TypeError("setProtectedHeader can only be called once");return this._protectedHeader=e,this}setKeyManagementParameters(e){if(this._keyManagementParameters)throw new TypeError("setKeyManagementParameters can only be called once");return this._keyManagementParameters=e,this}setContentEncryptionKey(e){if(this._cek)throw new TypeError("setContentEncryptionKey can only be called once");return this._cek=e,this}setInitializationVector(e){if(this._iv)throw new TypeError("setInitializationVector can only be called once");return this._iv=e,this}replicateIssuerAsHeader(){return this._replicateIssuerAsHeader=!0,this}replicateSubjectAsHeader(){return this._replicateSubjectAsHeader=!0,this}replicateAudienceAsHeader(){return this._replicateAudienceAsHeader=!0,this}async encrypt(e,t){const r=new et(c.encode(JSON.stringify(this._payload)));return this._replicateIssuerAsHeader&&(this._protectedHeader={...this._protectedHeader,iss:this._payload.iss}),this._replicateSubjectAsHeader&&(this._protectedHeader={...this._protectedHeader,sub:this._payload.sub}),this._replicateAudienceAsHeader&&(this._protectedHeader={...this._protectedHeader,aud:this._payload.aud}),r.setProtectedHeader(this._protectedHeader),this._iv&&r.setInitializationVector(this._iv),this._cek&&r.setContentEncryptionKey(this._cek),this._keyManagementParameters&&r.setKeyManagementParameters(this._keyManagementParameters),r.encrypt(e,t)}}const ct=(e,t)=>{if("string"!=typeof e||!e)throw new T(`${t} missing or invalid`)};async function ut(e,t){if(!te(e))throw new TypeError("JWK must be an object");if(null!=t||(t="sha256"),"sha256"!==t&&"sha384"!==t&&"sha512"!==t)throw new TypeError('digestAlgorithm must one of "sha256", "sha384", or "sha512"');let r;switch(e.kty){case"EC":ct(e.crv,'"crv" (Curve) Parameter'),ct(e.x,'"x" (X Coordinate) Parameter'),ct(e.y,'"y" (Y Coordinate) Parameter'),r={crv:e.crv,kty:e.kty,x:e.x,y:e.y};break;case"OKP":ct(e.crv,'"crv" (Subtype of Key Pair) Parameter'),ct(e.x,'"x" (Public Key) Parameter'),r={crv:e.crv,kty:e.kty,x:e.x};break;case"RSA":ct(e.e,'"e" (Exponent) Parameter'),ct(e.n,'"n" (Modulus) Parameter'),r={e:e.e,kty:e.kty,n:e.n};break;case"oct":ct(e.k,'"k" (Key Value) Parameter'),r={k:e.k,kty:e.kty};break;default:throw new P('"kty" (Key Type) Parameter missing or unsupported')}const a=c.encode(JSON.stringify(r));return y(await o(t,a))}async function lt(e,t){null!=t||(t="sha256");const r=await ut(e,t);return`urn:ietf:params:oauth:jwk-thumbprint:sha-${t.slice(-3)}:${r}`}async function dt(e,t){const r={...e,...t.header};if(!te(r.jwk))throw new O('"jwk" (JSON Web Key) Header Parameter must be a JSON object');const a=await Re({...r.jwk,ext:!0},r.alg,!0);if(a instanceof Uint8Array||"public"!==a.type)throw new O('"jwk" (JSON Web Key) Header Parameter must be a public key');return a}function pt(e){return e&&"object"==typeof e&&Array.isArray(e.keys)&&e.keys.every(ht)}function ht(e){return te(e)}class mt{constructor(e){if(this._cached=new WeakMap,!pt(e))throw new U("JSON Web Key Set malformed");var t;this._jwks=(t=e,"function"==typeof structuredClone?structuredClone(t):JSON.parse(JSON.stringify(t)))}async getKey(e,t){const{alg:r,kid:a}={...e,...t.header},s=function(e){switch("string"==typeof e&&e.slice(0,2)){case"RS":case"PS":return"RSA";case"ES":return"EC";case"Ed":return"OKP";default:throw new P('Unsupported "alg" value for a JSON Web Key Set')}}(r),i=this._jwks.keys.filter((e=>{let t=s===e.kty;if(t&&"string"==typeof a&&(t=a===e.kid),t&&"string"==typeof e.alg&&(t=r===e.alg),t&&"string"==typeof e.use&&(t="sig"===e.use),t&&Array.isArray(e.key_ops)&&(t=e.key_ops.includes("verify")),t&&"EdDSA"===r&&(t="Ed25519"===e.crv||"Ed448"===e.crv),t)switch(r){case"ES256":t="P-256"===e.crv;break;case"ES256K":t="secp256k1"===e.crv;break;case"ES384":t="P-384"===e.crv;break;case"ES512":t="P-521"===e.crv}return t})),{0:n,length:o}=i;if(0===o)throw new j;if(1!==o)throw new k;const c=this._cached.get(n)||this._cached.set(n,{}).get(n);if(void 0===c[r]){const e=await Re({...n,ext:!0},r);if(e instanceof Uint8Array||"public"!==e.type)throw new U("JSON Web Key Set members must be public keys");c[r]=e}return c[r]}}function gt(e){return mt.prototype.getKey.bind(new mt(e))}class ft extends mt{constructor(e,t){if(super({keys:[]}),this._jwks=void 0,!(e instanceof URL))throw new TypeError("url must be an instance of URL");this._url=new URL(e.href),this._options={agent:null==t?void 0:t.agent,headers:null==t?void 0:t.headers},this._timeoutDuration="number"==typeof(null==t?void 0:t.timeoutDuration)?null==t?void 0:t.timeoutDuration:5e3,this._cooldownDuration="number"==typeof(null==t?void 0:t.cooldownDuration)?null==t?void 0:t.cooldownDuration:3e4,this._cacheMaxAge="number"==typeof(null==t?void 0:t.cacheMaxAge)?null==t?void 0:t.cacheMaxAge:6e5}coolingDown(){return"number"==typeof this._jwksTimestamp&&Date.now()<this._jwksTimestamp+this._cooldownDuration}fresh(){return"number"==typeof this._jwksTimestamp&&Date.now()<this._jwksTimestamp+this._cacheMaxAge}async getKey(e,t){this._jwks&&this.fresh()||await this.reload();try{return await super.getKey(e,t)}catch(r){if(r instanceof j&&!1===this.coolingDown())return await this.reload(),super.getKey(e,t);throw r}}async reload(){if(this._pendingFetch&&L())return new Promise((e=>{const t=()=>{void 0===this._pendingFetch?e():setTimeout(t,5)};t()}));this._pendingFetch||(this._pendingFetch=(async(e,t,r)=>{let a,s,i=!1;"function"==typeof AbortController&&(a=new AbortController,s=setTimeout((()=>{i=!0,a.abort()}),t));const n=await fetch(e.href,{signal:a?a.signal:void 0,redirect:"manual",headers:r.headers}).catch((e=>{if(i)throw new M;throw e}));if(void 0!==s&&clearTimeout(s),200!==n.status)throw new v("Expected 200 OK from the JSON Web Key Set HTTP response");try{return await n.json()}catch(e){throw new v("Failed to parse the JSON Web Key Set HTTP response as JSON")}})(this._url,this._timeoutDuration,this._options).then((e=>{if(!pt(e))throw new U("JSON Web Key Set malformed");this._jwks={keys:e.keys},this._jwksTimestamp=Date.now(),this._pendingFetch=void 0})).catch((e=>{throw this._pendingFetch=void 0,e}))),await this._pendingFetch}}function yt(e,t){return ft.prototype.getKey.bind(new ft(e,t))}class bt extends it{encode(){return`${y(JSON.stringify({alg:"none"}))}.${y(JSON.stringify(this._payload))}.`}static decode(e,t){if("string"!=typeof e)throw new _("Unsecured JWT must be a string");const{0:r,1:a,2:s,length:i}=e.split(".");if(3!==i||""!==s)throw new _("Invalid Unsecured JWT");let n;try{if(n=JSON.parse(u.decode(C(r))),"none"!==n.alg)throw new Error}catch(e){throw new _("Invalid Unsecured JWT")}return{payload:Ye(n,C(a),t),header:n}}}const Ct=y,vt=C;function St(e){let t;if("string"==typeof e){const r=e.split(".");3!==r.length&&5!==r.length||([t]=r)}else if("object"==typeof e&&e){if(!("protected"in e))throw new TypeError("Token does not contain a Protected Header");t=e.protected}try{if("string"!=typeof t||!t)throw new Error;const e=JSON.parse(u.decode(vt(t)));if(!te(e))throw new Error;return e}catch(e){throw new TypeError("Invalid Token or Protected Header formatting")}}function wt(e){if("string"!=typeof e)throw new _("JWTs must use Compact JWS serialization, JWT must be a string");const{1:t,length:r}=e.split(".");if(5===r)throw new _("Only JWTs using Compact JWS serialization can be decoded");if(3!==r)throw new _("Invalid JWT");if(!t)throw new _("JWTs must contain a payload");let a,s;try{a=vt(t)}catch(e){throw new _("Failed to parse the base64url encoded payload")}try{s=JSON.parse(u.decode(a))}catch(e){throw new _("Failed to parse the decoded payload as JSON")}if(!te(s))throw new _("Invalid JWT Claims Set");return s}function At(e){var t;const r=null!==(t=null==e?void 0:e.modulusLength)&&void 0!==t?t:2048;if("number"!=typeof r||r<2048)throw new P("Invalid or unsupported modulusLength option provided, 2048 bits or larger keys must be used");return r}async function Pt(e,t){return async function(e,t){var r,a,s;let n,o;switch(e){case"PS256":case"PS384":case"PS512":n={name:"RSA-PSS",hash:`SHA-${e.slice(-3)}`,publicExponent:new Uint8Array([1,0,1]),modulusLength:At(t)},o=["sign","verify"];break;case"RS256":case"RS384":case"RS512":n={name:"RSASSA-PKCS1-v1_5",hash:`SHA-${e.slice(-3)}`,publicExponent:new Uint8Array([1,0,1]),modulusLength:At(t)},o=["sign","verify"];break;case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":n={name:"RSA-OAEP",hash:`SHA-${parseInt(e.slice(-3),10)||1}`,publicExponent:new Uint8Array([1,0,1]),modulusLength:At(t)},o=["decrypt","unwrapKey","encrypt","wrapKey"];break;case"ES256":n={name:"ECDSA",namedCurve:"P-256"},o=["sign","verify"];break;case"ES384":n={name:"ECDSA",namedCurve:"P-384"},o=["sign","verify"];break;case"ES512":n={name:"ECDSA",namedCurve:"P-521"},o=["sign","verify"];break;case L()&&"EdDSA":switch(null==t?void 0:t.crv){case void 0:case"Ed25519":n={name:"NODE-ED25519",namedCurve:"NODE-ED25519"},o=["sign","verify"];break;default:throw new P("Invalid or unsupported crv option provided")}break;case"EdDSA":o=["sign","verify"];const s=null!==(r=null==t?void 0:t.crv)&&void 0!==r?r:"Ed25519";switch(s){case"Ed25519":case"Ed448":n={name:s};break;default:throw new P("Invalid or unsupported crv option provided")}break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":{o=["deriveKey","deriveBits"];const e=null!==(a=null==t?void 0:t.crv)&&void 0!==a?a:"P-256";switch(e){case"P-256":case"P-384":case"P-521":n={name:"ECDH",namedCurve:e};break;case"X25519":case"X448":n={name:e};break;default:throw new P("Invalid or unsupported crv option provided, supported values are P-256, P-384, P-521, X25519, and X448")}break}default:throw new P('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}return i.subtle.generateKey(n,null!==(s=null==t?void 0:t.extractable)&&void 0!==s&&s,o)}(e,t)}async function Et(e,t){return async function(e,t){var r;let a,s,n;switch(e){case"HS256":case"HS384":case"HS512":a=parseInt(e.slice(-3),10),s={name:"HMAC",hash:`SHA-${a}`,length:a},n=["sign","verify"];break;case"A128CBC-HS256":case"A192CBC-HS384":case"A256CBC-HS512":return a=parseInt(e.slice(-3),10),I(new Uint8Array(a>>3));case"A128KW":case"A192KW":case"A256KW":a=parseInt(e.slice(1,4),10),s={name:"AES-KW",length:a},n=["wrapKey","unwrapKey"];break;case"A128GCMKW":case"A192GCMKW":case"A256GCMKW":case"A128GCM":case"A192GCM":case"A256GCM":a=parseInt(e.slice(1,4),10),s={name:"AES-GCM",length:a},n=["encrypt","decrypt"];break;default:throw new P('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}return i.subtle.generateKey(s,null!==(r=null==t?void 0:t.extractable)&&void 0!==r&&r,n)}(e,t)}}},t={};function r(a){var s=t[a];if(void 0!==s)return s.exports;var i=t[a]={exports:{}};return e[a](i,i.exports,r),i.exports}r.d=(e,t)=>{for(var a in t)r.o(t,a)&&!r.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var a={};return(()=>{"use strict";var e=a;e.__esModule=!0;var t=G(r(2037));e.http=t.default,e.HttpResponse=t.HttpResponse,e.HttpMethod=t.HttpMethod;var s=G(r(5368));e.Endpoints=s.default,e.EndpointType=s.EndpointType;var i=r(6021);e.formatHttpError=i.formatHttpError,e.getCancelTokenSourceRequest=i.getCancelTokenSourceRequest;var n=r(6789);e.generateJWTToken=n.generateJWTToken,e.parseJwt=n.parseJwt;var o=r(2746);e.apiRequest=o.apiRequest;var c=r(735);e.urlParams=c.urlParams;var u=G(r(8634));e.AccountService=u.default,e.AccountApiClient=u.AccountApiClient,e.AccountApiClientInterface=u.AccountApiClientInterface;var l=G(r(707));e.CategoryService=l.default,e.CategoryApiClient=l.CategoryApiClient,e.CategoryApiClientInterface=l.CategoryApiClientInterface;var d=G(r(6527));e.CommentService=d.default,e.CommentApiClient=d.CommentApiClient,e.CommentApiClientInterface=d.CommentApiClientInterface;var p=G(r(9741));e.CustomAdvService=p.default,e.CustomAdvApiClient=p.CustomAdvApiClient,e.CustomAdvApiClientInterface=p.CustomAdvApiClientInterface;var h=G(r(4315));e.CustomMenuService=h.default,e.CustomMenuApiClient=h.CustomMenuApiClient,e.CustomMenuApiClientInterface=h.CustomMenuApiClientInterface;var m=G(r(9984));e.CustomPageService=m.default,e.CustomPageApiClient=m.CustomPageApiClient,e.CustomPageApiClientInterface=m.CustomPageApiClientInterface;var g=G(r(6560));e.DataPortabilityService=g.default,e.DataPortabilityApiClient=g.DataPortabilityApiClient,e.DataPortabilityApiClientInterface=g.DataPortabilityApiClientInterface;var f=G(r(13));e.EmbedService=f.default,e.EmbedApiClient=f.EmbedApiClient,e.EmbedApiClientInterface=f.EmbedApiClientInterface;var y=G(r(6334));e.FeatureService=y.default,e.FeatureApiClient=y.FeatureApiClient,e.FeatureApiClientInterface=y.FeatureApiClientInterface;var b=G(r(7980));e.FeedService=b.default,e.FeedApiClient=b.FeedApiClient,e.FeedApiClientInterface=b.FeedApiClientInterface;var C=G(r(5564));e.FeedObjectService=C.default,e.FeedObjectApiClient=C.FeedObjectApiClient,e.FeedObjectApiClientInterface=C.FeedObjectApiClientInterface;var v=G(r(6984));e.IncubatorService=v.default,e.IncubatorApiClient=v.IncubatorApiClient,e.IncubatorApiClientInterface=v.IncubatorApiClientInterface;var S=G(r(1415));e.InsightService=S.default,e.InsightApiClient=S.InsightApiClient,e.InsightApiClientInterface=S.InsightApiClientInterface;var w=G(r(922));e.InviteService=w.default,e.InviteApiClient=w.InviteApiClient,e.InviteApiClientInterface=w.InviteApiClientInterface;var A=G(r(507));e.LegalPageService=A.default,e.LegalPageApiClient=A.LegalPageApiClient,e.LegalPageApiClientInterface=A.LegalPageApiClientInterface;var P=G(r(5600));e.LocalityService=P.default,e.LocalityApiClient=P.LocalityApiClient,e.LocalityApiClientInterface=P.LocalityApiClientInterface;var E=G(r(9902));e.LoyaltyService=E.default,e.LoyaltyApiClient=E.LoyaltyApiClient,e.LoyaltyApiClientInterface=E.LoyaltyApiClientInterface;var R=G(r(4170));e.MediaService=R.default,e.MediaApiClient=R.MediaApiClient,e.MediaApiClientInterface=R.MediaApiClientInterface;var O=G(r(2123));e.ModerationService=O.default,e.ModerationApiClient=O.ModerationApiClient,e.ModerationApiClientInterface=O.ModerationApiClientInterface;var _=G(r(1584));e.NotificationService=_.default,e.NotificationApiClient=_.NotificationApiClient,e.NotificationApiClientInterface=_.NotificationApiClientInterface;var T=G(r(6329));e.PreferenceService=T.default,e.PreferenceApiClient=T.PreferenceApiClient,e.PreferenceApiClientInterface=T.PreferenceApiClientInterface;var U=G(r(8938));e.PrivateMessageService=U.default,e.PrivateMessageApiClient=U.PrivateMessageApiClient,e.PrivateMessageApiClientInterface=U.PrivateMessageApiClientInterface;var j=G(r(4524));e.PromoService=j.default,e.PromoApiClient=j.PromoApiClient,e.PromoApiClientInterface=j.PromoApiClientInterface;var k=G(r(6919));e.ScoreService=k.default,e.ScoreApiClient=k.ScoreApiClient,e.ScoreApiClientInterface=k.ScoreApiClientInterface;var M=G(r(5727));e.SSOService=M.default,e.SSOApiClient=M.SSOApiClient,e.SSOApiClientInterface=M.SSOApiClientInterface;var H=G(r(8086));e.SuggestionService=H.default,e.SuggestionApiClient=H.SuggestionApiClient,e.SuggestionApiClientInterface=H.SuggestionApiClientInterface;var I=G(r(5830));e.TagService=I.default,e.TagApiClient=I.TagApiClient,e.TagApiClientInterface=I.TagApiClientInterface;var $=G(r(671));e.UserService=$.default,e.UserApiClient=$.UserApiClient,e.UserApiClientInterface=$.UserApiClientInterface;var F=G(r(3796));e.WebhookService=F.default,e.WebhookApiClient=F.WebhookApiClient,e.WebhookApiClientInterface=F.WebhookApiClientInterface;var W=G(r(3661));e.ReactionService=W.default,e.ReactionApiClient=W.ReactionApiClient,e.ReactionApiClientInterface=W.ReactionApiClientInterface;var q=r(994);function L(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(L=function(e){return e?r:t})(e)}function G(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=L(t);if(r&&r.has(e))return r.get(e);var a={},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var n=s?Object.getOwnPropertyDescriptor(e,i):null;n&&(n.get||n.set)?Object.defineProperty(a,i,n):a[i]=e[i]}return a.default=e,r&&r.set(e,a),a}e.AccountCreateParams=q.AccountCreateParams,e.AccountVerifyParams=q.AccountVerifyParams,e.AccountResetParams=q.AccountResetParams,e.AccountRecoverParams=q.AccountRecoverParams,e.SCPaginatedResponse=q.SCPaginatedResponse,e.WebhookParamType=q.WebhookParamType,e.WebhookEventsType=q.WebhookEventsType,e.SSOSignUpParams=q.SSOSignUpParams,e.CommentListParams=q.CommentListParams,e.CommentCreateParams=q.CommentCreateParams,e.IncubatorCreateParams=q.IncubatorCreateParams,e.IncubatorSearchParams=q.IncubatorSearchParams,e.LoyaltyPrizeParams=q.LoyaltyPrizeParams,e.ModerationParams=q.ModerationParams,e.ModerateContributionParams=q.ModerateContributionParams,e.FlaggedContributionParams=q.FlaggedContributionParams,e.CustomNotificationParams=q.CustomNotificationParams,e.UserAutocompleteParams=q.UserAutocompleteParams,e.UserScoreParams=q.UserScoreParams,e.UserSearchParams=q.UserSearchParams,e.TagParams=q.TagParams,e.TagGetParams=q.TagGetParams,e.MediaCreateParams=q.MediaCreateParams,e.MediaTypes=q.MediaTypes,e.ChunkUploadParams=q.ChunkUploadParams,e.ChunkUploadCompleteParams=q.ChunkUploadCompleteParams,e.ThreadParams=q.ThreadParams,e.MessageCreateParams=q.MessageCreateParams,e.MessageMediaUploadParams=q.MessageMediaUploadParams,e.MessageThumbnailUploadParams=q.MessageThumbnailUploadParams,e.MessageChunkUploadDoneParams=q.MessageChunkUploadDoneParams,e.MessageMediaChunksParams=q.MessageMediaChunksParams,e.CategoryParams=q.CategoryParams,e.CustomAdvParams=q.CustomAdvParams,e.CustomPageParams=q.CustomPageParams,e.CustomPageSearchParams=q.CustomPageSearchParams,e.EmbedUpdateParams=q.EmbedUpdateParams,e.EmbedSearchParams=q.EmbedSearchParams,e.BaseGetParams=q.BaseGetParams,e.BaseSearchParams=q.BaseSearchParams,e.FeedObjGetParams=q.FeedObjGetParams,e.FeedObjCreateParams=q.FeedObjCreateParams,e.FeedObjectPollVotesSearch=q.FeedObjectPollVotesSearch,e.FeedParams=q.FeedParams,e.LegalPageFilterParams=q.LegalPageFilterParams,e.FeatureParams=q.FeatureParams,e.ScoreParams=q.ScoreParams,e.InsightContributionParams=q.InsightContributionParams,e.InsightUserParams=q.InsightUserParams,e.InsightEmbedParams=q.InsightEmbedParams,e.InsightCommonParams=q.InsightCommonParams,e.ReactionParams=q.ReactionParams})(),a})()));
|
|
2
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.SelfCommunityApiServices=t():e.SelfCommunityApiServices=t()}(self,(()=>(()=>{var e={9644:(e,t,r)=>{e.exports=r(5644)},353:(e,t,r)=>{"use strict";var a=r(3044),s=r(6955),i=r(2233),n=r(8030),o=r(7948),c=r(1875),u=r(842),l=r(8618),d=r(1439),p=r(6714);e.exports=function(e){return new Promise((function(t,r){var h,m=e.data,g=e.headers,f=e.responseType;function y(){e.cancelToken&&e.cancelToken.unsubscribe(h),e.signal&&e.signal.removeEventListener("abort",h)}a.isFormData(m)&&delete g["Content-Type"];var b=new XMLHttpRequest;if(e.auth){var C=e.auth.username||"",v=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";g.Authorization="Basic "+btoa(C+":"+v)}var S=o(e.baseURL,e.url);function w(){if(b){var a="getAllResponseHeaders"in b?c(b.getAllResponseHeaders()):null,i={data:f&&"text"!==f&&"json"!==f?b.response:b.responseText,status:b.status,statusText:b.statusText,headers:a,config:e,request:b};s((function(e){t(e),y()}),(function(e){r(e),y()}),i),b=null}}if(b.open(e.method.toUpperCase(),n(S,e.params,e.paramsSerializer),!0),b.timeout=e.timeout,"onloadend"in b?b.onloadend=w:b.onreadystatechange=function(){b&&4===b.readyState&&(0!==b.status||b.responseURL&&0===b.responseURL.indexOf("file:"))&&setTimeout(w)},b.onabort=function(){b&&(r(l("Request aborted",e,"ECONNABORTED",b)),b=null)},b.onerror=function(){r(l("Network Error",e,null,b)),b=null},b.ontimeout=function(){var t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",a=e.transitional||d.transitional;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),r(l(t,e,a.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",b)),b=null},a.isStandardBrowserEnv()){var A=(e.withCredentials||u(S))&&e.xsrfCookieName?i.read(e.xsrfCookieName):void 0;A&&(g[e.xsrfHeaderName]=A)}"setRequestHeader"in b&&a.forEach(g,(function(e,t){void 0===m&&"content-type"===t.toLowerCase()?delete g[t]:b.setRequestHeader(t,e)})),a.isUndefined(e.withCredentials)||(b.withCredentials=!!e.withCredentials),f&&"json"!==f&&(b.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&b.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&b.upload&&b.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(h=function(e){b&&(r(!e||e&&e.type?new p("canceled"):e),b.abort(),b=null)},e.cancelToken&&e.cancelToken.subscribe(h),e.signal&&(e.signal.aborted?h():e.signal.addEventListener("abort",h))),m||(m=null),b.send(m)}))}},5644:(e,t,r)=>{"use strict";var a=r(3044),s=r(3644),i=r(2215),n=r(2937),o=function e(t){var r=new i(t),o=s(i.prototype.request,r);return a.extend(o,i.prototype,r),a.extend(o,r),o.create=function(r){return e(n(t,r))},o}(r(1439));o.Axios=i,o.Cancel=r(6714),o.CancelToken=r(4089),o.isCancel=r(8041),o.VERSION=r(9241).version,o.all=function(e){return Promise.all(e)},o.spread=r(783),o.isAxiosError=r(5587),e.exports=o,e.exports.default=o},6714:e=>{"use strict";function t(e){this.message=e}t.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},t.prototype.__CANCEL__=!0,e.exports=t},4089:(e,t,r)=>{"use strict";var a=r(6714);function s(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;this.promise.then((function(e){if(r._listeners){var t,a=r._listeners.length;for(t=0;t<a;t++)r._listeners[t](e);r._listeners=null}})),this.promise.then=function(e){var t,a=new Promise((function(e){r.subscribe(e),t=e})).then(e);return a.cancel=function(){r.unsubscribe(t)},a},e((function(e){r.reason||(r.reason=new a(e),t(r.reason))}))}s.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},s.prototype.subscribe=function(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]},s.prototype.unsubscribe=function(e){if(this._listeners){var t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}},s.source=function(){var e;return{token:new s((function(t){e=t})),cancel:e}},e.exports=s},8041:e=>{"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},2215:(e,t,r)=>{"use strict";var a=r(3044),s=r(8030),i=r(946),n=r(6895),o=r(2937),c=r(7525),u=c.validators;function l(e){this.defaults=e,this.interceptors={request:new i,response:new i}}l.prototype.request=function(e){"string"==typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=o(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=e.transitional;void 0!==t&&c.assertOptions(t,{silentJSONParsing:u.transitional(u.boolean),forcedJSONParsing:u.transitional(u.boolean),clarifyTimeoutError:u.transitional(u.boolean)},!1);var r=[],a=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(a=a&&t.synchronous,r.unshift(t.fulfilled,t.rejected))}));var s,i=[];if(this.interceptors.response.forEach((function(e){i.push(e.fulfilled,e.rejected)})),!a){var l=[n,void 0];for(Array.prototype.unshift.apply(l,r),l=l.concat(i),s=Promise.resolve(e);l.length;)s=s.then(l.shift(),l.shift());return s}for(var d=e;r.length;){var p=r.shift(),h=r.shift();try{d=p(d)}catch(e){h(e);break}}try{s=n(d)}catch(e){return Promise.reject(e)}for(;i.length;)s=s.then(i.shift(),i.shift());return s},l.prototype.getUri=function(e){return e=o(this.defaults,e),s(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},a.forEach(["delete","get","head","options"],(function(e){l.prototype[e]=function(t,r){return this.request(o(r||{},{method:e,url:t,data:(r||{}).data}))}})),a.forEach(["post","put","patch"],(function(e){l.prototype[e]=function(t,r,a){return this.request(o(a||{},{method:e,url:t,data:r}))}})),e.exports=l},946:(e,t,r)=>{"use strict";var a=r(3044);function s(){this.handlers=[]}s.prototype.use=function(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1},s.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},s.prototype.forEach=function(e){a.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=s},7948:(e,t,r)=>{"use strict";var a=r(9192),s=r(8762);e.exports=function(e,t){return e&&!a(t)?s(e,t):t}},8618:(e,t,r)=>{"use strict";var a=r(1935);e.exports=function(e,t,r,s,i){var n=new Error(e);return a(n,t,r,s,i)}},6895:(e,t,r)=>{"use strict";var a=r(3044),s=r(8556),i=r(8041),n=r(1439),o=r(6714);function c(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new o("canceled")}e.exports=function(e){return c(e),e.headers=e.headers||{},e.data=s.call(e,e.data,e.headers,e.transformRequest),e.headers=a.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),a.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||n.adapter)(e).then((function(t){return c(e),t.data=s.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return i(t)||(c(e),t&&t.response&&(t.response.data=s.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},1935:e=>{"use strict";e.exports=function(e,t,r,a,s){return e.config=t,r&&(e.code=r),e.request=a,e.response=s,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,status:this.response&&this.response.status?this.response.status:null}},e}},2937:(e,t,r)=>{"use strict";var a=r(3044);e.exports=function(e,t){t=t||{};var r={};function s(e,t){return a.isPlainObject(e)&&a.isPlainObject(t)?a.merge(e,t):a.isPlainObject(t)?a.merge({},t):a.isArray(t)?t.slice():t}function i(r){return a.isUndefined(t[r])?a.isUndefined(e[r])?void 0:s(void 0,e[r]):s(e[r],t[r])}function n(e){if(!a.isUndefined(t[e]))return s(void 0,t[e])}function o(r){return a.isUndefined(t[r])?a.isUndefined(e[r])?void 0:s(void 0,e[r]):s(void 0,t[r])}function c(r){return r in t?s(e[r],t[r]):r in e?s(void 0,e[r]):void 0}var u={url:n,method:n,data:n,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:c};return a.forEach(Object.keys(e).concat(Object.keys(t)),(function(e){var t=u[e]||i,s=t(e);a.isUndefined(s)&&t!==c||(r[e]=s)})),r}},6955:(e,t,r)=>{"use strict";var a=r(8618);e.exports=function(e,t,r){var s=r.config.validateStatus;r.status&&s&&!s(r.status)?t(a("Request failed with status code "+r.status,r.config,null,r.request,r)):e(r)}},8556:(e,t,r)=>{"use strict";var a=r(3044),s=r(1439);e.exports=function(e,t,r){var i=this||s;return a.forEach(r,(function(r){e=r.call(i,e,t)})),e}},1439:(e,t,r)=>{"use strict";var a=r(3044),s=r(8868),i=r(1935),n={"Content-Type":"application/x-www-form-urlencoded"};function o(e,t){!a.isUndefined(e)&&a.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var c,u={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:(("undefined"!=typeof XMLHttpRequest||"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(c=r(353)),c),transformRequest:[function(e,t){return s(t,"Accept"),s(t,"Content-Type"),a.isFormData(e)||a.isArrayBuffer(e)||a.isBuffer(e)||a.isStream(e)||a.isFile(e)||a.isBlob(e)?e:a.isArrayBufferView(e)?e.buffer:a.isURLSearchParams(e)?(o(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):a.isObject(e)||t&&"application/json"===t["Content-Type"]?(o(t,"application/json"),function(e,t,r){if(a.isString(e))try{return(0,JSON.parse)(e),a.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional||u.transitional,r=t&&t.silentJSONParsing,s=t&&t.forcedJSONParsing,n=!r&&"json"===this.responseType;if(n||s&&a.isString(e)&&e.length)try{return JSON.parse(e)}catch(e){if(n){if("SyntaxError"===e.name)throw i(e,this,"E_JSON_PARSE");throw 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, */*"}}};a.forEach(["delete","get","head"],(function(e){u.headers[e]={}})),a.forEach(["post","put","patch"],(function(e){u.headers[e]=a.merge(n)})),e.exports=u},9241:e=>{e.exports={version:"0.23.0"}},3644:e=>{"use strict";e.exports=function(e,t){return function(){for(var r=new Array(arguments.length),a=0;a<r.length;a++)r[a]=arguments[a];return e.apply(t,r)}}},8030:(e,t,r)=>{"use strict";var a=r(3044);function s(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,r){if(!t)return e;var i;if(r)i=r(t);else if(a.isURLSearchParams(t))i=t.toString();else{var n=[];a.forEach(t,(function(e,t){null!=e&&(a.isArray(e)?t+="[]":e=[e],a.forEach(e,(function(e){a.isDate(e)?e=e.toISOString():a.isObject(e)&&(e=JSON.stringify(e)),n.push(s(t)+"="+s(e))})))})),i=n.join("&")}if(i){var o=e.indexOf("#");-1!==o&&(e=e.slice(0,o)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}},8762:e=>{"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},2233:(e,t,r)=>{"use strict";var a=r(3044);e.exports=a.isStandardBrowserEnv()?{write:function(e,t,r,s,i,n){var o=[];o.push(e+"="+encodeURIComponent(t)),a.isNumber(r)&&o.push("expires="+new Date(r).toGMTString()),a.isString(s)&&o.push("path="+s),a.isString(i)&&o.push("domain="+i),!0===n&&o.push("secure"),document.cookie=o.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(){}}},9192:e=>{"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},5587:e=>{"use strict";e.exports=function(e){return"object"==typeof e&&!0===e.isAxiosError}},842:(e,t,r)=>{"use strict";var a=r(3044);e.exports=a.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function s(e){var a=e;return t&&(r.setAttribute("href",a),a=r.href),r.setAttribute("href",a),{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=s(window.location.href),function(t){var r=a.isString(t)?s(t):t;return r.protocol===e.protocol&&r.host===e.host}}():function(){return!0}},8868:(e,t,r)=>{"use strict";var a=r(3044);e.exports=function(e,t){a.forEach(e,(function(r,a){a!==t&&a.toUpperCase()===t.toUpperCase()&&(e[t]=r,delete e[a])}))}},1875:(e,t,r)=>{"use strict";var a=r(3044),s=["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"];e.exports=function(e){var t,r,i,n={};return e?(a.forEach(e.split("\n"),(function(e){if(i=e.indexOf(":"),t=a.trim(e.substr(0,i)).toLowerCase(),r=a.trim(e.substr(i+1)),t){if(n[t]&&s.indexOf(t)>=0)return;n[t]="set-cookie"===t?(n[t]?n[t]:[]).concat([r]):n[t]?n[t]+", "+r:r}})),n):n}},783:e=>{"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},7525:(e,t,r)=>{"use strict";var a=r(9241).version,s={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){s[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}}));var i={};s.transitional=function(e,t,r){function s(e,t){return"[Axios v"+a+"] Transitional option '"+e+"'"+t+(r?". "+r:"")}return function(r,a,n){if(!1===e)throw new Error(s(a," has been removed"+(t?" in "+t:"")));return t&&!i[a]&&(i[a]=!0,console.warn(s(a," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,a,n)}},e.exports={assertOptions:function(e,t,r){if("object"!=typeof e)throw new TypeError("options must be an object");for(var a=Object.keys(e),s=a.length;s-- >0;){var i=a[s],n=t[i];if(n){var o=e[i],c=void 0===o||n(o,i,e);if(!0!==c)throw new TypeError("option "+i+" must be "+c)}else if(!0!==r)throw Error("Unknown option "+i)}},validators:s}},3044:(e,t,r)=>{"use strict";var a=r(3644),s=Object.prototype.toString;function i(e){return"[object Array]"===s.call(e)}function n(e){return void 0===e}function o(e){return null!==e&&"object"==typeof e}function c(e){if("[object Object]"!==s.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function u(e){return"[object Function]"===s.call(e)}function l(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),i(e))for(var r=0,a=e.length;r<a;r++)t.call(null,e[r],r,e);else for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.call(null,e[s],s,e)}e.exports={isArray:i,isArrayBuffer:function(e){return"[object ArrayBuffer]"===s.call(e)},isBuffer:function(e){return null!==e&&!n(e)&&null!==e.constructor&&!n(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:o,isPlainObject:c,isUndefined:n,isDate:function(e){return"[object Date]"===s.call(e)},isFile:function(e){return"[object File]"===s.call(e)},isBlob:function(e){return"[object Blob]"===s.call(e)},isFunction:u,isStream:function(e){return o(e)&&u(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:l,merge:function e(){var t={};function r(r,a){c(t[a])&&c(r)?t[a]=e(t[a],r):c(r)?t[a]=e({},r):i(r)?t[a]=r.slice():t[a]=r}for(var a=0,s=arguments.length;a<s;a++)l(arguments[a],r);return t},extend:function(e,t,r){return l(t,(function(t,s){e[s]=r&&"function"==typeof t?a(t,r):t})),e},trim:function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e}}},2037:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=t.ApiClient=void 0;var a,s=(a=r(9644))&&a.__esModule?a:{default:a};class i{createClient(e){return s.default.create(Object.assign({},e&&e.baseURL&&{baseURL:e.baseURL},{responseType:"json",headers:Object.assign({},e&&e.accessToken&&{Authorization:`Token ${e.accessToken}`}),timeout:i.DEFAULT_TIMEOUT}))}constructor(e){this.setDefaultHeader=({name:e,value:t,methods:r})=>{const a=this.client.defaults.headers;Array.isArray(r)?r.forEach((r=>{a[r]&&(a[r][e]=t)})):a.common[e]=t},this.deleteDefaultHeader=({name:e,methods:t})=>{const r=this.client.defaults.headers;Array.isArray(t)?t.forEach((t=>{r[t]&&delete r[t][e]})):delete r.common[e]},this.client=this.createClient(e),this.setDefaultHeader({name:"Content-Type",value:"application/x-www-form-urlencoded",methods:["post"]})}getClientInstance(){return this.client}config(e){this.client(e)}setSupportWithCredentials(e){this.client.defaults.withCredentials=e}setBasePortal(e){this.client.defaults.baseURL=e}setAuthorizeToken(e){e?this.setDefaultHeader({name:"Authorization",value:`Bearer ${e}`}):this.deleteDefaultHeader({name:"Authorization"})}request(e){return this.client.request(e)}get(e,t){return this.client.get(e,t)}post(e,t,r){return r?this.client.post(e,t,r):this.client.post(e,t)}patch(e,t){return this.client.patch(e,t)}put(e,t){return this.client.put(e,t)}}t.ApiClient=i,i.DEFAULT_TIMEOUT=1e4;var n=new i;t.default=n},5368:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=void 0;var a=r(2990),s={AccountCreate:{url:(0,a.urlReplacer)("/api/v2/account/create/"),method:"POST"},AccountVerify:{url:(0,a.urlReplacer)("/api/v2/account/verify/"),method:"POST"},AccountRecover:{url:(0,a.urlReplacer)("/api/v2/account/recover/"),method:"POST"},AccountReset:{url:(0,a.urlReplacer)("/api/v2/account/reset/"),method:"POST"},AccountSearch:{url:(0,a.urlReplacer)("/api/v2/account/search/"),method:"GET"},InviteCode:{url:(0,a.urlReplacer)("/api/v2/invite_code/$(code)/"),method:"GET"},PromoCode:{url:(0,a.urlReplacer)("/api/v2/promo_code/$(code)/"),method:"GET"},OAuthToken:{url:(0,a.urlReplacer)("/oauth/token/"),method:"POST"},Preferences:{url:(0,a.urlReplacer)("/api/v2/dynamic_preference/"),method:"GET"},GetPreference:{url:(0,a.urlReplacer)("/api/v2/dynamic_preference/$(id)/"),method:"GET"},SignIn:{url:(0,a.urlReplacer)("/api/v2/sso/signin/"),method:"POST"},SignUp:{url:(0,a.urlReplacer)("/api/v2/sso/signup/"),method:"POST"},Feature:{url:(0,a.urlReplacer)("/api/v2/feature/"),method:"GET"},FeedObjectList:{url:(0,a.urlReplacer)("/api/v2/$(type)/"),method:"GET"},FeedObjectsUncommented:{url:(0,a.urlReplacer)("/api/v2/$(type)/uncommented/"),method:"GET"},SearchFeedObject:{url:(0,a.urlReplacer)("/api/v2/$(type)/search/"),method:"GET"},CreateFeedObject:{url:(0,a.urlReplacer)("/api/v2/$(type)/"),method:"POST"},FeedObject:{url:(0,a.urlReplacer)("/api/v2/$(type)/$(id)/"),method:"GET"},UpdateFeedObject:{url:(0,a.urlReplacer)("/api/v2/$(type)/$(id)/"),method:"PUT"},DeleteFeedObject:{url:(0,a.urlReplacer)("/api/v2/$(type)/$(id)/"),method:"DELETE"},FeedObjectContributorsList:{url:(0,a.urlReplacer)("/api/v2/$(type)/$(id)/contributors/"),method:"GET"},FeedObjectSharesList:{url:(0,a.urlReplacer)("/api/v2/$(type)/$(id)/shares/"),method:"GET"},FeedObjectUserSharesList:{url:(0,a.urlReplacer)("/api/v2/$(type)/$(id)/shares_users/"),method:"GET"},RestoreFeedObject:{url:(0,a.urlReplacer)("/api/v2/$(type)/$(id)/restore/"),method:"POST"},RelatedFeedObjects:{url:(0,a.urlReplacer)("/api/v2/$(type)/$(id)/related/"),method:"GET"},HideFeedObject:{url:(0,a.urlReplacer)("/api/v2/$(type)/$(id)/hide/"),method:"POST"},FeedObjectHideStatus:{url:(0,a.urlReplacer)("/api/v2/$(type)/$(id)/hide/status/"),method:"GET"},CheckIfFollowingFeedObject:{url:(0,a.urlReplacer)("/api/v2/$(type)/$(id)/following/"),method:"GET"},FeedObjectFollowingList:{url:(0,a.urlReplacer)("/api/v2/$(type)/following/"),method:"GET"},FeedObjectFlagList:{url:(0,a.urlReplacer)("/api/v2/$(type)/$(id)/flag/"),method:"POST"},Comment:{url:(0,a.urlReplacer)("/api/v2/comment/$(id)/"),method:"GET"},NewComment:{url:(0,a.urlReplacer)("/api/v2/comment/"),method:"POST"},UpdateComment:{url:(0,a.urlReplacer)("/api/v2/comment/$(id)/"),method:"PUT"},DeleteComment:{url:(0,a.urlReplacer)("/api/v2/comment/$(id)/"),method:"DELETE"},RestoreComment:{url:(0,a.urlReplacer)("/api/v2/comment/$(id)/restore/"),method:"POST"},Comments:{url:(0,a.urlReplacer)("/api/v2/comment/"),method:"GET"},CommentVote:{url:(0,a.urlReplacer)("/api/v2/comment/$(id)/vote/"),method:"POST"},CommentVotesList:{url:(0,a.urlReplacer)("/api/v2/comment/$(id)/vote/"),method:"GET"},CommentRestore:{url:(0,a.urlReplacer)("/api/v2/comment/$(id)/restore"),method:"POST"},CommentFlagList:{url:(0,a.urlReplacer)("/api/v2/comment/$(id)/flag/"),method:"GET"},FlagComment:{url:(0,a.urlReplacer)("/api/v2/comment/$(id)/flag/"),method:"POST"},CommentFlagStatus:{url:(0,a.urlReplacer)("/api/v2/comment/$(id)/flag/status/"),method:"GET"},FlagStatus:{url:(0,a.urlReplacer)("/api/v2/$(type)/$(id)/flag/status/"),method:"GET"},Flag:{url:(0,a.urlReplacer)("/api/v2/$(type)/$(id)/flag/"),method:"POST"},CategoryList:{url:(0,a.urlReplacer)("/api/v2/category/"),method:"GET"},SearchCategory:{url:(0,a.urlReplacer)("/api/v2/category/search/"),method:"GET"},CreateCategory:{url:(0,a.urlReplacer)("/api/v2/category/"),method:"POST"},UpdateCategory:{url:(0,a.urlReplacer)("/api/v2/category/$(id)/"),method:"PUT"},PatchCategory:{url:(0,a.urlReplacer)("/api/v2/category/$(id)/"),method:"PATCH"},DeleteCategory:{url:(0,a.urlReplacer)("/api/v2/category/$(id)/"),method:"DELETE"},CategoryAudience:{url:(0,a.urlReplacer)("/api/v2/category/$(id)/audience/"),method:"GET"},Category:{url:(0,a.urlReplacer)("/api/v2/category/$(id)/"),method:"GET"},CategoriesFollowed:{url:(0,a.urlReplacer)("/api/v2/category/followed/"),method:"GET"},CategoryFollowers:{url:(0,a.urlReplacer)("/api/v2/category/$(id)/followers/"),method:"GET"},CategoryTrendingFeed:{url:(0,a.urlReplacer)("/api/v2/category/$(id)/feed/trending/"),method:"GET"},CategoryTrendingPeople:{url:(0,a.urlReplacer)("/api/v2/category/$(id)/followers/trending/"),method:"GET"},FollowCategory:{url:(0,a.urlReplacer)("/api/v2/category/$(id)/follow/"),method:"POST"},CheckCategoryIsFollowed:{url:(0,a.urlReplacer)("/api/v2/category/$(id)/is_followed/"),method:"GET"},PopularCategories:{url:(0,a.urlReplacer)("/api/v2/category/popular/"),method:"GET"},TagsList:{url:(0,a.urlReplacer)("/api/v2/tag/"),method:"GET"},CreateTag:{url:(0,a.urlReplacer)("/api/v2/tag/"),method:"POST"},SearchTag:{url:(0,a.urlReplacer)("/api/v2/tag/"),method:"GET"},Tag:{url:(0,a.urlReplacer)("/api/v2/tag/$(id)/"),method:"GET"},UpdateTag:{url:(0,a.urlReplacer)("/api/v2/tag/$(id)/"),method:"PUT"},PatchTag:{url:(0,a.urlReplacer)("/api/v2/tag/$(id)/"),method:"PATCH"},AssignTag:{url:(0,a.urlReplacer)("/api/v2/tag/$(id)/assign/"),method:"POST"},UserList:{url:(0,a.urlReplacer)("/api/v2/user/"),method:"GET"},ListHiddenUsers:{url:(0,a.urlReplacer)("/api/v2/user/hidden_users/"),method:"GET"},UserAutocomplete:{url:(0,a.urlReplacer)("/api/v2/user/autocomplete/"),method:"GET"},UserSearch:{url:(0,a.urlReplacer)("/api/v2/user/search/"),method:"GET"},User:{url:(0,a.urlReplacer)("/api/v2/user/$(id)/"),method:"GET"},UserCounters:{url:(0,a.urlReplacer)("/api/v2/user/$(id)/counters/"),method:"GET"},UserUpdate:{url:(0,a.urlReplacer)("/api/v2/user/$(id)/"),method:"PUT"},UserPatch:{url:(0,a.urlReplacer)("/api/v2/user/$(id)/"),method:"PATCH"},UserDelete:{url:(0,a.urlReplacer)("/api/v2/user/$(id)/"),method:"DELETE"},ChangeUserMail:{url:(0,a.urlReplacer)("/api/v2/user/$(id)/change_email/"),method:"PATCH"},ConfirmUserChangeMail:{url:(0,a.urlReplacer)("/api/v2/user/$(id)/confirm_email/"),method:"POST"},ChangeUserPassword:{url:(0,a.urlReplacer)("/api/v2/user/$(id)/change_password/"),method:"PATCH"},UserSettings:{url:(0,a.urlReplacer)("/api/v2/user/$(id)/settings/"),method:"GET"},UserSettingsPatch:{url:(0,a.urlReplacer)("/api/v2/user/$(id)/settings/"),method:"PATCH"},Me:{url:(0,a.urlReplacer)("/api/v2/user/me/"),method:"GET"},MyAvatar:{url:(0,a.urlReplacer)("/api/v2/user/me/avatar/"),method:"GET"},Permission:{url:(0,a.urlReplacer)("/api/v2/user/me/permission/"),method:"GET"},Platform:{url:(0,a.urlReplacer)("/api/v2/user/me/platform_url/"),method:"GET"},FollowedCategories:{url:(0,a.urlReplacer)("/api/v2/user/$(id)/categories/"),method:"GET"},UserFollowers:{url:(0,a.urlReplacer)("/api/v2/user/$(id)/followers/"),method:"GET"},UserFollowings:{url:(0,a.urlReplacer)("/api/v2/user/$(id)/followings/"),method:"GET"},FollowUser:{url:(0,a.urlReplacer)("/api/v2/user/$(id)/follow/"),method:"POST"},CheckUserFollowed:{url:(0,a.urlReplacer)("/api/v2/user/$(id)/is_followed/"),method:"GET"},CheckUserFollower:{url:(0,a.urlReplacer)("/api/v2/user/$(id)/is_follower/"),method:"GET"},UserConnections:{url:(0,a.urlReplacer)("/api/v2/user/$(id)/connections/"),method:"GET"},UserCheckConnection:{url:(0,a.urlReplacer)("/api/v2/user/$(id)/is_connection/"),method:"GET"},UserConnectionRequests:{url:(0,a.urlReplacer)("/api/v2/user/$(id)/connection/requests/"),method:"GET"},UserRequestConnectionsSent:{url:(0,a.urlReplacer)("/api/v2/user/$(id)/connection/requests_sent/"),method:"GET"},UserAcceptRequestConnection:{url:(0,a.urlReplacer)("/api/v2/user/$(id)/connection/accept/"),method:"POST"},UserRequestConnection:{url:(0,a.urlReplacer)("/api/v2/user/$(id)/connection/request/"),method:"POST"},UserRemoveConnection:{url:(0,a.urlReplacer)("/api/v2/user/$(id)/connection/remove/"),method:"POST"},UserCancelRejectConnectionRequest:{url:(0,a.urlReplacer)("/api/v2/user/$(id)/connection/cancel_reject/"),method:"POST"},UserCancelRequestConnection:{url:(0,a.urlReplacer)("/api/v2/user/$(id)/connection/cancel_request/"),method:"POST"},UserRejectConnectionRequest:{url:(0,a.urlReplacer)("/api/v2/user/$(id)/connection/reject/"),method:"POST"},UserMarkSeenConnectionRequest:{url:(0,a.urlReplacer)("/api/v2/user/$(id)/connection_requests/mark_seen/"),method:"POST"},UserShowHide:{url:(0,a.urlReplacer)("/api/v2/user/$(id)/hide/"),method:"POST"},CheckUserHidden:{url:(0,a.urlReplacer)("/api/v2/user/$(id)/is_hidden/"),method:"GET"},CheckUserHiddenBy:{url:(0,a.urlReplacer)("/api/v2/user/$(id)/is_hidden_by/"),method:"GET"},GetUserLoyaltyPoints:{url:(0,a.urlReplacer)("/api/v2/user/$(id)/loyalty/points/"),method:"GET"},UserConnectionStatuses:{url:(0,a.urlReplacer)("/api/v2/user/connection/statuses/"),method:"POST"},UserTagToAddressContribution:{url:(0,a.urlReplacer)("/api/v2/user/tag/tags_to_address_a_contribution/"),method:"GET"},CheckEmailToken:{url:(0,a.urlReplacer)("/api/v2/user/$(id)/check_email_token/"),method:"GET"},AddAvatar:{url:(0,a.urlReplacer)("/api/v2/user/avatar/"),method:"POST"},GetAvatars:{url:(0,a.urlReplacer)("/api/v2/user/avatar/"),method:"GET"},RemoveAvatar:{url:(0,a.urlReplacer)("/api/v2/user/avatar/"),method:"DELETE"},SetPrimaryAvatar:{url:(0,a.urlReplacer)("/api/v2/user/avatar/"),method:"PATCH"},ProviderAssociations:{url:(0,a.urlReplacer)("/api/v2/user/$(id)/provider/"),method:"GET"},CreateProviderAssociation:{url:(0,a.urlReplacer)("/api/v2/user/$(id)/provider/"),method:"POST"},DeleteProviderAssociation:{url:(0,a.urlReplacer)("/api/v2/user/$(id)/provider/"),method:"DELETE"},BroadcastMessagesList:{url:(0,a.urlReplacer)("/api/v2/notification/banner/"),method:"GET"},BroadcastMessagesMarkRead:{url:(0,a.urlReplacer)("/api/v2/notification/banner/read/"),method:"POST"},BroadcastMessagesDispose:{url:(0,a.urlReplacer)("/api/v2/notification/banner/dispose/"),method:"POST"},BroadcastMessagesUnseenCount:{url:(0,a.urlReplacer)("/api/v2/notification/banner/unseen/count/"),method:"GET"},BroadcastMessagesUndisposedCount:{url:(0,a.urlReplacer)("/api/v2/notification/banner/undisposed/count/"),method:"GET"},UserNotificationList:{url:(0,a.urlReplacer)("/api/v2/notification/"),method:"GET"},UserMarkReadNotification:{url:(0,a.urlReplacer)("/api/v2/notification/read/"),method:"POST"},UserUnseenNotificationCount:{url:(0,a.urlReplacer)("/api/v2/notification/unseen/count/"),method:"GET"},CreateCustomNotification:{url:(0,a.urlReplacer)("/api/v2/notification/notify/"),method:"POST"},UserSuspendContributionNotification:{url:(0,a.urlReplacer)("/api/v2/$(type)/$(id)/suspend/"),method:"POST"},UserCheckContributionNotificationSuspended:{url:(0,a.urlReplacer)("/api/v2/$(type)/$(id)/suspended/"),method:"GET"},UserListContributionNotificationSuspended:{url:(0,a.urlReplacer)("/api/v2/$(type)/suspended/"),method:"GET"},CategoriesSuggestion:{url:(0,a.urlReplacer)("/api/v2/suggestion/category/"),method:"GET"},GetIncubatorSuggestion:{url:(0,a.urlReplacer)("/api/v2/suggestion/incubator/"),method:"GET"},PollSuggestion:{url:(0,a.urlReplacer)("/api/v2/suggestion/poll/"),method:"GET"},UserSuggestion:{url:(0,a.urlReplacer)("/api/v2/suggestion/user/"),method:"GET"},SearchSuggestion:{url:(0,a.urlReplacer)("/api/v2/suggestion/"),method:"GET"},FollowContribution:{url:(0,a.urlReplacer)("/api/v2/$(type)/$(id)/follow/"),method:"POST"},Vote:{url:(0,a.urlReplacer)("/api/v2/$(type)/$(id)/vote/"),method:"POST"},VotesList:{url:(0,a.urlReplacer)("/api/v2/$(type)/$(id)/vote/"),method:"GET"},ShareUsersList:{url:(0,a.urlReplacer)("/api/v2/$(type)/$(id)/shares_users/"),method:"GET"},PollVote:{url:(0,a.urlReplacer)("/api/v2/$(type)/$(id)/poll/vote/"),method:"POST"},PollVotesList:{url:(0,a.urlReplacer)("/api/v2/$(type)/$(id)/poll/vote/"),method:"GET"},Contributors:{url:(0,a.urlReplacer)("/api/v2/$(type)/$(id)/contributors/"),method:"GET"},GetPrizes:{url:(0,a.urlReplacer)("/api/v2/loyalty/prize/"),method:"GET"},CreatePrize:{url:(0,a.urlReplacer)("/api/v2/loyalty/prize/"),method:"POST"},GetSpecificPrize:{url:(0,a.urlReplacer)("/api/v2/loyalty/prize/$(id)/"),method:"GET"},UpdatePrize:{url:(0,a.urlReplacer)("/api/v2/loyalty/prize/$(id)/"),method:"PUT"},PatchPrize:{url:(0,a.urlReplacer)("/api/v2/loyalty/prize/$(id)/"),method:"PATCH"},GetPrizeRequests:{url:(0,a.urlReplacer)("/api/v2/loyalty/request/"),method:"GET"},CreatePrizeRequest:{url:(0,a.urlReplacer)("/api/v2/loyalty/request/"),method:"POST"},GetSpecificPrizeRequest:{url:(0,a.urlReplacer)("/api/v2/loyalty/request/$(id)/"),method:"GET"},PatchPrizeRequest:{url:(0,a.urlReplacer)("/api/v2/loyalty/request/$(id)/"),method:"PATCH"},Composer:{url:(0,a.urlReplacer)("/api/v2/$(type)/"),method:"POST"},ComposerEdit:{url:(0,a.urlReplacer)("/api/v2/$(type)/$(id)/"),method:"PUT"},ComposerChunkUploadMedia:{url:(0,a.urlReplacer)("/api/v2/media/upload/chunk/"),method:"POST"},ComposerChunkUploadMediaComplete:{url:(0,a.urlReplacer)("/api/v2/media/upload/complete/"),method:"POST"},ComposerMediaCreate:{url:(0,a.urlReplacer)("/api/v2/media/"),method:"POST"},ComposerCategoryList:{url:(0,a.urlReplacer)("/api/v2/category/"),method:"GET"},ComposerAddressingTagList:{url:(0,a.urlReplacer)("/api/v2/user/tag/tags_to_address_a_contribution/"),method:"GET"},ComposerLocalitySearch:{url:(0,a.urlReplacer)("/api/v2/locality/search/"),method:"GET"},GetMedia:{url:(0,a.urlReplacer)("/api/v2/media/$(id)/"),method:"GET"},UpdateMedia:{url:(0,a.urlReplacer)("/api/v2/media/$(id)/"),method:"PUT"},DeleteMedia:{url:(0,a.urlReplacer)("/api/v2/media/$(id)/"),method:"DELETE"},MediaClickTracker:{url:(0,a.urlReplacer)("/api/v2/media/$(id)/click/"),method:"POST"},GetLocalities:{url:(0,a.urlReplacer)("/api/v2/locality/"),method:"GET"},CustomAdvList:{url:(0,a.urlReplacer)("/api/v2/custom_adv/"),method:"GET"},CustomAdv:{url:(0,a.urlReplacer)("/api/v2/custom_adv/$(id)/"),method:"GET"},CustomAdvSearch:{url:(0,a.urlReplacer)("/api/v2/custom_adv/search/"),method:"GET"},MainFeed:{url:(0,a.urlReplacer)("/api/v2/feed/"),method:"GET"},MainFeedUnseenCount:{url:(0,a.urlReplacer)("/api/v2/feed/unseen/count/"),method:"GET"},FeedObjectMarkRead:{url:(0,a.urlReplacer)("/api/v2/feed/read/"),method:"POST"},ExploreFeed:{url:(0,a.urlReplacer)("/api/v2/feed/explore/"),method:"GET"},FeedLikeThese:{url:(0,a.urlReplacer)("/api/v2/feed/likethis/"),method:"POST"},CategoryFeed:{url:(0,a.urlReplacer)("/api/v2/category/$(id)/feed/"),method:"GET"},UserFeed:{url:(0,a.urlReplacer)("/api/v2/user/$(id)/feed/"),method:"GET"},EmbedFeed:{url:(0,a.urlReplacer)("/api/v2/embed/feed/"),method:"GET"},EmbedList:{url:(0,a.urlReplacer)("/api/v2/embed/"),method:"GET"},EmbedCreate:{url:(0,a.urlReplacer)("/api/v2/embed/"),method:"POST"},EmbedSearch:{url:(0,a.urlReplacer)("/api/v2/embed/search/"),method:"GET"},Embed:{url:(0,a.urlReplacer)("/api/v2/embed/$(id)/"),method:"GET"},UpdateEmbed:{url:(0,a.urlReplacer)("/api/v2/embed/$(id)/"),method:"PUT"},PatchEmbed:{url:(0,a.urlReplacer)("/api/v2/embed/$(id)/"),method:"PATCH"},SpecificEmbedFeed:{url:(0,a.urlReplacer)("/api/v2/embed/$(id)/feed/"),method:"GET"},GetSnippets:{url:(0,a.urlReplacer)("/api/v2/pm/"),method:"GET"},GetASingleMessage:{url:(0,a.urlReplacer)("/api/v2/pm/$(id)/"),method:"GET"},SendMessage:{url:(0,a.urlReplacer)("/api/v2/pm/"),method:"POST"},GetAThread:{url:(0,a.urlReplacer)("/api/v2/pm/"),method:"GET"},PrivateMessageUploadMedia:{url:(0,a.urlReplacer)("/api/v2/pm/upload/"),method:"POST"},PrivateMessageUploadThumbnail:{url:(0,a.urlReplacer)("/api/v2/pm/upload/"),method:"POST"},PrivateMessageUploadMediaInChunks:{url:(0,a.urlReplacer)("/api/v2/pm/upload/"),method:"POST"},PrivateMessageChunkUploadDone:{url:(0,a.urlReplacer)("/api/v2/pm/upload/?done"),method:"POST"},DeleteASingleMessage:{url:(0,a.urlReplacer)("/api/v2/pm/$(id)/"),method:"DELETE"},DeleteAThread:{url:(0,a.urlReplacer)("/api/v2/pm/"),method:"DELETE"},PrivateMessageSearchUser:{url:(0,a.urlReplacer)("/api/v2/pm/search/?user=$(search)"),method:"GET"},Device:{url:(0,a.urlReplacer)("/api/v2/device/$(type)/$(id)/"),method:"GET"},NewDevice:{url:(0,a.urlReplacer)("/api/v2/device/$(type)/"),method:"POST"},DeleteDevice:{url:(0,a.urlReplacer)("/api/v2/device/$(type)/$(id)/"),method:"DELETE"},UsersForModeration:{url:(0,a.urlReplacer)("/api/v2/moderation/user/"),method:"GET"},ModerateUser:{url:(0,a.urlReplacer)("/api/v2/moderation/user/$(id)/"),method:"PATCH"},FlaggedContributions:{url:(0,a.urlReplacer)("/api/v2/moderation/contribution/"),method:"GET"},FlagsForSpecificContribution:{url:(0,a.urlReplacer)("/api/v2/moderation/contribution/$(id)/flag/?contribution_type=$(contribution_type)"),method:"GET"},ModerateContribution:{url:(0,a.urlReplacer)("/api/v2/moderation/contribution/$(id)/"),method:"PATCH"},ModerateContributionStatus:{url:(0,a.urlReplacer)("/api/v2/moderation/contribution/$(id)/status/?contribution_type=$(contribution_type)"),method:"GET"},InsightBestContribution:{url:(0,a.urlReplacer)("/api/v2/insight/contribution/"),method:"GET"},InsightBestEmbed:{url:(0,a.urlReplacer)("/api/v2/insight/embed/"),method:"GET"},InsightBestUser:{url:(0,a.urlReplacer)("/api/v2/insight/user/"),method:"GET"},InsightContributionCounter:{url:(0,a.urlReplacer)("/api/v2/insight/contribution/counters/?contribution_id=$(id)"),method:"GET"},InsightEmbedCounter:{url:(0,a.urlReplacer)("/api/v2/insight/embed/counters/?embed_type=$(type)&embed_id=$(id)"),method:"GET"},InsightUserCounter:{url:(0,a.urlReplacer)("/api/v2/insight/user/counters/?user_id=$(id)"),method:"GET"},GetAllIncubators:{url:(0,a.urlReplacer)("/api/v2/incubator/"),method:"GET"},SearchIncubators:{url:(0,a.urlReplacer)("/api/v2/incubator/search/"),method:"GET"},GetASpecificIncubator:{url:(0,a.urlReplacer)("/api/v2/incubator/$(id)/"),method:"GET"},CheckIncubatorSubscription:{url:(0,a.urlReplacer)("/api/v2/incubator/$(id)/subscribed/"),method:"GET"},SubscribeToIncubator:{url:(0,a.urlReplacer)("/api/v2/incubator/$(id)/subscribe/"),method:"POST"},CreateAnIncubator:{url:(0,a.urlReplacer)("/api/v2/incubator/"),method:"POST"},GetIncubatorSubscribers:{url:(0,a.urlReplacer)("/api/v2/incubator/$(id)/subscribers/"),method:"GET"},GetCustomMenus:{url:(0,a.urlReplacer)("/api/v2/custom_menu/"),method:"GET"},CustomMenu:{url:(0,a.urlReplacer)("/api/v2/custom_menu/$(id)/"),method:"GET"},CustomMenuSearch:{url:(0,a.urlReplacer)("/api/v2/custom_menu/search/"),method:"GET"},GetCustomPages:{url:(0,a.urlReplacer)("/api/v2/custom_page/"),method:"GET"},CustomPage:{url:(0,a.urlReplacer)("/api/v2/custom_page/$(id)/"),method:"GET"},CustomPageSearch:{url:(0,a.urlReplacer)("/api/v2/custom_page/search/"),method:"GET"},LegalPage:{url:(0,a.urlReplacer)("/api/v2/legal_page/$(id)/"),method:"GET"},GetLegalPages:{url:(0,a.urlReplacer)("/api/v2/legal_page/"),method:"GET"},SearchLegalPages:{url:(0,a.urlReplacer)("/api/v2/legal_page/search/"),method:"GET"},LegalPagesLastRevision:{url:(0,a.urlReplacer)("/api/v2/legal_page/last_revisions/"),method:"GET"},LegalPageLastRevision:{url:(0,a.urlReplacer)("/api/v2/legal_page/$(policy)/"),method:"GET"},LegalPageRevisions:{url:(0,a.urlReplacer)("/api/v2/legal_page/$(policy)/revisions/"),method:"GET"},AckLegalPage:{url:(0,a.urlReplacer)("/api/v2/legal_page/$(id)/ack/"),method:"POST"},SpecificUserAck:{url:(0,a.urlReplacer)("/api/v2/legal_page/$(id)/user_ack/"),method:"GET"},UserAckList:{url:(0,a.urlReplacer)("/api/v2/legal_page/user_acks/"),method:"GET"},WebhookEndpointsList:{url:(0,a.urlReplacer)("/api/v2/webhook/endpoint/"),method:"GET"},WebhookEventsList:{url:(0,a.urlReplacer)("/api/v2/webhook/endpoint/event/"),method:"GET"},WebhookCreate:{url:(0,a.urlReplacer)("/api/v2/webhook/endpoint/"),method:"POST"},GetSpecificWebhook:{url:(0,a.urlReplacer)("/api/v2/webhook/endpoint/$(id)/"),method:"GET"},WebhookUpdate:{url:(0,a.urlReplacer)("/api/v2/webhook/endpoint/$(id)/"),method:"PUT"},WebhookPatch:{url:(0,a.urlReplacer)("/api/v2/webhook/endpoint/$(id)/"),method:"PATCH"},WebhookDelete:{url:(0,a.urlReplacer)("/api/v2/webhook/endpoint/$(id)/"),method:"DELETE"},WebhookEndpointAttempts:{url:(0,a.urlReplacer)("/api/v2/webhook/endpoint/$(id)/attempt/"),method:"GET"},WebhookExpireSigningSecret:{url:(0,a.urlReplacer)("/api/v2/webhook/endpoint/$(id)/secret/expire/"),method:"POST"},WebhookRevealSigningSecret:{url:(0,a.urlReplacer)("/api/v2/webhook/endpoint/$(id)/secret/reveal/"),method:"POST"},WebhookResendEndpointEvent:{url:(0,a.urlReplacer)("/api/v2/webhook/endpoint/$(id)/event/resend/"),method:"POST"},WebhookResendMultipleEndpointEvent:{url:(0,a.urlReplacer)("/api/v2/webhook/endpoint/$(id)/event/resend/bulk/"),method:"POST"},GenerateDataPortability:{url:(0,a.urlReplacer)("/api/v2/udp/"),method:"POST"},DataPortabilityStatus:{url:(0,a.urlReplacer)("/api/v2/udp/"),method:"GET"},DataPortabilityDownload:{url:(0,a.urlReplacer)("/api/v2/udp/download"),method:"GET"},ScoresList:{url:(0,a.urlReplacer)("/api/v2/score/"),method:"GET"},SearchScore:{url:(0,a.urlReplacer)("/api/v2/score/search/"),method:"GET"},AddScore:{url:(0,a.urlReplacer)("/api/v2/score/"),method:"POST"},GetReactions:{url:(0,a.urlReplacer)("/api/v2/reaction/"),method:"GET"},GetSpecificReaction:{url:(0,a.urlReplacer)("/api/v2/reaction/$(id)/"),method:"GET"}};t.default=s},8634:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=t.AccountApiClient=void 0;var a,s=(a=r(5368))&&a.__esModule?a:{default:a},i=r(2746);class n{static create(e,t){return(0,i.apiRequest)(Object.assign({},t,{data:e,url:s.default.AccountCreate.url({}),method:s.default.AccountCreate.method}))}static verify(e,t){return(0,i.apiRequest)(Object.assign({},t,{data:e,url:s.default.AccountVerify.url({}),method:s.default.AccountVerify.method}))}static recover(e,t){return(0,i.apiRequest)(Object.assign({},t,{data:e,url:s.default.AccountRecover.url({}),method:s.default.AccountRecover.method}))}static reset(e,t){return(0,i.apiRequest)(Object.assign({},t,{data:e,url:s.default.AccountReset.url({}),method:s.default.AccountReset.method}))}static search(e,t){return(0,i.apiRequest)(Object.assign({},t,{params:e,url:s.default.AccountSearch.url({}),method:s.default.AccountSearch.method}))}}t.AccountApiClient=n,t.default=class{static async create(e,t){return n.create(e,t)}static async verify(e,t){return n.verify(e,t)}static async recover(e,t){return n.recover(e,t)}static async reset(e,t){return n.reset(e,t)}static async search(e,t){return n.search(e,t)}}},707:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=t.CategoryApiClient=void 0;var a,s=(a=r(5368))&&a.__esModule?a:{default:a},i=r(2746),n=r(735);class o{static getAllCategories(e,t){const r=(0,n.urlParams)(e);return(0,i.apiRequest)(Object.assign({url:`${s.default.CategoryList.url({})}?${r.toString()}`,method:s.default.CategoryList.method},t))}static searchCategory(e,t){const r=(0,n.urlParams)(e);return(0,i.apiRequest)(Object.assign({url:`${s.default.SearchCategory.url({})}?${r.toString()}`,method:s.default.SearchCategory.method},t))}static createCategory(e,t){return(0,i.apiRequest)(Object.assign({url:s.default.CreateCategory.url({}),method:s.default.CreateCategory.method,data:e},t))}static getSpecificCategory(e,t){return(0,i.apiRequest)(Object.assign({url:s.default.Category.url({id:e}),method:s.default.Category.method},t))}static updateASpecificCategory(e,t,r){return(0,i.apiRequest)(Object.assign({url:s.default.UpdateCategory.url({id:e}),method:s.default.UpdateCategory.method,data:t},r))}static patchASpecificCategory(e,t,r){return(0,i.apiRequest)(Object.assign({url:s.default.PatchCategory.url({id:e}),method:s.default.PatchCategory.method,data:t},r))}static deleteASpecificCategory(e,t){return(0,i.apiRequest)(Object.assign({url:s.default.DeleteCategory.url({id:e}),method:s.default.DeleteCategory.method},t))}static getCategoryAudience(e,t){return(0,i.apiRequest)(Object.assign({url:s.default.CategoryAudience.url({id:e}),method:s.default.CategoryAudience.method},t))}static getCategoryFollowers(e,t,r){return(0,i.apiRequest)(Object.assign({url:s.default.CategoryFollowers.url({id:e}),method:s.default.CategoryFollowers.method,params:t},r))}static getCategoryFeed(e,t,r){return(0,i.apiRequest)(Object.assign({url:s.default.CategoryFeed.url({id:e}),method:s.default.CategoryFeed.method,params:t},r))}static getCategoryTrendingFeed(e,t,r){const a=(0,n.urlParams)(t);return(0,i.apiRequest)(Object.assign({url:`${s.default.CategoryTrendingFeed.url({id:e})}?${a.toString()}`,method:s.default.CategoryTrendingFeed.method},r))}static getCategoryTrendingFollowers(e,t,r){return(0,i.apiRequest)(Object.assign({url:s.default.CategoryTrendingPeople.url({id:e}),method:s.default.CategoryTrendingPeople.method,params:t},r))}static followCategory(e,t){return(0,i.apiRequest)(Object.assign({url:s.default.FollowCategory.url({id:e}),method:s.default.FollowCategory.method},t))}static checkCategoryIsFollowed(e,t){return(0,i.apiRequest)(Object.assign({url:s.default.CheckCategoryIsFollowed.url({id:e}),method:s.default.CheckCategoryIsFollowed.method},t))}static getFollowedCategories(e,t){const r=(0,n.urlParams)(e);return(0,i.apiRequest)(Object.assign({url:`${s.default.CategoriesFollowed.url({})}?${r.toString()}`,method:s.default.CategoriesFollowed.method},t))}static getPopularCategories(e,t){const r=(0,n.urlParams)(e);return(0,i.apiRequest)(Object.assign({},t,{url:`${s.default.PopularCategories.url({})}?${r.toString()}`,method:s.default.PopularCategories.method}))}}t.CategoryApiClient=o,t.default=class{static async getAllCategories(e,t){return o.getAllCategories(e,t)}static async searchCategory(e,t){return o.searchCategory(e,t)}static async createCategory(e,t){return o.createCategory(e,t)}static async getSpecificCategory(e,t){return o.getSpecificCategory(e,t)}static async updateASpecificCategory(e,t,r){return o.updateASpecificCategory(e,t,r)}static async patchASpecificCategory(e,t,r){return o.patchASpecificCategory(e,t,r)}static async deleteASpecificCategory(e,t){return o.deleteASpecificCategory(e,t)}static async getCategoryAudience(e,t){return o.getCategoryAudience(e,t)}static async getCategoryFollowers(e,t,r){return o.getCategoryFollowers(e,t,r)}static async getCategoryFeed(e,t,r){return o.getCategoryFeed(e,t,r)}static async getCategoryTrendingFeed(e,t,r){return o.getCategoryTrendingFeed(e,t,r)}static async getCategoryTrendingFollowers(e,t,r){return o.getCategoryTrendingFollowers(e,t,r)}static async followCategory(e,t){return o.followCategory(e,t)}static async checkCategoryIsFollowed(e,t){return o.checkCategoryIsFollowed(e,t)}static async getFollowedCategories(e,t){return o.getFollowedCategories(e,t)}static async getPopularCategories(e,t){return o.getPopularCategories(e,t)}}},6527:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=t.CommentApiClient=void 0;var a,s=(a=r(5368))&&a.__esModule?a:{default:a},i=r(2746),n=r(735);class o{static getAllComments(e,t){const r=(0,n.urlParams)(e);return(0,i.apiRequest)(Object.assign({},t,{url:`${s.default.Comments.url({})}?${r.toString()}`,method:s.default.Comments.method}))}static createComment(e,t){return(0,i.apiRequest)(Object.assign({},t,{url:s.default.NewComment.url({}),method:s.default.NewComment.method,data:e}))}static getASpecificComment(e,t){return(0,i.apiRequest)(Object.assign({},t,{url:s.default.Comment.url({id:e}),method:s.default.Comment.method}))}static updateComment(e,t,r){return(0,i.apiRequest)(Object.assign({},r,{url:s.default.UpdateComment.url({id:e}),method:s.default.UpdateComment.method,data:{text:t}}))}static deleteComment(e,t){return(0,i.apiRequest)(Object.assign({},t,{url:s.default.DeleteComment.url({id:e}),method:s.default.DeleteComment.method}))}static restoreComment(e,t){return(0,i.apiRequest)(Object.assign({},t,{url:s.default.RestoreComment.url({id:e}),method:s.default.RestoreComment.method}))}static getSpecificCommentVotesList(e,t){return(0,i.apiRequest)(Object.assign({},t,{url:s.default.CommentVotesList.url({id:e}),method:s.default.CommentVotesList.method}))}static upvoteComment(e,t){return(0,i.apiRequest)(Object.assign({},t,{url:s.default.CommentVote.url({id:e}),method:s.default.CommentVote.method}))}static getSpecificCommentFlags(e,t){return(0,i.apiRequest)(Object.assign({},t,{url:s.default.CommentFlagList.url({id:e}),method:s.default.CommentFlagList.method}))}static flagComment(e,t,r){return(0,i.apiRequest)(Object.assign({},r,{url:s.default.FlagComment.url({id:e}),method:s.default.FlagComment.method,data:{flagType:t}}))}static getSpecificCommentFlagStatus(e,t){return(0,i.apiRequest)(Object.assign({},t,{url:s.default.CommentFlagStatus.url({id:e}),method:s.default.CommentFlagStatus.method}))}}t.CommentApiClient=o,t.default=class{static async getAllComments(e,t){return o.getAllComments(e,t)}static async createComment(e,t){return o.createComment(e,t)}static async getASpecificComment(e,t){return o.getASpecificComment(e,t)}static async updateComment(e,t,r){return o.updateComment(e,t,r)}static async deleteComment(e,t){return o.deleteComment(e,t)}static async restoreComment(e,t){return o.restoreComment(e,t)}static async getSpecificCommentVotesList(e,t){return o.getSpecificCommentVotesList(e,t)}static async upvoteComment(e,t){return o.upvoteComment(e,t)}static async getSpecificCommentFlags(e,t){return o.getSpecificCommentFlags(e,t)}static async flagComment(e,t,r){return o.flagComment(e,t,r)}static async getSpecificCommentFlagStatus(e,t){return o.getSpecificCommentFlagStatus(e,t)}}},9741:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=t.CustomAdvApiClient=void 0;var a,s=r(2746),i=(a=r(5368))&&a.__esModule?a:{default:a},n=r(735);class o{static getASpecificCustomAdv(e,t){return(0,s.apiRequest)(Object.assign({},t,{url:i.default.CustomAdv.url({id:e}),method:i.default.CustomAdv.method}))}static getAllCustomAdv(e,t){const r=(0,n.urlParams)(e);return(0,s.apiRequest)(Object.assign({},t,{url:`${i.default.CustomAdvList.url({})}?${r.toString()}`,method:i.default.CustomAdvList.method}))}static searchCustomAdv(e,t){const r=(0,n.urlParams)(e);return(0,s.apiRequest)(Object.assign({},t,{url:`${i.default.CustomAdvSearch.url({})}?${r.toString()}`,method:i.default.CustomAdvSearch.method}))}}t.CustomAdvApiClient=o,t.default=class{static async getASpecificCustomAdv(e,t){return o.getASpecificCustomAdv(e,t)}static async getAllCustomAdv(e,t){return o.getAllCustomAdv(e,t)}static async searchCustomAdv(e,t){return o.searchCustomAdv(e,t)}}},4315:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=t.CustomMenuApiClient=void 0;var a,s=(a=r(5368))&&a.__esModule?a:{default:a},i=r(2746),n=r(735);class o{static getASpecificCustomMenu(e,t){return(0,i.apiRequest)(Object.assign({},t,{url:s.default.CustomMenu.url({id:e}),method:s.default.CustomMenu.method}))}static getAllCustomMenus(e,t){const r=(0,n.urlParams)(e);return(0,i.apiRequest)(Object.assign({},t,{url:`${s.default.GetCustomMenus.url({})}?${r.toString()}`,method:s.default.GetCustomMenus.method}))}static getBaseCustomMenu(e){return(0,i.apiRequest)(Object.assign({},e,{url:s.default.CustomMenu.url({id:"base"}),method:s.default.CustomMenu.method}))}static searchCustomMenus(e,t){const r=(0,n.urlParams)(e);return(0,i.apiRequest)(Object.assign({},t,{url:`${s.default.CustomMenuSearch.url({})}?${r.toString()}`,method:s.default.CustomMenuSearch.method}))}}t.CustomMenuApiClient=o,t.default=class{static async getASpecificCustomMenu(e,t){return o.getASpecificCustomMenu(e,t)}static async getAllCustomMenus(e,t){return o.getAllCustomMenus(e,t)}static async getBaseCustomMenu(e){return o.getBaseCustomMenu(e)}static async searchCustomMenus(e,t){return o.searchCustomMenus(e,t)}}},9984:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=t.CustomPageApiClient=void 0;var a,s=(a=r(5368))&&a.__esModule?a:{default:a},i=r(2746),n=r(735);class o{static getASpecificCustomPage(e,t){return(0,i.apiRequest)(Object.assign({},t,{url:s.default.CustomPage.url({id:e}),method:s.default.CustomPage.method}))}static getAllCustomPages(e,t){const r=(0,n.urlParams)(e);return(0,i.apiRequest)(Object.assign({},t,{url:`${s.default.GetCustomPages.url({})}?${r.toString()}`,method:s.default.GetCustomPages.method}))}static searchCustomPages(e,t){const r=(0,n.urlParams)(e);return(0,i.apiRequest)(Object.assign({},t,{url:`${s.default.CustomPageSearch.url({})}?${r.toString()}`,method:s.default.CustomPageSearch.method}))}}t.CustomPageApiClient=o,t.default=class{static async getASpecificCustomPage(e,t){return o.getASpecificCustomPage(e,t)}static async getAllCustomPages(e,t){return o.getAllCustomPages(e,t)}static async searchCustomPages(e,t){return o.searchCustomPages(e,t)}}},6560:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=t.DataPortabilityApiClient=void 0;var a,s=r(2746),i=(a=r(5368))&&a.__esModule?a:{default:a};class n{static generateDataPortability(e){return(0,s.apiRequest)(Object.assign({url:i.default.GenerateDataPortability.url({}),method:i.default.GenerateDataPortability.method},e))}static downloadDataPortability(e){return(0,s.apiRequest)(Object.assign({url:i.default.DataPortabilityDownload.url({}),method:i.default.DataPortabilityDownload.method,responseType:"blob"},e))}static dataPortabilityStatus(e){return(0,s.apiRequest)(Object.assign({url:i.default.DataPortabilityStatus.url({}),method:i.default.DataPortabilityStatus.method},e))}}t.DataPortabilityApiClient=n,t.default=class{static async generateDataPortability(e){return n.generateDataPortability(e)}static async downloadDataPortability(e){return n.downloadDataPortability(e)}static async dataPortabilityStatus(e){return n.dataPortabilityStatus(e)}}},13:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=t.EmbedApiClient=void 0;var a,s=r(2746),i=(a=r(5368))&&a.__esModule?a:{default:a},n=r(735);class o{static getAllEmbeds(e,t){const r=(0,n.urlParams)(e);return(0,s.apiRequest)(Object.assign({},t,{url:`${i.default.EmbedList.url({})}?${r.toString()}`,method:i.default.EmbedList.method}))}static createEmbed(e,t){return(0,s.apiRequest)(Object.assign({},t,{url:i.default.EmbedCreate.url({}),method:i.default.EmbedCreate.method,data:e}))}static searchEmbed(e,t){const r=(0,n.urlParams)(e);return(0,s.apiRequest)(Object.assign({},t,{url:`${i.default.EmbedSearch.url({})}?${r.toString()}`,method:i.default.EmbedSearch.method}))}static getSpecificEmbed(e,t){return(0,s.apiRequest)(Object.assign({},t,{url:i.default.Embed.url({id:e}),method:i.default.Embed.method}))}static updateASpecificEmbed(e,t,r){return(0,s.apiRequest)(Object.assign({},r,{url:i.default.UpdateEmbed.url({id:e}),method:i.default.UpdateEmbed.method,data:t}))}static patchASpecificEmbed(e,t,r){return(0,s.apiRequest)(Object.assign({},r,{url:i.default.PatchEmbed.url({id:e}),method:i.default.PatchEmbed.method,data:t}))}static getEmbedFeed(e,t,r){const a=(0,n.urlParams)(Object.assign({},e&&{embed_type:e},t&&{embed_id:t}));return(0,s.apiRequest)(Object.assign({},r,{url:`${i.default.EmbedFeed.url({})}?${a.toString()}`,method:i.default.EmbedFeed.method}))}static getSpecificEmbedFeed(e,t){return(0,s.apiRequest)(Object.assign({},t,{url:i.default.SpecificEmbedFeed.url({id:e}),method:i.default.SpecificEmbedFeed.method}))}}t.EmbedApiClient=o,t.default=class{static async getAllEmbeds(e,t){return o.getAllEmbeds(e,t)}static async searchEmbed(e,t){return o.searchEmbed(e,t)}static async createEmbed(e,t){return o.createEmbed(e,t)}static async getSpecificEmbed(e,t){return o.getSpecificEmbed(e,t)}static async updateASpecificEmbed(e,t,r){return o.updateASpecificEmbed(e,t,r)}static async patchASpecificEmbed(e,t,r){return o.patchASpecificEmbed(e,t,r)}static async getEmbedFeed(e,t,r){return o.getEmbedFeed(e,t,r)}static async getSpecificEmbedFeed(e,t){return o.getSpecificEmbedFeed(e,t)}}},6334:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=t.FeatureApiClient=void 0;var a,s=r(2746),i=(a=r(5368))&&a.__esModule?a:{default:a},n=r(735);class o{static getAllFeatures(e,t){const r=(0,n.urlParams)(e);return(0,s.apiRequest)(Object.assign({},t,{url:`${i.default.Feature.url({})}?${r.toString()}`,method:i.default.Feature.method}))}}t.FeatureApiClient=o,t.default=class{static async getAllFeatures(e,t){return o.getAllFeatures(e,t)}}},7980:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=t.FeedApiClient=void 0;var a,s=r(2746),i=(a=r(5368))&&a.__esModule?a:{default:a},n=r(735);class o{static getMainFeed(e,t){const r=(0,n.urlParams)(e);return(0,s.apiRequest)(Object.assign({},t,{url:`${i.default.MainFeed.url({})}?${r.toString()}`,method:i.default.MainFeed.method}))}static getExploreFeed(e,t){const r=(0,n.urlParams)(e);return(0,s.apiRequest)(Object.assign({},t,{url:`${i.default.ExploreFeed.url({})}?${r.toString()}`,method:i.default.ExploreFeed.method}))}static getMainFeedUnseenCount(e){return(0,s.apiRequest)(Object.assign({},e,{url:i.default.MainFeedUnseenCount.url({}),method:i.default.MainFeedUnseenCount.method}))}static markReadASpecificFeedObj(e,t){return(0,s.apiRequest)(Object.assign({},t,{url:i.default.FeedObjectMarkRead.url({}),method:i.default.FeedObjectMarkRead.method,data:{object:e}}))}static likeFeedObjs(e,t){return(0,s.apiRequest)(Object.assign({},t,{url:i.default.FeedLikeThese.url({}),method:i.default.FeedLikeThese.method,data:{object:e}}))}}t.FeedApiClient=o,t.default=class{static async getMainFeed(e,t){return o.getMainFeed(e,t)}static async getExploreFeed(e,t){return o.getExploreFeed(e,t)}static async getMainFeedUnseenCount(e){return o.getMainFeedUnseenCount(e)}static async markReadASpecificFeedObj(e,t){return o.markReadASpecificFeedObj(e,t)}static async likeFeedObjs(e,t){return o.likeFeedObjs(e,t)}}},5564:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=t.FeedObjectApiClient=void 0;var a,s=r(2746),i=(a=r(5368))&&a.__esModule?a:{default:a},n=r(735);class o{static getAllFeedObjects(e,t,r){const a=(0,n.urlParams)(t);return(0,s.apiRequest)(Object.assign({},r,{url:`${i.default.FeedObjectList.url({type:e})}?${a.toString()}`,method:i.default.FeedObjectList.method}))}static getUncommentedFeedObjects(e,t,r){const a=(0,n.urlParams)(t);return(0,s.apiRequest)(Object.assign({},r,{url:`${i.default.FeedObjectsUncommented.url({type:e})}?${a.toString()}`,method:i.default.FeedObjectsUncommented.method}))}static searchFeedObject(e,t,r){const a=(0,n.urlParams)(t);return(0,s.apiRequest)(Object.assign({},r,{url:`${i.default.SearchFeedObject.url({type:e})}?${a.toString()}`,method:i.default.SearchFeedObject.method}))}static createFeedObject(e,t,r){return(0,s.apiRequest)(Object.assign({},r,{url:i.default.CreateFeedObject.url({type:e}),method:i.default.CreateFeedObject.method,data:t}))}static getSpecificFeedObject(e,t,r){return(0,s.apiRequest)(Object.assign({},r,{url:i.default.FeedObject.url({type:e,id:t}),method:i.default.FeedObject.method}))}static updateFeedObject(e,t,r,a){return(0,s.apiRequest)(Object.assign({},a,{url:i.default.UpdateFeedObject.url({id:t,type:e}),method:i.default.UpdateFeedObject.method,data:r}))}static deleteFeedObject(e,t,r){return(0,s.apiRequest)(Object.assign({},r,{url:i.default.DeleteFeedObject.url({type:e,id:t}),method:i.default.DeleteFeedObject.method}))}static feedObjectContributorsList(e,t,r,a){const o=(0,n.urlParams)(r);return(0,s.apiRequest)(Object.assign({},a,{url:`${i.default.FeedObjectContributorsList.url({type:e,id:t})}?${o.toString()}`,method:i.default.FeedObjectContributorsList.method}))}static feedObjectSharesList(e,t,r,a){const o=(0,n.urlParams)(r);return(0,s.apiRequest)(Object.assign({},a,{url:`${i.default.FeedObjectSharesList.url({type:e,id:t})}?${o.toString()}`,method:i.default.FeedObjectSharesList.method}))}static feedObjectUserSharesList(e,t,r,a){const o=(0,n.urlParams)(r);return(0,s.apiRequest)(Object.assign({},a,{url:`${i.default.FeedObjectUserSharesList.url({type:e,id:t})}?${o.toString()}`,method:i.default.FeedObjectUserSharesList.method}))}static restoreFeedObject(e,t,r){return(0,s.apiRequest)(Object.assign({},r,{url:i.default.RestoreFeedObject.url({type:e,id:t}),method:i.default.RestoreFeedObject.method}))}static relatedFeedObjects(e,t,r,a){const o=(0,n.urlParams)(r);return(0,s.apiRequest)(Object.assign({},a,{url:`${i.default.RelatedFeedObjects.url({type:e,id:t})}?${o.toString()}`,method:i.default.RelatedFeedObjects.method}))}static voteFeedObject(e,t,r,a){const o=(0,n.urlParams)(Object.assign({},r&&{reaction:r}));return(0,s.apiRequest)(Object.assign({},a,{url:`${i.default.Vote.url({type:e,id:t})}?${o.toString()}`,method:i.default.Vote.method}))}static feedObjectVotes(e,t,r,a){const o=(0,n.urlParams)(r);return(0,s.apiRequest)(Object.assign({},a,{url:`${i.default.VotesList.url({type:e,id:t})}?${o.toString()}`,method:i.default.VotesList.method}))}static feedObjectPollVote(e,t,r,a){return(0,s.apiRequest)(Object.assign({},a,{url:i.default.PollVote.url({type:e,id:t}),method:i.default.PollVote.method,data:{choice:r}}))}static feedObjectPollVotesList(e,t,r,a){const o=(0,n.urlParams)(r);return(0,s.apiRequest)(Object.assign({},a,{url:`${i.default.PollVotesList.url({type:e,id:t})}?${o.toString()}`,method:i.default.PollVotesList.method}))}static followFeedObject(e,t,r){return(0,s.apiRequest)(Object.assign({},r,{url:i.default.FollowContribution.url({id:t}),method:i.default.FollowContribution.method}))}static feedObjectFollowingList(e,t,r){const a=(0,n.urlParams)(t);return(0,s.apiRequest)(Object.assign({},r,{url:`${i.default.FeedObjectFollowingList.url({type:e})}?${a.toString()}`,method:i.default.FeedObjectFollowingList.method}))}static checkIfFollowingFeedObject(e,t,r){return(0,s.apiRequest)(Object.assign({},r,{url:i.default.CheckIfFollowingFeedObject.url({type:e,id:t}),method:i.default.CheckIfFollowingFeedObject.method}))}static suspendFeedObject(e,t,r){return(0,s.apiRequest)(Object.assign({},r,{url:i.default.UserSuspendContributionNotification.url({type:e,id:t}),method:i.default.UserSuspendContributionNotification.method}))}static checkIfSuspendedFeedObject(e,t,r){return(0,s.apiRequest)(Object.assign({},r,{url:i.default.UserCheckContributionNotificationSuspended.url({type:e,id:t}),method:i.default.UserCheckContributionNotificationSuspended.method}))}static feedObjectSuspendedList(e,t,r){const a=(0,n.urlParams)(t);return(0,s.apiRequest)(Object.assign({},r,{url:`${i.default.UserListContributionNotificationSuspended.url({type:e})}?${a.toString()}`,method:i.default.UserListContributionNotificationSuspended.method}))}static flagFeedObject(e,t,r,a){return(0,s.apiRequest)(Object.assign({},a,{url:i.default.Flag.url({type:e,id:t}),method:i.default.Flag.method,data:r}))}static feedObjectFlagStatus(e,t,r){return(0,s.apiRequest)(Object.assign({},r,{url:i.default.FlagStatus.url({type:e,id:t}),method:i.default.FlagStatus.method}))}static feedObjectFlagList(e,t,r){return(0,s.apiRequest)(Object.assign({},r,{url:i.default.FeedObjectFlagList.url({type:e,id:t}),method:i.default.FeedObjectFlagList.method}))}static hideFeedObject(e,t,r){return(0,s.apiRequest)(Object.assign({},r,{url:i.default.HideFeedObject.url({type:e,id:t}),method:i.default.HideFeedObject.method}))}static feedObjectHideStatus(e,t,r){return(0,s.apiRequest)(Object.assign({},r,{url:i.default.FeedObjectHideStatus.url({type:e,id:t}),method:i.default.FeedObjectHideStatus.method}))}}t.FeedObjectApiClient=o,t.default=class{static async getAllFeedObjects(e,t,r){return o.getAllFeedObjects(e,t,r)}static async getUncommentedFeedObjects(e,t,r){return o.getUncommentedFeedObjects(e,t,r)}static async searchFeedObject(e,t,r){return o.searchFeedObject(e,t,r)}static async createFeedObject(e,t,r){return o.createFeedObject(e,t,r)}static async getSpecificFeedObject(e,t,r){return o.getSpecificFeedObject(e,t,r)}static async updateFeedObject(e,t,r,a){return o.updateFeedObject(e,t,r,a)}static async deleteFeedObject(e,t,r){return o.deleteFeedObject(e,t,r)}static async feedObjectContributorsList(e,t,r,a){return o.feedObjectContributorsList(e,t,r,a)}static async feedObjectSharesList(e,t,r,a){return o.feedObjectSharesList(e,t,r,a)}static async feedObjectUserSharesList(e,t,r){return o.feedObjectUserSharesList(e,t,r)}static async restoreFeedObject(e,t,r){return o.restoreFeedObject(e,t,r)}static async relatedFeedObjects(e,t,r,a){return o.relatedFeedObjects(e,t,r,a)}static async voteFeedObject(e,t,r,a){return o.voteFeedObject(e,t,r,a)}static async feedObjectVotes(e,t,r,a){return o.feedObjectVotes(e,t,r,a)}static async feedObjectPollVote(e,t,r,a){return o.feedObjectPollVote(e,t,r,a)}static async feedObjectPollVotesList(e,t,r,a){return o.feedObjectPollVotesList(e,t,r,a)}static async followFeedObject(e,t,r){return o.followFeedObject(e,t,r)}static async feedObjectFollowingList(e,t,r){return o.feedObjectFollowingList(e,t,r)}static async checkIfFollowingFeedObject(e,t,r){return o.checkIfFollowingFeedObject(e,t,r)}static async suspendFeedObject(e,t,r){return o.suspendFeedObject(e,t,r)}static async checkIfSuspendedFeedObject(e,t,r){return o.checkIfSuspendedFeedObject(e,t,r)}static async feedObjectSuspendedList(e,t,r){return o.feedObjectSuspendedList(e,t,r)}static async flagFeedObject(e,t,r,a){return o.flagFeedObject(e,t,r,a)}static async feedObjectFlagList(e,t,r){return o.feedObjectFlagList(e,t,r)}static async feedObjectFlagStatus(e,t,r){return o.feedObjectFlagStatus(e,t,r)}static async hideFeedObject(e,t,r){return o.hideFeedObject(e,t,r)}static async feedObjectHideStatus(e,t,r){return o.feedObjectHideStatus(e,t,r)}}},6984:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=t.IncubatorApiClient=void 0;var a,s=r(2746),i=(a=r(5368))&&a.__esModule?a:{default:a},n=r(735);class o{static getAllIncubators(e,t){const r=(0,n.urlParams)(e);return(0,s.apiRequest)(Object.assign({},t,{url:`${i.default.GetAllIncubators.url({})}?${r.toString()}`,method:i.default.GetAllIncubators.method}))}static searchIncubators(e,t){const r=(0,n.urlParams)(e);return(0,s.apiRequest)(Object.assign({},t,{url:`${i.default.SearchIncubators.url({})}?${r.toString()}`,method:i.default.SearchIncubators.method}))}static getSpecificIncubator(e,t){return(0,s.apiRequest)(Object.assign({},t,{url:i.default.GetASpecificIncubator.url({id:e}),method:i.default.GetASpecificIncubator.method}))}static createIncubator(e,t){return(0,s.apiRequest)(Object.assign({},t,{url:i.default.CreateAnIncubator.url({}),method:i.default.CreateAnIncubator.method,data:e}))}static getIncubatorSubscribers(e,t){return(0,s.apiRequest)(Object.assign({},t,{url:i.default.GetIncubatorSubscribers.url({id:e}),method:i.default.GetIncubatorSubscribers.method}))}static subscribeToIncubator(e,t){return(0,s.apiRequest)(Object.assign({},t,{url:i.default.SubscribeToIncubator.url({id:e}),method:i.default.SubscribeToIncubator.method}))}static checkIncubatorSubscription(e,t){return(0,s.apiRequest)(Object.assign({},t,{url:i.default.CheckIncubatorSubscription.url({id:e}),method:i.default.CheckIncubatorSubscription.method}))}}t.IncubatorApiClient=o,t.default=class{static async getAllIncubators(e,t){return o.getAllIncubators(e,t)}static async searchIncubators(e,t){return o.searchIncubators(e,t)}static async getSpecificIncubator(e,t){return o.getSpecificIncubator(e,t)}static async createIncubator(e,t){return o.createIncubator(e,t)}static async getIncubatorSubscribers(e,t){return o.getIncubatorSubscribers(e,t)}static async subscribeToIncubator(e,t){return o.subscribeToIncubator(e,t)}static async checkIncubatorSubscription(e,t){return o.checkIncubatorSubscription(e,t)}}},1415:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=t.InsightApiClient=void 0;var a,s=r(2746),i=(a=r(5368))&&a.__esModule?a:{default:a},n=r(735);class o{static getBestContributionInsight(e,t){const r=(0,n.urlParams)(e);return(0,s.apiRequest)(Object.assign({},t,{url:`${i.default.InsightBestContribution.url({})}?${r.toString()}`,method:i.default.InsightBestContribution.method}))}static getBestEmbedInsight(e,t){const r=(0,n.urlParams)(e);return(0,s.apiRequest)(Object.assign({},t,{url:`${i.default.InsightBestEmbed.url({})}?${r.toString()}`,method:i.default.InsightBestEmbed.method}))}static getBestUsersInsight(e,t){const r=(0,n.urlParams)(e);return(0,s.apiRequest)(Object.assign({},t,{url:`${i.default.InsightBestUser.url({})}?${r.toString()}`,method:i.default.InsightBestUser.method}))}static getContributionsInsightCounters(e,t){return(0,s.apiRequest)(Object.assign({},t,{url:i.default.InsightContributionCounter.url({id:e}),method:i.default.InsightContributionCounter.method}))}static getEmbedsInsightCounters(e,t,r){return(0,s.apiRequest)(Object.assign({},r,{url:i.default.InsightEmbedCounter.url({type:e,id:t}),method:i.default.InsightEmbedCounter.method}))}static getUsersInsightCounters(e,t){return(0,s.apiRequest)(Object.assign({},t,{url:i.default.InsightUserCounter.url({id:e}),method:i.default.InsightUserCounter.method}))}}t.InsightApiClient=o,t.default=class{static async getBestContributionInsight(e,t){return o.getBestContributionInsight(e,t)}static async getBestEmbedInsight(e,t){return o.getBestEmbedInsight(e,t)}static async getBestUsersInsight(e,t){return o.getBestUsersInsight(e,t)}static async getContributionsInsightCounters(e,t){return o.getContributionsInsightCounters(e,t)}static async getEmbedsInsightCounters(e,t,r){return o.getEmbedsInsightCounters(e,t,r)}static async getUsersInsightCounters(e,t){return o.getUsersInsightCounters(e,t)}}},922:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=t.InviteApiClient=void 0;var a,s=(a=r(5368))&&a.__esModule?a:{default:a},i=r(2746);class n{static getSpecificInvite(e,t){return(0,i.apiRequest)(Object.assign({},t,{url:s.default.InviteCode.url({code:e}),method:s.default.User.method}))}}t.InviteApiClient=n,t.default=class{static async getSpecificInvite(e,t){return n.getSpecificInvite(e,t)}}},507:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=t.LegalPageApiClient=void 0;var a,s=(a=r(5368))&&a.__esModule?a:{default:a},i=r(2746),n=r(735);class o{static getLegalPages(e,t){const r=(0,n.urlParams)(e);return(0,i.apiRequest)(Object.assign({},t,{url:`${s.default.GetLegalPages.url({})}?${r.toString()}`,method:s.default.GetLegalPages.method}))}static getSpecificLegalPage(e,t){return(0,i.apiRequest)(Object.assign({},t,{url:s.default.LegalPage.url({id:e}),method:s.default.LegalPage.method}))}static getAllRevisionsOfLegalPage(e,t){return(0,i.apiRequest)(Object.assign({},t,{url:s.default.LegalPageRevisions.url({policy:e}),method:s.default.LegalPageRevisions.method}))}static getAllLastRevisionsOfLegalPages(e){return(0,i.apiRequest)(Object.assign({},e,{url:s.default.LegalPagesLastRevision.url({}),method:s.default.LegalPagesLastRevision.method}))}static getLastRevisionOfLegalPage(e,t){return(0,i.apiRequest)(Object.assign({},t,{url:s.default.LegalPageLastRevision.url({policy:e}),method:s.default.LegalPageLastRevision.method}))}static searchLegalPages(e,t){const r=(0,n.urlParams)(e);return(0,i.apiRequest)(Object.assign({},t,{url:`${s.default.SearchLegalPages.url({})}?${r.toString()}`,method:s.default.SearchLegalPages.method}))}static ackLegalPage(e,t,r){var a;return(0,i.apiRequest)(Object.assign({},r,{url:s.default.AckLegalPage.url({id:e}),method:s.default.AckLegalPage.method,data:null!=(a={accept:t})?a:null}))}static getSpecificUserAck(e,t){return(0,i.apiRequest)(Object.assign({},t,{url:s.default.SpecificUserAck.url({id:e}),method:s.default.SpecificUserAck.method}))}static userAckList(e){return(0,i.apiRequest)(Object.assign({},e,{url:s.default.UserAckList.url({}),method:s.default.UserAckList.method}))}}t.LegalPageApiClient=o,t.default=class{static async getLegalPages(e,t){return o.getLegalPages(e,t)}static async getSpecificLegalPage(e,t){return o.getSpecificLegalPage(e,t)}static async getAllRevisionsOfLegalPage(e,t){return o.getAllRevisionsOfLegalPage(e,t)}static async getAllLastRevisionsOfLegalPages(e){return o.getAllLastRevisionsOfLegalPages(e)}static async getLastRevisionOfLegalPage(e,t){return o.getLastRevisionOfLegalPage(e,t)}static async searchLegalPages(e,t){return o.searchLegalPages(e,t)}static async ackLegalPage(e,t,r){return o.ackLegalPage(e,t,r)}static async getSpecificUserAck(e,t){return o.getSpecificUserAck(e,t)}static async userAckList(e){return o.userAckList(e)}}},5600:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=t.LocalityApiClient=void 0;var a,s=(a=r(5368))&&a.__esModule?a:{default:a},i=r(2746),n=r(735);class o{static getLocalities(e,t){const r=(0,n.urlParams)(e);return(0,i.apiRequest)(Object.assign({},t,{url:`${s.default.GetLocalities.url({})}?${r.toString()}`,method:s.default.GetLocalities.method}))}static searchLocalities(e,t){const r=(0,n.urlParams)(e);return(0,i.apiRequest)(Object.assign({},t,{url:`${s.default.ComposerLocalitySearch.url({})}?${r.toString()}`,method:s.default.ComposerLocalitySearch.method}))}}t.LocalityApiClient=o,t.default=class{static async getLocalities(e,t){return o.getLocalities(e,t)}static async searchLocalities(e,t){return o.searchLocalities(e,t)}}},9902:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=t.LoyaltyApiClient=void 0;var a,s=r(2746),i=(a=r(5368))&&a.__esModule?a:{default:a};class n{static getPrizes(e){return(0,s.apiRequest)(Object.assign({},e,{url:i.default.GetPrizes.url({}),method:i.default.GetPrizes.method}))}static createPrize(e,t){return(0,s.apiRequest)(Object.assign({},t,{url:i.default.CreatePrize.url({}),method:i.default.CreatePrize.method,data:e}))}static getSpecificPrize(e,t){return(0,s.apiRequest)(Object.assign({},t,{url:i.default.GetSpecificPrize.url({id:e}),method:i.default.GetSpecificPrize.method}))}static updatePrize(e,t,r){return(0,s.apiRequest)(Object.assign({},r,{url:i.default.UpdatePrize.url({id:e}),method:i.default.UpdatePrize.method,data:t}))}static patchPrize(e,t,r){return(0,s.apiRequest)(Object.assign({},r,{url:i.default.PatchPrize.url({id:e}),method:i.default.PatchPrize.method,data:t}))}static getAllPrizeRequests(e){return(0,s.apiRequest)(Object.assign({},e,{url:i.default.GetPrizeRequests.url({}),method:i.default.GetPrizeRequests.method}))}static createPrizeRequest(e,t){return(0,s.apiRequest)(Object.assign({},t,{url:i.default.CreatePrizeRequest.url({}),method:i.default.CreatePrizeRequest.method,data:{prize:e}}))}static getSpecificPrizeRequest(e,t){return(0,s.apiRequest)(Object.assign({},t,{url:i.default.GetSpecificPrizeRequest.url({id:e}),method:i.default.GetSpecificPrizeRequest.method}))}static patchPrizeRequest(e,t,r){return(0,s.apiRequest)(Object.assign({},r,{url:i.default.PatchPrizeRequest.url({id:e}),method:i.default.PatchPrizeRequest.method,data:{status:t}}))}}t.LoyaltyApiClient=n,t.default=class{static async getPrizes(e){return n.getPrizes(e)}static async createPrize(e,t){return n.createPrize(e,t)}static async getSpecificPrize(e,t){return n.getSpecificPrize(e,t)}static async updatePrize(e,t,r){return n.updatePrize(e,t,r)}static async patchPrize(e,t,r){return n.patchPrize(e,t,r)}static async getAllPrizeRequests(e){return n.getAllPrizeRequests(e)}static async createPrizeRequest(e,t){return n.createPrizeRequest(e,t)}static async getSpecificPrizeRequest(e,t){return n.getSpecificPrizeRequest(e,t)}static async patchPrizeRequest(e,t,r){return n.patchPrizeRequest(e,t,r)}}},4170:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=t.MediaApiClient=void 0;var a,s=r(2746),i=(a=r(5368))&&a.__esModule?a:{default:a};class n{static chunkUploadMedia(e,t,r,a,n){return(0,s.apiRequest)(Object.assign({},n,{url:i.default.ComposerChunkUploadMedia.url({}),method:i.default.ComposerChunkUploadMedia.method,data:e,headers:{"Content-Range":`bytes ${t}-${r}/${a}`}}))}static chunkUploadMediaComplete(e,t){return(0,s.apiRequest)(Object.assign({},t,{url:i.default.ComposerChunkUploadMediaComplete.url({}),method:i.default.ComposerChunkUploadMediaComplete.method,data:e}))}static createMedia(e,t){return(0,s.apiRequest)(Object.assign({},t,{url:i.default.ComposerMediaCreate.url({}),method:i.default.ComposerMediaCreate.method,data:e}))}static clickMedia(e,t,r){var a;return(0,s.apiRequest)(Object.assign({},r,{url:i.default.MediaClickTracker.url({id:e}),method:i.default.MediaClickTracker.method,data:null!=(a={ip:t})?a:null}))}static getSpecificMedia(e,t){return(0,s.apiRequest)(Object.assign({},t,{url:i.default.GetMedia.url({id:e}),method:i.default.GetMedia.method}))}static updateMedia(e,t,r){return(0,s.apiRequest)(Object.assign({},r,{url:i.default.UpdateMedia.url({id:e}),method:i.default.UpdateMedia.method,data:{image:t}}))}static deleteMedia(e,t){return(0,s.apiRequest)(Object.assign({},t,{url:i.default.DeleteMedia.url({id:e}),method:i.default.DeleteMedia.method}))}}t.MediaApiClient=n,t.default=class{static async chunkUploadMedia(e,t,r,a,s){return n.chunkUploadMedia(e,t,r,a,s)}static async chunkUploadMediaComplete(e,t){return n.chunkUploadMediaComplete(e,t)}static async createMedia(e,t){return n.createMedia(e,t)}static async clickMedia(e,t,r){return n.clickMedia(e,t,r)}static async getSpecificMedia(e,t){return n.getSpecificMedia(e,t)}static async updateMedia(e,t,r){return n.updateMedia(e,t,r)}static async deleteMedia(e,t){return n.deleteMedia(e,t)}}},2123:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=t.ModerationApiClient=void 0;var a,s=r(2746),i=(a=r(5368))&&a.__esModule?a:{default:a},n=r(735);class o{static getUsersForModeration(e,t){const r=(0,n.urlParams)(e);return(0,s.apiRequest)(Object.assign({},t,{url:`${i.default.UsersForModeration.url({})}?${r.toString()}`,method:i.default.UsersForModeration.method}))}static moderateASpecificUser(e,t,r,a,o){const c=(0,n.urlParams)(Object.assign({},r&&{days_blocked:r},a&&{hard:a}));return(0,s.apiRequest)(Object.assign({},o,{url:`${i.default.ModerateUser.url({id:e})}?${c.toString()}`,method:i.default.ModerateUser.method,data:{status:t}}))}static getAllFlaggedContributions(e,t){const r=(0,n.urlParams)(e);return(0,s.apiRequest)(Object.assign({},t,{url:`${i.default.FlaggedContributions.url({})}?${r.toString()}`,method:i.default.FlaggedContributions.method}))}static getAllFlagsForSpecificContribution(e,t,r,a){return(0,s.apiRequest)(Object.assign({},a,{url:i.default.FlagsForSpecificContribution.url({id:e,contribution_type:t}),method:i.default.FlagsForSpecificContribution.method,data:{flag_type:null!=r?r:null}}))}static moderateAContribution(e,t,r){return(0,s.apiRequest)(Object.assign({},r,{url:i.default.ModerateContribution.url({id:e}),method:i.default.ModerateContribution.method,data:t}))}static getContributionModerationStatus(e,t,r){return(0,s.apiRequest)(Object.assign({},r,{url:i.default.ModerateContributionStatus.url({id:e,contribution_type:t}),method:i.default.ModerateContributionStatus.method}))}}t.ModerationApiClient=o,t.default=class{static async getUsersForModeration(e,t){return o.getUsersForModeration(e,t)}static async moderateASpecificUser(e,t,r,a,s){return o.moderateASpecificUser(e,t,r,a,s)}static async getAllFlaggedContributions(e,t){return o.getAllFlaggedContributions(e,t)}static async getAllFlagsForSpecificContribution(e,t,r,a){return o.getAllFlagsForSpecificContribution(e,t,r,a)}static async moderateAContribution(e,t,r){return o.moderateAContribution(e,t,r)}static async getContributionModerationStatus(e,t,r){return o.getContributionModerationStatus(e,t,r)}}},1584:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=t.NotificationApiClient=void 0;var a,s=r(2746),i=(a=r(5368))&&a.__esModule?a:{default:a};class n{static listUserNotification(e){return(0,s.apiRequest)(Object.assign({},e,{url:i.default.UserNotificationList.url({}),method:i.default.UserNotificationList.method}))}static markReadNotification(e,t){return(0,s.apiRequest)(Object.assign({},t,{url:i.default.UserMarkReadNotification.url({}),method:i.default.UserMarkReadNotification.method,data:{sids:e}}))}static getUnseenNotification(e){return(0,s.apiRequest)(Object.assign({},e,{url:i.default.UserUnseenNotificationCount.url({}),method:i.default.UserUnseenNotificationCount.method}))}static createCustomNotification(e,t){return(0,s.apiRequest)(Object.assign({},t,{url:i.default.CreateCustomNotification.url({}),method:i.default.CreateCustomNotification.method,data:e}))}static listBroadcastMessages(e){return(0,s.apiRequest)(Object.assign({},e,{url:i.default.BroadcastMessagesList.url({}),method:i.default.BroadcastMessagesList.method}))}static listBroadcastMessagesUnseenCount(e){return(0,s.apiRequest)(Object.assign({},e,{url:i.default.BroadcastMessagesUnseenCount.url({}),method:i.default.BroadcastMessagesUnseenCount.method}))}static listBroadcastMessagesUndisposedCount(e){return(0,s.apiRequest)(Object.assign({},e,{url:i.default.BroadcastMessagesUndisposedCount.url({}),method:i.default.BroadcastMessagesUndisposedCount.method}))}static markReadBroadcastMessages(e,t){return(0,s.apiRequest)(Object.assign({},t,{url:i.default.BroadcastMessagesMarkRead.url({}),method:i.default.BroadcastMessagesMarkRead.method,data:{banner_ids:e}}))}static disposeBroadcastMessages(e,t){return(0,s.apiRequest)(Object.assign({},t,{url:i.default.BroadcastMessagesDispose.url({}),method:i.default.BroadcastMessagesDispose.method,data:{banner_ids:e}}))}}t.NotificationApiClient=n,t.default=class{static async listUserNotification(e){return n.listUserNotification(e)}static async markReadNotification(e,t){return n.markReadNotification(e,t)}static async getUnseenNotification(e){return n.getUnseenNotification(e)}static async createCustomNotification(e,t){return n.createCustomNotification(e,t)}static async listBroadcastMessages(e){return n.listBroadcastMessages(e)}static async listBroadcastMessagesUnseenCount(e){return n.listBroadcastMessagesUnseenCount(e)}static async listBroadcastMessagesUndisposedCount(e){return n.listBroadcastMessagesUndisposedCount(e)}static async disposeBroadcastMessages(e,t){return n.disposeBroadcastMessages(e,t)}static async markReadBroadcastMessages(e,t){return n.markReadBroadcastMessages(e,t)}}},6329:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=t.PreferenceApiClient=void 0;var a,s=r(2746),i=(a=r(5368))&&a.__esModule?a:{default:a},n=r(735);class o{static getAllPreferences(e){return(0,s.apiRequest)(Object.assign({},e,{url:i.default.Preferences.url({}),method:i.default.Preferences.method}))}static searchPreferences(e,t,r,a,o){const c=(0,n.urlParams)(Object.assign({},e&&{search:e},t&&{section:t},r&&{keys:r},a&&{ordering:a}));return(0,s.apiRequest)(Object.assign({},o,{url:`${i.default.Preferences.url({})}?${c.toString()}`,method:i.default.Preferences.method}))}static getSpecificPreference(e,t){return(0,s.apiRequest)(Object.assign({},t,{url:i.default.GetPreference.url({id:e}),method:i.default.Preferences.method}))}}t.PreferenceApiClient=o,t.default=class{static async getAllPreferences(e){return o.getAllPreferences(e)}static async searchPreferences(e,t,r,a,s){return o.searchPreferences(e,t,r,a,s)}static async getSpecificPreference(e,t){return o.getSpecificPreference(e,t)}}},8938:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=t.PrivateMessageApiClient=void 0;var a,s=r(2746),i=(a=r(5368))&&a.__esModule?a:{default:a},n=r(735);class o{static getAllSnippets(e){return(0,s.apiRequest)(Object.assign({},e,{url:i.default.GetSnippets.url({}),method:i.default.GetSnippets.method}))}static getAThread(e,t){const r=(0,n.urlParams)(e);return(0,s.apiRequest)(Object.assign({},t,{url:`${i.default.GetAThread.url({})}?${r.toString()}`,method:i.default.GetAThread.method}))}static getASingleMessage(e,t){return(0,s.apiRequest)(Object.assign({},t,{url:i.default.GetASingleMessage.url({id:e}),method:i.default.GetASingleMessage.method}))}static sendAMessage(e,t){return(0,s.apiRequest)(Object.assign({},t,{data:e,url:i.default.SendMessage.url({}),method:i.default.SendMessage.method}))}static deleteAMessage(e,t){return(0,s.apiRequest)(Object.assign({},t,{url:i.default.DeleteASingleMessage.url({id:e}),method:i.default.DeleteASingleMessage.method}))}static deleteAThread(e,t){const r=(0,n.urlParams)(e);return(0,s.apiRequest)(Object.assign({},t,{url:`${i.default.DeleteAThread.url({})}?${r.toString()}`,method:i.default.DeleteAThread.method}))}static uploadMedia(e,t){return(0,s.apiRequest)(Object.assign({},t,{data:e,url:i.default.PrivateMessageUploadMedia.url({}),method:i.default.PrivateMessageUploadMedia.method}))}static uploadThumbnail(e,t){return(0,s.apiRequest)(Object.assign({},t,{data:e,url:i.default.PrivateMessageUploadThumbnail.url({}),method:i.default.PrivateMessageUploadThumbnail.method}))}static uploadMediaInChunks(e,t){return(0,s.apiRequest)(Object.assign({},t,{data:e,url:i.default.PrivateMessageUploadMediaInChunks.url({}),method:i.default.PrivateMessageUploadMediaInChunks.method}))}static chunkUploadDone(e,t){return(0,s.apiRequest)(Object.assign({},t,{url:i.default.PrivateMessageChunkUploadDone.url({}),method:i.default.PrivateMessageChunkUploadDone.method,data:e}))}static searchUser(e,t){return(0,s.apiRequest)(Object.assign({},t,{url:i.default.PrivateMessageSearchUser.url({search:e}),method:i.default.PrivateMessageSearchUser.method}))}}t.PrivateMessageApiClient=o,t.default=class{static async getAllSnippets(e){return o.getAllSnippets(e)}static async getAThread(e,t){return o.getAThread(e,t)}static async getASingleMessage(e,t){return o.getASingleMessage(e,t)}static async sendAMessage(e,t){return o.sendAMessage(e,t)}static async deleteAMessage(e,t){return o.deleteAMessage(e,t)}static async deleteAThread(e,t){return o.deleteAThread(e,t)}static async uploadMedia(e,t){return o.uploadMedia(e,t)}static async uploadThumbnail(e,t){return o.uploadThumbnail(e,t)}static async uploadMediaInChunks(e,t){return o.uploadMediaInChunks(e,t)}static async chunkUploadDone(e,t){return o.chunkUploadDone(e,t)}static async searchUser(e,t){return o.searchUser(e,t)}}},4524:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=t.PromoApiClient=void 0;var a,s=(a=r(5368))&&a.__esModule?a:{default:a},i=r(2746);class n{static getSpecificPromo(e,t){return(0,i.apiRequest)(Object.assign({},t,{url:s.default.PromoCode.url({code:e}),method:s.default.User.method}))}}t.PromoApiClient=n,t.default=class{static async getSpecificPromo(e,t){return n.getSpecificPromo(e,t)}}},3661:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=t.ReactionApiClient=void 0;var a,s=r(2746),i=(a=r(5368))&&a.__esModule?a:{default:a},n=r(735);class o{static getAllReactions(e,t){const r=(0,n.urlParams)(e);return(0,s.apiRequest)(Object.assign({},t,{url:`${i.default.GetReactions.url({})}?${r.toString()}`,method:i.default.GetReactions.method}))}static getSpecificReaction(e,t){return(0,s.apiRequest)(Object.assign({url:i.default.GetSpecificReaction.url({id:e}),method:i.default.GetSpecificReaction.method},t))}}t.ReactionApiClient=o,t.default=class{static async getAllReactions(e,t){return o.getAllReactions(e,t)}static async getSpecificReaction(e,t){return o.getSpecificReaction(e,t)}}},6919:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=t.ScoreApiClient=void 0;var a,s=r(2746),i=(a=r(5368))&&a.__esModule?a:{default:a},n=r(735);class o{static getAllScores(e,t){const r=(0,n.urlParams)(e);return(0,s.apiRequest)(Object.assign({},t,{url:`${i.default.ScoresList.url({})}?${r.toString()}`,method:i.default.ScoresList.method}))}static searchScore(e,t){const r=(0,n.urlParams)(e);return(0,s.apiRequest)(Object.assign({},t,{url:`${i.default.SearchScore.url({})}?${r.toString()}`,method:i.default.SearchScore.method}))}static addScore(e,t){return(0,s.apiRequest)(Object.assign({},t,{url:i.default.AddScore.url({}),method:i.default.AddScore.method,data:e}))}}t.ScoreApiClient=o,t.default=class{static async getAllScores(e,t){return o.getAllScores(e,t)}static async searchScore(e,t){return o.searchScore(e,t)}static async addScore(e,t){return o.addScore(e,t)}}},5727:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=t.SSOApiClient=void 0;var a,s=r(2746),i=(a=r(5368))&&a.__esModule?a:{default:a};class n{static SignIn(e){return(0,s.apiRequest)(Object.assign({},e,{url:i.default.SignIn.url({}),method:i.default.SignIn.method}))}static SignUp(e,t){return(0,s.apiRequest)(Object.assign({},t,{url:i.default.SignUp.url({}),method:i.default.SignUp.method,data:e}))}}t.SSOApiClient=n,t.default=class{static async SignIn(e){return n.SignIn(e)}static async SignUp(e,t){return n.SignUp(e,t)}}},8086:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=t.SuggestionApiClient=void 0;var a,s=r(2746),i=(a=r(5368))&&a.__esModule?a:{default:a},n=r(735);class o{static getCategorySuggestion(e,t){return(0,s.apiRequest)(Object.assign({},t,{url:i.default.CategoriesSuggestion.url({}),method:i.default.CategoriesSuggestion.method,params:e}))}static getIncubatorSuggestion(e,t){return(0,s.apiRequest)(Object.assign({},t,{url:i.default.GetIncubatorSuggestion.url({}),method:i.default.GetIncubatorSuggestion.method,params:e}))}static getPollSuggestion(e,t){return(0,s.apiRequest)(Object.assign({},t,{url:i.default.PollSuggestion.url({}),method:i.default.PollSuggestion.method,params:e}))}static getUserSuggestion(e,t){return(0,s.apiRequest)(Object.assign({},t,{url:i.default.UserSuggestion.url({}),method:i.default.UserSuggestion.method,params:e}))}static getSearchSuggestion(e,t,r){const a=(0,n.urlParams)({search:e});return(0,s.apiRequest)(Object.assign({},r,{url:`${i.default.SearchSuggestion.url({})}?${a.toString()}`,method:i.default.UserSuggestion.method,params:t}))}}t.SuggestionApiClient=o,t.default=class{static async getCategorySuggestion(e,t){return o.getCategorySuggestion(e,t)}static async getIncubatorSuggestion(e,t){return o.getIncubatorSuggestion(e,t)}static async getPollSuggestion(e,t){return o.getPollSuggestion(e,t)}static async getUserSuggestion(e,t){return o.getUserSuggestion(e,t)}static async getSearchSuggestion(e,t,r){return o.getSearchSuggestion(e,t,r)}}},5830:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=t.TagApiClient=void 0;var a,s=r(2746),i=(a=r(5368))&&a.__esModule?a:{default:a},n=r(735);class o{static getAllTags(e,t){const r=(0,n.urlParams)(e);return(0,s.apiRequest)(Object.assign({},t,{url:`${i.default.TagsList.url({})}?${r.toString()}`,method:i.default.TagsList.method}))}static createTag(e,t){return(0,s.apiRequest)(Object.assign({},t,{url:i.default.CreateTag.url({}),method:i.default.CreateTag.method,data:e}))}static searchTag(e,t){const r=(0,n.urlParams)(e);return(0,s.apiRequest)(Object.assign({},t,{url:`${i.default.SearchTag.url({})}?${r.toString()}`,method:i.default.SearchTag.method}))}static getSpecificTag(e,t){return(0,s.apiRequest)(Object.assign({},t,{url:i.default.Tag.url({id:e}),method:i.default.Tag.method}))}static updateTag(e,t,r){return(0,s.apiRequest)(Object.assign({},r,{url:i.default.UpdateTag.url({id:e}),method:i.default.UpdateTag.method,data:null!=t?t:null}))}static patchTag(e,t,r){return(0,s.apiRequest)(Object.assign({},r,{url:i.default.PatchTag.url({id:e}),method:i.default.PatchTag.method,data:null!=t?t:null}))}static assignATag(e,t,r,a){return(0,s.apiRequest)(Object.assign({},a,{url:i.default.AssignTag.url({id:e}),method:i.default.AssignTag.method,data:t?{user:t}:{category:r}}))}}t.TagApiClient=o,t.default=class{static async getAllTags(e,t){return o.getAllTags(e,t)}static async createTag(e,t){return o.createTag(e,t)}static async searchTag(e,t){return o.searchTag(e,t)}static async getSpecificTag(e,t){return o.getSpecificTag(e,t)}static async updateTag(e,t,r){return o.updateTag(e,t,r)}static async patchTag(e,t,r){return o.patchTag(e,t,r)}static async assignATag(e,t,r,a){return o.assignATag(e,t,r,a)}}},671:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=t.UserApiClient=void 0;var a,s=r(2746),i=(a=r(5368))&&a.__esModule?a:{default:a},n=r(735);class o{static getAllUsers(e,t){const r=(0,n.urlParams)(e);return(0,s.apiRequest)(Object.assign({},t,{url:`${i.default.UserList.url({})}?${r.toString()}`,method:i.default.UserList.method}))}static getHiddenUsers(e,t){const r=(0,n.urlParams)(e);return(0,s.apiRequest)(Object.assign({},t,{url:`${i.default.ListHiddenUsers.url({})}?${r.toString()}`,method:i.default.ListHiddenUsers.method}))}static userAutocomplete(e,t){const r=(0,n.urlParams)(e);return(0,s.apiRequest)(Object.assign({},t,{url:`${i.default.UserAutocomplete.url({})}?${r.toString()}`,method:i.default.UserAutocomplete.method}))}static userSearch(e,t){const r=(0,n.urlParams)(e);return(0,s.apiRequest)(Object.assign({},t,{url:`${i.default.UserSearch.url({})}?${r.toString()}`,method:i.default.UserSearch.method}))}static getSpecificUser(e,t){return(0,s.apiRequest)(Object.assign({},t,{url:i.default.User.url({id:e}),method:i.default.User.method}))}static getUserCounters(e,t){return(0,s.apiRequest)(Object.assign({},t,{url:i.default.UserCounters.url({id:e}),method:i.default.UserCounters.method}))}static userUpdate(e,t,r){return(0,s.apiRequest)(Object.assign({},r,{url:i.default.UserUpdate.url({id:e}),method:i.default.UserUpdate.method,data:t}))}static userPatch(e,t,r){return(0,s.apiRequest)(Object.assign({},r,{url:i.default.UserPatch.url({id:e}),method:i.default.UserPatch.method,data:t}))}static userDelete(e,t,r){const a=(0,n.urlParams)(Object.assign({},t&&{hard:t}));return(0,s.apiRequest)(Object.assign({},r,{url:`${i.default.UserDelete.url({id:e})}?${a.toString()}`,method:i.default.UserDelete.method}))}static changeUserMail(e,t,r,a){return(0,s.apiRequest)(Object.assign({},a,{url:i.default.ChangeUserMail.url({id:e}),method:i.default.ChangeUserMail.method,data:{new_email:t,confirm:r}}))}static confirmChangeUserMail(e,t,r,a){return(0,s.apiRequest)(Object.assign({},a,{url:i.default.ConfirmUserChangeMail.url({id:e}),method:i.default.ConfirmUserChangeMail.method,data:{new_email:t,validation_code:r}}))}static changeUserPassword(e,t,r,a){return(0,s.apiRequest)(Object.assign({},a,{url:i.default.ChangeUserPassword.url({id:e}),method:i.default.ChangeUserPassword.method,data:{password:t,new_password:r}}))}static userSettings(e,t){return(0,s.apiRequest)(Object.assign({},t,{url:i.default.UserSettings.url({id:e}),method:i.default.UserSettings.method}))}static userSettingsPatch(e,t,r){return(0,s.apiRequest)(Object.assign({},r,{url:i.default.UserSettingsPatch.url({id:e}),method:i.default.UserSettingsPatch.method,data:null!=t?t:null}))}static getCurrentUser(e){return(0,s.apiRequest)(Object.assign({},e,{url:i.default.Me.url(),method:i.default.Me.method}))}static getCurrentUserAvatar(e){return(0,s.apiRequest)(Object.assign({},e,{url:i.default.MyAvatar.url({}),method:i.default.MyAvatar.method}))}static getCurrentUserPermission(e){return(0,s.apiRequest)(Object.assign({},e,{url:i.default.Permission.url({}),method:i.default.Permission.method}))}static getCurrentUserPlatform(e,t){const r=(0,n.urlParams)(Object.assign({},e&&{next:e}));return(0,s.apiRequest)(Object.assign({},t,{url:`${i.default.Platform.url({})}?${r.toString()}`,method:i.default.Platform.method}))}static getUserFollowedCategories(e,t,r){const a=(0,n.urlParams)(Object.assign({},t&&{mutual:t}));return(0,s.apiRequest)(Object.assign({},r,{url:`${i.default.FollowedCategories.url({id:e})}?${a.toString()}`,method:i.default.FollowedCategories.method}))}static getUserFeed(e,t,r){return(0,s.apiRequest)(Object.assign({},r,{url:i.default.UserFeed.url({id:e}),method:i.default.UserFeed.method,params:t}))}static getUserFollowers(e,t,r){return(0,s.apiRequest)(Object.assign({},r,{url:i.default.UserFollowers.url({id:e}),method:i.default.UserFollowers.method,params:t}))}static getUserFollowings(e,t,r){return(0,s.apiRequest)(Object.assign({},r,{url:i.default.UserFollowings.url({id:e}),method:i.default.UserFollowings.method,params:t}))}static followUser(e,t){return(0,s.apiRequest)(Object.assign({},t,{url:i.default.FollowUser.url({id:e}),method:i.default.FollowUser.method}))}static checkUserFollowed(e,t){return(0,s.apiRequest)(Object.assign({},t,{url:i.default.CheckUserFollowed.url({id:e}),method:i.default.CheckUserFollowed.method}))}static checkUserFollower(e,t){return(0,s.apiRequest)(Object.assign({},t,{url:i.default.CheckUserFollower.url({id:e}),method:i.default.CheckUserFollower.method}))}static getUserConnections(e,t,r){const a=(0,n.urlParams)(Object.assign({},t&&{mutual:t}));return(0,s.apiRequest)(Object.assign({},r,{url:`${i.default.UserConnections.url({id:e})}?${a.toString()}`,method:i.default.UserConnections.method}))}static checkUserConnections(e,t){return(0,s.apiRequest)(Object.assign({},t,{url:i.default.UserCheckConnection.url({id:e}),method:i.default.UserCheckConnection.method}))}static getUserConnectionRequests(e,t){return(0,s.apiRequest)(Object.assign({},t,{url:i.default.UserConnectionRequests.url({id:e}),method:i.default.UserConnectionRequests.method}))}static getUserRequestConnectionsSent(e,t){return(0,s.apiRequest)(Object.assign({},t,{url:i.default.UserRequestConnectionsSent.url({id:e}),method:i.default.UserRequestConnectionsSent.method}))}static userAcceptRequestConnection(e,t){return(0,s.apiRequest)(Object.assign({},t,{url:i.default.UserAcceptRequestConnection.url({id:e}),method:i.default.UserAcceptRequestConnection.method}))}static userRequestConnection(e,t){return(0,s.apiRequest)(Object.assign({},t,{url:i.default.UserRequestConnection.url({id:e}),method:i.default.UserRequestConnection.method}))}static userRemoveConnection(e,t){return(0,s.apiRequest)(Object.assign({},t,{url:i.default.UserRemoveConnection.url({id:e}),method:i.default.UserRemoveConnection.method}))}static userCancelRejectConnectionRequest(e,t){return(0,s.apiRequest)(Object.assign({},t,{url:i.default.UserCancelRejectConnectionRequest.url({id:e}),method:i.default.UserCancelRejectConnectionRequest.method}))}static userCancelRequestConnection(e,t){return(0,s.apiRequest)(Object.assign({},t,{url:i.default.UserCancelRequestConnection.url({id:e}),method:i.default.UserCancelRequestConnection.method}))}static userRejectConnectionRequest(e,t){return(0,s.apiRequest)(Object.assign({},t,{url:i.default.UserRejectConnectionRequest.url({id:e}),method:i.default.UserRejectConnectionRequest.method}))}static userMarkSeenConnectionRequest(e,t){return(0,s.apiRequest)(Object.assign({},t,{url:i.default.UserMarkSeenConnectionRequest.url({id:e}),method:i.default.UserMarkSeenConnectionRequest.method}))}static showHideUser(e,t){return(0,s.apiRequest)(Object.assign({},t,{url:i.default.UserShowHide.url({id:e}),method:i.default.UserShowHide.method}))}static checkUserHidden(e,t){return(0,s.apiRequest)(Object.assign({},t,{url:i.default.CheckUserHidden.url({id:e}),method:i.default.CheckUserHidden.method}))}static checkUserHiddenBy(e,t){return(0,s.apiRequest)(Object.assign({},t,{url:i.default.CheckUserHiddenBy.url({id:e}),method:i.default.CheckUserHiddenBy.method}))}static getUserLoyaltyPoints(e,t){return(0,s.apiRequest)(Object.assign({},t,{url:i.default.GetUserLoyaltyPoints.url({id:e}),method:i.default.GetUserLoyaltyPoints.method}))}static getUserConnectionStatuses(e,t){return(0,s.apiRequest)(Object.assign({},t,{url:i.default.UserConnectionStatuses.url({}),method:i.default.UserConnectionStatuses.method,data:{users:e}}))}static userTagToAddressContribution(e){return(0,s.apiRequest)(Object.assign({},e,{url:i.default.UserTagToAddressContribution.url({}),method:i.default.UserTagToAddressContribution.method}))}static checkUserEmailToken(e,t,r){const a=(0,n.urlParams)({email_token:t});return(0,s.apiRequest)(Object.assign({},r,{url:`${i.default.CheckEmailToken.url({id:e})}?${a.toString()}`,method:i.default.CheckEmailToken.method}))}static addUserAvatar(e,t){return(0,s.apiRequest)(Object.assign({url:i.default.AddAvatar.url({}),method:i.default.AddAvatar.method,data:e},t))}static getUserAvatars(e){return(0,s.apiRequest)(Object.assign({url:i.default.GetAvatars.url({}),method:i.default.GetAvatars.method},e))}static removeUserAvatar(e,t){return(0,s.apiRequest)(Object.assign({url:i.default.RemoveAvatar.url({}),method:i.default.RemoveAvatar.method,data:{avatar_id:e}},t))}static setUserPrimaryAvatar(e,t){return(0,s.apiRequest)(Object.assign({url:i.default.SetPrimaryAvatar.url({}),method:i.default.SetPrimaryAvatar.method,data:{avatar_id:e}},t))}static getProviderAssociations(e,t){return(0,s.apiRequest)(Object.assign({},t,{url:i.default.ProviderAssociations.url({id:e}),method:i.default.ProviderAssociations.method}))}static createProviderAssociation(e,t){return(0,s.apiRequest)(Object.assign({},t,{data:e,url:i.default.CreateProviderAssociation.url({id:e.user_id}),method:i.default.CreateProviderAssociation.method}))}static deleteProviderAssociation(e,t){return(0,s.apiRequest)(Object.assign({},t,{data:e,url:i.default.DeleteProviderAssociation.url({id:e.user_id}),method:i.default.DeleteProviderAssociation.method}))}}t.UserApiClient=o,t.default=class{static async getAllUsers(e,t){return o.getAllUsers(e,t)}static async getHiddenUsers(e,t){return o.getHiddenUsers(e,t)}static async userAutocomplete(e,t){return o.userAutocomplete(e,t)}static async userSearch(e,t){return o.userSearch(e,t)}static async getSpecificUser(e,t){return o.getSpecificUser(e,t)}static async getUserCounters(e,t){return o.getUserCounters(e,t)}static async userUpdate(e,t,r){return o.userUpdate(e,t,r)}static async userPatch(e,t,r){return o.userPatch(e,t,r)}static async userDelete(e,t,r){return o.userDelete(e,t,r)}static async changeUserMail(e,t,r,a){return o.changeUserMail(e,t,r,a)}static async confirmChangeUserMail(e,t,r,a){return o.confirmChangeUserMail(e,t,r,a)}static async changeUserPassword(e,t,r,a){return o.changeUserPassword(e,t,r,a)}static async userSettings(e,t){return o.userSettings(e,t)}static async userSettingsPatch(e,t,r){return o.userSettingsPatch(e,t,r)}static async getCurrentUser(e){return o.getCurrentUser(e)}static async getCurrentUserAvatar(e){return o.getCurrentUserAvatar(e)}static async getCurrentUserPermission(e){return o.getCurrentUserPermission(e)}static async getCurrentUserPlatform(e,t){return o.getCurrentUserPlatform(e,t)}static async getUserFollowedCategories(e,t,r){return o.getUserFollowedCategories(e,t,r)}static async getUserFeed(e,t,r){return o.getUserFeed(e,t,r)}static async getUserFollowers(e,t,r){return o.getUserFollowers(e,t,r)}static async getUserFollowings(e,t,r){return o.getUserFollowings(e,t,r)}static async followUser(e,t){return o.followUser(e,t)}static async checkUserFollowed(e,t){return o.checkUserFollowed(e,t)}static async checkUserFollower(e,t){return o.checkUserFollower(e,t)}static async getUserConnections(e,t,r){return o.getUserConnections(e,t,r)}static async checkUserConnections(e,t){return o.checkUserConnections(e,t)}static async getUserConnectionRequests(e,t){return o.getUserConnectionRequests(e,t)}static async getUserRequestConnectionsSent(e,t){return o.getUserRequestConnectionsSent(e,t)}static async userAcceptRequestConnection(e,t){return o.userAcceptRequestConnection(e,t)}static async userRequestConnection(e,t){return o.userRequestConnection(e,t)}static async userRemoveConnection(e,t){return o.userRemoveConnection(e,t)}static async userCancelRejectConnectionRequest(e,t){return o.userCancelRejectConnectionRequest(e,t)}static async userCancelRequestConnection(e,t){return o.userCancelRequestConnection(e,t)}static async userRejectConnectionRequest(e,t){return o.userRejectConnectionRequest(e,t)}static async userMarkSeenConnectionRequest(e,t){return o.userMarkSeenConnectionRequest(e,t)}static async showHideUser(e,t){return o.showHideUser(e,t)}static async checkUserHidden(e,t){return o.checkUserHidden(e,t)}static async checkUserHiddenBy(e,t){return o.checkUserHiddenBy(e,t)}static async getUserLoyaltyPoints(e,t){return o.getUserLoyaltyPoints(e,t)}static async getUserConnectionStatuses(e,t){return o.getUserConnectionStatuses(e,t)}static async userTagToAddressContribution(e){return o.userTagToAddressContribution(e)}static async checkUserEmailToken(e,t,r){return o.checkUserEmailToken(e,t,r)}static async addUserAvatar(e,t){return o.addUserAvatar(e,t)}static async getUserAvatars(e){return o.getUserAvatars(e)}static async removeUserAvatar(e,t){return o.removeUserAvatar(e,t)}static async setUserPrimaryAvatar(e,t){return o.setUserPrimaryAvatar(e,t)}static async getProviderAssociations(e,t){return o.getProviderAssociations(e,t)}static async createProviderAssociation(e,t){return o.createProviderAssociation(e,t)}static async deleteProviderAssociation(e,t){return o.deleteProviderAssociation(e,t)}}},3796:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=t.WebhookApiClient=void 0;var a,s=(a=r(5368))&&a.__esModule?a:{default:a},i=r(2746);class n{static getAllWebhookEndpoints(e){return(0,i.apiRequest)(Object.assign({},e,{url:s.default.WebhookEndpointsList.url({}),method:s.default.WebhookEndpointsList.method}))}static getAllWebhookEvents(e){return(0,i.apiRequest)(Object.assign({},e,{url:s.default.WebhookEventsList.url({}),method:s.default.WebhookEventsList.method}))}static createWebhookEndpoint(e,t){return(0,i.apiRequest)(Object.assign({},t,{url:s.default.WebhookCreate.url({}),method:s.default.WebhookCreate.method,data:e}))}static getASpecificWebhookEndpoint(e,t){return(0,i.apiRequest)(Object.assign({},t,{url:s.default.GetSpecificWebhook.url({id:e}),method:s.default.GetSpecificWebhook.method}))}static updateASpecificWebhookEndpoint(e,t,r){return(0,i.apiRequest)(Object.assign({},r,{url:s.default.WebhookUpdate.url({id:e}),method:s.default.WebhookUpdate.method,data:t}))}static updateASingleWebhookEndpointField(e,t,r){return(0,i.apiRequest)(Object.assign({},r,{url:s.default.WebhookPatch.url({id:e}),method:s.default.WebhookPatch.method,data:t}))}static deleteWebhookEndpoint(e,t){return(0,i.apiRequest)(Object.assign({},t,{url:s.default.WebhookDelete.url({id:e}),method:s.default.WebhookDelete.method}))}static getAllWebhookEndpointAttempts(e,t){return(0,i.apiRequest)(Object.assign({},t,{url:s.default.WebhookEndpointAttempts.url({id:e}),method:s.default.WebhookEndpointAttempts.method}))}static expireWebhookSigningSecret(e,t){return(0,i.apiRequest)(Object.assign({},t,{url:s.default.WebhookExpireSigningSecret.url({id:e}),method:s.default.WebhookExpireSigningSecret.method}))}static revealWebhookSigningSecret(e,t){return(0,i.apiRequest)(Object.assign({},t,{url:s.default.WebhookRevealSigningSecret.url({id:e}),method:s.default.WebhookRevealSigningSecret.method}))}static resendWebhookEndpointEvent(e,t,r){return(0,i.apiRequest)(Object.assign({},r,{url:s.default.WebhookResendEndpointEvent.url({id:e}),method:s.default.WebhookResendEndpointEvent.method,data:{event:t}}))}static resendMultipleWebhookEndpointEvent(e,t,r){return(0,i.apiRequest)(Object.assign({},r,{url:s.default.WebhookResendMultipleEndpointEvent.url({id:e}),method:s.default.WebhookResendMultipleEndpointEvent.method,data:{event:t}}))}}t.WebhookApiClient=n,t.default=class{static async getAllWebhookEndpoints(e){return n.getAllWebhookEndpoints(e)}static async getAllWebhookEvents(e){return n.getAllWebhookEvents(e)}static async createWebhookEndpoint(e,t){return n.createWebhookEndpoint(e,t)}static async getASpecificWebhookEndpoint(e,t){return n.getASpecificWebhookEndpoint(e,t)}static async updateASpecificWebhookEndpoint(e,t,r){return n.updateASpecificWebhookEndpoint(e,t,r)}static async updateASingleWebhookEndpointField(e,t,r){return n.updateASingleWebhookEndpointField(e,t,r)}static async deleteWebhookEndpoint(e,t){return n.deleteWebhookEndpoint(e,t)}static async getAllWebhookEndpointAttempts(e,t){return n.getAllWebhookEndpointAttempts(e,t)}static async expireWebhookSigningSecret(e,t){return n.expireWebhookSigningSecret(e,t)}static async revealWebhookSigningSecret(e,t){return n.revealWebhookSigningSecret(e,t)}static async resendWebhookEndpointEvent(e,t,r){return n.resendWebhookEndpointEvent(e,t,r)}static async resendMultipleWebhookEndpointEvent(e,t,r){return n.resendMultipleWebhookEndpointEvent(e,t,r)}}},2319:(e,t)=>{"use strict";t.__esModule=!0},432:(e,t)=>{"use strict";t.__esModule=!0},1511:(e,t)=>{"use strict";t.__esModule=!0},3444:(e,t)=>{"use strict";t.__esModule=!0},5386:(e,t)=>{"use strict";t.__esModule=!0},4767:(e,t)=>{"use strict";t.__esModule=!0},6797:(e,t)=>{"use strict";t.__esModule=!0},7022:(e,t)=>{"use strict";t.__esModule=!0},4505:(e,t)=>{"use strict";t.__esModule=!0},5469:(e,t)=>{"use strict";t.__esModule=!0},8947:(e,t)=>{"use strict";t.__esModule=!0},994:(e,t,r)=>{"use strict";t.__esModule=!0;var a=r(2319);t.AccountCreateParams=a.AccountCreateParams,t.AccountVerifyParams=a.AccountVerifyParams,t.AccountRecoverParams=a.AccountRecoverParams,t.AccountResetParams=a.AccountResetParams,t.AccountSearchParams=a.AccountSearchParams;var s=r(5998);t.SCPaginatedResponse=s.SCPaginatedResponse;var i=r(419);t.WebhookParamType=i.WebhookParamType,t.WebhookEventsType=i.WebhookEventsType;var n=r(469);t.SSOSignUpParams=n.SSOSignUpParams;var o=r(3444);t.CommentListParams=o.CommentListParams,t.CommentCreateParams=o.CommentCreateParams;var c=r(8947);t.IncubatorCreateParams=c.IncubatorCreateParams,t.IncubatorSearchParams=c.IncubatorSearchParams;var u=r(1303);t.LoyaltyPrizeParams=u.LoyaltyPrizeParams;var l=r(4960);t.ModerationParams=l.ModerationParams,t.ModerateContributionParams=l.ModerateContributionParams,t.FlaggedContributionParams=l.FlaggedContributionParams;var d=r(6768);t.CustomNotificationParams=d.CustomNotificationParams;var p=r(5967);t.UserGetParams=p.UserGetParams,t.UserAutocompleteParams=p.UserAutocompleteParams,t.UserScoreParams=p.UserScoreParams,t.UserSearchParams=p.UserSearchParams;var h=r(5549);t.TagParams=h.TagParams,t.TagGetParams=h.TagGetParams;var m=r(7398);t.MediaCreateParams=m.MediaCreateParams,t.MediaTypes=m.MediaTypes,t.ChunkUploadParams=m.ChunkUploadParams,t.ChunkUploadCompleteParams=m.ChunkUploadCompleteParams;var g=r(6461);t.ThreadParams=g.ThreadParams,t.MessageCreateParams=g.MessageCreateParams,t.MessageMediaUploadParams=g.MessageMediaUploadParams,t.MessageThumbnailUploadParams=g.MessageThumbnailUploadParams,t.MessageChunkUploadDoneParams=g.MessageChunkUploadDoneParams,t.MessageMediaChunksParams=g.MessageMediaChunksParams,t.ThreadDeleteParams=g.ThreadDeleteParams;var f=r(1511);t.CategoryParams=f.CategoryParams;var y=r(5386);t.CustomAdvParams=y.CustomAdvParams;var b=r(4767);t.CustomPageParams=b.CustomPageParams,t.CustomPageSearchParams=b.CustomPageSearchParams;var C=r(6797);t.EmbedUpdateParams=C.EmbedUpdateParams,t.EmbedSearchParams=C.EmbedSearchParams;var v=r(432);t.BaseGetParams=v.BaseGetParams,t.BaseSearchParams=v.BaseSearchParams;var S=r(5469);t.FeedObjGetParams=S.FeedObjGetParams,t.FeedObjCreateParams=S.FeedObjCreateParams,t.FeedObjectPollVotesSearch=S.FeedObjectPollVotesSearch;var w=r(4505);t.FeedParams=w.FeedParams;var A=r(2460);t.LegalPageFilterParams=A.LegalPageFilterParams;var P=r(7022);t.FeatureParams=P.FeatureParams;var E=r(2846);t.ScoreParams=E.ScoreParams;var R=r(8291);t.InsightCommonParams=R.InsightCommonParams,t.InsightEmbedParams=R.InsightEmbedParams,t.InsightUserParams=R.InsightUserParams,t.InsightContributionParams=R.InsightContributionParams;var O=r(7844);t.ReactionParams=O.ReactionParams},8291:(e,t)=>{"use strict";t.__esModule=!0},2460:(e,t)=>{"use strict";t.__esModule=!0},7398:(e,t)=>{"use strict";let r;t.__esModule=!0,t.MediaTypes=void 0,t.MediaTypes=r,function(e){e.URL="url",e.SHARE="share",e.EMBED="embed"}(r||(t.MediaTypes=r={}))},4960:(e,t)=>{"use strict";t.__esModule=!0},6768:(e,t)=>{"use strict";t.__esModule=!0},5998:(e,t)=>{"use strict";t.__esModule=!0},6461:(e,t)=>{"use strict";t.__esModule=!0},1303:(e,t)=>{"use strict";t.__esModule=!0},7844:(e,t)=>{"use strict";t.__esModule=!0},2846:(e,t)=>{"use strict";t.__esModule=!0},469:(e,t)=>{"use strict";t.__esModule=!0},5549:(e,t)=>{"use strict";t.__esModule=!0},5967:(e,t)=>{"use strict";t.__esModule=!0},419:(e,t)=>{"use strict";t.__esModule=!0},2746:(e,t,r)=>{"use strict";t.__esModule=!0,t.apiRequest=function(e){return s.default.request(e).then((t=>t.status>=300?(console.log(`Unable to ${e.method} ${e.url} (Response code: ${t.status}).`),Promise.reject(t)):Promise.resolve(t.data))).catch((t=>(console.log(`Unable to ${e.method} ${e.url} ${t}`),Promise.reject(t))))};var a,s=(a=r(2037))&&a.__esModule?a:{default:a}},6021:(e,t,r)=>{"use strict";t.__esModule=!0,t.defaultError=n,t.formatHttpError=function(e){let t={};return e.response&&e.response.data&&"object"==typeof e.response.data&&e.response.data.errors?t=Object.assign({},o(e.response.data.errors)):n(e),t},t.getCancelTokenSourceRequest=function(){return i.default.CancelToken.source()};var a,s=r(2990),i=(a=r(9644))&&a.__esModule?a:{default:a};function n(e){e.request?console.log(e.request):console.log("Error",e.message)}const o=e=>{const t={};if(Array.isArray(e))for(let r=0;r<e.length;r++){const a=e[r];a.field?t[`${(0,s.camelCase)(a.field)}Error`]=Array.isArray(a.messages)?o(a.messages):a.messages:t.error=a.message}else t.error=e.errors;return t}},6789:(e,t,r)=>{"use strict";t.__esModule=!0,t.generateJWTToken=async function(e,t,r="2h"){let s={token_type:"access",user_id:e,jti:(new Date).getTime().toString()};const i=(new TextEncoder).encode(t);return await new a.SignJWT(s).setProtectedHeader({alg:"HS256",typ:"JWT"}).setIssuedAt().setExpirationTime(r||"2h").sign(i)},t.parseJwt=function(e){let t=e.split(".")[1].replace(/-/g,"+").replace(/_/g,"/"),r=decodeURIComponent(atob(t).split("").map((function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)})).join(""));return JSON.parse(r)};var a=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=s(t);if(r&&r.has(e))return r.get(e);var a={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e)if("default"!==n&&Object.prototype.hasOwnProperty.call(e,n)){var o=i?Object.getOwnPropertyDescriptor(e,n):null;o&&(o.get||o.set)?Object.defineProperty(a,n,o):a[n]=e[n]}return a.default=e,r&&r.set(e,a),a}(r(4893));function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(s=function(e){return e?r:t})(e)}},735:(e,t)=>{"use strict";t.__esModule=!0,t.urlParams=void 0,t.urlParams=e=>new URLSearchParams(e)},2990:(e,t,r)=>{"use strict";t.__esModule=!0;var a=r(4136);t.capitalize=a.capitalize,t.isString=a.isString,t.stripHtml=a.stripHtml,t.camelCase=a.camelCase,t.copyTextToClipboard=a.copyTextToClipboard,t.fallbackCopyTextToClipboard=a.fallbackCopyTextToClipboard,t.random=a.random,t.slugify=a.slugify;var s=r(8234);t.isValidUrl=s.isValidUrl,t.isValidUrls=s.isValidUrls,t.urlReplacer=s.urlReplacer,t.getDomain=s.getDomain,t.appendURLSearchParams=s.appendURLSearchParams,t.urlB64ToUint8Array=s.urlB64ToUint8Array,t.getQueryStringParameter=s.getQueryStringParameter,t.updateQueryStringParameter=s.updateQueryStringParameter;var i=r(1405);t.getHighestSafeWindowContext=i.getHighestSafeWindowContext,t.getWindowWidth=i.getWindowWidth,t.getWindowHeight=i.getWindowHeight,t.isClientSideRendering=i.isClientSideRendering;var n=r(1371);t.mergeDeep=n.mergeDeep,t.isObject=n.isObject,t.objectWithoutProperties=n.objectWithoutProperties;var o=r(873);t.arraysEqual=o.arraysEqual;var c=r(7288);t.loadVersionBrowser=c.loadVersionBrowser;var u=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=m(t);if(r&&r.has(e))return r.get(e);var a={},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var n=s?Object.getOwnPropertyDescriptor(e,i):null;n&&(n.get||n.set)?Object.defineProperty(a,i,n):a[i]=e[i]}return a.default=e,r&&r.set(e,a),a}(r(2789));t.LRUCache=u.default,t.LruCache=u.LruCache,t.CacheStrategies=u.CacheStrategies;var l=r(9040);t.Logger=l.Logger;var d,p=(d=r(1521))&&d.__esModule?d:{default:d};t.WSClient=p.default;var h=r(3877);function m(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(m=function(e){return e?r:t})(e)}t.resizeImage=h.resizeImage},873:(e,t)=>{"use strict";t.__esModule=!0,t.arraysEqual=void 0,t.arraysEqual=(e,t)=>{if(e===t)return!0;if(null==e||null==t)return!1;if(e.length!==t.length)return!1;for(let r=0;r<e.length;++r)if(e[r]!==t[r])return!1;return!0}},7288:(e,t)=>{"use strict";t.__esModule=!0,t.loadVersionBrowser=void 0,t.loadVersionBrowser=()=>{if("userAgentData"in navigator){const e=navigator.userAgentData;let t,r,a=null;for(let s=0;s<e.brands.length;s++){const i=e.brands[s].brand;if(r=e.brands[s].version,null!==i.match(/opera|chrome|edge|safari|firefox|msie|trident/i)){if(null===i.match(/chrome/i))return t=i.substr(i.indexOf(" ")+1),{name:t,version:r};a=r}}if(null!==a)return{name:"chrome",version:a}}let e,t=navigator.userAgent,r=t.match(/(opera|chrome|safari|firefox|msie|trident(?=\/))\/?\s*(\d+)/i)||[];return/trident/i.test(r[1])?(e=/\brv[ :]+(\d+)/g.exec(t)||[],{name:"IE",version:e[1]||""}):"Chrome"===r[1]&&(e=t.match(/\bOPR\/(\d+)/),null!=e)?{name:"Opera",version:e[1]}:(r=r[2]?[r[1],r[2]]:[navigator.appName,navigator.appVersion,"-?"],null!=(e=t.match(/version\/(\d+)/i))&&r.splice(1,1,e[1]),{name:r[0],version:r[1]})}},2789:(e,t)=>{"use strict";t.__esModule=!0,t.default=t.LruCache=t.CacheStrategies=void 0;class r{constructor(e=1e4){this.values=new Map,this.maxEntries=e,"undefined"!=typeof window&&(window.__viewSCCache=this.values)}get(e,t){let r;return this.values.has(e)?(r=this.values.get(e),this.values.delete(e),this.values.set(e,r)):t&&(r=t,this.values.set(e,r)),r}set(e,t){if(this.values.size>=this.maxEntries){const e=this.values.keys().next().value;this.values.delete(e)}this.values.set(e,t)}hasKey(e){return this.values.has(e)}delete(e){this.values.has(e)&&this.values.delete(e)}deleteKeys(e){e.forEach((e=>{this.values.has(e)&&this.values.delete(e)}))}deleteKeysWithPrefix(e){this.values.forEach(((t,r)=>{r.startsWith(e)&&this.values.delete(r)}))}clean(){this.values=new Map}evaluate(){console.log(this.values)}}var a;t.LruCache=r,t.CacheStrategies=a,function(e){e.CACHE_FIRST="Cache-first",e.NETWORK_ONLY="Network-only",e.STALE_WHILE_REVALIDATE="Stale-While-Revalidate"}(a||(t.CacheStrategies=a={}));var s=new r;t.default=s},3877:(e,t)=>{"use strict";t.__esModule=!0,t.resizeImage=void 0,t.resizeImage=e=>new Promise(((t,r)=>{const a=new FileReader;a.onload=e=>{let r=new Image;r.onload=function(e){let a=document.createElement("canvas"),s=1920,i=r.width,n=r.height;i>n?i>s&&(n*=s/i,i=s):n>s&&(i*=s/n,n=s),a.width=i,a.height=n,a.getContext("2d").drawImage(r,0,0,i,n),t((e=>{let t;t=e.split(",")[0].indexOf("base64")>=0?atob(e.split(",")[1]):unescape(e.split(",")[1]);let r=e.split(",")[0].split(":")[1].split(";")[0],a=new Uint8Array(t.length);for(let e=0;e<t.length;e++)a[e]=t.charCodeAt(e);return new Blob([a],{type:r})})(a.toDataURL("image/jpeg")))},r.src=e.target.result},a.onerror=r,a.readAsDataURL(e)}))},9040:(e,t)=>{"use strict";t.__esModule=!0,t.Logger=void 0,t.Logger=class{static info(e,t){console.info(`%c[${e}]`,"color:#008080",` ${t}`)}static warn(e,t){console.warn(`%c[${e}]`,"color:#008080",` ${t}`)}static error(e,t){console.error(`%c[${e}]`,"color:#008080",` ${t}`)}static log(e,t){console.log(`%c[${e}]`,"color:#008080",` ${t}`)}static debug(e,t){console.debug(`%c[${e}]`,"color:#008080",` ${t}`)}}},1371:(e,t)=>{"use strict";function r(e){return"object"==typeof e&&!Array.isArray(e)&&null!==e}t.__esModule=!0,t.isObject=r,t.mergeDeep=function e(t,a){let s=Object.assign({},t);return r(t)&&r(a)&&Object.keys(a).forEach((i=>{r(a[i])?i in t?s[i]=e(t[i],a[i]):Object.assign(s,{[i]:a[i]}):Object.assign(s,{[i]:a[i]})})),s},t.objectWithoutProperties=function(e,t){let r=e?Object.assign({},e):null;return t.forEach((function(e){r&&e in r&&delete r[e]})),r}},4136:(e,t)=>{"use strict";function r(e){let t=document.createElement("textarea");t.value=e,t.style.top="0",t.style.left="0",t.style.position="fixed",document.body.appendChild(t),t.focus(),t.select();try{return document.execCommand("copy"),document.body.removeChild(t),Promise.resolve()}catch(e){return document.body.removeChild(t),Promise.reject(e)}}t.__esModule=!0,t.camelCase=function(e){return e.toLowerCase().replace(/[-_]+/g," ").replace(/[^\w\s]/g,"").replace(/ (.)/g,(e=>e.toUpperCase())).replace(/ /g,"")},t.capitalize=function(e){let t="",r=e.split(" ");for(let e=0;e<r.length;e++)t+=r[e].substring(0,1).toUpperCase()+r[e].substring(1,r[e].length);return t},t.copyTextToClipboard=function(e){return navigator.clipboard?navigator.clipboard.writeText(e):r(e)},t.fallbackCopyTextToClipboard=r,t.isString=function(e){return"string"==typeof e||e instanceof String},t.random=function(){return(Math.random()+1).toString(36).substring(7)},t.slugify=function(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")},t.stripHtml=function(e){return e.replace(/<[^>]*>?/gm,"").trim()}},8234:(e,t)=>{"use strict";t.__esModule=!0,t.appendURLSearchParams=function(e,t){let r=e;if(t.length&&r){const e=Object.keys(t[0])[0];r+=(r.split("?")[1]?"&":"?")+`${e}=${t[0][e]}`,t.slice(1).map((e=>{const t=Object.keys(e)[0];r+=`&${t}=${e[t]}`}))}return r},t.urlReplacer=t.urlB64ToUint8Array=t.updateQueryStringParameter=t.isValidUrls=t.isValidUrl=t.getQueryStringParameter=t.getDomain=void 0,t.urlReplacer=e=>t=>function(e,t){const r=/\$\(([^)]+)?\)/g;let a=r.exec(e);for(;a;)e=e.replace(a[0],t[a[1]]),r.lastIndex=0,a=r.exec(e);return e}(e,t),t.getDomain=e=>{const t=e.match(/^https?\:\/\/([^\/?#]+)(?:[\/?#]|$)/i);return t&&t[1]?t[1]:""};const r=e=>/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-/]))?/.test(e);t.isValidUrl=r,t.isValidUrls=(e,t)=>e.trim().split(t).every(r),t.urlB64ToUint8Array=e=>{const t=(e+"=".repeat((4-e.length%4)%4)).replace(/-/g,"+").replace(/_/g,"/"),r=window.atob(t),a=new Uint8Array(r.length);for(let e=0;e<r.length;++e)a[e]=r.charCodeAt(e);return a},t.getQueryStringParameter=(e,t)=>e&&t?new URL(e).searchParams.get(t):null,t.updateQueryStringParameter=(e,t,r)=>{if(e&&t&&r){let a=new RegExp("([?&])"+t+"=.*?(&|$)","i"),s=-1!==e.indexOf("?")?"&":"?";return e.match(a)?e.replace(a,"$1"+t+"="+r+"$2"):e+s+t+"="+r}return e}},1521:(e,t)=>{"use strict";t.__esModule=!0,t.default=void 0;class r{constructor(e){this._attempts=1,this._heartbeatInterval=null,this._missedHeartbeats=0,this.isValidOptions(e)&&(this._cfg=Object.assign({},{heartbeatMsg:null,debug:!1,mustReconnect:!0},e),this.connect())}static getInstance(e){return this._instance=this._instance||new r(e),this._instance}connect(){try{if(this._ws&&(this.isConnecting()||this.isConnected()))return void(this._cfg.debug&&console.info("Websocket is connecting or already connected."));"function"==typeof this._cfg.connecting&&this._cfg.connecting(),this._cfg.debug&&console.info(`Connecting to ${this._cfg.uri} ...`),this._ws=new WebSocket(this._cfg.uri,this._cfg.protocols),this._ws.onopen=this.onOpen.bind(this),this._ws.onmessage=this.onMessage.bind(this),this._ws.onerror=this.onError.bind(this),this._ws.onclose=this.onClose.bind(this),this._timer=null}catch(e){console.error(e),this.tryToReconnect()}}isValidOptions(e){let t=!1;return e?(e.uri||(console.error("Invalid WSClient Uri options."),t=!0),e&&e.connecting&&"function"!=typeof e.connecting&&(console.error("Invalid WSClient connecting options."),t=!0),e&&e.connected&&"function"!=typeof e.connected&&(console.error("Invalid WSClient connected options."),t=!0),e&&e.receiveMessage&&"function"!=typeof e.receiveMessage&&(console.error("Invalid WSClient receiveMessage options."),t=!0),e&&e.disconnected&&"function"!=typeof e.disconnected&&(console.error("Invalid WSClient connecting options."),t=!0),e&&e.heartbeatMsg&&"string"!=typeof e.heartbeatMsg&&(console.error("Invalid WSClient heartbeatMsg options."),t=!0),e&&e.debug&&"boolean"!=typeof e.debug&&(console.error("Invalid WSClient debug options."),t=!0),!t):(console.error("Invalid WSClient options."),t)}tryToReconnect(){if(this._cfg.mustReconnect&&!this._timer){this._cfg.debug&&console.info("Reconnecting...");let e=this.generateInterval(this._attempts);this._timer=setTimeout(this.reconnect.bind(this),e)}}reconnect(){this._attempts++,this.connect()}sendHeartbeat(){try{if(this._missedHeartbeats++,this._missedHeartbeats>3)throw new Error("Too many missed heartbeats.");this._ws.send(this._cfg.heartbeatMsg)}catch(e){clearInterval(this._heartbeatInterval),this._heartbeatInterval=null,this._cfg.debug&&console.warn(`Closing connection. Reason: ${e.message}`),this.isClosing()||this.isClosed()||this.close()}}onOpen(){this._cfg.debug&&console.info("Connected!"),this._attempts=1,this._cfg.heartbeatMsg&&null===this._heartbeatInterval&&(this._missedHeartbeats=0,this._heartbeatInterval=setInterval(this.sendHeartbeat.bind(this),5e3)),"function"==typeof this._cfg.connected&&this._cfg.connected()}onClose(e){this._cfg.debug&&console.info("Connection closed!"),"function"==typeof this._cfg.disconnected&&this._cfg.disconnected(e),this.tryToReconnect()}onError(e){this._cfg.debug&&console.error("Websocket connection is broken!"),this._cfg.debug&&console.error(e)}onMessage(e){if(this._cfg.heartbeatMsg&&e.data===this._cfg.heartbeatMsg)this._missedHeartbeats=0;else if("function"==typeof this._cfg.receiveMessage)return this._cfg.receiveMessage(e.data)}generateInterval(e){let t=1e3*(Math.pow(2,e)-1);return t>3e4&&(t=3e4),Math.random()*t}sendMessage(e){this._ws&&this._ws.send(e)}getState(){return this._ws&&this._ws.readyState}isConnecting(){return this._ws&&0===this._ws.readyState}isConnected(){return this._ws&&1===this._ws.readyState}isClosing(){return this._ws&&2===this._ws.readyState}isClosed(){return this._ws&&3===this._ws.readyState}close(){clearInterval(this._heartbeatInterval),this._cfg.mustReconnect=!1,this.isClosing()&&this.isClosed()||(this._ws.close(),this._cfg.debug&&console.error("Websocket closed."))}}t.default=r},1405:(e,t,r)=>{"use strict";t.__esModule=!0,t.getHighestSafeWindowContext=function e(t=r.g.window.self){return t===r.g.window.top||(()=>{try{return r.g.window.location.hostname!==r.g.window.parent.location.hostname}catch(e){return!0}})()?t:e(t.parent)},t.getWindowHeight=function(){return void 0!==r.g.window?r.g.window.innerHeight:0},t.getWindowWidth=function(){return void 0!==r.g.window?r.g.window.innerWidth:0},t.isClientSideRendering=function(){return"undefined"!=typeof window}},4893:(e,t,r)=>{"use strict";r.r(t),r.d(t,{CompactEncrypt:()=>et,CompactSign:()=>rt,EmbeddedJWK:()=>dt,EncryptJWT:()=>ot,FlattenedEncrypt:()=>qe,FlattenedSign:()=>tt,GeneralEncrypt:()=>Ge,GeneralSign:()=>st,SignJWT:()=>nt,UnsecuredJWT:()=>bt,base64url:()=>s,calculateJwkThumbprint:()=>ut,calculateJwkThumbprintUri:()=>lt,compactDecrypt:()=>ke,compactVerify:()=>Je,createLocalJWKSet:()=>gt,createRemoteJWKSet:()=>yt,decodeJwt:()=>wt,decodeProtectedHeader:()=>St,errors:()=>a,exportJWK:()=>Fe,exportPKCS8:()=>Ie,exportSPKI:()=>He,flattenedDecrypt:()=>je,flattenedVerify:()=>xe,generalDecrypt:()=>Me,generalVerify:()=>Ne,generateKeyPair:()=>Pt,generateSecret:()=>Et,importJWK:()=>Re,importPKCS8:()=>Ee,importSPKI:()=>Ae,importX509:()=>Pe,jwtDecrypt:()=>Ze,jwtVerify:()=>Qe});var a={};r.r(a),r.d(a,{JOSEAlgNotAllowed:()=>A,JOSEError:()=>v,JOSENotSupported:()=>P,JWEDecryptionFailed:()=>E,JWEInvalid:()=>R,JWKInvalid:()=>T,JWKSInvalid:()=>U,JWKSMultipleMatchingKeys:()=>k,JWKSNoMatchingKey:()=>j,JWKSTimeout:()=>M,JWSInvalid:()=>O,JWSSignatureVerificationFailed:()=>H,JWTClaimValidationFailed:()=>S,JWTExpired:()=>w,JWTInvalid:()=>_});var s={};r.r(s),r.d(s,{decode:()=>vt,encode:()=>Ct});const i=crypto,n=e=>e instanceof CryptoKey,o=async(e,t)=>{const r=`SHA-${e.slice(-3)}`;return new Uint8Array(await i.subtle.digest(r,t))},c=new TextEncoder,u=new TextDecoder,l=2**32;function d(...e){const t=e.reduce(((e,{length:t})=>e+t),0),r=new Uint8Array(t);let a=0;return e.forEach((e=>{r.set(e,a),a+=e.length})),r}function p(e,t,r){if(t<0||t>=l)throw new RangeError(`value must be >= 0 and <= 4294967295. Received ${t}`);e.set([t>>>24,t>>>16,t>>>8,255&t],r)}function h(e){const t=Math.floor(e/l),r=e%l,a=new Uint8Array(8);return p(a,t,0),p(a,r,4),a}function m(e){const t=new Uint8Array(4);return p(t,e),t}function g(e){return d(m(e.length),e)}const f=e=>{let t=e;"string"==typeof t&&(t=c.encode(t));const r=[];for(let e=0;e<t.length;e+=32768)r.push(String.fromCharCode.apply(null,t.subarray(e,e+32768)));return btoa(r.join(""))},y=e=>f(e).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_"),b=e=>{const t=atob(e),r=new Uint8Array(t.length);for(let e=0;e<t.length;e++)r[e]=t.charCodeAt(e);return r},C=e=>{let t=e;t instanceof Uint8Array&&(t=u.decode(t)),t=t.replace(/-/g,"+").replace(/_/g,"/").replace(/\s/g,"");try{return b(t)}catch(e){throw new TypeError("The input to be decoded is not correctly encoded.")}};class v extends Error{constructor(e){var t;super(e),this.code="ERR_JOSE_GENERIC",this.name=this.constructor.name,null===(t=Error.captureStackTrace)||void 0===t||t.call(Error,this,this.constructor)}static get code(){return"ERR_JOSE_GENERIC"}}class S extends v{constructor(e,t="unspecified",r="unspecified"){super(e),this.code="ERR_JWT_CLAIM_VALIDATION_FAILED",this.claim=t,this.reason=r}static get code(){return"ERR_JWT_CLAIM_VALIDATION_FAILED"}}class w extends v{constructor(e,t="unspecified",r="unspecified"){super(e),this.code="ERR_JWT_EXPIRED",this.claim=t,this.reason=r}static get code(){return"ERR_JWT_EXPIRED"}}class A extends v{constructor(){super(...arguments),this.code="ERR_JOSE_ALG_NOT_ALLOWED"}static get code(){return"ERR_JOSE_ALG_NOT_ALLOWED"}}class P extends v{constructor(){super(...arguments),this.code="ERR_JOSE_NOT_SUPPORTED"}static get code(){return"ERR_JOSE_NOT_SUPPORTED"}}class E extends v{constructor(){super(...arguments),this.code="ERR_JWE_DECRYPTION_FAILED",this.message="decryption operation failed"}static get code(){return"ERR_JWE_DECRYPTION_FAILED"}}class R extends v{constructor(){super(...arguments),this.code="ERR_JWE_INVALID"}static get code(){return"ERR_JWE_INVALID"}}class O extends v{constructor(){super(...arguments),this.code="ERR_JWS_INVALID"}static get code(){return"ERR_JWS_INVALID"}}class _ extends v{constructor(){super(...arguments),this.code="ERR_JWT_INVALID"}static get code(){return"ERR_JWT_INVALID"}}class T extends v{constructor(){super(...arguments),this.code="ERR_JWK_INVALID"}static get code(){return"ERR_JWK_INVALID"}}class U extends v{constructor(){super(...arguments),this.code="ERR_JWKS_INVALID"}static get code(){return"ERR_JWKS_INVALID"}}class j extends v{constructor(){super(...arguments),this.code="ERR_JWKS_NO_MATCHING_KEY",this.message="no applicable key found in the JSON Web Key Set"}static get code(){return"ERR_JWKS_NO_MATCHING_KEY"}}class k extends v{constructor(){super(...arguments),this.code="ERR_JWKS_MULTIPLE_MATCHING_KEYS",this.message="multiple matching keys found in the JSON Web Key Set"}static get code(){return"ERR_JWKS_MULTIPLE_MATCHING_KEYS"}}class M extends v{constructor(){super(...arguments),this.code="ERR_JWKS_TIMEOUT",this.message="request timed out"}static get code(){return"ERR_JWKS_TIMEOUT"}}class H extends v{constructor(){super(...arguments),this.code="ERR_JWS_SIGNATURE_VERIFICATION_FAILED",this.message="signature verification failed"}static get code(){return"ERR_JWS_SIGNATURE_VERIFICATION_FAILED"}}const I=i.getRandomValues.bind(i);function F(e){switch(e){case"A128GCM":case"A128GCMKW":case"A192GCM":case"A192GCMKW":case"A256GCM":case"A256GCMKW":return 96;case"A128CBC-HS256":case"A192CBC-HS384":case"A256CBC-HS512":return 128;default:throw new P(`Unsupported JWE Algorithm: ${e}`)}}const $=e=>I(new Uint8Array(F(e)>>3)),W=(e,t)=>{if(t.length<<3!==F(e))throw new R("Invalid Initialization Vector length")},q=(e,t)=>{const r=e.byteLength<<3;if(r!==t)throw new R(`Invalid Content Encryption Key length. Expected ${t} bits, got ${r} bits`)};function L(){return"undefined"!=typeof WebSocketPair||"undefined"!=typeof navigator&&"Cloudflare-Workers"===navigator.userAgent||"undefined"!=typeof EdgeRuntime&&"vercel"===EdgeRuntime}function G(e,t="algorithm.name"){return new TypeError(`CryptoKey does not support this operation, its ${t} must be ${e}`)}function D(e,t){return e.name===t}function K(e){return parseInt(e.name.slice(4),10)}function x(e,t){if(t.length&&!t.some((t=>e.usages.includes(t)))){let e="CryptoKey does not support this operation, its usages must include ";if(t.length>2){const r=t.pop();e+=`one of ${t.join(", ")}, or ${r}.`}else 2===t.length?e+=`one of ${t[0]} or ${t[1]}.`:e+=`${t[0]}.`;throw new TypeError(e)}}function J(e,t,...r){switch(t){case"A128GCM":case"A192GCM":case"A256GCM":{if(!D(e.algorithm,"AES-GCM"))throw G("AES-GCM");const r=parseInt(t.slice(1,4),10);if(e.algorithm.length!==r)throw G(r,"algorithm.length");break}case"A128KW":case"A192KW":case"A256KW":{if(!D(e.algorithm,"AES-KW"))throw G("AES-KW");const r=parseInt(t.slice(1,4),10);if(e.algorithm.length!==r)throw G(r,"algorithm.length");break}case"ECDH":switch(e.algorithm.name){case"ECDH":case"X25519":case"X448":break;default:throw G("ECDH, X25519, or X448")}break;case"PBES2-HS256+A128KW":case"PBES2-HS384+A192KW":case"PBES2-HS512+A256KW":if(!D(e.algorithm,"PBKDF2"))throw G("PBKDF2");break;case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":{if(!D(e.algorithm,"RSA-OAEP"))throw G("RSA-OAEP");const r=parseInt(t.slice(9),10)||1;if(K(e.algorithm.hash)!==r)throw G(`SHA-${r}`,"algorithm.hash");break}default:throw new TypeError("CryptoKey does not support this operation")}x(e,r)}function N(e,t,...r){if(r.length>2){const t=r.pop();e+=`one of type ${r.join(", ")}, or ${t}.`}else 2===r.length?e+=`one of type ${r[0]} or ${r[1]}.`:e+=`of type ${r[0]}.`;return null==t?e+=` Received ${t}`:"function"==typeof t&&t.name?e+=` Received function ${t.name}`:"object"==typeof t&&null!=t&&t.constructor&&t.constructor.name&&(e+=` Received an instance of ${t.constructor.name}`),e}const B=(e,...t)=>N("Key must be ",e,...t);function z(e,t,...r){return N(`Key for the ${e} algorithm must be `,t,...r)}const V=e=>n(e),X=["CryptoKey"],Y=async(e,t,r,a,s,o)=>{if(!(n(t)||t instanceof Uint8Array))throw new TypeError(B(t,...X,"Uint8Array"));switch(W(e,a),e){case"A128CBC-HS256":case"A192CBC-HS384":case"A256CBC-HS512":return t instanceof Uint8Array&&q(t,parseInt(e.slice(-3),10)),async function(e,t,r,a,s,n){if(!(t instanceof Uint8Array))throw new TypeError(B(t,"Uint8Array"));const o=parseInt(e.slice(1,4),10),c=await i.subtle.importKey("raw",t.subarray(o>>3),"AES-CBC",!1,["decrypt"]),u=await i.subtle.importKey("raw",t.subarray(0,o>>3),{hash:"SHA-"+(o<<1),name:"HMAC"},!1,["sign"]),l=d(n,a,r,h(n.length<<3)),p=new Uint8Array((await i.subtle.sign("HMAC",u,l)).slice(0,o>>3));let m,g;try{m=((e,t)=>{if(!(e instanceof Uint8Array))throw new TypeError("First argument must be a buffer");if(!(t instanceof Uint8Array))throw new TypeError("Second argument must be a buffer");if(e.length!==t.length)throw new TypeError("Input buffers must have the same length");const r=e.length;let a=0,s=-1;for(;++s<r;)a|=e[s]^t[s];return 0===a})(s,p)}catch(e){}if(!m)throw new E;try{g=new Uint8Array(await i.subtle.decrypt({iv:a,name:"AES-CBC"},c,r))}catch(e){}if(!g)throw new E;return g}(e,t,r,a,s,o);case"A128GCM":case"A192GCM":case"A256GCM":return t instanceof Uint8Array&&q(t,parseInt(e.slice(1,4),10)),async function(e,t,r,a,s,n){let o;t instanceof Uint8Array?o=await i.subtle.importKey("raw",t,"AES-GCM",!1,["decrypt"]):(J(t,e,"decrypt"),o=t);try{return new Uint8Array(await i.subtle.decrypt({additionalData:n,iv:a,name:"AES-GCM",tagLength:128},o,d(r,s)))}catch(e){throw new E}}(e,t,r,a,s,o);default:throw new P("Unsupported JWE Content Encryption Algorithm")}},Q=async()=>{throw new P('JWE "zip" (Compression Algorithm) Header Parameter is not supported by your javascript runtime. You need to use the `inflateRaw` decrypt option to provide Inflate Raw implementation.')},Z=async()=>{throw new P('JWE "zip" (Compression Algorithm) Header Parameter is not supported by your javascript runtime. You need to use the `deflateRaw` encrypt option to provide Deflate Raw implementation.')},ee=(...e)=>{const t=e.filter(Boolean);if(0===t.length||1===t.length)return!0;let r;for(const e of t){const t=Object.keys(e);if(r&&0!==r.size)for(const e of t){if(r.has(e))return!1;r.add(e)}else r=new Set(t)}return!0};function te(e){if("object"!=typeof(t=e)||null===t||"[object Object]"!==Object.prototype.toString.call(e))return!1;var t;if(null===Object.getPrototypeOf(e))return!0;let r=e;for(;null!==Object.getPrototypeOf(r);)r=Object.getPrototypeOf(r);return Object.getPrototypeOf(e)===r}const re=[{hash:"SHA-256",name:"HMAC"},!0,["sign"]];function ae(e,t){if(e.algorithm.length!==parseInt(t.slice(1,4),10))throw new TypeError(`Invalid key size for alg: ${t}`)}function se(e,t,r){if(n(e))return J(e,t,r),e;if(e instanceof Uint8Array)return i.subtle.importKey("raw",e,"AES-KW",!0,[r]);throw new TypeError(B(e,...X,"Uint8Array"))}const ie=async(e,t,r)=>{const a=await se(t,e,"wrapKey");ae(a,e);const s=await i.subtle.importKey("raw",r,...re);return new Uint8Array(await i.subtle.wrapKey("raw",s,a,"AES-KW"))},ne=async(e,t,r)=>{const a=await se(t,e,"unwrapKey");ae(a,e);const s=await i.subtle.unwrapKey("raw",r,a,"AES-KW",...re);return new Uint8Array(await i.subtle.exportKey("raw",s))};async function oe(e,t,r,a,s=new Uint8Array(0),u=new Uint8Array(0)){if(!n(e))throw new TypeError(B(e,...X));if(J(e,"ECDH"),!n(t))throw new TypeError(B(t,...X));J(t,"ECDH","deriveBits");const l=d(g(c.encode(r)),g(s),g(u),m(a));let p;return p="X25519"===e.algorithm.name?256:"X448"===e.algorithm.name?448:Math.ceil(parseInt(e.algorithm.namedCurve.substr(-3),10)/8)<<3,async function(e,t,r){const a=Math.ceil((t>>3)/32),s=new Uint8Array(32*a);for(let t=0;t<a;t++){const a=new Uint8Array(4+e.length+r.length);a.set(m(t+1)),a.set(e,4),a.set(r,4+e.length),s.set(await o("sha256",a),32*t)}return s.slice(0,t>>3)}(new Uint8Array(await i.subtle.deriveBits({name:e.algorithm.name,public:e},t,p)),a,l)}function ce(e){if(!n(e))throw new TypeError(B(e,...X));return["P-256","P-384","P-521"].includes(e.algorithm.namedCurve)||"X25519"===e.algorithm.name||"X448"===e.algorithm.name}async function ue(e,t,r,a){!function(e){if(!(e instanceof Uint8Array)||e.length<8)throw new R("PBES2 Salt Input must be 8 or more octets")}(e);const s=function(e,t){return d(c.encode(e),new Uint8Array([0]),t)}(t,e),o=parseInt(t.slice(13,16),10),u={hash:`SHA-${t.slice(8,11)}`,iterations:r,name:"PBKDF2",salt:s},l={length:o,name:"AES-KW"},p=await function(e,t){if(e instanceof Uint8Array)return i.subtle.importKey("raw",e,"PBKDF2",!1,["deriveBits"]);if(n(e))return J(e,t,"deriveBits","deriveKey"),e;throw new TypeError(B(e,...X,"Uint8Array"))}(a,t);if(p.usages.includes("deriveBits"))return new Uint8Array(await i.subtle.deriveBits(u,p,o));if(p.usages.includes("deriveKey"))return i.subtle.deriveKey(u,p,l,!1,["wrapKey","unwrapKey"]);throw new TypeError('PBKDF2 key "usages" must include "deriveBits" or "deriveKey"')}function le(e){switch(e){case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":return"RSA-OAEP";default:throw new P(`alg ${e} is not supported either by JOSE or your javascript runtime`)}}const de=(e,t)=>{if(e.startsWith("RS")||e.startsWith("PS")){const{modulusLength:r}=t.algorithm;if("number"!=typeof r||r<2048)throw new TypeError(`${e} requires key modulusLength to be 2048 bits or larger`)}};function pe(e){switch(e){case"A128GCM":return 128;case"A192GCM":return 192;case"A256GCM":case"A128CBC-HS256":return 256;case"A192CBC-HS384":return 384;case"A256CBC-HS512":return 512;default:throw new P(`Unsupported JWE Algorithm: ${e}`)}}const he=e=>I(new Uint8Array(pe(e)>>3)),me=(e,t)=>`-----BEGIN ${t}-----\n${(e.match(/.{1,64}/g)||[]).join("\n")}\n-----END ${t}-----`,ge=async(e,t,r)=>{if(!n(r))throw new TypeError(B(r,...X));if(!r.extractable)throw new TypeError("CryptoKey is not extractable");if(r.type!==e)throw new TypeError(`key is not a ${e} key`);return me(f(new Uint8Array(await i.subtle.exportKey(t,r))),`${e.toUpperCase()} KEY`)},fe=(e,t,r=0)=>{0===r&&(t.unshift(t.length),t.unshift(6));let a=e.indexOf(t[0],r);if(-1===a)return!1;const s=e.subarray(a,a+t.length);return s.length===t.length&&(s.every(((e,r)=>e===t[r]))||fe(e,t,a+1))},ye=e=>{switch(!0){case fe(e,[42,134,72,206,61,3,1,7]):return"P-256";case fe(e,[43,129,4,0,34]):return"P-384";case fe(e,[43,129,4,0,35]):return"P-521";case fe(e,[43,101,110]):return"X25519";case fe(e,[43,101,111]):return"X448";case fe(e,[43,101,112]):return"Ed25519";case fe(e,[43,101,113]):return"Ed448";default:throw new P("Invalid or unsupported EC Key Curve or OKP Key Sub Type")}},be=async(e,t,r,a,s)=>{var n;let o,c;const u=new Uint8Array(atob(r.replace(e,"")).split("").map((e=>e.charCodeAt(0)))),l="spki"===t;switch(a){case"PS256":case"PS384":case"PS512":o={name:"RSA-PSS",hash:`SHA-${a.slice(-3)}`},c=l?["verify"]:["sign"];break;case"RS256":case"RS384":case"RS512":o={name:"RSASSA-PKCS1-v1_5",hash:`SHA-${a.slice(-3)}`},c=l?["verify"]:["sign"];break;case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":o={name:"RSA-OAEP",hash:`SHA-${parseInt(a.slice(-3),10)||1}`},c=l?["encrypt","wrapKey"]:["decrypt","unwrapKey"];break;case"ES256":o={name:"ECDSA",namedCurve:"P-256"},c=l?["verify"]:["sign"];break;case"ES384":o={name:"ECDSA",namedCurve:"P-384"},c=l?["verify"]:["sign"];break;case"ES512":o={name:"ECDSA",namedCurve:"P-521"},c=l?["verify"]:["sign"];break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":{const e=ye(u);o=e.startsWith("P-")?{name:"ECDH",namedCurve:e}:{name:e},c=l?[]:["deriveBits"];break}case L()&&"EdDSA":{const e=ye(u).toUpperCase();o={name:`NODE-${e}`,namedCurve:`NODE-${e}`},c=l?["verify"]:["sign"];break}case"EdDSA":o={name:ye(u)},c=l?["verify"]:["sign"];break;default:throw new P('Invalid or unsupported "alg" (Algorithm) value')}return i.subtle.importKey(t,u,o,null!==(n=null==s?void 0:s.extractable)&&void 0!==n&&n,c)},Ce=(e,t,r)=>be(/(?:-----(?:BEGIN|END) PUBLIC KEY-----|\s)/g,"spki",e,t,r),ve=async e=>{var t,r;const{algorithm:a,keyUsages:s}=function(e){let t,r;switch(e.kty){case"oct":switch(e.alg){case"HS256":case"HS384":case"HS512":t={name:"HMAC",hash:`SHA-${e.alg.slice(-3)}`},r=["sign","verify"];break;case"A128CBC-HS256":case"A192CBC-HS384":case"A256CBC-HS512":throw new P(`${e.alg} keys cannot be imported as CryptoKey instances`);case"A128GCM":case"A192GCM":case"A256GCM":case"A128GCMKW":case"A192GCMKW":case"A256GCMKW":t={name:"AES-GCM"},r=["encrypt","decrypt"];break;case"A128KW":case"A192KW":case"A256KW":t={name:"AES-KW"},r=["wrapKey","unwrapKey"];break;case"PBES2-HS256+A128KW":case"PBES2-HS384+A192KW":case"PBES2-HS512+A256KW":t={name:"PBKDF2"},r=["deriveBits"];break;default:throw new P('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break;case"RSA":switch(e.alg){case"PS256":case"PS384":case"PS512":t={name:"RSA-PSS",hash:`SHA-${e.alg.slice(-3)}`},r=e.d?["sign"]:["verify"];break;case"RS256":case"RS384":case"RS512":t={name:"RSASSA-PKCS1-v1_5",hash:`SHA-${e.alg.slice(-3)}`},r=e.d?["sign"]:["verify"];break;case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":t={name:"RSA-OAEP",hash:`SHA-${parseInt(e.alg.slice(-3),10)||1}`},r=e.d?["decrypt","unwrapKey"]:["encrypt","wrapKey"];break;default:throw new P('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break;case"EC":switch(e.alg){case"ES256":t={name:"ECDSA",namedCurve:"P-256"},r=e.d?["sign"]:["verify"];break;case"ES384":t={name:"ECDSA",namedCurve:"P-384"},r=e.d?["sign"]:["verify"];break;case"ES512":t={name:"ECDSA",namedCurve:"P-521"},r=e.d?["sign"]:["verify"];break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":t={name:"ECDH",namedCurve:e.crv},r=e.d?["deriveBits"]:[];break;default:throw new P('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break;case L()&&"OKP":if("EdDSA"!==e.alg)throw new P('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');if("Ed25519"!==e.crv)throw new P('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');t={name:"NODE-ED25519",namedCurve:"NODE-ED25519"},r=e.d?["sign"]:["verify"];break;case"OKP":switch(e.alg){case"EdDSA":t={name:e.crv},r=e.d?["sign"]:["verify"];break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":t={name:e.crv},r=e.d?["deriveBits"]:[];break;default:throw new P('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break;default:throw new P('Invalid or unsupported JWK "kty" (Key Type) Parameter value')}return{algorithm:t,keyUsages:r}}(e),n=[a,null!==(t=e.ext)&&void 0!==t&&t,null!==(r=e.key_ops)&&void 0!==r?r:s];if("PBKDF2"===a.name)return i.subtle.importKey("raw",C(e.k),...n);const o={...e};return delete o.alg,i.subtle.importKey("jwk",o,...n)};function Se(e){let t=[],r=0;for(;r<e.length;){let a=we(e.subarray(r));t.push(a),r+=a.byteLength}return t}function we(e){let t=0,r=31&e[0];if(t++,31===r){for(r=0;e[t]>=128;)r=128*r+e[t]-128,t++;r=128*r+e[t]-128,t++}let a=0;if(e[t]<128)a=e[t],t++;else{if(128===a){for(a=0;0!==e[t+a]||0!==e[t+a+1];){if(a>e.byteLength)throw new TypeError("invalid indefinite form length");a++}const r=t+a+2;return{byteLength:r,contents:e.subarray(t,t+a),raw:e.subarray(0,r)}}{let r=127&e[t];t++,a=0;for(let s=0;s<r;s++)a=256*a+e[t],t++}}const s=t+a;return{byteLength:s,contents:e.subarray(t,s),raw:e.subarray(0,s)}}async function Ae(e,t,r){if("string"!=typeof e||0!==e.indexOf("-----BEGIN PUBLIC KEY-----"))throw new TypeError('"spki" must be SPKI formatted string');return Ce(e,t,r)}async function Pe(e,t,r){if("string"!=typeof e||0!==e.indexOf("-----BEGIN CERTIFICATE-----"))throw new TypeError('"x509" must be X.509 formatted string');let a;try{a=function(e){const t=e.replace(/(?:-----(?:BEGIN|END) CERTIFICATE-----|\s)/g,""),r=b(t);return me(function(e){const t=Se(Se(we(e).contents)[0].contents);return f(t[160===t[0].raw[0]?6:5].raw)}(r),"PUBLIC KEY")}(e)}catch(e){throw new TypeError("failed to parse the X.509 certificate",{cause:e})}return Ce(a,t,r)}async function Ee(e,t,r){if("string"!=typeof e||0!==e.indexOf("-----BEGIN PRIVATE KEY-----"))throw new TypeError('"pkcs8" must be PCKS8 formatted string');return((e,t,r)=>be(/(?:-----(?:BEGIN|END) PRIVATE KEY-----|\s)/g,"pkcs8",e,t,r))(e,t,r)}async function Re(e,t,r){if(!te(e))throw new TypeError("JWK must be an object");if(t||(t=e.alg),"string"!=typeof t||!t)throw new TypeError('"alg" argument is required when "jwk.alg" is not present');switch(e.kty){case"oct":if("string"!=typeof e.k||!e.k)throw new TypeError('missing "k" (Key Value) Parameter value');return null!=r||(r=!0!==e.ext),r?ve({...e,alg:t,ext:!1}):C(e.k);case"RSA":if(void 0!==e.oth)throw new P('RSA JWK "oth" (Other Primes Info) Parameter value is not supported');case"EC":case"OKP":return ve({...e,alg:t});default:throw new P('Unsupported "kty" (Key Type) Parameter value')}}const Oe=(e,t,r)=>{e.startsWith("HS")||"dir"===e||e.startsWith("PBES2")||/^A\d{3}(?:GCM)?KW$/.test(e)?((e,t)=>{if(!(t instanceof Uint8Array)){if(!V(t))throw new TypeError(z(e,t,...X,"Uint8Array"));if("secret"!==t.type)throw new TypeError(`${X.join(" or ")} instances for symmetric algorithms must be of type "secret"`)}})(e,t):((e,t,r)=>{if(!V(t))throw new TypeError(z(e,t,...X));if("secret"===t.type)throw new TypeError(`${X.join(" or ")} instances for asymmetric algorithms must not be of type "secret"`);if("sign"===r&&"public"===t.type)throw new TypeError(`${X.join(" or ")} instances for asymmetric algorithm signing must be of type "private"`);if("decrypt"===r&&"public"===t.type)throw new TypeError(`${X.join(" or ")} instances for asymmetric algorithm decryption must be of type "private"`);if(t.algorithm&&"verify"===r&&"private"===t.type)throw new TypeError(`${X.join(" or ")} instances for asymmetric algorithm verifying must be of type "public"`);if(t.algorithm&&"encrypt"===r&&"private"===t.type)throw new TypeError(`${X.join(" or ")} instances for asymmetric algorithm encryption must be of type "public"`)})(e,t,r)},_e=async(e,t,r,a,s)=>{if(!(n(r)||r instanceof Uint8Array))throw new TypeError(B(r,...X,"Uint8Array"));switch(W(e,a),e){case"A128CBC-HS256":case"A192CBC-HS384":case"A256CBC-HS512":return r instanceof Uint8Array&&q(r,parseInt(e.slice(-3),10)),async function(e,t,r,a,s){if(!(r instanceof Uint8Array))throw new TypeError(B(r,"Uint8Array"));const n=parseInt(e.slice(1,4),10),o=await i.subtle.importKey("raw",r.subarray(n>>3),"AES-CBC",!1,["encrypt"]),c=await i.subtle.importKey("raw",r.subarray(0,n>>3),{hash:"SHA-"+(n<<1),name:"HMAC"},!1,["sign"]),u=new Uint8Array(await i.subtle.encrypt({iv:a,name:"AES-CBC"},o,t)),l=d(s,a,u,h(s.length<<3));return{ciphertext:u,tag:new Uint8Array((await i.subtle.sign("HMAC",c,l)).slice(0,n>>3))}}(e,t,r,a,s);case"A128GCM":case"A192GCM":case"A256GCM":return r instanceof Uint8Array&&q(r,parseInt(e.slice(1,4),10)),async function(e,t,r,a,s){let n;r instanceof Uint8Array?n=await i.subtle.importKey("raw",r,"AES-GCM",!1,["encrypt"]):(J(r,e,"encrypt"),n=r);const o=new Uint8Array(await i.subtle.encrypt({additionalData:s,iv:a,name:"AES-GCM",tagLength:128},n,t)),c=o.slice(-16);return{ciphertext:o.slice(0,-16),tag:c}}(e,t,r,a,s);default:throw new P("Unsupported JWE Content Encryption Algorithm")}},Te=function(e,t,r,a,s){if(void 0!==s.crit&&void 0===a.crit)throw new e('"crit" (Critical) Header Parameter MUST be integrity protected');if(!a||void 0===a.crit)return new Set;if(!Array.isArray(a.crit)||0===a.crit.length||a.crit.some((e=>"string"!=typeof e||0===e.length)))throw new e('"crit" (Critical) Header Parameter MUST be an array of non-empty strings when present');let i;i=void 0!==r?new Map([...Object.entries(r),...t.entries()]):t;for(const t of a.crit){if(!i.has(t))throw new P(`Extension Header Parameter "${t}" is not recognized`);if(void 0===s[t])throw new e(`Extension Header Parameter "${t}" is missing`);if(i.get(t)&&void 0===a[t])throw new e(`Extension Header Parameter "${t}" MUST be integrity protected`)}return new Set(a.crit)},Ue=(e,t)=>{if(void 0!==t&&(!Array.isArray(t)||t.some((e=>"string"!=typeof e))))throw new TypeError(`"${e}" option must be an array of strings`);if(t)return new Set(t)};async function je(e,t,r){var a;if(!te(e))throw new R("Flattened JWE must be an object");if(void 0===e.protected&&void 0===e.header&&void 0===e.unprotected)throw new R("JOSE Header missing");if("string"!=typeof e.iv)throw new R("JWE Initialization Vector missing or incorrect type");if("string"!=typeof e.ciphertext)throw new R("JWE Ciphertext missing or incorrect type");if("string"!=typeof e.tag)throw new R("JWE Authentication Tag missing or incorrect type");if(void 0!==e.protected&&"string"!=typeof e.protected)throw new R("JWE Protected Header incorrect type");if(void 0!==e.encrypted_key&&"string"!=typeof e.encrypted_key)throw new R("JWE Encrypted Key incorrect type");if(void 0!==e.aad&&"string"!=typeof e.aad)throw new R("JWE AAD incorrect type");if(void 0!==e.header&&!te(e.header))throw new R("JWE Shared Unprotected Header incorrect type");if(void 0!==e.unprotected&&!te(e.unprotected))throw new R("JWE Per-Recipient Unprotected Header incorrect type");let s;if(e.protected)try{const t=C(e.protected);s=JSON.parse(u.decode(t))}catch(e){throw new R("JWE Protected Header is invalid")}if(!ee(s,e.header,e.unprotected))throw new R("JWE Protected, JWE Unprotected Header, and JWE Per-Recipient Unprotected Header Parameter names must be disjoint");const o={...s,...e.header,...e.unprotected};if(Te(R,new Map,null==r?void 0:r.crit,s,o),void 0!==o.zip){if(!s||!s.zip)throw new R('JWE "zip" (Compression Algorithm) Header MUST be integrity protected');if("DEF"!==o.zip)throw new P('Unsupported JWE "zip" (Compression Algorithm) Header Parameter value')}const{alg:l,enc:p}=o;if("string"!=typeof l||!l)throw new R("missing JWE Algorithm (alg) in JWE Header");if("string"!=typeof p||!p)throw new R("missing JWE Encryption Algorithm (enc) in JWE Header");const h=r&&Ue("keyManagementAlgorithms",r.keyManagementAlgorithms),m=r&&Ue("contentEncryptionAlgorithms",r.contentEncryptionAlgorithms);if(h&&!h.has(l))throw new A('"alg" (Algorithm) Header Parameter not allowed');if(m&&!m.has(p))throw new A('"enc" (Encryption Algorithm) Header Parameter not allowed');let g;void 0!==e.encrypted_key&&(g=C(e.encrypted_key));let f,y=!1;"function"==typeof t&&(t=await t(s,e),y=!0);try{f=await async function(e,t,r,a,s){switch(Oe(e,t,"decrypt"),e){case"dir":if(void 0!==r)throw new R("Encountered unexpected JWE Encrypted Key");return t;case"ECDH-ES":if(void 0!==r)throw new R("Encountered unexpected JWE Encrypted Key");case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":{if(!te(a.epk))throw new R('JOSE Header "epk" (Ephemeral Public Key) missing or invalid');if(!ce(t))throw new P("ECDH with the provided key is not allowed or not supported by your javascript runtime");const s=await Re(a.epk,e);let i,n;if(void 0!==a.apu){if("string"!=typeof a.apu)throw new R('JOSE Header "apu" (Agreement PartyUInfo) invalid');i=C(a.apu)}if(void 0!==a.apv){if("string"!=typeof a.apv)throw new R('JOSE Header "apv" (Agreement PartyVInfo) invalid');n=C(a.apv)}const o=await oe(s,t,"ECDH-ES"===e?a.enc:e,"ECDH-ES"===e?pe(a.enc):parseInt(e.slice(-5,-2),10),i,n);if("ECDH-ES"===e)return o;if(void 0===r)throw new R("JWE Encrypted Key missing");return ne(e.slice(-6),o,r)}case"RSA1_5":case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":if(void 0===r)throw new R("JWE Encrypted Key missing");return(async(e,t,r)=>{if(!n(t))throw new TypeError(B(t,...X));if(J(t,e,"decrypt","unwrapKey"),de(e,t),t.usages.includes("decrypt"))return new Uint8Array(await i.subtle.decrypt(le(e),t,r));if(t.usages.includes("unwrapKey")){const a=await i.subtle.unwrapKey("raw",r,t,le(e),...re);return new Uint8Array(await i.subtle.exportKey("raw",a))}throw new TypeError('RSA-OAEP key "usages" must include "decrypt" or "unwrapKey" for this operation')})(e,t,r);case"PBES2-HS256+A128KW":case"PBES2-HS384+A192KW":case"PBES2-HS512+A256KW":{if(void 0===r)throw new R("JWE Encrypted Key missing");if("number"!=typeof a.p2c)throw new R('JOSE Header "p2c" (PBES2 Count) missing or invalid');const i=(null==s?void 0:s.maxPBES2Count)||1e4;if(a.p2c>i)throw new R('JOSE Header "p2c" (PBES2 Count) out is of acceptable bounds');if("string"!=typeof a.p2s)throw new R('JOSE Header "p2s" (PBES2 Salt) missing or invalid');return(async(e,t,r,a,s)=>{const i=await ue(s,e,a,t);return ne(e.slice(-6),i,r)})(e,t,r,a.p2c,C(a.p2s))}case"A128KW":case"A192KW":case"A256KW":if(void 0===r)throw new R("JWE Encrypted Key missing");return ne(e,t,r);case"A128GCMKW":case"A192GCMKW":case"A256GCMKW":if(void 0===r)throw new R("JWE Encrypted Key missing");if("string"!=typeof a.iv)throw new R('JOSE Header "iv" (Initialization Vector) missing or invalid');if("string"!=typeof a.tag)throw new R('JOSE Header "tag" (Authentication Tag) missing or invalid');return async function(e,t,r,a,s){const i=e.slice(0,7);return Y(i,t,r,a,s,new Uint8Array(0))}(e,t,r,C(a.iv),C(a.tag));default:throw new P('Invalid or unsupported "alg" (JWE Algorithm) header value')}}(l,t,g,o,r)}catch(e){if(e instanceof TypeError||e instanceof R||e instanceof P)throw e;f=he(p)}const b=C(e.iv),v=C(e.tag),S=c.encode(null!==(a=e.protected)&&void 0!==a?a:"");let w;w=void 0!==e.aad?d(S,c.encode("."),c.encode(e.aad)):S;let E=await Y(p,f,C(e.ciphertext),b,v,w);"DEF"===o.zip&&(E=await((null==r?void 0:r.inflateRaw)||Q)(E));const O={plaintext:E};return void 0!==e.protected&&(O.protectedHeader=s),void 0!==e.aad&&(O.additionalAuthenticatedData=C(e.aad)),void 0!==e.unprotected&&(O.sharedUnprotectedHeader=e.unprotected),void 0!==e.header&&(O.unprotectedHeader=e.header),y?{...O,key:t}:O}async function ke(e,t,r){if(e instanceof Uint8Array&&(e=u.decode(e)),"string"!=typeof e)throw new R("Compact JWE must be a string or Uint8Array");const{0:a,1:s,2:i,3:n,4:o,length:c}=e.split(".");if(5!==c)throw new R("Invalid Compact JWE");const l=await je({ciphertext:n,iv:i||void 0,protected:a||void 0,tag:o||void 0,encrypted_key:s||void 0},t,r),d={plaintext:l.plaintext,protectedHeader:l.protectedHeader};return"function"==typeof t?{...d,key:l.key}:d}async function Me(e,t,r){if(!te(e))throw new R("General JWE must be an object");if(!Array.isArray(e.recipients)||!e.recipients.every(te))throw new R("JWE Recipients missing or incorrect type");if(!e.recipients.length)throw new R("JWE Recipients has no members");for(const a of e.recipients)try{return await je({aad:e.aad,ciphertext:e.ciphertext,encrypted_key:a.encrypted_key,header:a.header,iv:e.iv,protected:e.protected,tag:e.tag,unprotected:e.unprotected},t,r)}catch(e){}throw new E}async function He(e){return(e=>ge("public","spki",e))(e)}async function Ie(e){return(e=>ge("private","pkcs8",e))(e)}async function Fe(e){return(async e=>{if(e instanceof Uint8Array)return{kty:"oct",k:y(e)};if(!n(e))throw new TypeError(B(e,...X,"Uint8Array"));if(!e.extractable)throw new TypeError("non-extractable CryptoKey cannot be exported as a JWK");const{ext:t,key_ops:r,alg:a,use:s,...o}=await i.subtle.exportKey("jwk",e);return o})(e)}const $e=async function(e,t,r,a,s={}){let o,c,u;switch(Oe(e,r,"encrypt"),e){case"dir":u=r;break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":{if(!ce(r))throw new P("ECDH with the provided key is not allowed or not supported by your javascript runtime");const{apu:l,apv:d}=s;let{epk:p}=s;p||(p=(await async function(e){if(!n(e))throw new TypeError(B(e,...X));return i.subtle.generateKey(e.algorithm,!0,["deriveBits"])}(r)).privateKey);const{x:h,y:m,crv:g,kty:f}=await Fe(p),b=await oe(r,p,"ECDH-ES"===e?t:e,"ECDH-ES"===e?pe(t):parseInt(e.slice(-5,-2),10),l,d);if(c={epk:{x:h,crv:g,kty:f}},"EC"===f&&(c.epk.y=m),l&&(c.apu=y(l)),d&&(c.apv=y(d)),"ECDH-ES"===e){u=b;break}u=a||he(t);const C=e.slice(-6);o=await ie(C,b,u);break}case"RSA1_5":case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":u=a||he(t),o=await(async(e,t,r)=>{if(!n(t))throw new TypeError(B(t,...X));if(J(t,e,"encrypt","wrapKey"),de(e,t),t.usages.includes("encrypt"))return new Uint8Array(await i.subtle.encrypt(le(e),t,r));if(t.usages.includes("wrapKey")){const a=await i.subtle.importKey("raw",r,...re);return new Uint8Array(await i.subtle.wrapKey("raw",a,t,le(e)))}throw new TypeError('RSA-OAEP key "usages" must include "encrypt" or "wrapKey" for this operation')})(e,r,u);break;case"PBES2-HS256+A128KW":case"PBES2-HS384+A192KW":case"PBES2-HS512+A256KW":{u=a||he(t);const{p2c:i,p2s:n}=s;({encryptedKey:o,...c}=await(async(e,t,r,a=2048,s=I(new Uint8Array(16)))=>{const i=await ue(s,e,a,t);return{encryptedKey:await ie(e.slice(-6),i,r),p2c:a,p2s:y(s)}})(e,r,u,i,n));break}case"A128KW":case"A192KW":case"A256KW":u=a||he(t),o=await ie(e,r,u);break;case"A128GCMKW":case"A192GCMKW":case"A256GCMKW":{u=a||he(t);const{iv:i}=s;({encryptedKey:o,...c}=await async function(e,t,r,a){const s=e.slice(0,7);a||(a=$(s));const{ciphertext:i,tag:n}=await _e(s,r,t,a,new Uint8Array(0));return{encryptedKey:i,iv:y(a),tag:y(n)}}(e,r,u,i));break}default:throw new P('Invalid or unsupported "alg" (JWE Algorithm) header value')}return{cek:u,encryptedKey:o,parameters:c}},We=Symbol();class qe{constructor(e){if(!(e instanceof Uint8Array))throw new TypeError("plaintext must be an instance of Uint8Array");this._plaintext=e}setKeyManagementParameters(e){if(this._keyManagementParameters)throw new TypeError("setKeyManagementParameters can only be called once");return this._keyManagementParameters=e,this}setProtectedHeader(e){if(this._protectedHeader)throw new TypeError("setProtectedHeader can only be called once");return this._protectedHeader=e,this}setSharedUnprotectedHeader(e){if(this._sharedUnprotectedHeader)throw new TypeError("setSharedUnprotectedHeader can only be called once");return this._sharedUnprotectedHeader=e,this}setUnprotectedHeader(e){if(this._unprotectedHeader)throw new TypeError("setUnprotectedHeader can only be called once");return this._unprotectedHeader=e,this}setAdditionalAuthenticatedData(e){return this._aad=e,this}setContentEncryptionKey(e){if(this._cek)throw new TypeError("setContentEncryptionKey can only be called once");return this._cek=e,this}setInitializationVector(e){if(this._iv)throw new TypeError("setInitializationVector can only be called once");return this._iv=e,this}async encrypt(e,t){if(!this._protectedHeader&&!this._unprotectedHeader&&!this._sharedUnprotectedHeader)throw new R("either setProtectedHeader, setUnprotectedHeader, or sharedUnprotectedHeader must be called before #encrypt()");if(!ee(this._protectedHeader,this._unprotectedHeader,this._sharedUnprotectedHeader))throw new R("JWE Protected, JWE Shared Unprotected and JWE Per-Recipient Header Parameter names must be disjoint");const r={...this._protectedHeader,...this._unprotectedHeader,...this._sharedUnprotectedHeader};if(Te(R,new Map,null==t?void 0:t.crit,this._protectedHeader,r),void 0!==r.zip){if(!this._protectedHeader||!this._protectedHeader.zip)throw new R('JWE "zip" (Compression Algorithm) Header MUST be integrity protected');if("DEF"!==r.zip)throw new P('Unsupported JWE "zip" (Compression Algorithm) Header Parameter value')}const{alg:a,enc:s}=r;if("string"!=typeof a||!a)throw new R('JWE "alg" (Algorithm) Header Parameter missing or invalid');if("string"!=typeof s||!s)throw new R('JWE "enc" (Encryption Algorithm) Header Parameter missing or invalid');let i,n,o,l,p,h,m;if("dir"===a){if(this._cek)throw new TypeError("setContentEncryptionKey cannot be called when using Direct Encryption")}else if("ECDH-ES"===a&&this._cek)throw new TypeError("setContentEncryptionKey cannot be called when using Direct Key Agreement");{let r;({cek:n,encryptedKey:i,parameters:r}=await $e(a,s,e,this._cek,this._keyManagementParameters)),r&&(t&&We in t?this._unprotectedHeader?this._unprotectedHeader={...this._unprotectedHeader,...r}:this.setUnprotectedHeader(r):this._protectedHeader?this._protectedHeader={...this._protectedHeader,...r}:this.setProtectedHeader(r))}if(this._iv||(this._iv=$(s)),l=this._protectedHeader?c.encode(y(JSON.stringify(this._protectedHeader))):c.encode(""),this._aad?(p=y(this._aad),o=d(l,c.encode("."),c.encode(p))):o=l,"DEF"===r.zip){const e=await((null==t?void 0:t.deflateRaw)||Z)(this._plaintext);({ciphertext:h,tag:m}=await _e(s,e,n,this._iv,o))}else({ciphertext:h,tag:m}=await _e(s,this._plaintext,n,this._iv,o));const g={ciphertext:y(h),iv:y(this._iv),tag:y(m)};return i&&(g.encrypted_key=y(i)),p&&(g.aad=p),this._protectedHeader&&(g.protected=u.decode(l)),this._sharedUnprotectedHeader&&(g.unprotected=this._sharedUnprotectedHeader),this._unprotectedHeader&&(g.header=this._unprotectedHeader),g}}class Le{constructor(e,t,r){this.parent=e,this.key=t,this.options=r}setUnprotectedHeader(e){if(this.unprotectedHeader)throw new TypeError("setUnprotectedHeader can only be called once");return this.unprotectedHeader=e,this}addRecipient(...e){return this.parent.addRecipient(...e)}encrypt(...e){return this.parent.encrypt(...e)}done(){return this.parent}}class Ge{constructor(e){this._recipients=[],this._plaintext=e}addRecipient(e,t){const r=new Le(this,e,{crit:null==t?void 0:t.crit});return this._recipients.push(r),r}setProtectedHeader(e){if(this._protectedHeader)throw new TypeError("setProtectedHeader can only be called once");return this._protectedHeader=e,this}setSharedUnprotectedHeader(e){if(this._unprotectedHeader)throw new TypeError("setSharedUnprotectedHeader can only be called once");return this._unprotectedHeader=e,this}setAdditionalAuthenticatedData(e){return this._aad=e,this}async encrypt(e){var t,r,a;if(!this._recipients.length)throw new R("at least one recipient must be added");if(e={deflateRaw:null==e?void 0:e.deflateRaw},1===this._recipients.length){const[t]=this._recipients,r=await new qe(this._plaintext).setAdditionalAuthenticatedData(this._aad).setProtectedHeader(this._protectedHeader).setSharedUnprotectedHeader(this._unprotectedHeader).setUnprotectedHeader(t.unprotectedHeader).encrypt(t.key,{...t.options,...e});let a={ciphertext:r.ciphertext,iv:r.iv,recipients:[{}],tag:r.tag};return r.aad&&(a.aad=r.aad),r.protected&&(a.protected=r.protected),r.unprotected&&(a.unprotected=r.unprotected),r.encrypted_key&&(a.recipients[0].encrypted_key=r.encrypted_key),r.header&&(a.recipients[0].header=r.header),a}let s;for(let e=0;e<this._recipients.length;e++){const t=this._recipients[e];if(!ee(this._protectedHeader,this._unprotectedHeader,t.unprotectedHeader))throw new R("JWE Protected, JWE Shared Unprotected and JWE Per-Recipient Header Parameter names must be disjoint");const r={...this._protectedHeader,...this._unprotectedHeader,...t.unprotectedHeader},{alg:a}=r;if("string"!=typeof a||!a)throw new R('JWE "alg" (Algorithm) Header Parameter missing or invalid');if("dir"===a||"ECDH-ES"===a)throw new R('"dir" and "ECDH-ES" alg may only be used with a single recipient');if("string"!=typeof r.enc||!r.enc)throw new R('JWE "enc" (Encryption Algorithm) Header Parameter missing or invalid');if(s){if(s!==r.enc)throw new R('JWE "enc" (Encryption Algorithm) Header Parameter must be the same for all recipients')}else s=r.enc;if(Te(R,new Map,t.options.crit,this._protectedHeader,r),!(void 0===r.zip||this._protectedHeader&&this._protectedHeader.zip))throw new R('JWE "zip" (Compression Algorithm) Header MUST be integrity protected')}const i=he(s);let n={ciphertext:"",iv:"",recipients:[],tag:""};for(let o=0;o<this._recipients.length;o++){const c=this._recipients[o],u={};n.recipients.push(u);const l={...this._protectedHeader,...this._unprotectedHeader,...c.unprotectedHeader}.alg.startsWith("PBES2")?2048+o:void 0;if(0===o){const t=await new qe(this._plaintext).setAdditionalAuthenticatedData(this._aad).setContentEncryptionKey(i).setProtectedHeader(this._protectedHeader).setSharedUnprotectedHeader(this._unprotectedHeader).setUnprotectedHeader(c.unprotectedHeader).setKeyManagementParameters({p2c:l}).encrypt(c.key,{...c.options,...e,[We]:!0});n.ciphertext=t.ciphertext,n.iv=t.iv,n.tag=t.tag,t.aad&&(n.aad=t.aad),t.protected&&(n.protected=t.protected),t.unprotected&&(n.unprotected=t.unprotected),u.encrypted_key=t.encrypted_key,t.header&&(u.header=t.header);continue}const{encryptedKey:d,parameters:p}=await $e((null===(t=c.unprotectedHeader)||void 0===t?void 0:t.alg)||(null===(r=this._protectedHeader)||void 0===r?void 0:r.alg)||(null===(a=this._unprotectedHeader)||void 0===a?void 0:a.alg),s,c.key,i,{p2c:l});u.encrypted_key=y(d),(c.unprotectedHeader||p)&&(u.header={...c.unprotectedHeader,...p})}return n}}function De(e,t){const r=`SHA-${e.slice(-3)}`;switch(e){case"HS256":case"HS384":case"HS512":return{hash:r,name:"HMAC"};case"PS256":case"PS384":case"PS512":return{hash:r,name:"RSA-PSS",saltLength:e.slice(-3)>>3};case"RS256":case"RS384":case"RS512":return{hash:r,name:"RSASSA-PKCS1-v1_5"};case"ES256":case"ES384":case"ES512":return{hash:r,name:"ECDSA",namedCurve:t.namedCurve};case L()&&"EdDSA":const{namedCurve:a}=t;return{name:a,namedCurve:a};case"EdDSA":return{name:t.name};default:throw new P(`alg ${e} is not supported either by JOSE or your javascript runtime`)}}function Ke(e,t,r){if(n(t))return function(e,t,...r){switch(t){case"HS256":case"HS384":case"HS512":{if(!D(e.algorithm,"HMAC"))throw G("HMAC");const r=parseInt(t.slice(2),10);if(K(e.algorithm.hash)!==r)throw G(`SHA-${r}`,"algorithm.hash");break}case"RS256":case"RS384":case"RS512":{if(!D(e.algorithm,"RSASSA-PKCS1-v1_5"))throw G("RSASSA-PKCS1-v1_5");const r=parseInt(t.slice(2),10);if(K(e.algorithm.hash)!==r)throw G(`SHA-${r}`,"algorithm.hash");break}case"PS256":case"PS384":case"PS512":{if(!D(e.algorithm,"RSA-PSS"))throw G("RSA-PSS");const r=parseInt(t.slice(2),10);if(K(e.algorithm.hash)!==r)throw G(`SHA-${r}`,"algorithm.hash");break}case L()&&"EdDSA":if(!D(e.algorithm,"NODE-ED25519"))throw G("NODE-ED25519");break;case"EdDSA":if("Ed25519"!==e.algorithm.name&&"Ed448"!==e.algorithm.name)throw G("Ed25519 or Ed448");break;case"ES256":case"ES384":case"ES512":{if(!D(e.algorithm,"ECDSA"))throw G("ECDSA");const r=function(e){switch(e){case"ES256":return"P-256";case"ES384":return"P-384";case"ES512":return"P-521";default:throw new Error("unreachable")}}(t);if(e.algorithm.namedCurve!==r)throw G(r,"algorithm.namedCurve");break}default:throw new TypeError("CryptoKey does not support this operation")}x(e,r)}(t,e,r),t;if(t instanceof Uint8Array){if(!e.startsWith("HS"))throw new TypeError(B(t,...X));return i.subtle.importKey("raw",t,{hash:`SHA-${e.slice(-3)}`,name:"HMAC"},!1,[r])}throw new TypeError(B(t,...X,"Uint8Array"))}async function xe(e,t,r){var a;if(!te(e))throw new O("Flattened JWS must be an object");if(void 0===e.protected&&void 0===e.header)throw new O('Flattened JWS must have either of the "protected" or "header" members');if(void 0!==e.protected&&"string"!=typeof e.protected)throw new O("JWS Protected Header incorrect type");if(void 0===e.payload)throw new O("JWS Payload missing");if("string"!=typeof e.signature)throw new O("JWS Signature missing or incorrect type");if(void 0!==e.header&&!te(e.header))throw new O("JWS Unprotected Header incorrect type");let s={};if(e.protected)try{const t=C(e.protected);s=JSON.parse(u.decode(t))}catch(e){throw new O("JWS Protected Header is invalid")}if(!ee(s,e.header))throw new O("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");const n={...s,...e.header};let o=!0;if(Te(O,new Map([["b64",!0]]),null==r?void 0:r.crit,s,n).has("b64")&&(o=s.b64,"boolean"!=typeof o))throw new O('The "b64" (base64url-encode payload) Header Parameter must be a boolean');const{alg:l}=n;if("string"!=typeof l||!l)throw new O('JWS "alg" (Algorithm) Header Parameter missing or invalid');const p=r&&Ue("algorithms",r.algorithms);if(p&&!p.has(l))throw new A('"alg" (Algorithm) Header Parameter not allowed');if(o){if("string"!=typeof e.payload)throw new O("JWS Payload must be a string")}else if("string"!=typeof e.payload&&!(e.payload instanceof Uint8Array))throw new O("JWS Payload must be a string or an Uint8Array instance");let h=!1;"function"==typeof t&&(t=await t(s,e),h=!0),Oe(l,t,"verify");const m=d(c.encode(null!==(a=e.protected)&&void 0!==a?a:""),c.encode("."),"string"==typeof e.payload?c.encode(e.payload):e.payload),g=C(e.signature);if(!await(async(e,t,r,a)=>{const s=await Ke(e,t,"verify");de(e,s);const n=De(e,s.algorithm);try{return await i.subtle.verify(n,s,r,a)}catch(e){return!1}})(l,t,g,m))throw new H;let f;f=o?C(e.payload):"string"==typeof e.payload?c.encode(e.payload):e.payload;const y={payload:f};return void 0!==e.protected&&(y.protectedHeader=s),void 0!==e.header&&(y.unprotectedHeader=e.header),h?{...y,key:t}:y}async function Je(e,t,r){if(e instanceof Uint8Array&&(e=u.decode(e)),"string"!=typeof e)throw new O("Compact JWS must be a string or Uint8Array");const{0:a,1:s,2:i,length:n}=e.split(".");if(3!==n)throw new O("Invalid Compact JWS");const o=await xe({payload:s,protected:a,signature:i},t,r),c={payload:o.payload,protectedHeader:o.protectedHeader};return"function"==typeof t?{...c,key:o.key}:c}async function Ne(e,t,r){if(!te(e))throw new O("General JWS must be an object");if(!Array.isArray(e.signatures)||!e.signatures.every(te))throw new O("JWS Signatures missing or incorrect type");for(const a of e.signatures)try{return await xe({header:a.header,payload:e.payload,protected:a.protected,signature:a.signature},t,r)}catch(e){}throw new H}const Be=e=>Math.floor(e.getTime()/1e3),ze=/^(\d+|\d+\.\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)$/i,Ve=e=>{const t=ze.exec(e);if(!t)throw new TypeError("Invalid time period format");const r=parseFloat(t[1]);switch(t[2].toLowerCase()){case"sec":case"secs":case"second":case"seconds":case"s":return Math.round(r);case"minute":case"minutes":case"min":case"mins":case"m":return Math.round(60*r);case"hour":case"hours":case"hr":case"hrs":case"h":return Math.round(3600*r);case"day":case"days":case"d":return Math.round(86400*r);case"week":case"weeks":case"w":return Math.round(604800*r);default:return Math.round(31557600*r)}},Xe=e=>e.toLowerCase().replace(/^application\//,""),Ye=(e,t,r={})=>{const{typ:a}=r;if(a&&("string"!=typeof e.typ||Xe(e.typ)!==Xe(a)))throw new S('unexpected "typ" JWT header value',"typ","check_failed");let s;try{s=JSON.parse(u.decode(t))}catch(e){}if(!te(s))throw new _("JWT Claims Set must be a top-level JSON object");const{issuer:i}=r;if(i&&!(Array.isArray(i)?i:[i]).includes(s.iss))throw new S('unexpected "iss" claim value',"iss","check_failed");const{subject:n}=r;if(n&&s.sub!==n)throw new S('unexpected "sub" claim value',"sub","check_failed");const{audience:o}=r;if(o&&(l="string"==typeof o?[o]:o,!("string"==typeof(c=s.aud)?l.includes(c):Array.isArray(c)&&l.some(Set.prototype.has.bind(new Set(c))))))throw new S('unexpected "aud" claim value',"aud","check_failed");var c,l;let d;switch(typeof r.clockTolerance){case"string":d=Ve(r.clockTolerance);break;case"number":d=r.clockTolerance;break;case"undefined":d=0;break;default:throw new TypeError("Invalid clockTolerance option type")}const{currentDate:p}=r,h=Be(p||new Date);if((void 0!==s.iat||r.maxTokenAge)&&"number"!=typeof s.iat)throw new S('"iat" claim must be a number',"iat","invalid");if(void 0!==s.nbf){if("number"!=typeof s.nbf)throw new S('"nbf" claim must be a number',"nbf","invalid");if(s.nbf>h+d)throw new S('"nbf" claim timestamp check failed',"nbf","check_failed")}if(void 0!==s.exp){if("number"!=typeof s.exp)throw new S('"exp" claim must be a number',"exp","invalid");if(s.exp<=h-d)throw new w('"exp" claim timestamp check failed',"exp","check_failed")}if(r.maxTokenAge){const e=h-s.iat;if(e-d>("number"==typeof r.maxTokenAge?r.maxTokenAge:Ve(r.maxTokenAge)))throw new w('"iat" claim timestamp check failed (too far in the past)',"iat","check_failed");if(e<0-d)throw new S('"iat" claim timestamp check failed (it should be in the past)',"iat","check_failed")}return s};async function Qe(e,t,r){var a;const s=await Je(e,t,r);if((null===(a=s.protectedHeader.crit)||void 0===a?void 0:a.includes("b64"))&&!1===s.protectedHeader.b64)throw new _("JWTs MUST NOT use unencoded payload");const i={payload:Ye(s.protectedHeader,s.payload,r),protectedHeader:s.protectedHeader};return"function"==typeof t?{...i,key:s.key}:i}async function Ze(e,t,r){const a=await ke(e,t,r),s=Ye(a.protectedHeader,a.plaintext,r),{protectedHeader:i}=a;if(void 0!==i.iss&&i.iss!==s.iss)throw new S('replicated "iss" claim header parameter mismatch',"iss","mismatch");if(void 0!==i.sub&&i.sub!==s.sub)throw new S('replicated "sub" claim header parameter mismatch',"sub","mismatch");if(void 0!==i.aud&&JSON.stringify(i.aud)!==JSON.stringify(s.aud))throw new S('replicated "aud" claim header parameter mismatch',"aud","mismatch");const n={payload:s,protectedHeader:i};return"function"==typeof t?{...n,key:a.key}:n}class et{constructor(e){this._flattened=new qe(e)}setContentEncryptionKey(e){return this._flattened.setContentEncryptionKey(e),this}setInitializationVector(e){return this._flattened.setInitializationVector(e),this}setProtectedHeader(e){return this._flattened.setProtectedHeader(e),this}setKeyManagementParameters(e){return this._flattened.setKeyManagementParameters(e),this}async encrypt(e,t){const r=await this._flattened.encrypt(e,t);return[r.protected,r.encrypted_key,r.iv,r.ciphertext,r.tag].join(".")}}class tt{constructor(e){if(!(e instanceof Uint8Array))throw new TypeError("payload must be an instance of Uint8Array");this._payload=e}setProtectedHeader(e){if(this._protectedHeader)throw new TypeError("setProtectedHeader can only be called once");return this._protectedHeader=e,this}setUnprotectedHeader(e){if(this._unprotectedHeader)throw new TypeError("setUnprotectedHeader can only be called once");return this._unprotectedHeader=e,this}async sign(e,t){if(!this._protectedHeader&&!this._unprotectedHeader)throw new O("either setProtectedHeader or setUnprotectedHeader must be called before #sign()");if(!ee(this._protectedHeader,this._unprotectedHeader))throw new O("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");const r={...this._protectedHeader,...this._unprotectedHeader};let a=!0;if(Te(O,new Map([["b64",!0]]),null==t?void 0:t.crit,this._protectedHeader,r).has("b64")&&(a=this._protectedHeader.b64,"boolean"!=typeof a))throw new O('The "b64" (base64url-encode payload) Header Parameter must be a boolean');const{alg:s}=r;if("string"!=typeof s||!s)throw new O('JWS "alg" (Algorithm) Header Parameter missing or invalid');Oe(s,e,"sign");let n,o=this._payload;a&&(o=c.encode(y(o))),n=this._protectedHeader?c.encode(y(JSON.stringify(this._protectedHeader))):c.encode("");const l=d(n,c.encode("."),o),p=await(async(e,t,r)=>{const a=await Ke(e,t,"sign");de(e,a);const s=await i.subtle.sign(De(e,a.algorithm),a,r);return new Uint8Array(s)})(s,e,l),h={signature:y(p),payload:""};return a&&(h.payload=u.decode(o)),this._unprotectedHeader&&(h.header=this._unprotectedHeader),this._protectedHeader&&(h.protected=u.decode(n)),h}}class rt{constructor(e){this._flattened=new tt(e)}setProtectedHeader(e){return this._flattened.setProtectedHeader(e),this}async sign(e,t){const r=await this._flattened.sign(e,t);if(void 0===r.payload)throw new TypeError("use the flattened module for creating JWS with b64: false");return`${r.protected}.${r.payload}.${r.signature}`}}class at{constructor(e,t,r){this.parent=e,this.key=t,this.options=r}setProtectedHeader(e){if(this.protectedHeader)throw new TypeError("setProtectedHeader can only be called once");return this.protectedHeader=e,this}setUnprotectedHeader(e){if(this.unprotectedHeader)throw new TypeError("setUnprotectedHeader can only be called once");return this.unprotectedHeader=e,this}addSignature(...e){return this.parent.addSignature(...e)}sign(...e){return this.parent.sign(...e)}done(){return this.parent}}class st{constructor(e){this._signatures=[],this._payload=e}addSignature(e,t){const r=new at(this,e,t);return this._signatures.push(r),r}async sign(){if(!this._signatures.length)throw new O("at least one signature must be added");const e={signatures:[],payload:""};for(let t=0;t<this._signatures.length;t++){const r=this._signatures[t],a=new tt(this._payload);a.setProtectedHeader(r.protectedHeader),a.setUnprotectedHeader(r.unprotectedHeader);const{payload:s,...i}=await a.sign(r.key,r.options);if(0===t)e.payload=s;else if(e.payload!==s)throw new O("inconsistent use of JWS Unencoded Payload Option (RFC7797)");e.signatures.push(i)}return e}}class it{constructor(e){if(!te(e))throw new TypeError("JWT Claims Set MUST be an object");this._payload=e}setIssuer(e){return this._payload={...this._payload,iss:e},this}setSubject(e){return this._payload={...this._payload,sub:e},this}setAudience(e){return this._payload={...this._payload,aud:e},this}setJti(e){return this._payload={...this._payload,jti:e},this}setNotBefore(e){return this._payload="number"==typeof e?{...this._payload,nbf:e}:{...this._payload,nbf:Be(new Date)+Ve(e)},this}setExpirationTime(e){return this._payload="number"==typeof e?{...this._payload,exp:e}:{...this._payload,exp:Be(new Date)+Ve(e)},this}setIssuedAt(e){return this._payload=void 0===e?{...this._payload,iat:Be(new Date)}:{...this._payload,iat:e},this}}class nt extends it{setProtectedHeader(e){return this._protectedHeader=e,this}async sign(e,t){var r;const a=new rt(c.encode(JSON.stringify(this._payload)));if(a.setProtectedHeader(this._protectedHeader),Array.isArray(null===(r=this._protectedHeader)||void 0===r?void 0:r.crit)&&this._protectedHeader.crit.includes("b64")&&!1===this._protectedHeader.b64)throw new _("JWTs MUST NOT use unencoded payload");return a.sign(e,t)}}class ot extends it{setProtectedHeader(e){if(this._protectedHeader)throw new TypeError("setProtectedHeader can only be called once");return this._protectedHeader=e,this}setKeyManagementParameters(e){if(this._keyManagementParameters)throw new TypeError("setKeyManagementParameters can only be called once");return this._keyManagementParameters=e,this}setContentEncryptionKey(e){if(this._cek)throw new TypeError("setContentEncryptionKey can only be called once");return this._cek=e,this}setInitializationVector(e){if(this._iv)throw new TypeError("setInitializationVector can only be called once");return this._iv=e,this}replicateIssuerAsHeader(){return this._replicateIssuerAsHeader=!0,this}replicateSubjectAsHeader(){return this._replicateSubjectAsHeader=!0,this}replicateAudienceAsHeader(){return this._replicateAudienceAsHeader=!0,this}async encrypt(e,t){const r=new et(c.encode(JSON.stringify(this._payload)));return this._replicateIssuerAsHeader&&(this._protectedHeader={...this._protectedHeader,iss:this._payload.iss}),this._replicateSubjectAsHeader&&(this._protectedHeader={...this._protectedHeader,sub:this._payload.sub}),this._replicateAudienceAsHeader&&(this._protectedHeader={...this._protectedHeader,aud:this._payload.aud}),r.setProtectedHeader(this._protectedHeader),this._iv&&r.setInitializationVector(this._iv),this._cek&&r.setContentEncryptionKey(this._cek),this._keyManagementParameters&&r.setKeyManagementParameters(this._keyManagementParameters),r.encrypt(e,t)}}const ct=(e,t)=>{if("string"!=typeof e||!e)throw new T(`${t} missing or invalid`)};async function ut(e,t){if(!te(e))throw new TypeError("JWK must be an object");if(null!=t||(t="sha256"),"sha256"!==t&&"sha384"!==t&&"sha512"!==t)throw new TypeError('digestAlgorithm must one of "sha256", "sha384", or "sha512"');let r;switch(e.kty){case"EC":ct(e.crv,'"crv" (Curve) Parameter'),ct(e.x,'"x" (X Coordinate) Parameter'),ct(e.y,'"y" (Y Coordinate) Parameter'),r={crv:e.crv,kty:e.kty,x:e.x,y:e.y};break;case"OKP":ct(e.crv,'"crv" (Subtype of Key Pair) Parameter'),ct(e.x,'"x" (Public Key) Parameter'),r={crv:e.crv,kty:e.kty,x:e.x};break;case"RSA":ct(e.e,'"e" (Exponent) Parameter'),ct(e.n,'"n" (Modulus) Parameter'),r={e:e.e,kty:e.kty,n:e.n};break;case"oct":ct(e.k,'"k" (Key Value) Parameter'),r={k:e.k,kty:e.kty};break;default:throw new P('"kty" (Key Type) Parameter missing or unsupported')}const a=c.encode(JSON.stringify(r));return y(await o(t,a))}async function lt(e,t){null!=t||(t="sha256");const r=await ut(e,t);return`urn:ietf:params:oauth:jwk-thumbprint:sha-${t.slice(-3)}:${r}`}async function dt(e,t){const r={...e,...t.header};if(!te(r.jwk))throw new O('"jwk" (JSON Web Key) Header Parameter must be a JSON object');const a=await Re({...r.jwk,ext:!0},r.alg,!0);if(a instanceof Uint8Array||"public"!==a.type)throw new O('"jwk" (JSON Web Key) Header Parameter must be a public key');return a}function pt(e){return e&&"object"==typeof e&&Array.isArray(e.keys)&&e.keys.every(ht)}function ht(e){return te(e)}class mt{constructor(e){if(this._cached=new WeakMap,!pt(e))throw new U("JSON Web Key Set malformed");var t;this._jwks=(t=e,"function"==typeof structuredClone?structuredClone(t):JSON.parse(JSON.stringify(t)))}async getKey(e,t){const{alg:r,kid:a}={...e,...t.header},s=function(e){switch("string"==typeof e&&e.slice(0,2)){case"RS":case"PS":return"RSA";case"ES":return"EC";case"Ed":return"OKP";default:throw new P('Unsupported "alg" value for a JSON Web Key Set')}}(r),i=this._jwks.keys.filter((e=>{let t=s===e.kty;if(t&&"string"==typeof a&&(t=a===e.kid),t&&"string"==typeof e.alg&&(t=r===e.alg),t&&"string"==typeof e.use&&(t="sig"===e.use),t&&Array.isArray(e.key_ops)&&(t=e.key_ops.includes("verify")),t&&"EdDSA"===r&&(t="Ed25519"===e.crv||"Ed448"===e.crv),t)switch(r){case"ES256":t="P-256"===e.crv;break;case"ES256K":t="secp256k1"===e.crv;break;case"ES384":t="P-384"===e.crv;break;case"ES512":t="P-521"===e.crv}return t})),{0:n,length:o}=i;if(0===o)throw new j;if(1!==o)throw new k;const c=this._cached.get(n)||this._cached.set(n,{}).get(n);if(void 0===c[r]){const e=await Re({...n,ext:!0},r);if(e instanceof Uint8Array||"public"!==e.type)throw new U("JSON Web Key Set members must be public keys");c[r]=e}return c[r]}}function gt(e){return mt.prototype.getKey.bind(new mt(e))}class ft extends mt{constructor(e,t){if(super({keys:[]}),this._jwks=void 0,!(e instanceof URL))throw new TypeError("url must be an instance of URL");this._url=new URL(e.href),this._options={agent:null==t?void 0:t.agent,headers:null==t?void 0:t.headers},this._timeoutDuration="number"==typeof(null==t?void 0:t.timeoutDuration)?null==t?void 0:t.timeoutDuration:5e3,this._cooldownDuration="number"==typeof(null==t?void 0:t.cooldownDuration)?null==t?void 0:t.cooldownDuration:3e4,this._cacheMaxAge="number"==typeof(null==t?void 0:t.cacheMaxAge)?null==t?void 0:t.cacheMaxAge:6e5}coolingDown(){return"number"==typeof this._jwksTimestamp&&Date.now()<this._jwksTimestamp+this._cooldownDuration}fresh(){return"number"==typeof this._jwksTimestamp&&Date.now()<this._jwksTimestamp+this._cacheMaxAge}async getKey(e,t){this._jwks&&this.fresh()||await this.reload();try{return await super.getKey(e,t)}catch(r){if(r instanceof j&&!1===this.coolingDown())return await this.reload(),super.getKey(e,t);throw r}}async reload(){if(this._pendingFetch&&L())return new Promise((e=>{const t=()=>{void 0===this._pendingFetch?e():setTimeout(t,5)};t()}));this._pendingFetch||(this._pendingFetch=(async(e,t,r)=>{let a,s,i=!1;"function"==typeof AbortController&&(a=new AbortController,s=setTimeout((()=>{i=!0,a.abort()}),t));const n=await fetch(e.href,{signal:a?a.signal:void 0,redirect:"manual",headers:r.headers}).catch((e=>{if(i)throw new M;throw e}));if(void 0!==s&&clearTimeout(s),200!==n.status)throw new v("Expected 200 OK from the JSON Web Key Set HTTP response");try{return await n.json()}catch(e){throw new v("Failed to parse the JSON Web Key Set HTTP response as JSON")}})(this._url,this._timeoutDuration,this._options).then((e=>{if(!pt(e))throw new U("JSON Web Key Set malformed");this._jwks={keys:e.keys},this._jwksTimestamp=Date.now(),this._pendingFetch=void 0})).catch((e=>{throw this._pendingFetch=void 0,e}))),await this._pendingFetch}}function yt(e,t){return ft.prototype.getKey.bind(new ft(e,t))}class bt extends it{encode(){return`${y(JSON.stringify({alg:"none"}))}.${y(JSON.stringify(this._payload))}.`}static decode(e,t){if("string"!=typeof e)throw new _("Unsecured JWT must be a string");const{0:r,1:a,2:s,length:i}=e.split(".");if(3!==i||""!==s)throw new _("Invalid Unsecured JWT");let n;try{if(n=JSON.parse(u.decode(C(r))),"none"!==n.alg)throw new Error}catch(e){throw new _("Invalid Unsecured JWT")}return{payload:Ye(n,C(a),t),header:n}}}const Ct=y,vt=C;function St(e){let t;if("string"==typeof e){const r=e.split(".");3!==r.length&&5!==r.length||([t]=r)}else if("object"==typeof e&&e){if(!("protected"in e))throw new TypeError("Token does not contain a Protected Header");t=e.protected}try{if("string"!=typeof t||!t)throw new Error;const e=JSON.parse(u.decode(vt(t)));if(!te(e))throw new Error;return e}catch(e){throw new TypeError("Invalid Token or Protected Header formatting")}}function wt(e){if("string"!=typeof e)throw new _("JWTs must use Compact JWS serialization, JWT must be a string");const{1:t,length:r}=e.split(".");if(5===r)throw new _("Only JWTs using Compact JWS serialization can be decoded");if(3!==r)throw new _("Invalid JWT");if(!t)throw new _("JWTs must contain a payload");let a,s;try{a=vt(t)}catch(e){throw new _("Failed to parse the base64url encoded payload")}try{s=JSON.parse(u.decode(a))}catch(e){throw new _("Failed to parse the decoded payload as JSON")}if(!te(s))throw new _("Invalid JWT Claims Set");return s}function At(e){var t;const r=null!==(t=null==e?void 0:e.modulusLength)&&void 0!==t?t:2048;if("number"!=typeof r||r<2048)throw new P("Invalid or unsupported modulusLength option provided, 2048 bits or larger keys must be used");return r}async function Pt(e,t){return async function(e,t){var r,a,s;let n,o;switch(e){case"PS256":case"PS384":case"PS512":n={name:"RSA-PSS",hash:`SHA-${e.slice(-3)}`,publicExponent:new Uint8Array([1,0,1]),modulusLength:At(t)},o=["sign","verify"];break;case"RS256":case"RS384":case"RS512":n={name:"RSASSA-PKCS1-v1_5",hash:`SHA-${e.slice(-3)}`,publicExponent:new Uint8Array([1,0,1]),modulusLength:At(t)},o=["sign","verify"];break;case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":n={name:"RSA-OAEP",hash:`SHA-${parseInt(e.slice(-3),10)||1}`,publicExponent:new Uint8Array([1,0,1]),modulusLength:At(t)},o=["decrypt","unwrapKey","encrypt","wrapKey"];break;case"ES256":n={name:"ECDSA",namedCurve:"P-256"},o=["sign","verify"];break;case"ES384":n={name:"ECDSA",namedCurve:"P-384"},o=["sign","verify"];break;case"ES512":n={name:"ECDSA",namedCurve:"P-521"},o=["sign","verify"];break;case L()&&"EdDSA":switch(null==t?void 0:t.crv){case void 0:case"Ed25519":n={name:"NODE-ED25519",namedCurve:"NODE-ED25519"},o=["sign","verify"];break;default:throw new P("Invalid or unsupported crv option provided")}break;case"EdDSA":o=["sign","verify"];const s=null!==(r=null==t?void 0:t.crv)&&void 0!==r?r:"Ed25519";switch(s){case"Ed25519":case"Ed448":n={name:s};break;default:throw new P("Invalid or unsupported crv option provided")}break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":{o=["deriveKey","deriveBits"];const e=null!==(a=null==t?void 0:t.crv)&&void 0!==a?a:"P-256";switch(e){case"P-256":case"P-384":case"P-521":n={name:"ECDH",namedCurve:e};break;case"X25519":case"X448":n={name:e};break;default:throw new P("Invalid or unsupported crv option provided, supported values are P-256, P-384, P-521, X25519, and X448")}break}default:throw new P('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}return i.subtle.generateKey(n,null!==(s=null==t?void 0:t.extractable)&&void 0!==s&&s,o)}(e,t)}async function Et(e,t){return async function(e,t){var r;let a,s,n;switch(e){case"HS256":case"HS384":case"HS512":a=parseInt(e.slice(-3),10),s={name:"HMAC",hash:`SHA-${a}`,length:a},n=["sign","verify"];break;case"A128CBC-HS256":case"A192CBC-HS384":case"A256CBC-HS512":return a=parseInt(e.slice(-3),10),I(new Uint8Array(a>>3));case"A128KW":case"A192KW":case"A256KW":a=parseInt(e.slice(1,4),10),s={name:"AES-KW",length:a},n=["wrapKey","unwrapKey"];break;case"A128GCMKW":case"A192GCMKW":case"A256GCMKW":case"A128GCM":case"A192GCM":case"A256GCM":a=parseInt(e.slice(1,4),10),s={name:"AES-GCM",length:a},n=["encrypt","decrypt"];break;default:throw new P('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}return i.subtle.generateKey(s,null!==(r=null==t?void 0:t.extractable)&&void 0!==r&&r,n)}(e,t)}}},t={};function r(a){var s=t[a];if(void 0!==s)return s.exports;var i=t[a]={exports:{}};return e[a](i,i.exports,r),i.exports}r.d=(e,t)=>{for(var a in t)r.o(t,a)&&!r.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var a={};return(()=>{"use strict";var e=a;e.__esModule=!0;var t=G(r(2037));e.http=t.default,e.HttpResponse=t.HttpResponse,e.HttpMethod=t.HttpMethod;var s=G(r(5368));e.Endpoints=s.default,e.EndpointType=s.EndpointType;var i=r(6021);e.formatHttpError=i.formatHttpError,e.getCancelTokenSourceRequest=i.getCancelTokenSourceRequest;var n=r(6789);e.generateJWTToken=n.generateJWTToken,e.parseJwt=n.parseJwt;var o=r(2746);e.apiRequest=o.apiRequest;var c=r(735);e.urlParams=c.urlParams;var u=G(r(8634));e.AccountService=u.default,e.AccountApiClient=u.AccountApiClient,e.AccountApiClientInterface=u.AccountApiClientInterface;var l=G(r(707));e.CategoryService=l.default,e.CategoryApiClient=l.CategoryApiClient,e.CategoryApiClientInterface=l.CategoryApiClientInterface;var d=G(r(6527));e.CommentService=d.default,e.CommentApiClient=d.CommentApiClient,e.CommentApiClientInterface=d.CommentApiClientInterface;var p=G(r(9741));e.CustomAdvService=p.default,e.CustomAdvApiClient=p.CustomAdvApiClient,e.CustomAdvApiClientInterface=p.CustomAdvApiClientInterface;var h=G(r(4315));e.CustomMenuService=h.default,e.CustomMenuApiClient=h.CustomMenuApiClient,e.CustomMenuApiClientInterface=h.CustomMenuApiClientInterface;var m=G(r(9984));e.CustomPageService=m.default,e.CustomPageApiClient=m.CustomPageApiClient,e.CustomPageApiClientInterface=m.CustomPageApiClientInterface;var g=G(r(6560));e.DataPortabilityService=g.default,e.DataPortabilityApiClient=g.DataPortabilityApiClient,e.DataPortabilityApiClientInterface=g.DataPortabilityApiClientInterface;var f=G(r(13));e.EmbedService=f.default,e.EmbedApiClient=f.EmbedApiClient,e.EmbedApiClientInterface=f.EmbedApiClientInterface;var y=G(r(6334));e.FeatureService=y.default,e.FeatureApiClient=y.FeatureApiClient,e.FeatureApiClientInterface=y.FeatureApiClientInterface;var b=G(r(7980));e.FeedService=b.default,e.FeedApiClient=b.FeedApiClient,e.FeedApiClientInterface=b.FeedApiClientInterface;var C=G(r(5564));e.FeedObjectService=C.default,e.FeedObjectApiClient=C.FeedObjectApiClient,e.FeedObjectApiClientInterface=C.FeedObjectApiClientInterface;var v=G(r(6984));e.IncubatorService=v.default,e.IncubatorApiClient=v.IncubatorApiClient,e.IncubatorApiClientInterface=v.IncubatorApiClientInterface;var S=G(r(1415));e.InsightService=S.default,e.InsightApiClient=S.InsightApiClient,e.InsightApiClientInterface=S.InsightApiClientInterface;var w=G(r(922));e.InviteService=w.default,e.InviteApiClient=w.InviteApiClient,e.InviteApiClientInterface=w.InviteApiClientInterface;var A=G(r(507));e.LegalPageService=A.default,e.LegalPageApiClient=A.LegalPageApiClient,e.LegalPageApiClientInterface=A.LegalPageApiClientInterface;var P=G(r(5600));e.LocalityService=P.default,e.LocalityApiClient=P.LocalityApiClient,e.LocalityApiClientInterface=P.LocalityApiClientInterface;var E=G(r(9902));e.LoyaltyService=E.default,e.LoyaltyApiClient=E.LoyaltyApiClient,e.LoyaltyApiClientInterface=E.LoyaltyApiClientInterface;var R=G(r(4170));e.MediaService=R.default,e.MediaApiClient=R.MediaApiClient,e.MediaApiClientInterface=R.MediaApiClientInterface;var O=G(r(2123));e.ModerationService=O.default,e.ModerationApiClient=O.ModerationApiClient,e.ModerationApiClientInterface=O.ModerationApiClientInterface;var _=G(r(1584));e.NotificationService=_.default,e.NotificationApiClient=_.NotificationApiClient,e.NotificationApiClientInterface=_.NotificationApiClientInterface;var T=G(r(6329));e.PreferenceService=T.default,e.PreferenceApiClient=T.PreferenceApiClient,e.PreferenceApiClientInterface=T.PreferenceApiClientInterface;var U=G(r(8938));e.PrivateMessageService=U.default,e.PrivateMessageApiClient=U.PrivateMessageApiClient,e.PrivateMessageApiClientInterface=U.PrivateMessageApiClientInterface;var j=G(r(4524));e.PromoService=j.default,e.PromoApiClient=j.PromoApiClient,e.PromoApiClientInterface=j.PromoApiClientInterface;var k=G(r(6919));e.ScoreService=k.default,e.ScoreApiClient=k.ScoreApiClient,e.ScoreApiClientInterface=k.ScoreApiClientInterface;var M=G(r(5727));e.SSOService=M.default,e.SSOApiClient=M.SSOApiClient,e.SSOApiClientInterface=M.SSOApiClientInterface;var H=G(r(8086));e.SuggestionService=H.default,e.SuggestionApiClient=H.SuggestionApiClient,e.SuggestionApiClientInterface=H.SuggestionApiClientInterface;var I=G(r(5830));e.TagService=I.default,e.TagApiClient=I.TagApiClient,e.TagApiClientInterface=I.TagApiClientInterface;var F=G(r(671));e.UserService=F.default,e.UserApiClient=F.UserApiClient,e.UserApiClientInterface=F.UserApiClientInterface;var $=G(r(3796));e.WebhookService=$.default,e.WebhookApiClient=$.WebhookApiClient,e.WebhookApiClientInterface=$.WebhookApiClientInterface;var W=G(r(3661));e.ReactionService=W.default,e.ReactionApiClient=W.ReactionApiClient,e.ReactionApiClientInterface=W.ReactionApiClientInterface;var q=r(994);function L(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(L=function(e){return e?r:t})(e)}function G(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=L(t);if(r&&r.has(e))return r.get(e);var a={},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var n=s?Object.getOwnPropertyDescriptor(e,i):null;n&&(n.get||n.set)?Object.defineProperty(a,i,n):a[i]=e[i]}return a.default=e,r&&r.set(e,a),a}e.AccountCreateParams=q.AccountCreateParams,e.AccountVerifyParams=q.AccountVerifyParams,e.AccountResetParams=q.AccountResetParams,e.AccountRecoverParams=q.AccountRecoverParams,e.SCPaginatedResponse=q.SCPaginatedResponse,e.WebhookParamType=q.WebhookParamType,e.WebhookEventsType=q.WebhookEventsType,e.SSOSignUpParams=q.SSOSignUpParams,e.CommentListParams=q.CommentListParams,e.CommentCreateParams=q.CommentCreateParams,e.IncubatorCreateParams=q.IncubatorCreateParams,e.IncubatorSearchParams=q.IncubatorSearchParams,e.LoyaltyPrizeParams=q.LoyaltyPrizeParams,e.ModerationParams=q.ModerationParams,e.ModerateContributionParams=q.ModerateContributionParams,e.FlaggedContributionParams=q.FlaggedContributionParams,e.CustomNotificationParams=q.CustomNotificationParams,e.UserAutocompleteParams=q.UserAutocompleteParams,e.UserScoreParams=q.UserScoreParams,e.UserSearchParams=q.UserSearchParams,e.TagParams=q.TagParams,e.TagGetParams=q.TagGetParams,e.MediaCreateParams=q.MediaCreateParams,e.MediaTypes=q.MediaTypes,e.ChunkUploadParams=q.ChunkUploadParams,e.ChunkUploadCompleteParams=q.ChunkUploadCompleteParams,e.ThreadParams=q.ThreadParams,e.MessageCreateParams=q.MessageCreateParams,e.MessageMediaUploadParams=q.MessageMediaUploadParams,e.MessageThumbnailUploadParams=q.MessageThumbnailUploadParams,e.MessageChunkUploadDoneParams=q.MessageChunkUploadDoneParams,e.MessageMediaChunksParams=q.MessageMediaChunksParams,e.CategoryParams=q.CategoryParams,e.CustomAdvParams=q.CustomAdvParams,e.CustomPageParams=q.CustomPageParams,e.CustomPageSearchParams=q.CustomPageSearchParams,e.EmbedUpdateParams=q.EmbedUpdateParams,e.EmbedSearchParams=q.EmbedSearchParams,e.BaseGetParams=q.BaseGetParams,e.BaseSearchParams=q.BaseSearchParams,e.FeedObjGetParams=q.FeedObjGetParams,e.FeedObjCreateParams=q.FeedObjCreateParams,e.FeedObjectPollVotesSearch=q.FeedObjectPollVotesSearch,e.FeedParams=q.FeedParams,e.LegalPageFilterParams=q.LegalPageFilterParams,e.FeatureParams=q.FeatureParams,e.ScoreParams=q.ScoreParams,e.InsightContributionParams=q.InsightContributionParams,e.InsightUserParams=q.InsightUserParams,e.InsightEmbedParams=q.InsightEmbedParams,e.InsightCommonParams=q.InsightCommonParams,e.ReactionParams=q.ReactionParams})(),a})()));
|
|
3
3
|
//# sourceMappingURL=api-services.js.map
|