Files
klz-cables.com/.pnpm-store/v10/files/88/2fed28fdd8766298ca12337fdbc88ea42e299779721cd1b78d0bc8a93ab77c012ed391901e83372c373fa44c6b7ec614035889d2c309a523eab80ae1ff270c
Marc Mintel 5397309103
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
fix(products): fix breadcrumbs and product filtering (backport from main)
2026-02-24 16:04:21 +01:00

2 lines
1.7 KiB
Plaintext

import{parse as t,TYPE as n}from"@formatjs/icu-messageformat-parser";import{T as e,a as r,b as s,c as o,d as u,e as i,f as c}from"./types-DqTLNw7x.js";function a(n){const e=f(t(n));return 0===e.length?"":1===e.length&&"string"==typeof e[0]?e[0]:e}function f(t){const n=[];for(const e of t){const t=p(e);"string"==typeof t&&n.length>0&&"string"==typeof n[n.length-1]?n[n.length-1]+=t:n.push(t)}return n}function l(t){const n=f(t);if(0===n.length)return"";if(1===n.length){const t=n[0];if("string"==typeof t||t===e)return t}return n}function p(t){switch(t.type){case n.literal:return t.value;case n.argument:return[t.value];case n.number:return function(t){const n=[t.value,r],e=function(t){if(!t)return;if("string"==typeof t)return t;if("parsedOptions"in t){const n=t.parsedOptions;return Object.keys(n).length>0?n:void 0}return}(t.style);void 0!==e&&n.push(e);return n}(t);case n.date:return function(t){const n=[t.value,s],e=g(t.style);void 0!==e&&n.push(e);return n}(t);case n.time:return function(t){const n=[t.value,o],e=g(t.style);void 0!==e&&n.push(e);return n}(t);case n.select:return function(t){const n={};for(const[e,r]of Object.entries(t.options))n[e]=l(r.value);return[t.value,u,n]}(t);case n.plural:return function(t){const n={};for(const[e,r]of Object.entries(t.options))n[e]=l(r.value);return[t.value,"ordinal"===t.pluralType?i:c,n]}(t);case n.pound:return e;case n.tag:return function(t){const n=f(t.children),e=[t.value];0===n.length?e.push(""):e.push(...n);return e}(t);default:throw new Error(`Unknown AST node type: ${t.type}`)}}function g(t){if(t){if("string"==typeof t)return t;if("parsedOptions"in t){const n=t.parsedOptions;return Object.keys(n).length>0?n:void 0}}}export{a as default};