(()=>{"use strict";var e={d:(n,t)=>{for(var _ in t)e.o(t,_)&&!e.o(n,_)&&Object.defineProperty(n,_,{enumerable:!0,get:t[_]})},o:(e,n)=>Object.prototype.hasOwnProperty.call(e,n),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},n={};e.r(n),e.d(n,{Component:()=>m,Fragment:()=>y,cloneElement:()=>W,createContext:()=>L,createElement:()=>d,createFactory:()=>Be,createPortal:()=>Ue,createRef:()=>v,forwardRef:()=>Ce,h:()=>d,hydrate:()=>M,isValidElement:()=>o,memo:()=>be,options:()=>_,render:()=>F,renderToString:()=>ln,toChildArray:()=>w,useCallback:()=>le,useContext:()=>ue,useDebugValue:()=>ce,useEffect:()=>te,useErrorBoundary:()=>ae,useImperativeHandle:()=>oe,useLayoutEffect:()=>_e,useMemo:()=>ie,useReducer:()=>ne,useRef:()=>re,useState:()=>ee});var t,_,r,o,i,l,u,c={},a=[],f=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function s(e,n){for(var t in n)e[t]=n[t];return e}function p(e){var n=e.parentNode;n&&n.removeChild(e)}function d(e,n,_){var r,o,i,l={};for(i in n)"key"==i?r=n[i]:"ref"==i?o=n[i]:l[i]=n[i];if(arguments.length>2&&(l.children=arguments.length>3?t.call(arguments,2):_),"function"==typeof e&&null!=e.defaultProps)for(i in e.defaultProps)void 0===l[i]&&(l[i]=e.defaultProps[i]);return h(e,l,r,o,null)}function h(e,n,t,o,i){var l={type:e,props:n,key:t,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==i?++r:i};return null==i&&null!=_.vnode&&_.vnode(l),l}function v(){return{current:null}}function y(e){return e.children}function m(e,n){this.props=e,this.context=n}function g(e,n){if(null==n)return e.__?g(e.__,e.__.__k.indexOf(e)+1):null;for(var t;n0?h(v.type,v.props,v.key,null,v.__v):v)){if(v.__=t,v.__b=t.__b+1,null===(d=x[s])||d&&v.key==d.key&&v.type===d.type)x[s]=void 0;else for(p=0;p2&&(l.children=arguments.length>3?t.call(arguments,2):_),h(e.type,l,r||e.key,o||e.ref,null)}function L(e,n){var t={__c:n="__cC"+u++,__:e,Consumer:function(e,n){return e.children(n)},Provider:function(e){var t,_;return this.getChildContext||(t=[],(_={})[n]=this,this.getChildContext=function(){return _},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&t.some(k)},this.sub=function(e){t.push(e);var n=e.componentWillUnmount;e.componentWillUnmount=function(){t.splice(t.indexOf(e),1),n&&n.call(e)}}),e.children}};return t.Provider.__=t.Consumer.contextType=t}t=a.slice,_={__e:function(e,n,t,_){for(var r,o,i;n=n.__;)if((r=n.__c)&&!r.__)try{if((o=r.constructor)&&null!=o.getDerivedStateFromError&&(r.setState(o.getDerivedStateFromError(e)),i=r.__d),null!=r.componentDidCatch&&(r.componentDidCatch(e,_||{}),i=r.__d),i)return r.__E=r}catch(n){e=n}throw e}},r=0,o=function(e){return null!=e&&void 0===e.constructor},m.prototype.setState=function(e,n){var t;t=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=s({},this.state),"function"==typeof e&&(e=e(s({},t),this.props)),e&&s(t,e),null!=e&&this.__v&&(n&&this.__h.push(n),k(this))},m.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),k(this))},m.prototype.render=y,i=[],x.__r=0,u=0;var $,j,I,B,q=0,z=[],Z=[],G=_.__b,J=_.__r,K=_.diffed,Q=_.__c,X=_.unmount;function Y(e,n){_.__h&&_.__h(j,e,q||n),q=0;var t=j.__H||(j.__H={__:[],__h:[]});return e>=t.__.length&&t.__.push({__V:Z}),t.__[e]}function ee(e){return q=1,ne(ve,e)}function ne(e,n,t){var _=Y($++,2);if(_.t=e,!_.__c&&(_.__=[t?t(n):ve(void 0,n),function(e){var n=_.__N?_.__N[0]:_.__[0],t=_.t(n,e);n!==t&&(_.__N=[t,_.__[1]],_.__c.setState({}))}],_.__c=j,!_.__c.u)){_.__c.__H.u=!0;var r=_.__c.shouldComponentUpdate;_.__c.shouldComponentUpdate=function(e,n,t){if(!_.__c.__H)return!0;var o=_.__c.__H.__.filter((function(e){return e.__c}));return(o.every((function(e){return!e.__N}))||!o.every((function(e){if(!e.__N)return!0;var n=e.__[0];return e.__=e.__N,e.__N=void 0,n===e.__[0]})))&&(!r||r(e,n,t))}}return _.__N||_.__}function te(e,n){var t=Y($++,3);!_.__s&&he(t.__H,n)&&(t.__=e,t.i=n,j.__H.__h.push(t))}function _e(e,n){var t=Y($++,4);!_.__s&&he(t.__H,n)&&(t.__=e,t.i=n,j.__h.push(t))}function re(e){return q=5,ie((function(){return{current:e}}),[])}function oe(e,n,t){q=6,_e((function(){return"function"==typeof e?(e(n()),function(){return e(null)}):e?(e.current=n(),function(){return e.current=null}):void 0}),null==t?t:t.concat(e))}function ie(e,n){var t=Y($++,7);return he(t.__H,n)?(t.__V=e(),t.i=n,t.__h=e,t.__V):t.__}function le(e,n){return q=8,ie((function(){return e}),n)}function ue(e){var n=j.context[e.__c],t=Y($++,9);return t.c=e,n?(null==t.__&&(t.__=!0,n.sub(j)),n.props.value):e.__}function ce(e,n){_.useDebugValue&&_.useDebugValue(n?n(e):e)}function ae(e){var n=Y($++,10),t=ee();return n.__=e,j.componentDidCatch||(j.componentDidCatch=function(e){n.__&&n.__(e),t[1](e)}),[t[0],function(){t[1](void 0)}]}function fe(){for(var e;e=z.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(pe),e.__H.__h.forEach(de),e.__H.__h=[]}catch(n){e.__H.__h=[],_.__e(n,e.__v)}}_.__b=function(e){j=null,G&&G(e)},_.__r=function(e){J&&J(e),$=0;var n=(j=e.__c).__H;n&&(I===j?(n.__h=[],j.__h=[],n.__.forEach((function(e){e.__N&&(e.__=e.__N),e.__V=Z,e.__N=e.i=void 0}))):(n.__h.forEach(pe),n.__h.forEach(de),n.__h=[])),I=j},_.diffed=function(e){K&&K(e);var n=e.__c;n&&n.__H&&(n.__H.__h.length&&(1!==z.push(n)&&B===_.requestAnimationFrame||((B=_.requestAnimationFrame)||function(e){var n,t=function(){clearTimeout(_),se&&cancelAnimationFrame(n),setTimeout(e)},_=setTimeout(t,100);se&&(n=requestAnimationFrame(t))})(fe)),n.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.__V!==Z&&(e.__=e.__V),e.i=void 0,e.__V=Z}))),I=j=null},_.__c=function(e,n){n.some((function(e){try{e.__h.forEach(pe),e.__h=e.__h.filter((function(e){return!e.__||de(e)}))}catch(t){n.some((function(e){e.__h&&(e.__h=[])})),n=[],_.__e(t,e.__v)}})),Q&&Q(e,n)},_.unmount=function(e){X&&X(e);var n,t=e.__c;t&&t.__H&&(t.__H.__.forEach((function(e){try{pe(e)}catch(e){n=e}})),n&&_.__e(n,t.__v))};var se="function"==typeof requestAnimationFrame;function pe(e){var n=j,t=e.__c;"function"==typeof t&&(e.__c=void 0,t()),j=n}function de(e){var n=j;e.__c=e.__(),j=n}function he(e,n){return!e||e.length!==n.length||n.some((function(n,t){return n!==e[t]}))}function ve(e,n){return"function"==typeof n?n(e):n}function ye(e,n){for(var t in n)e[t]=n[t];return e}function me(e,n){for(var t in e)if("__source"!==t&&!(t in n))return!0;for(var _ in n)if("__source"!==_&&e[_]!==n[_])return!0;return!1}function ge(e){this.props=e}function be(e,n){function t(e){var t=this.props.ref,_=t==e.ref;return!_&&t&&(t.call?t(null):t.current=null),n?!n(this.props,e)||!_:me(this.props,e)}function _(n){return this.shouldComponentUpdate=t,d(e,n)}return _.displayName="Memo("+(e.displayName||e.name)+")",_.prototype.isReactComponent=!0,_.__f=!0,_}(ge.prototype=new m).isPureReactComponent=!0,ge.prototype.shouldComponentUpdate=function(e,n){return me(this.props,e)||me(this.state,n)};var ke=_.__b;_.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),ke&&ke(e)};var xe="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function Ce(e){function n(n){var t=ye({},n);return delete t.ref,e(t,n.ref||null)}return n.$$typeof=xe,n.render=n,n.prototype.isReactComponent=n.__f=!0,n.displayName="ForwardRef("+(e.displayName||e.name)+")",n}var Se=_.__e;_.__e=function(e,n,t,_){if(e.then)for(var r,o=n;o=o.__;)if((r=o.__c)&&r.__c)return null==n.__e&&(n.__e=t.__e,n.__k=t.__k),r.__c(e,n);Se(e,n,t,_)};var we=_.unmount;function Ee(){this.__u=0,this.t=null,this.__b=null}function Pe(e){var n=e.__.__c;return n&&n.__a&&n.__a(e)}function Ne(){this.u=null,this.o=null}_.unmount=function(e){var n=e.__c;n&&n.__R&&n.__R(),n&&!0===e.__h&&(e.type=null),we&&we(e)},(Ee.prototype=new m).__c=function(e,n){var t=n.__c,_=this;null==_.t&&(_.t=[]),_.t.push(t);var r=Pe(_.__v),o=!1,i=function(){o||(o=!0,t.__R=null,r?r(l):l())};t.__R=i;var l=function(){if(!--_.__u){if(_.state.__a){var e=_.state.__a;_.__v.__k[0]=function e(n,t,_){return n&&(n.__v=null,n.__k=n.__k&&n.__k.map((function(n){return e(n,t,_)})),n.__c&&n.__c.__P===t&&(n.__e&&_.insertBefore(n.__e,n.__d),n.__c.__e=!0,n.__c.__P=_)),n}(e,e.__c.__P,e.__c.__O)}var n;for(_.setState({__a:_.__b=null});n=_.t.pop();)n.forceUpdate()}},u=!0===n.__h;_.__u++||u||_.setState({__a:_.__b=_.__v.__k[0]}),e.then(i,i)},Ee.prototype.componentWillUnmount=function(){this.t=[]},Ee.prototype.render=function(e,n){if(this.__b){if(this.__v.__k){var t=document.createElement("div"),_=this.__v.__k[0].__c;this.__v.__k[0]=function e(n,t,_){return n&&(n.__c&&n.__c.__H&&(n.__c.__H.__.forEach((function(e){"function"==typeof e.__c&&e.__c()})),n.__c.__H=null),null!=(n=ye({},n)).__c&&(n.__c.__P===_&&(n.__c.__P=t),n.__c=null),n.__k=n.__k&&n.__k.map((function(n){return e(n,t,_)}))),n}(this.__b,t,_.__O=_.__P)}this.__b=null}var r=n.__a&&d(y,null,e.fallback);return r&&(r.__h=null),[d(y,null,n.__a?null:e.children),r]};var He=function(e,n,t){if(++t[1]===t[0]&&e.o.delete(n),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.o.size))for(t=e.u;t;){for(;t.length>3;)t.pop()();if(t[1]>>1,1),n.i.removeChild(e)}}),F(d(Ae,{context:n.context},e.__v),n.l)):n.l&&n.componentWillUnmount()}function Ue(e,n){var t=d(Oe,{__v:e,i:n});return t.containerInfo=n,t}(Ne.prototype=new m).__a=function(e){var n=this,t=Pe(n.__v),_=n.o.get(e);return _[0]++,function(r){var o=function(){n.props.revealOrder?(_.push(r),He(n,e,_)):r()};t?t(o):o()}},Ne.prototype.render=function(e){this.u=null,this.o=new Map;var n=w(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&n.reverse();for(var t=n.length;t--;)this.o.set(n[t],this.u=[1,0,this.u]);return e.children},Ne.prototype.componentDidUpdate=Ne.prototype.componentDidMount=function(){var e=this;this.o.forEach((function(n,t){He(e,t,n)}))};var Te="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,Re=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,De="undefined"!=typeof document,Ve=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/i:/fil|che|ra/i).test(e)};m.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(e){Object.defineProperty(m.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(n){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:n})}})}));var Fe=_.event;function Me(){}function We(){return this.cancelBubble}function Le(){return this.defaultPrevented}_.event=function(e){return Fe&&(e=Fe(e)),e.persist=Me,e.isPropagationStopped=We,e.isDefaultPrevented=Le,e.nativeEvent=e};var $e={configurable:!0,get:function(){return this.class}},je=_.vnode;_.vnode=function(e){var n=e.type,t=e.props,_=t;if("string"==typeof n){var r=-1===n.indexOf("-");for(var o in _={},t){var i=t[o];De&&"children"===o&&"noscript"===n||"value"===o&&"defaultValue"in t&&null==i||("defaultValue"===o&&"value"in t&&null==t.value?o="value":"download"===o&&!0===i?i="":/ondoubleclick/i.test(o)?o="ondblclick":/^onchange(textarea|input)/i.test(o+n)&&!Ve(t.type)?o="oninput":/^onfocus$/i.test(o)?o="onfocusin":/^onblur$/i.test(o)?o="onfocusout":/^on(Ani|Tra|Tou|BeforeInp|Compo)/.test(o)?o=o.toLowerCase():r&&Re.test(o)?o=o.replace(/[A-Z0-9]/g,"-$&").toLowerCase():null===i&&(i=void 0),/^oninput$/i.test(o)&&(o=o.toLowerCase(),_[o]&&(o="oninputCapture")),_[o]=i)}"select"==n&&_.multiple&&Array.isArray(_.value)&&(_.value=w(t.children).forEach((function(e){e.props.selected=-1!=_.value.indexOf(e.props.value)}))),"select"==n&&null!=_.defaultValue&&(_.value=w(t.children).forEach((function(e){e.props.selected=_.multiple?-1!=_.defaultValue.indexOf(e.props.value):_.defaultValue==e.props.value}))),e.props=_,t.class!=t.className&&($e.enumerable="className"in t,null!=t.className&&(_.class=t.className),Object.defineProperty(_,"className",$e))}e.$$typeof=Te,je&&je(e)};var Ie=_.__r;function Be(e){return d.bind(null,e)}_.__r=function(e){Ie&&Ie(e),e.__c};var qe=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|^--/i,ze=/[&<>"]/;function Ze(e){var n=String(e);return ze.test(n)?n.replace(/&/g,"&").replace(//g,">").replace(/"/g,"""):n}var Ge=function(e,n){return String(e).replace(/(\n+)/g,"$1"+(n||"\t"))},Je=function(e,n,t){return String(e).length>(n||40)||!t&&-1!==String(e).indexOf("\n")||-1!==String(e).indexOf("<")},Ke={};function Qe(e){var n="";for(var t in e){var _=e[t];null!=_&&""!==_&&(n&&(n+=" "),n+="-"==t[0]?t:Ke[t]||(Ke[t]=t.replace(/([A-Z])/g,"-$1").toLowerCase()),n+=": ",n+=_,"number"==typeof _&&!1===qe.test(t)&&(n+="px"),n+=";")}return n||void 0}function Xe(e,n){for(var t in n)e[t]=n[t];return e}function Ye(e,n){return Array.isArray(n)?n.reduce(Ye,e):null!=n&&!1!==n&&e.push(n),e}var en={shallow:!0},nn=[],tn=/^(area|base|br|col|embed|hr|img|input|link|meta|param|source|track|wbr)$/,_n=/[\s\n\\/='"\0<>]/;function rn(){this.__d=!0}ln.render=ln;var on=[];function ln(e,n,t){n=n||{},t=t||{};var r=_.__s;_.__s=!0;var o=un(e,n,t);return _.__c&&_.__c(e,on),on.length=0,_.__s=r,o}function un(e,n,t,r,o,i){if(null==e||"boolean"==typeof e)return"";if("object"!=typeof e)return Ze(e);var l=t.pretty,u=l&&"string"==typeof l?l:"\t";if(Array.isArray(e)){for(var c="",a=0;a0&&(c+="\n"),c+=un(e[a],n,t,r,o,i);return c}var f,s=e.type,p=e.props,d=!1;if("function"==typeof s){if(d=!0,!t.shallow||!r&&!1!==t.renderRootComponent){if(s===y){var h=[];return Ye(h,e.props.children),un(h,n,t,!1!==t.shallowHighOrder,o,i)}var v,m=e.__c={__v:e,context:n,props:e.props,setState:rn,forceUpdate:rn,__d:!0,__h:[]};_.__b&&_.__b(e);var g=_.__r;if(s.prototype&&"function"==typeof s.prototype.render){var b=s.contextType,k=b&&n[b.__c],x=null!=b?k?k.props.value:b.__:n;(m=e.__c=new s(p,x)).__v=e,m._dirty=m.__d=!0,m.props=p,null==m.state&&(m.state={}),null==m._nextState&&null==m.__s&&(m._nextState=m.__s=m.state),m.context=x,s.getDerivedStateFromProps?m.state=Xe(Xe({},m.state),s.getDerivedStateFromProps(m.props,m.state)):m.componentWillMount&&(m.componentWillMount(),m.state=m._nextState!==m.state?m._nextState:m.__s!==m.state?m.__s:m.state),g&&g(e),v=m.render(m.props,m.state,m.context)}else for(var C=s.contextType,S=C&&n[C.__c],w=null!=C?S?S.props.value:C.__:n,E=0;m.__d&&E++<25;)m.__d=!1,g&&g(e),v=s.call(e.__c,p,w);return m.getChildContext&&(n=Xe(Xe({},n),m.getChildContext())),_.diffed&&_.diffed(e),un(v,n,t,!1!==t.shallowHighOrder,o,i)}s=(f=s).displayName||f!==Function&&f.name||function(e){var n=(Function.prototype.toString.call(e).match(/^\s*function\s+([^( ]+)/)||"")[1];if(!n){for(var t=-1,_=nn.length;_--;)if(nn[_]===e){t=_;break}t<0&&(t=nn.push(e)-1),n="UnnamedComponent"+t}return n}(f)}var P,N,H="<"+s;if(p){var A=Object.keys(p);t&&!0===t.sortAttributes&&A.sort();for(var O=0;O",_n.test(s))throw new Error(s+" is not a valid HTML tag name in "+H);var V,F=tn.test(s)||t.voidElements&&t.voidElements.test(s),M=[];if(N)l&&Je(N)&&(N="\n"+u+Ge(N,u)),H+=N;else if(null!=P&&Ye(V=[],P).length){for(var W=l&&~H.indexOf("\n"),L=!1,$=0;$0&&"<"!=I[0];L&&B?M[M.length-1]+=I:M.push(I),L=B}else M.push(I)}}if(l&&W)for(var q=M.length;q--;)M[q]="\n"+u+Ge(M[q],u)}if(M.length||N)H+=M.join("");else if(t&&t.xml)return H.substring(0,H.length-1)+" />";return!F||V||N?(l&&~H.indexOf("\n")&&(H+="\n"),H=H+""):H=H.replace(/>$/," />"),H}ln.shallowRender=function(e,n){return ln(e,n,en)},globalThis.__AURISERVE={h:d},window.__ASP_AURISERVE_PREACT=n})(); (()=>{"use strict";var e={542:(e,t)=>{t.TS=void 0,t.TS=function(...e){return e.filter((e=>e)).join(" ")}}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};(()=>{r.r(n),r.d(n,{Static:()=>i,hydrate:()=>a,hydrateElement:()=>c});const e=window.__ASP_AURISERVE_PREACT;var t=r(542);const o="hydrated:static";function i(e){return"undefined"==typeof window?__AURISERVE.h("div",{class:(0,t.TS)(o,e.class),style:e.style},e.children):__AURISERVE.h("div",{class:(0,t.TS)(o,e.class),style:e.style,dangerouslySetInnerHTML:{__html:""}})}function a(e,t){return t}function c(t){document.querySelectorAll(`[data-element="${t.identifier}"]`).forEach((r=>{const n=r.querySelector(":scope > script"),o=JSON.parse(n.innerText);n.remove(),(0,e.hydrate)((0,e.h)(t.component,o),r)}))}})(),window.__ASP_HYDRATED=n})(); /******/ (() => { // webpackBootstrap /******/ "use strict"; /******/ var __webpack_modules__ = ({ /***/ "../../../api/build/index.js": /*!***********************************!*\ !*** ../../../api/build/index.js ***! \***********************************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.emit = exports.off = exports.once = exports.on = exports.dataPath = exports.config = exports.database = exports.Watcher = exports.plugins = exports.YAML = exports.log = exports.router = void 0; // Actually get the API context and export it. // eslint-disable-next-line no-underscore-dangle const api = __webpack_require__.g._CONTEXT; if (!api) { throw new Error('Could not find AuriServe context!\n' + "Please make sure you are loading the 'AuriServe' module synchronously at least once " + 'at the beginning of your plugin to catch the context.'); } exports["default"] = api; exports.router = api.router; exports.log = api.log; exports.YAML = api.YAML; exports.plugins = api.plugins; exports.Watcher = api.Watcher; exports.database = api.database; exports.config = api.config; exports.dataPath = api.dataPath; exports.on = api.on; exports.once = api.once; exports.off = api.off; exports.emit = api.emit; /***/ }), /***/ "../../../common/build/assert.js": /*!***************************************!*\ !*** ../../../common/build/assert.js ***! \***************************************/ /***/ ((__unused_webpack_module, exports) => { /*! * Assertion functions to streamline sanitization and validation. */ Object.defineProperty(exports, "__esModule", ({ value: true })); exports.assertSchema = exports.matchesSchema = exports.isRawObject = exports.isType = exports.assertEq = exports.assert = exports.AssertError = void 0; /** An error caused by a failed assertion. */ class AssertError extends Error { constructor(...params) { super(...params); if (Error.captureStackTrace) Error.captureStackTrace(this, AssertError); this.name = 'AssertError'; } } exports.AssertError = AssertError; /** * Implementation of assert, as defined by the above overloads. * * @param condition - The condition to test. * @param message - The message to store in the error. * @param other - The first value is the custom error type, if any, and the remainder are additional parameters. */ function assert(condition, message, ...other) { var _a; if (!condition) throw new ((_a = other[0]) !== null && _a !== void 0 ? _a : AssertError)(message, ...(other.length > 1 ? other.slice(1) : [])); } exports.assert = assert; /** * Implementation of assertEq, as defined by the above overloads. * * @param a - The first value to check. * @param b - The second value to check. * @param message - The message to store in the error. * @param other - The first value is the custom error type, if any, and the remainder are additional parameters. */ function assertEq(a, b, message, ...other) { // eslint-disable-next-line // @ts-ignore if (a !== b) return assert(false, `${message} (${a} != ${b})`, ...other); } exports.assertEq = assertEq; /** * Given a primitive type name or prototype, checks if the value provided is of the given type. * If the type is a primitive type name, it will perform a `typeof` check, with the special case that `undefined` * will not be considered of type 'object', use 'undefined' to check for undefined values. * Otherwise, it will perform an instanceof check on the value. * * @param val - The value to check the type of. * @param type - A primitive type name (e.g, string, number, boolean, undefined), or a prototype. * @returns true if the value is the given type, false otherwise. */ function isType(val, type) { if (type === 'any') return true; if (typeof type === 'string') { if (type === 'undefined') return val === undefined; if (typeof val === type) return true; } else if (val instanceof type) return true; return false; } exports.isType = isType; function isRawObject(obj) { return obj && obj.constructor === Object || false; } exports.isRawObject = isRawObject; function isSchema(val) { return isRawObject(val); } function isPrimitiveArray(str) { return str.includes('[]'); } function matchesSchema(object, schema, path = '') { if (!isRawObject(object)) return 'Not an object.'; for (const [key, validation] of Object.entries(schema)) { const validations = Array.isArray(validation) ? validation : [validation]; const extraKeys = Object.keys(object).filter(key => schema[key] === undefined).map(key => `'${path}${key}'`); if (extraKeys.length > 0) { const keysStr = extraKeys.length === 1 ? extraKeys[0] : extraKeys.length === 2 ? `${extraKeys[0]} and ${extraKeys[1]}` : `${extraKeys.slice(0, -1).join(', ')}, and ${extraKeys.slice(-1)}`; return `Unknown propert${extraKeys.length >= 2 ? 'ies' : 'y'} ${keysStr}.`; } let anyValid = false; for (const validation of validations) { if (isSchema(validation)) { const matches = matchesSchema(object[key], validation, `${path}${key}.`); if (matches === true) { anyValid = true; break; } } else if (isPrimitiveArray(validation)) { const nonArrayPrimitive = validation.replace('[]', ''); if (Array.isArray(object[key])) { let valid = true; for (const val of object[key]) { if (!isType(val, nonArrayPrimitive)) { valid = false; break; } } if (valid) { anyValid = true; break; } } } else if (isType(object[key], validation)) { anyValid = true; break; } } if (!anyValid) { const typesArr = validations.map(v => isRawObject(v) ? '[subschema]' : v.toString()); const typesStr = typesArr.length === 1 ? typesArr[0] : typesArr.length === 2 ? `${typesArr[0]} or ${typesArr[1]}` : `${typesArr.slice(0, -1).join(', ')}, or ${typesArr.slice(-1)}`; return `'${path}${key}' must be ${typesStr}.`; } } return true; } exports.matchesSchema = matchesSchema; function assertSchema(object, schema, message, ...other) { const matches = matchesSchema(object, schema); // eslint-disable-next-line // @ts-ignore if (typeof matches === 'string') assert(false, `${message}: ${matches}`, ...other); } exports.assertSchema = assertSchema; /***/ }), /***/ "../../../common/build/color.js": /*!**************************************!*\ !*** ../../../common/build/color.js ***! \**************************************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.to = exports.isHSVA = exports.isRGBA = exports.isHex = void 0; const assert_1 = __webpack_require__(/*! ./assert */ "../../../common/build/assert.js"); /** Checks if the color provided is in Hexadecimal format. */ function isHex(color) { return typeof color === 'string' && color[0] === '#' && (color.length === 7 || color.length === 9); } exports.isHex = isHex; /** Checks if the color provided is in RGBA format. */ function isRGBA(color) { return typeof color !== 'string' && 'r' in color; } exports.isRGBA = isRGBA; /** Checks if the Color provided is in HSVA format. */ function isHSVA(color) { return typeof color !== 'string' && 'h' in color; } exports.isHSVA = isHSVA; function to(color, format) { const c = isHex(color) ? HexToHSVA(color) : isRGBA(color) ? RGBAtoHSVA(color) : color; switch (format) { case 'hex': return HSVAtoHex(c); case 'rgba': return HSVAtoRGBA(c); case 'hsva': return c; default: (0, assert_1.assert)(false, `Invalid format '${format}' provided.`); } } exports.to = to; /** * Converts an HSVA Color to RGBA. * Source: https://stackoverflow.com/questions/17242144/#comment24984878_17242144 * * @param hsva - The HSVA value to convert. * @returns the RGBA representation. */ function HSVAtoRGBA(hsva = { h: 0, s: 0, v: 0, a: 1 }) { let r = 0, g = 0, b = 0; const i = Math.floor(hsva.h * 6); const f = hsva.h * 6 - i; const p = hsva.v * (1 - hsva.s); const q = hsva.v * (1 - f * hsva.s); const t = hsva.v * (1 - (1 - f) * hsva.s); switch (i % 6) { default: break; case 0: r = hsva.v; g = t; b = p; break; case 1: r = q; g = hsva.v; b = p; break; case 2: r = p; g = hsva.v; b = t; break; case 3: r = p; g = q; b = hsva.v; break; case 4: r = t; g = p; b = hsva.v; break; case 5: r = hsva.v; g = p; b = q; break; } return { r: r * 255, g: g * 255, b: b * 255, a: hsva.a * 255 }; } /** * Converts an RGBA Color to HSVA. * Source: https://stackoverflow.com/questions/8022885/rgb-to-hsv-color-in-javascript * * @param rgba - The RGBA value to convert. * @returns the HSVA representation. */ function RGBAtoHSVA(rgba = { r: 0, g: 0, b: 0, a: 1 }) { let rr; let gg; let bb; let h = 0; let s; const a = rgba.a / 255; const v = Math.max(rgba.r, rgba.g, rgba.b) / 255; const diff = v - Math.min(rgba.r, rgba.g, rgba.b) / 255; const diffc = c => (v - c) / 6 / diff + 1 / 2; if (diff === 0) h = s = 0;else { s = diff / v; rr = diffc(rgba.r / 255); gg = diffc(rgba.g / 255); bb = diffc(rgba.b / 255); if (rgba.r / 255 === v) h = bb - gg;else if (rgba.g / 255 === v) h = 1 / 3 + rr - bb;else if (rgba.b / 255 === v) h = 2 / 3 + gg - rr; if (h < 0) h += 1;else if (h > 1) h -= 1; } return { h, s, v, a }; } /** * Converts a numeric value from 0-255 * to a hexadecimal string from 00-ff. */ function componentToHex(c) { const hex = Math.floor(c).toString(16); return hex.length === 1 ? `0${hex}` : hex; } /** * Converts an RGBA Color to a Hex string. * Source: https://stackoverflow.com/a/5624139 * * @param rgb - The RGBA value to convert. * @returns the hexadecimal string representation. */ function RGBAtoHex(rgb = { r: 0, g: 0, b: 0, a: 255 }) { return `#${componentToHex(rgb.r)}${componentToHex(rgb.g)}${componentToHex(rgb.b)}${rgb.a === 255 ? '' : componentToHex(rgb.a)}`; } /** * Converts a Hex string to an RGBA Color. * * @param hex - The hexadecimal string to convert. * @returns the RGBA representation. */ function HexToRGBA(hex) { const r = parseInt(`0x${hex[1]}${hex[2]}`, 16); const g = parseInt(`0x${hex[3]}${hex[4]}`, 16); const b = parseInt(`0x${hex[5]}${hex[6]}`, 16); let a = parseInt(`0x${hex[7]}${hex[8]}`, 16); if (Number.isNaN(a)) a = 255; return { r, g, b, a }; } /** * Converts an HSVA Color to a Hex string. * * @param hsva - The HSVA value to convert. * @returns the hexadecimal string representation. */ function HSVAtoHex(hsva = { h: 0, s: 0, v: 0, a: 1 }) { return RGBAtoHex(HSVAtoRGBA(hsva)); } /** * Converts a Hex string to an RGBA Color. * * @param hex - The hexadecimal string to convert. * @returns the RGBA representation. */ function HexToHSVA(hex) { return RGBAtoHSVA(HexToRGBA(hex)); } /***/ }), /***/ "../../../common/build/format.js": /*!***************************************!*\ !*** ../../../common/build/format.js ***! \***************************************/ /***/ ((__unused_webpack_module, exports) => { // import dayjs from 'dayjs'; // import relativeTime from 'dayjs/plugin/relativeTime'; // import advancedFormat from 'dayjs/plugin/advancedFormat'; // dayjs.extend(relativeTime); // dayjs.extend(advancedFormat); Object.defineProperty(exports, "__esModule", ({ value: true })); exports.titleCase = exports.identifier = exports.date = exports.vector = exports.bytes = void 0; /** Byte size tiers. */ const tiers = ['B', 'KB', 'MB', 'GB']; /** * Converts a byte value into a human readable value, such as '242 KB', '3.4 MB', etc. * * @param bytes - The byte value to convert. * @returns the formatted value. */ function bytes(bytes) { bytes = Math.round(bytes); let tier = 0; while (bytes > 800 && tier < tiers.length - 1) { tier++; bytes /= 1024; } return `${Math.ceil(bytes)} ${tiers[tier]}`; } exports.bytes = bytes; /** * Converts an vector matching the format { x, y } or { width, height } * into a string such as '50 × 62'. * * @param vec - The vector to convert. * @returns the formatted value. */ function vector(vec) { var _a, _b; return `${(_a = vec.x) !== null && _a !== void 0 ? _a : vec.width} × ${(_b = vec.y) !== null && _b !== void 0 ? _b : vec.height}`; } exports.vector = vector; /** * Converts a Javascript Date into a human-readable string of the format '2 hours ago', * '3 days ago', '2 weeks ago', 'on January 3rd', or 'on January 3rd, 2019', depending on the current date. * * @param date - The date to convert. * @returns a human-readable date. */ function date(date) { const d = date instanceof Date ? date : new Date(date); return d.toUTCString(); // if (Date.now() - +d < 1000 * 60 * 60 * 24 * 3) return dayjs(date).fromNow(); // else if (d.getFullYear() === new Date().getFullYear()) return `on ${dayjs(date).format('MMMM Do')}`; // return `on ${dayjs(date).format('MMMM Do, YYYY')}`; } exports.date = date; // export function fileNameToName(name: string, len?: number) { // let preExtension = name.substring(0, name.lastIndexOf('.') < 0 ? name.length : name.lastIndexOf('.')); // let cleanName = preExtension.replace(/[_-]+/g, ' ').split(' ').map((str) => { // if (str.length < 2) return str; // const firstChar = str[0]; // const rest = str.substring(1); // return firstChar.toUpperCase() + rest.toLowerCase(); // }).join(' '); // if (len && cleanName.length > len) cleanName = cleanName.substring(0, len); // return cleanName; // } /** * Converts a string to a valid ascii lowercase + underscores identifier, * by replacing specifal characters with underscores and trimming. * Returns null if the resultant string is empty or outside of the length constraints. * * @param str - The string to sanitize. * @param min - The minimum length of the resultant string. Default 3. * @param max - The maximum length of the resultant string. Default 32. * @param clamp - Whether or not to clamp the string to the maximum length if it is longer. Default true. * @returns the sanitized string, or null if the string does not meet the constraints provided. */ function identifier(str, min = 3, max = 32, clamp = true) { const sanitized = str.toLowerCase() // lowercase the identifier .replace(/[ -]/g, '_') // replace space-like characters with underscores .replace(/[^a-zA-Z0-9_]/g, '') // remove all other non-alphanumeric characters .split('_').filter(Boolean).join('_'); // trim underscore whitespace if (sanitized.length > max && clamp) return sanitized.substring(0, max); if (sanitized.length < min || sanitized.length > max) return null; return sanitized; } exports.identifier = identifier; /** * Title cases a string by replacing underscores and hyphens * with spaces and capitalizing the first letter of each word. * * @param str - The string to title case. * @returns the title-cased string. */ function titleCase(str) { return str.replace(/[_-]/g, ' ').replace(/\w\S*/g, str => { var _a, _b, _c, _d; return ((_b = (_a = str.charAt(0)) === null || _a === void 0 ? void 0 : _a.toUpperCase()) !== null && _b !== void 0 ? _b : '') + ((_d = (_c = str.substring(1)) === null || _c === void 0 ? void 0 : _c.toLowerCase()) !== null && _d !== void 0 ? _d : ''); }); } exports.titleCase = titleCase; /***/ }), /***/ "../../../common/build/index.js": /*!**************************************!*\ !*** ../../../common/build/index.js ***! \**************************************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { var __webpack_unused_export__; __webpack_unused_export__ = ({ value: true }); __webpack_unused_export__ = __webpack_unused_export__ = __webpack_unused_export__ = exports.assert = __webpack_unused_export__ = __webpack_unused_export__ = __webpack_unused_export__ = exports.merge = __webpack_unused_export__ = __webpack_unused_export__ = __webpack_unused_export__ = __webpack_unused_export__ = __webpack_unused_export__ = __webpack_unused_export__ = __webpack_unused_export__ = __webpack_unused_export__ = __webpack_unused_export__ = __webpack_unused_export__ = __webpack_unused_export__ = __webpack_unused_export__ = __webpack_unused_export__ = void 0; var path_1 = __webpack_require__(/*! ./path */ "../../../common/build/path.js"); __webpack_unused_export__ = ({ enumerable: true, get: function () { return path_1.setPath; } }); __webpack_unused_export__ = ({ enumerable: true, get: function () { return path_1.traversePath; } }); __webpack_unused_export__ = ({ enumerable: true, get: function () { return path_1.buildPath; } }); __webpack_unused_export__ = ({ enumerable: true, get: function () { return path_1.splitPath; } }); var format_1 = __webpack_require__(/*! ./format */ "../../../common/build/format.js"); __webpack_unused_export__ = ({ enumerable: true, get: function () { return format_1.bytes; } }); __webpack_unused_export__ = ({ enumerable: true, get: function () { return format_1.vector; } }); __webpack_unused_export__ = ({ enumerable: true, get: function () { return format_1.date; } }); __webpack_unused_export__ = ({ enumerable: true, get: function () { return format_1.identifier; } }); __webpack_unused_export__ = ({ enumerable: true, get: function () { return format_1.titleCase; } }); var color_1 = __webpack_require__(/*! ./color */ "../../../common/build/color.js"); __webpack_unused_export__ = ({ enumerable: true, get: function () { return color_1.isHex; } }); __webpack_unused_export__ = ({ enumerable: true, get: function () { return color_1.isRGBA; } }); __webpack_unused_export__ = ({ enumerable: true, get: function () { return color_1.isHSVA; } }); __webpack_unused_export__ = ({ enumerable: true, get: function () { return color_1.to; } }); var util_1 = __webpack_require__(/*! ./util */ "../../../common/build/util.js"); Object.defineProperty(exports, "merge", ({ enumerable: true, get: function () { return util_1.merge; } })); __webpack_unused_export__ = ({ enumerable: true, get: function () { return util_1.sign; } }); var version_1 = __webpack_require__(/*! ./version */ "../../../common/build/version.js"); __webpack_unused_export__ = ({ enumerable: true, get: function () { return __importDefault(version_1).default; } }); var assert_1 = __webpack_require__(/*! ./assert */ "../../../common/build/assert.js"); __webpack_unused_export__ = ({ enumerable: true, get: function () { return assert_1.AssertError; } }); Object.defineProperty(exports, "assert", ({ enumerable: true, get: function () { return assert_1.assert; } })); __webpack_unused_export__ = ({ enumerable: true, get: function () { return assert_1.assertEq; } }); __webpack_unused_export__ = ({ enumerable: true, get: function () { return assert_1.isType; } }); __webpack_unused_export__ = ({ enumerable: true, get: function () { return assert_1.assertSchema; } }); /***/ }), /***/ "../../../common/build/path.js": /*!*************************************!*\ !*** ../../../common/build/path.js ***! \*************************************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.splitPath = exports.setPath = exports.buildPath = exports.traversePath = void 0; const assert_1 = __webpack_require__(/*! ./assert */ "../../../common/build/assert.js"); function descend(seg, object) { if (typeof seg === 'number') { (0, assert_1.assert)(Array.isArray(object), `Invalid Array index into Value '${JSON.stringify(object)}'.`); // assert( // object.length > seg, // `Index '${seg}' is missing in Array '${JSON.stringify(object)}'.` // ); return object[seg]; } (0, assert_1.assert)(object !== undefined && typeof object === 'object', `Value is not an object: '${object}'.`); // assert( // seg in object, // `Object is missing property '${seg}': '${JSON.stringify(object)}'.` // ); return object[seg]; } function traversePath(object, path) { splitPath(path).forEach(seg => object = descend(seg, object)); return object; } exports.traversePath = traversePath; function buildPath(...segs) { return segs.filter(seg => seg !== '').reduce((p, c, i) => p += Number.isInteger(c) ? `[${c.toString()}]` : (i !== 0 ? '.' : '') + c, ''); } exports.buildPath = buildPath; function setPath(object, path, value) { const segs = splitPath(path); segs.slice(0, -1).forEach(seg => object = descend(seg, object)); object[segs[segs.length - 1]] = value; } exports.setPath = setPath; function splitPath(path) { return path.replace(/\[/g, '.[').split('.').filter(Boolean).map(seg => { if (seg.startsWith('[')) { (0, assert_1.assert)(seg.endsWith(']'), `Invalid path array segment '${seg}'. [1]`); const num = Number.parseInt(seg.substring(1, seg.length - 1), 10); (0, assert_1.assert)(!Number.isNaN(num), `Invalid path array segment '${seg}'. [2]`); return num; } return seg; }); } exports.splitPath = splitPath; /***/ }), /***/ "../../../common/build/util.js": /*!*************************************!*\ !*** ../../../common/build/util.js ***! \*************************************/ /***/ ((__unused_webpack_module, exports) => { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.sign = exports.merge = void 0; function merge(...classes) { return classes.filter(s => s).join(' '); } exports.merge = merge; function sign(num) { return num < 0 ? -1 : num > 0 ? 1 : 0; } exports.sign = sign; /***/ }), /***/ "../../../common/build/version.js": /*!****************************************!*\ !*** ../../../common/build/version.js ***! \****************************************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { Object.defineProperty(exports, "__esModule", ({ value: true })); const assert_1 = __webpack_require__(/*! ./assert */ "../../../common/build/assert.js"); /** * Represents a version string implementing a subset of the SemVer format. * Does not support pre-release versions or tags. */ class Version { /** * Constructs a new Version object out of a version string. * Throws an AssertError if the version string does not match the required format. */ constructor(str) { const parts = str.trim().split('.'); (0, assert_1.assert)(parts.length === 3, `Invalid version string: '${str}'.`); this.major = parseInt(parts[0], 10); this.minor = parseInt(parts[1], 10); this.patch = parseInt(parts[2], 10); } /** * Checks if this Version object satisfies the range string specified. * Note: only exact versions, ^, ~, and x are supported. Ranges ard pre-release tags are not supported. * * @param range - The range string to check against. * @returns a boolean indicating if the version matches. */ matches(range) { const strParts = range.trim().split('.'); let minorFuzzy = strParts[1] === 'x'; if (!minorFuzzy && strParts[0].startsWith('^')) { strParts[0] = strParts[0].substring(1).trim(); minorFuzzy = true; } let patchFuzzy = strParts[2] === 'x'; if (!patchFuzzy && strParts[0].startsWith('~')) { strParts[0] = strParts[0].substring(1).trim(); patchFuzzy = true; } const majorFuzzy = strParts[0].startsWith('x'); minorFuzzy || (minorFuzzy = majorFuzzy); patchFuzzy || (patchFuzzy = minorFuzzy); const major = strParts[0] === 'x' ? 0 : parseInt(strParts[0], 10); const minor = strParts[1] === 'x' || strParts[1] === undefined ? 0 : parseInt(strParts[1], 10); const patch = strParts[2] === 'x' || strParts[2] === undefined ? 0 : parseInt(strParts[2], 10); if (major !== this.major) return majorFuzzy ? this.major >= major : false; if (minor !== this.minor) return minorFuzzy ? this.minor >= minor : false; if (patch !== this.patch) return patchFuzzy ? this.patch >= patch : false; return true; } toString() { return `${this.major}.${this.minor}.${this.patch}`; } } exports["default"] = Version; /***/ }), /***/ "./common/util.ts": /*!************************!*\ !*** ./common/util.ts ***! \************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "randomIdentifier": () => (/* binding */ randomIdentifier) /* harmony export */ }); function randomIdentifier() { return `i${Math.random().toString(36).substring(7)}`; } /***/ }), /***/ "./page/display/Image.tsx": /*!********************************!*\ !*** ./page/display/Image.tsx ***! \********************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var common__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! common */ "../../../common/build/index.js"); /* harmony import */ var hydrated__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! hydrated */ "hydrated"); /* harmony import */ var hydrated__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(hydrated__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var preact_compat__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! preact/hooks */ "preact/hooks"); /* harmony import */ var preact_compat__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(preact_compat__WEBPACK_IMPORTED_MODULE_1__); function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } const media = typeof window === 'undefined' ? __webpack_require__(/*! media */ "media") : null; const auriserve = typeof window === 'undefined' ? __webpack_require__(/*! auriserve */ "../../../api/build/index.js") : null; const identifier = 'base:image'; function ImageModal(props) { var _props$maxWidth, _props$alt; const metaRef = (0,preact_compat__WEBPACK_IMPORTED_MODULE_1__.useRef)(null); const padding = 32; const [render, setRender] = (0,preact_compat__WEBPACK_IMPORTED_MODULE_1__.useState)(false); const [size, setSize] = (0,preact_compat__WEBPACK_IMPORTED_MODULE_1__.useState)({ width: 0, height: 0 }); (0,preact_compat__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { if (props.open) setRender(true);else setTimeout(() => setRender(false), 200); }, [props.open]); (0,preact_compat__WEBPACK_IMPORTED_MODULE_1__.useLayoutEffect)(() => { if (!render) return; const computeSize = () => { var _metaRef$current$offs, _metaRef$current; const ratio = Math.min(1, (window.innerWidth - padding * 2) / props.width, (window.innerHeight - padding * 2 - ((_metaRef$current$offs = (_metaRef$current = metaRef.current) === null || _metaRef$current === void 0 ? void 0 : _metaRef$current.offsetHeight) !== null && _metaRef$current$offs !== void 0 ? _metaRef$current$offs : 0)) / props.height); setSize({ width: props.width * ratio, height: props.height * ratio }); }; computeSize(); window.addEventListener('resize', computeSize); return () => window.removeEventListener('resize', computeSize); }, [props.width, props.height, metaRef, render]); if (!render) return null; return (0,preact_compat__WEBPACK_IMPORTED_MODULE_1__.createPortal)(__AURISERVE.h("div", { class: `base:image-modal ${props.open && 'open'}`, onClick: props.onClose }, __AURISERVE.h("figure", { class: "content", onClick: evt => evt.stopPropagation(), style: { maxWidth: Math.min((_props$maxWidth = props.maxWidth) !== null && _props$maxWidth !== void 0 ? _props$maxWidth : Infinity, size.width) } }, __AURISERVE.h("div", { class: "image", style: { width: size.width, height: size.height } }, __AURISERVE.h("img", _extends({ style: props.protect ? 'pointer-events: none; user-select: none;' : '', src: props.path }, size, { alt: (_props$alt = props.alt) !== null && _props$alt !== void 0 ? _props$alt : '' }))), __AURISERVE.h("div", { class: "meta", ref: metaRef }, props.alt && __AURISERVE.h("figcaption", { class: "alt" }, props.alt), !props.protect && __AURISERVE.h("a", { class: "link", href: props.fullPath, target: "_blank", rel: "noopener noreferrer" }, "Open Original")))), document.getElementById('page')); } /** * Renders an external image. No fancy stuff here. */ function ExternalImage(props) { var _props$style, _props$alt2, _props$lazy; const imageStyle = (props.protect ? 'pointer-events: none; user-select: none; ' : '') + (props.aspect ? `object-fit: cover; aspect-ratio: ${props.aspect}; ` : ''); const [lightbox, setLightbox] = (0,preact_compat__WEBPACK_IMPORTED_MODULE_1__.useState)(false); const [initialLoad, setInitialLoad] = (0,preact_compat__WEBPACK_IMPORTED_MODULE_1__.useState)(true); const [size, setSize] = (0,preact_compat__WEBPACK_IMPORTED_MODULE_1__.useState)({ width: 0, height: 0 }); function handleLoad(elem) { if (!elem || !initialLoad) return; setInitialLoad(false); if (elem.complete) setSize({ width: elem.naturalWidth, height: elem.naturalHeight });else elem.addEventListener('load', () => setSize({ width: elem.naturalWidth, height: elem.naturalHeight })); } function handleSetLightbox(evt) { evt.preventDefault(); setLightbox(!lightbox); } const Tag = props.lightbox && !props.protect ? 'a' : props.lightbox ? 'button' : 'div'; const tagStyle = `${(_props$style = props.style) !== null && _props$style !== void 0 ? _props$style : ''}; ${props.maxWidth ? `max-width: ${props.maxWidth}px` : ''}`; return __AURISERVE.h(Tag, { class: (0,common__WEBPACK_IMPORTED_MODULE_2__.merge)(identifier, 'external', props.class), style: tagStyle, onClick: props.lightbox ? handleSetLightbox : undefined, target: "_blank", href: Tag === 'a' ? props.url : undefined }, __AURISERVE.h("img", { ref: handleLoad, style: imageStyle, src: props.url, alt: (_props$alt2 = props.alt) !== null && _props$alt2 !== void 0 ? _props$alt2 : '', loading: ((_props$lazy = props.lazy) !== null && _props$lazy !== void 0 ? _props$lazy : true) ? 'lazy' : undefined }), __AURISERVE.h(ImageModal, { open: lightbox, path: props.url, fullPath: props.url, width: size.width, height: size.height, alt: props.alt, protect: props.protect, onClose: handleSetLightbox })); } /** * Renders a Media image. Bakes in a placeholder and lazy loads the actual version based on the rendered size. */ function MediaImage(props) { var _props$style2, _props$imgStyle, _media$getMediaImageV, _media$getMediaImageV2, _props$imgStyle2, _props$alt3, _props$lazy2; let path = props.path; let width = props.width; let height = props.height; if (!('path' in props)) { var _lgVariant$path, _lgVariant$width, _lgVariant$height; const variants = media.getMediaImageVariants(props.media); const lgVariant = variants.find(variant => variant.type === 'lg'); if (!lgVariant) auriserve.log.error('No variant found for media image', props.media); path = ((_lgVariant$path = lgVariant === null || lgVariant === void 0 ? void 0 : lgVariant.path) !== null && _lgVariant$path !== void 0 ? _lgVariant$path : '').replace(/.+[\\/]media\/variants\//, '').replace(/\.\w+\.webp/, ''); width = (_lgVariant$width = lgVariant === null || lgVariant === void 0 ? void 0 : lgVariant.width) !== null && _lgVariant$width !== void 0 ? _lgVariant$width : 0; height = (_lgVariant$height = lgVariant === null || lgVariant === void 0 ? void 0 : lgVariant.height) !== null && _lgVariant$height !== void 0 ? _lgVariant$height : 0; } const aspectRatio = props.aspect || width / height; const [lightbox, setLightbox] = (0,preact_compat__WEBPACK_IMPORTED_MODULE_1__.useState)(false); const [initialLoad, setInitialLoad] = (0,preact_compat__WEBPACK_IMPORTED_MODULE_1__.useState)(true); const [state, setState] = (0,preact_compat__WEBPACK_IMPORTED_MODULE_1__.useState)('static'); function handleCheckLoad(elem) { if (!elem || !initialLoad) return; setInitialLoad(false); setTimeout(() => { if (elem.complete) setState('loaded');else { setState('loading'); elem.addEventListener('load', () => { setState('transition'); setTimeout(() => setState('loaded'), 1000); }); } }, 50); } function handleSetLightbox(evt) { evt.preventDefault(); setLightbox(!lightbox); } const Tag = props.lightbox && !props.protect ? 'a' : props.lightbox ? 'button' : 'div'; const tagStyle = `${(_props$style2 = props.style) !== null && _props$style2 !== void 0 ? _props$style2 : ''}; ${props.maxWidth ? `max-width: ${props.maxWidth}px` : ''}`; return __AURISERVE.h(Tag, { class: (0,common__WEBPACK_IMPORTED_MODULE_2__.merge)(identifier, 'media', props.class), style: tagStyle, onClick: props.lightbox ? handleSetLightbox : undefined, target: "_blank", href: Tag === 'a' ? `/media/variants/${path}.full.webp` : undefined }, state !== 'loaded' && __AURISERVE.h(hydrated__WEBPACK_IMPORTED_MODULE_0__.Static, null, __AURISERVE.h("div", { "aria-hidden": true, style: `aspect-ratio: ${aspectRatio}; ${(_props$imgStyle = props.imgStyle) !== null && _props$imgStyle !== void 0 ? _props$imgStyle : ''}; background-image: url(${'media' in props ? (_media$getMediaImageV = (_media$getMediaImageV2 = media.getMediaImageVariants(props.media).find(variant => variant.type === 'load')) === null || _media$getMediaImageV2 === void 0 ? void 0 : _media$getMediaImageV2.path) !== null && _media$getMediaImageV !== void 0 ? _media$getMediaImageV : '' : ''});`, class: "preview" })), __AURISERVE.h("div", { style: `aspect-ratio: ${aspectRatio}; ${(_props$imgStyle2 = props.imgStyle) !== null && _props$imgStyle2 !== void 0 ? _props$imgStyle2 : ''} background-image: url(/media/variants/${path}.lg.webp);`, class: (0,common__WEBPACK_IMPORTED_MODULE_2__.merge)('image', state === 'static' && 'static', state === 'loaded' && 'loaded', state === 'transition' && 'loaded animate') }), __AURISERVE.h("img", { ref: handleCheckLoad, style: `${props.protect ? 'pointer-events: none; user-select: none;' : ''} aspect-ratio: ${aspectRatio};`, width: width, height: height, src: `/media/variants/${path}.lg.webp`, alt: (_props$alt3 = props.alt) !== null && _props$alt3 !== void 0 ? _props$alt3 : '', loading: ((_props$lazy2 = props.lazy) !== null && _props$lazy2 !== void 0 ? _props$lazy2 : true) ? 'lazy' : undefined, class: "loader" }), __AURISERVE.h(ImageModal, { open: lightbox, path: `/media/variants/${path}.lg.webp`, fullPath: `/media/variants/${path}.full.webp`, width: width, height: height, alt: props.alt, protect: props.protect, onClose: handleSetLightbox })); } /** * Renders either a MediaImage or ExternalImage depending on the props provided. */ function ImageSwitch(props) { if ('url' in props) return __AURISERVE.h(ExternalImage, props); return __AURISERVE.h(MediaImage, props); } /** * Hydrated Image component, which converts the data for the Client Media Image using the Media API. */ const Image = (0,hydrated__WEBPACK_IMPORTED_MODULE_0__.hydrate)(identifier, ImageSwitch, props => { var _lgVariant$path2, _lgVariant$width2, _lgVariant$height2; if ('url' in props) return props; (0,common__WEBPACK_IMPORTED_MODULE_2__.assert)('media' in props, 'Hydration function is running on the client?'); const newProps = props; const variants = media.getMediaImageVariants(props.media); const lgVariant = variants.find(variant => variant.type === 'lg'); if (!lgVariant) auriserve.log.error('No variant found for media image', props.media); delete newProps.media; newProps.path = ((_lgVariant$path2 = lgVariant === null || lgVariant === void 0 ? void 0 : lgVariant.path) !== null && _lgVariant$path2 !== void 0 ? _lgVariant$path2 : '').replace(/.+[\\/]media\/variants\//, '').replace(/\.\w+\.webp/, ''); newProps.width = (_lgVariant$width2 = lgVariant === null || lgVariant === void 0 ? void 0 : lgVariant.width) !== null && _lgVariant$width2 !== void 0 ? _lgVariant$width2 : 0; newProps.height = (_lgVariant$height2 = lgVariant === null || lgVariant === void 0 ? void 0 : lgVariant.height) !== null && _lgVariant$height2 !== void 0 ? _lgVariant$height2 : 0; return newProps; }); /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ identifier, component: Image }); /***/ }), /***/ "./page/display/PDF.tsx": /*!******************************!*\ !*** ./page/display/PDF.tsx ***! \******************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var media__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! media */ "media"); /* harmony import */ var media__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(media__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var hydrated__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! hydrated */ "hydrated"); /* harmony import */ var hydrated__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(hydrated__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var preact_hooks__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! preact/hooks */ "preact/hooks"); /* harmony import */ var preact_hooks__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(preact_hooks__WEBPACK_IMPORTED_MODULE_2__); const fs = 'window' in globalThis ? undefined : __webpack_require__(Object(function webpackMissingModule() { var e = new Error("Cannot find module 'fs'"); e.code = 'MODULE_NOT_FOUND'; throw e; }())); const identifier = 'base:pdf'; function PDFPage({ pdf, page: pageNum, maxScale }) { const canvas = (0,preact_hooks__WEBPACK_IMPORTED_MODULE_2__.useRef)(null); (0,preact_hooks__WEBPACK_IMPORTED_MODULE_2__.useEffect)(() => { (async () => { var _window$devicePixelRa; if (!canvas.current) return; const page = await pdf.getPage(pageNum); let viewport = page.getViewport({ scale: 1 }); const scale = Math.min(canvas.current.clientWidth / viewport.width, maxScale !== null && maxScale !== void 0 ? maxScale : 1); viewport = page.getViewport({ scale: scale * ((_window$devicePixelRa = window.devicePixelRatio) !== null && _window$devicePixelRa !== void 0 ? _window$devicePixelRa : 1) }); const context = canvas.current.getContext('2d'); canvas.current.width = viewport.width; canvas.current.height = viewport.height; canvas.current.style.maxWidth = `${viewport.width}px`; page.render({ canvasContext: context, viewport }); })(); }, [pdf, pageNum, maxScale]); return __AURISERVE.h("canvas", { class: "page", ref: canvas }); } function toPath(path) { if (path.startsWith('/media/')) return path; return `/media/${path.slice(path.lastIndexOf('/') + 1)}`; } function RawPDF(props) { var _props$path, _ref, _props$path2, _getMedia, _props$media; const path = (_props$path = props.path) !== null && _props$path !== void 0 && _props$path.startsWith('data:') ? props.path : toPath((_ref = (_props$path2 = props.path) !== null && _props$path2 !== void 0 ? _props$path2 : (_getMedia = (0,media__WEBPACK_IMPORTED_MODULE_0__.getMedia)((_props$media = props.media) !== null && _props$media !== void 0 ? _props$media : -1)) === null || _getMedia === void 0 ? void 0 : _getMedia.path) !== null && _ref !== void 0 ? _ref : 'unknown'); const [pdf, setPDF] = (0,preact_hooks__WEBPACK_IMPORTED_MODULE_2__.useState)(null); (0,preact_hooks__WEBPACK_IMPORTED_MODULE_2__.useEffect)(() => { Promise.all(/*! import() */[__webpack_require__.e("vendors-node_modules_pdfjs-dist_build_pdf_js"), __webpack_require__.e("_d307-_9b63-_3428-_3794-_758e-_e422")]).then(__webpack_require__.t.bind(__webpack_require__, /*! pdfjs-dist */ "../node_modules/pdfjs-dist/build/pdf.js", 23)).then(({ getDocument, GlobalWorkerOptions }) => { GlobalWorkerOptions.workerSrc = '/res/elements-base/pdf_worker.js'; if (path.startsWith('data')) { const start = Date.now(); const raw = window.atob(path.substring(path.indexOf(';base64,') + ';base64,'.length)); const array = new Uint8Array(new ArrayBuffer(raw.length)); for (let i = 0; i < raw.length; i++) array[i] = raw.charCodeAt(i); const end = Date.now() - start; console.log(end); return getDocument(array).promise; } return getDocument(path).promise; }).then(pdf => setPDF(pdf)); }, [path]); if (!pdf) return __AURISERVE.h("div", { class: identifier }, __AURISERVE.h("p", { class: "loading" }, "Loading document...", __AURISERVE.h("br", null), __AURISERVE.h("a", { target: "_blank", rel: "noopener noreferrer", href: `/media/${path.slice(path.lastIndexOf('/') + 1)}` }, "Download PDF"))); const pages = []; for (let i = 1; i <= pdf.numPages; i++) pages.push(__AURISERVE.h(PDFPage, { key: i, pdf: pdf, page: i, maxScale: props.maxScale })); return __AURISERVE.h("div", { class: identifier }, pages); } const PDF = (0,hydrated__WEBPACK_IMPORTED_MODULE_1__.hydrate)(identifier, RawPDF, props => { var _props$path3, _getMedia2; const path = props.inline ? `data:application/pdf;base64,${fs.readFileSync((0,media__WEBPACK_IMPORTED_MODULE_0__.getMedia)(props.media).path, 'base64')}` : toPath((_props$path3 = props.path) !== null && _props$path3 !== void 0 ? _props$path3 : (_getMedia2 = (0,media__WEBPACK_IMPORTED_MODULE_0__.getMedia)(props.media)) === null || _getMedia2 === void 0 ? void 0 : _getMedia2.path); return { path, maxScale: props.maxScale }; }); /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ identifier, component: PDF }); /***/ }), /***/ "./page/layout/Carousel.tsx": /*!**********************************!*\ !*** ./page/layout/Carousel.tsx ***! \**********************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* unused harmony export Carousel */ /* harmony import */ var common__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! common */ "../../../common/build/index.js"); /* harmony import */ var hydrated__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! hydrated */ "hydrated"); /* harmony import */ var hydrated__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(hydrated__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var preact_hooks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! preact/hooks */ "preact/hooks"); /* harmony import */ var preact_hooks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(preact_hooks__WEBPACK_IMPORTED_MODULE_1__); const identifier = 'base:carousel'; function RawCarousel(props) { var _props$speed, _props$style; const elemRef = (0,preact_hooks__WEBPACK_IMPORTED_MODULE_1__.useRef)(null); const children = Array.isArray(props.children) ? props.children : [props.children]; (_props$speed = props.speed) !== null && _props$speed !== void 0 ? _props$speed : props.speed = 200; (0,preact_hooks__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { const elem = elemRef.current; const items = elem.querySelector('.carousel-items'); const container = items.children[0]; let active = 0; elem.classList.remove('static'); container.children[0].classList.add('active'); items.style.height = `${container.children[0].clientHeight}px`; let cycling = true; let interval; const observer = new IntersectionObserver(entries => { const intersecting = entries[0].isIntersecting; if (intersecting && !interval && cycling) { interval = setInterval(() => { move(1, 'right', false); }, props.interval); } else if (!intersecting && interval && cycling) { clearInterval(interval); interval = 0; } }, { threshold: 0.5 }); observer.observe(elem); function move(offset, direction, user) { if (user && cycling) { clearInterval(interval); interval = 0; cycling = false; observer.disconnect(); } const prevElem = container.children[active]; active = (active + offset + container.children.length * 4) % container.children.length; const nextElem = container.children[active]; prevElem.style.transitionDuration = `${props.speed}ms`; prevElem.classList.add(direction === 'right' ? 'transition-left' : 'transition-right'); nextElem.classList.add('active'); nextElem.classList.add(direction === 'right' ? 'transition-right' : 'transition-left'); items.style.height = `${nextElem.clientHeight}px`; setTimeout(() => { requestAnimationFrame(() => { nextElem.style.transitionDuration = `${props.speed}ms`; requestAnimationFrame(() => { nextElem.classList.remove(direction === 'right' ? 'transition-right' : 'transition-left'); }); }); setTimeout(() => { nextElem.style.transitionDuration = ''; }, props.speed); }, props.speed / 2); setTimeout(() => { prevElem.classList.remove('active'); prevElem.classList.remove(direction === 'right' ? 'transition-left' : 'transition-right'); prevElem.style.transitionDuration = ''; }, props.speed); } const buttons = Array.prototype.slice.call(elem.querySelectorAll('.button-arrow')); if (buttons.length) { buttons[0].addEventListener('click', () => move(-1, 'left', true)); buttons[1].addEventListener('click', () => move(1, 'right', true)); } }, [props.interval, props.speed]); return __AURISERVE.h("div", { ref: elemRef, class: (0,common__WEBPACK_IMPORTED_MODULE_2__.merge)(identifier, props.class, 'static'), style: { maxWidth: props.width ? `${props.width}px` : undefined, ...(props.pagination === 'arrows' ? { paddingLeft: 64, paddingRight: 64 } : {}), ...((_props$style = props.style) !== null && _props$style !== void 0 ? _props$style : {}) } }, __AURISERVE.h("div", { class: "carousel-items", style: { transitionDuration: `${props.speed * 1.5}ms` } }, __AURISERVE.h(hydrated__WEBPACK_IMPORTED_MODULE_0__.Static, null, children.map((child, i) => __AURISERVE.h("div", { key: i, class: "carousel-item" }, child)))), props.pagination === 'arrows' && __AURISERVE.h("button", { class: "button-arrow", "aria-label": "Previous" }), props.pagination === 'arrows' && __AURISERVE.h("button", { class: "button-arrow", "aria-label": "Next" })); } const Carousel = (0,hydrated__WEBPACK_IMPORTED_MODULE_0__.hydrate)(identifier, RawCarousel); /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ identifier, component: Carousel }); /***/ }), /***/ "./page/layout/Grid.tsx": /*!******************************!*\ !*** ./page/layout/Grid.tsx ***! \******************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* unused harmony export Grid */ /* harmony import */ var hydrated__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! hydrated */ "hydrated"); /* harmony import */ var hydrated__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(hydrated__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var preact_hooks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! preact/hooks */ "preact/hooks"); /* harmony import */ var preact_hooks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(preact_hooks__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _common_util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../common/util */ "./common/util.ts"); const identifier = 'base:grid'; function RawGrid(props) { var _props$initialCount, _props$class; const ref = (0,preact_hooks__WEBPACK_IMPORTED_MODULE_1__.useRef)(null); const randomID = props.initialCount ? (0,_common_util__WEBPACK_IMPORTED_MODULE_2__.randomIdentifier)() : ''; const [moreToReveal, setMoreToReveal] = (0,preact_hooks__WEBPACK_IMPORTED_MODULE_1__.useState)(false); const [revealedCount, setRevealedCount] = (0,preact_hooks__WEBPACK_IMPORTED_MODULE_1__.useState)((_props$initialCount = props.initialCount) !== null && _props$initialCount !== void 0 ? _props$initialCount : null); function handleReveal() { setRevealedCount(revealedCount => { var _props$revealCount; return revealedCount + ((_props$revealCount = props.revealCount) !== null && _props$revealCount !== void 0 ? _props$revealCount : 1); }); } const updateMoreToReveal = (0,preact_hooks__WEBPACK_IMPORTED_MODULE_1__.useCallback)(() => { setRevealedCount(revealedCount => { setMoreToReveal(!!ref.current && !!revealedCount && ref.current.querySelectorAll(':scope > .hydrated\\:static > .contents > *').length > revealedCount); return revealedCount; }); }, []); (0,preact_hooks__WEBPACK_IMPORTED_MODULE_1__.useLayoutEffect)(() => updateMoreToReveal(), [revealedCount, updateMoreToReveal]); return __AURISERVE.h("div", { class: `${identifier} ${randomID} ${(_props$class = props.class) !== null && _props$class !== void 0 ? _props$class : ''}`, ref: ref }, revealedCount != null && __AURISERVE.h("style", { dangerouslySetInnerHTML: { __html: `.base\\:grid.${randomID} > .hydrated\\:static > .contents > *:nth-child(n + ${revealedCount + 1}) { display: none !important; }` } }), __AURISERVE.h(hydrated__WEBPACK_IMPORTED_MODULE_0__.Static, null, __AURISERVE.h("div", { class: "contents", style: { gap: props.gap, gridTemplateColumns: `repeat(auto-fit, minmax(min(${props.minWidth}px, 100%), 1fr))` } }, props.children)), moreToReveal && __AURISERVE.h("button", { class: "show-more", onClick: handleReveal }, "Show More")); } const Grid = (0,hydrated__WEBPACK_IMPORTED_MODULE_0__.hydrate)(identifier, RawGrid); /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ identifier, component: Grid }); /***/ }), /***/ "./page/structure/Float.tsx": /*!**********************************!*\ !*** ./page/structure/Float.tsx ***! \**********************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* unused harmony export Float */ /* harmony import */ var preact_hooks__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! preact/hooks */ "preact/hooks"); /* harmony import */ var preact_hooks__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(preact_hooks__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var common__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! common */ "../../../common/build/index.js"); /* harmony import */ var hydrated__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! hydrated */ "hydrated"); /* harmony import */ var hydrated__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(hydrated__WEBPACK_IMPORTED_MODULE_1__); const identifier = 'base:float'; function RawFloat(props) { const [floating, setFloating] = (0,preact_hooks__WEBPACK_IMPORTED_MODULE_0__.useState)(false); (0,preact_hooks__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { var _props$target, _props$target2; const elem = document.querySelector((_props$target = props.target) !== null && _props$target !== void 0 ? _props$target : 'html'); if (!elem) return; const eventTarget = ((_props$target2 = props.target) !== null && _props$target2 !== void 0 ? _props$target2 : 'html') === 'html' ? document : elem; let scrolled = true; const markScroll = () => scrolled = true; const onScroll = () => { var _props$threshold; if (!scrolled) return; setFloating(elem.scrollTop > ((_props$threshold = props.threshold) !== null && _props$threshold !== void 0 ? _props$threshold : 32)); scrolled = false; }; const interval = setInterval(onScroll, 50); onScroll(); eventTarget.addEventListener('scroll', markScroll, { passive: true }); return () => { window.clearInterval(interval); eventTarget.removeEventListener('scroll', markScroll); }; }, [props.target, props.threshold]); return __AURISERVE.h("div", { class: (0,common__WEBPACK_IMPORTED_MODULE_2__.merge)(identifier, floating && 'floating', props.class) }, __AURISERVE.h(hydrated__WEBPACK_IMPORTED_MODULE_1__.Static, { class: "children" }, props.children)); } const Float = (0,hydrated__WEBPACK_IMPORTED_MODULE_1__.hydrate)(identifier, RawFloat); /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ identifier, component: Float }); /***/ }), /***/ "preact/hooks": /*!*****************************************!*\ !*** external "__ASP_AURISERVE_PREACT" ***! \*****************************************/ /***/ ((module) => { module.exports = window["__ASP_AURISERVE_PREACT"]; /***/ }), /***/ "hydrated": /*!*********************************!*\ !*** external "__ASP_HYDRATED" ***! \*********************************/ /***/ ((module) => { module.exports = window["__ASP_HYDRATED"]; /***/ }), /***/ "media": /*!******************************!*\ !*** external "__ASP_MEDIA" ***! \******************************/ /***/ ((module) => { module.exports = window["__ASP_MEDIA"]; /***/ }) /******/ }); /************************************************************************/ /******/ // The module cache /******/ var __webpack_module_cache__ = {}; /******/ /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ // Check if module is in cache /******/ var cachedModule = __webpack_module_cache__[moduleId]; /******/ if (cachedModule !== undefined) { /******/ return cachedModule.exports; /******/ } /******/ // Create a new module (and put it into the cache) /******/ var module = __webpack_module_cache__[moduleId] = { /******/ // no module.id needed /******/ // no module.loaded needed /******/ exports: {} /******/ }; /******/ /******/ // Execute the module function /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); /******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ /******/ // expose the modules object (__webpack_modules__) /******/ __webpack_require__.m = __webpack_modules__; /******/ /************************************************************************/ /******/ /* webpack/runtime/compat get default export */ /******/ (() => { /******/ // getDefaultExport function for compatibility with non-harmony modules /******/ __webpack_require__.n = (module) => { /******/ var getter = module && module.__esModule ? /******/ () => (module['default']) : /******/ () => (module); /******/ __webpack_require__.d(getter, { a: getter }); /******/ return getter; /******/ }; /******/ })(); /******/ /******/ /* webpack/runtime/create fake namespace object */ /******/ (() => { /******/ var getProto = Object.getPrototypeOf ? (obj) => (Object.getPrototypeOf(obj)) : (obj) => (obj.__proto__); /******/ var leafPrototypes; /******/ // create a fake namespace object /******/ // mode & 1: value is a module id, require it /******/ // mode & 2: merge all properties of value into the ns /******/ // mode & 4: return value when already ns object /******/ // mode & 16: return value when it's Promise-like /******/ // mode & 8|1: behave like require /******/ __webpack_require__.t = function(value, mode) { /******/ if(mode & 1) value = this(value); /******/ if(mode & 8) return value; /******/ if(typeof value === 'object' && value) { /******/ if((mode & 4) && value.__esModule) return value; /******/ if((mode & 16) && typeof value.then === 'function') return value; /******/ } /******/ var ns = Object.create(null); /******/ __webpack_require__.r(ns); /******/ var def = {}; /******/ leafPrototypes = leafPrototypes || [null, getProto({}), getProto([]), getProto(getProto)]; /******/ for(var current = mode & 2 && value; typeof current == 'object' && !~leafPrototypes.indexOf(current); current = getProto(current)) { /******/ Object.getOwnPropertyNames(current).forEach((key) => (def[key] = () => (value[key]))); /******/ } /******/ def['default'] = () => (value); /******/ __webpack_require__.d(ns, def); /******/ return ns; /******/ }; /******/ })(); /******/ /******/ /* webpack/runtime/define property getters */ /******/ (() => { /******/ // define getter functions for harmony exports /******/ __webpack_require__.d = (exports, definition) => { /******/ for(var key in definition) { /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); /******/ } /******/ } /******/ }; /******/ })(); /******/ /******/ /* webpack/runtime/ensure chunk */ /******/ (() => { /******/ __webpack_require__.f = {}; /******/ // This file contains only the entry chunk. /******/ // The chunk loading function for additional chunks /******/ __webpack_require__.e = (chunkId) => { /******/ return Promise.all(Object.keys(__webpack_require__.f).reduce((promises, key) => { /******/ __webpack_require__.f[key](chunkId, promises); /******/ return promises; /******/ }, [])); /******/ }; /******/ })(); /******/ /******/ /* webpack/runtime/get javascript chunk filename */ /******/ (() => { /******/ // This function allow to reference async chunks /******/ __webpack_require__.u = (chunkId) => { /******/ // return url for filenames based on template /******/ return "" + chunkId + ".client.js"; /******/ }; /******/ })(); /******/ /******/ /* webpack/runtime/global */ /******/ (() => { /******/ __webpack_require__.g = (function() { /******/ if (typeof globalThis === 'object') return globalThis; /******/ try { /******/ return this || new Function('return this')(); /******/ } catch (e) { /******/ if (typeof window === 'object') return window; /******/ } /******/ })(); /******/ })(); /******/ /******/ /* webpack/runtime/hasOwnProperty shorthand */ /******/ (() => { /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) /******/ })(); /******/ /******/ /* webpack/runtime/load script */ /******/ (() => { /******/ var inProgress = {}; /******/ var dataWebpackPrefix = "__ASP_ELEMENTS_BASE:"; /******/ // loadScript function to load a script via script tag /******/ __webpack_require__.l = (url, done, key, chunkId) => { /******/ if(inProgress[url]) { inProgress[url].push(done); return; } /******/ var script, needAttach; /******/ if(key !== undefined) { /******/ var scripts = document.getElementsByTagName("script"); /******/ for(var i = 0; i < scripts.length; i++) { /******/ var s = scripts[i]; /******/ if(s.getAttribute("src") == url || s.getAttribute("data-webpack") == dataWebpackPrefix + key) { script = s; break; } /******/ } /******/ } /******/ if(!script) { /******/ needAttach = true; /******/ script = document.createElement('script'); /******/ /******/ script.charset = 'utf-8'; /******/ script.timeout = 120; /******/ if (__webpack_require__.nc) { /******/ script.setAttribute("nonce", __webpack_require__.nc); /******/ } /******/ script.setAttribute("data-webpack", dataWebpackPrefix + key); /******/ script.src = url; /******/ } /******/ inProgress[url] = [done]; /******/ var onScriptComplete = (prev, event) => { /******/ // avoid mem leaks in IE. /******/ script.onerror = script.onload = null; /******/ clearTimeout(timeout); /******/ var doneFns = inProgress[url]; /******/ delete inProgress[url]; /******/ script.parentNode && script.parentNode.removeChild(script); /******/ doneFns && doneFns.forEach((fn) => (fn(event))); /******/ if(prev) return prev(event); /******/ } /******/ ; /******/ var timeout = setTimeout(onScriptComplete.bind(null, undefined, { type: 'timeout', target: script }), 120000); /******/ script.onerror = onScriptComplete.bind(null, script.onerror); /******/ script.onload = onScriptComplete.bind(null, script.onload); /******/ needAttach && document.head.appendChild(script); /******/ }; /******/ })(); /******/ /******/ /* webpack/runtime/make namespace object */ /******/ (() => { /******/ // define __esModule on exports /******/ __webpack_require__.r = (exports) => { /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); /******/ } /******/ Object.defineProperty(exports, '__esModule', { value: true }); /******/ }; /******/ })(); /******/ /******/ /* webpack/runtime/publicPath */ /******/ (() => { /******/ __webpack_require__.p = "/res/elements-base/"; /******/ })(); /******/ /******/ /* webpack/runtime/jsonp chunk loading */ /******/ (() => { /******/ // no baseURI /******/ /******/ // object to store loaded and loading chunks /******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched /******/ // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded /******/ var installedChunks = { /******/ "main": 0 /******/ }; /******/ /******/ __webpack_require__.f.j = (chunkId, promises) => { /******/ // JSONP chunk loading for javascript /******/ var installedChunkData = __webpack_require__.o(installedChunks, chunkId) ? installedChunks[chunkId] : undefined; /******/ if(installedChunkData !== 0) { // 0 means "already installed". /******/ /******/ // a Promise means "currently loading". /******/ if(installedChunkData) { /******/ promises.push(installedChunkData[2]); /******/ } else { /******/ if(true) { // all chunks have JS /******/ // setup Promise in chunk cache /******/ var promise = new Promise((resolve, reject) => (installedChunkData = installedChunks[chunkId] = [resolve, reject])); /******/ promises.push(installedChunkData[2] = promise); /******/ /******/ // start chunk loading /******/ var url = __webpack_require__.p + __webpack_require__.u(chunkId); /******/ // create error before stack unwound to get useful stacktrace later /******/ var error = new Error(); /******/ var loadingEnded = (event) => { /******/ if(__webpack_require__.o(installedChunks, chunkId)) { /******/ installedChunkData = installedChunks[chunkId]; /******/ if(installedChunkData !== 0) installedChunks[chunkId] = undefined; /******/ if(installedChunkData) { /******/ var errorType = event && (event.type === 'load' ? 'missing' : event.type); /******/ var realSrc = event && event.target && event.target.src; /******/ error.message = 'Loading chunk ' + chunkId + ' failed.\n(' + errorType + ': ' + realSrc + ')'; /******/ error.name = 'ChunkLoadError'; /******/ error.type = errorType; /******/ error.request = realSrc; /******/ installedChunkData[1](error); /******/ } /******/ } /******/ }; /******/ __webpack_require__.l(url, loadingEnded, "chunk-" + chunkId, chunkId); /******/ } else installedChunks[chunkId] = 0; /******/ } /******/ } /******/ }; /******/ /******/ // no prefetching /******/ /******/ // no preloaded /******/ /******/ // no HMR /******/ /******/ // no HMR manifest /******/ /******/ // no on chunks loaded /******/ /******/ // install a JSONP callback for chunk loading /******/ var webpackJsonpCallback = (parentChunkLoadingFunction, data) => { /******/ var [chunkIds, moreModules, runtime] = data; /******/ // add "moreModules" to the modules object, /******/ // then flag all "chunkIds" as loaded and fire callback /******/ var moduleId, chunkId, i = 0; /******/ if(chunkIds.some((id) => (installedChunks[id] !== 0))) { /******/ for(moduleId in moreModules) { /******/ if(__webpack_require__.o(moreModules, moduleId)) { /******/ __webpack_require__.m[moduleId] = moreModules[moduleId]; /******/ } /******/ } /******/ if(runtime) var result = runtime(__webpack_require__); /******/ } /******/ if(parentChunkLoadingFunction) parentChunkLoadingFunction(data); /******/ for(;i < chunkIds.length; i++) { /******/ chunkId = chunkIds[i]; /******/ if(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) { /******/ installedChunks[chunkId][0](); /******/ } /******/ installedChunks[chunkId] = 0; /******/ } /******/ /******/ } /******/ /******/ var chunkLoadingGlobal = self["webpackChunk_ASP_ELEMENTS_BASE"] = self["webpackChunk_ASP_ELEMENTS_BASE"] || []; /******/ chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0)); /******/ chunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal)); /******/ })(); /******/ /************************************************************************/ var __webpack_exports__ = {}; // This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk. (() => { /*!*******************!*\ !*** ./Client.ts ***! \*******************/ __webpack_require__.r(__webpack_exports__); /* harmony import */ var hydrated__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! hydrated */ "hydrated"); /* harmony import */ var hydrated__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(hydrated__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _page_layout_Grid__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./page/layout/Grid */ "./page/layout/Grid.tsx"); /* harmony import */ var _page_display_Image__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./page/display/Image */ "./page/display/Image.tsx"); /* harmony import */ var _page_layout_Carousel__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./page/layout/Carousel */ "./page/layout/Carousel.tsx"); /* harmony import */ var _page_structure_Float__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./page/structure/Float */ "./page/structure/Float.tsx"); /* harmony import */ var _page_display_PDF__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./page/display/PDF */ "./page/display/PDF.tsx"); (0,hydrated__WEBPACK_IMPORTED_MODULE_0__.hydrateElement)(_page_layout_Carousel__WEBPACK_IMPORTED_MODULE_1__["default"]); (0,hydrated__WEBPACK_IMPORTED_MODULE_0__.hydrateElement)(_page_display_Image__WEBPACK_IMPORTED_MODULE_2__["default"]); (0,hydrated__WEBPACK_IMPORTED_MODULE_0__.hydrateElement)(_page_layout_Grid__WEBPACK_IMPORTED_MODULE_3__["default"]); (0,hydrated__WEBPACK_IMPORTED_MODULE_0__.hydrateElement)(_page_display_PDF__WEBPACK_IMPORTED_MODULE_4__["default"]); (0,hydrated__WEBPACK_IMPORTED_MODULE_0__.hydrateElement)(_page_structure_Float__WEBPACK_IMPORTED_MODULE_5__["default"]); })(); window.__ASP_ELEMENTS_BASE = __webpack_exports__; /******/ })() ; //# sourceMappingURL=client.js.map