PageSourceSearch

https://se.tretorn.com/static/js/Product-CtaSection-VariantSelector-VariantSelectorComponent.7e42abcb.chunk.js

js tretorn.com collected 2026-09-24 22:25:21 UTC 5,521 bytes, 4 lines download raw bytes

1"use strict";
2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="4a27748e-e47d-5c31-9493-09afa412c457")}catch(e){}}();
3(self.__LOADABLE_LOADED_CHUNKS__=self.__LOADABLE_LOADED_CHUNKS__||[]).push([[2335,4244],{40:function(n,e,r){r.r(e),r.d(e,{VariantsSelectorComponent:function(){return z}});var t,i,o,l,a,s=r(1413),c=r(45987),d=r(30168),u=r(89265),p=r(62428),h=(r(15689),r(54088)),v=r(65387),x=r(6771),f=r(62858),y=r(77578),g=r(2046),m=r(29684),S=["hasError","selectedSize","onSelectSize","variations"],w=(0,p.styled)("div")(t||(t=(0,d.Z)(["\n    display: grid;\n    gap: 8px;\n    border-bottom: 1px solid var(--ui-border);\n"]))),j=(0,p.styled)("span")(i||(i=(0,d.Z)(["\n    position: relative;\n    display: inline-block;\n"]))),b=(0,p.styled)("span")(o||(o=(0,d.Z)(["\n    position: absolute;\n    top: -10px;\n    left: calc(100%);\n    display: flex;\n    align-items: center;
3\n"]))),_=(0,p.styled)("span")(l||(l=(0,d.Z)(["\n    display: inline-block;\n    width: 8px;\n    height: 8px;\n    flex-shrink: 0;\n    margin-bottom: 0.1em;\n"]))),k=(0,p.styled)("button")(a||(a=(0,d.Z)(["\n    width: auto;\n    display: flex;\n    align-items: center;\n    justify-content: center;\n    position: relative;\n    padding: ",";\n    overflow: hidden;\n\n    &::after {\n        content: '';\n        position: absolute;\n        width: 6px;\n        height: 4px;\n        background: currentColor;\n        clip-path: polygon(50% 0%, 0% 100%, 100% 100%);\n        bottom: 2px;\n        transform: ",";\n        transition: all var(--transition-primary-fast);\n    }\n\n    &:hover::after {\n        transform: translateY(0);\n    }\n\n    ","\n"])),(function(n){return n.outOfStock?"14px 12px 14px 8px":"14px 8px"}),(function(n){return n.selected?"translateY(0)":"translateY(8px)"}),(function(n){var e=n.outOfStock,r=n.selected,t=n.hasSelection;return e?"\n        text-decoration: line-through;\n        ".concat(t?"":"&:hover { color: var(--ui-primary); }","\n        ").concat(r?"color: var(--ui-primary);":"","\n    "):""})),z=function(n){var e=n.hasError,r=void 0!==e&&e,t=n.selectedSize,i=n.onSelectSize,o=n.variations,l=void 0===o?[]:o,a=(0,c.Z)(n,S),d=(0,h.$)().t;var p=function(n,e){for(var r=[],t=0,i=n.length,o=Math.floor(i/e),l=i%e,a=0;a<e;a++){var s=o+(l>0?1:0);r.push(n.slice(t,t+s)),t+=s,l-=1}return r}(l,l.length>6?Math.ceil(l.length/6):1),z=p[0].length>4?p[0].length:4,O=(null===t||void 0===t?void 0:t.stockStatus)===x.B.LOW_STOCK,Z=(null===t||void 0===t?void 0:t.stockStatus)===x.B.OUT_OF_STOCK;return(0,m.jsxs)(u.DivElement,(0,s.Z)((0,s.Z)({display:"flex",flexDirection:"column",gap:"8px"},a),{},{children:[(0,m.jsx)(u.DivElement,{children:(0,m.jsxs)(u.DivElement,{display:"flex",gap:"16px",children:[(0,m.jsx)(v.x,{id:"size-selector-label",typography:"Secondary Miscellaneous/14_100",color:r?"var(--ui-error)":"var(--ui-quinary)",children:t?(0,m.jsxs)(m.Fragment,{children:["".concat(d("views.product.size"),": "),(0,m.jsx)(v.x,{as:"span",color:"var(--ui-primary)",typography:"Secondary Miscellaneous/14_100",children:t.name})]}):"".concat(d("views.product.selectSize"),"*")}),r&&(0,m.jsx)(f.T,{id:"size-selector-error",children:d("views.product.selectSizeError")}),t&&(O||Z)&&(0,m.jsxs)(v.x,{color:"var(--ui-primary)",typography:"Secondary Miscellaneous/12_100",display:"flex",alignItems:"center",gap:"8px",children:[(0,m.jsx)(_,{"aria-hidden":!0,backgroundColor:O?"var(--ui-warning)":"var(--ui-error)"}),d(O?"views.product.lowInStock":"views.product.outOfStock")]})]})}),p[0].length>1&&p.map((function(n){return(0,m.jsx)(w,{gridTemplateColumns:"repeat(".concat(z,", 1fr)"),role:"group","aria-labelledby":"size-selector-label","aria-describedby":r?"size-selector-error":void 0,children:n.map((function(n){var e=(null===t||void 0===t?void 0:t.name)===n.name,r=n.inStock,o="var(--ui-primary)";return t&&!e&&(o="var(--ui-quinary)"),(0,m.jsx)(k,(0,s.Z)((0,s.Z)({color:o,selected:e,outOfStock:!r,hasSelection:!!t,onClick:function(){return i(n)},"aria-label":d("views.product.size",{size:n.name})},(0,y.w)("Secondary Miscellaneous/12_100")),{},{textDecoration:e?"underline":"none",children:(0,m.jsxs)(j,{children:[n.name,!r&&(0,m.jsx)(b,{children:(0,m.jsx)(g.NotifyIcon,{width:"10px"})})]})}),"".concat(n.sku,"-").concat(n.name))}))})}))]}))}},2046:function(n,e,r){r.r(e),r.d(e,{NotifyIcon:function(){return s}});var t=r(1413),i=r(45987),o=r(13740),l=(r(15689),r(29684)),a=["color","height","width"],s=function(n){var e=n.color,r=void 0===e?"currentColor":e,s=n.height,c=void 0===s?"auto":s,d=n.width,u=void 0===d?"10px":d,p=(0,i.Z)(n,a);return(0,l.jsxs)(o.J.Svg,(0,t.Z)((0,t.Z)({width:u,height:c,viewBox:"0 0 10 10",fill:"none",xmlns:"http://www.w3.org/2000/svg"},p),{},{children:[(0,l.jsxs)(o.J.G,{fill:r,children:[(0,l.jsx)(o.J.Path,{fillRule:"evenodd",d:"M5 .5c1.4 0 2.603.995 2.865 2.371l.61 3.202.96 1.679L9 8.5H1l-.435-.748.96-1.679.61-3.202A2.92 2.92 0 0 1 5 .5m0 1c-.92 0-1.71.654-1.883 1.559l-.626 3.285-.056.154L1.862 7.5h6.276l-.573-1.002-.056-.154-.626-3.285A1.92 1.92 0 0 0 5 1.5",clipRule:"evenodd"}),(0,l.jsx)(o.J.Path,{d:"M6.118 7.514a.5.5 0 0 1 .357.644c-.12.357-.3.684-.544.928-.247.247-.567.414-.931.414s-.684-.167-.93-.414a2.4 2.4 0 0 1-.545-.928A.5.5 0 0 1 4 7.5h2z"})]}),(0,l.jsx)(o.J.Path,{d:"M0 0h10v10H0z",fill:"none"})]}))}}}]);
4//# debugId=4a27748e-e47d-5c31-9493-09afa412c457

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.