PageSourceSearch

https://octopusenergy.es/_next/static/chunks/1004.63d4c6f032ce9a9e.js

js octopusenergy.es collected 2026-09-26 00:00:40 UTC 4,199 bytes, 1 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="1ab349c0-1549-45fb-9912-8b9cd4834f9e",e._sentryDebugIdIdentifier="sentry-dbid-1ab349c0-1549-45fb-9912-8b9cd4834f9e")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1004],{29761:(e,t,r)=>{r.d(t,{Br:()=>c});var n=r(59109),l=r(59974),o=r(61539),s=r(10140);function a(e){let{startsWith:t,locale:r,...l}=e;return(0,n.j)({queryFn:()=>(0,s.OK)({language:r,optional:!1,startsWith:t}),queryKey:["storyblok","stories",t,r],...l})}function c(e){let{startsWith:t,...r}=e,{locale:n}=(0,o.useRouter)();return(0,l.I)(a({locale:n,startsWith:t,...r}))}c.queryOptions={optionalStories:function(e){let{startsWith:t,locale:r,...l}=e;return(0,n.j)({queryFn:()=>(0,s.OK)({language:r,optional:!0,startsWith:t}),queryKey:["storyblok","stories",t,r],...l})},stories:a}},40622:(e,t,r)=>{r.d(t,{v:()=>h});var n=r(64255),l=r(48210),o=r(16876),s=r(19612),a=r(26438),c=r(41695),i=r(2318),u=r(4361);let d=e=>!function(e){return"object"==typeof e&&null!==e}(e)?"":"string"==typeof e.text?e.text:Array.isArray(e.content)?e.content.map(d).filter(Boolean).join(" "):"",f=e=>{let t=e.getBoundingClientRect();window.scrollTo({behavior:"smooth",top:window.scrollY+t.top-80})},g=(0,r(79736).S)("colors.background.primary.500"),p=e=>{let{text:t,pattern:r}=e;if(!r||r.length<3)return(0,n.jsx)(n.Fragment,{children:t});let l=t.split(RegExp("(".concat(r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),")"),"ig"));return(0,n.jsx)(n.Fragment,{children:l.map((e,t)=>e.toLowerCase()===r.toLowerCase()?(0,n.jsx)("span",{style:{color:g},children:e},"match-".concat(t,"-").concat(e)):(0,n.jsx)("span",{children:e},"text-".concat(t,"-").concat(e)))})},h=()=>{let[e,t]=(0,c.useState)(""),r=(0,c.useRef)(null),{formatMessage:g}=(0,i.A)(),{data:h}=(0,u.dd)({slug:"faqs/faqs-page"}),x=(0,c.useMemo)(()=>{var e;return(null!=(e=null==h?void 0:h.content.faqs)?e:[]).flatMap(e=>{var t,r;let n=null!=(t=e.title)?t:"",l=null!=(r=e.slug)?r:"",o=(e=>Array.isArray(e)?e.map(e=>d((e=>{if("object"==typeof e&&null!==e){if("richText"in e)return e.richText;if("children"in e)return e.children}})(e))).filter(Boolean).join(" ").replace(/\s+/g," ").trim():"")("blocks"in e?e.blocks:void 0);return o?[{slug:l,text:o,title:n}]:[]})},[null==h?void 0:h.content.faqs]),y=(0,c.useMemo)(()=>{let e=new a.vj("title");return e.addIndex("title"),e.addIndex("text"),e.addDocuments(x),e},[x]),j=(0,c.useMemo)(()=>e.length<3?[]:y.search(e),[e,y]);return(0,n.jsxs)(l.BJ,{flexDirection:"column",gap:"lg",children:[(0,n.jsx)("form",{autoComplete:"off",onSubmit:e=>e.preventDefault(),role:"search",children:(0,n.jsx)(o.A,{id:"search-faqs-input",label:g({defaultMessage:"Buscar preguntas frecuentes...",id:"faqs.searchFaqsInputPlaceholder"}),name:"search",onChange:e=>{let n=e.target.value;t(n),3===n.length&&r.current&&f(r.current)},onFocus:()=>{r.current&&f(r.current)},ref:r,type:"text"})}),j.length>0&&(0,n.jsx)(l.BJ,{flexDirection:"column",gap:"lg",children:j.map(t=>(0,n.jsxs)(l.BJ,{flexDirection:"column",gap:"xs",children:[(0,n.jsx)(s.o5,{color:"tertiary500",component:"h3",textAlign:"left",textStyle:"title1",children:(0,n.jsx)(p,{pattern:e,text:t.title})}),(0,n.jsx)(s.o5,{textAlign:"left",children:(0,n.jsx)(p,{pattern:e,text:t.text})})]},t.slug))})]})}},41004:(e,t,r)=>{r.r(t),r.d(t,{default:()=>a});var n=r(64255),l=r(48210),o=r(47819),s=r(40622);let a=()=>(0,n.jsxs)(l.BJ,{flexDirection:"column",gap:"lg",children:[(0,n.jsx)(s.v,{}),(0,n.jsx)(o.H,{})]})},47819:(e,t,r)=>{r.d(t,{H:()=>d});var n=r(64255),l=r(11164),o=r(48210),s=r(62069),a=r(203),c=r(61539),i=r(29761),u=r(57535);let d=()=>{let e=(0,c.useRouter)(),{data:t}=(0,i.Br)({startsWith:"faqs/tagsfromfaqspage"});return(0,n.jsx)(l.m,{children:(0,n.jsxs)(o.BJ,{flexWrap:"wrap",children:[null==t?void 0:t.map(e=>(0,n.jsx)(s.v,{color:"secondary500",href:u.r.HELP_AND_FAQS.category(e.slug),children:e.content.tag},e.slug)),(0,n.jsx)(a.b,{hidden:!e.locale,children:(0,n.jsx)(s.v,{color:"secondary500",href:u.r.HELP_AND_FAQS.ALL_QUESTIONS,children:"Todas las preguntas"})})]})})}}}]);

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.