index of
/
home
/
thefkyzp
/
hulmvisaadvisor.com
/
wp-content
/
plugins
/
surecart
/
dist
/
File: /home/thefkyzp/hulmvisaadvisor.com/wp-content/plugins/surecart/dist/2556.js
"use strict";(self.webpackChunk_surecart_surecart=self.webpackChunk_surecart_surecart||[]).push([[2556],{448:function(e,t,r){r.d(t,{a:function(){return d},b:function(){return u},g:function(){return l}});var n=r(4942),o=r(885);function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function a(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?i(Object(r),!0).forEach((function(t){(0,n.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function s(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return c(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?c(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},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 i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function u(e){for(var t,r="",n=Object.entries(e);t=n.shift();){var i=t,a=(0,o.Z)(i,2),c=a[0],u=a[1];if(Array.isArray(u)||u&&u.constructor===Object){var l,d=s(Object.entries(u).reverse());try{for(d.s();!(l=d.n()).done;){var f=(0,o.Z)(l.value,2),p=f[0],h=f[1];n.unshift(["".concat(c,"[").concat(p,"]"),h])}}catch(e){d.e(e)}finally{d.f()}}else void 0!==u&&(null===u&&(u=""),r+="&"+[c,u].map(encodeURIComponent).join("="))}return r.substr(1)}function l(e){return(function(e){var t;try{t=new URL(e,"http://example.com").search.substring(1)}catch(e){}if(t)return t}(e)||"").replace(/\+/g,"%20").split("&").reduce((function(e,t){var r=t.split("=").filter(Boolean).map(decodeURIComponent),n=(0,o.Z)(r,2),i=n[0],s=n[1],c=void 0===s?"":s;return i&&function(e,t,r){for(var n=t.length,o=n-1,i=0;i<n;i++){var s=t[i];!s&&Array.isArray(e)&&(s=e.length.toString());var c=!isNaN(Number(t[i+1]));e[s]=i===o?r:e[s]||(c?[]:{}),Array.isArray(e[s])&&!c&&(e[s]=a({},e[s])),e=e[s]}}(e,i.replace(/\]/g,"").split("["),c),e}),{})}function d(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0;if(!t||!Object.keys(t).length)return e;var r=e,n=e.indexOf("?");return-1!==n&&(t=Object.assign(l(e),t),r=r.substr(0,n)),r+"?"+u(t)}},930:function(e,t,r){r.d(t,{a:function(){return W},h:function(){return F}});var n=r(5861),o=r(5987),i=r(885),a=r(4942),s=r(1284),c=r.n(s),u=r(448),l=["rest_route"],d=["path","url"],f=["url","path","data","parse"];function p(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return h(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?h(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},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 i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function h(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function v(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function g(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?v(Object(r),!0).forEach((function(t){(0,a.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):v(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var y=function(e,t){var r,n,o=e.path;return"string"==typeof e.namespace&&"string"==typeof e.endpoint&&(r=e.namespace.replace(/^\/|\/$/g,""),o=(n=e.endpoint.replace(/^\//,""))?r+"/"+n:r),delete e.namespace,delete e.endpoint,t(g(g({},e),{},{path:o}))};function w(e){for(var t,r="",n=Object.entries(e);t=n.shift();){var o=t,a=(0,i.Z)(o,2),s=a[0],c=a[1];if(Array.isArray(c)||c&&c.constructor===Object){var u,l=p(Object.entries(c).reverse());try{for(l.s();!(u=l.n()).done;){var d=(0,i.Z)(u.value,2),f=d[0],h=d[1];n.unshift(["".concat(s,"[").concat(f,"]"),h])}}catch(e){l.e(e)}finally{l.f()}}else void 0!==c&&(null===c&&(c=""),r+="&"+[s,c].map(encodeURIComponent).join("="))}return r.substr(1)}function b(e){return(function(e){var t;try{t=new URL(e,"http://example.com").search.substring(1)}catch(e){}if(t)return t}(e)||"").replace(/\+/g,"%20").split("&").reduce((function(e,t){var r=t.split("=").filter(Boolean).map(decodeURIComponent),n=(0,i.Z)(r,2),o=n[0],a=n[1],s=void 0===a?"":a;return o&&function(e,t,r){for(var n=t.length,o=n-1,i=0;i<n;i++){var a=t[i];!a&&Array.isArray(e)&&(a=e.length.toString()),a=["__proto__","constructor","prototype"].includes(a)?a.toUpperCase():a;var s=!isNaN(Number(t[i+1]));e[a]=i===o?r:e[a]||(s?[]:{}),Array.isArray(e[a])&&!s&&(e[a]=g({},e[a])),e=e[a]}}(e,o.replace(/\]/g,"").split("["),s),e}),Object.create(null))}function m(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0;if(!t||!Object.keys(t).length)return e;var r=e,n=e.indexOf("?");return-1!==n&&(t=Object.assign(b(e),t),r=r.substr(0,n)),r+"?"+w(t)}function O(e,t){return void 0!==function(e,t){return b(e)[t]}(e,t)}function _(e){var t=e.split("?"),r=t[1],n=t[0];return r?n+"?"+r.split("&").map((function(e){return e.split("=")})).map((function(e){return e.map(decodeURIComponent)})).sort((function(e,t){return e[0].localeCompare(t[0])})).map((function(e){return e.map(encodeURIComponent)})).map((function(e){return e.join("=")})).join("&"):n}function j(e,t){return Promise.resolve(t?e.body:new window.Response(JSON.stringify(e.body),{status:200,statusText:"OK",headers:e.headers}))}var x=function(e){return e.json?e.json():Promise.reject(e)},k=function(e){return function(e){if(!e)return{};var t=e.match(/<([^>]+)>; rel="next"/);return t?{next:t[1]}:{}}(e.headers.get("link")).next},P=function(e){var t=!!e.path&&-1!==e.path.indexOf("per_page=-1"),r=!!e.url&&-1!==e.url.indexOf("per_page=-1");return t||r},S=function(){var e=(0,n.Z)(c().mark((function e(t,r){var n,i,a,s,u,l;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!1!==t.parse){e.next=2;break}return e.abrupt("return",r(t));case 2:if(P(t)){e.next=4;break}return e.abrupt("return",r(t));case 4:return e.next=6,W(g(g({},(f={per_page:100},void 0,void 0,p=(c=t).path,h=c.url,g(g({},(0,o.Z)(c,d)),{},{url:h&&m(h,f),path:p&&m(p,f)}))),{},{parse:!1}));case 6:return n=e.sent,e.next=9,x(n);case 9:if(i=e.sent,Array.isArray(i)){e.next=12;break}return e.abrupt("return",i);case 12:if(a=k(n)){e.next=15;break}return e.abrupt("return",i);case 15:s=[].concat(i);case 16:if(!a){e.next=27;break}return e.next=19,W(g(g({},t),{},{path:void 0,url:a,parse:!1}));case 19:return u=e.sent,e.next=22,x(u);case 22:l=e.sent,s=s.concat(l),a=k(u),e.next=16;break;case 27:return e.abrupt("return",s);case 28:case"end":return e.stop()}var c,f,p,h}),e)})));return function(_x,t){return e.apply(this,arguments)}}(),A=new Set(["PATCH","PUT","DELETE"]),Z=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return t?204===e.status?null:e.json?e.json():Promise.reject(e):e},E=function(e){var t={code:"invalid_json",message:wp.i18n.__("The response is not a valid JSON response.")};if(!e||!e.json)throw t;return e.json().catch((function(){throw t}))},T=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return Promise.resolve(Z(e,t)).catch((function(e){return C(e,t)}))};function C(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(!t)throw e;return E(e).then((function(e){var t={code:"unknown_error",message:wp.i18n.__("An unknown error occurred.")};throw e||t}))}var D,I,R,L,M,U,N,q={Accept:"application/json, */*;q=0.1"},z={credentials:"include"},H=[function(e,t){return"string"!=typeof e.url||O(e.url,"_locale")||(e.url=m(e.url,{_locale:"user"})),"string"!=typeof e.path||O(e.path,"_locale")||(e.path=m(e.path,{_locale:"user"})),t(e)},y,function(e,t){var r=e.method,n=void 0===r?"GET":r;return A.has(n.toUpperCase())&&(e=g(g({},e),{},{headers:g(g({},e.headers),{},{"X-HTTP-Method-Override":n,"Content-Type":"application/json"}),method:"POST"})),t(e)},S],B=function(e){if(e.status>=200&&e.status<300)return e;throw e},J=function(e){var t=e.url,r=e.path,n=e.data,i=e.parse,a=void 0===i||i,s=(0,o.Z)(e,f),c=e.body,u=e.headers;return u=g(g({},q),u),n&&(c=JSON.stringify(n),u["Content-Type"]="application/json"),window.fetch(t||r||window.location.href,g(g(g({},z),s),{},{body:c,headers:u})).then((function(e){return Promise.resolve(e).then(B).catch((function(e){return C(e,a)})).then((function(e){return T(e,a)}))}),(function(e){if(e&&"AbortError"===e.name)throw e;throw{code:"fetch_error",message:wp.i18n.__("You are probably offline.")}}))};function W(e){return H.reduceRight((function(e,t){return function(r){return t(r,e)}}),J)(e).catch((function(t){return"rest_cookie_invalid_nonce"!==t.code?Promise.reject(t):window.fetch(W.nonceEndpoint).then(B).then((function(e){return e.text()})).then((function(t){return W.nonceMiddleware.nonce=t,W(e)}))}))}W.use=function(e){H.unshift(e)},W.setFetchHandler=function(e){J=e},W.createNonceMiddleware=function(e){var t=function e(t,r){var n=t.headers,o=void 0===n?{}:n;for(var i in o)if("x-wp-nonce"===i.toLowerCase()&&o[i]===e.nonce)return r(t);return r(g(g({},t),{},{headers:g(g({},o),{},{"X-WP-Nonce":e.nonce})}))};return t.nonce=e,t},W.createPreloadingMiddleware=function(e){var t=Object.fromEntries(Object.entries(e).map((function(e){var t=(0,i.Z)(e,2),r=t[0],n=t[1];return[_(r),n]})));return function(e,r){var n=e.parse,i=void 0===n||n,a=e.path;if(!a&&e.url){var s=b(e.url),c=s.rest_route,u=(0,o.Z)(s,l);"string"==typeof c&&(a=m(c,u))}if("string"!=typeof a)return r(e);var d=e.method||"GET",f=_(a);if("GET"===d&&t[f]){var p=t[f];return delete t[f],j(p,!!i)}if("OPTIONS"===d&&t[d]&&t[d][f]){var h=t[d][f];return delete t[d][f],j(h,!!i)}return r(e)}},W.createRootURLMiddleware=function(e){return function(t,r){return y(t,(function(t){var n,o=t.url,i=t.path;return"string"==typeof i&&(n=e,-1!==e.indexOf("?")&&(i=i.replace("?","&")),i=i.replace(/^\//,""),"string"==typeof n&&-1!==n.indexOf("?")&&(i=i.replace("?","&")),o=n+i),r(g(g({},t),{},{url:o}))}))}},W.fetchAllMiddleware=S,W.mediaUploadMiddleware=function(e,t){if(!function(e){var t=!!e.method&&"POST"===e.method;return(!!e.path&&-1!==e.path.indexOf("/wp/v2/media")||!!e.url&&-1!==e.url.indexOf("/wp/v2/media"))&&t}(e))return t(e);var r=0,n=function e(n){return r++,t({path:"/wp/v2/media/".concat(n,"/post-process"),method:"POST",data:{action:"create-image-subsizes"},parse:!1}).catch((function(){return r<5?e(n):(t({path:"/wp/v2/media/".concat(n,"?force=true"),method:"DELETE"}),Promise.reject())}))};return t(g(g({},e),{},{parse:!1})).catch((function(t){var r=t.headers.get("x-wp-upload-attachment-id");return t.status>=500&&t.status<600&&r?n(r).catch((function(){return!1!==e.parse?Promise.reject({code:"post_process",message:wp.i18n.__("Media upload failed. If this is a photo or a large image, please scale it down and try again.")}):Promise.reject(t)})):C(t,e.parse)})).then((function(t){return T(t,e.parse)}))},W.fetchAllMiddleware=null,W.use(W.createRootURLMiddleware((null===(I=null===(D=null===window||void 0===window?void 0:window.parent)||void 0===D?void 0:D.scData)||void 0===I?void 0:I.root_url)||(null===(R=null===window||void 0===window?void 0:window.scData)||void 0===R?void 0:R.root_url))),(null===(L=null===window||void 0===window?void 0:window.scData)||void 0===L?void 0:L.nonce)&&(W.nonceMiddleware=W.createNonceMiddleware(null===(M=null===window||void 0===window?void 0:window.scData)||void 0===M?void 0:M.nonce),W.use(W.nonceMiddleware)),(null===(U=null===window||void 0===window?void 0:window.scData)||void 0===U?void 0:U.nonce_endpoint)&&(W.nonceEndpoint=null===(N=null===window||void 0===window?void 0:window.scData)||void 0===N?void 0:N.nonce_endpoint),W.use((function(e,t){return e.path=(0,u.a)(e.path,{t:Date.now()}),t(e)}));var X=function(e){var t={code:"invalid_json",message:wp.i18n.__("The response is not a valid JSON response.","surecart")};if((null==e?void 0:e.code)&&(null==e?void 0:e.message))throw e;if(!e||!e.json)throw t;return e.json().catch((function(){throw t}))},F=function(){var e=(0,n.Z)(c().mark((function e(t){var r;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,X(t);case 2:if("rest_cookie_invalid_nonce"===(r=e.sent).code){e.next=5;break}throw r;case 5:return e.abrupt("return",window.fetch(W.nonceEndpoint).then((function(e){if(e.status>=200&&e.status<300)return e;throw e})).then((function(e){return e.text()})).then((function(e){W.nonceMiddleware.nonce=e})));case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},6455:function(e,t,r){r.d(t,{o:function(){return n}});var n=function(e,t){new window.IntersectionObserver((function(e,r){e[0].intersectionRatio>0&&(t(),r.unobserve(e[0].target))})).observe(e)}},2556:function(e,t,r){r.r(t),r.d(t,{sc_orders_list:function(){return y}});var n=r(9062),o=r(1002),i=r(4942),a=r(5861),s=r(5671),c=r(3144),u=r(1284),l=r.n(u),d=r(8860),f=r(930),p=r(6455),h=r(448);function v(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function g(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?v(Object(r),!0).forEach((function(t){(0,i.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):v(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var y=function(){function e(t){(0,s.Z)(this,e),(0,d.r)(this,t),this.query={page:1,per_page:10},this.allLink=void 0,this.heading=void 0,this.isCustomer=void 0,this.orders=[],this.loading=void 0,this.busy=void 0,this.error=void 0,this.pagination={total:0,total_pages:0}}var t,r,i;return(0,c.Z)(e,[{key:"componentWillLoad",value:function(){var e=this;(0,p.o)(this.el,(function(){e.initialFetch()}))}},{key:"initialFetch",value:(i=(0,a.Z)(l().mark((function e(){return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,this.loading=!0,e.next=4,this.getOrders();case 4:e.next=10;break;case 6:e.prev=6,e.t0=e.catch(0),console.error(this.error),this.error=(null===e.t0||void 0===e.t0?void 0:e.t0.message)||wp.i18n.__("Something went wrong","surecart");case 10:return e.prev=10,this.loading=!1,e.finish(10);case 13:case"end":return e.stop()}}),e,this,[[0,6,10,13]])}))),function(){return i.apply(this,arguments)})},{key:"fetchOrders",value:(r=(0,a.Z)(l().mark((function e(){return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,this.busy=!0,e.next=4,this.getOrders();case 4:e.next=10;break;case 6:e.prev=6,e.t0=e.catch(0),console.error(this.error),this.error=(null===e.t0||void 0===e.t0?void 0:e.t0.message)||wp.i18n.__("Something went wrong","surecart");case 10:return e.prev=10,this.busy=!1,e.finish(10);case 13:case"end":return e.stop()}}),e,this,[[0,6,10,13]])}))),function(){return r.apply(this,arguments)})},{key:"getOrders",value:(t=(0,a.Z)(l().mark((function e(){var t;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.isCustomer){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,(0,f.a)({path:(0,h.a)("surecart/v1/orders/",g({expand:["checkout","checkout.line_items","checkout.charge"]},this.query)),parse:!1});case 4:return e.next=6,e.sent;case 6:return t=e.sent,this.pagination={total:parseInt(t.headers.get("X-WP-Total")),total_pages:parseInt(t.headers.get("X-WP-TotalPages"))},e.next=10,t.json();case 10:return this.orders=e.sent,e.abrupt("return",this.orders);case 12:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"nextPage",value:function(){this.query.page=this.query.page+1,this.fetchOrders()}},{key:"prevPage",value:function(){this.query.page=this.query.page-1,this.fetchOrders()}},{key:"renderStatusBadge",value:function(e){var t=e.status,r=e.checkout.charge;if(r&&"object"===(0,o.Z)(r)){if(null==r?void 0:r.fully_refunded)return(0,d.h)("sc-tag",{type:"danger"},wp.i18n.__("Refunded","surecart"));if(null==r?void 0:r.refunded_amount)return(0,d.h)("sc-tag",{type:"info"},wp.i18n.__("Partially Refunded","surecart"))}return(0,d.h)("sc-order-status-badge",{status:t})}},{key:"renderLoading",value:function(){return(0,d.h)("sc-card",{noPadding:!0},(0,d.h)("sc-stacked-list",null,(0,d.h)("sc-stacked-list-row",{style:{"--columns":"4"},"mobile-size":500},(0,n.Z)(Array(4)).map((function(){return(0,d.h)("sc-skeleton",{style:{width:"100px",display:"inline-block"}})})))))}},{key:"renderEmpty",value:function(){return(0,d.h)("div",null,(0,d.h)("sc-divider",{style:{"--spacing":"0"}}),(0,d.h)("slot",{name:"empty"},(0,d.h)("sc-empty",{icon:"shopping-bag"},wp.i18n.__("You don't have any orders.","surecart"))))}},{key:"renderList",value:function(){var e=this;return this.orders.map((function(t){var r,n,o=t.checkout,i=t.created_at,a=t.id;if(!o)return null;var s=o.line_items,c=o.amount_due,u=o.currency,l=o.charge;return(0,d.h)("sc-stacked-list-row",{href:(0,h.a)(window.location.href,{action:"show",model:"order",id:a}),style:{"--columns":"4"},"mobile-size":500},(0,d.h)("div",null,"string"!=typeof l&&(0,d.h)("sc-format-date",{class:"order__date",date:1e3*((null==l?void 0:l.created_at)||i),month:"short",day:"numeric",year:"numeric"})),(0,d.h)("div",null,(0,d.h)("sc-text",{truncate:!0,style:{"--color":"var(--sc-color-gray-500)"}},wp.i18n.sprintf(wp.i18n._n("%s item","%s items",(null===(r=null==s?void 0:s.pagination)||void 0===r?void 0:r.count)||0,"surecart"),(null===(n=null==s?void 0:s.pagination)||void 0===n?void 0:n.count)||0))),(0,d.h)("div",{class:"orders-list__status"},e.renderStatusBadge(t),(0,d.h)("sc-order-shipment-badge",{status:null==t?void 0:t.shipment_status})),(0,d.h)("div",null,(0,d.h)("sc-format-number",{type:"currency",currency:u,value:c})))}))}},{key:"renderContent",value:function(){var e;return this.loading?this.renderLoading():0===(null===(e=this.orders)||void 0===e?void 0:e.length)?this.renderEmpty():(0,d.h)("sc-card",{"no-padding":!0},(0,d.h)("sc-stacked-list",null,this.renderList()))}},{key:"render",value:function(){var e,t,r=this;return(0,d.h)("sc-dashboard-module",{class:"orders-list",error:this.error},(0,d.h)("span",{slot:"heading"},(0,d.h)("slot",{name:"heading"},this.heading||wp.i18n.__("Order History","surecart"))),!!this.allLink&&!!(null===(e=this.orders)||void 0===e?void 0:e.length)&&(0,d.h)("sc-button",{type:"link",href:this.allLink,slot:"end","aria-label":wp.i18n.sprintf(wp.i18n.__("View all %s","surecart"),this.heading||wp.i18n.__("Order History","surecart"))},wp.i18n.__("View all","surecart"),(0,d.h)("sc-icon",{"aria-hidden":"true",name:"chevron-right",slot:"suffix"})),this.renderContent(),!this.allLink&&(0,d.h)("sc-pagination",{page:this.query.page,perPage:this.query.per_page,total:this.pagination.total,totalPages:this.pagination.total_pages,totalShowing:null===(t=null==this?void 0:this.orders)||void 0===t?void 0:t.length,onScNextPage:function(){return r.nextPage()},onScPrevPage:function(){return r.prevPage()}}),this.busy&&(0,d.h)("sc-block-ui",null))}},{key:"el",get:function(){return(0,d.a)(this)}}]),e}();y.style=":host{display:block}.orders-list{display:grid;gap:0.75em}.orders-list__status{display:flex;align-items:center;gap:var(--sc-spacing-x-small)}.orders-list__heading{display:flex;flex-wrap:wrap;align-items:flex-end;justify-content:space-between}.orders-list__title{font-size:var(--sc-font-size-x-large);font-weight:var(--sc-font-weight-bold);line-height:var(--sc-line-height-dense)}.orders-list a{text-decoration:none;font-weight:var(--sc-font-weight-semibold);display:inline-flex;align-items:center;gap:0.25em;color:var(--sc-color-primary-500)}.order__row{color:var(--sc-color-gray-800);text-decoration:none;display:grid;align-items:center;justify-content:space-between;gap:0;grid-template-columns:1fr 1fr 1fr auto;margin:0;padding:var(--sc-spacing-small) var(--sc-spacing-large)}.order__row:not(:last-child){border-bottom:1px solid var(--sc-color-gray-200)}.order__row:hover{background:var(--sc-color-gray-50)}.order__date{font-weight:var(--sc-font-weight-semibold)}"},4942:function(e,t,r){function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}r.d(t,{Z:function(){return n}})},5987:function(e,t,r){r.d(t,{Z:function(){return o}});var n=r(3366);function o(e,t){if(null==e)return{};var r,o,i=(0,n.Z)(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)r=a[o],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}},3366:function(e,t,r){function n(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}r.d(t,{Z:function(){return n}})}}]);