PageSourceSearch

https://www.santanderconsumer.no/_next/static/chunks/@b2c/product-comparison-grid.6e97308e6ffd31d5.js

js santanderconsumer.no collected 2026-09-25 04:10:26 UTC 11,795 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[855],{1086:(e,t,a)=>{a.d(t,{A:()=>f});var s=a(54568),l=a(7620),r=a(80827),n=a(48442),o=a(52542),c=a(45911),i=a(24127),d=a(48533),u=a(53444),p=a(32528),h=a(18932);let{component:m,element:x}=(0,n.T)("sn-select"),f=(0,l.forwardRef)(function({id:e,name:t,label:a,rightLabel:n,sublabel:f,placeholder:g,help:b,message:j,value:v,options:k,filterPlaceholder:y,disabled:C,valid:w,className:N,selectClassName:A,optionsClassName:S,indicatorClassName:z,buttonAriaLabel:L,onValueChange:E,onKeyChange:D,onChange:T,onOptionTemplate:P,onSelectedTemplate:M,onOptionsExpanded:$,onOptionFilter:R,withOptionsFiltering:G,"data-name":_,readOnly:I,readOnlyNoValueReplacement:K,...V},F){let[O,B]=(0,l.useState)(),[U,Z]=(0,l.useState)(!1),Y=(0,l.useCallback)(e=>{if(e?.key!==O?.key){B(e);let t=e?.value??e?.key;E?.(t,{validate:!0}),D?.(e?.key)}},[D,E,O]);(0,l.useEffect)(()=>{!O||(0,o.$K)(k,O?.key)||Y()},[k]),(0,l.useEffect)(()=>{(O?.value??O?.key)!==v&&Y((0,o.$K)(k,v))},[v]);let q=(0,l.useRef)(null),H=(0,l.useRef)(null),J=(0,l.useMemo)(()=>!!P||!!M,[P,M]),Q=()=>setTimeout(()=>q?.current?.focus(),10),W=()=>setTimeout(()=>H?.current?.focus(),10),X=(0,l.useMemo)(()=>r(x("select",{disabled:C}),A),[A,C]),ee=(0,l.useMemo)(()=>O?M?.(O)??O.text:g,[M,g,O]),et=(0,l.useCallback)(e=>{let t=e??!U;t&&Q(),t!==U&&(Z(t),$?.(t))},[U,$]);if(I){let l=O?.text??"";return(0,s.jsx)(u.A,{id:e??t,value:l,label:a,help:b,noValueReplacement:K})}return(0,s.jsx)(p.A,{label:a,rightLabel:n,sublabel:f,help:b,message:j,valid:w,className:m(N,{placeholder:!O,expanded:U,custom:J}),"data-component":"Select","data-id":t,id:e,name:t,"data-name":_,onBlurOutside:()=>et(!1),disabled:C,children:J?(0,s.jsxs)("button",{"aria-label":L,"aria-expanded":U,className:X,ref:(0,d.P)(H,F),onClick:()=>{C||et()},onKeyDown:e=>{if(!C)switch(e.key||e.type){case c.z.ArrowUp:if(k.length>0)if(U)Q();else{let e=k.findIndex(e=>e.key===O?.key);e>0&&Y(k[e-1])}e.preventDefault();break;case c.z.ArrowDown:if(k.length>0)if(U)Q();else{let e=k.findIndex(e=>e.key===O?.key);e<k.length-1&&Y(k[e+1])}e.preventDefault();break;case c.z.Escape:et(!1),W();break;case c.z.Enter:case c.z.Space:case c.z.Space2:et(),e.preventDefault(),e.stopPropagation()}},tabIndex:C?void 0:0,"data-value":O?.key,children:[ee,(0,s.jsx)(i.A,{className:r(x("indicator"),z)}),U&&k.length>0&&(0,s.jsx)(h.A,{ref:q,className:r(x("options"),S),options:k,filterPlaceholder:y,selectedOptions:O,onSelect:e=>{Y(e),et(!1),W()},onOptionTemplate:P,onFilter:R,withFiltering:G})]}):(0,s.jsxs)("div",{className:x("select-container"),children:[(0,s.jsxs)("select",{...V,id:e??t,name:t,className:X,value:`${O?.key??""}`,disabled:C,ref:F,onChange:e=>{let t=e.target.value;T?.(e),Y((0,o.$K)(k,t))},onKeyDown:e=>{switch(e.key||e.type){case c.z.Escape:et(!1);break;case c.z.Enter:case c.z.Space:case c.z.Space2:et()}},onClick:()=>et(),children:[!O&&(0,s.jsx)("option",{value:"",disabled:!0,hidden:!0,children:g}),(0,o.e2)(k).map(e=>(0,s.jsx)("option",{value:`${e.key}`,className:x("option"),disabled:e.disabled,children:e.text},`${e.key}`))]}),(0,s.jsx)(i.A,{className:x("indicator")})]})})});f.displayName="Select"},5935:(e,t,a)=>{a.d(t,{h:()=>l});var s=a(54568);let l=e=>(0,s.jsx)("svg",{viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",...e,children:(0,s.jsx)("path",{d:"M11.5,25.5a2,2,0,0,1-1.41-.59l-5.5-5.5a2,2,0,0,1,2.83-2.83l4.09,4.09L24.59,7.59a2,2,0,0,1,2.83,2.83l-14.5,14.5A2,2,0,0,1,11.5,25.5Z"})})},18932:(e,t,a)=>{a.d(t,{A:()=>x});var s=a(54568),l=a(7620),r=a(48442),n=a(48533),o=a(45911),c=a(52542),i=a(92237),d=a(43759),u=a(70568),p=a(31888);let{component:h,element:m}=(0,r.T)("sn-select-options"),x=(0,l.forwardRef)(function({name:e,options:t,selectedOptions:a,className:r,onSelect:x,onDeselect:f,onKeyDown:g,onOptionTemplate:b,onFilter:j,withDeselect:v,withFiltering:k,filterPlaceholder:y,externalFilter:C,ariaLabel:w},N){let A=(0,l.useRef)(null),S=(0,l.useRef)(null),z=(0,l.useRef)(null),L=(0,l.useRef)(null),E=(0,l.useRef)(null),[D,T]=(0,l.useState)(void 0),P=()=>setTimeout(()=>S.current?.focus(),10),M=()=>setTimeout(()=>L.current?.focus(),10),$=(0,l.useMemo)(()=>a?Array.isArray(a)?a:[a]:[],[a]),R=e=>{x?.(e),_("")},[G,_]=(0,l.useState)(C??""),I=(0,l.useCallback)(e=>{let t=e.toLowerCase().indexOf(G.toLowerCase()),a=t<0?e:e.substring(0,t),l=t<0?"":e.substring(t,t+G.length),r=t<0?"":e.substring(t+G.length);return(0,s.jsxs)(s.Fragment,{children:[a&&(0,s.jsx)("span",{children:a}),l&&(0,s.jsx)("span",{className:m("highlighted"),children:l}),r&&(0,s.jsx)("span",{children:r})]})},[G]),K=(0,l.useCallback)(e=>b?b?.(e,I):I(e.text),[b,I]),V=(0,l.useMemo)(()=>t.filter(e=>(j??((e,t)=>e.text.toLowerCase().includes(t.toLowerCase())))(e,G)),[t,j,G]);return(0,l.useEffect)(()=>_(C??""),[C]),(0,s.jsxs)("div",{className:h(r),ref:(0,n.P)(A,N),tabIndex:-1,onFocus:e=>{A.current?.contains(e.relatedTarget)||"LI"==e.target.tagName||(E.current?setTimeout(()=>E?.current?.focus(),10):k?M():D?setTimeout(()=>{D?.focus(),setTimeout(()=>{document.activeElement!=D&&P()},10)},10):P())},children:[k&&(0,s.jsxs)(p.A,{children:[(0,s.jsx)("input",{className:m("filter"),onChange:e=>{_(e.target.value)},onKeyDown:e=>
1{switch(e.key||e.type){case o.z.ArrowDown:P(),e.preventDefault(),e.stopPropagation();break;case o.z.Space:case o.z.Space2:case o.z.Enter:e.stopPropagation()}},onClick:e=>{M(),e.preventDefault(),e.stopPropagation()},value:G,placeholder:y,ref:L}),(0,s.jsx)(i.A,{className:m("find")})]}),(0,s.jsx)("ul",{id:e?`${e}-listbox`:void 0,role:"listbox","aria-label":w,onClick:e=>e.stopPropagation(),children:(0,c.e2)(V).map((e,a)=>{let l=!!$?.find(t=>t.key===e.key);return(0,s.jsxs)("li",{role:"option","aria-selected":l,ref:s=>{0===a&&S&&(S.current=s),a===t.length-1&&(z.current=s),l&&E&&!e.disabled&&(E.current=s)},tabIndex:e.disabled?-1:0,onKeyDown:t=>((e,t)=>{let a=e.key||e.type;if([o.z.Shift,o.z.Control].includes(a))return;let s=e.target,l=(e=>{let t=e.nextSibling;for(;null!=t&&t.classList.contains("sn-select-options__option--disabled");)t=t.nextSibling;return t})(s),r=(e=>{let t=e.previousSibling;for(;null!=t&&t.classList.contains("sn-select-options__option--disabled");)t=t.previousSibling;return t})(s),n=document.activeElement;switch(a){case o.z.ArrowDown:case o.z.ArrowRight:l?l.focus():P(),T(n),e.preventDefault(),e.stopPropagation();return;case o.z.Tab:A.current?.contains(e.target)&&T(e.target);return;case o.z.ArrowUp:case o.z.ArrowLeft:r?r.focus():setTimeout(()=>z.current?.focus(),10),T(n),e.preventDefault(),e.stopPropagation();return;case o.z.Enter:case o.z.Space:case o.z.Space2:if(T(n),e.preventDefault(),e.stopPropagation(),t.disabled)return;v&&$?.find(e=>e.key===t.key)?f?.(t):R(t);return;case o.z.Escape:k&&(M(),e.preventDefault(),e.stopPropagation());return}g?.(e)})(t,e),onClick:t=>{t.preventDefault(),t.stopPropagation(),!e.disabled&&(v&&$?.find(t=>t.key===e.key)?(T(void 0),f?.(e)):(T(t.target),R(e)))},className:m("option",{selected:l,disabled:e.disabled}),"data-id":e.key,children:[K(e),!v&&l&&(0,s.jsx)(d.A,{className:m("checkmark")}),v&&!e.disabled&&l&&(0,s.jsx)(u.A,{className:m("cancel")})]},a)})})]})})},53605:(e,t,a)=>{a.d(t,{y:()=>s.A});var s=a(25654)},55896:(e,t,a)=>{a.d(t,{h:()=>l});var s=a(54568);let l=e=>(0,s.jsx)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...e,children:(0,s.jsx)("path",{d:"M17.9950341,5 C18.261451,5 18.5168353,5.10644146 18.7044465,5.29567551 C19.0918492,5.68555103 19.0918492,6.31521458 18.7044465,6.7050901 L13.414,11.998 L18.7044465,17.2906932 C18.8936025,17.4783819 19,17.7338716 19,18.0003985 C19,18.2669253 18.8936025,18.522415 18.7044465,18.7101037 C18.5158839,18.8972125 18.2606171,19.0015194 17.9950341,19 C17.7294511,19.0015194 17.4741844,18.8972125 17.2856218,18.7101037 L11.995,13.417 L6.71437825,18.7001078 C6.52746164,18.8908842 6.27199059,18.9988743 6.00496588,19 C5.73938289,19.0015194 5.48411615,18.8972125 5.29555351,18.7101037 C5.10639754,18.522415 5,18.2669253 5,18.0003985 C5,17.7338716 5.10639754,17.4783819 5.29555351,17.2906932 L10.58,12.003 L5.29555351,6.71508594 C4.90375588,6.32312657 4.90375589,5.68763489 5.29555352,5.29567552 C5.68735115,4.90371616 6.32258061,4.90371615 6.71437825,5.29567551 L12,10.583 L17.2856218,5.29567551 C17.4732329,5.10644146 17.7286173,5 17.9950341,5 Z"})})},58116:(e,t,a)=>{a.r(t),a.d(t,{Component:()=>v,default:()=>k});var s=a(54568),l=a(7620),r=a(16531),n=a(50687),o=a(70260),c=a(5935),i=a(55896),d=a(48442),u=a(53605),p=a(1086),h=a(36626);let{component:m,element:x}=(0,a(59226).A)("sn-product-selector");function f({gridName:e,texts:t,onChange:a}){let r=`productSelector-${e}`,n=(0,l.useMemo)(()=>t?.productGroups?.map(e=>({key:e.title,text:e.title,value:e}))??[],[t]),o=(0,l.useCallback)(e=>{e&&(i(t.productGroups.findIndex(t=>t===e)),u(e),a(e))},[a,t.productGroups]),[c,i]=(0,l.useState)(0),[d,u]=(0,l.useState)(t?.productGroups?.[c]);return(0,s.jsxs)("thead",{className:m(),children:[(0,s.jsxs)("tr",{className:x("product-names"),children:[(0,s.jsx)("th",{scope:"col"}),d?.products?.map(e=>(0,s.jsx)("th",{scope:"col",children:e.title},e.title))]}),(0,s.jsxs)("tr",{className:x("product-subtitles"),children:[(0,s.jsxs)("th",{className:x("product-group-selector"),scope:"col",children:[(0,s.jsx)(p.A,{name:r,label:t.productGroupSelectorLabel,options:n,disabled:n.length<=1,value:d,onValueChange:o,"data-name":"productGroupSelector"}),d?.products?.length>0&&d.products[0].cta&&(0,s.jsx)(h.default,{name:"productCTA[0]",className:x("product-cta"),tag:"a",...d.products[0].cta,outline:d.products[0].cta.outline??!1})]}),d?.products?.map((e,t)=>(0,s.jsxs)("td",{children:[e.subtitle&&(0,s.jsx)("p",{className:x("product-subtitle"),children:e.subt
1itle}),e.cta&&(0,s.jsx)(h.default,{name:`productCTA[${t}]`,className:x("product-cta"),tag:"a",...e.cta,outline:e.cta.outline??!1})]},e.title))]})]})}let{component:g,element:b}=(0,d.T)("sn-product-comparison-grid");function j({name:e,texts:t}){let[a,r]=(0,l.useState)(t.productComparison?.productGroups?.[0]);console.log("NAME",e);let n=e??(0,u.y)(),d=`pcg-heading-${n}`,p=`pcg-desc-${n}`;return(0,s.jsxs)("div",{className:g(),children:[(0,s.jsxs)("div",{className:b("header"),children:[t.heading&&(0,s.jsx)(o.A,{tag:"h2",className:b("header-title"),"data-name":"heading",id:d,children:t.heading}),t.preamble&&(0,s.jsx)(o.A,{tag:"p",className:b("header-subtitle"),"data-name":"preamble",id:p,children:t.preamble})]}),(0,s.jsx)("div",{className:b("container"),"data-name":"productComparison",role:"region","aria-labelledby":t.heading&&d,"aria-describedby":t.preamble&&p,children:(0,s.jsxs)("table",{"data-name":"productGroups",children:[(0,s.jsx)(f,{gridName:n,texts:t.productComparison,onChange:r}),(0,s.jsx)("tbody",{children:a?.properties?.map((e,t)=>(0,s.jsxs)("tr",{children:[(0,s.jsx)("th",{scope:"row",children:e}),a.products?.map(a=>(0,s.jsxs)("td",{children:[(0,s.jsx)("div",{className:b("name"),children:a.title}),(0,s.jsxs)("div",{className:b("value"),children:[a.values[t]?.textValue&&(0,s.jsx)(o.A,{children:a.values[t].textValue}),a.values[t]?.booleanValue!==void 0&&(a.values[t].booleanValue?(0,s.jsx)(c.h,{role:"img",className:b("checkmark"),"aria-label":"Yes"}):(0,s.jsx)(i.h,{role:"img",className:b("cancel"),"aria-label":"No"}))]})]},`${e}-${a.title}`))]},e))})]})})]})}a(67254),a(49505);let v=function({name:e,texts:t,settings:a}){return(0,s.jsx)(r.A,{countryCode:a.countryCode,children:(0,s.jsx)(j,{texts:t,settings:a,name:e})})};function k({onLoad:e,...t}){let[a,r]=(0,l.useState)(!1);return((0,l.useEffect)(()=>e?.("product-comparison"),[]),a)?(0,s.jsx)(l.StrictMode,{children:(0,s.jsx)(n.default,{onEditMode:()=>r(!0),children:(0,s.jsx)(n.PreviewModeContext.Provider,{value:!0,children:(0,s.jsx)(v,{...t})})})}):(0,s.jsx)(l.StrictMode,{children:(0,s.jsx)(n.default,{onEditMode:()=>r(!0),children:(0,s.jsx)(v,{...t})})})}}}]);

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.