PageSourceSearch

https://shopify-theme-detector-five.vercel.app/_next/static/chunks/b0908472d79a6a3d.js

js shopify-theme-detector-five.vercel.app collected 2026-10-03 07:42:02 UTC 9,435 bytes, 1 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,65430,e=>{"use strict";var t=e.i(43476),s=e.i(71645);function r(){let[e,r]=(0,s.useState)(""),[a,l]=(0,s.useState)(!1),[o,i]=(0,s.useState)(null),[n,d]=(0,s.useState)(null),[c,m]=(0,s.useState)(!1),x=()=>{let e=document.body.scrollHeight;console.log("Sending height:",e),window.parent.postMessage({type:"themeDetectorHeight",height:e},"*")};(0,s.useEffect)(()=>(x(),window.addEventListener("resize",x),()=>{window.removeEventListener("resize",x)}),[]),(0,s.useEffect)(()=>{let e=setTimeout(()=>{x()},100);return()=>clearTimeout(e)},[o,a,n]);let h=e=>e.toLowerCase().trim().replace(/\s+/g,"").replace(/[^\w]/g,""),p=()=>{if(!e||!o)return!1;let t=o.officialThemeName||o.schemaName;if(!t)return!1;let s=(e=>{try{let t=e.replace(/^https?:\/\//,"");return t=(t=(t=(t=(t=t.replace(/^www\./,"")).split("/")[0]).split(":")[0]).replace(/\.myshopify\.com$/,"")).replace(/\.(com|net|org|io|co|shop|store)$/i,"")}catch{return e}})(e);return h(t)===h(s)},b=async t=>{t.preventDefault(),l(!0),d(null),i(null);try{let t=await fetch("/api/shopify-theme-detector",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:e})}),s=await t.json();if(!t.ok)return void d(s.message||"An error occurred");i(s)}catch(e){d("Failed to connect to the API")}finally{l(!1)}};return(0,t.jsx)("div",{className:"min-h-screen bg-white py-12 sm:py-16 px-4",children:(0,t.jsxs)("div",{className:"max-w-3xl mx-auto",children:[(0,t.jsx)("header",{className:"mb-10 text-center"}),(0,t.jsxs)("form",{onSubmit:b,className:"mb-10",children:[(0,t.jsxs)("div",{className:"flex flex-col sm:flex-row gap-3 max-w-2xl mx-auto",children:[(0,t.jsx)("label",{htmlFor:"store-url",className:"sr-only",children:"Store URL"}),(0,t.jsx)("input",{id:"store-url",type:"text",value:e,onChange:e=>r(e.target.value),placeholder:"Enter store URL (e.g., storename or storename.myshopify.com)",className:"flex-1 px-5 py-3 bg-white text-slate-900 placeholder:text-slate-400 border border-slate-200 rounded-lg focus:outline-none focus:ring-2 focus:ring-[#2563eb] focus:border-[#2563eb] disabled:bg-slate-50 disabled:text-slate-500 transition-all",disabled:a,"aria-describedby":"url-help"}),(0,t.jsx)("button",{type:"submit",disabled:a||!e.trim(),className:"px-8 py-3 bg-[#2563eb] text-white rounded-lg hover:bg-[#1d4ed8] disabled:bg-slate-300 disabled:cursor-not-allowed transition-all focus:outline-none focus:ring-2 focus:ring-[#2563eb] focus:ring-offset-2 font-medium whitespace-nowrap","aria-busy":a,children:a?"Checking...":"Detect"})]}),(0,t.jsx)("p",{id:"url-help",className:"mt-3 text-xs text-slate-500 text-center",children:"You can enter a store name, full URL, or myshopify.com domain"})]}),a&&(0,t.jsx)("div",{className:"bg-white p-8 rounded-xl shadow-sm border border-slate-100 max-w-2xl mx-auto",role:"status","aria-live":"polite",children:(0,t.jsx)("p",{className:"text-slate-600 text-center",children:"Analyzing store..."})}),n&&(0,t.jsxs)("div",{className:"bg-red-50 border border-red-200 p-6 rounded-xl max-w-2xl mx-auto",role:"alert",children:[(0,t.jsx)("p",{className:"text-red-800 font-semibold mb-1",children:"Error"}),(0,t.jsx)("p",{className:"text-red-700 text-sm",children:n})]}),o&&!a&&(0,t.jsxs)("div",{className:"bg-white rounded-xl shadow-sm border border-slate-100 overflow-hidden max-w-2xl mx-auto",children:[o.passwordProtected&&(0,t.jsxs)("div",{className:"bg-orange-50 border-b border-orange-200 p-5",role:"alert",children:[(0,t.jsx)("p",{className:"text-sm font-semibold text-orange-800 mb-1",children:"🔒 Password Protected"}),(0,t.jsx)("p",{className:"text-orange-700 text-sm",children:"This store is password-protected and cannot be analyzed."})]}),o.blockedByProtection&&(0,t.jsxs)("div",{className:"bg-purple-50 border-b border-purple-200 p-5",role:"alert",children:[(0,t.jsx)("p",{className:"text-sm font-semibold text-purple-800 mb-1",children:"🛡️ Bot Protection Detected"}),(0,t.jsx)("p",{className:"text-purple-700 text-sm",children:"This store is protected by bot detection and cannot be analyzed."})]}),o.isShopify&&!o.passwordProtected&&!o.blockedByProtection&&(o.officialThemeName||o.schemaName)&&!p()&&(0,t.jsxs)("div",{className:"p-8 sm:p-10",children:[(0,t.jsx)("div",{className:"mb-8 pb-8 border-b border-slate-100",children:(0,t.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)("p",{className:"text-xs font-medium text-slate-500 uppercase tracking-wide mb-2",children:"Theme Name"}),(0,t.jsx)("h2",{className:"text-3xl sm:text-4xl font-bold text-slate-900 tracking-tight mb-3",children:o.officialThemeName||o.schemaName}),(0,t.jsxs)("a",{href:`https://themes.shopify.com/themes?q=${encodeURIComponent(o.officialThemeName||o.schemaName||"")}`,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center px-4 py-2 bg-[#2563eb] text-white rounded-lg hover:bg-[#1d4ed8] transition-colors font-medium text-sm",children:["View on Shopify",(0,t.jsx)("svg",{className:"ml-1.5 w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"})})]})]}),o.officialThemeName&&(0,t.jsx)("span",{className:"inline-flex items-center px-3 py-1 rounded-full text-xs font-semibold bg-emerald-50 text-emerald-700 border border-emerald-200 whitespace-nowrap",children:"Official"})]})}),(0,t.jsxs)("div",{className:"space-y-3",children:[o.detectedName&&o.detectedName!==o.schemaName&&(0,t.jsxs)("div",{className:"flex items-center justify-between py-2 border-b border-slate-50",children:[(0,t.jsx)("span",{className:"text-xs text-slate-500",children:"Instance Name"}),(0,t.jsx)("span",{className:"text-sm text-slate-700 font-medium",children:o.detectedName})]}),o.themeStoreId&&(0,t.jsxs)("div",{className:"flex items-center justify-between py-2 border-b border-slate-50",children:[(0,t.jsx)("span",{className:"text-xs text-slate-500",children:"Theme ID"}),(0,t.jsx)("span",{className:"text-sm text-slate-700 font-mono",children:o.themeStoreId})]}),(0,t.jsxs)("div",{className:"flex items-center justify-between py-2",children:[(0,t.jsx)("span",{className:"text-xs text-slate-500",children:"Shopify Store"}),(0,t.jsx)("span",{className:"text-sm text-emerald-600 font-medium",children:"✓ Detected"})]})]})]}),o.isShopify&&!o.passwordProtected&&!o.blockedByProtection&&(!o.officialThemeName&&!o.schemaName||p())&&(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)("div",{className:"w-1.5 bg-red-500 rounded-l-xl"}),(0,t.jsxs)("div",{className:"flex-1 p-6",children:[(0,t.jsx)("p",{className:"text-base font-semibold text-red-600 mb-1",children:"Error"}),(0,t.jsx)("p",{className:"text-sm text-slate-600 mb-3",children:"Could not identify the theme. This could be a custom theme or heavily modified theme."}),(0,t.jsxs)("a",{href:"https://themes.shopify.com/themes",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center text-[#2563eb] hover:text-[#1d4ed8] font-medium text-sm transition-colors",children:["Browse themes for Shopify",(0,t.jsx)("svg",{className:"ml-1.5 w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"})})]})]})]}),!o.isShopify&&!o.passwordProtected&&!o.blockedByProtection&&(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)("div",{className:"w-1.5 bg-red-500 rounded-l-xl"}),(0,t.jsxs)("div",{className:"flex-1 p-6",children:[(0,t.jsx)("p",{className:"text-base font-semibold text-red-600 mb-1",children:"Error"}),(0,t.jsx)("p",{className:"text-sm text-slate-600",children:"This does not appear to be a Shopify store. Please check the URL and try again."})]})]})]}),o&&!a&&o.isShopify&&!o.passwordProtected&&!o.blockedByProtection&&(0,t.jsx)("div",{className:"mt-6 max-w-2xl mx-auto",children:(0,t.jsxs)("div",{className:"bg-white rounded-xl shadow-sm border border-slate-100 p-6 relative",children:[(0,t.jsx)("div",{className:"absolute top-4 right-4",children:(0,t.jsx)("span",{className:"inline-flex items-center px-3 py-1 rounded-md text-xs font-medium bg-slate-600 text-white",children:"Recommended"})}),(0,t.jsxs)("div",{className:"flex items-center gap-3 mb-3 pr-28 flex-wrap",children:[(0,t.jsx)("h3",{className:"text-2xl sm:text-3xl font-bold text-slate-900",children:"Maximize"}),(0,t.jsx)("a",{href:"https://themes.shopify.com/themes/maximize/presets/maximize?utm_source=moast&utm_medium=partner&utm_campaign=email",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center justify-center w-10 h-10 bg-[#2563eb] text-white rounded-lg hover:bg-[#1d4ed8] transition-colors",title:"View on Shopify","aria-label":"View on Shopify",children:(0,t.jsx)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"})})})]}),(0,t.jsx)("p",{className:"text-sm text-slate-600",children:"Perfect for fast, modern storefronts and fully compatible with Moast's shoppable video widgets."})]})})]})})}e.s(["default",()=>r])}]);

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.