PageSourceSearch

https://www.ghosttownbrewing.com/assets/square-sdk-aAJyAZj6.js

js ghosttownbrewing.com collected 2026-09-24 11:14:29 UTC 1,280 bytes, 1 lines download raw bytes

1const c={sandbox:"https://sandbox.web.squarecdn.com/v1/square.js",production:"https://web.squarecdn.com/v1/square.js"};let i=null,a=null;function s(n){if(window.Square)return Promise.resolve(window.Square);if(i)return i;const o=c[n]||c.production;return i=new Promise((e,r)=>{const t=document.createElement("script");t.src=o,t.async=!0,t.onload=()=>{window.Square?e(window.Square):r(new Error("Square SDK loaded but window.Square is missing"))},t.onerror=()=>r(new Error("Failed to load Square SDK")),document.head.appendChild(t)}),i}function d(){return{applicationId:"",locationId:"",environment:"production".toLowerCase()}}async function u(){if(a)return a;let n={};try{const e=await fetch("/api/store-config",{signal:AbortSignal.timeout(3500)});e.ok&&(n=await e.json().catch(()=>({})))}catch{}const o=d();return a={applicationId:n.applicationId||o.applicationId,locationId:n.locationId||o.locationId,environment:(n.environment||o.environment||"production").toLowerCase()},a}async function l(){const n=await u();if(!n.applicationId||!n.locationId)throw new Error("Square is not configured. Verify SQUARE_APPLICATION_ID and STORE_SQUARE_LOCATION_ID are set in geist_api integration settings.");return(await s(n.environment)).payments(n.applicationId,n.locationId)}export{l as i};

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.