@gradientedge/commercetools-utils 4.32.0 → 5.0.1
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/dist/ge-commercetools-utils-browser.cjs.js +1 -1
- package/dist/ge-commercetools-utils-browser.cjs.js.map +1 -1
- package/dist/ge-commercetools-utils-browser.esm.js +1 -1
- package/dist/ge-commercetools-utils-browser.esm.js.map +1 -1
- package/dist/ge-commercetools-utils-node.cjs.js +1 -1
- package/dist/ge-commercetools-utils-node.cjs.js.map +1 -1
- package/dist/ge-commercetools-utils-node.esm.js +1 -1
- package/dist/typings/api/CommercetoolsApi.d.ts +4 -13
- package/dist/typings/api/types.d.ts +1 -1
- package/dist/typings/auth/CommercetoolsAuthApi.d.ts +8 -7
- package/dist/typings/auth/types.d.ts +4 -10
- package/dist/typings/constants.d.ts +10 -0
- package/dist/typings/error/CommercetoolsError.d.ts +3 -8
- package/dist/typings/index.d.ts +1 -1
- package/dist/typings/request/index.d.ts +2 -0
- package/dist/typings/request/is-retryable-error.d.ts +1 -0
- package/dist/typings/request/request-executor.d.ts +11 -0
- package/dist/typings/request/request.d.ts +10 -0
- package/dist/typings/request/transform-error.d.ts +2 -0
- package/dist/typings/types.d.ts +26 -9
- package/dist/typings/utils/axios/convert-error.d.ts +3 -0
- package/dist/typings/utils/axios/convert-response.d.ts +3 -0
- package/dist/typings/utils/axios/create-instance.d.ts +6 -0
- package/dist/typings/utils/axios/extract-headers.d.ts +1 -0
- package/dist/typings/utils/axios/index.d.ts +4 -0
- package/dist/typings/utils/index.d.ts +1 -0
- package/dist/typings/utils/mask.d.ts +3 -3
- package/dist/typings/utils/plain-clone.d.ts +1 -0
- package/dist/typings/utils/retry-on-conflict.d.ts +1 -1
- package/package.json +13 -14
- package/dist/typings/axios/interceptors/logger.d.ts +0 -3
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var t={9818:function(t,e,r){var o=this&&this.__assign||function(){return o=Object.assign||function(t){for(var e,r=1,o=arguments.length;r<o;r++)for(var n in e=arguments[r])Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t},o.apply(this,arguments)},n=this&&this.__awaiter||function(t,e,r,o){return new(r||(r=Promise))((function(n,i){function a(t){try{c(o.next(t))}catch(t){i(t)}}function s(t){try{c(o.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?n(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}c((o=o.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var r,o,n,i,a={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(r=1,o&&(n=2&s[0]?o.return:s[0]?o.throw||((n=o.return)&&n.call(o),0):o.next)&&!(n=n.call(o,s[1])).done)return n;switch(o=0,n&&(s=[2&s[0],n.value]),s[0]){case 0:case 1:n=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,o=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((n=(n=a.trys).length>0&&n[n.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!n||s[1]>n[0]&&s[1]<n[3])){a.label=s[1];break}if(6===s[0]&&a.label<n[1]){a.label=n[1],n=s;break}if(n&&a.label<n[2]){a.label=n[2],a.ops.push(s);break}n[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],o=0}finally{r=n=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.CommercetoolsApi=void 0;var s=a(r(9669)),c=a(r(129)),u=r(2915),p=r(3028),l=r(7111),f=r(4060),d=r(893),h=r(8842),y=r(7302),m={maxRetries:0,delayMs:0},v=[h.Status.InternalServerError,h.Status.NotImplemented,h.Status.BadGateway,h.Status.ServiceUnavailable,h.Status.GatewayTimeout],g=function(){function t(e){t.validateConfig(e),this.config=e,this.auth=new u.CommercetoolsAuth(e),this.endpoints=l.REGION_URLS[this.config.region],this.userAgent=(0,d.buildUserAgent)(this.config.systemIdentifier),this.axios=this.createAxiosInstance({logFn:e.logFn}),this.retry=e.retry||m}return t.prototype.createAxiosInstance=function(t){var e=s.default.create({timeout:this.config.timeoutMs||f.DEFAULT_REQUEST_TIMEOUT_MS,paramsSerializer:function(t){return c.default.stringify(t,{arrayFormat:"repeat"})},httpsAgent:void 0});return(null==t?void 0:t.logFn)&&(0,y.applyLoggerInterceptor)(e,t.logFn),e},t.prototype.getStoreById=function(t){return this.request(o(o({},this.extractCommonRequestOptions(t)),{path:"/stores/".concat(t.id),method:"GET"}))},t.prototype.getStoreByKey=function(t){return this.request(o(o({},this.extractCommonRequestOptions(t)),{path:"/stores/key=".concat(t.key),method:"GET"}))},t.prototype.queryStores=function(t){return this.request(o(o({},this.extractCommonRequestOptions(t)),{path:"/stores",method:"GET"}))},t.prototype.createStore=function(t){return this.request({path:"/stores",method:"POST",data:t.data})},t.prototype.updateStoreById=function(t){return this.request(o(o({},this.extractCommonRequestOptions(t)),{path:"/stores/".concat(t.id),method:"POST",data:t.data}))},t.prototype.updateStoreByKey=function(t){return this.request({path:"/stores/key=".concat(t.key),method:"POST",data:t.data})},t.prototype.deleteStoreById=function(t){return this.request(o(o({},this.extractCommonRequestOptions(t)),{path:"/stores/".concat(t.id),method:"DELETE",params:o(o({},t.params),{version:t.version})}))},t.prototype.deleteStoreByKey=function(t){return this.request(o(o({},this.extractCommonRequestOptions(t)),{path:"/stores/key=".concat(t.key),method:"DELETE",params:o(o({},t.params),{version:t.version})}))},t.prototype.getCategoryById=function(t){return this.request(o(o({},this.extractCommonRequestOptions(t)),{path:"/categories/".concat(t.id),method:"GET"}))},t.prototype.getCategoryByKey=function(t){return this.request(o(o({},this.extractCommonRequestOptions(t)),{path:"/categories/key=".concat(t.key),method:"GET"}))},t.prototype.queryChannels=function(t){return this.request(o(o({},this.extractCommonRequestOptions(t)),{path:"/channels",method:"GET"}))},t.prototype.importOrder=function(t){return n(this,void 0,void 0,(function(){return i(this,(function(e){return[2,this.request(o(o({},this.extractCommonRequestOptions(t)),{path:"/orders/import",method:"POST",data:t.data}))]}))}))},t.prototype.getChannelById=function(t){return this.request(o(o({},this.extractCommonRequestOptions(t)),{path:"/channels/".concat(t.id),method:"GET"}))},t.prototype.getChannelByKey=function(t){return n(this,void 0,void 0,(function(){var e;return i(this,(function(r){switch(r.label){case 0:return[4,this.request(o(o({},this.extractCommonRequestOptions(t)),{path:"/channels",method:"GET",params:{where:'key="'.concat(t.key,'"'),limit:1}}))];case 1:if(!(null==(e=r.sent())?void 0:e.count))throw new p.CommercetoolsError("No channel found with key [".concat(t.key,"]"),null,404);return[2,e.results[0]]}}))}))},t.prototype.getCategory=function(t){if(!t.id&&!t.key)throw new p.CommercetoolsError("Either an id, key or slug must be provided");return t.id?this.request(o(o({},this.extractCommonRequestOptions(t)),{path:"/categories/".concat(t.id),method:"GET"})):this.request(o(o({},this.extractCommonRequestOptions(t)),{path:"/categories/key=".concat(t.key),method:"GET"}))},t.prototype.getCategoryBySlug=function(t){return n(this,void 0,void 0,(function(){var e,r;return i(this,(function(n){switch(n.label){case 0:if(!t.languageCode&&!t.languageCodes)throw new p.CommercetoolsError("Either the `languageCode` or `languageCodes` property must be provided");return e=[],t.languageCodes?e.push.apply(e,t.languageCodes):t.languageCode&&e.push(t.languageCode),[4,this.request(o(o({},this.extractCommonRequestOptions(o(o({},t),{params:o(o({},null==t?void 0:t.params),{where:"slug(".concat(e.map((function(e){return"".concat(e,'="').concat(t.slug,'"')})).join(" or "),")")})}))),{path:"/categories",method:"GET"}))];case 1:if(!(r=n.sent()).count)throw new p.CommercetoolsError("No category found with slug [".concat(t.slug,"] and language code [").concat(t.languageCode,"]"),{options:t},404);return[2,r.results[0]]}}))}))},t.prototype.queryCategories=function(t){return this.request(o(o({},this.extractCommonRequestOptions(t)),{path:"/categories",method:"GET"}))},t.prototype.getCategoryParents=function(t){return n(this,void 0,void 0,(function(){var e,r;return i(this,(function(n){switch(n.label){case 0:return[4,this.getCategory(o(o({},t),{params:o(o({},t.params),{expand:"ancestors[*]"})}))];case 1:return e=n.sent(),(r=e.ancestors.map((function(t){return t.obj}))).push(o(o({},e),{ancestors:e.ancestors.map((function(t){return{id:t.id,typeId:t.typeId}}))})),[2,r]}}))}))},t.prototype.getProductById=function(t){return this.request(o(o({},this.extractCommonRequestOptions(t)),{path:"/products/".concat(t.id),method:"GET"}))},t.prototype.getProductByKey=function(t){return this.request(o(o({},this.extractCommonRequestOptions(t)),{path:"/products/key=".concat(t.key),method:"GET"}))},t.prototype.getProductProjectionById=function(t){return this.request(o(o({},this.extractCommonRequestOptions(t)),{path:this.applyStore("/product-projections/".concat(t.id),t.storeKey),method:"GET"}))},t.prototype.getProductProjectionByKey=function(t){return this.request(o(o({},this.extractCommonRequestOptions(t)),{path:this.applyStore("/product-projections/key=".concat(t.key),t.storeKey),method:"GET"}))},t.prototype.getProductProjectionBySlug=function(t){return n(this,void 0,void 0,(function(){var e,r;return i(this,(function(n){switch(n.label){case 0:if(!t.languageCode&&!t.languageCodes)throw new p.CommercetoolsError("Either the `languageCode` or `languageCodes` property must be provided");return e=[],t.languageCodes?e.push.apply(e,t.languageCodes):t.languageCode&&e.push(t.languageCode),[4,this.request(o(o({},this.extractCommonRequestOptions(o(o({},t),{params:o(o({},null==t?void 0:t.params),{where:"slug(".concat(e.map((function(e){return"".concat(e,'="').concat(t.slug,'"')})).join(" or "),")")})}))),{path:"/product-projections",method:"GET"}))];case 1:if(!(r=n.sent()).count)throw new p.CommercetoolsError("No product projection found with slug [".concat(t.slug,"] and language code [").concat(t.languageCode,"]"),{options:t},404);return[2,r.results[0]]}}))}))},t.prototype.queryProductProjections=function(t){return this.request(o(o({},this.extractCommonRequestOptions(t)),{path:"/product-projections",method:"GET"}))},t.prototype.searchProductProjections=function(t){return this.request(o(o({},this.extractCommonRequestOptions(t)),{path:"/product-projections/search",method:"GET"}))},t.prototype.getProductSelectionById=function(t){return this.request(o(o({},this.extractCommonRequestOptions(t)),{path:this.applyStore("/product-selections/".concat(t.id),t.storeKey),method:"GET"}))},t.prototype.getProductSelectionByKey=function(t){return this.request(o(o({},this.extractCommonRequestOptions(t)),{path:this.applyStore("/product-selections/key=".concat(t.key),t.storeKey),method:"GET"}))},t.prototype.queryProductSelections=function(t){return this.request(o(o({},this.extractCommonRequestOptions(t)),{path:"/product-selections",method:"GET"}))},t.prototype.createProductSelection=function(t){return this.request(o(o({},this.extractCommonRequestOptions(t)),{path:"/product-selections",method:"POST",data:t.data}))},t.prototype.updateProductSelectionByKey=function(t){return this.request(o(o({},this.extractCommonRequestOptions(t)),{path:"/product-selections/key=".concat(t.key),method:"POST",data:{version:t.version,actions:t.actions}}))},t.prototype.deleteProductSelectionByKey=function(t){return this.request(o(o({},this.extractCommonRequestOptions(t)),{path:"/product-selections/key=".concat(t.key,"&version=").concat(t.version),method:"DELETE"}))},t.prototype.queryProductsInStore=function(t){return this.request(o(o({},this.extractCommonRequestOptions(t)),{path:"/in-store/key=".concat(t.storeKey,"/product-selection-assignments"),method:"GET"}))},t.prototype.getCartById=function(t){return this.request(o(o({},this.extractCommonRequestOptions(t)),{path:this.applyStore("/carts/".concat(t.id),t.storeKey),method:"GET"}))},t.prototype.queryCarts=function(t){return n(this,void 0,void 0,(function(){return i(this,(function(e){return[2,this.request(o(o({},this.extractCommonRequestOptions(t)),{path:this.applyStore("/carts",null==t?void 0:t.storeKey),method:"GET"}))]}))}))},t.prototype.queryMyCarts=function(t){return n(this,void 0,void 0,(function(){return i(this,(function(e){return[2,this.request(o(o({},this.extractCommonRequestOptions(t)),{path:this.applyStore("/me/carts",t.storeKey),method:"GET",accessToken:t.accessToken}))]}))}))},t.prototype.createCart=function(t){return n(this,void 0,void 0,(function(){return i(this,(function(e){return[2,this.request(o(o({},this.extractCommonRequestOptions(t)),{path:this.applyStore("/carts",t.storeKey),method:"POST",data:t.data}))]}))}))},t.prototype.updateCartById=function(t){return n(this,void 0,void 0,(function(){return i(this,(function(e){return[2,this.request(o(o({},this.extractCommonRequestOptions(t)),{path:this.applyStore("/carts/".concat(t.id),t.storeKey),method:"POST",data:{version:t.version,actions:t.actions}}))]}))}))},t.prototype.getMyActiveCart=function(t){return n(this,void 0,void 0,(function(){return i(this,(function(e){return[2,this.request(o(o({},this.extractCommonRequestOptions(t)),{path:this.applyStore("/me/active-cart",t.storeKey),method:"GET",accessToken:t.accessToken}))]}))}))},t.prototype.getMyCartById=function(t){return n(this,void 0,void 0,(function(){return i(this,(function(e){return[2,this.request(o(o({},this.extractCommonRequestOptions(t)),{path:this.applyStore("/me/carts/".concat(t.cartId),t.storeKey),method:"GET",accessToken:t.accessToken}))]}))}))},t.prototype.createMyCart=function(t){return n(this,void 0,void 0,(function(){return i(this,(function(e){return[2,this.request(o(o({},this.extractCommonRequestOptions(t)),{path:this.applyStore("/me/carts",t.storeKey),method:"POST",data:t.data,accessToken:t.accessToken}))]}))}))},t.prototype.deleteMyActiveCart=function(t){return n(this,void 0,void 0,(function(){var e;return i(this,(function(r){switch(r.label){case 0:return[4,this.getMyActiveCart(t)];case 1:return e=r.sent(),[4,this.request(o(o({},this.extractCommonRequestOptions(t)),{path:this.applyStore("/me/carts/".concat(e.id),t.storeKey),method:"DELETE",params:o(o({},t.params),{version:e.version}),accessToken:t.accessToken}))];case 2:return[2,r.sent()]}}))}))},t.prototype.deleteMyCartById=function(t){return n(this,void 0,void 0,(function(){var e;return i(this,(function(r){switch(r.label){case 0:return[4,this.getMyCartById(t)];case 1:return e=r.sent(),[4,this.request(o(o({},this.extractCommonRequestOptions(t)),{path:this.applyStore("/me/carts/".concat(t.cartId),t.storeKey),method:"DELETE",params:o(o({},t.params),{version:e.version}),accessToken:t.accessToken}))];case 2:return[2,r.sent()]}}))}))},t.prototype.updateMyActiveCart=function(t){return n(this,void 0,void 0,(function(){var e;return i(this,(function(r){switch(r.label){case 0:return[4,this.getMyActiveCart(t)];case 1:return e=r.sent(),[2,this.request(o(o({},this.extractCommonRequestOptions(t)),{path:this.applyStore("/me/carts/".concat(e.id),t.storeKey),method:"POST",data:{version:e.version,actions:t.actions},accessToken:t.accessToken}))]}}))}))},t.prototype.createMyOrderFromActiveCart=function(t){return n(this,void 0,void 0,(function(){var e;return i(this,(function(r){switch(r.label){case 0:return[4,this.getMyActiveCart(t)];case 1:return e=r.sent(),[2,this.request(o(o({},this.extractCommonRequestOptions(t)),{path:this.applyStore("/me/orders",t.storeKey),method:"POST",data:{version:e.version,id:e.id},accessToken:t.accessToken}))]}}))}))},t.prototype.createOrderFromCart=function(t){return n(this,void 0,void 0,(function(){var e;return i(this,(function(r){switch(r.label){case 0:return[4,this.getCartById(t)];case 1:return e=r.sent(),[2,this.request(o(o({},this.extractCommonRequestOptions(t)),{path:this.applyStore("/orders",t.storeKey),method:"POST",data:{version:e.version,id:e.id}}))]}}))}))},t.prototype.deleteCartById=function(t){return n(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.request(o(o({},this.extractCommonRequestOptions(t)),{path:this.applyStore("/carts/".concat(t.id),t.storeKey),method:"DELETE",params:o(o({},t.params),{version:t.version})}))];case 1:return[2,e.sent()]}}))}))},t.prototype.createPayment=function(t){return this.request(o(o({},this.extractCommonRequestOptions(t)),{path:"/payments",method:"POST",data:t.data}))},t.prototype.deletePaymentById=function(t){return this.request(o(o({},this.extractCommonRequestOptions(t)),{path:"/payments/".concat(t.id),method:"DELETE",params:o(o({},t.params),{version:t.version})}))},t.prototype.updatePaymentById=function(t){return this.request(o(o({},this.extractCommonRequestOptions(t)),{path:"/payments/".concat(t.id),method:"POST",data:t.data}))},t.prototype.getPaymentById=function(t){return this.request(o(o({},this.extractCommonRequestOptions(t)),{path:"/payments/".concat(t.id),method:"GET"}))},t.prototype.queryPayments=function(t){return this.request(o(o({},this.extractCommonRequestOptions(t)),{path:"/payments",method:"GET"}))},t.prototype.createMyPayment=function(t){return this.request(o(o({},this.extractCommonRequestOptions(t)),{path:"/me/payments",method:"POST",data:t.data,accessToken:t.accessToken}))},t.prototype.updateMyPaymentById=function(t){return this.request(o(o({},this.extractCommonRequestOptions(t)),{path:"/me/payments/".concat(t.id),method:"POST",data:t.data,accessToken:t.accessToken}))},t.prototype.getMyPaymentById=function(t){return this.request(o(o({},this.extractCommonRequestOptions(t)),{path:"/me/payments/".concat(t.id),method:"GET",accessToken:t.accessToken}))},t.prototype.queryMyPayments=function(t){return this.request(o(o({},this.extractCommonRequestOptions(t)),{path:"/me/payments",method:"GET",accessToken:t.accessToken}))},t.prototype.deleteMyPaymentById=function(t){return this.request(o(o({},this.extractCommonRequestOptions(t)),{path:"/me/payments/".concat(t.id),method:"DELETE",params:{version:t.version},accessToken:t.accessToken}))},t.prototype.getMyOrderById=function(t){return this.request(o(o({},this.extractCommonRequestOptions(t)),{path:this.applyStore("/me/orders/".concat(t.id),t.storeKey),method:"GET",accessToken:t.accessToken}))},t.prototype.queryMyOrders=function(t){return this.request(o(o({},this.extractCommonRequestOptions(t)),{path:this.applyStore("/me/orders",t.storeKey),method:"GET",accessToken:t.accessToken}))},t.prototype.updateOrderById=function(t){return this.request(o(o({},this.extractCommonRequestOptions(t)),{path:this.applyStore("/orders/".concat(t.id),t.storeKey),method:"POST",data:t.data}))},t.prototype.updateOrderByOrderNumber=function(t){return this.request(o(o({},this.extractCommonRequestOptions(t)),{path:this.applyStore("/orders/order-number=".concat(t.orderNumber),t.storeKey),method:"POST",data:t.data}))},t.prototype.getOrderById=function(t){return this.request(o(o({},this.extractCommonRequestOptions(t)),{path:this.applyStore("/orders/".concat(t.id),t.storeKey),method:"GET"}))},t.prototype.getOrderByOrderNumber=function(t){return this.request(o(o({},this.extractCommonRequestOptions(t)),{path:this.applyStore("/orders/order-number=".concat(t.orderNumber),t.storeKey),method:"GET"}))},t.prototype.deleteOrderById=function(t){return this.request(o(o({},this.extractCommonRequestOptions(t)),{path:this.applyStore("/orders/".concat(t.id),t.storeKey),method:"DELETE",params:o(o({},t.params),{version:t.version,dataErasure:t.dataErasure})}))},t.prototype.deleteOrderByOrderNumber=function(t){return this.request(o(o({},this.extractCommonRequestOptions(t)),{path:this.applyStore("/orders/order-number=".concat(t.orderNo),t.storeKey),method:"DELETE",params:o(o({},t.params),{version:t.version,dataErasure:t.dataErasure})}))},t.prototype.queryOrders=function(t){return this.request(o(o({},this.extractCommonRequestOptions(t)),{path:this.applyStore("/orders",t.storeKey),method:"GET"}))},t.prototype.createProduct=function(t){return this.request(o(o({},this.extractCommonRequestOptions(t)),{path:"/products",method:"POST",data:t.data}))},t.prototype.updateProductByKey=function(t){return this.request(o(o({},this.extractCommonRequestOptions(t)),{path:"/products/key=".concat(t.key),method:"POST",data:t.data}))},t.prototype.updateProductById=function(t){return this.request(o(o({},this.extractCommonRequestOptions(t)),{path:"/products/".concat(t.id),method:"POST",data:t.data}))},t.prototype.deleteProductById=function(t){return n(this,void 0,void 0,(function(){var e,r;return i(this,(function(n){switch(n.label){case 0:return e=t.version,t.unpublish?[4,this.unpublishProductById({id:t.id,version:t.version})]:[3,2];case 1:r=n.sent(),e=r.version,n.label=2;case 2:return[2,this.request(o(o({},this.extractCommonRequestOptions(t)),{path:"/products/".concat(t.id),method:"DELETE",params:o(o({},t.params),{version:e})}))]}}))}))},t.prototype.deleteProductByKey=function(t){return n(this,void 0,void 0,(function(){var e,r;return i(this,(function(n){switch(n.label){case 0:return e=t.version,t.unpublish?[4,this.unpublishProductByKey({key:t.key,version:t.version})]:[3,2];case 1:r=n.sent(),e=r.version,n.label=2;case 2:return[2,this.request(o(o({},this.extractCommonRequestOptions(t)),{path:"/products/key=".concat(t.key),method:"DELETE",params:o(o({},t.params),{version:e})}))]}}))}))},t.prototype.unpublishProductByKey=function(t){return this.request(o(o({},this.extractCommonRequestOptions(t)),{path:"/products/key=".concat(t.key),method:"POST",params:t.params,data:{version:t.version,actions:[{action:"unpublish"}]}}))},t.prototype.unpublishProductById=function(t){return this.request(o(o({},this.extractCommonRequestOptions(t)),{path:"/products/".concat(t.id),method:"POST",params:t.params,data:{version:t.version,actions:[{action:"unpublish"}]}}))},t.prototype.createCategory=function(t){return this.request({path:"/categories",method:"POST",data:t.data})},t.prototype.updateCategoryByKey=function(t){return this.request({path:"/categories/key=".concat(t.key),method:"POST",data:t.data})},t.prototype.updateCategoryById=function(t){return this.request(o(o({},this.extractCommonRequestOptions(t)),{path:"/categories/".concat(t.id),method:"POST",data:t.data}))},t.prototype.deleteCategoryById=function(t){return this.request(o(o({},this.extractCommonRequestOptions(t)),{path:"/categories/".concat(t.id),method:"DELETE",params:o(o({},t.params),{version:t.version})}))},t.prototype.deleteCategoryByKey=function(t){return this.request(o(o({},this.extractCommonRequestOptions(t)),{path:"/categories/key=".concat(t.key),method:"DELETE",params:o(o({},t.params),{version:t.version})}))},t.prototype.createAccount=function(t){return this.request(o(o({},this.extractCommonRequestOptions(t)),{path:this.applyStore("/customers",t.storeKey),method:"POST",data:t.data}))},t.prototype.deleteCustomerById=function(t){return this.request(o(o({},this.extractCommonRequestOptions(t)),{path:this.applyStore("/customers/".concat(t.id),t.storeKey),method:"DELETE",params:o(o({},t.params),{version:t.version,dataErasure:t.dataErasure})}))},t.prototype.deleteCustomerByKey=function(t){return this.request(o(o({},this.extractCommonRequestOptions(t)),{path:this.applyStore("/customers/key=".concat(t.key),t.storeKey),method:"DELETE",params:o(o({},t.params),{version:t.version,dataErasure:t.dataErasure})}))},t.prototype.createMyAccount=function(t){return this.request(o(o({},this.extractCommonRequestOptions(t)),{path:this.applyStore("/me/signup",t.storeKey),method:"POST",data:t.data,accessToken:t.accessToken}))},t.prototype.loginMyAccount=function(t){return this.request(o(o({},this.extractCommonRequestOptions(t)),{path:this.applyStore("/me/login",t.storeKey),method:"POST",data:t.data,accessToken:t.accessToken}))},t.prototype.login=function(t){return this.request(o(o({},this.extractCommonRequestOptions(t)),{path:this.applyStore("/login",t.storeKey),method:"POST",data:t.data}))},t.prototype.getMyAccount=function(t){return this.request(o(o({},this.extractCommonRequestOptions(t)),{path:this.applyStore("/me",t.storeKey),method:"GET",accessToken:t.accessToken}))},t.prototype.updateMyAccount=function(t){return this.request(o(o({},this.extractCommonRequestOptions(t)),{path:this.applyStore("/me",t.storeKey),method:"POST",accessToken:t.accessToken,data:t.data}))},t.prototype.changeMyPassword=function(t){return this.request(o(o({},this.extractCommonRequestOptions(t)),{path:this.applyStore("/me/password",t.storeKey),method:"POST",accessToken:t.accessToken,data:t.data}))},t.prototype.resetMyPassword=function(t){return this.request(o(o({},this.extractCommonRequestOptions(t)),{path:this.applyStore("/me/password/reset",t.storeKey),method:"POST",accessToken:t.accessToken,data:t.data}))},t.prototype.getPasswordResetToken=function(t){return this.request(o(o({},this.extractCommonRequestOptions(t)),{path:this.applyStore("/customers/password-token",t.storeKey),method:"POST",data:t.data}))},t.prototype.getCustomerById=function(t){return this.request(o(o({},this.extractCommonRequestOptions(t)),{path:this.applyStore("/customers/".concat(t.id),t.storeKey),method:"GET"}))},t.prototype.getCustomerByKey=function(t){return this.request(o(o({},this.extractCommonRequestOptions(t)),{path:this.applyStore("/customers/key=".concat(t.key),t.storeKey),method:"GET"}))},t.prototype.getCustomerByPasswordToken=function(t){return this.request(o(o({},this.extractCommonRequestOptions(t)),{path:this.applyStore("/customers/password-token=".concat(t.token),t.storeKey),method:"GET"}))},t.prototype.queryCustomers=function(t){return this.request(o(o({},this.extractCommonRequestOptions(t)),{path:this.applyStore("/customers",t.storeKey),method:"GET"}))},t.prototype.updateCustomerById=function(t){return this.request(o(o({},this.extractCommonRequestOptions(t)),{path:"/customers/".concat(t.id),method:"POST",data:t.data}))},t.prototype.updateCustomerByKey=function(t){return this.request(o(o({},this.extractCommonRequestOptions(t)),{path:"/customers/key=".concat(t.key),method:"POST",data:t.data}))},t.prototype.getProductTypeById=function(t){return this.request(o(o({},this.extractCommonRequestOptions(t)),{path:"/product-types/".concat(t.id),method:"GET"}))},t.prototype.getProductTypeByKey=function(t){return this.request(o(o({},this.extractCommonRequestOptions(t)),{path:"/product-types/key=".concat(t.key),method:"GET"}))},t.prototype.queryProductTypes=function(t){return this.request(o(o({},this.extractCommonRequestOptions(t)),{path:"/product-types",method:"GET"}))},t.prototype.getTypeById=function(t){return this.request(o(o({},this.extractCommonRequestOptions(t)),{path:"/types/".concat(t.id),method:"GET"}))},t.prototype.getTypeByKey=function(t){return this.request(o(o({},this.extractCommonRequestOptions(t)),{path:"/types/key=".concat(t.key),method:"GET"}))},t.prototype.queryTypes=function(t){return this.request(o(o({},this.extractCommonRequestOptions(t)),{path:"/types",method:"GET"}))},t.prototype.getDiscountCodeById=function(t){return this.request(o(o({},this.extractCommonRequestOptions(t)),{path:"/discount-codes/".concat(t.id),method:"GET"}))},t.prototype.getCartDiscountById=function(t){return this.request(o(o({},this.extractCommonRequestOptions(t)),{path:"/cart-discounts/".concat(t.id),method:"GET"}))},t.prototype.getCartDiscountByKey=function(t){return this.request(o(o({},this.extractCommonRequestOptions(t)),{path:"/cart-discounts/key=".concat(t.key),method:"GET"}))},t.prototype.queryCartDiscounts=function(t){return this.request(o(o({},this.extractCommonRequestOptions(t)),{path:"/cart-discounts",method:"GET"}))},t.prototype.getCustomObject=function(t){return this.request(o(o({},this.extractCommonRequestOptions(t)),{path:"/custom-objects/".concat(t.container,"/").concat(t.key),method:"GET"}))},t.prototype.getCustomObjectById=function(t){return this.request(o(o({},this.extractCommonRequestOptions(t)),{path:"/custom-objects/".concat(t.id),method:"GET"}))},t.prototype.saveCustomObject=function(t){return this.request(o(o({},this.extractCommonRequestOptions(t)),{path:"/custom-objects",method:"POST",data:t.data}))},t.prototype.deleteCustomObject=function(t){return this.request(o(o({},this.extractCommonRequestOptions(t)),{path:"/custom-objects/".concat(t.container,"/").concat(t.key),method:"DELETE"}))},t.prototype.getShippingMethodById=function(t){return this.request(o(o({},this.extractCommonRequestOptions(t)),{path:"/shipping-methods/".concat(t.id),method:"GET"}))},t.prototype.getShippingMethodByKey=function(t){return this.request(o(o({},this.extractCommonRequestOptions(t)),{path:"/shipping-methods/key=".concat(t.key),method:"GET"}))},t.prototype.getShippingMethodsForLocation=function(t){return this.request(o(o({},this.extractCommonRequestOptions(o(o({},t),{params:o(o({},null==t?void 0:t.params),{country:t.country,state:t.state,currency:t.currency})}))),{path:"/shipping-methods/matching-location",method:"GET",accessToken:t.accessToken}))},t.prototype.getShippingMethodsForCart=function(t){return this.request(o(o({},this.extractCommonRequestOptions(o(o({},t),{params:o(o({},null==t?void 0:t.params),{cartId:t.cartId})}))),{path:"/shipping-methods/matching-cart",method:"GET",accessToken:t.accessToken}))},t.prototype.queryShippingMethods=function(t){return this.request(o(o({},this.extractCommonRequestOptions(t)),{path:"/shipping-methods",method:"GET"}))},t.prototype.getCustomerGroupById=function(t){return this.request(o(o({},this.extractCommonRequestOptions(t)),{path:"/customer-groups/".concat(t.id),method:"GET"}))},t.prototype.getCustomerGroupByKey=function(t){return this.request(o(o({},this.extractCommonRequestOptions(t)),{path:"/customer-groups/key=".concat(t.key),method:"GET"}))},t.prototype.queryCustomerGroups=function(t){return this.request(o(o({},this.extractCommonRequestOptions(t)),{path:"/customer-groups",method:"GET"}))},t.prototype.createCustomerGroup=function(t){return this.request({path:"/customer-groups",method:"POST",data:t.data})},t.prototype.updateCustomerGroupByKey=function(t){return this.request({path:"/customer-groups/key=".concat(t.key),method:"POST",data:t.data})},t.prototype.updateCustomerGroupById=function(t){return this.request(o(o({},this.extractCommonRequestOptions(t)),{path:"/customer-groups/".concat(t.id),method:"POST",data:t.data}))},t.prototype.deleteCustomerGroupById=function(t){return this.request(o(o({},this.extractCommonRequestOptions(t)),{path:"/customer-groups/".concat(t.id),method:"DELETE",params:o(o({},t.params),{version:t.version})}))},t.prototype.deleteCustomerGroupByKey=function(t){return this.request(o(o({},this.extractCommonRequestOptions(t)),{path:"/customer-groups/key=".concat(t.key),method:"DELETE",params:o(o({},t.params),{version:t.version})}))},t.prototype.getStateById=function(t){return this.request(o(o({},this.extractCommonRequestOptions(t)),{path:"/states/".concat(t.id),method:"GET"}))},t.prototype.getStateByKey=function(t){return this.request(o(o({},this.extractCommonRequestOptions(t)),{path:"/states/key=".concat(t.key),method:"GET"}))},t.prototype.queryStates=function(t){return this.request(o(o({},this.extractCommonRequestOptions(t)),{path:"/states",method:"GET"}))},t.prototype.getStandalonePriceById=function(t){return this.request(o(o({},this.extractCommonRequestOptions(t)),{path:"/standalone-prices/".concat(t.id),method:"GET"}))},t.prototype.getStandalonePriceByKey=function(t){return this.request(o(o({},this.extractCommonRequestOptions(t)),{path:"/standalone-prices/key=".concat(t.key),method:"GET"}))},t.prototype.queryStandalonePrices=function(t){return this.request(o(o({},this.extractCommonRequestOptions(t)),{path:"/standalone-prices",method:"GET"}))},t.prototype.createStandalonePrice=function(t){return this.request(o(o({},this.extractCommonRequestOptions(t)),{path:"/standalone-prices",method:"POST",data:t.data}))},t.prototype.updateStandalonePriceById=function(t){return this.request(o(o({},this.extractCommonRequestOptions(t)),{path:"/standalone-prices/".concat(t.id),method:"POST",data:t.data}))},t.prototype.updateStandalonePriceByKey=function(t){return this.request(o(o({},this.extractCommonRequestOptions(t)),{path:"/standalone-prices/key=".concat(t.key),method:"POST",data:t.data}))},t.prototype.deleteStandalonePriceById=function(t){return this.request(o(o({},this.extractCommonRequestOptions(t)),{path:"/standalone-prices/".concat(t.id),method:"DELETE",params:o(o({},t.params),{version:t.version})}))},t.prototype.deleteStandalonePriceByKey=function(t){return this.request(o(o({},this.extractCommonRequestOptions(t)),{path:"/standalone-prices/key=".concat(t.key),method:"DELETE",params:o(o({},t.params),{version:t.version})}))},t.prototype.graphql=function(t){return this.request(o(o({},this.extractCommonRequestOptions(t)),{path:"/graphql",method:"POST",data:t.data,accessToken:t.accessToken}))},t.prototype.request=function(t){return n(this,void 0,void 0,(function(){var e,r,o,n,a,s,c;return i(this,(function(u){switch(u.label){case 0:return[4,this.getRequestOptions(t)];case 1:e=u.sent(),r=this.getRetryConfig(t.retry),o=0,a=function(){var t,a;return i(this,(function(i){switch(i.label){case 0:return o>0?(e.headers["X-Retry-Count"]=o,t=(0,d.calculateDelay)(o,r),[4,new Promise((function(e){return setTimeout(e,t)}))]):[3,2];case 1:i.sent(),i.label=2;case 2:return i.trys.push([2,4,,5]),[4,s.axios(e)];case 3:return[2,{value:i.sent().data}];case 4:if(a=i.sent(),!s.isRetryableError(a))throw s.transformError(a);return n=a,[3,5];case 5:return o++,[2]}}))},s=this,u.label=2;case 2:return[5,a()];case 3:if("object"==typeof(c=u.sent()))return[2,c.value];u.label=4;case 4:if(o<=r.maxRetries)return[3,2];u.label=5;case 5:throw this.transformError(n)}}))}))},t.prototype.getRetryConfig=function(t){return t||this.retry},t.prototype.getRequestOptions=function(t){return n(this,void 0,void 0,(function(){var e,r,n,a,s;return i(this,(function(i){switch(i.label){case 0:return e=t.accessToken,r="".concat(this.endpoints.api,"/").concat(this.config.projectKey).concat(t.path),(n=o({},t)).path&&delete n.path,n.accessToken&&delete n.accessToken,e?[3,2]:[4,this.auth.getClientGrant()];case 1:a=i.sent(),e=a.accessToken,i.label=2;case 2:return s=o(o(o({},this.axios.defaults.headers),{Authorization:"Bearer ".concat(e)}),n.headers),"string"==typeof t.correlationId&&""!==t.correlationId&&(s["X-Correlation-ID"]=t.correlationId,delete t.correlationId),[2,o(o({},n),{url:r,headers:s})]}}))}))},t.prototype.isRetryableError=function(t){return!t.isAxiosError||!t.request||!t.response||v.includes(t.response.status)},t.prototype.extractCommonRequestOptions=function(t){return t?{correlationId:t.correlationId,params:t.params,retry:t.retry}:{}},t.prototype.applyStore=function(t,e){return"string"==typeof e&&""!==e?"/in-store/key=".concat(e).concat(t):this.config.storeKey?"/in-store/key=".concat(this.config.storeKey).concat(t):t},t.prototype.transformError=function(t){return t.isAxiosError?p.CommercetoolsError.fromAxiosError(t):t},t.validateConfig=function(t){var e=[];if(t?(t.projectKey?"string"!=typeof t.projectKey&&e.push("The `projectKey` property must be a string"):e.push("The `projectKey` property is empty"),t.clientId?"string"!=typeof t.clientId&&e.push("The `clientId` property must be a string"):e.push("The `clientId` property is empty"),t.clientSecret?"string"!=typeof t.clientSecret&&e.push("The `clientSecret` property must be a string"):e.push("The `clientSecret` property is empty"),Array.isArray(t.clientScopes)?0===t.clientScopes.length&&e.push("The `clientScopes` property must have at least 1 scope defined"):e.push("The `clientScopes` property must be an array")):e.push("The config object missing or empty"),e.length)throw new p.CommercetoolsError("The configuration object passed in to the `CommercetoolsApi` constructor is not valid: \n"+e.map((function(t){return"• ".concat(t)})).join("\n"))},t}();e.CommercetoolsApi=g},3713:function(t,e,r){var o=this&&this.__createBinding||(Object.create?function(t,e,r,o){void 0===o&&(o=r);var n=Object.getOwnPropertyDescriptor(e,r);n&&!("get"in n?!e.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,o,n)}:function(t,e,r,o){void 0===o&&(o=r),t[o]=e[r]}),n=this&&this.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||o(e,t,r)};Object.defineProperty(e,"__esModule",{value:!0}),n(r(9818),e),n(r(7013),e)},7013:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0})},2442:function(t,e,r){var o=this&&this.__assign||function(){return o=Object.assign||function(t){for(var e,r=1,o=arguments.length;r<o;r++)for(var n in e=arguments[r])Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t},o.apply(this,arguments)},n=this&&this.__awaiter||function(t,e,r,o){return new(r||(r=Promise))((function(n,i){function a(t){try{c(o.next(t))}catch(t){i(t)}}function s(t){try{c(o.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?n(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}c((o=o.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var r,o,n,i,a={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(r=1,o&&(n=2&s[0]?o.return:s[0]?o.throw||((n=o.return)&&n.call(o),0):o.next)&&!(n=n.call(o,s[1])).done)return n;switch(o=0,n&&(s=[2&s[0],n.value]),s[0]){case 0:case 1:n=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,o=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((n=(n=a.trys).length>0&&n[n.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!n||s[1]>n[0]&&s[1]<n[3])){a.label=s[1];break}if(6===s[0]&&a.label<n[1]){a.label=n[1],n=s;break}if(n&&a.label<n[2]){a.label=n[2],a.ops.push(s);break}n[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],o=0}finally{r=n=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.CommercetoolsAuth=void 0;var a=r(2915),s=r(8003),c=r(3032),u={refreshIfWithinSecs:1800,timeoutMs:5e3},p=function(){function t(t){if(this.grantPromise=null,this.config=o(o({},u),t),!this.config.clientScopes.length)throw new a.CommercetoolsError("`config.clientScopes` must contain at least one scope");this.api=new c.CommercetoolsAuthApi(t)}return t.prototype.getClientGrant=function(){return n(this,void 0,void 0,(function(){var t=this;return i(this,(function(e){return this.grantPromise?[2,this.grantPromise]:this.grant&&!this.grant.expiresWithin(this.config.refreshIfWithinSecs)?[2,this.grant]:(this.grantPromise=this.api.getClientGrant(this.config.clientScopes).then((function(e){return t.grant=new s.CommercetoolsGrant(e),t.grant})).finally((function(){t.grantPromise=null})),[2,this.grantPromise])}))}))},t.prototype.refreshCustomerGrant=function(t){return n(this,void 0,void 0,(function(){var e;return i(this,(function(r){switch(r.label){case 0:return[4,this.api.refreshGrant(t)];case 1:return e=r.sent(),[2,new s.CommercetoolsGrant(o(o({},e),{refresh_token:t}))]}}))}))},t.prototype.login=function(t){return n(this,void 0,void 0,(function(){var e,r;return i(this,(function(n){switch(n.label){case 0:if(!(e=t.scopes||this.config.customerScopes))throw new a.CommercetoolsError("Customer scopes must be set on either the `options` parameter of this `login` method, or on the `customerScopes` property of the `CommercetoolsAuth` constructor");return[4,this.getClientGrant()];case 1:return n.sent(),[4,this.api.login(o(o({},t),{scopes:e}))];case 2:return r=n.sent(),[2,new s.CommercetoolsGrant(r)]}}))}))},t.prototype.getAnonymousGrant=function(t){return n(this,void 0,void 0,(function(){var e,r,o;return i(this,(function(n){switch(n.label){case 0:if(e=(null==t?void 0:t.scopes)||this.config.customerScopes,r=null==t?void 0:t.anonymousId,!e)throw new a.CommercetoolsError("Customer scopes must be set on either the `options` parameter of this `login` method, or on the `customerScopes` property of the `CommercetoolsAuth` constructor");return[4,this.getClientGrant()];case 1:return n.sent(),[4,this.api.getAnonymousGrant({scopes:e,anonymousId:r})];case 2:return o=n.sent(),[2,new s.CommercetoolsGrant(o)]}}))}))},t.prototype.logout=function(t){return n(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.api.logout(t)];case 1:return e.sent(),[2]}}))}))},t.prototype.revokeToken=function(t){return n(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.api.revokeToken(t)];case 1:return e.sent(),[2]}}))}))},t}();e.CommercetoolsAuth=p},3032:function(t,e,r){var o=this&&this.__assign||function(){return o=Object.assign||function(t){for(var e,r=1,o=arguments.length;r<o;r++)for(var n in e=arguments[r])Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t},o.apply(this,arguments)},n=this&&this.__awaiter||function(t,e,r,o){return new(r||(r=Promise))((function(n,i){function a(t){try{c(o.next(t))}catch(t){i(t)}}function s(t){try{c(o.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?n(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}c((o=o.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var r,o,n,i,a={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(r=1,o&&(n=2&s[0]?o.return:s[0]?o.throw||((n=o.return)&&n.call(o),0):o.next)&&!(n=n.call(o,s[1])).done)return n;switch(o=0,n&&(s=[2&s[0],n.value]),s[0]){case 0:case 1:n=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,o=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((n=(n=a.trys).length>0&&n[n.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!n||s[1]>n[0]&&s[1]<n[3])){a.label=s[1];break}if(6===s[0]&&a.label<n[1]){a.label=n[1],n=s;break}if(n&&a.label<n[2]){a.label=n[2],a.ops.push(s);break}n[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],o=0}finally{r=n=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.CommercetoolsAuthApi=void 0;var s=r(2849),c=r(2915),u=r(7530),p=r(7111),l=r(9017),f=a(r(9669)),d=r(4060),h=r(893),y=r(7302),m=function(){function t(t){this.config=t,this.endpoints=p.REGION_URLS[this.config.region],this.userAgent=(0,h.buildUserAgent)(this.config.systemIdentifier),this.axios=this.createAxiosInstance({logFn:t.logFn})}return t.prototype.createAxiosInstance=function(t){var e=f.default.create({timeout:this.config.timeoutMs||d.DEFAULT_REQUEST_TIMEOUT_MS,httpsAgent:void 0});return(null==t?void 0:t.logFn)&&(0,y.applyLoggerInterceptor)(e,t.logFn),e},t.prototype.getClientGrant=function(t){return n(this,void 0,void 0,(function(){return i(this,(function(e){return[2,this.post("/token",{grant_type:s.GrantType.CLIENT_CREDENTIALS,scope:(0,u.scopeArrayToRequestString)(t,this.config.projectKey)})]}))}))},t.prototype.refreshGrant=function(t){return n(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.post("/token",{grant_type:s.GrantType.REFRESH_TOKEN,refresh_token:t})];case 1:return[2,e.sent()]}}))}))},t.prototype.login=function(t){return n(this,void 0,void 0,(function(){return i(this,(function(e){return[2,this.post("/".concat(this.config.projectKey).concat(this.applyStore("/customers/token",t.storeKey)),{username:t.username,password:t.password,grant_type:s.GrantType.PASSWORD,scope:(0,u.scopeArrayToRequestString)(t.scopes,this.config.projectKey)})]}))}))},t.prototype.revokeToken=function(t){return n(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.post("/token/revoke",{token:t.tokenValue,token_type_hint:t.tokenType})];case 1:return e.sent(),[2]}}))}))},t.prototype.logout=function(t){return n(this,void 0,void 0,(function(){var e,r;return i(this,(function(o){switch(o.label){case 0:return[4,Promise.allSettled([this.revokeToken({tokenType:"access_token",tokenValue:t.accessToken}),this.revokeToken({tokenType:"refresh_token",tokenValue:t.refreshToken})])];case 1:if(e=o.sent(),(r=e.reduce((function(t,e){return"rejected"===e.status&&t.push(e.reason),t}),[])).length)throw new c.CommercetoolsError("Logout failed in one or more calls to the token revocation endpoint",r);return[2]}}))}))},t.prototype.getAnonymousGrant=function(t){var e;return n(this,void 0,void 0,(function(){var r;return i(this,(function(o){return r={grant_type:s.GrantType.CLIENT_CREDENTIALS},(null===(e=null==t?void 0:t.scopes)||void 0===e?void 0:e.length)&&(r.scope=(0,u.scopeArrayToRequestString)(t.scopes,this.config.projectKey)),(null==t?void 0:t.anonymousId)&&(r.anonymous_id=t.anonymousId),[2,this.post("/".concat(this.config.projectKey,"/anonymous/token"),r)]}))}))},t.prototype.post=function(t,e){return n(this,void 0,void 0,(function(){var r,n,a;return i(this,(function(i){switch(i.label){case 0:r={url:"".concat(this.endpoints.auth,"/oauth").concat(t),method:"POST",data:new URLSearchParams(e).toString()},n={Authorization:"Basic ".concat((0,l.base64EncodeForBasicAuth)(this.config.clientId,this.config.clientSecret)),"Content-Type":"application/x-www-form-urlencoded"},i.label=1;case 1:return i.trys.push([1,3,,4]),[4,this.axios(o(o({},r),{headers:n,timeout:this.config.timeoutMs||d.DEFAULT_REQUEST_TIMEOUT_MS}))];case 2:return[2,i.sent().data];case 3:if((a=i.sent()).isAxiosError)throw c.CommercetoolsError.fromAxiosError(a);throw a;case 4:return[2]}}))}))},t.prototype.applyStore=function(t,e){return"string"==typeof e&&""!==e?"/in-store/key=".concat(e).concat(t):this.config.storeKey?"/in-store/key=".concat(this.config.storeKey).concat(t):t},t}();e.CommercetoolsAuthApi=m},8003:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CommercetoolsGrant=void 0;var o=r(7530),n=function(){function t(t){this.accessToken="",this.expiresIn=0,this.expiresAt=new Date,this.scopes=[],this.accessToken=t.access_token,this.expiresIn=t.expires_in,this.scopes=(0,o.scopeRequestStringToArray)(t.scope),this.anonymousId=this.extractKeyFromScope("anonymous_id",t.scope),this.customerId=this.extractKeyFromScope("customer_id",t.scope),this.expiresAt=new Date((new Date).getTime()+1e3*t.expires_in),"refresh_token"in t&&t.refresh_token&&(this.refreshToken=t.refresh_token)}return t.prototype.expiresWithin=function(t){var e=(new Date).getTime()+1e3*t;return this.expiresAt.getTime()<e},t.prototype.extractKeyFromScope=function(t,e){if(e&&t){var r=null==e?void 0:e.split(" ");if(Array.isArray(r)&&0!==r.length){var o=r.find((function(e){return e.slice(0,t.length+1)==="".concat(t,":")}));return o?o.slice(t.length+1):void 0}}},t}();e.CommercetoolsGrant=n},7111:(t,e,r)=>{var o;Object.defineProperty(e,"__esModule",{value:!0}),e.INVALID_SCOPES=e.REGION_URLS=void 0;var n=r(9291);e.REGION_URLS=((o={})[n.Region.EUROPE_GCP]={auth:"https://auth.europe-west1.gcp.commercetools.com",api:"https://api.europe-west1.gcp.commercetools.com"},o[n.Region.EUROPE_AWS]={auth:"https://auth.eu-central-1.aws.commercetools.com",api:"https://api.eu-central-1.aws.commercetools.com"},o[n.Region.NORTH_AMERICA_GCP]={auth:"https://auth.us-central1.gcp.commercetools.com",api:"https://api.us-central1.gcp.commercetools.com"},o[n.Region.NORTH_AMERICA_AWS]={auth:"https://auth.us-east-2.aws.commercetools.com",api:"https://api.us-east-2.aws.commercetools.com"},o[n.Region.AUSTRALIA_GCP]={auth:"https://auth.australia-southeast1.gcp.commercetools.com",api:"https://api.australia-southeast1.gcp.commercetools.com"},o),e.INVALID_SCOPES=["anonymous_id","customer_id"]},7443:function(t,e,r){var o=this&&this.__createBinding||(Object.create?function(t,e,r,o){void 0===o&&(o=r);var n=Object.getOwnPropertyDescriptor(e,r);n&&!("get"in n?!e.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,o,n)}:function(t,e,r,o){void 0===o&&(o=r),t[o]=e[r]}),n=this&&this.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||o(e,t,r)};Object.defineProperty(e,"__esModule",{value:!0}),n(r(2442),e),n(r(8003),e)},7530:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.scopeRequestStringToArray=e.scopeArrayToRequestString=void 0;var o=r(7111);e.scopeArrayToRequestString=function(t,e){return t?t.map((function(t){return"".concat(t,":").concat(e)})).join(" "):""},e.scopeRequestStringToArray=function(t){return t?t.split(" ").map((function(t){return t.split(":")[0]})).filter((function(t){return!o.INVALID_SCOPES.includes(t)})):[]}},2849:(t,e)=>{var r;Object.defineProperty(e,"__esModule",{value:!0}),e.GrantType=void 0,(r=e.GrantType||(e.GrantType={})).CLIENT_CREDENTIALS="client_credentials",r.REFRESH_TOKEN="refresh_token",r.PASSWORD="password"},9017:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.base64EncodeForBasicAuth=void 0,e.base64EncodeForBasicAuth=function(t,e){var r="".concat(t,":").concat(e);return btoa(r)}},7302:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.applyLoggerInterceptor=void 0,e.applyLoggerInterceptor=function(t,e){t.interceptors.response.use((function(t){var r,o,n,i,a,s;return e({request:{url:null!==(o=null===(r=t.config)||void 0===r?void 0:r.url)&&void 0!==o?o:"",method:null===(n=t.config)||void 0===n?void 0:n.method,params:null===(i=t.config)||void 0===i?void 0:i.params,headers:null===(a=t.request)||void 0===a?void 0:a.headers,data:null===(s=t.config)||void 0===s?void 0:s.data},response:{status:t.status,headers:t.headers,data:t.data}}),t}),(function(t){var r,o,n,i,a,s,c,u,p,l;return e({request:{url:null!==(o=null===(r=t.config)||void 0===r?void 0:r.url)&&void 0!==o?o:"",method:null===(n=t.config)||void 0===n?void 0:n.method,params:null===(i=t.config)||void 0===i?void 0:i.params,headers:null===(a=t.request)||void 0===a?void 0:a.headers,data:null===(s=t.config)||void 0===s?void 0:s.data},response:{code:t.code,message:(null===(c=t.response)||void 0===c?void 0:c.status)?void 0:t.message,status:null===(u=t.response)||void 0===u?void 0:u.status,headers:null===(p=t.response)||void 0===p?void 0:p.headers,data:null===(l=t.response)||void 0===l?void 0:l.data}}),Promise.reject(t)}))}},4060:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.MAX_ITEMS_PER_QUERY=e.DEFAULT_REQUEST_TIMEOUT_MS=void 0,e.DEFAULT_REQUEST_TIMEOUT_MS=5e3,e.MAX_ITEMS_PER_QUERY=500},6781:function(t,e,r){var o,n=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.CommercetoolsError=void 0;var a=i(r(4530)),s=r(893),c=function(t){function e(r,o,n){var i=t.call(this,r)||this;return i.isCommercetoolsError=!0,i.data=o,i.status=n,Object.setPrototypeOf(i,e.prototype),i}return n(e,t),e.fromAxiosError=function(t){var r,o,n,i,a,c,u,p;return new e(t.message,{code:t.code,request:{url:null===(r=t.config)||void 0===r?void 0:r.url,method:null===(o=t.config)||void 0===o?void 0:o.method,headers:(0,s.maskSensitiveHeaders)(null===(n=t.config)||void 0===n?void 0:n.headers),params:(0,s.maskSensitiveInput)(null===(i=t.config)||void 0===i?void 0:i.params),data:(0,s.maskSensitiveInput)(this.parseRequestData(t.config))},response:{status:null===(a=t.response)||void 0===a?void 0:a.status,data:(0,s.maskSensitiveInput)(null===(c=t.response)||void 0===c?void 0:c.data),headers:null===(u=t.response)||void 0===u?void 0:u.headers}},null===(p=t.response)||void 0===p?void 0:p.status)},e.parseRequestData=function(t){var e,r,o=null==t?void 0:t.data;if("string"==typeof o&&o){var n="";if("string"==typeof(null===(e=null==t?void 0:t.headers)||void 0===e?void 0:e["Content-Type"])&&(n=null===(r=null==t?void 0:t.headers)||void 0===r?void 0:r["Content-Type"]),"application/json"===n.substring(0,16))try{o=JSON.parse(t.data)}catch(t){}else if("application/x-www-form-urlencoded"===n.substring(0,33))try{var i=new URLSearchParams(t.data),a={};i.forEach((function(t,e,r){var o=r.getAll(e);0===o.length?a[e]="":1===o.length?a[e]=o[0]:a[e]=o})),o=a}catch(t){}}return o},e.prototype.toJSON=function(){return{status:this.status,message:this.message,data:this.data,isCommercetoolsError:!0}},e.prototype.toString=function(){return(0,a.default)(this.toJSON())},e}(Error);e.CommercetoolsError=c},3028:function(t,e,r){var o=this&&this.__createBinding||(Object.create?function(t,e,r,o){void 0===o&&(o=r);var n=Object.getOwnPropertyDescriptor(e,r);n&&!("get"in n?!e.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,o,n)}:function(t,e,r,o){void 0===o&&(o=r),t[o]=e[r]}),n=this&&this.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||o(e,t,r)};Object.defineProperty(e,"__esModule",{value:!0}),n(r(6781),e)},2915:function(t,e,r){var o=this&&this.__createBinding||(Object.create?function(t,e,r,o){void 0===o&&(o=r);var n=Object.getOwnPropertyDescriptor(e,r);n&&!("get"in n?!e.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,o,n)}:function(t,e,r,o){void 0===o&&(o=r),t[o]=e[r]}),n=this&&this.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||o(e,t,r)};Object.defineProperty(e,"__esModule",{value:!0}),e.MAX_ITEMS_PER_QUERY=e.Region=void 0,n(r(3028),e),n(r(7443),e),n(r(3713),e);var i=r(9291);Object.defineProperty(e,"Region",{enumerable:!0,get:function(){return i.Region}}),n(r(893),e),n(r(6249),e);var a=r(4060);Object.defineProperty(e,"MAX_ITEMS_PER_QUERY",{enumerable:!0,get:function(){return a.MAX_ITEMS_PER_QUERY}})},625:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0})},9605:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0})},5554:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0})},4294:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0})},5991:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0})},5714:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0})},7942:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0})},9906:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0})},4241:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0})},146:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0})},5167:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0})},4236:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0})},6249:function(t,e,r){var o=this&&this.__createBinding||(Object.create?function(t,e,r,o){void 0===o&&(o=r);var n=Object.getOwnPropertyDescriptor(e,r);n&&!("get"in n?!e.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,o,n)}:function(t,e,r,o){void 0===o&&(o=r),t[o]=e[r]}),n=this&&this.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||o(e,t,r)};Object.defineProperty(e,"__esModule",{value:!0}),n(r(9605),e),n(r(625),e),n(r(5554),e),n(r(4294),e),n(r(5991),e),n(r(5714),e),n(r(9906),e),n(r(7942),e),n(r(4241),e),n(r(146),e),n(r(5167),e),n(r(4236),e),n(r(2949),e),n(r(492),e),n(r(6871),e),n(r(6487),e),n(r(8386),e),n(r(4946),e),n(r(6313),e),n(r(5285),e),n(r(5283),e),n(r(3708),e),n(r(6883),e),n(r(2246),e),n(r(4089),e),n(r(6614),e),n(r(7607),e),n(r(310),e),n(r(7183),e),n(r(2569),e),n(r(1027),e),n(r(6080),e),n(r(1613),e),n(r(721),e)},2949:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0})},492:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0})},6871:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0})},8386:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0})},6487:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0})},4946:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0})},5285:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0})},5283:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0})},3708:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0})},6313:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0})},6883:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0})},2246:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0})},4089:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0})},6614:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0})},7607:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0})},310:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0})},7183:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0})},2569:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0})},1027:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0})},6080:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0})},1613:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0})},721:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0})},9291:(t,e)=>{var r;Object.defineProperty(e,"__esModule",{value:!0}),e.Region=void 0,(r=e.Region||(e.Region={})).NORTH_AMERICA_GCP="north_america_gcp",r.NORTH_AMERICA_AWS="north_america_aws",r.EUROPE_GCP="europe_gcp",r.EUROPE_AWS="europe_aws",r.AUSTRALIA_GCP="australia_gcp"},3720:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.calculateDelay=void 0,e.calculateDelay=function(t,e){if(!e||0===t)return 0;var r=e.delayMs*Math.pow(2,t-1);if(e.jitter){var o=r*(1+1/(t+1));return Math.floor(Math.random()*o)}return r}},3930:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.formatAsKey=void 0;var o=r(3028);e.formatAsKey=function(t){var e="";if("string"!=typeof t)throw new o.CommercetoolsError("The [input] parameter must be a string");if((e=(e=(e=(e=(e=(e=t.trim().toLowerCase()).replace(/ {2,}/g,"")).replace(/&/g,"and")).replace(/[ _]/g,"-")).replace(/[^0-9a-z-]+/g,"")).replace(/-{2,}/g,"-")).length&&"-"===e[0]&&(e=e.slice(1)),e.length&&"-"===e[e.length-1]&&(e=e.slice(0,-1)),e.length<2)throw new o.CommercetoolsError("Formatted key did not meet minimum length of 2 characters: ".concat(e));if(e.length>256)throw new o.CommercetoolsError("Formatted key exceeds the maximum length of 256 characters: ".concat(e));return e}},6640:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getAttributeValue=void 0,e.getAttributeValue=function(t){var e,r;if(null===(e=null==t?void 0:t.attributes)||void 0===e?void 0:e.length){var o=null===(r=t.attributes)||void 0===r?void 0:r.find((function(e){return e.name===t.name}));if(o)return o.value}return null}},893:function(t,e,r){var o=this&&this.__createBinding||(Object.create?function(t,e,r,o){void 0===o&&(o=r);var n=Object.getOwnPropertyDescriptor(e,r);n&&!("get"in n?!e.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,o,n)}:function(t,e,r,o){void 0===o&&(o=r),t[o]=e[r]}),n=this&&this.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||o(e,t,r)};Object.defineProperty(e,"__esModule",{value:!0}),n(r(3720),e),n(r(3930),e),n(r(6640),e),n(r(9998),e),n(r(9989),e),n(r(3190),e)},9998:function(t,e,r){var o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.maskSensitiveData=e.maskSensitiveHeaders=e.maskSensitiveInput=e.DEFAULT_MASKING_STRING=e.SENSITIVE_HEADER_NAMES=e.SENSITIVE_PROPERTY_NAMES=void 0;var n=o(r(3465)),i=o(r(3692));function a(t,r,o){if(void 0===o&&(o=e.DEFAULT_MASKING_STRING),"object"==typeof t){var a=(0,n.default)(t);return(0,i.default)(a).forEach((function(){var t,e;r.includes(null!==(e=null===(t=this.key)||void 0===t?void 0:t.toLowerCase())&&void 0!==e?e:"")&&this.update(o)})),a}return t}e.SENSITIVE_PROPERTY_NAMES=["password","refresh_token"],e.SENSITIVE_HEADER_NAMES=["authorization"],e.DEFAULT_MASKING_STRING="********",e.maskSensitiveInput=function(t){return a(t,e.SENSITIVE_PROPERTY_NAMES)},e.maskSensitiveHeaders=function(t){return a(t,e.SENSITIVE_HEADER_NAMES)},e.maskSensitiveData=a},9989:function(t,e,r){var o=this&&this.__awaiter||function(t,e,r,o){return new(r||(r=Promise))((function(n,i){function a(t){try{c(o.next(t))}catch(t){i(t)}}function s(t){try{c(o.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?n(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}c((o=o.apply(t,e||[])).next())}))},n=this&&this.__generator||function(t,e){var r,o,n,i,a={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(r=1,o&&(n=2&s[0]?o.return:s[0]?o.throw||((n=o.return)&&n.call(o),0):o.next)&&!(n=n.call(o,s[1])).done)return n;switch(o=0,n&&(s=[2&s[0],n.value]),s[0]){case 0:case 1:n=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,o=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((n=(n=a.trys).length>0&&n[n.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!n||s[1]>n[0]&&s[1]<n[3])){a.label=s[1];break}if(6===s[0]&&a.label<n[1]){a.label=n[1],n=s;break}if(n&&a.label<n[2]){a.label=n[2],a.ops.push(s);break}n[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],o=0}finally{r=n=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.retryOnConflict=void 0;var i=r(3720),a=r(8842);e.retryOnConflict=function(t){return o(this,void 0,void 0,(function(){var e,r,o,s,c,u;return n(this,(function(p){switch(p.label){case 0:e=(null==t?void 0:t.maxRetries)||3,r=(null==t?void 0:t.delayMs)||100,o=!!(null==t?void 0:t.jitter),s=function(s){var c,u,p;return n(this,(function(n){switch(n.label){case 0:return s>1?(c=(0,i.calculateDelay)(s-1,{delayMs:r,maxRetries:e,jitter:o}),[4,new Promise((function(t){return setTimeout(t,c)}))]):[3,2];case 1:n.sent(),n.label=2;case 2:return n.trys.push([2,4,,5]),u={},[4,t.executeFn(s)];case 3:return[2,(u.value=n.sent(),u)];case 4:if(!(p=n.sent()).isCommercetoolsError||p.status!==a.Status.Conflict||s===e)throw p;return[3,5];case 5:return[2]}}))},c=1,p.label=1;case 1:return c<=e?[5,s(c)]:[3,4];case 2:if("object"==typeof(u=p.sent()))return[2,u.value];p.label=3;case 3:return c++,[3,1];case 4:return[2,void 0]}}))}))}},3190:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.buildUserAgent=void 0,e.buildUserAgent=function(t){var e="@gradientedge/commercetools-utils";return t&&(e="".concat(e," (").concat(t,")")),e}},8842:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.reason=e.ErrorStatus=e.RedirectionStatus=e.SuccessStatus=e.InformationStatus=e.Status=void 0;var o=r(7536);Object.defineProperty(e,"Status",{enumerable:!0,get:function(){return o.Status}}),Object.defineProperty(e,"InformationStatus",{enumerable:!0,get:function(){return o.InformationStatus}}),Object.defineProperty(e,"SuccessStatus",{enumerable:!0,get:function(){return o.SuccessStatus}}),Object.defineProperty(e,"RedirectionStatus",{enumerable:!0,get:function(){return o.RedirectionStatus}}),Object.defineProperty(e,"ErrorStatus",{enumerable:!0,get:function(){return o.ErrorStatus}});var n=r(7890);Object.defineProperty(e,"reason",{enumerable:!0,get:function(){return n.reason}})},7890:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.reason=void 0;const o=r(7536);e.reason=function(t){switch(t){case 200:return"OK";case 203:return"Non-Authoritative Information";case 207:return"Multi-Status";case 226:return"IM Used";case 414:return"URI Too Long";case 418:return"I'm a teapot";case 505:return"HTTP Version Not Supported";default:return(Object.keys(o.Status).find((e=>o.Status[e]===t))||"").replace(/(?!^)([A-Z])/gm," $1")}}},7536:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Status=e.ErrorStatus=e.RedirectionStatus=e.SuccessStatus=e.InformationStatus=void 0,e.InformationStatus={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103},e.SuccessStatus={Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226},e.RedirectionStatus={MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,TemporaryRedirect:307,PermanentRedirect:308},e.ErrorStatus={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,RequestedRangeNotSatisfiable: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},e.Status=Object.assign(Object.assign(Object.assign(Object.assign({},e.InformationStatus),e.SuccessStatus),e.RedirectionStatus),e.ErrorStatus)},9669:(t,e,r)=>{t.exports=r(1609)},5448:(t,e,r)=>{var o=r(4867),n=r(6026),i=r(4372),a=r(5327),s=r(4097),c=r(4109),u=r(7985),p=r(7874),l=r(2648),f=r(644),d=r(205);t.exports=function(t){return new Promise((function(e,r){var h,y=t.data,m=t.headers,v=t.responseType;function g(){t.cancelToken&&t.cancelToken.unsubscribe(h),t.signal&&t.signal.removeEventListener("abort",h)}o.isFormData(y)&&o.isStandardBrowserEnv()&&delete m["Content-Type"];var b=new XMLHttpRequest;if(t.auth){var O=t.auth.username||"",S=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";m.Authorization="Basic "+btoa(O+":"+S)}var E=s(t.baseURL,t.url);function _(){if(b){var o="getAllResponseHeaders"in b?c(b.getAllResponseHeaders()):null,i={data:v&&"text"!==v&&"json"!==v?b.response:b.responseText,status:b.status,statusText:b.statusText,headers:o,config:t,request:b};n((function(t){e(t),g()}),(function(t){r(t),g()}),i),b=null}}if(b.open(t.method.toUpperCase(),a(E,t.params,t.paramsSerializer),!0),b.timeout=t.timeout,"onloadend"in b?b.onloadend=_:b.onreadystatechange=function(){b&&4===b.readyState&&(0!==b.status||b.responseURL&&0===b.responseURL.indexOf("file:"))&&setTimeout(_)},b.onabort=function(){b&&(r(new l("Request aborted",l.ECONNABORTED,t,b)),b=null)},b.onerror=function(){r(new l("Network Error",l.ERR_NETWORK,t,b,b)),b=null},b.ontimeout=function(){var e=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded",o=t.transitional||p;t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),r(new l(e,o.clarifyTimeoutError?l.ETIMEDOUT:l.ECONNABORTED,t,b)),b=null},o.isStandardBrowserEnv()){var w=(t.withCredentials||u(E))&&t.xsrfCookieName?i.read(t.xsrfCookieName):void 0;w&&(m[t.xsrfHeaderName]=w)}"setRequestHeader"in b&&o.forEach(m,(function(t,e){void 0===y&&"content-type"===e.toLowerCase()?delete m[e]:b.setRequestHeader(e,t)})),o.isUndefined(t.withCredentials)||(b.withCredentials=!!t.withCredentials),v&&"json"!==v&&(b.responseType=t.responseType),"function"==typeof t.onDownloadProgress&&b.addEventListener("progress",t.onDownloadProgress),"function"==typeof t.onUploadProgress&&b.upload&&b.upload.addEventListener("progress",t.onUploadProgress),(t.cancelToken||t.signal)&&(h=function(t){b&&(r(!t||t&&t.type?new f:t),b.abort(),b=null)},t.cancelToken&&t.cancelToken.subscribe(h),t.signal&&(t.signal.aborted?h():t.signal.addEventListener("abort",h))),y||(y=null);var P=d(E);P&&-1===["http","https","file"].indexOf(P)?r(new l("Unsupported protocol "+P+":",l.ERR_BAD_REQUEST,t)):b.send(y)}))}},1609:(t,e,r)=>{var o=r(4867),n=r(1849),i=r(321),a=r(7185),s=function t(e){var r=new i(e),s=n(i.prototype.request,r);return o.extend(s,i.prototype,r),o.extend(s,r),s.create=function(r){return t(a(e,r))},s}(r(5546));s.Axios=i,s.CanceledError=r(644),s.CancelToken=r(4972),s.isCancel=r(6502),s.VERSION=r(7288).version,s.toFormData=r(7675),s.AxiosError=r(2648),s.Cancel=s.CanceledError,s.all=function(t){return Promise.all(t)},s.spread=r(8713),s.isAxiosError=r(6268),t.exports=s,t.exports.default=s},4972:(t,e,r)=>{var o=r(644);function n(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");var e;this.promise=new Promise((function(t){e=t}));var r=this;this.promise.then((function(t){if(r._listeners){var e,o=r._listeners.length;for(e=0;e<o;e++)r._listeners[e](t);r._listeners=null}})),this.promise.then=function(t){var e,o=new Promise((function(t){r.subscribe(t),e=t})).then(t);return o.cancel=function(){r.unsubscribe(e)},o},t((function(t){r.reason||(r.reason=new o(t),e(r.reason))}))}n.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},n.prototype.subscribe=function(t){this.reason?t(this.reason):this._listeners?this._listeners.push(t):this._listeners=[t]},n.prototype.unsubscribe=function(t){if(this._listeners){var e=this._listeners.indexOf(t);-1!==e&&this._listeners.splice(e,1)}},n.source=function(){var t;return{token:new n((function(e){t=e})),cancel:t}},t.exports=n},644:(t,e,r)=>{var o=r(2648);function n(t){o.call(this,null==t?"canceled":t,o.ERR_CANCELED),this.name="CanceledError"}r(4867).inherits(n,o,{__CANCEL__:!0}),t.exports=n},6502:t=>{t.exports=function(t){return!(!t||!t.__CANCEL__)}},321:(t,e,r)=>{var o=r(4867),n=r(5327),i=r(782),a=r(3572),s=r(7185),c=r(4097),u=r(4875),p=u.validators;function l(t){this.defaults=t,this.interceptors={request:new i,response:new i}}l.prototype.request=function(t,e){"string"==typeof t?(e=e||{}).url=t:e=t||{},(e=s(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var r=e.transitional;void 0!==r&&u.assertOptions(r,{silentJSONParsing:p.transitional(p.boolean),forcedJSONParsing:p.transitional(p.boolean),clarifyTimeoutError:p.transitional(p.boolean)},!1);var o=[],n=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(n=n&&t.synchronous,o.unshift(t.fulfilled,t.rejected))}));var i,c=[];if(this.interceptors.response.forEach((function(t){c.push(t.fulfilled,t.rejected)})),!n){var l=[a,void 0];for(Array.prototype.unshift.apply(l,o),l=l.concat(c),i=Promise.resolve(e);l.length;)i=i.then(l.shift(),l.shift());return i}for(var f=e;o.length;){var d=o.shift(),h=o.shift();try{f=d(f)}catch(t){h(t);break}}try{i=a(f)}catch(t){return Promise.reject(t)}for(;c.length;)i=i.then(c.shift(),c.shift());return i},l.prototype.getUri=function(t){t=s(this.defaults,t);var e=c(t.baseURL,t.url);return n(e,t.params,t.paramsSerializer)},o.forEach(["delete","get","head","options"],(function(t){l.prototype[t]=function(e,r){return this.request(s(r||{},{method:t,url:e,data:(r||{}).data}))}})),o.forEach(["post","put","patch"],(function(t){function e(e){return function(r,o,n){return this.request(s(n||{},{method:t,headers:e?{"Content-Type":"multipart/form-data"}:{},url:r,data:o}))}}l.prototype[t]=e(),l.prototype[t+"Form"]=e(!0)})),t.exports=l},2648:(t,e,r)=>{var o=r(4867);function n(t,e,r,o,n){Error.call(this),this.message=t,this.name="AxiosError",e&&(this.code=e),r&&(this.config=r),o&&(this.request=o),n&&(this.response=n)}o.inherits(n,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:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var i=n.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"].forEach((function(t){a[t]={value:t}})),Object.defineProperties(n,a),Object.defineProperty(i,"isAxiosError",{value:!0}),n.from=function(t,e,r,a,s,c){var u=Object.create(i);return o.toFlatObject(t,u,(function(t){return t!==Error.prototype})),n.call(u,t.message,e,r,a,s),u.name=t.name,c&&Object.assign(u,c),u},t.exports=n},782:(t,e,r)=>{var o=r(4867);function n(){this.handlers=[]}n.prototype.use=function(t,e,r){return this.handlers.push({fulfilled:t,rejected:e,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1},n.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)},n.prototype.forEach=function(t){o.forEach(this.handlers,(function(e){null!==e&&t(e)}))},t.exports=n},4097:(t,e,r)=>{var o=r(1793),n=r(7303);t.exports=function(t,e){return t&&!o(e)?n(t,e):e}},3572:(t,e,r)=>{var o=r(4867),n=r(8527),i=r(6502),a=r(5546),s=r(644);function c(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new s}t.exports=function(t){return c(t),t.headers=t.headers||{},t.data=n.call(t,t.data,t.headers,t.transformRequest),t.headers=o.merge(t.headers.common||{},t.headers[t.method]||{},t.headers),o.forEach(["delete","get","head","post","put","patch","common"],(function(e){delete t.headers[e]})),(t.adapter||a.adapter)(t).then((function(e){return c(t),e.data=n.call(t,e.data,e.headers,t.transformResponse),e}),(function(e){return i(e)||(c(t),e&&e.response&&(e.response.data=n.call(t,e.response.data,e.response.headers,t.transformResponse))),Promise.reject(e)}))}},7185:(t,e,r)=>{var o=r(4867);t.exports=function(t,e){e=e||{};var r={};function n(t,e){return o.isPlainObject(t)&&o.isPlainObject(e)?o.merge(t,e):o.isPlainObject(e)?o.merge({},e):o.isArray(e)?e.slice():e}function i(r){return o.isUndefined(e[r])?o.isUndefined(t[r])?void 0:n(void 0,t[r]):n(t[r],e[r])}function a(t){if(!o.isUndefined(e[t]))return n(void 0,e[t])}function s(r){return o.isUndefined(e[r])?o.isUndefined(t[r])?void 0:n(void 0,t[r]):n(void 0,e[r])}function c(r){return r in e?n(t[r],e[r]):r in t?n(void 0,t[r]):void 0}var u={url:a,method:a,data:a,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:c};return o.forEach(Object.keys(t).concat(Object.keys(e)),(function(t){var e=u[t]||i,n=e(t);o.isUndefined(n)&&e!==c||(r[t]=n)})),r}},6026:(t,e,r)=>{var o=r(2648);t.exports=function(t,e,r){var n=r.config.validateStatus;r.status&&n&&!n(r.status)?e(new o("Request failed with status code "+r.status,[o.ERR_BAD_REQUEST,o.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):t(r)}},8527:(t,e,r)=>{var o=r(4867),n=r(5546);t.exports=function(t,e,r){var i=this||n;return o.forEach(r,(function(r){t=r.call(i,t,e)})),t}},5546:(t,e,r)=>{var o=r(4867),n=r(6016),i=r(2648),a=r(7874),s=r(7675),c={"Content-Type":"application/x-www-form-urlencoded"};function u(t,e){!o.isUndefined(t)&&o.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}var p,l={transitional:a,adapter:(("undefined"!=typeof XMLHttpRequest||"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(p=r(5448)),p),transformRequest:[function(t,e){if(n(e,"Accept"),n(e,"Content-Type"),o.isFormData(t)||o.isArrayBuffer(t)||o.isBuffer(t)||o.isStream(t)||o.isFile(t)||o.isBlob(t))return t;if(o.isArrayBufferView(t))return t.buffer;if(o.isURLSearchParams(t))return u(e,"application/x-www-form-urlencoded;charset=utf-8"),t.toString();var r,i=o.isObject(t),a=e&&e["Content-Type"];if((r=o.isFileList(t))||i&&"multipart/form-data"===a){var c=this.env&&this.env.FormData;return s(r?{"files[]":t}:t,c&&new c)}return i||"application/json"===a?(u(e,"application/json"),function(t,e,r){if(o.isString(t))try{return(0,JSON.parse)(t),o.trim(t)}catch(t){if("SyntaxError"!==t.name)throw t}return(0,JSON.stringify)(t)}(t)):t}],transformResponse:[function(t){var e=this.transitional||l.transitional,r=e&&e.silentJSONParsing,n=e&&e.forcedJSONParsing,a=!r&&"json"===this.responseType;if(a||n&&o.isString(t)&&t.length)try{return JSON.parse(t)}catch(t){if(a){if("SyntaxError"===t.name)throw i.from(t,i.ERR_BAD_RESPONSE,this,null,this.response);throw t}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:r(1623)},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};o.forEach(["delete","get","head"],(function(t){l.headers[t]={}})),o.forEach(["post","put","patch"],(function(t){l.headers[t]=o.merge(c)})),t.exports=l},7874:t=>{t.exports={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1}},7288:t=>{t.exports={version:"0.27.2"}},1849:t=>{t.exports=function(t,e){return function(){for(var r=new Array(arguments.length),o=0;o<r.length;o++)r[o]=arguments[o];return t.apply(e,r)}}},5327:(t,e,r)=>{var o=r(4867);function n(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}t.exports=function(t,e,r){if(!e)return t;var i;if(r)i=r(e);else if(o.isURLSearchParams(e))i=e.toString();else{var a=[];o.forEach(e,(function(t,e){null!=t&&(o.isArray(t)?e+="[]":t=[t],o.forEach(t,(function(t){o.isDate(t)?t=t.toISOString():o.isObject(t)&&(t=JSON.stringify(t)),a.push(n(e)+"="+n(t))})))})),i=a.join("&")}if(i){var s=t.indexOf("#");-1!==s&&(t=t.slice(0,s)),t+=(-1===t.indexOf("?")?"?":"&")+i}return t}},7303:t=>{t.exports=function(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}},4372:(t,e,r)=>{var o=r(4867);t.exports=o.isStandardBrowserEnv()?{write:function(t,e,r,n,i,a){var s=[];s.push(t+"="+encodeURIComponent(e)),o.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),o.isString(n)&&s.push("path="+n),o.isString(i)&&s.push("domain="+i),!0===a&&s.push("secure"),document.cookie=s.join("; ")},read:function(t){var e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},1793:t=>{t.exports=function(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}},6268:(t,e,r)=>{var o=r(4867);t.exports=function(t){return o.isObject(t)&&!0===t.isAxiosError}},7985:(t,e,r)=>{var o=r(4867);t.exports=o.isStandardBrowserEnv()?function(){var t,e=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function n(t){var o=t;return e&&(r.setAttribute("href",o),o=r.href),r.setAttribute("href",o),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}return t=n(window.location.href),function(e){var r=o.isString(e)?n(e):e;return r.protocol===t.protocol&&r.host===t.host}}():function(){return!0}},6016:(t,e,r)=>{var o=r(4867);t.exports=function(t,e){o.forEach(t,(function(r,o){o!==e&&o.toUpperCase()===e.toUpperCase()&&(t[e]=r,delete t[o])}))}},1623:t=>{t.exports=null},4109:(t,e,r)=>{var o=r(4867),n=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];t.exports=function(t){var e,r,i,a={};return t?(o.forEach(t.split("\n"),(function(t){if(i=t.indexOf(":"),e=o.trim(t.substr(0,i)).toLowerCase(),r=o.trim(t.substr(i+1)),e){if(a[e]&&n.indexOf(e)>=0)return;a[e]="set-cookie"===e?(a[e]?a[e]:[]).concat([r]):a[e]?a[e]+", "+r:r}})),a):a}},205:t=>{t.exports=function(t){var e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}},8713:t=>{t.exports=function(t){return function(e){return t.apply(null,e)}}},7675:(t,e,r)=>{var o=r(4867);t.exports=function(t,e){e=e||new FormData;var r=[];function n(t){return null===t?"":o.isDate(t)?t.toISOString():o.isArrayBuffer(t)||o.isTypedArray(t)?"function"==typeof Blob?new Blob([t]):Buffer.from(t):t}return function t(i,a){if(o.isPlainObject(i)||o.isArray(i)){if(-1!==r.indexOf(i))throw Error("Circular reference detected in "+a);r.push(i),o.forEach(i,(function(r,i){if(!o.isUndefined(r)){var s,c=a?a+"."+i:i;if(r&&!a&&"object"==typeof r)if(o.endsWith(i,"{}"))r=JSON.stringify(r);else if(o.endsWith(i,"[]")&&(s=o.toArray(r)))return void s.forEach((function(t){!o.isUndefined(t)&&e.append(c,n(t))}));t(r,c)}})),r.pop()}else e.append(a,n(i))}(t),e}},4875:(t,e,r)=>{var o=r(7288).version,n=r(2648),i={};["object","boolean","number","function","string","symbol"].forEach((function(t,e){i[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}}));var a={};i.transitional=function(t,e,r){function i(t,e){return"[Axios v"+o+"] Transitional option '"+t+"'"+e+(r?". "+r:"")}return function(r,o,s){if(!1===t)throw new n(i(o," has been removed"+(e?" in "+e:"")),n.ERR_DEPRECATED);return e&&!a[o]&&(a[o]=!0,console.warn(i(o," has been deprecated since v"+e+" and will be removed in the near future"))),!t||t(r,o,s)}},t.exports={assertOptions:function(t,e,r){if("object"!=typeof t)throw new n("options must be an object",n.ERR_BAD_OPTION_VALUE);for(var o=Object.keys(t),i=o.length;i-- >0;){var a=o[i],s=e[a];if(s){var c=t[a],u=void 0===c||s(c,a,t);if(!0!==u)throw new n("option "+a+" must be "+u,n.ERR_BAD_OPTION_VALUE)}else if(!0!==r)throw new n("Unknown option "+a,n.ERR_BAD_OPTION)}},validators:i}},4867:(t,e,r)=>{var o,n=r(1849),i=Object.prototype.toString,a=(o=Object.create(null),function(t){var e=i.call(t);return o[e]||(o[e]=e.slice(8,-1).toLowerCase())});function s(t){return t=t.toLowerCase(),function(e){return a(e)===t}}function c(t){return Array.isArray(t)}function u(t){return void 0===t}var p=s("ArrayBuffer");function l(t){return null!==t&&"object"==typeof t}function f(t){if("object"!==a(t))return!1;var e=Object.getPrototypeOf(t);return null===e||e===Object.prototype}var d=s("Date"),h=s("File"),y=s("Blob"),m=s("FileList");function v(t){return"[object Function]"===i.call(t)}var g=s("URLSearchParams");function b(t,e){if(null!=t)if("object"!=typeof t&&(t=[t]),c(t))for(var r=0,o=t.length;r<o;r++)e.call(null,t[r],r,t);else for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.call(null,t[n],n,t)}var O,S=(O="undefined"!=typeof Uint8Array&&Object.getPrototypeOf(Uint8Array),function(t){return O&&t instanceof O});t.exports={isArray:c,isArrayBuffer:p,isBuffer:function(t){return null!==t&&!u(t)&&null!==t.constructor&&!u(t.constructor)&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)},isFormData:function(t){var e="[object FormData]";return t&&("function"==typeof FormData&&t instanceof FormData||i.call(t)===e||v(t.toString)&&t.toString()===e)},isArrayBufferView:function(t){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&p(t.buffer)},isString:function(t){return"string"==typeof t},isNumber:function(t){return"number"==typeof t},isObject:l,isPlainObject:f,isUndefined:u,isDate:d,isFile:h,isBlob:y,isFunction:v,isStream:function(t){return l(t)&&v(t.pipe)},isURLSearchParams:g,isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&"undefined"!=typeof window&&"undefined"!=typeof document},forEach:b,merge:function t(){var e={};function r(r,o){f(e[o])&&f(r)?e[o]=t(e[o],r):f(r)?e[o]=t({},r):c(r)?e[o]=r.slice():e[o]=r}for(var o=0,n=arguments.length;o<n;o++)b(arguments[o],r);return e},extend:function(t,e,r){return b(e,(function(e,o){t[o]=r&&"function"==typeof e?n(e,r):e})),t},trim:function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")},stripBOM:function(t){return 65279===t.charCodeAt(0)&&(t=t.slice(1)),t},inherits:function(t,e,r,o){t.prototype=Object.create(e.prototype,o),t.prototype.constructor=t,r&&Object.assign(t.prototype,r)},toFlatObject:function(t,e,r){var o,n,i,a={};e=e||{};do{for(n=(o=Object.getOwnPropertyNames(t)).length;n-- >0;)a[i=o[n]]||(e[i]=t[i],a[i]=!0);t=Object.getPrototypeOf(t)}while(t&&(!r||r(t,e))&&t!==Object.prototype);return e},kindOf:a,kindOfTest:s,endsWith:function(t,e,r){t=String(t),(void 0===r||r>t.length)&&(r=t.length),r-=e.length;var o=t.indexOf(e,r);return-1!==o&&o===r},toArray:function(t){if(!t)return null;var e=t.length;if(u(e))return null;for(var r=new Array(e);e-- >0;)r[e]=t[e];return r},isTypedArray:S,isFileList:m}},1924:(t,e,r)=>{var o=r(210),n=r(5559),i=n(o("String.prototype.indexOf"));t.exports=function(t,e){var r=o(t,!!e);return"function"==typeof r&&i(t,".prototype.")>-1?n(r):r}},5559:(t,e,r)=>{var o=r(8612),n=r(210),i=n("%Function.prototype.apply%"),a=n("%Function.prototype.call%"),s=n("%Reflect.apply%",!0)||o.call(a,i),c=n("%Object.getOwnPropertyDescriptor%",!0),u=n("%Object.defineProperty%",!0),p=n("%Math.max%");if(u)try{u({},"a",{value:1})}catch(t){u=null}t.exports=function(t){var e=s(o,a,arguments);if(c&&u){var r=c(e,"length");r.configurable&&u(e,"length",{value:1+p(0,t.length-(arguments.length-1))})}return e};var l=function(){return s(o,i,arguments)};u?u(t.exports,"apply",{value:l}):t.exports.apply=l},7648:t=>{var e="Function.prototype.bind called on incompatible ",r=Array.prototype.slice,o=Object.prototype.toString,n="[object Function]";t.exports=function(t){var i=this;if("function"!=typeof i||o.call(i)!==n)throw new TypeError(e+i);for(var a,s=r.call(arguments,1),c=function(){if(this instanceof a){var e=i.apply(this,s.concat(r.call(arguments)));return Object(e)===e?e:this}return i.apply(t,s.concat(r.call(arguments)))},u=Math.max(0,i.length-s.length),p=[],l=0;l<u;l++)p.push("$"+l);if(a=Function("binder","return function ("+p.join(",")+"){ return binder.apply(this,arguments); }")(c),i.prototype){var f=function(){};f.prototype=i.prototype,a.prototype=new f,f.prototype=null}return a}},8612:(t,e,r)=>{var o=r(7648);t.exports=Function.prototype.bind||o},210:(t,e,r)=>{var o,n=SyntaxError,i=Function,a=TypeError,s=function(t){try{return i('"use strict"; return ('+t+").constructor;")()}catch(t){}},c=Object.getOwnPropertyDescriptor;if(c)try{c({},"")}catch(t){c=null}var u=function(){throw new a},p=c?function(){try{return u}catch(t){try{return c(arguments,"callee").get}catch(t){return u}}}():u,l=r(1405)(),f=Object.getPrototypeOf||function(t){return t.__proto__},d={},h="undefined"==typeof Uint8Array?o:f(Uint8Array),y={"%AggregateError%":"undefined"==typeof AggregateError?o:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?o:ArrayBuffer,"%ArrayIteratorPrototype%":l?f([][Symbol.iterator]()):o,"%AsyncFromSyncIteratorPrototype%":o,"%AsyncFunction%":d,"%AsyncGenerator%":d,"%AsyncGeneratorFunction%":d,"%AsyncIteratorPrototype%":d,"%Atomics%":"undefined"==typeof Atomics?o:Atomics,"%BigInt%":"undefined"==typeof BigInt?o:BigInt,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?o:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?o:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?o:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?o:FinalizationRegistry,"%Function%":i,"%GeneratorFunction%":d,"%Int8Array%":"undefined"==typeof Int8Array?o:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?o:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?o:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":l?f(f([][Symbol.iterator]())):o,"%JSON%":"object"==typeof JSON?JSON:o,"%Map%":"undefined"==typeof Map?o:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&l?f((new Map)[Symbol.iterator]()):o,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?o:Promise,"%Proxy%":"undefined"==typeof Proxy?o:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?o:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?o:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&l?f((new Set)[Symbol.iterator]()):o,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?o:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":l?f(""[Symbol.iterator]()):o,"%Symbol%":l?Symbol:o,"%SyntaxError%":n,"%ThrowTypeError%":p,"%TypedArray%":h,"%TypeError%":a,"%Uint8Array%":"undefined"==typeof Uint8Array?o:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?o:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?o:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?o:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?o:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?o:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?o:WeakSet},m=function t(e){var r;if("%AsyncFunction%"===e)r=s("async function () {}");else if("%GeneratorFunction%"===e)r=s("function* () {}");else if("%AsyncGeneratorFunction%"===e)r=s("async function* () {}");else if("%AsyncGenerator%"===e){var o=t("%AsyncGeneratorFunction%");o&&(r=o.prototype)}else if("%AsyncIteratorPrototype%"===e){var n=t("%AsyncGenerator%");n&&(r=f(n.prototype))}return y[e]=r,r},v={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},g=r(8612),b=r(7642),O=g.call(Function.call,Array.prototype.concat),S=g.call(Function.apply,Array.prototype.splice),E=g.call(Function.call,String.prototype.replace),_=g.call(Function.call,String.prototype.slice),w=g.call(Function.call,RegExp.prototype.exec),P=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,j=/\\(\\)?/g,T=function(t){var e=_(t,0,1),r=_(t,-1);if("%"===e&&"%"!==r)throw new n("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==e)throw new n("invalid intrinsic syntax, expected opening `%`");var o=[];return E(t,P,(function(t,e,r,n){o[o.length]=r?E(n,j,"$1"):e||t})),o},R=function(t,e){var r,o=t;if(b(v,o)&&(o="%"+(r=v[o])[0]+"%"),b(y,o)){var i=y[o];if(i===d&&(i=m(o)),void 0===i&&!e)throw new a("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:r,name:o,value:i}}throw new n("intrinsic "+t+" does not exist!")};t.exports=function(t,e){if("string"!=typeof t||0===t.length)throw new a("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof e)throw new a('"allowMissing" argument must be a boolean');if(null===w(/^%?[^%]*%?$/,t))throw new n("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=T(t),o=r.length>0?r[0]:"",i=R("%"+o+"%",e),s=i.name,u=i.value,p=!1,l=i.alias;l&&(o=l[0],S(r,O([0,1],l)));for(var f=1,d=!0;f<r.length;f+=1){var h=r[f],m=_(h,0,1),v=_(h,-1);if(('"'===m||"'"===m||"`"===m||'"'===v||"'"===v||"`"===v)&&m!==v)throw new n("property names with quotes must have matching quotes");if("constructor"!==h&&d||(p=!0),b(y,s="%"+(o+="."+h)+"%"))u=y[s];else if(null!=u){if(!(h in u)){if(!e)throw new a("base intrinsic for "+t+" exists, but the property is not available.");return}if(c&&f+1>=r.length){var g=c(u,h);u=(d=!!g)&&"get"in g&&!("originalValue"in g.get)?g.get:u[h]}else d=b(u,h),u=u[h];d&&!p&&(y[s]=u)}}return u}},1405:(t,e,r)=>{var o="undefined"!=typeof Symbol&&Symbol,n=r(5419);t.exports=function(){return"function"==typeof o&&"function"==typeof Symbol&&"symbol"==typeof o("foo")&&"symbol"==typeof Symbol("bar")&&n()}},5419:t=>{t.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var t={},e=Symbol("test"),r=Object(e);if("string"==typeof e)return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(e in t[e]=42,t)return!1;if("function"==typeof Object.keys&&0!==Object.keys(t).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var o=Object.getOwnPropertySymbols(t);if(1!==o.length||o[0]!==e)return!1;if(!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var n=Object.getOwnPropertyDescriptor(t,e);if(42!==n.value||!0!==n.enumerable)return!1}return!0}},7642:(t,e,r)=>{var o=r(8612);t.exports=o.call(Function.call,Object.prototype.hasOwnProperty)},4530:(t,e)=>{function r(t,e){var r=[],o=[];return null==e&&(e=function(t,e){return r[0]===e?"[Circular ~]":"[Circular ~."+o.slice(0,r.indexOf(e)).join(".")+"]"}),function(n,i){if(r.length>0){var a=r.indexOf(this);~a?r.splice(a+1):r.push(this),~a?o.splice(a,1/0,n):o.push(n),~r.indexOf(i)&&(i=e.call(this,n,i))}else r.push(i);return null==t?i:t.call(this,n,i)}}(t.exports=function(t,e,o,n){return JSON.stringify(t,r(e,n),o)}).getSerialize=r},3465:(t,e,r)=>{t=r.nmd(t);var o="__lodash_hash_undefined__",n=9007199254740991,i="[object Arguments]",a="[object Boolean]",s="[object Date]",c="[object Function]",u="[object GeneratorFunction]",p="[object Map]",l="[object Number]",f="[object Object]",d="[object Promise]",h="[object RegExp]",y="[object Set]",m="[object String]",v="[object Symbol]",g="[object WeakMap]",b="[object ArrayBuffer]",O="[object DataView]",S="[object Float32Array]",E="[object Float64Array]",_="[object Int8Array]",w="[object Int16Array]",P="[object Int32Array]",j="[object Uint8Array]",T="[object Uint8ClampedArray]",R="[object Uint16Array]",x="[object Uint32Array]",C=/\w*$/,A=/^\[object .+?Constructor\]$/,q=/^(?:0|[1-9]\d*)$/,k={};k[i]=k["[object Array]"]=k[b]=k[O]=k[a]=k[s]=k[S]=k[E]=k[_]=k[w]=k[P]=k[p]=k[l]=k[f]=k[h]=k[y]=k[m]=k[v]=k[j]=k[T]=k[R]=k[x]=!0,k["[object Error]"]=k[c]=k[g]=!1;var I="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,M="object"==typeof self&&self&&self.Object===Object&&self,N=I||M||Function("return this")(),B=e&&!e.nodeType&&e,D=B&&t&&!t.nodeType&&t,G=D&&D.exports===B;function U(t,e){return t.set(e[0],e[1]),t}function F(t,e){return t.add(e),t}function L(t,e,r,o){var n=-1,i=t?t.length:0;for(o&&i&&(r=t[++n]);++n<i;)r=e(r,t[n],n,t);return r}function K(t){var e=!1;if(null!=t&&"function"!=typeof t.toString)try{e=!!(t+"")}catch(t){}return e}function W(t){var e=-1,r=Array(t.size);return t.forEach((function(t,o){r[++e]=[o,t]})),r}function H(t,e){return function(r){return t(e(r))}}function V(t){var e=-1,r=Array(t.size);return t.forEach((function(t){r[++e]=t})),r}var $,z=Array.prototype,J=Function.prototype,Q=Object.prototype,X=N["__core-js_shared__"],Y=($=/[^.]+$/.exec(X&&X.keys&&X.keys.IE_PROTO||""))?"Symbol(src)_1."+$:"",Z=J.toString,tt=Q.hasOwnProperty,et=Q.toString,rt=RegExp("^"+Z.call(tt).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ot=G?N.Buffer:void 0,nt=N.Symbol,it=N.Uint8Array,at=H(Object.getPrototypeOf,Object),st=Object.create,ct=Q.propertyIsEnumerable,ut=z.splice,pt=Object.getOwnPropertySymbols,lt=ot?ot.isBuffer:void 0,ft=H(Object.keys,Object),dt=Nt(N,"DataView"),ht=Nt(N,"Map"),yt=Nt(N,"Promise"),mt=Nt(N,"Set"),vt=Nt(N,"WeakMap"),gt=Nt(Object,"create"),bt=Ft(dt),Ot=Ft(ht),St=Ft(yt),Et=Ft(mt),_t=Ft(vt),wt=nt?nt.prototype:void 0,Pt=wt?wt.valueOf:void 0;function jt(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var o=t[e];this.set(o[0],o[1])}}function Tt(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var o=t[e];this.set(o[0],o[1])}}function Rt(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var o=t[e];this.set(o[0],o[1])}}function xt(t){this.__data__=new Tt(t)}function Ct(t,e,r){var o=t[e];tt.call(t,e)&&Lt(o,r)&&(void 0!==r||e in t)||(t[e]=r)}function At(t,e){for(var r=t.length;r--;)if(Lt(t[r][0],e))return r;return-1}function qt(t,e,r,o,n,d,g){var A;if(o&&(A=d?o(t,n,d,g):o(t)),void 0!==A)return A;if(!$t(t))return t;var q=Kt(t);if(q){if(A=function(t){var e=t.length,r=t.constructor(e);return e&&"string"==typeof t[0]&&tt.call(t,"index")&&(r.index=t.index,r.input=t.input),r}(t),!e)return function(t,e){var r=-1,o=t.length;for(e||(e=Array(o));++r<o;)e[r]=t[r];return e}(t,A)}else{var I=Dt(t),M=I==c||I==u;if(Ht(t))return function(t,e){if(e)return t.slice();var r=new t.constructor(t.length);return t.copy(r),r}(t,e);if(I==f||I==i||M&&!d){if(K(t))return d?t:{};if(A=function(t){return"function"!=typeof t.constructor||Ut(t)?{}:$t(e=at(t))?st(e):{};var e}(M?{}:t),!e)return function(t,e){return It(t,Bt(t),e)}(t,function(t,e){return t&&It(e,zt(e),t)}(A,t))}else{if(!k[I])return d?t:{};A=function(t,e,r,o){var n,i=t.constructor;switch(e){case b:return kt(t);case a:case s:return new i(+t);case O:return function(t,e){var r=e?kt(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}(t,o);case S:case E:case _:case w:case P:case j:case T:case R:case x:return function(t,e){var r=e?kt(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}(t,o);case p:return function(t,e,r){return L(e?r(W(t),!0):W(t),U,new t.constructor)}(t,o,r);case l:case m:return new i(t);case h:return function(t){var e=new t.constructor(t.source,C.exec(t));return e.lastIndex=t.lastIndex,e}(t);case y:return function(t,e,r){return L(e?r(V(t),!0):V(t),F,new t.constructor)}(t,o,r);case v:return n=t,Pt?Object(Pt.call(n)):{}}}(t,I,qt,e)}}g||(g=new xt);var N=g.get(t);if(N)return N;if(g.set(t,A),!q)var B=r?function(t){return function(t,e,r){var o=e(t);return Kt(t)?o:function(t,e){for(var r=-1,o=e.length,n=t.length;++r<o;)t[n+r]=e[r];return t}(o,r(t))}(t,zt,Bt)}(t):zt(t);return function(t,e){for(var r=-1,o=t?t.length:0;++r<o&&!1!==e(t[r],r););}(B||t,(function(n,i){B&&(n=t[i=n]),Ct(A,i,qt(n,e,r,o,i,t,g))})),A}function kt(t){var e=new t.constructor(t.byteLength);return new it(e).set(new it(t)),e}function It(t,e,r,o){r||(r={});for(var n=-1,i=e.length;++n<i;){var a=e[n],s=o?o(r[a],t[a],a,r,t):void 0;Ct(r,a,void 0===s?t[a]:s)}return r}function Mt(t,e){var r,o,n=t.__data__;return("string"==(o=typeof(r=e))||"number"==o||"symbol"==o||"boolean"==o?"__proto__"!==r:null===r)?n["string"==typeof e?"string":"hash"]:n.map}function Nt(t,e){var r=function(t,e){return null==t?void 0:t[e]}(t,e);return function(t){return!(!$t(t)||(e=t,Y&&Y in e))&&(Vt(t)||K(t)?rt:A).test(Ft(t));var e}(r)?r:void 0}jt.prototype.clear=function(){this.__data__=gt?gt(null):{}},jt.prototype.delete=function(t){return this.has(t)&&delete this.__data__[t]},jt.prototype.get=function(t){var e=this.__data__;if(gt){var r=e[t];return r===o?void 0:r}return tt.call(e,t)?e[t]:void 0},jt.prototype.has=function(t){var e=this.__data__;return gt?void 0!==e[t]:tt.call(e,t)},jt.prototype.set=function(t,e){return this.__data__[t]=gt&&void 0===e?o:e,this},Tt.prototype.clear=function(){this.__data__=[]},Tt.prototype.delete=function(t){var e=this.__data__,r=At(e,t);return!(r<0||(r==e.length-1?e.pop():ut.call(e,r,1),0))},Tt.prototype.get=function(t){var e=this.__data__,r=At(e,t);return r<0?void 0:e[r][1]},Tt.prototype.has=function(t){return At(this.__data__,t)>-1},Tt.prototype.set=function(t,e){var r=this.__data__,o=At(r,t);return o<0?r.push([t,e]):r[o][1]=e,this},Rt.prototype.clear=function(){this.__data__={hash:new jt,map:new(ht||Tt),string:new jt}},Rt.prototype.delete=function(t){return Mt(this,t).delete(t)},Rt.prototype.get=function(t){return Mt(this,t).get(t)},Rt.prototype.has=function(t){return Mt(this,t).has(t)},Rt.prototype.set=function(t,e){return Mt(this,t).set(t,e),this},xt.prototype.clear=function(){this.__data__=new Tt},xt.prototype.delete=function(t){return this.__data__.delete(t)},xt.prototype.get=function(t){return this.__data__.get(t)},xt.prototype.has=function(t){return this.__data__.has(t)},xt.prototype.set=function(t,e){var r=this.__data__;if(r instanceof Tt){var o=r.__data__;if(!ht||o.length<199)return o.push([t,e]),this;r=this.__data__=new Rt(o)}return r.set(t,e),this};var Bt=pt?H(pt,Object):function(){return[]},Dt=function(t){return et.call(t)};function Gt(t,e){return!!(e=null==e?n:e)&&("number"==typeof t||q.test(t))&&t>-1&&t%1==0&&t<e}function Ut(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Q)}function Ft(t){if(null!=t){try{return Z.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function Lt(t,e){return t===e||t!=t&&e!=e}(dt&&Dt(new dt(new ArrayBuffer(1)))!=O||ht&&Dt(new ht)!=p||yt&&Dt(yt.resolve())!=d||mt&&Dt(new mt)!=y||vt&&Dt(new vt)!=g)&&(Dt=function(t){var e=et.call(t),r=e==f?t.constructor:void 0,o=r?Ft(r):void 0;if(o)switch(o){case bt:return O;case Ot:return p;case St:return d;case Et:return y;case _t:return g}return e});var Kt=Array.isArray;function Wt(t){return null!=t&&function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=n}(t.length)&&!Vt(t)}var Ht=lt||function(){return!1};function Vt(t){var e=$t(t)?et.call(t):"";return e==c||e==u}function $t(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function zt(t){return Wt(t)?function(t,e){var r=Kt(t)||function(t){return function(t){return function(t){return!!t&&"object"==typeof t}(t)&&Wt(t)}(t)&&tt.call(t,"callee")&&(!ct.call(t,"callee")||et.call(t)==i)}(t)?function(t,e){for(var r=-1,o=Array(t);++r<t;)o[r]=e(r);return o}(t.length,String):[],o=r.length,n=!!o;for(var a in t)!e&&!tt.call(t,a)||n&&("length"==a||Gt(a,o))||r.push(a);return r}(t):function(t){if(!Ut(t))return ft(t);var e=[];for(var r in Object(t))tt.call(t,r)&&"constructor"!=r&&e.push(r);return e}(t)}t.exports=function(t){return qt(t,!0,!0)}},631:(t,e,r)=>{var o="function"==typeof Map&&Map.prototype,n=Object.getOwnPropertyDescriptor&&o?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,i=o&&n&&"function"==typeof n.get?n.get:null,a=o&&Map.prototype.forEach,s="function"==typeof Set&&Set.prototype,c=Object.getOwnPropertyDescriptor&&s?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,u=s&&c&&"function"==typeof c.get?c.get:null,p=s&&Set.prototype.forEach,l="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,f="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,d="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,h=Boolean.prototype.valueOf,y=Object.prototype.toString,m=Function.prototype.toString,v=String.prototype.match,g=String.prototype.slice,b=String.prototype.replace,O=String.prototype.toUpperCase,S=String.prototype.toLowerCase,E=RegExp.prototype.test,_=Array.prototype.concat,w=Array.prototype.join,P=Array.prototype.slice,j=Math.floor,T="function"==typeof BigInt?BigInt.prototype.valueOf:null,R=Object.getOwnPropertySymbols,x="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,C="function"==typeof Symbol&&"object"==typeof Symbol.iterator,A="function"==typeof Symbol&&Symbol.toStringTag&&(Symbol.toStringTag,1)?Symbol.toStringTag:null,q=Object.prototype.propertyIsEnumerable,k=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function I(t,e){if(t===1/0||t===-1/0||t!=t||t&&t>-1e3&&t<1e3||E.call(/e/,e))return e;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof t){var o=t<0?-j(-t):j(t);if(o!==t){var n=String(o),i=g.call(e,n.length+1);return b.call(n,r,"$&_")+"."+b.call(b.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return b.call(e,r,"$&_")}var M=r(4654),N=M.custom,B=L(N)?N:null;function D(t,e,r){var o="double"===(r.quoteStyle||e)?'"':"'";return o+t+o}function G(t){return b.call(String(t),/"/g,""")}function U(t){return!("[object Array]"!==H(t)||A&&"object"==typeof t&&A in t)}function F(t){return!("[object RegExp]"!==H(t)||A&&"object"==typeof t&&A in t)}function L(t){if(C)return t&&"object"==typeof t&&t instanceof Symbol;if("symbol"==typeof t)return!0;if(!t||"object"!=typeof t||!x)return!1;try{return x.call(t),!0}catch(t){}return!1}t.exports=function t(e,r,o,n){var s=r||{};if(W(s,"quoteStyle")&&"single"!==s.quoteStyle&&"double"!==s.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(W(s,"maxStringLength")&&("number"==typeof s.maxStringLength?s.maxStringLength<0&&s.maxStringLength!==1/0:null!==s.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var c=!W(s,"customInspect")||s.customInspect;if("boolean"!=typeof c&&"symbol"!==c)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(W(s,"indent")&&null!==s.indent&&"\t"!==s.indent&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(W(s,"numericSeparator")&&"boolean"!=typeof s.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var y=s.numericSeparator;if(void 0===e)return"undefined";if(null===e)return"null";if("boolean"==typeof e)return e?"true":"false";if("string"==typeof e)return $(e,s);if("number"==typeof e){if(0===e)return 1/0/e>0?"0":"-0";var O=String(e);return y?I(e,O):O}if("bigint"==typeof e){var E=String(e)+"n";return y?I(e,E):E}var j=void 0===s.depth?5:s.depth;if(void 0===o&&(o=0),o>=j&&j>0&&"object"==typeof e)return U(e)?"[Array]":"[Object]";var R,N=function(t,e){var r;if("\t"===t.indent)r="\t";else{if(!("number"==typeof t.indent&&t.indent>0))return null;r=w.call(Array(t.indent+1)," ")}return{base:r,prev:w.call(Array(e+1),r)}}(s,o);if(void 0===n)n=[];else if(V(n,e)>=0)return"[Circular]";function K(e,r,i){if(r&&(n=P.call(n)).push(r),i){var a={depth:s.depth};return W(s,"quoteStyle")&&(a.quoteStyle=s.quoteStyle),t(e,a,o+1,n)}return t(e,s,o+1,n)}if("function"==typeof e&&!F(e)){var z=function(t){if(t.name)return t.name;var e=v.call(m.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}(e),tt=Z(e,K);return"[Function"+(z?": "+z:" (anonymous)")+"]"+(tt.length>0?" { "+w.call(tt,", ")+" }":"")}if(L(e)){var et=C?b.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):x.call(e);return"object"!=typeof e||C?et:J(et)}if((R=e)&&"object"==typeof R&&("undefined"!=typeof HTMLElement&&R instanceof HTMLElement||"string"==typeof R.nodeName&&"function"==typeof R.getAttribute)){for(var rt="<"+S.call(String(e.nodeName)),ot=e.attributes||[],nt=0;nt<ot.length;nt++)rt+=" "+ot[nt].name+"="+D(G(ot[nt].value),"double",s);return rt+=">",e.childNodes&&e.childNodes.length&&(rt+="..."),rt+"</"+S.call(String(e.nodeName))+">"}if(U(e)){if(0===e.length)return"[]";var it=Z(e,K);return N&&!function(t){for(var e=0;e<t.length;e++)if(V(t[e],"\n")>=0)return!1;return!0}(it)?"["+Y(it,N)+"]":"[ "+w.call(it,", ")+" ]"}if(function(t){return!("[object Error]"!==H(t)||A&&"object"==typeof t&&A in t)}(e)){var at=Z(e,K);return"cause"in Error.prototype||!("cause"in e)||q.call(e,"cause")?0===at.length?"["+String(e)+"]":"{ ["+String(e)+"] "+w.call(at,", ")+" }":"{ ["+String(e)+"] "+w.call(_.call("[cause]: "+K(e.cause),at),", ")+" }"}if("object"==typeof e&&c){if(B&&"function"==typeof e[B]&&M)return M(e,{depth:j-o});if("symbol"!==c&&"function"==typeof e.inspect)return e.inspect()}if(function(t){if(!i||!t||"object"!=typeof t)return!1;try{i.call(t);try{u.call(t)}catch(t){return!0}return t instanceof Map}catch(t){}return!1}(e)){var st=[];return a.call(e,(function(t,r){st.push(K(r,e,!0)+" => "+K(t,e))})),X("Map",i.call(e),st,N)}if(function(t){if(!u||!t||"object"!=typeof t)return!1;try{u.call(t);try{i.call(t)}catch(t){return!0}return t instanceof Set}catch(t){}return!1}(e)){var ct=[];return p.call(e,(function(t){ct.push(K(t,e))})),X("Set",u.call(e),ct,N)}if(function(t){if(!l||!t||"object"!=typeof t)return!1;try{l.call(t,l);try{f.call(t,f)}catch(t){return!0}return t instanceof WeakMap}catch(t){}return!1}(e))return Q("WeakMap");if(function(t){if(!f||!t||"object"!=typeof t)return!1;try{f.call(t,f);try{l.call(t,l)}catch(t){return!0}return t instanceof WeakSet}catch(t){}return!1}(e))return Q("WeakSet");if(function(t){if(!d||!t||"object"!=typeof t)return!1;try{return d.call(t),!0}catch(t){}return!1}(e))return Q("WeakRef");if(function(t){return!("[object Number]"!==H(t)||A&&"object"==typeof t&&A in t)}(e))return J(K(Number(e)));if(function(t){if(!t||"object"!=typeof t||!T)return!1;try{return T.call(t),!0}catch(t){}return!1}(e))return J(K(T.call(e)));if(function(t){return!("[object Boolean]"!==H(t)||A&&"object"==typeof t&&A in t)}(e))return J(h.call(e));if(function(t){return!("[object String]"!==H(t)||A&&"object"==typeof t&&A in t)}(e))return J(K(String(e)));if(!function(t){return!("[object Date]"!==H(t)||A&&"object"==typeof t&&A in t)}(e)&&!F(e)){var ut=Z(e,K),pt=k?k(e)===Object.prototype:e instanceof Object||e.constructor===Object,lt=e instanceof Object?"":"null prototype",ft=!pt&&A&&Object(e)===e&&A in e?g.call(H(e),8,-1):lt?"Object":"",dt=(pt||"function"!=typeof e.constructor?"":e.constructor.name?e.constructor.name+" ":"")+(ft||lt?"["+w.call(_.call([],ft||[],lt||[]),": ")+"] ":"");return 0===ut.length?dt+"{}":N?dt+"{"+Y(ut,N)+"}":dt+"{ "+w.call(ut,", ")+" }"}return String(e)};var K=Object.prototype.hasOwnProperty||function(t){return t in this};function W(t,e){return K.call(t,e)}function H(t){return y.call(t)}function V(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0,o=t.length;r<o;r++)if(t[r]===e)return r;return-1}function $(t,e){if(t.length>e.maxStringLength){var r=t.length-e.maxStringLength,o="... "+r+" more character"+(r>1?"s":"");return $(g.call(t,0,e.maxStringLength),e)+o}return D(b.call(b.call(t,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,z),"single",e)}function z(t){var e=t.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return r?"\\"+r:"\\x"+(e<16?"0":"")+O.call(e.toString(16))}function J(t){return"Object("+t+")"}function Q(t){return t+" { ? }"}function X(t,e,r,o){return t+" ("+e+") {"+(o?Y(r,o):w.call(r,", "))+"}"}function Y(t,e){if(0===t.length)return"";var r="\n"+e.prev+e.base;return r+w.call(t,","+r)+"\n"+e.prev}function Z(t,e){var r=U(t),o=[];if(r){o.length=t.length;for(var n=0;n<t.length;n++)o[n]=W(t,n)?e(t[n],t):""}var i,a="function"==typeof R?R(t):[];if(C){i={};for(var s=0;s<a.length;s++)i["$"+a[s]]=a[s]}for(var c in t)W(t,c)&&(r&&String(Number(c))===c&&c<t.length||C&&i["$"+c]instanceof Symbol||(E.call(/[^\w$]/,c)?o.push(e(c,t)+": "+e(t[c],t)):o.push(c+": "+e(t[c],t))));if("function"==typeof R)for(var u=0;u<a.length;u++)q.call(t,a[u])&&o.push("["+e(a[u])+"]: "+e(t[a[u]],t));return o}},5798:t=>{var e=String.prototype.replace,r=/%20/g,o="RFC3986";t.exports={default:o,formatters:{RFC1738:function(t){return e.call(t,r,"+")},RFC3986:function(t){return String(t)}},RFC1738:"RFC1738",RFC3986:o}},129:(t,e,r)=>{var o=r(8261),n=r(5235),i=r(5798);t.exports={formats:i,parse:n,stringify:o}},5235:(t,e,r)=>{var o=r(2769),n=Object.prototype.hasOwnProperty,i=Array.isArray,a={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:o.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},s=function(t){return t.replace(/&#(\d+);/g,(function(t,e){return String.fromCharCode(parseInt(e,10))}))},c=function(t,e){return t&&"string"==typeof t&&e.comma&&t.indexOf(",")>-1?t.split(","):t},u=function(t,e,r,o){if(t){var i=r.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,a=/(\[[^[\]]*])/g,s=r.depth>0&&/(\[[^[\]]*])/.exec(i),u=s?i.slice(0,s.index):i,p=[];if(u){if(!r.plainObjects&&n.call(Object.prototype,u)&&!r.allowPrototypes)return;p.push(u)}for(var l=0;r.depth>0&&null!==(s=a.exec(i))&&l<r.depth;){if(l+=1,!r.plainObjects&&n.call(Object.prototype,s[1].slice(1,-1))&&!r.allowPrototypes)return;p.push(s[1])}return s&&p.push("["+i.slice(s.index)+"]"),function(t,e,r,o){for(var n=o?e:c(e,r),i=t.length-1;i>=0;--i){var a,s=t[i];if("[]"===s&&r.parseArrays)a=[].concat(n);else{a=r.plainObjects?Object.create(null):{};var u="["===s.charAt(0)&&"]"===s.charAt(s.length-1)?s.slice(1,-1):s,p=parseInt(u,10);r.parseArrays||""!==u?!isNaN(p)&&s!==u&&String(p)===u&&p>=0&&r.parseArrays&&p<=r.arrayLimit?(a=[])[p]=n:"__proto__"!==u&&(a[u]=n):a={0:n}}n=a}return n}(p,e,r,o)}};t.exports=function(t,e){var r=function(t){if(!t)return a;if(null!==t.decoder&&void 0!==t.decoder&&"function"!=typeof t.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==t.charset&&"utf-8"!==t.charset&&"iso-8859-1"!==t.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var e=void 0===t.charset?a.charset:t.charset;return{allowDots:void 0===t.allowDots?a.allowDots:!!t.allowDots,allowPrototypes:"boolean"==typeof t.allowPrototypes?t.allowPrototypes:a.allowPrototypes,allowSparse:"boolean"==typeof t.allowSparse?t.allowSparse:a.allowSparse,arrayLimit:"number"==typeof t.arrayLimit?t.arrayLimit:a.arrayLimit,charset:e,charsetSentinel:"boolean"==typeof t.charsetSentinel?t.charsetSentinel:a.charsetSentinel,comma:"boolean"==typeof t.comma?t.comma:a.comma,decoder:"function"==typeof t.decoder?t.decoder:a.decoder,delimiter:"string"==typeof t.delimiter||o.isRegExp(t.delimiter)?t.delimiter:a.delimiter,depth:"number"==typeof t.depth||!1===t.depth?+t.depth:a.depth,ignoreQueryPrefix:!0===t.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof t.interpretNumericEntities?t.interpretNumericEntities:a.interpretNumericEntities,parameterLimit:"number"==typeof t.parameterLimit?t.parameterLimit:a.parameterLimit,parseArrays:!1!==t.parseArrays,plainObjects:"boolean"==typeof t.plainObjects?t.plainObjects:a.plainObjects,strictNullHandling:"boolean"==typeof t.strictNullHandling?t.strictNullHandling:a.strictNullHandling}}(e);if(""===t||null==t)return r.plainObjects?Object.create(null):{};for(var p="string"==typeof t?function(t,e){var r,u={},p=e.ignoreQueryPrefix?t.replace(/^\?/,""):t,l=e.parameterLimit===1/0?void 0:e.parameterLimit,f=p.split(e.delimiter,l),d=-1,h=e.charset;if(e.charsetSentinel)for(r=0;r<f.length;++r)0===f[r].indexOf("utf8=")&&("utf8=%E2%9C%93"===f[r]?h="utf-8":"utf8=%26%2310003%3B"===f[r]&&(h="iso-8859-1"),d=r,r=f.length);for(r=0;r<f.length;++r)if(r!==d){var y,m,v=f[r],g=v.indexOf("]="),b=-1===g?v.indexOf("="):g+1;-1===b?(y=e.decoder(v,a.decoder,h,"key"),m=e.strictNullHandling?null:""):(y=e.decoder(v.slice(0,b),a.decoder,h,"key"),m=o.maybeMap(c(v.slice(b+1),e),(function(t){return e.decoder(t,a.decoder,h,"value")}))),m&&e.interpretNumericEntities&&"iso-8859-1"===h&&(m=s(m)),v.indexOf("[]=")>-1&&(m=i(m)?[m]:m),n.call(u,y)?u[y]=o.combine(u[y],m):u[y]=m}return u}(t,r):t,l=r.plainObjects?Object.create(null):{},f=Object.keys(p),d=0;d<f.length;++d){var h=f[d],y=u(h,p[h],r,"string"==typeof t);l=o.merge(l,y,r)}return!0===r.allowSparse?l:o.compact(l)}},8261:(t,e,r)=>{var o=r(7478),n=r(2769),i=r(5798),a=Object.prototype.hasOwnProperty,s={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,e){return t+"["+e+"]"},repeat:function(t){return t}},c=Array.isArray,u=String.prototype.split,p=Array.prototype.push,l=function(t,e){p.apply(t,c(e)?e:[e])},f=Date.prototype.toISOString,d=i.default,h={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:n.encode,encodeValuesOnly:!1,format:d,formatter:i.formatters[d],indices:!1,serializeDate:function(t){return f.call(t)},skipNulls:!1,strictNullHandling:!1},y={},m=function t(e,r,i,a,s,p,f,d,m,v,g,b,O,S,E,_){for(var w,P=e,j=_,T=0,R=!1;void 0!==(j=j.get(y))&&!R;){var x=j.get(e);if(T+=1,void 0!==x){if(x===T)throw new RangeError("Cyclic object value");R=!0}void 0===j.get(y)&&(T=0)}if("function"==typeof d?P=d(r,P):P instanceof Date?P=g(P):"comma"===i&&c(P)&&(P=n.maybeMap(P,(function(t){return t instanceof Date?g(t):t}))),null===P){if(s)return f&&!S?f(r,h.encoder,E,"key",b):r;P=""}if("string"==typeof(w=P)||"number"==typeof w||"boolean"==typeof w||"symbol"==typeof w||"bigint"==typeof w||n.isBuffer(P)){if(f){var C=S?r:f(r,h.encoder,E,"key",b);if("comma"===i&&S){for(var A=u.call(String(P),","),q="",k=0;k<A.length;++k)q+=(0===k?"":",")+O(f(A[k],h.encoder,E,"value",b));return[O(C)+(a&&c(P)&&1===A.length?"[]":"")+"="+q]}return[O(C)+"="+O(f(P,h.encoder,E,"value",b))]}return[O(r)+"="+O(String(P))]}var I,M=[];if(void 0===P)return M;if("comma"===i&&c(P))I=[{value:P.length>0?P.join(",")||null:void 0}];else if(c(d))I=d;else{var N=Object.keys(P);I=m?N.sort(m):N}for(var B=a&&c(P)&&1===P.length?r+"[]":r,D=0;D<I.length;++D){var G=I[D],U="object"==typeof G&&void 0!==G.value?G.value:P[G];if(!p||null!==U){var F=c(P)?"function"==typeof i?i(B,G):B:B+(v?"."+G:"["+G+"]");_.set(e,T);var L=o();L.set(y,_),l(M,t(U,F,i,a,s,p,f,d,m,v,g,b,O,S,E,L))}}return M};t.exports=function(t,e){var r,n=t,u=function(t){if(!t)return h;if(null!==t.encoder&&void 0!==t.encoder&&"function"!=typeof t.encoder)throw new TypeError("Encoder has to be a function.");var e=t.charset||h.charset;if(void 0!==t.charset&&"utf-8"!==t.charset&&"iso-8859-1"!==t.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=i.default;if(void 0!==t.format){if(!a.call(i.formatters,t.format))throw new TypeError("Unknown format option provided.");r=t.format}var o=i.formatters[r],n=h.filter;return("function"==typeof t.filter||c(t.filter))&&(n=t.filter),{addQueryPrefix:"boolean"==typeof t.addQueryPrefix?t.addQueryPrefix:h.addQueryPrefix,allowDots:void 0===t.allowDots?h.allowDots:!!t.allowDots,charset:e,charsetSentinel:"boolean"==typeof t.charsetSentinel?t.charsetSentinel:h.charsetSentinel,delimiter:void 0===t.delimiter?h.delimiter:t.delimiter,encode:"boolean"==typeof t.encode?t.encode:h.encode,encoder:"function"==typeof t.encoder?t.encoder:h.encoder,encodeValuesOnly:"boolean"==typeof t.encodeValuesOnly?t.encodeValuesOnly:h.encodeValuesOnly,filter:n,format:r,formatter:o,serializeDate:"function"==typeof t.serializeDate?t.serializeDate:h.serializeDate,skipNulls:"boolean"==typeof t.skipNulls?t.skipNulls:h.skipNulls,sort:"function"==typeof t.sort?t.sort:null,strictNullHandling:"boolean"==typeof t.strictNullHandling?t.strictNullHandling:h.strictNullHandling}}(e);"function"==typeof u.filter?n=(0,u.filter)("",n):c(u.filter)&&(r=u.filter);var p,f=[];if("object"!=typeof n||null===n)return"";p=e&&e.arrayFormat in s?e.arrayFormat:e&&"indices"in e?e.indices?"indices":"repeat":"indices";var d=s[p];if(e&&"commaRoundTrip"in e&&"boolean"!=typeof e.commaRoundTrip)throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var y="comma"===d&&e&&e.commaRoundTrip;r||(r=Object.keys(n)),u.sort&&r.sort(u.sort);for(var v=o(),g=0;g<r.length;++g){var b=r[g];u.skipNulls&&null===n[b]||l(f,m(n[b],b,d,y,u.strictNullHandling,u.skipNulls,u.encode?u.encoder:null,u.filter,u.sort,u.allowDots,u.serializeDate,u.format,u.formatter,u.encodeValuesOnly,u.charset,v))}var O=f.join(u.delimiter),S=!0===u.addQueryPrefix?"?":"";return u.charsetSentinel&&("iso-8859-1"===u.charset?S+="utf8=%26%2310003%3B&":S+="utf8=%E2%9C%93&"),O.length>0?S+O:""}},2769:(t,e,r)=>{var o=r(5798),n=Object.prototype.hasOwnProperty,i=Array.isArray,a=function(){for(var t=[],e=0;e<256;++e)t.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return t}(),s=function(t,e){for(var r=e&&e.plainObjects?Object.create(null):{},o=0;o<t.length;++o)void 0!==t[o]&&(r[o]=t[o]);return r};t.exports={arrayToObject:s,assign:function(t,e){return Object.keys(e).reduce((function(t,r){return t[r]=e[r],t}),t)},combine:function(t,e){return[].concat(t,e)},compact:function(t){for(var e=[{obj:{o:t},prop:"o"}],r=[],o=0;o<e.length;++o)for(var n=e[o],a=n.obj[n.prop],s=Object.keys(a),c=0;c<s.length;++c){var u=s[c],p=a[u];"object"==typeof p&&null!==p&&-1===r.indexOf(p)&&(e.push({obj:a,prop:u}),r.push(p))}return function(t){for(;t.length>1;){var e=t.pop(),r=e.obj[e.prop];if(i(r)){for(var o=[],n=0;n<r.length;++n)void 0!==r[n]&&o.push(r[n]);e.obj[e.prop]=o}}}(e),t},decode:function(t,e,r){var o=t.replace(/\+/g," ");if("iso-8859-1"===r)return o.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(o)}catch(t){return o}},encode:function(t,e,r,n,i){if(0===t.length)return t;var s=t;if("symbol"==typeof t?s=Symbol.prototype.toString.call(t):"string"!=typeof t&&(s=String(t)),"iso-8859-1"===r)return escape(s).replace(/%u[0-9a-f]{4}/gi,(function(t){return"%26%23"+parseInt(t.slice(2),16)+"%3B"}));for(var c="",u=0;u<s.length;++u){var p=s.charCodeAt(u);45===p||46===p||95===p||126===p||p>=48&&p<=57||p>=65&&p<=90||p>=97&&p<=122||i===o.RFC1738&&(40===p||41===p)?c+=s.charAt(u):p<128?c+=a[p]:p<2048?c+=a[192|p>>6]+a[128|63&p]:p<55296||p>=57344?c+=a[224|p>>12]+a[128|p>>6&63]+a[128|63&p]:(u+=1,p=65536+((1023&p)<<10|1023&s.charCodeAt(u)),c+=a[240|p>>18]+a[128|p>>12&63]+a[128|p>>6&63]+a[128|63&p])}return c},isBuffer:function(t){return!(!t||"object"!=typeof t||!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t)))},isRegExp:function(t){return"[object RegExp]"===Object.prototype.toString.call(t)},maybeMap:function(t,e){if(i(t)){for(var r=[],o=0;o<t.length;o+=1)r.push(e(t[o]));return r}return e(t)},merge:function t(e,r,o){if(!r)return e;if("object"!=typeof r){if(i(e))e.push(r);else{if(!e||"object"!=typeof e)return[e,r];(o&&(o.plainObjects||o.allowPrototypes)||!n.call(Object.prototype,r))&&(e[r]=!0)}return e}if(!e||"object"!=typeof e)return[e].concat(r);var a=e;return i(e)&&!i(r)&&(a=s(e,o)),i(e)&&i(r)?(r.forEach((function(r,i){if(n.call(e,i)){var a=e[i];a&&"object"==typeof a&&r&&"object"==typeof r?e[i]=t(a,r,o):e.push(r)}else e[i]=r})),e):Object.keys(r).reduce((function(e,i){var a=r[i];return n.call(e,i)?e[i]=t(e[i],a,o):e[i]=a,e}),a)}}},7478:(t,e,r)=>{var o=r(210),n=r(1924),i=r(631),a=o("%TypeError%"),s=o("%WeakMap%",!0),c=o("%Map%",!0),u=n("WeakMap.prototype.get",!0),p=n("WeakMap.prototype.set",!0),l=n("WeakMap.prototype.has",!0),f=n("Map.prototype.get",!0),d=n("Map.prototype.set",!0),h=n("Map.prototype.has",!0),y=function(t,e){for(var r,o=t;null!==(r=o.next);o=r)if(r.key===e)return o.next=r.next,r.next=t.next,t.next=r,r};t.exports=function(){var t,e,r,o={assert:function(t){if(!o.has(t))throw new a("Side channel does not contain "+i(t))},get:function(o){if(s&&o&&("object"==typeof o||"function"==typeof o)){if(t)return u(t,o)}else if(c){if(e)return f(e,o)}else if(r)return function(t,e){var r=y(t,e);return r&&r.value}(r,o)},has:function(o){if(s&&o&&("object"==typeof o||"function"==typeof o)){if(t)return l(t,o)}else if(c){if(e)return h(e,o)}else if(r)return function(t,e){return!!y(t,e)}(r,o);return!1},set:function(o,n){s&&o&&("object"==typeof o||"function"==typeof o)?(t||(t=new s),p(t,o,n)):c?(e||(e=new c),d(e,o,n)):(r||(r={key:{},next:null}),function(t,e,r){var o=y(t,e);o?o.value=r:t.next={key:e,next:t.next,value:r}}(r,o,n))}};return o}},3692:t=>{function e(t){return Object.prototype.toString.call(t)}var r=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function o(t,e){if(t.forEach)return t.forEach(e);for(var r=0;r<t.length;r++)e(t[r],r,t)}var n=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e},i=Object.prototype.hasOwnProperty||function(t,e){return e in t};function a(t){if("object"==typeof t&&null!==t){var i;if(r(t))i=[];else if("[object Date]"===e(t))i=new Date(t.getTime?t.getTime():t);else if("[object RegExp]"===e(t))i=new RegExp(t);else if(function(t){return"[object Error]"===e(t)}(t))i={message:t.message};else if(function(t){return"[object Boolean]"===e(t)}(t)||function(t){return"[object Number]"===e(t)}(t)||function(t){return"[object String]"===e(t)}(t))i=Object(t);else if(Object.create&&Object.getPrototypeOf)i=Object.create(Object.getPrototypeOf(t));else if(t.constructor===Object)i={};else{var a=t.constructor&&t.constructor.prototype||t.__proto__||{},s=function(){};s.prototype=a,i=new s}return o(n(t),(function(e){i[e]=t[e]})),i}return t}function s(t,e,s){var c=[],u=[],p=!0;return function t(l){var f=s?a(l):l,d={},h=!0,y={node:f,node_:l,path:[].concat(c),parent:u[u.length-1],parents:u,key:c[c.length-1],isRoot:0===c.length,level:c.length,circular:null,update:function(t,e){y.isRoot||(y.parent.node[y.key]=t),y.node=t,e&&(h=!1)},delete:function(t){delete y.parent.node[y.key],t&&(h=!1)},remove:function(t){r(y.parent.node)?y.parent.node.splice(y.key,1):delete y.parent.node[y.key],t&&(h=!1)},keys:null,before:function(t){d.before=t},after:function(t){d.after=t},pre:function(t){d.pre=t},post:function(t){d.post=t},stop:function(){p=!1},block:function(){h=!1}};if(!p)return y;function m(){if("object"==typeof y.node&&null!==y.node){y.keys&&y.node_===y.node||(y.keys=n(y.node)),y.isLeaf=0===y.keys.length;for(var t=0;t<u.length;t++)if(u[t].node_===l){y.circular=u[t];break}}else y.isLeaf=!0,y.keys=null;y.notLeaf=!y.isLeaf,y.notRoot=!y.isRoot}m();var v=e.call(y,y.node);return void 0!==v&&y.update&&y.update(v),d.before&&d.before.call(y,y.node),h?("object"!=typeof y.node||null===y.node||y.circular||(u.push(y),m(),o(y.keys,(function(e,r){c.push(e),d.pre&&d.pre.call(y,y.node[e],e);var o=t(y.node[e]);s&&i.call(y.node,e)&&(y.node[e]=o.node),o.isLast=r===y.keys.length-1,o.isFirst=0===r,d.post&&d.post.call(y,o),c.pop()})),u.pop()),d.after&&d.after.call(y,y.node),y):y}(t).node}function c(t){this.value=t}function u(t){return new c(t)}c.prototype.get=function(t){for(var e=this.value,r=0;r<t.length;r++){var o=t[r];if(!e||!i.call(e,o))return;e=e[o]}return e},c.prototype.has=function(t){for(var e=this.value,r=0;r<t.length;r++){var o=t[r];if(!e||!i.call(e,o))return!1;e=e[o]}return!0},c.prototype.set=function(t,e){for(var r=this.value,o=0;o<t.length-1;o++){var n=t[o];i.call(r,n)||(r[n]={}),r=r[n]}return r[t[o]]=e,e},c.prototype.map=function(t){return s(this.value,t,!0)},c.prototype.forEach=function(t){return this.value=s(this.value,t,!1),this.value},c.prototype.reduce=function(t,e){var r=1===arguments.length,o=r?this.value:e;return this.forEach((function(e){this.isRoot&&r||(o=t.call(this,o,e))})),o},c.prototype.paths=function(){var t=[];return this.forEach((function(){t.push(this.path)})),t},c.prototype.nodes=function(){var t=[];return this.forEach((function(){t.push(this.node)})),t},c.prototype.clone=function(){var t=[],e=[];return function r(i){for(var s=0;s<t.length;s++)if(t[s]===i)return e[s];if("object"==typeof i&&null!==i){var c=a(i);return t.push(i),e.push(c),o(n(i),(function(t){c[t]=r(i[t])})),t.pop(),e.pop(),c}return i}(this.value)},o(n(c.prototype),(function(t){u[t]=function(e){var r=[].slice.call(arguments,1),o=new c(e);return o[t].apply(o,r)}})),t.exports=u},4654:()=>{}},e={};function r(o){var n=e[o];if(void 0!==n)return n.exports;var i=e[o]={id:o,loaded:!1,exports:{}};return t[o].call(i.exports,i,i.exports,r),i.loaded=!0,i.exports}r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.nmd=t=>(t.paths=[],t.children||(t.children=[]),t);var o=r(2915),n=exports;for(var i in o)n[i]=o[i];o.__esModule&&Object.defineProperty(n,"__esModule",{value:!0});
|
|
1
|
+
var t={9818:function(t,e,o){var r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,o=1,r=arguments.length;o<r;o++)for(var n in e=arguments[o])Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t},r.apply(this,arguments)},n=this&&this.__awaiter||function(t,e,o,r){return new(o||(o=Promise))((function(n,s){function i(t){try{c(r.next(t))}catch(t){s(t)}}function a(t){try{c(r.throw(t))}catch(t){s(t)}}function c(t){var e;t.done?n(t.value):(e=t.value,e instanceof o?e:new o((function(t){t(e)}))).then(i,a)}c((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var o,r,n,s,i={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(c){return function(a){if(o)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(i=0)),i;)try{if(o=1,r&&(n=2&a[0]?r.return:a[0]?r.throw||((n=r.return)&&n.call(r),0):r.next)&&!(n=n.call(r,a[1])).done)return n;switch(r=0,n&&(a=[2&a[0],n.value]),a[0]){case 0:case 1:n=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,r=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!((n=(n=i.trys).length>0&&n[n.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!n||a[1]>n[0]&&a[1]<n[3])){i.label=a[1];break}if(6===a[0]&&i.label<n[1]){i.label=n[1],n=a;break}if(n&&i.label<n[2]){i.label=n[2],i.ops.push(a);break}n[2]&&i.ops.pop(),i.trys.pop();continue}a=e.call(t,i)}catch(t){a=[6,t],r=0}finally{o=n=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.CommercetoolsApi=void 0;var i=o(2915),a=o(3028),c=o(7111),u=o(7034),p=function(){function t(e){t.validateConfig(e),this.config=e,this.auth=new i.CommercetoolsAuth(e),this.endpoints=c.REGION_URLS[this.config.region],this.requestExecutor=(0,u.getRequestExecutor)({timeoutMs:e.timeoutMs,httpsAgent:e.httpsAgent,systemIdentifier:e.systemIdentifier,onBeforeRequest:e.onBeforeRequest,onAfterResponse:e.onAfterResponse,retry:e.retry})}return t.prototype.getStoreById=function(t){return this.request(r(r({},this.extractCommonRequestOptions(t)),{path:"/stores/".concat(t.id),method:"GET"}))},t.prototype.getStoreByKey=function(t){return this.request(r(r({},this.extractCommonRequestOptions(t)),{path:"/stores/key=".concat(t.key),method:"GET"}))},t.prototype.queryStores=function(t){return this.request(r(r({},this.extractCommonRequestOptions(t)),{path:"/stores",method:"GET"}))},t.prototype.createStore=function(t){return this.request({path:"/stores",method:"POST",data:t.data})},t.prototype.updateStoreById=function(t){return this.request(r(r({},this.extractCommonRequestOptions(t)),{path:"/stores/".concat(t.id),method:"POST",data:t.data}))},t.prototype.updateStoreByKey=function(t){return this.request({path:"/stores/key=".concat(t.key),method:"POST",data:t.data})},t.prototype.deleteStoreById=function(t){return this.request(r(r({},this.extractCommonRequestOptions(t)),{path:"/stores/".concat(t.id),method:"DELETE",params:r(r({},t.params),{version:t.version})}))},t.prototype.deleteStoreByKey=function(t){return this.request(r(r({},this.extractCommonRequestOptions(t)),{path:"/stores/key=".concat(t.key),method:"DELETE",params:r(r({},t.params),{version:t.version})}))},t.prototype.getCategoryById=function(t){return this.request(r(r({},this.extractCommonRequestOptions(t)),{path:"/categories/".concat(t.id),method:"GET"}))},t.prototype.getCategoryByKey=function(t){return this.request(r(r({},this.extractCommonRequestOptions(t)),{path:"/categories/key=".concat(t.key),method:"GET"}))},t.prototype.queryChannels=function(t){return this.request(r(r({},this.extractCommonRequestOptions(t)),{path:"/channels",method:"GET"}))},t.prototype.importOrder=function(t){return n(this,void 0,void 0,(function(){return s(this,(function(e){return[2,this.request(r(r({},this.extractCommonRequestOptions(t)),{path:"/orders/import",method:"POST",data:t.data}))]}))}))},t.prototype.getChannelById=function(t){return this.request(r(r({},this.extractCommonRequestOptions(t)),{path:"/channels/".concat(t.id),method:"GET"}))},t.prototype.getChannelByKey=function(t){return n(this,void 0,void 0,(function(){var e;return s(this,(function(o){switch(o.label){case 0:return[4,this.request(r(r({},this.extractCommonRequestOptions(t)),{path:"/channels",method:"GET",params:{where:'key="'.concat(t.key,'"'),limit:1}}))];case 1:if(!(null==(e=o.sent())?void 0:e.count))throw new a.CommercetoolsError("No channel found with key [".concat(t.key,"]"),null,404);return[2,e.results[0]]}}))}))},t.prototype.getCategory=function(t){if(!t.id&&!t.key)throw new a.CommercetoolsError("Either an id, key or slug must be provided");return t.id?this.request(r(r({},this.extractCommonRequestOptions(t)),{path:"/categories/".concat(t.id),method:"GET"})):this.request(r(r({},this.extractCommonRequestOptions(t)),{path:"/categories/key=".concat(t.key),method:"GET"}))},t.prototype.getCategoryBySlug=function(t){return n(this,void 0,void 0,(function(){var e,o;return s(this,(function(n){switch(n.label){case 0:if(!t.languageCode&&!t.languageCodes)throw new a.CommercetoolsError("Either the `languageCode` or `languageCodes` property must be provided");return e=[],t.languageCodes?e.push.apply(e,t.languageCodes):t.languageCode&&e.push(t.languageCode),[4,this.request(r(r({},this.extractCommonRequestOptions(r(r({},t),{params:r(r({},null==t?void 0:t.params),{where:"slug(".concat(e.map((function(e){return"".concat(e,'="').concat(t.slug,'"')})).join(" or "),")")})}))),{path:"/categories",method:"GET"}))];case 1:if(!(o=n.sent()).count)throw new a.CommercetoolsError("No category found with slug [".concat(t.slug,"] and language code [").concat(t.languageCode,"]"),{options:t},404);return[2,o.results[0]]}}))}))},t.prototype.queryCategories=function(t){return this.request(r(r({},this.extractCommonRequestOptions(t)),{path:"/categories",method:"GET"}))},t.prototype.getCategoryParents=function(t){return n(this,void 0,void 0,(function(){var e,o;return s(this,(function(n){switch(n.label){case 0:return[4,this.getCategory(r(r({},t),{params:r(r({},t.params),{expand:"ancestors[*]"})}))];case 1:return e=n.sent(),(o=e.ancestors.map((function(t){return t.obj}))).push(r(r({},e),{ancestors:e.ancestors.map((function(t){return{id:t.id,typeId:t.typeId}}))})),[2,o]}}))}))},t.prototype.getProductById=function(t){return this.request(r(r({},this.extractCommonRequestOptions(t)),{path:"/products/".concat(t.id),method:"GET"}))},t.prototype.getProductByKey=function(t){return this.request(r(r({},this.extractCommonRequestOptions(t)),{path:"/products/key=".concat(t.key),method:"GET"}))},t.prototype.getProductProjectionById=function(t){return this.request(r(r({},this.extractCommonRequestOptions(t)),{path:this.applyStore("/product-projections/".concat(t.id),t.storeKey),method:"GET"}))},t.prototype.getProductProjectionByKey=function(t){return this.request(r(r({},this.extractCommonRequestOptions(t)),{path:this.applyStore("/product-projections/key=".concat(t.key),t.storeKey),method:"GET"}))},t.prototype.getProductProjectionBySlug=function(t){return n(this,void 0,void 0,(function(){var e,o;return s(this,(function(n){switch(n.label){case 0:if(!t.languageCode&&!t.languageCodes)throw new a.CommercetoolsError("Either the `languageCode` or `languageCodes` property must be provided");return e=[],t.languageCodes?e.push.apply(e,t.languageCodes):t.languageCode&&e.push(t.languageCode),[4,this.request(r(r({},this.extractCommonRequestOptions(r(r({},t),{params:r(r({},null==t?void 0:t.params),{where:"slug(".concat(e.map((function(e){return"".concat(e,'="').concat(t.slug,'"')})).join(" or "),")")})}))),{path:"/product-projections",method:"GET"}))];case 1:if(!(o=n.sent()).count)throw new a.CommercetoolsError("No product projection found with slug [".concat(t.slug,"] and language code [").concat(t.languageCode,"]"),{options:t},404);return[2,o.results[0]]}}))}))},t.prototype.queryProductProjections=function(t){return this.request(r(r({},this.extractCommonRequestOptions(t)),{path:"/product-projections",method:"GET"}))},t.prototype.searchProductProjections=function(t){return this.request(r(r({},this.extractCommonRequestOptions(t)),{path:"/product-projections/search",method:"GET"}))},t.prototype.getProductSelectionById=function(t){return this.request(r(r({},this.extractCommonRequestOptions(t)),{path:this.applyStore("/product-selections/".concat(t.id),t.storeKey),method:"GET"}))},t.prototype.getProductSelectionByKey=function(t){return this.request(r(r({},this.extractCommonRequestOptions(t)),{path:this.applyStore("/product-selections/key=".concat(t.key),t.storeKey),method:"GET"}))},t.prototype.queryProductSelections=function(t){return this.request(r(r({},this.extractCommonRequestOptions(t)),{path:"/product-selections",method:"GET"}))},t.prototype.createProductSelection=function(t){return this.request(r(r({},this.extractCommonRequestOptions(t)),{path:"/product-selections",method:"POST",data:t.data}))},t.prototype.updateProductSelectionByKey=function(t){return this.request(r(r({},this.extractCommonRequestOptions(t)),{path:"/product-selections/key=".concat(t.key),method:"POST",data:{version:t.version,actions:t.actions}}))},t.prototype.deleteProductSelectionByKey=function(t){return this.request(r(r({},this.extractCommonRequestOptions(t)),{path:"/product-selections/key=".concat(t.key,"&version=").concat(t.version),method:"DELETE"}))},t.prototype.queryProductsInStore=function(t){return this.request(r(r({},this.extractCommonRequestOptions(t)),{path:"/in-store/key=".concat(t.storeKey,"/product-selection-assignments"),method:"GET"}))},t.prototype.getCartById=function(t){return this.request(r(r({},this.extractCommonRequestOptions(t)),{path:this.applyStore("/carts/".concat(t.id),t.storeKey),method:"GET"}))},t.prototype.queryCarts=function(t){return n(this,void 0,void 0,(function(){return s(this,(function(e){return[2,this.request(r(r({},this.extractCommonRequestOptions(t)),{path:this.applyStore("/carts",null==t?void 0:t.storeKey),method:"GET"}))]}))}))},t.prototype.queryMyCarts=function(t){return n(this,void 0,void 0,(function(){return s(this,(function(e){return[2,this.request(r(r({},this.extractCommonRequestOptions(t)),{path:this.applyStore("/me/carts",t.storeKey),method:"GET",accessToken:t.accessToken}))]}))}))},t.prototype.createCart=function(t){return n(this,void 0,void 0,(function(){return s(this,(function(e){return[2,this.request(r(r({},this.extractCommonRequestOptions(t)),{path:this.applyStore("/carts",t.storeKey),method:"POST",data:t.data}))]}))}))},t.prototype.updateCartById=function(t){return n(this,void 0,void 0,(function(){return s(this,(function(e){return[2,this.request(r(r({},this.extractCommonRequestOptions(t)),{path:this.applyStore("/carts/".concat(t.id),t.storeKey),method:"POST",data:{version:t.version,actions:t.actions}}))]}))}))},t.prototype.getMyActiveCart=function(t){return n(this,void 0,void 0,(function(){return s(this,(function(e){return[2,this.request(r(r({},this.extractCommonRequestOptions(t)),{path:this.applyStore("/me/active-cart",t.storeKey),method:"GET",accessToken:t.accessToken}))]}))}))},t.prototype.getMyCartById=function(t){return n(this,void 0,void 0,(function(){return s(this,(function(e){return[2,this.request(r(r({},this.extractCommonRequestOptions(t)),{path:this.applyStore("/me/carts/".concat(t.cartId),t.storeKey),method:"GET",accessToken:t.accessToken}))]}))}))},t.prototype.createMyCart=function(t){return n(this,void 0,void 0,(function(){return s(this,(function(e){return[2,this.request(r(r({},this.extractCommonRequestOptions(t)),{path:this.applyStore("/me/carts",t.storeKey),method:"POST",data:t.data,accessToken:t.accessToken}))]}))}))},t.prototype.deleteMyActiveCart=function(t){return n(this,void 0,void 0,(function(){var e;return s(this,(function(o){switch(o.label){case 0:return[4,this.getMyActiveCart(t)];case 1:return e=o.sent(),[4,this.request(r(r({},this.extractCommonRequestOptions(t)),{path:this.applyStore("/me/carts/".concat(e.id),t.storeKey),method:"DELETE",params:r(r({},t.params),{version:e.version}),accessToken:t.accessToken}))];case 2:return[2,o.sent()]}}))}))},t.prototype.deleteMyCartById=function(t){return n(this,void 0,void 0,(function(){var e;return s(this,(function(o){switch(o.label){case 0:return[4,this.getMyCartById(t)];case 1:return e=o.sent(),[4,this.request(r(r({},this.extractCommonRequestOptions(t)),{path:this.applyStore("/me/carts/".concat(t.cartId),t.storeKey),method:"DELETE",params:r(r({},t.params),{version:e.version}),accessToken:t.accessToken}))];case 2:return[2,o.sent()]}}))}))},t.prototype.updateMyActiveCart=function(t){return n(this,void 0,void 0,(function(){var e;return s(this,(function(o){switch(o.label){case 0:return[4,this.getMyActiveCart(t)];case 1:return e=o.sent(),[2,this.request(r(r({},this.extractCommonRequestOptions(t)),{path:this.applyStore("/me/carts/".concat(e.id),t.storeKey),method:"POST",data:{version:e.version,actions:t.actions},accessToken:t.accessToken}))]}}))}))},t.prototype.createMyOrderFromActiveCart=function(t){return n(this,void 0,void 0,(function(){var e;return s(this,(function(o){switch(o.label){case 0:return[4,this.getMyActiveCart(t)];case 1:return e=o.sent(),[2,this.request(r(r({},this.extractCommonRequestOptions(t)),{path:this.applyStore("/me/orders",t.storeKey),method:"POST",data:{version:e.version,id:e.id},accessToken:t.accessToken}))]}}))}))},t.prototype.createOrderFromCart=function(t){return n(this,void 0,void 0,(function(){var e;return s(this,(function(o){switch(o.label){case 0:return[4,this.getCartById(t)];case 1:return e=o.sent(),[2,this.request(r(r({},this.extractCommonRequestOptions(t)),{path:this.applyStore("/orders",t.storeKey),method:"POST",data:{version:e.version,id:e.id}}))]}}))}))},t.prototype.deleteCartById=function(t){return n(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.request(r(r({},this.extractCommonRequestOptions(t)),{path:this.applyStore("/carts/".concat(t.id),t.storeKey),method:"DELETE",params:r(r({},t.params),{version:t.version})}))];case 1:return[2,e.sent()]}}))}))},t.prototype.createPayment=function(t){return this.request(r(r({},this.extractCommonRequestOptions(t)),{path:"/payments",method:"POST",data:t.data}))},t.prototype.deletePaymentById=function(t){return this.request(r(r({},this.extractCommonRequestOptions(t)),{path:"/payments/".concat(t.id),method:"DELETE",params:r(r({},t.params),{version:t.version})}))},t.prototype.updatePaymentById=function(t){return this.request(r(r({},this.extractCommonRequestOptions(t)),{path:"/payments/".concat(t.id),method:"POST",data:t.data}))},t.prototype.getPaymentById=function(t){return this.request(r(r({},this.extractCommonRequestOptions(t)),{path:"/payments/".concat(t.id),method:"GET"}))},t.prototype.queryPayments=function(t){return this.request(r(r({},this.extractCommonRequestOptions(t)),{path:"/payments",method:"GET"}))},t.prototype.createMyPayment=function(t){return this.request(r(r({},this.extractCommonRequestOptions(t)),{path:"/me/payments",method:"POST",data:t.data,accessToken:t.accessToken}))},t.prototype.updateMyPaymentById=function(t){return this.request(r(r({},this.extractCommonRequestOptions(t)),{path:"/me/payments/".concat(t.id),method:"POST",data:t.data,accessToken:t.accessToken}))},t.prototype.getMyPaymentById=function(t){return this.request(r(r({},this.extractCommonRequestOptions(t)),{path:"/me/payments/".concat(t.id),method:"GET",accessToken:t.accessToken}))},t.prototype.queryMyPayments=function(t){return this.request(r(r({},this.extractCommonRequestOptions(t)),{path:"/me/payments",method:"GET",accessToken:t.accessToken}))},t.prototype.deleteMyPaymentById=function(t){return this.request(r(r({},this.extractCommonRequestOptions(t)),{path:"/me/payments/".concat(t.id),method:"DELETE",params:{version:t.version},accessToken:t.accessToken}))},t.prototype.getMyOrderById=function(t){return this.request(r(r({},this.extractCommonRequestOptions(t)),{path:this.applyStore("/me/orders/".concat(t.id),t.storeKey),method:"GET",accessToken:t.accessToken}))},t.prototype.queryMyOrders=function(t){return this.request(r(r({},this.extractCommonRequestOptions(t)),{path:this.applyStore("/me/orders",t.storeKey),method:"GET",accessToken:t.accessToken}))},t.prototype.updateOrderById=function(t){return this.request(r(r({},this.extractCommonRequestOptions(t)),{path:this.applyStore("/orders/".concat(t.id),t.storeKey),method:"POST",data:t.data}))},t.prototype.updateOrderByOrderNumber=function(t){return this.request(r(r({},this.extractCommonRequestOptions(t)),{path:this.applyStore("/orders/order-number=".concat(t.orderNumber),t.storeKey),method:"POST",data:t.data}))},t.prototype.getOrderById=function(t){return this.request(r(r({},this.extractCommonRequestOptions(t)),{path:this.applyStore("/orders/".concat(t.id),t.storeKey),method:"GET"}))},t.prototype.getOrderByOrderNumber=function(t){return this.request(r(r({},this.extractCommonRequestOptions(t)),{path:this.applyStore("/orders/order-number=".concat(t.orderNumber),t.storeKey),method:"GET"}))},t.prototype.deleteOrderById=function(t){return this.request(r(r({},this.extractCommonRequestOptions(t)),{path:this.applyStore("/orders/".concat(t.id),t.storeKey),method:"DELETE",params:r(r({},t.params),{version:t.version,dataErasure:t.dataErasure})}))},t.prototype.deleteOrderByOrderNumber=function(t){return this.request(r(r({},this.extractCommonRequestOptions(t)),{path:this.applyStore("/orders/order-number=".concat(t.orderNo),t.storeKey),method:"DELETE",params:r(r({},t.params),{version:t.version,dataErasure:t.dataErasure})}))},t.prototype.queryOrders=function(t){return this.request(r(r({},this.extractCommonRequestOptions(t)),{path:this.applyStore("/orders",t.storeKey),method:"GET"}))},t.prototype.createProduct=function(t){return this.request(r(r({},this.extractCommonRequestOptions(t)),{path:"/products",method:"POST",data:t.data}))},t.prototype.updateProductByKey=function(t){return this.request(r(r({},this.extractCommonRequestOptions(t)),{path:"/products/key=".concat(t.key),method:"POST",data:t.data}))},t.prototype.updateProductById=function(t){return this.request(r(r({},this.extractCommonRequestOptions(t)),{path:"/products/".concat(t.id),method:"POST",data:t.data}))},t.prototype.deleteProductById=function(t){return n(this,void 0,void 0,(function(){var e,o;return s(this,(function(n){switch(n.label){case 0:return e=t.version,t.unpublish?[4,this.unpublishProductById({id:t.id,version:t.version})]:[3,2];case 1:o=n.sent(),e=o.version,n.label=2;case 2:return[2,this.request(r(r({},this.extractCommonRequestOptions(t)),{path:"/products/".concat(t.id),method:"DELETE",params:r(r({},t.params),{version:e})}))]}}))}))},t.prototype.deleteProductByKey=function(t){return n(this,void 0,void 0,(function(){var e,o;return s(this,(function(n){switch(n.label){case 0:return e=t.version,t.unpublish?[4,this.unpublishProductByKey({key:t.key,version:t.version})]:[3,2];case 1:o=n.sent(),e=o.version,n.label=2;case 2:return[2,this.request(r(r({},this.extractCommonRequestOptions(t)),{path:"/products/key=".concat(t.key),method:"DELETE",params:r(r({},t.params),{version:e})}))]}}))}))},t.prototype.unpublishProductByKey=function(t){return this.request(r(r({},this.extractCommonRequestOptions(t)),{path:"/products/key=".concat(t.key),method:"POST",params:t.params,data:{version:t.version,actions:[{action:"unpublish"}]}}))},t.prototype.unpublishProductById=function(t){return this.request(r(r({},this.extractCommonRequestOptions(t)),{path:"/products/".concat(t.id),method:"POST",params:t.params,data:{version:t.version,actions:[{action:"unpublish"}]}}))},t.prototype.createCategory=function(t){return this.request({path:"/categories",method:"POST",data:t.data})},t.prototype.updateCategoryByKey=function(t){return this.request({path:"/categories/key=".concat(t.key),method:"POST",data:t.data})},t.prototype.updateCategoryById=function(t){return this.request(r(r({},this.extractCommonRequestOptions(t)),{path:"/categories/".concat(t.id),method:"POST",data:t.data}))},t.prototype.deleteCategoryById=function(t){return this.request(r(r({},this.extractCommonRequestOptions(t)),{path:"/categories/".concat(t.id),method:"DELETE",params:r(r({},t.params),{version:t.version})}))},t.prototype.deleteCategoryByKey=function(t){return this.request(r(r({},this.extractCommonRequestOptions(t)),{path:"/categories/key=".concat(t.key),method:"DELETE",params:r(r({},t.params),{version:t.version})}))},t.prototype.createAccount=function(t){return this.request(r(r({},this.extractCommonRequestOptions(t)),{path:this.applyStore("/customers",t.storeKey),method:"POST",data:t.data}))},t.prototype.deleteCustomerById=function(t){return this.request(r(r({},this.extractCommonRequestOptions(t)),{path:this.applyStore("/customers/".concat(t.id),t.storeKey),method:"DELETE",params:r(r({},t.params),{version:t.version,dataErasure:t.dataErasure})}))},t.prototype.deleteCustomerByKey=function(t){return this.request(r(r({},this.extractCommonRequestOptions(t)),{path:this.applyStore("/customers/key=".concat(t.key),t.storeKey),method:"DELETE",params:r(r({},t.params),{version:t.version,dataErasure:t.dataErasure})}))},t.prototype.createMyAccount=function(t){return this.request(r(r({},this.extractCommonRequestOptions(t)),{path:this.applyStore("/me/signup",t.storeKey),method:"POST",data:t.data,accessToken:t.accessToken}))},t.prototype.loginMyAccount=function(t){return this.request(r(r({},this.extractCommonRequestOptions(t)),{path:this.applyStore("/me/login",t.storeKey),method:"POST",data:t.data,accessToken:t.accessToken}))},t.prototype.login=function(t){return this.request(r(r({},this.extractCommonRequestOptions(t)),{path:this.applyStore("/login",t.storeKey),method:"POST",data:t.data}))},t.prototype.getMyAccount=function(t){return this.request(r(r({},this.extractCommonRequestOptions(t)),{path:this.applyStore("/me",t.storeKey),method:"GET",accessToken:t.accessToken}))},t.prototype.updateMyAccount=function(t){return this.request(r(r({},this.extractCommonRequestOptions(t)),{path:this.applyStore("/me",t.storeKey),method:"POST",accessToken:t.accessToken,data:t.data}))},t.prototype.changeMyPassword=function(t){return this.request(r(r({},this.extractCommonRequestOptions(t)),{path:this.applyStore("/me/password",t.storeKey),method:"POST",accessToken:t.accessToken,data:t.data}))},t.prototype.resetMyPassword=function(t){return this.request(r(r({},this.extractCommonRequestOptions(t)),{path:this.applyStore("/me/password/reset",t.storeKey),method:"POST",accessToken:t.accessToken,data:t.data}))},t.prototype.getPasswordResetToken=function(t){return this.request(r(r({},this.extractCommonRequestOptions(t)),{path:this.applyStore("/customers/password-token",t.storeKey),method:"POST",data:t.data}))},t.prototype.getCustomerById=function(t){return this.request(r(r({},this.extractCommonRequestOptions(t)),{path:this.applyStore("/customers/".concat(t.id),t.storeKey),method:"GET"}))},t.prototype.getCustomerByKey=function(t){return this.request(r(r({},this.extractCommonRequestOptions(t)),{path:this.applyStore("/customers/key=".concat(t.key),t.storeKey),method:"GET"}))},t.prototype.getCustomerByPasswordToken=function(t){return this.request(r(r({},this.extractCommonRequestOptions(t)),{path:this.applyStore("/customers/password-token=".concat(t.token),t.storeKey),method:"GET"}))},t.prototype.queryCustomers=function(t){return this.request(r(r({},this.extractCommonRequestOptions(t)),{path:this.applyStore("/customers",t.storeKey),method:"GET"}))},t.prototype.updateCustomerById=function(t){return this.request(r(r({},this.extractCommonRequestOptions(t)),{path:"/customers/".concat(t.id),method:"POST",data:t.data}))},t.prototype.updateCustomerByKey=function(t){return this.request(r(r({},this.extractCommonRequestOptions(t)),{path:"/customers/key=".concat(t.key),method:"POST",data:t.data}))},t.prototype.getProductTypeById=function(t){return this.request(r(r({},this.extractCommonRequestOptions(t)),{path:"/product-types/".concat(t.id),method:"GET"}))},t.prototype.getProductTypeByKey=function(t){return this.request(r(r({},this.extractCommonRequestOptions(t)),{path:"/product-types/key=".concat(t.key),method:"GET"}))},t.prototype.queryProductTypes=function(t){return this.request(r(r({},this.extractCommonRequestOptions(t)),{path:"/product-types",method:"GET"}))},t.prototype.getTypeById=function(t){return this.request(r(r({},this.extractCommonRequestOptions(t)),{path:"/types/".concat(t.id),method:"GET"}))},t.prototype.getTypeByKey=function(t){return this.request(r(r({},this.extractCommonRequestOptions(t)),{path:"/types/key=".concat(t.key),method:"GET"}))},t.prototype.queryTypes=function(t){return this.request(r(r({},this.extractCommonRequestOptions(t)),{path:"/types",method:"GET"}))},t.prototype.getDiscountCodeById=function(t){return this.request(r(r({},this.extractCommonRequestOptions(t)),{path:"/discount-codes/".concat(t.id),method:"GET"}))},t.prototype.getCartDiscountById=function(t){return this.request(r(r({},this.extractCommonRequestOptions(t)),{path:"/cart-discounts/".concat(t.id),method:"GET"}))},t.prototype.getCartDiscountByKey=function(t){return this.request(r(r({},this.extractCommonRequestOptions(t)),{path:"/cart-discounts/key=".concat(t.key),method:"GET"}))},t.prototype.queryCartDiscounts=function(t){return this.request(r(r({},this.extractCommonRequestOptions(t)),{path:"/cart-discounts",method:"GET"}))},t.prototype.getCustomObject=function(t){return this.request(r(r({},this.extractCommonRequestOptions(t)),{path:"/custom-objects/".concat(t.container,"/").concat(t.key),method:"GET"}))},t.prototype.getCustomObjectById=function(t){return this.request(r(r({},this.extractCommonRequestOptions(t)),{path:"/custom-objects/".concat(t.id),method:"GET"}))},t.prototype.saveCustomObject=function(t){return this.request(r(r({},this.extractCommonRequestOptions(t)),{path:"/custom-objects",method:"POST",data:t.data}))},t.prototype.deleteCustomObject=function(t){return this.request(r(r({},this.extractCommonRequestOptions(t)),{path:"/custom-objects/".concat(t.container,"/").concat(t.key),method:"DELETE"}))},t.prototype.getShippingMethodById=function(t){return this.request(r(r({},this.extractCommonRequestOptions(t)),{path:"/shipping-methods/".concat(t.id),method:"GET"}))},t.prototype.getShippingMethodByKey=function(t){return this.request(r(r({},this.extractCommonRequestOptions(t)),{path:"/shipping-methods/key=".concat(t.key),method:"GET"}))},t.prototype.getShippingMethodsForLocation=function(t){return this.request(r(r({},this.extractCommonRequestOptions(r(r({},t),{params:r(r({},null==t?void 0:t.params),{country:t.country,state:t.state,currency:t.currency})}))),{path:"/shipping-methods/matching-location",method:"GET",accessToken:t.accessToken}))},t.prototype.getShippingMethodsForCart=function(t){return this.request(r(r({},this.extractCommonRequestOptions(r(r({},t),{params:r(r({},null==t?void 0:t.params),{cartId:t.cartId})}))),{path:"/shipping-methods/matching-cart",method:"GET",accessToken:t.accessToken}))},t.prototype.queryShippingMethods=function(t){return this.request(r(r({},this.extractCommonRequestOptions(t)),{path:"/shipping-methods",method:"GET"}))},t.prototype.getCustomerGroupById=function(t){return this.request(r(r({},this.extractCommonRequestOptions(t)),{path:"/customer-groups/".concat(t.id),method:"GET"}))},t.prototype.getCustomerGroupByKey=function(t){return this.request(r(r({},this.extractCommonRequestOptions(t)),{path:"/customer-groups/key=".concat(t.key),method:"GET"}))},t.prototype.queryCustomerGroups=function(t){return this.request(r(r({},this.extractCommonRequestOptions(t)),{path:"/customer-groups",method:"GET"}))},t.prototype.createCustomerGroup=function(t){return this.request({path:"/customer-groups",method:"POST",data:t.data})},t.prototype.updateCustomerGroupByKey=function(t){return this.request({path:"/customer-groups/key=".concat(t.key),method:"POST",data:t.data})},t.prototype.updateCustomerGroupById=function(t){return this.request(r(r({},this.extractCommonRequestOptions(t)),{path:"/customer-groups/".concat(t.id),method:"POST",data:t.data}))},t.prototype.deleteCustomerGroupById=function(t){return this.request(r(r({},this.extractCommonRequestOptions(t)),{path:"/customer-groups/".concat(t.id),method:"DELETE",params:r(r({},t.params),{version:t.version})}))},t.prototype.deleteCustomerGroupByKey=function(t){return this.request(r(r({},this.extractCommonRequestOptions(t)),{path:"/customer-groups/key=".concat(t.key),method:"DELETE",params:r(r({},t.params),{version:t.version})}))},t.prototype.getStateById=function(t){return this.request(r(r({},this.extractCommonRequestOptions(t)),{path:"/states/".concat(t.id),method:"GET"}))},t.prototype.getStateByKey=function(t){return this.request(r(r({},this.extractCommonRequestOptions(t)),{path:"/states/key=".concat(t.key),method:"GET"}))},t.prototype.queryStates=function(t){return this.request(r(r({},this.extractCommonRequestOptions(t)),{path:"/states",method:"GET"}))},t.prototype.getStandalonePriceById=function(t){return this.request(r(r({},this.extractCommonRequestOptions(t)),{path:"/standalone-prices/".concat(t.id),method:"GET"}))},t.prototype.getStandalonePriceByKey=function(t){return this.request(r(r({},this.extractCommonRequestOptions(t)),{path:"/standalone-prices/key=".concat(t.key),method:"GET"}))},t.prototype.queryStandalonePrices=function(t){return this.request(r(r({},this.extractCommonRequestOptions(t)),{path:"/standalone-prices",method:"GET"}))},t.prototype.createStandalonePrice=function(t){return this.request(r(r({},this.extractCommonRequestOptions(t)),{path:"/standalone-prices",method:"POST",data:t.data}))},t.prototype.updateStandalonePriceById=function(t){return this.request(r(r({},this.extractCommonRequestOptions(t)),{path:"/standalone-prices/".concat(t.id),method:"POST",data:t.data}))},t.prototype.updateStandalonePriceByKey=function(t){return this.request(r(r({},this.extractCommonRequestOptions(t)),{path:"/standalone-prices/key=".concat(t.key),method:"POST",data:t.data}))},t.prototype.deleteStandalonePriceById=function(t){return this.request(r(r({},this.extractCommonRequestOptions(t)),{path:"/standalone-prices/".concat(t.id),method:"DELETE",params:r(r({},t.params),{version:t.version})}))},t.prototype.deleteStandalonePriceByKey=function(t){return this.request(r(r({},this.extractCommonRequestOptions(t)),{path:"/standalone-prices/key=".concat(t.key),method:"DELETE",params:r(r({},t.params),{version:t.version})}))},t.prototype.graphql=function(t){return this.request(r(r({},this.extractCommonRequestOptions(t)),{path:"/graphql",method:"POST",data:t.data,accessToken:t.accessToken}))},t.prototype.request=function(t){return n(this,void 0,void 0,(function(){var e;return s(this,(function(o){switch(o.label){case 0:return[4,this.getRequestOptions(t)];case 1:return e=o.sent(),[4,this.requestExecutor(e)];case 2:return[2,o.sent()]}}))}))},t.prototype.getRequestOptions=function(t){return n(this,void 0,void 0,(function(){var e,o,n,i,a;return s(this,(function(s){switch(s.label){case 0:return o=t.accessToken,n="".concat(this.endpoints.api,"/").concat(this.config.projectKey).concat(t.path),o?[3,2]:[4,this.auth.getClientGrant()];case 1:i=s.sent(),o=i.accessToken,s.label=2;case 2:return a=r(r({},t.headers),{Authorization:"Bearer ".concat(o)}),"string"==typeof t.correlationId&&""!==t.correlationId&&(a["X-Correlation-ID"]=t.correlationId,delete t.correlationId),t.params&&Object.keys(t.params).length&&(e=t.params),[2,{method:t.method,data:t.data,url:n,headers:a,params:e}]}}))}))},t.prototype.extractCommonRequestOptions=function(t){return t?{correlationId:t.correlationId,params:t.params,retry:t.retry}:{}},t.prototype.applyStore=function(t,e){return"string"==typeof e&&""!==e?"/in-store/key=".concat(e).concat(t):this.config.storeKey?"/in-store/key=".concat(this.config.storeKey).concat(t):t},t.validateConfig=function(t){var e=[];if(t?(t.projectKey?"string"!=typeof t.projectKey&&e.push("The `projectKey` property must be a string"):e.push("The `projectKey` property is empty"),t.clientId?"string"!=typeof t.clientId&&e.push("The `clientId` property must be a string"):e.push("The `clientId` property is empty"),t.clientSecret?"string"!=typeof t.clientSecret&&e.push("The `clientSecret` property must be a string"):e.push("The `clientSecret` property is empty"),Array.isArray(t.clientScopes)?0===t.clientScopes.length&&e.push("The `clientScopes` property must have at least 1 scope defined"):e.push("The `clientScopes` property must be an array")):e.push("The config object missing or empty"),e.length)throw new a.CommercetoolsError("The configuration object passed in to the `CommercetoolsApi` constructor is not valid: \n"+e.map((function(t){return"• ".concat(t)})).join("\n"))},t}();e.CommercetoolsApi=p},3713:function(t,e,o){var r=this&&this.__createBinding||(Object.create?function(t,e,o,r){void 0===r&&(r=o);var n=Object.getOwnPropertyDescriptor(e,o);n&&!("get"in n?!e.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return e[o]}}),Object.defineProperty(t,r,n)}:function(t,e,o,r){void 0===r&&(r=o),t[r]=e[o]}),n=this&&this.__exportStar||function(t,e){for(var o in t)"default"===o||Object.prototype.hasOwnProperty.call(e,o)||r(e,t,o)};Object.defineProperty(e,"__esModule",{value:!0}),n(o(9818),e),n(o(7013),e)},7013:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0})},2442:function(t,e,o){var r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,o=1,r=arguments.length;o<r;o++)for(var n in e=arguments[o])Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t},r.apply(this,arguments)},n=this&&this.__awaiter||function(t,e,o,r){return new(o||(o=Promise))((function(n,s){function i(t){try{c(r.next(t))}catch(t){s(t)}}function a(t){try{c(r.throw(t))}catch(t){s(t)}}function c(t){var e;t.done?n(t.value):(e=t.value,e instanceof o?e:new o((function(t){t(e)}))).then(i,a)}c((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var o,r,n,s,i={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(c){return function(a){if(o)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(i=0)),i;)try{if(o=1,r&&(n=2&a[0]?r.return:a[0]?r.throw||((n=r.return)&&n.call(r),0):r.next)&&!(n=n.call(r,a[1])).done)return n;switch(r=0,n&&(a=[2&a[0],n.value]),a[0]){case 0:case 1:n=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,r=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!((n=(n=i.trys).length>0&&n[n.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!n||a[1]>n[0]&&a[1]<n[3])){i.label=a[1];break}if(6===a[0]&&i.label<n[1]){i.label=n[1],n=a;break}if(n&&i.label<n[2]){i.label=n[2],i.ops.push(a);break}n[2]&&i.ops.pop(),i.trys.pop();continue}a=e.call(t,i)}catch(t){a=[6,t],r=0}finally{o=n=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.CommercetoolsAuth=void 0;var i=o(2915),a=o(8003),c=o(3032),u={refreshIfWithinSecs:1800,timeoutMs:5e3},p=function(){function t(t){if(this.grantPromise=null,this.config=r(r({},u),t),!this.config.clientScopes.length)throw new i.CommercetoolsError("`config.clientScopes` must contain at least one scope");this.api=new c.CommercetoolsAuthApi(t)}return t.prototype.getClientGrant=function(){return n(this,void 0,void 0,(function(){var t=this;return s(this,(function(e){return this.grantPromise?[2,this.grantPromise]:this.grant&&!this.grant.expiresWithin(this.config.refreshIfWithinSecs)?[2,this.grant]:(this.grantPromise=this.api.getClientGrant(this.config.clientScopes).then((function(e){return t.grant=new a.CommercetoolsGrant(e),t.grant})).finally((function(){t.grantPromise=null})),[2,this.grantPromise])}))}))},t.prototype.refreshCustomerGrant=function(t){return n(this,void 0,void 0,(function(){var e;return s(this,(function(o){switch(o.label){case 0:return[4,this.api.refreshGrant(t)];case 1:return e=o.sent(),[2,new a.CommercetoolsGrant(r(r({},e),{refresh_token:t}))]}}))}))},t.prototype.login=function(t){return n(this,void 0,void 0,(function(){var e,o;return s(this,(function(n){switch(n.label){case 0:if(!(e=t.scopes||this.config.customerScopes))throw new i.CommercetoolsError("Customer scopes must be set on either the `options` parameter of this `login` method, or on the `customerScopes` property of the `CommercetoolsAuth` constructor");return[4,this.getClientGrant()];case 1:return n.sent(),[4,this.api.login(r(r({},t),{scopes:e}))];case 2:return o=n.sent(),[2,new a.CommercetoolsGrant(o)]}}))}))},t.prototype.getAnonymousGrant=function(t){return n(this,void 0,void 0,(function(){var e,o,r;return s(this,(function(n){switch(n.label){case 0:if(e=(null==t?void 0:t.scopes)||this.config.customerScopes,o=null==t?void 0:t.anonymousId,!e)throw new i.CommercetoolsError("Customer scopes must be set on either the `options` parameter of this `login` method, or on the `customerScopes` property of the `CommercetoolsAuth` constructor");return[4,this.getClientGrant()];case 1:return n.sent(),[4,this.api.getAnonymousGrant({scopes:e,anonymousId:o})];case 2:return r=n.sent(),[2,new a.CommercetoolsGrant(r)]}}))}))},t.prototype.logout=function(t){return n(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.api.logout(t)];case 1:return e.sent(),[2]}}))}))},t.prototype.revokeToken=function(t){return n(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.api.revokeToken(t)];case 1:return e.sent(),[2]}}))}))},t}();e.CommercetoolsAuth=p},3032:function(t,e,o){var r=this&&this.__awaiter||function(t,e,o,r){return new(o||(o=Promise))((function(n,s){function i(t){try{c(r.next(t))}catch(t){s(t)}}function a(t){try{c(r.throw(t))}catch(t){s(t)}}function c(t){var e;t.done?n(t.value):(e=t.value,e instanceof o?e:new o((function(t){t(e)}))).then(i,a)}c((r=r.apply(t,e||[])).next())}))},n=this&&this.__generator||function(t,e){var o,r,n,s,i={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(c){return function(a){if(o)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(i=0)),i;)try{if(o=1,r&&(n=2&a[0]?r.return:a[0]?r.throw||((n=r.return)&&n.call(r),0):r.next)&&!(n=n.call(r,a[1])).done)return n;switch(r=0,n&&(a=[2&a[0],n.value]),a[0]){case 0:case 1:n=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,r=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!((n=(n=i.trys).length>0&&n[n.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!n||a[1]>n[0]&&a[1]<n[3])){i.label=a[1];break}if(6===a[0]&&i.label<n[1]){i.label=n[1],n=a;break}if(n&&i.label<n[2]){i.label=n[2],i.ops.push(a);break}n[2]&&i.ops.pop(),i.trys.pop();continue}a=e.call(t,i)}catch(t){a=[6,t],r=0}finally{o=n=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.CommercetoolsAuthApi=void 0;var s=o(2849),i=o(2915),a=o(7530),c=o(7111),u=o(9017),p=o(7034),l=function(){function t(t){this.config=t,this.endpoints=c.REGION_URLS[this.config.region],this.requestExecutor=(0,p.getRequestExecutor)({timeoutMs:t.timeoutMs,httpsAgent:t.httpsAgent,systemIdentifier:t.systemIdentifier,onBeforeRequest:t.onBeforeRequest,onAfterResponse:t.onAfterResponse,retry:t.retry})}return t.prototype.getClientGrant=function(t){return r(this,void 0,void 0,(function(){return n(this,(function(e){return[2,this.post("/token",{grant_type:s.GrantType.CLIENT_CREDENTIALS,scope:(0,a.scopeArrayToRequestString)(t,this.config.projectKey)})]}))}))},t.prototype.refreshGrant=function(t){return r(this,void 0,void 0,(function(){return n(this,(function(e){switch(e.label){case 0:return[4,this.post("/token",{grant_type:s.GrantType.REFRESH_TOKEN,refresh_token:t})];case 1:return[2,e.sent()]}}))}))},t.prototype.login=function(t){return r(this,void 0,void 0,(function(){return n(this,(function(e){return[2,this.post("/".concat(this.config.projectKey).concat(this.applyStore("/customers/token",t.storeKey)),{username:t.username,password:t.password,grant_type:s.GrantType.PASSWORD,scope:(0,a.scopeArrayToRequestString)(t.scopes,this.config.projectKey)})]}))}))},t.prototype.revokeToken=function(t){return r(this,void 0,void 0,(function(){return n(this,(function(e){switch(e.label){case 0:return[4,this.post("/token/revoke",{token:t.tokenValue,token_type_hint:t.tokenType})];case 1:return e.sent(),[2]}}))}))},t.prototype.logout=function(t){return r(this,void 0,void 0,(function(){var e,o;return n(this,(function(r){switch(r.label){case 0:return[4,Promise.allSettled([this.revokeToken({tokenType:"access_token",tokenValue:t.accessToken}),this.revokeToken({tokenType:"refresh_token",tokenValue:t.refreshToken})])];case 1:if(e=r.sent(),(o=e.reduce((function(t,e){return"rejected"===e.status&&t.push(e.reason),t}),[])).length)throw new i.CommercetoolsError("Logout failed in one or more calls to the token revocation endpoint",o);return[2]}}))}))},t.prototype.getAnonymousGrant=function(t){var e;return r(this,void 0,void 0,(function(){var o;return n(this,(function(r){return o={grant_type:s.GrantType.CLIENT_CREDENTIALS},(null===(e=null==t?void 0:t.scopes)||void 0===e?void 0:e.length)&&(o.scope=(0,a.scopeArrayToRequestString)(t.scopes,this.config.projectKey)),(null==t?void 0:t.anonymousId)&&(o.anonymous_id=t.anonymousId),[2,this.post("/".concat(this.config.projectKey,"/anonymous/token"),o)]}))}))},t.prototype.post=function(t,e){return r(this,void 0,void 0,(function(){return n(this,(function(o){switch(o.label){case 0:return[4,this.requestExecutor(this.getRequestOptions({path:t,body:e}))];case 1:return[2,o.sent()]}}))}))},t.prototype.getRequestOptions=function(t){var e,o="".concat(this.endpoints.auth,"/oauth").concat(t.path),r={Authorization:"Basic ".concat((0,u.base64EncodeForBasicAuth)(this.config.clientId,this.config.clientSecret)),"Content-Type":"application/x-www-form-urlencoded"};return t.correlationId&&""!==t.correlationId&&(r["X-Correlation-ID"]=t.correlationId,delete t.correlationId),t.body&&(e=new URLSearchParams(t.body).toString()),{method:"POST",data:e,url:o,headers:r}},t.prototype.applyStore=function(t,e){return"string"==typeof e&&""!==e?"/in-store/key=".concat(e).concat(t):this.config.storeKey?"/in-store/key=".concat(this.config.storeKey).concat(t):t},t}();e.CommercetoolsAuthApi=l},8003:(t,e,o)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CommercetoolsGrant=void 0;var r=o(7530),n=function(){function t(t){this.accessToken="",this.expiresIn=0,this.expiresAt=new Date,this.scopes=[],this.accessToken=t.access_token,this.expiresIn=t.expires_in,this.scopes=(0,r.scopeRequestStringToArray)(t.scope),this.anonymousId=this.extractKeyFromScope("anonymous_id",t.scope),this.customerId=this.extractKeyFromScope("customer_id",t.scope),this.expiresAt=new Date((new Date).getTime()+1e3*t.expires_in),"refresh_token"in t&&t.refresh_token&&(this.refreshToken=t.refresh_token)}return t.prototype.expiresWithin=function(t){var e=(new Date).getTime()+1e3*t;return this.expiresAt.getTime()<e},t.prototype.extractKeyFromScope=function(t,e){if(e&&t){var o=null==e?void 0:e.split(" ");if(Array.isArray(o)&&0!==o.length){var r=o.find((function(e){return e.slice(0,t.length+1)==="".concat(t,":")}));return r?r.slice(t.length+1):void 0}}},t}();e.CommercetoolsGrant=n},7111:(t,e,o)=>{var r;Object.defineProperty(e,"__esModule",{value:!0}),e.INVALID_SCOPES=e.REGION_URLS=void 0;var n=o(9291);e.REGION_URLS=((r={})[n.Region.EUROPE_GCP]={auth:"https://auth.europe-west1.gcp.commercetools.com",api:"https://api.europe-west1.gcp.commercetools.com"},r[n.Region.EUROPE_AWS]={auth:"https://auth.eu-central-1.aws.commercetools.com",api:"https://api.eu-central-1.aws.commercetools.com"},r[n.Region.NORTH_AMERICA_GCP]={auth:"https://auth.us-central1.gcp.commercetools.com",api:"https://api.us-central1.gcp.commercetools.com"},r[n.Region.NORTH_AMERICA_AWS]={auth:"https://auth.us-east-2.aws.commercetools.com",api:"https://api.us-east-2.aws.commercetools.com"},r[n.Region.AUSTRALIA_GCP]={auth:"https://auth.australia-southeast1.gcp.commercetools.com",api:"https://api.australia-southeast1.gcp.commercetools.com"},r),e.INVALID_SCOPES=["anonymous_id","customer_id"]},7443:function(t,e,o){var r=this&&this.__createBinding||(Object.create?function(t,e,o,r){void 0===r&&(r=o);var n=Object.getOwnPropertyDescriptor(e,o);n&&!("get"in n?!e.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return e[o]}}),Object.defineProperty(t,r,n)}:function(t,e,o,r){void 0===r&&(r=o),t[r]=e[o]}),n=this&&this.__exportStar||function(t,e){for(var o in t)"default"===o||Object.prototype.hasOwnProperty.call(e,o)||r(e,t,o)};Object.defineProperty(e,"__esModule",{value:!0}),n(o(2442),e),n(o(8003),e)},7530:(t,e,o)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.scopeRequestStringToArray=e.scopeArrayToRequestString=void 0;var r=o(7111);e.scopeArrayToRequestString=function(t,e){return t?t.map((function(t){return"".concat(t,":").concat(e)})).join(" "):""},e.scopeRequestStringToArray=function(t){return t?t.split(" ").map((function(t){return t.split(":")[0]})).filter((function(t){return!r.INVALID_SCOPES.includes(t)})):[]}},2849:(t,e)=>{var o;Object.defineProperty(e,"__esModule",{value:!0}),e.GrantType=void 0,(o=e.GrantType||(e.GrantType={})).CLIENT_CREDENTIALS="client_credentials",o.REFRESH_TOKEN="refresh_token",o.PASSWORD="password"},9017:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.base64EncodeForBasicAuth=void 0,e.base64EncodeForBasicAuth=function(t,e){var o="".concat(t,":").concat(e);return btoa(o)}},4060:(t,e,o)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.DEFAULT_HTTPS_AGENT_CONFIG=e.RETRYABLE_STATUS_CODES=e.DEFAULT_RETRY_CONFIG=e.MAX_ITEMS_PER_QUERY=e.DEFAULT_REQUEST_TIMEOUT_MS=e.USER_AGENT_PREFIX=void 0;var r=o(8842);e.USER_AGENT_PREFIX="@gradientedge/commercetools-utils",e.DEFAULT_REQUEST_TIMEOUT_MS=5e3,e.MAX_ITEMS_PER_QUERY=500,e.DEFAULT_RETRY_CONFIG={maxRetries:0,delayMs:0},e.RETRYABLE_STATUS_CODES=[r.Status.InternalServerError,r.Status.NotImplemented,r.Status.BadGateway,r.Status.ServiceUnavailable,r.Status.GatewayTimeout],e.DEFAULT_HTTPS_AGENT_CONFIG={keepAlive:!0,maxSockets:32,maxFreeSockets:10,timeout:6e4}},6781:function(t,e,o){var r,n=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.CommercetoolsError=void 0;var i=s(o(4530)),a=o(893),c=function(t){function e(o,r,n){var s=t.call(this,o)||this;return s.isCommercetoolsError=!0,s.data=r,s.status=n,Object.setPrototypeOf(s,e.prototype),s}return n(e,t),e.fromAxiosError=function(t){var o,r,n,s,i,c,u,p;return new e(t.message,{code:t.code,request:{url:null===(o=t.config)||void 0===o?void 0:o.url,method:null===(r=t.config)||void 0===r?void 0:r.method,headers:(0,a.maskSensitiveHeaders)((0,a.extractAxiosHeaders)(null===(n=t.config)||void 0===n?void 0:n.headers)),params:(0,a.maskSensitiveInput)(null===(s=t.config)||void 0===s?void 0:s.params),data:(0,a.maskSensitiveInput)(this.parseRequestData(t.config))},response:{status:null===(i=t.response)||void 0===i?void 0:i.status,data:(0,a.maskSensitiveInput)(null===(c=t.response)||void 0===c?void 0:c.data),headers:(0,a.extractAxiosHeaders)(null===(u=t.response)||void 0===u?void 0:u.headers)}},null===(p=t.response)||void 0===p?void 0:p.status)},e.parseRequestData=function(t){var e,o;if(!t)return null;var r=null==t?void 0:t.data;if("string"==typeof r&&r){var n="";if("string"==typeof(null===(e=null==t?void 0:t.headers)||void 0===e?void 0:e["Content-Type"])&&(n=null===(o=null==t?void 0:t.headers)||void 0===o?void 0:o["Content-Type"]),"application/json"===n.substring(0,16))try{r=JSON.parse(t.data)}catch(t){}else if("application/x-www-form-urlencoded"===n.substring(0,33))try{var s=new URLSearchParams(t.data),i={};s.forEach((function(t,e,o){var r=o.getAll(e);0===r.length?i[e]="":1===r.length?i[e]=r[0]:i[e]=r})),r=i}catch(t){}}return r},e.prototype.toJSON=function(){return{status:this.status,message:this.message,data:this.data,isCommercetoolsError:!0}},e.prototype.toString=function(){return(0,i.default)(this.toJSON())},e}(Error);e.CommercetoolsError=c},3028:function(t,e,o){var r=this&&this.__createBinding||(Object.create?function(t,e,o,r){void 0===r&&(r=o);var n=Object.getOwnPropertyDescriptor(e,o);n&&!("get"in n?!e.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return e[o]}}),Object.defineProperty(t,r,n)}:function(t,e,o,r){void 0===r&&(r=o),t[r]=e[o]}),n=this&&this.__exportStar||function(t,e){for(var o in t)"default"===o||Object.prototype.hasOwnProperty.call(e,o)||r(e,t,o)};Object.defineProperty(e,"__esModule",{value:!0}),n(o(6781),e)},2915:function(t,e,o){var r=this&&this.__createBinding||(Object.create?function(t,e,o,r){void 0===r&&(r=o);var n=Object.getOwnPropertyDescriptor(e,o);n&&!("get"in n?!e.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return e[o]}}),Object.defineProperty(t,r,n)}:function(t,e,o,r){void 0===r&&(r=o),t[r]=e[o]}),n=this&&this.__exportStar||function(t,e){for(var o in t)"default"===o||Object.prototype.hasOwnProperty.call(e,o)||r(e,t,o)};Object.defineProperty(e,"__esModule",{value:!0}),e.MAX_ITEMS_PER_QUERY=e.Region=void 0,n(o(3028),e),n(o(7443),e),n(o(3713),e);var s=o(9291);Object.defineProperty(e,"Region",{enumerable:!0,get:function(){return s.Region}}),n(o(893),e),n(o(6249),e);var i=o(4060);Object.defineProperty(e,"MAX_ITEMS_PER_QUERY",{enumerable:!0,get:function(){return i.MAX_ITEMS_PER_QUERY}})},625:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0})},9605:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0})},5554:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0})},4294:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0})},5991:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0})},5714:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0})},7942:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0})},9906:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0})},4241:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0})},146:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0})},5167:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0})},4236:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0})},6249:function(t,e,o){var r=this&&this.__createBinding||(Object.create?function(t,e,o,r){void 0===r&&(r=o);var n=Object.getOwnPropertyDescriptor(e,o);n&&!("get"in n?!e.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return e[o]}}),Object.defineProperty(t,r,n)}:function(t,e,o,r){void 0===r&&(r=o),t[r]=e[o]}),n=this&&this.__exportStar||function(t,e){for(var o in t)"default"===o||Object.prototype.hasOwnProperty.call(e,o)||r(e,t,o)};Object.defineProperty(e,"__esModule",{value:!0}),n(o(9605),e),n(o(625),e),n(o(5554),e),n(o(4294),e),n(o(5991),e),n(o(5714),e),n(o(9906),e),n(o(7942),e),n(o(4241),e),n(o(146),e),n(o(5167),e),n(o(4236),e),n(o(2949),e),n(o(492),e),n(o(6871),e),n(o(6487),e),n(o(8386),e),n(o(4946),e),n(o(6313),e),n(o(5285),e),n(o(5283),e),n(o(3708),e),n(o(6883),e),n(o(2246),e),n(o(4089),e),n(o(6614),e),n(o(7607),e),n(o(310),e),n(o(7183),e),n(o(2569),e),n(o(1027),e),n(o(6080),e),n(o(1613),e),n(o(721),e)},2949:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0})},492:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0})},6871:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0})},8386:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0})},6487:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0})},4946:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0})},5285:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0})},5283:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0})},3708:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0})},6313:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0})},6883:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0})},2246:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0})},4089:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0})},6614:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0})},7607:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0})},310:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0})},7183:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0})},2569:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0})},1027:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0})},6080:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0})},1613:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0})},721:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0})},4474:function(t,e,o){var r=this&&this.__createBinding||(Object.create?function(t,e,o,r){void 0===r&&(r=o);var n=Object.getOwnPropertyDescriptor(e,o);n&&!("get"in n?!e.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return e[o]}}),Object.defineProperty(t,r,n)}:function(t,e,o,r){void 0===r&&(r=o),t[r]=e[o]}),n=this&&this.__exportStar||function(t,e){for(var o in t)"default"===o||Object.prototype.hasOwnProperty.call(e,o)||r(e,t,o)};Object.defineProperty(e,"__esModule",{value:!0}),n(o(7261),e),n(o(884),e)},884:(t,e,o)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.isRetryableError=void 0;var r=o(4060);e.isRetryableError=function(t){return!t.isAxiosError||!t.request||!t.response||r.RETRYABLE_STATUS_CODES.includes(t.response.status)}},7034:function(t,e,o){var r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,o=1,r=arguments.length;o<r;o++)for(var n in e=arguments[o])Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t},r.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.getRequestExecutor=void 0;var n=o(4474),s=o(893),i=o(4060);e.getRequestExecutor=function(t){var e=(0,s.createAxiosInstance)({httpsAgent:t.httpsAgent}),o={"User-Agent":(0,s.buildUserAgent)(t.systemIdentifier)};return function(s){var a=r(r({},o),s.headers);return(0,n.request)({axiosInstance:e,onBeforeRequest:t.onBeforeRequest,onAfterResponse:t.onAfterResponse,request:r(r({},s),{headers:a}),retry:r(r({},i.DEFAULT_RETRY_CONFIG),t.retry),timeoutMs:t.timeoutMs})}}},7261:function(t,e,o){var r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,o=1,r=arguments.length;o<r;o++)for(var n in e=arguments[o])Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t},r.apply(this,arguments)},n=this&&this.__awaiter||function(t,e,o,r){return new(o||(o=Promise))((function(n,s){function i(t){try{c(r.next(t))}catch(t){s(t)}}function a(t){try{c(r.throw(t))}catch(t){s(t)}}function c(t){var e;t.done?n(t.value):(e=t.value,e instanceof o?e:new o((function(t){t(e)}))).then(i,a)}c((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var o,r,n,s,i={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(c){return function(a){if(o)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(i=0)),i;)try{if(o=1,r&&(n=2&a[0]?r.return:a[0]?r.throw||((n=r.return)&&n.call(r),0):r.next)&&!(n=n.call(r,a[1])).done)return n;switch(r=0,n&&(a=[2&a[0],n.value]),a[0]){case 0:case 1:n=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,r=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!((n=(n=i.trys).length>0&&n[n.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!n||a[1]>n[0]&&a[1]<n[3])){i.label=a[1];break}if(6===a[0]&&i.label<n[1]){i.label=n[1],n=a;break}if(n&&i.label<n[2]){i.label=n[2],i.ops.push(a);break}n[2]&&i.ops.pop(),i.trys.pop();continue}a=e.call(t,i)}catch(t){a=[6,t],r=0}finally{o=n=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.request=void 0;var i=o(893),a=o(884),c=o(1100),u=o(4060),p=o(2003);e.request=function(t){var e,o,l;return n(this,void 0,void 0,(function(){var n,d,h,f,m,y,v,g,O,b,E,S,_,T;return s(this,(function(R){switch(R.label){case 0:n=t.retry,d=t.onBeforeRequest,h=t.onAfterResponse,f=t.axiosInstance,m=null!==(e=t.timeoutMs)&&void 0!==e?e:u.DEFAULT_REQUEST_TIMEOUT_MS,y={},v=(0,p.plainClone)(t.request),g=0,Object.keys(null!==(o=v.headers)&&void 0!==o?o:{}).map((function(t){return t.toLowerCase()})).includes("user-agent")||(null!==(l=v.headers)&&void 0!==l||(v.headers={}),v.headers["User-Agent"]=(0,i.buildUserAgent)()),b=0,_=function(){var t,e,o,u,p;return s(this,(function(s){switch(s.label){case 0:return E=null,S=null,g>0?(y["X-Retry-Count"]="".concat(g),t=(0,i.calculateDelay)(g,n),[4,new Promise((function(e){return setTimeout(e,t)}))]):[3,2];case 1:s.sent(),s.label=2;case 2:return s.trys.push([2,6,,7]),d?[4,d(v)]:[3,4];case 3:(e=s.sent())&&(v=e),s.label=4;case 4:return E=Date.now(),[4,f(r(r({},v),{headers:r(r({},v.headers),y),timeout:m}))];case 5:return o=s.sent(),S=Date.now(),b+=S-E,h&&h((0,i.convertAxiosResponse)(o,{accumulativeDurationMs:b,durationMs:S-E,retries:g})),[2,{value:o.data}];case 6:if(u=s.sent(),S=Date.now(),b+=E?S-E:0,h&&(p=(0,i.convertAxiosError)(u,{accumulativeDurationMs:b,durationMs:E?S-E:0,retries:g}))&&h(p),!(0,a.isRetryableError)(u))throw(0,c.transformError)(u);return O=u,[3,7];case 7:return g++,[2]}}))},R.label=1;case 1:return[5,_()];case 2:if("object"==typeof(T=R.sent()))return[2,T.value];R.label=3;case 3:if(g<=n.maxRetries)return[3,1];R.label=4;case 4:throw(0,c.transformError)(O)}}))}))}},1100:(t,e,o)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.transformError=void 0;var r=o(3028);e.transformError=function(t){return t.isAxiosError?r.CommercetoolsError.fromAxiosError(t):t}},9291:(t,e)=>{var o;Object.defineProperty(e,"__esModule",{value:!0}),e.Region=void 0,(o=e.Region||(e.Region={})).NORTH_AMERICA_GCP="north_america_gcp",o.NORTH_AMERICA_AWS="north_america_aws",o.EUROPE_GCP="europe_gcp",o.EUROPE_AWS="europe_aws",o.AUSTRALIA_GCP="australia_gcp"},2519:(t,e,o)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.convertAxiosError=void 0;var r=o(7271);e.convertAxiosError=function(t,e){var o,n,s,i,a,c,u,p,l,d;return"isAxiosError"in t?{request:{url:null!==(n=null===(o=t.config)||void 0===o?void 0:o.url)&&void 0!==n?n:"",method:null===(s=t.config)||void 0===s?void 0:s.method,params:null===(i=t.config)||void 0===i?void 0:i.params,headers:(0,r.extractAxiosHeaders)(null===(a=t.config)||void 0===a?void 0:a.headers),data:null===(c=t.config)||void 0===c?void 0:c.data},response:{code:t.code,message:(null===(u=t.response)||void 0===u?void 0:u.status)?void 0:t.message,status:null===(p=t.response)||void 0===p?void 0:p.status,headers:(0,r.extractAxiosHeaders)(null===(l=t.response)||void 0===l?void 0:l.headers),data:null===(d=t.response)||void 0===d?void 0:d.data},stats:e}:null}},4059:(t,e,o)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.convertAxiosResponse=void 0;var r=o(7271);e.convertAxiosResponse=function(t,e){var o,n,s,i,a,c;return{request:{url:null!==(n=null===(o=t.config)||void 0===o?void 0:o.url)&&void 0!==n?n:"",method:null===(s=t.config)||void 0===s?void 0:s.method,params:null===(i=t.config)||void 0===i?void 0:i.params,headers:null===(a=t.request)||void 0===a?void 0:a.headers,data:null===(c=t.config)||void 0===c?void 0:c.data},response:{status:t.status,headers:(0,r.extractAxiosHeaders)(t.headers),data:t.data},stats:e}}},4070:function(t,e,o){var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.createAxiosInstance=void 0,o(4060);var n=r(o(7218));e.createAxiosInstance=function(t){return n.default.create({httpsAgent:void 0})}},7271:(t,e,o)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.extractAxiosHeaders=void 0;var r=o(7218);e.extractAxiosHeaders=function(t){var e={};if(t instanceof r.AxiosHeaders){var o=t.toJSON();e={},Object.entries(o).forEach((function(t){var o=t[0],r=t[1],n=o.toLowerCase();"boolean"==typeof r||"number"==typeof r||"string"==typeof r?e[n]=r.toString():Array.isArray(r)&&(e[n]=r.join(", "))}))}return Object.keys(e).length?e:void 0}},4747:function(t,e,o){var r=this&&this.__createBinding||(Object.create?function(t,e,o,r){void 0===r&&(r=o);var n=Object.getOwnPropertyDescriptor(e,o);n&&!("get"in n?!e.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return e[o]}}),Object.defineProperty(t,r,n)}:function(t,e,o,r){void 0===r&&(r=o),t[r]=e[o]}),n=this&&this.__exportStar||function(t,e){for(var o in t)"default"===o||Object.prototype.hasOwnProperty.call(e,o)||r(e,t,o)};Object.defineProperty(e,"__esModule",{value:!0}),n(o(2519),e),n(o(4059),e),n(o(4070),e),n(o(7271),e)},3720:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.calculateDelay=void 0,e.calculateDelay=function(t,e){if(!e||0===t)return 0;var o=e.delayMs*Math.pow(2,t-1);if(e.jitter){var r=o*(1+1/(t+1));return Math.floor(Math.random()*r)}return o}},3930:(t,e,o)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.formatAsKey=void 0;var r=o(3028);e.formatAsKey=function(t){var e="";if("string"!=typeof t)throw new r.CommercetoolsError("The [input] parameter must be a string");if((e=(e=(e=(e=(e=(e=t.trim().toLowerCase()).replace(/ {2,}/g,"")).replace(/&/g,"and")).replace(/[ _]/g,"-")).replace(/[^0-9a-z-]+/g,"")).replace(/-{2,}/g,"-")).length&&"-"===e[0]&&(e=e.slice(1)),e.length&&"-"===e[e.length-1]&&(e=e.slice(0,-1)),e.length<2)throw new r.CommercetoolsError("Formatted key did not meet minimum length of 2 characters: ".concat(e));if(e.length>256)throw new r.CommercetoolsError("Formatted key exceeds the maximum length of 256 characters: ".concat(e));return e}},6640:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getAttributeValue=void 0,e.getAttributeValue=function(t){var e,o;if(null===(e=null==t?void 0:t.attributes)||void 0===e?void 0:e.length){var r=null===(o=t.attributes)||void 0===o?void 0:o.find((function(e){return e.name===t.name}));if(r)return r.value}return null}},893:function(t,e,o){var r=this&&this.__createBinding||(Object.create?function(t,e,o,r){void 0===r&&(r=o);var n=Object.getOwnPropertyDescriptor(e,o);n&&!("get"in n?!e.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return e[o]}}),Object.defineProperty(t,r,n)}:function(t,e,o,r){void 0===r&&(r=o),t[r]=e[o]}),n=this&&this.__exportStar||function(t,e){for(var o in t)"default"===o||Object.prototype.hasOwnProperty.call(e,o)||r(e,t,o)};Object.defineProperty(e,"__esModule",{value:!0}),n(o(4747),e),n(o(3720),e),n(o(3930),e),n(o(6640),e),n(o(9998),e),n(o(9989),e),n(o(3190),e)},9998:function(t,e,o){var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.maskSensitiveData=e.maskSensitiveHeaders=e.maskSensitiveInput=e.DEFAULT_MASKING_STRING=e.SENSITIVE_HEADER_NAMES=e.SENSITIVE_PROPERTY_NAMES=void 0;var n=r(o(3692)),s=o(7218),i=o(2003);function a(t,o,r){if(void 0===r&&(r=e.DEFAULT_MASKING_STRING),"object"==typeof t&&null!=t){var a;return a=t instanceof s.AxiosHeaders?(0,i.plainClone)(t.toJSON()):(0,i.plainClone)(t),(0,n.default)(a).forEach((function(){var t,e;o.includes(null!==(e=null===(t=this.key)||void 0===t?void 0:t.toLowerCase())&&void 0!==e?e:"")&&this.update(r)})),a}return t}e.SENSITIVE_PROPERTY_NAMES=["password","refresh_token"],e.SENSITIVE_HEADER_NAMES=["authorization"],e.DEFAULT_MASKING_STRING="********",e.maskSensitiveInput=function(t){return a(t,e.SENSITIVE_PROPERTY_NAMES)},e.maskSensitiveHeaders=function(t){return a(t,e.SENSITIVE_HEADER_NAMES)},e.maskSensitiveData=a},2003:(t,e)=>{function o(t,e){if(e&&t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]&&"object"==typeof t[r]?e[r]=o(e[r],t[r]):e[r]=t[r]);return e}Object.defineProperty(e,"__esModule",{value:!0}),e.plainClone=void 0,e.plainClone=function(t){return o(t,{})}},9989:function(t,e,o){var r=this&&this.__awaiter||function(t,e,o,r){return new(o||(o=Promise))((function(n,s){function i(t){try{c(r.next(t))}catch(t){s(t)}}function a(t){try{c(r.throw(t))}catch(t){s(t)}}function c(t){var e;t.done?n(t.value):(e=t.value,e instanceof o?e:new o((function(t){t(e)}))).then(i,a)}c((r=r.apply(t,e||[])).next())}))},n=this&&this.__generator||function(t,e){var o,r,n,s,i={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(c){return function(a){if(o)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(i=0)),i;)try{if(o=1,r&&(n=2&a[0]?r.return:a[0]?r.throw||((n=r.return)&&n.call(r),0):r.next)&&!(n=n.call(r,a[1])).done)return n;switch(r=0,n&&(a=[2&a[0],n.value]),a[0]){case 0:case 1:n=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,r=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!((n=(n=i.trys).length>0&&n[n.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!n||a[1]>n[0]&&a[1]<n[3])){i.label=a[1];break}if(6===a[0]&&i.label<n[1]){i.label=n[1],n=a;break}if(n&&i.label<n[2]){i.label=n[2],i.ops.push(a);break}n[2]&&i.ops.pop(),i.trys.pop();continue}a=e.call(t,i)}catch(t){a=[6,t],r=0}finally{o=n=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.retryOnConflict=void 0;var s=o(3720),i=o(8842);e.retryOnConflict=function(t){return r(this,void 0,void 0,(function(){var e,o,r,a,c,u;return n(this,(function(p){switch(p.label){case 0:e=(null==t?void 0:t.maxRetries)||3,o=(null==t?void 0:t.delayMs)||100,r=!!(null==t?void 0:t.jitter),a=function(a){var c,u,p;return n(this,(function(n){switch(n.label){case 0:return a>1?(c=(0,s.calculateDelay)(a-1,{delayMs:o,maxRetries:e,jitter:r}),[4,new Promise((function(t){return setTimeout(t,c)}))]):[3,2];case 1:n.sent(),n.label=2;case 2:return n.trys.push([2,4,,5]),u={},[4,t.executeFn(a)];case 3:return[2,(u.value=n.sent(),u)];case 4:if(!(p=n.sent()).isCommercetoolsError||p.status!==i.Status.Conflict||a===e)throw p;return[3,5];case 5:return[2]}}))},c=1,p.label=1;case 1:return c<=e?[5,a(c)]:[3,4];case 2:if("object"==typeof(u=p.sent()))return[2,u.value];p.label=3;case 3:return c++,[3,1];case 4:return[2,void 0]}}))}))}},3190:(t,e,o)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.buildUserAgent=void 0;var r=o(4060);e.buildUserAgent=function(t){var e=r.USER_AGENT_PREFIX;return t&&(e="".concat(e," (").concat(t,")")),e}},8842:(t,e,o)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.reason=e.ErrorStatus=e.RedirectionStatus=e.SuccessStatus=e.InformationStatus=e.Status=void 0;var r=o(7536);Object.defineProperty(e,"Status",{enumerable:!0,get:function(){return r.Status}}),Object.defineProperty(e,"InformationStatus",{enumerable:!0,get:function(){return r.InformationStatus}}),Object.defineProperty(e,"SuccessStatus",{enumerable:!0,get:function(){return r.SuccessStatus}}),Object.defineProperty(e,"RedirectionStatus",{enumerable:!0,get:function(){return r.RedirectionStatus}}),Object.defineProperty(e,"ErrorStatus",{enumerable:!0,get:function(){return r.ErrorStatus}});var n=o(7890);Object.defineProperty(e,"reason",{enumerable:!0,get:function(){return n.reason}})},7890:(t,e,o)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.reason=void 0;const r=o(7536);e.reason=function(t){switch(t){case 200:return"OK";case 203:return"Non-Authoritative Information";case 207:return"Multi-Status";case 226:return"IM Used";case 414:return"URI Too Long";case 418:return"I'm a teapot";case 505:return"HTTP Version Not Supported";default:return(Object.keys(r.Status).find((e=>r.Status[e]===t))||"").replace(/(?!^)([A-Z])/gm," $1")}}},7536:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Status=e.ErrorStatus=e.RedirectionStatus=e.SuccessStatus=e.InformationStatus=void 0,e.InformationStatus={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103},e.SuccessStatus={Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226},e.RedirectionStatus={MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,TemporaryRedirect:307,PermanentRedirect:308},e.ErrorStatus={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,RequestedRangeNotSatisfiable: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},e.Status=Object.assign(Object.assign(Object.assign(Object.assign({},e.InformationStatus),e.SuccessStatus),e.RedirectionStatus),e.ErrorStatus)},4530:(t,e)=>{function o(t,e){var o=[],r=[];return null==e&&(e=function(t,e){return o[0]===e?"[Circular ~]":"[Circular ~."+r.slice(0,o.indexOf(e)).join(".")+"]"}),function(n,s){if(o.length>0){var i=o.indexOf(this);~i?o.splice(i+1):o.push(this),~i?r.splice(i,1/0,n):r.push(n),~o.indexOf(s)&&(s=e.call(this,n,s))}else o.push(s);return null==t?s:t.call(this,n,s)}}(t.exports=function(t,e,r,n){return JSON.stringify(t,o(e,n),r)}).getSerialize=o},3692:t=>{function e(t){return Object.prototype.toString.call(t)}var o=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function r(t,e){if(t.forEach)return t.forEach(e);for(var o=0;o<t.length;o++)e(t[o],o,t)}var n=Object.keys||function(t){var e=[];for(var o in t)e.push(o);return e},s=Object.prototype.hasOwnProperty||function(t,e){return e in t};function i(t){if("object"==typeof t&&null!==t){var s;if(o(t))s=[];else if("[object Date]"===e(t))s=new Date(t.getTime?t.getTime():t);else if("[object RegExp]"===e(t))s=new RegExp(t);else if(function(t){return"[object Error]"===e(t)}(t))s={message:t.message};else if(function(t){return"[object Boolean]"===e(t)}(t)||function(t){return"[object Number]"===e(t)}(t)||function(t){return"[object String]"===e(t)}(t))s=Object(t);else if(Object.create&&Object.getPrototypeOf)s=Object.create(Object.getPrototypeOf(t));else if(t.constructor===Object)s={};else{var i=t.constructor&&t.constructor.prototype||t.__proto__||{},a=function(){};a.prototype=i,s=new a}return r(n(t),(function(e){s[e]=t[e]})),s}return t}function a(t,e,a){var c=[],u=[],p=!0;return function t(l){var d=a?i(l):l,h={},f=!0,m={node:d,node_:l,path:[].concat(c),parent:u[u.length-1],parents:u,key:c[c.length-1],isRoot:0===c.length,level:c.length,circular:null,update:function(t,e){m.isRoot||(m.parent.node[m.key]=t),m.node=t,e&&(f=!1)},delete:function(t){delete m.parent.node[m.key],t&&(f=!1)},remove:function(t){o(m.parent.node)?m.parent.node.splice(m.key,1):delete m.parent.node[m.key],t&&(f=!1)},keys:null,before:function(t){h.before=t},after:function(t){h.after=t},pre:function(t){h.pre=t},post:function(t){h.post=t},stop:function(){p=!1},block:function(){f=!1}};if(!p)return m;function y(){if("object"==typeof m.node&&null!==m.node){m.keys&&m.node_===m.node||(m.keys=n(m.node)),m.isLeaf=0===m.keys.length;for(var t=0;t<u.length;t++)if(u[t].node_===l){m.circular=u[t];break}}else m.isLeaf=!0,m.keys=null;m.notLeaf=!m.isLeaf,m.notRoot=!m.isRoot}y();var v=e.call(m,m.node);return void 0!==v&&m.update&&m.update(v),h.before&&h.before.call(m,m.node),f?("object"!=typeof m.node||null===m.node||m.circular||(u.push(m),y(),r(m.keys,(function(e,o){c.push(e),h.pre&&h.pre.call(m,m.node[e],e);var r=t(m.node[e]);a&&s.call(m.node,e)&&(m.node[e]=r.node),r.isLast=o===m.keys.length-1,r.isFirst=0===o,h.post&&h.post.call(m,r),c.pop()})),u.pop()),h.after&&h.after.call(m,m.node),m):m}(t).node}function c(t){this.value=t}function u(t){return new c(t)}c.prototype.get=function(t){for(var e=this.value,o=0;o<t.length;o++){var r=t[o];if(!e||!s.call(e,r))return;e=e[r]}return e},c.prototype.has=function(t){for(var e=this.value,o=0;o<t.length;o++){var r=t[o];if(!e||!s.call(e,r))return!1;e=e[r]}return!0},c.prototype.set=function(t,e){for(var o=this.value,r=0;r<t.length-1;r++){var n=t[r];s.call(o,n)||(o[n]={}),o=o[n]}return o[t[r]]=e,e},c.prototype.map=function(t){return a(this.value,t,!0)},c.prototype.forEach=function(t){return this.value=a(this.value,t,!1),this.value},c.prototype.reduce=function(t,e){var o=1===arguments.length,r=o?this.value:e;return this.forEach((function(e){this.isRoot&&o||(r=t.call(this,r,e))})),r},c.prototype.paths=function(){var t=[];return this.forEach((function(){t.push(this.path)})),t},c.prototype.nodes=function(){var t=[];return this.forEach((function(){t.push(this.node)})),t},c.prototype.clone=function(){var t=[],e=[];return function o(s){for(var a=0;a<t.length;a++)if(t[a]===s)return e[a];if("object"==typeof s&&null!==s){var c=i(s);return t.push(s),e.push(c),r(n(s),(function(t){c[t]=o(s[t])})),t.pop(),e.pop(),c}return s}(this.value)},r(n(c.prototype),(function(t){u[t]=function(e){var o=[].slice.call(arguments,1),r=new c(e);return r[t].apply(r,o)}})),t.exports=u},7218:(t,e,o)=>{function r(t,e){return function(){return t.apply(e,arguments)}}const{toString:n}=Object.prototype,{getPrototypeOf:s}=Object,i=(a=Object.create(null),t=>{const e=n.call(t);return a[e]||(a[e]=e.slice(8,-1).toLowerCase())});var a;const c=t=>(t=t.toLowerCase(),e=>i(e)===t),u=t=>e=>typeof e===t,{isArray:p}=Array,l=u("undefined"),d=c("ArrayBuffer"),h=u("string"),f=u("function"),m=u("number"),y=t=>null!==t&&"object"==typeof t,v=t=>{if("object"!==i(t))return!1;const e=s(t);return!(null!==e&&e!==Object.prototype&&null!==Object.getPrototypeOf(e)||Symbol.toStringTag in t||Symbol.iterator in t)},g=c("Date"),O=c("File"),b=c("Blob"),E=c("FileList"),S=c("URLSearchParams");function _(t,e,{allOwnKeys:o=!1}={}){if(null==t)return;let r,n;if("object"!=typeof t&&(t=[t]),p(t))for(r=0,n=t.length;r<n;r++)e.call(null,t[r],r,t);else{const n=o?Object.getOwnPropertyNames(t):Object.keys(t),s=n.length;let i;for(r=0;r<s;r++)i=n[r],e.call(null,t[i],i,t)}}function T(t,e){e=e.toLowerCase();const o=Object.keys(t);let r,n=o.length;for(;n-- >0;)if(r=o[n],e===r.toLowerCase())return r;return null}const R="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:o.g,C=t=>!l(t)&&t!==R,w=(q="undefined"!=typeof Uint8Array&&s(Uint8Array),t=>q&&t instanceof q);var q;const P=c("HTMLFormElement"),x=(({hasOwnProperty:t})=>(e,o)=>t.call(e,o))(Object.prototype),j=c("RegExp"),A=(t,e)=>{const o=Object.getOwnPropertyDescriptors(t),r={};_(o,((o,n)=>{!1!==e(o,n,t)&&(r[n]=o)})),Object.defineProperties(t,r)},k="abcdefghijklmnopqrstuvwxyz",I="0123456789",M={DIGIT:I,ALPHA:k,ALPHA_DIGIT:k+k.toUpperCase()+I};var B={isArray:p,isArrayBuffer:d,isBuffer:function(t){return null!==t&&!l(t)&&null!==t.constructor&&!l(t.constructor)&&f(t.constructor.isBuffer)&&t.constructor.isBuffer(t)},isFormData:t=>{const e="[object FormData]";return t&&("function"==typeof FormData&&t instanceof FormData||n.call(t)===e||f(t.toString)&&t.toString()===e)},isArrayBufferView:function(t){let e;return e="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&d(t.buffer),e},isString:h,isNumber:m,isBoolean:t=>!0===t||!1===t,isObject:y,isPlainObject:v,isUndefined:l,isDate:g,isFile:O,isBlob:b,isRegExp:j,isFunction:f,isStream:t=>y(t)&&f(t.pipe),isURLSearchParams:S,isTypedArray:w,isFileList:E,forEach:_,merge:function t(){const{caseless:e}=C(this)&&this||{},o={},r=(r,n)=>{const s=e&&T(o,n)||n;v(o[s])&&v(r)?o[s]=t(o[s],r):v(r)?o[s]=t({},r):p(r)?o[s]=r.slice():o[s]=r};for(let t=0,e=arguments.length;t<e;t++)arguments[t]&&_(arguments[t],r);return o},extend:(t,e,o,{allOwnKeys:n}={})=>(_(e,((e,n)=>{o&&f(e)?t[n]=r(e,o):t[n]=e}),{allOwnKeys:n}),t),trim:t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:t=>(65279===t.charCodeAt(0)&&(t=t.slice(1)),t),inherits:(t,e,o,r)=>{t.prototype=Object.create(e.prototype,r),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),o&&Object.assign(t.prototype,o)},toFlatObject:(t,e,o,r)=>{let n,i,a;const c={};if(e=e||{},null==t)return e;do{for(n=Object.getOwnPropertyNames(t),i=n.length;i-- >0;)a=n[i],r&&!r(a,t,e)||c[a]||(e[a]=t[a],c[a]=!0);t=!1!==o&&s(t)}while(t&&(!o||o(t,e))&&t!==Object.prototype);return e},kindOf:i,kindOfTest:c,endsWith:(t,e,o)=>{t=String(t),(void 0===o||o>t.length)&&(o=t.length),o-=e.length;const r=t.indexOf(e,o);return-1!==r&&r===o},toArray:t=>{if(!t)return null;if(p(t))return t;let e=t.length;if(!m(e))return null;const o=new Array(e);for(;e-- >0;)o[e]=t[e];return o},forEachEntry:(t,e)=>{const o=(t&&t[Symbol.iterator]).call(t);let r;for(;(r=o.next())&&!r.done;){const o=r.value;e.call(t,o[0],o[1])}},matchAll:(t,e)=>{let o;const r=[];for(;null!==(o=t.exec(e));)r.push(o);return r},isHTMLForm:P,hasOwnProperty:x,hasOwnProp:x,reduceDescriptors:A,freezeMethods:t=>{A(t,((e,o)=>{if(f(t)&&-1!==["arguments","caller","callee"].indexOf(o))return!1;const r=t[o];f(r)&&(e.enumerable=!1,"writable"in e?e.writable=!1:e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+o+"'")}))}))},toObjectSet:(t,e)=>{const o={},r=t=>{t.forEach((t=>{o[t]=!0}))};return p(t)?r(t):r(String(t).split(e)),o},toCamelCase:t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(t,e,o){return e.toUpperCase()+o})),noop:()=>{},toFiniteNumber:(t,e)=>(t=+t,Number.isFinite(t)?t:e),findKey:T,global:R,isContextDefined:C,ALPHABET:M,generateString:(t=16,e=M.ALPHA_DIGIT)=>{let o="";const{length:r}=e;for(;t--;)o+=e[Math.random()*r|0];return o},isSpecCompliantForm:function(t){return!!(t&&f(t.append)&&"FormData"===t[Symbol.toStringTag]&&t[Symbol.iterator])},toJSONObject:t=>{const e=new Array(10),o=(t,r)=>{if(y(t)){if(e.indexOf(t)>=0)return;if(!("toJSON"in t)){e[r]=t;const n=p(t)?[]:{};return _(t,((t,e)=>{const s=o(t,r+1);!l(s)&&(n[e]=s)})),e[r]=void 0,n}}return t};return o(t,0)}};function N(t,e,o,r,n){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=t,this.name="AxiosError",e&&(this.code=e),o&&(this.config=o),r&&(this.request=r),n&&(this.response=n)}B.inherits(N,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:B.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const G=N.prototype,D={};function L(t){return B.isPlainObject(t)||B.isArray(t)}function U(t){return B.endsWith(t,"[]")?t.slice(0,-2):t}function K(t,e,o){return t?t.concat(e).map((function(t,e){return t=U(t),!o&&e?"["+t+"]":t})).join(o?".":""):e}["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((t=>{D[t]={value:t}})),Object.defineProperties(N,D),Object.defineProperty(G,"isAxiosError",{value:!0}),N.from=(t,e,o,r,n,s)=>{const i=Object.create(G);return B.toFlatObject(t,i,(function(t){return t!==Error.prototype}),(t=>"isAxiosError"!==t)),N.call(i,t.message,e,o,r,n),i.cause=t,i.name=t.name,s&&Object.assign(i,s),i};const F=B.toFlatObject(B,{},null,(function(t){return/^is[A-Z]/.test(t)}));function H(t,e,o){if(!B.isObject(t))throw new TypeError("target must be an object");e=e||new FormData;const r=(o=B.toFlatObject(o,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(t,e){return!B.isUndefined(e[t])}))).metaTokens,n=o.visitor||u,s=o.dots,i=o.indexes,a=(o.Blob||"undefined"!=typeof Blob&&Blob)&&B.isSpecCompliantForm(e);if(!B.isFunction(n))throw new TypeError("visitor must be a function");function c(t){if(null===t)return"";if(B.isDate(t))return t.toISOString();if(!a&&B.isBlob(t))throw new N("Blob is not supported. Use a Buffer instead.");return B.isArrayBuffer(t)||B.isTypedArray(t)?a&&"function"==typeof Blob?new Blob([t]):Buffer.from(t):t}function u(t,o,n){let a=t;if(t&&!n&&"object"==typeof t)if(B.endsWith(o,"{}"))o=r?o:o.slice(0,-2),t=JSON.stringify(t);else if(B.isArray(t)&&function(t){return B.isArray(t)&&!t.some(L)}(t)||(B.isFileList(t)||B.endsWith(o,"[]"))&&(a=B.toArray(t)))return o=U(o),a.forEach((function(t,r){!B.isUndefined(t)&&null!==t&&e.append(!0===i?K([o],r,s):null===i?o:o+"[]",c(t))})),!1;return!!L(t)||(e.append(K(n,o,s),c(t)),!1)}const p=[],l=Object.assign(F,{defaultVisitor:u,convertValue:c,isVisitable:L});if(!B.isObject(t))throw new TypeError("data must be an object");return function t(o,r){if(!B.isUndefined(o)){if(-1!==p.indexOf(o))throw Error("Circular reference detected in "+r.join("."));p.push(o),B.forEach(o,(function(o,s){!0===(!(B.isUndefined(o)||null===o)&&n.call(e,o,B.isString(s)?s.trim():s,r,l))&&t(o,r?r.concat(s):[s])})),p.pop()}}(t),e}function z(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,(function(t){return e[t]}))}function V(t,e){this._pairs=[],t&&H(t,this,e)}const J=V.prototype;function W(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function X(t,e,o){if(!e)return t;const r=o&&o.encode||W,n=o&&o.serialize;let s;if(s=n?n(e,o):B.isURLSearchParams(e)?e.toString():new V(e,o).toString(r),s){const e=t.indexOf("#");-1!==e&&(t=t.slice(0,e)),t+=(-1===t.indexOf("?")?"?":"&")+s}return t}J.append=function(t,e){this._pairs.push([t,e])},J.toString=function(t){const e=t?function(e){return t.call(this,e,z)}:z;return this._pairs.map((function(t){return e(t[0])+"="+e(t[1])}),"").join("&")};var Y=class{constructor(){this.handlers=[]}use(t,e,o){return this.handlers.push({fulfilled:t,rejected:e,synchronous:!!o&&o.synchronous,runWhen:o?o.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){B.forEach(this.handlers,(function(e){null!==e&&t(e)}))}},Q={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},$={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:V,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},isStandardBrowserEnv:(()=>{let t;return("undefined"==typeof navigator||"ReactNative"!==(t=navigator.product)&&"NativeScript"!==t&&"NS"!==t)&&"undefined"!=typeof window&&"undefined"!=typeof document})(),isStandardBrowserWebWorkerEnv:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,protocols:["http","https","file","blob","url","data"]};function Z(t){function e(t,o,r,n){let s=t[n++];const i=Number.isFinite(+s),a=n>=t.length;return s=!s&&B.isArray(r)?r.length:s,a?(B.hasOwnProp(r,s)?r[s]=[r[s],o]:r[s]=o,!i):(r[s]&&B.isObject(r[s])||(r[s]=[]),e(t,o,r[s],n)&&B.isArray(r[s])&&(r[s]=function(t){const e={},o=Object.keys(t);let r;const n=o.length;let s;for(r=0;r<n;r++)s=o[r],e[s]=t[s];return e}(r[s])),!i)}if(B.isFormData(t)&&B.isFunction(t.entries)){const o={};return B.forEachEntry(t,((t,r)=>{e(function(t){return B.matchAll(/\w+|\[(\w*)]/g,t).map((t=>"[]"===t[0]?"":t[1]||t[0]))}(t),r,o,0)})),o}return null}const tt={"Content-Type":void 0},et={transitional:Q,adapter:["xhr","http"],transformRequest:[function(t,e){const o=e.getContentType()||"",r=o.indexOf("application/json")>-1,n=B.isObject(t);if(n&&B.isHTMLForm(t)&&(t=new FormData(t)),B.isFormData(t))return r&&r?JSON.stringify(Z(t)):t;if(B.isArrayBuffer(t)||B.isBuffer(t)||B.isStream(t)||B.isFile(t)||B.isBlob(t))return t;if(B.isArrayBufferView(t))return t.buffer;if(B.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;if(n){if(o.indexOf("application/x-www-form-urlencoded")>-1)return function(t,e){return H(t,new $.classes.URLSearchParams,Object.assign({visitor:function(t,e,o,r){return $.isNode&&B.isBuffer(t)?(this.append(e,t.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},e))}(t,this.formSerializer).toString();if((s=B.isFileList(t))||o.indexOf("multipart/form-data")>-1){const e=this.env&&this.env.FormData;return H(s?{"files[]":t}:t,e&&new e,this.formSerializer)}}return n||r?(e.setContentType("application/json",!1),function(t,e,o){if(B.isString(t))try{return(0,JSON.parse)(t),B.trim(t)}catch(t){if("SyntaxError"!==t.name)throw t}return(0,JSON.stringify)(t)}(t)):t}],transformResponse:[function(t){const e=this.transitional||et.transitional,o=e&&e.forcedJSONParsing,r="json"===this.responseType;if(t&&B.isString(t)&&(o&&!this.responseType||r)){const o=!(e&&e.silentJSONParsing)&&r;try{return JSON.parse(t)}catch(t){if(o){if("SyntaxError"===t.name)throw N.from(t,N.ERR_BAD_RESPONSE,this,null,this.response);throw t}}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:$.classes.FormData,Blob:$.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};B.forEach(["delete","get","head"],(function(t){et.headers[t]={}})),B.forEach(["post","put","patch"],(function(t){et.headers[t]=B.merge(tt)}));var ot=et;const rt=B.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"]),nt=Symbol("internals");function st(t){return t&&String(t).trim().toLowerCase()}function it(t){return!1===t||null==t?t:B.isArray(t)?t.map(it):String(t)}function at(t,e,o,r,n){return B.isFunction(r)?r.call(this,e,o):(n&&(e=o),B.isString(e)?B.isString(r)?-1!==e.indexOf(r):B.isRegExp(r)?r.test(e):void 0:void 0)}class ct{constructor(t){t&&this.set(t)}set(t,e,o){const r=this;function n(t,e,o){const n=st(e);if(!n)throw new Error("header name must be a non-empty string");const s=B.findKey(r,n);(!s||void 0===r[s]||!0===o||void 0===o&&!1!==r[s])&&(r[s||e]=it(t))}const s=(t,e)=>B.forEach(t,((t,o)=>n(t,o,e)));return B.isPlainObject(t)||t instanceof this.constructor?s(t,e):B.isString(t)&&(t=t.trim())&&!/^[-_a-zA-Z]+$/.test(t.trim())?s((t=>{const e={};let o,r,n;return t&&t.split("\n").forEach((function(t){n=t.indexOf(":"),o=t.substring(0,n).trim().toLowerCase(),r=t.substring(n+1).trim(),!o||e[o]&&rt[o]||("set-cookie"===o?e[o]?e[o].push(r):e[o]=[r]:e[o]=e[o]?e[o]+", "+r:r)})),e})(t),e):null!=t&&n(e,t,o),this}get(t,e){if(t=st(t)){const o=B.findKey(this,t);if(o){const t=this[o];if(!e)return t;if(!0===e)return function(t){const e=Object.create(null),o=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=o.exec(t);)e[r[1]]=r[2];return e}(t);if(B.isFunction(e))return e.call(this,t,o);if(B.isRegExp(e))return e.exec(t);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=st(t)){const o=B.findKey(this,t);return!(!o||void 0===this[o]||e&&!at(0,this[o],o,e))}return!1}delete(t,e){const o=this;let r=!1;function n(t){if(t=st(t)){const n=B.findKey(o,t);!n||e&&!at(0,o[n],n,e)||(delete o[n],r=!0)}}return B.isArray(t)?t.forEach(n):n(t),r}clear(t){const e=Object.keys(this);let o=e.length,r=!1;for(;o--;){const n=e[o];t&&!at(0,this[n],n,t,!0)||(delete this[n],r=!0)}return r}normalize(t){const e=this,o={};return B.forEach(this,((r,n)=>{const s=B.findKey(o,n);if(s)return e[s]=it(r),void delete e[n];const i=t?function(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((t,e,o)=>e.toUpperCase()+o))}(n):String(n).trim();i!==n&&delete e[n],e[i]=it(r),o[i]=!0})),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return B.forEach(this,((o,r)=>{null!=o&&!1!==o&&(e[r]=t&&B.isArray(o)?o.join(", "):o)})),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([t,e])=>t+": "+e)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const o=new this(t);return e.forEach((t=>o.set(t))),o}static accessor(t){const e=(this[nt]=this[nt]={accessors:{}}).accessors,o=this.prototype;function r(t){const r=st(t);e[r]||(function(t,e){const o=B.toCamelCase(" "+e);["get","set","has"].forEach((r=>{Object.defineProperty(t,r+o,{value:function(t,o,n){return this[r].call(this,e,t,o,n)},configurable:!0})}))}(o,t),e[r]=!0)}return B.isArray(t)?t.forEach(r):r(t),this}}ct.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),B.freezeMethods(ct.prototype),B.freezeMethods(ct);var ut=ct;function pt(t,e){const o=this||ot,r=e||o,n=ut.from(r.headers);let s=r.data;return B.forEach(t,(function(t){s=t.call(o,s,n.normalize(),e?e.status:void 0)})),n.normalize(),s}function lt(t){return!(!t||!t.__CANCEL__)}function dt(t,e,o){N.call(this,null==t?"canceled":t,N.ERR_CANCELED,e,o),this.name="CanceledError"}B.inherits(dt,N,{__CANCEL__:!0});var ht=$.isStandardBrowserEnv?{write:function(t,e,o,r,n,s){const i=[];i.push(t+"="+encodeURIComponent(e)),B.isNumber(o)&&i.push("expires="+new Date(o).toGMTString()),B.isString(r)&&i.push("path="+r),B.isString(n)&&i.push("domain="+n),!0===s&&i.push("secure"),document.cookie=i.join("; ")},read:function(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}};function ft(t,e){return t&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)?function(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}(t,e):e}var mt=$.isStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),e=document.createElement("a");let o;function r(o){let r=o;return t&&(e.setAttribute("href",r),r=e.href),e.setAttribute("href",r),{href:e.href,protocol:e.protocol?e.protocol.replace(/:$/,""):"",host:e.host,search:e.search?e.search.replace(/^\?/,""):"",hash:e.hash?e.hash.replace(/^#/,""):"",hostname:e.hostname,port:e.port,pathname:"/"===e.pathname.charAt(0)?e.pathname:"/"+e.pathname}}return o=r(window.location.href),function(t){const e=B.isString(t)?r(t):t;return e.protocol===o.protocol&&e.host===o.host}}():function(){return!0};function yt(t,e){let o=0;const r=function(t,e){t=t||10;const o=new Array(t),r=new Array(t);let n,s=0,i=0;return e=void 0!==e?e:1e3,function(a){const c=Date.now(),u=r[i];n||(n=c),o[s]=a,r[s]=c;let p=i,l=0;for(;p!==s;)l+=o[p++],p%=t;if(s=(s+1)%t,s===i&&(i=(i+1)%t),c-n<e)return;const d=u&&c-u;return d?Math.round(1e3*l/d):void 0}}(50,250);return n=>{const s=n.loaded,i=n.lengthComputable?n.total:void 0,a=s-o,c=r(a);o=s;const u={loaded:s,total:i,progress:i?s/i:void 0,bytes:a,rate:c||void 0,estimated:c&&i&&s<=i?(i-s)/c:void 0,event:n};u[e?"download":"upload"]=!0,t(u)}}const vt={http:null,xhr:"undefined"!=typeof XMLHttpRequest&&function(t){return new Promise((function(e,o){let r=t.data;const n=ut.from(t.headers).normalize(),s=t.responseType;let i;function a(){t.cancelToken&&t.cancelToken.unsubscribe(i),t.signal&&t.signal.removeEventListener("abort",i)}B.isFormData(r)&&($.isStandardBrowserEnv||$.isStandardBrowserWebWorkerEnv)&&n.setContentType(!1);let c=new XMLHttpRequest;if(t.auth){const e=t.auth.username||"",o=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";n.set("Authorization","Basic "+btoa(e+":"+o))}const u=ft(t.baseURL,t.url);function p(){if(!c)return;const r=ut.from("getAllResponseHeaders"in c&&c.getAllResponseHeaders());!function(t,e,o){const r=o.config.validateStatus;o.status&&r&&!r(o.status)?e(new N("Request failed with status code "+o.status,[N.ERR_BAD_REQUEST,N.ERR_BAD_RESPONSE][Math.floor(o.status/100)-4],o.config,o.request,o)):t(o)}((function(t){e(t),a()}),(function(t){o(t),a()}),{data:s&&"text"!==s&&"json"!==s?c.response:c.responseText,status:c.status,statusText:c.statusText,headers:r,config:t,request:c}),c=null}if(c.open(t.method.toUpperCase(),X(u,t.params,t.paramsSerializer),!0),c.timeout=t.timeout,"onloadend"in c?c.onloadend=p:c.onreadystatechange=function(){c&&4===c.readyState&&(0!==c.status||c.responseURL&&0===c.responseURL.indexOf("file:"))&&setTimeout(p)},c.onabort=function(){c&&(o(new N("Request aborted",N.ECONNABORTED,t,c)),c=null)},c.onerror=function(){o(new N("Network Error",N.ERR_NETWORK,t,c)),c=null},c.ontimeout=function(){let e=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded";const r=t.transitional||Q;t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),o(new N(e,r.clarifyTimeoutError?N.ETIMEDOUT:N.ECONNABORTED,t,c)),c=null},$.isStandardBrowserEnv){const e=(t.withCredentials||mt(u))&&t.xsrfCookieName&&ht.read(t.xsrfCookieName);e&&n.set(t.xsrfHeaderName,e)}void 0===r&&n.setContentType(null),"setRequestHeader"in c&&B.forEach(n.toJSON(),(function(t,e){c.setRequestHeader(e,t)})),B.isUndefined(t.withCredentials)||(c.withCredentials=!!t.withCredentials),s&&"json"!==s&&(c.responseType=t.responseType),"function"==typeof t.onDownloadProgress&&c.addEventListener("progress",yt(t.onDownloadProgress,!0)),"function"==typeof t.onUploadProgress&&c.upload&&c.upload.addEventListener("progress",yt(t.onUploadProgress)),(t.cancelToken||t.signal)&&(i=e=>{c&&(o(!e||e.type?new dt(null,t,c):e),c.abort(),c=null)},t.cancelToken&&t.cancelToken.subscribe(i),t.signal&&(t.signal.aborted?i():t.signal.addEventListener("abort",i)));const l=function(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}(u);l&&-1===$.protocols.indexOf(l)?o(new N("Unsupported protocol "+l+":",N.ERR_BAD_REQUEST,t)):c.send(r||null)}))}};B.forEach(vt,((t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch(t){}Object.defineProperty(t,"adapterName",{value:e})}}));function gt(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new dt(null,t)}function Ot(t){return gt(t),t.headers=ut.from(t.headers),t.data=pt.call(t,t.transformRequest),-1!==["post","put","patch"].indexOf(t.method)&&t.headers.setContentType("application/x-www-form-urlencoded",!1),(t=>{t=B.isArray(t)?t:[t];const{length:e}=t;let o,r;for(let n=0;n<e&&(o=t[n],!(r=B.isString(o)?vt[o.toLowerCase()]:o));n++);if(!r){if(!1===r)throw new N(`Adapter ${o} is not supported by the environment`,"ERR_NOT_SUPPORT");throw new Error(B.hasOwnProp(vt,o)?`Adapter '${o}' is not available in the build`:`Unknown adapter '${o}'`)}if(!B.isFunction(r))throw new TypeError("adapter is not a function");return r})(t.adapter||ot.adapter)(t).then((function(e){return gt(t),e.data=pt.call(t,t.transformResponse,e),e.headers=ut.from(e.headers),e}),(function(e){return lt(e)||(gt(t),e&&e.response&&(e.response.data=pt.call(t,t.transformResponse,e.response),e.response.headers=ut.from(e.response.headers))),Promise.reject(e)}))}const bt=t=>t instanceof ut?t.toJSON():t;function Et(t,e){e=e||{};const o={};function r(t,e,o){return B.isPlainObject(t)&&B.isPlainObject(e)?B.merge.call({caseless:o},t,e):B.isPlainObject(e)?B.merge({},e):B.isArray(e)?e.slice():e}function n(t,e,o){return B.isUndefined(e)?B.isUndefined(t)?void 0:r(void 0,t,o):r(t,e,o)}function s(t,e){if(!B.isUndefined(e))return r(void 0,e)}function i(t,e){return B.isUndefined(e)?B.isUndefined(t)?void 0:r(void 0,t):r(void 0,e)}function a(o,n,s){return s in e?r(o,n):s in t?r(void 0,o):void 0}const c={url:s,method:s,data:s,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials: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:a,headers:(t,e)=>n(bt(t),bt(e),!0)};return B.forEach(Object.keys(t).concat(Object.keys(e)),(function(r){const s=c[r]||n,i=s(t[r],e[r],r);B.isUndefined(i)&&s!==a||(o[r]=i)})),o}const St={};["object","boolean","number","function","string","symbol"].forEach(((t,e)=>{St[t]=function(o){return typeof o===t||"a"+(e<1?"n ":" ")+t}}));const _t={};St.transitional=function(t,e,o){function r(t,e){return"[Axios v1.3.4] Transitional option '"+t+"'"+e+(o?". "+o:"")}return(o,n,s)=>{if(!1===t)throw new N(r(n," has been removed"+(e?" in "+e:"")),N.ERR_DEPRECATED);return e&&!_t[n]&&(_t[n]=!0,console.warn(r(n," has been deprecated since v"+e+" and will be removed in the near future"))),!t||t(o,n,s)}};var Tt={assertOptions:function(t,e,o){if("object"!=typeof t)throw new N("options must be an object",N.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let n=r.length;for(;n-- >0;){const s=r[n],i=e[s];if(i){const e=t[s],o=void 0===e||i(e,s,t);if(!0!==o)throw new N("option "+s+" must be "+o,N.ERR_BAD_OPTION_VALUE)}else if(!0!==o)throw new N("Unknown option "+s,N.ERR_BAD_OPTION)}},validators:St};const Rt=Tt.validators;class Ct{constructor(t){this.defaults=t,this.interceptors={request:new Y,response:new Y}}request(t,e){"string"==typeof t?(e=e||{}).url=t:e=t||{},e=Et(this.defaults,e);const{transitional:o,paramsSerializer:r,headers:n}=e;let s;void 0!==o&&Tt.assertOptions(o,{silentJSONParsing:Rt.transitional(Rt.boolean),forcedJSONParsing:Rt.transitional(Rt.boolean),clarifyTimeoutError:Rt.transitional(Rt.boolean)},!1),void 0!==r&&Tt.assertOptions(r,{encode:Rt.function,serialize:Rt.function},!0),e.method=(e.method||this.defaults.method||"get").toLowerCase(),s=n&&B.merge(n.common,n[e.method]),s&&B.forEach(["delete","get","head","post","put","patch","common"],(t=>{delete n[t]})),e.headers=ut.concat(s,n);const i=[];let a=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(a=a&&t.synchronous,i.unshift(t.fulfilled,t.rejected))}));const c=[];let u;this.interceptors.response.forEach((function(t){c.push(t.fulfilled,t.rejected)}));let p,l=0;if(!a){const t=[Ot.bind(this),void 0];for(t.unshift.apply(t,i),t.push.apply(t,c),p=t.length,u=Promise.resolve(e);l<p;)u=u.then(t[l++],t[l++]);return u}p=i.length;let d=e;for(l=0;l<p;){const t=i[l++],e=i[l++];try{d=t(d)}catch(t){e.call(this,t);break}}try{u=Ot.call(this,d)}catch(t){return Promise.reject(t)}for(l=0,p=c.length;l<p;)u=u.then(c[l++],c[l++]);return u}getUri(t){return X(ft((t=Et(this.defaults,t)).baseURL,t.url),t.params,t.paramsSerializer)}}B.forEach(["delete","get","head","options"],(function(t){Ct.prototype[t]=function(e,o){return this.request(Et(o||{},{method:t,url:e,data:(o||{}).data}))}})),B.forEach(["post","put","patch"],(function(t){function e(e){return function(o,r,n){return this.request(Et(n||{},{method:t,headers:e?{"Content-Type":"multipart/form-data"}:{},url:o,data:r}))}}Ct.prototype[t]=e(),Ct.prototype[t+"Form"]=e(!0)}));var wt=Ct;class qt{constructor(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");let e;this.promise=new Promise((function(t){e=t}));const o=this;this.promise.then((t=>{if(!o._listeners)return;let e=o._listeners.length;for(;e-- >0;)o._listeners[e](t);o._listeners=null})),this.promise.then=t=>{let e;const r=new Promise((t=>{o.subscribe(t),e=t})).then(t);return r.cancel=function(){o.unsubscribe(e)},r},t((function(t,r,n){o.reason||(o.reason=new dt(t,r,n),e(o.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){this.reason?t(this.reason):this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const e=this._listeners.indexOf(t);-1!==e&&this._listeners.splice(e,1)}static source(){let t;return{token:new qt((function(e){t=e})),cancel:t}}}var Pt=qt;const xt={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(xt).forEach((([t,e])=>{xt[e]=t}));var jt=xt;const At=function t(e){const o=new wt(e),n=r(wt.prototype.request,o);return B.extend(n,wt.prototype,o,{allOwnKeys:!0}),B.extend(n,o,null,{allOwnKeys:!0}),n.create=function(o){return t(Et(e,o))},n}(ot);At.Axios=wt,At.CanceledError=dt,At.CancelToken=Pt,At.isCancel=lt,At.VERSION="1.3.4",At.toFormData=H,At.AxiosError=N,At.Cancel=At.CanceledError,At.all=function(t){return Promise.all(t)},At.spread=function(t){return function(e){return t.apply(null,e)}},At.isAxiosError=function(t){return B.isObject(t)&&!0===t.isAxiosError},At.mergeConfig=Et,At.AxiosHeaders=ut,At.formToJSON=t=>Z(B.isHTMLForm(t)?new FormData(t):t),At.HttpStatusCode=jt,At.default=At,t.exports=At}},e={};function o(r){var n=e[r];if(void 0!==n)return n.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,o),s.exports}o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}();var r=o(2915),n=exports;for(var s in r)n[s]=r[s];r.__esModule&&Object.defineProperty(n,"__esModule",{value:!0});
|
|
2
2
|
//# sourceMappingURL=ge-commercetools-utils-browser.cjs.js.map
|