@apollosproject/canvas-embeds 2.1.2838 → 2.1.2840
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/widget/index.js +95 -95
package/widget/index.js
CHANGED
|
@@ -483,14 +483,14 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
483
483
|
...FeatureActionButtonFragment
|
|
484
484
|
}
|
|
485
485
|
}
|
|
486
|
-
`);var x7=({text:e=`Open the app`,url:t=``})=>{let n=t.startsWith(`http://`)||t.startsWith(`https://`);return(0,q.jsx)(tw,{...n?{href:t}:{to:t},surface:`solid`,children:e})},zPr=({src:e,srcDark:t,alt:n})=>(0,q.jsx)(`div`,{className:`flex space-x-2 items-center`,children:e?(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`img`,{src:e,alt:n,className:`h-6 w-auto object-contain shrink-0 dark:hidden`}),(0,q.jsx)(`img`,{src:t,alt:n,className:`h-6 w-auto object-contain shrink-0 hidden dark:block`})]}):(0,q.jsx)(uw,{as:`h3`,children:n})}),BPr=({church:e,url:t=``})=>(0,q.jsxs)(`div`,{className:`flex flex-col justify-between h-full items-center -mt-8`,children:[(0,q.jsx)(`div`,{className:`flex shrink`}),(0,q.jsxs)(`div`,{className:`flex flex-col justify-between items-center gap-y-8`,children:[(0,q.jsx)(zPr,{src:e.wordmarkLightUrl,srcDark:e.wordmarkDarkUrl}),(0,q.jsx)(`div`,{children:`Continue this experience in the app`}),(0,q.jsx)(x7,{url:t})]}),(0,q.jsx)(`div`,{className:`flex shrink`})]});COe();var VPr=({hasComments:e=!1,url:t=``})=>(0,q.jsxs)(`div`,{className:`flex flex-col justify-between h-full items-center -mt-8`,children:[(0,q.jsx)(`div`,{className:`flex shrink`}),(0,q.jsxs)(`div`,{className:`flex flex-col justify-between items-center gap-y-8`,children:[(0,q.jsx)(SOe,{size:40,className:`text-action`}),e?(0,q.jsx)(`div`,{children:`Join the conversation in the app`}):(0,q.jsx)(`div`,{children:`Be the first to comment`}),(0,q.jsx)(x7,{url:t})]}),(0,q.jsx)(`div`,{className:`flex shrink`})]});RLn();var HPr=({url:e=``})=>(0,q.jsxs)(`div`,{className:`flex flex-col justify-between h-full items-center -mt-8`,children:[(0,q.jsx)(`div`,{className:`flex shrink`}),(0,q.jsxs)(`div`,{className:`flex flex-col justify-between items-center gap-y-8`,children:[(0,q.jsx)(LLn,{size:40,className:`text-action`}),(0,q.jsx)(`div`,{children:`Answer this question in the app`}),(0,q.jsx)(x7,{url:e})]}),(0,q.jsx)(`div`,{className:`flex shrink`})]}),S7=function(e){return e[e.Comment=0]=`Comment`,e[e.Default=1]=`Default`,e[e.Like=2]=`Like`,e[e.Question=3]=`Question`,e[e.Success=4]=`Success`,e}({}),UPr=({hasLikes:e=!1,url:t=``})=>(0,q.jsxs)(`div`,{className:`flex flex-col justify-between h-full items-center -mt-8`,children:[(0,q.jsx)(`div`,{className:`flex shrink`}),(0,q.jsxs)(`div`,{className:`flex flex-col justify-between items-center gap-y-8`,children:[(0,q.jsx)(yT,{size:40,className:`text-action`}),e?(0,q.jsx)(`div`,{children:`Like this in the app`}):(0,q.jsx)(`div`,{children:`Be the first to like`}),(0,q.jsx)(x7,{url:t})]}),(0,q.jsx)(`div`,{className:`flex shrink`})]}),WPr=e=>/^https?:\/\/(localhost)(:\d+)?|(localhost)(:\d+)?|^https?:\/\/(192.\d.\d.\d)(:\d+)?|(192.\d.\d.\d)(:\d+)?/.test(e);function GPr(e){return e.replace(/-/g,`_`)}hut();var KPr=(e,t=!0,n)=>{let r=(0,S.useRef)(e);(0,S.useEffect)(()=>{r.current=e},[e]),(0,S.useEffect)(()=>{if(!t)return;let e=e=>{e.key===`Enter`&&(!n||n())&&r.current()};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[t,n])},qPr=({onClose:e,message:t,showAppButtons:n=!1,appUrl:r=``})=>(KPr(e),(0,q.jsxs)(`div`,{className:`flex flex-col justify-between h-full items-center -mt-8`,children:[(0,q.jsx)(`div`,{className:`flex shrink`}),(0,q.jsxs)(`div`,{className:`flex flex-col justify-between items-center gap-y-8`,children:[(0,q.jsx)(zM,{size:40,className:`text-action`}),(0,q.jsx)(`div`,{className:`text-center`,children:(0,q.jsx)(uw,{as:`h1`,className:`text-2xl font-semibold mb-2`,children:`Success!`})}),(0,q.jsx)(`div`,{className:`text-center max-w-sm`,children:(0,q.jsx)(uw,{className:`text-fg-secondary dark:text-fg-secondary-dark`,children:t})}),n&&r&&(0,q.jsx)(`div`,{className:`flex flex-col gap-3 w-full max-w-xs`,children:(0,q.jsx)(x7,{text:`Open the App`,url:r})})]}),(0,q.jsx)(`div`,{className:`flex shrink`})]})),JPr=({church:e,currentPageParams:t,url:n,isInteractionEnabled:r})=>{if(!aT(n))return n;if(r===!1||!r&&(!e||!e.universalLinkHost))return``;if(e?.universalLinkHost){let n=e.universalLinkHost;n.startsWith(`http`)||(n=WPr(n)?`http://${n}`:`https://${n}`);let r=t.handle?GPr(t.handle):null,i=r?`?church=${encodeURIComponent(r)}`:``;if(!aT(t.contentId))return`${n}/app-link/content/${t.contentId.replace(`Item-`,`Item:`)}${i}`;if(!aT(t.eventId))return`${n}/app-link/e/${t.eventId.replace(`Event-`,`Event:`)}${i}`;if(!aT(t.feedId))return`${n}/app-link/f/${t.feedId.replace(`Feed-`,`Feed:`)}${i}`}return``},YPr=({church:e,currentPageParams:t,hasComments:n=!1,hasLikes:r=!1,isOpen:i=!1,setIsOpen:a=cEe,type:o=S7.Default,url:s=``,message:c,isInteractionEnabled:l,theme:u})=>{let d=null,f=JPr({church:e,currentPageParams:t,url:s,isInteractionEnabled:l});switch(o){case S7.Comment:d=(0,q.jsx)(VPr,{hasComments:n,url:f});break;case S7.Like:d=(0,q.jsx)(UPr,{hasLikes:r,url:f});break;case S7.Question:d=(0,q.jsx)(HPr,{url:f});break;case S7.Success:d=(0,q.jsx)(qPr,{onClose:()=>a(!1),message:c,showAppButtons:f.length>0,appUrl:f});break;case S7.Default:default:d=(0,q.jsx)(BPr,{church:e,url:f})}return(0,q.jsx)(TDe,{isOpen:i,setIsOpen:a,theme:u,children:d})};function C7(e){let t=e.split(`/`).filter(Boolean);return t.length>0?t[0]:null}function
|
|
486
|
+
`);var x7=({text:e=`Open the app`,url:t=``})=>{let n=t.startsWith(`http://`)||t.startsWith(`https://`);return(0,q.jsx)(tw,{...n?{href:t}:{to:t},surface:`solid`,children:e})},zPr=({src:e,srcDark:t,alt:n})=>(0,q.jsx)(`div`,{className:`flex space-x-2 items-center`,children:e?(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`img`,{src:e,alt:n,className:`h-6 w-auto object-contain shrink-0 dark:hidden`}),(0,q.jsx)(`img`,{src:t,alt:n,className:`h-6 w-auto object-contain shrink-0 hidden dark:block`})]}):(0,q.jsx)(uw,{as:`h3`,children:n})}),BPr=({church:e,url:t=``})=>(0,q.jsxs)(`div`,{className:`flex flex-col justify-between h-full items-center -mt-8`,children:[(0,q.jsx)(`div`,{className:`flex shrink`}),(0,q.jsxs)(`div`,{className:`flex flex-col justify-between items-center gap-y-8`,children:[(0,q.jsx)(zPr,{src:e.wordmarkLightUrl,srcDark:e.wordmarkDarkUrl}),(0,q.jsx)(`div`,{children:`Continue this experience in the app`}),(0,q.jsx)(x7,{url:t})]}),(0,q.jsx)(`div`,{className:`flex shrink`})]});COe();var VPr=({hasComments:e=!1,url:t=``})=>(0,q.jsxs)(`div`,{className:`flex flex-col justify-between h-full items-center -mt-8`,children:[(0,q.jsx)(`div`,{className:`flex shrink`}),(0,q.jsxs)(`div`,{className:`flex flex-col justify-between items-center gap-y-8`,children:[(0,q.jsx)(SOe,{size:40,className:`text-action`}),e?(0,q.jsx)(`div`,{children:`Join the conversation in the app`}):(0,q.jsx)(`div`,{children:`Be the first to comment`}),(0,q.jsx)(x7,{url:t})]}),(0,q.jsx)(`div`,{className:`flex shrink`})]});RLn();var HPr=({url:e=``})=>(0,q.jsxs)(`div`,{className:`flex flex-col justify-between h-full items-center -mt-8`,children:[(0,q.jsx)(`div`,{className:`flex shrink`}),(0,q.jsxs)(`div`,{className:`flex flex-col justify-between items-center gap-y-8`,children:[(0,q.jsx)(LLn,{size:40,className:`text-action`}),(0,q.jsx)(`div`,{children:`Answer this question in the app`}),(0,q.jsx)(x7,{url:e})]}),(0,q.jsx)(`div`,{className:`flex shrink`})]}),S7=function(e){return e[e.Comment=0]=`Comment`,e[e.Default=1]=`Default`,e[e.Like=2]=`Like`,e[e.Question=3]=`Question`,e[e.Success=4]=`Success`,e}({}),UPr=({hasLikes:e=!1,url:t=``})=>(0,q.jsxs)(`div`,{className:`flex flex-col justify-between h-full items-center -mt-8`,children:[(0,q.jsx)(`div`,{className:`flex shrink`}),(0,q.jsxs)(`div`,{className:`flex flex-col justify-between items-center gap-y-8`,children:[(0,q.jsx)(yT,{size:40,className:`text-action`}),e?(0,q.jsx)(`div`,{children:`Like this in the app`}):(0,q.jsx)(`div`,{children:`Be the first to like`}),(0,q.jsx)(x7,{url:t})]}),(0,q.jsx)(`div`,{className:`flex shrink`})]}),WPr=e=>/^https?:\/\/(localhost)(:\d+)?|(localhost)(:\d+)?|^https?:\/\/(192.\d.\d.\d)(:\d+)?|(192.\d.\d.\d)(:\d+)?/.test(e);function GPr(e){return e.replace(/-/g,`_`)}hut();var KPr=(e,t=!0,n)=>{let r=(0,S.useRef)(e);(0,S.useEffect)(()=>{r.current=e},[e]),(0,S.useEffect)(()=>{if(!t)return;let e=e=>{e.key===`Enter`&&(!n||n())&&r.current()};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[t,n])},qPr=({onClose:e,message:t,showAppButtons:n=!1,appUrl:r=``})=>(KPr(e),(0,q.jsxs)(`div`,{className:`flex flex-col justify-between h-full items-center -mt-8`,children:[(0,q.jsx)(`div`,{className:`flex shrink`}),(0,q.jsxs)(`div`,{className:`flex flex-col justify-between items-center gap-y-8`,children:[(0,q.jsx)(zM,{size:40,className:`text-action`}),(0,q.jsx)(`div`,{className:`text-center`,children:(0,q.jsx)(uw,{as:`h1`,className:`text-2xl font-semibold mb-2`,children:`Success!`})}),(0,q.jsx)(`div`,{className:`text-center max-w-sm`,children:(0,q.jsx)(uw,{className:`text-fg-secondary dark:text-fg-secondary-dark`,children:t})}),n&&r&&(0,q.jsx)(`div`,{className:`flex flex-col gap-3 w-full max-w-xs`,children:(0,q.jsx)(x7,{text:`Open the App`,url:r})})]}),(0,q.jsx)(`div`,{className:`flex shrink`})]})),JPr=({church:e,currentPageParams:t,url:n,isInteractionEnabled:r})=>{if(!aT(n))return n;if(r===!1||!r&&(!e||!e.universalLinkHost))return``;if(e?.universalLinkHost){let n=e.universalLinkHost;n.startsWith(`http`)||(n=WPr(n)?`http://${n}`:`https://${n}`);let r=t.handle?GPr(t.handle):null,i=r?`?church=${encodeURIComponent(r)}`:``;if(!aT(t.contentId))return`${n}/app-link/content/${t.contentId.replace(`Item-`,`Item:`)}${i}`;if(!aT(t.eventId))return`${n}/app-link/e/${t.eventId.replace(`Event-`,`Event:`)}${i}`;if(!aT(t.feedId))return`${n}/app-link/f/${t.feedId.replace(`Feed-`,`Feed:`)}${i}`}return``},YPr=({church:e,currentPageParams:t,hasComments:n=!1,hasLikes:r=!1,isOpen:i=!1,setIsOpen:a=cEe,type:o=S7.Default,url:s=``,message:c,isInteractionEnabled:l,theme:u})=>{let d=null,f=JPr({church:e,currentPageParams:t,url:s,isInteractionEnabled:l});switch(o){case S7.Comment:d=(0,q.jsx)(VPr,{hasComments:n,url:f});break;case S7.Like:d=(0,q.jsx)(UPr,{hasLikes:r,url:f});break;case S7.Question:d=(0,q.jsx)(HPr,{url:f});break;case S7.Success:d=(0,q.jsx)(qPr,{onClose:()=>a(!1),message:c,showAppButtons:f.length>0,appUrl:f});break;case S7.Default:default:d=(0,q.jsx)(BPr,{church:e,url:f})}return(0,q.jsx)(TDe,{isOpen:i,setIsOpen:a,theme:u,children:d})},XPr=`pendingActionNonce`,ZPr=`apollos.pendingActionNonce`;function QPr(){let e=new Uint8Array(16);return crypto.getRandomValues(e),Array.from(e,e=>e.toString(16).padStart(2,`0`)).join(``)}function $Pr(){try{let e=QPr();return sessionStorage.setItem(ZPr,e),e}catch{return null}}function C7(e){let t=e.split(`/`).filter(Boolean);return t.length>0?t[0]:null}function eFr(e,t){return`/${e}/auth/login?redirectTo=${encodeURIComponent(t)}`}function tFr(e,t,n){let r=new URL(t,window.location.origin);r.searchParams.set(`pendingAction`,n.type),n.type===`pollVote`?(r.searchParams.set(`pollId`,n.pollId),r.searchParams.set(`optionIds`,btoa(JSON.stringify(n.optionIds)))):n.type===`connect`&&(r.searchParams.set(`featureId`,n.featureId),r.searchParams.set(`tagIds`,btoa(JSON.stringify(n.tagIds))));let i=$Pr();return i&&r.searchParams.set(XPr,i),eFr(e,r.pathname+r.search)}var nFr=({feature:e,currentChurch:t,userProfile:n,showSuccessModal:r=!1})=>{let i=zOe(),[a,o]=(0,S.useState)(!1);(0,S.useEffect)(()=>{r&&o(!0)},[r]);try{if(!e)return console.error(`ConnectButtonFeature: No feature data provided`),(0,q.jsx)(`div`,{className:`connect-button-container text-center mt-8 mb-10`,children:(0,q.jsx)(`div`,{className:`text-red-500`,children:`Error: No feature data`})});let r=e.title||`Register`,s=e.confirmationMessage||``,c=Array.isArray(e.tags)?e.tags.filter(e=>e!=null):[];return!r&&!s?(console.warn(`ConnectButtonFeature: Missing required fields`,e),(0,q.jsx)(`div`,{className:`connect-button-container text-center mt-8 mb-10`,children:(0,q.jsx)(`div`,{className:`text-gray-500`,children:`Connect Button (Configuration needed)`})})):(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`div`,{className:`connect-button-container text-center mt-8 mb-10`,children:(0,q.jsx)(`div`,{className:`max-w-md mx-auto`,children:(0,q.jsx)(tw,{surface:`solid`,className:`w-full`,wrap:!0,onClick:()=>{if(aT(n?.id)){let t=window.location.pathname,n=C7(t);if(!n){console.error(`ConnectButtonFeature: No handle found in path`);return}let r=tFr(n,t,{type:`connect`,tagIds:c,featureId:e.id});window.location.href=r}else{let e=new FormData;if(e.append(`_action`,`connectButton`),fetch(window.location.pathname,{method:`POST`,body:e}).catch(e=>{console.error(`ConnectButtonFeature: connect button action failed`,e)}),o(!0),!aT(c))try{let e=i?.({personId:n.id,tagIds:c});Promise.resolve(e).catch(e=>{console.error(`ConnectButtonFeature: addPersonTagAssociation failed`,e)})}catch(e){console.error(`ConnectButtonFeature: addPersonTagAssociation threw`,e)}}},children:r})})}),(0,q.jsx)(YPr,{type:S7.Success,currentPageParams:{},isOpen:a,setIsOpen:o,church:t,message:s})]})}catch(e){return console.error(`Error rendering ConnectButtonFeature:`,e),(0,q.jsx)(`div`,{className:`connect-button-container text-center mt-8 mb-10`,children:(0,q.jsx)(`div`,{className:`text-red-500`,children:`Error rendering Connect Button`})})}};Xw(`
|
|
487
487
|
fragment ConnectButtonFeatureFragment on ConnectButtonFeature {
|
|
488
488
|
id
|
|
489
489
|
title
|
|
490
490
|
confirmationMessage
|
|
491
491
|
tags
|
|
492
492
|
}
|
|
493
|
-
`);var
|
|
493
|
+
`);var rFr=({feature:e})=>e.chips?.length?(0,q.jsxs)(`div`,{className:`mb-8`,children:[(0,q.jsx)(Iw,{variant:`section`,title:e.title,subtitle:e.subtitle}),(0,q.jsx)(`div`,{className:`mt-4 flex items-center gap-x-2 pb-4 -mx-4 px-4 overflow-x-auto no-scrollbar gradient-mask-r-[transparent,rgba(0,0,0,1)_1em,rgba(0,0,0,1)_95%,transparent_100%]`,children:e.chips.map(e=>e?(0,q.jsx)(ST,{action:e.action??void 0,relatedNode:e.relatedNode??void 0,analyticsTitle:e.title??void 0,children:(0,q.jsxs)(tw,{pill:!0,children:[(0,q.jsx)(o5,{iconName:e?.iconName??void 0}),e.title]})},e.id):null)})]}):null;Xw(`
|
|
494
494
|
fragment ChipListFeatureFragment on ChipListFeature {
|
|
495
495
|
title
|
|
496
496
|
subtitle
|
|
@@ -505,7 +505,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
505
505
|
}
|
|
506
506
|
}
|
|
507
507
|
}
|
|
508
|
-
`);var
|
|
508
|
+
`);var iFr=(e,t)=>e.trim().toLowerCase()===t.trim().toLowerCase(),aFr=(e,{showSeries:t=!0}={})=>{if(e.labelText)return e.labelText;if(!t)return;let n=e.relatedNode;if(!n||!(`parentItem`in n))return;let r=n.parentItem?.title;if(r&&!(e.title&&iFr(r,e.title)))return r},oFr=({card:e,tile:t=!1,titleVariant:n,showSeries:r=!0})=>(0,q.jsx)(ST,{action:e.action??void 0,relatedNode:e.relatedNode??void 0,analyticsTitle:e.title??void 0,children:(0,q.jsx)(cke,{coverImage:e.coverImage??void 0,icon:e?.actionIcon?(0,q.jsx)(o5,{iconName:e?.actionIcon}):void 0,title:e.title??void 0,labelText:aFr(e,{showSeries:r}),summary:e.summary??void 0,tile:t,titleVariant:n,relatedNode:e.relatedNode})},e.id);Xw(`
|
|
509
509
|
fragment FeatureContentCardFragment on CardListItem {
|
|
510
510
|
id
|
|
511
511
|
action
|
|
@@ -534,7 +534,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
534
534
|
...ActionHandlerFragment
|
|
535
535
|
}
|
|
536
536
|
}
|
|
537
|
-
`);var
|
|
537
|
+
`);var sFr=({feature:e})=>{let{isInline:t,cardGrid:n=t}=sT();if(!e.cards?.length)return null;let r=n&&e.cards.filter(Boolean).length>1;return(0,q.jsxs)(`div`,{className:`mb-8`,children:[(0,q.jsx)(Iw,{variant:`section`,title:e.title,subtitle:e.subtitle}),(0,q.jsx)(`div`,{"data-testid":`vertical-card-list`,className:r?`mt-4 grid grid-cols-1 gap-x-6 gap-y-8 pb-4 sm:grid-cols-2 md:grid-cols-3`:`flex flex-col mt-4 gap-y-8 pb-4`,children:e.cards?.map(e=>e?(0,q.jsx)(oFr,{card:e,tile:r,showSeries:!1},e.id):null)})]})};Xw(`
|
|
538
538
|
fragment VerticalCardListFeatureFragment on VerticalCardListFeature {
|
|
539
539
|
title
|
|
540
540
|
subtitle
|
|
@@ -542,7 +542,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
542
542
|
...FeatureContentCardFragment
|
|
543
543
|
}
|
|
544
544
|
}
|
|
545
|
-
`);var
|
|
545
|
+
`);var cFr=({feature:e})=>{let{isInline:t}=sT();if(!e.heroCard&&!e.actions?.length)return null;let n=(e.actions??[]).filter(e=>!!e),r=n.some(e=>xke(e.action,e.relatedNode));return(0,q.jsxs)(`div`,{className:`mb-8 flex flex-col gap-y-4`,children:[(0,q.jsxs)(`div`,{children:[(0,q.jsx)(Iw,{variant:`section`,title:e.title,subtitle:e.subtitle}),e.primaryAction&&r?(0,q.jsx)(ywr,{action:e.primaryAction}):null]}),e.heroCard?(0,q.jsx)(oFr,{card:e.heroCard,titleVariant:`hero`}):null,n.length?t?(0,q.jsx)(`div`,{"data-testid":`hero-list-actions`,className:`mt-2 grid grid-cols-1 gap-x-6 gap-y-8 sm:grid-cols-2 md:grid-cols-3`,children:n.map(e=>(0,q.jsx)(_wr,{item:e,tile:!0},e.id))}):(0,q.jsx)(Sw,{className:`mt-2`,"data-testid":`hero-list-actions`,children:n.map(e=>(0,q.jsx)(_wr,{item:e},e.id))}):null]})};Xw(`
|
|
546
546
|
fragment HeroListFeatureFragment on HeroListFeature {
|
|
547
547
|
title
|
|
548
548
|
subtitle
|
|
@@ -559,7 +559,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
559
559
|
...FeatureActionButtonFragment
|
|
560
560
|
}
|
|
561
561
|
}
|
|
562
|
-
`);var
|
|
562
|
+
`);var lFr=({feature:e})=>e.cards?.length?(0,q.jsxs)(`div`,{className:`mb-10`,children:[(0,q.jsxs)(`div`,{className:`mb-4`,children:[(0,q.jsx)(Iw,{variant:`section`,title:e.title,subtitle:e.subtitle,className:`mb-0`}),e.primaryAction?(0,q.jsx)(ywr,{action:e.primaryAction}):null]}),(0,q.jsx)(cOe,{children:e.cards?.map(e=>e?(0,q.jsx)(oFr,{card:e,tile:!0},e.id):null)})]}):null;Xw(`
|
|
563
563
|
fragment HorizontalCardListFeatureFragment on HorizontalCardListFeature {
|
|
564
564
|
title
|
|
565
565
|
subtitle
|
|
@@ -570,7 +570,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
570
570
|
...FeatureActionButtonFragment
|
|
571
571
|
}
|
|
572
572
|
}
|
|
573
|
-
`);var
|
|
573
|
+
`);var uFr=({start:e,durationInSeconds:t})=>{let[n,r]=(0,S.useState)(new Date);if((0,S.useEffect)(()=>{let e=setInterval(()=>{r(new Date)},1e3);return()=>clearInterval(e)},[]),!e||!t)return{countdown:``,isLive:!1};let i=new Date(e),a=new Date(e);a.setSeconds(a.getSeconds()+t);let o=n>=i&&n<=a;return{countdown:o?`Live now`:iTe(i,{addSuffix:!0}),isLive:o}};_Nn();var dFr=({item:e})=>{let t=e.relatedNode,{isLive:n,countdown:r}=uFr({start:t?.start??void 0,durationInSeconds:t?.durationInSeconds??void 0});return e?(0,q.jsxs)(ST,{action:e.action??`OPEN_NODE`,relatedNode:e.relatedNode??void 0,analyticsTitle:e.title??void 0,className:`group relative`,children:[(0,q.jsx)(sw,{interactive:!0,children:(0,q.jsxs)(`div`,{className:`overflow-hidden`,children:[(0,q.jsx)(lw,{src:e.coverImage?.sources?.[0]?.uri??void 0,className:`aspect-video`}),(0,q.jsx)(Vw,{className:Jx(`absolute top-2 left-2`,n?`!text-action`:``),color:`material`,children:n?(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(o$,{size:12,weight:`fill`}),`Live Now`]}):r})]})}),(0,q.jsx)(Iw,{className:`mt-2`,title:e.title??void 0,label:aFr(e),summary:e.summary,micro:!0})]}):null},fFr=({feature:e})=>e.items?.length?(0,q.jsxs)(`div`,{className:`mb-10`,children:[(0,q.jsxs)(`div`,{className:`mb-4`,children:[(0,q.jsx)(Iw,{variant:`section`,title:e.title,subtitle:e.subtitle,className:`mb-0`}),e.primaryAction?(0,q.jsx)(ywr,{action:e.primaryAction}):null]}),(0,q.jsx)(cOe,{children:e.items?.map(e=>e?(0,q.jsx)(dFr,{item:e},e.id):null)})]}):null;Xw(`
|
|
574
574
|
fragment HorizontalMediaListFeatureFragment on HorizontalMediaListFeature {
|
|
575
575
|
title
|
|
576
576
|
subtitle
|
|
@@ -588,7 +588,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
588
588
|
...FeatureActionButtonFragment
|
|
589
589
|
}
|
|
590
590
|
}
|
|
591
|
-
`),zEn(),bOt();var
|
|
591
|
+
`),zEn(),bOt();var pFr=30,mFr=1,hFr=({items:e=[],size:t=pFr,ellipses:n=!0,maxDisplay:r=mFr})=>{let i=e.length&&e.length<r?e.length:r,a=e.length?e.slice(0,i):[];return a?.length?(0,q.jsxs)(`div`,{className:`flex items-center`,"data-testid":`avatar-list`,children:[a.map((e,n)=>e?.id?(0,q.jsx)(`div`,{className:`relative`,style:{width:t,height:t,marginLeft:n>0?t*-.3:0,zIndex:n+1},children:(0,q.jsx)(rw,{src:e.photo?.uri,initials:`${e.firstName?.charAt(0)||``}${e.lastName?.charAt(0)||``}`,className:`w-full h-full relative`,style:{fontSize:t*.25}})},`${e.id}-${n}`):null),n&&e.length>r&&(0,q.jsx)(`div`,{className:`flex items-center justify-center rounded-full border-2 bg-gray-300 dark:bg-gray-600 backdrop-blur-md border-system-chrome dark:border-system-chrome-dark`,style:{width:t,height:t,marginLeft:t*-.3,zIndex:a.length+1},"data-testid":`avatar-list-ellipsis`,children:(0,q.jsx)(yOt,{className:`text-fg-secondary dark:text-fg-secondary-dark`,size:24,weight:`bold`})})]}):null};RLn();var gFr=({children:e,church:t,enableCTA:n,engagementData:r,allowPublicResponses:i})=>{let a=nAe(),[o,s]=(0,S.useState)(!1),c=i===!1,l=e=>e?.person?.id??e?.id,u=r?.comments?.filter((e,t,n)=>n.findIndex(t=>l(t)===l(e))===t)?.map(e=>({id:e.id,firstName:e?.person?.firstName,lastName:e?.person?.lastName,photo:e?.person?.photo}))||[],d=()=>n?s(!0):void 0,f=n?(0,q.jsxs)(tw,{type:`button`,surface:`tinted`,small:!0,className:`overflow-visible`,onClick:e=>{e.stopPropagation(),s(!0)},children:[(0,q.jsx)(REn,{weight:`fill`,size:17}),`Answer`]}):null;return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(sw,{className:`question-block-card mb-4 overflow-visible p-4`,childRadius:!1,interactive:!!n,"data-testid":`question-block`,onClick:d,children:(0,q.jsxs)(`div`,{className:`flex flex-col gap-y-6`,children:[(0,q.jsx)(LLn,{weight:`fill`,size:32,className:`text-fg-tertiary dark:text-fg-tertiary-dark`}),(0,q.jsx)(`div`,{children:e}),c?(0,q.jsxs)(`div`,{className:`flex items-center gap-4`,children:[f,(0,q.jsx)(uw,{as:`small`,fg:`secondary`,children:`Your answer is private`})]}):n||u.length>0||r?.commentCount?(0,q.jsxs)(`div`,{className:`flex items-center gap-4`,children:[f,u.length>0?(0,q.jsx)(hFr,{items:u,maxDisplay:3}):null,r?.commentCount?(0,q.jsxs)(uw,{as:`small`,fg:`secondary`,children:[r.commentCount,` response`,r.commentCount===1?``:`s`]}):null]}):null]})}),(0,q.jsx)(YPr,{type:S7.Question,currentPageParams:a,isOpen:o,setIsOpen:s,church:t,isInteractionEnabled:n})]})},_Fr=({church:e,feature:t,enableCTA:n=!1})=>{let r={commentCount:t.commentCount,comments:t.comments?.map(e=>({id:e.id,person:e?.person}))||[]};return(0,q.jsx)(gFr,{church:e,engagementData:r,enableCTA:n,allowPublicResponses:t.allowPublicResponses,children:(0,q.jsx)(wT,{html:t?.content??void 0})})};Xw(`
|
|
592
592
|
fragment QuestionBlockFeatureFragment on QuestionBlockFeature {
|
|
593
593
|
content
|
|
594
594
|
allowPublicResponses
|
|
@@ -621,7 +621,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
621
621
|
}
|
|
622
622
|
}
|
|
623
623
|
}
|
|
624
|
-
`),hut(),Dut(),zdt(),d4n();var
|
|
624
|
+
`),hut(),Dut(),zdt(),d4n();var vFr=e=>e.followUp?.id||e.followUp?.html||``,yFr=e=>{let t=new Set;return e.filter(e=>{if(!e)return!1;let n=vFr(e);return!n||t.has(n)?!1:(t.add(n),!0)})},bFr=(e,t,n)=>e.includes(t)?{ids:e.filter(e=>e!==t),action:`deselected`}:{ids:[...n>0&&e.length>=n?e.slice(Math.max(0,e.length-n+1)):e,t],action:`selected`},xFr=({poll:e,userProfile:t,revealFollowUps:n})=>{let r=qx(),[i,a]=(0,S.useState)([]),[o,s]=(0,S.useState)(!1),[c,l]=(0,S.useState)(void 0),u=!!t?.id,d=e?.maxSelections??1,f=d===1?`SingleChoice`:`MultiChoice`,p=f===`MultiChoice`,m=d===0?e?.options?.length??0:d,h=p&&m>1,g=p?Eut:zM,_=p?u4n:Rdt,v=e?.totalOptionVotes||0,y=e?.currentUserVotes||[],b=y.length>0,x=(0,S.useMemo)(()=>{if(typeof window>`u`)return;let[,e]=window.location.pathname.split(`/c/`);return e||void 0},[]),C=new Set(y.map(e=>e?.option?.id).filter(Boolean));(0,S.useEffect)(()=>{e&&r.track(`Poll Viewed`,{pollId:e.id,pollTitle:e.title,pollStatus:e.status,optionCount:e.options?.length||0,hasExistingVote:b,contentId:x})},[r,x,b,e]);let w=t=>{if(!e||e.status!==`Active`||o||b)return;let n=e.options?.find(e=>e?.id===t),{ids:s,action:c}=bFr(i,t,d);a(s),r.track(`Poll Option Selected`,{pollId:e.id,optionId:t,optionValue:n?.value,action:c})},T=async()=>{if(i.length!==0&&e){if(u)await E();else{let t=window.location.pathname,n=C7(t);if(!n){l(`Unable to proceed. Please try again.`);return}let r=tFr(n,t,{type:`pollVote`,pollId:e.id,optionIds:i});window.location.href=r}}},E=async()=>{if(e){s(!0),l(void 0);try{let t=C7(window.location.pathname)||``,n=new FormData;n.append(`_action`,`submitVote`),n.append(`pollId`,e.id),n.append(`optionIds`,JSON.stringify(i)),n.append(`church`,t);let a=await fetch(`/api/poll-vote`,{method:`POST`,body:n});if(!a.ok)throw Error(`Failed to save your selection`);let o=await a.json();if(o.success){let t=e.options?.filter(e=>e?.id?i.includes(e.id):!1)||[];r.track(`Poll Vote Submitted`,{pollId:e.id,pollTitle:e.title,optionIds:i,optionValues:t.map(e=>e?.value||``),optionCount:i.length,mode:f,isChangeVote:b,contentId:x}),window.location.reload()}else r.track(`Poll Vote Failed`,{pollId:e.id,error:o.message||`Failed to save your selection`}),l(o.message||`Failed to save your selection`)}catch(t){let n=t instanceof Error?t.message:`Failed to save your selection`;r.track(`Poll Vote Failed`,{pollId:e.id,error:n}),l(`Failed to save your selection. Please try again.`),console.error(`PollView: Error in submitVoteDirectly`,t)}finally{s(!1)}}},D=e?.status===`Active`&&i.length>0&&!b,O=e?.showResults??!0,k=O&&(e?.status!==`Active`||b);if(!e)return null;let A=yFr((e.options||[]).filter(e=>e?.followUp?.html?n?!0:e.id?C.has(e.id):!1:!1));return(0,q.jsx)(q.Fragment,{children:(0,q.jsxs)(`div`,{className:`bg-system-chrome shadow-sm dark:bg-material-regular-dark rounded-xl backdrop-blur-md p-4 my-4 dark:border-white/5 dark:border`,children:[(0,q.jsxs)(`div`,{className:`mt-0 flex flex-col gap-1`,children:[(0,q.jsx)(`div`,{className:`font-semibold text-2xl`,children:e.title}),h?(0,q.jsxs)(`div`,{className:`text-sm text-fg-secondary dark:text-fg-secondary-dark`,children:[`Max of `,m]}):null]}),(0,q.jsx)(`div`,{className:`mt-5 flex flex-col gap-3`,children:e.options?.map((t,n)=>{let r=i.includes(t?.id||``),a=t?.value||``,s=t?.id||``,c=t?.totalVotes||0,l=v>0?c/v*100:0,u=C.has(s),d=e.status===`Active`&&!o&&!b;return(0,q.jsxs)(`div`,{"data-testid":`poll-option-${s}`,className:`flex flex-row gap-2 items-center border rounded-3xl transition-colors relative overflow-hidden ${d?r?`bg-action/10 border-action dark:border-action-dark cursor-pointer`:`text-fg-secondary dark:text-fg-primary-dark border-system-thin dark:border-system-regular-dark hover:bg-system-regular dark:hover:bg-system-regular-dark cursor-pointer`:`text-fg-secondary dark:text-fg-primary-dark border-system-thin dark:border-system-regular-dark cursor-not-allowed`}`,onClick:()=>w(s),children:[k?(0,q.jsx)(`div`,{className:`absolute left-0 top-0 bottom-0 transition-all duration-300 ${u?`bg-action/20 dark:bg-action-dark/20`:`bg-system-regular/40 dark:bg-system-regular-dark/40`}`,style:{width:`${l}%`}}):null,(0,q.jsxs)(`div`,{className:`relative flex flex-row gap-2 items-center p-2 flex-1`,children:[r||u?(0,q.jsx)(g,{weight:`fill`,size:24,className:`text-action`}):(0,q.jsx)(_,{weight:`thin`,size:24,className:k?`opacity-0`:``}),(0,q.jsx)(`span`,{className:`flex-1 ${u?`font-semibold`:``}`,children:a}),k?(0,q.jsxs)(`div`,{className:`flex flex-row gap-3 items-center`,children:[(0,q.jsxs)(`span`,{className:`text-sm ${u?`font-semibold`:`text-fg-secondary dark:text-fg-secondary-dark`}`,children:[l.toFixed(0),`%`]}),(0,q.jsx)(`span`,{className:`text-xs text-fg-secondary dark:text-fg-secondary-dark min-w-[24px] text-right`,children:c})]}):null]})]},`option-${s||n}`)})}),A.length?(0,q.jsx)(`div`,{className:`mt-4 flex flex-col gap-3`,"data-testid":`poll-follow-ups`,children:A.map(e=>(0,q.jsx)(wT,{html:e?.followUp?.html??void 0},vFr(e)||e?.id))}):null,D?(0,q.jsx)(`div`,{className:`mt-4`,children:(0,q.jsx)(tw,{onClick:T,disabled:o,surface:`solid`,className:`w-full`,children:o?`Saving...`:`Submit`})}):null,c?(0,q.jsx)(`div`,{className:`mt-2 text-red-500 text-sm`,children:c}):null,O?(0,q.jsx)(`div`,{className:`mt-3 flex flex-row gap-4 items-center justify-between px-1`,children:(0,q.jsxs)(`div`,{className:`text-fg-secondary dark:text-fg-secondary-dark text-sm text-action`,children:[v,` `,v===1?`response`:`responses`]})}):null]})})},SFr=({feature:e,church:t,userProfile:n,isInteractionEnabled:r,theme:i})=>e.poll?.status&&e.poll.status!==`Inactive`?(0,q.jsx)(xFr,{poll:e.poll,church:t,userProfile:n,isInteractionEnabled:r,theme:i}):null;Xw(`
|
|
625
625
|
fragment PollFeatureFragment on PollFeature {
|
|
626
626
|
poll {
|
|
627
627
|
id
|
|
@@ -651,7 +651,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
651
651
|
}
|
|
652
652
|
}
|
|
653
653
|
}
|
|
654
|
-
`),MNt();var
|
|
654
|
+
`),MNt();var CFr=new Intl.NumberFormat(`en-US`,{style:`currency`,currency:`USD`}),wFr=e=>e===`NUMBER`||e===`CURRENCY`;function TFr(e){if(e==null)return null;let t=String(e).replace(/[$,]/g,``).trim();if(t===``)return null;let n=Number(t);return Number.isFinite(n)?n:null}function EFr(e,t){if(!e)return``;if(!wFr(t))return e;let n=TFr(e);return n==null?e:t===`CURRENCY`?CFr.format(n):Number(n).toFixed(2)}function DFr(e){let t=e?.parent,n=t?.id;return n?{id:n,title:t?.title}:null}function OFr(e){return e?.poll?.title||e?.content||e?.title||``}function kFr(e){return e?.allowPublicResponses===!1}function AFr(e){return e?.poll?.currentUserVotes?.map(e=>e?.option?.value).filter(e=>!!e)??[]}function jFr(e){if(e?.formulaDisplay&&e.result)return{role:`formula`,formulaDisplay:e.formulaDisplay,result:e.result};let t=e?.source,n=AFr(t);if(n.length)return{role:`poll`,options:n};let r=EFr(t?.currentUserAnswer?.text,t?.answerType);return r?{role:`answer`,text:r,numeric:wFr(t?.answerType)}:{role:`empty`}}gOe();var MFr=e=>String(e||``).replace(/<[^>]+>/g,` `).replace(/ /gi,` `).replace(/\s+/g,` `).trim(),NFr=({feature:e,userProfile:t})=>{let n=e.source,r=DFr(n),i=r?.title,a=n?.pageNumber??null,o=kFr(n),s=r?.id?{contentId:r.id}:void 0,c=MFr(OFr(n)),l=jFr({source:n,formulaDisplay:e.formulaDisplay,result:e.result}),u=c?(0,q.jsxs)(`div`,{className:`mt-2.5 flex items-center gap-2 border-t border-system-regular pt-2.5 dark:border-system-regular-dark`,children:[(0,q.jsx)(uw,{as:`small`,fg:`tertiary`,className:`min-w-0 flex-1`,children:i?`${c} · ${i}`:c}),s?(0,q.jsx)(tw,{to:s,surface:`ghost`,small:!0,className:`!text-action`,children:`Edit`}):null]}):null;if(l.role===`empty`){let e=i&&a?`Answer it on ${i}, page ${a}`:i?`Answer it on ${i}`:`Edit`;return(0,q.jsx)(sw,{className:`mb-6`,"data-testid":`recall-unanswered`,children:(0,q.jsxs)(cw,{className:`border border-dashed border-system-regular dark:border-system-regular-dark`,children:[c?(0,q.jsx)(uw,{as:`p`,className:`mb-2`,children:c}):null,(0,q.jsx)(uw,{as:`p`,fg:`tertiary`,children:`Not answered yet`}),s?(0,q.jsxs)(tw,{to:s,surface:`ghost`,className:`mt-1 !justify-start !text-action`,iconProps:{color:`currentColor`},children:[e,(0,q.jsx)(hOe,{})]}):null]})})}return(0,q.jsx)(sw,{className:`mb-6`,"data-testid":`recall-answered`,children:(0,q.jsxs)(cw,{children:[(0,q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[t?(0,q.jsxs)(`div`,{className:`flex min-w-0 flex-1 items-center gap-1.5 [&>div]:pb-0`,children:[(0,q.jsx)(lOe,{person:t}),(0,q.jsx)(Vw,{color:`system`,children:`You`})]}):null,o?(0,q.jsxs)(Vw,{color:`system`,children:[(0,q.jsx)(jNt,{size:12}),`Only you`]}):null]}),l.role===`formula`?(0,q.jsxs)(`div`,{className:`mt-2.5`,children:[(0,q.jsx)(uw,{as:`p`,fg:`secondary`,className:`tabular-nums`,children:l.formulaDisplay}),(0,q.jsx)(uw,{as:`h2`,className:`font-extrabold tracking-tight tabular-nums`,children:l.result})]}):l.role===`poll`?(0,q.jsx)(`div`,{className:`mt-2.5 flex flex-wrap gap-1.5`,children:l.options.map(e=>(0,q.jsx)(Vw,{color:`action`,className:`rounded-full`,children:e},e))}):(0,q.jsx)(uw,{as:l.numeric?`h2`:`p`,className:l.numeric?`mt-2.5 font-extrabold tracking-tight tabular-nums`:`mt-2.5`,children:l.text}),u]})})};Xw(`
|
|
655
655
|
fragment RecallFeatureFragment on RecallFeature {
|
|
656
656
|
id
|
|
657
657
|
formula
|
|
@@ -705,7 +705,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
705
705
|
}
|
|
706
706
|
}
|
|
707
707
|
}
|
|
708
|
-
`),OVe();var
|
|
708
|
+
`),OVe();var PFr=(e,t)=>{let n=Array.from({length:e},()=>null);return(t||[]).forEach(t=>{t&&t.questionIndex>=0&&t.questionIndex<e&&typeof t.optionIndex==`number`&&(n[t.questionIndex]=t.optionIndex)}),n},FFr=e=>{let t=e.findIndex(e=>e==null);return t===-1?Math.max(0,e.length-1):t},IFr=e=>e.flatMap((e,t)=>e==null?[]:[{questionIndex:t,optionIndex:e}]),LFr=e=>!!e,RFr=(e,t,n,r)=>{let i=(e||[]).filter(Boolean),a=(t||[]).filter(Boolean),o={};i.forEach(e=>{o[e.id]=0});let s=new Map;r?.forEach(e=>{e&&s.set(e.questionIndex,e)});let c=0,l=0;a.forEach((e,t)=>{let r=n[t];if(r==null)return;c+=1;let i=(e.options||[])[r],a=s.get(t),u=a&&a.optionIndex===r&&(a.categoryId!=null||a.weight!=null),d=u?a.categoryId??i?.categoryId??null:i?.categoryId??null,f=u?a.weight??i?.weight??0:i?.weight??0;(!i?.scoresNothing||u)&&d!=null&&(d in o?o[d]+=f:l+=1)});let u=Object.values(o).reduce((e,t)=>e+t,0);return{totals:o,ranked:i.map((e,t)=>({category:e,score:o[e.id]??0,authored:t,pct:u?Math.round((o[e.id]??0)/u*100):0})).sort((e,t)=>t.score-e.score||e.authored-t.authored),sum:u,answered:c,remaining:a.length-c,ignored:l,complete:a.length>0&&c===a.length}},zFr=({feature:e,isInteractionEnabled:t=!0,userProfile:n})=>{let r=(0,S.useMemo)(()=>(e.questions||[]).filter(Boolean),[e.questions]),i=(0,S.useMemo)(()=>(e.categories||[]).filter(Boolean),[e.categories]),a=(0,S.useRef)(!1),o=(0,S.useRef)(null),s=(0,S.useRef)(0),[c,l]=(0,S.useState)(!1),[u,d]=(0,S.useState)(!1),[f,p]=(0,S.useState)(0),[m,h]=(0,S.useState)(e.currentUserResponse),[g,_]=(0,S.useState)(()=>PFr(r.length,e.currentUserResponse?.answers)),[v,y]=(0,S.useState)(e.currentUserResponse?.resultCategoryId??null),b=RFr(i,r,g,m?.answers),x=LFr(m?.completedAt),C=r[f],w=!!n?.id,T=r.length?f+1:0,E=r.length>0?T/r.length*100:0,D=()=>{let t=e.assessment?.id;if(!t)return null;let n=C7(window.location.pathname);return n?{assessmentId:t,church:n}:null},O=async(e,t)=>{let n=D();if(!n)return;let{assessmentId:r,church:i}=n,a=s.current+1;s.current=a;let o=new FormData;o.append(`_action`,e),o.append(`assessmentId`,r),o.append(`answers`,JSON.stringify(IFr(t))),o.append(`church`,i);try{let t=await fetch(`/api/assessment`,{method:`POST`,body:o}),n=await t.json().catch(()=>null);if(!t.ok||n?.success===!1){console.error(`Assessment save rejected:`,e,t.status);return}if(n?.success&&n.response){if(a!==s.current)return;h(n.response),n.response.resultCategoryId&&y(n.response.resultCategoryId)}}catch(e){console.error(`Assessment save failed:`,e)}},k=()=>{let e=C7(window.location.pathname);if(!e)return;let t=`${window.location.pathname}${window.location.search}`;window.location.href=eFr(e,t)},A=e=>{w?t&&(e===`edit`?(l(!0),o.current={answers:g,response:m},_(PFr(r.length,m?.answers)),p(0)):(l(!1),p(FFr(g))),d(!0)):k()},ee=()=>{if(d(!1),a.current)a.current=!1,o.current=null,l(!1);else if(c){l(!1);let e=o.current;o.current=null,_(e?e.answers:PFr(r.length,m?.answers)),e&&h(e.response)}};return{answers:g,categories:i,choose:e=>{if(!C)return;let t=[...g];if(t[f]=e,_(t),f===r.length-1){let e=D();if(!e)return;a.current=!0,h({assessment:{id:e.assessmentId},answers:IFr(t).map(e=>({...e,categoryId:null,weight:null})),resultCategoryId:m?.resultCategoryId??null,completedAt:m?.completedAt??new Date().toISOString()}),ee(),O(`submit`,t)}else c||O(`saveProgress`,t),p(f+1)},closeSheet:ee,complete:x,current:T,cursor:f,editing:c,localResponse:m,openSheet:A,progressPct:E,question:C,questions:r,readingId:v,score:b,setCursor:p,setReadingId:y,sheetOpen:u}},BFr=({feature:e,isInteractionEnabled:t=!0,userProfile:n})=>{let{answers:r,choose:i,closeSheet:a,complete:o,current:s,cursor:c,localResponse:l,openSheet:u,progressPct:d,question:f,questions:p,readingId:m,score:h,setCursor:g,setReadingId:_,sheetOpen:v}=zFr({feature:e,isInteractionEnabled:t,userProfile:n});if(!p.length)return null;let y=l?.resultCategoryId??null??h.ranked[0]?.category.id??null,b=m||y,x=h.ranked.find(e=>e.category.id===b);return(0,q.jsxs)(q.Fragment,{children:[o?(0,q.jsx)(sw,{className:`my-4`,children:(0,q.jsxs)(cw,{children:[(0,q.jsxs)(`div`,{className:`mb-4 flex items-center justify-between`,children:[(0,q.jsx)(uw,{as:`h5`,children:`Your result`}),t?(0,q.jsx)(tw,{surface:`ghost`,onClick:()=>u(`edit`),children:`Edit`}):null]}),(0,q.jsx)(`div`,{className:`flex flex-col gap-2`,children:h.ranked.map(e=>{let t=e.category.id===b,n=e.category.id===y;return(0,q.jsxs)(`button`,{"aria-pressed":t,type:`button`,className:`relative overflow-hidden rounded-xl border px-3 py-3 text-left ${t?`border-action`:`border-system-regular dark:border-system-regular-dark`}`,onClick:()=>_(e.category.id),children:[(0,q.jsx)(`span`,{className:`absolute inset-y-0 left-0 ${n?`bg-action/20`:`bg-system-regular/40`}`,style:{width:`${e.pct}%`}}),(0,q.jsxs)(`span`,{className:`relative flex items-center justify-between gap-3`,children:[(0,q.jsx)(`span`,{className:`text-fg-primary dark:text-fg-primary-dark ${n?`font-bold`:`font-medium`}`,children:e.category.value}),(0,q.jsxs)(`span`,{className:`text-sm text-fg-secondary dark:text-fg-secondary-dark`,children:[(0,q.jsxs)(`b`,{className:`text-fg-primary dark:text-fg-primary-dark`,children:[e.pct,`%`]}),` `,e.score]})]})]},e.category.id)})}),x?(0,q.jsxs)(`div`,{className:`mt-4`,children:[(0,q.jsx)(uw,{as:`h5`,className:`mb-1`,children:x.category.id===y?x.category.value:`${x.category.value} · not your result`}),(0,q.jsx)(uw,{as:`p`,children:x.category.finishingPrompt})]}):null]})}):(0,q.jsx)(sw,{className:`my-4`,children:(0,q.jsxs)(cw,{children:[(0,q.jsxs)(uw,{as:`p`,fg:`secondary`,className:`mb-3`,children:[p.length,` `,p.length===1?`question`:`questions`]}),(0,q.jsx)(tw,{surface:`solid`,className:`w-full`,disabled:!t&&!!n?.id||p.length===0,onClick:()=>u(`resume`),children:h.answered===0?`Start`:`Continue`}),n?.id?null:(0,q.jsx)(uw,{as:`p`,fg:`secondary`,className:`mt-3`,children:`Sign in to take this assessment`})]})}),(0,q.jsxs)(TDe,{isOpen:v,setIsOpen:e=>{e||a()},children:[(0,q.jsxs)(uw,{as:`p`,fg:`secondary`,className:`mb-2 tabular-nums`,children:[s,`/`,p.length]}),(0,q.jsx)(`div`,{className:`mb-4 h-2 overflow-hidden rounded-full bg-system-regular dark:bg-system-regular-dark`,role:`progressbar`,"aria-label":`Question ${s} of ${p.length}`,"aria-valuemin":1,"aria-valuemax":p.length,"aria-valuenow":s,children:(0,q.jsx)(`div`,{className:`h-full rounded-full bg-fg-primary dark:bg-fg-primary-dark`,style:{width:`${d}%`}})}),f?(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(uw,{as:`h4`,className:`mb-4`,children:f.text}),(0,q.jsx)(`div`,{className:`flex flex-col gap-2`,children:(f.options||[]).map((e,t)=>{if(!e)return null;let n=r[c]===t;return(0,q.jsx)(`button`,{type:`button`,"aria-pressed":n,className:`rounded-xl border px-3 py-3 text-left text-fg-primary dark:text-fg-primary-dark ${n?`border-action bg-action/10`:`border-system-regular dark:border-system-regular-dark`}`,onClick:()=>i(t),children:e.text},e.id)})}),c>0?(0,q.jsx)(`div`,{className:`mt-6`,children:(0,q.jsxs)(tw,{surface:`ghost`,onClick:()=>g(Math.max(0,c-1)),children:[(0,q.jsx)(DVe,{size:16}),` Back`]})}):null]}):null]})]})};Xw(`
|
|
709
709
|
fragment AssessmentFeatureFragment on AssessmentFeature {
|
|
710
710
|
id
|
|
711
711
|
assessment {
|
|
@@ -742,33 +742,33 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
742
742
|
completedAt
|
|
743
743
|
}
|
|
744
744
|
}
|
|
745
|
-
`),C2n();var
|
|
745
|
+
`),C2n();var VFr=`https://cdn.iframe.ly/api/iframely`,HFr=`64420707babbbe919d6fabff62b8371a`,UFr=async e=>{try{return await(await fetch(`${VFr}?url=${encodeURIComponent(e)}&key=${HFr}&theme=light`)).json()}catch(e){return console.error(`Failed to fetch embed data from Iframely:`,e),null}},WFr=e=>{let t=e.links?.thumbnail?.[0],n=t&&t.media.width>t.media.height&&Math.abs(t.media.width-t.media.height)/t.media.width<.5;return{site:e.meta?.site||void 0,title:e.meta?.title||void 0,description:e.meta?.description||void 0,canonical:e.meta?.canonical||void 0,thumbnail:n&&(t?.href||e.links?.logo?.[0]?.href)||null,favicon:n?e.links?.icon?.[0]?.href||e.links?.image?.[0]?.href||t?.href||null:e.links?.icon?.[0]?.href||e.links?.image?.[0]?.href||null}},GFr=({src:e,title:t})=>(0,q.jsx)(lw,{src:e,alt:t||`Link Preview`,className:`my-0`}),KFr=({src:e})=>(0,q.jsx)(`img`,{className:`h-8 w-8 rounded-md m-0`,src:e,alt:`Link Icon`,loading:`lazy`}),qFr=({site:e})=>e?(0,q.jsx)(uw,{as:`p`,className:`text-sm text-gray-500 m-0`,children:e}):null,JFr=({site:e,title:t,canonical:n,description:r,thumbnail:i,favicon:a})=>(0,q.jsxs)(sw,{children:[i?(0,q.jsx)(GFr,{src:i,title:t}):null,(0,q.jsxs)(cw,{children:[(0,q.jsxs)(`div`,{className:`flex items-center justify-start flex-row gap-2`,children:[a?(0,q.jsx)(KFr,{src:a}):null,(0,q.jsx)(qFr,{site:e})]}),t?(0,q.jsx)(uw,{as:`h3`,className:`mt-4 mb-0`,children:t}):null,n?(0,q.jsx)(uw,{as:`p`,className:`line-clamp-1 text-sm text-gray-400 my-0`,children:n}):null,r?(0,q.jsx)(uw,{as:`p`,className:`mt-4 mb-0 line-clamp-4`,children:r}):null]})]}),YFr=({url:e})=>{let[t,n]=(0,S.useState)(null),[r,i]=(0,S.useState)(!0);return(0,S.useEffect)(()=>{e&&(async()=>{i(!0);let t=await UFr(e);t?(n(WFr(t)),i(!1)):(n(null),i(!1))})()},[e]),(0,q.jsx)(`div`,{className:`w-full min-w-96`,children:r?(0,q.jsx)(XFr,{}):(0,q.jsx)(JFr,{...t})})},XFr=()=>(0,q.jsx)(`div`,{className:`text-primary-700 transition-all duration-500 flex flex-row justify-center items-center h-28`,children:(0,q.jsx)(S2n,{className:`h-5 w-5 animate-spin`})}),ZFr=({feature:e})=>{let{church:t,accessToken:n}=dke();if(!e.url)return null;let r=e.url,i=pke({originalUrl:r,church:t});return(0,q.jsx)($C,{className:`mb-10 block`,href:i,onClick:n?e=>{vke(e)&&(e.preventDefault(),_ke({originalUrl:r,church:t,accessToken:n}).then(e=>window.location.assign(e)))}:void 0,children:(0,q.jsx)(YFr,{url:e.url,title:e.title??void 0})})};Xw(`
|
|
746
746
|
fragment LinkEmbedFeatureFragment on LinkEmbedFeature {
|
|
747
747
|
id
|
|
748
748
|
title
|
|
749
749
|
url
|
|
750
750
|
}
|
|
751
|
-
`),C2n();var
|
|
751
|
+
`),C2n();var QFr=`https://cdn.iframe.ly/api/iframely`,$Fr=`64420707babbbe919d6fabff62b8371a`,eIr=async e=>{try{return await(await fetch(`${QFr}?url=${encodeURIComponent(e)}&key=${$Fr}&theme=light`)).json()}catch(e){return console.error(`Failed to fetch embed data from Iframely:`,e),null}},tIr=e=>{let t=e.links?.thumbnail?.[0],n=t&&t.media.width>t.media.height&&Math.abs(t.media.width-t.media.height)/t.media.width<.5;return{site:e.meta?.site||void 0,title:e.meta?.title||void 0,description:e.meta?.description||void 0,canonical:e.meta?.canonical||void 0,thumbnail:n&&(t?.href||e.links?.logo?.[0]?.href)||void 0,favicon:n?e.links?.icon?.[0]?.href||e.links?.image?.[0]?.href||t?.href||void 0:e.links?.icon?.[0]?.href||e.links?.image?.[0]?.href||void 0}},nIr=({src:e,title:t})=>(0,q.jsx)(lw,{src:e,alt:t||`Link Preview`,className:`my-0`}),rIr=({src:e})=>(0,q.jsx)(`img`,{className:`h-8 w-8 rounded-md m-0`,src:e,alt:`Link Icon`,loading:`lazy`}),iIr=({site:e})=>e?(0,q.jsx)(uw,{as:`p`,className:`text-sm text-gray-500 m-0`,children:e}):null,aIr=({site:e,title:t,canonical:n,description:r,thumbnail:i,favicon:a})=>(0,q.jsxs)(sw,{children:[i?(0,q.jsx)(nIr,{src:i,title:t}):null,(0,q.jsxs)(cw,{children:[(0,q.jsxs)(`div`,{className:`flex items-center justify-start flex-row gap-2`,children:[a?(0,q.jsx)(rIr,{src:a}):null,(0,q.jsx)(iIr,{site:e})]}),t?(0,q.jsx)(uw,{as:`h3`,className:`mt-4 mb-0`,children:t}):null,n?(0,q.jsx)(uw,{as:`p`,className:`line-clamp-1 text-sm text-gray-400 my-0`,children:n}):null,r?(0,q.jsx)(uw,{as:`p`,className:`mt-4 mb-0 line-clamp-4`,children:r}):null]})]}),oIr=({embedHtml:e})=>{let t=(0,S.useMemo)(()=>CNr(e),[e]);return(0,q.jsx)(sw,{className:`relative cursor-pointer overflow-hidden`,children:(0,q.jsx)(`div`,{dangerouslySetInnerHTML:{__html:t}})})},sIr=({url:e=``})=>{let[t,n]=(0,S.useState)(null),[r,i]=(0,S.useState)(!0),[a,o]=(0,S.useState)(null);return(0,S.useEffect)(()=>{e&&(async()=>{i(!0);let t=await eIr(e);t?(n(tIr(t)),Array.isArray(t.rel)&&[`player`,`app`,`reader`,`survey`].some(e=>t.rel?.includes(e))&&o(t.html||null),i(!1)):(n(null),o(null),i(!1))})()},[e]),(0,q.jsx)(`div`,{className:`w-full min-w-96`,children:r?(0,q.jsx)(cIr,{}):a?(0,q.jsx)(oIr,{embedHtml:a}):(0,q.jsx)(aIr,{...t})})},cIr=()=>(0,q.jsx)(`div`,{className:`text-primary-700 transition-all duration-500 flex flex-row justify-center items-center h-28`,children:(0,q.jsx)(S2n,{className:`h-5 w-5 animate-spin`})}),lIr=({feature:e})=>e.url?(0,q.jsx)(`div`,{className:`mb-10`,children:(0,q.jsx)(sIr,{url:e.url})}):null;Xw(`
|
|
752
752
|
fragment WebviewFeatureFragment on WebviewFeature {
|
|
753
753
|
id
|
|
754
754
|
title
|
|
755
755
|
height
|
|
756
756
|
url
|
|
757
757
|
}
|
|
758
|
-
`);function
|
|
758
|
+
`);function uIr(e){return e?.__typename===`HtmlFeature`?e.content??null:e?.__typename===`TextFeature`?e.body??null:null}var dIr=new Set([`h1`,`h2`,`h3`,`h4`,`h5`,`h6`,`p`,`li`]);function fIr(e){return e.map(e=>e.type===`text`?e.data:`children`in e?fIr(e.children):``).join(``)}function pIr(e){return fIr(e).replace(/\s+/g,` `).trim()}function mIr(e){return pIr((0,CT.htmlToDOM)(e))}function hIr(e,t){for(let n of e){if(t.length>=2)return;if(`name`in n&&`children`in n){if(dIr.has(n.name.toLowerCase())){let e=pIr([n]);e&&t.push(e)}else hIr(n.children,t)}}}function gIr(e){let t=[];if(hIr((0,CT.htmlToDOM)(e),t),t.length===0){let n=mIr(e);n&&t.push(n)}return t}function _Ir(e){let t=[];for(let n of e??[]){let e=uIr(n);if(e){for(let n of gIr(e))if(t.push(n),t.length===2)return{heading:t[0],sub:t[1]}}}return{heading:t[0]??`Untitled`,sub:null}}kxe(),Pxe();var vIr=`truncate overflow-hidden text-ellipsis whitespace-nowrap`,w7={card:[`z-0 overflow-visible px-4`],contractedCard:[`cursor-pointer py-4`],expandedCard:[`is-expanded cursor-text -mx-4 pt-12 pb-8`],expandedFill:`bg-gray-0/25 dark:bg-gray-900/25`,content:[`overflow-hidden`],summary:[`pr-14`],catchClicks:[`absolute inset-0 z-[5] cursor-pointer`],button:[`absolute right-4 z-10 flex items-center`],buttonContracted:[`top-1/2 -translate-y-1/2`],buttonExpanded:[`top-4`],children:[`flex flex-col gap-4 cursor-text`]};function yIr({heading:e,sub:t,empty:n=!1,expanded:r=!1,lockHeight:i=!0,onClick:a,children:o}){return(0,q.jsx)(sw,{childRadius:!1,interactive:!r,backgroundColor:r?w7.expandedFill:``,className:Jx(w7.card,r?w7.expandedCard:w7.contractedCard),onMouseDown:r?void 0:e=>{e.preventDefault(),e.stopPropagation()},onClick:r?void 0:()=>a?.(),children:(0,q.jsxs)(`div`,{children:[(0,q.jsxs)(`div`,{className:Jx(i&&!r&&w7.content),"data-testid":`section-summary-body`,children:[(0,q.jsx)(`div`,{"aria-hidden":!r||void 0,className:Jx(r?w7.children:i?`hidden`:`pointer-events-none invisible h-0 overflow-hidden`),children:o}),(0,q.jsxs)(`div`,{className:Jx(w7.summary,r&&`hidden`),contentEditable:!1,"aria-hidden":r||void 0,children:[(0,q.jsx)(`p`,{className:Jx(`m-0 text-base font-bold leading-6`,vIr,n?`italic text-fg-secondary dark:text-fg-secondary-dark`:`text-fg-primary dark:text-fg-primary-dark`),children:e}),(0,q.jsx)(`p`,{className:Jx(`m-0 mt-0.5 text-sm leading-[21px]`,vIr,t?`text-fg-secondary dark:text-fg-secondary-dark`:`text-fg-tertiary dark:text-fg-tertiary-dark`),children:t??`View More`})]})]}),(0,q.jsx)(`div`,{"data-testid":`expandable-section-catch`,"data-drag-handle":!0,contentEditable:!1,"aria-hidden":r||void 0,className:Jx(w7.catchClicks,r&&`hidden`)}),(0,q.jsx)(`div`,{contentEditable:!1,className:Jx(w7.button,r?w7.buttonExpanded:w7.buttonContracted),children:(0,q.jsx)(tw,{type:`button`,onClick:e=>{e.preventDefault(),e.stopPropagation(),a?.()},surface:r?`chrome`:`material`,circular:!0,"aria-label":r?`Close ${e}`:`Open ${e}`,children:r?(0,q.jsx)(mw,{size:16}):(0,q.jsx)(_w,{size:16})})})]})})}var bIr=({feature:e,children:t})=>{let[n,r]=(0,S.useState)(!1),i=Hke(),a=n||i,o=_Ir(e?.features),s=o.heading===`Untitled`&&o.sub===null;return(0,q.jsx)(yIr,{heading:o.heading,sub:o.sub,empty:s,expanded:a,onClick:()=>r(e=>!e),children:a?t:null})};Xw(`
|
|
759
759
|
fragment ExpandableSectionFeatureFragment on ExpandableSectionFeature {
|
|
760
760
|
id
|
|
761
761
|
features {
|
|
762
762
|
...NestedFeatureFragment
|
|
763
763
|
}
|
|
764
764
|
}
|
|
765
|
-
`);function
|
|
765
|
+
`);function xIr(e){let t=Math.max(0,Math.round(e));return`${Math.floor(t/60)}:${String(t%60).padStart(2,`0`)}`}var SIr=60,CIr=(e,t)=>`${e} ${t}${e===1?``:`s`}`,wIr=e=>{let t=Math.max(0,Math.round(e)),n=Math.floor(t/SIr),r=t%SIr;return n===0?CIr(r,`second`):r===0?CIr(n,`minute`):`${CIr(n,`minute`)} ${CIr(r,`second`)}`},TIr={status:`idle`},EIr=(0,S.createContext)({run:TIr,setRun:()=>{},scoped:!1}),DIr=()=>(0,S.useContext)(EIr),OIr=250,kIr=({featureId:e,seconds:t,interactive:n=!0})=>{let r=Math.max(0,t)*1e3,{run:i,setRun:a}=DIr(),[o,s]=(0,S.useState)(()=>Date.now()),c=i.status!==`idle`&&i.featureId===e?i:null,l=c?.status===`running`?Math.max(0,c.deadline-o):c?.status===`paused`?c.remainingMs:r,u=c?.status===`running`?l>0?`running`:`finished`:c?.status===`paused`?`paused`:`idle`;(0,S.useEffect)(()=>{if(u!==`running`)return;let e=setInterval(()=>s(Date.now()),OIr);return()=>clearInterval(e)},[u]);let d=(0,S.useCallback)(()=>{if(!n)return;let t=Date.now();s(t),a({status:`running`,featureId:e,deadline:t+r})},[e,n,a,r]),f=(0,S.useCallback)(()=>{if(!n||c?.status!==`running`)return;let t=Date.now();c.deadline<=t||a({status:`paused`,featureId:e,remainingMs:c.deadline-t})},[e,n,c,a]),p=(0,S.useCallback)(()=>{if(!n||c?.status!==`paused`)return;let t=Date.now();s(t),a({status:`running`,featureId:e,deadline:t+c.remainingMs})},[e,n,c,a]),m=(0,S.useCallback)(()=>{n&&c&&a({status:`idle`})},[n,c,a]);return{status:u,remainingSeconds:Math.ceil(l/1e3),spentRatio:r?1-l/r:1,start:d,pause:f,resume:p,reset:m}},AIr=`Reset`,jIr={idle:{label:`Start`,resettable:!1},running:{label:`Pause`,resettable:!0},paused:{label:`Resume`,resettable:!0},finished:{label:AIr,resettable:!1}},MIr=({feature:e,interactive:t=!0})=>{let n=e.seconds??0,{status:r,remainingSeconds:i,spentRatio:a,start:o,pause:s,resume:c,reset:l}=kIr({featureId:e.id,seconds:n,interactive:t});if(n<=0)return null;let u=r===`finished`,d={idle:o,running:s,paused:c,finished:l}[r],{label:f,resettable:p}=jIr[r];return(0,q.jsxs)(sw,{className:`mb-10 overflow-hidden`,children:[(0,q.jsx)(cw,{children:(0,q.jsxs)(`div`,{"data-testid":`timer-row`,className:`flex flex-wrap items-center gap-x-4 gap-y-2`,children:[(0,q.jsx)(`span`,{role:`timer`,"aria-label":`${xIr(i)} remaining`,className:`text-[34px] font-bold leading-none tabular-nums ${u?`text-fg-tertiary dark:text-fg-tertiary-dark`:`text-fg-primary dark:text-fg-primary-dark`}`,children:xIr(i)}),(0,q.jsx)(`span`,{className:`flex-1 text-sm text-fg-secondary dark:text-fg-secondary-dark`,children:wIr(n)}),(0,q.jsxs)(`span`,{"data-testid":`timer-controls`,className:`ml-auto flex items-center gap-4`,children:[p?(0,q.jsx)(tw,{"data-testid":`timer-reset`,surface:`ghost`,disabled:!t,onClick:l,children:AIr}):null,(0,q.jsx)(tw,{surface:`tinted`,disabled:!t,onClick:d,children:f})]})]})}),(0,q.jsx)(`div`,{className:`h-0.5`,children:(0,q.jsx)(`div`,{"data-testid":`timer-rule`,className:`h-full motion-safe:transition-[width] motion-safe:duration-200 ${u?`bg-gray-400`:`bg-action`}`,style:{width:`${Math.round(a*100)}%`}})})]})};Xw(`
|
|
766
766
|
fragment TimerFeatureFragment on TimerFeature {
|
|
767
767
|
id
|
|
768
768
|
order
|
|
769
769
|
seconds
|
|
770
770
|
}
|
|
771
|
-
`);var
|
|
771
|
+
`);var NIr=new Set;function PIr(e){if(typeof window>`u`)return;let t=e.__typename??`unknown`;NIr.has(t)||(NIr.add(t),console.error(`Feature component: Unknown feature type - not rendered`,{__typename:t,id:e.id,type:e.type,data:e.data}))}var FIr=({church:e,feature:t,isInteractionEnabled:n=!1,userProfile:r,theme:i,executedConnectFeatureId:a})=>{let o=rAe();switch(t.__typename){case`ActionBarFeature`:return(0,q.jsx)(gwr,{feature:t},t.id);case`HtmlFeature`:return(0,q.jsx)(cAe,{feature:t},t.id);case`ScriptureFeature`:return(0,q.jsx)(dAe,{feature:t},t.id);case`QuestionBlockFeature`:return(0,q.jsx)(_Fr,{feature:t,church:e,enableCTA:n},t.id);case`PollFeature`:return(0,q.jsx)(SFr,{feature:t,church:e,userProfile:r,isInteractionEnabled:n,theme:i},t.id);case`RecallFeature`:return(0,q.jsx)(NFr,{feature:t,userProfile:r},t.id);case`AssessmentFeature`:return(0,q.jsx)(BFr,{feature:t,isInteractionEnabled:n,userProfile:r},t.id);case`ActionListFeature`:return(0,q.jsx)(bwr,{feature:t},t.id);case`ActionTableFeature`:return(0,q.jsx)(jPr,{feature:t},t.id);case`EventBlockFeature`:return(0,q.jsx)(LPr,{feature:t},t.id);case`ButtonFeature`:return(0,q.jsx)(RPr,{feature:t},t.id);case`ConnectButtonFeature`:return(0,q.jsx)(nFr,{feature:t,currentChurch:e,userProfile:r,showSuccessModal:a===t.id},t.id);case`ChipListFeature`:return(0,q.jsx)(rFr,{feature:t},t.id);case`VerticalCardListFeature`:return(0,q.jsx)(sFr,{feature:t},t.id);case`HeroListFeature`:return(0,q.jsx)(cFr,{feature:t},t.id);case`HorizontalCardListFeature`:return(0,q.jsx)(lFr,{feature:t},t.id);case`HorizontalMediaListFeature`:return(0,q.jsx)(fFr,{feature:t},t.id);case`LinkEmbedFeature`:return(0,q.jsx)(ZFr,{feature:t},t.id);case`VideoFeature`:return(0,q.jsx)(DPr,{feature:t,isInteractionEnabled:n},t.id);case`AudioFeature`:return(0,q.jsx)(OPr,{feature:t,isInteractionEnabled:n},t.id);case`ImageFeature`:return(0,q.jsx)(APr,{feature:t},t.id);case`TimerFeature`:return(0,q.jsx)(MIr,{feature:t},t.id);case`WebviewFeature`:return(0,q.jsx)(lIr,{feature:t},t.id);case`ExpandableSectionFeature`:{let o=t;return(0,q.jsx)(bIr,{feature:o,children:o.features?.map(t=>t?(0,q.jsx)(yke.Provider,{value:{featureId:t.id},children:(0,q.jsx)(FIr,{church:e,feature:t,isInteractionEnabled:n,userProfile:r,theme:i,executedConnectFeatureId:a})},t.id):null)},t.id)}default:return PIr(t),o?(0,q.jsx)(aAe,{typename:t.__typename},t.id):null}},IIr=({children:e})=>{let[t,n]=(0,S.useState)(TIr),r=(0,S.useMemo)(()=>({run:t,setRun:n,scoped:!0}),[t]);return DIr().scoped?(0,q.jsx)(q.Fragment,{children:e}):(0,q.jsx)(EIr.Provider,{value:r,children:e})},LIr=({church:e,features:t,isInteractionEnabled:n=!1,userProfile:r,theme:i,executedConnectFeatureId:a})=>{let o=t?.filter(e=>{if(!e)return!1;if(e.__typename===`HtmlFeature`){let t=e.content;return t&&t.trim()!==``&&t!==`<p></p>`}return!0});return(0,q.jsx)(IIr,{children:o?.map((t,s)=>{if(!t)return null;let c=o[s-1],l=t.__typename===`ExpandableSectionFeature`||c?.__typename===`ExpandableSectionFeature`;return(0,q.jsx)(`div`,{className:s===0?``:l?`mt-4`:`mt-8`,children:(0,q.jsx)(yke.Provider,{value:{featureId:t.id},children:(0,q.jsx)(FIr,{feature:t,church:e,isInteractionEnabled:n,userProfile:r,theme:i,executedConnectFeatureId:a})})},t.id)})})};Xw(`
|
|
772
772
|
fragment FeatureFeedFragment on FeatureFeed {
|
|
773
773
|
id
|
|
774
774
|
features {
|
|
@@ -856,13 +856,13 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
856
856
|
...ExpandableSectionFeatureFragment
|
|
857
857
|
}
|
|
858
858
|
}
|
|
859
|
-
`),bPt(),NCe(),gan(),lIn(),ICr();function
|
|
859
|
+
`),bPt(),NCe(),gan(),lIn(),ICr();function RIr({sharable:e,children:t,printable:n=!1,...r}){let i=qx(),a=e?.url||window.location.href,o=t=>i.track(`Share Tapped`,{destination:t,title:e?.title,url:a}),s=()=>(navigator.clipboard?.writeText(a).then(()=>o(`copy_link`)).catch(()=>void 0),!0),c=`https://www.facebook.com/sharer/sharer.php?u=${encodeURIComponent(a)}"e=${encodeURIComponent(e.title??``)}`,l=`https://x.com/intent/tweet?text=${encodeURIComponent(e.title??``)}&url=${encodeURIComponent(a)}`,u=`https://www.linkedin.com/sharing/share-offsite/?url=${encodeURIComponent(a)}&title=${e.title??``}&summary=${encodeURIComponent(e.message??``)}`;return(0,q.jsxs)(mxe,{children:[(0,q.jsx)(hxe,{...r,children:t}),(0,q.jsxs)(_xe,{className:`z-20 print:hidden`,children:[(0,q.jsxs)(iw,{onClick:s,children:[(0,q.jsx)(zw,{}),(0,q.jsx)(aw,{children:`Copy Link`})]}),n?(0,q.jsxs)(iw,{onClick:()=>{o(`print`),window.print()},children:[(0,q.jsx)(cIn,{}),(0,q.jsx)(aw,{children:`Print`})]}):null,(0,q.jsx)(vxe,{}),(0,q.jsxs)(iw,{to:c,target:`_blank`,onClick:()=>o(`facebook`),children:[(0,q.jsx)(yPt,{}),(0,q.jsx)(aw,{children:`Share on Facebook`})]}),(0,q.jsxs)(iw,{to:l,target:`_blank`,onClick:()=>o(`x`),children:[(0,q.jsx)(FCr,{}),(0,q.jsx)(aw,{children:`Share on 𝕏`})]}),(0,q.jsxs)(iw,{to:u,target:`_blank`,onClick:()=>o(`linkedin`),children:[(0,q.jsx)(han,{}),(0,q.jsx)(aw,{children:`Share on LinkedIn`})]})]})]})}Xw(`
|
|
860
860
|
fragment ShareButtonFragment on SharableContentItem {
|
|
861
861
|
message
|
|
862
862
|
title
|
|
863
863
|
url
|
|
864
864
|
}
|
|
865
|
-
`);var
|
|
865
|
+
`);var zIr=(e=[],{showUnmappedFeatures:t=!1}={})=>e?.filter(e=>(e?.features||[]).some(e=>e&&(Object.keys(e).some(e=>![`id`,`__typename`].includes(e))||t&&!!e.__typename)))||[],BIr=/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i,VIr=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i,HIr=e=>{if(!e)return null;let t=BIr.exec(e),n=t?t.slice(1).map(e=>parseInt(e,16)):VIr.exec(e)?.slice(1).map(Number);return n&&n.every(e=>e<=255)?n.join(` `):null},T7=(e,t)=>{let n=HIr(e);return n?t===void 0?`rgb(${n})`:`rgb(${n} / ${t})`:null},UIr={"--color-material-screen":[`light`,`paper`],"--color-material-ultrathin":[`light`,`screen`],"--color-material-thin":[`light`,`screen`],"--color-material-regular":[`light`,`screen`],"--color-material-thick":[`light`,`screen`],"--color-material-chrome-dark":[`dark`,`paper`],"--color-material-ultrathin-dark":[`dark`,`paper`],"--color-material-thin-dark":[`dark`,`paper`],"--color-material-regular-dark":[`dark`,`paper`],"--color-material-thick-dark":[`dark`,`paper`]},WIr=e=>Number(/\/ ([\d.]+)\)$/.exec(LCe[e])?.[1]??1);function GIr(e,t){let n={},r=e?.colors,i=t?.colors,a=(e,t)=>{t&&(n[e]=t)};a(`--color-system-screen`,T7(r?.screen)),a(`--color-system-chrome`,T7(r?.paper)),a(`--color-material-chrome`,T7(r?.paper)),a(`--color-system-screen-dark`,T7(i?.screen)),a(`--color-system-chrome-dark`,T7(i?.paper));let o={light:r,dark:i};for(let[e,[t,n]]of Object.entries(UIr))a(e,T7(o[t]?.[n],WIr(e)));return Object.keys(n).length?n:void 0}var KIr=[[`primary`,`--color-brand-primary`],[`secondary`,`--color-brand-secondary`],[`secondary`,`--color-brand-tertiary`]];function qIr(e,t){let n={};for(let[t,r]of KIr){let i=HIr(e?.colors?.[t]);i&&(n[r]=i)}let r=e=>e.split(` `).map(Number),i=HIr(e?.colors?.screen),a=HIr(e?.colors?.paper),o=!!(i||a),s=[i?r(i):VCe,a?r(a):BCe],c=n[`--color-brand-secondary`],l=c?r(c):o?t:void 0;if(l){let e=WCe(l,s);e&&(n[`--color-action-text`]=e.join(` `));let t=KCe(l,s);t&&(n[`--color-action-text-tinted`]=t.join(` `))}return Object.keys(n).length?n:void 0}function JIr(e,t,n,r,i){let a={...qIr(n,i)},o={...qIr(r)};delete o[`--color-action-text`],delete o[`--color-action-text-tinted`];for(let e of Object.keys(a))o[e]??=`inherit`;let s=(e,t)=>Object.keys(t).length?`${e}{${Object.entries(t).map(([e,t])=>`${e}:${t}`).join(`;`)}}`:``;return s(e,a)+s(t,o)||null}var YIr=`bg-system-screen dark:bg-system-screen-dark`,XIr=({lightTheme:e,darkTheme:t,children:n})=>{let r=`ct-${(0,S.useId)().replace(/[^\w-]/g,``)}`,i=(0,S.useContext)(qCe)?.action??RCe,a=GIr(e,t);if(!a)return(0,q.jsx)(q.Fragment,{children:n});let o=`[data-content-theme=${r}]`,s=JIr(o,`.dark ${o}`,e,t,i);return(0,q.jsxs)(`div`,{"data-content-theme":r,className:YIr,style:a,children:[s?(0,q.jsx)(`style`,{children:s}):null,n]})},ZIr=e=>typeof e.percentComplete==`number`,QIr=e=>ZIr(e)||!!e.childContentItemsConnection?.edges?.length,$Ir=({content:e,pageCount:t,enabled:n})=>{let r=VOe(),[i,a]=(0,S.useState)(null),o=(0,S.useCallback)(e=>a(e),[]),s=(0,S.useRef)(null),c=(0,S.useRef)(null),l=t>1,u=n&&!QIr(e)&&!e.isCompleted,d=(0,S.useCallback)(()=>{u&&c.current!==e.id&&(c.current=e.id,r?.({contentItem:{id:e.id},action:`COMPLETE`}))},[u,e.id,r]);return(0,S.useEffect)(()=>{n&&s.current!==e.id&&(s.current=e.id,r?.({contentItem:{id:e.id},action:`VIEW`}),l||d())},[d,e.id,n,l,r]),(0,S.useEffect)(()=>{if(!u||!l||!i||typeof IntersectionObserver>`u`)return;let e=new IntersectionObserver(t=>{t.some(e=>e.isIntersecting)&&(d(),e.disconnect())});return e.observe(i),()=>e.disconnect()},[u,d,l,i]),{readingEndRef:o}};fT(),eke();var eLr=e=>!!(e&&(`embedHtml`in e&&e.embedHtml||e.sources?.some(e=>!!e?.uri))),tLr=({content:e,setIsCTAOpen:t,setInteractionType:n,isInteractionEnabled:r})=>(0,q.jsx)(`div`,{className:`flex justify-end print:hidden`,children:(0,q.jsxs)(`div`,{className:`fixed z-10 right-0 bottom-0 mr-4 [@media(width>=56rem)]:mr-8 [@media(width>=80rem)]:-mr-72 [@media(width>=80rem)]:right-auto mt-4 mb-8 py-1 flex flex-col justify-between items-center`,children:[r?(0,q.jsx)(`div`,{className:`mb-4`,children:(0,q.jsx)(tw,{onClick:()=>{t(!0),n(S7.Like)},circular:!0,surface:`chrome`,children:(0,q.jsxs)(`div`,{className:`flex flex-col px-1.5 items-center`,children:[(0,q.jsx)(yT,{weight:e?.isLiked?`fill`:`regular`,size:20,className:`md:hidden ${e?.isLiked?`fill-action`:`text-action`}`}),(0,q.jsx)(yT,{weight:e?.isLiked?`fill`:`regular`,size:28,className:`hidden md:flex ${e?.isLiked?`fill-action`:`text-action`}`}),e.likedCount?(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`div`,{className:`absolute -bottom-2.5 bg-white dark:bg-brand px-2 rounded-full text-xs z-9`,children:(0,q.jsx)(uw,{fg:`secondary`,className:`text-sm text-white dark:text-brand`,children:e.likedCount})}),(0,q.jsx)(`span`,{className:`absolute -bottom-2.5 bg-accent/20 dark:bg-brand px-2 rounded-full text-xs z-10`,children:(0,q.jsx)(uw,{fg:`secondary`,className:`text-sm text-accent/100`,children:e.likedCount})})]}):null]})})}):null,r&&e.commentsEnabled?(0,q.jsx)(`div`,{className:`mb-4`,children:(0,q.jsx)(tw,{onClick:()=>{t(!0),n(S7.Comment)},circular:!0,surface:`chrome`,children:(0,q.jsxs)(`div`,{className:`flex flex-col px-1.5 items-center`,children:[(0,q.jsx)(qOe,{weight:`fill`,size:20,className:`md:hidden text-action`}),(0,q.jsx)(qOe,{weight:`fill`,size:28,className:`hidden md:flex text-action`}),aT(e.comments)?null:(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`div`,{className:`absolute -bottom-2.5 bg-white dark:bg-brand px-2 rounded-full text-xs z-9`,children:(0,q.jsx)(uw,{fg:`secondary`,className:`text-sm text-white dark:text-brand`,children:e.comments?.length??0})}),(0,q.jsx)(`span`,{className:`absolute -bottom-2.5 bg-accent/20 dark:bg-brand px-2 rounded-full text-xs z-10`,children:(0,q.jsx)(uw,{fg:`secondary`,className:`text-sm text-accent/100`,children:e.comments?.length??0})})]})]})})}):null,e.sharing?(0,q.jsxs)(RIr,{circular:!0,surface:`chrome`,sharable:e.sharing,printable:!0,children:[(0,q.jsx)(oke,{weight:`fill`,size:20,className:`mx-1.5 text-fg-secondary dark:text-fg-secondary-dark md:hidden`}),(0,q.jsx)(oke,{weight:`fill`,size:28,className:`mx-2 text-fg-secondary dark:text-fg-secondary-dark hidden md:flex`})]}):(0,q.jsx)(`div`,{})]})}),nLr=({lightTheme:e,darkTheme:t,...n})=>(0,q.jsx)(XIr,{lightTheme:e,darkTheme:t,children:(0,q.jsx)(rLr,{...n})}),rLr=({content:e,currentChurch:t,isInteractionEnabled:n=!1,userCanComment:r,userProfile:i,theme:a,executedConnectFeatureId:o,guideProgressEnabled:s=!1,childCards:c=!1})=>{let l=nAe(),[u,d]=(0,S.useState)(!1),[f,p]=(0,S.useState)(S7.Default),m=rAe(),h=(0,S.useMemo)(()=>zIr(e.pages,{showUnmappedFeatures:m}),[e.pages,m]),{readingEndRef:g}=$Ir({content:e,pageCount:h?.length??0,enabled:s});if(!e)return null;let _=[...e?.videos??[],...e?.audios??[]].find(eLr),v=!!_,y=_?.__typename===`AudioMedia`,b=!!e?.coverImage,x=e?.childContentItemsConnection?.edges??[],C=x.flatMap(e=>e?.node?[e.node]:[]),w=e?.siblingContentItemsConnection?.edges??[],T=`md:border md:border-system-regular md:rounded-3xl py-6 md:p-6 mb-8 border-b border-b-system-regular`,E=h?.length&&h?.length>1;return(0,q.jsxs)(IIr,{children:[(0,q.jsxs)(`div`,{className:`content-item-print ${E?T:``}`,children:[b&&!v?(0,q.jsx)(xT,{image:e?.coverImage??void 0,className:`h-full w-full object-cover rounded-xl print:hidden`}):null,v&&y?(0,q.jsx)(`div`,{className:`print:hidden`,children:(0,q.jsx)(Awr,{media:_,coverImage:e?.coverImage??void 0,content:e??void 0,shouldSendInteractions:!!r})}):null,v&&!y?(0,q.jsx)(`div`,{className:`print:hidden`,children:(0,q.jsx)(EPr,{media:_,coverImage:e?.coverImage??void 0,content:e??void 0,shouldSendInteractions:!!r})}):null,(0,q.jsxs)(`div`,{className:`${v||b?`mt-6 md:mt-12`:``} mb-4 mx-auto [&>*]:mx-auto [&>*]:max-w-[65ch]`,children:[(0,q.jsx)(`div`,{className:`prose dark:prose-invert`,children:(0,q.jsx)(uw,{as:`h1`,children:e.title})}),e.parentChannel?.name?(0,q.jsx)(uw,{fg:`secondary`,"data-testid":`content-item-category`,children:e.parentChannel.name}):null,(0,q.jsx)(`div`,{className:`h-px bg-system-thin my-8`}),e.htmlContent?(0,q.jsx)(cAe,{feature:{content:e.htmlContent}}):null,h?.length?(0,q.jsx)(`div`,{className:`mt-8 flex flex-col gap-4`,children:(0,q.jsx)(LIr,{features:h[0]?.features??[],church:t,userProfile:i,isInteractionEnabled:n,theme:a,executedConnectFeatureId:o})}):null]})]}),h?.slice(1).map(e=>e&&e.features?.length&&e.features.length>0&&(0,q.jsx)(`div`,{className:T,children:(0,q.jsx)(`div`,{className:`flex flex-col gap-4`,children:(0,q.jsx)(LIr,{features:e.features??[],church:t,userProfile:i,isInteractionEnabled:n,theme:a,executedConnectFeatureId:o})})},e.id)),(0,q.jsx)(`div`,{ref:g,"data-testid":`content-item-reading-end`}),(0,q.jsxs)(`div`,{className:`mx-auto [&>*]:mx-auto [&>*]:max-w-[65ch]`,children:[(0,q.jsx)(tLr,{content:e,setIsCTAOpen:d,setInteractionType:p,isInteractionEnabled:n}),c?C.length?(0,q.jsx)(`div`,{"data-testid":`child-content-cards`,className:`mt-10 grid gap-4 sm:grid-cols-2 print:hidden`,children:C.map(t=>(0,q.jsx)(lke,{content:t,labelText:e.title??void 0,tile:!0},t.id))}):null:x.length?(0,q.jsx)(Sw,{className:`mt-10 print:hidden`,children:x.map(e=>{let t=(e?.node?.coverImage?.sources??[])[0]?.uri;return(0,q.jsx)(ww,{as:$C,to:{contentId:e?.node?.id},title:e?.node?.title??void 0,subtitle:e?.node?.summary,leadingAccessory:(0,q.jsx)(Bw,{src:t??void 0}),trailingAccessory:(0,q.jsx)(dT,{})},e?.node?.id)})}):null,e?.parentItem?(0,q.jsxs)(`div`,{className:`mt-12 print:hidden`,children:[(0,q.jsx)(uw,{as:`h3`,className:`mb-4`,children:`This series`}),(0,q.jsx)(lke,{content:e?.parentItem})]}):null,w.length?(0,q.jsxs)(`div`,{className:`mt-10 print:hidden`,children:[(0,q.jsx)(uw,{as:`h3`,children:`In this series`}),(0,q.jsx)(cOe,{children:w.map(e=>(0,q.jsx)(lke,{content:e?.node??void 0,tile:!0},e?.node?.id))})]}):null]}),(0,q.jsx)(YPr,{type:f,currentPageParams:l,isOpen:u,setIsOpen:d,church:t,hasComments:!aT(e.comments),hasLikes:!!(e?.likedCount??0),isInteractionEnabled:n,theme:a})]})};Xw(`
|
|
866
866
|
fragment ContentItemFragment on ContentItem {
|
|
867
867
|
id
|
|
868
868
|
title
|
|
@@ -946,7 +946,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
946
946
|
...ShareButtonFragment
|
|
947
947
|
}
|
|
948
948
|
}
|
|
949
|
-
`);var
|
|
949
|
+
`);var iLr=({livestream:e})=>(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(EPr,{media:e.stream??void 0,coverImage:e.coverImage??void 0,livestream:e}),(0,q.jsxs)(`div`,{className:`mt-6 md:mt-12 mb-4 mx-auto [&>*]:mx-auto [&>*]:max-w-[65ch]`,children:[(0,q.jsx)(`div`,{className:`prose dark:prose-invert`,children:(0,q.jsx)(uw,{as:`h1`,children:e.title})}),e.htmlContent?(0,q.jsx)(cAe,{feature:{content:e.htmlContent}}):null]})]});Xw(`
|
|
950
950
|
fragment LivestreamFragment on Livestream {
|
|
951
951
|
id
|
|
952
952
|
title
|
|
@@ -960,7 +960,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
960
960
|
}
|
|
961
961
|
...LivestreamPlayerFragment
|
|
962
962
|
}
|
|
963
|
-
`);function
|
|
963
|
+
`);function aLr({church:e,accessToken:t,children:n}){return(0,q.jsx)(uke.Provider,{value:{church:e,accessToken:t},children:(0,q.jsx)(`div`,{onClick:n=>{let r=n.target;if(r&&r.tagName===`A`){let i=r.href,a=r.getAttribute(`to`),o=i||a;if(o){if(o.includes(`/auth/logout`)||o.startsWith(`http`)||o.startsWith(`mailto:`)||o.startsWith(`tel:`))return;n.preventDefault(),_ke({originalUrl:o,church:e,accessToken:t}).then(e=>{window.location.href=e}).catch(e=>{console.error(`Error during redirection:`,e),window.location.href=o})}}},children:n})})}function oLr(e,t){if(!e)return t;let n=new Date(e).getTime()-Date.now();return Number.isNaN(n)?t:Math.max(1,Math.ceil(n/1e3))}var sLr=s(((e,t)=>{var n=Object.prototype;function r(e){var t=e&&e.constructor;return e===(typeof t==`function`&&t.prototype||n)}t.exports=r})),cLr=s(((e,t)=>{function n(e,t){return function(n){return e(t(n))}}t.exports=n})),lLr=s(((e,t)=>{t.exports=cLr()(Object.keys,Object)})),uLr=s(((e,t)=>{var n=sLr(),r=lLr(),i=Object.prototype.hasOwnProperty;function a(e){if(!n(e))return r(e);var t=[];for(var a in Object(e))i.call(e,a)&&a!=`constructor`&&t.push(a);return t}t.exports=a})),dLr=s(((e,t)=>{t.exports=typeof global==`object`&&global&&global.Object===Object&&global})),E7=s(((e,t)=>{var n=dLr(),r=typeof self==`object`&&self&&self.Object===Object&&self;t.exports=n||r||Function(`return this`)()})),fLr=s(((e,t)=>{t.exports=E7().Symbol})),pLr=s(((e,t)=>{var n=fLr(),r=Object.prototype,i=r.hasOwnProperty,a=r.toString,o=n?n.toStringTag:void 0;function s(e){var t=i.call(e,o),n=e[o];try{e[o]=void 0;var r=!0}catch{}var s=a.call(e);return r&&(t?e[o]=n:delete e[o]),s}t.exports=s})),mLr=s(((e,t)=>{var n=Object.prototype.toString;function r(e){return n.call(e)}t.exports=r})),hLr=s(((e,t)=>{var n=fLr(),r=pLr(),i=mLr(),a=`[object Null]`,o=`[object Undefined]`,s=n?n.toStringTag:void 0;function c(e){return e==null?e===void 0?o:a:s&&s in Object(e)?r(e):i(e)}t.exports=c})),gLr=s(((e,t)=>{function n(e){var t=typeof e;return e!=null&&(t==`object`||t==`function`)}t.exports=n})),_Lr=s(((e,t)=>{var n=hLr(),r=gLr(),i=`[object AsyncFunction]`,a=`[object Function]`,o=`[object GeneratorFunction]`,s=`[object Proxy]`;function c(e){if(!r(e))return!1;var t=n(e);return t==a||t==o||t==i||t==s}t.exports=c})),vLr=s(((e,t)=>{t.exports=E7()[`__core-js_shared__`]})),yLr=s(((e,t)=>{var n=vLr(),r=function(){var e=/[^.]+$/.exec(n&&n.keys&&n.keys.IE_PROTO||``);return e?`Symbol(src)_1.`+e:``}();function i(e){return!!r&&r in e}t.exports=i})),bLr=s(((e,t)=>{var n=Function.prototype.toString;function r(e){if(e!=null){try{return n.call(e)}catch{}try{return e+``}catch{}}return``}t.exports=r})),xLr=s(((e,t)=>{var n=_Lr(),r=yLr(),i=gLr(),a=bLr(),o=/[\\^$.*+?()[\]{}|]/g,s=/^\[object .+?Constructor\]$/,c=Function.prototype,l=Object.prototype,u=c.toString,d=l.hasOwnProperty,f=RegExp(`^`+u.call(d).replace(o,`\\$&`).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,`$1.*?`)+`$`);function p(e){return!i(e)||r(e)?!1:(n(e)?f:s).test(a(e))}t.exports=p})),SLr=s(((e,t)=>{function n(e,t){return e?.[t]}t.exports=n})),D7=s(((e,t)=>{var n=xLr(),r=SLr();function i(e,t){var i=r(e,t);return n(i)?i:void 0}t.exports=i})),CLr=s(((e,t)=>{t.exports=D7()(E7(),`DataView`)})),wLr=s(((e,t)=>{t.exports=D7()(E7(),`Map`)})),TLr=s(((e,t)=>{t.exports=D7()(E7(),`Promise`)})),ELr=s(((e,t)=>{t.exports=D7()(E7(),`Set`)})),DLr=s(((e,t)=>{t.exports=D7()(E7(),`WeakMap`)})),OLr=s(((e,t)=>{var n=CLr(),r=wLr(),i=TLr(),a=ELr(),o=DLr(),s=hLr(),c=bLr(),l=`[object Map]`,u=`[object Object]`,d=`[object Promise]`,f=`[object Set]`,p=`[object WeakMap]`,m=`[object DataView]`,h=c(n),g=c(r),_=c(i),v=c(a),y=c(o),b=s;(n&&b(new n(new ArrayBuffer(1)))!=m||r&&b(new r)!=l||i&&b(i.resolve())!=d||a&&b(new a)!=f||o&&b(new o)!=p)&&(b=function(e){var t=s(e),n=t==u?e.constructor:void 0,r=n?c(n):``;if(r)switch(r){case h:return m;case g:return l;case _:return d;case v:return f;case y:return p}return t}),t.exports=b})),kLr=s(((e,t)=>{function n(e){return typeof e==`object`&&!!e}t.exports=n})),ALr=s(((e,t)=>{var n=hLr(),r=kLr(),i=`[object Arguments]`;function a(e){return r(e)&&n(e)==i}t.exports=a})),jLr=s(((e,t)=>{var n=ALr(),r=kLr(),i=Object.prototype,a=i.hasOwnProperty,o=i.propertyIsEnumerable;t.exports=n(function(){return arguments}())?n:function(e){return r(e)&&a.call(e,`callee`)&&!o.call(e,`callee`)}})),MLr=s(((e,t)=>{t.exports=Array.isArray})),NLr=s(((e,t)=>{function n(e){return typeof e==`number`&&e>-1&&e%1==0&&e<=9007199254740991}t.exports=n})),PLr=s(((e,t)=>{var n=_Lr(),r=NLr();function i(e){return e!=null&&r(e.length)&&!n(e)}t.exports=i})),FLr=s(((e,t)=>{function n(){return!1}t.exports=n})),ILr=s(((e,t)=>{var n=E7(),r=FLr(),i=typeof e==`object`&&e&&!e.nodeType&&e,a=i&&typeof t==`object`&&t&&!t.nodeType&&t,o=a&&a.exports===i?n.Buffer:void 0;t.exports=(o?o.isBuffer:void 0)||r})),LLr=s(((e,t)=>{var n=hLr(),r=NLr(),i=kLr(),a=`[object Arguments]`,o=`[object Array]`,s=`[object Boolean]`,c=`[object Date]`,l=`[object Error]`,u=`[object Function]`,d=`[object Map]`,f=`[object Number]`,p=`[object Object]`,m=`[object RegExp]`,h=`[object Set]`,g=`[object String]`,_=`[object WeakMap]`,v=`[object ArrayBuffer]`,y=`[object DataView]`,b=`[object Float32Array]`,x=`[object Float64Array]`,S=`[object Int8Array]`,C=`[object Int16Array]`,w=`[object Int32Array]`,T=`[object Uint8Array]`,E=`[object Uint8ClampedArray]`,D=`[object Uint16Array]`,O=`[object Uint32Array]`,k={};k[b]=k[x]=k[S]=k[C]=k[w]=k[T]=k[E]=k[D]=k[O]=!0,k[a]=k[o]=k[v]=k[s]=k[y]=k[c]=k[l]=k[u]=k[d]=k[f]=k[p]=k[m]=k[h]=k[g]=k[_]=!1;function A(e){return i(e)&&r(e.length)&&!!k[n(e)]}t.exports=A})),RLr=s(((e,t)=>{function n(e){return function(t){return e(t)}}t.exports=n})),zLr=s(((e,t)=>{var n=dLr(),r=typeof e==`object`&&e&&!e.nodeType&&e,i=r&&typeof t==`object`&&t&&!t.nodeType&&t,a=i&&i.exports===r&&n.process;t.exports=function(){try{return i&&i.require&&i.require(`util`).types||a&&a.binding&&a.binding(`util`)}catch{}}()})),BLr=s(((e,t)=>{var n=LLr(),r=RLr(),i=zLr(),a=i&&i.isTypedArray;t.exports=a?r(a):n})),VLr=u(s(((e,t)=>{var n=uLr(),r=OLr(),i=jLr(),a=MLr(),o=PLr(),s=ILr(),c=sLr(),l=BLr(),u=`[object Map]`,d=`[object Set]`,f=Object.prototype.hasOwnProperty;function p(e){if(e==null)return!0;if(o(e)&&(a(e)||typeof e==`string`||typeof e.splice==`function`||s(e)||l(e)||i(e)))return!e.length;var t=r(e);if(t==u||t==d)return!e.size;if(c(e))return!n(e).length;for(var p in e)if(f.call(e,p))return!1;return!0}t.exports=p}))());_y();var HLr=dy`
|
|
964
964
|
mutation completeRegistrationEmbed(
|
|
965
965
|
$mergeProfileId: ID
|
|
966
966
|
$profileInput: [UpdateProfileInput]
|
|
@@ -976,7 +976,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
976
976
|
lastName
|
|
977
977
|
}
|
|
978
978
|
}
|
|
979
|
-
`;function
|
|
979
|
+
`;function ULr(e={}){return Py(HLr,e)}_y();var WLr=dy`
|
|
980
980
|
query getContentFeed($id: ID!, $after: String, $first: Int) {
|
|
981
981
|
node(id: $id) {
|
|
982
982
|
... on ContentChannel {
|
|
@@ -1007,7 +1007,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1007
1007
|
}
|
|
1008
1008
|
}
|
|
1009
1009
|
}
|
|
1010
|
-
`;function
|
|
1010
|
+
`;function GLr(e={}){let t=Dy(WLr,{errorPolicy:`all`,...e});return{content:t?.data?.node?.childContentItemsConnection||{},...t}}var KLr=Xw(`
|
|
1011
1011
|
query getContentItemEmbeds($id: ID!, $withProgress: Boolean = false) {
|
|
1012
1012
|
content: node(id: $id) {
|
|
1013
1013
|
id
|
|
@@ -1033,7 +1033,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1033
1033
|
}
|
|
1034
1034
|
}
|
|
1035
1035
|
}
|
|
1036
|
-
`);function
|
|
1036
|
+
`);function qLr(e={}){let t=Dy(KLr,{fetchPolicy:`cache-and-network`,errorPolicy:`all`,...e});return{item:t?.data?.content,...t}}_y();var JLr=dy`
|
|
1037
1037
|
query getCurrentChurchEmbeds {
|
|
1038
1038
|
currentChurch {
|
|
1039
1039
|
mobileAppStoreUrl
|
|
@@ -1052,7 +1052,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1052
1052
|
}
|
|
1053
1053
|
}
|
|
1054
1054
|
}
|
|
1055
|
-
`;function
|
|
1055
|
+
`;function YLr(e={}){let t=Dy(JLr,{fetchPolicy:`cache-and-network`,errorPolicy:`all`,...e});return{currentChurch:t?.data?.currentChurch,...t}}var XLr=(e,t={})=>{let[n,r]=Ky(),{token:i,authenticated:a}=n,{data:o,error:s,loading:c,refetch:l}=Dy(e,{skip:!a,fetchPolicy:`network-only`,onError:()=>{console.warn(`Authentication error: logging out...`),r(Gy())},...t})||{},u=(0,S.useCallback)(()=>{l||setTimeout(()=>l(),0)},[l]);return(0,S.useEffect)(()=>{a&&u()?.catch(()=>{console.warn(`Refetch error, possibly unauthenticated`)})},[a,i,u]),{data:o,loading:c,error:s,authenticated:a}};_y();var ZLr=dy`
|
|
1056
1056
|
query getCurrentUserEmbeds {
|
|
1057
1057
|
currentUser {
|
|
1058
1058
|
id
|
|
@@ -1072,7 +1072,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1072
1072
|
}
|
|
1073
1073
|
}
|
|
1074
1074
|
}
|
|
1075
|
-
`;function O7(e={}){let t=
|
|
1075
|
+
`;function O7(e={}){let t=XLr(ZLr,{fetchPolicy:`cache-and-network`,errorPolicy:`all`,...e});return{currentUser:t?.data?.currentUser||null,...t}}var QLr=Xw(`
|
|
1076
1076
|
query getFeatureFeedRoute($id: ID!) {
|
|
1077
1077
|
featureFeed: node(id: $id) {
|
|
1078
1078
|
id
|
|
@@ -1082,7 +1082,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1082
1082
|
}
|
|
1083
1083
|
}
|
|
1084
1084
|
}
|
|
1085
|
-
`);function
|
|
1085
|
+
`);function $Lr(e={}){let t=Dy(QLr,{fetchPolicy:`cache-and-network`,errorPolicy:`all`,...e});return{features:t?.data?.featureFeed||{},...t}}var eRr=e=>{let[t,n]=(0,S.useState)({});function r(e,t){n(n=>({...n,[e]:t}))}function i(t){typeof e==`function`&&e()}function a(){n({})}return{setFieldValue:r,handleSubmit:i,values:t,reset:a,setValues:n}},tRr=Xw(`
|
|
1086
1086
|
query getLivestreamEmbeds($id: ID!) {
|
|
1087
1087
|
livestream: node(id: $id) {
|
|
1088
1088
|
id
|
|
@@ -1092,19 +1092,19 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1092
1092
|
}
|
|
1093
1093
|
}
|
|
1094
1094
|
}
|
|
1095
|
-
`);function
|
|
1095
|
+
`);function nRr(e={}){let t=Dy(tRr,{fetchPolicy:`cache-and-network`,errorPolicy:`all`,...e});return{livestream:t?.data?.livestream,...t}}_y();var rRr=dy`
|
|
1096
1096
|
mutation requestLogin($identity: AuthenticationIdentityInput!) {
|
|
1097
1097
|
requestLogin(identity: $identity) {
|
|
1098
1098
|
result
|
|
1099
1099
|
}
|
|
1100
1100
|
}
|
|
1101
|
-
`;function
|
|
1101
|
+
`;function iRr(e={}){return Py(rRr,e)}_y();var aRr=dy`
|
|
1102
1102
|
mutation requestRegister($identity: AuthenticationIdentityInput!) {
|
|
1103
1103
|
requestRegister(identity: $identity) {
|
|
1104
1104
|
result
|
|
1105
1105
|
}
|
|
1106
1106
|
}
|
|
1107
|
-
`;function
|
|
1107
|
+
`;function oRr(e={}){return Py(aRr,e)}_y();var sRr=dy`
|
|
1108
1108
|
mutation updateProfileFields($input: [UpdateProfileInput]!) {
|
|
1109
1109
|
updateProfileFields(input: $input) {
|
|
1110
1110
|
id
|
|
@@ -1112,7 +1112,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1112
1112
|
lastName
|
|
1113
1113
|
}
|
|
1114
1114
|
}
|
|
1115
|
-
`;function
|
|
1115
|
+
`;function cRr(e={}){return Py(sRr,e)}_y();var lRr=dy`
|
|
1116
1116
|
mutation uploadProfileImage($file: Upload!, $size: Int!) {
|
|
1117
1117
|
uploadProfileImage(file: $file, size: $size) {
|
|
1118
1118
|
id
|
|
@@ -1126,7 +1126,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1126
1126
|
}
|
|
1127
1127
|
}
|
|
1128
1128
|
}
|
|
1129
|
-
`;function
|
|
1129
|
+
`;function uRr(e={}){return Py(lRr,e)}_y();var dRr=dy`
|
|
1130
1130
|
mutation validateLoginEmbeds(
|
|
1131
1131
|
$identity: AuthenticationIdentityInput!
|
|
1132
1132
|
$otp: String!
|
|
@@ -1157,7 +1157,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1157
1157
|
}
|
|
1158
1158
|
}
|
|
1159
1159
|
}
|
|
1160
|
-
`;function
|
|
1160
|
+
`;function fRr(e={}){return Py(dRr,e)}_y();var pRr=dy`
|
|
1161
1161
|
mutation validateRegisterEmbeds(
|
|
1162
1162
|
$identity: AuthenticationIdentityInput!
|
|
1163
1163
|
$otp: String!
|
|
@@ -1188,15 +1188,15 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1188
1188
|
}
|
|
1189
1189
|
}
|
|
1190
1190
|
}
|
|
1191
|
-
`;function
|
|
1192
|
-
best ministries and events.`,children:[(0,q.jsxs)(J7,{textAlign:`left`,children:[(0,q.jsx)(J7,{mb:`base`,children:(0,q.jsx)(yw,{id:`firstName`,placeholder:`First Name`,handleOnChange:e=>h(`firstName`,e),required:!0,error:r?.firstName,editable:!g})}),(0,q.jsx)(J7,{mb:`base`,children:(0,q.jsx)(yw,{id:`lastName`,placeholder:`Last Name`,handleOnChange:e=>h(`lastName`,e),required:!0,error:r?.lastName,editable:!g})})]}),(0,q.jsx)(tw,{status:t,onClick:m,disabled:!(p.firstName&&p.lastName)||g,children:`Finish${g?`ing...`:``}`})]})}function
|
|
1191
|
+
`;function mRr(e={}){return Py(pRr,e)}var hRr={defaultHeading:`Welcome.`,defaultSubHeading:`Please login to continue.`};YDe(),Ow();function gRr(e={}){let[t,n]=Ky(),r=()=>{n(Wy({step:t.prevStep,prevStep:Ry.Welcome}))};return(0,q.jsx)(J7,{position:`fixed`,top:`0`,bottom:`0`,left:`0`,right:`0`,overflow:`scroll`,zIndex:9999,justifyContent:`center`,display:`flex`,alignItems:`center`,backgroundColor:`neutral.gray6`,children:(0,q.jsxs)(sw,{...e,className:`w-[440px] flex flex-col`,children:[t.prevStep===Ry.Identity?(0,q.jsx)(J7,{display:`flex`,alignItems:`center`,justifyContent:`end`,className:`pt-4 pr-4`,children:(0,q.jsxs)(tw,{variant:`link`,onClick:()=>r(),mode:`ghost`,surface:`tinted`,small:!0,children:[(0,q.jsx)(lT,{}),`Back`]})}):(0,q.jsx)(J7,{display:`flex`,alignItems:`center`,justifyContent:`end`,className:`pt-4 pr-4`,children:(0,q.jsx)(tw,{title:`Close`,circular:!0,surface:`tinted`,onClick:e.onClose,children:(0,q.jsx)(Dw,{size:18,weight:`bold`})})}),(0,q.jsxs)(cw,{className:`px-9 pb-9`,children:[(0,q.jsx)(uw,{as:`h2`,children:e.heading||hRr.defaultHeading}),(0,q.jsx)(uw,{fg:`secondary`,className:`mb-6`,children:e.subHeading||hRr.defaultSubHeading}),e.children]})]})})}gRr.propTypes={children:K.default.oneOfType([K.default.element,K.default.node]).isRequired,heading:K.default.string,subHeading:K.default.string};var _Rr=gRr,vRr=e=>{let[t,n]=(0,S.useState)(`IDLE`),[r,i]=(0,S.useState)(null),[a,o]=Ky(),[s,c]=(0,S.useState)(``),l=qx(),[u]=fRr(),[d]=mRr(),f=()=>{n(`ERROR`),i({passcode:`The code you entered is incorrect.`})},p=({token:e,user:t,sharedProfiles:n})=>{let r=(0,VLr.default)(t.firstName)||(0,VLr.default)(t.lastName);a.userExists?(l.track(`UserLogin`,{userId:t?.id,firstName:t?.firstName,lastName:t?.lastName,email:t?.email,phone:t?.phone}),o(Wy(r?{token:e,step:Ry.Details}:{token:e,step:Ry.Success}))):n.length>1?(l.track(`ExistingUserRegister`,{userId:t?.id,email:t?.email,phone:t?.phone,numberOfSharedProfiles:n.length}),o(Wy({token:e,step:Ry.Merge,userExists:!0,sharedProfiles:n}))):(l.track(`NewUserRegister`,{userId:t?.id,email:t?.email,phone:t?.phone}),o(Wy(r?{token:e,step:Ry.Details,userExists:!0,user:t}:{token:e,step:Ry.Success,userExists:!0})))},m=async e=>{e.preventDefault(),n(`LOADING`);try{a.userExists?await u({variables:{identity:a.identity,otp:s},update:(e,{data:{validateLogin:{accessToken:t,person:n}={}}={}})=>{p({token:t,user:n})},onError:f}):await d({variables:{identity:a.identity,otp:s},update:(e,{data:{validateRegister:{accessToken:t,person:n,sharedProfiles:r}={}}={}})=>{p({token:t,user:n,sharedProfiles:r})},onError:f})}catch(e){console.log(e)}},h=t===`LOADING`;return(0,q.jsx)(_Rr,{...e,heading:`We sent you a code...`,subHeading:`Verify the code we sent to your ${a.type===`email`?`email`:`phone`}.`,children:(0,q.jsxs)(`form`,{onSubmit:m,children:[(0,q.jsx)(J7,{mb:`base`,children:(0,q.jsx)(nSe,{id:`passcode`,value:s||``,onChange:e=>c(e),required:!0,maxLength:6,autoFocus:!0,error:r?.passcode})}),(0,q.jsx)(tw,{surface:`solid`,type:`submit`,disabled:!s||h,children:`Verify${h?`ing...`:``}`})]})})};function yRr(e){return e.charAt(0).toUpperCase()+e.slice(1)}function bRr(e){let[t,n]=(0,S.useState)(`IDLE`),[r,i]=(0,S.useState)(null),[a,o]=(0,S.useState)(null),[s,c]=Ky(),[l]=cRr(),[u]=ULr(),{currentUser:d}=O7();(0,S.useEffect)(()=>{o(d)},[d]);let f=e=>{n(`ERROR`),i(e)},{values:p,handleSubmit:m,setFieldValue:h}=eRr(async()=>{n(`LOADING`);let e=Object.keys(p).map(e=>({field:yRr(e),value:p[e]}));try{c(Wy({userProfile:e})),await u({variables:{profileInput:e}}),c(Wy({step:Ry.Success}))}catch(e){f(e),console.log(JSON.stringify(e))}}),g=t===`LOADING`;return(0,q.jsxs)(_Rr,{...e,heading:`Complete your profile`,subHeading:`Help us learn a little more about you so we can connect you with the
|
|
1192
|
+
best ministries and events.`,children:[(0,q.jsxs)(J7,{textAlign:`left`,children:[(0,q.jsx)(J7,{mb:`base`,children:(0,q.jsx)(yw,{id:`firstName`,placeholder:`First Name`,handleOnChange:e=>h(`firstName`,e),required:!0,error:r?.firstName,editable:!g})}),(0,q.jsx)(J7,{mb:`base`,children:(0,q.jsx)(yw,{id:`lastName`,placeholder:`Last Name`,handleOnChange:e=>h(`lastName`,e),required:!0,error:r?.lastName,editable:!g})})]}),(0,q.jsx)(tw,{status:t,onClick:m,disabled:!(p.firstName&&p.lastName)||g,children:`Finish${g?`ing...`:``}`})]})}function xRr({id:e}){let{features:t}=$Lr({variables:{id:e}});return(0,q.jsx)(LIr,{features:t?.features??[]})}Wg();var SRr=e=>new Ug((t,n)=>(t.setContext(({headers:t})=>({headers:{...t,"x-church":e,"x-cache-me-not":1}})),n(t)));Sd(),Yg(),wg();function CRr(e){return new Ug(function(t,n){var r=yd(t,[]);return new qh(function(i){var a,o=!1;return Promise.resolve(r).then(function(n){return e(n,t.getContext())}).then(t.setContext).then(function(){o||(a=n(t).subscribe({next:i.next.bind(i),error:i.error.bind(i),complete:i.complete.bind(i)}))}).catch(i.error.bind(i)),function(){o=!0,a&&a.unsubscribe()}})})}var wRr=CRr(async(e,{headers:t})=>{let n=null;try{return typeof window<`u`&&(n=window.localStorage.getItem(zy)),n?{headers:{...t,authorization:n?`Bearer ${n}`:``}}:{}}catch(e){return console.warn(`Authorization Failed`,e),{}}});Sd(),r_(),wg(),Yg();function TRr(e){return new Ug(function(t,n){return new qh(function(r){var i,a,o;try{i=n(t).subscribe({next:function(i){i.errors?o=e({graphQLErrors:i.errors,response:i,operation:t,forward:n}):aae(i)&&(o=e({protocolErrors:i.extensions[t_],response:i,operation:t,forward:n})),o?a=o.subscribe({next:r.next.bind(r),error:r.error.bind(r),complete:r.complete.bind(r)}):r.next(i)},error:function(i){o=e({operation:t,networkError:i,graphQLErrors:i&&i.result&&i.result.errors||void 0,forward:n}),o?a=o.subscribe({next:r.next.bind(r),error:r.error.bind(r),complete:r.complete.bind(r)}):r.error(i)},complete:function(){o||r.complete.bind(r)()}})}catch(i){e({networkError:i,operation:t,forward:n}),r.error(i)}return function(){i&&i.unsubscribe(),a&&i.unsubscribe()}})})}(function(e){vd(t,e);function t(t){var n=e.call(this)||this;return n.link=TRr(t),n}return t.prototype.request=function(e,t){return this.link.request(e,t)},t})(Ug);var ERr=s(((e,t,n)=>{(function(n){var r=typeof e==`object`&&e,i=typeof t==`object`&&t&&t.exports==r&&t,a=typeof global==`object`&&global;(a.global===a||a.window===a)&&(n=a);var o=function(e){this.message=e};o.prototype=Error(),o.prototype.name=`InvalidCharacterError`;var s=function(e){throw new o(e)},c=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`,l=/[\t\n\f\r ]/g,u={encode:function(e){e=String(e),/[^\0-\xFF]/.test(e)&&s(`The string to be encoded contains characters outside of the Latin1 range.`);for(var t=e.length%3,n=``,r=-1,i,a,o,l,u=e.length-t;++r<u;)i=e.charCodeAt(r)<<16,a=e.charCodeAt(++r)<<8,o=e.charCodeAt(++r),l=i+a+o,n+=c.charAt(l>>18&63)+c.charAt(l>>12&63)+c.charAt(l>>6&63)+c.charAt(l&63);return t==2?(i=e.charCodeAt(r)<<8,a=e.charCodeAt(++r),l=i+a,n+=c.charAt(l>>10)+c.charAt(l>>4&63)+c.charAt(l<<2&63)+`=`):t==1&&(l=e.charCodeAt(r),n+=c.charAt(l>>2)+c.charAt(l<<4&63)+`==`),n},decode:function(e){e=String(e).replace(l,``);var t=e.length;t%4==0&&(e=e.replace(/==?$/,``),t=e.length),(t%4==1||/[^+a-zA-Z0-9/]/.test(e))&&s(`Invalid character: the string to be decoded is not correctly encoded.`);for(var n=0,r,i,a=``,o=-1;++o<t;)i=c.indexOf(e.charAt(o)),r=n%4?r*64+i:i,n++%4&&(a+=String.fromCharCode(255&r>>(-2*n&6)));return a},version:`1.0.0`};if(typeof define==`function`&&typeof define.amd==`object`&&define.amd)define(function(){return u});else if(r&&!r.nodeType){if(i)i.exports=u;else for(var d in u)u.hasOwnProperty(d)&&(r[d]=u[d])}else n.base64=u})(n)})),DRr=s(((e,t)=>{t.exports=class{constructor({uri:e,name:t,type:n}){this.uri=e,this.name=t,this.type=n}}})),ORr=s(((e,t)=>{var n=DRr();t.exports=function(e){return typeof File<`u`&&e instanceof File||typeof Blob<`u`&&e instanceof Blob||e instanceof n}})),kRr=s(((e,t)=>{var n=ORr();t.exports=function(e,t=``,r=n){let i=new Map,a=new Map;function o(e,t,n){let s=e;if(r(e)){s=null;let n=i.get(e);n?n.push(t):i.set(e,[t])}else{let r=Array.isArray(e)||typeof FileList<`u`&&e instanceof FileList,i=e&&e.constructor===Object;if(r||i){let i=a.has(e);if(i?s=a.get(e):(s=r?[]:{},a.set(e,s)),!n.has(e)){let a=t?`${t}.`:``,c=new Set(n).add(e);if(r){let t=0;for(let n of e){let e=o(n,a+t++,c);i||s.push(e)}}else for(let t in e){let n=o(e[t],a+t,c);i||(s[t]=n)}}}}return s}return{clone:o(e,t,new Set),files:i}}})),ARr=s(((e,t)=>{t.exports=function(e,t,n){e.append(t,n,n.name)}})),jRr=s(((e,t)=>{t.exports=ORr()})),MRr=s(((e,t)=>{var{ApolloLink:n,Observable:r}=(yoe(),d(vy)),{createSignalIfSupported:i,fallbackHttpConfig:a,parseAndCheckHttpResponse:o,rewriteURIForGET:s,selectHttpOptionsAndBody:c,selectURI:l,serializeFetchParameter:u}=(vae(),d(w_)),f=kRr(),p=ARr(),m=jRr();t.exports=function({uri:e=`/graphql`,useGETForQueries:t,isExtractableFile:d=m,FormData:h,formDataAppendFile:g=p,fetch:_,fetchOptions:v,credentials:y,headers:b,includeExtensions:x}={}){let S={http:{includeExtensions:x},options:v,credentials:y,headers:b};return new n(n=>{let p=n.getContext(),{clientAwareness:{name:m,version:v}={},headers:y}=p,b={http:p.http,options:p.fetchOptions,credentials:p.credentials,headers:{...m&&{"apollographql-client-name":m},...v&&{"apollographql-client-version":v},...y}},{options:x,body:C}=c(n,a,S,b),{clone:w,files:T}=f(C,``,d),E=l(n,e);if(T.size){delete x.headers[`content-type`];let e=new(h||FormData);e.append(`operations`,u(w,`Payload`));let t={},n=0;T.forEach(e=>{t[++n]=e}),e.append(`map`,JSON.stringify(t)),n=0,T.forEach((t,r)=>{g(e,++n,r)}),x.body=e}else if(t&&!n.query.definitions.some(e=>e.kind===`OperationDefinition`&&e.operation===`mutation`)&&(x.method=`GET`),x.method===`GET`){let{newURI:e,parseError:t}=s(E,C);if(t)return new r(e=>{e.error(t)});E=e}else x.body=u(w,`Payload`);let{controller:D}=i();D&&(x.signal&&(x.signal.aborted?D.abort():x.signal.addEventListener(`abort`,()=>{D.abort()},{once:!0})),x.signal=D.signal);let O=_||fetch;return new r(e=>{let t;return O(E,x).then(e=>(n.setContext({response:e}),e)).then(o(n)).then(t=>{e.next(t),e.complete()}).catch(n=>{t||(n.result&&n.result.errors&&n.result.data&&e.next(n.result),e.error(n))}),()=>{t=!0,D&&D.abort()}})})}})),NRr=u(ERr()),PRr=u(MRr(),1);Wie(),_ae(),wg();var FRr=typeof window<`u`&&(window.location.hostname===`localhost`||window.location.hostname===`127.0.0.1`)?`http://localhost:4000`:`https://cdn.apollos.app`,IRr=Kg(({query:e})=>{let{kind:t,operation:n}=Dm(e);return t===`OperationDefinition`&&n===`mutation`},(0,PRr.default)({uri:FRr}),x_({uri:FRr}));Pie();var LRr=!1,RRr=[],zRr=e=>{LRr=e},BRr=e=>{RRr.push(e)},VRr=()=>{RRr.map(e=>e()),RRr=[]},HRr=()=>{RRr=[]};async function URr(e){let t=window.localStorage.getItem(By);if(!t)throw Error(`Refresh Token not found.`);return fetch(FRr,{method:`POST`,headers:{"x-church":e,"Content-Type":`application/json`},body:JSON.stringify({query:`
|
|
1193
1193
|
mutation token($refreshToken: String!) {
|
|
1194
1194
|
refreshSession(refreshToken: $refreshToken){
|
|
1195
1195
|
accessToken
|
|
1196
1196
|
refreshToken
|
|
1197
1197
|
}
|
|
1198
1198
|
}
|
|
1199
|
-
`,variables:{refreshToken:t}})})}var BRr=e=>!!e.filter(e=>e?.extensions?.code===`UNAUTHENTICATED`).length;function VRr(e){if(!e)return null;try{let t=e.split(`.`)[1],n=JSON.parse(kRr.default.decode(t)).exp,r=new Date().getTime();return n*1e3<r}catch{return null}}function HRr(e){let t=e.getContext()?.headers?.authorization,n=null;return t&&(n=t.replace(`Bearer `,``)),n}var URr=(e,t)=>xRr(({graphQLErrors:n,networkError:r,operation:i,forward:a})=>{if(n){let r=BRr(n),o=HRr(i),s=VRr(o);if(r&&o&&s){if(!NRr){FRr(!0);let n=null;return Eg(zRr(t).then(e=>e.json()).then(e=>{if(n=e?.data?.refreshSession?.accessToken,n)return window.localStorage.setItem(zy,n);throw Error(`Token could not be refreshed.`)}).then(()=>{let e=i.getContext().headers;return i.setContext({headers:{...e,authorization:`Bearer ${n}`}}),a(i)}).catch(()=>{RRr(),FRr(!1),e()})).flatMap(()=>(LRr(),FRr(!1),a(i)))}return Eg(new Promise(e=>{IRr(()=>e())})).flatMap(()=>a(i))}}return null}),WRr=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;for(var r=Array(e),i=0,t=0;t<n;t++)for(var a=arguments[t],o=0,s=a.length;o<s;o++,i++)r[i]=a[o];return r},GRr=function(){function e(e){var t=e.debug,n=t!==void 0&&t;this.debug=n,this.lines=[]}return e.prototype.emit=function(t,n){if(t in console){var r=e.prefix;console[t].apply(console,WRr([r],n))}},e.prototype.tailLogs=function(){var e=this;this.lines.forEach(function(t){var n=t[0],r=t[1];return e.emit(n,r)})},e.prototype.getLogs=function(){return this.lines},e.prototype.write=function(t,n){var r=e.buffer;this.lines=WRr(this.lines.slice(1-r),[[t,n]]),(this.debug||t!==`log`)&&this.emit(t,n)},e.prototype.info=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.write(`log`,e)},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.write(`warn`,e)},e.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.write(`error`,e)},e.buffer=30,e.prefix=`[apollo-cache-persist]`,e}(),KRr=function(){function e(e){var t=e.cache,n=e.serialize,r=n===void 0||n;this.cache=t,this.serialize=r}return e.prototype.extract=function(){var e=this.cache.extract();return this.serialize&&(e=JSON.stringify(e)),e},e.prototype.restore=function(e){this.serialize&&typeof e==`string`&&(e=JSON.parse(e)),e!=null&&this.cache.restore(e)},e}(),qRr=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})},JRr=function(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,o={next:s(0),throw:s(1),return:s(2)};return typeof Symbol==`function`&&(o[Symbol.iterator]=function(){return this}),o;function s(e){return function(t){return c([e,t])}}function c(o){if(r)throw TypeError(`Generator is already executing.`);for(;n;)try{if(r=1,i&&(a=o[0]&2?i.return:o[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,o[1])).done)return a;switch(i=0,a&&(o=[o[0]&2,a.value]),o[0]){case 0:case 1:a=o;break;case 4:return n.label++,{value:o[1],done:!1};case 5:n.label++,i=o[1],o=[0];continue;case 7:o=n.ops.pop(),n.trys.pop();continue;default:if(a=n.trys,!(a=a.length>0&&a[a.length-1])&&(o[0]===6||o[0]===2)){n=0;continue}if(o[0]===3&&(!a||o[1]>a[0]&&o[1]<a[3])){n.label=o[1];break}if(o[0]===6&&n.label<a[1]){n.label=a[1],a=o;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(o);break}a[2]&&n.ops.pop(),n.trys.pop();continue}o=t.call(e,n)}catch(e){o=[6,e],i=0}finally{r=a=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}},YRr=function(){function e(e){var t=e.storage,n=e.key,r=n===void 0?`apollo-cache-persist`:n;this.storage=t,this.key=r}return e.prototype.read=function(){return qRr(this,void 0,void 0,function(){return JRr(this,function(e){return[2,this.storage.getItem(this.key)]})})},e.prototype.write=function(e){return qRr(this,void 0,void 0,function(){return JRr(this,function(t){switch(t.label){case 0:return[4,this.storage.setItem(this.key,e)];case 1:return t.sent(),[2]}})})},e.prototype.purge=function(){return qRr(this,void 0,void 0,function(){return JRr(this,function(e){switch(e.label){case 0:return[4,this.storage.removeItem(this.key)];case 1:return e.sent(),[2]}})})},e.prototype.getSize=function(){return qRr(this,void 0,void 0,function(){var e;return JRr(this,function(t){switch(t.label){case 0:return[4,this.storage.getItem(this.key)];case 1:return e=t.sent(),e==null?[2,0]:[2,typeof e==`string`?e.length:null]}})})},e}(),XRr=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})},ZRr=function(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,o={next:s(0),throw:s(1),return:s(2)};return typeof Symbol==`function`&&(o[Symbol.iterator]=function(){return this}),o;function s(e){return function(t){return c([e,t])}}function c(o){if(r)throw TypeError(`Generator is already executing.`);for(;n;)try{if(r=1,i&&(a=o[0]&2?i.return:o[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,o[1])).done)return a;switch(i=0,a&&(o=[o[0]&2,a.value]),o[0]){case 0:case 1:a=o;break;case 4:return n.label++,{value:o[1],done:!1};case 5:n.label++,i=o[1],o=[0];continue;case 7:o=n.ops.pop(),n.trys.pop();continue;default:if(a=n.trys,!(a=a.length>0&&a[a.length-1])&&(o[0]===6||o[0]===2)){n=0;continue}if(o[0]===3&&(!a||o[1]>a[0]&&o[1]<a[3])){n.label=o[1];break}if(o[0]===6&&n.label<a[1]){n.label=a[1],a=o;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(o);break}a[2]&&n.ops.pop(),n.trys.pop();continue}o=t.call(e,n)}catch(e){o=[6,e],i=0}finally{r=a=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}},QRr=function(){function e(e,t){var n=e.log,r=e.cache,i=e.storage,a=t.maxSize,o=a===void 0?1048576:a,s=t.persistenceMapper;this.log=n,this.cache=r,this.storage=i,this.paused=!1,s&&(this.persistenceMapper=s),o&&(this.maxSize=o)}return e.prototype.persist=function(){return XRr(this,void 0,void 0,function(){var e,t;return ZRr(this,function(n){switch(n.label){case 0:return n.trys.push([0,6,,7]),e=this.cache.extract(),this.paused||!this.persistenceMapper?[3,2]:[4,this.persistenceMapper(e)];case 1:e=n.sent(),n.label=2;case 2:return this.maxSize!=null&&typeof e==`string`&&e.length>this.maxSize&&!this.paused?[4,this.purge()]:[3,4];case 3:return n.sent(),this.paused=!0,[2];case 4:return this.paused?[2]:[4,this.storage.write(e)];case 5:return n.sent(),this.log.info(typeof e==`string`?`Persisted cache of size `+e.length+` characters`:`Persisted cache`),[3,7];case 6:throw t=n.sent(),this.log.error(`Error persisting cache`,t),t;case 7:return[2]}})})},e.prototype.restore=function(){return XRr(this,void 0,void 0,function(){var e,t;return ZRr(this,function(n){switch(n.label){case 0:return n.trys.push([0,5,,6]),[4,this.storage.read()];case 1:return e=n.sent(),e==null?[3,3]:[4,this.cache.restore(e)];case 2:return n.sent(),this.log.info(typeof e==`string`?`Restored cache of size `+e.length+` characters`:`Restored cache`),[3,4];case 3:this.log.info(`No stored cache to restore`),n.label=4;case 4:return[3,6];case 5:throw t=n.sent(),this.log.error(`Error restoring cache`,t),t;case 6:return[2]}})})},e.prototype.purge=function(){return XRr(this,void 0,void 0,function(){var e;return ZRr(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,this.storage.purge()];case 1:return t.sent(),this.log.info(`Purged cache storage`),[3,3];case 2:throw e=t.sent(),this.log.error(`Error purging cache storage`,e),e;case 3:return[2]}})})},e}(),$Rr=(function(e){var t=e.cache;return function(e){var n=t.write,r=t.evict,i=t.modify;return t.write=function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];var a=n.apply(t,r);return e(),a},t.evict=function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];var a=r.apply(t,n);return e(),a},t.modify=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var a=i.apply(t,n);return e(),a},function(){t.write=n,t.evict=r,t.modify=i}}}),ezr=(function(e){var t=e.log,n=e.cache;return function(e){return t.warn("Trigger option `background` not available on web; using `write` trigger"),$Rr({cache:n})(e)}}),tzr=function(){function e(t,n){var r=this,i=t.log,a=t.persistor;this.fire=function(){r.debounce?(r.timeout!=null&&clearTimeout(r.timeout),r.timeout=setTimeout(r.persist,r.debounce)):r.persist()},this.persist=function(){r.paused||r.persistor.persist()};var o=e.defaultDebounce,s=n.cache,c=n.debounce,l=n.trigger,u=l===void 0?`write`:l;if(u)switch(this.debounce=c??o,this.persistor=a,this.paused=!1,u){case`write`:this.uninstall=$Rr({cache:s})(this.fire);break;case`background`:c&&i.warn("Debounce is not recommended with `background` trigger"),this.debounce=c,this.uninstall=ezr({cache:s,log:i})(this.fire);break;default:if(typeof u==`function`)this.uninstall=u(this.fire);else throw Error(`Unrecognized trigger option: `+u)}}return e.prototype.pause=function(){this.paused=!0},e.prototype.resume=function(){this.paused=!1},e.prototype.remove=function(){this.uninstall&&(this.uninstall(),this.uninstall=null,this.paused=!0)},e.defaultDebounce=1e3,e}(),nzr=function(){function e(e){if(!e.cache)throw Error(`In order to persist your Apollo Cache, you need to pass in a cache. Please see https://www.apollographql.com/docs/react/basics/caching.html for our default InMemoryCache.`);if(!e.storage)throw Error(`In order to persist your Apollo Cache, you need to pass in an underlying storage provider. Please see https://github.com/apollographql/apollo-cache-persist#storage-providers`);var t=new GRr(e),n=new KRr(e),r=new YRr(e),i=new QRr({log:t,cache:n,storage:r},e),a=new tzr({log:t,persistor:i},e);this.log=t,this.cache=n,this.storage=r,this.persistor=i,this.trigger=a}return e.prototype.persist=function(){return this.persistor.persist()},e.prototype.restore=function(){return this.persistor.restore()},e.prototype.purge=function(){return this.persistor.purge()},e.prototype.pause=function(){this.trigger.pause()},e.prototype.resume=function(){this.trigger.resume()},e.prototype.remove=function(){this.trigger.remove()},e.prototype.getLogs=function(e){if(e===void 0&&(e=!1),e)this.log.tailLogs();else return this.log.getLogs()},e.prototype.getSize=function(){return this.storage.getSize()},e}(),rzr=(function(e){return new nzr(e).restore()}),izr=(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})();(function(e){izr(t,e);function t(t){var n=e.call(this,t)||this;return n.storage=new ozr(t),n.persistor=new azr({log:n.log,cache:n.cache,storage:n.storage},t),n}return t.prototype.restoreSync=function(){this.persistor.restoreSync()},t})(nzr);var azr=function(e){izr(t,e);function t(t,n){var r=t.log,i=t.cache,a=t.storage;return e.call(this,{log:r,cache:i,storage:a},n)||this}return t.prototype.restoreSync=function(){this.cache.restore(this.storage.readSync())},t}(QRr),ozr=function(e){izr(t,e);function t(t){return e.call(this,t)||this}return t.prototype.readSync=function(){return this.storage.getItem(this.key)},t}(YRr);(function(){function e(e){this.storage=e}return e.prototype.getItem=function(e){return this.storage.getItem(e)},e.prototype.removeItem=function(e){return this.storage.removeItem(e)},e.prototype.setItem=function(e,t){return this.storage.setItem(e,t)},e})(),function(){function e(e){this.storage=e}return e.prototype.getItem=function(e){return this.storage.get(e)},e.prototype.removeItem=function(e){return this.storage.remove(e)},e.prototype.setItem=function(e,t){return this.storage.set(e,t)},e}(),function(){function e(e){this.storage=e}return e.prototype.getItem=function(e){return this.storage.getItem(e)},e.prototype.removeItem=function(e){return this.storage.removeItem(e)},e.prototype.setItem=function(e,t){var n=this;return new Promise(function(r,i){n.storage.setItem(e,t).then(function(){return r()}).catch(function(){return i()})})},e}(),function(){function e(e){this.storage=e}return e.prototype.getItem=function(e){return this.storage.getItem(e)},e.prototype.removeItem=function(e){return this.storage.removeItem(e)},e.prototype.setItem=function(e,t){return t===null?this.removeItem(e):this.storage.setItem(e,t)},e}(),function(){function e(e){this.storage=e}return e.prototype.getItem=function(e){return this.storage.getItem(e)||null},e.prototype.removeItem=function(e){var t=this;return new Promise(function(n,r){Promise.resolve(t.storage.removeItem(e)).then(function(){return n()}).catch(function(){return r()})})},e.prototype.setItem=function(e,t){var n=this;return new Promise(function(r,i){n.storage.setItem(e,t).then(function(){return r()}).catch(function(){return i()})})},e}(),function(){function e(e){this.storage=e}return e.prototype.getItem=function(e){return this.storage.getString(e)||null},e.prototype.removeItem=function(e){return this.storage.delete(e)},e.prototype.setItem=function(e,t){return t===null?this.removeItem(e):this.storage.set(e,t)},e}(),function(){function e(e){this.storage=e}return e.prototype.getItem=function(e){return this.storage.getItem(e)},e.prototype.removeItem=function(e){return this.storage.removeItem(e)},e.prototype.setItem=function(e,t){return t===null?this.removeItem(e):this.storage.setItem(e,t)},e}(),yoe();var szr=async(e,{church:t})=>{let{data:n}=await(await fetch(jRr,{method:`POST`,headers:{"Content-Type":`application/json`,"x-church":t},body:JSON.stringify({query:`
|
|
1199
|
+
`,variables:{refreshToken:t}})})}var WRr=e=>!!e.filter(e=>e?.extensions?.code===`UNAUTHENTICATED`).length;function GRr(e){if(!e)return null;try{let t=e.split(`.`)[1],n=JSON.parse(NRr.default.decode(t)).exp,r=new Date().getTime();return n*1e3<r}catch{return null}}function KRr(e){let t=e.getContext()?.headers?.authorization,n=null;return t&&(n=t.replace(`Bearer `,``)),n}var qRr=(e,t)=>TRr(({graphQLErrors:n,networkError:r,operation:i,forward:a})=>{if(n){let r=WRr(n),o=KRr(i),s=GRr(o);if(r&&o&&s){if(!LRr){zRr(!0);let n=null;return Eg(URr(t).then(e=>e.json()).then(e=>{if(n=e?.data?.refreshSession?.accessToken,n)return window.localStorage.setItem(zy,n);throw Error(`Token could not be refreshed.`)}).then(()=>{let e=i.getContext().headers;return i.setContext({headers:{...e,authorization:`Bearer ${n}`}}),a(i)}).catch(()=>{HRr(),zRr(!1),e()})).flatMap(()=>(VRr(),zRr(!1),a(i)))}return Eg(new Promise(e=>{BRr(()=>e())})).flatMap(()=>a(i))}}return null}),JRr=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;for(var r=Array(e),i=0,t=0;t<n;t++)for(var a=arguments[t],o=0,s=a.length;o<s;o++,i++)r[i]=a[o];return r},YRr=function(){function e(e){var t=e.debug,n=t!==void 0&&t;this.debug=n,this.lines=[]}return e.prototype.emit=function(t,n){if(t in console){var r=e.prefix;console[t].apply(console,JRr([r],n))}},e.prototype.tailLogs=function(){var e=this;this.lines.forEach(function(t){var n=t[0],r=t[1];return e.emit(n,r)})},e.prototype.getLogs=function(){return this.lines},e.prototype.write=function(t,n){var r=e.buffer;this.lines=JRr(this.lines.slice(1-r),[[t,n]]),(this.debug||t!==`log`)&&this.emit(t,n)},e.prototype.info=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.write(`log`,e)},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.write(`warn`,e)},e.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.write(`error`,e)},e.buffer=30,e.prefix=`[apollo-cache-persist]`,e}(),XRr=function(){function e(e){var t=e.cache,n=e.serialize,r=n===void 0||n;this.cache=t,this.serialize=r}return e.prototype.extract=function(){var e=this.cache.extract();return this.serialize&&(e=JSON.stringify(e)),e},e.prototype.restore=function(e){this.serialize&&typeof e==`string`&&(e=JSON.parse(e)),e!=null&&this.cache.restore(e)},e}(),ZRr=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})},QRr=function(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,o={next:s(0),throw:s(1),return:s(2)};return typeof Symbol==`function`&&(o[Symbol.iterator]=function(){return this}),o;function s(e){return function(t){return c([e,t])}}function c(o){if(r)throw TypeError(`Generator is already executing.`);for(;n;)try{if(r=1,i&&(a=o[0]&2?i.return:o[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,o[1])).done)return a;switch(i=0,a&&(o=[o[0]&2,a.value]),o[0]){case 0:case 1:a=o;break;case 4:return n.label++,{value:o[1],done:!1};case 5:n.label++,i=o[1],o=[0];continue;case 7:o=n.ops.pop(),n.trys.pop();continue;default:if(a=n.trys,!(a=a.length>0&&a[a.length-1])&&(o[0]===6||o[0]===2)){n=0;continue}if(o[0]===3&&(!a||o[1]>a[0]&&o[1]<a[3])){n.label=o[1];break}if(o[0]===6&&n.label<a[1]){n.label=a[1],a=o;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(o);break}a[2]&&n.ops.pop(),n.trys.pop();continue}o=t.call(e,n)}catch(e){o=[6,e],i=0}finally{r=a=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}},$Rr=function(){function e(e){var t=e.storage,n=e.key,r=n===void 0?`apollo-cache-persist`:n;this.storage=t,this.key=r}return e.prototype.read=function(){return ZRr(this,void 0,void 0,function(){return QRr(this,function(e){return[2,this.storage.getItem(this.key)]})})},e.prototype.write=function(e){return ZRr(this,void 0,void 0,function(){return QRr(this,function(t){switch(t.label){case 0:return[4,this.storage.setItem(this.key,e)];case 1:return t.sent(),[2]}})})},e.prototype.purge=function(){return ZRr(this,void 0,void 0,function(){return QRr(this,function(e){switch(e.label){case 0:return[4,this.storage.removeItem(this.key)];case 1:return e.sent(),[2]}})})},e.prototype.getSize=function(){return ZRr(this,void 0,void 0,function(){var e;return QRr(this,function(t){switch(t.label){case 0:return[4,this.storage.getItem(this.key)];case 1:return e=t.sent(),e==null?[2,0]:[2,typeof e==`string`?e.length:null]}})})},e}(),ezr=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})},tzr=function(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,o={next:s(0),throw:s(1),return:s(2)};return typeof Symbol==`function`&&(o[Symbol.iterator]=function(){return this}),o;function s(e){return function(t){return c([e,t])}}function c(o){if(r)throw TypeError(`Generator is already executing.`);for(;n;)try{if(r=1,i&&(a=o[0]&2?i.return:o[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,o[1])).done)return a;switch(i=0,a&&(o=[o[0]&2,a.value]),o[0]){case 0:case 1:a=o;break;case 4:return n.label++,{value:o[1],done:!1};case 5:n.label++,i=o[1],o=[0];continue;case 7:o=n.ops.pop(),n.trys.pop();continue;default:if(a=n.trys,!(a=a.length>0&&a[a.length-1])&&(o[0]===6||o[0]===2)){n=0;continue}if(o[0]===3&&(!a||o[1]>a[0]&&o[1]<a[3])){n.label=o[1];break}if(o[0]===6&&n.label<a[1]){n.label=a[1],a=o;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(o);break}a[2]&&n.ops.pop(),n.trys.pop();continue}o=t.call(e,n)}catch(e){o=[6,e],i=0}finally{r=a=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}},nzr=function(){function e(e,t){var n=e.log,r=e.cache,i=e.storage,a=t.maxSize,o=a===void 0?1048576:a,s=t.persistenceMapper;this.log=n,this.cache=r,this.storage=i,this.paused=!1,s&&(this.persistenceMapper=s),o&&(this.maxSize=o)}return e.prototype.persist=function(){return ezr(this,void 0,void 0,function(){var e,t;return tzr(this,function(n){switch(n.label){case 0:return n.trys.push([0,6,,7]),e=this.cache.extract(),this.paused||!this.persistenceMapper?[3,2]:[4,this.persistenceMapper(e)];case 1:e=n.sent(),n.label=2;case 2:return this.maxSize!=null&&typeof e==`string`&&e.length>this.maxSize&&!this.paused?[4,this.purge()]:[3,4];case 3:return n.sent(),this.paused=!0,[2];case 4:return this.paused?[2]:[4,this.storage.write(e)];case 5:return n.sent(),this.log.info(typeof e==`string`?`Persisted cache of size `+e.length+` characters`:`Persisted cache`),[3,7];case 6:throw t=n.sent(),this.log.error(`Error persisting cache`,t),t;case 7:return[2]}})})},e.prototype.restore=function(){return ezr(this,void 0,void 0,function(){var e,t;return tzr(this,function(n){switch(n.label){case 0:return n.trys.push([0,5,,6]),[4,this.storage.read()];case 1:return e=n.sent(),e==null?[3,3]:[4,this.cache.restore(e)];case 2:return n.sent(),this.log.info(typeof e==`string`?`Restored cache of size `+e.length+` characters`:`Restored cache`),[3,4];case 3:this.log.info(`No stored cache to restore`),n.label=4;case 4:return[3,6];case 5:throw t=n.sent(),this.log.error(`Error restoring cache`,t),t;case 6:return[2]}})})},e.prototype.purge=function(){return ezr(this,void 0,void 0,function(){var e;return tzr(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,this.storage.purge()];case 1:return t.sent(),this.log.info(`Purged cache storage`),[3,3];case 2:throw e=t.sent(),this.log.error(`Error purging cache storage`,e),e;case 3:return[2]}})})},e}(),rzr=(function(e){var t=e.cache;return function(e){var n=t.write,r=t.evict,i=t.modify;return t.write=function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];var a=n.apply(t,r);return e(),a},t.evict=function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];var a=r.apply(t,n);return e(),a},t.modify=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var a=i.apply(t,n);return e(),a},function(){t.write=n,t.evict=r,t.modify=i}}}),izr=(function(e){var t=e.log,n=e.cache;return function(e){return t.warn("Trigger option `background` not available on web; using `write` trigger"),rzr({cache:n})(e)}}),azr=function(){function e(t,n){var r=this,i=t.log,a=t.persistor;this.fire=function(){r.debounce?(r.timeout!=null&&clearTimeout(r.timeout),r.timeout=setTimeout(r.persist,r.debounce)):r.persist()},this.persist=function(){r.paused||r.persistor.persist()};var o=e.defaultDebounce,s=n.cache,c=n.debounce,l=n.trigger,u=l===void 0?`write`:l;if(u)switch(this.debounce=c??o,this.persistor=a,this.paused=!1,u){case`write`:this.uninstall=rzr({cache:s})(this.fire);break;case`background`:c&&i.warn("Debounce is not recommended with `background` trigger"),this.debounce=c,this.uninstall=izr({cache:s,log:i})(this.fire);break;default:if(typeof u==`function`)this.uninstall=u(this.fire);else throw Error(`Unrecognized trigger option: `+u)}}return e.prototype.pause=function(){this.paused=!0},e.prototype.resume=function(){this.paused=!1},e.prototype.remove=function(){this.uninstall&&(this.uninstall(),this.uninstall=null,this.paused=!0)},e.defaultDebounce=1e3,e}(),ozr=function(){function e(e){if(!e.cache)throw Error(`In order to persist your Apollo Cache, you need to pass in a cache. Please see https://www.apollographql.com/docs/react/basics/caching.html for our default InMemoryCache.`);if(!e.storage)throw Error(`In order to persist your Apollo Cache, you need to pass in an underlying storage provider. Please see https://github.com/apollographql/apollo-cache-persist#storage-providers`);var t=new YRr(e),n=new XRr(e),r=new $Rr(e),i=new nzr({log:t,cache:n,storage:r},e),a=new azr({log:t,persistor:i},e);this.log=t,this.cache=n,this.storage=r,this.persistor=i,this.trigger=a}return e.prototype.persist=function(){return this.persistor.persist()},e.prototype.restore=function(){return this.persistor.restore()},e.prototype.purge=function(){return this.persistor.purge()},e.prototype.pause=function(){this.trigger.pause()},e.prototype.resume=function(){this.trigger.resume()},e.prototype.remove=function(){this.trigger.remove()},e.prototype.getLogs=function(e){if(e===void 0&&(e=!1),e)this.log.tailLogs();else return this.log.getLogs()},e.prototype.getSize=function(){return this.storage.getSize()},e}(),szr=(function(e){return new ozr(e).restore()}),czr=(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})();(function(e){czr(t,e);function t(t){var n=e.call(this,t)||this;return n.storage=new uzr(t),n.persistor=new lzr({log:n.log,cache:n.cache,storage:n.storage},t),n}return t.prototype.restoreSync=function(){this.persistor.restoreSync()},t})(ozr);var lzr=function(e){czr(t,e);function t(t,n){var r=t.log,i=t.cache,a=t.storage;return e.call(this,{log:r,cache:i,storage:a},n)||this}return t.prototype.restoreSync=function(){this.cache.restore(this.storage.readSync())},t}(nzr),uzr=function(e){czr(t,e);function t(t){return e.call(this,t)||this}return t.prototype.readSync=function(){return this.storage.getItem(this.key)},t}($Rr);(function(){function e(e){this.storage=e}return e.prototype.getItem=function(e){return this.storage.getItem(e)},e.prototype.removeItem=function(e){return this.storage.removeItem(e)},e.prototype.setItem=function(e,t){return this.storage.setItem(e,t)},e})(),function(){function e(e){this.storage=e}return e.prototype.getItem=function(e){return this.storage.get(e)},e.prototype.removeItem=function(e){return this.storage.remove(e)},e.prototype.setItem=function(e,t){return this.storage.set(e,t)},e}(),function(){function e(e){this.storage=e}return e.prototype.getItem=function(e){return this.storage.getItem(e)},e.prototype.removeItem=function(e){return this.storage.removeItem(e)},e.prototype.setItem=function(e,t){var n=this;return new Promise(function(r,i){n.storage.setItem(e,t).then(function(){return r()}).catch(function(){return i()})})},e}(),function(){function e(e){this.storage=e}return e.prototype.getItem=function(e){return this.storage.getItem(e)},e.prototype.removeItem=function(e){return this.storage.removeItem(e)},e.prototype.setItem=function(e,t){return t===null?this.removeItem(e):this.storage.setItem(e,t)},e}(),function(){function e(e){this.storage=e}return e.prototype.getItem=function(e){return this.storage.getItem(e)||null},e.prototype.removeItem=function(e){var t=this;return new Promise(function(n,r){Promise.resolve(t.storage.removeItem(e)).then(function(){return n()}).catch(function(){return r()})})},e.prototype.setItem=function(e,t){var n=this;return new Promise(function(r,i){n.storage.setItem(e,t).then(function(){return r()}).catch(function(){return i()})})},e}(),function(){function e(e){this.storage=e}return e.prototype.getItem=function(e){return this.storage.getString(e)||null},e.prototype.removeItem=function(e){return this.storage.delete(e)},e.prototype.setItem=function(e,t){return t===null?this.removeItem(e):this.storage.set(e,t)},e}(),function(){function e(e){this.storage=e}return e.prototype.getItem=function(e){return this.storage.getItem(e)},e.prototype.removeItem=function(e){return this.storage.removeItem(e)},e.prototype.setItem=function(e,t){return t===null?this.removeItem(e):this.storage.setItem(e,t)},e}(),yoe();var dzr=async(e,{church:t})=>{let{data:n}=await(await fetch(FRr,{method:`POST`,headers:{"Content-Type":`application/json`,"x-church":t},body:JSON.stringify({query:`
|
|
1200
1200
|
{
|
|
1201
1201
|
__schema {
|
|
1202
1202
|
types {
|
|
@@ -1208,7 +1208,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1208
1208
|
}
|
|
1209
1209
|
}
|
|
1210
1210
|
}
|
|
1211
|
-
`})})).json();n.__schema.types=await n.__schema.types.filter(e=>e.possibleTypes!==null);let r={};n.__schema.types.forEach(e=>{e.possibleTypes&&(r[e.name]=[...e.possibleTypes.map(e=>e.name)])});let i=new Uv({possibleTypes:r,typePolicies:{Query:{fields:{search:{keyArgs:[`query`],merge(e,t){return e?t?.pageInfo?.endCursor===e?.pageInfo?.endCursor||e?.edges.length===e?.totalCount?e:{...t,edges:[...e?.edges,...t?.edges]}:t}}}},ContentChannel:{fields:{childContentItemsConnection:{keyArgs:[`id`],merge(e,t){return e?t.pageInfo.endCursor===e.pageInfo.endCursor?e:{...t,edges:[...e?.edges,...t?.edges]}:t}}}}}}).restore(e||{});return typeof window<`u`&&rzr({cache:i,storage:window.localStorage}),i};foe(),Wg();var czr=async e=>{let t=!1,n=async()=>{t||(t=!0,window.localStorage.clear(zy),window.localStorage.clear(By)),t=!1},r=await szr(null,{church:e}),i=URr(n,e),a=Ug.from([vRr(e),i,bRr,MRr]);return new sy({link:a,cache:r,queryDeduplication:!1,shouldBatch:!0,version:`0.0.1`,defaultOptions:{watchQuery:{fetchPolicy:`cache-and-network`}}})},lzr=(0,S.createContext)(),uzr=(0,S.createContext)(),dzr={isOpen:!1,content:null,modal:!0},fzr={open:`open`,close:`close`,set:`set`},pzr=()=>({type:`open`}),mzr=()=>({type:`close`}),hzr=e=>({type:`set`,payload:e}),gzr=(e,t)=>{switch(t.type){case fzr.open:return{...e,isOpen:!0};case fzr.close:return{...e,isOpen:!1,content:null};case fzr.set:return{...e,content:gVr(`${t.payload}`)};default:throw Error(`Unhandled action type: ${t.type}`)}};function _zr(e={}){let[t,n]=(0,S.useReducer)(gzr,{...dzr,modal:e.modal!==`false`&&!!e.modal});return(0,q.jsx)(lzr.Provider,{value:t,children:(0,q.jsx)(uzr.Provider,{value:n,children:e.children})})}function vzr(){let e=(0,S.useContext)(lzr);if(e===void 0)throw Error(`useModalState must be used within a ModalProvider`);return e}function yzr(){let e=(0,S.useContext)(uzr);if(e===void 0)throw Error(`useModalDispatch must be used within a ModalProvider`);return e}function bzr(){let e=[vzr(),yzr()];if(e===void 0)throw Error(`useModal must be used within a ModalProvider`);return e}_zr.propTypes={children:K.default.oneOfType([K.default.element,K.default.node]),modal:K.default.string};var xzr=(0,S.createContext)(),Szr=(0,S.createContext)(),Czr={church:null,searchFeed:null,searchProfileSize:null,hideApollosAuth:null,customPlaceholder:null,loading:!0},wzr={set:`set`},Tzr=e=>({type:`set`,payload:e}),Ezr=(e,t)=>{switch(t.type){case wzr.set:return{...e,...t.payload};default:throw Error(`Unhandled action type: ${t.type}`)}};function Dzr(e={}){let[t,n]=(0,S.useReducer)(Ezr,{...Czr,church:e.church,searchFeed:e.searchFeed,searchProfileSize:e.searchProfileSize,hideApollosAuth:e.hideApollosAuth,customPlaceholder:e.customPlaceholder});return(0,q.jsx)(xzr.Provider,{value:t,children:(0,q.jsx)(Szr.Provider,{value:n,children:e.children})})}function k7(){let e=(0,S.useContext)(xzr);if(e===void 0)throw Error(`useSearchState must be used within a SearchProvider`);return e}function Ozr(){let e=(0,S.useContext)(Szr);if(e===void 0)throw Error(`useSearchDispatch must be used within a SearchProvider`);return e}function kzr(){let e=[k7(),Ozr()];if(e===void 0)throw Error(`useSearch must be used within a SearchProvider`);return e}Dzr.propTypes={children:K.default.oneOfType([K.default.element,K.default.node])};var Azr=s(((e,t)=>{t.exports=function(e,t,n,r){var i=n?n.call(r,e,t):void 0;if(i!==void 0)return!!i;if(e===t)return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var a=Object.keys(e),o=Object.keys(t);if(a.length!==o.length)return!1;for(var s=Object.prototype.hasOwnProperty.bind(t),c=0;c<a.length;c++){var l=a[c];if(!s(l))return!1;var u=e[l],d=t[l];if(i=n?n.call(r,u,d,l):void 0,i===!1||i===void 0&&u!==d)return!1}return!0}})),jzr=fo(),Mzr=u(Azr());function Nzr(e){function t(e,r,c,l,u){for(var p=0,m=0,h=0,g=0,_,x,C=0,w=0,T,E=T=_=0,D=0,M=0,N=0,re=0,ie=c.length,P=ie-1,ae,F=``,oe=``,se=``,ce=``,le;D<ie;){if(x=c.charCodeAt(D),D===P&&m+g+h+p!==0&&(m!==0&&(x=m===47?10:47),g=h=p=0,ie++,P++),m+g+h+p===0){if(D===P&&(0<M&&(F=F.replace(f,``)),0<F.trim().length)){switch(x){case 32:case 9:case 59:case 13:case 10:break;default:F+=c.charAt(D)}x=59}switch(x){case 123:for(F=F.trim(),_=F.charCodeAt(0),T=1,re=++D;D<ie;){switch(x=c.charCodeAt(D)){case 123:T++;break;case 125:T--;break;case 47:switch(x=c.charCodeAt(D+1)){case 42:case 47:a:{for(E=D+1;E<P;++E)switch(c.charCodeAt(E)){case 47:if(x===42&&c.charCodeAt(E-1)===42&&D+2!==E){D=E+1;break a}break;case 10:if(x===47){D=E+1;break a}}D=E}}break;case 91:x++;case 40:x++;case 34:case 39:for(;D++<P&&c.charCodeAt(D)!==x;);}if(T===0)break;D++}switch(T=c.substring(re,D),_===0&&(_=(F=F.replace(d,``).trim()).charCodeAt(0)),_){case 64:switch(0<M&&(F=F.replace(f,``)),x=F.charCodeAt(1),x){case 100:case 109:case 115:case 45:M=r;break;default:M=j}if(T=t(r,M,T,x,u+1),re=T.length,0<te&&(M=n(j,F,N),le=s(3,T,M,r,k,O,re,x,u,l),F=M.join(``),le!==void 0&&(re=(T=le.trim()).length)===0&&(x=0,T=``)),0<re)switch(x){case 115:F=F.replace(S,o);case 100:case 109:case 45:T=F+`{`+T+`}`;break;case 107:F=F.replace(v,`$1 $2`),T=F+`{`+T+`}`,T=ee===1||ee===2&&a(`@`+T,3)?`@-webkit-`+T+`@`+T:`@`+T;break;default:T=F+T,l===112&&(T=(oe+=T,``))}else T=``;break;default:T=t(r,n(r,F,N),T,l,u+1)}se+=T,T=N=M=E=_=0,F=``,x=c.charCodeAt(++D);break;case 125:case 59:if(F=(0<M?F.replace(f,``):F).trim(),1<(re=F.length))switch(E===0&&(_=F.charCodeAt(0),_===45||96<_&&123>_)&&(re=(F=F.replace(` `,`:`)).length),0<te&&(le=s(1,F,r,e,k,O,oe.length,l,u,l))!==void 0&&(re=(F=le.trim()).length)===0&&(F=`\0\0`),_=F.charCodeAt(0),x=F.charCodeAt(1),_){case 0:break;case 64:if(x===105||x===99){ce+=F+c.charAt(D);break}default:F.charCodeAt(re-1)!==58&&(oe+=i(F,_,x,F.charCodeAt(2)))}N=M=E=_=0,F=``,x=c.charCodeAt(++D)}}switch(x){case 13:case 10:m===47?m=0:1+_===0&&l!==107&&0<F.length&&(M=1,F+=`\0`),0<te*ne&&s(0,F,r,e,k,O,oe.length,l,u,l),O=1,k++;break;case 59:case 125:if(m+g+h+p===0){O++;break}default:switch(O++,ae=c.charAt(D),x){case 9:case 32:if(g+p+m===0)switch(C){case 44:case 58:case 9:case 32:ae=``;break;default:x!==32&&(ae=` `)}break;case 0:ae=`\\0`;break;case 12:ae=`\\f`;break;case 11:ae=`\\v`;break;case 38:g+m+p===0&&(M=N=1,ae=`\f`+ae);break;case 108:if(g+m+p+A===0&&0<E)switch(D-E){case 2:C===112&&c.charCodeAt(D-3)===58&&(A=C);case 8:w===111&&(A=w)}break;case 58:g+m+p===0&&(E=D);break;case 44:m+h+g+p===0&&(M=1,ae+=`\r`);break;case 34:case 39:m===0&&(g=g===x?0:g===0?x:g);break;case 91:g+m+h===0&&p++;break;case 93:g+m+h===0&&p--;break;case 41:g+m+p===0&&h--;break;case 40:if(g+m+p===0){if(_===0)switch(2*C+3*w){case 533:break;default:_=1}h++}break;case 64:m+h+g+p+E+T===0&&(T=1);break;case 42:case 47:if(!(0<g+p+h))switch(m){case 0:switch(2*x+3*c.charCodeAt(D+1)){case 235:m=47;break;case 220:re=D,m=42}break;case 42:x===47&&C===42&&re+2!==D&&(c.charCodeAt(re+2)===33&&(oe+=c.substring(re,D+1)),ae=``,m=0)}}m===0&&(F+=ae)}w=C,C=x,D++}if(re=oe.length,0<re){if(M=r,0<te&&(le=s(2,oe,M,e,k,O,re,l,u,l),le!==void 0&&(oe=le).length===0))return ce+oe+se;if(oe=M.join(`,`)+`{`+oe+`}`,ee*A!==0){switch(ee!==2||a(oe,2)||(A=0),A){case 111:oe=oe.replace(b,`:-moz-$1`)+oe;break;case 112:oe=oe.replace(y,`::-webkit-input-$1`)+oe.replace(y,`::-moz-$1`)+oe.replace(y,`:-ms-input-$1`)+oe}A=0}}return ce+oe+se}function n(e,t,n){var i=t.trim().split(g);t=i;var a=i.length,o=e.length;switch(o){case 0:case 1:var s=0;for(e=o===0?``:e[0]+` `;s<a;++s)t[s]=r(e,t[s],n).trim();break;default:var c=s=0;for(t=[];s<a;++s)for(var l=0;l<o;++l)t[c++]=r(e[l]+` `,i[s],n).trim()}return t}function r(e,t,n){var r=t.charCodeAt(0);switch(33>r&&(r=(t=t.trim()).charCodeAt(0)),r){case 38:return t.replace(_,`$1`+e.trim());case 58:return e.trim()+t.replace(_,`$1`+e.trim());default:if(0<1*n&&0<t.indexOf(`\f`))return t.replace(_,(e.charCodeAt(0)===58?``:`$1`)+e.trim())}return e+t}function i(e,t,n,r){var o=e+`;`,s=2*t+3*n+4*r;if(s===944){e=o.indexOf(`:`,9)+1;var c=o.substring(e,o.length-1).trim();return c=o.substring(0,e).trim()+c+`;`,ee===1||ee===2&&a(c,1)?`-webkit-`+c+c:c}if(ee===0||ee===2&&!a(o,1))return o;switch(s){case 1015:return o.charCodeAt(10)===97?`-webkit-`+o+o:o;case 951:return o.charCodeAt(3)===116?`-webkit-`+o+o:o;case 963:return o.charCodeAt(5)===110?`-webkit-`+o+o:o;case 1009:if(o.charCodeAt(4)!==100)break;case 969:case 942:return`-webkit-`+o+o;case 978:return`-webkit-`+o+`-moz-`+o+o;case 1019:case 983:return`-webkit-`+o+`-moz-`+o+`-ms-`+o+o;case 883:if(o.charCodeAt(8)===45)return`-webkit-`+o+o;if(0<o.indexOf(`image-set(`,11))return o.replace(D,`$1-webkit-$2`)+o;break;case 932:if(o.charCodeAt(4)===45)switch(o.charCodeAt(5)){case 103:return`-webkit-box-`+o.replace(`-grow`,``)+`-webkit-`+o+`-ms-`+o.replace(`grow`,`positive`)+o;case 115:return`-webkit-`+o+`-ms-`+o.replace(`shrink`,`negative`)+o;case 98:return`-webkit-`+o+`-ms-`+o.replace(`basis`,`preferred-size`)+o}return`-webkit-`+o+`-ms-`+o+o;case 964:return`-webkit-`+o+`-ms-flex-`+o+o;case 1023:if(o.charCodeAt(8)!==99)break;return c=o.substring(o.indexOf(`:`,15)).replace(`flex-`,``).replace(`space-between`,`justify`),`-webkit-box-pack`+c+`-webkit-`+o+`-ms-flex-pack`+c+o;case 1005:return m.test(o)?o.replace(p,`:-webkit-`)+o.replace(p,`:-moz-`)+o:o;case 1e3:switch(c=o.substring(13).trim(),t=c.indexOf(`-`)+1,c.charCodeAt(0)+c.charCodeAt(t)){case 226:c=o.replace(x,`tb`);break;case 232:c=o.replace(x,`tb-rl`);break;case 220:c=o.replace(x,`lr`);break;default:return o}return`-webkit-`+o+`-ms-`+c+o;case 1017:if(o.indexOf(`sticky`,9)===-1)break;case 975:switch(t=(o=e).length-10,c=(o.charCodeAt(t)===33?o.substring(0,t):o).substring(e.indexOf(`:`,7)+1).trim(),s=c.charCodeAt(0)+(c.charCodeAt(7)|0)){case 203:if(111>c.charCodeAt(8))break;case 115:o=o.replace(c,`-webkit-`+c)+`;`+o;break;case 207:case 102:o=o.replace(c,`-webkit-`+(102<s?`inline-`:``)+`box`)+`;`+o.replace(c,`-webkit-`+c)+`;`+o.replace(c,`-ms-`+c+`box`)+`;`+o}return o+`;`;case 938:if(o.charCodeAt(5)===45)switch(o.charCodeAt(6)){case 105:return c=o.replace(`-items`,``),`-webkit-`+o+`-webkit-box-`+c+`-ms-flex-`+c+o;case 115:return`-webkit-`+o+`-ms-flex-item-`+o.replace(w,``)+o;default:return`-webkit-`+o+`-ms-flex-line-pack`+o.replace(`align-content`,``).replace(w,``)+o}break;case 973:case 989:if(o.charCodeAt(3)!==45||o.charCodeAt(4)===122)break;case 931:case 953:if(!0===E.test(e))return(c=e.substring(e.indexOf(`:`)+1)).charCodeAt(0)===115?i(e.replace(`stretch`,`fill-available`),t,n,r).replace(`:fill-available`,`:stretch`):o.replace(c,`-webkit-`+c)+o.replace(c,`-moz-`+c.replace(`fill-`,``))+o;break;case 962:if(o=`-webkit-`+o+(o.charCodeAt(5)===102?`-ms-`+o:``)+o,n+r===211&&o.charCodeAt(13)===105&&0<o.indexOf(`transform`,10))return o.substring(0,o.indexOf(`;`,27)+1).replace(h,`$1-webkit-$2`)+o}return o}function a(e,t){var n=e.indexOf(t===1?`:`:`{`),r=e.substring(0,t===3?10:n);return n=e.substring(n+1,e.length-1),N(t===2?r.replace(T,`$1`):r,n,t)}function o(e,t){var n=i(t,t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2));return n===t+`;`?`(`+t+`)`:n.replace(C,` or ($1)`).substring(4)}function s(e,t,n,r,i,a,o,s,c,l){for(var d=0,f=t,p;d<te;++d)switch(p=M[d].call(u,e,f,n,r,i,a,o,s,c,l)){case void 0:case!1:case!0:case null:break;default:f=p}if(f!==t)return f}function c(e){switch(e){case void 0:case null:te=M.length=0;break;default:if(typeof e==`function`)M[te++]=e;else if(typeof e==`object`)for(var t=0,n=e.length;t<n;++t)c(e[t]);else ne=!!e|0}return c}function l(e){return e=e.prefix,e!==void 0&&(N=null,e?typeof e==`function`?(ee=2,N=e):ee=1:ee=0),l}function u(e,n){var r=e;if(33>r.charCodeAt(0)&&(r=r.trim()),re=r,r=[re],0<te){var i=s(-1,n,r,r,k,O,0,0,0,0);i!==void 0&&typeof i==`string`&&(n=i)}var a=t(j,r,n,0,0);return 0<te&&(i=s(-2,a,r,r,k,O,a.length,0,0,0),i!==void 0&&(a=i)),re=``,A=0,O=k=1,a}var d=/^\0+/g,f=/[\0\r\f]/g,p=/: */g,m=/zoo|gra/,h=/([,: ])(transform)/g,g=/,\r+?/g,_=/([\t\r\n ])*\f?&/g,v=/@(k\w+)\s*(\S*)\s*/,y=/::(place)/g,b=/:(read-only)/g,x=/[svh]\w+-[tblr]{2}/,S=/\(\s*(.*)\s*\)/g,C=/([\s\S]*?);/g,w=/-self|flex-/g,T=/[^]*?(:[rp][el]a[\w-]+)[^]*/,E=/stretch|:\s*\w+\-(?:conte|avail)/,D=/([^-])(image-set\()/,O=1,k=1,A=0,ee=1,j=[],M=[],te=0,N=null,ne=0,re=``;return u.use=c,u.set=l,e!==void 0&&l(e),u}var Pzr={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function Fzr(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var Izr=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,Lzr=Fzr(function(e){return Izr.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),Rzr=u(po());function A7(){return(A7=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var zzr=function(e,t){for(var n=[e[0]],r=0,i=t.length;r<i;r+=1)n.push(t[r],e[r+1]);return n},Bzr=function(e){return typeof e==`object`&&!!e&&(e.toString?e.toString():Object.prototype.toString.call(e))===`[object Object]`&&!(0,jzr.typeOf)(e)},Vzr=Object.freeze([]),j7=Object.freeze({});function M7(e){return typeof e==`function`}function N7(e){return process.env.NODE_ENV!==`production`&&typeof e==`string`&&e||e.displayName||e.name||`Component`}function Hzr(e){return e&&typeof e.styledComponentId==`string`}var P7=typeof process<`u`&&({}.REACT_APP_SC_ATTR||{}.SC_ATTR)||`data-styled`,Uzr=typeof window<`u`&&`HTMLElement`in window,Wzr=!!(typeof SC_DISABLE_SPEEDY==`boolean`?SC_DISABLE_SPEEDY:typeof process<`u`&&({}.REACT_APP_SC_DISABLE_SPEEDY!==void 0&&{}.REACT_APP_SC_DISABLE_SPEEDY!==``?{}.REACT_APP_SC_DISABLE_SPEEDY!==`false`&&{}.REACT_APP_SC_DISABLE_SPEEDY:{}.SC_DISABLE_SPEEDY!==void 0&&{}.SC_DISABLE_SPEEDY!==``?{}.SC_DISABLE_SPEEDY!==`false`&&{}.SC_DISABLE_SPEEDY:process.env.NODE_ENV!==`production`)),Gzr=process.env.NODE_ENV===`production`?{}:{1:`Cannot create styled-component for component: %s.
|
|
1211
|
+
`})})).json();n.__schema.types=await n.__schema.types.filter(e=>e.possibleTypes!==null);let r={};n.__schema.types.forEach(e=>{e.possibleTypes&&(r[e.name]=[...e.possibleTypes.map(e=>e.name)])});let i=new Uv({possibleTypes:r,typePolicies:{Query:{fields:{search:{keyArgs:[`query`],merge(e,t){return e?t?.pageInfo?.endCursor===e?.pageInfo?.endCursor||e?.edges.length===e?.totalCount?e:{...t,edges:[...e?.edges,...t?.edges]}:t}}}},ContentChannel:{fields:{childContentItemsConnection:{keyArgs:[`id`],merge(e,t){return e?t.pageInfo.endCursor===e.pageInfo.endCursor?e:{...t,edges:[...e?.edges,...t?.edges]}:t}}}}}}).restore(e||{});return typeof window<`u`&&szr({cache:i,storage:window.localStorage}),i};foe(),Wg();var fzr=async e=>{let t=!1,n=async()=>{t||(t=!0,window.localStorage.clear(zy),window.localStorage.clear(By)),t=!1},r=await dzr(null,{church:e}),i=qRr(n,e),a=Ug.from([SRr(e),i,wRr,IRr]);return new sy({link:a,cache:r,queryDeduplication:!1,shouldBatch:!0,version:`0.0.1`,defaultOptions:{watchQuery:{fetchPolicy:`cache-and-network`}}})},pzr=(0,S.createContext)(),mzr=(0,S.createContext)(),hzr={isOpen:!1,content:null,modal:!0},gzr={open:`open`,close:`close`,set:`set`},_zr=()=>({type:`open`}),vzr=()=>({type:`close`}),yzr=e=>({type:`set`,payload:e}),bzr=(e,t)=>{switch(t.type){case gzr.open:return{...e,isOpen:!0};case gzr.close:return{...e,isOpen:!1,content:null};case gzr.set:return{...e,content:bVr(`${t.payload}`)};default:throw Error(`Unhandled action type: ${t.type}`)}};function xzr(e={}){let[t,n]=(0,S.useReducer)(bzr,{...hzr,modal:e.modal!==`false`&&!!e.modal});return(0,q.jsx)(pzr.Provider,{value:t,children:(0,q.jsx)(mzr.Provider,{value:n,children:e.children})})}function Szr(){let e=(0,S.useContext)(pzr);if(e===void 0)throw Error(`useModalState must be used within a ModalProvider`);return e}function Czr(){let e=(0,S.useContext)(mzr);if(e===void 0)throw Error(`useModalDispatch must be used within a ModalProvider`);return e}function wzr(){let e=[Szr(),Czr()];if(e===void 0)throw Error(`useModal must be used within a ModalProvider`);return e}xzr.propTypes={children:K.default.oneOfType([K.default.element,K.default.node]),modal:K.default.string};var Tzr=(0,S.createContext)(),Ezr=(0,S.createContext)(),Dzr={church:null,searchFeed:null,searchProfileSize:null,hideApollosAuth:null,customPlaceholder:null,loading:!0},Ozr={set:`set`},kzr=e=>({type:`set`,payload:e}),Azr=(e,t)=>{switch(t.type){case Ozr.set:return{...e,...t.payload};default:throw Error(`Unhandled action type: ${t.type}`)}};function jzr(e={}){let[t,n]=(0,S.useReducer)(Azr,{...Dzr,church:e.church,searchFeed:e.searchFeed,searchProfileSize:e.searchProfileSize,hideApollosAuth:e.hideApollosAuth,customPlaceholder:e.customPlaceholder});return(0,q.jsx)(Tzr.Provider,{value:t,children:(0,q.jsx)(Ezr.Provider,{value:n,children:e.children})})}function k7(){let e=(0,S.useContext)(Tzr);if(e===void 0)throw Error(`useSearchState must be used within a SearchProvider`);return e}function Mzr(){let e=(0,S.useContext)(Ezr);if(e===void 0)throw Error(`useSearchDispatch must be used within a SearchProvider`);return e}function Nzr(){let e=[k7(),Mzr()];if(e===void 0)throw Error(`useSearch must be used within a SearchProvider`);return e}jzr.propTypes={children:K.default.oneOfType([K.default.element,K.default.node])};var Pzr=s(((e,t)=>{t.exports=function(e,t,n,r){var i=n?n.call(r,e,t):void 0;if(i!==void 0)return!!i;if(e===t)return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var a=Object.keys(e),o=Object.keys(t);if(a.length!==o.length)return!1;for(var s=Object.prototype.hasOwnProperty.bind(t),c=0;c<a.length;c++){var l=a[c];if(!s(l))return!1;var u=e[l],d=t[l];if(i=n?n.call(r,u,d,l):void 0,i===!1||i===void 0&&u!==d)return!1}return!0}})),Fzr=fo(),Izr=u(Pzr());function Lzr(e){function t(e,r,c,l,u){for(var p=0,m=0,h=0,g=0,_,x,C=0,w=0,T,E=T=_=0,D=0,M=0,N=0,re=0,ie=c.length,P=ie-1,ae,F=``,oe=``,se=``,ce=``,le;D<ie;){if(x=c.charCodeAt(D),D===P&&m+g+h+p!==0&&(m!==0&&(x=m===47?10:47),g=h=p=0,ie++,P++),m+g+h+p===0){if(D===P&&(0<M&&(F=F.replace(f,``)),0<F.trim().length)){switch(x){case 32:case 9:case 59:case 13:case 10:break;default:F+=c.charAt(D)}x=59}switch(x){case 123:for(F=F.trim(),_=F.charCodeAt(0),T=1,re=++D;D<ie;){switch(x=c.charCodeAt(D)){case 123:T++;break;case 125:T--;break;case 47:switch(x=c.charCodeAt(D+1)){case 42:case 47:a:{for(E=D+1;E<P;++E)switch(c.charCodeAt(E)){case 47:if(x===42&&c.charCodeAt(E-1)===42&&D+2!==E){D=E+1;break a}break;case 10:if(x===47){D=E+1;break a}}D=E}}break;case 91:x++;case 40:x++;case 34:case 39:for(;D++<P&&c.charCodeAt(D)!==x;);}if(T===0)break;D++}switch(T=c.substring(re,D),_===0&&(_=(F=F.replace(d,``).trim()).charCodeAt(0)),_){case 64:switch(0<M&&(F=F.replace(f,``)),x=F.charCodeAt(1),x){case 100:case 109:case 115:case 45:M=r;break;default:M=j}if(T=t(r,M,T,x,u+1),re=T.length,0<te&&(M=n(j,F,N),le=s(3,T,M,r,k,O,re,x,u,l),F=M.join(``),le!==void 0&&(re=(T=le.trim()).length)===0&&(x=0,T=``)),0<re)switch(x){case 115:F=F.replace(S,o);case 100:case 109:case 45:T=F+`{`+T+`}`;break;case 107:F=F.replace(v,`$1 $2`),T=F+`{`+T+`}`,T=ee===1||ee===2&&a(`@`+T,3)?`@-webkit-`+T+`@`+T:`@`+T;break;default:T=F+T,l===112&&(T=(oe+=T,``))}else T=``;break;default:T=t(r,n(r,F,N),T,l,u+1)}se+=T,T=N=M=E=_=0,F=``,x=c.charCodeAt(++D);break;case 125:case 59:if(F=(0<M?F.replace(f,``):F).trim(),1<(re=F.length))switch(E===0&&(_=F.charCodeAt(0),_===45||96<_&&123>_)&&(re=(F=F.replace(` `,`:`)).length),0<te&&(le=s(1,F,r,e,k,O,oe.length,l,u,l))!==void 0&&(re=(F=le.trim()).length)===0&&(F=`\0\0`),_=F.charCodeAt(0),x=F.charCodeAt(1),_){case 0:break;case 64:if(x===105||x===99){ce+=F+c.charAt(D);break}default:F.charCodeAt(re-1)!==58&&(oe+=i(F,_,x,F.charCodeAt(2)))}N=M=E=_=0,F=``,x=c.charCodeAt(++D)}}switch(x){case 13:case 10:m===47?m=0:1+_===0&&l!==107&&0<F.length&&(M=1,F+=`\0`),0<te*ne&&s(0,F,r,e,k,O,oe.length,l,u,l),O=1,k++;break;case 59:case 125:if(m+g+h+p===0){O++;break}default:switch(O++,ae=c.charAt(D),x){case 9:case 32:if(g+p+m===0)switch(C){case 44:case 58:case 9:case 32:ae=``;break;default:x!==32&&(ae=` `)}break;case 0:ae=`\\0`;break;case 12:ae=`\\f`;break;case 11:ae=`\\v`;break;case 38:g+m+p===0&&(M=N=1,ae=`\f`+ae);break;case 108:if(g+m+p+A===0&&0<E)switch(D-E){case 2:C===112&&c.charCodeAt(D-3)===58&&(A=C);case 8:w===111&&(A=w)}break;case 58:g+m+p===0&&(E=D);break;case 44:m+h+g+p===0&&(M=1,ae+=`\r`);break;case 34:case 39:m===0&&(g=g===x?0:g===0?x:g);break;case 91:g+m+h===0&&p++;break;case 93:g+m+h===0&&p--;break;case 41:g+m+p===0&&h--;break;case 40:if(g+m+p===0){if(_===0)switch(2*C+3*w){case 533:break;default:_=1}h++}break;case 64:m+h+g+p+E+T===0&&(T=1);break;case 42:case 47:if(!(0<g+p+h))switch(m){case 0:switch(2*x+3*c.charCodeAt(D+1)){case 235:m=47;break;case 220:re=D,m=42}break;case 42:x===47&&C===42&&re+2!==D&&(c.charCodeAt(re+2)===33&&(oe+=c.substring(re,D+1)),ae=``,m=0)}}m===0&&(F+=ae)}w=C,C=x,D++}if(re=oe.length,0<re){if(M=r,0<te&&(le=s(2,oe,M,e,k,O,re,l,u,l),le!==void 0&&(oe=le).length===0))return ce+oe+se;if(oe=M.join(`,`)+`{`+oe+`}`,ee*A!==0){switch(ee!==2||a(oe,2)||(A=0),A){case 111:oe=oe.replace(b,`:-moz-$1`)+oe;break;case 112:oe=oe.replace(y,`::-webkit-input-$1`)+oe.replace(y,`::-moz-$1`)+oe.replace(y,`:-ms-input-$1`)+oe}A=0}}return ce+oe+se}function n(e,t,n){var i=t.trim().split(g);t=i;var a=i.length,o=e.length;switch(o){case 0:case 1:var s=0;for(e=o===0?``:e[0]+` `;s<a;++s)t[s]=r(e,t[s],n).trim();break;default:var c=s=0;for(t=[];s<a;++s)for(var l=0;l<o;++l)t[c++]=r(e[l]+` `,i[s],n).trim()}return t}function r(e,t,n){var r=t.charCodeAt(0);switch(33>r&&(r=(t=t.trim()).charCodeAt(0)),r){case 38:return t.replace(_,`$1`+e.trim());case 58:return e.trim()+t.replace(_,`$1`+e.trim());default:if(0<1*n&&0<t.indexOf(`\f`))return t.replace(_,(e.charCodeAt(0)===58?``:`$1`)+e.trim())}return e+t}function i(e,t,n,r){var o=e+`;`,s=2*t+3*n+4*r;if(s===944){e=o.indexOf(`:`,9)+1;var c=o.substring(e,o.length-1).trim();return c=o.substring(0,e).trim()+c+`;`,ee===1||ee===2&&a(c,1)?`-webkit-`+c+c:c}if(ee===0||ee===2&&!a(o,1))return o;switch(s){case 1015:return o.charCodeAt(10)===97?`-webkit-`+o+o:o;case 951:return o.charCodeAt(3)===116?`-webkit-`+o+o:o;case 963:return o.charCodeAt(5)===110?`-webkit-`+o+o:o;case 1009:if(o.charCodeAt(4)!==100)break;case 969:case 942:return`-webkit-`+o+o;case 978:return`-webkit-`+o+`-moz-`+o+o;case 1019:case 983:return`-webkit-`+o+`-moz-`+o+`-ms-`+o+o;case 883:if(o.charCodeAt(8)===45)return`-webkit-`+o+o;if(0<o.indexOf(`image-set(`,11))return o.replace(D,`$1-webkit-$2`)+o;break;case 932:if(o.charCodeAt(4)===45)switch(o.charCodeAt(5)){case 103:return`-webkit-box-`+o.replace(`-grow`,``)+`-webkit-`+o+`-ms-`+o.replace(`grow`,`positive`)+o;case 115:return`-webkit-`+o+`-ms-`+o.replace(`shrink`,`negative`)+o;case 98:return`-webkit-`+o+`-ms-`+o.replace(`basis`,`preferred-size`)+o}return`-webkit-`+o+`-ms-`+o+o;case 964:return`-webkit-`+o+`-ms-flex-`+o+o;case 1023:if(o.charCodeAt(8)!==99)break;return c=o.substring(o.indexOf(`:`,15)).replace(`flex-`,``).replace(`space-between`,`justify`),`-webkit-box-pack`+c+`-webkit-`+o+`-ms-flex-pack`+c+o;case 1005:return m.test(o)?o.replace(p,`:-webkit-`)+o.replace(p,`:-moz-`)+o:o;case 1e3:switch(c=o.substring(13).trim(),t=c.indexOf(`-`)+1,c.charCodeAt(0)+c.charCodeAt(t)){case 226:c=o.replace(x,`tb`);break;case 232:c=o.replace(x,`tb-rl`);break;case 220:c=o.replace(x,`lr`);break;default:return o}return`-webkit-`+o+`-ms-`+c+o;case 1017:if(o.indexOf(`sticky`,9)===-1)break;case 975:switch(t=(o=e).length-10,c=(o.charCodeAt(t)===33?o.substring(0,t):o).substring(e.indexOf(`:`,7)+1).trim(),s=c.charCodeAt(0)+(c.charCodeAt(7)|0)){case 203:if(111>c.charCodeAt(8))break;case 115:o=o.replace(c,`-webkit-`+c)+`;`+o;break;case 207:case 102:o=o.replace(c,`-webkit-`+(102<s?`inline-`:``)+`box`)+`;`+o.replace(c,`-webkit-`+c)+`;`+o.replace(c,`-ms-`+c+`box`)+`;`+o}return o+`;`;case 938:if(o.charCodeAt(5)===45)switch(o.charCodeAt(6)){case 105:return c=o.replace(`-items`,``),`-webkit-`+o+`-webkit-box-`+c+`-ms-flex-`+c+o;case 115:return`-webkit-`+o+`-ms-flex-item-`+o.replace(w,``)+o;default:return`-webkit-`+o+`-ms-flex-line-pack`+o.replace(`align-content`,``).replace(w,``)+o}break;case 973:case 989:if(o.charCodeAt(3)!==45||o.charCodeAt(4)===122)break;case 931:case 953:if(!0===E.test(e))return(c=e.substring(e.indexOf(`:`)+1)).charCodeAt(0)===115?i(e.replace(`stretch`,`fill-available`),t,n,r).replace(`:fill-available`,`:stretch`):o.replace(c,`-webkit-`+c)+o.replace(c,`-moz-`+c.replace(`fill-`,``))+o;break;case 962:if(o=`-webkit-`+o+(o.charCodeAt(5)===102?`-ms-`+o:``)+o,n+r===211&&o.charCodeAt(13)===105&&0<o.indexOf(`transform`,10))return o.substring(0,o.indexOf(`;`,27)+1).replace(h,`$1-webkit-$2`)+o}return o}function a(e,t){var n=e.indexOf(t===1?`:`:`{`),r=e.substring(0,t===3?10:n);return n=e.substring(n+1,e.length-1),N(t===2?r.replace(T,`$1`):r,n,t)}function o(e,t){var n=i(t,t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2));return n===t+`;`?`(`+t+`)`:n.replace(C,` or ($1)`).substring(4)}function s(e,t,n,r,i,a,o,s,c,l){for(var d=0,f=t,p;d<te;++d)switch(p=M[d].call(u,e,f,n,r,i,a,o,s,c,l)){case void 0:case!1:case!0:case null:break;default:f=p}if(f!==t)return f}function c(e){switch(e){case void 0:case null:te=M.length=0;break;default:if(typeof e==`function`)M[te++]=e;else if(typeof e==`object`)for(var t=0,n=e.length;t<n;++t)c(e[t]);else ne=!!e|0}return c}function l(e){return e=e.prefix,e!==void 0&&(N=null,e?typeof e==`function`?(ee=2,N=e):ee=1:ee=0),l}function u(e,n){var r=e;if(33>r.charCodeAt(0)&&(r=r.trim()),re=r,r=[re],0<te){var i=s(-1,n,r,r,k,O,0,0,0,0);i!==void 0&&typeof i==`string`&&(n=i)}var a=t(j,r,n,0,0);return 0<te&&(i=s(-2,a,r,r,k,O,a.length,0,0,0),i!==void 0&&(a=i)),re=``,A=0,O=k=1,a}var d=/^\0+/g,f=/[\0\r\f]/g,p=/: */g,m=/zoo|gra/,h=/([,: ])(transform)/g,g=/,\r+?/g,_=/([\t\r\n ])*\f?&/g,v=/@(k\w+)\s*(\S*)\s*/,y=/::(place)/g,b=/:(read-only)/g,x=/[svh]\w+-[tblr]{2}/,S=/\(\s*(.*)\s*\)/g,C=/([\s\S]*?);/g,w=/-self|flex-/g,T=/[^]*?(:[rp][el]a[\w-]+)[^]*/,E=/stretch|:\s*\w+\-(?:conte|avail)/,D=/([^-])(image-set\()/,O=1,k=1,A=0,ee=1,j=[],M=[],te=0,N=null,ne=0,re=``;return u.use=c,u.set=l,e!==void 0&&l(e),u}var Rzr={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function zzr(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var Bzr=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,Vzr=zzr(function(e){return Bzr.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),Hzr=u(po());function A7(){return(A7=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var Uzr=function(e,t){for(var n=[e[0]],r=0,i=t.length;r<i;r+=1)n.push(t[r],e[r+1]);return n},Wzr=function(e){return typeof e==`object`&&!!e&&(e.toString?e.toString():Object.prototype.toString.call(e))===`[object Object]`&&!(0,Fzr.typeOf)(e)},Gzr=Object.freeze([]),j7=Object.freeze({});function M7(e){return typeof e==`function`}function N7(e){return process.env.NODE_ENV!==`production`&&typeof e==`string`&&e||e.displayName||e.name||`Component`}function Kzr(e){return e&&typeof e.styledComponentId==`string`}var P7=typeof process<`u`&&({}.REACT_APP_SC_ATTR||{}.SC_ATTR)||`data-styled`,qzr=typeof window<`u`&&`HTMLElement`in window,Jzr=!!(typeof SC_DISABLE_SPEEDY==`boolean`?SC_DISABLE_SPEEDY:typeof process<`u`&&({}.REACT_APP_SC_DISABLE_SPEEDY!==void 0&&{}.REACT_APP_SC_DISABLE_SPEEDY!==``?{}.REACT_APP_SC_DISABLE_SPEEDY!==`false`&&{}.REACT_APP_SC_DISABLE_SPEEDY:{}.SC_DISABLE_SPEEDY!==void 0&&{}.SC_DISABLE_SPEEDY!==``?{}.SC_DISABLE_SPEEDY!==`false`&&{}.SC_DISABLE_SPEEDY:process.env.NODE_ENV!==`production`)),Yzr=process.env.NODE_ENV===`production`?{}:{1:`Cannot create styled-component for component: %s.
|
|
1212
1212
|
|
|
1213
1213
|
`,2:`Can't collect styles once you've consumed a \`ServerStyleSheet\`'s styles! \`ServerStyleSheet\` is a one off instance for each server-side render cycle.
|
|
1214
1214
|
|
|
@@ -1259,12 +1259,12 @@ as for instance in your render method then you may be running into this limitati
|
|
|
1259
1259
|
|
|
1260
1260
|
`,17:`CSSStyleSheet could not be found on HTMLStyleElement.
|
|
1261
1261
|
Has styled-components' style tag been unmounted or altered by another script?
|
|
1262
|
-
`};function
|
|
1263
|
-
`;return t},e}(),
|
|
1264
|
-
`),r=[],i=0,a=n.length;i<a;i++){var o=n[i].trim();if(o){var s=o.match(
|
|
1265
|
-
`}}}return r}(this)},e}(),
|
|
1262
|
+
`};function Xzr(){for(var e=arguments.length<=0?void 0:arguments[0],t=[],n=1,r=arguments.length;n<r;n+=1)t.push(n<0||arguments.length<=n?void 0:arguments[n]);return t.forEach((function(t){e=e.replace(/%[a-z]/,t)})),e}function F7(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];throw process.env.NODE_ENV===`production`?Error(`An error occurred. See https://git.io/JUIaE#`+e+` for more information.`+(n.length>0?` Args: `+n.join(`, `):``)):Error(Xzr.apply(void 0,[Yzr[e]].concat(n)).trim())}var Zzr=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}var t=e.prototype;return t.indexOfGroup=function(e){for(var t=0,n=0;n<e;n++)t+=this.groupSizes[n];return t},t.insertRules=function(e,t){if(e>=this.groupSizes.length){for(var n=this.groupSizes,r=n.length,i=r;e>=i;)(i<<=1)<0&&F7(16,``+e);this.groupSizes=new Uint32Array(i),this.groupSizes.set(n),this.length=i;for(var a=r;a<i;a++)this.groupSizes[a]=0}for(var o=this.indexOfGroup(e+1),s=0,c=t.length;s<c;s++)this.tag.insertRule(o,t[s])&&(this.groupSizes[e]++,o++)},t.clearGroup=function(e){if(e<this.length){var t=this.groupSizes[e],n=this.indexOfGroup(e),r=n+t;this.groupSizes[e]=0;for(var i=n;i<r;i++)this.tag.deleteRule(n)}},t.getGroup=function(e){var t=``;if(e>=this.length||this.groupSizes[e]===0)return t;for(var n=this.groupSizes[e],r=this.indexOfGroup(e),i=r+n,a=r;a<i;a++)t+=this.tag.getRule(a)+`/*!sc*/
|
|
1263
|
+
`;return t},e}(),Qzr=new Map,$zr=new Map,I7=1,eBr=function(e){if(Qzr.has(e))return Qzr.get(e);for(;$zr.has(I7);)I7++;var t=I7++;return process.env.NODE_ENV!==`production`&&((0|t)<0||t>1<<30)&&F7(16,``+t),Qzr.set(e,t),$zr.set(t,e),t},tBr=function(e){return $zr.get(e)},nBr=function(e,t){t>=I7&&(I7=t+1),Qzr.set(e,t),$zr.set(t,e)},rBr=`style[`+P7+`][data-styled-version="5.3.11"]`,iBr=RegExp(`^`+P7+`\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)`),aBr=function(e,t,n){for(var r,i=n.split(`,`),a=0,o=i.length;a<o;a++)(r=i[a])&&e.registerName(t,r)},oBr=function(e,t){for(var n=(t.textContent||``).split(`/*!sc*/
|
|
1264
|
+
`),r=[],i=0,a=n.length;i<a;i++){var o=n[i].trim();if(o){var s=o.match(iBr);if(s){var c=0|parseInt(s[1],10),l=s[2];c!==0&&(nBr(l,c),aBr(e,l,s[3]),e.getTag().insertRules(c,r)),r.length=0}else r.push(o)}}},sBr=function(){return typeof __webpack_nonce__<`u`?__webpack_nonce__:null},cBr=function(e){var t=document.head,n=e||t,r=document.createElement(`style`),i=function(e){for(var t=e.childNodes,n=t.length;n>=0;n--){var r=t[n];if(r&&r.nodeType===1&&r.hasAttribute(P7))return r}}(n),a=i===void 0?null:i.nextSibling;r.setAttribute(P7,`active`),r.setAttribute(`data-styled-version`,`5.3.11`);var o=sBr();return o&&r.setAttribute(`nonce`,o),n.insertBefore(r,a),r},lBr=function(){function e(e){var t=this.element=cBr(e);t.appendChild(document.createTextNode(``)),this.sheet=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets,n=0,r=t.length;n<r;n++){var i=t[n];if(i.ownerNode===e)return i}F7(17)}(t),this.length=0}var t=e.prototype;return t.insertRule=function(e,t){try{return this.sheet.insertRule(t,e),this.length++,!0}catch{return!1}},t.deleteRule=function(e){this.sheet.deleteRule(e),this.length--},t.getRule=function(e){var t=this.sheet.cssRules[e];return t!==void 0&&typeof t.cssText==`string`?t.cssText:``},e}(),uBr=function(){function e(e){var t=this.element=cBr(e);this.nodes=t.childNodes,this.length=0}var t=e.prototype;return t.insertRule=function(e,t){if(e<=this.length&&e>=0){var n=document.createTextNode(t),r=this.nodes[e];return this.element.insertBefore(n,r||null),this.length++,!0}return!1},t.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},t.getRule=function(e){return e<this.length?this.nodes[e].textContent:``},e}(),dBr=function(){function e(e){this.rules=[],this.length=0}var t=e.prototype;return t.insertRule=function(e,t){return e<=this.length&&(this.rules.splice(e,0,t),this.length++,!0)},t.deleteRule=function(e){this.rules.splice(e,1),this.length--},t.getRule=function(e){return e<this.length?this.rules[e]:``},e}(),fBr=qzr,pBr={isServer:!qzr,useCSSOMInjection:!Jzr},L7=function(){function e(e,t,n){e===void 0&&(e=j7),t===void 0&&(t={}),this.options=A7({},pBr,{},e),this.gs=t,this.names=new Map(n),this.server=!!e.isServer,!this.server&&qzr&&fBr&&(fBr=!1,function(e){for(var t=document.querySelectorAll(rBr),n=0,r=t.length;n<r;n++){var i=t[n];i&&i.getAttribute(P7)!==`active`&&(oBr(e,i),i.parentNode&&i.parentNode.removeChild(i))}}(this))}e.registerId=function(e){return eBr(e)};var t=e.prototype;return t.reconstructWithOptions=function(t,n){return n===void 0&&(n=!0),new e(A7({},this.options,{},t),this.gs,n&&this.names||void 0)},t.allocateGSInstance=function(e){return this.gs[e]=(this.gs[e]||0)+1},t.getTag=function(){return this.tag||=(n=(t=this.options).isServer,r=t.useCSSOMInjection,i=t.target,e=n?new dBr(i):r?new lBr(i):new uBr(i),new Zzr(e));var e,t,n,r,i},t.hasNameForId=function(e,t){return this.names.has(e)&&this.names.get(e).has(t)},t.registerName=function(e,t){if(eBr(e),this.names.has(e))this.names.get(e).add(t);else{var n=new Set;n.add(t),this.names.set(e,n)}},t.insertRules=function(e,t,n){this.registerName(e,t),this.getTag().insertRules(eBr(e),n)},t.clearNames=function(e){this.names.has(e)&&this.names.get(e).clear()},t.clearRules=function(e){this.getTag().clearGroup(eBr(e)),this.clearNames(e)},t.clearTag=function(){this.tag=void 0},t.toString=function(){return function(e){for(var t=e.getTag(),n=t.length,r=``,i=0;i<n;i++){var a=tBr(i);if(a!==void 0){var o=e.names.get(a),s=t.getGroup(i);if(o&&s&&o.size){var c=P7+`.g`+i+`[id="`+a+`"]`,l=``;o!==void 0&&o.forEach((function(e){e.length>0&&(l+=e+`,`)})),r+=``+s+c+`{content:"`+l+`"}/*!sc*/
|
|
1265
|
+
`}}}return r}(this)},e}(),mBr=/(a)(d)/gi,hBr=function(e){return String.fromCharCode(e+(e>25?39:97))};function gBr(e){var t,n=``;for(t=Math.abs(e);t>52;t=t/52|0)n=hBr(t%52)+n;return(hBr(t%52)+n).replace(mBr,`$1-$2`)}var R7=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},_Br=function(e){return R7(5381,e)};function vBr(e){for(var t=0;t<e.length;t+=1){var n=e[t];if(M7(n)&&!Kzr(n))return!1}return!0}var yBr=_Br(`5.3.11`),bBr=function(){function e(e,t,n){this.rules=e,this.staticRulesId=``,this.isStatic=process.env.NODE_ENV===`production`&&(n===void 0||n.isStatic)&&vBr(e),this.componentId=t,this.baseHash=R7(yBr,t),this.baseStyle=n,L7.registerId(t)}return e.prototype.generateAndInjectStyles=function(e,t,n){var r=this.componentId,i=[];if(this.baseStyle&&i.push(this.baseStyle.generateAndInjectStyles(e,t,n)),this.isStatic&&!n.hash){if(this.staticRulesId&&t.hasNameForId(r,this.staticRulesId))i.push(this.staticRulesId);else{var a=z7(this.rules,e,t,n).join(``),o=gBr(R7(this.baseHash,a)>>>0);if(!t.hasNameForId(r,o)){var s=n(a,`.`+o,void 0,r);t.insertRules(r,o,s)}i.push(o),this.staticRulesId=o}}else{for(var c=this.rules.length,l=R7(this.baseHash,n.hash),u=``,d=0;d<c;d++){var f=this.rules[d];if(typeof f==`string`)u+=f,process.env.NODE_ENV!==`production`&&(l=R7(l,f+d));else if(f){var p=z7(f,e,t,n),m=Array.isArray(p)?p.join(``):p;l=R7(l,m+d),u+=m}}if(u){var h=gBr(l>>>0);if(!t.hasNameForId(r,h)){var g=n(u,`.`+h,void 0,r);t.insertRules(r,h,g)}i.push(h)}}return i.join(` `)},e}(),xBr=/^\s*\/\/.*$/gm,SBr=[`:`,`[`,`.`,`#`];function CBr(e){var t,n,r,i,a=e===void 0?j7:e,o=a.options,s=o===void 0?j7:o,c=a.plugins,l=c===void 0?Gzr:c,u=new Lzr(s),d=[],f=function(e){function t(t){if(t)try{e(t+`}`)}catch{}}return function(n,r,i,a,o,s,c,l,u,d){switch(n){case 1:if(u===0&&r.charCodeAt(0)===64)return e(r+`;`),``;break;case 2:if(l===0)return r+`/*|*/`;break;case 3:switch(l){case 102:case 112:return e(i[0]+r),``;default:return r+(d===0?`/*|*/`:``)}case-2:r.split(`/*|*/}`).forEach(t)}}}((function(e){d.push(e)})),p=function(e,r,a){return r===0&&SBr.indexOf(a[n.length])!==-1||a.match(i)?e:`.`+t};function m(e,a,o,s){s===void 0&&(s=`&`);var c=e.replace(xBr,``),l=a&&o?o+` `+a+` { `+c+` }`:c;return t=s,n=a,r=RegExp(`\\`+n+`\\b`,`g`),i=RegExp(`(\\`+n+`\\b){2,}`),u(o||!a?``:a,l)}return u.use([].concat(l,[function(e,t,i){e===2&&i.length&&i[0].lastIndexOf(n)>0&&(i[0]=i[0].replace(r,p))},f,function(e){if(e===-2){var t=d;return d=[],t}}])),m.hash=l.length?l.reduce((function(e,t){return t.name||F7(15),R7(e,t.name)}),5381).toString():``,m}var wBr=S.createContext();wBr.Consumer;var TBr=S.createContext(),EBr=(TBr.Consumer,new L7),DBr=CBr();function OBr(){return(0,S.useContext)(wBr)||EBr}function kBr(){return(0,S.useContext)(TBr)||DBr}function ABr(e){var t=(0,S.useState)(e.stylisPlugins),n=t[0],r=t[1],i=OBr(),a=(0,S.useMemo)((function(){var t=i;return e.sheet?t=e.sheet:e.target&&(t=t.reconstructWithOptions({target:e.target},!1)),e.disableCSSOMInjection&&(t=t.reconstructWithOptions({useCSSOMInjection:!1})),t}),[e.disableCSSOMInjection,e.sheet,e.target]),o=(0,S.useMemo)((function(){return CBr({options:{prefix:!e.disableVendorPrefixes},plugins:n})}),[e.disableVendorPrefixes,n]);return(0,S.useEffect)((function(){(0,Izr.default)(n,e.stylisPlugins)||r(e.stylisPlugins)}),[e.stylisPlugins]),S.createElement(wBr.Provider,{value:a},S.createElement(TBr.Provider,{value:o},process.env.NODE_ENV===`production`?e.children:S.Children.only(e.children)))}var jBr=function(){function e(e,t){var n=this;this.inject=function(e,t){t===void 0&&(t=DBr);var r=n.name+t.hash;e.hasNameForId(n.id,r)||e.insertRules(n.id,r,t(n.rules,r,`@keyframes`))},this.toString=function(){return F7(12,String(n.name))},this.name=e,this.id=`sc-keyframes-`+e,this.rules=t}return e.prototype.getName=function(e){return e===void 0&&(e=DBr),this.name+e.hash},e}(),MBr=/([A-Z])/,NBr=/([A-Z])/g,PBr=/^ms-/,FBr=function(e){return`-`+e.toLowerCase()};function IBr(e){return MBr.test(e)?e.replace(NBr,FBr).replace(PBr,`-ms-`):e}var LBr=function(e){return e==null||!1===e||e===``};function z7(e,t,n,r){if(Array.isArray(e)){for(var i,a=[],o=0,s=e.length;o<s;o+=1)(i=z7(e[o],t,n,r))!==``&&(Array.isArray(i)?a.push.apply(a,i):a.push(i));return a}if(LBr(e))return``;if(Kzr(e))return`.`+e.styledComponentId;if(M7(e)){if(typeof(l=e)!=`function`||l.prototype&&l.prototype.isReactComponent||!t)return e;var c=e(t);return process.env.NODE_ENV!==`production`&&(0,Fzr.isElement)(c)&&console.warn(N7(e)+` is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details.`),z7(c,t,n,r)}var l;return e instanceof jBr?n?(e.inject(n,r),e.getName(r)):e:Wzr(e)?function e(t,n){var r,i,a=[];for(var o in t)t.hasOwnProperty(o)&&!LBr(t[o])&&(Array.isArray(t[o])&&t[o].isCss||M7(t[o])?a.push(IBr(o)+`:`,t[o],`;`):Wzr(t[o])?a.push.apply(a,e(t[o],o)):a.push(IBr(o)+`: `+(r=o,(i=t[o])==null||typeof i==`boolean`||i===``?``:typeof i!=`number`||i===0||r in Rzr||r.startsWith(`--`)?String(i).trim():i+`px`)+`;`));return n?[n+` {`].concat(a,[`}`]):a}(e):e.toString()}var RBr=function(e){return Array.isArray(e)&&(e.isCss=!0),e};function B7(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return M7(e)||Wzr(e)?RBr(z7(Uzr(Gzr,[e].concat(n)))):n.length===0&&e.length===1&&typeof e[0]==`string`?e:RBr(z7(Uzr(e,n)))}var zBr=/invalid hook call/i,BBr=new Set,VBr=function(e,t){if(process.env.NODE_ENV!==`production`){var n=`The component `+e+(t?` with the id of "`+t+`"`:``)+` has been created dynamically.
|
|
1266
1266
|
You may see this warning because you've called styled inside another component.
|
|
1267
|
-
To resolve this only create new StyledComponents outside of any render method and function component.`,r=console.error;try{var i=!0;console.error=function(e){if(
|
|
1267
|
+
To resolve this only create new StyledComponents outside of any render method and function component.`,r=console.error;try{var i=!0;console.error=function(e){if(zBr.test(e))i=!1,BBr.delete(n);else{for(var t=arguments.length,a=Array(t>1?t-1:0),o=1;o<t;o++)a[o-1]=arguments[o];r.apply(void 0,[e].concat(a))}},(0,S.useRef)(),i&&!BBr.has(n)&&(console.warn(n),BBr.add(n))}catch(e){zBr.test(e.message)&&BBr.delete(n)}finally{console.error=r}}},HBr=function(e,t,n){return n===void 0&&(n=j7),e.theme!==n.theme&&e.theme||t||n.theme},UBr=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,WBr=/(^-|-$)/g;function GBr(e){return e.replace(UBr,`-`).replace(WBr,``)}var KBr=function(e){return gBr(_Br(e)>>>0)};function qBr(e){return typeof e==`string`&&(process.env.NODE_ENV===`production`||e.charAt(0)===e.charAt(0).toLowerCase())}var JBr=function(e){return typeof e==`function`||typeof e==`object`&&!!e&&!Array.isArray(e)},YBr=function(e){return e!==`__proto__`&&e!==`constructor`&&e!==`prototype`};function XBr(e,t,n){var r=e[n];JBr(t)&&JBr(r)?ZBr(r,t):e[n]=t}function ZBr(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];for(var i=0,a=n;i<a.length;i++){var o=a[i];if(JBr(o))for(var s in o)YBr(s)&&XBr(e,o[s],s)}return e}var V7=S.createContext();V7.Consumer;function QBr(e){var t=(0,S.useContext)(V7),n=(0,S.useMemo)((function(){return function(e,t){if(!e)return F7(14);if(M7(e)){var n=e(t);return process.env.NODE_ENV===`production`||n!==null&&!Array.isArray(n)&&typeof n==`object`?n:F7(7)}return Array.isArray(e)||typeof e!=`object`?F7(8):t?A7({},t,{},e):e}(e.theme,t)}),[e.theme,t]);return e.children?S.createElement(V7.Provider,{value:n},e.children):null}var $Br={};function eVr(e,t,n){var r=Kzr(e),i=!qBr(e),a=t.attrs,o=a===void 0?Gzr:a,s=t.componentId,c=s===void 0?function(e,t){var n=typeof e==`string`?GBr(e):`sc`;$Br[n]=($Br[n]||0)+1;var r=n+`-`+KBr(`5.3.11`+n+$Br[n]);return t?t+`-`+r:r}(t.displayName,t.parentComponentId):s,l=t.displayName,u=l===void 0?function(e){return qBr(e)?`styled.`+e:`Styled(`+N7(e)+`)`}(e):l,d=t.displayName&&t.componentId?GBr(t.displayName)+`-`+t.componentId:t.componentId||c,f=r&&e.attrs?Array.prototype.concat(e.attrs,o).filter(Boolean):o,p=t.shouldForwardProp;r&&e.shouldForwardProp&&(p=t.shouldForwardProp?function(n,r,i){return e.shouldForwardProp(n,r,i)&&t.shouldForwardProp(n,r,i)}:e.shouldForwardProp);var m,h=new bBr(n,d,r?e.componentStyle:void 0),g=h.isStatic&&o.length===0,_=function(e,t){return function(e,t,n,r){var i=e.attrs,a=e.componentStyle,o=e.defaultProps,s=e.foldedComponentIds,c=e.shouldForwardProp,l=e.styledComponentId,u=e.target,d=function(e,t,n){e===void 0&&(e=j7);var r=A7({},t,{theme:e}),i={};return n.forEach((function(e){var t,n,a,o=e;for(t in M7(o)&&(o=o(r)),o)r[t]=i[t]=t===`className`?(n=i[t],a=o[t],n&&a?n+` `+a:n||a):o[t]})),[r,i]}(HBr(t,(0,S.useContext)(V7),o)||j7,t,i),f=d[0],p=d[1],m=function(e,t,n,r){var i=OBr(),a=kBr(),o=t?e.generateAndInjectStyles(j7,i,a):e.generateAndInjectStyles(n,i,a);return process.env.NODE_ENV!==`production`&&!t&&r&&r(o),o}(a,r,f,process.env.NODE_ENV===`production`?void 0:e.warnTooManyClasses),h=n,g=p.$as||t.$as||p.as||t.as||u,_=qBr(g),v=p===t?t:A7({},t,{},p),y={};for(var b in v)b[0]!==`$`&&b!==`as`&&(b===`forwardedAs`?y.as=v[b]:(c?c(b,Vzr,g):!_||Vzr(b))&&(y[b]=v[b]));return t.style&&p.style!==t.style&&(y.style=A7({},t.style,{},p.style)),y.className=Array.prototype.concat(s,l,m===l?null:m,t.className,p.className).filter(Boolean).join(` `),y.ref=h,(0,S.createElement)(g,y)}(m,e,t,g)};return _.displayName=u,(m=S.forwardRef(_)).attrs=f,m.componentStyle=h,m.displayName=u,m.shouldForwardProp=p,m.foldedComponentIds=r?Array.prototype.concat(e.foldedComponentIds,e.styledComponentId):Gzr,m.styledComponentId=d,m.target=r?e.target:e,m.withComponent=function(e){var r=t.componentId,i=function(e,t){if(e==null)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(t,[`componentId`]),a=r&&r+`-`+(qBr(e)?e:GBr(N7(e)));return eVr(e,A7({},i,{attrs:f,componentId:a}),n)},Object.defineProperty(m,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(t){this._foldedDefaultProps=r?ZBr({},e.defaultProps,t):t}}),process.env.NODE_ENV!==`production`&&(VBr(u,d),m.warnTooManyClasses=function(e,t){var n={},r=!1;return function(i){if(!r&&(n[i]=!0,Object.keys(n).length>=200)){var a=t?` with the id of "`+t+`"`:``;console.warn(`Over 200 classes were generated for component `+e+a+`.
|
|
1268
1268
|
Consider using the attrs method, together with a style object for frequently changed styles.
|
|
1269
1269
|
Example:
|
|
1270
1270
|
const Component = styled.div.attrs(props => ({
|
|
@@ -1273,14 +1273,14 @@ Example:
|
|
|
1273
1273
|
},
|
|
1274
1274
|
}))\`width: 100%;\`
|
|
1275
1275
|
|
|
1276
|
-
<Component />`),r=!0,n={}}}}(u,d)),Object.defineProperty(m,"toString",{value:function(){return`.`+m.styledComponentId}}),i&&(0,
|
|
1276
|
+
<Component />`),r=!0,n={}}}}(u,d)),Object.defineProperty(m,"toString",{value:function(){return`.`+m.styledComponentId}}),i&&(0,Hzr.default)(m,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),m}var H7=function(e){return function e(t,n,r){if(r===void 0&&(r=j7),!(0,Fzr.isValidElementType)(n))return F7(1,String(n));var i=function(){return t(n,r,B7.apply(void 0,arguments))};return i.withConfig=function(i){return e(t,n,A7({},r,{},i))},i.attrs=function(i){return e(t,n,A7({},r,{attrs:Array.prototype.concat(r.attrs,i).filter(Boolean)}))},i}(eVr,e)};`a.abbr.address.area.article.aside.audio.b.base.bdi.bdo.big.blockquote.body.br.button.canvas.caption.cite.code.col.colgroup.data.datalist.dd.del.details.dfn.dialog.div.dl.dt.em.embed.fieldset.figcaption.figure.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.iframe.img.input.ins.kbd.keygen.label.legend.li.link.main.map.mark.marquee.menu.menuitem.meta.meter.nav.noscript.object.ol.optgroup.option.output.p.param.picture.pre.progress.q.rp.rt.ruby.s.samp.script.section.select.small.source.span.strong.style.sub.summary.sup.table.tbody.td.textarea.tfoot.th.thead.time.title.tr.track.u.ul.var.video.wbr.circle.clipPath.defs.ellipse.foreignObject.g.image.line.linearGradient.marker.mask.path.pattern.polygon.polyline.radialGradient.rect.stop.svg.text.textPath.tspan`.split(`.`).forEach((function(e){H7[e]=H7(e)})),function(){function e(e,t){this.rules=e,this.componentId=t,this.isStatic=vBr(e),L7.registerId(this.componentId+1)}var t=e.prototype;return t.createStyles=function(e,t,n,r){var i=r(z7(this.rules,t,n,r).join(``),``),a=this.componentId+e;n.insertRules(a,a,i)},t.removeStyles=function(e,t){t.clearRules(this.componentId+e)},t.renderStyles=function(e,t,n,r){e>2&&L7.registerId(this.componentId+e),this.removeStyles(e,n),this.createStyles(e,t,n,r)},e}();function tVr(e){process.env.NODE_ENV!==`production`&&typeof navigator<`u`&&navigator.product===`ReactNative`&&console.warn("`keyframes` cannot be used on ReactNative, only on the web. To do animation in ReactNative please use Animated.");for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i=B7.apply(void 0,[e].concat(n)).join(``);return new jBr(KBr(i),i)}(function(){function e(){var e=this;this._emitSheetCSS=function(){var t=e.instance.toString();if(!t)return``;var n=sBr();return`<style `+[n&&`nonce="`+n+`"`,P7+`="true"`,`data-styled-version="5.3.11"`].filter(Boolean).join(` `)+`>`+t+`</style>`},this.getStyleTags=function(){return e.sealed?F7(2):e._emitSheetCSS()},this.getStyleElement=function(){var t;if(e.sealed)return F7(2);var n=((t={})[P7]=``,t[`data-styled-version`]=`5.3.11`,t.dangerouslySetInnerHTML={__html:e.instance.toString()},t),r=sBr();return r&&(n.nonce=r),[S.createElement(`style`,A7({},n,{key:`sc-0-0`}))]},this.seal=function(){e.sealed=!0},this.instance=new L7({isServer:!0}),this.sealed=!1}var t=e.prototype;return t.collectStyles=function(e){return this.sealed?F7(2):S.createElement(ABr,{sheet:this.instance},e)},t.interleaveWithNodeStream=function(e){return F7(3)},e})();var U7=function(e){var t=S.forwardRef((function(t,n){var r=(0,S.useContext)(V7),i=e.defaultProps,a=HBr(t,r,i);return process.env.NODE_ENV!==`production`&&a===void 0&&console.warn(`[withTheme] You are not using a ThemeProvider nor passing a theme prop or a theme in defaultProps in component class "`+N7(e)+`"`),S.createElement(e,A7({},t,{theme:a,ref:n}))}));return(0,Hzr.default)(t,e),t.displayName=`WithTheme(`+N7(e)+`)`,t};process.env.NODE_ENV!==`production`&&typeof navigator<`u`&&navigator.product===`ReactNative`&&console.warn(`It looks like you've imported 'styled-components' on React Native.
|
|
1277
1277
|
Perhaps you're looking to import 'styled-components/native'?
|
|
1278
1278
|
Read more about this at https://www.styled-components.com/docs/basics#react-native`),process.env.NODE_ENV!==`production`&&process.env.NODE_ENV!==`test`&&typeof window<`u`&&(window[`__styled-components-init__`]=window[`__styled-components-init__`]||0,window[`__styled-components-init__`]===1&&console.warn(`It looks like there are several instances of 'styled-components' initialized in this application. This may cause dynamic styles to not render properly, errors during the rehydration process, a missing theme prop, and makes your application bigger without good reason.
|
|
1279
1279
|
|
|
1280
|
-
See https://s-c.sh/2BAXzed for more info.`),window[`__styled-components-init__`]+=1);function W7(e,t=16){let n=e.split(`px`)[0]/t;return String(`${n}rem`)}var G7={breakpoints:{sm:W7(`428px`),md:W7(`800px`),lg:W7(`1280px`),xl:W7(`1440px`),xxl:W7(`2048px`)},colors:{dark:{base:{primary:`#00676D`,secondary:`#17B582`,tertiary:`#6EC5B8`,gray:`#8E8E93`,black:`#000000`,white:`#FFFFFF`,alert:`#C64F55`,warning:`#F4B740`,success:`#17B569`,wordOfChrist:`#8B0000`,live:`#cb1114`},neutral:{gray:`#8E8E93`,gray2:`#636366`,gray3:`#48484A`,gray4:`#3A3A3C`,gray5:`#2C2C2E`,gray6:`#1C1C1E`},fill:{paper:`#1C1C1E`,paperTransparent:`#1C1C1E00`,screen:`#000000`,system:`rgba(99, 99, 102, 0.36)`,system2:`rgba(99, 99, 102, 0.32)`,system3:`rgba(99, 99, 102, 0.24)`,system4:`rgba(99, 99, 102, 0.18)`},material:{thick:`rgba(28, 28, 30, 0.90)`,regular:`rgba(28, 28, 30, 0.70)`,thin:`rgba(28, 28, 30, 0.50)`,ultrathin:`rgba(28, 28, 30, 0.40)`,chrome:`rgba(28, 28, 30, 0.95)`},text:{primary:`#F4F7F8`,secondary:`rgba(244, 247, 248, 0.6)`,tertiary:`rgba(244, 247, 248, 0.33)`,quaternary:`rgba(244, 247, 248, 0.18)`,placeholder:`rgba(244, 247, 248, 0.3)`,action:`#17B582`}},light:{base:{primary:`#00676D`,secondary:`#17B582`,tertiary:`#6EC5B8`,gray:`#8E8E93`,black:`#000000`,white:`#FFFFFF`,alert:`#C64F55`,warning:`#F4B740`,success:`#17B569`,wordOfChrist:`#8B0000`,live:`#cb1114`},neutral:{gray:`#8E8E93`,gray2:`#AFAFB3`,gray3:`#C7C7CC`,gray4:`#D1D1D6`,gray5:`#E5E5EA`,gray6:`#F2F2F7`},fill:{paper:`#FFFFFF`,screen:`#F9F9FB`,system:`rgba(142, 142, 147, 0.2)`,system2:`rgba(142, 142, 147, 0.16)`,system3:`rgba(142, 142, 147, 0.12)`,system4:`rgba(142, 142, 147, 0.08)`},material:{thick:`rgba(28, 28, 30, 0.90)`,regular:`rgba(28, 28, 30, 0.70)`,thin:`rgba(28, 28, 30, 0.50)`,ultrathin:`rgba(28, 28, 30, 0.40)`,chrome:`rgba(28, 28, 30, 0.95)`},text:{primary:`#27272E`,secondary:`rgba(39, 39, 46, 0.6)`,tertiary:`rgba(39, 39, 46, 0.3)`,quaternary:`rgba(39, 39, 46, 0.18)`,placeholder:`rgba(229, 229, 234, 0.3)`,action:`#17B582`},shadow:{low:`0px 2px 8px rgba(0, 0, 0, 0.04)`,medium:`0px 5px 24px rgba(0, 0, 0, 0.05)`,high:`0px 20px 48px rgba(0, 0, 0, 0.09)`}}},radii:{xs:W7(`2px`),s:W7(`4px`),base:W7(`6px`),l:W7(`10px`),xl:W7(`16px`),xxl:W7(`30px`),round:W7(`999px`)},shadows:{low:`0px 3px 6px rgba(0, 0, 0, 0.25);`,medium:`0px 20px 48px rgba(0, 0, 0, 0.09);`,mediumBottom:`0px 60px 48px rgba(0, 0, 0, 0.09);`,high:`0px 16px 38px rgba(0, 0, 0, 0.22);`},space:{xxxs:W7(`4px`),xxs:W7(`6px`),xs:W7(`14px`),s:W7(`18px`),base:W7(`24px`),l:W7(`36px`),xl:W7(`48px`),xxl:W7(`66px`),xxxl:W7(`108px`)},timing:{base:`0.132s`,l:`0.2s`,xl:`0.3s`}},QBr=(0,S.createContext)(`light`),$Br=(0,S.createContext)(null),eVr=e=>{if(!e)return null;let t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?`${parseInt(t[1],16)} ${parseInt(t[2],16)} ${parseInt(t[3],16)}`:null},tVr=e=>{if(typeof window<`u`){let t=document.documentElement;if(t&&t.classList)try{e===`dark`?t.classList.add(`dark`):t.classList.remove(`dark`)}catch(e){console.warn(`Failed to update HTML class:`,e)}}return e},nVr=()=>{if(typeof window>`u`)return`light`;let e=document.documentElement;return e.classList.contains(`dark`)?`dark`:e.classList.contains(`light`)?`light`:window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`};function rVr({theme:e=G7,...t}){let[n,r]=(0,S.useState)(()=>tVr(nVr())),[i,a]=(0,S.useState)({...G7,colors:{...G7.colors[n],base:{...G7.colors[n].base,primary:G7.colors[n].base.primary,secondary:G7.colors[n].base.secondary,tertiary:G7.colors[n].base.tertiary},text:{...G7.colors[n].text,action:G7.colors[n].text.action}}}),{currentChurch:o,loading:s,error:c}=GLr(),[l,u]=kzr();return(0,S.useEffect)(()=>{if(typeof window>`u`)return;let e=new MutationObserver(()=>{let e=nVr();e!==n&&(r(e),tVr(e))});e.observe(document.documentElement,{attributes:!0,attributeFilter:[`class`]});let t=window.matchMedia(`(prefers-color-scheme: dark)`),i=e=>{let t=document.documentElement;if(!t.classList.contains(`dark`)&&!t.classList.contains(`light`)){let t=e.matches?`dark`:`light`;r(t),tVr(t)}};return t.addEventListener(`change`,i),()=>{e.disconnect(),t.removeEventListener(`change`,i)}},[n]),(0,S.useEffect)(()=>{a({...G7,colors:{...G7.colors[n],base:{...G7.colors[n].base,primary:G7.colors[n].base.primary,secondary:G7.colors[n].base.secondary,tertiary:G7.colors[n].base.tertiary},text:{...G7.colors[n].text,action:G7.colors[n].text.action}}})},[n]),(0,S.useEffect)(()=>{u(Tzr({loading:s}))},[s]),(0,S.useEffect)(()=>{if(o&&o.theme)try{let e=JSON.parse(o?.theme);a({...G7,colors:{...G7.colors[n],base:{...G7.colors[n].base,primary:e?.colors?.primary||G7.colors[n].base.primary,secondary:e?.colors?.secondary||G7.colors[n].base.secondary,tertiary:e?.colors?.tertiary||G7.colors[n].base.tertiary},text:{...G7.colors[n].text,action:e?.colors?.secondary||G7.colors[n].text.action}}});let t=document.documentElement;if(e?.colors?.primary){let n=eVr(e.colors.primary);n&&t.style.setProperty(`--color-brand-primary`,n)}if(e?.colors?.secondary){let n=eVr(e.colors.secondary);n&&t.style.setProperty(`--color-brand-secondary`,n)}if(e?.colors?.tertiary){let n=eVr(e.colors.tertiary);n&&t.style.setProperty(`--color-brand-tertiary`,n)}}catch(e){console.error(`ThemeProvider - Error parsing church theme:`,e),console.error(`ThemeProvider - Raw theme string:`,o.theme)}},[o,n]),(0,q.jsx)(JBr,{theme:i,children:(0,q.jsx)(QBr.Provider,{value:n,children:(0,q.jsx)($Br.Provider,{value:i,children:t.children})})})}rVr.propTypes={children:K.default.node.isRequired,theme:K.default.object};var K7=(0,S.createContext)({useApollosIdParam:!1,shouldUsePathRouter:!1,shouldUseModal:!1,apollosPageRoute:null,churchSlug:`apollos_global`}),iVr=()=>(0,S.useContext)(K7).useApollosIdParam,aVr=()=>(0,S.useContext)(K7).shouldUsePathRouter,oVr=()=>(0,S.useContext)(K7).shouldUseModal,sVr=()=>(0,S.useContext)(K7).apollosPageRoute,cVr=()=>(0,S.useContext)(K7).churchSlug;function lVr({children:e,churchSlug:t}){let{currentChurch:n}=GLr(),{currentUser:r}=O7();return(0,q.jsx)(Ape,{coreSegmentKey:`YxKgDjmwjTQrTdm6mO34kArQIYFmfnAY`,churchSegmentKey:n?.webSegmentKey,currentChurch:{slug:t,name:n?.name},currentUser:r,children:e})}function uVr(e={}){let[t,n]=(0,S.useState)(null),[r,i]=(0,S.useState)(e.church||`apollos_global`);return(0,S.useEffect)(()=>{(async()=>{let e=await czr(r);n(e)})()},[r]),(0,S.useEffect)(()=>{let e=document.querySelector(`.apollos-widget[data-church]`)?.getAttribute(`data-church`);e&&i(e)},[]),(0,S.useEffect)(()=>{e.church&&e.church!==r&&i(e.church)},[e.church,r]),t?(0,q.jsx)(tLr,{church:r,children:(0,q.jsx)(K7.Provider,{value:{useApollosIdParam:e.useApollosIdParam,shouldUsePathRouter:e.shouldUsePathRouter,shouldUseModal:e.shouldUseModal,apollosPageRoute:e.apollosPageRoute,churchSlug:r},children:(0,q.jsx)(xoe,{client:t,...e,children:(0,q.jsx)(ise,{children:(0,q.jsx)(lVr,{churchSlug:r,children:(0,q.jsx)(Dzr,{church:r,searchFeed:e.searchFeed,searchProfileSize:e.searchProfileSize,hideApollosAuth:e.hideApollosAuth,customPlaceholder:e.customPlaceholder,children:(0,q.jsx)(_zr,{children:(0,q.jsx)(rVr,{children:e.children})})})})})})})}):null}uVr.propTypes={children:K.default.oneOfType([K.default.node,K.default.func,K.default.object]),client:K.default.shape({}),customTheme:K.default.shape({}),church:K.default.string};function dVr({Component:e,options:t,...n}){let{loading:r,error:i,content:a,fetchMore:o}=VLr(t);return(0,q.jsx)(e,{data:a,loading:r,error:i,fetchMore:o,...n})}dVr.propTypes={Component:K.default.oneOfType([K.default.node,K.default.func,K.default.object]),options:K.default.shape({})};function fVr(e){if(!e)return null;if(/^[A-Z]\w+-/.test(e)){let[t,n]=e.split(/-(.*)/s);if(t&&n)return{type:t,randomId:n}}else{let t=e.split(`-`).at(-1);if(!t)return null;try{let[e,n]=atob(t).split(/-(.*)/s);if(e&&n)return{type:e,randomId:n}}catch{return null}}return null}var pVr=({id:e})=>{let{item:t}=ULr({variables:{id:e}});return(0,q.jsx)(QIr,{content:t,lightTheme:t?.lightTheme,darkTheme:t?.darkTheme})},mVr=({id:e})=>{let{livestream:t}=QLr({variables:{id:e}});return t?(0,q.jsx)(eLr,{livestream:t}):null};function hVr({type:e,id:t}){switch(e){case`MediaContentItem`:case`WeekendContentItem`:case`Event`:case`UniversalContentItem`:case`ContentSeriesContentItem`:return(0,q.jsx)(pVr,{id:`${e}:${t}`});case`Livestream`:return(0,q.jsx)(mVr,{id:`${e}:${t}`});case`ContentChannel`:{let n={variables:{id:`${e}:${t}`}};return(0,q.jsx)(dVr,{Component:_Rr,options:n})}case`Url`:return(0,q.jsx)(`h1`,{children:`External Url`});case`FeatureFeed`:return(0,q.jsx)(_Rr,{id:`${e}:${t}`});default:return null}}function gVr(e){let{type:t,randomId:n}=fVr(e)??{};return hVr({type:t,id:n})}function _Vr(e){if(!e)return null;let t=`ãàáäâẽèéëêìíïîõòóöôùúüûñç·/_,:;`;return Array.from(e).map(e=>{let n=[...t].indexOf(e);return n>-1?e.replace(new RegExp(t.charAt(n),`g`),`aaaaaeeeeeiiiiooooouuuunc------`.charAt(n)):e}).join(``).toString().toLowerCase().trim().replace(/\s+/g,`-`).replace(/&/g,``).replace(/[^\w\-]+/g,``).replace(/\-\-+/g,`-`)}function vVr(e){let[t,n]=e?.id?.split(`:`);switch(t){case`Event`:case`MediaContentItem`:case`WeekendContentItem`:case`UniversalContentItem`:case`ContentChannel`:case`FeatureFeed`:case`Livestream`:case`ContentSeriesContentItem`:return e.title?`${_Vr(e.title)}-${btoa(`${t}-${n}`)}`:`${t}-${n}`;case`Url`:return e.url;default:return console.warn(`Routing for node type ${t} not set up. Please add it to getURLFromType.js`),`/`}}function yVr(e){return typeof e!=`string`||!e.length?!1:/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(String(e).toLowerCase())}function bVr(e){if(typeof e!=`string`||!e.length)return!1;let t=e.match(/^[0-9]{10,10}$/);return t?t.length===1:!1}var xVr=30;function SVr(e){let t=(e?.graphQLErrors||[]).find(e=>e?.extensions?.code===`RATE_LIMITED`)?.extensions;if(!t)return null;let n=t.retryAfter||null;return{retryAfter:n,seconds:nLr(n,xVr)}}var CVr=e=>{let[t,n]=(0,S.useState)(`IDLE`),[r,i]=(0,S.useState)(null),[a,o]=Ky(),s=({identity:e,type:t,userExists:r,userProfile:i,nextStep:s})=>{n(`SUCCESS`),o(Wy({identity:e,type:t,userExists:r,userProfile:i,step:s,prevStep:a.step}))},c=e=>{let t=SVr(e);n(`ERROR`),i({identity:t?`You just requested a code. Please wait ${t.seconds}s and try again.`:`Something went wrong. Please try again.`})},[l]=nRr({onError:c}),[u]=eRr({fetchPolicy:`network-only`,onError:c,onCompleted:async e=>{let{identity:t}=d,n=e?.requestLogin.result!==`NO_USER`,r=yVr(t);if(n)s({identity:r?{email:t}:{phone:t},userExists:!0,nextStep:Ry.Confirm,type:r?`email`:`phone`});else try{if(!(await l({variables:{identity:r?{email:t}:{phone:t}}}))?.data?.requestRegister)return;s({identity:r?{email:t}:{phone:t},userExists:!1,nextStep:Ry.Confirm,type:r?`email`:`phone`})}catch(e){console.log(JSON.stringify(e))}}}),{values:d,handleSubmit:f,setFieldValue:p}=XLr(()=>{let{identity:e}=d,t=yVr(e),r=bVr(e);t||r?(n(`LOADING`),u({variables:{identity:t?{email:d.identity}:{phone:d.identity}}})):(n(`ERROR`),i({identity:`Please enter a valid email or phone number.`}))}),m=t===`LOADING`,h=e=>{e.preventDefault(),f()};return(0,q.jsxs)(pRr,{...e,heading:a.type===`login`?`Welcome back!`:`We’re glad you’re here.`,subHeading:a.type===`login`?`Use the same phone number or email that you used when logging into the app before.`:`If you’ve attended with us before, we’ll sync your history and help personalize what’s next.`,children:[(0,q.jsxs)(`form`,{onSubmit:h,children:[(0,q.jsx)(yw,{id:`identity`,placeholder:`Phone or Email`,value:d.identity||``,onChange:e=>p(`identity`,e.target.value),required:!0,autoFocus:!0,error:r?.identity,className:`mb-4`}),(0,q.jsx)(uw,{className:`mb-4`,fg:`secondary`,children:`We’ll text or email you a code to continue.`}),(0,q.jsx)(tw,{type:`submit`,className:`w-full mt-6 mb-3`,surface:`solid`,disabled:!d.identity||m,children:m?`Submitting...`:`Next`})]}),a.type===`login`?(0,q.jsx)(q.Fragment,{children:(0,q.jsxs)(uw,{className:`flex gap-2 justify-center text-center`,fg:`secondary`,children:[`Having trouble?`,(0,q.jsx)(`div`,{className:`text-[theme(colors.action)] text-primary cursor-pointer`,onClick:()=>o(Wy({type:`signup`})),children:`Create account →`})]})}):(0,q.jsx)(q.Fragment,{children:(0,q.jsxs)(uw,{className:`flex gap-2 justify-center text-center`,fg:`secondary`,children:[`Already have an account?`,` `,(0,q.jsx)(`div`,{className:`text-[theme(colors.action)] cursor-pointer`,onClick:()=>o(Wy({type:`login`})),children:`Log in →`})]})})]})};function wVr(){let[e,t]=(0,S.useState)(`IDLE`),[n,r]=(0,S.useState)(null),[i,a]=Ky(),[o,s]=(0,S.useState)(),c=(0,S.useMemo)(()=>({defaultSelection:{id:`none`,firstName:`None of these are me`}}),[]),l=(0,S.useMemo)(()=>[...i.sharedProfiles||[],c.defaultSelection],[c.defaultSelection,i.sharedProfiles]),[u]=zLr(),d=e=>{t(`ERROR`),r(e)},f=({birthDate:e,gender:n,firstName:r,lastName:i})=>{t(`SUCCESS`),a(Wy(r===null||i===null||n===null||e===null?{user:{birthDate:e,gender:n,firstName:r,lastName:i},step:Ry.Details}:{step:Ry.Success}))},p=(0,S.useCallback)(e=>s(e.target.value),[]),{values:m,handleSubmit:h,setFieldValue:g}=XLr(async()=>{t(`LOADING`),o===`none`&&a(Wy({step:Ry.Details}));try{await u({variables:{mergeProfileId:o},update:(e,{data:{completeRegistration:{birthDate:t,gender:n,firstName:r,lastName:i}={}}={}})=>{f({birthDate:t,gender:n,firstName:r,lastName:i})},onError:d})}catch(e){d(),console.log(JSON.stringify(e))}}),_=e===`LOADING`;return(0,q.jsx)(J7,{position:`fixed`,top:`0`,bottom:`0`,left:`0`,right:`0`,overflow:`scroll`,zIndex:9999,justifyContent:`center`,display:`flex`,alignItems:`center`,backgroundColor:`neutral.gray6`,children:(0,q.jsxs)(sw,{p:`l`,display:`flex`,flexDirection:`column`,width:`440px`,children:[(0,q.jsx)(uw,{children:`Are any of these people you?`}),(0,q.jsx)(uw,{children:`Based on your verified phone number or email, we've matched you to an existing profile.`}),l.map((e,t)=>(0,q.jsxs)(J7,{display:`flex`,alignItems:`center`,mb:`s`,children:[(0,q.jsx)(yw,{id:`merge`,type:`radio`,mr:`xxs`,value:e.id,checked:e.id===o,onChange:p},e.id),e.photo?.uri?(0,q.jsx)(rw,{src:e.photo?.uri,alt:`avatar`,mr:`s`}):null,(0,q.jsxs)(J7,{children:[(0,q.jsx)(qqr,{children:e.firstName}),(0,q.jsx)(uw,{color:`text.secondary`,children:e.lastName})]})]},e.id)),(0,q.jsx)(tw,{disabled:!o,onClick:h,mt:`base`,children:_?`Submitting...`:`Next`})]})})}var TVr=wVr,q7=function(e,t){return t===void 0&&(t=null),function(n){return xu(n.theme,e,t)}},EVr=U7(H7.div`
|
|
1280
|
+
See https://s-c.sh/2BAXzed for more info.`),window[`__styled-components-init__`]+=1);function W7(e,t=16){let n=e.split(`px`)[0]/t;return String(`${n}rem`)}var G7={breakpoints:{sm:W7(`428px`),md:W7(`800px`),lg:W7(`1280px`),xl:W7(`1440px`),xxl:W7(`2048px`)},colors:{dark:{base:{primary:`#00676D`,secondary:`#17B582`,tertiary:`#6EC5B8`,gray:`#8E8E93`,black:`#000000`,white:`#FFFFFF`,alert:`#C64F55`,warning:`#F4B740`,success:`#17B569`,wordOfChrist:`#8B0000`,live:`#cb1114`},neutral:{gray:`#8E8E93`,gray2:`#636366`,gray3:`#48484A`,gray4:`#3A3A3C`,gray5:`#2C2C2E`,gray6:`#1C1C1E`},fill:{paper:`#1C1C1E`,paperTransparent:`#1C1C1E00`,screen:`#000000`,system:`rgba(99, 99, 102, 0.36)`,system2:`rgba(99, 99, 102, 0.32)`,system3:`rgba(99, 99, 102, 0.24)`,system4:`rgba(99, 99, 102, 0.18)`},material:{thick:`rgba(28, 28, 30, 0.90)`,regular:`rgba(28, 28, 30, 0.70)`,thin:`rgba(28, 28, 30, 0.50)`,ultrathin:`rgba(28, 28, 30, 0.40)`,chrome:`rgba(28, 28, 30, 0.95)`},text:{primary:`#F4F7F8`,secondary:`rgba(244, 247, 248, 0.6)`,tertiary:`rgba(244, 247, 248, 0.33)`,quaternary:`rgba(244, 247, 248, 0.18)`,placeholder:`rgba(244, 247, 248, 0.3)`,action:`#17B582`}},light:{base:{primary:`#00676D`,secondary:`#17B582`,tertiary:`#6EC5B8`,gray:`#8E8E93`,black:`#000000`,white:`#FFFFFF`,alert:`#C64F55`,warning:`#F4B740`,success:`#17B569`,wordOfChrist:`#8B0000`,live:`#cb1114`},neutral:{gray:`#8E8E93`,gray2:`#AFAFB3`,gray3:`#C7C7CC`,gray4:`#D1D1D6`,gray5:`#E5E5EA`,gray6:`#F2F2F7`},fill:{paper:`#FFFFFF`,screen:`#F9F9FB`,system:`rgba(142, 142, 147, 0.2)`,system2:`rgba(142, 142, 147, 0.16)`,system3:`rgba(142, 142, 147, 0.12)`,system4:`rgba(142, 142, 147, 0.08)`},material:{thick:`rgba(28, 28, 30, 0.90)`,regular:`rgba(28, 28, 30, 0.70)`,thin:`rgba(28, 28, 30, 0.50)`,ultrathin:`rgba(28, 28, 30, 0.40)`,chrome:`rgba(28, 28, 30, 0.95)`},text:{primary:`#27272E`,secondary:`rgba(39, 39, 46, 0.6)`,tertiary:`rgba(39, 39, 46, 0.3)`,quaternary:`rgba(39, 39, 46, 0.18)`,placeholder:`rgba(229, 229, 234, 0.3)`,action:`#17B582`},shadow:{low:`0px 2px 8px rgba(0, 0, 0, 0.04)`,medium:`0px 5px 24px rgba(0, 0, 0, 0.05)`,high:`0px 20px 48px rgba(0, 0, 0, 0.09)`}}},radii:{xs:W7(`2px`),s:W7(`4px`),base:W7(`6px`),l:W7(`10px`),xl:W7(`16px`),xxl:W7(`30px`),round:W7(`999px`)},shadows:{low:`0px 3px 6px rgba(0, 0, 0, 0.25);`,medium:`0px 20px 48px rgba(0, 0, 0, 0.09);`,mediumBottom:`0px 60px 48px rgba(0, 0, 0, 0.09);`,high:`0px 16px 38px rgba(0, 0, 0, 0.22);`},space:{xxxs:W7(`4px`),xxs:W7(`6px`),xs:W7(`14px`),s:W7(`18px`),base:W7(`24px`),l:W7(`36px`),xl:W7(`48px`),xxl:W7(`66px`),xxxl:W7(`108px`)},timing:{base:`0.132s`,l:`0.2s`,xl:`0.3s`}},nVr=(0,S.createContext)(`light`),rVr=(0,S.createContext)(null),iVr=e=>{if(!e)return null;let t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?`${parseInt(t[1],16)} ${parseInt(t[2],16)} ${parseInt(t[3],16)}`:null},aVr=e=>{if(typeof window<`u`){let t=document.documentElement;if(t&&t.classList)try{e===`dark`?t.classList.add(`dark`):t.classList.remove(`dark`)}catch(e){console.warn(`Failed to update HTML class:`,e)}}return e},oVr=()=>{if(typeof window>`u`)return`light`;let e=document.documentElement;return e.classList.contains(`dark`)?`dark`:e.classList.contains(`light`)?`light`:window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`};function sVr({theme:e=G7,...t}){let[n,r]=(0,S.useState)(()=>aVr(oVr())),[i,a]=(0,S.useState)({...G7,colors:{...G7.colors[n],base:{...G7.colors[n].base,primary:G7.colors[n].base.primary,secondary:G7.colors[n].base.secondary,tertiary:G7.colors[n].base.tertiary},text:{...G7.colors[n].text,action:G7.colors[n].text.action}}}),{currentChurch:o,loading:s,error:c}=YLr(),[l,u]=Nzr();return(0,S.useEffect)(()=>{if(typeof window>`u`)return;let e=new MutationObserver(()=>{let e=oVr();e!==n&&(r(e),aVr(e))});e.observe(document.documentElement,{attributes:!0,attributeFilter:[`class`]});let t=window.matchMedia(`(prefers-color-scheme: dark)`),i=e=>{let t=document.documentElement;if(!t.classList.contains(`dark`)&&!t.classList.contains(`light`)){let t=e.matches?`dark`:`light`;r(t),aVr(t)}};return t.addEventListener(`change`,i),()=>{e.disconnect(),t.removeEventListener(`change`,i)}},[n]),(0,S.useEffect)(()=>{a({...G7,colors:{...G7.colors[n],base:{...G7.colors[n].base,primary:G7.colors[n].base.primary,secondary:G7.colors[n].base.secondary,tertiary:G7.colors[n].base.tertiary},text:{...G7.colors[n].text,action:G7.colors[n].text.action}}})},[n]),(0,S.useEffect)(()=>{u(kzr({loading:s}))},[s]),(0,S.useEffect)(()=>{if(o&&o.theme)try{let e=JSON.parse(o?.theme);a({...G7,colors:{...G7.colors[n],base:{...G7.colors[n].base,primary:e?.colors?.primary||G7.colors[n].base.primary,secondary:e?.colors?.secondary||G7.colors[n].base.secondary,tertiary:e?.colors?.tertiary||G7.colors[n].base.tertiary},text:{...G7.colors[n].text,action:e?.colors?.secondary||G7.colors[n].text.action}}});let t=document.documentElement;if(e?.colors?.primary){let n=iVr(e.colors.primary);n&&t.style.setProperty(`--color-brand-primary`,n)}if(e?.colors?.secondary){let n=iVr(e.colors.secondary);n&&t.style.setProperty(`--color-brand-secondary`,n)}if(e?.colors?.tertiary){let n=iVr(e.colors.tertiary);n&&t.style.setProperty(`--color-brand-tertiary`,n)}}catch(e){console.error(`ThemeProvider - Error parsing church theme:`,e),console.error(`ThemeProvider - Raw theme string:`,o.theme)}},[o,n]),(0,q.jsx)(QBr,{theme:i,children:(0,q.jsx)(nVr.Provider,{value:n,children:(0,q.jsx)(rVr.Provider,{value:i,children:t.children})})})}sVr.propTypes={children:K.default.node.isRequired,theme:K.default.object};var K7=(0,S.createContext)({useApollosIdParam:!1,shouldUsePathRouter:!1,shouldUseModal:!1,apollosPageRoute:null,churchSlug:`apollos_global`}),cVr=()=>(0,S.useContext)(K7).useApollosIdParam,lVr=()=>(0,S.useContext)(K7).shouldUsePathRouter,uVr=()=>(0,S.useContext)(K7).shouldUseModal,dVr=()=>(0,S.useContext)(K7).apollosPageRoute,fVr=()=>(0,S.useContext)(K7).churchSlug;function pVr({children:e,churchSlug:t}){let{currentChurch:n}=YLr(),{currentUser:r}=O7();return(0,q.jsx)(Ape,{coreSegmentKey:`YxKgDjmwjTQrTdm6mO34kArQIYFmfnAY`,churchSegmentKey:n?.webSegmentKey,currentChurch:{slug:t,name:n?.name},currentUser:r,children:e})}function mVr(e={}){let[t,n]=(0,S.useState)(null),[r,i]=(0,S.useState)(e.church||`apollos_global`);return(0,S.useEffect)(()=>{(async()=>{let e=await fzr(r);n(e)})()},[r]),(0,S.useEffect)(()=>{let e=document.querySelector(`.apollos-widget[data-church]`)?.getAttribute(`data-church`);e&&i(e)},[]),(0,S.useEffect)(()=>{e.church&&e.church!==r&&i(e.church)},[e.church,r]),t?(0,q.jsx)(aLr,{church:r,children:(0,q.jsx)(K7.Provider,{value:{useApollosIdParam:e.useApollosIdParam,shouldUsePathRouter:e.shouldUsePathRouter,shouldUseModal:e.shouldUseModal,apollosPageRoute:e.apollosPageRoute,churchSlug:r},children:(0,q.jsx)(xoe,{client:t,...e,children:(0,q.jsx)(ise,{children:(0,q.jsx)(pVr,{churchSlug:r,children:(0,q.jsx)(jzr,{church:r,searchFeed:e.searchFeed,searchProfileSize:e.searchProfileSize,hideApollosAuth:e.hideApollosAuth,customPlaceholder:e.customPlaceholder,children:(0,q.jsx)(xzr,{children:(0,q.jsx)(sVr,{children:e.children})})})})})})})}):null}mVr.propTypes={children:K.default.oneOfType([K.default.node,K.default.func,K.default.object]),client:K.default.shape({}),customTheme:K.default.shape({}),church:K.default.string};function hVr({Component:e,options:t,...n}){let{loading:r,error:i,content:a,fetchMore:o}=GLr(t);return(0,q.jsx)(e,{data:a,loading:r,error:i,fetchMore:o,...n})}hVr.propTypes={Component:K.default.oneOfType([K.default.node,K.default.func,K.default.object]),options:K.default.shape({})};function gVr(e){if(!e)return null;if(/^[A-Z]\w+-/.test(e)){let[t,n]=e.split(/-(.*)/s);if(t&&n)return{type:t,randomId:n}}else{let t=e.split(`-`).at(-1);if(!t)return null;try{let[e,n]=atob(t).split(/-(.*)/s);if(e&&n)return{type:e,randomId:n}}catch{return null}}return null}var _Vr=({id:e})=>{let{item:t}=qLr({variables:{id:e}});return(0,q.jsx)(nLr,{content:t,lightTheme:t?.lightTheme,darkTheme:t?.darkTheme})},vVr=({id:e})=>{let{livestream:t}=nRr({variables:{id:e}});return t?(0,q.jsx)(iLr,{livestream:t}):null};function yVr({type:e,id:t}){switch(e){case`MediaContentItem`:case`WeekendContentItem`:case`Event`:case`UniversalContentItem`:case`ContentSeriesContentItem`:return(0,q.jsx)(_Vr,{id:`${e}:${t}`});case`Livestream`:return(0,q.jsx)(vVr,{id:`${e}:${t}`});case`ContentChannel`:{let n={variables:{id:`${e}:${t}`}};return(0,q.jsx)(hVr,{Component:xRr,options:n})}case`Url`:return(0,q.jsx)(`h1`,{children:`External Url`});case`FeatureFeed`:return(0,q.jsx)(xRr,{id:`${e}:${t}`});default:return null}}function bVr(e){let{type:t,randomId:n}=gVr(e)??{};return yVr({type:t,id:n})}function xVr(e){if(!e)return null;let t=`ãàáäâẽèéëêìíïîõòóöôùúüûñç·/_,:;`;return Array.from(e).map(e=>{let n=[...t].indexOf(e);return n>-1?e.replace(new RegExp(t.charAt(n),`g`),`aaaaaeeeeeiiiiooooouuuunc------`.charAt(n)):e}).join(``).toString().toLowerCase().trim().replace(/\s+/g,`-`).replace(/&/g,``).replace(/[^\w\-]+/g,``).replace(/\-\-+/g,`-`)}function SVr(e){let[t,n]=e?.id?.split(`:`);switch(t){case`Event`:case`MediaContentItem`:case`WeekendContentItem`:case`UniversalContentItem`:case`ContentChannel`:case`FeatureFeed`:case`Livestream`:case`ContentSeriesContentItem`:return e.title?`${xVr(e.title)}-${btoa(`${t}-${n}`)}`:`${t}-${n}`;case`Url`:return e.url;default:return console.warn(`Routing for node type ${t} not set up. Please add it to getURLFromType.js`),`/`}}function CVr(e){return typeof e!=`string`||!e.length?!1:/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(String(e).toLowerCase())}function wVr(e){if(typeof e!=`string`||!e.length)return!1;let t=e.match(/^[0-9]{10,10}$/);return t?t.length===1:!1}var TVr=30;function EVr(e){let t=(e?.graphQLErrors||[]).find(e=>e?.extensions?.code===`RATE_LIMITED`)?.extensions;if(!t)return null;let n=t.retryAfter||null;return{retryAfter:n,seconds:oLr(n,TVr)}}var DVr=e=>{let[t,n]=(0,S.useState)(`IDLE`),[r,i]=(0,S.useState)(null),[a,o]=Ky(),s=({identity:e,type:t,userExists:r,userProfile:i,nextStep:s})=>{n(`SUCCESS`),o(Wy({identity:e,type:t,userExists:r,userProfile:i,step:s,prevStep:a.step}))},c=e=>{let t=EVr(e);n(`ERROR`),i({identity:t?`You just requested a code. Please wait ${t.seconds}s and try again.`:`Something went wrong. Please try again.`})},[l]=oRr({onError:c}),[u]=iRr({fetchPolicy:`network-only`,onError:c,onCompleted:async e=>{let{identity:t}=d,n=e?.requestLogin.result!==`NO_USER`,r=CVr(t);if(n)s({identity:r?{email:t}:{phone:t},userExists:!0,nextStep:Ry.Confirm,type:r?`email`:`phone`});else try{if(!(await l({variables:{identity:r?{email:t}:{phone:t}}}))?.data?.requestRegister)return;s({identity:r?{email:t}:{phone:t},userExists:!1,nextStep:Ry.Confirm,type:r?`email`:`phone`})}catch(e){console.log(JSON.stringify(e))}}}),{values:d,handleSubmit:f,setFieldValue:p}=eRr(()=>{let{identity:e}=d,t=CVr(e),r=wVr(e);t||r?(n(`LOADING`),u({variables:{identity:t?{email:d.identity}:{phone:d.identity}}})):(n(`ERROR`),i({identity:`Please enter a valid email or phone number.`}))}),m=t===`LOADING`,h=e=>{e.preventDefault(),f()};return(0,q.jsxs)(_Rr,{...e,heading:a.type===`login`?`Welcome back!`:`We’re glad you’re here.`,subHeading:a.type===`login`?`Use the same phone number or email that you used when logging into the app before.`:`If you’ve attended with us before, we’ll sync your history and help personalize what’s next.`,children:[(0,q.jsxs)(`form`,{onSubmit:h,children:[(0,q.jsx)(yw,{id:`identity`,placeholder:`Phone or Email`,value:d.identity||``,onChange:e=>p(`identity`,e.target.value),required:!0,autoFocus:!0,error:r?.identity,className:`mb-4`}),(0,q.jsx)(uw,{className:`mb-4`,fg:`secondary`,children:`We’ll text or email you a code to continue.`}),(0,q.jsx)(tw,{type:`submit`,className:`w-full mt-6 mb-3`,surface:`solid`,disabled:!d.identity||m,children:m?`Submitting...`:`Next`})]}),a.type===`login`?(0,q.jsx)(q.Fragment,{children:(0,q.jsxs)(uw,{className:`flex gap-2 justify-center text-center`,fg:`secondary`,children:[`Having trouble?`,(0,q.jsx)(`div`,{className:`text-[theme(colors.action)] text-primary cursor-pointer`,onClick:()=>o(Wy({type:`signup`})),children:`Create account →`})]})}):(0,q.jsx)(q.Fragment,{children:(0,q.jsxs)(uw,{className:`flex gap-2 justify-center text-center`,fg:`secondary`,children:[`Already have an account?`,` `,(0,q.jsx)(`div`,{className:`text-[theme(colors.action)] cursor-pointer`,onClick:()=>o(Wy({type:`login`})),children:`Log in →`})]})})]})};function OVr(){let[e,t]=(0,S.useState)(`IDLE`),[n,r]=(0,S.useState)(null),[i,a]=Ky(),[o,s]=(0,S.useState)(),c=(0,S.useMemo)(()=>({defaultSelection:{id:`none`,firstName:`None of these are me`}}),[]),l=(0,S.useMemo)(()=>[...i.sharedProfiles||[],c.defaultSelection],[c.defaultSelection,i.sharedProfiles]),[u]=ULr(),d=e=>{t(`ERROR`),r(e)},f=({birthDate:e,gender:n,firstName:r,lastName:i})=>{t(`SUCCESS`),a(Wy(r===null||i===null||n===null||e===null?{user:{birthDate:e,gender:n,firstName:r,lastName:i},step:Ry.Details}:{step:Ry.Success}))},p=(0,S.useCallback)(e=>s(e.target.value),[]),{values:m,handleSubmit:h,setFieldValue:g}=eRr(async()=>{t(`LOADING`),o===`none`&&a(Wy({step:Ry.Details}));try{await u({variables:{mergeProfileId:o},update:(e,{data:{completeRegistration:{birthDate:t,gender:n,firstName:r,lastName:i}={}}={}})=>{f({birthDate:t,gender:n,firstName:r,lastName:i})},onError:d})}catch(e){d(),console.log(JSON.stringify(e))}}),_=e===`LOADING`;return(0,q.jsx)(J7,{position:`fixed`,top:`0`,bottom:`0`,left:`0`,right:`0`,overflow:`scroll`,zIndex:9999,justifyContent:`center`,display:`flex`,alignItems:`center`,backgroundColor:`neutral.gray6`,children:(0,q.jsxs)(sw,{p:`l`,display:`flex`,flexDirection:`column`,width:`440px`,children:[(0,q.jsx)(uw,{children:`Are any of these people you?`}),(0,q.jsx)(uw,{children:`Based on your verified phone number or email, we've matched you to an existing profile.`}),l.map((e,t)=>(0,q.jsxs)(J7,{display:`flex`,alignItems:`center`,mb:`s`,children:[(0,q.jsx)(yw,{id:`merge`,type:`radio`,mr:`xxs`,value:e.id,checked:e.id===o,onChange:p},e.id),e.photo?.uri?(0,q.jsx)(rw,{src:e.photo?.uri,alt:`avatar`,mr:`s`}):null,(0,q.jsxs)(J7,{children:[(0,q.jsx)(Zqr,{children:e.firstName}),(0,q.jsx)(uw,{color:`text.secondary`,children:e.lastName})]})]},e.id)),(0,q.jsx)(tw,{disabled:!o,onClick:h,mt:`base`,children:_?`Submitting...`:`Next`})]})})}var kVr=OVr,q7=function(e,t){return t===void 0&&(t=null),function(n){return xu(n.theme,e,t)}},AVr=U7(H7.div`
|
|
1281
1281
|
transition: all ${q7(`timing.base`)} ease-out;
|
|
1282
1282
|
${gd}
|
|
1283
|
-
`),
|
|
1283
|
+
`),jVr=S.forwardRef((e,t)=>(0,q.jsx)(AVr,{ref:t,...e}));jVr.propTypes={..._d},jVr.displayName=`Box`;var J7=jVr,MVr=e=>{let[t,n]=Ky(),r=async({step:e,type:t})=>{n(Wy({step:e,type:t}))};return(0,q.jsx)(_Rr,{...e,children:(0,q.jsxs)(J7,{display:`flex`,flexDirection:`row`,justifyContent:`start`,className:`gap-4`,children:[(0,q.jsx)(tw,{surface:`solid`,onClick:()=>r({step:Ry.Identity,type:`login`}),children:`Login`}),(0,q.jsx)(tw,{surface:`solid`,onClick:()=>r({step:Ry.Identity,type:`signup`}),children:`Sign up`})]})})};function NVr(e={}){let[{step:t}]=Ky();return(0,q.jsx)(J7,{children:(()=>{switch(t){case Ry.Welcome:return(0,q.jsx)(MVr,{...e});case Ry.Identity:return(0,q.jsx)(DVr,{...e});case Ry.Details:return(0,q.jsx)(bRr,{...e});case Ry.Merge:return(0,q.jsx)(kVr,{...e});case Ry.Confirm:return(0,q.jsx)(vRr,{...e});case Ry.Success:return null;default:return(0,q.jsx)(MVr,{...e})}})()})}NVr.propTypes={};var PVr=NVr,FVr=(0,S.createContext)({id:null,navigate:()=>cEe}),IVr=(e={})=>{let[t]=xte(),{apollosId:n,contentId:r,feedId:i}=jl(),a=lVr(),o=uVr(),s=Al(),c=dVr(),l=cVr(),u=l?n||r||i||t.get(`apollosId`):r||i||t.get(`id`),d=()=>cEe;return d=a&&o?({id:e}={})=>{let t=e?.includes(`FeatureFeed`)?`feed`:`content`;s(e?{pathname:`/${t===`content`?`ac`:`af`}/${e}`}:{pathname:`/`})}:({id:e}={})=>{e?window.location.pathname!==c&&!o&&!a?window.location.href=`${c}?${l?`apollosId`:`id`}=${e}`:s({search:`?${l?`apollosId`:`id`}=${e}`,...o?{}:{pathname:c}}):s({pathname:`/`})},(0,q.jsx)(FVr.Provider,{value:{id:u,navigate:d},children:e.children})},LVr=()=>(0,S.useContext)(FVr),RVr={Container:U7(H7.div`
|
|
1284
1284
|
width: 100%;
|
|
1285
1285
|
height: 100%;
|
|
1286
1286
|
display: flex;
|
|
@@ -1294,7 +1294,7 @@ See https://s-c.sh/2BAXzed for more info.`),window[`__styled-components-init__`]
|
|
|
1294
1294
|
}
|
|
1295
1295
|
position: relative;
|
|
1296
1296
|
${gd};
|
|
1297
|
-
`)},
|
|
1297
|
+
`)},zVr=()=>{let[e,t]=wzr(),n=(0,S.useRef)(),{id:r}=LVr();return(0,S.useEffect)(()=>{r&&(t(_zr()),t(yzr(r))),r===null&&t(vzr())},[t,r]),e.content?(0,q.jsx)(RVr.Container,{ref:n,role:`dialog`,tabIndex:-1,children:(0,q.jsx)(J7,{width:{_:`100%`,md:`750px`,lg:`1180px`},children:e.content})}):null};zVr.propTypes={..._d};var BVr=zVr,Y7={ListItem:U7(H7.div`
|
|
1298
1298
|
display: flex;
|
|
1299
1299
|
padding: ${q7(`space.xs`)};
|
|
1300
1300
|
border-radius: ${q7(`radii.xl`)};
|
|
@@ -1356,31 +1356,31 @@ See https://s-c.sh/2BAXzed for more info.`),window[`__styled-components-init__`]
|
|
|
1356
1356
|
overflow: hidden;
|
|
1357
1357
|
text-overflow: ellipsis;
|
|
1358
1358
|
${gd};
|
|
1359
|
-
`)};function
|
|
1360
|
-
max-height: ${e||
|
|
1361
|
-
`,
|
|
1359
|
+
`)};function VVr({title:e,subtitle:t,leadingIcon:n,tailingIcon:r,node:i,onClick:a,...o}){let s=Al(),c=()=>{s({id:SVr(i)})},l=(0,q.jsx)(`svg`,{width:`10`,height:`18`,viewBox:`0 0 10 18`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:(0,q.jsx)(`path`,{d:`M1 1.5L8.5 9L1 16.5`,stroke:`#AFAFB3`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})}),u=(0,q.jsxs)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:[(0,q.jsx)(`path`,{d:`M12.8412 4.35693L12.8413 4.35678C13.2869 3.90825 13.8168 3.55228 14.4004 3.30937C14.9841 3.06646 15.6101 2.94141 16.2423 2.94141C16.8745 2.94141 17.5005 3.06646 18.0842 3.30937C18.6679 3.55228 19.1977 3.90825 19.6433 4.35678L19.6436 4.35707C20.0921 4.80262 20.4481 5.33249 20.691 5.91618C20.9339 6.49986 21.0589 7.12583 21.0589 7.75804C21.0589 8.39026 20.9339 9.01623 20.691 9.59991C20.4481 10.1836 20.0921 10.7135 19.6436 11.159L19.6434 11.1592L16.9903 13.8123C16.088 14.7137 14.8647 15.22 13.5892 15.22C12.3137 15.22 11.0904 14.7137 10.188 13.8123L10.1881 13.8122L10.1858 13.8102C10.1168 13.7476 10.0612 13.6717 10.0224 13.5871C9.98365 13.5024 9.96246 13.4107 9.96017 13.3176C9.95788 13.2245 9.97453 13.1319 10.0091 13.0454C10.0437 12.959 10.0955 12.8804 10.1613 12.8146C10.2272 12.7487 10.3057 12.6969 10.3922 12.6623C10.4787 12.6278 10.5713 12.6111 10.6644 12.6134C10.7575 12.6157 10.8492 12.6369 10.9338 12.6757C11.0185 12.7145 11.0944 12.7701 11.1569 12.8391L11.1569 12.8391L11.1592 12.8414C11.805 13.4834 12.6786 13.8437 13.5892 13.8437C14.4998 13.8437 15.3734 13.4834 16.0192 12.8414L16.0193 12.8413L18.6723 10.1883C18.6724 10.1883 18.6724 10.1882 18.6724 10.1882C18.9926 9.86966 19.2466 9.491 19.42 9.07398C19.5934 8.65692 19.6826 8.20971 19.6826 7.75804C19.6826 7.30638 19.5934 6.85917 19.42 6.44211C19.2466 6.02505 18.9925 5.64636 18.6723 5.3278L18.6723 5.32778C18.0265 4.68583 17.1529 4.3255 16.2423 4.3255C15.3317 4.3255 14.4581 4.68583 13.8123 5.32778L13.8122 5.32791L11.957 7.18305C11.8264 7.3009 11.6555 7.36419 11.4796 7.35986C11.3032 7.35552 11.1352 7.2835 11.0104 7.15871C10.8856 7.03392 10.8136 6.86592 10.8092 6.68949C10.8049 6.51357 10.8682 6.3427 10.9861 6.21207L12.8412 4.35693Z`,fill:`#AFAFB3`,stroke:`#AFAFB3`,strokeWidth:`0.125`}),(0,q.jsx)(`path`,{d:`M12.0001 16.7719L10.1438 18.6282C9.50654 19.2387 8.65542 19.5754 7.77289 19.5659C6.89035 19.5564 6.04664 19.2017 5.42256 18.5776C4.79848 17.9535 4.44369 17.1098 4.43424 16.2273C4.42478 15.3447 4.76141 14.4936 5.37197 13.8563L8.0251 11.2032C8.6592 10.5729 9.51696 10.2191 10.411 10.2191C11.3051 10.2191 12.1629 10.5729 12.797 11.2032C12.9396 11.3324 13.1266 11.4019 13.319 11.3972C13.5115 11.3924 13.6948 11.3138 13.8309 11.1777C13.967 11.0416 14.0456 10.8583 14.0503 10.6658C14.0551 10.4734 13.9856 10.2865 13.8563 10.1438C12.9423 9.23068 11.7031 8.71777 10.411 8.71777C9.119 8.71777 7.87981 9.23068 6.96572 10.1438L4.3126 12.7969C3.83563 13.2438 3.45338 13.7819 3.18857 14.3795C2.92376 14.977 2.78181 15.6217 2.77116 16.2751C2.7605 16.9286 2.88135 17.5776 3.12653 18.1834C3.37172 18.7893 3.73622 19.3396 4.19836 19.8018C4.66051 20.2639 5.21087 20.6284 5.81671 20.8736C6.42255 21.1188 7.07151 21.2396 7.725 21.229C8.37849 21.2183 9.02316 21.0764 9.62069 20.8116C10.2182 20.5468 10.7564 20.1645 11.2032 19.6875L13.0595 17.8313C13.1887 17.6886 13.2582 17.5017 13.2535 17.3092C13.2487 17.1168 13.1702 16.9335 13.034 16.7974C12.8979 16.6612 12.7146 16.5827 12.5221 16.5779C12.3297 16.5732 12.1428 16.6427 12.0001 16.7719V16.7719Z`,fill:`#AFAFB3`})]}),d=n?.sources?(0,q.jsx)(Y7.LeadingIcon,{children:(0,q.jsx)(J7,{width:`100%`,height:`100%`,backgroundSize:`cover`,backgroundPosition:`center`,backgroundImage:`url(${n?.sources[0].uri?n.sources[0].uri:null})`})}):n||u;return(0,q.jsxs)(Y7.ListItem,{cursor:i||a?`pointer`:`default`,onClick:a||i&&c,children:[(0,q.jsx)(J7,{display:`flex`,justifyContent:`center`,alignItems:`center`,children:d}),(0,q.jsxs)(Y7.Wrapper,{children:[(0,q.jsxs)(Y7.Heading,{children:[(0,q.jsx)(Y7.Title,{children:(0,q.jsx)(Y7.Ellipse,{children:e})}),(0,q.jsx)(Y7.Subtitle,{children:(0,q.jsx)(Y7.Ellipse,{children:t})})]}),(0,q.jsx)(Y7.TailingIcon,{children:r||l})]})]})}VVr.propTypes={..._d};var HVr=VVr,UVr=`80px`,WVr=({size:e})=>B7`
|
|
1360
|
+
max-height: ${e||UVr};
|
|
1361
|
+
`,GVr={Image:U7(H7.img`
|
|
1362
1362
|
resizemode: "contain";
|
|
1363
1363
|
max-width: 80%;
|
|
1364
|
-
${
|
|
1364
|
+
${WVr};
|
|
1365
1365
|
`),WrappedImage:U7(H7.img`
|
|
1366
1366
|
resizemode: "contain";
|
|
1367
1367
|
max-width: 100%;
|
|
1368
|
-
${
|
|
1369
|
-
`)};function
|
|
1368
|
+
${WVr};
|
|
1369
|
+
`)};function KVr({size:e,source:t,href:n,ref:r}){return n?(0,q.jsx)(`a`,{href:n,ref:r,children:(0,q.jsx)(GVr.WrappedImage,{className:`wordmark`,src:t||`./icon.png`,alt:`Logo`,size:e})}):(0,q.jsx)(GVr.Image,{className:`wordmark`,src:t||`./icon.png`,alt:`Logo`,size:e})}KVr.propTypes={..._d,size:K.default.string,source:K.default.string};var qVr=U7(KVr),JVr=tVr`
|
|
1370
1370
|
from {
|
|
1371
1371
|
transform: translateY(100%);
|
|
1372
1372
|
}
|
|
1373
1373
|
to {
|
|
1374
1374
|
transform: translateY(0);
|
|
1375
1375
|
}
|
|
1376
|
-
`,
|
|
1376
|
+
`,YVr=tVr`
|
|
1377
1377
|
from {
|
|
1378
1378
|
transform: translateY(0);
|
|
1379
1379
|
}
|
|
1380
1380
|
to {
|
|
1381
1381
|
transform: translateY(100%);
|
|
1382
1382
|
}
|
|
1383
|
-
`,
|
|
1383
|
+
`,XVr={Modal:U7(H7.div`
|
|
1384
1384
|
width: 100%;
|
|
1385
1385
|
height: 100%;
|
|
1386
1386
|
@media screen and (max-width: ${q7(`breakpoints.sm`)}) {
|
|
@@ -1395,7 +1395,7 @@ See https://s-c.sh/2BAXzed for more info.`),window[`__styled-components-init__`]
|
|
|
1395
1395
|
justify-content: center;
|
|
1396
1396
|
align-items: center;
|
|
1397
1397
|
z-index: 9999;
|
|
1398
|
-
animation: ${e=>e.show?
|
|
1398
|
+
animation: ${e=>e.show?JVr:YVr} 0.3s ease-in-out;
|
|
1399
1399
|
transform: translateY(${e=>e.show?`0`:`100%`});
|
|
1400
1400
|
${gd};
|
|
1401
1401
|
`),ModalContainer:U7(H7.div`
|
|
@@ -1433,15 +1433,15 @@ See https://s-c.sh/2BAXzed for more info.`),window[`__styled-components-init__`]
|
|
|
1433
1433
|
cursor: pointer;
|
|
1434
1434
|
}
|
|
1435
1435
|
${gd};
|
|
1436
|
-
`)};Ow();function
|
|
1436
|
+
`)};Ow();function ZVr(e){let{currentChurch:t}=YLr(),{origin:n}=window.location;return(0,q.jsx)(qVr,{source:t?.wordmarkLightUrl,padding:10,...e,href:n})}var QVr=(e={})=>{let[t,n]=wzr(),r=(0,S.useRef)(),i=(0,S.useRef)(),{id:a,navigate:o}=LVr();(0,S.useEffect)(()=>{a&&(n(_zr()),n(yzr(a))),a===null&&n(vzr())},[n,a]);function s(){n(vzr()),o()}return(0,S.useEffect)(()=>{let e=document.querySelector(`body`);e.style.overflow=t.isOpen?`hidden`:`auto`},[t.isOpen]),(0,S.useEffect)(()=>{t.content&&r.current&&r.current.scrollTo(0,0)},[t.content]),(0,S.useEffect)(()=>{r.current&&t.isOpen&&r.current.focus()},[r.current,t.isOpen]),(0,q.jsx)(J7,{children:(0,q.jsx)(XVr.Modal,{className:`apollos-modal`,show:t.isOpen,children:t.content?(0,q.jsx)(q.Fragment,{children:(0,q.jsxs)(XVr.ModalContainer,{ref:r,role:`dialog`,tabIndex:-1,"aria-dialog":!0,children:[(0,q.jsx)(J7,{width:`100%`,display:`flex`,mb:`base`,alignItems:`center`,justifyContent:`center`,flexDirection:{_:`column-reverse`,sm:`row`},maxWidth:{_:`100%`,xs:`70%`},children:(0,q.jsx)(ZVr,{display:`flex`,alignSelf:`center`,justifyContent:`center`,margin:`20px`,p:`s`,size:`60px`,className:`rounded-xl`,ref:i})}),(0,q.jsx)(J7,{width:{_:`100%`,sm:`10%`},mb:{_:`xs`,sm:`0`},ml:{_:`0`,sm:`xs`},display:`flex`,justifyContent:`flex-end`,alignItems:`center`,position:`absolute`,top:`xs`,right:`xs`,children:(0,q.jsx)(XVr.Icon,{onClick:s,onKeyDown:e=>{e.key===`Enter`&&s()},ml:{_:`auto`,sm:`0`},tabIndex:1,children:(0,q.jsx)(Dw,{size:16,weight:`bold`})})}),(0,q.jsxs)(J7,{width:`100%`,display:`flex`,mb:`base`,alignItems:`center`,justifyContent:`space-between`,flexDirection:{_:`column-reverse`,md:`row`},children:[(0,q.jsx)(J7,{width:{_:`0`,sm:`10%`}}),(0,q.jsx)(J7,{width:{_:`100%`,md:`700px`,lg:`750px`},mx:`auto`,justifyContent:`center`,alignItems:`center`,children:(0,q.jsx)(Kqr,{width:`100%`})}),(0,q.jsx)(J7,{width:{_:`0`,sm:`10%`}})]}),(0,q.jsx)(J7,{width:{_:`100%`,md:`750px`,lg:`1180px`},children:t.content})]})}):null})})};QVr.propTypes={..._d};var $Vr=QVr;sPe(),Net(),rcn(),Tmr(),bhr();var eHr=`80px`,tHr=`white`,nHr={Image:U7(H7.img`
|
|
1437
1437
|
resizemode: "contain";
|
|
1438
|
-
${({size:e,fill:t,theme:n})=>{let r=e||
|
|
1438
|
+
${({size:e,fill:t,theme:n})=>{let r=e||eHr;return B7`
|
|
1439
1439
|
width: ${r};
|
|
1440
1440
|
height: ${r};
|
|
1441
|
-
tintcolor: ${q7(`colors.${t}`)({theme:n})||t||
|
|
1441
|
+
tintcolor: ${q7(`colors.${t}`)({theme:n})||t||tHr};
|
|
1442
1442
|
`}};
|
|
1443
1443
|
${gd};
|
|
1444
|
-
`)};function $Vr({fill:e,size:t,padding:n,theme:r,source:i,...a}){return(0,q.jsx)(J7,{backgroundColor:r?.colors?.primary??``,...a,children:(0,q.jsx)(QVr.Image,{src:i||`./icon.png`,alt:`Logo`,size:t,fill:e})})}$Vr.propTypes={..._d,fill:K.default.string,size:K.default.number,source:K.default.string};var eHr=U7($Vr),tHr={x:0,y:0,width:0,height:0,unit:`px`},X7=(e,t,n)=>Math.min(Math.max(e,t),n),nHr=(...e)=>e.filter(e=>e&&typeof e==`string`).join(` `),rHr=(e,t)=>e===t||e.width===t.width&&e.height===t.height&&e.x===t.x&&e.y===t.y&&e.unit===t.unit;function iHr(e,t,n,r){let i=Q7(e,n,r);return e.width&&(i.height=i.width/t),e.height&&(i.width=i.height*t),i.y+i.height>r&&(i.height=r-i.y,i.width=i.height*t),i.x+i.width>n&&(i.width=n-i.x,i.height=i.width/t),e.unit===`%`?Z7(i,n,r):i}function aHr(e,t,n){let r=Q7(e,t,n);return r.x=(t-r.width)/2,r.y=(n-r.height)/2,e.unit===`%`?Z7(r,t,n):r}function Z7(e,t,n){return e.unit===`%`?{...tHr,...e,unit:`%`}:{unit:`%`,x:e.x?e.x/t*100:0,y:e.y?e.y/n*100:0,width:e.width?e.width/t*100:0,height:e.height?e.height/n*100:0}}function Q7(e,t,n){return e.unit?e.unit===`px`?{...tHr,...e,unit:`px`}:{unit:`px`,x:e.x?e.x*t/100:0,y:e.y?e.y*n/100:0,width:e.width?e.width*t/100:0,height:e.height?e.height*n/100:0}:{...tHr,...e,unit:`px`}}function oHr(e,t,n,r,i,a=0,o=0,s=r,c=i){let l={...e},u=Math.min(a,r),d=Math.min(o,i),f=Math.min(s,r),p=Math.min(c,i);t&&(t>1?(u=o?o*t:u,d=u/t,f=s*t):(d=a?a/t:d,u=d*t,p=c/t)),l.y<0&&(l.height=Math.max(l.height+l.y,d),l.y=0),l.x<0&&(l.width=Math.max(l.width+l.x,u),l.x=0);let m=r-(l.x+l.width);m<0&&(l.x=Math.min(l.x,r-u),l.width+=m);let h=i-(l.y+l.height);if(h<0&&(l.y=Math.min(l.y,i-d),l.height+=h),l.width<u&&((n===`sw`||n==`nw`)&&(l.x-=u-l.width),l.width=u),l.height<d&&((n===`nw`||n==`ne`)&&(l.y-=d-l.height),l.height=d),l.width>f&&((n===`sw`||n==`nw`)&&(l.x-=f-l.width),l.width=f),l.height>p&&((n===`nw`||n==`ne`)&&(l.y-=p-l.height),l.height=p),t){let e=l.width/l.height;if(e<t){let e=Math.max(l.width/t,d);(n===`nw`||n==`ne`)&&(l.y-=e-l.height),l.height=e}else if(e>t){let e=Math.max(l.height*t,u);(n===`sw`||n==`nw`)&&(l.x-=e-l.width),l.width=e}}return l}function sHr(e,t,n,r){let i={...e};return t===`ArrowLeft`?r===`nw`?(i.x-=n,i.y-=n,i.width+=n,i.height+=n):r===`w`?(i.x-=n,i.width+=n):r===`sw`?(i.x-=n,i.width+=n,i.height+=n):r===`ne`?(i.y+=n,i.width-=n,i.height-=n):r===`e`?i.width-=n:r===`se`&&(i.width-=n,i.height-=n):t===`ArrowRight`&&(r===`nw`?(i.x+=n,i.y+=n,i.width-=n,i.height-=n):r===`w`?(i.x+=n,i.width-=n):r===`sw`?(i.x+=n,i.width-=n,i.height-=n):r===`ne`?(i.y-=n,i.width+=n,i.height+=n):r===`e`?i.width+=n:r===`se`&&(i.width+=n,i.height+=n)),t===`ArrowUp`?r===`nw`?(i.x-=n,i.y-=n,i.width+=n,i.height+=n):r===`n`?(i.y-=n,i.height+=n):r===`ne`?(i.y-=n,i.width+=n,i.height+=n):r===`sw`?(i.x+=n,i.width-=n,i.height-=n):r===`s`?i.height-=n:r===`se`&&(i.width-=n,i.height-=n):t===`ArrowDown`&&(r===`nw`?(i.x+=n,i.y+=n,i.width-=n,i.height-=n):r===`n`?(i.y+=n,i.height-=n):r===`ne`?(i.y+=n,i.width-=n,i.height-=n):r===`sw`?(i.x-=n,i.width+=n,i.height+=n):r===`s`?i.height+=n:r===`se`&&(i.width+=n,i.height+=n)),i}var $7={capture:!0,passive:!1},e9=class e extends S.PureComponent{constructor(){super(...arguments),this.docMoveBound=!1,this.mouseDownOnCrop=!1,this.dragStarted=!1,this.evData={startClientX:0,startClientY:0,startCropX:0,startCropY:0,clientX:0,clientY:0,isResize:!0},this.componentRef=(0,S.createRef)(),this.mediaRef=(0,S.createRef)(),this.initChangeCalled=!1,this.state={cropIsActive:!1,newCropIsBeingDrawn:!1},this.onCropPointerDown=e=>{let{crop:t,disabled:n}=this.props,r=this.getBox();if(!t)return;let i=Q7(t,r.width,r.height);if(n)return;e.cancelable&&e.preventDefault(),this.bindDocMove(),this.componentRef.current.focus({preventScroll:!0});let a=e.target.dataset.ord,o=!!a,s=e.clientX,c=e.clientY,l=i.x,u=i.y;if(a){let t=e.clientX-r.x,n=e.clientY-r.y,o=0,d=0;a===`ne`||a==`e`?(o=t-(i.x+i.width),d=n-i.y,l=i.x,u=i.y+i.height):a===`se`||a===`s`?(o=t-(i.x+i.width),d=n-(i.y+i.height),l=i.x,u=i.y):a===`sw`||a==`w`?(o=t-i.x,d=n-(i.y+i.height),l=i.x+i.width,u=i.y):(a===`nw`||a==`n`)&&(o=t-i.x,d=n-i.y,l=i.x+i.width,u=i.y+i.height),s=l+r.x+o,c=u+r.y+d}this.evData={startClientX:s,startClientY:c,startCropX:l,startCropY:u,clientX:e.clientX,clientY:e.clientY,isResize:o,ord:a},this.mouseDownOnCrop=!0,this.setState({cropIsActive:!0})},this.onComponentPointerDown=e=>{let{crop:t,disabled:n,locked:r,keepSelection:i,onChange:a}=this.props,o=this.getBox();if(n||r||i&&t)return;e.cancelable&&e.preventDefault(),this.bindDocMove(),this.componentRef.current.focus({preventScroll:!0});let s=e.clientX-o.x,c=e.clientY-o.y,l={unit:`px`,x:s,y:c,width:0,height:0};this.evData={startClientX:e.clientX,startClientY:e.clientY,startCropX:s,startCropY:c,clientX:e.clientX,clientY:e.clientY,isResize:!0},this.mouseDownOnCrop=!0,a(Q7(l,o.width,o.height),Z7(l,o.width,o.height)),this.setState({cropIsActive:!0,newCropIsBeingDrawn:!0})},this.onDocPointerMove=e=>{let{crop:t,disabled:n,onChange:r,onDragStart:i}=this.props,a=this.getBox();if(n||!t||!this.mouseDownOnCrop)return;e.cancelable&&e.preventDefault(),this.dragStarted||(this.dragStarted=!0,i&&i(e));let{evData:o}=this;o.clientX=e.clientX,o.clientY=e.clientY;let s;s=o.isResize?this.resizeCrop():this.dragCrop(),rHr(t,s)||r(Q7(s,a.width,a.height),Z7(s,a.width,a.height))},this.onComponentKeyDown=t=>{let{crop:n,disabled:r,onChange:i,onComplete:a}=this.props;if(r)return;let o=t.key,s=!1;if(!n)return;let c=this.getBox(),l=this.makePixelCrop(c),u=(navigator.platform.match(`Mac`)?t.metaKey:t.ctrlKey)?e.nudgeStepLarge:t.shiftKey?e.nudgeStepMedium:e.nudgeStep;if(o===`ArrowLeft`?(l.x-=u,s=!0):o===`ArrowRight`?(l.x+=u,s=!0):o===`ArrowUp`?(l.y-=u,s=!0):o===`ArrowDown`&&(l.y+=u,s=!0),s){t.cancelable&&t.preventDefault(),l.x=X7(l.x,0,c.width-l.width),l.y=X7(l.y,0,c.height-l.height);let e=Q7(l,c.width,c.height),n=Z7(l,c.width,c.height);i(e,n),a&&a(e,n)}},this.onHandlerKeyDown=(t,n)=>{let{aspect:r=0,crop:i,disabled:a,minWidth:o=0,minHeight:s=0,maxWidth:c,maxHeight:l,onChange:u,onComplete:d}=this.props,f=this.getBox();if(a||!i)return;if(t.key===`ArrowUp`||t.key===`ArrowDown`||t.key===`ArrowLeft`||t.key===`ArrowRight`)t.stopPropagation(),t.preventDefault();else return;let p=(navigator.platform.match(`Mac`)?t.metaKey:t.ctrlKey)?e.nudgeStepLarge:t.shiftKey?e.nudgeStepMedium:e.nudgeStep,m=oHr(sHr(Q7(i,f.width,f.height),t.key,p,n),r,n,f.width,f.height,o,s,c,l);if(!rHr(i,m)){let e=Z7(m,f.width,f.height);u(m,e),d&&d(m,e)}},this.onDocPointerDone=e=>{let{crop:t,disabled:n,onComplete:r,onDragEnd:i}=this.props,a=this.getBox();this.unbindDocMove(),!n&&t&&this.mouseDownOnCrop&&(this.mouseDownOnCrop=!1,this.dragStarted=!1,i&&i(e),r&&r(Q7(t,a.width,a.height),Z7(t,a.width,a.height)),this.setState({cropIsActive:!1,newCropIsBeingDrawn:!1}))},this.onDragFocus=e=>{var t;(t=this.componentRef.current)==null||t.scrollTo(0,0)}}get document(){return document}getBox(){let e=this.mediaRef.current;if(!e)return{x:0,y:0,width:0,height:0};let{x:t,y:n,width:r,height:i}=e.getBoundingClientRect();return{x:t,y:n,width:r,height:i}}componentDidUpdate(e){let{crop:t,onComplete:n}=this.props;if(n&&!e.crop&&t){let{width:e,height:r}=this.getBox();e&&r&&n(Q7(t,e,r),Z7(t,e,r))}}componentWillUnmount(){this.resizeObserver&&this.resizeObserver.disconnect()}bindDocMove(){this.docMoveBound||=(this.document.addEventListener(`pointermove`,this.onDocPointerMove,$7),this.document.addEventListener(`pointerup`,this.onDocPointerDone,$7),this.document.addEventListener(`pointercancel`,this.onDocPointerDone,$7),!0)}unbindDocMove(){this.docMoveBound&&=(this.document.removeEventListener(`pointermove`,this.onDocPointerMove,$7),this.document.removeEventListener(`pointerup`,this.onDocPointerDone,$7),this.document.removeEventListener(`pointercancel`,this.onDocPointerDone,$7),!1)}getCropStyle(){let{crop:e}=this.props;if(e)return{top:`${e.y}${e.unit}`,left:`${e.x}${e.unit}`,width:`${e.width}${e.unit}`,height:`${e.height}${e.unit}`}}dragCrop(){let{evData:e}=this,t=this.getBox(),n=this.makePixelCrop(t),r=e.clientX-e.startClientX,i=e.clientY-e.startClientY;return n.x=X7(e.startCropX+r,0,t.width-n.width),n.y=X7(e.startCropY+i,0,t.height-n.height),n}getPointRegion(e,t,n,r){let{evData:i}=this,a=i.clientX-e.x,o=i.clientY-e.y,s;s=r&&t?t===`nw`||t===`n`||t===`ne`:o<i.startCropY;let c;return c=n&&t?t===`nw`||t===`w`||t===`sw`:a<i.startCropX,c?s?`nw`:`sw`:s?`ne`:`se`}resolveMinDimensions(e,t,n=0,r=0){let i=Math.min(n,e.width),a=Math.min(r,e.height);return!t||!i&&!a?[i,a]:t>1?i?[i,i/t]:[a*t,a]:a?[a*t,a]:[i,i/t]}resizeCrop(){let{evData:t}=this,{aspect:n=0,maxWidth:r,maxHeight:i}=this.props,a=this.getBox(),[o,s]=this.resolveMinDimensions(a,n,this.props.minWidth,this.props.minHeight),c=this.makePixelCrop(a),l=this.getPointRegion(a,t.ord,o,s),u=t.ord||l,d=t.clientX-t.startClientX,f=t.clientY-t.startClientY;(o&&u===`nw`||u===`w`||u===`sw`)&&(d=Math.min(d,-o)),(s&&u===`nw`||u===`n`||u===`ne`)&&(f=Math.min(f,-s));let p={unit:`px`,x:0,y:0,width:0,height:0};l===`ne`?(p.x=t.startCropX,p.width=d,n?(p.height=p.width/n,p.y=t.startCropY-p.height):(p.height=Math.abs(f),p.y=t.startCropY-p.height)):l===`se`?(p.x=t.startCropX,p.y=t.startCropY,p.width=d,p.height=n?p.width/n:f):l===`sw`?(p.x=t.startCropX+d,p.y=t.startCropY,p.width=Math.abs(d),p.height=n?p.width/n:f):l===`nw`&&(p.x=t.startCropX+d,p.width=Math.abs(d),n?(p.height=p.width/n,p.y=t.startCropY-p.height):(p.height=Math.abs(f),p.y=t.startCropY+f));let m=oHr(p,n,l,a.width,a.height,o,s,r,i);return n||e.xyOrds.indexOf(u)>-1?c=m:e.xOrds.indexOf(u)>-1?(c.x=m.x,c.width=m.width):e.yOrds.indexOf(u)>-1&&(c.y=m.y,c.height=m.height),c.x=X7(c.x,0,a.width-c.width),c.y=X7(c.y,0,a.height-c.height),c}createCropSelection(){let{ariaLabels:t=e.defaultProps.ariaLabels,disabled:n,locked:r,renderSelectionAddon:i,ruleOfThirds:a,crop:o}=this.props,s=this.getCropStyle();if(o)return S.createElement(`div`,{style:s,className:`ReactCrop__crop-selection`,onPointerDown:this.onCropPointerDown,"aria-label":t.cropArea,tabIndex:0,onKeyDown:this.onComponentKeyDown,role:`group`},!n&&!r&&S.createElement(`div`,{className:`ReactCrop__drag-elements`,onFocus:this.onDragFocus},S.createElement(`div`,{className:`ReactCrop__drag-bar ord-n`,"data-ord":`n`}),S.createElement(`div`,{className:`ReactCrop__drag-bar ord-e`,"data-ord":`e`}),S.createElement(`div`,{className:`ReactCrop__drag-bar ord-s`,"data-ord":`s`}),S.createElement(`div`,{className:`ReactCrop__drag-bar ord-w`,"data-ord":`w`}),S.createElement(`div`,{className:`ReactCrop__drag-handle ord-nw`,"data-ord":`nw`,tabIndex:0,"aria-label":t.nwDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,`nw`),role:`button`}),S.createElement(`div`,{className:`ReactCrop__drag-handle ord-n`,"data-ord":`n`,tabIndex:0,"aria-label":t.nDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,`n`),role:`button`}),S.createElement(`div`,{className:`ReactCrop__drag-handle ord-ne`,"data-ord":`ne`,tabIndex:0,"aria-label":t.neDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,`ne`),role:`button`}),S.createElement(`div`,{className:`ReactCrop__drag-handle ord-e`,"data-ord":`e`,tabIndex:0,"aria-label":t.eDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,`e`),role:`button`}),S.createElement(`div`,{className:`ReactCrop__drag-handle ord-se`,"data-ord":`se`,tabIndex:0,"aria-label":t.seDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,`se`),role:`button`}),S.createElement(`div`,{className:`ReactCrop__drag-handle ord-s`,"data-ord":`s`,tabIndex:0,"aria-label":t.sDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,`s`),role:`button`}),S.createElement(`div`,{className:`ReactCrop__drag-handle ord-sw`,"data-ord":`sw`,tabIndex:0,"aria-label":t.swDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,`sw`),role:`button`}),S.createElement(`div`,{className:`ReactCrop__drag-handle ord-w`,"data-ord":`w`,tabIndex:0,"aria-label":t.wDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,`w`),role:`button`})),i&&S.createElement(`div`,{className:`ReactCrop__selection-addon`,onMouseDown:e=>e.stopPropagation()},i(this.state)),a&&S.createElement(S.Fragment,null,S.createElement(`div`,{className:`ReactCrop__rule-of-thirds-hz`}),S.createElement(`div`,{className:`ReactCrop__rule-of-thirds-vt`})))}makePixelCrop(e){return Q7({...tHr,...this.props.crop||{}},e.width,e.height)}render(){let{aspect:e,children:t,circularCrop:n,className:r,crop:i,disabled:a,locked:o,style:s,ruleOfThirds:c}=this.props,{cropIsActive:l,newCropIsBeingDrawn:u}=this.state,d=i?this.createCropSelection():null,f=nHr(`ReactCrop`,r,l&&`ReactCrop--active`,a&&`ReactCrop--disabled`,o&&`ReactCrop--locked`,u&&`ReactCrop--new-crop`,i&&e&&`ReactCrop--fixed-aspect`,i&&n&&`ReactCrop--circular-crop`,i&&c&&`ReactCrop--rule-of-thirds`,!this.dragStarted&&i&&!i.width&&!i.height&&`ReactCrop--invisible-crop`,n&&`ReactCrop--no-animate`);return S.createElement(`div`,{ref:this.componentRef,className:f,style:s},S.createElement(`div`,{ref:this.mediaRef,className:`ReactCrop__child-wrapper`,onPointerDown:this.onComponentPointerDown},t),d)}};e9.xOrds=[`e`,`w`],e9.yOrds=[`n`,`s`],e9.xyOrds=[`nw`,`ne`,`se`,`sw`],e9.nudgeStep=1,e9.nudgeStepMedium=10,e9.nudgeStepLarge=100,e9.defaultProps={ariaLabels:{cropArea:`Use the arrow keys to move the crop selection area`,nwDragHandle:`Use the arrow keys to move the north west drag handle to change the crop selection area`,nDragHandle:`Use the up and down arrow keys to move the north drag handle to change the crop selection area`,neDragHandle:`Use the arrow keys to move the north east drag handle to change the crop selection area`,eDragHandle:`Use the up and down arrow keys to move the east drag handle to change the crop selection area`,seDragHandle:`Use the arrow keys to move the south east drag handle to change the crop selection area`,sDragHandle:`Use the up and down arrow keys to move the south drag handle to change the crop selection area`,swDragHandle:`Use the arrow keys to move the south west drag handle to change the crop selection area`,wDragHandle:`Use the up and down arrow keys to move the west drag handle to change the crop selection area`}};var cHr=e9,lHr=Math.PI/180;async function uHr(e,t,n,r=1,i=0){let a=t.getContext(`2d`);if(!a)throw Error(`No 2d context`);let o=e.naturalWidth/e.width,s=e.naturalHeight/e.height,c=window.devicePixelRatio;t.width=Math.floor(n.width*o*c),t.height=Math.floor(n.height*s*c),a.scale(c,c),a.imageSmoothingQuality=`high`;let l=n.x*o,u=n.y*s,d=i*lHr,f=e.naturalWidth/2,p=e.naturalHeight/2;a.save(),a.translate(-l,-u),a.translate(f,p),a.rotate(d),a.scale(r,r),a.translate(-f,-p),a.drawImage(e,0,0,e.naturalWidth,e.naturalHeight,0,0,e.naturalWidth,e.naturalHeight),a.restore()}function dHr(e,t,n){(0,S.useEffect)(()=>{let r=setTimeout(()=>{e.apply(void 0,n)},t);return()=>{clearTimeout(r)}},[e,n,t])}function fHr(e,t,n){return aHr(iHr({unit:`%`,width:90},n,e,t),e,t)}function pHr(e){let[t,n]=(0,S.useState)(`IDLE`),r=(0,S.useRef)(null),i=(0,S.useRef)(null),a=(0,S.useRef)(``),[o]=oRr(),[s,c]=(0,S.useState)(),[l,u]=(0,S.useState)(1);function d(t){if(l){let{width:n,height:r}=t.currentTarget;e.setCrop(fHr(n,r,l))}}function f(){if(!r.current)throw Error(`Crop canvas does not exist`);r.current.toBlob(async t=>{if(!t)throw Error(`Failed to create blob`);try{n(`LOADING`);let r=Math.round(t.size/1024),{data:i}=await o({variables:{file:t,size:r}}),a=i.uploadProfileImage.photo.uri;e.handleCloseImageUploader(),console.log(`Uploaded photo URI:`,a)}catch(e){console.error(`Failed to upload profile image:`,e)}finally{a.current&&URL.revokeObjectURL(a.current)}})}let p=e=>{e.preventDefault(),f()};dHr(async()=>{s?.width&&s?.height&&i.current&&r.current&&uHr(i.current,r.current,s)},100,[s]);let m=t===`LOADING`;return(0,q.jsxs)(`form`,{onSubmit:p,className:`ImageUploader`,children:[e.imgSrc?(0,q.jsxs)(J7,{mb:`base`,children:[(0,q.jsx)(K9,{mb:`xs`,children:`Crop your new profile picture`}),(0,q.jsx)(cHr,{crop:e.crop,onChange:(t,n)=>e.setCrop(n),onComplete:e=>c(e),aspect:l,children:(0,q.jsx)(`img`,{ref:i,alt:`Crop me`,src:e.imgSrc,onLoad:d})})]}):null,s?(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(J7,{display:`none`,children:(0,q.jsx)(`canvas`,{ref:r,style:{border:`1px solid black`,objectFit:`contain`,width:s.width,height:s.height}})}),(0,q.jsx)(J7,{justifyContent:`center`,display:`flex`,children:(0,q.jsx)(tw,{type:`submit`,surface:`solid`,disabled:!s||m,children:m?`Saving...`:`Set New Profile Image`})})]}):null]})}var mHr=U7(H7.div`
|
|
1444
|
+
`)};function rHr({fill:e,size:t,padding:n,theme:r,source:i,...a}){return(0,q.jsx)(J7,{backgroundColor:r?.colors?.primary??``,...a,children:(0,q.jsx)(nHr.Image,{src:i||`./icon.png`,alt:`Logo`,size:t,fill:e})})}rHr.propTypes={..._d,fill:K.default.string,size:K.default.number,source:K.default.string};var iHr=U7(rHr),aHr={x:0,y:0,width:0,height:0,unit:`px`},X7=(e,t,n)=>Math.min(Math.max(e,t),n),oHr=(...e)=>e.filter(e=>e&&typeof e==`string`).join(` `),sHr=(e,t)=>e===t||e.width===t.width&&e.height===t.height&&e.x===t.x&&e.y===t.y&&e.unit===t.unit;function cHr(e,t,n,r){let i=Q7(e,n,r);return e.width&&(i.height=i.width/t),e.height&&(i.width=i.height*t),i.y+i.height>r&&(i.height=r-i.y,i.width=i.height*t),i.x+i.width>n&&(i.width=n-i.x,i.height=i.width/t),e.unit===`%`?Z7(i,n,r):i}function lHr(e,t,n){let r=Q7(e,t,n);return r.x=(t-r.width)/2,r.y=(n-r.height)/2,e.unit===`%`?Z7(r,t,n):r}function Z7(e,t,n){return e.unit===`%`?{...aHr,...e,unit:`%`}:{unit:`%`,x:e.x?e.x/t*100:0,y:e.y?e.y/n*100:0,width:e.width?e.width/t*100:0,height:e.height?e.height/n*100:0}}function Q7(e,t,n){return e.unit?e.unit===`px`?{...aHr,...e,unit:`px`}:{unit:`px`,x:e.x?e.x*t/100:0,y:e.y?e.y*n/100:0,width:e.width?e.width*t/100:0,height:e.height?e.height*n/100:0}:{...aHr,...e,unit:`px`}}function uHr(e,t,n,r,i,a=0,o=0,s=r,c=i){let l={...e},u=Math.min(a,r),d=Math.min(o,i),f=Math.min(s,r),p=Math.min(c,i);t&&(t>1?(u=o?o*t:u,d=u/t,f=s*t):(d=a?a/t:d,u=d*t,p=c/t)),l.y<0&&(l.height=Math.max(l.height+l.y,d),l.y=0),l.x<0&&(l.width=Math.max(l.width+l.x,u),l.x=0);let m=r-(l.x+l.width);m<0&&(l.x=Math.min(l.x,r-u),l.width+=m);let h=i-(l.y+l.height);if(h<0&&(l.y=Math.min(l.y,i-d),l.height+=h),l.width<u&&((n===`sw`||n==`nw`)&&(l.x-=u-l.width),l.width=u),l.height<d&&((n===`nw`||n==`ne`)&&(l.y-=d-l.height),l.height=d),l.width>f&&((n===`sw`||n==`nw`)&&(l.x-=f-l.width),l.width=f),l.height>p&&((n===`nw`||n==`ne`)&&(l.y-=p-l.height),l.height=p),t){let e=l.width/l.height;if(e<t){let e=Math.max(l.width/t,d);(n===`nw`||n==`ne`)&&(l.y-=e-l.height),l.height=e}else if(e>t){let e=Math.max(l.height*t,u);(n===`sw`||n==`nw`)&&(l.x-=e-l.width),l.width=e}}return l}function dHr(e,t,n,r){let i={...e};return t===`ArrowLeft`?r===`nw`?(i.x-=n,i.y-=n,i.width+=n,i.height+=n):r===`w`?(i.x-=n,i.width+=n):r===`sw`?(i.x-=n,i.width+=n,i.height+=n):r===`ne`?(i.y+=n,i.width-=n,i.height-=n):r===`e`?i.width-=n:r===`se`&&(i.width-=n,i.height-=n):t===`ArrowRight`&&(r===`nw`?(i.x+=n,i.y+=n,i.width-=n,i.height-=n):r===`w`?(i.x+=n,i.width-=n):r===`sw`?(i.x+=n,i.width-=n,i.height-=n):r===`ne`?(i.y-=n,i.width+=n,i.height+=n):r===`e`?i.width+=n:r===`se`&&(i.width+=n,i.height+=n)),t===`ArrowUp`?r===`nw`?(i.x-=n,i.y-=n,i.width+=n,i.height+=n):r===`n`?(i.y-=n,i.height+=n):r===`ne`?(i.y-=n,i.width+=n,i.height+=n):r===`sw`?(i.x+=n,i.width-=n,i.height-=n):r===`s`?i.height-=n:r===`se`&&(i.width-=n,i.height-=n):t===`ArrowDown`&&(r===`nw`?(i.x+=n,i.y+=n,i.width-=n,i.height-=n):r===`n`?(i.y+=n,i.height-=n):r===`ne`?(i.y+=n,i.width-=n,i.height-=n):r===`sw`?(i.x-=n,i.width+=n,i.height+=n):r===`s`?i.height+=n:r===`se`&&(i.width+=n,i.height+=n)),i}var $7={capture:!0,passive:!1},e9=class e extends S.PureComponent{constructor(){super(...arguments),this.docMoveBound=!1,this.mouseDownOnCrop=!1,this.dragStarted=!1,this.evData={startClientX:0,startClientY:0,startCropX:0,startCropY:0,clientX:0,clientY:0,isResize:!0},this.componentRef=(0,S.createRef)(),this.mediaRef=(0,S.createRef)(),this.initChangeCalled=!1,this.state={cropIsActive:!1,newCropIsBeingDrawn:!1},this.onCropPointerDown=e=>{let{crop:t,disabled:n}=this.props,r=this.getBox();if(!t)return;let i=Q7(t,r.width,r.height);if(n)return;e.cancelable&&e.preventDefault(),this.bindDocMove(),this.componentRef.current.focus({preventScroll:!0});let a=e.target.dataset.ord,o=!!a,s=e.clientX,c=e.clientY,l=i.x,u=i.y;if(a){let t=e.clientX-r.x,n=e.clientY-r.y,o=0,d=0;a===`ne`||a==`e`?(o=t-(i.x+i.width),d=n-i.y,l=i.x,u=i.y+i.height):a===`se`||a===`s`?(o=t-(i.x+i.width),d=n-(i.y+i.height),l=i.x,u=i.y):a===`sw`||a==`w`?(o=t-i.x,d=n-(i.y+i.height),l=i.x+i.width,u=i.y):(a===`nw`||a==`n`)&&(o=t-i.x,d=n-i.y,l=i.x+i.width,u=i.y+i.height),s=l+r.x+o,c=u+r.y+d}this.evData={startClientX:s,startClientY:c,startCropX:l,startCropY:u,clientX:e.clientX,clientY:e.clientY,isResize:o,ord:a},this.mouseDownOnCrop=!0,this.setState({cropIsActive:!0})},this.onComponentPointerDown=e=>{let{crop:t,disabled:n,locked:r,keepSelection:i,onChange:a}=this.props,o=this.getBox();if(n||r||i&&t)return;e.cancelable&&e.preventDefault(),this.bindDocMove(),this.componentRef.current.focus({preventScroll:!0});let s=e.clientX-o.x,c=e.clientY-o.y,l={unit:`px`,x:s,y:c,width:0,height:0};this.evData={startClientX:e.clientX,startClientY:e.clientY,startCropX:s,startCropY:c,clientX:e.clientX,clientY:e.clientY,isResize:!0},this.mouseDownOnCrop=!0,a(Q7(l,o.width,o.height),Z7(l,o.width,o.height)),this.setState({cropIsActive:!0,newCropIsBeingDrawn:!0})},this.onDocPointerMove=e=>{let{crop:t,disabled:n,onChange:r,onDragStart:i}=this.props,a=this.getBox();if(n||!t||!this.mouseDownOnCrop)return;e.cancelable&&e.preventDefault(),this.dragStarted||(this.dragStarted=!0,i&&i(e));let{evData:o}=this;o.clientX=e.clientX,o.clientY=e.clientY;let s;s=o.isResize?this.resizeCrop():this.dragCrop(),sHr(t,s)||r(Q7(s,a.width,a.height),Z7(s,a.width,a.height))},this.onComponentKeyDown=t=>{let{crop:n,disabled:r,onChange:i,onComplete:a}=this.props;if(r)return;let o=t.key,s=!1;if(!n)return;let c=this.getBox(),l=this.makePixelCrop(c),u=(navigator.platform.match(`Mac`)?t.metaKey:t.ctrlKey)?e.nudgeStepLarge:t.shiftKey?e.nudgeStepMedium:e.nudgeStep;if(o===`ArrowLeft`?(l.x-=u,s=!0):o===`ArrowRight`?(l.x+=u,s=!0):o===`ArrowUp`?(l.y-=u,s=!0):o===`ArrowDown`&&(l.y+=u,s=!0),s){t.cancelable&&t.preventDefault(),l.x=X7(l.x,0,c.width-l.width),l.y=X7(l.y,0,c.height-l.height);let e=Q7(l,c.width,c.height),n=Z7(l,c.width,c.height);i(e,n),a&&a(e,n)}},this.onHandlerKeyDown=(t,n)=>{let{aspect:r=0,crop:i,disabled:a,minWidth:o=0,minHeight:s=0,maxWidth:c,maxHeight:l,onChange:u,onComplete:d}=this.props,f=this.getBox();if(a||!i)return;if(t.key===`ArrowUp`||t.key===`ArrowDown`||t.key===`ArrowLeft`||t.key===`ArrowRight`)t.stopPropagation(),t.preventDefault();else return;let p=(navigator.platform.match(`Mac`)?t.metaKey:t.ctrlKey)?e.nudgeStepLarge:t.shiftKey?e.nudgeStepMedium:e.nudgeStep,m=uHr(dHr(Q7(i,f.width,f.height),t.key,p,n),r,n,f.width,f.height,o,s,c,l);if(!sHr(i,m)){let e=Z7(m,f.width,f.height);u(m,e),d&&d(m,e)}},this.onDocPointerDone=e=>{let{crop:t,disabled:n,onComplete:r,onDragEnd:i}=this.props,a=this.getBox();this.unbindDocMove(),!n&&t&&this.mouseDownOnCrop&&(this.mouseDownOnCrop=!1,this.dragStarted=!1,i&&i(e),r&&r(Q7(t,a.width,a.height),Z7(t,a.width,a.height)),this.setState({cropIsActive:!1,newCropIsBeingDrawn:!1}))},this.onDragFocus=e=>{var t;(t=this.componentRef.current)==null||t.scrollTo(0,0)}}get document(){return document}getBox(){let e=this.mediaRef.current;if(!e)return{x:0,y:0,width:0,height:0};let{x:t,y:n,width:r,height:i}=e.getBoundingClientRect();return{x:t,y:n,width:r,height:i}}componentDidUpdate(e){let{crop:t,onComplete:n}=this.props;if(n&&!e.crop&&t){let{width:e,height:r}=this.getBox();e&&r&&n(Q7(t,e,r),Z7(t,e,r))}}componentWillUnmount(){this.resizeObserver&&this.resizeObserver.disconnect()}bindDocMove(){this.docMoveBound||=(this.document.addEventListener(`pointermove`,this.onDocPointerMove,$7),this.document.addEventListener(`pointerup`,this.onDocPointerDone,$7),this.document.addEventListener(`pointercancel`,this.onDocPointerDone,$7),!0)}unbindDocMove(){this.docMoveBound&&=(this.document.removeEventListener(`pointermove`,this.onDocPointerMove,$7),this.document.removeEventListener(`pointerup`,this.onDocPointerDone,$7),this.document.removeEventListener(`pointercancel`,this.onDocPointerDone,$7),!1)}getCropStyle(){let{crop:e}=this.props;if(e)return{top:`${e.y}${e.unit}`,left:`${e.x}${e.unit}`,width:`${e.width}${e.unit}`,height:`${e.height}${e.unit}`}}dragCrop(){let{evData:e}=this,t=this.getBox(),n=this.makePixelCrop(t),r=e.clientX-e.startClientX,i=e.clientY-e.startClientY;return n.x=X7(e.startCropX+r,0,t.width-n.width),n.y=X7(e.startCropY+i,0,t.height-n.height),n}getPointRegion(e,t,n,r){let{evData:i}=this,a=i.clientX-e.x,o=i.clientY-e.y,s;s=r&&t?t===`nw`||t===`n`||t===`ne`:o<i.startCropY;let c;return c=n&&t?t===`nw`||t===`w`||t===`sw`:a<i.startCropX,c?s?`nw`:`sw`:s?`ne`:`se`}resolveMinDimensions(e,t,n=0,r=0){let i=Math.min(n,e.width),a=Math.min(r,e.height);return!t||!i&&!a?[i,a]:t>1?i?[i,i/t]:[a*t,a]:a?[a*t,a]:[i,i/t]}resizeCrop(){let{evData:t}=this,{aspect:n=0,maxWidth:r,maxHeight:i}=this.props,a=this.getBox(),[o,s]=this.resolveMinDimensions(a,n,this.props.minWidth,this.props.minHeight),c=this.makePixelCrop(a),l=this.getPointRegion(a,t.ord,o,s),u=t.ord||l,d=t.clientX-t.startClientX,f=t.clientY-t.startClientY;(o&&u===`nw`||u===`w`||u===`sw`)&&(d=Math.min(d,-o)),(s&&u===`nw`||u===`n`||u===`ne`)&&(f=Math.min(f,-s));let p={unit:`px`,x:0,y:0,width:0,height:0};l===`ne`?(p.x=t.startCropX,p.width=d,n?(p.height=p.width/n,p.y=t.startCropY-p.height):(p.height=Math.abs(f),p.y=t.startCropY-p.height)):l===`se`?(p.x=t.startCropX,p.y=t.startCropY,p.width=d,p.height=n?p.width/n:f):l===`sw`?(p.x=t.startCropX+d,p.y=t.startCropY,p.width=Math.abs(d),p.height=n?p.width/n:f):l===`nw`&&(p.x=t.startCropX+d,p.width=Math.abs(d),n?(p.height=p.width/n,p.y=t.startCropY-p.height):(p.height=Math.abs(f),p.y=t.startCropY+f));let m=uHr(p,n,l,a.width,a.height,o,s,r,i);return n||e.xyOrds.indexOf(u)>-1?c=m:e.xOrds.indexOf(u)>-1?(c.x=m.x,c.width=m.width):e.yOrds.indexOf(u)>-1&&(c.y=m.y,c.height=m.height),c.x=X7(c.x,0,a.width-c.width),c.y=X7(c.y,0,a.height-c.height),c}createCropSelection(){let{ariaLabels:t=e.defaultProps.ariaLabels,disabled:n,locked:r,renderSelectionAddon:i,ruleOfThirds:a,crop:o}=this.props,s=this.getCropStyle();if(o)return S.createElement(`div`,{style:s,className:`ReactCrop__crop-selection`,onPointerDown:this.onCropPointerDown,"aria-label":t.cropArea,tabIndex:0,onKeyDown:this.onComponentKeyDown,role:`group`},!n&&!r&&S.createElement(`div`,{className:`ReactCrop__drag-elements`,onFocus:this.onDragFocus},S.createElement(`div`,{className:`ReactCrop__drag-bar ord-n`,"data-ord":`n`}),S.createElement(`div`,{className:`ReactCrop__drag-bar ord-e`,"data-ord":`e`}),S.createElement(`div`,{className:`ReactCrop__drag-bar ord-s`,"data-ord":`s`}),S.createElement(`div`,{className:`ReactCrop__drag-bar ord-w`,"data-ord":`w`}),S.createElement(`div`,{className:`ReactCrop__drag-handle ord-nw`,"data-ord":`nw`,tabIndex:0,"aria-label":t.nwDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,`nw`),role:`button`}),S.createElement(`div`,{className:`ReactCrop__drag-handle ord-n`,"data-ord":`n`,tabIndex:0,"aria-label":t.nDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,`n`),role:`button`}),S.createElement(`div`,{className:`ReactCrop__drag-handle ord-ne`,"data-ord":`ne`,tabIndex:0,"aria-label":t.neDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,`ne`),role:`button`}),S.createElement(`div`,{className:`ReactCrop__drag-handle ord-e`,"data-ord":`e`,tabIndex:0,"aria-label":t.eDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,`e`),role:`button`}),S.createElement(`div`,{className:`ReactCrop__drag-handle ord-se`,"data-ord":`se`,tabIndex:0,"aria-label":t.seDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,`se`),role:`button`}),S.createElement(`div`,{className:`ReactCrop__drag-handle ord-s`,"data-ord":`s`,tabIndex:0,"aria-label":t.sDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,`s`),role:`button`}),S.createElement(`div`,{className:`ReactCrop__drag-handle ord-sw`,"data-ord":`sw`,tabIndex:0,"aria-label":t.swDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,`sw`),role:`button`}),S.createElement(`div`,{className:`ReactCrop__drag-handle ord-w`,"data-ord":`w`,tabIndex:0,"aria-label":t.wDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,`w`),role:`button`})),i&&S.createElement(`div`,{className:`ReactCrop__selection-addon`,onMouseDown:e=>e.stopPropagation()},i(this.state)),a&&S.createElement(S.Fragment,null,S.createElement(`div`,{className:`ReactCrop__rule-of-thirds-hz`}),S.createElement(`div`,{className:`ReactCrop__rule-of-thirds-vt`})))}makePixelCrop(e){return Q7({...aHr,...this.props.crop||{}},e.width,e.height)}render(){let{aspect:e,children:t,circularCrop:n,className:r,crop:i,disabled:a,locked:o,style:s,ruleOfThirds:c}=this.props,{cropIsActive:l,newCropIsBeingDrawn:u}=this.state,d=i?this.createCropSelection():null,f=oHr(`ReactCrop`,r,l&&`ReactCrop--active`,a&&`ReactCrop--disabled`,o&&`ReactCrop--locked`,u&&`ReactCrop--new-crop`,i&&e&&`ReactCrop--fixed-aspect`,i&&n&&`ReactCrop--circular-crop`,i&&c&&`ReactCrop--rule-of-thirds`,!this.dragStarted&&i&&!i.width&&!i.height&&`ReactCrop--invisible-crop`,n&&`ReactCrop--no-animate`);return S.createElement(`div`,{ref:this.componentRef,className:f,style:s},S.createElement(`div`,{ref:this.mediaRef,className:`ReactCrop__child-wrapper`,onPointerDown:this.onComponentPointerDown},t),d)}};e9.xOrds=[`e`,`w`],e9.yOrds=[`n`,`s`],e9.xyOrds=[`nw`,`ne`,`se`,`sw`],e9.nudgeStep=1,e9.nudgeStepMedium=10,e9.nudgeStepLarge=100,e9.defaultProps={ariaLabels:{cropArea:`Use the arrow keys to move the crop selection area`,nwDragHandle:`Use the arrow keys to move the north west drag handle to change the crop selection area`,nDragHandle:`Use the up and down arrow keys to move the north drag handle to change the crop selection area`,neDragHandle:`Use the arrow keys to move the north east drag handle to change the crop selection area`,eDragHandle:`Use the up and down arrow keys to move the east drag handle to change the crop selection area`,seDragHandle:`Use the arrow keys to move the south east drag handle to change the crop selection area`,sDragHandle:`Use the up and down arrow keys to move the south drag handle to change the crop selection area`,swDragHandle:`Use the arrow keys to move the south west drag handle to change the crop selection area`,wDragHandle:`Use the up and down arrow keys to move the west drag handle to change the crop selection area`}};var fHr=e9,pHr=Math.PI/180;async function mHr(e,t,n,r=1,i=0){let a=t.getContext(`2d`);if(!a)throw Error(`No 2d context`);let o=e.naturalWidth/e.width,s=e.naturalHeight/e.height,c=window.devicePixelRatio;t.width=Math.floor(n.width*o*c),t.height=Math.floor(n.height*s*c),a.scale(c,c),a.imageSmoothingQuality=`high`;let l=n.x*o,u=n.y*s,d=i*pHr,f=e.naturalWidth/2,p=e.naturalHeight/2;a.save(),a.translate(-l,-u),a.translate(f,p),a.rotate(d),a.scale(r,r),a.translate(-f,-p),a.drawImage(e,0,0,e.naturalWidth,e.naturalHeight,0,0,e.naturalWidth,e.naturalHeight),a.restore()}function hHr(e,t,n){(0,S.useEffect)(()=>{let r=setTimeout(()=>{e.apply(void 0,n)},t);return()=>{clearTimeout(r)}},[e,n,t])}function gHr(e,t,n){return lHr(cHr({unit:`%`,width:90},n,e,t),e,t)}function _Hr(e){let[t,n]=(0,S.useState)(`IDLE`),r=(0,S.useRef)(null),i=(0,S.useRef)(null),a=(0,S.useRef)(``),[o]=uRr(),[s,c]=(0,S.useState)(),[l,u]=(0,S.useState)(1);function d(t){if(l){let{width:n,height:r}=t.currentTarget;e.setCrop(gHr(n,r,l))}}function f(){if(!r.current)throw Error(`Crop canvas does not exist`);r.current.toBlob(async t=>{if(!t)throw Error(`Failed to create blob`);try{n(`LOADING`);let r=Math.round(t.size/1024),{data:i}=await o({variables:{file:t,size:r}}),a=i.uploadProfileImage.photo.uri;e.handleCloseImageUploader(),console.log(`Uploaded photo URI:`,a)}catch(e){console.error(`Failed to upload profile image:`,e)}finally{a.current&&URL.revokeObjectURL(a.current)}})}let p=e=>{e.preventDefault(),f()};hHr(async()=>{s?.width&&s?.height&&i.current&&r.current&&mHr(i.current,r.current,s)},100,[s]);let m=t===`LOADING`;return(0,q.jsxs)(`form`,{onSubmit:p,className:`ImageUploader`,children:[e.imgSrc?(0,q.jsxs)(J7,{mb:`base`,children:[(0,q.jsx)(K9,{mb:`xs`,children:`Crop your new profile picture`}),(0,q.jsx)(fHr,{crop:e.crop,onChange:(t,n)=>e.setCrop(n),onComplete:e=>c(e),aspect:l,children:(0,q.jsx)(`img`,{ref:i,alt:`Crop me`,src:e.imgSrc,onLoad:d})})]}):null,s?(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(J7,{display:`none`,children:(0,q.jsx)(`canvas`,{ref:r,style:{border:`1px solid black`,objectFit:`contain`,width:s.width,height:s.height}})}),(0,q.jsx)(J7,{justifyContent:`center`,display:`flex`,children:(0,q.jsx)(tw,{type:`submit`,surface:`solid`,disabled:!s||m,children:m?`Saving...`:`Set New Profile Image`})})]}):null]})}var vHr=U7(H7.div`
|
|
1445
1445
|
align-items: center;
|
|
1446
1446
|
display: flex;
|
|
1447
1447
|
justify-content: center;
|
|
@@ -1459,13 +1459,13 @@ See https://s-c.sh/2BAXzed for more info.`),window[`__styled-components-init__`]
|
|
|
1459
1459
|
}
|
|
1460
1460
|
|
|
1461
1461
|
${gd};
|
|
1462
|
-
`),
|
|
1462
|
+
`),yHr=U7(H7(sw)`
|
|
1463
1463
|
height: 100%;
|
|
1464
1464
|
border: 1px solid rgba(0, 0, 0, 0.1);
|
|
1465
1465
|
padding: ${q7(`space.xs`)};
|
|
1466
1466
|
box-sizing: border-box;
|
|
1467
1467
|
${gd};
|
|
1468
|
-
`),
|
|
1468
|
+
`),bHr={Profile:vHr,CloseIcon:U7(H7.div`
|
|
1469
1469
|
align-items: center;
|
|
1470
1470
|
border-radius: 50%;
|
|
1471
1471
|
display: flex;
|
|
@@ -1508,29 +1508,29 @@ See https://s-c.sh/2BAXzed for more info.`),window[`__styled-components-init__`]
|
|
|
1508
1508
|
justify-content: center;
|
|
1509
1509
|
align-items: center;
|
|
1510
1510
|
gap: ${q7(`space.s`)};
|
|
1511
|
-
`),ProfileCard:
|
|
1512
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
1513
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
1514
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
1515
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
1511
|
+
`),ProfileCard:yHr};function xHr({setShowDetails:e,...t}){let[n,r]=(0,S.useState)(`IDLE`),[i,a]=(0,S.useState)(null),{currentUser:o}=O7(),[s]=cRr();(0,S.useEffect)(()=>{r(`IDLE`),a(null)},[o]);let c=e=>{r(`ERROR`),a(e)},{values:l,handleSubmit:u,setFieldValue:d}=eRr(async()=>{r(`LOADING`);let t=Object.keys(l).map(e=>({field:yRr(e),value:l[e]}));try{await s({variables:{input:t}}),e(!1),r(`SUCCESS`)}catch(e){c(e),console.log(JSON.stringify(e))}}),f=n===`LOADING`;return(0,q.jsx)(J7,{id:`profileDetails`,children:(0,q.jsx)(`form`,{onSubmit:e=>{e.preventDefault(),u()},children:(0,q.jsxs)(J7,{mb:`l`,display:`flex`,flexDirection:`column`,children:[(0,q.jsx)(J7,{mb:`base`,children:(0,q.jsx)(yw,{id:`firstName`,placeholder:`First Name`,value:l.firstName||o?.profile?.firstName||``,onChange:e=>{d(`firstName`,e.target.value)},required:!0,error:i?.identity})}),(0,q.jsx)(J7,{mb:`xl`,children:(0,q.jsx)(yw,{id:`lastName`,placeholder:`Last Name`,value:l.lastName||o?.profile?.lastName||``,onChange:e=>{d(`lastName`,e.target.value)},required:!0,error:i?.identity})}),(0,q.jsx)(tw,{type:`submit`,surface:`solid`,disabled:!o||!(l.firstName||l.lastName)||f,children:f?`Saving`:`Save`})]})})})}xHr.propTypes={currentPerson:K.default.oneOfType([K.default.array,K.default.object])},nwe(),gOe(),vUe(),Ow();var SHr=({theme:e,handleCloseProfile:t,size:n,...r})=>{let{currentUser:i}=O7(),{currentChurch:a}=YLr(),[o,s]=Ky(),[c,l]=(0,S.useState)(!1),[u,d]=(0,S.useState)(!1),[f,p]=(0,S.useState)(``),[m,h]=(0,S.useState)(),[g,_]=(0,S.useState)(!1),[v,y]=(0,S.useState)(!1),b=(0,S.useRef)(null);(0,S.useEffect)(()=>{y(!0)},[]),(0,S.useEffect)(()=>{if(!c){let e=e=>{b.current&&!b.current.contains(e.target)&&(e.stopPropagation(),t())};return document.addEventListener(`mousedown`,e),()=>{document.removeEventListener(`mousedown`,e)}}});let x=()=>{l(!1),s(Gy())};function C(e){if(e.target.files&&e.target.files.length>0){h(void 0),_(!0);let t=new FileReader;t.addEventListener(`load`,()=>p(t.result?.toString()||``)),t.readAsDataURL(e.target.files[0])}}let w=()=>{_(!1),h(void 0),p(``)},{colors:T}=JSON.parse(a?.theme)||{};return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(bHr.Profile,{ref:b,...n?{right:`-15px;`}:{},style:{opacity:+!!v,transform:v?`translateY(0)`:`translateY(-10px)`,transition:`opacity 0.3s ease, transform 0.3s ease`},children:(0,q.jsxs)(bHr.ProfileCard,{className:`rounded-none sm:rounded-xxl`,width:{_:`100%`,sm:`350px`,md:`520px`},children:[(0,q.jsx)(J7,{display:`flex`,alignItems:`center`,justifyContent:`end`,children:(0,q.jsx)(tw,{title:`Close`,circular:!0,surface:`tinted`,onClick:t,children:(0,q.jsx)(Dw,{size:18,weight:`bold`})})}),(0,q.jsxs)(J7,{className:`flex items-center flex-col gap-1 pb-11`,children:[f&&g?(0,q.jsx)(_Hr,{crop:m,setCrop:h,imgSrc:f,handleCloseImageUploader:w}):null,f?null:(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(J7,{position:`relative`,children:[i?.profile?.photo?.uri?(0,q.jsx)(rw,{src:i?.profile?.photo?.uri,alt:`avatar`,className:`size-[72px]`}):(0,q.jsx)(J7,{color:`base.primary`,position:`relative`,children:(0,q.jsx)(yhr,{size:90,weight:`fill`,color:q7(`colors.base.primary`)({theme:e})})}),i?(0,q.jsx)(J7,{children:f?null:(0,q.jsxs)(bHr.UploadIcon,{children:[(0,q.jsx)(Met,{size:12,weight:`fill`,color:q7(`colors.base.white`)({theme:e})}),(0,q.jsx)(`input`,{type:`file`,accept:`image/*`,onChange:C})]})}):null]}),i?.profile?.firstName?(0,q.jsxs)(K9,{mt:`xxs`,children:[`Hey `,i?.profile?.firstName]}):null,!o.token&&!f?(0,q.jsxs)(tw,{title:`Sign up or Login`,surface:`tinted`,pill:!0,onClick:()=>l(!0),children:[`Sign up or Login`,(0,q.jsx)(hOe,{size:24})]}):null]})]}),o.token&&!u&&!f?(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(K9,{color:`text.secondary`,mb:`xs`,children:`My Profile`}),(0,q.jsx)(J7,{children:(0,q.jsx)(HVr,{onClick:()=>d(!0),leadingIcon:(0,q.jsx)(wmr,{size:18,weight:`fill`,color:q7(`colors.text.secondary`)({theme:e})}),title:`Personal Details`})}),(0,q.jsx)(J7,{mt:`s`,mb:`base`,children:(0,q.jsx)(HVr,{leadingIcon:(0,q.jsx)(_Ue,{size:18,weight:`fill`,color:q7(`colors.text.secondary`)({theme:e})}),onClick:x,title:`Logout`})})]}):null,u&&!f?(0,q.jsx)(xHr,{setShowDetails:d}):null,!u&&!f&&(a?.mobileAppStoreUrl||a?.mobilePlayStoreUrl)?(0,q.jsx)(q.Fragment,{children:(0,q.jsxs)(J7,{alignItems:`center`,display:`flex`,flexDirection:`column`,backgroundSize:`55%`,backgroundRepeat:`no-repeat`,backgroundPosition:`center 0`,backgroundImage:`linear-gradient(to top, white 0%, rgba(255, 255, 255, 0.85) 50%, rgba(255, 255, 255, 0) 100%), url('https://apollos-production-images.s3.us-east-1.amazonaws.com/hwwbvfvlv/image/upload/v1733759363/Apollos%2520Admin/New%20Embeds%20Assets/iphone-frame_yydnl6.png')`,className:`mt-7`,children:[(0,q.jsxs)(J7,{backgroundColor:`base.primary`,className:`mb-4 mt-16 overflow-hidden flex justify-center items-center rounded-xl`,children:[` `,(0,q.jsx)(iHr,{source:a?.logo,...T?.iconBackground?{backgroundColor:T?.iconBackground}:{}})]}),(0,q.jsx)(K9,{mb:`xxs`,children:r.adTitle||`Stay Connected`}),(0,q.jsx)(uw,{fg:`primary`,className:`text-sm text-center max-w-64 mb-8`,children:r.adBody||`Explore your faith and build daily habits with our online community.`}),(0,q.jsxs)(bHr.AppLinks,{children:[a?.mobileAppStoreUrl?(0,q.jsx)(`a`,{href:a?.mobileAppStoreUrl,children:(0,q.jsxs)(tw,{pill:!0,surface:`system`,className:`!text-sm !px-2.5 !py-1 text-fg-secondary dark:text-fg-secondary-dark`,children:[`Get it on iOS`,(0,q.jsx)(twe,{weight:`fill`,size:`24`})]})}):null,a?.mobilePlayStoreUrl?(0,q.jsx)(`a`,{href:a?.mobilePlayStoreUrl,children:(0,q.jsxs)(tw,{pill:!0,surface:`system`,className:`!text-sm !px-2.5 !py-1 text-fg-secondary dark:text-fg-secondary-dark`,children:[`Get it on Android`,(0,q.jsx)(oPe,{weight:`fill`,size:`24`})]})}):null]})]})}):null]})}),c&&o.step!==Ry.Success?(0,q.jsx)(PVr,{onClose:()=>l(!1)}):null]})};SHr.propTypes={..._d};var CHr=U7(SHr);Tmr();var wHr=e=>{let[t,n]=(0,S.useState)(!1),{currentUser:r}=O7();return(0,q.jsxs)(J7,{position:`relative`,children:[(0,q.jsx)(J7,{onClick:()=>{n(!t)},cursor:`pointer`,children:r?.profile?.photo?.uri?(0,q.jsx)(rw,{src:r?.profile?.photo?.uri,className:`size-[30px]`,alt:`avatar`}):(0,q.jsx)(J7,{backgroundColor:`fill.system`,height:30,width:30,alignItems:`center`,justifyContent:`center`,display:`flex`,color:`text.secondary`,className:`rounded-full`,children:(0,q.jsx)(wmr,{size:16,weight:`bold`})})}),t?(0,q.jsx)(CHr,{handleCloseProfile:()=>n(!1),size:e.popupSize}):null]})};function THr(e){return{current:e}}function EHr(e,t){var n=void 0;return function(){for(var r=arguments.length,i=Array(r),a=0;a<r;a++)i[a]=arguments[a];n&&clearTimeout(n),n=setTimeout(function(){return e.apply(void 0,i)},t)}}function DHr(e,t){return MHr(e)||jHr(e,t)||kHr(e,t)||OHr()}function OHr(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
1512
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function kHr(e,t){if(e){if(typeof e==`string`)return AHr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return AHr(e,t)}}function AHr(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function jHr(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function MHr(e){if(Array.isArray(e))return e}function NHr(e){"@babel/helpers - typeof";return NHr=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},NHr(e)}function PHr(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:new Set;if(process.env.NODE_ENV===`production`||!e||NHr(e)!==`object`)return e;if(t.has(e))return`[Circular]`;var n=t.add(e);return Array.isArray(e)?e.map(function(e){return PHr(e,n)}):Object.fromEntries(Object.entries(e).map(function(e){var t=DHr(e,2),r=t[0],i=t[1];return[r,PHr(i,n)]}))}function t9(e){return e.reduce(function(e,t){return e.concat(t)},[])}var FHr=0;function IHr(){return`autocomplete-${FHr++}`}function LHr(e,t){return t.reduce(function(e,t){return e&&e[t]},e)}function RHr(e){return e.collections.length===0?0:e.collections.reduce(function(e,t){return e+t.items.length},0)}function n9(e,t){if(process.env.NODE_ENV!==`production`&&!e)throw Error(`[Autocomplete] ${typeof t==`function`?t():t}`)}function zHr(e){return e!==Object(e)}function BHr(e,t){if(e===t)return!0;if(zHr(e)||zHr(t)||typeof e==`function`||typeof t==`function`)return e===t;if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n=0,r=Object.keys(e);n<r.length;n++){var i=r[n];if(!(i in t)||!BHr(e[i],t[i]))return!1}return!0}var VHr=function(){};function HHr(e){if(typeof window<`u`)return e({window})}var UHr=`1.17.6`,WHr=[{segment:`autocomplete-core`,version:UHr}],GHr={current:{}};function KHr(e,t){if(process.env.NODE_ENV!==`production`&&!e){var n=t.trim();GHr.current[n]||(GHr.current[n]=!0,console.warn(`[Autocomplete] ${n}`))}}function qHr(e){var t=e.item,n=e.items,r=n===void 0?[]:n;return{index:t.__autocomplete_indexName,items:[t],positions:[1+r.findIndex(function(e){return e.objectID===t.objectID})],queryID:t.__autocomplete_queryID,algoliaSource:[`autocomplete`]}}function JHr(e,t){return $Hr(e)||QHr(e,t)||XHr(e,t)||YHr()}function YHr(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
1513
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function XHr(e,t){if(e){if(typeof e==`string`)return ZHr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ZHr(e,t)}}function ZHr(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function QHr(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function $Hr(e){if(Array.isArray(e))return e}function eUr(e){var t=JHr((e.version||``).split(`.`).map(Number),2),n=t[0],r=t[1];return n>=3||n===2&&r>=4||n===1&&r>=10}var tUr=[`items`],nUr=[`items`];function r9(e){"@babel/helpers - typeof";return r9=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},r9(e)}function rUr(e){return sUr(e)||oUr(e)||aUr(e)||iUr()}function iUr(){throw TypeError(`Invalid attempt to spread non-iterable instance.
|
|
1514
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function aUr(e,t){if(e){if(typeof e==`string`)return cUr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return cUr(e,t)}}function oUr(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function sUr(e){if(Array.isArray(e))return cUr(e)}function cUr(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function lUr(e,t){if(e==null)return{};var n=uUr(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function uUr(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],t.indexOf(i)>=0||(n[i]=e[i]);return n}function dUr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function i9(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?dUr(Object(n),!0).forEach(function(t){fUr(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):dUr(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function fUr(e,t,n){return t=pUr(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pUr(e){var t=mUr(e,`string`);return r9(t)===`symbol`?t:String(t)}function mUr(e,t){if(r9(e)!==`object`||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(r9(r)!==`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function hUr(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:20,n=[],r=0;r<e.objectIDs.length;r+=t)n.push(i9(i9({},e),{},{objectIDs:e.objectIDs.slice(r,r+t)}));return n}function gUr(e){return e.map(function(e){var t=e.items,n=lUr(e,tUr);return i9(i9({},n),{},{objectIDs:t?.map(function(e){return e.objectID})||n.objectIDs})})}function _Ur(e){var t=eUr(e);function n(n,r,i){if(t&&i!==void 0){var a=i[0].__autocomplete_algoliaCredentials,o={"X-Algolia-Application-Id":a.appId,"X-Algolia-API-Key":a.apiKey};e.apply(void 0,[n].concat(rUr(r),[{headers:o}]))}else e.apply(void 0,[n].concat(rUr(r)))}return{init:function(t,n){e(`init`,{appId:t,apiKey:n})},setAuthenticatedUserToken:function(t){e(`setAuthenticatedUserToken`,t)},setUserToken:function(t){e(`setUserToken`,t)},clickedObjectIDsAfterSearch:function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];t.length>0&&n(`clickedObjectIDsAfterSearch`,gUr(t),t[0].items)},clickedObjectIDs:function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];t.length>0&&n(`clickedObjectIDs`,gUr(t),t[0].items)},clickedFilters:function(){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];n.length>0&&e.apply(void 0,[`clickedFilters`].concat(n))},convertedObjectIDsAfterSearch:function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];t.length>0&&n(`convertedObjectIDsAfterSearch`,gUr(t),t[0].items)},convertedObjectIDs:function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];t.length>0&&n(`convertedObjectIDs`,gUr(t),t[0].items)},convertedFilters:function(){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];n.length>0&&e.apply(void 0,[`convertedFilters`].concat(n))},viewedObjectIDs:function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];t.length>0&&t.reduce(function(e,t){var n=t.items,r=lUr(t,nUr);return[].concat(rUr(e),rUr(hUr(i9(i9({},r),{},{objectIDs:n?.map(function(e){return e.objectID})||r.objectIDs})).map(function(e){return{items:n,payload:e}})))},[]).forEach(function(e){var t=e.items,r=e.payload;return n(`viewedObjectIDs`,[r],t)})},viewedFilters:function(){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];n.length>0&&e.apply(void 0,[`viewedFilters`].concat(n))}}}function vUr(e){var t=e.items.reduce(function(e,t){return e[t.__autocomplete_indexName]=(e[t.__autocomplete_indexName]??[]).concat(t),e},{});return Object.keys(t).map(function(e){return{index:e,items:t[e],algoliaSource:[`autocomplete`]}})}function a9(e){return e.objectID&&e.__autocomplete_indexName&&e.__autocomplete_queryID}function o9(e){"@babel/helpers - typeof";return o9=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},o9(e)}function s9(e){return SUr(e)||xUr(e)||bUr(e)||yUr()}function yUr(){throw TypeError(`Invalid attempt to spread non-iterable instance.
|
|
1515
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function bUr(e,t){if(e){if(typeof e==`string`)return CUr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return CUr(e,t)}}function xUr(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function SUr(e){if(Array.isArray(e))return CUr(e)}function CUr(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function wUr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function c9(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?wUr(Object(n),!0).forEach(function(t){TUr(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wUr(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function TUr(e,t,n){return t=EUr(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function EUr(e){var t=DUr(e,`string`);return o9(t)===`symbol`?t:String(t)}function DUr(e,t){if(o9(e)!==`object`||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(o9(r)!==`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var OUr=400,kUr=`2.15.0`,AUr=`https://cdn.jsdelivr.net/npm/search-insights@${kUr}/dist/search-insights.min.js`,jUr=EHr(function(e){var t=e.onItemsChange,n=e.items,r=e.insights,i=e.state;t({insights:r,insightsEvents:vUr({items:n}).map(function(e){return c9({eventName:`Items Viewed`},e)}),state:i})},OUr);function MUr(e){var t=PUr(e),n=t.insightsClient,r=t.insightsInitParams,i=t.onItemsChange,a=t.onSelect,o=t.onActive,s=t.__autocomplete_clickAnalytics,c=n;if(n||HHr(function(e){var t=e.window,n=t.AlgoliaAnalyticsObject||`aa`;typeof n==`string`&&(c=t[n]),c||(t.AlgoliaAnalyticsObject=n,t[n]||(t[n]=function(){t[n].queue||(t[n].queue=[]);for(var e=arguments.length,r=Array(e),i=0;i<e;i++)r[i]=arguments[i];t[n].queue.push(r)}),t[n].version=kUr,c=t[n],FUr(t))}),!c)return{};r&&c(`init`,c9({partial:!0},r));var l=_Ur(c),u=THr([]),d=EHr(function(e){var t=e.state;if(t.isOpen){var n=t.collections.reduce(function(e,t){return[].concat(s9(e),s9(t.items))},[]).filter(a9);BHr(u.current.map(function(e){return e.objectID}),n.map(function(e){return e.objectID}))||(u.current=n,n.length>0&&jUr({onItemsChange:i,items:n,insights:l,state:t}))}},0);return{name:`aa.algoliaInsightsPlugin`,subscribe:function(e){var t=e.setContext,n=e.onSelect,r=e.onActive,i=!1;function u(e){t({algoliaInsightsPlugin:{__algoliaSearchParameters:c9(c9({},s?{clickAnalytics:!0}:{}),e?{userToken:IUr(e)}:{}),insights:l}})}c(`addAlgoliaAgent`,`insights-plugin`),u(),c(`onUserTokenChange`,function(e){i||u(e)}),c(`getUserToken`,null,function(e,t){i||u(t)}),c(`onAuthenticatedUserTokenChange`,function(e){e?(i=!0,u(e)):(i=!1,c(`getUserToken`,null,function(e,t){return u(t)}))}),c(`getAuthenticatedUserToken`,null,function(e,t){t&&(i=!0,u(t))}),n(function(e){var t=e.item,n=e.state,r=e.event,i=e.source;a9(t)&&a({state:n,event:r,insights:l,item:t,insightsEvents:[c9({eventName:`Item Selected`},qHr({item:t,items:i.getItems().filter(a9)}))]})}),r(function(e){var t=e.item,n=e.source,r=e.state,i=e.event;a9(t)&&o({state:r,event:i,insights:l,item:t,insightsEvents:[c9({eventName:`Item Active`},qHr({item:t,items:n.getItems().filter(a9)}))]})})},onStateChange:function(e){var t=e.state;d({state:t})},__autocomplete_pluginOptions:e}}function NUr(){var e,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=arguments.length>1?arguments[1]:void 0;return[].concat(s9(t),[`autocomplete-internal`],s9((e=n.algoliaInsightsPlugin)!=null&&e.__automaticInsights?[`autocomplete-automatic`]:[]))}function PUr(e){return c9({onItemsChange:function(e){var t=e.insights,n=e.insightsEvents,r=e.state;t.viewedObjectIDs.apply(t,s9(n.map(function(e){return c9(c9({},e),{},{algoliaSource:NUr(e.algoliaSource,r.context)})})))},onSelect:function(e){var t=e.insights,n=e.insightsEvents,r=e.state;t.clickedObjectIDsAfterSearch.apply(t,s9(n.map(function(e){return c9(c9({},e),{},{algoliaSource:NUr(e.algoliaSource,r.context)})})))},onActive:VHr,__autocomplete_clickAnalytics:!0},e)}function FUr(e){var t=`[Autocomplete]: Could not load search-insights.js. Please load it manually following https://alg.li/insights-autocomplete`;try{var n=e.document.createElement(`script`);n.async=!0,n.src=AUr,n.onerror=function(){console.error(t)},document.body.appendChild(n)}catch{console.error(t)}}function IUr(e){return typeof e==`number`?e.toString():e}function LUr(e){process.env.NODE_ENV!==`production`&&KHr(!e.debug,"The `debug` option is meant for development debugging and should not be used in production.")}function RUr(e,t){var n=t;return{then:function(t,r){return RUr(e.then(BUr(t,n,e),BUr(r,n,e)),n)},catch:function(t){return RUr(e.catch(BUr(t,n,e)),n)},finally:function(t){return t&&n.onCancelList.push(t),RUr(e.finally(BUr(t&&function(){return n.onCancelList=[],t()},n,e)),n)},cancel:function(){n.isCanceled=!0;var e=n.onCancelList;n.onCancelList=[],e.forEach(function(e){e()})},isCanceled:function(){return n.isCanceled===!0}}}function zUr(e){return RUr(e,{isCanceled:!1,onCancelList:[]})}function BUr(e,t,n){return e?function(n){return t.isCanceled?n:e(n)}:n}function VUr(){var e=[];return{add:function(t){return e.push(t),t.finally(function(){e=e.filter(function(e){return e!==t})})},cancelAll:function(){e.forEach(function(e){return e.cancel()})},isEmpty:function(){return e.length===0}}}function HUr(){var e=-1,t=-1,n=void 0;return function(r){e++;var i=e;return Promise.resolve(r).then(function(e){return n&&i<t?n:(t=i,n=e,e)})}}function UUr(e,t,n,r){if(!n)return null;if(e<0&&(t===null||r!==null&&t===0))return n+e;var i=(t===null?-1:t)+e;return i<=-1||i>=n?r===null?null:0:i}function WUr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function GUr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?WUr(Object(n),!0).forEach(function(t){KUr(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):WUr(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function KUr(e,t,n){return t=qUr(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qUr(e){var t=JUr(e,`string`);return l9(t)===`symbol`?t:String(t)}function JUr(e,t){if(l9(e)!==`object`||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(l9(r)!==`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function l9(e){"@babel/helpers - typeof";return l9=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},l9(e)}function YUr(e,t){var n=[];return Promise.resolve(e(t)).then(function(e){return n9(Array.isArray(e),function(){return`The \`getSources\` function must return an array of sources but returned type ${JSON.stringify(l9(e))}:
|
|
1516
1516
|
|
|
1517
|
-
${JSON.stringify(
|
|
1518
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
1519
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
1517
|
+
${JSON.stringify(PHr(e),null,2)}`}),Promise.all(e.filter(function(e){return!!e}).map(function(e){if(n9(typeof e.sourceId==`string`,"A source must provide a `sourceId` string."),n.includes(e.sourceId))throw Error(`[Autocomplete] The \`sourceId\` ${JSON.stringify(e.sourceId)} is not unique.`);n.push(e.sourceId);var t={getItemInputValue:function(e){return e.state.query},getItemUrl:function(){},onSelect:function(e){var t=e.setIsOpen;t(!1)},onActive:VHr,onResolve:VHr};Object.keys(t).forEach(function(e){t[e].__default=!0});var r=GUr(GUr({},t),e);return Promise.resolve(r)}))})}function XUr(e){var t=e.collections.map(function(e){return e.items.length}).reduce(function(e,t,n){var r=(e[n-1]||0)+t;return e.push(r),e},[]).reduce(function(t,n){return n<=e.activeItemId?t+1:t},0);return e.collections[t]}function ZUr(e){for(var t=e.state,n=e.collection,r=!1,i=0,a=0;r===!1;){var o=t.collections[i];if(o===n){r=!0;break}a+=o.items.length,i++}return t.activeItemId-a}function u9(e){var t=XUr(e);if(!t)return null;var n=t.items[ZUr({state:e,collection:t})],r=t.source;return{item:n,itemInputValue:r.getItemInputValue({item:n,state:e}),itemUrl:r.getItemUrl({item:n,state:e}),source:r}}function d9(e,t,n){return[e,n?.sourceId,t].filter(Boolean).join(`-`).replace(/\s/g,``)}function QUr(e,t){return e===t||e.contains(t)}var $Ur=/((gt|sm)-|galaxy nexus)|samsung[- ]|samsungbrowser/i;function eWr(e){return!!(e&&e.match($Ur))}function tWr(e){return{results:e,hits:e.map(function(e){return e.hits}).filter(Boolean),facetHits:e.map(function(e){return e.facetHits?.map(function(e){return{label:e.value,count:e.count,_highlightResult:{label:{value:e.highlighted}}}})}).filter(Boolean)}}function nWr(e){return e.nativeEvent||e}function f9(e){"@babel/helpers - typeof";return f9=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},f9(e)}function rWr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function iWr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?rWr(Object(n),!0).forEach(function(t){aWr(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rWr(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function aWr(e,t,n){return t=oWr(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function oWr(e){var t=sWr(e,`string`);return f9(t)===`symbol`?t:String(t)}function sWr(e,t){if(f9(e)!==`object`||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(f9(r)!==`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function cWr(e,t,n){var r=t.initialState;return{getState:function(){return r},dispatch:function(i,a){var o=iWr({},r);r=e(r,{type:i,props:t,payload:a}),n({state:r,prevState:o})},pendingRequests:VUr()}}function p9(e){"@babel/helpers - typeof";return p9=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},p9(e)}function lWr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function uWr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?lWr(Object(n),!0).forEach(function(t){dWr(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lWr(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function dWr(e,t,n){return t=fWr(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fWr(e){var t=pWr(e,`string`);return p9(t)===`symbol`?t:String(t)}function pWr(e,t){if(p9(e)!==`object`||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(p9(r)!==`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function mWr(e){var t=e.store;return{setActiveItemId:function(e){t.dispatch(`setActiveItemId`,e)},setQuery:function(e){t.dispatch(`setQuery`,e)},setCollections:function(e){var n=0,r=e.map(function(e){return uWr(uWr({},e),{},{items:t9(e.items).map(function(e){return uWr(uWr({},e),{},{__autocomplete_id:n++})})})});t.dispatch(`setCollections`,r)},setIsOpen:function(e){t.dispatch(`setIsOpen`,e)},setStatus:function(e){t.dispatch(`setStatus`,e)},setContext:function(e){t.dispatch(`setContext`,e)}}}function m9(e){"@babel/helpers - typeof";return m9=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},m9(e)}function hWr(e){return yWr(e)||vWr(e)||_Wr(e)||gWr()}function gWr(){throw TypeError(`Invalid attempt to spread non-iterable instance.
|
|
1518
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _Wr(e,t){if(e){if(typeof e==`string`)return bWr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return bWr(e,t)}}function vWr(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function yWr(e){if(Array.isArray(e))return bWr(e)}function bWr(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function xWr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function h9(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?xWr(Object(n),!0).forEach(function(t){SWr(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xWr(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function SWr(e,t,n){return t=CWr(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function CWr(e){var t=wWr(e,`string`);return m9(t)===`symbol`?t:String(t)}function wWr(e,t){if(m9(e)!==`object`||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(m9(r)!==`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function TWr(e,t){var n=typeof window<`u`?window:{},r=e.plugins||[];return h9(h9({debug:!1,openOnFocus:!1,enterKeyHint:void 0,ignoreCompositionEvents:!1,placeholder:``,autoFocus:!1,defaultActiveItemId:null,stallThreshold:300,insights:void 0,environment:n,shouldPanelOpen:function(e){var t=e.state;return RHr(t)>0},reshape:function(e){return e.sources}},e),{},{id:e.id??IHr(),plugins:r,initialState:h9({activeItemId:null,query:``,completion:null,collections:[],isOpen:!1,status:`idle`,context:{}},e.initialState),onStateChange:function(t){var n;(n=e.onStateChange)==null||n.call(e,t),r.forEach(function(e){return e.onStateChange?.call(e,t)})},onSubmit:function(t){var n;(n=e.onSubmit)==null||n.call(e,t),r.forEach(function(e){return e.onSubmit?.call(e,t)})},onReset:function(t){var n;(n=e.onReset)==null||n.call(e,t),r.forEach(function(e){return e.onReset?.call(e,t)})},getSources:function(n){return Promise.all([].concat(hWr(r.map(function(e){return e.getSources})),[e.getSources]).filter(Boolean).map(function(e){return YUr(e,n)})).then(function(e){return t9(e)}).then(function(e){return e.map(function(e){return h9(h9({},e),{},{onSelect:function(n){e.onSelect(n),t.forEach(function(e){return e.onSelect?.call(e,n)})},onActive:function(n){e.onActive(n),t.forEach(function(e){return e.onActive?.call(e,n)})},onResolve:function(n){e.onResolve(n),t.forEach(function(e){return e.onResolve?.call(e,n)})}})})})},navigator:h9({navigate:function(e){var t=e.itemUrl;n.location.assign(t)},navigateNewTab:function(e){var t=e.itemUrl;n.open(t,`_blank`,`noopener`)?.focus()},navigateNewWindow:function(e){var t=e.itemUrl;n.open(t,`_blank`,`noopener`)}},e.navigator)})}function g9(e){"@babel/helpers - typeof";return g9=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},g9(e)}function EWr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function DWr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?EWr(Object(n),!0).forEach(function(t){OWr(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):EWr(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function OWr(e,t,n){return t=kWr(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function kWr(e){var t=AWr(e,`string`);return g9(t)===`symbol`?t:String(t)}function AWr(e,t){if(g9(e)!==`object`||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(g9(r)!==`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function jWr(e){var t=e.collections,n=e.props,r=e.state,i=t.reduce(function(e,t){return DWr(DWr({},e),{},OWr({},t.source.sourceId,DWr(DWr({},t.source),{},{getItems:function(){return t9(t.items)}})))},{}),a=n.plugins.reduce(function(e,t){return t.reshape?t.reshape(e):e},{sourcesBySourceId:i,state:r}).sourcesBySourceId;return t9(n.reshape({sourcesBySourceId:a,sources:Object.values(a),state:r})).filter(Boolean).map(function(e){return{source:e,items:e.getItems()}})}function _9(e){"@babel/helpers - typeof";return _9=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},_9(e)}function MWr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function v9(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?MWr(Object(n),!0).forEach(function(t){NWr(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):MWr(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function NWr(e,t,n){return t=PWr(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function PWr(e){var t=FWr(e,`string`);return _9(t)===`symbol`?t:String(t)}function FWr(e,t){if(_9(e)!==`object`||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(_9(r)!==`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function IWr(e){return BWr(e)||zWr(e)||RWr(e)||LWr()}function LWr(){throw TypeError(`Invalid attempt to spread non-iterable instance.
|
|
1519
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function RWr(e,t){if(e){if(typeof e==`string`)return VWr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return VWr(e,t)}}function zWr(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function BWr(e){if(Array.isArray(e))return VWr(e)}function VWr(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function HWr(e){return!!e.execute}function UWr(e){return!!e?.execute}function WWr(e,t,n){if(UWr(e)){var r=e.requesterId===`algolia`?Object.assign.apply(Object,[{}].concat(IWr(Object.keys(n.context).map(function(e){return n.context[e]?.__algoliaSearchParameters})))):{};return v9(v9({},e),{},{requests:e.queries.map(function(n){return{query:e.requesterId===`algolia`?v9(v9({},n),{},{params:v9(v9({},r),n.params)}):n,sourceId:t,transformResponse:e.transformResponse}})})}return{items:e,sourceId:t}}function GWr(e){var t=e.reduce(function(e,t){if(!HWr(t))return e.push(t),e;var n=t.searchClient,r=t.execute,i=t.requesterId,a=t.requests,o=e.find(function(e){return HWr(t)&&HWr(e)&&e.searchClient===n&&!!i&&e.requesterId===i});if(o){var s;(s=o.items).push.apply(s,IWr(a))}else{var c={execute:r,requesterId:i,items:a,searchClient:n};e.push(c)}return e},[]).map(function(e){if(!HWr(e))return Promise.resolve(e);var t=e,n=t.execute,r=t.items,i=t.searchClient;return n({searchClient:i,requests:r})});return Promise.all(t).then(function(e){return t9(e)})}function KWr(e,t,n){return t.map(function(t){var r=e.filter(function(e){return e.sourceId===t.sourceId}),i=r.map(function(e){return e.items}),a=r[0].transformResponse,o=a?a(tWr(i)):i;return t.onResolve({source:t,results:i,items:o,state:n.getState()}),n9(Array.isArray(o),function(){return`The \`getItems\` function from source "${t.sourceId}" must return an array of items but returned type ${JSON.stringify(_9(o))}:
|
|
1520
1520
|
|
|
1521
|
-
${JSON.stringify(
|
|
1521
|
+
${JSON.stringify(PHr(o),null,2)}.
|
|
1522
1522
|
|
|
1523
1523
|
See: https://www.algolia.com/doc/ui-libraries/autocomplete/core-concepts/sources/#param-getitems`}),n9(o.every(Boolean),`The \`getItems\` function from source "${t.sourceId}" must return an array of items but returned ${JSON.stringify(void 0)}.
|
|
1524
1524
|
|
|
1525
1525
|
Did you forget to return items?
|
|
1526
1526
|
|
|
1527
|
-
See: https://www.algolia.com/doc/ui-libraries/autocomplete/core-concepts/sources/#param-getitems`),{source:t,items:o}})}function y9(e){"@babel/helpers - typeof";return y9=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},y9(e)}var UWr=[`event`,`nextState`,`props`,`query`,`refresh`,`store`];function WWr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function b9(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?WWr(Object(n),!0).forEach(function(t){GWr(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):WWr(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function GWr(e,t,n){return t=KWr(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function KWr(e){var t=qWr(e,`string`);return y9(t)===`symbol`?t:String(t)}function qWr(e,t){if(y9(e)!==`object`||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(y9(r)!==`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function JWr(e,t){if(e==null)return{};var n=YWr(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function YWr(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],t.indexOf(i)>=0||(n[i]=e[i]);return n}var x9=null,XWr=RUr();function S9(e){var t=e.event,n=e.nextState,r=n===void 0?{}:n,i=e.props,a=e.query,o=e.refresh,s=e.store,c=JWr(e,UWr);x9&&i.environment.clearTimeout(x9);var l=c.setCollections,u=c.setIsOpen,d=c.setQuery,f=c.setActiveItemId,p=c.setStatus,m=c.setContext;if(d(a),f(i.defaultActiveItemId),!a&&i.openOnFocus===!1){var h=s.getState().collections.map(function(e){return b9(b9({},e),{},{items:[]})});p(`idle`),l(h),u(r.isOpen??i.shouldPanelOpen({state:s.getState()}));var g=FUr(XWr(h).then(function(){return Promise.resolve()}));return s.pendingRequests.add(g)}p(`loading`),x9=i.environment.setTimeout(function(){p(`stalled`)},i.stallThreshold);var _=FUr(XWr(i.getSources(b9({query:a,refresh:o,state:s.getState()},c)).then(function(e){return Promise.all(e.map(function(e){return Promise.resolve(e.getItems(b9({query:a,refresh:o,state:s.getState()},c))).then(function(t){return BWr(t,e.sourceId,s.getState())})})).then(VWr).then(function(t){var n=t.some(function(e){var t=e.items;return ZWr(t)});return n&&m({algoliaInsightsPlugin:b9(b9({},s.getState().context?.algoliaInsightsPlugin||{}),{},{__automaticInsights:n})}),HWr(t,e,s)}).then(function(e){return DWr({collections:e,props:i,state:s.getState()})})}))).then(function(e){p(`idle`),l(e);var n=i.shouldPanelOpen({state:s.getState()});u(r.isOpen??(i.openOnFocus&&!a&&n||n));var d=u9(s.getState());if(s.getState().activeItemId!==null&&d){var f=d.item,m=d.itemInputValue,h=d.itemUrl,g=d.source;g.onActive(b9({event:t,item:f,itemInputValue:m,itemUrl:h,refresh:o,source:g,state:s.getState()},c))}}).finally(function(){p(`idle`),x9&&i.environment.clearTimeout(x9)});return s.pendingRequests.add(_)}function ZWr(e){return!Array.isArray(e)&&!!e?._automaticInsights}function C9(e){"@babel/helpers - typeof";return C9=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},C9(e)}var QWr=[`event`,`props`,`refresh`,`store`];function $Wr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function w9(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?$Wr(Object(n),!0).forEach(function(t){eGr(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$Wr(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function eGr(e,t,n){return t=tGr(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tGr(e){var t=nGr(e,`string`);return C9(t)===`symbol`?t:String(t)}function nGr(e,t){if(C9(e)!==`object`||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(C9(r)!==`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function rGr(e,t){if(e==null)return{};var n=iGr(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function iGr(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],t.indexOf(i)>=0||(n[i]=e[i]);return n}function aGr(e){var t=e.event,n=e.props,r=e.refresh,i=e.store,a=rGr(e,QWr);if(t.key===`ArrowUp`||t.key===`ArrowDown`){var o=function(){var e=u9(i.getState()),t=n.environment.document.getElementById(d9(n.id,`item-${i.getState().activeItemId}`,e?.source));t&&(t.scrollIntoViewIfNeeded?t.scrollIntoViewIfNeeded(!1):t.scrollIntoView(!1))},s=function(){var e=u9(i.getState());if(i.getState().activeItemId!==null&&e){var n=e.item,o=e.itemInputValue,s=e.itemUrl,c=e.source;c.onActive(w9({event:t,item:n,itemInputValue:o,itemUrl:s,refresh:r,source:c,state:i.getState()},a))}};t.preventDefault(),i.getState().isOpen===!1&&(n.openOnFocus||i.getState().query)?S9(w9({event:t,props:n,query:i.getState().query,refresh:r,store:i},a)).then(function(){i.dispatch(t.key,{nextActiveItemId:n.defaultActiveItemId}),s(),setTimeout(o,0)}):(i.dispatch(t.key,{}),s(),o())}else if(t.key===`Escape`)t.preventDefault(),i.dispatch(t.key,null),i.pendingRequests.cancelAll();else if(t.key===`Tab`)i.dispatch(`blur`,null),i.pendingRequests.cancelAll();else if(t.key===`Enter`){if(i.getState().activeItemId===null||i.getState().collections.every(function(e){return e.items.length===0})){n.debug||i.pendingRequests.cancelAll();return}t.preventDefault();var c=u9(i.getState()),l=c.item,u=c.itemInputValue,d=c.itemUrl,f=c.source;if(t.metaKey||t.ctrlKey)d!==void 0&&(f.onSelect(w9({event:t,item:l,itemInputValue:u,itemUrl:d,refresh:r,source:f,state:i.getState()},a)),n.navigator.navigateNewTab({itemUrl:d,item:l,state:i.getState()}));else if(t.shiftKey)d!==void 0&&(f.onSelect(w9({event:t,item:l,itemInputValue:u,itemUrl:d,refresh:r,source:f,state:i.getState()},a)),n.navigator.navigateNewWindow({itemUrl:d,item:l,state:i.getState()}));else if(!t.altKey){if(d!==void 0){f.onSelect(w9({event:t,item:l,itemInputValue:u,itemUrl:d,refresh:r,source:f,state:i.getState()},a)),n.navigator.navigate({itemUrl:d,item:l,state:i.getState()});return}S9(w9({event:t,nextState:{isOpen:!1},props:n,query:u,refresh:r,store:i},a)).then(function(){f.onSelect(w9({event:t,item:l,itemInputValue:u,itemUrl:d,refresh:r,source:f,state:i.getState()},a))})}}}function T9(e){"@babel/helpers - typeof";return T9=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},T9(e)}var oGr=[`props`,`refresh`,`store`],sGr=[`inputElement`,`formElement`,`panelElement`],cGr=[`inputElement`],lGr=[`inputElement`,`maxLength`],uGr=[`source`],dGr=[`item`,`source`];function fGr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function E9(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?fGr(Object(n),!0).forEach(function(t){pGr(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fGr(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function pGr(e,t,n){return t=mGr(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mGr(e){var t=hGr(e,`string`);return T9(t)===`symbol`?t:String(t)}function hGr(e,t){if(T9(e)!==`object`||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(T9(r)!==`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function D9(e,t){if(e==null)return{};var n=gGr(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function gGr(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],t.indexOf(i)>=0||(n[i]=e[i]);return n}function _Gr(e){var t=e.props,n=e.refresh,r=e.store,i=D9(e,oGr);return{getEnvironmentProps:function(e){var n=e.inputElement,i=e.formElement,a=e.panelElement,o=D9(e,sGr);function s(e){!r.getState().isOpen&&r.pendingRequests.isEmpty()||e.target===n||[i,a].some(function(t){return JUr(t,e.target)})===!1&&(r.dispatch(`blur`,null),t.debug||r.pendingRequests.cancelAll())}return E9({onTouchStart:s,onMouseDown:s,onTouchMove:function(e){r.getState().isOpen!==!1&&n===t.environment.document.activeElement&&e.target!==n&&n.blur()}},o)},getRootProps:function(e){return E9({role:`combobox`,"aria-expanded":r.getState().isOpen,"aria-haspopup":`listbox`,"aria-controls":r.getState().isOpen?r.getState().collections.map(function(e){var n=e.source;return d9(t.id,`list`,n)}).join(` `):void 0,"aria-labelledby":d9(t.id,`label`)},e)},getFormProps:function(e){return e.inputElement,E9({action:``,noValidate:!0,role:`search`,onSubmit:function(a){var o;a.preventDefault(),t.onSubmit(E9({event:a,refresh:n,state:r.getState()},i)),r.dispatch(`submit`,null),(o=e.inputElement)==null||o.blur()},onReset:function(a){var o;a.preventDefault(),t.onReset(E9({event:a,refresh:n,state:r.getState()},i)),r.dispatch(`reset`,null),(o=e.inputElement)==null||o.focus()}},D9(e,cGr))},getLabelProps:function(e){return E9({htmlFor:d9(t.id,`input`),id:d9(t.id,`label`)},e)},getInputProps:function(e){function a(e){(t.openOnFocus||r.getState().query)&&S9(E9({event:e,props:t,query:r.getState().completion||r.getState().query,refresh:n,store:r},i)),r.dispatch(`focus`,null)}var o=e||{};o.inputElement;var s=o.maxLength,c=s===void 0?512:s,l=D9(o,lGr),u=u9(r.getState()),d=XUr(t.environment.navigator?.userAgent||``),f=t.enterKeyHint||(u!=null&&u.itemUrl&&!d?`go`:`search`);return E9({"aria-autocomplete":`both`,"aria-activedescendant":r.getState().isOpen&&r.getState().activeItemId!==null?d9(t.id,`item-${r.getState().activeItemId}`,u?.source):void 0,"aria-controls":r.getState().isOpen?r.getState().collections.map(function(e){var n=e.source;return d9(t.id,`list`,n)}).join(` `):void 0,"aria-labelledby":d9(t.id,`label`),value:r.getState().completion||r.getState().query,id:d9(t.id,`input`),autoComplete:`off`,autoCorrect:`off`,autoCapitalize:`off`,enterKeyHint:f,spellCheck:`false`,autoFocus:t.autoFocus,placeholder:t.placeholder,maxLength:c,type:`search`,onChange:function(e){var a=e.currentTarget.value;t.ignoreCompositionEvents&&QUr(e).isComposing?i.setQuery(a):S9(E9({event:e,props:t,query:a.slice(0,c),refresh:n,store:r},i))},onCompositionEnd:function(e){S9(E9({event:e,props:t,query:e.currentTarget.value.slice(0,c),refresh:n,store:r},i))},onKeyDown:function(e){QUr(e).isComposing||aGr(E9({event:e,props:t,refresh:n,store:r},i))},onFocus:a,onBlur:LHr,onClick:function(n){e.inputElement===t.environment.document.activeElement&&!r.getState().isOpen&&a(n)}},l)},getPanelProps:function(e){return E9({onMouseDown:function(e){e.preventDefault()},onMouseLeave:function(){r.dispatch(`mouseleave`,null)}},e)},getListProps:function(e){var n=e||{},r=n.source,i=D9(n,uGr);return E9({role:`listbox`,"aria-labelledby":d9(t.id,`label`),id:d9(t.id,`list`,r)},i)},getItemProps:function(e){var a=e.item,o=e.source,s=D9(e,dGr);return E9({id:d9(t.id,`item-${a.__autocomplete_id}`,o),role:`option`,"aria-selected":r.getState().activeItemId===a.__autocomplete_id,onMouseMove:function(e){if(a.__autocomplete_id!==r.getState().activeItemId){r.dispatch(`mousemove`,a.__autocomplete_id);var t=u9(r.getState());if(r.getState().activeItemId!==null&&t){var o=t.item,s=t.itemInputValue,c=t.itemUrl,l=t.source;l.onActive(E9({event:e,item:o,itemInputValue:s,itemUrl:c,refresh:n,source:l,state:r.getState()},i))}}},onMouseDown:function(e){e.preventDefault()},onClick:function(e){var s=o.getItemInputValue({item:a,state:r.getState()}),c=o.getItemUrl({item:a,state:r.getState()});(c?Promise.resolve():S9(E9({event:e,nextState:{isOpen:!1},props:t,query:s,refresh:n,store:r},i))).then(function(){o.onSelect(E9({event:e,item:a,itemInputValue:s,itemUrl:c,refresh:n,source:o,state:r.getState()},i))})}},s)}}}function O9(e){"@babel/helpers - typeof";return O9=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},O9(e)}function vGr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function yGr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?vGr(Object(n),!0).forEach(function(t){bGr(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vGr(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function bGr(e,t,n){return t=xGr(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xGr(e){var t=SGr(e,`string`);return O9(t)===`symbol`?t:String(t)}function SGr(e,t){if(O9(e)!==`object`||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(O9(r)!==`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function CGr(e){var t=e.plugins,n=e.options,r=(n.__autocomplete_metadata?.userAgents||[])[0]?.segment,i=r?bGr({},r,Object.keys(n.__autocomplete_metadata?.options||{})):{};return{plugins:t.map(function(e){return{name:e.name,options:Object.keys(e.__autocomplete_pluginOptions||[])}}),options:yGr({"autocomplete-core":Object.keys(n)},i),ua:BHr.concat(n.__autocomplete_metadata?.userAgents||[])}}function wGr(e){var t,n=e.metadata,r=e.environment;if((t=r.navigator)!=null&&t.userAgent?.includes(`Algolia Crawler`)){var i=r.document.createElement(`meta`),a=r.document.querySelector(`head`);i.name=`algolia:metadata`,setTimeout(function(){i.content=JSON.stringify(n),a.appendChild(i)},0)}}function TGr(e){var t=e.state;return t.isOpen===!1||t.activeItemId===null?null:u9(t)?.itemInputValue||null}function k9(e){"@babel/helpers - typeof";return k9=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},k9(e)}function EGr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function A9(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?EGr(Object(n),!0).forEach(function(t){DGr(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):EGr(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function DGr(e,t,n){return t=OGr(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function OGr(e){var t=kGr(e,`string`);return k9(t)===`symbol`?t:String(t)}function kGr(e,t){if(k9(e)!==`object`||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(k9(r)!==`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var AGr=function(e,t){switch(t.type){case`setActiveItemId`:return A9(A9({},e),{},{activeItemId:t.payload});case`setQuery`:return A9(A9({},e),{},{query:t.payload,completion:null});case`setCollections`:return A9(A9({},e),{},{collections:t.payload});case`setIsOpen`:return A9(A9({},e),{},{isOpen:t.payload});case`setStatus`:return A9(A9({},e),{},{status:t.payload});case`setContext`:return A9(A9({},e),{},{context:A9(A9({},e.context),t.payload)});case`ArrowDown`:var n=A9(A9({},e),{},{activeItemId:t.payload.hasOwnProperty(`nextActiveItemId`)?t.payload.nextActiveItemId:zUr(1,e.activeItemId,PHr(e),t.props.defaultActiveItemId)});return A9(A9({},n),{},{completion:TGr({state:n})});case`ArrowUp`:var r=A9(A9({},e),{},{activeItemId:zUr(-1,e.activeItemId,PHr(e),t.props.defaultActiveItemId)});return A9(A9({},r),{},{completion:TGr({state:r})});case`Escape`:return e.isOpen?A9(A9({},e),{},{activeItemId:null,isOpen:!1,completion:null}):A9(A9({},e),{},{activeItemId:null,query:``,status:`idle`,collections:[]});case`submit`:return A9(A9({},e),{},{activeItemId:null,isOpen:!1,status:`idle`});case`reset`:return A9(A9({},e),{},{activeItemId:t.props.openOnFocus===!0?t.props.defaultActiveItemId:null,status:`idle`,completion:null,query:``});case`focus`:return A9(A9({},e),{},{activeItemId:t.props.defaultActiveItemId,isOpen:(t.props.openOnFocus||!!e.query)&&t.props.shouldPanelOpen({state:e})});case`blur`:return t.props.debug?e:A9(A9({},e),{},{isOpen:!1,activeItemId:null});case`mousemove`:return A9(A9({},e),{},{activeItemId:t.payload});case`mouseleave`:return A9(A9({},e),{},{activeItemId:t.props.defaultActiveItemId});default:return n9(!1,`The reducer action ${JSON.stringify(t.type)} is not supported.`),e}};function j9(e){"@babel/helpers - typeof";return j9=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},j9(e)}function jGr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function M9(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?jGr(Object(n),!0).forEach(function(t){MGr(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jGr(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function MGr(e,t,n){return t=NGr(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function NGr(e){var t=PGr(e,`string`);return j9(t)===`symbol`?t:String(t)}function PGr(e,t){if(j9(e)!==`object`||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(j9(r)!==`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function FGr(e){NUr(e);var t=[],n=xWr(e,t),r=iWr(AGr,n,o),i=uWr({store:r}),a=_Gr(M9({props:n,refresh:s,store:r,navigator:n.navigator},i));function o(e){var t,r,a=e.prevState,o=e.state;if(n.onStateChange(M9({prevState:a,state:o,refresh:s,navigator:n.navigator},i)),!l()&&(t=o.context)!=null&&(r=t.algoliaInsightsPlugin)!=null&&r.__automaticInsights&&n.insights!==!1){var u=OUr({__autocomplete_clickAnalytics:!1});n.plugins.push(u),c([u])}}function s(){return S9(M9({event:new Event(`input`),nextState:{isOpen:r.getState().isOpen},props:n,navigator:n.navigator,query:r.getState().query,refresh:s,store:r},i))}function c(e){e.forEach(function(e){return e.subscribe?.call(e,M9(M9({},i),{},{navigator:n.navigator,refresh:s,onSelect:function(e){t.push({onSelect:e})},onActive:function(e){t.push({onActive:e})},onResolve:function(e){t.push({onResolve:e})}}))})}function l(){return n.plugins.some(function(e){return e.name===`aa.algoliaInsightsPlugin`})}if(n.insights&&!l()){var u=typeof n.insights==`boolean`?{}:n.insights;n.plugins.push(OUr(u))}return c(n.plugins),wGr({metadata:CGr({plugins:n.plugins,options:e}),environment:n.environment}),M9(M9({refresh:s,navigator:n.navigator},a),i)}var IGr=`__aa-highlight__`,LGr=`__/aa-highlight__`;function RGr(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return{get:function(){return e},add:function(t){var n=e[e.length-1];n?.isHighlighted===t.isHighlighted?e[e.length-1]={value:n.value+t.value,isHighlighted:n.isHighlighted}:e.push(t)}}}function zGr(e){var t=e.highlightedValue.split(IGr),n=t.shift(),r=RGr(n?[{value:n,isHighlighted:!1}]:[]);return t.forEach(function(e){var t=e.split(LGr);r.add({value:t[0],isHighlighted:!0}),t[1]!==``&&r.add({value:t[1],isHighlighted:!1})}),r.get()}function BGr(e){return WGr(e)||UGr(e)||HGr(e)||VGr()}function VGr(){throw TypeError(`Invalid attempt to spread non-iterable instance.
|
|
1528
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
1529
|
-
See https://www.algolia.com/doc/api-reference/api-parameters/attributesToHighlight/`),i=
|
|
1530
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
1531
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,o=!1,s;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){o=!0,s=e},f:function(){try{!a&&n.return!=null&&n.return()}finally{if(o)throw s}}}}function
|
|
1532
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
1533
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function nqr(e,t){if(e){if(typeof e==`string`)return aqr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return aqr(e,t)}}function rqr(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function iqr(e){if(Array.isArray(e))return aqr(e)}function aqr(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function oqr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function B9(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?oqr(Object(n),!0).forEach(function(t){sqr(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oqr(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function sqr(e,t,n){return t=cqr(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function cqr(e){var t=lqr(e,`string`);return z9(t)===`symbol`?t:String(t)}function lqr(e,t){if(z9(e)!==`object`||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(z9(r)!==`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function uqr(e){return function(t){var n=t.onSelect;n(function(t){var n=t.item,r=t.state,i=t.source,a=i.getItemInputValue({item:n,state:r});if(i.sourceId===`querySuggestionsPlugin`&&a){var o={id:a,label:a,category:n.__autocomplete_qsCategory};e.addItem(o)}})}}function dqr(e){var t=fqr(e),n=t.storage,r=t.transformSource,i=t.subscribe,a=QKr(n),o=xHr([]);return{name:`aa.recentSearchesPlugin`,subscribe:i??uqr(a),onSubmit:function(e){var t=e.state.query;if(t){var n={id:t,label:t};a.addItem(n)}},getSources:function(e){var t=e.query,n=e.setQuery,i=e.refresh,s=e.state;o.current=a.getAll(t);function c(e){a.removeItem(e),i()}function l(e){n(e.label),i()}return Promise.resolve(o.current).then(function(e){return e.length===0?[]:[r({source:{sourceId:`recentSearchesPlugin`,getItemInputValue:function(e){return e.item.label},getItems:function(){return e},templates:$Kr({onRemove:c,onTapAhead:l})},onRemove:c,onTapAhead:l,state:s})]})},data:B9(B9({},a),{},{getAlgoliaSearchParams:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Array.isArray(o.current)?B9(B9({},e),{},{facetFilters:[].concat(eqr(e.facetFilters??[]),eqr(o.current.map(function(e){return[`objectID:-${e.label}`]}))),hitsPerPage:Math.max(1,(e.hitsPerPage??10)-o.current.length)}):(process.env.NODE_ENV!==`production`&&HHr(!1,"The `getAlgoliaSearchParams` function is not supported with storages that return promises in `getAll`."),e)}}),__autocomplete_pluginOptions:e}}function fqr(e){return B9({transformSource:function(e){return e.source}},e)}function pqr(e){var t=e.query,n=e.items,r=e.limit;return t?n.filter(function(e){return e.label.toLowerCase().includes(t.toLowerCase())}).slice(0,r).map(function(e){return BKr({item:e,query:t})}):n.slice(0,r).map(function(e){return BKr({item:e,query:t})})}function V9(e){"@babel/helpers - typeof";return V9=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},V9(e)}function mqr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function hqr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?mqr(Object(n),!0).forEach(function(t){gqr(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mqr(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function gqr(e,t,n){return t=_qr(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _qr(e){var t=vqr(e,`string`);return V9(t)===`symbol`?t:String(t)}function vqr(e,t){if(V9(e)!==`object`||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(V9(r)!==`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function yqr(e){var t=bqr(e),n=t.key,r=t.limit,i=t.transformSource,a=t.search,o=t.subscribe;return hqr(hqr({},dqr({transformSource:i,storage:ZKr({key:[VKr,n].join(`:`),limit:r,search:a}),subscribe:o})),{},{name:`aa.localStorageRecentSearchesPlugin`,__autocomplete_pluginOptions:e})}function bqr(e){return hqr({limit:5,search:pqr,transformSource:function(e){return e.source}},e)}var xqr=u(s(((e,t,n)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n||=self).algoliasearch=r()})(n,(function(){"use strict";function e(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function t(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function n(n){for(var r=1;r<arguments.length;r++){var i=arguments[r]==null?{}:arguments[r];r%2?t(Object(i),!0).forEach((function(t){e(n,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):t(Object(i)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))}))}return n}function r(e,t){if(e==null)return{};var n,r,i=function(e,t){if(e==null)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(Symbol.iterator in Object(e)||Object.prototype.toString.call(e)===`[object Arguments]`){var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||s.return==null||s.return()}finally{if(i)throw a}}return n}}(e,t)||function(){throw TypeError(`Invalid attempt to destructure non-iterable instance`)}()}function a(e){return function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||Object.prototype.toString.call(e)===`[object Arguments]`)return Array.from(e)}(e)||function(){throw TypeError(`Invalid attempt to spread non-iterable instance`)}()}function o(e){var t,n=`algoliasearch-client-js-${e.key}`,r=function(){return t===void 0&&(t=e.localStorage||window.localStorage),t},a=function(){return JSON.parse(r().getItem(n)||`{}`)},o=function(e){r().setItem(n,JSON.stringify(e))},s=function(){var t=e.timeToLive?1e3*e.timeToLive:null,n=a(),r=Object.fromEntries(Object.entries(n).filter((function(e){return i(e,2)[1].timestamp!==void 0})));o(r),t&&o(Object.fromEntries(Object.entries(r).filter((function(e){var n=i(e,2)[1],r=new Date().getTime();return!(n.timestamp+t<r)}))))};return{get:function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{miss:function(){return Promise.resolve()}};return Promise.resolve().then((function(){s();var t=JSON.stringify(e);return a()[t]})).then((function(e){return Promise.all([e?e.value:t(),e!==void 0])})).then((function(e){var t=i(e,2),r=t[0],a=t[1];return Promise.all([r,a||n.miss(r)])})).then((function(e){return i(e,1)[0]}))},set:function(e,t){return Promise.resolve().then((function(){var i=a();return i[JSON.stringify(e)]={timestamp:new Date().getTime(),value:t},r().setItem(n,JSON.stringify(i)),t}))},delete:function(e){return Promise.resolve().then((function(){var t=a();delete t[JSON.stringify(e)],r().setItem(n,JSON.stringify(t))}))},clear:function(){return Promise.resolve().then((function(){r().removeItem(n)}))}}}function s(e){var t=a(e.caches),n=t.shift();return n===void 0?{get:function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{miss:function(){return Promise.resolve()}};return t().then((function(e){return Promise.all([e,n.miss(e)])})).then((function(e){return i(e,1)[0]}))},set:function(e,t){return Promise.resolve(t)},delete:function(e){return Promise.resolve()},clear:function(){return Promise.resolve()}}:{get:function(e,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{miss:function(){return Promise.resolve()}};return n.get(e,r,i).catch((function(){return s({caches:t}).get(e,r,i)}))},set:function(e,r){return n.set(e,r).catch((function(){return s({caches:t}).set(e,r)}))},delete:function(e){return n.delete(e).catch((function(){return s({caches:t}).delete(e)}))},clear:function(){return n.clear().catch((function(){return s({caches:t}).clear()}))}}}function c(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{serializable:!0},t={};return{get:function(n,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{miss:function(){return Promise.resolve()}},a=JSON.stringify(n);if(a in t)return Promise.resolve(e.serializable?JSON.parse(t[a]):t[a]);var o=r(),s=i&&i.miss||function(){return Promise.resolve()};return o.then((function(e){return s(e)})).then((function(){return o}))},set:function(n,r){return t[JSON.stringify(n)]=e.serializable?JSON.stringify(r):r,Promise.resolve(r)},delete:function(e){return delete t[JSON.stringify(e)],Promise.resolve()},clear:function(){return t={},Promise.resolve()}}}function l(e){for(var t=e.length-1;t>0;t--){var n=Math.floor(Math.random()*(t+1)),r=e[t];e[t]=e[n],e[n]=r}return e}function u(e,t){return t&&Object.keys(t).forEach((function(n){e[n]=t[n](e)})),e}function d(e){var t=[...arguments].slice(1),n=0;return e.replace(/%s/g,(function(){return encodeURIComponent(t[n++])}))}var f={WithinQueryParameters:0,WithinHeaders:1};function p(e,t){var n=e||{},r=n.data||{};return Object.keys(n).forEach((function(e){[`timeout`,`headers`,`queryParameters`,`data`,`cacheable`].indexOf(e)===-1&&(r[e]=n[e])})),{data:Object.entries(r).length>0?r:void 0,timeout:n.timeout||t,headers:n.headers||{},queryParameters:n.queryParameters||{},cacheable:n.cacheable}}var m={Read:1,Write:2,Any:3},h=1,g=2,_=3;function v(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:h;return n(n({},e),{},{status:t,lastUpdate:Date.now()})}function y(e){return typeof e==`string`?{protocol:`https`,url:e,accept:m.Any}:{protocol:e.protocol||`https`,url:e.url,accept:e.accept||m.Any}}var b=`GET`,x=`POST`;function S(e,t){return Promise.all(t.map((function(t){return e.get(t,(function(){return Promise.resolve(v(t))}))}))).then((function(e){var n=e.filter((function(e){return function(e){return e.status===h||Date.now()-e.lastUpdate>12e4}(e)})),r=e.filter((function(e){return function(e){return e.status===_&&Date.now()-e.lastUpdate<=12e4}(e)})),i=[].concat(a(n),a(r));return{getTimeout:function(e,t){return(r.length===0&&e===0?1:r.length+3+e)*t},statelessHosts:i.length>0?i.map((function(e){return y(e)})):t}}))}function C(e,t,r,i){var o=[],s=function(e,t){if(!(e.method===b||e.data===void 0&&t.data===void 0)){var r=Array.isArray(e.data)?e.data:n(n({},e.data),t.data);return JSON.stringify(r)}}(r,i),c=function(e,t){var r=n(n({},e.headers),t.headers),i={};return Object.keys(r).forEach((function(e){var t=r[e];i[e.toLowerCase()]=t})),i}(e,i),l=r.method,u=r.method===b?n(n({},r.data),i.data):{},d=n(n(n({"x-algolia-agent":e.userAgent.value},e.queryParameters),u),i.queryParameters),f=0,p=function t(n,a){var u=n.pop();if(u===void 0)throw{name:`RetryError`,message:`Unreachable hosts - your application id may be incorrect. If the error persists, please reach out to the Algolia Support team: https://alg.li/support .`,transporterStackTrace:D(o)};var p={data:s,headers:c,method:l,url:T(u,r.path,d),connectTimeout:a(f,e.timeouts.connect),responseTimeout:a(f,i.timeout)},m=function(e){var t={request:p,response:e,host:u,triesLeft:n.length};return o.push(t),t},h={onSuccess:function(e){return function(e){try{return JSON.parse(e.content)}catch(t){throw function(e,t){return{name:`DeserializationError`,message:e,response:t}}(t.message,e)}}(e)},onRetry:function(r){var i=m(r);return r.isTimedOut&&f++,Promise.all([e.logger.info(`Retryable failure`,O(i)),e.hostsCache.set(u,v(u,r.isTimedOut?_:g))]).then((function(){return t(n,a)}))},onFail:function(e){throw m(e),function(e,t){var n=e.content,r=e.status,i=n;try{i=JSON.parse(n).message}catch{}return function(e,t,n){return{name:`ApiError`,message:e,status:t,transporterStackTrace:n}}(i,r,t)}(e,D(o))}};return e.requester.send(p).then((function(e){return function(e,t){return function(e){var t=e.status;return e.isTimedOut||function(e){var t=e.isTimedOut,n=e.status;return!t&&~~n==0}(e)||~~(t/100)!=2&&~~(t/100)!=4}(e)?t.onRetry(e):~~(e.status/100)==2?t.onSuccess(e):t.onFail(e)}(e,h)}))};return S(e.hostsCache,t).then((function(e){return p(a(e.statelessHosts).reverse(),e.getTimeout)}))}function w(e){var t={value:`Algolia for JavaScript (${e})`,add:function(e){var n=`; ${e.segment}${e.version===void 0?``:` (${e.version})`}`;return t.value.indexOf(n)===-1&&(t.value=`${t.value}${n}`),t}};return t}function T(e,t,n){var r=E(n),i=`${e.protocol}://${e.url}/${t.charAt(0)===`/`?t.substr(1):t}`;return r.length&&(i+=`?${r}`),i}function E(e){return Object.keys(e).map((function(t){return d(`%s=%s`,t,(n=e[t],Object.prototype.toString.call(n)===`[object Object]`||Object.prototype.toString.call(n)===`[object Array]`?JSON.stringify(e[t]):e[t]));var n})).join(`&`)}function D(e){return e.map((function(e){return O(e)}))}function O(e){var t=e.request.headers[`x-algolia-api-key`]?{"x-algolia-api-key":`*****`}:{};return n(n({},e),{},{request:n(n({},e.request),{},{headers:n(n({},e.request.headers),t)})})}var k=function(e){var t=e.appId,r=function(e,t,n){var r={"x-algolia-api-key":n,"x-algolia-application-id":t};return{headers:function(){return e===f.WithinHeaders?r:{}},queryParameters:function(){return e===f.WithinQueryParameters?r:{}}}}(e.authMode===void 0?f.WithinHeaders:e.authMode,t,e.apiKey),a=function(e){var t=e.hostsCache,n=e.logger,r=e.requester,a=e.requestsCache,o=e.responsesCache,s=e.timeouts,c=e.userAgent,l=e.hosts,u=e.queryParameters,d={hostsCache:t,logger:n,requester:r,requestsCache:a,responsesCache:o,timeouts:s,userAgent:c,headers:e.headers,queryParameters:u,hosts:l.map((function(e){return y(e)})),read:function(e,t){var n=p(t,d.timeouts.read),r=function(){return C(d,d.hosts.filter((function(e){return(e.accept&m.Read)!=0})),e,n)};if(!0!==(n.cacheable===void 0?e.cacheable:n.cacheable))return r();var a={request:e,mappedRequestOptions:n,transporter:{queryParameters:d.queryParameters,headers:d.headers}};return d.responsesCache.get(a,(function(){return d.requestsCache.get(a,(function(){return d.requestsCache.set(a,r()).then((function(e){return Promise.all([d.requestsCache.delete(a),e])}),(function(e){return Promise.all([d.requestsCache.delete(a),Promise.reject(e)])})).then((function(e){var t=i(e,2);return t[0],t[1]}))}))}),{miss:function(e){return d.responsesCache.set(a,e)}})},write:function(e,t){return C(d,d.hosts.filter((function(e){return(e.accept&m.Write)!=0})),e,p(t,d.timeouts.write))}};return d}(n(n({hosts:[{url:`${t}-dsn.algolia.net`,accept:m.Read},{url:`${t}.algolia.net`,accept:m.Write}].concat(l([{url:`${t}-1.algolianet.com`},{url:`${t}-2.algolianet.com`},{url:`${t}-3.algolianet.com`}]))},e),{},{headers:n(n(n({},r.headers()),{"content-type":`application/x-www-form-urlencoded`}),e.headers),queryParameters:n(n({},r.queryParameters()),e.queryParameters)}));return u({transporter:a,appId:t,addAlgoliaAgent:function(e,t){a.userAgent.add({segment:e,version:t})},clearCache:function(){return Promise.all([a.requestsCache.clear(),a.responsesCache.clear()]).then((function(){}))}},e.methods)},A=function(e){return function(t,n){return t.method===b?e.transporter.read(t,n):e.transporter.write(t,n)}},ee=function(e){return function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return u({transporter:e.transporter,appId:e.appId,indexName:t},n.methods)}},j=function(e){return function(t,r){var i=t.map((function(e){return n(n({},e),{},{params:E(e.params||{})})}));return e.transporter.read({method:x,path:`1/indexes/*/queries`,data:{requests:i},cacheable:!0},r)}},M=function(e){return function(t,i){return Promise.all(t.map((function(t){var a=t.params,o=a.facetName,s=a.facetQuery,c=r(a,[`facetName`,`facetQuery`]);return ee(e)(t.indexName,{methods:{searchForFacetValues:ne}}).searchForFacetValues(o,s,n(n({},i),c))})))}},te=function(e){return function(t,n,r){return e.transporter.read({method:x,path:d(`1/answers/%s/prediction`,e.indexName),data:{query:t,queryLanguages:n},cacheable:!0},r)}},N=function(e){return function(t,n){return e.transporter.read({method:x,path:d(`1/indexes/%s/query`,e.indexName),data:{query:t},cacheable:!0},n)}},ne=function(e){return function(t,n,r){return e.transporter.read({method:x,path:d(`1/indexes/%s/facets/%s/query`,e.indexName,t),data:{facetQuery:n},cacheable:!0},r)}},re=1,ie=2,P=3,ae=function(e){return function(t,r){var i=t.map((function(e){return n(n({},e),{},{threshold:e.threshold||0})}));return e.transporter.read({method:x,path:`1/indexes/*/recommendations`,data:{requests:i},cacheable:!0},r)}};function F(e,t,r){var i;return k(n(n(n({},{appId:e,apiKey:t,timeouts:{connect:1,read:2,write:30},requester:{send:function(e){return new Promise((function(t){var n=new XMLHttpRequest;n.open(e.method,e.url,!0),Object.keys(e.headers).forEach((function(t){return n.setRequestHeader(t,e.headers[t])}));var r,i=function(e,r){return setTimeout((function(){n.abort(),t({status:0,content:r,isTimedOut:!0})}),1e3*e)},a=i(e.connectTimeout,`Connection timeout`);n.onreadystatechange=function(){n.readyState>n.OPENED&&r===void 0&&(clearTimeout(a),r=i(e.responseTimeout,`Socket timeout`))},n.onerror=function(){n.status===0&&(clearTimeout(a),clearTimeout(r),t({content:n.responseText||`Network request failed`,status:n.status,isTimedOut:!1}))},n.onload=function(){clearTimeout(a),clearTimeout(r),t({content:n.responseText,status:n.status,isTimedOut:!1})},n.send(e.data)}))}},logger:(i=P,{debug:function(e,t){return re>=i&&console.debug(e,t),Promise.resolve()},info:function(e,t){return ie>=i&&console.info(e,t),Promise.resolve()},error:function(e,t){return console.error(e,t),Promise.resolve()}}),responsesCache:c(),requestsCache:c({serializable:!1}),hostsCache:s({caches:[o({key:`4.24.0-${e}`}),c()]}),userAgent:w(`4.24.0`).add({segment:`Browser`,version:`lite`}),authMode:f.WithinQueryParameters}),r),{},{methods:{search:j,searchForFacetValues:M,multipleQueries:j,multipleSearchForFacetValues:M,customRequest:A,initIndex:function(e){return function(t){return ee(e)(t,{methods:{search:N,searchForFacetValues:ne,findAnswers:te}})}},getRecommendations:ae}}))}return F.version=`4.24.0`,F}))}))()),Sqr=U7(H7.div`
|
|
1527
|
+
See: https://www.algolia.com/doc/ui-libraries/autocomplete/core-concepts/sources/#param-getitems`),{source:t,items:o}})}function y9(e){"@babel/helpers - typeof";return y9=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},y9(e)}var qWr=[`event`,`nextState`,`props`,`query`,`refresh`,`store`];function JWr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function b9(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?JWr(Object(n),!0).forEach(function(t){YWr(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):JWr(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function YWr(e,t,n){return t=XWr(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function XWr(e){var t=ZWr(e,`string`);return y9(t)===`symbol`?t:String(t)}function ZWr(e,t){if(y9(e)!==`object`||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(y9(r)!==`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function QWr(e,t){if(e==null)return{};var n=$Wr(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function $Wr(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],t.indexOf(i)>=0||(n[i]=e[i]);return n}var x9=null,eGr=HUr();function S9(e){var t=e.event,n=e.nextState,r=n===void 0?{}:n,i=e.props,a=e.query,o=e.refresh,s=e.store,c=QWr(e,qWr);x9&&i.environment.clearTimeout(x9);var l=c.setCollections,u=c.setIsOpen,d=c.setQuery,f=c.setActiveItemId,p=c.setStatus,m=c.setContext;if(d(a),f(i.defaultActiveItemId),!a&&i.openOnFocus===!1){var h=s.getState().collections.map(function(e){return b9(b9({},e),{},{items:[]})});p(`idle`),l(h),u(r.isOpen??i.shouldPanelOpen({state:s.getState()}));var g=zUr(eGr(h).then(function(){return Promise.resolve()}));return s.pendingRequests.add(g)}p(`loading`),x9=i.environment.setTimeout(function(){p(`stalled`)},i.stallThreshold);var _=zUr(eGr(i.getSources(b9({query:a,refresh:o,state:s.getState()},c)).then(function(e){return Promise.all(e.map(function(e){return Promise.resolve(e.getItems(b9({query:a,refresh:o,state:s.getState()},c))).then(function(t){return WWr(t,e.sourceId,s.getState())})})).then(GWr).then(function(t){var n=t.some(function(e){var t=e.items;return tGr(t)});return n&&m({algoliaInsightsPlugin:b9(b9({},s.getState().context?.algoliaInsightsPlugin||{}),{},{__automaticInsights:n})}),KWr(t,e,s)}).then(function(e){return jWr({collections:e,props:i,state:s.getState()})})}))).then(function(e){p(`idle`),l(e);var n=i.shouldPanelOpen({state:s.getState()});u(r.isOpen??(i.openOnFocus&&!a&&n||n));var d=u9(s.getState());if(s.getState().activeItemId!==null&&d){var f=d.item,m=d.itemInputValue,h=d.itemUrl,g=d.source;g.onActive(b9({event:t,item:f,itemInputValue:m,itemUrl:h,refresh:o,source:g,state:s.getState()},c))}}).finally(function(){p(`idle`),x9&&i.environment.clearTimeout(x9)});return s.pendingRequests.add(_)}function tGr(e){return!Array.isArray(e)&&!!e?._automaticInsights}function C9(e){"@babel/helpers - typeof";return C9=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},C9(e)}var nGr=[`event`,`props`,`refresh`,`store`];function rGr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function w9(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?rGr(Object(n),!0).forEach(function(t){iGr(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rGr(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function iGr(e,t,n){return t=aGr(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function aGr(e){var t=oGr(e,`string`);return C9(t)===`symbol`?t:String(t)}function oGr(e,t){if(C9(e)!==`object`||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(C9(r)!==`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function sGr(e,t){if(e==null)return{};var n=cGr(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function cGr(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],t.indexOf(i)>=0||(n[i]=e[i]);return n}function lGr(e){var t=e.event,n=e.props,r=e.refresh,i=e.store,a=sGr(e,nGr);if(t.key===`ArrowUp`||t.key===`ArrowDown`){var o=function(){var e=u9(i.getState()),t=n.environment.document.getElementById(d9(n.id,`item-${i.getState().activeItemId}`,e?.source));t&&(t.scrollIntoViewIfNeeded?t.scrollIntoViewIfNeeded(!1):t.scrollIntoView(!1))},s=function(){var e=u9(i.getState());if(i.getState().activeItemId!==null&&e){var n=e.item,o=e.itemInputValue,s=e.itemUrl,c=e.source;c.onActive(w9({event:t,item:n,itemInputValue:o,itemUrl:s,refresh:r,source:c,state:i.getState()},a))}};t.preventDefault(),i.getState().isOpen===!1&&(n.openOnFocus||i.getState().query)?S9(w9({event:t,props:n,query:i.getState().query,refresh:r,store:i},a)).then(function(){i.dispatch(t.key,{nextActiveItemId:n.defaultActiveItemId}),s(),setTimeout(o,0)}):(i.dispatch(t.key,{}),s(),o())}else if(t.key===`Escape`)t.preventDefault(),i.dispatch(t.key,null),i.pendingRequests.cancelAll();else if(t.key===`Tab`)i.dispatch(`blur`,null),i.pendingRequests.cancelAll();else if(t.key===`Enter`){if(i.getState().activeItemId===null||i.getState().collections.every(function(e){return e.items.length===0})){n.debug||i.pendingRequests.cancelAll();return}t.preventDefault();var c=u9(i.getState()),l=c.item,u=c.itemInputValue,d=c.itemUrl,f=c.source;if(t.metaKey||t.ctrlKey)d!==void 0&&(f.onSelect(w9({event:t,item:l,itemInputValue:u,itemUrl:d,refresh:r,source:f,state:i.getState()},a)),n.navigator.navigateNewTab({itemUrl:d,item:l,state:i.getState()}));else if(t.shiftKey)d!==void 0&&(f.onSelect(w9({event:t,item:l,itemInputValue:u,itemUrl:d,refresh:r,source:f,state:i.getState()},a)),n.navigator.navigateNewWindow({itemUrl:d,item:l,state:i.getState()}));else if(!t.altKey){if(d!==void 0){f.onSelect(w9({event:t,item:l,itemInputValue:u,itemUrl:d,refresh:r,source:f,state:i.getState()},a)),n.navigator.navigate({itemUrl:d,item:l,state:i.getState()});return}S9(w9({event:t,nextState:{isOpen:!1},props:n,query:u,refresh:r,store:i},a)).then(function(){f.onSelect(w9({event:t,item:l,itemInputValue:u,itemUrl:d,refresh:r,source:f,state:i.getState()},a))})}}}function T9(e){"@babel/helpers - typeof";return T9=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},T9(e)}var uGr=[`props`,`refresh`,`store`],dGr=[`inputElement`,`formElement`,`panelElement`],fGr=[`inputElement`],pGr=[`inputElement`,`maxLength`],mGr=[`source`],hGr=[`item`,`source`];function gGr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function E9(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?gGr(Object(n),!0).forEach(function(t){_Gr(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gGr(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function _Gr(e,t,n){return t=vGr(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vGr(e){var t=yGr(e,`string`);return T9(t)===`symbol`?t:String(t)}function yGr(e,t){if(T9(e)!==`object`||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(T9(r)!==`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function D9(e,t){if(e==null)return{};var n=bGr(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function bGr(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],t.indexOf(i)>=0||(n[i]=e[i]);return n}function xGr(e){var t=e.props,n=e.refresh,r=e.store,i=D9(e,uGr);return{getEnvironmentProps:function(e){var n=e.inputElement,i=e.formElement,a=e.panelElement,o=D9(e,dGr);function s(e){!r.getState().isOpen&&r.pendingRequests.isEmpty()||e.target===n||[i,a].some(function(t){return QUr(t,e.target)})===!1&&(r.dispatch(`blur`,null),t.debug||r.pendingRequests.cancelAll())}return E9({onTouchStart:s,onMouseDown:s,onTouchMove:function(e){r.getState().isOpen!==!1&&n===t.environment.document.activeElement&&e.target!==n&&n.blur()}},o)},getRootProps:function(e){return E9({role:`combobox`,"aria-expanded":r.getState().isOpen,"aria-haspopup":`listbox`,"aria-controls":r.getState().isOpen?r.getState().collections.map(function(e){var n=e.source;return d9(t.id,`list`,n)}).join(` `):void 0,"aria-labelledby":d9(t.id,`label`)},e)},getFormProps:function(e){return e.inputElement,E9({action:``,noValidate:!0,role:`search`,onSubmit:function(a){var o;a.preventDefault(),t.onSubmit(E9({event:a,refresh:n,state:r.getState()},i)),r.dispatch(`submit`,null),(o=e.inputElement)==null||o.blur()},onReset:function(a){var o;a.preventDefault(),t.onReset(E9({event:a,refresh:n,state:r.getState()},i)),r.dispatch(`reset`,null),(o=e.inputElement)==null||o.focus()}},D9(e,fGr))},getLabelProps:function(e){return E9({htmlFor:d9(t.id,`input`),id:d9(t.id,`label`)},e)},getInputProps:function(e){function a(e){(t.openOnFocus||r.getState().query)&&S9(E9({event:e,props:t,query:r.getState().completion||r.getState().query,refresh:n,store:r},i)),r.dispatch(`focus`,null)}var o=e||{};o.inputElement;var s=o.maxLength,c=s===void 0?512:s,l=D9(o,pGr),u=u9(r.getState()),d=eWr(t.environment.navigator?.userAgent||``),f=t.enterKeyHint||(u!=null&&u.itemUrl&&!d?`go`:`search`);return E9({"aria-autocomplete":`both`,"aria-activedescendant":r.getState().isOpen&&r.getState().activeItemId!==null?d9(t.id,`item-${r.getState().activeItemId}`,u?.source):void 0,"aria-controls":r.getState().isOpen?r.getState().collections.map(function(e){var n=e.source;return d9(t.id,`list`,n)}).join(` `):void 0,"aria-labelledby":d9(t.id,`label`),value:r.getState().completion||r.getState().query,id:d9(t.id,`input`),autoComplete:`off`,autoCorrect:`off`,autoCapitalize:`off`,enterKeyHint:f,spellCheck:`false`,autoFocus:t.autoFocus,placeholder:t.placeholder,maxLength:c,type:`search`,onChange:function(e){var a=e.currentTarget.value;t.ignoreCompositionEvents&&nWr(e).isComposing?i.setQuery(a):S9(E9({event:e,props:t,query:a.slice(0,c),refresh:n,store:r},i))},onCompositionEnd:function(e){S9(E9({event:e,props:t,query:e.currentTarget.value.slice(0,c),refresh:n,store:r},i))},onKeyDown:function(e){nWr(e).isComposing||lGr(E9({event:e,props:t,refresh:n,store:r},i))},onFocus:a,onBlur:VHr,onClick:function(n){e.inputElement===t.environment.document.activeElement&&!r.getState().isOpen&&a(n)}},l)},getPanelProps:function(e){return E9({onMouseDown:function(e){e.preventDefault()},onMouseLeave:function(){r.dispatch(`mouseleave`,null)}},e)},getListProps:function(e){var n=e||{},r=n.source,i=D9(n,mGr);return E9({role:`listbox`,"aria-labelledby":d9(t.id,`label`),id:d9(t.id,`list`,r)},i)},getItemProps:function(e){var a=e.item,o=e.source,s=D9(e,hGr);return E9({id:d9(t.id,`item-${a.__autocomplete_id}`,o),role:`option`,"aria-selected":r.getState().activeItemId===a.__autocomplete_id,onMouseMove:function(e){if(a.__autocomplete_id!==r.getState().activeItemId){r.dispatch(`mousemove`,a.__autocomplete_id);var t=u9(r.getState());if(r.getState().activeItemId!==null&&t){var o=t.item,s=t.itemInputValue,c=t.itemUrl,l=t.source;l.onActive(E9({event:e,item:o,itemInputValue:s,itemUrl:c,refresh:n,source:l,state:r.getState()},i))}}},onMouseDown:function(e){e.preventDefault()},onClick:function(e){var s=o.getItemInputValue({item:a,state:r.getState()}),c=o.getItemUrl({item:a,state:r.getState()});(c?Promise.resolve():S9(E9({event:e,nextState:{isOpen:!1},props:t,query:s,refresh:n,store:r},i))).then(function(){o.onSelect(E9({event:e,item:a,itemInputValue:s,itemUrl:c,refresh:n,source:o,state:r.getState()},i))})}},s)}}}function O9(e){"@babel/helpers - typeof";return O9=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},O9(e)}function SGr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function CGr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?SGr(Object(n),!0).forEach(function(t){wGr(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):SGr(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function wGr(e,t,n){return t=TGr(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function TGr(e){var t=EGr(e,`string`);return O9(t)===`symbol`?t:String(t)}function EGr(e,t){if(O9(e)!==`object`||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(O9(r)!==`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function DGr(e){var t=e.plugins,n=e.options,r=(n.__autocomplete_metadata?.userAgents||[])[0]?.segment,i=r?wGr({},r,Object.keys(n.__autocomplete_metadata?.options||{})):{};return{plugins:t.map(function(e){return{name:e.name,options:Object.keys(e.__autocomplete_pluginOptions||[])}}),options:CGr({"autocomplete-core":Object.keys(n)},i),ua:WHr.concat(n.__autocomplete_metadata?.userAgents||[])}}function OGr(e){var t,n=e.metadata,r=e.environment;if((t=r.navigator)!=null&&t.userAgent?.includes(`Algolia Crawler`)){var i=r.document.createElement(`meta`),a=r.document.querySelector(`head`);i.name=`algolia:metadata`,setTimeout(function(){i.content=JSON.stringify(n),a.appendChild(i)},0)}}function kGr(e){var t=e.state;return t.isOpen===!1||t.activeItemId===null?null:u9(t)?.itemInputValue||null}function k9(e){"@babel/helpers - typeof";return k9=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},k9(e)}function AGr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function A9(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?AGr(Object(n),!0).forEach(function(t){jGr(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):AGr(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function jGr(e,t,n){return t=MGr(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function MGr(e){var t=NGr(e,`string`);return k9(t)===`symbol`?t:String(t)}function NGr(e,t){if(k9(e)!==`object`||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(k9(r)!==`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var PGr=function(e,t){switch(t.type){case`setActiveItemId`:return A9(A9({},e),{},{activeItemId:t.payload});case`setQuery`:return A9(A9({},e),{},{query:t.payload,completion:null});case`setCollections`:return A9(A9({},e),{},{collections:t.payload});case`setIsOpen`:return A9(A9({},e),{},{isOpen:t.payload});case`setStatus`:return A9(A9({},e),{},{status:t.payload});case`setContext`:return A9(A9({},e),{},{context:A9(A9({},e.context),t.payload)});case`ArrowDown`:var n=A9(A9({},e),{},{activeItemId:t.payload.hasOwnProperty(`nextActiveItemId`)?t.payload.nextActiveItemId:UUr(1,e.activeItemId,RHr(e),t.props.defaultActiveItemId)});return A9(A9({},n),{},{completion:kGr({state:n})});case`ArrowUp`:var r=A9(A9({},e),{},{activeItemId:UUr(-1,e.activeItemId,RHr(e),t.props.defaultActiveItemId)});return A9(A9({},r),{},{completion:kGr({state:r})});case`Escape`:return e.isOpen?A9(A9({},e),{},{activeItemId:null,isOpen:!1,completion:null}):A9(A9({},e),{},{activeItemId:null,query:``,status:`idle`,collections:[]});case`submit`:return A9(A9({},e),{},{activeItemId:null,isOpen:!1,status:`idle`});case`reset`:return A9(A9({},e),{},{activeItemId:t.props.openOnFocus===!0?t.props.defaultActiveItemId:null,status:`idle`,completion:null,query:``});case`focus`:return A9(A9({},e),{},{activeItemId:t.props.defaultActiveItemId,isOpen:(t.props.openOnFocus||!!e.query)&&t.props.shouldPanelOpen({state:e})});case`blur`:return t.props.debug?e:A9(A9({},e),{},{isOpen:!1,activeItemId:null});case`mousemove`:return A9(A9({},e),{},{activeItemId:t.payload});case`mouseleave`:return A9(A9({},e),{},{activeItemId:t.props.defaultActiveItemId});default:return n9(!1,`The reducer action ${JSON.stringify(t.type)} is not supported.`),e}};function j9(e){"@babel/helpers - typeof";return j9=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},j9(e)}function FGr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function M9(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?FGr(Object(n),!0).forEach(function(t){IGr(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):FGr(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function IGr(e,t,n){return t=LGr(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function LGr(e){var t=RGr(e,`string`);return j9(t)===`symbol`?t:String(t)}function RGr(e,t){if(j9(e)!==`object`||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(j9(r)!==`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function zGr(e){LUr(e);var t=[],n=TWr(e,t),r=cWr(PGr,n,o),i=mWr({store:r}),a=xGr(M9({props:n,refresh:s,store:r,navigator:n.navigator},i));function o(e){var t,r,a=e.prevState,o=e.state;if(n.onStateChange(M9({prevState:a,state:o,refresh:s,navigator:n.navigator},i)),!l()&&(t=o.context)!=null&&(r=t.algoliaInsightsPlugin)!=null&&r.__automaticInsights&&n.insights!==!1){var u=MUr({__autocomplete_clickAnalytics:!1});n.plugins.push(u),c([u])}}function s(){return S9(M9({event:new Event(`input`),nextState:{isOpen:r.getState().isOpen},props:n,navigator:n.navigator,query:r.getState().query,refresh:s,store:r},i))}function c(e){e.forEach(function(e){return e.subscribe?.call(e,M9(M9({},i),{},{navigator:n.navigator,refresh:s,onSelect:function(e){t.push({onSelect:e})},onActive:function(e){t.push({onActive:e})},onResolve:function(e){t.push({onResolve:e})}}))})}function l(){return n.plugins.some(function(e){return e.name===`aa.algoliaInsightsPlugin`})}if(n.insights&&!l()){var u=typeof n.insights==`boolean`?{}:n.insights;n.plugins.push(MUr(u))}return c(n.plugins),OGr({metadata:DGr({plugins:n.plugins,options:e}),environment:n.environment}),M9(M9({refresh:s,navigator:n.navigator},a),i)}var BGr=`__aa-highlight__`,VGr=`__/aa-highlight__`;function HGr(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return{get:function(){return e},add:function(t){var n=e[e.length-1];n?.isHighlighted===t.isHighlighted?e[e.length-1]={value:n.value+t.value,isHighlighted:n.isHighlighted}:e.push(t)}}}function UGr(e){var t=e.highlightedValue.split(BGr),n=t.shift(),r=HGr(n?[{value:n,isHighlighted:!1}]:[]);return t.forEach(function(e){var t=e.split(VGr);r.add({value:t[0],isHighlighted:!0}),t[1]!==``&&r.add({value:t[1],isHighlighted:!1})}),r.get()}function WGr(e){return JGr(e)||qGr(e)||KGr(e)||GGr()}function GGr(){throw TypeError(`Invalid attempt to spread non-iterable instance.
|
|
1528
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function KGr(e,t){if(e){if(typeof e==`string`)return YGr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return YGr(e,t)}}function qGr(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function JGr(e){if(Array.isArray(e))return YGr(e)}function YGr(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function XGr(e){var t=e.hit,n=e.attribute,r=Array.isArray(n)?n:[n],i=LHr(t,[`_highlightResult`].concat(WGr(r),[`value`]));return typeof i!=`string`&&(process.env.NODE_ENV!==`production`&&KHr(!1,`The attribute "${r.join(`.`)}" described by the path ${JSON.stringify(r)} does not exist on the hit. Did you set it in \`attributesToHighlight\`?
|
|
1529
|
+
See https://www.algolia.com/doc/api-reference/api-parameters/attributesToHighlight/`),i=LHr(t,r)||``),UGr({highlightedValue:i})}function N9(e){"@babel/helpers - typeof";return N9=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},N9(e)}function ZGr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function QGr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?ZGr(Object(n),!0).forEach(function(t){$Gr(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ZGr(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function $Gr(e,t,n){return t=eKr(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function eKr(e){var t=tKr(e,`string`);return N9(t)===`symbol`?t:String(t)}function tKr(e,t){if(N9(e)!==`object`||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(N9(r)!==`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function nKr(e,t){function n(t){return e({searchClient:t.searchClient,queries:t.requests.map(function(e){return e.query})}).then(function(e){return e.map(function(e,n){var r=t.requests[n];return{items:e,sourceId:r.sourceId,transformResponse:r.transformResponse}})})}return function(e){return function(r){return QGr(QGr({requesterId:t,execute:n},e),r)}}}function rKr(e){var t=e.transporter||{},n=t.headers||t.baseHeaders||{},r=t.queryParameters||t.baseQueryParameters||{},i=`x-algolia-application-id`,a=`x-algolia-api-key`;return{appId:n[i]||r[i],apiKey:n[a]||r[a]}}function P9(e){"@babel/helpers - typeof";return P9=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},P9(e)}var iKr=[`params`];function aKr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function F9(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?aKr(Object(n),!0).forEach(function(t){oKr(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):aKr(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function oKr(e,t,n){return t=sKr(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function sKr(e){var t=cKr(e,`string`);return P9(t)===`symbol`?t:String(t)}function cKr(e,t){if(P9(e)!==`object`||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(P9(r)!==`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function lKr(e,t){if(e==null)return{};var n=uKr(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function uKr(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],t.indexOf(i)>=0||(n[i]=e[i]);return n}function dKr(e){return hKr(e)||mKr(e)||pKr(e)||fKr()}function fKr(){throw TypeError(`Invalid attempt to spread non-iterable instance.
|
|
1530
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function pKr(e,t){if(e){if(typeof e==`string`)return gKr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return gKr(e,t)}}function mKr(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function hKr(e){if(Array.isArray(e))return gKr(e)}function gKr(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function _Kr(e){var t=e.searchClient,n=e.queries,r=e.userAgents,i=r===void 0?[]:r;typeof t.addAlgoliaAgent==`function`&&[].concat(dKr(WHr),dKr(i)).forEach(function(e){var n=e.segment,r=e.version;t.addAlgoliaAgent(n,r)});var a=rKr(t),o=a.appId,s=a.apiKey;return n9(!!o,"The Algolia `appId` was not accessible from the searchClient passed."),n9(!!s,"The Algolia `apiKey` was not accessible from the searchClient passed."),t.search(n.map(function(e){var t=e.params;return F9(F9({},lKr(e,iKr)),{},{params:F9({hitsPerPage:5,highlightPreTag:BGr,highlightPostTag:VGr},t)})})).then(function(e){return e.results.map(function(e,t){return F9(F9({},e),{},{hits:e.hits?.map(function(r){return F9(F9({},r),{},{__autocomplete_indexName:e.index||n[t].indexName,__autocomplete_queryID:e.queryID,__autocomplete_algoliaCredentials:{appId:o,apiKey:s}})})})})})}var vKr=nKr(_Kr,`algolia`);function yKr(e){"@babel/helpers - typeof";return yKr=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},yKr(e)}function bKr(e){return n9(yKr(e.searchClient)===`object`,"The `searchClient` parameter is required for getAlgoliaResults({ searchClient })."),vKr({transformResponse:function(e){return e.hits}})(e)}var xKr=[{segment:`autocomplete-js`,version:UHr}];function I9(e){"@babel/helpers - typeof";return I9=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},I9(e)}function SKr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function CKr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?SKr(Object(n),!0).forEach(function(t){wKr(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):SKr(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function wKr(e,t,n){return t=TKr(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function TKr(e){var t=EKr(e,`string`);return I9(t)===`symbol`?t:String(t)}function EKr(e,t){if(I9(e)!==`object`||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(I9(r)!==`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var DKr=nKr(function(e){return _Kr(CKr(CKr({},e),{},{userAgents:xKr}))},`algolia`)({transformResponse:function(e){return e.hits}});function OKr(e){var t=e.onTapAhead;return{item:function(e){var n=e.item,r=e.createElement,i=e.components;return n.__autocomplete_qsCategory?r(`div`,{className:`aa-ItemWrapper`},r(`div`,{className:`aa-ItemContent aa-ItemContent--indented`},r(`div`,{className:`aa-ItemContentSubtitle aa-ItemContentSubtitle--standalone`},r(`span`,{className:`aa-ItemContentSubtitleIcon`}),r(`span`,null,`in`,` `,r(`span`,{className:`aa-ItemContentSubtitleCategory`},n.__autocomplete_qsCategory))))):r(`div`,{className:`aa-ItemWrapper`},r(`div`,{className:`aa-ItemContent`},r(`div`,{className:`aa-ItemIcon aa-ItemIcon--noBorder`},r(`svg`,{viewBox:`0 0 24 24`,fill:`currentColor`},r(`path`,{d:`M16.041 15.856c-0.034 0.026-0.067 0.055-0.099 0.087s-0.060 0.064-0.087 0.099c-1.258 1.213-2.969 1.958-4.855 1.958-1.933 0-3.682-0.782-4.95-2.050s-2.050-3.017-2.050-4.95 0.782-3.682 2.050-4.95 3.017-2.050 4.95-2.050 3.682 0.782 4.95 2.050 2.050 3.017 2.050 4.95c0 1.886-0.745 3.597-1.959 4.856zM21.707 20.293l-3.675-3.675c1.231-1.54 1.968-3.493 1.968-5.618 0-2.485-1.008-4.736-2.636-6.364s-3.879-2.636-6.364-2.636-4.736 1.008-6.364 2.636-2.636 3.879-2.636 6.364 1.008 4.736 2.636 6.364 3.879 2.636 6.364 2.636c2.125 0 4.078-0.737 5.618-1.968l3.675 3.675c0.391 0.391 1.024 0.391 1.414 0s0.391-1.024 0-1.414z`}))),r(`div`,{className:`aa-ItemContentBody`},r(`div`,{className:`aa-ItemContentTitle`},r(i.ReverseHighlight,{hit:n,attribute:`query`})))),r(`div`,{className:`aa-ItemActions`},r(`button`,{className:`aa-ItemActionButton`,title:`Fill query with "${n.query}"`,onClick:function(e){e.preventDefault(),e.stopPropagation(),t(n)}},r(`svg`,{viewBox:`0 0 24 24`,fill:`currentColor`},r(`path`,{d:`M8 17v-7.586l8.293 8.293c0.391 0.391 1.024 0.391 1.414 0s0.391-1.024 0-1.414l-8.293-8.293h7.586c0.552 0 1-0.448 1-1s-0.448-1-1-1h-10c-0.552 0-1 0.448-1 1v10c0 0.552 0.448 1 1 1s1-0.448 1-1z`})))))}}}function L9(e){"@babel/helpers - typeof";return L9=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},L9(e)}function kKr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function AKr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?kKr(Object(n),!0).forEach(function(t){jKr(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kKr(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function jKr(e,t,n){return t=MKr(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function MKr(e){var t=NKr(e,`string`);return L9(t)===`symbol`?t:String(t)}function NKr(e,t){if(L9(e)!==`object`||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(L9(r)!==`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function PKr(e,t){var n=typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(!n){if(Array.isArray(e)||(n=FKr(e))||t&&e&&typeof e.length==`number`){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
1531
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,o=!1,s;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){o=!0,s=e},f:function(){try{!a&&n.return!=null&&n.return()}finally{if(o)throw s}}}}function FKr(e,t){if(e){if(typeof e==`string`)return IKr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return IKr(e,t)}}function IKr(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function LKr(e){var t=RKr(e),n=t.searchClient,r=t.indexName,i=t.getSearchParams,a=t.transformSource,o=t.categoryAttribute,s=t.itemsWithCategories,c=t.categoriesPerItem;return{name:`aa.querySuggestionsPlugin`,getSources:function(e){var t=e.query,l=e.setQuery,u=e.refresh,d=e.state;function f(e){l(`${e.query} `),u()}return[a({source:{sourceId:`querySuggestionsPlugin`,getItemInputValue:function(e){return e.item.query},getItems:function(){return DKr({searchClient:n,queries:[{indexName:r,query:t,params:i({state:d})}],transformResponse:function(e){var n=e.hits[0];if(!t||!o)return n;var r=0;return n.reduce(function(e,t){var n=[t];if(r<s){var i=(LHr(t,Array.isArray(o)?o:[o])||[]).map(function(e){return e.value}).slice(0,c);i.length>0&&r++;var a=PKr(i),l;try{for(a.s();!(l=a.n()).done;){var u=l.value;n.push(AKr({__autocomplete_qsCategory:u},t))}}catch(e){a.e(e)}finally{a.f()}}return e.push.apply(e,n),e},[])}})},templates:OKr({onTapAhead:f})},onTapAhead:f,state:d})]},__autocomplete_pluginOptions:e}}function RKr(e){return AKr({getSearchParams:function(){return{}},transformSource:function(e){return e.source},itemsWithCategories:1,categoriesPerItem:1},e)}function R9(e){"@babel/helpers - typeof";return R9=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},R9(e)}function zKr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function BKr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?zKr(Object(n),!0).forEach(function(t){VKr(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zKr(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function VKr(e,t,n){return t=HKr(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function HKr(e){var t=UKr(e,`string`);return R9(t)===`symbol`?t:String(t)}function UKr(e,t){if(R9(e)!==`object`||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(R9(r)!==`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function WKr(e){var t=e.item,n=e.query;return BKr(BKr({},t),{},{_highlightResult:{label:{value:n?t.label.replace(new RegExp(n.replace(/[-/\\^$*+?.()|[\]{}]/g,`\\$&`),`gi`),function(e){return`__aa-highlight__${e}__/aa-highlight__`}):t.label}}})}var GKr=`AUTOCOMPLETE_RECENT_SEARCHES`,KKr=`__AUTOCOMPLETE_RECENT_SEARCHES_PLUGIN_TEST_KEY__`;function qKr(){try{return localStorage.setItem(KKr,``),localStorage.removeItem(KKr),!0}catch{return!1}}function JKr(e){var t=e.key;return qKr()?{setItem:function(e){return window.localStorage.setItem(t,JSON.stringify(e))},getItem:function(){var e=window.localStorage.getItem(t);return e?JSON.parse(e):[]}}:{setItem:function(){},getItem:function(){return[]}}}function YKr(e){return $Kr(e)||QKr(e)||ZKr(e)||XKr()}function XKr(){throw TypeError(`Invalid attempt to spread non-iterable instance.
|
|
1532
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ZKr(e,t){if(e){if(typeof e==`string`)return eqr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return eqr(e,t)}}function QKr(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function $Kr(e){if(Array.isArray(e))return eqr(e)}function eqr(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function tqr(e){var t=e.key,n=e.limit,r=e.search,i=JKr({key:t});return{onAdd:function(e){i.setItem([e].concat(YKr(i.getItem())))},onRemove:function(e){i.setItem(i.getItem().filter(function(t){return t.id!==e}))},getAll:function(){return r({query:arguments.length>0&&arguments[0]!==void 0?arguments[0]:``,items:i.getItem(),limit:n}).slice(0,n)}}}function nqr(e){return{addItem:function(t){e.onRemove(t.id),e.onAdd(t)},removeItem:function(t){e.onRemove(t)},getAll:function(t){return e.getAll(t)}}}function rqr(e){var t=e.onRemove,n=e.onTapAhead;return{item:function(e){var r=e.item,i=e.createElement,a=e.components;return i(`div`,{className:`aa-ItemWrapper`},i(`div`,{className:`aa-ItemContent`},i(`div`,{className:`aa-ItemIcon aa-ItemIcon--noBorder`},i(`svg`,{viewBox:`0 0 24 24`,fill:`currentColor`},i(`path`,{d:`M12.516 6.984v5.25l4.5 2.672-0.75 1.266-5.25-3.188v-6h1.5zM12 20.016q3.281 0 5.648-2.367t2.367-5.648-2.367-5.648-5.648-2.367-5.648 2.367-2.367 5.648 2.367 5.648 5.648 2.367zM12 2.016q4.125 0 7.055 2.93t2.93 7.055-2.93 7.055-7.055 2.93-7.055-2.93-2.93-7.055 2.93-7.055 7.055-2.93z`}))),i(`div`,{className:`aa-ItemContentBody`},i(`div`,{className:`aa-ItemContentTitle`},i(a.ReverseHighlight,{hit:r,attribute:`label`}),r.category&&i(`span`,{className:`aa-ItemContentSubtitle aa-ItemContentSubtitle--inline`},i(`span`,{className:`aa-ItemContentSubtitleIcon`}),` in`,` `,i(`span`,{className:`aa-ItemContentSubtitleCategory`},r.category))))),i(`div`,{className:`aa-ItemActions`},i(`button`,{className:`aa-ItemActionButton`,title:`Remove this search`,onClick:function(e){e.preventDefault(),e.stopPropagation(),t(r.id)}},i(`svg`,{viewBox:`0 0 24 24`,fill:`currentColor`},i(`path`,{d:`M18 7v13c0 0.276-0.111 0.525-0.293 0.707s-0.431 0.293-0.707 0.293h-10c-0.276 0-0.525-0.111-0.707-0.293s-0.293-0.431-0.293-0.707v-13zM17 5v-1c0-0.828-0.337-1.58-0.879-2.121s-1.293-0.879-2.121-0.879h-4c-0.828 0-1.58 0.337-2.121 0.879s-0.879 1.293-0.879 2.121v1h-4c-0.552 0-1 0.448-1 1s0.448 1 1 1h1v13c0 0.828 0.337 1.58 0.879 2.121s1.293 0.879 2.121 0.879h10c0.828 0 1.58-0.337 2.121-0.879s0.879-1.293 0.879-2.121v-13h1c0.552 0 1-0.448 1-1s-0.448-1-1-1zM9 5v-1c0-0.276 0.111-0.525 0.293-0.707s0.431-0.293 0.707-0.293h4c0.276 0 0.525 0.111 0.707 0.293s0.293 0.431 0.293 0.707v1zM9 11v6c0 0.552 0.448 1 1 1s1-0.448 1-1v-6c0-0.552-0.448-1-1-1s-1 0.448-1 1zM13 11v6c0 0.552 0.448 1 1 1s1-0.448 1-1v-6c0-0.552-0.448-1-1-1s-1 0.448-1 1z`}))),i(`button`,{className:`aa-ItemActionButton`,title:`Fill query with "${r.label}"`,onClick:function(e){e.preventDefault(),e.stopPropagation(),n(r)}},i(`svg`,{viewBox:`0 0 24 24`,fill:`currentColor`},i(`path`,{d:`M8 17v-7.586l8.293 8.293c0.391 0.391 1.024 0.391 1.414 0s0.391-1.024 0-1.414l-8.293-8.293h7.586c0.552 0 1-0.448 1-1s-0.448-1-1-1h-10c-0.552 0-1 0.448-1 1v10c0 0.552 0.448 1 1 1s1-0.448 1-1z`})))))}}}function z9(e){"@babel/helpers - typeof";return z9=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},z9(e)}function iqr(e){return cqr(e)||sqr(e)||oqr(e)||aqr()}function aqr(){throw TypeError(`Invalid attempt to spread non-iterable instance.
|
|
1533
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function oqr(e,t){if(e){if(typeof e==`string`)return lqr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return lqr(e,t)}}function sqr(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function cqr(e){if(Array.isArray(e))return lqr(e)}function lqr(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function uqr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function B9(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?uqr(Object(n),!0).forEach(function(t){dqr(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):uqr(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function dqr(e,t,n){return t=fqr(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fqr(e){var t=pqr(e,`string`);return z9(t)===`symbol`?t:String(t)}function pqr(e,t){if(z9(e)!==`object`||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(z9(r)!==`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function mqr(e){return function(t){var n=t.onSelect;n(function(t){var n=t.item,r=t.state,i=t.source,a=i.getItemInputValue({item:n,state:r});if(i.sourceId===`querySuggestionsPlugin`&&a){var o={id:a,label:a,category:n.__autocomplete_qsCategory};e.addItem(o)}})}}function hqr(e){var t=gqr(e),n=t.storage,r=t.transformSource,i=t.subscribe,a=nqr(n),o=THr([]);return{name:`aa.recentSearchesPlugin`,subscribe:i??mqr(a),onSubmit:function(e){var t=e.state.query;if(t){var n={id:t,label:t};a.addItem(n)}},getSources:function(e){var t=e.query,n=e.setQuery,i=e.refresh,s=e.state;o.current=a.getAll(t);function c(e){a.removeItem(e),i()}function l(e){n(e.label),i()}return Promise.resolve(o.current).then(function(e){return e.length===0?[]:[r({source:{sourceId:`recentSearchesPlugin`,getItemInputValue:function(e){return e.item.label},getItems:function(){return e},templates:rqr({onRemove:c,onTapAhead:l})},onRemove:c,onTapAhead:l,state:s})]})},data:B9(B9({},a),{},{getAlgoliaSearchParams:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Array.isArray(o.current)?B9(B9({},e),{},{facetFilters:[].concat(iqr(e.facetFilters??[]),iqr(o.current.map(function(e){return[`objectID:-${e.label}`]}))),hitsPerPage:Math.max(1,(e.hitsPerPage??10)-o.current.length)}):(process.env.NODE_ENV!==`production`&&KHr(!1,"The `getAlgoliaSearchParams` function is not supported with storages that return promises in `getAll`."),e)}}),__autocomplete_pluginOptions:e}}function gqr(e){return B9({transformSource:function(e){return e.source}},e)}function _qr(e){var t=e.query,n=e.items,r=e.limit;return t?n.filter(function(e){return e.label.toLowerCase().includes(t.toLowerCase())}).slice(0,r).map(function(e){return WKr({item:e,query:t})}):n.slice(0,r).map(function(e){return WKr({item:e,query:t})})}function V9(e){"@babel/helpers - typeof";return V9=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},V9(e)}function vqr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function yqr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?vqr(Object(n),!0).forEach(function(t){bqr(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vqr(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function bqr(e,t,n){return t=xqr(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xqr(e){var t=Sqr(e,`string`);return V9(t)===`symbol`?t:String(t)}function Sqr(e,t){if(V9(e)!==`object`||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(V9(r)!==`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Cqr(e){var t=wqr(e),n=t.key,r=t.limit,i=t.transformSource,a=t.search,o=t.subscribe;return yqr(yqr({},hqr({transformSource:i,storage:tqr({key:[GKr,n].join(`:`),limit:r,search:a}),subscribe:o})),{},{name:`aa.localStorageRecentSearchesPlugin`,__autocomplete_pluginOptions:e})}function wqr(e){return yqr({limit:5,search:_qr,transformSource:function(e){return e.source}},e)}var Tqr=u(s(((e,t,n)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n||=self).algoliasearch=r()})(n,(function(){"use strict";function e(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function t(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function n(n){for(var r=1;r<arguments.length;r++){var i=arguments[r]==null?{}:arguments[r];r%2?t(Object(i),!0).forEach((function(t){e(n,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):t(Object(i)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))}))}return n}function r(e,t){if(e==null)return{};var n,r,i=function(e,t){if(e==null)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(Symbol.iterator in Object(e)||Object.prototype.toString.call(e)===`[object Arguments]`){var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||s.return==null||s.return()}finally{if(i)throw a}}return n}}(e,t)||function(){throw TypeError(`Invalid attempt to destructure non-iterable instance`)}()}function a(e){return function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||Object.prototype.toString.call(e)===`[object Arguments]`)return Array.from(e)}(e)||function(){throw TypeError(`Invalid attempt to spread non-iterable instance`)}()}function o(e){var t,n=`algoliasearch-client-js-${e.key}`,r=function(){return t===void 0&&(t=e.localStorage||window.localStorage),t},a=function(){return JSON.parse(r().getItem(n)||`{}`)},o=function(e){r().setItem(n,JSON.stringify(e))},s=function(){var t=e.timeToLive?1e3*e.timeToLive:null,n=a(),r=Object.fromEntries(Object.entries(n).filter((function(e){return i(e,2)[1].timestamp!==void 0})));o(r),t&&o(Object.fromEntries(Object.entries(r).filter((function(e){var n=i(e,2)[1],r=new Date().getTime();return!(n.timestamp+t<r)}))))};return{get:function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{miss:function(){return Promise.resolve()}};return Promise.resolve().then((function(){s();var t=JSON.stringify(e);return a()[t]})).then((function(e){return Promise.all([e?e.value:t(),e!==void 0])})).then((function(e){var t=i(e,2),r=t[0],a=t[1];return Promise.all([r,a||n.miss(r)])})).then((function(e){return i(e,1)[0]}))},set:function(e,t){return Promise.resolve().then((function(){var i=a();return i[JSON.stringify(e)]={timestamp:new Date().getTime(),value:t},r().setItem(n,JSON.stringify(i)),t}))},delete:function(e){return Promise.resolve().then((function(){var t=a();delete t[JSON.stringify(e)],r().setItem(n,JSON.stringify(t))}))},clear:function(){return Promise.resolve().then((function(){r().removeItem(n)}))}}}function s(e){var t=a(e.caches),n=t.shift();return n===void 0?{get:function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{miss:function(){return Promise.resolve()}};return t().then((function(e){return Promise.all([e,n.miss(e)])})).then((function(e){return i(e,1)[0]}))},set:function(e,t){return Promise.resolve(t)},delete:function(e){return Promise.resolve()},clear:function(){return Promise.resolve()}}:{get:function(e,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{miss:function(){return Promise.resolve()}};return n.get(e,r,i).catch((function(){return s({caches:t}).get(e,r,i)}))},set:function(e,r){return n.set(e,r).catch((function(){return s({caches:t}).set(e,r)}))},delete:function(e){return n.delete(e).catch((function(){return s({caches:t}).delete(e)}))},clear:function(){return n.clear().catch((function(){return s({caches:t}).clear()}))}}}function c(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{serializable:!0},t={};return{get:function(n,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{miss:function(){return Promise.resolve()}},a=JSON.stringify(n);if(a in t)return Promise.resolve(e.serializable?JSON.parse(t[a]):t[a]);var o=r(),s=i&&i.miss||function(){return Promise.resolve()};return o.then((function(e){return s(e)})).then((function(){return o}))},set:function(n,r){return t[JSON.stringify(n)]=e.serializable?JSON.stringify(r):r,Promise.resolve(r)},delete:function(e){return delete t[JSON.stringify(e)],Promise.resolve()},clear:function(){return t={},Promise.resolve()}}}function l(e){for(var t=e.length-1;t>0;t--){var n=Math.floor(Math.random()*(t+1)),r=e[t];e[t]=e[n],e[n]=r}return e}function u(e,t){return t&&Object.keys(t).forEach((function(n){e[n]=t[n](e)})),e}function d(e){var t=[...arguments].slice(1),n=0;return e.replace(/%s/g,(function(){return encodeURIComponent(t[n++])}))}var f={WithinQueryParameters:0,WithinHeaders:1};function p(e,t){var n=e||{},r=n.data||{};return Object.keys(n).forEach((function(e){[`timeout`,`headers`,`queryParameters`,`data`,`cacheable`].indexOf(e)===-1&&(r[e]=n[e])})),{data:Object.entries(r).length>0?r:void 0,timeout:n.timeout||t,headers:n.headers||{},queryParameters:n.queryParameters||{},cacheable:n.cacheable}}var m={Read:1,Write:2,Any:3},h=1,g=2,_=3;function v(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:h;return n(n({},e),{},{status:t,lastUpdate:Date.now()})}function y(e){return typeof e==`string`?{protocol:`https`,url:e,accept:m.Any}:{protocol:e.protocol||`https`,url:e.url,accept:e.accept||m.Any}}var b=`GET`,x=`POST`;function S(e,t){return Promise.all(t.map((function(t){return e.get(t,(function(){return Promise.resolve(v(t))}))}))).then((function(e){var n=e.filter((function(e){return function(e){return e.status===h||Date.now()-e.lastUpdate>12e4}(e)})),r=e.filter((function(e){return function(e){return e.status===_&&Date.now()-e.lastUpdate<=12e4}(e)})),i=[].concat(a(n),a(r));return{getTimeout:function(e,t){return(r.length===0&&e===0?1:r.length+3+e)*t},statelessHosts:i.length>0?i.map((function(e){return y(e)})):t}}))}function C(e,t,r,i){var o=[],s=function(e,t){if(!(e.method===b||e.data===void 0&&t.data===void 0)){var r=Array.isArray(e.data)?e.data:n(n({},e.data),t.data);return JSON.stringify(r)}}(r,i),c=function(e,t){var r=n(n({},e.headers),t.headers),i={};return Object.keys(r).forEach((function(e){var t=r[e];i[e.toLowerCase()]=t})),i}(e,i),l=r.method,u=r.method===b?n(n({},r.data),i.data):{},d=n(n(n({"x-algolia-agent":e.userAgent.value},e.queryParameters),u),i.queryParameters),f=0,p=function t(n,a){var u=n.pop();if(u===void 0)throw{name:`RetryError`,message:`Unreachable hosts - your application id may be incorrect. If the error persists, please reach out to the Algolia Support team: https://alg.li/support .`,transporterStackTrace:D(o)};var p={data:s,headers:c,method:l,url:T(u,r.path,d),connectTimeout:a(f,e.timeouts.connect),responseTimeout:a(f,i.timeout)},m=function(e){var t={request:p,response:e,host:u,triesLeft:n.length};return o.push(t),t},h={onSuccess:function(e){return function(e){try{return JSON.parse(e.content)}catch(t){throw function(e,t){return{name:`DeserializationError`,message:e,response:t}}(t.message,e)}}(e)},onRetry:function(r){var i=m(r);return r.isTimedOut&&f++,Promise.all([e.logger.info(`Retryable failure`,O(i)),e.hostsCache.set(u,v(u,r.isTimedOut?_:g))]).then((function(){return t(n,a)}))},onFail:function(e){throw m(e),function(e,t){var n=e.content,r=e.status,i=n;try{i=JSON.parse(n).message}catch{}return function(e,t,n){return{name:`ApiError`,message:e,status:t,transporterStackTrace:n}}(i,r,t)}(e,D(o))}};return e.requester.send(p).then((function(e){return function(e,t){return function(e){var t=e.status;return e.isTimedOut||function(e){var t=e.isTimedOut,n=e.status;return!t&&~~n==0}(e)||~~(t/100)!=2&&~~(t/100)!=4}(e)?t.onRetry(e):~~(e.status/100)==2?t.onSuccess(e):t.onFail(e)}(e,h)}))};return S(e.hostsCache,t).then((function(e){return p(a(e.statelessHosts).reverse(),e.getTimeout)}))}function w(e){var t={value:`Algolia for JavaScript (${e})`,add:function(e){var n=`; ${e.segment}${e.version===void 0?``:` (${e.version})`}`;return t.value.indexOf(n)===-1&&(t.value=`${t.value}${n}`),t}};return t}function T(e,t,n){var r=E(n),i=`${e.protocol}://${e.url}/${t.charAt(0)===`/`?t.substr(1):t}`;return r.length&&(i+=`?${r}`),i}function E(e){return Object.keys(e).map((function(t){return d(`%s=%s`,t,(n=e[t],Object.prototype.toString.call(n)===`[object Object]`||Object.prototype.toString.call(n)===`[object Array]`?JSON.stringify(e[t]):e[t]));var n})).join(`&`)}function D(e){return e.map((function(e){return O(e)}))}function O(e){var t=e.request.headers[`x-algolia-api-key`]?{"x-algolia-api-key":`*****`}:{};return n(n({},e),{},{request:n(n({},e.request),{},{headers:n(n({},e.request.headers),t)})})}var k=function(e){var t=e.appId,r=function(e,t,n){var r={"x-algolia-api-key":n,"x-algolia-application-id":t};return{headers:function(){return e===f.WithinHeaders?r:{}},queryParameters:function(){return e===f.WithinQueryParameters?r:{}}}}(e.authMode===void 0?f.WithinHeaders:e.authMode,t,e.apiKey),a=function(e){var t=e.hostsCache,n=e.logger,r=e.requester,a=e.requestsCache,o=e.responsesCache,s=e.timeouts,c=e.userAgent,l=e.hosts,u=e.queryParameters,d={hostsCache:t,logger:n,requester:r,requestsCache:a,responsesCache:o,timeouts:s,userAgent:c,headers:e.headers,queryParameters:u,hosts:l.map((function(e){return y(e)})),read:function(e,t){var n=p(t,d.timeouts.read),r=function(){return C(d,d.hosts.filter((function(e){return(e.accept&m.Read)!=0})),e,n)};if(!0!==(n.cacheable===void 0?e.cacheable:n.cacheable))return r();var a={request:e,mappedRequestOptions:n,transporter:{queryParameters:d.queryParameters,headers:d.headers}};return d.responsesCache.get(a,(function(){return d.requestsCache.get(a,(function(){return d.requestsCache.set(a,r()).then((function(e){return Promise.all([d.requestsCache.delete(a),e])}),(function(e){return Promise.all([d.requestsCache.delete(a),Promise.reject(e)])})).then((function(e){var t=i(e,2);return t[0],t[1]}))}))}),{miss:function(e){return d.responsesCache.set(a,e)}})},write:function(e,t){return C(d,d.hosts.filter((function(e){return(e.accept&m.Write)!=0})),e,p(t,d.timeouts.write))}};return d}(n(n({hosts:[{url:`${t}-dsn.algolia.net`,accept:m.Read},{url:`${t}.algolia.net`,accept:m.Write}].concat(l([{url:`${t}-1.algolianet.com`},{url:`${t}-2.algolianet.com`},{url:`${t}-3.algolianet.com`}]))},e),{},{headers:n(n(n({},r.headers()),{"content-type":`application/x-www-form-urlencoded`}),e.headers),queryParameters:n(n({},r.queryParameters()),e.queryParameters)}));return u({transporter:a,appId:t,addAlgoliaAgent:function(e,t){a.userAgent.add({segment:e,version:t})},clearCache:function(){return Promise.all([a.requestsCache.clear(),a.responsesCache.clear()]).then((function(){}))}},e.methods)},A=function(e){return function(t,n){return t.method===b?e.transporter.read(t,n):e.transporter.write(t,n)}},ee=function(e){return function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return u({transporter:e.transporter,appId:e.appId,indexName:t},n.methods)}},j=function(e){return function(t,r){var i=t.map((function(e){return n(n({},e),{},{params:E(e.params||{})})}));return e.transporter.read({method:x,path:`1/indexes/*/queries`,data:{requests:i},cacheable:!0},r)}},M=function(e){return function(t,i){return Promise.all(t.map((function(t){var a=t.params,o=a.facetName,s=a.facetQuery,c=r(a,[`facetName`,`facetQuery`]);return ee(e)(t.indexName,{methods:{searchForFacetValues:ne}}).searchForFacetValues(o,s,n(n({},i),c))})))}},te=function(e){return function(t,n,r){return e.transporter.read({method:x,path:d(`1/answers/%s/prediction`,e.indexName),data:{query:t,queryLanguages:n},cacheable:!0},r)}},N=function(e){return function(t,n){return e.transporter.read({method:x,path:d(`1/indexes/%s/query`,e.indexName),data:{query:t},cacheable:!0},n)}},ne=function(e){return function(t,n,r){return e.transporter.read({method:x,path:d(`1/indexes/%s/facets/%s/query`,e.indexName,t),data:{facetQuery:n},cacheable:!0},r)}},re=1,ie=2,P=3,ae=function(e){return function(t,r){var i=t.map((function(e){return n(n({},e),{},{threshold:e.threshold||0})}));return e.transporter.read({method:x,path:`1/indexes/*/recommendations`,data:{requests:i},cacheable:!0},r)}};function F(e,t,r){var i;return k(n(n(n({},{appId:e,apiKey:t,timeouts:{connect:1,read:2,write:30},requester:{send:function(e){return new Promise((function(t){var n=new XMLHttpRequest;n.open(e.method,e.url,!0),Object.keys(e.headers).forEach((function(t){return n.setRequestHeader(t,e.headers[t])}));var r,i=function(e,r){return setTimeout((function(){n.abort(),t({status:0,content:r,isTimedOut:!0})}),1e3*e)},a=i(e.connectTimeout,`Connection timeout`);n.onreadystatechange=function(){n.readyState>n.OPENED&&r===void 0&&(clearTimeout(a),r=i(e.responseTimeout,`Socket timeout`))},n.onerror=function(){n.status===0&&(clearTimeout(a),clearTimeout(r),t({content:n.responseText||`Network request failed`,status:n.status,isTimedOut:!1}))},n.onload=function(){clearTimeout(a),clearTimeout(r),t({content:n.responseText,status:n.status,isTimedOut:!1})},n.send(e.data)}))}},logger:(i=P,{debug:function(e,t){return re>=i&&console.debug(e,t),Promise.resolve()},info:function(e,t){return ie>=i&&console.info(e,t),Promise.resolve()},error:function(e,t){return console.error(e,t),Promise.resolve()}}),responsesCache:c(),requestsCache:c({serializable:!1}),hostsCache:s({caches:[o({key:`4.24.0-${e}`}),c()]}),userAgent:w(`4.24.0`).add({segment:`Browser`,version:`lite`}),authMode:f.WithinQueryParameters}),r),{},{methods:{search:j,searchForFacetValues:M,multipleQueries:j,multipleSearchForFacetValues:M,customRequest:A,initIndex:function(e){return function(t){return ee(e)(t,{methods:{search:N,searchForFacetValues:ne,findAnswers:te}})}},getRecommendations:ae}}))}return F.version=`4.24.0`,F}))}))()),Eqr=U7(H7.div`
|
|
1534
1534
|
background: ${q7(`colors.base.white`)};
|
|
1535
1535
|
box-shadow: ${q7(`shadows.medium`)};
|
|
1536
1536
|
height: 60px;
|
|
@@ -1615,7 +1615,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1615
1615
|
margin-right: 1rem;
|
|
1616
1616
|
}
|
|
1617
1617
|
}
|
|
1618
|
-
`),
|
|
1618
|
+
`),Dqr=U7(H7.div`
|
|
1619
1619
|
display: flex;
|
|
1620
1620
|
overflow: hidden;
|
|
1621
1621
|
pointer-events: none;
|
|
@@ -1635,7 +1635,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1635
1635
|
}
|
|
1636
1636
|
|
|
1637
1637
|
${gd}
|
|
1638
|
-
`),
|
|
1638
|
+
`),Oqr=U7(H7.div`
|
|
1639
1639
|
background: ${e=>e.theme.colors.base.primary};
|
|
1640
1640
|
border-radius: 50%;
|
|
1641
1641
|
color: ${e=>e.theme.colors.base.white};
|
|
@@ -1643,39 +1643,39 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1643
1643
|
padding: 9px;
|
|
1644
1644
|
|
|
1645
1645
|
${gd}
|
|
1646
|
-
`),
|
|
1646
|
+
`),kqr=U7(H7.div`
|
|
1647
1647
|
background: ${e=>e.theme.colors.base.primary};
|
|
1648
1648
|
padding: 9px;
|
|
1649
1649
|
border-radius: 50%;
|
|
1650
1650
|
line-height: 0;
|
|
1651
1651
|
color: ${e=>e.theme.colors.base.white};
|
|
1652
1652
|
${gd}
|
|
1653
|
-
`),
|
|
1653
|
+
`),Aqr=U7(H7.div`
|
|
1654
1654
|
width: 100%;
|
|
1655
1655
|
display: flex;
|
|
1656
1656
|
justify-content: space-between;
|
|
1657
1657
|
align-items: center;
|
|
1658
1658
|
${gd}
|
|
1659
|
-
`),
|
|
1659
|
+
`),jqr=U7(H7.div`
|
|
1660
1660
|
width: 100%;
|
|
1661
1661
|
height: 100%;
|
|
1662
1662
|
display: flex;
|
|
1663
1663
|
align-items: center;
|
|
1664
1664
|
${gd}
|
|
1665
|
-
`),
|
|
1665
|
+
`),Mqr=U7(H7.input`
|
|
1666
1666
|
width: 100%;
|
|
1667
1667
|
height: 100%;
|
|
1668
1668
|
border: none;
|
|
1669
1669
|
font-size: 20px;
|
|
1670
1670
|
${gd}
|
|
1671
|
-
`),
|
|
1671
|
+
`),Nqr=U7(H7.div`
|
|
1672
1672
|
color: #27272e54;
|
|
1673
1673
|
&:hover {
|
|
1674
1674
|
color: ${q7(`colors.base.secondary`)};
|
|
1675
1675
|
cursor: pointer;
|
|
1676
1676
|
}
|
|
1677
1677
|
${gd}
|
|
1678
|
-
`),H9={Input:
|
|
1678
|
+
`),H9={Input:Mqr,Interface:Aqr,InterfaceWrapper:jqr,IconWrapper:U7(H7.div`
|
|
1679
1679
|
color: #27272e54;
|
|
1680
1680
|
transition: 0.2s;
|
|
1681
1681
|
&:hover {
|
|
@@ -1683,11 +1683,11 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1683
1683
|
cursor: pointer;
|
|
1684
1684
|
}
|
|
1685
1685
|
${gd}
|
|
1686
|
-
`),Profile:
|
|
1686
|
+
`),Profile:Oqr,SearchIcon:kqr,TextPrompt:Dqr,Wrapper:Eqr,X:Nqr};Ow();var Pqr=428,Fqr=(0,Tqr.default)(`Z0GWPR8XBE`,`251ec8d76f6c62ac793c1337b39bda58`),Iqr=Cqr({key:`navbar`,transformSource({source:e}){return{...e,onSelect({setIsOpen:e}){e(!0)}}}});function Lqr({autocompleteState:e,setAutocompleteState:t,setShowTextPrompt:n,getAutocompleteInstance:r}){let i=k7(),a=(0,S.useRef)(null);function o(t,n,r){let i=document.querySelectorAll(t),a=document.querySelector(r);if(e.isOpen){if(i.length===0||!a)return;a.addEventListener(`mouseover`,function(){i.forEach(function(e){let t=e.querySelectorAll(n);for(let e=0;e<t.length;e++)t[e].setAttribute(`aria-selected`,`false`)})})}}let s=()=>{let e=p.value;e&&Iqr.data.addItem({id:e,label:e,_highLightResult:{label:{value:e}}}),u.setQuery(``),u.refresh()},c=e=>{e.preventDefault();let t=p.value;t&&(Iqr.data.addItem({id:t,label:t,_highLightResult:{label:{value:t}}}),u.setQuery(t)),u.refresh()},l=LKr({searchClient:Fqr,indexName:`ContentItem_${i.church}`,transformSource({source:e}){return{...e,onSelect({setQuery:e,item:t,setIsOpen:n,refresh:r,event:i}){i.preventDefault(),i.stopPropagation(),n(!0),e(t.title),r()}}}}),u=(0,S.useMemo)(()=>zGr({openOnFocus:!0,plugins:[l],shouldPanelOpen({state:e}){return e.query!==``||e.collections?.length>0},onStateChange({state:e,...n}){let r=window.innerWidth<Pqr&&e.query!==n.prevState.query?document.getElementById(`panel-top`):null;r&&r.scrollIntoView({behavior:`instant`,block:`start`}),t(e)},getSources({query:e}){return e?[{sourceId:`pages`,getItemInputValue({item:e}){return e.query},getItems({query:e}){return bKr({searchClient:Fqr,queries:[{indexName:`WebPages_Global`,query:e,params:{facetFilters:[`church:${i.church}`],hitsPerPage:4,clickAnalytics:!0,getRankingInfo:!0}}]})},getItemUrl({item:e}){return e?.name?`/?query=${e.name}`:e.url}},{sourceId:`content`,getItemInputValue({item:e}){return e.query},getItems({query:e}){return bKr({searchClient:Fqr,queries:[{indexName:`ContentItem_${i.church}`,query:e,params:{hitsPerPage:8,clickAnalytics:!0,getRankingInfo:!0}}]})},getItemUrl({item:e}){return e?.name?`/?query=${e.name}`:`?id=${SVr(e)}`}}]:[]}}),[]),d=`autocomplete-1-label`,f=u.getRootProps({}),p=u.getInputProps({}),m=u.getPanelProps({}),h=u.getFormProps({inputElement:a.current});return p.id=`autocomplete-1-input`,p.onFocus=()=>{u.setIsOpen(!0),u.refresh()},h.onSubmit=c,f[`aria-labelledby`]=d,p[`aria-labelledby`]=d,m[`aria-labelledby`]=d,(0,S.useEffect)(()=>{function t(t){e.isOpen&&!t.target.closest(`#search`)&&(u.setIsOpen(!1),u.setQuery(``),n(!0))}function r(){document.body.style.overflow=`hidden`}function i(){document.body.style.overflow=``}return e.isOpen&&window.innerWidth<Pqr?r():i(),o(`.aa-List`,`.aa-Item`,`.empty-feed`),document.addEventListener(`click`,t),()=>{document.removeEventListener(`click`,t)}},[e.isOpen,u,n]),(0,S.useEffect)(()=>{r&&r(u)},[u]),(0,q.jsx)(`div`,{className:`aa-Autocomplete`,...f,children:(0,q.jsxs)(`form`,{className:`aa-Form`,...h,children:[(0,q.jsx)(`input`,{ref:a,className:`aa-Input`,...p}),p.value===``?null:(0,q.jsx)(`div`,{className:`aa-ClearButton`,onClick:s,children:(0,q.jsx)(H9.IconWrapper,{children:(0,q.jsx)(Dw,{size:18,weight:`fill`})})})]})})}fT(),Upt();var Rqr=H7.div`
|
|
1687
1687
|
.aa-Panel button {
|
|
1688
1688
|
all: unset; /* Reset styles for buttons leaking from .aa-Panel */
|
|
1689
1689
|
}
|
|
1690
|
-
`;function
|
|
1690
|
+
`;function zqr({hit:e}){return e?.title}function Bqr({hit:e,attribute:t,tagName:n=`mark`}){return(0,S.createElement)(S.Fragment,{},XGr({hit:e,attribute:t}).map(({value:e,isHighlighted:t},r)=>t?(0,S.createElement)(n,{key:r},e):e))}function Vqr({item:e,autocomplete:t,handleActionPress:n}){return(0,q.jsxs)(J7,{className:`aa-ItemWrapper`,px:`xs`,children:[(0,q.jsxs)(`div`,{className:`aa-ItemContent`,children:[(0,q.jsx)(`div`,{className:`aa-ItemIcon aa-ItemIcon--noBorder`,children:(0,q.jsx)(pq,{size:24,weight:`bold`})}),(0,q.jsx)(`div`,{className:`aa-ItemContentBody`,children:(0,q.jsx)(`div`,{className:`aa-ItemContentTitle`,children:(0,q.jsx)(zqr,{hit:e})})})]}),(0,q.jsx)(`div`,{className:`aa-ItemActions`,children:(0,q.jsx)(`button`,{className:`aa-ItemActionButton`,title:`Fill query with "${e.title}"`,onClick:n=>{n.preventDefault(),n.stopPropagation(),t.setQuery(e.title),t.refresh()},children:(0,q.jsx)(dT,{size:24,weight:`bold`})})})]})}function Hqr({item:e,autocomplete:t}){function n(e){t.refresh()}function r(e){t.setQuery(e.label),t.setIsOpen(!0),t.refresh()}return(0,q.jsxs)(J7,{className:`aa-ItemWrapper`,px:`xs`,children:[(0,q.jsxs)(`div`,{className:`aa-ItemContent`,children:[(0,q.jsx)(`div`,{className:`aa-ItemIcon aa-ItemIcon--noBorder`,children:(0,q.jsx)(Hpt,{size:24,weight:`bold`})}),(0,q.jsx)(`div`,{className:`aa-ItemContentBody`,children:(0,q.jsx)(`div`,{className:`aa-ItemContentTitle`,children:(0,q.jsx)(Bqr,{hit:e,attribute:`label`})})})]}),(0,q.jsxs)(`div`,{className:`aa-ItemActions`,children:[(0,q.jsx)(`button`,{className:`aa-ItemActionButton`,title:`Remove this search`,onClick:t=>{t.preventDefault(),t.stopPropagation(),n(e.id)},children:(0,q.jsx)(`svg`,{viewBox:`0 0 24 24`,fill:`currentColor`,children:(0,q.jsx)(`path`,{d:`M18 7v13c0 0.276-0.111 0.525-0.293 0.707s-0.431 0.293-0.707 0.293h-10c-0.276 0-0.525-0.111-0.707-0.293s-0.293-0.431-0.293-0.707v-13zM17 5v-1c0-0.828-0.337-1.58-0.879-2.121s-1.293-0.879-2.121-0.879h-4c-0.828 0-1.58 0.337-2.121 0.879s-0.879 1.293-0.879 2.121v1h-4c-0.552 0-1 0.448-1 1s0.448 1 1 1h1v13c0 0.828 0.337 1.58 0.879 2.121s1.293 0.879 2.121 0.879h10c0.828 0 1.58-0.337 2.121-0.879s0.879-1.293 0.879-2.121v-13h1c0.552 0 1-0.448 1-1s-0.448-1-1-1zM9 5v-1c0-0.276 0.111-0.525 0.293-0.707s0.431-0.293 0.707-0.293h4c0.276 0 0.525 0.111 0.707 0.293s0.293 0.431 0.293 0.707v1zM9 11v6c0 0.552 0.448 1 1 1s1-0.448 1-1v-6c0-0.552-0.448-1-1-1s-1 0.448-1 1zM13 11v6c0 0.552 0.448 1 1 1s1-0.448 1-1v-6c0-0.552-0.448-1-1-1s-1 0.448-1 1z`})})}),(0,q.jsx)(`button`,{className:`aa-ItemActionButton`,title:`Fill query with "${e.label}"`,onClick:t=>{t.preventDefault(),t.stopPropagation(),r(e)},children:(0,q.jsx)(dT,{size:24,weight:`bold`})})]})]})}var Uqr=({autocompleteState:e,autocomplete:t})=>{let n=k7(),[r,i]=wzr(),{navigate:a}=LVr(),[o,s]=(0,S.useState)(!1);(0,S.useEffect)(()=>{let t=e.collections.find(e=>e.source.sourceId===`pages`)?.items||[],n=e.collections.find(e=>e.source.sourceId===`content`)?.items||[];s(t.length===0&&n.length===0)},[e.collections]);let c=e=>{if(a({id:SVr(e)}),r.modal){let t=SVr(e);i(yzr(t)),i(_zr())}};if(!e||!t)return null;let l=t.getInputProps({}),u=[];return e.collections.filter(e=>[`pages`,`content`].includes(e.source.sourceId)).forEach(e=>{u.push(...e.items.map(t=>({...t,source:e.source})))}),u.sort((e,t)=>e._rankingInfo.nbExactWords>t._rankingInfo.nbExactWords?-1:e._rankingInfo.nbExactWords<t._rankingInfo.nbExactWords?1:e._rankingInfo.proximityDistance<t._rankingInfo.proximityDistance?-1:e._rankingInfo.proximityDistance>t._rankingInfo.proximityDistance?1:e._rankingInfo.userScore>t._rankingInfo.userScore?-1:+(e._rankingInfo.userScore<t._rankingInfo.userScore)),(0,q.jsxs)(J7,{id:`panel`,className:`aa-Panel`,dropdown:e.isOpen,...t.getPanelProps({}),children:[e.isOpen?(0,q.jsx)(`div`,{id:`panel-top`}):null,o&&e.collections.some(e=>[`pages`,`content`].includes(e.source.sourceId))?(0,q.jsx)(J7,{padding:`xs`,fontWeight:`500`,color:`base.gray`,textAlign:`center`,fontStyle:`italic`,children:`No results found`}):null,e.isOpen?e.collections.map((e,n)=>{let{source:r,items:i}=e;if([`querySuggestionsPlugin`].includes(e.source.sourceId))return(0,q.jsxs)(`div`,{className:`aa-Source`,children:[e.source.sourceId===`querySuggestionsPlugin`&&!l.value?(0,q.jsx)(J7,{padding:`xs`,fontWeight:`600`,color:`base.gray`,children:`Trending Searches`}):null,e.source.sourceId===`recentSearchesPlugin`&&!l.value?(0,q.jsx)(J7,{padding:`xs`,fontWeight:`600`,color:`base.gray`,children:`Search History`}):null,(0,q.jsx)(`ul`,{className:`aa-List`,...t.getListProps(),children:i.map((n,i)=>{if(e.source.sourceId===`querySuggestionsPlugin`&&!l.value)return(0,q.jsx)(`li`,{className:`aa-Item`,...t.getItemProps({item:n,source:r}),children:(0,q.jsx)(Vqr,{item:n,autocomplete:t,handleActionPress:c,...t.getItemProps({item:n,source:r})})},`${n.objectID?n.objectID:i}-${e.source.sourceId}`);if(e.source.sourceId===`recentSearchesPlugin`&&!l.value)return(0,q.jsx)(`li`,{className:`aa-Item`,...t.getItemProps({item:n,source:r}),children:(0,q.jsx)(Hqr,{item:n,autocomplete:t,...t.getItemProps({item:n,source:r})})},`${n.objectID?n.objectID:i}-${e.source.sourceId}`)})})]},`source-${n}`)}):null,e.query===``?null:(0,q.jsx)(`div`,{className:`aa-Source`,children:(0,q.jsx)(`ul`,{className:`aa-List`,...t.getListProps(),children:u.map(e=>(0,q.jsx)(J7,{as:`li`,padding:`4px`,...t.getItemProps({item:e,source:e.source}),children:(0,q.jsx)(ww,{as:ST,action:e?.id?.includes(`:`)?`OPEN_NODE`:e?.url?`OPEN_URL`:void 0,relatedNode:e,title:e?.title??void 0,subtitle:e?.summary,leadingAccessory:(0,q.jsx)(Bw,{src:e?.coverImage?.sources?.at(0)?.uri??void 0}),trailingAccessory:(0,q.jsx)(dT,{})})},e.objectID))})}),e.isOpen&&e.query===``&&n.searchFeed?(0,q.jsx)(Rqr,{children:(0,q.jsx)(J7,{className:`empty-feed m-4`,children:(0,q.jsx)(xRr,{id:n.searchFeed})})}):null]})};OVe(),rcn();var Wqr=428,Gqr=(e={})=>{let t=k7(),[n,r]=(0,S.useState)(!0),[i,a]=(0,S.useState)(null),[o,s]=(0,S.useState)({activeItemId:null,collections:[],completion:null,context:{},isOpen:!1,query:``,status:`idle`}),{currentUser:c}=O7(),l=!!c,u=c?.profile?.firstName||``,[d,f]=(0,S.useState)(!1),[p,m]=(0,S.useState)(0),h=(0,q.jsxs)(`strong`,{style:{marginRight:`0.35ch`},children:[`Hey`,u===``?``:` ${u}`,`!`]}),g=d?{width:`400px`}:{width:`225px`},_=t.customPlaceholder?(0,q.jsx)(H9.TextPrompt,{children:(0,q.jsx)(J7,{as:`span`,style:{overflow:`hidden`,whiteSpace:`nowrap`,textOverflow:`ellipsis`,...g},children:t.customPlaceholder})}):(0,q.jsxs)(H9.TextPrompt,{children:[d?null:h,(0,q.jsx)(J7,{as:`span`,style:{overflow:`hidden`,whiteSpace:`nowrap`,textOverflow:`ellipsis`,...g},children:`What are you looking for?`})]});(0,S.useEffect)(()=>{function e(){f(window.innerWidth<Wqr)}return e(),window.addEventListener(`resize`,e),()=>{window.removeEventListener(`resize`,e)}},[]),(0,S.useEffect)(()=>{o.isOpen&&r(!1)},[o.isOpen]),(0,S.useEffect)(()=>(d&&o.isOpen?(m(window.scrollY),document.body.style.position=`fixed`):document.body.style.position=``,()=>{document.body.style.position=``}),[o.isOpen,p,d]);let v=e=>{a(e)},y=()=>{d&&o.isOpen&&(i.setIsOpen(!1),i.setQuery(``),r(!0))};return(0,q.jsx)(J7,{position:`relative`,alignItems:`center`,display:`flex`,flexDirection:`column`,id:`search`,...e,children:(0,q.jsxs)(H9.Wrapper,{dropdown:o.isOpen,children:[(0,q.jsxs)(J7,{display:`flex`,flexDirection:`row`,h:`60px`,w:`100%`,children:[(0,q.jsx)(H9.Interface,{children:(0,q.jsxs)(H9.InterfaceWrapper,{children:[(0,q.jsx)(J7,{padding:`12px`,onClick:y,children:(0,q.jsx)(H9.SearchIcon,{children:d&&o.isOpen?(0,q.jsx)(DVe,{size:18,weight:`bold`,color:l?`white`:null}):(0,q.jsx)(pq,{size:18,weight:`bold`,color:l?`white`:null})})}),(0,q.jsxs)(J7,{width:`100%`,children:[(0,q.jsx)(Lqr,{autocompleteState:o,setAutocompleteState:s,setShowTextPrompt:r,getAutocompleteInstance:v}),n?_:null]})]})}),(0,q.jsx)(J7,{p:16,children:t.hideApollosAuth?null:(0,q.jsx)(wHr,{popupSize:t.searchProfileSize})})]}),(0,q.jsx)(Uqr,{autocompleteState:o,autocomplete:i})]})})};Gqr.propTypes={..._d,dropdown:K.default.bool};var Kqr=Gqr;function U9(e,t=16){let n=e.split(`px`)[0]/t;return String(`${n}rem`)}var W9=B7`
|
|
1691
1691
|
color: ${q7(`colors.text.primary`)};
|
|
1692
1692
|
transition: all ${q7(`timing.base`)};
|
|
1693
1693
|
margin: 0;
|
|
@@ -1817,32 +1817,32 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1817
1817
|
font-size: ${U9(`16px`)};
|
|
1818
1818
|
line-height: ${U9(`24px`)};
|
|
1819
1819
|
font-weight: 400;
|
|
1820
|
-
`},
|
|
1820
|
+
`},qqr=U7(H7.h1.attrs({className:`heading-style-h1`})`
|
|
1821
1821
|
${G9.H1}
|
|
1822
1822
|
${gd}
|
|
1823
|
-
`);
|
|
1823
|
+
`);qqr.propTypes={..._d};var Jqr=U7(H7.h2.attrs({className:`heading-style-h2`})`
|
|
1824
1824
|
${G9.H2}
|
|
1825
1825
|
${gd}
|
|
1826
|
-
`);
|
|
1826
|
+
`);Jqr.propTypes={..._d};var Yqr=U7(H7.h3.attrs({className:`heading-style-h3`})`
|
|
1827
1827
|
${G9.H3}
|
|
1828
1828
|
${gd}
|
|
1829
|
-
`);
|
|
1829
|
+
`);Yqr.propTypes={..._d};var K9=U7(H7.h4.attrs({className:`heading-style-h4`})`
|
|
1830
1830
|
${G9.H4}
|
|
1831
1831
|
${gd}
|
|
1832
|
-
`);K9.propTypes={..._d};var
|
|
1832
|
+
`);K9.propTypes={..._d};var Xqr=U7(H7.h5.attrs({className:`heading-style-h5`})`
|
|
1833
1833
|
${G9.H5}
|
|
1834
1834
|
${gd}
|
|
1835
|
-
`);
|
|
1835
|
+
`);Xqr.propTypes={..._d};var Zqr=U7(H7.h6.attrs({className:`heading-style-h6`})`
|
|
1836
1836
|
${G9.H6}
|
|
1837
1837
|
${gd}
|
|
1838
|
-
`);
|
|
1838
|
+
`);Zqr.propTypes={..._d};var Qqr=U7(H7.p`
|
|
1839
1839
|
${G9.LargeSystemText}
|
|
1840
1840
|
${gd}
|
|
1841
|
-
`);Jqr.propTypes={..._d};function Yqr(...e){for(let t of e)if(typeof t==`string`&&t.trim().length>0)return t.trim()}var Xqr=`https://apollos.site`;function Zqr(){if(typeof window<`u`){let e=Yqr(window.APOLLOS_WEB_APP_URL,window.APOLLOS_WEB_URL,window.WEB_APP_URL,window.APOLLOS_PUBLIC_APP_URL);if(e)return e}{let e=Yqr(void 0,void 0,void 0,void 0);if(e)return e}return Xqr}var Qqr=(0,S.forwardRef)(function({to:e,href:t,isExternal:n,...r},i){let{navigate:a}=NVr(),o=iVr(),s=aVr(),c=sVr(),l=oVr(),u=cVr();if(n&&t||!e)return(0,q.jsx)(`a`,{ref:i,href:t,...r});let d,f=!1,p=e=>typeof e==`string`&&e.startsWith(`/`)?e:`/${e}`,m=e=>typeof e==`string`?e?.split(`/`).filter(Boolean).slice(-1)[0]:null;if(typeof e==`object`){if(!e.contentId)return null;d=e.contentId.split(`:`).join(`-`),f=d?.startsWith(`FeatureFeed-`)}else if(typeof e==`string`){let t=p(e),n=m(t);if(t.includes(`/f/`)){if(!c&&!l){let e=Zqr();return(0,q.jsx)(`a`,{ref:i,...r,href:`${e}${t}`,target:`_blank`,rel:`noopener noreferrer`})}if(!n)return null;d=n.startsWith(`FeatureFeed-`)?n:`FeatureFeed-${n}`,f=!0}else if(t.includes(`/live/`)){if(!n)return null;d=n.startsWith(`Livestream-`)?n:`Livestream-${n}`}else if(n?.includes(`-`))d=n,f=d.startsWith(`FeatureFeed-`);else if(n?.includes(`:`))d=n.split(`:`).join(`-`),f=d.startsWith(`FeatureFeed-`);else return null}else return null;if(!c&&!l)return(0,q.jsx)(`a`,{ref:i,...r,href:`https://apollos.site/@${u}/c/${d}`,target:`_blank`,rel:`noopener noreferrer`});let h=s&&l?`/${f?`af`:`ac`}/${d}`:`?${o?`apollosId`:`id`}=${d}`;return l||(h=`${c}${t}`),(0,q.jsx)(`a`,{ref:i,...r,href:h,onClick:e=>{e.preventDefault(),a({id:d})}})}),$qr=({children:e})=>(0,q.jsx)(iAe,{useParams:jl,useRevalidator:Gl,children:(0,q.jsx)(sxe,{linkComponent:Qqr,children:e})}),eJr=()=>window.localStorage.getItem(`auth-token`)?null:(0,q.jsx)(AVr,{});eJr.propTypes={};function tJr(){return tJr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},tJr.apply(null,arguments)}function nJr(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}function rJr(e,t){return rJr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},rJr(e,t)}function iJr(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,rJr(e,t)}function aJr(e,t){return e.classList?!!t&&e.classList.contains(t):(` `+(e.className.baseVal||e.className)+` `).indexOf(` `+t+` `)!==-1}function oJr(e,t){e.classList?e.classList.add(t):aJr(e,t)||(typeof e.className==`string`?e.className=e.className+` `+t:e.setAttribute(`class`,(e.className&&e.className.baseVal||``)+` `+t))}function sJr(e,t){return e.replace(RegExp(`(^|\\s)`+t+`(?:\\s|$)`,`g`),`$1`).replace(/\s+/g,` `).replace(/^\s*|\s*$/g,``)}function cJr(e,t){e.classList?e.classList.remove(t):typeof e.className==`string`?e.className=sJr(e.className,t):e.setAttribute(`class`,sJr(e.className&&e.className.baseVal||``,t))}var lJr={disabled:!1},uJr=process.env.NODE_ENV===`production`?null:K.default.oneOfType([K.default.number,K.default.shape({enter:K.default.number,exit:K.default.number,appear:K.default.number}).isRequired]),dJr=process.env.NODE_ENV===`production`?null:K.default.oneOfType([K.default.string,K.default.shape({enter:K.default.string,exit:K.default.string,active:K.default.string}),K.default.shape({enter:K.default.string,enterDone:K.default.string,enterActive:K.default.string,exit:K.default.string,exitDone:K.default.string,exitActive:K.default.string})]),fJr=S.createContext(null),pJr=function(e){return e.scrollTop},mJr=`unmounted`,q9=`exited`,hJr=`entering`,gJr=`entered`,_Jr=`exiting`,J9=function(e){iJr(t,e);function t(t,n){var r=e.call(this,t,n)||this,i=n,a=i&&!i.isMounting?t.enter:t.appear,o;return r.appearStatus=null,t.in?a?(o=q9,r.appearStatus=hJr):o=gJr:o=t.unmountOnExit||t.mountOnEnter?mJr:q9,r.state={status:o},r.nextCallback=null,r}t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===`unmounted`?{status:q9}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==`entering`&&n!==`entered`&&(t=hJr):(n===`entering`||n===`entered`)&&(t=_Jr)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e=this.props.timeout,t=n=r=e,n,r;return e!=null&&typeof e!=`number`&&(t=e.exit,n=e.enter,r=e.appear===void 0?n:e.appear),{exit:t,enter:n,appear:r}},n.updateStatus=function(e,t){if(e===void 0&&(e=!1),t!==null){if(this.cancelNextCallback(),t===`entering`){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:vu.findDOMNode(this);n&&pJr(n)}this.performEnter(e)}else this.performExit()}else this.props.unmountOnExit&&this.state.status===`exited`&&this.setState({status:mJr})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,i=this.props.nodeRef?[r]:[vu.findDOMNode(this),r],a=i[0],o=i[1],s=this.getTimeouts(),c=r?s.appear:s.enter;!e&&!n||lJr.disabled?this.safeSetState({status:gJr},function(){t.props.onEntered(a)}):(this.props.onEnter(a,o),this.safeSetState({status:hJr},function(){t.props.onEntering(a,o),t.onTransitionEnd(c,function(){t.safeSetState({status:gJr},function(){t.props.onEntered(a,o)})})}))},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:vu.findDOMNode(this);!t||lJr.disabled?this.safeSetState({status:q9},function(){e.props.onExited(r)}):(this.props.onExit(r),this.safeSetState({status:_Jr},function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,function(){e.safeSetState({status:q9},function(){e.props.onExited(r)})})}))},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:vu.findDOMNode(this),r=e==null&&!this.props.addEndListener;if(!n||r)setTimeout(this.nextCallback,0);else{if(this.props.addEndListener){var i=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],a=i[0],o=i[1];this.props.addEndListener(a,o)}e!=null&&setTimeout(this.nextCallback,e)}},n.render=function(){var e=this.state.status;if(e===`unmounted`)return null;var t=this.props,n=t.children;t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef;var r=nJr(t,[`children`,`in`,`mountOnEnter`,`unmountOnExit`,`appear`,`enter`,`exit`,`timeout`,`addEndListener`,`onEnter`,`onEntering`,`onEntered`,`onExit`,`onExiting`,`onExited`,`nodeRef`]);return S.createElement(fJr.Provider,{value:null},typeof n==`function`?n(e,r):S.cloneElement(S.Children.only(n),r))},t}(S.Component);J9.contextType=fJr,J9.propTypes=process.env.NODE_ENV===`production`?{}:{nodeRef:K.default.shape({current:typeof Element>`u`?K.default.any:function(e,t,n,r,i,a){var o=e[t];return K.default.instanceOf(o&&`ownerDocument`in o?o.ownerDocument.defaultView.Element:Element)(e,t,n,r,i,a)}}),children:K.default.oneOfType([K.default.func.isRequired,K.default.element.isRequired]).isRequired,in:K.default.bool,mountOnEnter:K.default.bool,unmountOnExit:K.default.bool,appear:K.default.bool,enter:K.default.bool,exit:K.default.bool,timeout:function(e){var t=uJr;e.addEndListener||(t=t.isRequired);for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return t.apply(void 0,[e].concat(r))},addEndListener:K.default.func,onEnter:K.default.func,onEntering:K.default.func,onEntered:K.default.func,onExit:K.default.func,onExiting:K.default.func,onExited:K.default.func};function Y9(){}J9.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Y9,onEntering:Y9,onEntered:Y9,onExit:Y9,onExiting:Y9,onExited:Y9},J9.UNMOUNTED=mJr,J9.EXITED=q9,J9.ENTERING=hJr,J9.ENTERED=gJr,J9.EXITING=_Jr;var vJr=function(e,t){return e&&t&&t.split(` `).forEach(function(t){return oJr(e,t)})},yJr=function(e,t){return e&&t&&t.split(` `).forEach(function(t){return cJr(e,t)})},bJr=function(e){iJr(t,e);function t(){for(var t,n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];return t=e.call.apply(e,[this].concat(r))||this,t.appliedClasses={appear:{},enter:{},exit:{}},t.onEnter=function(e,n){var r=t.resolveArguments(e,n),i=r[0],a=r[1];t.removeClasses(i,`exit`),t.addClass(i,a?`appear`:`enter`,`base`),t.props.onEnter&&t.props.onEnter(e,n)},t.onEntering=function(e,n){var r=t.resolveArguments(e,n),i=r[0],a=r[1]?`appear`:`enter`;t.addClass(i,a,`active`),t.props.onEntering&&t.props.onEntering(e,n)},t.onEntered=function(e,n){var r=t.resolveArguments(e,n),i=r[0],a=r[1]?`appear`:`enter`;t.removeClasses(i,a),t.addClass(i,a,`done`),t.props.onEntered&&t.props.onEntered(e,n)},t.onExit=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,`appear`),t.removeClasses(n,`enter`),t.addClass(n,`exit`,`base`),t.props.onExit&&t.props.onExit(e)},t.onExiting=function(e){var n=t.resolveArguments(e)[0];t.addClass(n,`exit`,`active`),t.props.onExiting&&t.props.onExiting(e)},t.onExited=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,`exit`),t.addClass(n,`exit`,`done`),t.props.onExited&&t.props.onExited(e)},t.resolveArguments=function(e,n){return t.props.nodeRef?[t.props.nodeRef.current,e]:[e,n]},t.getClassNames=function(e){var n=t.props.classNames,r=typeof n==`string`,i=r&&n?n+`-`:``,a=r?``+i+e:n[e];return{baseClassName:a,activeClassName:r?a+`-active`:n[e+`Active`],doneClassName:r?a+`-done`:n[e+`Done`]}},t}var n=t.prototype;return n.addClass=function(e,t,n){var r=this.getClassNames(t)[n+`ClassName`],i=this.getClassNames(`enter`).doneClassName;t===`appear`&&n===`done`&&i&&(r+=` `+i),n===`active`&&e&&pJr(e),r&&(this.appliedClasses[t][n]=r,vJr(e,r))},n.removeClasses=function(e,t){var n=this.appliedClasses[t],r=n.base,i=n.active,a=n.done;this.appliedClasses[t]={},r&&yJr(e,r),i&&yJr(e,i),a&&yJr(e,a)},n.render=function(){var e=this.props;e.classNames;var t=nJr(e,[`classNames`]);return S.createElement(J9,tJr({},t,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},t}(S.Component);bJr.defaultProps={classNames:``},bJr.propTypes=process.env.NODE_ENV===`production`?{}:tJr({},J9.propTypes,{classNames:dJr,onEnter:K.default.func,onEntering:K.default.func,onEntered:K.default.func,onExit:K.default.func,onExiting:K.default.func,onExited:K.default.func});var xJr={Search:H7(bJr)`
|
|
1841
|
+
`);Qqr.propTypes={..._d};function $qr(...e){for(let t of e)if(typeof t==`string`&&t.trim().length>0)return t.trim()}var eJr=`https://apollos.site`;function tJr(){if(typeof window<`u`){let e=$qr(window.APOLLOS_WEB_APP_URL,window.APOLLOS_WEB_URL,window.WEB_APP_URL,window.APOLLOS_PUBLIC_APP_URL);if(e)return e}{let e=$qr(void 0,void 0,void 0,void 0);if(e)return e}return eJr}var nJr=(0,S.forwardRef)(function({to:e,href:t,isExternal:n,...r},i){let{navigate:a}=LVr(),o=cVr(),s=lVr(),c=dVr(),l=uVr(),u=fVr();if(n&&t||!e)return(0,q.jsx)(`a`,{ref:i,href:t,...r});let d,f=!1,p=e=>typeof e==`string`&&e.startsWith(`/`)?e:`/${e}`,m=e=>typeof e==`string`?e?.split(`/`).filter(Boolean).slice(-1)[0]:null;if(typeof e==`object`){if(!e.contentId)return null;d=e.contentId.split(`:`).join(`-`),f=d?.startsWith(`FeatureFeed-`)}else if(typeof e==`string`){let t=p(e),n=m(t);if(t.includes(`/f/`)){if(!c&&!l){let e=tJr();return(0,q.jsx)(`a`,{ref:i,...r,href:`${e}${t}`,target:`_blank`,rel:`noopener noreferrer`})}if(!n)return null;d=n.startsWith(`FeatureFeed-`)?n:`FeatureFeed-${n}`,f=!0}else if(t.includes(`/live/`)){if(!n)return null;d=n.startsWith(`Livestream-`)?n:`Livestream-${n}`}else if(n?.includes(`-`))d=n,f=d.startsWith(`FeatureFeed-`);else if(n?.includes(`:`))d=n.split(`:`).join(`-`),f=d.startsWith(`FeatureFeed-`);else return null}else return null;if(!c&&!l)return(0,q.jsx)(`a`,{ref:i,...r,href:`https://apollos.site/@${u}/c/${d}`,target:`_blank`,rel:`noopener noreferrer`});let h=s&&l?`/${f?`af`:`ac`}/${d}`:`?${o?`apollosId`:`id`}=${d}`;return l||(h=`${c}${t}`),(0,q.jsx)(`a`,{ref:i,...r,href:h,onClick:e=>{e.preventDefault(),a({id:d})}})}),rJr=({children:e})=>(0,q.jsx)(iAe,{useParams:jl,useRevalidator:Gl,children:(0,q.jsx)(sxe,{linkComponent:nJr,children:e})}),iJr=()=>window.localStorage.getItem(`auth-token`)?null:(0,q.jsx)(PVr,{});iJr.propTypes={};function aJr(){return aJr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},aJr.apply(null,arguments)}function oJr(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}function sJr(e,t){return sJr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},sJr(e,t)}function cJr(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,sJr(e,t)}function lJr(e,t){return e.classList?!!t&&e.classList.contains(t):(` `+(e.className.baseVal||e.className)+` `).indexOf(` `+t+` `)!==-1}function uJr(e,t){e.classList?e.classList.add(t):lJr(e,t)||(typeof e.className==`string`?e.className=e.className+` `+t:e.setAttribute(`class`,(e.className&&e.className.baseVal||``)+` `+t))}function dJr(e,t){return e.replace(RegExp(`(^|\\s)`+t+`(?:\\s|$)`,`g`),`$1`).replace(/\s+/g,` `).replace(/^\s*|\s*$/g,``)}function fJr(e,t){e.classList?e.classList.remove(t):typeof e.className==`string`?e.className=dJr(e.className,t):e.setAttribute(`class`,dJr(e.className&&e.className.baseVal||``,t))}var pJr={disabled:!1},mJr=process.env.NODE_ENV===`production`?null:K.default.oneOfType([K.default.number,K.default.shape({enter:K.default.number,exit:K.default.number,appear:K.default.number}).isRequired]),hJr=process.env.NODE_ENV===`production`?null:K.default.oneOfType([K.default.string,K.default.shape({enter:K.default.string,exit:K.default.string,active:K.default.string}),K.default.shape({enter:K.default.string,enterDone:K.default.string,enterActive:K.default.string,exit:K.default.string,exitDone:K.default.string,exitActive:K.default.string})]),gJr=S.createContext(null),_Jr=function(e){return e.scrollTop},vJr=`unmounted`,q9=`exited`,yJr=`entering`,bJr=`entered`,xJr=`exiting`,J9=function(e){cJr(t,e);function t(t,n){var r=e.call(this,t,n)||this,i=n,a=i&&!i.isMounting?t.enter:t.appear,o;return r.appearStatus=null,t.in?a?(o=q9,r.appearStatus=yJr):o=bJr:o=t.unmountOnExit||t.mountOnEnter?vJr:q9,r.state={status:o},r.nextCallback=null,r}t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===`unmounted`?{status:q9}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==`entering`&&n!==`entered`&&(t=yJr):(n===`entering`||n===`entered`)&&(t=xJr)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e=this.props.timeout,t=n=r=e,n,r;return e!=null&&typeof e!=`number`&&(t=e.exit,n=e.enter,r=e.appear===void 0?n:e.appear),{exit:t,enter:n,appear:r}},n.updateStatus=function(e,t){if(e===void 0&&(e=!1),t!==null){if(this.cancelNextCallback(),t===`entering`){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:vu.findDOMNode(this);n&&_Jr(n)}this.performEnter(e)}else this.performExit()}else this.props.unmountOnExit&&this.state.status===`exited`&&this.setState({status:vJr})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,i=this.props.nodeRef?[r]:[vu.findDOMNode(this),r],a=i[0],o=i[1],s=this.getTimeouts(),c=r?s.appear:s.enter;!e&&!n||pJr.disabled?this.safeSetState({status:bJr},function(){t.props.onEntered(a)}):(this.props.onEnter(a,o),this.safeSetState({status:yJr},function(){t.props.onEntering(a,o),t.onTransitionEnd(c,function(){t.safeSetState({status:bJr},function(){t.props.onEntered(a,o)})})}))},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:vu.findDOMNode(this);!t||pJr.disabled?this.safeSetState({status:q9},function(){e.props.onExited(r)}):(this.props.onExit(r),this.safeSetState({status:xJr},function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,function(){e.safeSetState({status:q9},function(){e.props.onExited(r)})})}))},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:vu.findDOMNode(this),r=e==null&&!this.props.addEndListener;if(!n||r)setTimeout(this.nextCallback,0);else{if(this.props.addEndListener){var i=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],a=i[0],o=i[1];this.props.addEndListener(a,o)}e!=null&&setTimeout(this.nextCallback,e)}},n.render=function(){var e=this.state.status;if(e===`unmounted`)return null;var t=this.props,n=t.children;t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef;var r=oJr(t,[`children`,`in`,`mountOnEnter`,`unmountOnExit`,`appear`,`enter`,`exit`,`timeout`,`addEndListener`,`onEnter`,`onEntering`,`onEntered`,`onExit`,`onExiting`,`onExited`,`nodeRef`]);return S.createElement(gJr.Provider,{value:null},typeof n==`function`?n(e,r):S.cloneElement(S.Children.only(n),r))},t}(S.Component);J9.contextType=gJr,J9.propTypes=process.env.NODE_ENV===`production`?{}:{nodeRef:K.default.shape({current:typeof Element>`u`?K.default.any:function(e,t,n,r,i,a){var o=e[t];return K.default.instanceOf(o&&`ownerDocument`in o?o.ownerDocument.defaultView.Element:Element)(e,t,n,r,i,a)}}),children:K.default.oneOfType([K.default.func.isRequired,K.default.element.isRequired]).isRequired,in:K.default.bool,mountOnEnter:K.default.bool,unmountOnExit:K.default.bool,appear:K.default.bool,enter:K.default.bool,exit:K.default.bool,timeout:function(e){var t=mJr;e.addEndListener||(t=t.isRequired);for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return t.apply(void 0,[e].concat(r))},addEndListener:K.default.func,onEnter:K.default.func,onEntering:K.default.func,onEntered:K.default.func,onExit:K.default.func,onExiting:K.default.func,onExited:K.default.func};function Y9(){}J9.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Y9,onEntering:Y9,onEntered:Y9,onExit:Y9,onExiting:Y9,onExited:Y9},J9.UNMOUNTED=vJr,J9.EXITED=q9,J9.ENTERING=yJr,J9.ENTERED=bJr,J9.EXITING=xJr;var SJr=function(e,t){return e&&t&&t.split(` `).forEach(function(t){return uJr(e,t)})},CJr=function(e,t){return e&&t&&t.split(` `).forEach(function(t){return fJr(e,t)})},wJr=function(e){cJr(t,e);function t(){for(var t,n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];return t=e.call.apply(e,[this].concat(r))||this,t.appliedClasses={appear:{},enter:{},exit:{}},t.onEnter=function(e,n){var r=t.resolveArguments(e,n),i=r[0],a=r[1];t.removeClasses(i,`exit`),t.addClass(i,a?`appear`:`enter`,`base`),t.props.onEnter&&t.props.onEnter(e,n)},t.onEntering=function(e,n){var r=t.resolveArguments(e,n),i=r[0],a=r[1]?`appear`:`enter`;t.addClass(i,a,`active`),t.props.onEntering&&t.props.onEntering(e,n)},t.onEntered=function(e,n){var r=t.resolveArguments(e,n),i=r[0],a=r[1]?`appear`:`enter`;t.removeClasses(i,a),t.addClass(i,a,`done`),t.props.onEntered&&t.props.onEntered(e,n)},t.onExit=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,`appear`),t.removeClasses(n,`enter`),t.addClass(n,`exit`,`base`),t.props.onExit&&t.props.onExit(e)},t.onExiting=function(e){var n=t.resolveArguments(e)[0];t.addClass(n,`exit`,`active`),t.props.onExiting&&t.props.onExiting(e)},t.onExited=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,`exit`),t.addClass(n,`exit`,`done`),t.props.onExited&&t.props.onExited(e)},t.resolveArguments=function(e,n){return t.props.nodeRef?[t.props.nodeRef.current,e]:[e,n]},t.getClassNames=function(e){var n=t.props.classNames,r=typeof n==`string`,i=r&&n?n+`-`:``,a=r?``+i+e:n[e];return{baseClassName:a,activeClassName:r?a+`-active`:n[e+`Active`],doneClassName:r?a+`-done`:n[e+`Done`]}},t}var n=t.prototype;return n.addClass=function(e,t,n){var r=this.getClassNames(t)[n+`ClassName`],i=this.getClassNames(`enter`).doneClassName;t===`appear`&&n===`done`&&i&&(r+=` `+i),n===`active`&&e&&_Jr(e),r&&(this.appliedClasses[t][n]=r,SJr(e,r))},n.removeClasses=function(e,t){var n=this.appliedClasses[t],r=n.base,i=n.active,a=n.done;this.appliedClasses[t]={},r&&CJr(e,r),i&&CJr(e,i),a&&CJr(e,a)},n.render=function(){var e=this.props;e.classNames;var t=oJr(e,[`classNames`]);return S.createElement(J9,aJr({},t,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},t}(S.Component);wJr.defaultProps={classNames:``},wJr.propTypes=process.env.NODE_ENV===`production`?{}:aJr({},J9.propTypes,{classNames:hJr,onEnter:K.default.func,onEntering:K.default.func,onEntered:K.default.func,onExit:K.default.func,onExiting:K.default.func,onExited:K.default.func});var TJr={Search:H7(wJr)`
|
|
1842
1842
|
opacity: 0;
|
|
1843
1843
|
transition: opacity 0.3s ease-in-out;
|
|
1844
1844
|
|
|
1845
1845
|
&.fade-enter-done {
|
|
1846
1846
|
opacity: 1;
|
|
1847
1847
|
}
|
|
1848
|
-
`};function
|
|
1848
|
+
`};function EJr(e){let t=k7();switch(e.type){case`FeatureFeed`:return(0,q.jsx)(xRr,{id:e.featureFeed,...e});case`Search`:return(0,q.jsx)(TJr.Search,{in:!t.loading,timeout:300,classNames:`fade`,unmountOnExit:!0,children:(0,q.jsx)(Kqr,{width:`100%`})});case`Auth`:return(0,q.jsx)(iJr,{});case`Donation`:return null;default:return(0,q.jsx)(TJr.Search,{in:!t.loading,timeout:300,classNames:`fade`,unmountOnExit:!0,children:(0,q.jsx)(Kqr,{width:`100%`})})}}var DJr=()=>{let e=Array.from(document.querySelectorAll(`.apollos-widget`)||[]),t=uVr();return(0,q.jsx)(IVr,{children:(0,q.jsx)(rJr,{children:(0,q.jsx)(J7,{children:(0,q.jsxs)(J7,{children:[t?(0,q.jsx)($Vr,{}):(0,q.jsx)(BVr,{}),e.map((e,t)=>{let n=e;return(0,vu.createPortal)((0,q.jsx)(EJr,{type:e.dataset.type,church:e.dataset.church,searchFeed:e.dataset.searchFeed,searchProfileSize:e.dataset.searchProfileSize,hideApollosAuth:e.dataset.hideApollosAuth,featureFeed:e.dataset.featureFeed,modal:e.dataset.modal,emptyPlaceholderText:e.dataset.emptyPlaceholderText},t),n)})]})})})})};DJr.propTypes={};function OJr(){let e=ql();return console.error(e),(0,q.jsxs)(`div`,{id:`error-page`,children:[(0,q.jsx)(`h1`,{children:`Oops!`}),(0,q.jsx)(`p`,{children:`Sorry, an unexpected error has occurred.`}),(0,q.jsx)(`p`,{children:(0,q.jsx)(`i`,{children:e.statusText||e.message})})]})}co({dsn:void 0});function kJr(){let e=document.querySelector(`[data-search-feed]`),t=document.querySelector(`[data-church]`),n=document.querySelector(`[data-placeholder]`),r=document.querySelector(`[data-use-path-router]`),i=document.querySelector(`[data-apollos-id-param]`),a=e?e.getAttribute(`data-search-feed`):null,o=e?e.getAttribute(`data-search-profile-size`):null,s=e?e.getAttribute(`data-hide-apollos-auth`):null,c=t?t.getAttribute(`data-church`):null,l=n?n.getAttribute(`data-placeholder`):null,u=r?r.getAttribute(`data-use-path-router`)===`true`:!1,d=i?i.getAttribute(`data-apollos-id-param`)===`true`:!1,f=document.querySelectorAll(`[data-apollos-modal]`)?.[0]?.dataset?.apollosModal===`true`,p=document.querySelectorAll(`[data-apollos-route]`)?.[0]?.dataset?.apollosRoute,m=hte([{path:`*`,element:(0,q.jsx)(DJr,{}),errorElement:(0,q.jsx)(OJr,{})},{path:`/ac/:contentId`,element:(0,q.jsx)(DJr,{type:`content`}),errorElement:(0,q.jsx)(OJr,{})},{path:`/af/:feedId`,element:(0,q.jsx)(DJr,{type:`feed`}),errorElement:(0,q.jsx)(OJr,{})}]);return(0,q.jsx)(mVr,{church:c,searchFeed:a,searchProfileSize:o,hideApollosAuth:s,customPlaceholder:l,usePathRouter:u,useApollosIdParam:d,shouldUseModal:f,apollosPageRoute:p,children:(0,q.jsx)(zee,{router:m})})}var AJr=c({getCLS:()=>RJr,getFCP:()=>BJr,getFID:()=>VJr,getLCP:()=>UJr,getTTFB:()=>WJr}),jJr,MJr,NJr,X9,Z9,PJr,FJr,IJr,LJr,Q9,$9,RJr,zJr,BJr,VJr,HJr,UJr,WJr,GJr=o((()=>{NJr=function(){return`${Date.now()}-${Math.floor(8999999999999*Math.random())+0xe8d4a51000}`},X9=function(e){return{name:e,value:arguments.length>1&&arguments[1]!==void 0?arguments[1]:-1,delta:0,entries:[],id:NJr(),isFinal:!1}},Z9=function(e,t){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){var n=new PerformanceObserver((function(e){return e.getEntries().map(t)}));return n.observe({type:e,buffered:!0}),n}}catch{}},PJr=!1,FJr=!1,IJr=function(e){PJr=!e.persisted},LJr=function(){addEventListener(`pagehide`,IJr),addEventListener(`beforeunload`,(function(){}))},Q9=function(e){var t=arguments.length>1&&arguments[1]!==void 0&&arguments[1];FJr||=(LJr(),!0),addEventListener(`visibilitychange`,(function(t){var n=t.timeStamp;document.visibilityState===`hidden`&&e({timeStamp:n,isUnloading:PJr})}),{capture:!0,once:t})},$9=function(e,t,n,r){var i;return function(){n&&t.isFinal&&n.disconnect(),t.value>=0&&(r||t.isFinal||document.visibilityState===`hidden`)&&(t.delta=t.value-(i||0),(t.delta||t.isFinal||i===void 0)&&(e(t),i=t.value))}},RJr=function(e){var t,n=arguments.length>1&&arguments[1]!==void 0&&arguments[1],r=X9(`CLS`,0),i=function(e){e.hadRecentInput||(r.value+=e.value,r.entries.push(e),t())},a=Z9(`layout-shift`,i);a&&(t=$9(e,r,a,n),Q9((function(e){var n=e.isUnloading;a.takeRecords().map(i),n&&(r.isFinal=!0),t()})))},zJr=function(){return jJr===void 0&&(jJr=document.visibilityState===`hidden`?0:1/0,Q9((function(e){return jJr=e.timeStamp}),!0)),{get timeStamp(){return jJr}}},BJr=function(e){var t,n=X9(`FCP`),r=zJr(),i=Z9(`paint`,(function(e){e.name===`first-contentful-paint`&&e.startTime<r.timeStamp&&(n.value=e.startTime,n.isFinal=!0,n.entries.push(e),t())}));i&&(t=$9(e,n,i))},VJr=function(e){var t=X9(`FID`),n=zJr(),r=function(e){e.startTime<n.timeStamp&&(t.value=e.processingStart-e.startTime,t.entries.push(e),t.isFinal=!0,a())},i=Z9(`first-input`,r),a=$9(e,t,i);i?Q9((function(){i.takeRecords().map(r),i.disconnect()}),!0):window.perfMetrics&&window.perfMetrics.onFirstInputDelay&&window.perfMetrics.onFirstInputDelay((function(e,r){r.timeStamp<n.timeStamp&&(t.value=e,t.isFinal=!0,t.entries=[{entryType:`first-input`,name:r.type,target:r.target,cancelable:r.cancelable,startTime:r.timeStamp,processingStart:r.timeStamp+e}],a())}))},HJr=function(){return MJr||=new Promise((function(e){return[`scroll`,`keydown`,`pointerdown`].map((function(t){addEventListener(t,e,{once:!0,passive:!0,capture:!0})}))})),MJr},UJr=function(e){var t,n=arguments.length>1&&arguments[1]!==void 0&&arguments[1],r=X9(`LCP`),i=zJr(),a=function(e){var n=e.startTime;n<i.timeStamp?(r.value=n,r.entries.push(e)):r.isFinal=!0,t()},o=Z9(`largest-contentful-paint`,a);if(o){t=$9(e,r,o,n);var s=function(){r.isFinal||(o.takeRecords().map(a),r.isFinal=!0,t())};HJr().then(s),Q9(s,!0)}},WJr=function(e){var t,n=X9(`TTFB`);t=function(){try{var t=performance.getEntriesByType(`navigation`)[0]||function(){var e=performance.timing,t={entryType:`navigation`,startTime:0};for(var n in e)n!==`navigationStart`&&n!==`toJSON`&&(t[n]=Math.max(e[n]-e.navigationStart,0));return t}();n.value=n.delta=t.responseStart,n.entries=[t],n.isFinal=!0,e(n)}catch{}},document.readyState===`complete`?setTimeout(t,0):addEventListener(`pageshow`,t)}}));window.process={env:{NODE_ENV:typeof process<`u`&&process.env.NODE_ENV||`production`}},window.document.querySelector(`#apollos-canvas-widget`)||window.document.body.insertAdjacentHTML(`afterbegin`,`<div id="apollos-canvas-widget"></div>`),C.default.createRoot(document.getElementById(`apollos-canvas-widget`)).render((0,q.jsx)(S.StrictMode,{children:(0,q.jsx)(kJr,{})})),(e=>{e&&e instanceof Function&&Promise.resolve().then(()=>(GJr(),AJr)).then(({getCLS:t,getFID:n,getFCP:r,getLCP:i,getTTFB:a})=>{t(e),n(e),r(e),i(e),a(e)})})()});
|