PageSourceSearch

https://www.torfaen.gov.uk/_Ypj5jA_f7a71fcd-d2f9-48c7-a805-6e7734d…/modern/js/37529.5b49983fd8b704165e4d.mjs

js torfaen.gov.uk collected 2026-09-24 08:47:43 UTC 44,344 bytes, 1,378 lines download raw bytes

1"use strict";
2(self["__LOADABLE_LOADED_CHUNKS__"] = self["__LOADABLE_LOADED_CHUNKS__"] || []).push([[37529],{
3
4/***/ 37529
5(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
6
7
8// EXPORTS
9__webpack_require__.d(__webpack_exports__, {
10  A: () => (/* binding */ master)
11});
12
13// EXTERNAL MODULE: ./node_modules/react/index.js
14var react = __webpack_require__(96540);
15// EXTERNAL MODULE: ./node_modules/react-redux/dist/react-redux.mjs
16var react_redux = __webpack_require__(45135);
17// EXTERNAL MODULE: ./node_modules/@zengenti/contensis-react-base/esm/routing.js
18var routing = __webpack_require__(16752);
19// EXTERNAL MODULE: ./node_modules/styled-components/dist/styled-components.browser.esm.js + 7 modules
20var styled_components_browser_esm = __webpack_require__(27149);
21// EXTERNAL MODULE: ./src/app/components/container/index.ts + 2 modules
22var container = __webpack_require__(16759);
23// EXTERNAL MODULE: ./src/app/components/svg/iconSVG/index.ts + 4 modules
24var iconSVG = __webpack_require__(26741);
25// EXTERNAL MODULE: ./src/app/components/link/index.ts
26var components_link = __webpack_require__(75147);
27// EXTERNAL MODULE: ./src/app/util/calcRem.ts
28var calcRem = __webpack_require__(2333);
29// EXTERNAL MODULE: ./src/app/util/mq.ts
30var mq = __webpack_require__(66190);
31// EXTERNAL MODULE: ./src/app/styles/theme/colors.ts
32var colors = __webpack_require__(86552);
33;// ./src/app/components/alert/alert.styled.ts
34
35
36
37
38
39
40const AlertStyled = styled_components_browser_esm/* styled */.I4.div.withConfig({
41  displayName: "alertstyled__AlertStyled",
42  componentId: "sc-q17yhe-0"
43})(["", ";"], ({
44  theme,
45  alertType
46}) => {
47  const alertText = alertType === "alert" || alertType === "sympathy" ? colors/* colors */.Tj.white : theme.color.text;
48  const background = alertType === "alert" ? colors/* alert */.xE.alert : alertType === "info" ? colors/* alert */.xE.info : alertType === "warning" ? colors/* alert */.xE.warning : alertType === "sympathy" ? colors/* alert */.xE.sympathy : colors/* colors */.Tj.greyLight;
49  return (0,styled_components_browser_esm/* css */.AH)`
50      background: ${background};
51      position: relative;
52      z-index: 99;
53      color: ${alertText};
54
55      * {
56        ${theme.patterns.focusState({
57    theme,
58    useTextColorForFocus: true
59  })};
60      }
61
62      .container {
63        display: flex;
64        padding-block: ${(0,calcRem/* calcRem */.g)(24)};
65        gap: ${(0,calcRem/* calcRem */.g)(16)};
66        @media ${(0,mq.mq)(theme.breakpoint.m)} {
67          align-items: center;
68          gap: ${(0,calcRem/* calcRem */.g)(40)};
69        }
70      }
71      #alert-title {
72        ${theme.typeStyles.body[3]};
73      }
74      .alert__content {
75        ${theme.typeStyles.body[1]}
76        display: flex;
77        flex-direction: column;
78        gap: ${(0,calcRem/* calcRem */.g)(16)};
79        flex: 1;
80      }
81      a {
82        align-self: start;
83        color: ${alertText};
84        text-decoration: underline;
85        text-underline-offset: 0.25rem;
86        transition: all 0.2s ease-in-out;
87        &:hover,
88        &:focus {
89          color: ${alertText};
90          text-underline-offset: 0.35rem;
91        }
92      }
93      .alert__close {
94        width: ${(0,calcRem/* calcRem */.g)(44)};
95        height: ${(0,calcRem/* calcRem */.g)(44)};
96        border-radius: ${(0,calcRem/* calcRem */.g)(44)};
97        display: grid;
98        place-items: center;
99        border: 0;
100        background: ${alertType === "sympathy" ? "rgba(255, 255, 255, 0.2)" : "rgba(0, 0, 0, 0.1)"};
101        flex: 0 0 auto;
102        .label {
103          ${theme.patterns.visuallyHide};
104        }
105        color: ${alertText};
106      }
107
108      @media print {
109        display: none;
110      }
111    `;
112});
113/* harmony default export */ const alert_styled = (AlertStyled);
114
115// EXTERNAL MODULE: ./src/app/locale/util/useTranslation.hook.ts
116var useTranslation_hook = __webpack_require__(27622);
117;// ./src/app/components/alert/alert.component.tsx
118
119
120
121
122
123
124
125
126const Alert = ({
127  alertType,
128  cta,
129  close,
130  content,
131  title
132}) => {
133  const theme = (0,styled_components_browser_esm/* useTheme */.DP)();
134  const closeButtonLabel = (0,useTranslation_hook/* useTranslation */.B)("buttons", "close");
135  return /* @__PURE__ */ react.createElement(alert_styled, {
136    alertType,
137    className: "alert",
138    role: "alertdialog",
139    "aria-labelledby": "alert-title"
140  }
140, /* @__PURE__ */ react.createElement(container/* default */.A, null, /* @__PURE__ */ react.createElement("div", {
141    className: "alert__content"
142  }, /* @__PURE__ */ react.createElement("p", {
143    id: "alert-title"
144  }, title), content && /* @__PURE__ */ react.createElement("p", {
145    className: "alert__message",
146    id: "alert-desc"
147  }, content), cta && /* @__PURE__ */ react.createElement(styled_components_browser_esm/* ThemeProvider */.NP, {
148    theme: (outer) => ({
149      ...outer,
150      button: ["info", "warning"].includes(alertType) ? theme.buttons.neutralDark : theme.buttons.white
151    })
152  }, /* @__PURE__ */ react.createElement(components_link/* default */.A, {
153    uri: cta.uri,
154    openInNewTab: cta.openInNewTab,
155    className: "alert__cta"
156  }, cta.title))), /* @__PURE__ */ react.createElement("button", {
157    onClick: close,
158    className: "alert__close"
159  }, /* @__PURE__ */ react.createElement("span", {
160    className: "label"
161  }, closeButtonLabel), /* @__PURE__ */ react.createElement(iconSVG/* default */.A, {
162    icon: "Close",
163    svgSize: 16
164  }))));
165};
166/* harmony default export */ const alert_component = (Alert);
167
168// EXTERNAL MODULE: ./src/app/siteConfig/selectors.ts
169var selectors = __webpack_require__(17901);
170// EXTERNAL MODULE: ./src/app/siteConfig/actionTypes.ts
171var actionTypes = __webpack_require__(42840);
172;// ./src/app/components/alert/alert.container.tsx
173
174function _extends() {
175  return _extends = Object.assign ? Object.assign.bind() : function(n) {
176    for (var e = 1; e < arguments.length; e++) {
177      var t = arguments[e];
178      for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
179    }
180    return n;
181  }, _extends.apply(null, arguments);
182}
183
184
185
186const {
187  selectCurrentPath
188} = routing/* selectors */.Tp;
189
190
191
192const AlertContainer = () => {
193  const dispatch = (0,react_redux/* useDispatch */.wA)();
194  const [_isClosed, _setIsClosed] = (0,react.useState)(false);
195  const alert = (0,react_redux/* useSelector */.d4)(selectors/* selectAlert */.pU);
196  const currentPath = (0,react_redux/* useSelector */.d4)(selectCurrentPath);
197  (0,react.useEffect)(() => {
198    _setIsClosed(false);
199  }, [currentPath]);
200  return alert && !_isClosed ? /* @__PURE__ */ react.createElement(alert_component, _extends({}, alert, {
201    close: () => {
202      _setIsClosed(true);
203      dispatch({
204        type: actionTypes/* CLOSE_ALERT */.oe,
205        id: alert.id
206      });
207    }
208  })) : null;
209};
210/* harmony default export */ const alert_container = (AlertContainer);
211
212;// ./src/app/components/alert/index.ts
213
214
215/* harmony default export */ const components_alert = (alert_container);
216
217// EXTERNAL MODULE: ./node_modules/insytful-ai-search-components/dist/insytful-ai-search-components.js
218var insytful_ai_search_components = __webpack_require__(77002);
219// EXTERNAL MODULE: ./src/app/util/hooks/useEscapeKey.ts
220var useEscapeKey = __webpack_require__(87890);
221// EXTERNAL MODULE: ./src/app/util/insytfulDom.ts
222var insytfulDom = __webpack_require__(50742);
223// EXTERNAL MODULE: ./src/app/util/restoreFocus.ts
224var restoreFocus = __webpack_require__(34546);
225// EXTERNAL MODULE: ./src/app/util/hooks/useAiSearchingText.ts
226var useAiSearchingText = __webpack_require__(19425);
227// EXTERNAL MODULE: ./src/app/components/aiAssistant/aiAssistant.styled.ts
228var aiAssistant_styled = __webpack_require__(51144);
229;// ./src/app/components/aiAssistant/aiAssistantProvider.tsx
230
231
232const AiAssistantContext = /* @__PURE__ */ (0,react.createContext)({
233  // eslint-disable-next-line @typescript-eslint/no-empty-function
234  open: () => {
235  }
236});
237const AiAssistantHandleContext = /* @__PURE__ */ (0,react.createContext)(null);
238const AiAssistantProvider = ({
239  children
240}) => {
241  const handleRef = (0,react.useRef)(null);
242  const open = (0,react.useCallback)((term) => handleRef.current?.open(term), []);
243  return /* @__PURE__ */ react.createElement(AiAssistantContext.Provider, {
244    value: {
245      open
246    }
247  }, /* @__PURE__ */ react.createElement(AiAssistantHandleContext.Provider, {
248    value: handleRef
249  }, children));
250};
251const useAiAssistant = () => (0,react.useContext)(AiAssistantContext);
252const useAiAssistantHandleRef = () => (0,react.useContext)(AiAssistantHandleContext);
253
254;
254// ./src/app/components/aiAssistant/aiAssistant.component.tsx
255
256
257
258
259
260
261
262
263
264
265
266const FOCUSABLE = 'a[href], button:not([disabled]), input, select, textarea, [tabindex]:not([tabindex="-1"])';
267const AiAssistant = () => {
268  const handleRef = useAiAssistantHandleRef();
269  const [isOpen, setIsOpen] = (0,react.useState)(false);
270  const previousFocusRef = (0,react.useRef)(null);
271  const pendingTermRef = (0,react.useRef)(void 0);
272  (0,react.useImperativeHandle)(handleRef, () => ({
273    open: (term) => {
274      previousFocusRef.current = document.activeElement;
275      pendingTermRef.current = term;
276      setIsOpen(true);
277    }
278  }), []);
279  const panelRef = (0,react.useRef)(null);
280  const wrapperRef = (0,react.useRef)(null);
281  const triggerRef = (0,react.useRef)(null);
282  const close = (0,react.useCallback)(() => setIsOpen(false), []);
283  const dictionary = (0,useTranslation_hook/* useTranslation */.B)("aiAssistant");
284  const {
285    error,
286    loading,
287    messages
288  } = insytful_ai_search_components/* InsytfulSearch */.dG.useSearchContext("ModalContent");
289  (0,useAiSearchingText/* useAiSearchingText */.z)();
290  const scrollAnchorRef = (0,react.useRef)(null);
291  const isMounted = (0,react.useRef)(false);
292  const [announcement, setAnnouncement] = (0,react.useState)("");
293  const wasLoadingRef = (0,react.useRef)(false);
294  (0,react.useEffect)(() => {
295    if (!isMounted.current) {
296      isMounted.current = true;
297      return;
298    }
299    if (isOpen) {
300      const frameId = requestAnimationFrame(() => {
301        const textarea = panelRef.current?.querySelector(insytfulDom/* INSYTFUL_TEXTAREA_SELECTOR */.Wi);
302        (textarea ?? panelRef.current?.querySelectorAll(FOCUSABLE)[0])?.focus();
303        const term = pendingTermRef.current;
304        if (term && textarea) (0,insytfulDom/* seedInsytfulTextarea */.Yk)(textarea, term);
305        pendingTermRef.current = void 0;
306      });
307      return () => cancelAnimationFrame(frameId);
308    } else {
309      const previous = previousFocusRef.current;
310      previousFocusRef.current = null;
311      (0,restoreFocus/* restoreFocus */.D)(previous, triggerRef.current);
312    }
313  }, [isOpen]);
314  (0,react.useEffect)(() => {
315    if (!isOpen) return;
316    panelRef.current?.querySelector(".insytful-search-message-input-textarea")?.focus();
317  }, [isOpen, loading]);
318  (0,react.useEffect)(() => {
319    if (!isOpen) return;
320    const handleClickOutside = (e) => {
321      if (panelRef.current?.contains(e.target) || wrapperRef.current?.contains(e.target)) return;
322      close();
323    };
324    document.addEventListener("mousedown", handleClickOutside);
325    return () => document.removeEventListener("mousedown", handleClickOutside);
326  }, [close, isOpen]);
327  (0,useEscapeKey/* useEscapeKey */.i)(close, isOpen);
328  (0,react.useEffect)(() => {
329    if (!isOpen) return;
330    const handleKeyDown = (e) => {
331      if (e.key !== "Tab") return;
332      const focusable = Array.from(panelRef.current?.querySelectorAll(FOCUSABLE) ?? []);
333      if (!focusable.length) return;
334      const first = focusable[0];
335      const last = focusable[focusable.length - 1];
336      if (e.shiftKey && document.activeElement === first) {
337        e.preventDefault();
338        last.focus();
339      } else if (!e.shiftKey && document.activeElement === last) {
340        e.preventDefault();
341        first.focus();
342      }
343    };
344    document.addEventListener("keydown", handleKeyDown);
345    return () => document.removeEventListener("keydown", handleKeyDown);
346  }, [isOpen]);
347  (0,react.useEffect)(() => {
348    if (!isOpen) {
349      wasLoadingRef.current = false;
350      return;
351    }
352    const justFinished = wasLoadingRef.current && !loading;
353    wasLoadingRef.current = loading;
354    if (justFinished && messages.length > 0) {
355      const set = setTimeout(() => setAnnouncement(dictionary.responseReceived), 0);
356      const clear = setTimeout(() => setAnnouncement(""), 1e3);
357      return () => {
358        clearTimeout(set);
359        clearTimeout(clear);
360      };
361    }
362  }, [dictionary.responseReceived, isOpen, loading, messages]);
363  (0,react.useEffect)(() => {
364    const reduced = window.matchMedia("(prefers-reduced-motion: reduce)").matches;
365    scrollAnchorRef.current?.scrollIntoView({
366      behavior: reduced ? "auto" : "smooth"
367    });
368  }, [loading, messages]);
369  return /* @__PURE__ */ react.createElement(react.Fragment, null, /* @__P
369URE__ */ react.createElement(aiAssistant_styled/* AiAssistantGlobalStyles */.mk, null), /* @__PURE__ */ react.createElement(aiAssistant_styled/* InsytfulSearchGlobalStyles */.my, null), /* @__PURE__ */ react.createElement(aiAssistant_styled/* default */.Ay, null, /* @__PURE__ */ react.createElement("div", {
370    className: "ai-assistant__wrapper",
371    ref: wrapperRef
372  }, /* @__PURE__ */ react.createElement("button", {
373    "aria-controls": "ask-ai-panel",
374    "aria-expanded": isOpen,
375    "aria-haspopup": "dialog",
376    "aria-label": dictionary.button,
377    className: "ai-assistant__trigger",
378    id: "ask-ai-trigger",
379    onClick: () => {
380      if (!isOpen) previousFocusRef.current = document.activeElement;
381      setIsOpen((prev) => !prev);
382    },
383    ref: triggerRef,
384    type: "button"
385  }, /* @__PURE__ */ react.createElement(iconSVG/* default */.A, {
386    "aria-hidden": "true",
387    icon: "AiSearch"
388  }), /* @__PURE__ */ react.createElement("span", {
389    className: "ai-assistant__trigger-label"
390  }, dictionary.button))), /* @__PURE__ */ react.createElement("div", {
391    "aria-atomic": "true",
392    "aria-live": "polite",
393    className: "ai-assistant__sr-announcer"
394  }, announcement), isOpen && /* @__PURE__ */ react.createElement("div", {
395    "aria-labelledby": "ask-ai-panel-title",
396    "aria-modal": "true",
397    className: "ai-assistant__panel",
398    id: "ask-ai-panel",
399    ref: panelRef,
400    role: "dialog"
401  }, /* @__PURE__ */ react.createElement("div", {
402    className: "ai-assistant__panel-header"
403  }, /* @__PURE__ */ react.createElement("div", {
404    className: "ai-assistant__panel-title"
405  }, /* @__PURE__ */ react.createElement("span", {
406    className: "ai-assistant__panel-title-icon"
407  }, /* @__PURE__ */ react.createElement(iconSVG/* default */.A, {
408    "aria-hidden": "true",
409    icon: "AiSearch",
410    svgSize: 32
411  })), /* @__PURE__ */ react.createElement("span", {
412    id: "ask-ai-panel-title"
413  }
413, dictionary.title)), /* @__PURE__ */ react.createElement("button", {
414    "aria-label": dictionary.close,
415    className: "ai-assistant__close-btn",
416    onClick: close,
417    type: "button"
418  }, /* @__PURE__ */ react.createElement(iconSVG/* default */.A, {
419    "aria-hidden": "true",
420    icon: "Close"
421  }))), /* @__PURE__ */ react.createElement("div", {
422    className: "ai-assistant__panel-content"
423  }, /* @__PURE__ */ react.createElement(insytful_ai_search_components/* InsytfulSearch */.dG.Messages, {
424    searchingText: dictionary.searching
425  }), error && /* @__PURE__ */ react.createElement("div", {
426    className: "ai-assistant__error-callout"
427  }, /* @__PURE__ */ react.createElement(insytful_ai_search_components/* InsytfulSearch */.dG.ErrorCallout, null)), /* @__PURE__ */ react.createElement("div", {
428    ref: scrollAnchorRef
429  })), /* @__PURE__ */ react.createElement("div", {
430    className: "ai-assistant__panel-bottom"
431  }, /* @__PURE__ */ react.createElement(insytful_ai_search_components/* InsytfulSearch */.dG.Input, {
432    placeholder: dictionary.searchPlaceholder
433  }), /* @__PURE__ */ react.createElement("div", {
434    className: "ai-assistant__disclaimer"
435  }, /* @__PURE__ */ react.createElement(insytful_ai_search_components/* InsytfulSearch */.dG.Disclaimer, null, dictionary.disclaimer))))));
436};
437AiAssistant.displayName = "AiAssistant";
438/* harmony default export */ const aiAssistant_component = (AiAssistant);
439
440;// ./src/app/components/aiAssistant/index.ts
441
442
443
444
445// EXTERNAL MODULE: ./src/app/components/aiSearchModal/aiSearchModalContext.tsx
446var aiSearchModalContext = __webpack_require__(71042);
447// EXTERNAL MODULE: ./src/app/components/button/index.ts + 1 modules
448var components_button = __webpack_require__(92494);
449;// ./src/app/components/backToTop/backToTop.styled.ts
450
451
452
453
454
455const BackToTopStyled = styled_components_browser_esm/* styled */.I4.div.withConfig({
456  displayName: "backToTopstyled__BackToTopStyled",
457  componentId: "sc-1iwemxz-0"
458})(["", ""], ({
459  theme
460}) => (0,styled_components_browser_esm/* css */.AH)`
461    transition: opacity 0.3s ease;
462
463    &.back-to-top--hidden {
464      visibility: hidden;
465      opacity: 0;
466      pointer-events: none;
467      user-select: none;
468    }
469
470    .back-to-top__button {
471      display: grid;
472      align-items: center;
473      justify-content: center;
474      width: ${(0,calcRem/* calcRem */.g)(40)};
475      height: ${(0,calcRem/* calcRem */.g)(40)};
476      padding: 0;
477      border: 2px solid ${theme.surfaces.white.color.background};
478      border-radius: 100%;
479      cursor: pointer;
480
481      @media ${(0,mq.mq)(theme.breakpoint.s)} {
482        width: ${(0,calcRem/* calcRem */.g)(56)};
483        height: ${(0,calcRem/* calcRem */.g)(56)};
484      }
485    }
486
487    .back-to-top__label {
488      ${theme.patterns.visuallyHide};
489    }
490
491    @media print {
492      display: none;
493    }
494  `);
495/* harmony default export */ const backToTop_styled = (BackToTopStyled);
496
497// EXTERNAL MODULE: ./src/app/util/isBrowser.ts
498var isBrowser = __webpack_require__(52890);
499;// ./src/app/components/backToTop/useBackToTop.hook.ts
500
501
502
503const useBackToTop = () => {
504  const [_show, _setShow] = (0,react.useState)(false);
505  const timeoutRef = (0,react.useRef)(null);
506  const shouldShow = (0,react.useCallback)(() => {
507    if (!(0,isBrowser/* isBrowser */.B)()) return;
508    if (timeoutRef.current) {
509      clearTimeout(timeoutRef.current);
510    }
511    timeoutRef.current = setTimeout(() => {
512      _setShow(window.pageYOffset > window.innerHeight);
513    }, 200);
514  }, []);
515  const handleScroll = (0,react.useCallback)(() => {
516    if (!(0,isBrowser/* isBrowser */.B)()) return;
517    const prefersReducedMotion = window.matchMedia("(prefers-reduced-motion: reduce)").matches;
518    window.scrollTo({
519      behavior: prefersReducedMotion ? "auto" : "smooth",
520      left: 0,
521      top: 0
522    });
523  }, []);
524  (0,react.useEffect)(() => {
525    if (!(0,isBrowser/* isBrowser */.B)()) return;
526    window.addEventListener("scroll", shouldShow, {
527      passive: true
528    });
529    shouldShow();
530    return () => {
531      window.removeEventListener("scroll", shouldShow);
532      if (timeoutRef.current) {
533        clearTimeout(timeoutRef.current);
534      }
535    };
536  }, [shouldShow]);
537  return {
538    handleScroll,
539    show: _show
540  };
541};
542
543;
543// ./src/app/components/backToTop/backToTop.component.tsx
544
545
546
547
548
549
550
551const BackToTop = () => {
552  const {
553    handleScroll,
554    show
555  } = useBackToTop();
556  const label = (0,useTranslation_hook/* useTranslation */.B)("backToTop");
557  return /* @__PURE__ */ react.createElement(backToTop_styled, {
558    className: show ? void 0 : "back-to-top--hidden"
559  }, /* @__PURE__ */ react.createElement(components_button/* default */.A, {
560    "aria-hidden": !show || void 0,
561    "aria-label": label,
562    className: "back-to-top__button",
563    disabled: !show,
564    onClick: handleScroll,
565    type: "button"
566  }, /* @__PURE__ */ react.createElement(iconSVG/* default */.A, {
567    "aria-hidden": "true",
568    icon: "ChevronUp"
569  }), /* @__PURE__ */ react.createElement("span", {
570    "aria-hidden": "true",
571    className: "back-to-top__label"
572  }, label)));
573};
574/* harmony default export */ const backToTop_component = (BackToTop);
575
576;// ./src/app/components/backToTop/index.ts
577
578
579/* harmony default export */ const backToTop = (backToTop_component);
580
581// EXTERNAL MODULE: ./src/app/components/footer/index.ts + 13 modules
582var footer = __webpack_require__(7588);
583// EXTERNAL MODULE: ./src/app/components/header/index.ts + 17 modules
584var header = __webpack_require__(6340);
585// EXTERNAL MODULE: ./src/app/components/heading/index.ts + 2 modules
586var heading = __webpack_require__(53965);
587// EXTERNAL MODULE: ./src/app/components/searchbar/index.ts + 1 modules
588var searchbar = __webpack_require__(54866);
589// EXTERNAL MODULE: ./src/app/components/searchDisclaimer/index.ts + 2 modules
590var searchDisclaimer = __webpack_require__(79797);
591// EXTERNAL MODULE: ./src/app/components/searchToggle/index.ts + 4 modules
592var searchToggle = __webpack_require__(57394);
593// EXTERNAL MODULE: ./src/app/components/surface/index.ts + 1 modules
594var surface = __webpack_require__(87332);
595// EXTERNAL MODULE: ./src/app/util/hooks/useSearchModeFlags.ts
596var useSearchModeFlags = __webpack_require__(11510);
597// EXTERNAL MODULE: ./node_modules/polished/dist/polished.esm.js + 5 modules
598var polished_esm = __webpack_require__(26683);
599// EXTERNAL MODULE: ./src/app/components/image/util/updateImageCrop.ts
600var updateImageCrop = __webpack_require__(56745);
601;// ./src/app/components/heroes/homeHero/homeHero.styled.ts
602
603
604
605
606
607
608
609const HomeHeroStyled = styled_components_browser_esm/* styled */.I4.div.withConfig({
610  displayName: "homeHerostyled__HomeHeroStyled",
611  componentId: "sc-s5qplc-0"
612})(["", ";"], ({
613  theme,
614  image
615}) => {
616  return (0,styled_components_browser_esm/* css */.AH)`
617      position: relative;
618      background: ${image ? ` #222 url(${image})` : theme.color.background}
619        no-repeat center center;
620      background-size: cover !important;
621
622      @media ${(0,mq.mq)({
623    max: theme.breakpoint.m
624  })} {
625        background: ${image ? ` #222 url(${(0,updateImageCrop/* updateImageCrop */.P)({
626    src: image,
627    width: 767,
628    height: 360
629  })})` : theme.color.background}
630          no-repeat center center;
631      }
632
633      @media ${(0,mq.mq)({
634    min: theme.breakpoint.m,
635    max: theme.breakpoint.l
636  })} {
637        background: ${image ? ` #222 url(${(0,updateImageCrop/* updateImageCrop */.P)({
638    src: image,
639    width: 1024,
640    height: 590
641  })})` : theme.color.background}
642          no-repeat center center;
643      }
644
645      .hero-container {
646        @media ${(0,mq.mq)({
647    max: theme.breakpoint.m
648  })} {
649          padding-inline: 0;
650        }
651      }
652
653      .hero-inner {
654        position: relative;
655        z-index: 2;
656
657        @media ${(0,mq.mq)(theme.breakpoint.m)} {
658          display: grid;
659          grid-template-columns: repeat(12, 1fr);
660          gap: ${(0,calcRem/* calcRem */.g)(44)};
661          padding-block: ${(0,calcRem/* calcRem */.g)(40)} ${(0,calcRem/* calcRem */.g)(80)};
662        }
663      }
664
665      .hero-content {
666        padding-block: ${(0,calcRem/* calcRem */.g)(24)} ${(0,calcRem/* calcRem */.g)(40)};
667
668        @media ${(0,mq.mq)(theme.breakpoint.m)} {
669          grid-column: 1 / 8;
670          padding: 0;
671        }
672
673        .search-toggle {
674          margin-top: ${(0,calcRem/* calcRem */.g)(16)};
675          @media ${(0,mq.mq)(theme.breakpoint.m)} {
676            margin-top: ${(0,calcRem/* calcRem */.g)(40)};
677          }
678        }
679
680        .searchbar {
681          margin-top: ${(0,calcRem/* calcRem */.g)(16)};
682          @media ${(0,mq.mq)(theme.breakpoint.m)} {
683            margin-top: ${(0,calcRem/* calcRem */.g)(40)};
684          }
685          label {
686            ${theme.typeStyles.display[3]};
687            color: ${theme.color.title};
688          }
689          .searchbar__fields {
690            margin-top: ${(0,calcRem/* calcRem */.g)(8)};
691            border-color: ${theme.color.border};
692          }
693        }
694
695        .search-toggle__tabs + .searchbar {
696          margin-top: 0;
697        }
698
699        .searchbar__label {
700          ${theme.typeStyles.display[3]};
701          color: ${theme.color.title};
702        }
703
704        .search-toggle__tabs {
705          background: ${(0,polished_esm/* rgba */.B3)(theme.color.text, 0.15)};
706        }
707
708        .search-toggle__pill {
709          background: ${theme.color.text};
710        }
711
712        .search-toggle__tab {
713          color: ${theme.color.text};
714
715          &[aria-pressed='true'] {
716            color: ${theme.color.background};
717          }
718        }
719
720        .search-toggle__disclaimer {
721          color: ${theme.color.text};
722        }
723      }
724
725      .hero-content__subtitle {
726        ${theme.typeStyles.display[5]};
727        color: ${theme.color.title};
728        opacity: 0.8;
729        margin-top: ${(0,calcRem/* calcRem */.g)(12)};
730      }
731
732      .tasks-wrap {
733        grid-column: 9 / span 3;
734        padding: 0;
735        margin-top: auto;
736        @media ${(0,mq.mq)({
737    max: theme.breakpoint.m
738  })} {
739          display: none;
740        }
741      }
742
743      .tasks__list {
744        list-style: none;
745        display: grid;
746        margin-top: ${(0,calcRem/* calcRem */.g)(20)};
747      }
748      .tasks__item {
749        /* display: inline-block; */
750      }
751      .tasks__item + .tasks__item {
752        margin-top: ${(0,calcRem/* calcRem */.g)(16)};
753      }
754      .tasks__link {
755        ${theme.typeStyles.body[2]};
756        ${theme.patterns.link({
757    theme
758  })};
759        display: flex;
760        gap: ${(0,calcRem/* calcRem */.g)(4)};
761        .svg {
762          margin-top: 0.25rem;
763        }
764      }
765
766      @media print {
767        padding: 0;
768        background: transparent;
769        .hero-content {
770          padding: 0;
771        }
772        .hero-content__subtitle {
773          margin-top: 0;
774        }
775      }
776
777      ${image && (0,styled_components_browser_esm/* css */.AH)`
778        .hero__image-overlay--has-image {
779          background: linear-gradient(
780              180deg,
781              ${(0,polished_esm/* rgba */.B3)(theme.surfaces.overlay.color.background, 0.55)} 0%,
782              ${(0,polished_esm/* rgba */.B3)(theme.surfaces.overlay.color.background, 0)} 23.93%
783            ),
784            linear-gradient(
785              0deg,
786              ${(0,polished_esm/* rgba */.B3)(theme.surfaces.overlay.color.background, 0.6)} 0%,
787              ${(0,polished_esm/* rgba */.B3)(theme.surfaces.overlay.color.background, 0.6)} 100%
788            );
789          @media print {
790            background: transparent;
791          }
792        }
793      `}
794    `;
795});
796/* harmony default export */ const homeHero_styled = (HomeHeroStyled);
797
798;// ./src/app/components/heroes/homeHero/homeHero.component.tsx
799
800
801
802
803
804
805
806
807
808
809
810
811
812const HomeHero = ({
813  children,
814  image,
815  searchbarLabel,
816  subtitle,
817  tasks,
818  title
819}) => {
820  const {
821    isAiOnly,
822    isElasticAIToggle
823  } = (0,useSearchModeFlags/* useSearchModeFlags */.a)();
824  const {
825    disclaimer
826  } = (0,useTranslation_hook/* useTranslation */.B)("aiAssistant");
827  return /* @__PURE__ */ react.createElement(surface/* default */.A, {
828    surface: image ? "overlay" : "surface01"
829  }, /* @__PURE__ */ react.createElement(homeHero_styled, {
830    image: image?.src
831  }, /* @__PURE__ */ react.createElement("div", {
832    className: image ? "hero__image-overlay hero__image-overlay--has-image" : "hero__image-overlay hero__image-overlay--no-image"
833  }, children, /* @__PURE__ */ react.createElement(container/* default */.A, {
834    className: "hero-container"
835  }, /* @__PURE__ */ react.createElement("div", {
836    className: "hero-inner"
837  }, /* @__PURE__ */ react.createElement(container/* default */.A, {
838    className: "hero-content"
839  }, /* @__PURE__ */ react.createElement(heading/* default */.A, {
840    headingLevel: "h1",
841    size: 6,
842    title,
843    id: "page-content"
844  }), subtitle && /* @__PURE__ */ react.createElement("div", {
845    className: "hero-content__subtitle"
846  }
846, subtitle), isElasticAIToggle ? /* @__PURE__ */ react.createElement(searchToggle/* default */.A, {
847    label: searchbarLabel
848  }) : /* @__PURE__ */ react.createElement(react.Fragment, null, /* @__PURE__ */ react.createElement(surface/* default */.A, {
849    surface: "white"
850  }, /* @__PURE__ */ react.createElement(searchbar/* default */.A, {
851    id: "hero__searchbar",
852    label: searchbarLabel
853  })), isAiOnly && /* @__PURE__ */ react.createElement(searchDisclaimer/* default */.A, null, disclaimer))), tasks && tasks.items.length > 0 && /* @__PURE__ */ react.createElement(container/* default */.A, {
854    className: "tasks-wrap"
855  }, /* @__PURE__ */ react.createElement("div", {
856    className: "tasks"
857  }, /* @__PURE__ */ react.createElement(heading/* default */.A, {
858    headingLevel: "h2",
859    size: 1,
860    title: tasks.title
861  }), /* @__PURE__ */ react.createElement("ul", {
862    className: "tasks__list"
863  }, tasks.items.map((item) => /* @__PURE__ */ react.createElement("li", {
864    className: "tasks__item",
865    key: item.id
866  }, /* @__PURE__ */ react.createElement(components_link/* default */.A, {
867    className: "tasks__link",
868    openInNewTab: item.openInNewTab,
869    uri: item.uri
870  }, item.title, " ", /* @__PURE__ */ react.createElement(iconSVG/* default */.A, {
871    icon: "ChevronRight",
872    svgSize: 16
873  }))))))))))));
874};
875/* harmony default export */ const homeHero_component = (HomeHero);
876
877;// ./src/app/components/heroes/homeHero/index.ts
878
879
880/* harmony default export */ const homeHero = (homeHero_component);
881
882// EXTERNAL MODULE: ./node_modules/@zengenti/contensis-react-base/esm/util.js + 1 modules
883var util = __webpack_require__(73580);
884;// ./src/app/components/meta/meta.component.tsx
885
886
887
888
889const Meta = ({
890  author,
891  authorTwitterHandle,
892  canonicalPath,
893  currentPath,
894  description,
895  entryId,
896  firstName,
897  lastName,
898  locale = "en_GB",
899  localeAlternates = [],
900  noIndex,
901  ogDescription,
902  ogImage,
903  ogImageAlt,
904  ogType = "website",
905  projectId,
906  publishedDateTime,
907  siteName,
908  siteTitle,
909  title,
910  twitterCardType = "summary",
911  websiteTwitterHandle
912}) => {
913  const projectUrl = (0,isBrowser/* isBrowser */.B)() ? window.location.origin : "/";
914  return /* @__PURE__ */ react.createElement(util.Helmet, null, /* @__PURE__ */ react.createElement("title", null, `${title}${siteTitle ? ` - ${siteTitle}` : ""}`), /* @__PURE__ */ react.createElement("meta", {
915    content: description,
916    name: "description"
917  }), currentPath !== canonicalPath && /* @__PURE__ */ react.createElement("link", {
918    href: `${projectUrl}${canonicalPath}`,
919    rel: "canonical"
920  }), /* @__PURE__ */ react.createElement("meta", {
921    content: siteName,
922    property: "og:site_name"
923  }), noIndex && /* @__PURE__ */ react.createElement("meta", {
924    name: "robots",
925    content: "noindex, nofollow"
926  }), /* @__PURE__ */ react.createElement("meta", {
927    content: `${projectUrl}${canonicalPath}`,
928    property: "og:url"
929  }), /* @__PURE__ */ react.createElement("meta", {
930    content: title,
931    property: "og:title"
932  }), /* @__PURE__ */ react.createElement("meta", {
933    content: ogDescription || description,
934    property: "og:description"
935  }), /* @__PURE__ */ react.createElement("meta", {
936    content: `${projectUrl}${ogImage}`,
937    property: "og:image"
938  }), /* @__PURE__ */ react.createElement("meta", {
939    content: ogImageAlt || siteName,
940    property: "og:image:alt"
941  }), /* @__PURE__ */ react.createElement("meta", {
942    content: "1200",
943    property: "og:image:width"
944  }), /* @__PURE__ */ react.createElement("meta", {
945    content: "630",
946    property: "og:image:height"
947  }), /* @__PURE__ */ react.createElement("meta", {
948    content: ogType,
949    property: "og:type"
950  }), /* @__PURE__ */ react.createElement("meta", {
951    content: locale,
952    property: "og:locale"
953  }), localeAlternates.map((alternate) => /* @__PURE__ */ react.createElement("meta", {
954    key: alternate,
955    content: alternate,
956    property: "og:locale:alternate"
957  })), ogType === "article" && publishedDateTime && /* @__PURE__ */ react.createElement("meta", {
958    content: publishedDateTime,
959    property: "article:published_time"
960  }), ogType === "article" && author && /* @__PURE__ */ react.createElement("meta", {
961    content: author,
962    property: "article:author"
963  }), ogType === "profile" && firstName && lastName && /* @__PURE__ */ react.createElement("meta", {
964    content: firstName,
965    property: "profile:first_name"
966  }), ogType === "profile" && firstName && lastName && /* @__PURE__ */ react.createElement("meta", {
967    content: lastName,
968    property: "profile:last_name"
969  }), /* @__PURE__ */ react.createElement("meta", {
970    content: twitterCardType,
971    name: "twitter:card"
972  }), websiteTwitterHandle && /* @__PURE__ */ react.createElement("meta", {
973    content: websiteTwitterHandle,
974    name: "twitter:site"
975  }), authorTwitterHandle && /* @__PURE__ */ react.createElement("meta", {
976    content: authorTwitterHandle,
977    name: "twitter:creator"
978  }), /* @__PURE__ */ react.createElement("meta", {
979    name: "IDL:ProjectId",
980    content: projectId
981  }), /* @__PURE__ */ react.createElement("meta", {
982    name: "IDL:EntryId",
983    content: entryId
984  }));
985};
986/* harmony default export */ const meta_component = (Meta);
987
988;// ./src/app/components/meta/index.ts
989
990
991/* harmony default export */ const components_meta = (meta_component);
992
993// EXTERNAL MODULE: ./src/app/components/skipToContent/index.ts + 2 modules
994var skipToContent = __webpack_require__(11643);
995;// ./src/app/components/utilityBar/components/languageSwitcher/languageSwitcher.styled.ts
996
997
998
999
1000const LanguageSwitcherStyled = styled_components_browser_esm/* styled */.I4.div.withConfig({
1001  displayName: "languageSwitcherstyled__LanguageSwitcherStyled",
1002  componentId: "sc-17b4suq-0"
1003})(["", ";"], ({
1004  theme
1005}) => {
1006  const hex = theme.color.text === "initial" ? "#fff" : theme.color.text;
1007  return (0,styled_components_browser_esm/* css */.AH)`
1008      ul {
1009        border: 1px solid ${(0,polished_esm/* opacify */.mI)(-0.9, hex)};
1010        border-radius: 2px;
1011        line-height: 0;
1012      }
1013
1014      button:disabled {
1015        background: ${(0,polished_esm/* opacify */.mI)(-0.9, hex)};
1016
1017        &:hover {
1018          text-decoration: none;
1019        }
1020      }
1021    `;
1022});
1023/* harmony default export */ const languageSwitcher_styled = (LanguageSwitcherStyled);
1024
1025;// ./src/app/components/utilityBar/components/languageSwitcher/languageSwitcher.component.tsx
1026
1027
1028
1029
1030const LanguageSwitcher = ({
1031  currentLanguage,
1032  languages,
1033  setLanguage
1034}) => {
1035  const {
1036    ariaLabel
1037  } = (0,useTranslation_hook/* useTranslation */.B)("languageSwitcher");
1038  return /* @__PURE__ */ react.createElement(languageSwitcher_styled, {
1039    className: "language-switcher",
1040    "aria-label": ariaLabel
1041  }
1041, /* @__PURE__ */ react.createElement("ul", null, languages.map((lang) => /* @__PURE__ */ react.createElement("li", {
1042    key: lang.language
1043  }, /* @__PURE__ */ react.createElement("button", {
1044    onClick: () => setLanguage(lang.language),
1045    disabled: currentLanguage === lang.language
1046  }, lang.title)))));
1047};
1048/* harmony default export */ const languageSwitcher_component = (LanguageSwitcher);
1049
1050;// ./src/app/components/utilityBar/components/languageSwitcher/index.ts
1051
1052
1053/* harmony default export */ const languageSwitcher = (languageSwitcher_component);
1054
1055;// ./src/app/components/utilityBar/utilityBar.styled.ts
1056
1057
1058
1059
1060
1061const UtilityBarStyled = styled_components_browser_esm/* styled */.I4.div.withConfig({
1062  displayName: "utilityBarstyled__UtilityBarStyled",
1063  componentId: "sc-o6zdih-0"
1064})(["", ";"], ({
1065  theme
1066}) => {
1067  return (0,styled_components_browser_esm/* css */.AH)`
1068      background: ${theme.color.background};
1069      position: relative;
1070      padding: ${(0,calcRem/* calcRem */.g)(8)} 0;
1071
1072      *:focus-visible {
1073        ${theme.patterns.focusState({
1074    theme,
1075    useTextColorForFocus: true,
1076    focusPosition: "inside"
1077  })};
1078      }
1079
1080      #services-heading {
1081        ${theme.patterns.visuallyHide};
1082      }
1083      a {
1084        ${theme.typeStyles.body[0]};
1085        ${theme.patterns.link};
1086        &:hover,
1087        &:focus {
1088          text-decoration: underline;
1089          text-underline-offset: 0.25rem;
1090        }
1091      }
1092      ul {
1093        list-style: none;
1094        margin: 0;
1095        padding: 0;
1096        display: flex;
1097
1098        flex-wrap: wrap;
1099        li {
1100          height: 100%;
1101          a {
1102            display: flex;
1103            white-space: nowrap;
1104            height: 100%;
1105            align-items: center;
1106            padding: ${(0,calcRem/* calcRem */.g)(8)} 0;
1107            &.services__link {
1108              padding: ${(0,calcRem/* calcRem */.g)(8)};
1109            }
1110          }
1111        }
1112      }
1113
1114      .utilities {
1115        display: flex;
1116        flex-flow: row wrap-reverse;
1117        justify-content: space-between;
1118        align-items: center;
1119      }
1120
1121      .language-switcher {
1122        display: flex;
1123        align-items: center;
1124        position: relative;
1125        padding-block: ${(0,calcRem/* calcRem */.g)(16)};
1126      }
1127
1128      button {
1129        ${theme.patterns.link};
1130        verflow-wrap: inherit;
1131        word-break: inherit;
1132        hyphens: inherit;
1133        padding: ${(0,calcRem/* calcRem */.g)(8)} ${(0,calcRem/* calcRem */.g)(16)};
1134        background: transparent;
1135        border: 0;
1136        &:hover,
1137        &:focus {
1138          text-decoration: underline;
1139          text-underline-offset: 0.25rem;
1140        }
1141      }
1142
1143      @media ${(0,mq.mq)(theme.breakpoint.l)} {
1144        padding: 0;
1145        .utility-container {
1146          display: flex;
1147          justify-content: flex-end;
1148        }
1149        .utilities {
1150          justify-content: flex-end;
1151        }
1152        ul {
1153          li {
1154            a {
1155              padding: ${(0,calcRem/* calcRem */.g)(16)};
1156              &.services__link {
1157                padding: ${(0,calcRem/* calcRem */.g)(16)};
1158              }
1159            }
1160          }
1161        }
1162      }
1163
1164      @media print {
1165        display: none;
1166      }
1167    `;
1168});
1169/* harmony default export */ const utilityBar_styled = (UtilityBarStyled);
1170
1171;// ./src/app/components/utilityBar/utilityBar.component.tsx
1172
1173
1174
1175
1176
1177
1178
1179
1180const UtilityBar = ({
1181  currentLanguage,
1182  languages,
1183  serviceLinks,
1184  setLanguage
1185}) => {
1186  const {
1187    servicesAriaLabel
1188  } = (0,useTranslation_hook/* useTranslation */.B)("nav");
1189  return languages.length > 1 || serviceLinks.length > 0 ? /* @__PURE__ */ react.createElement(surface/* default */.A, {
1190    surface: "surface02"
1191  }, /* @__PURE__ */ react.createElement(utilityBar_styled, null, /* @__PURE__ */ react.createElement(container/* default */.A, {
1192    className: "utility-container"
1193  }, /* @__PURE__ */ react.createElement("div", {
1194    className: "utilities"
1195  }, languages.length > 1 && /* @__PURE__ */ react.createElement(languageSwitcher, {
1196    currentLanguage,
1197    languages,
1198    setLanguage
1199  }), serviceLinks.length >
1199 0 && /* @__PURE__ */ react.createElement("nav", {
1200    className: "services__nav",
1201    "aria-label": servicesAriaLabel
1202  }, /* @__PURE__ */ react.createElement("ul", {
1203    className: "utility__list services__list"
1204  }, serviceLinks.map((link) => /* @__PURE__ */ react.createElement("li", {
1205    className: "services__item",
1206    key: link.id
1207  }, /* @__PURE__ */ react.createElement(components_link/* default */.A, {
1208    className: "services__link",
1209    openInNewTab: link.openInNewTab,
1210    uri: link.uri
1211  }, link.title))))))))) : null;
1212};
1213/* harmony default export */ const utilityBar_component = (UtilityBar);
1214
1215// EXTERNAL MODULE: ./src/app/locale/selectors.ts + 2 modules
1216var locale_selectors = __webpack_require__(42049);
1217// EXTERNAL MODULE: ./src/app/locale/actionTypes.ts
1218var locale_actionTypes = __webpack_require__(36819);
1219;// ./src/app/locale/util/useLanguageSwitcher.ts
1220
1221
1222
1223
1224const useLanguageSwitcher = () => {
1225  const dispatch = (0,react_redux/* useDispatch */.wA)();
1226  const currentLanguage = (0,react_redux/* useSelector */.d4)(locale_selectors/* selectCurrentLanguage */.Y1);
1227  const primaryLanguage = (0,react_redux/* useSelector */.d4)(locale_selectors/* selectPrimaryLanguage */.VH);
1228  const locales = (0,react_redux/* useSelector */.d4)(locale_selectors/* selectLocales */.S);
1229  const languages = [...locales.filter((locale) => locale.language === primaryLanguage), ...locales.filter((locale) => locale.language !== primaryLanguage)];
1230  const setCurrentLanguage = (language) => dispatch({
1231    type: locale_actionTypes/* SET_LANGUAGE */.M2,
1232    currentLanguage,
1233    language
1234  });
1235  return {
1236    currentLanguage,
1237    languages,
1238    setCurrentLanguage
1239  };
1240};
1241
1242;// ./src/app/components/utilityBar/utilityBar.container.tsx
1243
1244
1245
1246
1247
1248
1249const UtilityBarContainer = () => {
1250  const serviceLinks = (0,react_redux/* useSelector */.d4)(selectors/* selectServiceLinks */.Jo);
1251  const {
1252    currentLanguage,
1253    languages,
1254    setCurrentLanguage
1255  } = useLanguageSwitcher();
1256  return [languages, serviceLinks].some((x) => x.length > 0) ? /* @__PURE__ */ react.createElement(utilityBar_component, {
1257    currentLanguage,
1258    languages,
1259    serviceLinks,
1260    setLanguage: setCurrentLanguage
1261  }) : null;
1262};
1263/* harmony default export */ const utilityBar_container = (UtilityBarContainer);
1264
1265;// ./src/app/components/utilityBar/index.ts
1266
1267
1268/* harmony default export */ const utilityBar = (utilityBar_container);
1269
1270;// ./src/app/components/widgetDock/widgetDock.styled.ts
1271
1272
1273
1274const WidgetDockStyled = styled_components_browser_esm/* styled */.I4.div.withConfig({
1275  displayName: "widgetDockstyled__WidgetDockStyled",
1276  componentId: "sc-1aqa53n-0"
1277})(["position:fixed;right:0;bottom:0;left:0;z-index:1000;display:flex;align-items:flex-end;justify-content:flex-end;padding:0 ", " ", ";pointer-events:none;.widget-dock__group{display:flex;align-items:flex-end;gap:", ";pointer-events:auto;}@media print{display:none;}"], (0,calcRem/* calcRem */.g)(16), (0,calcRem/* calcRem */.g)(16), (0,calcRem/* calcRem */.g)(8));
1278/* harmony default export */ const widgetDock_styled = (WidgetDockStyled);
1279
1280;// ./src/app/components/widgetDock/widgetDock.component.tsx
1281
1282
1283
1284const WidgetDock = ({
1285  items
1286}) => /* @__PURE__ */ react.createElement(widgetDock_styled, null, /* @__PURE__ */ react.createElement("div", {
1287  className: "widget-dock__group"
1288}, items.map((item, i) => /* @__PURE__ */ react.createElement(react.Fragment, {
1289  key: i
1290}, item))));
1291/* harmony default export */ const widgetDock_component = (WidgetDock);
1292
1293;// ./src/app/components/widgetDock/index.ts
1294
1295
1296/* harmony default export */ const widgetDock = (widgetDock_component);
1297
1298;// ./src/app/templates/layout/master/master.template.tsx
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313const MasterContent = ({
1314  children,
1315  className,
1316  hero,
1317  isHybrid,
1318  isAiOnly,
1319  isElasticAIToggle
1320}) => {
1321  const {
1322    open: openFloatingPanel
1323  } = useAiAssistant();
1324  const {
1325    openModal
1326  } = (0,aiSearchModalContext/* useAiSearchModal */.v)();
1327  const onOpenAiAssistant = isHybrid ? openFloatingPanel : isAiOnly || isElasticAIToggle ? openModal : void 0;
1328  return /* @__PURE__ */ react.createElement(react.Fragment, null, /* @__P
1328URE__ */ react.createElement(skipToContent/* default */.A, {
1329    onOpenAiAssistant
1330  }), /* @__PURE__ */ react.createElement("div", {
1331    id: "page-chrome-offset"
1332  }, /* @__PURE__ */ react.createElement(utilityBar, null), /* @__PURE__ */ react.createElement(components_alert, null)), hero ? /* @__PURE__ */ react.createElement(homeHero, hero, /* @__PURE__ */ react.createElement(header/* default */.A, {
1333    surface: hero.image ? "overlay" : "surface01",
1334    transparent: true
1335  })) : /* @__PURE__ */ react.createElement(header/* default */.A, {
1336    surface: "surface01"
1337  }), /* @__PURE__ */ react.createElement("main", {
1338    className,
1339    id: "main"
1340  }, children), /* @__PURE__ */ react.createElement(footer/* default */.A, null), /* @__PURE__ */ react.createElement(widgetDock, {
1341    items: [...isHybrid ? [/* @__PURE__ */ react.createElement(aiAssistant_component, {
1342      key: "ai"
1343    })] : [], /* @__PURE__ */ react.createElement(backToTop, {
1344      key: "bttp"
1345    })]
1346  }));
1347};
1348const Master = ({
1349  children,
1350  className,
1351  hero,
1352  meta
1353}) => {
1354  const {
1355    isHybrid,
1356    isAiOnly,
1357    isElasticAIToggle
1358  } = (0,useSearchModeFlags/* useSearchModeFlags */.a)();
1359  const content = /* @__PURE__ */ react.createElement(MasterContent, {
1360    className,
1361    hero,
1362    isHybrid,
1363    isAiOnly,
1364    isElasticAIToggle
1365  }, children);
1366  return /* @__PURE__ */ react.createElement(react.Fragment, null, /* @__PURE__ */ react.createElement(components_meta, meta), isHybrid ? /* @__PURE__ */ react.createElement(AiAssistantProvider, null, content) : content);
1367};
1368/* harmony default export */ const master_template = (Master);
1369
1370;// ./src/app/templates/layout/master/index.ts
1371
1372
1373/* harmony default export */ const master = (master_template);
1374
1375
1376/***/ }
1377
1378}]);

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.