UNPKG

@aurigma/ui-framework

Version:

A platform which allows building print product personalization editors based on Aurigma's Customer's Canvas.

1 lines 84.4 kB
(window.multistep_editor_jsonpFunction=window.multistep_editor_jsonpFunction||[]).push([[4],{415:function(e,t,r){"use strict";(function(e,n,o){var s=r(816);const{toString:a}=Object.prototype,{getPrototypeOf:i}=Object,l=(e=>t=>{const r=a.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),c=e=>(e=e.toLowerCase(),t=>l(t)===e),u=e=>t=>typeof t===e,{isArray:d}=Array,p=u("undefined"),h=c("ArrayBuffer"),f=u("string"),m=u("function"),b=u("number"),w=e=>null!==e&&"object"==typeof e,y=e=>{if("object"!==l(e))return!1;const t=i(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},R=c("Date"),O=c("File"),v=c("Blob"),U=c("FileList"),I=c("URLSearchParams"),[P,g,C,E]=["ReadableStream","Request","Response","Headers"].map(c);function T(e,t,{allOwnKeys:r=!1}={}){if(null==e)return;let n,o;if("object"!=typeof e&&(e=[e]),d(e))for(n=0,o=e.length;n<o;n++)t.call(null,e[n],n,e);else{const o=r?Object.getOwnPropertyNames(e):Object.keys(e),s=o.length;let a;for(n=0;n<s;n++)a=o[n],t.call(null,e[a],a,e)}}function S(e,t){t=t.toLowerCase();const r=Object.keys(e);let n,o=r.length;for(;o-- >0;)if(n=r[o],t===n.toLowerCase())return n;return null}const A="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:e,k=e=>!p(e)&&e!==A,x=(e=>t=>e&&t instanceof e)("undefined"!=typeof Uint8Array&&i(Uint8Array)),N=c("HTMLFormElement"),F=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),j=c("RegExp"),G=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};T(r,((r,o)=>{let s;!1!==(s=t(r,o,e))&&(n[o]=s||r)})),Object.defineProperties(e,n)},L="abcdefghijklmnopqrstuvwxyz",z="0123456789",q={DIGIT:z,ALPHA:L,ALPHA_DIGIT:L+L.toUpperCase()+z},D=c("AsyncFunction"),_=(B="function"==typeof n,J=m(A.postMessage),B?n:J?(V=`axios@${Math.random()}`,$=[],A.addEventListener("message",(({source:e,data:t})=>{e===A&&t===V&&$.length&&$.shift()()}),!1),e=>{$.push(e),A.postMessage(V,"*")}):e=>setTimeout(e));var B,J,V,$;const M="undefined"!=typeof queueMicrotask?queueMicrotask.bind(A):void 0!==o&&o.nextTick||_;t.a={isArray:d,isArrayBuffer:h,isBuffer:function(e){return null!==e&&!p(e)&&null!==e.constructor&&!p(e.constructor)&&m(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||m(e.append)&&("formdata"===(t=l(e))||"object"===t&&m(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&h(e.buffer),t},isString:f,isNumber:b,isBoolean:e=>!0===e||!1===e,isObject:w,isPlainObject:y,isReadableStream:P,isRequest:g,isResponse:C,isHeaders:E,isUndefined:p,isDate:R,isFile:O,isBlob:v,isRegExp:j,isFunction:m,isStream:e=>w(e)&&m(e.pipe),isURLSearchParams:I,isTypedArray:x,isFileList:U,forEach:T,merge:function e(){const{caseless:t}=k(this)&&this||{},r={},n=(n,o)=>{const s=t&&S(r,o)||o;y(r[s])&&y(n)?r[s]=e(r[s],n):y(n)?r[s]=e({},n):d(n)?r[s]=n.slice():r[s]=n};for(let o=0,s=arguments.length;o<s;o++)arguments[o]&&T(arguments[o],n);return r},extend:(e,t,r,{allOwnKeys:n}={})=>(T(t,((t,n)=>{r&&m(t)?e[n]=Object(s.a)(t,r):e[n]=t}),{allOwnKeys:n}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},toFlatObject:(e,t,r,n)=>{let o,s,a;const l={};if(t=t||{},null==e)return t;do{for(o=Object.getOwnPropertyNames(e),s=o.length;s-- >0;)a=o[s],n&&!n(a,e,t)||l[a]||(t[a]=e[a],l[a]=!0);e=!1!==r&&i(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},kindOf:l,kindOfTest:c,endsWith:(e,t,r)=>{e=String(e),(void 0===r||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return-1!==n&&n===r},toArray:e=>{if(!e)return null;if(d(e))return e;let t=e.length;if(!b(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},forEachEntry:(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let n;for(;(n=r.next())&&!n.done;){const r=n.value;t.call(e,r[0],r[1])}},matchAll:(e,t)=>{let r;const n=[];for(;null!==(r=e.exec(t));)n.push(r);return n},isHTMLForm:N,hasOwnProperty:F,hasOwnProp:F,reduceDescriptors:G,freezeMethods:e=>{G(e,((t,r)=>{if(m(e)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;const n=e[r];m(n)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")}))}))},toObjectSet:(e,t)=>{const r={},n=e=>{e.forEach((e=>{r[e]=!0}))};return d(e)?n(e):n(String(e).split(t)),r},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,r){return t.toUpperCase()+r})),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:S,global:A,isContextDefined:k,ALPHABET:q,generateString:(e=16,t=q.ALPHA_DIGIT)=>{let r="";const{length:n}=t;for(;e--;)r+=t[Math.random()*n|0];return r},isSpecCompliantForm:function(e){return!!(e&&m(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),r=(e,n)=>{if(w(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[n]=e;const o=d(e)?[]:{};return T(e,((e,t)=>{const s=r(e,n+1);!p(s)&&(o[t]=s)})),t[n]=void 0,o}}return e};return r(e,0)},isAsyncFn:D,isThenable:e=>e&&(w(e)||m(e))&&m(e.then)&&m(e.catch),setImmediate:_,asap:M}}).call(this,r(53),r(200).setImmediate,r(124))},442:function(e,t,r){"use strict";var n=r(415);function o(e,t,r,n,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),o&&(this.response=o,this.status=o.status?o.status:null)}n.a.inherits(o,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:n.a.toJSONObject(this.config),code:this.code,status:this.status}}});const s=o.prototype,a={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{a[e]={value:e}})),Object.defineProperties(o,a),Object.defineProperty(s,"isAxiosError",{value:!0}),o.from=(e,t,r,a,i,l)=>{const c=Object.create(s);return n.a.toFlatObject(e,c,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),o.call(c,e.message,t,r,a,i),c.cause=e,c.name=e.name,l&&Object.assign(c,l),c},t.a=o},533:function(e,t,r){"use strict";(function(e){var n=r(415),o=r(442),s=r(817);function a(e){return n.a.isPlainObject(e)||n.a.isArray(e)}function i(e){return n.a.endsWith(e,"[]")?e.slice(0,-2):e}function l(e,t,r){return e?e.concat(t).map((function(e,t){return e=i(e),!r&&t?"["+e+"]":e})).join(r?".":""):t}const c=n.a.toFlatObject(n.a,{},null,(function(e){return/^is[A-Z]/.test(e)}));t.a=function(t,r,u){if(!n.a.isObject(t))throw new TypeError("target must be an object");r=r||new(s.a||FormData);const d=(u=n.a.toFlatObject(u,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!n.a.isUndefined(t[e])}))).metaTokens,p=u.visitor||w,h=u.dots,f=u.indexes,m=(u.Blob||"undefined"!=typeof Blob&&Blob)&&n.a.isSpecCompliantForm(r);if(!n.a.isFunction(p))throw new TypeError("visitor must be a function");function b(t){if(null===t)return"";if(n.a.isDate(t))return t.toISOString();if(!m&&n.a.isBlob(t))throw new o.a("Blob is not supported. Use a Buffer instead.");return n.a.isArrayBuffer(t)||n.a.isTypedArray(t)?m&&"function"==typeof Blob?new Blob([t]):e.from(t):t}function w(e,t,o){let s=e;if(e&&!o&&"object"==typeof e)if(n.a.endsWith(t,"{}"))t=d?t:t.slice(0,-2),e=JSON.stringify(e);else if(n.a.isArray(e)&&function(e){return n.a.isArray(e)&&!e.some(a)}(e)||(n.a.isFileList(e)||n.a.endsWith(t,"[]"))&&(s=n.a.toArray(e)))return t=i(t),s.forEach((function(e,o){!n.a.isUndefined(e)&&null!==e&&r.append(!0===f?l([t],o,h):null===f?t:t+"[]",b(e))})),!1;return!!a(e)||(r.append(l(o,t,h),b(e)),!1)}const y=[],R=Object.assign(c,{defaultVisitor:w,convertValue:b,isVisitable:a});if(!n.a.isObject(t))throw new TypeError("data must be an object");return function e(t,o){if(!n.a.isUndefined(t)){if(-1!==y.indexOf(t))throw Error("Circular reference detected in "+o.join("."));y.push(t),n.a.forEach(t,(function(t,s){!0===(!(n.a.isUndefined(t)||null===t)&&p.call(r,t,n.a.isString(s)?s.trim():s,o,R))&&e(t,o?o.concat(s):[s])})),y.pop()}}(t),r}}).call(this,r(197).Buffer)},535:function(e,t,r){"use strict";r.d(t,"a",(function(){return Rt})),r.d(t,"c",(function(){return vt})),r.d(t,"e",(function(){return Ut})),r.d(t,"b",(function(){return Xe})),r.d(t,"d",(function(){return tt}));var n={};r.r(n),r.d(n,"hasBrowserEnv",(function(){return w})),r.d(n,"hasStandardBrowserWebWorkerEnv",(function(){return O})),r.d(n,"hasStandardBrowserEnv",(function(){return R})),r.d(n,"navigator",(function(){return y})),r.d(n,"origin",(function(){return v}));var o=r(415),s=r(816),a=r(533);function i(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function l(e,t){this._pairs=[],e&&Object(a.a)(e,this,t)}const c=l.prototype;c.append=function(e,t){this._pairs.push([e,t])},c.toString=function(e){const t=e?function(t){return e.call(this,t,i)}:i;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};var u=l;function d(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function p(e,t,r){if(!t)return e;const n=r&&r.encode||d;o.a.isFunction(r)&&(r={serialize:r});const s=r&&r.serialize;let a;if(a=s?s(t,r):o.a.isURLSearchParams(t)?t.toString():new u(t,r).toString(n),a){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+a}return e}var h=class{constructor(){this.handlers=[]}use(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){o.a.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},f=r(442),m={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},b={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:u,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]};const w="undefined"!=typeof window&&"undefined"!=typeof document,y="object"==typeof navigator&&navigator||void 0,R=w&&(!y||["ReactNative","NativeScript","NS"].indexOf(y.product)<0),O="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,v=w&&window.location.href||"http://localhost";var U=Object.defineProperty,I=Object.getOwnPropertySymbols,P=Object.prototype.hasOwnProperty,g=Object.prototype.propertyIsEnumerable,C=(e,t,r)=>t in e?U(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,E=(e,t)=>{for(var r in t||(t={}))P.call(t,r)&&C(e,r,t[r]);if(I)for(var r of I(t))g.call(t,r)&&C(e,r,t[r]);return e},T=E(E({},n),b),S=function(e){function t(e,r,n,s){let a=e[s++];if("__proto__"===a)return!0;const i=Number.isFinite(+a),l=s>=e.length;return a=!a&&o.a.isArray(n)?n.length:a,l?(o.a.hasOwnProp(n,a)?n[a]=[n[a],r]:n[a]=r,!i):(n[a]&&o.a.isObject(n[a])||(n[a]=[]),t(e,r,n[a],s)&&o.a.isArray(n[a])&&(n[a]=function(e){const t={},r=Object.keys(e);let n;const o=r.length;let s;for(n=0;n<o;n++)s=r[n],t[s]=e[s];return t}(n[a])),!i)}if(o.a.isFormData(e)&&o.a.isFunction(e.entries)){const r={};return o.a.forEachEntry(e,((e,n)=>{t(function(e){return o.a.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),n,r,0)})),r}return null};const A={transitional:m,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const r=t.getContentType()||"",n=r.indexOf("application/json")>-1,s=o.a.isObject(e);if(s&&o.a.isHTMLForm(e)&&(e=new FormData(e)),o.a.isFormData(e))return n?JSON.stringify(S(e)):e;if(o.a.isArrayBuffer(e)||o.a.isBuffer(e)||o.a.isStream(e)||o.a.isFile(e)||o.a.isBlob(e)||o.a.isReadableStream(e))return e;if(o.a.isArrayBufferView(e))return e.buffer;if(o.a.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let i;if(s){if(r.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return Object(a.a)(e,new T.classes.URLSearchParams,Object.assign({visitor:function(e,t,r,n){return T.isNode&&o.a.isBuffer(e)?(this.append(t,e.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((i=o.a.isFileList(e))||r.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return Object(a.a)(i?{"files[]":e}:e,t&&new t,this.formSerializer)}}return s||n?(t.setContentType("application/json",!1),function(e){if(o.a.isString(e))try{return(0,JSON.parse)(e),o.a.trim(e)}catch(t){if("SyntaxError"!==t.name)throw t}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||A.transitional,r=t&&t.forcedJSONParsing,n="json"===this.responseType;if(o.a.isResponse(e)||o.a.isReadableStream(e))return e;if(e&&o.a.isString(e)&&(r&&!this.responseType||n)){const r=!(t&&t.silentJSONParsing)&&n;try{return JSON.parse(e)}catch(s){if(r){if("SyntaxError"===s.name)throw f.a.from(s,f.a.ERR_BAD_RESPONSE,this,null,this.response);throw s}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:T.classes.FormData,Blob:T.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};o.a.forEach(["delete","get","head","post","put","patch"],(e=>{A.headers[e]={}}));var k=A;const x=o.a.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),N=Symbol("internals");function F(e){return e&&String(e).trim().toLowerCase()}function j(e){return!1===e||null==e?e:o.a.isArray(e)?e.map(j):String(e)}function G(e,t,r,n,s){return o.a.isFunction(n)?n.call(this,t,r):(s&&(t=r),o.a.isString(t)?o.a.isString(n)?-1!==t.indexOf(n):o.a.isRegExp(n)?n.test(t):void 0:void 0)}class L{constructor(e){e&&this.set(e)}set(e,t,r){const n=this;function s(e,t,r){const s=F(t);if(!s)throw new Error("header name must be a non-empty string");const a=o.a.findKey(n,s);(!a||void 0===n[a]||!0===r||void 0===r&&!1!==n[a])&&(n[a||t]=j(e))}const a=(e,t)=>o.a.forEach(e,((e,r)=>s(e,r,t)));if(o.a.isPlainObject(e)||e instanceof this.constructor)a(e,t);else if(o.a.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))a((e=>{const t={};let r,n,o;return e&&e.split("\n").forEach((function(e){o=e.indexOf(":"),r=e.substring(0,o).trim().toLowerCase(),n=e.substring(o+1).trim(),!r||t[r]&&x[r]||("set-cookie"===r?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)})),t})(e),t);else if(o.a.isHeaders(e))for(const[o,i]of e.entries())s(i,o,r);else null!=e&&s(t,e,r);return this}get(e,t){if(e=F(e)){const r=o.a.findKey(this,e);if(r){const e=this[r];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}(e);if(o.a.isFunction(t))return t.call(this,e,r);if(o.a.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=F(e)){const r=o.a.findKey(this,e);return!(!r||void 0===this[r]||t&&!G(0,this[r],r,t))}return!1}delete(e,t){const r=this;let n=!1;function s(e){if(e=F(e)){const s=o.a.findKey(r,e);!s||t&&!G(0,r[s],s,t)||(delete r[s],n=!0)}}return o.a.isArray(e)?e.forEach(s):s(e),n}clear(e){const t=Object.keys(this);let r=t.length,n=!1;for(;r--;){const o=t[r];e&&!G(0,this[o],o,e,!0)||(delete this[o],n=!0)}return n}normalize(e){const t=this,r={};return o.a.forEach(this,((n,s)=>{const a=o.a.findKey(r,s);if(a)return t[a]=j(n),void delete t[s];const i=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,r)=>t.toUpperCase()+r))}(s):String(s).trim();i!==s&&delete t[s],t[i]=j(n),r[i]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return o.a.forEach(this,((r,n)=>{null!=r&&!1!==r&&(t[n]=e&&o.a.isArray(r)?r.join(", "):r)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const r=new this(e);return t.forEach((e=>r.set(e))),r}static accessor(e){const t=(this[N]=this[N]={accessors:{}}).accessors,r=this.prototype;function n(e){const n=F(e);t[n]||(function(e,t){const r=o.a.toCamelCase(" "+t);["get","set","has"].forEach((n=>{Object.defineProperty(e,n+r,{value:function(e,r,o){return this[n].call(this,t,e,r,o)},configurable:!0})}))}(r,e),t[n]=!0)}return o.a.isArray(e)?e.forEach(n):n(e),this}}L.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),o.a.reduceDescriptors(L.prototype,(({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[r]=e}}})),o.a.freezeMethods(L);var z=L;function q(e,t){const r=this||k,n=t||r,s=z.from(n.headers);let a=n.data;return o.a.forEach(e,(function(e){a=e.call(r,a,s.normalize(),t?t.status:void 0)})),s.normalize(),a}function D(e){return!(!e||!e.__CANCEL__)}function _(e,t,r){f.a.call(this,null==e?"canceled":e,f.a.ERR_CANCELED,t,r),this.name="CanceledError"}o.a.inherits(_,f.a,{__CANCEL__:!0});var B=_,J=r(817);function V(e,t,r){const n=r.config.validateStatus;r.status&&n&&!n(r.status)?t(new f.a("Request failed with status code "+r.status,[f.a.ERR_BAD_REQUEST,f.a.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):e(r)}const $=(e,t,r=3)=>{let n=0;const o=function(e,t){e=e||10;const r=new Array(e),n=new Array(e);let o,s=0,a=0;return t=void 0!==t?t:1e3,function(i){const l=Date.now(),c=n[a];o||(o=l),r[s]=i,n[s]=l;let u=a,d=0;for(;u!==s;)d+=r[u++],u%=e;if(s=(s+1)%e,s===a&&(a=(a+1)%e),l-o<t)return;const p=c&&l-c;return p?Math.round(1e3*d/p):void 0}}(50,250);return function(e,t){let r,n,o=0,s=1e3/t;const a=(t,s=Date.now())=>{o=s,r=null,n&&(clearTimeout(n),n=null),e.apply(null,t)};return[(...e)=>{const t=Date.now(),i=t-o;i>=s?a(e,t):(r=e,n||(n=setTimeout((()=>{n=null,a(r)}),s-i)))},()=>r&&a(r)]}((r=>{const s=r.loaded,a=r.lengthComputable?r.total:void 0,i=s-n,l=o(i);n=s,e({loaded:s,total:a,progress:a?s/a:void 0,bytes:i,rate:l||void 0,estimated:l&&a&&s<=a?(a-s)/l:void 0,event:r,lengthComputable:null!=a,[t?"download":"upload"]:!0})}),r)},M=(e,t)=>{const r=null!=e;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},W=e=>(...t)=>o.a.asap((()=>e(...t)));var H=T.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,T.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(T.origin),T.navigator&&/(msie|trident)/i.test(T.navigator.userAgent)):()=>!0,K=T.hasStandardBrowserEnv?{write(e,t,r,n,s,a){const i=[e+"="+encodeURIComponent(t)];o.a.isNumber(r)&&i.push("expires="+new Date(r).toGMTString()),o.a.isString(n)&&i.push("path="+n),o.a.isString(s)&&i.push("domain="+s),!0===a&&i.push("secure"),document.cookie=i.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function X(e,t){return e&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}var Q=Object.defineProperty,Z=Object.getOwnPropertySymbols,Y=Object.prototype.hasOwnProperty,ee=Object.prototype.propertyIsEnumerable,te=(e,t,r)=>t in e?Q(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;const re=e=>e instanceof z?((e,t)=>{for(var r in t||(t={}))Y.call(t,r)&&te(e,r,t[r]);if(Z)for(var r of Z(t))ee.call(t,r)&&te(e,r,t[r]);return e})({},e):e;function ne(e,t){t=t||{};const r={};function n(e,t,r,n){return o.a.isPlainObject(e)&&o.a.isPlainObject(t)?o.a.merge.call({caseless:n},e,t):o.a.isPlainObject(t)?o.a.merge({},t):o.a.isArray(t)?t.slice():t}function s(e,t,r,s){return o.a.isUndefined(t)?o.a.isUndefined(e)?void 0:n(void 0,e,0,s):n(e,t,0,s)}function a(e,t){if(!o.a.isUndefined(t))return n(void 0,t)}function i(e,t){return o.a.isUndefined(t)?o.a.isUndefined(e)?void 0:n(void 0,e):n(void 0,t)}function l(r,o,s){return s in t?n(r,o):s in e?n(void 0,r):void 0}const c={url:a,method:a,data:a,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:l,headers:(e,t,r)=>s(re(e),re(t),0,!0)};return o.a.forEach(Object.keys(Object.assign({},e,t)),(function(n){const a=c[n]||s,i=a(e[n],t[n],n);o.a.isUndefined(i)&&a!==l||(r[n]=i)})),r}var oe=e=>{const t=ne({},e);let r,{data:n,withXSRFToken:s,xsrfHeaderName:a,xsrfCookieName:i,headers:l,auth:c}=t;if(t.headers=l=z.from(l),t.url=p(X(t.baseURL,t.url),e.params,e.paramsSerializer),c&&l.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):""))),o.a.isFormData(n))if(T.hasStandardBrowserEnv||T.hasStandardBrowserWebWorkerEnv)l.setContentType(void 0);else if(!1!==(r=l.getContentType())){const[e,...t]=r?r.split(";").map((e=>e.trim())).filter(Boolean):[];l.setContentType([e||"multipart/form-data",...t].join("; "))}if(T.hasStandardBrowserEnv&&(s&&o.a.isFunction(s)&&(s=s(t)),s||!1!==s&&H(t.url))){const e=a&&i&&K.read(i);e&&l.set(a,e)}return t},se="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,r){const n=oe(e);let s=n.data;const a=z.from(n.headers).normalize();let i,l,c,u,d,{responseType:p,onUploadProgress:h,onDownloadProgress:b}=n;function w(){u&&u(),d&&d(),n.cancelToken&&n.cancelToken.unsubscribe(i),n.signal&&n.signal.removeEventListener("abort",i)}let y=new XMLHttpRequest;function R(){if(!y)return;const n=z.from("getAllResponseHeaders"in y&&y.getAllResponseHeaders());V((function(e){t(e),w()}),(function(e){r(e),w()}),{data:p&&"text"!==p&&"json"!==p?y.response:y.responseText,status:y.status,statusText:y.statusText,headers:n,config:e,request:y}),y=null}y.open(n.method.toUpperCase(),n.url,!0),y.timeout=n.timeout,"onloadend"in y?y.onloadend=R:y.onreadystatechange=function(){y&&4===y.readyState&&(0!==y.status||y.responseURL&&0===y.responseURL.indexOf("file:"))&&setTimeout(R)},y.onabort=function(){y&&(r(new f.a("Request aborted",f.a.ECONNABORTED,e,y)),y=null)},y.onerror=function(){r(new f.a("Network Error",f.a.ERR_NETWORK,e,y)),y=null},y.ontimeout=function(){let t=n.timeout?"timeout of "+n.timeout+"ms exceeded":"timeout exceeded";const o=n.transitional||m;n.timeoutErrorMessage&&(t=n.timeoutErrorMessage),r(new f.a(t,o.clarifyTimeoutError?f.a.ETIMEDOUT:f.a.ECONNABORTED,e,y)),y=null},void 0===s&&a.setContentType(null),"setRequestHeader"in y&&o.a.forEach(a.toJSON(),(function(e,t){y.setRequestHeader(t,e)})),o.a.isUndefined(n.withCredentials)||(y.withCredentials=!!n.withCredentials),p&&"json"!==p&&(y.responseType=n.responseType),b&&([c,d]=$(b,!0),y.addEventListener("progress",c)),h&&y.upload&&([l,u]=$(h),y.upload.addEventListener("progress",l),y.upload.addEventListener("loadend",u)),(n.cancelToken||n.signal)&&(i=t=>{y&&(r(!t||t.type?new B(null,e,y):t),y.abort(),y=null)},n.cancelToken&&n.cancelToken.subscribe(i),n.signal&&(n.signal.aborted?i():n.signal.addEventListener("abort",i)));const O=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(n.url);O&&-1===T.protocols.indexOf(O)?r(new f.a("Unsupported protocol "+O+":",f.a.ERR_BAD_REQUEST,e)):y.send(s||null)}))},ae=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let r,n=new AbortController;const s=function(e){if(!r){r=!0,i();const t=e instanceof Error?e:this.reason;n.abort(t instanceof f.a?t:new B(t instanceof Error?t.message:t))}};let a=t&&setTimeout((()=>{a=null,s(new f.a(`timeout ${t} of ms exceeded`,f.a.ETIMEDOUT))}),t);const i=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach((e=>{e.unsubscribe?e.unsubscribe(s):e.removeEventListener("abort",s)})),e=null)};e.forEach((e=>e.addEventListener("abort",s)));const{signal:l}=n;return l.unsubscribe=()=>o.a.asap(i),l}},ie=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),le=function(e,t){this[0]=e,this[1]=t},ce=(e,t,r)=>{var n=(e,t,o,s)=>{try{var a=r[e](t),i=(t=a.value)instanceof le,l=a.done;Promise.resolve(i?t[0]:t).then((r=>i?n("return"===e?e:"next",t[1]?{done:r.done,value:r.value}:r,o,s):o({value:r,done:l}))).catch((e=>n("throw",e,o,s)))}catch(c){s(c)}},o=e=>s[e]=t=>new Promise(((r,o)=>n(e,t,r,o))),s={};return r=r.apply(e,t),s[ie("asyncIterator")]=()=>s,o("next"),o("throw"),o("return"),s},ue=e=>{var t,r=e[ie("asyncIterator")],n=!1,o={};return null==r?(r=e[ie("iterator")](),t=e=>o[e]=t=>r[e](t)):(r=r.call(e),t=e=>o[e]=t=>{if(n){if(n=!1,"throw"===e)throw t;return t}return n=!0,{done:!1,value:new le(new Promise((n=>{var o=r[e](t);o instanceof Object||(()=>{throw TypeError("Object expected")})(),n(o)})),1)}}),o[ie("iterator")]=()=>o,t("next"),"throw"in r?t("throw"):o.throw=e=>{throw e},"return"in r&&t("return"),o};const de=function*(e,t){let r=e.byteLength;if(!t||r<t)return void(yield e);let n,o=0;for(;o<r;)n=o+t,yield e.slice(o,n),o=n},pe=function(e){return ce(this,null,(function*(){if(e[Symbol.asyncIterator])return void(yield*ue(e));const t=e.getReader();try{for(;;){const{done:e,value:r}=yield new le(t.read());if(e)break;yield r}}finally{yield new le(t.cancel())}}))},he=(e,t,r,n)=>{const o=function(e,t){return ce(this,null,(function*(){try{for(var r,n,o,s=((e,t,r)=>(t=e[ie("asyncIterator")])?t.call(e):(e=e[ie("iterator")](),t={},(r=(r,n)=>(n=e[r])&&(t[r]=t=>new Promise(((r,o,s)=>(t=n.call(e,t),s=t.done,Promise.resolve(t.value).then((e=>r({value:e,done:s})),o))))))("next"),r("return"),t))(pe(e));r=!(n=yield new le(s.next())).done;r=!1){const e=n.value;yield*ue(de(e,t))}}catch(n){o=[n]}finally{try{r&&(n=s.return)&&(yield new le(n.call(s)))}finally{if(o)throw o[0]}}}))}(e,t);let s,a=0,i=e=>{s||(s=!0,n&&n(e))};return new ReadableStream({pull(e){return t=this,n=function*(){try{const{done:t,value:n}=yield o.next();if(t)return i(),void e.close();let s=n.byteLength;if(r){let e=a+=s;r(e)}e.enqueue(new Uint8Array(n))}catch(t){throw i(t),t}},new Promise(((e,r)=>{var o=e=>{try{a(n.next(e))}catch(t){r(t)}},s=e=>{try{a(n.throw(e))}catch(t){r(t)}},a=t=>t.done?e(t.value):Promise.resolve(t.value).then(o,s);a((n=n.apply(t,null)).next())}));var t,n},cancel:e=>(i(e),o.return())},{highWaterMark:2})};var fe=Object.defineProperty,me=Object.defineProperties,be=Object.getOwnPropertyDescriptors,we=Object.getOwnPropertySymbols,ye=Object.prototype.hasOwnProperty,Re=Object.prototype.propertyIsEnumerable,Oe=(e,t,r)=>t in e?fe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ve=(e,t,r)=>new Promise(((n,o)=>{var s=e=>{try{i(r.next(e))}catch(t){o(t)}},a=e=>{try{i(r.throw(e))}catch(t){o(t)}},i=e=>e.done?n(e.value):Promise.resolve(e.value).then(s,a);i((r=r.apply(e,t)).next())}));const Ue="function"==typeof fetch&&"function"==typeof Request&&"function"==typeof Response,Ie=Ue&&"function"==typeof ReadableStream,Pe=Ue&&("function"==typeof TextEncoder?(e=>t=>e.encode(t))(new TextEncoder):e=>ve(void 0,null,(function*(){return new Uint8Array(yield new Response(e).arrayBuffer())}))),ge=(e,...t)=>{try{return!!e(...t)}catch(r){return!1}},Ce=Ie&&ge((()=>{let e=!1;const t=new Request(T.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t})),Ee=Ie&&ge((()=>o.a.isReadableStream(new Response("").body))),Te={stream:Ee&&(e=>e.body)};var Se;Ue&&(Se=new Response,["text","arrayBuffer","blob","formData","stream"].forEach((e=>{!Te[e]&&(Te[e]=o.a.isFunction(Se[e])?t=>t[e]():(t,r)=>{throw new f.a(`Response type '${e}' is not supported`,f.a.ERR_NOT_SUPPORT,r)})})));var Ae=Ue&&(e=>ve(void 0,null,(function*(){let{url:t,method:r,data:n,signal:s,cancelToken:a,timeout:i,onDownloadProgress:l,onUploadProgress:c,responseType:u,headers:d,withCredentials:p="same-origin",fetchOptions:h}=oe(e);u=u?(u+"").toLowerCase():"text";let m,b=ae([s,a&&a.toAbortSignal()],i);const w=b&&b.unsubscribe&&(()=>{b.unsubscribe()});let y;try{if(c&&Ce&&"get"!==r&&"head"!==r&&0!==(y=yield((e,t)=>ve(void 0,null,(function*(){const r=o.a.toFiniteNumber(e.getContentLength());return null==r?(e=>ve(void 0,null,(function*(){if(null==e)return 0;if(o.a.isBlob(e))return e.size;if(o.a.isSpecCompliantForm(e)){const t=new Request(T.origin,{method:"POST",body:e});return(yield t.arrayBuffer()).byteLength}return o.a.isArrayBufferView(e)||o.a.isArrayBuffer(e)?e.byteLength:(o.a.isURLSearchParams(e)&&(e+=""),o.a.isString(e)?(yield Pe(e)).byteLength:void 0)})))(t):r})))(d,n))){let e,r=new Request(t,{method:"POST",body:n,duplex:"half"});if(o.a.isFormData(n)&&(e=r.headers.get("content-type"))&&d.setContentType(e),r.body){const[e,t]=M(y,$(W(c)));n=he(r.body,65536,e,t)}}o.a.isString(p)||(p=p?"include":"omit");const s="credentials"in Request.prototype;m=new Request(t,(R=((e,t)=>{for(var r in t||(t={}))ye.call(t,r)&&Oe(e,r,t[r]);if(we)for(var r of we(t))Re.call(t,r)&&Oe(e,r,t[r]);return e})({},h),O={signal:b,method:r.toUpperCase(),headers:d.normalize().toJSON(),body:n,duplex:"half",credentials:s?p:void 0},me(R,be(O))));let a=yield fetch(m);const i=Ee&&("stream"===u||"response"===u);if(Ee&&(l||i&&w)){const e={};["status","statusText","headers"].forEach((t=>{e[t]=a[t]}));const t=o.a.toFiniteNumber(a.headers.get("content-length")),[r,n]=l&&M(t,$(W(l),!0))||[];a=new Response(he(a.body,65536,r,(()=>{n&&n(),w&&w()})),e)}u=u||"text";let f=yield Te[o.a.findKey(Te,u)||"text"](a,e);return!i&&w&&w(),yield new Promise(((t,r)=>{V(t,r,{data:f,headers:z.from(a.headers),status:a.status,statusText:a.statusText,config:e,request:m})}))}catch(v){if(w&&w(),v&&"TypeError"===v.name&&/fetch/i.test(v.message))throw Object.assign(new f.a("Network Error",f.a.ERR_NETWORK,e,m),{cause:v.cause||v});throw f.a.from(v,v&&v.code,e,m)}var R,O})));const ke={http:J.a,xhr:se,fetch:Ae};o.a.forEach(ke,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(r){}Object.defineProperty(e,"adapterName",{value:t})}}));const xe=e=>`- ${e}`,Ne=e=>o.a.isFunction(e)||null===e||!1===e;var Fe=e=>{e=o.a.isArray(e)?e:[e];const{length:t}=e;let r,n;const s={};for(let o=0;o<t;o++){let t;if(r=e[o],n=r,!Ne(r)&&(n=ke[(t=String(r)).toLowerCase()],void 0===n))throw new f.a(`Unknown adapter '${t}'`);if(n)break;s[t||"#"+o]=n}if(!n){const e=Object.entries(s).map((([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")));let r=t?e.length>1?"since :\n"+e.map(xe).join("\n"):" "+xe(e[0]):"as no adapter specified";throw new f.a("There is no suitable adapter to dispatch the request "+r,"ERR_NOT_SUPPORT")}return n};function je(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new B(null,e)}function Ge(e){return je(e),e.headers=z.from(e.headers),e.data=q.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Fe(e.adapter||k.adapter)(e).then((function(t){return je(e),t.data=q.call(e,e.transformResponse,t),t.headers=z.from(t.headers),t}),(function(t){return D(t)||(je(e),t&&t.response&&(t.response.data=q.call(e,e.transformResponse,t.response),t.response.headers=z.from(t.response.headers))),Promise.reject(t)}))}const Le={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{Le[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}}));const ze={};Le.transitional=function(e,t,r){function n(e,t){return"[Axios v1.7.8] Transitional option '"+e+"'"+t+(r?". "+r:"")}return(r,o,s)=>{if(!1===e)throw new f.a(n(o," has been removed"+(t?" in "+t:"")),f.a.ERR_DEPRECATED);return t&&!ze[o]&&(ze[o]=!0,console.warn(n(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,o,s)}},Le.spelling=function(e){return(t,r)=>(console.warn(`${r} is likely a misspelling of ${e}`),!0)};var qe={assertOptions:function(e,t,r){if("object"!=typeof e)throw new f.a("options must be an object",f.a.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let o=n.length;for(;o-- >0;){const s=n[o],a=t[s];if(a){const t=e[s],r=void 0===t||a(t,s,e);if(!0!==r)throw new f.a("option "+s+" must be "+r,f.a.ERR_BAD_OPTION_VALUE)}else if(!0!==r)throw new f.a("Unknown option "+s,f.a.ERR_BAD_OPTION)}},validators:Le};const De=qe.validators;class _e{constructor(e){this.defaults=e,this.interceptors={request:new h,response:new h}}request(e,t){return r=this,n=function*(){try{return yield this._request(e,t)}catch(r){if(r instanceof Error){let e={};Error.captureStackTrace?Error.captureStackTrace(e):e=new Error;const t=e.stack?e.stack.replace(/^.+\n/,""):"";try{r.stack?t&&!String(r.stack).endsWith(t.replace(/^.+\n.+\n/,""))&&(r.stack+="\n"+t):r.stack=t}catch(n){}}throw r}},new Promise(((e,t)=>{var o=e=>{try{a(n.next(e))}catch(r){t(r)}},s=e=>{try{a(n.throw(e))}catch(r){t(r)}},a=t=>t.done?e(t.value):Promise.resolve(t.value).then(o,s);a((n=n.apply(r,null)).next())}));var r,n}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=ne(this.defaults,t);const{transitional:r,paramsSerializer:n,headers:s}=t;void 0!==r&&qe.assertOptions(r,{silentJSONParsing:De.transitional(De.boolean),forcedJSONParsing:De.transitional(De.boolean),clarifyTimeoutError:De.transitional(De.boolean)},!1),null!=n&&(o.a.isFunction(n)?t.paramsSerializer={serialize:n}:qe.assertOptions(n,{encode:De.function,serialize:De.function},!0)),qe.assertOptions(t,{baseUrl:De.spelling("baseURL"),withXsrfToken:De.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let a=s&&o.a.merge(s.common,s[t.method]);s&&o.a.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete s[e]})),t.headers=z.concat(a,s);const i=[];let l=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(l=l&&e.synchronous,i.unshift(e.fulfilled,e.rejected))}));const c=[];let u;this.interceptors.response.forEach((function(e){c.push(e.fulfilled,e.rejected)}));let d,p=0;if(!l){const e=[Ge.bind(this),void 0];for(e.unshift.apply(e,i),e.push.apply(e,c),d=e.length,u=Promise.resolve(t);p<d;)u=u.then(e[p++],e[p++]);return u}d=i.length;let h=t;for(p=0;p<d;){const e=i[p++],t=i[p++];try{h=e(h)}catch(f){t.call(this,f);break}}try{u=Ge.call(this,h)}catch(f){return Promise.reject(f)}for(p=0,d=c.length;p<d;)u=u.then(c[p++],c[p++]);return u}getUri(e){return p(X((e=ne(this.defaults,e)).baseURL,e.url),e.params,e.paramsSerializer)}}o.a.forEach(["delete","get","head","options"],(function(e){_e.prototype[e]=function(t,r){return this.request(ne(r||{},{method:e,url:t,data:(r||{}).data}))}})),o.a.forEach(["post","put","patch"],(function(e){function t(t){return function(r,n,o){return this.request(ne(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}_e.prototype[e]=t(),_e.prototype[e+"Form"]=t(!0)}));var Be=_e;class Je{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise((function(e){t=e}));const r=this;this.promise.then((e=>{if(!r._listeners)return;let t=r._listeners.length;for(;t-- >0;)r._listeners[t](e);r._listeners=null})),this.promise.then=e=>{let t;const n=new Promise((e=>{r.subscribe(e),t=e})).then(e);return n.cancel=function(){r.unsubscribe(t)},n},e((function(e,n,o){r.reason||(r.reason=new B(e,n,o),t(r.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new Je((function(t){e=t})),cancel:e}}}var Ve=Je;const $e={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries($e).forEach((([e,t])=>{$e[t]=e}));var Me=$e;const We=function e(t){const r=new Be(t),n=Object(s.a)(Be.prototype.request,r);return o.a.extend(n,Be.prototype,r,{allOwnKeys:!0}),o.a.extend(n,r,null,{allOwnKeys:!0}),n.create=function(r){return e(ne(t,r))},n}(k);We.Axios=Be,We.CanceledError=B,We.CancelToken=Ve,We.isCancel=D,We.VERSION="1.7.8",We.toFormData=a.a,We.AxiosError=f.a,We.Cancel=We.CanceledError,We.all=function(e){return Promise.all(e)},We.spread=function(e){return function(t){return e.apply(null,t)}},We.isAxiosError=function(e){return o.a.isObject(e)&&!0===e.isAxiosError},We.mergeConfig=ne,We.AxiosHeaders=z,We.formToJSON=e=>S(o.a.isHTMLForm(e)?new FormData(e):e),We.getAdapter=Fe,We.HttpStatusCode=Me,We.default=We;var He,Ke,Xe,Qe,Ze,Ye,et,tt,rt,nt,ot,st,at,it=We,lt=Object.defineProperty,ct=Object.defineProperties,ut=Object.getOwnPropertyDescriptors,dt=Object.getOwnPropertySymbols,pt=Object.prototype.hasOwnProperty,ht=Object.prototype.propertyIsEnumerable,ft=(e,t,r)=>t in e?lt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,mt=(e,t)=>{for(var r in t||(t={}))pt.call(t,r)&&ft(e,r,t[r]);if(dt)for(var r of dt(t))ht.call(t,r)&&ft(e,r,t[r]);return e},bt=(e,t)=>ct(e,ut(t)),wt=(e,t,r)=>ft(e,"symbol"!=typeof t?t+"":t,r),yt=(e,t,r)=>new Promise(((n,o)=>{var s=e=>{try{i(r.next(e))}catch(t){o(t)}},a=e=>{try{i(r.throw(e))}catch(t){o(t)}},i=e=>e.done?n(e.value):Promise.resolve(e.value).then(s,a);i((r=r.apply(e,t)).next())}));class Rt{constructor(){wt(this,"apiUrl"),wt(this,"apiKey",""),wt(this,"authorizationToken",null)}getAuthorizationToken(){return yt(this,null,(function*(){return this.authorizationToken}))}setAuthorizationToken(e){this.authorizationToken=e}}class Ot{constructor(e){wt(this,"configuration"),this.configuration=e}transformOptions(e){return yt(this,null,(function*(){const t=yield this.configuration.getAuthorizationToken();return e.headers=bt(mt({},e.headers),null!=t?{authorization:" Bearer "+t}:{"X-API-Key":this.configuration.apiKey}),e=bt(mt({},e),{transformResponse:e=>e}),e.responseType||(e.responseType="json"),"blob"==e.responseType&&(e.responseType="arraybuffer"),e}))}getBaseUrl(e){return this.configuration.apiUrl.endsWith("/")?this.configuration.apiUrl.slice(0,-1):this.configuration.apiUrl}transformResult(e,t,r){return r(t)}}class vt extends Ot{constructor(e,t,r){super(e),wt(this,"instance"),wt(this,"baseUrl"),wt(this,"jsonParseReviver"),this.instance=r||it.create(),this.baseUrl=null!=t?t:this.getBaseUrl("")}getAll(e,t,r,n,o,s,a,i,l,c,u,d,p,h){let f=this.baseUrl+"/api/storefront/v1/product-references/ext?";if(null==e)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");f+="storefrontId="+encodeURIComponent(""+e)+"&",null!=t&&(f+="productReference="+encodeURIComponent(""+t)+"&"),null!=r&&(f+="productId="+encodeURIComponent(""+r)+"&"),null!=n&&(f+="productVersionId="+encodeURIComponent(""+n)+"&"),null!=o&&(f+="productLinkId="+encodeURIComponent(""+o)+"&"),null!=s&&(f+="skip="+encodeURIComponent(""+s)+"&"),null!=a&&(f+="take="+encodeURIComponent(""+a)+"&"),null!=i&&(f+="sorting="+encodeURIComponent(""+i)+"&"),null!=l&&(f+="search="+encodeURIComponent(""+l)+"&"),null!=c&&(f+="sku="+encodeURIComponent(""+c)+"&"),null!=u&&u&&u.forEach((e=>{f+="tags="+encodeURIComponent(""+e)+"&"})),null!=d&&(f+="customFields="+encodeURIComponent(""+d)+"&"),null!=p&&(f+="tenantId="+encodeURIComponent(""+p)+"&"),f=f.replace(/[?&]$/,"");let m={method:"GET",url:f,headers:{Accept:"text/plain"},cancelToken:h};return this.transformOptions(m).then((e=>this.instance.request(e))).catch((e=>{if(gt(e)&&e.response)return e.response;throw e})).then((e=>this.transformResult(f,e,(e=>this.processGetAll(e)))))}processGetAll(e){const t=e.status;let r={};if(e.headers&&"object"==typeof e.headers)for(let n in e.headers)e.headers.hasOwnProperty(n)&&(r[n]=e.headers[n]);if(200===t){let t=null,r=e.data;return t=JSON.parse(r),Promise.resolve(t)}return 401===t?Pt("Unauthorized",t,e.data,r):403===t?Pt("Forbidden",t,e.data,r):200!==t&&204!==t?Pt("An unexpected server error occurred.",t,e.data,r):Promise.resolve(null)}get(e,t,r,n){let o=this.baseUrl+"/api/storefront/v1/product-references/ext/{reference}?";if(null==e)throw new Error("The parameter 'reference' must be defined.");if(o=o.replace("{reference}",encodeURIComponent(""+e)),null==t)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");o+="storefrontId="+encodeURIComponent(""+t)+"&",null!=r&&(o+="tenantId="+encodeURIComponent(""+r)+"&"),o=o.replace(/[?&]$/,"");let s={method:"GET",url:o,headers:{Accept:"text/plain"},cancelToken:n};return this.transformOptions(s).then((e=>this.instance.request(e))).catch((e=>{if(gt(e)&&e.response)return e.response;throw e})).then((e=>this.transformResult(o,e,(e=>this.processGet(e)))))}processGet(e){const t=e.status;let r={};if(e.headers&&"object"==typeof e.headers)for(let n in e.headers)e.headers.hasOwnProperty(n)&&(r[n]=e.headers[n]);if(200===t){let t=null,r=e.data;return t=JSON.parse(r),Promise.resolve(t)}if(404===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),Pt("Not Found",t,n,r,o)}return 401===t?Pt("Unauthorized",t,e.data,r):403===t?Pt("Forbidden",t,e.data,r):200!==t&&204!==t?Pt("An unexpected server error occurred.",t,e.data,r):Promise.resolve(null)}getAllProductLinks(e,t,r,n,o,s,a,i,l,c,u,d,p,h){let f=this.baseUrl+"/api/storefront/v1/product-references/ext/product-links?";if(null==e)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");f+="storefrontId="+encodeURIComponent(""+e)+"&",null!=t&&(f+="productReference="+encodeURIComponent(""+t)+"&"),null!=r&&(f+="productId="+encodeURIComponent(""+r)+"&"),null!=n&&(f+="productVersionId="+encodeURIComponent(""+n)+"&"),null!=o&&(f+="productLinkId="+encodeURIComponent(""+o)+"&"),null!=s&&(f+="skip="+encodeURIComponent(""+s)+"&"),null!=a&&(f+="take="+encodeURIComponent(""+a)+"&"),null!=i&&(f+="sorting="+encodeURIComponent(""+i)+"&"),null!=l&&(f+="search="+encodeURIComponent(""+l)+"&"),null!=c&&(f+="sku="+encodeURIComponent(""+c)+"&"),null!=u&&u&&u.forEach((e=>{f+="tags="+encodeURIComponent(""+e)+"&"})),null!=d&&(f+="customFields="+encodeURIComponent(""+d)+"&"),null!=p&&(f+="tenantId="+encodeURIComponent(""+p)+"&"),f=f.replace(/[?&]$/,"");let m={method:"GET",url:f,headers:{Accept:"text/plain"},cancelToken:h};return this.transformOptions(m).then((e=>this.instance.request(e))).catch((e=>{if(gt(e)&&e.response)return e.response;throw e})).then((e=>this.transformResult(f,e,(e=>this.processGetAllProductLinks(e)))))}processGetAllProductLinks(e){const t=e.status;let r={};if(e.headers&&"object"==typeof e.headers)for(let n in e.headers)e.headers.hasOwnProperty(n)&&(r[n]=e.headers[n]);if(200===t){let t=null,r=e.data;return t=JSON.parse(r),Promise.resolve(t)}return 401===t?Pt("Unauthorized",t,e.data,r):403===t?Pt("Forbidden",t,e.data,r):200!==t&&204!==t?Pt("An unexpected server error occurred.",t,e.data,r):Promise.resolve(null)}getProduct(e,t,r,n){let o=this.baseUrl+"/api/storefront/v1/product-references/ext/{reference}/product?";if(null==e)throw new Error("The parameter 'reference' must be defined.");if(o=o.replace("{reference}",encodeURIComponent(""+e)),null==t)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");o+="storefrontId="+encodeURIComponent(""+t)+"&",null!=r&&(o+="tenantId="+encodeURIComponent(""+r)+"&"),o=o.replace(/[?&]$/,"");let s={method:"GET",url:o,headers:{Accept:"text/plain"},cancelToken:n};return this.transformOptions(s).then((e=>this.instance.request(e))).catch((e=>{if(gt(e)&&e.response)return e.response;throw e})).then((e=>this.transformResult(o,e,(e=>this.processGetProduct(e)))))}processGetProduct(e){const t=e.status;let r={};if(e.headers&&"object"==typeof e.headers)for(let n in e.headers)e.headers.hasOwnProperty(n)&&(r[n]=e.headers[n]);if(200===t){let t=null,r=e.data;return t=JSON.parse(r),Promise.resolve(t)}if(404===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),Pt("Not Found",t,n,r,o)}return 401===t?Pt("Unauthorized",t,e.data,r):403===t?Pt("Forbidden",t,e.data,r):200!==t&&204!==t?Pt("An unexpected server error occurred.",t,e.data,r):Promise.resolve(null)}getProductSummary(e,t,r,n,o,s){let a=this.baseUrl+"/api/storefront/v1/product-references/ext/{reference}/product-summary?";if(null==e)throw new Error("The parameter 'reference' must be defined.");if(a=a.replace("{reference}",encodeURIComponent(""+e)),null==t)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");a+="storefrontId="+encodeURIComponent(""+t)+"&",null!=r&&(a+="productVariantId="+encodeURIComponent(""+r)+"&"),null!=n&&(a+="sku="+encodeURIComponent(""+n)+"&"),null!=o&&(a+="tenantId="+encodeURIComponent(""+o)+"&"),a=a.replace(/[?&]$/,"");let i={method:"GET",url:a,headers:{Accept:"text/plain"},cancelToken:s};return this.transformOptions(i).then((e=>this.instance.request(e))).catch((e=>{if(gt(e)&&e.response)return e.response;throw e})).then((e=>this.transformResult(a,e,(e=>this.processGetProductSummary(e)))))}processGetProductSummary(e){const t=e.status;let r={};if(e.headers&&"object"==typeof e.headers)for(let n in e.headers)e.headers.hasOwnProperty(n)&&(r[n]=e.headers[n]);if(200===t){let t=null,r=e.data;return t=JSON.parse(r),Promise.resolve(t)}if(404===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),Pt("Not Found",t,n,r,o)}return 401===t?Pt("Unauthorized",t,e.data,r):403===t?Pt("Forbidden",t,e.data,r):200!==t&&204!==t?Pt("An unexpected server error occurred.",t,e.data,r):Promise.resolve(null)}getProductLink(e,t,r,n){let o=this.baseUrl+"/api/storefront/v1/product-references/ext/{reference}/product-link?";if(null==e)throw new Error("The parameter 'reference' must be defined.");if(o=o.replace("{reference}",encodeURIComponent(""+e)),null==t)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");o+="storefrontId="+encodeURIComponent(""+t)+"&",null!=r&&(o+="tenantId="+encodeURIComponent(""+r)+"&"),o=o.replace(/[?&]$/,"");let s={method:"GET",url:o,headers:{Accept:"text/plain"},cancelToken:n};return this.transformOptions(s).then((e=>this.instance.request(e))).catch((e=>{if(gt(e)&&e.response)return e.response;throw e})).then((e=>this.transformResult(o,e,(e=>this.processGetProductLink(e)))))}processGetProductLink(e){const t=e.status;let r={};if(e.headers&&"object"==typeof e.headers)for(let n in e.headers)e.headers.hasOwnProperty(n)&&(r[n]=e.headers[n]);if(200===t){let t=null,r=e.data;return t=JSON.parse(r),Promise.resolve(t)}if(404===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),Pt("Not Found",t,n,r,o)}return 401===t?Pt("Unauthorized",t,e.data,r):403===t?Pt("Forbidden",t,e.data,r):200!==t&&204!==t?Pt("An unexpected server error occurred.",t,e.data,r):Promise.resolve(null)}getProductFilter(e,t,r,n){let o=this.baseUrl+"/api/storefront/v1/product-references/ext/{reference}/product-filter?";if(null==e)throw new Error("The parameter 'reference' must be defined.");if(o=o.replace("{reference}",encodeURIComponent(""+e)),null==t)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");o+="storefrontId="+encodeURIComponent(""+t)+"&",null!=r&&(o+="tenantId="+encodeURIComponent(""+r)+"&"),o=o.replace(/[?&]$/,"");let s={method:"GET",url:o,headers:{Accept:"text/plain"},cancelToken:n};return this.transformOptions(s).then((e=>this.instance.request(e))).catch((e=>{if(gt(e)&&e.response)return e.response;throw e})).then((e=>this.transformResult(o,e,(e=>this.processGetProductFilter(e)))))}processGetProductFilter(e){const t=e.status;let r={};if(e.headers&&"object"==typeof e.headers)for(let n in e.headers)e.headers.hasOwnProperty(n)&&(r[n]=e.headers[n]);if(200===t){let t=null,r=e.data;return t=JSON.parse(r),Promise.resolve(t)}if(404===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),Pt("Not Found",t,n,r,o)}return 401===t?Pt("Unauthorized",t,e.data,r):403===t?Pt("Forbidden",t,e.data,r):200!==t&&204!==t?Pt("An unexpected server error occurred.",t,e.data,r):Promise.resolve(null)}getProductCostDetails(e,t,r,n,o,s,a,i){let l=this.baseUrl+"/api/storefront/v1/product-references/ext/{reference}/product-cost-details?";if(null==e)throw new Error("The parameter 'reference' must be defined.");if(l=l.replace("{reference}",encodeURIComponent(""+e)),null==t)throw new Error("The parameter 'sku' must be defined and cannot be null.");if(l+="sku="+encodeURIComponent(""+t)+"&",null==r)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");if(l+="storefrontId="+encodeURIComponent(""+r)+"&",null!=n&&(l+="storefrontUserId="+encodeURIComponent(""+n)+"&"),null!=o&&(l+="currencyCode="+encodeURIComponent(""+o)+"&"),null===s)throw new Error("The parameter 'quantity' cannot be null.");void 0!==s&&(l+="quantity="+encodeURIComponent(""+s)+"&"),null!=a&&(l+="tenantId="+encodeURIComponent(""+a)+"&"),l=l.replace(/[?&]$/,"");let c={method:"GET",url:l,headers:{Accept:"text/plain"},cancelToken:i};return this.transformOptions(c).then((e=>this.instance.request(e))).catch((e=>{if(gt(e)&&e.response)return e.response;throw e})).then((e=>this.transformResult(l,e,(e=>this.processGetProductCostDetails(e)))))}processGetProductCostDetails(e){const t=e.status;let r={};if(e.headers&&"object"==typeof e.headers)for(let n in e.headers)e.headers.hasOwnProperty(n)&&(r[n]=e.headers[n]);if(200===t){let t=null,r=e.data;return t=JSON.parse(r),Promise.resolve(t)}if(404===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),Pt("Not Found",t,n,r,o)}return 401===t?Pt("Unauthorized",t,e.data,r):403===t?Pt("Forbidden",t,e.data,r):200!==t&&204!==t?Pt("An unexpected server error occurred.",t,e.data,r):Promise.resolve(null)}getPersonalizationWorkflow(e,t,r,n){let o=this.baseUrl+"/api/storefront/v1/product-references/ext/{reference}/personalization-workflow?";if(null==e)throw new Error("The parameter 'reference' must be defined.");if(o=o.replace("{reference}",encodeURIComponent(""+e)),null==t)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");o+="storefrontId="+encodeURIComponent(""+t)+"&",null!=r&&(o+="tenantId="+encodeURIComponent(""+r)+"&"),o=o.replace(/[?&]$/,"");let s={method:"GET",url:o,headers:{Accept:"text/plain"},cancelToken:n};return this.transformOptions(s).then((e=>this.instance.request(e))).catch((e=>{if(gt(e)&&e.response)return e.response;throw e})).then((e=>this.transformResult(o,e,(e=>this.processGetPersonalizationWorkflow(e)))))}processGetPersonalizationWorkflow(e){const t=e.status;let r={};if(e.headers&&"object"==typeof e.headers)for(let n in e.headers)e.headers.hasOwnProperty(n)&&(r[n]=e.headers[n]);if(200===t){let t=null,r=e.data;return t=JSON.parse(r),Promise.resolve(t)}if(404===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),Pt("Not Found",t,n,r,o)}return 401===t?Pt("Unauthorized",t,e.data,r):403===t?Pt("Forbidden",t,e.data,r):200!==t&&204!==t?Pt("An unexpected server error occurred.",t,e.data,r):Promise.resolve(null)}getProductPersonalizationWorkflow(e,t,r,n){let o=this.baseUrl+"/api/storefront/v1/product-references/ext/{reference}/product-personalization-workflow?";if(null==e)throw new Error("The parameter 'reference' must be defined.");if(o=o.replace("{reference}",encodeURIComponent(""+e)),null==t)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");o+="storefrontId="+encodeURIComponent(""+t)+"&",null!=r&&(o+="tenantId="+encodeURIComponent(""+r)+"&"),o=o.replace(/[?&]$/,"");let s={method:"GET",url:o,headers:{Accept:"text/plain"},cancelToken:n};return this.transformOptions(s).then((e=>this.instance.request(e))).catch((e=>{if(gt(e)&&e.response)return e.response;throw e})).then((e=>this.transformResult(o,e,(e=>this.processGetProductPersonalizationWorkflow(e)))))}processGetProductPersonalizationWorkflow(e){const t=e.status;let r={};if(e.headers&&"object"==typeof e.headers)for(let n in e.headers)e.headers.hasOwnProperty(n)&&(r[n]=e.headers[n]);if(200===t){let t=null;return t=e.data,Promise.resolve(t)}if(404===t){const n=e.data;let o=null;return o=n,Pt("Not Found",t,n,r,o)}return 401===t?Pt("Unauthorized",t,e.data,r):403===t?Pt("Forbidden",t,e.data,r):200!==t&&204!==t?Pt("An unexpected server error occurred.",t,e.data,r):Promise.resolve(null)}obsoleteGetProduct(e,t,r,n){let o=this.baseUrl+"/api/storefront/v1/product-references/{reference}/product?";if(null==e)throw new Error("The parameter 'reference' must be defined.");if(o=o.replace("{reference}",encodeURIComponent(""+e)),null==t)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");o+="storefrontId="+encodeURIComponent(""+t)+"&",null!=r&&(o+="tenantId="+encodeURIComponent(""+r)+"&"),o=o.replace(/[?&]$/,"");let s={method:"GET",url:o,headers:{Accept:"text/plain"},cancelToken:n};return this.transformOptions(s).then((e=>this.instance.request(e))).catch((e=>{if(gt(e)&&e.response)return e.response;throw e})).then((e=>this.transformResult(o,e,(e=>this.processObsoleteGetProduct(e)))))}processObsoleteGetProduct(e){const t=e.status;let r={};if(e.headers&&"object"==typeof e.headers)for(let n in e.headers)e.headers.hasOwnProperty(n)&&(r[n]=e.headers[n]);if(200===t){let t=null,r=e.data;return t=JSON.parse(r),Promise.resolve(t)}if(404===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),Pt("Not Found",t,n,r,o)}return 401===t?Pt("Unauthorized",t,e.data,r):403===t?Pt("Forbidden",t,e.data,r):200!==t&&204!==t?Pt("An unexpected server error occurred.",t,e.data,r):Promise.resolve(null)}obsoleteGetProductLink(e,t,r,n){let o=this.baseUrl+"/api/storefront/v1/product-references/{reference}/product-link?";if(null==e)throw new Error("The parameter 'reference' must be defined.");if(o=o.replace("{reference}",encodeURIComponent(""+e)),null==t)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");o+="storefrontId="+encodeURIComponent(""+t)+"&",null!=r&&(o+="tenantId="+encodeURIComponent(""+r)+"&"),o=o.replace(/[?&]$/,"");let s={method:"GET",url:o,headers:{Accept:"text/plain"},cancelToken:n};return this.transformOptions(s).then((e=>this.instance.request(e))).catch((e=>{if(gt(e)&&e.response)return e.response;throw e})).then((e=>this.transformResult(o,e,(e=>this.processObsoleteGetProductLink(e)))))}processObsoleteGetProductLink(e){const t=e.status;let r={};if(e.headers&&"object"==typeof e.headers)for(let n in e.headers)e.headers.hasOwnProperty(n)&&(r[n]=e.headers[n]);if(200===t){let t=null,r=e.data;return t=JSON.parse(r),Promise.resolve(t)}if(404===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),Pt("Not Found",t,n,r,o)}return 401===t?Pt("Unauthorized",t,e.data,r):403===t?Pt("Forbidden",t,e.data,r):200!==t&&204!==t?Pt("An unexpected server error occurred.",t,e.data,r):Promise.resolve(null)}obsoleteGetProductFilter(e,t,r,n){let o=this.baseUrl+"/api/storefront/v1/product-references/{reference}/product-filter?";if(null==e)throw new Error("The parameter 'reference' must be defined.");if(o=o.replace("{reference}",encodeURIComponent(""+e)),null==t)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");o+="storefrontId="+encodeURIComponent(""+t)+"&",null!=r&&(o+="tenantId="+encodeURIComponent(""+r)+"&"),o=o.replace(/[?&]$/,"");let s={method:"GET",url:o,headers:{Accept:"text/plain"},cancelToken:n};return this.transformOptions(s).then((e=>this.instance.request(e))).catch((e=>{if(gt(e)&&e.response)return e.response;throw e})).then((e=>this.transformResult(o,e,(e=>this.processObsoleteGetProductFilter(e)))))}processObsoleteGetProductFilter(e){const t=e.status;let r={};if(e.headers&&"object"==typeof e.headers)for(let n in e.headers)e.headers.hasOwnProperty(n)&&(r[n]=e.headers[n]);if(200===t){let t=null,r=e.data;return t=JSON.parse(r),Promise.resolve(t)}if(404===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),Pt("Not Found",t,n,r,o)}return 401===t?Pt("Unauthorized",t,e.data,r):403===t?Pt("Forbidden",t,e.data,r):200!==t&&204!==t?Pt("An unexpected server error occurred.",t,e.data,r):Promise.resolve(null)}obsoleteGetProductPersonalizationWorkflow(e,t,r,n){let o=this.baseUrl+"/api/storefront/v1/product-references/{reference}/product-personalization-workflow?";if(null==e)throw new Error("The parameter 'reference' must be defined.");if(o=o.replace("{reference}",encodeURIComponent(""+e)),null==t)throw new Error("The parameter 'storefrontId' must be defined and cannot be null.");o+="storefrontId="+encodeURIComponent(""+t)+"&",null!=r&&(o+="tenantId="+encodeURIComponent(""+r)+"&"),o=o.replace(/[?&]$/,"");let s={method:"GET",url:o,headers:{Accept:"text/plain"},cancelToken:n};return this.transformOptions(s).then((e=>this.instance.request(e))).catch((e=>{if(gt(e)&&e.response)return e.response;throw e})).then((e=>this.transformResult(o,e,(e=>this.processObsoleteGetProductPersonalizationWorkflow(e)))))}processObsoleteGetProductPersonalizationWorkflow(e){const t=e.status;let r={};if(e.headers&&"object"==typeof e.headers)for(let n in e.headers)e.headers.hasOwnProperty(n)&&(r[n]=e.headers[n]);if(200===t){let t=null;return t=e.data,Promise.resolve(t)}if(404===t){const n=e.data;let o=null;return o=n,Pt("Not Found",t,n,r,o)}return 401===t?Pt("Unauthorized",t,e.data,r):403===t?Pt("Forbidden",t,e.data,r):200!==t&&204!==t?Pt("An unexpected server error occurred.",t,e.data,r):Promise.resolve(null)}}class Ut extends Ot{constructor(e,t,r){super(e),wt(this,"instance"),wt(this,"baseUrl"),wt(this,"jsonParseReviver"),this.instance=r||it.create(),this.baseUrl=null!=t?t:this.getBaseUrl("")}getAllProducts(e,t,r,n,o,s,a,i,l){let c=this.baseUrl+"/api/storefront/v1/products?";null!=e&&(c+="skip="+encodeURIComponent(""+e)+"&"),null!=t&&(c+="take="+encodeURIComponent(""+t)+"&"),null!=r&&(c+="sorting="+encodeURIComponent(""+r)+"&"),null!=n&&(c+="search="+encodeURIComponent(""+n)+"&"),null!=o&&(c+="sku="+encodeURIComponent(""+o)+"&"),null!=s&&s&&s.forEach((e=>{c+="tags="+encodeURIComponent(""+e)+"&"})),null!=a&&(c+="customFields="+encodeURIComponent(""+a)+"&"),null!=i&&(c+="tenantId="+encodeURIComponent(""+i)+"&"),c=c.replace(/[?&]$/,"");let u={method:"GET",url:c,headers:{Accept:"text/plain"},cancelToken:l};return this.transformOptions(u).then((e=>this.instance.request(e))).catch((e=>{if(gt(e)&&e.response)return e.response;throw e})).then((e=>this.transformResult(c,e,(e=>this.processGetAllProducts(e)))))}processGetAllProducts(e){const t=e.status;let r={};if(e.headers&&"object"==typeof e.headers)for(let n in e.headers)e.headers.hasOwnProperty(n)&&(r[n]=e.headers[n]);if(200===t){let t=null,r=e.data;return t=JSON.parse(r),Promise.resolve(t)}return 401===t?Pt("Unauthorized",t,e.data,r):403===t?Pt("Forbidden",t,e.data,r):200!==t&&204!==t?Pt("An unexpected server error occurred.",t,e.data,r):Promise.resolve(null)}getProduct(e,t,r,n){let o=this.baseUrl+"/api/storefront/v1/products/{id}?";if(null==e)throw new Error("The parameter 'id' must be defined.");o=o.replace("{id}",encodeURIComponent(""+e)),null!=t&&(o+="productVersionId="+encodeURIComponent(""+t)+"&"),null!=r&&(o+="tenantId="+encodeURIComponent(""+r)+"&"),o=o.replace(/[?&]$/,"");let s={method:"GET",url:o,headers:{Accept:"text/plain"},cancelToken:n};return this.transformOptions(s).then((e=>this.instance.request(e))).catch((e=>{if(gt(e)&&e.response)return e.response;throw e})).then((e=>this.transformResult(o,e,(e=>this.processGetProduct(e)))))}processGetProduct(e){const t=e.status;let r={};if(e.headers&&"object"==typeof e.headers)for(let n in e.headers)e.headers.hasOwnProperty(n)&&(r[n]=e.headers[n]);if(200===t){let t=null,r=e.data;return t=JSON.parse(r),Promise.resolve(t)}if(404===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),Pt("Not Found",t,n,r,o)}return 401===t?Pt("Unauthorized",t,e.data,r):403===t?Pt("Forbidden",t,e.data,r):200!==t&&204!==t?Pt("An unexpected server error occurred.",t,e.data,r):Promise.resolve(null)}getProductSummary(e,t,r,n,o,s,a){let i=this.baseUrl+"/api/storefront/v1/products/{id}/summary?";if(null==e)throw new Error("The parameter 'id' must be defined.");i=i.replace("{id}",encodeURIComponent(""+e)),null!=t&&(i+="productVersionId="+encodeURIComponent(""+t)+"&"),null!=r&&(i+="productLinkId="+encodeURIComponent(""+r)+"&"),null!=n&&(i+="productVariantId="+encodeURIComponent(""+n)+"&"),null!=o&&(i+="sku="+encodeURIComponent(""+o)+"&"),null!=s&&(i+="tenantId="+encodeURIComponent(""+s)+"&"),i=i.replace(/[?&]$/,"");let l={method:"GET",url:i,headers:{Accept:"text/plain"},cancelToken:a};return this.transformOptions(l).then((e=>this.instance.request(e))).catch((e=>{if(gt(e)&&e.response)return e.response;throw e})).then((e=>this.transformResult(i,e,(e=>this.processGetProductSummary(e)))))}processGetProductSummary(e){const t=e.status;let r={};if(e.headers&&"object"==typeof e.headers)for(let n in e.headers)e.headers.hasOwnProperty(n)&&(r[n]=e.headers[n]);if(200===t){let t=null,r=e.data;return t=JSON.parse(r),Promise.resolve(t)}if(404===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),Pt("Not Found",t,n,r,o)}return 401===t?Pt("Unauthorized",t,e.data,r):403===t?Pt("Forbidden",t,e.data,r):200!==t&&204!==t?Pt("An unexpected server error occurred.",t,e.data,r):Promise.resolve(null)}getProductOptions(e,t,r,n){let o=this.baseUrl+"/api/storefront/v1/products/{id}/options?";if(null==e)throw new Error("The parameter 'id' must be defined.");o=o.replace("{id}",encodeURIComponent(""+e)),null!=t&&(o+="productVersionId="+encodeURIComponent(""+t)+"&"),null!=r&&(o+="tenantId="+encodeURIComponent(""+r)+"&"),o=o.replace(/[?&]$/,"");let s={method:"GET",url:o,headers:{Accept:"text/plain"},cancelToken:n};return this.transformOptions(s).then((e=>this.instance.request(e))).catch((e=>{if(gt(e)&&e.response)return e.response;throw e})).then((e=>this.transformResult(o,e,(e=>this.processGetProductOptions(e)))))}processGetProductOptions(e){const t=e.status;let r={};if(e.headers&&"object"==typeof e.headers)for(let n in e.headers)e.headers.hasOwnProperty(n)&&(r[n]=e.headers[n]);if(200===t){let t=null,r=e.data;return t=JSON.parse(r),Promise.resolve(t)}if(404===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),Pt("Not Found",t,n,r,o)}return 401===t?Pt("Unauthorized",t,e.data,r):403===t?Pt("Forbidden",t,e.data,r):200!==t&&204!==t?Pt("An unexpected server error occurred.",t,e.data,r):Promise.resolve(null)}getAllProductOptions(e,t){let r=this.baseUrl+"/api/storefront/v1/products/options?";null!=e&&(r+="tenantId="+encodeURIComponent(""+e)+"&"),r=r.replace(/[?&]$/,"");let n={method:"GET",url:r,headers:{Accept:"text/plain"},cancelToken:t};return this.transformOptions(n).then((e=>this.instance.request(e))).catch((e=>{if(gt(e)&&e.response)return e.response;throw e})).then((e=>this.transformResult(r,e,(e=>this.processGetAllProductOptions(e)))))}processGetAllProductOptions(e){const t=e.status;let r={};if(e.headers&&"object"==typeof e.headers)for(let n in e.headers)e.headers.hasOwnProperty(n)&&(r[n]=e.headers[n]);if(200===t){let t=null,r=e.data;return t=JSON.parse(r),Promise.resolve(t)}return 401===t?Pt("Unauthorized",t,e.data,r):403===t?Pt("Forbidden",t,e.data,r):200!==t&&204!==t?Pt("An unexpected server error occurred.",t,e.data,r):Promise.resolve(null)}getProductLinks(e,t,r,n,o,s,a,i){let l=this.baseUrl+"/api/storefront/v1/products/{id}/links?";if(null==e)throw new Error("The parameter 'id' must be defined.");l=l.replace("{id}",encodeURIComponent(""+e)),null!=t&&(l+="productVersionId="+encodeURIComponent(""+t)+"&"),null!=r&&(l+="skip="+encodeURIComponent(""+r)+"&"),null!=n&&(l+="take="+encodeURIComponent(""+n)+"&"),null!=o&&(l+="sorting="+encodeURIComponent(""+o)+"&"),null!=s&&(l+="search="+encodeURIComponent(""+s)+"&"),null!=a&&(l+="tenantId="+encodeURIComponent(""+a)+"&"),l=l.replace(/[?&]$/,"");let c={method:"GET",url:l,headers:{Accept:"text/plain"},cancelToken:i};return this.transformOptions(c).then((e=>this.instance.request(e))).catch((e=>{if(gt(e)&&e.response)return e.response;throw e})).then((e=>this.transformResult(l,e,(e=>this.processGetProductLinks(e)))))}processGetProductLinks(e){const t=e.status;let r={};if(e.headers&&"object"==typeof e.headers)for(let n in e.headers)e.headers.hasOwnProperty(n)&&(r[n]=e.headers[n]);if(200===t){let t=null,r=e.data;return t=JSON.parse(r),Promise.resolve(t)}if(404===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),Pt("Not Found",t,n,r,o)}return 401===t?Pt("Unauthorized",t,e.data,r):403===t?Pt("Forbidden",t,e.data,r):200!==t&&204!==t?Pt("An unexpected server error occurred.",t,e.data,r):Promise.resolve(null)}getProductLink(e,t,r,n,o){let s=this.baseUrl+"/api/storefront/v1/products/{id}/links/{productLinkId}?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(s=s.replace("{id}",encodeURIComponent(""+e)),null==t)throw new Error("The parameter 'productLinkId' must be defined.");s=s.replace("{productLinkId}",encodeURIComponent(""+t)),null!=r&&(s+="productVersionId="+encodeURIComponent(""+r)+"&"),null!=n&&(s+="tenantId="+encodeURIComponent(""+n)+"&"),s=s.replace(/[?&]$/,"");let a={method:"GET",url:s,headers:{Accept:"text/plain"},cancelToken:o};return this.transformOptions(a).then((e=>this.instance.request(e))).catch((e=>{if(gt(e)&&e.response)return e.response;throw e})).then((e=>this.transformResult(s,e,(e=>this.processGetProductLink(e)))))}processGetProductLink(e){const t=e.status;let r={};if(e.headers&&"object"==typeof e.headers)for(let n in e.headers)e.headers.hasOwnProperty(n)&&(r[n]=e.headers[n]);if(200===t){let t=null,r=e.data;return t=JSON.parse(r),Promise.resolve(t)}if(404===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),Pt("Not Found",t,n,r,o)}return 401===t?Pt("Unauthorized",t,e.data,r):403===t?Pt("Forbidden",t,e.data,r):200!==t&&204!==t?Pt("An unexpected server error occurred.",t,e.data,r):Promise.resolve(null)}getProductFilters(e,t,r,n,o,s,a,i,l){let c=this.baseUrl+"/api/storefront/v1/products/{id}/filters?";if(null==e)throw new Error("The parameter 'id' must be defined.");c=c.replace("{id}",encodeURIComponent(""+e)),null!=t&&(c+="productVersionId="+encodeURIComponent(""+t)+"&"),null!=r&&(c+="filterType="+encodeURIComponent(""+r)+"&"),null!=n&&(c+="skip="+encodeURIComponent(""+n)+"&"),null!=o&&(c+="take="+encodeURIComponent(""+o)+"&"),null!=s&&(c+="sorting="+encodeURIComponent(""+s)+"&"),null!=a&&(c+="search="+encodeURIComponent(""+a)+"&"),null!=i&&(c+="tenantId="+encodeURIComponent(""+i)+"&"),c=c.replace(/[?&]$/,"");let u={method:"GET",url:c,headers:{Accept:"text/plain"},cancelToken:l};return this.transformOptions(u).then((e=>this.instance.request(e))).catch((e=>{if(gt(e)&&e.response)return e.response;throw e})).then((e=>this.transformResult(c,e,(e=>this.processGetProductFilters(e)))))}processGetProductFilters(e){const t=e.status;let r={};if(e.headers&&"object"==typeof e.headers)for(let n in e.headers)e.headers.hasOwnProperty(n)&&(r[n]=e.headers[n]);if(200===t){let t=null,r=e.data;return t=JSON.parse(r),Promise.resolve(t)}if(404===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),Pt("Not Found",t,n,r,o)}return 401===t?Pt("Unauthorized",t,e.data,r):403===t?Pt("Forbidden",t,e.data,r):200!==t&&204!==t?Pt("An unexpected server error occurred.",t,e.data,r):Promise.resolve(null)}getProductFilter(e,t,r,n,o){let s=this.baseUrl+"/api/storefront/v1/products/{id}/filters/{productFilterId}?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(s=s.replace("{id}",encodeURIComponent(""+e)),null==t)throw new Error("The parameter 'productFilterId' must be defined.");s=s.replace("{productFilterId}",encodeURIComponent(""+t)),null!=r&&(s+="productVersionId="+encodeURIComponent(""+r)+"&"),null!=n&&(s+="tenantId="+encodeURIComponent(""+n)+"&"),s=s.replace(/[?&]$/,"");let a={method:"GET",url:s,headers:{Accept:"text/plain"},cancelToken:o};return this.transformOptions(a).then((e=>this.instance.request(e))).catch((e=>{if(gt(e)&&e.response)return e.response;throw e})).then((e=>this.transformResult(s,e,(e=>this.processGetProductFilter(e)))))}processGetProductFilter(e){const t=e.status;let r={};if(e.headers&&"object"==typeof e.headers)for(let n in e.headers)e.headers.hasOwnProperty(n)&&(r[n]=e.headers[n]);if(200===t){let t=null,r=e.data;return t=JSON.parse(r),Promise.resolve(t)}if(404===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),Pt("Not Found",t,n,r,o)}return 401===t?Pt("Unauthorized",t,e.data,r):403===t?Pt("Forbidden",t,e.data,r):200!==t&&204!==t?Pt("An unexpected server error occurred.",t,e.data,r):Promise.resolve(null)}getProductVariants(e,t,r,n,o,s,a,i,l,c){let u=this.baseUrl+"/api/storefront/v1/products/{id}/variants?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(u=u.replace("{id}",encodeURIComponent(""+e)),null!=t&&(u+="productVersionId="+encodeURIComponent(""+t)+"&"),null!=r&&(u+="skip="+encodeURIComponent(""+r)+"&"),null!=n&&(u+="take="+encodeURIComponent(""+n)+"&"),null!=o&&(u+="options="+encodeURIComponent(""+o)+"&"),null!=s&&(u+="productFilterId="+encodeURIComponent(""+s)+"&"),null===a)throw new Error("The parameter 'takeAvailableOnly' cannot be null.");void 0!==a&&(u+="takeAvailableOnly="+encodeURIComponent(""+a)+"&"),null!=i&&(u+="sku="+encodeURIComponent(""+i)+"&"),null!=l&&(u+="tenantId="+encodeURIComponent(""+l)+"&"),u=u.replace(/[?&]$/,"");let d={method:"GET",url:u,headers:{Accept:"text/plain"},cancelToken:c};return this.transformOptions(d).then((e=>this.instance.request(e))).catch((e=>{if(gt(e)&&e.response)return e.response;throw e})).then((e=>this.transformResult(u,e,(e=>this.processGetProductVariants(e)))))}processGetProductVariants(e){const t=e.status;let r={};if(e.headers&&"object"==typeof e.headers)for(let n in e.headers)e.headers.hasOwnProperty(n)&&(r[n]=e.headers[n]);if(200===t){let t=null,r=e.data;return t=JSON.parse(r),Promise.resolve(t)}if(404===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),Pt("Not Found",t,n,r,o)}return 401===t?Pt("Unauthorized",t,e.data,r):403===t?Pt("Forbidden",t,e.data,r):200!==t&&204!==t?Pt("An unexpected server error occurred.",t,e.data,r):Promise.resolve(null)}getProductVariant(e,t,r,n,o){let s=this.baseUrl+"/api/storefront/v1/products/{id}/variants/{productVariantId}?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(s=s.replace("{id}",encodeURIComponent(""+e)),null==t)throw new Error("The parameter 'productVariantId' must be defined.");s=s.replace("{productVariantId}",encodeURIComponent(""+t)),null!=r&&(s+="productVersionId="+encodeURIComponent(""+r)+"&"),null!=n&&(s+="tenantId="+encodeURIComponent(""+n)+"&"),s=s.replace(/[?&]$/,"");let a={method:"GET",url:s,headers:{Accept:"text/plain"},cancelToken:o};return this.transformOptions(a).then((e=>this.instance.request(e))).catch((e=>{if(gt(e)&&e.response)return e.response;throw e})).then((e=>this.transformResult(s,e,(e=>this.processGetProductVariant(e)))))}processGetProductVariant(e){const t=e.status;let r={};if(e.headers&&"object"==typeof e.headers)for(let n in e.headers)e.headers.hasOwnProperty(n)&&(r[n]=e.headers[n]);if(200===t){let t=null,r=e.data;return t=JSON.parse(r),Promise.resolve(t)}if(404===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),Pt("Not Found",t,n,r,o)}return 401===t?Pt("Unauthorized",t,e.data,r):403===t?Pt("Forbidden",t,e.data,r):200!==t&&204!==t?Pt("An unexpected server error occurred.",t,e.data,r):Promise.resolve(null)}getProductVariantDesigns(e,t,r,n,o,s,a,i,l,c,u,d,p,h){let f=this.baseUrl+"/api/storefront/v1/products/{id}/variant-designs?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(f=f.replace("{id}",encodeURIComponent(""+e)),null!=t&&(f+="productVersionId="+encodeURIComponent(""+t)+"&"),null!=r&&(f+="productVariantId="+encodeURIComponent(""+r)+"&"),null!=n&&(f+="search="+encodeURIComponent(""+n)+"&"),null!=o&&(f+="designCustomFields="+encodeURIComponent(""+o)+"&"),null!=s&&(f+="designPath="+encodeURIComponent(""+s)+"&"),null!=a&&(f+="skip="+encodeURIComponent(""+a)+"&"),null!=i&&(f+="take="+encodeURIComponent(""+i)+"&"),null!=l&&(f+="options="+encodeURIComponent(""+l)+"&"),null!=c&&(f+="productFilterId="+encodeURIComponent(""+c)+"&"),null===u)throw new Error("The parameter 'takeAvailableOnly' cannot be null.");void 0!==u&&(f+="takeAvailableOnly="+encodeURIComponent(""+u)+"&"),null!=d&&(f+="sku="+encodeURIComponent(""+d)+"&"),null!=p&&(f+="tenantId="+encodeURIComponent(""+p)+"&"),f=f.replace(/[?&]$/,"");let m={method:"GET",url:f,headers:{Accept:"text/plain"},cancelToken:h};return this.transformOptions(m).then((e=>this.instance.request(e))).catch((e=>{if(gt(e)&&e.response)return e.response;throw e})).then((e=>this.transformResult(f,e,(e=>this.processGetProductVariantDesigns(e)))))}processGetProductVariantDesigns(e){const t=e.status;let r={};if(e.headers&&"object"==typeof e.headers)for(let n in e.headers)e.headers.hasOwnProperty(n)&&(r[n]=e.headers[n]);if(200===t){let t=null,r=e.data;return t=JSON.parse(r),Promise.resolve(t)}if(404===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),Pt("Not Found",t,n,r,o)}return 401===t?Pt("Unauthorized",t,e.data,r):403===t?Pt("Forbidden",t,e.data,r):200!==t&&204!==t?Pt("An unexpected server error occurred.",t,e.data,r):Promise.resolve(null)}getProductVariantMockups(e,t,r,n,o,s,a,i,l,c,u,d,p,h){let f=this.baseUrl+"/api/storefront/v1/products/{id}/variant-mockups?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(f=f.replace("{id}",encodeURIComponent(""+e)),null!=t&&(f+="productVersionId="+encodeURIComponent(""+t)+"&"),null!=r&&(f+="productVariantId="+encodeURIComponent(""+r)+"&"),null!=n&&(f+="search="+encodeURIComponent(""+n)+"&"),null!=o&&(f+="mockupCustomFields="+encodeURIComponent(""+o)+"&"),null!=s&&(f+="mockupPath="+encodeURIComponent(""+s)+"&"),null!=a&&(f+="skip="+encodeURIComponent(""+a)+"&"),null!=i&&(f+="take="+encodeURIComponent(""+i)+"&"),null!=l&&(f+="options="+encodeURIComponent(""+l)+"&"),null!=c&&(f+="productFilterId="+encodeURIComponent(""+c)+"&"),null===u)throw new Error("The parameter 'takeAvailableOnly' cannot be null.");void 0!==u&&(f+="takeAvailableOnly="+encodeURIComponent(""+u)+"&"),null!=d&&(f+="sku="+encodeURIComponent(""+d)+"&"),null!=p&&(f+="tenantId="+encodeURIComponent(""+p)+"&"),f=f.replace(/[?&]$/,"");let m={method:"GET",url:f,headers:{Accept:"text/plain"},cancelToken:h};return this.transformOptions(m).then((e=>this.instance.request(e))).catch((e=>{if(gt(e)&&e.response)return e.response;throw e})).then((e=>this.transformResult(f,e,(e=>this.processGetProductVariantMockups(e)))))}processGetProductVariantMockups(e){const t=e.status;let r={};if(e.headers&&"object"==typeof e.headers)for(let n in e.headers)e.headers.hasOwnProperty(n)&&(r[n]=e.headers[n]);if(200===t){let t=null,r=e.data;return t=JSON.parse(r),Promise.resolve(t)}if(404===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),Pt("Not Found",t,n,r,o)}return 401===t?Pt("Unauthorized",t,e.data,r):403===t?Pt("Forbidden",t,e.data,r):200!==t&&204!==t?Pt("An unexpected server error occurred.",t,e.data,r):Promise.resolve(null)}getProductVariantDocuments(e,t,r,n,o,s,a,i,l,c,u,d,p,h){let f=this.baseUrl+"/api/storefront/v1/products/{id}/variant-documents?";if(null==e)throw new Error("The parameter 'id' must be defined.");if(f=f.replace("{id}",encodeURIComponent(""+e)),null!=t&&(f+="productVersionId="+encodeURIComponent(""+t)+"&"),null!=r&&(f+="productVariantId="+encodeURIComponent(""+r)+"&"),null!=n&&(f+="search="+encodeURIComponent(""+n)+"&"),null!=o&&(f+="documentCustomFields="+encodeURIComponent(""+o)+"&"),null!=s&&(f+="documentPath="+encodeURIComponent(""+s)+"&"),null!=a&&(f+="skip="+encodeURIComponent(""+a)+"&"),null!=i&&(f+="take="+encodeURIComponent(""+i)+"&"),null!=l&&(f+="options="+encodeURIComponent(""+l)+"&"),null!=c&&(f+="productFilterId="+encodeURIComponent(""+c)+"&"),null===u)throw new Error("The parameter 'takeAvailableOnly' cannot be null.");void 0!==u&&(f+="takeAvailableOnly="+encodeURIComponent(""+u)+"&"),null!=d&&(f+="sku="+encodeURIComponent(""+d)+"&"),null!=p&&(f+="tenantId="+encodeURIComponent(""+p)+"&"),f=f.replace(/[?&]$/,"");let m={method:"GET",url:f,headers:{Accept:"text/plain"},cancelToken:h};return this.transformOptions(m).then((e=>this.instance.request(e))).catch((e=>{if(gt(e)&&e.response)return e.response;throw e})).then((e=>this.transformResult(f,e,(e=>this.processGetProductVariantDocuments(e)))))}processGetProductVariantDocuments(e){const t=e.status;let r={};if(e.headers&&"object"==typeof e.headers)for(let n in e.headers)e.headers.hasOwnProperty(n)&&(r[n]=e.headers[n]);if(200===t){let t=null,r=e.data;return t=JSON.parse(r),Promise.resolve(t)}if(404===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),Pt("Not Found",t,n,r,o)}return 401===t?Pt("Unauthorized",t,e.data,r):403===t?Pt("Forbidden",t,e.data,r):200!==t&&204!==t?Pt("An unexpected server error occurred.",t,e.data,r):Promise.resolve(null)}updateProductVariantResources(e,t,r,n){let o=this.baseUrl+"/api/storefront/v1/products/{id}/update-variant-resources?";if(null==e)throw new Error("The parameter 'id' must be defined.");o=o.replace("{id}",encodeURIComponent(""+e)),null!=t&&(o+="productVersionId="+encodeURIComponent(""+t)+"&"),null!=r&&(o+="tenantId="+encodeURIComponent(""+r)+"&"),o=o.replace(/[?&]$/,"");let s={method:"POST",url:o,headers:{},cancelToken:n};return this.transformOptions(s).then((e=>this.instance.request(e))).catch((e=>{if(gt(e)&&e.response)return e.response;throw e})).then((e=>this.transformResult(o,e,(e=>this.processUpdateProductVariantResources(e)))))}processUpdateProductVariantResources(e){const t=e.status;let r={};if(e.headers&&"object"==typeof e.headers)for(let n in e.headers)e.headers.hasOwnProperty(n)&&(r[n]=e.headers[n]);if(200===t)return e.data,Promise.resolve(null);if(404===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),Pt("Not Found",t,n,r,o)}return 401===t?Pt("Unauthorized",t,e.data,r):403===t?Pt("Forbidden",t,e.data,r):200!==t&&204!==t?Pt("An unexpected server error occurred.",t,e.data,r):Promise.resolve(null)}setProductVariantPrice(e,t,r,n,o){let s=this.baseUrl+"/api/storefront/v1/products/{id}/set-variant-price?";if(null==e)throw new Error("The parameter 'id' must be defined.");s=s.replace("{id}",encodeURIComponent(""+e)),null!=t&&(s+="productVersionId="+encodeURIComponent(""+t)+"&"),null!=r&&(s+="tenantId="+encodeURIComponent(""+r)+"&"),s=s.replace(/[?&]$/,"");let a={data:JSON.stringify(n),method:"POST",url:s,headers:{"Content-Type":"application/json-patch+json"},cancelToken:o};return this.transformOptions(a).then((e=>this.instance.request(e))).catch((e=>{if(gt(e)&&e.response)return e.response;throw e})).then((e=>this.transformResult(s,e,(e=>this.processSetProductVariantPrice(e)))))}processSetProductVariantPrice(e){const t=e.status;let r={};if(e.headers&&"object"==typeof e.headers)for(let n in e.headers)e.headers.hasOwnProperty(n)&&(r[n]=e.headers[n]);if(200===t)return e.data,Promise.resolve(null);if(404===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),Pt("Not Found",t,n,r,o)}return 401===t?Pt("Unauthorized",t,e.data,r):403===t?Pt("Forbidden",t,e.data,r):200!==t&&204!==t?Pt("An unexpected server error occurred.",t,e.data,r):Promise.resolve(null)}getAvailableProductTags(e,t,r){let n=this.baseUrl+"/api/storefront/v1/products/available-tags?";null!=e&&(n+="search="+encodeURIComponent(""+e)+"&"),null!=t&&(n+="tenantId="+encodeURIComponent(""+t)+"&"),n=n.replace(/[?&]$/,"");let o={method:"GET",url:n,headers:{Accept:"text/plain"},cancelToken:r};return this.transformOptions(o).then((e=>this.instance.request(e))).catch((e=>{if(gt(e)&&e.response)return e.response;throw e})).then((e=>this.transformResult(n,e,(e=>this.processGetAvailableProductTags(e)))))}processGetAvailableProductTags(e){const t=e.status;let r={};if(e.headers&&"object"==typeof e.headers)for(let n in e.headers)e.headers.hasOwnProperty(n)&&(r[n]=e.headers[n]);if(200===t){let t=null,r=e.data;return t=JSON.parse(r),Promise.resolve(t)}return 401===t?Pt("Unauthorized",t,e.data,r):403===t?Pt("Forbidden",t,e.data,r):200!==t&&204!==t?Pt("An unexpected server error occurred.",t,e.data,r):Promise.resolve(null)}getPersonalizationWorkflow(e,t,r,n,o,s){let a=this.baseUrl+"/api/storefront/v1/products/{id}/personalization-workflow?";if(null==e)throw new Error("The parameter 'id' must be defined.");a=a.replace("{id}",encodeURIComponent(""+e)),null!=t&&(a+="productVersionId="+encodeURIComponent(""+t)+"&"),null!=r&&(a+="productLinkId="+encodeURIComponent(""+r)+"&"),null!=n&&(a+="productFilterId="+encodeURIComponent(""+n)+"&"),null!=o&&(a+="tenantId="+encodeURIComponent(""+o)+"&"),a=a.replace(/[?&]$/,"");let i={method:"GET",url:a,headers:{Accept:"text/plain"},cancelToken:s};return this.transformOptions(i).then((e=>this.instance.request(e))).catch((e=>{if(gt(e)&&e.response)return e.response;throw e})).then((e=>this.transformResult(a,e,(e=>this.processGetPersonalizationWorkflow(e)))))}processGetPersonalizationWorkflow(e){const t=e.status;let r={};if(e.headers&&"object"==typeof e.headers)for(let n in e.headers)e.headers.hasOwnProperty(n)&&(r[n]=e.headers[n]);if(200===t){let t=null,r=e.data;return t=JSON.parse(r),Promise.resolve(t)}if(404===t){const n=e.data;let o=null,s=n;return o=JSON.parse(s),Pt("Not Found",t,n,r,o)}return 401===t?Pt("Unauthorized",t,e.data,r):403===t?Pt("Forbidden",t,e.data,r):200!==t&&204!==t?Pt("An unexpected server error occurred.",t,e.data,r):Promise.resolve(null)}}(Ke=He||(He={})).Simple="Simple",Ke.Size="Size",Ke.PageCount="PageCount",(Qe=Xe||(Xe={})).Radio="Radio",Qe.Dropdown="Dropdown",Qe.Chips="Chips",Qe.ColorGrid="ColorGrid",Qe.ColorList="ColorList",Qe.ImageGrid="ImageGrid",Qe.ImageList="ImageList",(Ze||(Ze={})).Link="Link",(et=Ye||(Ye={})).UIFramework="UIFramework",et.SimpleEditor="SimpleEditor",et.DesignEditor="DesignEditor",et.WorkflowElements="WorkflowElements",(rt=tt||(tt={})).Preview="Preview",rt.EditorModel="EditorModel",rt.Custom="Custom",(ot=nt||(nt={})).Thumbnail="Thumbnail",ot.Editor="Editor",ot.Preview="Preview",(at=st||(st={})).Individual="Individual",at.Custom="Custom",at.All="All";class It extends Error{constructor(e,t,r,n,o){super(),wt(this,"message"),wt(this,"status"),wt(this,"response"),wt(this,"headers"),wt(this,"result"),wt(this,"isApiException",!0),this.message=e,this.status=t,this.response=r,this.headers=n,this.result=o}static isApiException(e){return!0===e.isApiException}}function Pt(e,t,r,n,o){throw null!=o?o:new It(e,t,r,n,null)}function gt(e){return e&&!0===e.isAxiosError}},816:function(e,t,r){"use strict";function n(e,t){return function(){return e.apply(t,arguments)}}r.d(t,"a",(function(){return n}))},817:function(e,t,r){"use strict";t.a=null}}]);