{
  "version": 3,
  "sources": ["/cdn/shop/t/19/assets/ow-page-contact.js?bust=195619728"],
  "sourcesContent": ["/* The message form does not submit in the prototype. It checks the required fields, then shows the success state.\n   The three cards on the right choose the topic. contact.html#sales, #support and #access arrive with the topic chosen. */\n(function () {\n  var form = document.querySelector('[data-ct-form]'), ok = document.querySelector('[data-ct-ok]');\n  if (!form || !ok) return;\n  var topic = document.getElementById('ct-topic'), msg = document.getElementById('ct-msg');\n  var opts = [].slice.call(document.querySelectorAll('[data-ct-topic]'));\n  function mark() {\n    opts.forEach(function (a) {\n      if (topic.value && topic.value === a.getAttribute('data-ct-topic')) a.setAttribute('aria-current', 'true');\n      else a.removeAttribute('aria-current');\n    });\n  }\n  opts.forEach(function (a) {\n    a.addEventListener('click', function () {\n      topic.value = a.getAttribute('data-ct-topic'); mark();\n      // the link also moves the page to the form; focus the message box once that jump has happened\n      setTimeout(function () { msg.focus({ preventScroll: true }); }, 60);\n    });\n  });\n  topic.addEventListener('change', mark);\n  function fromHash() {\n    var h = (location.hash || '').slice(1);\n    if (h === 'sales' || h === 'support' || h === 'access') { topic.value = h; mark(); }\n  }\n  // Links from the industry, task, compare and story pages carry ?industry=<key>&job=<page>. The industry picks the\n  // workspace and the job is sent with the form, so the request says which page it came from.\n  var WS = { legal: 'Legal services', health: 'Health and dental', agencies: 'Marketing agencies' };\n  function fromQuery() {\n    var q = new URLSearchParams(location.search), ind = q.get('industry'), job = q.get('job');\n    var ws = document.getElementById('ct-ws'), jobField = document.getElementById('ct-job');\n    if (ws && ind && WS[ind]) ws.value = WS[ind];\n    if (jobField && job) jobField.value = job.replace(/[^a-z0-9-]/gi, '').slice(0, 80);\n  }\n  fromQuery();\n  // Legal, health and agency visitors talk to a person first (L14): no free-workspace pitch, a sample workflow instead,\n  // and a reminder not to send confidential records through the form.\n  var VAR = {\n    legal: { h1: 'Talk through your legal workflow', story: '/pages/story-legal-intake-conflict-check', note: 'Please do not send confidential client information or case files through this form.' },\n    health: { h1: 'Talk through your practice workflow', story: '/pages/story-dental-after-hours-text', note: 'Please do not send patient records or health details through this form.' },\n    agencies: { h1: 'Talk through your agency workflow', story: '/pages/story-agency-report-to-renewal', note: '' }\n  };\n  (function variant() {\n    var v = VAR[new URLSearchParams(location.search).get('industry')];\n    if (!v) return;\n    var h1 = document.getElementById('h1');\n    if (h1) h1.textContent = v.h1;\n    if (v.note) {\n      var p = document.createElement('p');\n      p.className = 'w-fine';\n      p.textContent = v.note;\n      form.insertBefore(p, form.firstChild);\n    }\n    var ch = document.getElementById('cta-h');\n    if (!ch) return;\n    var band = ch.parentNode;\n    ch.textContent = 'See a sample workflow';\n    var lede = band.querySelector('p');\n    if (lede) lede.textContent = 'Follow one job from request to approval, on sample data. A person reviews every access request.';\n    var cta = band.querySelector('.w-cta');\n    if (cta) {\n      cta.innerHTML = '';\n      var a = document.createElement('a');\n      a.className = 'os-btn os-btn--accent os-btn--lg';\n      a.href = v.story;\n      a.textContent = 'See a sample workflow';\n      cta.appendChild(a);\n    }\n  })();\n  fromHash();\n  window.addEventListener('hashchange', fromHash);\n  form.addEventListener('invalid', function (e) { e.target.setAttribute('aria-invalid', 'true'); }, true);\n  form.addEventListener('input', function (e) { e.target.removeAttribute('aria-invalid'); });\n  form.addEventListener('submit', function (e) {\n    if (form.hasAttribute('data-ow-contact')) return;\n    e.preventDefault();\n    ok.querySelector('[data-ct-name]').textContent = form.elements.name.value.trim().split(/\\s+/)[0];\n    ok.querySelector('[data-ct-email]').textContent = form.elements.email.value.trim();\n    form.hidden = true; ok.hidden = false; ok.focus();\n  });\n  ok.querySelector('[data-ct-again]').addEventListener('click', function () {\n    form.reset(); mark(); ok.hidden = true; form.hidden = false; form.elements.name.focus();\n  });\n})();\n"],
  "mappings": "CAEC,UAAY,CACX,IAAI,KAAO,SAAS,cAAc,gBAAgB,EAAG,GAAK,SAAS,cAAc,cAAc,EAC/F,GAAI,CAAC,MAAQ,CAAC,GAAI,OAClB,IAAI,MAAQ,SAAS,eAAe,UAAU,E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