{
  "version": 3,
  "sources": ["/cdn/shop/t/688/assets/mspa-pick-mix.js?ms_mspa_family=20260629-supportwall-audit7"],
  "sourcesContent": ["/*!\n * Milj\u00F8stein MSPA Pick/Mix family port.\n * Data comes from Liquid JSON; visible UI/state/cart-intent are MSPurchaseMotor-owned.\n */\n(function () {\n  \"use strict\";\n\n  const ROOT_SELECTOR = \"[data-mspa-pickmix-calc]\";\n  const FAMILY = \"pick-mix\";\n  const PORT = \"pick-mix-v5\";\n  const VERSION = \"2026-06-23-dependency-vnext-qa1\";\n  const SHIPPING_OWNED_TYPES = new Set([\"stora-drain\", \"betongblokk\", \"megastep\", \"granitt-trappetrinn\"]);\n\n  function text(value, fallback = \"\") {\n    const next = value === null || value === undefined ? \"\" : String(value).trim();\n    return next || fallback;\n  }\n\n  function number(value, fallback = 0) {\n    const parsed = Number(String(value ?? \"\").replace(\",\", \".\").trim());\n    return Number.isFinite(parsed) ? parsed : fallback;\n  }\n\n  function qty(value) {\n    return Math.max(0, Math.floor(number(value, 0)));\n  }\n\n  function formatMoney(cents) {\n    const api = window.MSCalculators;\n    if (api && typeof api.formatMoney === \"function\") return api.formatMoney(cents);\n    const amount = number(cents, 0) / 100;\n    return `${amount.toLocaleString(\"nb-NO\", { maximumFractionDigits: Number.isInteger(amount) ? 0 : 2 })} kr`;\n  }\n\n  function readJson(root, selector, fallback) {\n    const scope = root?.closest?.(\"[data-ms-calculator-host]\") || root?.parentElement || document;\n    const node = scope.querySelector(selector);\n    if (!node) return fallback;\n    try {\n      return JSON.parse(node.textContent || \"\");\n    } catch (error) {\n      console.warn(\"MSPA pick/mix: kunne ikke lese JSON\", selector, error);\n      return fallback;\n    }\n  }\n\n  function normalizeImage(url) {\n    const value = text(url);\n    if (!value) return \"\";\n    return value.indexOf(\"//\") === 0 ? `${window.location.protocol}${value}` : value;\n  }\n\n  function stringList(value) {\n    return Array.isArray(value) ? value.map((item) => text(item)).filter(Boolean) : [];\n  }\n\n  function normalizeProduct(raw) {\n    const source = raw && typeof raw === \"object\" ? raw : {};\n    return {\n      handle: text(source.handle),\n      title: text(source.displayTitle || source.title || source.handle, \"Produkt\"),\n      originalTitle: text(source.title || source.displayTitle || source.handle, \"Produkt\"),\n      vendor: text(source.vendor),\n      productId: text(source.productId || source.product_id),\n      variantId: number(source.variantId || source.id, 0),\n      variantTitle: text(source.variantTitle),\n      variantAvailable: source.variantAvailable !== false,\n      sku: text(source.sku),\n      unit: text(source.unit, \"stk\"),\n      grams: number(source.grams || source.weight_grams || source.weightGrams, 0),\n      cents: number(source.cents ?? source.price, 0),\n      compare: number(source.compare ?? source.compareCents ?? source.compare_at_price, 0),\n      image: normalizeImage(source.image || source.imageUrl),\n      fallbackImage: normalizeImage(source.fallbackImage || source.fallbackImageUrl || source.image || source.imageUrl),\n      url: text(source.url || (source.handle ? `/products/${source.handle}` : \"\")),\n      available: source.available !== false && source.variantAvailable !== false,\n      current: source.current === true,\n      schemaVersion: text(source.schemaVersion),\n      dependencyType: text(source.dependencyType),\n      lookupMethod: text(source.lookupMethod),\n      sourceHandle: text(source.sourceHandle || source.handle),\n      variantRule: text(source.variantRule),\n      required: source.required === true,\n      missing: source.missing === true,\n      group: text(source.group),\n      groupTitle: text(source.groupTitle),\n      sort: number(source.sort, 100),\n      chips: Array.isArray(source.chips) ? source.chips.map((chip) => text(chip)).filter(Boolean) : []\n    };\n  }\n\n  function hardMotorMissing(root) {\n    const host = root?.closest?.(\"[data-ms-calculator-host]\") || root;\n    host?.setAttribute?.(\"data-mspa-motor-status\", \"error\");\n    host?.setAttribute?.(\"data-mspa-motor-ready\", \"false\");\n    host?.setAttribute?.(\"data-mspa-motor-disabled\", \"true\");\n    host?.setAttribute?.(\"data-mspa-motor-error\", \"true\");\n    host?.setAttribute?.(\"data-mspa-motor-label\", \"MSPA-motor mangler\");\n    host?.setAttribute?.(\"data-mspa-motor-step\", \"MSPA-motor mangler\");\n    host?.setAttribute?.(\"data-mspa-motor-summary\", \"Plukk og miks krever MSPA-motor. Ingen gammel runtime-fallback brukes.\");\n    console.error(\"MSPA pick/mix: MSPurchaseMotor mangler. Familien stoppes uten fallback.\");\n  }\n\n  function motorApi(root) {\n    const api = window.MSPurchaseMotor;\n    if (!api || typeof api.mount !== \"function\" || typeof api.update !== \"function\" || typeof api.add !== \"function\") {\n      hardMotorMissing(root);\n      return null;\n    }\n    return api;\n  }\n\n  class MspaPickMix {\n    constructor(root) {\n      this.root = root;\n      this.host = root.closest(\"[data-ms-calculator-host]\") || root;\n      this.api = motorApi(root);\n      if (!this.api) return;\n\n      this.config = Object.assign({\n        type: text(root.dataset.mspaPickType || \"pick-mix\"),\n        title: \"Plukk og miks\",\n        actionLabel: \"Velg deler og antall\",\n        currentHandle: text(root.dataset.mspaProductHandle),\n        vendor: text(root.dataset.mspaProductVendor),\n        filter: \"\",\n        priceLabel: \"Pris per stykk\",\n        reverseAdd: true,\n        selectedTitle: \"Valgt variant\",\n        otherTitle: \"Andre produkter\",\n        filters: [],\n        groupPrimarySkus: {},\n        dependencyContract: text(root.dataset.mspaDependencyContract),\n        dependencySource: text(root.dataset.mspaDependencySource),\n        dependencyVariantRule: text(root.dataset.mspaDependencyVariantRule),\n        dependencyCountExpected: number(root.dataset.mspaDependencyExpected, 0),\n        dependencyCountRendered: number(root.dataset.mspaDependencyRendered, 0),\n        dependencyMissingHandles: []\n      }, readJson(root, \"[data-mspa-pickmix-config-json]\", {}));\n      this.config.type = text(this.config.type || root.dataset.mspaPickType, \"pick-mix\");\n      this.config.currentHandle = text(this.config.currentHandle || root.dataset.mspaProductHandle);\n      this.config.vendor = text(this.config.vendor || root.dataset.mspaProductVendor);\n      this.config.filters = Array.isArray(this.config.filters) ? this.config.filters : [];\n      this.config.groupPrimarySkus = this.config.groupPrimarySkus && typeof this.config.groupPrimarySkus === \"object\" ? this.config.groupPrimarySkus : {};\n      this.config.dependencyContract = text(this.config.dependencyContract || this.config.schemaVersion || root.dataset.mspaDependencyContract);\n      this.config.dependencySource = text(this.config.dependencySource || root.dataset.mspaDependencySource);\n      this.config.dependencyVariantRule = text(this.config.dependencyVariantRule || root.dataset.mspaDependencyVariantRule);\n      this.config.dependencyMissingHandles = stringList(this.config.dependencyMissingHandles);\n\n      this.products = readJson(root, \"[data-mspa-pickmix-products-json]\", []).map(normalizeProduct);\n      this.dependencyHealth = this.resolveDependencyHealth();\n      this.state = {\n        filter: text(this.config.filter),\n        counts: {},\n        adding: false,\n        errorMessage: \"\"\n      };\n      this.els = {};\n      this.mountShell();\n      this.renderDefinition();\n    }\n\n    mountShell() {\n      this.host.setAttribute(\"data-mspa-ui-owner\", \"mspa\");\n      this.host.setAttribute(\"data-mspa-customer-summary\", \"off\");\n      this.host.setAttribute(\"data-mspa-legacy-policy\", \"clean-family-ui\");\n      this.host.setAttribute(\"data-mspa-family-port\", PORT);\n      this.host.setAttribute(\"data-mspa-family-port-version\", VERSION);\n      this.host.setAttribute(\"data-mspa-dependency-contract\", this.dependencyHealth.contract || \"unknown\");\n      this.host.setAttribute(\"data-mspa-dependency-source\", this.dependencyHealth.source || \"unknown\");\n      this.host.setAttribute(\"data-mspa-dependency-variant-rule\", this.dependencyHealth.variantRule || \"unknown\");\n      this.host.setAttribute(\"data-mspa-dependency-status\", this.dependencyHealth.status);\n      this.host.setAttribute(\"data-mspa-dependency-expected\", String(this.dependencyHealth.expected));\n      this.host.setAttribute(\"data-mspa-dependency-rendered\", String(this.dependencyHealth.rendered));\n      this.host.setAttribute(\"data-mspa-dependency-missing-count\", String(this.dependencyHealth.missing.length));\n      if (this.dependencyHealth.missing.length) {\n        console.warn(\"MSPA pick/mix: dependency-kontrakt er delvis rendret\", this.dependencyHealth);\n      }\n      this.host.removeAttribute(\"data-mspa-hard-disabled-family\");\n      this.host.removeAttribute(\"data-mspa-motor-missing\");\n      this.host.setAttribute(\"data-mspa-motor-error\", \"false\");\n      this.host.classList.remove(\"is-mspa-error\");\n      this.api.define(FAMILY, {\n        port: PORT,\n        version: VERSION,\n        source: \"mspa-pick-mix.js\",\n        types: [\"stora-drain\", \"betongblokk\", \"megastep\", \"granitt-trappetrinn\"],\n        dependency: this.dependencyHealth\n      });\n    }\n\n    resolveDependencyHealth() {\n      const missing = stringList(this.config.dependencyMissingHandles);\n      const expected = number(this.config.dependencyCountExpected || this.root.dataset.mspaDependencyExpected, this.products.length + missing.length);\n      const rendered = number(this.config.dependencyCountRendered || this.root.dataset.mspaDependencyRendered, this.products.length);\n      return {\n        contract: text(this.config.dependencyContract, \"mspa-pickmix-dependency-vnext-qa1\"),\n        source: text(this.config.dependencySource, \"liquid_all_products_handle_interim\"),\n        variantRule: text(this.config.dependencyVariantRule, \"selected_or_first_available_variant_interim\"),\n        status: missing.length ? \"partial\" : \"complete\",\n        expected,\n        rendered,\n        missing\n      };\n    }\n\n    renderDefinition() {\n      this.api.mount(this.host, {\n        family: FAMILY,\n        port: PORT,\n        version: VERSION,\n        stockIntent: (selection) => this.stockIntent(selection),\n        stockContext: () => ({filter:this.state.filter}),\n        stockProducts: () => this.displayProducts().map((product) => ({\n          ...product,\n          canAdd: product.available === true,\n          image: product.image || product.fallbackImage || \"\",\n          quantity: qty(this.state.counts[product.handle])\n        })),\n        slot: \"[data-mspa-motor-root]\",\n        chrome: this.buildChrome(),\n        steps: this.buildSteps()\n      });\n      this.collect();\n      this.bind();\n      this.render();\n    }\n\n    buildChrome() {\n      const current = this.currentProduct();\n      if (!current) return [];\n      return [{\n        type: \"price\",\n        name: \"price\",\n        label: this.config.priceLabel || \"Pris per stykk\",\n        value: formatMoney(current.cents || number(this.root.dataset.mspaProductPriceCents, 0)),\n        priceCents: current.cents || number(this.root.dataset.mspaProductPriceCents, 0),\n        compareCents: current.compare || number(this.root.dataset.mspaProductCompareAtCents, 0)\n      }];\n    }\n\n    buildSteps() {\n      const components = [{\n        type: \"info\",\n        text: \"Velg antall av delene du trenger. Hele utvalget og tilbudet ser du i kurven.\"\n      }];\n      if (this.config.filters.length) {\n        components.push({\n          type: \"choicegroup\",\n          name: \"filter\",\n          options: this.config.filters.map((filter) => ({\n            value: filter.value,\n            label: filter.label || filter.value,\n            selected: text(filter.value) === this.state.filter\n          }))\n        });\n      }\n      components.push({\n        type: \"pickMix\",\n        id: `${this.config.type}-pick`,\n        title: this.config.title || \"Plukk og miks\",\n        groupTitle: this.config.otherTitle || \"Andre produkter\",\n        items: this.pickItems()\n      });\n      return [{\n        id: \"pick\",\n        label: this.config.actionLabel || \"Velg deler og antall\",\n        components\n      }];\n    }\n\n    collect() {\n      this.els.scope = this.host.querySelector(\"[data-mspa-motor-root]\") || this.host;\n      this.els.step = this.els.scope.querySelector('[data-mspa-step=\"pick\"]');\n      this.els.filterGroup = this.els.scope.querySelector('[data-mspa-choice-group=\"filter\"]');\n      this.els.inputs = Array.from(this.els.scope.querySelectorAll(\"[data-mspa-quantity]\"))\n        .filter((input) => text(input.getAttribute(\"data-mspa-quantity\")).indexOf(\"pick_\") === 0);\n      this.els.firstInput = this.els.inputs[0] || null;\n    }\n\n    bind() {\n      const scope = this.els.scope;\n      if (!scope) return;\n\n      if (scope.dataset.mspaPickMixScopeBound !== \"true\") {\n        scope.dataset.mspaPickMixScopeBound = \"true\";\n\n        scope.addEventListener(\"click\", (event) => {\n          const choice = event.target.closest?.('[data-mspa-choice]');\n          if (choice && this.els.filterGroup && this.els.filterGroup.contains(choice)) {\n            event.preventDefault();\n            this.setFilter(choice.getAttribute(\"data-mspa-choice\"));\n          }\n        });\n\n        scope.addEventListener(\"keydown\", (event) => {\n          if (event.key !== \"Enter\" && event.key !== \" \") return;\n          const choice = event.target.closest?.('[data-mspa-choice]');\n          if (choice && this.els.filterGroup && this.els.filterGroup.contains(choice)) {\n            event.preventDefault();\n            this.setFilter(choice.getAttribute(\"data-mspa-choice\"));\n          }\n        });\n      }\n\n      this.els.inputs.forEach((input) => {\n        if (input.dataset.mspaPickMixInputBound === \"true\") return;\n        input.dataset.mspaPickMixInputBound = \"true\";\n        input.addEventListener(\"input\", () => {\n          this.setCountFromInput(input);\n          this.render({ keepFocus: true });\n        });\n        input.addEventListener(\"change\", () => {\n          this.setCountFromInput(input);\n          this.render();\n        });\n        input.addEventListener(\"blur\", () => {\n          this.setCountFromInput(input);\n          this.render();\n        });\n        input.addEventListener(\"keydown\", (event) => {\n          if (event.key !== \"Enter\") return;\n          event.preventDefault();\n          this.setCountFromInput(input);\n          input.blur();\n          this.render();\n        });\n      });\n\n      if (this.host.dataset.mspaPickMixHistoryBound !== \"true\") {\n        this.host.dataset.mspaPickMixHistoryBound = \"true\";\n        this.host.addEventListener(\"ms:mspa-step-history:edit\", (event) => {\n          if (event.detail?.id !== \"pick\") return;\n          event.preventDefault();\n          this.focusCurrent();\n        });\n      }\n    }\n\n    setFilter(value) {\n      const next = text(value);\n      if (!next || next === this.state.filter) return;\n      this.state.filter = next;\n      this.state.counts = {};\n      this.state.errorMessage = \"\";\n      this.renderDefinition();\n      this.focusCurrent();\n    }\n\n    setCountFromInput(input) {\n      const key = text(input.getAttribute(\"data-mspa-quantity\")).replace(/^pick_/, \"\");\n      if (!key) return;\n      this.state.counts[key] = qty(input.value);\n      this.state.errorMessage = \"\";\n    }\n\n    currentProduct() {\n      return this.products.find((product) => product.handle === this.config.currentHandle || product.current) || this.products[0] || null;\n    }\n\n    selectedLines() {\n      return this.products\n        .map((product) => {\n          const quantity = qty(this.state.counts[product.handle]);\n          return quantity ? { product, quantity, totalCents: quantity * product.cents } : null;\n        })\n        .filter(Boolean);\n    }\n\n    displayProducts() {\n      const primarySku = this.state.filter ? text(this.config.groupPrimarySkus[this.state.filter]) : \"\";\n      return this.products\n        .filter((product) => !this.state.filter || !product.group || product.group === this.state.filter)\n        .slice()\n        .sort((a, b) => {\n          const aActive = Boolean(this.state.filter && a.group === this.state.filter);\n          const bActive = Boolean(this.state.filter && b.group === this.state.filter);\n          if (aActive && !bActive) return -1;\n          if (bActive && !aActive) return 1;\n          const aPrimary = Boolean(primarySku && a.sku === primarySku);\n          const bPrimary = Boolean(primarySku && b.sku === primarySku);\n          if (aPrimary && !bPrimary) return -1;\n          if (bPrimary && !aPrimary) return 1;\n          const aCurrent = Boolean((a.handle === this.config.currentHandle || a.current) && (!this.state.filter || a.group === this.state.filter || !a.group));\n          const bCurrent = Boolean((b.handle === this.config.currentHandle || b.current) && (!this.state.filter || b.group === this.state.filter || !b.group));\n          if (aCurrent && !bCurrent) return -1;\n          if (bCurrent && !aCurrent) return 1;\n          if (a.group !== b.group) return a.group.localeCompare(b.group, \"nb\", { sensitivity: \"base\" });\n          if (a.sort !== b.sort) return a.sort - b.sort;\n          return a.title.localeCompare(b.title, \"nb\", { sensitivity: \"base\" });\n        });\n    }\n\n    pickItems() {\n      const primarySku = this.state.filter ? text(this.config.groupPrimarySkus[this.state.filter]) : \"\";\n      return this.displayProducts().map((product) => {\n        const current = product.handle === this.config.currentHandle || product.current;\n        const primary = current || Boolean(primarySku && product.sku === primarySku);\n        return {\n          key: product.handle,\n          name: `pick_${product.handle}`,\n          title: product.title,\n          badges: product.chips,\n          price: formatMoney(product.cents),\n          image: product.image,\n          fallbackImage: product.fallbackImage,\n          handle: product.handle,\n          quantity: this.state.counts[product.handle] || 0,\n          primary,\n          current,\n          currentLabel: current ? (this.config.selectedTitle || \"Valgt variant\") : \"Hovedprodukt\"\n        };\n      });\n    }\n\n    syncInputs() {\n      this.els.inputs.forEach((input) => {\n        const key = text(input.getAttribute(\"data-mspa-quantity\")).replace(/^pick_/, \"\");\n        const value = String(qty(this.state.counts[key]));\n        if (input.value !== value) input.value = value;\n        const row = input.closest(\"[data-mspa-pick-line]\");\n        if (row) {\n          const selected = value !== \"0\";\n          row.classList.toggle(\"is-selected\", selected);\n          row.setAttribute(\"data-mspa-pick-selected\", selected ? \"true\" : \"false\");\n        }\n      });\n    }\n\n    syncFilter() {\n      if (!this.els.filterGroup) return;\n      this.els.filterGroup.setAttribute(\"data-mspa-choice-value\", this.state.filter || \"\");\n      this.els.filterGroup.querySelectorAll(\"[data-mspa-choice]\").forEach((button) => {\n        const active = button.getAttribute(\"data-mspa-choice\") === this.state.filter;\n        button.classList.toggle(\"is-active\", active);\n        button.setAttribute(\"aria-pressed\", active ? \"true\" : \"false\");\n      });\n    }\n\n    ready() {\n      if (this.root.dataset.mspaProductAvailable === \"false\") return false;\n      const lines = this.selectedLines();\n      return Boolean(lines.length && !this.unavailableLine(lines));\n    }\n\n    unavailableLine(lines = this.selectedLines()) {\n      return lines.find((line) => !line.product.available || !line.product.variantId);\n    }\n\n    render() {\n      this.syncInputs();\n      this.syncFilter();\n      const lines = this.selectedLines();\n      const unavailable = this.unavailableLine(lines);\n      const ready = this.ready();\n      const label = this.state.adding\n        ? (this.root.dataset.mspaBusyCta || \"Legger i kurven...\")\n        : ready\n          ? (this.root.dataset.mspaPrimaryCta || \"Legg i kurven\")\n          : (this.root.dataset.mspaEmptyCta || \"Velg deler og antall\");\n      const validation = unavailable\n        ? \"En eller flere valgte varer mangler salgbar variant. Pr\u00F8v en annen variant eller kontakt oss.\"\n        : ready\n          ? \"\"\n          : \"Velg minst \u00E9n vare.\";\n      this.api.update(this.host, {\n        family: FAMILY,\n        status: this.state.errorMessage ? \"error\" : (this.state.adding ? \"busy\" : (ready ? \"ready\" : \"not-ready\")),\n        ready: ready && !this.state.errorMessage,\n        busy: this.state.adding,\n        disabled: !ready || Boolean(this.state.errorMessage),\n        error: Boolean(this.state.errorMessage || unavailable),\n        label: this.state.errorMessage ? \"Pr\u00F8v igjen\" : label,\n        step: ready ? \"Legg i kurven\" : (this.config.actionLabel || \"Velg deler og antall\"),\n        summary: ready && !this.state.errorMessage ? \"Utvalget er klart. Legg i kurven.\" : \"\",\n        validation: this.state.errorMessage || validation,\n        reason: this.state.errorMessage || \"\",\n        focusTarget: ready ? this.els.firstInput || this.els.scope : this.els.firstInput || this.els.scope,\n        steps: [{\n          id: \"pick\",\n          label: \"Varianter\",\n          shortLabel: \"Varianter\",\n          visible: true,\n          state: ready ? \"complete\" : \"current\",\n          target: this.els.step || this.els.scope,\n          disabled: false\n        }],\n        add: ready ? (context) => this.add(context) : null,\n        intent: ready ? this.cartIntent() : null\n      });\n    }\n\n    shippingOwned() {\n      return SHIPPING_OWNED_TYPES.has(this.config.type);\n    }\n\n    stockIntent(selection) {\n      const selected = new Map(selection.map((row) => [row.variantId,row]));\n      const counts = {};\n      const seen = new Set();\n      this.displayProducts().forEach((product) => {\n        const row = selected.get(String(product.variantId));\n        if (row && row.sku === product.sku && !seen.has(row.variantId)) {\n          counts[product.handle] = row.quantity;seen.add(row.variantId);\n        }\n      });\n      const view = Object.create(this);\n      view.state = {...this.state,counts};\n      return view.cartIntent();\n    }\n\n    cartIntent() {\n      const lines = this.selectedLines();\n      const ordered = this.config.reverseAdd === false ? lines : lines.slice().reverse();\n      const totalCents = lines.reduce((sum, line) => sum + line.totalCents, 0);\n      const items = ordered.map((line, index) => this.cartItem(line, index));\n      const shippingItems = this.shippingOwned() ? ordered.map((line) => this.shippingItem(line)).filter(Boolean) : [];\n      return {\n        root: this.host,\n        family: this.config.type || FAMILY,\n        vendor: this.config.vendor,\n        items,\n        shippingItems,\n        presentation: {\n          lines: lines.map((line) => ({\n            item: items[ordered.indexOf(line)],\n            title: line.product.title,\n            image: line.product.image || \"\"\n          }))\n        },\n        preview: {\n          title: this.config.title || \"Plukk og miks\",\n          subtitle: `${lines.length} ${lines.length === 1 ? \"vare\" : \"varer\"} valgt`,\n          estimatedTotal: formatMoney(totalCents),\n          status: \"Legger utvalget i handlekurven...\",\n          lines: lines.map((line) => ({\n            title: line.product.title,\n            quantity: `${line.quantity} stk`,\n            price: line.product.cents ? `Sum ${formatMoney(line.totalCents)}` : \"\",\n            image: line.product.image,\n            locked: false\n          }))\n        },\n        calculatorSummary: this.calculatorSummary(lines),\n        calculatorSnapshot: {\n          contract: \"mspa-calculator-snapshot-v1\",\n          source: \"mspa-pick-mix\",\n          version: VERSION,\n          type: this.config.type,\n          filter: this.state.filter,\n          counts: Object.assign({}, this.state.counts),\n          dependency: this.dependencyHealth\n        },\n        requiresPostcode: true,\n        syncHints: {\n          cart: true,\n          freight: true,\n          pallets: this.shippingOwned(),\n          variants: true\n        }\n      };\n    }\n\n    cartItem(line, index) {\n      return {\n        id: line.product.variantId,\n        quantity: line.quantity,\n        properties: {\n          _ms_calculator_family: this.config.type || FAMILY,\n          _ms_source: \"mspa-pick-mix\",\n          _ms_port: PORT,\n          _ms_product_key: line.product.handle,\n          _ms_product_title: line.product.title,\n          _ms_product_vendor: line.product.vendor || this.config.vendor,\n          _ms_preview_title: line.product.title,\n          _ms_line_order: String(index + 1),\n          _ms_pallet_owner: this.shippingOwned() ? \"shipping_2\" : \"none\",\n          _ms_pick_filter: this.state.filter || \"\",\n          _ms_mode: \"pick\"\n        }\n      };\n    }\n\n    shippingItem(line) {\n      if (!line.product.variantId || !line.quantity) return null;\n      return {\n        id: line.product.variantId,\n        variant_id: line.product.variantId,\n        variantId: line.product.variantId,\n        productId: line.product.productId,\n        product_id: line.product.productId,\n        handle: line.product.handle,\n        title: line.product.title,\n        product_title: line.product.originalTitle || line.product.title,\n        vendor: line.product.vendor || this.config.vendor,\n        product_vendor: line.product.vendor || this.config.vendor,\n        quantity: line.quantity,\n        grams: line.product.grams,\n        sku: line.product.sku,\n        price: line.product.cents,\n        final_price: line.product.cents,\n        requires_shipping: true,\n        role: this.config.type || FAMILY,\n        owner: \"shipping_2\",\n        source: \"mspa-pick-mix\",\n        properties: {\n          _ms_calculator_family: this.config.type || FAMILY,\n          _ms_pallet_owner: \"shipping_2\",\n          _ms_pick_filter: this.state.filter || \"\"\n        }\n      };\n    }\n\n    calculatorSummary(lines) {\n      const totalQty = lines.reduce((sum, line) => sum + line.quantity, 0);\n      return {\n        version: 1,\n        source: \"mspa_pick_mix\",\n        family: this.config.type || FAMILY,\n        title: this.config.title || \"Plukk og miks\",\n        summaryText: `${lines.length} ${lines.length === 1 ? \"vare\" : \"varer\"} \u00B7 ${totalQty} stk`,\n        filter: this.state.filter,\n        products: lines.map((line) => ({\n          title: line.product.title,\n          quantity: `${line.quantity} stk`,\n          sku: line.product.sku,\n          role: line.product.group || line.product.chips.join(\", \")\n        })),\n        lines: [\n          { label: \"Beregningstype\", value: \"Plukk og miks\" },\n          { label: \"Valgte varer\", value: `${lines.length}` },\n          { label: \"Antall totalt\", value: `${totalQty} stk` }\n        ],\n        warnings: []\n      };\n    }\n\n    async add(context) {\n      if (this.state.adding || !this.ready()) return null;\n      this.state.adding = true;\n      this.render();\n      try {\n        const result = await this.api.add(this.host, this.cartIntent());\n        document.dispatchEvent(new CustomEvent(\"cartModal:done\", {\n          bubbles: true,\n          detail: { source: \"mspa-pick-mix\", context: context || {} }\n        }));\n        if (!this.isQuickShop()) {\n          document.dispatchEvent(new CustomEvent(\"ms:cart:open-request\", {\n            bubbles: true,\n            detail: { source: \"mspa-pick-mix\" }\n          }));\n        }\n        return result;\n      } catch (error) {\n        if (this.api?.isPurchaseLayerError?.(error) || window.MSPurchaseMotor?.isPurchaseLayerError?.(error)) {\n          this.state.errorMessage = \"\";\n        } else {\n          this.state.errorMessage = error?.message || \"Kunne ikke legge i kurven.\";\n        }\n        throw error;\n      } finally {\n        this.state.adding = false;\n        this.render();\n      }\n    }\n\n    isQuickShop() {\n      return this.host.getAttribute(\"data-calculator-context\") === \"quick-shop\" ||\n        this.host.closest(\"[data-ms-purchase-context='quick-shop']\");\n    }\n\n    focusCurrent() {\n      const target = this.els.firstInput || this.els.scope;\n      window.setTimeout(() => {\n        try {\n          target?.focus?.({ preventScroll: true });\n        } catch (_) {\n          target?.focus?.();\n        }\n      }, 80);\n    }\n  }\n\n  function initAll(scope = document) {\n    scope.querySelectorAll(ROOT_SELECTOR).forEach((root) => {\n      if (root.dataset.mspaPickMixBound === \"true\") return;\n      root.dataset.mspaPickMixBound = \"true\";\n      new MspaPickMix(root);\n    });\n  }\n\n  if (document.readyState === \"loading\") {\n    document.addEventListener(\"DOMContentLoaded\", () => initAll(document), { once: true });\n  } else {\n    initAll(document);\n  }\n  document.addEventListener(\"shopify:section:load\", (event) => initAll(event.target));\n  document.addEventListener(\"ms:quick-sh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