index of
/
home
/
thefkyzp
/
hulmvisaadvisor.com
/
wp-content
/
plugins
/
surecart
/
dist
/
File: /home/thefkyzp/hulmvisaadvisor.com/wp-content/plugins/surecart/dist/1255.js
"use strict";(self.webpackChunk_surecart_surecart=self.webpackChunk_surecart_surecart||[]).push([[1255],{1494:function(n,r,t){t.d(r,{o:function(){return e}});var i=t(8860),e=function(n,r,t){void 0===t&&(t=!0);var e="Function"===n.constructor.name?n.prototype:n,o=e.componentWillLoad;e.componentWillLoad=function(){var n,e=this,u=(0,i.a)(this),c={promise:new Promise((function(r){n=r})),resolve:n},a=new CustomEvent("openWormhole",{bubbles:!0,composed:!0,detail:{consumer:this,fields:r,updater:function(n,r){(n in u?u:e)[n]=r},onOpen:c}});u.dispatchEvent(a);var l=function(){if(o)return o.call(e)};return t?c.promise.then((function(){return l()})):l()}}},2846:function(n,r,t){t.d(r,{i:function(){return o},m:function(){return e},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"],e=function(n,r){return o(r)?n:n/100},o=function(n){var r;return i.includes(null===(r=null==n?void 0:n.toLowerCase)||void 0===r?void 0:r.call(n))}},8223:function(n,r,t){t.d(r,{a:function(){return l},c:function(){return u},g:function(){return c},h:function(){return s},i:function(){return a}});var i=t(4942);function e(n,r){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);r&&(i=i.filter((function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),t.push.apply(t,i)}return t}function o(n){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?e(Object(t),!0).forEach((function(r){(0,i.Z)(n,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):e(Object(t)).forEach((function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(t,r))}))}return n}var u=function(n){return((null==n?void 0:n.data)||[]).map((function(n){var r;return o(o({},(null==n?void 0:n.id)?{id:n.id}:{}),{},{price_id:n.price.id,quantity:n.quantity,variant_id:null===(r=n.variant)||void 0===r?void 0:r.id})}))},c=function(n,r){return((null==n?void 0:n.data)||[]).find((function(n){return n.price.id===r}))},a=function(n,r){var t;return!!((null==(t=null==r?void 0:r.line_items)?void 0:t.data)||[]).map((function(n){return n.price.id})).find((function(r){return(null==n?void 0:n.id)===r}))},l=function(n,r){var t;return!!((null==(t=null==r?void 0:r.line_items)?void 0:t.data)||[]).map((function(n){var r;return(null===(r=null==n?void 0:n.bump)||void 0===r?void 0:r.id)||(null==n?void 0:n.bump)})).find((function(r){return(null==n?void 0:n.id)===r}))},s=function(n){var r,t,i;return!!(null===(t=null===(r=null==n?void 0:n.line_items)||void 0===r?void 0:r.data)||void 0===t?void 0:t.length)&&(null===(i=null==n?void 0:n.line_items.data)||void 0===i?void 0:i.some((function(n){var r;return null===(r=null==n?void 0:n.price)||void 0===r?void 0:r.recurring_interval_count})))}},2400:function(n,r,t){t.d(r,{a:function(){return e},b:function(){return p},c:function(){return _},d:function(){return u},g:function(){return o},i:function(){return l},p:function(){return v},t:function(){return c}});var i=t(2846),e=function(n){return(null==n?void 0:n.amount_off)&&(null==n?void 0:n.currency)?o({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):""},o=function(n){var r=n.amount,t=n.currency,e=function(n,r){return i.z.includes(r)?n:n/100}(r,t);return"".concat(new Intl.NumberFormat(void 0,{style:"currency",currency:t}).format(parseFloat(e.toFixed(2))))},u=function(){var n,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"usd",t=new Intl.NumberFormat(void 0,{style:"currency",currency:r}).formatToParts();return null===(n=t.find((function(n){return"currency"===n.type})))||void 0===n?void 0:n.value},c=function(n,r){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:wp.i18n.__("every","surecart"),i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:wp.i18n.__("once","surecart"),e=arguments.length>4&&void 0!==arguments[4]&&arguments[4];switch(r){case"day":return"".concat(t," ").concat(wp.i18n.sprintf(e?wp.i18n._n("%d day","%d days",n,"surecart"):wp.i18n._n("day","%d days",n,"surecart"),n));case"week":return"".concat(t," ").concat(wp.i18n.sprintf(e?wp.i18n._n("%d week","%d weeks",n,"surecart"):wp.i18n._n("week","%d weeks",n,"surecart"),n));case"month":return"".concat(t," ").concat(wp.i18n.sprintf(e?wp.i18n._n("%d month","%d months",n,"surecart"):wp.i18n._n("month","%d months",n,"surecart"),n));case"year":return"".concat(t," ").concat(wp.i18n.sprintf(e?wp.i18n._n("%d year","%d years",n,"surecart"):wp.i18n._n("year","%d years",n,"surecart"),n));default:return i}},a=function(n,r){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:wp.i18n.__("once","surecart"),i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];switch(r){case"day":return" / ".concat(wp.i18n.sprintf(i?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(i?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(i?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(i?wp.i18n._n("%d yr","%d yrs",n,"surecart"):wp.i18n._n("yr","%d yrs",n,"surecart"),n));default:return t}},l=function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!n)return"";var t=r.showOnce,i=r.labels,e=r.abbreviate,o=i||{},u=o.interval,c=void 0===u?wp.i18n.__("every","surecart"):u;return"".concat(s(n,c,t?wp.i18n.__("once","surecart"):"",e)," ").concat(d(n,e))},s=function(n,r){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:wp.i18n.__("once","surecart"),i=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)?i?a(n.recurring_interval_count,n.recurring_interval,t):c(n.recurring_interval_count,n.recurring_interval," ".concat(r),t):""},d=function(n){var r=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)?r?"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)},v=function(n){var r;return n?"".concat(null===(r=null==n?void 0:n.product)||void 0===r?void 0:r.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")}}},1255:function(n,r,t){t.r(r),t.d(r,{sc_order_confirmation_line_items:function(){return s},sc_order_confirmation_totals:function(){return d}});var i=t(5671),e=t(3144),o=t(8860),u=t(1494),c=t(8223),a=t(2400),l=t(7114),s=function(){function n(r){(0,i.Z)(this,n),(0,o.r)(this,r),this.order=void 0,this.loading=void 0}return(0,e.Z)(n,[{key:"render",value:function(){var n,r,t=this;return this.loading?(0,o.h)("sc-line-item",null,(0,o.h)("sc-skeleton",{style:{width:"50px",height:"50px","--border-radius":"0"},slot:"image"}),(0,o.h)("sc-skeleton",{slot:"title",style:{width:"120px",display:"inline-block"}}),(0,o.h)("sc-skeleton",{slot:"description",style:{width:"60px",display:"inline-block"}}),(0,o.h)("sc-skeleton",{style:{width:"120px",display:"inline-block"},slot:"price"}),(0,o.h)("sc-skeleton",{style:{width:"60px",display:"inline-block"},slot:"price-description"})):(0,o.h)("div",{class:{"confirmation-summary":!0}},(0,o.h)("div",{class:"line-items",part:"line-items"},null===(r=null===(n=this.order)||void 0===n?void 0:n.line_items)||void 0===r?void 0:r.data.map((function(n){var r,i,e,u,l,s,d,p;return(0,o.h)("div",{class:"line-item"},(0,o.h)("sc-product-line-item",{key:n.id,imageUrl:null===(i=null===(r=null==n?void 0:n.price)||void 0===r?void 0:r.product)||void 0===i?void 0:i.image_url,name:"".concat(null===(u=null===(e=null==n?void 0:n.price)||void 0===e?void 0:e.product)||void 0===u?void 0:u.name),priceName:null===(l=null==n?void 0:n.price)||void 0===l?void 0:l.name,variantLabel:((null==n?void 0:n.variant_options)||[]).filter(Boolean).join(" / ")||null,editable:!1,removable:!1,quantity:n.quantity,fees:null===(s=null==n?void 0:n.fees)||void 0===s?void 0:s.data,amount:null!==n.ad_hoc_amount?n.ad_hoc_amount:n.subtotal_amount,currency:null===(d=t.order)||void 0===d?void 0:d.currency,trialDurationDays:null===(p=null==n?void 0:n.price)||void 0===p?void 0:p.trial_duration_days,interval:(0,a.i)(null==n?void 0:n.price,{showOnce:(0,c.h)(t.order)}),purchasableStatusDisplay:null==n?void 0:n.purchasable_status_display}))}))))}}]),n}();(0,u.o)(s,["order","busy","loading","empty"],!1),s.style=":host{display:block}.line-items{display:grid;gap:var(--sc-spacing-small)}.line-item{display:grid;gap:var(--sc-spacing-small)}.fee__description{opacity:0.75}";var d=function(){function n(r){(0,i.Z)(this,n),(0,o.r)(this,r),this.order=void 0}return(0,e.Z)(n,[{key:"renderDiscountLine",value:function(){var n,r,t,i,e,u,c,l,s,d,p,v,_,f,m;if(!(null===(t=null===(r=null===(n=this.order)||void 0===n?void 0:n.discount)||void 0===r?void 0:r.promotion)||void 0===t?void 0:t.code))return null;var h="";return(null===(e=null===(i=this.order)||void 0===i?void 0:i.discount)||void 0===e?void 0:e.coupon)&&(h=(0,a.a)(null===(c=null===(u=this.order)||void 0===u?void 0:u.discount)||void 0===c?void 0:c.coupon)),(0,o.h)("sc-line-item",{style:{marginTop:"var(--sc-spacing-small)"}},(0,o.h)("span",{slot:"description"},wp.i18n.__("Discount","surecart"),(0,o.h)("br",null),(null===(d=null===(s=null===(l=this.order)||void 0===l?void 0:l.discount)||void 0===s?void 0:s.promotion)||void 0===d?void 0:d.code)&&(0,o.h)("sc-tag",{type:"success",size:"small"},null===(_=null===(v=null===(p=this.order)||void 0===p?void 0:p.discount)||void 0===v?void 0:v.promotion)||void 0===_?void 0:_.code)),h&&(0,o.h)("span",{class:"coupon-human-discount",slot:"price-description"},"(",h,")"),(0,o.h)("sc-format-number",{slot:"price",type:"currency",currency:null===(f=this.order)||void 0===f?void 0:f.currency,value:-(null===(m=this.order)||void 0===m?void 0:m.discount_amount)}))}},{key:"render",value:function(){var n,r,t,i,e,u,c,a,s,d;return(0,o.h)("div",{class:{"line-item-totals":!0}},(0,o.h)("sc-line-item-total",{checkout:this.order,total:"subtotal"},(0,o.h)("span",{slot:"description"},wp.i18n.__("Subtotal","surecart"))),this.renderDiscountLine(),!!(null===(n=this.order)||void 0===n?void 0:n.bump_amount)&&(0,o.h)("sc-line-item",{style:{marginTop:"var(--sc-spacing-small)"}},(0,o.h)("span",{slot:"description"},wp.i18n.__("Bundle Discount","surecart")),(0,o.h)("sc-format-number",{slot:"price",type:"currency",currency:null===(r=this.order)||void 0===r?void 0:r.currency,value:null===(t=this.order)||void 0===t?void 0:t.bump_amount})),!!(null===(i=this.order)||void 0===i?void 0:i.shipping_amount)&&(0,o.h)("sc-line-item",{style:{marginTop:"var(--sc-spacing-small)"}},(0,o.h)("span",{slot:"description"},wp.i18n.__("Shipping","surecart")),(0,o.h)("sc-format-number",{slot:"price",type:"currency",currency:null===(e=this.order)||void 0===e?void 0:e.currency,value:null===(u=this.order)||void 0===u?void 0:u.shipping_amount})),!!(null===(c=this.order)||void 0===c?void 0:c.tax_amount)&&(0,o.h)("sc-line-item",{style:{marginTop:"var(--sc-spacing-small)"}},(0,o.h)("span",{slot:"description"},(0,l.f)(null===(a=this.order)||void 0===a?void 0:a.tax_label)," ","(".concat(this.order.tax_percent,"%)")),(0,o.h)("sc-format-number",{slot:"price",type:"currency",currency:null===(s=this.order)||void 0===s?void 0:s.currency,value:null===(d=this.order)||void 0===d?void 0:d.tax_amount})),(0,o.h)("sc-divider",{style:{"--spacing":"var(--sc-spacing-small)"}}),(0,o.h)("sc-line-item-total",{checkout:this.order,size:"large","show-currency":!0},(0,o.h)("span",{slot:"description"},wp.i18n.__("Total","surecart"))))}}]),n}();(0,u.o)(d,["order","busy","loading","empty"],!1),d.style=":host{display:block}"},7114:function(n,r,t){t.d(r,{f:function(){return e},z:function(){return i}});var i={ca_gst:{label:wp.i18n.__("GST Number","surecart"),label_small:wp.i18n.__("CA GST","surecart")},au_abn:{label:wp.i18n.__("ABN Number","surecart"),label_small:wp.i18n.__("AU ABN","surecart")},gb_vat:{label:wp.i18n.__("VAT Number","surecart"),label_small:wp.i18n.__("UK VAT","surecart")},eu_vat:{label:wp.i18n.__("VAT Number","surecart"),label_small:wp.i18n.__("EU VAT","surecart")},other:{label:wp.i18n.__("Tax ID","surecart"),label_small:wp.i18n.__("Other","surecart")}},e=function(n){return n?"".concat(wp.i18n.__("Tax"),": ").concat(n||""):wp.i18n.__("Tax","surecart")}},4942:function(n,r,t){function i(n,r,t){return r in n?Object.defineProperty(n,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[r]=t,n}t.d(r,{Z:function(){return i}})}}]);