index of
/
home
/
thefkyzp
/
hulmvisaadvisor.com
/
wp-content
/
plugins
/
surecart
/
dist
/
File: /home/thefkyzp/hulmvisaadvisor.com/wp-content/plugins/surecart/dist/7291.js
"use strict";(self.webpackChunk_surecart_surecart=self.webpackChunk_surecart_surecart||[]).push([[7291],{488:function(n,t,e){e.d(t,{i:function(){return r},m:function(){return o},z:function(){return i}});var i=["bif","byr","clp","djf","gnf","isk","jpy","kmf","krw","pyg","rwf","ugx","vnd","vuv","xaf","xag","xau","xba","xbb","xbc","xbd","xdr","xof","xpd","xpf","xpt","xts"],o=function(n,t){return r(t)?n:n/100},r=function(n){var t;return i.includes(null===(t=null==n?void 0:n.toLowerCase)||void 0===t?void 0:t.call(n))}},7874:function(n,t,e){e.d(t,{t:function(){return i}});var i=function(n,t){((null===window||void 0===window?void 0:window.dataLayer)||(null===window||void 0===window?void 0:window.gtag))&&t&&((null===window||void 0===window?void 0:window.gtag)?window.gtag("event",n,t):(window.dataLayer.push({ecommerce:null}),window.dataLayer.push({event:n,ecommerce:t})))}},6250:function(n,t,e){var i=e(4467),o=e(488),r=e(7874);function u(n,t){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable}))),e.push.apply(e,i)}return e}function l(n){for(var t=1;t<arguments.length;t++){var e=null!=arguments[t]?arguments[t]:{};t%2?u(Object(e),!0).forEach((function(t){(0,i.A)(n,t,e[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):u(Object(e)).forEach((function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(e,t))}))}return n}window.addEventListener("scSearched",(function(n){var t;if(null===window||void 0===window?void 0:window.fbq){var e=n.detail;window.fbq("track","Search",l({search_string:e.searchString,content_ids:e.searchResultIds},(null===(t=null==e?void 0:e.searchCollections)||void 0===t?void 0:t.length)?{content_category:e.searchCollections.join(",")}:{}))}})),window.addEventListener("scProductViewed",(function(n){var t,e,i,r,u,l;if(null===window||void 0===window?void 0:window.fbq){var a=n.detail;window.fbq("track","ViewContent",{content_ids:[a.id],content_category:null===(e=null===(t=null==a?void 0:a.product_collections)||void 0===t?void 0:t.data)||void 0===e?void 0:e.map((function(n){return n.name})).join(", "),content_name:(null==a?void 0:a.name)+((null===(i=null==a?void 0:a.variant_options)||void 0===i?void 0:i.length)?" - ".concat(null==a?void 0:a.variant_options.join(" / ")):""),content_type:"product",contents:[{id:a.id,quantity:1}],currency:null===(r=null==a?void 0:a.price)||void 0===r?void 0:r.currency,value:(0,o.m)((null===(u=a.price)||void 0===u?void 0:u.amount)||0,(null===(l=a.price)||void 0===l?void 0:l.currency)||"USD")})}})),window.addEventListener("scSearched",(function(n){var t;(0,r.t)("search",{search_term:null===(t=n.detail)||void 0===t?void 0:t.searchString})})),window.addEventListener("scProductViewed",(function(n){var t,e,i,u,a,d,c,v,s,f,p,m,y=n.detail;(0,r.t)("view_item",{value:(0,o.m)((null===(t=y.price)||void 0===t?void 0:t.amount)||0,(null===(e=y.price)||void 0===e?void 0:e.currency)||"USD"),currency:null===(i=y.price)||void 0===i?void 0:i.currency,items:[l(l({item_id:null==y?void 0:y.id,item_name:null==y?void 0:y.name,currency:null===(u=null==y?void 0:y.price)||void 0===u?void 0:u.currency,discount:(null==y?void 0:y.discount_amount)?(0,o.m)(null==y?void 0:y.discount_amount,null===(a=null==y?void 0:y.price)||void 0===a?void 0:a.currency):0,price:(0,o.m)(null===(d=null==y?void 0:y.price)||void 0===d?void 0:d.amount,null===(c=null==y?void 0:y.price)||void 0===c?void 0:c.currency),quantity:(null==y?void 0:y.quantity)||1},(null===(v=null==y?void 0:y.variant_options)||void 0===v?void 0:v.length)?{item_variant:null==y?void 0:y.variant_options.map((function(n){return n.name})).join(" / ")}:{}),(null===(f=null===(s=null==y?void 0:y.product_collections)||void 0===s?void 0:s.data)||void 0===f?void 0:f.length)?{item_category:null===(m=null===(p=null==y?void 0:y.product_collections)||void 0===p?void 0:p.data)||void 0===m?void 0:m.map((function(n){return n.name})).join(", ")}:{})]})})),window.addEventListener("scProductsViewed",(function(n){var t,e=n.detail;(0,r.t)("view_item_list",l(l({},(null==e?void 0:e.collectionId)?{item_list_id:e.collectionId}:{}),{},{item_list_name:e.pageTitle,items:null===(t=null==e?void 0:e.products)||void 0===t?void 0:t.map((function(n){var t,i,o,r;return l(l(l({item_id:null==n?void 0:n.id,item_name:null==n?void 0:n.name},(null===(i=null===(t=null==n?void 0:n.product_collections)||void 0===t?void 0:t.data)||void 0===i?void 0:i.length)?{item_category:null===(r=null===(o=null==n?void 0:n.product_collections)||void 0===o?void 0:o.data)||void 0===r?void 0:r.map((function(n){return n.name})).join(", ")}:{}),(null==e?void 0:e.collectionId)?{item_list_id:e.collectionId}:{}),{},{item_list_name:e.pageTitle})}))}))}))},1416:function(n,t,e){e.d(t,{c:function(){return c}});var i=e(1346);function o(n,t){(null==t||t>n.length)&&(t=n.length);for(var e=0,i=Array(t);e<t;e++)i[e]=n[e];return i}var r,u,l=function(n){return!("isConnected"in n)||n.isConnected},a=(r=function(n){var t,e=function(n,t){var e="undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(!e){if(Array.isArray(n)||(e=function(n,t){if(n){if("string"==typeof n)return o(n,t);var e={}.toString.call(n).slice(8,-1);return"Object"===e&&n.constructor&&(e=n.constructor.name),"Map"===e||"Set"===e?Array.from(n):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?o(n,t):void 0}}(n))||t&&n&&"number"==typeof n.length){e&&(n=e);var _n=0,i=function(){};return{s:i,n:function(){return _n>=n.length?{done:!0}:{done:!1,value:n[_n++]}},e:function(n){throw n},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,u=!0,l=!1;return{s:function(){e=e.call(n)},n:function(){var n=e.next();return u=n.done,n},e:function(n){l=!0,r=n},f:function(){try{u||null==e.return||e.return()}finally{if(l)throw r}}}}(n.keys());try{for(e.s();!(t=e.n()).done;){var i=t.value;n.set(i,n.get(i).filter(l))}}catch(n){e.e(n)}finally{e.f()}},function(){for(var n=arguments.length,t=new Array(n),e=0;e<n;e++)t[e]=arguments[e];u&&clearTimeout(u),u=setTimeout((function(){u=0,r.apply(void 0,t)}),2e3)}),d=function(n){return"function"==typeof n?n():n},c=function(n,t){var e=function(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(n,t){return n!==t},e=d(n),i=new Map(Object.entries(null!=e?e:{})),o={dispose:[],get:[],set:[],reset:[]},r=function(){var t;i=new Map(Object.entries(null!==(t=d(n))&&void 0!==t?t:{})),o.reset.forEach((function(n){return n()}))},u=function(n){return o.get.forEach((function(t){return t(n)})),i.get(n)},l=function(n,e){var r=i.get(n);t(e,r,n)&&(i.set(n,e),o.set.forEach((function(t){return t(n,e,r)})))},a="undefined"==typeof Proxy?{}:new Proxy(e,{get:function(n,t){return u(t)},ownKeys:function(n){return Array.from(i.keys())},getOwnPropertyDescriptor:function(){return{enumerable:!0,configurable:!0}},has:function(n,t){return i.has(t)},set:function(n,t,e){return l(t,e),!0}}),c=function(n,t){return o[n].push(t),function(){var e,i,r;e=o[n],i=t,(r=e.indexOf(i))>=0&&(e[r]=e[e.length-1],e.length--)}};return{state:a,get:u,set:l,on:c,onChange:function(t,e){var i=c("set",(function(n,i){n===t&&e(i)})),o=c("reset",(function(){return e(d(n)[t])}));return function(){i(),o()}},use:function(){for(var n=arguments.length,t=new Array(n),e=0;e<n;e++)t[e]=arguments[e];var i=t.reduce((function(n,t){return t.set&&n.push(c("set",t.set)),t.get&&n.push(c("get",t.get)),t.reset&&n.push(c("reset",t.reset)),t.dispose&&n.push(c("dispose",t.dispose)),n}),[]);return function(){return i.forEach((function(n){return n()}))}},dispose:function(){o.dispose.forEach((function(n){return n()})),r()},reset:r,forceUpdate:function(n){var t=i.get(n);o.set.forEach((function(e){return e(n,t,t)}))}}}(n,t);return e.use(function(){if("function"!=typeof i.g)return{};var n=new Map;return{dispose:function(){return n.clear()},get:function(t){var e=(0,i.g)();e&&function(n,t,e){var i=n.get(t);i?i.includes(e)||i.push(e):n.set(t,[e])}(n,t,e)},set:function(t){var e=n.get(t);e&&n.set(t,e.filter(i.f)),a(n)},reset:function(){n.forEach((function(n){return n.forEach(i.f)})),a(n)}}}()),e}},6402:function(n,t,e){function i(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"polite",t=document.createElement("div");t.id="a11y-speak-".concat(n),t.className="a11y-speak-region",t.setAttribute("style","position: absolute;margin: -1px;padding: 0;height: 1px;width: 1px;overflow: hidden;clip: rect(1px, 1px, 1px, 1px);-webkit-clip-path: inset(50%);clip-path: inset(50%);border: 0;word-wrap: normal !important;"),t.setAttribute("aria-live",n),t.setAttribute("aria-relevant","additions text"),t.setAttribute("aria-atomic","true");var e=document.body;return e&&e.appendChild(t),t}e.d(t,{s:function(){return u}});var o,r="";function u(n,t){!function(){for(var n=document.getElementsByClassName("a11y-speak-region"),t=document.getElementById("a11y-speak-intro-text"),e=0;e<n.length;e++)n[e].textContent="";t&&t.setAttribute("hidden","hidden")}(),n=function(n){return n=n.replace(/<[^<>]+>/g," "),r===n&&(n+=" "),r=n,n}(n);var e=document.getElementById("a11y-speak-intro-text"),i=document.getElementById("a11y-speak-assertive"),o=document.getElementById("a11y-speak-polite");i&&"assertive"===t?i.textContent=n:o&&(o.textContent=n),e&&e.removeAttribute("hidden")}o=function(){var n=document.getElementById("a11y-speak-intro-text"),t=document.getElementById("a11y-speak-assertive"),e=document.getElementById("a11y-speak-polite");null===n&&function(){var n=document.createElement("p");n.id="a11y-speak-intro-text",n.className="a11y-speak-intro-text",n.textContent=wp.i18n.__("Notifications"),n.setAttribute("style","position: absolute;margin: -1px;padding: 0;height: 1px;width: 1px;overflow: hidden;clip: rect(1px, 1px, 1px, 1px);-webkit-clip-path: inset(50%);clip-path: inset(50%);border: 0;word-wrap: normal !important;"),n.setAttribute("hidden","hidden");var t=document.body;t&&t.appendChild(n)}(),null===t&&i("assertive"),null===e&&i("polite")},"undefined"!=typeof document&&("complete"!==document.readyState&&"interactive"!==document.readyState?document.addEventListener("DOMContentLoaded",o):o())},7291:function(n,t,e){e.r(t),e.d(t,{sc_product_text:function(){return l}});var i=e(3029),o=e(2901),r=e(1346),u=e(4683),l=(e(1416),e(6250),e(6402),function(){return(0,o.A)((function n(t){(0,i.A)(this,n),(0,r.r)(this,t),this.text="name",this.productId=void 0}),[{key:"render",value:function(){var n,t=null===(n=u.s[this.productId])||void 0===n?void 0:n.product;return(null==t?void 0:t[this.text])?(0,r.h)("span",{style:{whiteSpace:"pre-line"},innerHTML:t[this.text]}):(0,r.h)(r.H,null,(0,r.h)("slot",null))}}])}());l.style=":host{display:block}p{margin-block-start:0;margin-block-end:1em}"},172:function(n,t,e){function i(n,t){(null==t||t>n.length)&&(t=n.length);for(var e=0,i=Array(t);e<t;e++)i[e]=n[e];return i}e.d(t,{a:function(){return r},b:function(){return o},g:function(){return l},i:function(){return a},s:function(){return u}});var o=function(n){var t;try{t=new URL(n)}catch(n){return!1}return"http:"===t.protocol||"https:"===t.protocol},r=function(n){var t=window.location.search;return new URLSearchParams(t).get(n)},u=function(n,t,e){return(n||[]).sort((function(n,i){return-1===e.indexOf(null==n?void 0:n[t])?1:-1===e.indexOf(null==i?void 0:i[t])?-1:e.indexOf(null==n?void 0:n[t])-e.indexOf(null==i?void 0:i[t])}))},l=function(n){var t,e=n.variants,o=n.values,r=Object.keys(o),u=function(n,t){var e="undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(!e){if(Array.isArray(n)||(e=function(n,t){if(n){if("string"==typeof n)return i(n,t);var e={}.toString.call(n).slice(8,-1);return"Object"===e&&n.constructor&&(e=n.constructor.name),"Map"===e||"Set"===e?Array.from(n):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?i(n,t):void 0}}(n))||t&&n&&"number"==typeof n.length){e&&(n=e);var _n=0,o=function(){};return{s:o,n:function(){return _n>=n.length?{done:!0}:{done:!1,value:n[_n++]}},e:function(n){throw n},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,u=!0,l=!1;return{s:function(){e=e.call(n)},n:function(){var n=e.next();return u=n.done,n},e:function(n){l=!0,r=n},f:function(){try{u||null==e.return||e.return()}finally{if(l)throw r}}}}(e);try{var l,a=function(){var n=t.value,e=["option_1","option_2","option_3"].map((function(t){return n[t]})).filter((function(n){return null!=n}));if((null==e?void 0:e.length)===(null==r?void 0:r.length)&&r.every((function(n){return e.includes(o[n])})))return{v:n}};for(u.s();!(t=u.n()).done;)if(l=a())return l.v}catch(n){u.e(n)}finally{u.f()}return null},a=function(n,t){var e=parseInt(n);return!(t&&((null==t?void 0:t.ad_hoc_max_amount)||(null==t?void 0:t.ad_hoc_min_amount))&&((null==t?void 0:t.ad_hoc_max_amount)&&e>(null==t?void 0:t.ad_hoc_max_amount)||(null==t?void 0:t.ad_hoc_min_amount)&&e<(null==t?void 0:t.ad_hoc_min_amount)))}},6121:function(n,t,e){e.d(t,{a:function(){return l},g:function(){return r},i:function(){return u}});var i=e(9394),o=e(2284),r=function(){var n,t=document.querySelector('script[type="application/json"]#sc-store-data');if(!t)return{};try{var e=JSON.parse(t.textContent);if((n=e)&&"object"===(0,o.A)(n)&&!Array.isArray(n))return e;throw Error("Parsed state is not an object")}catch(n){console.error(n)}return{}},u=function(n,t,e,o){var r,u,l,a,d;if(!(null==o?void 0:o.stock_enabled)||(null==o?void 0:o.allow_out_of_stock_purchases))return!1;if(1===n){var c=null===(l=(u=(null===(r=o.variants)||void 0===r?void 0:r.data)||[]).filter)||void 0===l?void 0:l.call(u,(function(n){return n.option_1===t}));return Math.max.apply(Math,(0,i.A)(c.map((function(n){return n.available_stock}))))<=0}if(2===n){var v=((null===(a=o.variants)||void 0===a?void 0:a.data)||[]).filter((function(n){return(null==n?void 0:n.option_1)===e.option_1&&n.option_2===t}));return Math.max.apply(Math,(0,i.A)(v.map((function(n){return n.available_stock}))))<=0}var s=((null===(d=o.variants)||void 0===d?void 0:d.data)||[]).filter((function(n){return(null==n?void 0:n.option_1)===e.option_1&&(null==n?void 0:n.option_2)===e.option_2&&n.option_3===t}));return Math.max.apply(Math,(0,i.A)(s.map((function(n){return n.available_stock}))))<=0},l=function(n,t,e,i){var o,r,u;return 1===n?!((null===(o=null==i?void 0:i.variants)||void 0===o?void 0:o.data)||[]).some((function(n){return n.option_1===t})):2===n?!((null===(r=null==i?void 0:i.variants)||void 0===r?void 0:r.data)||[]).some((function(n){return(null==n?void 0:n.option_1)===e.option_1&&n.option_2===t})):!((null===(u=null==i?void 0:i.variants)||void 0===u?void 0:u.data)||[]).some((function(n){return(null==n?void 0:n.option_1)===e.option_1&&(null==n?void 0:n.option_2)===e.option_2&&n.option_3===t}))}},4683:function(n,t,e){e.d(t,{a:function(){return O},b:function(){return j},c:function(){return m},d:function(){return x},e:function(){return s},f:function(){return k},g:function(){return h},h:function(){return f},i:function(){return p},j:function(){return c},o:function(){return b},s:function(){return w}});var i=e(4467),o=e(1416),r=(e(6250),e(6121)),u=e(172),l=e(6402);function a(n,t){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable}))),e.push.apply(e,i)}return e}function d(n){for(var t=1;t<arguments.length;t++){var e=null!=arguments[t]?arguments[t]:{};t%2?a(Object(e),!0).forEach((function(t){(0,i.A)(n,t,e[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):a(Object(e)).forEach((function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(e,t))}))}return n}var c=function(n){var t;return((null===(t=w[n])||void 0===t?void 0:t.prices)||[]).filter((function(n){return!(null==n?void 0:n.archived)})).sort((function(n,t){return(null==n?void 0:n.position)-(null==t?void 0:t.position)}))},v=function(n){var t,e,i,o;return!(!(null===(e=null===(t=null==w?void 0:w[n])||void 0===t?void 0:t.product)||void 0===e?void 0:e.stock_enabled)||(null===(o=null===(i=null==w?void 0:w[n])||void 0===i?void 0:i.product)||void 0===o?void 0:o.allow_out_of_stock_purchases))},s=function(n,t,e){return(0,r.i)(t,e,w[n].variantValues,w[n].product)},f=function(n,t,e){return(0,r.a)(t,e,w[n].variantValues,w[n].product)},p=function(n){var t,e,i,o;return!!v(n)&&((null===(e=null===(t=null==w?void 0:w[n])||void 0===t?void 0:t.selectedVariant)||void 0===e?void 0:e.id)?(null===(o=w[n].selectedVariant)||void 0===o?void 0:o.available_stock)<=0:(null===(i=w[n].product)||void 0===i?void 0:i.available_stock)<=0)},m=function(n){var t,e,i;return!!(null===(e=null===(t=null==w?void 0:w[n])||void 0===t?void 0:t.variants)||void 0===e?void 0:e.length)&&void 0===(null===(i=(0,u.g)({variants:w[n].variants,values:w[n].variantValues}))||void 0===i?void 0:i.id)},y=function(){var n=(0,r.g)().product,t=void 0===n?{}:n;return Object.values(t).reduce((function(n,t){var e=t||{},i=e.selectedPrice,o=e.product,r=e.selectedVariant,u=d(d({},t),{},{quantity:1,total:null,dialog:null,busy:!1,error:null,adHocAmount:(null==i?void 0:i.amount)||null,disabled:(null==i?void 0:i.archived)||(null==o?void 0:o.archived),line_item:d(d({price_id:null==i?void 0:i.id,quantity:1},(null==i?void 0:i.ad_hoc)?{ad_hoc_amount:null==i?void 0:i.amount}:{}),(null==r?void 0:r.id)?{variant_id:null==r?void 0:r.id}:{}),variantValues:d(d(d({},(null==r?void 0:r.option_1)?{option_1:null==r?void 0:r.option_1}:{}),(null==r?void 0:r.option_2)?{option_2:null==r?void 0:r.option_2}:{}),(null==r?void 0:r.option_3)?{option_3:null==r?void 0:r.option_3}:{})});return n[o.id]=u,n}),{})||{}},h=Object.freeze({__proto__:null,availablePrices:c,getProduct:function(n){var t;return null!==(t=w[n])&&void 0!==t?t:null},isStockNeedsToBeChecked:v,isOptionSoldOut:s,isOptionMissing:f,isProductOutOfStock:p,isSelectedVariantMissing:m,getDefaultState:y,availableSubscriptionPrices:function(n){return(c(n)||[]).filter((function(n){return null==n?void 0:n.recurring_interval})).sort((function(n,t){return(null==n?void 0:n.position)-(null==t?void 0:t.position)}))},availableNonSubscriptionPrices:function(n){return(c(n)||[]).filter((function(n){return!(null==n?void 0:n.recurring_interval)})).sort((function(n,t){return(null==n?void 0:n.position)-(null==t?void 0:t.position)}))}}),_=y();Object.values(_).filter((function(n){return null==n?void 0:n.isProductPage})).forEach((function(n){var t;(null===(t=null==n?void 0:n.product)||void 0===t?void 0:t.id)&&function(n,t){var e,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,o=new CustomEvent("scProductViewed",{detail:{id:null==n?void 0:n.id,name:null==n?void 0:n.name,price:t,permalink:null==n?void 0:n.permalink,prices:null==n?void 0:n.prices,variant_options:null===(e=null==n?void 0:n.variant_options)||void 0===e?void 0:e.data,product_collections:null==n?void 0:n.product_collections,quantity:i},bubbles:!0});document.dispatchEvent(o)}(null==n?void 0:n.product,null==n?void 0:n.selectedPrice,null==n?void 0:n.quantity)}));var g=(0,o.c)(_,(function(n,t){return JSON.stringify(n)!==JSON.stringify(t)})),w=g.state,b=g.onChange,O=g.on,x=g.dispose,k=g.forceUpdate,j=function(n,t){n&&(w[n]=d(d({},w[n]),t))};O("set",(function(n,t,e){var i,o,r,u;(null===(i=null==t?void 0:t.selectedPrice)||void 0===i?void 0:i.id)!==(null===(o=null==e?void 0:e.selectedPrice)||void 0===o?void 0:o.id)&&A(n,t),(null===(r=null==t?void 0:t.selectedVariant)||void 0===r?void 0:r.id)!==(null===(u=null==e?void 0:e.selectedVariant)||void 0===u?void 0:u.id)&&S(n),(!e||["selectedPrice","adHocAmount","quantity","selectedVariant"].some((function(n){return JSON.stringify(t[n])!==JSON.stringify(e[n])})))&&E(n),(!e||JSON.stringify(null==t?void 0:t.variantValues)!==JSON.stringify(null==e?void 0:e.variantValues))&&P(n,t)}));var P=function(n,t){var e=(0,u.g)({variants:w[n].variants,values:null==t?void 0:t.variantValues});e&&j(n,{selectedVariant:e})},S=function(n){var t,e,i;w[n].selectedVariant&&v&&(null===(t=w[n])||void 0===t?void 0:t.selectedVariant.available_stock)<(null===(e=w[n])||void 0===e?void 0:e.quantity)&&(w[n].quantity=(null===(i=w[n])||void 0===i?void 0:i.selectedVariant.available_stock)||1,(0,l.s)(wp.i18n.sprintf(wp.i18n.__("There are just %d items left in stock, and the quantity has been adjusted to %d.","surecart"),w[n].quantity,w[n].quantity),"assertive"))},A=function(n,t){var e,i,o,r;j(n,{total:w[n].adHocAmount||(null===(e=null==t?void 0:t.selectedPrice)||void 0===e?void 0:e.amount)||0,adHocAmount:null===(i=null==t?void 0:t.selectedPrice)||void 0===i?void 0:i.amount,disabled:(null===(o=null==t?void 0:t.selectedPrice)||void 0===o?void 0:o.archived)||(null===(r=w[n].product)||void 0===r?void 0:r.archived)})},E=function(n){var t,e,i,o,r,u,l,a;j(n,{line_item:d(d({price_id:null===(e=null===(t=w[n])||void 0===t?void 0:t.selectedPrice)||void 0===e?void 0:e.id,quantity:Math.max((null===(o=null===(i=w[n])||void 0===i?void 0:i.selectedPrice)||void 0===o?void 0:o.ad_hoc)?1:w[n].quantity,1)},(null===(u=null===(r=w[n])||void 0===r?void 0:r.selectedPrice)||void 0===u?void 0:u.ad_hoc)?{ad_hoc_amount:null===(l=w[n])||void 0===l?void 0:l.adHocAmount}:{}),{},{variant:null===(a=w[n].selectedVariant)||void 0===a?void 0:a.id})})}}}]);