@wix/stores 1.0.959 → 1.0.960
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/_sdk-exports/context-category-by-id-context-provider/runtime.d.ts +4026 -0
- package/_sdk-exports/context-category-by-id-context-provider/runtime.js +2 -0
- package/_sdk-exports/context-category-by-slug-context-provider/runtime.d.ts +4046 -0
- package/_sdk-exports/context-category-by-slug-context-provider/runtime.js +2 -0
- package/_sdk-exports/context-category-info-context-provider/runtime.d.ts +3530 -0
- package/_sdk-exports/context-category-info-context-provider/runtime.js +2 -0
- package/_sdk-exports/context-category-list-context-provider/runtime.d.ts +101 -0
- package/_sdk-exports/context-category-list-context-provider/runtime.js +2 -0
- package/_sdk-exports/context-product-by-id-context-provider/runtime.d.ts +4221 -0
- package/_sdk-exports/context-product-by-id-context-provider/runtime.js +2 -0
- package/_sdk-exports/context-product-by-slug-context-provider/runtime.d.ts +4217 -0
- package/_sdk-exports/context-product-by-slug-context-provider/runtime.js +2 -0
- package/_sdk-exports/context-product-context-provider/runtime.d.ts +4449 -0
- package/_sdk-exports/context-product-context-provider/runtime.js +2 -0
- package/_sdk-exports/context-product-item-context-provider/runtime.d.ts +4102 -0
- package/_sdk-exports/context-product-item-context-provider/runtime.js +2 -0
- package/_sdk-exports/context-product-list-context-provider/runtime.d.ts +3969 -0
- package/_sdk-exports/context-product-list-context-provider/runtime.js +2 -0
- package/_sdk-exports/context-promotion-item-context-provider/runtime.d.ts +85 -0
- package/_sdk-exports/context-promotion-item-context-provider/runtime.js +2 -0
- package/build/cjs/context-category-by-id-context-provider.d.ts +4026 -0
- package/build/cjs/context-category-by-id-context-provider.js +3572 -0
- package/build/cjs/context-category-by-id-context-provider.js.map +1 -0
- package/build/cjs/context-category-by-slug-context-provider.d.ts +4046 -0
- package/build/cjs/context-category-by-slug-context-provider.js +3674 -0
- package/build/cjs/context-category-by-slug-context-provider.js.map +1 -0
- package/build/cjs/context-category-info-context-provider.d.ts +3530 -0
- package/build/cjs/context-category-info-context-provider.js +1201 -0
- package/build/cjs/context-category-info-context-provider.js.map +1 -0
- package/build/cjs/context-category-list-context-provider.d.ts +101 -0
- package/build/cjs/context-category-list-context-provider.js +587 -0
- package/build/cjs/context-category-list-context-provider.js.map +1 -0
- package/build/cjs/context-product-by-id-context-provider.d.ts +4221 -0
- package/build/cjs/context-product-by-id-context-provider.js +3454 -0
- package/build/cjs/context-product-by-id-context-provider.js.map +1 -0
- package/build/cjs/context-product-by-slug-context-provider.d.ts +4217 -0
- package/build/cjs/context-product-by-slug-context-provider.js +3477 -0
- package/build/cjs/context-product-by-slug-context-provider.js.map +1 -0
- package/build/cjs/context-product-context-provider.d.ts +4449 -0
- package/build/cjs/context-product-context-provider.js +587 -0
- package/build/cjs/context-product-context-provider.js.map +1 -0
- package/build/cjs/context-product-item-context-provider.d.ts +4102 -0
- package/build/cjs/context-product-item-context-provider.js +4396 -0
- package/build/cjs/context-product-item-context-provider.js.map +1 -0
- package/build/cjs/context-product-list-context-provider.d.ts +3970 -0
- package/build/cjs/context-product-list-context-provider.js +587 -0
- package/build/cjs/context-product-list-context-provider.js.map +1 -0
- package/build/cjs/context-promotion-item-context-provider.d.ts +85 -0
- package/build/cjs/context-promotion-item-context-provider.js +592 -0
- package/build/cjs/context-promotion-item-context-provider.js.map +1 -0
- package/build/es/context-category-by-id-context-provider.d.mts +4026 -0
- package/build/es/context-category-by-id-context-provider.mjs +3532 -0
- package/build/es/context-category-by-id-context-provider.mjs.map +1 -0
- package/build/es/context-category-by-slug-context-provider.d.mts +4046 -0
- package/build/es/context-category-by-slug-context-provider.mjs +3634 -0
- package/build/es/context-category-by-slug-context-provider.mjs.map +1 -0
- package/build/es/context-category-info-context-provider.d.mts +3530 -0
- package/build/es/context-category-info-context-provider.mjs +1172 -0
- package/build/es/context-category-info-context-provider.mjs.map +1 -0
- package/build/es/context-category-list-context-provider.d.mts +101 -0
- package/build/es/context-category-list-context-provider.mjs +558 -0
- package/build/es/context-category-list-context-provider.mjs.map +1 -0
- package/build/es/context-product-by-id-context-provider.d.mts +4221 -0
- package/build/es/context-product-by-id-context-provider.mjs +3415 -0
- package/build/es/context-product-by-id-context-provider.mjs.map +1 -0
- package/build/es/context-product-by-slug-context-provider.d.mts +4217 -0
- package/build/es/context-product-by-slug-context-provider.mjs +3437 -0
- package/build/es/context-product-by-slug-context-provider.mjs.map +1 -0
- package/build/es/context-product-context-provider.d.mts +4449 -0
- package/build/es/context-product-context-provider.mjs +558 -0
- package/build/es/context-product-context-provider.mjs.map +1 -0
- package/build/es/context-product-item-context-provider.d.mts +4102 -0
- package/build/es/context-product-item-context-provider.mjs +4356 -0
- package/build/es/context-product-item-context-provider.mjs.map +1 -0
- package/build/es/context-product-list-context-provider.d.mts +3970 -0
- package/build/es/context-product-list-context-provider.mjs +558 -0
- package/build/es/context-product-list-context-provider.mjs.map +1 -0
- package/build/es/context-promotion-item-context-provider.d.mts +85 -0
- package/build/es/context-promotion-item-context-provider.mjs +563 -0
- package/build/es/context-promotion-item-context-provider.mjs.map +1 -0
- package/build/internal/cjs/context-category-by-id-context-provider.d.ts +4026 -0
- package/build/internal/cjs/context-category-by-slug-context-provider.d.ts +4046 -0
- package/build/internal/cjs/context-category-info-context-provider.d.ts +3530 -0
- package/build/internal/cjs/context-category-list-context-provider.d.ts +101 -0
- package/build/internal/cjs/context-product-by-id-context-provider.d.ts +4221 -0
- package/build/internal/cjs/context-product-by-slug-context-provider.d.ts +4217 -0
- package/build/internal/cjs/context-product-context-provider.d.ts +4449 -0
- package/build/internal/cjs/context-product-item-context-provider.d.ts +4102 -0
- package/build/internal/cjs/context-product-list-context-provider.d.ts +3970 -0
- package/build/internal/cjs/context-promotion-item-context-provider.d.ts +85 -0
- package/build/internal/es/context-category-by-id-context-provider.d.mts +4026 -0
- package/build/internal/es/context-category-by-slug-context-provider.d.mts +4046 -0
- package/build/internal/es/context-category-info-context-provider.d.mts +3530 -0
- package/build/internal/es/context-category-list-context-provider.d.mts +101 -0
- package/build/internal/es/context-product-by-id-context-provider.d.mts +4221 -0
- package/build/internal/es/context-product-by-slug-context-provider.d.mts +4217 -0
- package/build/internal/es/context-product-context-provider.d.mts +4449 -0
- package/build/internal/es/context-product-item-context-provider.d.mts +4102 -0
- package/build/internal/es/context-product-list-context-provider.d.mts +3970 -0
- package/build/internal/es/context-promotion-item-context-provider.d.mts +85 -0
- package/category-by-id-context-provider/package.json +3 -0
- package/category-by-slug-context-provider/package.json +3 -0
- package/category-info-context-provider/package.json +3 -0
- package/category-list-context-provider/package.json +3 -0
- package/context/category-by-id-context-provider/package.json +3 -0
- package/context/category-by-slug-context-provider/package.json +3 -0
- package/context/category-info-context-provider/package.json +3 -0
- package/context/category-list-context-provider/package.json +3 -0
- package/context/product-by-id-context-provider/package.json +3 -0
- package/context/product-by-slug-context-provider/package.json +3 -0
- package/context/product-context-provider/package.json +3 -0
- package/context/product-item-context-provider/package.json +3 -0
- package/context/product-list-context-provider/package.json +3 -0
- package/context/promotion-item-context-provider/package.json +3 -0
- package/package.json +159 -24
- package/product-by-id-context-provider/package.json +3 -0
- package/product-by-slug-context-provider/package.json +3 -0
- package/product-context-provider/package.json +3 -0
- package/product-item-context-provider/package.json +3 -0
- package/product-list-context-provider/package.json +3 -0
- package/promotion-item-context-provider/package.json +3 -0
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import*as e from"react";import{Suspense as t,useCallback as n,useMemo as r,useRef as i,useState as a,useSyncExternalStore as o}from"react";import{jsx as s}from"react/jsx-runtime";import c from"@wix/stores/product-list-context-provider";import l from"@wix/stores/category-info-context-provider";import u from"@wix/stores/category-list-context-provider";import{useGetService as d,useService as f}from"@wix/services-manager-react";var p=Object.create,m=Object.defineProperty,ee=Object.getOwnPropertyDescriptor,te=Object.getOwnPropertyNames,ne=Object.getPrototypeOf,h=Object.prototype.hasOwnProperty,g=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),re=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=te(t),a=0,o=i.length,s;a<o;a++)s=i[a],!h.call(e,s)&&s!==n&&m(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=ee(t,s))||r.enumerable});return e},_=(e,t,n)=>(n=e==null?{}:p(ne(e)),re(t||!e||!e.__esModule||!h.call(e,`default`)?m(n,`default`,{value:e,enumerable:!0}):n,e)),v={};function y(e,t=!1,n=e=>e){return()=>({__type:`event-definition`,type:e,isDomainEvent:t,transformations:n})}var ie=e=>{switch(e){case`get`:case`GET`:return`GET`;case`post`:case`POST`:return`POST`;case`put`:case`PUT`:return`PUT`;case`delete`:case`DELETE`:return`DELETE`;case`patch`:case`PATCH`:return`PATCH`;case`head`:case`HEAD`:return`HEAD`;case`options`:case`OPTIONS`:return`OPTIONS`;default:throw Error(`Unknown method: ${e}`)}},ae=e=>t=>async n=>{let r,i=t=>{if(r=e(n)(t),r.url===void 0)throw Error(`Url was not successfully created for this request, please reach out to support channels for assistance.`);let{method:i,url:a,params:o}=r;return{...r,method:ie(i),url:a,data:r.data,params:o}};try{let e=await t.request(i);if(r===void 0)throw Error(`Request options were not created for this request, please reach out to support channels for assistance.`);let n=Array.isArray(r.transformResponse)?r.transformResponse:[r.transformResponse],a=e.data;return n.forEach(t=>{t&&(a=t(e.data,e.headers))}),a}catch(e){throw typeof e==`object`&&e&&`response`in e&&typeof e.response==`object`&&e.response!==null&&`data`in e.response?e.response.data:e}},oe=e=>e.__isAmbassador?!0:!!e().__isAmbassador,se=`__metadata`,ce=`edge.wixapis.com`,le=class extends Error{message;response;constructor(e,t){super(e),this.message=e,this.response=t}async details(){let e=await this.response.json();return ue(this.response.status,e?.message,e?.details,{requestId:this.response.headers.get(`X-Wix-Request-Id`),details:e})}},ue=(e,t,n,r)=>({details:{...!n?.validationError&&{applicationError:{description:t,code:e,data:r}},...n},message:t,requestId:r?.requestId}),de=e=>e?.method&&[`post`,`put`,`patch`].includes(e.method.toLocaleLowerCase())&&e.body?{"Content-Type":`application/json`}:{},fe=e=>e&&typeof e==`object`&&!Array.isArray(e),pe=e=>e.__type===`host`;function me(e,t){return e.create(t)}var he=`x-wix-bi-gateway`;function ge(e,t,n){return{[he]:_e({environment:`js-sdk${n?`-${n}`:``}`,"package-name":e.packageName??t?.PACKAGE_NAME,"method-fqn":e.methodFqn,entity:e.entityFqdn})}}function _e(e){return Object.entries(e).filter(([e,t])=>!!t).map(([e,t])=>`${e}=${t}`).join(`,`)}function ve(e){let t=globalThis.__wix_context__,n={client:v.client,elevatedClient:v.elevatedClient},r;globalThis.__wix_context__=void 0,v.client=void 0,v.elevatedClient=void 0,typeof $wixContext<`u`&&(r={client:$wixContext?.client,elevatedClient:$wixContext?.elevatedClient},delete $wixContext.client,delete $wixContext.elevatedClient);try{return e()}finally{globalThis.__wix_context__=t,v.client=n.client,v.elevatedClient=n.elevatedClient,typeof $wixContext<`u`&&($wixContext.client=r.client,$wixContext.elevatedClient=r.elevatedClient)}}var ye={id:`_id`,createdDate:`_createdDate`,updatedDate:`_updatedDate`};function be(e){return Te(e).map(e=>e.toLocaleUpperCase()).join(`_`)}var xe=/([\p{Ll}\d])(\p{Lu})/gu,Se=/(\p{Lu})([\p{Lu}][\p{Ll}])/gu,Ce=`$1\0$2`,we=/[^\p{L}\d]+/giu;function Te(e){let t=e.trim();t=t.replace(xe,Ce).replace(Se,Ce),t=t.replace(we,`\0`);let n=0,r=t.length;for(;t.charAt(n)===`\0`;)n++;if(n===r)return[];for(;t.charAt(r-1)===`\0`;)r--;return t.slice(n,r).split(/\0/g)}var Ee=e=>`validationError`in(e.response?.data?.details??{}),De=e=>`applicationError`in(e.response?.data?.details??{}),Oe=e=>(e.response?.status??-1)>=400&&(e.response?.status??-1)<500;function ke(e,t={explicitPathsToArguments:{},spreadPathsToArguments:{},singleArgumentUnchanged:!1},n=[]){if(typeof e!=`object`||!e)throw e;if(Ee(e))return Ae(e,t,n);if(De(e))return Me(e);if(Oe(e)){let t=e.response?.status,n=e.response?.statusText??`UNKNOWN`,r=e.response?.data?.message??n,i={applicationError:{description:n,code:be(n),data:{}},requestId:e.requestId};return je(e,{message:JSON.stringify({message:r,details:i},null,2),extraProperties:{details:i,status:t}})}return Ne(e)}var Ae=(e,t,n)=>{let r=e.response?.data,i=e.requestId,{fieldViolations:a}=r.details.validationError,o=Pe(t,a,n)?.sort((e,t)=>e.field<t.field?-1:1),s=`INVALID_ARGUMENT: ${o?.map(({field:e,description:t})=>`"${e}" ${t}`)?.join(`, `)}`,c={validationError:{fieldViolations:o},requestId:i};return je(e,{message:JSON.stringify({message:s,details:c},null,2),extraProperties:{details:c,status:e.response?.status,requestId:i}})},je=(e,{message:t,extraProperties:n})=>Object.assign(e,{...n,message:t}),Me=e=>{let t=e.response?.status,n=e.response?.statusText??`UNKNOWN`,r=e.response?.data?.message??n,i=e.response?.data?.details?.applicationError?.description??n,a=e.response?.data?.details?.applicationError?.code??be(n),o=e.response?.data?.details?.applicationError?.data??{},s=r===i?r:`${r}: ${i}`,c={applicationError:{description:i,code:a,data:o},requestId:e.requestId};return je(e,{message:JSON.stringify({message:s,details:c},null,2),extraProperties:{details:c,status:t,requestId:e.requestId}})},Ne=e=>je(e,{message:e.requestId?`System error occurred, request-id: ${e.requestId}`:`System error occurred: ${JSON.stringify(e)}`,extraProperties:{requestId:e.requestId,status:e.response?.status,code:be(e.response?.statusText??`UNKNOWN`),...!e.response&&{runtimeError:e}}}),Pe=({spreadPathsToArguments:e,explicitPathsToArguments:t,singleArgumentUnchanged:n},r,i)=>{let a={...e,...t},o=Object.keys(a);return r?.filter(e=>!r.some(t=>t.field.length>e.field.length&&t.field.startsWith(e.field)&&o.includes(t.field))).map(e=>{let r=t[e.field];if(r)return{...e,field:Fe(r,i)};let s=o?.sort((e,t)=>t.length-e.length)?.find(t=>e.field.startsWith(t));if(s){let t=a[s];if(t)return{...e,field:e.field.replace(s,Fe(t,i))}}return n?{...e,field:`${i[0]}.${e.field}`}:e})},Fe=(e,t)=>{let n=Ie(e);return n==null?e:e.replace(`$[${n}]`,t[n])},Ie=e=>{let t=e.match(/\$\[(?<argIndex>\d+)\]/);return t&&t.groups&&Number(t.groups.argIndex)};function Le(e,t,n,r,i,a,o,s,c,l,u){return ve(()=>e({request:async e=>{let i=e({host:s?.HTTPHost||`www.wixapis.com`}),a=i;a.method===`GET`&&a.fallback?.length&&(a.params?.toString().length??0)>4e3&&(a=i.fallback[0]);let o=s?.HTTPHost??`www.wixapis.com`,u=`https://${l?ce:o}${a.url}`;a.params&&a.params.toString()&&(u+=`?${a.params.toString()}`);try{let e=ge(i,t,c),o={method:a.method,...a.data&&{body:JSON.stringify(a.data)},headers:{...e}},s=await n(u,o);if(s.status!==200){let e=null;try{e=await s.json()}catch{}let t=ze(s.status,e?.message??s.statusText,e?.details,{requestId:s.headers.get(`X-Wix-Request-Id`),details:e}),n=ke(t);throw r?.handleError(n,{requestOptions:{url:a.url,method:a.method,entityFqdn:i.entityFqdn,methodFqn:i.methodFqn}}),t}let l=await s.json();return{data:a.migrationOptions?.optInTransformResponse&&a.transformResponse?Array.isArray(a.transformResponse)?a.transformResponse[0](l):a.transformResponse(l):l,headers:s.headers,status:s.status,statusText:s.statusText}}catch(e){throw e.message?.includes(`fetch is not defined`)&&console.error(`Node.js v18+ is required`),e}},fetchWithAuth:n,wixAPIFetch:i,getActiveToken:a,getAuthHeaders:o},{validateRequestSchema:u}))}var Re=class extends Error{response;requestId;constructor(e){super(),this.response=e.response,this.requestId=e.requestId}},ze=(e,t,n,r)=>new Re({response:{data:{details:{...!n?.validationError&&{applicationError:{description:t,code:e,data:r}},...n},message:t},status:e},requestId:r?.requestId}),Be=`.`;function Ve(e,t,n){if(e==null)throw Error(`Cannot set value on null or undefined`);let r=He(t),i=e;for(let e=0;e<r.length;e++){let t=r[e];if(e===r.length-1){i[t]=n;break}let a=r[e+1];(!(t in i)||i[t]==null||typeof i[t]!=`object`||i[t]===null)&&(i[t]=typeof a==`number`?[]:{}),i=i[t]}return e}function He(e){return Array.isArray(e)?e:e.split(Be).map(e=>Ue(e)?Number(e):e)}function Ue(e){return/^\d+$/.test(e)}function We(e){let t={};for(let[n,r]of Object.entries(e))Ge(n)||Ve(t,He(n),r);return t}function Ge(e){return e===`__proto__`||e===`constructor`||e===`prototype`}var Ke=class{BRACKET_PATTERN=/\[(\d+)\]/g;NUMERIC_PATTERN=/^\d+$/;ESCAPED_DOT_PATTERN=/\\\./g;ESCAPED_LEFT_BRACKET_PATTERN=/\\\[/g;ESCAPED_RIGHT_BRACKET_PATTERN=/\\\]/g;SPLIT_PATTERN=/\.|\[(\d+)\]/g;DOT_BEFORE_BRACKET_PATTERN=/\.\[/g;ESCAPED_DOT_PLACEHOLDER=`__DOT__`;ESCAPED_RIGHT_BRACKET_PLACEHOLDER=`__RB__`;ESCAPED_LEFT_BRACKET_PLACEHOLDER=`__LB__`;modifiedFields;cleanedModifiedFields;constructor(e){this.modifiedFields=e}replaceEscapedCharacters(e){return e.replace(this.ESCAPED_DOT_PATTERN,this.ESCAPED_DOT_PLACEHOLDER).replace(this.ESCAPED_LEFT_BRACKET_PATTERN,this.ESCAPED_LEFT_BRACKET_PLACEHOLDER).replace(this.ESCAPED_RIGHT_BRACKET_PATTERN,this.ESCAPED_RIGHT_BRACKET_PLACEHOLDER)}restoreEscapedCharacters(e){return e.replace(this.ESCAPED_DOT_PLACEHOLDER,`\\.`).replace(this.ESCAPED_RIGHT_BRACKET_PLACEHOLDER,`\\]`).replace(this.ESCAPED_LEFT_BRACKET_PLACEHOLDER,`\\[`)}unflatten(){return this.cleanedModifiedFields=Object.fromEntries(Object.entries(this.modifiedFields).map(([e,t])=>[this.replaceEscapedCharacters(this.bracketToDotNotation(e)),t])),We(this.cleanedModifiedFields)}flatten(e){let t={};for(let n of Object.keys(this.cleanedModifiedFields)){let r=this.splitPath(n),i=this.navigatePath(e,r);t={...t,...i}}return Object.fromEntries(Object.entries(t).map(([e,t])=>[this.restoreEscapedCharacters(e),t]))}splitPath(e){let t=[],n=0,r=Array.from(e.matchAll(this.SPLIT_PATTERN));for(let i of r)i.index>n&&t.push(e.substring(n,i.index)),i[1]&&t.push(i[1]),n=i.index+i[0].length;return n<e.length&&t.push(e.substring(n)),t}navigatePath(e,t){let n=e,r=[],i=e=>{if(!Array.isArray(n))throw Error(`Expected array at path ${this.buildPathString(r)}, but got ${typeof n}`);r.push(`[${e}]`),n=n[parseInt(e,10)]},a=(e,t)=>{let i=e in ye?ye[e]:void 0;if(i&&i in t){r.push(i),n=t[i];return}let a=Xe(e);if(a&&a in t){r.push(a),n=t[a];return}throw Error(`Cannot find key '${e}' or its transformations at path ${this.buildPathString(r)}`)},o=(e,t)=>{r.push(e),n=t[e]};for(let e of t){if(this.NUMERIC_PATTERN.test(e)){i(e);continue}if(typeof n!=`object`||!n)throw Error(`Cannot access property '${e}' on ${typeof n} at path ${this.buildPathString(r)}`);let t=n;if(e in n){o(e,t);continue}a(e,t)}return{[this.buildPathString(r)]:n}}buildPathString(e){return e.join(`.`).replace(this.DOT_BEFORE_BRACKET_PATTERN,`[`)}bracketToDotNotation(e){return e.replace(this.BRACKET_PATTERN,(t,n,r)=>r>0&&e[r-1]===`\\`?t:`.`+n)}};function qe(e,t){let n=e?.modifiedFields;if(!n)return null;let r=Je(n);if(!r)return null;let{unflattenedModifiedFields:i,modifiedFieldsManipulator:a}=r;e={...e,modifiedFields:i};let o=t(e),s=o?.modifiedFields;if(!s)return null;let c=Ye(s,a);return c===null?null:(o.modifiedFields=c,o)}function Je(e){if(typeof e==`object`&&e&&!Array.isArray(e))try{let t=new Ke(e);return{unflattenedModifiedFields:t.unflatten(),modifiedFieldsManipulator:t}}catch{return null}return null}function Ye(e,t){if(typeof e==`object`&&e&&!Array.isArray(e))try{return t.flatten(e)}catch{return null}return null}function Xe(e){return e.replace(/[-_\s]+(.)?/g,(e,t)=>t?t.toUpperCase():``).replace(/^./,e=>e.toLowerCase())}function Ze(){return{emit(e,...t){for(let n=0,r=this.events[e]||[],i=r.length;n<i;n++)r[n](...t)},events:{},on(e,t){return(this.events[e]||=[]).push(t),()=>{this.events[e]=this.events[e]?.filter(e=>t!==e)}}}}var Qe=e=>e.__type===`event-definition`;function $e(e,t,n,r){let i;if(e.isDomainEvent){let{deletedEvent:e,actionEvent:t,createdEvent:a,updatedEvent:o,...s}=n,c={...r,...s};i=e?e?.deletedEntity?{entity:e?.deletedEntity,metadata:c}:{metadata:c}:t?{data:t.body,metadata:c}:o?{entity:o.currentEntity,metadata:c,...o.modifiedFields?{modifiedFields:o.modifiedFields}:{}}:{entity:a?.entity,metadata:c}}else i={data:n,metadata:r};let a=e.transformations??(e=>e),o=i,s=i;if(s.modifiedFields){let e=s.modifiedFields;if(typeof e==`object`&&e&&!Array.isArray(e)){o=structuredClone(i);let e=qe(s,a);if(e)return t(e)}}return t(a(o))}function et(e){let t=new Map,n=Ze();return{initModule(e){return r=>{let i=t.get(e.type)??[];i.push({eventDefinition:e,handler:r}),t.set(e.type,i),n.emit(`registered`,e)}},client:{...n,getRegisteredEvents:()=>t,async process(e,n={expectedEvents:[]}){let{eventType:r,identity:i,instanceId:a,payload:o,accountInfo:s}=await this.parseJWT(e),c=[...n.expectedEvents,...Array.from(t.keys()).map(e=>({type:e}))];if(c.length>0&&!c.some(({type:e})=>e===r))throw Error(`Unexpected event type: ${r}. Expected one of: ${c.map(e=>e.type).join(`, `)}`);let l=t.get(r)??[];return await Promise.all(l.map(({eventDefinition:e,handler:t})=>$e(e,t,o,{instanceId:a,identity:i,accountInfo:s}))),{instanceId:a,eventType:r,payload:o,identity:i,accountInfo:s}},async processRequest(e,t){let n=await e.text();return this.process(n,t)},async parseJWT(t){let n=e();if(!n.decodeJWT)throw Error(`decodeJWT is not supported by the authentication strategy`);let{decoded:r,valid:i}=await n.decodeJWT(t);if(!i)throw Error(`JWT is not valid`);if(typeof r.data!=`string`)throw Error(`Unexpected type of JWT data: expected string, got ${typeof r.data}`);let a=JSON.parse(r.data),o=a.eventType,s=a.accountInfo,c=a.instanceId,l=a.identity?JSON.parse(a.identity):void 0;return{instanceId:c,eventType:o,payload:JSON.parse(a.data),identity:l,accountInfo:s}},async parseRequest(e){let t=await e.text();return this.parseJWT(t)},async executeHandlers(e){let n=Array.from(t.keys()).map(e=>({type:e}));if(n.length>0&&!n.some(({type:t})=>t===e.eventType))throw Error(`Unexpected event type: ${e.eventType}. Expected one of: ${n.map(e=>e.type).join(`, `)}`);let r=t.get(e.eventType)??[];await Promise.all(r.map(({eventDefinition:t,handler:n})=>$e(t,n,e.payload,{instanceId:e.instanceId,identity:e.identity})))},apps:{AppInstalled:y(`AppInstalled`)(),AppRemoved:y(`AppRemoved`)()}}}}var tt=e=>e.__type===`service-plugin-definition`;function nt(e){let t=new Map,n=Ze();return{initModule(e){return r=>{let i=t.get(e.componentType.toLowerCase())??[];i.push({servicePluginDefinition:e,implementation:r}),t.set(e.componentType.toLowerCase(),i),n.emit(`registered`,e)}},client:{...n,getRegisteredServicePlugins:()=>t,async parseJWT(t){let n=e();if(!n.decodeJWT)throw Error(`decodeJWT is not supported by the authentication strategy`);let{decoded:r,valid:i}=await n.decodeJWT(t,!0);if(!i)throw Error(`JWT is not valid`);if(typeof r.data!=`object`||r.data===null||!(`metadata`in r.data)||typeof r.data.metadata!=`object`||r.data.metadata===null||!(`appExtensionType`in r.data.metadata)||typeof r.data.metadata.appExtensionType!=`string`)throw Error(`Unexpected JWT data: expected object with metadata.appExtensionType string`);return r.data},async process(e){let t=await this.parseJWT(e.body);return this.executeHandler(t,e.url)},async parseRequest(e){let t=await e.text();return this.parseJWT(t)},async processRequest(e){let t=await this.parseRequest(e);return this.processParsedRequest(t,e.url)},async processParsedRequest(e,t){try{let n=await this.executeHandler(e,t);return Response.json(n)}catch(e){if(e.errorType===`SPI`&&e.applicationCode&&e.httpCode)return Response.json({applicationError:{code:e.applicationCode,data:e.data}},{status:e.httpCode});throw e}},async executeHandler(e,n){let r=e.metadata.appExtensionType.toLowerCase(),i=t.get(r)??[];if(i.length===0)throw Error(`No service plugin implementations found for component type ${r}`);if(i.length>1)throw Error(`Multiple service plugin implementations found for component type ${r}. This is currently not supported`);let{implementation:a,servicePluginDefinition:o}=i[0],s=o.methods.find(e=>n.endsWith(e.primaryHttpMappingPath));if(!s)throw Error(`Unexpect request: request url did not match any method: `+n);let c=a[s.name];if(!c)throw Error(`Got request for service plugin method ${s.name} but no implementation was provided. Available methods: ${Object.keys(a).join(`, `)}`);return s.transformations.toREST(await c(s.transformations.fromREST(e)))}}}}var b=`X-Wix-Consistent`;function rt(e){let t=e.headers||{Authorization:``},n={getAuthHeaders:e=>Promise.resolve({headers:{}})},r=e.auth,i=typeof r==`function`?r:()=>r??n,a=()=>i().getAuthHeaders(e.host),o=()=>e.fetch??fetch,s=async(n,r)=>{let i=o(),s=await a(),c={...r?.headers??{},...s.headers,...e.host?.essentials?.passThroughHeaders,...t[`X-Wix-Consistent`]?{[b]:t[b]}:{}},l=e.host?.getErrorHandler?.();try{if(typeof n==`string`||n instanceof URL){let e=await i(n,{...r,headers:c});l?.handleError(e,{requestOptions:{url:n.toString(),method:r?.method}});let a=it(e);return a&&(t[b]=a),e}{for(let[e,t]of Object.entries(c))typeof t==`string`&&n.headers.set(e,t);let e=await i(n,r);l?.handleError(e,{requestOptions:{url:n.url,method:r?.method}});let a=it(e);return a&&(t[b]=a),e}}catch(e){throw l?.handleError(e,{requestOptions:{url:typeof n==`string`||n instanceof URL?n.toString():n.url,method:r?.method}}),e}},{client:c,initModule:l}=nt(i),{client:u,initModule:d}=et(i),f=async(n,r)=>{let i=o(),s=await a(),c=de(r),l=await i(n,{...r,headers:{...c,...t,...s?.headers,...r?.headers,...e.host?.essentials?.passThroughHeaders,...t[`X-Wix-Consistent`]?{[b]:t[b]}:{}}}),u=it(l);return u&&(t[b]=u),l},p=(t,n)=>{if(Qe(t))return d(t);if(tt(t))return l(t);if(pe(t)&&e.host)return me(t,e.host);if(typeof t==`function`){if(`__type`in t&&t.__type===`wix_spi_error`)return t;let r=e.host?.apiBaseUrl??`www.wixapis.com`,o=e.useCDN===void 0?i().shouldUseCDN:e.useCDN;return Le(ve(()=>oe(t))?ae(t):t,n??{},f,e.host?.getErrorHandler?.(),(e,t)=>{let n=new URL(e,`https://${r}`);return n.host=r,n.protocol=`https`,f(n.toString(),t)},i().getActiveToken,async()=>a(),{HTTPHost:r},e.host?.name,o,e.validateRequestSchema)}return fe(t)?Object.fromEntries(Object.entries(t).map(([e,n])=>[e,p(n,t[se])])):t},m=e=>{for(let n in e)t[n]=e[n]};return{...e.modules?p(e.modules):{},get auth(){let t=i();return t.getAuthHeaders=t.getAuthHeaders.bind(void 0,e.host),t},setHeaders:m,use:p,enableContext(e,t={elevated:!1}){e===`global`?globalThis.__wix_context__==null?t.elevated?globalThis.__wix_context__={elevatedClient:this}:globalThis.__wix_context__={client:this}:t.elevated?globalThis.__wix_context__.elevatedClient=this:globalThis.__wix_context__.client=this:t.elevated?v.elevatedClient=this:v.client=this},fetch:(t,n)=>{let r=e.host?.apiBaseUrl??`www.wixapis.com`,i=new URL(t,`https://${r}`);return i.host=r,i.protocol=`https`,f(i.toString(),n)},fetchWithAuth:s,async graphql(t,n,r={apiVersion:`alpha`}){let i=e?.host?.apiBaseUrl??`www.wixapis.com`,a=await f(`https://${i}/graphql/${r.apiVersion}`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({query:t,variables:n})});if(a.status!==200)throw new le(`GraphQL request failed with status ${a.status}`,a);let{data:o,errors:s}=await a.json();return{data:o??{},errors:s}},webhooks:u,servicePlugins:c}}function it(e){return e.headers?.get(`X-Wix-Consistent`)??e.headers?.get(`x-wix-consistent`)}var at={_id:`id`,_createdDate:`createdDate`,_updatedDate:`updatedDate`},ot={id:`_id`,createdDate:`_createdDate`,updatedDate:`_updatedDate`},st=`items`,ct=`pagingMetadata`,lt=at;function ut(e,t){return e?.split(`.`).map(e=>t?.[e]??e).join(`.`)}function x(e,{transformSystemFields:t=!0}={}){return t?ut(e,lt):e}var dt=`sort.fieldName`;function ft(e,t,n){return(e===dt||e.endsWith(`.${dt}`))&&typeof t==`string`?ut(t,n):t}function pt(e,t,n){let r=e=>n.includes(e),i=(e,n)=>{if(Array.isArray(e))e.forEach(e=>{i(e,n)});else if(typeof e==`object`&&e){let a=e;Object.keys(a).forEach(e=>{let o=n===``?e:`${n}.${e}`;if(r(o))return;let s=mt(e,t);s!==e&&!(s in a)&&(a[s]=a[e],delete a[e]),a[s]=ft(o,a[s],t),i(a[s],o)})}};return i(e,``),e}function mt(e,t){let n;return n=e.includes(`.`)?e.split(`.`).map(e=>t[e]??e).join(`.`):t[e]??e,n}function S(e,t=[]){return pt(e,at,t)}function C(e,t=[]){return pt(e,ot,t)}function w(e){return e?new Date(e):void 0}var ht=new WeakMap;function gt(){return{leaves:void 0,fields:void 0,mapFields:void 0,anyField:void 0}}function _t(e,t){let n=e.get(t);return n||(n=gt(),e.set(t,n)),n}function vt(e,t){return t===`*`?(e.anyField??=gt(),e.anyField):t.endsWith(`{}`)?(e.mapFields??=new Map,_t(e.mapFields,t.slice(0,-2))):(e.fields??=new Map,_t(e.fields,t))}function yt(e){let t=gt();for(let n of e){let e=n.path.split(`.`).reduce(vt,t);e.leaves??=[],e.leaves.push(n)}return t}function bt(e){let t=ht.get(e);return t||(t=yt(e),ht.set(e,t)),t}function xt(e){return typeof e==`object`&&!!e}function St(e,{isRepeated:t,isMap:n},r){return t?Array.isArray(e)?e.map(r):e:n?xt(e)?Object.fromEntries(Object.entries(e).map(([e,t])=>[e,r(t)])):e:r(e)}function Ct(e,t,n){xt(e)&&Et(e,t,n)}function wt(e,t,n){for(let[r,i]of t){if(!(r in e))continue;if(i.leaves)for(let t of i.leaves)e[r]=St(e[r],t,n);let t=e[r];Array.isArray(t)?t.forEach(e=>Ct(e,i,n)):Ct(t,i,n)}}function Tt(e,t,n){for(let[r,i]of t){let t=e[r];xt(t)&&Object.values(t).forEach(e=>Ct(e,i,n))}}function Et(e,{fields:t,mapFields:n,anyField:r},i){t&&wt(e,t,i),n&&Tt(e,n,i),r&&Object.values(e).forEach(e=>Ct(e,r,i))}function T(e,t){if(!xt(e))return e;for(let{paths:n,transformFn:r}of t)Et(e,bt(n),r);return e}function Dt(e){return Mt(e).map(e=>e.toLocaleUpperCase()).join(`_`)}var Ot=/([\p{Ll}\d])(\p{Lu})/gu,kt=/(\p{Lu})([\p{Lu}][\p{Ll}])/gu,At=`$1\0$2`,jt=/[^\p{L}\d]+/giu;function Mt(e){let t=e.trim();t=t.replace(Ot,At).replace(kt,At),t=t.replace(jt,`\0`);let n=0,r=t.length;for(;t.charAt(n)===`\0`;)n++;if(n===r)return[];for(;t.charAt(r-1)===`\0`;)r--;return t.slice(n,r).split(/\0/g)}var Nt=e=>`validationError`in(e.response?.data?.details??{}),Pt=e=>`applicationError`in(e.response?.data?.details??{}),Ft=e=>(e.response?.status??-1)>=400&&(e.response?.status??-1)<500;function E(e,t={explicitPathsToArguments:{},spreadPathsToArguments:{},singleArgumentUnchanged:!1},n=[]){if(typeof e!=`object`||!e)throw e;if(Nt(e))return It(e,t,n);if(Pt(e))return Rt(e);if(Ft(e)){let t=e.response?.status,n=e.response?.statusText??`UNKNOWN`,r=e.response?.data?.message??n,i={applicationError:{description:n,code:Dt(n),data:{}},requestId:e.requestId};return Lt(e,{message:JSON.stringify({message:r,details:i},null,2),extraProperties:{details:i,status:t}})}return zt(e)}var It=(e,t,n)=>{let r=e.response?.data,i=e.requestId,{fieldViolations:a}=r.details.validationError,o=Bt(t,a,n)?.sort((e,t)=>e.field<t.field?-1:1),s=`INVALID_ARGUMENT: ${o?.map(({field:e,description:t})=>`"${e}" ${t}`)?.join(`, `)}`,c={validationError:{fieldViolations:o},requestId:i};return Lt(e,{message:JSON.stringify({message:s,details:c},null,2),extraProperties:{details:c,status:e.response?.status,requestId:i}})},Lt=(e,{message:t,extraProperties:n})=>Object.assign(e,{...n,message:t}),Rt=e=>{let t=e.response?.status,n=e.response?.statusText??`UNKNOWN`,r=e.response?.data?.message??n,i=e.response?.data?.details?.applicationError?.description??n,a=e.response?.data?.details?.applicationError?.code??Dt(n),o=e.response?.data?.details?.applicationError?.data??{},s=r===i?r:`${r}: ${i}`,c={applicationError:{description:i,code:a,data:o},requestId:e.requestId};return Lt(e,{message:JSON.stringify({message:s,details:c},null,2),extraProperties:{details:c,status:t,requestId:e.requestId}})},zt=e=>Lt(e,{message:e.requestId?`System error occurred, request-id: ${e.requestId}`:`System error occurred: ${JSON.stringify(e)}`,extraProperties:{requestId:e.requestId,status:e.response?.status,code:Dt(e.response?.statusText??`UNKNOWN`),...!e.response&&{runtimeError:e}}}),Bt=({spreadPathsToArguments:e,explicitPathsToArguments:t,singleArgumentUnchanged:n},r,i)=>{let a={...e,...t},o=Object.keys(a);return r?.filter(e=>!r.some(t=>t.field.length>e.field.length&&t.field.startsWith(e.field)&&o.includes(t.field))).map(e=>{let r=t[e.field];if(r)return{...e,field:Vt(r,i)};let s=o?.sort((e,t)=>t.length-e.length)?.find(t=>e.field.startsWith(t));if(s){let t=a[s];if(t)return{...e,field:e.field.replace(s,Vt(t,i))}}return n?{...e,field:`${i[0]}.${e.field}`}:e})},Vt=(e,t)=>{let n=Ht(e);return n==null?e:e.replace(`$[${n}]`,t[n])},Ht=e=>{let t=e.match(/\$\[(?<argIndex>\d+)\]/);return t&&t.groups&&Number(t.groups.argIndex)};function Ut(){let e=typeof $wixContext<`u`&&$wixContext.initWixModules?$wixContext.initWixModules:globalThis.__wix_context__!==void 0&&globalThis.__wix_context__.initWixModules?globalThis.__wix_context__.initWixModules:void 0;if(e)return{initWixModules(t,n){return Wt(()=>e(t,n))},fetchWithAuth(){throw Error(`fetchWithAuth is not available in this context`)},graphql(){throw Error(`graphql is not available in this context`)}};let t=typeof $wixContext<`u`?$wixContext.client:v.client===void 0?globalThis.__wix_context__===void 0?void 0:globalThis.__wix_context__.client:v.client,n=typeof $wixContext<`u`?$wixContext.elevatedClient:v.elevatedClient===void 0?globalThis.__wix_context__===void 0?void 0:globalThis.__wix_context__.elevatedClient:v.elevatedClient;if(t||n)return{initWixModules(e,r){if(r){if(!n)throw Error(`An elevated client is required to use elevated modules. Make sure to initialize the Wix context with an elevated client before using elevated SDK modules`);return Wt(()=>n.use(e))}if(!t)throw Error(`Wix context is not available. Make sure to initialize the Wix context before using SDK modules`);return Wt(()=>t.use(e))},fetchWithAuth:(e,n)=>{if(!t)throw Error(`Wix context is not available. Make sure to initialize the Wix context before using SDK modules`);return t.fetchWithAuth(e,n)},getAuth(){if(!t)throw Error(`Wix context is not available. Make sure to initialize the Wix context before using SDK modules`);return t.auth},async graphql(e,n,r){if(!t)throw Error(`Wix context is not available. Make sure to initialize the Wix context before using SDK modules`);return t.graphql(e,n,r)}}}function Wt(e){let t=globalThis.__wix_context__,n={client:v.client,elevatedClient:v.elevatedClient},r;globalThis.__wix_context__=void 0,v.client=void 0,v.elevatedClient=void 0,typeof $wixContext<`u`&&(r={client:$wixContext?.client,elevatedClient:$wixContext?.elevatedClient},delete $wixContext.client,delete $wixContext.elevatedClient);try{return e()}finally{globalThis.__wix_context__=t,v.client=n.client,v.elevatedClient=n.elevatedClient,typeof $wixContext<`u`&&($wixContext.client=r.client,$wixContext.elevatedClient=r.elevatedClient)}}function Gt(e,t){return((...n)=>{let r=Ut();return r?r.initWixModules(e,t).apply(void 0,n):e.apply(void 0,n)})}function Kt(e){let t=((...t)=>{let n=Ut();return n?n.initWixModules(e).apply(void 0,t):()=>({slug:e.type})});return t.__type=e.__type,t.type=e.type,t.isDomainEvent=e.isDomainEvent,t.transformations=e.transformations,t}function D(e,t=!1){return Gt(e,t)}function O(e,t){let n=qt(e),r=Object.entries(n).some(([e,t])=>e.includes(`.`)||Array.isArray(t)&&t.some(e=>typeof e==`object`));return t&&r?new URLSearchParams({".r":Yt(JSON.stringify(e))}):Object.entries(n).reduce((e,[t,n])=>((Array.isArray(n)?n:[n]).forEach(r=>{r==null||Array.isArray(n)&&typeof r==`object`||e.append(t,r)}),e),new URLSearchParams)}function k(e){let t=ln(sn(e.host),e.domainToMappings);return vn(hn(e.protoPath,e.data||{}),t)}function qt(e,t=``){let n={};return Object.entries(e).forEach(([e,r])=>{let i=typeof r==`object`&&!!r&&!Array.isArray(r),a=Jt(t,e);if(i){let e=qt(r,a);Object.assign(n,e)}else n[a]=r}),n}function Jt(e,t){return`${e}${e?`.`:``}${t}`}var Yt=e=>{let t=new TextEncoder().encode(e);return(typeof btoa<`u`?btoa(String.fromCodePoint(...t)):Buffer.from(e,`utf-8`).toString(`base64`)).replace(/=/g,``).replace(/\+/g,`-`).replace(/\//g,`_`)},Xt=[`wix.com`,`editorx.com`],Zt=`_`,Qt=`*.`,$t=RegExp(`\\.(${Xt.join(`|`)})$`),en=[`42.wixprod.net`,`uw2-edt-1.wixprod.net`,`virginia-edt.wixprod.net`],tn={"payments.base44.com":`manage.wix.com`,"create.editorx.com":`editor.editorx.com`},nn=`dev.wix-code.com`,rn=/{(.*)}/,an=RegExp(`\\.(${en.join(`|`)})$`),on=RegExp(`.*\\.${nn}$`);function sn(e){return cn(e).replace($t,`._base_domain_`).replace(an,`._api_base_domain_`).replace(on,`*.dev.wix-code.com`)}function cn(e){return tn[e]??e}function ln(e,t){let n=t[e];if(n)return n;let r=un(e,t)??dn(e,t);if(!r){if(pn(e)){let e=t[mn];if(e)return e}let n=t[Zt];if(n)return n}return r??[]}function un(e,t){return Object.entries(t).find(([t])=>{let[,...n]=e.split(`.`);return n.join(`.`)===t})?.[1]}function dn(e,t){let[n]=Object.entries(t).filter(([t])=>fn(e,t)).sort(([e],[t])=>t.length-e.length);if(!n)return;let[,r]=n;return r}function fn(e,t){if(!t.startsWith(Qt))return!1;let n=t.slice(1);return e.length>n.length&&e.endsWith(n)}function pn(e){return!!e.match(/\._base_domain_$/)}var mn=`www._base_domain_`;function hn(e,t){return e.split(`/`).map(e=>gn(e,t)).join(`/`)}function gn(e,t){let n=e.match(rn)||[],r=n[1];return r?_n(t,r,e,e.replace(n[0],``)):e}function _n(e,t,n,r){let i=e;for(let e of t.split(`.`)){if(!i)return n;i=i[e]}return`${i}${r}`}function vn(e,t){let n=t?.find(t=>e.startsWith(t.destPath));return n?n.srcPath+e.slice(n.destPath.length):e}function A(e){return Kt(e)}function yn(e){return isFinite(e)?e:e.toString()}function j(e){return e===`NaN`?NaN:e===`Infinity`?1/0:e===`-Infinity`?-1/0:e}var bn=`x-wix-linguist`,xn=`00000000-0000-0000-0000-000000000000`,Sn=`false`,Cn=()=>{let e=En(`language`),t=En(`locale`);if(e)return{[bn]:[e,t||e,Sn,xn].join(`|`)}};function wn(){let e=null,t=null;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}var Tn=()=>(typeof window<`u`?window.commonConfig:void 0)??globalThis.commonConfig,En=e=>Tn()?.[e],Dn=({createHost:e})=>({__type:`host`,create:e=>({}),host:t=>{let{applicationId:n,componentId:r}=t??{},i=typeof window<`u`?window.wixEmbedsAPI:void 0,a=e(t),o=kn();return{...a,apiBaseUrl:o,getMonitoringClient:i?.getMonitoringClientFunction?.(n,r),essentials:{language:En(`language`),locale:En(`locale`),get passThroughHeaders(){return Cn()}}}},auth:e=>{let t=typeof window<`u`?window.wixEmbedsAPI:void 0;!e&&On()&&(e=t?.getAccessTokenFunction?.());let n=!1,{resolve:r,promise:i}=wn();return{getAuthHeaders:async()=>{if(!e&&n&&(e=await i),!e)throw Error(`Failed to resolve auth token`);return{headers:{Authorization:await e()}}},getAccessTokenInjector:()=>(n=!0,e=>{r(e)})}}});function On(){return typeof document<`u`&&document.currentScript?.tagName===`SCRIPT`}function kn(){let e=(typeof window<`u`?window.wixEmbedsAPI:void 0)?.getExternalBaseUrl?.();if(!e)return;let t=new URL(e);return t?.pathname&&t.pathname!==`/`?`${t.hostname}${t.pathname}`:t.hostname}var An=({clientSdk:e,applicationId:t})=>({invoke:async({namespace:n,method:r,args:i})=>{if(!e)throw Error(`Wix Site SDK only works in a Wix site environment. Learn more: https://dev.wix.com/docs/sdk/host-modules/site/introduction`);return e.invoke({namespace:n,method:r,args:i,applicationId:t,accessToken:`accessToken`})},getAccessToken:()=>{throw Error(`Not implemented`)},observeState:()=>({disconnect:()=>{}})}),jn=Dn({createHost:function(e){let t=(typeof $wixContext<`u`?$wixContext.clientSdk:void 0)??e?.clientSdk??(typeof window<`u`?window?.clientSdk:void 0),{applicationId:n}=e||{};if(!n)throw Error(`"createHost" was called without a required field "applicationId"`);return{channel:An({clientSdk:t,applicationId:n}),close:()=>{}}}}),Mn=(e,t)=>{let n=jn.host({applicationId:e,componentId:t}),r=jn.auth();return rt({auth:r,host:n}).enableContext(`module`),r.getAccessTokenInjector()},Nn=e=>Mn(`215238eb-22a5-4c36-9e7b-e7c08025e04e`,e),Pn=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Fn=new class extends Pn{#e;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e();return window.addEventListener(`visibilitychange`,t,!1),()=>{window.removeEventListener(`visibilitychange`,t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(e=>{typeof e==`boolean`?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e==`boolean`?this.#e:globalThis.document?.visibilityState!==`hidden`}},In={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},M=new class{#e=In;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}};function Ln(e){setTimeout(e,0)}var Rn=typeof window>`u`||`Deno`in globalThis;function N(){}function zn(e,t){return typeof e==`function`?e(t):e}function Bn(e){return typeof e==`number`&&e>=0&&e!==1/0}function Vn(e,t){return Math.max(e+(t||0)-Date.now(),0)}function P(e,t){return typeof e==`function`?e(t):e}function F(e,t){return typeof e==`function`?e(t):e}function Hn(e,t){let{type:n=`all`,exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==Wn(o,t.options))return!1}else if(!L(t.queryKey,o))return!1}if(n!==`all`){let e=t.isActive();if(n===`active`&&!e||n===`inactive`&&e)return!1}return!(typeof s==`boolean`&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function Un(e,t){let{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(I(t.options.mutationKey)!==I(a))return!1}else if(!L(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function Wn(e,t){return(t?.queryKeyHashFn||I)(e)}function I(e){return JSON.stringify(e,(e,t)=>Yn(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function L(e,t){return e===t?!0:typeof e==typeof t&&e&&t&&typeof e==`object`&&typeof t==`object`?Object.keys(t).every(n=>L(e[n],t[n])):!1}var Gn=Object.prototype.hasOwnProperty;function Kn(e,t,n=0){if(e===t)return e;if(n>500)return t;let r=Jn(e)&&Jn(t);if(!r&&!(Yn(e)&&Yn(t)))return t;let i=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),o=a.length,s=r?Array(o):{},c=0;for(let l=0;l<o;l++){let o=r?l:a[l],u=e[o],d=t[o];if(u===d){s[o]=u,(r?l<i:Gn.call(e,o))&&c++;continue}if(u===null||d===null||typeof u!=`object`||typeof d!=`object`){s[o]=d;continue}let f=Kn(u,d,n+1);s[o]=f,f===u&&c++}return i===o&&c===i?e:s}function qn(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(e[n]!==t[n])return!1;return!0}function Jn(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Yn(e){if(!Xn(e))return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(!Xn(n)||!n.hasOwnProperty(`isPrototypeOf`)||Object.getPrototypeOf(e)!==Object.prototype)}function Xn(e){return Object.prototype.toString.call(e)===`[object Object]`}function Zn(e){return new Promise(t=>{M.setTimeout(t,e)})}function Qn(e,t,n){return typeof n.structuralSharing==`function`?n.structuralSharing(e,t):n.structuralSharing===!1?t:Kn(e,t)}function $n(e){return e}function er(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(1):r}function tr(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var nr=Symbol();function rr(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===nr?()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function ir(e,t){return typeof e==`function`?e(...t):!!e}function ar(e,t,n){let r=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??=t(),r?i:(r=!0,i.aborted?n():i.addEventListener(`abort`,n,{once:!0}),i))}),e}var R=(()=>{let e=()=>Rn;return{isServer(){return e()},setIsServer(t){e=t}}})();function or(){let e,t,n=new Promise((n,r)=>{e=n,t=r});n.status=`pending`,n.catch(()=>{});function r(e){Object.assign(n,e),delete n.resolve,delete n.reject}return n.resolve=t=>{r({status:`fulfilled`,value:t}),e(t)},n.reject=e=>{r({status:`rejected`,reason:e}),t(e)},n}var sr=Ln;function cr(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=sr,a=r=>{t?e.push(r):i(()=>{n(r)})},o=()=>{let t=e;e=[],t.length&&i(()=>{r(()=>{t.forEach(e=>{n(e)})})})};return{batch:e=>{let n;t++;try{n=e()}finally{t--,t||o()}return n},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{i=e}}}var z=cr(),lr=new class extends Pn{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e(!0),n=()=>e(!1);return window.addEventListener(`online`,t,!1),window.addEventListener(`offline`,n,!1),()=>{window.removeEventListener(`online`,t),window.removeEventListener(`offline`,n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#e}};function ur(e){return Math.min(1e3*2**e,3e4)}function dr(e){return(e??`online`)!==`online`||lr.isOnline()}var fr=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function pr(e){let t=!1,n=0,r,i=or(),a=()=>i.status!==`pending`,o=t=>{if(!a()){let n=new fr(t);f(n),e.onCancel?.(n)}},s=()=>{t=!0},c=()=>{t=!1},l=()=>Fn.isFocused()&&(e.networkMode===`always`||lr.isOnline())&&e.canRun(),u=()=>dr(e.networkMode)&&e.canRun(),d=e=>{a()||(r?.(),i.resolve(e))},f=e=>{a()||(r?.(),i.reject(e))},p=()=>new Promise(t=>{r=e=>{(a()||l())&&t(e)},e.onPause?.()}).then(()=>{r=void 0,a()||e.onContinue?.()}),m=()=>{if(a())return;let r,i=n===0?e.initialPromise:void 0;try{r=i??e.fn()}catch(e){r=Promise.reject(e)}Promise.resolve(r).then(d).catch(r=>{if(a())return;let i=e.retry??(R.isServer()?0:3),o=e.retryDelay??ur,s=typeof o==`function`?o(n,r):o,c=i===!0||typeof i==`number`&&n<i||typeof i==`function`&&i(n,r);if(t||!c){f(r);return}n++,e.onFail?.(n,r),Zn(s).then(()=>l()?void 0:p()).then(()=>{t?f(r):m()})})};return{promise:i,status:()=>i.status,cancel:o,continue:()=>(r?.(),i),cancelRetry:s,continueRetry:c,canStart:u,start:()=>(u()?m():p().then(m),i)}}var mr=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Bn(this.gcTime)&&(this.#e=M.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(R.isServer()?1/0:3e5))}clearGcTimeout(){this.#e!==void 0&&(M.clearTimeout(this.#e),this.#e=void 0)}};function hr(e){return{onFetch:(t,n)=>{let r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],o=t.state.data?.pageParams||[],s={pages:[],pageParams:[]},c=0,l=async()=>{let n=!1,l=e=>{ar(e,()=>t.signal,()=>n=!0)},u=rr(t.options,t.fetchOptions),d=async(e,r,i)=>{if(n)return Promise.reject(t.signal.reason);if(r==null&&e.pages.length)return Promise.resolve(e);let a=(()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:r,direction:i?`backward`:`forward`,meta:t.options.meta};return l(e),e})(),o=await u(a),{maxPages:s}=t.options,c=i?tr:er;return{pages:c(e.pages,o,s),pageParams:c(e.pageParams,r,s)}};if(i&&a.length){let e=i===`backward`,t=e?_r:gr,n={pages:a,pageParams:o};s=await d(n,t(r,n),e)}else{let t=e??a.length;do{let e=c===0?o[0]??r.initialPageParam:gr(r,s);if(c>0&&e==null)break;s=await d(s,e),c++}while(c<t)}return s};t.fetchFn=t.options.persister?()=>t.options.persister?.(l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):l}}}function gr(e,{pages:t,pageParams:n}){let r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function _r(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}function vr(e,t){return t?gr(e,t)!=null:!1}function yr(e,t){return!t||!e.getPreviousPageParam?!1:_r(e,t)!=null}var br=class extends mr{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e){super(),this.#s=!1,this.#o=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#r=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=Cr(this.options),this.state=e.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#a?.promise}setOptions(e){if(this.options={...this.#o,...e},e?._type&&(this.#e=e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let e=Cr(this.options);e.data!==void 0&&(this.setState(Sr(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#r.remove(this)}setData(e,t){let n=Qn(this.state.data,e,this.options);return this.#l({data:n,type:`success`,dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e){this.#l({type:`setState`,state:e})}cancel(e){let t=this.#a?.promise;return this.#a?.cancel(e),t?t.then(N).catch(N):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>F(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===nr||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0&&this.observers.some(e=>P(e.options.staleTime,this)===`static`)}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e===`static`?!1:this.state.isInvalidated?!0:!Vn(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#a?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#a?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#r.notify({type:`observerAdded`,query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#a&&(this.#s||this.#c()?this.#a.cancel({revert:!0}):this.#a.cancelRetry()),this.scheduleGc()),this.#r.notify({type:`observerRemoved`,query:this,observer:e}))}getObserversCount(){return this.observers.length}#c(){return this.state.fetchStatus===`paused`&&this.state.status===`pending`}invalidate(){this.state.isInvalidated||this.#l({type:`invalidate`})}async fetch(e,t){if(this.state.fetchStatus!==`idle`&&this.#a?.status()!==`rejected`){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#a)return this.#a.continueRetry(),this.#a.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let n=new AbortController,r=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#s=!0,n.signal)})},i=()=>{let e=rr(this.options,t),n=(()=>{let e={client:this.#i,queryKey:this.queryKey,meta:this.meta};return r(e),e})();return this.#s=!1,this.options.persister?this.options.persister(e,n,this):e(n)},a=(()=>{let e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:i};return r(e),e})();(this.#e===`infinite`?hr(this.options.pages):this.options.behavior)?.onFetch(a,this),this.#n=this.state,(this.state.fetchStatus===`idle`||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#l({type:`fetch`,meta:a.fetchOptions?.meta}),this.#a=pr({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof fr&&e.revert&&this.setState({...this.#n,fetchStatus:`idle`}),n.abort()},onFail:(e,t)=>{this.#l({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#l({type:`pause`})},onContinue:()=>{this.#l({type:`continue`})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{let e=await this.#a.start();if(e===void 0)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#r.config.onSuccess?.(e,this),this.#r.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof fr){if(e.silent)return this.#a.promise;if(e.revert){if(this.state.data===void 0)throw e;return this.state.data}}throw this.#l({type:`error`,error:e}),this.#r.config.onError?.(e,this),this.#r.config.onSettled?.(this.state.data,e,this),e}finally{this.scheduleGc()}}#l(e){let t=t=>{switch(e.type){case`failed`:return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case`pause`:return{...t,fetchStatus:`paused`};case`continue`:return{...t,fetchStatus:`fetching`};case`fetch`:return{...t,...xr(t.data,this.options),fetchMeta:e.meta??null};case`success`:let n={...t,...Sr(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:`idle`,fetchFailureCount:0,fetchFailureReason:null}};return this.#n=e.manual?n:void 0,n;case`error`:let r=e.error;return{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:`idle`,status:`error`,isInvalidated:!0};case`invalidate`:return{...t,isInvalidated:!0};case`setState`:return{...t,...e.state}}};this.state=t(this.state),z.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),this.#r.notify({query:this,type:`updated`,action:e})})}};function xr(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:dr(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function Sr(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function Cr(e){let t=typeof e.initialData==`function`?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt==`function`?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?`success`:`pending`,fetchStatus:`idle`}}var wr=class extends Pn{constructor(e,t){super(),this.options=t,this.#e=e,this.#s=null,this.#o=or(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#r=void 0;#i;#a;#o;#s;#c;#l;#u;#d;#f;#p;#m=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),Er(this.#t,this.options)?this.#h():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Dr(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Dr(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#x(),this.#t.removeObserver(this)}setOptions(e){let t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!=`boolean`&&typeof this.options.enabled!=`function`&&typeof F(this.options.enabled,this.#t)!=`boolean`)throw Error(`Expected enabled to be a boolean or a callback that returns a boolean`);this.#S(),this.#t.setOptions(this.options),t._defaulted&&!qn(this.options,t)&&this.#e.getQueryCache().notify({type:`observerOptionsUpdated`,query:this.#t,observer:this});let r=this.hasListeners();r&&Or(this.#t,n,this.options,t)&&this.#h(),this.updateResult(),r&&(this.#t!==n||F(this.options.enabled,this.#t)!==F(t.enabled,this.#t)||P(this.options.staleTime,this.#t)!==P(t.staleTime,this.#t))&&this.#g();let i=this.#_();r&&(this.#t!==n||F(this.options.enabled,this.#t)!==F(t.enabled,this.#t)||i!==this.#p)&&this.#v(i)}getOptimisticResult(e){let t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return Ar(this,n)&&(this.#r=n,this.#a=this.options,this.#i=this.#t.state),n}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(e,n)=>(this.trackProp(n),t?.(n),n===`promise`&&(this.trackProp(`data`),!this.options.experimental_prefetchInRender&&this.#o.status===`pending`&&this.#o.reject(Error(`experimental_prefetchInRender feature flag is not enabled`))),Reflect.get(e,n))})}trackProp(e){this.#m.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#h({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#h(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(N)),t}#g(){this.#b();let e=P(this.options.staleTime,this.#t);if(R.isServer()||this.#r.isStale||!Bn(e))return;let t=Vn(this.#r.dataUpdatedAt,e)+1;this.#d=M.setTimeout(()=>{this.#r.isStale||this.updateResult()},t)}#_(){return(typeof this.options.refetchInterval==`function`?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#v(e){this.#x(),this.#p=e,!R.isServer()&&F(this.options.enabled,this.#t)!==!1&&Bn(this.#p)&&this.#p!==0&&(this.#f=M.setInterval(()=>{(this.options.refetchIntervalInBackground||Fn.isFocused())&&this.#h()},this.#p))}#y(){this.#g(),this.#v(this.#_())}#b(){this.#d!==void 0&&(M.clearTimeout(this.#d),this.#d=void 0)}#x(){this.#f!==void 0&&(M.clearInterval(this.#f),this.#f=void 0)}createResult(e,t){let n=this.#t,r=this.options,i=this.#r,a=this.#i,o=this.#a,s=e===n?this.#n:e.state,{state:c}=e,l={...c},u=!1,d;if(t._optimisticResults){let i=this.hasListeners(),a=!i&&Er(e,t),o=i&&Or(e,n,t,r);(a||o)&&(l={...l,...xr(c.data,e.options)}),t._optimisticResults===`isRestoring`&&(l.fetchStatus=`idle`)}let{error:f,errorUpdatedAt:p,status:m}=l;d=l.data;let ee=!1;if(t.placeholderData!==void 0&&d===void 0&&m===`pending`){let e;i?.isPlaceholderData&&t.placeholderData===o?.placeholderData?(e=i.data,ee=!0):e=typeof t.placeholderData==`function`?t.placeholderData(this.#u?.state.data,this.#u):t.placeholderData,e!==void 0&&(m=`success`,d=Qn(i?.data,e,t),u=!0)}if(t.select&&d!==void 0&&!ee){if(i&&d===a?.data&&t.select===this.#c)d=this.#l;else try{this.#c=t.select,d=t.select(d),d=Qn(i?.data,d,t),this.#l=d,this.#s=null}catch(e){this.#s=e}}this.#s&&(f=this.#s,d=this.#l,p=Date.now(),m=`error`);let te=l.fetchStatus===`fetching`,ne=m===`pending`,h=m===`error`,g=ne&&te,re=d!==void 0,_={status:m,fetchStatus:l.fetchStatus,isPending:ne,isSuccess:m===`success`,isError:h,isInitialLoading:g,isLoading:g,data:d,dataUpdatedAt:l.dataUpdatedAt,error:f,errorUpdatedAt:p,failureCount:l.fetchFailureCount,failureReason:l.fetchFailureReason,errorUpdateCount:l.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:l.dataUpdateCount>s.dataUpdateCount||l.errorUpdateCount>s.errorUpdateCount,isFetching:te,isRefetching:te&&!ne,isLoadingError:h&&!re,isPaused:l.fetchStatus===`paused`,isPlaceholderData:u,isRefetchError:h&&re,isStale:kr(e,t),refetch:this.refetch,promise:this.#o,isEnabled:F(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){let t=_.data!==void 0,r=_.status===`error`&&!t,i=e=>{r?e.reject(_.error):t&&e.resolve(_.data)},a=()=>{let e=this.#o=_.promise=or();i(e)},o=this.#o;switch(o.status){case`pending`:e.queryHash===n.queryHash&&i(o);break;case`fulfilled`:(r||_.data!==o.value)&&a();break;case`rejected`:(!r||_.error!==o.reason)&&a()}}return _}updateResult(){let e=this.#r,t=this.createResult(this.#t,this.options);this.#i=this.#t.state,this.#a=this.options,this.#i.data!==void 0&&(this.#u=this.#t),!qn(t,e)&&(this.#r=t,this.#C({listeners:(()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,n=typeof t==`function`?t():t;if(n===`all`||!n&&!this.#m.size)return!0;let r=new Set(n??this.#m);return this.options.throwOnError&&r.add(`error`),Object.keys(this.#r).some(t=>{let n=t;return this.#r[n]!==e[n]&&r.has(n)})})()}))}#S(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;let t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}#C(e){z.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:`observerResultsUpdated`})})}};function Tr(e,t){return F(t.enabled,e)!==!1&&e.state.data===void 0&&(e.state.status!==`error`||F(t.retryOnMount,e)!==!1)}function Er(e,t){return Tr(e,t)||e.state.data!==void 0&&Dr(e,t,t.refetchOnMount)}function Dr(e,t,n){if(F(t.enabled,e)!==!1&&P(t.staleTime,e)!==`static`){let r=typeof n==`function`?n(e):n;return r===`always`||r!==!1&&kr(e,t)}return!1}function Or(e,t,n,r){return(e!==t||F(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&kr(e,n)}function kr(e,t){return F(t.enabled,e)!==!1&&e.isStaleByTime(P(t.staleTime,e))}function Ar(e,t){return!qn(e.getCurrentResult(),t)}var jr=class extends wr{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){e._type=`infinite`,super.setOptions(e)}getOptimisticResult(e){return e._type=`infinite`,super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:`forward`}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:`backward`}}})}createResult(e,t){let{state:n}=e,r=super.createResult(e,t),{isFetching:i,isRefetching:a,isError:o,isRefetchError:s}=r,c=n.fetchMeta?.fetchMore?.direction,l=o&&c===`forward`,u=i&&c===`forward`,d=o&&c===`backward`,f=i&&c===`backward`;return{...r,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:vr(t,n.data),hasPreviousPage:yr(t,n.data),isFetchNextPageError:l,isFetchingNextPage:u,isFetchPreviousPageError:d,isFetchingPreviousPage:f,isRefetchError:s&&!l&&!d,isRefetching:a&&!u&&!f}}},Mr=class extends mr{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||Nr(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:`observerRemoved`,mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status===`pending`?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(e){let t=()=>{this.#i({type:`continue`})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#r=pr({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(Error(`No mutationFn found`)),onFail:(e,t)=>{this.#i({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#i({type:`pause`})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});let r=this.state.status===`pending`,i=!this.#r.canStart();try{if(r)t();else{this.#i({type:`pending`,variables:e,isPaused:i}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);let t=await this.options.onMutate?.(e,n);t!==this.state.context&&this.#i({type:`pending`,context:t,variables:e,isPaused:i})}let a=await this.#r.start();return await this.#n.config.onSuccess?.(a,e,this.state.context,this,n),await this.options.onSuccess?.(a,e,this.state.context,n),await this.#n.config.onSettled?.(a,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(a,null,e,this.state.context,n),this.#i({type:`success`,data:a}),a}catch(t){try{await this.#n.config.onError?.(t,e,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,n)}catch(e){Promise.reject(e)}try{await this.#n.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,n)}catch(e){Promise.reject(e)}throw this.#i({type:`error`,error:t}),t}finally{this.#n.runNext(this)}}#i(e){let t=t=>{switch(e.type){case`failed`:return{...t,failureCount:e.failureCount,failureReason:e.error};case`pause`:return{...t,isPaused:!0};case`continue`:return{...t,isPaused:!1};case`pending`:return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:`pending`,variables:e.variables,submittedAt:Date.now()};case`success`:return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:`success`,isPaused:!1};case`error`:return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:`error`}}};this.state=t(this.state),z.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}};function Nr(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var Pr=class extends Pn{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,t,n){let r=new Mr({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);let t=Fr(e);if(typeof t==`string`){let n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:`added`,mutation:e})}remove(e){if(this.#e.delete(e)){let t=Fr(e);if(typeof t==`string`){let n=this.#t.get(t);if(n){if(n.length>1){let t=n.indexOf(e);t!==-1&&n.splice(t,1)}else n[0]===e&&this.#t.delete(t)}}}this.notify({type:`removed`,mutation:e})}canRun(e){let t=Fr(e);if(typeof t==`string`){let n=this.#t.get(t)?.find(e=>e.state.status===`pending`);return!n||n===e}return!0}runNext(e){let t=Fr(e);return typeof t==`string`?(this.#t.get(t)?.find(t=>t!==e&&t.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){z.batch(()=>{this.#e.forEach(e=>{this.notify({type:`removed`,mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>Un(t,e))}findAll(e={}){return this.getAll().filter(t=>Un(e,t))}notify(e){z.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return z.batch(()=>Promise.all(e.map(e=>e.continue().catch(N))))}};function Fr(e){return e.options.scope?.id}var Ir=class extends Pn{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){let r=t.queryKey,i=t.queryHash??Wn(r,t),a=this.get(i);return a||(a=new br({client:e,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(a)),a}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:`added`,query:e}))}remove(e){let t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:`removed`,query:e}))}clear(){z.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>Hn(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>Hn(e,t)):t}notify(e){z.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){z.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){z.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Lr=class{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e={}){this.#e=e.queryCache||new Ir,this.#t=e.mutationCache||new Pr,this.#n=e.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=Fn.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=lr.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#o?.(),this.#o=void 0,this.#s?.(),this.#s=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:`fetching`}).length}isMutating(e){return this.#t.findAll({...e,status:`pending`}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(P(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){let r=this.defaultQueryOptions({queryKey:e}),i=this.#e.get(r.queryHash)?.state.data,a=zn(t,i);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return z.batch(()=>this.#e.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){let t=this.#e;z.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#e;return z.batch(()=>(n.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:`active`,...e},t)))}cancelQueries(e,t={}){let n={revert:!0,...t},r=z.batch(()=>this.#e.findAll(e).map(e=>e.cancel(n)));return Promise.all(r).then(N).catch(N)}invalidateQueries(e,t={}){return z.batch(()=>(this.#e.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType===`none`?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??`active`},t)))}refetchQueries(e,t={}){let n={...t,cancelRefetch:t.cancelRefetch??!0},r=z.batch(()=>this.#e.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,n);return n.throwOnError||(t=t.catch(N)),e.state.fetchStatus===`paused`?Promise.resolve():t}));return Promise.all(r).then(N)}fetchQuery(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t);return n.isStaleByTime(P(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(N).catch(N)}fetchInfiniteQuery(e){return e._type=`infinite`,this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(N).catch(N)}ensureInfiniteQueryData(e){return e._type=`infinite`,this.ensureQueryData(e)}resumePausedMutations(){return lr.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#r.set(I(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#r.values()],n={};return t.forEach(t=>{L(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#i.set(I(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#i.values()],n={};return t.forEach(t=>{L(e,t.mutationKey)&&Object.assign(n,t.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||=Wn(t.queryKey,t),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!==`always`),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode=`offlineFirst`),t.queryFn===nr&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},Rr=e.createContext(void 0),zr=t=>{let n=e.useContext(Rr);if(t)return t;if(!n)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return n},Br=({client:t,children:n})=>(e.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),s(Rr.Provider,{value:t,children:n})),Vr=e.createContext(!1),Hr=()=>e.useContext(Vr);Vr.Provider;function Ur(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Wr=e.createContext(Ur()),Gr=()=>e.useContext(Wr),Kr=(e,t,n)=>{let r=n?.state.error&&typeof e.throwOnError==`function`?ir(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},qr=t=>{e.useEffect(()=>{t.clearReset()},[t])},Jr=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||ir(n,[e.error,r])),Yr=e=>{if(e.suspense){let t=1e3,n=e=>e===`static`?e:Math.max(e??t,t),r=e.staleTime;e.staleTime=typeof r==`function`?(...e)=>n(r(...e)):n(r),typeof e.gcTime==`number`&&(e.gcTime=Math.max(e.gcTime,t))}},Xr=(e,t)=>e.isLoading&&e.isFetching&&!t,Zr=(e,t)=>e?.suspense&&t.isPending,Qr=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function $r(t,n,r){let i=Hr(),a=Gr(),o=zr(r),s=o.defaultQueryOptions(t);o.getDefaultOptions().queries?._experimental_beforeQuery?.(s);let c=o.getQueryCache().get(s.queryHash),l=t.subscribed!==!1;s._optimisticResults=i?`isRestoring`:l?`optimistic`:void 0,Yr(s),Kr(s,a,c),qr(a);let u=!o.getQueryCache().get(s.queryHash),[d]=e.useState(()=>new n(o,s)),f=d.getOptimisticResult(s),p=!i&&l;if(e.useSyncExternalStore(e.useCallback(e=>{let t=p?d.subscribe(z.batchCalls(e)):N;return d.updateResult(),t},[d,p]),()=>d.getCurrentResult(),()=>d.getCurrentResult()),e.useEffect(()=>{d.setOptions(s)},[s,d]),Zr(s,f))throw Qr(s,d,a);if(Jr({result:f,errorResetBoundary:a,throwOnError:s.throwOnError,query:c,suspense:s.suspense}))throw f.error;return o.getDefaultOptions().queries?._experimental_afterQuery?.(s,f),s.experimental_prefetchInRender&&!R.isServer()&&Xr(f,i)&&(u?Qr(s,d,a):c?.promise)?.catch(N).finally(()=>{d.updateResult()}),s.notifyOnChangeProps?f:d.trackResult(f)}function ei(e,t){return $r(e,jr,t)}function ti(e){return e}var ni=ti(`@wix/site-service-url`),ri=`215238eb-22a5-4c36-9e7b-e7c08025e04e`;`${ri}`,`${ri}`;var ii=function(e){return e.SIDE_CART=`ecom_side_cart`,e.CART=`shopping_cart`,e.CHECKOUT=`checkout`,e.PRODUCT_PAGE=`product-page-builder`,e.CATEGORY_PAGE=`category-page-builder`,e}({}),ai=()=>{let e=f(ni),t=n((t,n)=>{let r=e.appSectionRelativeUrl(ri,t,!0);if(r)return`./${r.replace(/^\//,``).replace(/\/$/,``)}/${encodeURIComponent(n)}`},[e]);return{getPageRelativeUrl:t,getPageAbsoluteUrl:n((n,r)=>{let i=t(n,r);if(i)return new URL(i,`${e.siteUrl.replace(/\/$/,``)}/`).href},[t,e])}};function oi(e){let{getPageAbsoluteUrl:t}=ai(),n=r(()=>{if(!e.slug)return;let n=t(ii.CATEGORY_PAGE,e.slug);return n?{href:n}:void 0},[e.slug,t]);return r(()=>({id:e.id,name:e.name,slug:e.slug,link:n,description:e.description,richContentDescription:e.richContentDescription,image:e.image,breadcrumbs:e.breadcrumbs}),[e,n])}function si(e){let{category:t}=e;return oi(t)}function ci(e,t){return r(()=>({categories:e,currentCategoryId:t}),[e,t])}var li=ti(`seo/seo-service`),ui=ti(`@wix/viewer-service-environment`);function di(e){return e.breadcrumbs.map(({id:e,name:t,slug:n})=>({categoryId:e,categoryName:t,categorySlug:n}))}function fi(e){return e?{id:e}:void 0}function pi(e){return{itemType:e.parentCategoryId?`STORES_SUB_CATEGORY`:`STORES_CATEGORY`,itemData:{category:{id:e.id,name:e.name,slug:e.slug,description:e.description,itemCounter:e.itemCounter,image:e.image,parentCategory:fi(e.parentCategoryId),breadcrumbsInfo:{breadcrumbs:di(e)}}},...e.seoData?{seoData:e.seoData}:{}}}function mi(e){let t=f(li),n=f(ui),r=i(!1);!r.current&&e.id&&n.isSSR()&&(r.current=!0,t.setSeoEntity(pi(e)).catch(()=>{}))}function hi(e){if(e.status===`fulfilled`)return e.value;throw e.status===`rejected`?e.reason:e.status===`pending`?e:(e.status=`pending`,e.then(t=>{e.status=`fulfilled`,e.value=t},t=>{e.status=`rejected`,e.reason=t}),e)}var gi=new Set;function _i(e){return gi.add(e),()=>{gi.delete(e)}}function vi(e){let t=globalThis.window;if(!t?.history)return;let n=t.location.href;t.history.replaceState({scrollY:t.scrollY},``,e.href),t.location.href!==n&&gi.forEach(e=>e())}function yi(){let e=f(ni),t=n(()=>e.currentUrl,[e]),i=o(_i,t,t),a=r(()=>new URL(i),[i]),s=n(t=>{let n=new URL(e.currentUrl);n.search=t,vi(n)},[e]);return{url:a,siteUrl:e.siteUrl.replace(/\/$/,``),search:a.search,pushSearch:s}}function bi(e){return e.priceMin===void 0&&e.priceMax===void 0&&Object.values(e.customizationIdToChoiceIds??{}).every(e=>e.length===0)}function xi(e,t,n){let r=e.customizationIdToChoiceIds??{},i=r[t]??[];return i.includes(n)?e:{...e,customizationIdToChoiceIds:{...r,[t]:[...i,n]}}}function Si(e,t,n){let r=e.customizationIdToChoiceIds??{},i=r[t]??[];return i.includes(n)?{...e,customizationIdToChoiceIds:{...r,[t]:i.filter(e=>e!==n)}}:e}function Ci(e,t,n){return e.priceMin===t&&e.priceMax===n?e:{...e,priceMin:t,priceMax:n}}function wi(e){return e.priceMin===void 0&&e.priceMax===void 0?e:{...e,priceMin:void 0,priceMax:void 0}}function Ti(e){return Object.keys(e).length===1&&`$and`in e&&Array.isArray(e.$and)}function Ei(e){return Object.keys(e).length===1&&`$or`in e&&Array.isArray(e.$or)}function Di(e){return Object.keys(e).length===1&&`$not`in e&&typeof e.$not==`object`}function B(e,t){return e===void 0||Object.keys(e).length===0?t:t===void 0||Object.keys(t).length===0?e:{$and:[...Ti(e)?e.$and:[e],...Ti(t)?t.$and:[t]]}}function Oi(e,t){return e===void 0||Object.keys(e).length===0?t:t===void 0||Object.keys(t).length===0?e:{$or:[...Ei(e)?e.$or:[e],...Ei(t)?t.$or:[t]]}}function ki(e){if(e!==void 0&&Object.keys(e).length!==0)return Di(e)?e.$not:{$not:e}}var Ai=class{_items;_fetchNextPage;_fetchPrevPage;_originQuery;_limit;constructor({items:e,originQuery:t,fetchNextPage:n,fetchPrevPage:r,limit:i}){this._items=e,this._fetchNextPage=n,this._fetchPrevPage=r,this._originQuery=t,this._limit=i}get items(){return this._items}get length(){return this._items.length}get pageSize(){return this._limit}get query(){return this._originQuery}async next(){if(!this.hasNext())throw Error(`No next page to fetch`);return await this._fetchNextPage()}async prev(){if(!this.hasPrev())throw Error(`No previous page to fetch`);return await this._fetchPrevPage()}},ji=class extends Ai{_nextCursor;_prevCursor;cursors;constructor({items:e,originQuery:t,fetchNextPage:n,fetchPrevPage:r,limit:i,nextCursor:a,prevCursor:o}){super({items:e,originQuery:t,fetchNextPage:n,fetchPrevPage:r,limit:i}),this._nextCursor=a,this._prevCursor=o,this.cursors={next:a,prev:o}}hasNext(){return!!this._nextCursor}hasPrev(){return!!this._prevCursor}},Mi=class extends Ai{_totalCount;_offset;_tooManyToCount;constructor({items:e,fetchNextPage:t,fetchPrevPage:n,offset:r,originQuery:i,limit:a,totalCount:o,tooManyToCount:s}){super({items:e,fetchNextPage:t,fetchPrevPage:n,originQuery:i,limit:a}),this._totalCount=o,this._offset=r,this._tooManyToCount=s}get currentPage(){return this._limit===0?void 0:Math.floor(this._offset/this._limit)}get totalPages(){return this._tooManyToCount||this._limit===0?void 0:Math.ceil(this._totalCount/this._limit)}get totalCount(){return this._tooManyToCount?void 0:this._totalCount}hasNext(){return this._limit!==0&&this.currentPage!==void 0&&this.totalPages!==void 0&&this.currentPage<this.totalPages-1}hasPrev(){return!!(this._limit!==0&&this.currentPage&&this.currentPage>0)}};function Ni(e){let t=n=>({query:n,async find(){try{let r=e.requestTransformer(e.pagingMethod===`CURSOR`&&n.cursorPaging.cursor?{cursorPaging:n.cursorPaging}:n),i=await e.func(r),{[st]:a,[ct]:o}=e.responseTransformer(i);if(e.pagingMethod===`OFFSET`){let e=n;return new Mi({items:a??[],fetchNextPage:()=>t({...e,paging:{offset:e.paging.offset+e.paging.limit,limit:e.paging.limit}}).find(),fetchPrevPage:()=>t({...n,paging:{offset:Math.max(e.paging.offset-e.paging.limit,0),limit:e.paging.limit}}).find(),offset:e.paging.offset,limit:e.paging.limit,totalCount:o?.total,tooManyToCount:o?.tooManyToCount,originQuery:this})}let s=n.cursorPaging;return new ji({items:a??[],limit:s.limit,originQuery:this,fetchNextPage:()=>t({...n,cursorPaging:{cursor:o?.cursors?.next??void 0,limit:s.limit}}).find(),fetchPrevPage:()=>t({...n,cursorPaging:{cursor:o?.cursors?.prev??void 0,limit:s.limit}}).find(),prevCursor:o?.cursors?.prev??void 0,nextCursor:o?.cursors?.next??void 0})}catch(t){throw e.errorTransformer(t)}},skipTo(e){return t({...n,cursorPaging:{cursor:e,limit:n.cursorPaging.limit}})},eq(r,i){let a=i===void 0?null:i,o={[V(e.transformationPaths,r)]:a};return t({...n,filter:B(n.filter,o)})},ne(r,i){let a=i===void 0?null:i,o={[V(e.transformationPaths,r)]:{$ne:a}};return t({...n,filter:B(n.filter,o)})},ge(r,i){let a={[V(e.transformationPaths,r)]:{$gte:i}};return t({...n,filter:B(n.filter,a)})},gt(r,i){let a={[V(e.transformationPaths,r)]:{$gt:i}};return t({...n,filter:B(n.filter,a)})},le(r,i){let a={[V(e.transformationPaths,r)]:{$lte:i}};return t({...n,filter:B(n.filter,a)})},lt(r,i){let a={[V(e.transformationPaths,r)]:{$lt:i}};return t({...n,filter:B(n.filter,a)})},isNotEmpty(e){return this.ne(e,null)},isEmpty(e){return this.eq(e,null)},startsWith(r,i){let a={[V(e.transformationPaths,r)]:{$startsWith:i}};return t({...n,filter:B(n.filter,a)})},endsWith(r,i){let a={[V(e.transformationPaths,r)]:{$endsWith:i}};return t({...n,filter:B(n.filter,a)})},contains(r,i){let a={[V(e.transformationPaths,r)]:{$contains:i}};return t({...n,filter:B(n.filter,a)})},hasSome(r,...i){let a={[V(e.transformationPaths,r)]:{$hasSome:Array.isArray(i[0])?i[0]:i}};return t({...n,filter:B(n.filter,a)})},hasAll(r,...i){let a={[V(e.transformationPaths,r)]:{$hasAll:Array.isArray(i[0])?i[0]:i}};return t({...n,filter:B(n.filter,a)})},between(e,t,n){return this.ge(e,t).lt(e,n)},in(r,i){let a={[V(e.transformationPaths,r)]:{$in:i}};return t({...n,filter:B(n.filter,a)})},exists(r,i=!0){let a={[V(e.transformationPaths,r)]:{$exists:i}};return t({...n,filter:B(n.filter,a)})},or(e){return t({...n,filter:Oi(n.filter,e.query.filter)})},and(e){return t({...n,filter:B(n.filter,e.query.filter)})},not(e){return t({...n,filter:ki(e.query.filter)})},ascending(...r){return t({...n,sort:[...n.sort??[],...r.map(t=>({fieldName:V(e.transformationPaths,t),order:`ASC`}))]})},descending(...r){return t({...n,sort:[...n.sort??[],...r.map(t=>({fieldName:V(e.transformationPaths,t),order:`DESC`}))]})},skip(e){return t({...n,paging:{offset:e,limit:`limit`in n.paging?n.paging.limit:50}})},limit(r){if(e.pagingMethod===`CURSOR`){let e=n;return t({...n,cursorPaging:{limit:r,cursor:`cursor`in e.cursorPaging?e.cursorPaging.cursor:void 0}})}let i=n;return t({...n,paging:{limit:r,offset:`offset`in i.paging?i.paging.offset:0}})}});return t({filter:{},...e.pagingMethod===`OFFSET`?{paging:{offset:0,limit:50}}:{cursorPaging:{limit:50}}})}function V(e,t){let n=Object.entries(e).find(([e])=>e===t||t.startsWith(`${e}.`))?.[0];return n?t.replace(n,e[n]):ut(t,{...e,...lt})}function Pi(e,t,n={}){let r=(r,i)=>Pi(e,t,{...n,[r]:i}),i=()=>Object.keys(n).length===0?{}:{[x(e,t)]:n};return{get filter(){return i()},eq:e=>r(`$eq`,e),ne:e=>r(`$ne`,e),gt:e=>r(`$gt`,e),gte:e=>r(`$gte`,e),lt:e=>r(`$lt`,e),lte:e=>r(`$lte`,e),startsWith:e=>r(`$startsWith`,e),endsWith:e=>r(`$endsWith`,e),contains:e=>r(`$contains`,e),in:e=>r(`$in`,e),nin:e=>r(`$nin`,e),hasSome:e=>r(`$hasSome`,e),hasAll:e=>r(`$hasAll`,e),exists:(e=!0)=>r(`$exists`,e),isEmpty:(e=!0)=>r(`$isEmpty`,e),isNotEmpty:()=>r(`$ne`,null)}}function Fi(e){return Object.assign(t=>Pi(t,e),{and:(...e)=>({filter:{$and:e.map(e=>e.filter)}}),or:(...e)=>({filter:{$or:e.map(e=>e.filter)}}),not:e=>({filter:{$not:e.filter}})})}function Ii(e){return(t=>({asc:()=>({sort:{fieldName:x(t,e),order:`ASC`}}),desc:()=>({sort:{fieldName:x(t,e),order:`DESC`}})}))}function Li(e){return()=>{let t={},n={withFilter(e){return t={...t,filter:e.filter},n},withFields(...r){return t={...t,fields:r.map(t=>x(t,e))},n},withSorting(...e){return t={...t,sort:e.map(e=>e.sort)},n},withPaging(e){return t={...t,paging:e},n},build(){return t}};return n}}function H(e){return{QueryBuilder:Li(e),Filter:Fi(e),Sort:Ii(e)}}var Ri=`filter`,zi=`sort`,Bi=`cursorPaging`,Vi=`paging`,Hi=[Ri,zi,Bi],Ui=[Ri,zi,Vi];function Wi(e,t){return!e||typeof e!=`object`?!1:t.some(t=>e.hasOwnProperty(t))}function Gi(e){return Wi(e,Hi)}function Ki(e){return Wi(e,Ui)}function qi(e){let{hasOptionsParameter:t}=e;return function(...n){return t?Yi(n,e):Ji(n,e)}}function Ji(e,t){return e.length===0?t.builderQueryFunction():t.typedQueryFunction(e[0])}function Yi(e,t){switch(e.length){case 0:return t.builderQueryFunction();case 1:return Gi(e[0])||Ki(e[0])?t.typedQueryFunction(e[0]):t.builderQueryFunction(e[0]);default:return t.typedQueryFunction(e[0],e[1])}}function U(e){if(!e)return;let t=``;return(e.filename||e.altText)&&(t=`/${encodeURIComponent(e.filename||e.altText)}`),e.id?`wix:image://v1/${e.id}${t}#originWidth=${e.width}&originHeight=${e.height}`:e.url}function Xi(e){if(!e)return;let t=``;e?.filename&&(t=`/${encodeURIComponent(e.filename)}`);let n=``;if(e.posters?.length){let[t,r]=e.posters,i=r||t,a=i.id||``;if(!a&&i.url){let e=i.url.lastIndexOf(`/`);e!==-1&&(a=i.url.substring(e+1))}a&&(n=`#posterUri=${a}&posterWidth=${i.width}&posterHeight=${i.height}`)}return e.id?`wix:video://v1/${e.id}${t}${n}`:e.url}function Zi(e){return k(Object.assign(e,{domainToMappings:{"manage._base_domain_":[{srcPath:`/customization`,destPath:``}],"www.wixapis.com":[{srcPath:`/stores/v3/customizations`,destPath:`/v3/customizations`},{srcPath:`/stores/v3/bulk/customizations`,destPath:`/v3/bulk/customizations`}],"editor._base_domain_":[{srcPath:`/_api/customization`,destPath:``}],"blocks._base_domain_":[{srcPath:`/_api/customization`,destPath:``}],"create.editorx":[{srcPath:`/_api/customization`,destPath:``}],_:[{srcPath:`/_api/customization`,destPath:``}],"*.dev.wix-code.com":[{srcPath:`/_api/customization`,destPath:``}]}}))}var Qi=`@wix/auto_sdk_stores_customizations-v-3`;function $i(e){function t({host:t}){return{entityFqdn:`wix.stores.catalog.v3.customization`,method:`GET`,methodFqn:`wix.stores.catalog.customization.v3.CustomizationService.QueryCustomizations`,packageName:Qi,migrationOptions:{optInTransformResponse:!0},url:Zi({protoPath:`/v3/customizations/query`,data:e,host:t}),params:O(e,!0),transformResponse:e=>T(e,[{transformFn:w,paths:[{path:`customizations.createdDate`},{path:`customizations.updatedDate`},{path:`customizations.choicesSettings.choices.image.urlExpirationDate`},{path:`customizations.choicesSettings.choices.displayImage.urlExpirationDate`}]},{transformFn:j,paths:[{path:`customizations.choicesSettings.choices.image.focalPoint.x`},{path:`customizations.choicesSettings.choices.image.focalPoint.y`}]}]),fallback:[{method:`POST`,url:Zi({protoPath:`/v3/customizations/query`,data:e,host:t}),data:e}]}}return t}var ea=(e=>(e.PRODUCT_OPTION=`PRODUCT_OPTION`,e.MODIFIER=`MODIFIER`,e))(ea||{}),W=(e=>(e.FREE_TEXT=`FREE_TEXT`,e.TEXT_CHOICES=`TEXT_CHOICES`,e.SWATCH_CHOICES=`SWATCH_CHOICES`,e))(W||{}),G=(e=>(e.DEFAULT=`DEFAULT`,e.BY_NAME=`BY_NAME`,e.BY_PRODUCT_COUNT=`BY_PRODUCT_COUNT`,e.MANUAL=`MANUAL`,e))(G||{}),ta=(e=>(e.ASSIGNED_PRODUCTS_COUNT=`ASSIGNED_PRODUCTS_COUNT`,e.CHOICE_DISPLAY_IMAGE=`CHOICE_DISPLAY_IMAGE`,e))(ta||{});function na(e){let{httpClient:t,sideEffects:n}=arguments[1];return Ni({func:async r=>{let i=$i({...r,...e??{}});n?.onSiteCall?.();try{let e=await t.request(i);return n?.onSuccess?.(e),e}catch(e){throw n?.onError?.(e),e}},requestTransformer:t=>{let n=[t,e];return S({...n?.[1],query:n?.[0]})},responseTransformer:({data:e})=>{let t=C(T(e,[{transformFn:U,paths:[{path:`customizations.choicesSettings.choices.image`},{path:`customizations.choicesSettings.choices.displayImage`}]}]));return{items:t?.customizations,pagingMetadata:t?.pagingMetadata}},errorTransformer:e=>{throw E(e,{spreadPathsToArguments:{},explicitPathsToArguments:{query:`$[0]`},singleArgumentUnchanged:!1})},pagingMethod:`CURSOR`,transformationPaths:{}})}async function ra(e,t){let{httpClient:n,sideEffects:r}=arguments[2],i=$i(S({query:e,...t}));r?.onSiteCall?.();try{let e=await n.request(i);return r?.onSuccess?.(e),C(T(e.data,[{transformFn:U,paths:[{path:`customizations.choicesSettings.choices.image`},{path:`customizations.choicesSettings.choices.displayImage`}]}]))}catch(e){let t=E(e,{spreadPathsToArguments:{},explicitPathsToArguments:{query:`$[0]`},singleArgumentUnchanged:!1},[`query`,`options`]);throw r?.onError?.(e),t}}({...H()});function ia(e){return t=>na(t,{httpClient:e})}function aa(e){return(t,n)=>ra(t,n,{httpClient:e})}var oa=y(`wix.stores.catalog.v3.customization_created`,!0,e=>C(T(e,[{transformFn:w,paths:[{path:`entity.createdDate`},{path:`entity.updatedDate`},{path:`metadata.eventTime`}]},{transformFn:U,paths:[{path:`entity.choicesSettings.choices.image`},{path:`entity.choicesSettings.choices.displayImage`}]}])))(),sa=y(`wix.stores.catalog.v3.customization_deleted`,!0,e=>C(T(e,[{transformFn:w,paths:[{path:`entity.createdDate`},{path:`entity.updatedDate`},{path:`metadata.eventTime`}]},{transformFn:U,paths:[{path:`entity.choicesSettings.choices.image`},{path:`entity.choicesSettings.choices.displayImage`}]}])))(),ca=y(`wix.stores.catalog.v3.customization_updated`,!0,e=>C(T(e,[{transformFn:w,paths:[{path:`entity.createdDate`},{path:`entity.updatedDate`},{path:`metadata.eventTime`},{path:`modifiedFields.createdDate`},{path:`modifiedFields.updatedDate`}]},{transformFn:U,paths:[{path:`entity.choicesSettings.choices.image`},{path:`entity.choicesSettings.choices.displayImage`},{path:`modifiedFields.choicesSettings.choices.image`},{path:`modifiedFields.choicesSettings.choices.displayImage`}]}])))();function la(e){let t=qi({builderQueryFunction:t=>ia(e)(t),typedQueryFunction:(t,n)=>aa(e)(t,n),hasOptionsParameter:!0});function n(e,n){return t(...arguments)}return n}var ua=D(la);A(oa),A(sa),A(ca);function da(e){let t={},n={get search(){return t},expression(e){return t={...t,expression:e},n},mode(e){return t={...t,mode:e},n},fields(r){return t={...t,fields:r.map(t=>x(t,e))},n},fuzzy(e=!0){return t={...t,fuzzy:e},n}};return n}function fa(e){return t=>{let n=da(e);return t===void 0?n:n.expression(t)}}function pa(e){let t={...e,type:`VALUE`,value:{...e.value}},n={get aggregation(){return t},sortBy(e,r){return t={...t,value:{...t.value,sortType:e,sortDirection:r}},n},limit(e){return t={...t,value:{...t.value,limit:e}},n},excludeMissingValues(){return t={...t,value:{...t.value,missingValues:`EXCLUDE`}},n},includeMissingValues(){return t={...t,value:{...t.value,missingValues:`INCLUDE`}},n},includeValues(e){return t={...t,value:{...t.value,includeOptions:{addToBucket:e}}},n}};return n}function ma(e){let t={...e,type:`RANGE`,range:{buckets:[]}},n={get aggregation(){return t},withBuckets(...e){return t={...t,range:{buckets:e}},n}};return n}function ha(e){let t={...e,type:`DATE_HISTOGRAM`,dateHistogram:{}},n={get aggregation(){return t},interval(e){return t={...t,dateHistogram:{interval:e}},n}};return n}function ga(e){let t={...e,type:`SCALAR`,scalar:{}},n={get aggregation(){return t},type(e){return t={...t,scalar:{type:e}},n}};return n}function _a(e){let t={...e,type:`NESTED`,nested:{nestedAggregations:[]}},n={get aggregation(){return t},addNestedAggregation(e){let r=e.aggregation,i=[...t.nested?.nestedAggregations??[],r];return t={...t,nested:{nestedAggregations:i}},n}};return n}function va(e,t){let n={name:e},r={get aggregation(){return n},ofType(e){return n={...n,type:e},r},onField(e){return n={...n,fieldPath:x(e,t)},r},asValueAggregation(){return pa(n)},asRangeAggregation(){return ma(n)},asDateHistogramAggregation(){return ha(n)},asScalarAggregation(){return ga(n)},asNestedAggregation(){return _a(n)}};return r}function ya(e){return t=>va(t,e)}function ba(){return()=>{let e={},t={withFilter(n){return e={...e,filter:n.filter},t},withSearchClause(n){return e={...e,search:n.search},t},withSorting(...n){return e={...e,sort:n.map(e=>e.sort)},t},withAggregation(...n){return e={...e,aggregations:n.map(e=>e.aggregation)},t},withPaging(n){return e={...e,paging:n},t},withTimeZone(n){return e={...e,timeZone:n},t},build(){return e}};return t}}function xa(e){return{SearchBuilder:ba(),Filter:Fi(e),Sort:Ii(e),SearchParams:fa(e),Aggregation:ya(e)}}function Sa(e){if(e)return e.url}function Ca(e){return k(Object.assign(e,{domainToMappings:{"api._api_base_domain_":[{srcPath:`/stores-catalog-orchestrator`,destPath:``}],"manage._base_domain_":[{srcPath:`/stores`,destPath:``}],"www.wixapis.com":[{srcPath:`/stores/v3/products`,destPath:`/v3/products`},{srcPath:`/stores/v3/bulk/products`,destPath:`/v3/bulk/products`},{srcPath:`/stores/v3/products-with-inventory`,destPath:`/v3/products-with-inventory`},{srcPath:`/stores/v3/bulk/products-with-inventory`,destPath:`/v3/bulk/products-with-inventory`},{srcPath:`/stores/v3/all-products-category`,destPath:`/v3/all-products-category`}],"www._base_domain_":[{srcPath:`/_api/stores-catalog-orchestrator`,destPath:``}],"editor._base_domain_":[{srcPath:`/_api/stores-catalog-orchestrator`,destPath:``}],"blocks._base_domain_":[{srcPath:`/_api/stores-catalog-orchestrator`,destPath:``}],"create.editorx":[{srcPath:`/_api/stores-catalog-orchestrator`,destPath:``}],"editor.wixapps.net":[{srcPath:`/_api/stores-catalog-orchestrator`,destPath:``}],"*.dev.wix-code.com":[{srcPath:`/_api/stores-catalog-orchestrator`,destPath:``}],_:[{srcPath:`/_api/stores-catalog-orchestrator`,destPath:``}]}}))}var wa=`@wix/auto_sdk_stores_products-v-3`;function Ta(e){function t({host:t}){let n=T(e,[{transformFn:yn,paths:[{path:`search.aggregations.range.buckets.from`},{path:`search.aggregations.range.buckets.to`},{path:`search.aggregations.nested.nestedAggregations.range.buckets.from`},{path:`search.aggregations.nested.nestedAggregations.range.buckets.to`}]}]);return{entityFqdn:`wix.stores.catalog.v3.product`,method:`GET`,methodFqn:`wix.stores.catalog.v3.CatalogApi.SearchProducts`,packageName:wa,migrationOptions:{optInTransformResponse:!0},url:Ca({protoPath:`/v3/products/search`,data:n,host:t}),params:O(n,!0),transformResponse:e=>T(e,[{transformFn:w,paths:[{path:`products.createdDate`},{path:`products.updatedDate`},{path:`products.description.metadata.createdTimestamp`},{path:`products.description.metadata.updatedTimestamp`},{path:`products.media.main.image.urlExpirationDate`},{path:`products.media.main.video.urlExpirationDate`},{path:`products.media.main.video.resolutions.urlExpirationDate`},{path:`products.media.main.video.resolutions.poster.urlExpirationDate`},{path:`products.media.main.video.posters.urlExpirationDate`},{path:`products.media.itemsInfo.items.image.urlExpirationDate`},{path:`products.media.itemsInfo.items.video.urlExpirationDate`},{path:`products.media.itemsInfo.items.video.resolutions.urlExpirationDate`},{path:`products.media.itemsInfo.items.video.resolutions.poster.urlExpirationDate`},{path:`products.media.itemsInfo.items.video.posters.urlExpirationDate`},{path:`products.options.choicesSettings.choices.image.urlExpirationDate`},{path:`products.options.choicesSettings.choices.linkedMedia.image.urlExpirationDate`},{path:`products.options.choicesSettings.choices.linkedMedia.video.urlExpirationDate`},{path:`products.options.choicesSettings.choices.linkedMedia.video.resolutions.urlExpirationDate`},{path:`products.options.choicesSettings.choices.linkedMedia.video.resolutions.poster.urlExpirationDate`},{path:`products.options.choicesSettings.choices.linkedMedia.video.posters.urlExpirationDate`},{path:`products.options.choicesSettings.choices.displayImage.urlExpirationDate`},{path:`products.modifiers.choicesSettings.choices.image.urlExpirationDate`},{path:`products.modifiers.choicesSettings.choices.linkedMedia.image.urlExpirationDate`},{path:`products.modifiers.choicesSettings.choices.linkedMedia.video.urlExpirationDate`},{path:`products.modifiers.choicesSettings.choices.linkedMedia.video.resolutions.urlExpirationDate`},{path:`products.modifiers.choicesSettings.choices.linkedMedia.video.resolutions.poster.urlExpirationDate`},{path:`products.modifiers.choicesSettings.choices.linkedMedia.video.posters.urlExpirationDate`},{path:`products.modifiers.choicesSettings.choices.displayImage.urlExpirationDate`},{path:`products.infoSections.description.metadata.createdTimestamp`},{path:`products.infoSections.description.metadata.updatedTimestamp`},{path:`products.variantsInfo.variants.media.image.urlExpirationDate`},{path:`products.variantsInfo.variants.media.video.urlExpirationDate`},{path:`products.variantsInfo.variants.media.video.resolutions.urlExpirationDate`},{path:`products.variantsInfo.variants.media.video.resolutions.poster.urlExpirationDate`},{path:`products.variantsInfo.variants.media.video.posters.urlExpirationDate`},{path:`products.variantSummary.minPriceVariant.media.image.urlExpirationDate`},{path:`products.variantSummary.minPriceVariant.media.video.urlExpirationDate`},{path:`products.variantSummary.minPriceVariant.media.video.resolutions.urlExpirationDate`},{path:`products.variantSummary.minPriceVariant.media.video.resolutions.poster.urlExpirationDate`},{path:`products.variantSummary.minPriceVariant.media.video.posters.urlExpirationDate`}]},{transformFn:j,paths:[{path:`products.physicalProperties.pricePerUnit.quantity`},{path:`products.physicalProperties.shippingWeightRange.minValue`},{path:`products.physicalProperties.shippingWeightRange.maxValue`},{path:`products.variantsInfo.variants.physicalProperties.pricePerUnit.settings.quantity`},{path:`products.variantsInfo.variants.revenueDetails.profitMargin`},{path:`products.subscriptionDetails.subscriptions.discount.percentOff`},{path:`products.variantSummary.minPriceVariant.physicalProperties.pricePerUnit.settings.quantity`},{path:`products.variantSummary.minPriceVariant.revenueDetails.profitMargin`},{path:`products.minVariantPriceInfo.pricePerUnitData.settings.quantity`},{path:`products.minVariantPriceInfo.revenueDetails.profitMargin`},{path:`aggregationData.results.scalar.value`},{path:`aggregationData.results.groupedByValue.results.nestedResults.scalar.value`},{path:`aggregationData.results.nested.results.results.*.scalar.value`},{path:`products.description.nodes.buttonData.styles.background.gradient.centerX`},{path:`products.description.nodes.buttonData.styles.background.gradient.centerY`},{path:`products.description.nodes.buttonData.styles.background.gradient.stops.position`},{path:`products.description.nodes.buttonData.styles.backgroundHover.gradient.centerX`},{path:`products.description.nodes.buttonData.styles.backgroundHover.gradient.centerY`},{path:`products.description.nodes.buttonData.styles.backgroundHover.gradient.stops.position`},{path:`products.description.nodes.galleryData.items.image.media.duration`},{path:`products.description.nodes.galleryData.items.video.media.duration`},{path:`products.description.nodes.galleryData.items.video.thumbnail.duration`},{path:`products.description.nodes.galleryData.options.item.ratio`},{path:`products.description.nodes.imageData.image.duration`},{path:`products.description.nodes.imageData.crop.x`},{path:`products.description.nodes.imageData.crop.y`},{path:`products.description.nodes.imageData.crop.width`},{path:`products.description.nodes.imageData.crop.height`},{path:`products.description.nodes.mapData.mapSettings.lat`},{path:`products.description.nodes.mapData.mapSettings.lng`},{path:`products.description.nodes.pollData.poll.image.duration`},{path:`products.description.nodes.pollData.poll.options.image.duration`},{path:`products.description.nodes.pollData.design.poll.background.image.duration`},{path:`products.description.nodes.appEmbedData.image.duration`},{path:`products.description.nodes.videoData.video.duration`},{path:`products.description.nodes.videoData.thumbnail.duration`},{path:`products.description.nodes.audioData.audio.duration`},{path:`products.description.nodes.audioData.coverImage.duration`},{path:`products.description.nodes.layoutData.backgroundImage.media.duration`},{path:`products.description.nodes.layoutData.backgroundImage.overlay.gradient.centerX`},{path:`products.description.nodes.layoutData.backgroundImage.overlay.gradient.centerY`},{path:`products.description.nodes.layoutData.backgroundImage.overlay.gradient.stops.position`},{path:`products.description.nodes.layoutData.backdropImage.media.duration`},{path:`products.description.nodes.layoutData.backdropImage.overlay.gradient.centerX`},{path:`products.description.nodes.layoutData.backdropImage.overlay.gradient.centerY`},{path:`products.description.nodes.layoutData.backdropImage.overlay.gradient.stops.position`},{path:`products.description.nodes.layoutData.background.gradient.centerX`},{path:`products.description.nodes.layoutData.background.gradient.centerY`},{path:`products.description.nodes.layoutData.background.gradient.stops.position`},{path:`products.description.nodes.layoutData.backdrop.gradient.centerX`},{path:`products.description.nodes.layoutData.backdrop.gradient.centerY`},{path:`products.description.nodes.layoutData.backdrop.gradient.stops.position`},{path:`products.description.nodes.shapeData.shape.duration`},{path:`products.description.nodes.cardData.background.gradient.centerX`},{path:`products.description.nodes.cardData.background.gradient.centerY`},{path:`products.description.nodes.cardData.background.gradient.stops.position`},{path:`products.description.nodes.cardData.backgroundImage.media.duration`},{path:`products.description.nodes.cardData.backgroundImage.overlay.gradient.centerX`},{path:`products.description.nodes.cardData.backgroundImage.overlay.gradient.centerY`},{path:`products.description.nodes.cardData.backgroundImage.overlay.gradient.stops.position`},{path:`products.description.nodes.tocData.fontSize`},{path:`products.description.nodes.tocData.itemSpacing`},{path:`products.description.nodes.smartBlockCellData.shape.duration`},{path:`products.infoSections.description.nodes.buttonData.styles.background.gradient.centerX`},{path:`products.infoSections.description.nodes.buttonData.styles.background.gradient.centerY`},{path:`products.infoSections.description.nodes.buttonData.styles.background.gradient.stops.position`},{path:`products.infoSections.description.nodes.buttonData.styles.backgroundHover.gradient.centerX`},{path:`products.infoSections.description.nodes.buttonData.styles.backgroundHover.gradient.centerY`},{path:`products.infoSections.description.nodes.buttonData.styles.backgroundHover.gradient.stops.position`},{path:`products.infoSections.description.nodes.galleryData.items.image.media.duration`},{path:`products.infoSections.description.nodes.galleryData.items.video.media.duration`},{path:`products.infoSections.description.nodes.galleryData.items.video.thumbnail.duration`},{path:`products.infoSections.description.nodes.galleryData.options.item.ratio`},{path:`products.infoSections.description.nodes.imageData.image.duration`},{path:`products.infoSections.description.nodes.imageData.crop.x`},{path:`products.infoSections.description.nodes.imageData.crop.y`},{path:`products.infoSections.description.nodes.imageData.crop.width`},{path:`products.infoSections.description.nodes.imageData.crop.height`},{path:`products.infoSections.description.nodes.mapData.mapSettings.lat`},{path:`products.infoSections.description.nodes.mapData.mapSettings.lng`},{path:`products.infoSections.description.nodes.pollData.poll.image.duration`},{path:`products.infoSections.description.nodes.pollData.poll.options.image.duration`},{path:`products.infoSections.description.nodes.pollData.design.poll.background.image.duration`},{path:`products.infoSections.description.nodes.appEmbedData.image.duration`},{path:`products.infoSections.description.nodes.videoData.video.duration`},{path:`products.infoSections.description.nodes.videoData.thumbnail.duration`},{path:`products.infoSections.description.nodes.audioData.audio.duration`},{path:`products.infoSections.description.nodes.audioData.coverImage.duration`},{path:`products.infoSections.description.nodes.layoutData.backgroundImage.media.duration`},{path:`products.infoSections.description.nodes.layoutData.backgroundImage.overlay.gradient.centerX`},{path:`products.infoSections.description.nodes.layoutData.backgroundImage.overlay.gradient.centerY`},{path:`products.infoSections.description.nodes.layoutData.backgroundImage.overlay.gradient.stops.position`},{path:`products.infoSections.description.nodes.layoutData.backdropImage.media.duration`},{path:`products.infoSections.description.nodes.layoutData.backdropImage.overlay.gradient.centerX`},{path:`products.infoSections.description.nodes.layoutData.backdropImage.overlay.gradient.centerY`},{path:`products.infoSections.description.nodes.layoutData.backdropImage.overlay.gradient.stops.position`},{path:`products.infoSections.description.nodes.layoutData.background.gradient.centerX`},{path:`products.infoSections.description.nodes.layoutData.background.gradient.centerY`},{path:`products.infoSections.description.nodes.layoutData.background.gradient.stops.position`},{path:`products.infoSections.description.nodes.layoutData.backdrop.gradient.centerX`},{path:`products.infoSections.description.nodes.layoutData.backdrop.gradient.centerY`},{path:`products.infoSections.description.nodes.layoutData.backdrop.gradient.stops.position`},{path:`products.infoSections.description.nodes.shapeData.shape.duration`},{path:`products.infoSections.description.nodes.cardData.background.gradient.centerX`},{path:`products.infoSections.description.nodes.cardData.background.gradient.centerY`},{path:`products.infoSections.description.nodes.cardData.background.gradient.stops.position`},{path:`products.infoSections.description.nodes.cardData.backgroundImage.media.duration`},{path:`products.infoSections.description.nodes.cardData.backgroundImage.overlay.gradient.centerX`},{path:`products.infoSections.description.nodes.cardData.backgroundImage.overlay.gradient.centerY`},{path:`products.infoSections.description.nodes.cardData.backgroundImage.overlay.gradient.stops.position`},{path:`products.infoSections.description.nodes.tocData.fontSize`},{path:`products.infoSections.description.nodes.tocData.itemSpacing`},{path:`products.infoSections.description.nodes.smartBlockCellData.shape.duration`},{path:`products.variantsInfo.variants.physicalProperties.weight`},{path:`products.variantSummary.minPriceVariant.physicalProperties.weight`},{path:`products.minVariantPriceInfo.weight`},{path:`aggregationData.results.ranges.results.from`},{path:`aggregationData.results.ranges.results.to`},{path:`aggregationData.results.groupedByValue.results.nestedResults.ranges.results.from`},{path:`aggregationData.results.groupedByValue.results.nestedResults.ranges.results.to`},{path:`aggregationData.results.nested.results.results.*.range.from`},{path:`aggregationData.results.nested.results.results.*.range.to`}]}]),fallback:[{method:`POST`,url:Ca({protoPath:`/v3/products/search`,data:n,host:t}),data:n}]}}return t}function Ea(e){function t({host:t}){return{entityFqdn:`wix.stores.catalog.v3.product`,method:`GET`,methodFqn:`wix.stores.catalog.v3.CatalogApi.CountProducts`,packageName:wa,migrationOptions:{optInTransformResponse:!0},url:Ca({protoPath:`/v3/products/count`,data:e,host:t}),params:O(e,!0),fallback:[{method:`POST`,url:Ca({protoPath:`/v3/products/count`,data:e,host:t}),data:e}]}}return t}var Da=(e=>(e.FREE_TEXT=`FREE_TEXT`,e.TEXT_CHOICES=`TEXT_CHOICES`,e.SWATCH_CHOICES=`SWATCH_CHOICES`,e))(Da||{}),K=(e=>(e.ASC=`ASC`,e.DESC=`DESC`,e))(K||{}),Oa=(e=>(e.COUNT=`COUNT`,e.VALUE=`VALUE`,e))(Oa||{}),ka=(e=>(e.DESC=`DESC`,e.ASC=`ASC`,e))(ka||{}),Aa=(e=>(e.COUNT_DISTINCT=`COUNT_DISTINCT`,e.MIN=`MIN`,e.MAX=`MAX`,e))(Aa||{}),ja=(e=>(e.VALUE=`VALUE`,e.RANGE=`RANGE`,e.SCALAR=`SCALAR`,e.DATE_HISTOGRAM=`DATE_HISTOGRAM`,e.NESTED=`NESTED`,e))(ja||{}),q=(e=>(e.URL=`URL`,e.CURRENCY=`CURRENCY`,e.INFO_SECTION=`INFO_SECTION`,e.MERCHANT_DATA=`MERCHANT_DATA`,e.PLAIN_DESCRIPTION=`PLAIN_DESCRIPTION`,e.INFO_SECTION_PLAIN_DESCRIPTION=`INFO_SECTION_PLAIN_DESCRIPTION`,e.SUBSCRIPTION_PRICES_INFO=`SUBSCRIPTION_PRICES_INFO`,e.BREADCRUMBS_INFO=`BREADCRUMBS_INFO`,e.WEIGHT_MEASUREMENT_UNIT_INFO=`WEIGHT_MEASUREMENT_UNIT_INFO`,e.VARIANT_OPTION_CHOICE_NAMES=`VARIANT_OPTION_CHOICE_NAMES`,e.MEDIA_ITEMS_INFO=`MEDIA_ITEMS_INFO`,e.DESCRIPTION=`DESCRIPTION`,e.DIRECT_CATEGORIES_INFO=`DIRECT_CATEGORIES_INFO`,e.ALL_CATEGORIES_INFO=`ALL_CATEGORIES_INFO`,e.INFO_SECTION_DESCRIPTION=`INFO_SECTION_DESCRIPTION`,e.THUMBNAIL=`THUMBNAIL`,e.PRODUCT_CHOICES_MEDIA_REFERENCES=`PRODUCT_CHOICES_MEDIA_REFERENCES`,e.PRODUCT_CHOICES_DISPLAY_IMAGE=`PRODUCT_CHOICES_DISPLAY_IMAGE`,e.MIN_PRICE_VARIANT=`MIN_PRICE_VARIANT`,e.DISCOUNT_INFO=`DISCOUNT_INFO`,e))(q||{});async function Ma(e,t){let{httpClient:n,sideEffects:r}=arguments[2],i=Ta(S({search:e,fields:t?.fields},[]));r?.onSiteCall?.();try{let e=await n.request(i);return r?.onSuccess?.(e),C(T(e.data,[{transformFn:Sa,paths:[{path:`products.url`}]},{transformFn:U,paths:[{path:`products.media.main.image`},{path:`products.media.itemsInfo.items.image`},{path:`products.options.choicesSettings.choices.image`},{path:`products.options.choicesSettings.choices.displayImage`},{path:`products.options.choicesSettings.choices.linkedMedia.image`},{path:`products.modifiers.choicesSettings.choices.image`},{path:`products.modifiers.choicesSettings.choices.displayImage`},{path:`products.modifiers.choicesSettings.choices.linkedMedia.image`},{path:`products.variantsInfo.variants.media.image`},{path:`products.variantSummary.minPriceVariant.media.image`}]},{transformFn:Xi,paths:[{path:`products.media.main.video`},{path:`products.media.itemsInfo.items.video`},{path:`products.options.choicesSettings.choices.linkedMedia.video`},{path:`products.modifiers.choicesSettings.choices.linkedMedia.video`},{path:`products.variantsInfo.variants.media.video`},{path:`products.variantSummary.minPriceVariant.media.video`}]}]),[`products.description`,`products.infoSections.description`])}catch(e){let t=E(e,{spreadPathsToArguments:{},explicitPathsToArguments:{search:`$[0]`,fields:`$[1].fields`},singleArgumentUnchanged:!1},[`search`,`options`]);throw r?.onError?.(e),t}}({...xa()}),{...H()};async function Na(e){let{httpClient:t,sideEffects:n}=arguments[1],r=Ea(S({filter:e?.filter,search:e?.search,returnNonVisibleProducts:e?.returnNonVisibleProducts},[]));n?.onSiteCall?.();try{let e=await t.request(r);return n?.onSuccess?.(e),C(e.data,[])}catch(e){let t=E(e,{spreadPathsToArguments:{},explicitPathsToArguments:{filter:`$[0].filter`,search:`$[0].search`,returnNonVisibleProducts:`$[0].returnNonVisibleProducts`},singleArgumentUnchanged:!1},[`options`]);throw n?.onError?.(e),t}}function Pa(e){return(t,n)=>Ma(t,n,{httpClient:e})}function Fa(e){return t=>Na(t,{httpClient:e})}var Ia=y(`wix.stores.catalog.v3.product_created`,!0,e=>C(T(e,[{transformFn:w,paths:[{path:`entity.createdDate`},{path:`entity.updatedDate`},{path:`entity.description.metadata.createdTimestamp`},{path:`entity.description.metadata.updatedTimestamp`},{path:`entity.infoSections.description.metadata.createdTimestamp`},{path:`entity.infoSections.description.metadata.updatedTimestamp`},{path:`metadata.eventTime`}]},{transformFn:Sa,paths:[{path:`entity.url`}]},{transformFn:j,paths:[{path:`entity.physicalProperties.pricePerUnit.quantity`},{path:`entity.physicalProperties.shippingWeightRange.minValue`},{path:`entity.physicalProperties.shippingWeightRange.maxValue`},{path:`entity.variantsInfo.variants.physicalProperties.pricePerUnit.settings.quantity`},{path:`entity.variantsInfo.variants.revenueDetails.profitMargin`},{path:`entity.subscriptionDetails.subscriptions.discount.percentOff`},{path:`entity.variantSummary.minPriceVariant.physicalProperties.pricePerUnit.settings.quantity`},{path:`entity.variantSummary.minPriceVariant.revenueDetails.profitMargin`},{path:`entity.minVariantPriceInfo.pricePerUnitData.settings.quantity`},{path:`entity.minVariantPriceInfo.revenueDetails.profitMargin`},{path:`entity.description.nodes.buttonData.styles.background.gradient.centerX`},{path:`entity.description.nodes.buttonData.styles.background.gradient.centerY`},{path:`entity.description.nodes.buttonData.styles.background.gradient.stops.position`},{path:`entity.description.nodes.buttonData.styles.backgroundHover.gradient.centerX`},{path:`entity.description.nodes.buttonData.styles.backgroundHover.gradient.centerY`},{path:`entity.description.nodes.buttonData.styles.backgroundHover.gradient.stops.position`},{path:`entity.description.nodes.galleryData.items.image.media.duration`},{path:`entity.description.nodes.galleryData.items.video.media.duration`},{path:`entity.description.nodes.galleryData.items.video.thumbnail.duration`},{path:`entity.description.nodes.galleryData.options.item.ratio`},{path:`entity.description.nodes.imageData.image.duration`},{path:`entity.description.nodes.imageData.crop.x`},{path:`entity.description.nodes.imageData.crop.y`},{path:`entity.description.nodes.imageData.crop.width`},{path:`entity.description.nodes.imageData.crop.height`},{path:`entity.description.nodes.mapData.mapSettings.lat`},{path:`entity.description.nodes.mapData.mapSettings.lng`},{path:`entity.description.nodes.pollData.poll.image.duration`},{path:`entity.description.nodes.pollData.poll.options.image.duration`},{path:`entity.description.nodes.pollData.design.poll.background.image.duration`},{path:`entity.description.nodes.appEmbedData.image.duration`},{path:`entity.description.nodes.videoData.video.duration`},{path:`entity.description.nodes.videoData.thumbnail.duration`},{path:`entity.description.nodes.audioData.audio.duration`},{path:`entity.description.nodes.audioData.coverImage.duration`},{path:`entity.description.nodes.layoutData.backgroundImage.media.duration`},{path:`entity.description.nodes.layoutData.backgroundImage.overlay.gradient.centerX`},{path:`entity.description.nodes.layoutData.backgroundImage.overlay.gradient.centerY`},{path:`entity.description.nodes.layoutData.backgroundImage.overlay.gradient.stops.position`},{path:`entity.description.nodes.layoutData.backdropImage.media.duration`},{path:`entity.description.nodes.layoutData.backdropImage.overlay.gradient.centerX`},{path:`entity.description.nodes.layoutData.backdropImage.overlay.gradient.centerY`},{path:`entity.description.nodes.layoutData.backdropImage.overlay.gradient.stops.position`},{path:`entity.description.nodes.layoutData.background.gradient.centerX`},{path:`entity.description.nodes.layoutData.background.gradient.centerY`},{path:`entity.description.nodes.layoutData.background.gradient.stops.position`},{path:`entity.description.nodes.layoutData.backdrop.gradient.centerX`},{path:`entity.description.nodes.layoutData.backdrop.gradient.centerY`},{path:`entity.description.nodes.layoutData.backdrop.gradient.stops.position`},{path:`entity.description.nodes.shapeData.shape.duration`},{path:`entity.description.nodes.cardData.background.gradient.centerX`},{path:`entity.description.nodes.cardData.background.gradient.centerY`},{path:`entity.description.nodes.cardData.background.gradient.stops.position`},{path:`entity.description.nodes.cardData.backgroundImage.media.duration`},{path:`entity.description.nodes.cardData.backgroundImage.overlay.gradient.centerX`},{path:`entity.description.nodes.cardData.backgroundImage.overlay.gradient.centerY`},{path:`entity.description.nodes.cardData.backgroundImage.overlay.gradient.stops.position`},{path:`entity.description.nodes.tocData.fontSize`},{path:`entity.description.nodes.tocData.itemSpacing`},{path:`entity.description.nodes.smartBlockCellData.shape.duration`},{path:`entity.infoSections.description.nodes.buttonData.styles.background.gradient.centerX`},{path:`entity.infoSections.description.nodes.buttonData.styles.background.gradient.centerY`},{path:`entity.infoSections.description.nodes.buttonData.styles.background.gradient.stops.position`},{path:`entity.infoSections.description.nodes.buttonData.styles.backgroundHover.gradient.centerX`},{path:`entity.infoSections.description.nodes.buttonData.styles.backgroundHover.gradient.centerY`},{path:`entity.infoSections.description.nodes.buttonData.styles.backgroundHover.gradient.stops.position`},{path:`entity.infoSections.description.nodes.galleryData.items.image.media.duration`},{path:`entity.infoSections.description.nodes.galleryData.items.video.media.duration`},{path:`entity.infoSections.description.nodes.galleryData.items.video.thumbnail.duration`},{path:`entity.infoSections.description.nodes.galleryData.options.item.ratio`},{path:`entity.infoSections.description.nodes.imageData.image.duration`},{path:`entity.infoSections.description.nodes.imageData.crop.x`},{path:`entity.infoSections.description.nodes.imageData.crop.y`},{path:`entity.infoSections.description.nodes.imageData.crop.width`},{path:`entity.infoSections.description.nodes.imageData.crop.height`},{path:`entity.infoSections.description.nodes.mapData.mapSettings.lat`},{path:`entity.infoSections.description.nodes.mapData.mapSettings.lng`},{path:`entity.infoSections.description.nodes.pollData.poll.image.duration`},{path:`entity.infoSections.description.nodes.pollData.poll.options.image.duration`},{path:`entity.infoSections.description.nodes.pollData.design.poll.background.image.duration`},{path:`entity.infoSections.description.nodes.appEmbedData.image.duration`},{path:`entity.infoSections.description.nodes.videoData.video.duration`},{path:`entity.infoSections.description.nodes.videoData.thumbnail.duration`},{path:`entity.infoSections.description.nodes.audioData.audio.duration`},{path:`entity.infoSections.description.nodes.audioData.coverImage.duration`},{path:`entity.infoSections.description.nodes.layoutData.backgroundImage.media.duration`},{path:`entity.infoSections.description.nodes.layoutData.backgroundImage.overlay.gradient.centerX`},{path:`entity.infoSections.description.nodes.layoutData.backgroundImage.overlay.gradient.centerY`},{path:`entity.infoSections.description.nodes.layoutData.backgroundImage.overlay.gradient.stops.position`},{path:`entity.infoSections.description.nodes.layoutData.backdropImage.media.duration`},{path:`entity.infoSections.description.nodes.layoutData.backdropImage.overlay.gradient.centerX`},{path:`entity.infoSections.description.nodes.layoutData.backdropImage.overlay.gradient.centerY`},{path:`entity.infoSections.description.nodes.layoutData.backdropImage.overlay.gradient.stops.position`},{path:`entity.infoSections.description.nodes.layoutData.background.gradient.centerX`},{path:`entity.infoSections.description.nodes.layoutData.background.gradient.centerY`},{path:`entity.infoSections.description.nodes.layoutData.background.gradient.stops.position`},{path:`entity.infoSections.description.nodes.layoutData.backdrop.gradient.centerX`},{path:`entity.infoSections.description.nodes.layoutData.backdrop.gradient.centerY`},{path:`entity.infoSections.description.nodes.layoutData.backdrop.gradient.stops.position`},{path:`entity.infoSections.description.nodes.shapeData.shape.duration`},{path:`entity.infoSections.description.nodes.cardData.background.gradient.centerX`},{path:`entity.infoSections.description.nodes.cardData.background.gradient.centerY`},{path:`entity.infoSections.description.nodes.cardData.background.gradient.stops.position`},{path:`entity.infoSections.description.nodes.cardData.backgroundImage.media.duration`},{path:`entity.infoSections.description.nodes.cardData.backgroundImage.overlay.gradient.centerX`},{path:`entity.infoSections.description.nodes.cardData.backgroundImage.overlay.gradient.centerY`},{path:`entity.infoSections.description.nodes.cardData.backgroundImage.overlay.gradient.stops.position`},{path:`entity.infoSections.description.nodes.tocData.fontSize`},{path:`entity.infoSections.description.nodes.tocData.itemSpacing`},{path:`entity.infoSections.description.nodes.smartBlockCellData.shape.duration`},{path:`entity.variantsInfo.variants.physicalProperties.weight`},{path:`entity.variantSummary.minPriceVariant.physicalProperties.weight`},{path:`entity.minVariantPriceInfo.weight`}]},{transformFn:U,paths:[{path:`entity.media.main.image`},{path:`entity.media.itemsInfo.items.image`},{path:`entity.options.choicesSettings.choices.image`},{path:`entity.options.choicesSettings.choices.displayImage`},{path:`entity.options.choicesSettings.choices.linkedMedia.image`},{path:`entity.modifiers.choicesSettings.choices.image`},{path:`entity.modifiers.choicesSettings.choices.displayImage`},{path:`entity.modifiers.choicesSettings.choices.linkedMedia.image`},{path:`entity.variantsInfo.variants.media.image`},{path:`entity.variantSummary.minPriceVariant.media.image`}]},{transformFn:Xi,paths:[{path:`entity.media.main.video`},{path:`entity.media.itemsInfo.items.video`},{path:`entity.options.choicesSettings.choices.linkedMedia.video`},{path:`entity.modifiers.choicesSettings.choices.linkedMedia.video`},{path:`entity.variantsInfo.variants.media.video`},{path:`entity.variantSummary.minPriceVariant.media.video`}]}])))(),La=y(`wix.stores.catalog.v3.product_deleted`,!0,e=>C(T(e,[{transformFn:w,paths:[{path:`entity.createdDate`},{path:`entity.updatedDate`},{path:`entity.description.metadata.createdTimestamp`},{path:`entity.description.metadata.updatedTimestamp`},{path:`entity.infoSections.description.metadata.createdTimestamp`},{path:`entity.infoSections.description.metadata.updatedTimestamp`},{path:`metadata.eventTime`}]},{transformFn:Sa,paths:[{path:`entity.url`}]},{transformFn:j,paths:[{path:`entity.physicalProperties.pricePerUnit.quantity`},{path:`entity.physicalProperties.shippingWeightRange.minValue`},{path:`entity.physicalProperties.shippingWeightRange.maxValue`},{path:`entity.variantsInfo.variants.physicalProperties.pricePerUnit.settings.quantity`},{path:`entity.variantsInfo.variants.revenueDetails.profitMargin`},{path:`entity.subscriptionDetails.subscriptions.discount.percentOff`},{path:`entity.variantSummary.minPriceVariant.physicalProperties.pricePerUnit.settings.quantity`},{path:`entity.variantSummary.minPriceVariant.revenueDetails.profitMargin`},{path:`entity.minVariantPriceInfo.pricePerUnitData.settings.quantity`},{path:`entity.minVariantPriceInfo.revenueDetails.profitMargin`},{path:`entity.description.nodes.buttonData.styles.background.gradient.centerX`},{path:`entity.description.nodes.buttonData.styles.background.gradient.centerY`},{path:`entity.description.nodes.buttonData.styles.background.gradient.stops.position`},{path:`entity.description.nodes.buttonData.styles.backgroundHover.gradient.centerX`},{path:`entity.description.nodes.buttonData.styles.backgroundHover.gradient.centerY`},{path:`entity.description.nodes.buttonData.styles.backgroundHover.gradient.stops.position`},{path:`entity.description.nodes.galleryData.items.image.media.duration`},{path:`entity.description.nodes.galleryData.items.video.media.duration`},{path:`entity.description.nodes.galleryData.items.video.thumbnail.duration`},{path:`entity.description.nodes.galleryData.options.item.ratio`},{path:`entity.description.nodes.imageData.image.duration`},{path:`entity.description.nodes.imageData.crop.x`},{path:`entity.description.nodes.imageData.crop.y`},{path:`entity.description.nodes.imageData.crop.width`},{path:`entity.description.nodes.imageData.crop.height`},{path:`entity.description.nodes.mapData.mapSettings.lat`},{path:`entity.description.nodes.mapData.mapSettings.lng`},{path:`entity.description.nodes.pollData.poll.image.duration`},{path:`entity.description.nodes.pollData.poll.options.image.duration`},{path:`entity.description.nodes.pollData.design.poll.background.image.duration`},{path:`entity.description.nodes.appEmbedData.image.duration`},{path:`entity.description.nodes.videoData.video.duration`},{path:`entity.description.nodes.videoData.thumbnail.duration`},{path:`entity.description.nodes.audioData.audio.duration`},{path:`entity.description.nodes.audioData.coverImage.duration`},{path:`entity.description.nodes.layoutData.backgroundImage.media.duration`},{path:`entity.description.nodes.layoutData.backgroundImage.overlay.gradient.centerX`},{path:`entity.description.nodes.layoutData.backgroundImage.overlay.gradient.centerY`},{path:`entity.description.nodes.layoutData.backgroundImage.overlay.gradient.stops.position`},{path:`entity.description.nodes.layoutData.backdropImage.media.duration`},{path:`entity.description.nodes.layoutData.backdropImage.overlay.gradient.centerX`},{path:`entity.description.nodes.layoutData.backdropImage.overlay.gradient.centerY`},{path:`entity.description.nodes.layoutData.backdropImage.overlay.gradient.stops.position`},{path:`entity.description.nodes.layoutData.background.gradient.centerX`},{path:`entity.description.nodes.layoutData.background.gradient.centerY`},{path:`entity.description.nodes.layoutData.background.gradient.stops.position`},{path:`entity.description.nodes.layoutData.backdrop.gradient.centerX`},{path:`entity.description.nodes.layoutData.backdrop.gradient.centerY`},{path:`entity.description.nodes.layoutData.backdrop.gradient.stops.position`},{path:`entity.description.nodes.shapeData.shape.duration`},{path:`entity.description.nodes.cardData.background.gradient.centerX`},{path:`entity.description.nodes.cardData.background.gradient.centerY`},{path:`entity.description.nodes.cardData.background.gradient.stops.position`},{path:`entity.description.nodes.cardData.backgroundImage.media.duration`},{path:`entity.description.nodes.cardData.backgroundImage.overlay.gradient.centerX`},{path:`entity.description.nodes.cardData.backgroundImage.overlay.gradient.centerY`},{path:`entity.description.nodes.cardData.backgroundImage.overlay.gradient.stops.position`},{path:`entity.description.nodes.tocData.fontSize`},{path:`entity.description.nodes.tocData.itemSpacing`},{path:`entity.description.nodes.smartBlockCellData.shape.duration`},{path:`entity.infoSections.description.nodes.buttonData.styles.background.gradient.centerX`},{path:`entity.infoSections.description.nodes.buttonData.styles.background.gradient.centerY`},{path:`entity.infoSections.description.nodes.buttonData.styles.background.gradient.stops.position`},{path:`entity.infoSections.description.nodes.buttonData.styles.backgroundHover.gradient.centerX`},{path:`entity.infoSections.description.nodes.buttonData.styles.backgroundHover.gradient.centerY`},{path:`entity.infoSections.description.nodes.buttonData.styles.backgroundHover.gradient.stops.position`},{path:`entity.infoSections.description.nodes.galleryData.items.image.media.duration`},{path:`entity.infoSections.description.nodes.galleryData.items.video.media.duration`},{path:`entity.infoSections.description.nodes.galleryData.items.video.thumbnail.duration`},{path:`entity.infoSections.description.nodes.galleryData.options.item.ratio`},{path:`entity.infoSections.description.nodes.imageData.image.duration`},{path:`entity.infoSections.description.nodes.imageData.crop.x`},{path:`entity.infoSections.description.nodes.imageData.crop.y`},{path:`entity.infoSections.description.nodes.imageData.crop.width`},{path:`entity.infoSections.description.nodes.imageData.crop.height`},{path:`entity.infoSections.description.nodes.mapData.mapSettings.lat`},{path:`entity.infoSections.description.nodes.mapData.mapSettings.lng`},{path:`entity.infoSections.description.nodes.pollData.poll.image.duration`},{path:`entity.infoSections.description.nodes.pollData.poll.options.image.duration`},{path:`entity.infoSections.description.nodes.pollData.design.poll.background.image.duration`},{path:`entity.infoSections.description.nodes.appEmbedData.image.duration`},{path:`entity.infoSections.description.nodes.videoData.video.duration`},{path:`entity.infoSections.description.nodes.videoData.thumbnail.duration`},{path:`entity.infoSections.description.nodes.audioData.audio.duration`},{path:`entity.infoSections.description.nodes.audioData.coverImage.duration`},{path:`entity.infoSections.description.nodes.layoutData.backgroundImage.media.duration`},{path:`entity.infoSections.description.nodes.layoutData.backgroundImage.overlay.gradient.centerX`},{path:`entity.infoSections.description.nodes.layoutData.backgroundImage.overlay.gradient.centerY`},{path:`entity.infoSections.description.nodes.layoutData.backgroundImage.overlay.gradient.stops.position`},{path:`entity.infoSections.description.nodes.layoutData.backdropImage.media.duration`},{path:`entity.infoSections.description.nodes.layoutData.backdropImage.overlay.gradient.centerX`},{path:`entity.infoSections.description.nodes.layoutData.backdropImage.overlay.gradient.centerY`},{path:`entity.infoSections.description.nodes.layoutData.backdropImage.overlay.gradient.stops.position`},{path:`entity.infoSections.description.nodes.layoutData.background.gradient.centerX`},{path:`entity.infoSections.description.nodes.layoutData.background.gradient.centerY`},{path:`entity.infoSections.description.nodes.layoutData.background.gradient.stops.position`},{path:`entity.infoSections.description.nodes.layoutData.backdrop.gradient.centerX`},{path:`entity.infoSections.description.nodes.layoutData.backdrop.gradient.centerY`},{path:`entity.infoSections.description.nodes.layoutData.backdrop.gradient.stops.position`},{path:`entity.infoSections.description.nodes.shapeData.shape.duration`},{path:`entity.infoSections.description.nodes.cardData.background.gradient.centerX`},{path:`entity.infoSections.description.nodes.cardData.background.gradient.centerY`},{path:`entity.infoSections.description.nodes.cardData.background.gradient.stops.position`},{path:`entity.infoSections.description.nodes.cardData.backgroundImage.media.duration`},{path:`entity.infoSections.description.nodes.cardData.backgroundImage.overlay.gradient.centerX`},{path:`entity.infoSections.description.nodes.cardData.backgroundImage.overlay.gradient.centerY`},{path:`entity.infoSections.description.nodes.cardData.backgroundImage.overlay.gradient.stops.position`},{path:`entity.infoSections.description.nodes.tocData.fontSize`},{path:`entity.infoSections.description.nodes.tocData.itemSpacing`},{path:`entity.infoSections.description.nodes.smartBlockCellData.shape.duration`},{path:`entity.variantsInfo.variants.physicalProperties.weight`},{path:`entity.variantSummary.minPriceVariant.physicalProperties.weight`},{path:`entity.minVariantPriceInfo.weight`}]},{transformFn:U,paths:[{path:`entity.media.main.image`},{path:`entity.media.itemsInfo.items.image`},{path:`entity.options.choicesSettings.choices.image`},{path:`entity.options.choicesSettings.choices.displayImage`},{path:`entity.options.choicesSettings.choices.linkedMedia.image`},{path:`entity.modifiers.choicesSettings.choices.image`},{path:`entity.modifiers.choicesSettings.choices.displayImage`},{path:`entity.modifiers.choicesSettings.choices.linkedMedia.image`},{path:`entity.variantsInfo.variants.media.image`},{path:`entity.variantSummary.minPriceVariant.media.image`}]},{transformFn:Xi,paths:[{path:`entity.media.main.video`},{path:`entity.media.itemsInfo.items.video`},{path:`entity.options.choicesSettings.choices.linkedMedia.video`},{path:`entity.modifiers.choicesSettings.choices.linkedMedia.video`},{path:`entity.variantsInfo.variants.media.video`},{path:`entity.variantSummary.minPriceVariant.media.video`}]}])))(),Ra=y(`wix.stores.catalog.v3.product_updated`,!0,e=>C(T(e,[{transformFn:w,paths:[{path:`entity.createdDate`},{path:`entity.updatedDate`},{path:`entity.description.metadata.createdTimestamp`},{path:`entity.description.metadata.updatedTimestamp`},{path:`entity.infoSections.description.metadata.createdTimestamp`},{path:`entity.infoSections.description.metadata.updatedTimestamp`},{path:`metadata.eventTime`},{path:`modifiedFields.createdDate`},{path:`modifiedFields.updatedDate`},{path:`modifiedFields.description.metadata.createdTimestamp`},{path:`modifiedFields.description.metadata.updatedTimestamp`},{path:`modifiedFields.infoSections.description.metadata.createdTimestamp`},{path:`modifiedFields.infoSections.description.metadata.updatedTimestamp`}]},{transformFn:Sa,paths:[{path:`entity.url`},{path:`modifiedFields.url`}]},{transformFn:j,paths:[{path:`entity.physicalProperties.pricePerUnit.quantity`},{path:`entity.physicalProperties.shippingWeightRange.minValue`},{path:`entity.physicalProperties.shippingWeightRange.maxValue`},{path:`entity.variantsInfo.variants.physicalProperties.pricePerUnit.settings.quantity`},{path:`entity.variantsInfo.variants.revenueDetails.profitMargin`},{path:`entity.subscriptionDetails.subscriptions.discount.percentOff`},{path:`entity.variantSummary.minPriceVariant.physicalProperties.pricePerUnit.settings.quantity`},{path:`entity.variantSummary.minPriceVariant.revenueDetails.profitMargin`},{path:`entity.minVariantPriceInfo.pricePerUnitData.settings.quantity`},{path:`entity.minVariantPriceInfo.revenueDetails.profitMargin`},{path:`entity.description.nodes.buttonData.styles.background.gradient.centerX`},{path:`entity.description.nodes.buttonData.styles.background.gradient.centerY`},{path:`entity.description.nodes.buttonData.styles.background.gradient.stops.position`},{path:`entity.description.nodes.buttonData.styles.backgroundHover.gradient.centerX`},{path:`entity.description.nodes.buttonData.styles.backgroundHover.gradient.centerY`},{path:`entity.description.nodes.buttonData.styles.backgroundHover.gradient.stops.position`},{path:`entity.description.nodes.galleryData.items.image.media.duration`},{path:`entity.description.nodes.galleryData.items.video.media.duration`},{path:`entity.description.nodes.galleryData.items.video.thumbnail.duration`},{path:`entity.description.nodes.galleryData.options.item.ratio`},{path:`entity.description.nodes.imageData.image.duration`},{path:`entity.description.nodes.imageData.crop.x`},{path:`entity.description.nodes.imageData.crop.y`},{path:`entity.description.nodes.imageData.crop.width`},{path:`entity.description.nodes.imageData.crop.height`},{path:`entity.description.nodes.mapData.mapSettings.lat`},{path:`entity.description.nodes.mapData.mapSettings.lng`},{path:`entity.description.nodes.pollData.poll.image.duration`},{path:`entity.description.nodes.pollData.poll.options.image.duration`},{path:`entity.description.nodes.pollData.design.poll.background.image.duration`},{path:`entity.description.nodes.appEmbedData.image.duration`},{path:`entity.description.nodes.videoData.video.duration`},{path:`entity.description.nodes.videoData.thumbnail.duration`},{path:`entity.description.nodes.audioData.audio.duration`},{path:`entity.description.nodes.audioData.coverImage.duration`},{path:`entity.description.nodes.layoutData.backgroundImage.media.duration`},{path:`entity.description.nodes.layoutData.backgroundImage.overlay.gradient.centerX`},{path:`entity.description.nodes.layoutData.backgroundImage.overlay.gradient.centerY`},{path:`entity.description.nodes.layoutData.backgroundImage.overlay.gradient.stops.position`},{path:`entity.description.nodes.layoutData.backdropImage.media.duration`},{path:`entity.description.nodes.layoutData.backdropImage.overlay.gradient.centerX`},{path:`entity.description.nodes.layoutData.backdropImage.overlay.gradient.centerY`},{path:`entity.description.nodes.layoutData.backdropImage.overlay.gradient.stops.position`},{path:`entity.description.nodes.layoutData.background.gradient.centerX`},{path:`entity.description.nodes.layoutData.background.gradient.centerY`},{path:`entity.description.nodes.layoutData.background.gradient.stops.position`},{path:`entity.description.nodes.layoutData.backdrop.gradient.centerX`},{path:`entity.description.nodes.layoutData.backdrop.gradient.centerY`},{path:`entity.description.nodes.layoutData.backdrop.gradient.stops.position`},{path:`entity.description.nodes.shapeData.shape.duration`},{path:`entity.description.nodes.cardData.background.gradient.centerX`},{path:`entity.description.nodes.cardData.background.gradient.centerY`},{path:`entity.description.nodes.cardData.background.gradient.stops.position`},{path:`entity.description.nodes.cardData.backgroundImage.media.duration`},{path:`entity.description.nodes.cardData.backgroundImage.overlay.gradient.centerX`},{path:`entity.description.nodes.cardData.backgroundImage.overlay.gradient.centerY`},{path:`entity.description.nodes.cardData.backgroundImage.overlay.gradient.stops.position`},{path:`entity.description.nodes.tocData.fontSize`},{path:`entity.description.nodes.tocData.itemSpacing`},{path:`entity.description.nodes.smartBlockCellData.shape.duration`},{path:`entity.infoSections.description.nodes.buttonData.styles.background.gradient.centerX`},{path:`entity.infoSections.description.nodes.buttonData.styles.background.gradient.centerY`},{path:`entity.infoSections.description.nodes.buttonData.styles.background.gradient.stops.position`},{path:`entity.infoSections.description.nodes.buttonData.styles.backgroundHover.gradient.centerX`},{path:`entity.infoSections.description.nodes.buttonData.styles.backgroundHover.gradient.centerY`},{path:`entity.infoSections.description.nodes.buttonData.styles.backgroundHover.gradient.stops.position`},{path:`entity.infoSections.description.nodes.galleryData.items.image.media.duration`},{path:`entity.infoSections.description.nodes.galleryData.items.video.media.duration`},{path:`entity.infoSections.description.nodes.galleryData.items.video.thumbnail.duration`},{path:`entity.infoSections.description.nodes.galleryData.options.item.ratio`},{path:`entity.infoSections.description.nodes.imageData.image.duration`},{path:`entity.infoSections.description.nodes.imageData.crop.x`},{path:`entity.infoSections.description.nodes.imageData.crop.y`},{path:`entity.infoSections.description.nodes.imageData.crop.width`},{path:`entity.infoSections.description.nodes.imageData.crop.height`},{path:`entity.infoSections.description.nodes.mapData.mapSettings.lat`},{path:`entity.infoSections.description.nodes.mapData.mapSettings.lng`},{path:`entity.infoSections.description.nodes.pollData.poll.image.duration`},{path:`entity.infoSections.description.nodes.pollData.poll.options.image.duration`},{path:`entity.infoSections.description.nodes.pollData.design.poll.background.image.duration`},{path:`entity.infoSections.description.nodes.appEmbedData.image.duration`},{path:`entity.infoSections.description.nodes.videoData.video.duration`},{path:`entity.infoSections.description.nodes.videoData.thumbnail.duration`},{path:`entity.infoSections.description.nodes.audioData.audio.duration`},{path:`entity.infoSections.description.nodes.audioData.coverImage.duration`},{path:`entity.infoSections.description.nodes.layoutData.backgroundImage.media.duration`},{path:`entity.infoSections.description.nodes.layoutData.backgroundImage.overlay.gradient.centerX`},{path:`entity.infoSections.description.nodes.layoutData.backgroundImage.overlay.gradient.centerY`},{path:`entity.infoSections.description.nodes.layoutData.backgroundImage.overlay.gradient.stops.position`},{path:`entity.infoSections.description.nodes.layoutData.backdropImage.media.duration`},{path:`entity.infoSections.description.nodes.layoutData.backdropImage.overlay.gradient.centerX`},{path:`entity.infoSections.description.nodes.layoutData.backdropImage.overlay.gradient.centerY`},{path:`entity.infoSections.description.nodes.layoutData.backdropImage.overlay.gradient.stops.position`},{path:`entity.infoSections.description.nodes.layoutData.background.gradient.centerX`},{path:`entity.infoSections.description.nodes.layoutData.background.gradient.centerY`},{path:`entity.infoSections.description.nodes.layoutData.background.gradient.stops.position`},{path:`entity.infoSections.description.nodes.layoutData.backdrop.gradient.centerX`},{path:`entity.infoSections.description.nodes.layoutData.backdrop.gradient.centerY`},{path:`entity.infoSections.description.nodes.layoutData.backdrop.gradient.stops.position`},{path:`entity.infoSections.description.nodes.shapeData.shape.duration`},{path:`entity.infoSections.description.nodes.cardData.background.gradient.centerX`},{path:`entity.infoSections.description.nodes.cardData.background.gradient.centerY`},{path:`entity.infoSections.description.nodes.cardData.background.gradient.stops.position`},{path:`entity.infoSections.description.nodes.cardData.backgroundImage.media.duration`},{path:`entity.infoSections.description.nodes.cardData.backgroundImage.overlay.gradient.centerX`},{path:`entity.infoSections.description.nodes.cardData.backgroundImage.overlay.gradient.centerY`},{path:`entity.infoSections.description.nodes.cardData.backgroundImage.overlay.gradient.stops.position`},{path:`entity.infoSections.description.nodes.tocData.fontSize`},{path:`entity.infoSections.description.nodes.tocData.itemSpacing`},{path:`entity.infoSections.description.nodes.smartBlockCellData.shape.duration`},{path:`entity.variantsInfo.variants.physicalProperties.weight`},{path:`entity.variantSummary.minPriceVariant.physicalProperties.weight`},{path:`entity.minVariantPriceInfo.weight`},{path:`modifiedFields.physicalProperties.pricePerUnit.quantity`},{path:`modifiedFields.physicalProperties.shippingWeightRange.minValue`},{path:`modifiedFields.physicalProperties.shippingWeightRange.maxValue`},{path:`modifiedFields.variantsInfo.variants.physicalProperties.pricePerUnit.settings.quantity`},{path:`modifiedFields.variantsInfo.variants.revenueDetails.profitMargin`},{path:`modifiedFields.subscriptionDetails.subscriptions.discount.percentOff`},{path:`modifiedFields.variantSummary.minPriceVariant.physicalProperties.pricePerUnit.settings.quantity`},{path:`modifiedFields.variantSummary.minPriceVariant.revenueDetails.profitMargin`},{path:`modifiedFields.minVariantPriceInfo.pricePerUnitData.settings.quantity`},{path:`modifiedFields.minVariantPriceInfo.revenueDetails.profitMargin`},{path:`modifiedFields.description.nodes.buttonData.styles.background.gradient.centerX`},{path:`modifiedFields.description.nodes.buttonData.styles.background.gradient.centerY`},{path:`modifiedFields.description.nodes.buttonData.styles.background.gradient.stops.position`},{path:`modifiedFields.description.nodes.buttonData.styles.backgroundHover.gradient.centerX`},{path:`modifiedFields.description.nodes.buttonData.styles.backgroundHover.gradient.centerY`},{path:`modifiedFields.description.nodes.buttonData.styles.backgroundHover.gradient.stops.position`},{path:`modifiedFields.description.nodes.galleryData.items.image.media.duration`},{path:`modifiedFields.description.nodes.galleryData.items.video.media.duration`},{path:`modifiedFields.description.nodes.galleryData.items.video.thumbnail.duration`},{path:`modifiedFields.description.nodes.galleryData.options.item.ratio`},{path:`modifiedFields.description.nodes.imageData.image.duration`},{path:`modifiedFields.description.nodes.imageData.crop.x`},{path:`modifiedFields.description.nodes.imageData.crop.y`},{path:`modifiedFields.description.nodes.imageData.crop.width`},{path:`modifiedFields.description.nodes.imageData.crop.height`},{path:`modifiedFields.description.nodes.mapData.mapSettings.lat`},{path:`modifiedFields.description.nodes.mapData.mapSettings.lng`},{path:`modifiedFields.description.nodes.pollData.poll.image.duration`},{path:`modifiedFields.description.nodes.pollData.poll.options.image.duration`},{path:`modifiedFields.description.nodes.pollData.design.poll.background.image.duration`},{path:`modifiedFields.description.nodes.appEmbedData.image.duration`},{path:`modifiedFields.description.nodes.videoData.video.duration`},{path:`modifiedFields.description.nodes.videoData.thumbnail.duration`},{path:`modifiedFields.description.nodes.audioData.audio.duration`},{path:`modifiedFields.description.nodes.audioData.coverImage.duration`},{path:`modifiedFields.description.nodes.layoutData.backgroundImage.media.duration`},{path:`modifiedFields.description.nodes.layoutData.backgroundImage.overlay.gradient.centerX`},{path:`modifiedFields.description.nodes.layoutData.backgroundImage.overlay.gradient.centerY`},{path:`modifiedFields.description.nodes.layoutData.backgroundImage.overlay.gradient.stops.position`},{path:`modifiedFields.description.nodes.layoutData.backdropImage.media.duration`},{path:`modifiedFields.description.nodes.layoutData.backdropImage.overlay.gradient.centerX`},{path:`modifiedFields.description.nodes.layoutData.backdropImage.overlay.gradient.centerY`},{path:`modifiedFields.description.nodes.layoutData.backdropImage.overlay.gradient.stops.position`},{path:`modifiedFields.description.nodes.layoutData.background.gradient.centerX`},{path:`modifiedFields.description.nodes.layoutData.background.gradient.centerY`},{path:`modifiedFields.description.nodes.layoutData.background.gradient.stops.position`},{path:`modifiedFields.description.nodes.layoutData.backdrop.gradient.centerX`},{path:`modifiedFields.description.nodes.layoutData.backdrop.gradient.centerY`},{path:`modifiedFields.description.nodes.layoutData.backdrop.gradient.stops.position`},{path:`modifiedFields.description.nodes.shapeData.shape.duration`},{path:`modifiedFields.description.nodes.cardData.background.gradient.centerX`},{path:`modifiedFields.description.nodes.cardData.background.gradient.centerY`},{path:`modifiedFields.description.nodes.cardData.background.gradient.stops.position`},{path:`modifiedFields.description.nodes.cardData.backgroundImage.media.duration`},{path:`modifiedFields.description.nodes.cardData.backgroundImage.overlay.gradient.centerX`},{path:`modifiedFields.description.nodes.cardData.backgroundImage.overlay.gradient.centerY`},{path:`modifiedFields.description.nodes.cardData.backgroundImage.overlay.gradient.stops.position`},{path:`modifiedFields.description.nodes.tocData.fontSize`},{path:`modifiedFields.description.nodes.tocData.itemSpacing`},{path:`modifiedFields.description.nodes.smartBlockCellData.shape.duration`},{path:`modifiedFields.infoSections.description.nodes.buttonData.styles.background.gradient.centerX`},{path:`modifiedFields.infoSections.description.nodes.buttonData.styles.background.gradient.centerY`},{path:`modifiedFields.infoSections.description.nodes.buttonData.styles.background.gradient.stops.position`},{path:`modifiedFields.infoSections.description.nodes.buttonData.styles.backgroundHover.gradient.centerX`},{path:`modifiedFields.infoSections.description.nodes.buttonData.styles.backgroundHover.gradient.centerY`},{path:`modifiedFields.infoSections.description.nodes.buttonData.styles.backgroundHover.gradient.stops.position`},{path:`modifiedFields.infoSections.description.nodes.galleryData.items.image.media.duration`},{path:`modifiedFields.infoSections.description.nodes.galleryData.items.video.media.duration`},{path:`modifiedFields.infoSections.description.nodes.galleryData.items.video.thumbnail.duration`},{path:`modifiedFields.infoSections.description.nodes.galleryData.options.item.ratio`},{path:`modifiedFields.infoSections.description.nodes.imageData.image.duration`},{path:`modifiedFields.infoSections.description.nodes.imageData.crop.x`},{path:`modifiedFields.infoSections.description.nodes.imageData.crop.y`},{path:`modifiedFields.infoSections.description.nodes.imageData.crop.width`},{path:`modifiedFields.infoSections.description.nodes.imageData.crop.height`},{path:`modifiedFields.infoSections.description.nodes.mapData.mapSettings.lat`},{path:`modifiedFields.infoSections.description.nodes.mapData.mapSettings.lng`},{path:`modifiedFields.infoSections.description.nodes.pollData.poll.image.duration`},{path:`modifiedFields.infoSections.description.nodes.pollData.poll.options.image.duration`},{path:`modifiedFields.infoSections.description.nodes.pollData.design.poll.background.image.duration`},{path:`modifiedFields.infoSections.description.nodes.appEmbedData.image.duration`},{path:`modifiedFields.infoSections.description.nodes.videoData.video.duration`},{path:`modifiedFields.infoSections.description.nodes.videoData.thumbnail.duration`},{path:`modifiedFields.infoSections.description.nodes.audioData.audio.duration`},{path:`modifiedFields.infoSections.description.nodes.audioData.coverImage.duration`},{path:`modifiedFields.infoSections.description.nodes.layoutData.backgroundImage.media.duration`},{path:`modifiedFields.infoSections.description.nodes.layoutData.backgroundImage.overlay.gradient.centerX`},{path:`modifiedFields.infoSections.description.nodes.layoutData.backgroundImage.overlay.gradient.centerY`},{path:`modifiedFields.infoSections.description.nodes.layoutData.backgroundImage.overlay.gradient.stops.position`},{path:`modifiedFields.infoSections.description.nodes.layoutData.backdropImage.media.duration`},{path:`modifiedFields.infoSections.description.nodes.layoutData.backdropImage.overlay.gradient.centerX`},{path:`modifiedFields.infoSections.description.nodes.layoutData.backdropImage.overlay.gradient.centerY`},{path:`modifiedFields.infoSections.description.nodes.layoutData.backdropImage.overlay.gradient.stops.position`},{path:`modifiedFields.infoSections.description.nodes.layoutData.background.gradient.centerX`},{path:`modifiedFields.infoSections.description.nodes.layoutData.background.gradient.centerY`},{path:`modifiedFields.infoSections.description.nodes.layoutData.background.gradient.stops.position`},{path:`modifiedFields.infoSections.description.nodes.layoutData.backdrop.gradient.centerX`},{path:`modifiedFields.infoSections.description.nodes.layoutData.backdrop.gradient.centerY`},{path:`modifiedFields.infoSections.description.nodes.layoutData.backdrop.gradient.stops.position`},{path:`modifiedFields.infoSections.description.nodes.shapeData.shape.duration`},{path:`modifiedFields.infoSections.description.nodes.cardData.background.gradient.centerX`},{path:`modifiedFields.infoSections.description.nodes.cardData.background.gradient.centerY`},{path:`modifiedFields.infoSections.description.nodes.cardData.background.gradient.stops.position`},{path:`modifiedFields.infoSections.description.nodes.cardData.backgroundImage.media.duration`},{path:`modifiedFields.infoSections.description.nodes.cardData.backgroundImage.overlay.gradient.centerX`},{path:`modifiedFields.infoSections.description.nodes.cardData.backgroundImage.overlay.gradient.centerY`},{path:`modifiedFields.infoSections.description.nodes.cardData.backgroundImage.overlay.gradient.stops.position`},{path:`modifiedFields.infoSections.description.nodes.tocData.fontSize`},{path:`modifiedFields.infoSections.description.nodes.tocData.itemSpacing`},{path:`modifiedFields.infoSections.description.nodes.smartBlockCellData.shape.duration`},{path:`modifiedFields.variantsInfo.variants.physicalProperties.weight`},{path:`modifiedFields.variantSummary.minPriceVariant.physicalProperties.weight`},{path:`modifiedFields.minVariantPriceInfo.weight`}]},{transformFn:U,paths:[{path:`entity.media.main.image`},{path:`entity.media.itemsInfo.items.image`},{path:`entity.options.choicesSettings.choices.image`},{path:`entity.options.choicesSettings.choices.displayImage`},{path:`entity.options.choicesSettings.choices.linkedMedia.image`},{path:`entity.modifiers.choicesSettings.choices.image`},{path:`entity.modifiers.choicesSettings.choices.displayImage`},{path:`entity.modifiers.choicesSettings.choices.linkedMedia.image`},{path:`entity.variantsInfo.variants.media.image`},{path:`entity.variantSummary.minPriceVariant.media.image`},{path:`modifiedFields.media.main.image`},{path:`modifiedFields.media.itemsInfo.items.image`},{path:`modifiedFields.options.choicesSettings.choices.image`},{path:`modifiedFields.options.choicesSettings.choices.displayImage`},{path:`modifiedFields.options.choicesSettings.choices.linkedMedia.image`},{path:`modifiedFields.modifiers.choicesSettings.choices.image`},{path:`modifiedFields.modifiers.choicesSettings.choices.displayImage`},{path:`modifiedFields.modifiers.choicesSettings.choices.linkedMedia.image`},{path:`modifiedFields.variantsInfo.variants.media.image`},{path:`modifiedFields.variantSummary.minPriceVariant.media.image`}]},{transformFn:Xi,paths:[{path:`entity.media.main.video`},{path:`entity.media.itemsInfo.items.video`},{path:`entity.options.choicesSettings.choices.linkedMedia.video`},{path:`entity.modifiers.choicesSettings.choices.linkedMedia.video`},{path:`entity.variantsInfo.variants.media.video`},{path:`entity.variantSummary.minPriceVariant.media.video`},{path:`modifiedFields.media.main.video`},{path:`modifiedFields.media.itemsInfo.items.video`},{path:`modifiedFields.options.choicesSettings.choices.linkedMedia.video`},{path:`modifiedFields.modifiers.choicesSettings.choices.linkedMedia.video`},{path:`modifiedFields.variantsInfo.variants.media.video`},{path:`modifiedFields.variantSummary.minPriceVariant.media.video`}]}])))(),za=D(Pa),Ba=D(Fa);A(Ia),A(La),A(Ra);function Va(e){return k(Object.assign(e,{domainToMappings:{"manage._base_domain_":[{srcPath:`/_api/location`,destPath:``}],_:[{srcPath:`/_api/location`,destPath:``}],"*.dev.wix-code.com":[{srcPath:`/_api/location`,destPath:``}],"www.wixapis.com":[{srcPath:`/stores/v3/locations`,destPath:`/v3/locations`}]}}))}var Ha=`@wix/auto_sdk_stores_stores-locations-v-3`;function Ua(e){function t({host:t}){return{entityFqdn:`wix.stores.catalog.v3.stores_location`,method:`POST`,methodFqn:`wix.stores.catalog.location.v3.StoresLocationService.QueryStoresLocations`,packageName:Ha,migrationOptions:{optInTransformResponse:!0},url:Va({protoPath:`/v3/locations/query`,data:e,host:t}),data:e,transformResponse:e=>T(e,[{transformFn:w,paths:[{path:`storesLocations.createdDate`},{path:`storesLocations.updatedDate`}]}])}}return t}function Wa(){let{httpClient:e,sideEffects:t}=arguments[0];return Ni({func:async n=>{let r=Ua(n);t?.onSiteCall?.();try{let n=await e.request(r);return t?.onSuccess?.(n),n}catch(e){throw t?.onError?.(e),e}},requestTransformer:e=>{let t=[e,{}];return S({...t?.[1],query:t?.[0]})},responseTransformer:({data:e})=>{let t=C(T(e,[]));return{items:t?.storesLocations,pagingMetadata:t?.pagingMetadata}},errorTransformer:e=>{throw E(e,{spreadPathsToArguments:{},explicitPathsToArguments:{query:`$[0]`},singleArgumentUnchanged:!1})},pagingMethod:`CURSOR`,transformationPaths:{}})}async function Ga(e){let{httpClient:t,sideEffects:n}=arguments[1],r=Ua(S({query:e}));n?.onSiteCall?.();try{let e=await t.request(r);return n?.onSuccess?.(e),C(e.data)}catch(e){let t=E(e,{spreadPathsToArguments:{},explicitPathsToArguments:{query:`$[0]`},singleArgumentUnchanged:!1},[`query`]);throw n?.onError?.(e),t}}({...H()});function Ka(e){return()=>Wa({httpClient:e})}function qa(e){return t=>Ga(t,{httpClient:e})}function Ja(e){let t=qi({builderQueryFunction:()=>Ka(e)(),typedQueryFunction:t=>qa(e)(t),hasOptionsParameter:!1});function n(e){return t(...arguments)}return n}var Ya=D(Ja);function Xa(e){return k(Object.assign(e,{domainToMappings:{"manage._base_domain_":[{srcPath:`/_api/promotion`,destPath:``}],"editor._base_domain_":[{srcPath:`/_api/promotion`,destPath:``}],"blocks._base_domain_":[{srcPath:`/_api/promotion`,destPath:``}],"create.editorx":[{srcPath:`/_api/promotion`,destPath:``}],_:[{srcPath:`/_api/promotion`,destPath:``}],"api._api_base_domain_":[{srcPath:`/promotion`,destPath:``}],"www.wixapis.com":[{srcPath:`/stores/v3/promotions`,destPath:`/v3/promotions`},{srcPath:`/stores/v3/bulk/promotions`,destPath:`/v3/bulk/promotions`}],"*.dev.wix-code.com":[{srcPath:`/_api/promotion`,destPath:``}]}}))}var Za=`@wix/auto_sdk_stores_promotions-v-3`;function Qa(e){function t({host:t}){return{entityFqdn:`wix.stores.catalog.v3.promotion`,method:`GET`,methodFqn:`wix.stores.catalog.promotion.v3.PromotionsService.ResolvePromotions`,packageName:Za,migrationOptions:{optInTransformResponse:!0},url:Xa({protoPath:`/v3/promotions/resolve`,data:e,host:t}),params:O(e),transformResponse:e=>T(e,[{transformFn:w,paths:[{path:`promotions.promotion.createdDate`},{path:`promotions.promotion.updatedDate`},{path:`promotions.promotion.media.image.urlExpirationDate`}]}])}}return t}({...H()}),{...xa()};async function $a(e){let{httpClient:t,sideEffects:n}=arguments[1],r=Qa(S({categoryId:e}));n?.onSiteCall?.();try{let e=await t.request(r);return n?.onSuccess?.(e),C(T(e.data,[{transformFn:U,paths:[{path:`promotions.promotion.media.image`}]}]))}catch(e){let t=E(e,{spreadPathsToArguments:{},explicitPathsToArguments:{categoryId:`$[0]`},singleArgumentUnchanged:!1},[`categoryId`]);throw n?.onError?.(e),t}}function eo(e){return t=>$a(t,{httpClient:e})}var to=y(`wix.stores.catalog.v3.promotion_created`,!0,e=>C(T(e,[{transformFn:w,paths:[{path:`entity.createdDate`},{path:`entity.updatedDate`},{path:`metadata.eventTime`}]},{transformFn:U,paths:[{path:`entity.media.image`}]}])))(),no=y(`wix.stores.catalog.v3.promotion_deleted`,!0,e=>C(T(e,[{transformFn:w,paths:[{path:`entity.createdDate`},{path:`entity.updatedDate`},{path:`metadata.eventTime`}]},{transformFn:U,paths:[{path:`entity.media.image`}]}])))(),ro=y(`wix.stores.catalog.v3.promotion_tags_modified`,!0,e=>C(T(e,[{transformFn:w,paths:[{path:`data.promotion.createdDate`},{path:`data.promotion.updatedDate`},{path:`metadata.eventTime`}]},{transformFn:U,paths:[{path:`data.promotion.media.image`}]}])))(),io=y(`wix.stores.catalog.v3.promotion_updated`,!0,e=>C(T(e,[{transformFn:w,paths:[{path:`entity.createdDate`},{path:`entity.updatedDate`},{path:`metadata.eventTime`},{path:`modifiedFields.createdDate`},{path:`modifiedFields.updatedDate`}]},{transformFn:U,paths:[{path:`entity.media.image`},{path:`modifiedFields.media.image`}]}])))(),ao=D(eo);A(to),A(no),A(ro),A(io);var J=function(e){return e.PRICE=`PRICE`,e.TEXT_CHOICES=`${W.TEXT_CHOICES}`,e.SWATCH_CHOICES=`${W.SWATCH_CHOICES}`,e}({}),oo=function(e){return e.TEXT_CHOICES=`Text Choices`,e.SWATCH_CHOICES=`Swatch Choices`,e.PRICE=`Price`,e}({}),so=`minPrice`,co=`maxPrice`,lo=(e,t)=>{let n=new Map(e.values.map(e=>[e.name,e.id]));return t.map(e=>n.get(e)).filter(e=>e!==void 0)},uo=e=>{if(e===null||e.trim()===``)return;let t=Number(e);return Number.isFinite(t)?t:void 0},fo=(e,t)=>{let n={};for(let r of t){let t=e.get(r.name),i=lo(r,t?t.split(`,`).filter(Boolean):[]);i.length>0&&(n[r.id]=i)}return n};function po(e,t){let n=new URLSearchParams(e);return{customizationIdToChoiceIds:fo(n,t.filter(e=>e.type===J.TEXT_CHOICES||e.type===J.SWATCH_CHOICES)),priceMin:uo(n.get(so)),priceMax:uo(n.get(co))}}var mo=(e,t)=>{let n=new Map(e.values.map(e=>[e.id,e.name]));return t.map(e=>n.get(e)).filter(e=>e!==void 0)},ho=(e,t)=>{t.forEach(t=>{e.delete(t.name)}),e.delete(so),e.delete(co)},go=e=>e.map(encodeURIComponent).join(`,`),_o=(e,t)=>{let n=new Map(e.map(e=>[e.id,e]));return Object.entries(t??{}).flatMap(([e,t])=>{let r=n.get(e);if(!r)return[];let i=mo(r,t);return i.length===0?[]:[`${encodeURIComponent(r.name)}=${go(i)}`]})},vo=(e,t,n)=>{t.priceMin!==void 0&&t.priceMin!==n?.minPrice&&e.set(so,String(t.priceMin)),t.priceMax!==void 0&&t.priceMax!==n?.maxPrice&&e.set(co,String(t.priceMax))};function yo(e,t,n){let r=new URLSearchParams(e),i=n.filter(e=>e.type===J.TEXT_CHOICES||e.type===J.SWATCH_CHOICES),a=n.find(e=>e.type===J.PRICE);ho(r,i),vo(r,t,a);let o=_o(i,t.customizationIdToChoiceIds),s=[r.toString(),...o].filter(Boolean).join(`&`);return s?`?${s}`:``}function bo(e){let{search:t,pushSearch:n}=yi(),i=r(()=>po(t,e),[t,e]),a=r=>{r!==i&&n(yo(t,r,e))};return{filterSelection:i,selectFilterChoice:(e,t)=>{a(xi(i,e,t))},deselectFilterChoice:(e,t)=>{a(Si(i,e,t))},setPriceRange:(e,t)=>{a(Ci(i,e,t))},clearPriceRange:()=>{a(wi(i))},clearAllFilters:()=>{bi(i)||a({})}}}var xo=function(e){return e.createdDate=`createdDate`,e.actualPriceRangeMinValueAmount=`actualPriceRange.minValue.amount`,e.name=`name`,e}({}),Y=function(e){return e.recommended=`recommended`,e.newest=`newest`,e.price_ascending=`price_ascending`,e.price_descending=`price_descending`,e.name_ascending=`name_ascending`,e.name_descending=`name_descending`,e}({}),So=[{type:Y.recommended},{type:Y.newest,fieldName:xo.createdDate,order:K.DESC},{type:Y.price_ascending,fieldName:xo.actualPriceRangeMinValueAmount,order:K.ASC},{type:Y.price_descending,fieldName:xo.actualPriceRangeMinValueAmount,order:K.DESC},{type:Y.name_ascending,fieldName:xo.name,order:K.ASC},{type:Y.name_descending,fieldName:xo.name,order:K.DESC}];function Co(e){return So.find(t=>t.type===e)}var wo=Y.recommended,To=So.map(({type:e})=>e),Eo=`sort`;function Do(e){let t=Co(new URLSearchParams(e).get(Eo));return t?t.type:wo}function Oo(e,t){let n=new URLSearchParams(e);return t===wo?n.delete(Eo):n.set(Eo,t),n.toString()}function ko(){let{search:e,pushSearch:t}=yi(),n=r(()=>Do(e),[e]);return{sortTypes:To,selectedSortType:n,selectSortType:r=>{r!==n&&t(Oo(e,r))}}}var Ao=`https://static.wixstatic.com/media`,jo=`https://video.wixstatic.com/video`,Mo=/image:\/\/v1\/([^/#]+)/,No=/^(?:wix:)?video:\/\/v1\/([^/#]+)(?:\/[^#]*)?(?:#(.*))?$/;function Po(e){let t=e?.match(No);if(!t)return null;let[,n,r]=t,i=new URLSearchParams(r??``),a=i.get(`posterUri`);return{id:n,url:`${jo}/${n}/file`,...a?{poster:{uri:a,url:`${Ao}/${a}`,width:Number(i.get(`posterWidth`))||0,height:Number(i.get(`posterHeight`))||0}}:{}}}function Fo(e){return e?e.match(Mo)?.[1]??null:null}function Io(e){if(!e)return null;let t=e.match(/#originWidth=(\d+)&originHeight=(\d+)/);return t?{width:parseInt(t[1],10),height:parseInt(t[2],10)}:null}function Lo(e){return e.map(e=>({id:e._id,key:e.key,name:e.name??void 0,optionRenderType:e.optionRenderType,choices:(e.choicesSettings?.choices??[]).map(e=>{let t=Fo(e.displayImage)??void 0;return{choiceId:e.choiceId,key:e.key,name:e.name??void 0,colorCode:e.colorCode,...t?{displayImageUri:t}:{},inStock:e.inStock,visible:e.visible??void 0,mediaIds:Ro(e.media)}})}))}var Ro=e=>{let t=(e?.items??[]).map(e=>e.mediaId);return t.length>0?t:void 0};function zo(e){let t=e.map(e=>{let t=e._id,n=e.modifierRenderType===Da.FREE_TEXT;return[t,{id:t,key:e.key,name:e.name??void 0,mandatory:e.mandatory!==!1,modifierRenderType:e.modifierRenderType,freeTextSettings:n?e.freeTextSettings:void 0,choices:n?void 0:(e.choicesSettings?.choices??[]).map(e=>{let t=Fo(e.displayImage)??void 0;return{choiceId:e.choiceId,key:e.key,name:e.name??void 0,colorCode:e.colorCode,...t?{displayImageUri:t}:{},mediaIds:Ro(e.media)}})}]});return Object.fromEntries(t)}function Bo(e){return e.filter(e=>e.visible!==!1).map(Vo)}var Vo=e=>{let t=Object.fromEntries((e.choices??[]).map(e=>{let t=e.optionChoiceIds;return[t?.optionId,t?.choiceId]}));return{id:e._id,sku:e.sku??void 0,choices:t,price:Uo(e),subscriptionPrices:Wo(e)}};function Ho(e){return e?.description==null?void 0:{description:e.description}}var Uo=e=>{let t=e.price;return{actualPrice:cs(t?.actualPrice),compareAtPrice:X(t?.compareAtPrice),priceAfterDiscount:X(t?.priceAfterDiscount),pricePerUnit:Ho(e.physicalProperties?.pricePerUnit)}},Wo=e=>(e.subscriptionPricesInfo?.subscriptionPrices??[]).map(e=>({subscriptionId:e.subscriptionId,price:cs(e.price)})),Go={nodes:[]},Ko=`@stores/product-groups`;function qo(e){let t=Lo(e.options??[]),n=zo(e.modifiers??[]),r=Zo(e.subscriptionDetails?.subscriptions??[]),i=Bo(e.variantsInfo?.variants??[]),a={subscriptions:r,allowOneTimePurchases:e.subscriptionDetails?.allowOneTimePurchases??!1},o=e.additionalRibbons??[],s={primary:e.ribbon?.name??void 0,additional:o.map(e=>e.name??void 0).filter(e=>!!e)},c=e.description?Qo(e.description):Go,l=e.discountInfo?.discountRuleNames,u=Yo(e);return{id:e._id,slug:e.slug??void 0,url:e.url?{href:e.url}:void 0,name:e.name,description:c,media:ss(e),mainMedia:os(e.media?.main),ribbons:s,breadcrumbs:$o(e),mainCategoryId:e.mainCategoryId??void 0,categories:es(e),infoSections:Jo(e),currency:e.currency,options:t,modifiers:n,variants:i,minPriceVariant:is(e),priceRange:as(e),subscriptionDetails:a,inventory:{availabilityStatus:e.inventory?.availabilityStatus,preorderAvailability:e.inventory?.preorderAvailability},discountRuleNames:l,productGroupId:u}}function Jo(e){return(e.infoSections??[]).map(e=>({_id:e.uniqueName??e._id,name:e.title,body:e.description?Qo(e.description):void 0}))}function Yo(e){let t=e.extendedFields?.namespaces?.[Ko]?.productGroupId;return typeof t==`string`?t:void 0}function Xo(e){return e===`WEEK`||e===`MONTH`||e===`YEAR`?e:void 0}function Zo(e){return e.filter(e=>e.visible!==!1).map(e=>({id:e._id,name:e.title,description:e.description??void 0,frequency:Xo(e.frequency),interval:e.interval,billingCycles:e.billingCycles??void 0}))}function Qo(e){return{...e,nodes:e.nodes??[]}}function $o(e){return(e.breadcrumbsInfo?.breadcrumbs??[]).map(e=>({id:e.categoryId,name:e.categoryName,slug:e.categorySlug}))}function es(e){return(e.directCategoriesInfo?.categories??[]).flatMap(e=>e._id?[{id:e._id}]:[])}function ts(e){return{...e.displayName?{title:e.displayName}:{},...e.altText?{alt:e.altText}:{}}}function ns(e,t){let n=e.image??e.url;if(!n)return;let r=Io(e.image),{title:i,alt:a}=ts(e);return{id:Fo(e.image)??e._id??t,media:{type:`image`,src:n,...r?{width:r.width,height:r.height}:{},...i?{title:i}:{},...a?{parameters:{alt:a}}:{}}}}function rs(e,t){let n=Po(e.video),r=n?.url??e.url;if(!r)return;let i=n?.poster?.url,a=n?.poster?.width,o=n?.poster?.height,{title:s,alt:c}=ts(e);return{id:n?.id??e._id??t,media:{type:`video`,src:r,...a===void 0?{}:{width:a},...o===void 0?{}:{height:o},...s?{title:s}:{},...c||i?{parameters:{...c?{alt:c}:{},...i?{thumbnail:i}:{}}}:{}}}}function is(e){let t=e.variantSummary?.minPriceVariant;return t?Bo([t])[0]:void 0}function as(e){return{minActualPrice:X(e.actualPriceRange?.minValue),maxActualPrice:X(e.actualPriceRange?.maxValue),minCompareAtPrice:X(e.compareAtPriceRange?.minValue),maxCompareAtPrice:X(e.compareAtPriceRange?.maxValue)}}function os(e){if(!e)return;let{title:t,alt:n}=ts(e);if(e.mediaType===`VIDEO`){let r=Po(e.video)?.poster;return r?{...r,name:t,alt:n}:void 0}let r=e.image??e.url;if(!r)return;let i=Io(e.image);return{uri:Fo(e.image)??void 0,url:r,width:i?.width,height:i?.height,name:t,alt:n}}function ss(e){return(e.media?.itemsInfo?.items??(e.media?.main?[e.media.main]:[])).flatMap((e,t)=>{let n=e.mediaType===`VIDEO`?rs(e,String(t)):ns(e,String(t));return n?[n]:[]})}var cs=e=>Number.parseFloat(e?.amount),X=e=>e?.amount==null?void 0:cs(e),Z=function(e){return e.PRICE=`PRICE`,e.OPTIONS=`OPTIONS`,e.MODIFIERS=`MODIFIERS`,e}({}),ls=`allCategoriesInfo.categories`,Q={minPrice:`min_price`,maxPrice:`max_price`,optionsWithChoice:`options_with_choice`,modifiersWithChoice:`modifiers_with_choice`,options:`options`,modifiers:`modifiers`},$={minPrice:`actualPriceRange.minValue.amount`,maxPrice:`actualPriceRange.maxValue.amount`,option:`options.id`,optionChoice:`options.choicesSettings.choices.choiceId`,modifier:`modifiers.id`,modifierChoice:`modifiers.choicesSettings.choices.choiceId`},us={options:1e3,modifiers:1e3,choices:2e4},ds=({priceMin:e,priceMax:t})=>{let n=[];return e!==void 0&&n.push({[$.minPrice]:{$gte:e}}),t!==void 0&&n.push({[$.maxPrice]:{$lte:t}}),n},fs=(e,t)=>{let n=new Map(e.values.map(e=>[e.id,e]));return t.flatMap(e=>{let t=n.get(e);return t?[t.id,...t.childIds??[]]:[e]})},ps=(e,t)=>({[e.customizationType===ea.MODIFIER?$.modifierChoice:$.optionChoice]:{$hasSome:fs(e,t)}}),ms=(e,t)=>{let n=new Map(e.filter(e=>e.type===J.TEXT_CHOICES||e.type===J.SWATCH_CHOICES).map(e=>[e.id,e]));return Object.entries(t.customizationIdToChoiceIds??{}).flatMap(([e,t])=>{let r=n.get(e);return!r||t.length===0?[]:[ps(r,t)]})};function hs(e,t,n){let r=[{[ls]:{$matchItems:[{id:e}]}},...ds(n),...ms(t,n)];return r.length===1?r[0]:{$and:r}}function gs(e){let t=Co(e);if(t?.fieldName)return[{fieldName:t.fieldName,order:t.order}]}var _s=[q.URL,q.CURRENCY,q.MEDIA_ITEMS_INFO,q.MIN_PRICE_VARIANT,q.DISCOUNT_INFO,q.PRODUCT_CHOICES_MEDIA_REFERENCES,q.BREADCRUMBS_INFO],vs=async(e,t)=>{let n=await za({cursorPaging:{limit:t,cursor:e}},{fields:_s});return{products:(n.products??[]).map(qo),nextCursor:n.pagingMetadata?.cursors?.next??void 0,hasNext:n.pagingMetadata?.hasNext??!1}};async function ys({categoryId:e,filters:t,filterSelection:n,sortType:r,productsPerPage:i,cursor:a}){if(a!==void 0)return vs(a,i);let o=hs(e,t,n),s=gs(r),c={filter:o,cursorPaging:{limit:i},...s&&{sort:s}},[l,u]=await Promise.all([za(c,{fields:_s}),Ba({filter:o})]);return{products:(l.products??[]).map(qo),productCount:u?.count??0,nextCursor:l.pagingMetadata?.cursors?.next??void 0,hasNext:l.pagingMetadata?.hasNext??!1}}var bs=(e,t)=>`${e}:${[...t].toSorted().join(`,`)}`;function xs(e){if(bi(e))return``;let t=Object.entries(e.customizationIdToChoiceIds??{}).filter(([,e])=>e.length>0).map(([e,t])=>bs(e,t)).toSorted().join(`;`),n=[];return e.priceMin!==void 0&&n.push(`min:${e.priceMin}`),e.priceMax!==void 0&&n.push(`max:${e.priceMax}`),t&&n.push(t),n.join(`&`)}function Ss(e,t,i,a,o,s){let c=xs(i),l=c===s.filterSelectionKey&&a===s.sortType&&o===s.productsPerPage?{pages:[s.page],pageParams:[void 0]}:void 0,{data:u,isFetching:d,isError:f,hasNextPage:p,fetchNextPage:m}=ei({queryKey:[`category-products`,e,c,a,o],queryFn:({pageParam:n})=>ys({categoryId:e,filters:t,filterSelection:i,sortType:a,productsPerPage:o,cursor:n}),initialPageParam:void 0,getNextPageParam:e=>e.hasNext?e.nextCursor:void 0,initialData:l,staleTime:1/0,placeholderData:$n,retry:!1}),ee=n(async()=>{await m({cancelRefetch:!1})},[m]);return{products:r(()=>(u?.pages??[]).flatMap(e=>e.products),[u]),productCount:u?.pages[0]?.productCount??0,isLoadingProducts:d,hasProductsError:f,hasMoreProducts:p,loadMoreProducts:ee}}function Cs(e,t){let{category:n,filters:i,currency:a,promotions:o,initialProductList:s,defaultLocationId:c}=e,l=bo(i),u=ko(),{products:d,...f}=Ss(n.id,i,l.filterSelection,u.selectedSortType,t,s);return{filters:i,currency:a,productItems:r(()=>d.map(e=>({product:e,defaultLocationId:c})),[d,c]),promotionItems:r(()=>o.map(e=>({promotion:e})),[o]),...l,...u,...f}}var ws=ti(`@wix/site-service-warmup-data`);async function Ts(e,t,n){let r=typeof window>`u`;if(!r&&e)try{let n=await e.get(t);if(n!==null)return n}catch{}let i=await n();if(r&&e)try{e.set(t,i)}catch{}return i}function Es(e,t){let n=d(),[r]=a(()=>{let r;try{r=n(ws)}catch{r=null}return Ts(r,e,t)});return r}var Ds=e=>{let t=e.pathname.split(`/`).filter(Boolean).at(-1);return t?decodeURIComponent(t):void 0};function Os(){let{url:e}=yi();return Ds(e)}function ks(e){return k(Object.assign(e,{domainToMappings:{"*.dev.wix-code.com":[{srcPath:`/_api/categories`,destPath:``}],"www.wixapis.com":[{srcPath:`/categories/v1/bulk/categories`,destPath:`/v1/bulk/categories`},{srcPath:`/categories/v1/categories`,destPath:`/v1/categories`}],"manage._base_domain_":[{srcPath:`/_api/categories`,destPath:``}],"editor._base_domain_":[{srcPath:`/_api/categories-service`,destPath:``}],"blocks._base_domain_":[{srcPath:`/_api/categories-service`,destPath:``}],"create.editorx":[{srcPath:`/_api/categories-service`,destPath:``}],_:[{srcPath:`/categories/v1/bulk/categories`,destPath:`/v1/bulk/categories`},{srcPath:`/categories/v1/categories`,destPath:`/v1/categories`}]}}))}var As=`@wix/auto_sdk_categories_categories`;function js(e){function t({host:t}){return{entityFqdn:`wix.categories.v1.category`,method:`GET`,methodFqn:`com.wix.categories.api.v1.CategoriesService.GetCategoryBySlug`,packageName:As,migrationOptions:{optInTransformResponse:!0},url:ks({protoPath:`/v1/categories/slug/{slug}`,data:e,host:t}),params:O(e),transformResponse:e=>T(e,[{transformFn:w,paths:[{path:`category.createdDate`},{path:`category.updatedDate`},{path:`category.image.urlExpirationDate`},{path:`category.richContentDescription.metadata.createdTimestamp`},{path:`category.richContentDescription.metadata.updatedTimestamp`}]},{transformFn:j,paths:[{path:`category.richContentDescription.nodes.buttonData.styles.background.gradient.centerX`},{path:`category.richContentDescription.nodes.buttonData.styles.background.gradient.centerY`},{path:`category.richContentDescription.nodes.buttonData.styles.background.gradient.stops.position`},{path:`category.richContentDescription.nodes.buttonData.styles.backgroundHover.gradient.centerX`},{path:`category.richContentDescription.nodes.buttonData.styles.backgroundHover.gradient.centerY`},{path:`category.richContentDescription.nodes.buttonData.styles.backgroundHover.gradient.stops.position`},{path:`category.richContentDescription.nodes.galleryData.items.image.media.duration`},{path:`category.richContentDescription.nodes.galleryData.items.video.media.duration`},{path:`category.richContentDescription.nodes.galleryData.items.video.thumbnail.duration`},{path:`category.richContentDescription.nodes.galleryData.options.item.ratio`},{path:`category.richContentDescription.nodes.imageData.image.duration`},{path:`category.richContentDescription.nodes.imageData.crop.x`},{path:`category.richContentDescription.nodes.imageData.crop.y`},{path:`category.richContentDescription.nodes.imageData.crop.width`},{path:`category.richContentDescription.nodes.imageData.crop.height`},{path:`category.richContentDescription.nodes.mapData.mapSettings.lat`},{path:`category.richContentDescription.nodes.mapData.mapSettings.lng`},{path:`category.richContentDescription.nodes.pollData.poll.image.duration`},{path:`category.richContentDescription.nodes.pollData.poll.options.image.duration`},{path:`category.richContentDescription.nodes.pollData.design.poll.background.image.duration`},{path:`category.richContentDescription.nodes.appEmbedData.image.duration`},{path:`category.richContentDescription.nodes.videoData.video.duration`},{path:`category.richContentDescription.nodes.videoData.thumbnail.duration`},{path:`category.richContentDescription.nodes.audioData.audio.duration`},{path:`category.richContentDescription.nodes.audioData.coverImage.duration`},{path:`category.richContentDescription.nodes.layoutData.backgroundImage.media.duration`},{path:`category.richContentDescription.nodes.layoutData.backgroundImage.overlay.gradient.centerX`},{path:`category.richContentDescription.nodes.layoutData.backgroundImage.overlay.gradient.centerY`},{path:`category.richContentDescription.nodes.layoutData.backgroundImage.overlay.gradient.stops.position`},{path:`category.richContentDescription.nodes.layoutData.backdropImage.media.duration`},{path:`category.richContentDescription.nodes.layoutData.backdropImage.overlay.gradient.centerX`},{path:`category.richContentDescription.nodes.layoutData.backdropImage.overlay.gradient.centerY`},{path:`category.richContentDescription.nodes.layoutData.backdropImage.overlay.gradient.stops.position`},{path:`category.richContentDescription.nodes.layoutData.background.gradient.centerX`},{path:`category.richContentDescription.nodes.layoutData.background.gradient.centerY`},{path:`category.richContentDescription.nodes.layoutData.background.gradient.stops.position`},{path:`category.richContentDescription.nodes.layoutData.backdrop.gradient.centerX`},{path:`category.richContentDescription.nodes.layoutData.backdrop.gradient.centerY`},{path:`category.richContentDescription.nodes.layoutData.backdrop.gradient.stops.position`},{path:`category.richContentDescription.nodes.shapeData.shape.duration`},{path:`category.richContentDescription.nodes.cardData.background.gradient.centerX`},{path:`category.richContentDescription.nodes.cardData.background.gradient.centerY`},{path:`category.richContentDescription.nodes.cardData.background.gradient.stops.position`},{path:`category.richContentDescription.nodes.cardData.backgroundImage.media.duration`},{path:`category.richContentDescription.nodes.cardData.backgroundImage.overlay.gradient.centerX`},{path:`category.richContentDescription.nodes.cardData.backgroundImage.overlay.gradient.centerY`},{path:`category.richContentDescription.nodes.cardData.backgroundImage.overlay.gradient.stops.position`},{path:`category.richContentDescription.nodes.tocData.fontSize`},{path:`category.richContentDescription.nodes.tocData.itemSpacing`},{path:`category.richContentDescription.nodes.smartBlockCellData.shape.duration`}]}])}}return t}function Ms(e){function t({host:t}){return{entityFqdn:`wix.categories.v1.category`,method:`POST`,methodFqn:`com.wix.categories.api.v1.CategoriesService.QueryCategories`,packageName:As,migrationOptions:{optInTransformResponse:!0},url:ks({protoPath:`/v1/categories/query`,data:e,host:t}),data:e,transformResponse:e=>T(e,[{transformFn:w,paths:[{path:`categories.createdDate`},{path:`categories.updatedDate`},{path:`categories.image.urlExpirationDate`},{path:`categories.richContentDescription.metadata.createdTimestamp`},{path:`categories.richContentDescription.metadata.updatedTimestamp`}]},{transformFn:j,paths:[{path:`categories.richContentDescription.nodes.buttonData.styles.background.gradient.centerX`},{path:`categories.richContentDescription.nodes.buttonData.styles.background.gradient.centerY`},{path:`categories.richContentDescription.nodes.buttonData.styles.background.gradient.stops.position`},{path:`categories.richContentDescription.nodes.buttonData.styles.backgroundHover.gradient.centerX`},{path:`categories.richContentDescription.nodes.buttonData.styles.backgroundHover.gradient.centerY`},{path:`categories.richContentDescription.nodes.buttonData.styles.backgroundHover.gradient.stops.position`},{path:`categories.richContentDescription.nodes.galleryData.items.image.media.duration`},{path:`categories.richContentDescription.nodes.galleryData.items.video.media.duration`},{path:`categories.richContentDescription.nodes.galleryData.items.video.thumbnail.duration`},{path:`categories.richContentDescription.nodes.galleryData.options.item.ratio`},{path:`categories.richContentDescription.nodes.imageData.image.duration`},{path:`categories.richContentDescription.nodes.imageData.crop.x`},{path:`categories.richContentDescription.nodes.imageData.crop.y`},{path:`categories.richContentDescription.nodes.imageData.crop.width`},{path:`categories.richContentDescription.nodes.imageData.crop.height`},{path:`categories.richContentDescription.nodes.mapData.mapSettings.lat`},{path:`categories.richContentDescription.nodes.mapData.mapSettings.lng`},{path:`categories.richContentDescription.nodes.pollData.poll.image.duration`},{path:`categories.richContentDescription.nodes.pollData.poll.options.image.duration`},{path:`categories.richContentDescription.nodes.pollData.design.poll.background.image.duration`},{path:`categories.richContentDescription.nodes.appEmbedData.image.duration`},{path:`categories.richContentDescription.nodes.videoData.video.duration`},{path:`categories.richContentDescription.nodes.videoData.thumbnail.duration`},{path:`categories.richContentDescription.nodes.audioData.audio.duration`},{path:`categories.richContentDescription.nodes.audioData.coverImage.duration`},{path:`categories.richContentDescription.nodes.layoutData.backgroundImage.media.duration`},{path:`categories.richContentDescription.nodes.layoutData.backgroundImage.overlay.gradient.centerX`},{path:`categories.richContentDescription.nodes.layoutData.backgroundImage.overlay.gradient.centerY`},{path:`categories.richContentDescription.nodes.layoutData.backgroundImage.overlay.gradient.stops.position`},{path:`categories.richContentDescription.nodes.layoutData.backdropImage.media.duration`},{path:`categories.richContentDescription.nodes.layoutData.backdropImage.overlay.gradient.centerX`},{path:`categories.richContentDescription.nodes.layoutData.backdropImage.overlay.gradient.centerY`},{path:`categories.richContentDescription.nodes.layoutData.backdropImage.overlay.gradient.stops.position`},{path:`categories.richContentDescription.nodes.layoutData.background.gradient.centerX`},{path:`categories.richContentDescription.nodes.layoutData.background.gradient.centerY`},{path:`categories.richContentDescription.nodes.layoutData.background.gradient.stops.position`},{path:`categories.richContentDescription.nodes.layoutData.backdrop.gradient.centerX`},{path:`categories.richContentDescription.nodes.layoutData.backdrop.gradient.centerY`},{path:`categories.richContentDescription.nodes.layoutData.backdrop.gradient.stops.position`},{path:`categories.richContentDescription.nodes.shapeData.shape.duration`},{path:`categories.richContentDescription.nodes.cardData.background.gradient.centerX`},{path:`categories.richContentDescription.nodes.cardData.background.gradient.centerY`},{path:`categories.richContentDescription.nodes.cardData.background.gradient.stops.position`},{path:`categories.richContentDescription.nodes.cardData.backgroundImage.media.duration`},{path:`categories.richContentDescription.nodes.cardData.backgroundImage.overlay.gradient.centerX`},{path:`categories.richContentDescription.nodes.cardData.backgroundImage.overlay.gradient.centerY`},{path:`categories.richContentDescription.nodes.cardData.backgroundImage.overlay.gradient.stops.position`},{path:`categories.richContentDescription.nodes.tocData.fontSize`},{path:`categories.richContentDescription.nodes.tocData.itemSpacing`},{path:`categories.richContentDescription.nodes.smartBlockCellData.shape.duration`}]}])}}return t}var Ns=(e=>(e.BREADCRUMBS_INFO=`BREADCRUMBS_INFO`,e.DESCRIPTION=`DESCRIPTION`,e.RICH_CONTENT_DESCRIPTION=`RICH_CONTENT_DESCRIPTION`,e))(Ns||{});async function Ps(e,t,n){let{httpClient:r,sideEffects:i}=arguments[3],a=js(S({slug:e,treeReference:t,fields:n?.fields},[]));i?.onSiteCall?.();try{let e=await r.request(a);return i?.onSuccess?.(e),C(T(e.data,[{transformFn:U,paths:[{path:`category.image`}]}]),[`category.richContentDescription`])}catch(e){let t=E(e,{spreadPathsToArguments:{},explicitPathsToArguments:{slug:`$[0]`,treeReference:`$[1]`,fields:`$[2].fields`},singleArgumentUnchanged:!1},[`slug`,`treeReference`,`options`]);throw i?.onError?.(e),t}}function Fs(e){let{httpClient:t,sideEffects:n}=arguments[1];return Ni({func:async r=>{let i=Ms({...r,...e});n?.onSiteCall?.();try{let e=await t.request(i);return n?.onSuccess?.(e),e}catch(e){throw n?.onError?.(e),e}},requestTransformer:t=>{let n=[t,e];return S({...n?.[1],query:n?.[0]},[])},responseTransformer:({data:e})=>{let t=C(T(e,[{transformFn:U,paths:[{path:`categories.image`}]}]),[`categories.richContentDescription`]);return{items:t?.categories,pagingMetadata:t?.pagingMetadata}},errorTransformer:e=>{throw E(e,{spreadPathsToArguments:{},explicitPathsToArguments:{query:`$[0]`},singleArgumentUnchanged:!1})},pagingMethod:`CURSOR`,transformationPaths:{}})}async function Is(e,t){let{httpClient:n,sideEffects:r}=arguments[2],i=Ms(S({query:e,...t},[]));r?.onSiteCall?.();try{let e=await n.request(i);return r?.onSuccess?.(e),C(T(e.data,[{transformFn:U,paths:[{path:`categories.image`}]}]),[`categories.richContentDescription`])}catch(e){let t=E(e,{spreadPathsToArguments:{},explicitPathsToArguments:{query:`$[0]`},singleArgumentUnchanged:!1},[`query`,`options`]);throw r?.onError?.(e),t}}({...H()}),{...xa()};function Ls(e){return(t,n,r)=>Ps(t,n,r,{httpClient:e})}function Rs(e){return t=>Fs(t,{httpClient:e})}function zs(e){return(t,n)=>Is(t,n,{httpClient:e})}var Bs=y(`wix.categories.v1.category_category_moved`,!0,e=>C(T(e,[{transformFn:w,paths:[{path:`metadata.eventTime`}]}])))(),Vs=y(`wix.categories.v1.category_created`,!0,e=>C(T(e,[{transformFn:w,paths:[{path:`entity.createdDate`},{path:`entity.updatedDate`},{path:`entity.richContentDescription.metadata.createdTimestamp`},{path:`entity.richContentDescription.metadata.updatedTimestamp`},{path:`metadata.eventTime`}]},{transformFn:U,paths:[{path:`entity.image`}]},{transformFn:j,paths:[{path:`entity.richContentDescription.nodes.buttonData.styles.background.gradient.centerX`},{path:`entity.richContentDescription.nodes.buttonData.styles.background.gradient.centerY`},{path:`entity.richContentDescription.nodes.buttonData.styles.background.gradient.stops.position`},{path:`entity.richContentDescription.nodes.buttonData.styles.backgroundHover.gradient.centerX`},{path:`entity.richContentDescription.nodes.buttonData.styles.backgroundHover.gradient.centerY`},{path:`entity.richContentDescription.nodes.buttonData.styles.backgroundHover.gradient.stops.position`},{path:`entity.richContentDescription.nodes.galleryData.items.image.media.duration`},{path:`entity.richContentDescription.nodes.galleryData.items.video.media.duration`},{path:`entity.richContentDescription.nodes.galleryData.items.video.thumbnail.duration`},{path:`entity.richContentDescription.nodes.galleryData.options.item.ratio`},{path:`entity.richContentDescription.nodes.imageData.image.duration`},{path:`entity.richContentDescription.nodes.imageData.crop.x`},{path:`entity.richContentDescription.nodes.imageData.crop.y`},{path:`entity.richContentDescription.nodes.imageData.crop.width`},{path:`entity.richContentDescription.nodes.imageData.crop.height`},{path:`entity.richContentDescription.nodes.mapData.mapSettings.lat`},{path:`entity.richContentDescription.nodes.mapData.mapSettings.lng`},{path:`entity.richContentDescription.nodes.pollData.poll.image.duration`},{path:`entity.richContentDescription.nodes.pollData.poll.options.image.duration`},{path:`entity.richContentDescription.nodes.pollData.design.poll.background.image.duration`},{path:`entity.richContentDescription.nodes.appEmbedData.image.duration`},{path:`entity.richContentDescription.nodes.videoData.video.duration`},{path:`entity.richContentDescription.nodes.videoData.thumbnail.duration`},{path:`entity.richContentDescription.nodes.audioData.audio.duration`},{path:`entity.richContentDescription.nodes.audioData.coverImage.duration`},{path:`entity.richContentDescription.nodes.layoutData.backgroundImage.media.duration`},{path:`entity.richContentDescription.nodes.layoutData.backgroundImage.overlay.gradient.centerX`},{path:`entity.richContentDescription.nodes.layoutData.backgroundImage.overlay.gradient.centerY`},{path:`entity.richContentDescription.nodes.layoutData.backgroundImage.overlay.gradient.stops.position`},{path:`entity.richContentDescription.nodes.layoutData.backdropImage.media.duration`},{path:`entity.richContentDescription.nodes.layoutData.backdropImage.overlay.gradient.centerX`},{path:`entity.richContentDescription.nodes.layoutData.backdropImage.overlay.gradient.centerY`},{path:`entity.richContentDescription.nodes.layoutData.backdropImage.overlay.gradient.stops.position`},{path:`entity.richContentDescription.nodes.layoutData.background.gradient.centerX`},{path:`entity.richContentDescription.nodes.layoutData.background.gradient.centerY`},{path:`entity.richContentDescription.nodes.layoutData.background.gradient.stops.position`},{path:`entity.richContentDescription.nodes.layoutData.backdrop.gradient.centerX`},{path:`entity.richContentDescription.nodes.layoutData.backdrop.gradient.centerY`},{path:`entity.richContentDescription.nodes.layoutData.backdrop.gradient.stops.position`},{path:`entity.richContentDescription.nodes.shapeData.shape.duration`},{path:`entity.richContentDescription.nodes.cardData.background.gradient.centerX`},{path:`entity.richContentDescription.nodes.cardData.background.gradient.centerY`},{path:`entity.richContentDescription.nodes.cardData.background.gradient.stops.position`},{path:`entity.richContentDescription.nodes.cardData.backgroundImage.media.duration`},{path:`entity.richContentDescription.nodes.cardData.backgroundImage.overlay.gradient.centerX`},{path:`entity.richContentDescription.nodes.cardData.backgroundImage.overlay.gradient.centerY`},{path:`entity.richContentDescription.nodes.cardData.backgroundImage.overlay.gradient.stops.position`},{path:`entity.richContentDescription.nodes.tocData.fontSize`},{path:`entity.richContentDescription.nodes.tocData.itemSpacing`},{path:`entity.richContentDescription.nodes.smartBlockCellData.shape.duration`}]}])))(),Hs=y(`wix.categories.v1.category_deleted`,!0,e=>C(T(e,[{transformFn:w,paths:[{path:`undefined.createdDate`},{path:`undefined.updatedDate`},{path:`undefined.richContentDescription.metadata.createdTimestamp`},{path:`undefined.richContentDescription.metadata.updatedTimestamp`},{path:`metadata.eventTime`}]},{transformFn:U,paths:[{path:`undefined.image`}]},{transformFn:j,paths:[{path:`undefined.richContentDescription.nodes.buttonData.styles.background.gradient.centerX`},{path:`undefined.richContentDescription.nodes.buttonData.styles.background.gradient.centerY`},{path:`undefined.richContentDescription.nodes.buttonData.styles.background.gradient.stops.position`},{path:`undefined.richContentDescription.nodes.buttonData.styles.backgroundHover.gradient.centerX`},{path:`undefined.richContentDescription.nodes.buttonData.styles.backgroundHover.gradient.centerY`},{path:`undefined.richContentDescription.nodes.buttonData.styles.backgroundHover.gradient.stops.position`},{path:`undefined.richContentDescription.nodes.galleryData.items.image.media.duration`},{path:`undefined.richContentDescription.nodes.galleryData.items.video.media.duration`},{path:`undefined.richContentDescription.nodes.galleryData.items.video.thumbnail.duration`},{path:`undefined.richContentDescription.nodes.galleryData.options.item.ratio`},{path:`undefined.richContentDescription.nodes.imageData.image.duration`},{path:`undefined.richContentDescription.nodes.imageData.crop.x`},{path:`undefined.richContentDescription.nodes.imageData.crop.y`},{path:`undefined.richContentDescription.nodes.imageData.crop.width`},{path:`undefined.richContentDescription.nodes.imageData.crop.height`},{path:`undefined.richContentDescription.nodes.mapData.mapSettings.lat`},{path:`undefined.richContentDescription.nodes.mapData.mapSettings.lng`},{path:`undefined.richContentDescription.nodes.pollData.poll.image.duration`},{path:`undefined.richContentDescription.nodes.pollData.poll.options.image.duration`},{path:`undefined.richContentDescription.nodes.pollData.design.poll.background.image.duration`},{path:`undefined.richContentDescription.nodes.appEmbedData.image.duration`},{path:`undefined.richContentDescription.nodes.videoData.video.duration`},{path:`undefined.richContentDescription.nodes.videoData.thumbnail.duration`},{path:`undefined.richContentDescription.nodes.audioData.audio.duration`},{path:`undefined.richContentDescription.nodes.audioData.coverImage.duration`},{path:`undefined.richContentDescription.nodes.layoutData.backgroundImage.media.duration`},{path:`undefined.richContentDescription.nodes.layoutData.backgroundImage.overlay.gradient.centerX`},{path:`undefined.richContentDescription.nodes.layoutData.backgroundImage.overlay.gradient.centerY`},{path:`undefined.richContentDescription.nodes.layoutData.backgroundImage.overlay.gradient.stops.position`},{path:`undefined.richContentDescription.nodes.layoutData.backdropImage.media.duration`},{path:`undefined.richContentDescription.nodes.layoutData.backdropImage.overlay.gradient.centerX`},{path:`undefined.richContentDescription.nodes.layoutData.backdropImage.overlay.gradient.centerY`},{path:`undefined.richContentDescription.nodes.layoutData.backdropImage.overlay.gradient.stops.position`},{path:`undefined.richContentDescription.nodes.layoutData.background.gradient.centerX`},{path:`undefined.richContentDescription.nodes.layoutData.background.gradient.centerY`},{path:`undefined.richContentDescription.nodes.layoutData.background.gradient.stops.position`},{path:`undefined.richContentDescription.nodes.layoutData.backdrop.gradient.centerX`},{path:`undefined.richContentDescription.nodes.layoutData.backdrop.gradient.centerY`},{path:`undefined.richContentDescription.nodes.layoutData.backdrop.gradient.stops.position`},{path:`undefined.richContentDescription.nodes.shapeData.shape.duration`},{path:`undefined.richContentDescription.nodes.cardData.background.gradient.centerX`},{path:`undefined.richContentDescription.nodes.cardData.background.gradient.centerY`},{path:`undefined.richContentDescription.nodes.cardData.background.gradient.stops.position`},{path:`undefined.richContentDescription.nodes.cardData.backgroundImage.media.duration`},{path:`undefined.richContentDescription.nodes.cardData.backgroundImage.overlay.gradient.centerX`},{path:`undefined.richContentDescription.nodes.cardData.backgroundImage.overlay.gradient.centerY`},{path:`undefined.richContentDescription.nodes.cardData.backgroundImage.overlay.gradient.stops.position`},{path:`undefined.richContentDescription.nodes.tocData.fontSize`},{path:`undefined.richContentDescription.nodes.tocData.itemSpacing`},{path:`undefined.richContentDescription.nodes.smartBlockCellData.shape.duration`}]}])))(),Us=y(`wix.categories.v1.category_item_added_to_category`,!0,e=>C(T(e,[{transformFn:w,paths:[{path:`metadata.eventTime`}]}])))(),Ws=y(`wix.categories.v1.category_item_removed_from_category`,!0,e=>C(T(e,[{transformFn:w,paths:[{path:`metadata.eventTime`}]}])))(),Gs=y(`wix.categories.v1.category_items_arranged_in_category`,!0,e=>C(T(e,[{transformFn:w,paths:[{path:`metadata.eventTime`}]}])))(),Ks=y(`wix.categories.v1.category_updated`,!0,e=>C(T(e,[{transformFn:w,paths:[{path:`entity.createdDate`},{path:`entity.updatedDate`},{path:`entity.richContentDescription.metadata.createdTimestamp`},{path:`entity.richContentDescription.metadata.updatedTimestamp`},{path:`metadata.eventTime`},{path:`modifiedFields.createdDate`},{path:`modifiedFields.updatedDate`},{path:`modifiedFields.richContentDescription.metadata.createdTimestamp`},{path:`modifiedFields.richContentDescription.metadata.updatedTimestamp`}]},{transformFn:U,paths:[{path:`entity.image`},{path:`modifiedFields.image`}]},{transformFn:j,paths:[{path:`entity.richContentDescription.nodes.buttonData.styles.background.gradient.centerX`},{path:`entity.richContentDescription.nodes.buttonData.styles.background.gradient.centerY`},{path:`entity.richContentDescription.nodes.buttonData.styles.background.gradient.stops.position`},{path:`entity.richContentDescription.nodes.buttonData.styles.backgroundHover.gradient.centerX`},{path:`entity.richContentDescription.nodes.buttonData.styles.backgroundHover.gradient.centerY`},{path:`entity.richContentDescription.nodes.buttonData.styles.backgroundHover.gradient.stops.position`},{path:`entity.richContentDescription.nodes.galleryData.items.image.media.duration`},{path:`entity.richContentDescription.nodes.galleryData.items.video.media.duration`},{path:`entity.richContentDescription.nodes.galleryData.items.video.thumbnail.duration`},{path:`entity.richContentDescription.nodes.galleryData.options.item.ratio`},{path:`entity.richContentDescription.nodes.imageData.image.duration`},{path:`entity.richContentDescription.nodes.imageData.crop.x`},{path:`entity.richContentDescription.nodes.imageData.crop.y`},{path:`entity.richContentDescription.nodes.imageData.crop.width`},{path:`entity.richContentDescription.nodes.imageData.crop.height`},{path:`entity.richContentDescription.nodes.mapData.mapSettings.lat`},{path:`entity.richContentDescription.nodes.mapData.mapSettings.lng`},{path:`entity.richContentDescription.nodes.pollData.poll.image.duration`},{path:`entity.richContentDescription.nodes.pollData.poll.options.image.duration`},{path:`entity.richContentDescription.nodes.pollData.design.poll.background.image.duration`},{path:`entity.richContentDescription.nodes.appEmbedData.image.duration`},{path:`entity.richContentDescription.nodes.videoData.video.duration`},{path:`entity.richContentDescription.nodes.videoData.thumbnail.duration`},{path:`entity.richContentDescription.nodes.audioData.audio.duration`},{path:`entity.richContentDescription.nodes.audioData.coverImage.duration`},{path:`entity.richContentDescription.nodes.layoutData.backgroundImage.media.duration`},{path:`entity.richContentDescription.nodes.layoutData.backgroundImage.overlay.gradient.centerX`},{path:`entity.richContentDescription.nodes.layoutData.backgroundImage.overlay.gradient.centerY`},{path:`entity.richContentDescription.nodes.layoutData.backgroundImage.overlay.gradient.stops.position`},{path:`entity.richContentDescription.nodes.layoutData.backdropImage.media.duration`},{path:`entity.richContentDescription.nodes.layoutData.backdropImage.overlay.gradient.centerX`},{path:`entity.richContentDescription.nodes.layoutData.backdropImage.overlay.gradient.centerY`},{path:`entity.richContentDescription.nodes.layoutData.backdropImage.overlay.gradient.stops.position`},{path:`entity.richContentDescription.nodes.layoutData.background.gradient.centerX`},{path:`entity.richContentDescription.nodes.layoutData.background.gradient.centerY`},{path:`entity.richContentDescription.nodes.layoutData.background.gradient.stops.position`},{path:`entity.richContentDescription.nodes.layoutData.backdrop.gradient.centerX`},{path:`entity.richContentDescription.nodes.layoutData.backdrop.gradient.centerY`},{path:`entity.richContentDescription.nodes.layoutData.backdrop.gradient.stops.position`},{path:`entity.richContentDescription.nodes.shapeData.shape.duration`},{path:`entity.richContentDescription.nodes.cardData.background.gradient.centerX`},{path:`entity.richContentDescription.nodes.cardData.background.gradient.centerY`},{path:`entity.richContentDescription.nodes.cardData.background.gradient.stops.position`},{path:`entity.richContentDescription.nodes.cardData.backgroundImage.media.duration`},{path:`entity.richContentDescription.nodes.cardData.backgroundImage.overlay.gradient.centerX`},{path:`entity.richContentDescription.nodes.cardData.backgroundImage.overlay.gradient.centerY`},{path:`entity.richContentDescription.nodes.cardData.backgroundImage.overlay.gradient.stops.position`},{path:`entity.richContentDescription.nodes.tocData.fontSize`},{path:`entity.richContentDescription.nodes.tocData.itemSpacing`},{path:`entity.richContentDescription.nodes.smartBlockCellData.shape.duration`},{path:`modifiedFields.richContentDescription.nodes.buttonData.styles.background.gradient.centerX`},{path:`modifiedFields.richContentDescription.nodes.buttonData.styles.background.gradient.centerY`},{path:`modifiedFields.richContentDescription.nodes.buttonData.styles.background.gradient.stops.position`},{path:`modifiedFields.richContentDescription.nodes.buttonData.styles.backgroundHover.gradient.centerX`},{path:`modifiedFields.richContentDescription.nodes.buttonData.styles.backgroundHover.gradient.centerY`},{path:`modifiedFields.richContentDescription.nodes.buttonData.styles.backgroundHover.gradient.stops.position`},{path:`modifiedFields.richContentDescription.nodes.galleryData.items.image.media.duration`},{path:`modifiedFields.richContentDescription.nodes.galleryData.items.video.media.duration`},{path:`modifiedFields.richContentDescription.nodes.galleryData.items.video.thumbnail.duration`},{path:`modifiedFields.richContentDescription.nodes.galleryData.options.item.ratio`},{path:`modifiedFields.richContentDescription.nodes.imageData.image.duration`},{path:`modifiedFields.richContentDescription.nodes.imageData.crop.x`},{path:`modifiedFields.richContentDescription.nodes.imageData.crop.y`},{path:`modifiedFields.richContentDescription.nodes.imageData.crop.width`},{path:`modifiedFields.richContentDescription.nodes.imageData.crop.height`},{path:`modifiedFields.richContentDescription.nodes.mapData.mapSettings.lat`},{path:`modifiedFields.richContentDescription.nodes.mapData.mapSettings.lng`},{path:`modifiedFields.richContentDescription.nodes.pollData.poll.image.duration`},{path:`modifiedFields.richContentDescription.nodes.pollData.poll.options.image.duration`},{path:`modifiedFields.richContentDescription.nodes.pollData.design.poll.background.image.duration`},{path:`modifiedFields.richContentDescription.nodes.appEmbedData.image.duration`},{path:`modifiedFields.richContentDescription.nodes.videoData.video.duration`},{path:`modifiedFields.richContentDescription.nodes.videoData.thumbnail.duration`},{path:`modifiedFields.richContentDescription.nodes.audioData.audio.duration`},{path:`modifiedFields.richContentDescription.nodes.audioData.coverImage.duration`},{path:`modifiedFields.richContentDescription.nodes.layoutData.backgroundImage.media.duration`},{path:`modifiedFields.richContentDescription.nodes.layoutData.backgroundImage.overlay.gradient.centerX`},{path:`modifiedFields.richContentDescription.nodes.layoutData.backgroundImage.overlay.gradient.centerY`},{path:`modifiedFields.richContentDescription.nodes.layoutData.backgroundImage.overlay.gradient.stops.position`},{path:`modifiedFields.richContentDescription.nodes.layoutData.backdropImage.media.duration`},{path:`modifiedFields.richContentDescription.nodes.layoutData.backdropImage.overlay.gradient.centerX`},{path:`modifiedFields.richContentDescription.nodes.layoutData.backdropImage.overlay.gradient.centerY`},{path:`modifiedFields.richContentDescription.nodes.layoutData.backdropImage.overlay.gradient.stops.position`},{path:`modifiedFields.richContentDescription.nodes.layoutData.background.gradient.centerX`},{path:`modifiedFields.richContentDescription.nodes.layoutData.background.gradient.centerY`},{path:`modifiedFields.richContentDescription.nodes.layoutData.background.gradient.stops.position`},{path:`modifiedFields.richContentDescription.nodes.layoutData.backdrop.gradient.centerX`},{path:`modifiedFields.richContentDescription.nodes.layoutData.backdrop.gradient.centerY`},{path:`modifiedFields.richContentDescription.nodes.layoutData.backdrop.gradient.stops.position`},{path:`modifiedFields.richContentDescription.nodes.shapeData.shape.duration`},{path:`modifiedFields.richContentDescription.nodes.cardData.background.gradient.centerX`},{path:`modifiedFields.richContentDescription.nodes.cardData.background.gradient.centerY`},{path:`modifiedFields.richContentDescription.nodes.cardData.background.gradient.stops.position`},{path:`modifiedFields.richContentDescription.nodes.cardData.backgroundImage.media.duration`},{path:`modifiedFields.richContentDescription.nodes.cardData.backgroundImage.overlay.gradient.centerX`},{path:`modifiedFields.richContentDescription.nodes.cardData.backgroundImage.overlay.gradient.centerY`},{path:`modifiedFields.richContentDescription.nodes.cardData.backgroundImage.overlay.gradient.stops.position`},{path:`modifiedFields.richContentDescription.nodes.tocData.fontSize`},{path:`modifiedFields.richContentDescription.nodes.tocData.itemSpacing`},{path:`modifiedFields.richContentDescription.nodes.smartBlockCellData.shape.duration`}]}])))();function qs(e){let t=qi({builderQueryFunction:t=>Rs(e)(t),typedQueryFunction:(t,n)=>zs(e)(t,n),hasOptionsParameter:!0});function n(e,n){return t(...arguments)}return n}var Js=D(Ls),Ys=D(qs);A(Bs),A(Vs),A(Hs),A(Us),A(Ws),A(Gs),A(Ks);function Xs(e){if(!e)return null;let t=e.match(/image:\/\/v1\/([^/#]+)/);return t?.[1]?t[1]:e.match(/\/media\/([^/]+)/)?.[1]??null}function Zs(e){return`https://static.wixstatic.com/media/${e}`}function Qs(e){if(!e)return null;let t=e.match(/#originWidth=(\d+)&originHeight=(\d+)/);return t?{width:parseInt(t[1],10),height:parseInt(t[2],10)}:null}var $s=e=>`/category/${e}`,ec=e=>({...e,nodes:e.nodes??[]}),tc=e=>{if(!e)return;let t=Qs(e);return{uri:Xs(e)??void 0,url:e,width:t?.width,height:t?.height}},nc=e=>e.filter(e=>e.categoryId).map(e=>{let t=e.categorySlug??``;return{id:e.categoryId??``,name:e.categoryName??``,slug:t,href:$s(t)}}),rc=e=>({type:e.type,props:e.props??void 0,meta:e.meta??void 0,children:e.children,custom:e.custom,disabled:e.disabled}),ic=e=>{if(e)return{preventAutoRedirect:e.preventAutoRedirect,keywords:e.keywords?.map(e=>({term:e.term,isMain:e.isMain,origin:e.origin??void 0}))}},ac=e=>{if(e)return{tags:e.tags?.map(rc),settings:ic(e.settings)}};function oc(e){return{id:e._id??``,name:e.name??``,slug:e.slug??``,description:e.description??void 0,itemCounter:e.itemCounter,parentCategoryId:e.parentCategory?._id??void 0,seoData:ac(e.seoData),richContentDescription:e.richContentDescription?ec(e.richContentDescription):void 0,image:tc(e.image),breadcrumbs:nc(e.breadcrumbsInfo?.breadcrumbs??[])}}var sc={appNamespace:`@wix/stores`,treeKey:null},cc=[Ns.BREADCRUMBS_INFO,Ns.DESCRIPTION,Ns.RICH_CONTENT_DESCRIPTION],lc=`No category slug is available for the category context`,uc=(e,t)=>{if(!e?._id||e.visible===!1)throw Error(t);return oc(e)};async function dc(e){if(!e)throw Error(lc);let{category:t}=await Js(e,sc,{fields:cc});return uc(t,`Category not found for slug: ${e}`)}async function fc(){return(await Ya().eq(`defaultLocation`,!0).find()).items?.[0]?._id??void 0}var pc=(e,t,n)=>{let r=[];for(let i of e.keys())if(!t.has(i)){let e=n.find(e=>e._id===i);e&&r.push(Cc(e,0))}return r},mc=e=>{let t=new Map;for(let{_id:n,primaryChoiceIds:r}of e)if(n)for(let e of r??[]){let r=t.get(e)??[];t.set(e,[...r,n])}return t},hc=(e,t,n)=>{let r=pc(t,new Set(e.map(e=>e.id)),n),i=[...e,...r],a=new Map(i.map(e=>[e.id,e])),o=new Set([...t.values()].flat());return i.flatMap(e=>{if(o.has(e.id))return[];let n=t.get(e.id);if(!n)return[e];let r=n.filter(e=>a.has(e));if(r.length===0&&e.count===0)return[];let i=r.reduce((e,t)=>e+(a.get(t)?.count??0),0);return[{...e,count:e.count+i,linkedChoiceIds:r}]})};function gc(e,t){return hc(e,mc(t),t)}var _c=e=>{let t=e.trim();if(t===``)return null;let n=Number(t);return Number.isFinite(n)?n:null},vc=(e,t)=>{let n=t.choicesSettings?.choices??[],r=new Map(n.map((e,t)=>[e._id??``,t])),i=e=>r.get(e.id)??2**53-1;return e.toSorted((e,t)=>i(e)-i(t))},yc=(e,t,n)=>t===W.TEXT_CHOICES?xc(e,e=>e.name):n?bc(e,e=>e.count):[...e],bc=(e,t)=>e.toSorted((e,n)=>t(n)-t(e)),xc=(e,t)=>e.toSorted((e,n)=>{let r=_c(t(e)),i=_c(t(n));return r!==null&&i!==null?r-i:r===null?i===null?t(e).toLowerCase().localeCompare(t(n).toLowerCase()):1:-1});function Sc(e,t,n){switch(t.choicesSettings?.sortOrder){case G.BY_NAME:return xc(e,e=>e.name);case G.BY_PRODUCT_COUNT:return bc(e,e=>e.count);case G.MANUAL:return vc(e,t);case G.DEFAULT:default:return yc(e,t.customizationRenderType,n)}}var Cc=(e,t)=>({id:e._id??``,name:e.name??``,type:e.choiceType,values:e.colorCode===void 0?[]:[e.colorCode],count:t,linkedChoiceIds:[],displayImage:e.displayImage});function wc(e,t){let n=e.choicesSettings?.choices??[],r=new Map(n.map(e=>[e._id,e])),i=[...t].flatMap(([e,t])=>{let n=r.get(e);return n?[Cc(n,t)]:[]}),a=n.some(e=>(e.primaryChoiceIds?.length??0)>0);return Sc(a?gc(i,n):i,e,a)}var Tc=e=>{let t=Xs(e);if(!t)return;let n=Qs(e);return{id:t,url:Zs(t),...n?{width:n.width,height:n.height}:{}}},Ec=e=>{let t=e.displayImage===void 0?void 0:Tc(e.displayImage);return{...Oc(e),...e.values[0]===void 0?{}:{colorHexCode:e.values[0]},...t?{displayImage:t}:{}}},Dc=e=>({type:J.SWATCH_CHOICES,id:e.id,customizationType:e.type,name:e.name,values:e.choices.map(Ec)}),Oc=e=>({id:e.id,name:e.name,...e.linkedChoiceIds.length>0?{childIds:e.linkedChoiceIds}:{}}),kc=e=>({type:J.TEXT_CHOICES,id:e.id,customizationType:e.type,name:e.name,values:e.choices.map(Oc)}),Ac=(e,t,n,r)=>{let i=new Map(t.map(e=>[e._id,e]));return n.flatMap(t=>{let n=i.get(t);return n?[{id:t,name:n.name??``,renderType:n.customizationRenderType,type:e,choices:wc(n,r)}]:[]})},jc=e=>xc(e.filter(e=>e.renderType===W.SWATCH_CHOICES).map(Dc),e=>e.name),Mc=e=>xc(e.filter(e=>e.renderType===W.TEXT_CHOICES).map(kc),e=>e.name);function Nc(e,t,n,r){if(n.length===0)return[];let i=Ac(e,t,n,r);return[...jc(i),...Mc(i)]}function Pc(e,t){if(!(e===void 0||t===void 0||e>=t))return{type:J.PRICE,name:oo.PRICE,minPrice:e,maxPrice:t}}var Fc=g(((e,t)=>{function n(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var a=Array(i);++r<i;)a[r]=e[r+t];return a}t.exports=n})),Ic=g(((e,t)=>{function n(e,t){return e===t||e!==e&&t!==t}t.exports=n})),Lc=g(((e,t)=>{t.exports=typeof window==`object`&&window&&window.Object===Object&&window})),Rc=g(((e,t)=>{var n=Lc(),r=typeof self==`object`&&self&&self.Object===Object&&self;t.exports=n||r||Function(`return this`)()})),zc=g(((e,t)=>{t.exports=Rc().Symbol})),Bc=g(((e,t)=>{var n=zc(),r=Object.prototype,i=r.hasOwnProperty,a=r.toString,o=n?n.toStringTag:void 0;function s(e){var t=i.call(e,o),n=e[o];try{e[o]=void 0;var r=!0}catch{}var s=a.call(e);return r&&(t?e[o]=n:delete e[o]),s}t.exports=s})),Vc=g(((e,t)=>{var n=Object.prototype.toString;function r(e){return n.call(e)}t.exports=r})),Hc=g(((e,t)=>{var n=zc(),r=Bc(),i=Vc(),a=`[object Null]`,o=`[object Undefined]`,s=n?n.toStringTag:void 0;function c(e){return e==null?e===void 0?o:a:s&&s in Object(e)?r(e):i(e)}t.exports=c})),Uc=g(((e,t)=>{function n(e){var t=typeof e;return e!=null&&(t==`object`||t==`function`)}t.exports=n})),Wc=g(((e,t)=>{var n=Hc(),r=Uc(),i=`[object AsyncFunction]`,a=`[object Function]`,o=`[object GeneratorFunction]`,s=`[object Proxy]`;function c(e){if(!r(e))return!1;var t=n(e);return t==a||t==o||t==i||t==s}t.exports=c})),Gc=g(((e,t)=>{function n(e){return typeof e==`number`&&e>-1&&e%1==0&&e<=9007199254740991}t.exports=n})),Kc=g(((e,t)=>{var n=Wc(),r=Gc();function i(e){return e!=null&&r(e.length)&&!n(e)}t.exports=i})),qc=g(((e,t)=>{var n=/^(?:0|[1-9]\d*)$/;function r(e,t){var r=typeof e;return t??=9007199254740991,!!t&&(r==`number`||r!=`symbol`&&n.test(e))&&e>-1&&e%1==0&&e<t}t.exports=r})),Jc=g(((e,t)=>{var n=Ic(),r=Kc(),i=qc(),a=Uc();function o(e,t,o){if(!a(o))return!1;var s=typeof t;return(s==`number`?r(o)&&i(t,o.length):s==`string`&&t in o)?n(o[t],e):!1}t.exports=o})),Yc=g(((e,t)=>{var n=/\s/;function r(e){for(var t=e.length;t--&&n.test(e.charAt(t)););return t}t.exports=r})),Xc=g(((e,t)=>{var n=Yc(),r=/^\s+/;function i(e){return e&&e.slice(0,n(e)+1).replace(r,``)}t.exports=i})),Zc=g(((e,t)=>{function n(e){return typeof e==`object`&&!!e}t.exports=n})),Qc=g(((e,t)=>{var n=Hc(),r=Zc(),i=`[object Symbol]`;function a(e){return typeof e==`symbol`||r(e)&&n(e)==i}t.exports=a})),$c=g(((e,t)=>{var n=Xc(),r=Uc(),i=Qc(),a=NaN,o=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,c=/^0o[0-7]+$/i,l=parseInt;function u(e){if(typeof e==`number`)return e;if(i(e))return a;if(r(e)){var t=typeof e.valueOf==`function`?e.valueOf():e;e=r(t)?t+``:t}if(typeof e!=`string`)return e===0?e:+e;e=n(e);var u=s.test(e);return u||c.test(e)?l(e.slice(2),u?2:8):o.test(e)?a:+e}t.exports=u})),el=g(((e,t)=>{var n=$c(),r=1/0,i=17976931348623157e292;function a(e){return e?(e=n(e),e===r||e===-r?(e<0?-1:1)*i:e===e?e:0):e===0?e:0}t.exports=a})),tl=g(((e,t)=>{var n=el();function r(e){var t=n(e),r=t%1;return t===t?r?t-r:t:0}t.exports=r})),nl=_(g(((e,t)=>{var n=Fc(),r=Jc(),i=tl(),a=Math.ceil,o=Math.max;function s(e,t,s){t=(s?r(e,t,s):t===void 0)?1:o(i(t),0);var c=e==null?0:e.length;if(!c||t<1)return[];for(var l=0,u=0,d=Array(a(c/t));l<c;)d[u++]=n(e,l,l+=t);return d}t.exports=s}))(),1),rl=[ta.CHOICE_DISPLAY_IMAGE],il=`customizationRenderType`;async function al(e){let t=(0,nl.default)(e,100);return(await Promise.all(t.map(ol))).flat()}var ol=async e=>(await ua({fields:rl}).hasSome(`_id`,e).ne(il,W.FREE_TEXT).limit(100).find()).items,sl=(e,t,n)=>({name:e,type:ja.SCALAR,fieldPath:t,scalar:{type:n}}),cl=(e,t,n)=>({name:e,type:ja.VALUE,fieldPath:t,value:{limit:n,sortType:Oa.COUNT,sortDirection:ka.DESC}});function ll(e){let t=[];return e.includes(Z.PRICE)&&t.push(sl(Q.minPrice,$.minPrice,Aa.MIN),sl(Q.maxPrice,$.maxPrice,Aa.MAX)),e.includes(Z.OPTIONS)&&t.push(cl(Q.options,$.option,us.options),cl(Q.optionsWithChoice,$.optionChoice,us.choices)),e.includes(Z.MODIFIERS)&&t.push(cl(Q.modifiers,$.modifier,us.modifiers),cl(Q.modifiersWithChoice,$.modifierChoice,us.choices)),t}var ul=e=>{let t=e?.values?.results??[],n=new Map;for(let e of t)e.value!==void 0&&e.count!==void 0&&n.set(e.value,e.count);return n},dl=e=>(e?.values?.results??[]).flatMap(e=>e.value===void 0?[]:[e.value]),fl=e=>{let t=new Map;for(let n of e)n.name!==void 0&&t.set(n.name,n);return t};async function pl(e,t){let n=await za({filter:{[ls]:{$matchItems:[{id:e}]}},cursorPaging:{limit:1},aggregations:ll(t)},{fields:[q.CURRENCY]}),r=fl(n.aggregationData?.results??[]);return{minPrice:r.get(Q.minPrice)?.scalar?.value,maxPrice:r.get(Q.maxPrice)?.scalar?.value,optionIds:dl(r.get(Q.options)),optionChoiceIdToCount:ul(r.get(Q.optionsWithChoice)),modifierIds:dl(r.get(Q.modifiers)),modifierChoiceIdToCount:ul(r.get(Q.modifiersWithChoice)),currency:n.products?.[0]?.currency??void 0}}var ml=[Z.PRICE,Z.OPTIONS,Z.MODIFIERS];async function hl(e,t=ml){let n=await pl(e,t),r=await al([...n.optionIds,...n.modifierIds]);return{filters:[Pc(n.minPrice,n.maxPrice),...Nc(ea.PRODUCT_OPTION,r,n.optionIds,n.optionChoiceIdToCount),...Nc(ea.MODIFIER,r,n.modifierIds,n.modifierChoiceIdToCount)].filter(e=>e!==void 0),currency:n.currency}}var gl=e=>{let t=Xs(e??void 0);if(!t)return;let n=Qs(e);return{id:t,url:Zs(t),...n?{width:n.width,height:n.height}:{}}},_l=({promotion:e,position:t})=>{if(e?._id&&t!==void 0)return{id:e._id,name:e.name,destinationUrl:e.destinationUrl?{href:e.destinationUrl}:void 0,image:gl(e.media?.image),altText:e.media?.altText??void 0,position:t}};async function vl(e){return((await ao(e)).promotions??[]).map(_l).filter(e=>e!==void 0)}var yl=async(e,t,n,r)=>{let i=[...new URLSearchParams(n).keys()].length>0?(await t).filters:[],a=po(n,i),o=Do(n);return{page:await ys({categoryId:e,filters:i,filterSelection:a,sortType:o,productsPerPage:r}),filterSelectionKey:xs(a),sortType:o,productsPerPage:r}};async function bl(e,t,n){let r=hl(e),[i,a,o]=await Promise.all([yl(e,r,t,n),r,vl(e)]),{filters:s,currency:c}=a;return{filters:s,currency:c,promotions:o,initialProductList:i}}var xl=async(e,t,n)=>{let[r,i]=await Promise.all([dc(e),fc()]);return{category:r,defaultLocationId:i,...await bl(r.id,t,n)}},Sl=(e,t,n)=>`wixstores-storefront-builder:category-by-slug-context-data:${e}:${n}:${t}`;function Cl(e){let{search:t}=yi(),n=Os();return Es(Sl(n,t,e),()=>xl(n,t,e))}function wl(e){return{id:e._id,name:e.name,slug:e.slug,href:e.slug?`/category/${e.slug}`:``,parentCategoryId:e.parentCategory?._id,sortIndex:e.parentCategory?.index,childCategoryIds:[]}}function Tl(e){let t={};for(let n of e){if(n.visible===!1||!n._id)continue;let e=wl(n);t[e.id??``]=e}for(let e of Object.values(t))e?.parentCategoryId&&t[e.parentCategoryId]?.childCategoryIds.push(e.id??``);return t}var El={appNamespace:`@wix/stores`,treeKey:null},Dl=1e3;async function Ol(){return Tl((await Ys({treeReference:El}).eq(`visible`,!0).limit(Dl).find()).items)}var kl=`wixstores-storefront-builder:category-list-context-data`;function Al(){return Es(kl,()=>Ol())}function jl(){throw Error(`useCategoryBySlugContext must not be used directly`)}function Ml({categoryValue:e,categoryListValue:t,productListValue:n,children:r}){return s(u,{value:t,children:s(l,{value:e,children:s(c,{value:n,children:r})})})}var Nl=({children:e,dataPromise:t,categoryListPromise:n,productsPerPage:r})=>{let i=hi(t),a=hi(n),o=si(i),c=ci(a,i.category.id),l=Cs(i,r);return mi(i.category),s(Ml,{categoryValue:o,categoryListValue:c,productListValue:l,children:e})};function Pl({children:e,productsPerPage:n=20}){let[r]=a(()=>new Lr),i=Cl(n),o=Al();return s(Br,{client:r,children:s(t,{fallback:null,children:s(Nl,{dataPromise:i,categoryListPromise:o,productsPerPage:n,children:e})})})}var Fl=Nn(`404b3ed8-9b27-4342-9451-17ae43ebdebb`);export{Pl as CategoryBySlugContextProvider,Pl as default,Ml as CategoryBySlugContextValues,Fl as injectAccessTokenGetter,jl as useCategoryBySlugContext};
|
|
2
|
+
//# sourceMappingURL=context-provider-404b3ed8-9b27-4342-9451-17ae43ebdebb-5BBDB_Cr.js.map
|