/*! For license information please see main.js.LICENSE.txt */
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define(["globals"],e):"object"==typeof exports?exports.masterPage=e():t.masterPage=e()}(this,(function(globals){var $w=globals.$w,$ns=globals.$ns,$wixContext=globals.$wixContext,console=(globals.$widget,globals.console),elementorySupport=globals.elementorySupport,t=globals.generateWebMethodUrl||((t,e)=>`/_webMethods/${e}/${t}.ajax`);return function(){var e,r,n,a,i={876:function(t,e,r){const{items:n,collections:a}=r(8731),{auth:i}=r(387),s={insert:i.elevate(n.insert),update:i.elevate(n.update),bulkInsert:i.elevate(n.bulkInsert),query:i.elevate(n.query),save:i.elevate(n.save),remove:i.elevate(n.remove),get:i.elevate(n.get)},o={getDataCollection:i.elevate(a.getDataCollection),createDataCollection:i.elevate(a.createDataCollection),updateDataCollection:i.elevate(a.updateDataCollection)};t.exports={wixData:s,wixCollections:o}},3899:function(t,e,r){t.exports={...r(6441),...r(9286),...r(9448),...r(2304),...r(4541),...r(391),...r(3827)}},9311:function(t,e,r){const{getSlugAndProductId:n,getSlug:a,deleteCompiledProductBySlug:i,refreshDataBySlug:s}=r(9286),{isWarrantyProduct:o}=r(8418),{updateSkuField:c}=r(391),l={CMS_PRODUCT_CHANGE:{name:"CMSProductChanged",getIdentifier:a,process:t=>s(t,!0),shouldSkipCheck:o,estimatedDurationSec:2},CMS_PRODUCT_CREATE:{name:"CMSProductCreate",getIdentifier:a,process:t=>s(t,!0),shouldSkipCheck:o,estimatedDurationSec:2},CMS_PRODUCT_DELETE:{name:"CMSProductDelete",getIdentifier:a,process:i,shouldSkipCheck:o,estimatedDurationSec:2},STORE_PRODUCT_CREATE:{name:"StoresProductCreate",getIdentifier:a,process:t=>s(t,!0),shouldSkipCheck:o,estimatedDurationSec:2},STORE_PRODUCT_CHANGE:{name:"StoresProductChanged",getIdentifier:a,process:t=>s(t,!0),shouldSkipCheck:o,estimatedDurationSec:2},STORE_PRODUCT_DELETE:{name:"StoresProductDelete",getIdentifier:t=>t.slug,process:i,shouldSkipCheck:o,estimatedDurationSec:2},CMS_PRODUCT_INITIALIZE_SKU:{name:"CMSProductInitializeSku",getIdentifier:n,process:c,shouldSkipCheck:()=>!1,estimatedDurationSec:2},CMS_PRODUCT_UPDATE_SKU:{name:"CMSProductUpdateSku",getIdentifier:n,process:c,shouldSkipCheck:()=>!1,estimatedDurationSec:2}};t.exports={TASKS:l}},9592:function(t,e,r){const{TASK_TYPE:n}=r(6887),{taskManager:a}=r(1808),{TASKS:i}=r(9311);t.exports={onCMSProductAfterUpdate:function(t){return console.log("onCMSProductAfterUpdate ",t),a().schedule({name:i.CMS_PRODUCT_CHANGE.name,data:{storeProductId:t.storeProduct},type:n.EVENT}),a().schedule({name:i.CMS_PRODUCT_UPDATE_SKU.name,data:{storeProductId:t.storeProduct,productId:t._id},type:n.EVENT}),t},onCMSProductAfterCreate:function(t){return a().schedule({name:i.CMS_PRODUCT_CREATE.name,data:{storeProductId:t.storeProduct},type:n.EVENT}),t},onCMSProductBeforeRemove:function(t){console.log("onCMSProductBeforeRemove",t),a().schedule({name:i.CMS_PRODUCT_DELETE.name,data:{storeProductId:t},type:n.EVENT})},onStoreProductAfterCreate:function(t){console.log("onStoreProductAfterCreate",t),a().schedule({name:i.STORE_PRODUCT_CREATE.name,data:{storeProductId:t._id},type:n.EVENT})},onStoreProductAfterUpdate:function(t){console.log("onStoreProductAfterUpdate",t),a().schedule({name:i.STORE_PRODUCT_CHANGE.name,data:{storeProductId:t.productId},type:n.EVENT})},onStoreProductBeforeRemove:function(t){console.log("onStoreProductBeforeRemove",t),a().schedule({name:i.STORE_PRODUCT_DELETE.name,data:{storeProductId:t.productId},type:n.EVENT})}}},2304:function(t,e,r){t.exports={...r(9311),...r(9592)}},391:function(t,e,r){const{items:n}=r(8731),{COLLECTIONS:a}=r(3209),{getDataBySlug:i}=r(9286);t.exports={updateSkuField:async function(t){const{slug:e,productId:r}=t;let s,o;if(e){const{product:t,productInCMS:r}=await i(e);s=r,o=t.sku}else s=await n.get(a.CMS_PRODUCTS,r),o="";if(!s||o===s.sku)return void console.log("[updateSkuField] productInCMS not found or sku is the same, skipping");const c={...s,sku:o};await n.save(a.CMS_PRODUCTS,c),console.log("[updateSkuField] SKU updated successfully")}}},6887:function(t){t.exports={TASK_STATUS:{PENDING:"pending",IN_PROGRESS:"in_progress",SUCCESS:"success",FAILED:"failed",SKIPPED:"skipped"},TASK_TYPE:{SCHEDULED:"scheduled",EVENT:"event"},TASKS_CONCURRENCY_LIMIT:1,TASK_MAX_TRIES:3,CRON_JOB_MAX_DURATION_SEC:240}},8603:function(t){function e(t){if("string"!=typeof t)return!1;try{const e=new URL(t);return["http:","https:","ftp:","ftps:"].includes(e.protocol)}catch{return!1}}function r(t){if("string"!=typeof t)return!1;if(![/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?$/,/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}[+-]\d{2}:\d{2}$/,/^\d{4}-\d{2}-\d{2}$/,/^\d{2}\/\d{2}\/\d{4}$/,/^\d{2}-\d{2}-\d{4}$/].some((e=>e.test(t))))return!1;const e=new Date(t);return!isNaN(e.getTime())}function n(t){if("string"!=typeof t)return!1;return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t)}function a(t){if("string"!=typeof t)return!1;const e=t.replace(/[\s().-]/g,"");return[/^\+\d{1,3}\d{6,14}$/,/^\d{10}$/,/^\d{11}$/].some((t=>t.test(e)))||[/^\+\d{1,3}\s?\(\d{3}\)\s?\d{3}[\s-]?\d{4}$/,/^\(\d{3}\)\s?\d{3}[\s-]?\d{4}$/,/^\d{3}[\s-]?\d{3}[\s-]?\d{4}$/,/^\+\d{1,3}[\s-]?\d{6,14}$/].some((e=>e.test(t)))}function i(t){return null==t?"TEXT":"boolean"==typeof t?"BOOLEAN":"number"==typeof t?"NUMBER":t instanceof Date?"DATETIME":Array.isArray(t)?"ARRAY":"object"==typeof t?"OBJECT":"string"==typeof t?""===t.trim()?"TEXT":r(t)?"DATETIME":e(t)?"URL":n(t)?"EMAIL":a(t)?"PHONE":t.length>500?"RICHTEXT":"TEXT":"TEXT"}t.exports={isValidUrl:e,isDateString:r,isEmail:n,isPhoneNumber:a,detectFieldType:i,detectFieldTypeFromMultipleValues:function(t){if(!Array.isArray(t)||0===t.length)return"TEXT";const e=t.filter((t=>null!=t));if(0===e.length)return"TEXT";const r=e.map(i),n=[...new Set(r)];if(1===n.length)return n[0];const a={BOOLEAN:8,NUMBER:7,DATETIME:6,URL:5,EMAIL:4,PHONE:3,ARRAY:2,OBJECT:2,RICHTEXT:1,TEXT:0},s=n.sort(((t,e)=>(a[e]||0)-(a[t]||0)))[0];return r.filter((t=>t===s)).length/r.length>=.7?s:"TEXT"}}},9448:function(t,e,r){t.exports={...r(1808),...r(6887),...r(3763),...r(1534),...r(8603)}},42:function(t,e,r){const{insertNewTask:n,bulkInsertTasks:a}=r(3763),{createChildTaskPayload:i}=r(9082);t.exports={scheduleChildren:({parentTaskId:t,parentTaskData:e,expectedChildTasks:r,scheduledChildren:s})=>{const o=t=>{if(0===t||!s?.length)return;return s[s.length-1]?.data?.output};return{sequentially:a=>(({taskName:t,taskData:e,parentTaskId:r})=>{const a=i({taskName:t,taskData:e,parentTaskId:r});return n(a)})({taskName:r[a].name,taskData:{...e,...r[a].data,previousTaskOutput:o(a)},parentTaskId:t}),inBulk:()=>(({parentTaskId:t,parentTaskData:{previousTaskOutput:e,...r},childTasks:n})=>{const s=n.map((({name:e,data:n})=>i({taskName:e,taskData:{...r,...n},parentTaskId:t})));return a(s)})({parentTaskId:t,parentTaskData:e,childTasks:r})}}}},358:function(t,e,r){const{getTaskConfig:n,getTaskScheduledChildren:a,getExpectedChildTasks:i}=r(3763),{scheduleChildren:s}=r(42),{hasFailedChildAndMarkedParent:o,hasUnfinishedChild:c,areChildrenSucceededAndMarkedParent:l}=r(6293),{shouldScheduleNextChild:u}=r(9082);t.exports={scheduleChildTasksAndUpdateParent:async(t,e)=>{const{_id:r,name:d,data:h}=t,p=n(d,e),m=i(t,p),f=await a(r),g=s({parentTaskId:r,parentTaskData:h,expectedChildTasks:m,scheduledChildren:f});if(!f.length)return console.log(`No scheduled children found for task with id ${r}, started scheduling children`),p.scheduleChildrenSequentially?(console.log("scheduling children sequentially"),g.sequentially(0)):(console.log("scheduling children in bulk"),g.inBulk());if(c(f))return void console.log(`[Children Unfinished]: Found unfinished children for task with id ${r}, quitting parent processing`);if(await o(t,f))return void console.log(`[Children Failed]: Found Failed children for task with id ${r}, quitting parent processing`);if(await l({parent:t,scheduledChildren:f,expectedChildrenCount:m.length}))return void console.log(`[Children Completed Successfully]: All children for task with id ${r} completed Successfully, quitting parent processing.`);if(u({parentTaskConfig:p,scheduledChildren:f,expectedChildTasks:m})){const t=f.length;return console.log(`[Sequential Scheduling]: Scheduling child with index ${t} for task with id ${r}`),g.sequentially(t)}throw new Error(`[scheduleChildTasksAndUpdateParent] - Something went wrong with task: ${t.name} this line should not be reached`)}}},6293:function(t,e,r){const{TASK_STATUS:n}=r(6887),{markTask:a}=r(3763),{isPermanentlyFailed:i,isCompletedSuccessfully:s,isUnfinishedTask:o}=r(9082);t.exports={hasFailedChildAndMarkedParent:async(t,e)=>{const r=e.find((t=>i(t)));return!!r&&(console.log("Child task failed, so marking parent as failed!!"),await a({task:t,status:n.FAILED,error:r.error}),!0)},hasUnfinishedChild:t=>t.some((t=>o(t))),areChildrenSucceededAndMarkedParent:async({parent:t,scheduledChildren:e,expectedChildrenCount:r})=>!(e.length!==r||!e.every(s))&&(await a({task:t,status:n.SUCCESS}),!0)}},9082:function(t,e,r){const{TASK_TYPE:n,TASK_STATUS:a,TASK_MAX_TRIES:i}=r(6887),s=t=>[a.SUCCESS,a.SKIPPED].includes(t.status),o=t=>t.status===a.FAILED&&t.amountOfRetries===i;t.exports={createChildTaskPayload:({taskName:t,taskData:e,parentTaskId:r})=>({name:t,data:e,type:n.SCHEDULED,parentTaskId:r}),isPermanentlyFailed:o,isCompletedSuccessfully:s,isFinishedTask:t=>s(t)||o(t),isUnfinishedTask:t=>!s(t)&&!o(t),shouldScheduleNextChild:({parentTaskConfig:t,scheduledChildren:e,expectedChildTasks:r})=>t.scheduleChildrenSequentially&&e.length<r.length}},1534:function(t,e,r){const{wixData:n,wixCollections:a}=r(876),{detectFieldType:i}=r(8603),{createCollectionIfMissing:s}=r(3763);function o(t){return s(`${t}_results`,[{key:"taskId",type:"TEXT"},{key:"taskName",type:"TEXT"},{key:"status",type:"TEXT"},{key:"result",type:"OBJECT"}],null,"Results")}async function c(t,e){if(e&&"object"==typeof e)try{const r=await a.getDataCollection(t),n=new Set(r.fields.map((t=>t.key))),s=[];if(Object.keys(e).forEach((t=>{if(!n.has(t)){const r=e[t],n=i(r);s.push({key:t,type:n})}})),s.length>0){console.log(`[addDynamicFieldsToCollection] Adding ${s.length} new fields to collection ${t}`);const e=[...r.fields,...s];await a.updateDataCollection({_id:t,revision:r.revision,fields:e}),console.log(`[addDynamicFieldsToCollection] Successfully added new fields: ${s.map((t=>t.key)).join(", ")}`)}}catch(e){console.error(`[addDynamicFieldsToCollection] Failed to add dynamic fields to collection ${t}: ${e.message}`)}else console.log("[addDynamicFieldsToCollection] No valid result object to analyze for fields")}t.exports={createResultsCollectionIfMissing:o,addDynamicFieldsToCollection:c,saveTaskResultToAdditionalCollection:async function(t,e,r){try{const{_id:a,name:i}=t;console.log(`[saveTaskResult] Saving result for task ${i}`);const s=await o(i);await c(s,r);const l={taskId:a,taskName:i,status:e,result:r,...r&&"object"==typeof r?r:{}},u=await n.insert(s,l);return console.log(`[saveTaskResult] Successfully saved result for task ${i} with ID ${u._id}`),u._id}catch(e){const r=`[saveTaskResult] Failed to save result for task ${t.name}: ${e.message}`;throw console.error(r),new Error(r)}},shouldSaveResultsToAdditionalCollection:function(t){return t&&!0===t.saveResults}}},1808:function(t,e,r){const{withDuration:n}=r(4675),{TASK_STATUS:a,CRON_JOB_MAX_DURATION_SEC:i}=r(6887),{scheduleChildTasksAndUpdateParent:s}=r(358),{saveTaskResultToAdditionalCollection:o,shouldSaveResultsToAdditionalCollection:c}=r(1534),{getTaskConfig:l,markTask:u,insertNewTask:d,getScheduledTasks:h,isParentTask:p,getTasksToProcess:m,bulkInsertTasks:f}=r(3763);t.exports={taskManager:function(){const t=(t,e)=>n("processTask",(async()=>{const r=t.name,n=t.status===a.FAILED;let i=!1;try{console.log(`[processTask] for ${r} Started`);const n=l(r,e);if(i=c(n),await u({task:t,status:a.IN_PROGRESS}),p(t,n))return await s(t,e),t;const d=await n.getIdentifier(t);if(n.shouldSkipCheck(d))return console.log(`[${r}] Task for identifier ${d} will be skipped`),await u({task:t,status:a.SKIPPED,error:`${r} skipped`}),console.log(`[${r}] Task for identifier ${d} is skipped`),t;const h=await n.process(d);return t.data.output=h,await u({task:t,status:a.SUCCESS}),i&&await o(t,a.SUCCESS,h),console.log(`[processTask] for ${r} Task with identifier ${d} completed successfully`),t}catch(e){const s=`[processTask] for ${r} Task failed with error: ${e}`;console.error(s);const c=n?t.amountOfRetries+1:t.amountOfRetries;throw await u({task:t,error:e,status:a.FAILED,amountOfRetries:c}),i&&await o(t,a.FAILED,{error:e}),new Error(s)}}),console),e=async e=>{try{const r=await h();console.log(`runScheduledTasks: scheduledTasks: ${JSON.stringify(r)}`),console.log(`runScheduledTasks: tasksConfig: ${JSON.stringify(e)}`),r.length?await(async(e,r)=>{console.log(`processTasksBasedOnVeloLimit: ${JSON.stringify(e)} ${JSON.stringify(r)}`);const n=m({scheduledTasks:e,tasksConfig:r,maxDuration:i});console.log(`processTasksBasedOnVeloLimit: toProcessTasks: ${JSON.stringify(n)}`),console.log(`[processTasksBasedOnVeloLimit] started processing: ${n.length} tasks`);for(const e of n)try{await t(e,r)}catch(t){console.error(`[processTasksBasedOnVeloLimit] failed to process task ${JSON.stringify(e)} with error: ${t}`)}console.log(`[processTasksBasedOnVeloLimit] finished processing: ${n.length} tasks`)})(r,e):console.log("[runScheduledTasks] No Tasks to process",JSON.stringify({scheduledTasksCount:r.length}))}catch(t){throw console.error(`[runScheduledTasks] failed with error: ${t}`),t}};return{schedule:d,scheduleInBulk:f,processTask:t,runScheduledTasks:(...t)=>n("runScheduledTasks",(()=>e(...t)),console)}}}},3763:function(t,e,r){const{COLLECTIONS:n,COLLECTIONS_FIELDS:a}=r(3209),{wixData:i,wixCollections:s}=r(876),{TASK_STATUS:o,TASK_TYPE:c,TASK_MAX_TRIES:l}=r(6887);async function u(t,e,r=null,n="Collection"){console.log(`[createCollectionIfMissing] Checking for collection with ID: ${t}`);const a=r||{insert:"ADMIN",update:"ADMIN",remove:"ADMIN",read:"ADMIN"};try{return await s.getDataCollection(t),console.log(`[createCollectionIfMissing] ${n} collection ${t} already exists`),t}catch(r){if(r.message.includes("WDE0025")){console.log(`[createCollectionIfMissing] ${n} collection ${t} does not exist. Creating...`);const r={id:t,fields:e,permissions:a};return"singleItem"===n&&(r.plugins=[{type:"SINGLE_ITEM",singleItemOptions:{}}]),await s.createDataCollection(r),console.log(`[createCollectionIfMissing] ${n} collection ${t} created successfully`),t}throw console.error(`[createCollectionIfMissing] While trying to get collection with id: ${t} an unexpected error occurred: ${r}`),r}}const d=(t,e)=>{const r=Object.values(e).find((e=>e.name===t));if(!r)throw new Error(`unknown task name ${t}`);return r},h=async t=>{try{await i.update(n.TASKS,t)}catch(e){const r=`[updateTask] for ${JSON.stringify(t)} failed with error: ${e.message}`;throw console.error(r),new Error(r)}},p=(t,e)=>"function"==typeof e.childTasks?e.childTasks(t):e.childTasks,m=(t,e)=>{if(!("childTasks"in e))return!1;const r=p(t,e);if(!Array.isArray(r)||0===r.length)throw new Error("taskConfig.childTasks must be a non-empty array if defined");return!0};t.exports={createCollectionIfMissing:u,getTaskConfig:d,updateTask:h,markTask:async({task:t,status:e,error:r,amountOfRetries:n})=>{const a={...t,...e&&{status:e},...r&&{error:r.message??r},...void 0!==n&&{amountOfRetries:n}};await h(a)},insertNewTask:async({name:t,data:e,type:r,parentTaskId:s})=>{await u(n.TASKS,a.TASKS);try{if(!("string"==typeof t&&t&&"object"==typeof e&&e&&"string"==typeof r&&r&&(void 0===s||"string"==typeof s&&s)))throw new Error(`[insertNewTask] Invalid params: ${JSON.stringify({name:t,data:e,type:r,parentTaskId:s})}`);console.log("inserting pending task",t);const a=await i.insert(n.TASKS,{name:t,parentTaskId:s,data:e,status:o.PENDING,type:r,amountOfRetries:0});return console.log(`Task ${t} inserted successfully`),a._id}catch(e){const r=`[insertNewTask] Failed for Task ${t} with error ${e.message}`;throw console.error(r),new Error(r)}},bulkInsertTasks:async t=>{try{const e=t.map((t=>({...t,status:o.PENDING,amountOfRetries:0})));return(await i.bulkInsert(n.TASKS,e)).insertedItemIds}catch(t){const e=`[bulkInsertTasks] Failed for Tasks with error ${t.message}`;throw console.error(e),new Error(e)}},getScheduledTasks:async()=>{try{const t=i.query(n.TASKS),e=t.eq("type",c.SCHEDULED).hasSome("status",[o.PENDING,o.FAILED,o.IN_PROGRESS]),r=t.eq("type",c.EVENT).eq("status",o.FAILED);return await e.or(r).lt("amountOfRetries",l).ascending("_updatedDate").limit(1e3).find().then((t=>t.items))}catch(t){throw new Error(`[getScheduledTasks] failed with error: ${t.message}`)}},getTaskScheduledChildren:async t=>{try{return await i.query(n.TASKS).eq("parentTaskId",t).ascending("_createdDate").limit(1e3).find().then((t=>t.items))}catch(e){throw console.error(`[getTaskScheduledChildren] failed for task [${t}] with error: ${e.message}`),e}},isParentTask:m,getTasksToProcess:({scheduledTasks:t,tasksConfig:e,maxDuration:r})=>{console.log("getTasksToProcess:",{scheduledTasks:t,tasksConfig:e,maxDuration:r});const n=[];let a=0;console.log(`tasksConfig is : ${JSON.stringify(e)}`);const i=((t,e)=>{console.log(`filterScheduledTasksByStatus: ${JSON.stringify(t)} ${JSON.stringify(e)}`);const r=t.filter((t=>t.status===o.IN_PROGRESS?(console.log(`filterScheduledTasksByStatus: task: ${JSON.stringify(t)}`),console.log(`filterScheduledTasksByStatus: tasksConfig: ${JSON.stringify(e)}`),m(t,e[t.name])):[o.PENDING,o.FAILED].includes(t.status)));return console.log(`filterScheduledTasksByStatus: filtered: ${JSON.stringify(r)}`),r})(t,e);console.log(`filteredScheduledTasks is  : ${JSON.stringify(i)}`);for(const t of i){console.log(`task is : ${JSON.stringify(t)}`);const i=d(t.name,e);console.log(`taskConfig is : ${JSON.stringify(i)}`);const s=i?.estimatedDurationSec;if(!s){const e=`[getTasksToProcess] estimatedDurationSec is not defined for task ${t.name}`;throw console.error(e),new Error(e)}const o=1.5*s;if(a+o>r)break;a+=o,n.push(t)}return console.log("getTasksToProcess: tasksToProcess:",n),n},getExpectedChildTasks:p}},9842:function(t,e,r){const{TASKS:n}=r(9311),{TASK_TYPE:a}=r(6887),{taskManager:i}=r(1808);t.exports={onProductTasksAfterInsert:function(t){if(console.log("onTaskCollectionAfterinsert ",t),t.type!==a.SCHEDULED)return i().processTask(t,n)}}},4541:function(t,e,r){t.exports={...r(9842)}},3827:function(t,e,r){const{items:n}=r(8731),{COLLECTIONS:a}=r(3209),{queryAllItems:i}=r(6441),{TASKS:s}=r(9311),{TASK_TYPE:o}=r(6887),{taskManager:c}=r(1808);t.exports={updateMissingSkusForExistingProducts:async function(){const t=n.query(a.CMS_PRODUCTS),e=t.isEmpty("sku").or(t.eq("sku","")),r=await i(e);if(console.log(`Found ${r.length} products with missing sku`),r.length>0)for(const t of r)c().schedule({name:s.CMS_PRODUCT_UPDATE_SKU.name,data:{storeProductId:t.storeProduct,productId:t._id},type:o.SCHEDULED,parentTaskId:void 0})}}},3061:function(t,e,r){t.exports={...r(4261),...r(2504),...r(3899),...r(1733)}},6435:function(t,e,r){const{window:n}=r(3910),{checkProductContent:a,isElementExistOnPage:i}=r(4261),{logUrlPath:s,getSiteUrl:o}=r(7121);t.exports={productPageOnReady:function(t){const e={image1Section:"#image1Section",image2Section:"#image2Section",image3Section:"#image3Section",firstRichTextSection:"#firstRichTextSection",secondRichTextSection:"#secondRichTextSection",thirdRichTextSection:"#thirdRichTextSection",videoSection:"#videoSection",additionalGallerySection:"#additionalGallerySection"},r={firstKeyFeaturesSection:"#firstKeyFeaturesSection",secondKeyFeaturesSection:"#secondKeyFeaturesSection",additionalResourcesSection:"#additionalResourcesSection",awardsSection:"#awardsSection"},c=Object.values(e).map((t=>({selector:t,isAvailable:!1}))),l=[...c,...Object.values(r).map((t=>({selector:t,isAvailable:!1})))],u=e=>{e.forEach((({selector:e,isAvailable:r})=>{i(t(e))&&(!0===r?t(e).restore():!1===r&&t(e).delete())}))},d=t=>{(t=>{Object.keys(e).forEach((r=>{const n=c.find((t=>t.selector===e[r]));n&&(n.isAvailable=t[r])}))})(t),u(c)},h=(e,r,n,a)=>{const i=t(e);i&&0!==i.length?(console.log(`Repeater ${e} found, iterating over items`),t(e).forEachItem((t=>{const e=e=>{t(e).text||(console.log(`${e} data is empty, collapsing it`),"function"==typeof t(e).collapse?t(e).collapse():(s(),console.error(`${e} is not a collapsible element!!`)))};e(r),e(n),e(a)}))):console.warn(`Repeater ${e} not found or is empty`)};u(l),t("#productDataset").onReady((()=>{t("#productDataset").getItems(0,1).then((async e=>{if(0===e.items.length)throw console.error("Product dataset is empty:"),s(),new Error(`productData is empty - SiteUrl: ${await o()} `);const r=e.items[0];console.log(`productData is : ${r}`),r&&!r.vimeoLink&&r.mainVideo&&(t("#videoPlayer1").src=r.mainVideo);const{hasFirstRichTextContent:i,hasSecondRichTextContent:c,hasThirdRichTextContent:l,hasMainVideo:u,hasGallery:h}=a(r);return d({firstRichTextSection:i,secondRichTextSection:c,thirdRichTextSection:l,videoSection:u,additionalGallerySection:h}),(async e=>{const r=await n.formFactor();"Mobile"===r&&(e.mobileImage1Override&&(t("#firstImage").src=e.mobileImage1Override),e.mobileImage2Override&&(t("#secondImage").src=e.mobileImage2Override),e.mobileImage3Override&&(t("#thirdImage").src=e.mobileImage3Override));const{hasImage1:i,hasImage2:s,hasImage3:o,hasMobileImage1:c,hasMobileImage2:l,hasMobileImage3:u}=a(e);d({image1Section:"Mobile"===r?c:i,image2Section:"Mobile"===r?l:s,image3Section:"Mobile"===r?u:o})})(r),r})).catch((t=>{const e=t.message,r=t.code;throw new Error(`Error ${r}: ${e}`)}))})),Object.values(r).forEach((e=>{const r=e.replace("Section","Dataset");t(r).onReady((()=>{console.log(`datasetSelector: ${r} before calling getTotalCount ${JSON.stringify(t(r))}`);let n=0;try{n=t(r)?.getTotalCount()||0}catch(t){s(),console.warn(`Error getting total count for dataset ${r}. Defaulting to 0. Error: ${t}`)}console.log({datasetSelector:r,totalCount:n}),u([{selector:e,isAvailable:0!==n}]),["#firstKeyFeaturesSection","#secondKeyFeaturesSection"].includes(e)&&("#firstKeyFeaturesSection"===e&&h("#firstKeyFeaturesRepeater","#firstKeyFeaturesTitle","#firstKeyFeaturesSubTitle","#firstKeyFeaturesDescription"),"#secondKeyFeaturesSection"===e&&h("#secondKeyFeaturesRepeater","#secondKeyFeaturesTitle","#secondKeyFeaturesSubTitle","#secondKeyFeaturesDescription"))}))}))}}},2504:function(t,e,r){t.exports={...r(7828),...r(6435),...r(4557),...r(187)}},7828:function(t,e,r){const{withDuration:n,isProductPage:a,handleSearchButtonClick:i,renderProduct:s,withSuccessRateLogs:o}=r(4261);t.exports={masterPageOnReady:async function(t,e,r=!1){e.log("Velo-NPM: Version 1.2"),await n("onReady",(()=>async function(t,e,r){const c=await a(),l=(...t)=>o("renderProduct",(()=>s(...t)));c&&await n("renderProduct using NPM - Version 1.2",(()=>l(t,e,r)),e);return i(t),Promise.resolve()}(t,e,r)),e),e.debugLink()}}},4557:function(t,e,r){const{location:n,queryParams:a}=r(7597),{lightbox:i}=r(3910),{setParamInSession:s}=r(2455);t.exports={previewModalOnReady:async function(t){const e="branchId",{branchId:r}=await i.getContext();t("#branchText").text=`Branch ID: ${r}`,t("#previewBtn").onClick((async()=>{await s(e,r),await i.close()})),t("#productionBtn").onClick((async()=>{a.queryParams().remove([e,"siteRevision"]);const t=await n.url();n.to(t)}))}}},187:function(t,e,r){const{getProductInCMSByProductInStores:n}=r(4261);t.exports={productSupportPageOnReady:function(t){!function(t){t("#productSupportDataset").onReady((async()=>{try{const e=t("#productSupportDataset").getCurrentItem(),r=await n(e);if(!r)throw new Error("No matching cmsProduct found");if(!r.supportDocuments||0===r.supportDocuments.length)return;t("#productDocuments").onItemReady(((t,e)=>{t("#supportDocumentBtn").link=e.documentLink,t("#supportDocumentBtn").label=e.title})),t("#productDocuments").data=r.supportDocuments.map(((t,e)=>{const r=t.split("/").pop();return{_id:`resource-${e}`,title:decodeURIComponent(r),documentLink:t}})),t("#productDocuments").expand()}catch(t){console.error("Error loading product documents:",t)}}))}(t)}}},3209:function(t){t.exports={COLLECTIONS:{SPECS:"Specs",STORE_PRODUCTS:"Stores/Products",TASKS:"Tasks",COMPILED_PRODUCTS:"CompiledProducts",CMS_PRODUCTS:"Products1",CMS_PRODUCTS_KEY_FEATURES:"ProductsKeyFeatures",DEBUG_PRODUCTSFEEDBACK:"debugProductsFeebdack"},COLLECTIONS_FIELDS:{TASKS:[{key:"name",type:"TEXT"},{key:"data",type:"OBJECT"},{key:"type",type:"TEXT",enum:["event","scheduled"]},{key:"status",type:"TEXT",enum:["pending","in_progress","success","skipped","failed"]},{key:"error",type:"TEXT"},{key:"amountOfRetries",type:"NUMBER"},{key:"parentTaskId",type:"REFERENCE",typeMetadata:{reference:{referencedCollectionId:"Tasks"}}},{key:"Task Result",type:"TEXT"}]}}},1969:function(t,e,r){t.exports={...r(1912),...r(6173)}},6173:function(t){t.exports={hisenseCategoryInputs:{Televisions:"2-42561424/reg_tv_model",Projectors:"2-42561424/reg_projector_model",Audio:"2-42561424/reg_audio_model","Air Products":"2-42561424/reg_air_product_model",Refrigerators:"2-42561424/reg_refrigerator_model",Dishwashers:"2-42561424/reg_dishwasher_models","Microwave Ovens":"2-42561424/reg_microwave_model","Cooking Ranges":"2-42561424/reg_cooking_range_model","Kitchen Packages":"2-42561424/reg_kitchen_package"}}},1912:function(t){t.exports={hisenseHubspotStyles:'\n    form.hs-form {\n        width: 100% !important;\n        align-self: center;\n    }\n    .hs-form fieldset {\n        max-width: 100% !important;\n    }\n    .hs-form-field {\n        display: flex;\n        flex-direction: column;\n        margin-bottom: 16px;\n        color: #525454;\n        font-family: wfont_744d4e_73608e814da149c7967360c8d58ca60c, wf_73608e814da149c7967360c8d, orig_hisense_alfabet_light;\n        font-size: 16px;\n        padding-bottom: 10px;\n    }\n    .hs-input {\n        width: 100% !important;\n        height: 46px;\n        padding: 10px;\n        border: 1px solid #525454;\n        border-radius: 5px;\n        font-size: 16px;\n        font-family: wfont_744d4e_73608e814da149c7967360c8d58ca60c, wf_73608e814da149c7967360c8d, orig_hisense_alfabet_light;\n        margin-top: 5px;\n    }\n\n    .hs-input[type="file"] {\n        height: 140px;\n    }\n\n    .hs-input[type="checkbox"] {\n        width: 17px !important;\n        height: 17px !important;\n        cursor: pointer;\n        \n    }\n\n    .hs-input[type="checkbox"]:checked {\n        accent-color: rgb(0, 102, 100) !important;\n        color: white;\n    }\n\n    .hs-input is-placeholder {\n        font-family: wfont_744d4e_73608e814da149c7967360c8d58ca60c, wf_73608e814da149c7967360c8d, orig_hisense_alfabet_light;\n        font-size: 16px;\n    }\n\n    .hs-error-msgs {\n        color: red;\n        font-family: wfont_744d4e_73608e814da149c7967360c8d58ca60c, wf_73608e814da149c7967360c8d, orig_hisense_alfabet_light;\n        font-size: 16px;\n        margin-top: 10px;\n    }\n\n    .hs-button {\n        background-color: rgb(0, 102, 100);\n        color: white;\n        border: none;\n        padding: 10px 60px;\n        border-radius: 300px;\n        cursor: pointer;\n        font-family: wfont_d9cde4_dea7f99b83cb4e2d9c5c438fb7ce4582, wf_dea7f99b83cb4e2d9c5c438fb, orig_hisense_alfabet_medium;\n        font-size: 20px;\n        transition: background-color 0.3s ease;\n        position: absolute;\n        left: 50%;\n        transform: translateX(-50%);\n    }\n\n    .hs-button:hover {\n        background-color: #103A42;\n    }\n\n    .hs-main-font-element h3 {\n        font-family: wfont_744d4e_73608e814da149c7967360c8d58ca60c, wf_73608e814da149c7967360c8d, orig_hisense_alfabet_light;\n        font-size: 24px;\n        padding-bottom: 5px;\n    }\n\n    .hs-main-font-element p {\n        font-family: wfont_744d4e_73608e814da149c7967360c8d58ca60c, wf_73608e814da149c7967360c8d, orig_hisense_alfabet_light;\n        font-size: 16px;\n        padding-bottom: 10px;\n    }\n\n    .hs-fieldtype-textarea {\n        min-height: 125px !important;\n    }\n\n    #receipt-b1ac2ab9-4518-4c6b-bfc7-2423f95656a2,\n    #receipt-044cb92d-6889-43ad-8338-5fcf364ddcb3,\n    #receipt-52a2a1dd-d566-4d78-b412-2a8791eab9c2,\n    #receipt-52a2a1dd-d566-4d78-b412-2a8791eab9c2,\n    #installation_location_photo-52a2a1dd-d566-4d78-b412-2a8791eab9c2 {\n        display: none;\n    }\n\n    label#label-receipt-b1ac2ab9-4518-4c6b-bfc7-2423f95656a2,\n    label#label-receipt-044cb92d-6889-43ad-8338-5fcf364ddcb3,\n    label#label-receipt-52a2a1dd-d566-4d78-b412-2a8791eab9c2 {\n        height: 46px;\n        display: flex;\n        padding: 10px 20px;\n        color: #006664;\n        background-color: white;\n        font-size: 16px;\n        border: 1px solid #525454;\n        cursor: pointer;\n        border-radius: 5px;\n        width: 100%;\n        justify-content: center; \n        align-items: center;\n        text-align: center; \n        gap: 5px;\n        box-sizing: border-box;\n    }\n\n    /* Style for the label */\n    label#label-receipt-044cb92d-6889-43ad-8338-5fcf364ddcb3,\n    label#label-receipt-b1ac2ab9-4518-4c6b-bfc7-2423f95656a2,\n    label#label-receipt-52a2a1dd-d566-4d78-b412-2a8791eab9c2,\n    label#label-installation_location_photo-52a2a1dd-d566-4d78-b412-2a8791eab9c2 {\n        height: 46px;\n        display: flex;\n        padding: 10px 20px;\n        color: #006664;\n        background-color: white;\n        font-size: 16px;\n        border: 1px solid #525454;\n        cursor: pointer;\n        border-radius: 5px;\n        width: 100%;\n        justify-content: center;\n        align-items: center;\n        text-align: center;\n        gap: 5px;\n        box-sizing: border-box;\n    }\n\n    /* Additional styling for the file input container */\n    .hs_receipt.hs-receipt.hs-fieldtype-file.field.hs-form-field {\n        display: flex;\n        flex-direction: column; /* Stack the text and label */\n        justify-content: center;\n        align-items: flex-start; /* Align the label to the left */\n        padding: 0px 10px 0px 0px;\n    }\n\n    #installation_location_photo-52a2a1dd-d566-4d78-b412-2a8791eab9c2 {\n        display: none; /* Hide the actual input */\n    }\n\n    /* Add the "Receipt" text before the label, outside the box */\n    .hs_installation_location_photo::before {\n        content: "Installation Location Photo*";\n        font-size: 16px;\n        color: #525454;\n        text-align: left;\n        width: 100%;\n        margin-bottom: 5px;\n        display: flex;\n        justify-content: left;\n        align-items: flex-start;\n    }\n\n    /* Add the "Receipt" text before the label, outside the box */\n    .hs_receipt.hs-receipt.hs-fieldtype-file.field.hs-form-field::before {\n        content: " Receipt photo*";\n        font-size: 16px;\n        color: #525454;\n        text-align: left;\n        width: 100%;\n        margin-bottom: 5px;\n        display: flex;\n        justify-content: left;\n        align-items: flex-start;\n    }\n\n\n    /* Additional styling for the file input container */\n    .hs_installation_location_photo hs-installation_location_photo hs-fieldtype-file field hs-form-field {\n        display: flex;\n        flex-direction: column; /* Stack the text and label */\n        justify-content: center;\n        align-items: flex-start; /* Align the label to the left */\n        padding: 0px 10px 0px 0px;\n    }\n\n\n\n    /* Responsive Fix: Reset Flexbox on Mobile */\n    @media screen and (max-width: 768px) {\n        fieldset.form-columns-2 {\n            display: block; /* Stack elements on mobile */\n            \n        }\n    }\n'}},6441:function(t,e,r){const{items:n}=r(8731);async function a(t,e={}){console.log("start query");let r=await t.find(e);console.log(`found items: ${r.items.length}`);const n=r.items;for(;r.hasNext();)r=await r.next(),n.push(...r.items);return console.log(`all items: ${n.length}`),n}t.exports={queryAllItems:a,getAllItems:async function(t){const e=n.query(t);return await a(e)}}},7311:function(t,e,r){const{location:n}=r(7597);t.exports={isElementExistOnPage:function(t){return!("object"!=typeof t||Array.isArray(t)||!t?.id)||!(!Array.isArray(t)||!t.length)},isProductPage:async function(){const t=await n.url();return t&&t.includes("product-page")}}},3317:function(t,e,r){const{successRateLogger:n}=r(5766);t.exports={attachHubspotFormReadyListener:function(t,e){e.forEach((e=>{n(e).requestStarted(),t(`#${e}`).on("hubspot-form-ready",(t=>{t.detail.isFormReady&&n(e).requestFinished()}))}))}}},4261:function(t,e,r){t.exports={...r(7311),...r(5766),...r(6626),...r(3984),...r(6441),...r(891),...r(1969),...r(3209),...r(3317),...r(2455),...r(7939),...r(6814)}},5766:function(t,e,r){t.exports={...r(3602),...r(6326)}},3602:function(t,e,r){const{site:n}=r(3514),{warmupData:a,rendering:i}=r(3910);function s(){return`debug-${Date.now().toString(36)}-${Math.random().toString(36).substring(2,10)}`}t.exports={createLogger:async function({backendLogger:t,browserLogger:e,GCPProjectId:r}){const o=await i.env(),c=(await n.currentPage()).name||"MISSING_PAGE_NAME",l="backend"===o?t:e,u=await async function(t){const e="uniqDebugId";if("backend"===t){const t=s();return await a.set(e,t),t}if("browser"===t){const t=await a.get(e);return t||s()}}(o),d=["log","warn","info","error"].reduce(((t,e)=>(t[e]=t=>l[e](`[${o}][${c}]: ${t}. ${u}`),t)),{}),h=`https://console.cloud.google.com/logs/query;query=resource.type%3D%22global%22%0ASEARCH%2528%22%60${u}%60%22%2529;duration=PT30M?inv=1&invt=AbmX2Q&project=${r}`;return d.debugLink=()=>d.log(h),d}}},6326:function(t){function e(t){return{requestStarted:()=>console.log(`${t} request started`),requestFinished:(e=!0,r)=>{const n=`${t} request finished`;e?console.log(n):(console.error(n),console.error(t,r))}}}t.exports={withSuccessRateLogs:async function(t,r){e(t).requestStarted();try{const n=await r();return e(t).requestFinished(!0),n}catch(r){throw e(t).requestFinished(!1,r),r}},successRateLogger:e}},3984:function(t,e,r){const{isElementExistOnPage:n}=r(7311);t.exports={handleSearchButtonClick:function(t){console.log("handleSearchButtonClick initialized");let e=!0;const r="menu",a="search",i=t(`#${a}`);if(!n(i))return void console.warn("Search button is not found on the page");let s;try{console.log("Trying to find #search element..."),console.log("$searchContainer:",i);const t=i?.children.find((t=>(console.log("Checking child in #searchContainer for SearchAppController:",t),"SearchAppController"===t.type)));console.log("searchAppController:",t),s=t?.children?.find((t=>(console.log("Checking child in SearchAppController for $w.SearchBox:",t),"$w.SearchBox"===t.type))),console.log("$searchInput:",s)}catch(t){console.error("Error while trying to access $searchInput:",t)}try{console.log("Attaching click event to #openSearchBtn"),t("#openSearchBtn").onClick((()=>{console.log("openSearchBtn clicked"),e=!e,console.log("isMenuOpen:",e);const n=e?r:a,i=e?"https://static.wixstatic.com/shapes/506473_5af368121c204fca971927005e5fcdb8.svg":"https://static.wixstatic.com/shapes/506473_f1e8066411784efbbfec265b078ae624.svg";console.log("Changing headerMsb state to:",n);try{t("#headerMsb").changeState(n)}catch(t){console.error("Error changing #headerMsb state:",t)}if(n===a)try{console.log("Focusing $searchInput"),s?.focus()}catch(t){console.error("Error focusing $searchInput:",t)}try{console.log("Changing openSearchBtn icon"),t("#openSearchBtn").icon=i}catch(t){console.error("Error changing #openSearchBtn icon:",t)}}))}catch(t){console.error("Error attaching click event to #openSearchBtn:",t)}}}},2455:function(t,e,r){const{location:n,queryParams:a}=r(7597),{session:i}=r(131);t.exports={handleParam:async function(t,e,r){const s=await n.url(),o=new URL(s).searchParams.get(t),c=await i.getItem(t);if((!o||!c)&&(o||c))if(!o||c)if(o||!c);else{a.queryParams().add({...r,[t]:c});const e=await n.url();n.to(e)}else await e(t,o)},setParamInSession:async function(t,e){await i.setItem(t,e),console.log(`${t} saved to session storage:`,e)}}},4675:function(t){t.exports={withDuration:async function(t,e,r){const n=Date.now(),a=await e();return r.log(`${t} duration: ${Date.now()-n}ms and in human readble format: ${(Date.now()-n)/1e3} s`),a}}},6626:function(t,e,r){t.exports={...r(6404),...r(4675)}},6404:function(t,e,r){const{rendering:n,warmupData:a}=r(3910);const i=new Map;t.exports={withMemoization:async function(t,e,r){if(i.has(t))return r(`found data in memoization for ${t}`),i.get(t);r(`no data found in memoization for ${t}, running function`);const n=await e();return i.set(t,n),n},withWarmUpData:async function(t,e,r){const i=e=>r(`withWarmUpData ${t}: ${e}`),s=Date.now();let o;const c=await n.env();if("backend"===c)i("running function"),o=await e(),i("saving data in warmup"),await a.set(t,o),i("data saved in warmup");else{if("browser"!==c)throw new Error(`Unknown rendering environment: ${c}`);{const r=await a.get(t);r?(i("found data in warmup"),o=r):(i("no warmup data found, running function"),o=await e())}}const l=Date.now()-s;return i("duration: "+l+"ms and in human readable format: "+(l/1e3).toFixed(2)+"s"),o}}},7939:function(t,e,r){const{location:n}=r(7597),{window:a}=r(3910),{handleParam:i,setParamInSession:s}=r(2455),{IS_QA_KEY:o}=r(6814);t.exports={handleBranchId:async function(){const t=await n.url(),e=new URL(t).searchParams.get(o);return await i("branchId",(async(t,r)=>{e?(console.log("QA environment detected. Branch ID will be set in session storage without opening the lightbox."),await s(t,r)):a.openLightbox("preview-version",{branchId:r})}),{siteRevision:"2"})}}},9286:function(t,e,r){const{items:n}=r(8731),{auth:a}=r(387),{COLLECTIONS:i}=r(3209),{queryAllItems:s,getAllItems:o}=r(6441),{withSuccessRateLogs:c}=r(6326);async function l({identifier:t,value:e,includeHiddenProducts:r=!1,includeCollections:n=!1}){const a=u({elevate:r,identifier:t,value:e,includeCollections:n}),{items:i}=await a.limit(1).find({omitTotalCount:!0,...r&&{appOptions:{includeHiddenProducts:!0}}});if(0!==i.length)return i[0];console.info("Product not found on this page")}function u({elevate:t=!1,identifier:e,value:r,includeCollections:s=!1}){const o=function(t,e=!1){return e?a.elevate(n.query)(t):n.query(t)}(i.STORE_PRODUCTS,t);let c=o.eq(e,r);return s&&(c=c.include("collections")),c}async function d(t,e=!1){const r=await n.query(i.CMS_PRODUCTS).limit(2).eq("storeProduct",t._id).include("storeSiblings","supportDocuments").find({omitTotalCount:!0}),a=`Found ${r.items.length} products in CMS with storeProduct ${t._id}. Expected exactly 1 matching product.`;if(0===r.items.length){if(!e)throw new Error(a);console.warn(a)}if(r.items.length>=2)throw new Error(a);return r.items[0]}async function h(t,e=!1){const r=await l({identifier:"slug",value:t});if(!r)throw new Error(`Product with slug ${t} doesn't exist`);const n=await d(r,e);return{product:r,productInCMS:n,siblings:n.storeSiblings}}async function p(t){return(await n.get(i.STORE_PRODUCTS,t.data.storeProductId)).slug}async function m(t){const e=await n.query(i.COMPILED_PRODUCTS).eq("slug",t).limit(2).find({omitTotalCount:!0});if(e.items.length>1)throw new Error(`More than one compiled product found for slug ${t}`);return e.items[0]}async function f(t,e=!1){const r={slug:t,ProductData:await h(t,e)},a=await m(t);a&&(r._id=a._id),await n.save(i.COMPILED_PRODUCTS,r)}async function p(t){return(await n.get(i.STORE_PRODUCTS,t.data.storeProductId)).slug}t.exports={getStoresBaseQuery:u,getStoresProduct:(...t)=>c("getStoresProduct",(()=>l(...t))),getProductInCMSByProductInStores:(...t)=>c("getProductInCMSByProductInStores",(()=>d(...t))),getProductInCMS:(...t)=>c("getProductInCMS",(()=>async function({identifier:t,value:e,includeHiddenProducts:r=!1,includeCollections:n=!1},a=!0){const i=await l({identifier:t,value:e,includeHiddenProducts:r,includeCollections:n});if(!i){if(a)throw new Error(`Product with identifier ${e} doesn't exist , args: ${JSON.stringify(arguments)}`);return null}return{productInCMS:await d(i),product:i}}(...t))),getStoreProductByIds:(...t)=>c("getStoreProductByIds",(()=>async function(t){return(await n.query(i.STORE_PRODUCTS).hasSome("_id",t).find({omitTotalCount:!0})).items}(...t))),getDataBySlug:(...t)=>c("getDataBySlug",(()=>h(...t))),getSpecsOfProduct:(...t)=>c("getSpecsOfProduct",(()=>function(t){return n.query(i.SPECS).eq("product",t).limit(1e3).find({omitTotalCount:!0})}(...t))),getCompiledDataBySlug:(...t)=>c("getCompiledDataBySlug",(()=>async function(t){const e=await n.query(i.COMPILED_PRODUCTS).eq("slug",t).find();if(e.items.length>0)return e.items[0].ProductData}(...t))),getAllPhysicalProducts:(...t)=>c("getAllPhysicalProducts",(()=>async function(){const t=n.query(i.STORE_PRODUCTS).eq("productType","physical");return await s(t)}(...t))),getSlug:(...t)=>c("getSlug",(()=>p(...t))),getSlugAndProductId:(...t)=>c("getSlugAndProductId",(()=>async function(t){let e=null;return t.data.storeProductId&&(e=await p(t)),{slug:e,productId:t.data.productId}}(...t))),refreshDataBySlug:(...t)=>c("refreshDataBySlug",(()=>f(...t))),deleteCompiledProductBySlug:(...t)=>c("deleteCompiledProductBySlug",(()=>async function(t){const e=await m(t);e&&await n.remove(i.COMPILED_PRODUCTS,e._id)}(...t))),fillCompiledProduct:(...t)=>c("fillCompiledProduct",(()=>async function(){const t=await o(i.STORE_PRODUCTS);let e=0;for(const r of t){const n=r.slug;try{await f(n),console.log(`updated data for slug: ${n}. Progress: ${++e}/${t.length}`)}catch(t){console.error(`Failed to refresh data for slug: ${n}`,t)}}}(...t)))}},891:function(t,e,r){t.exports={...r(1602),...r(8418),...r(9286)}},1602:function(t,e,r){const{location:n}=r(7597),{seo:a}=r(6785),{site:i}=r(3514),{window:s}=r(3910),{isElementExistOnPage:o}=r(7311),{withSuccessRateLogs:c}=r(5766),{withWarmUpData:l,withMemoization:u}=r(6626),{logUrlPath:d}=r(7121),{getDataBySlug:h,getCompiledDataBySlug:p,getSpecsOfProduct:m}=r(9286),{isKitchenPackage:f,getProductColor:g}=r(8418),v="/support/",E={slug:""};t.exports={renderProduct:async function(t,e,r=!1){async function p(e,r,n){f(e.name)?(t("#SKUText").hide(),t("#description").show(),t("#description").html=e.description):(o(t("#description"))&&t("#description").hide(),await async function(e,r){const n=t("#productSpecification");await n.hide(),"function"==typeof n.collapse?n.collapse():console.error(`productSpecification ${n} is not a collapsible element!!`);const a=t("#productSpecificationBtn");a.label="Full Specs",a.onClick((()=>S(e,r)))}(r,n))}async function y(e,r){const n=t("#productSpecification"),a=await u("getGroupedSpecsOfProduct",(()=>async function(t){const e=(await m(t._id)).items;if(0===e.length)return[];(function(t){const e=["details","subheader","termOrder","term","subheaderOrder"];t.forEach(((t,r)=>{e.forEach((e=>{if(!t[e]&&0!==t[e])throw new Error(`Validation Error: Missing or invalid "${e}" in spec at index ${r}`)}))}))})(e),e.sort(((t,e)=>t.subheaderOrder-e.subheaderOrder));return function(t){const e=t.reduce(((t,e)=>{const{subheader:r,subheaderOrder:n}=e;return t[r]=n,t}),{}),r=t.reduce(((t,e)=>{const{subheader:r,term:n,details:a,termOrder:i}=e;return t[r]||(t[r]={title:r,items:[]}),t[r].items.push({title:n,value:a,termOrder:i}),t[r].items.sort(((t,e)=>t.termOrder-e.termOrder)),t}),{});return Object.values(r).sort(((t,r)=>e[t.title]-e[r.title]))}(e)}(e)),r);0!==a.length&&(n.items=a)}d(),E.slug=(await n.path()).pop(),e.log(`rendering product with slug: ${E.slug}`),await async function(e,u){const{log:d,warn:m}=u,f=(...t)=>c("getDataBySlugOptimized",(()=>async function(t,e){0;e.log(`no compiled data found for slug: ${t}`);return await l("getDataBySlug using NPM",(()=>h(t)),e.log)}(...t)));let y,b,P;try{({product:y,productInCMS:b,siblings:P}=await f(e,u))}catch(t){if(t.message.includes(`Product with slug ${e} doesn't exist`)){const[t,e]=await Promise.all([n.baseUrl(),n.query()]),r=new URL(`${t}/404`);T(r,e),console.log("navigating to:",r.toString()),await n.to(r.toString())}throw t}const _=y.sku;if(!_)throw new Error("Product SKU not found");[{selector:"#SKUText",property:"text",value:_},{selector:"#title",property:"text",value:y.name},{selector:"#productProGallery",property:"items",value:y.mediaItems},{selector:"#productSku",property:"text",value:_},{selector:"#colorOptionText",property:"text",value:y.productOptions?.Color?.choices[0]?.description}].forEach((({selector:e,property:r,value:n})=>{o(t(e))&&(t(e)[r]=n)})),(()=>{const e=y.ribbon,r=t("#ribbonBox"),n=t("#ribbonText");o(r)&&o(n)?e?n.text=e:r.delete():m("[handleRibbon]: Ribbon Elements not found!")})(),[t("#psBtnWidget0"),t("#psBtnWidget1"),t("#psBtnWidget2")].forEach(((t,e)=>{if(o(t)){const r=t.id.endsWith("0")?"1":`${e}`;t.setAttribute("design-preset",r),t.setAttribute("ps-sku",_),t.setAttribute("class","ps-widget")}})),function(e,r,n){(function(e,r){const n=t("#navigateToSpecs"),a=t("#productSpecificationSection");a.rendered&&a.isVisible||("function"==typeof n.collapse?n.collapse():console.error(`navigateToSpecsBtn ${n} is not a collapsible element!!`));n.onClick((async()=>{await S(e,r)}))})(r,n),function(){const e=t("#navigateToOverview");o(e)&&e.onClick((()=>{s.scrollTo(0,0)}))}(),function(e){const r=t("#navigateToSupport");o(r)&&(r.link=`/support/${e}`)}(e),function(){if(o(t("#readyToBuySection"))){const e=()=>t("#readyToBuySection").scrollTo();o(t("#whereToBuy"))&&t("#whereToBuy").onClick(e),o(t("#whereToBuyFromLinksMenu"))&&t("#whereToBuyFromLinksMenu").onClick(e)}}()}(y.slug,b,d),function(e,r){if(!t("#resourcesRepeater").rendered)return void r("[handleResources] Repeater not found");const n=e.supportDocuments||[];n.push(`/support/${E.slug}`),t("#resourcesRepeater").onItemReady(((t,e)=>{const r=e.link;t("#singleResourceButton").label=r.startsWith(v)?"Support":decodeURIComponent(r.split("/").pop()),t("#singleResourceButton").link=r,t("#singleResourceButton").target=r.startsWith(v)?"_self":"_blank"})),t("#resourcesRepeater").data=n.map(((t,e)=>({link:t,_id:e.toString()})))}(b,m),function({siblings:e,product:a,logger:i}){const{info:s}=i;if(0===e.length)return s("No siblings found for product"),void(o(t("#sizesBox"))&&("function"==typeof t("#sizesBox").collapse?t("#sizesBox").collapse():console.error(`sizesBox ${t("#sizesBox")} is not a collapsible element!!`)));const c=e.findIndex((t=>t._id===a._id));a.isCurrentProduct=!0,-1!==c?e[c]=a:e.push(a);const l=t=>{const e=t=>{const e=t?.match(/\d+/);return e?e[0]:null};return(t=>t?t.trim():null)(e(t))};(e=e.filter((t=>"object"==typeof t&&null!==t))).sort(((t,e)=>{const r=g(t),n=g(e);if(r&&n)return r.localeCompare(n);const a=l(t.name),i=l(e.name);return parseInt(a)-parseInt(i)})),t("#sizesRpt").onItemReady(((e,a)=>{const i=l(a.name);if(e("#sizeBtn").label=`${i}"`,r?e("#sizeBtn").onClick((async()=>{const[t,e,r]=await Promise.all([n.baseUrl(),n.path(),n.query()]),i=new URL(`${t}/${e[0]}/${a.slug}`);T(i,r),n.to(i.toString())})):e("#sizeBtn").link=`/product-page/${a.slug}`,o(t("#colorOptionText"))){const t=g(a);t&&(e("#sizeBtn").style.backgroundColor=t.toLowerCase(),e("#sizeBtn").style.hover.backgroundColor=t.toLowerCase(),e("#sizeBtn").style.disabled.backgroundColor=t.toLowerCase())}a.isCurrentProduct&&e("#sizeBtn").disable()})),t("#sizesRpt").data=e,t("#sizesBox").expand()}({siblings:P,product:y,productInCMS:b,logger:u});await Promise.allSettled([((...t)=>c("handleSEO",(()=>async function(t){const e=`${t.name} | ${await i.getSiteDisplayName()}`;await Promise.all([a.setTitle(e),a.setMetaTags([{property:"og:title",content:e},{name:"twitter:title",content:e}])])}(...t))))(y),p(y,b,d)])}(E.slug,e);let b=!0;async function S(e,r){const n=t("#productSpecificationSection"),a=t("#productSpecification"),i=t("#productSpecificationBtn"),s={direction:"top",duration:300};b?(y(e,r),i.label="Hide Specs",a.expand(),a.show("roll",s),n.scrollTo()):(i.label="Full Specs",await a.hide("roll",s),"function"==typeof a.collapse?a.collapse():console.error(`productSpecification ${a} is not a collapsible element!!`),n.scrollTo()),b=!b}function T(t,e){e&&Object.entries(e).forEach((([e,r])=>{t.searchParams.append(e,r)}))}}}},8418:function(t){t.exports={isKitchenPackage:t=>t&&t.length>0&&t.includes("Kitchen Package"),checkProductContent:function(t){return{hasImage1:Boolean(t.image1WithHeightAndWidth),hasImage2:Boolean(t.image2WithHeightAndWidth),hasImage3:Boolean(t.image3WithHeightAndWidth),hasMobileImage1:Boolean(t.mobileImage1Override),hasMobileImage2:Boolean(t.mobileImage2Override),hasMobileImage3:Boolean(t.mobileImage3Override),hasFirstRichTextContent:Boolean(t.richTextContent),hasSecondRichTextContent:Boolean(t.secondRichTextContent),hasThirdRichTextContent:Boolean(t.thirdRichTextContent),hasMainVideo:Boolean(t.vimeoLink)||Boolean(t.mainVideo),hasGallery:Boolean(t.gallery&&t.gallery.length>0)}},isWarrantyProduct:function(t){return t&&t.includes("years")},getProductColor:function(t){return t.productOptions?.Color?.choices[0]?.description}}},6814:function(t,e,r){const{handleParam:n,setParamInSession:a}=r(2455),i="isqa";t.exports={handleIsqa:async function(){return await n(i,((t,e)=>{console.log("isqa will be set in session storage."),a(t,e)}),{})},IS_QA_KEY:i}},7121:function(t,e,r){const{location:n}=r(7597);t.exports={logUrlPath:async function(){const t=await n.path();console.log(`path is:  ${t}`)},getSiteUrl:async function(){return await n.url()}}},1733:function(t,e,r){t.exports={...r(3846)}},3846:function(t){t.exports={getString:function(){return"expected value"}}},6260:function(t,e,r){"use strict";var n,a=Object.defineProperty,i=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyNames,o=Object.prototype.hasOwnProperty,c={};((t,e)=>{for(var r in e)a(t,r,{get:e[r],enumerable:!0})})(c,{RestorationStatus:()=>A,Status:()=>R,Type:()=>N,WebhookIdentityType:()=>C,createBackup:()=>j,deleteBackup:()=>G,listBackups:()=>H,listRestorations:()=>V,onBackupRestorationStateChanged:()=>Y,onBackupStateChanged:()=>W,restoreBackup:()=>K,restorePartialBackup:()=>q}),t.exports=(n=c,((t,e,r,n)=>{if(e&&"object"==typeof e||"function"==typeof e)for(let c of s(e))o.call(t,c)||c===r||a(t,c,{get:()=>e[c],enumerable:!(n=i(e,c))||n.enumerable});return t})(a({},"__esModule",{value:!0}),n));var l=r(9566),u=r(1365),d=r(4615),h=r(3251),p=r(9914),m=r(9566),f=r(7512),g=r(1365),v=r(4615),E=r(7512);function y(t){return(0,E.resolveUrl)(Object.assign(t,{domainToMappings:{"www._base_domain_":[{srcPath:"/_api/data/backups",destPath:"/api/v1/backups"},{srcPath:"/_api/data/v2/backups",destPath:"/v2/backups"}],"manage._base_domain_":[{srcPath:"/_api/data/backups",destPath:"/api/v1/backups"},{srcPath:"/_api/data/v2/backups",destPath:"/v2/backups"}],"editor._base_domain_":[{srcPath:"/_api/data/backups",destPath:"/api/v1/backups"},{srcPath:"/_api/data/v2/backups",destPath:"/v2/backups"}],"blocks._base_domain_":[{srcPath:"/_api/data/backups",destPath:"/api/v1/backups"},{srcPath:"/_api/data/v2/backups",destPath:"/v2/backups"}],"create.editorx":[{srcPath:"/_api/data/backups",destPath:"/api/v1/backups"},{srcPath:"/_api/data/v2/backups",destPath:"/v2/backups"}],"www.wixapis.com":[{srcPath:"/wix-data/v1/backups",destPath:"/api/v1/backups"},{srcPath:"/wix-data/v2/backups",destPath:"/v2/backups"}],"*.dev.wix-code.com":[{srcPath:"/data/v2/backups",destPath:"/v2/backups"},{srcPath:"/_api/data/backups",destPath:"/api/v1/backups"}],_:[{srcPath:"/data/v2/backups",destPath:"/v2/backups"},{srcPath:"/_api/data/backups",destPath:"/api/v1/backups"}]}}))}var b="@wix/auto_sdk_data_backups";function S(t){return function({host:e}){return{entityFqdn:"wix.data.v2.backup",method:"POST",methodFqn:"com.wixpress.dstore.api.backup.v2.BackupService.CreateBackup",packageName:b,url:y({protoPath:"/v2/backups",data:t,host:e}),data:t,transformResponse:t=>(0,v.transformPaths)(t,[{transformFn:g.transformRESTTimestampToSDKTimestamp,paths:[{path:"backup.requestedDate"},{path:"backup.startedDate"},{path:"backup.finishedDate"},{path:"backup.deletedDate"}]}])}}}function T(t){return function({host:e}){return{entityFqdn:"wix.data.v2.backup",method:"GET",methodFqn:"com.wixpress.dstore.api.backup.v2.BackupService.ListBackups",packageName:b,url:y({protoPath:"/v2/backups",data:t,host:e}),params:(0,f.toURLSearchParams)(t),transformResponse:t=>(0,v.transformPaths)(t,[{transformFn:g.transformRESTTimestampToSDKTimestamp,paths:[{path:"backups.requestedDate"},{path:"backups.startedDate"},{path:"backups.finishedDate"},{path:"backups.deletedDate"}]}])}}}function P(t){return function({host:e}){return{entityFqdn:"wix.data.v2.backup",method:"POST",methodFqn:"com.wixpress.dstore.api.backup.v2.BackupService.RestoreBackup",packageName:b,url:y({protoPath:"/v2/backups/{backupId}/restore",data:t,host:e}),data:t,transformResponse:t=>(0,v.transformPaths)(t,[{transformFn:g.transformRESTTimestampToSDKTimestamp,paths:[{path:"restoration.requestedDate"},{path:"restoration.startedDate"},{path:"restoration.finishedDate"},{path:"restoration.backup.requestedDate"},{path:"restoration.backup.startedDate"},{path:"restoration.backup.finishedDate"},{path:"restoration.backup.deletedDate"}]}])}}}function _(t){return function({host:e}){return{entityFqdn:"wix.data.v2.backup",method:"POST",methodFqn:"com.wixpress.dstore.api.backup.v2.BackupService.RestorePartialBackup",packageName:b,url:y({protoPath:"/v2/backups/{backupId}/partial-restore",data:t,host:e}),data:t,transformResponse:t=>(0,v.transformPaths)(t,[{transformFn:g.transformRESTTimestampToSDKTimestamp,paths:[{path:"restoration.requestedDate"},{path:"restoration.startedDate"},{path:"restoration.finishedDate"},{path:"restoration.backup.requestedDate"},{path:"restoration.backup.startedDate"},{path:"restoration.backup.finishedDate"},{path:"restoration.backup.deletedDate"}]}])}}}function I(t){return function({host:e}){return{entityFqdn:"wix.data.v2.backup",method:"GET",methodFqn:"com.wixpress.dstore.api.backup.v2.BackupService.ListRestorations",packageName:b,url:y({protoPath:"/v2/backups/restorations",data:t,host:e}),params:(0,f.toURLSearchParams)(t),transformResponse:t=>(0,v.transformPaths)(t,[{transformFn:g.transformRESTTimestampToSDKTimestamp,paths:[{path:"restorations.requestedDate"},{path:"restorations.startedDate"},{path:"restorations.finishedDate"},{path:"restorations.backup.requestedDate"},{path:"restorations.backup.startedDate"},{path:"restorations.backup.finishedDate"},{path:"restorations.backup.deletedDate"}]}])}}}function w(t){return function({host:e}){return{entityFqdn:"wix.data.v2.backup",method:"DELETE",methodFqn:"com.wixpress.dstore.api.backup.v2.BackupService.DeleteBackup",packageName:b,url:y({protoPath:"/v2/backups/{backupId}",data:t,host:e}),params:(0,f.toURLSearchParams)(t)}}}var R=(t=>(t.PENDING="PENDING",t.READY="READY",t.FAILED="FAILED",t.DELETED="DELETED",t.CANCELED="CANCELED",t))(R||{}),N=(t=>(t.ON_DEMAND="ON_DEMAND",t.AUTO="AUTO",t))(N||{}),A=(t=>(t.PENDING="PENDING",t.COMPLETED="COMPLETED",t.FAILED="FAILED",t))(A||{}),C=(t=>(t.UNKNOWN="UNKNOWN",t.ANONYMOUS_VISITOR="ANONYMOUS_VISITOR",t.MEMBER="MEMBER",t.WIX_USER="WIX_USER",t.APP="APP",t))(C||{});function x(t){return()=>async function(){const{httpClient:t,sideEffects:e}=arguments[0],r=S((0,m.renameKeysFromSDKRequestToRESTRequest)({}));e?.onSiteCall?.();try{const n=await t.request(r);return e?.onSuccess?.(n),(0,m.renameKeysFromRESTResponseToSDKResponse)(n.data)}catch(t){const r=(0,p.transformError)(t,{spreadPathsToArguments:{},explicitPathsToArguments:{},singleArgumentUnchanged:!1},[]);throw e?.onError?.(t),r}}({httpClient:t})}function O(t){return e=>async function(t){const{httpClient:e,sideEffects:r}=arguments[1],n=T((0,m.renameKeysFromSDKRequestToRESTRequest)({status:t?.status,type:t?.type,paging:t?.paging}));r?.onSiteCall?.();try{const t=await e.request(n);return r?.onSuccess?.(t),(0,m.renameKeysFromRESTResponseToSDKResponse)(t.data)}catch(t){const e=(0,p.transformError)(t,{spreadPathsToArguments:{},explicitPathsToArguments:{status:"$[0].status",type:"$[0].type",paging:"$[0].paging"},singleArgumentUnchanged:!1},["options"]);throw r?.onError?.(t),e}}(e,{httpClient:t})}function D(t){return e=>async function(t){const{httpClient:e,sideEffects:r}=arguments[1],n=P((0,m.renameKeysFromSDKRequestToRESTRequest)({backupId:t}));r?.onSiteCall?.();try{const t=await e.request(n);return r?.onSuccess?.(t),(0,m.renameKeysFromRESTResponseToSDKResponse)(t.data)}catch(t){const e=(0,p.transformError)(t,{spreadPathsToArguments:{},explicitPathsToArguments:{backupId:"$[0]"},singleArgumentUnchanged:!1},["backupId"]);throw r?.onError?.(t),e}}(e,{httpClient:t})}function k(t){return(e,r)=>async function(t,e){const{httpClient:r,sideEffects:n}=arguments[2],a=_((0,m.renameKeysFromSDKRequestToRESTRequest)({backupId:t,restorationCollections:e}));n?.onSiteCall?.();try{const t=await r.request(a);return n?.onSuccess?.(t),(0,m.renameKeysFromRESTResponseToSDKResponse)(t.data)}catch(t){const e=(0,p.transformError)(t,{spreadPathsToArguments:{},explicitPathsToArguments:{backupId:"$[0]",restorationCollections:"$[1]"},singleArgumentUnchanged:!1},["backupId","restorationCollections"]);throw n?.onError?.(t),e}}(e,r,{httpClient:t})}function M(t){return e=>async function(t){const{httpClient:e,sideEffects:r}=arguments[1],n=I((0,m.renameKeysFromSDKRequestToRESTRequest)({status:t?.status,paging:t?.paging}));r?.onSiteCall?.();try{const t=await e.request(n);return r?.onSuccess?.(t),(0,m.renameKeysFromRESTResponseToSDKResponse)(t.data)}catch(t){const e=(0,p.transformError)(t,{spreadPathsToArguments:{},explicitPathsToArguments:{status:"$[0].status",paging:"$[0].paging"},singleArgumentUnchanged:!1},["options"]);throw r?.onError?.(t),e}}(e,{httpClient:t})}function L(t){return e=>async function(t){const{httpClient:e,sideEffects:r}=arguments[1],n=w((0,m.renameKeysFromSDKRequestToRESTRequest)({backupId:t}));r?.onSiteCall?.();try{const t=await e.request(n);r?.onSuccess?.(t)}catch(t){const e=(0,p.transformError)(t,{spreadPathsToArguments:{},explicitPathsToArguments:{backupId:"$[0]"},singleArgumentUnchanged:!1},["backupId"]);throw r?.onError?.(t),e}}(e,{httpClient:t})}var F=(0,h.EventDefinition)("wix.data.v2.backup_backup_state_changed",!0,(t=>(0,l.renameKeysFromRESTResponseToSDKResponse)((0,d.transformPaths)(t,[{transformFn:u.transformRESTTimestampToSDKTimestamp,paths:[{path:"data.backup.requestedDate"},{path:"data.backup.startedDate"},{path:"data.backup.finishedDate"},{path:"data.backup.deletedDate"},{path:"metadata.eventTime"}]}]))))(),U=(0,h.EventDefinition)("wix.data.v2.backup_restoration_state_changed",!0,(t=>(0,l.renameKeysFromRESTResponseToSDKResponse)((0,d.transformPaths)(t,[{transformFn:u.transformRESTTimestampToSDKTimestamp,paths:[{path:"data.restoration.requestedDate"},{path:"data.restoration.startedDate"},{path:"data.restoration.finishedDate"},{path:"data.restoration.backup.requestedDate"},{path:"data.restoration.backup.startedDate"},{path:"data.restoration.backup.finishedDate"},{path:"data.restoration.backup.deletedDate"},{path:"metadata.eventTime"}]}]))))(),B=r(7512),$=r(5097),j=(0,B.createRESTModule)(x),H=(0,B.createRESTModule)(O),K=(0,B.createRESTModule)(D),q=(0,B.createRESTModule)(k),V=(0,B.createRESTModule)(M),G=(0,B.createRESTModule)(L),W=(0,$.createEventModule)(F),Y=(0,$.createEventModule)(U)},3799:function(t,e,r){"use strict";var n,a=Object.defineProperty,i=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyNames,o=Object.prototype.hasOwnProperty,c={};((t,e)=>{for(var r in e)a(t,r,{get:e[r],enumerable:!0})})(c,{AccessLevel:()=>j,CollectionOperation:()=>O,CollectionType:()=>A,DataOperation:()=>x,Direction:()=>C,FieldPluginType:()=>M,Format:()=>U,IndexSource:()=>G,IndexStatus:()=>V,Order:()=>q,PagingMode:()=>$,PluginType:()=>B,QueryOperator:()=>k,Role:()=>L,Segment:()=>H,SortOrder:()=>K,Status:()=>F,Type:()=>D,WebhookIdentityType:()=>W,createDataCollection:()=>at,createDataCollectionField:()=>ut,deleteDataCollection:()=>ct,deleteDataCollectionField:()=>ht,getDataCollection:()=>it,listDataCollections:()=>st,restoreDataCollection:()=>lt,updateDataCollection:()=>ot,updateDataCollectionField:()=>dt}),t.exports=(n=c,((t,e,r,n)=>{if(e&&"object"==typeof e||"function"==typeof e)for(let c of s(e))o.call(t,c)||c===r||a(t,c,{get:()=>e[c],enumerable:!(n=i(e,c))||n.enumerable});return t})(a({},"__esModule",{value:!0}),n));var l=r(9914),u=r(9566),d=r(7512),h=r(3181),p=r(3181),m=r(1365),f=r(1365),g=r(4615),v=r(7512);function E(t){return(0,v.resolveUrl)(Object.assign(t,{domainToMappings:{"api._api_base_domain_":[{srcPath:"/cloud-data",destPath:""}],"code._base_domain_":[{srcPath:"/_api/cloud-data/v1/data-settings",destPath:"/v1/data-settings"},{srcPath:"/_api/cloud-data/v1/schemas",destPath:"/v1/schemas"},{srcPath:"/_api/cloud-data/v1/connector",destPath:"/v1/connector"},{srcPath:"/_api/data/v1/data-settings",destPath:"/v1/data-settings"},{srcPath:"/_api/data/v1/schemas",destPath:"/v1/schemas"},{srcPath:"/_api/data/v1/connector",destPath:"/v1/connector"},{srcPath:"/_api/cloud-data/v1/wix-data",destPath:"/v1/wix-data"}],"cloud-data.wix-code.com":[{srcPath:"",destPath:""}],_:[{srcPath:"/_api/cloud-data",destPath:""}],"www._base_domain_":[{srcPath:"/_api/cloud-data",destPath:""},{srcPath:"/_api/data",destPath:""},{srcPath:"/_api/cloud-data",destPath:""}],"dev._base_domain_":[{srcPath:"/_api/cloud-data",destPath:""}],"bo._base_domain_":[{srcPath:"/_api/cloud-data/v1",destPath:"/v1"},{srcPath:"/_api/cloud-data/v2",destPath:"/v2"}],"wixbo.ai":[{srcPath:"/_api/cloud-data/v1",destPath:"/v1"},{srcPath:"/_api/cloud-data/v2",destPath:"/v2"}],"wix-bo.com":[{srcPath:"/_api/cloud-data/v1",destPath:"/v1"},{srcPath:"/_api/cloud-data/v2",destPath:"/v2"}],"manage._base_domain_":[{srcPath:"/_api/cloud-data",destPath:""},{srcPath:"/_api/data",destPath:""},{srcPath:"/_api/cloud-data",destPath:""}],"editor._base_domain_":[{srcPath:"/_api/cloud-data/v1/schemas",destPath:"/v1/schemas"},{srcPath:"/_api/cloud-data/dbs/tasks",destPath:"/dbs/tasks"},{srcPath:"/_api/data/v1/schemas",destPath:"/v1/schemas"},{srcPath:"/_api/data/dbs/tasks",destPath:"/dbs/tasks"},{srcPath:"/_api/cloud-data/v1/wix-data",destPath:"/v1/wix-data"},{srcPath:"/_api/cloud-data/v1/data-settings",destPath:"/v1/data-settings"},{srcPath:"/_api/data/v2/indexes",destPath:"/v2/indexes"},{srcPath:"/_api/cloud-data/v1/external-database-connections",destPath:"/v1/external-database-connections"},{srcPath:"/_api/data/v1/data-collection-sharing",destPath:"/v1/data-collection-sharing"},{srcPath:"/_api/cloud-data/v2/collections",destPath:"/v2/collections"},{srcPath:"/_api/cloud-data/v2/bulk",destPath:"/v2/bulk"},{srcPath:"/_api/cloud-data/v2/items",destPath:"/v2/items"},{srcPath:"/_api/cloud-data/v2/dbs/tasks",destPath:"/v2/dbs/tasks"}],"blocks._base_domain_":[{srcPath:"/_api/cloud-data/v1/schemas",destPath:"/v1/schemas"},{srcPath:"/_api/cloud-data/dbs/tasks",destPath:"/dbs/tasks"},{srcPath:"/_api/data/v1/schemas",destPath:"/v1/schemas"},{srcPath:"/_api/data/dbs/tasks",destPath:"/dbs/tasks"},{srcPath:"/_api/cloud-data/v1/wix-data",destPath:"/v1/wix-data"},{srcPath:"/_api/cloud-data/v1/data-settings",destPath:"/v1/data-settings"},{srcPath:"/_api/data/v2/indexes",destPath:"/v2/indexes"},{srcPath:"/_api/cloud-data/v1/external-database-connections",destPath:"/v1/external-database-connections"},{srcPath:"/_api/data/v1/data-collection-sharing",destPath:"/v1/data-collection-sharing"},{srcPath:"/_api/cloud-data/v2/collections",destPath:"/v2/collections"},{srcPath:"/_api/cloud-data/v2/bulk",destPath:"/v2/bulk"},{srcPath:"/_api/cloud-data/v2/items",destPath:"/v2/items"},{srcPath:"/_api/cloud-data/v2/dbs/tasks",destPath:"/v2/dbs/tasks"}],"create.editorx":[{srcPath:"/_api/cloud-data/v1/schemas",destPath:"/v1/schemas"},{srcPath:"/_api/cloud-data/dbs/tasks",destPath:"/dbs/tasks"},{srcPath:"/_api/data/v1/schemas",destPath:"/v1/schemas"},{srcPath:"/_api/data/dbs/tasks",destPath:"/dbs/tasks"},{srcPath:"/_api/cloud-data/v1/wix-data",destPath:"/v1/wix-data"},{srcPath:"/_api/cloud-data/v1/data-settings",destPath:"/v1/data-settings"},{srcPath:"/_api/data/v2/indexes",destPath:"/v2/indexes"},{srcPath:"/_api/cloud-data/v1/external-database-connections",destPath:"/v1/external-database-connections"},{srcPath:"/_api/data/v1/data-collection-sharing",destPath:"/v1/data-collection-sharing"},{srcPath:"/_api/cloud-data/v2/collections",destPath:"/v2/collections"},{srcPath:"/_api/cloud-data/v2/bulk",destPath:"/v2/bulk"},{srcPath:"/_api/cloud-data/v2/items",destPath:"/v2/items"},{srcPath:"/_api/cloud-data/v2/dbs/tasks",destPath:"/v2/dbs/tasks"}],"www.wixapis.com":[{srcPath:"/wix-data/v1/collections",destPath:"/v1/wix-data/collections"},{srcPath:"/wix-data/v1/external-database-connections",destPath:"/v1/external-database-connections"},{srcPath:"/wix-data/v2/indexes",destPath:"/v2/indexes"},{srcPath:"/wix-data/v1/items",destPath:"/v1/items"},{srcPath:"/wix-data/v1/bulk",destPath:"/v1/bulk"},{srcPath:"/wix-data/v1/external-databases",destPath:"/v1/external-databases"},{srcPath:"/wix-data/v2",destPath:"/v2"}],"www.wixgateway.com":[{srcPath:"/wix-data/v1/items",destPath:"/v1/items"},{srcPath:"/wix-data/v1/bulk",destPath:"/v1/bulk"}],"*.dev.wix-code.com":[{srcPath:"/_api/cloud-data/v2",destPath:"/v2"},{srcPath:"/_api/cloud-data/v1/external-database-connections",destPath:"/v1/external-database-connections"}]}}))}var y="@wix/auto_sdk_data_collections";function b(t){return function({host:e}){const r=(0,g.transformPaths)(t,[{transformFn:m.transformSDKTimestampToRESTTimestamp,paths:[{path:"collection.createdDate"},{path:"collection.updatedDate"}]},{transformFn:h.transformSDKFloatToRESTFloat,paths:[{path:"collection.fields.numberRange.min"},{path:"collection.fields.numberRange.max"}]}]);return{entityFqdn:"wix.data.v2.data_collection",method:"POST",methodFqn:"com.wixpress.cloud.data.api.collectionservice.DataCollectionService.CreateDataCollection",packageName:y,url:E({protoPath:"/v2/collections",data:r,host:e}),data:r,transformResponse:t=>(0,g.transformPaths)(t,[{transformFn:f.transformRESTTimestampToSDKTimestamp,paths:[{path:"collection.createdDate"},{path:"collection.updatedDate"}]},{transformFn:p.transformRESTFloatToSDKFloat,paths:[{path:"collection.fields.numberRange.min"},{path:"collection.fields.numberRange.max"}]}])}}}function S(t){return function({host:e}){return{entityFqdn:"wix.data.v2.data_collection",method:"GET",methodFqn:"com.wixpress.cloud.data.api.collectionservice.DataCollectionService.GetDataCollection",packageName:y,url:E({protoPath:"/v2/collections/{dataCollectionId}",data:t,host:e}),params:(0,d.toURLSearchParams)(t),transformResponse:t=>(0,g.transformPaths)(t,[{transformFn:f.transformRESTTimestampToSDKTimestamp,paths:[{path:"collection.createdDate"},{path:"collection.updatedDate"},{path:"referencedCollections.createdDate"},{path:"referencedCollections.updatedDate"}]},{transformFn:p.transformRESTFloatToSDKFloat,paths:[{path:"collection.fields.numberRange.min"},{path:"collection.fields.numberRange.max"},{path:"referencedCollections.fields.numberRange.min"},{path:"referencedCollections.fields.numberRange.max"}]}])}}}function T(t){return function({host:e}){return{entityFqdn:"wix.data.v2.data_collection",method:"GET",methodFqn:"com.wixpress.cloud.data.api.collectionservice.DataCollectionService.ListDataCollections",packageName:y,url:E({protoPath:"/v2/collections",data:t,host:e}),params:(0,d.toURLSearchParams)(t),transformResponse:t=>(0,g.transformPaths)(t,[{transformFn:f.transformRESTTimestampToSDKTimestamp,paths:[{path:"collections.createdDate"},{path:"collections.updatedDate"}]},{transformFn:p.transformRESTFloatToSDKFloat,paths:[{path:"collections.fields.numberRange.min"},{path:"collections.fields.numberRange.max"}]}])}}}function P(t){return function({host:e}){const r=(0,g.transformPaths)(t,[{transformFn:m.transformSDKTimestampToRESTTimestamp,paths:[{path:"collection.createdDate"},{path:"collection.updatedDate"}]},{transformFn:h.transformSDKFloatToRESTFloat,paths:[{path:"collection.fields.numberRange.min"},{path:"collection.fields.numberRange.max"}]}]);return{entityFqdn:"wix.data.v2.data_collection",method:"PUT",methodFqn:"com.wixpress.cloud.data.api.collectionservice.DataCollectionService.UpdateDataCollection",packageName:y,url:E({protoPath:"/v2/collections",data:r,host:e}),data:r,transformResponse:t=>(0,g.transformPaths)(t,[{transformFn:f.transformRESTTimestampToSDKTimestamp,paths:[{path:"collection.createdDate"},{path:"collection.updatedDate"}]},{transformFn:p.transformRESTFloatToSDKFloat,paths:[{path:"collection.fields.numberRange.min"},{path:"collection.fields.numberRange.max"}]}])}}}function _(t){return function({host:e}){return{entityFqdn:"wix.data.v2.data_collection",method:"DELETE",methodFqn:"com.wixpress.cloud.data.api.collectionservice.DataCollectionService.DeleteDataCollection",packageName:y,url:E({protoPath:"/v2/collections/{dataCollectionId}",data:t,host:e}),params:(0,d.toURLSearchParams)(t)}}}function I(t){return function({host:e}){return{entityFqdn:"wix.data.v2.data_collection",method:"POST",methodFqn:"com.wixpress.cloud.data.api.collectionservice.DataCollectionService.RestoreDataCollection",packageName:y,url:E({protoPath:"/v2/collections/restore/{dataCollectionId}",data:t,host:e}),data:t,transformResponse:t=>(0,g.transformPaths)(t,[{transformFn:f.transformRESTTimestampToSDKTimestamp,paths:[{path:"dataCollection.createdDate"},{path:"dataCollection.updatedDate"}]},{transformFn:p.transformRESTFloatToSDKFloat,paths:[{path:"dataCollection.fields.numberRange.min"},{path:"dataCollection.fields.numberRange.max"}]}])}}}function w(t){return function({host:e}){const r=(0,g.transformPaths)(t,[{transformFn:h.transformSDKFloatToRESTFloat,paths:[{path:"field.numberRange.min"},{path:"field.numberRange.max"}]}]);return{entityFqdn:"wix.data.v2.data_collection",method:"POST",methodFqn:"com.wixpress.cloud.data.api.collectionservice.DataCollectionService.CreateDataCollectionField",packageName:y,url:E({protoPath:"/v2/collections/create-field",data:r,host:e}),data:r,transformResponse:t=>(0,g.transformPaths)(t,[{transformFn:f.transformRESTTimestampToSDKTimestamp,paths:[{path:"dataCollection.createdDate"},{path:"dataCollection.updatedDate"}]},{transformFn:p.transformRESTFloatToSDKFloat,paths:[{path:"dataCollection.fields.numberRange.min"},{path:"dataCollection.fields.numberRange.max"}]}])}}}function R(t){return function({host:e}){const r=(0,g.transformPaths)(t,[{transformFn:h.transformSDKFloatToRESTFloat,paths:[{path:"field.numberRange.min"},{path:"field.numberRange.max"}]}]);return{entityFqdn:"wix.data.v2.data_collection",method:"POST",methodFqn:"com.wixpress.cloud.data.api.collectionservice.DataCollectionService.UpdateDataCollectionField",packageName:y,url:E({protoPath:"/v2/collections/update-field",data:r,host:e}),data:r,transformResponse:t=>(0,g.transformPaths)(t,[{transformFn:f.transformRESTTimestampToSDKTimestamp,paths:[{path:"dataCollection.createdDate"},{path:"dataCollection.updatedDate"}]},{transformFn:p.transformRESTFloatToSDKFloat,paths:[{path:"dataCollection.fields.numberRange.min"},{path:"dataCollection.fields.numberRange.max"}]}])}}}function N(t){return function({host:e}){return{entityFqdn:"wix.data.v2.data_collection",method:"POST",methodFqn:"com.wixpress.cloud.data.api.collectionservice.DataCollectionService.DeleteDataCollectionField",packageName:y,url:E({protoPath:"/v2/collections/delete-field",data:t,host:e}),data:t,transformResponse:t=>(0,g.transformPaths)(t,[{transformFn:f.transformRESTTimestampToSDKTimestamp,paths:[{path:"dataCollection.createdDate"},{path:"dataCollection.updatedDate"}]},{transformFn:p.transformRESTFloatToSDKFloat,paths:[{path:"dataCollection.fields.numberRange.min"},{path:"dataCollection.fields.numberRange.max"}]}])}}}var A=(t=>(t.NATIVE="NATIVE",t.WIX_APP="WIX_APP",t.BLOCKS_APP="BLOCKS_APP",t.EXTERNAL="EXTERNAL",t))(A||{}),C=(t=>(t.ASC="ASC",t.DESC="DESC",t))(C||{}),x=(t=>(t.AGGREGATE="AGGREGATE",t.BULK_INSERT="BULK_INSERT",t.BULK_REMOVE="BULK_REMOVE",t.BULK_SAVE="BULK_SAVE",t.BULK_UPDATE="BULK_UPDATE",t.COUNT="COUNT",t.DISTINCT="DISTINCT",t.FIND="FIND",t.GET="GET",t.INSERT="INSERT",t.INSERT_REFERENCE="INSERT_REFERENCE",t.IS_REFERENCED="IS_REFERENCED",t.QUERY_REFERENCED="QUERY_REFERENCED",t.REMOVE="REMOVE",t.REMOVE_REFERENCE="REMOVE_REFERENCE",t.REPLACE_REFERENCES="REPLACE_REFERENCES",t.SAVE="SAVE",t.TRUNCATE="TRUNCATE",t.UPDATE="UPDATE",t.PATCH="PATCH",t.BULK_PATCH="BULK_PATCH",t))(x||{}),O=(t=>(t.UPDATE="UPDATE",t.REMOVE="REMOVE",t))(O||{}),D=(t=>(t.UNKNOWN_FIELD_TYPE="UNKNOWN_FIELD_TYPE",t.TEXT="TEXT",t.NUMBER="NUMBER",t.DATE="DATE",t.DATETIME="DATETIME",t.IMAGE="IMAGE",t.BOOLEAN="BOOLEAN",t.DOCUMENT="DOCUMENT",t.URL="URL",t.RICH_TEXT="RICH_TEXT",t.VIDEO="VIDEO",t.ANY="ANY",t.ARRAY_STRING="ARRAY_STRING",t.ARRAY_DOCUMENT="ARRAY_DOCUMENT",t.AUDIO="AUDIO",t.TIME="TIME",t.LANGUAGE="LANGUAGE",t.RICH_CONTENT="RICH_CONTENT",t.MEDIA_GALLERY="MEDIA_GALLERY",t.ADDRESS="ADDRESS",t.PAGE_LINK="PAGE_LINK",t.REFERENCE="REFERENCE",t.MULTI_REFERENCE="MULTI_REFERENCE",t.OBJECT="OBJECT",t.ARRAY="ARRAY",t.LEGACY_TIME="LEGACY_TIME",t.LEGACY_BOOK="LEGACY_BOOK",t.LEGACY_EXTERNAL_URL="LEGACY_EXTERNAL_URL",t.LEGACY_BROKEN_REFERENCE="LEGACY_BROKEN_REFERENCE",t.LEGACY_IMAGE="LEGACY_IMAGE",t.LEGACY_COLOR="LEGACY_COLOR",t.LEGACY_EXTERNAL_VIDEO="LEGACY_EXTERNAL_VIDEO",t))(D||{}),k=(t=>(t.EQ="EQ",t.LT="LT",t.GT="GT",t.NE="NE",t.LTE="LTE",t.GTE="GTE",t.STARTS_WITH="STARTS_WITH",t.ENDS_WITH="ENDS_WITH",t.CONTAINS="CONTAINS",t.HAS_SOME="HAS_SOME",t.HAS_ALL="HAS_ALL",t.EXISTS="EXISTS",t.URLIZED="URLIZED",t))(k||{}),M=(t=>(t.UNKNOWN="UNKNOWN",t.CMS="CMS",t))(M||{}),L=(t=>(t.UNKNOWN_ROLE="UNKNOWN_ROLE",t.ADMIN="ADMIN",t.SITE_MEMBER_AUTHOR="SITE_MEMBER_AUTHOR",t.SITE_MEMBER="SITE_MEMBER",t.ANYONE="ANYONE",t))(L||{}),F=(t=>(t.UNKNOWN_PUBLISH_PLUGIN_STATUS="UNKNOWN_PUBLISH_PLUGIN_STATUS",t.PUBLISHED="PUBLISHED",t.DRAFT="DRAFT",t))(F||{}),U=(t=>(t.UNKNOWN_URLIZED_PLUGIN_FORMAT="UNKNOWN_URLIZED_PLUGIN_FORMAT",t.ORIGINAL="ORIGINAL",t.PLAIN="PLAIN",t))(U||{}),B=(t=>(t.UNKNOWN_PLUGIN_TYPE="UNKNOWN_PLUGIN_TYPE",t.PUBLISH="PUBLISH",t.SINGLE_ITEM="SINGLE_ITEM",t.URLIZED="URLIZED",t.GRIDAPPLESS="GRIDAPPLESS",t.MULTILINGUAL="MULTILINGUAL",t.SHARED="SHARED",t.EDITABLE_PAGE_LINK="EDITABLE_PAGE_LINK",t.CMS="CMS",t))(B||{}),$=(t=>(t.OFFSET="OFFSET",t.CURSOR="CURSOR",t))($||{}),j=(t=>(t.UNDEFINED="UNDEFINED",t.ANYONE="ANYONE",t.SITE_MEMBER="SITE_MEMBER",t.SITE_MEMBER_AUTHOR="SITE_MEMBER_AUTHOR",t.CMS_EDITOR="CMS_EDITOR",t.PRIVILEGED="PRIVILEGED",t))(j||{}),H=(t=>(t.UNKNOWN_SEGMENT="UNKNOWN_SEGMENT",t.PUBLIC="PUBLIC",t.DEV="DEV",t))(H||{}),K=(t=>(t.ASC="ASC",t.DESC="DESC",t))(K||{}),q=(t=>(t.ASC="ASC",t.DESC="DESC",t))(q||{}),V=(t=>(t.UNKNOWN="UNKNOWN",t.BUILDING="BUILDING",t.ACTIVE="ACTIVE",t.DROPPING="DROPPING",t.DROPPED="DROPPED",t.FAILED="FAILED",t.INVALID="INVALID",t))(V||{}),G=(t=>(t.UNKNOWN_INDEX_SOURCE="UNKNOWN_INDEX_SOURCE",t.SYSTEM="SYSTEM",t.USER="USER",t.AUTO="AUTO",t))(G||{}),W=(t=>(t.UNKNOWN="UNKNOWN",t.ANONYMOUS_VISITOR="ANONYMOUS_VISITOR",t.MEMBER="MEMBER",t.WIX_USER="WIX_USER",t.APP="APP",t))(W||{});function Y(t){return e=>async function(t){const{httpClient:e,sideEffects:r}=arguments[1],n=b((0,u.renameKeysFromSDKRequestToRESTRequest)({collection:t}));r?.onSiteCall?.();try{const t=await e.request(n);return r?.onSuccess?.(t),(0,u.renameKeysFromRESTResponseToSDKResponse)(t.data)?.collection}catch(t){const e=(0,l.transformError)(t,{spreadPathsToArguments:{},explicitPathsToArguments:{collection:"$[0]"},singleArgumentUnchanged:!1},["collection"]);throw r?.onError?.(t),e}}(e,{httpClient:t})}function X(t){return(e,r)=>async function(t,e){const{httpClient:r,sideEffects:n}=arguments[2],a=S((0,u.renameKeysFromSDKRequestToRESTRequest)({dataCollectionId:t,consistentRead:e?.consistentRead,includeAllowedDataPermissions:e?.includeAllowedDataPermissions,fields:e?.fields}));n?.onSiteCall?.();try{const t=await r.request(a);return n?.onSuccess?.(t),(0,u.renameKeysFromRESTResponseToSDKResponse)(t.data)?.collection}catch(t){const e=(0,l.transformError)(t,{spreadPathsToArguments:{},explicitPathsToArguments:{dataCollectionId:"$[0]",consistentRead:"$[1].consistentRead",includeAllowedDataPermissions:"$[1].includeAllowedDataPermissions",fields:"$[1].fields"},singleArgumentUnchanged:!1},["dataCollectionId","options"]);throw n?.onError?.(t),e}}(e,r,{httpClient:t})}function z(t){return e=>async function(t){const{httpClient:e,sideEffects:r}=arguments[1],n=T((0,u.renameKeysFromSDKRequestToRESTRequest)({sort:t?.sort,paging:t?.paging,consistentRead:t?.consistentRead,includeAllowedDataPermissions:t?.includeAllowedDataPermissions,fields:t?.fields}));r?.onSiteCall?.();try{const t=await e.request(n);return r?.onSuccess?.(t),(0,u.renameKeysFromRESTResponseToSDKResponse)(t.data)}catch(t){const e=(0,l.transformError)(t,{spreadPathsToArguments:{},explicitPathsToArguments:{sort:"$[0].sort",paging:"$[0].paging",consistentRead:"$[0].consistentRead",includeAllowedDataPermissions:"$[0].includeAllowedDataPermissions",fields:"$[0].fields"},singleArgumentUnchanged:!1},["options"]);throw r?.onError?.(t),e}}(e,{httpClient:t})}function J(t){return e=>async function(t){const{httpClient:e,sideEffects:r}=arguments[1],n=P((0,u.renameKeysFromSDKRequestToRESTRequest)({collection:t}));r?.onSiteCall?.();try{const t=await e.request(n);return r?.onSuccess?.(t),(0,u.renameKeysFromRESTResponseToSDKResponse)(t.data)?.collection}catch(t){const e=(0,l.transformError)(t,{spreadPathsToArguments:{},explicitPathsToArguments:{collection:"$[0]"},singleArgumentUnchanged:!1},["collection"]);throw r?.onError?.(t),e}}(e,{httpClient:t})}function Q(t){return e=>async function(t){const{httpClient:e,sideEffects:r}=arguments[1],n=_((0,u.renameKeysFromSDKRequestToRESTRequest)({dataCollectionId:t}));r?.onSiteCall?.();try{const t=await e.request(n);r?.onSuccess?.(t)}catch(t){const e=(0,l.transformError)(t,{spreadPathsToArguments:{},explicitPathsToArguments:{dataCollectionId:"$[0]"},singleArgumentUnchanged:!1},["dataCollectionId"]);throw r?.onError?.(t),e}}(e,{httpClient:t})}function Z(t){return e=>async function(t){const{httpClient:e,sideEffects:r}=arguments[1],n=I((0,u.renameKeysFromSDKRequestToRESTRequest)({dataCollectionId:t}));r?.onSiteCall?.();try{const t=await e.request(n);return r?.onSuccess?.(t),(0,u.renameKeysFromRESTResponseToSDKResponse)(t.data)}catch(t){const e=(0,l.transformError)(t,{spreadPathsToArguments:{},explicitPathsToArguments:{dataCollectionId:"$[0]"},singleArgumentUnchanged:!1},["dataCollectionId"]);throw r?.onError?.(t),e}}(e,{httpClient:t})}function tt(t){return(e,r)=>async function(t,e){const{httpClient:r,sideEffects:n}=arguments[2],a=w((0,u.renameKeysFromSDKRequestToRESTRequest)({dataCollectionId:t,field:e?.field}));n?.onSiteCall?.();try{const t=await r.request(a);return n?.onSuccess?.(t),(0,u.renameKeysFromRESTResponseToSDKResponse)(t.data)}catch(t){const e=(0,l.transformError)(t,{spreadPathsToArguments:{},explicitPathsToArguments:{dataCollectionId:"$[0]",field:"$[1].field"},singleArgumentUnchanged:!1},["dataCollectionId","options"]);throw n?.onError?.(t),e}}(e,r,{httpClient:t})}function et(t){return(e,r)=>async function(t,e){const{httpClient:r,sideEffects:n}=arguments[2],a=R((0,u.renameKeysFromSDKRequestToRESTRequest)({dataCollectionId:t,field:e?.field}));n?.onSiteCall?.();try{const t=await r.request(a);return n?.onSuccess?.(t),(0,u.renameKeysFromRESTResponseToSDKResponse)(t.data)}catch(t){const e=(0,l.transformError)(t,{spreadPathsToArguments:{},explicitPathsToArguments:{dataCollectionId:"$[0]",field:"$[1].field"},singleArgumentUnchanged:!1},["dataCollectionId","options"]);throw n?.onError?.(t),e}}(e,r,{httpClient:t})}function rt(t){return(e,r)=>async function(t,e){const{httpClient:r,sideEffects:n}=arguments[2],a=N((0,u.renameKeysFromSDKRequestToRESTRequest)({dataCollectionId:t,fieldKey:e?.fieldKey}));n?.onSiteCall?.();try{const t=await r.request(a);return n?.onSuccess?.(t),(0,u.renameKeysFromRESTResponseToSDKResponse)(t.data)}catch(t){const e=(0,l.transformError)(t,{spreadPathsToArguments:{},explicitPathsToArguments:{dataCollectionId:"$[0]",fieldKey:"$[1].fieldKey"},singleArgumentUnchanged:!1},["dataCollectionId","options"]);throw n?.onError?.(t),e}}(e,r,{httpClient:t})}var nt=r(7512),at=(0,nt.createRESTModule)(Y),it=(0,nt.createRESTModule)(X),st=(0,nt.createRESTModule)(z),ot=(0,nt.createRESTModule)(J),ct=(0,nt.createRESTModule)(Q),lt=(0,nt.createRESTModule)(Z),ut=(0,nt.createRESTModule)(tt),dt=(0,nt.createRESTModule)(et),ht=(0,nt.createRESTModule)(rt)},2067:function(t,e,r){"use strict";var n,a=Object.defineProperty,i=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyNames,o=Object.prototype.hasOwnProperty,c={};((t,e)=>{for(var r in e)a(t,r,{get:e[r],enumerable:!0})})(c,{CauseOfFailure:()=>b,CollectionsFound:()=>S,ConnectionType:()=>_,FieldType:()=>T,ProtocolVersion:()=>P,WebhookIdentityType:()=>I,createExternalDatabaseConnection:()=>k,deleteExternalDatabaseConnection:()=>L,getExternalDatabaseConnection:()=>O,listExternalDatabaseConnections:()=>D,updateExternalDatabaseConnection:()=>M}),t.exports=(n=c,((t,e,r,n)=>{if(e&&"object"==typeof e||"function"==typeof e)for(let c of s(e))o.call(t,c)||c===r||a(t,c,{get:()=>e[c],enumerable:!(n=i(e,c))||n.enumerable});return t})(a({},"__esModule",{value:!0}),n));var l=r(9914),u=r(9566),d=r(7512),h=r(7512);function p(t){return(0,h.resolveUrl)(Object.assign(t,{domainToMappings:{"api._api_base_domain_":[{srcPath:"/cloud-data",destPath:""}],"code._base_domain_":[{srcPath:"/_api/cloud-data/v1/data-settings",destPath:"/v1/data-settings"},{srcPath:"/_api/cloud-data/v1/schemas",destPath:"/v1/schemas"},{srcPath:"/_api/cloud-data/v1/connector",destPath:"/v1/connector"},{srcPath:"/_api/data/v1/data-settings",destPath:"/v1/data-settings"},{srcPath:"/_api/data/v1/schemas",destPath:"/v1/schemas"},{srcPath:"/_api/data/v1/connector",destPath:"/v1/connector"},{srcPath:"/_api/cloud-data/v1/wix-data",destPath:"/v1/wix-data"}],"cloud-data.wix-code.com":[{srcPath:"",destPath:""}],_:[{srcPath:"/_api/cloud-data",destPath:""}],"www._base_domain_":[{srcPath:"/_api/cloud-data",destPath:""},{srcPath:"/_api/data",destPath:""},{srcPath:"/_api/cloud-data",destPath:""}],"dev._base_domain_":[{srcPath:"/_api/cloud-data",destPath:""}],"bo._base_domain_":[{srcPath:"/_api/cloud-data/v1",destPath:"/v1"},{srcPath:"/_api/cloud-data/v2",destPath:"/v2"}],"wixbo.ai":[{srcPath:"/_api/cloud-data/v1",destPath:"/v1"},{srcPath:"/_api/cloud-data/v2",destPath:"/v2"}],"wix-bo.com":[{srcPath:"/_api/cloud-data/v1",destPath:"/v1"},{srcPath:"/_api/cloud-data/v2",destPath:"/v2"}],"manage._base_domain_":[{srcPath:"/_api/cloud-data",destPath:""},{srcPath:"/_api/data",destPath:""},{srcPath:"/_api/cloud-data",destPath:""}],"editor._base_domain_":[{srcPath:"/_api/cloud-data/v1/schemas",destPath:"/v1/schemas"},{srcPath:"/_api/cloud-data/dbs/tasks",destPath:"/dbs/tasks"},{srcPath:"/_api/data/v1/schemas",destPath:"/v1/schemas"},{srcPath:"/_api/data/dbs/tasks",destPath:"/dbs/tasks"},{srcPath:"/_api/cloud-data/v1/wix-data",destPath:"/v1/wix-data"},{srcPath:"/_api/cloud-data/v1/data-settings",destPath:"/v1/data-settings"},{srcPath:"/_api/data/v2/indexes",destPath:"/v2/indexes"},{srcPath:"/_api/cloud-data/v1/external-database-connections",destPath:"/v1/external-database-connections"},{srcPath:"/_api/data/v1/data-collection-sharing",destPath:"/v1/data-collection-sharing"},{srcPath:"/_api/cloud-data/v2/collections",destPath:"/v2/collections"},{srcPath:"/_api/cloud-data/v2/bulk",destPath:"/v2/bulk"},{srcPath:"/_api/cloud-data/v2/items",destPath:"/v2/items"},{srcPath:"/_api/cloud-data/v2/dbs/tasks",destPath:"/v2/dbs/tasks"}],"blocks._base_domain_":[{srcPath:"/_api/cloud-data/v1/schemas",destPath:"/v1/schemas"},{srcPath:"/_api/cloud-data/dbs/tasks",destPath:"/dbs/tasks"},{srcPath:"/_api/data/v1/schemas",destPath:"/v1/schemas"},{srcPath:"/_api/data/dbs/tasks",destPath:"/dbs/tasks"},{srcPath:"/_api/cloud-data/v1/wix-data",destPath:"/v1/wix-data"},{srcPath:"/_api/cloud-data/v1/data-settings",destPath:"/v1/data-settings"},{srcPath:"/_api/data/v2/indexes",destPath:"/v2/indexes"},{srcPath:"/_api/cloud-data/v1/external-database-connections",destPath:"/v1/external-database-connections"},{srcPath:"/_api/data/v1/data-collection-sharing",destPath:"/v1/data-collection-sharing"},{srcPath:"/_api/cloud-data/v2/collections",destPath:"/v2/collections"},{srcPath:"/_api/cloud-data/v2/bulk",destPath:"/v2/bulk"},{srcPath:"/_api/cloud-data/v2/items",destPath:"/v2/items"},{srcPath:"/_api/cloud-data/v2/dbs/tasks",destPath:"/v2/dbs/tasks"}],"create.editorx":[{srcPath:"/_api/cloud-data/v1/schemas",destPath:"/v1/schemas"},{srcPath:"/_api/cloud-data/dbs/tasks",destPath:"/dbs/tasks"},{srcPath:"/_api/data/v1/schemas",destPath:"/v1/schemas"},{srcPath:"/_api/data/dbs/tasks",destPath:"/dbs/tasks"},{srcPath:"/_api/cloud-data/v1/wix-data",destPath:"/v1/wix-data"},{srcPath:"/_api/cloud-data/v1/data-settings",destPath:"/v1/data-settings"},{srcPath:"/_api/data/v2/indexes",destPath:"/v2/indexes"},{srcPath:"/_api/cloud-data/v1/external-database-connections",destPath:"/v1/external-database-connections"},{srcPath:"/_api/data/v1/data-collection-sharing",destPath:"/v1/data-collection-sharing"},{srcPath:"/_api/cloud-data/v2/collections",destPath:"/v2/collections"},{srcPath:"/_api/cloud-data/v2/bulk",destPath:"/v2/bulk"},{srcPath:"/_api/cloud-data/v2/items",destPath:"/v2/items"},{srcPath:"/_api/cloud-data/v2/dbs/tasks",destPath:"/v2/dbs/tasks"}],"www.wixapis.com":[{srcPath:"/wix-data/v1/collections",destPath:"/v1/wix-data/collections"},{srcPath:"/wix-data/v1/external-database-connections",destPath:"/v1/external-database-connections"},{srcPath:"/wix-data/v2/indexes",destPath:"/v2/indexes"},{srcPath:"/wix-data/v1/items",destPath:"/v1/items"},{srcPath:"/wix-data/v1/bulk",destPath:"/v1/bulk"},{srcPath:"/wix-data/v1/external-databases",destPath:"/v1/external-databases"},{srcPath:"/wix-data/v2",destPath:"/v2"}],"www.wixgateway.com":[{srcPath:"/wix-data/v1/items",destPath:"/v1/items"},{srcPath:"/wix-data/v1/bulk",destPath:"/v1/bulk"}],"*.dev.wix-code.com":[{srcPath:"/_api/cloud-data/v2",destPath:"/v2"},{srcPath:"/_api/cloud-data/v1/external-database-connections",destPath:"/v1/external-database-connections"}]}}))}var m="@wix/auto_sdk_data_external-database-connections";function f(t){return function({host:e}){return{entityFqdn:"wix.data.v1.external_database_connection",method:"GET",methodFqn:"com.wixpress.cloud.data.api.externaldatabase.ExternalDatabaseConnectionService.GetExternalDatabaseConnection",packageName:m,url:p({protoPath:"/v1/external-database-connections/{name}",data:t,host:e}),params:(0,d.toURLSearchParams)(t)}}}function g(t){return function({host:e}){return{entityFqdn:"wix.data.v1.external_database_connection",method:"GET",methodFqn:"com.wixpress.cloud.data.api.externaldatabase.ExternalDatabaseConnectionService.ListExternalDatabaseConnections",packageName:m,url:p({protoPath:"/v1/external-database-connections",data:t,host:e}),params:(0,d.toURLSearchParams)(t)}}}function v(t){return function({host:e}){return{entityFqdn:"wix.data.v1.external_database_connection",method:"POST",methodFqn:"com.wixpress.cloud.data.api.externaldatabase.ExternalDatabaseConnectionService.CreateExternalDatabaseConnection",packageName:m,url:p({protoPath:"/v1/external-database-connections",data:t,host:e}),data:t}}}function E(t){return function({host:e}){return{entityFqdn:"wix.data.v1.external_database_connection",method:"PUT",methodFqn:"com.wixpress.cloud.data.api.externaldatabase.ExternalDatabaseConnectionService.UpdateExternalDatabaseConnection",packageName:m,url:p({protoPath:"/v1/external-database-connections/{externalDatabaseConnection.name}",data:t,host:e}),data:t}}}function y(t){return function({host:e}){return{entityFqdn:"wix.data.v1.external_database_connection",method:"DELETE",methodFqn:"com.wixpress.cloud.data.api.externaldatabase.ExternalDatabaseConnectionService.DeleteExternalDatabaseConnection",packageName:m,url:p({protoPath:"/v1/external-database-connections/{name}",data:t,host:e}),params:(0,d.toURLSearchParams)(t)}}}var b=(t=>(t.NONE="NONE",t.COMMUNICATION_FAILURE="COMMUNICATION_FAILURE",t.DESTINATION_HOST_UNREACHABLE="DESTINATION_HOST_UNREACHABLE",t.UNAUTHORIZED="UNAUTHORIZED",t.DESTINATION_ENDPOINT_NOT_DEFINED="DESTINATION_ENDPOINT_NOT_DEFINED",t))(b||{}),S=(t=>(t.UNKNOWN="UNKNOWN",t.YES="YES",t.NO="NO",t))(S||{}),T=(t=>(t.UNKNOWN_FIELD_TYPE="UNKNOWN_FIELD_TYPE",t.TEXT="TEXT",t.NUMBER="NUMBER",t.DATE="DATE",t.DATETIME="DATETIME",t.IMAGE="IMAGE",t.BOOLEAN="BOOLEAN",t.DOCUMENT="DOCUMENT",t.URL="URL",t.RICH_TEXT="RICH_TEXT",t.VIDEO="VIDEO",t.ANY="ANY",t.ARRAY_STRING="ARRAY_STRING",t.ARRAY_DOCUMENT="ARRAY_DOCUMENT",t.AUDIO="AUDIO",t.TIME="TIME",t.LANGUAGE="LANGUAGE",t.RICH_CONTENT="RICH_CONTENT",t.MEDIA_GALLERY="MEDIA_GALLERY",t.ADDRESS="ADDRESS",t.PAGE_LINK="PAGE_LINK",t.REFERENCE="REFERENCE",t.MULTI_REFERENCE="MULTI_REFERENCE",t.OBJECT="OBJECT",t.ARRAY="ARRAY",t.LEGACY_TIME="LEGACY_TIME",t.LEGACY_BOOK="LEGACY_BOOK",t.LEGACY_EXTERNAL_URL="LEGACY_EXTERNAL_URL",t.LEGACY_BROKEN_REFERENCE="LEGACY_BROKEN_REFERENCE",t.LEGACY_IMAGE="LEGACY_IMAGE",t.LEGACY_COLOR="LEGACY_COLOR",t.LEGACY_EXTERNAL_VIDEO="LEGACY_EXTERNAL_VIDEO",t))(T||{}),P=(t=>(t.UNKNOWN_PROTOCOL_VERSION="UNKNOWN_PROTOCOL_VERSION",t.V1="V1",t.V2="V2",t.V3="V3",t))(P||{}),_=(t=>(t.UNKNOWN_CONNECTION_TYPE="UNKNOWN_CONNECTION_TYPE",t.STANDALONE="STANDALONE",t.WIX_SERVICE_PLUGIN="WIX_SERVICE_PLUGIN",t))(_||{}),I=(t=>(t.UNKNOWN="UNKNOWN",t.ANONYMOUS_VISITOR="ANONYMOUS_VISITOR",t.MEMBER="MEMBER",t.WIX_USER="WIX_USER",t.APP="APP",t))(I||{});function w(t){return e=>async function(t){const{httpClient:e,sideEffects:r}=arguments[1],n=f((0,u.renameKeysFromSDKRequestToRESTRequest)({name:t}));r?.onSiteCall?.();try{const t=await e.request(n);return r?.onSuccess?.(t),(0,u.renameKeysFromRESTResponseToSDKResponse)(t.data)?.externalDatabaseConnection}catch(t){const e=(0,l.transformError)(t,{spreadPathsToArguments:{},explicitPathsToArguments:{name:"$[0]"},singleArgumentUnchanged:!1},["name"]);throw r?.onError?.(t),e}}(e,{httpClient:t})}function R(t){return e=>async function(t){const{httpClient:e,sideEffects:r}=arguments[1],n=g((0,u.renameKeysFromSDKRequestToRESTRequest)({paging:t?.paging}));r?.onSiteCall?.();try{const t=await e.request(n);return r?.onSuccess?.(t),(0,u.renameKeysFromRESTResponseToSDKResponse)(t.data)}catch(t){const e=(0,l.transformError)(t,{spreadPathsToArguments:{},explicitPathsToArguments:{paging:"$[0].paging"},singleArgumentUnchanged:!1},["options"]);throw r?.onError?.(t),e}}(e,{httpClient:t})}function N(t){return(e,r)=>async function(t,e){const{httpClient:r,sideEffects:n}=arguments[2],a=v((0,u.renameKeysFromSDKRequestToRESTRequest)({externalDatabaseConnection:t,connectionType:e}));n?.onSiteCall?.();try{const t=await r.request(a);return n?.onSuccess?.(t),(0,u.renameKeysFromRESTResponseToSDKResponse)(t.data)?.externalDatabaseConnection}catch(t){const e=(0,l.transformError)(t,{spreadPathsToArguments:{},explicitPathsToArguments:{externalDatabaseConnection:"$[0]",connectionType:"$[1]"},singleArgumentUnchanged:!1},["externalDatabaseConnection","connectionType"]);throw n?.onError?.(t),e}}(e,r,{httpClient:t})}function A(t){return(e,r)=>async function(t,e){const{httpClient:r,sideEffects:n}=arguments[2],a=E((0,u.renameKeysFromSDKRequestToRESTRequest)({externalDatabaseConnection:{...e,name:t}}));n?.onSiteCall?.();try{const t=await r.request(a);return n?.onSuccess?.(t),(0,u.renameKeysFromRESTResponseToSDKResponse)(t.data)?.externalDatabaseConnection}catch(t){const e=(0,l.transformError)(t,{spreadPathsToArguments:{externalDatabaseConnection:"$[1]"},explicitPathsToArguments:{"externalDatabaseConnection.name":"$[0]"},singleArgumentUnchanged:!1},["name","externalDatabaseConnection"]);throw n?.onError?.(t),e}}(e,r,{httpClient:t})}function C(t){return e=>async function(t){const{httpClient:e,sideEffects:r}=arguments[1],n=y((0,u.renameKeysFromSDKRequestToRESTRequest)({name:t}));r?.onSiteCall?.();try{const t=await e.request(n);r?.onSuccess?.(t)}catch(t){const e=(0,l.transformError)(t,{spreadPathsToArguments:{},explicitPathsToArguments:{name:"$[0]"},singleArgumentUnchanged:!1},["name"]);throw r?.onError?.(t),e}}(e,{httpClient:t})}var x=r(7512),O=(0,x.createRESTModule)(w),D=(0,x.createRESTModule)(R),k=(0,x.createRESTModule)(N),M=(0,x.createRESTModule)(A),L=(0,x.createRESTModule)(C)},9496:function(t,e,r){"use strict";var n,a=Object.defineProperty,i=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyNames,o=Object.prototype.hasOwnProperty,c={};((t,e)=>{for(var r in e)a(t,r,{get:e[r],enumerable:!0})})(c,{Environment:()=>T,IndexSource:()=>S,Order:()=>y,Status:()=>b,createIndex:()=>N,dropIndex:()=>A,listAvailableIndexes:()=>x,listIndexes:()=>C}),t.exports=(n=c,((t,e,r,n)=>{if(e&&"object"==typeof e||"function"==typeof e)for(let c of s(e))o.call(t,c)||c===r||a(t,c,{get:()=>e[c],enumerable:!(n=i(e,c))||n.enumerable});return t})(a({},"__esModule",{value:!0}),n));var l=r(9914),u=r(9566),d=r(7512),h=r(7512);function p(t){return(0,h.resolveUrl)(Object.assign(t,{domainToMappings:{"api._api_base_domain_":[{srcPath:"/cloud-data",destPath:""}],"code._base_domain_":[{srcPath:"/_api/cloud-data/v1/data-settings",destPath:"/v1/data-settings"},{srcPath:"/_api/cloud-data/v1/schemas",destPath:"/v1/schemas"},{srcPath:"/_api/cloud-data/v1/connector",destPath:"/v1/connector"},{srcPath:"/_api/data/v1/data-settings",destPath:"/v1/data-settings"},{srcPath:"/_api/data/v1/schemas",destPath:"/v1/schemas"},{srcPath:"/_api/data/v1/connector",destPath:"/v1/connector"},{srcPath:"/_api/cloud-data/v1/wix-data",destPath:"/v1/wix-data"}],"cloud-data.wix-code.com":[{srcPath:"",destPath:""}],_:[{srcPath:"/_api/cloud-data",destPath:""}],"www._base_domain_":[{srcPath:"/_api/cloud-data",destPath:""},{srcPath:"/_api/data",destPath:""},{srcPath:"/_api/cloud-data",destPath:""}],"dev._base_domain_":[{srcPath:"/_api/cloud-data",destPath:""}],"bo._base_domain_":[{srcPath:"/_api/cloud-data/v1",destPath:"/v1"},{srcPath:"/_api/cloud-data/v2",destPath:"/v2"}],"wixbo.ai":[{srcPath:"/_api/cloud-data/v1",destPath:"/v1"},{srcPath:"/_api/cloud-data/v2",destPath:"/v2"}],"wix-bo.com":[{srcPath:"/_api/cloud-data/v1",destPath:"/v1"},{srcPath:"/_api/cloud-data/v2",destPath:"/v2"}],"manage._base_domain_":[{srcPath:"/_api/cloud-data",destPath:""},{srcPath:"/_api/data",destPath:""},{srcPath:"/_api/cloud-data",destPath:""}],"editor._base_domain_":[{srcPath:"/_api/cloud-data/v1/schemas",destPath:"/v1/schemas"},{srcPath:"/_api/cloud-data/dbs/tasks",destPath:"/dbs/tasks"},{srcPath:"/_api/data/v1/schemas",destPath:"/v1/schemas"},{srcPath:"/_api/data/dbs/tasks",destPath:"/dbs/tasks"},{srcPath:"/_api/cloud-data/v1/wix-data",destPath:"/v1/wix-data"},{srcPath:"/_api/cloud-data/v1/data-settings",destPath:"/v1/data-settings"},{srcPath:"/_api/data/v2/indexes",destPath:"/v2/indexes"},{srcPath:"/_api/cloud-data/v1/external-database-connections",destPath:"/v1/external-database-connections"},{srcPath:"/_api/data/v1/data-collection-sharing",destPath:"/v1/data-collection-sharing"},{srcPath:"/_api/cloud-data/v2/collections",destPath:"/v2/collections"},{srcPath:"/_api/cloud-data/v2/bulk",destPath:"/v2/bulk"},{srcPath:"/_api/cloud-data/v2/items",destPath:"/v2/items"},{srcPath:"/_api/cloud-data/v2/dbs/tasks",destPath:"/v2/dbs/tasks"}],"blocks._base_domain_":[{srcPath:"/_api/cloud-data/v1/schemas",destPath:"/v1/schemas"},{srcPath:"/_api/cloud-data/dbs/tasks",destPath:"/dbs/tasks"},{srcPath:"/_api/data/v1/schemas",destPath:"/v1/schemas"},{srcPath:"/_api/data/dbs/tasks",destPath:"/dbs/tasks"},{srcPath:"/_api/cloud-data/v1/wix-data",destPath:"/v1/wix-data"},{srcPath:"/_api/cloud-data/v1/data-settings",destPath:"/v1/data-settings"},{srcPath:"/_api/data/v2/indexes",destPath:"/v2/indexes"},{srcPath:"/_api/cloud-data/v1/external-database-connections",destPath:"/v1/external-database-connections"},{srcPath:"/_api/data/v1/data-collection-sharing",destPath:"/v1/data-collection-sharing"},{srcPath:"/_api/cloud-data/v2/collections",destPath:"/v2/collections"},{srcPath:"/_api/cloud-data/v2/bulk",destPath:"/v2/bulk"},{srcPath:"/_api/cloud-data/v2/items",destPath:"/v2/items"},{srcPath:"/_api/cloud-data/v2/dbs/tasks",destPath:"/v2/dbs/tasks"}],"create.editorx":[{srcPath:"/_api/cloud-data/v1/schemas",destPath:"/v1/schemas"},{srcPath:"/_api/cloud-data/dbs/tasks",destPath:"/dbs/tasks"},{srcPath:"/_api/data/v1/schemas",destPath:"/v1/schemas"},{srcPath:"/_api/data/dbs/tasks",destPath:"/dbs/tasks"},{srcPath:"/_api/cloud-data/v1/wix-data",destPath:"/v1/wix-data"},{srcPath:"/_api/cloud-data/v1/data-settings",destPath:"/v1/data-settings"},{srcPath:"/_api/data/v2/indexes",destPath:"/v2/indexes"},{srcPath:"/_api/cloud-data/v1/external-database-connections",destPath:"/v1/external-database-connections"},{srcPath:"/_api/data/v1/data-collection-sharing",destPath:"/v1/data-collection-sharing"},{srcPath:"/_api/cloud-data/v2/collections",destPath:"/v2/collections"},{srcPath:"/_api/cloud-data/v2/bulk",destPath:"/v2/bulk"},{srcPath:"/_api/cloud-data/v2/items",destPath:"/v2/items"},{srcPath:"/_api/cloud-data/v2/dbs/tasks",destPath:"/v2/dbs/tasks"}],"www.wixapis.com":[{srcPath:"/wix-data/v1/collections",destPath:"/v1/wix-data/collections"},{srcPath:"/wix-data/v1/external-database-connections",destPath:"/v1/external-database-connections"},{srcPath:"/wix-data/v2/indexes",destPath:"/v2/indexes"},{srcPath:"/wix-data/v1/items",destPath:"/v1/items"},{srcPath:"/wix-data/v1/bulk",destPath:"/v1/bulk"},{srcPath:"/wix-data/v1/external-databases",destPath:"/v1/external-databases"},{srcPath:"/wix-data/v2",destPath:"/v2"}],"www.wixgateway.com":[{srcPath:"/wix-data/v1/items",destPath:"/v1/items"},{srcPath:"/wix-data/v1/bulk",destPath:"/v1/bulk"}],"*.dev.wix-code.com":[{srcPath:"/_api/cloud-data/v2",destPath:"/v2"},{srcPath:"/_api/cloud-data/v1/external-database-connections",destPath:"/v1/external-database-connections"}]}}))}var m="@wix/auto_sdk_data_indexes";function f(t){return function({host:e}){return{entityFqdn:"wix.data.v2.index",method:"POST",methodFqn:"com.wixpress.cloud.data.api.index.IndexService.CreateIndex",packageName:m,url:p({protoPath:"/v2/indexes",data:t,host:e}),data:t}}}function g(t){return function({host:e}){return{entityFqdn:"wix.data.v2.index",method:"DELETE",methodFqn:"com.wixpress.cloud.data.api.index.IndexService.DropIndex",packageName:m,url:p({protoPath:"/v2/indexes",data:t,host:e}),params:(0,d.toURLSearchParams)(t)}}}function v(t){return function({host:e}){return{entityFqdn:"wix.data.v2.index",method:"GET",methodFqn:"com.wixpress.cloud.data.api.index.IndexService.ListIndexes",packageName:m,url:p({protoPath:"/v2/indexes",data:t,host:e}),params:(0,d.toURLSearchParams)(t)}}}function E(t){return function({host:e}){return{entityFqdn:"wix.data.v2.index",method:"GET",methodFqn:"com.wixpress.cloud.data.api.index.IndexService.ListAvailableIndexes",packageName:m,url:p({protoPath:"/v2/indexes/available",data:t,host:e}),params:(0,d.toURLSearchParams)(t)}}}var y=(t=>(t.ASC="ASC",t.DESC="DESC",t))(y||{}),b=(t=>(t.UNKNOWN="UNKNOWN",t.BUILDING="BUILDING",t.ACTIVE="ACTIVE",t.DROPPING="DROPPING",t.DROPPED="DROPPED",t.FAILED="FAILED",t.INVALID="INVALID",t))(b||{}),S=(t=>(t.UNKNOWN_INDEX_SOURCE="UNKNOWN_INDEX_SOURCE",t.SYSTEM="SYSTEM",t.USER="USER",t.AUTO="AUTO",t))(S||{}),T=(t=>(t.UNKNOWN_ENVIRONMENT="UNKNOWN_ENVIRONMENT",t.SANDBOX="SANDBOX",t.SANDBOX_PREFERRED="SANDBOX_PREFERRED",t.LIVE="LIVE",t))(T||{});function P(t){return(e,r)=>async function(t,e){const{httpClient:r,sideEffects:n}=arguments[2],a=f((0,u.renameKeysFromSDKRequestToRESTRequest)({dataCollectionId:t,index:e}));n?.onSiteCall?.();try{const t=await r.request(a);return n?.onSuccess?.(t),(0,u.renameKeysFromRESTResponseToSDKResponse)(t.data)?.index}catch(t){const e=(0,l.transformError)(t,{spreadPathsToArguments:{},explicitPathsToArguments:{dataCollectionId:"$[0]",index:"$[1]"},singleArgumentUnchanged:!1},["dataCollectionId","index"]);throw n?.onError?.(t),e}}(e,r,{httpClient:t})}function _(t){return(e,r)=>async function(t,e){const{httpClient:r,sideEffects:n}=arguments[2],a=g((0,u.renameKeysFromSDKRequestToRESTRequest)({dataCollectionId:t,indexName:e}));n?.onSiteCall?.();try{const t=await r.request(a);n?.onSuccess?.(t)}catch(t){const e=(0,l.transformError)(t,{spreadPathsToArguments:{},explicitPathsToArguments:{dataCollectionId:"$[0]",indexName:"$[1]"},singleArgumentUnchanged:!1},["dataCollectionId","indexName"]);throw n?.onError?.(t),e}}(e,r,{httpClient:t})}function I(t){return(e,r)=>async function(t,e){const{httpClient:r,sideEffects:n}=arguments[2],a=v((0,u.renameKeysFromSDKRequestToRESTRequest)({dataCollectionId:t,paging:e?.paging}));n?.onSiteCall?.();try{const t=await r.request(a);return n?.onSuccess?.(t),(0,u.renameKeysFromRESTResponseToSDKResponse)(t.data)}catch(t){const e=(0,l.transformError)(t,{spreadPathsToArguments:{},explicitPathsToArguments:{dataCollectionId:"$[0]",paging:"$[1].paging"},singleArgumentUnchanged:!1},["dataCollectionId","options"]);throw n?.onError?.(t),e}}(e,r,{httpClient:t})}function w(t){return e=>async function(t){const{httpClient:e,sideEffects:r}=arguments[1],n=E((0,u.renameKeysFromSDKRequestToRESTRequest)({dataCollectionId:t}));r?.onSiteCall?.();try{const t=await e.request(n);return r?.onSuccess?.(t),(0,u.renameKeysFromRESTResponseToSDKResponse)(t.data)}catch(t){const e=(0,l.transformError)(t,{spreadPathsToArguments:{},explicitPathsToArguments:{dataCollectionId:"$[0]"},singleArgumentUnchanged:!1},["dataCollectionId"]);throw r?.onError?.(t),e}}(e,{httpClient:t})}var R=r(7512),N=(0,R.createRESTModule)(P),A=(0,R.createRESTModule)(_),C=(0,R.createRESTModule)(I),x=(0,R.createRESTModule)(w)},5824:function(t,e,r){"use strict";var n,a=Object.defineProperty,i=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyNames,o=Object.prototype.hasOwnProperty,c={};((t,e)=>{for(var r in e)a(t,r,{get:e[r],enumerable:!0})})(c,{FieldType:()=>k,FileFormat:()=>O,JobStatus:()=>C,SortOrder:()=>F,Units:()=>M,WebhookIdentityType:()=>L,WixDataEnvironment:()=>x,WritePolicy:()=>D,createFileUploadUrl:()=>J,getJob:()=>Q,listJobs:()=>Z,listMovementLogs:()=>rt,onJobCreated:()=>nt,onJobDeleted:()=>at,onJobUpdated:()=>it,queryJobs:()=>tt,submitJob:()=>z,terminateJob:()=>et}),t.exports=(n=c,((t,e,r,n)=>{if(e&&"object"==typeof e||"function"==typeof e)for(let c of s(e))o.call(t,c)||c===r||a(t,c,{get:()=>e[c],enumerable:!(n=i(e,c))||n.enumerable});return t})(a({},"__esModule",{value:!0}),n));var l=r(9566),u=r(1365),d=r(4615),h=r(3251),p=r(9914),m=r(8734),f=r(9566),g=r(7512),v=r(1365),E=r(4615),y=r(7512);function b(t){return(0,y.resolveUrl)(Object.assign(t,{domainToMappings:{"manage._base_domain_":[{srcPath:"/_api/wix-data-hub-fs2",destPath:""}],"editor._base_domain_":[{srcPath:"/_api/wix-data-hub-fs2",destPath:""}],"blocks._base_domain_":[{srcPath:"/_api/wix-data-hub-fs2",destPath:""}],"create.editorx":[{srcPath:"/_api/wix-data-hub-fs2",destPath:""}],"www.wixapis.com":[{srcPath:"/data-mover",destPath:""}],"*.dev.wix-code.com":[{srcPath:"/_api/wix-data-hub-fs2",destPath:""}],_:[{srcPath:"/_api/wix-data-hub-fs2",destPath:""}]}}))}var S="@wix/auto_sdk_data_movement-jobs";function T(t){return function({host:e}){return{entityFqdn:"wix.hub.v1.job",method:"POST",methodFqn:"wix.hub.v1.DataMovementService.SubmitJob",packageName:S,url:b({protoPath:"/v1/jobs",data:t,host:e}),data:t,transformResponse:t=>(0,E.transformPaths)(t,[{transformFn:v.transformRESTTimestampToSDKTimestamp,paths:[{path:"job.startedAt"},{path:"job.finishedAt"}]}])}}}function P(t){return function({host:e}){return{entityFqdn:"wix.hub.v1.job",method:"POST",methodFqn:"wix.hub.v1.DataMovementService.CreateFileUploadUrl",packageName:S,url:b({protoPath:"/v1/temporary-files/upload-url",data:t,host:e}),data:t}}}function _(t){return function({host:e}){return{entityFqdn:"wix.hub.v1.job",method:"GET",methodFqn:"wix.hub.v1.DataMovementService.GetJob",packageName:S,url:b({protoPath:"/v1/jobs/{jobId}",data:t,host:e}),params:(0,g.toURLSearchParams)(t),transformResponse:t=>(0,E.transformPaths)(t,[{transformFn:v.transformRESTTimestampToSDKTimestamp,paths:[{path:"job.startedAt"},{path:"job.finishedAt"}]}])}}}function I(t){return function({host:e}){return{entityFqdn:"wix.hub.v1.job",method:"GET",methodFqn:"wix.hub.v1.DataMovementService.ListJobs",packageName:S,url:b({protoPath:"/v1/jobs",data:t,host:e}),params:(0,g.toURLSearchParams)(t,!0),transformResponse:t=>(0,E.transformPaths)(t,[{transformFn:v.transformRESTTimestampToSDKTimestamp,paths:[{path:"jobs.startedAt"},{path:"jobs.finishedAt"}]}]),fallback:[{method:"POST",url:b({protoPath:"/v1/jobs/list",data:t,host:e}),data:t}]}}}function w(t){return function({host:e}){return{entityFqdn:"wix.hub.v1.job",method:"GET",methodFqn:"wix.hub.v1.DataMovementService.QueryJobs",packageName:S,url:b({protoPath:"/v1/jobs/query",data:t,host:e}),params:(0,g.toURLSearchParams)(t,!0),transformResponse:t=>(0,E.transformPaths)(t,[{transformFn:v.transformRESTTimestampToSDKTimestamp,paths:[{path:"jobs.startedAt"},{path:"jobs.finishedAt"}]}]),fallback:[{method:"POST",url:b({protoPath:"/v1/jobs/query",data:t,host:e}),data:t}]}}}function R(t){return function({host:e}){return{entityFqdn:"wix.hub.v1.job",method:"POST",methodFqn:"wix.hub.v1.DataMovementService.TerminateJob",packageName:S,url:b({protoPath:"/v1/jobs/{jobId}/terminate",data:t,host:e}),data:t,transformResponse:t=>(0,E.transformPaths)(t,[{transformFn:v.transformRESTTimestampToSDKTimestamp,paths:[{path:"job.startedAt"},{path:"job.finishedAt"}]}])}}}function N(t){return function({host:e}){return{entityFqdn:"wix.hub.v1.job",method:"GET",methodFqn:"wix.hub.v1.DataMovementService.ListMovementLogs",packageName:S,url:b({protoPath:"/v1/jobs/{jobId}/logs",data:t,host:e}),params:(0,g.toURLSearchParams)(t)}}}var A=r(4615),C=(t=>(t.UNINITIALIZED="UNINITIALIZED",t.INITIALIZING="INITIALIZING",t.IN_PROGRESS="IN_PROGRESS",t.COMPLETED="COMPLETED",t.FAILED="FAILED",t.PARTIALLY_SUCCESSFUL="PARTIALLY_SUCCESSFUL",t))(C||{}),x=(t=>(t.LIVE="LIVE",t.SANDBOX="SANDBOX",t))(x||{}),O=(t=>(t.UNKNOWN="UNKNOWN",t.CSV="CSV",t.JSONL="JSONL",t))(O||{}),D=(t=>(t.OVERWRITE="OVERWRITE",t.SKIP_EXISTING="SKIP_EXISTING",t.TRUNCATE_BEFORE="TRUNCATE_BEFORE",t))(D||{}),k=(t=>(t.ANY="ANY",t.STRING="STRING",t.NUMBER="NUMBER",t.BOOLEAN="BOOLEAN",t.DATE="DATE",t.DATETIME="DATETIME",t.BINARY="BINARY",t.OBJECT="OBJECT",t.ARRAY="ARRAY",t.URL="URL",t.WIX_MEDIA_URL="WIX_MEDIA_URL",t.WIX_MEDIA_IMAGE_URL="WIX_MEDIA_IMAGE_URL",t.WIX_MEDIA_VIDEO_URL="WIX_MEDIA_VIDEO_URL",t.WIX_MEDIA_DOCUMENT_URL="WIX_MEDIA_DOCUMENT_URL",t.IMAGE_URL="IMAGE_URL",t.VIDEO_URL="VIDEO_URL",t))(k||{}),M=(t=>(t.UNKNOWN_UNITS="UNKNOWN_UNITS",t.BYTES="BYTES",t.ITEMS="ITEMS",t))(M||{}),L=(t=>(t.UNKNOWN="UNKNOWN",t.ANONYMOUS_VISITOR="ANONYMOUS_VISITOR",t.MEMBER="MEMBER",t.WIX_USER="WIX_USER",t.APP="APP",t))(L||{}),F=(t=>(t.ASC="ASC",t.DESC="DESC",t))(F||{});function U(t){return(e,r,n)=>async function(t,e,r){const{httpClient:n,sideEffects:a}=arguments[3],i=T((0,f.renameKeysFromSDKRequestToRESTRequest)({source:t,destination:e,transformations:r?.transformations,name:r?.name,sourceSiteId:r?.sourceSiteId,destinationSiteId:r?.destinationSiteId}));a?.onSiteCall?.();try{const t=await n.request(i);return a?.onSuccess?.(t),(0,f.renameKeysFromRESTResponseToSDKResponse)(t.data)}catch(t){const e=(0,p.transformError)(t,{spreadPathsToArguments:{},explicitPathsToArguments:{source:"$[0]",destination:"$[1]",transformations:"$[2].transformations",name:"$[2].name",sourceSiteId:"$[2].sourceSiteId",destinationSiteId:"$[2].destinationSiteId"},singleArgumentUnchanged:!1},["source","destination","options"]);throw a?.onError?.(t),e}}(e,r,n,{httpClient:t})}function B(t){return e=>async function(t){const{httpClient:e,sideEffects:r}=arguments[1],n=P((0,f.renameKeysFromSDKRequestToRESTRequest)({fileName:t?.fileName}));r?.onSiteCall?.();try{const t=await e.request(n);return r?.onSuccess?.(t),(0,f.renameKeysFromRESTResponseToSDKResponse)(t.data)}catch(t){const e=(0,p.transformError)(t,{spreadPathsToArguments:{},explicitPathsToArguments:{fileName:"$[0].fileName"},singleArgumentUnchanged:!1},["options"]);throw r?.onError?.(t),e}}(e,{httpClient:t})}function $(t){return e=>async function(t){const{httpClient:e,sideEffects:r}=arguments[1],n=_((0,f.renameKeysFromSDKRequestToRESTRequest)({jobId:t}));r?.onSiteCall?.();try{const t=await e.request(n);return r?.onSuccess?.(t),(0,f.renameKeysFromRESTResponseToSDKResponse)(t.data)?.job}catch(t){const e=(0,p.transformError)(t,{spreadPathsToArguments:{},explicitPathsToArguments:{jobId:"$[0]"},singleArgumentUnchanged:!1},["jobId"]);throw r?.onError?.(t),e}}(e,{httpClient:t})}function j(t){return e=>async function(t){const{httpClient:e,sideEffects:r}=arguments[1],n=I((0,f.renameKeysFromSDKRequestToRESTRequest)({paging:t?.paging}));r?.onSiteCall?.();try{const t=await e.request(n);return r?.onSuccess?.(t),(0,f.renameKeysFromRESTResponseToSDKResponse)(t.data)}catch(t){const e=(0,p.transformError)(t,{spreadPathsToArguments:{},explicitPathsToArguments:{paging:"$[0].paging"},singleArgumentUnchanged:!1},["options"]);throw r?.onError?.(t),e}}(e,{httpClient:t})}function H(t){return()=>function(){const{httpClient:t,sideEffects:e}=arguments[0];return(0,m.queryBuilder)({func:async r=>{const n=w(r);e?.onSiteCall?.();try{const r=await t.request(n);return e?.onSuccess?.(r),r}catch(t){throw e?.onError?.(t),t}},requestTransformer:t=>{const e=[t,{}];return(0,f.renameKeysFromSDKRequestToRESTRequest)({...e?.[1],query:e?.[0]})},responseTransformer:({data:t})=>{const e=(0,f.renameKeysFromRESTResponseToSDKResponse)((0,A.transformPaths)(t,[]));return{items:e?.jobs,pagingMetadata:e?.pagingMetadata}},errorTransformer:t=>{throw(0,p.transformError)(t,{spreadPathsToArguments:{},explicitPathsToArguments:{query:"$[0]"},singleArgumentUnchanged:!1})},pagingMethod:"CURSOR",transformationPaths:{}})}({httpClient:t})}function K(t){return e=>async function(t){const{httpClient:e,sideEffects:r}=arguments[1],n=R((0,f.renameKeysFromSDKRequestToRESTRequest)({jobId:t}));r?.onSiteCall?.();try{const t=await e.request(n);return r?.onSuccess?.(t),(0,f.renameKeysFromRESTResponseToSDKResponse)(t.data)}catch(t){const e=(0,p.transformError)(t,{spreadPathsToArguments:{},explicitPathsToArguments:{jobId:"$[0]"},singleArgumentUnchanged:!1},["jobId"]);throw r?.onError?.(t),e}}(e,{httpClient:t})}function q(t){return(e,r)=>async function(t,e){const{httpClient:r,sideEffects:n}=arguments[2],a=N((0,f.renameKeysFromSDKRequestToRESTRequest)({jobId:t,paging:e?.paging}));n?.onSiteCall?.();try{const t=await r.request(a);return n?.onSuccess?.(t),(0,f.renameKeysFromRESTResponseToSDKResponse)(t.data)}catch(t){const e=(0,p.transformError)(t,{spreadPathsToArguments:{},explicitPathsToArguments:{jobId:"$[0]",paging:"$[1].paging"},singleArgumentUnchanged:!1},["jobId","options"]);throw n?.onError?.(t),e}}(e,r,{httpClient:t})}var V=(0,h.EventDefinition)("wix.hub.v1.job_created",!0,(t=>(0,l.renameKeysFromRESTResponseToSDKResponse)((0,d.transformPaths)(t,[{transformFn:u.transformRESTTimestampToSDKTimestamp,paths:[{path:"entity.startedAt"},{path:"entity.finishedAt"},{path:"metadata.eventTime"}]}]))))(),G=(0,h.EventDefinition)("wix.hub.v1.job_deleted",!0,(t=>(0,l.renameKeysFromRESTResponseToSDKResponse)((0,d.transformPaths)(t,[{transformFn:u.transformRESTTimestampToSDKTimestamp,paths:[{path:"undefined.startedAt"},{path:"undefined.finishedAt"},{path:"metadata.eventTime"}]}]))))(),W=(0,h.EventDefinition)("wix.hub.v1.job_updated",!0,(t=>(0,l.renameKeysFromRESTResponseToSDKResponse)((0,d.transformPaths)(t,[{transformFn:u.transformRESTTimestampToSDKTimestamp,paths:[{path:"entity.startedAt"},{path:"entity.finishedAt"},{path:"metadata.eventTime"}]}]))))(),Y=r(7512),X=r(5097),z=(0,Y.createRESTModule)(U),J=(0,Y.createRESTModule)(B),Q=(0,Y.createRESTModule)($),Z=(0,Y.createRESTModule)(j),tt=(0,Y.createRESTModule)(H),et=(0,Y.createRESTModule)(K),rt=(0,Y.createRESTModule)(q),nt=(0,X.createEventModule)(V),at=(0,X.createEventModule)(G),it=(0,X.createEventModule)(W)},9066:function(t,e,r){"use strict";var n,a=Object.defineProperty,i=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyNames,o=Object.prototype.hasOwnProperty,c={};((t,e)=>{for(var r in e)a(t,r,{get:e[r],enumerable:!0})})(c,{Access:()=>T,AccessLevel:()=>S,Effect:()=>R,JoinedConditionOperator:()=>w,PolicyOwnerType:()=>A,PolicyType:()=>N,SimpleConditionOperator:()=>I,SubjectContextType:()=>_,SubjectType:()=>P,addSpecialPermissions:()=>B,getMyPermissions:()=>H,getPermissions:()=>F,removeSpecialPermissions:()=>j,updatePermissions:()=>U,updateSpecialPermissions:()=>$}),t.exports=(n=c,((t,e,r,n)=>{if(e&&"object"==typeof e||"function"==typeof e)for(let c of s(e))o.call(t,c)||c===r||a(t,c,{get:()=>e[c],enumerable:!(n=i(e,c))||n.enumerable});return t})(a({},"__esModule",{value:!0}),n));var l=r(9914),u=r(9566),d=r(7512),h=r(7512);function p(t){return(0,h.resolveUrl)(Object.assign(t,{domainToMappings:{"manage._base_domain_":[{srcPath:"/_api/cloud-data/v1/permissions",destPath:"/v1/permissions"}],"editor._base_domain_":[{srcPath:"/_api/cloud-data/v1/permissions",destPath:"/v1/permissions"}],"blocks._base_domain_":[{srcPath:"/_api/cloud-data/v1/permissions",destPath:"/v1/permissions"}],"create.editorx":[{srcPath:"/_api/cloud-data/v1/permissions",destPath:"/v1/permissions"}],"www.wixapis.com":[{srcPath:"/wix-data/v1/permissions",destPath:"/v1/permissions"}],"*.dev.wix-code.com":[{srcPath:"/_api/data/v1/permissions",destPath:"/v1/permissions"}],_:[{srcPath:"/_api/data/v1/permissions",destPath:"/v1/permissions"}]}}))}var m="@wix/auto_sdk_data_permissions";function f(t){return function({host:e}){return{entityFqdn:"wix.data.v1.data_permissions",method:"GET",methodFqn:"wix.cloud.permissions.v1.DataPermissionsService.GetPermissions",packageName:m,url:p({protoPath:"/v1/permissions",data:t,host:e}),params:(0,d.toURLSearchParams)(t)}}}function g(t){return function({host:e}){return{entityFqdn:"wix.data.v1.data_permissions",method:"POST",methodFqn:"wix.cloud.permissions.v1.DataPermissionsService.UpdatePermissions",packageName:m,url:p({protoPath:"/v1/permissions",data:t,host:e}),data:t}}}function v(t){return function({host:e}){return{entityFqdn:"wix.data.v1.data_permissions",method:"POST",methodFqn:"wix.cloud.permissions.v1.DataPermissionsService.AddSpecialPermissions",packageName:m,url:p({protoPath:"/v1/permissions/special",data:t,host:e}),data:t}}}function E(t){return function({host:e}){return{entityFqdn:"wix.data.v1.data_permissions",method:"POST",methodFqn:"wix.cloud.permissions.v1.DataPermissionsService.UpdateSpecialPermissions",packageName:m,url:p({protoPath:"/v1/permissions/special/{specialPermissions.id}",data:t,host:e}),data:t}}}function y(t){return function({host:e}){return{entityFqdn:"wix.data.v1.data_permissions",method:"DELETE",methodFqn:"wix.cloud.permissions.v1.DataPermissionsService.RemoveSpecialPermissions",packageName:m,url:p({protoPath:"/v1/permissions/special/{specialPermissionsId}",data:t,host:e}),params:(0,d.toURLSearchParams)(t)}}}function b(t){return function({host:e}){return{entityFqdn:"wix.data.v1.data_permissions",method:"GET",methodFqn:"wix.cloud.permissions.v1.DataPermissionsService.GetMyPermissions",packageName:m,url:p({protoPath:"/v1/permissions/current",data:t,host:e}),params:(0,d.toURLSearchParams)(t)}}}var S=(t=>(t.UNKNOWN="UNKNOWN",t.ANYONE="ANYONE",t.SITE_MEMBER="SITE_MEMBER",t.SITE_MEMBER_AUTHOR="SITE_MEMBER_AUTHOR",t.CMS_EDITOR="CMS_EDITOR",t.PRIVILEGED="PRIVILEGED",t))(S||{}),T=(t=>(t.UNSPECIFIED="UNSPECIFIED",t.ALLOWED="ALLOWED",t))(T||{}),P=(t=>(t.UNKNOWN="UNKNOWN",t.ACCOUNT="ACCOUNT",t.USER="USER",t.USER_GROUP="USER_GROUP",t.MEMBER_GROUP="MEMBER_GROUP",t.VISITOR_GROUP="VISITOR_GROUP",t.EXTERNAL_APP="EXTERNAL_APP",t.ACCOUNT_GROUP="ACCOUNT_GROUP",t.WIX_APP="WIX_APP",t))(P||{}),_=(t=>(t.UNKNOWN_CTX="UNKNOWN_CTX",t.ORG_CTX="ORG_CTX",t.ACCOUNT_CTX="ACCOUNT_CTX",t))(_||{}),I=(t=>(t.UNKNOWN_SIMPLE_OP="UNKNOWN_SIMPLE_OP",t.EQUAL="EQUAL",t))(I||{}),w=(t=>(t.UNKNOWN_JOIN_OP="UNKNOWN_JOIN_OP",t.OR="OR",t.AND="AND",t))(w||{}),R=(t=>(t.UNKNOWN_EFFECT="UNKNOWN_EFFECT",t.ALLOW="ALLOW",t.DENY="DENY",t))(R||{}),N=(t=>(t.UNKNOWN_STATUS="UNKNOWN_STATUS",t.PREDEFINED="PREDEFINED",t.CUSTOM="CUSTOM",t.INLINE_CUSTOM="INLINE_CUSTOM",t))(N||{}),A=(t=>(t.UNKNOWN_TYPE="UNKNOWN_TYPE",t.WIX="WIX",t.WIX_ACCOUNT="WIX_ACCOUNT",t))(A||{});function C(t){return e=>async function(t){const{httpClient:e,sideEffects:r}=arguments[1],n=f((0,u.renameKeysFromSDKRequestToRESTRequest)({dataCollectionId:t}));r?.onSiteCall?.();try{const t=await e.request(n);return r?.onSuccess?.(t),(0,u.renameKeysFromRESTResponseToSDKResponse)(t.data)}catch(t){const e=(0,l.transformError)(t,{spreadPathsToArguments:{},explicitPathsToArguments:{dataCollectionId:"$[0]"},singleArgumentUnchanged:!1},["dataCollectionId"]);throw r?.onError?.(t),e}}(e,{httpClient:t})}function x(t){return e=>async function(t){const{httpClient:e,sideEffects:r}=arguments[1],n=g((0,u.renameKeysFromSDKRequestToRESTRequest)({dataPermissions:t}));r?.onSiteCall?.();try{const t=await e.request(n);return r?.onSuccess?.(t),(0,u.renameKeysFromRESTResponseToSDKResponse)(t.data)}catch(t){const e=(0,l.transformError)(t,{spreadPathsToArguments:{},explicitPathsToArguments:{dataPermissions:"$[0]"},singleArgumentUnchanged:!1},["dataPermissions"]);throw r?.onError?.(t),e}}(e,{httpClient:t})}function O(t){return(e,r)=>async function(t,e){const{httpClient:r,sideEffects:n}=arguments[2],a=v((0,u.renameKeysFromSDKRequestToRESTRequest)({dataCollectionId:t,specialPermissions:e}));n?.onSiteCall?.();try{const t=await r.request(a);return n?.onSuccess?.(t),(0,u.renameKeysFromRESTResponseToSDKResponse)(t.data)}catch(t){const e=(0,l.transformError)(t,{spreadPathsToArguments:{},explicitPathsToArguments:{dataCollectionId:"$[0]",specialPermissions:"$[1]"},singleArgumentUnchanged:!1},["dataCollectionId","specialPermissions"]);throw n?.onError?.(t),e}}(e,r,{httpClient:t})}function D(t){return(e,r)=>async function(t,e){const{httpClient:r,sideEffects:n}=arguments[2],a=E((0,u.renameKeysFromSDKRequestToRESTRequest)({specialPermissions:{...e,id:t}}));n?.onSiteCall?.();try{const t=await r.request(a);return n?.onSuccess?.(t),(0,u.renameKeysFromRESTResponseToSDKResponse)(t.data)}catch(t){const e=(0,l.transformError)(t,{spreadPathsToArguments:{specialPermissions:"$[1]"},explicitPathsToArguments:{"specialPermissions.id":"$[0]"},singleArgumentUnchanged:!1},["_id","specialPermissions"]);throw n?.onError?.(t),e}}(e,r,{httpClient:t})}function k(t){return e=>async function(t){const{httpClient:e,sideEffects:r}=arguments[1],n=y((0,u.renameKeysFromSDKRequestToRESTRequest)({specialPermissionsId:t}));r?.onSiteCall?.();try{const t=await e.request(n);return r?.onSuccess?.(t),(0,u.renameKeysFromRESTResponseToSDKResponse)(t.data)}catch(t){const e=(0,l.transformError)(t,{spreadPathsToArguments:{},explicitPathsToArguments:{specialPermissionsId:"$[0]"},singleArgumentUnchanged:!1},["specialPermissionsId"]);throw r?.onError?.(t),e}}(e,{httpClient:t})}function M(t){return e=>async function(t){const{httpClient:e,sideEffects:r}=arguments[1],n=b((0,u.renameKeysFromSDKRequestToRESTRequest)({dataCollectionId:t}));r?.onSiteCall?.();try{const t=await e.request(n);return r?.onSuccess?.(t),(0,u.renameKeysFromRESTResponseToSDKResponse)(t.data)}catch(t){const e=(0,l.transformError)(t,{spreadPathsToArguments:{},explicitPathsToArguments:{dataCollectionId:"$[0]"},singleArgumentUnchanged:!1},["dataCollectionId"]);throw r?.onError?.(t),e}}(e,{httpClient:t})}var L=r(7512),F=(0,L.createRESTModule)(C),U=(0,L.createRESTModule)(x),B=(0,L.createRESTModule)(O),$=(0,L.createRESTModule)(D),j=(0,L.createRESTModule)(k),H=(0,L.createRESTModule)(M)},4847:function(t,e,r){"use strict";var n,a=Object.defineProperty,i=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyNames,o=Object.prototype.hasOwnProperty,c={};((t,e)=>{for(var r in e)a(t,r,{get:e[r],enumerable:!0})})(c,{Environment:()=>_,Operation:()=>I,Status:()=>P,Type:()=>T,WebhookIdentityType:()=>w,cancelTask:()=>M,createTask:()=>O,getTask:()=>k,listTasks:()=>D}),t.exports=(n=c,((t,e,r,n)=>{if(e&&"object"==typeof e||"function"==typeof e)for(let c of s(e))o.call(t,c)||c===r||a(t,c,{get:()=>e[c],enumerable:!(n=i(e,c))||n.enumerable});return t})(a({},"__esModule",{value:!0}),n));var l=r(9914),u=r(9566),d=r(7512),h=r(1365),p=r(1365),m=r(4615),f=r(7512);function g(t){return(0,f.resolveUrl)(Object.assign(t,{domainToMappings:{"editor._base_domain_":[{srcPath:"/_api/autocms/v1/tasks",destPath:"/v1"}],"blocks._base_domain_":[{srcPath:"/_api/autocms/v1/tasks",destPath:"/v1"}],"create.editorx":[{srcPath:"/_api/autocms/v1/tasks",destPath:"/v1"}],"manage._base_domain_":[{srcPath:"/_api/autocms/v1/tasks",destPath:"/v1"}],"www._base_domain_":[{srcPath:"/_api/autocms/v1/tasks",destPath:"/v1"}],"api._api_base_domain_":[{srcPath:"/autocms/v1/tasks",destPath:"/v1"}],"www.wixapis.com":[{srcPath:"/cms/v1/tasks",destPath:"/v1"}],"*.dev.wix-code.com":[{srcPath:"/_api/autocms/v1/tasks",destPath:"/v1"}],_:[{srcPath:"/_api/autocms/v1/tasks",destPath:"/v1"}]}}))}var v="@wix/auto_sdk_data_tasks";function E(t){return function({host:e}){const r=(0,m.transformPaths)(t,[{transformFn:h.transformSDKTimestampToRESTTimestamp,paths:[{path:"task.startedAt"},{path:"task.finishedAt"},{path:"task.updatePublishStatusOptions.scheduleDraftStatusOptions.date"},{path:"task.updatePublishStatusOptions.schedulePublishedStatusOptions.date"}]}]);return{entityFqdn:"wix.data.autocms.v2.background_task",method:"POST",methodFqn:"wix.cloud.autocms.tasks.v1.TaskService.CreateTask",packageName:v,url:g({protoPath:"/v1",data:r,host:e}),data:r,transformResponse:t=>(0,m.transformPaths)(t,[{transformFn:p.transformRESTTimestampToSDKTimestamp,paths:[{path:"task.startedAt"},{path:"task.finishedAt"},{path:"task.updatePublishStatusOptions.scheduleDraftStatusOptions.date"},{path:"task.updatePublishStatusOptions.schedulePublishedStatusOptions.date"}]}])}}}function y(t){return function({host:e}){return{entityFqdn:"wix.data.autocms.v2.background_task",method:"GET",methodFqn:"wix.cloud.autocms.tasks.v1.TaskService.ListTasks",packageName:v,url:g({protoPath:"/v1",data:t,host:e}),params:(0,d.toURLSearchParams)(t),transformResponse:t=>(0,m.transformPaths)(t,[{transformFn:p.transformRESTTimestampToSDKTimestamp,paths:[{path:"tasks.startedAt"},{path:"tasks.finishedAt"},{path:"tasks.updatePublishStatusOptions.scheduleDraftStatusOptions.date"},{path:"tasks.updatePublishStatusOptions.schedulePublishedStatusOptions.date"}]}])}}}function b(t){return function({host:e}){return{entityFqdn:"wix.data.autocms.v2.background_task",method:"GET",methodFqn:"wix.cloud.autocms.tasks.v1.TaskService.GetTask",packageName:v,url:g({protoPath:"/v1/{taskId}",data:t,host:e}),params:(0,d.toURLSearchParams)(t),transformResponse:t=>(0,m.transformPaths)(t,[{transformFn:p.transformRESTTimestampToSDKTimestamp,paths:[{path:"task.startedAt"},{path:"task.finishedAt"},{path:"task.updatePublishStatusOptions.scheduleDraftStatusOptions.date"},{path:"task.updatePublishStatusOptions.schedulePublishedStatusOptions.date"}]}])}}}function S(t){return function({host:e}){return{entityFqdn:"wix.data.autocms.v2.background_task",method:"DELETE",methodFqn:"wix.cloud.autocms.tasks.v1.TaskService.CancelTask",packageName:v,url:g({protoPath:"/v1/{taskId}",data:t,host:e}),params:(0,d.toURLSearchParams)(t),transformResponse:t=>(0,m.transformPaths)(t,[{transformFn:p.transformRESTTimestampToSDKTimestamp,paths:[{path:"task.startedAt"},{path:"task.finishedAt"},{path:"task.updatePublishStatusOptions.scheduleDraftStatusOptions.date"},{path:"task.updatePublishStatusOptions.schedulePublishedStatusOptions.date"}]}])}}}var T=(t=>(t.UNKNOWN="UNKNOWN",t.DELETE_BY_QUERY="DELETE_BY_QUERY",t.COPY_FIELD_DATA="COPY_FIELD_DATA",t.EDIT_FIELD_DATA="EDIT_FIELD_DATA",t.UPDATE_PUBLISH_STATUS="UPDATE_PUBLISH_STATUS",t))(T||{}),P=(t=>(t.NEW="NEW",t.RUNNING="RUNNING",t.COMPLETED="COMPLETED",t.FAILED="FAILED",t))(P||{}),_=(t=>(t.UNKNOWN_ENVIRONMENT="UNKNOWN_ENVIRONMENT",t.SANDBOX="SANDBOX",t.SANDBOX_PREFERRED="SANDBOX_PREFERRED",t.LIVE="LIVE",t))(_||{}),I=(t=>(t.UNDEFINED="UNDEFINED",t.SET_PUBLISHED_STATUS="SET_PUBLISHED_STATUS",t.SET_DRAFT_STATUS="SET_DRAFT_STATUS",t.SCHEDULE_PUBLISHED_STATUS="SCHEDULE_PUBLISHED_STATUS",t.SCHEDULE_DRAFT_STATUS="SCHEDULE_DRAFT_STATUS",t.CANCEL_SCHEDULING="CANCEL_SCHEDULING",t))(I||{}),w=(t=>(t.UNKNOWN="UNKNOWN",t.ANONYMOUS_VISITOR="ANONYMOUS_VISITOR",t.MEMBER="MEMBER",t.WIX_USER="WIX_USER",t.APP="APP",t))(w||{});function R(t){return e=>async function(t){const{httpClient:e,sideEffects:r}=arguments[1],n=E((0,u.renameKeysFromSDKRequestToRESTRequest)({task:t}));r?.onSiteCall?.();try{const t=await e.request(n);return r?.onSuccess?.(t),(0,u.renameKeysFromRESTResponseToSDKResponse)(t.data)?.task}catch(t){const e=(0,l.transformError)(t,{spreadPathsToArguments:{},explicitPathsToArguments:{task:"$[0]"},singleArgumentUnchanged:!1},["task"]);throw r?.onError?.(t),e}}(e,{httpClient:t})}function N(t){return e=>async function(t){const{httpClient:e,sideEffects:r}=arguments[1],n=y((0,u.renameKeysFromSDKRequestToRESTRequest)({paging:t?.paging}));r?.onSiteCall?.();try{const t=await e.request(n);return r?.onSuccess?.(t),(0,u.renameKeysFromRESTResponseToSDKResponse)(t.data)}catch(t){const e=(0,l.transformError)(t,{spreadPathsToArguments:{},explicitPathsToArguments:{paging:"$[0].paging"},singleArgumentUnchanged:!1},["options"]);throw r?.onError?.(t),e}}(e,{httpClient:t})}function A(t){return e=>async function(t){const{httpClient:e,sideEffects:r}=arguments[1],n=b((0,u.renameKeysFromSDKRequestToRESTRequest)({taskId:t}));r?.onSiteCall?.();try{const t=await e.request(n);return r?.onSuccess?.(t),(0,u.renameKeysFromRESTResponseToSDKResponse)(t.data)?.task}catch(t){const e=(0,l.transformError)(t,{spreadPathsToArguments:{},explicitPathsToArguments:{taskId:"$[0]"},singleArgumentUnchanged:!1},["taskId"]);throw r?.onError?.(t),e}}(e,{httpClient:t})}function C(t){return e=>async function(t){const{httpClient:e,sideEffects:r}=arguments[1],n=S((0,u.renameKeysFromSDKRequestToRESTRequest)({taskId:t}));r?.onSiteCall?.();try{const t=await e.request(n);return r?.onSuccess?.(t),(0,u.renameKeysFromRESTResponseToSDKResponse)(t.data)}catch(t){const e=(0,l.transformError)(t,{spreadPathsToArguments:{},explicitPathsToArguments:{taskId:"$[0]"},singleArgumentUnchanged:!1},["taskId"]);throw r?.onError?.(t),e}}(e,{httpClient:t})}var x=r(7512),O=(0,x.createRESTModule)(R),D=(0,x.createRESTModule)(N),k=(0,x.createRESTModule)(A),M=(0,x.createRESTModule)(C)},8731:function(t,e,r){"use strict";var n,a=Object.create,i=Object.defineProperty,s=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,c=Object.getPrototypeOf,l=Object.prototype.hasOwnProperty,u=(t,e,r,n)=>{if(e&&"object"==typeof e||"function"==typeof e)for(let a of o(e))l.call(t,a)||a===r||i(t,a,{get:()=>e[a],enumerable:!(n=s(e,a))||n.enumerable});return t},d=(t,e,r)=>(r=null!=t?a(c(t)):{},u(!e&&t&&t.__esModule?r:i(r,"default",{value:t,enumerable:!0}),t)),h={};((t,e)=>{for(var r in e)i(t,r,{get:e[r],enumerable:!0})})(h,{backups:()=>g,collections:()=>v,externalDatabaseConnections:()=>f,indexes:()=>E,items:()=>b,movementJobs:()=>y,permissions:()=>m,tasks:()=>p}),t.exports=(n=h,u(i({},"__esModule",{value:!0}),n));var p=d(r(4847)),m=d(r(9066)),f=d(r(2067)),g=d(r(6260)),v=d(r(3799)),E=d(r(9496)),y=d(r(5824)),b=d(r(9204))},3359:function(t,e,r){"use strict";r.r(e);var n=r(2698),a={};for(var i in n)"default"!==i&&(a[i]=function(t){return n[t]}.bind(0,i));r.d(e,a)},4593:function(t,e,r){"use strict";r.d(e,{q:function(){return O}});var n=r(6994),a=r.n(n);function i(t){return{evid:100,src:176,endpoint:"",params:t}}function s(t){return{evid:101,src:176,endpoint:"",params:t}}function o(t){return{evid:102,src:176,endpoint:"",params:t}}function c(t){return{evid:103,src:176,endpoint:"",params:t}}function l(t){return{evid:404,src:176,endpoint:"",params:t}}const u={400:"INVALID_ARGUMENT",401:"UNAUTHENTICATED",403:"PERMISSION_DENIED",404:"NOT_FOUND",409:"ALREADY_EXISTS",428:"FAILED_PRECONDITION",429:"RESOURCE_EXHAUSTED",499:"CANCELED",500:"INTERNAL",501:"NOT_IMPLEMENTED",502:"BAD_GATEWAY",503:"UNAVAILABLE"};function d(t){const{errorAccessor:e,errorCodesMap:r}=t,{applicationError:n,statusCode:a,error:i,validationError:s}=e;if(n){var o;const{code:t}=n,e=null==(o=r.applicationError)?void 0:o[t];if(!1===e)return null;if(e)return e(n,i)}if(r.validationError){var c;const t=Object.keys(r.validationError),e=null==s||null==(c=s.fieldViolations)?void 0:c.find((e=>{let{ruleName:r}=e;return t.includes(r)}));if(null!=e&&e.ruleName){var l;const t=null==(l=r.validationError)?void 0:l[e.ruleName];if(t)return t(i)}}const d=null!=a?u[a]:null,h={...r.serverError?{INTERNAL:r.serverError,NOT_IMPLEMENTED:r.serverError,BAD_GATEWAY:r.serverError,UNAVAILABLE:r.serverError}:{},...r.statusCodeError},p=null!=d?h[d]:null;return p?p(i):null}class h{constructor(t){a()(this,"errorAccessor",void 0),a()(this,"errorCodesMap",void 0),a()(this,"commonErrorsMapState",void 0),a()(this,"onlineManager",void 0),a()(this,"consumerResolvedError",void 0),a()(this,"commonResolvedError",void 0),this.commonErrorsMapState=t.commonErrorsMapState,this.errorAccessor=t.errorAccessor,this.errorCodesMap=t.errorCodesMap,this.onlineManager=t.onlineManager}get commonErrors(){return this.commonErrorsMapState.commonErrors}_resolveNetworkError(){const{onlineManager:t,commonErrors:e,errorAccessor:r}=this;return e?t.onLine?e.getNetworkErrorShowErrorProps(r):e.connectionErrorShowErrorProps:null}_resolveCommonError(){const{errorAccessor:t,commonErrors:e,errorCodesMap:r}=this,{error:n,httpError:a,validationError:i}=t;if(null==a)return this._resolveNetworkError();if(!e)return null;var s;if(i)return null==(s=e.commonErrorsMap.statusCodeError)||null==s.INVALID_ARGUMENT?void 0:s.INVALID_ARGUMENT(n);const o=d({errorAccessor:t,errorCodesMap:e.commonErrorsMap});return o||((null==r||null==r.serverError?void 0:r.serverError(n))??e.defaultErrorShowErrorProps)}_resolveConsumerError(){const{errorCodesMap:t,errorAccessor:e}=this,{httpError:r}=e;return null==r||null==t?null:d({errorAccessor:e,errorCodesMap:t})}resolve(){this.consumerResolvedError=this._resolveConsumerError(),null==this.consumerResolvedError&&(this.commonResolvedError=this._resolveCommonError())}get errorToShow(){return this.consumerResolvedError??this.commonResolvedError}}function p(t){return null!=t}class m{constructor(t){a()(this,"inputError",void 0),a()(this,"_error",void 0),a()(this,"_httpError",void 0),a()(this,"_errorDetails",void 0),this.inputError=t.error}get error(){const{inputError:t}=this;return this._error??="undefined"!=typeof Response&&t instanceof Response||t instanceof Error?t:null}get exceptionMessage(){var t;return null==(t=this.error)?void 0:t.message}get httpError(){const{inputError:t}=this;return this._httpError??=p(e=t)&&null!=e.response?t:"undefined"!=typeof Response&&t instanceof Response?function(t){var e;return{response:{data:null==(e=t._errorHandlerState)?void 0:e.responseData,status:t.status},requestId:t.headers.get("X-Wix-Request-Id")}}(t):function(t){return null!=t&&null!=t.status}(t)?function(t){return{response:{data:{details:t.details},status:t.status},requestId:t.requestId}}(t):null;var e}get errorHandlerState(){const{error:t}=this;return t?t._errorHandlerState??={}:null}get clientCode(){var t;return null==(t=this.httpError)?void 0:t.code}get errorResponse(){var t;return null==(t=this.httpError)?void 0:t.response}get statusCode(){var t;return null==(t=this.errorResponse)?void 0:t.status}get errorData(){var t;return null==(t=this.errorResponse)?void 0:t.data}get errorDetails(){const{errorData:t}=this;return this._errorDetails??=p(e=t)&&null!=e.details?t.details:null;var e}get errorMessage(){const{errorData:t}=this;return p(e=t)&&null!=e.message?t.message:void 0;var e}get applicationError(){var t;return null==(t=this.errorDetails)?void 0:t.applicationError}get validationError(){var t;return null==(t=this.errorDetails)?void 0:t.validationError}}const f={ar:()=>r.e(655).then(r.t.bind(r,3217,19)),bg:()=>r.e(660).then(r.t.bind(r,4447,19)),ca:()=>r.e(912).then(r.t.bind(r,6113,19)),cs:()=>r.e(299).then(r.t.bind(r,1344,19)),da:()=>r.e(81).then(r.t.bind(r,6968,19)),de:()=>r.e(317).then(r.t.bind(r,5093,19)),el:()=>r.e(42).then(r.t.bind(r,9855,19)),en:()=>r.e(408).then(r.t.bind(r,246,19)),es:()=>r.e(91).then(r.t.bind(r,2363,19)),fi:()=>r.e(615).then(r.t.bind(r,1962,19)),fr:()=>r.e(282).then(r.t.bind(r,8894,19)),he:()=>r.e(370).then(r.t.bind(r,4135,19)),hi:()=>r.e(719).then(r.t.bind(r,1672,19)),hr:()=>r.e(122).then(r.t.bind(r,5210,19)),hu:()=>r.e(470).then(r.t.bind(r,366,19)),id:()=>r.e(963).then(r.t.bind(r,6330,19)),it:()=>r.e(246).then(r.t.bind(r,9303,19)),ja:()=>r.e(569).then(r.t.bind(r,5837,19)),ko:()=>r.e(746).then(r.t.bind(r,907,19)),lt:()=>r.e(878).then(r.t.bind(r,998,19)),lv:()=>r.e(553).then(r.t.bind(r,9500,19)),ms:()=>r.e(559).then(r.t.bind(r,6960,19)),nl:()=>r.e(612).then(r.t.bind(r,901,19)),no:()=>r.e(258).then(r.t.bind(r,4511,19)),pl:()=>r.e(566).then(r.t.bind(r,7605,19)),pt:()=>r.e(143).then(r.t.bind(r,2223,19)),ro:()=>r.e(373).then(r.t.bind(r,9879,19)),ru:()=>r.e(537).then(r.t.bind(r,5504,19)),sk:()=>r.e(92).then(r.t.bind(r,5767,19)),sl:()=>r.e(868).then(r.t.bind(r,6224,19)),sv:()=>r.e(960).then(r.t.bind(r,1447,19)),th:()=>r.e(315).then(r.t.bind(r,3627,19)),tl:()=>r.e(710).then(r.t.bind(r,119,19)),tr:()=>r.e(103).then(r.t.bind(r,8046,19)),uk:()=>r.e(255).then(r.t.bind(r,1044,19)),vi:()=>r.e(780).then(r.t.bind(r,3748,19)),zh:()=>r.e(474).then(r.t.bind(r,9811,19))},g=async t=>{const e=f[t];if(null==e)throw new Error(`@wix/cairo: Failed to find translations for locale '${t}'`);return"object"==typeof(r=await e()).default?r.default:r;var r};class v{constructor(t){a()(this,"i18n",void 0),a()(this,"_initPromise",void 0),a()(this,"_ready",void 0),a()(this,"translate",((t,e)=>this.i18n.t(t,e))),a()(this,"getTranslateFn",(async()=>(await this.getInitPromise(),this.translate))),this.i18n=t.createI18n({asyncMessagesLoader:g,disableAutoInit:!0}),this._initPromise=new Promise((async t=>{var e,r;let n=!1;const a=(e,r,i)=>{var s,o;"en"===e&&(null==(s=(o=this.i18n).off)||s.call(o,"failedLoading",a),n=!0,t(i))};null==(e=(r=this.i18n).on)||e.call(r,"failedLoading",a);try{if(await this.i18n.init(),n)return;t(null),this._ready=!0}catch(e){t(e)}}))}async getInitPromise(){const t=await this._initPromise;if(t)throw t}}var E,y={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)},b=new Uint8Array(16);function S(){if(!E&&!(E="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return E(b)}for(var T=[],P=0;P<256;++P)T.push((P+256).toString(16).slice(1));function _(t,e=0){return(T[t[e+0]]+T[t[e+1]]+T[t[e+2]]+T[t[e+3]]+"-"+T[t[e+4]]+T[t[e+5]]+"-"+T[t[e+6]]+T[t[e+7]]+"-"+T[t[e+8]]+T[t[e+9]]+"-"+T[t[e+10]]+T[t[e+11]]+T[t[e+12]]+T[t[e+13]]+T[t[e+14]]+T[t[e+15]]).toLowerCase()}var I=function(t,e,r){if(y.randomUUID&&!e&&!t)return y.randomUUID();var n=(t=t||{}).random||(t.rng||S)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,e){r=r||0;for(var a=0;a<16;++a)e[r+a]=n[a];return e}return _(n)};function w(t,e){const{message:r,action:n,errorAccessor:a,errorResolution:i}=e,{biLogger:o,commonErrorsMapState:c,translations:l}=t,{errorHandlerState:u}=a,{consumerResolvedError:d}=i??{};o.report(s({session_id:null==u?void 0:u.sessionId,translated_message:r,action_text:null==n?void 0:n.text,is_consumer_resolved_error:null!=d,common_errors_load_failed:String(null==c.commonErrors),isEn:"en"===l.i18n.language}))}const R=()=>r.e(360).then(r.bind(r,2899));class N{constructor(t){a()(this,"translations",void 0),a()(this,"errorMonitor",void 0),a()(this,"webWindow",void 0),a()(this,"getErrorCodesMap",void 0),a()(this,"_initPromise",void 0),a()(this,"commonErrors",void 0),this.translations=t.translations,this.errorMonitor=t.errorMonitor,this.webWindow=t.webWindow,this.getErrorCodesMap=t.getErrorCodesMap??R,this._initPromise=this._init()}async getInitPromise(){const t=await this._initPromise;if(t)throw t}async _init(){try{const{setCommonErrors:t}=await this.getErrorCodesMap();return await t(this),null}catch(t){return t}}}const A="This action wasn't completed due to a technical issue.";class C{constructor(t){var e=this;a()(this,"errorHandler",void 0),a()(this,"withErrorHandler",(async function(t,r,n){void 0===n&&(n={});const{errorHandler:a}=e,i={errorCodesMap:{validationError:r,statusCodeError:n.statusCodesOverrides,applicationError:Object.entries(r).reduce(((t,e)=>{let[r,n]=e;return n&&(t[r]=(t,e)=>n(e)),t}),{}),serverError:n.serverErrorOverride}},s=await a.withErrorHandler(t,i);if("undefined"!=typeof Response&&s instanceof Response){const t=new m({error:s});a._setErrorHandlerErrorCodesMap(t,i);const{errorHandlerState:e}=t;!s.ok&&e&&(e.responseData=await s.json().catch((()=>null)))}return s})),a()(this,"getResolvedError",(t=>{const{errorHandler:e}=this,{errorMonitor:r}=e;try{const r=new m({error:t}),{httpError:n,errorHandlerState:a}=r,i=e._resolveError(r),s=null==a?void 0:a.resolvedError,o=(null==s?void 0:s.message)??A,c=null==s?void 0:s.action,l=(null==s?void 0:s.requestId)??(null==n?void 0:n.requestId);return w(e,{message:o,action:c,errorAccessor:r,errorResolution:i}),{message:o,action:c,requestId:l,...s}}catch(t){throw console.error(t),r.captureException(t),t}})),a()(this,"showError",((t,e)=>{this.errorHandler.showError(t,e)})),a()(this,"reportRetryAttempt",(t=>{this.errorHandler.reportRetryAttempt(t)})),a()(this,"handleError",((t,e)=>{const{errorHandler:r}=this;"undefined"!=typeof Response&&t instanceof Response&&t.ok||r.handleError(t,e)})),this.errorHandler=t}}function x(t){var e;return null==t?t:null==(e=t.split(",")[0])?void 0:e.trim()}class O{constructor(t){var e=this;a()(this,"environment",void 0),a()(this,"biDefaultsOverrides",void 0),a()(this,"biLogger",void 0),a()(this,"errorMonitor",void 0),a()(this,"experiments",void 0),a()(this,"platformShowError",void 0),a()(this,"translations",void 0),a()(this,"commonErrorsMapState",void 0),a()(this,"onlineManager",void 0),a()(this,"webWindow",void 0),a()(this,"_skipWaitTranslations",void 0),a()(this,"v2",void 0),a()(this,"handleError",(function(t,r){if(void 0===r&&(r={}),e._isErrorHandlerDisabled())return;const{errorMonitor:n}=e;try{const n=new m({error:t});e._setErrorHandlerSessionId(n),function(t,e){var r;const{errorAccessor:n,requestOptions:a}=e,{biLogger:i,onlineManager:s,webWindow:o,environment:c,biDefaultsOverrides:u}=t,{statusCode:d,errorData:h,errorDetails:p,errorMessage:m,exceptionMessage:f,httpError:g,errorHandlerState:v}=n,E=null==g?void 0:g.config;i.report(l({artifact_id:c.artifactId,full_artifact_id:c.fullArtifactId,hostingEnvironment:null==u?void 0:u.hostingEnvironment,app_id:null==u?void 0:u.app_id,artifactVersion:c.version,error_code:d,error_json:h?JSON.stringify(h):void 0,exception_message:f,error_message:m,client_error_code:null==n?void 0:n.clientCode,error_type:null!=p&&p.applicationError?"applicationError":null!=p&&p.validationError?"validationError":void 0,request_id:null==g?void 0:g.requestId,hasInternetConnection:s.onLine,pageUrl:null==o||null==(r=o.location)?void 0:r.href,session_id:null==v?void 0:v.sessionId,serverUrl:(null==E?void 0:E.url)||(null==a?void 0:a.url),method:(null==E?void 0:E.method)||(null==a?void 0:a.method)||"unknown",entity_fqdn:(null==E?void 0:E.entityFqdn)||(null==a?void 0:a.entityFqdn),method_fqn:(null==E?void 0:E.methodFqn)||(null==a?void 0:a.methodFqn),server_artifactid:null==E?void 0:E.artifactId}))}(e,{errorAccessor:n,requestOptions:r.requestOptions})}catch(t){console.error(t),n.captureException(t)}})),a()(this,"withErrorHandler",(async(t,e)=>{try{return await t()}catch(t){const r=new m({error:t});throw this._setErrorHandlerErrorCodesMap(r,e),t}})),a()(this,"getResolvedError",(t=>{const{errorMonitor:e}=this;try{const e=new m({error:t}),{applicationError:r,validationError:n,httpError:a,errorHandlerState:i}=e,s=this._resolveError(e),o=null==i?void 0:i.resolvedError,c=(null==o?void 0:o.message)??A;return w(this,{message:c,action:null==o?void 0:o.action,errorAccessor:e,errorResolution:s}),{message:c,action:null==o?void 0:o.action,validationError:n,applicationError:r,httpError:a,requestId:x(null==a?void 0:a.requestId)}}catch(t){throw console.error(t),e.captureException(t),t}})),a()(this,"reportRetryAttempt",(t=>{const{errorMonitor:e}=this;try{!function(t,e){const{biLogger:r}=t,{errorAccessor:n}=e,{errorHandlerState:a}=n,i=null==a?void 0:a.sessionId;i&&r.report(c({session_id:i}))}(this,{errorAccessor:new m({error:t})})}catch(t){console.error(t),e.captureException(t)}})),a()(this,"showError",((t,e)=>{const{platformShowError:r,errorMonitor:n}=this;if(r)try{var a;const n=new m({error:t}),{errorHandlerState:i}=n;this._resolveError(n);const s=null==i?void 0:i.resolvedError,c={...s,...e},l=(null==e?void 0:e.message)??(null==s?void 0:s.message)??A,u=(null==e?void 0:e.action)??(null==s?void 0:s.action);!function(t,e){var r;const{message:n,action:a,errorAccessor:i}=e,{biLogger:s,translations:c}=t;s.report(o({session_id:null==(r=i.errorHandlerState)?void 0:r.sessionId,displayed_message:n,displayed_action:null==a?void 0:a.text,action_was_provided:String(null!=(null==a?void 0:a.onClick)),isEn:"en"===c.i18n.language}))}(this,{message:l,action:u,errorAccessor:n}),r({...c,requestId:x(null==(a=n.httpError)?void 0:a.requestId),message:l,action:null!=u&&u.onClick?{text:u.text,onClick:u.onClick}:void 0})}catch(t){console.error(t),n.captureException(t)}})),this.environment=t.environment,this.biDefaultsOverrides=t.biDefaultsOverrides,this.biLogger=function(t){return"function"==typeof t.biLoggerOrFactory?t.biLoggerOrFactory().logger():t.biLoggerOrFactory}(t),this.errorMonitor=t.createErrorMonitor({dsn:"https://831e1d96e7944c6aae0c9ed9d6babd35@sentry.wixpress.com/5896"}),this.experiments=null==t.createExperiments?void 0:t.createExperiments({scopes:["error-handler"]}),this.platformShowError=t.showError,this.translations=new v(t),this.onlineManager=t.onlineManager??("undefined"!=typeof navigator?navigator:{onLine:!0}),this.webWindow=t.webWindow??("undefined"!=typeof window?window:void 0),this.commonErrorsMapState=new N(this),this.v2=new C(this)}_setErrorHandlerSessionId(t){const{errorHandlerState:e}=t;e&&(e.sessionId=I())}_setErrorHandlerResolvedError(t,e){const{errorHandlerState:r}=t;r&&(r.resolvedError=e.errorToShow)}_setErrorHandlerErrorCodesMap(t,e){void 0===e&&(e={});const{errorCodesMap:r}=e;!function(t,e){var r;const{errorAccessor:n,errorCodesMap:a}=e,{biLogger:s}=t,{errorHandlerState:o,applicationError:c}=n,l=null==c?void 0:c.code,u=null==a||null==(r=a.applicationError)?void 0:r[l];s.report(i({error_opt_out:!1===u,is_override_error:String(null!=a),session_id:null==o?void 0:o.sessionId}))}(this,{errorAccessor:t,errorCodesMap:r});const{errorHandlerState:n}=t;n&&(n.errorCodesMap=r)}_isErrorHandlerDisabled(){const{experiments:t}=this;return null!=t&&!t.enabled("specs.os.EnableErrorHandlerInEditor")}_resolveError(t,e){var r;if(void 0===e&&(e={}),this._isErrorHandlerDisabled())return;const n=function(t,e){const{commonErrorsMapState:r,onlineManager:n}=t,{errorAccessor:a,errorCodesMap:i}=e,s=new h({errorAccessor:a,errorCodesMap:i,commonErrorsMapState:r,onlineManager:n});return s.resolve(),s}(this,{errorAccessor:t,errorCodesMap:e.errorCodesMap??(null==(r=t.errorHandlerState)?void 0:r.errorCodesMap)});return this._setErrorHandlerResolvedError(t,n),n}toJSON(){return{}}}},6488:function(t,e,r){"use strict";r.d(e,{s:function(){return n}});const n={withErrorHandler:t=>t(),getResolvedError:()=>({message:""}),showError:()=>{},reportRetryAttempt:()=>{}}},9074:function(t,e,r){"use strict";r.r(e),r.d(e,{ErrorHandler:function(){return n.q},noOpErrorHandler:function(){return a.s}});var n=r(4593),a=r(6488),i=r(3359),s={};for(var o in i)["default","ErrorHandler","noOpErrorHandler"].indexOf(o)<0&&(s[o]=function(t){return i[t]}.bind(0,o));r.d(e,s)},2698:function(t,e,r){"use strict";r.r(e);var n=r(2323),a={};for(var i in n)"default"!==i&&(a[i]=function(t){return n[t]}.bind(0,i));r.d(e,a)},6174:function(){},5329:function(){},8671:function(){},6054:function(){},3120:function(){},6199:function(){},5583:function(){},4256:function(){},2323:function(t,e,r){"use strict";r.r(e);var n=r(6174),a={};for(var i in n)"default"!==i&&(a[i]=function(t){return n[t]}.bind(0,i));r.d(e,a);var s=r(5583);a={};for(var i in s)"default"!==i&&(a[i]=function(t){return s[t]}.bind(0,i));r.d(e,a);var o=r(4256);a={};for(var i in o)"default"!==i&&(a[i]=function(t){return o[t]}.bind(0,i));r.d(e,a);var c=r(2323);a={};for(var i in c)"default"!==i&&(a[i]=function(t){return c[t]}.bind(0,i));r.d(e,a);var l=r(5329);a={};for(var i in l)"default"!==i&&(a[i]=function(t){return l[t]}.bind(0,i));r.d(e,a);var u=r(8671);a={};for(var i in u)"default"!==i&&(a[i]=function(t){return u[t]}.bind(0,i));r.d(e,a);var d=r(6054);a={};for(var i in d)"default"!==i&&(a[i]=function(t){return d[t]}.bind(0,i));r.d(e,a);var h=r(3120);a={};for(var i in h)"default"!==i&&(a[i]=function(t){return h[t]}.bind(0,i));r.d(e,a);var p=r(6199);a={};for(var i in p)"default"!==i&&(a[i]=function(t){return p[t]}.bind(0,i));r.d(e,a);var m=r(9880);a={};for(var i in m)"default"!==i&&(a[i]=function(t){return m[t]}.bind(0,i));r.d(e,a)},9880:function(){},7597:function(t,e,r){"use strict";r.r(e),r.d(e,{location:function(){return i},queryParams:function(){return a}});var n=r(8409);const a=(0,n.createHostModule)({add:({channel:t})=>function(...e){return t.invoke({namespace:"location",method:"queryParams.add",args:e})},remove:({channel:t})=>function(...e){return t.invoke({namespace:"location",method:"queryParams.remove",args:e})}}),i=(0,n.createHostModule)({baseUrl:({channel:t})=>function(...e){return t.invoke({namespace:"location",method:"baseUrl",args:e})},path:({channel:t})=>function(...e){return t.invoke({namespace:"location",method:"path",args:e})},prefix:({channel:t})=>function(...e){return t.invoke({namespace:"location",method:"prefix",args:e})},protocol:({channel:t})=>function(...e){return t.invoke({namespace:"location",method:"protocol",args:e})},query:({channel:t})=>function(...e){return t.invoke({namespace:"location",method:"query",args:e})},url:({channel:t})=>function(...e){return t.invoke({namespace:"location",method:"url",args:e})},onChange:({channel:t})=>function(...e){return t.invoke({namespace:"location",method:"onChange",args:e})},to:({channel:t})=>function(...e){return t.invoke({namespace:"location",method:"to",args:e})}})},6785:function(t,e,r){"use strict";r.r(e),r.d(e,{seo:function(){return n}});const n=(0,r(8409).createHostModule)({links:({channel:t})=>function(...e){return t.invoke({namespace:"seo",method:"links",args:e})},metaTags:({channel:t})=>function(...e){return t.invoke({namespace:"seo",method:"metaTags",args:e})},structuredData:({channel:t})=>function(...e){return t.invoke({namespace:"seo",method:"structuredData",args:e})},title:({channel:t})=>function(...e){return t.invoke({namespace:"seo",method:"title",args:e})},setLinks:({channel:t})=>function(...e){return t.invoke({namespace:"seo",method:"setLinks",args:e})},setMetaTags:({channel:t})=>function(...e){return t.invoke({namespace:"seo",method:"setMetaTags",args:e})},setStructuredData:({channel:t})=>function(...e){return t.invoke({namespace:"seo",method:"setStructuredData",args:e})},setTitle:({channel:t})=>function(...e){return t.invoke({namespace:"seo",method:"setTitle",args:e})}})},3514:function(t,e,r){"use strict";r.r(e),r.d(e,{site:function(){return i},wixRouterSitemapEntry:function(){return a}});var n=r(8409);const a=(0,n.createHostModule)({changeFrequency:({channel:t})=>function(...e){return t.invoke({namespace:"site",method:"wixRouterSitemapEntry.changeFrequency",args:e})},lastModified:({channel:t})=>function(...e){return t.invoke({namespace:"site",method:"wixRouterSitemapEntry.lastModified",args:e})},pageName:({channel:t})=>function(...e){return t.invoke({namespace:"site",method:"wixRouterSitemapEntry.pageName",args:e})},priority:({channel:t})=>function(...e){return t.invoke({namespace:"site",method:"wixRouterSitemapEntry.priority",args:e})},title:({channel:t})=>function(...e){return t.invoke({namespace:"site",method:"wixRouterSitemapEntry.title",args:e})},url:({channel:t})=>function(...e){return t.invoke({namespace:"site",method:"wixRouterSitemapEntry.url",args:e})}}),i=(0,n.createHostModule)({currency:({channel:t})=>function(...e){return t.invoke({namespace:"site",method:"currency",args:e})},currentPage:({channel:t})=>function(...e){return t.invoke({namespace:"site",method:"currentPage",args:e})},language:({channel:t})=>function(...e){return t.invoke({namespace:"site",method:"language",args:e})},regionalSettings:({channel:t})=>function(...e){return t.invoke({namespace:"site",method:"regionalSettings",args:e})},revision:({channel:t})=>function(...e){return t.invoke({namespace:"site",method:"revision",args:e})},timezone:({channel:t})=>function(...e){return t.invoke({namespace:"site",method:"timezone",args:e})},getFontsHtml:({channel:t})=>function(...e){return t.invoke({namespace:"site",method:"getFontsHtml",args:e})},getSiteDisplayName:({channel:t})=>function(...e){return t.invoke({namespace:"site",method:"getSiteDisplayName",args:e})},getSiteStructure:({channel:t})=>function(...e){return t.invoke({namespace:"site",method:"getSiteStructure",args:e})},getSiteThemeHtml:({channel:t})=>function(...e){return t.invoke({namespace:"site",method:"getSiteThemeHtml",args:e})},prefetchPageResources:({channel:t})=>function(...e){return t.invoke({namespace:"site",method:"prefetchPageResources",args:e})},routerSitemap:({channel:t})=>function(...e){return t.invoke({namespace:"site",method:"routerSitemap",args:e})}})},131:function(t,e,r){"use strict";r.r(e),r.d(e,{local:function(){return a},memory:function(){return i},session:function(){return s}});var n=r(8409);const a=(0,n.createHostModule)({clear:({channel:t})=>function(...e){return t.invoke({namespace:"storage",method:"local.clear",args:e})},getItem:({channel:t})=>function(...e){return t.invoke({namespace:"storage",method:"local.getItem",args:e})},removeItem:({channel:t})=>function(...e){return t.invoke({namespace:"storage",method:"local.removeItem",args:e})},setItem:({channel:t})=>function(...e){return t.invoke({namespace:"storage",method:"local.setItem",args:e})}}),i=(0,n.createHostModule)({clear:({channel:t})=>function(...e){return t.invoke({namespace:"storage",method:"memory.clear",args:e})},getItem:({channel:t})=>function(...e){return t.invoke({namespace:"storage",method:"memory.getItem",args:e})},removeItem:({channel:t})=>function(...e){return t.invoke({namespace:"storage",method:"memory.removeItem",args:e})},setItem:({channel:t})=>function(...e){return t.invoke({namespace:"storage",method:"memory.setItem",args:e})}}),s=(0,n.createHostModule)({clear:({channel:t})=>function(...e){return t.invoke({namespace:"storage",method:"session.clear",args:e})},getItem:({channel:t})=>function(...e){return t.invoke({namespace:"storage",method:"session.getItem",args:e})},removeItem:({channel:t})=>function(...e){return t.invoke({namespace:"storage",method:"session.removeItem",args:e})},setItem:({channel:t})=>function(...e){return t.invoke({namespace:"storage",method:"session.setItem",args:e})}})},3910:function(t,e,r){"use strict";r.r(e),r.d(e,{consentPolicy:function(){return a},lightbox:function(){return i},multilingual:function(){return s},rendering:function(){return o},warmupData:function(){return c},window:function(){return l}});var n=r(8409);const a=(0,n.createHostModule)({getCurrentConsentPolicy:({channel:t})=>function(...e){return t.invoke({namespace:"window",method:"consentPolicy.getCurrentConsentPolicy",args:e})},onConsentPolicyChanged:({channel:t})=>function(...e){return t.invoke({namespace:"window",method:"consentPolicy.onConsentPolicyChanged",args:e})},resetConsentPolicy:({channel:t})=>function(...e){return t.invoke({namespace:"window",method:"consentPolicy.resetConsentPolicy",args:e})},setConsentPolicy:({channel:t})=>function(...e){return t.invoke({namespace:"window",method:"consentPolicy.setConsentPolicy",args:e})}}),i=(0,n.createHostModule)({close:({channel:t})=>function(...e){return t.invoke({namespace:"window",method:"lightbox.close",args:e})},getContext:({channel:t})=>function(...e){return t.invoke({namespace:"window",method:"lightbox.getContext",args:e})},open:({channel:t})=>function(...e){return t.invoke({namespace:"window",method:"lightbox.open",args:e})}}),s=(0,n.createHostModule)({currentLanguage:({channel:t})=>function(...e){return t.invoke({namespace:"window",method:"multilingual.currentLanguage",args:e})},isEnabled:({channel:t})=>function(...e){return t.invoke({namespace:"window",method:"multilingual.isEnabled",args:e})},siteLanguages:({channel:t})=>function(...e){return t.invoke({namespace:"window",method:"multilingual.siteLanguages",args:e})}}),o=(0,n.createHostModule)({env:({channel:t})=>function(...e){return t.invoke({namespace:"window",method:"rendering.env",args:e})}}),c=(0,n.createHostModule)({get:({channel:t})=>function(...e){return t.invoke({namespace:"window",method:"warmupData.get",args:e})},set:({channel:t})=>function(...e){return t.invoke({namespace:"window",method:"warmupData.set",args:e})}}),l=(0,n.createHostModule)({browserLocale:({channel:t})=>function(...e){return t.invoke({namespace:"window",method:"browserLocale",args:e})},formFactor:({channel:t})=>function(...e){return t.invoke({namespace:"window",method:"formFactor",args:e})},referrer:({channel:t})=>function(...e){return t.invoke({namespace:"window",method:"referrer",args:e})},viewMode:({channel:t})=>function(...e){return t.invoke({namespace:"window",method:"viewMode",args:e})},copyToClipboard:({channel:t})=>function(...e){return t.invoke({namespace:"window",method:"copyToClipboard",args:e})},getAppPageData:({channel:t})=>function(...e){return t.invoke({namespace:"window",method:"getAppPageData",args:e})},getBoundingRect:({channel:t})=>function(...e){return t.invoke({namespace:"window",method:"getBoundingRect",args:e})},getCurrentGeolocation:({channel:t})=>function(...e){return t.invoke({namespace:"window",method:"getCurrentGeolocation",args:e})},getRouterData:({channel:t})=>function(...e){return t.invoke({namespace:"window",method:"getRouterData",args:e})},openAppLightbox:({channel:t})=>function(...e){return t.invoke({namespace:"window",method:"openAppLightbox",args:e})},openLightbox:({channel:t})=>function(...e){return t.invoke({namespace:"window",method:"openLightbox",args:e})},openModal:({channel:t})=>function(...e){return t.invoke({namespace:"window",method:"openModal",args:e})},postMessage:({channel:t})=>function(...e){return t.invoke({namespace:"window",method:"postMessage",args:e})},registerEventListener:({channel:t})=>function(...e){return t.invoke({namespace:"window",method:"registerEventListener",args:e})},scrollBy:({channel:t})=>function(...e){return t.invoke({namespace:"window",method:"scrollBy",args:e})},scrollTo:({channel:t})=>function(...e){return t.invoke({namespace:"window",method:"scrollTo",args:e})},trackEvent:({channel:t})=>function(...e){return t.invoke({namespace:"window",method:"trackEvent",args:e})}})},9204:function(t,e,r){"use strict";r.r(e),r.d(e,{Environment:function(){return Le},PipelineBuilder:function(){return pr},WebhookIdentityType:function(){return Hr},aggregate:function(){return cn},aggregatePipeline:function(){return ln},bulkInsert:function(){return Xr},bulkPatch:function(){return on},bulkRemove:function(){return Qr},bulkSave:function(){return Jr},bulkUpdate:function(){return zr},expressions:function(){return jr},filter:function(){return dn},get:function(){return Gr},insert:function(){return Kr},insertReference:function(){return tn},isReferenced:function(){return Zr},onDataItemCreated:function(){return pn},onDataItemDeleted:function(){return fn},onDataItemUpdated:function(){return mn},patch:function(){return sn},query:function(){return nn},queryReferenced:function(){return un},remove:function(){return Wr},removeReference:function(){return en},replaceReferences:function(){return rn},save:function(){return Vr},search:function(){return an},stages:function(){return $r},truncate:function(){return Yr},update:function(){return qr},withEnvironment:function(){return hn}});var n=r(3251),a=r(8341),i=r.n(a);function s(t){return"object"===i()(t)}function o(t){return"array"===i()(t)}function c(t){return"date"===i()(t)}function l(t){return"number"===i()(t)}function u(t){return"boolean"===i()(t)}function d(t){return"string"===i()(t)}function h(t){return function(t){if(!d(t))return t;const e=t.slice(0,1).toUpperCase(),r=t.slice(1,t.length);return e+r}(i()(t))}var p=r(3835),m=r.n(p);const f={collectionNameMustBeAString:()=>"WDE0001: Collection name must be a string.",itemIdMustBeAString:()=>"WDE0002: ItemId must be a string.",itemIdsMustBeArrayOfStrings:()=>"WDE0068: Item ids must be an array of strings",removeItemsMustBeLessThanThousand:t=>`WDE0069: Failed to remove items from [${t}].\nCannot remove more than 1000 items in one request`,fieldNameMustBeAString:()=>"WDE0003: FieldName must be a string.",itemMustBeAnObject:(t,e)=>`WDE0004: Failed to save [${t}] into [${e}].\nItems must be JavaScript objects.`,itemsMustBeArrayOfObjects:t=>`WDE0005: Failed to bulk save items into [${t}].\nItems must be an array of JavaScript objects and itemIds must be strings if present.`,itemsMustBeLessThanThousand:t=>`WDE0006: Failed to bulk save items into [${t}].\nCannot insert more than 1000 items in one request`,updateItemInvalid:()=>"WDE0007: Invalid update. Updated object must have a string _id property.",invalidArgumentLength:(t,e,r,n)=>`WDE0008: wixData.${t} expects between ${e} and ${r} arguments, but was called with ${n}.`,aggregateValidations:{aggregateInvalid:(t,e)=>`Failed to perform aggregation on [${t}].\n${e.join("\n")}`,filterMustBeBuilder:t=>`WDE0011: Invalid ${t} usage. ${t} requires WixDataFilter.`,filterIsAlreadySet:t=>`WDE0012: Invalid ${t} usage. Filter is already set.`,groupIsAlreadySet:t=>`WDE0013: Invalid ${t} usage. Group is already set.`},filterBuilderInvalid:t=>`Failed to build a filter.\n${t.join("\n")}.`,groupBuilderInvalid:t=>`Failed to build group.\n${t.join("\n")}.`,filterMustBeAnObject:()=>"WDE0016: Filter must be an object.",sortBuilderInvalid:t=>`Failed to build a sort.\n${t.join("\n")}.`,optionsInvalid:t=>`WDE0018: Options must be an object with one or all of the following boolean properties: ${t.join(", ")}.`,referenceOperationParameterError:()=>"WDE0019: Reference operation takes a string ID or an object with an ID to be connected.",referenceOperationFieldError:t=>`WDE0020: Provided property [${t}] is not a multi-reference field.`,invalidReferenceError:()=>"WDE0021: Invalid reference",queryValidations:{queryInvalid:(t,e)=>`Failed to perform query on [${t}].\n${e.join("\n")}`,isNumber:(t,e,r)=>`WDE0032: Invalid ${t} parameter [${h(r)}]. ${t} parameter must be a ${e} number.`,isPositiveNumber:(t,e)=>`WDE0033: Invalid ${t} parameter [${e}]. ${t} parameter must be a positive number.`,isNonNegativeNumber:(t,e)=>`WDE0034: Invalid ${t} parameter [${e}]. ${t} parameter must be a non-negative number.`,isInteger:(t,e)=>`WDE0035: Invalid ${t} parameter [${e}]. ${t} parameter must be an integer.`,isNonEmptyString:t=>`WDE0094: Invalid ${t} parameter. ${t} parameter must be non-empty string.`,notGreaterThan:(t,e,r)=>`WDE0036: Invalid ${t} parameter [${e}]. ${t} parameter cannot exceed ${r}.`,invalidSkipParameter:(t,e)=>`WDE0037: Invalid query on [${t}].\nInvalid prev positioned query skip on a negative number ${e}.`,noPrevPage:t=>`WDE0159: Invalid query on [${t}].\nThere is no prev page.`,noNextPage:t=>`WDE0165: Invalid query on [${t}].\nThere is no next page.`},arityValidations:{arityIsZero:t=>`WDE0038: Invalid ${t} usage. ${t} does not take parameters.`,arityIsOne:t=>`WDE0039: Invalid ${t} usage. ${t} requires one parameter.`,arityIsTwo:t=>`WDE0040: Invalid ${t} usage. ${t} requires two parameters.`,arityIsThree:t=>`WDE0041: Invalid ${t} usage. ${t} requires three parameters.`,arityIsAtLeastTwo:t=>`WDE0042: Invalid ${t} usage. ${t} requires at least two parameters.`,arityIsAtLeastOne:t=>`WDE0043: Invalid ${t} usage. ${t} requires at least one parameter.`},filterValidations:{typeIsString:(t,e)=>`WDE0044: Invalid ${t} parameter value [${h(e)}]. ${t} parameter must be a String.`,typeIsStringNumberOrDate:(t,e)=>`WDE0045: Invalid ${t} parameter value [${h(e)}]. Valid ${t} parameter types are String, Number or Date.`,sameType:(t,e,r)=>`WDE0046: Invalid ${t} parameter values [${h(e)}] and [${h(r)}]. Both parameters must be of the same type.`,typeIsStringNumberOrDateForAll:t=>`WDE0047: Invalid ${t} usage. ${t} supports only Number, String or Date items.`,validFieldName:(t,e)=>`WDE0048: Invalid ${t} field value [${h(e)}]. ${t} field must be a String.`,isInstanceOfSameClass:(t,e,r)=>`WDE0049: Invalid ${t} parameter [${h(r)}]. ${t} expects ${e} only.`,isForCollection:(t,e,r)=>`WDE0050: Invalid ${t} parameter query for [${r}]. ${t} accepts ${e} for the same collection only.`},filterTreeValidations:{objectType:(t,e)=>`WDE0056: ${t} should be an Object. Got ${g(e)} instead`,arrayType:(t,e)=>`WDE0057: ${t} should be an Array. Got ${g(e)} instead`,arrayLength:(t,e,r)=>`WDE0057: ${g(r)}.length is ${r.length}. ${t} Array should have length ${e}`,comparisonOperatorType:(t,e)=>`WDE0058: ${t} should be a Date, Number, or String. Got ${g(e)} instead`,stringOperatorType:(t,e)=>`WDE0059: ${t} should be a String. Got ${g(e)} instead`,setOperatorItems:(t,e)=>`WDE0060: ${t} Array should only contain values of types Date, Number, and String. Got ${g(e)} instead`,inOperatorItems:t=>`WDE0061: $in Array should have length 2, and match [String, Number]. Got ${g(t)} instead`,matchesOperatorRequiredProperty:(t,e)=>`WDE0062: $matches value ${g(e)} does not have property ${t}`,matchesOperatorIgnoreCase:t=>`WDE0063: $matches.ignoreCase should equal true. Got ${g(t)} instead`,matchesOperatorSpecItems:t=>`WDE0064: $matches.spec Array values should be either {"type":"anyOf","value":" -"} or {"type":"literal","value":String}. Got ${g(t)} instead`,regexNotAllowed:()=>"WDE0070: $regex keyword is not allowed."},sortValidations:{typeIsStringOrArrayOfStrings:(t,e)=>`WDE0051: Invalid ${t} parameters [${e.map(h)}]. Valid ${t} values are String, Array of String or varargs String.`},orderByValidations:{sortModelType:t=>`WDE0065: Sort Model should be an Array. Got ${g(t)} instead`,sortModelItemType:t=>`WDE0066: Sort Model Array should contain values of type Object only. Got ${g(t)} instead`,sortModelItem:t=>`WDE0067: Sort Model Array items should have a single property with value "asc" or "desc". Got ${g(t)} instead`},internalError:t=>`WDE0053: Internal wixData error: ${t}`,serverInvalidResponse:t=>"WDE0055: Failed to parse server response."+(t?` ${t}`:""),itemDoesNotExist:(t,e)=>`WDE0073: Item [${t}] does not exist in collection [${e}].`,cursorPagingDoesNotSupportSkip:()=>"WDE0080: Skip is not supported in cursor paging.",payloadIsTooLarge:()=>"WDE0109: Payload is too large."};function g(t){return m()(t)}const v="WD_UNKNOWN_ERROR",E="WD_VALIDATION_ERROR";function y(t,e,r){return T(t,e,r)}function b(t){return T(t,E)}function S(t){const e=t.startsWith("WDE")?t.substring(0,7):"WDE0020";return T(t,void 0,{applicationError:{code:e,description:t}})}function T(t,e,r){const n=new(e&&e!==v?P:Error)(t);return e&&(n.code=e),r&&(n.details=r),n}class P extends Error{constructor(t){super(t),this.name="Error",this.errorGroup="User",Error.captureStackTrace&&Error.captureStackTrace(this,P)}}class _ extends Error{constructor(t,e,r,n,a){super(t),this.message=t,this.code=e,this.item=r,this.name=n,this.originalIndex=a,Error.captureStackTrace&&Error.captureStackTrace(this,_)}}function I(t){if(null==t||"object"!=typeof t)return t;let e=null;if(c(t))e=new Date(t.getTime());else{e=t.constructor();for(const r in t)e[r]=I(t[r])}return e}class w{constructor(){this._validations=[]}arityIsZero(t){return this.addValidation((()=>0===t.length),(()=>f.arityValidations.arityIsZero(this.operatorName??"")))}arityIsOne(t){return this.addValidation((()=>1===t.length),(()=>f.arityValidations.arityIsOne(this.operatorName??"")))}arityIsTwo(t){return this.addValidation((()=>2===t.length),(()=>f.arityValidations.arityIsTwo(this.operatorName??"")))}arityIsThree(t){return this.addValidation((()=>3===t.length),(()=>f.arityValidations.arityIsThree(this.operatorName??"")))}arityIsAtLeastTwo(t){return this.addValidation((()=>t.length>=2),(()=>f.arityValidations.arityIsAtLeastTwo(this.operatorName??"")))}arityIsAtLeastOne(t){return this.addValidation((()=>t.length>=1),(()=>f.arityValidations.arityIsAtLeastOne(this.operatorName??"")))}addValidation(t,e){return this._validations.push({predicateFn:t,messageFn:e}),this}}class R extends w{constructor(t){super(),this._invalidArguments=I(t)}validateAndAggregate(){const t=this._validations.every((({predicateFn:t,messageFn:e})=>this._appendIfInvalid(t(),e())));return[this._invalidArguments,t]}_appendIfInvalid(t,e){return!!t||(this._invalidArguments.push(e),!1)}}class N extends w{constructor(t=b){super(),this.buildError=t}validateAndReject(){return Promise.resolve().then((()=>{this._validations.forEach((({predicateFn:t,messageFn:e})=>{if(!t())throw this.buildError(e())}))}))}validateAndReturn(){const t=[];return this._validations.forEach((({predicateFn:e,messageFn:r})=>{e()||t.push(r())})),t}}class A extends N{arity(t,e,r,n){return this.addValidation((()=>e.length<=n&&e.length>=r),(()=>f.invalidArgumentLength(t,r,n,e.length)))}_isObject(t,e){return this.addValidation((()=>s(t)),(()=>f.itemMustBeAnObject(t,e)))}item(t,e,r){return this._isObject(t,e).addValidation((()=>void 0!==t._id?d(t._id):!r),(()=>f.updateItemInvalid()))}items(t,e){return this.addValidation((()=>o(t)&&t.every((t=>s(t)&&(void 0===t._id||null===t._id||d(t._id))))),(()=>f.itemsMustBeArrayOfObjects(e))).addValidation((()=>t.length<=1e3),(()=>f.itemsMustBeLessThanThousand(e)))}fieldName(t){return this.addValidation((()=>d(t)),(()=>f.fieldNameMustBeAString()))}itemId(t){return this.addValidation((()=>d(t)),(()=>f.itemIdMustBeAString()))}itemIds(t,e){return this.addValidation((()=>o(t)&&t.every((t=>d(t)))),(()=>f.itemIdsMustBeArrayOfStrings())).addValidation((()=>t.length<=1e3),(()=>f.removeItemsMustBeLessThanThousand(e)))}_options(t,e){return this.addValidation((()=>{const r=s(t)&&e.every((e=>{return"language"===e?null==(r=t[e])||d(r)&&r.length>0:function(t){return null==t||u(t)}(t[e]);var r}));return null==t||r}),(()=>f.optionsInvalid(e)))}referenceRemoveParameters(t){return this.addValidation((()=>o(t)&&t.every(x)),f.referenceOperationParameterError)}referenceParameters(t){return this.addValidation((()=>o(t)&&t.every(C)),f.referenceOperationParameterError)}referenceParameter(t){return this.addValidation((()=>C(t)),f.referenceOperationParameterError)}isNonEmptyString(t,e){return this.addValidation((()=>"string"==typeof t&&t.length>0),(()=>f.queryValidations.isNonEmptyString(e)))}references(t){return this.addValidation((()=>o(t)&&t.every((t=>d(t.relationshipName)&&C(t.left)&&C(t.right)))),f.invalidReferenceError)}options(t){return this._options(t,["suppressAuth","suppressHooks","showDrafts","consistentRead","language"])}bulkInsertOptions(t){return this._options(t,["suppressAuth","suppressHooks","overrideExisting"])}bulkUpdateOptions(t){return this._options(t,["suppressAuth","suppressHooks","showDrafts"])}bulkRemoveOptions(t){return this._options(t,["suppressAuth","suppressHooks","showDrafts"])}truncateOptions(t){return this._options(t,["suppressAuth"])}collectionName(t){return this.addValidation((()=>d(t)),(()=>f.collectionNameMustBeAString()))}}function C(t){return d(t)&&""!==t||s(t)&&t.hasOwnProperty("_id")}function x(t){return d(t)||s(t)&&t.hasOwnProperty("_id")}var O,D,k,M,L,F;function U(t,e){if(!t)return!1;if(Array.isArray(t))return t.some((t=>U(t,e)));if("object"==typeof t){return Object.keys(t).some((r=>e(r)||U(t[r],e)))}return!1}!function(t){t.LIVE="LIVE",t.SANDBOX="SANDBOX",t.SANDBOX_PREFERRED="SANDBOX_PREFERRED"}(O||(O={})),function(t){t.UNKNOWN_ACTION="UNKNOWN_ACTION",t.SET_FIELD="SET_FIELD",t.REMOVE_FIELD="REMOVE_FIELD",t.INCREMENT_FIELD="INCREMENT_FIELD",t.APPEND_TO_ARRAY="APPEND_TO_ARRAY",t.REMOVE_FROM_ARRAY="REMOVE_FROM_ARRAY"}(D||(D={})),function(t){t.UNKNOWN_ACTION_TYPE="UNKNOWN_ACTION_TYPE",t.INSERT="INSERT",t.UPDATE="UPDATE",t.DELETE="DELETE",t.PATCH="PATCH"}(k||(k={})),function(t){t.UNKNOWN_ACTION="UNKNOWN_ACTION",t.INSERTED="INSERTED",t.UPDATED="UPDATED"}(M||(M={})),function(t){t.ASC="ASC",t.DESC="DESC"}(L||(L={})),function(t){t.OR="OR",t.AND="AND"}(F||(F={}));var B=r(6395),$=r.n(B);function j(t){return"array"===$()(t)}function H(t){return"date"===$()(t)}function K(t){return"string"===$()(t)}function q(t){return function(t){if(!K(t))return t;const e=t.slice(0,1).toUpperCase(),r=t.slice(1,t.length);return e+r}($()(t))}function V(t){if(null==t||"object"!=typeof t)return t;let e=null;if(H(t))e=new Date(t.getTime());else{e=t.constructor();for(const r in t)e[r]=V(t[r])}return e}class G{constructor(t,e,r){this._validations=[],this.operatorName=t,this.ctor=r,this._invalidArguments=V(e)}typeIsString(t){return this.addValidation((()=>K(t)),(()=>`Invalid ${this.operatorName} parameter value [${q(t)}]. ${this.operatorName} parameter must be a String.`))}typeIsStringNumberOrDate(t){return this.addValidation((()=>W(t)),(()=>`Invalid ${this.operatorName} parameter value [${q(t)}]. Valid ${this.operatorName} parameter types are String, Number or Date.`))}sameType(t,e){return this.addValidation((()=>q(t)===q(e)),(()=>`Invalid ${this.operatorName} parameter values [${q(t)}] and [${q(e)}]. Both parameters must be of the same type.`))}typeIsStringNumberOrDateForAll(t){return this.addValidation((()=>t.every(W)),(()=>`Invalid ${this.operatorName} usage. ${this.operatorName} supports only Number, String or Date items.`))}validFieldName(t){return this.addValidation((()=>K(t)),(()=>`Invalid ${this.operatorName} field value [${q(t)}]. ${this.operatorName} field must be a String.`))}isInstanceOfSameClass(t){return this.addValidation((()=>t instanceof this.ctor),(()=>`Invalid ${this.operatorName} parameter [${q(t)}]. ${this.operatorName} expects FilterBuilder only.`))}arityIsOne(t){return this.addValidation((()=>1===t.length),(()=>`Invalid ${this.operatorName} usage. ${this.operatorName} requires one parameter.`))}arityIsTwo(t){return this.addValidation((()=>2===t.length),(()=>`Invalid ${this.operatorName} usage. ${this.operatorName} requires two parameters.`))}arityIsThree(t){return this.addValidation((()=>3===t.length),(()=>`Invalid ${this.operatorName} usage. ${this.operatorName} requires three parameters.`))}arityIsAtLeastTwo(t){return this.addValidation((()=>t.length>=2),(()=>`Invalid ${this.operatorName} usage. ${this.operatorName} requires at least two parameters.`))}addValidation(t,e){return this._validations.push({predicateFn:t,messageFn:e}),this}validateAndAggregate(){const t=this._validations.every((({predicateFn:t,messageFn:e})=>this._appendIfInvalid(t(),e())));return[this._invalidArguments,t]}_appendIfInvalid(t,e){return!!t||(this._invalidArguments.push(e),!1)}}function W(t){return K(t)||(e=t,"number"===$()(e))||H(t);var e}const Y=[function(t){const e=t.$and;if(Array.isArray(e)&&1===e.length)return e[0]},function(t){const e=t.$and;if(Array.isArray(e)&&0===e.length)return{};return null},function(t){const e=t.$and;if(!e)return;let r=[],n=[];if(e.forEach((t=>{!function(t){const e=Object.keys(t);return e.every((t=>t.startsWith("$")))&&e.length>0}(t)?r=[...r,t]:n=[...n,t]})),r.length<=1||function(t){const e=t.map((t=>Object.keys(t))).reduce(((t,e)=>[...t,...e]),[]);return function(t){const e={};return t.forEach((t=>e[t]=!0)),Object.keys(e)}(e).length!==e.length}(r))return;return{$and:[Object.assign({},...r),...n]}},function(t){const e=t.$and;if(!e)return;if(!e.find((t=>t.$and)))return;return{$and:e.reduce(((t,e)=>{const r=e.$and;return r?[...t,...r]:[...t,e]}),[])}},function(t){const e=t.$or;if(!e)return;if(!e.find((t=>t.$or)))return;return{$or:e.reduce(((t,e)=>{const r=e.$or;return r?[...t,...r]:[...t,e]}),[])}}];function X(t){return Array.isArray(t)?function(t){const e=t.map(X),r=0<e.filter((([,t])=>t)).length;return[e.map((([t])=>t)),r]}(t):"object"!=typeof t||null===t||t instanceof Date?[t,!1]:function(t){const[e,r]=s(t),[n,a]=i(e);return[n,r||a];function i(t){const e=function(t){for(const e of Y){const r=e(t);if(r)return r}}(t);if(!e)return[t,!1];const[r]=X(e);return[r,!0]}function s(t){const e=Object.entries(t).map(o).filter((([,,t])=>t));return[{...t,...c(e)},!!e.length]}function o([t,e]){const[r,n]=X(e);return[t,r,n]}function c(t){return t.reduce(((t,[e,r])=>({...t,[e]:r})),{})}}(t)}function z(...t){return{$and:t}}function J(t){return t&&t.$and&&0===t.$and.length}var Q=(t=class{})=>class extends t{constructor(t={}){super(t),this.filterTree=t.filterTree||{$and:[]},this.invalidArguments=t.invalidArguments||[],this.encoder=t.encoder||{}}eq(...t){return this._binaryAnd("$eq",".eq",t)}ne(...t){return this._binaryAnd("$ne",".ne",t)}ge(...t){return this._AndLogicalEquivalence("$gte",".ge",t)}gt(...t){return this._AndLogicalEquivalence("$gt",".gt",t)}le(...t){return this._AndLogicalEquivalence("$lte",".le",t)}lt(...t){return this._AndLogicalEquivalence("$lt",".lt",t)}isNotEmpty(t){const[e,r]=this._filterValidator(".isNotEmpty").arityIsOne(arguments).validFieldName(t).validateAndAggregate();return r?this.ne(t,null):this._copy(this.filterTree,e)}isEmpty(t){const[e,r]=this._filterValidator(".isEmpty").arityIsOne(arguments).validFieldName(t).validateAndAggregate();return r?this.eq(t,null):this._copy(this.filterTree,e)}startsWith(...t){return this._AndStringOperand("$startsWith",".startsWith",t)}endsWith(...t){return this._AndStringOperand("$endsWith",".endsWith",t)}contains(...t){return this._AndStringOperand("$contains",".contains",t)}hasSome(...t){return this._AndSetOperand("$hasSome",".hasSome",t)}hasAll(...t){return this._AndSetOperand("$hasAll",".hasAll",t)}or(t){const[e,r]=this._filterValidator(".or").arityIsOne(arguments).isInstanceOfSameClass(t).validateAndAggregate();if(r){const r=J(this.filterTree)?[]:[this.filterTree];return this._copy(z({$or:[...r,t.filterTree]}),e.concat(t.invalidArguments))}return this._copy(this.filterTree,e)}and(t){const[e,r]=this._filterValidator(".and").arityIsOne(arguments).isInstanceOfSameClass(t).validateAndAggregate();if(r){const r=J(this.filterTree)?[]:[this.filterTree];return this._copy(z(...r,t.filterTree),e.concat(t.invalidArguments))}return this._copy(this.filterTree,e)}not(t){const[e,r]=this._filterValidator(".not").arityIsOne(arguments).isInstanceOfSameClass(t).validateAndAggregate();if(r){const r=function(...t){return{$and:t.reduce(((t,e)=>j(e.$and)?t.concat(e.$and):t.concat([e])),[])}}(V(this.filterTree),{$not:[t.filterTree]});return this._copy(r,e.concat(t.invalidArguments))}return this._copy(this.filterTree,e)}between(t,e,r){const[n,a]=this._filterValidator(".between").arityIsThree(arguments).sameType(e,r).typeIsStringNumberOrDate(e).typeIsStringNumberOrDate(r).validateAndAggregate();return a?this.ge(t,e).lt(t,r):this._copy(this.filterTree,n)}getFilterModel(){if(this.invalidArguments.length>0)throw new Error(this.invalidArguments.join(" "));return function(t){const[e]=X(t);return e}(this.filterTree)}setFilterModel(t){return this._copy(t,[])}_binaryAnd(t,e,r){const[n,a]=Array.prototype.slice.call(r),[i]=this._filterValidator(e).arityIsTwo(r).validFieldName(n).validateAndAggregate(),s=this._makeNewFilter(n,t,a);return this._copy(s,i)}_AndLogicalEquivalence(t,e,r){const[n,a]=Array.prototype.slice.call(r),[i]=this._filterValidator(e).arityIsTwo(r).validFieldName(n).typeIsStringNumberOrDate(a).validateAndAggregate(),s=this._makeNewFilter(n,t,a);return this._copy(s,i)}_AndStringOperand(t,e,r){const[n,a]=Array.prototype.slice.call(r),[i]=this._filterValidator(e).arityIsTwo(r).validFieldName(n).typeIsString(a).validateAndAggregate(),s=this._makeNewFilter(n,t,a);return this._copy(s,i)}_AndSetOperand(t,e,r){const[n,...a]=Array.prototype.slice.call(r),i=j(a[0])?a[0]:a,[s]=this._filterValidator(e).arityIsAtLeastTwo(r).validFieldName(n).typeIsStringNumberOrDateForAll(i).validateAndAggregate(),o=this._makeNewFilter(n,t,i);return this._copy(o,s)}_makeNewFilter(t,e,r){const n=V(this.filterTree),a=void 0===r?null:r,i=this._buildFilter(t,e,a);if(j(n.$and))return n.$and.push(i),n;return s=n,0===Object.keys(s).length?z(i):z(n,i);var s}_buildFilter(t,e,r){if("$eq"!==e){const n={};return n[t]={},n[t][e]=this._encode(r),n}{const e={};return e[t]=this._encode(r),e}}_encode(t){return e=this.encoder,"function"===$()(e)?this.encoder(t):t;var e}_copy(t,e){return new this.constructor({...this,filterTree:t,invalidArguments:e})}_filterValidator(t){return new G(t,this.invalidArguments,this.constructor)}};Q();function Z(t){return H(t)?{$date:t.toJSON()}:t}function tt(t){const e=t.split("-"),r=[];for(let t=0;t<e.length-1;t++)n(r,e[t]),r.push({type:"anyOf",value:" \t\n-"});return n(r,e[e.length-1]),r;function n(t,e){0!==e.length&&t.push({type:"literal",value:e})}}class et extends R{constructor(t,e,r,n){super(e),this.operatorName=t,this.ctor=r,this.constructorName=n}typeIsString(t){return this.addValidation((()=>d(t)),(()=>f.filterValidations.typeIsString(this.operatorName,t)))}typeIsStringNumberOrDate(t){return this.addValidation((()=>rt(t)),(()=>f.filterValidations.typeIsStringNumberOrDate(this.operatorName,t)))}sameType(t,e){return this.addValidation((()=>h(t)===h(e)),(()=>f.filterValidations.sameType(this.operatorName,t,e)))}typeIsStringNumberOrDateForAll(t){return this.addValidation((()=>t.every(rt)),(()=>f.filterValidations.typeIsStringNumberOrDateForAll(this.operatorName)))}validFieldName(t){return this.addValidation((()=>d(t)),(()=>f.filterValidations.validFieldName(this.operatorName,t)))}isInstanceOfSameClass(t){return this.addValidation((()=>t instanceof this.ctor),(()=>f.filterValidations.isInstanceOfSameClass(this.operatorName,this.constructorName,t)))}isForCollection(t,e){return this.addValidation((()=>t.collectionName===e),(()=>f.filterValidations.isForCollection(this.operatorName,this.constructorName,t.collectionName)))}}function rt(t){return d(t)||l(t)||c(t)}var nt=(t=class{})=>class extends(Q(t)){constructor(t){super(t),this.validateCollectionName=t?.validateCollectionName??!0}or(t){const e=super.or.apply(this,arguments);return this._validateCollectionName(e,t,".or")}and(t){const e=super.and.apply(this,arguments);return this._validateCollectionName(e,t,".and")}not(t){const e=super.not.apply(this,arguments);return this._validateCollectionName(e,t,".not")}_validateCollectionName(t,e,r){if(t.invalidArguments.length>0||!this.validateCollectionName)return t;const n=function(t,e){if(!t||!t.constructor)return t;const r=t.collectionName?t.collectionName:e;return new t.constructor({...t,collectionName:r})}(e,this.collectionName),[a,i]=new et(r,t.invalidArguments,this.constructor,this.constructorName??this.constructor.name).isForCollection(n,this.collectionName).validateAndAggregate();return i?t:this._copy(this.filterTree,a)}_matchesUrlized(t,e){const[r,n]=this._filterValidator("._matchesUrlized").arityIsTwo(arguments).validFieldName(t).typeIsString(e).validateAndAggregate();if(n){const n=this._makeNewFilter(t,...function(t){return e(t)?["$in",[t,Number.parseInt(t)]]:["$matches",{ignoreCase:!0,spec:tt(t)}];function e(t){return/^-?[0-9]{1,16}$/.test(t)}}(e));return this._copy(n,r)}return this._copy(this.filterTree,r)}getFilterModel(){if(this.invalidArguments.length>0)throw b(f.filterBuilderInvalid(this.invalidArguments));return super.getFilterModel()}_filterValidator(t){return new et(t,this.invalidArguments,this.constructor,this.constructorName??this.constructor.name)}};nt();class at extends(nt()){in(...t){return this._AndSetOperand("$in",".in",t)}exists(...t){return this._binaryAnd("$exists",".exists",t)}gte(t,e){return this.ge(t,e)}lte(t,e){return this.le(t,e)}build(){return this.getFilterModel()}hasAnyFilter(){return null!==this.filterTree&&void 0!==this.filterTree&&(!!Object.keys(this.filterTree).every((t=>"$and"===t))&&(this.filterTree?.$and?.length??0)>0)}}function it(t){return function(t={}){return new at(t)}({...t,encoder:Z,validateCollectionName:!1})}const st=9007199254740991;class ot extends R{constructor(t,e){super(e),this.operatorName=t}_isNumber(t,e){return this.addValidation((()=>l(e)),(()=>f.queryValidations.isNumber(this.operatorName,t,e)))}isPositiveNumber(t){return this._isNumber("positive",t).addValidation((()=>!Number.isNaN(t)&&t>0),(()=>f.queryValidations.isPositiveNumber(this.operatorName,t)))}isNonNegativeNumber(t){return this._isNumber("non-negative",t).addValidation((()=>!Number.isNaN(t)&&t>=0),(()=>f.queryValidations.isNonNegativeNumber(this.operatorName,t)))}isInteger(t){return this.addValidation((()=>!Number.isNaN(t)&&Number.isFinite(t)&&Number.isInteger(t)&&t<st&&t>-9007199254740991),(()=>f.queryValidations.isInteger(this.operatorName,t)))}notGreaterThan(t,e){return this.addValidation((()=>t<=e),(()=>f.queryValidations.notGreaterThan(this.operatorName,t,e)))}nonEmptyString(t){return this.addValidation((()=>"string"==typeof t&&t.length>0),(()=>f.queryValidations.isNonEmptyString(this.operatorName)))}}const{filterTreeValidations:ct}=f;function lt(t,e){if(!s(t))return[ct.objectType("Filter Model",t)];const r=[];for(const n of Object.keys(t)){const a=t[n],i=pt(e,n);switch(n){case"$and":case"$or":o(a)||r.push(ct.arrayType(i,a)),o(a)&&r.push(...a.flatMap((t=>lt(t,i))));break;case"$not":o(a)||r.push(...lt(a,i)),o(a)&&1!==a.length&&r.push(ct.arrayLength(i,1,a)),o(a)&&a.length>0&&r.push(...lt(a[0],i));break;default:n.startsWith("$")?r.push(`Unexpected operator ${i}`):r.push(...ut(a,i))}}return r}function ut(t,e){return s(t)&&!ht(t)&&Object.keys(t).some((t=>t.startsWith("$")))?dt(t,e):[]}function dt(t,e){if(!s(t))return[ct.objectType(e,t)];const r=[];for(const n of Object.keys(t)){const a=pt(e,n),i=t[n];switch(n){case"$eq":case"$ne":break;case"$gt":case"$gte":case"$lt":case"$lte":ht(i)||r.push(ct.comparisonOperatorType(a,i));break;case"$startsWith":case"$endsWith":case"$contains":d(i)||r.push(ct.stringOperatorType(a,i));break;case"$exists":u(i)||r.push(`${a} should be a Boolean`);break;case"$hasSome":case"$hasAll":case"$in":o(i)||r.push(ct.arrayType(a,i)),o(i)&&!i.every(ht)&&r.push(ct.setOperatorItems(a,i));break;case"$matches":if(s(i)||r.push(ct.objectType(a,i)),s(i)&&!0!==i.ignoreCase&&r.push(ct.matchesOperatorIgnoreCase(i)),s(i)&&!o(i.spec)&&r.push(ct.arrayType(`${a}.spec`,i.spec)),o(i?.spec)){const t=t=>!!s(t)&&("anyOf"===t.type&&" \t\n-"===t.value||"literal"===t.type&&d(t.value)),e=i.spec.find((e=>!t(e)));void 0!==e&&r.push(ct.matchesOperatorSpecItems(e))}break;case"$regex":r.push(ct.regexNotAllowed());break;case"$not":r.push(...dt(i,a));break;default:r.push(`Unknown operator ${a}`)}}return r}function ht(t){return!!(c(t)||d(t)||l(t))||s(t)&&d(t.$date)&&1===Object.keys(t).length}function pt(t,e){return void 0===t?e:`${t}.${e}`}const mt=(t=class{})=>class extends t{constructor(t={}){super(t),this.orderBy=t.orderBy||[],this.invalidArguments=t.invalidArguments||[]}ascending(...t){return this._sortClause("asc",".ascending",t)}descending(...t){return this._sortClause("desc",".descending",t)}getSortModel(){if(this.invalidArguments.length>0)throw b(f.sortBuilderInvalid(this.invalidArguments));return this.orderBy}setSortModel(t){return this._copySort(t,[])}_sortClause(t,e,r){let n=[];this.orderBy&&(n=I(this.orderBy));const a=(i=n,s=t,t=>{const e={[t]:s};i.push(e)});var i,s;const c=o(r[0])&&1===r.length?r[0]:Array.prototype.slice.call(r,0),[l,u]=this._sortValidator(e).arityIsAtLeastOne(r).allStrings(c).validateAndAggregate();return u&&c.forEach(a),this._copySort(n,l)}_sortValidator(t){return new ft(t,this.invalidArguments)}_copySort(t,e){return new this.constructor({...this,orderBy:t,invalidArguments:e})}};class ft extends R{constructor(t,e){super(e),this.operatorName=t}allStrings(t){return this.addValidation((()=>t.every(d)),(()=>f.sortValidations.typeIsStringOrArrayOfStrings(this.operatorName,t)))}}class gt extends(mt()){}class vt{constructor(t){this.eq=(...t)=>this.withFilter("eq",t),this.ne=(...t)=>this.withFilter("ne",t),this.ge=(...t)=>this.withFilter("ge",t),this.gt=(...t)=>this.withFilter("gt",t),this.gte=(...t)=>this.withFilter("gte",t),this.le=(...t)=>this.withFilter("le",t),this.lt=(...t)=>this.withFilter("lt",t),this.lte=(...t)=>this.withFilter("lte",t),this.isNotEmpty=(...t)=>this.withFilter("isNotEmpty",t),this.isEmpty=(...t)=>this.withFilter("isEmpty",t),this.startsWith=(...t)=>this.withFilter("startsWith",t),this.endsWith=(...t)=>this.withFilter("endsWith",t),this.contains=(...t)=>this.withFilter("contains",t),this.hasSome=(...t)=>this.withFilter("hasSome",t),this.in=(...t)=>this.withFilter("in",t),this.hasAll=(...t)=>this.withFilter("hasAll",t),this.exists=(...t)=>this.withFilter("exists",t),this.or=(...t)=>this.withFilter("or",t.map(this.extractFilter)),this.and=(...t)=>this.withFilter("and",t.map(this.extractFilter)),this.not=(...t)=>this.withFilter("not",t.map(this.extractFilter)),this.between=(...t)=>this.withFilter("between",t),this.collectionName=t.collectionName,this.filterBuilder=t?.filterBuilder??it({filterTree:{}}),this.sort=t?.sort??new gt}get filterTree(){return this.filterBuilder.filterTree}setFilterModel(t){const e=it({filterTree:t,invalidArguments:lt(t)});return this.copy({filterBuilder:e})}getFilterModel(){return this.filterBuilder.build()}withFilter(t,e){return this.copy({filterBuilder:this.filterBuilder[t].apply(this.filterBuilder,e)})}extractFilter(t){return t?.filterBuilder?t.filterBuilder:t}get orderBy(){return this.sort.orderBy}ascending(...t){return this.copy({sort:this.sort.ascending(...t)})}descending(...t){return this.copy({sort:this.sort.descending(...t)})}}class Et extends vt{constructor(t){super(t),this.projectedFields=t?.projectedFields??[],this.limitNumber=t?.limitNumber,this.skipNumber=t?.skipNumber??0,this.included=t?.included??[],this.onFind=t.onFind,this.onDistinct=t.onDistinct,this.onCount=t.onCount,this.ownInvalidArguments=t.invalidArguments??[]}copy(t){return new Et({...this,filterBuilder:t.filterBuilder??this.filterBuilder,projectedFields:t.projectedFields??this.projectedFields,limitNumber:t.limitNumber??this.limitNumber,skipNumber:t.skipNumber??this.skipNumber,included:t.included??this.included,sort:t.sort??this.sort,invalidArguments:t.invalidArguments??this.ownInvalidArguments,onFind:this.onFind,onDistinct:this.onDistinct,onCount:this.onCount})}count(t){return this.onCount(arguments,this.toQueryParams(),t)}distinct(t,e){return this.onDistinct(arguments,this.toQueryParams(),t,e)}find(t){return this.onFind(arguments,this.toQueryParams(),t)}get invalidArguments(){return[...this.ownInvalidArguments,...this.filterBuilder.invalidArguments,...this.sort.invalidArguments]}toQueryParams(){let t;try{t=this.filterBuilder.build()}catch(e){t=this.filterBuilder.filterTree}return{collectionName:this.collectionName,invalidArguments:this.invalidArguments,projectedFields:this.projectedFields,limitNumber:this.limitNumber,skipNumber:this.skipNumber,included:this.included,filterTree:t,orderBy:this.orderBy}}fields(...t){return this.copy({projectedFields:[...this.projectedFields,...t]})}limit(t){const[e]=this.queryValidator(".limit").arityIsOne(arguments).isPositiveNumber(t).isInteger(t).validateAndAggregate();return this.copy({invalidArguments:e,limitNumber:t})}skip(t){const[e]=this.queryValidator(".skip").arityIsOne(arguments).isNonNegativeNumber(t).isInteger(t).validateAndAggregate();return this.copy({invalidArguments:e,skipNumber:t})}include(...t){if(0===t.length)return this;const e=t[t.length-1],r="number"==typeof e?e:void 0,n=void 0===r?t.length:t.length-1,a=t.slice(0,n).map((t=>({fieldName:t,limit:r}))),[i]=t.slice(0,n).reduce(((t,e,r,n)=>t.nonEmptyString(e)),this.queryValidator(".include")).validateAndAggregate();return this.copy({invalidArguments:i,included:[...this.included,...a]})}queryValidator(t,e=this.ownInvalidArguments){return new ot(t,e)}}class yt{constructor(t,e,r,n,a,i){if(this.paging=e,this.fetch=r,this.items=t,this.currentPage=i,this.collectionName=n.collectionName,this.skipNumber=n.skipNumber??a?.skipNumber,a)this.pageSize=a.pageSize,this.totalCount=a.totalCount,this.allowOffsetBackwards=(i??0)>0;else{if(this.totalCount=e.total??void 0,this.allowOffsetBackwards=(n.skipNumber??0)>0,void 0!==n.limitNumber)this.pageSize=n.limitNumber;else{const r=t.length;r>0&&(void 0!==n.skipNumber&&r+n.skipNumber<=(this.totalCount??0)||e.hasNext)&&(this.pageSize=r)}this.pageSize&&t.length>0&&(this.currentPage=Math.ceil((n.skipNumber??0)/this.pageSize))}}get length(){return this.items.length}[Symbol.iterator](){return this.items[Symbol.iterator]()}get totalPages(){if(0===this.totalCount)return 0;const t=this.pageSize;return void 0!==t&&void 0!==this.totalCount?Math.ceil(this.totalCount/t):void 0!==this.totalCount&&void 0!==this.skipNumber&&this.length>0&&this.length+this.skipNumber<=this.totalCount?Math.ceil(this.totalCount/this.length):void 0}async next(){if(!this.hasNext())throw b(f.queryValidations.noNextPage(this.collectionName));const t=(this.skipNumber??0)+(this.pageSize??50),[e,r]=await this.fetch(this.nextCursor??t);return new yt(e,r,this.fetch,{skipNumber:this.nextCursor?void 0:t,collectionName:this.collectionName},this,(this.currentPage??0)+1)}async prev(){if(!this.hasPrev())throw b(f.queryValidations.noPrevPage(this.collectionName));const t=Math.max((this.skipNumber??0)-(this.pageSize??50),0),[e,r]=await this.fetch(this.prevCursor??t);return new yt(e,r,this.fetch,{skipNumber:this.nextCursor?void 0:t,collectionName:this.collectionName},this,Math.max((this.currentPage??0)-1,0))}get nextCursor(){return this.paging.cursors?.next??void 0}get prevCursor(){return this.paging.cursors?.prev??void 0}hasNext(){return this.paging.hasNext??!1}hasPrev(){return this.allowOffsetBackwards&&(this.currentPage??0)>0||"string"==typeof this.paging.cursors?.prev}toJSON(){return{items:this.items,totalCount:this.totalCount,pageSize:this.pageSize,currentPage:this.currentPage,length:this.length,totalPages:this.totalPages}}}class bt extends vt{constructor(t){super(t),this.limitNumber=t.limitNumber,this.skipNumber=t.skipNumber??0,this.aggregates=t.aggregates??[],this.groupBy=t.groupBy??[],this.havingBuilder=t.havingBuilder,this.onRun=t.onRun,this.ownInvalidArguments=t.invalidArguments??[]}copy(t){return new bt({...this,limitNumber:t.limitNumber??this.limitNumber,skipNumber:t.skipNumber??this.skipNumber,havingBuilder:t.havingBuilder??this.havingBuilder,filterBuilder:t.filterBuilder??this.filterBuilder,sort:t.sort??this.sort,invalidArguments:t.invalidArguments??this.ownInvalidArguments,groupBy:t.groupBy??this.groupBy,aggregates:[...this.aggregates,...t.addAggregates??[]],onRun:this.onRun})}get invalidArguments(){return[...this.ownInvalidArguments,...this.filterBuilder.invalidArguments,...this.havingBuilder?.invalidArguments??[],...this.sort.invalidArguments]}run(t){let e,r;try{e=this.filterBuilder.build()}catch(t){e=this.filterBuilder.filterTree}try{r=this.havingBuilder?.build()}catch(t){r=this.havingBuilder?.filterTree}return this.onRun(arguments,{collectionName:this.collectionName,invalidArguments:this.invalidArguments,filterTree:e,havingTree:r,aggregates:this.aggregates,groupBy:this.groupBy,limitNumber:this.limitNumber,skipNumber:this.skipNumber,orderBy:this.orderBy},t)}addAggregate(t,e,r,n){const[a]=this.aggregateValidator(e).arityIsAtLeastOne(t).typeIsString(r).typeIsStringIfSet(n).validateAndAggregate();return this.copy({invalidArguments:a,addAggregates:[{name:n??`${r}${e[0].toUpperCase()}${e.substr(1)}`,[e]:r}]})}sum(t,e){return this.addAggregate(arguments,"sum",t,e)}avg(t,e){return this.addAggregate(arguments,"avg",t,e)}min(t,e){return this.addAggregate(arguments,"min",t,e)}max(t,e){return this.addAggregate(arguments,"max",t,e)}count(t="count"){const[e]=this.aggregateValidator("count").arityIsZero(arguments).typeIsString(t).validateAndAggregate();return this.copy({invalidArguments:e,addAggregates:[{name:t,count:!0}]})}filter(t){const[e]=this.aggregateValidator(".filter").arityIsOne(arguments).filterIsNotSet(this.filterBuilder).filterBuilder(t).validateAndAggregate();return this.copy({filterBuilder:t,invalidArguments:e})}group(...t){const[e]=this.aggregateValidator(".group").arityIsAtLeastOne(arguments).groupIsNotSet(this.groupBy).validateAndAggregate();return this.copy({groupBy:t,invalidArguments:e})}having(t){const[e]=this.aggregateValidator(".having").arityIsOne(arguments).havingIsNotSet(this.havingBuilder).filterBuilder(t).validateAndAggregate();return this.copy({havingBuilder:t,invalidArguments:e})}get havingTree(){return this.havingBuilder?.filterTree}limit(t){const[e]=this.aggregateValidator(".limit").arityIsOne(arguments).isPositiveNumber(t).isInteger(t).validateAndAggregate();return this.copy({invalidArguments:e,limitNumber:t})}skip(t){const[e]=this.aggregateValidator(".skip").arityIsOne(arguments).isNonNegativeNumber(t).isInteger(t).validateAndAggregate();return this.copy({invalidArguments:e,skipNumber:t})}aggregateValidator(t){return new Tt(t,this.ownInvalidArguments)}}const St=9007199254740991;class Tt extends R{constructor(t,e){super(e),this.operatorName=t,this.operatorName=t}filterBuilder(t){return this.addValidation((()=>t instanceof at),(()=>f.aggregateValidations.filterMustBeBuilder(this.operatorName)))}filterIsNotSet(t){return this.addValidation((()=>void 0===t||!t.hasAnyFilter()),(()=>f.aggregateValidations.filterIsAlreadySet(this.operatorName)))}havingIsNotSet(t){return this.addValidation((()=>void 0===t||!t.hasAnyFilter()),(()=>f.aggregateValidations.filterIsAlreadySet(this.operatorName)))}groupIsNotSet(t){return this.addValidation((()=>0===t.length),(()=>f.aggregateValidations.groupIsAlreadySet(this.operatorName)))}_isNumber(t,e){return this.addValidation((()=>l(e)),(()=>f.queryValidations.isNumber(this.operatorName,t,e)))}isPositiveNumber(t){return this._isNumber("positive",t).addValidation((()=>!Number.isNaN(t)&&t>0),(()=>f.queryValidations.isPositiveNumber(this.operatorName,t)))}isNonNegativeNumber(t){return this._isNumber("non-negative",t).addValidation((()=>!Number.isNaN(t)&&t>=0),(()=>f.queryValidations.isNonNegativeNumber(this.operatorName,t)))}isInteger(t){return this.addValidation((()=>!Number.isNaN(t)&&Number.isFinite(t)&&Number.isInteger(t)&&t<St&&t>-9007199254740991),(()=>f.queryValidations.isInteger(this.operatorName,t)))}typeIsString(t){return this.addValidation((()=>d(t)),(()=>f.filterValidations.typeIsString(this.operatorName,t)))}typeIsStringIfSet(t){return this.addValidation((()=>void 0===t||d(t)),(()=>f.filterValidations.typeIsString(this.operatorName,t)))}}function Pt(t){return It(t)}function _t(t){return Rt(t)}function It(t){if("object"!=typeof t||wt(t))return t;const e=Nt(t);for(const t in e){const r=e[t];r&&wt(r)?e[t]={$date:r.toJSON()}:"object"==typeof e[t]&&null!==e[t]&&(e[t]=It(e[t]))}return e}function wt(t){return"[object Date]"===Object.prototype.toString.call(t)&&!isNaN(t.getTime())}function Rt(t){if("object"!=typeof t||wt(t))return t;const e=Nt(t);for(const t in e)e[t]&&e[t].$date&&(r=e[t].$date,isNaN(r)&&!isNaN(new Date(r).getDate()))?e[t]=new Date(e[t].$date):"object"==typeof e[t]&&null!==e[t]&&(e[t]=Rt(e[t]));var r;return e}function Nt(t){return Array.isArray(t)?[...t]:{...t}}function At(t){return"string"!=typeof t&&(t=JSON.stringify(t)),function(t){if(function(){try{return"8J+mhA=="===btoa("🦄")}catch(t){return!1}}())return btoa(t);return btoa(function(t){if("function"==typeof TextEncoder){const e=(new TextEncoder).encode(t);return Array.from(e,(t=>String.fromCodePoint(t))).join("")}return t.replace(xt,Dt)}(t))}(t).replace(/[+/]/g,(t=>Ct[t])).replace(/={1,3}$/,"")}const Ct={"+":"-","/":"_"};const xt=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,Ot=t=>String.fromCharCode(t);function Dt(t){if(t.length<2){const e=t.charCodeAt(0);return e<128?t:e<2048?Ot(192|e>>>6)+Ot(128|63&e):Ot(224|e>>>12&15)+Ot(128|e>>>6&63)+Ot(128|63&e)}const e=65536+1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320);return Ot(240|e>>>18&7)+Ot(128|e>>>12&63)+Ot(128|e>>>6&63)+Ot(128|63&e)}function kt(t){const e=t.details??{};if("WDE0078"===e.applicationError?.code){const e=function(t){const e=t.details.applicationError.data,r=e?.jsErrorValue||!e?.value&&t.details.applicationError;if(r){const{name:t,message:e,code:n,description:a}=r,i=new Error(e||a);return i.name=t||a,i.code=n,i}return e?.value}(t);if(e)return e}return e.applicationError?y(e.applicationError.description,void 0,e):t.details?.validationError?function(t){const e=(t.details?.validationError?.fieldViolations??[]).map((t=>`${t.field}: ${t.description}`));return y([t.message,...e].join("\n"),void 0,t.details)}(t):null}const Mt={"com.wixpress.cloud.data.api.data.DataItemService.QueryDataItems":!0};class Lt{constructor(t,e){this.httpApiClient=t(function(t){return e=>{const r=t&&Mt[e.methodFqn??""],n=Pt(e.data);if(r){const t=`${e.url}?.r=${At(n)}`;if(t.length<=2048)return{...e,method:"GET",url:t,data:void 0}}return{...e,data:n}}}(e))}async getDataItem(t){return this.withErrorHandling((async()=>_t((await this.httpApiClient.getDataItem(t)).data)))}async insertDataItem(t){return this.withErrorHandling((async()=>_t((await this.httpApiClient.insertDataItem(t)).data)))}async saveDataItem(t){return this.withErrorHandling((async()=>_t((await this.httpApiClient.saveDataItem(t)).data)))}async updateDataItem(t){return this.withErrorHandling((async()=>_t((await this.httpApiClient.updateDataItem(t)).data)))}async patchDataItem(t){return this.withErrorHandling((async()=>_t((await this.httpApiClient.patchDataItem(t)).data)))}async bulkPatchDataItems(t){return this.withErrorHandling((async()=>_t((await this.httpApiClient.bulkPatchDataItems(t)).data)))}async removeDataItem(t){return this.withErrorHandling((async()=>_t((await this.httpApiClient.removeDataItem(t)).data)))}async countDataItems(t){return this.withErrorHandling((async()=>_t((await this.httpApiClient.countDataItems(t)).data)))}async queryDistinctValues(t){return this.withErrorHandling((async()=>_t((await this.httpApiClient.queryDistinctValues(t)).data)))}async queryDataItems(t){return this.withErrorHandling((async()=>_t((await this.httpApiClient.queryDataItems(t)).data)))}async aggregateDataItems(t){return this.withErrorHandling((async()=>_t((await this.httpApiClient.aggregateDataItems(t)).data)))}async aggregatePipelineDataItems(t){return this.withErrorHandling((async()=>_t((await this.httpApiClient.aggregatePipelineDataItems(t)).data)))}async bulkInsertDataItems(t){return this.withErrorHandling((async()=>_t((await this.httpApiClient.bulkInsertDataItems(t)).data)))}async bulkUpdateDataItems(t){return this.withErrorHandling((async()=>_t((await this.httpApiClient.bulkUpdateDataItems(t)).data)))}async bulkSaveDataItems(t){return this.withErrorHandling((async()=>_t((await this.httpApiClient.bulkSaveDataItems(t)).data)))}async bulkRemoveDataItems(t){return this.withErrorHandling((async()=>_t((await this.httpApiClient.bulkRemoveDataItems(t)).data)))}async queryReferencedDataItems(t){return this.withErrorHandling((async()=>_t((await this.httpApiClient.queryReferencedDataItems(t)).data)))}async bulkInsertDataItemReferences(t){return this.withErrorHandling((async()=>_t((await this.httpApiClient.bulkInsertDataItemReferences(t)).data)))}async replaceDataItemReferences(t){return this.withErrorHandling((async()=>_t((await this.httpApiClient.replaceDataItemReferences(t)).data)))}async bulkRemoveDataItemReferences(t){return this.withErrorHandling((async()=>_t((await this.httpApiClient.bulkRemoveDataItemReferences(t)).data)))}async isReferencedDataItem(t){return this.withErrorHandling((async()=>_t((await this.httpApiClient.isReferencedDataItem(t)).data)))}async truncateDataItems(t){return this.withErrorHandling((async()=>_t((await this.httpApiClient.truncateDataItems(t)).data)))}async searchDataItems(t){return this.withErrorHandling((async()=>_t((await this.httpApiClient.searchDataItems(t)).data)))}async withErrorHandling(t){try{return await t()}catch(t){if(function(t){return!!t.response?.status}(t)){if(413===t.response?.status)throw y(f.payloadIsTooLarge(),"WDE0109");const e=kt(t.response?.data);if(e)throw e}throw y(f.internalError("Unknown error."),v)}}}class Ft{constructor(t){this.ownInvalidArguments=t.invalidArguments??[],this.fieldModifications=t.fieldModifications??[],this.collectionName=t.collectionName}incrementField(t,e){const[r]=this.patchValidator(".incrementField").arityIsTwo(arguments).isNumber(t,e).validateAndAggregate();return this.copy({invalidArguments:r,addFieldModification:{fieldPath:t,action:"INCREMENT_FIELD",actionOptions:e}})}setField(t,e){const[r]=this.patchValidator(".setField").arityIsTwo(arguments).validateAndAggregate();return this.copy({invalidArguments:r,addFieldModification:{fieldPath:t,action:"SET_FIELD",actionOptions:e}})}appendToArray(t,e){const[r]=this.patchValidator(".appendToArray").arityIsTwo(arguments).validateAndAggregate();return this.copy({invalidArguments:r,addFieldModification:{fieldPath:t,action:"APPEND_TO_ARRAY",actionOptions:e}})}removeFromArray(t,e){const[r]=this.patchValidator(".removeFromArray").arityIsTwo(arguments).validateAndAggregate();return this.copy({invalidArguments:r,addFieldModification:{fieldPath:t,action:"REMOVE_FROM_ARRAY",actionOptions:e}})}removeField(t){const[e]=this.patchValidator(".removeField").arityIsTwo(arguments).validateAndAggregate();return this.copy({invalidArguments:e,addFieldModification:{fieldPath:t,action:"REMOVE_FIELD"}})}patchValidator(t){return new $t(t,this.ownInvalidArguments)}}class Ut extends Ft{constructor(t){super(t),this.onRun=t.onRun,this.itemIds=t.itemIds}copy(t){return new Ut({...this,invalidArguments:t.invalidArguments??this.ownInvalidArguments,fieldModifications:[...this.fieldModifications,t.addFieldModification],onRun:this.onRun})}run(t){return this.onRun(arguments,{collectionName:this.collectionName,itemIds:this.itemIds,invalidArguments:this.ownInvalidArguments,fieldModifications:this.fieldModifications},t)}}class Bt extends Ft{constructor(t){super(t),this.onRun=t.onRun,this.itemId=t.itemId}copy(t){return new Bt({...this,invalidArguments:t.invalidArguments??this.ownInvalidArguments,fieldModifications:[...this.fieldModifications,t.addFieldModification],onRun:this.onRun})}run(t){return this.onRun(arguments,{collectionName:this.collectionName,itemId:this.itemId,invalidArguments:this.ownInvalidArguments,fieldModifications:this.fieldModifications},t)}}class $t extends R{constructor(t,e){super(e),this.operatorName=t,this.operatorName=t}isNumber(t,e){return this.addValidation((()=>l(e)),(()=>f.queryValidations.isNumber(this.operatorName,t,e)))}}class jt extends vt{constructor(t){super(t),this.projectedFields=t?.projectedFields??[],this.limitNumber=t?.limitNumber,this.skipNumber=t?.skipNumber??0,this.included=t?.included??[],this.ownInvalidArguments=t.invalidArguments??[],this.queryText=t.queryText,this.searchMode=t.searchMode,this.isFuzzy=t.isFuzzy,this.onRun=t.onRun}copy(t){return new jt({...this,filterBuilder:t.filterBuilder??this.filterBuilder,projectedFields:t.projectedFields??this.projectedFields,limitNumber:t.limitNumber??this.limitNumber,skipNumber:t.skipNumber??this.skipNumber,included:t.included??this.included,sort:t.sort??this.sort,invalidArguments:t.invalidArguments??this.ownInvalidArguments,queryText:t.queryText??this.queryText,searchMode:t.searchMode??this.searchMode,isFuzzy:t.isFuzzy??this.isFuzzy,onRun:this.onRun})}expression(t){return this.copy({queryText:t})}andMode(){return this.copy({searchMode:F.AND})}orMode(){return this.copy({searchMode:F.OR})}fuzzy(){return this.copy({isFuzzy:!0})}run(t){return this.onRun(this.toSearchParams(),t)}get invalidArguments(){return[...this.ownInvalidArguments,...this.filterBuilder.invalidArguments,...this.sort.invalidArguments]}toSearchParams(){let t;try{t=this.filterBuilder.build()}catch(e){t=this.filterBuilder.filterTree}return{collectionName:this.collectionName,invalidArguments:this.invalidArguments,projectedFields:this.projectedFields,limitNumber:this.limitNumber,skipNumber:this.skipNumber,included:this.included,filterTree:t,orderBy:this.orderBy,queryText:this.queryText,searchMode:this.searchMode,isFuzzy:this.isFuzzy}}fields(...t){return this.copy({projectedFields:[...this.projectedFields,...t]})}limit(t){const[e]=this.queryValidator(".limit").arityIsOne(arguments).isPositiveNumber(t).isInteger(t).validateAndAggregate();return this.copy({invalidArguments:e,limitNumber:t})}skip(t){const[e]=this.queryValidator(".skip").arityIsOne(arguments).isNonNegativeNumber(t).isInteger(t).validateAndAggregate();return this.copy({invalidArguments:e,skipNumber:t})}include(...t){if(0===t.length)return this;const e=t[t.length-1],r="number"==typeof e?e:void 0,n=void 0===r?t.length:t.length-1,a=t.slice(0,n).map((t=>({fieldName:t,limit:r}))),[i]=t.slice(0,n).reduce(((t,e,r,n)=>t.nonEmptyString(e)),this.queryValidator(".include")).validateAndAggregate();return this.copy({invalidArguments:i,included:[...this.included,...a]})}queryValidator(t,e=this.ownInvalidArguments){return new ot(t,e)}}class Ht{constructor(t,e,r,n,a){this.environment=r,this.gridAppId=n,this.tracer=a,this.truncate=Kt((async(t,e,r)=>(await oe().arity("truncate",t,1,2).collectionName(e).options(r).validateAndReject(),this.trace("truncate",{collectionName:e})((async t=>{await this.client.truncateDataItems({...t,dataCollectionId:e,...Gt(r)})}))))),this.get=Kt((async(t,e,r,n)=>(await oe().arity("get",t,2,3).collectionName(e).itemId(r).options(n).validateAndReject(),this.trace("get",{collectionName:e,itemId:r})((async t=>{const{dataItem:a}=await this.client.getDataItem({...t,dataCollectionId:e,dataItemId:r,...Wt(n),fields:n?.fields}).catch(Qt(se,{}));return a?Xt(a):null}))))),this.insert=Kt((async(t,e,r,n)=>(await oe().arity("insert",t,2,3).collectionName(e).item(r,e,!1).options(n).validateAndReject(),function(t){const e=U(t,(t=>t.startsWith("$"))),r=U(t,(t=>t.includes(".")));e&&console.error("Data inserted contains field name prefixed with symbol '$'. It is not recommended to use such field names as it will not work with some data operations.");r&&console.warn("Data inserted contains field name containing symbol '.'. It is not recommended to use such field names as it will not work with some data operations.")}(r),this.trace("insert",{collectionName:e})((async t=>{const{dataItem:a}=await this.client.insertDataItem({...t,dataCollectionId:e,dataItem:{id:r._id,data:r},...Vt(n)});return Xt(a)}))))),this.save=Kt((async(t,e,r,n)=>(await oe().arity("save",t,2,3).collectionName(e).item(r,e,!1).options(n).validateAndReject(),this.trace("save",{collectionName:e})((async t=>{const{dataItem:a}=await this.client.saveDataItem({...t,dataCollectionId:e,dataItem:{id:r._id,data:r},...Vt(n)});return Xt(a)}))))),this.update=Kt((async(t,e,r,n)=>(await oe().arity("update",t,2,3).collectionName(e).item(r,e,!1).options(n).validateAndReject(),this.trace("update",{collectionName:e})((async t=>{const{dataItem:a}=await this.client.updateDataItem({...t,dataCollectionId:e,dataItem:{id:r._id,data:r},...Vt(n)});return Xt(a)}))))),this.remove=Kt((async(t,e,r,n)=>(await oe().arity("remove",t,2,3).collectionName(e).itemId(r).options(n).validateAndReject(),this.trace("remove",{collectionName:e,itemId:r})((async t=>{const{dataItem:a}=await this.client.removeDataItem({...t,dataCollectionId:e,dataItemId:r,...Gt(n)}).catch(Qt(se,{}));return a?Xt(a):null}))))),this.toFieldModificationApi=t=>{switch(t.action){case"SET_FIELD":return{action:D.SET_FIELD,fieldPath:t.fieldPath,setFieldOptions:{value:t.actionOptions}};case"REMOVE_FIELD":return{action:D.REMOVE_FIELD,fieldPath:t.fieldPath};case"INCREMENT_FIELD":return{action:D.INCREMENT_FIELD,fieldPath:t.fieldPath,incrementFieldOptions:{value:t.actionOptions}};case"APPEND_TO_ARRAY":return{action:D.APPEND_TO_ARRAY,fieldPath:t.fieldPath,appendToArrayOptions:{value:t.actionOptions}};case"REMOVE_FROM_ARRAY":return{action:D.REMOVE_FROM_ARRAY,fieldPath:t.fieldPath,removeFromArrayOptions:{value:t.actionOptions}};default:throw new Error("Invalid patch action")}},this.patch=(t,e)=>new Bt({collectionName:t,itemId:e,onRun:async(e,r,n)=>{const a=r.fieldModifications.map(this.toFieldModificationApi);return this.trace("patch",{collectionName:t})((async t=>{const e=await this.client.patchDataItem({...t,dataCollectionId:r.collectionName,patch:{dataItemId:r.itemId,fieldModifications:a},...qt(n)});return e.dataItem?Xt(e.dataItem):null}))}}),this.bulkPatch=(t,e)=>new Ut({collectionName:t,itemIds:e,onRun:async(r,n,a)=>{const i=n.fieldModifications.map(this.toFieldModificationApi);return this.trace("bulkPatch",{collectionName:t})((async t=>{const{results:r}=await this.client.bulkPatchDataItems({...t,dataCollectionId:n.collectionName,patches:n.itemIds.map((t=>({dataItemId:t,fieldModifications:i}))),...qt(a)});return Zt(e,r,["WDE0073"])}))}}),this.query=t=>{const e=e=>{if(e.length>0)throw S(f.queryValidations.queryInvalid(t,e))};return new Et({collectionName:t,onCount:async(r,n,a)=>(e([...n.invalidArguments,...oe().collectionName(t).arity("count",r,0,1).options(a).validateAndReturn()]),this.trace("count",{collectionName:t})((async e=>{const{totalCount:r}=await this.client.countDataItems({...e,dataCollectionId:t,filter:n.filterTree,...Wt(a)});return r}))),onDistinct:async(r,n,a,i)=>{e([...n.invalidArguments,...oe().collectionName(t).arity("distinct",r,1,2).fieldName(a).options(i).validateAndReturn()]);const s=Jt(n.orderBy).find((t=>t.fieldName===a))?.order,o=(e,r)=>this.trace("distinct",{collectionName:t,field:a})((async o=>{const{distinctValues:c,pagingMetadata:l}=await this.client.queryDistinctValues({...o,dataCollectionId:t,...Wt(i),...zt(n.limitNumber,e),...ie(e)?{fieldName:a,filter:n.filterTree,order:s,returnTotalCount:r}:{}});return[c,l]})),[c,l]=await o(n.skipNumber,i?.returnTotalCount);return new yt(c,l,o,n)},onFind:async(r,n,a)=>{e([...n.invalidArguments,...oe().collectionName(t).arity("find",r,0,1).options(a).validateAndReturn()]);const i=(e,r)=>this.trace("query",{collectionName:t})((async i=>{const{dataItems:s,pagingMetadata:o}=await this.client.queryDataItems({...i,dataCollectionId:t,query:{fields:n.projectedFields,...zt(n.limitNumber,e),...ie(e)?{filter:n.filterTree,sort:Jt(n.orderBy)}:{}},referencedItemOptions:n.included,...Wt(a),...ie(e)?{returnTotalCount:r}:{}});return[s.map(Xt),o]})),[s,o]=await i(n.skipNumber,a?.returnTotalCount);return new yt(s,o,i,n)}})},this.search=t=>new jt({collectionName:t,onRun:async(e,r)=>{(e=>{if(e.length>0)throw S(f.queryValidations.queryInvalid(t,e))})([...e.invalidArguments,...oe().collectionName(t).options(r).validateAndReturn()]);const n=e.queryText,a=a=>this.trace("search",{collectionName:t,expression:n})((async n=>{const i={...n,dataCollectionId:t,search:{filter:e.filterTree,sort:Jt(e.orderBy),fields:e.projectedFields,search:{expression:e.queryText,fuzzy:e.isFuzzy,mode:e.searchMode},...zt(e.limitNumber,a)},referencedItemOptions:e.included,...Wt(r)},{dataItems:s,pagingMetadata:o}=await this.client.searchDataItems(i);return[s.map(Xt),o]})),[i,s]=await a(e.skipNumber);return new yt(i,s,a,e)}}),this.fetch=Kt((async(t,e,r,n,a)=>{await oe().arity("fetch",t,2,4).collectionName(e).isNonEmptyString(r,"cursor").validateAndReject();const i=t=>this.trace("query",{collectionName:e})((async r=>{const{dataItems:i,pagingMetadata:s}=await this.client.queryDataItems({...r,dataCollectionId:e,query:{...zt(n,t)},...Wt(a)});return[i.map(Xt),s]})),[s,o]=await i(r);return new yt(s,o,i,{limitNumber:n,collectionName:e,skipNumber:0})})),this.aggregate=t=>new bt({collectionName:t,onRun:async(e,r,n)=>{const a=[...r.invalidArguments,...oe().arity("run",e,0,1).collectionName(t).options(n).validateAndReturn()];if(a.length>0)throw S(f.aggregateValidations.aggregateInvalid(t,a));const i=(e,a)=>this.trace("aggregate",{collectionName:t})((async i=>{const s=t=>t?{itemFieldName:t}:void 0,{results:o,pagingMetadata:c}=await this.client.aggregateDataItems({...i,dataCollectionId:t,...zt(r.limitNumber,e),...Wt(n),...ie(e)?{initialFilter:r.filterTree,aggregation:{groupingFields:r.groupBy,operations:r.aggregates.map((t=>({resultFieldName:t.name,average:s(t.avg),min:s(t.min),max:s(t.max),sum:s(t.sum),itemCount:t.count?{}:void 0})))},finalFilter:r.havingTree,sort:Jt(r.orderBy),returnTotalCount:a}:{}});return[te(o),c]})),[s,o]=await i(r.skipNumber,n?.returnTotalCount);return new yt(s,o,i,r)}}),this.fetchAggregate=Kt((async(t,e,r,n,a)=>{await oe().arity("fetchAggregate",t,2,4).collectionName(e).isNonEmptyString(r,"cursor").validateAndReject();const i=t=>this.trace("aggregate",{collectionName:e})((async r=>{const{results:i,pagingMetadata:s}=await this.client.aggregateDataItems({...r,dataCollectionId:e,...zt(n,t),...Wt(a)});return[te(i),s]})),[s,o]=await i(r);return new yt(s,o,i,{limitNumber:n,skipNumber:0,collectionName:e})})),this.aggregatePipeline=Kt((async(t,e,r,n)=>(await oe().arity("aggregatePipeline",t,2,3).collectionName(e).validateAndReject(),this.trace("aggregatePipeline",{collectionName:e})((async t=>{const a={...t,dataCollectionId:e,pipeline:r,...n};return this.client.aggregatePipelineDataItems(a)}))))),this.bulkRemove=Kt((async(t,e,r,n)=>(await oe().arity("bulkRemove",t,2,3).collectionName(e).itemIds(r,e).bulkRemoveOptions(n).validateAndReject(),this.trace("bulkRemove",{collectionName:e})((async t=>{const{results:a}=await this.client.bulkRemoveDataItems({...t,dataCollectionId:e,dataItemIds:r,...Gt(n)});return Zt(r,a,["WDE0073"])}))))),this.bulkInsert=Kt((async(t,e,r,n)=>(await oe().arity("bulkInsert",t,2,3).items(r,e).bulkInsertOptions(n).collectionName(e).validateAndReject(),this.trace("bulkInsert",{collectionName:e,options:n})((async t=>this.runBulkSave(t,e,r,n,n?.overrideExisting??!1)))))),this.bulkSave=Kt((async(t,e,r,n)=>(await oe().arity("bulkSave",t,2,3).bulkInsertOptions(n).collectionName(e).items(r,e).validateAndReject(),this.trace("bulkSave",{collectionName:e})((async t=>this.runBulkSave(t,e,r,n)))))),this.bulkUpdate=Kt((async(t,e,r,n)=>(await oe().arity("bulkUpdate",t,2,3).bulkUpdateOptions(n).collectionName(e).items(r,e).validateAndReject(),this.trace("bulkUpdate",{collectionName:e})((async t=>{const{results:a}=await this.client.bulkUpdateDataItems({...t,dataCollectionId:e,dataItems:r.map((t=>({id:t._id,data:t}))),...Gt(n)});return Zt(r,a,["WDE0073"])}))))),this.fetchReferenced=Kt((async(t,e,r,n,a)=>{await oe().arity("fetchReferenced",t,2,4).isNonEmptyString(r,"cursor").collectionName(e).validateAndReject();const i=t=>this.trace("fetchReferenced",{collectionName:e})((async r=>{const{results:i,pagingMetadata:s}=await this.client.queryReferencedDataItems({...r,...zt(n,t),...Wt(a),dataCollectionId:e,fields:a?.fields});return[ee(i),s]})),[s,o]=await i(r);return new yt(s,o,i,{collectionName:e,limitNumber:n,skipNumber:0})})),this.queryReferenced=Kt((async(t,e,r,n,a)=>{await oe().arity("queryReferenced",t,3,4).collectionName(e).referenceParameter(r).isNonEmptyString(n,"relationshipAttribute").options(a).validateAndReject();const i=ne(r),s=(t,r)=>this.trace("queryReferenced",{collectionName:e,itemId:i,options:a,relationshipAttribute:n})((async s=>{const{results:o,pagingMetadata:c}=await this.client.queryReferencedDataItems({...s,...zt(a?.limit??50,t),...Wt(a),dataCollectionId:e,fields:a?.fields,...ie(t)?{referringItemId:i,referringItemFieldName:n,order:"asc"===a?.order?L.ASC:"desc"===a?.order?L.DESC:void 0,returnTotalCount:r}:{}});return[ee(o),c]})),[o,c]=await s(a?.skip??0,a?.returnTotalCount);return new yt(o,c,s,{collectionName:e,limitNumber:a?.limit??50,skipNumber:a?.skip??0})})),this.insertReference=Kt((async(t,e,r,n,a,i)=>{let s,o,c;if("string"==typeof r){const t=ae(a);s=t.map((t=>({relationshipName:r,left:n,right:t}))),o=i,c=[4,5]}else s=r,o=n,c=[2,3];await oe().arity("insertReference",t,...c).collectionName(e).references(s).options(o).validateAndReject(),await this.trace("insertReference",{collectionName:e})((async t=>this.client.bulkInsertDataItemReferences({...t,dataCollectionId:e,dataItemReferences:s.map((t=>({referringItemFieldName:t.relationshipName,referringItemId:ne(t.left),referencedItemId:ne(t.right)}))),...Gt(o)})))})),this.replaceReferences=Kt((async(t,e,r,n,a,i)=>{const s=ae(a);await oe().arity("replaceReferences",t,4,5).collectionName(e).isNonEmptyString(r,"relationshipAttribute").referenceParameter(n).referenceParameters(s).options(i).validateAndReject(),await this.trace("replaceReferences",{collectionName:e,relationshipAttribute:r})((async t=>this.client.replaceDataItemReferences({...t,dataCollectionId:e,referringItemFieldName:r,referringItemId:ne(n),newReferencedItemIds:s.map(ne),...Gt(i)})))})),this.removeReference=Kt((async(t,e,r,n,a,i)=>{const s=ae(a);await oe().arity("removeReference",t,4,5).collectionName(e).referenceParameter(n).referenceRemoveParameters(s).isNonEmptyString(r,"relationshipAttribute").options(i).validateAndReject(),await this.trace("removeReference",{collectionName:e,relationshipAttribute:r})((async t=>this.client.bulkRemoveDataItemReferences({...t,dataCollectionId:e,dataItemReferences:s.map((t=>({referringItemFieldName:r,referringItemId:ne(n),referencedItemId:ne(t)}))),...Gt(i)})))})),this.isReferenced=Kt((async(t,e,r,n,a,i)=>(await oe().arity("isReferenced",t,4,5).collectionName(e).referenceParameter(n).referenceParameter(a).options(i).validateAndReject(),this.trace("isReferenced",{collectionName:e,relationshipAttribute:r})((async t=>{const{isReferenced:s}=await this.client.isReferencedDataItem({...t,dataCollectionId:e,referringItemFieldName:r,referringItemId:ne(n),referencedItemId:ne(a),...Wt(i),consistentRead:i?.consistentRead});return s}))))),this.client=new Lt(t,e)}get wixData(){return this}get filter(){return it()}async runBulkSave(t,e,r,n,a=!0){const i={...t,dataCollectionId:e,dataItems:r.map((t=>({id:t._id,data:t}))),...Gt(n)},{results:s}=await(a?this.client.bulkSaveDataItems(i):this.client.bulkInsertDataItems(i));return Zt(r,s,a?[]:["WDE0074"])}trace(t,e){return async r=>{const n=await async function(t){if("function"==typeof t?.get)return t.get();return t}(this.gridAppId),a={appId:n,environment:this.environment};return this.tracer?this.tracer(`WixDataApi.${t}`,{...e,gridAppId:n,environment:this.environment})((()=>r(a))):r(a)}}}function Kt(t){return function(...e){return t(arguments,...e)}}function qt(t){return{suppressHooks:t?.suppressHooks,...Yt(t?.showDrafts)}}function Vt(t){return{...Gt(t),includeReferencedItems:t?.includeReferences}}function Gt(t){if(!t)return;const e={suppressHooks:t.suppressHooks,appOptions:t.appOptions,...Yt(t?.showDrafts)};return Object.entries(e).every((t=>void 0===t[1]))?void 0:e}function Wt(t){return{suppressHooks:t?.suppressHooks,appOptions:t?.appOptions,...Yt(t?.showDrafts),consistentRead:t?.consistentRead,language:t?.language}}function Yt(t){return void 0!==t?{publishPluginOptions:{includeDraftItems:t}}:{}}function Xt(t){return t.data}function zt(t,e){return"string"==typeof e?{cursorPaging:{limit:t,cursor:e}}:void 0!==t||e>0?{paging:{limit:t,offset:e}}:{}}function Jt(t){return t.map((t=>{const[[e,r]]=Object.entries(t);return{fieldName:e,order:"asc"===r?L.ASC:"desc"===r?L.DESC:void 0}}))}function Qt(t,e){return r=>r instanceof Error&&r?.details?.applicationError?.code===t?Promise.resolve(e):Promise.reject(r)}function Zt(t,e,r=[]){const n=e.flatMap((e=>e.itemMetadata?.success||!e.itemMetadata?.error||r.includes(e.itemMetadata.error.code??"")?[]:[new _(e.itemMetadata.error.description,e.itemMetadata.error.code,t[e.itemMetadata.originalIndex],"BulkError",e.itemMetadata.originalIndex)])),a=e.filter((t=>t.itemMetadata?.success)),i=a.filter((t=>t.action===k.INSERT)),s=a.filter((t=>t.action===k.UPDATE||t.action===k.PATCH)),o=a.filter((t=>t.action===k.DELETE));return{inserted:i.length,updated:s.length,removed:o.length,skipped:t.length-n.length-a.length,errors:n,insertedItemIds:i.map((t=>t.itemMetadata?.id)),updatedItemIds:s.map((t=>t.itemMetadata?.id)),removedItemIds:o.map((t=>t.itemMetadata?.id))}}function te(t){return t.map((t=>{const e=t._id;if(s(e)){const[r,...n]=Object.keys(e);if(0===n.length)return t._id=e[r],t}return t}))}function ee(t){return t.map((t=>t.dataItem)).filter(re).map(Xt)}function re(t){return null!=t}function ne(t){return"string"==typeof t?t:t._id}function ae(t){return o(t)?t:[t]}function ie(t){return"number"==typeof t}const se="WDE0073";function oe(){return new A(S)}var ce=r(7512);class le{constructor(t,e,r){this.httpClient=t,this.interceptor=e,this.sideEffects=r}getDataItem(t){return this.execHttpCall(ue,t)}insertDataItem(t){return this.execHttpCall(de,t)}updateDataItem(t){return this.execHttpCall(he,t)}patchDataItem(t){return this.execHttpCall(pe,t)}saveDataItem(t){return this.execHttpCall(me,t)}removeDataItem(t){return this.execHttpCall(fe,t)}truncateDataItems(t){return this.execHttpCall(ge,t)}bulkInsertDataItems(t){return this.execHttpCall(ve,t)}bulkPatchDataItems(t){return this.execHttpCall(ye,t)}bulkUpdateDataItems(t){return this.execHttpCall(Ee,t)}bulkSaveDataItems(t){return this.execHttpCall(be,t)}bulkRemoveDataItems(t){return this.execHttpCall(Se,t)}isReferencedDataItem(t){return this.execHttpCall(Te,t)}bulkInsertDataItemReferences(t){return this.execHttpCall(Pe,t)}bulkRemoveDataItemReferences(t){return this.execHttpCall(_e,t)}replaceDataItemReferences(t){return this.execHttpCall(Ie,t)}countDataItems(t){return this.execHttpCall(we,t)}queryDistinctValues(t){return this.execHttpCall(Re,t)}queryDataItems(t){return this.execHttpCall(Ne,t)}aggregateDataItems(t){return this.execHttpCall(Ae,t)}aggregatePipelineDataItems(t){return this.execHttpCall(Ce,t)}queryReferencedDataItems(t){return this.execHttpCall(xe,t)}searchDataItems(t){return this.execHttpCall(Oe,t)}async execHttpCall(t,e){const r=De(t,e);this.sideEffects?.onSiteCall?.();try{const t=await this.httpClient.request((t=>{const e=r(t);return this.interceptor(e)}));return this.sideEffects?.onSuccess?.(t),t}catch(t){throw this.sideEffects?.onError?.(t),t}}}const ue={method:"GET",methodName:"GetDataItem",httpPath:"/v2/items/{dataItemId}"},de={method:"POST",methodName:"InsertDataItem",httpPath:"/v2/items"},he={method:"POST",methodName:"UpdateDataItem",httpPath:"/v2/items/update"},pe={method:"POST",methodName:"PatchDataItem",httpPath:"/v2/items/patch"},me={method:"POST",methodName:"SaveDataItem",httpPath:"/v2/items/save"},fe={method:"POST",methodName:"RemoveDataItem",httpPath:"/v2/items/remove"},ge={method:"POST",methodName:"TruncateDataItems",httpPath:"/v2/items/truncate"},ve={method:"POST",methodName:"BulkInsertDataItems",httpPath:"/v2/bulk/items/insert"},Ee={method:"POST",methodName:"BulkUpdateDataItems",httpPath:"/v2/bulk/items/update"},ye={method:"POST",methodName:"BulkPatchDataItems",httpPath:"/v2/bulk/items/patch"},be={method:"POST",methodName:"BulkSaveDataItems",httpPath:"/v2/bulk/items/save"},Se={method:"POST",methodName:"BulkRemoveDataItems",httpPath:"/v2/bulk/items/remove"},Te={method:"POST",methodName:"IsReferencedDataItem",httpPath:"/v2/items/is-referenced"},Pe={method:"POST",methodName:"BulkInsertDataItemReferences",httpPath:"/v2/bulk/items/insert-references"},_e={method:"POST",methodName:"BulkRemoveDataItemReferences",httpPath:"/v2/bulk/items/remove-references"},Ie={method:"POST",methodName:"ReplaceDataItemReferences",httpPath:"/v2/items/replace-references"},we={method:"POST",methodName:"CountDataItems",httpPath:"/v2/items/count"},Re={method:"POST",methodName:"QueryDistinctValues",httpPath:"/v2/items/query-distinct-values"},Ne={method:"POST",methodName:"QueryDataItems",httpPath:"/v2/items/query"},Ae={method:"POST",methodName:"AggregateDataItems",httpPath:"/v2/items/aggregate"},Ce={method:"POST",methodName:"AggregatePipelineDataItems",httpPath:"/v2/items/aggregate-pipeline"},xe={method:"POST",methodName:"QueryReferencedDataItems",httpPath:"/v2/items/query-referenced"},Oe={method:"POST",methodName:"SearchDataItems",httpPath:"/v2/items/search"},De=({method:t,methodName:e,httpPath:r},n)=>{const a="GET"===t||"DELETE"===t;return({host:i})=>({entityFqdn:"wix.data.v2.data_item",method:t,methodFqn:`com.wixpress.cloud.data.api.data.DataItemService.${e}`,url:ke({protoPath:r,data:n,host:i}),data:a?void 0:n,params:a?(0,ce.toURLSearchParams)(n):void 0})},ke=t=>(0,ce.resolveUrl)(Object.assign(t,{domainToMappings:{"api._api_base_domain_":[{srcPath:"/cloud-data",destPath:""}],"cloud-data.wix-code.com":[{srcPath:"",destPath:""}],_:[{srcPath:"/_api/cloud-data",destPath:""}],"www._base_domain_":[{srcPath:"/_api/cloud-data",destPath:""},{srcPath:"/_api/data",destPath:""}],"dev._base_domain_":[{srcPath:"/_api/cloud-data",destPath:""}],"bo._base_domain_":[{srcPath:"/_api/cloud-data/v2",destPath:"/v2"}],"wixbo.ai":[{srcPath:"/_api/cloud-data/v2",destPath:"/v2"}],"manage._base_domain_":[{srcPath:"/_api/cloud-data",destPath:""},{srcPath:"/_api/data",destPath:""}],"editor._base_domain_":[{srcPath:"/_api/cloud-data/v2",destPath:"/v2"}],"blocks._base_domain_":[{srcPath:"/_api/cloud-data/v2",destPath:"/v2"}],"create.editorx":[{srcPath:"/_api/cloud-data/v2/bulk",destPath:"/v2/bulk"}],"www.wixapis.com":[{srcPath:"/wix-data/v2",destPath:"/v2"}],"*.dev.wix-code.com":[{srcPath:"/_api/cloud-data/v2",destPath:"/v2"}]}}));function Me(t,e,r){return new Ht((r=>new le(t,r,e)),!0,r)}var Le;!function(t){t.LIVE="LIVE",t.SANDBOX="SANDBOX",t.SANDBOX_PREFERRED="SANDBOX_PREFERRED"}(Le||(Le={}));var Fe=r(9566),Ue=r(4615),Be=r(1365);function $e(t){return e=>function(t){const{httpClient:e,sideEffects:r}=arguments[1];return Me(e,r,t)}(e,{httpClient:t})}function je(t){return(e,r,n)=>async function(t,e,r){const{httpClient:n,sideEffects:a}=arguments[3];return Me(n,a).insert(t,e,r)}(e,r,n,{httpClient:t})}function He(t){return(e,r,n)=>async function(t,e,r){const{httpClient:n,sideEffects:a}=arguments[3];return Me(n,a).update(t,e,r)}(e,r,n,{httpClient:t})}function Ke(t){return(e,r,n)=>async function(t,e,r){const{httpClient:n,sideEffects:a}=arguments[3];return Me(n,a).save(t,e,r)}(e,r,n,{httpClient:t})}function qe(t){return(e,r,n)=>async function(t,e,r){const{httpClient:n,sideEffects:a}=arguments[3];return Me(n,a).get(t,e,r)}(e,r,n,{httpClient:t})}function Ve(t){return(e,r,n)=>async function(t,e,r){const{httpClient:n,sideEffects:a}=arguments[3];return Me(n,a).remove(t,e,r)}(e,r,n,{httpClient:t})}function Ge(t){return e=>async function(t){const{httpClient:e,sideEffects:r}=arguments[1];return Me(e,r).truncate(t)}(e,{httpClient:t})}function We(t){return(e,r,n)=>async function(t,e,r){const{httpClient:n,sideEffects:a}=arguments[3];return Me(n,a).bulkInsert(t,e,r)}(e,r,n,{httpClient:t})}function Ye(t){return(e,r,n)=>async function(t,e,r){const{httpClient:n,sideEffects:a}=arguments[3];return Me(n,a).bulkUpdate(t,e,r)}(e,r,n,{httpClient:t})}function Xe(t){return(e,r,n)=>async function(t,e,r){const{httpClient:n,sideEffects:a}=arguments[3];return Me(n,a).bulkSave(t,e,r)}(e,r,n,{httpClient:t})}function ze(t){return(e,r,n)=>async function(t,e,r){const{httpClient:n,sideEffects:a}=arguments[3];return Me(n,a).bulkRemove(t,e,r)}(e,r,n,{httpClient:t})}function Je(t){return(e,r,n,a,i)=>async function(t,e,r,n,a){const{httpClient:i,sideEffects:s}=arguments[5];return Me(i,s).isReferenced(t,e,r,n,a)}(e,r,n,a,i,{httpClient:t})}function Qe(t){return(e,r,n,a,i)=>async function(t,e,r,n,a){const{httpClient:i,sideEffects:s}=arguments[5];return"string"!=typeof e&&null==r&&null==n?Me(i,s).insertReference(t,e,a):Me(i,s).insertReference(t,e,r,n,a)}(e,r,n,a,i,{httpClient:t})}function Ze(t){return(e,r,n,a,i)=>async function(t,e,r,n,a){const{httpClient:i,sideEffects:s}=arguments[5];return Me(i,s).removeReference(t,e,r,n,a)}(e,r,n,a,i,{httpClient:t})}function tr(t){return(e,r,n,a,i)=>async function(t,e,r,n,a){const{httpClient:i,sideEffects:s}=arguments[5];return Me(i,s).replaceReferences(t,e,r,n,a)}(e,r,n,a,i,{httpClient:t})}function er(t){return e=>function(t){const{httpClient:e,sideEffects:r}=arguments[1];return Me(e,r).query(t)}(e,{httpClient:t})}function rr(t){return e=>function(t){const{httpClient:e,sideEffects:r}=arguments[1];return Me(e,r).search(t)}(e,{httpClient:t})}function nr(t){return(e,r)=>function(t,e){const{httpClient:r,sideEffects:n}=arguments[2];return Me(r,n).patch(t,e)}(e,r,{httpClient:t})}function ar(t){return(e,r)=>function(t,e){const{httpClient:r,sideEffects:n}=arguments[2];return Me(r,n).bulkPatch(t,e)}(e,r,{httpClient:t})}function ir(t){return e=>function(t){const{httpClient:e,sideEffects:r}=arguments[1];return Me(e,r).aggregate(t)}(e,{httpClient:t})}function sr(t){return(e,r,n)=>async function(t,e,r){const{httpClient:n,sideEffects:a}=arguments[3];return Me(n,a).aggregatePipeline(t,e,r)}(e,r,n,{httpClient:t})}function or(t){return(e,r,n,a)=>async function(t,e,r,n){const{httpClient:a,sideEffects:i}=arguments[4];return Me(a,i).queryReferenced(t,e,r,n)}(e,r,n,a,{httpClient:t})}function cr(t){return()=>function(){const{httpClient:t,sideEffects:e}=arguments[0];return Me(t,e).filter}({httpClient:t})}const lr=(0,n.EventDefinition)("wix.data.v2.data_item_created",!0,(t=>(0,Fe.renameKeysFromRESTResponseToSDKResponse)((0,Ue.transformPaths)(_t(t),[{transformFn:Be.transformRESTTimestampToSDKTimestamp,paths:[{path:"metadata.eventTime"}]}]),["entity.data"])))(),ur=(0,n.EventDefinition)("wix.data.v2.data_item_updated",!0,(t=>(0,Fe.renameKeysFromRESTResponseToSDKResponse)((0,Ue.transformPaths)(_t(t),[{transformFn:Be.transformRESTTimestampToSDKTimestamp,paths:[{path:"metadata.eventTime"}]}]),["entity.data"])))(),dr=(0,n.EventDefinition)("wix.data.v2.data_item_deleted",!0,(t=>(0,Fe.renameKeysFromRESTResponseToSDKResponse)((0,Ue.transformPaths)(_t(t),[{transformFn:Be.transformRESTTimestampToSDKTimestamp,paths:[{path:"metadata.eventTime"}]}]),["entity.data"])))();var hr=r(5097);class pr{constructor(){this.stages=[]}withStages(t){return this.stages=t,this}withPaging(t){const e="cursor"in t;return this.cursorPaging=e?t:void 0,this.offsetPaging=e?void 0:t,this}build(){return{stages:this.stages.map((t=>t.build())),...this.offsetPaging&&{paging:this.offsetPaging},...this.cursorPaging&&{cursorPaging:this.cursorPaging}}}}class mr extends vt{constructor(t){super({collectionName:t?.collectionName||"",filterBuilder:t?.filterBuilder})}copy(t){return new mr({collectionName:this.collectionName,filterBuilder:t.filterBuilder||this.filterBuilder})}get invalidArguments(){return[]}build(){return{filter:this.filterBuilder.build()}}}class fr{constructor(){this.fields=[]}include(...t){return t.forEach((t=>{this.fields.push({include:{fieldName:t}})})),this}exclude(...t){return t.forEach((t=>{this.fields.push({exclude:{fieldName:t}})})),this}reshape(t,e){return this.addField(t,e),this}projectNested(t,e){return this.addNestedProjectionField(e,t.fields)}addField(t,e){return this.fields.push({reshape:{resultFieldName:e,expression:t.build()}}),this}addNestedProjectionField(t,e){return this.fields.push({projectNested:{resultFieldName:t,fields:e}}),this}build(){return{projection:{fields:this.fields}}}}class gr{constructor(t){this.fieldPath=t}build(){return{fieldPath:this.fieldPath}}}class vr{constructor(t){this.value=t}build(){return{text:this.value}}}class Er{constructor(t){this.value=t}build(){return{numeric:this.value}}}class yr{constructor(t){this.expressions=t}build(){return{add:{expressions:this.expressions.map((t=>t.build()))}}}}class br{constructor(t,e){this.firstExpression=t,this.secondExpression=e}build(){return{subtract:{firstExpression:this.firstExpression.build(),secondExpression:this.secondExpression.build()}}}}class Sr{constructor(t){this.expressions=t}build(){return{multiply:{expressions:this.expressions.map((t=>t.build()))}}}}class Tr{constructor(t,e){this.firstExpression=t,this.secondExpression=e}build(){return{divide:{firstExpression:this.firstExpression.build(),secondExpression:this.secondExpression.build()}}}}class Pr{constructor(t){this.expressions=t}build(){return{sum:{expressions:this.expressions.map((t=>t.build()))}}}}class _r{constructor(t){this.expression=t}build(){return{abs:{expression:this.expression.build()}}}}class Ir{constructor(t,e){this.firstExpression=t,this.secondExpression=e}build(){return{mod:{firstExpression:this.firstExpression.build(),secondExpression:this.secondExpression.build()}}}}class wr{constructor(t){this.expression=t}build(){return{floor:{expression:this.expression.build()}}}}class Rr{constructor(t){this.expression=t}build(){return{ceil:{expression:this.expression.build()}}}}class Nr{constructor(t){this.expressions=t}build(){return{concat:{expressions:this.expressions.map((t=>t.build()))}}}}class Ar{constructor(t){this.expression=t}build(){return{stringify:{expression:this.expression.build()}}}}class Cr{constructor(t){this.expression=t}build(){return{toLower:{expression:this.expression.build()}}}}class xr{constructor(t){this.expression=t}build(){return{toUpper:{expression:this.expression.build()}}}}class Or{constructor(t,e,r){this.expression=t,this.startExpression=e,this.lengthExpression=r}build(){const t={substring:{expression:this.expression.build(),startExpression:this.startExpression.build()}};return this.lengthExpression&&(t.substring.lengthExpression=this.lengthExpression.build()),t}}class Dr{constructor(t){this.expression=t}build(){return{length:{expression:this.expression.build()}}}}class kr{constructor(){this.ids=[],this.accumulators=[]}by(t,e){return this.ids.push({expression:t,key:e}),this}sum(t,e){return this.addAccumulator(t,"sum",e)}avg(t,e){return this.addAccumulator(t,"avg",e)}min(t,e){return this.addAccumulator(t,"min",e)}max(t,e){return this.addAccumulator(t,"max",e)}count(t){return this.addAccumulator(new Er(1),"sum",t)}first(t,e){return this.addAccumulator(t,"first",e)}last(t,e){return this.addAccumulator(t,"last",e)}push(t,e){return this.addAccumulator(t,"push",e)}addAccumulator(t,e,r){return this.accumulators.push({type:e,expression:t,resultFieldName:r}),this}build(){return{group:{groupIds:this.ids.map((t=>({expression:t.expression.build(),key:t.key}))),accumulators:this.accumulators.map((t=>({[t.type]:{expression:t.expression.build()},resultFieldName:t.resultFieldName})))}}}}class Mr{constructor(t){this.arrayFieldName=t}build(){return{unwindArray:{arrayFieldName:this.arrayFieldName}}}}class Lr{constructor(){this.sortFields=[]}ascending(...t){return t.forEach((t=>{this.sortFields.push({fieldName:t,order:L.ASC})})),this}descending(...t){return t.forEach((t=>{this.sortFields.push({fieldName:t,order:L.DESC})})),this}build(){return{sort:{values:this.sortFields}}}}class Fr{constructor(t){this.count=t}build(){return{limit:this.count}}}class Ur{constructor(t){this.count=t}build(){return{skip:this.count}}}class Br{constructor(t,e){this.objectFieldName=t,this.destinationFieldName=e}build(){return{objectToArray:{objectFieldName:this.objectFieldName,destinationFieldName:this.destinationFieldName}}}}const $r={filter:()=>new mr,project:()=>new fr,group:()=>new kr,unwind:t=>new Mr(t),sort:()=>new Lr,limit:t=>new Fr(t),skip:t=>new Ur(t),objectToArray:(t,e)=>new Br(t,e)},jr={field:t=>new gr(t),text:t=>new vr(t),numeric:t=>new Er(t),add:(...t)=>new yr(t),subtract:(t,e)=>new br(t,e),multiply:(...t)=>new Sr(t),divide:(t,e)=>new Tr(t,e),sum:(...t)=>new Pr(t),abs:t=>new _r(t),mod:(t,e)=>new Ir(t,e),floor:t=>new wr(t),ceil:t=>new Rr(t),concat:(...t)=>new Nr(t),stringify:t=>new Ar(t),toLower:t=>new Cr(t),toUpper:t=>new xr(t),substring:(t,e,r)=>new Or(t,e,r),length:t=>new Dr(t)};var Hr;!function(t){t.UNKNOWN="UNKNOWN",t.ANONYMOUS_VISITOR="ANONYMOUS_VISITOR",t.MEMBER="MEMBER",t.WIX_USER="WIX_USER",t.APP="APP"}(Hr||(Hr={}));const Kr=(0,ce.createRESTModule)(je),qr=(0,ce.createRESTModule)(He),Vr=(0,ce.createRESTModule)(Ke),Gr=(0,ce.createRESTModule)(qe),Wr=(0,ce.createRESTModule)(Ve),Yr=(0,ce.createRESTModule)(Ge),Xr=(0,ce.createRESTModule)(We),zr=(0,ce.createRESTModule)(Ye),Jr=(0,ce.createRESTModule)(Xe),Qr=(0,ce.createRESTModule)(ze),Zr=(0,ce.createRESTModule)(Je),tn=(0,ce.createRESTModule)(Qe),en=(0,ce.createRESTModule)(Ze),rn=(0,ce.createRESTModule)(tr),nn=(0,ce.createRESTModule)(er),an=(0,ce.createRESTModule)(rr),sn=(0,ce.createRESTModule)(nr),on=(0,ce.createRESTModule)(ar),cn=(0,ce.createRESTModule)(ir),ln=(0,ce.createRESTModule)(sr),un=(0,ce.createRESTModule)(or),dn=(0,ce.createRESTModule)(cr),hn=(0,ce.createRESTModule)($e),pn=(0,hr.createEventModule)(lr),mn=(0,hr.createEventModule)(ur),fn=(0,hr.createEventModule)(dr)},6164:function(t,e,r){"use strict";function n(t,e,r){function n(t){return t&&t.indexOf("###")>-1?t.replace(/###/g,"."):t}function a(){return!t||"string"==typeof t}for(var i="string"!=typeof e?[].concat(e):e.split(".");i.length>1;){if(a())return{};var s=n(i.shift());!t[s]&&r&&(t[s]=new r),t=t[s]}return a()?{}:{obj:t,k:n(i.shift())}}r.r(e),r.d(e,{default:function(){return $t}});var a=[],i=a.forEach,s=a.slice;var o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},o(t,e)};function c(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}var l=function(){return l=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var a in e=arguments[r])Object.prototype.hasOwnProperty.call(e,a)&&(t[a]=e[a]);return t},l.apply(this,arguments)};function u(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(n=Object.getOwnPropertySymbols(t);a<n.length;a++)e.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(t,n[a])&&(r[n[a]]=t[n[a]])}return r}Object.create;function d(t,e,r){if(r||2===arguments.length)for(var n,a=0,i=e.length;a<i;a++)!n&&a in e||(n||(n=Array.prototype.slice.call(e,0,a)),n[a]=e[a]);return t.concat(n||Array.prototype.slice.call(e))}Object.create;"function"==typeof SuppressedError&&SuppressedError;function h(t,e){var r=e&&e.cache?e.cache:T,n=e&&e.serializer?e.serializer:b;return(e&&e.strategy?e.strategy:g)(t,{cache:r,serializer:n})}function p(t,e,r,n){var a,i=null==(a=n)||"number"==typeof a||"boolean"==typeof a?n:r(n),s=e.get(i);return void 0===s&&(s=t.call(this,n),e.set(i,s)),s}function m(t,e,r){var n=Array.prototype.slice.call(arguments,3),a=r(n),i=e.get(a);return void 0===i&&(i=t.apply(this,n),e.set(a,i)),i}function f(t,e,r,n,a){return r.bind(e,t,n,a)}function g(t,e){return f(t,this,1===t.length?p:m,e.cache.create(),e.serializer)}var v,E,y,b=function(){return JSON.stringify(arguments)},S=function(){function t(){this.cache=Object.create(null)}return t.prototype.get=function(t){return this.cache[t]},t.prototype.set=function(t,e){this.cache[t]=e},t}(),T={create:function(){return new S}},P={variadic:function(t,e){return f(t,this,m,e.cache.create(),e.serializer)},monadic:function(t,e){return f(t,this,p,e.cache.create(),e.serializer)}};function _(t){return t.type===E.literal}function I(t){return t.type===E.argument}function w(t){return t.type===E.number}function R(t){return t.type===E.date}function N(t){return t.type===E.time}function A(t){return t.type===E.select}function C(t){return t.type===E.plural}function x(t){return t.type===E.pound}function O(t){return t.type===E.tag}function D(t){return!(!t||"object"!=typeof t||t.type!==y.number)}function k(t){return!(!t||"object"!=typeof t||t.type!==y.dateTime)}!function(t){t[t.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",t[t.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",t[t.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",t[t.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",t[t.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",t[t.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",t[t.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",t[t.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",t[t.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",t[t.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",t[t.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",t[t.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",t[t.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",t[t.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",t[t.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",t[t.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",t[t.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",t[t.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",t[t.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",t[t.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",t[t.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",t[t.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",t[t.INVALID_TAG=23]="INVALID_TAG",t[t.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",t[t.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",t[t.UNCLOSED_TAG=27]="UNCLOSED_TAG"}(v||(v={})),function(t){t[t.literal=0]="literal",t[t.argument=1]="argument",t[t.number=2]="number",t[t.date=3]="date",t[t.time=4]="time",t[t.select=5]="select",t[t.plural=6]="plural",t[t.pound=7]="pound",t[t.tag=8]="tag"}(E||(E={})),function(t){t[t.number=0]="number",t[t.dateTime=1]="dateTime"}(y||(y={}));var M=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,L=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;function F(t){var e={};return t.replace(L,(function(t){var r=t.length;switch(t[0]){case"G":e.era=4===r?"long":5===r?"narrow":"short";break;case"y":e.year=2===r?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case"q":case"Q":throw new RangeError("`q/Q` (quarter) patterns are not supported");case"M":case"L":e.month=["numeric","2-digit","short","long","narrow"][r-1];break;case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":e.day=["numeric","2-digit"][r-1];break;case"D":case"F":case"g":throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case"E":e.weekday=4===r?"long":5===r?"narrow":"short";break;case"e":if(r<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");e.weekday=["short","long","narrow","short"][r-4];break;case"c":if(r<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");e.weekday=["short","long","narrow","short"][r-4];break;case"a":e.hour12=!0;break;case"b":case"B":throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":e.hourCycle="h12",e.hour=["numeric","2-digit"][r-1];break;case"H":e.hourCycle="h23",e.hour=["numeric","2-digit"][r-1];break;case"K":e.hourCycle="h11",e.hour=["numeric","2-digit"][r-1];break;case"k":e.hourCycle="h24",e.hour=["numeric","2-digit"][r-1];break;case"j":case"J":case"C":throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case"m":e.minute=["numeric","2-digit"][r-1];break;case"s":e.second=["numeric","2-digit"][r-1];break;case"S":case"A":throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":e.timeZoneName=r<4?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""})),e}var U=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;var B=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,$=/^(@+)?(\+|#+)?[rs]?$/g,j=/(\*)(0+)|(#+)(0+)|(0+)/g,H=/^(0+)$/;function K(t){var e={};return"r"===t[t.length-1]?e.roundingPriority="morePrecision":"s"===t[t.length-1]&&(e.roundingPriority="lessPrecision"),t.replace($,(function(t,r,n){return"string"!=typeof n?(e.minimumSignificantDigits=r.length,e.maximumSignificantDigits=r.length):"+"===n?e.minimumSignificantDigits=r.length:"#"===r[0]?e.maximumSignificantDigits=r.length:(e.minimumSignificantDigits=r.length,e.maximumSignificantDigits=r.length+("string"==typeof n?n.length:0)),""})),e}function q(t){switch(t){case"sign-auto":return{signDisplay:"auto"};case"sign-accounting":case"()":return{currencySign:"accounting"};case"sign-always":case"+!":return{signDisplay:"always"};case"sign-accounting-always":case"()!":return{signDisplay:"always",currencySign:"accounting"};case"sign-except-zero":case"+?":return{signDisplay:"exceptZero"};case"sign-accounting-except-zero":case"()?":return{signDisplay:"exceptZero",currencySign:"accounting"};case"sign-never":case"+_":return{signDisplay:"never"}}}function V(t){var e;if("E"===t[0]&&"E"===t[1]?(e={notation:"engineering"},t=t.slice(2)):"E"===t[0]&&(e={notation:"scientific"},t=t.slice(1)),e){var r=t.slice(0,2);if("+!"===r?(e.signDisplay="always",t=t.slice(2)):"+?"===r&&(e.signDisplay="exceptZero",t=t.slice(2)),!H.test(t))throw new Error("Malformed concise eng/scientific notation");e.minimumIntegerDigits=t.length}return e}function G(t){var e=q(t);return e||{}}function W(t){for(var e={},r=0,n=t;r<n.length;r++){var a=n[r];switch(a.stem){case"percent":case"%":e.style="percent";continue;case"%x100":e.style="percent",e.scale=100;continue;case"currency":e.style="currency",e.currency=a.options[0];continue;case"group-off":case",_":e.useGrouping=!1;continue;case"precision-integer":case".":e.maximumFractionDigits=0;continue;case"measure-unit":case"unit":e.style="unit",e.unit=a.options[0].replace(/^(.*?)-/,"");continue;case"compact-short":case"K":e.notation="compact",e.compactDisplay="short";continue;case"compact-long":case"KK":e.notation="compact",e.compactDisplay="long";continue;case"scientific":e=l(l(l({},e),{notation:"scientific"}),a.options.reduce((function(t,e){return l(l({},t),G(e))}),{}));continue;case"engineering":e=l(l(l({},e),{notation:"engineering"}),a.options.reduce((function(t,e){return l(l({},t),G(e))}),{}));continue;case"notation-simple":e.notation="standard";continue;case"unit-width-narrow":e.currencyDisplay="narrowSymbol",e.unitDisplay="narrow";continue;case"unit-width-short":e.currencyDisplay="code",e.unitDisplay="short";continue;case"unit-width-full-name":e.currencyDisplay="name",e.unitDisplay="long";continue;case"unit-width-iso-code":e.currencyDisplay="symbol";continue;case"scale":e.scale=parseFloat(a.options[0]);continue;case"rounding-mode-floor":e.roundingMode="floor";continue;case"rounding-mode-ceiling":e.roundingMode="ceil";continue;case"rounding-mode-down":e.roundingMode="trunc";continue;case"rounding-mode-up":e.roundingMode="expand";continue;case"rounding-mode-half-even":e.roundingMode="halfEven";continue;case"rounding-mode-half-down":e.roundingMode="halfTrunc";continue;case"rounding-mode-half-up":e.roundingMode="halfExpand";continue;case"integer-width":if(a.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");a.options[0].replace(j,(function(t,r,n,a,i,s){if(r)e.minimumIntegerDigits=n.length;else{if(a&&i)throw new Error("We currently do not support maximum integer digits");if(s)throw new Error("We currently do not support exact integer digits")}return""}));continue}if(H.test(a.stem))e.minimumIntegerDigits=a.stem.length;else if(B.test(a.stem)){if(a.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");a.stem.replace(B,(function(t,r,n,a,i,s){return"*"===n?e.minimumFractionDigits=r.length:a&&"#"===a[0]?e.maximumFractionDigits=a.length:i&&s?(e.minimumFractionDigits=i.length,e.maximumFractionDigits=i.length+s.length):(e.minimumFractionDigits=r.length,e.maximumFractionDigits=r.length),""}));var i=a.options[0];"w"===i?e=l(l({},e),{trailingZeroDisplay:"stripIfInteger"}):i&&(e=l(l({},e),K(i)))}else if($.test(a.stem))e=l(l({},e),K(a.stem));else{var s=q(a.stem);s&&(e=l(l({},e),s));var o=V(a.stem);o&&(e=l(l({},e),o))}}return e}var Y,X={"001":["H","h"],419:["h","H","hB","hb"],AC:["H","h","hb","hB"],AD:["H","hB"],AE:["h","hB","hb","H"],AF:["H","hb","hB","h"],AG:["h","hb","H","hB"],AI:["H","h","hb","hB"],AL:["h","H","hB"],AM:["H","hB"],AO:["H","hB"],AR:["h","H","hB","hb"],AS:["h","H"],AT:["H","hB"],AU:["h","hb","H","hB"],AW:["H","hB"],AX:["H"],AZ:["H","hB","h"],BA:["H","hB","h"],BB:["h","hb","H","hB"],BD:["h","hB","H"],BE:["H","hB"],BF:["H","hB"],BG:["H","hB","h"],BH:["h","hB","hb","H"],BI:["H","h"],BJ:["H","hB"],BL:["H","hB"],BM:["h","hb","H","hB"],BN:["hb","hB","h","H"],BO:["h","H","hB","hb"],BQ:["H"],BR:["H","hB"],BS:["h","hb","H","hB"],BT:["h","H"],BW:["H","h","hb","hB"],BY:["H","h"],BZ:["H","h","hb","hB"],CA:["h","hb","H","hB"],CC:["H","h","hb","hB"],CD:["hB","H"],CF:["H","h","hB"],CG:["H","hB"],CH:["H","hB","h"],CI:["H","hB"],CK:["H","h","hb","hB"],CL:["h","H","hB","hb"],CM:["H","h","hB"],CN:["H","hB","hb","h"],CO:["h","H","hB","hb"],CP:["H"],CR:["h","H","hB","hb"],CU:["h","H","hB","hb"],CV:["H","hB"],CW:["H","hB"],CX:["H","h","hb","hB"],CY:["h","H","hb","hB"],CZ:["H"],DE:["H","hB"],DG:["H","h","hb","hB"],DJ:["h","H"],DK:["H"],DM:["h","hb","H","hB"],DO:["h","H","hB","hb"],DZ:["h","hB","hb","H"],EA:["H","h","hB","hb"],EC:["h","H","hB","hb"],EE:["H","hB"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],ER:["h","H"],ES:["H","hB","h","hb"],ET:["hB","hb","h","H"],FI:["H"],FJ:["h","hb","H","hB"],FK:["H","h","hb","hB"],FM:["h","hb","H","hB"],FO:["H","h"],FR:["H","hB"],GA:["H","hB"],GB:["H","h","hb","hB"],GD:["h","hb","H","hB"],GE:["H","hB","h"],GF:["H","hB"],GG:["H","h","hb","hB"],GH:["h","H"],GI:["H","h","hb","hB"],GL:["H","h"],GM:["h","hb","H","hB"],GN:["H","hB"],GP:["H","hB"],GQ:["H","hB","h","hb"],GR:["h","H","hb","hB"],GT:["h","H","hB","hb"],GU:["h","hb","H","hB"],GW:["H","hB"],GY:["h","hb","H","hB"],HK:["h","hB","hb","H"],HN:["h","H","hB","hb"],HR:["H","hB"],HU:["H","h"],IC:["H","h","hB","hb"],ID:["H"],IE:["H","h","hb","hB"],IL:["H","hB"],IM:["H","h","hb","hB"],IN:["h","H"],IO:["H","h","hb","hB"],IQ:["h","hB","hb","H"],IR:["hB","H"],IS:["H"],IT:["H","hB"],JE:["H","h","hb","hB"],JM:["h","hb","H","hB"],JO:["h","hB","hb","H"],JP:["H","K","h"],KE:["hB","hb","H","h"],KG:["H","h","hB","hb"],KH:["hB","h","H","hb"],KI:["h","hb","H","hB"],KM:["H","h","hB","hb"],KN:["h","hb","H","hB"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],KW:["h","hB","hb","H"],KY:["h","hb","H","hB"],KZ:["H","hB"],LA:["H","hb","hB","h"],LB:["h","hB","hb","H"],LC:["h","hb","H","hB"],LI:["H","hB","h"],LK:["H","h","hB","hb"],LR:["h","hb","H","hB"],LS:["h","H"],LT:["H","h","hb","hB"],LU:["H","h","hB"],LV:["H","hB","hb","h"],LY:["h","hB","hb","H"],MA:["H","h","hB","hb"],MC:["H","hB"],MD:["H","hB"],ME:["H","hB","h"],MF:["H","hB"],MG:["H","h"],MH:["h","hb","H","hB"],MK:["H","h","hb","hB"],ML:["H"],MM:["hB","hb","H","h"],MN:["H","h","hb","hB"],MO:["h","hB","hb","H"],MP:["h","hb","H","hB"],MQ:["H","hB"],MR:["h","hB","hb","H"],MS:["H","h","hb","hB"],MT:["H","h"],MU:["H","h"],MV:["H","h"],MW:["h","hb","H","hB"],MX:["h","H","hB","hb"],MY:["hb","hB","h","H"],MZ:["H","hB"],NA:["h","H","hB","hb"],NC:["H","hB"],NE:["H"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NI:["h","H","hB","hb"],NL:["H","hB"],NO:["H","h"],NP:["H","h","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],NZ:["h","hb","H","hB"],OM:["h","hB","hb","H"],PA:["h","H","hB","hb"],PE:["h","H","hB","hb"],PF:["H","h","hB"],PG:["h","H"],PH:["h","hB","hb","H"],PK:["h","hB","H"],PL:["H","h"],PM:["H","hB"],PN:["H","h","hb","hB"],PR:["h","H","hB","hb"],PS:["h","hB","hb","H"],PT:["H","hB"],PW:["h","H"],PY:["h","H","hB","hb"],QA:["h","hB","hb","H"],RE:["H","hB"],RO:["H","hB"],RS:["H","hB","h"],RU:["H"],RW:["H","h"],SA:["h","hB","hb","H"],SB:["h","hb","H","hB"],SC:["H","h","hB"],SD:["h","hB","hb","H"],SE:["H"],SG:["h","hb","H","hB"],SH:["H","h","hb","hB"],SI:["H","hB"],SJ:["H"],SK:["H"],SL:["h","hb","H","hB"],SM:["H","h","hB"],SN:["H","h","hB"],SO:["h","H"],SR:["H","hB"],SS:["h","hb","H","hB"],ST:["H","hB"],SV:["h","H","hB","hb"],SX:["H","h","hb","hB"],SY:["h","hB","hb","H"],SZ:["h","hb","H","hB"],TA:["H","h","hb","hB"],TC:["h","hb","H","hB"],TD:["h","H","hB"],TF:["H","h","hB"],TG:["H","hB"],TH:["H","h"],TJ:["H","h"],TL:["H","hB","hb","h"],TM:["H","h"],TN:["h","hB","hb","H"],TO:["h","H"],TR:["H","hB"],TT:["h","hb","H","hB"],TW:["hB","hb","h","H"],TZ:["hB","hb","H","h"],UA:["H","hB","h"],UG:["hB","hb","H","h"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],UY:["h","H","hB","hb"],UZ:["H","hB","h"],VA:["H","h","hB"],VC:["h","hb","H","hB"],VE:["h","H","hB","hb"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],VN:["H","h"],VU:["h","H"],WF:["H","hB"],WS:["h","H"],XK:["H","hB","h"],YE:["h","hB","hb","H"],YT:["H","hB"],ZA:["H","h","hb","hB"],ZM:["h","hb","H","hB"],ZW:["H","h"],"af-ZA":["H","h","hB","hb"],"ar-001":["h","hB","hb","H"],"ca-ES":["H","h","hB"],"en-001":["h","hb","H","hB"],"en-HK":["h","hb","H","hB"],"en-IL":["H","h","hb","hB"],"en-MY":["h","hb","H","hB"],"es-BR":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"gu-IN":["hB","hb","h","H"],"hi-IN":["hB","h","H"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],"kn-IN":["hB","h","H"],"ml-IN":["hB","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],"ta-IN":["hB","h","hb","H"],"te-IN":["hB","h","H"],"zu-ZA":["H","hB","hb","h"]};function z(t){var e=t.hourCycle;if(void 0===e&&t.hourCycles&&t.hourCycles.length&&(e=t.hourCycles[0]),e)switch(e){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}var r,n=t.language;return"root"!==n&&(r=t.maximize().region),(X[r||""]||X[n||""]||X["".concat(n,"-001")]||X["001"])[0]}var J=new RegExp("^".concat(M.source,"*")),Q=new RegExp("".concat(M.source,"*$"));function Z(t,e){return{start:t,end:e}}var tt=!!String.prototype.startsWith&&"_a".startsWith("a",1),et=!!String.fromCodePoint,rt=!!Object.fromEntries,nt=!!String.prototype.codePointAt,at=!!String.prototype.trimStart,it=!!String.prototype.trimEnd,st=!!Number.isSafeInteger?Number.isSafeInteger:function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t&&Math.abs(t)<=9007199254740991},ot=!0;try{ot="a"===(null===(Y=ft("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu").exec("a"))||void 0===Y?void 0:Y[0])}catch(t){ot=!1}var ct,lt=tt?function(t,e,r){return t.startsWith(e,r)}:function(t,e,r){return t.slice(r,r+e.length)===e},ut=et?String.fromCodePoint:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var r,n="",a=t.length,i=0;a>i;){if((r=t[i++])>1114111)throw RangeError(r+" is not a valid code point");n+=r<65536?String.fromCharCode(r):String.fromCharCode(55296+((r-=65536)>>10),r%1024+56320)}return n},dt=rt?Object.fromEntries:function(t){for(var e={},r=0,n=t;r<n.length;r++){var a=n[r],i=a[0],s=a[1];e[i]=s}return e},ht=nt?function(t,e){return t.codePointAt(e)}:function(t,e){var r=t.length;if(!(e<0||e>=r)){var n,a=t.charCodeAt(e);return a<55296||a>56319||e+1===r||(n=t.charCodeAt(e+1))<56320||n>57343?a:n-56320+(a-55296<<10)+65536}},pt=at?function(t){return t.trimStart()}:function(t){return t.replace(J,"")},mt=it?function(t){return t.trimEnd()}:function(t){return t.replace(Q,"")};function ft(t,e){return new RegExp(t,e)}if(ot){var gt=ft("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");ct=function(t,e){var r;return gt.lastIndex=e,null!==(r=gt.exec(t)[1])&&void 0!==r?r:""}}else ct=function(t,e){for(var r=[];;){var n=ht(t,e);if(void 0===n||yt(n)||bt(n))break;r.push(n),e+=n>=65536?2:1}return ut.apply(void 0,r)};var vt=function(){function t(t,e){void 0===e&&(e={}),this.message=t,this.position={offset:0,line:1,column:1},this.ignoreTag=!!e.ignoreTag,this.locale=e.locale,this.requiresOtherClause=!!e.requiresOtherClause,this.shouldParseSkeletons=!!e.shouldParseSkeletons}return t.prototype.parse=function(){if(0!==this.offset())throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},t.prototype.parseMessage=function(t,e,r){for(var n=[];!this.isEOF();){var a=this.char();if(123===a){if((i=this.parseArgument(t,r)).err)return i;n.push(i.val)}else{if(125===a&&t>0)break;if(35!==a||"plural"!==e&&"selectordinal"!==e){if(60===a&&!this.ignoreTag&&47===this.peek()){if(r)break;return this.error(v.UNMATCHED_CLOSING_TAG,Z(this.clonePosition(),this.clonePosition()))}if(60===a&&!this.ignoreTag&&Et(this.peek()||0)){if((i=this.parseTag(t,e)).err)return i;n.push(i.val)}else{var i;if((i=this.parseLiteral(t,e)).err)return i;n.push(i.val)}}else{var s=this.clonePosition();this.bump(),n.push({type:E.pound,location:Z(s,this.clonePosition())})}}}return{val:n,err:null}},t.prototype.parseTag=function(t,e){var r=this.clonePosition();this.bump();var n=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:E.literal,value:"<".concat(n,"/>"),location:Z(r,this.clonePosition())},err:null};if(this.bumpIf(">")){var a=this.parseMessage(t+1,e,!0);if(a.err)return a;var i=a.val,s=this.clonePosition();if(this.bumpIf("</")){if(this.isEOF()||!Et(this.char()))return this.error(v.INVALID_TAG,Z(s,this.clonePosition()));var o=this.clonePosition();return n!==this.parseTagName()?this.error(v.UNMATCHED_CLOSING_TAG,Z(o,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:E.tag,value:n,children:i,location:Z(r,this.clonePosition())},err:null}:this.error(v.INVALID_TAG,Z(s,this.clonePosition())))}return this.error(v.UNCLOSED_TAG,Z(r,this.clonePosition()))}return this.error(v.INVALID_TAG,Z(r,this.clonePosition()))},t.prototype.parseTagName=function(){var t,e=this.offset();for(this.bump();!this.isEOF()&&(45===(t=this.char())||46===t||t>=48&&t<=57||95===t||t>=97&&t<=122||t>=65&&t<=90||183==t||t>=192&&t<=214||t>=216&&t<=246||t>=248&&t<=893||t>=895&&t<=8191||t>=8204&&t<=8205||t>=8255&&t<=8256||t>=8304&&t<=8591||t>=11264&&t<=12271||t>=12289&&t<=55295||t>=63744&&t<=64975||t>=65008&&t<=65533||t>=65536&&t<=983039);)this.bump();return this.message.slice(e,this.offset())},t.prototype.parseLiteral=function(t,e){for(var r=this.clonePosition(),n="";;){var a=this.tryParseQuote(e);if(a)n+=a;else{var i=this.tryParseUnquoted(t,e);if(i)n+=i;else{var s=this.tryParseLeftAngleBracket();if(!s)break;n+=s}}}var o=Z(r,this.clonePosition());return{val:{type:E.literal,value:n,location:o},err:null}},t.prototype.tryParseLeftAngleBracket=function(){return this.isEOF()||60!==this.char()||!this.ignoreTag&&(Et(t=this.peek()||0)||47===t)?null:(this.bump(),"<");var t},t.prototype.tryParseQuote=function(t){if(this.isEOF()||39!==this.char())return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if("plural"===t||"selectordinal"===t)break;return null;default:return null}this.bump();var e=[this.char()];for(this.bump();!this.isEOF();){var r=this.char();if(39===r){if(39!==this.peek()){this.bump();break}e.push(39),this.bump()}else e.push(r);this.bump()}return ut.apply(void 0,e)},t.prototype.tryParseUnquoted=function(t,e){if(this.isEOF())return null;var r=this.char();return 60===r||123===r||35===r&&("plural"===e||"selectordinal"===e)||125===r&&t>0?null:(this.bump(),ut(r))},t.prototype.parseArgument=function(t,e){var r=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(v.EXPECT_ARGUMENT_CLOSING_BRACE,Z(r,this.clonePosition()));if(125===this.char())return this.bump(),this.error(v.EMPTY_ARGUMENT,Z(r,this.clonePosition()));var n=this.parseIdentifierIfPossible().value;if(!n)return this.error(v.MALFORMED_ARGUMENT,Z(r,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(v.EXPECT_ARGUMENT_CLOSING_BRACE,Z(r,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:E.argument,value:n,location:Z(r,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(v.EXPECT_ARGUMENT_CLOSING_BRACE,Z(r,this.clonePosition())):this.parseArgumentOptions(t,e,n,r);default:return this.error(v.MALFORMED_ARGUMENT,Z(r,this.clonePosition()))}},t.prototype.parseIdentifierIfPossible=function(){var t=this.clonePosition(),e=this.offset(),r=ct(this.message,e),n=e+r.length;return this.bumpTo(n),{value:r,location:Z(t,this.clonePosition())}},t.prototype.parseArgumentOptions=function(t,e,r,n){var a,i=this.clonePosition(),s=this.parseIdentifierIfPossible().value,o=this.clonePosition();switch(s){case"":return this.error(v.EXPECT_ARGUMENT_TYPE,Z(i,o));case"number":case"date":case"time":this.bumpSpace();var c=null;if(this.bumpIf(",")){this.bumpSpace();var u=this.clonePosition();if((S=this.parseSimpleArgStyleIfPossible()).err)return S;if(0===(m=mt(S.val)).length)return this.error(v.EXPECT_ARGUMENT_STYLE,Z(this.clonePosition(),this.clonePosition()));c={style:m,styleLocation:Z(u,this.clonePosition())}}if((T=this.tryParseArgumentClose(n)).err)return T;var d=Z(n,this.clonePosition());if(c&&lt(null==c?void 0:c.style,"::",0)){var h=pt(c.style.slice(2));if("number"===s)return(S=this.parseNumberSkeletonFromString(h,c.styleLocation)).err?S:{val:{type:E.number,value:r,location:d,style:S.val},err:null};if(0===h.length)return this.error(v.EXPECT_DATE_TIME_SKELETON,d);var p=h;this.locale&&(p=function(t,e){for(var r="",n=0;n<t.length;n++){var a=t.charAt(n);if("j"===a){for(var i=0;n+1<t.length&&t.charAt(n+1)===a;)i++,n++;var s=1+(1&i),o=i<2?1:3+(i>>1),c=z(e);for("H"!=c&&"k"!=c||(o=0);o-- >0;)r+="a";for(;s-- >0;)r=c+r}else r+="J"===a?"H":a}return r}(h,this.locale));var m={type:y.dateTime,pattern:p,location:c.styleLocation,parsedOptions:this.shouldParseSkeletons?F(p):{}};return{val:{type:"date"===s?E.date:E.time,value:r,location:d,style:m},err:null}}return{val:{type:"number"===s?E.number:"date"===s?E.date:E.time,value:r,location:d,style:null!==(a=null==c?void 0:c.style)&&void 0!==a?a:null},err:null};case"plural":case"selectordinal":case"select":var f=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(v.EXPECT_SELECT_ARGUMENT_OPTIONS,Z(f,l({},f)));this.bumpSpace();var g=this.parseIdentifierIfPossible(),b=0;if("select"!==s&&"offset"===g.value){if(!this.bumpIf(":"))return this.error(v.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,Z(this.clonePosition(),this.clonePosition()));var S;if(this.bumpSpace(),(S=this.tryParseDecimalInteger(v.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,v.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE)).err)return S;this.bumpSpace(),g=this.parseIdentifierIfPossible(),b=S.val}var T,P=this.tryParsePluralOrSelectOptions(t,s,e,g);if(P.err)return P;if((T=this.tryParseArgumentClose(n)).err)return T;var _=Z(n,this.clonePosition());return"select"===s?{val:{type:E.select,value:r,options:dt(P.val),location:_},err:null}:{val:{type:E.plural,value:r,options:dt(P.val),offset:b,pluralType:"plural"===s?"cardinal":"ordinal",location:_},err:null};default:return this.error(v.INVALID_ARGUMENT_TYPE,Z(i,o))}},t.prototype.tryParseArgumentClose=function(t){return this.isEOF()||125!==this.char()?this.error(v.EXPECT_ARGUMENT_CLOSING_BRACE,Z(t,this.clonePosition())):(this.bump(),{val:!0,err:null})},t.prototype.parseSimpleArgStyleIfPossible=function(){for(var t=0,e=this.clonePosition();!this.isEOF();){switch(this.char()){case 39:this.bump();var r=this.clonePosition();if(!this.bumpUntil("'"))return this.error(v.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,Z(r,this.clonePosition()));this.bump();break;case 123:t+=1,this.bump();break;case 125:if(!(t>0))return{val:this.message.slice(e.offset,this.offset()),err:null};t-=1;break;default:this.bump()}}return{val:this.message.slice(e.offset,this.offset()),err:null}},t.prototype.parseNumberSkeletonFromString=function(t,e){var r=[];try{r=function(t){if(0===t.length)throw new Error("Number skeleton cannot be empty");for(var e=[],r=0,n=t.split(U).filter((function(t){return t.length>0}));r<n.length;r++){var a=n[r].split("/");if(0===a.length)throw new Error("Invalid number skeleton");for(var i=a[0],s=a.slice(1),o=0,c=s;o<c.length;o++)if(0===c[o].length)throw new Error("Invalid number skeleton");e.push({stem:i,options:s})}return e}(t)}catch(t){return this.error(v.INVALID_NUMBER_SKELETON,e)}return{val:{type:y.number,tokens:r,location:e,parsedOptions:this.shouldParseSkeletons?W(r):{}},err:null}},t.prototype.tryParsePluralOrSelectOptions=function(t,e,r,n){for(var a,i=!1,s=[],o=new Set,c=n.value,l=n.location;;){if(0===c.length){var u=this.clonePosition();if("select"===e||!this.bumpIf("="))break;var d=this.tryParseDecimalInteger(v.EXPECT_PLURAL_ARGUMENT_SELECTOR,v.INVALID_PLURAL_ARGUMENT_SELECTOR);if(d.err)return d;l=Z(u,this.clonePosition()),c=this.message.slice(u.offset,this.offset())}if(o.has(c))return this.error("select"===e?v.DUPLICATE_SELECT_ARGUMENT_SELECTOR:v.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,l);"other"===c&&(i=!0),this.bumpSpace();var h=this.clonePosition();if(!this.bumpIf("{"))return this.error("select"===e?v.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:v.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,Z(this.clonePosition(),this.clonePosition()));var p=this.parseMessage(t+1,e,r);if(p.err)return p;var m=this.tryParseArgumentClose(h);if(m.err)return m;s.push([c,{value:p.val,location:Z(h,this.clonePosition())}]),o.add(c),this.bumpSpace(),c=(a=this.parseIdentifierIfPossible()).value,l=a.location}return 0===s.length?this.error("select"===e?v.EXPECT_SELECT_ARGUMENT_SELECTOR:v.EXPECT_PLURAL_ARGUMENT_SELECTOR,Z(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!i?this.error(v.MISSING_OTHER_CLAUSE,Z(this.clonePosition(),this.clonePosition())):{val:s,err:null}},t.prototype.tryParseDecimalInteger=function(t,e){var r=1,n=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(r=-1);for(var a=!1,i=0;!this.isEOF();){var s=this.char();if(!(s>=48&&s<=57))break;a=!0,i=10*i+(s-48),this.bump()}var o=Z(n,this.clonePosition());return a?st(i*=r)?{val:i,err:null}:this.error(e,o):this.error(t,o)},t.prototype.offset=function(){return this.position.offset},t.prototype.isEOF=function(){return this.offset()===this.message.length},t.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},t.prototype.char=function(){var t=this.position.offset;if(t>=this.message.length)throw Error("out of bound");var e=ht(this.message,t);if(void 0===e)throw Error("Offset ".concat(t," is at invalid UTF-16 code unit boundary"));return e},t.prototype.error=function(t,e){return{val:null,err:{kind:t,message:this.message,location:e}}},t.prototype.bump=function(){if(!this.isEOF()){var t=this.char();10===t?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=t<65536?1:2)}},t.prototype.bumpIf=function(t){if(lt(this.message,t,this.offset())){for(var e=0;e<t.length;e++)this.bump();return!0}return!1},t.prototype.bumpUntil=function(t){var e=this.offset(),r=this.message.indexOf(t,e);return r>=0?(this.bumpTo(r),!0):(this.bumpTo(this.message.length),!1)},t.prototype.bumpTo=function(t){if(this.offset()>t)throw Error("targetOffset ".concat(t," must be greater than or equal to the current offset ").concat(this.offset()));for(t=Math.min(t,this.message.length);;){var e=this.offset();if(e===t)break;if(e>t)throw Error("targetOffset ".concat(t," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},t.prototype.bumpSpace=function(){for(;!this.isEOF()&&yt(this.char());)this.bump()},t.prototype.peek=function(){if(this.isEOF())return null;var t=this.char(),e=this.offset(),r=this.message.charCodeAt(e+(t>=65536?2:1));return null!=r?r:null},t}();function Et(t){return t>=97&&t<=122||t>=65&&t<=90}function yt(t){return t>=9&&t<=13||32===t||133===t||t>=8206&&t<=8207||8232===t||8233===t}function bt(t){return t>=33&&t<=35||36===t||t>=37&&t<=39||40===t||41===t||42===t||43===t||44===t||45===t||t>=46&&t<=47||t>=58&&t<=59||t>=60&&t<=62||t>=63&&t<=64||91===t||92===t||93===t||94===t||96===t||123===t||124===t||125===t||126===t||161===t||t>=162&&t<=165||166===t||167===t||169===t||171===t||172===t||174===t||176===t||177===t||182===t||187===t||191===t||215===t||247===t||t>=8208&&t<=8213||t>=8214&&t<=8215||8216===t||8217===t||8218===t||t>=8219&&t<=8220||8221===t||8222===t||8223===t||t>=8224&&t<=8231||t>=8240&&t<=8248||8249===t||8250===t||t>=8251&&t<=8254||t>=8257&&t<=8259||8260===t||8261===t||8262===t||t>=8263&&t<=8273||8274===t||8275===t||t>=8277&&t<=8286||t>=8592&&t<=8596||t>=8597&&t<=8601||t>=8602&&t<=8603||t>=8604&&t<=8607||8608===t||t>=8609&&t<=8610||8611===t||t>=8612&&t<=8613||8614===t||t>=8615&&t<=8621||8622===t||t>=8623&&t<=8653||t>=8654&&t<=8655||t>=8656&&t<=8657||8658===t||8659===t||8660===t||t>=8661&&t<=8691||t>=8692&&t<=8959||t>=8960&&t<=8967||8968===t||8969===t||8970===t||8971===t||t>=8972&&t<=8991||t>=8992&&t<=8993||t>=8994&&t<=9e3||9001===t||9002===t||t>=9003&&t<=9083||9084===t||t>=9085&&t<=9114||t>=9115&&t<=9139||t>=9140&&t<=9179||t>=9180&&t<=9185||t>=9186&&t<=9254||t>=9255&&t<=9279||t>=9280&&t<=9290||t>=9291&&t<=9311||t>=9472&&t<=9654||9655===t||t>=9656&&t<=9664||9665===t||t>=9666&&t<=9719||t>=9720&&t<=9727||t>=9728&&t<=9838||9839===t||t>=9840&&t<=10087||10088===t||10089===t||10090===t||10091===t||10092===t||10093===t||10094===t||10095===t||10096===t||10097===t||10098===t||10099===t||10100===t||10101===t||t>=10132&&t<=10175||t>=10176&&t<=10180||10181===t||10182===t||t>=10183&&t<=10213||10214===t||10215===t||10216===t||10217===t||10218===t||10219===t||10220===t||10221===t||10222===t||10223===t||t>=10224&&t<=10239||t>=10240&&t<=10495||t>=10496&&t<=10626||10627===t||10628===t||10629===t||10630===t||10631===t||10632===t||10633===t||10634===t||10635===t||10636===t||10637===t||10638===t||10639===t||10640===t||10641===t||10642===t||10643===t||10644===t||10645===t||10646===t||10647===t||10648===t||t>=10649&&t<=10711||10712===t||10713===t||10714===t||10715===t||t>=10716&&t<=10747||10748===t||10749===t||t>=10750&&t<=11007||t>=11008&&t<=11055||t>=11056&&t<=11076||t>=11077&&t<=11078||t>=11079&&t<=11084||t>=11085&&t<=11123||t>=11124&&t<=11125||t>=11126&&t<=11157||11158===t||t>=11159&&t<=11263||t>=11776&&t<=11777||11778===t||11779===t||11780===t||11781===t||t>=11782&&t<=11784||11785===t||11786===t||11787===t||11788===t||11789===t||t>=11790&&t<=11798||11799===t||t>=11800&&t<=11801||11802===t||11803===t||11804===t||11805===t||t>=11806&&t<=11807||11808===t||11809===t||11810===t||11811===t||11812===t||11813===t||11814===t||11815===t||11816===t||11817===t||t>=11818&&t<=11822||11823===t||t>=11824&&t<=11833||t>=11834&&t<=11835||t>=11836&&t<=11839||11840===t||11841===t||11842===t||t>=11843&&t<=11855||t>=11856&&t<=11857||11858===t||t>=11859&&t<=11903||t>=12289&&t<=12291||12296===t||12297===t||12298===t||12299===t||12300===t||12301===t||12302===t||12303===t||12304===t||12305===t||t>=12306&&t<=12307||12308===t||12309===t||12310===t||12311===t||12312===t||12313===t||12314===t||12315===t||12316===t||12317===t||t>=12318&&t<=12319||12320===t||12336===t||64830===t||64831===t||t>=65093&&t<=65094}function St(t){t.forEach((function(t){if(delete t.location,A(t)||C(t))for(var e in t.options)delete t.options[e].location,St(t.options[e].value);else w(t)&&D(t.style)||(R(t)||N(t))&&k(t.style)?delete t.style.location:O(t)&&St(t.children)}))}function Tt(t,e){void 0===e&&(e={}),e=l({shouldParseSkeletons:!0,requiresOtherClause:!0},e);var r=new vt(t,e).parse();if(r.err){var n=SyntaxError(v[r.err.kind]);throw n.location=r.err.location,n.originalMessage=r.err.message,n}return(null==e?void 0:e.captureLocation)||St(r.val),r.val}var Pt;!function(t){t.MISSING_VALUE="MISSING_VALUE",t.INVALID_VALUE="INVALID_VALUE",t.MISSING_INTL_API="MISSING_INTL_API"}(Pt||(Pt={}));var _t,It=function(t){function e(e,r,n){var a=t.call(this,e)||this;return a.code=r,a.originalMessage=n,a}return c(e,t),e.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},e}(Error),wt=function(t){function e(e,r,n,a){return t.call(this,'Invalid values for "'.concat(e,'": "').concat(r,'". Options are "').concat(Object.keys(n).join('", "'),'"'),Pt.INVALID_VALUE,a)||this}return c(e,t),e}(It),Rt=function(t){function e(e,r,n){return t.call(this,'Value for "'.concat(e,'" must be of type ').concat(r),Pt.INVALID_VALUE,n)||this}return c(e,t),e}(It),Nt=function(t){function e(e,r){return t.call(this,'The intl string context variable "'.concat(e,'" was not provided to the string "').concat(r,'"'),Pt.MISSING_VALUE,r)||this}return c(e,t),e}(It);function At(t){return"function"==typeof t}function Ct(t,e,r,n,a,i,s){if(1===t.length&&_(t[0]))return[{type:_t.literal,value:t[0].value}];for(var o=[],c=0,l=t;c<l.length;c++){var u=l[c];if(_(u))o.push({type:_t.literal,value:u.value});else if(x(u))"number"==typeof i&&o.push({type:_t.literal,value:r.getNumberFormat(e).format(i)});else{var d=u.value;if(!a||!(d in a))throw new Nt(d,s);var h=a[d];if(I(u))h&&"string"!=typeof h&&"number"!=typeof h||(h="string"==typeof h||"number"==typeof h?String(h):""),o.push({type:"string"==typeof h?_t.literal:_t.object,value:h});else if(R(u)){var p="string"==typeof u.style?n.date[u.style]:k(u.style)?u.style.parsedOptions:void 0;o.push({type:_t.literal,value:r.getDateTimeFormat(e,p).format(h)})}else if(N(u)){p="string"==typeof u.style?n.time[u.style]:k(u.style)?u.style.parsedOptions:n.time.medium;o.push({type:_t.literal,value:r.getDateTimeFormat(e,p).format(h)})}else if(w(u)){(p="string"==typeof u.style?n.number[u.style]:D(u.style)?u.style.parsedOptions:void 0)&&p.scale&&(h*=p.scale||1),o.push({type:_t.literal,value:r.getNumberFormat(e,p).format(h)})}else{if(O(u)){var m=u.children,f=u.value,g=a[f];if(!At(g))throw new Rt(f,"function",s);var v=g(Ct(m,e,r,n,a,i).map((function(t){return t.value})));Array.isArray(v)||(v=[v]),o.push.apply(o,v.map((function(t){return{type:"string"==typeof t?_t.literal:_t.object,value:t}})))}if(A(u)){if(!(E=u.options[h]||u.options.other))throw new wt(u.value,h,Object.keys(u.options),s);o.push.apply(o,Ct(E.value,e,r,n,a))}else if(C(u)){var E;if(!(E=u.options["=".concat(h)])){if(!Intl.PluralRules)throw new It('Intl.PluralRules is not available in this environment.\nTry polyfilling it using "@formatjs/intl-pluralrules"\n',Pt.MISSING_INTL_API,s);var y=r.getPluralRules(e,{type:u.pluralType}).select(h-(u.offset||0));E=u.options[y]||u.options.other}if(!E)throw new wt(u.value,h,Object.keys(u.options),s);o.push.apply(o,Ct(E.value,e,r,n,a,h-(u.offset||0)))}else;}}}return function(t){return t.length<2?t:t.reduce((function(t,e){var r=t[t.length-1];return r&&r.type===_t.literal&&e.type===_t.literal?r.value+=e.value:t.push(e),t}),[])}(o)}function xt(t,e){return e?Object.keys(t).reduce((function(r,n){var a,i;return r[n]=(a=t[n],(i=e[n])?l(l(l({},a||{}),i||{}),Object.keys(a).reduce((function(t,e){return t[e]=l(l({},a[e]),i[e]||{}),t}),{})):a),r}),l({},t)):t}function Ot(t){return{create:function(){return{get:function(e){return t[e]},set:function(e,r){t[e]=r}}}}}!function(t){t[t.literal=0]="literal",t[t.object=1]="object"}(_t||(_t={}));var Dt=function(){function t(e,r,n,a){void 0===r&&(r=t.defaultLocale);var i,s=this;if(this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(t){var e=s.formatToParts(t);if(1===e.length)return e[0].value;var r=e.reduce((function(t,e){return t.length&&e.type===_t.literal&&"string"==typeof t[t.length-1]?t[t.length-1]+=e.value:t.push(e.value),t}),[]);return r.length<=1?r[0]||"":r},this.formatToParts=function(t){return Ct(s.ast,s.locales,s.formatters,s.formats,t,void 0,s.message)},this.resolvedOptions=function(){var t;return{locale:(null===(t=s.resolvedLocale)||void 0===t?void 0:t.toString())||Intl.NumberFormat.supportedLocalesOf(s.locales)[0]}},this.getAst=function(){return s.ast},this.locales=r,this.resolvedLocale=t.resolveLocale(r),"string"==typeof e){if(this.message=e,!t.__parse)throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");var o=a||{},c=(o.formatters,u(o,["formatters"]));this.ast=t.__parse(e,l(l({},c),{locale:this.resolvedLocale}))}else this.ast=e;if(!Array.isArray(this.ast))throw new TypeError("A message must be provided as a String or AST.");this.formats=xt(t.formats,n),this.formatters=a&&a.formatters||(void 0===(i=this.formatterCache)&&(i={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:h((function(){for(var t,e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return new((t=Intl.NumberFormat).bind.apply(t,d([void 0],e,!1)))}),{cache:Ot(i.number),strategy:P.variadic}),getDateTimeFormat:h((function(){for(var t,e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return new((t=Intl.DateTimeFormat).bind.apply(t,d([void 0],e,!1)))}),{cache:Ot(i.dateTime),strategy:P.variadic}),getPluralRules:h((function(){for(var t,e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return new((t=Intl.PluralRules).bind.apply(t,d([void 0],e,!1)))}),{cache:Ot(i.pluralRules),strategy:P.variadic})})}return Object.defineProperty(t,"defaultLocale",{get:function(){return t.memoizedDefaultLocale||(t.memoizedDefaultLocale=(new Intl.NumberFormat).resolvedOptions().locale),t.memoizedDefaultLocale},enumerable:!1,configurable:!0}),t.memoizedDefaultLocale=null,t.resolveLocale=function(t){if(void 0!==Intl.Locale){var e=Intl.NumberFormat.supportedLocalesOf(t);return e.length>0?new Intl.Locale(e[0]):new Intl.Locale("string"==typeof t?t:t[0])}},t.__parse=Tt,t.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},t}(),kt=Dt;function Mt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Lt(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Mt(Object(r),!0).forEach((function(e){Ft(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Mt(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Ft(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Ut(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var Bt=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.type="i18nFormat",this.mem={},this.init(null,e)}var e,r,a;return e=t,r=[{key:"init",value:function(t,e){var r=this,n=t&&t.options&&t.options.i18nFormat||{};if(this.options=function(t){return i.call(s.call(arguments,1),(function(e){if(e)for(var r in e)void 0===t[r]&&(t[r]=e[r])})),t}(n,e,this.options||{},{memoize:!0,memoizeFallback:!1,bindI18n:"",bindI18nStore:"",parseErrorHandler:function(t,e,r,n){return r},parseLngForICU:function(t){return t}}),this.formats=this.options.formats,t){var a=this.options,o=a.bindI18n,c=a.bindI18nStore,l=a.memoize;t.IntlMessageFormat=kt,t.ICU=this,l&&(o&&t.on(o,(function(){return r.clearCache()})),c&&t.store.on(c,(function(){return r.clearCache()})))}}},{key:"addUserDefinedFormats",value:function(t){this.formats=this.formats?Lt(Lt({},this.formats),t):t}},{key:"parse",value:function(t,e,r,a,i,s){var o,c,l,u,d=s&&s.resolved&&s.resolved.res,h=this.options.memoize&&"".concat(r,".").concat(a,".").concat(i.replace(/\./g,"###"));this.options.memoize&&(o=function(t,e){var r=n(t,e),a=r.obj,i=r.k;if(a)return a[i]}(this.mem,h));try{if(!o){var p=this.options.parseLngForICU(r);o=new kt(t,p,this.formats,{ignoreTag:!0}),this.options.memoize&&(this.options.memoizeFallback||!s||d)&&(c=this.mem,l=o,(u=n(c,h,Object)).obj[u.k]=l)}return o.format(e)}catch(r){return this.options.parseErrorHandler(r,i,t,e)}}},{key:"addLookupKeys",value:function(t,e,r,n,a){return t}},{key:"clearCache",value:function(){this.mem={}}}],r&&Ut(e.prototype,r),a&&Ut(e,a),t}();Bt.type="i18nFormat";var $t=Bt},8029:function(t){"use strict";const e=t=>"string"==typeof t,r=()=>{let t,e;const r=new Promise(((r,n)=>{t=r,e=n}));return r.resolve=t,r.reject=e,r},n=t=>null==t?"":""+t,a=/###/g,i=t=>t&&t.indexOf("###")>-1?t.replace(a,"."):t,s=t=>!t||e(t),o=(t,r,n)=>{const a=e(r)?r.split("."):r;let o=0;for(;o<a.length-1;){if(s(t))return{};const e=i(a[o]);!t[e]&&n&&(t[e]=new n),t=Object.prototype.hasOwnProperty.call(t,e)?t[e]:{},++o}return s(t)?{}:{obj:t,k:i(a[o])}},c=(t,e,r)=>{const{obj:n,k:a}=o(t,e,Object);if(void 0!==n||1===e.length)return void(n[a]=r);let i=e[e.length-1],s=e.slice(0,e.length-1),c=o(t,s,Object);for(;void 0===c.obj&&s.length;)i=`${s[s.length-1]}.${i}`,s=s.slice(0,s.length-1),c=o(t,s,Object),c?.obj&&void 0!==c.obj[`${c.k}.${i}`]&&(c.obj=void 0);c.obj[`${c.k}.${i}`]=r},l=(t,e)=>{const{obj:r,k:n}=o(t,e);if(r&&Object.prototype.hasOwnProperty.call(r,n))return r[n]},u=(t,r,n)=>{for(const a in r)"__proto__"!==a&&"constructor"!==a&&(a in t?e(t[a])||t[a]instanceof String||e(r[a])||r[a]instanceof String?n&&(t[a]=r[a]):u(t[a],r[a],n):t[a]=r[a]);return t},d=t=>t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var h={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const p=t=>e(t)?t.replace(/[&<>"'\/]/g,(t=>h[t])):t;const m=[" ",",","?","!",";"],f=new class{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const e=this.regExpMap.get(t);if(void 0!==e)return e;const r=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,r),this.regExpQueue.push(t),r}}(20),g=(t,e,r=".")=>{if(!t)return;if(t[e]){if(!Object.prototype.hasOwnProperty.call(t,e))return;return t[e]}const n=e.split(r);let a=t;for(let t=0;t<n.length;){if(!a||"object"!=typeof a)return;let e,i="";for(let s=t;s<n.length;++s)if(s!==t&&(i+=r),i+=n[s],e=a[i],void 0!==e){if(["string","number","boolean"].indexOf(typeof e)>-1&&s<n.length-1)continue;t+=s-t+1;break}a=e}return a},v=t=>t?.replace("_","-"),E={type:"logger",log(t){this.output("log",t)},warn(t){this.output("warn",t)},error(t){this.output("error",t)},output(t,e){console?.[t]?.apply?.(console,e)}};class y{constructor(t,e={}){this.init(t,e)}init(t,e={}){this.prefix=e.prefix||"i18next:",this.logger=t||E,this.options=e,this.debug=e.debug}log(...t){return this.forward(t,"log","",!0)}warn(...t){return this.forward(t,"warn","",!0)}error(...t){return this.forward(t,"error","")}deprecate(...t){return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(t,r,n,a){return a&&!this.debug?null:(e(t[0])&&(t[0]=`${n}${this.prefix} ${t[0]}`),this.logger[r](t))}create(t){return new y(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return(t=t||this.options).prefix=t.prefix||this.prefix,new y(this.logger,t)}}var b=new y;class S{constructor(){this.observers={}}on(t,e){return t.split(" ").forEach((t=>{this.observers[t]||(this.observers[t]=new Map);const r=this.observers[t].get(e)||0;this.observers[t].set(e,r+1)})),this}off(t,e){this.observers[t]&&(e?this.observers[t].delete(e):delete this.observers[t])}emit(t,...e){if(this.observers[t]){Array.from(this.observers[t].entries()).forEach((([t,r])=>{for(let n=0;n<r;n++)t(...e)}))}if(this.observers["*"]){Array.from(this.observers["*"].entries()).forEach((([r,n])=>{for(let a=0;a<n;a++)r.apply(r,[t,...e])}))}}}class T extends S{constructor(t,e={ns:["translation"],defaultNS:"translation"}){super(),this.data=t||{},this.options=e,void 0===this.options.keySeparator&&(this.options.keySeparator="."),void 0===this.options.ignoreJSONStructure&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const e=this.options.ns.indexOf(t);e>-1&&this.options.ns.splice(e,1)}getResource(t,r,n,a={}){const i=void 0!==a.keySeparator?a.keySeparator:this.options.keySeparator,s=void 0!==a.ignoreJSONStructure?a.ignoreJSONStructure:this.options.ignoreJSONStructure;let o;t.indexOf(".")>-1?o=t.split("."):(o=[t,r],n&&(Array.isArray(n)?o.push(...n):e(n)&&i?o.push(...n.split(i)):o.push(n)));const c=l(this.data,o);return!c&&!r&&!n&&t.indexOf(".")>-1&&(t=o[0],r=o[1],n=o.slice(2).join(".")),!c&&s&&e(n)?g(this.data?.[t]?.[r],n,i):c}addResource(t,e,r,n,a={silent:!1}){const i=void 0!==a.keySeparator?a.keySeparator:this.options.keySeparator;let s=[t,e];r&&(s=s.concat(i?r.split(i):r)),t.indexOf(".")>-1&&(s=t.split("."),n=e,e=s[1]),this.addNamespaces(e),c(this.data,s,n),a.silent||this.emit("added",t,e,r,n)}addResources(t,r,n,a={silent:!1}){for(const a in n)(e(n[a])||Array.isArray(n[a]))&&this.addResource(t,r,a,n[a],{silent:!0});a.silent||this.emit("added",t,r,n)}addResourceBundle(t,e,r,n,a,i={silent:!1,skipCopy:!1}){let s=[t,e];t.indexOf(".")>-1&&(s=t.split("."),n=r,r=e,e=s[1]),this.addNamespaces(e);let o=l(this.data,s)||{};i.skipCopy||(r=JSON.parse(JSON.stringify(r))),n?u(o,r,a):o={...o,...r},c(this.data,s,o),i.silent||this.emit("added",t,e,r)}removeResourceBundle(t,e){this.hasResourceBundle(t,e)&&delete this.data[t][e],this.removeNamespaces(e),this.emit("removed",t,e)}hasResourceBundle(t,e){return void 0!==this.getResource(t,e)}getResourceBundle(t,e){return e||(e=this.options.defaultNS),this.getResource(t,e)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const e=this.getDataByLanguage(t);return!!(e&&Object.keys(e)||[]).find((t=>e[t]&&Object.keys(e[t]).length>0))}toJSON(){return this.data}}var P={processors:{},addPostProcessor(t){this.processors[t.name]=t},handle(t,e,r,n,a){return t.forEach((t=>{e=this.processors[t]?.process(e,r,n,a)??e})),e}};const _={},I=t=>!e(t)&&"boolean"!=typeof t&&"number"!=typeof t;class w extends S{constructor(t,e={}){var r,n;super(),r=t,n=this,["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"].forEach((t=>{r[t]&&(n[t]=r[t])})),this.options=e,void 0===this.options.keySeparator&&(this.options.keySeparator="."),this.logger=b.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t,e={interpolation:{}}){const r={...e};if(null==t)return!1;return void 0!==this.resolve(t,r)?.res}extractFromKey(t,r){let n=void 0!==r.nsSeparator?r.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");const a=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator;let i=r.ns||this.options.defaultNS||[];const s=n&&t.indexOf(n)>-1,o=!(this.options.userDefinedKeySeparator||r.keySeparator||this.options.userDefinedNsSeparator||r.nsSeparator||((t,e,r)=>{e=e||"",r=r||"";const n=m.filter((t=>e.indexOf(t)<0&&r.indexOf(t)<0));if(0===n.length)return!0;const a=f.getRegExp(`(${n.map((t=>"?"===t?"\\?":t)).join("|")})`);let i=!a.test(t);if(!i){const e=t.indexOf(r);e>0&&!a.test(t.substring(0,e))&&(i=!0)}return i})(t,n,a));if(s&&!o){const r=t.match(this.interpolator.nestingRegexp);if(r&&r.length>0)return{key:t,namespaces:e(i)?[i]:i};const s=t.split(n);(n!==a||n===a&&this.options.ns.indexOf(s[0])>-1)&&(i=s.shift()),t=s.join(a)}return{key:t,namespaces:e(i)?[i]:i}}translate(t,r,n){let a="object"==typeof r?{...r}:r;if("object"!=typeof a&&this.options.overloadTranslationOptionHandler&&(a=this.options.overloadTranslationOptionHandler(arguments)),"object"==typeof options&&(a={...a}),a||(a={}),null==t)return"";Array.isArray(t)||(t=[String(t)]);const i=void 0!==a.returnDetails?a.returnDetails:this.options.returnDetails,s=void 0!==a.keySeparator?a.keySeparator:this.options.keySeparator,{key:o,namespaces:c}=this.extractFromKey(t[t.length-1],a),l=c[c.length-1];let u=void 0!==a.nsSeparator?a.nsSeparator:this.options.nsSeparator;void 0===u&&(u=":");const d=a.lng||this.language,h=a.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if("cimode"===d?.toLowerCase())return h?i?{res:`${l}${u}${o}`,usedKey:o,exactUsedKey:o,usedLng:d,usedNS:l,usedParams:this.getUsedParamsDetails(a)}:`${l}${u}${o}`:i?{res:o,usedKey:o,exactUsedKey:o,usedLng:d,usedNS:l,usedParams:this.getUsedParamsDetails(a)}:o;const p=this.resolve(t,a);let m=p?.res;const f=p?.usedKey||o,g=p?.exactUsedKey||o,v=void 0!==a.joinArrays?a.joinArrays:this.options.joinArrays,E=!this.i18nFormat||this.i18nFormat.handleAsObject,y=void 0!==a.count&&!e(a.count),b=w.hasDefaultValue(a),S=y?this.pluralResolver.getSuffix(d,a.count,a):"",T=a.ordinal&&y?this.pluralResolver.getSuffix(d,a.count,{ordinal:!1}):"",P=y&&!a.ordinal&&0===a.count,_=P&&a[`defaultValue${this.options.pluralSeparator}zero`]||a[`defaultValue${S}`]||a[`defaultValue${T}`]||a.defaultValue;let R=m;E&&!m&&b&&(R=_);const N=I(R),A=Object.prototype.toString.apply(R);if(!(E&&R&&N&&["[object Number]","[object Function]","[object RegExp]"].indexOf(A)<0)||e(v)&&Array.isArray(R))if(E&&e(v)&&Array.isArray(m))m=m.join(v),m&&(m=this.extendTranslation(m,t,a,n));else{let e=!1,r=!1;!this.isValidLookup(m)&&b&&(e=!0,m=_),this.isValidLookup(m)||(r=!0,m=o);const i=(a.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&r?void 0:m,c=b&&_!==m&&this.options.updateMissing;if(r||e||c){if(this.logger.log(c?"updateKey":"missingKey",d,l,o,c?_:m),s){const t=this.resolve(o,{...a,keySeparator:!1});t&&t.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let t=[];const e=this.languageUtils.getFallbackCodes(this.options.fallbackLng,a.lng||this.language);if("fallback"===this.options.saveMissingTo&&e&&e[0])for(let r=0;r<e.length;r++)t.push(e[r]);else"all"===this.options.saveMissingTo?t=this.languageUtils.toResolveHierarchy(a.lng||this.language):t.push(a.lng||this.language);const r=(t,e,r)=>{const n=b&&r!==m?r:i;this.options.missingKeyHandler?this.options.missingKeyHandler(t,l,e,n,c,a):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(t,l,e,n,c,a),this.emit("missingKey",t,l,e,m)};this.options.saveMissing&&(this.options.saveMissingPlurals&&y?t.forEach((t=>{const e=this.pluralResolver.getSuffixes(t,a);P&&a[`defaultValue${this.options.pluralSeparator}zero`]&&e.indexOf(`${this.options.pluralSeparator}zero`)<0&&e.push(`${this.options.pluralSeparator}zero`),e.forEach((e=>{r([t],o+e,a[`defaultValue${e}`]||_)}))})):r(t,o,_))}m=this.extendTranslation(m,t,a,p,n),r&&m===o&&this.options.appendNamespaceToMissingKey&&(m=`${l}${u}${o}`),(r||e)&&this.options.parseMissingKeyHandler&&(m=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}${u}${o}`:o,e?m:void 0,a))}else{if(!a.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const t=this.options.returnedObjectHandler?this.options.returnedObjectHandler(f,R,{...a,ns:c}):`key '${o} (${this.language})' returned an object instead of string.`;return i?(p.res=t,p.usedParams=this.getUsedParamsDetails(a),p):t}if(s){const t=Array.isArray(R),e=t?[]:{},r=t?g:f;for(const t in R)if(Object.prototype.hasOwnProperty.call(R,t)){const n=`${r}${s}${t}`;e[t]=b&&!m?this.translate(n,{...a,defaultValue:I(_)?_[t]:void 0,joinArrays:!1,ns:c}):this.translate(n,{...a,joinArrays:!1,ns:c}),e[t]===n&&(e[t]=R[t])}m=e}}return i?(p.res=m,p.usedParams=this.getUsedParamsDetails(a),p):m}extendTranslation(t,r,n,a,i){if(this.i18nFormat?.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||a.usedLng,a.usedNS,a.usedKey,{resolved:a});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});const s=e(t)&&(void 0!==n?.interpolation?.skipOnVariables?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let o;if(s){const e=t.match(this.interpolator.nestingRegexp);o=e&&e.length}let c=n.replace&&!e(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(c={...this.options.interpolation.defaultVariables,...c}),t=this.interpolator.interpolate(t,c,n.lng||this.language||a.usedLng,n),s){const e=t.match(this.interpolator.nestingRegexp);o<(e&&e.length)&&(n.nest=!1)}!n.lng&&a&&a.res&&(n.lng=this.language||a.usedLng),!1!==n.nest&&(t=this.interpolator.nest(t,((...t)=>i?.[0]!==t[0]||n.context?this.translate(...t,r):(this.logger.warn(`It seems you are nesting recursively key: ${t[0]} in key: ${r[0]}`),null)),n)),n.interpolation&&this.interpolator.reset()}const s=n.postProcess||this.options.postProcess,o=e(s)?[s]:s;return null!=t&&o?.length&&!1!==n.applyPostProcessor&&(t=P.handle(o,t,r,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...a,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),t}resolve(t,r={}){let n,a,i,s,o;return e(t)&&(t=[t]),t.forEach((t=>{if(this.isValidLookup(n))return;const c=this.extractFromKey(t,r),l=c.key;a=l;let u=c.namespaces;this.options.fallbackNS&&(u=u.concat(this.options.fallbackNS));const d=void 0!==r.count&&!e(r.count),h=d&&!r.ordinal&&0===r.count,p=void 0!==r.context&&(e(r.context)||"number"==typeof r.context)&&""!==r.context,m=r.lngs?r.lngs:this.languageUtils.toResolveHierarchy(r.lng||this.language,r.fallbackLng);u.forEach((t=>{this.isValidLookup(n)||(o=t,_[`${m[0]}-${t}`]||!this.utils?.hasLoadedNamespace||this.utils?.hasLoadedNamespace(o)||(_[`${m[0]}-${t}`]=!0,this.logger.warn(`key "${a}" for languages "${m.join(", ")}" won't get resolved as namespace "${o}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),m.forEach((e=>{if(this.isValidLookup(n))return;s=e;const a=[l];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(a,l,e,t,r);else{let t;d&&(t=this.pluralResolver.getSuffix(e,r.count,r));const n=`${this.options.pluralSeparator}zero`,i=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(d&&(a.push(l+t),r.ordinal&&0===t.indexOf(i)&&a.push(l+t.replace(i,this.options.pluralSeparator)),h&&a.push(l+n)),p){const e=`${l}${this.options.contextSeparator}${r.context}`;a.push(e),d&&(a.push(e+t),r.ordinal&&0===t.indexOf(i)&&a.push(e+t.replace(i,this.options.pluralSeparator)),h&&a.push(e+n))}}let o;for(;o=a.pop();)this.isValidLookup(n)||(i=o,n=this.getResource(e,t,o,r))})))}))})),{res:n,usedKey:a,exactUsedKey:i,usedLng:s,usedNS:o}}isValidLookup(t){return!(void 0===t||!this.options.returnNull&&null===t||!this.options.returnEmptyString&&""===t)}getResource(t,e,r,n={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(t,e,r,n):this.resourceStore.getResource(t,e,r,n)}getUsedParamsDetails(t={}){const r=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=t.replace&&!e(t.replace);let a=n?t.replace:t;if(n&&void 0!==t.count&&(a.count=t.count),this.options.interpolation.defaultVariables&&(a={...this.options.interpolation.defaultVariables,...a}),!n){a={...a};for(const t of r)delete a[t]}return a}static hasDefaultValue(t){const e="defaultValue";for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&e===r.substring(0,e.length)&&void 0!==t[r])return!0;return!1}}class R{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=b.create("languageUtils")}getScriptPartFromCode(t){if(!(t=v(t))||t.indexOf("-")<0)return null;const e=t.split("-");return 2===e.length?null:(e.pop(),"x"===e[e.length-1].toLowerCase()?null:this.formatLanguageCode(e.join("-")))}getLanguagePartFromCode(t){if(!(t=v(t))||t.indexOf("-")<0)return t;const e=t.split("-");return this.formatLanguageCode(e[0])}formatLanguageCode(t){if(e(t)&&t.indexOf("-")>-1){let e;try{e=Intl.getCanonicalLocales(t)[0]}catch(t){}return e&&this.options.lowerCaseLng&&(e=e.toLowerCase()),e||(this.options.lowerCaseLng?t.toLowerCase():t)}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let e;return t.forEach((t=>{if(e)return;const r=this.formatLanguageCode(t);this.options.supportedLngs&&!this.isSupportedCode(r)||(e=r)})),!e&&this.options.supportedLngs&&t.forEach((t=>{if(e)return;const r=this.getScriptPartFromCode(t);if(this.isSupportedCode(r))return e=r;const n=this.getLanguagePartFromCode(t);if(this.isSupportedCode(n))return e=n;e=this.options.supportedLngs.find((t=>t===n?t:t.indexOf("-")<0&&n.indexOf("-")<0?void 0:t.indexOf("-")>0&&n.indexOf("-")<0&&t.substring(0,t.indexOf("-"))===n||0===t.indexOf(n)&&n.length>1?t:void 0))})),e||(e=this.getFallbackCodes(this.options.fallbackLng)[0]),e}getFallbackCodes(t,r){if(!t)return[];if("function"==typeof t&&(t=t(r)),e(t)&&(t=[t]),Array.isArray(t))return t;if(!r)return t.default||[];let n=t[r];return n||(n=t[this.getScriptPartFromCode(r)]),n||(n=t[this.formatLanguageCode(r)]),n||(n=t[this.getLanguagePartFromCode(r)]),n||(n=t.default),n||[]}toResolveHierarchy(t,r){const n=this.getFallbackCodes((!1===r?[]:r)||this.options.fallbackLng||[],t),a=[],i=t=>{t&&(this.isSupportedCode(t)?a.push(t):this.logger.warn(`rejecting language code not found in supportedLngs: ${t}`))};return e(t)&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?("languageOnly"!==this.options.load&&i(this.formatLanguageCode(t)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&i(this.getScriptPartFromCode(t)),"currentOnly"!==this.options.load&&i(this.getLanguagePartFromCode(t))):e(t)&&i(this.formatLanguageCode(t)),n.forEach((t=>{a.indexOf(t)<0&&i(this.formatLanguageCode(t))})),a}}const N={zero:0,one:1,two:2,few:3,many:4,other:5},A={select:t=>1===t?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class C{constructor(t,e={}){this.languageUtils=t,this.options=e,this.logger=b.create("pluralResolver"),this.pluralRulesCache={}}addRule(t,e){this.rules[t]=e}clearCache(){this.pluralRulesCache={}}getRule(t,e={}){const r=v("dev"===t?"en":t),n=e.ordinal?"ordinal":"cardinal",a=JSON.stringify({cleanedCode:r,type:n});if(a in this.pluralRulesCache)return this.pluralRulesCache[a];let i;try{i=new Intl.PluralRules(r,{type:n})}catch(r){if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),A;if(!t.match(/-|_/))return A;const n=this.languageUtils.getLanguagePartFromCode(t);i=this.getRule(n,e)}return this.pluralRulesCache[a]=i,i}needsPlural(t,e={}){let r=this.getRule(t,e);return r||(r=this.getRule("dev",e)),r?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(t,e,r={}){return this.getSuffixes(t,r).map((t=>`${e}${t}`))}getSuffixes(t,e={}){let r=this.getRule(t,e);return r||(r=this.getRule("dev",e)),r?r.resolvedOptions().pluralCategories.sort(((t,e)=>N[t]-N[e])).map((t=>`${this.options.prepend}${e.ordinal?`ordinal${this.options.prepend}`:""}${t}`)):[]}getSuffix(t,e,r={}){const n=this.getRule(t,r);return n?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${n.select(e)}`:(this.logger.warn(`no plural rule found for: ${t}`),this.getSuffix("dev",e,r))}}const x=(t,r,n,a=".",i=!0)=>{let s=((t,e,r)=>{const n=l(t,r);return void 0!==n?n:l(e,r)})(t,r,n);return!s&&i&&e(n)&&(s=g(t,n,a),void 0===s&&(s=g(r,n,a))),s},O=t=>t.replace(/\$/g,"$$$$");class D{constructor(t={}){this.logger=b.create("interpolator"),this.options=t,this.format=t?.interpolation?.format||(t=>t),this.init(t)}init(t={}){t.interpolation||(t.interpolation={escapeValue:!0});const{escape:e,escapeValue:r,useRawValueToEscape:n,prefix:a,prefixEscaped:i,suffix:s,suffixEscaped:o,formatSeparator:c,unescapeSuffix:l,unescapePrefix:u,nestingPrefix:h,nestingPrefixEscaped:m,nestingSuffix:f,nestingSuffixEscaped:g,nestingOptionsSeparator:v,maxReplaces:E,alwaysFormat:y}=t.interpolation;this.escape=void 0!==e?e:p,this.escapeValue=void 0===r||r,this.useRawValueToEscape=void 0!==n&&n,this.prefix=a?d(a):i||"{{",this.suffix=s?d(s):o||"}}",this.formatSeparator=c||",",this.unescapePrefix=l?"":u||"-",this.unescapeSuffix=this.unescapePrefix?"":l||"",this.nestingPrefix=h?d(h):m||d("$t("),this.nestingSuffix=f?d(f):g||d(")"),this.nestingOptionsSeparator=v||",",this.maxReplaces=E||1e3,this.alwaysFormat=void 0!==y&&y,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(t,e)=>t?.source===e?(t.lastIndex=0,t):new RegExp(e,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(t,r,a,i){let s,o,c;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},u=t=>{if(t.indexOf(this.formatSeparator)<0){const e=x(r,l,t,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(e,void 0,a,{...i,...r,interpolationkey:t}):e}const e=t.split(this.formatSeparator),n=e.shift().trim(),s=e.join(this.formatSeparator).trim();return this.format(x(r,l,n,this.options.keySeparator,this.options.ignoreJSONStructure),s,a,{...i,...r,interpolationkey:n})};this.resetRegExp();const d=i?.missingInterpolationHandler||this.options.missingInterpolationHandler,h=void 0!==i?.interpolation?.skipOnVariables?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:t=>O(t)},{regex:this.regexp,safeValue:t=>this.escapeValue?O(this.escape(t)):O(t)}].forEach((r=>{for(c=0;s=r.regex.exec(t);){const a=s[1].trim();if(o=u(a),void 0===o)if("function"==typeof d){const r=d(t,s,i);o=e(r)?r:""}else if(i&&Object.prototype.hasOwnProperty.call(i,a))o="";else{if(h){o=s[0];continue}this.logger.warn(`missed to pass in variable ${a} for interpolating ${t}`),o=""}else e(o)||this.useRawValueToEscape||(o=n(o));const l=r.safeValue(o);if(t=t.replace(s[0],l),h?(r.regex.lastIndex+=o.length,r.regex.lastIndex-=s[0].length):r.regex.lastIndex=0,c++,c>=this.maxReplaces)break}})),t}nest(t,r,a={}){let i,s,o;const c=(t,e)=>{const r=this.nestingOptionsSeparator;if(t.indexOf(r)<0)return t;const n=t.split(new RegExp(`${r}[ ]*{`));let a=`{${n[1]}`;t=n[0],a=this.interpolate(a,o);const i=a.match(/'/g),s=a.match(/"/g);((i?.length??0)%2==0&&!s||s.length%2!=0)&&(a=a.replace(/'/g,'"'));try{o=JSON.parse(a),e&&(o={...e,...o})}catch(e){return this.logger.warn(`failed parsing options string in nesting for key ${t}`,e),`${t}${r}${a}`}return o.defaultValue&&o.defaultValue.indexOf(this.prefix)>-1&&delete o.defaultValue,t};for(;i=this.nestingRegexp.exec(t);){let l=[];o={...a},o=o.replace&&!e(o.replace)?o.replace:o,o.applyPostProcessor=!1,delete o.defaultValue;const u=/{.*}/.test(i[1])?i[1].lastIndexOf("}")+1:i[1].indexOf(this.formatSeparator);if(-1!==u&&(l=i[1].slice(u).split(this.formatSeparator).map((t=>t.trim())).filter(Boolean),i[1]=i[1].slice(0,u)),s=r(c.call(this,i[1].trim(),o),o),s&&i[0]===t&&!e(s))return s;e(s)||(s=n(s)),s||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${t}`),s=""),l.length&&(s=l.reduce(((t,e)=>this.format(t,e,a.lng,{...a,interpolationkey:i[1].trim()})),s.trim())),t=t.replace(i[0],s),this.regexp.lastIndex=0}return t}}const k=t=>{const e={};return(r,n,a)=>{let i=a;a&&a.interpolationkey&&a.formatParams&&a.formatParams[a.interpolationkey]&&a[a.interpolationkey]&&(i={...i,[a.interpolationkey]:void 0});const s=n+JSON.stringify(i);let o=e[s];return o||(o=t(v(n),a),e[s]=o),o(r)}},M=t=>(e,r,n)=>t(v(r),n)(e);class L{constructor(t={}){this.logger=b.create("formatter"),this.options=t,this.init(t)}init(t,e={interpolation:{}}){this.formatSeparator=e.interpolation.formatSeparator||",";const r=e.cacheInBuiltFormats?k:M;this.formats={number:r(((t,e)=>{const r=new Intl.NumberFormat(t,{...e});return t=>r.format(t)})),currency:r(((t,e)=>{const r=new Intl.NumberFormat(t,{...e,style:"currency"});return t=>r.format(t)})),datetime:r(((t,e)=>{const r=new Intl.DateTimeFormat(t,{...e});return t=>r.format(t)})),relativetime:r(((t,e)=>{const r=new Intl.RelativeTimeFormat(t,{...e});return t=>r.format(t,e.range||"day")})),list:r(((t,e)=>{const r=new Intl.ListFormat(t,{...e});return t=>r.format(t)}))}}add(t,e){this.formats[t.toLowerCase().trim()]=e}addCached(t,e){this.formats[t.toLowerCase().trim()]=k(e)}format(t,e,r,n={}){const a=e.split(this.formatSeparator);if(a.length>1&&a[0].indexOf("(")>1&&a[0].indexOf(")")<0&&a.find((t=>t.indexOf(")")>-1))){const t=a.findIndex((t=>t.indexOf(")")>-1));a[0]=[a[0],...a.splice(1,t)].join(this.formatSeparator)}return a.reduce(((t,e)=>{const{formatName:a,formatOptions:i}=(t=>{let e=t.toLowerCase().trim();const r={};if(t.indexOf("(")>-1){const n=t.split("(");e=n[0].toLowerCase().trim();const a=n[1].substring(0,n[1].length-1);"currency"===e&&a.indexOf(":")<0?r.currency||(r.currency=a.trim()):"relativetime"===e&&a.indexOf(":")<0?r.range||(r.range=a.trim()):a.split(";").forEach((t=>{if(t){const[e,...n]=t.split(":"),a=n.join(":").trim().replace(/^'+|'+$/g,""),i=e.trim();r[i]||(r[i]=a),"false"===a&&(r[i]=!1),"true"===a&&(r[i]=!0),isNaN(a)||(r[i]=parseInt(a,10))}}))}return{formatName:e,formatOptions:r}})(e);if(this.formats[a]){let e=t;try{const s=n?.formatParams?.[n.interpolationkey]||{},o=s.locale||s.lng||n.locale||n.lng||r;e=this.formats[a](t,o,{...i,...n,...s})}catch(t){this.logger.warn(t)}return e}return this.logger.warn(`there was no format function for ${a}`),t}),t)}}class F extends S{constructor(t,e,r,n={}){super(),this.backend=t,this.store=e,this.services=r,this.languageUtils=r.languageUtils,this.options=n,this.logger=b.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=n.maxParallelReads||10,this.readingCalls=0,this.maxRetries=n.maxRetries>=0?n.maxRetries:5,this.retryTimeout=n.retryTimeout>=1?n.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(r,n.backend,n)}queueLoad(t,e,r,n){const a={},i={},s={},o={};return t.forEach((t=>{let n=!0;e.forEach((e=>{const s=`${t}|${e}`;!r.reload&&this.store.hasResourceBundle(t,e)?this.state[s]=2:this.state[s]<0||(1===this.state[s]?void 0===i[s]&&(i[s]=!0):(this.state[s]=1,n=!1,void 0===i[s]&&(i[s]=!0),void 0===a[s]&&(a[s]=!0),void 0===o[e]&&(o[e]=!0)))})),n||(s[t]=!0)})),(Object.keys(a).length||Object.keys(i).length)&&this.queue.push({pending:i,pendingCount:Object.keys(i).length,loaded:{},errors:[],callback:n}),{toLoad:Object.keys(a),pending:Object.keys(i),toLoadLanguages:Object.keys(s),toLoadNamespaces:Object.keys(o)}}loaded(t,e,r){const n=t.split("|"),a=n[0],i=n[1];e&&this.emit("failedLoading",a,i,e),!e&&r&&this.store.addResourceBundle(a,i,r,void 0,void 0,{skipCopy:!0}),this.state[t]=e?-1:2,e&&r&&(this.state[t]=0);const s={};this.queue.forEach((r=>{((t,e,r,n)=>{const{obj:a,k:i}=o(t,e,Object);a[i]=a[i]||[],a[i].push(r)})(r.loaded,[a],i),((t,e)=>{void 0!==t.pending[e]&&(delete t.pending[e],t.pendingCount--)})(r,t),e&&r.errors.push(e),0!==r.pendingCount||r.done||(Object.keys(r.loaded).forEach((t=>{s[t]||(s[t]={});const e=r.loaded[t];e.length&&e.forEach((e=>{void 0===s[t][e]&&(s[t][e]=!0)}))})),r.done=!0,r.errors.length?r.callback(r.errors):r.callback())})),this.emit("loaded",s),this.queue=this.queue.filter((t=>!t.done))}read(t,e,r,n=0,a=this.retryTimeout,i){if(!t.length)return i(null,{});if(this.readingCalls>=this.maxParallelReads)return void this.waitingReads.push({lng:t,ns:e,fcName:r,tried:n,wait:a,callback:i});this.readingCalls++;const s=(s,o)=>{if(this.readingCalls--,this.waitingReads.length>0){const t=this.waitingReads.shift();this.read(t.lng,t.ns,t.fcName,t.tried,t.wait,t.callback)}s&&o&&n<this.maxRetries?setTimeout((()=>{this.read.call(this,t,e,r,n+1,2*a,i)}),a):i(s,o)},o=this.backend[r].bind(this.backend);if(2!==o.length)return o(t,e,s);try{const r=o(t,e);r&&"function"==typeof r.then?r.then((t=>s(null,t))).catch(s):s(null,r)}catch(t){s(t)}}prepareLoading(t,r,n={},a){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),a&&a();e(t)&&(t=this.languageUtils.toResolveHierarchy(t)),e(r)&&(r=[r]);const i=this.queueLoad(t,r,n,a);if(!i.toLoad.length)return i.pending.length||a(),null;i.toLoad.forEach((t=>{this.loadOne(t)}))}load(t,e,r){this.prepareLoading(t,e,{},r)}reload(t,e,r){this.prepareLoading(t,e,{reload:!0},r)}loadOne(t,e=""){const r=t.split("|"),n=r[0],a=r[1];this.read(n,a,"read",void 0,void 0,((r,i)=>{r&&this.logger.warn(`${e}loading namespace ${a} for language ${n} failed`,r),!r&&i&&this.logger.log(`${e}loaded namespace ${a} for language ${n}`,i),this.loaded(t,r,i)}))}saveMissing(t,e,r,n,a,i={},s=(()=>{})){if(!this.services?.utils?.hasLoadedNamespace||this.services?.utils?.hasLoadedNamespace(e)){if(null!=r&&""!==r){if(this.backend?.create){const o={...i,isUpdate:a},c=this.backend.create.bind(this.backend);if(c.length<6)try{let a;a=5===c.length?c(t,e,r,n,o):c(t,e,r,n),a&&"function"==typeof a.then?a.then((t=>s(null,t))).catch(s):s(null,a)}catch(t){s(t)}else c(t,e,r,n,s,o)}t&&t[0]&&this.store.addResource(t[0],e,r,n)}}else this.logger.warn(`did not save key "${r}" as the namespace "${e}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")}}const U=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:t=>{let r={};if("object"==typeof t[1]&&(r=t[1]),e(t[1])&&(r.defaultValue=t[1]),e(t[2])&&(r.tDescription=t[2]),"object"==typeof t[2]||"object"==typeof t[3]){const e=t[3]||t[2];Object.keys(e).forEach((t=>{r[t]=e[t]}))}return r},interpolation:{escapeValue:!0,format:t=>t,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),B=t=>(e(t.ns)&&(t.ns=[t.ns]),e(t.fallbackLng)&&(t.fallbackLng=[t.fallbackLng]),e(t.fallbackNS)&&(t.fallbackNS=[t.fallbackNS]),t.supportedLngs?.indexOf?.("cimode")<0&&(t.supportedLngs=t.supportedLngs.concat(["cimode"])),"boolean"==typeof t.initImmediate&&(t.initAsync=t.initImmediate),t),$=()=>{};class j extends S{constructor(t={},e){var r;if(super(),this.options=B(t),this.services={},this.logger=b,this.modules={external:[]},r=this,Object.getOwnPropertyNames(Object.getPrototypeOf(r)).forEach((t=>{"function"==typeof r[t]&&(r[t]=r[t].bind(r))})),e&&!this.isInitialized&&!t.isClone){if(!this.options.initAsync)return this.init(t,e),this;setTimeout((()=>{this.init(t,e)}),0)}}init(t={},n){this.isInitializing=!0,"function"==typeof t&&(n=t,t={}),null==t.defaultNS&&t.ns&&(e(t.ns)?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));const a=U();this.options={...a,...this.options,...B(t)},this.options.interpolation={...a.interpolation,...this.options.interpolation},void 0!==t.keySeparator&&(this.options.userDefinedKeySeparator=t.keySeparator),void 0!==t.nsSeparator&&(this.options.userDefinedNsSeparator=t.nsSeparator);const i=t=>t?"function"==typeof t?new t:t:null;if(!this.options.isClone){let t;this.modules.logger?b.init(i(this.modules.logger),this.options):b.init(null,this.options),t=this.modules.formatter?this.modules.formatter:L;const e=new R(this.options);this.store=new T(this.options.resources,this.options);const r=this.services;r.logger=b,r.resourceStore=this.store,r.languageUtils=e,r.pluralResolver=new C(e,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix});this.options.interpolation.format&&this.options.interpolation.format!==a.interpolation.format&&this.logger.warn("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),!t||this.options.interpolation.format&&this.options.interpolation.format!==a.interpolation.format||(r.formatter=i(t),r.formatter.init&&r.formatter.init(r,this.options),this.options.interpolation.format=r.formatter.format.bind(r.formatter)),r.interpolator=new D(this.options),r.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},r.backendConnector=new F(i(this.modules.backend),r.resourceStore,r,this.options),r.backendConnector.on("*",((t,...e)=>{this.emit(t,...e)})),this.modules.languageDetector&&(r.languageDetector=i(this.modules.languageDetector),r.languageDetector.init&&r.languageDetector.init(r,this.options.detection,this.options)),this.modules.i18nFormat&&(r.i18nFormat=i(this.modules.i18nFormat),r.i18nFormat.init&&r.i18nFormat.init(this)),this.translator=new w(this.services,this.options),this.translator.on("*",((t,...e)=>{this.emit(t,...e)})),this.modules.external.forEach((t=>{t.init&&t.init(this)}))}if(this.format=this.options.interpolation.format,n||(n=$),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const t=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);t.length>0&&"dev"!==t[0]&&(this.options.lng=t[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined");["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach((t=>{this[t]=(...e)=>this.store[t](...e)}));["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach((t=>{this[t]=(...e)=>(this.store[t](...e),this)}));const s=r(),o=()=>{const t=(t,e)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),s.resolve(e),n(t,e)};if(this.languages&&!this.isInitialized)return t(null,this.t.bind(this));this.changeLanguage(this.options.lng,t)};return this.options.resources||!this.options.initAsync?o():setTimeout(o,0),s}loadResources(t,r=$){let n=r;const a=e(t)?t:this.language;if("function"==typeof t&&(n=t),!this.options.resources||this.options.partialBundledLanguages){if("cimode"===a?.toLowerCase()&&(!this.options.preload||0===this.options.preload.length))return n();const t=[],e=e=>{if(!e)return;if("cimode"===e)return;this.services.languageUtils.toResolveHierarchy(e).forEach((e=>{"cimode"!==e&&t.indexOf(e)<0&&t.push(e)}))};if(a)e(a);else{this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach((t=>e(t)))}this.options.preload?.forEach?.((t=>e(t))),this.services.backendConnector.load(t,this.options.ns,(t=>{t||this.resolvedLanguage||!this.language||this.setResolvedLanguage(this.language),n(t)}))}else n(null)}reloadResources(t,e,n){const a=r();return"function"==typeof t&&(n=t,t=void 0),"function"==typeof e&&(n=e,e=void 0),t||(t=this.languages),e||(e=this.options.ns),n||(n=$),this.services.backendConnector.reload(t,e,(t=>{a.resolve(),n(t)})),a}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===t.type&&(this.modules.backend=t),("logger"===t.type||t.log&&t.warn&&t.error)&&(this.modules.logger=t),"languageDetector"===t.type&&(this.modules.languageDetector=t),"i18nFormat"===t.type&&(this.modules.i18nFormat=t),"postProcessor"===t.type&&P.addPostProcessor(t),"formatter"===t.type&&(this.modules.formatter=t),"3rdParty"===t.type&&this.modules.external.push(t),this}setResolvedLanguage(t){if(t&&this.languages&&!(["cimode","dev"].indexOf(t)>-1)){for(let t=0;t<this.languages.length;t++){const e=this.languages[t];if(!(["cimode","dev"].indexOf(e)>-1)&&this.store.hasLanguageSomeTranslations(e)){this.resolvedLanguage=e;break}}!this.resolvedLanguage&&this.languages.indexOf(t)<0&&this.store.hasLanguageSomeTranslations(t)&&(this.resolvedLanguage=t,this.languages.unshift(t))}}changeLanguage(t,n){this.isLanguageChangingTo=t;const a=r();this.emit("languageChanging",t);const i=t=>{this.language=t,this.languages=this.services.languageUtils.toResolveHierarchy(t),this.resolvedLanguage=void 0,this.setResolvedLanguage(t)},s=(e,r)=>{r?this.isLanguageChangingTo===t&&(i(r),this.translator.changeLanguage(r),this.isLanguageChangingTo=void 0,this.emit("languageChanged",r),this.logger.log("languageChanged",r)):this.isLanguageChangingTo=void 0,a.resolve(((...t)=>this.t(...t))),n&&n(e,((...t)=>this.t(...t)))},o=r=>{t||r||!this.services.languageDetector||(r=[]);const n=e(r)?r:r&&r[0],a=this.store.hasLanguageSomeTranslations(n)?n:this.services.languageUtils.getBestMatchFromCodes(e(r)?[r]:r);a&&(this.language||i(a),this.translator.language||this.translator.changeLanguage(a),this.services.languageDetector?.cacheUserLanguage?.(a)),this.loadResources(a,(t=>{s(t,a)}))};return t||!this.services.languageDetector||this.services.languageDetector.async?!t&&this.services.languageDetector&&this.services.languageDetector.async?0===this.services.languageDetector.detect.length?this.services.languageDetector.detect().then(o):this.services.languageDetector.detect(o):o(t):o(this.services.languageDetector.detect()),a}getFixedT(t,r,n){const a=(t,e,...r)=>{let i;i="object"!=typeof e?this.options.overloadTranslationOptionHandler([t,e].concat(r)):{...e},i.lng=i.lng||a.lng,i.lngs=i.lngs||a.lngs,i.ns=i.ns||a.ns,""!==i.keyPrefix&&(i.keyPrefix=i.keyPrefix||n||a.keyPrefix);const s=this.options.keySeparator||".";let o;return o=i.keyPrefix&&Array.isArray(t)?t.map((t=>`${i.keyPrefix}${s}${t}`)):i.keyPrefix?`${i.keyPrefix}${s}${t}`:t,this.t(o,i)};return e(t)?a.lng=t:a.lngs=t,a.ns=r,a.keyPrefix=n,a}t(...t){return this.translator?.translate(...t)}exists(...t){return this.translator?.exists(...t)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t,e={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=e.lng||this.resolvedLanguage||this.languages[0],n=!!this.options&&this.options.fallbackLng,a=this.languages[this.languages.length-1];if("cimode"===r.toLowerCase())return!0;const i=(t,e)=>{const r=this.services.backendConnector.state[`${t}|${e}`];return-1===r||0===r||2===r};if(e.precheck){const t=e.precheck(this,i);if(void 0!==t)return t}return!!this.hasResourceBundle(r,t)||(!(this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages))||!(!i(r,t)||n&&!i(a,t)))}loadNamespaces(t,n){const a=r();return this.options.ns?(e(t)&&(t=[t]),t.forEach((t=>{this.options.ns.indexOf(t)<0&&this.options.ns.push(t)})),this.loadResources((t=>{a.resolve(),n&&n(t)})),a):(n&&n(),Promise.resolve())}loadLanguages(t,n){const a=r();e(t)&&(t=[t]);const i=this.options.preload||[],s=t.filter((t=>i.indexOf(t)<0&&this.services.languageUtils.isSupportedCode(t)));return s.length?(this.options.preload=i.concat(s),this.loadResources((t=>{a.resolve(),n&&n(t)})),a):(n&&n(),Promise.resolve())}dir(t){if(t||(t=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!t)return"rtl";try{const e=new Intl.Locale(t);if(e&&e.getTextInfo){const t=e.getTextInfo();if(t&&t.direction)return t.direction}}catch(t){}const e=this.services?.languageUtils||new R(U());return t.toLowerCase().indexOf("-latn")>1?"ltr":["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].indexOf(e.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(t={},e){return new j(t,e)}cloneInstance(t={},e=$){const r=t.forkResourceStore;r&&delete t.forkResourceStore;const n={...this.options,...t,isClone:!0},a=new j(n);void 0===t.debug&&void 0===t.prefix||(a.logger=a.logger.clone(t));if(["store","services","language"].forEach((t=>{a[t]=this[t]})),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},r){const t=Object.keys(this.store.data).reduce(((t,e)=>(t[e]={...this.store.data[e]},t[e]=Object.keys(t[e]).reduce(((r,n)=>(r[n]={...t[e][n]},r)),t[e]),t)),{});a.store=new T(t,n),a.services.resourceStore=a.store}return a.translator=new w(a.services,n),a.translator.on("*",((t,...e)=>{a.emit(t,...e)})),a.init(n,e),a.translator.options=n,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const H=j.createInstance();H.createInstance=j.createInstance,t.exports=H},6395:function(t){var e=Object.prototype.toString;t.exports=function(t){var r=typeof t;return"undefined"===r?"undefined":null===t?"null":!0===t||!1===t||t instanceof Boolean?"boolean":"string"===r||t instanceof String?"string":"number"===r||t instanceof Number?"number":"function"===r||t instanceof Function?void 0!==t.constructor.name&&"Generator"===t.constructor.name.slice(0,9)?"generatorfunction":"function":void 0!==Array.isArray&&Array.isArray(t)?"array":t instanceof RegExp?"regexp":t instanceof Date?"date":"[object RegExp]"===(r=e.call(t))?"regexp":"[object Date]"===r?"date":"[object Arguments]"===r?"arguments":"[object Error]"===r?"error":"[object Promise]"===r?"promise":function(t){return t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}(t)?"buffer":"[object Set]"===r?"set":"[object WeakSet]"===r?"weakset":"[object Map]"===r?"map":"[object WeakMap]"===r?"weakmap":"[object Symbol]"===r?"symbol":"[object Map Iterator]"===r?"mapiterator":"[object Set Iterator]"===r?"setiterator":"[object String Iterator]"===r?"stringiterator":"[object Array Iterator]"===r?"arrayiterator":"[object Int8Array]"===r?"int8array":"[object Uint8Array]"===r?"uint8array":"[object Uint8ClampedArray]"===r?"uint8clampedarray":"[object Int16Array]"===r?"int16array":"[object Uint16Array]"===r?"uint16array":"[object Int32Array]"===r?"int32array":"[object Uint32Array]"===r?"uint32array":"[object Float32Array]"===r?"float32array":"[object Float64Array]"===r?"float64array":"object"}},8341:function(t){var e=Object.prototype.toString;function r(t){return"function"==typeof t.constructor?t.constructor.name:null}t.exports=function(t){if(void 0===t)return"undefined";if(null===t)return"null";var n,a=typeof t;if("boolean"===a)return"boolean";if("string"===a)return"string";if("number"===a)return"number";if("symbol"===a)return"symbol";if("function"===a)return n=t,"GeneratorFunction"===r(n)?"generatorfunction":"function";if(function(t){return Array.isArray?Array.isArray(t):t instanceof Array}(t))return"array";if(function(t){if(t.constructor&&"function"==typeof t.constructor.isBuffer)return t.constructor.isBuffer(t);return!1}(t))return"buffer";if(function(t){try{if("number"==typeof t.length&&"function"==typeof t.callee)return!0}catch(t){if(-1!==t.message.indexOf("callee"))return!0}return!1}(t))return"arguments";if(function(t){return t instanceof Date||"function"==typeof t.toDateString&&"function"==typeof t.getDate&&"function"==typeof t.setDate}(t))return"date";if(function(t){return t instanceof Error||"string"==typeof t.message&&t.constructor&&"number"==typeof t.constructor.stackTraceLimit}(t))return"error";if(function(t){return t instanceof RegExp||"string"==typeof t.flags&&"boolean"==typeof t.ignoreCase&&"boolean"==typeof t.multiline&&"boolean"==typeof t.global}(t))return"regexp";switch(r(t)){case"Symbol":return"symbol";case"Promise":return"promise";case"WeakMap":return"weakmap";case"WeakSet":return"weakset";case"Map":return"map";case"Set":return"set";case"Int8Array":return"int8array";case"Uint8Array":return"uint8array";case"Uint8ClampedArray":return"uint8clampedarray";case"Int16Array":return"int16array";case"Uint16Array":return"uint16array";case"Int32Array":return"int32array";case"Uint32Array":return"uint32array";case"Float32Array":return"float32array";case"Float64Array":return"float64array"}if(function(t){return"function"==typeof t.throw&&"function"==typeof t.return&&"function"==typeof t.next}(t))return"generator";switch(a=e.call(t)){case"[object Object]":return"object";case"[object Map Iterator]":return"mapiterator";case"[object Set Iterator]":return"setiterator";case"[object String Iterator]":return"stringiterator";case"[object Array Iterator]":return"arrayiterator"}return a.slice(8,-1).toLowerCase().replace(/\s/g,"")}},3835:function(t){var e=Object.prototype.hasOwnProperty;function r(t){return"[Throws: "+(t?t.message:"?")+"]"}function n(t){var n=[];return function t(a){if(null===a||"object"!=typeof a)return a;if(-1!==n.indexOf(a))return"[Circular]";if(n.push(a),"function"==typeof a.toJSON)try{var i=t(a.toJSON());return n.pop(),i}catch(t){return r(t)}if(Array.isArray(a)){var s=a.map(t);return n.pop(),s}var o=Object.keys(a).reduce((function(n,i){return n[i]=t(function(t,n){if(e.call(t,n))try{return t[n]}catch(t){return r(t)}return t[n]}(a,i)),n}),{});return n.pop(),o}(t)}t.exports=function(t,e,r){return JSON.stringify(n(t),e,r)},t.exports.ensureProperties=n},4002:function(e,r){r.It=function(){return elementorySupport.getJSON(t("logInBackend","backend/SSRLog.web.js"),arguments,void 0,void 0)},r.Bl=function(){return elementorySupport.getJSON(t("warnInBackend","backend/SSRLog.web.js"),arguments,void 0,void 0)},r.iJ=function(){return elementorySupport.getJSON(t("errorInBackend","backend/SSRLog.web.js"),arguments,void 0,void 0)},r.Ho=function(){return elementorySupport.getJSON(t("infoInBackend","backend/SSRLog.web.js"),arguments,void 0,void 0)}},6994:function(t,e,r){var n=r(2372);t.exports=function(t,e,r){return(e=n(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t},t.exports.__esModule=!0,t.exports.default=t.exports},3693:function(t,e,r){var n=r(170).default;t.exports=function(t,e){if("object"!=n(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var a=r.call(t,e||"default");if("object"!=n(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)},t.exports.__esModule=!0,t.exports.default=t.exports},2372:function(t,e,r){var n=r(170).default,a=r(3693);t.exports=function(t){var e=a(t,"string");return"symbol"==n(e)?e:e+""},t.exports.__esModule=!0,t.exports.default=t.exports},170:function(t){function e(r){return t.exports=e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.__esModule=!0,t.exports.default=t.exports,e(r)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports},5376:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getTokenInfo=e.getContextualAuth=void 0,e.elevate=function(t){return(0,n.createRESTModule)(t,!0)};const n=r(7512);var a=r(492);Object.defineProperty(e,"getContextualAuth",{enumerable:!0,get:function(){return a.getContextualAuth}}),e.getTokenInfo=(0,n.createRESTModule)((t=>async()=>{if(!t.getActiveToken)throw new Error("Unable to get the currently active token. Please make sure you are using an authentication strategy that supports this operation.");const e=await fetch("https://www.wixapis.com/oauth2/token-info",{method:"POST",body:JSON.stringify({token:t.getActiveToken()}),headers:{"Content-Type":"application/json"}});if(!e.ok)throw new Error(`Failed to fetch token info: ${e.status} - ${e.statusText}. ${await e.text()}`);return e.json()}))},8799:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.bi=void 0;const n=r(8409);e.bi=(0,n.createHostModule)({getLogger:t=>()=>{if(!t.getBiLogger)throw new Error("Host bi logger is not available on the current host. Make sure to use an updated version of the host initialization pacakge.");return t.getBiLogger()}})},9398:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createErrorHandler=function(t){return new n.ErrorHandler({environment:{artifactId:"sdk-essentials"},biDefaultsOverrides:{hostingEnvironment:t.name},biLoggerOrFactory:{async report(){}},showError:t.showError,createErrorMonitor:()=>({captureException(){}}),createI18n:({asyncMessagesLoader:e})=>(0,a.createI18n)(t,e)}).v2};const n=r(9074),a=r(9650)},6189:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.reportRetryAttempt=e.showError=e.getResolvedError=e.withErrorHandler=void 0;const n=r(8409),a=r(9398),i=t=>e=>{if(e.getErrorHandler)return t(e.getErrorHandler());const r=(0,a.createErrorHandler)(e);return e.getErrorHandler=()=>r,t((0,a.createErrorHandler)(e))},s=(0,n.createHostModule)({withErrorHandler:i((t=>t.withErrorHandler)),getResolvedError:i((t=>t.getResolvedError)),showError:i((t=>t.showError)),reportRetryAttempt:i((t=>t.reportRetryAttempt))});e.withErrorHandler=s.withErrorHandler,e.getResolvedError=s.getResolvedError,e.showError=s.showError,e.reportRetryAttempt=s.reportRetryAttempt},4795:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.experiments=void 0;const n=r(8409);e.experiments=(0,n.createHostModule)({enabled:t=>e=>{if(!t.getExperiments)throw new Error('Host "Experiments" are not available on the current host. Make sure to use an updated version of the host initialization pacakge.');return t.getExperiments().enabled(e)},get:t=>e=>{if(!t.getExperiments)throw new Error('Host "Experiments" are not available on the current host. Make sure to use an updated version of the host initialization pacakge.');return t.getExperiments().get(e)}})},8559:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.graphql=e.fetchWithAuth=void 0;const n=r(7512);e.fetchWithAuth=(0,n.createRESTModule)((t=>(e,r)=>t.fetchWithAuth(e,r))),e.graphql=(0,n.createRESTModule)((t=>async function(e,r,n={apiVersion:"alpha"}){return(await t.request((({host:t})=>({method:"POST",url:`${"www.wixapis.com"===t?"/graphql":"/_api/graphql"}/${n.apiVersion}`,data:{query:e,variables:r},packageName:"@wix/essentials"})))).data}))},9650:function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.createI18n=function(t,e){const r=a.default.createInstance({lng:t.essentials?.locale||"en",fallbackLng:"en",keySeparator:!1}).use(i.default);e&&r.use(function(t){return{type:"backend",init:()=>{},read:async(e,r,n)=>{try{return n(null,await t(e))}catch(t){return n(t,null)}}}}(e));return r};const a=n(r(8029)),i=n(r(6164))},9622:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.i18n=void 0;const n=r(8409);e.i18n=(0,n.createHostModule)({getLanguage:t=>()=>{const e=t.essentials?.language;if(!e)throw new Error("Host language is not available on the current host. Make sure to use an updated version of the host initialization pacakge.");return e},getLocale:t=>()=>{const e=t.essentials?.locale;if(!e)throw new Error("Host locale is not available on the current host. Make sure to use an updated version of the host initialization pacakge.");return e}})},387:function(t,e,r){"use strict";var n,a=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var a=Object.getOwnPropertyDescriptor(e,r);a&&!("get"in a?!e.__esModule:a.writable||a.configurable)||(a={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,a)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),s=this&&this.__importStar||(n=function(t){return n=Object.getOwnPropertyNames||function(t){var e=[];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[e.length]=r);return e},n(t)},function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r=n(t),s=0;s<r.length;s++)"default"!==r[s]&&a(e,t,r[s]);return i(e,t),e});Object.defineProperty(e,"__esModule",{value:!0}),e.settings=e.experiments=e.bi=e.monitoring=e.i18n=e.errorHandler=e.httpClient=e.auth=void 0;const o=s(r(5376));e.auth=o;const c=s(r(8559));e.httpClient=c;const l=s(r(6189));e.errorHandler=l;var u=r(9622);Object.defineProperty(e,"i18n",{enumerable:!0,get:function(){return u.i18n}});var d=r(5630);Object.defineProperty(e,"monitoring",{enumerable:!0,get:function(){return d.monitoring}});var h=r(8799);Object.defineProperty(e,"bi",{enumerable:!0,get:function(){return h.bi}});var p=r(4795);Object.defineProperty(e,"experiments",{enumerable:!0,get:function(){return p.experiments}});var m=r(6666);Object.defineProperty(e,"settings",{enumerable:!0,get:function(){return m.settings}})},5630:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.monitoring=void 0;const n=r(5588),a=r(8409);e.monitoring=(0,a.createHostModule)({getMonitoringClient:t=>()=>t.getMonitoringClient?t.getMonitoringClient():(0,n.createFallbackMonitoringClient)("Host monitoring client is not available on the current host. Make sure to use an updated version of the host initialization package.")})},6666:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.settings=void 0;const n=r(8409);e.settings=(0,n.createHostModule)({getTimezone:t=>()=>{const e=t.essentials?.timezone;if(!e)throw new Error("Host timezone is not available on the current host. Make sure to use an updated version of the host initialization package.");return e}})},5588:function(t){"use strict";var e,r=Object.defineProperty,n=Object.getOwnPropertyDescriptor,a=Object.getOwnPropertyNames,i=Object.prototype.hasOwnProperty,s={};((t,e)=>{for(var n in e)r(t,n,{get:e[n],enumerable:!0})})(s,{createFallbackMonitoringClient:()=>d,generateTagsAndContext:()=>u}),t.exports=(e=s,((t,e,s,o)=>{if(e&&"object"==typeof e||"function"==typeof e)for(let c of a(e))i.call(t,c)||c===s||r(t,c,{get:()=>e[c],enumerable:!(o=n(e,c))||o.enumerable});return t})(r({},"__esModule",{value:!0}),e));var o=t=>null!=t&&""!==t,c=t=>l(t,o);function l(t,e=(t=>!!t)){if(!t)return{};const r={};for(const n in t)e(t[n],n)&&(r[n]=t[n]);return r}var u=t=>({tags:c({"app.id":t.appId,"app.version":t.appVersion,"app.instanceId":t.appInstanceId,"extension.id":t.extensionId,"extension.name":t.extensionName,"extension.type":t.extensionType,platform:t.platform}),contexts:l({"extension.data":c({...t.extensionData}),site:c({url:t.siteUrl,id:"SITE"===t.tenantType?t.tenantId:void 0}),account:c({id:"ACCOUNT"===t.tenantType?t.tenantId:void 0})},(t=>!!t&&Object.keys(t).length>0))}),d=t=>new class{constructor(t){this.message=t,this.captureException=()=>{console.error(this.message)},this.captureMessage=()=>{console.error(this.message)},this.startSpan=(t,e)=>(console.error(this.message),e(void 0)),this.startSpanManual=()=>(console.error(this.message),{end:()=>{},fail:()=>{}}),this.endSpanManual=()=>{console.error(this.message)},this.addBreadcrumb=()=>{console.error(this.message)}}}(t)},9773:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DEFAULT_LIMIT=e.PAGING_METADATA_RESULT_PROPERTY_NAME=e.ITEMS_RESULT_PROPERTY_NAME=e.RESTResponseToSDKResponseRenameMap=e.SDKRequestToRESTRequestRenameMap=e.WIX_PROTOCOL=void 0,e.WIX_PROTOCOL="wix:",e.SDKRequestToRESTRequestRenameMap={_id:"id",_createdDate:"createdDate",_updatedDate:"updatedDate"},e.RESTResponseToSDKResponseRenameMap={id:"_id",createdDate:"_createdDate",updatedDate:"_updatedDate"},e.ITEMS_RESULT_PROPERTY_NAME="items",e.PAGING_METADATA_RESULT_PROPERTY_NAME="pagingMetadata",e.DEFAULT_LIMIT=50},787:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ServicePluginDefinition=e.EventDefinition=void 0,e.contextualizeHostModuleV2=function(t,e){return{...t,...Object.fromEntries(e.map((e=>[e,(...r)=>{const n=(0,a.resolveContext)();if(!n)throw new Error("Wix context is not available. Make sure to initialize the Wix context before using SDK modules");return n.initWixModules(t)[e].apply(void 0,r)}])))}},e.contextualizeRESTModuleV2=function(t,e){return(...r)=>{const n=(0,a.resolveContext)();return n?n.initWixModules(t,e).apply(void 0,r):t.apply(void 0,r)}},e.contextualizeEventDefinitionModuleV2=function(t){const e=(...e)=>{const r=(0,a.resolveContext)();return r?r.initWixModules(t).apply(void 0,e):()=>{}};return e.__type=t.__type,e.type=t.type,e.isDomainEvent=t.isDomainEvent,e.transformations=t.transformations,e},e.contextualizeSerivcePluginModuleV2=function(t){const e=(...e)=>{const r=(0,a.resolveContext)();return r?r.initWixModules(t).apply(void 0,e):()=>{}};return e.__type=t.__type,e.componentType=t.componentType,e.methods=t.methods,e};const n=r(3251);Object.defineProperty(e,"EventDefinition",{enumerable:!0,get:function(){return n.EventDefinition}}),Object.defineProperty(e,"ServicePluginDefinition",{enumerable:!0,get:function(){return n.ServicePluginDefinition}});const a=r(492)},492:function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var a=Object.getOwnPropertyDescriptor(e,r);a&&!("get"in a?!e.__esModule:a.writable||a.configurable)||(a={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,a)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),a=this&&this.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};Object.defineProperty(e,"__esModule",{value:!0}),e.resolveContext=s,e.contextualizeHostModule=function(t,e){return(...r)=>{const n=s();if(!n)throw new Error("Wix context is not available. Make sure to initialize the Wix context before using SDK modules");return n.initWixModules(t)[e].apply(void 0,r)}},e.getContextualAuth=function(){const t=s();if(!t)throw new Error("Wix context is not available. Make sure to initialize the Wix context before using SDK modules");return t.getAuth()},e.contextualizeRESTModule=function(t,e){return(...r)=>{const n=s();if(!n)throw new Error("Wix context is not available. Make sure to initialize the Wix context before using SDK modules");return n.initWixModules(t,!!r[e]?.suppressAuth).apply(void 0,r)}},e.contextualizeEventDefinitionModule=function(t){return(...e)=>{const r=s();if(!r)throw new Error("Wix context is not available. Make sure to initialize the Wix context before using SDK modules");return r.initWixModules(t).apply(void 0,e)}},e.contextualizeSerivcePluginModule=function(t){return(...e)=>{const r=s();if(!r)throw new Error("Wix context is not available. Make sure to initialize the Wix context before using SDK modules");return r.initWixModules(t).apply(void 0,e)}},e.runWithoutContext=o;const i=r(2868);function s(){const t=void 0!==$wixContext&&$wixContext.initWixModules?$wixContext.initWixModules:void 0!==globalThis.__wix_context__&&globalThis.__wix_context__.initWixModules?globalThis.__wix_context__.initWixModules:void 0;if(t)return{initWixModules(e,r){return o((()=>t(e,r)))},fetchWithAuth(){throw new Error("fetchWithAuth is not available in this context")},graphql(){throw new Error("graphql is not available in this context")}};const e=void 0!==$wixContext?$wixContext.client:void 0!==i.wixContext.client?i.wixContext.client:void 0!==globalThis.__wix_context__?globalThis.__wix_context__.client:void 0,r=void 0!==$wixContext?$wixContext.elevatedClient:void 0!==i.wixContext.elevatedClient?i.wixContext.elevatedClient:void 0!==globalThis.__wix_context__?globalThis.__wix_context__.elevatedClient:void 0;return e||r?{initWixModules(t,n){if(n){if(!r)throw new 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 o((()=>r.use(t)))}if(!e)throw new Error("Wix context is not available. Make sure to initialize the Wix context before using SDK modules");return o((()=>e.use(t)))},fetchWithAuth:(t,r)=>{if(!e)throw new Error("Wix context is not available. Make sure to initialize the Wix context before using SDK modules");return e.fetchWithAuth(t,r)},getAuth(){if(!e)throw new Error("Wix context is not available. Make sure to initialize the Wix context before using SDK modules");return e.auth},async graphql(t,r,n){if(!e)throw new Error("Wix context is not available. Make sure to initialize the Wix context before using SDK modules");return e.graphql(t,r,n)}}:void 0}function o(t){const e=globalThis.__wix_context__,r={client:i.wixContext.client,elevatedClient:i.wixContext.elevatedClient};let n;globalThis.__wix_context__=void 0,i.wixContext.client=void 0,i.wixContext.elevatedClient=void 0,void 0!==$wixContext&&(n={client:$wixContext?.client,elevatedClient:$wixContext?.elevatedClient},delete $wixContext.client,delete $wixContext.elevatedClient);try{return t()}finally{globalThis.__wix_context__=e,i.wixContext.client=r.client,i.wixContext.elevatedClient=r.elevatedClient,void 0!==$wixContext&&($wixContext.client=n.client,$wixContext.elevatedClient=n.elevatedClient)}}a(r(787),e)},5097:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createEventModule=function(t){return(0,n.contextualizeEventDefinitionModuleV2)(t)};const n=r(787)},8409:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createHostModule=function(t){return(0,n.contextualizeHostModuleV2)({__type:"host",create:e=>Object.entries(t).reduce(((t,[r,n])=>({...t,[r]:n(e)})),{})},Object.keys(t))};const n=r(787)},8734:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.queryBuilder=function(t){const e=r=>({query:r,async find(){try{const a=t.requestTransformer("CURSOR"===t.pagingMethod&&r.cursorPaging.cursor?{cursorPaging:r.cursorPaging}:r),s=await t.func(a),{[n.ITEMS_RESULT_PROPERTY_NAME]:o,[n.PAGING_METADATA_RESULT_PROPERTY_NAME]:c}=t.responseTransformer(s);if("OFFSET"===t.pagingMethod){const t=r;return new i.OffsetBasedIterator({items:o??[],fetchNextPage:()=>e({...t,paging:{offset:t.paging.offset+t.paging.limit,limit:t.paging.limit}}).find(),fetchPrevPage:()=>e({...r,paging:{offset:Math.max(t.paging.offset-t.paging.limit,0),limit:t.paging.limit}}).find(),offset:t.paging.offset,limit:t.paging.limit,totalCount:c?.total,tooManyToCount:c?.tooManyToCount,originQuery:this})}const l=r.cursorPaging;return new i.CursorBasedIterator({items:o??[],limit:l.limit,originQuery:this,fetchNextPage:()=>e({...r,cursorPaging:{cursor:c?.cursors?.next??void 0,limit:l.limit}}).find(),fetchPrevPage:()=>e({...r,cursorPaging:{cursor:c?.cursors?.prev??void 0,limit:l.limit}}).find(),prevCursor:c?.cursors?.prev??void 0,nextCursor:c?.cursors?.next??void 0})}catch(e){throw t.errorTransformer(e)}},skipTo(t){return e({...r,cursorPaging:{cursor:t,limit:r.cursorPaging.limit}})},eq(n,i){const o=void 0===i?null:i,c={[s(t.transformationPaths,n)]:o};return e({...r,filter:(0,a.and)(r.filter,c)})},ne(n,i){const o=void 0===i?null:i,c={[s(t.transformationPaths,n)]:{$ne:o}};return e({...r,filter:(0,a.and)(r.filter,c)})},ge(n,i){const o={[s(t.transformationPaths,n)]:{$gte:i}};return e({...r,filter:(0,a.and)(r.filter,o)})},gt(n,i){const o={[s(t.transformationPaths,n)]:{$gt:i}};return e({...r,filter:(0,a.and)(r.filter,o)})},le(n,i){const o={[s(t.transformationPaths,n)]:{$lte:i}};return e({...r,filter:(0,a.and)(r.filter,o)})},lt(n,i){const o={[s(t.transformationPaths,n)]:{$lt:i}};return e({...r,filter:(0,a.and)(r.filter,o)})},isNotEmpty(t){return this.ne(t,null)},isEmpty(t){return this.eq(t,null)},startsWith(n,i){const o={[s(t.transformationPaths,n)]:{$startsWith:i}};return e({...r,filter:(0,a.and)(r.filter,o)})},endsWith(n,i){const o={[s(t.transformationPaths,n)]:{$endsWith:i}};return e({...r,filter:(0,a.and)(r.filter,o)})},contains(n,i){const o={[s(t.transformationPaths,n)]:{$contains:i}};return e({...r,filter:(0,a.and)(r.filter,o)})},hasSome(n,...i){const o={[s(t.transformationPaths,n)]:{$hasSome:Array.isArray(i[0])?i[0]:i}};return e({...r,filter:(0,a.and)(r.filter,o)})},hasAll(n,...i){const o={[s(t.transformationPaths,n)]:{$hasAll:Array.isArray(i[0])?i[0]:i}};return e({...r,filter:(0,a.and)(r.filter,o)})},between(t,e,r){return this.ge(t,e).lt(t,r)},in(n,i){const o={[s(t.transformationPaths,n)]:{$in:i}};return e({...r,filter:(0,a.and)(r.filter,o)})},exists(n,i=!0){const o={[s(t.transformationPaths,n)]:{$exists:i}};return e({...r,filter:(0,a.and)(r.filter,o)})},or(t){return e({...r,filter:(0,a.or)(r.filter,t.query.filter)})},and(t){return e({...r,filter:(0,a.and)(r.filter,t.query.filter)})},not(t){return e({...r,filter:(0,a.not)(t.query.filter)})},ascending(...n){return e({...r,sort:[...r.sort??[],...n.map((e=>({fieldName:s(t.transformationPaths,e),order:"ASC"})))]})},descending(...n){return e({...r,sort:[...r.sort??[],...n.map((e=>({fieldName:s(t.transformationPaths,e),order:"DESC"})))]})},skip(t){return e({...r,paging:{offset:t,limit:"limit"in r.paging?r.paging.limit:n.DEFAULT_LIMIT}})},limit(n){if("CURSOR"===t.pagingMethod){const t=r;return e({...r,cursorPaging:{limit:n,cursor:"cursor"in t.cursorPaging?t.cursorPaging.cursor:void 0}})}const a=r;return e({...r,paging:{limit:n,offset:"offset"in a.paging?a.paging.offset:0}})}});return e({filter:{},..."OFFSET"===t.pagingMethod?{paging:{offset:0,limit:n.DEFAULT_LIMIT}}:{cursorPaging:{limit:n.DEFAULT_LIMIT}}})};const n=r(9773),a=r(1267),i=r(4955);function s(t,e){const r=Object.entries(t).find((([t])=>t===e||e.startsWith(`${t}.`)))?.[0];return r?e.replace(r,t[r]):e.split(".").map((e=>t[e]??n.SDKRequestToRESTRequestRenameMap[e]??e)).join(".")}},1267:function(t,e){"use strict";function r(t){return 1===Object.keys(t).length&&"$and"in t&&Array.isArray(t.$and)}function n(t){return 1===Object.keys(t).length&&"$or"in t&&Array.isArray(t.$or)}function a(t){return 1===Object.keys(t).length&&"$not"in t&&"object"==typeof t.$not}Object.defineProperty(e,"__esModule",{value:!0}),e.isLogicalOperator=function(t){return r(t)||n(t)||a(t)},e.isAndOperator=r,e.isOrOperator=n,e.isNotOperator=a,e.and=function(t,e){return void 0===t||0===Object.keys(t).length?e:void 0===e||0===Object.keys(e).length?t:{$and:[...r(t)?t.$and:[t],...r(e)?e.$and:[e]]}},e.or=function(t,e){return void 0===t||0===Object.keys(t).length?e:void 0===e||0===Object.keys(e).length?t:{$or:[...n(t)?t.$or:[t],...n(e)?e.$or:[e]]}},e.not=function(t){return void 0===t||0===Object.keys(t).length?void 0:a(t)?t.$not:{$not:t}}},4955:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OffsetBasedIterator=e.CursorBasedIterator=e.Iterator=void 0;class r{_items;_fetchNextPage;_fetchPrevPage;_originQuery;_limit;constructor({items:t,originQuery:e,fetchNextPage:r,fetchPrevPage:n,limit:a}){this._items=t,this._fetchNextPage=r,this._fetchPrevPage=n,this._originQuery=e,this._limit=a}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 new Error("No next page to fetch");return await this._fetchNextPage()}async prev(){if(!this.hasPrev())throw new Error("No previous page to fetch");return await this._fetchPrevPage()}}e.Iterator=r;e.CursorBasedIterator=class extends r{_nextCursor;_prevCursor;cursors;constructor({items:t,originQuery:e,fetchNextPage:r,fetchPrevPage:n,limit:a,nextCursor:i,prevCursor:s}){super({items:t,originQuery:e,fetchNextPage:r,fetchPrevPage:n,limit:a}),this._nextCursor=i,this._prevCursor=s,this.cursors={next:i,prev:s}}hasNext(){return!!this._nextCursor}hasPrev(){return!!this._prevCursor}};e.OffsetBasedIterator=class extends r{_totalCount;_offset;_tooManyToCount;constructor({items:t,fetchNextPage:e,fetchPrevPage:r,offset:n,originQuery:a,limit:i,totalCount:s,tooManyToCount:o}){super({items:t,fetchNextPage:e,fetchPrevPage:r,originQuery:a,limit:i}),this._totalCount=s,this._offset=n,this._tooManyToCount=o}get currentPage(){return 0===this._limit?void 0:Math.floor(this._offset/this._limit)}get totalPages(){return this._tooManyToCount||0===this._limit?void 0:Math.ceil(this._totalCount/this._limit)}get totalCount(){return this._tooManyToCount?void 0:this._totalCount}hasNext(){return Boolean(0!==this._limit&&void 0!==this.currentPage&&void 0!==this.totalPages&&this.currentPage<this.totalPages-1)}hasPrev(){return Boolean(0!==this._limit&&this.currentPage&&this.currentPage>0)}}},9566:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.renameAllNestedKeys=a,e.renameKeysFromSDKRequestToRESTRequest=function(t,e=[]){return a(t,n.SDKRequestToRESTRequestRenameMap,e)},e.renameKeysFromRESTResponseToSDKResponse=function(t,e=[]){return a(t,n.RESTResponseToSDKResponseRenameMap,e)};const n=r(9773);function a(t,e,r){const n=(t,a)=>{if(Array.isArray(t))t.forEach((t=>{n(t,a)}));else if("object"==typeof t&&null!==t){const i=t;Object.keys(i).forEach((t=>{const s=""===a?t:`${a}.${t}`;(t=>r.includes(t))(s)||(t in e&&!(e[t]in i)&&(i[e[t]]=i[t],delete i[t]),n(i[t],s))}))}};return n(t,""),t}},7512:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createRESTModule=function(t,e=!1){return(0,n.contextualizeRESTModuleV2)(t,e)},e.toURLSearchParams=function(t,e){const r=a(t),n=Object.entries(r).some((([t,e])=>t.includes(".")||Array.isArray(e)&&e.some((t=>"object"==typeof t))));return e&&n?new URLSearchParams({".r":i(JSON.stringify(t))}):Object.entries(r).reduce(((t,[e,r])=>((Array.isArray(r)?r:[r]).forEach((n=>{null==n||Array.isArray(r)&&"object"==typeof n||t.append(e,n)})),t)),new URLSearchParams)},e.resolveUrl=function(t){const e=function(t,e){const r=e[t]||e._;if(!r&&function(t){return!!t.match(/\._base_domain_$/)}(t))return e[u];return r}((r=t.host,function(t){return t.replace("create.editorx.com","editor.editorx.com")}(r).replace(s,"._base_domain_").replace(c,"._api_base_domain_").replace(l,"*.dev.wix-code.com")),t.domainToMappings);var r;return function(t,e){const r=e?.find((e=>t.startsWith(e.destPath)));if(!r)return t;return r.srcPath+t.slice(r.destPath.length)}((n=t.protoPath,a=t.data||{},n.split("/").map((t=>function(t,e){const r=t.match(o)||[],n=r[1];if(n){const a=t.replace(r[0],"");return function(t,e,r,n){let a=t;for(const t of e.split(".")){if(!a)return r;a=a[t]}return`${a}${n}`}(e,n,t,a)}return t}(t,a))).join("/")),e);var n,a};const n=r(787);function a(t,e=""){const r={};return Object.entries(t).forEach((([t,n])=>{const i=null!==n&&"object"==typeof n&&!Array.isArray(n),s=function(t,e){return`${t}${t?".":""}${e}`}(e,t);if(i){const t=a(n,s);Object.assign(r,t)}else r[s]=n})),r}const i=t=>("undefined"!=typeof btoa?btoa(t):Buffer.from(t,"utf-8").toString("base64")).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_"),s=new RegExp(`\\.(${["wix.com","editorx.com"].join("|")})$`),o=/{(.*)}/,c=new RegExp(`\\.(${["42.wixprod.net","uw2-edt-1.wixprod.net"].join("|")})$`),l=new RegExp(".*\\.dev.wix-code.com$");const u="www._base_domain_"},9914:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.transformError=function(t,e={explicitPathsToArguments:{},spreadPathsToArguments:{},singleArgumentUnchanged:!1},r=[]){if("object"!=typeof t||null===t)throw t;if((t=>"validationError"in(t.response?.data?.details??{}))(t))return a(t,e,r);if((t=>"applicationError"in(t.response?.data?.details??{}))(t))return s(t);if((t=>(t.response?.status??-1)>=400&&(t.response?.status??-1)<500)(t)){const e=t.response?.status,r=t.response?.statusText??"UNKNOWN",a=t.response?.data?.message??r,s={applicationError:{description:r,code:(0,n.constantCase)(r),data:{}},requestId:t.requestId};return i(t,{message:JSON.stringify({message:a,details:s},null,2),extraProperties:{details:s,status:e}})}return o(t)};const n=r(1325);const a=(t,e,r)=>{const n=t.response?.data,a=t.requestId,{fieldViolations:s}=n.details.validationError,o=c(e,s,r)?.sort(((t,e)=>t.field<e.field?-1:1)),l=`INVALID_ARGUMENT: ${o?.map((({field:t,description:e})=>`"${t}" ${e}`))?.join(", ")}`,u={validationError:{fieldViolations:o},requestId:a};return i(t,{message:JSON.stringify({message:l,details:u},null,2),extraProperties:{details:u,status:t.response?.status,requestId:a}})},i=(t,{message:e,extraProperties:r})=>Object.assign(t,{...r,message:e}),s=t=>{const e=t.response?.status,r=t.response?.statusText??"UNKNOWN",a=t.response?.data?.message??r,s=t.response?.data?.details?.applicationError?.description??r,o=a===s?a:`${a}: ${s}`,c={applicationError:{description:s,code:t.response?.data?.details?.applicationError?.code??(0,n.constantCase)(r),data:t.response?.data?.details?.applicationError?.data??{}},requestId:t.requestId};return i(t,{message:JSON.stringify({message:o,details:c},null,2),extraProperties:{details:c,status:e,requestId:t.requestId}})},o=t=>{const e=t.requestId?`System error occurred, request-id: ${t.requestId}`:`System error occurred: ${JSON.stringify(t)}`;return i(t,{message:e,extraProperties:{requestId:t.requestId,status:t.response?.status,code:(0,n.constantCase)(t.response?.statusText??"UNKNOWN"),...!t.response&&{runtimeError:t}}})},c=({spreadPathsToArguments:t,explicitPathsToArguments:e,singleArgumentUnchanged:r},n,a)=>{const i={...t,...e},s=Object.keys(i);return n?.filter((t=>!n.some((e=>e.field.length>t.field.length&&e.field.startsWith(t.field)&&s.includes(e.field))))).map((t=>{const n=e[t.field];if(n)return{...t,field:l(n,a)};const o=s?.sort(((t,e)=>e.length-t.length))?.find((e=>t.field.startsWith(e)));if(o){const e=i[o];if(e)return{...t,field:t.field.replace(o,l(e,a))}}return r?{...t,field:`${a[0]}.${t.field}`}:t}))},l=(t,e)=>{const r=u(t);return null!=r?t.replace(`$[${r}]`,e[r]):t},u=t=>{const e=t.match(/\$\[(?<argIndex>\d+)\]/);return e&&e.groups&&Number(e.groups.argIndex)}},3181:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.transformSDKFloatToRESTFloat=function(t){return isFinite(t)?t:t.toString()},e.transformRESTFloatToSDKFloat=function(t){if("NaN"===t)return NaN;if("Infinity"===t)return 1/0;if("-Infinity"===t)return-1/0;return t}},1365:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.transformSDKTimestampToRESTTimestamp=function(t){return t?.toISOString()},e.transformRESTTimestampToSDKTimestamp=function(t){return t?new Date(t):void 0}},4615:function(t,e){"use strict";function r(t,{path:e,isRepeated:n,isMap:a},i){const s=e.split(".");if(1===s.length&&e in t)return t[e]=n?t[e].map(i):a?Object.fromEntries(Object.entries(t[e]).map((([t,e])=>[t,i(e)]))):i(t[e]),t;const[o,...c]=s;if(o.endsWith("{}")){const e=o.slice(0,-2);t[e]=Object.fromEntries(Object.entries(t[e]).map((([t,e])=>[t,r(e,{path:c.join("."),isRepeated:n,isMap:a},i)])))}else Array.isArray(t[o])?t[o]=t[o].map((t=>r(t,{path:c.join("."),isRepeated:n,isMap:a},i))):o in t&&"object"==typeof t[o]&&null!==t[o]?t[o]=r(t[o],{path:c.join("."),isRepeated:n,isMap:a},i):"*"===o&&Object.keys(t).reduce(((e,s)=>(e[s]=r(t[s],{path:c.join("."),isRepeated:n,isMap:a},i),e)),t);return t}Object.defineProperty(e,"__esModule",{value:!0}),e.transformPaths=function(t,e){return e.reduce(((t,{paths:e,transformFn:n})=>e.reduce(((t,e)=>r(t,e,n)),t)),t)}},1325:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.alignIfLegacy=function(t,e){const{protocol:r}=new URL(t);return r===`${e}:`?`${n.WIX_PROTOCOL}${t}`:t},e.removeUndefinedKeys=function(t){return Object.fromEntries(Object.entries(t).filter((([,t])=>void 0!==t)))},e.constantCase=function(t){return c(t).map((t=>t.toLocaleUpperCase())).join("_")},e.split=c;const n=r(9773);const a=/([\p{Ll}\d])(\p{Lu})/gu,i=/(\p{Lu})([\p{Lu}][\p{Ll}])/gu,s="$1\0$2",o=/[^\p{L}\d]+/giu;function c(t){let e=t.trim();e=e.replace(a,s).replace(i,s),e=e.replace(o,"\0");let r=0,n=e.length;for(;"\0"===e.charAt(r);)r++;if(r===n)return[];for(;"\0"===e.charAt(n-1);)n--;return e.slice(r,n).split(/\0/g)}},5617:function(t,e,r){t.exports={...r(1064)}},1064:function(t,e,r){t.exports={...r(2412)}},9123:function(t){t.exports={withDuration:async function(t,e,r){const n=Date.now(),a=await e();return r.log(`${t} duration: ${Date.now()-n}ms and in human readble format: ${(Date.now()-n)/1e3} s`),a}}},2412:function(t,e,r){t.exports={...r(9123)}},2868:function(t,e,r){"use strict";r.r(e),r.d(e,{wixContext:function(){return n}});var n={}},3251:function(t,e,r){"use strict";function n(t,e=!1,r=(t=>t)){return()=>({__type:"event-definition",type:t,isDomainEvent:e,transformations:r})}function a(t,e){return{__type:"service-plugin-definition",componentType:t,methods:e}}r.r(e),r.d(e,{EventDefinition:function(){return n},SERVICE_PLUGIN_ERROR_TYPE:function(){return i},ServicePluginDefinition:function(){return a}});var i="wix_spi_error"}},s={};function o(t){var e=s[t];if(void 0!==e)return e.exports;var r=s[t]={exports:{}};return i[t].call(r.exports,r,r.exports,o),r.exports}o.m=i,o.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(e,{a:e}),e},r=Object.getPrototypeOf?function(t){return Object.getPrototypeOf(t)}:function(t){return t.__proto__},o.t=function(t,n){if(1&n&&(t=this(t)),8&n)return t;if("object"==typeof t&&t){if(4&n&&t.__esModule)return t;if(16&n&&"function"==typeof t.then)return t}var a=Object.create(null);o.r(a);var i={};e=e||[null,r({}),r([]),r(r)];for(var s=2&n&&t;"object"==typeof s&&!~e.indexOf(s);s=r(s))Object.getOwnPropertyNames(s).forEach((function(e){i[e]=function(){return t[e]}}));return i.default=function(){return t},o.d(a,i),a},o.d=function(t,e){for(var r in e)o.o(e,r)&&!o.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},o.f={},o.e=function(t){return Promise.all(Object.keys(o.f).reduce((function(e,r){return o.f[r](t,e),e}),[]))},o.u=function(t){return{42:"common-errors_el-json",81:"common-errors_da-json",91:"common-errors_es-json",92:"common-errors_sk-json",103:"common-errors_tr-json",122:"common-errors_hr-json",143:"common-errors_pt-json",246:"common-errors_it-json",255:"common-errors_uk-json",258:"common-errors_no-json",282:"common-errors_fr-json",299:"common-errors_cs-json",315:"common-errors_th-json",317:"common-errors_de-json",360:"error-handler-commonErrorsMapping",370:"common-errors_he-json",373:"common-errors_ro-json",408:"common-errors_en-json",470:"common-errors_hu-json",474:"common-errors_zh-json",537:"common-errors_ru-json",553:"common-errors_lv-json",559:"common-errors_ms-json",566:"common-errors_pl-json",569:"common-errors_ja-json",612:"common-errors_nl-json",615:"common-errors_fi-json",655:"common-errors_ar-json",660:"common-errors_bg-json",710:"common-errors_tl-json",719:"common-errors_hi-json",746:"common-errors_ko-json",780:"common-errors_vi-json",868:"common-errors_sl-json",878:"common-errors_lt-json",912:"common-errors_ca-json",960:"common-errors_sv-json",963:"common-errors_id-json"}[t]+".js"},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n={},a="masterPage:",o.l=function(t,e,r,i){if(n[t])n[t].push(e);else{var s,c;if(void 0!==r)for(var l=document.getElementsByTagName("script"),u=0;u<l.length;u++){var d=l[u];if(d.getAttribute("src")==t||d.getAttribute("data-webpack")==a+r){s=d;break}}s||(c=!0,(s=document.createElement("script")).charset="utf-8",s.timeout=120,o.nc&&s.setAttribute("nonce",o.nc),s.setAttribute("data-webpack",a+r),s.src=t),n[t]=[e];var h=function(e,r){s.onerror=s.onload=null,clearTimeout(p);var a=n[t];if(delete n[t],s.parentNode&&s.parentNode.removeChild(s),a&&a.forEach((function(t){return t(r)})),e)return e(r)},p=setTimeout(h.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=h.bind(null,s.onerror),s.onload=h.bind(null,s.onload),c&&document.head.appendChild(s)}},o.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},function(){var t;o.g.importScripts&&(t=o.g.location+"");var e=o.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var r=e.getElementsByTagName("script");r.length&&(t=r[r.length-1].src)}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),o.p=t}(),function(){var t={179:0};o.f.j=function(e,r){var n=o.o(t,e)?t[e]:void 0;if(0!==n)if(n)r.push(n[2]);else{var a=new Promise((function(r,a){n=t[e]=[r,a]}));r.push(n[2]=a);var i=o.p+o.u(e),s=new Error;o.l(i,(function(r){if(o.o(t,e)&&(0!==(n=t[e])&&(t[e]=void 0),n)){var a=r&&("load"===r.type?"missing":r.type),i=r&&r.target&&r.target.src;s.message="Loading chunk "+e+" failed.\n("+a+": "+i+")",s.name="ChunkLoadError",s.type=a,s.request=i,n[1](s)}}),"chunk-"+e,e)}};var e=function(e,r){var n,a,i=r[0],s=r[1],c=r[2],l=0;if(i.some((function(e){return 0!==t[e]}))){for(n in s)o.o(s,n)&&(o.m[n]=s[n]);if(c)c(o)}for(e&&e(r);l<i.length;l++)a=i[l],o.o(t,a)&&t[a]&&t[a][0](),t[a]=0},r=this.webpackChunkmasterPage=this.webpackChunkmasterPage||[];r.forEach(e.bind(null,0)),r.push=e.bind(null,r.push.bind(r))}();var c={};return function(){"use strict";o.r(c);var t=$ns["wix-window"],e=o.n(t),r=$ns["wix-animations"];var n=o(4002),a=o(3061),i=o(5617),s=$ns["wix-location-frontend"],l=o.n(s),u=$ns["wix-storage"];function d(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function h(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?d(Object(r),!0).forEach((function(e){p(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):d(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function p(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function m(t,e,r){var n=new URL(l().url).searchParams.get(t),a=u.session.getItem(t);if((!n||!a)&&(n||a))if(!n||a)if(n||!a);else{l().queryParams.add(h(h({},r),{},p({},t,a)));var i=l().url;l().to(i)}else e(t,n)}function f(t,e){u.session.setItem(t,e),console.log("".concat(t," saved to session storage:"),e)}var g=$ns["wix-window-frontend"],v="isqa";function E(){return m(v,(function(t,e){console.log("isqa will be set in session storage."),f(t,e)}),{})}function y(){var t=new URL(l().url).searchParams.get(v);return m("branchId",(function(e,r){t?(console.log("QA environment detected. Branch ID will be set in session storage without opening the lightbox."),f(e,r)):(0,g.openLightbox)("preview-version",{branchId:r})}),{siteRevision:"2"})}function b(t){return b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},b(t)}function S(){S=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",i=n.asyncIterator||"@@asyncIterator",s=n.toStringTag||"@@toStringTag";function o(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{o({},"")}catch(t){o=function(t,e,r){return t[e]=r}}function c(t,e,r,n){var a=e&&e.prototype instanceof d?e:d,i=Object.create(a.prototype),s=new I(n||[]);return i._invoke=function(t,e,r){var n="suspendedStart";return function(a,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw i;return R()}for(r.method=a,r.arg=i;;){var s=r.delegate;if(s){var o=T(s,r);if(o){if(o===u)continue;return o}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=l(t,e,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===u)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}(t,r,s),i}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var u={};function d(){}function h(){}function p(){}var m={};o(m,a,(function(){return this}));var f=Object.getPrototypeOf,g=f&&f(f(w([])));g&&g!==e&&r.call(g,a)&&(m=g);var v=p.prototype=d.prototype=Object.create(m);function E(t){["next","throw","return"].forEach((function(e){o(t,e,(function(t){return this._invoke(e,t)}))}))}function y(t,e){function n(a,i,s,o){var c=l(t[a],t,i);if("throw"!==c.type){var u=c.arg,d=u.value;return d&&"object"==b(d)&&r.call(d,"__await")?e.resolve(d.__await).then((function(t){n("next",t,s,o)}),(function(t){n("throw",t,s,o)})):e.resolve(d).then((function(t){u.value=t,s(u)}),(function(t){return n("throw",t,s,o)}))}o(c.arg)}var a;this._invoke=function(t,r){function i(){return new e((function(e,a){n(t,r,e,a)}))}return a=a?a.then(i,i):i()}}function T(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,T(t,e),"throw"===e.method))return u;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var n=l(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,u;var a=n.arg;return a?a.done?(e[t.resultName]=a.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,u):a:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,u)}function P(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(P,this),this.reset(!0)}function w(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:R}}function R(){return{value:void 0,done:!0}}return h.prototype=p,o(v,"constructor",p),o(p,"constructor",h),h.displayName=o(p,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,o(t,s,"GeneratorFunction")),t.prototype=Object.create(v),t},t.awrap=function(t){return{__await:t}},E(y.prototype),o(y.prototype,i,(function(){return this})),t.AsyncIterator=y,t.async=function(e,r,n,a,i){void 0===i&&(i=Promise);var s=new y(c(e,r,n,a),i);return t.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},E(v),o(v,s,"Generator"),o(v,a,(function(){return this})),o(v,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=w,I.prototype={constructor:I,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(_),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return s.type="throw",s.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],s=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var o=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(o&&c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(o){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var i=a;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var s=i?i.completion:{};return s.type=t,s.arg=e,i?(this.method="next",this.next=i.finallyLoc,u):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),u},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),u}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var a=n.arg;_(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:w(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),u}},t}function T(t,e,r,n,a,i,s){try{var o=t[i](s),c=o.value}catch(t){return void r(t)}o.done?e(c):Promise.resolve(c).then(n,a)}function P(t){return function(){var e=this,r=arguments;return new Promise((function(n,a){var i=t.apply(e,r);function s(t){T(i,n,a,s,o,"next",t)}function o(t){T(i,n,a,s,o,"throw",t)}s(void 0)}))}}function _(){var t,e;t=[],e=function(e,n){var a,i=null!==(a=t[e.uniqueId])&&void 0!==a?a:(0,r.timeline)();t[e.uniqueId]=i,i.add(e,{rotate:n,duration:200}).play()},[{clickableBoxId:"#expndBox",expandedTextId:"#linksTxt",arrowId:"#expndBtn"},{clickableBoxId:"#expndBox1",expandedTextId:"#linksTxt1",arrowId:"#expndBtn1"}].forEach((function(t){var r=t.clickableBoxId,n=t.expandedTextId,a=t.arrowId;$w(r).onClick((function(t){var r=$w.at(t.context),i=r(a);r(n).collapsed?(r(n).expand(),e(i,180)):(r(n).collapse(),e(i,0))}))}))}function I(){"Mobile"===e().formFactor?(_(),$w("#expndBtn1").expand(),$w("#expndBtn").expand()):($w("#linksTxt").expand(),$w("#linksTxt1").expand())}function w(t){return R.apply(this,arguments)}function R(){return(R=P(S().mark((function t(e){return S().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return E(),y(),t.next=4,(0,a.masterPageOnReady)($w,e);case 4:return I(),t.abrupt("return",Promise.resolve());case 6:case"end":return t.stop()}}),t)})))).apply(this,arguments)}$w.onReady(P(S().mark((function t(){var e,r;return S().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e={log:n.It,warn:n.Bl,error:n.iJ,info:n.Ho},t.next=3,(0,a.createLogger)({backendLogger:e,browserLogger:console,GCPProjectId:"wix-managed-601e3933"});case 3:return r=t.sent,t.next=6,(0,i.withDuration)("onReady",(function(){return w(r)}),r);case 6:r.debugLink();case 7:case"end":return t.stop()}}),t)}))))}(),c}()})); //# sourceMappingURL=https://bundler.wix-code.com/fa5b4a7b-b364-43d6-b75c-7e9d015bfdf8/d7db9a8b-8db1-4fec-ac5b-248a80d1a8ab/10a9c005-b05f-4e81-8ed2-6a61dda14c00/pages/masterPage.js.map