PageSourceSearch

https://www.maskinklippet.se/static/js/8742.4dd267ee.chunk.js

js maskinklippet.se collected 2026-10-04 07:38:46 UTC 13,343 bytes, 132 lines download raw bytes

1"use strict";(globalThis.__LOADABLE_LOADED_CHUNKS__=globalThis.__LOADABLE_LOADED_CHUNKS__||[]).push([[8742],{52467(e,t,i){i.d(t,{b:()=>y});var n=i(72176),r=i(62757),o=i(80812);class l extends n.PureComponent{constructor(e){var t;super(e),t=this,this.validTags=[],this.getComponent=e=>{const{tagComponents:t}=this.props;if(-1!==this.validTags.indexOf(e)){return t[e]||null}return null},this.renderContent=function(e,i){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;const{textComponent:d}=t.props;let a=e;const c=l;if(0!==n||c[i]||(c[i]=[]),void 0!==e){if(Array.isArray(e))a=e.map((e,r)=>t.renderContent(e,i,n+1,c,r));else if("object"===typeof e){const r=t.getComponent(e.tag);r?(c[i].push(e.tag),a=(0,o.jsx)(r,{attrs:e.attributes,children:t.renderContent(e.content,i,n+1,c)},`${i}.${n}.${s}`)):a=t.renderContent(e.content,i,n+1,c)}const l=["ol","ul","h1","h2","h3","h4","h5","h6","quote"];if(0===n&&!c[i].filter(e=>-1!==l.indexOf(e)).length){const e=d;return"string"===typeof a&&-1!==a.indexOf("open.spotify.com")?(a=a.replace(".com/",".com/embed/"),(0,o.jsx)("iframe",{title:"embedded-spotify",src:a,width:"280",height:"380",frameBorder:"0",allowTransparency:"true",allow:"encrypted-media"})):(0,o.jsx)(e,{children:"string"===typeof a?(0,r.L)(a):a})}return"string"===typeof a?(0,r.L)(a):a}},this.validTags=Object.keys(e.tagComponents)}render(){let{data:e}=this.props;return e?("string"===typeof e&&(e=e.split("\n")),e.map((e,t)=>(0,o.jsx)(n.Fragment,{children:this.renderContent(e,t)},t))):null}}l.defaultProps={tagComponents:{},textComponent:e=>{let{children:t}=e;return(0,o.jsx)("p",{children:t})}};var s=i(58329);const d=(0,i(474).A)(s.N)`
2    color: inherit;
3    text-decoration: underline;
4`,a=e=>{let{attrs:t,children:i}=e;return(0,o.jsx)(d,{to:t["data-url"],children:i})},c=e=>{let{children:t}=e;return(0,o.jsx)("strong",{children:t})},h=e=>{let{children:t}=e;return(0,o.jsx)("em",{children:t})},u=e=>{let{children:t}=e;return(0,o.jsx)("ul",{children:t})}
4,p=e=>{let{children:t}=e;return(0,o.jsx)("ol",{children:t})},x=e=>{let{children:t}=e;return(0,o.jsx)("li",{children:t})},m=e=>{let{children:t}=e;return(0,o.jsx)("u",{children:t})},g=e=>{let{children:t}=e;return(0,o.jsx)("blockquote",{children:t})},v=e=>{let{children:t}=e;return(0,o.jsx)("h1",{children:t})},f=e=>{let{children:t}=e;return(0,o.jsx)("h2",{children:t})},b=e=>{let{children:t}=e;return(0,o.jsx)("h3",{children:t})},w=e=>{let{children:t}=e;return(0,o.jsx)("h4",{children:t})},j=e=>{let{children:t}=e;return(0,o.jsx)("h5",{children:t})},y=e=>{let{data:t,validTags:i,tagComponents:n,textComponent:r}=e;const s={url:a,i:h,b:c,u:m,ul:u,ol:p,li:x,quote:g,h1:v,h2:f,h3:b,h4:w,h5:j,...n},d={};return i.forEach(e=>{s[e]&&(d[e]=s[e])}),(0,o.jsx)(l,{data:t,textComponent:r,tagComponents:d})};y.defaultProps={tagComponents:{},textComponent:void 0,validTags:["url","i","b","u","ul","ol","li","quote","h1","h2","h3","h4","h5"]}},31853(e,t,i){i.d(t,{T:()=>r});var n=i(3860);const r=e=>{switch(parseInt(e,10)){case parseInt(n.STORM_ROLE_SALE,10):return"seller";case parseInt(n.STORM_ROLE_ADMIN,10):return"admin";default:return"user"}}},63917(e,t,i){i.d(t,{D:()=>s});var n=i(72176),r=i(50970),o=i(80812);const l=(0,r.T)("div",{shouldForwardProp:e=>-1===["timingFunction","duration","showHeight"].indexOf(e)})`
5    max-height: ${e=>{let{showHeight:t}=e;return t}};
6    overflow: hidden;
7    transition: ${e=>{let{duration:t,timingFunction:i}=e;return t>0&&`max-height ${t}ms ${i}`}};
8`;class s extends n.Component{constructor(){super(...arguments),this.element=(0,n.createRef)()}static updateHeight(e,t){const{isFull:i,maxHeight:n}=e,r=t;if(r){const{scrollHeight:e}=r;let t=e;n&&(t=e>parseInt(n,10)?n:e);let o=null;i&&(o=Number.isNaN(t)?t:`${t}px`),r.style.maxHeight=o}}componentDidMount(){s.updateHeight(this.props,this.element.current)}componentDidUpdate(e){const{isFull:t}=this.props,i=this.element.current;e.isFull!==t&&s.updateHeight(this.props,i)}render(){const{children:e,duration:t,timingFunction:i,className:n,id:r,showHeight:s}=this.props;return(0,o.jsx)(l,{id:r,ref:this.element,duration:t,timingFunction:i,className:n,showHeight:s,children:e})}}s.defaultProps={children:null,className:null,duration:200,id:null,isFull:!1,showHeight:0,timingFunction:"cubic-bezier(0.46, 0.88, 0.7, 0.83)"}},10640(e,t,i){i.d(t,{U:()=>F});var n=i(1272),r=i(82980),o=i(99703),l=i(30976),s=i(71212),d=i(54483),a=i(79709),c=i(4014),h=i(72176),u=i(44628),p=i(7686),x=i(87528),m=i(56248),g=i(69605),v=i(50970),f=i(80812);const b=(0,v.T)("div")``,w=(0,v.T)("div")`
9    width: 100%;
10    display: flex;
11    align-items: center;
12`,j=(0,v.T)("div")`
13    height: 46px;
14    width: 46px;
15    padding: 12px;
16    background-color: ${g.T.orange};
17    border-radius: 4px;
18    margin-right: 16px;
19`,y=(0,v.T)("div")`
20    display: flex;
21    flex-direction: column;
22    align-items: flex-start;
23`,T=(0,v.T)("span")`
24    font-size: 16px;
25    line-height: 26px;
26`,C=(0,v.T)("button")`
27    text-decoration: underline;
28    align-self: flex-start;
29    min-width: 100px;
30    text-align: right;
31
32    ${a.$_.hover} {
33        transition: opacity 200ms ease;
34
35        &:hover {
36            opacity: 0.8;
37        }
38    }
39`,I=(0,v.T)("div")`
40    width: 100%;
41    display: flex;
42    flex-direction: row;
43    flex-wrap: wrap;
44    align-items: center;
45`,H=(0,v.T)("div")`
46    position: relative;
47    width: 100%;
48    background-color: ${g.T.white};
49    margin-bottom: 16px;
50
51    ${a.G1.lg} {
52        &:not(.is-full) {
53            width: 50%;
54            padding-left: 8px;
55        }
56    }
57`,k=(0,v.T)("div")`
58    width: 100%;
59    margin-bottom: 16px;
60
61    ${a.G1.lg} {
62        &:not(.is-full) {
63            padding-right: 8px;
64            width: 50%;
65        }
66    }
67`,$=(0,v.T)("input")`
68    height: 56px;
69    width: 100%;
70    padding: 0 16px;
71    border: 1px solid ${g.T.grey};
72    border-radius: 4px;
73    -webkit-appearance: none;
74
75    ${a.G1.lg} {
76        padding-right: 16px;
77    }
78`,_=(0,v.T)("div")`
79    position: relative;
80    width: 100%;
81`,O=e=>{let{basket:t,customer:i,isCheckoutView:n,t:a}=e;const{basketId:v,customerId:O,companyId:F,isLoading:A}=t,{auth:L,companies:D}=i||{},N=(0,d.n)(),[E,S]=(0,h.useState)({companyId:(v?F:i.companyId)||"",customerId:(v?O:"")||""});if((0,h.useEffect)(()=>{v&&S(e=>({...e,customerId:O,companyId:F}))},[O,F]),!L)return null;const P=[E.companyId&&{value:"",label:a("checkout_auth.login.private")},...D.map(e=>{let{id:t,name:i}=e;return{value:t,label:i}})].filter(e=>e);return(0,f.jsxs)(b,{children:[(0,f.jsxs)(w,{mb:"24px",justifyContent:"space-between",children:[(0,f.jsxs)(w,{children:[(0,f.jsx)(j,{children:(0,f.jsx)(x.n,{color:g.T.white})}),(0,f.jsxs)(y,{children:[(0,f.jsx)(T,{children:i.displayName}),i.displayName!==i.email&&(0,f.jsx)(T,{children:i.email})]})]}),n&&(0,f.jsx)(C,{onClick:async()=>{await(0,s.CI)(),(0,c.zR)(),o.A.logout()},children:a("sign_out")})]}),(N||D.length>0)&&(0,f.jsxs)(I,{children:[N&&(0,f.jsx)(k,{className:D.length&&n?"":"is-full",children:(0,f.jsx)($,{value:E.customerId,placeholder:a("checkout_auth.selectors.choose_customer"),onChange:e=>{const{value:t}=e.target;S(e=>({...e,customerId:t}))}})}),D.length>0&&(0,f.jsx)(H,{className:N&&n?"":"is-full",children:(0,f.jsx)(u.A,{isHover:!0,setMaxHeight:"200px",selected:E.companyId,callback:e=>{N?S(t=>({...t,companyId:e})):(async e=>{if(v)try{await r.w.updateBasketBuyer(v,i.customerId,e)&&S(t=>({...t,selectedCompanyId:e}))}catch(t){S(e=>({...e,buttonText:"error"})),console.error(t)}else o.A.updateCustomer(e),S(t=>({...t,companyId:e}))})(e)},placeholder:a("checkout_auth.login.private"),items:P})}),N&&(0,f.jsx)(_,{children:(0,f.jsx)(p.S,{width:"100%",disabled:A,onClick:async()=>
81{if(v)if(E.customerId||E.companyId){const t=E.customerId||(E.companyId?null===i||void 0===i?void 0:i.id:""),n=E.customerId?"":E.companyId;try{await r.w.updateSecretBasketBuyer(v,t,n)&&S(e=>({...e}))}catch(e){S(e=>({...e,buttonText:"error"})),console.error(e)}}else try{r.w.resetBasketBuyer(v),o.A.updateCustomer(),S(e=>({...e,companyId:""}))}catch(e){console.error(e)}else{const e=E.customerId||(E.companyId?null===i||void 0===i?void 0:i.id:"");o.A.updateCustomer(E.companyId,e)}l._.hide()},children:A?(0,f.jsx)(m.N,{height:"32px"}):a(n?"checkout_auth.selectors.button_update":"checkout_auth.login.continue")})})]})]})};O.defaultProps={isCheckoutView:!1};const F=(0,n.yN)(["basket","customer","overlay"])(O)},44628(e,t,i){i.d(t,{A:()=>k});var n=i(59228),r=i(47665),o=i(87362),l=i(1272),s=i(74050),d=i(72176),a=i(63917),c=i(55634),h=i(69605),u=i(3860),p=i(50970),x=i(89764);const m=e=>{let{value:t,t:i}=e;return"True"===t?i("yes"):"False"===t?i("no"):t};var g=i(80812);const v=["isOpen","isDisabled","hoverColor","isHover","setMaxHeight"],f=(0,p.T)("div")`
82    position: relative;
83    height: 56px;
84    overflow: visible;
85`,b=(0,p.T)("button")`
86    display: flex;
87    text-align: left;
88    padding: 17px 20px;
89    width: 100%;
90    align-items: flex-start;
91`,w=(0,p.T)("div")`
92    pointer-events: none;
93`,j=(0,p.T)(b,{shouldForwardProp:e=>-1===v.indexOf(e)})`
94    border: 1px solid ${h.T.grey};
95    border-width: ${e=>e.isOpen?"1px 1px 0":"1px"};
96    border-radius: ${e=>e.isOpen?"4px 4px 0 0":"4px"};
97    font-weight: 700;
98    transition: border-color 200ms ease-out;
99    ${e=>e.isHover&&`\n        &:hover {\n            border-color: ${e.hoverColor};\n        }\n    `}
100`,y=(0,p.T)("div",{shouldForwardProp:e=>-1===v.indexOf(e)})`
101    ${e=>{let{setMaxHeight:t}=e;return t&&`\n        max-height: ${t};\n        overflow-y: auto;\n    `}};
102
103    position: relative;
104    z-index: 1;
105    background: ${h.T.white};
106    border-style: solid;
107    border-color: #ccc;
108    border-width: 0 1px 1px;
109    border-radius: 0 0 4px 4px;
110`,T=(0,p.T)(b,{shouldForwardProp:e=>-1===v.indexOf(e)})`
111    border-top: 1px solid #ccc;
112
113    cursor: ${e=>e.isDisabled?"default":"pointer"};
114    pointer-events: ${e=>e.isDisabled?"none":"all"};
115
116    &:hover {
117        background-color: ${h.T.lightGrey};
118    }
119`,C=(0,p.T)("div")`
120    white-space: normal;
121    overflow: hidden;
122    display: -webkit-box;
123    -webkit-line-clamp: 2;
124    -webkit-box-orient: vertical;
125    padding-right: 20px;
126`,I=(0,p.T)("div")`
127    display: flex;
128    flex-direction: column;
129    align-items: flex-start;
130    flex: 1;
131`,H=(0,p.T)("div")``,k=e=>{const{items:t,placeholder:i,selected:p,isHover:v,hoverColor:b,duration:k,timingFunction:$,showHeight:_,showImage:O,setMaxHeight:F,mobileFontSize:A,name:L,callback:D,boldItemLabel:N}=e,{t:E}=(0,x.Bd)(),S=(0,d.useRef)(),[P,M]=(0,d.useState)(!1),[z,B]=(0,d.useState)(null);(0,r.j)(S,()=>{M(!1)});(0,d.useEffect)(()=>{p!==z&&B(p||null)},[p]);const R=z&&t.find(e=>e.value===z),G=null===R||void 0===R?void 0:R.image,{locale:q}=(0,l.Gu)("application"),K="sv_SE"!==q?u.PLACEHOLDER_MK_NORTH:u.PLACEHOLDER,U=z?`${L?`${L}: `:""}${m({value:(null===z||void 0===z?void 0:z.label)||(null===z||void 0===z?void 0:z.value)||z,t:E})}`:i;return(0,g.jsxs)(f,{ref:S,children:[(0,g.jsxs)(j,{isHover:v,hoverColor:b,isOpen:P,fontSize:A?["12px",null,"16px"]:["16px"],lineHeight:A?["14px",null,"18px"]:["18px"],onClick:()=>M(!P),children:[O&&z&&(0,g.jsx)(n.h,{src:{url:G?(0,o.Q3)(G,{m:"pad",f:"jpg",w:32,h:32}):K,width:72},placeholder:i,loading:null,objectFit:"contain",height:"auto",maxHeight:"32px",width:"32px",m:"0 12px 0 4px"}),(0,g.jsx)("div",{style:{width:"100%"},children:U}),(0,g.jsx)(w,{right:A?"16px":"24px",children:(0,g.jsx)(c.z,{direction:P?"up":"down",strokeWidth:"1",ml:"16px"})})]}),(0,g.jsx)(a.D,{isFull:P,duration:k,timingFunction:$,showHeight:_,children:(0,g.jsx)(y,{isOpen:P,setMaxHeight:F,children:t.map((e,t)=>(0,g.jsxs)(T,{isDisabled:e.disabled,onClick:()=>((e,t)=>{M(!1),D(e,t),B(e)})(e.value,t),children:[O&&(0,g.jsx)(n.h,{src:{url:null!==e&&void 0!==e&&e.image?(0,o.Q3)(`${e.image}`,{m:"pad",f:"jpg",w:32,h:32}):K,width:72},placeholder:K,objectFit:"contain",height:"auto",maxHeight:"32px",width:"32px",m:"0 12px 0 4px"}),(0,g.jsxs)(I,{children:[(0,g.jsx)(C,{color:e.disabled?h.T.textGrey:"inherit",fontWeight:N?"700":"400",children:m({value:e.label,t:E})}),e.bottom&&(0,g.jsx)(H,{children:e.bottom()})]}),e.after&&(0,g.jsx)(w,{right:A?"16px":"24px",children:e.after()})]},(0,s.K)(e.value)))})})]})};k.defaultProps={boldItemLabel:!1,duration:200,hoverColor:h.T.black,isHover:!1,mobileFontSize:!1,name:null,selected:null,setMaxHeight:"",showHeight:0,showImage:!1,timingFunction:"cubic-bezier(0.46, 0.88, 0.7, 0.83)"}},87528(e,t,i){i.d(t,{n:()=>o});i(72176);var n=i(66170),r=i(80812);const o=e=>{let{color:t,...i}=e;return(0,r.jsx)(n.t,{fill:"none",viewBox:"0 0 22 22",...i,children:(0,r.jsx)("path",{fill:t,d:"M18.142 13.75a10.079 10.079 0 00-3.655-2.322 5.813 5.813 0 002.395-4.695C16.882 3.516 14.243.9 11.001.9 7.759.9 5.12 3.516 5.12 6.733c0 1.923.943 3.632 2.394 4.695A10.078 10.078 0 003.86 13.75l.07.071-.07-.07a9.907 9.907 0 00-2.927 6.29c-.039.495.365.892.85.892.49 0 .873-.399.918-.876.395-4.195 3.967-7.49 8.3-7.49 4.335 0 7.906 3.295 8.302 7.49.045.477.428.876.918.876.485 0 .889-.397.85-.893a9.908 9.908 0 00-2.928-6.29zm-7.141-2.933c-2.272 0-4.119-1.833-4.119-4.084 0-2.25 1.847-4.084 4.119-4.084s4.119 1.833 4.119 4.084c0 2.25-1.847 4.084-4.12 4.084z"})})};o.defaultProps={color:"currentColor",height:"22px",width:"22px"}}}]);
132//# sourceMappingURL=8742.4dd267ee.chunk.js.map

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.