rumine-web/static/wagtailadmin/js/sidebar.67267021a949.js

2 lines
45 KiB
JavaScript

/*! For license information please see sidebar.js.LICENSE.txt */
(()=>{"use strict";var e,t={2975:(e,t,n)=>{n(7647),n(6526)},3665:(e,t,n)=>{var a=n(7647),r=n.n(a),i=n(3416),s=n.n(i);function o(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)e[a]=n[a]}return e}var l=function e(t,n){function a(e,a,r){if("undefined"!=typeof document){"number"==typeof(r=o({},n,r)).expires&&(r.expires=new Date(Date.now()+864e5*r.expires)),r.expires&&(r.expires=r.expires.toUTCString()),e=encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var i="";for(var s in r)r[s]&&(i+="; "+s,!0!==r[s]&&(i+="="+r[s].split(";")[0]));return document.cookie=e+"="+t.write(a,e)+i}}return Object.create({set:a,get:function(e){if("undefined"!=typeof document&&(!arguments.length||e)){for(var n=document.cookie?document.cookie.split("; "):[],a={},r=0;r<n.length;r++){var i=n[r].split("="),s=i.slice(1).join("=");try{var o=decodeURIComponent(i[0]);if(a[o]=t.read(s,o),e===o)break}catch(e){}}return e?a[e]:a}},remove:function(e,t){a(e,"",o({},t,{expires:-1}))},withAttributes:function(t){return e(this.converter,o({},this.attributes,t))},withConverter:function(t){return e(o({},this.converter,t),this.attributes)}},{attributes:{value:Object.freeze(n)},converter:{value:Object.freeze(t)}})}({read:function(e){return'"'===e[0]&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"}),c=n(9408),u=n(1302);const m=150,d=({modules:e,currentPath:t,collapsedOnLoad:n=!1,navigate:r,onExpandCollapse:i})=>{const[s,o]=a.useState(n),l=a.useRef(null);a.useEffect((()=>{s&&i&&i(!0)}),[]);const[d,p]=a.useState(!1),[h,f]=a.useState(!0),g=()=>window.innerWidth<800,[v,b]=a.useState(g());a.useEffect((()=>{function e(){return g()?(b(!0),null):(b(!1),p(!1),setTimeout((()=>{f(!0)}),m))}window.addEventListener("resize",e);const t=e();return()=>{window.removeEventListener("resize",e),t&&clearTimeout(t)}}),[]);const E=s&&!v,[w,y]=a.useState(!1);a.useEffect((()=>{y(!0);const e=setTimeout((()=>{y(!1)}),m);return()=>{clearTimeout(e)}}),[E]);const N=()=>{o(!s),i&&i(!s)},[_,P]=a.useState(!1),C=()=>{E&&N()};a.useEffect((()=>{const e=setTimeout((()=>{d||f(!0)}),m);return()=>{clearTimeout(e)}}),[d]);const S=()=>{p(!1),l&&l.current?.focus()},x=e.map(((e,n)=>e.render({key:n,slim:E,expandingOrCollapsing:w,onHideMobile:S,onSearchClick:C,currentPath:t,navigate:r})));return a.createElement(a.Fragment,null,a.createElement("button",{onClick:()=>{p(!d),y(!0);const e=setTimeout((()=>{y(!1),f(!h)}),m);return()=>{clearTimeout(e)}},"aria-label":(0,c.ih)("Toggle sidebar"),"aria-expanded":d?"true":"false",className:"button sidebar-nav-toggle"+(v?" sidebar-nav-toggle--mobile":"")+(d?" sidebar-nav-toggle--open":""),type:"button",ref:l},d?a.createElement(u.Z,{name:"cross"}):a.createElement(u.Z,{name:"bars"})),a.createElement("div",{className:"sidebar"+(E?" sidebar--slim":"")+(v?" sidebar--mobile":"")+(v&&!d?" sidebar--hidden":"")+(v&&!d&&h?" sidebar--closed":"")},a.createElement("div",{className:"sidebar__inner",onFocus:()=>{_&&(o(!1),P(!0))},onBlur:()=>{_&&(P(!1),o(!0))}},a.createElement("div",{className:`sm:w-mt-2 ${E?"w-justify-center":"w-justify-end"} w-flex w-items-center`},a.createElement("button",{onClick:N,"aria-label":(0,c.ih)("Toggle sidebar"),"aria-expanded":E?"false":"true",type:"button",className:(E?"":"w-mr-4")+"\n button\n sidebar__collapse-toggle\n w-flex\n w-justify-center\n w-items-center\n hover:w-bg-surface-menu-item-active\n hover:text-white\n hover:opacity-100"},a.createElement(u.Z,{name:"expand-right",className:s?"":"-w-rotate-180"}))),x)))};var p=n(4676);const h="wagtail_sidebar_collapsed";var f=n(1736);const g=({item:e,slim:t,path:n,state:r,dispatch:i,navigate:s})=>{const o=r.activePath===n,l=r.activePath.startsWith(n),m=n.split(".").length>2,d="sidebar-menu-item"+(l?" sidebar-menu-item--active":"")+(m?" sidebar-menu-item--in-sub-menu":"");return a.createElement("li",{className:d},a.createElement(f.ZP,{disabled:!t||m,content:e.label,placement:"right"},a.createElement("a",{...e.attrs,href:e.url,"aria-current":o?"page":void 0,onClick:t=>{t.ctrlKey||t.shiftKey||t.metaKey||t.button&&0!==t.button||(_(e,r)||i({type:"set-dismissible-state",item:e}),e.attrs.target||(t.preventDefault(),s(e.url).then((()=>{i({type:"set-active-path",path:n}),i({type:"set-navigation-path",path:""})}))))},className:`sidebar-menu-item__link ${e.classNames}`},e.iconName&&a.createElement(u.Z,{name:e.iconName,className:"icon--menuitem"}),a.createElement("div",{className:"menuitem"},a.createElement("span",{className:"menuitem-label"},e.label),!_(e,r)&&a.createElement("span",{className:"w-dismissible-badge"},a.createElement("span",{className:"w-sr-only"},(0,c.ih)("(New)")))))))};class v{name;label;url;attrs;iconName;classNames;constructor({name:e,label:t,url:n,attrs:a={},icon_name:r=null,classname:i}){this.name=e,this.label=t,this.url=n,this.attrs=a,this.iconName=r,this.classNames=i}render({path:e,slim:t,state:n,dispatch:r,navigate:i}){return a.createElement(g,{key:this.name,item:this,path:e,slim:t,state:n,dispatch:r,navigate:i})}}const b=({isVisible:e,isOpen:t,depth:n,widthPx:r,children:i})=>{const s="sidebar-panel"+(e?" sidebar-panel--visible":"")+(t?" sidebar-panel--open":"");let o=2*-n;e&&!t&&(o-=1);const l={"--z-index":o};return r&&(l["--width"]=r+"px"),a.createElement("div",{className:s,style:l},i)},E=({path:e,item:t,slim:n,state:r,dispatch:i,navigate:s})=>{const o=r.navigationPath.startsWith(e),l=o||r.activePath.startsWith(e),d=e.split(".").length,[p,h]=a.useState(!1),[g,v]=a.useState(!1),E=t.menuItems.filter((e=>!_(e,r))).length;a.useEffect((()=>{o?h(!0):!o&&p&&setTimeout((()=>{h(!1)}),m)}),[o]);const w="sidebar-menu-item sidebar-sub-menu-item"+(l?" sidebar-menu-item--active":"")+(o?" sidebar-sub-menu-item--open":""),y="sidebar-sub-menu-trigger-icon"+(o?" sidebar-sub-menu-trigger-icon--open":"");return a.createElement("li",{className:w},a.createElement(f.ZP,{disabled:o||!n,content:t.label,placement:"right"},a.createElement("button",{...t.attrs,onClick:()=>{if(!g&&E>0&&i({type:"set-dismissible-state",item:t}),o){const t=e.split(".");t.pop();const n=t.join(".");i({type:"set-navigation-path",path:n})}else i({type:"set-navigation-path",path:e}),v(!0)},className:`sidebar-menu-item__link ${t.classNames}`,"aria-haspopup":"menu","aria-expanded":o?"true":"false",type:"button"},t.iconName&&a.createElement(u.Z,{name:t.iconName,className:"icon--menuitem"}),a.createElement("span",{className:"menuitem-label"},t.label),E>0&&!g&&a.createElement("span",{className:"w-dismissible-badge w-dismissible-badge--count"},a.createElement("span",{"aria-hidden":"true"},E),a.createElement("span",{className:"w-sr-only"},1===E?(0,c.ih)("(1 new item in this menu)"):(0,c.ih)("(%(number)s new items in this menu)").replace("%(number)s",`${E}`))),a.createElement(u.Z,{className:y,name:"arrow-right"}))),a.createElement(b,{isVisible:p,isOpen:o,depth:d},a.createElement("div",{className:"sidebar-sub-menu-panel"},a.createElement("h2",{id:`wagtail-sidebar-submenu${e.split(".").join("-")}-title`,className:`${t.classNames} w-h4`},t.iconName&&a.createElement(u.Z,{name:t.iconName,className:"icon--submenu-header"}),t.label),a.createElement("ul",{"aria-labelledby":`wagtail-sidebar-submenu${e.split(".").join("-")}-title`},N(e,t.menuItems,n,r,i,s)),t.footerText&&a.createElement("p",{className:"sidebar-sub-menu-panel__footer"},t.footerText))))};class w{name;label;menuItems;attrs;iconName;classNames;footerText;constructor({name:e,label:t,attrs:n={},icon_name:a=null,classname:r,footer_text:i=""},s){this.name=e,this.label=t,this.menuItems=s,this.attrs=n,this.iconName=a,this.classNames=r,this.footerText=i}render({path:e,slim:t,state:n,dispatch:r,navigate:i}){return a.createElement(E,{key:this.name,item:this,path:e,slim:t,state:n,dispatch:r,navigate:i})}}n(6599);var y=n(434);function N(e,t,n,r,i,s){return a.createElement(a.Fragment,null,t.map((t=>t.render({path:`${e}.${t.name}`,slim:n,state:r,dispatch:i,navigate:s}))))}function _(e,t){return!e.attrs["data-w-dismissible-id-value"]||"data-w-dismissible-dismissed-value"in e.attrs||t.dismissibles[e.name]}function P(e,t){e.forEach((e=>{e.attrs["data-w-dismissible-id-value"]&&t(e),e instanceof w&&P(e.menuItems,t)}))}function C(e,t){const n={...e};switch(t.type){case"set-active-path":n.activePath=t.path;break;case"set-navigation-path":n.navigationPath=t.path;break;case"set-dismissible-state":n.dismissibles=function(e,{item:t,value:n=!0}){const a={};return P([t],(e=>{a[e.attrs["data-w-dismissible-id-value"]]=n})),Object.keys(a).length>0&&(r=a,fetch(y.QF.ADMIN_URLS?.DISMISSIBLES,{method:"PATCH",headers:{[y.QF.CSRF_HEADER_NAME]:y.QF.CSRF_TOKEN,"Content-Type":"application/json"},body:JSON.stringify(r),mode:"same-origin"})),{...e.dismissibles,[t.name]:n};var r}(e,t)}return n}function S(e){const t={};return P(e,(e=>{t[e.attrs["data-w-dismissible-id-value"]]="data-w-dismissible-dismissed-value"in e.attrs})),t}Boolean;const x=({menuItems:e,accountMenuItems:t,user:n,expandingOrCollapsing:r,onHideMobile:i,slim:s,currentPath:o,navigate:l})=>{const[m,d]=a.useReducer(C,{navigationPath:"",activePath:"",dismissibles:S(e)}),p=!s||r,h=m.navigationPath.startsWith(".account");a.useEffect((()=>{s&&h&&d({type:"set-navigation-path",path:""})}),[s]),a.useEffect((()=>{const n=[],a=(e,t)=>{t.forEach((t=>{const r=`${e}.${t.name}`;t instanceof v?n.push([t.url,r]):t instanceof w&&a(r,t.menuItems)}))};a("",e),a("",t);let r=null;n.forEach((([e,t])=>{o.startsWith(e)&&(null==r||e.length>r[0].length)&&(r=[e,t])}));const i=r?r[1]:"";i!==m.activePath&&d({type:"set-active-path",path:i})}),[o,e]),a.useEffect((()=>{const e=e=>{"Escape"===e.key&&(d({type:"set-navigation-path",path:""}),""===m.navigationPath&&i())},t=e=>{const t=document.querySelector("[data-wagtail-sidebar]");t&&t.contains(e.target)||d({type:"set-navigation-path",path:""})};return document.addEventListener("keydown",e),document.addEventListener("mousedown",t),document.addEventListener("touchend",t),()=>{document.removeEventListener("keydown",e),document.removeEventListener("mousedown",t),document.removeEventListener("touchend",t)}}),[]);const g="sidebar-main-menu w-scrollbar-thin"+(h?" sidebar-main-menu--open-footer":"");return a.createElement(a.Fragment,null,a.createElement("nav",{className:g,"aria-label":(0,c.ih)("Main menu")},a.createElement("ul",{className:"sidebar-main-menu__list"},N("",e,s,m,d,l))),a.createElement("div",{className:"sidebar-footer"+(h?" sidebar-footer--open":"")+(p?" sidebar-footer--visible":"")},a.createElement(f.ZP,{disabled:!s,content:n.name,placement:"right"},a.createElement("button",{className:`\n ${s?"w-px-4":"w-px-5"}\n sidebar-footer__account\n w-bg-surface-menus\n w-text-text-label-menus-default\n w-flex\n w-items-center\n w-relative\n w-w-full\n w-appearance-none\n w-border-0\n w-overflow-hidden\n w-py-3\n hover:w-bg-surface-menu-item-active\n focus:w-bg-surface-menu-item-active\n w-transition`,onClick:()=>{d(h?{type:"set-navigation-path",path:""}:{type:"set-navigation-path",path:".account"})},"aria-haspopup":"menu","aria-expanded":h?"true":"false",type:"button"},a.createElement("div",{className:"avatar avatar-on-dark w-flex-shrink-0 !w-w-[28px] !w-h-[28px]"},a.createElement("img",{src:n.avatarUrl,alt:"",decoding:"async",loading:"lazy"})),a.createElement("div",{className:"sidebar-footer__account-toggle"},a.createElement("div",{className:"sidebar-footer__account-label w-label-3"},n.name),a.createElement(u.Z,{className:"w-w-4 w-h-4 w-text-text-label-menus-default",name:h?"arrow-down":"arrow-up"})))),a.createElement("ul",null,N("",t,s,m,d,l))))},T=({item:e,slim:t,path:n,state:r,dispatch:i})=>{const s=r.activePath.startsWith(n),o=n.split(".").length>2,l="sidebar-menu-item"+(s?" sidebar-menu-item--active":"")+(o?" sidebar-menu-item--in-sub-menu":"");return a.createElement("li",{className:l},a.createElement(f.ZP,{disabled:!t||o,content:e.label,placement:"right"},a.createElement("form",{...e.attrs,method:e.method,action:e.action},a.createElement("input",{type:"hidden",name:"csrfmiddlewaretoken",value:y.QF.CSRF_TOKEN}),a.createElement("button",{type:"submit",className:`sidebar-menu-item__link ${e.classNames}`,onClick:t=>{t.ctrlKey||t.shiftKey||t.metaKey||t.button&&0!==t.button||_(e,r)||i({type:"set-dismissible-state",item:e})}},e.iconName&&a.createElement(u.Z,{name:e.iconName,className:"icon--menuitem"}),a.createElement("span",{className:"menuitem"},a.createElement("span",{className:"menuitem-label"},e.label),!_(e,r)&&a.createElement("span",{className:"w-dismissible-badge"},a.createElement("span",{className:"w-sr-only"},(0,c.ih)("(New)"))))))))};var O=n(682),R=n(7462),k=n(3366),I=n(8679),M=n.n(I),A=n(9864),L=n(6496),F=n(1881),j=n(6526),D=["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef","forwardRef","context"],$=["reactReduxForwardedRef"],U=[],Z=[null,null];function G(e,t){var n=e[1];return[t.payload,n+1]}function q(e,t,n){(0,F.L)((function(){return e.apply(void 0,t)}),n)}function H(e,t,n,a,r,i,s){e.current=a,t.current=r,n.current=!1,i.current&&(i.current=null,s())}function B(e,t,n,a,r,i,s,o,l,c){if(e){var u=!1,m=null,d=function(){if(!u){var e,n,d=t.getState();try{e=a(d,r.current)}catch(e){n=e,m=e}n||(m=null),e===i.current?s.current||l():(i.current=e,o.current=e,s.current=!0,c({type:"STORE_UPDATED",payload:{error:n}}))}};return n.onStateChange=d,n.trySubscribe(),d(),function(){if(u=!0,n.tryUnsubscribe(),n.onStateChange=null,m)throw m}}}var W=function(){return[null,0]};function K(e,t){void 0===t&&(t={});var n=t,i=n.getDisplayName,s=void 0===i?function(e){return"ConnectAdvanced("+e+")"}:i,o=n.methodName,l=void 0===o?"connectAdvanced":o,c=n.renderCountProp,u=void 0===c?void 0:c,m=n.shouldHandleStateChanges,d=void 0===m||m,p=n.storeKey,h=void 0===p?"store":p,f=(n.withRef,n.forwardRef),g=void 0!==f&&f,v=n.context,b=void 0===v?j.E:v,E=(0,k.Z)(n,D),w=b;return function(t){var n=t.displayName||t.name||"Component",i=s(n),o=(0,R.Z)({},E,{getDisplayName:s,methodName:l,renderCountProp:u,shouldHandleStateChanges:d,storeKey:h,displayName:i,wrappedComponentName:n,WrappedComponent:t}),c=E.pure,m=c?a.useMemo:function(e){return e()};function p(n){var i=(0,a.useMemo)((function(){var e=n.reactReduxForwardedRef,t=(0,k.Z)(n,$);return[n.context,e,t]}),[n]),s=i[0],l=i[1],c=i[2],u=(0,a.useMemo)((function(){return s&&s.Consumer&&(0,A.isContextConsumer)(r().createElement(s.Consumer,null))?s:w}),[s,w]),p=(0,a.useContext)(u),h=Boolean(n.store)&&Boolean(n.store.getState)&&Boolean(n.store.dispatch);Boolean(p)&&Boolean(p.store);var f=h?n.store:p.store,g=(0,a.useMemo)((function(){return function(t){return e(t.dispatch,o)}(f)}),[f]),v=(0,a.useMemo)((function(){if(!d)return Z;var e=(0,L.X)(f,h?null:p.subscription),t=e.notifyNestedSubs.bind(e);return[e,t]}),[f,h,p]),b=v[0],E=v[1],y=(0,a.useMemo)((function(){return h?p:(0,R.Z)({},p,{subscription:b})}),[h,p,b]),N=(0,a.useReducer)(G,U,W),_=N[0][0],P=N[1];if(_&&_.error)throw _.error;var C=(0,a.useRef)(),S=(0,a.useRef)(c),x=(0,a.useRef)(),T=(0,a.useRef)(!1),O=m((function(){return x.current&&c===S.current?x.current:g(f.getState(),c)}),[f,_,c]);q(H,[S,C,T,c,O,x,E]),q(B,[d,f,b,g,S,C,T,x,E,P],[f,b,g]);var I=(0,a.useMemo)((function(){return r().createElement(t,(0,R.Z)({},O,{ref:l}))}),[l,t,O]);return(0,a.useMemo)((function(){return d?r().createElement(u.Provider,{value:y},I):I}),[u,I,y])}var f=c?r().memo(p):p;if(f.WrappedComponent=t,f.displayName=p.displayName=i,g){var v=r().forwardRef((function(e,t){return r().createElement(f,(0,R.Z)({},e,{reactReduxForwardedRef:t}))}));return v.displayName=i,v.WrappedComponent=t,M()(v,t)}return M()(f,t)}}var X=n(5067),z=n(3480),V=n(6343);const Q=[function(e){return"function"==typeof e?(0,V.xv)(e,"mapDispatchToProps"):void 0},function(e){return e?void 0:(0,V.dX)((function(e){return{dispatch:e}}))},function(e){return e&&"object"==typeof e?(0,V.dX)((function(t){return(0,z.Z)(e,t)})):void 0}],J=[function(e){return"function"==typeof e?(0,V.xv)(e,"mapStateToProps"):void 0},function(e){return e?void 0:(0,V.dX)((function(){return{}}))}];function Y(e,t,n){return(0,R.Z)({},n,e,t)}const ee=[function(e){return"function"==typeof e?function(e){return function(t,n){n.displayName;var a,r=n.pure,i=n.areMergedPropsEqual,s=!1;return function(t,n,o){var l=e(t,n,o);return s?r&&i(l,a)||(a=l):(s=!0,a=l),a}}}(e):void 0},function(e){return e?void 0:function(){return Y}}];var te=["initMapStateToProps","initMapDispatchToProps","initMergeProps"];function ne(e,t,n,a){return function(r,i){return n(e(r,i),t(a,i),i)}}function ae(e,t,n,a,r){var i,s,o,l,c,u=r.areStatesEqual,m=r.areOwnPropsEqual,d=r.areStatePropsEqual,p=!1;return function(r,h){return p?function(r,p){var h,f,g=!m(p,s),v=!u(r,i);return i=r,s=p,g&&v?(o=e(i,s),t.dependsOnOwnProps&&(l=t(a,s)),c=n(o,l,s)):g?(e.dependsOnOwnProps&&(o=e(i,s)),t.dependsOnOwnProps&&(l=t(a,s)),c=n(o,l,s)):v?(h=e(i,s),f=!d(h,o),o=h,f&&(c=n(o,l,s)),c):c}(r,h):(o=e(i=r,s=h),l=t(a,s),c=n(o,l,s),p=!0,c)}}function re(e,t){var n=t.initMapStateToProps,a=t.initMapDispatchToProps,r=t.initMergeProps,i=(0,k.Z)(t,te),s=n(e,i),o=a(e,i),l=r(e,i);return(i.pure?ae:ne)(s,o,l,e,i)}var ie=["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"];function se(e,t,n){for(var a=t.length-1;a>=0;a--){var r=t[a](e);if(r)return r}return function(t,a){throw new Error("Invalid value of type "+typeof e+" for "+n+" argument when connecting component "+a.wrappedComponentName+".")}}function oe(e,t){return e===t}function le(e){var t=void 0===e?{}:e,n=t.connectHOC,a=void 0===n?K:n,r=t.mapStateToPropsFactories,i=void 0===r?J:r,s=t.mapDispatchToPropsFactories,o=void 0===s?Q:s,l=t.mergePropsFactories,c=void 0===l?ee:l,u=t.selectorFactory,m=void 0===u?re:u;return function(e,t,n,r){void 0===r&&(r={});var s=r,l=s.pure,u=void 0===l||l,d=s.areStatesEqual,p=void 0===d?oe:d,h=s.areOwnPropsEqual,f=void 0===h?X.Z:h,g=s.areStatePropsEqual,v=void 0===g?X.Z:g,b=s.areMergedPropsEqual,E=void 0===b?X.Z:b,w=(0,k.Z)(s,ie),y=se(e,i,"mapStateToProps"),N=se(t,o,"mapDispatchToProps"),_=se(n,c,"mergeProps");return a(m,(0,R.Z)({methodName:"connect",getDisplayName:function(e){return"Connect("+e+")"},shouldHandleStateChanges:Boolean(e),initMapStateToProps:y,initMapDispatchToProps:N,initMergeProps:_,pure:u,areStatesEqual:p,areOwnPropsEqual:f,areStatePropsEqual:v,areMergedPropsEqual:E},w))}}const ce=le();n(3141),n(2975),n(420);var ue=n(1679);function me(e){return me="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},me(e)}function de(e){var t=function(e,t){if("object"!==me(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var a=n.call(e,"string");if("object"!==me(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===me(t)?t:String(t)}function pe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function he(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?pe(Object(n),!0).forEach((function(t){var a,r,i;a=e,r=t,i=n[t],(r=de(r))in a?Object.defineProperty(a,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):a[r]=i})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function fe(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}(0,n(9256).F)(ue.m);var ge="function"==typeof Symbol&&Symbol.observable||"@@observable",ve=function(){return Math.random().toString(36).substring(7).split("").join(".")},be={INIT:"@@redux/INIT"+ve(),REPLACE:"@@redux/REPLACE"+ve(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+ve()}};function Ee(e,t,n){var a;if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error(fe(0));if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error(fe(1));return n(Ee)(e,t)}if("function"!=typeof e)throw new Error(fe(2));var r=e,i=t,s=[],o=s,l=!1;function c(){o===s&&(o=s.slice())}function u(){if(l)throw new Error(fe(3));return i}function m(e){if("function"!=typeof e)throw new Error(fe(4));if(l)throw new Error(fe(5));var t=!0;return c(),o.push(e),function(){if(t){if(l)throw new Error(fe(6));t=!1,c();var n=o.indexOf(e);o.splice(n,1),s=null}}}function d(e){if(!function(e){if("object"!=typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}(e))throw new Error(fe(7));if(void 0===e.type)throw new Error(fe(8));if(l)throw new Error(fe(9));try{l=!0,i=r(i,e)}finally{l=!1}for(var t=s=o,n=0;n<t.length;n++)(0,t[n])();return e}return d({type:be.INIT}),(a={dispatch:d,subscribe:m,getState:u,replaceReducer:function(e){if("function"!=typeof e)throw new Error(fe(10));r=e,d({type:be.REPLACE})}})[ge]=function(){var e,t=m;return(e={subscribe:function(e){if("object"!=typeof e||null===e)throw new Error(fe(11));function n(){e.next&&e.next(u())}return n(),{unsubscribe:t(n)}}})[ge]=function(){return this},e},a}function we(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return 0===t.length?function(e){return e}:1===t.length?t[0]:t.reduce((function(e,t){return function(){return e(t.apply(void 0,arguments))}}))}function ye(e){return function(t){var n=t.dispatch,a=t.getState;return function(t){return function(r){return"function"==typeof r?r(n,a,e):t(r)}}}}var Ne=ye();Ne.withExtraArgument=ye;const _e=Ne,{fetch:Pe,Headers:Ce}=n.g,Se=e=>{if(e.status>=200&&e.status<300)return e;throw new Error(e.statusText)},xe=e=>e.json(),Te=e=>((e,t)=>{const n={credentials:"same-origin",headers:new Ce({Accept:"application/json","Content-Type":"application/json"}),method:e};return(a=Pe(t,n),new Promise(((e,t)=>{const n=setTimeout((()=>{t(new Error("Response timeout"))}),15e3);a.then((t=>{clearTimeout(n),e(t)}),(e=>{clearTimeout(n),t(e)}))}))).then(Se).then(xe);var a})("GET",e),Oe=(e,t={})=>{let n=`${y.c2.PAGES}?child_of=${e}&for_explorer=1`;return t.fields?n+=`&fields=parent,${window.encodeURIComponent(t.fields.join(","))}`:n+="&fields=parent",t.onlyWithChildren&&(n+="&has_children=1"),t.offset&&(n+=`&offset=${t.offset}`),n+=y.c2.EXTRA_CHILDREN_PARAMETERS,Te(n)},Re=(e,t={})=>{let a=`${y.c2.PAGES}?translation_of=${e}&limit=20`;return t.fields?a+=`&fields=parent,${n.g.encodeURIComponent(t.fields.join(","))}`:a+="&fields=parent",t.onlyWithChildren&&(a+="&has_children=1"),t.offset&&(a+=`&offset=${t.offset}`),Te(a)},ke=async(e,t)=>{const n=[];let a=100;for(;;){const r=await Re(e,{offset:n.length,...t});if(r.items.forEach((e=>n.push(e))),n.length>=r.meta.total_count||a--<=0)return n}},Ie=(...e)=>e[0];function Me(e,t,n){return(...a)=>{const r={type:e,payload:(t||Ie)(...a)};return r.payload instanceof Error&&(r.error=!0),"function"==typeof n&&(r.meta=n(...a)),r}}const Ae=Me("GET_PAGE_SUCCESS",((e,t)=>({id:e,data:t}))),Le=Me("GET_PAGE_FAILURE",((e,t)=>({id:e,error:t}))),Fe=Me("GET_CHILDREN_START",(e=>({id:e}))),je=Me("GET_CHILDREN_SUCCESS",((e,t,n)=>({id:e,items:t,meta:n}))),De=Me("GET_CHILDREN_FAILURE",((e,t)=>({id:e,error:t})));function $e(e,t=0){return n=>(n(Fe(e)),Oe(e,{offset:t}).then((({items:a,meta:r})=>{const i=t+a.length;n(je(e,a,r)),i<r.total_count&&i<y.ev&&n($e(e,i))}),(t=>{n(De(e,t))})))}const Ue=Me("GET_TRANSLATIONS_START",(e=>({id:e}))),Ze=Me("GET_TRANSLATIONS_SUCCESS",((e,t)=>({id:e,items:t}))),Ge=Me("GET_TRANSLATIONS_FAILURE",((e,t)=>({id:e,error:t})));function qe(e){return t=>(t(Ue(e)),ke(e,{onlyWithChildren:!0}).then((n=>{t(Ze(e,n))}),(n=>{t(Ge(e,n))})))}const He=Me("OPEN_EXPLORER",(e=>({id:e}))),Be=Me("CLOSE_EXPLORER");function We(e){return(t,n)=>{const{nodes:a}=n(),r=a[e];t(He(e)),r||(t($e(e)),1!==e&&t(qe(e))),1!==e&&t(function(e){return t=>(e=>{const t=`${y.c2.PAGES}${e}/`;return Te(t)})(e).then((n=>{t(Ae(e,n))}),(n=>{t(Le(e,n))}))}(e))}}const Ke=Me("GOTO_PAGE",((e,t)=>({id:e,transition:t})));var Xe=n(2109),ze=n.n(Xe);const Ve=()=>r().createElement("span",null,r().createElement(u.Z,{name:"spinner",className:"w-spinner"}),` ${(0,c.ih)("Loading…")}`);var Qe=n(5697),Je=n.n(Qe),Ye=n(335),et=n.n(Ye);const tt="push",nt=({name:e,component:t,className:n,duration:a,children:i})=>r().createElement(et(),{component:t,transitionEnterTimeout:a,transitionLeaveTimeout:a,transitionName:`w-transition-${e}`,className:n},i);nt.propTypes={name:Je().oneOf([tt,"pop"]).isRequired,component:Je().string,className:Je().string,duration:Je().number,children:Je().node},nt.defaultProps={component:"div",children:null,className:null,duration:210};const at=nt,rt=(e,t,n,a,r)=>{n&&"#"===e&&(r.preventDefault(),r.stopPropagation()),t&&t(r),r.ctrlKey||r.shiftKey||r.metaKey||r.button&&0!==r.button||a&&!r.defaultPrevented&&(r.preventDefault(),a(e))},it=({className:e="",children:t,accessibleLabel:n,href:r="#",target:i,preventDefault:s=!0,onClick:o,dialogTrigger:l,navigate:c})=>{const u=a.Children.count(t)>0,m=n?a.createElement("span",{className:"w-sr-only"},n):null;return a.createElement("a",{className:e,onClick:rt.bind(null,r,o,s,c),rel:"_blank"===i?"noreferrer":void 0,href:r,target:i,"aria-haspopup":l?"dialog":void 0},u?t:m)},st=({locale:e,translations:t,gotoPage:n})=>{const a=wagtailConfig.LOCALES.filter((({code:n})=>n===e||t.get(n))).map((({code:e,display_name:t})=>r().createElement("option",{key:e,value:e},t)));return r().createElement("div",{className:"c-page-explorer__header__select"},r().createElement("select",{value:e,onChange:e=>{e.preventDefault();const a=t.get(e.target.value);a&&n(a,0)},disabled:a.length<2},a))},ot=({page:e,depth:t,onClick:n,gotoPage:a,navigate:i})=>{const s=0===t,o=0===e.id;return r().createElement("div",{className:"c-page-explorer__header"},r().createElement(it,{href:o?y.Xy.PAGES:`${y.Xy.PAGES}${e.id}/`,className:"c-page-explorer__header__title",onClick:n,navigate:i},r().createElement("div",{className:"c-page-explorer__header__title__inner"},r().createElement(u.Z,{name:s?"home":"arrow-left",className:"icon--explorer-header"}),r().createElement("span",null,e.admin_display_title||(0,c.ih)("Pages")))),!o&&e.meta.locale&&e.translations&&e.translations.size>0&&r().createElement(st,{locale:e.meta.locale,translations:e.translations,gotoPage:a}))},lt=({status:e})=>r().createElement("span",{className:"c-status"+(e.live?" c-status--live":"")},e.status);lt.propTypes={status:Je().shape({live:Je().bool.isRequired,status:Je().string.isRequired}).isRequired};const ct=lt,ut=r().createElement(u.Z,{name:"folder-inverse",className:"icon--menuitem"}),mt=({item:e,onClick:t,navigate:n})=>{const{id:a,admin_display_title:i,meta:s}=e,o=s.children.count>0,l=s.status.live&&!s.status.has_unpublished_changes,m=1===s.parent?.id&&s.locale&&(y.Ok.get(s.locale)||s.locale);return r().createElement("div",{className:"c-page-explorer__item"},r().createElement(it,{href:`${y.Xy.PAGES}${a}/`,navigate:n,className:"c-page-explorer__item__link"},o?ut:null,r().createElement("h3",{className:"c-page-explorer__item__title"},i),(!l||m)&&r().createElement("span",{className:"c-page-explorer__meta"},m&&r().createElement("span",{className:"c-status"},m),!l&&r().createElement(ct,{status:s.status}))),r().createElement(it,{href:`${y.Xy.PAGES}${a}/edit/`,className:"c-page-explorer__item__action c-page-explorer__item__action--small",navigate:n},r().createElement(u.Z,{name:"edit",title:(0,c.ih)("Edit '%(title)s'").replace("%(title)s",i||""),className:"icon--item-action"})),o?r().createElement(it,{className:"c-page-explorer__item__action",onClick:t,href:`${y.Xy.PAGES}${a}/`,navigate:n},r().createElement(u.Z,{name:"arrow-right",title:(0,c.ih)("View child pages of '%(title)s'").replace("%(title)s",i||""),className:"icon--item-action"})):null)},dt=({page:e})=>{const t=e.children.count;return r().createElement("a",{href:`${y.Xy.PAGES}${e.id}/`,className:"c-page-explorer__see-more"},(0,c.ih)("See all"),r().createElement("span",null,` ${t} ${1===t?(0,c.ih)("Page").toLowerCase():(0,c.ih)("Pages").toLowerCase()}`),r().createElement(u.Z,{name:"arrow-right"}))};class pt extends r().Component{constructor(e){super(e),this.state={transition:tt},this.onItemClick=this.onItemClick.bind(this),this.onHeaderClick=this.onHeaderClick.bind(this)}componentWillReceiveProps(e){const{depth:t}=this.props,n=e.depth>t;this.setState({transition:n?tt:"pop"})}onItemClick(e,t){const{gotoPage:n}=this.props;t.preventDefault(),t.stopPropagation(),n(e,1)}onHeaderClick(e){const{page:t,depth:n,gotoPage:a}=this.props,r=t.meta.parent?.id;n>0&&r&&(e.preventDefault(),e.stopPropagation(),a(r,-1))}renderChildren(){const{page:e,nodes:t}=this.props;let n;return n=e.isFetchingChildren||e.children.items?r().createElement("div",{key:"children"},e.children.items.map((e=>r().createElement(mt,{key:e,item:t[e],onClick:this.onItemClick.bind(null,e),navigate:this.props.navigate})))):r().createElement("div",{key:"empty",className:"c-page-explorer__placeholder"},(0,c.ih)("No results")),r().createElement("div",{className:"c-page-explorer__drawer"},n,e.isFetchingChildren||e.isFetchingTranslations?r().createElement("div",{key:"fetching",className:"c-page-explorer__placeholder"},r().createElement(Ve,null)):null,e.isError?r().createElement("div",{key:"error",className:"c-page-explorer__placeholder"},(0,c.ih)("Server Error")):null)}render(){const{page:e,depth:t,gotoPage:n,onClose:a}=this.props,{transition:i}=this.state;return r().createElement(ze(),{paused:!e||e.isFetchingChildren||e.isFetchingTranslations,focusTrapOptions:{onDeactivate:a,clickOutsideDeactivates:!1,allowOutsideClick:!0}},r().createElement("div",{role:"dialog","aria-label":(0,c.ih)("Page explorer")},r().createElement(at,{name:i,className:"c-page-explorer"},r().createElement("div",{key:t,className:"w-transition-group"},r().createElement(ot,{depth:t,page:e,onClick:this.onHeaderClick,gotoPage:n,navigate:this.props.navigate}),this.renderChildren(),e.isError||e.children.items&&e.children.count>y.ev?r().createElement(dt,{page:e}):null))))}}const ht=pt,ft=ce((e=>({depth:e.explorer.depth,currentPageId:e.explorer.currentPageId,nodes:e.nodes})),(e=>({gotoPage:(t,n)=>e(function(e,t){return(n,a)=>{const{nodes:r}=a(),i=r[e];n(Ke(e,t)),!i||i.isFetchingChildren||i.children.count>0||n($e(e)),i&&!i.isFetchingTranslations&&null==i.translations&&n(qe(e))}}(t,n))})))((({isVisible:e,depth:t,currentPageId:n,nodes:a,gotoPage:i,onClose:s,navigate:o})=>e&&n?r().createElement(ht,{depth:t,page:a[n],nodes:a,gotoPage:i,onClose:s,navigate:o}):null)),gt={depth:0,currentPageId:null},vt="OPEN_EXPLORER",bt="CLOSE_EXPLORER";function Et(e=gt,t){switch(t.type){case vt:return{depth:0,currentPageId:t.payload.id};case bt:return gt;case"GOTO_PAGE":return{depth:e.depth+t.payload.transition,currentPageId:t.payload.id};default:return e}}const wt={id:0,isFetchingChildren:!1,isFetchingTranslations:!1,isError:!1,children:{items:[],count:0},meta:{status:{status:"",live:!1,has_unpublished_changes:!0},parent:null,children:{}}},yt="GET_PAGE_SUCCESS",Nt="GET_CHILDREN_START",_t="GET_CHILDREN_SUCCESS",Pt="GET_TRANSLATIONS_START",Ct="GET_TRANSLATIONS_SUCCESS",St="GET_PAGE_FAILURE",xt="GET_CHILDREN_FAILURE",Tt="GET_TRANSLATIONS_FAILURE",Ot=(e=wt,t)=>{switch(t.type){case yt:return{...e,...t.payload.data,isError:!1};case Nt:return{...e,isFetchingChildren:!0};case Pt:return{...e,isFetchingTranslations:!0};case _t:return{...e,isFetchingChildren:!1,isError:!1,children:{items:e.children.items.slice().concat(t.payload.items.map((e=>e.id))),count:t.payload.meta.total_count}};case Ct:const n=new Map;return t.payload.items.forEach((e=>{n.set(e.meta.locale,e.id)})),{...e,isFetchingTranslations:!1,isError:!1,translations:n};case St:case xt:case Tt:return{...e,isFetchingChildren:!1,isFetchingTranslations:!0,isError:!0};default:return e}},Rt={};function kt(e=Rt,t){switch(t.type){case vt:return{...e,[t.payload.id]:{...wt}};case yt:case Nt:case Pt:case St:case xt:case Tt:return{...e,[t.payload.id]:Ot(e[t.payload.id],t)};case _t:case Ct:const n={...e,[t.payload.id]:Ot(e[t.payload.id],t)};return t.payload.items.forEach((e=>{n[e.id]={...wt,...e}})),n;case bt:return Rt;default:return e}}const It=()=>Ee(function(e){for(var t=Object.keys(e),n={},a=0;a<t.length;a++){var r=t[a];"function"==typeof e[r]&&(n[r]=e[r])}var i,s=Object.keys(n);try{!function(e){Object.keys(e).forEach((function(t){var n=e[t];if(void 0===n(void 0,{type:be.INIT}))throw new Error(fe(12));if(void 0===n(void 0,{type:be.PROBE_UNKNOWN_ACTION()}))throw new Error(fe(13))}))}(n)}catch(e){i=e}return function(e,t){if(void 0===e&&(e={}),i)throw i;for(var a=!1,r={},o=0;o<s.length;o++){var l=s[o],c=n[l],u=e[l],m=c(u,t);if(void 0===m)throw t&&t.type,new Error(fe(14));r[l]=m,a=a||m!==u}return(a=a||s.length!==Object.keys(e).length)?r:e}}({explorer:Et,nodes:kt}),{},we(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){return function(){var n=e.apply(void 0,arguments),a=function(){throw new Error(fe(15))},r={getState:n.getState,dispatch:function(){return a.apply(void 0,arguments)}},i=t.map((function(e){return e(r)}));return a=we.apply(void 0,i)(n.dispatch),he(he({},n),{},{dispatch:a})}}}(_e),window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__():e=>e)),Mt=ft,At=({path:e,slim:t,item:n,state:r,dispatch:i,navigate:s})=>{const o=r.navigationPath.startsWith(e),l=o||r.activePath.startsWith(e),c=e.split(".").length,d=e.split(".").length>2,[p,h]=a.useState(!1),g=a.useRef(null);g.current||(g.current=It());const v=()=>{setTimeout((()=>{h(!1),g.current&&g.current.dispatch(Be())}),m)};a.useEffect((()=>{o?(h(!0),g.current&&g.current.dispatch(We(n.startPageId))):!o&&p&&v()}),[o]);const E="sidebar-menu-item sidebar-page-explorer-item"+(l?" sidebar-menu-item--active":"")+(d?" sidebar-menu-item--in-sub-menu":""),w="sidebar-sub-menu-trigger-icon"+(o?" sidebar-sub-menu-trigger-icon--open":"");return a.createElement("li",{className:E},a.createElement(f.ZP,{disabled:o||!t,content:n.label,placement:"right"},a.createElement("button",{onClick:()=>{i(o?{type:"set-navigation-path",path:""}:{type:"set-navigation-path",path:e})},className:"sidebar-menu-item__link","aria-haspopup":"dialog","aria-expanded":o?"true":"false",type:"button"},a.createElement(u.Z,{name:"folder-open-inverse",className:"icon--menuitem"}),a.createElement("span",{className:"menuitem-label"},n.label),a.createElement(u.Z,{className:w,name:"arrow-right"}))),a.createElement("div",null,a.createElement(b,{isVisible:p,isOpen:o,depth:c,widthPx:485},g.current&&a.createElement(O.Z,{store:g.current},a.createElement(Mt,{isVisible:p,navigate:s,onClose:v})))))},Lt=({className:e,slim:t})=>{const n="group-hover:w-text-black w-transition-all w-duration-150";return r().createElement("svg",{style:{left:t?"-1.125rem":"-1.75rem"},className:`\n sidebar-wagtail-branding__icon\n !w-overflow-visible\n w-group\n w-text-surface-menus\n w-z-10\n w-absolute\n w-transition-all\n w-duration-150\n hover:w-scale-[0.85]\n hover:w-rotate-[5deg]\n ${e||""}\n ${t?"w-w-[58px] w-h-[57px] w-top-2 hover:-w-translate-y-1":"w-w-[120px] w-h-[200px] -w-top-1 hover:w-translate-x-2 hover:-w-translate-y-3"}\n `,width:"430",height:"537",viewBox:"0 0 430 537",enableBackground:"new 0 0 430 537",xmlSpace:"preserve","aria-hidden":"true"},r().createElement("g",null,r().createElement("path",{className:"wagtail-logo-face",fill:"#FFF",d:"M352.963,12.781l0.045,23.909c0,0-42.592-15.901-70.037,13.096\n\t\tc-19.961,21.089-21.598,44.264-12.447,75.489c90.422,0,104.358,50.584,104.358,50.584l-9.314-58.195l28.391-34.591\n\t\tC393.958,42.106,360.062,15.018,352.963,12.781"}),r().createElement("path",{className:`w-hidden ${n}`,"data-part":"eye--closed",d:"M343 77.2c14-16 33.8-7 33.8-7",fill:"#261A4E",stroke:"#231f20",strokeWidth:"12"}),r().createElement("path",{className:n,"data-part":"eye--open",fill:"currentColor",d:"M371.838,71.336c0,6.016-4.877,10.893-10.893,10.893\n\t\ts-10.893-4.877-10.893-10.893c0-6.016,4.877-10.893,10.893-10.893S371.838,65.321,371.838,71.336"}),r().createElement("path",{className:n,"data-part":"body",fill:"currentColor",d:"M374 176s-14-69.4-104.4-50.7C260.6 94 262 71 282 49.8c27.5-29 70-13 70-13v-24C337 6.2 322.8 5 307 5c-58 0-90.3 43.3-104 72.8L39.4 378l46.2-8.6 19.3 24.2c127.6 0 291.7-46 269-217.7"}),r().createElement("polygon",{className:n,"data-part":"beak",fill:"currentColor",points:"429.948,117.665 393.96,83.063 365.567,117.665"}),r().createElement("path",{"data-part":"feather-accent",fill:"#FFFFFF",d:"M127.182,356.69c0,0,4.245-0.923,11.672-2.539\n\t\tc7.417-1.656,18.014-4.045,30.575-7.466c6.275-1.726,13.045-3.697,20.108-6.065c7.085-2.303,14.437-5.076,21.921-8.202\n\t\tc7.501-3.092,15.019-6.812,22.457-10.906c7.456-4.074,14.657-8.853,21.501-14.049c1.68-1.342,3.444-2.577,5.051-3.999l4.864-4.199\n\t\tc3.08-2.959,6.243-5.817,9.02-8.994c2.938-3.031,5.493-6.344,8.101-9.54c1.246-1.642,2.395-3.343,3.585-4.992l1.757-2.479\n\t\tl1.582-2.568c1.044-1.707,2.08-3.399,3.106-5.076c0.919-1.737,1.827-3.459,2.728-5.162c0.449-0.851,0.895-1.697,1.338-2.539\n\t\tc0.388-0.87,0.774-1.735,1.157-2.594c0.767-1.717,1.524-3.414,2.271-5.087c1.34-3.412,2.562-6.766,3.71-10.015\n\t\tc0.963-3.316,1.979-6.491,2.8-9.583c0.716-3.12,1.401-6.11,2.054-8.954c0.482-2.881,0.938-5.613,1.368-8.18\n\t\tc0.491-2.556,0.66-4.996,0.915-7.235c0.236-2.241,0.455-4.299,0.65-6.159c0.372-7.477,0.585-11.75,0.585-11.75l6.669,0.229\n\t\tc0,0-0.324,4.398-0.894,12.094c-0.248,1.915-0.523,4.036-0.823,6.345c-0.317,2.305-0.556,4.811-1.124,7.447\n\t\tc-0.508,2.643-1.049,5.455-1.619,8.419c-0.745,2.928-1.529,6.006-2.348,9.217c-0.927,3.182-2.057,6.452-3.137,9.856\n\t\tc-1.271,3.341-2.62,6.786-4.095,10.284c-0.815,1.716-1.643,3.456-2.479,5.217c-0.418,0.879-0.84,1.764-1.263,2.654\n\t\tc-0.48,0.862-0.963,1.729-1.449,2.601c-0.974,1.739-1.958,3.498-2.953,5.273c-1.103,1.71-2.216,3.436-3.339,5.176\n\t\tc-0.564,0.867-1.131,1.738-1.7,2.613l-1.875,2.521c-1.27,1.675-2.499,3.398-3.826,5.062c-2.766,3.236-5.482,6.58-8.576,9.627\n\t\tc-2.936,3.195-6.25,6.054-9.479,9.007l-5.081,4.178c-1.678,1.414-3.509,2.635-5.256,3.961c-7.111,5.136-14.549,9.812-22.201,13.76\n\t\tc-7.636,3.969-15.32,7.542-22.954,10.477c-7.619,2.971-15.078,5.579-22.249,7.723c-7.15,2.207-13.986,4.021-20.315,5.599\n\t\tc-12.667,3.126-23.322,5.26-30.779,6.738C131.448,355.869,127.182,356.69,127.182,356.69"})),r().createElement("path",{className:n,"data-part":"tail",fill:"currentColor",d:"M109 369.7l-22.4-4.3L2 528.4 61 518l45-128.4"}))},Ft=({homeUrl:e,slim:t,currentPath:n,navigate:r})=>{const i=a.useMemo((()=>document.querySelector("[data-wagtail-sidebar-branding-logo]")),[]);if(i&&""!==i.innerHTML)return a.createElement("a",{className:"sidebar-custom-branding",href:e,"aria-label":(0,c.ih)("Dashboard"),"aria-current":n===e?"page":void 0,dangerouslySetInnerHTML:{__html:i?i.innerHTML:""}});const s=a.useRef(0),o=a.useRef("r"),l=a.useRef(0),[u,m]=a.useState(!1),d="sidebar-wagtail-branding w-transition-all w-duration-150"+(u?" sidebar-wagtail-branding--wagging":"");return a.createElement("a",{className:d,href:e,"aria-label":(0,c.ih)("Dashboard"),"aria-current":n===e?"page":void 0,onClick:t=>{t.ctrlKey||t.shiftKey||t.metaKey||t.button&&0!==t.button||(t.preventDefault(),r(e))},onMouseMove:e=>{const t=e.pageX,n=t>s.current?"r":"l";t!==s.current&&n!==o.current&&(l.current+=1),l.current>8&&m(!0),s.current=t,o.current=n},onMouseLeave:()=>{m(!1),l.current=0}},a.createElement("div",{className:"sidebar-wagtail-branding__icon-wrapper w-transition-all w-duration-150"},a.createElement(Lt,{slim:t})))},jt=({slim:e,expandingOrCollapsing:t,onSearchClick:n,searchUrl:r,navigate:i})=>{const s=!e||t,o=a.useRef(null);return a.createElement("form",{role:"search",className:"w-h-[42px] w-relative w-box-border w-flex w-items-center w-justify-start w-flex-row w-flex-shrink-0",action:r,method:"get",onSubmit:e=>{if(e.target instanceof HTMLFormElement)if(e.preventDefault(),s){const t=e.target.querySelector('input[name="q"]');i(r+"?q="+encodeURIComponent(t.value))}else i(r)}},a.createElement("div",{className:"w-flex w-flex-row w-items-center w-h-full"},a.createElement(f.ZP,{disabled:s||!e,content:(0,c.ih)("Search"),placement:"right"},a.createElement("button",{className:`\n ${e?"w-pr-[18px]":"w-pr-0"}\n w-w-full\n w-pl-[23px]\n w-h-[35px]\n w-bg-transparent\n w-outline-offset-inside\n w-border-0\n w-rounded-none\n w-text-text-label-menus-default\n w-z-10\n hover:w-text-text-label-menus-active\n focus:w-text-text-label-menus-active\n hover:w-bg-transparent`,type:"submit","aria-label":(0,c.ih)("Search"),onClick:t=>{e&&(t.preventDefault(),n(),setTimeout((()=>{o.current&&o.current.focus()}),m))}},a.createElement(u.Z,{className:"icon--menuitem",name:"search"}))),a.createElement("label",{className:"w-sr-only",htmlFor:"menu-search-q"},(0,c.ih)("Search")),a.createElement("input",{className:`\n ${e||!s?"w-hidden":""}\n !w-pl-[55px]\n !w-py-[13px]\n !w-subpixel-antialiased\n !w-absolute\n !w-left-0\n !w-font-normal\n !w-top-0\n !w-text-14\n !w-bg-transparent\n !w-border-0\n !w-rounded-none\n !w-text-text-label-menus-default\n !w-outline-offset-inside\n !w-leading-none\n placeholder:!w-text-text-label-menus-default`,type:"text",id:"menu-search-q",name:"q",placeholder:(0,c.ih)("Search"),ref:o})))};window.telepath.register("wagtail.sidebar.ActionMenuItem",class{name;label;action;attrs;iconName;classNames;method;constructor({name:e,label:t,action:n,attrs:a={},icon_name:r=null,classname:i,method:s="POST"}){this.name=e,this.label=t,this.action=n,this.attrs=a,this.iconName=r,this.classNames=i,this.method=s}render({path:e,slim:t,state:n,dispatch:r,navigate:i}){return a.createElement(T,{key:this.name,item:this,path:e,slim:t,state:n,dispatch:r,navigate:i})}}),window.telepath.register("wagtail.sidebar.LinkMenuItem",v),window.telepath.register("wagtail.sidebar.SubMenuItem",w),window.telepath.register("wagtail.sidebar.PageExplorerMenuItem",class extends v{startPageId;constructor({name:e,label:t,url:n,attrs:a={},icon_name:r=null,classname:i},s){super({name:e,label:t,url:n,attrs:a,icon_name:r,classname:i}),this.startPageId=s}render({path:e,slim:t,state:n,dispatch:r,navigate:i}){return a.createElement(At,{key:this.name,item:this,path:e,slim:t,state:n,dispatch:r,navigate:i})}}),window.telepath.register("wagtail.sidebar.WagtailBrandingModule",class{homeUrl;constructor(e){this.homeUrl=e}render({slim:e,key:t,navigate:n,currentPath:r}){return a.createElement(Ft,{key:t,homeUrl:this.homeUrl,slim:e,navigate:n,currentPath:r})}}),window.telepath.register("wagtail.sidebar.SearchModule",class{searchUrl;constructor(e){this.searchUrl=e}render({slim:e,key:t,expandingOrCollapsing:n,onSearchClick:r,navigate:i}){return a.createElement(jt,{searchUrl:this.searchUrl,slim:e,key:t,expandingOrCollapsing:n,onSearchClick:r,navigate:i})}}),window.telepath.register("wagtail.sidebar.MainMenuModule",class{menuItems;accountMenuItems;user;constructor(e,t,n){this.menuItems=e,this.accountMenuItems=t,this.user=n}render({slim:e,expandingOrCollapsing:t,onHideMobile:n,key:r,currentPath:i,navigate:s}){return a.createElement(x,{menuItems:this.menuItems,accountMenuItems:this.accountMenuItems,user:this.user,slim:e,expandingOrCollapsing:t,onHideMobile:n,key:r,currentPath:i,navigate:s})}}),document.addEventListener("DOMContentLoaded",(()=>{!function(){const e={sameSite:"lax"},t=document.getElementById("wagtail-sidebar"),n=document.getElementById("wagtail-sidebar-props"),r=e=>(window.location.href=e,new Promise(p.Z));if(t&&n?.textContent){const i=window.telepath.unpack(JSON.parse(n.textContent)),o=l.get(h),c=!(void 0===o||"0"===o),u=t=>{t?(document.body.classList.add("sidebar-collapsed"),l.set(h,1,e)):(document.body.classList.remove("sidebar-collapsed"),l.set(h,0,e))};s().render(a.createElement(d,{modules:i.modules,collapsedOnLoad:c,currentPath:window.location.pathname,navigate:r,onExpandCollapse:u}),t,(()=>{document.querySelector("[data-wagtail-sidebar]")?.classList.remove("sidebar-loading")}))}}()}))}},n={};function a(e){var r=n[e];if(void 0!==r)return r.exports;var i=n[e]={id:e,loaded:!1,exports:{}};return t[e].call(i.exports,i,i.exports,a),i.loaded=!0,i.exports}a.m=t,e=[],a.O=(t,n,r,i)=>{if(!n){var s=1/0;for(u=0;u<e.length;u++){for(var[n,r,i]=e[u],o=!0,l=0;l<n.length;l++)(!1&i||s>=i)&&Object.keys(a.O).every((e=>a.O[e](n[l])))?n.splice(l--,1):(o=!1,i<s&&(s=i));if(o){e.splice(u--,1);var c=r();void 0!==c&&(t=c)}}return t}i=i||0;for(var u=e.length;u>0&&e[u-1][2]>i;u--)e[u]=e[u-1];e[u]=[n,r,i]},a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},a.d=(e,t)=>{for(var n in t)a.o(t,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),a.j=541,(()=>{var e={541:0};a.O.j=t=>0===e[t];var t=(t,n)=>{var r,i,[s,o,l]=n,c=0;if(s.some((t=>0!==e[t]))){for(r in o)a.o(o,r)&&(a.m[r]=o[r]);if(l)var u=l(a)}for(t&&t(n);c<s.length;c++)i=s[c],a.o(e,i)&&e[i]&&e[i][0](),e[i]=0;return a.O(u)},n=globalThis.webpackChunkwagtail=globalThis.webpackChunkwagtail||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})();var r=a.O(void 0,[751],(()=>a(3665)));r=a.O(r)})();