index of
/
home
/
thefkyzp
/
hulmvisaadvisor.com
/
wp-content
/
plugins
/
surecart
/
dist
/
File: /home/thefkyzp/hulmvisaadvisor.com/wp-content/plugins/surecart/dist/9880.js
"use strict";(self.webpackChunk_surecart_surecart=self.webpackChunk_surecart_surecart||[]).push([[9880],{448:function(e,n,t){t.d(n,{a:function(){return d},b:function(){return c},g:function(){return u}});var r=t(4942),i=t(885);function o(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function s(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?o(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):o(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function l(e,n){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=function(e,n){if(e){if("string"==typeof e)return a(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?a(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},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 o,s=!0,l=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return s=e.done,e},e:function(e){l=!0,o=e},f:function(){try{s||null==t.return||t.return()}finally{if(l)throw o}}}}function a(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function c(e){for(var n,t="",r=Object.entries(e);n=r.shift();){var o=n,s=(0,i.Z)(o,2),a=s[0],c=s[1];if(Array.isArray(c)||c&&c.constructor===Object){var u,d=l(Object.entries(c).reverse());try{for(d.s();!(u=d.n()).done;){var h=(0,i.Z)(u.value,2),f=h[0],v=h[1];r.unshift(["".concat(a,"[").concat(f,"]"),v])}}catch(e){d.e(e)}finally{d.f()}}else void 0!==c&&(null===c&&(c=""),t+="&"+[a,c].map(encodeURIComponent).join("="))}return t.substr(1)}function u(e){return(function(e){var n;try{n=new URL(e,"http://example.com").search.substring(1)}catch(e){}if(n)return n}(e)||"").replace(/\+/g,"%20").split("&").reduce((function(e,n){var t=n.split("=").filter(Boolean).map(decodeURIComponent),r=(0,i.Z)(t,2),o=r[0],l=r[1],a=void 0===l?"":l;return o&&function(e,n,t){for(var r=n.length,i=r-1,o=0;o<r;o++){var l=n[o];!l&&Array.isArray(e)&&(l=e.length.toString());var a=!isNaN(Number(n[o+1]));e[l]=o===i?t:e[l]||(a?[]:{}),Array.isArray(e[l])&&!a&&(e[l]=s({},e[l])),e=e[l]}}(e,o.replace(/\]/g,"").split("["),a),e}),{})}function d(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1?arguments[1]:void 0;if(!n||!Object.keys(n).length)return e;var t=e,r=e.indexOf("?");return-1!==r&&(n=Object.assign(u(e),n),t=t.substr(0,r)),t+"?"+c(n)}},9880:function(e,n,t){t.r(n),t.d(n,{sc_purchase_downloads_list:function(){return l}});var r=t(5671),i=t(3144),o=t(8860),s=t(448),l=function(){function e(n){(0,r.Z)(this,e),(0,o.r)(this,n),this.allLink=void 0,this.heading=void 0,this.busy=void 0,this.loading=void 0,this.requestNonce=void 0,this.error=void 0,this.purchases=[]}return(0,i.Z)(e,[{key:"renderEmpty",value:function(){return(0,o.h)("div",null,(0,o.h)("sc-divider",{style:{"--spacing":"0"}}),(0,o.h)("slot",{name:"empty"},(0,o.h)("sc-empty",{icon:"download"},wp.i18n.__("You don't have any downloads.","surecart"))))}},{key:"renderLoading",value:function(){return(0,o.h)("sc-card",{"no-padding":!0,style:{"--overflow":"hidden"}},(0,o.h)("sc-stacked-list",null,(0,o.h)("sc-stacked-list-row",{style:{"--columns":"2"},"mobile-size":0},(0,o.h)("div",{style:{padding:"0.5em"}},(0,o.h)("sc-skeleton",{style:{width:"30%",marginBottom:"0.75em"}}),(0,o.h)("sc-skeleton",{style:{width:"20%"}})))))}},{key:"renderList",value:function(){var e=this;return this.purchases.map((function(n){var t,r,i,l=null===(r=null===(t=null==n?void 0:n.product)||void 0===t?void 0:t.downloads)||void 0===r?void 0:r.data.filter((function(e){return!e.archived})),a=(l||[]).map((function(e){var n;return(null==e?void 0:e.media)?null===(n=null==e?void 0:e.media)||void 0===n?void 0:n.byte_size:0})),c=a.reduce((function(e,n){return e+n}),0);return(0,o.h)("sc-stacked-list-row",{href:(null==n?void 0:n.revoked)?null:(0,s.a)(window.location.href,{action:"show",model:"download",id:n.id,nonce:e.requestNonce}),key:n.id,"mobile-size":0},(0,o.h)("sc-spacing",{style:{"--spacing":"var(--sc-spacing-xx--small)"}},(0,o.h)("div",null,(0,o.h)("strong",null,null===(i=null==n?void 0:n.product)||void 0===i?void 0:i.name)),(0,o.h)("div",{class:"download__details"},wp.i18n.sprintf(wp.i18n._n("%s file","%s files",null==l?void 0:l.length,"surecart"),null==l?void 0:l.length),!!c&&(0,o.h)(o.F,null," ","• ",(0,o.h)("sc-format-bytes",{value:c})))),(0,o.h)("sc-icon",{name:"chevron-right",slot:"suffix"}))}))}},{key:"renderContent",value:function(){var e;return this.loading?this.renderLoading():0===(null===(e=this.purchases)||void 0===e?void 0:e.length)?this.renderEmpty():(0,o.h)("sc-card",{"no-padding":!0,style:{"--overflow":"hidden"}},(0,o.h)("sc-stacked-list",null,this.renderList()))}},{key:"render",value:function(){return(0,o.h)("sc-dashboard-module",{class:"downloads-list",error:this.error},(0,o.h)("span",{slot:"heading"},(0,o.h)("slot",{name:"heading"},this.heading||wp.i18n.__("Items","surecart"))),(0,o.h)("slot",{name:"before"}),!!this.allLink&&(0,o.h)("sc-button",{type:"link",href:this.allLink,slot:"end"},wp.i18n.__("View all","surecart"),(0,o.h)("sc-icon",{name:"chevron-right",slot:"suffix"})),this.renderContent(),(0,o.h)("slot",{name:"after"}),this.busy&&(0,o.h)("sc-block-ui",null))}},{key:"el",get:function(){return(0,o.a)(this)}}]),e}();l.style=":host{display:block}.download__details{opacity:0.75}"},4942:function(e,n,t){function r(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}t.d(n,{Z:function(){return r}})}}]);