1import{u as n,S as e}from"./2c1ab0fe.qpvfywqb.js";import{as as t,at as o,au as r,av as s,aw as c,ah as i}from"./164ad2e3.DcJn775M.js";import{e as l}from"./4b4bc88f.DkycdxSK.js";import"./d0bb51ec.CWfbNPnY.js";import"./app.DH8n-1bp.js";import"./f67abd2c.CNaB0QaR.js";import"./e12db40c.DhbHW8sF.js";import"./9dba8418.4R19B40l.js";import"./60a453ce.DBFo6PRx.js";class a extends Error{constructor(){super(...arguments),this.name="UnknownNodeTypeError"}}function u({nodes:t,registry:o}){return n(e,{children:t.map(e=>n(d,{node:e,registry:o},e.key))})}function d({node:e,registry:t}){const o=function(n,e){const t=n.get(e);if(!t)throw new a(`Unknown node type: ${function(n){const e=n.replace(/[^\w:.-]/g,"");return e.length>64?`${e.slice(0,64)}â¦`:e}(e)}. The registry has no component for it.`);return t}(t,e.type),{children:r,slots:s}=function(e,t){if(!e||0===e.length)return{};const o=[];let r;for(const s of e){const e=n(d,{node:s,registry:t},s.key);if(void 0===s.slot){o.push(e);continue}r??=new Map;const c=r.get(s.slot);c?c.push(e):r.set(s.slot,[e])}return{children:o.length>0?o:void 0,slots:r?Object.fromEntries(r):void 0}}(e.children,t);return n(o,{node:e,slots:s,children:r})}
1class p extends Error{}class h extends p{constructor(){super(...arguments),this.name="UnplaceableSlotError",this.code="unplaceable_slot"}}class f extends p{constructor(){super(...arguments),this.name="UnknownExtensionPlacementError",this.code="unknown_extension_placement"}}function m(n){const e=String(n).replace(/[^\w:.-]/g,"");return e.length>64?`${e.slice(0,64)}â¦`:e}function w(n,{children:e,slots:t,accepts:o,acceptsChildren:r}){const s=m(n.type);if(!r&&void 0!==e)throw new h(`"${s}" cannot place unslotted children`);const c=Object.keys(t??{}).filter(n=>!o.includes(n));if(c.length>0)throw new h(`"${s}" cannot place occupants of: ${function(n){const e=n.slice(0,8).map(m);return n.length>8&&e.push("â¦"),e.join(", ")}(c)}`)}const g=[];function y({node:e,children:r,slots:s}){return w(e,{children:r,slots:s,accepts:g,acceptsChildren:!0}),void 0===e.children?n(t,{}):n(o,{children:r})}const b=["before","after"];function j(t){return function({node:o,children:r,slots:s}){return w(o,{children:r,slots:s,accepts:b,acceptsChildren:!1}),n(e,{children:[s?.before,n(t,{node:o}),s?.after]})}}const E=new Map([["aside",y],["order-summary",y],["line-items",j(function(e){return n(c,{})})],["money-lines",j(function(e){return n(i,{})})],["reductions",j(function(e){const{checkout:{configuration:{visibility:t}}}=l();return t.showReductions?n(s,{monorailSection:"order_summary"}):null})],["ui-extension-point",function({node:e,children:t,slots:o}){w(e,{children:t,slots:o,accepts:g,acceptsChildren:!1});const s=function(n){const e=n.attrs?.placement;if("ORDER_SUMMARY3"===e||"ORDER_SUMMARY4"===e)return e;throw new f(`Unknown extension point placement: ${m(e)}`)}(e);return n(r,{placement:s})}]]);function k({root:e}){return n(u,{nodes:[e],registry:E})}export{k as default};
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.