PageSourceSearch

https://hou.la/chunk-KEOTDTSB.js

js hou.la collected 2026-10-02 16:00:02 UTC 121,591 bytes, 3 lines download raw bytes

1import{a as tt}from"./chunk-JOZUM3MV.js";import{a as $e}from"./chunk-QKDLWAJW.js";import"./chunk-HHMWGWAM.js";import{a as et}from"./chunk-PZJVX6OJ.js";import"./chunk-BYXBJQAS.js";import{a as Je,b as Xe}from"./chunk-FD7EBVCO.js";import{a as Ze}from"./chunk-PCQZQ3U4.js";import{a as qe,b as Qe}from"./chunk-7D3HORSI.js";import"./chunk-ZVCHMNXO.js";import{a as ze,b as Ke}from"./chunk-22WJKAIZ.js";import{b as Ye}from"./chunk-SLWPYULI.js";import{a as Ae,b as we}from"./chunk-LKSO5KD5.js";import{a as be,b as Ie}from"./chunk-6S5SATLI.js";import{b as De,c as Ne}from"./chunk-RPDGXIQT.js";import"./chunk-RFHORXFH.js";import{a as Ve,b as ke}from"./chunk-44BDWJO3.js";import"./chunk-YPSMJDVJ.js";import"./chunk-F6HJUGGY.js";import{a as Ge,b as Be}from"./chunk-W6FQLWKF.js";import"./chunk-6MXSXX3N.js";import"./chunk-MT62CIDI.js";import{a as Se,b as Ee}from"./chunk-SFNFCOZS.js";import{a as He,b as Le}from"./chunk-BXNQRMY5.js";import"./chunk-RFCDL6VX.js";import"./chunk-XWDSR7V3.js";import{a as Te,b as Pe}from"./chunk-OAED5FIG.js";import{a as fe,b as Oe}from"./chunk-P37GQ53N.js";import{b as Ue,c as Fe}from"./chunk-NZ226J7R.js";import"./chunk-7EBKYMB6.js";import"./chunk-YK3HMHC4.js";import"./chunk-2DRXLVRR.js";import{d as Me,e as ye}from"./chunk-OFHUO5H7.js";import"./chunk-M3XSAKW4.js";import"./chunk-H76LZNGX.js";import"./chunk-PGR2NPNS.js";import"./chunk-OZD37XM5.js";import"./chunk-DLIVM562.js";import"./chunk-CV2ZWZQE.js";import"./chunk-AVEXXPAT.js";import{ja as ve}from"./chunk-FHU4TM37.js";import"./chunk-32B64V2R.js";import"./chunk-3XLVKQRY.js";import"./chunk-DJ5AJG3T.js";import"./chunk-SLPC3Y4V.js";import"./chunk-XIRWNEM2.js";import"./chunk-AAORKXGN.js";import"./chunk-KDGXQRVY.js";import{a as We}from"./chunk-DLKM2IVF.js";import{a as je}from"./chunk-UUEFXD6N.js";import{D as xe,c as ge,g as Ce,l as he}from"./chunk-Q2KKZV5J.js";import{a as ue}from"./chunk-JICM7NVH.js";import{a as Re}from"./chunk-BD6EMWWF.js";import"./chunk-AB6CKZTE.js";import{c as K,d as _e,e as me}from"./chunk-DIGPPQJE.js";import{o as de,r as pe,s as se,x as ce}from"./chunk-EU6HCBUP.js";import"./chunk-KAJMKXZ6.js";import{A as re,C as oe,D as le,j as ee,u as te,w as ie,x as ne,z as ae}from"./chunk-ZAQTNZYS.js";import"./chunk-SRTXE2HR.js";import{Dc as O,Ec as R,Fc as M,Jb as h,Kc as w,Lb as T,Lc as k,Mb as A,Mc as z,Ob as q,Qb as Q,Rb as m,Sb as F,Ub as P,Uc as d,Vb as D,Vc as s,Wb as r,Wc as I,Xb as a,Xc as W,Yb as g,Zc as G,_a as L,ac as v,da as V,db as i,gc as f,hc as p,la as x,ma as S,nc as J,oc as X,pc as Z,sb as j,uc as l,vc as C,wc as u,xc as N,yb as E,zc as $}from"./chunk-NTTV6FWH.js";import{a as U,b as Y,g as y}from"./chunk-W7GRJBO5.js";var it=(t,n)=>`${t}::${n||""}`;function nt(t,n){let e=new Map;for(let o of t||[]){if(o.requiresShipping===!1)continue;let _=it(o.productId,o.variantId),b=e.get(_);b?b.quantity+=o.quantity:e.set(_,{productId:o.productId,variantId:o.variantId,title:o.title,quantity:o.quantity})}let c=new Map;for(let o of n||[])for(let _ of o.items||[]){let b=it(_.productId,_.variantId);c.set(b,(c.get(b)||0)+(_.quantity||0))}return[...e.entries()].map(([o,_])=>({productId:_.productId,variantId:_.variantId,title:_.title,remaining:_.quantity-(c.get(o)||0)})).filter(o=>o.remaining>0)}function at(t){switch(t){case"relay":return"MANAGER.SHOP.DELIVERY_MODE_RELAY";case"home":return"MANAGER.SHOP.DELIVERY_MODE_HOME";case"pickup":return"MANAGER.SHOP.DELIVERY_MODE_PICKUP";default:return null}}var _t=["chatWidget"],mt=t=>({count:t}),ut=t=>({date:t}),gt=t=>["/studio/messages",t],Ct=t=>["/studio/shop/orders",t],ht=t=>({platform:t}),xt=t=>({id:t}),lt=()=>({width:"450px",maxWidth:"95vw"}),H=()=>({width:"100%"}),St=()=>({width:"420px",maxWidth:"95vw"}),Et=()=>({width:"520px",maxWidth:"95vw"}),vt=()=>({width:"650px",maxWidth:"95vw"}),ft=t=>({label:t,value:"full"}),Ot=t=>({label:t,value:"partial"}),rt=(t,n)=>[t,n],Rt=t=>({label:t,value:"money"}),Mt=t=>({label:t,value:"store_credit"}),yt=()=>({width:"550px",maxWidth:"95vw"}),At=()=>({width:"100px"}),dt=()=>({width:"620px",maxWidth:"95vw"}),wt=()=>({width:"480px",maxWidth:"95vw"}),bt=(t,n)=>n.key,B=(t,n)=>n.id,It=(t,n)=>n.productId+(n.variantId||"");function Tt(t,n){if(t&1&&(r(0,"span",8),l(1),d(2,"slice"),a(),g(3,"p-tag",9)),t&2){let e=p();i(),u("#",e.order.shortCode||W(2,3,e.order.id,0,8),""),i(2),h("severity",e.getStatusSeverity(e.order.status))("value",e.getStatusLabel(e.order.status))}}function Pt(t,n){t&1&&g(0,"app-widget-loading")}function Dt(t,n){if(t&1){let e=v();r(0,"app-widget-api-error",10),f("retry",function(){x(e);let o=p();return S(o.loadOrder())}),a()}}function Nt(t,n){if(t&1&&(l(0),d(1,"translate"),d(2,"date")),t&2){let e=p(3);N(" ",s(1,2,"MANAGER.SHOP.OPEN_CART_UNTIL")," ",I(2,4,e.order.openUntil,"dd/MM/yyyy HH:mm")," ")}}function Vt(t,n){if(t&1&&(r(0,"div",64),g(1,"i",65),l(2),d(3,"translate"),a()),t&2){let e=p(3);i(2),u(" ",I(3,1,"MANAGER.SHOP.OPEN_CART_EXTENDED_COUNT",k(4,mt,e.cartExtensionCount))," ")}}function kt(t,n){if(t&1&&(r(0,"div",11)(1,"div",61)(2,"div",62),g(3,"i",63),l(4),d(5,"translate"),a(),r(6,"div",16),l(7),d(8,"translate"),E(9,Nt,3,7),a(),E(10,Vt,4,6,"div",64),a()()),t&2){let e=p(2);i(4),u(" ",s(5,4,"MANAGER.SHOP.ORDER_STATUS_OPEN_CART")," "),i(3),u(" ",s(8,6,"MANAGER.SHOP.OPEN_CART_SELLER_INFO")," "),i(2),m(e.order.openUntil?9:-1),i(),m(e.cartExtensionCount>0?10:-1)}}function Ht(t,n){if(t&1&&(r(0,"span",69),l(1),a()),t&2){let e=p(3);i(),C(e.openCartRemainingLabel)}}function Lt(t,n){t&1&&(r(0,"span",70),l(1),d(2,"translate"),a()),t&2&&(i(),C(s(2,1,"MANAGER.SHOP.OPEN_CART_CLOSING_NOW")))}function Gt(t,n){if(t&1&&(r(0,"div",18)(1,"span",16),g(2,"i",66),l(3),d(4,"translate"),a(),r(5,"span",67)(6,"span",68),l(7),d(8,"date"),a(),E(9,Ht,2,1,"span",69)(10,Lt,3,3,"span",70),a()()),t&2){let e=p(2);i(3),u(" ",s(4,3,"MANAGER.SHOP.OPEN_CART_CLOSES_AT")," "),i(4),C(I(8,5,e.openCartDeadline,"dd/MM/yyyy HH:mm")),i(2),m(e.openCartRemainingLabel?9:e.openCartOverdue?10:-1)}}function Bt(t,n){if(t&1&&l(0),t&2){let e=p(2).$implicit,c=p(2);u(" \xB7 ",c.formatItemAddedAt(e.addedAt)," ")}}function Ut(t,n){if(t&1&&(r(0,"div",71)(1,"span"),l(2),d(3,"translate"),E(4,Bt,1,1),a()()),t&2){let e=p().$implicit;i(2),u(" ",s(3,2,"MANAGER.SHOP_LIVE.ORDER_MERGED")," "),i(2),m(e.addedAt?4:-1)}}function Ft(t,n){if(t&1&&g(0,"img",73),t&2){let e=p().$implicit;h("src",e.imageUrl,L)("alt",e.title)}}function Wt(t,n){t&1&&(r(0,"div",74),g(1,"i",80),a())}function zt(t,n){if(t&1&&(r(0,"span",81),l(1),a()),t&2){let e=n.$implicit;i(),N("",e.key,": ",e.value,"")}}function Kt(t,n){if(t&1&&(r(0,"div",16),P(1,zt,2,2,"span",81,bt),d(3,"keyvalue"),a()),t&2){let e=p().$implicit;i(),D(s(3,0,e.options))}}function Yt(t,n){if(t&1&&(r(0,"div",76),g(1,"i",82),r(2,"span")(3,"span",83),l(4),d(5,"translate"),a(),r(6,"span",84),l(7),a()()()),t&2){let e=p().$implicit;i(4),C(s(5,2,"MANAGER.SHOP.ORDER_BUYER_ITEM_DESCRIPTION")),i(3),C(e.buyerItemDescription)}}function jt(t,n){if(t&1&&(r(0,"div",77),g(1,"i",85),l(2),d(3,"translate"),a()),t&2){let e=p().$implicit,c=p(2);i(2),u(" ",I(3,1,"MANAGER.SHOP.ORDER_ITEM_ADDED_AT",k(4,ut,c.formatItemAddedAt(e.addedAt)))," ")}}function qt(t,n){if(t&1&&(E(0,Ut,5,4,"div",71),r(1,"div",72),E(2,Ft,1,2,"img",73)(3,Wt,2,0,"div",74),r(4,"div",75)(5,"div",68),l(6),a(),E(7,Kt,4,2,"div",16)(8,Yt,8,4,"div",76)(9,jt,4,6,"div",77),a(),r(10,"div",78),l(11),a(),r(12,"div",79),l(13),a()()),t&2){let e=n.$implicit,c=n.$index,o=p(2);m(o.batchStartIndexes.has(c)?0:-1),i(2),m(e.imageUrl?2:3),i(4),C(e.title),i(),m(e.options?7:-1),i(),m(e.buyerItemDescription?8:-1),i(),m(o.hasMultipleBatches&&e.addedAt?9:-1),i(2),u(" x",e.quantity," "),i(2),u(" ",o.formatPrice(e.totalCents,o.order.currency)," ")}}function Qt(t,n){if(t&1&&(r(0,"span"),l(1),d(2,"translate"),a()),t&2){let e=p(4);i(),u("\xA0\xB7\xA0",s(2,1,e.deliveryModeKey(e.order)),"")}}function Jt(t,n){if(t&1&&(r(0,"span",86),l(1),E(2,Qt,3,3,"span"),l(3," )"),a()),t&2){let e=p(3);i(),u("(",e.order.shippingMethodName," "),i(),m(e.deliveryModeKey(e.order)?2:-1)}}function Xt(t,n){if(t&1&&(r(0,"div",21)(1,"span",22),l(2),d(3,"translate"),E(4,Jt,4,2,"span",86),a(),r(5,"span"),l(6),a()()),t&2){let e=p(2);i(2),u(" ",s(3,3,"MANAGER.SHOP.ORDER_SHIPPING_COST")," "),i(2),m(e.order.shippingMethodName?4:-1),i(2),C(e.formatPrice(e.order.shippingCents,e.order.currency))}}function Zt(t,n){t&1&&(r(0,"div",21)(1,"span",22),l(2),d(3,"translate"),r(4,"span",86),l(5),d(6,"translate"),a()(),r(7,"span",87),l(8),d(9,"translate"),a()()),t&2&&(i(2),u(" ",s(3,3,"MANAGER.SHOP.ORDER_SHIPPING_COST")," "),i(3),u("(",s(6,5,"MANAGER.SHOP.ORDER_LOCAL_PICKUP"),")"),i(3),C(s(9,7,"MANAGER.SHOP.ORDER_FREE")))}function $t(t,n){if(t&1&&(r(0,"span",86),l(1),d(2,"translate"),a()),t&2){let e=p(3);i(),u("(",s(2,1,e.freeShippingReasonKey(e.order)),")")}}function ei(t,n){if(t&1&&(r(0,"div",21)(1,"span",22),l(2),d(3,"translate"),E(4,$t,3,3,"span",86),a(),r(5,"span"),l(6),d(7,"translate"),a()()),t&2){let e=p(2);i(2),u(" ",s(3,3,"MANAGER.SHOP.ORDER_SHIPPING_COST")," "),i(2),m(e.freeShippingReasonKey(e.order)?4:-1),i(2),C(s(7,5,"MANAGER.SHOP.ORDER_FREE"))}}function ti(t,n){if(t&1&&(r(0,"div",21)(1,"span",22),l(2),d(3,"translate"),a(),r(4,"span"),l(5),a()()),t&2){let e=p(3);i(2),C(s(3,2,e.shippingGapCents(e.order)<0?"MANAGER.SHOP.ORDER_SHIPPING_GAP_CHARGED":"MANAGER.SHOP.ORDER_SHIPPING_GAP_CREDITED")),i(3),C(e.formatPrice(e.shippingGapCents(e.order),e.order.currency))}}function ii(t,n){if(t&1&&(r(0,"div",21)(1,"span",22),l(2),d(3,"translate"),a(),r(4,"span"),l(5),a()(),E(6,ti,6,4,"div",21)),t&2){let e=p(2);i(2),C(s(3,3,"MANAGER.SHOP.ORDER_SHIPPING_REAL_COST")),i(3),C(e.formatPrice(e.order.shippingCostRealCents,e.order.currency)),i(),m(e.shippingGapCents(e.order)!==0?6:-1)}}function ni(t,n){if(t&1&&(r(0,"span",16),g(1,"i",88),l(2),d(3,"translate"),a()),t&2){let e=p(3);i(2),C(s(3,1,"MANAGER.SHOP.ORDER_ZONE_"+e.order.shippingZone.toUpperCase()))}}function ai(t,n){if(t&1&&(r(0,"span",16),g(1,"i",89),l(2),a()),t&2){let e=p(3);i(2),C(e.order.totalWeightGrams>=1e3?(e.order.totalWeightGrams/1e3).toFixed(2)+" kg":e.order.totalWeightGrams+" g")}}function ri(t,n){t&1&&(r(0,"span",16),g(1,"i",90),l(2),d(3,"translate"),a()),t&2&&(i(2),C(s(3,1,"MANAGER.SHOP.ORDER_LOCAL_PICKUP")))}function oi(t,n){if(t&1&&(r(0,"div",23),E(1,ni,4,3,"span",16)(2,ai,3,1,"span",16)(3,ri,4,3,"span",16),a()),t&2){let e=p(2);i(),m(e.order.shippingZone?1:-1),i(),m(e.order.totalWeightGrams?2:-1),i(),m(e.order.isLocalPickup?3:-1)}}function li(t,n){if(t&1&&l(0),t&2){let e=p(4);u(" (-",e.order.promoValueSnapshot,"%) ")}}function di(t,n){if(t&1&&l(0),t&2){let e=p(4);u(" (-",e.formatPrice(e.order.promoValueSnapshot,e.order.currency),") ")}}function pi(t,n){t&1&&(l(0),d(1,"translate")),t&2&&u(" (",s(1,1,"MANAGER.SHOP.ORDER_PROMO_FREE_SHIPPING"),") ")}function si(t,n){if(t&1&&(r(0,"span",91),g(1,"i",92),l(2),E(3,li,1,1)(4,di,1,1)(5,pi,2,3),a()),t&2){let e=p(3);i(2),u(" ",e.order.promoCodeSnapshot," "),i(),m(e.order.promoTypeSnapshot==="percentage"&&e.order.promoValueSnapshot?3:e.order.promoTypeSnapshot==="fixed_amount"&&e.order.promoValueSnapshot?4:e.order.promoTypeSnapshot==="free_shipping"?5:-1)}}function ci(t,n){if(t&1&&(r(0,"div",21)(1,"span",22),l(2),d(3,"translate"),E(4,si,6,2,"span",91),a(),r(5,"span",87),l(6),a()()),t&2){let e=p(2);i(2),u(" ",s(3,3,"MANAGER.SHOP.ORDER_DISCOUNT")," "),i(2),m(e.order.promoCodeSnapshot?4:-1),i(2),u("-",e.formatPrice(e.order.discountCents,e.order.currency),"")}}function _i(t,n){t&1&&(r(0,"span",16),l(1),d(2,"translate"),d(3,"lowercase"),a()),t&2&&(i(),u("(",s(3,3,s(2,1,"MANAGER.SHOP.ORDER_STATUS_PARTIALLY_REFUNDED")),")"))}function mi(t,n){if(t&1&&(r(0,"div",21)(1,"span",16),l(2),d(3,"translate"),a(),r(4,"span",97),l(5),a()()),t&2){let e=p(3);i(2),C(s(3,2,"MANAGER.SHOP.REFUND_COMPENSATION_LABEL")),i(3),C(e.getRefundModeLabel(e.order.refundMode))}}function ui(t,n){if(t&1&&(r(0,"div",21)(1,"span",16),l(2),a(),r(3,"span",97),l(4),a()()),t&2){let e=p(3);i(2),C(e.getRefundReferenceLabel()),i(2),C(e.getRefundReferenceValue())}}function gi(t,n){if(t&1&&(r(0,"div",93)(1,"span",94),g(2,"i",95),l(3),d(4,"translate"),E(5,_i,4,5,"span",16),a(),r(6,"span",96
1),l(7),a()(),E(8,mi,6,4,"div",21)(9,ui,5,2,"div",21),r(10,"div",27)(11,"span",68),l(12),d(13,"translate"),a(),r(14,"span",68),l(15),a()()),t&2){let e=p(2);i(3),u("",s(4,7,"MANAGER.SHOP.ORDER_REFUNDED_AMOUNT")," "),i(2),m(e.order.status==="partially_refunded"?5:-1),i(2),u("-",e.formatPrice(e.order.refundedAmountCents,e.order.currency),""),i(),m(e.order.refundMode?8:-1),i(),m(e.getRefundReferenceValue()?9:-1),i(3),C(s(13,9,"MANAGER.SHOP.ORDER_NET_TOTAL")),i(3),C(e.formatPrice(e.order.totalCents-e.order.refundedAmountCents,e.order.currency))}}function Ci(t,n){if(t&1&&(r(0,"div",21)(1,"span",16),g(2,"i",98),l(3),d(4,"translate"),a(),r(5,"span",16),l(6),a()()),t&2){let e=p(2);i(3),u("",s(4,2,"MANAGER.SHOP.ORDER_STRIPE_FEE")," "),i(3),u("-",e.formatPrice(e.order.stripeFeeCents,e.order.currency),"")}}function hi(t,n){if(t&1&&(r(0,"div",99)(1,"span",22),l(2),d(3,"translate"),a(),r(4,"span",103),l(5),a()()),t&2){let e=p(3);i(2),u("",s(3,2,"MANAGER.SHOP.ORDER_CARRIER")," :"),i(3),C(e.getCarrierLabel(e.order.carrier))}}function xi(t,n){if(t&1&&(r(0,"div",99)(1,"span",22),l(2),d(3,"translate"),a(),r(4,"span",103),l(5),a()()),t&2){let e=p(3);i(2),u("",s(3,2,"MANAGER.SHOP.ORDER_TRACKING_NUMBER")," :"),i(3),C(e.order.trackingNumber)}}function Si(t,n){if(t&1&&(r(0,"a",100),g(1,"i",104),l(2),d(3,"translate"),a()),t&2){let e=p(3);h("href",e.order.trackingUrl,L),i(2),u(" ",s(3,2,"MANAGER.SHOP.ORDER_TRACKING_LINK")," ")}}function Ei(t,n){if(t&1&&(r(0,"div",101)(1,"span",22),l(2),d(3,"translate"),a(),r(4,"span",103),l(5),d(6,"date"),a()()),t&2){let e=p(3);i(2),u("",s(3,2,"MANAGER.SHOP.ORDER_ESTIMATED_DELIVERY")," :"),i(3),C(I(6,4,e.order.estimatedDeliveryAt,"dd/MM/yyyy"))}}function vi(t,n){if(t&1){let e=v();r(0,"div",102)(1,"p-button",105),d(2,"translate"),f("onClick",function(){x(e);let o=p(3);return S(o.openTrackingEdit())}),a()()}t&2&&(i(),h("label",s(2,2,"MANAGER.SHOP.ORDER_EDIT_TRACKING"))("outlined",!0))}function fi(t,n){if(t&1&&E(0,hi,6,4,"div",99)(1,xi,6,4,"div",99)(2,Si,4,4,"a",100)(3,Ei,7,7,"div",101)(4,vi,3,4,"div",102),t&2){let e=p(2);m(e.order.carrier?0:-1),i(),m(e.order.trackingNumber?1:-1),i(),m(e.order.trackingUrl?2:-1),i(),m(e.order.estimatedDeliveryAt?3:-1),i(),m(e.canEditTracking?4:-1)}}function Oi(t,n){if(t&1){let e=v();r(0,"div",102)(1,"p-button",108),d(2,"translate"),f("onClick",function(){x(e);let o=p(3);return S(o.markDelivered())}),a()()}t&2&&(i(),h("label",s(2,2,"MANAGER.SHOP.ORDER_MARK_DELIVERED"))("outlined",!0))}function Ri(t,n){if(t&1&&(r(0,"div",106),g(1,"i",107),r(2,"span"),l(3),d(4,"translate"),a()(),E(5,Oi,3,4,"div",102)),t&2){let e=p(2);i(3),C(s(4,2,"MANAGER.SHOP.ORDER_VIRTUAL_NO_SHIPPING")),i(2),m(e.canUpdateStatus?5:-1)}}function Mi(t,n){if(t&1){let e=v();r(0,"p-button",110),d(1,"translate"),f("onClick",function(){x(e);let o=p(3);return S(o.openStatusUpdate())}),a()}t&2&&h("label",s(1,2,"MANAGER.SHOP.ORDER_ADD_TRACKING"))("outlined",!0)}function yi(t,n){if(t&1&&(r(0,"p",55),l(1),d(2,"translate"),a(),E(3,Mi,2,4,"p-button",109)),t&2){let e=p(2);i(),u(" ",s(2,2,"MANAGER.SHOP.ORDER_NO_TRACKING")," "),i(2),m(e.canUpdateStatus?3:-1)}}function Ai(t,n){if(t&1&&(r(0,"div",115)(1,"span",22),l(2),d(3,"translate"),a(),r(4,"span",118),l(5),a()()),t&2){let e=p().$implicit,c=p(3);i(2),u("",s(3,2,"MANAGER.SHOP.ORDER_CARRIER")," :"),i(3),C(c.getCarrierLabel(e.carrier))}}function wi(t,n){if(t&1&&(r(0,"div",115)(1,"span",22),l(2),d(3,"translate"),a(),r(4,"span",118),l(5),a()()),t&2){let e=p().$implicit;i(2),u("",s(3,2,"MANAGER.SHOP.ORDER_TRACKING_NUMBER")," :"),i(3),C(e.trackingNumber)}}function bi(t,n){if(t&1&&(r(0,"a",116),g(1,"i",104),l(2),d(3,"translate"),a()),t&2){let e=p().$implicit;h("href",e.trackingUrl,L),i(2),u(" ",s(3,2,"MANAGER.SHOP.ORDER_TRACKING_LINK")," ")}}function Ii(t,n){if(t&1&&(r(0,"div",115)(1,"span",22),l(2),d(3,"translate"),a(),r(4,"span",118),l(5),d(6,"date"),a()()),t&2){let e=p().$implicit;i(2),u("",s(3,2,"MANAGER.SHOP.ORDER_ESTIMATED_DELIVERY")," :"),i(3),C(I(6,4,e.estimatedDeliveryAt,"dd/MM/yyyy"))}}function Ti(t,n){if(t&1&&(r(0,"span",117),l(1),a()),t&2){let e=n.$implicit,c=p(4);i(),N(" ",c.getLineItemTitle(e.productId,e.variantId)," \xD7 ",e.quantity," ")}}function Pi(t,n){if(t&1&&(r(0,"div",113)(1,"div",114)(2,"span",68),l(3),d(4,"translate"),a(),r(5,"span",16),l(6),d(7,"date"),a()(),E(8,Ai,6,4,"div",115)(9,wi,6,4,"div",115)(10,bi,4,4,"a",116)(11,Ii,7,7,"div",115),r(12,"div",112),P(13,Ti,2,2,"span",117,It),a()()),t&2){let e=n.$implicit,c=n.$index,o=p(3);T("border-bottom",c<o.order.shipments.length-1),i(3),N(" ",s(4,9,"MANAGER.SHOP.SHIPMENT_NUMBER")," ",c+1," "),i(3),C(I(7,11,e.shippedAt,"dd/MM/yyyy")),i(2),m(e.carrier?8:-1),i(),m(e.trackingNumber?9:-1),i(),m(e.trackingUrl?10:-1),i(),m(e.estimatedDeliveryAt?11:-1),i(2),D(e.items)}}function Di(t,n){if(t&1){let e=v();r(0,"div",112)(1,"p-button",119),d(2,"translate"),f("onClick",function(){x(e);let o=p(3);return S(o.openShipmentDialog())}),a()()}t&2&&(i(),h("label",s(2,2,"MANAGER.SHOP.SHIPMENT_ADD"))("outlined",!0))}function Ni(t,n){if(t&1&&(r(0,"p-panel",14),d(1,"translate"),P(2,Pi,15,14,"div",111,B),E(4,Di,3,4,"div",112),a()),t&2){let e=p(2);h("toggleable",!0)("header",s(1,3,"MANAGER.SHOP.SHIPMENTS_TITLE")),i(2),D(e.order.shipments),i(2),m(e.unshippedItems.length&&e.canUpdateStatus?4:-1)}}function Vi(t,n){if(t&1&&(r(0,"p-panel",14),d(1,"translate"),r(2,"p",120),l(3),a()()),t&2){let e=p(2);h("toggleable",!1)("header",s(1,3,"MANAGER.SHOP.ORDER_NOTES")),i(3),C(e.visibleSellerNote)}}function ki(t,n){if(t&1&&(r(0,"a",122),g(1,"p-tag",123),a()),t&2){let e=p(3);h("routerLink",k(3,gt,e.orderTicket.id)),i(),h("value","#"+e.orderTicket.ticketNumber)("rounded",!0)}}function Hi(t,n){if(t&1&&(r(0,"div",121)(1,"span"),l(2),d(3,"translate"),a(),E(4,ki,2,5,"a",122),a()),t&2){let e=p(2);i(2),C(s(3,2,"MANAGER.SHOP.ORDER_MESSAGING")),i(2),m(e.orderTicket?4:-1)}}function Li(t,n){if(t&1){let e=v();r(0,"div",124),f("click",function(){x(e);let o=p(2);return S(o.openAttachDialog())}),r(1,"div",125),g(2,"i",126),a(),r(3,"div",127)(4,"div",128),l(5),d(6,"translate"),a(),r(7,"div",129),l(8),d(9,"translate"),a()(),g(10,"i",130),a()}t&2&&(i(5),u(" ",s(6,2,"MANAGER.SHOP.ATTACH_ORDER")," "),i(3),u(" ",s(9,4,"MANAGER.SHOP.ATTACH_ORDER_DESC")," "))}function Gi(t,n){if(t&1){let e=v();r(0,"div",124),f("click",function(){x(e);let o=p(2);return S(o.forceCloseCart())}),r(1,"div",125),g(2,"i",131),a(),r(3,"div",127)(4,"div",128),l(5),d(6,"translate"),a(),r(7,"div",129),l(8),d(9,"translate"),a()(),g(10,"i",130),a()}t&2&&(i(5),u(" ",s(6,2,"MANAGER.SHOP.FORCE_CLOSE_CART")," "),i(3),u(" ",s(9,4,"MANAGER.SHOP.FORCE_CLOSE_CART_DESC")," "))}function Bi(t,n){if(t&1){let e=v();r(0,"div",124),f("click",function(){x(e);let o=p(2);return S(o.openReopenDialog())}),r(1,"div",125),g(2,"i",132),a(),r(3,"div",127)(4,"div",128),l(5),d(6,"translate"),a(),r(7,"div",129),l(8),d(9,"translate"),a()(),g(10,"i",130),a()}t&2&&(i(5),u(" ",s(6,2,"MANAGER.SHOP.REOPEN_CART")," "),i(3),u(" ",s(9,4,"MANAGER.SHOP.REOPEN_CART_DESC")," "))}function Ui(t,n){if(t&1){let e=v();r(0,"div",124),f("click",function(){x(e);let o=p(2);return S(o.openStatusUpdate())}),r(1,"div",125),g(2,"i",133),a(),r(3,"div",127)(4,"div",128),l(5),d(6,"translate"),a(),r(7,"div",129),l(8),d(9,"translate"),a()(),g(10,"i",130),a()}t&2&&(i(5),u(" ",s(6,2,"MANAGER.SHOP.ORDER_UPDATE_STATUS")," "),i(3),u(" ",s(9,4,"MANAGER.SHOP.ORDER_UPDATE_STATUS_DESC")," "))}function Fi(t,n){if(t&1){let e=v();r(0,"div",134),f("click",function(){x(e);let o=p(2);return S(o.openRefundDialog())}),r(1,"div",135),g(2,"i",136),a(),r(3,"div",127)(4,"div",128),l(5),d(6,"translate"),a(),r(7,"div",129),l(8),d(9,"translate"),a()(),g(10,"i",130),a()}t&2&&(i(5),u(" ",s(6,2,"MANAGER.SHOP.ORDER_REFUND_BTN")," "),i(3),u(" ",s(9,4,"MANAGER.SHOP.ORDER_REFUND_DESC")," "))}function Wi(t,n){if(t&1&&(r(0,"a",36)(1,"div",137),g(2,"i",138),a(),r(3,"div",127)(4,"div",128),l(5),d(6,"translate"),a(),r(7,"div",129),l(8),d(9,"translate"),a()(),g(10,"i",139),a()),t&2){let e=p(2);h("href",e.receiptUrl,L),i(5),u(" ",s(6,3,"MANAGER.SHOP.ORDER_RECEIPT")," "),i(3),u(" ",s(9,5,"MANAGER.SHOP.ORDER_RECEIPT_DESC")," ")}}function zi(t,n){if(t&1){let e=v();r(0,"div",124),f("click",function(){x(e);let o=p(2);return S(o.resyncToEcommerce())}),r(1,"div",140),g(2,"i",141),a(),r(3,"div",127)(4,"div",128),l(5),d(6,"translate"),a(),r(7,"div",129),l(8),d(9,"translate"),a()(),g(10,"i",130),a()}if(t&2){let e=p(2);T("action-item--disabled",e.resyncing),i(2),T("pi-spin",e.resyncing),i(3),u(" ",s(6,6,"MANAGER.SHOP.ORDER_RESYNC")," "),i(3),u(" ",s(9,8,"MANAGER.SHOP.ORDER_RESYNC_DESC")," ")}}function Ki(t,n){if(t&1){let e=v();r(0,"div",124),f("click",function(){x(e);let o=p(2);return S(o.openShippingMethodDialog())}),r(1,"div",142),g(2,"i",143),a(),r(3,"div",127)(4,"div",128),l(5),d(6,"translate"),a(),r(7,"div",129),l(8),d(9,"translate"),a()(),g(10,"i",130),a()}t&2&&(i(5),u(" ",s(6,2,"MANAGER.SHOP.SHIPPING_METHOD_PICK")," "),i(3),u(" ",s(9,4,"MANAGER.SHOP.SHIPPING_METHOD_PICK_DESC")," "))}function Yi(t,n){if(t&1){let e=v();r(0,"div",124),f("click",function(){x(e);let o=p(2);return S(o.openLabelDialog())}),r(1,"div",144),g(2,"i",145),a(),r(3,"div",127)(4,"div",128),l(5),d(6,"translate"),a(),r(7,"div",129),l(8),d(9,"translate"),a()(),g(10,"i",130),a()}if(t&2){let e=p(2);T("action-item--disabled",e.generatingLabel),i(2),T("pi-spin",e.generatingLabel),i(3),u(" ",s(6,6,"MANAGER.SHOP.LABEL_GENERATE")," "),i(3),u(" ",s(9,8,"MANAGER.SHOP.LABEL_GENERATE_DESC")," ")}}function ji(t,n){if(t&1){let e=v();r(0,"div",124),f("click",function(){x(e);let o=p(2);return S(o.openServicePointDialog())}),r(1,"div",142),g(2,"i",146),a(),r(3,"div",127)(4,"div",128),l(5),d(6,"translate"),a(),r(7,"div",129),l(8),d(9,"translate"),a()(),g(10,"i",130),a()}t&2&&(i(5),u(" ",s(6,2,"MANAGER.SHOP.SERVICE_POINT_CHANGE")," "),i(3),u(" ",s(9,4,"MANAGER.SHOP.SERVICE_POINT_CHANGE_DESC")," "))}
1function qi(t,n){if(t&1){let e=v();r(0,"div",124),f("click",function(){x(e);let o=p(2);return S(o.downloadLabel())}),r(1,"div",147),g(2,"i",148),a(),r(3,"div",127)(4,"div",128),l(5),d(6,"translate"),a(),r(7,"div",129),l(8),d(9,"translate"),a()(),g(10,"i",139),a(),r(11,"div",124),f("click",function(){x(e);let o=p(2);return S(o.printLabel())}),r(12,"div",149),g(13,"i",150),a(),r(14,"div",127)(15,"div",128),l(16),d(17,"translate"),a(),r(18,"div",129),l(19),d(20,"translate"),a()(),g(21,"i",130),a(),r(22,"div",134),f("click",function(){x(e);let o=p(2);return S(o.cancelLabel())}),r(23,"div",135),g(24,"i",151),a(),r(25,"div",127)(26,"div",128),l(27),d(28,"translate"),a(),r(29,"div",129),l(30),d(31,"translate"),a()(),g(32,"i",130),a()}if(t&2){let e=p(2);i(5),u(" ",s(6,12,"MANAGER.SHOP.LABEL_DOWNLOAD")," "),i(3),u(" ",s(9,14,"MANAGER.SHOP.LABEL_DOWNLOAD_DESC")," "),i(3),T("action-item--disabled",e.printingLabel),i(2),T("pi-spin",e.printingLabel),i(3),u(" ",s(17,16,"MANAGER.SHOP.LABEL_PRINT")," "),i(3),u(" ",s(20,18,"MANAGER.SHOP.LABEL_PRINT_DESC")," "),i(3),T("action-item--disabled",e.cancellingLabel),i(5),u(" ",s(28,20,"MANAGER.SHOP.LABEL_CANCEL")," "),i(3),u(" ",s(31,22,"MANAGER.SHOP.LABEL_CANCEL_DESC")," ")}}function Qi(t,n){t&1&&(r(0,"div",38),g(1,"i",152),r(2,"span"),l(3),d(4,"translate"),a()()),t&2&&(i(3),C(s(4,1,"MANAGER.SHOP.ORDER_NO_ACTIONS")))}function Ji(t,n){if(t&1&&g(0,"img",41),t&2){let e=p(2);h("src",e.buyerAvatarUrl,L)}}function Xi(t,n){if(t&1&&(r(0,"div",42),l(1),a()),t&2){let e=p(2);i(),u(" ",e.buyerInitial," ")}}function Zi(t,n){t&1&&(g(0,"i",45),d(1,"translate")),t&2&&h("pTooltip",s(1,1,"MANAGER.SHOP.ORDER_BUYER_VERIFIED"))}function $i(t,n){if(t&1&&(r(0,"div",46),l(1),a()),t&2){let e=p(2);i(),u(" ",e.buyerHandle," ")}}function en(t,n){if(t&1&&(r(0,"div",16),l(1),a()),t&2){let e=p(2);i(),u(" ",e.buyerWorkspaceName," ")}}function tn(t,n){t&1&&(r(0,"span",47),g(1,"i",153),l(2),d(3,"translate"),a()),t&2&&(i(2),u(" ",s(3,1,"MANAGER.SHOP.ORDER_REGISTERED_BUYER")," "))}function nn(t,n){if(t&1){let e=v();r(0,"div",49)(1,"div",154),g(2,"i",155),r(3,"span",156),l(4),a()(),r(5,"p-button",157),d(6,"translate"),f("onClick",function(){x(e);let o=p(2);return S(o.copyToClipboard(o.order.buyerEmail))}),a()()}if(t&2){let e=p(2);i(4),C(e.order.buyerEmail),i(),h("rounded",!0)("text",!0)("pTooltip",s(6,4,"MANAGER.SHOP.ORDER_COPY_EMAIL"))}}function an(t,n){if(t&1){let e=v();r(0,"div",49)(1,"div",154),g(2,"i",158),r(3,"span"),l(4),a()(),r(5,"p-button",157),d(6,"translate"),f("onClick",function(){x(e);let o=p(2);return S(o.copyToClipboard(o.order.buyerPhone))}),a()()}if(t&2){let e=p(2);i(4),C(e.order.buyerPhone),i(),h("rounded",!0)("text",!0)("pTooltip",s(6,4,"MANAGER.SHOP.ORDER_COPY_PHONE"))}}function rn(t,n){if(t&1){let e=v();r(0,"div",49)(1,"div",154),g(2,"i",159),r(3,"span"),l(4),a()(),r(5,"p-button",157),d(6,"translate"),f("onClick",function(){x(e);let o=p(2);return S(o.copyToClipboard(o.order.buyerSocialHandle))}),a()()}if(t&2){let e=p(2);i(4),C(e.order.buyerSocialHandle),i(),h("rounded",!0)("text",!0)("pTooltip",s(6,4,"MANAGER.SHOP.ORDER_COPY_SOCIAL_HANDLE"))}}function on(t,n){if(t&1&&(r(0,"div",68),l(1),a()),t&2){let e=p(3);i(),u(" ",e.order.shippingAddress.name," ")}}function ln(t,n){if(t&1&&(r(0,"div"),l(1),a()),t&2){let e=p(3);i(),C(e.order.shippingAddress.line2)}}function dn(t,n){if(t&1&&(r(0,"div"),l(1),a()),t&2){let e=p(3);i(),C(e.order.shippingAddress.state)}}function pn(t,n){if(t&1&&(r(0,"div",162),g(1,"span",163),d(2,"lowercase"),r(3,"span"),l(4),d(5,"uppercase"),a()()),t&2){let e=p(3);i(),h("ngClass","fp-"+s(2,2,e.order.shippingAddress.country)),i(3),C(s(5,4,e.order.shippingAddress.country))}}function sn(t,n){if(t&1){let e=v();r(0,"div",50)(1,"div",160)(2,"span"),g(3,"i",146),l(4),d(5,"translate"),a(),r(6,"p-button",157),d(7,"translate"),f("onClick",function(){x(e);let o=p(2);return S(o.copyAddress())}),a()(),r(8,"div",161),E(9,on,2,1,"div",68),r(10,"div"),l(11),a(),E(12,ln,2,1,"div"),r(13,"div"),l(14),a(),E(15,dn,2,1,"div")(16,pn,6,6,"div",162),a()()}if(t&2){let e=p(2);i(4),u(" ",s(5,11,"MANAGER.SHOP.ORDER_SHIPPING")," "),i(2),h("rounded",!0)("text",!0)("pTooltip",s(7,13,"MANAGER.SHOP.ORDER_COPY_ADDRESS")),i(3),m(e.order.shippingAddress.name?9:-1),i(2),C(e.order.shippingAddress.line1),i(),m(e.order.shippingAddress.line2?12:-1),i(2),N(" ",e.order.shippingAddress.postalCode," ",e.order.shippingAddress.city," "),i(),m(e.order.shippingAddress.state?15:-1),i(),m(e.order.shippingAddress.country?16:-1)}}function cn(t,n){if(t&1&&(r(0,"span"),l(1),d(2,"translate"),a()),t&2){let e=p(3);i(),u("\xA0\xB7\xA0",s(2,1,e.deliveryModeKey(e.order)),"")}}function _n(t,n){if(t&1&&(r(0,"div",51),g(1,"i",164),r(2,"span",22),l(3),d(4,"translate"),a(),r(5,"span",68),l(6),E(7,cn,3,3,"span"),a()()),t&2){let e=p(2);i(3),u("",s(4,3,"MANAGER.SHOP.ORDER_CARRIER")," :"),i(3),u("",e.order.shippingMethodName," "),i(),m(e.deliveryModeKey(e.order)?7:-1)}}function mn(t,n){if(t&1&&(r(0,"div",68),l(1),a()),t&2){let e=p(3);i(),u(" ",e.order.servicePointAddress.name," ")}}function un(t,n){if(t&1&&(r(0,"div"),l(1),a()),t&2){let e=p(3);i(),u(" ",e.order.servicePointAddress.street," ")}}function gn(t,n){if(t&1&&(r(0,"div"),l(1),a()),t&2){let e=p(3);i(),N(" ",e.order.servicePointAddress.postal_code," ",e.order.servicePointAddress.city," ")}}function Cn(t,n){if(t&1&&(r(0,"div",162),g(1,"span",163),d(2,"lowercase"),r(3,"span"),l(4),d(5,"uppercase"),a()()),t&2){let e=p(3);i(),h("ngClass","fp-"+s(2,2,e.order.servicePointAddress.country)),i(3),C(s(5,4,e.order.servicePointAddress.country))}}function hn(t,n){if(t&1&&(r(0,"div",50)(1,"div",160)(2,"span"),g(3,"i",165),l(4),d(5,"translate"),a()(),r(6,"div",161),E(7,mn,2,1,"div",68)(8,un,2,1,"div")(9,gn,2,2,"div")(10,Cn,6,6,"div",162),a()()),t&2){let e=p(2);i(4),u(" ",s(5,5,"MANAGER.SHOP.ORDER_SERVICE_POINT")," "),i(3),m(e.order.servicePointAddress.name?7:-1),i(),m(e.order.servicePointAddress.street?8:-1),i(),m(e.order.servicePointAddress.postal_code||e.order.servicePointAddress.city?9:-1),i(),m(e.order.servicePointAddress.country?10:-1)}}function xn(t,n){if(t&1&&(r(0,"div",68),l(1),a()),t&2){let e=p(3);i(),u(" ",e.order.billingAddress.name," ")}}function Sn(t,n){if(t&1&&(r(0,"div"),l(1),a()),t&2){let e=p(3);i(),C(e.order.billingAddress.line2)}}function En(t,n){if(t&1&&(r(0,"div"),l(1),a()),t&2){let e=p(3);i(),C(e.order.billingAddress.state)}}function vn(t,n){if(t&1&&(r(0,"div",162),g(1,"span",163),d(2,"lowercase"),r(3,"span"),l(4),d(5,"uppercase"),a()()),t&2){let e=p(3);i(),h("ngClass","fp-"+s(2,2,e.order.billingAddress.country)),i(3),C(s(5,4,e.order.billingAddress.country))}}function fn(t,n){if(t&1){let e=v();r(0,"div",50)(1,"div",160)(2,"span"),g(3,"i",166),l(4),d(5,"translate"),a(),r(6,"p-button",157),d(7,"translate"),f("onClick",function(){x(e);let o=p(2);return S(o.copyBillingAddress())}),a()(),r(8,"div",161),E(9,xn,2,1,"div",68),r(10,"div"),l(11),a(),E(12,Sn,2,1,"div"),r(13,"div"),l(14),a(),E(15,En,2,1,"div")(16,vn,6,6,"div",162),a()()}if(t&2){let e=p(2);i(4),u(" ",s(5,11,"MANAGER.SHOP.ORDER_BILLING")," "),i(2),h("rounded",!0)("text",!0)("pTooltip",s(7,13,"MANAGER.SHOP.ORDER_COPY_BILLING")),i(3),m(e.order.billingAddress.name?9:-1),i(2),C(e.order.billingAddress.line1),i(),m(e.order.billingAddress.line2?12:-1),i(2),N(" ",e.order.billingAddress.postalCode," ",e.order.billingAddress.city," "),i(),m(e.order.billingAddress.state?15:-1),i(),m(e.order.billingAddress.country?16:-1)}}function On(t,n){t&1&&g(0,"p-skeleton",52)}function Rn(t,n){if(t&1&&(r(0,"div",175),g(1,"i",177),l(2),d(3,"translate"),d(4,"date"),a()),t&2){let e=p(3);i(2),N(" ",s(3,2,"MANAGER.SHOP.ORDER_HISTORY_SINCE")," ",I(4,4,e.customerHistory.firstOrderDate,"dd/MM/yyyy")," ")}}function Mn(t,n){if(t&1&&(r(0,"div",179)(1,"div",180),l(2),d(3,"date"),a(),g(4,"p-tag",181),r(5,"span",182),l(6),a(),g(7,"i",183),a()),t&2){let e=p().$implicit,c=p(4);h("routerLink",k(8,Ct,e.id)),i(2),u(" ",I(3,5,e.createdAt,"dd/MM")," "),i(2),h("severity",c.getStatusSeverity(e.status))("value",c.getStatusLabel(e.status)),i(2),C(c.formatPrice(e.totalCents,e.currency))}}function yn(t,n){if(t&1&&E(0,Mn,8,10,"div",179),t&2){let e=n.$implicit,c=p(4);m(e.id!==c.order.id?0:-1)}}function An(t,n){if(t&1&&(r(0,"div",176)(1,"div",178),l(2),d(3,"translate"),a(),P(4,yn,1,1,null,null,B),a()),t&2){let e=p(3);i(2),u(" ",s(3,1,"MANAGER.SHOP.ORDER_HISTORY_RECENT")," "),i(2),D(e.customerHistory.recentOrders)}}function wn(t,n){if(t&1&&(r(0,"div",53)(1,"div",167)(2,"div",168)(3,"div",169),g(4,"i",170),a(),r(5,"div")(6,"div",171),l(7),a(),r(8,"div",172),l(9),d(10,"translate"),a()()(),r(11,"div",168)(12,"div",173),g(13,"i",174),a(),r(14,"div")(15,"div",171),l(16),a(),r(17,"div",172),l(18),d(19,"translate"),a()()()(),E(20,Rn,5,7,"div",175)(21,An,6,3,"div",176),a()),t&2){let e=p(2);i(7),u(" ",e.customerHistory.totalOrders," "),i(2),u(" ",s(10,6,"MANAGER.SHOP.ORDER_HISTORY_ORDERS")," "),i(7),u(" ",e.formatPrice(e.customerHistory.totalRevenueCents)," "),i(2),u(" ",s(19,8,"MANAGER.SHOP.ORDER_HISTORY_REVENUE")," "),i(2),m(e.customerHistory.firstOrderDate?20:-1),i(),m(e.customerHistory.recentOrders.length>1?21:-1)}}function bn(t,n){t&1&&(r(0,"div",54),g(1,"i",184),r(2,"span"),l(3),d(4,"translate"),a()()),t&2&&(i(3),C(s(4,1,"MANAGER.SHOP.ORDER_HISTORY_FIRST")))}function In(t,n){t&1&&g(0,"p-skeleton",52)}function Tn(t,n){t&1&&(r(0,"p",55),l(1),d(2,"translate"),a()),t&2&&(i(),u(" ",s(2,1,"MANAGER.SHOP.REFUND_HISTORY_EMPTY")," "))}function Pn(t,n){if(t&1&&(r(0,"div",16),l(1),a()),t&2){let e=p().$implicit,c=p(3);i(),u(" ",c.getRefundModeLabel(e.refundMode)," ")}}function Dn(t,n){if(t&1&&(r(0,"div",188)(1,"span",22),l(2),a(),r(3,"span",68),l(4),a()()),t&2){let e=p().$implicit,c=p(3);i(2),C(c.getRefundHistoryReferenceLabel(e)),i(2),C(c.getRefundHistoryReferenceValue(e))}}function Nn(t,n){if(t&1&&(r(0,"div",185)(1,"div",186)(2,"div")(3,"div",68),l(4),a(),r(5,"div",16),l(6),d(7,"date"),a()(),r(8,"div",67)(9,"div",187),l(10),a(),E(11,Pn,2,1,"div",16),a()(),E(12,Dn,5,2,"div",188),a()),t&2){let e=n.$implicit,c=p(3);i(4),u(" ",c.getRefundHistoryTypeLabel(e.refundType)," "),i(2),u(" ",I(7,5,e.createdAt,"dd/MM/yyyy HH:mm")," "),i(4),u(" -",c.formatPrice(e.amountCents,c.order.currency)," "),i(),m(e.refundMode?11:-1),i(),m(c.getRefundHistoryReferenceValue(e)?12:-1)}}function Vn(t,n){if(t&1&&(r(0,"div",56),P(1,Nn,13,8,"div",185,B),a()),t&2){let e=p(2);i(),D(e.refundHistory)}}function kn(t,n){t&1&&(r(0,"div",57)(1,"p",189),g(2,"i",190),l(3),d(4,"translate"),a()()),t&2&&(i(3),u(" ",s(4,1,"MANAGER.SHOP.INVOICE_AFTER_SHIPMENT")," "))}function Hn(t,n){t&1&&g(0,"p-skeleton",58)}function Ln(t,n){t&1&&(g(0,"p-tag",194),d(1,"translate")),t&2&&h("value",s(1,1,"MANAGER.SHOP.INVOICE_AUTO"))}function Gn(t,n){t&1&&(g(0,"p-tag",195),d(1,"translate")),t&2&&h("value",s(1,1,"MANAGER.SHOP.INVOICE_MANUAL"))}function Bn(t,n){if(t&1){let e=v();r(0,"div",134),f("click",function(){x(e);let o=p(3);return S(o.deleteInvoice())}),r(1,"div",203),g(2,"i",204),a(),r(3,"div",127)(4,"div",128),l(5),d(6,"translate"),a()()()}t&2&&(i(5),u(" ",s(6,1,"MANAGER.SHOP.INVOICE_REVERT")," "))}function Un(t,n){if(t&1){let e=v();r(0,"div",57)(1,"div",191)(2,"div",192),g(3,"i",138),a(),r(4,"div",193)(5,"div",68),l(6),a(),E(7,Ln,2,3,"p-tag",194)(8,Gn,2,3,"p-tag",195),a()(),r(9,"div",196)(10,"div",124),f("click",function(){x(e);let o=p(2);return S(o.downloadInvoice())}),r(11,"div",197),g(12,"i",198),a(),r(13,"div",127)(14,"div",128),l(15),d(16,"translate"),a()()(),r(17,"label",199)(18,"input",200),f("change",function(o){x(e);let _=p(2);return S(_.onInvoiceFileSelected(o))}),a(),r(19,"div",201),g(20,"i",202),a(),r(21,"div",127)(22,"div",128),l(23),d(24,"translate"),a()()(),E(25,Bn,7,3,"div",35),a()()}if(t&2){let e=p(2);i(6),u(" ",e.invoice.invoiceNumber," "),i(),m(e.invoice.type==="auto"?7:8),i(8),u(" ",s(16,5,"MANAGER.SHOP.INVOICE_DOWNLOAD")," "),i(8),u(" ",s(24,7,"MANAGER.SHOP.INVOICE_REPLACE")," "),i(2),m(e.invoice.type==="manual"?25:-1)}}function Fn(t,n){if(t&1){let e=v();r(0,"div",57)(1,"p",205),l(2),d(3,"translate"),a(),r(4,"label",199)(5,"input",200),f("change",function(o){x(e);let _=p(2);return S(_.onInvoiceFileSelected(o))}),a(),r(6,"div",201),g(7,"i",202),a(),r(8,"div",127)(9,"div",128),l(10),d(11,"translate"),a()()()()}t&2&&(i(2),u(" ",s(3,2,"MANAGER.SHOP.INVOICE_NONE")," "),i(8),u(" ",s(11,4,"MANAGER.SHOP.INVOICE_UPLOAD")," "))}function Wn(t,n){t&1&&(l(0),d(1,"translate")),t&2&&u(" ",s(1,1,"MANAGER.SHOP.ORDER_STORE_SEARCH_DESC")," ")}function zn(t,n){if(t&1&&(l(0),d(1,"translate")),t&2){let e=p(3);u(" ",I(1,1,"MANAGER.SHOP.ORDER_STORE_OPEN_DESC",k(4,xt,e.storeLink.externalOrderId))," ")}}function Kn(t,n){if(t&1&&(r(0,"div",207),g(1,"i",208),l(2),a()),t&2){let e=p(3);i(2),u("",e.storeLink.siteUrl," ")}}function Yn(t,n){if(t&1&&(r(0,"p-panel",14),d(1,"translate"),r(2,"a",206)(3,"div",140),g(4,"i",170),a(),r(5,"div",127)(6,"div",128),l(7),d(8,"translate"),a(),r(9,"div",129),E(10,Wn,2,3)(11,zn,2,6),a()(),g(12,"i",139),a(),E(13,Kn,3,1,"div",207),a()),t&2){let e=p(2);h("toggleable",!1)("header",s(1,6,"MANAGER.SHOP.ORDER_STORE_PANEL")),i(2),h("href",e.storeLink.url,L),i(5),u(" ",I(8,8,"MANAGER.SHOP.ORDER_STORE_OPEN",k(11,ht,e.storeLinkPlatformLabel))," "),i(3),m(e.storeLink.isSearch?10:11),i(3),m(e.storeLink.siteUrl?13:-1)}}function jn(t,n){if(t&1&&(r(0,"div",213),l(1),a()),t&2){let e=p().$implicit;i(),u(" ",e.subLabel," ")}}function qn(t,n){if(t&1&&(r(0,"div",209)(1,"div",210),g(2,"i"),a(),r(3,"div",211)(4,"div",212),l(5),a(),E(6,jn,2,1,"div",213),r(7,"div",214),l(8),d(9,"date"),a()()()),t&2){let e=n.$implicit;T("timeline__item--success",e.severity==="success")("timeline__item--danger",e.severity==="danger")("timeline__item--info",e.severity==="info"),i(2),q("pi ",e.icon,""),i(3),u(" ",e.label," "),i(),m(e.subLabel?6:-1),i(2),u(" ",I(9,12,e.date,"dd/MM/yyyy HH:mm")," ")}}function Qn(t,n){if(t&1){let e=v();E(0,kt,11,8,"div",11),r(1,"div",12)(2,"div",13)(3,"p-panel",14),d(4,"translate"),r(5,"div",15)(6,"span",16),l(7),d(8,"translate"),d(9,"date"),a(),r(10,"span",16),l(11),d(12,"slice"),a()(),r(13,"div",17)(14,"span",16),l(15),d(16,"translate"),a(),g(17,"p-tag",9),a(),r(18,"div",18)(19,"span",16),l(20),d(21,"translate"),a(),g(22,"p-tag",19),a(),E(23,Gt,11,8,"div",18),a(),r(24,"p-panel",14),d(25,"translate"),P(26,qt,14,8,null,null,Q().trackLineItem,!0),r(28,"div",20)(29,"div",21)(30,"span",22),l(31),d(32,"translate"),a(),r(33,"span"),l(34),a()(),E(35,Xt,7,5,"div",21)(36,Zt,10,9,"div",21)(37,ei,8,7,"div",21)(38,ii,7,5)(39,oi,4,3,"div",23)(40,ci,7,5,"div",21),r(41,"div",24)(42,"span"),l(43,"Total"),a(),r(44,"span"),l(45),a()(),E(46,gi,16,11),r(47,"div",25)(48,"div",21)(49,"span",16),g(50,"i",26),l(51),d(52,"translate"),a(),r(53,"span",16),l(54),a()(),E(55,Ci,7,4,"div",21),r(56,"div",27)(57,"span",28),l(58),d(59,"translate"),a(),r(60,"span",28),l(61),a()()()()(),r(62,"p-panel",14),d(63,"translate"),E(64,fi,5,5)(65,Ri,6,4)(66,yi,4,4),a(),E(67,Ni,5,5,"p-panel",14)(68,Vi,4,5,"p-panel",14),r(69,"p-panel",29),E(70,Hi,5,4,"ng-template",3
10),r(71,"app-widget-chat",31,0),d(73,"translate"),f("messageSent",function(o){x(e);let _=p();return S(_.onChatMessageSent(o))}),a()()(),r(74,"div",32)(75,"p-panel",14),d(76,"translate"),r(77,"div",33),E(78,Li,11,6,"div",34)(79,Gi,11,6,"div",34)(80,Bi,11,6,"div",34)(81,Ui,11,6,"div",34)(82,Fi,11,6,"div",35)(83,Wi,11,7,"a",36)(84,zi,11,10,"div",37)(85,Ki,11,6,"div",34)(86,Yi,11,10,"div",37)(87,ji,11,6,"div",34)(88,qi,33,24),a(),E(89,Qi,5,3,"div",38),a(),r(90,"p-panel",14),d(91,"translate"),r(92,"div",39)(93,"div",40),E(94,Ji,1,1,"img",41)(95,Xi,2,1,"div",42),r(96,"div",43)(97,"div",44)(98,"span"),l(99),a(),E(100,Zi,2,3,"i",45),a(),E(101,$i,2,1,"div",46)(102,en,2,1,"div",16)(103,tn,4,3,"span",47),a()(),r(104,"div",48),E(105,nn,7,6,"div",49)(106,an,7,6,"div",49)(107,rn,7,6,"div",49),a(),E(108,sn,17,15,"div",50)(109,_n,8,5,"div",51)(110,hn,11,7,"div",50)(111,fn,17,15,"div",50),a()(),r(112,"p-panel",14),d(113,"translate"),E(114,On,1,0,"p-skeleton",52)(115,wn,22,10,"div",53)(116,bn,5,3,"div",54),a(),r(117,"p-panel",14),d(118,"translate"),E(119,In,1,0,"p-skeleton",52)(120,Tn,3,3,"p",55)(121,Vn,3,0,"div",56),a(),r(122,"p-panel",14),d(123,"translate"),E(124,kn,5,3,"div",57)(125,Hn,1,0,"p-skeleton",58)(126,Un,26,9,"div",57)(127,Fn,12,6,"div",57),a(),E(128,Yn,14,13,"p-panel",14),r(129,"p-panel",14),d(130,"translate"),r(131,"div",59),P(132,qn,10,15,"div",60,F),a()()()()}if(t&2){let e=p();m(e.order.status==="open_cart"?0:-1),i(3),h("toggleable",!1)("header",s(4,82,"MANAGER.SHOP.ORDER_SUMMARY")),i(4),N("",s(8,84,"MANAGER.SHOP.ORDER_DATE")," : ",I(9,86,e.order.paidAt||e.order.createdAt,"dd/MM/yyyy HH:mm"),""),i(4),u("ID : ",e.order.shortCode||W(12,89,e.order.id,0,8),""),i(4),C(s(16,93,"MANAGER.SHOP.ORDER_CURRENT_STATUS")),i(2),h("severity",e.getStatusSeverity(e.order.status))("value",e.getStatusLabel(e.order.status)),i(3),C(s(21,95,"MANAGER.SHOP.ORDER_PAYMENT_METHOD")),i(2),h("rounded",!0),i(),m(e.openCartDeadline?23:-1),i(),h("toggleable",!1)("header",s(25,97,"MANAGER.SHOP.ORDER_ITEMS")),i(2),D(e.order.lineItems),i(5),C(s(32,99,"SHOP.CART.SUBTOTAL")),i(3),C(e.formatPrice(e.order.subtotalCents,e.order.currency)),i(),m(e.order.shippingCents>0?35:e.order.isLocalPickup?36:37),i(3),m(e.sellerBearsShippingCost(e.order)?38:-1),i(),m(e.order.shippingZone||e.order.totalWeightGrams?39:-1),i(),m(e.order.discountCents>0?40:-1),i(5),C(e.formatPrice(e.order.totalCents,e.order.currency)),i(),m((e.order.refundedAmountCents||0)>0?46:-1),i(5),N("",s(52,101,"MANAGER.SHOP.ORDER_COMMISSION")," (",e.commissionPercent,"%) "),i(3),u("-",e.formatPrice(e.order.platformFeeCents,e.order.currency),""),i(),m((e.order.stripeFeeCents||0)>0?55:-1),i(3),C(s(59,103,"MANAGER.SHOP.ORDER_YOUR_REVENUE")),i(3),C(e.formatPrice(e.sellerRevenueCents,e.order.currency)),i(),h("toggleable",!1)("header",s(63,105,"MANAGER.SHOP.ORDER_TRACKING")),i(2),m(e.order.carrier||e.order.trackingNumber||e.order.trackingUrl?64:e.isAllVirtual?65:66),i(3),m(e.order.shipments!=null&&e.order.shipments.length?67:-1),i(),m(e.visibleSellerNote?68:-1),i(),h("toggleable",!1),i(2),h("ticket",e.orderTicket)("loading",e.loadingTicket)("compact",!0)("showReactions",!1)("showReadReceipts",!0)("allowInitialMessage",!0)("emptyStateHint",s(73,107,"MANAGER.SHOP.ORDER_NO_MESSAGES")),i(4),h("toggleable",!1)("header",s(76,109,"MANAGER.SHOP.ORDER_ACTIONS")),i(3),m(e.canAttachOrder?78:-1),i(),m(e.isOpenCart?79:-1),i(),m(e.canReopenCart?80:-1),i(),m(e.canUpdateStatus?81:-1),i(),m(e.canRefund?82:-1),i(),m(e.receiptUrl?83:-1),i(),m(e.canResyncEcommerce?84:-1),i(),m(e.canPickShippingMethod?85:-1),i(),m(e.canGenerateLabel?86:-1),i(),m(e.canChangeServicePoint?87:-1),i(),m(e.hasLabel?88:-1),i(),m(e.hasActionItems?-1:89),i(),h("toggleable",!1)("header",s(91,111,"MANAGER.SHOP.ORDER_CLIENT")),i(4),m(e.buyerAvatarUrl?94:95),i(5),C(e.buyerDisplayName||"-"),i(),m(e.buyerIsVerified?100:-1),i(),m(e.buyerHandle?101:-1),i(),m(e.buyerWorkspaceName?102:-1),i(),m(e.order.buyerUserId?103:-1),i(2),m(e.order.buyerEmail?105:-1),i(),m(e.order.buyerPhone?106:-1),i(),m(e.order.buyerSocialHandle?107:-1),i(),m(e.order.shippingAddress?108:-1),i(),m(e.order.shippingMethodName?109:-1),i(),m(e.order.servicePointAddress?110:-1),i(),m(e.order.billingAddress?111:-1),i(),h("toggleable",!1)("header",s(113,113,"MANAGER.SHOP.ORDER_CUSTOMER_HISTORY")),i(2),m(e.loadingHistory?114:e.customerHistory?115:116),i(3),h("toggleable",!1)("header",s(118,115,"MANAGER.SHOP.REFUND_HISTORY_TITLE")),i(2),m(e.loadingRefundHistory?119:e.refundHistory.length===0?120:121),i(3),h("toggleable",!1)("header",s(123,117,"MANAGER.SHOP.ORDER_INVOICE")),i(2),m(e.order&&e.order.status!=="shipped"&&e.order.status!=="delivered"?124:e.loadingInvoice?125:e.invoice?126:127),i(4),m(e.storeLink?128:-1),i(),h("toggleable",!1)("header",s(130,119,"MANAGER.SHOP.ORDER_TIMELINE")),i(3),D(e.timelineEvents)}}function Jn(t,n){if(t&1){let e=v();r(0,"div",216)(1,"label",217),l(2),d(3,"translate"),a(),r(4,"input",223),M("ngModelChange",function(o){x(e);let _=p(3);return R(_.trackingUrl,o)||(_.trackingUrl=o),S(o)}),a(),r(5,"small",22),l(6),d(7,"translate"),a()()}if(t&2){let e=p(3);i(2),C(s(3,3,"MANAGER.SHOP.ORDER_TRACKING_LINK")),i(2),O("ngModel",e.trackingUrl),i(2),C(s(7,5,"MANAGER.SHOP.ORDER_TRACKING_LINK_HINT"))}}function Xn(t,n){t&1&&(r(0,"div",216)(1,"small",87),g(2,"i",224),l(3),d(4,"translate"),a()()),t&2&&(i(3),C(s(4,1,"MANAGER.SHOP.ORDER_TRACKING_AUTO")))}function Zn(t,n){if(t&1){let e=v();r(0,"div",216)(1,"label",217),l(2),d(3,"translate"),a(),r(4,"p-select",221),d(5,"translate"),M("ngModelChange",function(o){x(e);let _=p(2);return R(_.selectedCarrier,o)||(_.selectedCarrier=o),S(o)}),a()(),r(6,"div",216)(7,"label",217),l(8),d(9,"translate"),a(),r(10,"input",222),M("ngModelChange",function(o){x(e);let _=p(2);return R(_.trackingNumber,o)||(_.trackingNumber=o),S(o)}),a()(),E(11,Jn,8,7,"div",216)(12,Xn,5,3,"div",216)}if(t&2){let e=p(2);i(2),C(s(3,10,"MANAGER.SHOP.ORDER_CARRIER")),i(2),A(w(16,H)),h("options",e.carrierOptions),O("ngModel",e.selectedCarrier),h("placeholder",s(5,12,"MANAGER.SHOP.ORDER_CARRIER_PLACEHOLDER")),i(4),C(s(9,14,"MANAGER.SHOP.ORDER_TRACKING_NUMBER")),i(2),O("ngModel",e.trackingNumber),i(),m(e.selectedCarrier==="other"?11:-1),i(),m(e.selectedCarrier&&e.selectedCarrier!=="other"&&e.trackingNumber?12:-1)}}function $n(t,n){if(t&1){let e=v();r(0,"div",216)(1,"label",217),l(2),d(3,"translate"),a(),r(4,"p-datepicker",225),d(5,"translate"),M("ngModelChange",function(o){x(e);let _=p(2);return R(_.estimatedDeliveryAt,o)||(_.estimatedDeliveryAt=o),S(o)}),a(),r(6,"small",22),l(7),d(8,"translate"),a()()}if(t&2){let e=p(2);i(2),C(s(3,8,"MANAGER.SHOP.ORDER_ESTIMATED_DELIVERY")),i(2),A(w(14,H)),O("ngModel",e.estimatedDeliveryAt),h("minDate",e.today)("showIcon",!0)("placeholder",s(5,10,"MANAGER.SHOP.ORDER_ESTIMATED_DELIVERY_PLACEHOLDER")),i(3),C(s(8,12,"MANAGER.SHOP.ORDER_ESTIMATED_DELIVERY_HINT"))}}function ea(t,n){if(t&1){let e=v();r(0,"p-button",226),d(1,"translate"),f("onClick",function(){x(e);let o=p(2);return S(o.showStatusDialog=!1)}),a(),r(2,"p-button",227),d(3,"translate"),f("onClick",function(){x(e);let o=p(2);return S(o.submitStatusUpdate())}),a()}if(t&2){let e=p(2);h("label",s(1,4,"COMMON.CANCEL"))("text",!0),i(2),h("label",s(3,6,"COMMON.SAVE"))("loading",e.updatingStatus)}}function ta(t,n){if(t&1){let e=v();r(0,"p-button",226),d(1,"translate"),f("onClick",function(){x(e);let o=p(2);return S(o.showReopenDialog=!1)}),a(),r(2,"p-button",228),d(3,"translate"),f("onClick",function(){x(e);let o=p(2);return S(o.submitReopenCart())}),a()}if(t&2){let e=p(2);h("label",s(1,4,"COMMON.CANCEL"))("text",!0),i(2),h("label",s(3,6,"MANAGER.SHOP.REOPEN_CART_CONFIRM"))("loading",e.reopeningCart)}}function ia(t,n){if(t&1){let e=v();r(0,"p-dialog",215),d(1,"translate"),M("visibleChange",function(o){x(e);let _=p();return R(_.showStatusDialog,o)||(_.showStatusDialog=o),S(o)}),r(2,"div",216)(3,"label",217),l(4),d(5,"translate"),a(),r(6,"p-select",218),M("ngModelChange",function(o){x(e);let _=p();return R(_.newStatus,o)||(_.newStatus=o),S(o)}),a()(),E(7,Zn,13,17)(8,$n,9,15,"div",216),r(9,"div",216)(10,"label",217),l(11),d(12,"translate"),a(),r(13,"textarea",219),M("ngModelChange",function(o){x(e);let _=p();return R(_.sellerNotes,o)||(_.sellerNotes=o),S(o)}),a()(),E(14,ea,4,8,"ng-template",null,1,G),a(),r(16,"p-dialog",215),d(17,"translate"),M("visibleChange",function(o){x(e);let _=p();return R(_.showReopenDialog,o)||(_.showReopenDialog=o),S(o)}),r(18,"p",220),l(19),d(20,"translate"),a(),r(21,"div",216)(22,"label",217),l(23),d(24,"translate"),a(),r(25,"p-select",218),M("ngModelChange",function(o){x(e);let _=p();return R(_.reopenDurationHours,o)||(_.reopenDurationHours=o),S(o)}),a()(),E(26,ta,4,8,"ng-template",null,1,G),a()}if(t&2){let e=p();A(w(38,lt)),O("visible",e.showStatusDialog),h("modal",!0)("header",s(1,26,"MANAGER.SHOP.ORDER_UPDATE_STATUS")),i(4),C(s(5,28,"MANAGER.SHOP.ORDER_COL_STATUS")),i(2),A(w(39,H)),h("options",e.statusOptions),O("ngModel",e.newStatus),i(),m(e.newStatus==="shipped"&&!e.isAllVirtual?7:-1),i(),m(e.newStatus==="shipped"&&!e.isAllVirtual?8:-1),i(3),C(s(12,30,"MANAGER.SHOP.ORDER_NOTES")),i(2),O("ngModel",e.sellerNotes),h("rows",3),i(3),A(w(40,St)),O("visible",e.showReopenDialog),h("modal",!0)("header",s(17,32,"MANAGER.SHOP.REOPEN_CART")),i(3),u(" ",s(20,34,"MANAGER.SHOP.REOPEN_CART_HINT")," "),i(4),C(s(24,36,"MANAGER.SHOP.REOPEN_CART_DURATION")),i(2),A(w(41,H)),h("options",e.reopenDurationOptions),O("ngModel",e.reopenDurationHours)}}function na(t,n){t&1&&(r(0,"div",229),g(1,"p-skeleton",232)(2,"p-skeleton",233),a())}
1function aa(t,n){t&1&&(r(0,"div",230),g(1,"i",152),l(2),d(3,"translate"),a()),t&2&&(i(2),u(" ",s(3,1,"MANAGER.SHOP.ATTACH_ORDER_NONE")," "))}function ra(t,n){if(t&1){let e=v();r(0,"button",235),f("click",function(){let o=x(e).$implicit,_=p(3);return S(_.attachTargetId=o.id)}),r(1,"span"),g(2,"i",236),r(3,"strong"),l(4),d(5,"slice"),d(6,"uppercase"),a(),r(7,"span",237),l(8),d(9,"translate"),a()(),r(10,"span"),l(11),a()()}if(t&2){let e=n.$implicit,c=p(3);T("active",c.attachTargetId===e.id),i(2),T("pi-check-circle",c.attachTargetId===e.id)("pi-circle",c.attachTargetId!==e.id),i(2),u("#",e.shortCode||s(6,13,W(5,9,e.id,0,8)),""),i(4),C(s(9,15,"MANAGER.SHOP.ORDER_STATUS_"+(e.status||"").toUpperCase())),i(3),C(c.formatPrice(e.totalCents,e.currency))}}function oa(t,n){if(t&1&&(r(0,"div",231),P(1,ra,12,17,"button",234,B),a()),t&2){let e=p(2);i(),D(e.attachCandidates)}}function la(t,n){if(t&1){let e=v();r(0,"p-button",226),d(1,"translate"),f("onClick",function(){x(e);let o=p(2);return S(o.showAttachDialog=!1)}),a(),r(2,"p-button",238),d(3,"translate"),f("onClick",function(){x(e);let o=p(2);return S(o.submitAttachOrder())}),a()}if(t&2){let e=p(2);h("label",s(1,5,"COMMON.CANCEL"))("text",!0),i(2),h("label",s(3,7,"MANAGER.SHOP.ATTACH_ORDER_CONFIRM"))("disabled",!e.attachTargetId)("loading",e.attachingOrder)}}function da(t,n){if(t&1){let e=v();r(0,"p-dialog",215),d(1,"translate"),M("visibleChange",function(o){x(e);let _=p();return R(_.showAttachDialog,o)||(_.showAttachDialog=o),S(o)}),r(2,"p",220),l(3),d(4,"translate"),a(),E(5,na,3,0,"div",229)(6,aa,4,3,"div",230)(7,oa,3,0,"div",231)(8,la,4,9,"ng-template",null,1,G),a()}if(t&2){let e=p();A(w(11,Et)),O("visible",e.showAttachDialog),h("modal",!0)("header",s(1,7,"MANAGER.SHOP.ATTACH_ORDER")),i(3),u(" ",s(4,9,"MANAGER.SHOP.ATTACH_ORDER_HINT")," "),i(2),m(e.loadingAttachCandidates?5:e.attachCandidates.length===0?6:7)}}function pa(t,n){if(t&1){let e=v();r(0,"div",216)(1,"label",217),l(2),d(3,"translate"),a(),r(4,"input",223),M("ngModelChange",function(o){x(e);let _=p(2);return R(_.editTrackingUrl,o)||(_.editTrackingUrl=o),S(o)}),a(),r(5,"small",22),l(6),d(7,"translate"),a()()}if(t&2){let e=p(2);i(2),C(s(3,3,"MANAGER.SHOP.ORDER_TRACKING_LINK")),i(2),O("ngModel",e.editTrackingUrl),i(2),C(s(7,5,"MANAGER.SHOP.ORDER_TRACKING_LINK_HINT"))}}function sa(t,n){t&1&&(r(0,"div",216)(1,"small",87),g(2,"i",224),l(3),d(4,"translate"),a()()),t&2&&(i(3),u(" ",s(4,1,"MANAGER.SHOP.ORDER_TRACKING_AUTO")," "))}function ca(t,n){if(t&1){let e=v();r(0,"p-button",226),d(1,"translate"),f("onClick",function(){x(e);let o=p(2);return S(o.showTrackingDialog=!1)}),a(),r(2,"p-button",227),d(3,"translate"),f("onClick",function(){x(e);let o=p(2);return S(o.submitTrackingUpdate())}),a()}if(t&2){let e=p(2);h("label",s(1,4,"COMMON.CANCEL"))("text",!0),i(2),h("label",s(3,6,"COMMON.SAVE"))("loading",e.updatingTracking)}}function _a(t,n){if(t&1){let e=v();r(0,"p-dialog",215),d(1,"translate"),M("visibleChange",function(o){x(e);let _=p();return R(_.showTrackingDialog,o)||(_.showTrackingDialog=o),S(o)}),r(2,"div",216)(3,"label",217),l(4),d(5,"translate"),a(),r(6,"p-select",221),d(7,"translate"),M("ngModelChange",function(o){x(e);let _=p();return R(_.editCarrier,o)||(_.editCarrier=o),S(o)}),a()(),r(8,"div",216)(9,"label",217),l(10),d(11,"translate"),a(),r(12,"input",222),M("ngModelChange",function(o){x(e);let _=p();return R(_.editTrackingNumber,o)||(_.editTrackingNumber=o),S(o)}),a()(),E(13,pa,8,7,"div",216)(14,sa,5,3,"div",216)(15,ca,4,8,"ng-template",null,1,G),a()}if(t&2){let e=p();A(w(23,lt)),O("visible",e.showTrackingDialog),h("modal",!0)("header",s(1,15,"MANAGER.SHOP.ORDER_EDIT_TRACKING")),i(4),C(s(5,17,"MANAGER.SHOP.ORDER_CARRIER")),i(2),A(w(24,H)),h("options",e.carrierOptions),O("ngModel",e.editCarrier),h("placeholder",s(7,19,"MANAGER.SHOP.ORDER_CARRIER_PLACEHOLDER")),i(4),C(s(11,21,"MANAGER.SHOP.ORDER_TRACKING_NUMBER")),i(2),O("ngModel",e.editTrackingNumber),i(),m(e.editCarrier==="other"?13:-1),i(),m(e.editCarrier&&e.editCarrier!=="other"&&e.editTrackingNumber?14:-1)}}function ma(t,n){if(t&1&&(r(0,"small",240),l(1),d(2,"translate"),a(),r(3,"div",241)(4,"span",68),l(5),d(6,"translate"),a(),r(7,"span",242),l(8),a()()),t&2){let e=p(2);i(),u(" ",s(2,3,"MANAGER.SHOP.REFUND_COMPENSATION_STORE_CREDIT_HINT")," "),i(4),C(s(6,5,"MANAGER.SHOP.REFUND_CUSTOMER_LABEL")),i(3),C(e.order.buyerName||e.order.buyerEmail)}}function ua(t,n){if(t&1){let e=v();r(0,"div",243)(1,"span",68),l(2),d(3,"translate"),a(),r(4,"span",244),l(5),a()(),r(6,"div",245)(7,"p-inputSwitch",246),M("ngModelChange",function(o){x(e);let _=p(2);return R(_.refundRestockItems,o)||(_.refundRestockItems=o),S(o)}),a(),r(8,"label",247),l(9),d(10,"translate"),a()()}if(t&2){let e=p(2);i(2),C(s(3,4,"MANAGER.SHOP.REFUND_TOTAL")),i(3),C(e.formatPrice(e.order.totalCents,e.order.currency)),i(2),O("ngModel",e.refundRestockItems),i(2),C(s(10,6,"MANAGER.SHOP.REFUND_RESTOCK"))}}function ga(t,n){if(t&1&&g(0,"img",252),t&2){let e=p().$implicit;h("src",e.imageUrl,L)("alt",e.title)}}function Ca(t,n){t&1&&(r(0,"div",253),g(1,"i",257),a())}function ha(t,n){if(t&1){let e=v();r(0,"div",256)(1,"div",258)(2,"div",259)(3,"label",260),l(4),d(5,"translate"),a(),r(6,"p-inputNumber",261),M("ngModelChange",function(o){x(e);let _=p().$implicit;return R(_.refundAmount,o)||(_.refundAmount=o),S(o)}),a(),r(7,"small",22),l(8),a()(),r(9,"div",262)(10,"p-inputSwitch",246),M("ngModelChange",function(o){x(e);let _=p().$implicit;return R(_.restock,o)||(_.restock=o),S(o)}),a(),r(11,"span",263),l(12),d(13,"translate"),a()()()()}if(t&2){let e=p().$implicit,c=p(3);i(4),C(s(5,9,"MANAGER.SHOP.REFUND_ITEM_AMOUNT")),i(2),A(w(13,H)),O("ngModel",e.refundAmount),h("min",.01)("max",e.totalCents/100),i(2),u("Max: ",c.formatPrice(e.totalCents,c.order.currency),""),i(2),O("ngModel",e.restock),i(2),C(s(13,11,"MANAGER.SHOP.REFUND_RESTOCK_ITEM"))}}function xa(t,n){if(t&1){let e=v();r(0,"div",249)(1,"div",250)(2,"p-checkbox",251),M("ngModelChange",function(o){let _=x(e).$implicit;return R(_.selected,o)||(_.selected=o),S(o)}),f("onChange",function(){let o=x(e).$implicit,_=p(3);return S(_.onRefundItemToggle(o))}),a(),E(3,ga,1,2,"img",252)(4,Ca,2,0,"div",253),r(5,"div",254)(6,"div",255),l(7),a(),r(8,"div",16),l(9),a()()(),E(10,ha,14,14,"div",256),a()}if(t&2){let e=n.$implicit,c=p(3);i(2),O("ngModel",e.selected),h("binary",!0),i(),m(e.imageUrl?3:4),i(4),u(" ",e.title," "),i(2),N(" x",e.quantity," \u2014 ",c.formatPrice(e.totalCents,c.order.currency)," "),i(),m(e.selected?10:-1)}}function Sa(t,n){if(t&1){let e=v();r(0,"div",245)(1,"p-checkbox",264),M("ngModelChange",function(o){x(e);let _=p(3);return R(_.refundShipping,o)||(_.refundShipping=o),S(o)}),a(),r(2,"label",247),l(3),d(4,"translate"),r(5,"span",8),l(6),a()()()}if(t&2){let e=p(3);i(),O("ngModel",e.refundShipping),h("binary",!0),i(2),u(" ",s(4,4,"MANAGER.SHOP.REFUND_SHIPPING")," "),i(3),u("(",e.formatPrice(e.order.shippingCents,e.order.currency),")")}}function Ea(t,n){if(t&1&&(r(0,"div",216)(1,"label",248),l(2),d(3,"translate"),a(),P(4,xa,11,7,"div",249,F),a(),E(6,Sa,7,6,"div",245),r(7,"div",243)(8,"span",68),l(9),d(10,"translate"),a(),r(11,"span",244),l(12),a()()),t&2){let e=p(2);i(2),C(s(3,4,"MANAGER.SHOP.REFUND_SELECT_ITEMS")),i(2),D(e.refundItems),i(2),m(e.order.shippingCents>0?6:-1),i(3),C(s(10,6,"MANAGER.SHOP.REFUND_TOTAL")),i(3),C(e.formatPrice(e.refundTotalCents,e.order.currency))}}function va(t,n){if(t&1){let e=v();r(0,"p-button",226),d(1,"translate"),f("onClick",function(){x(e);let o=p(2);return S(o.showRefundDialog=!1)}),a(),r(2,"p-button",265),d(3,"translate"),d(4,"translate"),f("onClick",function(){x(e);let o=p(2);return S(o.submitRefund())}),a()}if(t&2){let e=p(2);h("label",s(1,6,"COMMON.CANCEL"))("text",!0),i(2),h("label",e.refundCompensationMode==="store_credit"?s(3,8,"MANAGER.SHOP.REFUND_SUBMIT_STORE_CREDIT"):s(4,10,"MANAGER.SHOP.REFUND_SUBMIT"))("severity",e.refundCompensationMode==="store_credit"?"warn":"danger")("loading",e.refunding)("disabled",e.refundType==="partial"&&e.refundTotalCents<=0)}}function fa(t,n){if(t&1){let e=v();r(0,"p-dialog",215),d(1,"translate"),M("visibleChange",function(o){x(e);let _=p();return R(_.showRefundDialog,o)||(_.showRefundDialog=o),S(o)}),r(2,"div",216)(3,"label",217),l(4),d(5,"translate"),a(),r(6,"p-select",218),d(7,"translate"),d(8,"translate"),M("ngModelChange",function(o){x(e);let _=p();return R(_.refundType,o)||(_.refundType=o),S(o)}),a()(),r(9,"div",216)(10,"label",217),l(11),d(12,"translate"),a(),r(13,"p-select",218),d(14,"translate"),d(15,"translate"),M("ngModelChange",function(o){x(e);let _=p();return R(_.refundCompensationMode,o)||(_.refundCompensationMode=o),S(o)}),a(),E(16,ma,9,7),a(),E(17,ua,11,8)(18,Ea,13,8),r(19,"div",216)(20,"label",217),l(21),d(22,"translate"),a(),r(23,"textarea",239),d(24,"translate"),M("ngModelChange",function(o){x(e);let _=p();return R(_.refundReason,o)||(_.refundReason=o),S(o)}),a()(),E(25,va,5,12,"ng-template",null,1,G),a()}if(t&2){let e=p();A(w(40,vt)),O("visible",e.showRefundDialog),h("modal",!0)("header",s(1,22,"MANAGER.SHOP.ORDER_REFUND_TITLE")),i(4),C(s(5,24,"MANAGER.SHOP.REFUND_TYPE_LABEL")),i(2),A(w(41,H)),h("options",z(46,rt,k(42,ft,s(7,26,"MANAGER.SHOP.REFUND_TYPE_FULL")),k(44,Ot,s(8,28,"MANAGER.SHOP.REFUND_TYPE_PARTIAL")))),O("ngModel",e.refundType),i(5),C(s(12,30,"MANAGER.SHOP.REFUND_COMPENSATION_LABEL")),i(2),A(w(49,H)),h("options",z(54,rt,k(50,Rt,s(14,32,"MANAGER.SHOP.REFUND_COMPENSATION_MONEY")),k(52,Mt,s(15,34,"MANAGER.SHOP.REFUND_COMPENSATION_STORE_CREDIT")))),O("ngModel",e.refundCompensationMode),i(3),m(e.refundCompensationMode==="store_credit"?16:-1),i(),m(e.refundType==="full"?17:-1),i(),m(e.refundType==="partial"?18:-1),i(3),C(s(22,36,"MANAGER.SHOP.REFUND_REASON")),i(2),O("ngModel",e.refundReason),h("rows",3)("placeholder",s(24,38,"MANAGER.SHOP.REFUND_REASON_PLACEHOLDER"))}}function Oa(t,n){if(t&1){let e=v();r(0,"p-inputNumber",268),M("ngModelChange",function(o){x(e);let _=p().$implicit;return R(_.shipQuantity,o)||(_.shipQuantity=o),S(o)}),a(),r(1,"span",16),l(2),a()}if(t&2){let e=p().$implicit;A(w(7,At)),O("ngModel",e.shipQuantity),h("min",1)("max",e.remaining)("showButtons",!0),i(2),u("/ ",e.remaining,"")}}function Ra(t,n){if(t&1){let e=v();r(0,"div",266)(1,"p-checkbox",264),M("ngModelChange",function(o){let _=x(e).$implicit;return R(_.selected,o)||(_.selected=o),S(o)}),a(),r(2,"span",267),l(3),a(),E(4,Oa,3,8),a()}if(t&2){let e=n.$implicit;i(),O("ngModel",e.selected),h("binary",!0),i(2),C(e.title),i(),m(e.selected?4:-1)}}function Ma(t,n){if(t&1){let e=v();r(0,"div",216)(1,"label",217),l(2),d(3,"translate"),a(),r(4,"input",223),M("ngModelChange",function(o){x(e);let _=p(2);return R(_.shipmentTrackingUrl,o)||(_.shipmentTrackingUrl=o),S(o)}),a()()}if(t&2){let e=p(2);i(2),C(s(3,2,"MANAGER.SHOP.ORDER_TRACKING_LINK")),i(2),O("ngModel",e.shipmentTrackingUrl)}}function ya(t,n){t&1&&(r(0,"div",216)(1,"small",87),g(2,"i",224),l(3),d(4,"translate"),a()()),t&2&&(i(3),u("",s(4,1,"MANAGER.SHOP.ORDER_TRACKING_AUTO")," "))}function Aa(t,n){if(t&1){let e=v();r(0,"p-button",226),d(1,"translate"),f("onClick",function(){x(e);let o=p(2);return S(o.showShipmentDialog=!1)}),a(),r(2,"p-button",269),d(3,"translate"),f("onClick",function(){x(e);let o=p(2);return S(o.submitShipment())}),a()}if(t&2){let e=p(2);h("label",s(1,5,"COMMON.CANCEL"))("text",!0),i(2),h("label",s(3,7,"MANAGER.SHOP.SHIPMENT_SUBMIT"))("loading",e.creatingShipment)("disabled",!e.hasSelectedShipmentItems)}}function wa(t,n){if(t&1){let e=v();r(0,"p-dialog",215),d(1,"translate"),M("visibleChange",function(o){x(e);let _=p();return R(_.showShipmentDialog,o)||(_.showShipmentDialog=o),S(o)}),r(2,"div",216)(3,"label",217),l(4),d(5,"translate"),a(),P(6,Ra,5,4,"div",266,F),a(),r(8,"div",216)(9,"label",217),l(10),d(11,"translate"),a(),r(12,"p-select",221),d(13,"translate"),M("ngModelChange",function(o){x(e);let _=p();return R(_.shipmentCarrier,o)||(_.shipmentCarrier=o),S(o)}),a()(),r(14,"div",216)(15,"label",217),l(16),d(17,"translate"),a(),r(18,"input",222),M("ngModelChange",function(o){x(e);let _=p();return R(_.shipmentTrackingNumber,o)||(_.shipmentTrackingNumber=o),S(o)}),a()(),E(19,Ma,5,4,"div",216)(20,ya,5,3,"div",216),r(21,"div",216)(22,"label",217),l(23),d(24,"translate"),a(),r(25,"p-datepicker",225),d(26,"translate"),M("ngModelChange",function(o){x(e);let _=p();return R(_.shipmentEstimatedDelivery,o)||(_.shipmentEstimatedDelivery=o),S(o)}),a()(),E(27,Aa,4,9,"ng-template",null,1,G),a()}if(t&2){let e=p();A(w(37,yt)),O("visible",e.showShipmentDialog),h("modal",!0)("header",s(1,23,"MANAGER.SHOP.SHIPMENT_ADD")),i(4),C(s(5,25,"MANAGER.SHOP.SHIPMENT_SELECT_ITEMS")),i(2),D(e.shipmentItems),i(4),C(s(11,27,"MANAGER.SHOP.ORDER_CARRIER")),i(2),A(w(38,H)),h("options",e.carrierOptions),O("ngModel",e.shipmentCarrier),h("placeholder",s(13,29,"MANAGER.SHOP.ORDER_CARRIER_PLACEHOLDER")),i(4),C(s(17,31,"MANAGER.SHOP.ORDER_TRACKING_NUMBER")),i(2),O("ngModel",e.shipmentTrackingNumber),i(),m(e.shipmentCarrier==="other"?19:-1),i(),m(e.shipmentCarrier&&e.shipmentCarrier!=="other"&&e.shipmentTrackingNumber?20:-1),i(3),C(s(24,33,"MANAGER.SHOP.ORDER_ESTIMATED_DELIVERY")),i(2),A(w(39,H)),O("ngModel",e.shipmentEstimatedDelivery),h("minDate",e.today)("showIcon",!0)("placeholder",s(26,35,"MANAGER.SHOP.ORDER_ESTIMATED_DELIVERY_PLACEHOLDER"))}}function ba(t,n){t&1&&(r(0,"div",275),g(1,"i",278),a())}function Ia(t,n){t&1&&(r(0,"div",276),l(1),d(2,"translate"),a()),t&2&&(i(),u(" ",s(2,1,"MANAGER.SHOP.SERVICE_POINT_NONE")," "))}function Ta(t,n){t&1&&(r(0,"span",279),l(1),d(2,"translate"),a()),t&2&&(i(),C(s(2,1,"MANAGER.SHOP.SERVICE_POINT_CURRENT")))}function Pa(t,n){if(t&1){let e=v();r(0,"div",124),f("click",function(){let o=x(e).$implicit,_=p(3);return S(_.selectServicePoint(o))}),r(1,"div",142),g(2,"i",146),a(),r(3,"div",127)(4,"div",128),l(5),E(6,Ta,3,3,"span",279),a(),r(7,"div",129),l(8),a()(),g(9,"i",130),a()}if(t&2){let e=n.$implicit,c=p(3);T("action-item--disabled",c.changingServicePoint),i(5),u(" ",e.name," "),i(),m(c.currentServicePointId===e.id+""?6:-1),i(2),$(" ",e.street," ",e.house_number," \u2014 ",e.postal_code," ",e.city," ")}}function Da(t,n){if(t&1&&(r(0,"div",277),P(1,Pa,10,8,"div",37,B),a()),t&2){let e=p(2);i(),D(e.servicePoints)}}function Na(t,n){if(t&1){let e=v();r(0,"p-dialog",215),d(1,"translate"),M("visibleChange",function(o){x(e);let _=p();return R(_.servicePointDialogVisible,o)||(_.servicePointDialogVisible=o),S(o)}),r(2,"p",270),l(3),d(4,"translate"),a(),r(5,"div",271)(6,"input",272),d(7,"translate"),M("ngModelChange",function(o){x(e);let _=p();return R(_.servicePointSearchPostalCode,o)||(_.servicePointSearchPostalCode=o),S(o)}),f("keyup.enter",function(){x(e);let o=p();return S(o.loadServicePoints())}),a(),r(8,"button",273),f("click",function(){x(e);let o=p();return S(o.loadServicePoints())}),g(9,"i",274),a()(),E(10,ba,2,0,"div",275)(11,Ia,3,3,"div",276)(12,Da,3,0,"div",277),a()}if(t&2){let e=p();A(w(22,dt)),O("visible",e.servicePointDialogVisible),h("modal",!0)("header",s(1,
116,"MANAGER.SHOP.SERVICE_POINT_CHANGE")),i(3),u(" ",s(4,18,"MANAGER.SHOP.SERVICE_POINT_CHANGE_HELP")," "),i(3),O("ngModel",e.servicePointSearchPostalCode),h("placeholder",s(7,20,"MANAGER.SHOP.SERVICE_POINT_POSTAL_CODE")),i(2),h("disabled",e.loadingServicePoints),i(),T("pi-search",!e.loadingServicePoints)("pi-spinner",e.loadingServicePoints)("pi-spin",e.loadingServicePoints),i(),m(e.loadingServicePoints?10:e.servicePoints.length===0?11:12)}}function Va(t,n){t&1&&(r(0,"div",283),g(1,"i",285),l(2),d(3,"translate"),a()),t&2&&(i(2),u(" ",s(3,1,"MANAGER.SHOP.LABEL_RECIPIENT_REQUIRED")," "))}function ka(t,n){if(t&1){let e=v();r(0,"p-button",226),d(1,"translate"),f("onClick",function(){x(e);let o=p(2);return S(o.labelDialogVisible=!1)}),a(),r(2,"p-button",286),d(3,"translate"),f("onClick",function(){x(e);let o=p(2);return S(o.confirmGenerateLabel())}),a()}if(t&2){let e=p(2);h("label",s(1,5,"COMMON.CANCEL"))("text",!0),i(2),h("label",s(3,7,"MANAGER.SHOP.LABEL_GENERATE"))("loading",e.generatingLabel)("disabled",e.labelRecipientMissing)}}function Ha(t,n){if(t&1){let e=v();r(0,"p-dialog",215),d(1,"translate"),M("visibleChange",function(o){x(e);let _=p();return R(_.labelDialogVisible,o)||(_.labelDialogVisible=o),S(o)}),r(2,"p",270),l(3),d(4,"translate"),a(),r(5,"div",216)(6,"label",280),l(7),d(8,"translate"),a(),r(9,"input",281),d(10,"translate"),M("ngModelChange",function(o){x(e);let _=p();return R(_.labelRecipientName,o)||(_.labelRecipientName=o),S(o)}),a(),r(11,"div",282),l(12),d(13,"translate"),a(),E(14,Va,4,3,"div",283),a(),r(15,"div",216)(16,"label",280),l(17),d(18,"translate"),a(),r(19,"p-inputNumber",284),M("ngModelChange",function(o){x(e);let _=p();return R(_.labelWeightGrams,o)||(_.labelWeightGrams=o),S(o)}),a(),r(20,"div",282),l(21),d(22,"translate"),a()(),E(23,ka,4,9,"ng-template",null,1,G),a()}if(t&2){let e=p();A(w(32,wt)),O("visible",e.labelDialogVisible),h("modal",!0)("header",s(1,18,"MANAGER.SHOP.LABEL_CONFIRM_TITLE")),i(3),u(" ",s(4,20,"MANAGER.SHOP.LABEL_CONFIRM_HELP")," "),i(4),C(s(8,22,"MANAGER.SHOP.LABEL_RECIPIENT")),i(2),O("ngModel",e.labelRecipientName),h("placeholder",s(10,24,"MANAGER.SHOP.LABEL_RECIPIENT_PLACEHOLDER")),i(3),u(" ",s(13,26,"MANAGER.SHOP.LABEL_RECIPIENT_HELP")," "),i(2),m(e.labelRecipientMissing?14:-1),i(3),C(s(18,28,"MANAGER.SHOP.LABEL_WEIGHT")),i(2),O("ngModel",e.labelWeightGrams),h("min",1)("max",3e4)("step",50)("showButtons",!0),i(2),u(" ",s(22,30,"MANAGER.SHOP.LABEL_WEIGHT_HELP")," ")}}function La(t,n){t&1&&(r(0,"div",275),g(1,"i",278),a())}function Ga(t,n){t&1&&(r(0,"div",276),l(1),d(2,"translate"),a()),t&2&&(i(),u(" ",s(2,1,"MANAGER.SHOP.SHIPPING_METHOD_NONE")," "))}function Ba(t,n){t&1&&(r(0,"span",279),l(1),d(2,"translate"),a()),t&2&&(i(),C(s(2,1,"MANAGER.SHOP.SHIPPING_METHOD_RELAY")))}function Ua(t,n){if(t&1){let e=v();r(0,"div",124),f("click",function(){let o=x(e).$implicit,_=p(3);return S(_.selectShippingMethod(o))}),r(1,"div",144),g(2,"i",143),a(),r(3,"div",127)(4,"div",128),l(5),a(),r(6,"div",129),l(7),d(8,"number"),E(9,Ba,3,3,"span",279),a()(),g(10,"i",130),a()}if(t&2){let e=n.$implicit,c=p(3);T("action-item--disabled",c.settingShippingMethod),i(5),u(" ",e.name," "),i(2),N(" ",e.carrierLabel," \u2014 ",I(8,6,e.priceCents/100,"1.2-2")," \u20AC "),i(2),m(e.servicePointInput==="required"?9:-1)}}function Fa(t,n){if(t&1&&(r(0,"div",277),P(1,Ua,11,9,"div",37,B),a()),t&2){let e=p(2);i(),D(e.shippingMethods)}}function Wa(t,n){if(t&1){let e=v();r(0,"p-dialog",215),d(1,"translate"),M("visibleChange",function(o){x(e);let _=p();return R(_.shippingMethodDialogVisible,o)||(_.shippingMethodDialogVisible=o),S(o)}),r(2,"p",270),l(3),d(4,"translate"),a(),E(5,La,2,0,"div",275)(6,Ga,3,3,"div",276)(7,Fa,3,0,"div",277),a()}if(t&2){let e=p();A(w(11,dt)),O("visible",e.shippingMethodDialogVisible),h("modal",!0)("header",s(1,7,"MANAGER.SHOP.SHIPPING_METHOD_PICK")),i(3),u(" ",s(4,9,"MANAGER.SHOP.SHIPPING_METHOD_PICK_HELP")," "),i(2),m(e.loadingShippingMethods?5:e.shippingMethods.length===0?6:7)}}var ot=class t{deliveryModeKey(n){return at(n?.shippingDeliveryType)}freeShippingReasonKey(n){let e={seller_threshold:"MANAGER.SHOP.ORDER_FREE_REASON_THRESHOLD",promo_code:"MANAGER.SHOP.ORDER_FREE_REASON_PROMO",local_pickup:"MANAGER.SHOP.ORDER_FREE_REASON_PICKUP",merge_same_tier:"MANAGER.SHOP.ORDER_FREE_REASON_SAME_TIER",no_shipping_required:"MANAGER.SHOP.ORDER_FREE_REASON_NO_SHIPPING",platform_defect:"MANAGER.SHOP.ORDER_FREE_REASON_PLATFORM"};return n?.freeShippingReason?e[n.freeShippingReason]??null:null}sellerBearsShippingCost(n){return!!n?.shippingRetainedByPlatform&&(n?.shippingCostRealCents??0)>0}shippingGapCents(n){return(n?.shippingCents??0)-(n?.shippingCostRealCents??0)}route=V(de);router=V(pe);shopService=V(Ze);ticketService=V(et);toastService=V(ue);confirmService=V(je);clipboard=V(Se);t=V(K);localizedDate=new We(V(K));printService=V(tt);loading=!0;error=null;order=null;orderId="";today=new Date;customerHistory=null;loadingHistory=!1;receiptUrl=null;loadingReceipt=!1;invoice=null;loadingInvoice=!1;uploadingInvoice=!1;carriers=[];carrierOptions=[];showStatusDialog=!1;newStatus="processing";selectedCarrier="";trackingNumber="";trackingUrl="";sellerNotes="";estimatedDeliveryAt=null;updatingStatus=!1;showTrackingDialog=!1;editCarrier="";editTrackingNumber="";editTrackingUrl="";updatingTracking=!1;showShipmentDialog=!1;shipmentCarrier="";shipmentTrackingNumber="";shipmentTrackingUrl="";shipmentEstimatedDelivery=null;creatingShipment=!1;shipmentItems=[];showRefundDialog=!1;refundType="full";refundCompensationMode="money";refundReason="";refundRestockItems=!0;refunding=!1;refundItems=[];refundShipping=!1;chatWidget;orderTicket=null;loadingTicket=!1;socketSubscription=null;timelineEvents=[];batchStartIndexes=new Set;hasMultipleBatches=!1;cartExtensionCount=0;refundHistory=[];loadingRefundHistory=!1;statusOptions=[];ngOnInit(){if(this.statusOptions.push({label:this.t.instant("MANAGER.SHOP.ORDER_STATUS_PROCESSING"),value:"processing"},{label:this.t.instant("MANAGER.SHOP.ORDER_STATUS_SHIPPED"),value:"shipped"},{label:this.t.instant("MANAGER.SHOP.ORDER_STATUS_DELIVERED"),value:"delivered"},{label:this.t.instant("MANAGER.SHOP.ORDER_STATUS_RETURN_IN_TRANSIT"),value:"return_in_transit"},{label:this.t.instant("MANAGER.SHOP.ORDER_STATUS_RETURNED"),value:"returned"},{label:this.t.instant("MANAGER.SHOP.ORDER_STATUS_CANCELLED"),value:"cancelled"}
1),this.orderId=this.route.snapshot.paramMap.get("id")||"",!this.orderId){this.router.navigate(["/studio/shop/orders"]);return}this.loadOrder(),this.loadCarriers(),this.connectSocket()}ngOnDestroy(){this.socketSubscription&&(this.socketSubscription.close(),this.socketSubscription=null)}loadOrder(){return y(this,null,function*(){this.loading=!0,this.error=null;try{this.order=yield this.shopService.getOrder(this.orderId),this.buildTimeline(),this.loadCustomerHistory(),this.loadRefundHistory(),this.loadReceipt(),this.loadInvoice(),this.loadOrderTicket()}catch{this.error="load"}finally{this.loading=!1}})}loadCarriers(){return y(this,null,function*(){try{this.carriers=yield this.shopService.getCarriers(),this.carrierOptions=this.carriers.map(n=>({label:n.label,value:n.code}))}catch{}})}loadCustomerHistory(){return y(this,null,function*(){this.loadingHistory=!0;try{this.customerHistory=yield this.shopService.getCustomerHistory(this.orderId)}catch{}finally{this.loadingHistory=!1}})}loadRefundHistory(){return y(this,null,function*(){this.loadingRefundHistory=!0;try{this.refundHistory=yield this.shopService.getOrderRefundHistory(this.orderId)}catch{this.refundHistory=[]}finally{this.loadingRefundHistory=!1}})}loadReceipt(){return y(this,null,function*(){if(this.order?.stripePaymentIntentId){this.loadingReceipt=!0;try{let n=yield this.shopService.getOrderReceiptUrl(this.orderId);this.receiptUrl=n.receiptUrl}catch{}finally{this.loadingReceipt=!1}}})}loadInvoice(){return y(this,null,function*(){this.loadingInvoice=!0;try{this.invoice=yield this.shopService.getOrderInvoiceInfo(this.orderId)}catch{}finally{this.loadingInvoice=!1}})}downloadInvoice(){return y(this,null,function*(){try{let n=yield this.shopService.downloadOrderInvoice(this.orderId),e=URL.createObjectURL(n),c=document.createElement("a");c.href=e,c.download=`${this.invoice?.invoiceNumber||"facture"}.pdf`,c.click(),URL.revokeObjectURL(e)}catch{this.toastService.error(this.t.instant("COMMON.ERROR"))}})}onInvoiceFileSelected(n){return y(this,null,function*(){let e=n.target,c=e.files?.[0];if(c){if(c.type!=="application/pdf"){this.toastService.error(this.t.instant("MANAGER.SHOP.INVOICE_PDF_ONLY"));return}this.uploadingInvoice=!0;try{this.invoice=yield this.shopService.uploadOrderInvoice(this.orderId,c),this.toastService.success(this.t.instant("MANAGER.SHOP.INVOICE_UPLOADED"))}catch{this.toastService.error(this.t.instant("COMMON.ERROR"))}finally{this.uploadingInvoice=!1,e.value=""}}})}deleteInvoice(){return y(this,null,function*(){if(yield this.confirmService.confirm({message:this.t.instant("MANAGER.SHOP.INVOICE_DELETE_CONFIRM"),header:this.t.instant("MANAGER.SHOP.INVOICE_DELETE_TITLE"),severity:"danger",acceptLabel:this.t.instant("COMMON.DELETE"),rejectLabel:this.t.instant("COMMON.CANCEL")}))try{this.invoice=yield this.shopService.deleteOrderInvoice(this.orderId),this.toastService.success(this.t.instant("MANAGER.SHOP.INVOICE_REVERTED"))}catch{this.toastService.error(this.t.instant("COMMON.ERROR"))}})}openStatusUpdate(){this.order&&(this.newStatus=this.order.status==="paid"?"processing":"shipped",this.selectedCarrier=this.order.carrier||"",this.trackingNumber=this.order.trackingNumber||"",this.trackingUrl=this.order.trackingUrl||"",this.sellerNotes=this.order.sellerNotes||"",this.estimatedDeliveryAt=this.order.estimatedDeliveryAt?new Date(this.order.estimatedDeliveryAt):null,this.showStatusDialog=!0)}submitStatusUpdate(){return y(this,null,function*(){if(this.order){this.updatingStatus=!0;try{yield this.shopService.updateOrderStatus(this.order.id,this.newStatus,{carrier:this.selectedCarrier||void 0,trackingNumber:this.trackingNumber||void 0,trackingUrl:this.selectedCarrier==="other"&&this.trackingUrl||void 0,sellerNotes:this.sellerNotes||void 0,estimatedDeliveryAt:this.estimatedDeliveryAt?this.estimatedDeliveryAt.toISOString():void 0}),this.toastService.success(this.t.instant("MANAGER.SHOP.ORDER_STATUS_UPDATED")),this.showStatusDialog=!1,this.loadOrder()}catch{this.toastService.error(this.t.instant("COMMON.ERROR"))}finally{this.updatingStatus=!1}}})}get canEditTracking(){return!!this.order&&["shipped","delivered"].includes(this.order.status)}openTrackingEdit(){this.order&&(this.editCarrier=this.order.carrier||"",this.editTrackingNumber=this.order.trackingNumber||"",this.editTrackingUrl=this.order.trackingUrl||"",this.showTrackingDialog=!0)}submitTrackingUpdate(){return y(this,null,function*(){if(this.order){this.updatingTracking=!0;try{yield this.shopService.updateOrderTracking(this.order.id,{carrier:this.editCarrier||void 0,trackingNumber:this.editTrackingNumber||void 0,trackingUrl:this.editCarrier==="other"&&this.editTrackingUrl||void 0}),this.toastService.success(this.t.instant("MANAGER.SHOP.ORDER_TRACKING_UPDATED")),this.showTrackingDialog=!1,this.loadOrder()}catch{this.toastService.error(this.t.instant("COMMON.ERROR"))}finally{this.updatingTracking=!1}}})}markDelivered(){return y(this,null,function*(){if(this.order){this.updatingStatus=!0;try{yield this.shopService.updateOrderStatus(this.order.id,"delivered",{}),this.toastService.success(this.t.instant("MANAGER.SHOP.ORDER_STATUS_UPDATED")),this.loadOrder()}catch{this.toastService.error(this.t.instant("COMMON.ERROR"))}finally{this.updatingStatus=!1}}})}get unshippedItems(){return this.order?nt(this.order.lineItems,this.order.shipments):[]}get hasSelectedShipmentItems(){return this.shipmentItems.some(n=>n.selected&&n.shipQuantity>0)}getLineItemTitle(n,e){return this.order?.lineItems.find(o=>o.productId===n&&(o.variantId||null)===(e||null))?.title||n}openShipmentDialog(){this.shipmentCarrier="",this.shipmentTrackingNumber="",this.shipmentTrackingUrl="",this.shipmentEstimatedDelivery=null,this.shipmentItems=this.unshippedItems.map(n=>Y(U({},n),{selected:!0,shipQuantity:n.remaining})),this.showShipmentDialog=!0}submitShipment(){return y(this,null,function*(){if(!(!this.order||!this.hasSelectedShipmentItems)){this.creatingShipment=!0;try{let n=this.shipmentItems.filter(e=>e.selected&&e.shipQuantity>0).map(e=>({productId:e.productId,variantId:e.variantId,quantity:e.shipQuantity}));yield this.shopService.addShipment(this.order.id,{carrier:this.shipmentCarrier||void 0,trackingNumber:this.shipmentTrackingNumber||void 0,trackingUrl:this.shipmentCarrier==="other"&&this.shipmentTrackingUrl||void 0,estimatedDeliveryAt:this.shipmentEstimatedDelivery?this.shipmentEstimatedDelivery.toISOString():void 0,items:n}),this.toastService.success(this.t.instant("MANAGER.SHOP.SHIPMENT_CREATED")),this.showShipmentDialog=!1,this.loadOrder()}catch{this.toastService.error(this.t.instant("COMMON.ERROR"))}finally{this.creatingShipment=!1}}})}openRefundDialog(){this.order&&(this.refundType="full",this.refundCompensationMode="money",this.refundReason="",this.refundRestockItems=!0,this.refundShipping=!1,this.refundItems=this.order.lineItems.map(n=>({productId:n.productId,variantId:n.variantId,title:n.title,imageUrl:n.imageUrl,quantity:n.quantity,unitPriceCents:n.unitPriceCents,totalCents:n.totalCents,selected:!1,refundAmount:n.totalCents/100,restock:!0})),this.showRefundDialog=!0)}get refundTotalCents(){let n=this.refundItems.filter(c=>c.selected).reduce((c,o)=>c+Math.round(o.refundAmount*100),0),e=this.refundShipping&&this.order?this.order.shippingCents:0;return n+e}onRefundItemToggle(n){n.selected||(n.refundAmount=n.totalCents/100,n.restock=!0)}submitRefund(){return y(this,null,function*(){if(!this.order)return;let n,e;if(this.refundType==="partial"){let _=this.refundItems.filter(b=>b.selected);if(_.length===0&&!this.refundShipping||(n=this.refundTotalCents,n<=0))return;e=_.map(b=>({productId:b.productId,variantId:b.variantId,amountCents:Math.round(b.refundAmount*100),restock:b.restock}))}let c=this.refundCompensationMode==="store_credit"?this.refundType==="full"?this.t.instant("MANAGER.SHOP.REFUND_CONFIRM_FULL_STORE_CREDIT"):this.t.instant("MANAGER.SHOP.REFUND_CONFIRM_PARTIAL_STORE_CREDIT",{amount:this.formatPrice(n||0)}):this.refundType==="full"?this.t.instant("MANAGER.SHOP.REFUND_CONFIRM_FULL"):this.t.instant("MANAGER.SHOP.REFUND_CONFIRM_PARTIAL",{amount:this.formatPrice(n||0)});if(yield this.confirmService.confirm({message:c,header:this.t.instant("MANAGER.SHOP.REFUND_CONFIRM_TITLE"),severity:"danger",acceptLabel:this.t.instant("MANAGER.SHOP.REFUND_CONFIRM_YES"),rejectLabel:this.t.instant("COMMON.CANCEL")})){this.refunding=!0;try{let _=yield this.shopService.refundOrder(this.order.id,{type:this.refundType,compensationMode:this.refundCompensationMode,amountCents:this.refundType==="partial"?n:void 0,restockItems:this.refundType==="full"?this.refundRestockItems:void 0,items:this.refundType==="partial"?e:void 0,refundShipping:this.refundType==="partial"?this.refundShipping:void 0,reason:this.refundReason||void 0});this.toastService.success(this.refundCompensationMode==="store_credit"?this.t.instant("MANAGER.SHOP.REFUND_SUCCESS_STORE_CREDIT",{code:_.storeCreditCode||""}):this.t.instant("MANAGER.SHOP.REFUND_SUCCESS")),this.showRefundDialog=!1,this.loadOrder()}catch(_){this.toastService.error(_?.error?.message||this.t.instant("COMMON.ERROR"))}finally{this.refunding=!1}}})}loadOrderTicket(){return y(this,null,function*(){this.loadingTicket=!0;try{let n=yield this.ticketService.findAll({orderId:this.orderId,limit:1});if(n.data.length>0){let e=yield this.ticketService.findOne(n.data[0].id);this.orderTicket=e.ticket}}catch{}finally{this.loadingTicket=!1}})}onChatMessageSent(n){return y(this,null,function*(){try{let{files:e}=this.chatWidget?.detachSelectedImages()||{files:[]};if(!this.orderTicket){let _=`${this.t.instant("MANAGER.SHOP.ORDER_DETAIL_TITLE")} #${this.orderId.substring(0,8)}`,b=yield this.ticketService.create({subject:_,message:n.message,orderId:this.orderId}),pt=yield this.ticketService.findOne(b.ticketId);if(this.orderTicket=pt.ticket,e.length>0){let st=yield this.ticketService.uploadImages(b.ticketId,e),ct=yield this.ticketService.reply(b.ticketId,{message:"",attachments:st});this.orderTicket.messages&&(this.orderTicket.messages=[...this.orderTicket.messages,ct.message]),this.orderTicket.messageCount+=1}this.chatWidget?.resetForm(),this.connectSocket();return}let c;e.length>0&&(c=yield this.ticketService.uploadImages(this.orderTicket.id,e));let o=yield this.ticketService.reply(this.orderTicket.id,{message:n.message,attachments:c});if(this.orderTicket.messages){let _=this.orderTicket.messages.findIndex(b=>b.id===o.message.id);_>=0?(this.orderTicket.messages[_]=o.message,this.orderTicket.messages=[...this.orderTicket.messages]):(this.orderTicket.messages=[...this.orderTicket.messages,o.message],this.orderTicket.messageCount+=1)}this.chatWidget?.resetForm(),setTimeout(()=>this.chatWidget?.scrollToLatest())}catch{this.chatWidget?.markSendingDone(),this.toastService.error(this.t.instant("COMMON.ERROR"))}})}connectSocket(){this.socketSubscription=this.ticketService.connectStream(n=>{if(n.type==="new_message"&&n.message&&this.orderTicket&&this.orderTicket.id===n.ticketId)this.orderTicket.messages?.some(c=>
1c.id===n.message.id)||(this.orderTicket.messages=[...this.orderTicket.messages||[],n.message],this.orderTicket.messageCount+=1,setTimeout(()=>this.chatWidget?.scrollToLatest()));else if(n.type==="link_preview_update"&&n.messageId&&n.linkPreviews&&this.orderTicket&&this.orderTicket.id===n.ticketId){let e=this.orderTicket.messages?.find(c=>c.id===n.messageId);e&&(e.linkPreviews=n.linkPreviews)}})}static TIMELINE_ICONS={order_created:"pi-shopping-cart",order_paid:"pi-credit-card",items_added:"pi-plus-circle",cart_opened:"pi-lock-open",cart_extended:"pi-clock",cart_grace_started:"pi-hourglass",cart_reminder_sent:"pi-envelope",cart_closed:"pi-lock",cart_reopened:"pi-replay",shipping_adjusted:"pi-box",order_shipped:"pi-truck",delivery_estimated:"pi-calendar",order_delivered:"pi-check-circle",order_return_started:"pi-replay",order_returned:"pi-box",order_cancelled:"pi-times-circle",order_refunded:"pi-replay"};static TIMELINE_SEVERITY={order_paid:"success",items_added:"info",cart_extended:"info",cart_grace_started:"info",shipping_adjusted:"info",order_shipped:"info",order_delivered:"success",order_return_started:"warn",order_returned:"warn",cart_closed:"success",order_cancelled:"danger",order_refunded:"danger"};buildTimeline(){this.timelineEvents=(this.order?.timeline??[]).filter(e=>!!t.TIMELINE_ICONS[e.type]).map(e=>({label:this.timelineLabel(e),subLabel:this.timelineSubLabel(e),date:e.at,icon:t.TIMELINE_ICONS[e.type],severity:t.TIMELINE_SEVERITY[e.type]??""}));let n=this.order?.lineItemBatches??[];this.batchStartIndexes=new Set(n.filter(e=>e.index>0&&e.itemIndexes.length>0).map(e=>e.itemIndexes[0])),this.hasMultipleBatches=n.length>1,this.cartExtensionCount=(this.order?.timeline??[]).filter(e=>e.type==="cart_extended").length}timelineLabel(n){if(n.type==="shipping_adjusted"){let c=n.payload?.addedCents??0;if(c>0)return this.t.instant("MANAGER.SHOP.TL_SHIPPING_ADJUSTED",{amount:this.formatPrice(c,n.payload?.currency)});let o=n.payload?.previousWeightGrams??null,_=n.payload?.newWeightGrams??null;return o!=null&&_!=null&&o!==_?this.t.instant("MANAGER.SHOP.TL_SHIPPING_ADJUSTED_NONE_WEIGHT_CHANGED",{from:o,to:_}):this.t.instant("MANAGER.SHOP.TL_SHIPPING_ADJUSTED_FREE")}let e="MANAGER.SHOP.TL_"+n.type.toUpperCase();return this.t.instant(e,{count:n.payload?.itemsCount??0,sequence:n.payload?.sequence??0,max:n.payload?.maxSequence??0,minutes:n.payload?.graceMinutes??0})}formatWeight(n){return!n||n<0?"0 g":n>=1e3?(n/1e3).toFixed(n%1e3===0?0:2)+" kg":Math.round(n)+" g"}untilLabel(n){let e=n.payload?.untilAt;if(!e)return null;let c=this.localizedDate.transform(e,"dd/MM/yyyy HH:mm");return c?this.t.instant("MANAGER.SHOP.TL_UNTIL",{date:c}):null}timelineSubLabel(n){switch(n.type){case"cart_opened":case"cart_reopened":return this.untilLabel(n);case"cart_extended":{let e=this.t.instant(n.payload?.source==="live"?"MANAGER.SHOP.TL_CART_EXTENDED_LIVE":n.payload?.source==="purchase"?"MANAGER.SHOP.TL_CART_EXTENDED_PURCHASE":"MANAGER.SHOP.TL_CART_EXTENDED_SELLER",{sequence:n.payload?.sequence??0,max:n.payload?.maxSequence??0}),c=this.untilLabel(n);return c?`${e} \xB7 ${c}`:e}case"cart_grace_started":{let e=n.payload?.reason;return["seller_offline","buyer_absent","cap_reached","superseded"].includes(e)?this.t.instant("MANAGER.SHOP.TL_CART_GRACE_"+String(e).toUpperCase()):this.untilLabel(n)}case"shipping_adjusted":{let e=n.payload?.previousWeightGrams??0,c=n.payload?.newWeightGrams??0;return!c||c===e?null:this.t.instant("MANAGER.SHOP.TL_SHIPPING_WEIGHT",{from:this.formatWeight(e),to:this.formatWeight(c)})}case"cart_closed":{let e=n.payload?.reason;return["expired","grace_expired","buyer","seller","shipped"].includes(e)?this.t.instant("MANAGER.SHOP.TL_CART_CLOSED_"+String(e).toUpperCase()):null}case"items_added":return this.formatPrice(n.payload?.subtotalCents??0,n.payload?.currency);case"order_shipped":return n.payload?.trackingNumber||null;case"order_refunded":return this.formatPrice(n.payload?.amountCents??0,n.payload?.currency);default:return null}}formatItemAddedAt(n){return this.localizedDate.transform(n,this.t.instant("MANAGER.SHOP.ORDER_ITEM_ADDED_FORMAT"))??""}trackLineItem=n=>n;goBack(){this.router.navigate(["/studio/shop/orders"])}formatPrice(n,e="EUR"){return(n/100).toFixed(2)+" "+e.toUpperCase()}getRefundModeLabel(n){switch(n){case"store_credit":return this.t.instant("MANAGER.SHOP.REFUND_COMPENSATION_STORE_CREDIT");case"mixed":return this.t.instant("MANAGER.SHOP.REFUND_COMPENSATION_MIXED");case"money":default:return this.t.instant("MANAGER.SHOP.REFUND_COMPENSATION_MONEY")}}get visibleSellerNote(){let n=this.order?.sellerNotes?.trim();return!n||n.startsWith("Merged into order ")?null:n}get buyerDisplayName(){return this.order?.buyerName||this.order?.buyerWorkspaceSnapshot?.displayName||null}get buyerHandle(){let n=this.order?.buyerWorkspaceSnapshot?.slug;return n?"@"+n.replace(/^@/,""):null}get buyerAvatarUrl(){return this.order?.buyerWorkspaceSnapshot?.avatarUrl||null}get buyerIsVerified(){return!!this.order?.buyerWorkspaceSnapshot?.isVerified}get buyerInitial(){return(this.buyerDisplayName||this.order?.buyerWorkspaceSnapshot?.slug||this.order?.buyerEmail||"?").replace(/^@/,"").charAt(0).toUpperCase()}get buyerWorkspaceName(){let n=this.order?.buyerWorkspaceSnapshot?.displayName;return!n||n===this.order?.buyerName?null:n}get openCartDeadline(){if(!this.isOpenCart||!this.order?.openUntil)return null;let n=new Date(this.order.openUntil);return Number.isNaN(n.getTime())?null:n}get openCartRemainingLabel(){let n=this.openCartDeadline;if(!n)return null;let e=n.getTime()-Date.now();if(e<=0)return null;
1let c=Math.floor(e/36e5);return c>=24?this.t.instant("MANAGER.SHOP.OPEN_CART_IN_DAYS",{count:Math.floor(c/24)}):c>=1?this.t.instant("MANAGER.SHOP.OPEN_CART_IN_HOURS",{count:c}):this.t.instant("MANAGER.SHOP.OPEN_CART_IN_MINUTES",{count:Math.max(1,Math.floor(e/6e4))})}get openCartOverdue(){let n=this.openCartDeadline;return!!n&&n.getTime()<=Date.now()}get storeLink(){return this.order?.ecommerceOrderLink||null}get storeLinkPlatformLabel(){let n=this.storeLink?.platform||"";return{woocommerce:"WooCommerce",shopify:"Shopify",prestashop:"PrestaShop",etsy:"Etsy"}[n]||n}get hasActionItems(){return!!(this.isOpenCart||this.canReopenCart||this.canUpdateStatus||this.canRefund||this.receiptUrl||this.canResyncEcommerce||this.canPickShippingMethod||this.canGenerateLabel||this.canChangeServicePoint||this.hasLabel)}getRefundReferenceLabel(){return this.order?.refundStoreCreditCode?this.t.instant("MANAGER.SHOP.REFUND_REFERENCE_STORE_CREDIT"):this.order?.refundStripeId?this.t.instant("MANAGER.SHOP.REFUND_REFERENCE_STRIPE"):null}getRefundReferenceValue(){return this.order?.refundStoreCreditCode||this.order?.refundStripeId||null}getRefundHistoryTypeLabel(n){return n==="partial"?this.t.instant("MANAGER.SHOP.REFUND_HISTORY_TYPE_PARTIAL"):this.t.instant("MANAGER.SHOP.REFUND_HISTORY_TYPE_FULL")}getRefundHistoryReferenceLabel(n){return n.storeCreditCode?this.t.instant("MANAGER.SHOP.REFUND_REFERENCE_STORE_CREDIT"):n.stripeRefundId?this.t.instant("MANAGER.SHOP.REFUND_REFERENCE_STRIPE"):null}getRefundHistoryReferenceValue(n){return n.storeCreditCode||n.stripeRefundId||null}getStatusSeverity(n){return{pending:"warn",open_cart:"warn",paid:"info",processing:"info",shipped:"warn",delivered:"success",cancelled:"danger",refunded:"secondary",partially_refunded:"warn"}[n]||"info"}getStatusLabel(n){return this.t.instant(`MANAGER.SHOP.ORDER_STATUS_${n.toUpperCase()}`)}getCarrierLabel(n){let e=this.carriers.find(c=>c.code===n);return e?e.label:n}get canUpdateStatus(){return!!this.order&&["paid","processing","shipped"].includes(this.order.status)}get isAllVirtual(){return this.order?this.order.lineItems.every(n=>n.requiresShipping===!1):!1}get canRefund(){return!!this.order&&["paid","processing","shipped","delivered","partially_refunded"].includes(this.order.status)}get canResyncEcommerce(){return!!this.order&&["paid","processing","shipped","delivered"].includes(this.order.status)}get isOpenCart(){return!!this.order&&this.order.status==="open_cart"}showAttachDialog=!1;attachCandidates=[];attachTargetId=null;loadingAttachCandidates=!1;attachingOrder=!1;get canAttachOrder(){let n=this.order;return!n||n.trackingNumber||n.shipmentId||n.shippedAt?!1:!["pending","cancelled","refunded"].includes(n.status)}openAttachDialog(){return y(this,null,function*(){if(this.order){this.attachTargetId=null,this.attachCandidates=[],this.showAttachDialog=!0,this.loadingAttachCandidates=!0;try{this.attachCandidates=yield this.shopService.getAttachCandidates(this.order.id)}catch{this.toastService.error(this.t.instant("COMMON.ERROR"))}finally{this.loadingAttachCandidates=!1}}})}submitAttachOrder(){return y(this,null,function*(){if(!this.order||!this.attachTargetId)return;let n=this.attachCandidates.find(c=>c.id===this.attachTargetId);if(yield this.confirmService.confirm({header:this.t.instant("MANAGER.SHOP.ATTACH_ORDER"),message:this.t.instant("MANAGER.SHOP.ATTACH_ORDER_CONFIRM_MSG",{target:n?.shortCode||this.attachTargetId.substring(0,8).toUpperCase()}),severity:"warn",acceptLabel:this.t.instant("MANAGER.SHOP.ATTACH_ORDER_CONFIRM"),rejectLabel:this.t.instant("COMMON.CANCEL")})){this.attachingOrder=!0;try{let c=this.attachTargetId;yield this.shopService.attachOrderTo(this.order.id,c),this.toastService.success(this.t.instant("MANAGER.SHOP.ATTACH_ORDER_SUCCESS")),this.showAttachDialog=!1,this.router.navigate(["/studio/shop/orders",c])}catch(c){this.toastService.error(c?.error?.message||this.t.instant("COMMON.ERROR"))}finally{this.attachingOrder=!1}}})}forceCloseCart(){return y(this,null,function*(){if(!(!this.order||!this.isOpenCart||!(yield this.confirmService.confirm({header:this.t.instant("MANAGER.SHOP.FORCE_CLOSE_CART_TITLE"),message:this.t.instant("MANAGER.SHOP.FORCE_CLOSE_CART_MESSAGE"),severity:"warn",acceptLabel:this.t.instant("MANAGER.SHOP.FORCE_CLOSE_CART_CONFIRM"),rejectLabel:this.t.instant("COMMON.CANCEL")})))){this.updatingStatus=!0;try{yield this.shopService.updateOrderStatus(this.order.id,"processing",{}),this.toastService.success(this.t.instant("MANAGER.SHOP.FORCE_CLOSE_CART_SUCCESS")),this.loadOrder()}catch{this.toastService.error(this.t.instant("COMMON.ERROR"))}finally{this.updatingStatus=!1}}})}showReopenDialog=!1;reopeningCart=!1;reopenDurationHours=72;reopenDurationOptions=[{label:"24 h (1 jour)",value:24},{label:"48 h (2 jours)",value:48},{label:"72 h (3 jours)",value:72},{label:"120 h (5 jours)",value:120},{label:"168 h (7 jours)",value:168}];get canReopenCart(){if(!this.order)return!1;let n=this.order,e=!!(n.trackingNumber||n.shipmentId||n.shippedAt);return!!(["paid","processing"].includes(n.status)||n.status==="delivered"&&!e)}openReopenDialog(){this.canReopenCart&&(this.reopenDurationHours=72,this.showReopenDialog=!0)}submitReopenCart(){return y(this,null,function*(){if(this.order){this.reopeningCart=!0;try{yield this.shopService.reopenCart(this.order.id,this.reopenDurationHours),this.toastService.success(this.t.instant("MANAGER.SHOP.REOPEN_CART_SUCCESS")),this.showReopenDialog=!1,this.loadOrder()}catch(n){this.toastService.error(n?.error?.message||this.t.instant("COMMON.ERROR"))}finally{this.reopeningCart=!1}}})}resyncing=!1;resyncToEcommerce(){return y(this,null,function*(){if(!(!this.order||this.resyncing)){this.resyncing=!0;try{yield this.shopService.resyncOrderToEcommerce(this.order.id),this.toastService.success(this.t.instant("MANAGER.SHOP.ORDER_RESYNC_SUCCESS"))}catch(n){this.toastService.error(n?.error?.message||this.t.instant("COMMON.ERROR"))}finally{this.resyncing=!1}}})}get commissionPercent(){return this.order?this.order.platformFeePercentSnapshot!=null?Number(this.order.platformFeePercentSnapshot).toFixed(1):this.order.totalCents?(this.order.platformFeeCents/this.order.totalCents*100).toFixed(1):"0":"0"}get sellerRevenueCents(){return this.order?this.order.totalCents-this.order.platformFeeCents-(this.order.stripeFeeCents||0):0}copyToClipboard(n){this.clipboard.copy(n),this.toastService.success(this.t.instant("MANAGER.SHOP.ORDER_COPIED"))}copyAddress(){if(!this.order?.shippingAddress)return;let n=this.order.shippingAddress,e=[n.name,n.line1,n.line2,`${n.postalCode} ${n.city}
1`,n.state,n.country].filter(Boolean);this.clipboard.copy(e.join(`
2`)),this.toastService.success(this.t.instant("MANAGER.SHOP.ORDER_COPIED"))}copyBillingAddress(){if(!this.order?.billingAddress)return;let n=this.order.billingAddress,e=[n.name,n.line1,n.line2,`${n.postalCode} ${n.city}`,n.state,n.country].filter(Boolean);this.clipboard.copy(e.join(`
3`)),this.toastService.success(this.t.instant("MANAGER.SHOP.ORDER_COPIED"))}generatingLabel=!1;get isLabelableStatus(){return!!this.order&&["paid","processing","shipped"].includes(this.order.status)}get canGenerateLabel(){return!!this.order&&!this.order.labelUrl&&!!this.order.sendcloudCarrierCode&&this.isLabelableStatus}get canPickShippingMethod(){return!!this.order&&!this.order.labelUrl&&!this.order.sendcloudCarrierCode&&!this.order.isLocalPickup&&this.isLabelableStatus}get hasLabel(){return!!this.order?.labelUrl}get canChangeServicePoint(){return!!this.order&&!this.order.labelUrl&&!!this.order.sendcloudServicePointId}servicePointDialogVisible=!1;loadingServicePoints=!1;changingServicePoint=!1;servicePoints=[];servicePointSearchPostalCode="";currentServicePointId=null;pendingMethod=null;openServicePointDialog(n){return y(this,null,function*(){this.order&&(this.pendingMethod=n??null,this.servicePointDialogVisible=!0,this.servicePointSearchPostalCode=this.orderPostalCode,this.servicePoints=[],(this.servicePointSearchPostalCode||!this.pendingMethod)&&(yield this.loadServicePoints()))})}get orderPostalCode(){let n=this.order?.servicePointAddress||{};return this.order?.shippingAddress?.postalCode||n.postal_code||n.postalCode||""}loadServicePoints(){return y(this,null,function*(){if(!(!this.order||this.loadingServicePoints)){this.loadingServicePoints=!0;try{let n=yield this.shopService.getOrderServicePoints(this.order.id,U(U({},this.servicePointSearchPostalCode?{postalCode:this.servicePointSearchPostalCode}:{}),this.pendingMethod?{carrier:this.pendingMethod.carrier}:{}));this.servicePoints=n.servicePoints||[],this.currentServicePointId=n.currentServicePointId,this.servicePointSearchPostalCode||(this.servicePointSearchPostalCode=n.postalCode)}catch(n){this.toastService.error(n?.error?.message||this.t.instant("COMMON.ERROR"))}finally{this.loadingServicePoints=!1}}})}selectServicePoint(n){return y(this,null,function*(){if(!(!this.order||this.changingServicePoint)){this.changingServicePoint=!0;try{this.pendingMethod?yield this.shopService.setOrderShippingMethod(this.order.id,this.pendingMethod.id,n.id):yield this.shopService.changeOrderServicePoint(this.order.id,n.id),this.toastService.success(this.t.instant("MANAGER.SHOP.SERVICE_POINT_CHANGED")),this.servicePointDialogVisible=!1,this.pendingMethod=null,yield this.loadOrder(),this.openLabelDialog()}catch(e){this.toastService.error(e?.error?.message||this.t.instant("COMMON.ERROR"))}finally{this.changingServicePoint=!1}}})}shippingMethodDialogVisible=!1;loadingShippingMethods=!1;settingShippingMethod=!1;shippingMethods=[];openShippingMethodDialog(){return y(this,null,function*(){if(this.order){this.shippingMethodDialogVisible=!0,this.shippingMethods=[],this.loadingShippingMethods=!0;try{let n=yield this.shopService.getOrderShippingMethods(this.order.id);this.shippingMethods=n.methods||[]}catch(n){this.toastService.error(n?.error?.message||this.t.instant("COMMON.ERROR"))}finally{this.loadingShippingMethods=!1}}})}selectShippingMethod(n){return y(this,null,function*(){if(!(!this.order||this.settingShippingMethod)){if(n.servicePointInput==="required"){this.shippingMethodDialogVisible=!1,yield this.openServicePointDialog(n);return}this.settingShippingMethod=!0;try{yield this.shopService.setOrderShippingMethod(this.order.id,n.id),this.shippingMethodDialogVisible=!1,yield this.loadOrder(),this.openLabelDialog()}catch(e){this.toastService.error(e?.error?.message||this.t.instant("COMMON.ERROR"))}finally{this.settingShippingMethod=!1}}})}labelDialogVisible=!1;labelWeightGrams=null;labelRecipientName="";openLabelDialog(){this.order&&(this.labelWeightGrams=this.order.totalWeightGrams?Math.round(this.order.totalWeightGrams):null,this.labelRecipientName=this.order.recipientName||this.order.shippingAddress?.name||this.order.buyerName||"",this.labelDialogVisible=!0)}get labelRecipientMissing(){return!this.labelRecipientName.trim()}confirmGenerateLabel(){return y(this,null,function*(){if(this.labelRecipientMissing){this.toastService.error(this.t.instant("MANAGER.SHOP.LABEL_RECIPIENT_REQUIRED"));return}let n=this.labelWeightGrams?Math.round(this.labelWeightGrams):void 0;this.labelDialogVisible=!1,yield this.generateLabel({weightGrams:n,recipientName:this.labelRecipientName.trim()})})}generateLabel(n){return y(this,null,function*(){if(!(!this.order||this.generatingLabel)){this.generatingLabel=!0;try{let e=yield this.shopService.generateSendcloudLabel([this.order.id],this.order.labelFormat||"10x15",n);if(e.results?.[0]?.success){this.toastService.success(this.t.instant("MANAGER.SHOP.LABEL_GENERATED")),this.loadOrder();try{yield this.printService.triggerOrderPrintJobs(this.order.id,["shipping_label"])}catch{}}else this.toastService.error(e.results?.[0]?.error||this.t.instant("COMMON.ERROR"))}catch(e){this.toastService.error(e?.error?.message||this.t.instant("COMMON.ERROR"))}finally{this.generatingLabel=!1}}})}downloadLabel(){this.order?.labelUrl&&window.open(this.shopService.downloadShippingLabelUrl(this.order.id),"_blank")}printingLabel=!1;printLabel(){return y(this,null,function*(){if(!(!this.order||this.printingLabel)){this.printingLabel=!0;try{yield this.printService.triggerOrderPrintJobs(this.order.id,["shipping_label"]),this.toastService.success(this.t.instant("MANAGER.SHOP.LABEL_PRINT_SENT"))}catch(n){this.toastService.error(n?.error?.message||this.t.instant("COMMON.ERROR"))}finally{this.printingLabel=!1}}})}cancellingLabel=!1;cancelLabel(){return y(this,null,function*(){if(!(!this.order||this.cancellingLabel||!(yield this.confirmService.confirm({message:this.t.instant("MANAGER.SHOP.LABEL_CANCEL_CONFIRM"),header:this.t.instant("MANAGER.SHOP.LABEL_CANCEL_TITLE"),severity:"danger",acceptLabel:this.t.instant("COMMON.DELETE"),rejectLabel:this.t.instant("COMMON.CANCEL")})))){this.cancellingLabel=!0;try{yield this.shopService.cancelSendcloudLabel(this.order.id),this.toastService.success(this.t.instant("MANAGER.SHOP.LABEL_CANCELLED")),this.loadOrder()}catch(e){this.toastService.error(e?.error?.message||this.t.instant("COMMON.ERROR"))}finally{this.cancellingLabel=!1}}})}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=j({type:t,selectors:[["app-view-manager-shop-order-detail"]],viewQuery:function(e,c){if
vendor: 4,245 bytes, line 3
3(e&1&&J(_t,5),e&2){let o;X(o=Z())&&(c.chatWidget=o.first)}},decls:21,vars:18,consts:[["chatWidget",""],["footer",""],[1,"d-flex","justify-content-between","align-items-center","mb-2","flex-wrap","gap-2"],[1,"text-light","fs-6","d-flex","align-items-center","gap-2"],["routerLink","/studio/shop/orders","queryParamsHandling","preserve",1,"text-muted","text-decoration-none"],[1,"pi","pi-arrow-left","me-2"],[1,"pi","pi-angle-right","mx-1","text-muted"],[3,"visible","modal","style","header"],[1,"text-muted","ms-1"],[3,"severity","value"],[3,"retry"],[1,"card","mb-4",2,"border-left","4px solid var(--p-orange-500)","background","var(--p-orange-50)"],[1,"row","g-4"],[1,"col-12","col-lg-8"],[3,"toggleable","header"],[1,"d-flex","justify-content-between","align-items-center","flex-wrap","gap-2"],[1,"text-muted","small"],[1,"d-flex","justify-content-between","align-items-center","mt-3"],[1,"d-flex","justify-content-between","align-items-center","mt-2"],["value","Stripe","severity","secondary",3,"rounded"],[1,"totals-section","mt-3","pt-3"],[1,"d-flex","justify-content-between","mb-1"],[1,"text-muted"],[1,"d-flex","gap-3","mb-1"],[1,"d-flex","justify-content-between","fw-bold","fs-6","mt-2","pt-2","border-top"],[1,"commission-row","mt-2","pt-2","border-top"],[1,"pi","pi-percentage","me-1"],[1,"d-flex","justify-content-between"],[1,"fw-semibold","text-success"],[3,"toggleable"],["pTemplate","header"],[3,"messageSent","ticket","loading","compact","showReactions","showReadReceipts","allowInitialMessage","emptyStateHint"],[1,"col-12","col-lg-4"],[1,"action-list"],[1,"action-item"],[1,"action-item","action-item--danger"],["target","_blank","rel","noopener",1,"action-item","action-item--link",3,"href"],[1,"action-item",3,"action-item--disabled"],[1,"alert","alert-secondary","d-flex","align-items-center","gap-2","mt-3","mb-0","small"],[1,"client-card"],[1,"client-card__identity"],["alt","",1,"client-card__avatar","client-card__avatar--img","rounded-circle",3,"src"],[1,"client-card__avatar","rounded-circle"],[1,"client-card__name"],[1,"fw-semibold","d-flex","align-items-center","gap-1"],[1,"pi","pi-verified","text-primary",2,"font-size","0.8rem",3,"pTooltip"],[1,"client-card__handle"],[1,"client-card__badge"],[1,"client-card__contacts"],[1,"client-card__row"],[1,"client-card__address"],[1,"d-flex","align-items-center","gap-2","mt-2",2,"font-size","0.9rem"],["height","80px"],[1,"history-card"],[1,"history-card__empty"],[1,"text-muted","mb-0"],[1,"d-flex","flex-column","gap-3"],[1,"invoice-card"],["height","60px"],[1,"timeline"],[1,"timeline__item",3,"timeline__item--success","timeline__item--danger","timeline__item--info"],[1,"card-body"],[1,"fw-semibold","mb-1"],[1,"pi","pi-shopping-cart","me-2"],[1,"text-muted","small","mt-1"],[1,"pi","pi-clock","me-1"],[1,"pi","pi-hourglass","me-1"],[1,"text-end"],[1,"fw-semibold"],[1,"text-muted","small","ms-2"],[1,"text-warning","small","ms-2"],[1,"line-separator"],[1,"line-item"],[1,"line-item__img",3,"src","alt"],[1,"line-item__img","line-item__img--placeholder"],[1,"line-item__info"],[1,"buyer-note","mt-1"],[1,"text-muted","small","mt-1","line-item__added"],[1,"line-item__qty","text-muted"],[1,"line-item__price","fw-semibold"],[1,"pi","pi-image"],[1,"me-2"],[1,"pi","pi-comment"],[1,"buyer-note__label"],[1,"buyer-note__text"],[1,"pi","pi-clock","me-1",2,"font-size","0.75rem"],[1,"text-muted","small","ms-1"],[1,"text-success"],[1,"pi","pi-globe","me-1"],[1,"pi","pi-box","me-1"],[1,"pi","pi-map-marker","me-1"],[1,"badge","bg-success-subtle","text-success","ms-1"],[1,"pi","pi-tag",2,"font-size","0.6rem"],[1,"d-flex","justify-content-between","mb-1","mt-2"],[1,"text-danger"],[1,"pi","pi-replay","me-1"],[1,"text-danger","fw-semibold"],[1,"small","fw-semibold"],[1,"pi","pi-credit-card","me-1"],[1,"mb-2"],["target","_blank","rel","noopener",1,"d-inline-flex","align-items-center","gap-1",3,"href"],[1,"mb-2","mt-2"],[1,"mt-3"],[1,"fw-semibold","ms-1"],[1,"pi","pi-external-link"],["icon","pi pi-pencil","severity","secondary","size","small",3,"onClick","label","outlined"],[1,"d-flex","align-items-center","gap-2","text-muted","mb-0"],[1,"pi","pi-cloud-download"],["icon","pi pi-check-circle","severity","success","size","small",3,"onClick","label","outlined"],["
3icon","pi pi-truck","severity","secondary","size","small",1,"mt-2",3,"label","outlined"],["icon","pi pi-truck","severity","secondary","size","small",1,"mt-2",3,"onClick","label","outlined"],[1,"mb-3","pb-3",3,"border-bottom"],[1,"mt-2"],[1,"mb-3","pb-3"],[1,"d-flex","justify-content-between","align-items-center","mb-2"],[1,"mb-1","small"],["target","_blank","rel","noopener",1,"small","d-inline-flex","align-items-center","gap-1","mb-1",3,"href"],[1,"badge","bg-secondary","me-1","mb-1"],[1,"ms-1"],["icon","pi pi-plus","severity","secondary","size","small",3,"onClick","label","outlined"],[1,"mb-0"],[1,"d-flex","align-items-center","justify-content-between","w-100"],[1,"text-decoration-none",3,"routerLink"],["severity","info",3,"value","rounded"],[1,"action-item",3,"click"],[1,"action-item__icon","action-item__icon--primary"],[1,"pi","pi-link"],[1,"action-item__text"],[1,"action-item__label"],[1,"action-item__desc"],[1,"pi","pi-chevron-right","action-item__arrow"],[1,"pi","pi-lock"],[1,"pi","pi-shopping-cart"],[1,"pi","pi-pencil"],[1,"action-item","action-item--danger",3,"click"],[1,"action-item__icon","action-item__icon--danger"],[1,"pi","pi-replay"],[1,"action-item__icon","action-item__icon--secondary"],[1,"pi","pi-file-pdf"],[1,"pi","pi-external-link","action-item__arrow"],[1,"action-item__icon","action-item__icon--teal"],[1,"pi","pi-sync"],[1,"action-item__icon","action-item__icon--orange"],[1,"pi","pi-truck"],[1,"action-item__icon","action-item__icon--blue"],[1,"pi","pi-tag"],[1,"pi","pi-map-marker"],[1,"action-item__icon","action-item__icon--green"],[1,"pi","pi-download"],[1,"action-item__icon","action-item__icon--purple"],[1,"pi","pi-print"],[1,"pi","pi-times"],[1,"pi","pi-info-circle"],[1,"pi","pi-verified",2,"font-size","0.65rem"],[1,"client-card__row-left"],[1,"pi","pi-envelope"],[1,"text-truncate"],["icon","pi pi-copy","
3severity","secondary","size","small",3,"onClick","rounded","text","pTooltip"],[1,"pi","pi-phone"],[1,"pi","pi-at"],[1,"client-card__address-header"],[1,"client-card__address-body"],[1,"d-flex","align-items-center","gap-1","mt-1"],[1,"fp","fp-rounded",3,"ngClass"],[1,"pi","pi-truck",2,"opacity","0.7"],[1,"pi","pi-building"],[1,"pi","pi-file-edit"],[1,"history-card__stats"],[1,"history-card__stat"],[1,"history-card__stat-icon","history-card__stat-icon--primary"],[1,"pi","pi-shopping-bag"],[1,"history-card__stat-value"],[1,"history-card__stat-label"],[1,"history-card__stat-icon","history-card__stat-icon--success"],[1,"pi","pi-euro"],[1,"history-card__since"],[1,"history-card__recent"],[1,"pi","pi-calendar"],[1,"history-card__recent-title"],[1,"history-card__recent-item",3,"routerLink"],[1,"history-card__recent-date"],["size","small",3,"severity","value"],[1,"ms-auto","fw-semibold","small"],[1,"pi","pi-chevron-right","history-card__recent-arrow"],[1,"pi","pi-star"],[1,"border","rounded","p-3"],[1,"d-flex","justify-content-between","align-items-start","gap-3","flex-wrap"],[1,"fw-semibold","text-danger"],[1,"d-flex","justify-content-between","gap-3","mt-2","small"],[1,"text-muted","small","mb-0"],[1,"pi","pi-info-circle","me-1"],[1,"invoice-card__header"],[1,"invoice-card__icon"],[1,"invoice-card__info"],["severity","info","size","small",3,"value"],["severity","warn","size","small",3,"value"],[1,"invoice-card__actions"],[1,"action-item__icon","action-item__icon--primary",2,"width","30px","height","30px"],[1,"pi","pi-download",2,"font-size","0.8rem"],[1,"action-item",2,"cursor","pointer","margin-bottom","0"],["type","file","accept","application/pdf","hidden","",3,"change"],[1,"action-item__icon","action-item__icon--secondary",2,"width","30px","height","30px"],[1,"pi","pi-upload",2,"font-size","0.8rem"],[1,"action-item__icon","action-item__icon--danger",2,"width","30px","height","30px"],[1,"pi","pi-undo",2,"font-size","0.8rem"],[1,"text-muted","small","mb-2"],["target","_blank","rel","noopener",1,"action-item","action-item--link",2,"margin-bottom","0",3,"href"],[1,"text-muted","small","mt-2","text-truncate"],[1,"pi","pi-link","me-1"],[1,"timeline__item"],[1,"timeline__dot"],[1,"timeline__content"],[1,"timeline__label"],[1,"timeline__sublabel"],[1,"timeline__date"],[3,"visibleChange","visible","modal","header"],[1,"mb-3"],[1,"form-label","fw-semibold"],["optionLabel","label","optionValue","value",3,"ngModelChange","options","ngModel"],["pTextarea","",1,"w-100",3,"ngModelChange","ngModel","rows"],[1,"text-muted","mb-3"],["optionLabel","label","optionValue","value",3,"ngModelChange","options","ngModel","placeholder"],["type","text","pInputText","",1,"w-100",3,"ngModelChange","ngModel"],["type","text","pInputText","","placeholder","https://...",1,"w-100",3,"ngModelChange","ngModel"],[1,"pi","pi-check-circle","me-1"],["dateFormat","dd/mm/yy",3,"ngModelChange","ngModel","minDate","showIcon","placeholder"],["severity","secondary",3,"onClick","label","text"],["icon","pi pi-check","severity","primary",3,"onClick","label","loading"],["icon","pi pi-refresh","severity","primary",3,"onClick","label","loading"],[1,"py-2"],[1,"settings-card__warn"],[1,"list-group"],["height","2.5rem","styleClass","mb-2"],["height","2.5rem"],["type","button",1,"list-group-item","list-group-item-action","d-flex","justify-content-between","align-items-center",3,"active"],["type","button",1,"list-group-item","list-group-item-action","d-flex","justify-content-between","align-items-center",3,"click"],[1,"pi","me-2"],[1,"text-muted","ms-2"],["icon","pi pi-link","severity","primary",3,"onClick","label","disabled","loading"],["pTextarea","",1,"w-100",3,"ngModelChange","ngModel","rows","placeholder"],[1,"text-muted","d-block","mt-2"],[1,"small","mt-2"],[1,"ms-2"],[1,"mb-3","p-2","border","rounded","bg-light","d-flex","justify-content-between","align-items-center"],[1,"fw-bold","fs-5"],[1,"mb-3","d-flex","align-items-center","gap-2"],[3,"ngModelChange","ngModel"],[1,"form-label","mb-0"],[1,"form-label","fw-semibold","mb-2"],[1,"refund-item","border","rounded","p-2","mb-2"],[1,"d-flex","align-items-center","gap-2"],[3,"ngModelChange","onChange","ngModel","binary"],["width","40","height","40",1,"rounded",2,"object-fit","cover","flex-shrink","0",3,"src","alt"],[1,"d-flex","align-items-center","justify-content-center","rounded",2,"width","40px","height","40px","background","var(--p-surface-ground)","flex-shrink","0"],[1,"flex-grow-1","min-width-0"],[1,"fw-semibold","small","text-truncate"],[1,"mt-2","ps-4","ms-2"],[1,"pi","pi-image","text-muted"],[1,"row","g-2","align-items-end"],[1,"col"],[1,"form-label","small","mb-1"],["mode","currency","currency","EUR","locale","fr-FR","size","small",3,"ngModelChange","ngModel","min","max"],[1,"col-auto","d-flex","align-items-center","gap-1","pb-3"],[1,"small"],[3,"ngModelChange","ngModel","binary"],["icon","pi pi-replay",3,"onClick","label","severity","loading","disabled"],[1,"d-flex","align-items-center","gap-2","mb-2"],[1,"flex-grow-1"],["size","small",3,"ngModelChange","ngModel","min","max","showButtons"],["
3icon","pi pi-truck","severity","primary",3,"onClick","label","loading","disabled"],[1,"text-muted","small","mb-3"],[1,"d-flex","gap-2","mb-3"],["type","text",1,"form-control",3,"ngModelChange","keyup.enter","ngModel","placeholder"],["type","button",1,"btn","btn-outline-secondary",3,"click","disabled"],[1,"pi"],[1,"text-center","py-4"],[1,"text-muted","text-center","py-4"],[1,"service-point-list"],[1,"pi","pi-spinner","pi-spin"],[1,"badge","bg-secondary","ms-1"],[1,"form-label"],["type","text",1,"form-control",3,"ngModelChange","ngModel","placeholder"],[1,"form-text"],[1,"text-warning","small","mt-1"],["suffix"," g","styleClass","w-100",3,"ngModelChange","ngModel","min","max","step","showButtons"],[1,"pi","pi-exclamation-triangle","me-1"],["icon","pi pi-tag","severity","primary",3,"onClick","label","loading","disabled"]],template:function(e,c){e&1&&(r(0,"div",2)(1,"span",3)(2,"a",4),g(3,"i",5),l(4),d(5,"translate"),a(),g(6,"i",6),l(7),d(8,"translate"),E(9,Tt,4,7),a()(),E(10,Pt,1,0,"app-widget-loading")(11,Dt,1,0,"app-widget-api-error")(12,Qn,134,121)(13,ia,28,42)(14,da,10,12,"p-dialog",7)(15,_a,17,25,"p-dialog",7)(16,fa,27,57,"p-dialog",7)(17,wa,29,40,"p-dialog",7)(18,Na,13,23,"p-dialog",7)(19,Ha,25,33,"p-dialog",7)(20,Wa,8,12,"p-dialog",7)),e&2&&(i(4),u("",s(5,14,"MANAGER.SHOP.ORDERS_TITLE")," "),i(3),u(" ",s(8,16,"MANAGER.SHOP.ORDER_DETAIL_TITLE")," "),i(2),m(c.order?9:-1),i(),m(c.loading?10:-1),i(),m(!c.loading&&c.error?11:-1),i(),m(!c.loading&&!c.error&&c.order?12:-1),i(),m(c.order?13:-1),i(),m(c.order?14:-1),i(),m(c.order?15:-1),i(),m(c.order?16:-1),i(),m(c.order?17:-1),i(),m(c.order?18:-1),i(),m(c.order?19:-1),i(),m(c.order?20:-1))},dependencies:[le,ee,ie,te,oe,re,ne,ae,ce,se,xe,ge,Ce,he,me,_e,ye,Me,ve,Ke,ze,Fe,Ue,Pe,Te,Be,Ge,Qe,qe,ke,Ve,Ie,be,Le,He,Oe,fe,Ne,De,Xe,Je,we,Ae,Re,Ye,$e,Ee],styles:['[_nghost-%COMP%]     p-panel+p-panel{display:block;margin-top:1rem}.line-item[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.75rem;padding:.6rem 0;border-bottom:1px solid var(--p-surface-50)}.line-item[_ngcontent-%COMP%]:last-of-type{border-bottom:none}.line-item__img[_ngcontent-%COMP%]{width:52px;height:52px;border-radius:8px;object-fit:cover;border:1px solid var(--p-surface-border);flex-shrink:0}.line-item__img--placeholder[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;background:var(--p-surface-ground);color:var(--p-text-muted-color);font-size:1.1rem}.line-item__info[_ngcontent-%COMP%]{flex:1;min-width:0}.line-item__qty[_ngcontent-%COMP%]{font-size:.85rem;flex-shrink:0}.line-item__price[_ngcontent-%COMP%]{flex-shrink:0;text-align:right;min-width:80px}.totals-section[_ngcontent-%COMP%]{border-top:1px solid var(--p-surface-border)}.commission-row[_ngcontent-%COMP%]{border-top:1px dashed var(--p-surface-border)}.commission-upsell[_ngcontent-%COMP%]{background:var(--p-surface-ground);border:1px dashed var(--p-primary-color);border-radius:8px;padding:.6rem .75rem;color:var(--p-text-muted-color)}.commission-upsell[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]{color:var(--p-primary-color)}.history-card__stats[_ngcontent-%COMP%]{display:flex;gap:1rem}.history-card__stat[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.6rem;flex:1;padding:.6rem .75rem;background:var(--p-surface-ground);border-radius:8px}.history-card__stat-icon[_ngcontent-%COMP%]{width:32px;height:32px;border-radius:8px;display:flex;align-items:center;justify-content:center;flex-shrink:0;font-size:.85rem}.history-card__stat-icon--primary[_ngcontent-%COMP%]{background:rgba(var(--p-primary-500-rgb, 99, 102, 241),.1);color:var(--p-primary-600)}.history-card__stat-icon--success[_ngcontent-%COMP%]{background:rgba(var(--p-green-500-rgb, 34, 197, 94),.1);color:var(--p-green-600)}.history-card__stat-value[_ngcontent-%COMP%]{font-size:1.05rem;font-weight:700;line-height:1.2;color:var(--p-text-color)}.history-card__stat-label[_ngcontent-%COMP%]{font-size:.7rem;color:var(--p-text-muted-color);text-transform:uppercase;letter-spacing:.02em}.history-card__since[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.4rem;margin-top:.75rem;padding-top:.6rem;border-top:1px solid var(--p-surface-50);font-size:.8rem;color:var(--p-text-muted-color)}.history-card__since[_ngcontent-%COMP%]   i[_ngcontent-%COMP%]{font-size:.75rem}.history-card__recent[_ngcontent-%COMP%]{margin-top:.75rem;padding-top:.6rem;border-top:1px solid var(--p-surface-50)}.history-card__recent-title[_ngcontent-%COMP%]{font-size:.75rem;font-weight:600;color:var(--p-text-muted-color);text-transform:uppercase;letter-spacing:.02em;margin-bottom:.4rem}.history-card__recent-item[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;padding:.4rem .35rem;cursor:pointer;border-radius:6px;transition:background .15s}.history-card__recent-item[_ngcontent-%COMP%]:hover{background:var(--p-surface-ground)}.history-card__recent-date[_ngcontent-%COMP%]{font-size:.8rem;color:var(--p-text-muted-color);min-width:2.5rem}.history-card__recent-arrow[_ngcontent-%COMP%]{font-size:.65rem;color:var(--p-text-muted-color)}.history-card__empty[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;color:var(--p-text-muted-color);font-size:.85rem}.history-card__empty[_ngcontent-%COMP%]   i[_ngcontent-%COMP%]{font-size:1rem;color:var(--p-yellow-500)}.timeline[_ngcontent-%COMP%]{position:relative;padding-left:1.5rem}.timeline__item[_ngcontent-%COMP%]{position:relative;padding-bottom:1rem;padding-left:.75rem}.timeline__item[_ngcontent-%COMP%]:last-child{padding-bottom:0}.timeline__item[_ngcontent-%COMP%]:before{content:"";position:absolute;
3left:-1.0625rem;top:.875rem;bottom:0;width:2px;background:var(--p-surface-border)}.timeline__item[_ngcontent-%COMP%]:last-child:before{display:none}.timeline__item--success[_ngcontent-%COMP%]   .timeline__dot[_ngcontent-%COMP%]{background:var(--p-green-500);color:#fff}.timeline__item--danger[_ngcontent-%COMP%]   .timeline__dot[_ngcontent-%COMP%]{background:var(--p-red-500);color:#fff}.timeline__item--info[_ngcontent-%COMP%]   .timeline__dot[_ngcontent-%COMP%]{background:var(--p-blue-500);color:#fff}.timeline__dot[_ngcontent-%COMP%]{position:absolute;left:-1.5rem;top:0;width:.875rem;height:.875rem;border-radius:50%;background:var(--p-surface-300);display:flex;align-items:center;justify-content:center}.timeline__dot[_ngcontent-%COMP%]   i[_ngcontent-%COMP%]{font-size:.5rem}.timeline__content[_ngcontent-%COMP%]{min-width:0}.timeline__label[_ngcontent-%COMP%]{font-weight:600;font-size:.85rem;line-height:1.3}.timeline__sublabel[_ngcontent-%COMP%]{font-size:.78rem;color:var(--p-text-muted-color);line-height:1.3}.timeline__date[_ngcontent-%COMP%]{font-size:.75rem;color:var(--p-text-muted-color)}
3.line-separator[_ngcontent-%COMP%]{display:flex;align-items:center;gap:6px;padding:.5rem 0 .25rem}.line-separator[_ngcontent-%COMP%]:before, .line-separator[_ngcontent-%COMP%]:after{content:"";flex:1;height:1px;background:var(--p-surface-border)}.line-separator[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{font-size:.7rem;color:var(--p-text-muted-color);white-space:nowrap;font-style:italic}.line-item__added[_ngcontent-%COMP%]{font-size:.72rem}.buyer-note[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:.4rem;font-size:.8rem;line-height:1.35;padding:.35rem .5rem;border-radius:6px;border-left:3px solid var(--p-primary-400);background:rgba(var(--p-primary-500-rgb, 99, 102, 241),.07)}.buyer-note[_ngcontent-%COMP%] > i[_ngcontent-%COMP%]{font-size:.75rem;margin-top:.15rem;color:var(--p-primary-500);flex-shrink:0}.buyer-note__label[_ngcontent-%COMP%]{color:var(--p-text-muted-color);margin-right:.3rem}.buyer-note__text[_ngcontent-%COMP%]{font-weight:600}.action-list[_ngcontent-%COMP%]{display:flex;flex-direction:column}.action-item[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.75rem;padding:.65rem .5rem;border-bottom:1px solid var(--p-surface-50);cursor:pointer;border-radius:6px;transition:background .15s;text-decoration:none;color:inherit}.action-item[_ngcontent-%COMP%]:last-child{border-bottom:none}.action-item[_ngcontent-%COMP%]:hover{background:var(--p-surface-ground)}.action-item--danger[_ngcontent-%COMP%]:hover{background:rgba(var(--p-red-500-rgb, 239, 68, 68),.04)}.action-item--link[_ngcontent-%COMP%]{text-decoration:none;color:inherit}.action-item__icon[_ngcontent-%COMP%]{width:36px;height:36px;border-radius:8px;display:flex;align-items:center;justify-content:center;flex-shrink:0;font-size:.95rem}.action-item__icon--primary[_ngcontent-%COMP%]{background:rgba(var(--p-primary-500-rgb, 99, 102, 241),.1);color:var(--p-primary-600)}.action-item__icon--secondary[_ngcontent-%COMP%]{background:var(--p-surface-100);color:var(--p-text-muted-color)}.action-item__icon--warn[_ngcontent-%COMP%]{background:rgba(var(--p-yellow-500-rgb, 234, 179, 8),.1);color:var(--p-yellow-600)}.action-item__icon--danger[_ngcontent-%COMP%]{background:rgba(var(--p-red-500-rgb, 239, 68, 68),.1);color:var(--p-red-600)}.action-item__icon--teal[_ngcontent-%COMP%]{background:#14b8a61a;color:#0d9488}.action-item__icon--blue[_ngcontent-%COMP%]{background:#3b82f61a;color:#2563eb}.action-item__icon--green[_ngcontent-%COMP%]{background:#22c55e1a;color:#16a34a}.action-item__icon--purple[_ngcontent-%COMP%]{background:#8b5cf61a;color:#7c3aed}.action-item--disabled[_ngcontent-%COMP%]{opacity:.6;pointer-events:none}.action-item__text[_ngcontent-%COMP%]{flex:1;min-width:0}.action-item__label[_ngcontent-%COMP%]{font-weight:600;font-size:.85rem;line-height:1.3}.action-item__desc[_ngcontent-%COMP%]{font-size:.75rem;color:var(--p-text-muted-color);line-height:1.3}.action-item__arrow[_ngcontent-%COMP%]{font-size:.75rem;color:var(--p-text-muted-color);flex-shrink:0}.client-card__identity[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.75rem;margin-bottom:.75rem;padding-bottom:.75rem;border-bottom:1px solid var(--p-surface-50)}.client-card__avatar[_ngcontent-%COMP%]{width:48px;height:48px;background:var(--p-primary-100);color:var(--p-primary-600);font-weight:700;font-size:1.2rem;display:flex;align-items:center;justify-content:center;flex-shrink:0}.client-card__avatar--img[_ngcontent-%COMP%]{object-fit:cover;background:var(--p-surface-100)}.client-card__name[_ngcontent-%COMP%]{line-height:1.3;min-width:0}.client-card__handle[_ngcontent-%COMP%]{font-size:.8rem;color:var(--p-primary-600);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.client-card__badge[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.2rem;font-size:.7rem;color:var(--p-primary-600);background:rgba(var(--p-primary-500-rgb, 99, 102, 241),.08);padding:.1rem .4rem;border-radius:4px;font-weight:500}.client-card__contacts[_ngcontent-%COMP%]{display:flex;flex-direction:column}.client-card__row[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:.5rem;padding:.3rem 0}.client-card__row-left[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;min-width:0;font-size:.85rem}
3.client-card__row-left[_ngcontent-%COMP%]   i[_ngcontent-%COMP%]{font-size:.8rem;color:var(--p-text-muted-color);flex-shrink:0}.client-card__row-left[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.client-card__address[_ngcontent-%COMP%]{margin-top:.75rem;padding-top:.75rem;border-top:1px solid var(--p-surface-50)}.client-card__address-header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;margin-bottom:.5rem}.client-card__address-header[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{font-size:.8rem;font-weight:600;color:var(--p-text-muted-color)}.client-card__address-header[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]   i[_ngcontent-%COMP%]{margin-right:.25rem}.client-card__address-body[_ngcontent-%COMP%]{font-size:.85rem;line-height:1.5;padding-left:1.25rem}.invoice-card__header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.75rem;margin-bottom:.75rem;padding-bottom:.75rem;border-bottom:1px solid var(--p-surface-50)}.invoice-card__icon[_ngcontent-%COMP%]{width:40px;height:40px;border-radius:8px;display:flex;align-items:center;justify-content:center;flex-shrink:0;font-size:1.1rem;background:rgba(var(--p-primary-500-rgb, 99, 102, 241),.1);color:var(--p-primary-600)}.invoice-card__info[_ngcontent-%COMP%]{min-width:0;line-height:1.4}.invoice-card__actions[_ngcontent-%COMP%]{display:flex;flex-direction:column}.messages-list[_ngcontent-%COMP%]{max-height:300px;overflow-y:auto;display:flex;flex-direction:column;gap:.5rem}.message[_ngcontent-%COMP%]{padding:.5rem .75rem;border-radius:8px;background:var(--p-surface-ground)}.message--mine[_ngcontent-%COMP%]{background:rgba(var(--p-primary-500-rgb, 99, 102, 241),.08);border-left:3px solid var(--p-primary-color)}.message--system[_ngcontent-%COMP%]{background:rgba(var(--p-yellow-500-rgb, 234, 179, 8),.08);font-style:italic}.message__header[_ngcontent-%COMP%]{margin-bottom:.15rem}.message__content[_ngcontent-%COMP%]{line-height:1.4}']})};export{ot as ViewManagerShopOrderDetailComponent};

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.