From e36e34a0e4e4e01a9cfff2bf261ef73d8ace79bf Mon Sep 17 00:00:00 2001 From: Bo Lopker Date: Tue, 10 Oct 2023 15:17:46 -0700 Subject: [PATCH] All avatars get creme --- Makefile | 9 ++++++--- assets/js/components/card.js | 2 +- totem/static/js/app.min.js | 2 +- totem/static/js/app.min.js.map | 4 ++-- totem/templates/utils/avatar.html | 4 ++-- 5 files changed, 12 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index c151f3ad..2ab9c852 100644 --- a/Makefile +++ b/Makefile @@ -9,18 +9,21 @@ test: docker-compose -f local.yml run --rm django coverage run -m pytest docker-compose -f local.yml run --rm django coverage report -shell: - docker-compose -f local.yml run --rm django bash - tasks: docker-compose -f local.yml run --rm django python manage.py totem_tasks +shell: + docker-compose -f local.yml run --rm django bash + dbshell: docker-compose -f local.yml exec postgres bash sqlshell: docker-compose -f local.yml exec postgres psql -U debug -d totem +pyshell: + docker-compose -f local.yml run --rm django ./manage.py shell_plus + deploy: git push dokku diff --git a/assets/js/components/card.js b/assets/js/components/card.js index 616398a1..9009695e 100644 --- a/assets/js/components/card.js +++ b/assets/js/components/card.js @@ -21,7 +21,7 @@ function Card(props) {

{props.description}

- diff --git a/totem/static/js/app.min.js b/totem/static/js/app.min.js index 3d67dc5f..50fb3eec 100644 --- a/totem/static/js/app.min.js +++ b/totem/static/js/app.min.js @@ -1,2 +1,2 @@ -(()=>{var er=Object.create;var Je=Object.defineProperty;var tr=Object.getOwnPropertyDescriptor;var nr=Object.getOwnPropertyNames;var or=Object.getPrototypeOf,rr=Object.prototype.hasOwnProperty;var le=(e,t)=>()=>(e&&(t=e(e=0)),t);var T=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Ct=(e,t)=>{for(var n in t)Je(e,n,{get:t[n],enumerable:!0})},mn=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of nr(t))!rr.call(e,r)&&r!==n&&Je(e,r,{get:()=>t[r],enumerable:!(o=tr(t,r))||o.enumerable});return e};var gn=(e,t,n)=>(n=e!=null?er(or(e)):{},mn(t||!e||!e.__esModule?Je(n,"default",{value:e,enumerable:!0}):n,e)),G=e=>mn(Je({},"__esModule",{value:!0}),e);function K(e,t){for(var n in t)e[n]=t[n];return e}function Rn(e){var t=e.parentNode;t&&t.removeChild(e)}function S(e,t,n){var o,r,i,l={};for(i in t)i=="key"?o=t[i]:i=="ref"?r=t[i]:l[i]=t[i];if(arguments.length>2&&(l.children=arguments.length>3?Ae.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(i in e.defaultProps)l[i]===void 0&&(l[i]=e.defaultProps[i]);return Ne(e,l,o,r,null)}function Ne(e,t,n,o,r){var i={type:e,props:t,key:n,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:r??++Pn};return r==null&&f.vnode!=null&&f.vnode(i),i}function Ie(){return{current:null}}function O(e){return e.children}function U(e,t){this.props=e,this.context=t}function Me(e,t){if(t==null)return e.__?Me(e.__,e.__.__k.indexOf(e)+1):null;for(var n;tt&&ue.sort(Pt));Xe.__r=0}function Sn(e,t,n,o,r,i,l,u,s,_,c){var a,v,p,d,m,k,g,b,w,E=0,y=o&&o.__k||kn,V=y.length,x=V,F=t.length;for(n.__k=[],a=0;a0?Ne(d.type,d.props,d.key,d.ref?d.ref:null,d.__v):d)!=null?(d.__=n,d.__b=n.__b+1,(b=lr(d,y,g=a+E,x))===-1?p=ge:(p=y[b]||ge,y[b]=void 0,x--),kt(e,d,p,r,i,l,u,s,_,c),m=d.__e,(v=d.ref)&&p.ref!=v&&(p.ref&&Rt(p.ref,null,d),c.push(v,d.__c||m,d)),m!=null&&(k==null&&(k=m),(w=p===ge||p.__v===null)?b==-1&&E--:b!==g&&(b===g+1?E++:b>g?x>F-g?E+=b-g:E--:E=b(s!=null?1:0))for(;l>=0||u=0){if((s=t[l])&&r==s.key&&i===s.type)return l;l--}if(u2&&(u.children=arguments.length>3?Ae.call(arguments,2):n),Ne(e.type,u,o||e.key,r||e.ref,null)}function je(e,t){var n={__c:t="__cC"+Ln++,__:e,Consumer:function(o,r){return o.children(r)},Provider:function(o){var r,i;return this.getChildContext||(r=[],(i={})[t]=this,this.getChildContext=function(){return i},this.shouldComponentUpdate=function(l){this.props.value!==l.value&&r.some(function(u){u.__e=!0,Et(u)})},this.sub=function(l){r.push(l);var u=l.componentWillUnmount;l.componentWillUnmount=function(){r.splice(r.indexOf(l),1),u&&u.call(l)}}),o.children}};return n.Provider.__=n.Consumer.contextType=n}var Ae,f,Pn,ir,ue,yn,En,Pt,Ln,ge,kn,ar,Qe,re=le(()=>{ge={},kn=[],ar=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Qe=Array.isArray;Ae=kn.slice,f={__e:function(e,t,n,o){for(var r,i,l;t=t.__;)if((r=t.__c)&&!r.__)try{if((i=r.constructor)&&i.getDerivedStateFromError!=null&&(r.setState(i.getDerivedStateFromError(e)),l=r.__d),r.componentDidCatch!=null&&(r.componentDidCatch(e,o||{}),l=r.__d),l)return r.__E=r}catch(u){e=u}throw e}},Pn=0,ir=function(e){return e!=null&&e.constructor===void 0},U.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=K({},this.state),typeof e=="function"&&(e=e(K({},n),this.props)),e&&K(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),Et(this))},U.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Et(this))},U.prototype.render=O,ue=[],En=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Pt=function(e,t){return e.__v.__b-t.__v.__b},Xe.__r=0,Ln=0});function se(e,t){f.__h&&f.__h(P,e,ye||t),ye=0;var n=P.__H||(P.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({__V:et}),n.__[e]}function N(e){return ye=1,qe(Zn,e)}function qe(e,t,n){var o=se(Q++,2);if(o.t=e,!o.__c&&(o.__=[n?n(t):Zn(void 0,t),function(u){var s=o.__N?o.__N[0]:o.__[0],_=o.t(s,u);s!==_&&(o.__N=[_,o.__[1]],o.__c.setState({}))}],o.__c=P,!P.u)){var r=function(u,s,_){if(!o.__c.__H)return!0;var c=o.__c.__H.__.filter(function(v){return v.__c});if(c.every(function(v){return!v.__N}))return!i||i.call(this,u,s,_);var a=!1;return c.forEach(function(v){if(v.__N){var p=v.__[0];v.__=v.__N,v.__N=void 0,p!==v.__[0]&&(a=!0)}}),!(!a&&o.__c.props===u)&&(!i||i.call(this,u,s,_))};P.u=!0;var i=P.shouldComponentUpdate,l=P.componentWillUpdate;P.componentWillUpdate=function(u,s,_){if(this.__e){var c=i;i=void 0,r(u,s,_),i=c}l&&l.call(this,u,s,_)},P.shouldComponentUpdate=r}return o.__N||o.__}function ee(e,t){var n=se(Q++,3);!f.__s&&Ot(n.__H,t)&&(n.__=e,n.i=t,P.__H.__h.push(n))}function ce(e,t){var n=se(Q++,4);!f.__s&&Ot(n.__H,t)&&(n.__=e,n.i=t,P.__h.push(n))}function be(e){return ye=5,we(function(){return{current:e}},[])}function nt(e,t,n){ye=6,ce(function(){return typeof e=="function"?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0},n==null?n:n.concat(e))}function we(e,t){var n=se(Q++,7);return Ot(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function ot(e,t){return ye=8,we(function(){return e},t)}function rt(e){var t=P.context[e.__c],n=se(Q++,9);return n.c=e,t?(n.__==null&&(n.__=!0,t.sub(P)),t.props.value):e.__}function it(e,t){f.useDebugValue&&f.useDebugValue(t?t(e):e)}function Gn(e){var t=se(Q++,10),n=N();return t.__=e,P.componentDidCatch||(P.componentDidCatch=function(o,r){t.__&&t.__(o,r),n[1](o)}),[n[0],function(){n[1](void 0)}]}function at(){var e=se(Q++,11);if(!e.__){for(var t=P.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__}function vr(){for(var e;e=Yn.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(tt),e.__H.__h.forEach(Tt),e.__H.__h=[]}catch(t){e.__H.__h=[],f.__e(t,e.__v)}}function mr(e){var t,n=function(){clearTimeout(o),Bn&&cancelAnimationFrame(t),setTimeout(e)},o=setTimeout(n,100);Bn&&(t=requestAnimationFrame(n))}function tt(e){var t=P,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),P=t}function Tt(e){var t=P;e.__c=e.__(),P=t}function Ot(e,t){return!e||e.length!==t.length||t.some(function(n,o){return n!==e[o]})}function Zn(e,t){return typeof t=="function"?t(e):t}var Q,P,St,qn,ye,Yn,et,Hn,zn,Vn,Wn,$n,Bn,Ce=le(()=>{re();ye=0,Yn=[],et=[],Hn=f.__b,zn=f.__r,Vn=f.diffed,Wn=f.__c,$n=f.unmount;f.__b=function(e){P=null,Hn&&Hn(e)},f.__r=function(e){zn&&zn(e),Q=0;var t=(P=e.__c).__H;t&&(St===P?(t.__h=[],P.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.__V=et,n.__N=n.i=void 0})):(t.__h.forEach(tt),t.__h.forEach(Tt),t.__h=[],Q=0)),St=P},f.diffed=function(e){Vn&&Vn(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(Yn.push(t)!==1&&qn===f.requestAnimationFrame||((qn=f.requestAnimationFrame)||mr)(vr)),t.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==et&&(n.__=n.__V),n.i=void 0,n.__V=et})),St=P=null},f.__c=function(e,t){t.some(function(n){try{n.__h.forEach(tt),n.__h=n.__h.filter(function(o){return!o.__||Tt(o)})}catch(o){t.some(function(r){r.__h&&(r.__h=[])}),t=[],f.__e(o,n.__v)}}),Wn&&Wn(e,t)},f.unmount=function(e){$n&&$n(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(o){try{tt(o)}catch(r){t=r}}),n.__H=void 0,t&&f.__e(t,n.__v))};Bn=typeof requestAnimationFrame=="function"});function yr(e,t,n,o,r,i){var l,u,s={};for(u in t)u=="ref"?l=t[u]:s[u]=t[u];var _={type:e,props:s,key:n,ref:l,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--gr,__source:r,__self:i};if(typeof e=="function"&&(l=e.defaultProps))for(u in l)s[u]===void 0&&(s[u]=l[u]);return f.vnode&&f.vnode(_),_}var gr,Jn=le(()=>{re();re();gr=0});var Dt={};Ct(Dt,{Fragment:()=>O,jsx:()=>yr,jsxDEV:()=>yr,jsxs:()=>yr});var Nt=le(()=>{Jn()});function io(e,t){for(var n in t)e[n]=t[n];return e}function At(e,t){for(var n in e)if(n!=="__source"&&!(n in t))return!0;for(var o in t)if(o!=="__source"&&e[o]!==t[o])return!0;return!1}function Mt(e,t){return e===t&&(e!==0||1/e==1/t)||e!=e&&t!=t}function He(e){this.props=e}function It(e,t){function n(r){var i=this.props.ref,l=i==r.ref;return!l&&i&&(i.call?i(null):i.current=null),t?!t(this.props,r)||!l:At(this.props,r)}function o(r){return this.shouldComponentUpdate=n,S(e,r)}return o.displayName="Memo("+(e.displayName||e.name)+")",o.prototype.isReactComponent=!0,o.__f=!0,o}function Ut(e){function t(n){var o=io({},n);return delete o.ref,e(o,n.ref||null)}return t.$$typeof=br,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}function ao(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(o){typeof o.__c=="function"&&o.__c()}),e.__c.__H=null),(e=io({},e)).__c!=null&&(e.__c.__P===n&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(o){return ao(o,t,n)})),e}function lo(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(o){return lo(o,t,n)}),e.__c&&e.__c.__P===t&&(e.__e&&n.insertBefore(e.__e,e.__d),e.__c.__e=!0,e.__c.__P=n)),e}function Pe(){this.__u=0,this.t=null,this.__b=null}function uo(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function jt(e){var t,n,o;function r(i){if(t||(t=e()).then(function(l){n=l.default||l},function(l){o=l}),o)throw o;if(!n)throw t;return S(n,i)}return r.displayName="Lazy",r.__f=!0,r}function _e(){this.u=null,this.o=null}function Cr(e){return this.getChildContext=function(){return e.context},e.children}function Pr(e){var t=this,n=e.i;t.componentWillUnmount=function(){J(null,t.l),t.l=null,t.i=null},t.i&&t.i!==n&&t.componentWillUnmount(),t.l||(t.i=n,t.l={nodeType:1,parentNode:n,childNodes:[],appendChild:function(o){this.childNodes.push(o),t.i.appendChild(o)},insertBefore:function(o,r){this.childNodes.push(o),t.i.appendChild(o)},removeChild:function(o){this.childNodes.splice(this.childNodes.indexOf(o)>>>1,1),t.i.removeChild(o)}}),J(S(Cr,{context:t.context},e.__v),t.l)}function qt(e,t){var n=S(Pr,{__v:e,i:t});return n.containerInfo=t,n}function Ht(e,t,n){return t.__k==null&&(t.textContent=""),J(e,t),typeof n=="function"&&n(),e?e.__c:null}function zt(e,t,n){return Ue(e,t),typeof n=="function"&&n(),e?e.__c:null}function Sr(){}function Tr(){return this.cancelBubble}function Or(){return this.defaultPrevented}function $t(e){return S.bind(null,e)}function Ee(e){return!!e&&e.$$typeof===so}function Bt(e){return Ee(e)&&e.type===O}function Yt(e){return Ee(e)?Fe.apply(null,arguments):e}function Gt(e){return!!e.__k&&(J(null,e),!0)}function Zt(e){return e&&(e.base||e.nodeType===1&&e)||null}function lt(e){e()}function Qt(e){return e}function en(){return[!1,lt]}function on(e,t){var n=t(),o=N({h:{__:n,v:t}}),r=o[0].h,i=o[1];return ce(function(){r.__=n,r.v=t,Mt(r.__,t())||i({h:r})},[e,n,t]),ee(function(){return Mt(r.__,r.v())||i({h:r}),e(function(){Mt(r.__,r.v())||i({h:r})})},[e]),n}var Xn,br,Kn,Ft,wr,Qn,eo,so,Er,Lr,kr,Rr,xr,to,Vt,Dr,no,oo,ro,Wt,co,Jt,Xt,Kt,tn,nn,ut,ze=le(()=>{re();re();Ce();Ce();(He.prototype=new U).isPureReactComponent=!0,He.prototype.shouldComponentUpdate=function(e,t){return At(this.props,e)||At(this.state,t)};Xn=f.__b;f.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Xn&&Xn(e)};br=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;Kn=function(e,t){return e==null?null:Z(Z(e).map(t))},Ft={map:Kn,forEach:Kn,count:function(e){return e?Z(e).length:0},only:function(e){var t=Z(e);if(t.length!==1)throw"Children.only";return t[0]},toArray:Z},wr=f.__e;f.__e=function(e,t,n,o){if(e.then){for(var r,i=t;i=i.__;)if((r=i.__c)&&r.__c)return t.__e==null&&(t.__e=n.__e,t.__k=n.__k),r.__c(e,t)}wr(e,t,n,o)};Qn=f.unmount;f.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&e.__h===!0&&(e.type=null),Qn&&Qn(e)},(Pe.prototype=new U).__c=function(e,t){var n=t.__c,o=this;o.t==null&&(o.t=[]),o.t.push(n);var r=uo(o.__v),i=!1,l=function(){i||(i=!0,n.__R=null,r?r(u):u())};n.__R=l;var u=function(){if(!--o.__u){if(o.state.__a){var _=o.state.__a;o.__v.__k[0]=lo(_,_.__c.__P,_.__c.__O)}var c;for(o.setState({__a:o.__b=null});c=o.t.pop();)c.forceUpdate()}},s=t.__h===!0;o.__u++||s||o.setState({__a:o.__b=o.__v.__k[0]}),e.then(l,l)},Pe.prototype.componentWillUnmount=function(){this.t=[]},Pe.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),o=this.__v.__k[0].__c;this.__v.__k[0]=ao(this.__b,n,o.__O=o.__P)}this.__b=null}var r=t.__a&&S(O,null,e.fallback);return r&&(r.__h=null),[S(O,null,t.__a?null:e.children),r]};eo=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]Ft,Component:()=>U,Fragment:()=>O,PureComponent:()=>He,StrictMode:()=>Kt,Suspense:()=>Pe,SuspenseList:()=>_e,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:()=>Wt,cloneElement:()=>Yt,createContext:()=>je,createElement:()=>S,createFactory:()=>$t,createPortal:()=>qt,createRef:()=>Ie,default:()=>ut,findDOMNode:()=>Zt,flushSync:()=>Xt,forwardRef:()=>Ut,hydrate:()=>zt,isElement:()=>nn,isFragment:()=>Bt,isValidElement:()=>Ee,lazy:()=>jt,memo:()=>It,render:()=>Ht,startTransition:()=>lt,unmountComponentAtNode:()=>Gt,unstable_batchedUpdates:()=>Jt,useCallback:()=>ot,useContext:()=>rt,useDebugValue:()=>it,useDeferredValue:()=>Qt,useEffect:()=>ee,useErrorBoundary:()=>Gn,useId:()=>at,useImperativeHandle:()=>nt,useInsertionEffect:()=>tn,useLayoutEffect:()=>ce,useMemo:()=>we,useReducer:()=>qe,useRef:()=>be,useState:()=>N,useSyncExternalStore:()=>on,useTransition:()=>en,version:()=>co});var ae=le(()=>{ze();ze()});var _o={};Ct(_o,{Children:()=>Ft,Component:()=>U,Fragment:()=>O,PureComponent:()=>He,StrictMode:()=>Kt,Suspense:()=>Pe,SuspenseList:()=>_e,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:()=>Wt,cloneElement:()=>Yt,createContext:()=>je,createElement:()=>S,createFactory:()=>$t,createPortal:()=>qt,createRef:()=>Ie,default:()=>ut,findDOMNode:()=>Zt,flushSync:()=>Xt,forwardRef:()=>Ut,hydrate:()=>zt,isElement:()=>nn,isFragment:()=>Bt,isValidElement:()=>Ee,lazy:()=>jt,memo:()=>It,render:()=>Ht,startTransition:()=>lt,unmountComponentAtNode:()=>Gt,unstable_batchedUpdates:()=>Jt,useCallback:()=>ot,useContext:()=>rt,useDebugValue:()=>it,useDeferredValue:()=>Qt,useEffect:()=>ee,useErrorBoundary:()=>Gn,useId:()=>at,useImperativeHandle:()=>nt,useInsertionEffect:()=>tn,useLayoutEffect:()=>ce,useMemo:()=>we,useReducer:()=>qe,useRef:()=>be,useState:()=>N,useSyncExternalStore:()=>on,useTransition:()=>en,version:()=>co});var fo=le(()=>{ze();ze()});var po=T(st=>{"use strict";Object.defineProperty(st,"__esModule",{value:!0});st.PopoverPortal=void 0;var Nr=(ae(),G(ie)),Mr=(fo(),G(_o)),Ar=function(e){var t=e.container,n=e.element,o=e.scoutElement,r=e.children;return Nr.useLayoutEffect(function(){return t.appendChild(n),t.appendChild(o),function(){t.removeChild(n),t.removeChild(o)}},[t,n,o]),Mr.createPortal(r,n)};st.PopoverPortal=Ar});var ct=T(A=>{"use strict";Object.defineProperty(A,"__esModule",{value:!0});A.getNudgedPopoverRect=A.getNewPopoverRect=A.popoverRectForPosition=A.createContainer=A.rectsAreEqual=A.EMPTY_CLIENT_RECT=void 0;A.EMPTY_CLIENT_RECT={top:0,left:0,bottom:0,height:0,right:0,width:0};var Ir=function(e,t){return e===t||e?.bottom===t?.bottom&&e?.height===t?.height&&e?.left===t?.left&&e?.right===t?.right&&e?.top===t?.top&&e?.width===t?.width};A.rectsAreEqual=Ir;var Ur=function(e,t){var n=window.document.createElement("div");return t&&(n.className=t),Object.assign(n.style,e),n};A.createContainer=Ur;var Fr=function(e,t,n,o,r){var i=t.left+t.width/2,l=t.top+t.height/2,u=n.width,s=n.height,_,c;switch(e){case"left":_=l-s/2,c=t.left-o-u,r==="start"&&(_=t.top),r==="end"&&(_=t.bottom-s);break;case"bottom":_=t.bottom+o,c=i-u/2,r==="start"&&(c=t.left),r==="end"&&(c=t.right-u);break;case"right":_=l-s/2,c=t.right+o,r==="start"&&(_=t.top),r==="end"&&(_=t.bottom-s);break;default:_=t.top-s-o,c=i-u/2,r==="start"&&(c=t.left),r==="end"&&(c=t.right-u);break}return{top:_,left:c,width:u,height:s,right:c+u,bottom:_+s}};A.popoverRectForPosition=Fr;var jr=function(e,t){var n=e.position,o=e.align,r=e.childRect,i=e.popoverRect,l=e.boundaryRect,u=e.padding,s=e.reposition,_=A.popoverRectForPosition(n,r,i,u,o),c=s&&(n==="top"&&_.topl.right-t||n==="bottom"&&_.bottom>l.bottom-t);return{rect:_,boundaryViolation:c}};A.getNewPopoverRect=jr;var qr=function(e,t,n){var o=t.top+n,r=t.left+n,i=t.right-n,l=t.bottom-n,u=e.topl?l-e.height:u;var s=e.lefti?i-e.width:s,{top:u,left:s,width:e.width,height:e.height,right:s+e.width,bottom:u+e.height}};A.getNudgedPopoverRect=qr});var vo=T(_t=>{"use strict";Object.defineProperty(_t,"__esModule",{value:!0});_t.useElementRef=void 0;var ho=(ae(),G(ie)),Hr=ct(),zr=function(e,t){var n=ho.useRef(),o=ho.useMemo(function(){return Hr.createContainer(t,e)},[e,t]);return n.current=o,n};_t.useElementRef=zr});var go=T(ft=>{"use strict";Object.defineProperty(ft,"__esModule",{value:!0});ft.usePopover=void 0;var Vr=(ae(),G(ie)),dt=ct(),mo=vo(),Wr={position:"fixed",overflow:"visible",top:"0px",left:"0px"},$r={position:"fixed",top:"0px",left:"0px",width:"0px",height:"0px",visibility:"hidden"},Br=function(e){var t=e.isOpen,n=e.childRef,o=e.positions,r=e.containerClassName,i=e.parentElement,l=e.contentLocation,u=e.align,s=e.padding,_=e.reposition,c=e.boundaryInset,a=e.boundaryElement,v=e.onPositionPopover,p=mo.useElementRef(r,Wr),d=mo.useElementRef("react-tiny-popover-scout",$r),m=Vr.useCallback(function(k){var g,b,w=k===void 0?{}:k,E=w.positionIndex,y=E===void 0?0:E,V=w.parentRect,x=V===void 0?i.getBoundingClientRect():V,F=w.childRect,L=F===void 0?(g=n?.current)===null||g===void 0?void 0:g.getBoundingClientRect():F,I=w.scoutRect,pe=I===void 0?(b=d?.current)===null||b===void 0?void 0:b.getBoundingClientRect():I,he=w.popoverRect,te=he===void 0?p.current.getBoundingClientRect():he,ve=w.boundaryRect,D=ve===void 0?a===i?x:a.getBoundingClientRect():ve;if(!(!L||!x||!t)){if(l){var xe=typeof l=="function"?l({childRect:L,popoverRect:te,parentRect:x,boundaryRect:D,padding:s,nudgedTop:0,nudgedLeft:0,boundaryInset:c,violations:dt.EMPTY_CLIENT_RECT,hasViolations:!1}):l,R=xe.top,bt=xe.left,wt=Math.round(x.left+bt-pe.left),Se=Math.round(x.top+R-pe.top);p.current.style.transform="translate("+wt+"px, "+Se+"px)",v({childRect:L,popoverRect:te,parentRect:x,boundaryRect:D,padding:s,nudgedTop:0,nudgedLeft:0,boundaryInset:c,violations:dt.EMPTY_CLIENT_RECT,hasViolations:!1});return}var ne=y===o.length,j=ne?o[0]:o[y],Ye=dt.getNewPopoverRect({childRect:L,popoverRect:te,boundaryRect:D,position:j,align:u,padding:s,reposition:_},c),W=Ye.rect,Te=Ye.boundaryViolation;if(Te&&_&&!ne){m({positionIndex:y+1,childRect:L,popoverRect:te,parentRect:x,boundaryRect:D});return}var Ge=W.top,Ze=W.left,Oe=W.width,C=W.height,B=_&&!ne,Y=dt.getNudgedPopoverRect(W,D,c),me=Y.left,De=Y.top,q=Ge,oe=Ze;B&&(q=De,oe=me),q=Math.round(q-pe.top),oe=Math.round(oe-pe.left),p.current.style.transform="translate("+oe+"px, "+q+"px)";var H={top:D.top+c-q,left:D.left+c-oe,right:oe+Oe-D.right+c,bottom:q+C-D.bottom+c};v({childRect:L,popoverRect:{top:q,left:oe,width:Oe,height:C,right:oe+Oe,bottom:q+C},parentRect:x,boundaryRect:D,position:j,align:u,padding:s,nudgedTop:De-Ge,nudgedLeft:me-Ze,boundaryInset:c,violations:{top:H.top<=0?0:H.top,left:H.left<=0?0:H.left,right:H.right<=0?0:H.right,bottom:H.bottom<=0?0:H.bottom},hasViolations:H.top>0||H.left>0||H.right>0||H.bottom>0})}},[i,n,d,p,a,t,l,o,u,s,_,c,v]);return{positionPopover:m,popoverRef:p,scoutRef:d}};ft.usePopover=Br});var bo=T(pt=>{"use strict";Object.defineProperty(pt,"__esModule",{value:!0});pt.useMemoizedArray=void 0;var yo=(ae(),G(ie)),Yr=function(e){var t=yo.useRef(e),n=yo.useMemo(function(){if(t.current===e)return t.current;if(t.current.length!==e.length)return t.current=e,e;for(var o=0;o{"use strict";var rn=Le&&Le.__assign||function(){return rn=Object.assign||function(e){for(var t,n=1,o=arguments.length;nv?v-s:c,_=_p?p-s:_,_=Number.isNaN(_)?0:_,c=Number.isNaN(c)?0:c,o){case"right":return{borderTop:r+"px solid transparent",borderBottom:r+"px solid transparent",borderRight:r+"px solid "+i,left:0,top:_};case"left":return{borderTop:r+"px solid transparent",borderBottom:r+"px solid transparent",borderLeft:r+"px solid "+i,right:0,top:_};case"bottom":return{borderLeft:r+"px solid transparent",borderRight:r+"px solid transparent",borderBottom:r+"px solid "+i,top:0,left:c};case"top":return{borderLeft:r+"px solid transparent",borderRight:r+"px solid transparent",borderTop:r+"px solid "+i,bottom:0,left:c};default:return{display:"hidden"}}}())},[i,r,t.height,t.left,t.top,t.width,n.height,n.left,n.top,n.width,o]);return{arrowContainerStyle:l,arrowStyle:u}};Le.useArrowContainer=Gr});var Eo=T(ke=>{"use strict";var de=ke&&ke.__assign||function(){return de=Object.assign||function(e){for(var t,n=1,o=arguments.length;n{"use strict";var vt=z&&z.__assign||function(){return vt=Object.assign||function(e){for(var t,n=1,o=arguments.length;n"u"?e.children:ht.jsx(ni,vt({},e,{ref:t}),void 0)})});var Ao=T(ln=>{"use strict";Object.defineProperty(ln,"__esModule",{value:!0});function ii(e,t){if(!e)throw new Error(t)}ln.default=ii});var Io=T(Ve=>{"use strict";var ai=Ve&&Ve.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ve,"__esModule",{value:!0});var gt=ai(Ao());function li(e){gt.default(Array.isArray(e.domains),"domains must be an array"),gt.default(Array.isArray(e.topLevelDomains),"topLevelDomains must be an array"),gt.default(Array.isArray(e.secondLevelDomains),"secondLevelDomains must be an array"),gt.default(typeof e.distanceFunction=="function","distanceFunction must be a function")}Ve.default=li});var Uo=T(un=>{"use strict";Object.defineProperty(un,"__esModule",{value:!0});function ui(e){return encodeURI(e).replace(/%20/g," ").replace(/%25/g,"%").replace(/%5E/g,"^").replace(/%60/g,"`").replace(/%7B/g,"{").replace(/%7C/g,"|").replace(/%7D/g,"}")}un.default=ui});var Fo=T(sn=>{"use strict";Object.defineProperty(sn,"__esModule",{value:!0});function si(e){let{domain:t,domains:n,distanceFunction:o,threshold:r}=e,i,l=1/0,u=null;if(!(!t||!n)){for(let s=0;s{"use strict";Object.defineProperty(cn,"__esModule",{value:!0});var ci=/\s/;function _i(e){return e.trim?e.trim():fi(di(e))}function di(e){return e.trimLeft?e.trimLeft():e.replace(/^\s\s*/,"")}function fi(e){if(e.trimRight)return e.trimRight();let t=e.length;for(;ci.test(e.charAt(--t)););return e.slice(0,t+1)}cn.default=_i});var qo=T(We=>{"use strict";var pi=We&&We.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(We,"__esModule",{value:!0});var hi=pi(jo()),vi=2;function mi(e){let n=hi.default(e).split("@");if(n.length{"use strict";var dn=$e&&$e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty($e,"__esModule",{value:!0});var gi=dn(Uo()),_n=dn(Fo()),yi=dn(qo());function bi(e){let t=gi.default(e.email.toLowerCase()),n=yi.default(t);if(!n)return;let{domains:o,domainThreshold:r,distanceFunction:i,secondLevelDomains:l,topLevelDomains:u}=e;if(l&&u&&l.indexOf(n.secondLevelDomain)!==-1&&u.indexOf(n.topLevelDomain)!==-1)return;let s=_n.default({domain:n.domain,domains:o,distanceFunction:i,threshold:r});if(s)return s==n.domain?void 0:{address:n.address,domain:s,full:n.address+"@"+s};let _=_n.default({domain:n.secondLevelDomain,domains:l,distanceFunction:i,threshold:e.secondLevelThreshold}),c=_n.default({domain:n.topLevelDomain,domains:u,distanceFunction:i,threshold:e.topLevelThreshold});if(n.domain){s=n.domain;let a=!1;if(_&&_!=n.secondLevelDomain&&(s=s.replace(n.secondLevelDomain,_),a=!0),c&&c!=n.topLevelDomain&&n.secondLevelDomain!==""&&(s=s.replace(new RegExp(n.topLevelDomain+"$"),c),a=!0),a)return{address:n.address,domain:s,full:n.address+"@"+s}}}$e.default=bi});var zo=T(fn=>{"use strict";Object.defineProperty(fn,"__esModule",{value:!0});function wi(e,t){if(e==null||e.length===0)return t==null||t.length===0?0:t.length;if(t==null||t.length===0)return e.length;let n=0,o=0,r=0,i=0,l=5;for(;n+o{"use strict";var Ci=X&&X.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(X,"__esModule",{value:!0});X.POPULAR_TLDS=X.POPULAR_DOMAINS=X.DEFAULT_CONFIG=void 0;var Pi=Ci(zo()),Vo=["msn.com","bellsouth.net","telus.net","comcast.net","optusnet.com.au","earthlink.net","qq.com","sky.com","icloud.com","sympatico.ca","googlemail.com","att.net","xtra.co.nz","web.de","cox.net","gmail.com","ymail.com","aim.com","rogers.com","verizon.net","rocketmail.com","optonline.net","sbcglobal.net","aol.com","aim.com","me.com","mailw.com","btinternet.com","charter.net","shaw.ca","hey.com","proton.me","pm.com","protonmail.com","zoho.com","yandex.com","titan.email"];X.POPULAR_DOMAINS=Vo;var Wo=["com","com.au","com.tw","co","ca","co.nz","co.uk","de","fr","it","ru","org","edu","gov","jp","nl","kr","se","eu","ie","co.il","us","at","be","dk","hk","es","gr","ch","no","cz","net","net.au","info","biz","mil","co.jp","sg","hu","uk","sk","ar","cf","cl","cn","ga","gq","ir","ml","mx","nu","nz","ph","pl","ro","tk","tw","ua","vg","ws","xn","za","app","au","ai","biz","br","blog","cloud","club","cc","de","dev","digital","fi","finance","id","in","io","me","mobi","network","pw","so","xyz","software","to","tech"];X.POPULAR_TLDS=Wo;var Ei={domainThreshold:2,domains:Vo,secondLevelThreshold:2,secondLevelDomains:["yahoo","hotmail","mail","live","outlook"],topLevelThreshold:2,topLevelDomains:Wo,distanceFunction:Pi.default};X.DEFAULT_CONFIG=Ei});var $o=T(hn=>{"use strict";Object.defineProperty(hn,"__esModule",{value:!0});var fe=pn();function Li(e){return{email:e.email,domains:e.domains||fe.DEFAULT_CONFIG.domains,topLevelDomains:e.topLevelDomains||fe.DEFAULT_CONFIG.topLevelDomains,secondLevelDomains:e.secondLevelDomains||fe.DEFAULT_CONFIG.secondLevelDomains,distanceFunction:e.distanceFunction||fe.DEFAULT_CONFIG.distanceFunction,domainThreshold:e.domainThreshold||fe.DEFAULT_CONFIG.domainThreshold,secondLevelThreshold:e.secondLevelThreshold||fe.DEFAULT_CONFIG.secondLevelThreshold,topLevelThreshold:e.topLevelThreshold||fe.DEFAULT_CONFIG.topLevelThreshold,suggested:e.suggested||void 0,empty:e.suggested||void 0}}hn.default=Li});var Bo=T(Be=>{"use strict";var vn=Be&&Be.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Be,"__esModule",{value:!0});var ki=vn(Io()),Ri=vn(Ho()),xi=vn($o());function Si(e){let t=xi.default(e);ki.default(t||{});let n=Ri.default(t);return!n&&e.empty&&e.empty(),n&&e.suggested&&e.suggested(n),n}Be.default=Si});var Go=T($=>{"use strict";var Ti=$&&$.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty($,"__esModule",{value:!0});$.POPULAR_TLDS=$.POPULAR_DOMAINS=$.run=void 0;var Yo=Ti(Bo());$.run=Yo.default;var yt=pn();Object.defineProperty($,"POPULAR_DOMAINS",{enumerable:!0,get:function(){return yt.POPULAR_DOMAINS}});Object.defineProperty($,"POPULAR_TLDS",{enumerable:!0,get:function(){return yt.POPULAR_TLDS}});var Oi={run:Yo.default,POPULAR_DOMAINS:yt.POPULAR_DOMAINS,POPULAR_TLDS:yt.POPULAR_TLDS};$.default=Oi});re();re();function xt(e,t,n,o){function r(){let i=Reflect.construct(HTMLElement,[],r);return i._vdomComponent=e,i._root=o&&o.shadow?i.attachShadow({mode:"open"}):i,i}return r.prototype=Object.create(HTMLElement.prototype),r.prototype.constructor=r,r.prototype.connectedCallback=function(){dr.call(this,o)},r.prototype.attributeChangedCallback=fr,r.prototype.disconnectedCallback=pr,n=n||e.observedAttributes||Object.keys(e.propTypes||{}),r.observedAttributes=n,n.forEach(i=>{Object.defineProperty(r.prototype,i,{get(){return this._vdom.props[i]},set(l){this._vdom?this.attributeChangedCallback(i,null,l):(this._props||(this._props={}),this._props[i]=l,this.connectedCallback());let u=typeof l;(l==null||u==="string"||u==="boolean"||u==="number")&&this.setAttribute(i,l)}})}),customElements.define(t||e.tagName||e.displayName||e.name,r)}function _r(e){this.getChildContext=()=>e.context;let{context:t,children:n,...o}=e;return Fe(n,o)}function dr(e){let t=new CustomEvent("_preact",{detail:{},bubbles:!0,cancelable:!0});this.dispatchEvent(t);let n=t.detail.context;this._vdom=S(_r,{...this._props,context:n},An(this,this._vdomComponent,e)),(this.hasAttribute("hydrate")?Ue:J)(this._vdom,this._root)}function Mn(e){return e.replace(/-(\w)/g,(t,n)=>n?n.toUpperCase():"")}function fr(e,t,n){if(!this._vdom)return;n=n??void 0;let o={};o[e]=n,o[Mn(e)]=n,this._vdom=Fe(this._vdom,o),J(this._vdom,this._root)}function pr(){J(this._vdom=null,this._root)}function Nn(e,t){return S("slot",{...e,ref:o=>{o?(this.ref=o,this._listener||(this._listener=r=>{r.stopPropagation(),r.detail.context=t},o.addEventListener("_preact",this._listener))):this.ref.removeEventListener("_preact",this._listener)}})}function hr(e,t){return S(O,{...e,ref:o=>{o?(this.ref=o,this._listener||(this._listener=r=>{r.stopPropagation(),r.detail.context=t},o.addEventListener("_preact",this._listener))):this.ref.removeEventListener("_preact",this._listener)}})}function An(e,t,n){if(e.nodeType===3)return e.data;if(e.nodeType!==1)return null;let o=[],r={},i=0,l=e.attributes,u=e.childNodes;for(i=l.length;i--;)l[i].name!=="slot"&&(r[l[i].name]=l[i].value,r[Mn(l[i].name)]=l[i].value);for(i=u.length;i--;){let _=An(u[i],null,n),c=u[i].slot;c?r[c]=S(Nn,{name:c},_):o[i]=_}let s=t?S(n&&n.shadow===!1?hr:Nn,null,o):o;return n&&n.shadow===!1&&t&&(e.innerHTML=""),S(t||e.nodeName.toLowerCase(),r,s)}function In(e){var t={blue:"bg-blue-500 hover:bg-blue-700",red:"bg-red-500 hover:bg-red-700",green:"bg-green-500 hover:bg-green-700"},n=t[e.color]||t.green;return h("button",{class:`btn-primary ${n}`},e.children)}In.tagName="t-button";var Un=In;function Fn(e){let t=e.image?`url(${e.image})`:"";backgroundImageStyle={backgroundImage:`linear-gradient(185deg, rgba(196, 204, 255, 0.52), rgba(117, 19, 93, 0.73)), ${t}`,backgroundSize:"cover",backgroundPosition:"center",backgroundRepeat:"no-repeat",height:"150px"};let n=h("a",{href:e.href},h("div",{class:"relative flex items-center justify-between rounded-t-3xl p-5",style:backgroundImageStyle},h("div",{class:"w-[70%] pr-4"},h("h5",{class:"mb-2 break-words text-2xl font-bold tracking-tight text-white"},e.title),h("p",{class:"mb-3 font-normal text-white"},e.description)),h("div",null,h("div",{class:"w-[75px] rounded-full bg-tcreme p-0.5"},h("a",{href:e.href},e.avatar)))));return h("div",{class:"relative max-w-[300px] overflow-clip rounded-3xl border border-gray-200 bg-white shadow "},n,h("div",{class:"p-5"},h("p",{class:"mb-3 font-normal text-gray-700 "},e.start),h("a",{href:e.href,class:"btn-primary inline-flex items-center"},e.buttonText,h("svg",{class:"ml-2 h-3.5 w-3.5","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 14 10"},h("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M1 5h12m0 0L9 1m4 4L9 9"})))))}Fn.tagName="t-card";var jn=Fn;Ce();var Ro=gn(ko());function xo(){let e=be(null);var[t,n]=N(!1);function o(){n(!t)}function r(){n(!1)}return h("div",{class:"relative",onClick:o},h(Ro.Popover,{isOpen:t,positions:["bottom","left","right","top"],content:this.props.menu,padding:2,onClickOutside:r},h("span",null,this.props.button)))}xo.tagName="t-dropdown";var mt=xo;Ce();function So(e){[links,setLinks]=N([]),ee(()=>{links=JSON.parse(document.getElementById(e.dataid).textContent),setLinks(links)},[]);let t=h("button",{class:"flex items-center gap-1 pr-3"},"Menu",h("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5 text-gray-400",viewBox:"0 0 20 20",fill:"currentColor"},h("path",{"fill-rule":"evenodd",d:"M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z","clip-rule":"evenodd"}))),n=h("div",{class:"mt-2 w-40 rounded-md bg-white shadow-md"},links.map(o=>h("a",{class:"flex w-full items-center gap-2 px-4 py-2.5 text-left text-sm first-of-type:rounded-t-md last-of-type:rounded-b-md hover:bg-gray-50 disabled:text-gray-500",href:o.href},o.title)));return h(Fragment,null,h("div",{class:"hidden md:block"},links.map(o=>h("a",{class:"pr-5 hover:text-tblue",href:o.href},o.title))),h("div",{class:"md:hidden "},h(mt,{button:t,menu:n})))}So.tagName="t-navmenu";var To=So;Ce();function Oo(e){return h("button",{onClick:()=>e.onClick(e.tag),type:"button",class:"mr-2 mt-1 inline-flex items-center rounded-full bg-tyellow px-3 py-1 text-xs font-medium leading-4 text-gray-700"},e.tag)}function oi(e){let t=e.tags.map(n=>h(Oo,{onClick:e.tagClick,tag:n}));return h("li",{class:"mb-2 rounded-lg border-2 bg-white px-4 py-2"},h("div",{class:"pb-3"},e.prompt),t)}function Do(e){let[t,n]=N(""),[o,r]=N([]),[i,l]=N([]),[u,s]=N(null),[_,c]=N([]),[a,v]=N([]);ee(()=>{let k={outOfOrder:!1},g=new uFuzzy(k),b=JSON.parse(document.getElementById(e.dataid).textContent),w=b.map(y=>`${y.prompt} ${y.tags.join(" ")}`),E=[...new Set(b.map(y=>y.tags).flat())].sort();s(g),c(w),l(E),v(b),r(b)},[]);function p(k){if(k==="")r(a);else{let[g,b,w]=u.search(_,k);w&&r(w.map(E=>g.map(y=>a[y])[E]))}n(k)}let d=i.map(k=>h(Oo,{onClick:p,tag:k})),m=o.map(k=>h(oi,{prompt:k.prompt,tagClick:p,tags:k.tags}));return h("div",null,h("div",{class:"relative py-5"},h("div",{class:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3"},h("svg",{"aria-hidden":"true",class:"h-5 w-5 text-gray-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},h("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"}))),h("input",{type:"search",value:t,onChange:k=>p(k.target.value),class:"block w-full rounded-lg border border-gray-300 bg-gray-50 p-4 pl-10 text-sm text-gray-900 focus:border-blue-500 focus:ring-blue-500 ",placeholder:"Search prompts...",required:!0})),d,h("ul",{class:"pt-10"},m))}Do.tagName="t-promptsearch";var No=Do;var ri=[Un,mt,No,To,jn];function Mo(){window.h=S,window.Fragment=O,ri.forEach(e=>{xt(e,e.tagName,[],{shadow:!1})})}var Zo=gn(Go());function Di(e,t=300){let n;return(...o)=>{clearTimeout(n),n=setTimeout(()=>{e.apply(this,o)},t)}}function Ni(){document.querySelectorAll("input[type=email]").forEach(e=>{function t(o){let r=o.target.parentElement.querySelector(".email-alert-dismissible");r&&r.remove()}let n=o=>{let r=o.target.value.trim(),i=Zo.default.run({email:r});if(t(o),!i)return;let l=``,u=document.createElement("div");u.classList.add("email-alert-dismissible"),u.innerHTML=l,u.onclick=s=>{t(o),e.value=i.full},e.after(u)};e.addEventListener("keyup",Di(n))})}var Jo=Ni;function Xo(){let e=Intl.DateTimeFormat().resolvedOptions().timeZone,t=document.cookie.split(";").some(n=>n.trim().startsWith("totem_timezone="));e&&!t&&(document.cookie=`totem_timezone=${e}; SameSite=Strict`,location.reload())}var Ko=function(){var e=null,t={};return t.enableLogger=function(){e!=null&&(window.console.log=e)},t.disableLogger=function(){e=console.log,window.console.log=function(){}},t}();function Mi(e){e===!0?Ko.enableLogger():Ko.disableLogger()}var Qo=Mi;dismiss_alert=function(e){e.closest(".alert-dismissible").remove()};Mo();Xo();window.addEventListener("DOMContentLoaded",()=>{Jo()});Qo(window.TOTEM_DATA.debug);})(); +(()=>{var er=Object.create;var Je=Object.defineProperty;var tr=Object.getOwnPropertyDescriptor;var nr=Object.getOwnPropertyNames;var or=Object.getPrototypeOf,rr=Object.prototype.hasOwnProperty;var le=(e,t)=>()=>(e&&(t=e(e=0)),t);var T=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Ct=(e,t)=>{for(var n in t)Je(e,n,{get:t[n],enumerable:!0})},mn=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of nr(t))!rr.call(e,r)&&r!==n&&Je(e,r,{get:()=>t[r],enumerable:!(o=tr(t,r))||o.enumerable});return e};var gn=(e,t,n)=>(n=e!=null?er(or(e)):{},mn(t||!e||!e.__esModule?Je(n,"default",{value:e,enumerable:!0}):n,e)),G=e=>mn(Je({},"__esModule",{value:!0}),e);function K(e,t){for(var n in t)e[n]=t[n];return e}function Rn(e){var t=e.parentNode;t&&t.removeChild(e)}function S(e,t,n){var o,r,i,l={};for(i in t)i=="key"?o=t[i]:i=="ref"?r=t[i]:l[i]=t[i];if(arguments.length>2&&(l.children=arguments.length>3?Ae.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(i in e.defaultProps)l[i]===void 0&&(l[i]=e.defaultProps[i]);return Ne(e,l,o,r,null)}function Ne(e,t,n,o,r){var i={type:e,props:t,key:n,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:r??++Pn};return r==null&&f.vnode!=null&&f.vnode(i),i}function Ie(){return{current:null}}function O(e){return e.children}function U(e,t){this.props=e,this.context=t}function Me(e,t){if(t==null)return e.__?Me(e.__,e.__.__k.indexOf(e)+1):null;for(var n;tt&&ue.sort(Pt));Xe.__r=0}function Sn(e,t,n,o,r,i,l,u,s,_,c){var a,v,p,d,m,k,g,b,w,E=0,y=o&&o.__k||kn,V=y.length,x=V,F=t.length;for(n.__k=[],a=0;a0?Ne(d.type,d.props,d.key,d.ref?d.ref:null,d.__v):d)!=null?(d.__=n,d.__b=n.__b+1,(b=lr(d,y,g=a+E,x))===-1?p=ge:(p=y[b]||ge,y[b]=void 0,x--),kt(e,d,p,r,i,l,u,s,_,c),m=d.__e,(v=d.ref)&&p.ref!=v&&(p.ref&&Rt(p.ref,null,d),c.push(v,d.__c||m,d)),m!=null&&(k==null&&(k=m),(w=p===ge||p.__v===null)?b==-1&&E--:b!==g&&(b===g+1?E++:b>g?x>F-g?E+=b-g:E--:E=b(s!=null?1:0))for(;l>=0||u=0){if((s=t[l])&&r==s.key&&i===s.type)return l;l--}if(u2&&(u.children=arguments.length>3?Ae.call(arguments,2):n),Ne(e.type,u,o||e.key,r||e.ref,null)}function je(e,t){var n={__c:t="__cC"+Ln++,__:e,Consumer:function(o,r){return o.children(r)},Provider:function(o){var r,i;return this.getChildContext||(r=[],(i={})[t]=this,this.getChildContext=function(){return i},this.shouldComponentUpdate=function(l){this.props.value!==l.value&&r.some(function(u){u.__e=!0,Et(u)})},this.sub=function(l){r.push(l);var u=l.componentWillUnmount;l.componentWillUnmount=function(){r.splice(r.indexOf(l),1),u&&u.call(l)}}),o.children}};return n.Provider.__=n.Consumer.contextType=n}var Ae,f,Pn,ir,ue,yn,En,Pt,Ln,ge,kn,ar,Qe,re=le(()=>{ge={},kn=[],ar=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Qe=Array.isArray;Ae=kn.slice,f={__e:function(e,t,n,o){for(var r,i,l;t=t.__;)if((r=t.__c)&&!r.__)try{if((i=r.constructor)&&i.getDerivedStateFromError!=null&&(r.setState(i.getDerivedStateFromError(e)),l=r.__d),r.componentDidCatch!=null&&(r.componentDidCatch(e,o||{}),l=r.__d),l)return r.__E=r}catch(u){e=u}throw e}},Pn=0,ir=function(e){return e!=null&&e.constructor===void 0},U.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=K({},this.state),typeof e=="function"&&(e=e(K({},n),this.props)),e&&K(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),Et(this))},U.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Et(this))},U.prototype.render=O,ue=[],En=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Pt=function(e,t){return e.__v.__b-t.__v.__b},Xe.__r=0,Ln=0});function se(e,t){f.__h&&f.__h(P,e,ye||t),ye=0;var n=P.__H||(P.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({__V:et}),n.__[e]}function N(e){return ye=1,qe(Zn,e)}function qe(e,t,n){var o=se(Q++,2);if(o.t=e,!o.__c&&(o.__=[n?n(t):Zn(void 0,t),function(u){var s=o.__N?o.__N[0]:o.__[0],_=o.t(s,u);s!==_&&(o.__N=[_,o.__[1]],o.__c.setState({}))}],o.__c=P,!P.u)){var r=function(u,s,_){if(!o.__c.__H)return!0;var c=o.__c.__H.__.filter(function(v){return v.__c});if(c.every(function(v){return!v.__N}))return!i||i.call(this,u,s,_);var a=!1;return c.forEach(function(v){if(v.__N){var p=v.__[0];v.__=v.__N,v.__N=void 0,p!==v.__[0]&&(a=!0)}}),!(!a&&o.__c.props===u)&&(!i||i.call(this,u,s,_))};P.u=!0;var i=P.shouldComponentUpdate,l=P.componentWillUpdate;P.componentWillUpdate=function(u,s,_){if(this.__e){var c=i;i=void 0,r(u,s,_),i=c}l&&l.call(this,u,s,_)},P.shouldComponentUpdate=r}return o.__N||o.__}function ee(e,t){var n=se(Q++,3);!f.__s&&Ot(n.__H,t)&&(n.__=e,n.i=t,P.__H.__h.push(n))}function ce(e,t){var n=se(Q++,4);!f.__s&&Ot(n.__H,t)&&(n.__=e,n.i=t,P.__h.push(n))}function be(e){return ye=5,we(function(){return{current:e}},[])}function nt(e,t,n){ye=6,ce(function(){return typeof e=="function"?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0},n==null?n:n.concat(e))}function we(e,t){var n=se(Q++,7);return Ot(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function ot(e,t){return ye=8,we(function(){return e},t)}function rt(e){var t=P.context[e.__c],n=se(Q++,9);return n.c=e,t?(n.__==null&&(n.__=!0,t.sub(P)),t.props.value):e.__}function it(e,t){f.useDebugValue&&f.useDebugValue(t?t(e):e)}function Gn(e){var t=se(Q++,10),n=N();return t.__=e,P.componentDidCatch||(P.componentDidCatch=function(o,r){t.__&&t.__(o,r),n[1](o)}),[n[0],function(){n[1](void 0)}]}function at(){var e=se(Q++,11);if(!e.__){for(var t=P.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__}function vr(){for(var e;e=Yn.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(tt),e.__H.__h.forEach(Tt),e.__H.__h=[]}catch(t){e.__H.__h=[],f.__e(t,e.__v)}}function mr(e){var t,n=function(){clearTimeout(o),Bn&&cancelAnimationFrame(t),setTimeout(e)},o=setTimeout(n,100);Bn&&(t=requestAnimationFrame(n))}function tt(e){var t=P,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),P=t}function Tt(e){var t=P;e.__c=e.__(),P=t}function Ot(e,t){return!e||e.length!==t.length||t.some(function(n,o){return n!==e[o]})}function Zn(e,t){return typeof t=="function"?t(e):t}var Q,P,St,qn,ye,Yn,et,Hn,zn,Vn,Wn,$n,Bn,Ce=le(()=>{re();ye=0,Yn=[],et=[],Hn=f.__b,zn=f.__r,Vn=f.diffed,Wn=f.__c,$n=f.unmount;f.__b=function(e){P=null,Hn&&Hn(e)},f.__r=function(e){zn&&zn(e),Q=0;var t=(P=e.__c).__H;t&&(St===P?(t.__h=[],P.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.__V=et,n.__N=n.i=void 0})):(t.__h.forEach(tt),t.__h.forEach(Tt),t.__h=[],Q=0)),St=P},f.diffed=function(e){Vn&&Vn(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(Yn.push(t)!==1&&qn===f.requestAnimationFrame||((qn=f.requestAnimationFrame)||mr)(vr)),t.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==et&&(n.__=n.__V),n.i=void 0,n.__V=et})),St=P=null},f.__c=function(e,t){t.some(function(n){try{n.__h.forEach(tt),n.__h=n.__h.filter(function(o){return!o.__||Tt(o)})}catch(o){t.some(function(r){r.__h&&(r.__h=[])}),t=[],f.__e(o,n.__v)}}),Wn&&Wn(e,t)},f.unmount=function(e){$n&&$n(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(o){try{tt(o)}catch(r){t=r}}),n.__H=void 0,t&&f.__e(t,n.__v))};Bn=typeof requestAnimationFrame=="function"});function yr(e,t,n,o,r,i){var l,u,s={};for(u in t)u=="ref"?l=t[u]:s[u]=t[u];var _={type:e,props:s,key:n,ref:l,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--gr,__source:r,__self:i};if(typeof e=="function"&&(l=e.defaultProps))for(u in l)s[u]===void 0&&(s[u]=l[u]);return f.vnode&&f.vnode(_),_}var gr,Jn=le(()=>{re();re();gr=0});var Dt={};Ct(Dt,{Fragment:()=>O,jsx:()=>yr,jsxDEV:()=>yr,jsxs:()=>yr});var Nt=le(()=>{Jn()});function io(e,t){for(var n in t)e[n]=t[n];return e}function At(e,t){for(var n in e)if(n!=="__source"&&!(n in t))return!0;for(var o in t)if(o!=="__source"&&e[o]!==t[o])return!0;return!1}function Mt(e,t){return e===t&&(e!==0||1/e==1/t)||e!=e&&t!=t}function He(e){this.props=e}function It(e,t){function n(r){var i=this.props.ref,l=i==r.ref;return!l&&i&&(i.call?i(null):i.current=null),t?!t(this.props,r)||!l:At(this.props,r)}function o(r){return this.shouldComponentUpdate=n,S(e,r)}return o.displayName="Memo("+(e.displayName||e.name)+")",o.prototype.isReactComponent=!0,o.__f=!0,o}function Ut(e){function t(n){var o=io({},n);return delete o.ref,e(o,n.ref||null)}return t.$$typeof=br,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}function ao(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(o){typeof o.__c=="function"&&o.__c()}),e.__c.__H=null),(e=io({},e)).__c!=null&&(e.__c.__P===n&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(o){return ao(o,t,n)})),e}function lo(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(o){return lo(o,t,n)}),e.__c&&e.__c.__P===t&&(e.__e&&n.insertBefore(e.__e,e.__d),e.__c.__e=!0,e.__c.__P=n)),e}function Pe(){this.__u=0,this.t=null,this.__b=null}function uo(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function jt(e){var t,n,o;function r(i){if(t||(t=e()).then(function(l){n=l.default||l},function(l){o=l}),o)throw o;if(!n)throw t;return S(n,i)}return r.displayName="Lazy",r.__f=!0,r}function _e(){this.u=null,this.o=null}function Cr(e){return this.getChildContext=function(){return e.context},e.children}function Pr(e){var t=this,n=e.i;t.componentWillUnmount=function(){J(null,t.l),t.l=null,t.i=null},t.i&&t.i!==n&&t.componentWillUnmount(),t.l||(t.i=n,t.l={nodeType:1,parentNode:n,childNodes:[],appendChild:function(o){this.childNodes.push(o),t.i.appendChild(o)},insertBefore:function(o,r){this.childNodes.push(o),t.i.appendChild(o)},removeChild:function(o){this.childNodes.splice(this.childNodes.indexOf(o)>>>1,1),t.i.removeChild(o)}}),J(S(Cr,{context:t.context},e.__v),t.l)}function qt(e,t){var n=S(Pr,{__v:e,i:t});return n.containerInfo=t,n}function Ht(e,t,n){return t.__k==null&&(t.textContent=""),J(e,t),typeof n=="function"&&n(),e?e.__c:null}function zt(e,t,n){return Ue(e,t),typeof n=="function"&&n(),e?e.__c:null}function Sr(){}function Tr(){return this.cancelBubble}function Or(){return this.defaultPrevented}function $t(e){return S.bind(null,e)}function Ee(e){return!!e&&e.$$typeof===so}function Bt(e){return Ee(e)&&e.type===O}function Yt(e){return Ee(e)?Fe.apply(null,arguments):e}function Gt(e){return!!e.__k&&(J(null,e),!0)}function Zt(e){return e&&(e.base||e.nodeType===1&&e)||null}function lt(e){e()}function Qt(e){return e}function en(){return[!1,lt]}function on(e,t){var n=t(),o=N({h:{__:n,v:t}}),r=o[0].h,i=o[1];return ce(function(){r.__=n,r.v=t,Mt(r.__,t())||i({h:r})},[e,n,t]),ee(function(){return Mt(r.__,r.v())||i({h:r}),e(function(){Mt(r.__,r.v())||i({h:r})})},[e]),n}var Xn,br,Kn,Ft,wr,Qn,eo,so,Er,Lr,kr,Rr,xr,to,Vt,Dr,no,oo,ro,Wt,co,Jt,Xt,Kt,tn,nn,ut,ze=le(()=>{re();re();Ce();Ce();(He.prototype=new U).isPureReactComponent=!0,He.prototype.shouldComponentUpdate=function(e,t){return At(this.props,e)||At(this.state,t)};Xn=f.__b;f.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Xn&&Xn(e)};br=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;Kn=function(e,t){return e==null?null:Z(Z(e).map(t))},Ft={map:Kn,forEach:Kn,count:function(e){return e?Z(e).length:0},only:function(e){var t=Z(e);if(t.length!==1)throw"Children.only";return t[0]},toArray:Z},wr=f.__e;f.__e=function(e,t,n,o){if(e.then){for(var r,i=t;i=i.__;)if((r=i.__c)&&r.__c)return t.__e==null&&(t.__e=n.__e,t.__k=n.__k),r.__c(e,t)}wr(e,t,n,o)};Qn=f.unmount;f.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&e.__h===!0&&(e.type=null),Qn&&Qn(e)},(Pe.prototype=new U).__c=function(e,t){var n=t.__c,o=this;o.t==null&&(o.t=[]),o.t.push(n);var r=uo(o.__v),i=!1,l=function(){i||(i=!0,n.__R=null,r?r(u):u())};n.__R=l;var u=function(){if(!--o.__u){if(o.state.__a){var _=o.state.__a;o.__v.__k[0]=lo(_,_.__c.__P,_.__c.__O)}var c;for(o.setState({__a:o.__b=null});c=o.t.pop();)c.forceUpdate()}},s=t.__h===!0;o.__u++||s||o.setState({__a:o.__b=o.__v.__k[0]}),e.then(l,l)},Pe.prototype.componentWillUnmount=function(){this.t=[]},Pe.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),o=this.__v.__k[0].__c;this.__v.__k[0]=ao(this.__b,n,o.__O=o.__P)}this.__b=null}var r=t.__a&&S(O,null,e.fallback);return r&&(r.__h=null),[S(O,null,t.__a?null:e.children),r]};eo=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]Ft,Component:()=>U,Fragment:()=>O,PureComponent:()=>He,StrictMode:()=>Kt,Suspense:()=>Pe,SuspenseList:()=>_e,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:()=>Wt,cloneElement:()=>Yt,createContext:()=>je,createElement:()=>S,createFactory:()=>$t,createPortal:()=>qt,createRef:()=>Ie,default:()=>ut,findDOMNode:()=>Zt,flushSync:()=>Xt,forwardRef:()=>Ut,hydrate:()=>zt,isElement:()=>nn,isFragment:()=>Bt,isValidElement:()=>Ee,lazy:()=>jt,memo:()=>It,render:()=>Ht,startTransition:()=>lt,unmountComponentAtNode:()=>Gt,unstable_batchedUpdates:()=>Jt,useCallback:()=>ot,useContext:()=>rt,useDebugValue:()=>it,useDeferredValue:()=>Qt,useEffect:()=>ee,useErrorBoundary:()=>Gn,useId:()=>at,useImperativeHandle:()=>nt,useInsertionEffect:()=>tn,useLayoutEffect:()=>ce,useMemo:()=>we,useReducer:()=>qe,useRef:()=>be,useState:()=>N,useSyncExternalStore:()=>on,useTransition:()=>en,version:()=>co});var ae=le(()=>{ze();ze()});var _o={};Ct(_o,{Children:()=>Ft,Component:()=>U,Fragment:()=>O,PureComponent:()=>He,StrictMode:()=>Kt,Suspense:()=>Pe,SuspenseList:()=>_e,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:()=>Wt,cloneElement:()=>Yt,createContext:()=>je,createElement:()=>S,createFactory:()=>$t,createPortal:()=>qt,createRef:()=>Ie,default:()=>ut,findDOMNode:()=>Zt,flushSync:()=>Xt,forwardRef:()=>Ut,hydrate:()=>zt,isElement:()=>nn,isFragment:()=>Bt,isValidElement:()=>Ee,lazy:()=>jt,memo:()=>It,render:()=>Ht,startTransition:()=>lt,unmountComponentAtNode:()=>Gt,unstable_batchedUpdates:()=>Jt,useCallback:()=>ot,useContext:()=>rt,useDebugValue:()=>it,useDeferredValue:()=>Qt,useEffect:()=>ee,useErrorBoundary:()=>Gn,useId:()=>at,useImperativeHandle:()=>nt,useInsertionEffect:()=>tn,useLayoutEffect:()=>ce,useMemo:()=>we,useReducer:()=>qe,useRef:()=>be,useState:()=>N,useSyncExternalStore:()=>on,useTransition:()=>en,version:()=>co});var fo=le(()=>{ze();ze()});var po=T(st=>{"use strict";Object.defineProperty(st,"__esModule",{value:!0});st.PopoverPortal=void 0;var Nr=(ae(),G(ie)),Mr=(fo(),G(_o)),Ar=function(e){var t=e.container,n=e.element,o=e.scoutElement,r=e.children;return Nr.useLayoutEffect(function(){return t.appendChild(n),t.appendChild(o),function(){t.removeChild(n),t.removeChild(o)}},[t,n,o]),Mr.createPortal(r,n)};st.PopoverPortal=Ar});var ct=T(A=>{"use strict";Object.defineProperty(A,"__esModule",{value:!0});A.getNudgedPopoverRect=A.getNewPopoverRect=A.popoverRectForPosition=A.createContainer=A.rectsAreEqual=A.EMPTY_CLIENT_RECT=void 0;A.EMPTY_CLIENT_RECT={top:0,left:0,bottom:0,height:0,right:0,width:0};var Ir=function(e,t){return e===t||e?.bottom===t?.bottom&&e?.height===t?.height&&e?.left===t?.left&&e?.right===t?.right&&e?.top===t?.top&&e?.width===t?.width};A.rectsAreEqual=Ir;var Ur=function(e,t){var n=window.document.createElement("div");return t&&(n.className=t),Object.assign(n.style,e),n};A.createContainer=Ur;var Fr=function(e,t,n,o,r){var i=t.left+t.width/2,l=t.top+t.height/2,u=n.width,s=n.height,_,c;switch(e){case"left":_=l-s/2,c=t.left-o-u,r==="start"&&(_=t.top),r==="end"&&(_=t.bottom-s);break;case"bottom":_=t.bottom+o,c=i-u/2,r==="start"&&(c=t.left),r==="end"&&(c=t.right-u);break;case"right":_=l-s/2,c=t.right+o,r==="start"&&(_=t.top),r==="end"&&(_=t.bottom-s);break;default:_=t.top-s-o,c=i-u/2,r==="start"&&(c=t.left),r==="end"&&(c=t.right-u);break}return{top:_,left:c,width:u,height:s,right:c+u,bottom:_+s}};A.popoverRectForPosition=Fr;var jr=function(e,t){var n=e.position,o=e.align,r=e.childRect,i=e.popoverRect,l=e.boundaryRect,u=e.padding,s=e.reposition,_=A.popoverRectForPosition(n,r,i,u,o),c=s&&(n==="top"&&_.topl.right-t||n==="bottom"&&_.bottom>l.bottom-t);return{rect:_,boundaryViolation:c}};A.getNewPopoverRect=jr;var qr=function(e,t,n){var o=t.top+n,r=t.left+n,i=t.right-n,l=t.bottom-n,u=e.topl?l-e.height:u;var s=e.lefti?i-e.width:s,{top:u,left:s,width:e.width,height:e.height,right:s+e.width,bottom:u+e.height}};A.getNudgedPopoverRect=qr});var vo=T(_t=>{"use strict";Object.defineProperty(_t,"__esModule",{value:!0});_t.useElementRef=void 0;var ho=(ae(),G(ie)),Hr=ct(),zr=function(e,t){var n=ho.useRef(),o=ho.useMemo(function(){return Hr.createContainer(t,e)},[e,t]);return n.current=o,n};_t.useElementRef=zr});var go=T(ft=>{"use strict";Object.defineProperty(ft,"__esModule",{value:!0});ft.usePopover=void 0;var Vr=(ae(),G(ie)),dt=ct(),mo=vo(),Wr={position:"fixed",overflow:"visible",top:"0px",left:"0px"},$r={position:"fixed",top:"0px",left:"0px",width:"0px",height:"0px",visibility:"hidden"},Br=function(e){var t=e.isOpen,n=e.childRef,o=e.positions,r=e.containerClassName,i=e.parentElement,l=e.contentLocation,u=e.align,s=e.padding,_=e.reposition,c=e.boundaryInset,a=e.boundaryElement,v=e.onPositionPopover,p=mo.useElementRef(r,Wr),d=mo.useElementRef("react-tiny-popover-scout",$r),m=Vr.useCallback(function(k){var g,b,w=k===void 0?{}:k,E=w.positionIndex,y=E===void 0?0:E,V=w.parentRect,x=V===void 0?i.getBoundingClientRect():V,F=w.childRect,L=F===void 0?(g=n?.current)===null||g===void 0?void 0:g.getBoundingClientRect():F,I=w.scoutRect,pe=I===void 0?(b=d?.current)===null||b===void 0?void 0:b.getBoundingClientRect():I,he=w.popoverRect,te=he===void 0?p.current.getBoundingClientRect():he,ve=w.boundaryRect,D=ve===void 0?a===i?x:a.getBoundingClientRect():ve;if(!(!L||!x||!t)){if(l){var xe=typeof l=="function"?l({childRect:L,popoverRect:te,parentRect:x,boundaryRect:D,padding:s,nudgedTop:0,nudgedLeft:0,boundaryInset:c,violations:dt.EMPTY_CLIENT_RECT,hasViolations:!1}):l,R=xe.top,bt=xe.left,wt=Math.round(x.left+bt-pe.left),Se=Math.round(x.top+R-pe.top);p.current.style.transform="translate("+wt+"px, "+Se+"px)",v({childRect:L,popoverRect:te,parentRect:x,boundaryRect:D,padding:s,nudgedTop:0,nudgedLeft:0,boundaryInset:c,violations:dt.EMPTY_CLIENT_RECT,hasViolations:!1});return}var ne=y===o.length,j=ne?o[0]:o[y],Ye=dt.getNewPopoverRect({childRect:L,popoverRect:te,boundaryRect:D,position:j,align:u,padding:s,reposition:_},c),W=Ye.rect,Te=Ye.boundaryViolation;if(Te&&_&&!ne){m({positionIndex:y+1,childRect:L,popoverRect:te,parentRect:x,boundaryRect:D});return}var Ge=W.top,Ze=W.left,Oe=W.width,C=W.height,B=_&&!ne,Y=dt.getNudgedPopoverRect(W,D,c),me=Y.left,De=Y.top,q=Ge,oe=Ze;B&&(q=De,oe=me),q=Math.round(q-pe.top),oe=Math.round(oe-pe.left),p.current.style.transform="translate("+oe+"px, "+q+"px)";var H={top:D.top+c-q,left:D.left+c-oe,right:oe+Oe-D.right+c,bottom:q+C-D.bottom+c};v({childRect:L,popoverRect:{top:q,left:oe,width:Oe,height:C,right:oe+Oe,bottom:q+C},parentRect:x,boundaryRect:D,position:j,align:u,padding:s,nudgedTop:De-Ge,nudgedLeft:me-Ze,boundaryInset:c,violations:{top:H.top<=0?0:H.top,left:H.left<=0?0:H.left,right:H.right<=0?0:H.right,bottom:H.bottom<=0?0:H.bottom},hasViolations:H.top>0||H.left>0||H.right>0||H.bottom>0})}},[i,n,d,p,a,t,l,o,u,s,_,c,v]);return{positionPopover:m,popoverRef:p,scoutRef:d}};ft.usePopover=Br});var bo=T(pt=>{"use strict";Object.defineProperty(pt,"__esModule",{value:!0});pt.useMemoizedArray=void 0;var yo=(ae(),G(ie)),Yr=function(e){var t=yo.useRef(e),n=yo.useMemo(function(){if(t.current===e)return t.current;if(t.current.length!==e.length)return t.current=e,e;for(var o=0;o{"use strict";var rn=Le&&Le.__assign||function(){return rn=Object.assign||function(e){for(var t,n=1,o=arguments.length;nv?v-s:c,_=_p?p-s:_,_=Number.isNaN(_)?0:_,c=Number.isNaN(c)?0:c,o){case"right":return{borderTop:r+"px solid transparent",borderBottom:r+"px solid transparent",borderRight:r+"px solid "+i,left:0,top:_};case"left":return{borderTop:r+"px solid transparent",borderBottom:r+"px solid transparent",borderLeft:r+"px solid "+i,right:0,top:_};case"bottom":return{borderLeft:r+"px solid transparent",borderRight:r+"px solid transparent",borderBottom:r+"px solid "+i,top:0,left:c};case"top":return{borderLeft:r+"px solid transparent",borderRight:r+"px solid transparent",borderTop:r+"px solid "+i,bottom:0,left:c};default:return{display:"hidden"}}}())},[i,r,t.height,t.left,t.top,t.width,n.height,n.left,n.top,n.width,o]);return{arrowContainerStyle:l,arrowStyle:u}};Le.useArrowContainer=Gr});var Eo=T(ke=>{"use strict";var de=ke&&ke.__assign||function(){return de=Object.assign||function(e){for(var t,n=1,o=arguments.length;n{"use strict";var vt=z&&z.__assign||function(){return vt=Object.assign||function(e){for(var t,n=1,o=arguments.length;n"u"?e.children:ht.jsx(ni,vt({},e,{ref:t}),void 0)})});var Ao=T(ln=>{"use strict";Object.defineProperty(ln,"__esModule",{value:!0});function ii(e,t){if(!e)throw new Error(t)}ln.default=ii});var Io=T(Ve=>{"use strict";var ai=Ve&&Ve.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ve,"__esModule",{value:!0});var gt=ai(Ao());function li(e){gt.default(Array.isArray(e.domains),"domains must be an array"),gt.default(Array.isArray(e.topLevelDomains),"topLevelDomains must be an array"),gt.default(Array.isArray(e.secondLevelDomains),"secondLevelDomains must be an array"),gt.default(typeof e.distanceFunction=="function","distanceFunction must be a function")}Ve.default=li});var Uo=T(un=>{"use strict";Object.defineProperty(un,"__esModule",{value:!0});function ui(e){return encodeURI(e).replace(/%20/g," ").replace(/%25/g,"%").replace(/%5E/g,"^").replace(/%60/g,"`").replace(/%7B/g,"{").replace(/%7C/g,"|").replace(/%7D/g,"}")}un.default=ui});var Fo=T(sn=>{"use strict";Object.defineProperty(sn,"__esModule",{value:!0});function si(e){let{domain:t,domains:n,distanceFunction:o,threshold:r}=e,i,l=1/0,u=null;if(!(!t||!n)){for(let s=0;s{"use strict";Object.defineProperty(cn,"__esModule",{value:!0});var ci=/\s/;function _i(e){return e.trim?e.trim():fi(di(e))}function di(e){return e.trimLeft?e.trimLeft():e.replace(/^\s\s*/,"")}function fi(e){if(e.trimRight)return e.trimRight();let t=e.length;for(;ci.test(e.charAt(--t)););return e.slice(0,t+1)}cn.default=_i});var qo=T(We=>{"use strict";var pi=We&&We.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(We,"__esModule",{value:!0});var hi=pi(jo()),vi=2;function mi(e){let n=hi.default(e).split("@");if(n.length{"use strict";var dn=$e&&$e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty($e,"__esModule",{value:!0});var gi=dn(Uo()),_n=dn(Fo()),yi=dn(qo());function bi(e){let t=gi.default(e.email.toLowerCase()),n=yi.default(t);if(!n)return;let{domains:o,domainThreshold:r,distanceFunction:i,secondLevelDomains:l,topLevelDomains:u}=e;if(l&&u&&l.indexOf(n.secondLevelDomain)!==-1&&u.indexOf(n.topLevelDomain)!==-1)return;let s=_n.default({domain:n.domain,domains:o,distanceFunction:i,threshold:r});if(s)return s==n.domain?void 0:{address:n.address,domain:s,full:n.address+"@"+s};let _=_n.default({domain:n.secondLevelDomain,domains:l,distanceFunction:i,threshold:e.secondLevelThreshold}),c=_n.default({domain:n.topLevelDomain,domains:u,distanceFunction:i,threshold:e.topLevelThreshold});if(n.domain){s=n.domain;let a=!1;if(_&&_!=n.secondLevelDomain&&(s=s.replace(n.secondLevelDomain,_),a=!0),c&&c!=n.topLevelDomain&&n.secondLevelDomain!==""&&(s=s.replace(new RegExp(n.topLevelDomain+"$"),c),a=!0),a)return{address:n.address,domain:s,full:n.address+"@"+s}}}$e.default=bi});var zo=T(fn=>{"use strict";Object.defineProperty(fn,"__esModule",{value:!0});function wi(e,t){if(e==null||e.length===0)return t==null||t.length===0?0:t.length;if(t==null||t.length===0)return e.length;let n=0,o=0,r=0,i=0,l=5;for(;n+o{"use strict";var Ci=X&&X.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(X,"__esModule",{value:!0});X.POPULAR_TLDS=X.POPULAR_DOMAINS=X.DEFAULT_CONFIG=void 0;var Pi=Ci(zo()),Vo=["msn.com","bellsouth.net","telus.net","comcast.net","optusnet.com.au","earthlink.net","qq.com","sky.com","icloud.com","sympatico.ca","googlemail.com","att.net","xtra.co.nz","web.de","cox.net","gmail.com","ymail.com","aim.com","rogers.com","verizon.net","rocketmail.com","optonline.net","sbcglobal.net","aol.com","aim.com","me.com","mailw.com","btinternet.com","charter.net","shaw.ca","hey.com","proton.me","pm.com","protonmail.com","zoho.com","yandex.com","titan.email"];X.POPULAR_DOMAINS=Vo;var Wo=["com","com.au","com.tw","co","ca","co.nz","co.uk","de","fr","it","ru","org","edu","gov","jp","nl","kr","se","eu","ie","co.il","us","at","be","dk","hk","es","gr","ch","no","cz","net","net.au","info","biz","mil","co.jp","sg","hu","uk","sk","ar","cf","cl","cn","ga","gq","ir","ml","mx","nu","nz","ph","pl","ro","tk","tw","ua","vg","ws","xn","za","app","au","ai","biz","br","blog","cloud","club","cc","de","dev","digital","fi","finance","id","in","io","me","mobi","network","pw","so","xyz","software","to","tech"];X.POPULAR_TLDS=Wo;var Ei={domainThreshold:2,domains:Vo,secondLevelThreshold:2,secondLevelDomains:["yahoo","hotmail","mail","live","outlook"],topLevelThreshold:2,topLevelDomains:Wo,distanceFunction:Pi.default};X.DEFAULT_CONFIG=Ei});var $o=T(hn=>{"use strict";Object.defineProperty(hn,"__esModule",{value:!0});var fe=pn();function Li(e){return{email:e.email,domains:e.domains||fe.DEFAULT_CONFIG.domains,topLevelDomains:e.topLevelDomains||fe.DEFAULT_CONFIG.topLevelDomains,secondLevelDomains:e.secondLevelDomains||fe.DEFAULT_CONFIG.secondLevelDomains,distanceFunction:e.distanceFunction||fe.DEFAULT_CONFIG.distanceFunction,domainThreshold:e.domainThreshold||fe.DEFAULT_CONFIG.domainThreshold,secondLevelThreshold:e.secondLevelThreshold||fe.DEFAULT_CONFIG.secondLevelThreshold,topLevelThreshold:e.topLevelThreshold||fe.DEFAULT_CONFIG.topLevelThreshold,suggested:e.suggested||void 0,empty:e.suggested||void 0}}hn.default=Li});var Bo=T(Be=>{"use strict";var vn=Be&&Be.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Be,"__esModule",{value:!0});var ki=vn(Io()),Ri=vn(Ho()),xi=vn($o());function Si(e){let t=xi.default(e);ki.default(t||{});let n=Ri.default(t);return!n&&e.empty&&e.empty(),n&&e.suggested&&e.suggested(n),n}Be.default=Si});var Go=T($=>{"use strict";var Ti=$&&$.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty($,"__esModule",{value:!0});$.POPULAR_TLDS=$.POPULAR_DOMAINS=$.run=void 0;var Yo=Ti(Bo());$.run=Yo.default;var yt=pn();Object.defineProperty($,"POPULAR_DOMAINS",{enumerable:!0,get:function(){return yt.POPULAR_DOMAINS}});Object.defineProperty($,"POPULAR_TLDS",{enumerable:!0,get:function(){return yt.POPULAR_TLDS}});var Oi={run:Yo.default,POPULAR_DOMAINS:yt.POPULAR_DOMAINS,POPULAR_TLDS:yt.POPULAR_TLDS};$.default=Oi});re();re();function xt(e,t,n,o){function r(){let i=Reflect.construct(HTMLElement,[],r);return i._vdomComponent=e,i._root=o&&o.shadow?i.attachShadow({mode:"open"}):i,i}return r.prototype=Object.create(HTMLElement.prototype),r.prototype.constructor=r,r.prototype.connectedCallback=function(){dr.call(this,o)},r.prototype.attributeChangedCallback=fr,r.prototype.disconnectedCallback=pr,n=n||e.observedAttributes||Object.keys(e.propTypes||{}),r.observedAttributes=n,n.forEach(i=>{Object.defineProperty(r.prototype,i,{get(){return this._vdom.props[i]},set(l){this._vdom?this.attributeChangedCallback(i,null,l):(this._props||(this._props={}),this._props[i]=l,this.connectedCallback());let u=typeof l;(l==null||u==="string"||u==="boolean"||u==="number")&&this.setAttribute(i,l)}})}),customElements.define(t||e.tagName||e.displayName||e.name,r)}function _r(e){this.getChildContext=()=>e.context;let{context:t,children:n,...o}=e;return Fe(n,o)}function dr(e){let t=new CustomEvent("_preact",{detail:{},bubbles:!0,cancelable:!0});this.dispatchEvent(t);let n=t.detail.context;this._vdom=S(_r,{...this._props,context:n},An(this,this._vdomComponent,e)),(this.hasAttribute("hydrate")?Ue:J)(this._vdom,this._root)}function Mn(e){return e.replace(/-(\w)/g,(t,n)=>n?n.toUpperCase():"")}function fr(e,t,n){if(!this._vdom)return;n=n??void 0;let o={};o[e]=n,o[Mn(e)]=n,this._vdom=Fe(this._vdom,o),J(this._vdom,this._root)}function pr(){J(this._vdom=null,this._root)}function Nn(e,t){return S("slot",{...e,ref:o=>{o?(this.ref=o,this._listener||(this._listener=r=>{r.stopPropagation(),r.detail.context=t},o.addEventListener("_preact",this._listener))):this.ref.removeEventListener("_preact",this._listener)}})}function hr(e,t){return S(O,{...e,ref:o=>{o?(this.ref=o,this._listener||(this._listener=r=>{r.stopPropagation(),r.detail.context=t},o.addEventListener("_preact",this._listener))):this.ref.removeEventListener("_preact",this._listener)}})}function An(e,t,n){if(e.nodeType===3)return e.data;if(e.nodeType!==1)return null;let o=[],r={},i=0,l=e.attributes,u=e.childNodes;for(i=l.length;i--;)l[i].name!=="slot"&&(r[l[i].name]=l[i].value,r[Mn(l[i].name)]=l[i].value);for(i=u.length;i--;){let _=An(u[i],null,n),c=u[i].slot;c?r[c]=S(Nn,{name:c},_):o[i]=_}let s=t?S(n&&n.shadow===!1?hr:Nn,null,o):o;return n&&n.shadow===!1&&t&&(e.innerHTML=""),S(t||e.nodeName.toLowerCase(),r,s)}function In(e){var t={blue:"bg-blue-500 hover:bg-blue-700",red:"bg-red-500 hover:bg-red-700",green:"bg-green-500 hover:bg-green-700"},n=t[e.color]||t.green;return h("button",{class:`btn-primary ${n}`},e.children)}In.tagName="t-button";var Un=In;function Fn(e){let t=e.image?`url(${e.image})`:"";backgroundImageStyle={backgroundImage:`linear-gradient(185deg, rgba(196, 204, 255, 0.52), rgba(117, 19, 93, 0.73)), ${t}`,backgroundSize:"cover",backgroundPosition:"center",backgroundRepeat:"no-repeat",height:"150px"};let n=h("a",{href:e.href},h("div",{class:"relative flex items-center justify-between rounded-t-3xl p-5",style:backgroundImageStyle},h("div",{class:"w-[70%] pr-4"},h("h5",{class:"mb-2 break-words text-2xl font-bold tracking-tight text-white"},e.title),h("p",{class:"mb-3 font-normal text-white"},e.description)),h("div",null,h("div",{class:"w-[75px] rounded-full"},h("a",{href:e.href},e.avatar)))));return h("div",{class:"relative max-w-[300px] overflow-clip rounded-3xl border border-gray-200 bg-white shadow "},n,h("div",{class:"p-5"},h("p",{class:"mb-3 font-normal text-gray-700 "},e.start),h("a",{href:e.href,class:"btn-primary inline-flex items-center"},e.buttonText,h("svg",{class:"ml-2 h-3.5 w-3.5","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 14 10"},h("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M1 5h12m0 0L9 1m4 4L9 9"})))))}Fn.tagName="t-card";var jn=Fn;Ce();var Ro=gn(ko());function xo(){let e=be(null);var[t,n]=N(!1);function o(){n(!t)}function r(){n(!1)}return h("div",{class:"relative",onClick:o},h(Ro.Popover,{isOpen:t,positions:["bottom","left","right","top"],content:this.props.menu,padding:2,onClickOutside:r},h("span",null,this.props.button)))}xo.tagName="t-dropdown";var mt=xo;Ce();function So(e){[links,setLinks]=N([]),ee(()=>{links=JSON.parse(document.getElementById(e.dataid).textContent),setLinks(links)},[]);let t=h("button",{class:"flex items-center gap-1 pr-3"},"Menu",h("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5 text-gray-400",viewBox:"0 0 20 20",fill:"currentColor"},h("path",{"fill-rule":"evenodd",d:"M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z","clip-rule":"evenodd"}))),n=h("div",{class:"mt-2 w-40 rounded-md bg-white shadow-md"},links.map(o=>h("a",{class:"flex w-full items-center gap-2 px-4 py-2.5 text-left text-sm first-of-type:rounded-t-md last-of-type:rounded-b-md hover:bg-gray-50 disabled:text-gray-500",href:o.href},o.title)));return h(Fragment,null,h("div",{class:"hidden md:block"},links.map(o=>h("a",{class:"pr-5 hover:text-tblue",href:o.href},o.title))),h("div",{class:"md:hidden "},h(mt,{button:t,menu:n})))}So.tagName="t-navmenu";var To=So;Ce();function Oo(e){return h("button",{onClick:()=>e.onClick(e.tag),type:"button",class:"mr-2 mt-1 inline-flex items-center rounded-full bg-tyellow px-3 py-1 text-xs font-medium leading-4 text-gray-700"},e.tag)}function oi(e){let t=e.tags.map(n=>h(Oo,{onClick:e.tagClick,tag:n}));return h("li",{class:"mb-2 rounded-lg border-2 bg-white px-4 py-2"},h("div",{class:"pb-3"},e.prompt),t)}function Do(e){let[t,n]=N(""),[o,r]=N([]),[i,l]=N([]),[u,s]=N(null),[_,c]=N([]),[a,v]=N([]);ee(()=>{let k={outOfOrder:!1},g=new uFuzzy(k),b=JSON.parse(document.getElementById(e.dataid).textContent),w=b.map(y=>`${y.prompt} ${y.tags.join(" ")}`),E=[...new Set(b.map(y=>y.tags).flat())].sort();s(g),c(w),l(E),v(b),r(b)},[]);function p(k){if(k==="")r(a);else{let[g,b,w]=u.search(_,k);w&&r(w.map(E=>g.map(y=>a[y])[E]))}n(k)}let d=i.map(k=>h(Oo,{onClick:p,tag:k})),m=o.map(k=>h(oi,{prompt:k.prompt,tagClick:p,tags:k.tags}));return h("div",null,h("div",{class:"relative py-5"},h("div",{class:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3"},h("svg",{"aria-hidden":"true",class:"h-5 w-5 text-gray-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},h("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"}))),h("input",{type:"search",value:t,onChange:k=>p(k.target.value),class:"block w-full rounded-lg border border-gray-300 bg-gray-50 p-4 pl-10 text-sm text-gray-900 focus:border-blue-500 focus:ring-blue-500 ",placeholder:"Search prompts...",required:!0})),d,h("ul",{class:"pt-10"},m))}Do.tagName="t-promptsearch";var No=Do;var ri=[Un,mt,No,To,jn];function Mo(){window.h=S,window.Fragment=O,ri.forEach(e=>{xt(e,e.tagName,[],{shadow:!1})})}var Zo=gn(Go());function Di(e,t=300){let n;return(...o)=>{clearTimeout(n),n=setTimeout(()=>{e.apply(this,o)},t)}}function Ni(){document.querySelectorAll("input[type=email]").forEach(e=>{function t(o){let r=o.target.parentElement.querySelector(".email-alert-dismissible");r&&r.remove()}let n=o=>{let r=o.target.value.trim(),i=Zo.default.run({email:r});if(t(o),!i)return;let l=``,u=document.createElement("div");u.classList.add("email-alert-dismissible"),u.innerHTML=l,u.onclick=s=>{t(o),e.value=i.full},e.after(u)};e.addEventListener("keyup",Di(n))})}var Jo=Ni;function Xo(){let e=Intl.DateTimeFormat().resolvedOptions().timeZone,t=document.cookie.split(";").some(n=>n.trim().startsWith("totem_timezone="));e&&!t&&(document.cookie=`totem_timezone=${e}; SameSite=Strict`,location.reload())}var Ko=function(){var e=null,t={};return t.enableLogger=function(){e!=null&&(window.console.log=e)},t.disableLogger=function(){e=console.log,window.console.log=function(){}},t}();function Mi(e){e===!0?Ko.enableLogger():Ko.disableLogger()}var Qo=Mi;dismiss_alert=function(e){e.closest(".alert-dismissible").remove()};Mo();Xo();window.addEventListener("DOMContentLoaded",()=>{Jo()});Qo(window.TOTEM_DATA.debug);})(); //# sourceMappingURL=app.min.js.map diff --git a/totem/static/js/app.min.js.map b/totem/static/js/app.min.js.map index 31874787..11d18d0d 100644 --- a/totem/static/js/app.min.js.map +++ b/totem/static/js/app.min.js.map @@ -1,7 +1,7 @@ { "version": 3, "sources": ["../../../node_modules/preact/src/util.js", "../../../node_modules/preact/src/options.js", "../../../node_modules/preact/src/create-element.js", "../../../node_modules/preact/src/component.js", "../../../node_modules/preact/src/create-context.js", "../../../node_modules/preact/src/constants.js", "../../../node_modules/preact/src/diff/children.js", "../../../node_modules/preact/src/diff/props.js", "../../../node_modules/preact/src/diff/index.js", "../../../node_modules/preact/src/render.js", "../../../node_modules/preact/src/clone-element.js", "../../../node_modules/preact/src/diff/catch-error.js", "../../../node_modules/preact/hooks/src/index.js", "../../../node_modules/preact/jsx-runtime/src/index.js", "../../../node_modules/react/jsx-runtime.mjs", "../../../node_modules/preact/compat/src/util.js", "../../../node_modules/preact/compat/src/PureComponent.js", "../../../node_modules/preact/compat/src/memo.js", "../../../node_modules/preact/compat/src/forwardRef.js", "../../../node_modules/preact/compat/src/Children.js", "../../../node_modules/preact/compat/src/suspense.js", "../../../node_modules/preact/compat/src/suspense-list.js", "../../../node_modules/preact/compat/src/portals.js", "../../../node_modules/preact/compat/src/render.js", "../../../node_modules/preact/compat/src/index.js", "../../../node_modules/react/index.mjs", "../../../node_modules/react-dom/index.mjs", "../../../node_modules/react-tiny-popover/src/PopoverPortal.tsx", "../../../node_modules/react-tiny-popover/src/util.ts", "../../../node_modules/react-tiny-popover/src/useElementRef.ts", "../../../node_modules/react-tiny-popover/src/usePopover.ts", "../../../node_modules/react-tiny-popover/src/useMemoizedArray.ts", "../../../node_modules/react-tiny-popover/src/useArrowContainer.ts", "../../../node_modules/react-tiny-popover/src/ArrowContainer.tsx", "../../../node_modules/react-tiny-popover/src/Popover.tsx", "../../../node_modules/@zootools/email-spell-checker/dist/lib/helpers/assert.js", "../../../node_modules/@zootools/email-spell-checker/dist/lib/helpers/assert-valid-user-options.js", "../../../node_modules/@zootools/email-spell-checker/dist/lib/helpers/encode-email.js", "../../../node_modules/@zootools/email-spell-checker/dist/lib/helpers/find-closest-domain.js", "../../../node_modules/@zootools/email-spell-checker/dist/lib/helpers/trim.js", "../../../node_modules/@zootools/email-spell-checker/dist/lib/helpers/parse-email.js", "../../../node_modules/@zootools/email-spell-checker/dist/lib/suggest-email.js", "../../../node_modules/@zootools/email-spell-checker/dist/lib/fuzzy-detection/sift3-distance.js", "../../../node_modules/@zootools/email-spell-checker/dist/lib/config/index.js", "../../../node_modules/@zootools/email-spell-checker/dist/lib/helpers/get-options.js", "../../../node_modules/@zootools/email-spell-checker/dist/lib/run.js", "../../../node_modules/@zootools/email-spell-checker/dist/index.js", "../../../assets/js/components/index.js", "../../../assets/js/components/register.js", "../../../assets/js/components/button.js", "../../../assets/js/components/card.js", "../../../assets/js/components/dropdown.js", "../../../assets/js/components/navmenu.js", "../../../assets/js/components/promptSearch.js", "../../../assets/js/emailSpellCheck.js", "../../../assets/js/timezone.js", "../../../assets/js/logger.js", "../../../assets/js/app.js"], - "sourcesContent": ["import { EMPTY_ARR } from './constants';\n\nexport const isArray = Array.isArray;\n\n/**\n * Assign properties from `props` to `obj`\n * @template O, P The obj and props types\n * @param {O} obj The object to copy properties to\n * @param {P} props The object to copy properties from\n * @returns {O & P}\n */\nexport function assign(obj, props) {\n\t// @ts-ignore We change the type of `obj` to be `O & P`\n\tfor (let i in props) obj[i] = props[i];\n\treturn /** @type {O & P} */ (obj);\n}\n\n/**\n * Remove a child node from its parent if attached. This is a workaround for\n * IE11 which doesn't support `Element.prototype.remove()`. Using this function\n * is smaller than including a dedicated polyfill.\n * @param {Node} node The node to remove\n */\nexport function removeNode(node) {\n\tlet parentNode = node.parentNode;\n\tif (parentNode) parentNode.removeChild(node);\n}\n\nexport const slice = EMPTY_ARR.slice;\n", "import { _catchError } from './diff/catch-error';\n\n/**\n * The `option` object can potentially contain callback functions\n * that are called during various stages of our renderer. This is the\n * foundation on which all our addons like `preact/debug`, `preact/compat`,\n * and `preact/hooks` are based on. See the `Options` type in `internal.d.ts`\n * for a full list of available option hooks (most editors/IDEs allow you to\n * ctrl+click or cmd+click on mac the type definition below).\n * @type {import('./internal').Options}\n */\nconst options = {\n\t_catchError\n};\n\nexport default options;\n", "import { slice } from './util';\nimport options from './options';\n\nlet vnodeId = 0;\n\n/**\n * Create an virtual node (used for JSX)\n * @param {import('./internal').VNode[\"type\"]} type The node name or Component\n * constructor for this virtual node\n * @param {object | null | undefined} [props] The properties of the virtual node\n * @param {Array} [children] The children of the virtual node\n * @returns {import('./internal').VNode}\n */\nexport function createElement(type, props, children) {\n\tlet normalizedProps = {},\n\t\tkey,\n\t\tref,\n\t\ti;\n\tfor (i in props) {\n\t\tif (i == 'key') key = props[i];\n\t\telse if (i == 'ref') ref = props[i];\n\t\telse normalizedProps[i] = props[i];\n\t}\n\n\tif (arguments.length > 2) {\n\t\tnormalizedProps.children =\n\t\t\targuments.length > 3 ? slice.call(arguments, 2) : children;\n\t}\n\n\t// If a Component VNode, check for and apply defaultProps\n\t// Note: type may be undefined in development, must never error here.\n\tif (typeof type == 'function' && type.defaultProps != null) {\n\t\tfor (i in type.defaultProps) {\n\t\t\tif (normalizedProps[i] === undefined) {\n\t\t\t\tnormalizedProps[i] = type.defaultProps[i];\n\t\t\t}\n\t\t}\n\t}\n\n\treturn createVNode(type, normalizedProps, key, ref, null);\n}\n\n/**\n * Create a VNode (used internally by Preact)\n * @param {import('./internal').VNode[\"type\"]} type The node name or Component\n * Constructor for this virtual node\n * @param {object | string | number | null} props The properties of this virtual node.\n * If this virtual node represents a text node, this is the text of the node (string or number).\n * @param {string | number | null} key The key for this virtual node, used when\n * diffing it against its children\n * @param {import('./internal').VNode[\"ref\"]} ref The ref property that will\n * receive a reference to its created child\n * @returns {import('./internal').VNode}\n */\nexport function createVNode(type, props, key, ref, original) {\n\t// V8 seems to be better at detecting type shapes if the object is allocated from the same call site\n\t// Do not inline into createElement and coerceToVNode!\n\tconst vnode = {\n\t\ttype,\n\t\tprops,\n\t\tkey,\n\t\tref,\n\t\t_children: null,\n\t\t_parent: null,\n\t\t_depth: 0,\n\t\t_dom: null,\n\t\t// _nextDom must be initialized to undefined b/c it will eventually\n\t\t// be set to dom.nextSibling which can return `null` and it is important\n\t\t// to be able to distinguish between an uninitialized _nextDom and\n\t\t// a _nextDom that has been set to `null`\n\t\t_nextDom: undefined,\n\t\t_component: null,\n\t\t_hydrating: null,\n\t\tconstructor: undefined,\n\t\t_original: original == null ? ++vnodeId : original\n\t};\n\n\t// Only invoke the vnode hook if this was *not* a direct copy:\n\tif (original == null && options.vnode != null) options.vnode(vnode);\n\n\treturn vnode;\n}\n\nexport function createRef() {\n\treturn { current: null };\n}\n\nexport function Fragment(props) {\n\treturn props.children;\n}\n\n/**\n * Check if a the argument is a valid Preact VNode.\n * @param {*} vnode\n * @returns {vnode is import('./internal').VNode}\n */\nexport const isValidElement = vnode =>\n\tvnode != null && vnode.constructor === undefined;\n", "import { assign } from './util';\nimport { diff, commitRoot } from './diff/index';\nimport options from './options';\nimport { Fragment } from './create-element';\n\n/**\n * Base Component class. Provides `setState()` and `forceUpdate()`, which\n * trigger rendering\n * @param {object} props The initial component props\n * @param {object} context The initial context from parent components'\n * getChildContext\n */\nexport function Component(props, context) {\n\tthis.props = props;\n\tthis.context = context;\n}\n\n/**\n * Update component state and schedule a re-render.\n * @this {import('./internal').Component}\n * @param {object | ((s: object, p: object) => object)} update A hash of state\n * properties to update with new values or a function that given the current\n * state and props returns a new partial state\n * @param {() => void} [callback] A function to be called once component state is\n * updated\n */\nComponent.prototype.setState = function (update, callback) {\n\t// only clone state when copying to nextState the first time.\n\tlet s;\n\tif (this._nextState != null && this._nextState !== this.state) {\n\t\ts = this._nextState;\n\t} else {\n\t\ts = this._nextState = assign({}, this.state);\n\t}\n\n\tif (typeof update == 'function') {\n\t\t// Some libraries like `immer` mark the current state as readonly,\n\t\t// preventing us from mutating it, so we need to clone it. See #2716\n\t\tupdate = update(assign({}, s), this.props);\n\t}\n\n\tif (update) {\n\t\tassign(s, update);\n\t}\n\n\t// Skip update if updater function returned null\n\tif (update == null) return;\n\n\tif (this._vnode) {\n\t\tif (callback) {\n\t\t\tthis._stateCallbacks.push(callback);\n\t\t}\n\t\tenqueueRender(this);\n\t}\n};\n\n/**\n * Immediately perform a synchronous re-render of the component\n * @this {import('./internal').Component}\n * @param {() => void} [callback] A function to be called after component is\n * re-rendered\n */\nComponent.prototype.forceUpdate = function (callback) {\n\tif (this._vnode) {\n\t\t// Set render mode so that we can differentiate where the render request\n\t\t// is coming from. We need this because forceUpdate should never call\n\t\t// shouldComponentUpdate\n\t\tthis._force = true;\n\t\tif (callback) this._renderCallbacks.push(callback);\n\t\tenqueueRender(this);\n\t}\n};\n\n/**\n * Accepts `props` and `state`, and returns a new Virtual DOM tree to build.\n * Virtual DOM is generally constructed via [JSX](http://jasonformat.com/wtf-is-jsx).\n * @param {object} props Props (eg: JSX attributes) received from parent\n * element/component\n * @param {object} state The component's current state\n * @param {object} context Context object, as returned by the nearest\n * ancestor's `getChildContext()`\n * @returns {import('./index').ComponentChildren | void}\n */\nComponent.prototype.render = Fragment;\n\n/**\n * @param {import('./internal').VNode} vnode\n * @param {number | null} [childIndex]\n */\nexport function getDomSibling(vnode, childIndex) {\n\tif (childIndex == null) {\n\t\t// Use childIndex==null as a signal to resume the search from the vnode's sibling\n\t\treturn vnode._parent\n\t\t\t? getDomSibling(vnode._parent, vnode._parent._children.indexOf(vnode) + 1)\n\t\t\t: null;\n\t}\n\n\tlet sibling;\n\tfor (; childIndex < vnode._children.length; childIndex++) {\n\t\tsibling = vnode._children[childIndex];\n\n\t\tif (sibling != null && sibling._dom != null) {\n\t\t\t// Since updateParentDomPointers keeps _dom pointer correct,\n\t\t\t// we can rely on _dom to tell us if this subtree contains a\n\t\t\t// rendered DOM node, and what the first rendered DOM node is\n\t\t\treturn sibling._nextDom || sibling._dom;\n\t\t}\n\t}\n\n\t// If we get here, we have not found a DOM node in this vnode's children.\n\t// We must resume from this vnode's sibling (in it's parent _children array)\n\t// Only climb up and search the parent if we aren't searching through a DOM\n\t// VNode (meaning we reached the DOM parent of the original vnode that began\n\t// the search)\n\treturn typeof vnode.type == 'function' ? getDomSibling(vnode) : null;\n}\n\n/**\n * Trigger in-place re-rendering of a component.\n * @param {import('./internal').Component} component The component to rerender\n */\nfunction renderComponent(component) {\n\tlet vnode = component._vnode,\n\t\toldDom = vnode._dom,\n\t\tparentDom = component._parentDom;\n\n\tif (parentDom) {\n\t\tlet commitQueue = [],\n\t\t\trefQueue = [];\n\t\tconst oldVNode = assign({}, vnode);\n\t\toldVNode._original = vnode._original + 1;\n\n\t\tdiff(\n\t\t\tparentDom,\n\t\t\tvnode,\n\t\t\toldVNode,\n\t\t\tcomponent._globalContext,\n\t\t\tparentDom.ownerSVGElement !== undefined,\n\t\t\tvnode._hydrating != null ? [oldDom] : null,\n\t\t\tcommitQueue,\n\t\t\toldDom == null ? getDomSibling(vnode) : oldDom,\n\t\t\tvnode._hydrating,\n\t\t\trefQueue\n\t\t);\n\n\t\tcommitRoot(commitQueue, vnode, refQueue);\n\n\t\tif (vnode._dom != oldDom) {\n\t\t\tupdateParentDomPointers(vnode);\n\t\t}\n\t}\n}\n\n/**\n * @param {import('./internal').VNode} vnode\n */\nfunction updateParentDomPointers(vnode) {\n\tif ((vnode = vnode._parent) != null && vnode._component != null) {\n\t\tvnode._dom = vnode._component.base = null;\n\t\tfor (let i = 0; i < vnode._children.length; i++) {\n\t\t\tlet child = vnode._children[i];\n\t\t\tif (child != null && child._dom != null) {\n\t\t\t\tvnode._dom = vnode._component.base = child._dom;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\treturn updateParentDomPointers(vnode);\n\t}\n}\n\n/**\n * The render queue\n * @type {Array}\n */\nlet rerenderQueue = [];\n\n/*\n * The value of `Component.debounce` must asynchronously invoke the passed in callback. It is\n * important that contributors to Preact can consistently reason about what calls to `setState`, etc.\n * do, and when their effects will be applied. See the links below for some further reading on designing\n * asynchronous APIs.\n * * [Designing APIs for Asynchrony](https://blog.izs.me/2013/08/designing-apis-for-asynchrony)\n * * [Callbacks synchronous and asynchronous](https://blog.ometer.com/2011/07/24/callbacks-synchronous-and-asynchronous/)\n */\n\nlet prevDebounce;\n\nconst defer =\n\ttypeof Promise == 'function'\n\t\t? Promise.prototype.then.bind(Promise.resolve())\n\t\t: setTimeout;\n\n/**\n * Enqueue a rerender of a component\n * @param {import('./internal').Component} c The component to rerender\n */\nexport function enqueueRender(c) {\n\tif (\n\t\t(!c._dirty &&\n\t\t\t(c._dirty = true) &&\n\t\t\trerenderQueue.push(c) &&\n\t\t\t!process._rerenderCount++) ||\n\t\tprevDebounce !== options.debounceRendering\n\t) {\n\t\tprevDebounce = options.debounceRendering;\n\t\t(prevDebounce || defer)(process);\n\t}\n}\n\n/**\n * @param {import('./internal').Component} a\n * @param {import('./internal').Component} b\n */\nconst depthSort = (a, b) => a._vnode._depth - b._vnode._depth;\n\n/** Flush the render queue by rerendering all queued components */\nfunction process() {\n\tlet c;\n\trerenderQueue.sort(depthSort);\n\t// Don't update `renderCount` yet. Keep its value non-zero to prevent unnecessary\n\t// process() calls from getting scheduled while `queue` is still being consumed.\n\twhile ((c = rerenderQueue.shift())) {\n\t\tif (c._dirty) {\n\t\t\tlet renderQueueLength = rerenderQueue.length;\n\t\t\trenderComponent(c);\n\t\t\tif (rerenderQueue.length > renderQueueLength) {\n\t\t\t\t// When i.e. rerendering a provider additional new items can be injected, we want to\n\t\t\t\t// keep the order from top to bottom with those new items so we can handle them in a\n\t\t\t\t// single pass\n\t\t\t\trerenderQueue.sort(depthSort);\n\t\t\t}\n\t\t}\n\t}\n\tprocess._rerenderCount = 0;\n}\n\nprocess._rerenderCount = 0;\n", "import { enqueueRender } from './component';\n\nexport let i = 0;\n\nexport function createContext(defaultValue, contextId) {\n\tcontextId = '__cC' + i++;\n\n\tconst context = {\n\t\t_id: contextId,\n\t\t_defaultValue: defaultValue,\n\t\t/** @type {import('./internal').FunctionComponent} */\n\t\tConsumer(props, contextValue) {\n\t\t\t// return props.children(\n\t\t\t// \tcontext[contextId] ? context[contextId].props.value : defaultValue\n\t\t\t// );\n\t\t\treturn props.children(contextValue);\n\t\t},\n\t\t/** @type {import('./internal').FunctionComponent} */\n\t\tProvider(props) {\n\t\t\tif (!this.getChildContext) {\n\t\t\t\t/** @type {import('./internal').Component[]} */\n\t\t\t\tlet subs = [];\n\t\t\t\tlet ctx = {};\n\t\t\t\tctx[contextId] = this;\n\n\t\t\t\tthis.getChildContext = () => ctx;\n\n\t\t\t\tthis.shouldComponentUpdate = function (_props) {\n\t\t\t\t\tif (this.props.value !== _props.value) {\n\t\t\t\t\t\t// I think the forced value propagation here was only needed when `options.debounceRendering` was being bypassed:\n\t\t\t\t\t\t// https://github.com/preactjs/preact/commit/4d339fb803bea09e9f198abf38ca1bf8ea4b7771#diff-54682ce380935a717e41b8bfc54737f6R358\n\t\t\t\t\t\t// In those cases though, even with the value corrected, we're double-rendering all nodes.\n\t\t\t\t\t\t// It might be better to just tell folks not to use force-sync mode.\n\t\t\t\t\t\t// Currently, using `useContext()` in a class component will overwrite its `this.context` value.\n\t\t\t\t\t\t// subs.some(c => {\n\t\t\t\t\t\t// \tc.context = _props.value;\n\t\t\t\t\t\t// \tenqueueRender(c);\n\t\t\t\t\t\t// });\n\n\t\t\t\t\t\t// subs.some(c => {\n\t\t\t\t\t\t// \tc.context[contextId] = _props.value;\n\t\t\t\t\t\t// \tenqueueRender(c);\n\t\t\t\t\t\t// });\n\t\t\t\t\t\tsubs.some(c => {\n\t\t\t\t\t\t\tc._force = true;\n\t\t\t\t\t\t\tenqueueRender(c);\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t};\n\n\t\t\t\tthis.sub = c => {\n\t\t\t\t\tsubs.push(c);\n\t\t\t\t\tlet old = c.componentWillUnmount;\n\t\t\t\t\tc.componentWillUnmount = () => {\n\t\t\t\t\t\tsubs.splice(subs.indexOf(c), 1);\n\t\t\t\t\t\tif (old) old.call(c);\n\t\t\t\t\t};\n\t\t\t\t};\n\t\t\t}\n\n\t\t\treturn props.children;\n\t\t}\n\t};\n\n\t// Devtools needs access to the context object when it\n\t// encounters a Provider. This is necessary to support\n\t// setting `displayName` on the context object instead\n\t// of on the component itself. See:\n\t// https://reactjs.org/docs/context.html#contextdisplayname\n\n\treturn (context.Provider._contextRef = context.Consumer.contextType =\n\t\tcontext);\n}\n", "export const EMPTY_OBJ = {};\nexport const EMPTY_ARR = [];\nexport const IS_NON_DIMENSIONAL =\n\t/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;\n", "import { diff, unmount, applyRef } from './index';\nimport { createVNode, Fragment } from '../create-element';\nimport { EMPTY_OBJ, EMPTY_ARR } from '../constants';\nimport { isArray } from '../util';\nimport { getDomSibling } from '../component';\n\n/**\n * Diff the children of a virtual node\n * @param {import('../internal').PreactElement} parentDom The DOM element whose\n * children are being diffed\n * @param {import('../internal').ComponentChildren[]} renderResult\n * @param {import('../internal').VNode} newParentVNode The new virtual\n * node whose children should be diff'ed against oldParentVNode\n * @param {import('../internal').VNode} oldParentVNode The old virtual\n * node whose children should be diff'ed against newParentVNode\n * @param {object} globalContext The current context object - modified by getChildContext\n * @param {boolean} isSvg Whether or not this DOM node is an SVG node\n * @param {Array} excessDomChildren\n * @param {Array} commitQueue List of components\n * which have callbacks to invoke in commitRoot\n * @param {import('../internal').PreactElement} oldDom The current attached DOM\n * element any new dom elements should be placed around. Likely `null` on first\n * render (except when hydrating). Can be a sibling DOM element when diffing\n * Fragments that have siblings. In most cases, it starts out as `oldChildren[0]._dom`.\n * @param {boolean} isHydrating Whether or not we are in hydration\n * @param {Array} refQueue an array of elements needed to invoke refs\n */\nexport function diffChildren(\n\tparentDom,\n\trenderResult,\n\tnewParentVNode,\n\toldParentVNode,\n\tglobalContext,\n\tisSvg,\n\texcessDomChildren,\n\tcommitQueue,\n\toldDom,\n\tisHydrating,\n\trefQueue\n) {\n\tlet i,\n\t\tj,\n\t\toldVNode,\n\t\tchildVNode,\n\t\tnewDom,\n\t\tfirstChildDom,\n\t\tskew = 0;\n\n\t// This is a compression of oldParentVNode!=null && oldParentVNode != EMPTY_OBJ && oldParentVNode._children || EMPTY_ARR\n\t// as EMPTY_OBJ._children should be `undefined`.\n\tlet oldChildren = (oldParentVNode && oldParentVNode._children) || EMPTY_ARR;\n\n\tlet oldChildrenLength = oldChildren.length,\n\t\tremainingOldChildren = oldChildrenLength,\n\t\tnewChildrenLength = renderResult.length;\n\n\tnewParentVNode._children = [];\n\tfor (i = 0; i < newChildrenLength; i++) {\n\t\tchildVNode = renderResult[i];\n\n\t\tif (\n\t\t\tchildVNode == null ||\n\t\t\ttypeof childVNode == 'boolean' ||\n\t\t\ttypeof childVNode == 'function'\n\t\t) {\n\t\t\tchildVNode = newParentVNode._children[i] = null;\n\t\t}\n\t\t// If this newVNode is being reused (e.g.
{reuse}{reuse}
) in the same diff,\n\t\t// or we are rendering a component (e.g. setState) copy the oldVNodes so it can have\n\t\t// it's own DOM & etc. pointers\n\t\telse if (\n\t\t\ttypeof childVNode == 'string' ||\n\t\t\ttypeof childVNode == 'number' ||\n\t\t\t// eslint-disable-next-line valid-typeof\n\t\t\ttypeof childVNode == 'bigint'\n\t\t) {\n\t\t\tchildVNode = newParentVNode._children[i] = createVNode(\n\t\t\t\tnull,\n\t\t\t\tchildVNode,\n\t\t\t\tnull,\n\t\t\t\tnull,\n\t\t\t\tchildVNode\n\t\t\t);\n\t\t} else if (isArray(childVNode)) {\n\t\t\tchildVNode = newParentVNode._children[i] = createVNode(\n\t\t\t\tFragment,\n\t\t\t\t{ children: childVNode },\n\t\t\t\tnull,\n\t\t\t\tnull,\n\t\t\t\tnull\n\t\t\t);\n\t\t} else if (childVNode._depth > 0) {\n\t\t\t// VNode is already in use, clone it. This can happen in the following\n\t\t\t// scenario:\n\t\t\t// const reuse =
\n\t\t\t//
{reuse}{reuse}
\n\t\t\tchildVNode = newParentVNode._children[i] = createVNode(\n\t\t\t\tchildVNode.type,\n\t\t\t\tchildVNode.props,\n\t\t\t\tchildVNode.key,\n\t\t\t\tchildVNode.ref ? childVNode.ref : null,\n\t\t\t\tchildVNode._original\n\t\t\t);\n\t\t} else {\n\t\t\tchildVNode = newParentVNode._children[i] = childVNode;\n\t\t}\n\n\t\t// Terser removes the `continue` here and wraps the loop body\n\t\t// in a `if (childVNode) { ... } condition\n\t\tif (childVNode == null) {\n\t\t\toldVNode = oldChildren[i];\n\t\t\tif (oldVNode && oldVNode.key == null && oldVNode._dom) {\n\t\t\t\tif (oldVNode._dom == oldDom) {\n\t\t\t\t\toldVNode._parent = oldParentVNode;\n\t\t\t\t\toldDom = getDomSibling(oldVNode);\n\t\t\t\t}\n\n\t\t\t\tunmount(oldVNode, oldVNode, false);\n\t\t\t\toldChildren[i] = null;\n\t\t\t}\n\n\t\t\tcontinue;\n\t\t}\n\n\t\tchildVNode._parent = newParentVNode;\n\t\tchildVNode._depth = newParentVNode._depth + 1;\n\n\t\tlet skewedIndex = i + skew;\n\t\tconst matchingIndex = findMatchingIndex(\n\t\t\tchildVNode,\n\t\t\toldChildren,\n\t\t\tskewedIndex,\n\t\t\tremainingOldChildren\n\t\t);\n\n\t\tif (matchingIndex === -1) {\n\t\t\toldVNode = EMPTY_OBJ;\n\t\t} else {\n\t\t\toldVNode = oldChildren[matchingIndex] || EMPTY_OBJ;\n\t\t\toldChildren[matchingIndex] = undefined;\n\t\t\tremainingOldChildren--;\n\t\t}\n\n\t\t// Morph the old element into the new one, but don't append it to the dom yet\n\t\tdiff(\n\t\t\tparentDom,\n\t\t\tchildVNode,\n\t\t\toldVNode,\n\t\t\tglobalContext,\n\t\t\tisSvg,\n\t\t\texcessDomChildren,\n\t\t\tcommitQueue,\n\t\t\toldDom,\n\t\t\tisHydrating,\n\t\t\trefQueue\n\t\t);\n\n\t\tnewDom = childVNode._dom;\n\t\tif ((j = childVNode.ref) && oldVNode.ref != j) {\n\t\t\tif (oldVNode.ref) {\n\t\t\t\tapplyRef(oldVNode.ref, null, childVNode);\n\t\t\t}\n\t\t\trefQueue.push(j, childVNode._component || newDom, childVNode);\n\t\t}\n\n\t\tif (newDom != null) {\n\t\t\tif (firstChildDom == null) {\n\t\t\t\tfirstChildDom = newDom;\n\t\t\t}\n\n\t\t\tlet isMounting = oldVNode === EMPTY_OBJ || oldVNode._original === null;\n\t\t\tif (isMounting) {\n\t\t\t\tif (matchingIndex == -1) {\n\t\t\t\t\tskew--;\n\t\t\t\t}\n\t\t\t} else if (matchingIndex !== skewedIndex) {\n\t\t\t\tif (matchingIndex === skewedIndex + 1) {\n\t\t\t\t\tskew++;\n\t\t\t\t} else if (matchingIndex > skewedIndex) {\n\t\t\t\t\tif (remainingOldChildren > newChildrenLength - skewedIndex) {\n\t\t\t\t\t\tskew += matchingIndex - skewedIndex;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// ### Change from keyed: I think this was missing from the algo...\n\t\t\t\t\t\tskew--;\n\t\t\t\t\t}\n\t\t\t\t} else if (matchingIndex < skewedIndex) {\n\t\t\t\t\tif (matchingIndex == skewedIndex - 1) {\n\t\t\t\t\t\tskew = matchingIndex - skewedIndex;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tskew = 0;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tskew = 0;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tskewedIndex = i + skew;\n\n\t\t\tif (\n\t\t\t\ttypeof childVNode.type == 'function' &&\n\t\t\t\t(matchingIndex !== skewedIndex ||\n\t\t\t\t\toldVNode._children === childVNode._children)\n\t\t\t) {\n\t\t\t\toldDom = reorderChildren(childVNode, oldDom, parentDom);\n\t\t\t} else if (\n\t\t\t\ttypeof childVNode.type != 'function' &&\n\t\t\t\t(matchingIndex !== skewedIndex || isMounting)\n\t\t\t) {\n\t\t\t\toldDom = placeChild(parentDom, newDom, oldDom);\n\t\t\t} else if (childVNode._nextDom !== undefined) {\n\t\t\t\t// Only Fragments or components that return Fragment like VNodes will\n\t\t\t\t// have a non-undefined _nextDom. Continue the diff from the sibling\n\t\t\t\t// of last DOM child of this child VNode\n\t\t\t\toldDom = childVNode._nextDom;\n\n\t\t\t\t// Eagerly cleanup _nextDom. We don't need to persist the value because\n\t\t\t\t// it is only used by `diffChildren` to determine where to resume the diff after\n\t\t\t\t// diffing Components and Fragments. Once we store it the nextDOM local var, we\n\t\t\t\t// can clean up the property\n\t\t\t\tchildVNode._nextDom = undefined;\n\t\t\t} else {\n\t\t\t\toldDom = newDom.nextSibling;\n\t\t\t}\n\n\t\t\tif (typeof newParentVNode.type == 'function') {\n\t\t\t\t// Because the newParentVNode is Fragment-like, we need to set it's\n\t\t\t\t// _nextDom property to the nextSibling of its last child DOM node.\n\t\t\t\t//\n\t\t\t\t// `oldDom` contains the correct value here because if the last child\n\t\t\t\t// is a Fragment-like, then oldDom has already been set to that child's _nextDom.\n\t\t\t\t// If the last child is a DOM VNode, then oldDom will be set to that DOM\n\t\t\t\t// node's nextSibling.\n\t\t\t\tnewParentVNode._nextDom = oldDom;\n\t\t\t}\n\t\t}\n\t}\n\n\tnewParentVNode._dom = firstChildDom;\n\n\t// Remove remaining oldChildren if there are any.\n\tfor (i = oldChildrenLength; i--; ) {\n\t\tif (oldChildren[i] != null) {\n\t\t\tif (\n\t\t\t\ttypeof newParentVNode.type == 'function' &&\n\t\t\t\toldChildren[i]._dom != null &&\n\t\t\t\toldChildren[i]._dom == newParentVNode._nextDom\n\t\t\t) {\n\t\t\t\t// If the newParentVNode.__nextDom points to a dom node that is about to\n\t\t\t\t// be unmounted, then get the next sibling of that vnode and set\n\t\t\t\t// _nextDom to it\n\n\t\t\t\tnewParentVNode._nextDom = oldChildren[i]._dom.nextSibling;\n\t\t\t}\n\n\t\t\tunmount(oldChildren[i], oldChildren[i]);\n\t\t}\n\t}\n}\n\nfunction reorderChildren(childVNode, oldDom, parentDom) {\n\t// Note: VNodes in nested suspended trees may be missing _children.\n\tlet c = childVNode._children;\n\n\tlet tmp = 0;\n\tfor (; c && tmp < c.length; tmp++) {\n\t\tlet vnode = c[tmp];\n\t\tif (vnode) {\n\t\t\t// We typically enter this code path on sCU bailout, where we copy\n\t\t\t// oldVNode._children to newVNode._children. If that is the case, we need\n\t\t\t// to update the old children's _parent pointer to point to the newVNode\n\t\t\t// (childVNode here).\n\t\t\tvnode._parent = childVNode;\n\n\t\t\tif (typeof vnode.type == 'function') {\n\t\t\t\toldDom = reorderChildren(vnode, oldDom, parentDom);\n\t\t\t} else {\n\t\t\t\toldDom = placeChild(parentDom, vnode._dom, oldDom);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn oldDom;\n}\n\n/**\n * Flatten and loop through the children of a virtual node\n * @param {import('../index').ComponentChildren} children The unflattened\n * children of a virtual node\n * @returns {import('../internal').VNode[]}\n */\nexport function toChildArray(children, out) {\n\tout = out || [];\n\tif (children == null || typeof children == 'boolean') {\n\t} else if (isArray(children)) {\n\t\tchildren.some(child => {\n\t\t\ttoChildArray(child, out);\n\t\t});\n\t} else {\n\t\tout.push(children);\n\t}\n\treturn out;\n}\n\nfunction placeChild(parentDom, newDom, oldDom) {\n\tif (oldDom == null || oldDom.parentNode !== parentDom) {\n\t\tparentDom.insertBefore(newDom, null);\n\t} else if (newDom != oldDom || newDom.parentNode == null) {\n\t\tparentDom.insertBefore(newDom, oldDom);\n\t}\n\n\treturn newDom.nextSibling;\n}\n\n/**\n * @param {import('../internal').VNode | string} childVNode\n * @param {import('../internal').VNode[]} oldChildren\n * @param {number} skewedIndex\n * @param {number} remainingOldChildren\n * @returns {number}\n */\nfunction findMatchingIndex(\n\tchildVNode,\n\toldChildren,\n\tskewedIndex,\n\tremainingOldChildren\n) {\n\tconst key = childVNode.key;\n\tconst type = childVNode.type;\n\tlet x = skewedIndex - 1;\n\tlet y = skewedIndex + 1;\n\tlet oldVNode = oldChildren[skewedIndex];\n\n\tif (\n\t\toldVNode === null ||\n\t\t(oldVNode && key == oldVNode.key && type === oldVNode.type)\n\t) {\n\t\treturn skewedIndex;\n\t} else if (remainingOldChildren > (oldVNode != null ? 1 : 0)) {\n\t\twhile (x >= 0 || y < oldChildren.length) {\n\t\t\tif (x >= 0) {\n\t\t\t\toldVNode = oldChildren[x];\n\t\t\t\tif (oldVNode && key == oldVNode.key && type === oldVNode.type) {\n\t\t\t\t\treturn x;\n\t\t\t\t}\n\t\t\t\tx--;\n\t\t\t}\n\n\t\t\tif (y < oldChildren.length) {\n\t\t\t\toldVNode = oldChildren[y];\n\t\t\t\tif (oldVNode && key == oldVNode.key && type === oldVNode.type) {\n\t\t\t\t\treturn y;\n\t\t\t\t}\n\t\t\t\ty++;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn -1;\n}\n", "import { IS_NON_DIMENSIONAL } from '../constants';\nimport options from '../options';\n\n/**\n * Diff the old and new properties of a VNode and apply changes to the DOM node\n * @param {import('../internal').PreactElement} dom The DOM node to apply\n * changes to\n * @param {object} newProps The new props\n * @param {object} oldProps The old props\n * @param {boolean} isSvg Whether or not this node is an SVG node\n * @param {boolean} hydrate Whether or not we are in hydration mode\n */\nexport function diffProps(dom, newProps, oldProps, isSvg, hydrate) {\n\tlet i;\n\n\tfor (i in oldProps) {\n\t\tif (i !== 'children' && i !== 'key' && !(i in newProps)) {\n\t\t\tsetProperty(dom, i, null, oldProps[i], isSvg);\n\t\t}\n\t}\n\n\tfor (i in newProps) {\n\t\tif (\n\t\t\t(!hydrate || typeof newProps[i] == 'function') &&\n\t\t\ti !== 'children' &&\n\t\t\ti !== 'key' &&\n\t\t\ti !== 'value' &&\n\t\t\ti !== 'checked' &&\n\t\t\toldProps[i] !== newProps[i]\n\t\t) {\n\t\t\tsetProperty(dom, i, newProps[i], oldProps[i], isSvg);\n\t\t}\n\t}\n}\n\nfunction setStyle(style, key, value) {\n\tif (key[0] === '-') {\n\t\tstyle.setProperty(key, value == null ? '' : value);\n\t} else if (value == null) {\n\t\tstyle[key] = '';\n\t} else if (typeof value != 'number' || IS_NON_DIMENSIONAL.test(key)) {\n\t\tstyle[key] = value;\n\t} else {\n\t\tstyle[key] = value + 'px';\n\t}\n}\n\n/**\n * Set a property value on a DOM node\n * @param {import('../internal').PreactElement} dom The DOM node to modify\n * @param {string} name The name of the property to set\n * @param {*} value The value to set the property to\n * @param {*} oldValue The old value the property had\n * @param {boolean} isSvg Whether or not this DOM node is an SVG node or not\n */\nexport function setProperty(dom, name, value, oldValue, isSvg) {\n\tlet useCapture;\n\n\to: if (name === 'style') {\n\t\tif (typeof value == 'string') {\n\t\t\tdom.style.cssText = value;\n\t\t} else {\n\t\t\tif (typeof oldValue == 'string') {\n\t\t\t\tdom.style.cssText = oldValue = '';\n\t\t\t}\n\n\t\t\tif (oldValue) {\n\t\t\t\tfor (name in oldValue) {\n\t\t\t\t\tif (!(value && name in value)) {\n\t\t\t\t\t\tsetStyle(dom.style, name, '');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (value) {\n\t\t\t\tfor (name in value) {\n\t\t\t\t\tif (!oldValue || value[name] !== oldValue[name]) {\n\t\t\t\t\t\tsetStyle(dom.style, name, value[name]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t// Benchmark for comparison: https://esbench.com/bench/574c954bdb965b9a00965ac6\n\telse if (name[0] === 'o' && name[1] === 'n') {\n\t\tuseCapture =\n\t\t\tname !== (name = name.replace(/(PointerCapture)$|Capture$/, '$1'));\n\n\t\t// Infer correct casing for DOM built-in events:\n\t\tif (name.toLowerCase() in dom) name = name.toLowerCase().slice(2);\n\t\telse name = name.slice(2);\n\n\t\tif (!dom._listeners) dom._listeners = {};\n\t\tdom._listeners[name + useCapture] = value;\n\n\t\tif (value) {\n\t\t\tif (!oldValue) {\n\t\t\t\tvalue._attached = Date.now();\n\t\t\t\tconst handler = useCapture ? eventProxyCapture : eventProxy;\n\t\t\t\tdom.addEventListener(name, handler, useCapture);\n\t\t\t} else {\n\t\t\t\tvalue._attached = oldValue._attached;\n\t\t\t}\n\t\t} else {\n\t\t\tconst handler = useCapture ? eventProxyCapture : eventProxy;\n\t\t\tdom.removeEventListener(name, handler, useCapture);\n\t\t}\n\t} else if (name !== 'dangerouslySetInnerHTML') {\n\t\tif (isSvg) {\n\t\t\t// Normalize incorrect prop usage for SVG:\n\t\t\t// - xlink:href / xlinkHref --> href (xlink:href was removed from SVG and isn't needed)\n\t\t\t// - className --> class\n\t\t\tname = name.replace(/xlink(H|:h)/, 'h').replace(/sName$/, 's');\n\t\t} else if (\n\t\t\tname !== 'width' &&\n\t\t\tname !== 'height' &&\n\t\t\tname !== 'href' &&\n\t\t\tname !== 'list' &&\n\t\t\tname !== 'form' &&\n\t\t\t// Default value in browsers is `-1` and an empty string is\n\t\t\t// cast to `0` instead\n\t\t\tname !== 'tabIndex' &&\n\t\t\tname !== 'download' &&\n\t\t\tname !== 'rowSpan' &&\n\t\t\tname !== 'colSpan' &&\n\t\t\tname !== 'role' &&\n\t\t\tname in dom\n\t\t) {\n\t\t\ttry {\n\t\t\t\tdom[name] = value == null ? '' : value;\n\t\t\t\t// labelled break is 1b smaller here than a return statement (sorry)\n\t\t\t\tbreak o;\n\t\t\t} catch (e) {}\n\t\t}\n\n\t\t// aria- and data- attributes have no boolean representation.\n\t\t// A `false` value is different from the attribute not being\n\t\t// present, so we can't remove it. For non-boolean aria\n\t\t// attributes we could treat false as a removal, but the\n\t\t// amount of exceptions would cost too many bytes. On top of\n\t\t// that other frameworks generally stringify `false`.\n\n\t\tif (typeof value === 'function') {\n\t\t\t// never serialize functions as attribute values\n\t\t} else if (value != null && (value !== false || name[4] === '-')) {\n\t\t\tdom.setAttribute(name, value);\n\t\t} else {\n\t\t\tdom.removeAttribute(name);\n\t\t}\n\t}\n}\n\n/**\n * Proxy an event to hooked event handlers\n * @param {Event} e The event object from the browser\n * @private\n */\nfunction eventProxy(e) {\n\tconst eventHandler = this._listeners[e.type + false];\n\t/**\n\t * This trick is inspired by Vue https://github.com/vuejs/core/blob/main/packages/runtime-dom/src/modules/events.ts#L90-L101\n\t * when the dom performs an event it leaves micro-ticks in between bubbling up which means that an event can trigger on a newly\n\t * created DOM-node while the event bubbles up, this can cause quirky behavior as seen in https://github.com/preactjs/preact/issues/3927\n\t */\n\tif (!e._dispatched) {\n\t\t// When an event has no _dispatched we know this is the first event-target in the chain\n\t\t// so we set the initial dispatched time.\n\t\te._dispatched = Date.now();\n\t\t// When the _dispatched is smaller than the time when the targetted event handler was attached\n\t\t// we know we have bubbled up to an element that was added during patching the dom.\n\t} else if (e._dispatched <= eventHandler._attached) {\n\t\treturn;\n\t}\n\treturn eventHandler(options.event ? options.event(e) : e);\n}\n\nfunction eventProxyCapture(e) {\n\treturn this._listeners[e.type + true](options.event ? options.event(e) : e);\n}\n", "import { EMPTY_OBJ } from '../constants';\nimport { Component, getDomSibling } from '../component';\nimport { Fragment } from '../create-element';\nimport { diffChildren } from './children';\nimport { diffProps, setProperty } from './props';\nimport { assign, isArray, removeNode, slice } from '../util';\nimport options from '../options';\n\n/**\n * Diff two virtual nodes and apply proper changes to the DOM\n * @param {import('../internal').PreactElement} parentDom The parent of the DOM element\n * @param {import('../internal').VNode} newVNode The new virtual node\n * @param {import('../internal').VNode} oldVNode The old virtual node\n * @param {object} globalContext The current context object. Modified by getChildContext\n * @param {boolean} isSvg Whether or not this element is an SVG node\n * @param {Array} excessDomChildren\n * @param {Array} commitQueue List of components\n * which have callbacks to invoke in commitRoot\n * @param {import('../internal').PreactElement} oldDom The current attached DOM\n * element any new dom elements should be placed around. Likely `null` on first\n * render (except when hydrating). Can be a sibling DOM element when diffing\n * Fragments that have siblings. In most cases, it starts out as `oldChildren[0]._dom`.\n * @param {boolean} isHydrating Whether or not we are in hydration\n * @param {Array} refQueue an array of elements needed to invoke refs\n */\nexport function diff(\n\tparentDom,\n\tnewVNode,\n\toldVNode,\n\tglobalContext,\n\tisSvg,\n\texcessDomChildren,\n\tcommitQueue,\n\toldDom,\n\tisHydrating,\n\trefQueue\n) {\n\tlet tmp,\n\t\tnewType = newVNode.type;\n\n\t// When passing through createElement it assigns the object\n\t// constructor as undefined. This to prevent JSON-injection.\n\tif (newVNode.constructor !== undefined) return null;\n\n\t// If the previous diff bailed out, resume creating/hydrating.\n\tif (oldVNode._hydrating != null) {\n\t\tisHydrating = oldVNode._hydrating;\n\t\toldDom = newVNode._dom = oldVNode._dom;\n\t\t// if we resume, we want the tree to be \"unlocked\"\n\t\tnewVNode._hydrating = null;\n\t\texcessDomChildren = [oldDom];\n\t}\n\n\tif ((tmp = options._diff)) tmp(newVNode);\n\n\touter: if (typeof newType == 'function') {\n\t\ttry {\n\t\t\tlet c, isNew, oldProps, oldState, snapshot, clearProcessingException;\n\t\t\tlet newProps = newVNode.props;\n\n\t\t\t// Necessary for createContext api. Setting this property will pass\n\t\t\t// the context value as `this.context` just for this component.\n\t\t\ttmp = newType.contextType;\n\t\t\tlet provider = tmp && globalContext[tmp._id];\n\t\t\tlet componentContext = tmp\n\t\t\t\t? provider\n\t\t\t\t\t? provider.props.value\n\t\t\t\t\t: tmp._defaultValue\n\t\t\t\t: globalContext;\n\n\t\t\t// Get component and set it to `c`\n\t\t\tif (oldVNode._component) {\n\t\t\t\tc = newVNode._component = oldVNode._component;\n\t\t\t\tclearProcessingException = c._processingException = c._pendingError;\n\t\t\t} else {\n\t\t\t\t// Instantiate the new component\n\t\t\t\tif ('prototype' in newType && newType.prototype.render) {\n\t\t\t\t\t// @ts-ignore The check above verifies that newType is suppose to be constructed\n\t\t\t\t\tnewVNode._component = c = new newType(newProps, componentContext); // eslint-disable-line new-cap\n\t\t\t\t} else {\n\t\t\t\t\t// @ts-ignore Trust me, Component implements the interface we want\n\t\t\t\t\tnewVNode._component = c = new Component(newProps, componentContext);\n\t\t\t\t\tc.constructor = newType;\n\t\t\t\t\tc.render = doRender;\n\t\t\t\t}\n\t\t\t\tif (provider) provider.sub(c);\n\n\t\t\t\tc.props = newProps;\n\t\t\t\tif (!c.state) c.state = {};\n\t\t\t\tc.context = componentContext;\n\t\t\t\tc._globalContext = globalContext;\n\t\t\t\tisNew = c._dirty = true;\n\t\t\t\tc._renderCallbacks = [];\n\t\t\t\tc._stateCallbacks = [];\n\t\t\t}\n\n\t\t\t// Invoke getDerivedStateFromProps\n\t\t\tif (c._nextState == null) {\n\t\t\t\tc._nextState = c.state;\n\t\t\t}\n\n\t\t\tif (newType.getDerivedStateFromProps != null) {\n\t\t\t\tif (c._nextState == c.state) {\n\t\t\t\t\tc._nextState = assign({}, c._nextState);\n\t\t\t\t}\n\n\t\t\t\tassign(\n\t\t\t\t\tc._nextState,\n\t\t\t\t\tnewType.getDerivedStateFromProps(newProps, c._nextState)\n\t\t\t\t);\n\t\t\t}\n\n\t\t\toldProps = c.props;\n\t\t\toldState = c.state;\n\t\t\tc._vnode = newVNode;\n\n\t\t\t// Invoke pre-render lifecycle methods\n\t\t\tif (isNew) {\n\t\t\t\tif (\n\t\t\t\t\tnewType.getDerivedStateFromProps == null &&\n\t\t\t\t\tc.componentWillMount != null\n\t\t\t\t) {\n\t\t\t\t\tc.componentWillMount();\n\t\t\t\t}\n\n\t\t\t\tif (c.componentDidMount != null) {\n\t\t\t\t\tc._renderCallbacks.push(c.componentDidMount);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (\n\t\t\t\t\tnewType.getDerivedStateFromProps == null &&\n\t\t\t\t\tnewProps !== oldProps &&\n\t\t\t\t\tc.componentWillReceiveProps != null\n\t\t\t\t) {\n\t\t\t\t\tc.componentWillReceiveProps(newProps, componentContext);\n\t\t\t\t}\n\n\t\t\t\tif (\n\t\t\t\t\t!c._force &&\n\t\t\t\t\t((c.shouldComponentUpdate != null &&\n\t\t\t\t\t\tc.shouldComponentUpdate(\n\t\t\t\t\t\t\tnewProps,\n\t\t\t\t\t\t\tc._nextState,\n\t\t\t\t\t\t\tcomponentContext\n\t\t\t\t\t\t) === false) ||\n\t\t\t\t\t\tnewVNode._original === oldVNode._original)\n\t\t\t\t) {\n\t\t\t\t\t// More info about this here: https://gist.github.com/JoviDeCroock/bec5f2ce93544d2e6070ef8e0036e4e8\n\t\t\t\t\tif (newVNode._original !== oldVNode._original) {\n\t\t\t\t\t\t// When we are dealing with a bail because of sCU we have to update\n\t\t\t\t\t\t// the props, state and dirty-state.\n\t\t\t\t\t\t// when we are dealing with strict-equality we don't as the child could still\n\t\t\t\t\t\t// be dirtied see #3883\n\t\t\t\t\t\tc.props = newProps;\n\t\t\t\t\t\tc.state = c._nextState;\n\t\t\t\t\t\tc._dirty = false;\n\t\t\t\t\t}\n\n\t\t\t\t\tnewVNode._dom = oldVNode._dom;\n\t\t\t\t\tnewVNode._children = oldVNode._children;\n\t\t\t\t\tnewVNode._children.forEach(vnode => {\n\t\t\t\t\t\tif (vnode) vnode._parent = newVNode;\n\t\t\t\t\t});\n\n\t\t\t\t\tfor (let i = 0; i < c._stateCallbacks.length; i++) {\n\t\t\t\t\t\tc._renderCallbacks.push(c._stateCallbacks[i]);\n\t\t\t\t\t}\n\t\t\t\t\tc._stateCallbacks = [];\n\n\t\t\t\t\tif (c._renderCallbacks.length) {\n\t\t\t\t\t\tcommitQueue.push(c);\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak outer;\n\t\t\t\t}\n\n\t\t\t\tif (c.componentWillUpdate != null) {\n\t\t\t\t\tc.componentWillUpdate(newProps, c._nextState, componentContext);\n\t\t\t\t}\n\n\t\t\t\tif (c.componentDidUpdate != null) {\n\t\t\t\t\tc._renderCallbacks.push(() => {\n\t\t\t\t\t\tc.componentDidUpdate(oldProps, oldState, snapshot);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tc.context = componentContext;\n\t\t\tc.props = newProps;\n\t\t\tc._parentDom = parentDom;\n\t\t\tc._force = false;\n\n\t\t\tlet renderHook = options._render,\n\t\t\t\tcount = 0;\n\t\t\tif ('prototype' in newType && newType.prototype.render) {\n\t\t\t\tc.state = c._nextState;\n\t\t\t\tc._dirty = false;\n\n\t\t\t\tif (renderHook) renderHook(newVNode);\n\n\t\t\t\ttmp = c.render(c.props, c.state, c.context);\n\n\t\t\t\tfor (let i = 0; i < c._stateCallbacks.length; i++) {\n\t\t\t\t\tc._renderCallbacks.push(c._stateCallbacks[i]);\n\t\t\t\t}\n\t\t\t\tc._stateCallbacks = [];\n\t\t\t} else {\n\t\t\t\tdo {\n\t\t\t\t\tc._dirty = false;\n\t\t\t\t\tif (renderHook) renderHook(newVNode);\n\n\t\t\t\t\ttmp = c.render(c.props, c.state, c.context);\n\n\t\t\t\t\t// Handle setState called in render, see #2553\n\t\t\t\t\tc.state = c._nextState;\n\t\t\t\t} while (c._dirty && ++count < 25);\n\t\t\t}\n\n\t\t\t// Handle setState called in render, see #2553\n\t\t\tc.state = c._nextState;\n\n\t\t\tif (c.getChildContext != null) {\n\t\t\t\tglobalContext = assign(assign({}, globalContext), c.getChildContext());\n\t\t\t}\n\n\t\t\tif (!isNew && c.getSnapshotBeforeUpdate != null) {\n\t\t\t\tsnapshot = c.getSnapshotBeforeUpdate(oldProps, oldState);\n\t\t\t}\n\n\t\t\tlet isTopLevelFragment =\n\t\t\t\ttmp != null && tmp.type === Fragment && tmp.key == null;\n\t\t\tlet renderResult = isTopLevelFragment ? tmp.props.children : tmp;\n\n\t\t\tdiffChildren(\n\t\t\t\tparentDom,\n\t\t\t\tisArray(renderResult) ? renderResult : [renderResult],\n\t\t\t\tnewVNode,\n\t\t\t\toldVNode,\n\t\t\t\tglobalContext,\n\t\t\t\tisSvg,\n\t\t\t\texcessDomChildren,\n\t\t\t\tcommitQueue,\n\t\t\t\toldDom,\n\t\t\t\tisHydrating,\n\t\t\t\trefQueue\n\t\t\t);\n\n\t\t\tc.base = newVNode._dom;\n\n\t\t\t// We successfully rendered this VNode, unset any stored hydration/bailout state:\n\t\t\tnewVNode._hydrating = null;\n\n\t\t\tif (c._renderCallbacks.length) {\n\t\t\t\tcommitQueue.push(c);\n\t\t\t}\n\n\t\t\tif (clearProcessingException) {\n\t\t\t\tc._pendingError = c._processingException = null;\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tnewVNode._original = null;\n\t\t\t// if hydrating or creating initial tree, bailout preserves DOM:\n\t\t\tif (isHydrating || excessDomChildren != null) {\n\t\t\t\tnewVNode._dom = oldDom;\n\t\t\t\tnewVNode._hydrating = !!isHydrating;\n\t\t\t\texcessDomChildren[excessDomChildren.indexOf(oldDom)] = null;\n\t\t\t\t// ^ could possibly be simplified to:\n\t\t\t\t// excessDomChildren.length = 0;\n\t\t\t}\n\t\t\toptions._catchError(e, newVNode, oldVNode);\n\t\t}\n\t} else if (\n\t\texcessDomChildren == null &&\n\t\tnewVNode._original === oldVNode._original\n\t) {\n\t\tnewVNode._children = oldVNode._children;\n\t\tnewVNode._dom = oldVNode._dom;\n\t} else {\n\t\tnewVNode._dom = diffElementNodes(\n\t\t\toldVNode._dom,\n\t\t\tnewVNode,\n\t\t\toldVNode,\n\t\t\tglobalContext,\n\t\t\tisSvg,\n\t\t\texcessDomChildren,\n\t\t\tcommitQueue,\n\t\t\tisHydrating,\n\t\t\trefQueue\n\t\t);\n\t}\n\n\tif ((tmp = options.diffed)) tmp(newVNode);\n}\n\n/**\n * @param {Array} commitQueue List of components\n * which have callbacks to invoke in commitRoot\n * @param {import('../internal').VNode} root\n */\nexport function commitRoot(commitQueue, root, refQueue) {\n\tfor (let i = 0; i < refQueue.length; i++) {\n\t\tapplyRef(refQueue[i], refQueue[++i], refQueue[++i]);\n\t}\n\n\tif (options._commit) options._commit(root, commitQueue);\n\n\tcommitQueue.some(c => {\n\t\ttry {\n\t\t\t// @ts-ignore Reuse the commitQueue variable here so the type changes\n\t\t\tcommitQueue = c._renderCallbacks;\n\t\t\tc._renderCallbacks = [];\n\t\t\tcommitQueue.some(cb => {\n\t\t\t\t// @ts-ignore See above ts-ignore on commitQueue\n\t\t\t\tcb.call(c);\n\t\t\t});\n\t\t} catch (e) {\n\t\t\toptions._catchError(e, c._vnode);\n\t\t}\n\t});\n}\n\n/**\n * Diff two virtual nodes representing DOM element\n * @param {import('../internal').PreactElement} dom The DOM element representing\n * the virtual nodes being diffed\n * @param {import('../internal').VNode} newVNode The new virtual node\n * @param {import('../internal').VNode} oldVNode The old virtual node\n * @param {object} globalContext The current context object\n * @param {boolean} isSvg Whether or not this DOM node is an SVG node\n * @param {*} excessDomChildren\n * @param {Array} commitQueue List of components\n * which have callbacks to invoke in commitRoot\n * @param {boolean} isHydrating Whether or not we are in hydration\n * @param {Array} refQueue an array of elements needed to invoke refs\n * @returns {import('../internal').PreactElement}\n */\nfunction diffElementNodes(\n\tdom,\n\tnewVNode,\n\toldVNode,\n\tglobalContext,\n\tisSvg,\n\texcessDomChildren,\n\tcommitQueue,\n\tisHydrating,\n\trefQueue\n) {\n\tlet oldProps = oldVNode.props;\n\tlet newProps = newVNode.props;\n\tlet nodeType = newVNode.type;\n\tlet i = 0;\n\n\t// Tracks entering and exiting SVG namespace when descending through the tree.\n\tif (nodeType === 'svg') isSvg = true;\n\n\tif (excessDomChildren != null) {\n\t\tfor (; i < excessDomChildren.length; i++) {\n\t\t\tconst child = excessDomChildren[i];\n\n\t\t\t// if newVNode matches an element in excessDomChildren or the `dom`\n\t\t\t// argument matches an element in excessDomChildren, remove it from\n\t\t\t// excessDomChildren so it isn't later removed in diffChildren\n\t\t\tif (\n\t\t\t\tchild &&\n\t\t\t\t'setAttribute' in child === !!nodeType &&\n\t\t\t\t(nodeType ? child.localName === nodeType : child.nodeType === 3)\n\t\t\t) {\n\t\t\t\tdom = child;\n\t\t\t\texcessDomChildren[i] = null;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\tif (dom == null) {\n\t\tif (nodeType === null) {\n\t\t\t// @ts-ignore createTextNode returns Text, we expect PreactElement\n\t\t\treturn document.createTextNode(newProps);\n\t\t}\n\n\t\tif (isSvg) {\n\t\t\tdom = document.createElementNS(\n\t\t\t\t'http://www.w3.org/2000/svg',\n\t\t\t\t// @ts-ignore We know `newVNode.type` is a string\n\t\t\t\tnodeType\n\t\t\t);\n\t\t} else {\n\t\t\tdom = document.createElement(\n\t\t\t\t// @ts-ignore We know `newVNode.type` is a string\n\t\t\t\tnodeType,\n\t\t\t\tnewProps.is && newProps\n\t\t\t);\n\t\t}\n\n\t\t// we created a new parent, so none of the previously attached children can be reused:\n\t\texcessDomChildren = null;\n\t\t// we are creating a new node, so we can assume this is a new subtree (in case we are hydrating), this deopts the hydrate\n\t\tisHydrating = false;\n\t}\n\n\tif (nodeType === null) {\n\t\t// During hydration, we still have to split merged text from SSR'd HTML.\n\t\tif (oldProps !== newProps && (!isHydrating || dom.data !== newProps)) {\n\t\t\tdom.data = newProps;\n\t\t}\n\t} else {\n\t\t// If excessDomChildren was not null, repopulate it with the current element's children:\n\t\texcessDomChildren = excessDomChildren && slice.call(dom.childNodes);\n\n\t\toldProps = oldVNode.props || EMPTY_OBJ;\n\n\t\tlet oldHtml = oldProps.dangerouslySetInnerHTML;\n\t\tlet newHtml = newProps.dangerouslySetInnerHTML;\n\n\t\t// During hydration, props are not diffed at all (including dangerouslySetInnerHTML)\n\t\t// @TODO we should warn in debug mode when props don't match here.\n\t\tif (!isHydrating) {\n\t\t\t// But, if we are in a situation where we are using existing DOM (e.g. replaceNode)\n\t\t\t// we should read the existing DOM attributes to diff them\n\t\t\tif (excessDomChildren != null) {\n\t\t\t\toldProps = {};\n\t\t\t\tfor (i = 0; i < dom.attributes.length; i++) {\n\t\t\t\t\toldProps[dom.attributes[i].name] = dom.attributes[i].value;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (newHtml || oldHtml) {\n\t\t\t\t// Avoid re-applying the same '__html' if it did not changed between re-render\n\t\t\t\tif (\n\t\t\t\t\t!newHtml ||\n\t\t\t\t\t((!oldHtml || newHtml.__html != oldHtml.__html) &&\n\t\t\t\t\t\tnewHtml.__html !== dom.innerHTML)\n\t\t\t\t) {\n\t\t\t\t\tdom.innerHTML = (newHtml && newHtml.__html) || '';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tdiffProps(dom, newProps, oldProps, isSvg, isHydrating);\n\n\t\t// If the new vnode didn't have dangerouslySetInnerHTML, diff its children\n\t\tif (newHtml) {\n\t\t\tnewVNode._children = [];\n\t\t} else {\n\t\t\ti = newVNode.props.children;\n\t\t\tdiffChildren(\n\t\t\t\tdom,\n\t\t\t\tisArray(i) ? i : [i],\n\t\t\t\tnewVNode,\n\t\t\t\toldVNode,\n\t\t\t\tglobalContext,\n\t\t\t\tisSvg && nodeType !== 'foreignObject',\n\t\t\t\texcessDomChildren,\n\t\t\t\tcommitQueue,\n\t\t\t\texcessDomChildren\n\t\t\t\t\t? excessDomChildren[0]\n\t\t\t\t\t: oldVNode._children && getDomSibling(oldVNode, 0),\n\t\t\t\tisHydrating,\n\t\t\t\trefQueue\n\t\t\t);\n\n\t\t\t// Remove children that are not part of any vnode.\n\t\t\tif (excessDomChildren != null) {\n\t\t\t\tfor (i = excessDomChildren.length; i--; ) {\n\t\t\t\t\tif (excessDomChildren[i] != null) removeNode(excessDomChildren[i]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// (as above, don't diff props during hydration)\n\t\tif (!isHydrating) {\n\t\t\tif (\n\t\t\t\t'value' in newProps &&\n\t\t\t\t(i = newProps.value) !== undefined &&\n\t\t\t\t// #2756 For the -element the initial value is 0,\n\t\t\t\t// despite the attribute not being present. When the attribute\n\t\t\t\t// is missing the progress bar is treated as indeterminate.\n\t\t\t\t// To fix that we'll always update it when it is 0 for progress elements\n\t\t\t\t(i !== dom.value ||\n\t\t\t\t\t(nodeType === 'progress' && !i) ||\n\t\t\t\t\t// This is only for IE 11 to fix \n\tif (\n\t\ttype == 'select' &&\n\t\tnormalizedProps.multiple &&\n\t\tArray.isArray(normalizedProps.value)\n\t) {\n\t\t// forEach() always returns undefined, which we abuse here to unset the value prop.\n\t\tnormalizedProps.value = toChildArray(props.children).forEach(child => {\n\t\t\tchild.props.selected =\n\t\t\t\tnormalizedProps.value.indexOf(child.props.value) != -1;\n\t\t});\n\t}\n\n\t// Adding support for defaultValue in select tag\n\tif (type == 'select' && normalizedProps.defaultValue != null) {\n\t\tnormalizedProps.value = toChildArray(props.children).forEach(child => {\n\t\t\tif (normalizedProps.multiple) {\n\t\t\t\tchild.props.selected =\n\t\t\t\t\tnormalizedProps.defaultValue.indexOf(child.props.value) != -1;\n\t\t\t} else {\n\t\t\t\tchild.props.selected =\n\t\t\t\t\tnormalizedProps.defaultValue == child.props.value;\n\t\t\t}\n\t\t});\n\t}\n\n\tif (props.class && !props.className) {\n\t\tnormalizedProps.class = props.class;\n\t\tObject.defineProperty(\n\t\t\tnormalizedProps,\n\t\t\t'className',\n\t\t\tclassNameDescriptorNonEnumberable\n\t\t);\n\t} else if (props.className && !props.class) {\n\t\tnormalizedProps.class = normalizedProps.className = props.className;\n\t} else if (props.class && props.className) {\n\t\tnormalizedProps.class = normalizedProps.className = props.className;\n\t}\n\n\tvnode.props = normalizedProps;\n}\n\nlet oldVNodeHook = options.vnode;\noptions.vnode = vnode => {\n\t// only normalize props on Element nodes\n\tif (typeof vnode.type === 'string') {\n\t\thandleDomVNode(vnode);\n\t}\n\n\tvnode.$$typeof = REACT_ELEMENT_TYPE;\n\n\tif (oldVNodeHook) oldVNodeHook(vnode);\n};\n\n// Only needed for react-relay\nlet currentComponent;\nconst oldBeforeRender = options._render;\noptions._render = function (vnode) {\n\tif (oldBeforeRender) {\n\t\toldBeforeRender(vnode);\n\t}\n\tcurrentComponent = vnode._component;\n};\n\nconst oldDiffed = options.diffed;\n/** @type {(vnode: import('./internal').VNode) => void} */\noptions.diffed = function (vnode) {\n\tif (oldDiffed) {\n\t\toldDiffed(vnode);\n\t}\n\n\tconst props = vnode.props;\n\tconst dom = vnode._dom;\n\n\tif (\n\t\tdom != null &&\n\t\tvnode.type === 'textarea' &&\n\t\t'value' in props &&\n\t\tprops.value !== dom.value\n\t) {\n\t\tdom.value = props.value == null ? '' : props.value;\n\t}\n\n\tcurrentComponent = null;\n};\n\n// This is a very very private internal function for React it\n// is used to sort-of do runtime dependency injection. So far\n// only `react-relay` makes use of it. It uses it to read the\n// context value.\nexport const __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = {\n\tReactCurrentDispatcher: {\n\t\tcurrent: {\n\t\t\treadContext(context) {\n\t\t\t\treturn currentComponent._globalContext[context._id].props.value;\n\t\t\t}\n\t\t}\n\t}\n};\n", "import {\n\tcreateElement,\n\trender as preactRender,\n\tcloneElement as preactCloneElement,\n\tcreateRef,\n\tComponent,\n\tcreateContext,\n\tFragment\n} from 'preact';\nimport {\n\tuseState,\n\tuseId,\n\tuseReducer,\n\tuseEffect,\n\tuseLayoutEffect,\n\tuseRef,\n\tuseImperativeHandle,\n\tuseMemo,\n\tuseCallback,\n\tuseContext,\n\tuseDebugValue\n} from 'preact/hooks';\nimport { PureComponent } from './PureComponent';\nimport { memo } from './memo';\nimport { forwardRef } from './forwardRef';\nimport { Children } from './Children';\nimport { Suspense, lazy } from './suspense';\nimport { SuspenseList } from './suspense-list';\nimport { createPortal } from './portals';\nimport { is } from './util';\nimport {\n\thydrate,\n\trender,\n\tREACT_ELEMENT_TYPE,\n\t__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED\n} from './render';\n\nconst version = '17.0.2'; // trick libraries to think we are react\n\n/**\n * Legacy version of createElement.\n * @param {import('./internal').VNode[\"type\"]} type The node name or Component constructor\n */\nfunction createFactory(type) {\n\treturn createElement.bind(null, type);\n}\n\n/**\n * Check if the passed element is a valid (p)react node.\n * @param {*} element The element to check\n * @returns {boolean}\n */\nfunction isValidElement(element) {\n\treturn !!element && element.$$typeof === REACT_ELEMENT_TYPE;\n}\n\n/**\n * Check if the passed element is a Fragment node.\n * @param {*} element The element to check\n * @returns {boolean}\n */\nfunction isFragment(element) {\n\treturn isValidElement(element) && element.type === Fragment;\n}\n\n/**\n * Wrap `cloneElement` to abort if the passed element is not a valid element and apply\n * all vnode normalizations.\n * @param {import('./internal').VNode} element The vnode to clone\n * @param {object} props Props to add when cloning\n * @param {Array} rest Optional component children\n */\nfunction cloneElement(element) {\n\tif (!isValidElement(element)) return element;\n\treturn preactCloneElement.apply(null, arguments);\n}\n\n/**\n * Remove a component tree from the DOM, including state and event handlers.\n * @param {import('./internal').PreactElement} container\n * @returns {boolean}\n */\nfunction unmountComponentAtNode(container) {\n\tif (container._children) {\n\t\tpreactRender(null, container);\n\t\treturn true;\n\t}\n\treturn false;\n}\n\n/**\n * Get the matching DOM node for a component\n * @param {import('./internal').Component} component\n * @returns {import('./internal').PreactElement | null}\n */\nfunction findDOMNode(component) {\n\treturn (\n\t\t(component &&\n\t\t\t(component.base || (component.nodeType === 1 && component))) ||\n\t\tnull\n\t);\n}\n\n/**\n * Deprecated way to control batched rendering inside the reconciler, but we\n * already schedule in batches inside our rendering code\n * @template Arg\n * @param {(arg: Arg) => void} callback function that triggers the updated\n * @param {Arg} [arg] Optional argument that can be passed to the callback\n */\n// eslint-disable-next-line camelcase\nconst unstable_batchedUpdates = (callback, arg) => callback(arg);\n\n/**\n * In React, `flushSync` flushes the entire tree and forces a rerender. It's\n * implmented here as a no-op.\n * @template Arg\n * @template Result\n * @param {(arg: Arg) => Result} callback function that runs before the flush\n * @param {Arg} [arg] Optional argument that can be passed to the callback\n * @returns\n */\nconst flushSync = (callback, arg) => callback(arg);\n\n/**\n * Strict Mode is not implemented in Preact, so we provide a stand-in for it\n * that just renders its children without imposing any restrictions.\n */\nconst StrictMode = Fragment;\n\nexport function startTransition(cb) {\n\tcb();\n}\n\nexport function useDeferredValue(val) {\n\treturn val;\n}\n\nexport function useTransition() {\n\treturn [false, startTransition];\n}\n\n// TODO: in theory this should be done after a VNode is diffed as we want to insert\n// styles/... before it attaches\nexport const useInsertionEffect = useLayoutEffect;\n\n// compat to react-is\nexport const isElement = isValidElement;\n\n/**\n * This is taken from https://github.com/facebook/react/blob/main/packages/use-sync-external-store/src/useSyncExternalStoreShimClient.js#L84\n * on a high level this cuts out the warnings, ... and attempts a smaller implementation\n */\nexport function useSyncExternalStore(subscribe, getSnapshot) {\n\tconst value = getSnapshot();\n\n\tconst [{ _instance }, forceUpdate] = useState({\n\t\t_instance: { _value: value, _getSnapshot: getSnapshot }\n\t});\n\n\tuseLayoutEffect(() => {\n\t\t_instance._value = value;\n\t\t_instance._getSnapshot = getSnapshot;\n\n\t\tif (!is(_instance._value, getSnapshot())) {\n\t\t\tforceUpdate({ _instance });\n\t\t}\n\t}, [subscribe, value, getSnapshot]);\n\n\tuseEffect(() => {\n\t\tif (!is(_instance._value, _instance._getSnapshot())) {\n\t\t\tforceUpdate({ _instance });\n\t\t}\n\n\t\treturn subscribe(() => {\n\t\t\tif (!is(_instance._value, _instance._getSnapshot())) {\n\t\t\t\tforceUpdate({ _instance });\n\t\t\t}\n\t\t});\n\t}, [subscribe]);\n\n\treturn value;\n}\n\nexport * from 'preact/hooks';\nexport {\n\tversion,\n\tChildren,\n\trender,\n\thydrate,\n\tunmountComponentAtNode,\n\tcreatePortal,\n\tcreateElement,\n\tcreateContext,\n\tcreateFactory,\n\tcloneElement,\n\tcreateRef,\n\tFragment,\n\tisValidElement,\n\tisFragment,\n\tfindDOMNode,\n\tComponent,\n\tPureComponent,\n\tmemo,\n\tforwardRef,\n\tflushSync,\n\t// eslint-disable-next-line camelcase\n\tunstable_batchedUpdates,\n\tStrictMode,\n\tSuspense,\n\tSuspenseList,\n\tlazy,\n\t__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED\n};\n\n// React copies the named exports to the default one.\nexport default {\n\tuseState,\n\tuseId,\n\tuseReducer,\n\tuseEffect,\n\tuseLayoutEffect,\n\tuseInsertionEffect,\n\tuseTransition,\n\tuseDeferredValue,\n\tuseSyncExternalStore,\n\tstartTransition,\n\tuseRef,\n\tuseImperativeHandle,\n\tuseMemo,\n\tuseCallback,\n\tuseContext,\n\tuseDebugValue,\n\tversion,\n\tChildren,\n\trender,\n\thydrate,\n\tunmountComponentAtNode,\n\tcreatePortal,\n\tcreateElement,\n\tcreateContext,\n\tcreateFactory,\n\tcloneElement,\n\tcreateRef,\n\tFragment,\n\tisValidElement,\n\tisElement,\n\tisFragment,\n\tfindDOMNode,\n\tComponent,\n\tPureComponent,\n\tmemo,\n\tforwardRef,\n\tflushSync,\n\tunstable_batchedUpdates,\n\tStrictMode,\n\tSuspense,\n\tSuspenseList,\n\tlazy,\n\t__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED\n};\n", "export * from 'preact/compat';\nexport { default } from 'preact/compat';\n", "export * from 'preact/compat';\nexport { default } from 'preact/compat';\n", "import React, { useLayoutEffect } from 'react';\nimport { createPortal } from 'react-dom';\n\ninterface PopoverPortalProps {\n container: Element;\n element: Element;\n scoutElement: Element;\n children: React.ReactNode;\n}\n\nexport const PopoverPortal = ({\n container,\n element,\n scoutElement,\n children,\n}: PopoverPortalProps) => {\n useLayoutEffect(() => {\n container.appendChild(element);\n container.appendChild(scoutElement);\n return () => {\n container.removeChild(element);\n container.removeChild(scoutElement);\n };\n }, [container, element, scoutElement]);\n\n return createPortal(children, element);\n};\n", "import { PopoverPosition, PopoverAlign } from './index';\n\nexport const EMPTY_CLIENT_RECT: ClientRect = {\n top: 0,\n left: 0,\n bottom: 0,\n height: 0,\n right: 0,\n width: 0,\n};\n\nexport const rectsAreEqual = (rectA: ClientRect, rectB: ClientRect) =>\n rectA === rectB ||\n (rectA?.bottom === rectB?.bottom &&\n rectA?.height === rectB?.height &&\n rectA?.left === rectB?.left &&\n rectA?.right === rectB?.right &&\n rectA?.top === rectB?.top &&\n rectA?.width === rectB?.width);\n\nexport const createContainer = (\n containerStyle?: Partial,\n containerClassName?: string,\n) => {\n const container = window.document.createElement('div');\n if (containerClassName) container.className = containerClassName;\n Object.assign(container.style, containerStyle);\n return container;\n};\n\nexport const popoverRectForPosition = (\n position: PopoverPosition,\n childRect: ClientRect,\n popoverRect: ClientRect,\n padding: number,\n align: PopoverAlign,\n): ClientRect => {\n const targetMidX = childRect.left + childRect.width / 2;\n const targetMidY = childRect.top + childRect.height / 2;\n const { width, height } = popoverRect;\n let top: number;\n let left: number;\n\n switch (position) {\n case 'left':\n top = targetMidY - height / 2;\n left = childRect.left - padding - width;\n if (align === 'start') {\n top = childRect.top;\n }\n if (align === 'end') {\n top = childRect.bottom - height;\n }\n break;\n case 'bottom':\n top = childRect.bottom + padding;\n left = targetMidX - width / 2;\n if (align === 'start') {\n left = childRect.left;\n }\n if (align === 'end') {\n left = childRect.right - width;\n }\n break;\n case 'right':\n top = targetMidY - height / 2;\n left = childRect.right + padding;\n if (align === 'start') {\n top = childRect.top;\n }\n if (align === 'end') {\n top = childRect.bottom - height;\n }\n break;\n default:\n top = childRect.top - height - padding;\n left = targetMidX - width / 2;\n if (align === 'start') {\n left = childRect.left;\n }\n if (align === 'end') {\n left = childRect.right - width;\n }\n break;\n }\n\n return { top, left, width, height, right: left + width, bottom: top + height };\n};\n\ninterface GetNewPopoverRectProps {\n position: PopoverPosition;\n reposition: boolean;\n align: PopoverAlign;\n childRect: ClientRect;\n popoverRect: ClientRect;\n boundaryRect: ClientRect;\n padding: number;\n}\n\nexport const getNewPopoverRect = (\n {\n position,\n align,\n childRect,\n popoverRect,\n boundaryRect,\n padding,\n reposition,\n }: GetNewPopoverRectProps,\n boundaryInset: number,\n) => {\n const rect = popoverRectForPosition(position, childRect, popoverRect, padding, align);\n\n const boundaryViolation =\n reposition &&\n ((position === 'top' && rect.top < boundaryRect.top + boundaryInset) ||\n (position === 'left' && rect.left < boundaryRect.left + boundaryInset) ||\n (position === 'right' && rect.right > boundaryRect.right - boundaryInset) ||\n (position === 'bottom' && rect.bottom > boundaryRect.bottom - boundaryInset));\n\n return {\n rect,\n boundaryViolation,\n } as const;\n};\n\nexport const getNudgedPopoverRect = (\n popoverRect: ClientRect,\n boundaryRect: ClientRect,\n boundaryInset: number,\n): ClientRect => {\n const topBoundary = boundaryRect.top + boundaryInset;\n const leftBoundary = boundaryRect.left + boundaryInset;\n const rightBoundary = boundaryRect.right - boundaryInset;\n const bottomBoundary = boundaryRect.bottom - boundaryInset;\n\n let top = popoverRect.top < topBoundary ? topBoundary : popoverRect.top;\n top = top + popoverRect.height > bottomBoundary ? bottomBoundary - popoverRect.height : top;\n let left = popoverRect.left < leftBoundary ? leftBoundary : popoverRect.left;\n left = left + popoverRect.width > rightBoundary ? rightBoundary - popoverRect.width : left;\n\n return {\n top,\n left,\n width: popoverRect.width,\n height: popoverRect.height,\n right: left + popoverRect.width,\n bottom: top + popoverRect.height,\n };\n};\n", "import { useRef, useMemo } from 'react';\nimport { createContainer } from './util';\n\nexport const useElementRef = (\n containerClassName?: string,\n containerStyle?: Partial,\n) => {\n const ref = useRef();\n\n const element = useMemo(\n () => createContainer(containerStyle, containerClassName),\n [containerClassName, containerStyle],\n );\n\n ref.current = element;\n\n return ref;\n};\n", "import { useCallback } from 'react';\nimport { BoundaryViolations, PositionPopover, UsePopoverProps, UsePopoverResult } from '.';\nimport { EMPTY_CLIENT_RECT, getNewPopoverRect, getNudgedPopoverRect } from './util';\nimport { useElementRef } from './useElementRef';\n\nconst POPOVER_STYLE: Partial = {\n position: 'fixed',\n overflow: 'visible',\n top: '0px',\n left: '0px',\n};\n\nconst SCOUT_STYLE: Partial = {\n position: 'fixed',\n top: '0px',\n left: '0px',\n width: '0px',\n height: '0px',\n visibility: 'hidden',\n};\n\nexport const usePopover = ({\n isOpen,\n childRef,\n positions,\n containerClassName,\n parentElement,\n contentLocation,\n align,\n padding,\n reposition,\n boundaryInset,\n boundaryElement,\n onPositionPopover,\n}: UsePopoverProps): UsePopoverResult => {\n const popoverRef = useElementRef(containerClassName, POPOVER_STYLE);\n const scoutRef = useElementRef('react-tiny-popover-scout', SCOUT_STYLE);\n\n const positionPopover = useCallback(\n ({\n positionIndex = 0,\n parentRect = parentElement.getBoundingClientRect(),\n childRect = childRef?.current?.getBoundingClientRect(),\n scoutRect = scoutRef?.current?.getBoundingClientRect(),\n popoverRect = popoverRef.current.getBoundingClientRect(),\n boundaryRect = boundaryElement === parentElement\n ? parentRect\n : boundaryElement.getBoundingClientRect(),\n } = {}) => {\n if (!childRect || !parentRect || !isOpen) {\n return;\n }\n\n if (contentLocation) {\n const { top: inputTop, left: inputLeft } =\n typeof contentLocation === 'function'\n ? contentLocation({\n childRect,\n popoverRect,\n parentRect,\n boundaryRect,\n padding,\n nudgedTop: 0,\n nudgedLeft: 0,\n boundaryInset,\n violations: EMPTY_CLIENT_RECT,\n hasViolations: false,\n })\n : contentLocation;\n\n const left = Math.round(parentRect.left + inputLeft - scoutRect.left);\n const top = Math.round(parentRect.top + inputTop - scoutRect.top);\n\n popoverRef.current.style.transform = `translate(${left}px, ${top}px)`;\n\n onPositionPopover({\n childRect,\n popoverRect,\n parentRect,\n boundaryRect,\n padding,\n nudgedTop: 0,\n nudgedLeft: 0,\n boundaryInset,\n violations: EMPTY_CLIENT_RECT,\n hasViolations: false,\n });\n\n return;\n }\n\n const isExhausted = positionIndex === positions.length;\n const position = isExhausted ? positions[0] : positions[positionIndex];\n\n const { rect, boundaryViolation } = getNewPopoverRect(\n {\n childRect,\n popoverRect,\n boundaryRect,\n position,\n align,\n padding,\n reposition,\n },\n boundaryInset,\n );\n\n if (boundaryViolation && reposition && !isExhausted) {\n positionPopover({\n positionIndex: positionIndex + 1,\n childRect,\n popoverRect,\n parentRect,\n boundaryRect,\n });\n return;\n }\n\n const { top, left, width, height } = rect;\n const shouldNudge = reposition && !isExhausted;\n const { left: nudgedLeft, top: nudgedTop } = getNudgedPopoverRect(\n rect,\n boundaryRect,\n boundaryInset,\n );\n\n let finalTop = top;\n let finalLeft = left;\n\n if (shouldNudge) {\n finalTop = nudgedTop;\n finalLeft = nudgedLeft;\n }\n\n finalTop = Math.round(finalTop - scoutRect.top);\n finalLeft = Math.round(finalLeft - scoutRect.left);\n\n popoverRef.current.style.transform = `translate(${finalLeft}px, ${finalTop}px)`;\n\n const potentialViolations: BoundaryViolations = {\n top: boundaryRect.top + boundaryInset - finalTop,\n left: boundaryRect.left + boundaryInset - finalLeft,\n right: finalLeft + width - boundaryRect.right + boundaryInset,\n bottom: finalTop + height - boundaryRect.bottom + boundaryInset,\n };\n\n onPositionPopover({\n childRect,\n popoverRect: {\n top: finalTop,\n left: finalLeft,\n width,\n height,\n right: finalLeft + width,\n bottom: finalTop + height,\n },\n parentRect,\n boundaryRect,\n position,\n align,\n padding,\n nudgedTop: nudgedTop - top,\n nudgedLeft: nudgedLeft - left,\n boundaryInset,\n violations: {\n top: potentialViolations.top <= 0 ? 0 : potentialViolations.top,\n left: potentialViolations.left <= 0 ? 0 : potentialViolations.left,\n right: potentialViolations.right <= 0 ? 0 : potentialViolations.right,\n bottom: potentialViolations.bottom <= 0 ? 0 : potentialViolations.bottom,\n },\n hasViolations:\n potentialViolations.top > 0 ||\n potentialViolations.left > 0 ||\n potentialViolations.right > 0 ||\n potentialViolations.bottom > 0,\n });\n },\n [\n parentElement,\n childRef,\n scoutRef,\n popoverRef,\n boundaryElement,\n isOpen,\n contentLocation,\n positions,\n align,\n padding,\n reposition,\n boundaryInset,\n onPositionPopover,\n ],\n );\n\n return {\n positionPopover,\n popoverRef,\n scoutRef,\n };\n};\n", "import { useRef, useMemo } from 'react';\n\nexport const useMemoizedArray = (externalArray: T[]) => {\n const prevArrayRef = useRef(externalArray);\n const array = useMemo(() => {\n if (prevArrayRef.current === externalArray) return prevArrayRef.current;\n\n if (prevArrayRef.current.length !== externalArray.length) {\n prevArrayRef.current = externalArray;\n return externalArray;\n }\n\n for (let i = 0; i < externalArray.length; i += 1) {\n if (externalArray[i] !== prevArrayRef.current[i]) {\n prevArrayRef.current = externalArray;\n return externalArray;\n }\n }\n\n return prevArrayRef.current;\n }, [externalArray]);\n\n return array;\n};\n", "import { useMemo } from 'react';\nimport { UseArrowContainerProps } from '.';\n\nexport const useArrowContainer = ({\n childRect,\n popoverRect,\n position,\n arrowSize,\n arrowColor,\n}: UseArrowContainerProps) => {\n const arrowContainerStyle = useMemo(\n () =>\n ({\n padding: arrowSize,\n } as React.CSSProperties),\n [arrowSize],\n );\n\n const arrowStyle = useMemo(\n () =>\n ({\n position: 'absolute',\n ...((): React.CSSProperties => {\n const arrowWidth = arrowSize * 2;\n let top = childRect.top - popoverRect.top + childRect.height / 2 - arrowWidth / 2;\n let left = childRect.left - popoverRect.left + childRect.width / 2 - arrowWidth / 2;\n\n const lowerBound = arrowSize;\n const leftUpperBound = popoverRect.width - arrowSize;\n const topUpperBound = popoverRect.height - arrowSize;\n\n left = left < lowerBound ? lowerBound : left;\n left = left + arrowWidth > leftUpperBound ? leftUpperBound - arrowWidth : left;\n top = top < lowerBound ? lowerBound : top;\n top = top + arrowWidth > topUpperBound ? topUpperBound - arrowWidth : top;\n\n top = Number.isNaN(top) ? 0 : top;\n left = Number.isNaN(left) ? 0 : left;\n\n switch (position) {\n case 'right':\n return {\n borderTop: `${arrowSize}px solid transparent`,\n borderBottom: `${arrowSize}px solid transparent`,\n borderRight: `${arrowSize}px solid ${arrowColor}`,\n left: 0,\n top,\n };\n case 'left':\n return {\n borderTop: `${arrowSize}px solid transparent`,\n borderBottom: `${arrowSize}px solid transparent`,\n borderLeft: `${arrowSize}px solid ${arrowColor}`,\n right: 0,\n top,\n };\n case 'bottom':\n return {\n borderLeft: `${arrowSize}px solid transparent`,\n borderRight: `${arrowSize}px solid transparent`,\n borderBottom: `${arrowSize}px solid ${arrowColor}`,\n top: 0,\n left,\n };\n case 'top':\n return {\n borderLeft: `${arrowSize}px solid transparent`,\n borderRight: `${arrowSize}px solid transparent`,\n borderTop: `${arrowSize}px solid ${arrowColor}`,\n bottom: 0,\n left,\n };\n default:\n return {\n display: 'hidden',\n };\n }\n })(),\n } as React.CSSProperties),\n [\n arrowColor,\n arrowSize,\n childRect.height,\n childRect.left,\n childRect.top,\n childRect.width,\n popoverRect.height,\n popoverRect.left,\n popoverRect.top,\n popoverRect.width,\n position,\n ],\n );\n\n return {\n arrowContainerStyle,\n arrowStyle,\n };\n};\n", "import React, { useMemo } from 'react';\nimport { ArrowContainerProps } from '.';\nimport { useArrowContainer } from './useArrowContainer';\n\nexport const ArrowContainer = ({\n childRect,\n popoverRect,\n position,\n arrowColor,\n arrowSize,\n arrowClassName,\n arrowStyle: externalArrowStyle,\n className,\n children,\n style: externalArrowContainerStyle,\n}: ArrowContainerProps) => {\n const { arrowContainerStyle, arrowStyle } = useArrowContainer({\n childRect,\n popoverRect,\n position,\n arrowColor,\n arrowSize,\n });\n\n const mergedContainerStyle = useMemo(\n () => ({\n ...arrowContainerStyle,\n ...externalArrowContainerStyle,\n }),\n [arrowContainerStyle, externalArrowContainerStyle],\n );\n\n const mergedArrowStyle = useMemo(\n () => ({\n ...arrowStyle,\n ...externalArrowStyle,\n }),\n [arrowStyle, externalArrowStyle],\n );\n\n return (\n
\n
\n {children}\n
\n );\n};\n", "import {\n useRef,\n useLayoutEffect,\n useState,\n useCallback,\n useEffect,\n forwardRef,\n cloneElement,\n Ref,\n} from 'react';\nimport { PopoverPortal } from './PopoverPortal';\nimport {\n ContentLocation,\n ContentLocationGetter,\n PopoverPosition,\n PopoverProps,\n PopoverState,\n} from '.';\nimport { EMPTY_CLIENT_RECT, rectsAreEqual } from './util';\nimport { usePopover } from './usePopover';\nimport { useMemoizedArray } from './useMemoizedArray';\nexport { useArrowContainer } from './useArrowContainer';\nexport { ArrowContainer } from './ArrowContainer';\nexport { usePopover };\n\nconst DEFAULT_POSITIONS: PopoverPosition[] = ['top', 'left', 'right', 'bottom'];\n\nconst PopoverInternal = forwardRef(\n (\n {\n isOpen,\n children,\n content,\n positions: externalPositions = DEFAULT_POSITIONS,\n align = 'center',\n padding = 0,\n reposition = true,\n parentElement = window.document.body,\n boundaryElement = parentElement,\n containerClassName = 'react-tiny-popover-container',\n containerStyle,\n contentLocation,\n boundaryInset = 0,\n onClickOutside,\n clickOutsideCapture = false,\n }: PopoverProps,\n externalRef: Ref,\n ) => {\n const positions = useMemoizedArray(externalPositions);\n\n // TODO: factor prevs out into a custom prevs hook\n const prevIsOpen = useRef(false);\n const prevPositions = useRef();\n const prevContentLocation = useRef();\n const prevReposition = useRef(reposition);\n\n const childRef = useRef();\n\n const [popoverState, setPopoverState] = useState({\n align,\n nudgedLeft: 0,\n nudgedTop: 0,\n position: positions[0],\n padding,\n childRect: EMPTY_CLIENT_RECT,\n popoverRect: EMPTY_CLIENT_RECT,\n parentRect: EMPTY_CLIENT_RECT,\n boundaryRect: EMPTY_CLIENT_RECT,\n boundaryInset,\n violations: EMPTY_CLIENT_RECT,\n hasViolations: false,\n });\n\n const onPositionPopover = useCallback(\n (popoverState: PopoverState) => setPopoverState(popoverState),\n [],\n );\n\n const { positionPopover, popoverRef, scoutRef } = usePopover({\n isOpen,\n childRef,\n containerClassName,\n parentElement,\n boundaryElement,\n contentLocation,\n positions,\n align,\n padding,\n boundaryInset,\n reposition,\n onPositionPopover,\n });\n\n useLayoutEffect(() => {\n let shouldUpdate = true;\n const updatePopover = () => {\n if (isOpen && shouldUpdate) {\n const childRect = childRef?.current?.getBoundingClientRect();\n const popoverRect = popoverRef?.current?.getBoundingClientRect();\n if (\n childRect != null &&\n popoverRect != null &&\n (!rectsAreEqual(childRect, {\n top: popoverState.childRect.top,\n left: popoverState.childRect.left,\n width: popoverState.childRect.width,\n height: popoverState.childRect.height,\n bottom: popoverState.childRect.top + popoverState.childRect.height,\n right: popoverState.childRect.left + popoverState.childRect.width,\n }) ||\n popoverRect.width !== popoverState.popoverRect.width ||\n popoverRect.height !== popoverState.popoverRect.height ||\n popoverState.padding !== padding ||\n popoverState.align !== align ||\n positions !== prevPositions.current ||\n contentLocation !== prevContentLocation.current ||\n reposition !== prevReposition.current)\n ) {\n positionPopover();\n }\n\n // TODO: factor prev checks out into the custom prevs hook\n if (positions !== prevPositions.current) {\n prevPositions.current = positions;\n }\n if (contentLocation !== prevContentLocation.current) {\n prevContentLocation.current = contentLocation;\n }\n if (reposition !== prevReposition.current) {\n prevReposition.current = reposition;\n }\n\n if (shouldUpdate) {\n window.requestAnimationFrame(updatePopover);\n }\n }\n\n prevIsOpen.current = isOpen;\n };\n\n window.requestAnimationFrame(updatePopover);\n\n return () => {\n shouldUpdate = false;\n };\n }, [\n align,\n contentLocation,\n isOpen,\n padding,\n popoverRef,\n popoverState.align,\n popoverState.childRect.height,\n popoverState.childRect.left,\n popoverState.childRect.top,\n popoverState.childRect.width,\n popoverState.padding,\n popoverState.popoverRect.height,\n popoverState.popoverRect.width,\n positionPopover,\n positions,\n reposition,\n ]);\n\n useEffect(() => {\n const popoverElement = popoverRef.current;\n\n Object.assign(popoverElement.style, containerStyle);\n\n return () => {\n Object.keys(containerStyle ?? {}).forEach(\n (key) =>\n delete popoverElement.style[\n key as keyof Omit\n ],\n );\n };\n }, [containerStyle, isOpen, popoverRef]);\n\n const handleOnClickOutside = useCallback(\n (e: MouseEvent) => {\n if (\n isOpen &&\n !popoverRef.current?.contains(e.target as Node) &&\n !childRef.current?.contains(e.target as Node)\n ) {\n onClickOutside?.(e);\n }\n },\n [isOpen, onClickOutside, popoverRef],\n );\n\n const handleWindowResize = useCallback(() => {\n if (childRef.current) {\n window.requestAnimationFrame(() => positionPopover());\n }\n }, [positionPopover]);\n\n useEffect(() => {\n const body = parentElement.ownerDocument.body;\n body.addEventListener('click', handleOnClickOutside, clickOutsideCapture);\n body.addEventListener('contextmenu', handleOnClickOutside, clickOutsideCapture);\n body.addEventListener('resize', handleWindowResize);\n return () => {\n body.removeEventListener('click', handleOnClickOutside, clickOutsideCapture);\n body.removeEventListener('contextmenu', handleOnClickOutside, clickOutsideCapture);\n body.removeEventListener('resize', handleWindowResize);\n };\n }, [clickOutsideCapture, handleOnClickOutside, handleWindowResize, parentElement]);\n\n const handleRef = useCallback(\n (node: HTMLElement) => {\n childRef.current = node;\n if (externalRef != null) {\n if (typeof externalRef === 'object') {\n (externalRef as React.MutableRefObject).current = node;\n } else if (typeof externalRef === 'function') {\n (externalRef as (instance: HTMLElement) => void)(node);\n }\n }\n },\n [externalRef],\n );\n\n const renderChild = () =>\n cloneElement(children as JSX.Element, {\n ref: handleRef,\n });\n\n const renderPopover = () => {\n if (!isOpen) return null;\n return (\n \n {typeof content === 'function' ? content(popoverState) : content}\n \n );\n };\n\n return (\n <>\n {renderChild()}\n {renderPopover()}\n \n );\n },\n);\n\nexport const Popover = forwardRef((props, ref) => {\n if (typeof window === 'undefined') return props.children;\n return ;\n});\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nfunction assert(condition, message) {\n if (!condition) {\n throw new Error(message);\n }\n}\nexports.default = assert;\n", "\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst assert_1 = __importDefault(require(\"./assert\"));\nfunction assertValidUserOptions(options) {\n assert_1.default(Array.isArray(options.domains), 'domains must be an array');\n assert_1.default(Array.isArray(options.topLevelDomains), 'topLevelDomains must be an array');\n assert_1.default(Array.isArray(options.secondLevelDomains), 'secondLevelDomains must be an array');\n assert_1.default(typeof options.distanceFunction === 'function', 'distanceFunction must be a function');\n}\nexports.default = assertValidUserOptions;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n// Encode the email address to prevent XSS but leave in valid\n// characters, following this official spec:\n// http://en.wikipedia.org/wiki/Email_address#Syntax\n//\n// We have to replace all the possible characters.\n// that's why we use a regex with a global flag.\nfunction encodeEmail(email) {\n const result = encodeURI(email)\n .replace(/%20/g, ' ')\n .replace(/%25/g, '%')\n .replace(/%5E/g, '^')\n .replace(/%60/g, '`')\n .replace(/%7B/g, '{')\n .replace(/%7C/g, '|')\n .replace(/%7D/g, '}');\n return result;\n}\nexports.default = encodeEmail;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nfunction findClosestDomain(opts) {\n const { domain, domains, distanceFunction, threshold } = opts;\n let dist;\n let minDist = Infinity;\n let closestDomain = null;\n if (!domain || !domains) {\n return undefined;\n }\n for (let i = 0; i < domains.length; i++) {\n if (domain === domains[i]) {\n return domain;\n }\n dist = distanceFunction(domain, domains[i]);\n if (dist < minDist) {\n minDist = dist;\n closestDomain = domains[i];\n }\n }\n if (minDist <= threshold && closestDomain !== null) {\n return closestDomain;\n }\n else {\n return undefined;\n }\n}\nexports.default = findClosestDomain;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst WHITESPACE_PATTERN = /\\s/;\n/**\n * Just in case a browser doesn't support .trim\n * Copied from https://github.com/Trott/trim\n * Credits to them\n */\nfunction trim(str) {\n if (str.trim) {\n return str.trim();\n }\n return right(left(str));\n}\nfunction left(str) {\n if (str.trimLeft)\n return str.trimLeft();\n return str.replace(/^\\s\\s*/, '');\n}\nfunction right(str) {\n if (str.trimRight)\n return str.trimRight();\n let i = str.length;\n while (WHITESPACE_PATTERN.test(str.charAt(--i)))\n ;\n return str.slice(0, i + 1);\n}\nexports.default = trim;\n", "\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst trim_1 = __importDefault(require(\"./trim\"));\nconst MINIUM_EMAIL_PARTS = 2;\nfunction parseEmail(emailStr) {\n const email = trim_1.default(emailStr);\n const parts = email.split('@');\n if (parts.length < MINIUM_EMAIL_PARTS) {\n return false;\n }\n for (let i = 0; i < parts.length; i++) {\n if (parts[i] === '') {\n return false;\n }\n }\n // FYI, in hello@example.com\n // secondLevelDomain -> example\n // topLevelDomain -> com\n let sld = '';\n let tld = '';\n const domain = parts.pop();\n const domainParts = domain.split('.');\n if (domainParts.length === 0) {\n // The address does not have a top-level domain\n return false;\n }\n else if (domainParts.length == 1) {\n // The address has only a top-level domain (valid under RFC)\n tld = domainParts[0];\n }\n else {\n // The address has a domain and a top-level domain\n sld = domainParts[0];\n for (let j = 1; j < domainParts.length; j++) {\n tld += domainParts[j] + '.';\n }\n tld = tld.substring(0, tld.length - 1);\n }\n return {\n topLevelDomain: tld,\n secondLevelDomain: sld,\n domain,\n address: parts.join('@'),\n };\n}\nexports.default = parseEmail;\n", "\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst encode_email_1 = __importDefault(require(\"./helpers/encode-email\"));\nconst find_closest_domain_1 = __importDefault(require(\"./helpers/find-closest-domain\"));\nconst parse_email_1 = __importDefault(require(\"./helpers/parse-email\"));\nfunction suggestEmail(opts) {\n const encodedEmail = encode_email_1.default(opts.email.toLowerCase());\n const email = parse_email_1.default(encodedEmail);\n if (!email) {\n return undefined;\n }\n const { domains, domainThreshold, distanceFunction, secondLevelDomains, topLevelDomains, } = opts;\n if (secondLevelDomains && topLevelDomains) {\n // If the email is a valid 2nd-level + top-level, do not suggest anything.\n // if (hasValidSecondLevelDomain(email) && hasValidTopLevelDomain(email)) {\n if (secondLevelDomains.indexOf(email.secondLevelDomain) !== -1 &&\n topLevelDomains.indexOf(email.topLevelDomain) !== -1) {\n return undefined;\n }\n }\n let closestDomain = find_closest_domain_1.default({\n domain: email.domain,\n domains,\n distanceFunction,\n threshold: domainThreshold,\n });\n if (closestDomain) {\n if (closestDomain == email.domain) {\n // The email address exactly matches one of the supplied domains; do not return a suggestion.\n return undefined;\n }\n else {\n // The email address closely matches one of the supplied domains; return a suggestion\n return {\n address: email.address,\n domain: closestDomain,\n full: email.address + '@' + closestDomain,\n };\n }\n }\n // The email address does not closely match one of the supplied domains\n const closestSecondLevelDomain = find_closest_domain_1.default({\n domain: email.secondLevelDomain,\n domains: secondLevelDomains,\n distanceFunction,\n threshold: opts.secondLevelThreshold,\n });\n const closestTopLevelDomain = find_closest_domain_1.default({\n domain: email.topLevelDomain,\n domains: topLevelDomains,\n distanceFunction,\n threshold: opts.topLevelThreshold,\n });\n if (email.domain) {\n closestDomain = email.domain;\n let rtrn = false;\n if (closestSecondLevelDomain &&\n closestSecondLevelDomain != email.secondLevelDomain) {\n // The email address may have a mispelled second-level domain; return a suggestion\n closestDomain = closestDomain.replace(email.secondLevelDomain, closestSecondLevelDomain);\n rtrn = true;\n }\n if (closestTopLevelDomain &&\n closestTopLevelDomain != email.topLevelDomain &&\n email.secondLevelDomain !== '') {\n // The email address may have a mispelled top-level domain; return a suggestion\n closestDomain = closestDomain.replace(new RegExp(email.topLevelDomain + '$'), closestTopLevelDomain);\n rtrn = true;\n }\n if (rtrn) {\n return {\n address: email.address,\n domain: closestDomain,\n full: email.address + '@' + closestDomain,\n };\n }\n }\n /* The email address exactly matches one of the supplied domains, does not closely\n * match any domain and does not appear to simply have a mispelled top-level domain,\n * or is an invalid email address; do not return a suggestion.\n */\n return undefined;\n}\nexports.default = suggestEmail;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nfunction sift3Distance(s1, s2) {\n // sift3: http://siderite.blogspot.com/2007/04/super-fast-and-accurate-string-distance.html\n if (s1 == null || s1.length === 0) {\n if (s2 == null || s2.length === 0) {\n return 0;\n }\n else {\n return s2.length;\n }\n }\n if (s2 == null || s2.length === 0) {\n return s1.length;\n }\n let c = 0;\n let offset1 = 0;\n let offset2 = 0;\n let lcs = 0;\n const maxOffset = 5;\n while (c + offset1 < s1.length && c + offset2 < s2.length) {\n if (s1.charAt(c + offset1) == s2.charAt(c + offset2)) {\n lcs++;\n }\n else {\n offset1 = 0;\n offset2 = 0;\n for (let i = 0; i < maxOffset; i++) {\n if (c + i < s1.length && s1.charAt(c + i) == s2.charAt(c)) {\n offset1 = i;\n break;\n }\n if (c + i < s2.length && s1.charAt(c) == s2.charAt(c + i)) {\n offset2 = i;\n break;\n }\n }\n }\n c++;\n }\n return (s1.length + s2.length) / 2 - lcs;\n}\nexports.default = sift3Distance;\n", "\"use strict\";\n// Default configuration options\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.POPULAR_TLDS = exports.POPULAR_DOMAINS = exports.DEFAULT_CONFIG = void 0;\nconst sift3_distance_1 = __importDefault(require(\"../fuzzy-detection/sift3-distance\"));\n/***\n * Default list of popular emails for 2022 and onwards.\n * https://www.mailmunch.com/blog/best-email-service-providers\n *\n * If you find a domain you want to add, please submit a PR.\n * Also, notice that this list is not exhaustive.\n * You can always pass your own list of domains.\n */\nconst POPULAR_DOMAINS = [\n 'msn.com',\n 'bellsouth.net',\n 'telus.net',\n 'comcast.net',\n 'optusnet.com.au',\n 'earthlink.net',\n 'qq.com',\n 'sky.com',\n 'icloud.com',\n 'sympatico.ca',\n 'googlemail.com',\n 'att.net',\n 'xtra.co.nz',\n 'web.de',\n 'cox.net',\n 'gmail.com',\n 'ymail.com',\n 'aim.com',\n 'rogers.com',\n 'verizon.net',\n 'rocketmail.com',\n 'optonline.net',\n 'sbcglobal.net',\n // aol\n 'aol.com',\n 'aim.com',\n 'me.com',\n 'mailw.com',\n 'btinternet.com',\n 'charter.net',\n 'shaw.ca',\n 'hey.com',\n // Proton\n 'proton.me',\n 'pm.com',\n 'protonmail.com',\n 'zoho.com',\n 'yandex.com',\n 'titan.email',\n];\nexports.POPULAR_DOMAINS = POPULAR_DOMAINS;\nconst POPULAR_TLDS = [\n 'com',\n 'com.au',\n 'com.tw',\n 'co',\n 'ca',\n 'co.nz',\n 'co.uk',\n 'de',\n 'fr',\n 'it',\n 'ru',\n 'org',\n 'edu',\n 'gov',\n 'jp',\n 'nl',\n 'kr',\n 'se',\n 'eu',\n 'ie',\n 'co.il',\n 'us',\n 'at',\n 'be',\n 'dk',\n 'hk',\n 'es',\n 'gr',\n 'ch',\n 'no',\n 'cz',\n 'net',\n 'net.au',\n 'info',\n 'biz',\n 'mil',\n 'co.jp',\n 'sg',\n 'hu',\n 'uk',\n 'sk',\n // Country specific popular domains\n 'ar',\n 'cf',\n 'cl',\n 'cn',\n 'ga',\n 'gq',\n 'ir',\n 'ml',\n 'mx',\n 'nu',\n 'nz',\n 'ph',\n 'pl',\n 'ro',\n 'tk',\n 'tw',\n 'ua',\n 'vg',\n 'ws',\n 'xn',\n 'za',\n // popular TLDs that startup use in 2022\n // https://thewebsiteflip.com/domains/funded-startup-brands-2021/#:~:text=from%20the%20data.-,1.,TLDs%20for%20the%20foreseeable%20future.\n // https://martijnoud.com/most-popular-tld-crypto/\n 'app',\n 'au',\n 'ai',\n 'biz',\n 'br',\n 'blog',\n 'cloud',\n 'club',\n 'cc',\n 'de',\n 'dev',\n 'digital',\n 'fi',\n 'finance',\n 'id',\n 'in',\n 'io',\n 'me',\n 'mobi',\n 'network',\n 'pw',\n 'so',\n 'xyz',\n 'software',\n 'to',\n 'tech',\n];\nexports.POPULAR_TLDS = POPULAR_TLDS;\nconst DEFAULT_CONFIG = {\n domainThreshold: 2,\n domains: POPULAR_DOMAINS,\n secondLevelThreshold: 2,\n secondLevelDomains: ['yahoo', 'hotmail', 'mail', 'live', 'outlook'],\n topLevelThreshold: 2,\n topLevelDomains: POPULAR_TLDS,\n distanceFunction: sift3_distance_1.default,\n};\nexports.DEFAULT_CONFIG = DEFAULT_CONFIG;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst config_1 = require(\"../config\");\nfunction getOptions(userOptions) {\n return {\n email: userOptions.email,\n domains: userOptions.domains || config_1.DEFAULT_CONFIG.domains,\n topLevelDomains: userOptions.topLevelDomains || config_1.DEFAULT_CONFIG.topLevelDomains,\n secondLevelDomains: userOptions.secondLevelDomains || config_1.DEFAULT_CONFIG.secondLevelDomains,\n distanceFunction: userOptions.distanceFunction || config_1.DEFAULT_CONFIG.distanceFunction,\n domainThreshold: userOptions.domainThreshold || config_1.DEFAULT_CONFIG.domainThreshold,\n secondLevelThreshold: userOptions.secondLevelThreshold || config_1.DEFAULT_CONFIG.secondLevelThreshold,\n topLevelThreshold: userOptions.topLevelThreshold || config_1.DEFAULT_CONFIG.topLevelThreshold,\n suggested: userOptions.suggested || undefined,\n empty: userOptions.suggested || undefined,\n };\n}\nexports.default = getOptions;\n", "\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst assert_valid_user_options_1 = __importDefault(require(\"./helpers/assert-valid-user-options\"));\nconst suggest_email_1 = __importDefault(require(\"./suggest-email\"));\nconst get_options_1 = __importDefault(require(\"./helpers/get-options\"));\nfunction run(userOptions) {\n const options = get_options_1.default(userOptions);\n assert_valid_user_options_1.default(options || {});\n const email = suggest_email_1.default(options);\n if (!email && userOptions.empty) {\n userOptions.empty();\n }\n if (email && userOptions.suggested) {\n userOptions.suggested(email);\n }\n return email;\n}\nexports.default = run;\n", "\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.POPULAR_TLDS = exports.POPULAR_DOMAINS = exports.run = void 0;\nconst run_1 = __importDefault(require(\"./lib/run\"));\nexports.run = run_1.default;\nconst config_1 = require(\"./lib/config\");\nObject.defineProperty(exports, \"POPULAR_DOMAINS\", { enumerable: true, get: function () { return config_1.POPULAR_DOMAINS; } });\nObject.defineProperty(exports, \"POPULAR_TLDS\", { enumerable: true, get: function () { return config_1.POPULAR_TLDS; } });\nconst MailSpellChecker = {\n run: run_1.default,\n POPULAR_DOMAINS: config_1.POPULAR_DOMAINS,\n POPULAR_TLDS: config_1.POPULAR_TLDS,\n};\nexports.default = MailSpellChecker;\n", "import { Fragment, h } from \"preact\"\nimport register from \"./register\"\n\nimport Button from \"./button\"\nimport Card from \"./card\"\nimport Dropdown from \"./dropdown\"\nimport NavMenu from \"./navmenu\"\nimport PromptSearch from \"./promptSearch\"\n\nvar components = [Button, Dropdown, PromptSearch, NavMenu, Card]\n\nexport default function () {\n window.h = h\n window.Fragment = Fragment\n\n components.forEach((c) => {\n register(c, c.tagName, [], { shadow: false })\n })\n}\n", "import { Fragment, cloneElement, h, hydrate, render } from \"preact\"\n//from https://github.com/preactjs/preact-custom-element/blob/e7fed5d745de23991722b3b666dc3bd1d0a08cb7/src/index.js\n// This function is used to register a component with the given tag name.\nexport default function register(Component, tagName, propNames, options) {\n // Create an instance of PreactElement, which extends HTMLElement.\n function PreactElement() {\n const inst = Reflect.construct(HTMLElement, [], PreactElement)\n inst._vdomComponent = Component\n\n // If options for shadow DOM are given, attach a shadow root.\n // Otherwise, assign the instance itself as root.\n inst._root =\n options && options.shadow ? inst.attachShadow({ mode: \"open\" }) : inst\n\n return inst\n }\n\n // Extend the PreactElement from HTMLElement.\n PreactElement.prototype = Object.create(HTMLElement.prototype)\n PreactElement.prototype.constructor = PreactElement\n\n // Assign lifecycle methods to the PreactElement.\n PreactElement.prototype.connectedCallback = function () {\n connectedCallback.call(this, options)\n }\n PreactElement.prototype.attributeChangedCallback = attributeChangedCallback\n PreactElement.prototype.disconnectedCallback = disconnectedCallback\n\n // Assign observed attributes.\n propNames =\n propNames ||\n Component.observedAttributes ||\n Object.keys(Component.propTypes || {})\n PreactElement.observedAttributes = propNames\n\n // Sync DOM properties and Preact props.\n propNames.forEach((name) => {\n Object.defineProperty(PreactElement.prototype, name, {\n get() {\n return this._vdom.props[name]\n },\n set(v) {\n if (this._vdom) {\n this.attributeChangedCallback(name, null, v)\n } else {\n if (!this._props) this._props = {}\n this._props[name] = v\n this.connectedCallback()\n }\n\n // Reflect property changes to attributes if the value is a primitive.\n const type = typeof v\n if (\n v == null ||\n type === \"string\" ||\n type === \"boolean\" ||\n type === \"number\"\n ) {\n this.setAttribute(name, v)\n }\n },\n })\n })\n\n // Define the custom element.\n return customElements.define(\n tagName || Component.tagName || Component.displayName || Component.name,\n PreactElement\n )\n}\n\n// The rest of the functions are utility functions used within the register function.\n\n// This function provides the context for child components.\nfunction ContextProvider(props) {\n this.getChildContext = () => props.context\n // eslint-disable-next-line no-unused-vars\n const { context, children, ...rest } = props\n return cloneElement(children, rest)\n}\n\n// This function is called when the custom element is inserted into the DOM\nfunction connectedCallback(options) {\n // Obtain a reference to the previous context by pinging the nearest\n // higher up node that was rendered with Preact. If one Preact component\n // higher up receives our ping, it will set the `detail` property of\n // our custom event. This works because events are dispatched\n // synchronously.\n const event = new CustomEvent(\"_preact\", {\n detail: {},\n bubbles: true,\n cancelable: true,\n })\n this.dispatchEvent(event)\n const context = event.detail.context\n\n this._vdom = h(\n ContextProvider,\n { ...this._props, context },\n toVdom(this, this._vdomComponent, options)\n )\n ;(this.hasAttribute(\"hydrate\") ? hydrate : render)(this._vdom, this._root)\n}\n\nfunction toCamelCase(str) {\n return str.replace(/-(\\w)/g, (_, c) => (c ? c.toUpperCase() : \"\"))\n}\n\nfunction attributeChangedCallback(name, oldValue, newValue) {\n if (!this._vdom) return\n // Attributes use `null` as an empty value whereas `undefined` is more\n // common in pure JS components, especially with default parameters.\n // When calling `node.removeAttribute()` we'll receive `null` as the new\n // value. See issue #50.\n newValue = newValue == null ? undefined : newValue\n const props = {}\n props[name] = newValue\n props[toCamelCase(name)] = newValue\n this._vdom = cloneElement(this._vdom, props)\n render(this._vdom, this._root)\n}\n\nfunction disconnectedCallback() {\n render((this._vdom = null), this._root)\n}\n\n/**\n * Pass an event listener to each `` that \"forwards\" the current\n * context value to the rendered child. The child will trigger a custom\n * event, where will add the context value to. Because events work\n * synchronously, the child can immediately pull of the value right\n * after having fired the event.\n */\n// This function provides a slot for context propagation.\nfunction Slot(props, context) {\n const ref = (r) => {\n if (!r) {\n this.ref.removeEventListener(\"_preact\", this._listener)\n } else {\n this.ref = r\n if (!this._listener) {\n this._listener = (event) => {\n event.stopPropagation()\n event.detail.context = context\n }\n r.addEventListener(\"_preact\", this._listener)\n }\n }\n }\n return h(\"slot\", { ...props, ref })\n}\n\n// This function provides a pseudo-slot for context propagation without shadow dom.\nfunction PseudoSlot(props, context) {\n const ref = (r) => {\n if (!r) {\n this.ref.removeEventListener(\"_preact\", this._listener)\n } else {\n this.ref = r\n if (!this._listener) {\n this._listener = (event) => {\n event.stopPropagation()\n event.detail.context = context\n }\n r.addEventListener(\"_preact\", this._listener)\n }\n }\n }\n return h(Fragment, { ...props, ref })\n}\n\n// This function converts DOM elements to virtual DOM.\nfunction toVdom(element, nodeName, options) {\n if (element.nodeType === 3) return element.data\n if (element.nodeType !== 1) return null\n let children = [],\n props = {},\n i = 0,\n a = element.attributes,\n cn = element.childNodes\n for (i = a.length; i--; ) {\n if (a[i].name !== \"slot\") {\n props[a[i].name] = a[i].value\n props[toCamelCase(a[i].name)] = a[i].value\n }\n }\n\n for (i = cn.length; i--; ) {\n const vnode = toVdom(cn[i], null, options)\n // Move slots correctly\n const name = cn[i].slot\n if (name) {\n props[name] = h(Slot, { name }, vnode)\n } else {\n children[i] = vnode\n }\n }\n\n // Only wrap the topmost node with a slot\n\n const wrappedChildren = nodeName\n ? h(options && options.shadow === false ? PseudoSlot : Slot, null, children)\n : children\n\n // Remove all children from the topmost node in non-shadow mode\n if (options && options.shadow === false && nodeName) {\n element.innerHTML = \"\"\n }\n return h(nodeName || element.nodeName.toLowerCase(), props, wrappedChildren)\n}\n", "function Button(props) {\n var colors = {\n blue: \"bg-blue-500 hover:bg-blue-700\",\n red: \"bg-red-500 hover:bg-red-700\",\n green: \"bg-green-500 hover:bg-green-700\",\n }\n var color = colors[props.color] || colors.green\n return \n}\n\nButton.tagName = \"t-button\"\nexport default Button\n", "function Card(props) {\n const imgeUrl = props.image ? `url(${props.image})` : \"\"\n backgroundImageStyle = {\n backgroundImage: `linear-gradient(185deg, rgba(196, 204, 255, 0.52), rgba(117, 19, 93, 0.73)), ${imgeUrl}`,\n backgroundSize: \"cover\",\n backgroundPosition: \"center\",\n backgroundRepeat: \"no-repeat\",\n height: \"150px\",\n }\n\n const image = (\n \n \n
\n
\n {props.title}\n
\n

{props.description}

\n
\n
\n
\n \n )\n return (\n
\n {image}\n
\n

{props.start}

\n \n {props.buttonText}\n \n \n \n \n
\n
\n )\n}\n\nCard.tagName = \"t-card\"\nexport default Card\n", "import { useRef, useState } from \"preact/hooks\"\nimport { Popover } from \"react-tiny-popover\"\n\nfunction Dropdown() {\n const wrapperRef = useRef(null)\n var [open, setOpen] = useState(false)\n function toggle() {\n setOpen(!open)\n }\n function close() {\n setOpen(false)\n }\n\n return (\n
\n \n {this.props.button}\n \n
\n )\n}\nDropdown.tagName = \"t-dropdown\"\n\nexport default Dropdown\n", "import { useEffect, useState } from \"preact/hooks\"\nimport Dropdown from \"./dropdown\"\nfunction NavMenu(props) {\n ;[links, setLinks] = useState([])\n useEffect(() => {\n links = JSON.parse(document.getElementById(props.dataid).textContent)\n setLinks(links)\n }, [])\n\n const button = (\n \n )\n const menu = (\n
\n {links.map((link) => (\n \n {link.title}\n \n ))}\n
\n )\n return (\n <>\n
\n {links.map((link) => (\n \n {link.title}\n \n ))}\n
\n
\n \n
\n \n )\n}\n\nNavMenu.tagName = \"t-navmenu\"\n\nexport default NavMenu\n", "import { useEffect, useState } from \"preact/hooks\"\n\nfunction Tag(props) {\n return (\n props.onClick(props.tag)}\n type=\"button\"\n class=\"mr-2 mt-1 inline-flex items-center rounded-full bg-tyellow px-3 py-1 text-xs font-medium leading-4 text-gray-700\"\n >\n {props.tag}\n \n )\n}\n\nfunction Prompt(props) {\n const tags = props.tags.map((tag) => (\n \n ))\n return (\n
  • \n
    {props.prompt}
    \n {tags}\n
  • \n )\n}\n\nfunction PromptSearch(props) {\n const [search, setSearch] = useState(\"\")\n const [items, setItems] = useState([])\n const [tags, setTags] = useState([])\n const [uf, setUf] = useState(null)\n const [haystack, setHaystack] = useState([])\n const [data, setData] = useState([])\n useEffect(() => {\n let opts = { outOfOrder: false }\n let uf = new uFuzzy(opts)\n let data = JSON.parse(document.getElementById(props.dataid).textContent)\n let haystack = data.map((r) => `${r.prompt} ${r.tags.join(\" \")}`)\n let tags = [...new Set(data.map((r) => r.tags).flat())].sort()\n setUf(uf)\n setHaystack(haystack)\n setTags(tags)\n setData(data)\n setItems(data)\n }, [])\n function updateSearch(search) {\n if (search === \"\") {\n setItems(data)\n } else {\n let [idxs, info, order] = uf.search(haystack, search)\n if (order) {\n setItems(order.map((i) => idxs.map((i) => data[i])[i]))\n }\n }\n setSearch(search)\n }\n const tagsList = tags.map((tag) => (\n \n ))\n const prompts = items.map((item) => (\n \n ))\n return (\n
    \n
    \n
    \n \n \n \n
    \n updateSearch(e.target.value)}\n class=\"block w-full rounded-lg border border-gray-300 bg-gray-50 p-4 pl-10 text-sm text-gray-900 focus:border-blue-500 focus:ring-blue-500 \"\n placeholder=\"Search prompts...\"\n required\n />\n
    \n {tagsList}\n
      {prompts}
    \n
    \n )\n}\n\nPromptSearch.tagName = \"t-promptsearch\"\n\nexport default PromptSearch\n", "import emailSpellChecker from \"@zootools/email-spell-checker\"\n\nfunction debounce(func, timeout = 300) {\n let timer\n return (...args) => {\n clearTimeout(timer)\n timer = setTimeout(() => {\n func.apply(this, args)\n }, timeout)\n }\n}\n\nfunction init() {\n document.querySelectorAll(\"input[type=email]\").forEach((input) => {\n function clearAlert(e) {\n const alert = e.target.parentElement.querySelector(\n \".email-alert-dismissible\"\n )\n if (alert) {\n alert.remove()\n }\n }\n const myScript = (e) => {\n const email = e.target.value.trim()\n const suggestedEmail = emailSpellChecker.run({\n email,\n })\n clearAlert(e)\n if (!suggestedEmail) {\n return\n }\n const message = ``\n const alert = document.createElement(\"div\")\n alert.classList.add(\"email-alert-dismissible\")\n alert.innerHTML = message\n alert.onclick = (_) => {\n clearAlert(e)\n input.value = suggestedEmail.full\n }\n input.after(alert)\n }\n input.addEventListener(\"keyup\", debounce(myScript))\n })\n}\n\nexport default init\n", "export default function () {\n // Timezone settings. See TimezoneMiddleware in utils/middleware.py\n // If timezone isn't set, refresh page.\n const timezone = Intl.DateTimeFormat().resolvedOptions().timeZone // e.g. \"America/New_York\"\n const hasZimzone = document.cookie\n .split(\";\")\n .some((item) => item.trim().startsWith(\"totem_timezone=\"))\n if (timezone && !hasZimzone) {\n document.cookie = `totem_timezone=${timezone}; SameSite=Strict`\n location.reload()\n }\n}\n", "var logger = (function () {\n var oldConsoleLog = null\n var pub = {}\n\n pub.enableLogger = function enableLogger() {\n if (oldConsoleLog == null) return\n\n window[\"console\"][\"log\"] = oldConsoleLog\n }\n\n pub.disableLogger = function disableLogger() {\n oldConsoleLog = console.log\n window[\"console\"][\"log\"] = function () {}\n }\n\n return pub\n})()\n\nfunction init(debug) {\n if (debug === true) logger.enableLogger()\n else logger.disableLogger()\n}\n\nexport default init\n", "import components from \"./components\"\nimport emailSpellChecker from \"./emailSpellCheck\"\nimport timezoneDetect from \"./timezone\"\n\nimport logger from \"./logger\"\n\ndismiss_alert = function (e) {\n e.closest(\".alert-dismissible\").remove()\n}\n\ncomponents()\ntimezoneDetect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MPTY_ARR } from './constants';\n\nexport const isArray = Array.isArray;\n\n/**\n * Assign properties from `props` to `obj`\n * @template O, P The obj and props types\n * @param {O} obj The object to copy properties to\n * @param {P} props The object to copy properties from\n * @returns {O & P}\n */\nexport function assign(obj, props) {\n\t// @ts-ignore We change the type of `obj` to be `O & P`\n\tfor (let i in props) obj[i] = props[i];\n\treturn /** @type {O & P} */ (obj);\n}\n\n/**\n * Remove a child node from its parent if attached. This is a workaround for\n * IE11 which doesn't support `Element.prototype.remove()`. Using this function\n * is smaller than including a dedicated polyfill.\n * @param {Node} node The node to remove\n */\nexport function removeNode(node) {\n\tlet parentNode = node.parentNode;\n\tif (parentNode) parentNode.removeChild(node);\n}\n\nexport const slice = EMPTY_ARR.slice;\n", "import { _catchError } from './diff/catch-error';\n\n/**\n * The `option` object can potentially contain callback functions\n * that are called during various stages of our renderer. This is the\n * foundation on which all our addons like `preact/debug`, `preact/compat`,\n * and `preact/hooks` are based on. See the `Options` type in `internal.d.ts`\n * for a full list of available option hooks (most editors/IDEs allow you to\n * ctrl+click or cmd+click on mac the type definition below).\n * @type {import('./internal').Options}\n */\nconst options = {\n\t_catchError\n};\n\nexport default options;\n", "import { slice } from './util';\nimport options from './options';\n\nlet vnodeId = 0;\n\n/**\n * Create an virtual node (used for JSX)\n * @param {import('./internal').VNode[\"type\"]} type The node name or Component\n * constructor for this virtual node\n * @param {object | null | undefined} [props] The properties of the virtual node\n * @param {Array} [children] The children of the virtual node\n * @returns {import('./internal').VNode}\n */\nexport function createElement(type, props, children) {\n\tlet normalizedProps = {},\n\t\tkey,\n\t\tref,\n\t\ti;\n\tfor (i in props) {\n\t\tif (i == 'key') key = props[i];\n\t\telse if (i == 'ref') ref = props[i];\n\t\telse normalizedProps[i] = props[i];\n\t}\n\n\tif (arguments.length > 2) {\n\t\tnormalizedProps.children =\n\t\t\targuments.length > 3 ? slice.call(arguments, 2) : children;\n\t}\n\n\t// If a Component VNode, check for and apply defaultProps\n\t// Note: type may be undefined in development, must never error here.\n\tif (typeof type == 'function' && type.defaultProps != null) {\n\t\tfor (i in type.defaultProps) {\n\t\t\tif (normalizedProps[i] === undefined) {\n\t\t\t\tnormalizedProps[i] = type.defaultProps[i];\n\t\t\t}\n\t\t}\n\t}\n\n\treturn createVNode(type, normalizedProps, key, ref, null);\n}\n\n/**\n * Create a VNode (used internally by Preact)\n * @param {import('./internal').VNode[\"type\"]} type The node name or Component\n * Constructor for this virtual node\n * @param {object | string | number | null} props The properties of this virtual node.\n * If this virtual node represents a text node, this is the text of the node (string or number).\n * @param {string | number | null} key The key for this virtual node, used when\n * diffing it against its children\n * @param {import('./internal').VNode[\"ref\"]} ref The ref property that will\n * receive a reference to its created child\n * @returns {import('./internal').VNode}\n */\nexport function createVNode(type, props, key, ref, original) {\n\t// V8 seems to be better at detecting type shapes if the object is allocated from the same call site\n\t// Do not inline into createElement and coerceToVNode!\n\tconst vnode = {\n\t\ttype,\n\t\tprops,\n\t\tkey,\n\t\tref,\n\t\t_children: null,\n\t\t_parent: null,\n\t\t_depth: 0,\n\t\t_dom: null,\n\t\t// _nextDom must be initialized to undefined b/c it will eventually\n\t\t// be set to dom.nextSibling which can return `null` and it is important\n\t\t// to be able to distinguish between an uninitialized _nextDom and\n\t\t// a _nextDom that has been set to `null`\n\t\t_nextDom: undefined,\n\t\t_component: null,\n\t\t_hydrating: null,\n\t\tconstructor: undefined,\n\t\t_original: original == null ? ++vnodeId : original\n\t};\n\n\t// Only invoke the vnode hook if this was *not* a direct copy:\n\tif (original == null && options.vnode != null) options.vnode(vnode);\n\n\treturn vnode;\n}\n\nexport function createRef() {\n\treturn { current: null };\n}\n\nexport function Fragment(props) {\n\treturn props.children;\n}\n\n/**\n * Check if a the argument is a valid Preact VNode.\n * @param {*} vnode\n * @returns {vnode is import('./internal').VNode}\n */\nexport const isValidElement = vnode =>\n\tvnode != null && vnode.constructor === undefined;\n", "import { assign } from './util';\nimport { diff, commitRoot } from './diff/index';\nimport options from './options';\nimport { Fragment } from './create-element';\n\n/**\n * Base Component class. Provides `setState()` and `forceUpdate()`, which\n * trigger rendering\n * @param {object} props The initial component props\n * @param {object} context The initial context from parent components'\n * getChildContext\n */\nexport function Component(props, context) {\n\tthis.props = props;\n\tthis.context = context;\n}\n\n/**\n * Update component state and schedule a re-render.\n * @this {import('./internal').Component}\n * @param {object | ((s: object, p: object) => object)} update A hash of state\n * properties to update with new values or a function that given the current\n * state and props returns a new partial state\n * @param {() => void} [callback] A function to be called once component state is\n * updated\n */\nComponent.prototype.setState = function (update, callback) {\n\t// only clone state when copying to nextState the first time.\n\tlet s;\n\tif (this._nextState != null && this._nextState !== this.state) {\n\t\ts = this._nextState;\n\t} else {\n\t\ts = this._nextState = assign({}, this.state);\n\t}\n\n\tif (typeof update == 'function') {\n\t\t// Some libraries like `immer` mark the current state as readonly,\n\t\t// preventing us from mutating it, so we need to clone it. See #2716\n\t\tupdate = update(assign({}, s), this.props);\n\t}\n\n\tif (update) {\n\t\tassign(s, update);\n\t}\n\n\t// Skip update if updater function returned null\n\tif (update == null) return;\n\n\tif (this._vnode) {\n\t\tif (callback) {\n\t\t\tthis._stateCallbacks.push(callback);\n\t\t}\n\t\tenqueueRender(this);\n\t}\n};\n\n/**\n * Immediately perform a synchronous re-render of the component\n * @this {import('./internal').Component}\n * @param {() => void} [callback] A function to be called after component is\n * re-rendered\n */\nComponent.prototype.forceUpdate = function (callback) {\n\tif (this._vnode) {\n\t\t// Set render mode so that we can differentiate where the render request\n\t\t// is coming from. We need this because forceUpdate should never call\n\t\t// shouldComponentUpdate\n\t\tthis._force = true;\n\t\tif (callback) this._renderCallbacks.push(callback);\n\t\tenqueueRender(this);\n\t}\n};\n\n/**\n * Accepts `props` and `state`, and returns a new Virtual DOM tree to build.\n * Virtual DOM is generally constructed via [JSX](http://jasonformat.com/wtf-is-jsx).\n * @param {object} props Props (eg: JSX attributes) received from parent\n * element/component\n * @param {object} state The component's current state\n * @param {object} context Context object, as returned by the nearest\n * ancestor's `getChildContext()`\n * @returns {import('./index').ComponentChildren | void}\n */\nComponent.prototype.render = Fragment;\n\n/**\n * @param {import('./internal').VNode} vnode\n * @param {number | null} [childIndex]\n */\nexport function getDomSibling(vnode, childIndex) {\n\tif (childIndex == null) {\n\t\t// Use childIndex==null as a signal to resume the search from the vnode's sibling\n\t\treturn vnode._parent\n\t\t\t? getDomSibling(vnode._parent, vnode._parent._children.indexOf(vnode) + 1)\n\t\t\t: null;\n\t}\n\n\tlet sibling;\n\tfor (; childIndex < vnode._children.length; childIndex++) {\n\t\tsibling = vnode._children[childIndex];\n\n\t\tif (sibling != null && sibling._dom != null) {\n\t\t\t// Since updateParentDomPointers keeps _dom pointer correct,\n\t\t\t// we can rely on _dom to tell us if this subtree contains a\n\t\t\t// rendered DOM node, and what the first rendered DOM node is\n\t\t\treturn sibling._nextDom || sibling._dom;\n\t\t}\n\t}\n\n\t// If we get here, we have not found a DOM node in this vnode's children.\n\t// We must resume from this vnode's sibling (in it's parent _children array)\n\t// Only climb up and search the parent if we aren't searching through a DOM\n\t// VNode (meaning we reached the DOM parent of the original vnode that began\n\t// the search)\n\treturn typeof vnode.type == 'function' ? getDomSibling(vnode) : null;\n}\n\n/**\n * Trigger in-place re-rendering of a component.\n * @param {import('./internal').Component} component The component to rerender\n */\nfunction renderComponent(component) {\n\tlet vnode = component._vnode,\n\t\toldDom = vnode._dom,\n\t\tparentDom = component._parentDom;\n\n\tif (parentDom) {\n\t\tlet commitQueue = [],\n\t\t\trefQueue = [];\n\t\tconst oldVNode = assign({}, vnode);\n\t\toldVNode._original = vnode._original + 1;\n\n\t\tdiff(\n\t\t\tparentDom,\n\t\t\tvnode,\n\t\t\toldVNode,\n\t\t\tcomponent._globalContext,\n\t\t\tparentDom.ownerSVGElement !== undefined,\n\t\t\tvnode._hydrating != null ? [oldDom] : null,\n\t\t\tcommitQueue,\n\t\t\toldDom == null ? getDomSibling(vnode) : oldDom,\n\t\t\tvnode._hydrating,\n\t\t\trefQueue\n\t\t);\n\n\t\tcommitRoot(commitQueue, vnode, refQueue);\n\n\t\tif (vnode._dom != oldDom) {\n\t\t\tupdateParentDomPointers(vnode);\n\t\t}\n\t}\n}\n\n/**\n * @param {import('./internal').VNode} vnode\n */\nfunction updateParentDomPointers(vnode) {\n\tif ((vnode = vnode._parent) != null && vnode._component != null) {\n\t\tvnode._dom = vnode._component.base = null;\n\t\tfor (let i = 0; i < vnode._children.length; i++) {\n\t\t\tlet child = vnode._children[i];\n\t\t\tif (child != null && child._dom != null) {\n\t\t\t\tvnode._dom = vnode._component.base = child._dom;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\treturn updateParentDomPointers(vnode);\n\t}\n}\n\n/**\n * The render queue\n * @type {Array}\n */\nlet rerenderQueue = [];\n\n/*\n * The value of `Component.debounce` must asynchronously invoke the passed in callback. It is\n * important that contributors to Preact can consistently reason about what calls to `setState`, etc.\n * do, and when their effects will be applied. See the links below for some further reading on designing\n * asynchronous APIs.\n * * [Designing APIs for Asynchrony](https://blog.izs.me/2013/08/designing-apis-for-asynchrony)\n * * [Callbacks synchronous and asynchronous](https://blog.ometer.com/2011/07/24/callbacks-synchronous-and-asynchronous/)\n */\n\nlet prevDebounce;\n\nconst defer =\n\ttypeof Promise == 'function'\n\t\t? Promise.prototype.then.bind(Promise.resolve())\n\t\t: setTimeout;\n\n/**\n * Enqueue a rerender of a component\n * @param {import('./internal').Component} c The component to rerender\n */\nexport function enqueueRender(c) {\n\tif (\n\t\t(!c._dirty &&\n\t\t\t(c._dirty = true) &&\n\t\t\trerenderQueue.push(c) &&\n\t\t\t!process._rerenderCount++) ||\n\t\tprevDebounce !== options.debounceRendering\n\t) {\n\t\tprevDebounce = options.debounceRendering;\n\t\t(prevDebounce || defer)(process);\n\t}\n}\n\n/**\n * @param {import('./internal').Component} a\n * @param {import('./internal').Component} b\n */\nconst depthSort = (a, b) => a._vnode._depth - b._vnode._depth;\n\n/** Flush the render queue by rerendering all queued components */\nfunction process() {\n\tlet c;\n\trerenderQueue.sort(depthSort);\n\t// Don't update `renderCount` yet. Keep its value non-zero to prevent unnecessary\n\t// process() calls from getting scheduled while `queue` is still being consumed.\n\twhile ((c = rerenderQueue.shift())) {\n\t\tif (c._dirty) {\n\t\t\tlet renderQueueLength = rerenderQueue.length;\n\t\t\trenderComponent(c);\n\t\t\tif (rerenderQueue.length > renderQueueLength) {\n\t\t\t\t// When i.e. rerendering a provider additional new items can be injected, we want to\n\t\t\t\t// keep the order from top to bottom with those new items so we can handle them in a\n\t\t\t\t// single pass\n\t\t\t\trerenderQueue.sort(depthSort);\n\t\t\t}\n\t\t}\n\t}\n\tprocess._rerenderCount = 0;\n}\n\nprocess._rerenderCount = 0;\n", "import { enqueueRender } from './component';\n\nexport let i = 0;\n\nexport function createContext(defaultValue, contextId) {\n\tcontextId = '__cC' + i++;\n\n\tconst context = {\n\t\t_id: contextId,\n\t\t_defaultValue: defaultValue,\n\t\t/** @type {import('./internal').FunctionComponent} */\n\t\tConsumer(props, contextValue) {\n\t\t\t// return props.children(\n\t\t\t// \tcontext[contextId] ? context[contextId].props.value : defaultValue\n\t\t\t// );\n\t\t\treturn props.children(contextValue);\n\t\t},\n\t\t/** @type {import('./internal').FunctionComponent} */\n\t\tProvider(props) {\n\t\t\tif (!this.getChildContext) {\n\t\t\t\t/** @type {import('./internal').Component[]} */\n\t\t\t\tlet subs = [];\n\t\t\t\tlet ctx = {};\n\t\t\t\tctx[contextId] = this;\n\n\t\t\t\tthis.getChildContext = () => ctx;\n\n\t\t\t\tthis.shouldComponentUpdate = function (_props) {\n\t\t\t\t\tif (this.props.value !== _props.value) {\n\t\t\t\t\t\t// I think the forced value propagation here was only needed when `options.debounceRendering` was being bypassed:\n\t\t\t\t\t\t// https://github.com/preactjs/preact/commit/4d339fb803bea09e9f198abf38ca1bf8ea4b7771#diff-54682ce380935a717e41b8bfc54737f6R358\n\t\t\t\t\t\t// In those cases though, even with the value corrected, we're double-rendering all nodes.\n\t\t\t\t\t\t// It might be better to just tell folks not to use force-sync mode.\n\t\t\t\t\t\t// Currently, using `useContext()` in a class component will overwrite its `this.context` value.\n\t\t\t\t\t\t// subs.some(c => {\n\t\t\t\t\t\t// \tc.context = _props.value;\n\t\t\t\t\t\t// \tenqueueRender(c);\n\t\t\t\t\t\t// });\n\n\t\t\t\t\t\t// subs.some(c => {\n\t\t\t\t\t\t// \tc.context[contextId] = _props.value;\n\t\t\t\t\t\t// \tenqueueRender(c);\n\t\t\t\t\t\t// });\n\t\t\t\t\t\tsubs.some(c => {\n\t\t\t\t\t\t\tc._force = true;\n\t\t\t\t\t\t\tenqueueRender(c);\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t};\n\n\t\t\t\tthis.sub = c => {\n\t\t\t\t\tsubs.push(c);\n\t\t\t\t\tlet old = c.componentWillUnmount;\n\t\t\t\t\tc.componentWillUnmount = () => {\n\t\t\t\t\t\tsubs.splice(subs.indexOf(c), 1);\n\t\t\t\t\t\tif (old) old.call(c);\n\t\t\t\t\t};\n\t\t\t\t};\n\t\t\t}\n\n\t\t\treturn props.children;\n\t\t}\n\t};\n\n\t// Devtools needs access to the context object when it\n\t// encounters a Provider. This is necessary to support\n\t// setting `displayName` on the context object instead\n\t// of on the component itself. See:\n\t// https://reactjs.org/docs/context.html#contextdisplayname\n\n\treturn (context.Provider._contextRef = context.Consumer.contextType =\n\t\tcontext);\n}\n", "export const EMPTY_OBJ = {};\nexport const EMPTY_ARR = [];\nexport const IS_NON_DIMENSIONAL =\n\t/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;\n", "import { diff, unmount, applyRef } from './index';\nimport { createVNode, Fragment } from '../create-element';\nimport { EMPTY_OBJ, EMPTY_ARR } from '../constants';\nimport { isArray } from '../util';\nimport { getDomSibling } from '../component';\n\n/**\n * Diff the children of a virtual node\n * @param {import('../internal').PreactElement} parentDom The DOM element whose\n * children are being diffed\n * @param {import('../internal').ComponentChildren[]} renderResult\n * @param {import('../internal').VNode} newParentVNode The new virtual\n * node whose children should be diff'ed against oldParentVNode\n * @param {import('../internal').VNode} oldParentVNode The old virtual\n * node whose children should be diff'ed against newParentVNode\n * @param {object} globalContext The current context object - modified by getChildContext\n * @param {boolean} isSvg Whether or not this DOM node is an SVG node\n * @param {Array} excessDomChildren\n * @param {Array} commitQueue List of components\n * which have callbacks to invoke in commitRoot\n * @param {import('../internal').PreactElement} oldDom The current attached DOM\n * element any new dom elements should be placed around. Likely `null` on first\n * render (except when hydrating). Can be a sibling DOM element when diffing\n * Fragments that have siblings. In most cases, it starts out as `oldChildren[0]._dom`.\n * @param {boolean} isHydrating Whether or not we are in hydration\n * @param {Array} refQueue an array of elements needed to invoke refs\n */\nexport function diffChildren(\n\tparentDom,\n\trenderResult,\n\tnewParentVNode,\n\toldParentVNode,\n\tglobalContext,\n\tisSvg,\n\texcessDomChildren,\n\tcommitQueue,\n\toldDom,\n\tisHydrating,\n\trefQueue\n) {\n\tlet i,\n\t\tj,\n\t\toldVNode,\n\t\tchildVNode,\n\t\tnewDom,\n\t\tfirstChildDom,\n\t\tskew = 0;\n\n\t// This is a compression of oldParentVNode!=null && oldParentVNode != EMPTY_OBJ && oldParentVNode._children || EMPTY_ARR\n\t// as EMPTY_OBJ._children should be `undefined`.\n\tlet oldChildren = (oldParentVNode && oldParentVNode._children) || EMPTY_ARR;\n\n\tlet oldChildrenLength = oldChildren.length,\n\t\tremainingOldChildren = oldChildrenLength,\n\t\tnewChildrenLength = renderResult.length;\n\n\tnewParentVNode._children = [];\n\tfor (i = 0; i < newChildrenLength; i++) {\n\t\tchildVNode = renderResult[i];\n\n\t\tif (\n\t\t\tchildVNode == null ||\n\t\t\ttypeof childVNode == 'boolean' ||\n\t\t\ttypeof childVNode == 'function'\n\t\t) {\n\t\t\tchildVNode = newParentVNode._children[i] = null;\n\t\t}\n\t\t// If this newVNode is being reused (e.g.
    {reuse}{reuse}
    ) in the same diff,\n\t\t// or we are rendering a component (e.g. setState) copy the oldVNodes so it can have\n\t\t// it's own DOM & etc. pointers\n\t\telse if (\n\t\t\ttypeof childVNode == 'string' ||\n\t\t\ttypeof childVNode == 'number' ||\n\t\t\t// eslint-disable-next-line valid-typeof\n\t\t\ttypeof childVNode == 'bigint'\n\t\t) {\n\t\t\tchildVNode = newParentVNode._children[i] = createVNode(\n\t\t\t\tnull,\n\t\t\t\tchildVNode,\n\t\t\t\tnull,\n\t\t\t\tnull,\n\t\t\t\tchildVNode\n\t\t\t);\n\t\t} else if (isArray(childVNode)) {\n\t\t\tchildVNode = newParentVNode._children[i] = createVNode(\n\t\t\t\tFragment,\n\t\t\t\t{ children: childVNode },\n\t\t\t\tnull,\n\t\t\t\tnull,\n\t\t\t\tnull\n\t\t\t);\n\t\t} else if (childVNode._depth > 0) {\n\t\t\t// VNode is already in use, clone it. This can happen in the following\n\t\t\t// scenario:\n\t\t\t// const reuse =
    \n\t\t\t//
    {reuse}{reuse}
    \n\t\t\tchildVNode = newParentVNode._children[i] = createVNode(\n\t\t\t\tchildVNode.type,\n\t\t\t\tchildVNode.props,\n\t\t\t\tchildVNode.key,\n\t\t\t\tchildVNode.ref ? childVNode.ref : null,\n\t\t\t\tchildVNode._original\n\t\t\t);\n\t\t} else {\n\t\t\tchildVNode = newParentVNode._children[i] = childVNode;\n\t\t}\n\n\t\t// Terser removes the `continue` here and wraps the loop body\n\t\t// in a `if (childVNode) { ... } condition\n\t\tif (childVNode == null) {\n\t\t\toldVNode = oldChildren[i];\n\t\t\tif (oldVNode && oldVNode.key == null && oldVNode._dom) {\n\t\t\t\tif (oldVNode._dom == oldDom) {\n\t\t\t\t\toldVNode._parent = oldParentVNode;\n\t\t\t\t\toldDom = getDomSibling(oldVNode);\n\t\t\t\t}\n\n\t\t\t\tunmount(oldVNode, oldVNode, false);\n\t\t\t\toldChildren[i] = null;\n\t\t\t}\n\n\t\t\tcontinue;\n\t\t}\n\n\t\tchildVNode._parent = newParentVNode;\n\t\tchildVNode._depth = newParentVNode._depth + 1;\n\n\t\tlet skewedIndex = i + skew;\n\t\tconst matchingIndex = findMatchingIndex(\n\t\t\tchildVNode,\n\t\t\toldChildren,\n\t\t\tskewedIndex,\n\t\t\tremainingOldChildren\n\t\t);\n\n\t\tif (matchingIndex === -1) {\n\t\t\toldVNode = EMPTY_OBJ;\n\t\t} else {\n\t\t\toldVNode = oldChildren[matchingIndex] || EMPTY_OBJ;\n\t\t\toldChildren[matchingIndex] = undefined;\n\t\t\tremainingOldChildren--;\n\t\t}\n\n\t\t// Morph the old element into the new one, but don't append it to the dom yet\n\t\tdiff(\n\t\t\tparentDom,\n\t\t\tchildVNode,\n\t\t\toldVNode,\n\t\t\tglobalContext,\n\t\t\tisSvg,\n\t\t\texcessDomChildren,\n\t\t\tcommitQueue,\n\t\t\toldDom,\n\t\t\tisHydrating,\n\t\t\trefQueue\n\t\t);\n\n\t\tnewDom = childVNode._dom;\n\t\tif ((j = childVNode.ref) && oldVNode.ref != j) {\n\t\t\tif (oldVNode.ref) {\n\t\t\t\tapplyRef(oldVNode.ref, null, childVNode);\n\t\t\t}\n\t\t\trefQueue.push(j, childVNode._component || newDom, childVNode);\n\t\t}\n\n\t\tif (newDom != null) {\n\t\t\tif (firstChildDom == null) {\n\t\t\t\tfirstChildDom = newDom;\n\t\t\t}\n\n\t\t\tlet isMounting = oldVNode === EMPTY_OBJ || oldVNode._original === null;\n\t\t\tif (isMounting) {\n\t\t\t\tif (matchingIndex == -1) {\n\t\t\t\t\tskew--;\n\t\t\t\t}\n\t\t\t} else if (matchingIndex !== skewedIndex) {\n\t\t\t\tif (matchingIndex === skewedIndex + 1) {\n\t\t\t\t\tskew++;\n\t\t\t\t} else if (matchingIndex > skewedIndex) {\n\t\t\t\t\tif (remainingOldChildren > newChildrenLength - skewedIndex) {\n\t\t\t\t\t\tskew += matchingIndex - skewedIndex;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// ### Change from keyed: I think this was missing from the algo...\n\t\t\t\t\t\tskew--;\n\t\t\t\t\t}\n\t\t\t\t} else if (matchingIndex < skewedIndex) {\n\t\t\t\t\tif (matchingIndex == skewedIndex - 1) {\n\t\t\t\t\t\tskew = matchingIndex - skewedIndex;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tskew = 0;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tskew = 0;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tskewedIndex = i + skew;\n\n\t\t\tif (\n\t\t\t\ttypeof childVNode.type == 'function' &&\n\t\t\t\t(matchingIndex !== skewedIndex ||\n\t\t\t\t\toldVNode._children === childVNode._children)\n\t\t\t) {\n\t\t\t\toldDom = reorderChildren(childVNode, oldDom, parentDom);\n\t\t\t} else if (\n\t\t\t\ttypeof childVNode.type != 'function' &&\n\t\t\t\t(matchingIndex !== skewedIndex || isMounting)\n\t\t\t) {\n\t\t\t\toldDom = placeChild(parentDom, newDom, oldDom);\n\t\t\t} else if (childVNode._nextDom !== undefined) {\n\t\t\t\t// Only Fragments or components that return Fragment like VNodes will\n\t\t\t\t// have a non-undefined _nextDom. Continue the diff from the sibling\n\t\t\t\t// of last DOM child of this child VNode\n\t\t\t\toldDom = childVNode._nextDom;\n\n\t\t\t\t// Eagerly cleanup _nextDom. We don't need to persist the value because\n\t\t\t\t// it is only used by `diffChildren` to determine where to resume the diff after\n\t\t\t\t// diffing Components and Fragments. Once we store it the nextDOM local var, we\n\t\t\t\t// can clean up the property\n\t\t\t\tchildVNode._nextDom = undefined;\n\t\t\t} else {\n\t\t\t\toldDom = newDom.nextSibling;\n\t\t\t}\n\n\t\t\tif (typeof newParentVNode.type == 'function') {\n\t\t\t\t// Because the newParentVNode is Fragment-like, we need to set it's\n\t\t\t\t// _nextDom property to the nextSibling of its last child DOM node.\n\t\t\t\t//\n\t\t\t\t// `oldDom` contains the correct value here because if the last child\n\t\t\t\t// is a Fragment-like, then oldDom has already been set to that child's _nextDom.\n\t\t\t\t// If the last child is a DOM VNode, then oldDom will be set to that DOM\n\t\t\t\t// node's nextSibling.\n\t\t\t\tnewParentVNode._nextDom = oldDom;\n\t\t\t}\n\t\t}\n\t}\n\n\tnewParentVNode._dom = firstChildDom;\n\n\t// Remove remaining oldChildren if there are any.\n\tfor (i = oldChildrenLength; i--; ) {\n\t\tif (oldChildren[i] != null) {\n\t\t\tif (\n\t\t\t\ttypeof newParentVNode.type == 'function' &&\n\t\t\t\toldChildren[i]._dom != null &&\n\t\t\t\toldChildren[i]._dom == newParentVNode._nextDom\n\t\t\t) {\n\t\t\t\t// If the newParentVNode.__nextDom points to a dom node that is about to\n\t\t\t\t// be unmounted, then get the next sibling of that vnode and set\n\t\t\t\t// _nextDom to it\n\n\t\t\t\tnewParentVNode._nextDom = oldChildren[i]._dom.nextSibling;\n\t\t\t}\n\n\t\t\tunmount(oldChildren[i], oldChildren[i]);\n\t\t}\n\t}\n}\n\nfunction reorderChildren(childVNode, oldDom, parentDom) {\n\t// Note: VNodes in nested suspended trees may be missing _children.\n\tlet c = childVNode._children;\n\n\tlet tmp = 0;\n\tfor (; c && tmp < c.length; tmp++) {\n\t\tlet vnode = c[tmp];\n\t\tif (vnode) {\n\t\t\t// We typically enter this code path on sCU bailout, where we copy\n\t\t\t// oldVNode._children to newVNode._children. If that is the case, we need\n\t\t\t// to update the old children's _parent pointer to point to the newVNode\n\t\t\t// (childVNode here).\n\t\t\tvnode._parent = childVNode;\n\n\t\t\tif (typeof vnode.type == 'function') {\n\t\t\t\toldDom = reorderChildren(vnode, oldDom, parentDom);\n\t\t\t} else {\n\t\t\t\toldDom = placeChild(parentDom, vnode._dom, oldDom);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn oldDom;\n}\n\n/**\n * Flatten and loop through the children of a virtual node\n * @param {import('../index').ComponentChildren} children The unflattened\n * children of a virtual node\n * @returns {import('../internal').VNode[]}\n */\nexport function toChildArray(children, out) {\n\tout = out || [];\n\tif (children == null || typeof children == 'boolean') {\n\t} else if (isArray(children)) {\n\t\tchildren.some(child => {\n\t\t\ttoChildArray(child, out);\n\t\t});\n\t} else {\n\t\tout.push(children);\n\t}\n\treturn out;\n}\n\nfunction placeChild(parentDom, newDom, oldDom) {\n\tif (oldDom == null || oldDom.parentNode !== parentDom) {\n\t\tparentDom.insertBefore(newDom, null);\n\t} else if (newDom != oldDom || newDom.parentNode == null) {\n\t\tparentDom.insertBefore(newDom, oldDom);\n\t}\n\n\treturn newDom.nextSibling;\n}\n\n/**\n * @param {import('../internal').VNode | string} childVNode\n * @param {import('../internal').VNode[]} oldChildren\n * @param {number} skewedIndex\n * @param {number} remainingOldChildren\n * @returns {number}\n */\nfunction findMatchingIndex(\n\tchildVNode,\n\toldChildren,\n\tskewedIndex,\n\tremainingOldChildren\n) {\n\tconst key = childVNode.key;\n\tconst type = childVNode.type;\n\tlet x = skewedIndex - 1;\n\tlet y = skewedIndex + 1;\n\tlet oldVNode = oldChildren[skewedIndex];\n\n\tif (\n\t\toldVNode === null ||\n\t\t(oldVNode && key == oldVNode.key && type === oldVNode.type)\n\t) {\n\t\treturn skewedIndex;\n\t} else if (remainingOldChildren > (oldVNode != null ? 1 : 0)) {\n\t\twhile (x >= 0 || y < oldChildren.length) {\n\t\t\tif (x >= 0) {\n\t\t\t\toldVNode = oldChildren[x];\n\t\t\t\tif (oldVNode && key == oldVNode.key && type === oldVNode.type) {\n\t\t\t\t\treturn x;\n\t\t\t\t}\n\t\t\t\tx--;\n\t\t\t}\n\n\t\t\tif (y < oldChildren.length) {\n\t\t\t\toldVNode = oldChildren[y];\n\t\t\t\tif (oldVNode && key == oldVNode.key && type === oldVNode.type) {\n\t\t\t\t\treturn y;\n\t\t\t\t}\n\t\t\t\ty++;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn -1;\n}\n", "import { IS_NON_DIMENSIONAL } from '../constants';\nimport options from '../options';\n\n/**\n * Diff the old and new properties of a VNode and apply changes to the DOM node\n * @param {import('../internal').PreactElement} dom The DOM node to apply\n * changes to\n * @param {object} newProps The new props\n * @param {object} oldProps The old props\n * @param {boolean} isSvg Whether or not this node is an SVG node\n * @param {boolean} hydrate Whether or not we are in hydration mode\n */\nexport function diffProps(dom, newProps, oldProps, isSvg, hydrate) {\n\tlet i;\n\n\tfor (i in oldProps) {\n\t\tif (i !== 'children' && i !== 'key' && !(i in newProps)) {\n\t\t\tsetProperty(dom, i, null, oldProps[i], isSvg);\n\t\t}\n\t}\n\n\tfor (i in newProps) {\n\t\tif (\n\t\t\t(!hydrate || typeof newProps[i] == 'function') &&\n\t\t\ti !== 'children' &&\n\t\t\ti !== 'key' &&\n\t\t\ti !== 'value' &&\n\t\t\ti !== 'checked' &&\n\t\t\toldProps[i] !== newProps[i]\n\t\t) {\n\t\t\tsetProperty(dom, i, newProps[i], oldProps[i], isSvg);\n\t\t}\n\t}\n}\n\nfunction setStyle(style, key, value) {\n\tif (key[0] === '-') {\n\t\tstyle.setProperty(key, value == null ? '' : value);\n\t} else if (value == null) {\n\t\tstyle[key] = '';\n\t} else if (typeof value != 'number' || IS_NON_DIMENSIONAL.test(key)) {\n\t\tstyle[key] = value;\n\t} else {\n\t\tstyle[key] = value + 'px';\n\t}\n}\n\n/**\n * Set a property value on a DOM node\n * @param {import('../internal').PreactElement} dom The DOM node to modify\n * @param {string} name The name of the property to set\n * @param {*} value The value to set the property to\n * @param {*} oldValue The old value the property had\n * @param {boolean} isSvg Whether or not this DOM node is an SVG node or not\n */\nexport function setProperty(dom, name, value, oldValue, isSvg) {\n\tlet useCapture;\n\n\to: if (name === 'style') {\n\t\tif (typeof value == 'string') {\n\t\t\tdom.style.cssText = value;\n\t\t} else {\n\t\t\tif (typeof oldValue == 'string') {\n\t\t\t\tdom.style.cssText = oldValue = '';\n\t\t\t}\n\n\t\t\tif (oldValue) {\n\t\t\t\tfor (name in oldValue) {\n\t\t\t\t\tif (!(value && name in value)) {\n\t\t\t\t\t\tsetStyle(dom.style, name, '');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (value) {\n\t\t\t\tfor (name in value) {\n\t\t\t\t\tif (!oldValue || value[name] !== oldValue[name]) {\n\t\t\t\t\t\tsetStyle(dom.style, name, value[name]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t// Benchmark for comparison: https://esbench.com/bench/574c954bdb965b9a00965ac6\n\telse if (name[0] === 'o' && name[1] === 'n') {\n\t\tuseCapture =\n\t\t\tname !== (name = name.replace(/(PointerCapture)$|Capture$/, '$1'));\n\n\t\t// Infer correct casing for DOM built-in events:\n\t\tif (name.toLowerCase() in dom) name = name.toLowerCase().slice(2);\n\t\telse name = name.slice(2);\n\n\t\tif (!dom._listeners) dom._listeners = {};\n\t\tdom._listeners[name + useCapture] = value;\n\n\t\tif (value) {\n\t\t\tif (!oldValue) {\n\t\t\t\tvalue._attached = Date.now();\n\t\t\t\tconst handler = useCapture ? eventProxyCapture : eventProxy;\n\t\t\t\tdom.addEventListener(name, handler, useCapture);\n\t\t\t} else {\n\t\t\t\tvalue._attached = oldValue._attached;\n\t\t\t}\n\t\t} else {\n\t\t\tconst handler = useCapture ? eventProxyCapture : eventProxy;\n\t\t\tdom.removeEventListener(name, handler, useCapture);\n\t\t}\n\t} else if (name !== 'dangerouslySetInnerHTML') {\n\t\tif (isSvg) {\n\t\t\t// Normalize incorrect prop usage for SVG:\n\t\t\t// - xlink:href / xlinkHref --> href (xlink:href was removed from SVG and isn't needed)\n\t\t\t// - className --> class\n\t\t\tname = name.replace(/xlink(H|:h)/, 'h').replace(/sName$/, 's');\n\t\t} else if (\n\t\t\tname !== 'width' &&\n\t\t\tname !== 'height' &&\n\t\t\tname !== 'href' &&\n\t\t\tname !== 'list' &&\n\t\t\tname !== 'form' &&\n\t\t\t// Default value in browsers is `-1` and an empty string is\n\t\t\t// cast to `0` instead\n\t\t\tname !== 'tabIndex' &&\n\t\t\tname !== 'download' &&\n\t\t\tname !== 'rowSpan' &&\n\t\t\tname !== 'colSpan' &&\n\t\t\tname !== 'role' &&\n\t\t\tname in dom\n\t\t) {\n\t\t\ttry {\n\t\t\t\tdom[name] = value == null ? '' : value;\n\t\t\t\t// labelled break is 1b smaller here than a return statement (sorry)\n\t\t\t\tbreak o;\n\t\t\t} catch (e) {}\n\t\t}\n\n\t\t// aria- and data- attributes have no boolean representation.\n\t\t// A `false` value is different from the attribute not being\n\t\t// present, so we can't remove it. For non-boolean aria\n\t\t// attributes we could treat false as a removal, but the\n\t\t// amount of exceptions would cost too many bytes. On top of\n\t\t// that other frameworks generally stringify `false`.\n\n\t\tif (typeof value === 'function') {\n\t\t\t// never serialize functions as attribute values\n\t\t} else if (value != null && (value !== false || name[4] === '-')) {\n\t\t\tdom.setAttribute(name, value);\n\t\t} else {\n\t\t\tdom.removeAttribute(name);\n\t\t}\n\t}\n}\n\n/**\n * Proxy an event to hooked event handlers\n * @param {Event} e The event object from the browser\n * @private\n */\nfunction eventProxy(e) {\n\tconst eventHandler = this._listeners[e.type + false];\n\t/**\n\t * This trick is inspired by Vue https://github.com/vuejs/core/blob/main/packages/runtime-dom/src/modules/events.ts#L90-L101\n\t * when the dom performs an event it leaves micro-ticks in between bubbling up which means that an event can trigger on a newly\n\t * created DOM-node while the event bubbles up, this can cause quirky behavior as seen in https://github.com/preactjs/preact/issues/3927\n\t */\n\tif (!e._dispatched) {\n\t\t// When an event has no _dispatched we know this is the first event-target in the chain\n\t\t// so we set the initial dispatched time.\n\t\te._dispatched = Date.now();\n\t\t// When the _dispatched is smaller than the time when the targetted event handler was attached\n\t\t// we know we have bubbled up to an element that was added during patching the dom.\n\t} else if (e._dispatched <= eventHandler._attached) {\n\t\treturn;\n\t}\n\treturn eventHandler(options.event ? options.event(e) : e);\n}\n\nfunction eventProxyCapture(e) {\n\treturn this._listeners[e.type + true](options.event ? options.event(e) : e);\n}\n", "import { EMPTY_OBJ } from '../constants';\nimport { Component, getDomSibling } from '../component';\nimport { Fragment } from '../create-element';\nimport { diffChildren } from './children';\nimport { diffProps, setProperty } from './props';\nimport { assign, isArray, removeNode, slice } from '../util';\nimport options from '../options';\n\n/**\n * Diff two virtual nodes and apply proper changes to the DOM\n * @param {import('../internal').PreactElement} parentDom The parent of the DOM element\n * @param {import('../internal').VNode} newVNode The new virtual node\n * @param {import('../internal').VNode} oldVNode The old virtual node\n * @param {object} globalContext The current context object. Modified by getChildContext\n * @param {boolean} isSvg Whether or not this element is an SVG node\n * @param {Array} excessDomChildren\n * @param {Array} commitQueue List of components\n * which have callbacks to invoke in commitRoot\n * @param {import('../internal').PreactElement} oldDom The current attached DOM\n * element any new dom elements should be placed around. Likely `null` on first\n * render (except when hydrating). Can be a sibling DOM element when diffing\n * Fragments that have siblings. In most cases, it starts out as `oldChildren[0]._dom`.\n * @param {boolean} isHydrating Whether or not we are in hydration\n * @param {Array} refQueue an array of elements needed to invoke refs\n */\nexport function diff(\n\tparentDom,\n\tnewVNode,\n\toldVNode,\n\tglobalContext,\n\tisSvg,\n\texcessDomChildren,\n\tcommitQueue,\n\toldDom,\n\tisHydrating,\n\trefQueue\n) {\n\tlet tmp,\n\t\tnewType = newVNode.type;\n\n\t// When passing through createElement it assigns the object\n\t// constructor as undefined. This to prevent JSON-injection.\n\tif (newVNode.constructor !== undefined) return null;\n\n\t// If the previous diff bailed out, resume creating/hydrating.\n\tif (oldVNode._hydrating != null) {\n\t\tisHydrating = oldVNode._hydrating;\n\t\toldDom = newVNode._dom = oldVNode._dom;\n\t\t// if we resume, we want the tree to be \"unlocked\"\n\t\tnewVNode._hydrating = null;\n\t\texcessDomChildren = [oldDom];\n\t}\n\n\tif ((tmp = options._diff)) tmp(newVNode);\n\n\touter: if (typeof newType == 'function') {\n\t\ttry {\n\t\t\tlet c, isNew, oldProps, oldState, snapshot, clearProcessingException;\n\t\t\tlet newProps = newVNode.props;\n\n\t\t\t// Necessary for createContext api. Setting this property will pass\n\t\t\t// the context value as `this.context` just for this component.\n\t\t\ttmp = newType.contextType;\n\t\t\tlet provider = tmp && globalContext[tmp._id];\n\t\t\tlet componentContext = tmp\n\t\t\t\t? provider\n\t\t\t\t\t? provider.props.value\n\t\t\t\t\t: tmp._defaultValue\n\t\t\t\t: globalContext;\n\n\t\t\t// Get component and set it to `c`\n\t\t\tif (oldVNode._component) {\n\t\t\t\tc = newVNode._component = oldVNode._component;\n\t\t\t\tclearProcessingException = c._processingException = c._pendingError;\n\t\t\t} else {\n\t\t\t\t// Instantiate the new component\n\t\t\t\tif ('prototype' in newType && newType.prototype.render) {\n\t\t\t\t\t// @ts-ignore The check above verifies that newType is suppose to be constructed\n\t\t\t\t\tnewVNode._component = c = new newType(newProps, componentContext); // eslint-disable-line new-cap\n\t\t\t\t} else {\n\t\t\t\t\t// @ts-ignore Trust me, Component implements the interface we want\n\t\t\t\t\tnewVNode._component = c = new Component(newProps, componentContext);\n\t\t\t\t\tc.constructor = newType;\n\t\t\t\t\tc.render = doRender;\n\t\t\t\t}\n\t\t\t\tif (provider) provider.sub(c);\n\n\t\t\t\tc.props = newProps;\n\t\t\t\tif (!c.state) c.state = {};\n\t\t\t\tc.context = componentContext;\n\t\t\t\tc._globalContext = globalContext;\n\t\t\t\tisNew = c._dirty = true;\n\t\t\t\tc._renderCallbacks = [];\n\t\t\t\tc._stateCallbacks = [];\n\t\t\t}\n\n\t\t\t// Invoke getDerivedStateFromProps\n\t\t\tif (c._nextState == null) {\n\t\t\t\tc._nextState = c.state;\n\t\t\t}\n\n\t\t\tif (newType.getDerivedStateFromProps != null) {\n\t\t\t\tif (c._nextState == c.state) {\n\t\t\t\t\tc._nextState = assign({}, c._nextState);\n\t\t\t\t}\n\n\t\t\t\tassign(\n\t\t\t\t\tc._nextState,\n\t\t\t\t\tnewType.getDerivedStateFromProps(newProps, c._nextState)\n\t\t\t\t);\n\t\t\t}\n\n\t\t\toldProps = c.props;\n\t\t\toldState = c.state;\n\t\t\tc._vnode = newVNode;\n\n\t\t\t// Invoke pre-render lifecycle methods\n\t\t\tif (isNew) {\n\t\t\t\tif (\n\t\t\t\t\tnewType.getDerivedStateFromProps == null &&\n\t\t\t\t\tc.componentWillMount != null\n\t\t\t\t) {\n\t\t\t\t\tc.componentWillMount();\n\t\t\t\t}\n\n\t\t\t\tif (c.componentDidMount != null) {\n\t\t\t\t\tc._renderCallbacks.push(c.componentDidMount);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (\n\t\t\t\t\tnewType.getDerivedStateFromProps == null &&\n\t\t\t\t\tnewProps !== oldProps &&\n\t\t\t\t\tc.componentWillReceiveProps != null\n\t\t\t\t) {\n\t\t\t\t\tc.componentWillReceiveProps(newProps, componentContext);\n\t\t\t\t}\n\n\t\t\t\tif (\n\t\t\t\t\t!c._force &&\n\t\t\t\t\t((c.shouldComponentUpdate != null &&\n\t\t\t\t\t\tc.shouldComponentUpdate(\n\t\t\t\t\t\t\tnewProps,\n\t\t\t\t\t\t\tc._nextState,\n\t\t\t\t\t\t\tcomponentContext\n\t\t\t\t\t\t) === false) ||\n\t\t\t\t\t\tnewVNode._original === oldVNode._original)\n\t\t\t\t) {\n\t\t\t\t\t// More info about this here: https://gist.github.com/JoviDeCroock/bec5f2ce93544d2e6070ef8e0036e4e8\n\t\t\t\t\tif (newVNode._original !== oldVNode._original) {\n\t\t\t\t\t\t// When we are dealing with a bail because of sCU we have to update\n\t\t\t\t\t\t// the props, state and dirty-state.\n\t\t\t\t\t\t// when we are dealing with strict-equality we don't as the child could still\n\t\t\t\t\t\t// be dirtied see #3883\n\t\t\t\t\t\tc.props = newProps;\n\t\t\t\t\t\tc.state = c._nextState;\n\t\t\t\t\t\tc._dirty = false;\n\t\t\t\t\t}\n\n\t\t\t\t\tnewVNode._dom = oldVNode._dom;\n\t\t\t\t\tnewVNode._children = oldVNode._children;\n\t\t\t\t\tnewVNode._children.forEach(vnode => {\n\t\t\t\t\t\tif (vnode) vnode._parent = newVNode;\n\t\t\t\t\t});\n\n\t\t\t\t\tfor (let i = 0; i < c._stateCallbacks.length; i++) {\n\t\t\t\t\t\tc._renderCallbacks.push(c._stateCallbacks[i]);\n\t\t\t\t\t}\n\t\t\t\t\tc._stateCallbacks = [];\n\n\t\t\t\t\tif (c._renderCallbacks.length) {\n\t\t\t\t\t\tcommitQueue.push(c);\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak outer;\n\t\t\t\t}\n\n\t\t\t\tif (c.componentWillUpdate != null) {\n\t\t\t\t\tc.componentWillUpdate(newProps, c._nextState, componentContext);\n\t\t\t\t}\n\n\t\t\t\tif (c.componentDidUpdate != null) {\n\t\t\t\t\tc._renderCallbacks.push(() => {\n\t\t\t\t\t\tc.componentDidUpdate(oldProps, oldState, snapshot);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tc.context = componentContext;\n\t\t\tc.props = newProps;\n\t\t\tc._parentDom = parentDom;\n\t\t\tc._force = false;\n\n\t\t\tlet renderHook = options._render,\n\t\t\t\tcount = 0;\n\t\t\tif ('prototype' in newType && newType.prototype.render) {\n\t\t\t\tc.state = c._nextState;\n\t\t\t\tc._dirty = false;\n\n\t\t\t\tif (renderHook) renderHook(newVNode);\n\n\t\t\t\ttmp = c.render(c.props, c.state, c.context);\n\n\t\t\t\tfor (let i = 0; i < c._stateCallbacks.length; i++) {\n\t\t\t\t\tc._renderCallbacks.push(c._stateCallbacks[i]);\n\t\t\t\t}\n\t\t\t\tc._stateCallbacks = [];\n\t\t\t} else {\n\t\t\t\tdo {\n\t\t\t\t\tc._dirty = false;\n\t\t\t\t\tif (renderHook) renderHook(newVNode);\n\n\t\t\t\t\ttmp = c.render(c.props, c.state, c.context);\n\n\t\t\t\t\t// Handle setState called in render, see #2553\n\t\t\t\t\tc.state = c._nextState;\n\t\t\t\t} while (c._dirty && ++count < 25);\n\t\t\t}\n\n\t\t\t// Handle setState called in render, see #2553\n\t\t\tc.state = c._nextState;\n\n\t\t\tif (c.getChildContext != null) {\n\t\t\t\tglobalContext = assign(assign({}, globalContext), c.getChildContext());\n\t\t\t}\n\n\t\t\tif (!isNew && c.getSnapshotBeforeUpdate != null) {\n\t\t\t\tsnapshot = c.getSnapshotBeforeUpdate(oldProps, oldState);\n\t\t\t}\n\n\t\t\tlet isTopLevelFragment =\n\t\t\t\ttmp != null && tmp.type === Fragment && tmp.key == null;\n\t\t\tlet renderResult = isTopLevelFragment ? tmp.props.children : tmp;\n\n\t\t\tdiffChildren(\n\t\t\t\tparentDom,\n\t\t\t\tisArray(renderResult) ? renderResult : [renderResult],\n\t\t\t\tnewVNode,\n\t\t\t\toldVNode,\n\t\t\t\tglobalContext,\n\t\t\t\tisSvg,\n\t\t\t\texcessDomChildren,\n\t\t\t\tcommitQueue,\n\t\t\t\toldDom,\n\t\t\t\tisHydrating,\n\t\t\t\trefQueue\n\t\t\t);\n\n\t\t\tc.base = newVNode._dom;\n\n\t\t\t// We successfully rendered this VNode, unset any stored hydration/bailout state:\n\t\t\tnewVNode._hydrating = null;\n\n\t\t\tif (c._renderCallbacks.length) {\n\t\t\t\tcommitQueue.push(c);\n\t\t\t}\n\n\t\t\tif (clearProcessingException) {\n\t\t\t\tc._pendingError = c._processingException = null;\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tnewVNode._original = null;\n\t\t\t// if hydrating or creating initial tree, bailout preserves DOM:\n\t\t\tif (isHydrating || excessDomChildren != null) {\n\t\t\t\tnewVNode._dom = oldDom;\n\t\t\t\tnewVNode._hydrating = !!isHydrating;\n\t\t\t\texcessDomChildren[excessDomChildren.indexOf(oldDom)] = null;\n\t\t\t\t// ^ could possibly be simplified to:\n\t\t\t\t// excessDomChildren.length = 0;\n\t\t\t}\n\t\t\toptions._catchError(e, newVNode, oldVNode);\n\t\t}\n\t} else if (\n\t\texcessDomChildren == null &&\n\t\tnewVNode._original === oldVNode._original\n\t) {\n\t\tnewVNode._children = oldVNode._children;\n\t\tnewVNode._dom = oldVNode._dom;\n\t} else {\n\t\tnewVNode._dom = diffElementNodes(\n\t\t\toldVNode._dom,\n\t\t\tnewVNode,\n\t\t\toldVNode,\n\t\t\tglobalContext,\n\t\t\tisSvg,\n\t\t\texcessDomChildren,\n\t\t\tcommitQueue,\n\t\t\tisHydrating,\n\t\t\trefQueue\n\t\t);\n\t}\n\n\tif ((tmp = options.diffed)) tmp(newVNode);\n}\n\n/**\n * @param {Array} commitQueue List of components\n * which have callbacks to invoke in commitRoot\n * @param {import('../internal').VNode} root\n */\nexport function commitRoot(commitQueue, root, refQueue) {\n\tfor (let i = 0; i < refQueue.length; i++) {\n\t\tapplyRef(refQueue[i], refQueue[++i], refQueue[++i]);\n\t}\n\n\tif (options._commit) options._commit(root, commitQueue);\n\n\tcommitQueue.some(c => {\n\t\ttry {\n\t\t\t// @ts-ignore Reuse the commitQueue variable here so the type changes\n\t\t\tcommitQueue = c._renderCallbacks;\n\t\t\tc._renderCallbacks = [];\n\t\t\tcommitQueue.some(cb => {\n\t\t\t\t// @ts-ignore See above ts-ignore on commitQueue\n\t\t\t\tcb.call(c);\n\t\t\t});\n\t\t} catch (e) {\n\t\t\toptions._catchError(e, c._vnode);\n\t\t}\n\t});\n}\n\n/**\n * Diff two virtual nodes representing DOM element\n * @param {import('../internal').PreactElement} dom The DOM element representing\n * the virtual nodes being diffed\n * @param {import('../internal').VNode} newVNode The new virtual node\n * @param {import('../internal').VNode} oldVNode The old virtual node\n * @param {object} globalContext The current context object\n * @param {boolean} isSvg Whether or not this DOM node is an SVG node\n * @param {*} excessDomChildren\n * @param {Array} commitQueue List of components\n * which have callbacks to invoke in commitRoot\n * @param {boolean} isHydrating Whether or not we are in hydration\n * @param {Array} refQueue an array of elements needed to invoke refs\n * @returns {import('../internal').PreactElement}\n */\nfunction diffElementNodes(\n\tdom,\n\tnewVNode,\n\toldVNode,\n\tglobalContext,\n\tisSvg,\n\texcessDomChildren,\n\tcommitQueue,\n\tisHydrating,\n\trefQueue\n) {\n\tlet oldProps = oldVNode.props;\n\tlet newProps = newVNode.props;\n\tlet nodeType = newVNode.type;\n\tlet i = 0;\n\n\t// Tracks entering and exiting SVG namespace when descending through the tree.\n\tif (nodeType === 'svg') isSvg = true;\n\n\tif (excessDomChildren != null) {\n\t\tfor (; i < excessDomChildren.length; i++) {\n\t\t\tconst child = excessDomChildren[i];\n\n\t\t\t// if newVNode matches an element in excessDomChildren or the `dom`\n\t\t\t// argument matches an element in excessDomChildren, remove it from\n\t\t\t// excessDomChildren so it isn't later removed in diffChildren\n\t\t\tif (\n\t\t\t\tchild &&\n\t\t\t\t'setAttribute' in child === !!nodeType &&\n\t\t\t\t(nodeType ? child.localName === nodeType : child.nodeType === 3)\n\t\t\t) {\n\t\t\t\tdom = child;\n\t\t\t\texcessDomChildren[i] = null;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\tif (dom == null) {\n\t\tif (nodeType === null) {\n\t\t\t// @ts-ignore createTextNode returns Text, we expect PreactElement\n\t\t\treturn document.createTextNode(newProps);\n\t\t}\n\n\t\tif (isSvg) {\n\t\t\tdom = document.createElementNS(\n\t\t\t\t'http://www.w3.org/2000/svg',\n\t\t\t\t// @ts-ignore We know `newVNode.type` is a string\n\t\t\t\tnodeType\n\t\t\t);\n\t\t} else {\n\t\t\tdom = document.createElement(\n\t\t\t\t// @ts-ignore We know `newVNode.type` is a string\n\t\t\t\tnodeType,\n\t\t\t\tnewProps.is && newProps\n\t\t\t);\n\t\t}\n\n\t\t// we created a new parent, so none of the previously attached children can be reused:\n\t\texcessDomChildren = null;\n\t\t// we are creating a new node, so we can assume this is a new subtree (in case we are hydrating), this deopts the hydrate\n\t\tisHydrating = false;\n\t}\n\n\tif (nodeType === null) {\n\t\t// During hydration, we still have to split merged text from SSR'd HTML.\n\t\tif (oldProps !== newProps && (!isHydrating || dom.data !== newProps)) {\n\t\t\tdom.data = newProps;\n\t\t}\n\t} else {\n\t\t// If excessDomChildren was not null, repopulate it with the current element's children:\n\t\texcessDomChildren = excessDomChildren && slice.call(dom.childNodes);\n\n\t\toldProps = oldVNode.props || EMPTY_OBJ;\n\n\t\tlet oldHtml = oldProps.dangerouslySetInnerHTML;\n\t\tlet newHtml = newProps.dangerouslySetInnerHTML;\n\n\t\t// During hydration, props are not diffed at all (including dangerouslySetInnerHTML)\n\t\t// @TODO we should warn in debug mode when props don't match here.\n\t\tif (!isHydrating) {\n\t\t\t// But, if we are in a situation where we are using existing DOM (e.g. replaceNode)\n\t\t\t// we should read the existing DOM attributes to diff them\n\t\t\tif (excessDomChildren != null) {\n\t\t\t\toldProps = {};\n\t\t\t\tfor (i = 0; i < dom.attributes.length; i++) {\n\t\t\t\t\toldProps[dom.attributes[i].name] = dom.attributes[i].value;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (newHtml || oldHtml) {\n\t\t\t\t// Avoid re-applying the same '__html' if it did not changed between re-render\n\t\t\t\tif (\n\t\t\t\t\t!newHtml ||\n\t\t\t\t\t((!oldHtml || newHtml.__html != oldHtml.__html) &&\n\t\t\t\t\t\tnewHtml.__html !== dom.innerHTML)\n\t\t\t\t) {\n\t\t\t\t\tdom.innerHTML = (newHtml && newHtml.__html) || '';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tdiffProps(dom, newProps, oldProps, isSvg, isHydrating);\n\n\t\t// If the new vnode didn't have dangerouslySetInnerHTML, diff its children\n\t\tif (newHtml) {\n\t\t\tnewVNode._children = [];\n\t\t} else {\n\t\t\ti = newVNode.props.children;\n\t\t\tdiffChildren(\n\t\t\t\tdom,\n\t\t\t\tisArray(i) ? i : [i],\n\t\t\t\tnewVNode,\n\t\t\t\toldVNode,\n\t\t\t\tglobalContext,\n\t\t\t\tisSvg && nodeType !== 'foreignObject',\n\t\t\t\texcessDomChildren,\n\t\t\t\tcommitQueue,\n\t\t\t\texcessDomChildren\n\t\t\t\t\t? excessDomChildren[0]\n\t\t\t\t\t: oldVNode._children && getDomSibling(oldVNode, 0),\n\t\t\t\tisHydrating,\n\t\t\t\trefQueue\n\t\t\t);\n\n\t\t\t// Remove children that are not part of any vnode.\n\t\t\tif (excessDomChildren != null) {\n\t\t\t\tfor (i = excessDomChildren.length; i--; ) {\n\t\t\t\t\tif (excessDomChildren[i] != null) removeNode(excessDomChildren[i]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// (as above, don't diff props during hydration)\n\t\tif (!isHydrating) {\n\t\t\tif (\n\t\t\t\t'value' in newProps &&\n\t\t\t\t(i = newProps.value) !== undefined &&\n\t\t\t\t// #2756 For the -element the initial value is 0,\n\t\t\t\t// despite the attribute not being present. When the attribute\n\t\t\t\t// is missing the progress bar is treated as indeterminate.\n\t\t\t\t// To fix that we'll always update it when it is 0 for progress elements\n\t\t\t\t(i !== dom.value ||\n\t\t\t\t\t(nodeType === 'progress' && !i) ||\n\t\t\t\t\t// This is only for IE 11 to fix \n\tif (\n\t\ttype == 'select' &&\n\t\tnormalizedProps.multiple &&\n\t\tArray.isArray(normalizedProps.value)\n\t) {\n\t\t// forEach() always returns undefined, which we abuse here to unset the value prop.\n\t\tnormalizedProps.value = toChildArray(props.children).forEach(child => {\n\t\t\tchild.props.selected =\n\t\t\t\tnormalizedProps.value.indexOf(child.props.value) != -1;\n\t\t});\n\t}\n\n\t// Adding support for defaultValue in select tag\n\tif (type == 'select' && normalizedProps.defaultValue != null) {\n\t\tnormalizedProps.value = toChildArray(props.children).forEach(child => {\n\t\t\tif (normalizedProps.multiple) {\n\t\t\t\tchild.props.selected =\n\t\t\t\t\tnormalizedProps.defaultValue.indexOf(child.props.value) != -1;\n\t\t\t} else {\n\t\t\t\tchild.props.selected =\n\t\t\t\t\tnormalizedProps.defaultValue == child.props.value;\n\t\t\t}\n\t\t});\n\t}\n\n\tif (props.class && !props.className) {\n\t\tnormalizedProps.class = props.class;\n\t\tObject.defineProperty(\n\t\t\tnormalizedProps,\n\t\t\t'className',\n\t\t\tclassNameDescriptorNonEnumberable\n\t\t);\n\t} else if (props.className && !props.class) {\n\t\tnormalizedProps.class = normalizedProps.className = props.className;\n\t} else if (props.class && props.className) {\n\t\tnormalizedProps.class = normalizedProps.className = props.className;\n\t}\n\n\tvnode.props = normalizedProps;\n}\n\nlet oldVNodeHook = options.vnode;\noptions.vnode = vnode => {\n\t// only normalize props on Element nodes\n\tif (typeof vnode.type === 'string') {\n\t\thandleDomVNode(vnode);\n\t}\n\n\tvnode.$$typeof = REACT_ELEMENT_TYPE;\n\n\tif (oldVNodeHook) oldVNodeHook(vnode);\n};\n\n// Only needed for react-relay\nlet currentComponent;\nconst oldBeforeRender = options._render;\noptions._render = function (vnode) {\n\tif (oldBeforeRender) {\n\t\toldBeforeRender(vnode);\n\t}\n\tcurrentComponent = vnode._component;\n};\n\nconst oldDiffed = options.diffed;\n/** @type {(vnode: import('./internal').VNode) => void} */\noptions.diffed = function (vnode) {\n\tif (oldDiffed) {\n\t\toldDiffed(vnode);\n\t}\n\n\tconst props = vnode.props;\n\tconst dom = vnode._dom;\n\n\tif (\n\t\tdom != null &&\n\t\tvnode.type === 'textarea' &&\n\t\t'value' in props &&\n\t\tprops.value !== dom.value\n\t) {\n\t\tdom.value = props.value == null ? '' : props.value;\n\t}\n\n\tcurrentComponent = null;\n};\n\n// This is a very very private internal function for React it\n// is used to sort-of do runtime dependency injection. So far\n// only `react-relay` makes use of it. It uses it to read the\n// context value.\nexport const __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = {\n\tReactCurrentDispatcher: {\n\t\tcurrent: {\n\t\t\treadContext(context) {\n\t\t\t\treturn currentComponent._globalContext[context._id].props.value;\n\t\t\t}\n\t\t}\n\t}\n};\n", "import {\n\tcreateElement,\n\trender as preactRender,\n\tcloneElement as preactCloneElement,\n\tcreateRef,\n\tComponent,\n\tcreateContext,\n\tFragment\n} from 'preact';\nimport {\n\tuseState,\n\tuseId,\n\tuseReducer,\n\tuseEffect,\n\tuseLayoutEffect,\n\tuseRef,\n\tuseImperativeHandle,\n\tuseMemo,\n\tuseCallback,\n\tuseContext,\n\tuseDebugValue\n} from 'preact/hooks';\nimport { PureComponent } from './PureComponent';\nimport { memo } from './memo';\nimport { forwardRef } from './forwardRef';\nimport { Children } from './Children';\nimport { Suspense, lazy } from './suspense';\nimport { SuspenseList } from './suspense-list';\nimport { createPortal } from './portals';\nimport { is } from './util';\nimport {\n\thydrate,\n\trender,\n\tREACT_ELEMENT_TYPE,\n\t__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED\n} from './render';\n\nconst version = '17.0.2'; // trick libraries to think we are react\n\n/**\n * Legacy version of createElement.\n * @param {import('./internal').VNode[\"type\"]} type The node name or Component constructor\n */\nfunction createFactory(type) {\n\treturn createElement.bind(null, type);\n}\n\n/**\n * Check if the passed element is a valid (p)react node.\n * @param {*} element The element to check\n * @returns {boolean}\n */\nfunction isValidElement(element) {\n\treturn !!element && element.$$typeof === REACT_ELEMENT_TYPE;\n}\n\n/**\n * Check if the passed element is a Fragment node.\n * @param {*} element The element to check\n * @returns {boolean}\n */\nfunction isFragment(element) {\n\treturn isValidElement(element) && element.type === Fragment;\n}\n\n/**\n * Wrap `cloneElement` to abort if the passed element is not a valid element and apply\n * all vnode normalizations.\n * @param {import('./internal').VNode} element The vnode to clone\n * @param {object} props Props to add when cloning\n * @param {Array} rest Optional component children\n */\nfunction cloneElement(element) {\n\tif (!isValidElement(element)) return element;\n\treturn preactCloneElement.apply(null, arguments);\n}\n\n/**\n * Remove a component tree from the DOM, including state and event handlers.\n * @param {import('./internal').PreactElement} container\n * @returns {boolean}\n */\nfunction unmountComponentAtNode(container) {\n\tif (container._children) {\n\t\tpreactRender(null, container);\n\t\treturn true;\n\t}\n\treturn false;\n}\n\n/**\n * Get the matching DOM node for a component\n * @param {import('./internal').Component} component\n * @returns {import('./internal').PreactElement | null}\n */\nfunction findDOMNode(component) {\n\treturn (\n\t\t(component &&\n\t\t\t(component.base || (component.nodeType === 1 && component))) ||\n\t\tnull\n\t);\n}\n\n/**\n * Deprecated way to control batched rendering inside the reconciler, but we\n * already schedule in batches inside our rendering code\n * @template Arg\n * @param {(arg: Arg) => void} callback function that triggers the updated\n * @param {Arg} [arg] Optional argument that can be passed to the callback\n */\n// eslint-disable-next-line camelcase\nconst unstable_batchedUpdates = (callback, arg) => callback(arg);\n\n/**\n * In React, `flushSync` flushes the entire tree and forces a rerender. It's\n * implmented here as a no-op.\n * @template Arg\n * @template Result\n * @param {(arg: Arg) => Result} callback function that runs before the flush\n * @param {Arg} [arg] Optional argument that can be passed to the callback\n * @returns\n */\nconst flushSync = (callback, arg) => callback(arg);\n\n/**\n * Strict Mode is not implemented in Preact, so we provide a stand-in for it\n * that just renders its children without imposing any restrictions.\n */\nconst StrictMode = Fragment;\n\nexport function startTransition(cb) {\n\tcb();\n}\n\nexport function useDeferredValue(val) {\n\treturn val;\n}\n\nexport function useTransition() {\n\treturn [false, startTransition];\n}\n\n// TODO: in theory this should be done after a VNode is diffed as we want to insert\n// styles/... before it attaches\nexport const useInsertionEffect = useLayoutEffect;\n\n// compat to react-is\nexport const isElement = isValidElement;\n\n/**\n * This is taken from https://github.com/facebook/react/blob/main/packages/use-sync-external-store/src/useSyncExternalStoreShimClient.js#L84\n * on a high level this cuts out the warnings, ... and attempts a smaller implementation\n */\nexport function useSyncExternalStore(subscribe, getSnapshot) {\n\tconst value = getSnapshot();\n\n\tconst [{ _instance }, forceUpdate] = useState({\n\t\t_instance: { _value: value, _getSnapshot: getSnapshot }\n\t});\n\n\tuseLayoutEffect(() => {\n\t\t_instance._value = value;\n\t\t_instance._getSnapshot = getSnapshot;\n\n\t\tif (!is(_instance._value, getSnapshot())) {\n\t\t\tforceUpdate({ _instance });\n\t\t}\n\t}, [subscribe, value, getSnapshot]);\n\n\tuseEffect(() => {\n\t\tif (!is(_instance._value, _instance._getSnapshot())) {\n\t\t\tforceUpdate({ _instance });\n\t\t}\n\n\t\treturn subscribe(() => {\n\t\t\tif (!is(_instance._value, _instance._getSnapshot())) {\n\t\t\t\tforceUpdate({ _instance });\n\t\t\t}\n\t\t});\n\t}, [subscribe]);\n\n\treturn value;\n}\n\nexport * from 'preact/hooks';\nexport {\n\tversion,\n\tChildren,\n\trender,\n\thydrate,\n\tunmountComponentAtNode,\n\tcreatePortal,\n\tcreateElement,\n\tcreateContext,\n\tcreateFactory,\n\tcloneElement,\n\tcreateRef,\n\tFragment,\n\tisValidElement,\n\tisFragment,\n\tfindDOMNode,\n\tComponent,\n\tPureComponent,\n\tmemo,\n\tforwardRef,\n\tflushSync,\n\t// eslint-disable-next-line camelcase\n\tunstable_batchedUpdates,\n\tStrictMode,\n\tSuspense,\n\tSuspenseList,\n\tlazy,\n\t__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED\n};\n\n// React copies the named exports to the default one.\nexport default {\n\tuseState,\n\tuseId,\n\tuseReducer,\n\tuseEffect,\n\tuseLayoutEffect,\n\tuseInsertionEffect,\n\tuseTransition,\n\tuseDeferredValue,\n\tuseSyncExternalStore,\n\tstartTransition,\n\tuseRef,\n\tuseImperativeHandle,\n\tuseMemo,\n\tuseCallback,\n\tuseContext,\n\tuseDebugValue,\n\tversion,\n\tChildren,\n\trender,\n\thydrate,\n\tunmountComponentAtNode,\n\tcreatePortal,\n\tcreateElement,\n\tcreateContext,\n\tcreateFactory,\n\tcloneElement,\n\tcreateRef,\n\tFragment,\n\tisValidElement,\n\tisElement,\n\tisFragment,\n\tfindDOMNode,\n\tComponent,\n\tPureComponent,\n\tmemo,\n\tforwardRef,\n\tflushSync,\n\tunstable_batchedUpdates,\n\tStrictMode,\n\tSuspense,\n\tSuspenseList,\n\tlazy,\n\t__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED\n};\n", "export * from 'preact/compat';\nexport { default } from 'preact/compat';\n", "export * from 'preact/compat';\nexport { default } from 'preact/compat';\n", "import React, { useLayoutEffect } from 'react';\nimport { createPortal } from 'react-dom';\n\ninterface PopoverPortalProps {\n container: Element;\n element: Element;\n scoutElement: Element;\n children: React.ReactNode;\n}\n\nexport const PopoverPortal = ({\n container,\n element,\n scoutElement,\n children,\n}: PopoverPortalProps) => {\n useLayoutEffect(() => {\n container.appendChild(element);\n container.appendChild(scoutElement);\n return () => {\n container.removeChild(element);\n container.removeChild(scoutElement);\n };\n }, [container, element, scoutElement]);\n\n return createPortal(children, element);\n};\n", "import { PopoverPosition, PopoverAlign } from './index';\n\nexport const EMPTY_CLIENT_RECT: ClientRect = {\n top: 0,\n left: 0,\n bottom: 0,\n height: 0,\n right: 0,\n width: 0,\n};\n\nexport const rectsAreEqual = (rectA: ClientRect, rectB: ClientRect) =>\n rectA === rectB ||\n (rectA?.bottom === rectB?.bottom &&\n rectA?.height === rectB?.height &&\n rectA?.left === rectB?.left &&\n rectA?.right === rectB?.right &&\n rectA?.top === rectB?.top &&\n rectA?.width === rectB?.width);\n\nexport const createContainer = (\n containerStyle?: Partial,\n containerClassName?: string,\n) => {\n const container = window.document.createElement('div');\n if (containerClassName) container.className = containerClassName;\n Object.assign(container.style, containerStyle);\n return container;\n};\n\nexport const popoverRectForPosition = (\n position: PopoverPosition,\n childRect: ClientRect,\n popoverRect: ClientRect,\n padding: number,\n align: PopoverAlign,\n): ClientRect => {\n const targetMidX = childRect.left + childRect.width / 2;\n const targetMidY = childRect.top + childRect.height / 2;\n const { width, height } = popoverRect;\n let top: number;\n let left: number;\n\n switch (position) {\n case 'left':\n top = targetMidY - height / 2;\n left = childRect.left - padding - width;\n if (align === 'start') {\n top = childRect.top;\n }\n if (align === 'end') {\n top = childRect.bottom - height;\n }\n break;\n case 'bottom':\n top = childRect.bottom + padding;\n left = targetMidX - width / 2;\n if (align === 'start') {\n left = childRect.left;\n }\n if (align === 'end') {\n left = childRect.right - width;\n }\n break;\n case 'right':\n top = targetMidY - height / 2;\n left = childRect.right + padding;\n if (align === 'start') {\n top = childRect.top;\n }\n if (align === 'end') {\n top = childRect.bottom - height;\n }\n break;\n default:\n top = childRect.top - height - padding;\n left = targetMidX - width / 2;\n if (align === 'start') {\n left = childRect.left;\n }\n if (align === 'end') {\n left = childRect.right - width;\n }\n break;\n }\n\n return { top, left, width, height, right: left + width, bottom: top + height };\n};\n\ninterface GetNewPopoverRectProps {\n position: PopoverPosition;\n reposition: boolean;\n align: PopoverAlign;\n childRect: ClientRect;\n popoverRect: ClientRect;\n boundaryRect: ClientRect;\n padding: number;\n}\n\nexport const getNewPopoverRect = (\n {\n position,\n align,\n childRect,\n popoverRect,\n boundaryRect,\n padding,\n reposition,\n }: GetNewPopoverRectProps,\n boundaryInset: number,\n) => {\n const rect = popoverRectForPosition(position, childRect, popoverRect, padding, align);\n\n const boundaryViolation =\n reposition &&\n ((position === 'top' && rect.top < boundaryRect.top + boundaryInset) ||\n (position === 'left' && rect.left < boundaryRect.left + boundaryInset) ||\n (position === 'right' && rect.right > boundaryRect.right - boundaryInset) ||\n (position === 'bottom' && rect.bottom > boundaryRect.bottom - boundaryInset));\n\n return {\n rect,\n boundaryViolation,\n } as const;\n};\n\nexport const getNudgedPopoverRect = (\n popoverRect: ClientRect,\n boundaryRect: ClientRect,\n boundaryInset: number,\n): ClientRect => {\n const topBoundary = boundaryRect.top + boundaryInset;\n const leftBoundary = boundaryRect.left + boundaryInset;\n const rightBoundary = boundaryRect.right - boundaryInset;\n const bottomBoundary = boundaryRect.bottom - boundaryInset;\n\n let top = popoverRect.top < topBoundary ? topBoundary : popoverRect.top;\n top = top + popoverRect.height > bottomBoundary ? bottomBoundary - popoverRect.height : top;\n let left = popoverRect.left < leftBoundary ? leftBoundary : popoverRect.left;\n left = left + popoverRect.width > rightBoundary ? rightBoundary - popoverRect.width : left;\n\n return {\n top,\n left,\n width: popoverRect.width,\n height: popoverRect.height,\n right: left + popoverRect.width,\n bottom: top + popoverRect.height,\n };\n};\n", "import { useRef, useMemo } from 'react';\nimport { createContainer } from './util';\n\nexport const useElementRef = (\n containerClassName?: string,\n containerStyle?: Partial,\n) => {\n const ref = useRef();\n\n const element = useMemo(\n () => createContainer(containerStyle, containerClassName),\n [containerClassName, containerStyle],\n );\n\n ref.current = element;\n\n return ref;\n};\n", "import { useCallback } from 'react';\nimport { BoundaryViolations, PositionPopover, UsePopoverProps, UsePopoverResult } from '.';\nimport { EMPTY_CLIENT_RECT, getNewPopoverRect, getNudgedPopoverRect } from './util';\nimport { useElementRef } from './useElementRef';\n\nconst POPOVER_STYLE: Partial = {\n position: 'fixed',\n overflow: 'visible',\n top: '0px',\n left: '0px',\n};\n\nconst SCOUT_STYLE: Partial = {\n position: 'fixed',\n top: '0px',\n left: '0px',\n width: '0px',\n height: '0px',\n visibility: 'hidden',\n};\n\nexport const usePopover = ({\n isOpen,\n childRef,\n positions,\n containerClassName,\n parentElement,\n contentLocation,\n align,\n padding,\n reposition,\n boundaryInset,\n boundaryElement,\n onPositionPopover,\n}: UsePopoverProps): UsePopoverResult => {\n const popoverRef = useElementRef(containerClassName, POPOVER_STYLE);\n const scoutRef = useElementRef('react-tiny-popover-scout', SCOUT_STYLE);\n\n const positionPopover = useCallback(\n ({\n positionIndex = 0,\n parentRect = parentElement.getBoundingClientRect(),\n childRect = childRef?.current?.getBoundingClientRect(),\n scoutRect = scoutRef?.current?.getBoundingClientRect(),\n popoverRect = popoverRef.current.getBoundingClientRect(),\n boundaryRect = boundaryElement === parentElement\n ? parentRect\n : boundaryElement.getBoundingClientRect(),\n } = {}) => {\n if (!childRect || !parentRect || !isOpen) {\n return;\n }\n\n if (contentLocation) {\n const { top: inputTop, left: inputLeft } =\n typeof contentLocation === 'function'\n ? contentLocation({\n childRect,\n popoverRect,\n parentRect,\n boundaryRect,\n padding,\n nudgedTop: 0,\n nudgedLeft: 0,\n boundaryInset,\n violations: EMPTY_CLIENT_RECT,\n hasViolations: false,\n })\n : contentLocation;\n\n const left = Math.round(parentRect.left + inputLeft - scoutRect.left);\n const top = Math.round(parentRect.top + inputTop - scoutRect.top);\n\n popoverRef.current.style.transform = `translate(${left}px, ${top}px)`;\n\n onPositionPopover({\n childRect,\n popoverRect,\n parentRect,\n boundaryRect,\n padding,\n nudgedTop: 0,\n nudgedLeft: 0,\n boundaryInset,\n violations: EMPTY_CLIENT_RECT,\n hasViolations: false,\n });\n\n return;\n }\n\n const isExhausted = positionIndex === positions.length;\n const position = isExhausted ? positions[0] : positions[positionIndex];\n\n const { rect, boundaryViolation } = getNewPopoverRect(\n {\n childRect,\n popoverRect,\n boundaryRect,\n position,\n align,\n padding,\n reposition,\n },\n boundaryInset,\n );\n\n if (boundaryViolation && reposition && !isExhausted) {\n positionPopover({\n positionIndex: positionIndex + 1,\n childRect,\n popoverRect,\n parentRect,\n boundaryRect,\n });\n return;\n }\n\n const { top, left, width, height } = rect;\n const shouldNudge = reposition && !isExhausted;\n const { left: nudgedLeft, top: nudgedTop } = getNudgedPopoverRect(\n rect,\n boundaryRect,\n boundaryInset,\n );\n\n let finalTop = top;\n let finalLeft = left;\n\n if (shouldNudge) {\n finalTop = nudgedTop;\n finalLeft = nudgedLeft;\n }\n\n finalTop = Math.round(finalTop - scoutRect.top);\n finalLeft = Math.round(finalLeft - scoutRect.left);\n\n popoverRef.current.style.transform = `translate(${finalLeft}px, ${finalTop}px)`;\n\n const potentialViolations: BoundaryViolations = {\n top: boundaryRect.top + boundaryInset - finalTop,\n left: boundaryRect.left + boundaryInset - finalLeft,\n right: finalLeft + width - boundaryRect.right + boundaryInset,\n bottom: finalTop + height - boundaryRect.bottom + boundaryInset,\n };\n\n onPositionPopover({\n childRect,\n popoverRect: {\n top: finalTop,\n left: finalLeft,\n width,\n height,\n right: finalLeft + width,\n bottom: finalTop + height,\n },\n parentRect,\n boundaryRect,\n position,\n align,\n padding,\n nudgedTop: nudgedTop - top,\n nudgedLeft: nudgedLeft - left,\n boundaryInset,\n violations: {\n top: potentialViolations.top <= 0 ? 0 : potentialViolations.top,\n left: potentialViolations.left <= 0 ? 0 : potentialViolations.left,\n right: potentialViolations.right <= 0 ? 0 : potentialViolations.right,\n bottom: potentialViolations.bottom <= 0 ? 0 : potentialViolations.bottom,\n },\n hasViolations:\n potentialViolations.top > 0 ||\n potentialViolations.left > 0 ||\n potentialViolations.right > 0 ||\n potentialViolations.bottom > 0,\n });\n },\n [\n parentElement,\n childRef,\n scoutRef,\n popoverRef,\n boundaryElement,\n isOpen,\n contentLocation,\n positions,\n align,\n padding,\n reposition,\n boundaryInset,\n onPositionPopover,\n ],\n );\n\n return {\n positionPopover,\n popoverRef,\n scoutRef,\n };\n};\n", "import { useRef, useMemo } from 'react';\n\nexport const useMemoizedArray = (externalArray: T[]) => {\n const prevArrayRef = useRef(externalArray);\n const array = useMemo(() => {\n if (prevArrayRef.current === externalArray) return prevArrayRef.current;\n\n if (prevArrayRef.current.length !== externalArray.length) {\n prevArrayRef.current = externalArray;\n return externalArray;\n }\n\n for (let i = 0; i < externalArray.length; i += 1) {\n if (externalArray[i] !== prevArrayRef.current[i]) {\n prevArrayRef.current = externalArray;\n return externalArray;\n }\n }\n\n return prevArrayRef.current;\n }, [externalArray]);\n\n return array;\n};\n", "import { useMemo } from 'react';\nimport { UseArrowContainerProps } from '.';\n\nexport const useArrowContainer = ({\n childRect,\n popoverRect,\n position,\n arrowSize,\n arrowColor,\n}: UseArrowContainerProps) => {\n const arrowContainerStyle = useMemo(\n () =>\n ({\n padding: arrowSize,\n } as React.CSSProperties),\n [arrowSize],\n );\n\n const arrowStyle = useMemo(\n () =>\n ({\n position: 'absolute',\n ...((): React.CSSProperties => {\n const arrowWidth = arrowSize * 2;\n let top = childRect.top - popoverRect.top + childRect.height / 2 - arrowWidth / 2;\n let left = childRect.left - popoverRect.left + childRect.width / 2 - arrowWidth / 2;\n\n const lowerBound = arrowSize;\n const leftUpperBound = popoverRect.width - arrowSize;\n const topUpperBound = popoverRect.height - arrowSize;\n\n left = left < lowerBound ? lowerBound : left;\n left = left + arrowWidth > leftUpperBound ? leftUpperBound - arrowWidth : left;\n top = top < lowerBound ? lowerBound : top;\n top = top + arrowWidth > topUpperBound ? topUpperBound - arrowWidth : top;\n\n top = Number.isNaN(top) ? 0 : top;\n left = Number.isNaN(left) ? 0 : left;\n\n switch (position) {\n case 'right':\n return {\n borderTop: `${arrowSize}px solid transparent`,\n borderBottom: `${arrowSize}px solid transparent`,\n borderRight: `${arrowSize}px solid ${arrowColor}`,\n left: 0,\n top,\n };\n case 'left':\n return {\n borderTop: `${arrowSize}px solid transparent`,\n borderBottom: `${arrowSize}px solid transparent`,\n borderLeft: `${arrowSize}px solid ${arrowColor}`,\n right: 0,\n top,\n };\n case 'bottom':\n return {\n borderLeft: `${arrowSize}px solid transparent`,\n borderRight: `${arrowSize}px solid transparent`,\n borderBottom: `${arrowSize}px solid ${arrowColor}`,\n top: 0,\n left,\n };\n case 'top':\n return {\n borderLeft: `${arrowSize}px solid transparent`,\n borderRight: `${arrowSize}px solid transparent`,\n borderTop: `${arrowSize}px solid ${arrowColor}`,\n bottom: 0,\n left,\n };\n default:\n return {\n display: 'hidden',\n };\n }\n })(),\n } as React.CSSProperties),\n [\n arrowColor,\n arrowSize,\n childRect.height,\n childRect.left,\n childRect.top,\n childRect.width,\n popoverRect.height,\n popoverRect.left,\n popoverRect.top,\n popoverRect.width,\n position,\n ],\n );\n\n return {\n arrowContainerStyle,\n arrowStyle,\n };\n};\n", "import React, { useMemo } from 'react';\nimport { ArrowContainerProps } from '.';\nimport { useArrowContainer } from './useArrowContainer';\n\nexport const ArrowContainer = ({\n childRect,\n popoverRect,\n position,\n arrowColor,\n arrowSize,\n arrowClassName,\n arrowStyle: externalArrowStyle,\n className,\n children,\n style: externalArrowContainerStyle,\n}: ArrowContainerProps) => {\n const { arrowContainerStyle, arrowStyle } = useArrowContainer({\n childRect,\n popoverRect,\n position,\n arrowColor,\n arrowSize,\n });\n\n const mergedContainerStyle = useMemo(\n () => ({\n ...arrowContainerStyle,\n ...externalArrowContainerStyle,\n }),\n [arrowContainerStyle, externalArrowContainerStyle],\n );\n\n const mergedArrowStyle = useMemo(\n () => ({\n ...arrowStyle,\n ...externalArrowStyle,\n }),\n [arrowStyle, externalArrowStyle],\n );\n\n return (\n
    \n
    \n {children}\n
    \n );\n};\n", "import {\n useRef,\n useLayoutEffect,\n useState,\n useCallback,\n useEffect,\n forwardRef,\n cloneElement,\n Ref,\n} from 'react';\nimport { PopoverPortal } from './PopoverPortal';\nimport {\n ContentLocation,\n ContentLocationGetter,\n PopoverPosition,\n PopoverProps,\n PopoverState,\n} from '.';\nimport { EMPTY_CLIENT_RECT, rectsAreEqual } from './util';\nimport { usePopover } from './usePopover';\nimport { useMemoizedArray } from './useMemoizedArray';\nexport { useArrowContainer } from './useArrowContainer';\nexport { ArrowContainer } from './ArrowContainer';\nexport { usePopover };\n\nconst DEFAULT_POSITIONS: PopoverPosition[] = ['top', 'left', 'right', 'bottom'];\n\nconst PopoverInternal = forwardRef(\n (\n {\n isOpen,\n children,\n content,\n positions: externalPositions = DEFAULT_POSITIONS,\n align = 'center',\n padding = 0,\n reposition = true,\n parentElement = window.document.body,\n boundaryElement = parentElement,\n containerClassName = 'react-tiny-popover-container',\n containerStyle,\n contentLocation,\n boundaryInset = 0,\n onClickOutside,\n clickOutsideCapture = false,\n }: PopoverProps,\n externalRef: Ref,\n ) => {\n const positions = useMemoizedArray(externalPositions);\n\n // TODO: factor prevs out into a custom prevs hook\n const prevIsOpen = useRef(false);\n const prevPositions = useRef();\n const prevContentLocation = useRef();\n const prevReposition = useRef(reposition);\n\n const childRef = useRef();\n\n const [popoverState, setPopoverState] = useState({\n align,\n nudgedLeft: 0,\n nudgedTop: 0,\n position: positions[0],\n padding,\n childRect: EMPTY_CLIENT_RECT,\n popoverRect: EMPTY_CLIENT_RECT,\n parentRect: EMPTY_CLIENT_RECT,\n boundaryRect: EMPTY_CLIENT_RECT,\n boundaryInset,\n violations: EMPTY_CLIENT_RECT,\n hasViolations: false,\n });\n\n const onPositionPopover = useCallback(\n (popoverState: PopoverState) => setPopoverState(popoverState),\n [],\n );\n\n const { positionPopover, popoverRef, scoutRef } = usePopover({\n isOpen,\n childRef,\n containerClassName,\n parentElement,\n boundaryElement,\n contentLocation,\n positions,\n align,\n padding,\n boundaryInset,\n reposition,\n onPositionPopover,\n });\n\n useLayoutEffect(() => {\n let shouldUpdate = true;\n const updatePopover = () => {\n if (isOpen && shouldUpdate) {\n const childRect = childRef?.current?.getBoundingClientRect();\n const popoverRect = popoverRef?.current?.getBoundingClientRect();\n if (\n childRect != null &&\n popoverRect != null &&\n (!rectsAreEqual(childRect, {\n top: popoverState.childRect.top,\n left: popoverState.childRect.left,\n width: popoverState.childRect.width,\n height: popoverState.childRect.height,\n bottom: popoverState.childRect.top + popoverState.childRect.height,\n right: popoverState.childRect.left + popoverState.childRect.width,\n }) ||\n popoverRect.width !== popoverState.popoverRect.width ||\n popoverRect.height !== popoverState.popoverRect.height ||\n popoverState.padding !== padding ||\n popoverState.align !== align ||\n positions !== prevPositions.current ||\n contentLocation !== prevContentLocation.current ||\n reposition !== prevReposition.current)\n ) {\n positionPopover();\n }\n\n // TODO: factor prev checks out into the custom prevs hook\n if (positions !== prevPositions.current) {\n prevPositions.current = positions;\n }\n if (contentLocation !== prevContentLocation.current) {\n prevContentLocation.current = contentLocation;\n }\n if (reposition !== prevReposition.current) {\n prevReposition.current = reposition;\n }\n\n if (shouldUpdate) {\n window.requestAnimationFrame(updatePopover);\n }\n }\n\n prevIsOpen.current = isOpen;\n };\n\n window.requestAnimationFrame(updatePopover);\n\n return () => {\n shouldUpdate = false;\n };\n }, [\n align,\n contentLocation,\n isOpen,\n padding,\n popoverRef,\n popoverState.align,\n popoverState.childRect.height,\n popoverState.childRect.left,\n popoverState.childRect.top,\n popoverState.childRect.width,\n popoverState.padding,\n popoverState.popoverRect.height,\n popoverState.popoverRect.width,\n positionPopover,\n positions,\n reposition,\n ]);\n\n useEffect(() => {\n const popoverElement = popoverRef.current;\n\n Object.assign(popoverElement.style, containerStyle);\n\n return () => {\n Object.keys(containerStyle ?? {}).forEach(\n (key) =>\n delete popoverElement.style[\n key as keyof Omit\n ],\n );\n };\n }, [containerStyle, isOpen, popoverRef]);\n\n const handleOnClickOutside = useCallback(\n (e: MouseEvent) => {\n if (\n isOpen &&\n !popoverRef.current?.contains(e.target as Node) &&\n !childRef.current?.contains(e.target as Node)\n ) {\n onClickOutside?.(e);\n }\n },\n [isOpen, onClickOutside, popoverRef],\n );\n\n const handleWindowResize = useCallback(() => {\n if (childRef.current) {\n window.requestAnimationFrame(() => positionPopover());\n }\n }, [positionPopover]);\n\n useEffect(() => {\n const body = parentElement.ownerDocument.body;\n body.addEventListener('click', handleOnClickOutside, clickOutsideCapture);\n body.addEventListener('contextmenu', handleOnClickOutside, clickOutsideCapture);\n body.addEventListener('resize', handleWindowResize);\n return () => {\n body.removeEventListener('click', handleOnClickOutside, clickOutsideCapture);\n body.removeEventListener('contextmenu', handleOnClickOutside, clickOutsideCapture);\n body.removeEventListener('resize', handleWindowResize);\n };\n }, [clickOutsideCapture, handleOnClickOutside, handleWindowResize, parentElement]);\n\n const handleRef = useCallback(\n (node: HTMLElement) => {\n childRef.current = node;\n if (externalRef != null) {\n if (typeof externalRef === 'object') {\n (externalRef as React.MutableRefObject).current = node;\n } else if (typeof externalRef === 'function') {\n (externalRef as (instance: HTMLElement) => void)(node);\n }\n }\n },\n [externalRef],\n );\n\n const renderChild = () =>\n cloneElement(children as JSX.Element, {\n ref: handleRef,\n });\n\n const renderPopover = () => {\n if (!isOpen) return null;\n return (\n \n {typeof content === 'function' ? content(popoverState) : content}\n \n );\n };\n\n return (\n <>\n {renderChild()}\n {renderPopover()}\n \n );\n },\n);\n\nexport const Popover = forwardRef((props, ref) => {\n if (typeof window === 'undefined') return props.children;\n return ;\n});\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nfunction assert(condition, message) {\n if (!condition) {\n throw new Error(message);\n }\n}\nexports.default = assert;\n", "\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst assert_1 = __importDefault(require(\"./assert\"));\nfunction assertValidUserOptions(options) {\n assert_1.default(Array.isArray(options.domains), 'domains must be an array');\n assert_1.default(Array.isArray(options.topLevelDomains), 'topLevelDomains must be an array');\n assert_1.default(Array.isArray(options.secondLevelDomains), 'secondLevelDomains must be an array');\n assert_1.default(typeof options.distanceFunction === 'function', 'distanceFunction must be a function');\n}\nexports.default = assertValidUserOptions;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n// Encode the email address to prevent XSS but leave in valid\n// characters, following this official spec:\n// http://en.wikipedia.org/wiki/Email_address#Syntax\n//\n// We have to replace all the possible characters.\n// that's why we use a regex with a global flag.\nfunction encodeEmail(email) {\n const result = encodeURI(email)\n .replace(/%20/g, ' ')\n .replace(/%25/g, '%')\n .replace(/%5E/g, '^')\n .replace(/%60/g, '`')\n .replace(/%7B/g, '{')\n .replace(/%7C/g, '|')\n .replace(/%7D/g, '}');\n return result;\n}\nexports.default = encodeEmail;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nfunction findClosestDomain(opts) {\n const { domain, domains, distanceFunction, threshold } = opts;\n let dist;\n let minDist = Infinity;\n let closestDomain = null;\n if (!domain || !domains) {\n return undefined;\n }\n for (let i = 0; i < domains.length; i++) {\n if (domain === domains[i]) {\n return domain;\n }\n dist = distanceFunction(domain, domains[i]);\n if (dist < minDist) {\n minDist = dist;\n closestDomain = domains[i];\n }\n }\n if (minDist <= threshold && closestDomain !== null) {\n return closestDomain;\n }\n else {\n return undefined;\n }\n}\nexports.default = findClosestDomain;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst WHITESPACE_PATTERN = /\\s/;\n/**\n * Just in case a browser doesn't support .trim\n * Copied from https://github.com/Trott/trim\n * Credits to them\n */\nfunction trim(str) {\n if (str.trim) {\n return str.trim();\n }\n return right(left(str));\n}\nfunction left(str) {\n if (str.trimLeft)\n return str.trimLeft();\n return str.replace(/^\\s\\s*/, '');\n}\nfunction right(str) {\n if (str.trimRight)\n return str.trimRight();\n let i = str.length;\n while (WHITESPACE_PATTERN.test(str.charAt(--i)))\n ;\n return str.slice(0, i + 1);\n}\nexports.default = trim;\n", "\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst trim_1 = __importDefault(require(\"./trim\"));\nconst MINIUM_EMAIL_PARTS = 2;\nfunction parseEmail(emailStr) {\n const email = trim_1.default(emailStr);\n const parts = email.split('@');\n if (parts.length < MINIUM_EMAIL_PARTS) {\n return false;\n }\n for (let i = 0; i < parts.length; i++) {\n if (parts[i] === '') {\n return false;\n }\n }\n // FYI, in hello@example.com\n // secondLevelDomain -> example\n // topLevelDomain -> com\n let sld = '';\n let tld = '';\n const domain = parts.pop();\n const domainParts = domain.split('.');\n if (domainParts.length === 0) {\n // The address does not have a top-level domain\n return false;\n }\n else if (domainParts.length == 1) {\n // The address has only a top-level domain (valid under RFC)\n tld = domainParts[0];\n }\n else {\n // The address has a domain and a top-level domain\n sld = domainParts[0];\n for (let j = 1; j < domainParts.length; j++) {\n tld += domainParts[j] + '.';\n }\n tld = tld.substring(0, tld.length - 1);\n }\n return {\n topLevelDomain: tld,\n secondLevelDomain: sld,\n domain,\n address: parts.join('@'),\n };\n}\nexports.default = parseEmail;\n", "\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst encode_email_1 = __importDefault(require(\"./helpers/encode-email\"));\nconst find_closest_domain_1 = __importDefault(require(\"./helpers/find-closest-domain\"));\nconst parse_email_1 = __importDefault(require(\"./helpers/parse-email\"));\nfunction suggestEmail(opts) {\n const encodedEmail = encode_email_1.default(opts.email.toLowerCase());\n const email = parse_email_1.default(encodedEmail);\n if (!email) {\n return undefined;\n }\n const { domains, domainThreshold, distanceFunction, secondLevelDomains, topLevelDomains, } = opts;\n if (secondLevelDomains && topLevelDomains) {\n // If the email is a valid 2nd-level + top-level, do not suggest anything.\n // if (hasValidSecondLevelDomain(email) && hasValidTopLevelDomain(email)) {\n if (secondLevelDomains.indexOf(email.secondLevelDomain) !== -1 &&\n topLevelDomains.indexOf(email.topLevelDomain) !== -1) {\n return undefined;\n }\n }\n let closestDomain = find_closest_domain_1.default({\n domain: email.domain,\n domains,\n distanceFunction,\n threshold: domainThreshold,\n });\n if (closestDomain) {\n if (closestDomain == email.domain) {\n // The email address exactly matches one of the supplied domains; do not return a suggestion.\n return undefined;\n }\n else {\n // The email address closely matches one of the supplied domains; return a suggestion\n return {\n address: email.address,\n domain: closestDomain,\n full: email.address + '@' + closestDomain,\n };\n }\n }\n // The email address does not closely match one of the supplied domains\n const closestSecondLevelDomain = find_closest_domain_1.default({\n domain: email.secondLevelDomain,\n domains: secondLevelDomains,\n distanceFunction,\n threshold: opts.secondLevelThreshold,\n });\n const closestTopLevelDomain = find_closest_domain_1.default({\n domain: email.topLevelDomain,\n domains: topLevelDomains,\n distanceFunction,\n threshold: opts.topLevelThreshold,\n });\n if (email.domain) {\n closestDomain = email.domain;\n let rtrn = false;\n if (closestSecondLevelDomain &&\n closestSecondLevelDomain != email.secondLevelDomain) {\n // The email address may have a mispelled second-level domain; return a suggestion\n closestDomain = closestDomain.replace(email.secondLevelDomain, closestSecondLevelDomain);\n rtrn = true;\n }\n if (closestTopLevelDomain &&\n closestTopLevelDomain != email.topLevelDomain &&\n email.secondLevelDomain !== '') {\n // The email address may have a mispelled top-level domain; return a suggestion\n closestDomain = closestDomain.replace(new RegExp(email.topLevelDomain + '$'), closestTopLevelDomain);\n rtrn = true;\n }\n if (rtrn) {\n return {\n address: email.address,\n domain: closestDomain,\n full: email.address + '@' + closestDomain,\n };\n }\n }\n /* The email address exactly matches one of the supplied domains, does not closely\n * match any domain and does not appear to simply have a mispelled top-level domain,\n * or is an invalid email address; do not return a suggestion.\n */\n return undefined;\n}\nexports.default = suggestEmail;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nfunction sift3Distance(s1, s2) {\n // sift3: http://siderite.blogspot.com/2007/04/super-fast-and-accurate-string-distance.html\n if (s1 == null || s1.length === 0) {\n if (s2 == null || s2.length === 0) {\n return 0;\n }\n else {\n return s2.length;\n }\n }\n if (s2 == null || s2.length === 0) {\n return s1.length;\n }\n let c = 0;\n let offset1 = 0;\n let offset2 = 0;\n let lcs = 0;\n const maxOffset = 5;\n while (c + offset1 < s1.length && c + offset2 < s2.length) {\n if (s1.charAt(c + offset1) == s2.charAt(c + offset2)) {\n lcs++;\n }\n else {\n offset1 = 0;\n offset2 = 0;\n for (let i = 0; i < maxOffset; i++) {\n if (c + i < s1.length && s1.charAt(c + i) == s2.charAt(c)) {\n offset1 = i;\n break;\n }\n if (c + i < s2.length && s1.charAt(c) == s2.charAt(c + i)) {\n offset2 = i;\n break;\n }\n }\n }\n c++;\n }\n return (s1.length + s2.length) / 2 - lcs;\n}\nexports.default = sift3Distance;\n", "\"use strict\";\n// Default configuration options\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.POPULAR_TLDS = exports.POPULAR_DOMAINS = exports.DEFAULT_CONFIG = void 0;\nconst sift3_distance_1 = __importDefault(require(\"../fuzzy-detection/sift3-distance\"));\n/***\n * Default list of popular emails for 2022 and onwards.\n * https://www.mailmunch.com/blog/best-email-service-providers\n *\n * If you find a domain you want to add, please submit a PR.\n * Also, notice that this list is not exhaustive.\n * You can always pass your own list of domains.\n */\nconst POPULAR_DOMAINS = [\n 'msn.com',\n 'bellsouth.net',\n 'telus.net',\n 'comcast.net',\n 'optusnet.com.au',\n 'earthlink.net',\n 'qq.com',\n 'sky.com',\n 'icloud.com',\n 'sympatico.ca',\n 'googlemail.com',\n 'att.net',\n 'xtra.co.nz',\n 'web.de',\n 'cox.net',\n 'gmail.com',\n 'ymail.com',\n 'aim.com',\n 'rogers.com',\n 'verizon.net',\n 'rocketmail.com',\n 'optonline.net',\n 'sbcglobal.net',\n // aol\n 'aol.com',\n 'aim.com',\n 'me.com',\n 'mailw.com',\n 'btinternet.com',\n 'charter.net',\n 'shaw.ca',\n 'hey.com',\n // Proton\n 'proton.me',\n 'pm.com',\n 'protonmail.com',\n 'zoho.com',\n 'yandex.com',\n 'titan.email',\n];\nexports.POPULAR_DOMAINS = POPULAR_DOMAINS;\nconst POPULAR_TLDS = [\n 'com',\n 'com.au',\n 'com.tw',\n 'co',\n 'ca',\n 'co.nz',\n 'co.uk',\n 'de',\n 'fr',\n 'it',\n 'ru',\n 'org',\n 'edu',\n 'gov',\n 'jp',\n 'nl',\n 'kr',\n 'se',\n 'eu',\n 'ie',\n 'co.il',\n 'us',\n 'at',\n 'be',\n 'dk',\n 'hk',\n 'es',\n 'gr',\n 'ch',\n 'no',\n 'cz',\n 'net',\n 'net.au',\n 'info',\n 'biz',\n 'mil',\n 'co.jp',\n 'sg',\n 'hu',\n 'uk',\n 'sk',\n // Country specific popular domains\n 'ar',\n 'cf',\n 'cl',\n 'cn',\n 'ga',\n 'gq',\n 'ir',\n 'ml',\n 'mx',\n 'nu',\n 'nz',\n 'ph',\n 'pl',\n 'ro',\n 'tk',\n 'tw',\n 'ua',\n 'vg',\n 'ws',\n 'xn',\n 'za',\n // popular TLDs that startup use in 2022\n // https://thewebsiteflip.com/domains/funded-startup-brands-2021/#:~:text=from%20the%20data.-,1.,TLDs%20for%20the%20foreseeable%20future.\n // https://martijnoud.com/most-popular-tld-crypto/\n 'app',\n 'au',\n 'ai',\n 'biz',\n 'br',\n 'blog',\n 'cloud',\n 'club',\n 'cc',\n 'de',\n 'dev',\n 'digital',\n 'fi',\n 'finance',\n 'id',\n 'in',\n 'io',\n 'me',\n 'mobi',\n 'network',\n 'pw',\n 'so',\n 'xyz',\n 'software',\n 'to',\n 'tech',\n];\nexports.POPULAR_TLDS = POPULAR_TLDS;\nconst DEFAULT_CONFIG = {\n domainThreshold: 2,\n domains: POPULAR_DOMAINS,\n secondLevelThreshold: 2,\n secondLevelDomains: ['yahoo', 'hotmail', 'mail', 'live', 'outlook'],\n topLevelThreshold: 2,\n topLevelDomains: POPULAR_TLDS,\n distanceFunction: sift3_distance_1.default,\n};\nexports.DEFAULT_CONFIG = DEFAULT_CONFIG;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst config_1 = require(\"../config\");\nfunction getOptions(userOptions) {\n return {\n email: userOptions.email,\n domains: userOptions.domains || config_1.DEFAULT_CONFIG.domains,\n topLevelDomains: userOptions.topLevelDomains || config_1.DEFAULT_CONFIG.topLevelDomains,\n secondLevelDomains: userOptions.secondLevelDomains || config_1.DEFAULT_CONFIG.secondLevelDomains,\n distanceFunction: userOptions.distanceFunction || config_1.DEFAULT_CONFIG.distanceFunction,\n domainThreshold: userOptions.domainThreshold || config_1.DEFAULT_CONFIG.domainThreshold,\n secondLevelThreshold: userOptions.secondLevelThreshold || config_1.DEFAULT_CONFIG.secondLevelThreshold,\n topLevelThreshold: userOptions.topLevelThreshold || config_1.DEFAULT_CONFIG.topLevelThreshold,\n suggested: userOptions.suggested || undefined,\n empty: userOptions.suggested || undefined,\n };\n}\nexports.default = getOptions;\n", "\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst assert_valid_user_options_1 = __importDefault(require(\"./helpers/assert-valid-user-options\"));\nconst suggest_email_1 = __importDefault(require(\"./suggest-email\"));\nconst get_options_1 = __importDefault(require(\"./helpers/get-options\"));\nfunction run(userOptions) {\n const options = get_options_1.default(userOptions);\n assert_valid_user_options_1.default(options || {});\n const email = suggest_email_1.default(options);\n if (!email && userOptions.empty) {\n userOptions.empty();\n }\n if (email && userOptions.suggested) {\n userOptions.suggested(email);\n }\n return email;\n}\nexports.default = run;\n", "\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.POPULAR_TLDS = exports.POPULAR_DOMAINS = exports.run = void 0;\nconst run_1 = __importDefault(require(\"./lib/run\"));\nexports.run = run_1.default;\nconst config_1 = require(\"./lib/config\");\nObject.defineProperty(exports, \"POPULAR_DOMAINS\", { enumerable: true, get: function () { return config_1.POPULAR_DOMAINS; } });\nObject.defineProperty(exports, \"POPULAR_TLDS\", { enumerable: true, get: function () { return config_1.POPULAR_TLDS; } });\nconst MailSpellChecker = {\n run: run_1.default,\n POPULAR_DOMAINS: config_1.POPULAR_DOMAINS,\n POPULAR_TLDS: config_1.POPULAR_TLDS,\n};\nexports.default = MailSpellChecker;\n", "import { Fragment, h } from \"preact\"\nimport register from \"./register\"\n\nimport Button from \"./button\"\nimport Card from \"./card\"\nimport Dropdown from \"./dropdown\"\nimport NavMenu from \"./navmenu\"\nimport PromptSearch from \"./promptSearch\"\n\nvar components = [Button, Dropdown, PromptSearch, NavMenu, Card]\n\nexport default function () {\n window.h = h\n window.Fragment = Fragment\n\n components.forEach((c) => {\n register(c, c.tagName, [], { shadow: false })\n })\n}\n", "import { Fragment, cloneElement, h, hydrate, render } from \"preact\"\n//from https://github.com/preactjs/preact-custom-element/blob/e7fed5d745de23991722b3b666dc3bd1d0a08cb7/src/index.js\n// This function is used to register a component with the given tag name.\nexport default function register(Component, tagName, propNames, options) {\n // Create an instance of PreactElement, which extends HTMLElement.\n function PreactElement() {\n const inst = Reflect.construct(HTMLElement, [], PreactElement)\n inst._vdomComponent = Component\n\n // If options for shadow DOM are given, attach a shadow root.\n // Otherwise, assign the instance itself as root.\n inst._root =\n options && options.shadow ? inst.attachShadow({ mode: \"open\" }) : inst\n\n return inst\n }\n\n // Extend the PreactElement from HTMLElement.\n PreactElement.prototype = Object.create(HTMLElement.prototype)\n PreactElement.prototype.constructor = PreactElement\n\n // Assign lifecycle methods to the PreactElement.\n PreactElement.prototype.connectedCallback = function () {\n connectedCallback.call(this, options)\n }\n PreactElement.prototype.attributeChangedCallback = attributeChangedCallback\n PreactElement.prototype.disconnectedCallback = disconnectedCallback\n\n // Assign observed attributes.\n propNames =\n propNames ||\n Component.observedAttributes ||\n Object.keys(Component.propTypes || {})\n PreactElement.observedAttributes = propNames\n\n // Sync DOM properties and Preact props.\n propNames.forEach((name) => {\n Object.defineProperty(PreactElement.prototype, name, {\n get() {\n return this._vdom.props[name]\n },\n set(v) {\n if (this._vdom) {\n this.attributeChangedCallback(name, null, v)\n } else {\n if (!this._props) this._props = {}\n this._props[name] = v\n this.connectedCallback()\n }\n\n // Reflect property changes to attributes if the value is a primitive.\n const type = typeof v\n if (\n v == null ||\n type === \"string\" ||\n type === \"boolean\" ||\n type === \"number\"\n ) {\n this.setAttribute(name, v)\n }\n },\n })\n })\n\n // Define the custom element.\n return customElements.define(\n tagName || Component.tagName || Component.displayName || Component.name,\n PreactElement\n )\n}\n\n// The rest of the functions are utility functions used within the register function.\n\n// This function provides the context for child components.\nfunction ContextProvider(props) {\n this.getChildContext = () => props.context\n // eslint-disable-next-line no-unused-vars\n const { context, children, ...rest } = props\n return cloneElement(children, rest)\n}\n\n// This function is called when the custom element is inserted into the DOM\nfunction connectedCallback(options) {\n // Obtain a reference to the previous context by pinging the nearest\n // higher up node that was rendered with Preact. If one Preact component\n // higher up receives our ping, it will set the `detail` property of\n // our custom event. This works because events are dispatched\n // synchronously.\n const event = new CustomEvent(\"_preact\", {\n detail: {},\n bubbles: true,\n cancelable: true,\n })\n this.dispatchEvent(event)\n const context = event.detail.context\n\n this._vdom = h(\n ContextProvider,\n { ...this._props, context },\n toVdom(this, this._vdomComponent, options)\n )\n ;(this.hasAttribute(\"hydrate\") ? hydrate : render)(this._vdom, this._root)\n}\n\nfunction toCamelCase(str) {\n return str.replace(/-(\\w)/g, (_, c) => (c ? c.toUpperCase() : \"\"))\n}\n\nfunction attributeChangedCallback(name, oldValue, newValue) {\n if (!this._vdom) return\n // Attributes use `null` as an empty value whereas `undefined` is more\n // common in pure JS components, especially with default parameters.\n // When calling `node.removeAttribute()` we'll receive `null` as the new\n // value. See issue #50.\n newValue = newValue == null ? undefined : newValue\n const props = {}\n props[name] = newValue\n props[toCamelCase(name)] = newValue\n this._vdom = cloneElement(this._vdom, props)\n render(this._vdom, this._root)\n}\n\nfunction disconnectedCallback() {\n render((this._vdom = null), this._root)\n}\n\n/**\n * Pass an event listener to each `` that \"forwards\" the current\n * context value to the rendered child. The child will trigger a custom\n * event, where will add the context value to. Because events work\n * synchronously, the child can immediately pull of the value right\n * after having fired the event.\n */\n// This function provides a slot for context propagation.\nfunction Slot(props, context) {\n const ref = (r) => {\n if (!r) {\n this.ref.removeEventListener(\"_preact\", this._listener)\n } else {\n this.ref = r\n if (!this._listener) {\n this._listener = (event) => {\n event.stopPropagation()\n event.detail.context = context\n }\n r.addEventListener(\"_preact\", this._listener)\n }\n }\n }\n return h(\"slot\", { ...props, ref })\n}\n\n// This function provides a pseudo-slot for context propagation without shadow dom.\nfunction PseudoSlot(props, context) {\n const ref = (r) => {\n if (!r) {\n this.ref.removeEventListener(\"_preact\", this._listener)\n } else {\n this.ref = r\n if (!this._listener) {\n this._listener = (event) => {\n event.stopPropagation()\n event.detail.context = context\n }\n r.addEventListener(\"_preact\", this._listener)\n }\n }\n }\n return h(Fragment, { ...props, ref })\n}\n\n// This function converts DOM elements to virtual DOM.\nfunction toVdom(element, nodeName, options) {\n if (element.nodeType === 3) return element.data\n if (element.nodeType !== 1) return null\n let children = [],\n props = {},\n i = 0,\n a = element.attributes,\n cn = element.childNodes\n for (i = a.length; i--; ) {\n if (a[i].name !== \"slot\") {\n props[a[i].name] = a[i].value\n props[toCamelCase(a[i].name)] = a[i].value\n }\n }\n\n for (i = cn.length; i--; ) {\n const vnode = toVdom(cn[i], null, options)\n // Move slots correctly\n const name = cn[i].slot\n if (name) {\n props[name] = h(Slot, { name }, vnode)\n } else {\n children[i] = vnode\n }\n }\n\n // Only wrap the topmost node with a slot\n\n const wrappedChildren = nodeName\n ? h(options && options.shadow === false ? PseudoSlot : Slot, null, children)\n : children\n\n // Remove all children from the topmost node in non-shadow mode\n if (options && options.shadow === false && nodeName) {\n element.innerHTML = \"\"\n }\n return h(nodeName || element.nodeName.toLowerCase(), props, wrappedChildren)\n}\n", "function Button(props) {\n var colors = {\n blue: \"bg-blue-500 hover:bg-blue-700\",\n red: \"bg-red-500 hover:bg-red-700\",\n green: \"bg-green-500 hover:bg-green-700\",\n }\n var color = colors[props.color] || colors.green\n return \n}\n\nButton.tagName = \"t-button\"\nexport default Button\n", "function Card(props) {\n const imgeUrl = props.image ? `url(${props.image})` : \"\"\n backgroundImageStyle = {\n backgroundImage: `linear-gradient(185deg, rgba(196, 204, 255, 0.52), rgba(117, 19, 93, 0.73)), ${imgeUrl}`,\n backgroundSize: \"cover\",\n backgroundPosition: \"center\",\n backgroundRepeat: \"no-repeat\",\n height: \"150px\",\n }\n\n const image = (\n \n \n
    \n
    \n {props.title}\n
    \n

    {props.description}

    \n
    \n
    \n
    \n \n )\n return (\n
    \n {image}\n
    \n

    {props.start}

    \n \n {props.buttonText}\n \n \n \n \n
    \n
    \n )\n}\n\nCard.tagName = \"t-card\"\nexport default Card\n", "import { useRef, useState } from \"preact/hooks\"\nimport { Popover } from \"react-tiny-popover\"\n\nfunction Dropdown() {\n const wrapperRef = useRef(null)\n var [open, setOpen] = useState(false)\n function toggle() {\n setOpen(!open)\n }\n function close() {\n setOpen(false)\n }\n\n return (\n
    \n \n {this.props.button}\n \n
    \n )\n}\nDropdown.tagName = \"t-dropdown\"\n\nexport default Dropdown\n", "import { useEffect, useState } from \"preact/hooks\"\nimport Dropdown from \"./dropdown\"\nfunction NavMenu(props) {\n ;[links, setLinks] = useState([])\n useEffect(() => {\n links = JSON.parse(document.getElementById(props.dataid).textContent)\n setLinks(links)\n }, [])\n\n const button = (\n \n )\n const menu = (\n
    \n {links.map((link) => (\n \n {link.title}\n \n ))}\n
    \n )\n return (\n <>\n
    \n {links.map((link) => (\n \n {link.title}\n \n ))}\n
    \n
    \n \n
    \n \n )\n}\n\nNavMenu.tagName = \"t-navmenu\"\n\nexport default NavMenu\n", "import { useEffect, useState } from \"preact/hooks\"\n\nfunction Tag(props) {\n return (\n props.onClick(props.tag)}\n type=\"button\"\n class=\"mr-2 mt-1 inline-flex items-center rounded-full bg-tyellow px-3 py-1 text-xs font-medium leading-4 text-gray-700\"\n >\n {props.tag}\n \n )\n}\n\nfunction Prompt(props) {\n const tags = props.tags.map((tag) => (\n \n ))\n return (\n
  • \n
    {props.prompt}
    \n {tags}\n
  • \n )\n}\n\nfunction PromptSearch(props) {\n const [search, setSearch] = useState(\"\")\n const [items, setItems] = useState([])\n const [tags, setTags] = useState([])\n const [uf, setUf] = useState(null)\n const [haystack, setHaystack] = useState([])\n const [data, setData] = useState([])\n useEffect(() => {\n let opts = { outOfOrder: false }\n let uf = new uFuzzy(opts)\n let data = JSON.parse(document.getElementById(props.dataid).textContent)\n let haystack = data.map((r) => `${r.prompt} ${r.tags.join(\" \")}`)\n let tags = [...new Set(data.map((r) => r.tags).flat())].sort()\n setUf(uf)\n setHaystack(haystack)\n setTags(tags)\n setData(data)\n setItems(data)\n }, [])\n function updateSearch(search) {\n if (search === \"\") {\n setItems(data)\n } else {\n let [idxs, info, order] = uf.search(haystack, search)\n if (order) {\n setItems(order.map((i) => idxs.map((i) => data[i])[i]))\n }\n }\n setSearch(search)\n }\n const tagsList = tags.map((tag) => (\n \n ))\n const prompts = items.map((item) => (\n \n ))\n return (\n
    \n
    \n
    \n \n \n \n
    \n updateSearch(e.target.value)}\n class=\"block w-full rounded-lg border border-gray-300 bg-gray-50 p-4 pl-10 text-sm text-gray-900 focus:border-blue-500 focus:ring-blue-500 \"\n placeholder=\"Search prompts...\"\n required\n />\n
    \n {tagsList}\n
      {prompts}
    \n
    \n )\n}\n\nPromptSearch.tagName = \"t-promptsearch\"\n\nexport default PromptSearch\n", "import emailSpellChecker from \"@zootools/email-spell-checker\"\n\nfunction debounce(func, timeout = 300) {\n let timer\n return (...args) => {\n clearTimeout(timer)\n timer = setTimeout(() => {\n func.apply(this, args)\n }, timeout)\n }\n}\n\nfunction init() {\n document.querySelectorAll(\"input[type=email]\").forEach((input) => {\n function clearAlert(e) {\n const alert = e.target.parentElement.querySelector(\n \".email-alert-dismissible\"\n )\n if (alert) {\n alert.remove()\n }\n }\n const myScript = (e) => {\n const email = e.target.value.trim()\n const suggestedEmail = emailSpellChecker.run({\n email,\n })\n clearAlert(e)\n if (!suggestedEmail) {\n return\n }\n const message = ``\n const alert = document.createElement(\"div\")\n alert.classList.add(\"email-alert-dismissible\")\n alert.innerHTML = message\n alert.onclick = (_) => {\n clearAlert(e)\n input.value = suggestedEmail.full\n }\n input.after(alert)\n }\n input.addEventListener(\"keyup\", debounce(myScript))\n })\n}\n\nexport default init\n", "export default function () {\n // Timezone settings. See TimezoneMiddleware in utils/middleware.py\n // If timezone isn't set, refresh page.\n const timezone = Intl.DateTimeFormat().resolvedOptions().timeZone // e.g. \"America/New_York\"\n const hasZimzone = document.cookie\n .split(\";\")\n .some((item) => item.trim().startsWith(\"totem_timezone=\"))\n if (timezone && !hasZimzone) {\n document.cookie = `totem_timezone=${timezone}; SameSite=Strict`\n location.reload()\n }\n}\n", "var logger = (function () {\n var oldConsoleLog = null\n var pub = {}\n\n pub.enableLogger = function enableLogger() {\n if (oldConsoleLog == null) return\n\n window[\"console\"][\"log\"] = oldConsoleLog\n }\n\n pub.disableLogger = function disableLogger() {\n oldConsoleLog = console.log\n window[\"console\"][\"log\"] = function () {}\n }\n\n return pub\n})()\n\nfunction init(debug) {\n if (debug === true) logger.enableLogger()\n else logger.disableLogger()\n}\n\nexport default init\n", "import components from \"./components\"\nimport emailSpellChecker from \"./emailSpellCheck\"\nimport timezoneDetect from \"./timezone\"\n\nimport logger from \"./logger\"\n\ndismiss_alert = function (e) {\n e.closest(\".alert-dismissible\").remove()\n}\n\ncomponents()\ntimezoneDetect()\nwindow.addEventListener(\"DOMContentLoaded\", () => {\n emailSpellChecker()\n})\n\nlogger(window.TOTEM_DATA.debug)\n"], + "mappings": "qqBAWO,SAASA,EAAOC,EAAKC,EAAAA,CAE3B,QAASC,KAAKD,EAAOD,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,IAAK,CAChC,GAAIL,EAAIK,EAAIP,EAAG,QAAUA,EAAG,OAAOE,EAAIK,CAAC,GAAKN,EAAG,OAAOC,CAAC,EAAG,CACvDC,EAAUI,EACV,KACJ,CACA,GAAIL,EAAIK,EAAIN,EAAG,QAAUD,EAAG,OAAOE,CAAC,GAAKD,EAAG,OAAOC,EAAIK,CAAC,EAAG,CACvDH,EAAUG,EACV,KACJ,CACJ,CACJ,CACAL,GACJ,CACA,OAAQF,EAAG,OAASC,EAAG,QAAU,EAAII,CACzC,CACAP,GAAQ,QAAUC,KC1ClB,IAAAS,GAAAC,EAAAC,GAAA,cAEA,IAAIC,GAAmBD,GAAQA,EAAK,iBAAoB,SAAUE,EAAK,CACnE,OAAQA,GAAOA,EAAI,WAAcA,EAAM,CAAE,QAAWA,CAAI,CAC5D,EACA,OAAO,eAAeF,EAAS,aAAc,CAAE,MAAO,EAAK,CAAC,EAC5DA,EAAQ,aAAeA,EAAQ,gBAAkBA,EAAQ,eAAiB,OAC1E,IAAMG,GAAmBF,GAAgB,IAA4C,EAS/EG,GAAkB,CACpB,UACA,gBACA,YACA,cACA,kBACA,gBACA,SACA,UACA,aACA,eACA,iBACA,UACA,aACA,SACA,UACA,YACA,YACA,UACA,aACA,cACA,iBACA,gBACA,gBAEA,UACA,UACA,SACA,YACA,iBACA,cACA,UACA,UAEA,YACA,SACA,iBACA,WACA,aACA,aACJ,EACAJ,EAAQ,gBAAkBI,GAC1B,IAAMC,GAAe,CACjB,MACA,SACA,SACA,KACA,KACA,QACA,QACA,KACA,KACA,KACA,KACA,MACA,MACA,MACA,KACA,KACA,KACA,KACA,KACA,KACA,QACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,MACA,SACA,OACA,MACA,MACA,QACA,KACA,KACA,KACA,KAEA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KAIA,MACA,KACA,KACA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AAc,KAAK,EAC1CA,EAAM,UAAU,IAAI,yBAAyB,EAC7CA,EAAM,UAAYK,EAClBL,EAAM,QAAWM,GAAM,CACrBR,EAAWC,CAAC,EACZF,EAAM,MAAQM,EAAe,IAC/B,EACAN,EAAM,MAAMG,CAAK,CACnB,EACAH,EAAM,iBAAiB,QAASN,GAASU,CAAQ,CAAC,CACpD,CAAC,CACH,CAEA,IAAOM,GAAQX,GC7CA,SAARY,IAAoB,CAGzB,IAAMC,EAAW,KAAK,eAAe,EAAE,gBAAgB,EAAE,SACnDC,EAAa,SAAS,OACzB,MAAM,GAAG,EACT,KAAMC,GAASA,EAAK,KAAK,EAAE,WAAW,iBAAiB,CAAC,EACvDF,GAAY,CAACC,IACf,SAAS,OAAS,kBAAkBD,CAAQ,oBAC5C,SAAS,OAAO,EAEpB,CCXA,IAAIG,GAAU,UAAY,CACxB,IAAIC,EAAgB,KAChBC,EAAM,CAAC,EAEX,OAAAA,EAAI,aAAe,UAAwB,CACrCD,GAAiB,OAErB,OAAO,QAAW,IAASA,EAC7B,EAEAC,EAAI,cAAgB,UAAyB,CAC3CD,EAAgB,QAAQ,IACxB,OAAO,QAAW,IAAS,UAAY,CAAC,CAC1C,EAEOC,CACT,EAAG,EAEH,SAASC,GAAKC,EAAO,CACfA,IAAU,GAAMJ,GAAO,aAAa,EACnCA,GAAO,cAAc,CAC5B,CAEA,IAAOK,GAAQF,GCjBf,cAAgB,SAAU,EAAG,CAC3B,EAAE,QAAQ,oBAAoB,EAAE,OAAO,CACzC,EAEAG,GAAW,EACXC,GAAe,EACf,OAAO,iBAAiB,mBAAoB,IAAM,CAChDC,GAAkB,CACpB,CAAC,EAEDC,GAAO,OAAO,WAAW,KAAK", "names": ["assign", "obj", "props", "i", "removeNode", "node", "parentNode", "removeChild", "createElement", "type", "children", "key", "ref", "normalizedProps", "arguments", "length", "slice", "call", "defaultProps", "createVNode", "original", "vnode", "__k", "__", "__b", "__e", "__d", "__c", "__h", "constructor", "__v", "vnodeId", "options", "createRef", "current", "Fragment", "Component", "context", "this", "getDomSibling", "childIndex", "indexOf", "sibling", "updateParentDomPointers", "child", "base", "enqueueRender", "c", "rerenderQueue", "push", "process", "prevDebounce", "debounceRendering", "defer", "renderQueueLength", "component", "commitQueue", "refQueue", "oldVNode", "oldDom", "parentDom", "sort", "depthSort", "shift", "__P", "diff", "ownerSVGElement", "commitRoot", "diffChildren", "renderResult", "newParentVNode", "oldParentVNode", "globalContext", "isSvg", "excessDomChildren", "isHydrating", "j", "childVNode", "newDom", "firstChildDom", "skewedIndex", "matchingIndex", "isMounting", "skew", "oldChildren", "EMPTY_ARR", "oldChildrenLength", "remainingOldChildren", "newChildrenLength", "isArray", "findMatchingIndex", "EMPTY_OBJ", "applyRef", "nextSibling", "placeChild", "reorderChildren", "unmount", "tmp", "toChildArray", "out", "some", "insertBefore", "x", "y", "diffProps", "dom", "newProps", "oldProps", "hydrate", "setProperty", "setStyle", "style", "value", "IS_NON_DIMENSIONAL", "test", "name", "oldValue", "useCapture", "o", "cssText", "replace", "toLowerCase", "l", "_attached", "Date", "now", "addEventListener", "eventProxyCapture", "eventProxy", "removeEventListener", "e", "removeAttribute", "setAttribute", "eventHandler", "_dispatched", "event", "newVNode", "isNew", "oldState", "snapshot", "clearProcessingException", "provider", "componentContext", "renderHook", "count", "newType", "outer", "contextType", "__E", "prototype", "render", "doRender", "sub", "state", "__n", "_sb", "__s", "getDerivedStateFromProps", "componentWillMount", "componentDidMount", "componentWillReceiveProps", "shouldComponentUpdate", "forEach", "componentWillUpdate", "componentDidUpdate", "__r", "getChildContext", "getSnapshotBeforeUpdate", "diffElementNodes", "diffed", "root", "cb", "oldHtml", "newHtml", "nodeType", "localName", "document", "createTextNode", "createElementNS", "is", "data", "childNodes", "dangerouslySetInnerHTML", "attributes", "__html", "innerHTML", "checked", "parentVNode", "skipRemove", "r", "componentWillUnmount", "replaceNode", "firstChild", "cloneElement", "createContext", "defaultValue", "contextId", "Consumer", "contextValue", "Provider", "subs", "ctx", "_props", "old", "splice", "isValidElement", "Array", "error", "errorInfo", "ctor", "handled", "getDerivedStateFromError", "setState", "componentDidCatch", "update", "callback", "s", "forceUpdate", "Promise", "then", "bind", "resolve", "setTimeout", "a", "b", "getHookState", "index", "type", "options", "__h", "currentComponent", "currentHook", "hooks", "__H", "__", "length", "push", "__V", "EMPTY", "useState", "initialState", "useReducer", "invokeOrReturn", "reducer", "init", "hookState", "currentIndex", "_reducer", "__c", "action", "currentValue", "__N", "nextValue", "setState", "_hasScuFromHooks", "updateHookState", "p", "s", "c", "stateHooks", "filter", "x", "every", "prevScu", "call", "this", "shouldUpdate", "forEach", "hookItem", "props", "shouldComponentUpdate", "prevCWU", "componentWillUpdate", "__e", "tmp", "useEffect", "callback", "args", "state", "__s", "argsChanged", "_pendingArgs", "useLayoutEffect", "useRef", "initialValue", "useMemo", "current", "useImperativeHandle", "ref", "createHandle", "concat", "factory", "useCallback", "useContext", "context", "provider", "sub", "value", "useDebugValue", "formatter", "useErrorBoundary", "cb", "errState", "componentDidCatch", "err", "errorInfo", "undefined", "useId", "root", "__v", "__m", "mask", "flushAfterPaintEffects", "component", "afterPaintEffects", "shift", "__P", "invokeCleanup", "invokeEffect", "e", "afterNextFrame", "raf", "done", "clearTimeout", "timeout", "HAS_RAF", "cancelAnimationFrame", "setTimeout", "requestAnimationFrame", "hook", "comp", "cleanup", "oldArgs", "newArgs", "some", "arg", "f", "previousComponent", "prevRaf", "oldBeforeDiff", "oldBeforeRender", "oldAfterDiff", "oldCommit", "oldBeforeUnmount", "__b", "__r", "diffed", "unmount", "vnode", "commitQueue", "hasErrored", "createVNode", "type", "props", "key", "isStaticChildren", "__source", "__self", "ref", "i", "normalizedProps", "vnode", "__k", "__", "__b", "__e", "__d", "__c", "__h", "constructor", "__v", "vnodeId", "defaultProps", "options", "jsx_runtime_exports", "__export", "k", "o", "init_jsx_runtime", "__esmMin", "init_jsxRuntime_module", "assign", "obj", "props", "i", "shallowDiffers", "a", "b", "is", "x", "y", "PureComponent", "p", "this", "memo", "c", "comparer", "shouldUpdate", "nextProps", "ref", "updateRef", "call", "current", "Memoed", "shouldComponentUpdate", "createElement", "displayName", "name", "prototype", "isReactComponent", "forwardRef", "fn", "Forwarded", "clone", "$$typeof", "REACT_FORWARD_SYMBOL", "render", "__f", "detachedClone", "vnode", "detachedParent", "parentDom", "__c", "forEach", "effect", "__H", "__P", "__k", "map", "child", "removeOriginal", "originalParent", "__e", "insertBefore", "__d", "Suspense", "_suspenders", "__b", "suspended", "component", "__", "__a", "lazy", "loader", "prom", "error", "Lazy", "then", "exports", "default", "e", "SuspenseList", "_next", "_map", "ContextProvider", "getChildContext", "context", "children", "Portal", "_this", "container", "_container", "componentWillUnmount", "_temp", "nodeType", "parentNode", "childNodes", "appendChild", "push", "before", "removeChild", "splice", "indexOf", "__v", "createPortal", "el", "containerInfo", "parent", "callback", "textContent", "preactRender", "hydrate", "preactHydrate", "empty", "isPropagationStopped", "cancelBubble", "isDefaultPrevented", "defaultPrevented", "createFactory", "type", "bind", "isValidElement", "element", "REACT_ELEMENT_TYPE", "isFragment", "Fragment", "cloneElement", "preactCloneElement", "apply", "arguments", "unmountComponentAtNode", "findDOMNode", "base", "startTransition", "cb", "useDeferredValue", "val", "useTransition", "useSyncExternalStore", "subscribe", "getSnapshot", "value", "useState", "_instance", "_getSnapshot", "_useState", "forceUpdate", "useLayoutEffect", "useEffect", "oldDiffHook", "mapFn", "Children", "oldCatchError", "oldUnmount", "resolve", "CAMEL_PROPS", "ON_ANI", "CAMEL_REPLACE", "IS_DOM", "onChangeInputType", "oldEventHook", "currentComponent", "classNameDescriptorNonEnumberable", "oldVNodeHook", "oldBeforeRender", "oldDiffed", "__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED", "version", "unstable_batchedUpdates", "flushSync", "StrictMode", "useInsertionEffect", "isElement", "index", "Component", "isPureReactComponent", "state", "options", "Symbol", "for", "toChildArray", "count", "length", "only", "normalized", "toArray", "newVNode", "oldVNode", "errorInfo", "unmount", "__R", "__h", "promise", "suspendingVNode", "suspendingComponent", "resolved", "onResolved", "onSuspensionComplete", "__u", "suspendedVNode", "setState", "pop", "wasHydrating", "document", "detachedComponent", "__O", "fallback", "list", "node", "delete", "revealOrder", "size", "delegated", "get", "unsuspend", "wrappedUnsuspend", "Map", "reverse", "set", "componentDidUpdate", "componentDidMount", "test", "key", "Object", "defineProperty", "configurable", "v", "writable", "event", "persist", "nativeEvent", "enumerable", "class", "normalizedProps", "lowerCased", "toLowerCase", "replace", "multiple", "Array", "isArray", "selected", "defaultValue", "className", "__r", "diffed", "dom", "ReactCurrentDispatcher", "readContext", "__n", "arg", "useId", "useReducer", "useRef", "useImperativeHandle", "useMemo", "useCallback", "useContext", "useDebugValue", "createContext", "createRef", "react_exports", "__export", "O", "b", "k", "w", "yn", "U", "V", "ln", "hn", "G", "y", "fn", "z", "_", "wn", "dn", "mn", "J", "Cn", "sn", "an", "M", "x", "_n", "vn", "pn", "T", "q", "bn", "p", "P", "A", "gn", "F", "s", "h", "En", "Sn", "cn", "init_react", "__esmMin", "init_compat_module", "react_dom_exports", "__export", "O", "b", "k", "w", "yn", "U", "V", "ln", "hn", "G", "y", "fn", "z", "_", "wn", "dn", "mn", "J", "Cn", "sn", "an", "M", "x", "_n", "vn", "pn", "T", "q", "bn", "p", "P", "A", "gn", "F", "s", "h", "En", "Sn", "cn", "init_react_dom", "__esmMin", "init_compat_module", "react_1", "react_dom_1", "PopoverPortal", "_a", "container", "element", "scoutElement", "children", "exports", "exports", "rectsAreEqual", "rectA", "rectB", "createContainer", "containerStyle", "containerClassName", "container", "popoverRectForPosition", "position", "childRect", "popoverRect", "padding", "align", "targetMidX", "targetMidY", "width", "height", "top", "left", "getNewPopoverRect", "_a", "boundaryInset", "boundaryRect", "reposition", "rect", "boundaryViolation", "getNudgedPopoverRect", "topBoundary", "leftBoundary", "rightBoundary", "bottomBoundary", "react_1", "util_1", "useElementRef", "containerClassName", "containerStyle", "ref", "element", "exports", "react_1", "util_1", "useElementRef_1", "POPOVER_STYLE", "SCOUT_STYLE", "usePopover", "_a", "isOpen", "childRef", "positions", "containerClassName", "parentElement", "contentLocation", "align", "padding", "reposition", "boundaryInset", "boundaryElement", "onPositionPopover", "popoverRef", "scoutRef", "positionPopover", "_d", "_e", "positionIndex", "_f", "parentRect", "_g", "childRect", "_b", "_h", "scoutRect", "_c", "_j", "popoverRect", "_k", "boundaryRect", "_l", "inputTop", "inputLeft", "left_1", "top_1", "isExhausted", "position", "_m", "rect", "boundaryViolation", "top", "left", "width", "height", "shouldNudge", "_o", "nudgedLeft", "nudgedTop", "finalTop", "finalLeft", "potentialViolations", "exports", "react_1", "useMemoizedArray", "externalArray", "prevArrayRef", "array", "i", "exports", "react_1", "useArrowContainer", "_a", "childRect", "popoverRect", "position", "arrowSize", "arrowColor", "arrowContainerStyle", "arrowStyle", "__assign", "arrowWidth", "top", "left", "lowerBound", "leftUpperBound", "topUpperBound", "exports", "react_1", "useArrowContainer_1", "ArrowContainer", "_a", "childRect", "popoverRect", "position", "arrowColor", "arrowSize", "arrowClassName", "externalArrowStyle", "className", "children", "externalArrowContainerStyle", "_b", "arrowContainerStyle", "arrowStyle", "mergedContainerStyle", "__assign", "mergedArrowStyle", "jsx_runtime_1", "exports", "react_1", "PopoverPortal_1", "util_1", "usePopover_1", "exports", "useMemoizedArray_1", "useArrowContainer_1", "ArrowContainer_1", "DEFAULT_POSITIONS", "PopoverInternal", "_a", "externalRef", "isOpen", "children", "content", "_b", "externalPositions", "_c", "align", "_d", "padding", "_e", "reposition", "_f", "parentElement", "_g", "boundaryElement", "_h", "containerClassName", "containerStyle", "contentLocation", "_j", "boundaryInset", "onClickOutside", "_k", "clickOutsideCapture", "positions", "prevIsOpen", "prevPositions", "prevContentLocation", "prevReposition", "childRef", "_l", "popoverState", "setPopoverState", "onPositionPopover", "_m", "positionPopover", "popoverRef", "scoutRef", "shouldUpdate", "updatePopover", "childRect", "popoverRect", "popoverElement", "key", "handleOnClickOutside", "e", "handleWindowResize", "body", "handleRef", "node", "renderChild", "renderPopover", "jsx_runtime_1", "__assign", "props", "ref", "require_assert", "__commonJSMin", "exports", "assert", "condition", "message", "require_assert_valid_user_options", "__commonJSMin", "exports", "__importDefault", "mod", "assert_1", "assertValidUserOptions", "options", "require_encode_email", "__commonJSMin", "exports", "encodeEmail", "email", "require_find_closest_domain", "__commonJSMin", "exports", "findClosestDomain", "opts", "domain", "domains", "distanceFunction", "threshold", "dist", "minDist", "closestDomain", "i", "require_trim", "__commonJSMin", "exports", "WHITESPACE_PATTERN", "trim", "str", "right", "left", "i", "require_parse_email", "__commonJSMin", "exports", "__importDefault", "mod", "trim_1", "MINIUM_EMAIL_PARTS", "parseEmail", "emailStr", "parts", "i", "sld", "tld", "domain", "domainParts", "j", "require_suggest_email", "__commonJSMin", "exports", "__importDefault", "mod", "encode_email_1", "find_closest_domain_1", "parse_email_1", "suggestEmail", "opts", "encodedEmail", "email", "domains", "domainThreshold", "distanceFunction", "secondLevelDomains", "topLevelDomains", "closestDomain", "closestSecondLevelDomain", "closestTopLevelDomain", "rtrn", "require_sift3_distance", "__commonJSMin", "exports", "sift3Distance", "s1", "s2", "c", "offset1", "offset2", "lcs", "maxOffset", "i", "require_config", "__commonJSMin", "exports", "__importDefault", "mod", "sift3_distance_1", "POPULAR_DOMAINS", "POPULAR_TLDS", "DEFAULT_CONFIG", "require_get_options", "__commonJSMin", "exports", "config_1", "getOptions", "userOptions", "require_run", "__commonJSMin", "exports", "__importDefault", "mod", "assert_valid_user_options_1", "suggest_email_1", "get_options_1", "run", "userOptions", "options", "email", "require_dist", "__commonJSMin", "exports", "__importDefault", "mod", "run_1", "config_1", "MailSpellChecker", "init_preact_module", "init_preact_module", "register", "Component", "tagName", "propNames", "options", "PreactElement", "inst", "connectedCallback", "attributeChangedCallback", "disconnectedCallback", "name", "v", "type", "ContextProvider", "props", "context", "children", "rest", "F", "event", "y", "toVdom", "E", "B", "toCamelCase", "str", "_", "c", "oldValue", "newValue", "Slot", "r", "PseudoSlot", "k", "element", "nodeName", "a", "cn", "vnode", "wrappedChildren", "Button", "props", "colors", "color", "button_default", "Card", "props", "imgeUrl", "image", "card_default", "init_hooks_module", "import_react_tiny_popover", "Dropdown", "wrapperRef", "_", "open", "setOpen", "h", "toggle", "close", "dropdown_default", "init_hooks_module", "NavMenu", "props", "h", "p", "button", "menu", "link", "dropdown_default", "navmenu_default", "init_hooks_module", "Tag", "props", "Prompt", "tags", "tag", "PromptSearch", "search", "setSearch", "h", "items", "setItems", "setTags", "uf", "setUf", "haystack", "setHaystack", "data", "setData", "p", "opts", "r", "updateSearch", "idxs", "info", "order", "i", "tagsList", "prompts", "item", "e", "promptSearch_default", "components", "button_default", "dropdown_default", "promptSearch_default", "navmenu_default", "card_default", "components_default", "y", "k", "c", "register", "import_email_spell_checker", "debounce", "func", "timeout", "timer", "args", "init", "input", "clearAlert", "e", "alert", "myScript", "email", "suggestedEmail", "emailSpellChecker", "message", "_", "emailSpellCheck_default", "timezone_default", "timezone", "hasZimzone", "item", "logger", "oldConsoleLog", "pub", "init", "debug", "logger_default", "components_default", "timezone_default", "emailSpellCheck_default", "logger_default"] } diff --git a/totem/templates/utils/avatar.html b/totem/templates/utils/avatar.html index 31dff4a1..c2f0fac2 100644 --- a/totem/templates/utils/avatar.html +++ b/totem/templates/utils/avatar.html @@ -5,12 +5,12 @@ src="{{ image.url }}" alt="{{ name }}" title="{{ name }}" - class="rounded-full {{ classes }}"> + class="rounded-full bg-tcreme p-0.5 {{ classes }}"> {% else %} {{ name }} + class="rounded-full bg-tcreme p-0.5 {{ classes }}"> {% endif %}