1import{a8 as p,a9 as f,g as h}from"./2c1ab0fe.BqEHHmaW.js";import{Q as l,fm as b,_ as g}from"./4c290a1e.FJVsH4yi.js";function x(t,e,i=[]){try{const o=new URL(t),a=new URL(e),r=u(o,a)||i.some(s=>{try{const c=new URL(s);return c.origin===s&&u(o,c)}catch{return!1}});return o.origin===t&&o.protocol==="https:"&&r}catch{return!1}}function u(t,e){return t.protocol===e.protocol&&t.port===e.port&&(t.hostname===e.hostname||t.hostname.endsWith(`.${e.hostname}`))}function A(){const t=document.querySelector('meta[name="serialized-shop"]')?.getAttribute("content");if(t)try{return JSON.parse(t)}catch{return}}const y="data-special-id";function E({id:t,url:e,privileges:i,title:o,name:a,iframeSpecialId:r,onLoad:s}){const c=document.getElementById(`sandbox-${t}`);if(c&&c.tagName==="IFRAME")return c;const n=document.createElement("iframe");if(n.setAttribute("id",`sandbox-${t}`),n.setAttribute("src",e),n.setAttribute("sandbox",i.join(" ")),n.setAttribute("tabIndex","-1"),n.setAttribute("aria-hidden","true"),r&&n.setAttribute(y,r),o&&n.setAttribute("title",o),a&&n.setAttribute("name",a),n.setAttribute("style","display:none; height:0; width:0; visibility: hidden;"),S(n),s){const d=s(n);n.addEventListener("load",d,{once:!0})}return n}const m={};function L(t,e,i,o,a){const r=t.getAttribute("id");if(!r)throw Error("Endpoint cannot be created without an iframe id");o&&P(e,o);const s=`${r}-endpoint-${i}`,c=m[s];c&&(o?.leaveErrorBreadcrumb(`Terminating existing RPC endpoint ${s}`),c.terminate());const n=a?.isSandboxedWithNullOrigin?"*":new URL(e).origin,d=p(f(t,{targetOrigin:n}));return m[s]=d,d}function P(t,e){let i;try{i=new URL(t,window.location.href)}catch{return}const o=i.searchParams.get("shopHost");if(!o)return;const a=`https://${o}`,r=window.location.origin;x(r,a,A()?.origins)||e.log("sandbox_parent_origin_mismatch","Sandbox shopHost does not match the parent origin",{sandbox:i.pathname,expectedOrigin:a,actualOrigin:r})}function S(t){let e=document.querySelector("#SandboxContainer");e==null&&(e=document.createElement("div"),e.setAttribute("id","SandboxContainer"),document.body.appendChild(e)),e.appendChild(t)}function O(t){return t==="SUBSCRIPTION"?"subscription":"oneTimePurchase"}function C(){const t=l().paymentLines;return h(()=>{const[e]=b(t.value,[g.AmazonPay]);return e})}export{y as D,S as a,L as b,E as c,O as m,P as r,C as u};
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.