PageSourceSearch

https://www.spark.co.nz/etc.clientlibs/spark-spa/clientlibs/client…/resources/static/js/943.a3938671.chunk.js

js spark.co.nz collected 2026-09-24 08:51:26 UTC 2,670 bytes, 4 lines download raw bytes

1"use strict";(globalThis.webpackChunkspark_spa=globalThis.webpackChunkspark_spa||[]).push([[943],{34943:(e,r,t)=>{t.r(r),t.d(r,{default:()=>x});var n=t(9950),s=t(1603),i=t(70032),o=t(47473),a=t(68813);const l=e=>{const[r,t]=(0,n.useState)((()=>!!document.querySelector(e)));return(0,n.useEffect)((()=>{const n=document.body,s=new MutationObserver((()=>{const n=!!document.querySelector(e);r!==n&&t(n)}));return s.observe(n,{childList:!0,subtree:!0}),()=>s.disconnect()}),[e,r]),r};var d=t(89580),u=t(52599),c=t(41920);const v=({key:e,baseUrl:r,variation:t})=>{var n,s;const i=function(e,r){const t=new URL(e);return Boolean(r)&&t.searchParams.append("variation",r),t.toString()}(`${r}/${function(e){return e.includes("/")?e.split("/").pop():e}(e)}/html`,t),{data:o,refetch:a,isError:l,isLoading:d,isFetching:u}=(0,c.useQuery)(["content",e],(()=>fetch(i).then((e=>e.json()))),{retry:!1,useErrorBoundary:!1});return{content:null===o||void 0===o||null===(n=o.data.infoModalList)||void 0===n||null===(s=n.items)||void 0===s?void 0:s[0],refetch:a,isError:l,isLoading:d,isFetching:u}};var h=t(44414);const m=s.default.div`
2  border: 1px solid black;
3  padding: 24px;
4`,b=({value:e,baseUrl:r,variation:t,buttonText:n,message:s})=>{const{content:o,isError:a,refetch:l}=v({key:e,baseUrl:r,variation:t});return!o||a?(0,h.jsx)(p,{message:s,buttonText:n,value:e,baseUrl:r,variation:t,refetch:l}):(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(i.Yvl,{children:null===o||void 0===o?void 0:o.title}),(0,h.jsx)(i.qkA,{variant:"bodySMedium",html:(null===o||void 0===o?void 0:o.content.html)||""})]})},p=({message:e,buttonText:r,refetch:t})=>(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(i.EYj,{variant:"bodySMedium",mb:"s4",children:e}),r?(0,h.jsx)(i.$nd,{variant:"default",onClick:()=>{t()},children:r}):null]}),x=({errorText:e,modelId:r,isInEditor:t,persistedQueryName:s,retryButtonText:c,triggerKey:v,configuration:p,variation:x})=>{const{query:y,replaceQuery:g}=(0,d.A)(),f=null===y||void 0===y?void 0:y[v],j=l(`#${a.k}`),k=Boolean(f),{headlessCmsUrl:T}=(0,u.r)(),U=(({headlessCmsUrl:e,modelId:r,persistedQueryName:t,configuration:n})=>`${e}/${n}/${t}/models/${r}`)({headlessCmsUrl:T,configuration:p,modelId:r,persistedQueryName:s});return t?(0,h.jsx)(m,{children:(0,h.jsxs)(i.EYj,{variant:"bodyMDemi",children:["Information Layer with props"," ",JSON.stringify({errorText:e,modelId:r,persistedQueryName:s,retryButtonText:c,triggerKey:v,variation:x,isNested:j})]})}):(0,h.jsx)(i.wcB,{isOpen:k,isNested:j,onClose:function(){g({...y,[v]:null})},children:f&&(0,h.jsx)(n.Suspense,{fallback:(0,h.jsx)(o.A,{}),children:(0,h.jsx)(b,{value:f,baseUrl:U,variation:x,buttonText:c,message:e})})})}}}]);

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.