{
  "version": 3,
  "sources": ["/cdn/shop/t/1044/assets/dtf-upload-tabs.js?auto=format%2Ccompress"],
  "sourcesContent": ["/* =========================================================\n   DTF Upload Tabs \u2014 behaviors\n   ---------------------------------------------------------\n   Scope:\n   - Tab switching (4 tabs).\n   - Browse/drop proxy so drops anywhere inside Tab 1 hit\n     the native #fileInput.\n   - Source buttons (Canva/Dropbox/Drive/OneDrive) fire a\n     \"coming soon\" toast. Wire real SDKs here when ready.\n   - Tab 4 options open the Design Studio in a full-screen\n     <dialog> iframe. \"Skip and start from scratch\" too.\n   - A MutationObserver watches the native #uploadArea state\n     and collapses the tabs once a file has been selected.\n   - Tab 2 (Recent Designs) is rendered by the my-designs-panel\n     snippet and bridged to the upload pipeline by\n     snippets/product-page-popups.liquid (md-picker:use-designs\n     event). This file is intentionally NOT involved.\n   - Tab 3 (Create with AI) is rendered by the aiImageGenerator\n     content-for; the native pink-box button launches the\n     existing dialog unchanged.\n   ========================================================= */\n\n(function () {\n  'use strict';\n\n  if (window.__dtfUploadTabsInit) return;\n  window.__dtfUploadTabsInit = true;\n\n  /* Every prompt in this tab should:\n       1. Show up to 3 canned (existing) results from getGenerativeAiUploads.\n       2. Skip the batch generate-new POST if any canned came back.\n       3. Otherwise let the native code generate a fresh batch (batchSize=3).\n     We do this by intercepting both endpoints via fetch: cap the canned\n     response to 3 items, set __dtfutSkipNewAIGeneration when that array is\n     non-empty, and short-circuit postBatchGenerativeAiUpload when the flag\n     is set. The flag is consumed once per submit. */\n  if (!window.__dtfutFetchPatched && typeof window.fetch === 'function') {\n    window.__dtfutFetchPatched = true;\n    var origFetch = window.fetch;\n    window.fetch = function (url, options) {\n      try {\n        var urlStr = typeof url === 'string' ? url : (url && url.url) || '';\n\n        if (urlStr.indexOf('getGenerativeAiUploads.php') !== -1) {\n          return origFetch.apply(this, arguments).then(function (resp) {\n            return resp.clone().json().then(function (data) {\n              var capped = Array.isArray(data) ? data.slice(0, 3) : [];\n              if (capped.length > 0) {\n                window.__dtfutSkipNewAIGeneration = true;\n              }\n              return new Response(JSON.stringify(capped), {\n                status: resp.status,\n                headers: { 'Content-Type': 'application/json' }\n              });\n            }).catch(function () { return resp; });\n          });\n        }\n\n        if (window.__dtfutSkipNewAIGeneration && urlStr.indexOf('postBatchGenerativeAiUpload.php') !== -1) {\n          window.__dtfutSkipNewAIGeneration = false;\n          return Promise.resolve(new Response('[]', {\n            status: 200,\n            headers: { 'Content-Type': 'application/json' }\n          }));\n        }\n      } catch (e) { /* fall through */ }\n      return origFetch.apply(this, arguments);\n    };\n  }\n\n  /* ---------------- Toast ---------------- */\n  function toast(msg) {\n    var t = document.getElementById('dtfut-toast');\n    if (!t) {\n      t = document.createElement('div');\n      t.id = 'dtfut-toast';\n      t.style.cssText = 'position:fixed;left:50%;bottom:24px;transform:translate(-50%,10px);background:#111827;color:#fff;font:600 13px/1 \"DM Sans\",system-ui;padding:12px 18px;border-radius:999px;box-shadow:0 10px 30px rgba(0,0,0,.2);opacity:0;transition:opacity .2s ease,transform .2s ease;z-index:9999;pointer-events:none;';\n      document.body.appendChild(t);\n    }\n    t.textContent = msg;\n    requestAnimationFrame(function () {\n      t.style.opacity = '1';\n      t.style.transform = 'translate(-50%,0)';\n    });\n    clearTimeout(t.__dtfutTimer);\n    t.__dtfutTimer = setTimeout(function () {\n      t.style.opacity = '0';\n      t.style.transform = 'translate(-50%,10px)';\n    }, 2200);\n  }\n\n  /* ---------------- Tab switching ---------------- */\n  function activateTab(root, name) {\n    var tabs = root.querySelectorAll('[data-dtfut-tab]');\n    var panels = root.querySelectorAll('[data-dtfut-panel]');\n    var activeTitle = '';\n    tabs.forEach(function (t) {\n      var isActive = t.getAttribute('data-dtfut-tab') === name;\n      t.classList.toggle('is-active', isActive);\n      t.setAttribute('aria-selected', isActive ? 'true' : 'false');\n      if (isActive) activeTitle = t.getAttribute('data-dtfut-title-text') || '';\n    });\n    panels.forEach(function (p) {\n      var isActive = p.getAttribute('data-dtfut-panel') === name;\n      p.classList.toggle('is-active', isActive);\n      if (isActive) p.removeAttribute('hidden');\n      else p.setAttribute('hidden', '');\n    });\n    if (activeTitle) {\n      var titleEl = root.querySelector('[data-dtfut-title]');\n      if (titleEl) titleEl.textContent = activeTitle;\n    }\n    root.dispatchEvent(new CustomEvent('dtfut:tab-change', { detail: { name: name }, bubbles: true }));\n  }\n\n  function wireTabs(root) {\n    root.addEventListener('click', function (e) {\n      var btn = e.target.closest('[data-dtfut-tab]');\n      if (!btn || !root.contains(btn)) return;\n      activateTab(root, btn.getAttribute('data-dtfut-tab'));\n    });\n  }\n\n  /* ---------------- Tab 1: drop forwarding ---------------- */\n  /* If the user drops a file onto the panel (but outside the\n     native dropzone inner circle), forward it to #fileInput so\n     the existing change-listener picks it up. */\n  function wireDropForward(root) {\n    var host = root.querySelector('[data-dtfut-panel=\"upload\"]');\n    if (!host) return;\n\n    host.addEventListener('dragover', function (e) {\n      if (e.dataTransfer && e.dataTransfer.types && e.dataTransfer.types.indexOf('Files') > -1) {\n        e.preventDefault();\n      }\n    });\n    host.addEventListener('drop', function (e) {\n      if (!e.dataTransfer || !e.dataTransfer.files || !e.dataTransfer.files.length) return;\n      // If the drop already hit the native dropzone, let it handle.\n      if (e.target.closest('#dropZoon')) return;\n      e.preventDefault();\n      var input = document.getElementById('fileInput');\n      if (!input) return;\n      try {\n        input.files = e.dataTransfer.files;\n        input.dispatchEvent(new Event('change', { bubbles: true }));\n      } catch (_) {\n        // Fallback: dispatch a synthetic drop on #dropZoon.\n        var dz = document.getElementById('dropZoon');\n        if (dz) {\n          var ev = new DragEvent('drop', { bubbles: true, cancelable: true, dataTransfer: e.dataTransfer });\n          dz.dispatchEvent(ev);\n        }\n      }\n    });\n  }\n\n  /* ---------------- Canva / Dropbox / Drive / OneDrive ---------------- */\n\n  /* Lazy-load the Dropbox Chooser script. Idempotent; parallel calls share\n     one script tag. Rejects if the app key is missing or the script fails\n     to load. */\n  var dropboxLoaderPromise = null;\n  function loadDropboxChooser(appKey) {\n    if (window.Dropbox && typeof window.Dropbox.choose === 'function') {\n      return Promise.resolve();\n    }\n    if (dropboxLoaderPromise) return dropboxLoaderPromise;\n    dropboxLoaderPromise = new Promise(function (resolve, reject) {\n      var s = document.createElement('script');\n      s.id = 'dropboxjs';\n      s.src = 'https://www.dropbox.com/static/api/2/dropins.js';\n      s.setAttribute('data-app-key', appKey);\n      s.onload = function () { resolve(); };\n      s.onerror = function () {\n        dropboxLoaderPromise = null;\n        reject(new Error('Failed to load Dropbox Chooser'));\n      };\n      document.head.appendChild(s);\n    });\n    return dropboxLoaderPromise;\n  }\n\n  /* Fetch a remote file URL, wrap as a File, and hand it to the native\n     upload pipeline (manageFiles on the newer upload-controls, uploadFile\n     on the legacy path). Same pattern used by the AI-image figure click\n     handler below. */\n  function importRemoteFile(url, fileName) {\n    var jq = window.jQuery || window.$;\n    return fetch(url)\n      .then(function (response) {\n        if (!response.ok) throw new Error('Download failed: ' + response.status);\n        var type = response.headers.get('Content-Type') || 'application/octet-stream';\n        return response.arrayBuffer().then(function (ab) {\n          return { type: type, buffer: ab };\n        });\n      })\n      .then(function (data) {\n        var blob = new Blob([data.buffer], { type: data.type });\n        var file = new File([blob], fileName, { type: data.type });\n        var isNewBySize = jq ? jq('upload-controls').length : 0;\n        if (isNewBySize > 0 && typeof window.manageFiles === 'function') {\n          window.manageFiles([file]);\n        } else if (typeof window.uploadFile === 'function') {\n          if (jq && jq('.step__2').hasClass('hidden')) {\n            window.uploadFile(file);\n          } else {\n            window.uploadFile(file, 'second_image');\n          }\n        }\n      });\n  }\n\n  function openDropboxChooser(appKey) {\n    loadDropboxChooser(appKey).then(function () {\n      window.Dropbox.choose({\n        linkType: 'direct',\n        multiselect: true,\n        extensions: ['.jpg', '.jpeg', '.png', '.gif', '.webp', '.tiff', '.tif', '.svg', '.pdf'],\n        success: function (files) {\n          if (!files || !files.length) return;\n          files.forEach(function (f) {\n            importRemoteFile(f.link, f.name).catch(function (err) {\n              console.error('Dropbox import error:', err);\n              toast('Could not import ' + f.name);\n            });\n          });\n        },\n        cancel: function () {}\n      });\n    }).catch(function (err) {\n      console.error(err);\n      toast('Dropbox is temporarily unavailable');\n    });\n  }\n\n  /* ---- Google Drive Picker ---- */\n  /* Two scripts needed: Google Identity Services (for the OAuth token) and\n     gapi (for the Picker API). Both are loaded lazily and de-duped. */\n  var gisLoaderPromise = null;\n  function loadGoogleIdentity() {\n    if (window.google && window.google.accounts && window.google.accounts.oauth2) {\n      return Promise.resolve();\n    }\n    if (gisLoaderPromise) return gisLoaderPromise;\n    gisLoaderPromise = new Promise(function (resolve, reject) {\n      var s = document.createElement('script');\n      s.src = 'https://accounts.google.com/gsi/client';\n      s.async = true;\n      s.defer = true;\n      s.onload = function () { resolve(); };\n      s.onerror = function () {\n        gisLoaderPromise = null;\n        reject(new Error('Failed to load Google Identity Services'));\n      };\n      document.head.appendChild(s);\n    });\n    return gisLoaderPromise;\n  }\n\n  var gapiLoaderPromise = null;\n  function loadGapiPicker() {\n    if (window.gapi && window.google && window.google.picker) {\n      return Promise.resolve();\n    }\n    if (gapiLoaderPromise) return gapiLoaderPromise;\n    gapiLoaderPromise = new Promise(function (resolve, reject) {\n      var s = document.createElement('script');\n      s.src = 'https://apis.google.com/js/api.js';\n      s.async = true;\n      s.defer = true;\n      s.onload = function () {\n        window.gapi.load('picker', {\n          callback: function () { resolve(); },\n          onerror: function () {\n            gapiLoaderPromise = null;\n            reject(new Error('Failed to load Google Picker API'));\n          }\n        });\n      };\n      s.onerror = function () {\n        gapiLoaderPromise = null;\n        reject(new Error('Failed to load gapi'));\n      };\n      document.head.appendChild(s);\n    });\n    return gapiLoaderPromise;\n  }\n\n  /* Pull a Drive file's bytes using the access token, wrap as File, feed\n     into the same manageFiles/uploadFile pipeline as Dropbox. */\n  function fetchDriveFile(fileId, fileName, mimeType, accessToken) {\n    var jq = window.jQuery || window.$;\n    var url = 'https://www.googleapis.com/drive/v3/files/' + encodeURIComponent(fileId) +\n              '?alt=media&supportsAllDrives=true';\n    return fetch(url, {\n      headers: { Authorization: 'Bearer ' + accessToken }\n    })\n      .then(function (response) {\n        if (!response.ok) throw new Error('Drive download failed: ' + response.status);\n        return response.arrayBuffer();\n      })\n      .then(function (ab) {\n        var type = mimeType || 'application/octet-stream';\n        var blob = new Blob([ab], { type: type });\n        var file = new File([blob], fileName, { type: type });\n        var isNewBySize = jq ? jq('upload-controls').length : 0;\n        if (isNewBySize > 0 && typeof window.manageFiles === 'function') {\n          window.manageFiles([file]);\n        } else if (typeof window.uploadFile === 'function') {\n          if (jq && jq('.step__2').hasClass('hidden')) {\n            window.uploadFile(file);\n          } else {\n            window.uploadFile(file, 'second_image');\n          }\n        }\n      });\n  }\n\n  function openGoogleDrivePicker(clientId, apiKey, loginHint) {\n    Promise.all([loadGoogleIdentity(), loadGapiPicker()]).then(function () {\n      var tokenClient = window.google.accounts.oauth2.initTokenClient({\n        client_id: clientId,\n        scope: 'https://www.googleapis.com/auth/drive.file',\n        login_hint: loginHint || '',\n        callback: function (tokenResponse) {\n          if (!tokenResponse || !tokenResponse.access_token) {\n            toast('Google sign-in was cancelled');\n            return;\n          }\n          var accessToken = tokenResponse.access_token;\n          var mimeTypes = 'image/jpeg,image/png,image/gif,image/webp,image/svg+xml,image/tiff,application/pdf';\n          var docsView = new window.google.picker.DocsView(window.google.picker.ViewId.DOCS)\n            .setMimeTypes(mimeTypes)\n            .setIncludeFolders(true)\n            .setSelectFolderEnabled(false);\n          var uploadView = new window.google.picker.DocsUploadView();\n          // Project number (AKA appId) is the numeric prefix of the OAuth\n          // Client ID \u2014 required so drive.file scope recognizes picked files.\n          var projectNumber = (clientId || '').split('-')[0];\n          var picker = new window.google.picker.PickerBuilder()\n            .enableFeature(window.google.picker.Feature.MULTISELECT_ENABLED)\n            .enableFeature(window.google.picker.Feature.SUPPORT_DRIVES)\n            .setAppId(projectNumber)\n            .setOAuthToken(accessToken)\n            .setDeveloperKey(apiKey)\n            .addView(docsView)\n            .addView(uploadView)\n            .setCallback(function (data) {\n              if (data.action !== window.google.picker.Action.PICKED) return;\n              var docs = data.docs || [];\n              docs.forEach(function (doc) {\n                fetchDriveFile(doc.id, doc.name, doc.mimeType, accessToken).catch(function (err) {\n                  console.error('Drive import error:', err);\n                  toast('Could not import ' + doc.name);\n                });\n              });\n            })\n            .build();\n          picker.setVisible(true);\n        }\n      });\n      tokenClient.requestAccessToken({ prompt: '' });\n    }).catch(function (err) {\n      console.error(err);\n      toast('Google Drive is temporarily unavailable');\n    });\n  }\n\n  /* ---- OneDrive File Picker (OneDrive.js v7.2) ---- */\n  var oneDriveLoaderPromise = null;\n  function loadOneDrivePicker() {\n    if (window.OneDrive && typeof window.OneDrive.open === 'function') {\n      return Promise.resolve();\n    }\n    if (oneDriveLoaderPromise) return oneDriveLoaderPromise;\n    oneDriveLoaderPromise = new Promise(function (resolve, reject) {\n      var s = document.createElement('script');\n      s.src = 'https://js.live.net/v7.2/OneDrive.js';\n      s.async = true;\n      s.defer = true;\n      s.onload = function () { resolve(); };\n      s.onerror = function () {\n        oneDriveLoaderPromise = null;\n        reject(new Error('Failed to load OneDrive picker'));\n      };\n      document.head.appendChild(s);\n    });\n    return oneDriveLoaderPromise;\n  }\n\n  function openOneDrivePicker(clientId, redirectUri) {\n    loadOneDrivePicker().then(function () {\n      window.OneDrive.open({\n        clientId: clientId,\n        action: 'download',\n        multiSelect: true,\n        openInNewWindow: true,\n        advanced: {\n          redirectUri: redirectUri,\n          filter: '.png,.jpg,.jpeg,.gif,.webp,.svg,.tiff,.tif,.pdf'\n        },\n        success: function (response) {\n          var files = (response && response.value) || [];\n          files.forEach(function (f) {\n            var url = f['@microsoft.graph.downloadUrl'] || f.downloadUrl;\n            if (!url) return;\n            importRemoteFile(url, f.name).catch(function (err) {\n              console.error('OneDrive import error:', err);\n              toast('Could not import ' + f.name);\n            });\n          });\n        },\n        cancel: function () {},\n        error: function (err) {\n          console.error('OneDrive picker error:', err);\n          toast('OneDrive picker failed');\n        }\n      });\n    }).catch(function (err) {\n      console.error(err);\n      toast('OneDrive is temporarily unavailable');\n    });\n  }\n\n  function wireSources(root) {\n    root.addEventListener('click', function (e) {\n      var btn = e.target.closest('[data-dtfut-source]');\n      if (!btn) return;\n      var src = btn.getAttribute('data-dtfut-source');\n      if (src === 'dropbox') {\n        var appKey = root.getAttribute('data-dtfut-dropbox-key') || '';\n        if (!appKey || appKey === 'REPLACE_WITH_DROPBOX_APP_KEY') {\n          toast('Dropbox app key not configured');\n          return;\n        }\n        openDropboxChooser(appKey);\n        return;\n      }\n      if (src === 'drive') {\n        var clientId = root.getAttribute('data-dtfut-google-client-id') || '';\n        var apiKey = root.getAttribute('data-dtfut-google-api-key') || '';\n        var loginHint = root.getAttribute('data-dtfut-customer-email') || '';\n        if (!clientId || clientId === 'REPLACE_WITH_GOOGLE_CLIENT_ID' ||\n            !apiKey || apiKey === 'REPLACE_WITH_GOOGLE_API_KEY') {\n          toast('Google Drive is not configured');\n          return;\n        }\n        openGoogleDrivePicker(clientId, apiKey, loginHint);\n        return;\n      }\n      if (src === 'onedrive') {\n        var odClientId = root.getAttribute('data-dtfut-onedrive-client-id') || '';\n        var odRedirect = root.getAttribute('data-dtfut-shop-origin') || window.location.origin;\n        if (!odClientId || odClientId === 'REPLACE_WITH_ONEDRIVE_CLIENT_ID') {\n          toast('OneDrive is not configured');\n          return;\n        }\n        openOneDrivePicker(odClientId, odRedirect);\n        return;\n      }\n      toast((src === 'canva' ? 'Canva' : src) + ' import coming soon');\n    });\n  }\n\n  /* ---------------- Tab 4: Design Studio (v0-editor overlay) ----------------\n     The Ninja Design Studio is rendered into every page via layout/theme.liquid\n     (-> snippet 'v0-editor'). It lives hidden as '.customTabelPopup__overlay-editor'.\n     We open it the same way the native '.open-v0-editor' trigger does, except we\n     SKIP the '.customTabelPopup__overlay-modal' intro popup (the \"What would you\n     like to create?\" splash) because our Tab 4 already made that choice. After the\n     overlay is open we click the matching toolbar button so the user lands\n     directly in the intended flow (native file picker for upload, or the new\n     text object + text options panel for text). */\n  function openDesignStudio(mode) {\n    var editorOverlay = document.querySelector('.customTabelPopup__overlay-editor');\n    var introOverlay  = document.querySelector('.customTabelPopup__overlay-modal');\n    if (!editorOverlay) return;\n\n    // Render the studio inline inside the Create tab panel (so it's part of the product page,\n    // not a fullscreen overlay). Tag the overlay with __inlineParent so the fullscreen toggle\n    // knows where to put it back after lifting it to body for fullscreen.\n    var createPanel = document.querySelector('.dtfut__panel[data-dtfut-panel=\"create\"]');\n    if (createPanel) {\n      editorOverlay.__inlineParent = createPanel;\n      if (editorOverlay.parentNode !== createPanel) {\n        createPanel.appendChild(editorOverlay);\n      }\n      createPanel.classList.add('dtfut__panel--studio-open');\n    }\n    editorOverlay.classList.add('studio-inline');\n    editorOverlay.classList.remove('studio-embedded');\n\n    // Mirror '.open-v0-editor' side effects (minus the intro popup).\n    editorOverlay.style.display = 'block';\n    if (introOverlay) introOverlay.style.display = 'none';\n    // NOTE: do NOT add `hide-chat` while inline \u2014 that class locks body scroll,\n    // which is correct for the fullscreen overlay but wrong when the studio is\n    // embedded inside the product page. The fullscreen toggle adds/removes it.\n\n    // v0-editor init uses a transparent-canvas swatch click to seed state.\n    var swatch = document.querySelector('.transparent-swatch.canvas-color-swatch');\n    if (swatch && typeof swatch.click === 'function') {\n      try { swatch.click(); } catch (_) {}\n    }\n\n    // Trigger the intended entry flow. Do this synchronously so we keep the\n    // user-activation gesture \u2014 #add-image-btn forwards to #file-input.click(),\n    // which needs a trusted gesture to open the native picker.\n    if (mode === 'upload') {\n      var uploadBtn = document.querySelector('#add-image-btn');\n      if (uploadBtn) uploadBtn.click();\n    } else if (mode === 'text') {\n      var textBtn = document.querySelector('#add-text-btn');\n      if (textBtn) textBtn.click();\n    }\n    // mode === 'blank' or anything else: just leave them on a clean canvas.\n\n    // Mobile: set the studio to a fixed 38% zoom and pin it there so the\n    // canvas lands centered without resizing. We pre-pin BEFORE the\n    // fullscreen toggle fires (in wireCreateOptions) so the very first\n    // paint targets the 38% layout. setStudioZoomWhenReady then defends\n    // against fitCanvasToArea (which runs ASYNC via MutationObserver)\n    // by re-asserting the target zoom for ~1.5s.\n    var isMobile = window.matchMedia && window.matchMedia('(max-width: 749px)').matches;\n    if (isMobile) {\n      // Tag for fitCanvasToArea to short-circuit (see patch below).\n      window.__dtfMobileZoomTarget = 38;\n      // Apply right now if the API is already on window \u2014 first paint\n      // will use this value instead of fitCanvasToArea's computed scale.\n      if (typeof window.setStudioZoom === 'function') {\n        try { window.setStudioZoom(38); } catch (_) {}\n      }\n      setStudioZoomWhenReady(38);\n    }\n  }\n\n  // Waits for the studio's zoom state to be ready, then sets an exact target\n  // percentage via window.setStudioZoom. Re-asserts for ~1.5s because\n  // fitCanvasToArea runs on a MutationObserver and can override our initial set.\n  function setStudioZoomWhenReady(targetPct) {\n    if (typeof window.setStudioZoom !== 'function') {\n      setTimeout(function () { setStudioZoomWhenReady(targetPct); }, 100);\n      return;\n    }\n    try { window.setStudioZoom(targetPct); } catch (_) {}\n    var attempts = 0;\n    var iv = setInterval(function () {\n      attempts++;\n      var display = document.getElementById('zoom-display');\n      var current = display && parseInt((display.textContent || '').replace('%', ''), 10);\n      if (current && current > 0 && current !== targetPct) {\n        window.setStudioZoom(targetPct);\n      }\n      if (attempts > 15 || (current === targetPct && attempts > 8)) {\n        clearInterval(iv);\n      }\n    }, 100);\n  }\n\n  // Monkey-patch v0-script's `fitCanvasToArea` so that on mobile, when\n  // we've pinned a target zoom, fitCanvasToArea defers to that value\n  // instead of recomputing a \"fit width\" that briefly zooms the canvas\n  // up before our setStudioZoom pulls it back to 38%. Runs once when\n  // window.fitCanvasToArea is available.\n  function installMobileFitOverride() {\n    if (window.__dtfFitOverrideInstalled) return;\n    if (typeof window.fitCanvasToArea !== 'function') {\n      setTimeout(installMobileFitOverride, 100);\n      return;\n    }\n    window.__dtfFitOverrideInstalled = true;\n    var origFit = window.fitCanvasToArea;\n    window.fitCanvasToArea = function () {\n      var isMobileFs = window.matchMedia && window.matchMedia('(max-width: 749px)').matches;\n      var target = window.__dtfMobileZoomTarget;\n      if (isMobileFs && typeof target === 'number' && typeof window.setStudioZoom === 'function') {\n        try { window.setStudioZoom(target); } catch (_) {}\n        return;\n      }\n      return origFit.apply(this, arguments);\n    };\n  }\n  installMobileFitOverride();\n\n  // Keep fitting width until the layout stabilises. fitStudioWidth measures the\n  // canvas-area width, so we want to re-measure as flex/containment settles.\n  function fitStudioWidthWhenReady() {\n    if (typeof window.fitStudioWidth !== 'function') {\n      setTimeout(fitStudioWidthWhenReady, 100);\n      return;\n    }\n    var attempts = 0;\n    var iv = setInterval(function () {\n      attempts++;\n      window.fitStudioWidth();\n      if (attempts >= 10) clearInterval(iv);\n    }, 120);\n  }\n\n  function isMobileViewport() {\n    return window.matchMedia && window.matchMedia('(max-width: 749px)').matches;\n  }\n\n  // On mobile fullscreen we want the floating pill (undo/redo/zoom) to sit inline\n  // inside the top toolbar \u2014 flex handles vertical centering automatically. Move\n  // it into .toolbar-right just before #fullscreen-toggle-btn when on mobile.\n  function alignFloatingPillInTopBar() {\n    if (!isMobileViewport()) return;\n    var floating = document.querySelector('.customTabelPopup__overlay-editor .floating_tools');\n    var toolbarRight = document.querySelector('.customTabelPopup__overlay-editor .editor-container .toolbar:not(._footer) .toolbar-right');\n    var fsBtn = document.querySelector('#fullscreen-toggle-btn');\n    if (!floating || !toolbarRight || !fsBtn) return;\n    if (floating.parentNode === toolbarRight) return;\n    toolbarRight.insertBefore(floating, fsBtn.nextSibling);\n  }\n\n  function wireCreateOptions(root) {\n    // Auto-open the studio the moment the Create tab becomes active. On\n    // mobile, also immediately lift it to fullscreen so the user lands\n    // directly in the studio experience \u2014 the legacy \"Give it a little\n    // more room?\" splash is gone. The fabric canvas is preserved across\n    // tab switches so coming back resumes where they left off.\n    root.addEventListener('dtfut:tab-change', function (e) {\n      if (e.detail && e.detail.name !== 'create') return;\n\n      // Set the mobile zoom target BEFORE openDesignStudio runs so the\n      // monkey-patched fitCanvasToArea (in installMobileFitOverride)\n      // already short-circuits to 38% on its first invocation.\n      if (isMobileViewport()) {\n        window.__dtfMobileZoomTarget = 38;\n        if (typeof window.setStudioZoom === 'function') {\n          try { window.setStudioZoom(38); } catch (_) {}\n        }\n      }\n\n      var overlay = document.querySelector('.customTabelPopup__overlay-editor');\n      var alreadyOpen = overlay && overlay.classList.contains('studio-inline') && overlay.offsetParent;\n      if (!alreadyOpen) openDesignStudio('blank');\n\n      if (isMobileViewport()) {\n        // Trigger fullscreen synchronously in the SAME tick as\n        // openDesignStudio so the browser never paints the inline state.\n        var ov = document.querySelector('.customTabelPopup__overlay-editor');\n        var btn = document.getElementById('fullscreen-toggle-btn');\n        if (ov && btn && ov.classList.contains('studio-inline')) {\n          btn.click();\n        }\n        // alignFloatingPillInTopBar still defers \u2014 it depends on fabric's\n        // resize handler running, which DOES yield to the event loop.\n        setTimeout(alignFloatingPillInTopBar, 200);\n      }\n    });\n\n    root.addEventListener('click', function (e) {\n      var trigger = e.target.closest('[data-dtfut-create]');\n      if (!trigger) return;\n      e.preventDefault();\n      openDesignStudio(trigger.getAttribute('data-dtfut-create'));\n    });\n\n    // Mobile-only: clicking the X (fullscreen toggle while in fullscreen)\n    // should close the studio AND switch back to the Upload tab. The fabric\n    // canvas state stays intact (just hidden under the upload panel) so\n    // re-entering Design Studio resumes where they left off.\n    document.addEventListener('click', function (e) {\n      if (!e.target || !e.target.closest) return;\n      var btn = e.target.closest('#fullscreen-toggle-btn');\n      if (!btn) return;\n      if (!isMobileViewport()) return;\n      var overlay = document.querySelector('.customTabelPopup__overlay-editor');\n      if (!overlay) return;\n      // Only intercept when currently fullscreen (no studio-inline class).\n      if (overlay.classList.contains('studio-inline')) return;\n      // Let the existing toggle handler run first (it returns the studio to\n      // inline mode); on the next tick, activate the Upload tab in dtfut.\n      setTimeout(function () {\n        var uploadTab = root.querySelector('[data-dtfut-tab=\"upload\"]');\n        if (uploadTab) uploadTab.click();\n      }, 50);\n    }, false);\n  }\n\n  /* ---------------- Tab 2: images-per-row picker ---------------- */\n  function wireColsPicker(root) {\n    var panel = root.querySelector('.dtfut__panel[data-dtfut-panel=\"recent\"]');\n    if (!panel) return;\n    var isMobile = window.matchMedia && window.matchMedia('(max-width: 749px)').matches;\n    var initialCols = isMobile ? '2' : '4';\n    panel.setAttribute('data-cols', initialCols);\n    syncActiveCol(panel, initialCols);\n    var mobileCols = panel.querySelector('.dtfut__cols--mobile');\n    var filtersRow = panel.querySelector('.md-filters__row');\n    if (mobileCols && filtersRow && !filtersRow.contains(mobileCols)) {\n      filtersRow.appendChild(mobileCols);\n    }\n    panel.addEventListener('click', function (e) {\n      var btn = e.target.closest('.dtfut__cols-btn');\n      if (!btn) return;\n      var cols = btn.getAttribute('data-dtfut-cols');\n      if (!cols) return;\n      panel.setAttribute('data-cols', cols);\n      syncActiveCol(panel, cols);\n    });\n  }\n\n  /* ---------------- Tab 2: search no-results state ----------------\n     The shared my-designs-panel always renders upload-tile HTML in\n     non-archive views, so its native .md-empty never fires in picker\n     mode. Observe the grid's children + search input and toggle\n     data-dtfut-empty-search on the panel; CSS shows .dtfut__no-results\n     when the attribute is \"true\". */\n  function wireNoResults(root) {\n    var panel = root.querySelector('.dtfut__panel[data-dtfut-panel=\"recent\"]');\n    if (!panel) return;\n    var search = panel.querySelector('.md-search-input');\n    var grid = panel.querySelector('.md-grid');\n    if (!search || !grid) return;\n\n    function refresh() {\n      var hasQuery = search.value.trim().length > 0;\n      var hasCard = grid.querySelector('.md-card') !== null;\n      panel.setAttribute('data-dtfut-empty-search', (hasQuery && !hasCard) ? 'true' : 'false');\n    }\n\n    search.addEventListener('input', refresh);\n    var mo = new MutationObserver(refresh);\n    mo.observe(grid, { childList: true });\n    refresh();\n  }\n  function syncActiveCol(panel, cols) {\n    panel.querySelectorAll('.dtfut__cols-btn').forEach(function (b) {\n      b.classList.toggle('is-active', b.getAttribute('data-dtfut-cols') === cols);\n    });\n  }\n\n  /* ---------------- Tab 2: hide tab when logged-in customer has 0 designs ----\n     Logged-out customers see the login CTA inside the panel \u2014 keep the tab.\n     Logged-in customers with zero designs after load \u2192 hide the tab so the\n     row only shows what's actionable. If the recent tab was active when it\n     gets hidden, fall back to the Upload tab. */\n  function wireRecentTabVisibility(root) {\n    var tabBtn = root.querySelector('[data-dtfut-tab=\"recent\"]');\n    var panel = root.querySelector('.dtfut__panel[data-dtfut-panel=\"recent\"]');\n    if (!tabBtn || !panel) return;\n    var grid = panel.querySelector('.md-grid');\n    if (!grid) return; // logged-out path: panel has login CTA, no grid\n\n    function loadingVisible() {\n      var loading = panel.querySelector('.md-loading');\n      if (!loading) return false;\n      var cs = getComputedStyle(loading);\n      if (cs.display === 'none' || cs.visibility === 'hidden') return false;\n      var inline = (loading.getAttribute('style') || '').toLowerCase();\n      if (inline.indexOf('display:none') !== -1 || inline.indexOf('display: none') !== -1) return false;\n      return true;\n    }\n\n    function refresh() {\n      if (loadingVisible()) return;\n      var search = panel.querySelector('.md-search-input');\n      if (search && search.value.trim().length > 0) return; // search-filtered, not truly empty\n      var hasCards = grid.querySelector('.md-card') !== null;\n      var shouldHide = !hasCards;\n      var currentlyHidden = tabBtn.style.display === 'none';\n      // Hide / restore all `.access_old_data` (\"Choose a previously\n      // uploaded design\") links \u2014 same empty-state condition applies on\n      // the legacy PDP, where this link lives outside the tab strip.\n      // Scoped to logged-in customers only; logged-out renders a Login\n      // CTA inside .access_old_data, which should always be visible.\n      var aods = document.querySelectorAll('.access_old_data');\n      for (var i = 0; i < aods.length; i++) {\n        var aod = aods[i];\n        var isLoginCta = aod.querySelector('.basic_link, .basic__link') !== null;\n        if (isLoginCta) continue;\n        // `!important` is needed to beat the existing rule\n        // `.dtfut .secondDropZone .access_old_data { display: block !important; }`.\n        // Use `visibility: hidden` so the link's vertical space is\n        // preserved (the upload card layout below stays put). The CSS\n        // rule `.dtfut .secondDropZone .access_old_data { display: block\n        // !important; }` already keeps the box laid out on v2; this just\n        // makes the box invisible. On the legacy PDP this also reserves\n        // the space below the upload area so nothing shifts up.\n        if (shouldHide) {\n          aod.style.setProperty('visibility', 'hidden', 'important');\n        } else {\n          aod.style.removeProperty('visibility');\n        }\n      }\n      if (shouldHide === currentlyHidden) return;\n      // The base CSS sets `display: inline-flex` on .dtfut__tab, which\n      // overrides the HTML `hidden` attribute. Use inline display:none to\n      // force visibility off; clear it to restore.\n      tabBtn.style.display = shouldHide ? 'none' : '';\n      tabBtn.hidden = shouldHide;\n      if (shouldHide && tabBtn.classList.contains('is-active')) {\n        activateTab(root, 'upload');\n      }\n    }\n\n    // Observe the grid for card add/remove\n    new MutationObserver(refresh).observe(grid, { childList: true });\n    // Observe the loading element for any state change\n    var loadingEl = panel.querySelector('.md-loading');\n    if (loadingEl) {\n      new MutationObserver(refresh).observe(loadingEl, { attributes: true, attributeFilter: ['style', 'class', 'hidden'] });\n    }\n    // Observe md-empty visibility (shown when zero designs after load completes)\n    var emptyEl = panel.querySelector('.md-empty');\n    if (emptyEl) {\n      new MutationObserver(refresh).observe(emptyEl, { attributes: true, attributeFilter: ['style', 'class', 'hidden'] });\n    }\n    // Observe the panel itself for descendant additions (in case loading/empty get re-rendered)\n    new MutationObserver(refresh).observe(panel, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class', 'hidden'] });\n\n    refresh();\n    // Initial polling fallback \u2014 catches any state change in the first 30s\n    // regardless of how the my-designs JS chooses to signal load completion.\n    var poll = 0;\n    var pollIv = setInterval(function () {\n      poll++;\n      refresh();\n      if (poll >= 30) clearInterval(pollIv);\n    }, 1000);\n  }\n\n  /* ---------------- Tab 3: AI hero ----------------\n     The chat UI markup + JS for Tab 3 (\"Create with AI\") lives in\n     assets/ai-chat-sandbox.js. This file only retains the fetch patching\n     at the top (cap getGenerativeAiUploads to 3, short-circuit the\n     batch-generate POST when canned existed) so that whichever code drives\n     the dialog form (legacy or the sandbox) gets the same behaviour. */\n\n  /* ---------------- Move .promo below tabs wrapper ---------------- */\n  /* The \"Buy 5 Blanks = Get 10 FREE Transfers\" block is a custom_liquid\n     template block; its own script moves it beside .generative-ai-area,\n     which puts it inside Tab 3 (Create with AI). We want it as a\n     sibling immediately AFTER the .dtfut tabs wrapper so it sits\n     between the upload box and the price calculator \u2014 outside the\n     blue container. Set p.__moved = true so the template script\n     leaves it alone, and drop the .promo--between class so its\n     \"between\" CSS doesn't apply. */\n  function placePromo(root) {\n    if (!root.parentNode) return false;\n\n    function attach() {\n      var promo = document.querySelector('.promo');\n      if (!promo) return false;\n      if (promo.__dtfutPlaced && promo.previousElementSibling === root) return true;\n      promo.classList.remove('promo--between');\n      promo.classList.add('dtfut-promo');\n      promo.__moved = true;\n      promo.__dtfutPlaced = true;\n      root.parentNode.insertBefore(promo, root.nextSibling);\n      return true;\n    }\n\n    if (attach()) return true;\n\n    var mo = new MutationObserver(function () {\n      if (attach()) mo.disconnect();\n    });\n    mo.observe(document.body, { childList: true, subtree: true });\n    setTimeout(attach, 600);\n    setTimeout(attach, 2000);\n    return false;\n  }\n\n  /* ---------------- Post-upload state observer ---------------- */\n  /* Signals that mean \"upload is done, show the order form\":\n       Legacy (non-multiupload) \u2014 #uploadArea gets `.hidden` class.\n       Multiupload (b.enableSettings) \u2014 <master-upload> inside\n         <upload-controls> gets `.hidden`; post-upload form lives\n         inside <upload-controls><next-element>.\n       Legacy .fileupload_custom \u2014 display toggled to block.\n     Any of those \u2192 add `.is-upload-active` on root so the CSS\n     strips the tab strip + panel chrome and the form renders\n     clean, exactly like the pre-tabs layout. */\n  function wireUploadStateObserver(root) {\n    function sync() {\n      var legacyArea = document.getElementById('uploadArea');\n      var masterUpload = document.querySelector('upload-controls master-upload');\n      var nextEl = document.querySelector('upload-controls next-element');\n      var fileupload = document.querySelector('.fileupload_custom');\n\n      var legacyHidden = legacyArea && legacyArea.classList.contains('hidden');\n      var masterHidden = masterUpload && masterUpload.classList.contains('hidden');\n      var nextShown = nextEl && !nextEl.classList.contains('hidden');\n      var fileOpen = fileupload && (\n        (fileupload.style && fileupload.style.display === 'block') ||\n        (fileupload.offsetParent !== null && !fileupload.hasAttribute('hidden') &&\n         getComputedStyle(fileupload).display !== 'none')\n      );\n\n      var active = !!(legacyHidden || masterHidden || nextShown || fileOpen);\n      root.classList.toggle('is-upload-active', active);\n    }\n\n    sync();\n\n    var observed = [];\n    function watch(selector, filter) {\n      var el = typeof selector === 'string' ? document.querySelector(selector) : selector;\n      if (!el || observed.indexOf(el) > -1) return;\n      observed.push(el);\n      var mo = new MutationObserver(sync);\n      mo.observe(el, { attributes: true, attributeFilter: filter || ['class'] });\n    }\n\n    watch('#uploadArea', ['class']);\n    watch('upload-controls master-upload', ['class']);\n    watch('upload-controls next-element', ['class']);\n    watch('.fileupload_custom', ['class', 'style']);\n\n    // upload-controls itself may swap its `current` attribute\n    var controls = document.querySelector('upload-controls');\n    if (controls) {\n      var mo = new MutationObserver(sync);\n      mo.observe(controls, { attributes: true, attributeFilter: ['current', 'class'] });\n    }\n\n    // Some elements might not exist at init time \u2014 watch the document\n    // for them being added, then re-bind.\n    var bodyObserver = new MutationObserver(function () {\n      watch('#uploadArea', ['class']);\n      watch('upload-controls master-upload', ['class']);\n      watch('upload-controls next-element', ['class']);\n      watch('.fileupload_custom', ['class', 'style']);\n      sync();\n    });\n    bodyObserver.observe(document.body, { childList: true, subtree: true });\n\n    document.addEventListener('md-picker:use-designs', function () { setTimeout(sync, 300); });\n    document.addEventListener('change', function (e) {\n      if (e.target && e.target.id === 'fileInput') setTimeout(sync, 300);\n    });\n  }\n\n  /* ---------------- AI prompt guide overlay ---------------- */\n  /* The inline AI tab hides #generative-ai-tips (Example Prompt / Output).\n     Clicking \"AI prompt guide\" clones that content into an overlay that\n     covers the Ninja AI Image Creator view within the tab. */\n  function openAiGuide(root) {\n    var host = root || document.querySelector('.dtfut__ai-host');\n    var overlay = host && host.querySelector('[data-dtfut-ai-guide]');\n    var body = overlay && overlay.querySelector('[data-dtfut-ai-guide-body]');\n    var tips = document.getElementById('generative-ai-tips');\n    if (!overlay || !body || !tips) return;\n    body.innerHTML = '';\n    var clone = tips.cloneNode(true);\n    clone.removeAttribute('id');\n    clone.style.display = 'block';\n    body.appendChild(clone);\n    overlay.hidden = false;\n    overlay.classList.add('is-open');\n  }\n  function closeAiGuide(overlay) {\n    var overlays = overlay ? [overlay] : document.querySelectorAll('[data-dtfut-ai-guide]');\n    overlays.forEach(function (o) {\n      o.classList.remove('is-open');\n      o.hidden = true;\n    });\n  }\n  function wireAiGuide() {\n    if (document.__dtfutAiGuideWired) return;\n    document.__dtfutAiGuideWired = true;\n    document.addEventListener('click', function (e) {\n      var opener = e.target.closest('[data-dtfut-ai-guide-open]');\n      if (opener) {\n        e.preventDefault();\n        var host = opener.closest('.dtfut__ai-host');\n        openAiGuide(host);\n        return;\n      }\n      var closer = e.target.closest('[data-dtfut-ai-guide-close]');\n      if (closer) {\n        e.preventDefault();\n        closeAiGuide(closer.closest('[data-dtfut-ai-guide]'));\n        return;\n      }\n    });\n  }\n\n  /* ---------------- AI search: hide recent-search dropdown on submit ---------------- */\n  /* The AI dialog's input shows a \"Recent Searches\" menu when focused;\n     it's supposed to hide on blur, but clicking Generate keeps focus on\n     the input (or hides too slowly) so the dropdown overlaps the results.\n     Force-close it on submit and whenever Generate is clicked. */\n  function wireAiSearchMenuClose() {\n    if (document.__dtfutAiMenuWired) return;\n    document.__dtfutAiMenuWired = true;\n\n    function closeMenu() {\n      var menu = document.getElementById('AISearchMenu');\n      var input = document.getElementById('AISearchInput');\n      if (menu) menu.classList.remove('active');\n      if (input && typeof input.blur === 'function') input.blur();\n    }\n\n    document.addEventListener('submit', function (e) {\n      var form = e.target;\n      if (form && form.closest && form.closest('#generative-ai-dialog')) {\n        closeMenu();\n      }\n    }, true);\n\n    document.addEventListener('click', function (e) {\n      var btn = e.target && e.target.closest && e.target.closest('#generative-ai-dialog form button[type=\"submit\"]');\n      if (btn) closeMenu();\n    });\n  }\n\n  /* ---------------- Responsive collapse ----------------\n     The desktop layout puts the \"Upload Your Artwork\" title to the\n     left of the four tabs on a single row. Once the row can't fit\n     (any collision), drop into a stacked layout: title above, tabs\n     below with icons stacked over labels. If the stacked tabs row\n     still can't fit the full labels, shorten them (\"Previous Designs\"\n     \u2192 \"Previous\", \"Create with AI\" \u2192 \"AI\", \"Design Studio\" \u2192 \"Studio\").\n\n     Container-driven via ResizeObserver \u2014 the tabs sit in a product\n     column whose width depends on the page layout, not just viewport. */\n  function wireResponsiveTabs(root) {\n    var header = root.querySelector('.dtfut__header');\n    var tabsEl = root.querySelector('.dtfut__tabs');\n    var titleEl = root.querySelector('.dtfut__header-title');\n    if (!header || !tabsEl) return;\n\n    function sumNaturalTabsWidth(tabsList, gapPx) {\n      var total = 0;\n      for (var i = 0; i < tabsList.length; i++) {\n        // scrollWidth on each tab is reliable because the labels\n        // have `white-space: nowrap`, so tab.scrollWidth == content width\n        // including padding, regardless of flex-shrink on the parent.\n        total += tabsList[i].scrollWidth;\n      }\n      if (tabsList.length > 1) total += (tabsList.length - 1) * gapPx;\n      return total;\n    }\n\n    // Measure the widest possible title text via an offscreen span. The title\n    // text swaps per active tab (\"Upload Your Artwork\" \u2192 \"Describe It, We'll\n    // Design It\" etc.); using `titleEl.scrollWidth` directly would shift the\n    // collision threshold whenever the user switched tabs, causing the row\n    // layout to flip into compact mode mid-interaction. Using the longest\n    // possible title fixes the threshold so the layout is stable.\n    function measureLongestTitleWidth() {\n      if (!titleEl) return 0;\n      var titles = [];\n      var titled = root.querySelectorAll('[data-dtfut-title-text]');\n      for (var i = 0; i < titled.length; i++) {\n        var t = titled[i].getAttribute('data-dtfut-title-text');\n        if (t) titles.push(t);\n      }\n      if (titles.length === 0) titles.push(titleEl.textContent || '');\n\n      var measurer = document.createElement('span');\n      var cs = getComputedStyle(titleEl);\n      measurer.style.position = 'absolute';\n      measurer.style.left = '-9999px';\n      measurer.style.top = '0';\n      measurer.style.visibility = 'hidden';\n      measurer.style.whiteSpace = 'nowrap';\n      measurer.style.fontFamily = cs.fontFamily;\n      measurer.style.fontSize = cs.fontSize;\n      measurer.style.fontWeight = cs.fontWeight;\n      measurer.style.fontStyle = cs.fontStyle;\n      measurer.style.letterSpacing = cs.letterSpacing;\n      measurer.style.textTransform = cs.textTransform;\n      document.body.appendChild(measurer);\n\n      var maxW = 0;\n      for (var j = 0; j < titles.length; j++) {\n        measurer.textContent = titles[j];\n        var w = measurer.getBoundingClientRect().width;\n        if (w > maxW) maxW = w;\n      }\n      document.body.removeChild(measurer);\n      return maxW;\n    }\n\n    var raf = 0;\n    function recompute() {\n      raf = 0;\n\n      // Reset to row layout to measure natural widths.\n      root.classList.remove('is-compact', 'is-narrow');\n      void header.offsetWidth; // force reflow\n\n      var tabs = tabsEl.querySelectorAll('.dtfut__tab');\n      var tabsCs = getComputedStyle(tabsEl);\n      var tabsGap = parseFloat(tabsCs.columnGap || tabsCs.gap || '0') || 0;\n      var headerCs = getComputedStyle(header);\n      var headerGap = parseFloat(headerCs.columnGap || headerCs.gap || '0') || 0;\n      var padX = (parseFloat(headerCs.paddingLeft) || 0) + (parseFloat(headerCs.paddingRight) || 0);\n      var avail = header.clientWidth - padX;\n\n      var titleNatural = measureLongestTitleWidth();\n      var tabsNatural = sumNaturalTabsWidth(tabs, tabsGap);\n      var rowNatural = titleNatural + headerGap + tabsNatural;\n\n      // Buffer (px) so we switch to compact slightly before an actual\n      // edge-touch collision \u2014 anything closer feels cramped visually.\n      var BUFFER = 16;\n\n      if (rowNatural + BUFFER > avail) {\n        root.classList.add('is-compact');\n        void tabsEl.offsetWidth; // reflow under new flex-direction\n\n        // In compact mode, each tab's scrollWidth becomes the wider of\n        // its icon vs label (column flex-direction). If the sum still\n        // can't fit the tabs strip's full width, swap to short labels.\n        var stackedNatural = sumNaturalTabsWidth(tabs, tabsGap);\n        if (stackedNatural > tabsEl.clientWidth - 1) {\n          root.classList.add('is-narrow');\n        }\n      }\n\n      // Mark as measured so the no-JS @media fallback steps aside.\n      root.classList.add('is-measured');\n    }\n\n    function schedule() {\n      if (raf) return;\n      raf = requestAnimationFrame(recompute);\n    }\n\n    if (typeof ResizeObserver === 'function') {\n      var ro = new ResizeObserver(schedule);\n      ro.observe(root);\n    } else {\n      window.addEventListener('resize', schedule);\n    }\n\n    if (document.fonts && document.fonts.ready && document.fonts.ready.then) {\n      document.fonts.ready.then(schedule).catch(function () {});\n    }\n\n    schedule();\n  }\n\n  /* ---------------- Init ---------------- */\n  function init(root) {\n    if (root.__dtfutInit) return;\n    root.__dtfutInit = true;\n\n    wireTabs(root);\n    wireDropForward(root);\n    wireSources(root);\n    wireCreateOptions(root);\n    wireColsPicker(root);\n    wireNoResults(root);\n    wireRecentTabVisibility(root);\n    placePromo(root);\n    wireUploadStateObserver(root);\n    wireAiSearchMenuClose();\n    wireAiGuide();\n    wireResponsiveTabs(root);\n  }\n\n  /* ---------------- Standalone access_old_data visibility ----------------\n     The legacy PDP (/products/dtf-transfers, template multiupload_vividpopular)\n     renders the my-designs grid + `.access_old_data` \"Choose a previously\n     uploaded design\" link but does NOT render the `.dtfut` tabs wrapper.\n     init() only fires for [data-dtfut] roots, so the empty-state hide\n     wouldn't run there. This bootstrap is page-wide: if `.md-grid` and any\n     `.access_old_data` exist, observe + poll just like wireRecentTabVisibility\n     and toggle the link visibility. */\n  function wireAccessOldDataGlobal() {\n    if (document.__dtfutAodWired) return;\n    var grid = document.querySelector('.md-grid');\n    var aods = document.querySelectorAll('.access_old_data');\n    if (!grid || aods.length === 0) return;\n    document.__dtfutAodWired = true;\n\n    var loading = grid.parentElement && grid.parentElement.querySelector('.md-loading');\n\n    function loadingVisible() {\n      if (!loading) return false;\n      var cs = getComputedStyle(loading);\n      if (cs.display === 'none' || cs.visibility === 'hidden') return false;\n      var inline = (loading.getAttribute('style') || '').toLowerCase();\n      if (inline.indexOf('display:none') !== -1 || inline.indexOf('display: none') !== -1) return false;\n      return true;\n    }\n\n    function refresh() {\n      if (loadingVisible()) return;\n      var hasCards = grid.querySelector('.md-card') !== null;\n      var shouldHide = !hasCards;\n      var nodes = document.querySelectorAll('.access_old_data');\n      for (var i = 0; i < nodes.length; i++) {\n        var aod = nodes[i];\n        var isLoginCta = aod.querySelector('.basic_link, .basic__link') !== null;\n        if (isLoginCta) continue;\n        // Use `visibility: hidden` so the link's vertical space is\n        // preserved (the upload card layout below stays put). The CSS\n        // rule `.dtfut .secondDropZone .access_old_data { display: block\n        // !important; }` already keeps the box laid out on v2; this just\n        // makes the box invisible. On the legacy PDP this also reserves\n        // the space below the upload area so nothing shifts up.\n        if (shouldHide) {\n          aod.style.setProperty('visibility', 'hidden', 'important');\n        } else {\n          aod.style.removeProperty('visibility');\n        }\n      }\n    }\n\n    new MutationObserver(refresh).observe(grid, { childList: true });\n    if (loading) {\n      new MutationObserver(refresh).observe(loading, { attributes: true, attributeFilter: ['style', 'class', 'hidden'] });\n    }\n    refresh();\n    var poll = 0;\n    var pollIv = setInterval(function () {\n      poll++;\n      refresh();\n      if (poll >= 30) clearInterval(pollIv);\n    }, 1000);\n  }\n\n  function bootAll() {\n    document.querySelectorAll('[data-dtfut]').forEach(init);\n    wireAccessOldDataGlobal();\n  }\n\n  if (document.readyState === 'loading') {\n    document.addEventListener('DOMContentLoaded', bootAll);\n  } else {\n    bootAll();\n  }\n\n  // Shopify theme editor re-render\n  document.addEventListener('shopify:section:load', bootAll);\n  document.addEventListener('shopify:block:select', bootAll);\n})();\n"],
  "mappings": "CAsBC,UAAY,CACX,aAEA,GAAI,OAAO,oBAAqB,OAWhC,GAVA,OAAO,oBAAsB,GAUzB,CAAC,OAAO,qBAAuB,OAAO,OAAO,OAAU,WAAY,CACrE,OAAO,oBAAsB,GAC7B,IAAI,UAAY,OAAO,MACvB,OAAO,MAAQ,SAAU,IAAK,QAAS,CACrC,GAAI,CACF,IAAI,OAAS,OAAO,KAAQ,SAAW,IAAO,KAAO,IAAI,KAAQ,GAEjE,GAAI,OAAO,QAAQ,4BAA4B,IAAM,GACnD,OAAO,UAAU,MAAM,KAAM,SAAS,EAAE,KAAK,SAAU,KAAM,CAC3D,OAAO,KAAK,MAAM,EAAE,KAAK,EAAE,KAAK,SAAU,KAAM,CAC9C,I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