index of
/
home
/
thefkyzp
/
hulmvisaadvisor.com
/
wp-content
/
plugins
/
surecart
/
dist
/
File: /home/thefkyzp/hulmvisaadvisor.com/wp-content/plugins/surecart/dist/8478.js
"use strict";(self.webpackChunk_surecart_surecart=self.webpackChunk_surecart_surecart||[]).push([[8478],{2846:function(n,e,i){i.d(e,{i:function(){return c},m:function(){return t},z:function(){return r}});var r=["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"],t=function(n,e){return c(e)?n:n/100},c=function(n){var e;return r.includes(null===(e=null==n?void 0:n.toLowerCase)||void 0===e?void 0:e.call(n))}},2400:function(n,e,i){i.d(e,{a:function(){return t},b:function(){return p},c:function(){return _},d:function(){return a},g:function(){return c},i:function(){return u},p:function(){return h},t:function(){return o}});var r=i(2846),t=function(n){return(null==n?void 0:n.amount_off)&&(null==n?void 0:n.currency)?c({amount:n.amount_off,currency:n.currency}):(null==n?void 0:n.percent_off)?wp.i18n.sprintf(wp.i18n.__("%1d%% off","surecart"),0|n.percent_off):""},c=function(n){var e=n.amount,i=n.currency,t=function(n,e){return r.z.includes(e)?n:n/100}(e,i);return"".concat(new Intl.NumberFormat(void 0,{style:"currency",currency:i}).format(parseFloat(t.toFixed(2))))},a=function(){var n,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"usd",i=new Intl.NumberFormat(void 0,{style:"currency",currency:e}).formatToParts();return null===(n=i.find((function(n){return"currency"===n.type})))||void 0===n?void 0:n.value},o=function(n,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:wp.i18n.__("every","surecart"),r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:wp.i18n.__("once","surecart"),t=arguments.length>4&&void 0!==arguments[4]&&arguments[4];switch(e){case"day":return"".concat(i," ").concat(wp.i18n.sprintf(t?wp.i18n._n("%d day","%d days",n,"surecart"):wp.i18n._n("day","%d days",n,"surecart"),n));case"week":return"".concat(i," ").concat(wp.i18n.sprintf(t?wp.i18n._n("%d week","%d weeks",n,"surecart"):wp.i18n._n("week","%d weeks",n,"surecart"),n));case"month":return"".concat(i," ").concat(wp.i18n.sprintf(t?wp.i18n._n("%d month","%d months",n,"surecart"):wp.i18n._n("month","%d months",n,"surecart"),n));case"year":return"".concat(i," ").concat(wp.i18n.sprintf(t?wp.i18n._n("%d year","%d years",n,"surecart"):wp.i18n._n("year","%d years",n,"surecart"),n));default:return r}},s=function(n,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:wp.i18n.__("once","surecart"),r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];switch(e){case"day":return" / ".concat(wp.i18n.sprintf(r?wp.i18n._n("%d day","%d days",n,"surecart"):wp.i18n._n("day","%d days",n,"surecart"),n));case"week":return" / ".concat(wp.i18n.sprintf(r?wp.i18n._n("%d wk","%d wks",n,"surecart"):wp.i18n._n("wk","%d wks",n,"surecart"),n));case"month":return" / ".concat(wp.i18n.sprintf(r?wp.i18n._n("%d mo","%d months",n,"surecart"):wp.i18n._n("mo","%d mos",n,"surecart"),n));case"year":return" / ".concat(wp.i18n.sprintf(r?wp.i18n._n("%d yr","%d yrs",n,"surecart"):wp.i18n._n("yr","%d yrs",n,"surecart"),n));default:return i}},u=function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!n)return"";var i=e.showOnce,r=e.labels,t=e.abbreviate,c=r||{},a=c.interval,o=void 0===a?wp.i18n.__("every","surecart"):a;return"".concat(l(n,o,i?wp.i18n.__("once","surecart"):"",t)," ").concat(d(n,t))},l=function(n,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:wp.i18n.__("once","surecart"),r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return n.recurring_interval_count&&n.recurring_interval&&1!==(null==n?void 0:n.recurring_period_count)?r?s(n.recurring_interval_count,n.recurring_interval,i):o(n.recurring_interval_count,n.recurring_interval," ".concat(e),i):""},d=function(n){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return(null==n?void 0:n.recurring_period_count)&&1!==(null==n?void 0:n.recurring_period_count)?e?"x ".concat(n.recurring_period_count):" (".concat(wp.i18n.sprintf(wp.i18n._n("%d payment","%d payments",n.recurring_period_count,"surecart"),n.recurring_period_count),")"):""},p=function(n){return wp.i18n.sprintf(wp.i18n._n("%d payment remaining","%d payments remaining",n,"surecart"),n)},h=function(n){var e;return n?"".concat(null===(e=null==n?void 0:n.product)||void 0===e?void 0:e.name," ").concat((null==n?void 0:n.name)?"— ".concat(n.name):""):""},_=function(n){switch(n){case"invalid":return wp.i18n.__("Not valid","surecart");case"expired":return wp.i18n.__("Expired","surecart");case"gone":return wp.i18n.__("Not available","surecart");case"less_than_min_subtotal_amount":return wp.i18n.__("Minimum not met","surecart");case"greater_than_max_subtotal_amount":return wp.i18n.__("Order too large","surecart");case"not_applicable":return wp.i18n.__("Product(s) not eligible","surecart");case"not_applicable_to_customer":return wp.i18n.__("Not eligible","surecart");case"":return"";default:return wp.i18n.__("Not redeemable","surecart")}}},8478:function(n,e,i){i.r(e),i.d(e,{sc_price_choice_container:function(){return o}});var r=i(5671),t=i(3144),c=i(8860),a=i(2400),o=function(){function n(e){(0,r.Z)(this,n),(0,c.r)(this,e),this.scChange=(0,c.c)(this,"scChange",7),this.price=void 0,this.loading=!1,this.label=void 0,this.showLabel=!0,this.showPrice=!0,this.showControl=!1,this.description=void 0,this.type=void 0,this.required=!1,this.checked=!1,this.priceData=void 0}return(0,t.Z)(n,[{key:"handlePriceChange",value:function(){this.priceData="string"==typeof this.price?JSON.parse(this.price):this.price}},{key:"componentWillLoad",value:function(){this.handlePriceChange()}},{key:"renderPrice",value:function(){var n,e;return(0,c.h)(c.F,null,(0,c.h)("sc-format-number",{type:"currency",value:null===(n=this.priceData)||void 0===n?void 0:n.amount,currency:null===(e=this.priceData)||void 0===e?void 0:e.currency}),(0,a.i)(this.priceData,{showOnce:!0,abbreviate:!0,labels:{interval:"/",period: /** translators: used as in time period: "for 3 months" */ wp.i18n.__("for","surecart")}}))}},{key:"render",value:function(){var n,e,i,r,t,o,s,u,l,d,p,h,_,v=this;return this.loading?(0,c.h)("sc-choice-container",{showControl:this.showControl,name:"loading",disabled:!0},(0,c.h)("div",{class:"price-choice"},(0,c.h)("sc-skeleton",{style:{width:"60px",display:"inline-block"}}),(0,c.h)("sc-skeleton",{style:{width:"80px",display:"inline-block"}}))):(0,c.h)("sc-choice-container",{value:null===(n=this.priceData)||void 0===n?void 0:n.id,type:this.type,showControl:this.showControl,checked:this.checked,onScChange:function(){return v.scChange.emit()},required:this.required},(0,c.h)("div",{class:"price-choice"},this.showLabel&&(0,c.h)("div",{class:"price-choice__title"},(0,c.h)("div",{class:"price-choice__name"},this.label||this.priceData.name),!!this.description&&(0,c.h)("div",{class:"price-choice__description"},this.description)),this.showPrice&&(0,c.h)("div",{class:"price-choice__details"},(0,c.h)("div",{class:"price-choice__price"},(null===(e=this.priceData)||void 0===e?void 0:e.ad_hoc)?wp.i18n.__("Custom Amount","surecart"):(0,c.h)(c.F,null,(0,c.h)("sc-format-number",{type:"currency",value:null===(i=this.priceData)||void 0===i?void 0:i.amount,currency:null===(r=this.priceData)||void 0===r?void 0:r.currency}),(null===(t=this.priceData)||void 0===t?void 0:t.recurring_period_count)&&1<=(null===(o=this.priceData)||void 0===o?void 0:o.recurring_period_count)&&(0,c.h)("sc-visually-hidden",null," ",wp.i18n.__("This is a repeating price. Payment will happen","surecart")," ",(0,a.i)(this.priceData,{showOnce:!0,abbreviate:!1,labels:{interval:wp.i18n.__("every","surecart"),period: /** translators: used as in time period: "for 3 months" */ wp.i18n.__("for","surecart")}})),(0,c.h)("span",{"aria-hidden":"true"},(0,a.i)(this.priceData,{showOnce:!0,abbreviate:!0,labels:{interval:"/",period: /** translators: used as in time period: "for 3 months" */ wp.i18n.__("for","surecart")}})))),!!(null===(s=this.priceData)||void 0===s?void 0:s.trial_duration_days)&&(0,c.h)(c.F,null,(0,c.h)("sc-visually-hidden",null,wp.i18n.sprintf(wp.i18n.__("You have a %d-day trial before payment becomes necessary.","surecart"),null===(u=this.priceData)||void 0===u?void 0:u.trial_duration_days)),(0,c.h)("div",{class:"price-choice__trial","aria-hidden":"true"},wp.i18n.sprintf(wp.i18n._n("Starting in %s day","Starting in %s days",this.priceData.trial_duration_days,"surecart"),this.priceData.trial_duration_days))),!!(null===(l=this.priceData)||void 0===l?void 0:l.setup_fee_enabled)&&(null===(d=this.priceData)||void 0===d?void 0:d.setup_fee_amount)&&(0,c.h)("div",{class:"price-choice__setup-fee"},(0,c.h)("sc-visually-hidden",null,wp.i18n.__("This payment plan has","surecart")," "),(0,c.h)("sc-format-number",{type:"currency",value:Math.abs(this.priceData.setup_fee_amount),currency:null===(p=this.priceData)||void 0===p?void 0:p.currency})," ",(null===(h=this.priceData)||void 0===h?void 0:h.setup_fee_name)||((null===(_=this.priceData)||void 0===_?void 0:_.setup_fee_amount)<0?wp.i18n.__("Discount","surecart"):wp.i18n.__("Setup Fee","surecart"))))))}}],[{key:"watchers",get:function(){return{price:["handlePriceChange"]}}}]),n}();o.style=":host {\n display: block;\n min-width: 0;\n width: 100%;\n}\n\nsc-choice-container {\n container-type: inline-size;\n}\n\n.price-choice {\n display: flex;\n align-items: center;\n justify-content: space-between;\n line-height: var(--sc-line-height-dense);\n gap: var(--sc-spacing-small);\n}\n.price-choice__name {\n display: inline-block;\n font-size: var(--sc-price-choice-name-size, var(--sc-input-label-font-size-medium));\n font-weight: var(--sc-price-choice-name-font-weight, var(--sc-font-weight-bold));\n text-transform: var(--sc-price-choice-text-transform, var(--sc-input-label-text-transform, none));\n}\n.price-choice > *:not(:first-child):last-child {\n text-align: right;\n}\n.price-choice__details {\n flex: 1 0 50%;\n display: grid;\n gap: var(--sc-spacing-xxx-small);\n}\n.price-choice__trial, .price-choice__setup-fee, .price-choice__price {\n font-size: var(--sc-font-size-small);\n opacity: 0.8;\n}\n.price-choice__price {\n font-weight: var(--sc-price-choice-price-font-weight, var(--sc-font-weight-normal));\n}\n\n@container (max-width: 325px) {\n .price-choice {\n flex-direction: column;\n align-items: flex-start;\n gap: var(--sc-spacing-xx-small);\n }\n .price-choice > *:not(:first-child):last-child {\n text-align: initial;\n }\n}"}}]);