1import{a as Y,b as L}from"./chunk-4HDFXJSI.js";import{a as W}from"./chunk-5T5KH5GO.js";import"./chunk-HKB345IR.js";import"./chunk-TBIG3J5Q.js";import"./chunk-QE2EB3MU.js";import"./chunk-S43XRXZW.js";import{a as A,b as U}from"./chunk-2HJND7JX.js";import"./chunk-XYUW7X7Y.js";import"./chunk-36WATGJX.js";import"./chunk-BS7LYS7J.js";import"./chunk-ZODBMDVC.js";import{d as B,l as j}from"./chunk-64XQRBXT.js";import"./chunk-VKXFJRUQ.js";import"./chunk-WY3TPGUQ.js";import"./chunk-GUSXJSAP.js";import"./chunk-E2DUAA55.js";import"./chunk-PG3N3OH3.js";import"./chunk-OH3XPIE7.js";import"./chunk-FZAHKTAU.js";import{k as F,l as P}from"./chunk-SJGRCHOO.js";import"./chunk-HDAOBKSU.js";import"./chunk-LWPJTN3K.js";import{H as V,Y as $}from"./chunk-QFFG7T2F.js";import"./chunk-UUDOJHC4.js";import"./chunk-GSODPBCU.js";import"./chunk-OYATTVDC.js";import"./chunk-BKYS2XZ2.js";import"./chunk-WUHLWO3B.js";import"./chunk-UB3W44UE.js";import{sa as N}from"./chunk-KQPWQIEB.js";import"./chunk-FPPZ4BUR.js";import{$a as v,Ad as i,Bd as c,Cd as x,Dd as k,Ed as D,G as I,Ib as O,Ja as C,Mc as m,Ob as a,Oc as p,Rc as S,Sc as b,Tc as M,Uc as o,Vc as t,Wc as g,be as h,de as _,fc as T,ld as s,ne as E,w as y}from"./chunk-GBGS7SLL.js";import"./chunk-DAZ3MHQI.js";import"./chunk-JQE4WEKA.js";import"./chunk-QHBN7R45.js";import"./chunk-WYFIINDB.js";import"./chunk-XFB3PWAV.js";var q=(e,r)=>r.productId+(r.variantId??"");function R(e,r){e&1&&(o(0,"div",0),g(1,"mat-spinner",3),t())}function z(e,r){if(e&1&&(o(0,"div",1)(1,"div",4)(2,"mat-icon",5),i(3,"error"),t()(),o(4,"h1",6),i(5,"Something Went Wrong"),t(),o(6,"p",7),i(7),t(),o(8,"a",8),i(9,"Back to Shop"),t()()),e&2){let n=s();a(7),c(n.error())}}function G(e,r){if(e&1&&(o(0,"p",30),i(1),t()),e&2){let n=s().$implicit;a(),c(n.variantName)}}function H(e,r){if(e&1&&(o(0,"li",17)(1,"div",24)(2,"p",29),i(3),t(),m(4,G,2,1,"p",30),t(),o(5,"div",31)(6,"span",32),i(7),h(8,"currency"),t()()()),e&2){let n=r.$implicit,l=s();a(3),x(" ",n.productName," "),a(),p(n.variantName?4:-1),a(3),k(" ",n.quantity," \xD7 ",_(8,4,n.unitPrice,l.currency)," ")}}function J(e,r){if(e&1&&(o(0,"div",19)(1,"span"),i(2,"Shipping"),t(),o(3,"span"),i(4),h(5,"currency"),t()()),e&2){let n=s();a(4),c(_(5,1,n.shippingCost,n.currency))}}function K(e,r){if(e&1&&(o(0,"div",19)(1,"span"),i(2,"Tax"),t(),o(3,"span"),i(4),h(5,"currency"),t()()),e&2){let n=s();a(4),c(_(5,1,n.tax,n.currency))}}function Q(e,r){if(e&1&&(g(0,"br"),i(1)),e&2){let n=s();a(),x("",n.street2," ")}}function X(e,r){if(e&1&&(o(0,"div",14)(1,"div",22)(2,"mat-icon",23),i(3,"local_shipping"),t(),o(4,"div",24)(5,"strong",25),i(6,"Shipping To"),t(),o(7,"p",33),i(8),g(9,"br"),i(10),m(11,Q,2,1),g(12,"br"),i(13),t()()()()),e&2){let n=r;a(8),x(" ",n.name),a(2),x(" ",n.street1," "),a(),p(n.street2?11:-1),a(2),D(" ",n.city,", ",n.state," ",n.postalCode," ")}}function Z(e,r){if(e&1&&(o(0,"a",38)(1,"mat-icon"),i(2,"download"),t(),i(3),t()),e&2){let n=s().$implicit;M("href",n.digitalDownloadUrl,O),a(3),x(" ",n.digitalFileName||n.productName," ")}}function ee(e,r){if(e&1&&m(0,Z,4,2,"a",38),e&2){let n=r.$implicit;p(n.digitalDownloadUrl?0:-1)}}function te(e,r){if(e&1&&(o(0,"div",14)(1,"div",22)(2,"mat-icon",34),i(3,"download"),t(),o(4,"div",35)(5,"strong",25),i(6,"Your Downloads"),t(),o(7,"p",36),i(8," Your digital files are ready. Download links are also available in your confirmation email. "),t(),o(9,"div",37),S(10,ee,1,1,null,null,q),t()()()()),e&2){let n=s();a(10),b(n.items)}}function ie(e,r){e&1&&i(0," You'll receive an email confirmation shortly. The shop owner will prepare your order and you'll be notified when it ships. ")}function ne(e,r){e&1&&i(0," You'll receive an email confirmation shortly with your order details. ")}function oe(e,r){if(e&1&&(o(0,"div",2)(1,"div",9)(2,"div",10)(3,"mat-icon",11),i(4,"check_circle"),t()(),o(5,"h1",12),i(6," Order Confirmed! "),t(),o(7,"p",13),i(8),t(),o(9,"div",14)(10,"strong",15),i(11,"Order Summary"),t(),o(12,"ul",16),S(13,H,9,7,"li",17,q),t(),o(15,"div",18)(16,"div",19)(17,"span"),i(18,"Subtotal"),t(),o(19,"span"),i(20),h(21,"currency"),t()(),m(22,J,6,4,"div",19),m(23,K,6,4,"div",19),o(24,"div",20)(25,"span"),i(26,"Total"),t(),o(27,"span"),i(28),h(29,"currency"),t()()()(),m(30,X,14,6,"div",14),m(31,te,12,0,"div",14),o(32,"div",21)(33,"div",22)(34,"mat-icon",23),i(35," info "),t(),o(36,"div",24)(37,"strong",25),i(38,"What happens next?"),t(),o(39,"p",26),m(40,ie,1,0)(41,ne,1,0),t()()()(),o(42,"div",27)(43,"a",28),i(44," Continue Shopping "),t()()()()),e&2){let n,l=r,d=s();
1a(8),x(" Thank you for your purchase from ",d.shopName(),". "),a(5),b(l.items),a(7),c(_(21,8,l.subtotal,l.currency)),a(2),p(l.shippingCost?22:-1),a(),p(l.tax?23:-1),a(5),c(_(29,11,l.total,l.currency)),a(2),p((n=l.shippingAddress)?30:-1,n),a(),p(d.hasDigitalItems()?31:-1),a(9),p(l.shippingAddress?40:41)}}var ve=(()=>{let r=class r{constructor(){this.route=C(V),this.shopView=C(Y),this.orderService=C(W),this.cart=C(L),this.order=v(null),this.loading=v(!0),this.error=v(null),this.shop=this.shopView.shop,this.shopName=E(()=>this.shop()?.shopName??"the shop"),this.hasDigitalItems=E(()=>this.order()?.items.some(l=>!!l.digitalDownloadUrl)??!1)}ngOnInit(){this.cart.clearCart(),this.loadOrder()}async loadOrder(){let l=this.shopView.shopId(),d=this.route.snapshot.queryParamMap.get("session_id");if(!l||!d){this.error.set("Order details are unavailable."),this.loading.set(!1);return}let f=5;for(let u=0;u<f;u++){try{let w=await y(this.orderService.getOrderBySessionId$(l,d));if(w){this.order.set(w),this.loading.set(!1);return}}catch{}u<f-1&&await y(I(2e3))}this.error.set("We could not find your order. Please check your email for a confirmation."),this.loading.set(!1)}};r.\u0275fac=function(d){return new(d||r)},r.\u0275cmp=T({type:r,selectors:[["ark-shop-order-confirmation"]],decls:3,vars:1,consts:[[1,"flex","items-center","justify-center","py-24"],[1,"max-w-lg","px-4","py-12","mx-auto","text-center"],[1,"max-w-lg","px-4","py-12","mx-auto"],["diameter","48"],[1,"inline-flex","items-center","justify-center","w-16","h-16","mb-4","bg-red-100","rounded-full"],[1,"text-red-600","mat-icon-2xl"],[1,"mb-2","text-2xl","font-extrabold","text-gray-900"],[1,"mb-6","text-base","text-gray-600"],["mat-flat-button","","color","primary","routerLink","../"],[1,"p-5","text-center","bg-white","border","border-gray-200","border-solid","sm:p-8","rounded-xl"],[1,"inline-flex","items-center","justify-center","w-16","h-16","mb-4","rounded-full","bg-emerald-100"],[1,"mat-icon-2xl","text-emerald-600"],[1,"mb-2","text-2xl","font-extrabold","text-gray-900","sm:text-3xl"],[1,"mb-6","text-base","text-gray-600","sm:text-lg"],[1,"p-3","mb-4","text-left","rounded-lg","sm:p-4","bg-gray-50"],[1,"text-sm","tracking-wide","text-gray-500","uppercase"],[1,"pl-0","mt-3","divide-y","divide-gray-200"],[1,"flex","items-center","justify-between","py-2"],[1,"pt-3","mt-3","space-y-1","border-t","border-gray-200"],[1,"flex","justify-between","text-sm","text-gray-600"],[1,"flex","justify-between","text-base","font-semibold","text-gray-900"],[1,"p-3","mb-6","text-left","rounded-lg","sm:p-4","sm:mb-8","bg-gray-50"],[1,"flex","items-start","gap-3"],[1,"text-blue-600","shrink-0"],[1,"min-w-0"],[1,"text-gray-900"],[1,"mt-1","text-sm","text-gray-600","sm:text-base"],[1,"space-y-3"],["mat-flat-button","","color","primary","routerLink","../",1,"w-full"],[1,"text-sm","font-medium","text-gray-900","truncate"],[1,"text-xs","text-gray-500"],[1,"ml-4","text-right","shrink-0"],[1,"text-sm","text-gray-600"],[1,"mt-1","text-sm","text-gray-600"],[1,"text-emerald-600","shrink-0"],[1,"w-full","min-w-0"],[1,"mt-1","mb-3","text-sm","text-gray-600"],[1,"space-y-2"],["mat-stroked-button","","target","_blank","rel","noopener noreferrer",1,"justify-start","w-full",3,"href"]],template:function(d,f){if(d&1&&m(0,R,2,0,"div",0)(1,z,10,1,"div",1)(2,oe,45,14,"div",2),d&2){let u;p(f.loading()?0:f.error()?1:(u=f.order())?2:-1,u)}},dependencies:[j,B,P,F,U,A,$,N],encapsulation:2});let e=r;return e})();export{ve as ShopOrderConfirmationComponent};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.