{
  "version": 3,
  "sources": ["/cdn/shop/t/33/assets/selector-v5.js?selector_release=20261014-preview"],
  "sourcesContent": ["/* ======================================================\n * UI Controller\n * ====================================================== */\ndocument.addEventListener('DOMContentLoaded', function(){\n\n  const selectorV5Section =\n    document.querySelector('[data-selector-v5]');\n\n  if(!selectorV5Section) return;\n  const unifiedEnabled = selectorV5Section.dataset.tmEnabled === 'true';\n  let submissionInProgress = false;\n\n  let customerType = 'personal';\n  let paymentMethod = 'credit-card';\n  let currentServer = 'high';\n  let currentColor = 'white';\n  let currentPlan = 'rental';\n  let currentDelivery = 'subscription';\n  let selectedWaterPeriod = null;\n\n  function isInvoiceDelivery(){\n    return customerType === 'corporate' && paymentMethod === 'invoice';\n  }\n  let currentBoxes = 2;\n  let support = true;\n\n  const PRICE = {\n\nwaterBottle:\nNumber(selectorV5Section.dataset.waterPrice || 1512),\n\nsupport:\nNumber(selectorV5Section.dataset.supportPrice || 330),\n\nservers:{\n\nhigh:{\n  rental:\n    Number(selectorV5Section.dataset.highRentalPrice || 770),\n  buy:\n    Number(selectorV5Section.dataset.highBuyPrice || 63800)\n},\n\nstandard:{\n  rental:\n    Number(selectorV5Section.dataset.standardRentalPrice || 550),\n  buy:\n    Number(selectorV5Section.dataset.standardBuyPrice || 49800)\n},\n\ncradle:{\n  buy:\n    Number(selectorV5Section.dataset.cradleBuyPrice || 2530)\n}\n\n}\n\n};\n\n  const SELLING_PLAN = {\n    serverRental:\n      Number(selectorV5Section.dataset.serverRentalSellingPlanId || 0),\n    waterSubscription:\n      Number(selectorV5Section.dataset.waterSubscriptionSellingPlanId || 0)\n  };\n\n  const CAMPAIGN = {\n    enabled:\n      selectorV5Section.dataset.corporateCampaignEnabled === 'true',\n    code:\n      selectorV5Section.dataset.corporateCampaignCode || '',\n    title:\n      selectorV5Section.dataset.corporateCampaignTitle || '',\n    benefits:\n      selectorV5Section.dataset.corporateCampaignBenefits || '',\n    approvalEndpoint:\n      selectorV5Section.dataset.corporateApprovalEndpoint || '/apps/tenjo-commerce'\n  };\n\n  const corporateApplicationEndpoint =\n    selectorV5Section.dataset.corporateApplicationEndpoint || '/apps/tenjo-commerce';\n  let corporateApplicationState = 'idle';\n  let corporateCampaignApprovalStatus = 'unchecked';\n  let corporateCampaignApprovalPromise = null;\n  let corporateCardCampaignStatus = 'unchecked';\n  let approvedCheckoutSnapshot = null;\n  const corporateSubmissionKey =\n    window.crypto && typeof window.crypto.randomUUID === 'function'\n      ? window.crypto.randomUUID()\n      : 'selector-v5-' + Date.now() + '-' + Math.random().toString(16).slice(2);\n\nfunction updateDeliveryIntervalVisibility(){\n\n  const deliveryIntervalWrap =\n    document.getElementById('delivery-interval-wrap');\n\n  if(!deliveryIntervalWrap) return;\n\n  const shouldShow = currentDelivery === 'subscription';\n\n  deliveryIntervalWrap.style.display =\n    shouldShow ? 'block' : 'none';\n\n  const periodButtons = selectorV5Section.querySelector('[data-delivery-periods]');\n  if(periodButtons){\n    periodButtons.hidden = false;\n    document.getElementById('delivery-interval-prompt').textContent =\n      '\u304A\u5C4A\u3051\u5468\u671F\u3092\u9078\u629E\u3057\u3066\u304F\u3060\u3055\u3044';\n  }\n\n}\n\n  function updatePaymentMethod(){\n\n    const companyInfo =\n      document.getElementById('company-info');\n\n    const cta =\n      document.querySelector('.ws4-cta');\n\n    const paymentMethodWrap =\n      document.getElementById('payment-method-wrap');\n\n    paymentMethodWrap.hidden = customerType !== 'corporate';\n\n    document.querySelectorAll('[data-invoice-only-field]').forEach(function(field){\n      field.hidden = paymentMethod !== 'invoice';\n    });\n\n    if(customerType === 'corporate'){\n\n      companyInfo.hidden = false;\n\n      cta.textContent =\n        paymentMethod === 'invoice'\n          ? '\u898B\u7A4D\u66F8\u3092\u4F5C\u6210\u3057\u3066\u7533\u3057\u8FBC\u3080'\n          : '\u4ECA\u3059\u3050\u7533\u3057\u8FBC\u3080';\n\n    }else{\n\n      companyInfo.hidden = true;\n\n      cta.textContent =\n        '\u4ECA\u3059\u3050\u7533\u3057\u8FBC\u3080';\n\n    }\n    updateDeliveryIntervalVisibility();\n    renderCorporateCampaign();\n    updatePlanAvailability();\n\n  }\n\n  function readCardProductMaster(){return TenjoCommerce.readCardProductMaster(selectorV5Section.dataset);}\n\n  function updatePlanAvailability(){\n    const rentalBtn = document.querySelector('[data-plan=\"rental\"]');\n    const buyBtn = document.querySelector('[data-plan=\"buy\"]');\n    const supportWrap = document.getElementById('support-wrap');\n\n    if(!rentalBtn || !buyBtn || !supportWrap){\n      return;\n    }\n\n    document.getElementById('server-plan-wrap').style.display = currentServer === 'none' ? 'none' : 'block';\n    if(currentServer === 'none'){\n      currentPlan = 'none';\n      supportWrap.style.display = 'none';\n      rentalBtn.style.display = 'none';\n      buyBtn.style.display = 'none';\n    }else if(currentServer === 'cradle'){\n      currentPlan = 'buy';\n      rentalBtn.style.display = 'none';\n      buyBtn.style.display = 'block';\n      supportWrap.style.display = 'none';\n    }else if(\n      currentServer === 'high' &&\n      currentColor === 'black'\n    ){\n      currentPlan = 'buy';\n      rentalBtn.style.display = 'none';\n      buyBtn.style.display = 'block';\n      supportWrap.style.display = 'block';\n    }else{\n      rentalBtn.style.display = 'block';\n      buyBtn.style.display = 'block';\n      supportWrap.style.display = 'block';\n    }\n\n    if(currentPlan !== 'rental'){support=false;supportWrap.style.display='none';}\n\n    document.querySelectorAll('[data-plan]').forEach(function(el){\n      el.classList.toggle('active', el.dataset.plan === currentPlan);\n    });\n\n    updatePlanMessage();\n  }\n\n  function renderCorporateCampaign(){\n    const card = document.querySelector('[data-corporate-campaign-card]');\n\n    if(!card){\n      return;\n    }\n\n    const shouldShow =\n      CAMPAIGN.enabled &&\n      customerType === 'corporate';\n    card.hidden = !shouldShow;\n\n    if(!shouldShow){\n      return;\n    }\n\n    const title = card.querySelector('[data-corporate-campaign-title]');\n    const benefits = card.querySelector('[data-corporate-campaign-benefits]');\n    const status = card.querySelector('[data-corporate-campaign-status]');\n\n    title.textContent = CAMPAIGN.title;\n    benefits.textContent = CAMPAIGN.benefits;\n\n    if(paymentMethod === 'invoice'){\n      card.dataset.status = 'pending';\n      status.textContent =\n        '\u8ACB\u6C42\u66F8\u6255\u3044\u306E\u7533\u8ACB\u5185\u5BB9\u3092\u5BE9\u67FB\u5F8C\u3001\u627F\u8A8D\u3055\u308C\u305F\u5834\u5408\u306B\u30AD\u30E3\u30F3\u30DA\u30FC\u30F3\u304C\u9069\u7528\u3055\u308C\u307E\u3059\u3002';\n      return;\n    }\n\n    card.dataset.status = corporateCardCampaignStatus;\n\n    if(corporateCardCampaignStatus === 'checking'){\n      status.textContent = '\u4F1A\u793E\u540D\u3068\u96FB\u8A71\u756A\u53F7\u304B\u3089\u30AD\u30E3\u30F3\u30DA\u30FC\u30F3\u5BFE\u8C61\u3092\u78BA\u8A8D\u3057\u3066\u3044\u307E\u3059\u3002';\n    }else if(corporateCardCampaignStatus === 'existing'){\n      status.textContent = '\u65E2\u5B58\u5951\u7D04\u306E\u53EF\u80FD\u6027\u304C\u78BA\u8A8D\u3055\u308C\u305F\u305F\u3081\u3001\u65B0\u898F\u3054\u5951\u7D04\u30AD\u30E3\u30F3\u30DA\u30FC\u30F3\u306F\u5BFE\u8C61\u5916\u3068\u306A\u308A\u307E\u3059\u3002\u901A\u5E38\u306E\u304A\u7533\u3057\u8FBC\u307F\u306F\u305D\u306E\u307E\u307E\u304A\u9032\u307F\u3044\u305F\u3060\u3051\u307E\u3059\u3002';\n    }else if(corporateCardCampaignStatus === 'unavailable'){\n      status.textContent = '\u30AD\u30E3\u30F3\u30DA\u30FC\u30F3\u5BFE\u8C61\u3092\u78BA\u8A8D\u3067\u304D\u306A\u3044\u305F\u3081\u3001\u304A\u7533\u3057\u8FBC\u307F\u3092\u505C\u6B62\u3057\u3066\u3044\u307E\u3059\u3002';\n    }else{\n      status.textContent = '\u65B0\u898F\u306E\u6CD5\u4EBA\u30AB\u30FC\u30C9\u5951\u7D04\u306B\u306F\u3001\u5BE9\u67FB\u306A\u3057\u3067\u30AD\u30E3\u30F3\u30DA\u30FC\u30F3\u304C\u9069\u7528\u3055\u308C\u307E\u3059\u3002';\n    }\n  }\n\n  // \u73FE\u5728\u306E UI \u72B6\u614B\u3060\u3051\u304B\u3089\u3001\u5224\u5B9A\u7528\u306E Contract \u3092\u65B0\u898F\u751F\u6210\u3059\u308B\u3002\n  function buildContract(){\n    return buildCommerceContract({customerType,paymentMethod,currentServer,currentColor,currentPlan,currentDelivery,selectedWaterPeriod,currentBoxes,support,SELLING_PLAN,CAMPAIGN,cardProductMaster:readCardProductMaster(),cartGiftsEnabled:selectorV5Section.dataset.corporateCampaignCartGiftsEnabled==='true',customerFields:{\"company-name\": document.getElementById(\"company-name\")?.value || '',\n\"company-contact-last-name\": document.getElementById(\"company-contact-last-name\")?.value || '',\n\"company-contact-first-name\": document.getElementById(\"company-contact-first-name\")?.value || '',\n\"company-email\": document.getElementById(\"company-email\")?.value || '',\n\"company-phone\": document.getElementById(\"company-phone\")?.value || '',\n\"corporate-number\": document.getElementById(\"corporate-number\")?.value || '',\n\"company-postal-code\": document.getElementById(\"company-postal-code\")?.value || '',\n\"company-prefecture\": document.getElementById(\"company-prefecture\")?.value || '',\n\"company-city\": document.getElementById(\"company-city\")?.value || '',\n\"company-address\": document.getElementById(\"company-address\")?.value || ''}});\n  }\n\n  // Commerce Pipeline \u306E\u5165\u53E3\u3068\u3057\u3066\u3001UI \u3068 Commerce Engine \u3092\u63A5\u7D9A\u3059\u308B\u3060\u3051\u3092\u62C5\u3046\u3002\n  async function verifyCorporateCampaignApproval(contract){\n\n    if(\n      !contract.campaign ||\n      contract.campaign.enabled !== true ||\n      !contract.customer ||\n      contract.customer.type !== 'corporate' ||\n      !contract.payment ||\n      contract.payment.method !== 'invoice'\n    ){\n      return false;\n    }\n\n    const query = new URLSearchParams(window.location.search);\n    const approvalToken = query.get('approval_token') || '';\n    const campaignCode = query.get('campaign_code') || '';\n\n    if(\n      !approvalToken ||\n      !campaignCode ||\n      campaignCode !== contract.campaign.code\n    ){\n      return false;\n    }\n\n    try{\n      const verificationQuery = new URLSearchParams({\n        approval_token: approvalToken,\n        campaign_code: campaignCode\n      });\n      TenjoCommerce.assertSubmissionEnabled('approval-lookup');\n      const response = await fetch(\n        CAMPAIGN.approvalEndpoint + '?' + verificationQuery.toString(),\n        {\n          method: 'GET',\n          headers: { Accept: 'application/json' },\n          credentials: 'same-origin',\n          cache: 'no-store'\n        }\n      );\n\n      if(!response.ok){\n        return false;\n      }\n\n      const verification = await response.json();\n\n      const approved = (\n        verification.approved === true &&\n        verification.campaignCode === contract.campaign.code &&\n        verification.checkout &&\n        Array.isArray(verification.checkout.products)\n      );\n      if(approved){\n        approvedCheckoutSnapshot = verification.checkout;\n      }\n      return approved;\n    }catch(error){\n      if(error.code === 'TENJO_SUBMISSION_STOPPED') throw error;\n      console.warn('Corporate campaign approval could not be verified.', error);\n      return false;\n    }\n  }\n\n  async function refreshCorporateCampaignApproval(){\n    if(\n      !CAMPAIGN.enabled ||\n      customerType !== 'corporate' ||\n      paymentMethod !== 'invoice'\n    ){\n      renderCorporateCampaign();\n      return false;\n    }\n\n    if(corporateCampaignApprovalPromise){\n      return corporateCampaignApprovalPromise;\n    }\n\n    corporateCampaignApprovalStatus = 'checking';\n    renderCorporateCampaign();\n\n    corporateCampaignApprovalPromise =\n      verifyCorporateCampaignApproval(buildContract())\n        .then(function(approved){\n          corporateCampaignApprovalStatus = approved ? 'approved' : 'pending';\n          renderCorporateCampaign();\n          return approved;\n        })\n        .finally(function(){\n          corporateCampaignApprovalPromise = null;\n        });\n\n    return corporateCampaignApprovalPromise;\n  }\n\n  async function checkCorporateCardCampaignEligibility(contract){\n    if(\n      !CAMPAIGN.enabled ||\n      !contract.customer ||\n      contract.customer.type !== 'corporate' ||\n      !contract.payment ||\n      contract.payment.method !== 'card'\n    ){\n      return false;\n    }\n\n    const companyName = String(contract.customer.companyName || '').trim();\n    const normalizedPhone = normalizeJapanesePhone(contract.customer.phone);\n    if(!companyName || !normalizedPhone){\n      throw new Error('\u6CD5\u4EBA\u30AB\u30FC\u30C9\u6255\u3044\u3067\u306F\u3001\u4F1A\u793E\u540D\u3068\u96FB\u8A71\u756A\u53F7\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044\u3002');\n    }\n    contract.customer.phone = normalizedPhone;\n    corporateCardCampaignStatus = 'checking';\n    renderCorporateCampaign();\n\n    try{\n      const eligible = await TenjoCommerce.checkCampaignEligibility(contract, corporateApplicationEndpoint);\n      corporateCardCampaignStatus = eligible ? 'eligible' : 'existing';\n      renderCorporateCampaign();\n      return eligible;\n    }catch(error){\n      corporateCardCampaignStatus = 'unavailable';\n      renderCorporateCampaign();\n      throw error;\n    }\n  }\n\n  function readNormalizedProductMaster(){return TenjoCommerce.readNormalizedProductMaster(selectorV5Section.dataset);}\n\n  async function submitCorporateApplication(contract){\n    const validationError = validateCorporateApplication(contract);\n    const errorElement = document.querySelector('[data-corporate-form-error]');\n\n    if(validationError){\n      if(errorElement){\n        errorElement.textContent = validationError;\n        errorElement.hidden = false;\n      }\n      throw new Error(validationError);\n    }\n\n    if(errorElement){\n      errorElement.textContent = '';\n      errorElement.hidden = true;\n    }\n\n    const catalog =\n      window.CommercePlatform && window.CommercePlatform.catalog;\n    const productMaster = readNormalizedProductMaster();\n    const application =\n      new CorporateApplicationPayloadBuilder(catalog, productMaster).build(contract);\n    TenjoCommerce.assertSubmissionEnabled('corporate-application');\n    const response = await fetch(corporateApplicationEndpoint, {\n      method: 'POST',\n      headers: {\n        Accept: 'application/json',\n        'Content-Type': 'application/json'\n      },\n      credentials: 'same-origin',\n      body: JSON.stringify(buildCorporateRequest(contract, application, corporateSubmissionKey))\n    });\n\n    const result = await response.json().catch(function(){ return {}; });\n\n    if(!response.ok || result.ok !== true){\n      throw new Error('\u6CD5\u4EBA\u60C5\u5831\u3092\u9001\u4FE1\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\u3002\u5165\u529B\u5185\u5BB9\u3092\u3054\u78BA\u8A8D\u304F\u3060\u3055\u3044\u3002');\n    }\n\n    return result;\n  }\n\n  window.TenjoApplicationSelector = Object.freeze({\n    preview: function(){\n      const previewContract = buildContract();\n      const engineResult = new CommerceEngine(previewContract).run();\n      const isInvoiceApplication =\n        previewContract.customer.type === 'corporate' &&\n        previewContract.payment.method === 'invoice';\n      const catalog = window.CommercePlatform && window.CommercePlatform.catalog;\n      return {\n        workflow: engineResult.workflowResult.action,\n        customerType: previewContract.customer.type,\n        paymentMethod: previewContract.payment.method,\n        cartItems: isInvoiceApplication\n          ? []\n          : new ProductMapper(previewContract).map().items,\n        application: isInvoiceApplication\n          ? new CorporateApplicationPayloadBuilder(\n              catalog,\n              readNormalizedProductMaster()\n            ).build(previewContract)\n          : null\n      };\n    }\n  });\n\n  window.addEventListener('pageshow', event => {\n    if(event.persisted){\n      submissionInProgress = false;\n      const button = selectorV5Section.querySelector('[data-commerce-submit]');\n      if(button) button.disabled = corporateApplicationState === 'succeeded';\n    }\n  });\n\n  async function runCommerce(){\n    if(submissionInProgress || corporateApplicationState === 'succeeded') return;\n    const button = selectorV5Section.querySelector('[data-commerce-submit]');\n    const status = selectorV5Section.querySelector('[data-tm-status]');\n    const query = new URLSearchParams(location.search);\n    const approvalMode = query.has('approval_token') || query.has('campaign_code');\n    const contract = buildContract();\n    if(!approvalMode && contract.payment.method === 'card' && selectorV5Section.dataset.customerB2b === 'true') {\n      throw new Error('\u6CD5\u4EBA\u8CFC\u5165\u306E\u30ED\u30B0\u30A4\u30F3\u72B6\u614B\u3067\u306F\u30AB\u30FC\u30C9\u7533\u8FBC\u3092\u958B\u59CB\u3067\u304D\u307E\u305B\u3093\u3002\u500B\u4EBA\u7528\u306E\u9867\u5BA2\u30A2\u30AB\u30A6\u30F3\u30C8\u3067\u30ED\u30B0\u30A4\u30F3\u3059\u308B\u304B\u3001\u30ED\u30B0\u30A2\u30A6\u30C8\u3057\u3066\u304F\u3060\u3055\u3044\u3002');\n    }\n    submissionInProgress = true;\n    let cartNavigating = false;\n    if(button) button.disabled = true;\n    try {\n      const connector = new ShopifyConnector();\n      if(approvalMode) {\n        if(query.getAll('approval_token').length !== 1 || query.getAll('campaign_code').length !== 1 || !query.get('approval_token') || query.get('campaign_code') !== CAMPAIGN.code || query.has('tm_selector') || query.has('tm_flow')) throw new Error('\u627F\u8A8DURL\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044\u3002\u9078\u629E\u60C5\u5831\u3092\u6DF7\u5728\u3055\u305B\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093\u3002');\n        contract.customer.type = 'corporate';\n        contract.payment.method = 'invoice';\n        contract.campaign.enabled = CAMPAIGN.enabled;\n        if(!await verifyCorporateCampaignApproval(contract)) throw new Error('\u627F\u8A8D\u5185\u5BB9\u3092\u78BA\u8A8D\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\u3002\u627F\u8A8D\u6E08\u307FURL\u3092\u3054\u78BA\u8A8D\u304F\u3060\u3055\u3044\u3002');\n        contract.campaign.eligible = true;\n        await connector.handleApprovedCheckout(approvedCheckoutSnapshot, contract.campaign);\n        cartNavigating = true;\n        window.location.assign('/cart?preview_theme_id=155700396230');\n        return;\n      }\n      if(contract.payment.method === 'invoice') {\n        corporateApplicationState = 'submitting';\n        const result = await submitCorporateApplication(contract);\n        corporateApplicationState = 'succeeded';\n        const notice = selectorV5Section.querySelector('[data-corporate-submission-status]');\n        if(notice) notice.hidden = false;\n        if(status) status.textContent = result.message || '\u6CD5\u4EBA\u60C5\u5831\u3092\u53D7\u3051\u4ED8\u3051\u307E\u3057\u305F\u3002\u5BE9\u67FB\u7D50\u679C\u3092\u3054\u6848\u5185\u3057\u307E\u3059\u3002';\n        if(button) button.textContent = '\u7533\u8ACB\u3092\u53D7\u3051\u4ED8\u3051\u307E\u3057\u305F';\n        return result;\n      }\n      if(contract.customer.type === 'corporate' && window.TenjoModelMaster.read().campaignAllowed(masterSelection(contract))) {\n        contract.customer.campaignApproved = await checkCorporateCardCampaignEligibility(contract);\n      }\n      const result = new CommerceEngine(contract).run();\n      if(result.workflowResult.action !== 'checkout') throw new Error('\u3053\u306E\u5185\u5BB9\u3067\u306F\u7533\u8FBC\u3092\u958B\u59CB\u3067\u304D\u307E\u305B\u3093\u3002\u9078\u629E\u5185\u5BB9\u3092\u3054\u78BA\u8A8D\u304F\u3060\u3055\u3044\u3002');\n      const request = connector.handle(result.workflowResult, contract);\n      if(!request || typeof request.then !== 'function') throw new Error('\u7533\u8FBC\u5546\u54C1\u306E\u5BFE\u5FDC\u3092\u78BA\u8A8D\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\u3002');\n      await request;\n      cartNavigating = true;\n      window.location.assign(connector.cartUrl());\n      return result;\n    } catch(error) {\n      if(corporateApplicationState !== 'succeeded') corporateApplicationState = 'idle';\n      if(status) status.dataset.routeStage = error.stage || 'validation';\n      throw error;\n    } finally {\n      submissionInProgress = cartNavigating;\n      if(button) button.disabled = cartNavigating || corporateApplicationState === 'succeeded';\n    }\n  }\n\n  function numberFormat(num){\n    return Number(num).toLocaleString();\n  }\n\nfunction updatePlanMessage(){\n  const blackNote=selectorV5Section.querySelector('[data-tm-black-note]');\n  if(blackNote)blackNote.hidden=currentServer!=='high'||currentColor!=='black';\n  const planMessage=document.getElementById('plan-message');\n  if(!planMessage)return;\n  planMessage.textContent=currentServer==='cradle'?selectorV5Section.dataset.cradleRentalText:'';\n  planMessage.style.display=planMessage.textContent?'block':'none';\n}\n\n  function updateQuantity(){\n\n    const bottleCount = currentBoxes * 2;\n    const liters = bottleCount * 12;\n\n    document.getElementById('box-display').innerHTML =\n      currentBoxes + '\u7BB1';\n\n    document.getElementById('bottle-display').innerHTML =\n      '\uFF08' + bottleCount + '\u672C / ' + liters + 'L\uFF09';\n\n  }\n\nfunction updateSummary(total){\n\n\n  const bottleCount = currentBoxes * 2;\n\n  const serverNames = {\n    high:'\u30CF\u30A4\u30B0\u30EC\u30FC\u30C9',\n    standard:'\u30B9\u30BF\u30F3\u30C0\u30FC\u30C9',\n    cradle:'\u30AF\u30EC\u30FC\u30C9\u30EB',\n    none:'\u30B5\u30FC\u30D0\u30FC\u306A\u3057\uFF08\u304A\u6C34\u306E\u307F\uFF09'\n  };\n\n  const colorName =\n    currentServer === 'high'\n      ? (currentColor === 'white'\n          ? '\u30DB\u30EF\u30A4\u30C8'\n          : '\u30D6\u30E9\u30C3\u30AF')\n      : '';\n\n  const planName = currentServer === 'none' ? '\u306A\u3057' :\n    currentPlan === 'rental'\n      ? '\u30EC\u30F3\u30BF\u30EB'\n      : '\u8CFC\u5165';\n\n  const deliveryName =\n    currentDelivery === 'subscription'\n      ? '\u5B9A\u671F\u914D\u9001\uFF08' + (selectedWaterPeriod?.label || '\u5468\u671F\u672A\u9078\u629E') + '\uFF09'\n      : '\u90FD\u5EA6\u8CFC\u5165';\n\n  let supportText = '';\n\n  if(\n    support &&\n    currentPlan === 'rental' &&\n    currentServer !== 'cradle'\n  ){\n    supportText = '<br>\u5B89\u5FC3\u30B5\u30DD\u30FC\u30C8\u52A0\u5165';\n  }\n\n  document.getElementById('summary-content').innerHTML =\n\n  '<div class=\"ws4-summary-item\">' +\n    '<span>\u30B5\u30FC\u30D0\u30FC</span>' +\n    '<strong>' + serverNames[currentServer] + '</strong>' +\n  '</div>' +\n\n  (currentServer === 'high'\n    ? '<div class=\"ws4-summary-item\">' +\n        '<span>\u30AB\u30E9\u30FC</span>' +\n        '<strong>' + colorName + '</strong>' +\n      '</div>'\n    : ''\n  ) +\n\n  '<div class=\"ws4-summary-item\">' +\n    '<span>\u3054\u5229\u7528\u65B9\u6CD5</span>' +\n    '<strong>' + planName + '</strong>' +\n  '</div>' +\n\n  '<div class=\"ws4-summary-item\">' +\n    '<span>\u304A\u5C4A\u3051\u65B9\u6CD5</span>' +\n    '<strong>' + deliveryName + '</strong>' +\n  '</div>' +\n\n  '<div class=\"ws4-summary-item\">' +\n    '<span>\u6570\u91CF</span>' +\n    '<strong>' +\n      currentBoxes + '\u7BB1\uFF08' + bottleCount + '\u672C\uFF09' +\n    '</strong>' +\n  '</div>' +\n\n  (\n    support &&\n    currentPlan === 'rental' &&\n    currentServer !== 'cradle'\n      ? '<div class=\"ws4-summary-item\">' +\n          '<span>\u5B89\u5FC3\u30B5\u30DD\u30FC\u30C8</span>' +\n          '<strong>\u52A0\u5165</strong>' +\n        '</div>'\n      : ''\n  );\n\n  document.getElementById('monthly-price').innerHTML =\n    numberFormat(total) + '\u5186'\n\n  document.getElementById('daily-price').innerHTML =\n  '1\u65E5\u3042\u305F\u308A \u7D04' +\n  numberFormat(Math.round(total / 30)) +\n  '\u5186';\n\n}\n\n\n  function calculate(){\n\n    const bottleCount = currentBoxes * 2;\n\n    const waterTotal =\n      bottleCount *\n      PRICE.waterBottle;\n\n    let serverFee = 0;\n\n    if(currentServer === 'cradle' || currentServer === 'none'){\n\n  serverFee = 0;\n\n}else{\n\n  if(currentPlan === 'rental'){\n\n    serverFee =\n      PRICE.servers[currentServer].rental;\n\n  }else{\n\n    serverFee = 0;\n\n  }\n\n}\n\n    const supportFee =\n\n      (\n        support &&\n        currentPlan === 'rental' &&\n        currentServer !== 'cradle'\n      )\n\n      ? PRICE.support\n\n      : 0;\n\ndocument.getElementById('water-price').innerHTML =\nnumberFormat(waterTotal) + '\u5186';\n\nconst serverRow =\ndocument.getElementById('server-row');\n\nconst supportRow =\ndocument.getElementById('support-row');\n\nconst serverLabel =\ndocument.getElementById('server-label');\n\nif(currentPlan === 'rental'){\n\nserverRow.style.display = 'flex';\n\nsupportRow.style.display = 'flex';\n\nserverLabel.innerHTML =\n'\u30B5\u30FC\u30D0\u30FC\u30EC\u30F3\u30BF\u30EB';\n\ndocument.getElementById('server-price').innerHTML =\nnumberFormat(serverFee) + '\u5186';\n\ndocument.getElementById('support-price').innerHTML =\nnumberFormat(supportFee) + '\u5186';\n\n}else{\n\nserverRow.style.display = 'none';\n\nsupportRow.style.display = 'none';\n\n}\n\n  \n    const total =\n  waterTotal +\n  serverFee +\n  supportFee;\n\n/* \u521D\u56DE\u8CBB\u7528\u8868\u793A */\n\nconst firstPaymentWrap =\n  document.getElementById('first-payment-wrap');\n\nconst firstPaymentPrice =\n  document.getElementById('first-payment-price');\n\nif(currentPlan === 'buy'){\n\n  let buyPrice = 0;\n\n  if(currentServer === 'high'){\n    buyPrice = PRICE.servers.high.buy;\n  }\n\n  if(currentServer === 'standard'){\n    buyPrice = PRICE.servers.standard.buy;\n  }\n\n  if(currentServer === 'cradle'){\n    buyPrice = PRICE.servers.cradle.buy;\n  }\n\n  firstPaymentWrap.style.display = 'block';\n\n  firstPaymentPrice.innerHTML =\n    numberFormat(buyPrice) + '\u5186';\n\n}else{\n\n  firstPaymentWrap.style.display = 'none';\n\n}\n\nupdateSummary(total);\n\n  }\n\n  if(unifiedEnabled){\n    const core = window.TenjoSelectorCore;\n    const ui = window.TenjoSelectorUI;\n    if(!core || !ui){\n      selectorV5Section.querySelector('[data-commerce-submit]').disabled = true;\n      return;\n    }\n    const originalPreview = window.TenjoApplicationSelector.preview;\n    ui.initV5(selectorV5Section, {\n      read: function(){\n        const cycle = selectedWaterPeriod ? Object.keys(core.cycles).find(function(k){ return core.cycles[k].id === String(selectedWaterPeriod.id); }) : null;\n        return {schemaVersion:1,model:currentServer,use:currentPlan,color:window.TenjoModelMaster.read().model(currentServer)?.kind==='server'?currentColor:null,bottlesPerDelivery:currentBoxes*2,orderMode:currentDelivery==='onetime'?'one-time':'subscription',deliveryCycle:currentDelivery==='onetime'?null:cycle,maintenance:currentPlan==='rental'&&window.TenjoModelMaster.read().model(currentServer)?.kind==='server'?support:false,customerType:customerType,paymentPreference:paymentMethod==='invoice'?'invoice':'card'};\n      },\n      write: function(s){\n        currentServer=s.model;currentPlan=s.use;currentColor=s.color||'white';currentBoxes=s.bottlesPerDelivery/2;\n        currentDelivery=s.orderMode==='one-time'?'onetime':'subscription';support=s.maintenance;\n        customerType=s.customerType;paymentMethod=s.paymentPreference==='invoice'?'invoice':'credit-card';\n        const c=core.cycles[s.deliveryCycle];\n        const button=c?selectorV5Section.querySelector('[data-water-period=\"'+c.id+'\"]'):null;\n        selectedWaterPeriod=c?{id:Number(c.id),unit:c.unit,count:c.count,label:button?button.textContent.trim():s.deliveryCycle}:null;\n      },\n      master:readCardProductMaster,\n      submit:runCommerce,\n      preview:originalPreview\n    });\n    return;\n  }\n\n  updateQuantity();\n\n  updatePaymentMethod();\n\n  calculate();\n\n  document\n    .querySelectorAll('[data-customer-type]')\n    .forEach(function(button){\n      button.addEventListener('click', function(){\n        customerType = this.dataset.customerType;\n\n        if(customerType === 'personal'){\n          paymentMethod = 'credit-card';\n          document.querySelectorAll('[data-payment-method]').forEach(function(el){\n            el.classList.toggle('active', el.dataset.paymentMethod === 'credit-card');\n          });\n        }\n\n        document.querySelectorAll('[data-customer-type]').forEach(function(el){\n          el.classList.remove('active');\n        });\n        this.classList.add('active');\n        updatePaymentMethod();\n        refreshCorporateCampaignApproval();\n      });\n    });\n\n  /* \u304A\u652F\u6255\u3044\u65B9\u6CD5 */\n\n  document\n    .querySelectorAll('[data-payment-method]')\n    .forEach(function(button){\n\n      button.addEventListener('click', function(){\n\n        paymentMethod =\n          this.dataset.paymentMethod;\n\n        document\n          .querySelectorAll('[data-payment-method]')\n          .forEach(function(el){\n\n            el.classList.remove('active');\n\n          });\n\n        this.classList.add('active');\n\n        updatePaymentMethod();\n        refreshCorporateCampaignApproval();\n\n      });\n\n    });\n\n  /* \u7BB1\u6570 */\n\n  document.getElementById('plus-box')\n    .addEventListener('click', function(){\n\n      if(currentBoxes < 10){\n\n        currentBoxes++;\n\n        updateQuantity();\n\n        calculate();\n\n      }\n\n    });\n\n  document.getElementById('minus-box')\n    .addEventListener('click', function(){\n\n      if(currentBoxes > 1){\n\n        currentBoxes--;\n\n        updateQuantity();\n\nupdatePlanAvailability();\n\ncalculate();\n\n      }\n\n    });\n\n  /* \u30B5\u30FC\u30D0\u30FC */\n\n  document\n    .querySelectorAll('[data-server]')\n    .forEach(function(button){\n\n      button.addEventListener('click', function(){\n\n        currentServer =\n          this.dataset.server;\n        if(currentServer === 'none') currentPlan = 'none';\n        else if(currentPlan === 'none') currentPlan = 'rental';\n\n        document\n          .querySelectorAll('[data-server]')\n          .forEach(function(el){\n\n            el.classList.remove('active');\n\n          });\n\n        this.classList.add('active');\n\n        if(currentServer === 'standard'){\n          currentColor = 'white';\n          document.querySelectorAll('[data-color]').forEach(function(el){\n            el.classList.toggle('active', el.dataset.color === 'white');\n          });\n        }\n\n        if(currentServer === 'high'){\n\n          document\n            .getElementById('color-wrap')\n            .style.display = 'block';\n\n        }else{\n\n          document\n            .getElementById('color-wrap')\n            .style.display = 'none';\n\n        }\n\n        const rentalBtn =\n  document.querySelector('[data-plan=\"rental\"]');\n\nconst buyBtn =\n  document.querySelector('[data-plan=\"buy\"]');\n\nif(currentServer === 'cradle'){\n\n  currentPlan = 'buy';\n\n  rentalBtn.style.display = 'none';\n\n  buyBtn.style.display = 'block';\n\n  buyBtn.classList.add('active');\n\n  document\n    .getElementById('support-wrap')\n    .style.display = 'none';\n\n  document\n    .getElementById('buy-info')\n    .style.display = 'block';\n\n}else{\n\n  rentalBtn.style.display = 'block';\n\n  buyBtn.style.display = 'block';\n\n  document\n    .getElementById('support-wrap')\n    .style.display = 'block';\n\n}\n\nupdatePlanAvailability();\n\n        calculate();\n\n      });\n\n    });\n\n  /* \u30AB\u30E9\u30FC */\n\n  document\n    .querySelectorAll('[data-color]')\n    .forEach(function(button){\n\n      button.addEventListener('click', function(){\n\n        currentColor =\n          this.dataset.color;\n\nconst rentalBtn =\n  document.querySelector('[data-plan=\"rental\"]');\n\nconst buyBtn =\n  document.querySelector('[data-plan=\"buy\"]');\n\n\n        document\n          .querySelectorAll('[data-color]')\n          .forEach(function(el){\n\n            el.classList.remove('active');\n\n          });\n\n        this.classList.add('active');\n\nupdatePlanAvailability();\n\ncalculate();\n\n      });\n\n    });\n\n  /* \u30D7\u30E9\u30F3 */\n\n  document\n    .querySelectorAll('[data-plan]')\n    .forEach(function(button){\n\n      button.addEventListener('click', function(){\n\n        currentPlan =\n          this.dataset.plan;\n\n        document\n          .querySelectorAll('[data-plan]')\n          .forEach(function(el){\n\n            el.classList.remove('active');\n\n          });\n\n        this.classList.add('active');\n\n        if(currentPlan === 'buy'){\n\n          document\n            .getElementById('support-wrap')\n            .style.display = 'none';\n\n          document\n            .getElementById('buy-info')\n            .style.display = 'block';\n\n        }else{\n\n          document\n            .getElementById('support-wrap')\n            .style.display = 'block';\n\n          document\n            .getElementById('buy-info')\n            .style.display = 'none';\n\n        }\n\n        calculate();\n\n      });\n\n    });\n\n  /* \u914D\u9001\u65B9\u6CD5 */\n\n  selectorV5Section.querySelectorAll('[data-water-period]').forEach(function(button){\n    button.addEventListener('click', function(){\n      selectedWaterPeriod = {\n        id: Number(button.dataset.waterPeriod),\n        unit: button.dataset.unit,\n        count: Number(button.dataset.count),\n        label: button.textContent.trim()\n      };\n      selectorV5Section.querySelectorAll('[data-water-period]').forEach(function(option){\n        option.classList.toggle('active', option === button);\n        option.setAttribute('aria-pressed', String(option === button));\n      });\n      selectorV5Section.querySelector('[data-water-period-error]').hidden = true;\n      calculate();\n    });\n  });\n\n  document\n    .querySelectorAll('[data-delivery]')\n    .forEach(function(button){\n\n      button.addEventListener('click', function(){\n\n        currentDelivery =\n          this.dataset.delivery;\n\n          updateDeliveryIntervalVisibility();\n\n        document\n          .querySelectorAll('[data-delivery]')\n          .forEach(function(el){\n\n            el.classList.remove('active');\n\n          });\n\n        this.classList.add('active');\n\n        calculate();\n\n      });\n\n    });\n\n  /* \u30B5\u30DD\u30FC\u30C8 */\n\n  document\n    .querySelectorAll('[data-support]')\n    .forEach(function(button){\n\n      button.addEventListener('click', function(){\n\n        support =\n          this.dataset.support === 'yes';\n\n        document\n          .querySelectorAll('[data-support]')\n          .forEach(function(el){\n\n            el.classList.remove('active');\n\n          });\n\n        this.classList.add('active');\n\n        calculate();\n\n      });\n\n    });\n\n  const commerceSubmitButton =\n    document.querySelector('[data-commerce-submit]');\n\n  if(commerceSubmitButton){\n    commerceSubmitButton.addEventListener('click', function(event){\n      event.preventDefault();\n      return runCommerce().catch(function(error){ alert(error.message); });\n    });\n  }\n\n});\n"],
  "mappings": "AAGA,SAAS,iBAAiB,mBAAoB,UAAU,CAEtD,MAAM,kBACJ,SAAS,cAAc,oBAAoB,EAE7C,GAAG,CAAC,kBAAmB,OACvB,MAAM,eAAiB,kBAAkB,QAAQ,YAAc,OAC/D,IAAI,qBAAuB,GAEvB,aAAe,WACf,cAAgB,cAChB,cAAgB,OAChB,aAAe,QACf,YAAc,SACd,gBAAkB,eAClB,oBAAsB,KAE1B,SAAS,mBAAmB,CAC1B,OAAO,eAAiB,aAAe,gBAAkB,SAC3D,CACA,IAAI,aAAe,EACf,QAAU,GAEd,MAAM,MAAQ,CAEhB,YACA,OAAO,kBAAkB,QAAQ,YAAc,IAAI,EAEnD,QACA,OAAO,kBAAkB,QAAQ,cAAgB,GAAG,EAEpD,QAAQ,CAER,KAAK,CACH,OACE,OAAO,kBAAkB,QAAQ,iBAAmB,GAAG,EACzD,IACE,OAAO,kBAAkB,QAAQ,cAAgB,KAAK,CAC1D,EAEA,SAAS,CACP,OACE,OAAO,kBAAkB,QAAQ,qBAAuB,GAAG,EAC7D,IACE,OAAO,kBAAkB,QAAQ,kBAAoB,KAAK,CAC9D,EAEA,OAAO,CACL,IACE,OAAO,kBAAkB,QAAQ,gBAAkB,IAAI,CAC3D,CAEA,CAEA,EAEQ,aAAe,CACnB,aACE,OAAO,kBAAkB,QAAQ,2BAA6B,CAAC,EACjE,kBACE,OAAO,kBAAkB,QAAQ,gCAAkC,CAAC,CACxE,EAEM,SAAW,CACf,QACE,kBAAkB,QAAQ,2BAA6B,OACzD,KACE,kBAAkB,QAAQ,uBAAyB,GACrD,MACE,kBAAkB,QAAQ,wBAA0B,GACtD,SACE,kBAAkB,QAAQ,2BAA6B,GACzD,iBACE,kBAAkB,QAAQ,2BAA6B,sBAC3D,EAEM,6BACJ,kBAAkB,QAAQ,8BAAgC,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