{"version":3,"file":"bundle-fullcalendar.js","sources":["../node_modules/preact/dist/preact.mjs","../node_modules/preact/jsx-runtime/dist/jsxRuntime.mjs","../node_modules/preact/hooks/dist/hooks.mjs","../node_modules/preact/compat/dist/compat.mjs","../node_modules/preact/compat/client.mjs","../node_modules/temporal-polyfill/chunks/root.js","../node_modules/temporal-utils/dist/errorMessages.js","../node_modules/temporal-utils/dist/utils.js","../node_modules/temporal-polyfill/chunks/internal.js","../node_modules/temporal-polyfill/chunks/apiHelpers.js","../node_modules/temporal-polyfill/chunks/funcApi.js","../node_modules/temporal-polyfill/chunks/funcApi-native.js","../node_modules/temporal-polyfill/chunks/funcApi-shim.js","../node_modules/temporal-polyfill/fns/ZonedDateTime.js","../node_modules/temporal-polyfill/fns/PlainDateTime.js","../node_modules/temporal-polyfill/fns/Instant.js","../node_modules/@full-ui/headless-calendar/index.js","../node_modules/fullcalendar/chunks/0b389a37.js","../node_modules/fullcalendar/chunks/d74440d5.js","../node_modules/fullcalendar/chunks/d7fd1889.js","../node_modules/fullcalendar/chunks/167cc14f.js","../node_modules/fullcalendar/chunks/2308e481.js","../node_modules/fullcalendar/chunks/18d26d90.js","../node_modules/fullcalendar/chunks/2f45deb4.js","../node_modules/fullcalendar/chunks/4ddf07a5.js","../node_modules/fullcalendar/chunks/8719026f.js","../node_modules/fullcalendar/chunks/0b82b05c.js","../node_modules/fullcalendar/chunks/bcb7abc1.js","../node_modules/fullcalendar/chunks/72e3cc3d.js","../node_modules/fullcalendar/chunks/20c8a1fa.js","../node_modules/fullcalendar/chunks/4cda001f.js","../node_modules/fullcalendar/chunks/7367f8ae.js","../node_modules/fullcalendar/chunks/63421ff4.js","../node_modules/fullcalendar/chunks/c49d3409.js","../node_modules/fullcalendar/chunks/c8bfd3b8.js","../node_modules/fullcalendar/chunks/919f0b51.js","../node_modules/fullcalendar/chunks/7da45925.js","../node_modules/fullcalendar/chunks/f4fb1541.js","../node_modules/fullcalendar/chunks/aebf6bd0.js","../node_modules/fullcalendar/chunks/33461ac4.js","../node_modules/fullcalendar/chunks/7fd78f3a.js","../node_modules/fullcalendar/chunks/8acff3e8.js","../node_modules/fullcalendar/chunks/c72f1c70.js","../node_modules/fullcalendar/chunks/c8705882.js","../node_modules/fullcalendar/chunks/9789701c.js","../node_modules/fullcalendar/chunks/a5419a33.js","../node_modules/fullcalendar/chunks/df021800.js","../node_modules/fullcalendar/chunks/ff3da282.js","../node_modules/fullcalendar/chunks/1603e6d0.js","../node_modules/fullcalendar/chunks/252e9ac7.js","../node_modules/fullcalendar/chunks/e3e2e4bc.js","../node_modules/fullcalendar/chunks/eb12ffd7.js","../node_modules/fullcalendar/chunks/231b2088.js","../node_modules/fullcalendar/chunks/7783f561.js","../node_modules/fullcalendar/chunks/6bcc4442.js","../node_modules/fullcalendar/chunks/7f98e44b.js","../node_modules/fullcalendar/chunks/21344588.js","../node_modules/fullcalendar/chunks/e06c9ff0.js","../node_modules/fullcalendar/chunks/be24a822.js","../node_modules/fullcalendar/chunks/84466fc0.js","../node_modules/fullcalendar/chunks/b2bd9c22.js","../node_modules/fullcalendar/chunks/91b24338.js","../node_modules/fullcalendar/chunks/ee263d0c.js","../node_modules/fullcalendar/chunks/b4facd36.js","../node_modules/fullcalendar/chunks/13e5ac15.js","../node_modules/fullcalendar/chunks/a9707292.js","../node_modules/fullcalendar/chunks/41f30021.js","../node_modules/fullcalendar/chunks/75d26228.js","../node_modules/fullcalendar/chunks/f26fddac.js","../node_modules/fullcalendar/chunks/2cfa23a2.js","../node_modules/fullcalendar/locales-all/index.js","../node_modules/fullcalendar/chunks/e9b25849.js","../node_modules/fullcalendar/chunks/374ce2d5.js","../node_modules/fullcalendar/chunks/706bd11c.js","../node_modules/fullcalendar/chunks/87ea31a4.js","../node_modules/fullcalendar/chunks/141f9d37.js","../node_modules/fullcalendar/chunks/3a797b1a.js","../node_modules/fullcalendar/chunks/ef2cc2c2.js","../node_modules/fullcalendar/chunks/1577123f.js","../node_modules/fullcalendar/chunks/3e5ce859.js","../node_modules/fullcalendar/chunks/62e6fc24.js","../node_modules/fullcalendar/chunks/39d5fe19.js","../node_modules/fullcalendar/chunks/271e4e27.js","../node_modules/fullcalendar/chunks/2a34c2af.js","../node_modules/fullcalendar/chunks/c5f9ee8d.js","../node_modules/fullcalendar/chunks/d683e1dc.js","../node_modules/fullcalendar/chunks/2e14db02.js","../node_modules/fullcalendar/chunks/ec51c942.js","../node_modules/fullcalendar/chunks/59ff284f.js","../node_modules/fullcalendar/chunks/67ffa90b.js","../node_modules/fullcalendar/chunks/d9e1b164.js","../node_modules/fullcalendar/chunks/c78e6a20.js","../node_modules/fullcalendar/chunks/3919efc1.js","../node_modules/fullcalendar/chunks/4cb239c3.js","../node_modules/fullcalendar/chunks/9cb5389e.js","../node_modules/fullcalendar/chunks/48804e93.js","../node_modules/fullcalendar/chunks/6b4e1e18.js","../node_modules/fullcalendar/chunks/a018ee0e.js","../node_modules/fullcalendar/chunks/588c5911.js","../node_modules/fullcalendar/chunks/91d714e4.js","../node_modules/fullcalendar/chunks/ed111b60.js","../node_modules/fullcalendar/chunks/4b069df5.js","../node_modules/fullcalendar/chunks/98aa0f9f.js","../node_modules/fullcalendar/chunks/3afe0c3a.js","../node_modules/fullcalendar/chunks/ee493988.js","../node_modules/fullcalendar/chunks/9e01cae7.js","../node_modules/fullcalendar/chunks/d8aff20d.js","../node_modules/fullcalendar/chunks/e6ea8eef.js","../node_modules/fullcalendar/chunks/21ae4032.js","../node_modules/fullcalendar/chunks/8077a96d.js","../node_modules/fullcalendar/chunks/2e6b2d23.js","../node_modules/fullcalendar/chunks/8673d7cb.js","../node_modules/fullcalendar/chunks/9ca0d6e1.js","../node_modules/fullcalendar/chunks/e8fabd18.js","../node_modules/fullcalendar/chunks/f17b0fb2.js","../node_modules/fullcalendar/chunks/acf7b7fd.js","../node_modules/fullcalendar/themes/classic/index.js","../node_modules/fullcalendar/chunks/08b6f884.js","../node_modules/fullcalendar/chunks/84e8fba4.js","../node_modules/rollup-plugin-styler/dist/runtime/inject-css.js","../frontend/js/fullcalendar.js"],"sourcesContent":["var n,l,u,t,i,r,o,e,f,c,a,s,h,p,v,y,d={},w=[],_=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,g=Array.isArray;function m(n,l){for(var u in l)n[u]=l[u];return n}function b(n){n&&n.parentNode&&n.parentNode.removeChild(n)}function k(l,u,t){var i,r,o,e={};for(o in u)\"key\"==o?i=u[o]:\"ref\"==o?r=u[o]:e[o]=u[o];if(arguments.length>2&&(e.children=arguments.length>3?n.call(arguments,2):t),\"function\"==typeof l&&null!=l.defaultProps)for(o in l.defaultProps)void 0===e[o]&&(e[o]=l.defaultProps[o]);return x(l,e,i,r,null)}function x(n,t,i,r,o){var e={type:n,props:t,key:i,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:null==o?++u:o,__i:-1,__u:0};return null==o&&null!=l.vnode&&l.vnode(e),e}function M(){return{current:null}}function S(n){return n.children}function C(n,l){this.props=n,this.context=l}function $(n,l){if(null==l)return n.__?$(n.__,n.__i+1):null;for(var u;l<n.__k.length;l++)if(null!=(u=n.__k[l])&&null!=u.__e)return u.__e;return\"function\"==typeof n.type?$(n):null}function I(n){if(n.__P&&n.__d){var u=n.__v,t=u.__e,i=[],r=[],o=m({},u);o.__v=u.__v+1,l.vnode&&l.vnode(o),q(n.__P,o,u,n.__n,n.__P.namespaceURI,32&u.__u?[t]:null,i,null==t?$(u):t,!!(32&u.__u),r),o.__v=u.__v,o.__.__k[o.__i]=o,D(i,o,r),u.__e=u.__=null,o.__e!=t&&P(o)}}function P(n){if(null!=(n=n.__)&&null!=n.__c)return n.__e=n.__c.base=null,n.__k.some(function(l){if(null!=l&&null!=l.__e)return n.__e=n.__c.base=l.__e}),P(n)}function A(n){(!n.__d&&(n.__d=!0)&&i.push(n)&&!H.__r++||r!=l.debounceRendering)&&((r=l.debounceRendering)||o)(H)}function H(){try{for(var n,l=1;i.length;)i.length>l&&i.sort(e),n=i.shift(),l=i.length,I(n)}finally{i.length=H.__r=0}}function L(n,l,u,t,i,r,o,e,f,c,a){var s,h,p,v,y,_,g=t&&t.__k||w,m=l.length;for(f=T(u,l,g,f,m),s=0;s<m;s++)null!=(p=u.__k[s])&&(h=-1!=p.__i&&g[p.__i]||d,p.__i=s,_=q(n,p,h,i,r,o,e,f,c,a),v=p.__e,p.ref&&h.ref!=p.ref&&(h.ref&&J(h.ref,null,p),a.push(p.ref,p.__c||v,p)),null==y&&null!=v&&(y=v),4&p.__u?(f=j(p,f,n),h.__e&&(h.__e=null)):\"function\"==typeof p.type&&void 0!==_?f=_:v&&(f=v.nextSibling),p.__u&=-7);return u.__e=y,f}function T(n,l,u,t,i){var r,o,e,f,c,a=u.length,s=a,h=0;for(n.__k=new Array(i),r=0;r<i;r++)null!=(o=l[r])&&\"boolean\"!=typeof o&&\"function\"!=typeof o?(\"string\"==typeof o||\"number\"==typeof o||\"bigint\"==typeof o||o.constructor==String?o=n.__k[r]=x(null,o,null,null,null):g(o)?o=n.__k[r]=x(S,{children:o},null,null,null):void 0===o.constructor&&o.__b>0?o=n.__k[r]=x(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):n.__k[r]=o,f=r+h,o.__=n,o.__b=n.__b+1,e=null,-1!=(c=o.__i=O(o,u,f,s))&&(s--,(e=u[c])&&(e.__u|=2)),null==e||null==e.__v?(-1==c&&(i>a?h--:i<a&&h++),\"function\"!=typeof o.type&&(o.__u|=4)):c!=f&&(c==f-1?h--:c==f+1?h++:(c>f?h--:h++,o.__u|=4))):n.__k[r]=null;if(s)for(r=0;r<a;r++)null!=(e=u[r])&&0==(2&e.__u)&&(e.__e==t&&(t=$(e)),K(e,e));return t}function j(n,l,u){var t,i;if(\"function\"==typeof n.type){for(t=n.__k,i=0;t&&i<t.length;i++)t[i]&&(t[i].__=n,l=j(t[i],l,u));return l}n.__e!=l&&(l&&n.type&&!l.parentNode&&(l=$(n)),l=u.insertBefore(n.__e,l||null));do{l=l&&l.nextSibling}while(null!=l&&8==l.nodeType);return l}function F(n,l){return l=l||[],null==n||\"boolean\"==typeof n||(g(n)?n.some(function(n){F(n,l)}):l.push(n)),l}function O(n,l,u,t){var i,r,o,e=n.key,f=n.type,c=l[u],a=null!=c&&0==(2&c.__u);if(null===c&&null==e||a&&e==c.key&&f==c.type)return u;if(t>(a?1:0))for(i=u-1,r=u+1;i>=0||r<l.length;)if(null!=(c=l[o=i>=0?i--:r++])&&0==(2&c.__u)&&e==c.key&&f==c.type)return o;return-1}function z(n,l,u){\"-\"==l[0]?n.setProperty(l,null==u?\"\":u):n[l]=null==u?\"\":\"number\"!=typeof u||_.test(l)?u:u+\"px\"}function N(n,l,u,t,i){var r,o;n:if(\"style\"==l)if(\"string\"==typeof u)n.style.cssText=u;else{if(\"string\"==typeof t&&(n.style.cssText=t=\"\"),t)for(l in t)u&&l in u||z(n.style,l,\"\");if(u)for(l in u)t&&u[l]==t[l]||z(n.style,l,u[l])}else if(\"o\"==l[0]&&\"n\"==l[1])r=l!=(l=l.replace(s,\"$1\")),o=l.toLowerCase(),l=o in n||\"onFocusOut\"==l||\"onFocusIn\"==l?o.slice(2):l.slice(2),n.l||(n.l={}),n.l[l+r]=u,u?t?u[a]=t[a]:(u[a]=h,n.addEventListener(l,r?v:p,r)):n.removeEventListener(l,r?v:p,r);else{if(\"http://www.w3.org/2000/svg\"==i)l=l.replace(/xlink(H|:h)/,\"h\").replace(/sName$/,\"s\");else if(\"width\"!=l&&\"height\"!=l&&\"href\"!=l&&\"list\"!=l&&\"form\"!=l&&\"tabIndex\"!=l&&\"download\"!=l&&\"rowSpan\"!=l&&\"colSpan\"!=l&&\"role\"!=l&&\"popover\"!=l&&l in n)try{n[l]=null==u?\"\":u;break n}catch(n){}\"function\"==typeof u||(null==u||!1===u&&\"-\"!=l[4]?n.removeAttribute(l):n.setAttribute(l,\"popover\"==l&&1==u?\"\":u))}}function V(n){return function(u){if(this.l){var t=this.l[u.type+n];if(null==u[c])u[c]=h++;else if(u[c]<t[a])return;return t(l.event?l.event(u):u)}}}function q(n,u,t,i,r,o,e,f,c,a){var s,h,p,v,y,d,_,k,x,M,I,P,A,H,T,j,F=u.type;if(void 0!==u.constructor)return null;128&t.__u&&(c=!!(32&t.__u),o=[f=u.__e=t.__e]),(s=l.__b)&&s(u);n:if(\"function\"==typeof F){h=e.length;try{if(x=u.props,M=F.prototype&&F.prototype.render,I=(s=F.contextType)&&i[s.__c],P=s?I?I.props.value:s.__:i,t.__c?k=(p=u.__c=t.__c).__=p.__E:(M?u.__c=p=new F(x,P):(u.__c=p=new C(x,P),p.constructor=F,p.render=Q),I&&I.sub(p),p.state||(p.state={}),p.__n=i,v=p.__d=!0,p.__h=[],p._sb=[]),M&&null==p.__s&&(p.__s=p.state),M&&null!=F.getDerivedStateFromProps&&(p.__s==p.state&&(p.__s=m({},p.__s)),m(p.__s,F.getDerivedStateFromProps(x,p.__s))),y=p.props,d=p.state,p.__v=u,v)M&&null==F.getDerivedStateFromProps&&null!=p.componentWillMount&&p.componentWillMount(),M&&null!=p.componentDidMount&&p.__h.push(p.componentDidMount);else{if(M&&null==F.getDerivedStateFromProps&&x!==y&&null!=p.componentWillReceiveProps&&p.componentWillReceiveProps(x,P),u.__v==t.__v||!p.__e&&null!=p.shouldComponentUpdate&&!1===p.shouldComponentUpdate(x,p.__s,P)){u.__v!=t.__v&&(p.props=x,p.state=p.__s,p.__d=!1),u.__e=t.__e,u.__k=t.__k,u.__k.some(function(n){n&&(n.__=u)}),w.push.apply(p.__h,p._sb),p._sb=[],p.__h.length&&e.push(p),f=$(t);break n}null!=p.componentWillUpdate&&p.componentWillUpdate(x,p.__s,P),M&&null!=p.componentDidUpdate&&p.__h.push(function(){p.componentDidUpdate(y,d,_)})}if(p.context=P,p.props=x,p.__P=n,p.__e=!1,A=l.__r,H=0,M)p.state=p.__s,p.__d=!1,A&&A(u),s=p.render(p.props,p.state,p.context),w.push.apply(p.__h,p._sb),p._sb=[];else do{p.__d=!1,A&&A(u),s=p.render(p.props,p.state,p.context),p.state=p.__s}while(p.__d&&++H<25);p.state=p.__s,null!=p.getChildContext&&(i=m(m({},i),p.getChildContext())),M&&!v&&null!=p.getSnapshotBeforeUpdate&&(_=p.getSnapshotBeforeUpdate(y,d)),T=null!=s&&s.type===S&&null==s.key?E(s.props.children):s,f=L(n,g(T)?T:[T],u,t,i,r,o,e,f,c,a),p.base=u.__e,u.__u&=-161,p.__h.length&&e.push(p),k&&(p.__E=p.__=null)}catch(n){if(e.length=h,u.__v=null,c||null!=o){if(n.then){for(u.__u|=c?160:128;f&&8==f.nodeType&&f.nextSibling;)f=f.nextSibling;null!=o&&(o[o.indexOf(f)]=null),u.__e=f}else if(null!=o)for(j=o.length;j--;)b(o[j])}else u.__e=t.__e;null==u.__k&&(u.__k=t.__k||[]),n.then||B(u),l.__e(n,u,t)}}else null==o&&u.__v==t.__v?(u.__k=t.__k,u.__e=t.__e):f=u.__e=G(t.__e,u,t,i,r,o,e,c,a);return(s=l.diffed)&&s(u),128&u.__u?void 0:f}function B(n){n&&(n.__c&&(n.__c.__e=!0),n.__k&&n.__k.some(B))}function D(n,u,t){for(var i=0;i<t.length;i++)J(t[i],t[++i],t[++i]);l.__c&&l.__c(u,n),n.some(function(u){try{n=u.__h,u.__h=[],n.some(function(n){n.call(u)})}catch(n){l.__e(n,u.__v)}})}function E(n){return\"object\"!=typeof n||null==n||n.__b>0?n:g(n)?n.map(E):void 0!==n.constructor?null:m({},n)}function G(u,t,i,r,o,e,f,c,a){var s,h,p,v,y,w,_,m=i.props||d,k=t.props,x=t.type;if(\"svg\"==x?o=\"http://www.w3.org/2000/svg\":\"math\"==x?o=\"http://www.w3.org/1998/Math/MathML\":o||(o=\"http://www.w3.org/1999/xhtml\"),null!=e)for(s=0;s<e.length;s++)if((y=e[s])&&\"setAttribute\"in y==!!x&&(x?y.localName==x:3==y.nodeType)){u=y,e[s]=null;break}if(null==u){if(null==x)return document.createTextNode(k);u=document.createElementNS(o,x,k.is&&k),c&&(l.__m&&l.__m(t,e),c=!1),e=null}if(null==x)m===k||c&&u.data==k||(u.data=k);else{if(e=\"textarea\"==x&&null!=k.defaultValue?null:e&&n.call(u.childNodes),!c&&null!=e)for(m={},s=0;s<u.attributes.length;s++)m[(y=u.attributes[s]).name]=y.value;for(s in m)y=m[s],\"dangerouslySetInnerHTML\"==s?p=y:\"children\"==s||s in k||\"value\"==s&&\"defaultValue\"in k||\"checked\"==s&&\"defaultChecked\"in k||N(u,s,null,y,o);for(s in k)y=k[s],\"children\"==s?v=y:\"dangerouslySetInnerHTML\"==s?h=y:\"value\"==s?w=y:\"checked\"==s?_=y:c&&\"function\"!=typeof y||m[s]===y||N(u,s,y,m[s],o);if(h)c||p&&(h.__html==p.__html||h.__html==u.innerHTML)||(u.innerHTML=h.__html),t.__k=[];else if(p&&(u.innerHTML=\"\"),L(\"template\"==t.type?u.content:u,g(v)?v:[v],t,i,r,\"foreignObject\"==x?\"http://www.w3.org/1999/xhtml\":o,e,f,e?e[0]:i.__k&&$(i,0),c,a),null!=e)for(s=e.length;s--;)b(e[s]);c&&\"textarea\"!=x||(s=\"value\",\"progress\"==x&&null==w?u.removeAttribute(\"value\"):null!=w&&(w!==u[s]||\"progress\"==x&&!w||\"option\"==x&&w!=m[s])&&N(u,s,w,m[s],o),s=\"checked\",null!=_&&_!=u[s]&&N(u,s,_,m[s],o))}return u}function J(n,u,t){try{if(\"function\"==typeof n){var i=\"function\"==typeof n.__u;i&&n.__u(),i&&null==u||(n.__u=n(u))}else n.current=u}catch(n){l.__e(n,t)}}function K(n,u,t){var i,r;if(l.unmount&&l.unmount(n),(i=n.ref)&&(i.current&&i.current!=n.__e||J(i,null,u)),null!=(i=n.__c)){if(i.componentWillUnmount)try{i.componentWillUnmount()}catch(n){l.__e(n,u)}i.base=i.__P=i.__n=null}if(i=n.__k)for(r=0;r<i.length;r++)i[r]&&K(i[r],u,t||\"function\"!=typeof n.type);t||b(n.__e),n.__c=n.__=n.__e=void 0}function Q(n,l,u){return this.constructor(n,u)}function R(u,t,i){var r,o,e,f;t==document&&(t=document.documentElement),l.__&&l.__(u,t),o=(r=\"function\"==typeof i)?null:i&&i.__k||t.__k,e=[],f=[],q(t,u=(!r&&i||t).__k=k(S,null,[u]),o||d,d,t.namespaceURI,!r&&i?[i]:o?null:t.firstChild?n.call(t.childNodes):null,e,!r&&i?i:o?o.__e:t.firstChild,r,f),D(e,u,f),u.props.children=null}function U(n,l){R(n,l,U)}function W(l,u,t){var i,r,o,e,f=m({},l.props);for(o in l.type&&l.type.defaultProps&&(e=l.type.defaultProps),u)\"key\"==o?i=u[o]:\"ref\"==o?r=u[o]:f[o]=void 0===u[o]&&null!=e?e[o]:u[o];return arguments.length>2&&(f.children=arguments.length>3?n.call(arguments,2):t),x(l.type,f,i||l.key,r||l.ref,null)}function X(n){function l(n){var u,t;return this.getChildContext||(u=new Set,(t={})[l.__c]=this,this.getChildContext=function(){return t},this.componentWillUnmount=function(){u=null},this.shouldComponentUpdate=function(n){this.props.value!=n.value&&u.forEach(function(n){n.__e=!0,A(n)})},this.sub=function(n){u.add(n);var l=n.componentWillUnmount;n.componentWillUnmount=function(){u&&u.delete(n),l&&l.call(n)}}),n.children}return l.__c=\"__cC\"+y++,l.__=n,l.Provider=l.__l=(l.Consumer=function(n,l){return n.children(l)}).contextType=l,l}n=w.slice,l={__e:function(n,l,u,t){for(var i,r,o;l=l.__;)if((i=l.__c)&&!i.__)try{if((r=i.constructor)&&null!=r.getDerivedStateFromError&&(i.setState(r.getDerivedStateFromError(n)),o=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(n,t||{}),o=i.__d),o)return i.__E=i}catch(l){n=l}throw n}},u=0,t=function(n){return null!=n&&void 0===n.constructor},C.prototype.setState=function(n,l){var u;u=null!=this.__s&&this.__s!=this.state?this.__s:this.__s=m({},this.state),\"function\"==typeof n&&(n=n(m({},u),this.props)),n&&m(u,n),null!=n&&this.__v&&(l&&this._sb.push(l),A(this))},C.prototype.forceUpdate=function(n){this.__v&&(this.__e=!0,n&&this.__h.push(n),A(this))},C.prototype.render=S,i=[],o=\"function\"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,e=function(n,l){return n.__v.__b-l.__v.__b},H.__r=0,f=Math.random().toString(8),c=\"__d\"+f,a=\"__a\"+f,s=/(PointerCapture)$|Capture$/i,h=0,p=V(!1),v=V(!0),y=0;export{C as Component,S as Fragment,W as cloneElement,X as createContext,k as createElement,M as createRef,k as h,U as hydrate,t as isValidElement,l as options,R as render,F as toChildArray};\n//# sourceMappingURL=preact.module.js.map\n","import{options as r,Fragment as e}from\"preact\";export{Fragment}from\"preact\";var t=/[\"&<]/;function n(r){if(0===r.length||!1===t.test(r))return r;for(var e=0,n=0,o=\"\",f=\"\";n<r.length;n++){switch(r.charCodeAt(n)){case 34:f=\"&quot;\";break;case 38:f=\"&amp;\";break;case 60:f=\"&lt;\";break;default:continue}n!==e&&(o+=r.slice(e,n)),o+=f,e=n+1}return n!==e&&(o+=r.slice(e,n)),o}var o=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,f=0,i=Array.isArray;function u(e,t,n,o,i,u){t||(t={});var a,c,p=t;if(\"ref\"in p)for(c in p={},t)\"ref\"==c?a=t[c]:p[c]=t[c];var l={type:e,props:p,key:n,ref:a,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--f,__i:-1,__u:0,__source:i,__self:u};if(\"function\"==typeof e&&(a=e.defaultProps))for(c in a)void 0===p[c]&&(p[c]=a[c]);return r.vnode&&r.vnode(l),l}function a(r){var t=u(e,{tpl:r,exprs:[].slice.call(arguments,1)});return t.key=t.__v,t}var c={},p=/[A-Z]/g;function l(e,t){if(r.attr){var f=r.attr(e,t);if(\"string\"==typeof f)return f}if(t=function(r){return null!==r&&\"object\"==typeof r&&\"function\"==typeof r.valueOf?r.valueOf():r}(t),\"ref\"===e||\"key\"===e)return\"\";if(\"style\"===e&&\"object\"==typeof t){var i=\"\";for(var u in t){var a=t[u];if(null!=a&&\"\"!==a){var l=\"-\"==u[0]?u:c[u]||(c[u]=u.replace(p,\"-$&\").toLowerCase()),s=\";\";\"number\"!=typeof a||l.startsWith(\"--\")||o.test(l)||(s=\"px;\"),i=i+l+\":\"+a+s}}return e+'=\"'+n(i)+'\"'}return null==t||!1===t||\"function\"==typeof t||\"object\"==typeof t?\"\":!0===t?e:e+'=\"'+n(\"\"+t)+'\"'}function s(r){if(null==r||\"boolean\"==typeof r||\"function\"==typeof r)return null;if(\"object\"==typeof r){if(void 0===r.constructor)return r;if(i(r)){for(var e=0;e<r.length;e++)r[e]=s(r[e]);return r}}return n(\"\"+r)}export{u as jsx,l as jsxAttr,u as jsxDEV,s as jsxEscape,a as jsxTemplate,u as jsxs};\n//# sourceMappingURL=jsxRuntime.module.js.map\n","import{options as n}from\"preact\";var t,r,u,i,o=0,f=[],c=n,e=c.__b,a=c.__r,v=c.diffed,l=c.__c,m=c.unmount,p=c.__;function s(n,t){c.__h&&c.__h(r,n,o||t),o=0;var u=r.__H||(r.__H={__:[],__h:[]});return n>=u.__.length&&u.__.push({}),u.__[n]}function d(n){return o=1,y(D,n)}function y(n,u,i){var o=s(t++,2);if(o.t=n,!o.__c&&(o.__=[i?i(u):D(void 0,u),function(n){var t=o.__N?o.__N[0]:o.__[0],r=o.t(t,n);t!==r&&(o.__N=[r,o.__[1]],o.__c.setState({}))}],o.__c=r,!r.__f)){var f=function(n,t,r){if(!o.__c.__H)return!0;var u=!1,i=o.__c.props!==n;if(o.__c.__H.__.some(function(n){if(n.__N){u=!0;var t=n.__[0];n.__=n.__N,n.__N=void 0,t!==n.__[0]&&(i=!0)}}),c){var f=c.call(this,n,t,r);return u?f||i:f}return!u||i};r.__f=!0;var c=r.shouldComponentUpdate,e=r.componentWillUpdate;r.componentWillUpdate=function(n,t,r){if(this.__e){var u=c;c=void 0,f(n,t,r),c=u}e&&e.call(this,n,t,r)},r.shouldComponentUpdate=f}return o.__N||o.__}function h(n,u){var i=s(t++,3);!c.__s&&C(i.__H,u)&&(i.__=n,i.u=u,r.__H.__h.push(i))}function _(n,u){var i=s(t++,4);!c.__s&&C(i.__H,u)&&(i.__=n,i.u=u,r.__h.push(i))}function A(n){return o=5,T(function(){return{current:n}},[])}function F(n,t,r){o=6,_(function(){if(\"function\"==typeof n){var r=n(t());return function(){n(null),r&&\"function\"==typeof r&&r()}}if(n)return n.current=t(),function(){return n.current=null}},null==r?r:r.concat(n))}function T(n,r){var u=s(t++,7);return C(u.__H,r)&&(u.__=n(),u.__H=r,u.__h=n),u.__}function q(n,t){return o=8,T(function(){return n},t)}function x(n){var u=r.context[n.__c],i=s(t++,9);return i.c=n,u?(null==i.__&&(i.__=!0,u.sub(r)),u.props.value):n.__}function P(n,t){c.useDebugValue&&c.useDebugValue(t?t(n):n)}function b(n){var u=s(t++,10),i=d();return u.__=n,r.componentDidCatch||(r.componentDidCatch=function(n,t){u.__&&u.__(n,t),i[1](n)}),[i[0],function(){i[1](void 0)}]}function g(){var n=s(t++,11);if(!n.__){for(var u=r.__v;null!==u&&!u.__m&&null!==u.__;)u=u.__;var i=u.__m||(u.__m=[0,0]);n.__=\"P\"+i[0]+\"-\"+i[1]++}return n.__}function j(){for(var n;n=f.shift();){var t=n.__H;if(n.__P&&t)try{t.__h.some(z),t.__h.some(B),t.__h=[]}catch(r){t.__h=[],c.__e(r,n.__v)}}}c.__b=function(n){r=null,e&&e(n)},c.__=function(n,t){n&&t.__k&&t.__k.__m&&(n.__m=t.__k.__m),p&&p(n,t)},c.__r=function(n){a&&a(n),t=0;var i=(r=n.__c).__H;i&&(u===r?(i.__h=[],r.__h=[],i.__.some(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(i.__h.some(z),i.__h.some(B),i.__h=[],t=0)),u=r},c.diffed=function(n){v&&v(n);var t=n.__c;t&&t.__H&&(t.__H.__h.length&&(1!==f.push(t)&&i===c.requestAnimationFrame||((i=c.requestAnimationFrame)||w)(j)),t.__H.__.some(function(n){n.u&&(n.__H=n.u,n.u=void 0)})),u=r=null},c.__c=function(n,t){t.some(function(n){try{n.__h.some(z),n.__h=n.__h.filter(function(n){return!n.__||B(n)})}catch(r){t.some(function(n){n.__h&&(n.__h=[])}),t=[],c.__e(r,n.__v)}}),l&&l(n,t)},c.unmount=function(n){m&&m(n);var t,r=n.__c;r&&r.__H&&(r.__H.__.some(function(n){try{z(n)}catch(n){t=n}}),r.__H=void 0,t&&c.__e(t,r.__v))};var k=\"function\"==typeof requestAnimationFrame;function w(n){var t,r=function(){clearTimeout(u),k&&cancelAnimationFrame(t),setTimeout(n)},u=setTimeout(r,35);k&&(t=requestAnimationFrame(r))}function z(n){var t=r,u=n.__c;\"function\"==typeof u&&(n.__c=void 0,u()),r=t}function B(n){var t=r;n.__c=n.__(),r=t}function C(n,t){return!n||n.length!==t.length||t.some(function(t,r){return t!==n[r]})}function D(n,t){return\"function\"==typeof t?t(n):t}export{q as useCallback,x as useContext,P as useDebugValue,h as useEffect,b as useErrorBoundary,g as useId,F as useImperativeHandle,_ as useLayoutEffect,T as useMemo,y as useReducer,A as useRef,d as useState};\n//# sourceMappingURL=hooks.module.js.map\n","import{Component as n,createElement as t,options as e,toChildArray as r,Fragment as u,render as o,hydrate as i,createContext as l,createRef as f,cloneElement as a}from\"preact\";export{Component,Fragment,Fragment as StrictMode,createContext,createElement,createRef}from\"preact\";import{useState as c,useLayoutEffect as s,useEffect as h,useCallback as v,useContext as d,useDebugValue as m,useId as p,useImperativeHandle as y,useMemo as _,useReducer as b,useRef as S}from\"preact/hooks\";export*from\"preact/hooks\";function g(n,t){for(var e in t)n[e]=t[e];return n}function E(n,t){for(var e in n)if(\"__source\"!==e&&!(e in t))return!0;for(var r in t)if(\"__source\"!==r&&n[r]!==t[r])return!0;return!1}function C(n,t){var e=t(),r=c({t:{__:e,u:t}}),u=r[0].t,o=r[1];return s(function(){u.__=e,u.u=t,R(u)&&o({t:u})},[n,e,t]),h(function(){return R(u)&&o({t:u}),n(function(){R(u)&&o({t:u})})},[n]),e}function R(n){try{return!((t=n.__)===(e=n.u())&&(0!==t||1/t==1/e)||t!=t&&e!=e)}catch(n){return!0}var t,e}function x(n){n()}function w(n){return n}function k(){return[!1,x]}var I=s;function M(n,t){this.props=n,this.context=t}function N(n,e){function r(n){var t=this.props.ref;return t!=n.ref&&t&&(\"function\"==typeof t?t(null):t.current=null),e?!e(this.props,n)||t!=n.ref:E(this.props,n)}function u(e){return this.shouldComponentUpdate=r,t(n,e)}return u.displayName=\"Memo(\"+(n.displayName||n.name)+\")\",u.__f=u.prototype.isReactComponent=!0,u.type=n,u}(M.prototype=new n).isPureReactComponent=!0,M.prototype.shouldComponentUpdate=function(n,t){return E(this.props,n)||E(this.state,t)};var T=e.__b;e.__b=function(n){n.type&&n.type.__f&&n.ref&&(n.props.ref=n.ref,n.ref=null),T&&T(n)};var A=\"undefined\"!=typeof Symbol&&Symbol.for&&Symbol.for(\"react.forward_ref\")||3911;function D(n){function t(t){var e=g({},t);return delete e.ref,n(e,t.ref||null)}return t.$$typeof=A,t.render=n,t.prototype.isReactComponent=t.__f=!0,t.displayName=\"ForwardRef(\"+(n.displayName||n.name)+\")\",t}var F=function(n,t){return null==n?null:r(r(n).map(t))},L={map:F,forEach:F,count:function(n){return n?r(n).length:0},only:function(n){var t=r(n);if(1!==t.length)throw\"Children.only\";return t[0]},toArray:r},O=e.__e;e.__e=function(n,t,e,r){if(n.then)for(var u,o=t;o=o.__;)if((u=o.__c)&&u.__c)return null==t.__e&&(t.__e=e.__e,t.__k=e.__k||[]),u.__c(n,t);O(n,t,e,r)};var U=e.unmount;function V(n,t,e){return n&&(n.__c&&n.__c.__H&&(n.__c.__H.__.forEach(function(n){\"function\"==typeof n.__c&&n.__c()}),n.__c.__H=null),null!=(n=g({},n)).__c&&(n.__c.__P===e&&(n.__c.__P=t),n.__c.__e=!0,n.__c=null),n.__k=n.__k&&n.__k.map(function(n){return V(n,t,e)})),n}function W(n,t,e){return n&&e&&(n.__v=null,n.__k=n.__k&&n.__k.map(function(n){return W(n,t,e)}),n.__c&&n.__c.__P===t&&(n.__e&&e.appendChild(n.__e),n.__c.__e=!0,n.__c.__P=e)),n}function P(){this.__u=0,this.o=null,this.__b=null}function j(n){var t=n.__&&n.__.__c;return t&&t.__a&&t.__a(n)}function z(n){var e,r,u,o=null;function i(i){if(e||(e=n()).then(function(n){n&&(o=n.default||n),u=!0},function(n){r=n,u=!0}),r)throw r;if(!u)throw e;return o?t(o,i):null}return i.displayName=\"Lazy\",i.__f=!0,i}function B(){this.i=null,this.l=null}e.unmount=function(n){var t=n.__c;t&&(t.__z=!0),t&&t.__R&&t.__R(),t&&32&n.__u&&(n.type=null),U&&U(n)},(P.prototype=new n).__c=function(n,t){var e=t.__c,r=this;null==r.o&&(r.o=[]),r.o.push(e);var u=j(r.__v),o=!1,i=function(){o||r.__z||(o=!0,e.__R=null,u?u(f):f())};e.__R=i;var l=e.__P;e.__P=null;var f=function(){if(!--r.__u){if(r.state.__a){var n=r.state.__a;r.__v.__k[0]=W(n,n.__c.__P,n.__c.__O)}var t;for(r.setState({__a:r.__b=null});t=r.o.pop();)t.__P=l,t.forceUpdate()}};r.__u++||32&t.__u||r.setState({__a:r.__b=r.__v.__k[0]}),n.then(i,i)},P.prototype.componentWillUnmount=function(){this.o=[]},P.prototype.render=function(n,e){if(this.__b){if(this.__v.__k){var r=document.createElement(\"div\"),o=this.__v.__k[0].__c;this.__v.__k[0]=V(this.__b,r,o.__O=o.__P)}this.__b=null}var i=e.__a&&t(u,null,n.fallback);return i&&(i.__u&=-33),[t(u,null,e.__a?null:n.children),i]};var H=function(n,t,e){if(++e[1]===e[0]&&n.l.delete(t),n.props.revealOrder&&(\"t\"!==n.props.revealOrder[0]||!n.l.size))for(e=n.i;e;){for(;e.length>3;)e.pop()();if(e[1]<e[0])break;n.i=e=e[2]}};function Z(n){return this.getChildContext=function(){return n.context},n.children}function Y(n){var e=this,r=n.h;if(e.componentWillUnmount=function(){o(null,e.v),e.v=null,e.h=null},e.h&&e.h!==r&&e.componentWillUnmount(),!e.v){for(var u=e.__v;null!==u&&!u.__m&&null!==u.__;)u=u.__;e.h=r,e.v={nodeType:1,parentNode:r,childNodes:[],__k:{__m:u.__m},contains:function(){return!0},namespaceURI:r.namespaceURI,insertBefore:function(n,t){this.childNodes.push(n),e.h.insertBefore(n,t)},removeChild:function(n){this.childNodes.splice(this.childNodes.indexOf(n)>>>1,1),e.h.removeChild(n)}}}o(t(Z,{context:e.context},n.__v),e.v)}function $(n,e){var r=t(Y,{__v:n,h:e});return r.containerInfo=e,r}(B.prototype=new n).__a=function(n){var t=this,e=j(t.__v),r=t.l.get(n);return r[0]++,function(u){var o=function(){t.props.revealOrder?(r.push(u),H(t,n,r)):u()};e?e(o):o()}},B.prototype.render=function(n){this.i=null,this.l=new Map;var t=r(n.children);n.revealOrder&&\"b\"===n.revealOrder[0]&&t.reverse();for(var e=t.length;e--;)this.l.set(t[e],this.i=[1,0,this.i]);return n.children},B.prototype.componentDidUpdate=B.prototype.componentDidMount=function(){var n=this;this.l.forEach(function(t,e){H(n,e,t)})};var q=\"undefined\"!=typeof Symbol&&Symbol.for&&Symbol.for(\"react.element\")||60103,G=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|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]/,J=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,K=/[A-Z0-9]/g,Q=\"undefined\"!=typeof document,X=function(n){return(\"undefined\"!=typeof Symbol&&\"symbol\"==typeof Symbol()?/fil|che|rad/:/fil|che|ra/).test(n)};function nn(n,t,e){return null==t.__k&&(t.textContent=\"\"),o(n,t),\"function\"==typeof e&&e(),n?n.__c:null}function tn(n,t,e){return i(n,t),\"function\"==typeof e&&e(),n?n.__c:null}n.prototype.isReactComponent=!0,[\"componentWillMount\",\"componentWillReceiveProps\",\"componentWillUpdate\"].forEach(function(t){Object.defineProperty(n.prototype,t,{configurable:!0,get:function(){return this[\"UNSAFE_\"+t]},set:function(n){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:n})}})});var en=e.event;e.event=function(n){return en&&(n=en(n)),n.persist=function(){},n.isPropagationStopped=function(){return this.cancelBubble},n.isDefaultPrevented=function(){return this.defaultPrevented},n.nativeEvent=n};var rn,un={configurable:!0,get:function(){return this.class}},on=e.vnode;e.vnode=function(n){\"string\"==typeof n.type&&function(n){var t=n.props,e=n.type,u={},o=-1==e.indexOf(\"-\");for(var i in t){var l=t[i];if(!(\"value\"===i&&\"defaultValue\"in t&&null==l||Q&&\"children\"===i&&\"noscript\"===e||\"class\"===i||\"className\"===i)){var f=i.toLowerCase();\"defaultValue\"===i&&\"value\"in t&&null==t.value?i=\"value\":\"download\"===i&&!0===l?l=\"\":\"translate\"===f&&\"no\"===l?l=!1:\"o\"===f[0]&&\"n\"===f[1]?\"ondoubleclick\"===f?i=\"ondblclick\":\"onchange\"!==f||\"input\"!==e&&\"textarea\"!==e||X(t.type)?\"onfocus\"===f?i=\"onfocusin\":\"onblur\"===f?i=\"onfocusout\":J.test(i)&&(i=f):f=i=\"oninput\":o&&G.test(i)?i=i.replace(K,\"-$&\").toLowerCase():null===l&&(l=void 0),\"oninput\"===f&&u[i=f]&&(i=\"oninputCapture\"),u[i]=l}}\"select\"==e&&(u.multiple&&Array.isArray(u.value)&&(u.value=r(t.children).forEach(function(n){n.props.selected=-1!=u.value.indexOf(n.props.value)})),null!=u.defaultValue&&(u.value=r(t.children).forEach(function(n){n.props.selected=u.multiple?-1!=u.defaultValue.indexOf(n.props.value):u.defaultValue==n.props.value}))),t.class&&!t.className?(u.class=t.class,Object.defineProperty(u,\"className\",un)):t.className&&(u.class=u.className=t.className),n.props=u}(n),n.$$typeof=q,on&&on(n)};var ln=e.__r;e.__r=function(n){ln&&ln(n),rn=n.__c};var fn=e.diffed;e.diffed=function(n){fn&&fn(n);var t=n.props,e=n.__e;null!=e&&\"textarea\"===n.type&&\"value\"in t&&t.value!==e.value&&(e.value=null==t.value?\"\":t.value),rn=null};var an={ReactCurrentDispatcher:{current:{readContext:function(n){return rn.__n[n.__c].props.value},useCallback:v,useContext:d,useDebugValue:m,useDeferredValue:w,useEffect:h,useId:p,useImperativeHandle:y,useInsertionEffect:I,useLayoutEffect:s,useMemo:_,useReducer:b,useRef:S,useState:c,useSyncExternalStore:C,useTransition:k}}},cn=\"18.3.1\";function sn(n){return t.bind(null,n)}function hn(n){return!!n&&n.$$typeof===q}function vn(n){return hn(n)&&n.type===u}function dn(n){return!!n&&\"string\"==typeof n.displayName&&0==n.displayName.indexOf(\"Memo(\")}function mn(n){return hn(n)?a.apply(null,arguments):n}function pn(n){return!!n.__k&&(o(null,n),!0)}function yn(n){return n&&(n.base||1===n.nodeType&&n)||null}var _n=function(n,t){return n(t)},bn=function(n,t){var r,u=e.debounceRendering;e.debounceRendering=function(n){r=n};try{var o=n(t);return r&&r(),o}finally{e.debounceRendering=u}},Sn=hn,gn={useState:c,useId:p,useReducer:b,useEffect:h,useLayoutEffect:s,useInsertionEffect:I,useTransition:k,useDeferredValue:w,useSyncExternalStore:C,startTransition:x,useRef:S,useImperativeHandle:y,useMemo:_,useCallback:v,useContext:d,useDebugValue:m,version:\"18.3.1\",Children:L,render:nn,hydrate:tn,unmountComponentAtNode:pn,createPortal:$,createElement:t,createContext:l,createFactory:sn,cloneElement:mn,createRef:f,Fragment:u,isValidElement:hn,isElement:Sn,isFragment:vn,isMemo:dn,findDOMNode:yn,Component:n,PureComponent:M,memo:N,forwardRef:D,flushSync:bn,unstable_batchedUpdates:_n,StrictMode:u,Suspense:P,SuspenseList:B,lazy:z,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:an};export{L as Children,M as PureComponent,P as Suspense,B as SuspenseList,an as __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,mn as cloneElement,sn as createFactory,$ as createPortal,gn as default,yn as findDOMNode,bn as flushSync,D as forwardRef,tn as hydrate,Sn as isElement,vn as isFragment,dn as isMemo,hn as isValidElement,z as lazy,N as memo,nn as render,x as startTransition,pn as unmountComponentAtNode,_n as unstable_batchedUpdates,w as useDeferredValue,I as useInsertionEffect,C as useSyncExternalStore,k as useTransition,cn as version};\n//# sourceMappingURL=compat.module.js.map\n","import { render, hydrate, unmountComponentAtNode } from 'preact/compat';\n\nexport function createRoot(container) {\n\treturn {\n\t\t// eslint-disable-next-line\n\t\trender: function (children) {\n\t\t\trender(children, container);\n\t\t},\n\t\t// eslint-disable-next-line\n\t\tunmount: function () {\n\t\t\tunmountComponentAtNode(container);\n\t\t}\n\t};\n}\n\nexport function hydrateRoot(container, children) {\n\thydrate(children, container);\n\treturn createRoot(container);\n}\n\nexport default {\n\tcreateRoot,\n\thydrateRoot\n};\n","const NativeTemporal = globalThis.Temporal;\n\nexport { NativeTemporal };\n","// Low-Level\nexport const expectedPositive = (entityName, num) => `Non-positive ${entityName}: ${num}`;\nexport const expectedFinite = (entityName, num) => `Non-finite ${entityName}: ${num}`;\nexport const forbiddenBigIntToNumber = (entityName) => `Cannot convert bigint to ${entityName}`;\nexport const invalidObject = 'Invalid object';\nexport const numberOutOfRange = (entityName, val, min, max) => invalidEntity(entityName, val) + `; must be between ${min}-${max}`;\n// Entity/Fields/Bags\nexport const invalidEntity = (fieldName, val) => `Invalid ${fieldName}: ${val}`;\n// Calendar\nexport const unsupportedWeekNumbers = 'Calendar week operations forbidden';\n// Rounding\nexport const nonOneRoundingIncrement = 'Non-1 roundingIncrement not allowed';\n// Options\nexport const invalidOverflowOption = 'Invalid overflow option';\n","import * as errorMessages from './errorMessages.js';\nexport const nanoInMicro = 1_000;\nexport const nanoInMilli = 1_000_000;\nexport const nanoInSec = 1_000_000_000;\nexport const nanoInMinute = 60_000_000_000;\nexport const nanoInHour = 3_600_000_000_000;\nexport function normalizeOptions(options) {\n    if (options === undefined) {\n        return Object.create(null);\n    }\n    return requireObjectLike(options);\n}\nexport function toFiniteNumber(arg, entityName = 'number') {\n    if (typeof arg === 'bigint') {\n        throw new TypeError(errorMessages.forbiddenBigIntToNumber(entityName));\n    }\n    arg = Number(arg);\n    if (!Number.isFinite(arg)) {\n        throw new RangeError(errorMessages.expectedFinite(entityName, arg));\n    }\n    return arg;\n}\nexport function toIntegerWithTrunc(arg, entityName) {\n    return Math.trunc(toFiniteNumber(arg, entityName)) || 0; // ensure no -0\n}\nexport function toPositiveIntegerWithTruncation(arg, entityName) {\n    return requireNumberIsPositive(toIntegerWithTrunc(arg, entityName), entityName);\n}\n/*\nAlready known to be number.\n*/\nexport function requireNumberIsPositive(num, entityName = 'number') {\n    if (num <= 0) {\n        throw new RangeError(errorMessages.expectedPositive(entityName, num));\n    }\n    return num;\n}\n/*\nmin/max are inclusive\n*/\nexport function constrainToRange(num, min, max) {\n    return Math.min(Math.max(num, min), max);\n}\nexport function isObjectLike(arg) {\n    return arg !== null && (typeof arg === 'object' || typeof arg === 'function');\n}\nexport function requireObjectLike(arg) {\n    if (!isObjectLike(arg)) {\n        throw new TypeError(errorMessages.invalidObject);\n    }\n    return arg;\n}\n// Options-bag-parsing-adjacent\n// ----------------------------\n/*\nAlready known to be number\n*/\nexport function normalizeNumberInRange(num, min, max, // inclusive\noptions) {\n    const clamped = constrainToRange(num, min, max);\n    if (normalizeOverflow(options) === 'reject' && num !== clamped) {\n        throw new RangeError(errorMessages.numberOutOfRange('number', num, min, max));\n    }\n    return clamped;\n}\n/*\nMatch Temporal's field overflow shape without depending on the polyfill's\ninternal option readers. Undefined defaults to constrain; explicit reject asks\nfor exact in-range input.\n*/\nfunction normalizeOverflow(options) {\n    options = normalizeOptions(options);\n    const overflow = options.overflow;\n    if (overflow === undefined) {\n        return 'constrain';\n    }\n    if (overflow === 'constrain' || overflow === 'reject') {\n        return overflow;\n    }\n    throw new RangeError(errorMessages.invalidOverflowOption);\n}\n","import * as TemporalUtils from \"temporal-utils/protected\";\n\nimport { toFiniteNumber, isObjectLike as isObjectLike$1, toIntegerWithTrunc, requireObjectLike, normalizeOptions, toPositiveIntegerWithTruncation } from \"temporal-utils/protected\";\n\nimport * as baseErrorMessages from \"temporal-utils/protected-error-messages\";\n\nconst invalidEntity = baseErrorMessages.invalidEntity;\n\nconst unsupportedWeekNumbers = baseErrorMessages.unsupportedWeekNumbers;\n\nconst missingField = fieldName => `Missing ${fieldName}`;\n\nconst noValidFields = validFields => \"No valid fields: \" + validFields.join();\n\nconst invalidBag = \"Invalid bag\";\n\nconst invalidChoice = (fieldName, val, choiceMap) => baseErrorMessages.invalidEntity(fieldName, val) + \"; must be \" + Object.keys(choiceMap).join();\n\nconst forbiddenValueOf = \"Cannot use valueOf\";\n\nconst invalidCallingContext = \"Invalid calling context\";\n\nconst missingYear = allowEra => \"Missing year\" + (allowEra ? \"/era/eraYear\" : \"\");\n\nconst invalidLeapMonth = \"Invalid leap month\";\n\nconst invalidCalendar = calendarId => baseErrorMessages.invalidEntity(\"Calendar\", calendarId);\n\nconst exoticCalendarRequired = (calendarId, remedy) => `Unknown calendar ${calendarId}; might need ${remedy}`;\n\nconst invalidTimeZone = calendarId => baseErrorMessages.invalidEntity(\"TimeZone\", calendarId);\n\nconst outOfBoundsDate = \"Out-of-bounds date\";\n\nconst invalidRelativeTo = arg => invalidEntity(\"relativeTo\", arg);\n\nconst failedParse = s => `Cannot parse: ${s}`;\n\nconst invalidSubstring = substring => `Invalid substring: ${substring}`;\n\nconst invalidFormatType = branding => `Cannot format ${branding}`;\n\nconst mismatchingFormatTypes = \"Mismatching types for formatting\";\n\nconst constrainToRange = TemporalUtils.constrainToRange;\n\nconst isObjectLike = TemporalUtils.isObjectLike;\n\nfunction throwRangeError(message) {\n  throw new RangeError(message);\n}\n\nfunction throwTypeError(message) {\n  throw new TypeError(message);\n}\n\nfunction clampProp(props, propName, min, max, overflow) {\n  return clampEntity(propName, ((props, propName) => {\n    const propVal = props[propName];\n    return void 0 === propVal && throwTypeError(missingField(propName)), propVal;\n  })(props, propName), min, max, overflow);\n}\n\nfunction clampEntity(entityName, num, min, max, overflow, choices) {\n  const clamped = constrainToRange(num, min, max);\n  return overflow && num !== clamped && throwRangeError(((entityName, val, min, max, choices) => choices ? baseErrorMessages.numberOutOfRange(entityName, choices[val], choices[min], choices[max]) : baseErrorMessages.numberOutOfRange(entityName, val, min, max))(entityName, num, min, max, choices)), \n  clamped;\n}\n\nfunction memoize(generator, MapClass = Map) {\n  const map = new MapClass;\n  return (key, ...otherArgs) => {\n    if (map.has(key)) {\n      return map.get(key);\n    }\n    const val = generator(key, ...otherArgs);\n    return map.set(key, val), val;\n  };\n}\n\nconst createNameDescriptors = name => createPropDescriptors({\n  name: name\n}, 1);\n\nconst createPropDescriptors = (propVals, readonly) => mapProps(value => ({\n  value: value,\n  configurable: 1,\n  writable: !readonly\n}), propVals);\n\nconst createStringTagDescriptors = value => ({\n  [Symbol.toStringTag]: {\n    value: value,\n    configurable: 1\n  }\n});\n\nfunction mapProps(transformer, props) {\n  const res = {};\n  for (const propName in props) {\n    res[propName] = transformer(props[propName], propName);\n  }\n  return res;\n}\n\nfunction zipPropsConst(propNames, propVal) {\n  const res = {};\n  for (const propName of propNames) {\n    res[propName] = propVal;\n  }\n  return res;\n}\n\nfunction createPropGetters(propNames) {\n  const getters = {};\n  for (const propName of propNames) {\n    getters[propName] = slots => slots[propName];\n  }\n  return getters;\n}\n\nfunction pluckProps(propNames, props, dest = Object.create(null)) {\n  for (const propName of propNames) {\n    dest[propName] = props[propName];\n  }\n  return dest;\n}\n\nfunction allPropsEqual(propNames, props0, props1) {\n  for (const propName of propNames) {\n    if (props0[propName] !== props1[propName]) {\n      return 0;\n    }\n  }\n  return 1;\n}\n\nfunction zeroOutProps(propNames, clearUntilI, props) {\n  const copy = {\n    ...props\n  };\n  for (let i = 0; i < clearUntilI; i++) {\n    copy[propNames[i]] = 0;\n  }\n  return copy;\n}\n\nfunction bindArgs(f, ...boundArgs) {\n  return (...dynamicArgs) => f(...boundArgs, ...dynamicArgs);\n}\n\nfunction identity(arg) {\n  return arg;\n}\n\nfunction noop() {}\n\nfunction capitalize(s) {\n  return s[0].toUpperCase() + s.substring(1);\n}\n\nfunction sortStrings(...strss) {\n  return [].concat(...strss).sort();\n}\n\nfunction createRegExp(meat) {\n  return new RegExp(`^${meat}$`, \"i\");\n}\n\nfunction parseSubsecNano(fracStr) {\n  return parseInt(fracStr.padEnd(9, \"0\"));\n}\n\nfunction parseSign(s) {\n  return s && \"+\" !== s ? -1 : 1;\n}\n\nfunction parseInt0(s) {\n  return void 0 === s ? 0 : parseInt(s);\n}\n\nfunction padNumber(digits, num) {\n  return String(num).padStart(digits, \"0\");\n}\n\nconst padNumber2 = /*@__PURE__*/ bindArgs(padNumber, 2);\n\nfunction compareNumbers(a, b) {\n  return Math.sign(a - b);\n}\n\nfunction compareBigInts(a, b) {\n  return a < b ? -1 : a > b ? 1 : 0;\n}\n\nfunction divFloorBigInt(num, denom) {\n  const whole = num / denom;\n  return num % denom < 0n ? whole - 1n : whole;\n}\n\nfunction divModFloorBigInt(num, divisor) {\n  const quotient = divFloorBigInt(num, divisor);\n  return [ quotient, num - quotient * divisor ];\n}\n\nfunction divModFloor(num, divisor) {\n  return [ Math.floor(num / divisor), modFloor(num, divisor) ];\n}\n\nfunction modFloor(num, divisor) {\n  return (num % divisor + divisor) % divisor;\n}\n\nfunction divTrunc(num, divisor) {\n  return Math.trunc(num / divisor) || 0;\n}\n\nfunction modTrunc(num, divisor) {\n  return num % divisor || 0;\n}\n\nfunction fabricateNearHalfFraction(halfCompare, sign = 1) {\n  return sign * (.5 + halfCompare / 5);\n}\n\nfunction hasHalf(num) {\n  return .5 === Math.abs(num % 1);\n}\n\nconst isoCalendarId = \"iso8601\";\n\nconst gregoryCalendarId = \"gregory\";\n\nconst gregoryEraOrigins = {\n  \"bce\": -1,\n  \"ce\": 0\n};\n\nfunction normalizeEraName(era) {\n  const normalized = era.normalize(\"NFD\").toLowerCase().replace(/[^a-z0-9]/g, \"\");\n  return \"bc\" === normalized || \"b\" === normalized ? \"bce\" : \"ad\" === normalized || \"a\" === normalized ? \"ce\" : normalized;\n}\n\nconst isoCalendarImpl = void 0;\n\nconst gregoryCalendarImpl = 0;\n\nfunction getCalendarSlotId(calendar) {\n  return calendar === isoCalendarImpl ? \"iso8601\" : 0 === calendar ? \"gregory\" : calendar.id;\n}\n\nconst monthCodeRegExp = /^M(\\d{2})(L?)$/;\n\nfunction parseMonthCode(monthCode) {\n  const m = monthCodeRegExp.exec(monthCode);\n  return m || throwRangeError((monthCode => `Invalid monthCode: ${monthCode}`)(monthCode)), \n  [ parseInt(m[1]), Boolean(m[2]) ];\n}\n\nfunction formatMonthCode(monthCodeNumber, isLeapMonth) {\n  return \"M\" + padNumber2(monthCodeNumber) + (isLeapMonth ? \"L\" : \"\");\n}\n\nfunction monthCodeNumberToMonth(monthCodeNumber, isLeapMonth, leapMonth) {\n  return monthCodeNumber + (isLeapMonth || leapMonth && monthCodeNumber >= leapMonth ? 1 : 0);\n}\n\nfunction monthToMonthCodeNumber(month, leapMonth) {\n  return month - (leapMonth && month >= leapMonth ? 1 : 0);\n}\n\nconst unitNameMap = {\n  nanosecond: 0,\n  microsecond: 1,\n  millisecond: 2,\n  second: 3,\n  minute: 4,\n  hour: 5,\n  day: 6,\n  week: 7,\n  month: 8,\n  year: 9\n};\n\nconst unitNamesAsc = /*@__PURE__*/ Object.keys(unitNameMap);\n\nconst milliInUtcDay = 864e5;\n\nconst nanoInMicro = TemporalUtils.nanoInMicro;\n\nconst nanoInMilli = TemporalUtils.nanoInMilli;\n\nconst nanoInSec = TemporalUtils.nanoInSec;\n\nconst nanoInMinute = TemporalUtils.nanoInMinute;\n\nconst nanoInHour = TemporalUtils.nanoInHour;\n\nconst nanoInUtcDay = 864e11;\n\nconst unitNanoMap = [ 1, nanoInMicro, nanoInMilli, nanoInSec, nanoInMinute, nanoInHour, nanoInUtcDay ];\n\nconst bigNanoInMicro = /*@__PURE__*/ BigInt(nanoInMicro);\n\nconst bigNanoInMilli = /*@__PURE__*/ BigInt(nanoInMilli);\n\nconst bigNanoInSec = /*@__PURE__*/ BigInt(nanoInSec);\n\nconst bigNanoInMinute = /*@__PURE__*/ BigInt(nanoInMinute);\n\nconst bigNanoInHour = /*@__PURE__*/ BigInt(nanoInHour);\n\nconst bigNanoInUtcDay = /*@__PURE__*/ BigInt(nanoInUtcDay);\n\nfunction divideBigNanoToExactNumber(bigNano, divisorNano) {\n  const days = Number(bigNano / bigNanoInUtcDay);\n  const timeNano = Number(bigNano % bigNanoInUtcDay);\n  return days * (nanoInUtcDay / divisorNano) + (Math.trunc(timeNano / divisorNano) + timeNano % divisorNano / divisorNano);\n}\n\nconst timeFieldNamesAsc = /*@__PURE__*/ unitNamesAsc.slice(0, 6);\n\nconst timeGetters = /*@__PURE__*/ createPropGetters(timeFieldNamesAsc);\n\nconst yearFieldNamesAsc = [ \"year\" ];\n\nconst dayFieldNamesAsc = [ \"day\" ];\n\nconst calendarDateFieldNamesAsc = [ \"day\", \"month\", \"year\" ];\n\nconst offsetFieldNames = [ \"offset\" ];\n\nconst timeZoneFieldNames = [ \"timeZone\" ];\n\nconst eraYearFieldNames = [ \"era\", \"eraYear\" ];\n\nconst allYearFieldNames = [ \"era\", \"eraYear\", \"year\" ];\n\nconst monthFieldNames = [ \"month\", \"monthCode\" ];\n\nconst monthDayFieldNames = [ \"day\", \"month\", \"monthCode\" ];\n\nconst timeFieldNamesAlpha = /*@__PURE__*/ sortStrings(timeFieldNamesAsc);\n\nconst yearFieldNamesWithEraAlpha = /*@__PURE__*/ sortStrings(eraYearFieldNames, yearFieldNamesAsc);\n\nconst yearMonthFieldNamesAlpha = /*@__PURE__*/ sortStrings(monthFieldNames, yearFieldNamesAsc);\n\nconst yearMonthFieldNamesWithEraAlpha = /*@__PURE__*/ sortStrings(eraYearFieldNames, yearMonthFieldNamesAlpha);\n\nconst yearMonthCodeFieldNamesAlpha = /*@__PURE__*/ sortStrings([ \"monthCode\" ], yearFieldNamesAsc);\n\nconst yearMonthCodeFieldNamesWithEraAlpha = /*@__PURE__*/ sortStrings(eraYearFieldNames, yearMonthCodeFieldNamesAlpha);\n\nconst monthCodeDayFieldNamesAlpha = /*@__PURE__*/ sortStrings(dayFieldNamesAsc, [ \"monthCode\" ]);\n\nconst dateFieldNamesAlpha = /*@__PURE__*/ sortStrings(dayFieldNamesAsc, yearMonthFieldNamesAlpha);\n\nconst dateFieldNamesWithEraAlpha = /*@__PURE__*/ sortStrings(dayFieldNamesAsc, eraYearFieldNames, yearMonthFieldNamesAlpha);\n\nconst dateTimeFieldNamesAlpha = /*@__PURE__*/ sortStrings(dateFieldNamesAlpha, timeFieldNamesAsc);\n\nconst dateTimeFieldNamesWithEraAlpha = /*@__PURE__*/ sortStrings(dateFieldNamesWithEraAlpha, timeFieldNamesAsc);\n\nconst dateTimeAndOffsetFieldNamesAlpha = /*@__PURE__*/ sortStrings(dateFieldNamesAlpha, timeFieldNamesAsc, offsetFieldNames);\n\nconst dateTimeAndOffsetFieldNamesWithEraAlpha = /*@__PURE__*/ sortStrings(dateFieldNamesWithEraAlpha, timeFieldNamesAsc, offsetFieldNames);\n\nconst dateTimeAndZoneFieldNamesAlpha = /*@__PURE__*/ sortStrings(dateFieldNamesAlpha, timeFieldNamesAsc, offsetFieldNames, timeZoneFieldNames);\n\nconst dateTimeAndZoneFieldNamesWithEraAlpha = /*@__PURE__*/ sortStrings(dateFieldNamesWithEraAlpha, timeFieldNamesAsc, offsetFieldNames, timeZoneFieldNames);\n\nconst yearMonthCodeDayFieldNamesAlpha = /*@__PURE__*/ sortStrings(dayFieldNamesAsc, yearMonthCodeFieldNamesAlpha);\n\nconst yearMonthCodeDayFieldNamesWithEraAlpha = /*@__PURE__*/ sortStrings(dayFieldNamesAsc, eraYearFieldNames, yearMonthCodeFieldNamesAlpha);\n\nconst timeFieldDefaults = /*@__PURE__*/ zipPropsConst(timeFieldNamesAsc, 0);\n\nfunction validateTimeFields(timeFields) {\n  return constrainTimeFields(timeFields, 1), timeFields;\n}\n\nconst maxValues = {\n  hour: 23,\n  minute: 59,\n  second: 59\n};\n\nfunction constrainTimeFields(timeFields, overflow) {\n  const constrainedFields = {};\n  for (const fieldName of timeFieldNamesAsc) {\n    constrainedFields[fieldName] = clampEntity(fieldName, timeFields[fieldName], 0, maxValues[fieldName] || 999, overflow);\n  }\n  return constrainedFields;\n}\n\nfunction timeFieldsToNano(timeFields) {\n  return timeFieldsToSec(timeFields) * nanoInSec + timeFieldsToSubsecNano(timeFields);\n}\n\nfunction timeFieldsToMilli(timeFields) {\n  return 1e3 * timeFieldsToSec(timeFields) + timeFields.millisecond;\n}\n\nfunction timeFieldsToSec(timeFields) {\n  return 3600 * timeFields.hour + 60 * timeFields.minute + timeFields.second;\n}\n\nfunction timeFieldsToSubsecNano(timeFields) {\n  return timeFields.millisecond * nanoInMilli + timeFields.microsecond * nanoInMicro + timeFields.nanosecond;\n}\n\nfunction nanoToTimeAndDay(nano) {\n  const [dayDelta, timeNano] = divModFloor(nano, nanoInUtcDay);\n  return [ nanoToTimeFields(timeNano), dayDelta ];\n}\n\nfunction nanoToTimeFields(timeNano) {\n  const [timeMilli, nanoAfterMilli] = divModFloor(timeNano, nanoInMilli);\n  const [microsecond, nanosecond] = divModFloor(nanoAfterMilli, nanoInMicro);\n  return milliToTimeFields(timeMilli, microsecond, nanosecond);\n}\n\nfunction milliToTimeFields(timeMilli, microsecond = 0, nanosecond = 0) {\n  const [hour, milliAfterHour] = divModFloor(timeMilli, 36e5);\n  const [minute, milliAfterMinute] = divModFloor(milliAfterHour, 6e4);\n  const [second, millisecond] = divModFloor(milliAfterMinute, 1e3);\n  return {\n    hour: hour,\n    minute: minute,\n    second: second,\n    millisecond: millisecond,\n    microsecond: microsecond,\n    nanosecond: nanosecond\n  };\n}\n\nfunction epochNanoToSecMod(epochNano) {\n  const [epochSec, nano] = divModFloorBigInt(epochNano, bigNanoInSec);\n  return [ Number(epochSec), Number(nano) ];\n}\n\nfunction epochNanoToMilli(epochNano) {\n  return Number(divFloorBigInt(epochNano, bigNanoInMilli));\n}\n\nfunction isoDateTimeToEpochNano(isoDateTime) {\n  return isoDateToEpochNano(isoDateTime) + BigInt(timeFieldsToNano(isoDateTime));\n}\n\nfunction isoDateTimeToEpochMilli(isoDateTime) {\n  return isoDateToEpochMilli(isoDateTime) + timeFieldsToMilli(isoDateTime);\n}\n\nfunction isoDateToEpochNano(isoDate) {\n  return BigInt(isoDateToEpochDays(isoDate)) * bigNanoInUtcDay;\n}\n\nfunction isoDateToEpochMilli(isoDate) {\n  return 864e5 * isoDateToEpochDays(isoDate);\n}\n\nfunction isoDateToEpochDays(isoDate) {\n  return isoPartsToEpochDays(isoDate.year, isoDate.month, isoDate.day);\n}\n\nfunction isoPartsToEpochDays(isoYear, isoMonth = 1, isoDay = 1) {\n  const monthIndex = isoMonth - 1;\n  return isoYear += Math.floor(monthIndex / 12), isoMonth = modFloor(monthIndex, 12), \n  Date.UTC(isoYear % 400 - 400, isoMonth, 0) / 864e5 + 146097 * (divTrunc(isoYear, 400) + 1) + isoDay;\n}\n\nfunction epochNanoToIsoDateTime(epochNano) {\n  const [epochDays, nanoAfterDay] = divModFloorBigInt(epochNano, bigNanoInUtcDay);\n  return {\n    ...epochDaysToIsoDate(Number(epochDays)),\n    ...nanoToTimeFields(Number(nanoAfterDay))\n  };\n}\n\nfunction epochMilliToIsoDateTime(epochMilli, microsecond = 0, nanosecond = 0) {\n  const [epochDays, milliAfterDay] = divModFloor(epochMilli, 864e5);\n  return {\n    ...epochDaysToIsoDate(epochDays),\n    ...milliToTimeFields(milliAfterDay, microsecond, nanosecond)\n  };\n}\n\nfunction epochDaysToIsoDate(epochDays) {\n  const legacyDate = new Date(864e5 * modFloor(epochDays, 146097));\n  return {\n    year: legacyDate.getUTCFullYear() + 400 * Math.floor(epochDays / 146097),\n    month: legacyDate.getUTCMonth() + 1,\n    day: legacyDate.getUTCDate()\n  };\n}\n\nfunction diffEpochMilliDays(epochMilli0, epochMilli1) {\n  return Math.trunc((epochMilli1 - epochMilli0) / 864e5);\n}\n\nconst isoEpochOriginYear = 1970;\n\nconst isoEpochFirstLeapYear = 1972;\n\nconst isoMonthsInYear = 12;\n\nfunction computeIsoMonthCodeParts(month) {\n  return [ month, 0 ];\n}\n\nfunction computeIsoYearMonthFieldsForMonthDay(monthCodeNumber, isLeapMonth) {\n  if (!isLeapMonth) {\n    return {\n      year: 1972,\n      month: monthCodeNumber\n    };\n  }\n}\n\nfunction computeIsoFieldsFromParts(year, month, day) {\n  return {\n    year: year,\n    month: month,\n    day: day\n  };\n}\n\nfunction computeIsoDaysInMonth(year, month) {\n  switch (month) {\n   case 2:\n    return computeIsoInLeapYear(year) ? 29 : 28;\n\n   case 4:\n   case 6:\n   case 9:\n   case 11:\n    return 30;\n  }\n  return 31;\n}\n\nfunction computeIsoDaysInYear(year) {\n  return computeIsoInLeapYear(year) ? 366 : 365;\n}\n\nfunction computeIsoInLeapYear(year) {\n  return year % 4 == 0 && (year % 100 != 0 || year % 400 == 0);\n}\n\nfunction addIsoMonths(year, month, monthDelta) {\n  return year += divTrunc(monthDelta, 12), (month += modTrunc(monthDelta, 12)) < 1 ? (year--, \n  month += 12) : month > 12 && (year++, month -= 12), {\n    year: year,\n    month: month\n  };\n}\n\nfunction diffIsoMonthSlots(year0, month0, year1, month1) {\n  return 12 * (year1 - year0) + month1 - month0;\n}\n\nfunction computeIsoDayOfWeek(isoDate) {\n  return modFloor(isoPartsToEpochDays(isoDate.year, isoDate.month, isoDate.day) + 4, 7) || 7;\n}\n\nfunction computeIsoDayOfYear(isoDate) {\n  return isoPartsToEpochDays(isoDate.year, isoDate.month, isoDate.day) - isoPartsToEpochDays(isoDate.year) + 1;\n}\n\nfunction computeIsoWeekFields(isoDate) {\n  let yearOfWeek = isoDate.year;\n  let weekOfYear = Math.floor((computeIsoDayOfYear(isoDate) - computeIsoDayOfWeek(isoDate) + 10) / 7);\n  let weeksInYear = computeIsoWeeksInYear(yearOfWeek);\n  return weekOfYear < 1 ? weekOfYear = weeksInYear = computeIsoWeeksInYear(--yearOfWeek) : weekOfYear > weeksInYear && (weekOfYear = 1, \n  weeksInYear = computeIsoWeeksInYear(++yearOfWeek)), {\n    weekOfYear: weekOfYear,\n    yearOfWeek: yearOfWeek,\n    De: weeksInYear\n  };\n}\n\nfunction computeIsoWeeksInYear(year) {\n  const y0DayOfWeek = computeIsoDayOfWeek({\n    year: year,\n    month: 1,\n    day: 1\n  });\n  return 4 === y0DayOfWeek || 3 === y0DayOfWeek && computeIsoInLeapYear(year) ? 53 : 52;\n}\n\nfunction computeGregoryEraFields({year: year}) {\n  return year < 1 ? {\n    era: \"bce\",\n    eraYear: 1 - year\n  } : {\n    era: \"ce\",\n    eraYear: year\n  };\n}\n\nfunction validateIsoDateTimeFields(isoDateTime) {\n  return validateIsoDateFields(isoDateTime), validateTimeFields(isoDateTime);\n}\n\nfunction validateIsoDateFields(isoInternals) {\n  return constrainIsoDateFields(isoInternals, 1), isoInternals;\n}\n\nfunction isIsoDateFieldsValid(isoDate) {\n  return allPropsEqual(calendarDateFieldNamesAsc, isoDate, constrainIsoDateFields(isoDate));\n}\n\nfunction constrainIsoDateFields(isoDate, overflow) {\n  const {year: year} = isoDate;\n  const month = clampProp(isoDate, \"month\", 1, 12, overflow);\n  return {\n    year: year,\n    month: month,\n    day: clampProp(isoDate, \"day\", 1, computeIsoDaysInMonth(year, month), overflow)\n  };\n}\n\nfunction computeCalendarDateFields(calendar, isoDate) {\n  return calendar ? calendar.de(isoDate) : isoDate;\n}\n\nfunction computeCalendarMonthCodeParts(calendar, year, month) {\n  return calendar ? calendar.N(year, month) : computeIsoMonthCodeParts(month);\n}\n\nfunction computeCalendarEraFields(calendar, isoDate) {\n  return 0 === calendar ? computeGregoryEraFields(isoDate) : calendar && calendar.h?.(isoDate) || {};\n}\n\nfunction computeCalendarIsoFieldsFromParts(calendar, year, month, day) {\n  return calendar ? calendar.fe(year, month, day) : computeIsoFieldsFromParts(year, month, day);\n}\n\nfunction computeCalendarMonthsInYearForYear(calendar, year) {\n  return calendar ? calendar.j(year) : 12;\n}\n\nfunction computeCalendarDaysInMonthForYearMonth(calendar, year, month) {\n  return calendar ? calendar.o(year, month) : computeIsoDaysInMonth(year, month);\n}\n\nfunction computeCalendarMonthCode(calendar, isoDate) {\n  const {year: year, month: month} = computeCalendarDateFields(calendar, isoDate);\n  const [monthCodeNumber, isLeapMonth] = computeCalendarMonthCodeParts(calendar, year, month);\n  return formatMonthCode(monthCodeNumber, isLeapMonth);\n}\n\nfunction computeCalendarInLeapYear(calendar, isoDate) {\n  const {year: year} = computeCalendarDateFields(calendar, isoDate);\n  return calendar ? calendar.q(year) : computeIsoInLeapYear(year);\n}\n\nfunction computeCalendarMonthsInYear(calendar, isoDate) {\n  const {year: year} = computeCalendarDateFields(calendar, isoDate);\n  return computeCalendarMonthsInYearForYear(calendar, year);\n}\n\nfunction computeCalendarDaysInMonth(calendar, isoDate) {\n  const {year: year, month: month} = computeCalendarDateFields(calendar, isoDate);\n  return computeCalendarDaysInMonthForYearMonth(calendar, year, month);\n}\n\nfunction computeCalendarDaysInYear(calendar, isoDate) {\n  const {year: year} = computeCalendarDateFields(calendar, isoDate);\n  return calendar ? calendar.i(year) : computeIsoDaysInYear(year);\n}\n\nfunction computeCalendarDayOfYear(calendar, isoDate) {\n  if (!calendar) {\n    return computeIsoDayOfYear(isoDate);\n  }\n  const {year: year} = computeCalendarDateFields(calendar, isoDate);\n  const yearStartIsoDate = computeCalendarIsoFieldsFromParts(calendar, year, 1, 1);\n  return isoDateToEpochDays(isoDate) - isoDateToEpochDays(yearStartIsoDate) + 1;\n}\n\nfunction computeCalendarWeekOfYear(calendar, isoDate) {\n  return calendar === isoCalendarImpl ? computeIsoWeekFields(isoDate).weekOfYear : void 0;\n}\n\nfunction computeCalendarYearOfWeek(calendar, isoDate) {\n  return calendar === isoCalendarImpl ? computeIsoWeekFields(isoDate).yearOfWeek : void 0;\n}\n\nconst durationFieldNamesAsc = /*@__PURE__*/ unitNamesAsc.map(unitName => unitName + \"s\");\n\nconst durationGetters = /*@__PURE__*/ createPropGetters(durationFieldNamesAsc);\n\nconst durationFieldNamesAlpha = /*@__PURE__*/ sortStrings(durationFieldNamesAsc);\n\nconst durationTimeFieldNamesAsc = /*@__PURE__*/ durationFieldNamesAsc.slice(0, 6);\n\nconst durationDateFieldNamesAsc = /*@__PURE__*/ durationFieldNamesAsc.slice(6);\n\nconst durationCalendarFieldNamesAsc = /*@__PURE__*/ durationDateFieldNamesAsc.slice(1);\n\nconst durationFieldDefaults = /*@__PURE__*/ zipPropsConst(durationFieldNamesAsc, 0);\n\nconst durationTimeFieldDefaults = /*@__PURE__*/ zipPropsConst(durationTimeFieldNamesAsc, 0);\n\nconst clearDurationFields = /*@__PURE__*/ bindArgs(zeroOutProps, durationFieldNamesAsc);\n\nfunction requirePropDefined(optionName, optionVal) {\n  return null == optionVal && throwRangeError(missingField(optionName)), optionVal;\n}\n\nconst requireString = /*@__PURE__*/ bindArgs(requireType, \"string\");\n\nfunction requireType(typeName, arg, entityName = typeName) {\n  return typeof arg !== typeName && throwTypeError(invalidEntity(entityName, arg)), \n  arg;\n}\n\nfunction requireNumberIsInteger(num, entityName = \"number\") {\n  return Number.isInteger(num) || throwRangeError(((entityName, num) => `Non-integer ${entityName}: ${num}`)(entityName, num)), \n  num || 0;\n}\n\nfunction toString(arg) {\n  return \"symbol\" == typeof arg && throwTypeError(\"Cannot convert Symbol to string\"), \n  String(arg);\n}\n\nfunction toPrimitiveWithStringHint(arg) {\n  if (!isObjectLike$1(arg)) {\n    return arg;\n  }\n  const exoticToPrimitive = arg[Symbol.toPrimitive];\n  if (null != exoticToPrimitive) {\n    \"function\" != typeof exoticToPrimitive && throwTypeError();\n    const primitive = Reflect.apply(exoticToPrimitive, arg, [ \"string\" ]);\n    return isObjectLike$1(primitive) && throwTypeError(), primitive;\n  }\n  return Date.prototype[Symbol.toPrimitive].call(arg, \"string\");\n}\n\nfunction toBigInt(bi) {\n  return \"boolean\" == typeof bi ? BigInt(bi ? 1 : 0) : \"string\" == typeof bi ? BigInt(bi) : (\"bigint\" != typeof bi && throwTypeError(`Invalid bigint: ${bi}`), \n  bi);\n}\n\nfunction toStrictInteger(arg, entityName) {\n  return requireNumberIsInteger(toFiniteNumber(arg, entityName), entityName);\n}\n\nconst smallestUnitStr = \"smallestUnit\";\n\nconst overflowMap = {\n  constrain: 0,\n  reject: 1\n};\n\nconst epochDisambigMap = {\n  compatible: 0,\n  reject: 1,\n  earlier: 2,\n  later: 3\n};\n\nconst offsetDisambigMap = {\n  reject: 0,\n  use: 1,\n  prefer: 2,\n  ignore: 3\n};\n\nconst calendarDisplayMap = {\n  auto: 0,\n  never: 1,\n  critical: 2,\n  always: 3\n};\n\nconst timeZoneDisplayMap = {\n  auto: 0,\n  never: 1,\n  critical: 2\n};\n\nconst offsetDisplayMap = {\n  auto: 0,\n  never: 1\n};\n\nconst roundingModeMap = {\n  floor: 0,\n  halfFloor: 1,\n  ceil: 2,\n  halfCeil: 3,\n  trunc: 4,\n  halfTrunc: 5,\n  expand: 6,\n  halfExpand: 7,\n  halfEven: 8\n};\n\nconst roundingModeFuncs = [ Math.floor, num => hasHalf(num) ? Math.floor(num) : Math.round(num), Math.ceil, num => hasHalf(num) ? Math.ceil(num) : Math.round(num), Math.trunc, num => hasHalf(num) ? Math.trunc(num) || 0 : Math.round(num), num => num < 0 ? Math.floor(num) : Math.ceil(num), num => Math.sign(num) * Math.round(Math.abs(num)) || 0, num => hasHalf(num) ? (num = Math.trunc(num) || 0) + num % 2 : Math.round(num) ];\n\nconst directionMap = {\n  previous: -1,\n  next: 1\n};\n\nfunction coerceRoundingIncInteger(options) {\n  const roundingInc = options.roundingIncrement;\n  return void 0 === roundingInc ? 1 : toIntegerWithTrunc(roundingInc, \"roundingIncrement\");\n}\n\nfunction coerceFractionalSecondDigits(options) {\n  let subsecDigits = options.fractionalSecondDigits;\n  if (void 0 !== subsecDigits) {\n    if (\"number\" != typeof subsecDigits) {\n      if (\"auto\" === toString(subsecDigits)) {\n        return;\n      }\n      throwRangeError(invalidEntity(\"fractionalSecondDigits\", subsecDigits));\n    }\n    subsecDigits = clampEntity(\"fractionalSecondDigits\", Math.floor(subsecDigits), 0, 9, 1);\n  }\n  return subsecDigits;\n}\n\nfunction coerceUnitOption(optionName, options, minUnit = 0, ensureDefined) {\n  let unitStr = options[optionName];\n  if (void 0 === unitStr) {\n    return ensureDefined ? minUnit : void 0;\n  }\n  if (unitStr = toString(unitStr), \"auto\" === unitStr) {\n    return ensureDefined ? minUnit : null;\n  }\n  let unit = unitNameMap[unitStr];\n  return void 0 === unit && (unit = durationFieldNamesAsc.indexOf(unitStr)), unit < 0 && throwRangeError(invalidChoice(optionName, unitStr, unitNameMap)), \n  unit;\n}\n\nfunction coerceChoiceOption(optionName, enumNameMap, options, defaultChoice = 0) {\n  const enumArg = options[optionName];\n  if (void 0 === enumArg) {\n    return defaultChoice;\n  }\n  const enumStr = toString(enumArg);\n  const enumNum = enumNameMap[enumStr];\n  return void 0 === enumNum && throwRangeError(invalidChoice(optionName, enumStr, enumNameMap)), \n  enumNum;\n}\n\nconst coerceSmallestUnit = /*@__PURE__*/ bindArgs(coerceUnitOption, smallestUnitStr);\n\nconst coerceLargestUnit = /*@__PURE__*/ bindArgs(coerceUnitOption, \"largestUnit\");\n\nconst coerceTotalUnit = /*@__PURE__*/ bindArgs(coerceUnitOption, \"unit\");\n\nconst coerceOverflow = /*@__PURE__*/ bindArgs(coerceChoiceOption, \"overflow\", overflowMap);\n\nconst coerceEpochDisambig = /*@__PURE__*/ bindArgs(coerceChoiceOption, \"disambiguation\", epochDisambigMap);\n\nconst coerceOffsetDisambig = /*@__PURE__*/ bindArgs(coerceChoiceOption, \"offset\", offsetDisambigMap);\n\nconst coerceCalendarDisplay = /*@__PURE__*/ bindArgs(coerceChoiceOption, \"calendarName\", calendarDisplayMap);\n\nconst coerceTimeZoneDisplay = /*@__PURE__*/ bindArgs(coerceChoiceOption, \"timeZoneName\", timeZoneDisplayMap);\n\nconst coerceOffsetDisplay = /*@__PURE__*/ bindArgs(coerceChoiceOption, \"offset\", offsetDisplayMap);\n\nconst coerceRoundingMode = /*@__PURE__*/ bindArgs(coerceChoiceOption, \"roundingMode\", roundingModeMap);\n\nconst coerceDirection = /*@__PURE__*/ bindArgs(coerceChoiceOption, \"direction\", directionMap);\n\nfunction normalizeOptionsOrString(options, optionName) {\n  return \"string\" == typeof options ? ((optionName, optionVal) => {\n    const res = Object.create(null);\n    return res[optionName] = optionVal, res;\n  })(optionName, options) : requireObjectLike(options);\n}\n\nfunction validateRoundingInc(roundingInc, smallestUnit, allowManyLargeUnits, solarMode) {\n  const upUnitNano = solarMode ? nanoInUtcDay : unitNanoMap[smallestUnit + 1];\n  if (upUnitNano) {\n    const unitNano = unitNanoMap[smallestUnit];\n    upUnitNano % ((roundingInc = clampEntity(\"roundingIncrement\", roundingInc, 1, upUnitNano / unitNano - (solarMode ? 0 : 1), 1)) * unitNano) && throwRangeError(invalidEntity(\"roundingIncrement\", roundingInc));\n  } else {\n    roundingInc = clampEntity(\"roundingIncrement\", roundingInc, 1, allowManyLargeUnits ? 10 ** 9 : 1, 1);\n  }\n  return roundingInc;\n}\n\nfunction validateUnitRange(optionName, unit, minUnit, maxUnit) {\n  return null != unit && clampEntity(optionName, unit, minUnit, maxUnit, 1, unitNamesAsc), \n  unit;\n}\n\nfunction checkLargestSmallestUnit(largestUnit, smallestUnit) {\n  smallestUnit > largestUnit && throwRangeError(\"smallestUnit > largestUnit\");\n}\n\nfunction refineDiffOptions(roundingModeInvert, options, defaultLargestUnit, maxUnit = 9, minUnit = 0, defaultRoundingMode = 4) {\n  options = normalizeOptions(options);\n  let largestUnit = coerceLargestUnit(options, minUnit);\n  let roundingInc = coerceRoundingIncInteger(options);\n  let roundingMode = coerceRoundingMode(options, defaultRoundingMode);\n  let smallestUnit = coerceSmallestUnit(options, minUnit, 1);\n  return largestUnit = validateUnitRange(\"largestUnit\", largestUnit, minUnit, maxUnit), \n  smallestUnit = validateUnitRange(smallestUnitStr, smallestUnit, minUnit, maxUnit), \n  null == largestUnit ? largestUnit = Math.max(defaultLargestUnit, smallestUnit) : checkLargestSmallestUnit(largestUnit, smallestUnit), \n  roundingInc = validateRoundingInc(roundingInc, smallestUnit, 1), roundingModeInvert && (roundingMode = (roundingMode => roundingMode < 4 ? (roundingMode + 2) % 4 : roundingMode)(roundingMode)), \n  [ largestUnit, smallestUnit, roundingInc, roundingMode ];\n}\n\nfunction refineRoundingOptions(options, maxUnit = 6, solarMode) {\n  let roundingInc = coerceRoundingIncInteger(options = normalizeOptionsOrString(options, smallestUnitStr));\n  const roundingMode = coerceRoundingMode(options, 7);\n  let smallestUnit = coerceSmallestUnit(options);\n  return smallestUnit = requirePropDefined(smallestUnitStr, smallestUnit), smallestUnit = validateUnitRange(smallestUnitStr, smallestUnit, 0, maxUnit), \n  roundingInc = validateRoundingInc(roundingInc, smallestUnit, void 0, solarMode), \n  [ smallestUnit, roundingInc, roundingMode ];\n}\n\nfunction refineUnitDiffOptions(unit, options) {\n  return \"string\" == typeof options || Boolean(options && (options.roundingMode || void 0 !== options.roundingIncrement)) ? ((smallestUnit, options, allowManyLargeUnits, defaultRoundingMode = 7) => {\n    let roundingInc = coerceRoundingIncInteger(options = normalizeOptionsOrString(options, \"roundingMode\"));\n    const roundingMode = coerceRoundingMode(options, defaultRoundingMode);\n    return roundingInc = validateRoundingInc(roundingInc, smallestUnit, allowManyLargeUnits), \n    [ roundingInc, roundingMode ];\n  })(unit, options, 1, 4) : [ 1, void 0 ];\n}\n\nfunction refineUnitRoundOptions(smallestUnit, options, solarMode) {\n  let roundingInc = coerceRoundingIncInteger(options = normalizeUnitRoundOptions(options));\n  const roundingMode = coerceRoundingMode(options, 7);\n  return roundingInc = validateRoundingInc(roundingInc, smallestUnit, void 0, solarMode), \n  [ roundingInc, roundingMode ];\n}\n\nfunction normalizeUnitRoundOptions(options) {\n  return void 0 === options ? Object.create(null) : normalizeOptionsOrString(options, \"roundingMode\");\n}\n\nfunction combineDateAndTime(isoDate, time) {\n  return pluckProps(calendarDateFieldNamesAsc, isoDate, pluckProps(timeFieldNamesAsc, time));\n}\n\nconst maxMilli = 864e13;\n\nconst epochNanoMax = /*@__PURE__*/ BigInt(1e8) * bigNanoInUtcDay;\n\nconst epochNanoMin = /*@__PURE__*/ BigInt(-1e8) * bigNanoInUtcDay;\n\nconst plainDateEpochNanoMin = epochNanoMin - bigNanoInUtcDay;\n\nconst isoYearMonthIndexMin = -3261848;\n\nfunction checkIsoYearMonthInBounds(isoDate) {\n  const isoYearMonthIndex = 12 * isoDate.year + isoDate.month;\n  return (isoYearMonthIndex < isoYearMonthIndexMin || isoYearMonthIndex > 3309129) && throwRangeError(outOfBoundsDate), \n  isoDate;\n}\n\nfunction checkIsoDateInBounds(isoDate, allowPlainDateLowerEdge = 1) {\n  const epochNano = isoDateToEpochNano(isoDate);\n  return (epochNano < (allowPlainDateLowerEdge ? plainDateEpochNanoMin : epochNanoMin) || epochNano > epochNanoMax) && throwRangeError(outOfBoundsDate), \n  isoDate;\n}\n\nfunction checkIsoDateTimeInBounds(isoDateTime) {\n  return checkIsoDateTimeEpochNanoInBounds(isoDateTimeToEpochNano(isoDateTime)), isoDateTime;\n}\n\nfunction checkIsoDateTimeEpochNanoInBounds(epochNano) {\n  return (epochNano <= plainDateEpochNanoMin || epochNano >= epochNanoMax + bigNanoInUtcDay) && throwRangeError(outOfBoundsDate), \n  epochNano;\n}\n\nfunction checkEpochNanoInBounds(epochNano) {\n  return (epochNano < epochNanoMin || epochNano > epochNanoMax) && throwRangeError(outOfBoundsDate), \n  epochNano;\n}\n\nfunction isoDateTimeAndOffsetToEpochNano(isoDateTime, offsetNano) {\n  return checkEpochNanoInBounds(isoDateToEpochNano(isoDateTime) + BigInt(timeFieldsToNano(isoDateTime) - offsetNano));\n}\n\nfunction roundNumberToInc(num, roundingInc, roundingMode) {\n  return roundWithMode(num / roundingInc, roundingMode) * roundingInc;\n}\n\nfunction roundWithMode(num, roundingMode) {\n  return roundingModeFuncs[roundingMode](num);\n}\n\nfunction totalRelativeUnit(wholeValue, sign, endEpochNano, moveValueToEpochNano) {\n  const unitWindow = clampRelativeUnitValue(wholeValue, sign, moveValueToEpochNano, endEpochNano);\n  return interpolateRelativeUnitWindow(unitWindow, Number(endEpochNano - unitWindow.I) / Number(unitWindow.O - unitWindow.I));\n}\n\nfunction roundRelativeUnit(wholeValue, sign, endEpochNano, moveValueToEpochNano, roundingInc, roundingMode) {\n  return roundRelativeUnitWindow(clampRelativeUnitValue(divTrunc(wholeValue, roundingInc) * roundingInc, roundingInc * sign, moveValueToEpochNano, endEpochNano), endEpochNano, roundingInc, roundingMode);\n}\n\nfunction roundRelativeUnitWindow(unitWindow, endEpochNano, roundingInc, roundingMode) {\n  return roundNumberToInc(interpolateRelativeUnitWindow(unitWindow, computeEpochNanoFrac(endEpochNano, unitWindow.I, unitWindow.O)), roundingInc, roundingMode);\n}\n\nfunction clampRelativeUnitValue(startValue, valueDelta, moveValueToEpochNano, epochNanoProgress) {\n  let unitWindow = computeRelativeUnitWindow(startValue, valueDelta, moveValueToEpochNano);\n  return ((epochNanoProgress, epochNano0, epochNano1, sign) => sign > 0 ? epochNano0 <= epochNanoProgress && epochNanoProgress <= epochNano1 : epochNano1 <= epochNanoProgress && epochNanoProgress <= epochNano0)(epochNanoProgress, unitWindow.I, unitWindow.O, Math.sign(valueDelta)) || (unitWindow = computeRelativeUnitWindow(startValue + valueDelta, valueDelta, moveValueToEpochNano)), \n  unitWindow;\n}\n\nfunction computeRelativeUnitWindow(startValue, valueDelta, moveValueToEpochNano) {\n  const endValue = startValue + valueDelta;\n  return {\n    ve: startValue,\n    qe: endValue,\n    I: moveValueToEpochNano(startValue),\n    O: moveValueToEpochNano(endValue)\n  };\n}\n\nfunction interpolateRelativeUnitWindow(unitWindow, fraction) {\n  return unitWindow.ve + fraction * (unitWindow.qe - unitWindow.ve);\n}\n\nfunction computeEpochNanoFrac(epochNanoProgress, epochNano0, epochNano1) {\n  const denomBig = epochNano1 - epochNano0;\n  const numeratorBig = epochNanoProgress - epochNano0;\n  if (!numeratorBig) {\n    return 0;\n  }\n  const absNumerator = numeratorBig < 0n ? -numeratorBig : numeratorBig;\n  const absDenom = denomBig < 0n ? -denomBig : denomBig;\n  const fracSign = compareBigInts(numeratorBig, 0n) === compareBigInts(denomBig, 0n) ? 1 : -1;\n  return compareBigInts(absNumerator, absDenom) <= 0 ? absNumerator === absDenom ? fracSign : fabricateNearHalfFraction(compareBigInts(2n * absNumerator, absDenom), fracSign) : Number(numeratorBig) / Number(denomBig);\n}\n\nfunction createEpochNanoSlots(epochNano) {\n  return {\n    epochNanoseconds: epochNano\n  };\n}\n\nfunction createZonedEpochNanoSlots(epochNano, timeZone, calendar) {\n  return {\n    calendar: calendar,\n    timeZone: timeZone,\n    epochNanoseconds: epochNano\n  };\n}\n\nfunction createDateTimeSlots(isoDateTime, calendar) {\n  return pluckProps(timeFieldNamesAsc, isoDateTime, createDateSlots(isoDateTime, calendar));\n}\n\nfunction createDateSlots(isoDate, calendar) {\n  return pluckProps(calendarDateFieldNamesAsc, isoDate, {\n    calendar: calendar\n  });\n}\n\nfunction createTimeSlots(time) {\n  return pluckProps(timeFieldNamesAsc, time);\n}\n\nfunction createDurationSlots(durationFields) {\n  return pluckProps(durationFieldNamesAsc, durationFields, {\n    sign: computeDurationSign(durationFields)\n  });\n}\n\nfunction roundZonedEpochSlotsToUnit(slots, smallestUnit, roundingInc, roundingMode) {\n  return createZonedEpochNanoSlots(6 === smallestUnit ? roundZonedEpochToDay(slots, roundingMode) : roundZonedEpochToTime(slots, smallestUnit, roundingInc, roundingMode), slots.timeZone, slots.calendar);\n}\n\nfunction computeZonedHoursInDay(slots) {\n  const [epochNano0, epochNano1] = computeZonedDayEpochInterval(slots);\n  return divideBigNanoToExactNumber(epochNano1 - epochNano0, nanoInHour);\n}\n\nfunction computeZonedStartOfDay(slots) {\n  const {timeZone: timeZone, calendar: calendar} = slots;\n  return createZonedEpochNanoSlots(getStartOfDayInstantFor(timeZone, combineDateAndTime(zonedEpochSlotsToIso(slots), timeFieldDefaults)), timeZone, calendar);\n}\n\nfunction alignZonedEpoch(computeAlignment, slots) {\n  const {calendar: calendar, timeZone: timeZone} = slots;\n  return getStartOfDayInstantFor(timeZone, computeAlignment(calendar, zonedEpochSlotsToIso(slots)));\n}\n\nfunction roundZonedEpochToInterval(computeInterval, slots, roundingMode) {\n  const {calendar: calendar, timeZone: timeZone} = slots;\n  const isoSlots = zonedEpochSlotsToIso(slots);\n  const [isoDateTime0, isoDateTime1] = computeInterval(calendar, isoSlots);\n  return roundZonedEpochToBounds(slots.epochNanoseconds, getStartOfDayInstantFor(timeZone, isoDateTime0), getStartOfDayInstantFor(timeZone, isoDateTime1), roundingMode);\n}\n\nfunction roundRelativeDuration(durationFields, endEpochNano, largestUnit, smallestUnit, roundingInc, roundingMode, relativeOps, isZoned) {\n  if (0 === smallestUnit && 1 === roundingInc) {\n    return durationFields;\n  }\n  const sign = computeDurationSign(durationFields) || 1;\n  const nudgeFunc = isUniformUnit(smallestUnit, isZoned) ? isZoned && smallestUnit < 6 && largestUnit >= 6 ? nudgeZonedTimeDuration : nudgeDayTimeDuration : nudgeRelativeDuration;\n  let [roundedDurationFields, roundedEpochNano, grewBigUnit] = nudgeFunc(sign, durationFields, endEpochNano, largestUnit, smallestUnit, roundingInc, roundingMode, relativeOps);\n  return grewBigUnit && 7 !== smallestUnit && (roundedDurationFields = ((durationFields, endEpochNano, largestUnit, smallestUnit, sign, relativeOps) => {\n    for (let currentUnit = smallestUnit + 1; currentUnit <= largestUnit; currentUnit++) {\n      if (7 === currentUnit && 7 !== largestUnit) {\n        continue;\n      }\n      const baseDurationFields = clearDurationFields(currentUnit, durationFields);\n      baseDurationFields[durationFieldNamesAsc[currentUnit]] += sign;\n      const thresholdCompare = compareBigInts(endEpochNano, moveRelativeMarkerToEpochNano(relativeOps, baseDurationFields));\n      if (thresholdCompare && thresholdCompare !== sign) {\n        break;\n      }\n      durationFields = baseDurationFields;\n    }\n    return durationFields;\n  })(roundedDurationFields, roundedEpochNano, largestUnit, Math.max(6, smallestUnit), sign, relativeOps)), \n  roundedDurationFields;\n}\n\nfunction roundDayTimeDurationByInc(durationFields, nanoInc, roundingMode) {\n  const maxUnit = Math.min(getMaxDurationUnit(durationFields), 6);\n  return nanoToDurationDayTimeFields(roundBigNanoToInc(durationDayTimeToBigNano(durationFields), BigInt(nanoInc), roundingMode), maxUnit);\n}\n\nfunction roundZonedEpochToDay(slots, roundingMode) {\n  const [epochNano0, epochNano1] = computeZonedDayEpochInterval(slots);\n  return roundZonedEpochToBounds(slots.epochNanoseconds, epochNano0, epochNano1, roundingMode);\n}\n\nfunction roundZonedEpochToTime(slots, smallestUnit, roundingInc, roundingMode) {\n  if (0 === smallestUnit && 1 === roundingInc) {\n    return slots.epochNanoseconds;\n  }\n  const isoDateTime = zonedEpochSlotsToIso(slots);\n  return getMatchingInstantFor(slots.timeZone, roundDateTimeToInc(isoDateTime, computeNanoInc(smallestUnit, roundingInc), roundingMode), isoDateTime.offsetNanoseconds, 2, 0, 1);\n}\n\nfunction roundDateTimeToInc(isoDateTime, nanoInc, roundingMode) {\n  const [roundedTimeFields, dayDelta] = roundTimeToInc(isoDateTime, nanoInc, roundingMode);\n  const roundedIsoDateTime = combineDateAndTime(moveDateByDays(isoDateTime, dayDelta), roundedTimeFields);\n  return checkIsoDateTimeInBounds(roundedIsoDateTime), roundedIsoDateTime;\n}\n\nfunction roundTimeToInc(timeFields, nanoInc, roundingMode) {\n  return nanoToTimeAndDay(roundNumberToInc(timeFieldsToNano(timeFields), nanoInc, roundingMode));\n}\n\nfunction nudgeRelativeDuration(sign, durationFields, endEpochNano, _largestUnit, smallestUnit, roundingInc, roundingMode, relativeOps) {\n  const smallestUnitFieldName = durationFieldNamesAsc[smallestUnit];\n  const baseDurationFields = clearDurationFields(smallestUnit, durationFields);\n  7 === smallestUnit && (durationFields = {\n    ...durationFields,\n    weeks: durationFields.weeks + Math.trunc(durationFields.days / 7)\n  });\n  const truncedVal = divTrunc(durationFields[smallestUnitFieldName], roundingInc) * roundingInc;\n  const nudgeWindow = clampRelativeUnitValue(truncedVal, roundingInc * sign, value => (baseDurationFields[smallestUnitFieldName] = value, \n  moveRelativeMarkerToEpochNano(relativeOps, baseDurationFields)), endEpochNano);\n  const roundedVal = roundRelativeUnitWindow(nudgeWindow, endEpochNano, roundingInc, roundingMode);\n  return baseDurationFields[smallestUnitFieldName] = roundedVal, [ baseDurationFields, roundedVal === nudgeWindow.qe ? nudgeWindow.O : nudgeWindow.I, roundedVal !== truncedVal ];\n}\n\nfunction nudgeZonedTimeDuration(sign, durationFields, endEpochNano, _largestUnit, smallestUnit, roundingInc, roundingMode, relativeOps) {\n  const timeNano = Number(durationTimeToBigNano(durationFields));\n  const nanoInc = computeNanoInc(smallestUnit, roundingInc);\n  let roundedTimeNano = roundNumberToInc(timeNano, nanoInc, roundingMode);\n  const dateDurationFields = {\n    ...durationFields,\n    ...durationTimeFieldDefaults\n  };\n  const dayWindow = clampRelativeUnitValue(dateDurationFields.days, sign, days => (dateDurationFields.days = days, \n  moveRelativeMarkerToEpochNano(relativeOps, dateDurationFields)), endEpochNano);\n  const dayEpochNano0 = dayWindow.I;\n  const dayEpochNano1 = dayWindow.O;\n  const beyondDayNano = roundedTimeNano - Number(dayEpochNano1 - dayEpochNano0);\n  let dayDelta = 0;\n  beyondDayNano && Math.sign(beyondDayNano) !== sign ? endEpochNano = dayEpochNano0 + BigInt(roundedTimeNano) : (dayDelta += sign, \n  roundedTimeNano = roundNumberToInc(beyondDayNano, nanoInc, roundingMode), endEpochNano = dayEpochNano1 + BigInt(roundedTimeNano));\n  const durationTimeFields = nanoToDurationTimeFields(roundedTimeNano);\n  return [ {\n    ...durationFields,\n    ...durationTimeFields,\n    days: durationFields.days + dayDelta\n  }, endEpochNano, Boolean(dayDelta) ];\n}\n\nfunction nudgeDayTimeDuration(sign, durationFields, endEpochNano, largestUnit, smallestUnit, roundingInc, roundingMode) {\n  const bigNano = durationDayTimeToBigNano(durationFields);\n  const roundedBigNano = roundBigNanoToInc(bigNano, computeBigNanoInc(smallestUnit, roundingInc), roundingMode);\n  const nanoDiff = roundedBigNano - bigNano;\n  const expandedBigUnit = Math.sign(Number(roundedBigNano / bigNanoInUtcDay) - Number(bigNano / bigNanoInUtcDay)) === sign;\n  const roundedDayTimeFields = nanoToDurationDayTimeFields(roundedBigNano, Math.min(largestUnit, 6));\n  return [ {\n    ...durationFields,\n    ...roundedDayTimeFields\n  }, endEpochNano + nanoDiff, expandedBigUnit ];\n}\n\nfunction computeZonedDayEpochInterval(slots) {\n  const {timeZone: timeZone} = slots;\n  const isoDateTime0 = combineDateAndTime(zonedEpochSlotsToIso(slots), timeFieldDefaults);\n  const isoDateTime1 = combineDateAndTime(moveDateByDays(isoDateTime0, 1), timeFieldDefaults);\n  return [ getStartOfDayInstantFor(timeZone, isoDateTime0), getStartOfDayInstantFor(timeZone, isoDateTime1) ];\n}\n\nfunction roundZonedEpochToBounds(epochNano, epochNano0, epochNano1, roundingMode) {\n  return roundWithMode(computeEpochNanoFrac(epochNano < epochNano1 ? epochNano : epochNano1 - 1n, epochNano0, epochNano1), roundingMode) ? epochNano1 : epochNano0;\n}\n\nfunction roundToMinute(offsetNano) {\n  return roundNumberToInc(offsetNano, nanoInMinute, 7);\n}\n\nfunction roundBigNanoToInc(bigNano, bigNanoInc, roundingMode) {\n  return roundBigNanoToIncWithTail(bigNano, bigNanoInc, roundingMode, bigNano / bigNanoInc % 2n);\n}\n\nfunction roundBigNanoToDayOriginInc(bigNano, bigNanoInc, roundingMode) {\n  const [day, timeNano] = divModFloorBigInt(bigNano, bigNanoInUtcDay);\n  const dayOriginNano = day * bigNanoInUtcDay;\n  return dayOriginNano + roundBigNanoToIncWithTail(timeNano, bigNanoInc, roundingMode, (dayOriginNano / bigNanoInc + timeNano / bigNanoInc) % 2n);\n}\n\nfunction roundBigNanoToIncWithTail(bigNano, bigNanoInc, roundingMode, quotientTail) {\n  const quotient = bigNano / bigNanoInc;\n  const remainder = bigNano % bigNanoInc;\n  let fraction = 0;\n  remainder && (fraction = fabricateNearHalfFraction(compareBigInts(2n * (remainder < 0n ? -remainder : remainder), bigNanoInc), Math.sign(Number(remainder))));\n  const roundedTail = roundWithMode(Number(quotientTail) + fraction, roundingMode);\n  return (quotient - quotientTail + BigInt(roundedTail)) * bigNanoInc;\n}\n\nfunction computeNanoInc(smallestUnit, roundingInc) {\n  return unitNanoMap[smallestUnit] * roundingInc;\n}\n\nfunction computeBigNanoInc(smallestUnit, roundingInc) {\n  return BigInt(unitNanoMap[smallestUnit]) * BigInt(roundingInc);\n}\n\nconst zonedEpochSlotsToIso = /*@__PURE__*/ memoize(_zonedEpochSlotsToIso, WeakMap);\n\nfunction _zonedEpochSlotsToIso(slots) {\n  const {epochNanoseconds: epochNanoseconds, timeZone: timeZone} = slots;\n  const offsetNanoseconds = timeZone.B(epochNanoseconds);\n  return {\n    ...epochNanoToIsoDateTime(epochNanoseconds + BigInt(offsetNanoseconds)),\n    offsetNanoseconds: offsetNanoseconds\n  };\n}\n\nfunction getMatchingInstantFor(timeZone, isoDateTime, offsetNano, offsetDisambig = 0, epochDisambig = 0, epochFuzzy, hasZ) {\n  if (void 0 !== offsetNano && 1 === offsetDisambig && (1 === offsetDisambig || hasZ)) {\n    return isoDateTimeAndOffsetToEpochNano(isoDateTime, offsetNano);\n  }\n  2 !== offsetDisambig && 0 !== offsetDisambig || checkIsoDateInBounds(isoDateTime, 0);\n  const possibleEpochNanos = timeZone.R(isoDateTime);\n  if (void 0 !== offsetNano && 3 !== offsetDisambig) {\n    const matchingEpochNano = ((possibleEpochNanos, isoDateTime, offsetNano, fuzzy) => {\n      const zonedEpochNano = isoDateTimeToEpochNano(isoDateTime);\n      fuzzy && (offsetNano = roundToMinute(offsetNano));\n      for (const possibleEpochNano of possibleEpochNanos) {\n        let possibleOffsetNano = Number(zonedEpochNano - possibleEpochNano);\n        if (fuzzy && (possibleOffsetNano = roundToMinute(possibleOffsetNano)), possibleOffsetNano === offsetNano) {\n          return possibleEpochNano;\n        }\n      }\n    })(possibleEpochNanos, isoDateTime, offsetNano, epochFuzzy);\n    if (void 0 !== matchingEpochNano) {\n      return matchingEpochNano;\n    }\n    0 === offsetDisambig && throwRangeError(\"Invalid TimeZone offset\");\n  }\n  return hasZ ? isoDateTimeToEpochNano(isoDateTime) : getSingleInstantFor(timeZone, isoDateTime, epochDisambig, possibleEpochNanos);\n}\n\nfunction getSingleInstantFor(timeZone, isoDateTime, disambig = 0, possibleEpochNanos = timeZone.R(isoDateTime)) {\n  if (1 === possibleEpochNanos.length) {\n    return possibleEpochNanos[0];\n  }\n  if (1 === disambig && throwRangeError(\"Ambiguous offset\"), possibleEpochNanos.length) {\n    return possibleEpochNanos[3 === disambig ? 1 : 0];\n  }\n  const zonedEpochNano = isoDateTimeToEpochNano(isoDateTime);\n  const gapNano = ((timeZone, zonedEpochNano) => {\n    const startOffsetNano = timeZone.B(zonedEpochNano - bigNanoInUtcDay);\n    return (gapNano => (gapNano > nanoInUtcDay && throwRangeError(\"Out-of-bounds TimeZone gap\"), \n    gapNano))(timeZone.B(zonedEpochNano + bigNanoInUtcDay) - startOffsetNano);\n  })(timeZone, zonedEpochNano);\n  const shiftedIsoDateTime = epochNanoToIsoDateTime(zonedEpochNano + BigInt(gapNano * (2 === disambig ? -1 : 1)));\n  return (possibleEpochNanos = timeZone.R(shiftedIsoDateTime))[2 === disambig ? 0 : possibleEpochNanos.length - 1];\n}\n\nfunction getStartOfDayInstantFor(timeZone, isoDateTime) {\n  const possibleEpochNanos = timeZone.R(isoDateTime);\n  if (possibleEpochNanos.length) {\n    return possibleEpochNanos[0];\n  }\n  const zonedEpochNanoDayBefore = isoDateTimeToEpochNano(isoDateTime) - bigNanoInUtcDay;\n  return timeZone.C(zonedEpochNanoDayBefore, 1);\n}\n\nfunction moveYearMonth(calendar, isoDate, durationSlots, overflow = 0) {\n  computeDurationSign(durationSlots) && clampEntity(\"unit\", getMaxDurationUnit(durationSlots), 8, 9, 1, durationFieldNamesAsc);\n  const first = checkIsoDateInBounds(moveToStartOfMonth(calendar, isoDate));\n  return moveToStartOfMonth(calendar, moveDate(calendar, first, durationSlots, overflow));\n}\n\nfunction moveYearMonthByUnits(calendar, isoDate, years, months, overflow) {\n  const first = checkIsoDateInBounds(moveToStartOfMonth(calendar, isoDate));\n  return moveToStartOfMonth(calendar, years || months ? checkIsoDateInBounds(moveDateByCalendarUnits(calendar, first, years, months, overflow)) : first);\n}\n\nfunction moveZonedEpochSlots(slots, durationFields, overflow = 0) {\n  const {calendar: calendar, epochNanoseconds: epochNano, timeZone: timeZone} = slots;\n  const timeOnlyNano = durationTimeToBigNano(durationFields);\n  let movedEpochNano = epochNano;\n  if (durationHasDateParts(durationFields)) {\n    const isoDateTime = zonedEpochSlotsToIso(slots);\n    movedEpochNano = getSingleInstantFor(timeZone, combineDateAndTime(moveDate(calendar, isoDateTime, {\n      ...durationFields,\n      ...durationTimeFieldDefaults\n    }, overflow), isoDateTime)) + timeOnlyNano;\n  } else {\n    movedEpochNano += timeOnlyNano;\n  }\n  return {\n    ...slots,\n    epochNanoseconds: checkEpochNanoInBounds(movedEpochNano)\n  };\n}\n\nfunction moveDateTime(calendar, isoDateTime, durationFields, overflow = 0) {\n  const [movedTimeFields, dayDelta] = moveTime(isoDateTime, durationFields);\n  return checkIsoDateTimeInBounds(combineDateAndTime(moveDate(calendar, isoDateTime, {\n    ...durationFields,\n    ...durationTimeFieldDefaults,\n    days: durationFields.days + dayDelta\n  }, overflow), movedTimeFields));\n}\n\nfunction moveDateTimeByNano(fields, delta) {\n  const [time, days] = moveTimeByNano(fields, delta);\n  return checkIsoDateTimeInBounds(combineDateAndTime(moveDateByDays(fields, days), time));\n}\n\nfunction moveTime(timeFields, durationFields) {\n  return moveTimeByNano(timeFields, durationTimeToBigNano(durationFields));\n}\n\nfunction moveEpochNano(epochNano, durationFields) {\n  return moveEpochNanoByNano(epochNano, (clampEntity(\"unit\", getMaxDurationUnit(fields = durationFields), 0, 5, 1, durationFieldNamesAsc), \n  durationTimeToBigNano(fields)));\n  var fields;\n}\n\nfunction moveDate(calendar, isoDate, durationFields, overflow = 0) {\n  let {years: years, months: months, weeks: weeks, days: days} = durationFields;\n  let movedIsoDate;\n  if (days += Number(durationTimeToBigNano(durationFields) / bigNanoInUtcDay), years || months) {\n    movedIsoDate = moveDateByCalendarUnits(calendar, isoDate, years, months, overflow);\n  } else {\n    if (!weeks && !days) {\n      return isoDate;\n    }\n    movedIsoDate = isoDate;\n  }\n  return (weeks || days) && (movedIsoDate = moveDateByDays(movedIsoDate, 7 * weeks + days)), \n  checkIsoDateInBounds(movedIsoDate);\n}\n\nfunction moveToStartOfMonth(calendar, isoDate) {\n  return moveDateByDays(isoDate, 1 - computeCalendarDateFields(calendar, isoDate).day);\n}\n\nfunction moveDateByCalendarUnits(calendar, isoDate, years, months, overflow) {\n  const dateParts = computeCalendarDateFields(calendar, isoDate);\n  let {year: year, month: month, day: day} = dateParts;\n  if (years) {\n    const [monthCodeNumber, isLeapMonth] = computeCalendarMonthCodeParts(calendar, year, month);\n    year += years, month = resolveMonthInMovedYear(calendar, monthCodeNumber, isLeapMonth, calendar ? calendar.p(year) : void 0, overflow), \n    month = clampEntity(\"month\", month, 1, computeCalendarMonthsInYearForYear(calendar, year), overflow);\n  }\n  if (months) {\n    const yearMonthParts = addCalendarMonths(calendar, year, month, months);\n    ({year: year, month: month} = yearMonthParts);\n  }\n  return day = clampEntity(\"day\", day, 1, computeCalendarDaysInMonthForYearMonth(calendar, year, month), overflow), \n  computeCalendarIsoFieldsFromParts(calendar, year, month, day);\n}\n\nfunction addCalendarMonths(calendar, year, month, monthDelta) {\n  return calendar ? calendar.ae(year, month, monthDelta) : addIsoMonths(year, month, monthDelta);\n}\n\nfunction resolveMonthInMovedYear(calendar, monthCodeNumber, isLeapMonth, targetLeapMonth, overflow) {\n  if (isLeapMonth) {\n    const leapMonthMeta = calendar ? calendar.l : void 0;\n    return void 0 !== targetLeapMonth && (leapMonthMeta < 0 || targetLeapMonth === monthCodeNumber + 1) ? targetLeapMonth : (1 === overflow && throwRangeError(invalidLeapMonth), \n    leapMonthMeta < 0 ? -leapMonthMeta : monthCodeNumber);\n  }\n  return monthCodeNumberToMonth(monthCodeNumber, 0, targetLeapMonth);\n}\n\nfunction moveTimeByNano(timeFields, durationBigNano) {\n  const durDays = Number(durationBigNano / bigNanoInUtcDay);\n  const durTimeNano = Number(durationBigNano % bigNanoInUtcDay);\n  const [newTimeFields, overflowDays] = nanoToTimeAndDay(timeFieldsToNano(timeFields) + durTimeNano);\n  return [ newTimeFields, durDays + overflowDays ];\n}\n\nfunction moveEpochNanoByNano(epochNano, deltaNano) {\n  return checkEpochNanoInBounds(epochNano + deltaNano);\n}\n\nfunction moveDateByDays(isoDate, days) {\n  return days ? epochDaysToIsoDate(isoDateToEpochDays(isoDate) + days) : isoDate;\n}\n\nfunction getCommonCalendar(a, b) {\n  return getCalendarSlotId(a) !== getCalendarSlotId(b) && throwRangeError(\"Mismatching Calendars\"), \n  a;\n}\n\nfunction getCommonTimeZone(a, b) {\n  return a.m !== b.m && throwRangeError(\"Mismatching TimeZones\"), \n  a;\n}\n\nfunction getZonedTimeZoneId(slots) {\n  return slots.timeZone.id;\n}\n\nfunction diffZonedDateTimesRounded(calendar, startZoned, endZoned, largestUnit, smallestUnit, roundingInc, roundingMode) {\n  return largestUnit < 6 ? diffEpochNanosRounded(startZoned.epochNanoseconds, endZoned.epochNanoseconds, largestUnit, smallestUnit, roundingInc, roundingMode) : ((calendar, startZoned, endZoned, largestUnit, smallestUnit, roundingInc, roundingMode) => {\n    const endEpochNano = endZoned.epochNanoseconds;\n    if (endEpochNano === startZoned.epochNanoseconds) {\n      return durationFieldDefaults;\n    }\n    let durationFields;\n    const timeZone = getCommonTimeZone(startZoned.timeZone, endZoned.timeZone);\n    return durationFields = diffZonedEpochsExact(timeZone, calendar, startZoned, endZoned, largestUnit), \n    durationFields = roundRelativeDuration(durationFields, endEpochNano, largestUnit, smallestUnit, roundingInc, roundingMode, createZonedRelativeOps(calendar, timeZone, startZoned), 1), \n    durationFields;\n  })(calendar, startZoned, endZoned, largestUnit, smallestUnit, roundingInc, roundingMode);\n}\n\nfunction diffDateTimesRounded(calendar, startIsoDateTime, endIsoDateTime, largestUnit, smallestUnit, roundingInc, roundingMode) {\n  return largestUnit <= 6 ? diffEpochNanosRounded(isoDateTimeToEpochNano(startIsoDateTime), isoDateTimeToEpochNano(endIsoDateTime), largestUnit, smallestUnit, roundingInc, roundingMode) : ((calendar, startIsoDateTime, endIsoDateTime, largestUnit, smallestUnit, roundingInc, roundingMode) => {\n    const endEpochNano = isoDateTimeToEpochNano(endIsoDateTime);\n    const sign = compareBigInts(endEpochNano, isoDateTimeToEpochNano(startIsoDateTime));\n    if (!sign) {\n      return durationFieldDefaults;\n    }\n    let durationFields;\n    return durationFields = diffDateTimesBig(calendar, startIsoDateTime, endIsoDateTime, sign, largestUnit), \n    durationFields = roundRelativeDuration(durationFields, endEpochNano, largestUnit, smallestUnit, roundingInc, roundingMode, ((calendar, origin) => ({\n      ne: isoDateTimeToEpochNano(origin),\n      ke: duration => isoDateTimeToEpochNano(combineDateAndTime(moveDate(calendar, origin, duration), origin))\n    }))(calendar, startIsoDateTime)), durationFields;\n  })(calendar, startIsoDateTime, endIsoDateTime, largestUnit, smallestUnit, roundingInc, roundingMode);\n}\n\nfunction diffYearMonthsRounded(calendar, startIsoDate, endIsoDate, largestUnit, smallestUnit, roundingInc, roundingMode) {\n  const firstOfMonth0 = moveToStartOfMonth(calendar, startIsoDate);\n  const firstOfMonth1 = moveToStartOfMonth(calendar, endIsoDate);\n  return compareIsoDates(firstOfMonth0, firstOfMonth1) ? diffDateCalendarUnitsRounded(calendar, checkIsoDateInBounds(firstOfMonth0), checkIsoDateInBounds(firstOfMonth1), largestUnit, smallestUnit, roundingInc, roundingMode, 8) : durationFieldDefaults;\n}\n\nfunction diffDatesRounded(calendar, startIsoDate, endIsoDate, largestUnit, smallestUnit, roundingInc, roundingMode, smallestPrecision = 6) {\n  return 6 === largestUnit ? diffEpochNanosRounded(isoDateToEpochNano(startIsoDate), isoDateToEpochNano(endIsoDate), largestUnit, smallestUnit, roundingInc, roundingMode) : diffDateCalendarUnitsRounded(calendar, startIsoDate, endIsoDate, largestUnit, smallestUnit, roundingInc, roundingMode, smallestPrecision);\n}\n\nfunction diffTimesRounded(plainTimeSlots0, plainTimeSlots1, largestUnit, smallestUnit, roundingInc, roundingMode) {\n  const timeDiffNano = roundNumberToInc(timeFieldsToNano(plainTimeSlots1) - timeFieldsToNano(plainTimeSlots0), computeNanoInc(smallestUnit, roundingInc), roundingMode);\n  return {\n    ...durationFieldDefaults,\n    ...nanoToDurationTimeFields(timeDiffNano, largestUnit)\n  };\n}\n\nfunction diffDateCalendarUnitsRounded(calendar, startIsoDate, endIsoDate, largestUnit, smallestUnit, roundingInc, roundingMode, smallestPrecision = 6) {\n  const endEpochNano = isoDateToEpochNano(endIsoDate);\n  if (!compareIsoDates(startIsoDate, endIsoDate)) {\n    return durationFieldDefaults;\n  }\n  let durationFields;\n  return durationFields = diffCalendarDates(calendar, startIsoDate, endIsoDate, largestUnit), \n  smallestUnit === smallestPrecision && 1 === roundingInc || (durationFields = roundRelativeDuration(durationFields, endEpochNano, largestUnit, smallestUnit, roundingInc, roundingMode, createDateRelativeOps(calendar, startIsoDate))), \n  durationFields;\n}\n\nfunction diffEpochNanosRounded(startEpochNano, endEpochNano, largestUnit, smallestUnit, roundingInc, roundingMode) {\n  return {\n    ...durationFieldDefaults,\n    ...nanoToDurationDayTimeFields(roundBigNanoToInc(endEpochNano - startEpochNano, computeBigNanoInc(smallestUnit, roundingInc), roundingMode), largestUnit)\n  };\n}\n\nfunction diffZonedEpochsExact(timeZone, calendar, startZoned, endZoned, largestUnit) {\n  return largestUnit < 6 ? {\n    ...durationFieldDefaults,\n    ...nanoToDurationDayTimeFields(endZoned.epochNanoseconds - startZoned.epochNanoseconds, largestUnit)\n  } : ((timeZone, startZoned, endZoned) => {\n    const sign = compareBigInts(endZoned.epochNanoseconds, startZoned.epochNanoseconds);\n    if (!sign) {\n      return durationFieldDefaults;\n    }\n    if (!compareIsoDates(zonedEpochSlotsToIso(startZoned), zonedEpochSlotsToIso(endZoned))) {\n      return {\n        ...durationFieldDefaults,\n        ...nanoToDurationDayTimeFields(endZoned.epochNanoseconds - startZoned.epochNanoseconds, 5)\n      };\n    }\n    const [startIsoDateTime, endIsoDate, remainderNano] = prepareZonedEpochDiff(timeZone, startZoned, endZoned, sign);\n    return {\n      ...(start = startIsoDateTime, end = endIsoDate, diffCalendarDates(calendar, start, end, largestUnit)),\n      ...nanoToDurationTimeFields(remainderNano)\n    };\n    var start, end;\n  })(timeZone, startZoned, endZoned);\n}\n\nfunction diffDateTimesExact(calendar, startIsoDateTime, endIsoDateTime, largestUnit) {\n  const startEpochNano = isoDateTimeToEpochNano(startIsoDateTime);\n  const endEpochNano = isoDateTimeToEpochNano(endIsoDateTime);\n  const sign = compareBigInts(endEpochNano, startEpochNano);\n  return sign ? largestUnit <= 6 ? {\n    ...durationFieldDefaults,\n    ...nanoToDurationDayTimeFields(endEpochNano - startEpochNano, largestUnit)\n  } : diffDateTimesBig(calendar, startIsoDateTime, endIsoDateTime, sign, largestUnit) : durationFieldDefaults;\n}\n\nfunction diffDateTimesBig(calendar, startIsoDateTime, endIsoDateTime, sign, largestUnit) {\n  let diffEndDate = endIsoDateTime;\n  let timeNano = timeFieldsToNano(endIsoDateTime) - timeFieldsToNano(startIsoDateTime);\n  return Math.sign(timeNano) === -sign && (diffEndDate = moveDateByDays(endIsoDateTime, -sign), \n  timeNano += nanoInUtcDay * sign), {\n    ...diffCalendarDates(calendar, startIsoDateTime, diffEndDate, largestUnit),\n    ...nanoToDurationTimeFields(timeNano)\n  };\n}\n\nfunction prepareZonedEpochDiff(timeZone, startZoned, endZoned, sign) {\n  const startIsoDate = zonedEpochSlotsToIso(startZoned);\n  const endIsoDate = zonedEpochSlotsToIso(endZoned);\n  const endEpochNano = endZoned.epochNanoseconds;\n  let dayCorrection = 0;\n  const timeDiffNano = timeFieldsToNano(endIsoDate) - timeFieldsToNano(startIsoDate);\n  Math.sign(timeDiffNano) === -sign && dayCorrection++;\n  const maxDayCorrection = dayCorrection + (sign > 0 ? 1 : 0);\n  for (;;dayCorrection++) {\n    const midIsoDate = moveDateByDays(endIsoDate, dayCorrection * -sign);\n    const midEpochNano = getSingleInstantFor(timeZone, combineDateAndTime(midIsoDate, startIsoDate));\n    if (dayCorrection === maxDayCorrection || compareBigInts(endEpochNano, midEpochNano) !== -sign) {\n      return [ startIsoDate, midIsoDate, Number(endEpochNano - midEpochNano) ];\n    }\n  }\n}\n\nfunction diffCalendarDates(calendar, startIsoDate, endIsoDate, largestUnit) {\n  if (largestUnit <= 7) {\n    return ((asWeeks, start, end) => {\n      const days = countIsoDays(start, end);\n      return asWeeks ? {\n        ...durationFieldDefaults,\n        weeks: divTrunc(days, 7),\n        days: modTrunc(days, 7)\n      } : {\n        ...durationFieldDefaults,\n        days: days\n      };\n    })(7 === largestUnit, startIsoDate, endIsoDate);\n  }\n  const yearMonthDayStart = computeCalendarDateFields(calendar, startIsoDate);\n  const yearMonthDayEnd = computeCalendarDateFields(calendar, endIsoDate);\n  if (8 === largestUnit) {\n    const {year: year0, month: month0, day: day0} = yearMonthDayStart;\n    const {year: year1, month: month1, day: day1} = yearMonthDayEnd;\n    const sign = Math.sign(compareNumbers(year1, year0) || compareNumbers(month1, month0) || countIsoDays(startIsoDate, endIsoDate));\n    let months = 0;\n    let days = 0;\n    if (sign) {\n      months = calendar ? calendar.ee(year0, month0, year1, month1) : diffIsoMonthSlots(year0, month0, year1, month1);\n      let anchorIsoDate = moveDateByCalendarUnits(calendar, startIsoDate, 0, months, 0);\n      sign * compareNumbers(day0, day1) > 0 && (months -= sign, anchorIsoDate = moveDateByCalendarUnits(calendar, startIsoDate, 0, months, 0)), \n      days = countIsoDays(anchorIsoDate, endIsoDate);\n    }\n    return {\n      ...durationFieldDefaults,\n      months: months,\n      days: days\n    };\n  }\n  const {year: year0, month: month0, day: day0} = yearMonthDayStart;\n  let {year: year1, month: month1, day: day1} = yearMonthDayEnd;\n  let yearDiff = year1 - year0;\n  let monthDiff = month1 - month0;\n  let dayDiff = day1 - day0;\n  if (yearDiff || monthDiff) {\n    const sign = Math.sign(yearDiff || monthDiff);\n    let daysInMonth1 = computeCalendarDaysInMonthForYearMonth(calendar, year1, month1);\n    let dayCorrect = 0;\n    if (Math.sign(day1 - day0) === -sign) {\n      const origDaysInMonth1 = daysInMonth1;\n      const yearMonthParts = addCalendarMonths(calendar, year1, month1, -sign);\n      ({year: year1, month: month1} = yearMonthParts), yearDiff = year1 - year0, monthDiff = month1 - month0, \n      daysInMonth1 = computeCalendarDaysInMonthForYearMonth(calendar, year1, month1), \n      dayCorrect = sign < 0 ? -origDaysInMonth1 : daysInMonth1;\n    }\n    if (dayDiff = day1 - Math.min(day0, daysInMonth1) + dayCorrect, yearDiff) {\n      const [monthCodeNumber0, isLeapMonth0] = computeCalendarMonthCodeParts(calendar, year0, month0);\n      const [monthCodeNumber1, isLeapMonth1] = computeCalendarMonthCodeParts(calendar, year1, month1);\n      const leapMonthMeta = calendar ? calendar.l : void 0;\n      if (monthDiff = void 0 !== leapMonthMeta && isLeapMonth0 && !isLeapMonth1 && (leapMonthMeta < 0 ? sign > 0 && monthCodeNumber1 === -leapMonthMeta : sign < 0 && monthCodeNumber1 === monthCodeNumber0) ? 0 : monthCodeNumber1 - monthCodeNumber0 || Number(isLeapMonth1) - Number(isLeapMonth0), \n      Math.sign(monthDiff) === -sign) {\n        const monthCorrect = sign < 0 && -computeCalendarMonthsInYearForYear(calendar, year1);\n        year1 -= sign, yearDiff = year1 - year0, monthDiff = month1 - resolveMonthInMovedYear(calendar, monthCodeNumber0, isLeapMonth0, calendar ? calendar.p(year1) : void 0, 0) + (monthCorrect || computeCalendarMonthsInYearForYear(calendar, year1));\n      } else if (calendar) {\n        const month0Projected = resolveMonthInMovedYear(calendar, monthCodeNumber0, isLeapMonth0, calendar.p(year1), 0);\n        monthDiff = calendar.ee(year1, month0Projected, year1, month1);\n      }\n    }\n  }\n  return {\n    ...durationFieldDefaults,\n    years: yearDiff,\n    months: monthDiff,\n    days: dayDiff\n  };\n}\n\nfunction compareIsoDates(isoDate0, isoDate1) {\n  return compareNumbers(isoDate0.year, isoDate1.year) || compareNumbers(isoDate0.month, isoDate1.month) || compareNumbers(isoDate0.day, isoDate1.day);\n}\n\nfunction countIsoDays(startIsoDate, endIsoDate) {\n  return isoDateToEpochDays(endIsoDate) - isoDateToEpochDays(startIsoDate);\n}\n\nfunction spanRelativeDuration(relativeToSlots, durationFields, largestUnit) {\n  return isZonedEpochSlots(relativeToSlots) ? ((relativeToSlots, durationFields, largestUnit) => {\n    const {calendar: calendar, timeZone: timeZone} = relativeToSlots;\n    const endSlots = moveZonedEpochSlots(relativeToSlots, durationFields);\n    return [ diffZonedEpochsExact(timeZone, calendar, relativeToSlots, endSlots, largestUnit), endSlots.epochNanoseconds, createZonedRelativeOps(calendar, timeZone, relativeToSlots) ];\n  })(relativeToSlots, durationFields, largestUnit) : ((relativeToSlots, durationFields, largestUnit) => {\n    const {calendar: calendar} = relativeToSlots;\n    const origin = checkIsoDateTimeInBounds(combineDateAndTime(relativeToSlots, timeFieldDefaults));\n    const end = moveDateTime(calendar, origin, durationFields);\n    return [ diffDateTimesExact(calendar, origin, end, largestUnit), isoDateTimeToEpochNano(end), createDateRelativeOps(calendar, relativeToSlots) ];\n  })(relativeToSlots, durationFields, largestUnit);\n}\n\nfunction moveRelativeEndpointToEpochNano(relativeToSlots, durationFields) {\n  return isZonedEpochSlots(relativeToSlots) ? moveZonedEpochSlots(relativeToSlots, durationFields).epochNanoseconds : isoDateTimeToEpochNano(moveDateTime(relativeToSlots.calendar, combineDateAndTime(relativeToSlots, timeFieldDefaults), durationFields));\n}\n\nfunction moveRelativeMarkerToEpochNano(relativeOps, dateDuration) {\n  return durationHasDateParts(dateDuration) ? relativeOps.ke(dateDuration) : relativeOps.ne;\n}\n\nfunction createZonedRelativeOps(calendar, timeZone, slots) {\n  const origin = zonedEpochSlotsToIso(slots);\n  return {\n    ne: slots.epochNanoseconds,\n    ke: duration => getSingleInstantFor(timeZone, combineDateAndTime(moveDate(calendar, origin, duration), origin))\n  };\n}\n\nfunction createDateRelativeOps(calendar, origin) {\n  return {\n    ne: isoDateToEpochNano(origin),\n    ke: duration => isoDateToEpochNano(moveDate(calendar, origin, duration))\n  };\n}\n\nfunction isZonedEpochSlots(slots) {\n  return \"timeZone\" in slots;\n}\n\nfunction isUniformUnit(unit, isZoned) {\n  return unit <= 6 - (isZoned ? 1 : 0);\n}\n\nfunction nanoToGivenFields(nano, largestUnit, fieldNames) {\n  const fields = {};\n  for (let unit = largestUnit; unit >= 0; unit--) {\n    const divisor = unitNanoMap[unit];\n    fields[fieldNames[unit]] = divTrunc(nano, divisor), nano = modTrunc(nano, divisor);\n  }\n  return fields;\n}\n\nconst maxDurationSeconds = 2 ** 53;\n\nfunction addDurationsWithoutRelativeTo(doSubtract, slots, otherSlots) {\n  const maxUnit = Math.max(getMaxDurationUnit(slots), getMaxDurationUnit(otherSlots));\n  return clampEntity(\"unit\", maxUnit, 0, 6, 1, durationFieldNamesAsc), ((doSubtract, slots, otherSlots, maxUnit) => createDurationSlots(validateDurationFields(((a, b, largestUnit, doSubtract) => {\n    const combined = durationDayTimeToBigNano(a) + durationDayTimeToBigNano(b) * BigInt(doSubtract ? -1 : 1);\n    return Number.isFinite(Number(combined / bigNanoInUtcDay)) || throwRangeError(outOfBoundsDate), \n    {\n      ...durationFieldDefaults,\n      ...nanoToDurationDayTimeFields(combined, largestUnit)\n    };\n  })(slots, otherSlots, maxUnit, doSubtract))))(doSubtract, slots, otherSlots, maxUnit);\n}\n\nfunction roundDuration(refineRelativeTo, slots, options) {\n  const durationLargestUnit = getMaxDurationUnit(slots);\n  const [largestUnit, smallestUnit, roundingInc, roundingMode, relativeToSlots] = ((options, defaultLargestUnit, refineRelativeTo) => {\n    options = normalizeOptionsOrString(options, smallestUnitStr);\n    let largestUnit = coerceLargestUnit(options);\n    const relativeToInternals = refineRelativeTo(options.relativeTo);\n    let roundingInc = coerceRoundingIncInteger(options);\n    const roundingMode = coerceRoundingMode(options, 7);\n    let smallestUnit = coerceSmallestUnit(options);\n    return void 0 === largestUnit && void 0 === smallestUnit && throwRangeError(\"Required smallestUnit or largestUnit\"), \n    null == smallestUnit && (smallestUnit = 0), null == largestUnit && (largestUnit = Math.max(smallestUnit, defaultLargestUnit)), \n    checkLargestSmallestUnit(largestUnit, smallestUnit), roundingInc = validateRoundingInc(roundingInc, smallestUnit, 1), \n    roundingInc > 1 && smallestUnit > 5 && largestUnit !== smallestUnit && throwRangeError(\"For calendar units with roundingIncrement > 1, use largestUnit = smallestUnit\"), \n    [ largestUnit, smallestUnit, roundingInc, roundingMode, relativeToInternals ];\n  })(options, durationLargestUnit, refineRelativeTo);\n  if (!relativeToSlots && Math.max(durationLargestUnit, largestUnit) <= 6) {\n    return createDurationSlots(validateDurationFields(((durationFields, largestUnit, smallestUnit, roundingInc, roundingMode) => {\n      const roundedBigNano = roundBigNanoToInc(durationDayTimeToBigNano(durationFields), computeBigNanoInc(smallestUnit, roundingInc), roundingMode);\n      return {\n        ...durationFieldDefaults,\n        ...nanoToDurationDayTimeFields(roundedBigNano, largestUnit)\n      };\n    })(slots, largestUnit, smallestUnit, roundingInc, roundingMode)));\n  }\n  relativeToSlots || throwRangeError(\"Missing relativeTo\");\n  const isZoned = isZonedEpochSlots(relativeToSlots);\n  if (!slots.sign && (!isZoned || largestUnit < 6)) {\n    return slots;\n  }\n  const [balancedDuration, endEpochNano, relativeOps] = spanRelativeDuration(relativeToSlots, slots, largestUnit);\n  return createDurationSlots(roundRelativeDuration(balancedDuration, endEpochNano, largestUnit, smallestUnit, roundingInc, roundingMode, relativeOps, isZoned));\n}\n\nfunction absDuration(slots) {\n  return -1 === slots.sign ? negateDuration(slots) : slots;\n}\n\nfunction negateDuration(slots) {\n  return createDurationSlots(negateDurationFields(slots));\n}\n\nfunction negateDurationFields(fields) {\n  const res = {};\n  for (const fieldName of durationFieldNamesAsc) {\n    res[fieldName] = -1 * fields[fieldName] || 0;\n  }\n  return res;\n}\n\nfunction computeDurationSign(fields, fieldNames = durationFieldNamesAsc) {\n  let sign = 0;\n  for (const fieldName of fieldNames) {\n    const fieldSign = Math.sign(fields[fieldName]);\n    fieldSign && (sign && sign !== fieldSign && throwRangeError(\"Cannot mix duration signs\"), \n    sign = fieldSign);\n  }\n  return sign;\n}\n\nfunction validateDurationFields(fields) {\n  for (const calendarUnit of durationCalendarFieldNamesAsc) {\n    validateDurationCalendarUnit(calendarUnit, fields[calendarUnit]);\n  }\n  const bigNano = durationDayTimeToBigNano(fields);\n  return validateDurationTimeUnit(Number(bigNano / bigNanoInSec)), fields;\n}\n\nfunction validateDurationCalendarUnit(unit, value) {\n  return clampEntity(unit, value, -4294967295, 4294967295, 1);\n}\n\nfunction validateDurationTimeUnit(n) {\n  Number.isSafeInteger(n) || throwRangeError(\"Out-of-bounds duration\");\n}\n\nfunction durationDayTimeToBigNano(fields) {\n  return BigInt(fields.days) * bigNanoInUtcDay + durationTimeToBigNano(fields);\n}\n\nfunction durationTimeToBigNano(fields) {\n  return BigInt(fields.hours) * bigNanoInHour + BigInt(fields.minutes) * bigNanoInMinute + durationSubMinuteToBigNano(fields);\n}\n\nfunction durationSubMinuteToBigNano(fields) {\n  return BigInt(fields.seconds) * bigNanoInSec + BigInt(fields.milliseconds) * bigNanoInMilli + BigInt(fields.microseconds) * bigNanoInMicro + BigInt(fields.nanoseconds);\n}\n\nfunction nanoToDurationDayTimeFields(bigNano, largestUnit = 6) {\n  const days = Number(bigNano / bigNanoInUtcDay);\n  const timeNano = Number(bigNano % bigNanoInUtcDay);\n  const unitNano = unitNanoMap[largestUnit];\n  const largestUnitVal = largestUnit <= 3 ? Number(bigNano / BigInt(unitNano)) : days * (nanoInUtcDay / unitNano) + divTrunc(timeNano, unitNano);\n  Number.isFinite(largestUnitVal) || throwRangeError(outOfBoundsDate), largestUnit <= 3 && Math.abs(largestUnitVal) / (nanoInSec / unitNanoMap[largestUnit]) >= maxDurationSeconds && throwRangeError(outOfBoundsDate);\n  const dayTimeFields = nanoToGivenFields(timeNano, largestUnit, durationFieldNamesAsc);\n  return dayTimeFields[durationFieldNamesAsc[largestUnit]] = largestUnitVal, dayTimeFields;\n}\n\nfunction nanoToDurationTimeFields(nano, largestUnit = 5) {\n  return nanoToGivenFields(nano, largestUnit, durationFieldNamesAsc);\n}\n\nfunction durationHasDateParts(fields) {\n  return Boolean(computeDurationSign(fields, durationDateFieldNamesAsc));\n}\n\nfunction getMaxDurationUnit(fields) {\n  let unit = 9;\n  for (;unit > 0 && !fields[durationFieldNamesAsc[unit]]; unit--) {}\n  return unit;\n}\n\nfunction compareZonedEpochSlots(zonedEpochSlots0, zonedEpochSlots1) {\n  return compareBigInts(zonedEpochSlots0.epochNanoseconds, zonedEpochSlots1.epochNanoseconds);\n}\n\nfunction compareDurations(refineRelativeTo, durationSlots0, durationSlots1, options) {\n  const relativeToSlots = refineRelativeTo(normalizeOptions(options).relativeTo);\n  const maxUnit = Math.max(getMaxDurationUnit(durationSlots0), getMaxDurationUnit(durationSlots1));\n  return allPropsEqual(durationFieldNamesAsc, durationSlots0, durationSlots1) ? 0 : isUniformUnit(maxUnit, relativeToSlots && isZonedEpochSlots(relativeToSlots)) ? compareBigInts(durationDayTimeToBigNano(durationSlots0), durationDayTimeToBigNano(durationSlots1)) : (relativeToSlots || throwRangeError(\"Missing relativeTo\"), \n  compareBigInts(moveRelativeEndpointToEpochNano(relativeToSlots, durationSlots0), moveRelativeEndpointToEpochNano(relativeToSlots, durationSlots1)));\n}\n\nfunction compareIsoDateTimeFields(isoDateTime0, isoDateTime1) {\n  return compareIsoDateFields(isoDateTime0, isoDateTime1) || compareTimeFields(isoDateTime0, isoDateTime1);\n}\n\nfunction compareIsoDateFields(isoDate0, isoDate1) {\n  return compareNumbers(isoDateToEpochDays(isoDate0), isoDateToEpochDays(isoDate1));\n}\n\nfunction compareTimeFields(timeFields0, timeFields1) {\n  return compareNumbers(timeFieldsToNano(timeFields0), timeFieldsToNano(timeFields1));\n}\n\nfunction instantsEqual(instantSlots0, instantSlots1) {\n  return !compareZonedEpochSlots(instantSlots0, instantSlots1);\n}\n\nfunction zonedDateTimesEqual(zonedDateTimeSlots0, zonedDateTimeSlots1) {\n  return !compareZonedEpochSlots(zonedDateTimeSlots0, zonedDateTimeSlots1) && zonedDateTimeSlots0.timeZone.m === zonedDateTimeSlots1.timeZone.m && zonedDateTimeSlots0.calendar === zonedDateTimeSlots1.calendar;\n}\n\nfunction plainDateTimesEqual(plainDateTimeSlots0, plainDateTimeSlots1) {\n  return !compareIsoDateTimeFields(plainDateTimeSlots0, plainDateTimeSlots1) && plainDateTimeSlots0.calendar === plainDateTimeSlots1.calendar;\n}\n\nfunction plainDatesEqual(plainDateSlots0, plainDateSlots1) {\n  return !compareIsoDateFields(plainDateSlots0, plainDateSlots1) && plainDateSlots0.calendar === plainDateSlots1.calendar;\n}\n\nfunction plainYearMonthsEqual(plainYearMonthSlots0, plainYearMonthSlots1) {\n  return !compareIsoDateFields(plainYearMonthSlots0, plainYearMonthSlots1) && plainYearMonthSlots0.calendar === plainYearMonthSlots1.calendar;\n}\n\nfunction plainMonthDaysEqual(plainMonthDaySlots0, plainMonthDaySlots1) {\n  return !compareIsoDateFields(plainMonthDaySlots0, plainMonthDaySlots1) && plainMonthDaySlots0.calendar === plainMonthDaySlots1.calendar;\n}\n\nfunction plainTimesEqual(plainTimeSlots0, plainTimeSlots1) {\n  return !compareTimeFields(plainTimeSlots0, plainTimeSlots1);\n}\n\nfunction getCalendarEraOrigins(calendar) {\n  return 0 === calendar ? gregoryEraOrigins : calendar ? calendar.k : void 0;\n}\n\nfunction getCalendarFieldNames(calendar, fieldNames, fieldNamesWithEra = fieldNames) {\n  return getCalendarEraOrigins(calendar) ? fieldNamesWithEra : fieldNames;\n}\n\nfunction resolveCalendarYear(fields, calendar) {\n  const exoticCalendar = calendar || void 0;\n  const eraOrigins = getCalendarEraOrigins(calendar);\n  let {era: era, eraYear: eraYear, year: year} = fields;\n  if (void 0 !== year && (year = toIntegerWithTrunc(year, \"year\")), void 0 !== eraYear && (eraYear = toIntegerWithTrunc(eraYear, \"eraYear\")), \n  void 0 !== era || void 0 !== eraYear) {\n    void 0 !== era && void 0 !== eraYear || throwTypeError(\"Mismatching era/eraYear\"), \n    eraOrigins || throwRangeError(\"Forbidden era/eraYear\");\n    const normalizedEra = normalizeEraName(era);\n    const eraOrigin = eraOrigins[normalizedEra];\n    void 0 === eraOrigin && throwRangeError((era => `Invalid era: ${era}`)(era));\n    const yearByEra = exoticCalendar?._ ? exoticCalendar._(eraYear, normalizedEra, eraOrigin) : eraYearToYear(eraYear, eraOrigin);\n    void 0 !== year && year !== yearByEra && throwRangeError(\"Mismatching year/eraYear\"), \n    year = yearByEra;\n  } else {\n    void 0 === year && throwTypeError(missingYear(eraOrigins));\n  }\n  return year;\n}\n\nfunction resolveCalendarMonth(fields, calendar, year, monthCodeParts, overflow) {\n  let {month: month, monthCode: monthCode} = fields;\n  if (void 0 !== monthCode) {\n    const monthByCode = ((calendar, monthCode, year, overflow, monthCodeParts = parseMonthCode(monthCode)) => {\n      const leapMonth = calendar ? calendar.p(year) : void 0;\n      const [monthCodeNumber, wantsLeapMonth] = monthCodeParts;\n      let month = monthCodeNumberToMonth(monthCodeNumber, wantsLeapMonth, leapMonth);\n      if (wantsLeapMonth) {\n        const leapMonthMeta = calendar ? calendar.l : void 0;\n        void 0 === leapMonthMeta && throwRangeError(invalidLeapMonth), leapMonthMeta > 0 ? (month > leapMonthMeta && throwRangeError(invalidLeapMonth), \n        leapMonth !== month && (1 === overflow && throwRangeError(invalidLeapMonth), month = monthCodeNumberToMonth(monthCodeNumber, 0, leapMonth))) : (month !== -leapMonthMeta && throwRangeError(invalidLeapMonth), \n        void 0 === leapMonth && 1 === overflow && throwRangeError(invalidLeapMonth));\n      }\n      return month;\n    })(calendar, monthCode, year, overflow, monthCodeParts);\n    void 0 !== month && month !== monthByCode && throwRangeError(\"Mismatching month/monthCode\"), \n    month = monthByCode, overflow = 1;\n  } else {\n    void 0 === month && throwTypeError(\"Missing month/monthCode\");\n  }\n  return clampEntity(\"month\", month, 1, computeCalendarMonthsInYearForYear(calendar, year), overflow);\n}\n\nfunction resolveCalendarDay(fields, calendar, year, month, overflow) {\n  return clampProp(fields, \"day\", 1, computeCalendarDaysInMonthForYearMonth(calendar, year, month), overflow);\n}\n\nfunction eraYearToYear(eraYear, eraOrigin) {\n  return (eraOrigin + eraYear) * (Math.sign(eraOrigin) || 1) || 0;\n}\n\nfunction resolveTimeFields(fields, overflow) {\n  return constrainTimeFields(pluckProps(timeFieldNamesAsc, {\n    ...timeFieldDefaults,\n    ...fields\n  }), overflow);\n}\n\nconst offsetRegExp = /*@__PURE__*/ createRegExp(\"([+-])(\\\\d{2})(?::?(\\\\d{2})(?::?(\\\\d{2})(?:[.,](\\\\d{1,9}))?)?)?\");\n\nfunction parseOffsetNano(s) {\n  const offsetNano = parseOffsetNanoMaybe(s);\n  return void 0 === offsetNano && throwRangeError(failedParse(s)), offsetNano;\n}\n\nfunction parseOffsetNanoMaybe(s, onlyHourMinute) {\n  const parts = offsetRegExp.exec(s);\n  if (parts && (s => (s => {\n    \"T\" !== s[0] && \"t\" !== s[0] || (s = s.slice(1));\n    const fractionIndex = s.search(/[.,]/);\n    const main = fractionIndex < 0 ? s : s.slice(0, fractionIndex);\n    const parts = main.split(\":\");\n    return 1 === parts.length ? /^(?:\\d{2}|\\d{4}|\\d{6})$/i.test(main) : (2 === parts.length || 3 === parts.length) && parts.every(part => 2 === part.length && /^\\d{2}$/i.test(part));\n  })(s.slice(1)))(parts[0])) {\n    return ((parts, onlyHourMinute) => {\n      const firstSubMinutePart = parts[4] || parts[5];\n      onlyHourMinute && firstSubMinutePart && throwRangeError(invalidSubstring(firstSubMinutePart));\n      const offsetNanoPos = parseInt0(parts[2]) * nanoInHour + parseInt0(parts[3]) * nanoInMinute + parseInt0(parts[4]) * nanoInSec + parseSubsecNano(parts[5] || \"\");\n      return offsetNano = offsetNanoPos * parseSign(parts[1]), Math.abs(offsetNano) >= nanoInUtcDay && throwRangeError(\"Out-of-bounds offset\"), \n      offsetNano;\n      var offsetNano;\n    })(parts, onlyHourMinute);\n  }\n}\n\nconst dateFieldRefiners = {\n  era: toString,\n  month: toPositiveIntegerWithTruncation,\n  monthCode(monthCode, fieldName) {\n    return requireString(toPrimitiveWithStringHint(monthCode), fieldName);\n  },\n  day: toPositiveIntegerWithTruncation\n};\n\nconst timeFieldRefiners = /*@__PURE__*/ zipPropsConst(timeFieldNamesAsc, toIntegerWithTrunc);\n\nconst durationFieldRefiners = /*@__PURE__*/ zipPropsConst(durationFieldNamesAsc, toStrictInteger);\n\nconst dateTimeFieldRefiners = /*@__PURE__*/ Object.assign({}, dateFieldRefiners, timeFieldRefiners);\n\nconst zonedDateTimeFieldRefiners = {\n  offset(offsetString) {\n    return parseOffsetNano(requireString(toPrimitiveWithStringHint(offsetString)));\n  },\n  ...dateTimeFieldRefiners\n};\n\nfunction readAndRefineBagFields(bag, validFieldNames, fieldRefiners, requiredFieldNames, disallowEmpty = !requiredFieldNames) {\n  const res = {};\n  let anyMatching = 0;\n  for (const fieldName of validFieldNames) {\n    let fieldVal = bag[fieldName];\n    if (void 0 !== fieldVal) {\n      anyMatching = 1;\n      const refiner = fieldRefiners[fieldName];\n      refiner && (fieldVal = refiner(fieldVal, fieldName)), res[fieldName] = fieldVal;\n    } else {\n      requiredFieldNames && requiredFieldNames.includes(fieldName) && throwTypeError(missingField(fieldName));\n    }\n  }\n  return disallowEmpty && !anyMatching && throwTypeError(noValidFields(validFieldNames)), \n  res;\n}\n\nfunction refineOverflowOptions(options) {\n  return void 0 === options ? 0 : coerceOverflow(requireObjectLike(options));\n}\n\nfunction refineZonedFieldOptions(options, defaultOffsetDisambig = 0) {\n  options = normalizeOptions(options);\n  const epochDisambig = coerceEpochDisambig(options);\n  const offsetDisambig = coerceOffsetDisambig(options, defaultOffsetDisambig);\n  return [ coerceOverflow(options), offsetDisambig, epochDisambig ];\n}\n\nfunction refineEpochDisambigOptions(options) {\n  return coerceEpochDisambig(normalizeOptions(options));\n}\n\nfunction refineCalendarDateFields(fields, calendar, allowMissingDay) {\n  const eraOrigins = getCalendarEraOrigins(calendar);\n  void 0 !== fields.year || void 0 !== fields.era && void 0 !== fields.eraYear || throwTypeError(missingYear(eraOrigins)), \n  void 0 === fields.monthCode && void 0 === fields.month && throwTypeError(\"Missing month/monthCode\"), \n  allowMissingDay || void 0 !== fields.day || throwTypeError(missingField(\"day\"));\n  const monthCodeParts = parseMonthCodeField(fields);\n  return [ resolveCalendarYear(fields, calendar), monthCodeParts ];\n}\n\nfunction refineMonthDayFields(fields, calendar) {\n  const isIso = calendar === isoCalendarImpl;\n  const eraOrigins = getCalendarEraOrigins(calendar);\n  void 0 === fields.day && throwTypeError(missingField(\"day\")), isIso || void 0 === fields.month || void 0 !== fields.year || void 0 !== fields.era && void 0 !== fields.eraYear || throwTypeError(missingYear(eraOrigins));\n  const monthCodeParts = parseMonthCodeField(fields);\n  return [ void 0 !== fields.eraYear || void 0 !== fields.year ? resolveCalendarYear(fields, calendar) : void 0, monthCodeParts ];\n}\n\nfunction createDateTimeFromRefinedFields(isoDate, timeFields = timeFieldDefaults, calendar) {\n  const isoDateTime = combineDateAndTime(isoDate, timeFields);\n  return checkIsoDateTimeInBounds(isoDateTime), createDateTimeSlots(isoDateTime, calendar);\n}\n\nfunction createDateFromRefinedFields(fields, calendar, year, monthCodeParts, overflow) {\n  const month = resolveCalendarMonth(fields, calendar, year, monthCodeParts, overflow);\n  return createDateSlots(checkIsoDateInBounds(computeCalendarIsoFieldsFromParts(calendar, year, month, resolveCalendarDay(fields, calendar, year, month, overflow))), calendar);\n}\n\nfunction createYearMonthFromRefinedFields(fields, calendar, year, monthCodeParts, overflow) {\n  return createYearMonthFromCalendarParts(calendar, year, resolveCalendarMonth(fields, calendar, year, monthCodeParts, overflow));\n}\n\nfunction createMonthDayFromRefinedFields(fields, calendar, year, monthCodeParts, overflow) {\n  const isIso = calendar === isoCalendarImpl;\n  let yearMaybe = year;\n  let day;\n  let monthCodeNumber;\n  let isLeapMonth;\n  if (void 0 === yearMaybe && isIso && (yearMaybe = 1972), void 0 !== yearMaybe) {\n    isIso || checkIsoDateInBounds(computeCalendarIsoFieldsFromParts(calendar, yearMaybe, 1, 1));\n    const month = resolveCalendarMonth(fields, calendar, yearMaybe, monthCodeParts, overflow);\n    day = resolveCalendarDay(fields, calendar, yearMaybe, month, overflow), [monthCodeNumber, isLeapMonth] = computeCalendarMonthCodeParts(calendar, yearMaybe, month);\n  } else {\n    void 0 === fields.monthCode && throwTypeError(\"Missing month/monthCode\"), [monthCodeNumber, isLeapMonth] = monthCodeParts;\n    const referenceYear = calendar ? calendar.re : 1972;\n    if (void 0 !== referenceYear) {\n      day = resolveCalendarDay(fields, calendar, referenceYear, resolveCalendarMonth(fields, calendar, referenceYear, monthCodeParts, overflow), overflow);\n    } else {\n      const constrainedDay = 0 === overflow && calendar ? calendar.ge?.(monthCodeNumber, isLeapMonth, fields.day) : void 0;\n      day = void 0 !== constrainedDay ? constrainedDay : fields.day;\n    }\n  }\n  return createMonthDayFromMonthCodeParts(calendar, monthCodeNumber, isLeapMonth, day, fields.day, overflow);\n}\n\nfunction createYearMonthFromCalendarParts(calendar, year, month) {\n  return createDateSlots(checkIsoYearMonthInBounds(computeCalendarIsoFieldsFromParts(calendar, year, month, 1)), calendar);\n}\n\nfunction createMonthDayFromCalendarParts(calendar, year, month, day) {\n  const [monthCodeNumber, isLeapMonth] = computeCalendarMonthCodeParts(calendar, year, month);\n  return createMonthDayFromMonthCodeParts(calendar, monthCodeNumber, isLeapMonth, day, day, 0);\n}\n\nfunction createMonthDayFromMonthCodeParts(calendar, monthCodeNumber, isLeapMonthArg, day, requestedDay, overflow) {\n  let isLeapMonth = isLeapMonthArg;\n  isLeapMonth && ((calendar && calendar.V?.[monthCodeNumber]) ?? 1 / 0) < requestedDay && (1 === overflow && throwRangeError(invalidLeapMonth), \n  isLeapMonth = 0, day = constrainToRange(requestedDay, 1, (calendar && calendar.U) ?? 1 / 0));\n  let res = calendar ? calendar.u(monthCodeNumber, Boolean(isLeapMonth), day) : computeIsoYearMonthFieldsForMonthDay(monthCodeNumber, Boolean(isLeapMonth));\n  for (;!res && 0 === overflow && day > 1; ) {\n    day--, res = calendar ? calendar.u(monthCodeNumber, Boolean(isLeapMonth), day) : computeIsoYearMonthFieldsForMonthDay(monthCodeNumber, Boolean(isLeapMonth));\n  }\n  res || throwRangeError(\"Cannot guess year\");\n  const {year: finalYear, month: finalMonth} = res;\n  return createDateSlots(checkIsoDateInBounds(computeCalendarIsoFieldsFromParts(calendar, finalYear, finalMonth, day)), calendar);\n}\n\nfunction parseMonthCodeField(fields) {\n  if (void 0 !== fields.monthCode) {\n    return parseMonthCode(fields.monthCode);\n  }\n}\n\nconst RawDateTimeFormat = Intl.DateTimeFormat;\n\nfunction formatEpochMilliToPartsRecord(intlFormat, epochMilli) {\n  epochMilli < -864e13 && throwRangeError(outOfBoundsDate);\n  const parts = intlFormat.formatToParts(epochMilli);\n  const hash = {};\n  for (const part of parts) {\n    hash[part.type] = part.value;\n  }\n  return hash;\n}\n\nconst utcTimeZoneId = \"UTC\";\n\nconst timeZonePeriodDaysByName = {\n  \"El_Aaiun\": 17,\n  \"Tucuman\": 12,\n  \"Tirane\": 11,\n  \"Riga\": 10,\n  \"Simferopol\": 9,\n  \"Vienna\": 9,\n  \"Tunis\": 8,\n  \"Boa_Vista\": 6,\n  \"Fortaleza\": 6,\n  \"Maceio\": 6,\n  \"Noronha\": 6,\n  \"Recife\": 6,\n  \"Gaza\": 6,\n  \"Hebron\": 6,\n  \"DeNoronha\": 6\n};\n\nconst minPossibleTransitionSec = -388152e4;\n\nfunction refineTimeDisplayTuple(options, maxSmallestUnit = 4) {\n  const subsecDigits = coerceFractionalSecondDigits(options);\n  const roundingMode = coerceRoundingMode(options, 4);\n  const smallestUnit = coerceSmallestUnit(options);\n  return [ roundingMode, ...resolveSmallestUnitAndSubsecDigits(validateUnitRange(smallestUnitStr, smallestUnit, 0, maxSmallestUnit), subsecDigits) ];\n}\n\nfunction refineDateDisplayOptions(options) {\n  return coerceCalendarDisplay(normalizeOptions(options));\n}\n\nfunction refineTimeDisplayOptions(options, maxSmallestUnit) {\n  return refineTimeDisplayTuple(normalizeOptions(options), maxSmallestUnit);\n}\n\nfunction resolveSmallestUnitAndSubsecDigits(smallestUnit, subsecDigits) {\n  return null != smallestUnit ? [ unitNanoMap[smallestUnit], smallestUnit < 4 ? 9 - 3 * smallestUnit : -1 ] : [ void 0 === subsecDigits ? 1 : 10 ** (9 - subsecDigits), subsecDigits ];\n}\n\nfunction formatInstantIso(refineTimeZoneString, instantSlots, options) {\n  const [timeZoneArg, roundingMode, nanoInc, subsecDigits] = (options => {\n    const subsecDigits = coerceFractionalSecondDigits(options = normalizeOptions(options));\n    const roundingMode = coerceRoundingMode(options, 4);\n    const smallestUnit = coerceSmallestUnit(options);\n    return [ options.timeZone, roundingMode, ...resolveSmallestUnitAndSubsecDigits(validateUnitRange(smallestUnitStr, smallestUnit, 0, 4), subsecDigits) ];\n  })(options);\n  const providedTimeZone = void 0 !== timeZoneArg;\n  return ((providedTimeZone, timeZone, epochNano, roundingMode, nanoInc, subsecDigits) => {\n    epochNano = roundBigNanoToDayOriginInc(epochNano, BigInt(nanoInc), roundingMode);\n    const offsetNano = timeZone.B(epochNano);\n    return formatIsoDateTimeFields(epochNanoToIsoDateTime(epochNano + BigInt(offsetNano)), subsecDigits) + (providedTimeZone ? formatOffsetNano(roundToMinute(offsetNano)) : \"Z\");\n  })(providedTimeZone, queryTimeZone(providedTimeZone ? refineTimeZoneString(timeZoneArg) : \"UTC\"), instantSlots.epochNanoseconds, roundingMode, nanoInc, subsecDigits);\n}\n\nfunction formatInstantIsoAuto(instantSlots) {\n  return formatIsoDateTimeFields(epochNanoToIsoDateTime(instantSlots.epochNanoseconds), void 0) + \"Z\";\n}\n\nfunction formatZonedDateTimeIso(zonedDateTimeSlots0, options) {\n  const displayOptions = (options => {\n    options = normalizeOptions(options);\n    const calendarDisplay = coerceCalendarDisplay(options);\n    const subsecDigits = coerceFractionalSecondDigits(options);\n    const offsetDisplay = coerceOffsetDisplay(options);\n    const roundingMode = coerceRoundingMode(options, 4);\n    const smallestUnit = coerceSmallestUnit(options);\n    return [ calendarDisplay, coerceTimeZoneDisplay(options), offsetDisplay, roundingMode, ...resolveSmallestUnitAndSubsecDigits(validateUnitRange(smallestUnitStr, smallestUnit, 0, 4), subsecDigits) ];\n  })(options);\n  return ((calendar, timeZoneId, timeZone, epochNano, calendarDisplay, timeZoneDisplay, offsetDisplay, roundingMode, nanoInc, subsecDigits) => {\n    epochNano = roundBigNanoToDayOriginInc(epochNano, BigInt(nanoInc), roundingMode);\n    const offsetNano = timeZone.B(epochNano);\n    return formatIsoDateTimeFields(epochNanoToIsoDateTime(epochNano + BigInt(offsetNano)), subsecDigits) + formatOffsetNano(roundToMinute(offsetNano), offsetDisplay) + formatTimeZone(timeZoneId, timeZoneDisplay) + formatCalendar(calendar, calendarDisplay);\n  })(zonedDateTimeSlots0.calendar, zonedDateTimeSlots0.timeZone.id, zonedDateTimeSlots0.timeZone, zonedDateTimeSlots0.epochNanoseconds, ...displayOptions);\n}\n\nfunction formatZonedDateTimeIsoAuto(zonedDateTimeSlots) {\n  const calendar = zonedDateTimeSlots.calendar;\n  const timeZone = zonedDateTimeSlots.timeZone;\n  const offsetNano = timeZone.B(zonedDateTimeSlots.epochNanoseconds);\n  return formatIsoDateTimeFields(epochNanoToIsoDateTime(zonedDateTimeSlots.epochNanoseconds + BigInt(offsetNano)), void 0) + formatOffsetNano(roundToMinute(offsetNano)) + formatTimeZone(timeZone.id, 0) + (calendar === isoCalendarImpl ? \"\" : formatCalendarId(getCalendarSlotId(calendar), 0));\n}\n\nfunction formatPlainDateTimeIso(plainDateTimeSlots0, options) {\n  const displayOptions = (options => (options = normalizeOptions(options), [ coerceCalendarDisplay(options), ...refineTimeDisplayTuple(options) ]))(options);\n  return ((calendar, isoDateTime, calendarDisplay, roundingMode, nanoInc, subsecDigits) => formatIsoDateTimeFields(roundDateTimeToInc(isoDateTime, nanoInc, roundingMode), subsecDigits) + formatCalendar(calendar, calendarDisplay))(plainDateTimeSlots0.calendar, plainDateTimeSlots0, ...displayOptions);\n}\n\nfunction formatDateTimeIsoAuto(isoDateTimeSlots) {\n  const calendar = isoDateTimeSlots.calendar;\n  return formatIsoDateTimeFields(isoDateTimeSlots, void 0) + (calendar === isoCalendarImpl ? \"\" : formatCalendarId(getCalendarSlotId(calendar), 0));\n}\n\nfunction formatPlainDateIso(plainDateSlots, options) {\n  return calendar = plainDateSlots.calendar, isoDate = plainDateSlots, calendarDisplay = refineDateDisplayOptions(options), \n  formatIsoDateFields(isoDate) + formatCalendar(calendar, calendarDisplay);\n  var calendar, isoDate, calendarDisplay;\n}\n\nfunction formatDateIsoAuto(plainDateSlots) {\n  return formatIsoDateFields(plainDateSlots) + (plainDateSlots.calendar === isoCalendarImpl ? \"\" : formatCalendarId(getCalendarSlotId(plainDateSlots.calendar), 0));\n}\n\nfunction formatPlainYearMonthIso(plainYearMonthSlots, options) {\n  return formatDateLikeIso(plainYearMonthSlots.calendar, formatIsoYearMonthFields, plainYearMonthSlots, refineDateDisplayOptions(options));\n}\n\nfunction formatYearMonthIsoAuto(plainYearMonthSlots) {\n  const calendar = plainYearMonthSlots.calendar;\n  return calendar !== isoCalendarImpl ? formatIsoDateFields(plainYearMonthSlots) + formatCalendarId(getCalendarSlotId(calendar), 0) : formatIsoYearMonthFields(plainYearMonthSlots);\n}\n\nfunction formatPlainMonthDayIso(plainMonthDaySlots, options) {\n  return formatDateLikeIso(plainMonthDaySlots.calendar, formatIsoMonthDayFields, plainMonthDaySlots, refineDateDisplayOptions(options));\n}\n\nfunction formatMonthDayIsoAuto(plainMonthDaySlots) {\n  const calendar = plainMonthDaySlots.calendar;\n  return calendar !== isoCalendarImpl ? formatIsoDateFields(plainMonthDaySlots) + formatCalendarId(getCalendarSlotId(calendar), 0) : formatIsoMonthDayFields(plainMonthDaySlots);\n}\n\nfunction formatDateLikeIso(calendar, formatSimple, isoDate, calendarDisplay) {\n  const showCalendar = calendarDisplay > 1 || 0 === calendarDisplay && calendar !== isoCalendarImpl;\n  return 1 === calendarDisplay ? calendar === isoCalendarImpl ? formatSimple(isoDate) : formatIsoDateFields(isoDate) : showCalendar ? formatIsoDateFields(isoDate) + formatCalendarId(getCalendarSlotId(calendar), 2 === calendarDisplay) : formatSimple(isoDate);\n}\n\nfunction formatPlainTimeIso(slots, options) {\n  return ((fields, roundingMode, nanoInc, subsecDigits) => formatTimeFields(roundTimeToInc(fields, nanoInc, roundingMode)[0], subsecDigits))(slots, ...refineTimeDisplayOptions(options));\n}\n\nfunction formatTimeIsoAuto(slots) {\n  return formatTimeFields(slots, void 0);\n}\n\nfunction formatDurationIso(slots, options) {\n  const [roundingMode, nanoInc, subsecDigits] = refineTimeDisplayOptions(options, 3);\n  return nanoInc > 1 && validateDurationFields(slots = {\n    ...slots,\n    ...roundDayTimeDurationByInc(slots, nanoInc, roundingMode)\n  }), formatDurationSlots(slots, subsecDigits);\n}\n\nfunction formatDurationIsoAuto(slots) {\n  return formatDurationSlots(slots, void 0);\n}\n\nfunction formatDurationSlots(durationSlots, subsecDigits) {\n  const {sign: sign} = durationSlots;\n  const abs = -1 === sign ? negateDurationFields(durationSlots) : durationSlots;\n  const {hours: hours, minutes: minutes} = abs;\n  const bigNano = durationSubMinuteToBigNano(abs);\n  const wholeSec = Number(bigNano / bigNanoInSec);\n  const subsecNano = Number(bigNano % bigNanoInSec);\n  validateDurationTimeUnit(wholeSec);\n  const subsecNanoString = formatSubsecNano(subsecNano, subsecDigits);\n  const forceSec = subsecDigits >= 0 || !sign || subsecNanoString;\n  return (sign < 0 ? \"-\" : \"\") + \"P\" + formatDurationFragments({\n    \"Y\": formatDurationNumber(abs.years),\n    \"M\": formatDurationNumber(abs.months),\n    \"W\": formatDurationNumber(abs.weeks),\n    \"D\": formatDurationNumber(abs.days)\n  }) + (hours || minutes || wholeSec || forceSec ? \"T\" + formatDurationFragments({\n    \"H\": formatDurationNumber(hours),\n    \"M\": formatDurationNumber(minutes),\n    \"S\": formatDurationNumber(wholeSec, forceSec) + subsecNanoString\n  }) : \"\");\n}\n\nfunction formatDurationFragments(fragObj) {\n  const parts = [];\n  for (const fragName in fragObj) {\n    const fragVal = fragObj[fragName];\n    fragVal && parts.push(fragVal, fragName);\n  }\n  return parts.join(\"\");\n}\n\nfunction formatDurationNumber(n, force) {\n  if (!n && !force) {\n    return \"\";\n  }\n  const options = Object.create(null);\n  return options.useGrouping = 0, n.toLocaleString(\"fullwide\", options);\n}\n\nfunction formatIsoDateTimeFields(isoDateTime, subsecDigits) {\n  return formatIsoDateFields(isoDateTime) + \"T\" + formatTimeFields(isoDateTime, subsecDigits);\n}\n\nfunction formatIsoDateFields(isoDate) {\n  return formatIsoYearMonthFields(isoDate) + \"-\" + padNumber2(isoDate.day);\n}\n\nfunction formatIsoYearMonthFields(isoDate) {\n  const {year: year} = isoDate;\n  return (year < 0 || year > 9999 ? getSignStr(year) + padNumber(6, Math.abs(year)) : padNumber(4, year)) + \"-\" + padNumber2(isoDate.month);\n}\n\nfunction formatIsoMonthDayFields(isoDate) {\n  return padNumber2(isoDate.month) + \"-\" + padNumber2(isoDate.day);\n}\n\nfunction formatTimeFields(timeFields, subsecDigits) {\n  const parts = [ padNumber2(timeFields.hour), padNumber2(timeFields.minute) ];\n  return -1 !== subsecDigits && parts.push(padNumber2(timeFields.second) + ((millisecond, microsecond, nanosecond, subsecDigits) => formatSubsecNano(millisecond * nanoInMilli + microsecond * nanoInMicro + nanosecond, subsecDigits))(timeFields.millisecond, timeFields.microsecond, timeFields.nanosecond, subsecDigits)), \n  parts.join(\":\");\n}\n\nfunction formatOffsetNano(offsetNano, offsetDisplay = 0) {\n  if (1 === offsetDisplay) {\n    return \"\";\n  }\n  const [hour, nanoRemainder0] = divModFloor(Math.abs(offsetNano), nanoInHour);\n  const [minute, nanoRemainder1] = divModFloor(nanoRemainder0, nanoInMinute);\n  const [second, nanoRemainder2] = divModFloor(nanoRemainder1, nanoInSec);\n  return getSignStr(offsetNano) + padNumber2(hour) + \":\" + padNumber2(minute) + (second || nanoRemainder2 ? \":\" + padNumber2(second) + formatSubsecNano(nanoRemainder2) : \"\");\n}\n\nfunction formatTimeZone(timeZoneId, timeZoneDisplay) {\n  return 1 !== timeZoneDisplay ? \"[\" + (2 === timeZoneDisplay ? \"!\" : \"\") + timeZoneId + \"]\" : \"\";\n}\n\nfunction formatCalendar(calendar, calendarDisplay) {\n  return calendarDisplay > 1 || 0 === calendarDisplay && calendar !== isoCalendarImpl ? formatCalendarId(getCalendarSlotId(calendar), 2 === calendarDisplay) : \"\";\n}\n\nfunction formatCalendarId(calendarId, isCritical) {\n  return \"[\" + (isCritical ? \"!\" : \"\") + \"u-ca=\" + calendarId + \"]\";\n}\n\nconst trailingZerosRE = /0+$/;\n\nfunction formatSubsecNano(totalNano, subsecDigits) {\n  let s = padNumber(9, totalNano);\n  return s = void 0 === subsecDigits ? s.replace(trailingZerosRE, \"\") : s.slice(0, subsecDigits), \n  s ? \".\" + s : \"\";\n}\n\nfunction getSignStr(num) {\n  return num < 0 ? \"-\" : \"+\";\n}\n\nconst icuRegExp = /^(AC|AE|AG|AR|AS|BE|BS|CA|CN|CS|CT|EA|EC|IE|IS|JS|MI|NE|NS|PL|PN|PR|PS|SS|VS)T$/;\n\nconst badCharactersRegExp = /[^\\w\\/:+-]+/;\n\nfunction refineTimeZoneId(rawId) {\n  return resolveTimeZoneId(requireString(rawId));\n}\n\nfunction resolveTimeZoneId(rawId) {\n  return resolveTimeZoneRecord(rawId).id;\n}\n\nfunction resolveTimeZoneRecord(rawId) {\n  const upperRawId = rawId.toUpperCase();\n  const offsetRecord = (upperRawId => {\n    const offsetNano = parseOffsetNanoMaybe(upperRawId, 1);\n    if (void 0 !== offsetNano) {\n      return {\n        id: formatOffsetNano(offsetNano),\n        Z: offsetNano,\n        m: offsetNano\n      };\n    }\n  })(upperRawId);\n  if (offsetRecord) {\n    return {\n      kind: \"fixed\",\n      ...offsetRecord\n    };\n  }\n  const normId = \"UTC\" === upperRawId ? \"UTC\" : (rawId => (badCharactersRegExp.test(rawId) && throwRangeError(invalidTimeZone(rawId)), \n  icuRegExp.test(rawId) && throwRangeError(\"Forbidden ICU TimeZone\"), rawId.toLowerCase().split(\"/\").map((part, partI) => (part.length <= 3 || /\\d/.test(part)) && !/etc|yap/.test(part) ? part.toUpperCase() : part.replace(/baja|dumont|[a-z]+/g, (a, i) => a.length <= 2 && !partI || \"in\" === a || \"chat\" === a ? a.toUpperCase() : a.length > 2 || !i ? capitalize(a).replace(/island|noronha|murdo|rivadavia|urville/, capitalize) : a)).join(\"/\")))(rawId);\n  return queryNamedTimeZoneRecord(normId);\n}\n\nconst queryNamedTimeZoneRecord = /*@__PURE__*/ memoize(normId => {\n  if (\"UTC\" === normId) {\n    return {\n      kind: \"utc\",\n      id: normId,\n      m: normId\n    };\n  }\n  const upperNormId = normId.toUpperCase();\n  const format = queryTimeZoneIntlFormat(upperNormId);\n  return {\n    kind: \"named\",\n    id: normId,\n    format: format,\n    m: format.resolvedOptions().timeZone\n  };\n});\n\nconst queryTimeZoneIntlFormat = /*@__PURE__*/ memoize(upperNormId => new RawDateTimeFormat(\"en-u-hc-h23\", {\n  calendar: \"iso8601\",\n  timeZone: upperNormId,\n  era: \"short\",\n  year: \"numeric\",\n  month: \"numeric\",\n  day: \"numeric\",\n  hour: \"numeric\",\n  minute: \"numeric\",\n  second: \"numeric\"\n}));\n\nfunction queryTimeZone(rawTimeZoneId) {\n  const record = resolveTimeZoneRecord(rawTimeZoneId);\n  return queryTimeZoneRecord(record.id, record);\n}\n\nconst queryTimeZoneRecord = /*@__PURE__*/ memoize((normTimeZoneId, record) => \"named\" === record.kind ? new IntlTimeZone(normTimeZoneId, record.m, record.format) : new FixedTimeZone(normTimeZoneId, record.m, \"fixed\" === record.kind ? record.Z : 0));\n\nclass FixedTimeZone {\n  constructor(id, compareKey, offsetNano) {\n    this.id = id, this.m = compareKey, this.Z = offsetNano;\n  }\n  B() {\n    return this.Z;\n  }\n  R(isoDateTime) {\n    return [ isoDateTimeAndOffsetToEpochNano(isoDateTime, this.Z) ];\n  }\n  C() {}\n}\n\nclass IntlTimeZone {\n  constructor(id, compareKey, format) {\n    this.id = id, this.m = compareKey, this.oe = ((computeOffsetSec, periodDays) => {\n      const getSample = memoize(computeOffsetSec);\n      const getSplit = memoize(createSplitTuple);\n      const periodSec = 86400 * periodDays;\n      function getOffsetSec(epochSec) {\n        const [startEpochSec, endEpochSec] = computePeriod(epochSec, periodSec);\n        const clampedStartEpochSec = clampIntlSampleEpochSec(startEpochSec);\n        const clampedEndEpochSec = clampIntlSampleEpochSec(endEpochSec);\n        const startOffsetSec = getSample(clampedStartEpochSec);\n        const endOffsetSec = getSample(clampedEndEpochSec);\n        return startOffsetSec === endOffsetSec ? startOffsetSec : pinch(getSplit(clampedStartEpochSec, clampedEndEpochSec), startOffsetSec, endOffsetSec, epochSec);\n      }\n      function pinch(split, startOffsetSec, endOffsetSec, forEpochSec) {\n        let offsetSec;\n        let splitDurSec;\n        for (;(void 0 === forEpochSec || void 0 === (offsetSec = forEpochSec < split[0] ? startOffsetSec : forEpochSec >= split[1] ? endOffsetSec : void 0)) && (splitDurSec = split[1] - split[0]); ) {\n          const middleEpochSec = split[0] + Math.floor(splitDurSec / 2);\n          computeOffsetSec(middleEpochSec) === endOffsetSec ? split[1] = middleEpochSec : split[0] = middleEpochSec + 1;\n        }\n        return offsetSec;\n      }\n      return {\n        Ae(zonedEpochSec) {\n          const wideOffsetSec0 = getOffsetSec(zonedEpochSec - 86400);\n          const wideOffsetSec1 = getOffsetSec(zonedEpochSec + 86400);\n          const wideUtcEpochSec0 = zonedEpochSec - wideOffsetSec0;\n          const wideUtcEpochSec1 = zonedEpochSec - wideOffsetSec1;\n          if (wideOffsetSec0 === wideOffsetSec1) {\n            return [ wideUtcEpochSec0 ];\n          }\n          const narrowOffsetSec0 = getOffsetSec(wideUtcEpochSec0);\n          return narrowOffsetSec0 === getOffsetSec(wideUtcEpochSec1) ? [ zonedEpochSec - narrowOffsetSec0 ] : wideOffsetSec0 > wideOffsetSec1 ? [ wideUtcEpochSec0, wideUtcEpochSec1 ] : [];\n        },\n        ze: getOffsetSec,\n        C: function getTransition(epochSec, direction) {\n          if (direction > 0 && epochSec >= 864e10) {\n            return;\n          }\n          if (direction < 0) {\n            if (epochSec <= minPossibleTransitionSec) {\n              return;\n            }\n            const lookaheadEpochSec = getCurrentEpochSec() + 94867200;\n            if (epochSec > lookaheadEpochSec) {\n              return getTransition(lookaheadEpochSec, -1);\n            }\n          }\n          const searchEpochSec = direction > 0 ? Math.max(epochSec, minPossibleTransitionSec) : epochSec;\n          let [startEpochSec, endEpochSec] = computePeriod(searchEpochSec, periodSec);\n          const inc = periodSec * direction;\n          const searchLimit = direction > 0 ? Math.max(epochSec, getCurrentEpochSec()) + 94867200 : minPossibleTransitionSec;\n          const inBounds = () => direction < 0 ? endEpochSec > searchLimit : startEpochSec < searchLimit;\n          for (;inBounds(); ) {\n            const clampedStartEpochSec = clampIntlSampleEpochSec(startEpochSec);\n            const clampedEndEpochSec = clampIntlSampleEpochSec(endEpochSec);\n            const startOffsetSec = getSample(clampedStartEpochSec);\n            const endOffsetSec = getSample(clampedEndEpochSec);\n            if (startOffsetSec !== endOffsetSec) {\n              const split = getSplit(clampedStartEpochSec, clampedEndEpochSec);\n              pinch(split, startOffsetSec, endOffsetSec);\n              const transitionEpochSec = split[0];\n              if ((compareNumbers(transitionEpochSec, epochSec) || 1) === direction) {\n                return transitionEpochSec;\n              }\n            }\n            startEpochSec += inc, endEpochSec += inc;\n          }\n        }\n      };\n    })((format => epochSec => {\n      const intlParts = formatEpochMilliToPartsRecord(format, 1e3 * epochSec);\n      return 86400 * isoPartsToEpochDays((intlParts => {\n        const relatedYear = intlParts.relatedYear;\n        if (void 0 !== relatedYear) {\n          return parseInt(relatedYear);\n        }\n        const year = parseInt(intlParts.year);\n        return void 0 !== intlParts.era && \"bce\" === normalizeEraName(intlParts.era) ? 1 - year : year;\n      })(intlParts), parseInt(intlParts.month), parseInt(intlParts.day)) + 3600 * parseInt(intlParts.hour) + 60 * parseInt(intlParts.minute) + parseInt(intlParts.second) - epochSec;\n    })(format), (timeZoneId => {\n      const timeZoneName = timeZoneId.split(\"/\").pop();\n      return timeZonePeriodDaysByName[timeZoneName] || 60;\n    })(id));\n  }\n  B(epochNano) {\n    return this.oe.ze((epochNano => epochNanoToSecMod(epochNano)[0])(epochNano)) * nanoInSec;\n  }\n  R(isoDateTime) {\n    const zonedEpochSec = 86400 * isoDateToEpochDays(isoDateTime) + timeFieldsToSec(isoDateTime);\n    const subsecNano = timeFieldsToSubsecNano(isoDateTime);\n    return this.oe.Ae(zonedEpochSec).map(epochSec => checkEpochNanoInBounds(BigInt(epochSec) * bigNanoInSec + BigInt(subsecNano)));\n  }\n  C(epochNano, direction) {\n    const [epochSec, subsecNano] = epochNanoToSecMod(epochNano);\n    const resEpochSec = this.oe.C(epochSec + (direction > 0 || subsecNano ? 1 : 0), direction);\n    if (void 0 !== resEpochSec) {\n      return BigInt(resEpochSec) * bigNanoInSec;\n    }\n  }\n}\n\nfunction getCurrentEpochSec() {\n  return Math.floor(Date.now() / 1e3);\n}\n\nfunction createSplitTuple(startEpochSec, endEpochSec) {\n  return [ startEpochSec, endEpochSec ];\n}\n\nfunction computePeriod(epochSec, periodSec) {\n  const startEpochSec = Math.floor(epochSec / periodSec) * periodSec;\n  return [ startEpochSec, startEpochSec + periodSec ];\n}\n\nfunction clampIntlSampleEpochSec(epochSec) {\n  return constrainToRange(epochSec, -1e10, 864e10);\n}\n\nfunction refineMaybeZonedDateTimeObjectLike(refineTimeZoneString, calendar, bag) {\n  const fields = readAndRefineBagFields(bag, getCalendarFieldNames(calendar, dateTimeAndZoneFieldNamesAlpha, dateTimeAndZoneFieldNamesWithEraAlpha), zonedDateTimeFieldRefiners, [], 0);\n  const isZoned = void 0 !== fields.timeZone;\n  const [year, monthCodeParts] = refineCalendarDateFields(fields, calendar);\n  const isoDate = createDateFromRefinedFields(fields, calendar, year, monthCodeParts, 0);\n  if (isZoned) {\n    const timeFields = resolveTimeFields(fields);\n    const timeZone = queryTimeZone(refineTimeZoneString(fields.timeZone));\n    return {\n      epochNanoseconds: getMatchingInstantFor(timeZone, combineDateAndTime(isoDate, timeFields), fields.offset),\n      timeZone: timeZone,\n      calendar: calendar\n    };\n  }\n  return isoDate;\n}\n\nfunction refineZonedDateTimeObjectLike(refineTimeZoneString, calendar, bag, options) {\n  const fields = readAndRefineBagFields(bag, getCalendarFieldNames(calendar, dateTimeAndZoneFieldNamesAlpha, dateTimeAndZoneFieldNamesWithEraAlpha), zonedDateTimeFieldRefiners, timeZoneFieldNames, 0);\n  const timeZoneId = refineTimeZoneString(fields.timeZone);\n  const [year, monthCodeParts] = refineCalendarDateFields(fields, calendar);\n  const [overflow, offsetDisambig, epochDisambig] = refineZonedFieldOptions(options);\n  const isoDate = createDateFromRefinedFields(fields, calendar, year, monthCodeParts, overflow);\n  const timeFields = resolveTimeFields(fields, overflow);\n  const timeZone = queryTimeZone(timeZoneId);\n  return createZonedEpochNanoSlots(getMatchingInstantFor(timeZone, combineDateAndTime(isoDate, timeFields), fields.offset, offsetDisambig, epochDisambig), timeZone, calendar);\n}\n\nfunction refinePlainDateTimeObjectLike(calendar, bag, options) {\n  const fields = readAndRefineBagFields(bag, getCalendarFieldNames(calendar, dateTimeFieldNamesAlpha, dateTimeFieldNamesWithEraAlpha), dateTimeFieldRefiners, [], 0);\n  const [year, monthCodeParts] = refineCalendarDateFields(fields, calendar);\n  const overflow = refineOverflowOptions(options);\n  return createDateTimeFromRefinedFields(createDateFromRefinedFields(fields, calendar, year, monthCodeParts, overflow), resolveTimeFields(fields, overflow), calendar);\n}\n\nfunction refinePlainDateObjectLike(calendar, bag, options, requireFields = []) {\n  const fields = readAndRefineBagFields(bag, getCalendarFieldNames(calendar, dateFieldNamesAlpha, dateFieldNamesWithEraAlpha), dateFieldRefiners, requireFields);\n  const [year, monthCodeParts] = refineCalendarDateFields(fields, calendar);\n  return createDateFromRefinedFields(fields, calendar, year, monthCodeParts, refineOverflowOptions(options));\n}\n\nfunction refinePlainYearMonthObjectLike(calendar, bag, options, requireFields) {\n  const fields = readAndRefineBagFields(bag, getCalendarFieldNames(calendar, yearMonthFieldNamesAlpha, yearMonthFieldNamesWithEraAlpha), dateFieldRefiners, requireFields);\n  const [year, monthCodeParts] = refineCalendarDateFields(fields, calendar, 1);\n  return createYearMonthFromRefinedFields(fields, calendar, year, monthCodeParts, refineOverflowOptions(options));\n}\n\nfunction refinePlainMonthDayObjectLike(calendar, calendarAbsent, bag, options) {\n  const fields = readAndRefineBagFields(bag, getCalendarFieldNames(calendar, dateFieldNamesAlpha, dateFieldNamesWithEraAlpha), dateFieldRefiners, dayFieldNamesAsc, 0);\n  calendarAbsent && void 0 !== fields.month && void 0 === fields.monthCode && void 0 === fields.year && (fields.year = 1972);\n  const [year, monthCodeParts] = refineMonthDayFields(fields, calendar);\n  return createMonthDayFromRefinedFields(fields, calendar, year, monthCodeParts, refineOverflowOptions(options));\n}\n\nfunction refinePlainTimeObjectLike(bag, options) {\n  return resolveTimeFields(readAndRefineBagFields(bag, timeFieldNamesAlpha, timeFieldRefiners, [], 1), refineOverflowOptions(options));\n}\n\nfunction refineDurationObjectLike(bag) {\n  const durationFields = readAndRefineBagFields(bag, durationFieldNamesAlpha, durationFieldRefiners);\n  return createDurationSlots(validateDurationFields({\n    ...durationFieldDefaults,\n    ...durationFields\n  }));\n}\n\nfunction throwFailedParse(s) {\n  throwRangeError(failedParse(s));\n}\n\nfunction parseInstant(s) {\n  const organized = parseDateTimeLike(s = requireString(toPrimitiveWithStringHint(s)));\n  let offsetNano;\n  return organized || throwFailedParse(s), organized.F ? offsetNano = 0 : organized.offset ? offsetNano = parseOffsetNano(organized.offset) : throwFailedParse(s), \n  organized.timeZoneId && parseOffsetNanoMaybe(organized.timeZoneId, 1), validateIsoDateTimeFields(organized), \n  createEpochNanoSlots(isoDateTimeAndOffsetToEpochNano(organized, offsetNano));\n}\n\nfunction parseRelativeToSlots(s, resolveCalendar) {\n  const organized = parseDateTimeLike(requireString(s));\n  return organized || throwFailedParse(s), organized.timeZoneId ? finalizeZonedDateTime(organized, resolveCalendar, void 0) : (organized.F && throwFailedParse(s), \n  finalizeDate(organized, resolveCalendar));\n}\n\nfunction parseZonedDateTime(s, resolveCalendar, options) {\n  const organized = parseDateTimeLike(requireString(s));\n  return organized && organized.timeZoneId || throwFailedParse(s), finalizeZonedDateTime(organized, resolveCalendar, options);\n}\n\nfunction parsePlainDateTime(s, resolveCalendar) {\n  const organized = parseDateTimeLike(requireString(s));\n  return organized && !organized.F || throwFailedParse(s), finalizeDateTime(organized, resolveCalendar);\n}\n\nfunction parsePlainDate(s, resolveCalendar) {\n  const slots = finalizeDateLike(parsePlainDateLike(requireString(s)), void 0, resolveCalendar);\n  return createDateSlots(slots, slots.calendar);\n}\n\nfunction parsePlainYearMonth(s, resolveCalendar) {\n  const organized = parseYearMonthOnly(requireString(s));\n  if (organized) {\n    return requireIsoCalendar(organized), createDateSlots(checkIsoYearMonthInBounds(validateIsoDateFields(organized)), resolveCalendar(organized.calendarId));\n  }\n  const dateSlots = finalizeDateLike(parsePlainDateLike(s), projectIsoYearMonthDate, resolveCalendar);\n  const {calendar: calendar} = dateSlots;\n  return createDateSlots(moveToStartOfMonth(calendar, dateSlots), calendar);\n}\n\nfunction requireIsoCalendar(organized) {\n  \"iso8601\" !== organized.calendarId && throwRangeError(invalidSubstring(organized.calendarId));\n}\n\nfunction parsePlainMonthDay(s, resolveCalendar) {\n  const organized = parseMonthDayOnly(requireString(s));\n  if (organized) {\n    return requireIsoCalendar(organized), createDateSlots(validateIsoDateFields(organized), resolveCalendar(organized.calendarId));\n  }\n  const dateSlots = finalizeDateLike(parsePlainDateLike(s), projectIsoMonthDayDate, resolveCalendar);\n  const {calendar: calendar} = dateSlots;\n  const {year: origYear, month: origMonth, day: day} = computeCalendarDateFields(calendar, dateSlots);\n  const [monthCodeNumber, isLeapMonth] = computeCalendarMonthCodeParts(calendar, origYear, origMonth);\n  const {year: year, month: month} = ((calendar, monthCodeNumber, isLeapMonth, day) => {\n    const yearMonthFields = calendar ? calendar.u(monthCodeNumber, isLeapMonth, day) : computeIsoYearMonthFieldsForMonthDay(monthCodeNumber, isLeapMonth);\n    return yearMonthFields || throwRangeError(\"Cannot guess year\"), yearMonthFields;\n  })(calendar, monthCodeNumber, isLeapMonth, day);\n  return createDateSlots(checkIsoDateInBounds(computeCalendarIsoFieldsFromParts(calendar, year, month, day)), calendar);\n}\n\nfunction parsePlainTime(s) {\n  let organized = (s => {\n    const parts = parseTimeOnlyParts(s);\n    return parts ? (organizeAnnotationParts(parts[13]), organizeTimeParts(parts, 1)) : void 0;\n  })(s = requireString(s));\n  if (!organized) {\n    const dateTime = parseDateTimeLike(s);\n    dateTime && dateTime.te || throwFailedParse(s), dateTime.F && throwRangeError(invalidSubstring(\"Z\")), \n    requireIsoCalendar(dateTime), organized = dateTime;\n  }\n  let altParsed;\n  return (altParsed = parseYearMonthOnly(s)) && isIsoDateFieldsValid(altParsed) && throwFailedParse(s), \n  (altParsed = parseMonthDayOnly(s)) && isIsoDateFieldsValid(altParsed) && throwFailedParse(s), \n  createTimeSlots(validateTimeFields(organized));\n}\n\nfunction parseDuration(s) {\n  const parts = durationRegExp.exec(requireString(s));\n  return parts || throwFailedParse(s), createDurationSlots(validateDurationFields((parts => {\n    let hasAny = 0;\n    let hasAnyFrac = 0;\n    let leftoverNano = 0;\n    let durationFields = {\n      years: parseUnit(parts[2]),\n      months: parseUnit(parts[3]),\n      weeks: parseUnit(parts[4]),\n      days: parseUnit(parts[5]),\n      hours: parseUnit(parts[6], parts[7], 5),\n      minutes: parseUnit(parts[8], parts[9], 4),\n      seconds: parseUnit(parts[10], parts[11], 3),\n      ...nanoToGivenFields(leftoverNano, 2, durationFieldNamesAsc)\n    };\n    return hasAny || throwRangeError(noValidFields(durationFieldNamesAsc)), parseSign(parts[1]) < 0 && (durationFields = negateDurationFields(durationFields)), \n    durationFields;\n    function parseUnit(wholeStr, fracStr, timeUnit) {\n      let leftoverUnits = 0;\n      let wholeUnits = 0;\n      return timeUnit && ([leftoverUnits, leftoverNano] = divModFloor(leftoverNano, unitNanoMap[timeUnit])), \n      void 0 !== wholeStr && (hasAnyFrac && throwRangeError(invalidSubstring(wholeStr)), \n      wholeUnits = (s => {\n        const n = parseInt(s);\n        return Number.isFinite(n) || throwRangeError(invalidSubstring(s)), n;\n      })(wholeStr), hasAny = 1, fracStr && (leftoverNano = parseSubsecNano(fracStr) * (unitNanoMap[timeUnit] / nanoInSec), \n      hasAnyFrac = 1)), leftoverUnits + wholeUnits;\n    }\n  })(parts)));\n}\n\nfunction parseCalendarId(s) {\n  const res = parseDateTimeLike(s) || parseYearMonthOnly(s) || parseMonthDayOnly(s);\n  if (res) {\n    return res.calendarId;\n  }\n  const timeParts = parseTimeOnlyParts(s);\n  return timeParts ? organizeAnnotationParts(timeParts[13]).calendarId : s;\n}\n\nfunction parseTimeZoneId(s) {\n  const parsed = parseDateTimeLike(s);\n  return parsed && (parsed.timeZoneId || parsed.F && \"UTC\" || parsed.offset) || s;\n}\n\nfunction parsePlainDateLike(s) {\n  const organized = parseDateTimeLike(s);\n  return organized && !organized.F || throwFailedParse(s), organized;\n}\n\nfunction finalizeDateLike(organized, isoDateProjector, resolveCalendar) {\n  return isoDateProjector && \"iso8601\" === organized.calendarId ? (validateIsoDateFields(organized), \n  organized.te && validateTimeFields(organized), finalizeDate(isoDateProjector(organized), resolveCalendar)) : organized.te ? finalizeDateTime(organized, resolveCalendar) : finalizeDate(organized, resolveCalendar);\n}\n\nfunction projectIsoYearMonthDate(organized) {\n  const day = 12 * organized.year + organized.month === isoYearMonthIndexMin ? 20 : 1;\n  return {\n    ...organized,\n    day: day\n  };\n}\n\nfunction projectIsoMonthDayDate(organized) {\n  return {\n    ...organized,\n    year: 1972\n  };\n}\n\nfunction finalizeZonedDateTime(organized, resolveCalendar, options) {\n  const timeZone = queryTimeZone(resolveTimeZoneId(organized.timeZoneId));\n  let epochNano;\n  if (validateIsoDateTimeFields(organized), organized.te) {\n    const offsetNano = organized.offset ? parseOffsetNano(organized.offset) : void 0;\n    const [, offsetDisambig, epochDisambig] = refineZonedFieldOptions(options);\n    epochNano = getMatchingInstantFor(timeZone, organized, offsetNano, offsetDisambig, epochDisambig, !(timeZone.Z || void 0 === organized.offset || (offset = organized.offset, \n    offset.replace(/\\D/g, \"\").length > 4)), organized.F);\n  } else {\n    refineZonedFieldOptions(options), epochNano = getStartOfDayInstantFor(timeZone, organized);\n  }\n  var offset;\n  return checkEpochNanoInBounds(epochNano), createZonedEpochNanoSlots(epochNano, timeZone, resolveCalendar(organized.calendarId));\n}\n\nfunction finalizeDateTime(organized, resolveCalendar) {\n  return validateIsoDateTimeFields(organized), checkIsoDateTimeInBounds(organized), \n  {\n    ...combineDateAndTime(organized, organized),\n    calendar: resolveCalendar(organized.calendarId)\n  };\n}\n\nfunction finalizeDate(organized, resolveCalendar) {\n  return validateIsoDateFields(organized), checkIsoDateInBounds(organized), {\n    calendar: resolveCalendar(organized.calendarId),\n    year: organized.year,\n    month: organized.month,\n    day: organized.day\n  };\n}\n\nfunction timeRegExpStr(separatorIndex) {\n  return `(\\\\d{2})(?:(:?)(\\\\d{2})(?:\\\\${separatorIndex}(\\\\d{2})(?:[.,](\\\\d{1,9}))?)?)?`;\n}\n\nconst dateTimeRegExpStr = \"(?:(?:([+-])(\\\\d{6}))|(\\\\d{4}))(-?)(\\\\d{2})\\\\4(\\\\d{2})(?:[T ]\" + timeRegExpStr(8) + \"(Z|([+-])\" + timeRegExpStr(15) + \")?)?\";\n\nconst yearMonthRegExp = /*@__PURE__*/ createRegExp(\"(?:(?:([+-])(\\\\d{6}))|(\\\\d{4}))-?(\\\\d{2})((?:\\\\[(!?)([^\\\\]]*)\\\\]){0,9})\");\n\nconst monthDayRegExp = /*@__PURE__*/ createRegExp(\"(?:--)?(\\\\d{2})-?(\\\\d{2})((?:\\\\[(!?)([^\\\\]]*)\\\\]){0,9})\");\n\nconst dateTimeRegExp = /*@__PURE__*/ createRegExp(dateTimeRegExpStr + \"((?:\\\\[(!?)([^\\\\]]*)\\\\]){0,9})\");\n\nconst timeRegExp = /*@__PURE__*/ createRegExp(\"T?\" + timeRegExpStr(2) + `(([+-])${timeRegExpStr(9)})?((?:\\\\[(!?)([^\\\\]]*)\\\\]){0,9})`);\n\nconst annotationRegExp = /*@__PURE__*/ new RegExp(\"\\\\[(!?)([^\\\\]]*)\\\\]\", \"g\");\n\nconst durationRegExp = /*@__PURE__*/ createRegExp(\"([+-])?P(\\\\d+Y)?(\\\\d+M)?(\\\\d+W)?(\\\\d+D)?(?:T(?!$)(?:(\\\\d+)(?:[.,](\\\\d{1,9}))?H)?(?:(\\\\d+)(?:[.,](\\\\d{1,9}))?M)?(?:(\\\\d+)(?:[.,](\\\\d{1,9}))?S)?)?\");\n\nfunction parseDateTimeLike(s) {\n  const parts = dateTimeRegExp.exec(s);\n  return parts ? (parts => {\n    const zOrOffset = parts[12];\n    const hasZ = \"Z\" === (zOrOffset || \"\").toUpperCase();\n    return {\n      year: organizeIsoYearParts(parts),\n      month: parseInt(parts[5]),\n      day: parseInt(parts[6]),\n      ...organizeTimeParts(parts, 7),\n      ...organizeAnnotationParts(parts[19]),\n      te: Boolean(parts[7]),\n      F: hasZ,\n      offset: hasZ ? void 0 : zOrOffset\n    };\n  })(parts) : void 0;\n}\n\nfunction parseYearMonthOnly(s) {\n  const parts = yearMonthRegExp.exec(s);\n  if (parts) {\n    return (parts => ({\n      year: organizeIsoYearParts(parts),\n      month: parseInt(parts[4]),\n      day: 1,\n      ...organizeAnnotationParts(parts[5])\n    }))(parts);\n  }\n}\n\nfunction parseMonthDayOnly(s) {\n  const parts = monthDayRegExp.exec(s);\n  return parts ? (parts => ({\n    year: 1972,\n    month: parseInt(parts[1]),\n    day: parseInt(parts[2]),\n    ...organizeAnnotationParts(parts[3])\n  }))(parts) : void 0;\n}\n\nfunction parseTimeOnlyParts(s) {\n  const parts = timeRegExp.exec(s);\n  if (parts) {\n    return parts[6] && parseOffsetNano(parts[6]), parts;\n  }\n}\n\nfunction organizeTimeParts(parts, hourIndex) {\n  const second = parseInt0(parts[hourIndex + 3]);\n  return {\n    ...nanoToTimeAndDay(parseSubsecNano(parts[hourIndex + 4] || \"\"))[0],\n    hour: parseInt0(parts[hourIndex]),\n    minute: parseInt0(parts[hourIndex + 2]),\n    second: 60 === second ? 59 : second\n  };\n}\n\nfunction organizeIsoYearParts(parts) {\n  const yearSign = parseSign(parts[1]);\n  const year = parseInt(parts[2] || parts[3]);\n  return yearSign < 0 && !year && throwRangeError(invalidSubstring(-0)), yearSign * year;\n}\n\nfunction organizeAnnotationParts(s) {\n  let calendarIsCritical;\n  let timeZoneId;\n  const calendarIds = [];\n  return s.replace(annotationRegExp, (whole, criticalStr, mainStr) => {\n    const isCritical = Boolean(criticalStr);\n    const [val, name] = mainStr.split(\"=\").reverse();\n    return name ? \"u-ca\" === name ? (calendarIds.push(val.toLowerCase()), calendarIsCritical || (calendarIsCritical = isCritical)) : (isCritical || /[A-Z]/.test(name)) && throwRangeError(invalidSubstring(whole)) : (timeZoneId && throwRangeError(invalidSubstring(whole)), \n    timeZoneId = val), \"\";\n  }), calendarIds.length > 1 && calendarIsCritical && throwRangeError(invalidSubstring(s)), \n  {\n    timeZoneId: timeZoneId,\n    calendarId: calendarIds[0] || \"iso8601\"\n  };\n}\n\nfunction mergeCalendarFields(calendar, baseFields, additionalFields) {\n  const merged = Object.assign(Object.create(null), baseFields);\n  return spliceFields(merged, additionalFields, monthFieldNames), getCalendarEraOrigins(calendar) && (spliceFields(merged, additionalFields, allYearFieldNames), \n  calendar && calendar.je && spliceFields(merged, additionalFields, monthDayFieldNames, eraYearFieldNames)), \n  merged;\n}\n\nfunction spliceFields(dest, additional, allPropNames, deletablePropNames) {\n  let anyMatching = 0;\n  const nonMatchingPropNames = [];\n  for (const propName of allPropNames) {\n    void 0 !== additional[propName] ? anyMatching = 1 : nonMatchingPropNames.push(propName);\n  }\n  if (Object.assign(dest, additional), anyMatching) {\n    for (const deletablePropName of deletablePropNames || nonMatchingPropNames) {\n      delete dest[deletablePropName];\n    }\n  }\n}\n\nfunction mergeZonedDateTimeFields(calendar, zonedDateTimeSlots, modFields) {\n  const validFieldNames = getCalendarFieldNames(calendar, dateTimeAndOffsetFieldNamesAlpha, dateTimeAndOffsetFieldNamesWithEraAlpha);\n  const zonedSlots = zonedEpochSlotsToIso(zonedDateTimeSlots);\n  const {year: year, month: month, day: day} = computeCalendarDateFields(calendar, zonedSlots);\n  const origFields = {\n    year: year,\n    monthCode: computeMonthCode(calendar, year, month),\n    day: day,\n    hour: zonedSlots.hour,\n    minute: zonedSlots.minute,\n    second: zonedSlots.second,\n    millisecond: zonedSlots.millisecond,\n    microsecond: zonedSlots.microsecond,\n    nanosecond: zonedSlots.nanosecond,\n    offset: zonedSlots.offsetNanoseconds\n  };\n  const partialFields = readAndRefineBagFields(modFields, validFieldNames, zonedDateTimeFieldRefiners);\n  const mergedCalendarFields = mergeCalendarFields(calendar, origFields, partialFields);\n  return [ {\n    ...origFields,\n    ...partialFields\n  }, mergedCalendarFields ];\n}\n\nfunction mergeDateTimeFields(calendar, plainDateTimeSlots, modFields) {\n  const validFieldNames = getCalendarFieldNames(calendar, dateTimeFieldNamesAlpha, dateTimeFieldNamesWithEraAlpha);\n  const {year: year, month: month, day: day} = computeCalendarDateFields(calendar, plainDateTimeSlots);\n  const origFields = {\n    year: year,\n    monthCode: computeMonthCode(calendar, year, month),\n    day: day,\n    hour: plainDateTimeSlots.hour,\n    minute: plainDateTimeSlots.minute,\n    second: plainDateTimeSlots.second,\n    millisecond: plainDateTimeSlots.millisecond,\n    microsecond: plainDateTimeSlots.microsecond,\n    nanosecond: plainDateTimeSlots.nanosecond\n  };\n  const partialFields = readAndRefineBagFields(modFields, validFieldNames, dateTimeFieldRefiners);\n  const mergedCalendarFields = mergeCalendarFields(calendar, origFields, partialFields);\n  return [ {\n    ...origFields,\n    ...partialFields\n  }, mergedCalendarFields ];\n}\n\nfunction mergeDateFields(calendar, plainDateSlots, modFields) {\n  const validFieldNames = getCalendarFieldNames(calendar, dateFieldNamesAlpha, dateFieldNamesWithEraAlpha);\n  const {year: year, month: month, day: day} = computeCalendarDateFields(calendar, plainDateSlots);\n  return mergeCalendarFields(calendar, {\n    year: year,\n    monthCode: computeMonthCode(calendar, year, month),\n    day: day\n  }, readAndRefineBagFields(modFields, validFieldNames, dateFieldRefiners));\n}\n\nfunction mergeYearMonthFields(calendar, plainYearMonthSlots, modFields) {\n  const validFieldNames = getCalendarFieldNames(calendar, yearMonthFieldNamesAlpha, yearMonthFieldNamesWithEraAlpha);\n  const {year: year, month: month} = computeCalendarDateFields(calendar, plainYearMonthSlots);\n  return mergeCalendarFields(calendar, {\n    year: year,\n    monthCode: computeMonthCode(calendar, year, month)\n  }, readAndRefineBagFields(modFields, validFieldNames, dateFieldRefiners));\n}\n\nfunction mergeMonthDayFields(calendar, plainMonthDaySlots, modFields) {\n  const validFieldNames = getCalendarFieldNames(calendar, dateFieldNamesAlpha, dateFieldNamesWithEraAlpha);\n  const {year: year, month: month, day: day} = computeCalendarDateFields(calendar, plainMonthDaySlots);\n  return mergeCalendarFields(calendar, {\n    monthCode: computeMonthCode(calendar, year, month),\n    day: day\n  }, readAndRefineBagFields(modFields, validFieldNames, dateFieldRefiners));\n}\n\nfunction createZonedDateTimeFromMergedFields(zonedDateTimeSlots, mergedAllFields, calendarFields, year, monthCodeParts, overflow, offsetDisambig, epochDisambig) {\n  const {calendar: calendar, timeZone: timeZone} = zonedDateTimeSlots;\n  return createZonedEpochNanoSlots(getMatchingInstantFor(timeZone, combineDateAndTime(createDateFromRefinedFields(calendarFields, calendar, year, monthCodeParts, overflow), constrainTimeFields(mergedAllFields, overflow)), mergedAllFields.offset, offsetDisambig, epochDisambig), timeZone, calendar);\n}\n\nfunction createDateTimeFromMergedFields(mergedAllFields, calendarFields, calendar, year, monthCodeParts, overflow) {\n  return createDateTimeFromRefinedFields(createDateFromRefinedFields(calendarFields, calendar, year, monthCodeParts, overflow), constrainTimeFields(mergedAllFields, overflow), calendar);\n}\n\nfunction mergeTimeFields(initialFields, modFields) {\n  return {\n    ...pluckProps(timeFieldNamesAlpha, initialFields),\n    ...readAndRefineBagFields(modFields, timeFieldNamesAlpha, timeFieldRefiners)\n  };\n}\n\nfunction mergeDurationFields(slots, fields) {\n  return createDurationSlots((initialFields = slots, modFields = fields, validateDurationFields({\n    ...initialFields,\n    ...readAndRefineBagFields(modFields, durationFieldNamesAlpha, durationFieldRefiners)\n  })));\n  var initialFields, modFields;\n}\n\nfunction computeMonthCode(calendar, year, month) {\n  const [monthCodeNumber, isLeapMonth] = computeCalendarMonthCodeParts(calendar, year, month);\n  return formatMonthCode(monthCodeNumber, isLeapMonth);\n}\n\nfunction totalDuration(refineRelativeTo, slots, options) {\n  const [totalUnit, relativeToSlots] = ((options, refineRelativeTo) => {\n    const relativeToInternals = refineRelativeTo((options = normalizeOptionsOrString(options, \"unit\")).relativeTo);\n    let totalUnit = coerceTotalUnit(options);\n    return totalUnit = requirePropDefined(\"unit\", totalUnit), [ totalUnit, relativeToInternals ];\n  })(options, refineRelativeTo);\n  const maxDurationUnit = getMaxDurationUnit(slots);\n  const maxUnit = Math.max(totalUnit, maxDurationUnit);\n  const isZoned = relativeToSlots && isZonedEpochSlots(relativeToSlots);\n  if (!relativeToSlots && isUniformUnit(maxUnit, isZoned)) {\n    return totalDayTimeDuration(slots, totalUnit);\n  }\n  if (relativeToSlots || throwRangeError(\"Missing relativeTo\"), !slots.sign && (!isZoned || totalUnit < 6)) {\n    return 0;\n  }\n  const [balancedDuration, endEpochNano, relativeOps] = spanRelativeDuration(relativeToSlots, slots, totalUnit);\n  return isUniformUnit(totalUnit, isZoned) ? totalDayTimeDuration(balancedDuration, totalUnit) : ((durationFields, endEpochNano, totalUnit, relativeOps) => {\n    const fieldName = durationFieldNamesAsc[totalUnit];\n    const baseDurationFields = clearDurationFields(totalUnit, durationFields);\n    return totalRelativeUnit(durationFields[fieldName], computeDurationSign(durationFields) || 1, endEpochNano, value => (baseDurationFields[fieldName] = value, \n    moveRelativeMarkerToEpochNano(relativeOps, baseDurationFields)));\n  })(balancedDuration, endEpochNano, totalUnit, relativeOps);\n}\n\nfunction totalDayTimeDuration(durationFields, totalUnit) {\n  return divideBigNanoToExactNumber(durationDayTimeToBigNano(durationFields), unitNanoMap[totalUnit]);\n}\n\nfunction instantToZonedDateTime(instantSlots, timeZone, calendar) {\n  return createZonedEpochNanoSlots(instantSlots.epochNanoseconds, timeZone, calendar);\n}\n\nfunction zonedDateTimeToInstant(zonedDateTimeSlots0) {\n  return createEpochNanoSlots(zonedDateTimeSlots0.epochNanoseconds);\n}\n\nfunction zonedDateTimeToDateTime(zonedDateTimeSlots0) {\n  return createDateTimeSlots(zonedEpochSlotsToIso(zonedDateTimeSlots0), zonedDateTimeSlots0.calendar);\n}\n\nfunction zonedDateTimeToDate(zonedDateTimeSlots0) {\n  return createDateSlots(zonedEpochSlotsToIso(zonedDateTimeSlots0), zonedDateTimeSlots0.calendar);\n}\n\nfunction zonedDateTimeToTime(zonedDateTimeSlots0) {\n  return createTimeSlots(zonedEpochSlotsToIso(zonedDateTimeSlots0));\n}\n\nfunction dateTimeToZonedDateTime(plainDateTimeSlots, timeZone, epochDisambig) {\n  return createZonedEpochNanoSlots(checkEpochNanoInBounds(getSingleInstantFor(timeZone, plainDateTimeSlots, epochDisambig)), timeZone, plainDateTimeSlots.calendar);\n}\n\nfunction dateToZonedDateTime(plainDateSlots, timeZone, timeFields) {\n  let epochNano;\n  return epochNano = timeFields ? getSingleInstantFor(timeZone, combineDateAndTime(plainDateSlots, timeFields)) : getStartOfDayInstantFor(timeZone, combineDateAndTime(plainDateSlots, timeFieldDefaults)), \n  createZonedEpochNanoSlots(epochNano, timeZone, plainDateSlots.calendar);\n}\n\nfunction yearMonthToDate(calendar, input, bag) {\n  return mergeFieldsIntoDate(calendar, pluckProps(getCalendarFieldNames(calendar, yearMonthCodeFieldNamesAlpha, yearMonthCodeFieldNamesWithEraAlpha), input), readAndRefineBagFields(requireObjectLike(bag), dayFieldNamesAsc, dateFieldRefiners, []));\n}\n\nfunction monthDayToDate(calendar, input, bag) {\n  const extraFieldNames = getCalendarFieldNames(calendar, yearFieldNamesAsc, yearFieldNamesWithEraAlpha);\n  return mergeFieldsIntoDate(calendar, pluckProps(monthCodeDayFieldNamesAlpha, input), readAndRefineBagFields(requireObjectLike(bag), extraFieldNames, dateFieldRefiners, []));\n}\n\nfunction fieldsToMonthDay(calendar, input) {\n  const refinedFields = readAndRefineBagFields(input, monthCodeDayFieldNamesAlpha, dateFieldRefiners);\n  const [year, monthCodeParts] = refineMonthDayFields(refinedFields, calendar);\n  return createMonthDayFromRefinedFields(refinedFields, calendar, year, monthCodeParts, 0);\n}\n\nfunction fieldsToYearMonth(calendar, input) {\n  const refinedFields = readAndRefineBagFields(input, getCalendarFieldNames(calendar, yearMonthCodeFieldNamesAlpha, yearMonthCodeFieldNamesWithEraAlpha), dateFieldRefiners);\n  const [year, monthCodeParts] = refineCalendarDateFields(refinedFields, calendar, 1);\n  return createYearMonthFromRefinedFields(refinedFields, calendar, year, monthCodeParts, 0);\n}\n\nfunction mergeFieldsIntoDate(calendar, inputFields, extraFields) {\n  const mergedFieldNames = getCalendarFieldNames(calendar, yearMonthCodeDayFieldNamesAlpha, yearMonthCodeDayFieldNamesWithEraAlpha);\n  let mergedFields = mergeCalendarFields(calendar, inputFields, extraFields);\n  mergedFields = readAndRefineBagFields(mergedFields, mergedFieldNames, dateFieldRefiners, []);\n  const [year, monthCodeParts] = refineCalendarDateFields(mergedFields, calendar);\n  return createDateFromRefinedFields(mergedFields, calendar, year, monthCodeParts, 0);\n}\n\nfunction epochMilliToInstant(epochMilli) {\n  return createEpochNanoSlots(checkEpochNanoInBounds(BigInt(toStrictInteger(epochMilli)) * bigNanoInMilli));\n}\n\nfunction epochNanoToInstant(epochNano) {\n  return createEpochNanoSlots(checkEpochNanoInBounds(toBigInt(epochNano)));\n}\n\nfunction applyPlainFormatTimeZone(options) {\n  return options.timeZone = \"UTC\", [ \"full\", \"long\" ].includes(options.timeStyle) && (options.timeStyle = \"medium\"), \n  options;\n}\n\nfunction applyZonedFormatTimeZone(options, timeZoneId) {\n  return void 0 !== options.timeZone && throwTypeError(\"Cannot specify TimeZone\"), \n  options.timeZone = timeZoneId, options;\n}\n\nfunction checkResolvedCalendarCompatible(format, slots, strictCalendarCheck) {\n  const resolvedCalendarId = format.resolvedOptions().calendar;\n  !strictCalendarCheck && slots.calendar === isoCalendarImpl || getCalendarSlotId(slots.calendar) === resolvedCalendarId || throwRangeError(\"Mismatching Calendars\");\n}\n\nfunction createOptionsTransformer(shapeFieldNames, invalidShapeFieldNames, ignoredFieldNames, defaultShapeFields, dateStyleReplacementFields) {\n  const shapeFieldNameSet = new Set(shapeFieldNames);\n  const invalidShapeFieldNameSet = new Set(invalidShapeFieldNames);\n  const ignoredFieldNameSet = new Set(ignoredFieldNames);\n  return (options, allowPartialOverlap) => {\n    let dateStyle;\n    let timeStyle;\n    const granularShapeFields = {};\n    const modifierFields = {};\n    const otherFields = {};\n    let hasInvalidGranularShapeFields = 0;\n    let hasInvalidStyleFields = 0;\n    for (const name of Object.keys(options)) {\n      const value = options[name];\n      void 0 === value || ignoredFieldNameSet.has(name) || (shapeFieldNameSet.has(name) ? \"dateStyle\" === name ? dateStyle = value : \"timeStyle\" === name ? timeStyle = value : granularShapeFields[name] = value : \"era\" === name ? modifierFields[name] = value : invalidShapeFieldNameSet.has(name) ? \"dateStyle\" === name || \"timeStyle\" === name ? hasInvalidStyleFields = 1 : hasInvalidGranularShapeFields = 1 : otherFields[name] = value);\n    }\n    const hasDateStyle = void 0 !== dateStyle;\n    const hasTimeStyle = void 0 !== timeStyle;\n    const hasAnyStyle = hasDateStyle || hasTimeStyle;\n    const hasGranularShapeFields = Object.keys(granularShapeFields).length > 0;\n    const hasInvalids = hasInvalidGranularShapeFields || hasInvalidStyleFields;\n    const hasShapeFields = hasGranularShapeFields || hasDateStyle || hasTimeStyle;\n    const hasModifierFields = Object.keys(modifierFields).length > 0;\n    (!allowPartialOverlap && hasInvalids || allowPartialOverlap && hasInvalids && !hasShapeFields || hasAnyStyle && (hasGranularShapeFields || hasModifierFields || hasInvalidGranularShapeFields)) && throwTypeError(\"Invalid formatting options\");\n    const transformedOptions = {};\n    return hasAnyStyle || hasShapeFields || Object.assign(transformedOptions, defaultShapeFields), \n    Object.assign(transformedOptions, granularShapeFields, modifierFields, otherFields), \n    hasDateStyle && (dateStyleReplacementFields ? Object.assign(transformedOptions, dateStyleReplacementFields[dateStyle]) : transformedOptions.dateStyle = dateStyle), \n    hasTimeStyle && (transformedOptions.timeStyle = timeStyle), transformedOptions;\n  };\n}\n\nconst dateDefaultShapeFields = {\n  year: \"numeric\",\n  month: \"numeric\",\n  day: \"numeric\"\n};\n\nconst timeDefaultShapeFields = {\n  hour: \"numeric\",\n  minute: \"numeric\",\n  second: \"numeric\"\n};\n\nconst dateTimeDefaultShapeFields = /*@__PURE__*/ Object.assign({}, dateDefaultShapeFields, timeDefaultShapeFields);\n\nconst dateShapeFieldNames = [ \"weekday\", \"year\", \"month\", \"day\", \"dateStyle\" ];\n\nconst timeShapeFieldNames = [ \"dayPeriod\", \"hour\", \"minute\", \"second\", \"fractionalSecondDigits\", \"timeStyle\" ];\n\nconst dateTimeShapeFieldNames = /*@__PURE__*/ dateShapeFieldNames.concat(timeShapeFieldNames);\n\nconst yearMonthIgnoredFieldNames = /*@__PURE__*/ [ \"weekday\", \"day\" ].concat(timeShapeFieldNames);\n\nconst monthDayIgnoredFieldNames = /*@__PURE__*/ [ \"weekday\", \"year\" ].concat(timeShapeFieldNames);\n\nconst transformInstantOptions = /*@__PURE__*/ createOptionsTransformer(dateTimeShapeFieldNames, [], [], dateTimeDefaultShapeFields);\n\nconst transformZonedOptions = /*@__PURE__*/ createOptionsTransformer(dateTimeShapeFieldNames, [], [], {\n  ...dateTimeDefaultShapeFields,\n  timeZoneName: \"short\"\n});\n\nconst transformDateTimeOptions = /*@__PURE__*/ createOptionsTransformer(dateTimeShapeFieldNames, [], [ \"timeZoneName\" ], dateTimeDefaultShapeFields);\n\nconst transformDateOptions = /*@__PURE__*/ createOptionsTransformer(dateShapeFieldNames, timeShapeFieldNames, [ \"timeZoneName\" ], dateDefaultShapeFields);\n\nconst transformTimeOptions = /*@__PURE__*/ createOptionsTransformer(timeShapeFieldNames, dateShapeFieldNames, [ \"timeZoneName\", \"era\" ], timeDefaultShapeFields);\n\nconst transformYearMonthOptions = /*@__PURE__*/ createOptionsTransformer([ \"year\", \"month\", \"dateStyle\" ], yearMonthIgnoredFieldNames, [ \"timeZoneName\" ], {\n  year: \"numeric\",\n  month: \"numeric\"\n}, {\n  full: {\n    year: \"numeric\",\n    month: \"long\"\n  },\n  long: {\n    year: \"numeric\",\n    month: \"long\"\n  },\n  medium: {\n    year: \"numeric\",\n    month: \"short\"\n  },\n  short: {\n    year: \"2-digit\",\n    month: \"numeric\"\n  }\n});\n\nconst transformMonthDayOptions = /*@__PURE__*/ createOptionsTransformer([ \"month\", \"day\", \"dateStyle\" ], monthDayIgnoredFieldNames, [ \"timeZoneName\", \"era\" ], {\n  month: \"numeric\",\n  day: \"numeric\"\n}, {\n  full: {\n    month: \"long\",\n    day: \"numeric\"\n  },\n  long: {\n    month: \"long\",\n    day: \"numeric\"\n  },\n  medium: {\n    month: \"short\",\n    day: \"numeric\"\n  },\n  short: {\n    month: \"numeric\",\n    day: \"numeric\"\n  }\n});\n\nfunction zonedDateTimeWithPlainTime(zonedDateTimeSlots, plainTimeFields) {\n  const {timeZone: timeZone} = zonedDateTimeSlots;\n  const isoDateTime = zonedEpochSlotsToIso(zonedDateTimeSlots);\n  const {offsetNanoseconds: offsetNanoseconds} = isoDateTime;\n  const time = plainTimeFields || timeFieldDefaults;\n  let epochNano;\n  return epochNano = plainTimeFields ? getMatchingInstantFor(timeZone, combineDateAndTime(isoDateTime, time), offsetNanoseconds, 2) : getStartOfDayInstantFor(timeZone, combineDateAndTime(isoDateTime, time)), \n  createZonedEpochNanoSlots(epochNano, timeZone, zonedDateTimeSlots.calendar);\n}\n\nfunction refineDirectionOptions(options) {\n  const normalizedOptions = normalizeOptionsOrString(options, \"direction\");\n  const res = coerceDirection(normalizedOptions, 0);\n  return res || throwRangeError(invalidEntity(\"direction\", res)), res;\n}\n\nfunction getCurrentIsoDateTime(timeZone) {\n  const epochNano = getCurrentEpochNano();\n  const offsetNano = timeZone.B(epochNano);\n  return epochNanoToIsoDateTime(epochNano + BigInt(offsetNano));\n}\n\nfunction getCurrentEpochNano() {\n  return BigInt(Date.now()) * bigNanoInMilli;\n}\n\nfunction getCurrentTimeZoneId() {\n  return (new RawDateTimeFormat).resolvedOptions().timeZone;\n}\n\nfunction createDateTimeFormatShell(createArgsProvider, transformOptions = identity) {\n  const internalsMap = new WeakMap;\n  function getInternals(format) {\n    const internals = internalsMap.get(format);\n    return internals || throwTypeError(\"Invalid calling context\"), internals;\n  }\n  class ShimDateTimeFormat {\n    constructor(locales, options = Object.create(null)) {\n      const transformedOptions = transformOptions(options);\n      const observedOptionNames = [];\n      const trackedOptions = new Proxy(Object.create(null), {\n        get(_target, name) {\n          const value = transformedOptions[name];\n          return void 0 !== value && observedOptionNames.push(name), value;\n        }\n      });\n      const baseFormat = new RawDateTimeFormat(locales, trackedOptions);\n      const resolvedOptions = baseFormat.resolvedOptions();\n      const copiedOptions = pluckProps(observedOptionNames, resolvedOptions);\n      internalsMap.set(this, {\n        $: createArgsProvider({\n          t: baseFormat,\n          Ce: resolvedOptions.locale,\n          G: copiedOptions,\n          Ee: transformedOptions\n        }),\n        t: baseFormat\n      });\n    }\n    get format() {\n      const internals = getInternals(this);\n      return internals.we || (internals.we = record => {\n        const [format, ...rest] = internals.$.A(record);\n        return format.format(...rest);\n      });\n    }\n    formatToParts(record) {\n      const {$: argsProvider} = getInternals(this);\n      const [format, ...rest] = argsProvider.A(record);\n      return format.formatToParts(...rest);\n    }\n    resolvedOptions() {\n      return getInternals(this).t.resolvedOptions();\n    }\n  }\n  const {prototype: prototype} = ShimDateTimeFormat;\n  function DateTimeFormat(locales, options) {\n    return new ShimDateTimeFormat(locales, options);\n  }\n  RawDateTimeFormat.prototype.formatRange && Object.defineProperties(prototype, createPropDescriptors({\n    formatRange(record0, record1) {\n      const {$: argsProvider} = getInternals(this);\n      const [format, epochMilli0, epochMilli1] = argsProvider.v(record0, record1);\n      return format.formatRange(epochMilli0, epochMilli1);\n    },\n    formatRangeToParts(record0, record1) {\n      const {$: argsProvider} = getInternals(this);\n      const [format, epochMilli0, epochMilli1] = argsProvider.v(record0, record1);\n      return format.formatRangeToParts(epochMilli0, epochMilli1);\n    }\n  }));\n  const rawStaticDescriptors = Object.getOwnPropertyDescriptors(RawDateTimeFormat);\n  return rawStaticDescriptors.prototype.value = prototype, Object.defineProperties(DateTimeFormat, rawStaticDescriptors), \n  prototype.constructor = DateTimeFormat, Object.defineProperties(prototype, createStringTagDescriptors(\"Intl.DateTimeFormat\")), \n  DateTimeFormat;\n}\n\nfunction countEpochNanoUnit(start, end, unit, [roundingInc, roundingMode]) {\n  let diffNano = end - start;\n  return void 0 !== roundingMode && (diffNano = roundBigNanoToInc(diffNano, computeBigNanoInc(unit, roundingInc), roundingMode)), \n  divideBigNanoToExactNumber(diffNano, unitNanoMap[unit]);\n}\n\nfunction countDateTimeUnit(start, end, unit, rounding) {\n  return countEpochNanoUnit(isoDateTimeToEpochNano(start), isoDateTimeToEpochNano(end), unit, rounding);\n}\n\nfunction countTimeUnit(start, end, unit, [roundingInc, roundingMode]) {\n  let diffNano = timeFieldsToNano(end) - timeFieldsToNano(start);\n  return void 0 !== roundingMode && (diffNano = roundNumberToInc(diffNano, computeNanoInc(unit, roundingInc), roundingMode)), \n  divideBigNanoToExactNumber(BigInt(diffNano), unitNanoMap[unit]);\n}\n\nfunction countEpochNanoDays(startEpochNano, endEpochNano, originTimeNano, [roundingInc, roundingMode]) {\n  let diffNano = endEpochNano - startEpochNano;\n  if (void 0 !== roundingMode) {\n    diffNano = roundBigNanoToInc(diffNano, computeBigNanoInc(6, roundingInc), roundingMode);\n  } else if (diffNano) {\n    const originTimeBigNano = BigInt(originTimeNano);\n    checkIsoDateTimeEpochNanoInBounds(startEpochNano - originTimeBigNano), checkIsoDateTimeEpochNanoInBounds(endEpochNano - originTimeBigNano);\n  }\n  return divideBigNanoToExactNumber(diffNano, unitNanoMap[6]);\n}\n\nfunction countYearMonthUnit(calendar, isoDate0, isoDate1, unit, rounding) {\n  const start = moveToStartOfMonth(calendar, isoDate0);\n  const end = moveToStartOfMonth(calendar, isoDate1);\n  return compareIsoDates(start, end) ? (checkIsoDateInBounds(start), checkIsoDateInBounds(end), \n  countRelativeUnit(unit, {\n    he: () => diffCalendarDates(calendar, start, end, unit),\n    me: createDateRelativeOps(calendar, start),\n    ie: isoDateToEpochNano(end)\n  }, rounding, 0, 8 === unit)) : 0;\n}\n\nfunction countRelativeUnit(unit, relativeUnitDiff, [roundingInc, roundingMode], isZoned, isPrecisionUnit) {\n  const {he: diffExact, me: relativeOps} = relativeUnitDiff;\n  const durationFields = diffExact();\n  let {ie: endEpochNano} = relativeUnitDiff;\n  return computeDurationSign(durationFields) ? void 0 !== roundingMode ? isPrecisionUnit && 1 === roundingInc ? durationFields[durationFieldNamesAsc[unit]] : resolveDurationUnit(unit, durationFields, endEpochNano, relativeOps, roundingInc, roundingMode) : (isZoned ? endEpochNano = checkEpochNanoInBounds(moveRelativeMarkerToEpochNano(relativeOps, {\n    ...durationFields,\n    ...durationTimeFieldDefaults\n  }) + durationTimeToBigNano(durationFields)) : (checkIsoDateTimeEpochNanoInBounds(relativeOps.ne), \n  checkIsoDateTimeEpochNanoInBounds(endEpochNano)), resolveDurationUnit(unit, durationFields, endEpochNano, relativeOps, 1, void 0)) : 0;\n}\n\nfunction countDateWeeks(originIsoDate, endEpochNano, [roundingInc, roundingMode]) {\n  const originEpochNano = isoDateToEpochNano(originIsoDate);\n  const diffNano = endEpochNano - originEpochNano;\n  if (!diffNano) {\n    return 0;\n  }\n  void 0 === roundingMode && (checkIsoDateTimeEpochNanoInBounds(originEpochNano), \n  checkIsoDateTimeEpochNanoInBounds(endEpochNano));\n  const wholeWeeks = Number(diffNano / (7n * bigNanoInUtcDay));\n  const sign = diffNano < 0n ? -1 : 1;\n  const moveWeeksToEpochNano = weeks => {\n    return weeks ? (((epochNano = originEpochNano + BigInt(weeks) * bigNanoInUtcDay * 7n) < plainDateEpochNanoMin || epochNano > epochNanoMax) && throwRangeError(outOfBoundsDate), \n    epochNano) : originEpochNano;\n    var epochNano;\n  };\n  return void 0 === roundingMode ? totalRelativeUnit(wholeWeeks, sign, endEpochNano, moveWeeksToEpochNano) : roundRelativeUnit(wholeWeeks, sign, endEpochNano, moveWeeksToEpochNano, roundingInc, roundingMode);\n}\n\nfunction countZonedDayWeekUnit(unit, timeZone, startZoned, endZoned, [roundingInc, roundingMode]) {\n  const daysInUnit = 7 === unit ? 7 : 1;\n  const startEpochNano = startZoned.epochNanoseconds;\n  const sign = endZoned.epochNanoseconds > startEpochNano ? 1 : -1;\n  const originIsoDateTime = zonedEpochSlotsToIso(startZoned);\n  let deltaDays = 0;\n  let remainderNano;\n  if (compareIsoDates(originIsoDateTime, zonedEpochSlotsToIso(endZoned))) {\n    const [startIsoDateTime, endIsoDate, timeNano] = prepareZonedEpochDiff(timeZone, startZoned, endZoned, sign);\n    deltaDays = isoDateToEpochDays(endIsoDate) - isoDateToEpochDays(startIsoDateTime), \n    remainderNano = timeNano;\n  } else {\n    remainderNano = Number(endZoned.epochNanoseconds - startEpochNano);\n  }\n  const moveByDays = days => days ? getSingleInstantFor(timeZone, combineDateAndTime(checkIsoDateInBounds(moveDateByDays(originIsoDateTime, days)), originIsoDateTime)) : startEpochNano;\n  const endEpochNano = void 0 === roundingMode ? checkEpochNanoInBounds(moveByDays(deltaDays) + BigInt(remainderNano)) : endZoned.epochNanoseconds;\n  const wholeValue = Math.trunc(deltaDays / daysInUnit);\n  const moveValueToEpochNano = value => moveByDays(value * daysInUnit);\n  return void 0 === roundingMode ? totalRelativeUnit(wholeValue, sign, endEpochNano, moveValueToEpochNano) : roundRelativeUnit(wholeValue, sign, endEpochNano, moveValueToEpochNano, roundingInc, roundingMode);\n}\n\nfunction resolveDurationUnit(unit, durationFields, endEpochNano, relativeOps, unitWindowInc, roundingMode) {\n  const sign = computeDurationSign(durationFields);\n  const fieldName = durationFieldNamesAsc[unit];\n  const moveValueToEpochNano = value => moveRelativeMarkerToEpochNano(relativeOps, {\n    ...durationFieldDefaults,\n    [fieldName]: value\n  });\n  return void 0 === roundingMode ? totalRelativeUnit(durationFields[fieldName], sign, endEpochNano, moveValueToEpochNano) : roundRelativeUnit(durationFields[fieldName], sign, endEpochNano, moveValueToEpochNano, unitWindowInc, roundingMode);\n}\n\nfunction moveToRefinedDayOfYear(calendar, isoDate, dayOfYear, overflow) {\n  return moveDateByDays(isoDate, clampEntity(\"dayOfMonth\", dayOfYear, 1, computeCalendarDaysInYear(calendar, isoDate), overflow) - computeCalendarDayOfYear(calendar, isoDate));\n}\n\nfunction moveToRefinedDayOfMonth(calendar, isoDate, day, overflow) {\n  return moveDateByDays(isoDate, clampEntity(\"day\", day, 1, computeCalendarDaysInMonth(calendar, isoDate), overflow) - computeCalendarDateFields(calendar, isoDate).day);\n}\n\nfunction moveToRefinedDayOfWeek(isoDate, dayOfWeek, overflow) {\n  return moveDateByDays(isoDate, clampEntity(\"dayOfWeek\", dayOfWeek, 1, 7, overflow) - computeIsoDayOfWeek(isoDate));\n}\n\nfunction moveToRefinedWeekOfYear(calendar, isoDate, weekOfYear, overflow) {\n  calendar !== isoCalendarImpl && throwRangeError(unsupportedWeekNumbers);\n  const {weekOfYear: currentWeekOfYear, De: weeksInYear} = computeIsoWeekFields(isoDate);\n  return moveDateByDays(isoDate, 7 * (clampEntity(\"weekOfYear\", weekOfYear, 1, weeksInYear, overflow) - currentWeekOfYear));\n}\n\nfunction computeDayFloor(slots) {\n  return combineDateAndTime(slots, timeFieldDefaults);\n}\n\nfunction computeYearFloor(calendar, slots) {\n  const {year: year0} = computeCalendarDateFields(calendar, slots);\n  return computeCalendarDateTimeFromParts(calendar, year0);\n}\n\nfunction computeMonthFloor(calendar, slots) {\n  const {year: year0, month: month0} = computeCalendarDateFields(calendar, slots);\n  return computeCalendarDateTimeFromParts(calendar, year0, month0);\n}\n\nfunction computeIsoWeekFloor(_calendar, slots) {\n  return combineDateAndTime(moveDateByDays(slots, 1 - computeIsoDayOfWeek(slots)), timeFieldDefaults);\n}\n\nfunction computeYearCeil(calendar, slots) {\n  return computeYearInterval(calendar, slots)[1];\n}\n\nfunction computeMonthCeil(calendar, slots) {\n  return computeMonthInterval(calendar, slots)[1];\n}\n\nfunction computeIsoWeekCeil(calendar, slots) {\n  return combineDateAndTime(moveDateByDays(computeIsoWeekFloor(0, slots), 7), timeFieldDefaults);\n}\n\nfunction computeDayCeil(_calendar, slots) {\n  return combineDateAndTime(moveDateByDays(slots, 1), timeFieldDefaults);\n}\n\nfunction computeYearInterval(calendar, slots) {\n  return [ computeYearFloor(calendar, slots), computeCalendarDateTimeFromParts(calendar, computeCalendarDateFields(calendar, slots).year + 1) ];\n}\n\nfunction computeMonthInterval(calendar, slots) {\n  const isoDateTime0 = computeMonthFloor(calendar, slots);\n  const {year: year, month: month} = computeCalendarDateFields(calendar, slots);\n  const {year: year1, month: month1} = addCalendarMonths(calendar, year, month, 1);\n  return [ isoDateTime0, computeCalendarDateTimeFromParts(calendar, year1, month1) ];\n}\n\nfunction computeIsoWeekInterval(calendar, slots) {\n  const isoDateTime0 = computeIsoWeekFloor(0, slots);\n  return [ isoDateTime0, combineDateAndTime(moveDateByDays(isoDateTime0, 7), timeFieldDefaults) ];\n}\n\nfunction roundDateToInterval(computeInterval, calendar, slots, roundingMode) {\n  return roundEpochNanoToInterval(computeInterval, calendar, slots, isoDateToEpochNano(slots), roundingMode);\n}\n\nfunction computeCalendarDateTimeFromParts(calendar, year, month = 1) {\n  return combineDateAndTime(computeCalendarIsoFieldsFromParts(calendar, year, month, 1), timeFieldDefaults);\n}\n\nfunction roundDateTimeToInterval(computeInterval, calendar, slots, roundingMode) {\n  return roundEpochNanoToInterval(computeInterval, calendar, slots, isoDateTimeToEpochNano(slots), roundingMode);\n}\n\nfunction roundEpochNanoToInterval(computeInterval, calendar, slots, epochNano, roundingMode) {\n  const [isoDateTime0, isoDateTime1] = computeInterval(calendar, slots);\n  return roundWithMode(computeEpochNanoFrac(epochNano, isoDateTimeToEpochNano(isoDateTime0), isoDateTimeToEpochNano(isoDateTime1)), roundingMode) ? isoDateTime1 : isoDateTime0;\n}\n\nexport { RawDateTimeFormat, absDuration, addDurationsWithoutRelativeTo, addIsoMonths, alignZonedEpoch, applyPlainFormatTimeZone, applyZonedFormatTimeZone, bigNanoInHour, bigNanoInMicro, bigNanoInMilli, bigNanoInMinute, bigNanoInSec, bindArgs, checkEpochNanoInBounds, checkIsoDateInBounds, checkIsoDateTimeInBounds, checkIsoYearMonthInBounds, checkResolvedCalendarCompatible, combineDateAndTime, compareDurations, compareIsoDateFields, compareIsoDateTimeFields, compareNumbers, compareTimeFields, compareZonedEpochSlots, computeBigNanoInc, computeCalendarDateFields, computeCalendarDayOfYear, computeCalendarDaysInMonth, computeCalendarDaysInYear, computeCalendarEraFields, computeCalendarInLeapYear, computeCalendarMonthCode, computeCalendarMonthsInYear, computeCalendarWeekOfYear, computeCalendarYearOfWeek, computeDayCeil, computeDayFloor, computeGregoryEraFields, computeIsoDayOfWeek, computeIsoDaysInMonth, computeIsoDaysInYear, computeIsoFieldsFromParts, computeIsoInLeapYear, computeIsoMonthCodeParts, computeIsoWeekCeil, computeIsoWeekFloor, computeIsoWeekInterval, computeIsoYearMonthFieldsForMonthDay, computeMonthCeil, computeMonthFloor, computeMonthInterval, computeNanoInc, computeYearCeil, computeYearFloor, computeYearInterval, computeZonedHoursInDay, computeZonedStartOfDay, constrainToRange, countDateTimeUnit, countDateWeeks, countEpochNanoDays, countEpochNanoUnit, countRelativeUnit, countTimeUnit, countYearMonthUnit, countZonedDayWeekUnit, createDateFromRefinedFields, createDateRelativeOps, createDateSlots, createDateTimeFormatShell, createDateTimeFromMergedFields, createDateTimeFromRefinedFields, createDateTimeSlots, createDurationSlots, createEpochNanoSlots, createMonthDayFromCalendarParts, createMonthDayFromRefinedFields, createNameDescriptors, createPropDescriptors, createPropGetters, createStringTagDescriptors, createTimeSlots, createYearMonthFromCalendarParts, createYearMonthFromRefinedFields, createZonedDateTimeFromMergedFields, createZonedEpochNanoSlots, createZonedRelativeOps, dateTimeToZonedDateTime, dateToZonedDateTime, diffCalendarDates, diffDateTimesExact, diffDateTimesRounded, diffDatesRounded, diffEpochMilliDays, diffEpochNanosRounded, diffIsoMonthSlots, diffTimesRounded, diffYearMonthsRounded, diffZonedDateTimesRounded, diffZonedEpochsExact, durationGetters, epochDaysToIsoDate, epochMilliToInstant, epochMilliToIsoDateTime, epochNanoToInstant, epochNanoToIsoDateTime, epochNanoToMilli, eraYearToYear, exoticCalendarRequired, fieldsToMonthDay, fieldsToYearMonth, forbiddenValueOf, formatDateIsoAuto, formatDateTimeIsoAuto, formatDurationIso, formatDurationIsoAuto, formatEpochMilliToPartsRecord, formatInstantIso, formatInstantIsoAuto, formatMonthDayIsoAuto, formatOffsetNano, formatPlainDateIso, formatPlainDateTimeIso, formatPlainMonthDayIso, formatPlainTimeIso, formatPlainYearMonthIso, formatTimeIsoAuto, formatYearMonthIsoAuto, formatZonedDateTimeIso, formatZonedDateTimeIsoAuto, getCalendarSlotId, getCommonCalendar, getCommonTimeZone, getCurrentEpochNano, getCurrentIsoDateTime, getCurrentTimeZoneId, getMatchingInstantFor, getSingleInstantFor, getZonedTimeZoneId, gregoryCalendarId, gregoryCalendarImpl, gregoryEraOrigins, instantToZonedDateTime, instantsEqual, invalidBag, invalidCalendar, invalidCallingContext, invalidFormatType, invalidRelativeTo, invalidTimeZone, isObjectLike, isoCalendarId, isoCalendarImpl, isoDateTimeToEpochMilli, isoDateTimeToEpochNano, isoDateToEpochDays, isoDateToEpochMilli, isoDateToEpochNano, isoEpochFirstLeapYear, isoEpochOriginYear, isoMonthsInYear, isoPartsToEpochDays, mapProps, maxMilli, memoize, mergeDateFields, mergeDateTimeFields, mergeDurationFields, mergeMonthDayFields, mergeTimeFields, mergeYearMonthFields, mergeZonedDateTimeFields, milliInUtcDay, mismatchingFormatTypes, modFloor, monthCodeNumberToMonth, monthDayToDate, monthToMonthCodeNumber, moveDate, moveDateByCalendarUnits, moveDateByDays, moveDateTime, moveDateTimeByNano, moveEpochNano, moveEpochNanoByNano, moveTime, moveTimeByNano, moveToRefinedDayOfMonth, moveToRefinedDayOfWeek, moveToRefinedDayOfYear, moveToRefinedWeekOfYear, moveYearMonth, moveYearMonthByUnits, moveZonedEpochSlots, nanoInHour, nanoInMicro, nanoInMilli, nanoInMinute, nanoInSec, negateDuration, negateDurationFields, noop, normalizeUnitRoundOptions, outOfBoundsDate, parseCalendarId, parseDuration, parseInstant, parsePlainDate, parsePlainDateTime, parsePlainMonthDay, parsePlainTime, parsePlainYearMonth, parseRelativeToSlots, parseTimeZoneId, parseZonedDateTime, plainDateTimesEqual, plainDatesEqual, plainMonthDaysEqual, plainTimesEqual, plainYearMonthsEqual, queryTimeZone, refineCalendarDateFields, refineDiffOptions, refineDirectionOptions, refineDurationObjectLike, refineEpochDisambigOptions, refineMaybeZonedDateTimeObjectLike, refineMonthDayFields, refineOverflowOptions, refinePlainDateObjectLike, refinePlainDateTimeObjectLike, refinePlainMonthDayObjectLike, refinePlainTimeObjectLike, refinePlainYearMonthObjectLike, refineRoundingOptions, refineTimeZoneId, refineUnitDiffOptions, refineUnitRoundOptions, refineZonedDateTimeObjectLike, refineZonedFieldOptions, requireNumberIsInteger, requireString, resolveTimeFields, resolveTimeZoneId, roundBigNanoToDayOriginInc, roundDateTimeToInc, roundDateTimeToInterval, roundDateToInterval, roundDuration, roundTimeToInc, roundZonedEpochSlotsToUnit, roundZonedEpochToDay, roundZonedEpochToInterval, roundZonedEpochToTime, throwRangeError, throwTypeError, timeFieldDefaults, timeFieldsToMilli, timeFieldsToNano, timeGetters, toBigInt, toStrictInteger, totalDuration, transformDateOptions, transformDateTimeOptions, transformInstantOptions, transformMonthDayOptions, transformTimeOptions, transformYearMonthOptions, transformZonedOptions, utcTimeZoneId, validateDurationCalendarUnit, validateDurationFields, validateIsoDateFields, validateIsoDateTimeFields, validateTimeFields, yearMonthToDate, zonedDateTimeToDate, zonedDateTimeToDateTime, zonedDateTimeToInstant, zonedDateTimeToTime, zonedDateTimeWithPlainTime, zonedDateTimesEqual, zonedEpochSlotsToIso };\n","import { createNameDescriptors, createStringTagDescriptors, mapProps, noop, throwTypeError, invalidCallingContext, forbiddenValueOf as forbiddenValueOf$1, computeCalendarEraFields, computeCalendarDateFields, computeCalendarMonthCode, computeCalendarDaysInMonth, computeCalendarDaysInYear, computeCalendarMonthsInYear, computeCalendarInLeapYear, computeIsoDayOfWeek, computeCalendarDayOfYear, computeCalendarWeekOfYear, computeCalendarYearOfWeek, refineDiffOptions, diffEpochNanosRounded, getCommonCalendar, diffZonedDateTimesRounded, diffDateTimesRounded, diffDatesRounded, diffYearMonthsRounded, diffTimesRounded, createDurationSlots, negateDurationFields, mergeDateFields, refineCalendarDateFields, refineOverflowOptions, createDateFromRefinedFields, mergeDateTimeFields, createDateTimeFromMergedFields, mergeYearMonthFields, createYearMonthFromRefinedFields, mergeMonthDayFields, refineMonthDayFields, createMonthDayFromRefinedFields, mergeTimeFields, resolveTimeFields, mergeZonedDateTimeFields, refineZonedFieldOptions, createZonedDateTimeFromMergedFields, createPropGetters, durationGetters as durationGetters$1, timeGetters as timeGetters$1, bindArgs, refineUnitDiffOptions, getCommonTimeZone, countRelativeUnit, diffZonedEpochsExact, createZonedRelativeOps, countZonedDayWeekUnit, createDateRelativeOps, diffDateTimesExact, countDateWeeks, countEpochNanoDays, timeFieldsToNano, isoDateTimeToEpochNano, isoDateToEpochNano, diffCalendarDates, countYearMonthUnit, countDateTimeUnit, countTimeUnit, countEpochNanoUnit, moveDateByCalendarUnits, toStrictInteger, moveToRefinedDayOfYear, moveToRefinedDayOfMonth, moveToRefinedDayOfWeek, moveToRefinedWeekOfYear } from \"./internal.js\";\n\nimport { toIntegerWithTrunc } from \"temporal-utils/protected\";\n\nimport \"temporal-utils/protected-error-messages\";\n\nconst PlainYearMonthBranding = \"PlainYearMonth\";\n\nconst PlainMonthDayBranding = \"PlainMonthDay\";\n\nconst PlainDateBranding = \"PlainDate\";\n\nconst PlainDateTimeBranding = \"PlainDateTime\";\n\nconst PlainTimeBranding = \"PlainTime\";\n\nconst ZonedDateTimeBranding = \"ZonedDateTime\";\n\nconst InstantBranding = \"Instant\";\n\nconst DurationBranding = \"Duration\";\n\nconst CalendarBranding = \"Calendar\";\n\nfunction defineTemporalClass(branding, cls, getSlots, ...getterMaps) {\n  return Object.defineProperties(cls, createNameDescriptors(branding)), Object.defineProperties(cls.prototype, createStringTagDescriptors(\"Temporal.\" + branding)), \n  Object.defineProperties(cls.prototype, mapProps(getter => ({\n    get() {\n      return getter(getSlots(this));\n    },\n    configurable: 1\n  }), Object.assign({}, ...getterMaps))), cls;\n}\n\nconst attachDebugString = \"noop\" === noop.name ? instance => {\n  Object.defineProperty(instance, \"_str_\", {\n    value: instance.toJSON()\n  });\n} : noop;\n\nfunction invalidRecordType() {\n  throwTypeError(invalidCallingContext);\n}\n\nfunction forbiddenValueOf() {\n  throwTypeError(forbiddenValueOf$1);\n}\n\nconst yearMonthFieldGetters$1 = {\n  era(slots) {\n    return computeCalendarEraFields(slots.calendar, slots).era;\n  },\n  eraYear(slots) {\n    return computeCalendarEraFields(slots.calendar, slots).eraYear;\n  },\n  year(slots) {\n    return computeCalendarDateFields(slots.calendar, slots).year;\n  },\n  month(slots) {\n    return computeCalendarDateFields(slots.calendar, slots).month;\n  },\n  monthCode(slots) {\n    return computeCalendarMonthCode(slots.calendar, slots);\n  }\n};\n\nconst dateFieldGetters$1 = {\n  era(slots) {\n    return computeCalendarEraFields(slots.calendar, slots).era;\n  },\n  eraYear(slots) {\n    return computeCalendarEraFields(slots.calendar, slots).eraYear;\n  },\n  year(slots) {\n    return computeCalendarDateFields(slots.calendar, slots).year;\n  },\n  month(slots) {\n    return computeCalendarDateFields(slots.calendar, slots).month;\n  },\n  monthCode(slots) {\n    return computeCalendarMonthCode(slots.calendar, slots);\n  },\n  day(slots) {\n    return computeCalendarDateFields(slots.calendar, slots).day;\n  }\n};\n\nconst monthDayFieldGetters$1 = {\n  monthCode(slots) {\n    return computeCalendarMonthCode(slots.calendar, slots);\n  },\n  day(slots) {\n    return computeCalendarDateFields(slots.calendar, slots).day;\n  }\n};\n\nconst yearMonthDerivedGetters = {\n  daysInMonth(slots) {\n    return computeCalendarDaysInMonth(slots.calendar, slots);\n  },\n  daysInYear(slots) {\n    return computeCalendarDaysInYear(slots.calendar, slots);\n  },\n  monthsInYear(slots) {\n    return computeCalendarMonthsInYear(slots.calendar, slots);\n  },\n  inLeapYear(slots) {\n    return computeCalendarInLeapYear(slots.calendar, slots);\n  }\n};\n\nconst dateDerivedGetters = {\n  dayOfWeek(slots) {\n    return computeIsoDayOfWeek(slots);\n  },\n  dayOfYear(slots) {\n    return computeCalendarDayOfYear(slots.calendar, slots);\n  },\n  weekOfYear(slots) {\n    return computeCalendarWeekOfYear(slots.calendar, slots);\n  },\n  yearOfWeek(slots) {\n    return computeCalendarYearOfWeek(slots.calendar, slots);\n  },\n  daysInWeek() {\n    return 7;\n  },\n  daysInMonth(slots) {\n    return computeCalendarDaysInMonth(slots.calendar, slots);\n  },\n  daysInYear(slots) {\n    return computeCalendarDaysInYear(slots.calendar, slots);\n  },\n  monthsInYear(slots) {\n    return computeCalendarMonthsInYear(slots.calendar, slots);\n  },\n  inLeapYear(slots) {\n    return computeCalendarInLeapYear(slots.calendar, slots);\n  }\n};\n\nfunction diffInstants(invert, instantSlots0, instantSlots1, options) {\n  const [largestUnit, smallestUnit, roundingInc, roundingMode] = refineDiffOptions(invert, options, 3, 5);\n  return createDiffDurationSlots(invert, diffEpochNanosRounded(instantSlots0.epochNanoseconds, instantSlots1.epochNanoseconds, largestUnit, smallestUnit, roundingInc, roundingMode));\n}\n\nfunction diffZonedDateTimes(invert, slots0, slots1, options) {\n  const calendar = getCommonCalendar(slots0.calendar, slots1.calendar);\n  const [largestUnit, smallestUnit, roundingInc, roundingMode] = refineDiffOptions(invert, options, 5);\n  return createDiffDurationSlots(invert, diffZonedDateTimesRounded(calendar, slots0, slots1, largestUnit, smallestUnit, roundingInc, roundingMode));\n}\n\nfunction diffDateTimes(invert, plainDateTimeSlots0, plainDateTimeSlots1, options) {\n  const calendar = getCommonCalendar(plainDateTimeSlots0.calendar, plainDateTimeSlots1.calendar);\n  const [largestUnit, smallestUnit, roundingInc, roundingMode] = refineDiffOptions(invert, options, 6);\n  return createDiffDurationSlots(invert, diffDateTimesRounded(calendar, plainDateTimeSlots0, plainDateTimeSlots1, largestUnit, smallestUnit, roundingInc, roundingMode));\n}\n\nfunction diffDates(invert, plainDateSlots0, plainDateSlots1, options) {\n  const calendar = getCommonCalendar(plainDateSlots0.calendar, plainDateSlots1.calendar);\n  const [largestUnit, smallestUnit, roundingInc, roundingMode] = refineDiffOptions(invert, options, 6, 9, 6);\n  return createDiffDurationSlots(invert, diffDatesRounded(calendar, plainDateSlots0, plainDateSlots1, largestUnit, smallestUnit, roundingInc, roundingMode));\n}\n\nfunction diffYearMonths(invert, plainYearMonthSlots0, plainYearMonthSlots1, options) {\n  const calendar = getCommonCalendar(plainYearMonthSlots0.calendar, plainYearMonthSlots1.calendar);\n  const [largestUnit, smallestUnit, roundingInc, roundingMode] = refineDiffOptions(invert, options, 9, 9, 8);\n  return createDiffDurationSlots(invert, diffYearMonthsRounded(calendar, plainYearMonthSlots0, plainYearMonthSlots1, largestUnit, smallestUnit, roundingInc, roundingMode));\n}\n\nfunction diffTimes(invert, plainTimeSlots0, plainTimeSlots1, options) {\n  const [largestUnit, smallestUnit, roundingInc, roundingMode] = refineDiffOptions(invert, options, 5, 5);\n  return createDiffDurationSlots(invert, diffTimesRounded(plainTimeSlots0, plainTimeSlots1, largestUnit, smallestUnit, roundingInc, roundingMode));\n}\n\nfunction createDiffDurationSlots(invert, durationFields) {\n  return createDurationSlots(invert ? negateDurationFields(durationFields) : durationFields);\n}\n\nfunction withDateFields(slots, modFields, options) {\n  const {calendar: calendar} = slots;\n  const fields = mergeDateFields(calendar, slots, modFields);\n  const [year, monthCodeParts] = refineCalendarDateFields(fields, calendar);\n  const overflow = refineOverflowOptions(options);\n  return createDateFromRefinedFields(fields, calendar, year, monthCodeParts, overflow);\n}\n\nfunction withDateTimeFields(slots, modFields, options) {\n  const {calendar: calendar} = slots;\n  const [mergedFields, calendarFields] = mergeDateTimeFields(calendar, slots, modFields);\n  const [year, monthCodeParts] = refineCalendarDateFields(calendarFields, calendar);\n  const overflow = refineOverflowOptions(options);\n  return createDateTimeFromMergedFields(mergedFields, calendarFields, calendar, year, monthCodeParts, overflow);\n}\n\nfunction withYearMonthFields(slots, modFields, options) {\n  const {calendar: calendar} = slots;\n  const fields = mergeYearMonthFields(calendar, slots, modFields);\n  const [year, monthCodeParts] = refineCalendarDateFields(fields, calendar, 1);\n  const overflow = refineOverflowOptions(options);\n  return createYearMonthFromRefinedFields(fields, calendar, year, monthCodeParts, overflow);\n}\n\nfunction withMonthDayFields(slots, modFields, options) {\n  const {calendar: calendar} = slots;\n  const fields = mergeMonthDayFields(calendar, slots, modFields);\n  const [year, monthCodeParts] = refineMonthDayFields(fields, calendar);\n  const overflow = refineOverflowOptions(options);\n  return createMonthDayFromRefinedFields(fields, calendar, year, monthCodeParts, overflow);\n}\n\nfunction withTimeFields(slots, modFields, options) {\n  const refinedFields = mergeTimeFields(slots, modFields);\n  const overflow = refineOverflowOptions(options);\n  return resolveTimeFields(refinedFields, overflow);\n}\n\nfunction withZonedDateTimeFields(slots, modFields, options) {\n  const {calendar: calendar} = slots;\n  const [mergedFields, calendarFields] = mergeZonedDateTimeFields(calendar, slots, modFields);\n  const [year, monthCodeParts] = refineCalendarDateFields(calendarFields, calendar);\n  const [overflow, offsetDisambig, epochDisambig] = refineZonedFieldOptions(options, 2);\n  return createZonedDateTimeFromMergedFields(slots, mergedFields, calendarFields, year, monthCodeParts, overflow, offsetDisambig, epochDisambig);\n}\n\nfunction createNativeGetters(shimGetters) {\n  return createPropGetters(Object.keys(shimGetters));\n}\n\nconst durationGetters = /*@__PURE__*/ createNativeGetters(durationGetters$1);\n\nconst timeGetters = /*@__PURE__*/ createNativeGetters(timeGetters$1);\n\nconst yearMonthFieldGetters = /*@__PURE__*/ createNativeGetters(yearMonthFieldGetters$1);\n\nconst dateFieldGetters = /*@__PURE__*/ createNativeGetters(dateFieldGetters$1);\n\nconst monthDayFieldGetters = /*@__PURE__*/ createNativeGetters(monthDayFieldGetters$1);\n\nconst diffZonedYears = /*@__PURE__*/ bindArgs(diffZonedCalendarUnit, 9);\n\nconst diffZonedMonths = /*@__PURE__*/ bindArgs(diffZonedCalendarUnit, 8);\n\nconst diffZonedWeeks = /*@__PURE__*/ bindArgs(diffZonedDayWeekUnit, 7);\n\nconst diffZonedDays = /*@__PURE__*/ bindArgs(diffZonedDayWeekUnit, 6);\n\nconst diffInstantEpochNanoTimeUnit = diffInstantTimeUnit;\n\nconst diffDateYears = /*@__PURE__*/ bindArgs(diffDateCalendarUnit, 9);\n\nconst diffDateMonths = /*@__PURE__*/ bindArgs(diffDateCalendarUnit, 8);\n\nconst diffDateTimeYears = /*@__PURE__*/ bindArgs(diffDateTimeCalendarUnit, 9);\n\nconst diffDateTimeMonths = /*@__PURE__*/ bindArgs(diffDateTimeCalendarUnit, 8);\n\nconst diffYearMonthYears = /*@__PURE__*/ bindArgs(diffYearMonthUnit, 9);\n\nconst diffYearMonthMonths = /*@__PURE__*/ bindArgs(diffYearMonthUnit, 8);\n\nfunction diffZonedEpochNanoTimeUnit(unit, slots0, slots1, options) {\n  return getCommonCalendar(slots0.calendar, slots1.calendar), diffInstantTimeUnit(unit, slots0, slots1, options);\n}\n\nfunction diffDateTimeEpochNanoTimeUnit(unit, slots0, slots1, options) {\n  return getCommonCalendar(slots0.calendar, slots1.calendar), countDateTimeUnit(slots0, slots1, unit, refineUnitDiffOptions(unit, options));\n}\n\nfunction diffTimeNanoOfDayTimeUnit(unit, slots0, slots1, options) {\n  return countTimeUnit(slots0, slots1, unit, refineUnitDiffOptions(unit, options));\n}\n\nfunction adaptRecordTimeUnitDiff(diffSlots, getSlots) {\n  return (unit, record0, record1, options) => diffSlots(unit, getSlots(record0), getSlots(record1), options);\n}\n\nfunction diffInstantTimeUnit(unit, slots0, slots1, options) {\n  return countEpochNanoUnit(slots0.epochNanoseconds, slots1.epochNanoseconds, unit, refineUnitDiffOptions(unit, options));\n}\n\nfunction diffZonedCalendarUnit(unit, slots0, slots1, options) {\n  const calendar = getCommonCalendar(slots0.calendar, slots1.calendar);\n  const rounding = refineUnitDiffOptions(unit, options);\n  if (slots0.epochNanoseconds === slots1.epochNanoseconds) {\n    return 0;\n  }\n  const timeZone = getCommonTimeZone(slots0.timeZone, slots1.timeZone);\n  return countRelativeUnit(unit, {\n    he: () => diffZonedEpochsExact(timeZone, calendar, slots0, slots1, unit),\n    me: createZonedRelativeOps(calendar, timeZone, slots0),\n    ie: slots1.epochNanoseconds\n  }, rounding, 1);\n}\n\nfunction diffZonedDayWeekUnit(unit, slots0, slots1, options) {\n  getCommonCalendar(slots0.calendar, slots1.calendar);\n  const rounding = refineUnitDiffOptions(unit, options);\n  return slots0.epochNanoseconds === slots1.epochNanoseconds ? 0 : countZonedDayWeekUnit(unit, getCommonTimeZone(slots0.timeZone, slots1.timeZone), slots0, slots1, rounding);\n}\n\nfunction diffDateTimeCalendarUnit(unit, slots0, slots1, options) {\n  const calendar = getCommonCalendar(slots0.calendar, slots1.calendar);\n  return diffPlainRelativeUnit(unit, options, () => diffDateTimesExact(calendar, slots0, slots1, unit), createDateRelativeOps(calendar, slots0), computeEndEpochNanoFromMidnight(slots0, slots1));\n}\n\nfunction diffDateTimeWeeks(slots0, slots1, options) {\n  return getCommonCalendar(slots0.calendar, slots1.calendar), countDateWeeks(slots0, computeEndEpochNanoFromMidnight(slots0, slots1), refineUnitDiffOptions(7, options));\n}\n\nfunction diffDateTimeDays(slots0, slots1, options) {\n  return getCommonCalendar(slots0.calendar, slots1.calendar), countEpochNanoDays(isoDateTimeToEpochNano(slots0), isoDateTimeToEpochNano(slots1), timeFieldsToNano(slots0), refineUnitDiffOptions(6, options));\n}\n\nfunction computeEndEpochNanoFromMidnight(isoDateTime0, isoDateTime1) {\n  return isoDateTimeToEpochNano(isoDateTime1) - BigInt(timeFieldsToNano(isoDateTime0));\n}\n\nfunction diffDateCalendarUnit(unit, slots0, slots1, options) {\n  const calendar = getCommonCalendar(slots0.calendar, slots1.calendar);\n  return diffPlainRelativeUnit(unit, options, () => diffCalendarDates(calendar, slots0, slots1, unit), createDateRelativeOps(calendar, slots0), isoDateToEpochNano(slots1));\n}\n\nfunction diffDateWeeks(slots0, slots1, options) {\n  return getCommonCalendar(slots0.calendar, slots1.calendar), countDateWeeks(slots0, isoDateToEpochNano(slots1), refineUnitDiffOptions(7, options));\n}\n\nfunction diffDateDays(slots0, slots1, options) {\n  return getCommonCalendar(slots0.calendar, slots1.calendar), countEpochNanoDays(isoDateToEpochNano(slots0), isoDateToEpochNano(slots1), 0, refineUnitDiffOptions(6, options));\n}\n\nfunction diffYearMonthUnit(unit, slots0, slots1, options) {\n  const calendar = getCommonCalendar(slots0.calendar, slots1.calendar);\n  return countYearMonthUnit(calendar, slots0, slots1, unit, refineUnitDiffOptions(unit, options));\n}\n\nfunction diffPlainRelativeUnit(unit, options, diffExact, relativeOps, endEpochNano) {\n  return countRelativeUnit(unit, {\n    he: diffExact,\n    me: relativeOps,\n    ie: endEpochNano\n  }, refineUnitDiffOptions(unit, options));\n}\n\nfunction reversedMove(f) {\n  return (slots, units, options) => f(slots, -units, options);\n}\n\nfunction moveDateByYears(calendar, isoDate, years, options) {\n  const overflow = refineOverflowOptions(options);\n  return years ? moveDateByCalendarUnits(calendar, isoDate, toStrictInteger(years), 0, overflow) : isoDate;\n}\n\nfunction moveDateByMonths(calendar, isoDate, months, options) {\n  const overflow = refineOverflowOptions(options);\n  return months ? moveDateByCalendarUnits(calendar, isoDate, 0, toStrictInteger(months), overflow) : isoDate;\n}\n\nfunction moveToDayOfYear(calendar, isoDate, dayOfYear, options) {\n  const overflow = refineOverflowOptions(options);\n  return moveToRefinedDayOfYear(calendar, isoDate, toIntegerWithTrunc(dayOfYear), overflow);\n}\n\nfunction moveToDayOfMonth(calendar, isoDate, day, options) {\n  const overflow = refineOverflowOptions(options);\n  return moveToRefinedDayOfMonth(calendar, isoDate, toIntegerWithTrunc(day), overflow);\n}\n\nfunction moveToDayOfWeek(_calendar, isoDate, dayOfWeek, options) {\n  const overflow = refineOverflowOptions(options);\n  return moveToRefinedDayOfWeek(isoDate, toIntegerWithTrunc(dayOfWeek), overflow);\n}\n\nfunction moveToWeekOfYear(calendar, isoDate, weekOfYear, options) {\n  const overflow = refineOverflowOptions(options);\n  return moveToRefinedWeekOfYear(calendar, isoDate, toIntegerWithTrunc(weekOfYear), overflow);\n}\n\nexport { CalendarBranding, DurationBranding, InstantBranding, PlainDateBranding, PlainDateTimeBranding, PlainMonthDayBranding, PlainTimeBranding, PlainYearMonthBranding, ZonedDateTimeBranding, adaptRecordTimeUnitDiff, attachDebugString, dateDerivedGetters, dateFieldGetters$1 as dateFieldGetters, dateFieldGetters as dateFieldGetters$1, defineTemporalClass, diffDateDays, diffDateMonths, diffDateTimeDays, diffDateTimeEpochNanoTimeUnit, diffDateTimeMonths, diffDateTimeWeeks, diffDateTimeYears, diffDateTimes, diffDateWeeks, diffDateYears, diffDates, diffInstantEpochNanoTimeUnit, diffInstants, diffTimeNanoOfDayTimeUnit, diffTimes, diffYearMonthMonths, diffYearMonthYears, diffYearMonths, diffZonedDateTimes, diffZonedDays, diffZonedEpochNanoTimeUnit, diffZonedMonths, diffZonedWeeks, diffZonedYears, durationGetters, forbiddenValueOf, invalidRecordType, monthDayFieldGetters$1 as monthDayFieldGetters, monthDayFieldGetters as monthDayFieldGetters$1, moveDateByMonths, moveDateByYears, moveToDayOfMonth, moveToDayOfWeek, moveToDayOfYear, moveToWeekOfYear, reversedMove, timeGetters, withDateFields, withDateTimeFields, withMonthDayFields, withTimeFields, withYearMonthFields, withZonedDateTimeFields, yearMonthDerivedGetters, yearMonthFieldGetters$1 as yearMonthFieldGetters, yearMonthFieldGetters as yearMonthFieldGetters$1 };\n","import { PlainYearMonthBranding, PlainMonthDayBranding, PlainDateBranding, PlainDateTimeBranding, PlainTimeBranding, ZonedDateTimeBranding, InstantBranding, DurationBranding, CalendarBranding, invalidRecordType, defineTemporalClass, attachDebugString } from \"./apiHelpers.js\";\n\nimport { throwTypeError, invalidBag, throwRangeError, exoticCalendarRequired } from \"./internal.js\";\n\nconst PlainYearMonthRecordBranding = `${PlainYearMonthBranding}Record`;\n\nconst PlainMonthDayRecordBranding = `${PlainMonthDayBranding}Record`;\n\nconst PlainDateRecordBranding = `${PlainDateBranding}Record`;\n\nconst PlainDateTimeRecordBranding = `${PlainDateTimeBranding}Record`;\n\nconst PlainTimeRecordBranding = `${PlainTimeBranding}Record`;\n\nconst ZonedDateTimeRecordBranding = `${ZonedDateTimeBranding}Record`;\n\nconst InstantRecordBranding = `${InstantBranding}Record`;\n\nconst DurationRecordBranding = `${DurationBranding}Record`;\n\nconst CalendarRecordBranding = `${CalendarBranding}Record`;\n\nconst calendarMap = /*@__PURE__*/ new WeakMap;\n\nconst instantMap = /*@__PURE__*/ new WeakMap;\n\nconst zonedDateTimeMap = /*@__PURE__*/ new WeakMap;\n\nconst plainDateTimeMap = /*@__PURE__*/ new WeakMap;\n\nconst plainDateMap = /*@__PURE__*/ new WeakMap;\n\nconst plainTimeMap = /*@__PURE__*/ new WeakMap;\n\nconst plainYearMonthMap = /*@__PURE__*/ new WeakMap;\n\nconst plainMonthDayMap = /*@__PURE__*/ new WeakMap;\n\nconst durationMap = /*@__PURE__*/ new WeakMap;\n\nfunction getCalendarSlots(record) {\n  return getCalendarSlotsIfPresent(record) || invalidRecordType();\n}\n\nfunction getCalendarSlotsIfPresent(record) {\n  return calendarMap.get(record);\n}\n\nfunction isInstantRecord(record) {\n  return !!getInstantSlotsIfPresent(record);\n}\n\nfunction getInstantSlots(record) {\n  return getInstantSlotsIfPresent(record) || invalidRecordType();\n}\n\nfunction getInstantSlotsIfPresent(record) {\n  return instantMap.get(record);\n}\n\nfunction setInstantSlots(instance, slots) {\n  instantMap.set(instance, slots);\n}\n\nfunction isZonedDateTimeRecord(record) {\n  return !!getZonedDateTimeSlotsIfPresent(record);\n}\n\nfunction getZonedDateTimeSlots(record) {\n  return getZonedDateTimeSlotsIfPresent(record) || invalidRecordType();\n}\n\nfunction getZonedDateTimeSlotsIfPresent(record) {\n  return zonedDateTimeMap.get(record);\n}\n\nfunction setZonedDateTimeSlots(instance, slots) {\n  zonedDateTimeMap.set(instance, slots);\n}\n\nfunction isPlainDateTimeRecord(record) {\n  return !!getPlainDateTimeSlotsIfPresent(record);\n}\n\nfunction getPlainDateTimeSlots(record) {\n  return getPlainDateTimeSlotsIfPresent(record) || invalidRecordType();\n}\n\nfunction getPlainDateTimeSlotsIfPresent(record) {\n  return plainDateTimeMap.get(record);\n}\n\nfunction setPlainDateTimeSlots(instance, slots) {\n  plainDateTimeMap.set(instance, slots);\n}\n\nfunction isPlainDateRecord(record) {\n  return !!getPlainDateSlotsIfPresent(record);\n}\n\nfunction getPlainDateSlots(record) {\n  return getPlainDateSlotsIfPresent(record) || invalidRecordType();\n}\n\nfunction getPlainDateSlotsIfPresent(record) {\n  return plainDateMap.get(record);\n}\n\nfunction setPlainDateSlots(instance, slots) {\n  plainDateMap.set(instance, slots);\n}\n\nfunction isPlainTimeRecord(record) {\n  return !!getPlainTimeSlotsIfPresent(record);\n}\n\nfunction getPlainTimeSlots(record) {\n  return getPlainTimeSlotsIfPresent(record) || invalidRecordType();\n}\n\nfunction getPlainTimeSlotsIfPresent(record) {\n  return plainTimeMap.get(record);\n}\n\nfunction setPlainTimeSlots(instance, slots) {\n  plainTimeMap.set(instance, slots);\n}\n\nfunction isPlainYearMonthRecord(record) {\n  return !!getPlainYearMonthSlotsIfPresent(record);\n}\n\nfunction getPlainYearMonthSlots(record) {\n  return getPlainYearMonthSlotsIfPresent(record) || invalidRecordType();\n}\n\nfunction getPlainYearMonthSlotsIfPresent(record) {\n  return plainYearMonthMap.get(record);\n}\n\nfunction setPlainYearMonthSlots(instance, slots) {\n  plainYearMonthMap.set(instance, slots);\n}\n\nfunction isPlainMonthDayRecord(record) {\n  return !!getPlainMonthDaySlotsIfPresent(record);\n}\n\nfunction getPlainMonthDaySlots(record) {\n  return getPlainMonthDaySlotsIfPresent(record) || invalidRecordType();\n}\n\nfunction getPlainMonthDaySlotsIfPresent(record) {\n  return plainMonthDayMap.get(record);\n}\n\nfunction setPlainMonthDaySlots(instance, slots) {\n  plainMonthDayMap.set(instance, slots);\n}\n\nfunction isDurationRecord(record) {\n  return !!getDurationSlotsIfPresent(record);\n}\n\nfunction getDurationSlots(record) {\n  return getDurationSlotsIfPresent(record) || invalidRecordType();\n}\n\nfunction getDurationSlotsIfPresent(record) {\n  return durationMap.get(record);\n}\n\nfunction setDurationSlots(instance, slots) {\n  durationMap.set(instance, slots);\n}\n\nfunction validateBag(bag) {\n  return ((record => !!getCalendarSlotsIfPresent(record))(record = bag) || isInstantRecord(record) || isZonedDateTimeRecord(record) || isPlainDateTimeRecord(record) || isPlainDateRecord(record) || isPlainTimeRecord(record) || isPlainYearMonthRecord(record) || isPlainMonthDayRecord(record) || isDurationRecord(record) || void 0 !== bag.calendar || void 0 !== bag.timeZone) && throwTypeError(invalidBag), \n  bag;\n  var record;\n}\n\nconst CalendarRecord = /*@__PURE__*/ defineTemporalClass(CalendarRecordBranding, class {\n  toJSON() {\n    return getCalendarRecordId(this);\n  }\n  valueOf() {\n    return getCalendarRecordId(this);\n  }\n});\n\nfunction createCalendarRecord(id, getImpl) {\n  const instance = Object.create(CalendarRecord.prototype);\n  return ((instance, slots) => {\n    calendarMap.set(instance, slots);\n  })(instance, {\n    id: id,\n    xe: getImpl\n  }), attachDebugString(instance), instance;\n}\n\nfunction getCalendarRecordId(record) {\n  return getCalendarSlots(record).id;\n}\n\nfunction getCalendarRecordImplCreator(record) {\n  const getImpl = getCalendarSlots(record).xe;\n  return getImpl || throwRangeError(exoticCalendarRequired(getCalendarRecordId(record), \"getExotic or getAny\")), \n  getImpl;\n}\n\nexport { DurationRecordBranding, InstantRecordBranding, PlainDateRecordBranding, PlainDateTimeRecordBranding, PlainMonthDayRecordBranding, PlainTimeRecordBranding, PlainYearMonthRecordBranding, ZonedDateTimeRecordBranding, createCalendarRecord, getCalendarRecordId, getCalendarRecordImplCreator, getDurationSlots, getInstantSlots, getPlainDateSlots, getPlainDateSlotsIfPresent, getPlainDateTimeSlots, getPlainDateTimeSlotsIfPresent, getPlainMonthDaySlots, getPlainTimeSlots, getPlainTimeSlotsIfPresent, getPlainYearMonthSlots, getZonedDateTimeSlots, getZonedDateTimeSlotsIfPresent, isDurationRecord, isInstantRecord, isPlainDateRecord, isPlainDateTimeRecord, isPlainMonthDayRecord, isPlainTimeRecord, isPlainYearMonthRecord, isZonedDateTimeRecord, setDurationSlots, setInstantSlots, setPlainDateSlots, setPlainDateTimeSlots, setPlainMonthDaySlots, setPlainTimeSlots, setPlainYearMonthSlots, setZonedDateTimeSlots, validateBag };\n","import { NativeTemporal } from \"./root.js\";\n\nimport * as TemporalUtils from \"temporal-utils\";\n\nimport { defineTemporalClass, durationGetters, attachDebugString, timeGetters, dateFieldGetters$1 as dateFieldGetters, monthDayFieldGetters$1 as monthDayFieldGetters, yearMonthFieldGetters$1 as yearMonthFieldGetters } from \"./apiHelpers.js\";\n\nimport { RawDateTimeFormat, throwTypeError, invalidRelativeTo, normalizeUnitRoundOptions, bindArgs } from \"./internal.js\";\n\nimport { DurationRecordBranding, getDurationSlots, getZonedDateTimeSlotsIfPresent, getPlainDateTimeSlotsIfPresent, getPlainDateSlotsIfPresent, setDurationSlots, getCalendarRecordImplCreator, getCalendarRecordId, PlainTimeRecordBranding, getPlainTimeSlots, setPlainTimeSlots, PlainDateTimeRecordBranding, getPlainDateTimeSlots, setPlainDateTimeSlots, PlainMonthDayRecordBranding, getPlainMonthDaySlots, setPlainMonthDaySlots, PlainYearMonthRecordBranding, getPlainYearMonthSlots, setPlainYearMonthSlots, PlainDateRecordBranding, getPlainDateSlots, setPlainDateSlots, ZonedDateTimeRecordBranding, getZonedDateTimeSlots, setZonedDateTimeSlots, InstantRecordBranding, getInstantSlots, setInstantSlots } from \"./funcApi.js\";\n\nconst RawDateTimeFormatClass = RawDateTimeFormat;\n\nfunction createNativeDateTimeFormatFactory(getNative) {\n  class NativeDateTimeFormat extends RawDateTimeFormatClass {\n    format(record) {\n      return super.format(getNative(record));\n    }\n    formatToParts(record) {\n      return super.formatToParts(getNative(record));\n    }\n    formatRange(record0, record1) {\n      return super.formatRange(getNative(record0), getNative(record1));\n    }\n    formatRangeToParts(record0, record1) {\n      return super.formatRangeToParts(getNative(record0), getNative(record1));\n    }\n  }\n  return (locales, options) => new NativeDateTimeFormat(locales, options);\n}\n\nconst getNativeDuration = getDurationSlots;\n\nconst NativeDurationRecord = /*@__PURE__*/ defineTemporalClass(DurationRecordBranding, class {\n  toJSON() {\n    return getNativeDuration(this).toJSON();\n  }\n  valueOf() {\n    return getNativeDuration(this).valueOf();\n  }\n}, getNativeDuration, durationGetters);\n\nfunction createNativeDurationRecord(native) {\n  const instance = Object.create(NativeDurationRecord.prototype);\n  return setDurationSlots(instance, native), attachDebugString(instance), instance;\n}\n\nfunction create$7(years, months, weeks, days, hours, minutes, seconds, milliseconds, microseconds, nanoseconds) {\n  return createNativeDurationRecord(new NativeTemporal.Duration(years, months, weeks, days, hours, minutes, seconds, milliseconds, microseconds, nanoseconds));\n}\n\nfunction fromFields$6(fields) {\n  return createNativeDurationRecord(NativeTemporal.Duration.from(fields));\n}\n\nfunction fromString$7(s) {\n  return createNativeDurationRecord(NativeTemporal.Duration.from(s));\n}\n\nfunction sign(duration) {\n  return getNativeDuration(duration).sign;\n}\n\nfunction blank(duration) {\n  return getNativeDuration(duration).blank;\n}\n\nfunction withFields$6(duration, mod) {\n  return createNativeDurationRecord(getNativeDuration(duration).with(mod));\n}\n\nfunction negated(duration) {\n  return createNativeDurationRecord(getNativeDuration(duration).negated());\n}\n\nfunction abs(duration) {\n  return createNativeDurationRecord(getNativeDuration(duration).abs());\n}\n\nfunction add$6(duration, otherDuration) {\n  const native = getNativeDuration(duration);\n  const otherNative = getNativeDuration(otherDuration);\n  return createNativeDurationRecord(native.add(otherNative));\n}\n\nfunction subtract$6(duration, otherDuration) {\n  const native = getNativeDuration(duration);\n  const otherNative = getNativeDuration(otherDuration);\n  return createNativeDurationRecord(native.subtract(otherNative));\n}\n\nfunction round$4(duration, options) {\n  const native = getNativeDuration(duration);\n  return createNativeDurationRecord(\"string\" == typeof options ? native.round(options) : native.round({\n    ...options,\n    relativeTo: refineRelativeTo(options?.relativeTo)\n  }));\n}\n\nfunction total(duration, options) {\n  const native = getNativeDuration(duration);\n  if (\"string\" == typeof options) {\n    return native.total(options);\n  }\n  const refinedOptions = {\n    ...options,\n    relativeTo: refineRelativeTo(options.relativeTo)\n  };\n  return native.total(refinedOptions);\n}\n\nfunction compare$6(duration, otherDuration, options) {\n  const native = getNativeDuration(duration);\n  const otherNative = getNativeDuration(otherDuration);\n  return NativeTemporal.Duration.compare(native, otherNative, {\n    ...options,\n    relativeTo: refineRelativeTo(options?.relativeTo)\n  });\n}\n\nfunction toLocaleString$7(duration, locales, options) {\n  return Intl.DurationFormat ? new Intl.DurationFormat(locales, options).format(duration) : toString$7(duration);\n}\n\nfunction toString$7(duration, options) {\n  return getNativeDuration(duration).toString(options);\n}\n\nfunction toBasicString$7(duration) {\n  return getNativeDuration(duration).toString();\n}\n\nconst toTemporal$7 = getNativeDuration;\n\nfunction refineRelativeTo(arg) {\n  if (arg) {\n    const native = getZonedDateTimeSlotsIfPresent(arg) || getPlainDateTimeSlotsIfPresent(arg) || getPlainDateSlotsIfPresent(arg);\n    if (native) {\n      return native;\n    }\n    throwTypeError(invalidRelativeTo(arg));\n  }\n}\n\nfunction createRoundToOptions(smallestUnit, options) {\n  return {\n    ...normalizeUnitRoundOptions(options),\n    smallestUnit: smallestUnit\n  };\n}\n\nfunction refineNativeCalendarArgMaybe(calendarRecord) {\n  if (void 0 !== calendarRecord) {\n    return getValidatedCalendarId(calendarRecord);\n  }\n}\n\nfunction runNativeCalendarResolver(canonicalCalendarId, getCalendarRecord) {\n  getValidatedCalendarId(getCalendarRecord(canonicalCalendarId));\n}\n\nfunction getValidatedCalendarId(record) {\n  return getCalendarRecordImplCreator(record), getCalendarRecordId(record);\n}\n\nconst getNativePlainTime = getPlainTimeSlots;\n\nconst NativePlainTimeRecord = /*@__PURE__*/ defineTemporalClass(PlainTimeRecordBranding, class {\n  toJSON() {\n    return getNativePlainTime(this).toJSON();\n  }\n  valueOf() {\n    return getNativePlainTime(this).valueOf();\n  }\n}, getNativePlainTime, timeGetters);\n\nfunction createNativePlainTimeRecord(native) {\n  const instance = Object.create(NativePlainTimeRecord.prototype);\n  return setPlainTimeSlots(instance, native), attachDebugString(instance), instance;\n}\n\nfunction create$6(hour, minute, second, millisecond, microsecond, nanosecond) {\n  return createNativePlainTimeRecord(new NativeTemporal.PlainTime(hour, minute, second, millisecond, microsecond, nanosecond));\n}\n\nfunction fromFields$5(fields, options) {\n  return createNativePlainTimeRecord(NativeTemporal.PlainTime.from(fields, options));\n}\n\nfunction fromString$6(s) {\n  return createNativePlainTimeRecord(NativeTemporal.PlainTime.from(s));\n}\n\nfunction withFields$5(record, mod, options) {\n  return createNativePlainTimeRecord(getNativePlainTime(record).with(mod, options));\n}\n\nfunction add$5(record, duration) {\n  const native = getNativePlainTime(record);\n  const durationNative = getNativeDuration(duration);\n  return createNativePlainTimeRecord(native.add(durationNative));\n}\n\nfunction subtract$5(record, duration) {\n  const native = getNativePlainTime(record);\n  const durationNative = getNativeDuration(duration);\n  return createNativePlainTimeRecord(native.subtract(durationNative));\n}\n\nfunction diff$5(record, otherRecord, options) {\n  const native = getNativePlainTime(record);\n  const otherNative = getNativePlainTime(otherRecord);\n  return createNativeDurationRecord(native.until(otherNative, options));\n}\n\nfunction equals$6(record, otherRecord) {\n  const native = getNativePlainTime(record);\n  const otherNative = getNativePlainTime(otherRecord);\n  return native.equals(otherNative);\n}\n\nfunction compare$5(record, otherRecord) {\n  const native = getNativePlainTime(record);\n  const otherNative = getNativePlainTime(otherRecord);\n  return NativeTemporal.PlainTime.compare(native, otherNative);\n}\n\nconst createFormat$5 = /*@__PURE__*/ createNativeDateTimeFormatFactory(getNativePlainTime);\n\nfunction toLocaleString$6(record, locales, options) {\n  return getNativePlainTime(record).toLocaleString(locales, options);\n}\n\nfunction toString$6(record, options) {\n  return getNativePlainTime(record).toString(options);\n}\n\nfunction toBasicString$6(record) {\n  return getNativePlainTime(record).toString();\n}\n\nconst toTemporal$6 = getNativePlainTime;\n\nfunction addHours$3(record, hours) {\n  return createNativePlainTimeRecord(getNativePlainTime(record).add({\n    hours: hours\n  }));\n}\n\nfunction addMinutes$3(record, minutes) {\n  return createNativePlainTimeRecord(getNativePlainTime(record).add({\n    minutes: minutes\n  }));\n}\n\nfunction addSeconds$3(record, seconds) {\n  return createNativePlainTimeRecord(getNativePlainTime(record).add({\n    seconds: seconds\n  }));\n}\n\nfunction addMilliseconds$3(record, milliseconds) {\n  return createNativePlainTimeRecord(getNativePlainTime(record).add({\n    milliseconds: milliseconds\n  }));\n}\n\nfunction addMicroseconds$3(record, microseconds) {\n  return createNativePlainTimeRecord(getNativePlainTime(record).add({\n    microseconds: microseconds\n  }));\n}\n\nfunction addNanoseconds$3(record, nanoseconds) {\n  return createNativePlainTimeRecord(getNativePlainTime(record).add({\n    nanoseconds: nanoseconds\n  }));\n}\n\nfunction subtractHours$3(record, hours) {\n  return createNativePlainTimeRecord(getNativePlainTime(record).subtract({\n    hours: hours\n  }));\n}\n\nfunction subtractMinutes$3(record, minutes) {\n  return createNativePlainTimeRecord(getNativePlainTime(record).subtract({\n    minutes: minutes\n  }));\n}\n\nfunction subtractSeconds$3(record, seconds) {\n  return createNativePlainTimeRecord(getNativePlainTime(record).subtract({\n    seconds: seconds\n  }));\n}\n\nfunction subtractMilliseconds$3(record, milliseconds) {\n  return createNativePlainTimeRecord(getNativePlainTime(record).subtract({\n    milliseconds: milliseconds\n  }));\n}\n\nfunction subtractMicroseconds$3(record, microseconds) {\n  return createNativePlainTimeRecord(getNativePlainTime(record).subtract({\n    microseconds: microseconds\n  }));\n}\n\nfunction subtractNanoseconds$3(record, nanoseconds) {\n  return createNativePlainTimeRecord(getNativePlainTime(record).subtract({\n    nanoseconds: nanoseconds\n  }));\n}\n\nfunction roundToUnit$1(smallestUnit, record, options) {\n  return ((record, options) => createNativePlainTimeRecord(getNativePlainTime(record).round(options)))(record, createRoundToOptions(smallestUnit, options));\n}\n\nconst roundToHour$3 = /*@__PURE__*/ bindArgs(roundToUnit$1, \"hour\");\n\nconst roundToMinute$3 = /*@__PURE__*/ bindArgs(roundToUnit$1, \"minute\");\n\nconst roundToSecond$3 = /*@__PURE__*/ bindArgs(roundToUnit$1, \"second\");\n\nconst roundToMillisecond$3 = /*@__PURE__*/ bindArgs(roundToUnit$1, \"millisecond\");\n\nconst roundToMicrosecond$3 = /*@__PURE__*/ bindArgs(roundToUnit$1, \"microsecond\");\n\nfunction startOfHour$2(record) {\n  return createNativePlainTimeRecord(TemporalUtils.startOfHour(getNativePlainTime(record)));\n}\n\nfunction startOfMinute$2(record) {\n  return createNativePlainTimeRecord(TemporalUtils.startOfMinute(getNativePlainTime(record)));\n}\n\nfunction startOfSecond$2(record) {\n  return createNativePlainTimeRecord(TemporalUtils.startOfSecond(getNativePlainTime(record)));\n}\n\nfunction startOfMillisecond$2(record) {\n  return createNativePlainTimeRecord(TemporalUtils.startOfMillisecond(getNativePlainTime(record)));\n}\n\nfunction startOfMicrosecond$2(record) {\n  return createNativePlainTimeRecord(TemporalUtils.startOfMicrosecond(getNativePlainTime(record)));\n}\n\nfunction endOfHour$2(record) {\n  return createNativePlainTimeRecord(TemporalUtils.endOfHour(getNativePlainTime(record)));\n}\n\nfunction endOfMinute$2(record) {\n  return createNativePlainTimeRecord(TemporalUtils.endOfMinute(getNativePlainTime(record)));\n}\n\nfunction endOfSecond$2(record) {\n  return createNativePlainTimeRecord(TemporalUtils.endOfSecond(getNativePlainTime(record)));\n}\n\nfunction endOfMillisecond$2(record) {\n  return createNativePlainTimeRecord(TemporalUtils.endOfMillisecond(getNativePlainTime(record)));\n}\n\nfunction endOfMicrosecond$2(record) {\n  return createNativePlainTimeRecord(TemporalUtils.endOfMicrosecond(getNativePlainTime(record)));\n}\n\nfunction diffHours$3(record0, record1, options) {\n  return TemporalUtils.diffHours(getNativePlainTime(record0), getNativePlainTime(record1), options);\n}\n\nfunction diffMinutes$3(record0, record1, options) {\n  return TemporalUtils.diffMinutes(getNativePlainTime(record0), getNativePlainTime(record1), options);\n}\n\nfunction diffSeconds$3(record0, record1, options) {\n  return TemporalUtils.diffSeconds(getNativePlainTime(record0), getNativePlainTime(record1), options);\n}\n\nfunction diffMilliseconds$3(record0, record1, options) {\n  return TemporalUtils.diffMilliseconds(getNativePlainTime(record0), getNativePlainTime(record1), options);\n}\n\nfunction diffMicroseconds$3(record0, record1, options) {\n  return TemporalUtils.diffMicroseconds(getNativePlainTime(record0), getNativePlainTime(record1), options);\n}\n\nfunction diffNanoseconds$3(record0, record1, options) {\n  return TemporalUtils.diffNanoseconds(getNativePlainTime(record0), getNativePlainTime(record1), options);\n}\n\nconst getNativePlainDateTime = getPlainDateTimeSlots;\n\nconst NativePlainDateTimeRecord = /*@__PURE__*/ defineTemporalClass(PlainDateTimeRecordBranding, class {\n  get calendarId() {\n    return getNativePlainDateTime(this).calendarId;\n  }\n  toJSON() {\n    return getNativePlainDateTime(this).toJSON();\n  }\n  valueOf() {\n    return getNativePlainDateTime(this).valueOf();\n  }\n}, getNativePlainDateTime, dateFieldGetters, timeGetters);\n\nfunction createNativePlainDateTimeRecord(native) {\n  const instance = Object.create(NativePlainDateTimeRecord.prototype);\n  return setPlainDateTimeSlots(instance, native), attachDebugString(instance), instance;\n}\n\nfunction create$5(isoYear, isoMonth, isoDay, hour, minute, second, millisecond, microsecond, nanosecond, calendar) {\n  return createNativePlainDateTimeRecord(new NativeTemporal.PlainDateTime(isoYear, isoMonth, isoDay, hour, minute, second, millisecond, microsecond, nanosecond, refineNativeCalendarArgMaybe(calendar)));\n}\n\nfunction fromFields$4(fields, options) {\n  const calendar = refineNativeCalendarArgMaybe(fields.calendar);\n  return createNativePlainDateTimeRecord(NativeTemporal.PlainDateTime.from({\n    ...fields,\n    calendar: calendar\n  }, options));\n}\n\nfunction fromString$5(s, getCalendarRecord) {\n  const resNative = NativeTemporal.PlainDateTime.from(s);\n  return runNativeCalendarResolver(resNative.calendarId, getCalendarRecord), createNativePlainDateTimeRecord(resNative);\n}\n\nfunction withCalendar$2(record, calendarRecord) {\n  const native = getNativePlainDateTime(record);\n  const calendarId = getValidatedCalendarId(calendarRecord);\n  return createNativePlainDateTimeRecord(native.withCalendar(calendarId));\n}\n\nfunction withFields$4(record, mod, options) {\n  return createNativePlainDateTimeRecord(getNativePlainDateTime(record).with(mod, options));\n}\n\nfunction withPlainTime$1(record, plainTimeRecord) {\n  const native = getNativePlainDateTime(record);\n  const plainTimeNative = void 0 === plainTimeRecord ? void 0 : getNativePlainTime(plainTimeRecord);\n  return createNativePlainDateTimeRecord(native.withPlainTime(plainTimeNative));\n}\n\nfunction dayOfWeek$2(record) {\n  return getNativePlainDateTime(record).dayOfWeek;\n}\n\nfunction daysInWeek$2(record) {\n  return getNativePlainDateTime(record).daysInWeek;\n}\n\nfunction weekOfYear$2(record) {\n  return getNativePlainDateTime(record).weekOfYear;\n}\n\nfunction yearOfWeek$2(record) {\n  return getNativePlainDateTime(record).yearOfWeek;\n}\n\nfunction dayOfYear$2(record) {\n  return getNativePlainDateTime(record).dayOfYear;\n}\n\nfunction daysInMonth$3(record) {\n  return getNativePlainDateTime(record).daysInMonth;\n}\n\nfunction daysInYear$3(record) {\n  return getNativePlainDateTime(record).daysInYear;\n}\n\nfunction monthsInYear$3(record) {\n  return getNativePlainDateTime(record).monthsInYear;\n}\n\nfunction inLeapYear$3(record) {\n  return getNativePlainDateTime(record).inLeapYear;\n}\n\nfunction add$4(record, duration, options) {\n  const native = getNativePlainDateTime(record);\n  const durationNative = getNativeDuration(duration);\n  return createNativePlainDateTimeRecord(native.add(durationNative, options));\n}\n\nfunction subtract$4(record, duration, options) {\n  const native = getNativePlainDateTime(record);\n  const durationNative = getNativeDuration(duration);\n  return createNativePlainDateTimeRecord(native.subtract(durationNative, options));\n}\n\nfunction diff$4(record, otherRecord, options) {\n  const native = getNativePlainDateTime(record);\n  const otherNative = getNativePlainDateTime(otherRecord);\n  return createNativeDurationRecord(native.until(otherNative, options));\n}\n\nfunction equals$5(record, otherRecord) {\n  const native = getNativePlainDateTime(record);\n  const otherNative = getNativePlainDateTime(otherRecord);\n  return native.equals(otherNative);\n}\n\nfunction compare$4(record, otherRecord) {\n  const native = getNativePlainDateTime(record);\n  const otherNative = getNativePlainDateTime(otherRecord);\n  return NativeTemporal.PlainDateTime.compare(native, otherNative);\n}\n\nconst createFormat$4 = /*@__PURE__*/ createNativeDateTimeFormatFactory(getNativePlainDateTime);\n\nfunction toLocaleString$5(record, locales, options) {\n  return getNativePlainDateTime(record).toLocaleString(locales, options);\n}\n\nfunction toString$5(record, options) {\n  return getNativePlainDateTime(record).toString(options);\n}\n\nfunction toBasicString$5(record) {\n  return getNativePlainDateTime(record).toString();\n}\n\nfunction toZonedDateTime$1(record, timeZoneId, options) {\n  return createNativeZonedDateTimeRecord(getNativePlainDateTime(record).toZonedDateTime(timeZoneId, options));\n}\n\nfunction toPlainDate$3(record) {\n  return createNativePlainDateRecord(getNativePlainDateTime(record).toPlainDate());\n}\n\nfunction toPlainTime$1(record) {\n  return createNativePlainTimeRecord(getNativePlainDateTime(record).toPlainTime());\n}\n\nconst toTemporal$5 = getNativePlainDateTime;\n\nfunction withDayOfYear$2(record, dayOfYear, options) {\n  return createNativePlainDateTimeRecord(TemporalUtils.withDayOfYear(getNativePlainDateTime(record), dayOfYear, options));\n}\n\nfunction withDayOfMonth$2(record, dayOfMonth, options) {\n  return createNativePlainDateTimeRecord(getNativePlainDateTime(record).with({\n    day: dayOfMonth\n  }, options));\n}\n\nfunction withDayOfWeek$2(record, dayOfWeek, options) {\n  return createNativePlainDateTimeRecord(TemporalUtils.withDayOfWeek(getNativePlainDateTime(record), dayOfWeek, options));\n}\n\nfunction withWeekOfYear$2(record, weekOfYear, options) {\n  return createNativePlainDateTimeRecord(TemporalUtils.withWeekOfYear(getNativePlainDateTime(record), weekOfYear, options));\n}\n\nfunction addYears$3(record, years, options) {\n  return createNativePlainDateTimeRecord(getNativePlainDateTime(record).add({\n    years: years\n  }, options));\n}\n\nfunction addMonths$3(record, months, options) {\n  return createNativePlainDateTimeRecord(getNativePlainDateTime(record).add({\n    months: months\n  }, options));\n}\n\nfunction addWeeks$2(record, weeks) {\n  return createNativePlainDateTimeRecord(getNativePlainDateTime(record).add({\n    weeks: weeks\n  }));\n}\n\nfunction addDays$2(record, days) {\n  return createNativePlainDateTimeRecord(getNativePlainDateTime(record).add({\n    days: days\n  }));\n}\n\nfunction addHours$2(record, hours) {\n  return createNativePlainDateTimeRecord(getNativePlainDateTime(record).add({\n    hours: hours\n  }));\n}\n\nfunction addMinutes$2(record, minutes) {\n  return createNativePlainDateTimeRecord(getNativePlainDateTime(record).add({\n    minutes: minutes\n  }));\n}\n\nfunction addSeconds$2(record, seconds) {\n  return createNativePlainDateTimeRecord(getNativePlainDateTime(record).add({\n    seconds: seconds\n  }));\n}\n\nfunction addMilliseconds$2(record, milliseconds) {\n  return createNativePlainDateTimeRecord(getNativePlainDateTime(record).add({\n    milliseconds: milliseconds\n  }));\n}\n\nfunction addMicroseconds$2(record, microseconds) {\n  return createNativePlainDateTimeRecord(getNativePlainDateTime(record).add({\n    microseconds: microseconds\n  }));\n}\n\nfunction addNanoseconds$2(record, nanoseconds) {\n  return createNativePlainDateTimeRecord(getNativePlainDateTime(record).add({\n    nanoseconds: nanoseconds\n  }));\n}\n\nfunction subtractYears$3(record, years, options) {\n  return createNativePlainDateTimeRecord(getNativePlainDateTime(record).subtract({\n    years: years\n  }, options));\n}\n\nfunction subtractMonths$3(record, months, options) {\n  return createNativePlainDateTimeRecord(getNativePlainDateTime(record).subtract({\n    months: months\n  }, options));\n}\n\nfunction subtractWeeks$2(record, weeks) {\n  return createNativePlainDateTimeRecord(getNativePlainDateTime(record).subtract({\n    weeks: weeks\n  }));\n}\n\nfunction subtractDays$2(record, days) {\n  return createNativePlainDateTimeRecord(getNativePlainDateTime(record).subtract({\n    days: days\n  }));\n}\n\nfunction subtractHours$2(record, hours) {\n  return createNativePlainDateTimeRecord(getNativePlainDateTime(record).subtract({\n    hours: hours\n  }));\n}\n\nfunction subtractMinutes$2(record, minutes) {\n  return createNativePlainDateTimeRecord(getNativePlainDateTime(record).subtract({\n    minutes: minutes\n  }));\n}\n\nfunction subtractSeconds$2(record, seconds) {\n  return createNativePlainDateTimeRecord(getNativePlainDateTime(record).subtract({\n    seconds: seconds\n  }));\n}\n\nfunction subtractMilliseconds$2(record, milliseconds) {\n  return createNativePlainDateTimeRecord(getNativePlainDateTime(record).subtract({\n    milliseconds: milliseconds\n  }));\n}\n\nfunction subtractMicroseconds$2(record, microseconds) {\n  return createNativePlainDateTimeRecord(getNativePlainDateTime(record).subtract({\n    microseconds: microseconds\n  }));\n}\n\nfunction subtractNanoseconds$2(record, nanoseconds) {\n  return createNativePlainDateTimeRecord(getNativePlainDateTime(record).subtract({\n    nanoseconds: nanoseconds\n  }));\n}\n\nfunction roundToYear$3(record, options) {\n  return createNativePlainDateTimeRecord(TemporalUtils.roundToYear(getNativePlainDateTime(record), normalizeUnitRoundOptions(options)));\n}\n\nfunction roundToMonth$2(record, options) {\n  return createNativePlainDateTimeRecord(TemporalUtils.roundToMonth(getNativePlainDateTime(record), normalizeUnitRoundOptions(options)));\n}\n\nfunction roundToWeek$2(record, options) {\n  return createNativePlainDateTimeRecord(TemporalUtils.roundToWeek(getNativePlainDateTime(record), normalizeUnitRoundOptions(options)));\n}\n\nfunction roundToDayTimeUnit$1(smallestUnit, record, options) {\n  return ((record, options) => createNativePlainDateTimeRecord(getNativePlainDateTime(record).round(options)))(record, createRoundToOptions(smallestUnit, options));\n}\n\nconst roundToDay$1 = /*@__PURE__*/ bindArgs(roundToDayTimeUnit$1, \"day\");\n\nconst roundToHour$2 = /*@__PURE__*/ bindArgs(roundToDayTimeUnit$1, \"hour\");\n\nconst roundToMinute$2 = /*@__PURE__*/ bindArgs(roundToDayTimeUnit$1, \"minute\");\n\nconst roundToSecond$2 = /*@__PURE__*/ bindArgs(roundToDayTimeUnit$1, \"second\");\n\nconst roundToMillisecond$2 = /*@__PURE__*/ bindArgs(roundToDayTimeUnit$1, \"millisecond\");\n\nconst roundToMicrosecond$2 = /*@__PURE__*/ bindArgs(roundToDayTimeUnit$1, \"microsecond\");\n\nfunction startOfYear$3(record) {\n  return createNativePlainDateTimeRecord(TemporalUtils.startOfYear(getNativePlainDateTime(record)));\n}\n\nfunction startOfMonth$2(record) {\n  return createNativePlainDateTimeRecord(TemporalUtils.startOfMonth(getNativePlainDateTime(record)));\n}\n\nfunction startOfWeek$2(record) {\n  return createNativePlainDateTimeRecord(TemporalUtils.startOfWeek(getNativePlainDateTime(record)));\n}\n\nfunction startOfDay$1(record) {\n  return createNativePlainDateTimeRecord(TemporalUtils.startOfDay(getNativePlainDateTime(record)));\n}\n\nfunction startOfHour$1(record) {\n  return createNativePlainDateTimeRecord(TemporalUtils.startOfHour(getNativePlainDateTime(record)));\n}\n\nfunction startOfMinute$1(record) {\n  return createNativePlainDateTimeRecord(TemporalUtils.startOfMinute(getNativePlainDateTime(record)));\n}\n\nfunction startOfSecond$1(record) {\n  return createNativePlainDateTimeRecord(TemporalUtils.startOfSecond(getNativePlainDateTime(record)));\n}\n\nfunction startOfMillisecond$1(record) {\n  return createNativePlainDateTimeRecord(TemporalUtils.startOfMillisecond(getNativePlainDateTime(record)));\n}\n\nfunction startOfMicrosecond$1(record) {\n  return createNativePlainDateTimeRecord(TemporalUtils.startOfMicrosecond(getNativePlainDateTime(record)));\n}\n\nfunction endOfYear$3(record) {\n  return createNativePlainDateTimeRecord(TemporalUtils.endOfYear(getNativePlainDateTime(record)));\n}\n\nfunction endOfMonth$2(record) {\n  return createNativePlainDateTimeRecord(TemporalUtils.endOfMonth(getNativePlainDateTime(record)));\n}\n\nfunction endOfWeek$2(record) {\n  return createNativePlainDateTimeRecord(TemporalUtils.endOfWeek(getNativePlainDateTime(record)));\n}\n\nfunction endOfDay$1(record) {\n  return createNativePlainDateTimeRecord(TemporalUtils.endOfDay(getNativePlainDateTime(record)));\n}\n\nfunction endOfHour$1(record) {\n  return createNativePlainDateTimeRecord(TemporalUtils.endOfHour(getNativePlainDateTime(record)));\n}\n\nfunction endOfMinute$1(record) {\n  return createNativePlainDateTimeRecord(TemporalUtils.endOfMinute(getNativePlainDateTime(record)));\n}\n\nfunction endOfSecond$1(record) {\n  return createNativePlainDateTimeRecord(TemporalUtils.endOfSecond(getNativePlainDateTime(record)));\n}\n\nfunction endOfMillisecond$1(record) {\n  return createNativePlainDateTimeRecord(TemporalUtils.endOfMillisecond(getNativePlainDateTime(record)));\n}\n\nfunction endOfMicrosecond$1(record) {\n  return createNativePlainDateTimeRecord(TemporalUtils.endOfMicrosecond(getNativePlainDateTime(record)));\n}\n\nfunction diffYears$3(record0, record1, options) {\n  return TemporalUtils.diffYears(getNativePlainDateTime(record0), getNativePlainDateTime(record1), options);\n}\n\nfunction diffMonths$3(record0, record1, options) {\n  return TemporalUtils.diffMonths(getNativePlainDateTime(record0), getNativePlainDateTime(record1), options);\n}\n\nfunction diffWeeks$2(record0, record1, options) {\n  return TemporalUtils.diffWeeks(getNativePlainDateTime(record0), getNativePlainDateTime(record1), options);\n}\n\nfunction diffDays$2(record0, record1, options) {\n  return TemporalUtils.diffDays(getNativePlainDateTime(record0), getNativePlainDateTime(record1), options);\n}\n\nfunction diffHours$2(record0, record1, options) {\n  return TemporalUtils.diffHours(getNativePlainDateTime(record0), getNativePlainDateTime(record1), options);\n}\n\nfunction diffMinutes$2(record0, record1, options) {\n  return TemporalUtils.diffMinutes(getNativePlainDateTime(record0), getNativePlainDateTime(record1), options);\n}\n\nfunction diffSeconds$2(record0, record1, options) {\n  return TemporalUtils.diffSeconds(getNativePlainDateTime(record0), getNativePlainDateTime(record1), options);\n}\n\nfunction diffMilliseconds$2(record0, record1, options) {\n  return TemporalUtils.diffMilliseconds(getNativePlainDateTime(record0), getNativePlainDateTime(record1), options);\n}\n\nfunction diffMicroseconds$2(record0, record1, options) {\n  return TemporalUtils.diffMicroseconds(getNativePlainDateTime(record0), getNativePlainDateTime(record1), options);\n}\n\nfunction diffNanoseconds$2(record0, record1, options) {\n  return TemporalUtils.diffNanoseconds(getNativePlainDateTime(record0), getNativePlainDateTime(record1), options);\n}\n\nconst getNativePlainMonthDay = getPlainMonthDaySlots;\n\nconst NativePlainMonthDayRecord = /*@__PURE__*/ defineTemporalClass(PlainMonthDayRecordBranding, class {\n  get calendarId() {\n    return getNativePlainMonthDay(this).calendarId;\n  }\n  toJSON() {\n    return getNativePlainMonthDay(this).toJSON();\n  }\n  valueOf() {\n    return getNativePlainMonthDay(this).valueOf();\n  }\n}, getNativePlainMonthDay, monthDayFieldGetters);\n\nfunction createNativePlainMonthDayRecord(native) {\n  const instance = Object.create(NativePlainMonthDayRecord.prototype);\n  return setPlainMonthDaySlots(instance, native), attachDebugString(instance), instance;\n}\n\nfunction create$4(isoMonth, isoDay, calendar, referenceIsoYear) {\n  return createNativePlainMonthDayRecord(new NativeTemporal.PlainMonthDay(isoMonth, isoDay, refineNativeCalendarArgMaybe(calendar), referenceIsoYear));\n}\n\nfunction fromFields$3(fields, options) {\n  const calendar = refineNativeCalendarArgMaybe(fields.calendar);\n  return createNativePlainMonthDayRecord(NativeTemporal.PlainMonthDay.from({\n    ...fields,\n    calendar: calendar\n  }, options));\n}\n\nfunction fromString$4(s, getCalendarRecord) {\n  const resNative = NativeTemporal.PlainMonthDay.from(s);\n  return runNativeCalendarResolver(resNative.calendarId, getCalendarRecord), createNativePlainMonthDayRecord(resNative);\n}\n\nfunction withFields$3(record, mod, options) {\n  return createNativePlainMonthDayRecord(getNativePlainMonthDay(record).with(mod, options));\n}\n\nfunction equals$4(record, otherRecord) {\n  const native = getNativePlainMonthDay(record);\n  const otherNative = getNativePlainMonthDay(otherRecord);\n  return native.equals(otherNative);\n}\n\nconst createFormat$3 = /*@__PURE__*/ createNativeDateTimeFormatFactory(getNativePlainMonthDay);\n\nfunction toLocaleString$4(record, locales, options) {\n  return getNativePlainMonthDay(record).toLocaleString(locales, options);\n}\n\nfunction toString$4(record, options) {\n  return getNativePlainMonthDay(record).toString(options);\n}\n\nfunction toBasicString$4(record) {\n  return getNativePlainMonthDay(record).toString();\n}\n\nfunction toPlainDate$2(record, fields) {\n  return createNativePlainDateRecord(getNativePlainMonthDay(record).toPlainDate(fields));\n}\n\nconst toTemporal$4 = getNativePlainMonthDay;\n\nconst getNativePlainYearMonth = getPlainYearMonthSlots;\n\nconst NativePlainYearMonthRecord = /*@__PURE__*/ defineTemporalClass(PlainYearMonthRecordBranding, class {\n  get calendarId() {\n    return getNativePlainYearMonth(this).calendarId;\n  }\n  toJSON() {\n    return getNativePlainYearMonth(this).toJSON();\n  }\n  valueOf() {\n    return getNativePlainYearMonth(this).valueOf();\n  }\n}, getNativePlainYearMonth, yearMonthFieldGetters);\n\nfunction createNativePlainYearMonthRecord(native) {\n  const instance = Object.create(NativePlainYearMonthRecord.prototype);\n  return setPlainYearMonthSlots(instance, native), attachDebugString(instance), instance;\n}\n\nfunction create$3(isoYear, isoMonth, calendar, referenceIsoDay) {\n  return createNativePlainYearMonthRecord(new NativeTemporal.PlainYearMonth(isoYear, isoMonth, refineNativeCalendarArgMaybe(calendar), referenceIsoDay));\n}\n\nfunction fromFields$2(fields, options) {\n  const calendar = refineNativeCalendarArgMaybe(fields.calendar);\n  return createNativePlainYearMonthRecord(NativeTemporal.PlainYearMonth.from({\n    ...fields,\n    calendar: calendar\n  }, options));\n}\n\nfunction fromString$3(s, getCalendarRecord) {\n  const resNative = NativeTemporal.PlainYearMonth.from(s);\n  return runNativeCalendarResolver(resNative.calendarId, getCalendarRecord), createNativePlainYearMonthRecord(resNative);\n}\n\nfunction daysInMonth$2(record) {\n  return getNativePlainYearMonth(record).daysInMonth;\n}\n\nfunction daysInYear$2(record) {\n  return getNativePlainYearMonth(record).daysInYear;\n}\n\nfunction monthsInYear$2(record) {\n  return getNativePlainYearMonth(record).monthsInYear;\n}\n\nfunction inLeapYear$2(record) {\n  return getNativePlainYearMonth(record).inLeapYear;\n}\n\nfunction withFields$2(record, mod, options) {\n  return createNativePlainYearMonthRecord(getNativePlainYearMonth(record).with(mod, options));\n}\n\nfunction add$3(record, duration, options) {\n  const native = getNativePlainYearMonth(record);\n  const durationNative = getNativeDuration(duration);\n  return createNativePlainYearMonthRecord(native.add(durationNative, options));\n}\n\nfunction subtract$3(record, duration, options) {\n  const native = getNativePlainYearMonth(record);\n  const durationNative = getNativeDuration(duration);\n  return createNativePlainYearMonthRecord(native.subtract(durationNative, options));\n}\n\nfunction diff$3(record, otherRecord, options) {\n  const native = getNativePlainYearMonth(record);\n  const otherNative = getNativePlainYearMonth(otherRecord);\n  return createNativeDurationRecord(native.until(otherNative, options));\n}\n\nfunction equals$3(record, otherRecord) {\n  const native = getNativePlainYearMonth(record);\n  const otherNative = getNativePlainYearMonth(otherRecord);\n  return native.equals(otherNative);\n}\n\nfunction compare$3(record, otherRecord) {\n  const native = getNativePlainYearMonth(record);\n  const otherNative = getNativePlainYearMonth(otherRecord);\n  return NativeTemporal.PlainYearMonth.compare(native, otherNative);\n}\n\nconst createFormat$2 = /*@__PURE__*/ createNativeDateTimeFormatFactory(getNativePlainYearMonth);\n\nfunction toLocaleString$3(record, locales, options) {\n  return getNativePlainYearMonth(record).toLocaleString(locales, options);\n}\n\nfunction toString$3(record, options) {\n  return getNativePlainYearMonth(record).toString(options);\n}\n\nfunction toBasicString$3(record) {\n  return getNativePlainYearMonth(record).toString();\n}\n\nfunction toPlainDate$1(record, fields) {\n  return createNativePlainDateRecord(getNativePlainYearMonth(record).toPlainDate(fields));\n}\n\nconst toTemporal$3 = getNativePlainYearMonth;\n\nfunction addYears$2(record, years, options) {\n  return createNativePlainYearMonthRecord(getNativePlainYearMonth(record).add({\n    years: years\n  }, options));\n}\n\nfunction addMonths$2(record, months, options) {\n  return createNativePlainYearMonthRecord(getNativePlainYearMonth(record).add({\n    months: months\n  }, options));\n}\n\nfunction subtractYears$2(record, years, options) {\n  return createNativePlainYearMonthRecord(getNativePlainYearMonth(record).subtract({\n    years: years\n  }, options));\n}\n\nfunction subtractMonths$2(record, months, options) {\n  return createNativePlainYearMonthRecord(getNativePlainYearMonth(record).subtract({\n    months: months\n  }, options));\n}\n\nfunction roundToYear$2(record, options) {\n  return createNativePlainYearMonthRecord(TemporalUtils.roundToYear(getNativePlainYearMonth(record), normalizeUnitRoundOptions(options)));\n}\n\nfunction startOfYear$2(record) {\n  return createNativePlainYearMonthRecord(TemporalUtils.startOfYear(getNativePlainYearMonth(record)));\n}\n\nfunction endOfYear$2(record) {\n  return createNativePlainYearMonthRecord(TemporalUtils.endOfYear(getNativePlainYearMonth(record)));\n}\n\nfunction diffYears$2(record0, record1, options) {\n  return TemporalUtils.diffYears(getNativePlainYearMonth(record0), getNativePlainYearMonth(record1), options);\n}\n\nfunction diffMonths$2(record0, record1, options) {\n  return TemporalUtils.diffMonths(getNativePlainYearMonth(record0), getNativePlainYearMonth(record1), options);\n}\n\nconst getNativePlainDate = getPlainDateSlots;\n\nconst NativePlainDateRecord = /*@__PURE__*/ defineTemporalClass(PlainDateRecordBranding, class {\n  get calendarId() {\n    return getNativePlainDate(this).calendarId;\n  }\n  toJSON() {\n    return getNativePlainDate(this).toJSON();\n  }\n  valueOf() {\n    return getNativePlainDate(this).valueOf();\n  }\n}, getNativePlainDate, dateFieldGetters);\n\nfunction createNativePlainDateRecord(native) {\n  const instance = Object.create(NativePlainDateRecord.prototype);\n  return setPlainDateSlots(instance, native), attachDebugString(instance), instance;\n}\n\nfunction create$2(isoYear, isoMonth, isoDay, calendar) {\n  return createNativePlainDateRecord(new NativeTemporal.PlainDate(isoYear, isoMonth, isoDay, refineNativeCalendarArgMaybe(calendar)));\n}\n\nfunction fromFields$1(fields, options) {\n  const calendar = refineNativeCalendarArgMaybe(fields.calendar);\n  return createNativePlainDateRecord(NativeTemporal.PlainDate.from({\n    ...fields,\n    calendar: calendar\n  }, options));\n}\n\nfunction fromString$2(s, getCalendarRecord) {\n  const resNative = NativeTemporal.PlainDate.from(s);\n  return runNativeCalendarResolver(resNative.calendarId, getCalendarRecord), createNativePlainDateRecord(resNative);\n}\n\nfunction dayOfWeek$1(record) {\n  return getNativePlainDate(record).dayOfWeek;\n}\n\nfunction daysInWeek$1(record) {\n  return getNativePlainDate(record).daysInWeek;\n}\n\nfunction weekOfYear$1(record) {\n  return getNativePlainDate(record).weekOfYear;\n}\n\nfunction yearOfWeek$1(record) {\n  return getNativePlainDate(record).yearOfWeek;\n}\n\nfunction dayOfYear$1(record) {\n  return getNativePlainDate(record).dayOfYear;\n}\n\nfunction daysInMonth$1(record) {\n  return getNativePlainDate(record).daysInMonth;\n}\n\nfunction daysInYear$1(record) {\n  return getNativePlainDate(record).daysInYear;\n}\n\nfunction monthsInYear$1(record) {\n  return getNativePlainDate(record).monthsInYear;\n}\n\nfunction inLeapYear$1(record) {\n  return getNativePlainDate(record).inLeapYear;\n}\n\nfunction withFields$1(record, mod, options) {\n  return createNativePlainDateRecord(getNativePlainDate(record).with(mod, options));\n}\n\nfunction withCalendar$1(record, calendarRecord) {\n  const native = getNativePlainDate(record);\n  const calendarId = getValidatedCalendarId(calendarRecord);\n  return createNativePlainDateRecord(native.withCalendar(calendarId));\n}\n\nfunction add$2(record, duration, options) {\n  const native = getNativePlainDate(record);\n  const durationNative = getNativeDuration(duration);\n  return createNativePlainDateRecord(native.add(durationNative, options));\n}\n\nfunction subtract$2(record, duration, options) {\n  const native = getNativePlainDate(record);\n  const durationNative = getNativeDuration(duration);\n  return createNativePlainDateRecord(native.subtract(durationNative, options));\n}\n\nfunction diff$2(record, otherRecord, options) {\n  const native = getNativePlainDate(record);\n  const otherNative = getNativePlainDate(otherRecord);\n  return createNativeDurationRecord(native.until(otherNative, options));\n}\n\nfunction equals$2(record, otherRecord) {\n  const native = getNativePlainDate(record);\n  const otherNative = getNativePlainDate(otherRecord);\n  return native.equals(otherNative);\n}\n\nfunction compare$2(record, otherRecord) {\n  const native = getNativePlainDate(record);\n  const otherNative = getNativePlainDate(otherRecord);\n  return NativeTemporal.PlainDate.compare(native, otherNative);\n}\n\nconst createFormat$1 = /*@__PURE__*/ createNativeDateTimeFormatFactory(getNativePlainDate);\n\nfunction toLocaleString$2(record, locales, options) {\n  return getNativePlainDate(record).toLocaleString(locales, options);\n}\n\nfunction toString$2(record, options) {\n  return getNativePlainDate(record).toString(options);\n}\n\nfunction toBasicString$2(record) {\n  return getNativePlainDate(record).toString();\n}\n\nfunction toZonedDateTime(record, options) {\n  const native = getNativePlainDate(record);\n  const optionsObj = \"string\" == typeof options ? {\n    timeZone: options\n  } : {\n    ...options,\n    plainTime: void 0 === options.plainTime ? void 0 : getNativePlainTime(options.plainTime)\n  };\n  return createNativeZonedDateTimeRecord(native.toZonedDateTime(optionsObj));\n}\n\nfunction toPlainDateTime$1(record, plainTimeRecord) {\n  const native = getNativePlainDate(record);\n  const plainTimeNative = void 0 === plainTimeRecord ? void 0 : getNativePlainTime(plainTimeRecord);\n  return createNativePlainDateTimeRecord(native.toPlainDateTime(plainTimeNative));\n}\n\nfunction toPlainYearMonth(record) {\n  return createNativePlainYearMonthRecord(getNativePlainDate(record).toPlainYearMonth());\n}\n\nfunction toPlainMonthDay(record) {\n  return createNativePlainMonthDayRecord(getNativePlainDate(record).toPlainMonthDay());\n}\n\nconst toTemporal$2 = getNativePlainDate;\n\nfunction withDayOfYear$1(record, dayOfYear, options) {\n  return createNativePlainDateRecord(TemporalUtils.withDayOfYear(getNativePlainDate(record), dayOfYear, options));\n}\n\nfunction withDayOfMonth$1(record, dayOfMonth, options) {\n  return createNativePlainDateRecord(getNativePlainDate(record).with({\n    day: dayOfMonth\n  }, options));\n}\n\nfunction withDayOfWeek$1(record, dayOfWeek, options) {\n  return createNativePlainDateRecord(TemporalUtils.withDayOfWeek(getNativePlainDate(record), dayOfWeek, options));\n}\n\nfunction withWeekOfYear$1(record, weekOfYear, options) {\n  return createNativePlainDateRecord(TemporalUtils.withWeekOfYear(getNativePlainDate(record), weekOfYear, options));\n}\n\nfunction addYears$1(record, years, options) {\n  return createNativePlainDateRecord(getNativePlainDate(record).add({\n    years: years\n  }, options));\n}\n\nfunction addMonths$1(record, months, options) {\n  return createNativePlainDateRecord(getNativePlainDate(record).add({\n    months: months\n  }, options));\n}\n\nfunction addWeeks$1(record, weeks) {\n  return createNativePlainDateRecord(getNativePlainDate(record).add({\n    weeks: weeks\n  }));\n}\n\nfunction addDays$1(record, days) {\n  return createNativePlainDateRecord(getNativePlainDate(record).add({\n    days: days\n  }));\n}\n\nfunction subtractYears$1(record, years, options) {\n  return createNativePlainDateRecord(getNativePlainDate(record).subtract({\n    years: years\n  }, options));\n}\n\nfunction subtractMonths$1(record, months, options) {\n  return createNativePlainDateRecord(getNativePlainDate(record).subtract({\n    months: months\n  }, options));\n}\n\nfunction subtractWeeks$1(record, weeks) {\n  return createNativePlainDateRecord(getNativePlainDate(record).subtract({\n    weeks: weeks\n  }));\n}\n\nfunction subtractDays$1(record, days) {\n  return createNativePlainDateRecord(getNativePlainDate(record).subtract({\n    days: days\n  }));\n}\n\nfunction roundToYear$1(record, options) {\n  return createNativePlainDateRecord(TemporalUtils.roundToYear(getNativePlainDate(record), normalizeUnitRoundOptions(options)));\n}\n\nfunction roundToMonth$1(record, options) {\n  return createNativePlainDateRecord(TemporalUtils.roundToMonth(getNativePlainDate(record), normalizeUnitRoundOptions(options)));\n}\n\nfunction roundToWeek$1(record, options) {\n  return createNativePlainDateRecord(TemporalUtils.roundToWeek(getNativePlainDate(record), normalizeUnitRoundOptions(options)));\n}\n\nfunction startOfYear$1(record) {\n  return createNativePlainDateRecord(TemporalUtils.startOfYear(getNativePlainDate(record)));\n}\n\nfunction startOfMonth$1(record) {\n  return createNativePlainDateRecord(TemporalUtils.startOfMonth(getNativePlainDate(record)));\n}\n\nfunction startOfWeek$1(record) {\n  return createNativePlainDateRecord(TemporalUtils.startOfWeek(getNativePlainDate(record)));\n}\n\nfunction endOfYear$1(record) {\n  return createNativePlainDateRecord(TemporalUtils.endOfYear(getNativePlainDate(record)));\n}\n\nfunction endOfMonth$1(record) {\n  return createNativePlainDateRecord(TemporalUtils.endOfMonth(getNativePlainDate(record)));\n}\n\nfunction endOfWeek$1(record) {\n  return createNativePlainDateRecord(TemporalUtils.endOfWeek(getNativePlainDate(record)));\n}\n\nfunction diffYears$1(record0, record1, options) {\n  return TemporalUtils.diffYears(getNativePlainDate(record0), getNativePlainDate(record1), options);\n}\n\nfunction diffMonths$1(record0, record1, options) {\n  return TemporalUtils.diffMonths(getNativePlainDate(record0), getNativePlainDate(record1), options);\n}\n\nfunction diffWeeks$1(record0, record1, options) {\n  return TemporalUtils.diffWeeks(getNativePlainDate(record0), getNativePlainDate(record1), options);\n}\n\nfunction diffDays$1(record0, record1, options) {\n  return TemporalUtils.diffDays(getNativePlainDate(record0), getNativePlainDate(record1), options);\n}\n\nconst getNativeZonedDateTime = getZonedDateTimeSlots;\n\nconst NativeZonedDateTimeRecord = /*@__PURE__*/ defineTemporalClass(ZonedDateTimeRecordBranding, class {\n  get calendarId() {\n    return getNativeZonedDateTime(this).calendarId;\n  }\n  get timeZoneId() {\n    return getNativeZonedDateTime(this).timeZoneId;\n  }\n  get epochMilliseconds() {\n    return getNativeZonedDateTime(this).epochMilliseconds;\n  }\n  get epochNanoseconds() {\n    return getNativeZonedDateTime(this).epochNanoseconds;\n  }\n  toJSON() {\n    return getNativeZonedDateTime(this).toJSON();\n  }\n  valueOf() {\n    return getNativeZonedDateTime(this).valueOf();\n  }\n}, getNativeZonedDateTime, dateFieldGetters, timeGetters);\n\nfunction createNativeZonedDateTimeRecord(native) {\n  const instance = Object.create(NativeZonedDateTimeRecord.prototype);\n  return setZonedDateTimeSlots(instance, native), attachDebugString(instance), instance;\n}\n\nfunction create$1(epochNanoseconds, timeZoneId, calendar) {\n  return createNativeZonedDateTimeRecord(new NativeTemporal.ZonedDateTime(epochNanoseconds, timeZoneId, refineNativeCalendarArgMaybe(calendar)));\n}\n\nfunction fromFields(fields, options) {\n  const calendar = refineNativeCalendarArgMaybe(fields.calendar);\n  return createNativeZonedDateTimeRecord(NativeTemporal.ZonedDateTime.from({\n    ...fields,\n    calendar: calendar\n  }, options));\n}\n\nfunction fromString$1(s, getCalendarRecord, options) {\n  const resNative = NativeTemporal.ZonedDateTime.from(s, options);\n  return runNativeCalendarResolver(resNative.calendarId, getCalendarRecord), createNativeZonedDateTimeRecord(resNative);\n}\n\nfunction withFields(record, mod, options) {\n  return createNativeZonedDateTimeRecord(getNativeZonedDateTime(record).with(mod, options));\n}\n\nfunction withCalendar(record, calendarRecord) {\n  const native = getNativeZonedDateTime(record);\n  const calendarId = getValidatedCalendarId(calendarRecord);\n  return createNativeZonedDateTimeRecord(native.withCalendar(calendarId));\n}\n\nfunction withTimeZone(record, timeZoneId) {\n  return createNativeZonedDateTimeRecord(getNativeZonedDateTime(record).withTimeZone(timeZoneId));\n}\n\nfunction withPlainTime(record, plainTimeRecord) {\n  const native = getNativeZonedDateTime(record);\n  const plainTimeNative = void 0 === plainTimeRecord ? void 0 : getNativePlainTime(plainTimeRecord);\n  return createNativeZonedDateTimeRecord(native.withPlainTime(plainTimeNative));\n}\n\nfunction offsetNanoseconds(record) {\n  return getNativeZonedDateTime(record).offsetNanoseconds;\n}\n\nfunction offset(record) {\n  return getNativeZonedDateTime(record).offset;\n}\n\nfunction dayOfWeek(record) {\n  return getNativeZonedDateTime(record).dayOfWeek;\n}\n\nfunction daysInWeek(record) {\n  return getNativeZonedDateTime(record).daysInWeek;\n}\n\nfunction weekOfYear(record) {\n  return getNativeZonedDateTime(record).weekOfYear;\n}\n\nfunction yearOfWeek(record) {\n  return getNativeZonedDateTime(record).yearOfWeek;\n}\n\nfunction dayOfYear(record) {\n  return getNativeZonedDateTime(record).dayOfYear;\n}\n\nfunction daysInMonth(record) {\n  return getNativeZonedDateTime(record).daysInMonth;\n}\n\nfunction daysInYear(record) {\n  return getNativeZonedDateTime(record).daysInYear;\n}\n\nfunction monthsInYear(record) {\n  return getNativeZonedDateTime(record).monthsInYear;\n}\n\nfunction inLeapYear(record) {\n  return getNativeZonedDateTime(record).inLeapYear;\n}\n\nfunction hoursInDay(record) {\n  return getNativeZonedDateTime(record).hoursInDay;\n}\n\nfunction toString$1(record, options) {\n  return getNativeZonedDateTime(record).toString(options);\n}\n\nfunction toBasicString$1(record) {\n  return getNativeZonedDateTime(record).toString();\n}\n\nfunction add$1(record, duration, options) {\n  const native = getNativeZonedDateTime(record);\n  const durationNative = getNativeDuration(duration);\n  return createNativeZonedDateTimeRecord(native.add(durationNative, options));\n}\n\nfunction subtract$1(record, duration, options) {\n  const native = getNativeZonedDateTime(record);\n  const durationNative = getNativeDuration(duration);\n  return createNativeZonedDateTimeRecord(native.subtract(durationNative, options));\n}\n\nfunction diff$1(record, otherRecord, options) {\n  const native = getNativeZonedDateTime(record);\n  const otherNative = getNativeZonedDateTime(otherRecord);\n  return createNativeDurationRecord(native.until(otherNative, options));\n}\n\nfunction startOfDay(record) {\n  return createNativeZonedDateTimeRecord(getNativeZonedDateTime(record).startOfDay());\n}\n\nfunction getTimeZoneTransition(record, options) {\n  const resNative = getNativeZonedDateTime(record).getTimeZoneTransition(options);\n  return resNative ? createNativeZonedDateTimeRecord(resNative) : null;\n}\n\nfunction equals$1(record, otherRecord) {\n  const native = getNativeZonedDateTime(record);\n  const otherNative = getNativeZonedDateTime(otherRecord);\n  return native.equals(otherNative);\n}\n\nfunction compare$1(record, otherRecord) {\n  const native = getNativeZonedDateTime(record);\n  const otherNative = getNativeZonedDateTime(otherRecord);\n  return NativeTemporal.ZonedDateTime.compare(native, otherNative);\n}\n\nfunction toLocaleString$1(record, locales, options) {\n  return getNativeZonedDateTime(record).toLocaleString(locales, options);\n}\n\nfunction toInstant(record) {\n  return createNativeInstantRecord(getNativeZonedDateTime(record).toInstant());\n}\n\nfunction toPlainDateTime(record) {\n  return createNativePlainDateTimeRecord(getNativeZonedDateTime(record).toPlainDateTime());\n}\n\nfunction toPlainDate(record) {\n  return createNativePlainDateRecord(getNativeZonedDateTime(record).toPlainDate());\n}\n\nfunction toPlainTime(record) {\n  return createNativePlainTimeRecord(getNativeZonedDateTime(record).toPlainTime());\n}\n\nconst toTemporal$1 = getNativeZonedDateTime;\n\nfunction withDayOfYear(record, dayOfYear, options) {\n  return createNativeZonedDateTimeRecord(TemporalUtils.withDayOfYear(getNativeZonedDateTime(record), dayOfYear, options));\n}\n\nfunction withDayOfMonth(record, dayOfMonth, options) {\n  return createNativeZonedDateTimeRecord(getNativeZonedDateTime(record).with({\n    day: dayOfMonth\n  }, options));\n}\n\nfunction withDayOfWeek(record, dayOfWeek, options) {\n  return createNativeZonedDateTimeRecord(TemporalUtils.withDayOfWeek(getNativeZonedDateTime(record), dayOfWeek, options));\n}\n\nfunction withWeekOfYear(record, weekOfYear, options) {\n  return createNativeZonedDateTimeRecord(TemporalUtils.withWeekOfYear(getNativeZonedDateTime(record), weekOfYear, options));\n}\n\nfunction addYears(record, years, options) {\n  return createNativeZonedDateTimeRecord(getNativeZonedDateTime(record).add({\n    years: years\n  }, options));\n}\n\nfunction addMonths(record, months, options) {\n  return createNativeZonedDateTimeRecord(getNativeZonedDateTime(record).add({\n    months: months\n  }, options));\n}\n\nfunction addWeeks(record, weeks) {\n  return createNativeZonedDateTimeRecord(getNativeZonedDateTime(record).add({\n    weeks: weeks\n  }));\n}\n\nfunction addDays(record, days) {\n  return createNativeZonedDateTimeRecord(getNativeZonedDateTime(record).add({\n    days: days\n  }));\n}\n\nfunction addHours$1(record, hours) {\n  return createNativeZonedDateTimeRecord(getNativeZonedDateTime(record).add({\n    hours: hours\n  }));\n}\n\nfunction addMinutes$1(record, minutes) {\n  return createNativeZonedDateTimeRecord(getNativeZonedDateTime(record).add({\n    minutes: minutes\n  }));\n}\n\nfunction addSeconds$1(record, seconds) {\n  return createNativeZonedDateTimeRecord(getNativeZonedDateTime(record).add({\n    seconds: seconds\n  }));\n}\n\nfunction addMilliseconds$1(record, milliseconds) {\n  return createNativeZonedDateTimeRecord(getNativeZonedDateTime(record).add({\n    milliseconds: milliseconds\n  }));\n}\n\nfunction addMicroseconds$1(record, microseconds) {\n  return createNativeZonedDateTimeRecord(getNativeZonedDateTime(record).add({\n    microseconds: microseconds\n  }));\n}\n\nfunction addNanoseconds$1(record, nanoseconds) {\n  return createNativeZonedDateTimeRecord(getNativeZonedDateTime(record).add({\n    nanoseconds: nanoseconds\n  }));\n}\n\nfunction subtractYears(record, years, options) {\n  return createNativeZonedDateTimeRecord(getNativeZonedDateTime(record).subtract({\n    years: years\n  }, options));\n}\n\nfunction subtractMonths(record, months, options) {\n  return createNativeZonedDateTimeRecord(getNativeZonedDateTime(record).subtract({\n    months: months\n  }, options));\n}\n\nfunction subtractWeeks(record, weeks) {\n  return createNativeZonedDateTimeRecord(getNativeZonedDateTime(record).subtract({\n    weeks: weeks\n  }));\n}\n\nfunction subtractDays(record, days) {\n  return createNativeZonedDateTimeRecord(getNativeZonedDateTime(record).subtract({\n    days: days\n  }));\n}\n\nfunction subtractHours$1(record, hours) {\n  return createNativeZonedDateTimeRecord(getNativeZonedDateTime(record).subtract({\n    hours: hours\n  }));\n}\n\nfunction subtractMinutes$1(record, minutes) {\n  return createNativeZonedDateTimeRecord(getNativeZonedDateTime(record).subtract({\n    minutes: minutes\n  }));\n}\n\nfunction subtractSeconds$1(record, seconds) {\n  return createNativeZonedDateTimeRecord(getNativeZonedDateTime(record).subtract({\n    seconds: seconds\n  }));\n}\n\nfunction subtractMilliseconds$1(record, milliseconds) {\n  return createNativeZonedDateTimeRecord(getNativeZonedDateTime(record).subtract({\n    milliseconds: milliseconds\n  }));\n}\n\nfunction subtractMicroseconds$1(record, microseconds) {\n  return createNativeZonedDateTimeRecord(getNativeZonedDateTime(record).subtract({\n    microseconds: microseconds\n  }));\n}\n\nfunction subtractNanoseconds$1(record, nanoseconds) {\n  return createNativeZonedDateTimeRecord(getNativeZonedDateTime(record).subtract({\n    nanoseconds: nanoseconds\n  }));\n}\n\nfunction roundToYear(record, options) {\n  return createNativeZonedDateTimeRecord(TemporalUtils.roundToYear(getNativeZonedDateTime(record), normalizeUnitRoundOptions(options)));\n}\n\nfunction roundToMonth(record, options) {\n  return createNativeZonedDateTimeRecord(TemporalUtils.roundToMonth(getNativeZonedDateTime(record), normalizeUnitRoundOptions(options)));\n}\n\nfunction roundToWeek(record, options) {\n  return createNativeZonedDateTimeRecord(TemporalUtils.roundToWeek(getNativeZonedDateTime(record), normalizeUnitRoundOptions(options)));\n}\n\nfunction roundToDayTimeUnit(smallestUnit, record, options) {\n  return ((record, options) => createNativeZonedDateTimeRecord(getNativeZonedDateTime(record).round(options)))(record, createRoundToOptions(smallestUnit, options));\n}\n\nconst roundToDay = /*@__PURE__*/ bindArgs(roundToDayTimeUnit, \"day\");\n\nconst roundToHour$1 = /*@__PURE__*/ bindArgs(roundToDayTimeUnit, \"hour\");\n\nconst roundToMinute$1 = /*@__PURE__*/ bindArgs(roundToDayTimeUnit, \"minute\");\n\nconst roundToSecond$1 = /*@__PURE__*/ bindArgs(roundToDayTimeUnit, \"second\");\n\nconst roundToMillisecond$1 = /*@__PURE__*/ bindArgs(roundToDayTimeUnit, \"millisecond\");\n\nconst roundToMicrosecond$1 = /*@__PURE__*/ bindArgs(roundToDayTimeUnit, \"microsecond\");\n\nfunction startOfYear(record) {\n  return createNativeZonedDateTimeRecord(TemporalUtils.startOfYear(getNativeZonedDateTime(record)));\n}\n\nfunction startOfMonth(record) {\n  return createNativeZonedDateTimeRecord(TemporalUtils.startOfMonth(getNativeZonedDateTime(record)));\n}\n\nfunction startOfWeek(record) {\n  return createNativeZonedDateTimeRecord(TemporalUtils.startOfWeek(getNativeZonedDateTime(record)));\n}\n\nfunction startOfHour(record) {\n  return createNativeZonedDateTimeRecord(TemporalUtils.startOfHour(getNativeZonedDateTime(record)));\n}\n\nfunction startOfMinute(record) {\n  return createNativeZonedDateTimeRecord(TemporalUtils.startOfMinute(getNativeZonedDateTime(record)));\n}\n\nfunction startOfSecond(record) {\n  return createNativeZonedDateTimeRecord(TemporalUtils.startOfSecond(getNativeZonedDateTime(record)));\n}\n\nfunction startOfMillisecond(record) {\n  return createNativeZonedDateTimeRecord(TemporalUtils.startOfMillisecond(getNativeZonedDateTime(record)));\n}\n\nfunction startOfMicrosecond(record) {\n  return createNativeZonedDateTimeRecord(TemporalUtils.startOfMicrosecond(getNativeZonedDateTime(record)));\n}\n\nfunction endOfYear(record) {\n  return createNativeZonedDateTimeRecord(TemporalUtils.endOfYear(getNativeZonedDateTime(record)));\n}\n\nfunction endOfMonth(record) {\n  return createNativeZonedDateTimeRecord(TemporalUtils.endOfMonth(getNativeZonedDateTime(record)));\n}\n\nfunction endOfWeek(record) {\n  return createNativeZonedDateTimeRecord(TemporalUtils.endOfWeek(getNativeZonedDateTime(record)));\n}\n\nfunction endOfDay(record) {\n  return createNativeZonedDateTimeRecord(TemporalUtils.endOfDay(getNativeZonedDateTime(record)));\n}\n\nfunction endOfHour(record) {\n  return createNativeZonedDateTimeRecord(TemporalUtils.endOfHour(getNativeZonedDateTime(record)));\n}\n\nfunction endOfMinute(record) {\n  return createNativeZonedDateTimeRecord(TemporalUtils.endOfMinute(getNativeZonedDateTime(record)));\n}\n\nfunction endOfSecond(record) {\n  return createNativeZonedDateTimeRecord(TemporalUtils.endOfSecond(getNativeZonedDateTime(record)));\n}\n\nfunction endOfMillisecond(record) {\n  return createNativeZonedDateTimeRecord(TemporalUtils.endOfMillisecond(getNativeZonedDateTime(record)));\n}\n\nfunction endOfMicrosecond(record) {\n  return createNativeZonedDateTimeRecord(TemporalUtils.endOfMicrosecond(getNativeZonedDateTime(record)));\n}\n\nfunction diffYears(record0, record1, options) {\n  return TemporalUtils.diffYears(getNativeZonedDateTime(record0), getNativeZonedDateTime(record1), options);\n}\n\nfunction diffMonths(record0, record1, options) {\n  return TemporalUtils.diffMonths(getNativeZonedDateTime(record0), getNativeZonedDateTime(record1), options);\n}\n\nfunction diffWeeks(record0, record1, options) {\n  return TemporalUtils.diffWeeks(getNativeZonedDateTime(record0), getNativeZonedDateTime(record1), options);\n}\n\nfunction diffDays(record0, record1, options) {\n  return TemporalUtils.diffDays(getNativeZonedDateTime(record0), getNativeZonedDateTime(record1), options);\n}\n\nfunction diffHours$1(record0, record1, options) {\n  return TemporalUtils.diffHours(getNativeZonedDateTime(record0), getNativeZonedDateTime(record1), options);\n}\n\nfunction diffMinutes$1(record0, record1, options) {\n  return TemporalUtils.diffMinutes(getNativeZonedDateTime(record0), getNativeZonedDateTime(record1), options);\n}\n\nfunction diffSeconds$1(record0, record1, options) {\n  return TemporalUtils.diffSeconds(getNativeZonedDateTime(record0), getNativeZonedDateTime(record1), options);\n}\n\nfunction diffMilliseconds$1(record0, record1, options) {\n  return TemporalUtils.diffMilliseconds(getNativeZonedDateTime(record0), getNativeZonedDateTime(record1), options);\n}\n\nfunction diffMicroseconds$1(record0, record1, options) {\n  return TemporalUtils.diffMicroseconds(getNativeZonedDateTime(record0), getNativeZonedDateTime(record1), options);\n}\n\nfunction diffNanoseconds$1(record0, record1, options) {\n  return TemporalUtils.diffNanoseconds(getNativeZonedDateTime(record0), getNativeZonedDateTime(record1), options);\n}\n\nconst getNativeInstant = getInstantSlots;\n\nconst NativeInstantRecord = /*@__PURE__*/ defineTemporalClass(InstantRecordBranding, class {\n  get epochMilliseconds() {\n    return getNativeInstant(this).epochMilliseconds;\n  }\n  get epochNanoseconds() {\n    return getNativeInstant(this).epochNanoseconds;\n  }\n  toJSON() {\n    return getNativeInstant(this).toJSON();\n  }\n  valueOf() {\n    return getNativeInstant(this).valueOf();\n  }\n});\n\nfunction createNativeInstantRecord(native) {\n  const instance = Object.create(NativeInstantRecord.prototype);\n  return setInstantSlots(instance, native), attachDebugString(instance), instance;\n}\n\nfunction create(epochNanoseconds) {\n  return createNativeInstantRecord(new NativeTemporal.Instant(epochNanoseconds));\n}\n\nfunction fromEpochMilliseconds(epochMilliseconds) {\n  return createNativeInstantRecord(NativeTemporal.Instant.fromEpochMilliseconds(epochMilliseconds));\n}\n\nfunction fromEpochNanoseconds(epochNanoseconds) {\n  return createNativeInstantRecord(NativeTemporal.Instant.fromEpochNanoseconds(epochNanoseconds));\n}\n\nfunction fromString(s) {\n  return createNativeInstantRecord(NativeTemporal.Instant.from(s));\n}\n\nfunction add(record, durationRecord) {\n  const native = getNativeInstant(record);\n  const durationNative = getNativeDuration(durationRecord);\n  return createNativeInstantRecord(native.add(durationNative));\n}\n\nfunction subtract(record, durationRecord) {\n  const native = getNativeInstant(record);\n  const durationNative = getNativeDuration(durationRecord);\n  return createNativeInstantRecord(native.subtract(durationNative));\n}\n\nfunction diff(record, otherRecord, options) {\n  const native = getNativeInstant(record);\n  const otherNative = getNativeInstant(otherRecord);\n  return createNativeDurationRecord(native.until(otherNative, options));\n}\n\nfunction equals(record, otherRecord) {\n  const native = getNativeInstant(record);\n  const otherNative = getNativeInstant(otherRecord);\n  return native.equals(otherNative);\n}\n\nfunction compare(record, otherRecord) {\n  const native = getNativeInstant(record);\n  const otherNative = getNativeInstant(otherRecord);\n  return NativeTemporal.Instant.compare(native, otherNative);\n}\n\nfunction toZonedDateTimeISO(record, timeZoneId) {\n  return createNativeZonedDateTimeRecord(getNativeInstant(record).toZonedDateTimeISO(timeZoneId));\n}\n\nconst createFormat = /*@__PURE__*/ createNativeDateTimeFormatFactory(getNativeInstant);\n\nfunction toLocaleString(record, locales, options) {\n  return getNativeInstant(record).toLocaleString(locales, options);\n}\n\nfunction toString(record, options) {\n  return getNativeInstant(record).toString(options);\n}\n\nfunction toBasicString(record) {\n  return getNativeInstant(record).toString();\n}\n\nconst toTemporal = getNativeInstant;\n\nfunction addHours(record, hours) {\n  return createNativeInstantRecord(getNativeInstant(record).add({\n    hours: hours\n  }));\n}\n\nfunction addMinutes(record, minutes) {\n  return createNativeInstantRecord(getNativeInstant(record).add({\n    minutes: minutes\n  }));\n}\n\nfunction addSeconds(record, seconds) {\n  return createNativeInstantRecord(getNativeInstant(record).add({\n    seconds: seconds\n  }));\n}\n\nfunction addMilliseconds(record, milliseconds) {\n  return createNativeInstantRecord(getNativeInstant(record).add({\n    milliseconds: milliseconds\n  }));\n}\n\nfunction addMicroseconds(record, microseconds) {\n  return createNativeInstantRecord(getNativeInstant(record).add({\n    microseconds: microseconds\n  }));\n}\n\nfunction addNanoseconds(record, nanoseconds) {\n  return createNativeInstantRecord(getNativeInstant(record).add({\n    nanoseconds: nanoseconds\n  }));\n}\n\nfunction subtractHours(record, hours) {\n  return createNativeInstantRecord(getNativeInstant(record).subtract({\n    hours: hours\n  }));\n}\n\nfunction subtractMinutes(record, minutes) {\n  return createNativeInstantRecord(getNativeInstant(record).subtract({\n    minutes: minutes\n  }));\n}\n\nfunction subtractSeconds(record, seconds) {\n  return createNativeInstantRecord(getNativeInstant(record).subtract({\n    seconds: seconds\n  }));\n}\n\nfunction subtractMilliseconds(record, milliseconds) {\n  return createNativeInstantRecord(getNativeInstant(record).subtract({\n    milliseconds: milliseconds\n  }));\n}\n\nfunction subtractMicroseconds(record, microseconds) {\n  return createNativeInstantRecord(getNativeInstant(record).subtract({\n    microseconds: microseconds\n  }));\n}\n\nfunction subtractNanoseconds(record, nanoseconds) {\n  return createNativeInstantRecord(getNativeInstant(record).subtract({\n    nanoseconds: nanoseconds\n  }));\n}\n\nfunction roundToUnit(smallestUnit, record, options) {\n  return ((record, options) => createNativeInstantRecord(getNativeInstant(record).round(options)))(record, createRoundToOptions(smallestUnit, options));\n}\n\nconst roundToHour = /*@__PURE__*/ bindArgs(roundToUnit, \"hour\");\n\nconst roundToMinute = /*@__PURE__*/ bindArgs(roundToUnit, \"minute\");\n\nconst roundToSecond = /*@__PURE__*/ bindArgs(roundToUnit, \"second\");\n\nconst roundToMillisecond = /*@__PURE__*/ bindArgs(roundToUnit, \"millisecond\");\n\nconst roundToMicrosecond = /*@__PURE__*/ bindArgs(roundToUnit, \"microsecond\");\n\nfunction diffHours(record0, record1, options) {\n  return TemporalUtils.diffHours(getNativeInstant(record0), getNativeInstant(record1), options);\n}\n\nfunction diffMinutes(record0, record1, options) {\n  return TemporalUtils.diffMinutes(getNativeInstant(record0), getNativeInstant(record1), options);\n}\n\nfunction diffSeconds(record0, record1, options) {\n  return TemporalUtils.diffSeconds(getNativeInstant(record0), getNativeInstant(record1), options);\n}\n\nfunction diffMilliseconds(record0, record1, options) {\n  return TemporalUtils.diffMilliseconds(getNativeInstant(record0), getNativeInstant(record1), options);\n}\n\nfunction diffMicroseconds(record0, record1, options) {\n  return TemporalUtils.diffMicroseconds(getNativeInstant(record0), getNativeInstant(record1), options);\n}\n\nfunction diffNanoseconds(record0, record1, options) {\n  return TemporalUtils.diffNanoseconds(getNativeInstant(record0), getNativeInstant(record1), options);\n}\n\nfunction timeZoneId() {\n  return NativeTemporal.Now.timeZoneId();\n}\n\nfunction instant() {\n  return createNativeInstantRecord(NativeTemporal.Now.instant());\n}\n\nfunction zonedDateTimeISO(timeZoneId) {\n  return createNativeZonedDateTimeRecord(NativeTemporal.Now.zonedDateTimeISO(timeZoneId));\n}\n\nfunction plainDateTimeISO(timeZoneId) {\n  return createNativePlainDateTimeRecord(NativeTemporal.Now.plainDateTimeISO(timeZoneId));\n}\n\nfunction plainDateISO(timeZoneId) {\n  return createNativePlainDateRecord(NativeTemporal.Now.plainDateISO(timeZoneId));\n}\n\nfunction plainTimeISO(timeZoneId) {\n  return createNativePlainTimeRecord(NativeTemporal.Now.plainTimeISO(timeZoneId));\n}\n\nexport { abs, add, add$1, add$4 as add$2, add$2 as add$3, add$5 as add$4, add$3 as add$5, add$6, addDays, addDays$2 as addDays$1, addDays$1 as addDays$2, addHours, addHours$1, addHours$2, addHours$3, addMicroseconds, addMicroseconds$1, addMicroseconds$2, addMicroseconds$3, addMilliseconds, addMilliseconds$1, addMilliseconds$2, addMilliseconds$3, addMinutes, addMinutes$1, addMinutes$2, addMinutes$3, addMonths, addMonths$3 as addMonths$1, addMonths$1 as addMonths$2, addMonths$2 as addMonths$3, addNanoseconds, addNanoseconds$1, addNanoseconds$2, addNanoseconds$3, addSeconds, addSeconds$1, addSeconds$2, addSeconds$3, addWeeks, addWeeks$2 as addWeeks$1, addWeeks$1 as addWeeks$2, addYears, addYears$3 as addYears$1, addYears$1 as addYears$2, addYears$2 as addYears$3, blank, compare, compare$1, compare$4 as compare$2, compare$2 as compare$3, compare$5 as compare$4, compare$3 as compare$5, compare$6, create, create$1, create$5 as create$2, create$2 as create$3, create$6 as create$4, create$3 as create$5, create$4 as create$6, create$7, createFormat, createFormat$4 as createFormat$1, createFormat$1 as createFormat$2, createFormat$5 as createFormat$3, createFormat$2 as createFormat$4, createFormat$3 as createFormat$5, dayOfWeek, dayOfWeek$2 as dayOfWeek$1, dayOfWeek$1 as dayOfWeek$2, dayOfYear, dayOfYear$2 as dayOfYear$1, dayOfYear$1 as dayOfYear$2, daysInMonth, daysInMonth$3 as daysInMonth$1, daysInMonth$1 as daysInMonth$2, daysInMonth$2 as daysInMonth$3, daysInWeek, daysInWeek$2 as daysInWeek$1, daysInWeek$1 as daysInWeek$2, daysInYear, daysInYear$3 as daysInYear$1, daysInYear$1 as daysInYear$2, daysInYear$2 as daysInYear$3, diff, diff$1, diff$4 as diff$2, diff$2 as diff$3, diff$5 as diff$4, diff$3 as diff$5, diffDays, diffDays$2 as diffDays$1, diffDays$1 as diffDays$2, diffHours, diffHours$1, diffHours$2, diffHours$3, diffMicroseconds, diffMicroseconds$1, diffMicroseconds$2, diffMicroseconds$3, diffMilliseconds, diffMilliseconds$1, diffMilliseconds$2, diffMilliseconds$3, diffMinutes, diffMinutes$1, diffMinutes$2, diffMinutes$3, diffMonths, diffMonths$3 as diffMonths$1, diffMonths$1 as diffMonths$2, diffMonths$2 as diffMonths$3, diffNanoseconds, diffNanoseconds$1, diffNanoseconds$2, diffNanoseconds$3, diffSeconds, diffSeconds$1, diffSeconds$2, diffSeconds$3, diffWeeks, diffWeeks$2 as diffWeeks$1, diffWeeks$1 as diffWeeks$2, diffYears, diffYears$3 as diffYears$1, diffYears$1 as diffYears$2, diffYears$2 as diffYears$3, endOfDay, endOfDay$1, endOfHour, endOfHour$1, endOfHour$2, endOfMicrosecond, endOfMicrosecond$1, endOfMicrosecond$2, endOfMillisecond, endOfMillisecond$1, endOfMillisecond$2, endOfMinute, endOfMinute$1, endOfMinute$2, endOfMonth, endOfMonth$2 as endOfMonth$1, endOfMonth$1 as endOfMonth$2, endOfSecond, endOfSecond$1, endOfSecond$2, endOfWeek, endOfWeek$2 as endOfWeek$1, endOfWeek$1 as endOfWeek$2, endOfYear, endOfYear$3 as endOfYear$1, endOfYear$1 as endOfYear$2, endOfYear$2 as endOfYear$3, equals, equals$1, equals$5 as equals$2, equals$2 as equals$3, equals$6 as equals$4, equals$3 as equals$5, equals$4 as equals$6, fromEpochMilliseconds, fromEpochNanoseconds, fromFields, fromFields$4 as fromFields$1, fromFields$1 as fromFields$2, fromFields$5 as fromFields$3, fromFields$2 as fromFields$4, fromFields$3 as fromFields$5, fromFields$6, fromString, fromString$1, fromString$5 as fromString$2, fromString$2 as fromString$3, fromString$6 as fromString$4, fromString$3 as fromString$5, fromString$4 as fromString$6, fromString$7, getTimeZoneTransition, hoursInDay, inLeapYear, inLeapYear$3 as inLeapYear$1, inLeapYear$1 as inLeapYear$2, inLeapYear$2 as inLeapYear$3, instant, monthsInYear, monthsInYear$3 as monthsInYear$1, monthsInYear$1 as monthsInYear$2, monthsInYear$2 as monthsInYear$3, negated, offset, offsetNanoseconds, plainDateISO, plainDateTimeISO, plainTimeISO, round$4 as round, roundToDay, roundToDay$1, roundToHour, roundToHour$1, roundToHour$2, roundToHour$3, roundToMicrosecond, roundToMicrosecond$1, roundToMicrosecond$2, roundToMicrosecond$3, roundToMillisecond, roundToMillisecond$1, roundToMillisecond$2, roundToMillisecond$3, roundToMinute, roundToMinute$1, roundToMinute$2, roundToMinute$3, roundToMonth, roundToMonth$2 as roundToMonth$1, roundToMonth$1 as roundToMonth$2, roundToSecond, roundToSecond$1, roundToSecond$2, roundToSecond$3, roundToWeek, roundToWeek$2 as roundToWeek$1, roundToWeek$1 as roundToWeek$2, roundToYear, roundToYear$3 as roundToYear$1, roundToYear$1 as roundToYear$2, roundToYear$2 as roundToYear$3, sign, startOfDay, startOfDay$1, startOfHour, startOfHour$1, startOfHour$2, startOfMicrosecond, startOfMicrosecond$1, startOfMicrosecond$2, startOfMillisecond, startOfMillisecond$1, startOfMillisecond$2, startOfMinute, startOfMinute$1, startOfMinute$2, startOfMonth, startOfMonth$2 as startOfMonth$1, startOfMonth$1 as startOfMonth$2, startOfSecond, startOfSecond$1, startOfSecond$2, startOfWeek, startOfWeek$2 as startOfWeek$1, startOfWeek$1 as startOfWeek$2, startOfYear, startOfYear$3 as startOfYear$1, startOfYear$1 as startOfYear$2, startOfYear$2 as startOfYear$3, subtract, subtract$1, subtract$4 as subtract$2, subtract$2 as subtract$3, subtract$5 as subtract$4, subtract$3 as subtract$5, subtract$6, subtractDays, subtractDays$2 as subtractDays$1, subtractDays$1 as subtractDays$2, subtractHours, subtractHours$1, subtractHours$2, subtractHours$3, subtractMicroseconds, subtractMicroseconds$1, subtractMicroseconds$2, subtractMicroseconds$3, subtractMilliseconds, subtractMilliseconds$1, subtractMilliseconds$2, subtractMilliseconds$3, subtractMinutes, subtractMinutes$1, subtractMinutes$2, subtractMinutes$3, subtractMonths, subtractMonths$3 as subtractMonths$1, subtractMonths$1 as subtractMonths$2, subtractMonths$2 as subtractMonths$3, subtractNanoseconds, subtractNanoseconds$1, subtractNanoseconds$2, subtractNanoseconds$3, subtractSeconds, subtractSeconds$1, subtractSeconds$2, subtractSeconds$3, subtractWeeks, subtractWeeks$2 as subtractWeeks$1, subtractWeeks$1 as subtractWeeks$2, subtractYears, subtractYears$3 as subtractYears$1, subtractYears$1 as subtractYears$2, subtractYears$2 as subtractYears$3, timeZoneId, toBasicString, toBasicString$1, toBasicString$5 as toBasicString$2, toBasicString$2 as toBasicString$3, toBasicString$6 as toBasicString$4, toBasicString$3 as toBasicString$5, toBasicString$4 as toBasicString$6, toBasicString$7, toInstant, toLocaleString, toLocaleString$1, toLocaleString$5 as toLocaleString$2, toLocaleString$2 as toLocaleString$3, toLocaleString$6 as toLocaleString$4, toLocaleString$3 as toLocaleString$5, toLocaleString$4 as toLocaleString$6, toLocaleString$7, toPlainDate, toPlainDate$3 as toPlainDate$1, toPlainDate$1 as toPlainDate$2, toPlainDate$2 as toPlainDate$3, toPlainDateTime, toPlainDateTime$1, toPlainMonthDay, toPlainTime, toPlainTime$1, toPlainYearMonth, toString, toString$1, toString$5 as toString$2, toString$2 as toString$3, toString$6 as toString$4, toString$3 as toString$5, toString$4 as toString$6, toString$7, toTemporal, toTemporal$1, toTemporal$5 as toTemporal$2, toTemporal$2 as toTemporal$3, toTemporal$6 as toTemporal$4, toTemporal$3 as toTemporal$5, toTemporal$4 as toTemporal$6, toTemporal$7, toZonedDateTime$1 as toZonedDateTime, toZonedDateTime as toZonedDateTime$1, toZonedDateTimeISO, total, weekOfYear, weekOfYear$2 as weekOfYear$1, weekOfYear$1 as weekOfYear$2, withCalendar, withCalendar$2 as withCalendar$1, withCalendar$1 as withCalendar$2, withDayOfMonth, withDayOfMonth$2 as withDayOfMonth$1, withDayOfMonth$1 as withDayOfMonth$2, withDayOfWeek, withDayOfWeek$2 as withDayOfWeek$1, withDayOfWeek$1 as withDayOfWeek$2, withDayOfYear, withDayOfYear$2 as withDayOfYear$1, withDayOfYear$1 as withDayOfYear$2, withFields, withFields$4 as withFields$1, withFields$1 as withFields$2, withFields$5 as withFields$3, withFields$2 as withFields$4, withFields$3 as withFields$5, withFields$6, withPlainTime, withPlainTime$1, withTimeZone, withWeekOfYear, withWeekOfYear$2 as withWeekOfYear$1, withWeekOfYear$1 as withWeekOfYear$2, yearOfWeek, yearOfWeek$2 as yearOfWeek$1, yearOfWeek$1 as yearOfWeek$2, zonedDateTimeISO };\n","import { defineTemporalClass, forbiddenValueOf, attachDebugString, withTimeFields, diffTimes, reversedMove, adaptRecordTimeUnitDiff, diffTimeNanoOfDayTimeUnit, dateFieldGetters, withDateTimeFields, diffDateTimes, moveToDayOfYear, moveToDayOfMonth, moveToDayOfWeek, moveToWeekOfYear, moveDateByYears, moveDateByMonths, diffDateTimeYears, diffDateTimeMonths, diffDateTimeWeeks, diffDateTimeDays, diffDateTimeEpochNanoTimeUnit, monthDayFieldGetters, withMonthDayFields, yearMonthFieldGetters, withYearMonthFields, diffYearMonths, diffYearMonthYears, diffYearMonthMonths, withDateFields, diffDates, diffDateYears, diffDateMonths, diffDateWeeks, diffDateDays, withZonedDateTimeFields, diffZonedDateTimes, diffZonedYears, diffZonedMonths, diffZonedWeeks, diffZonedDays, diffZonedEpochNanoTimeUnit, diffInstants, diffInstantEpochNanoTimeUnit } from \"./apiHelpers.js\";\n\nimport \"temporal-utils/protected-error-messages\";\n\nimport { toIntegerWithTrunc } from \"temporal-utils/protected\";\n\nimport { createDateTimeFormatShell, RawDateTimeFormat, durationGetters, formatDurationIsoAuto, validateDurationFields, mapProps, toStrictInteger, createDurationSlots, refineDurationObjectLike, parseDuration, mergeDurationFields, negateDuration, absDuration, addDurationsWithoutRelativeTo, roundDuration, totalDuration, compareDurations, formatDurationIso, throwTypeError, invalidRelativeTo, isoCalendarImpl, timeGetters, formatTimeIsoAuto, validateTimeFields, refinePlainTimeObjectLike, parsePlainTime, moveTime, negateDurationFields, plainTimesEqual, compareTimeFields, applyPlainFormatTimeZone, transformTimeOptions, timeFieldsToMilli, formatPlainTimeIso, bindArgs, nanoInHour, nanoInMinute, nanoInSec, nanoInMilli, nanoInMicro, moveTimeByNano, refineUnitRoundOptions, roundTimeToInc, computeNanoInc, getCalendarSlotId, formatDateTimeIsoAuto, checkIsoDateTimeInBounds, validateIsoDateTimeFields, createDateTimeSlots, refinePlainDateTimeObjectLike, parsePlainDateTime, createDateTimeFromRefinedFields, timeFieldDefaults, computeIsoDayOfWeek, computeCalendarWeekOfYear, computeCalendarYearOfWeek, computeCalendarDayOfYear, computeCalendarDaysInMonth, computeCalendarDaysInYear, computeCalendarMonthsInYear, computeCalendarInLeapYear, moveDateTime, refineOverflowOptions, plainDateTimesEqual, compareIsoDateTimeFields, transformDateTimeOptions, checkResolvedCalendarCompatible, isoDateTimeToEpochMilli, formatPlainDateTimeIso, dateTimeToZonedDateTime, refineEpochDisambigOptions, queryTimeZone, refineTimeZoneId, createDateSlots, createTimeSlots, moveDateByDays, epochNanoToIsoDateTime, isoDateTimeToEpochNano, combineDateAndTime, computeYearInterval, computeMonthInterval, computeIsoWeekInterval, computeYearFloor, computeMonthFloor, computeIsoWeekFloor, computeDayFloor, computeYearCeil, computeMonthCeil, computeIsoWeekCeil, moveDateTimeByNano, roundDateTimeToInterval, roundDateTimeToInc, formatMonthDayIsoAuto, isoEpochFirstLeapYear, checkIsoDateInBounds, validateIsoDateFields, refinePlainMonthDayObjectLike, parsePlainMonthDay, plainMonthDaysEqual, transformMonthDayOptions, isoDateToEpochMilli, formatPlainMonthDayIso, monthDayToDate, formatYearMonthIsoAuto, checkIsoYearMonthInBounds, refinePlainYearMonthObjectLike, parsePlainYearMonth, moveYearMonth, plainYearMonthsEqual, compareIsoDateFields, transformYearMonthOptions, formatPlainYearMonthIso, yearMonthToDate, moveYearMonthByUnits, validateDurationCalendarUnit, roundDateToInterval, formatDateIsoAuto, refinePlainDateObjectLike, parsePlainDate, moveDate, plainDatesEqual, transformDateOptions, formatPlainDateIso, dateToZonedDateTime, computeCalendarDateFields, createYearMonthFromCalendarParts, createMonthDayFromCalendarParts, epochNanoToMilli, formatZonedDateTimeIsoAuto, zonedEpochSlotsToIso, checkEpochNanoInBounds, toBigInt, refineZonedDateTimeObjectLike, parseZonedDateTime, createZonedEpochNanoSlots, zonedDateTimeWithPlainTime, formatOffsetNano, computeZonedHoursInDay, formatZonedDateTimeIso, moveZonedEpochSlots, computeZonedStartOfDay, refineDirectionOptions, zonedDateTimesEqual, compareZonedEpochSlots, applyZonedFormatTimeZone, getZonedTimeZoneId, transformZonedOptions, zonedDateTimeToInstant, zonedDateTimeToDateTime, zonedDateTimeToDate, zonedDateTimeToTime, roundZonedEpochToDay, alignZonedEpoch, getMatchingInstantFor, getSingleInstantFor, computeDayCeil, moveEpochNanoByNano, roundZonedEpochToInterval, roundZonedEpochToTime, formatInstantIsoAuto, epochMilliToInstant, epochNanoToInstant, parseInstant, createEpochNanoSlots, moveEpochNano, instantsEqual, instantToZonedDateTime, transformInstantOptions, formatInstantIso, bigNanoInHour, bigNanoInMinute, bigNanoInSec, bigNanoInMilli, bigNanoInMicro, roundBigNanoToDayOriginInc, computeBigNanoInc, getCurrentTimeZoneId, getCurrentEpochNano, getCurrentIsoDateTime } from \"./internal.js\";\n\nimport { DurationRecordBranding, getDurationSlots, getZonedDateTimeSlotsIfPresent, getPlainDateTimeSlotsIfPresent, getPlainDateSlotsIfPresent, setDurationSlots, getCalendarRecordImplCreator, PlainTimeRecordBranding, getPlainTimeSlots, validateBag, setPlainTimeSlots, PlainDateTimeRecordBranding, getPlainDateTimeSlots, getPlainTimeSlotsIfPresent, setPlainDateTimeSlots, PlainMonthDayRecordBranding, getPlainMonthDaySlots, setPlainMonthDaySlots, PlainYearMonthRecordBranding, getPlainYearMonthSlots, setPlainYearMonthSlots, PlainDateRecordBranding, getPlainDateSlots, setPlainDateSlots, ZonedDateTimeRecordBranding, getZonedDateTimeSlots, setZonedDateTimeSlots, InstantRecordBranding, getInstantSlots, setInstantSlots } from \"./funcApi.js\";\n\nfunction createDateTimeFormatFactory(createArgsProvider, transformOptions) {\n  const ShimDateTimeFormat = createDateTimeFormatShell(createArgsProvider, transformOptions);\n  return Object.setPrototypeOf(ShimDateTimeFormat.prototype, RawDateTimeFormat.prototype), \n  (locales, options) => new ShimDateTimeFormat(locales, options);\n}\n\nconst getShimDurationSlots = getDurationSlots;\n\nconst ShimDurationRecord = /*@__PURE__*/ defineTemporalClass(DurationRecordBranding, class {\n  toJSON() {\n    return formatDurationIsoAuto(getShimDurationSlots(this));\n  }\n  valueOf() {\n    return forbiddenValueOf();\n  }\n}, getShimDurationSlots, durationGetters);\n\nfunction createShimDurationRecord(slots) {\n  const instance = Object.create(ShimDurationRecord.prototype);\n  return setDurationSlots(instance, slots), attachDebugString(instance), instance;\n}\n\nfunction create$7(years = 0, months = 0, weeks = 0, days = 0, hours = 0, minutes = 0, seconds = 0, milliseconds = 0, microseconds = 0, nanoseconds = 0) {\n  const fields = validateDurationFields(mapProps(toStrictInteger, {\n    years: years,\n    months: months,\n    weeks: weeks,\n    days: days,\n    hours: hours,\n    minutes: minutes,\n    seconds: seconds,\n    milliseconds: milliseconds,\n    microseconds: microseconds,\n    nanoseconds: nanoseconds\n  }));\n  return createShimDurationRecord(createDurationSlots(fields));\n}\n\nfunction fromFields$6(fields) {\n  return createShimDurationRecord(refineDurationObjectLike(fields));\n}\n\nfunction fromString$7(s) {\n  return createShimDurationRecord(parseDuration(s));\n}\n\nfunction sign(duration) {\n  return getShimDurationSlots(duration).sign;\n}\n\nfunction blank(duration) {\n  return !getShimDurationSlots(duration).sign;\n}\n\nfunction withFields$6(duration, mod) {\n  const slots = getShimDurationSlots(duration);\n  return createShimDurationRecord(mergeDurationFields(slots, mod));\n}\n\nfunction negated(duration) {\n  const slots = getShimDurationSlots(duration);\n  return createShimDurationRecord(negateDuration(slots));\n}\n\nfunction abs(duration) {\n  const slots = getShimDurationSlots(duration);\n  return createShimDurationRecord(absDuration(slots));\n}\n\nfunction add$6(duration, otherDuration) {\n  const slots = getShimDurationSlots(duration);\n  const otherSlots = getShimDurationSlots(otherDuration);\n  return createShimDurationRecord(addDurationsWithoutRelativeTo(0, slots, otherSlots));\n}\n\nfunction subtract$6(duration, otherDuration) {\n  const slots = getShimDurationSlots(duration);\n  const otherSlots = getShimDurationSlots(otherDuration);\n  return createShimDurationRecord(addDurationsWithoutRelativeTo(1, slots, otherSlots));\n}\n\nfunction round(duration, options) {\n  const slots = getShimDurationSlots(duration);\n  return createShimDurationRecord(roundDuration(refineRelativeTo, slots, options));\n}\n\nfunction total(duration, options) {\n  return totalDuration(refineRelativeTo, getShimDurationSlots(duration), options);\n}\n\nfunction compare$6(duration, otherDuration, options) {\n  const slots = getShimDurationSlots(duration);\n  const otherSlots = getShimDurationSlots(otherDuration);\n  return compareDurations(refineRelativeTo, slots, otherSlots, options);\n}\n\nfunction toLocaleString$7(duration, locales, options) {\n  const slots = getShimDurationSlots(duration);\n  return Intl.DurationFormat ? new Intl.DurationFormat(locales, options).format(slots) : formatDurationIso(slots, options);\n}\n\nfunction toString$7(duration, options) {\n  return formatDurationIso(getShimDurationSlots(duration), options);\n}\n\nfunction toBasicString$7(duration) {\n  return formatDurationIsoAuto(getShimDurationSlots(duration));\n}\n\nfunction toTemporal$7(duration) {\n  const slots = getShimDurationSlots(duration);\n  return new Temporal.Duration(slots.years, slots.months, slots.weeks, slots.days, slots.hours, slots.minutes, slots.seconds, slots.milliseconds, slots.microseconds, slots.nanoseconds);\n}\n\nfunction refineRelativeTo(arg) {\n  if (arg) {\n    const slots = getZonedDateTimeSlotsIfPresent(arg) || getPlainDateTimeSlotsIfPresent(arg) || getPlainDateSlotsIfPresent(arg);\n    if (slots) {\n      return slots;\n    }\n    throwTypeError(invalidRelativeTo(arg));\n  }\n}\n\nfunction refineShimCalendarArgMaybe(calendarRecord) {\n  return void 0 === calendarRecord ? isoCalendarImpl : getCalendarRecordImpl(calendarRecord);\n}\n\nfunction createShimCalendarStringResolver(getCalendarRecord) {\n  return calendarId => getCalendarRecordImpl(getCalendarRecord(calendarId.toLowerCase()));\n}\n\nfunction getCalendarRecordImpl(record) {\n  return getCalendarRecordImplCreator(record)();\n}\n\nconst getShimPlainTimeSlots = getPlainTimeSlots;\n\nconst ShimPlainTimeRecord = /*@__PURE__*/ defineTemporalClass(PlainTimeRecordBranding, class {\n  toJSON() {\n    return formatTimeIsoAuto(getShimPlainTimeSlots(this));\n  }\n  valueOf() {\n    return forbiddenValueOf();\n  }\n}, getShimPlainTimeSlots, timeGetters);\n\nfunction createShimPlainTimeRecord(slots) {\n  const instance = Object.create(ShimPlainTimeRecord.prototype);\n  return setPlainTimeSlots(instance, slots), attachDebugString(instance), instance;\n}\n\nfunction create$6(hour = 0, minute = 0, second = 0, millisecond = 0, microsecond = 0, nanosecond = 0) {\n  return createShimPlainTimeRecord(validateTimeFields(mapProps(toIntegerWithTrunc, {\n    hour: hour,\n    minute: minute,\n    second: second,\n    millisecond: millisecond,\n    microsecond: microsecond,\n    nanosecond: nanosecond\n  })));\n}\n\nfunction fromFields$5(fields, options) {\n  return createShimPlainTimeRecord(refinePlainTimeObjectLike(fields, options));\n}\n\nfunction fromString$6(s) {\n  return createShimPlainTimeRecord(parsePlainTime(s));\n}\n\nfunction withFields$5(record, mod, options) {\n  return createShimPlainTimeRecord(withTimeFields(getShimPlainTimeSlots(record), validateBag(mod), options));\n}\n\nfunction add$5(record, durationRecord) {\n  const slots = getShimPlainTimeSlots(record);\n  const durationSlots = getShimDurationSlots(durationRecord);\n  return createShimPlainTimeRecord(moveTime(slots, durationSlots)[0]);\n}\n\nfunction subtract$5(record, durationRecord) {\n  const slots = getShimPlainTimeSlots(record);\n  const durationSlots = getShimDurationSlots(durationRecord);\n  return createShimPlainTimeRecord(moveTime(slots, negateDurationFields(durationSlots))[0]);\n}\n\nfunction diff$5(record, otherRecord, options) {\n  const slots = getShimPlainTimeSlots(record);\n  const otherSlots = getShimPlainTimeSlots(otherRecord);\n  return createShimDurationRecord(diffTimes(0, slots, otherSlots, options));\n}\n\nfunction equals$6(record, otherRecord) {\n  const slots = getShimPlainTimeSlots(record);\n  const otherSlots = getShimPlainTimeSlots(otherRecord);\n  return plainTimesEqual(slots, otherSlots);\n}\n\nfunction compare$5(record, otherRecord) {\n  const slots = getShimPlainTimeSlots(record);\n  const otherSlots = getShimPlainTimeSlots(otherRecord);\n  return compareTimeFields(slots, otherSlots);\n}\n\nconst createFormat$5 = /*@__PURE__*/ createDateTimeFormatFactory(internals => ({\n  A(record) {\n    const slots = getShimPlainTimeSlots(record);\n    return [ internals.t, timeFieldsToMilli(slots) ];\n  },\n  v(record0, record1) {\n    const slots0 = getShimPlainTimeSlots(record0);\n    const slots1 = getShimPlainTimeSlots(record1);\n    return [ internals.t, timeFieldsToMilli(slots0), timeFieldsToMilli(slots1) ];\n  }\n}), options => applyPlainFormatTimeZone(transformTimeOptions(options, 1)));\n\nfunction toLocaleString$6(record, locales = void 0, options = {}) {\n  const slots = getShimPlainTimeSlots(record);\n  return new RawDateTimeFormat(locales, applyPlainFormatTimeZone(transformTimeOptions(options))).format(timeFieldsToMilli(slots));\n}\n\nfunction toString$6(record, options) {\n  return formatPlainTimeIso(getShimPlainTimeSlots(record), options);\n}\n\nfunction toBasicString$6(record) {\n  return formatTimeIsoAuto(getShimPlainTimeSlots(record));\n}\n\nfunction toTemporal$6(record) {\n  const slots = getShimPlainTimeSlots(record);\n  return new Temporal.PlainTime(slots.hour, slots.minute, slots.second, slots.millisecond, slots.microsecond, slots.nanosecond);\n}\n\nfunction moveByTimeUnit$2(nanoInUnit, record, units) {\n  const slots = getShimPlainTimeSlots(record);\n  const delta = BigInt(toStrictInteger(units)) * BigInt(nanoInUnit);\n  return createShimPlainTimeRecord(moveTimeByNano(slots, delta)[0]);\n}\n\nconst addHours$3 = /*@__PURE__*/ bindArgs(moveByTimeUnit$2, nanoInHour);\n\nconst addMinutes$3 = /*@__PURE__*/ bindArgs(moveByTimeUnit$2, nanoInMinute);\n\nconst addSeconds$3 = /*@__PURE__*/ bindArgs(moveByTimeUnit$2, nanoInSec);\n\nconst addMilliseconds$3 = /*@__PURE__*/ bindArgs(moveByTimeUnit$2, nanoInMilli);\n\nconst addMicroseconds$3 = /*@__PURE__*/ bindArgs(moveByTimeUnit$2, nanoInMicro);\n\nconst addNanoseconds$3 = /*@__PURE__*/ bindArgs(moveByTimeUnit$2, 1);\n\nconst subtractHours$3 = /*@__PURE__*/ reversedMove(addHours$3);\n\nconst subtractMinutes$3 = /*@__PURE__*/ reversedMove(addMinutes$3);\n\nconst subtractSeconds$3 = /*@__PURE__*/ reversedMove(addSeconds$3);\n\nconst subtractMilliseconds$3 = /*@__PURE__*/ reversedMove(addMilliseconds$3);\n\nconst subtractMicroseconds$3 = /*@__PURE__*/ reversedMove(addMicroseconds$3);\n\nconst subtractNanoseconds$3 = /*@__PURE__*/ reversedMove(addNanoseconds$3);\n\nfunction roundToUnit$1(smallestUnit, record, options) {\n  const slots = getShimPlainTimeSlots(record);\n  const [roundingInc, roundingMode] = refineUnitRoundOptions(smallestUnit, options);\n  return createShimPlainTimeRecord(roundTimeToInc(slots, computeNanoInc(smallestUnit, roundingInc), roundingMode)[0]);\n}\n\nconst roundToHour$3 = /*@__PURE__*/ bindArgs(roundToUnit$1, 5);\n\nconst roundToMinute$3 = /*@__PURE__*/ bindArgs(roundToUnit$1, 4);\n\nconst roundToSecond$3 = /*@__PURE__*/ bindArgs(roundToUnit$1, 3);\n\nconst roundToMillisecond$3 = /*@__PURE__*/ bindArgs(roundToUnit$1, 2);\n\nconst roundToMicrosecond$3 = /*@__PURE__*/ bindArgs(roundToUnit$1, 1);\n\nfunction startOfHour$2(record) {\n  return createShimPlainTimeRecord({\n    ...getShimPlainTimeSlots(record),\n    minute: 0,\n    second: 0,\n    millisecond: 0,\n    microsecond: 0,\n    nanosecond: 0\n  });\n}\n\nfunction startOfMinute$2(record) {\n  return createShimPlainTimeRecord({\n    ...getShimPlainTimeSlots(record),\n    second: 0,\n    millisecond: 0,\n    microsecond: 0,\n    nanosecond: 0\n  });\n}\n\nfunction startOfSecond$2(record) {\n  return createShimPlainTimeRecord({\n    ...getShimPlainTimeSlots(record),\n    millisecond: 0,\n    microsecond: 0,\n    nanosecond: 0\n  });\n}\n\nfunction startOfMillisecond$2(record) {\n  return createShimPlainTimeRecord({\n    ...getShimPlainTimeSlots(record),\n    microsecond: 0,\n    nanosecond: 0\n  });\n}\n\nfunction startOfMicrosecond$2(record) {\n  return createShimPlainTimeRecord({\n    ...getShimPlainTimeSlots(record),\n    nanosecond: 0\n  });\n}\n\nfunction endOfHour$2(record) {\n  return createShimPlainTimeRecord({\n    ...getShimPlainTimeSlots(record),\n    minute: 59,\n    second: 59,\n    millisecond: 999,\n    microsecond: 999,\n    nanosecond: 999\n  });\n}\n\nfunction endOfMinute$2(record) {\n  return createShimPlainTimeRecord({\n    ...getShimPlainTimeSlots(record),\n    second: 59,\n    millisecond: 999,\n    microsecond: 999,\n    nanosecond: 999\n  });\n}\n\nfunction endOfSecond$2(record) {\n  return createShimPlainTimeRecord({\n    ...getShimPlainTimeSlots(record),\n    millisecond: 999,\n    microsecond: 999,\n    nanosecond: 999\n  });\n}\n\nfunction endOfMillisecond$2(record) {\n  return createShimPlainTimeRecord({\n    ...getShimPlainTimeSlots(record),\n    microsecond: 999,\n    nanosecond: 999\n  });\n}\n\nfunction endOfMicrosecond$2(record) {\n  return createShimPlainTimeRecord({\n    ...getShimPlainTimeSlots(record),\n    nanosecond: 999\n  });\n}\n\nconst diffRecordTimeUnit$3 = /*@__PURE__*/ adaptRecordTimeUnitDiff(diffTimeNanoOfDayTimeUnit, getShimPlainTimeSlots);\n\nconst diffHours$3 = /*@__PURE__*/ bindArgs(diffRecordTimeUnit$3, 5);\n\nconst diffMinutes$3 = /*@__PURE__*/ bindArgs(diffRecordTimeUnit$3, 4);\n\nconst diffSeconds$3 = /*@__PURE__*/ bindArgs(diffRecordTimeUnit$3, 3);\n\nconst diffMilliseconds$3 = /*@__PURE__*/ bindArgs(diffRecordTimeUnit$3, 2);\n\nconst diffMicroseconds$3 = /*@__PURE__*/ bindArgs(diffRecordTimeUnit$3, 1);\n\nconst diffNanoseconds$3 = /*@__PURE__*/ bindArgs(diffRecordTimeUnit$3, 0);\n\nconst getShimPlainDateTimeSlots = getPlainDateTimeSlots;\n\nconst ShimPlainDateTimeRecord = /*@__PURE__*/ defineTemporalClass(PlainDateTimeRecordBranding, class {\n  get calendarId() {\n    return getCalendarSlotId(getShimPlainDateTimeSlots(this).calendar);\n  }\n  toJSON() {\n    return formatDateTimeIsoAuto(getShimPlainDateTimeSlots(this));\n  }\n  valueOf() {\n    return forbiddenValueOf();\n  }\n}, getShimPlainDateTimeSlots, dateFieldGetters, timeGetters);\n\nfunction createShimPlainDateTimeRecord(slots) {\n  const instance = Object.create(ShimPlainDateTimeRecord.prototype);\n  return setPlainDateTimeSlots(instance, slots), attachDebugString(instance), instance;\n}\n\nfunction create$5(isoYear, isoMonth, isoDay, hour = 0, minute = 0, second = 0, millisecond = 0, microsecond = 0, nanosecond = 0, calendar) {\n  const fields = checkIsoDateTimeInBounds(validateIsoDateTimeFields(mapProps(toIntegerWithTrunc, {\n    year: isoYear,\n    month: isoMonth,\n    day: isoDay,\n    hour: hour,\n    minute: minute,\n    second: second,\n    millisecond: millisecond,\n    microsecond: microsecond,\n    nanosecond: nanosecond\n  })));\n  const calendarImpl = refineShimCalendarArgMaybe(calendar);\n  return createShimPlainDateTimeRecord(createDateTimeSlots(fields, calendarImpl));\n}\n\nfunction fromFields$4(fields, options) {\n  const calendarImpl = refineShimCalendarArgMaybe(fields.calendar);\n  return createShimPlainDateTimeRecord(refinePlainDateTimeObjectLike(calendarImpl, fields, options));\n}\n\nfunction fromString$5(s, getCalendarRecord) {\n  return createShimPlainDateTimeRecord(parsePlainDateTime(s, createShimCalendarStringResolver(getCalendarRecord)));\n}\n\nfunction withCalendar$2(record, inputCalendar) {\n  const slots = getShimPlainDateTimeSlots(record);\n  const calendarImpl = getCalendarRecordImpl(inputCalendar);\n  return createShimPlainDateTimeRecord(createDateTimeSlots(slots, calendarImpl));\n}\n\nfunction withFields$4(record, mod, options) {\n  return createShimPlainDateTimeRecord(withDateTimeFields(getShimPlainDateTimeSlots(record), validateBag(mod), options));\n}\n\nfunction withPlainTime$1(record, plainTimeRecord = timeFieldDefaults) {\n  const slots = getShimPlainDateTimeSlots(record);\n  const timeFields = getPlainTimeSlotsIfPresent(plainTimeRecord) || plainTimeRecord;\n  return createShimPlainDateTimeRecord(createDateTimeFromRefinedFields(slots, timeFields, slots.calendar));\n}\n\nfunction dayOfWeek$2(record) {\n  return computeIsoDayOfWeek(getShimPlainDateTimeSlots(record));\n}\n\nfunction daysInWeek$2(record) {\n  return getShimPlainDateTimeSlots(record), 7;\n}\n\nfunction weekOfYear$2(record) {\n  const slots = getShimPlainDateTimeSlots(record);\n  return computeCalendarWeekOfYear(slots.calendar, slots);\n}\n\nfunction yearOfWeek$2(record) {\n  const slots = getShimPlainDateTimeSlots(record);\n  return computeCalendarYearOfWeek(slots.calendar, slots);\n}\n\nfunction dayOfYear$2(record) {\n  const slots = getShimPlainDateTimeSlots(record);\n  return computeCalendarDayOfYear(slots.calendar, slots);\n}\n\nfunction daysInMonth$3(record) {\n  const slots = getShimPlainDateTimeSlots(record);\n  return computeCalendarDaysInMonth(slots.calendar, slots);\n}\n\nfunction daysInYear$3(record) {\n  const slots = getShimPlainDateTimeSlots(record);\n  return computeCalendarDaysInYear(slots.calendar, slots);\n}\n\nfunction monthsInYear$3(record) {\n  const slots = getShimPlainDateTimeSlots(record);\n  return computeCalendarMonthsInYear(slots.calendar, slots);\n}\n\nfunction inLeapYear$3(record) {\n  const slots = getShimPlainDateTimeSlots(record);\n  return computeCalendarInLeapYear(slots.calendar, slots);\n}\n\nfunction add$4(record, durationRecord, options) {\n  const slots = getShimPlainDateTimeSlots(record);\n  const durationSlots = getShimDurationSlots(durationRecord);\n  return createShimPlainDateTimeRecord(createDateTimeSlots(moveDateTime(slots.calendar, slots, durationSlots, refineOverflowOptions(options)), slots.calendar));\n}\n\nfunction subtract$4(record, durationRecord, options) {\n  const slots = getShimPlainDateTimeSlots(record);\n  const durationSlots = getShimDurationSlots(durationRecord);\n  return createShimPlainDateTimeRecord(createDateTimeSlots(moveDateTime(slots.calendar, slots, negateDurationFields(durationSlots), refineOverflowOptions(options)), slots.calendar));\n}\n\nfunction diff$4(record, otherRecord, options) {\n  const slots = getShimPlainDateTimeSlots(record);\n  const otherSlots = getShimPlainDateTimeSlots(otherRecord);\n  return createShimDurationRecord(diffDateTimes(0, slots, otherSlots, options));\n}\n\nfunction equals$5(record, otherRecord) {\n  const slots = getShimPlainDateTimeSlots(record);\n  const otherSlots = getShimPlainDateTimeSlots(otherRecord);\n  return plainDateTimesEqual(slots, otherSlots);\n}\n\nfunction compare$4(record, otherRecord) {\n  const slots = getShimPlainDateTimeSlots(record);\n  const otherSlots = getShimPlainDateTimeSlots(otherRecord);\n  return compareIsoDateTimeFields(slots, otherSlots);\n}\n\nconst createFormat$4 = /*@__PURE__*/ createDateTimeFormatFactory(internals => ({\n  A(record) {\n    const slots = getShimPlainDateTimeSlots(record);\n    const format = internals.t;\n    return checkResolvedCalendarCompatible(format, slots), [ format, isoDateTimeToEpochMilli(slots) ];\n  },\n  v(record0, record1) {\n    const slots0 = getShimPlainDateTimeSlots(record0);\n    const slots1 = getShimPlainDateTimeSlots(record1);\n    const format = internals.t;\n    return checkResolvedCalendarCompatible(format, slots0), checkResolvedCalendarCompatible(format, slots1), \n    [ format, isoDateTimeToEpochMilli(slots0), isoDateTimeToEpochMilli(slots1) ];\n  }\n}), options => applyPlainFormatTimeZone(transformDateTimeOptions(options, 1)));\n\nfunction toLocaleString$5(record, locales = void 0, options = {}) {\n  const slots = getShimPlainDateTimeSlots(record);\n  const format = new RawDateTimeFormat(locales, applyPlainFormatTimeZone(transformDateTimeOptions(options)));\n  return checkResolvedCalendarCompatible(format, slots), format.format(isoDateTimeToEpochMilli(slots));\n}\n\nfunction toString$5(record, options) {\n  return formatPlainDateTimeIso(getShimPlainDateTimeSlots(record), options);\n}\n\nfunction toBasicString$5(record) {\n  return formatDateTimeIsoAuto(getShimPlainDateTimeSlots(record));\n}\n\nfunction toZonedDateTime$1(record, timeZoneId, options) {\n  return createShimZonedDateTimeRecord(dateTimeToZonedDateTime(getShimPlainDateTimeSlots(record), queryTimeZone(refineTimeZoneId(timeZoneId)), refineEpochDisambigOptions(options)));\n}\n\nfunction toPlainDate$3(record) {\n  const slots = getShimPlainDateTimeSlots(record);\n  return createShimPlainDateRecord(createDateSlots(slots, slots.calendar));\n}\n\nfunction toPlainTime$1(record) {\n  return createShimPlainTimeRecord(createTimeSlots(getShimPlainDateTimeSlots(record)));\n}\n\nfunction toTemporal$5(record) {\n  const slots = getShimPlainDateTimeSlots(record);\n  return new Temporal.PlainDateTime(slots.year, slots.month, slots.day, slots.hour, slots.minute, slots.second, slots.millisecond, slots.microsecond, slots.nanosecond, getCalendarSlotId(slots.calendar));\n}\n\nfunction withDayOfYear$2(record, dayOfYear, options) {\n  const slots = getShimPlainDateTimeSlots(record);\n  return createShimPlainDateTimeRecord(createDateTimeFromRefinedFields(moveToDayOfYear(slots.calendar, slots, dayOfYear, options), slots, slots.calendar));\n}\n\nfunction withDayOfMonth$2(record, dayOfMonth, options) {\n  const slots = getShimPlainDateTimeSlots(record);\n  return createShimPlainDateTimeRecord(createDateTimeFromRefinedFields(moveToDayOfMonth(slots.calendar, slots, dayOfMonth, options), slots, slots.calendar));\n}\n\nfunction withDayOfWeek$2(record, dayOfWeek, options) {\n  const slots = getShimPlainDateTimeSlots(record);\n  return createShimPlainDateTimeRecord(createDateTimeFromRefinedFields(moveToDayOfWeek(slots.calendar, slots, dayOfWeek, options), slots, slots.calendar));\n}\n\nfunction withWeekOfYear$2(record, weekOfYear, options) {\n  const slots = getShimPlainDateTimeSlots(record);\n  return createShimPlainDateTimeRecord(createDateTimeFromRefinedFields(moveToWeekOfYear(slots.calendar, slots, weekOfYear, options), slots, slots.calendar));\n}\n\nfunction addYears$3(record, years, options) {\n  const slots = getShimPlainDateTimeSlots(record);\n  return createShimPlainDateTimeRecord(createDateTimeFromRefinedFields(moveDateByYears(slots.calendar, slots, years, options), slots, slots.calendar));\n}\n\nfunction addMonths$3(record, months, options) {\n  const slots = getShimPlainDateTimeSlots(record);\n  return createShimPlainDateTimeRecord(createDateTimeFromRefinedFields(moveDateByMonths(slots.calendar, slots, months, options), slots, slots.calendar));\n}\n\nfunction addWeeks$2(record, weeks) {\n  const slots = getShimPlainDateTimeSlots(record);\n  return createShimPlainDateTimeRecord(createDateTimeFromRefinedFields(moveDateByDays(slots, 7 * toStrictInteger(weeks)), slots, slots.calendar));\n}\n\nfunction addDays$2(record, days) {\n  const slots = getShimPlainDateTimeSlots(record);\n  return createShimPlainDateTimeRecord(createDateTimeFromRefinedFields(moveDateByDays(slots, toStrictInteger(days)), slots, slots.calendar));\n}\n\nconst addHours$2 = /*@__PURE__*/ bindArgs(moveByTimeUnit$1, nanoInHour);\n\nconst addMinutes$2 = /*@__PURE__*/ bindArgs(moveByTimeUnit$1, nanoInMinute);\n\nconst addSeconds$2 = /*@__PURE__*/ bindArgs(moveByTimeUnit$1, nanoInSec);\n\nconst addMilliseconds$2 = /*@__PURE__*/ bindArgs(moveByTimeUnit$1, nanoInMilli);\n\nconst addMicroseconds$2 = /*@__PURE__*/ bindArgs(moveByTimeUnit$1, nanoInMicro);\n\nconst addNanoseconds$2 = /*@__PURE__*/ bindArgs(moveByTimeUnit$1, 1);\n\nconst subtractYears$3 = /*@__PURE__*/ reversedMove(addYears$3);\n\nconst subtractMonths$3 = /*@__PURE__*/ reversedMove(addMonths$3);\n\nconst subtractWeeks$2 = /*@__PURE__*/ reversedMove(addWeeks$2);\n\nconst subtractDays$2 = /*@__PURE__*/ reversedMove(addDays$2);\n\nconst subtractHours$2 = /*@__PURE__*/ reversedMove(addHours$2);\n\nconst subtractMinutes$2 = /*@__PURE__*/ reversedMove(addMinutes$2);\n\nconst subtractSeconds$2 = /*@__PURE__*/ reversedMove(addSeconds$2);\n\nconst subtractMilliseconds$2 = /*@__PURE__*/ reversedMove(addMilliseconds$2);\n\nconst subtractMicroseconds$2 = /*@__PURE__*/ reversedMove(addMicroseconds$2);\n\nconst subtractNanoseconds$2 = /*@__PURE__*/ reversedMove(addNanoseconds$2);\n\nconst roundToYear$3 = /*@__PURE__*/ bindArgs(roundToInterval$2, 9, computeYearInterval);\n\nconst roundToMonth$2 = /*@__PURE__*/ bindArgs(roundToInterval$2, 8, computeMonthInterval);\n\nconst roundToWeek$2 = /*@__PURE__*/ bindArgs(roundToInterval$2, 7, computeIsoWeekInterval);\n\nfunction roundToDayTimeUnit(smallestUnit, record, options) {\n  const slots = getShimPlainDateTimeSlots(record);\n  const [roundingInc, roundingMode] = refineUnitRoundOptions(smallestUnit, options);\n  return createShimPlainDateTimeRecord(createDateTimeSlots(roundDateTimeToInc(slots, computeNanoInc(smallestUnit, roundingInc), roundingMode), slots.calendar));\n}\n\nconst roundToDay$1 = /*@__PURE__*/ bindArgs(roundToDayTimeUnit, 6);\n\nconst roundToHour$2 = /*@__PURE__*/ bindArgs(roundToDayTimeUnit, 5);\n\nconst roundToMinute$2 = /*@__PURE__*/ bindArgs(roundToDayTimeUnit, 4);\n\nconst roundToSecond$2 = /*@__PURE__*/ bindArgs(roundToDayTimeUnit, 3);\n\nconst roundToMillisecond$2 = /*@__PURE__*/ bindArgs(roundToDayTimeUnit, 2);\n\nconst roundToMicrosecond$2 = /*@__PURE__*/ bindArgs(roundToDayTimeUnit, 1);\n\nconst startOfYear$3 = /*@__PURE__*/ aligned$2(computeYearFloor);\n\nconst startOfMonth$2 = /*@__PURE__*/ aligned$2(computeMonthFloor);\n\nconst startOfWeek$2 = /*@__PURE__*/ aligned$2(computeIsoWeekFloor);\n\nconst startOfDay$1 = /*@__PURE__*/ alignedDateTimeStart(computeDayFloor);\n\nconst startOfHour$1 = /*@__PURE__*/ alignedTimeStart(slots => ({\n  hour: slots.hour,\n  minute: 0,\n  second: 0,\n  millisecond: 0,\n  microsecond: 0,\n  nanosecond: 0\n}));\n\nconst startOfMinute$1 = /*@__PURE__*/ alignedTimeStart(slots => ({\n  hour: slots.hour,\n  minute: slots.minute,\n  second: 0,\n  millisecond: 0,\n  microsecond: 0,\n  nanosecond: 0\n}));\n\nconst startOfSecond$1 = /*@__PURE__*/ alignedTimeStart(slots => ({\n  hour: slots.hour,\n  minute: slots.minute,\n  second: slots.second,\n  millisecond: 0,\n  microsecond: 0,\n  nanosecond: 0\n}));\n\nconst startOfMillisecond$1 = /*@__PURE__*/ alignedTimeStart(slots => ({\n  hour: slots.hour,\n  minute: slots.minute,\n  second: slots.second,\n  millisecond: slots.millisecond,\n  microsecond: 0,\n  nanosecond: 0\n}));\n\nconst startOfMicrosecond$1 = /*@__PURE__*/ alignedTimeStart(slots => ({\n  hour: slots.hour,\n  minute: slots.minute,\n  second: slots.second,\n  millisecond: slots.millisecond,\n  microsecond: slots.microsecond,\n  nanosecond: 0\n}));\n\nconst endOfYear$3 = /*@__PURE__*/ aligned$2(computeYearCeil, -1);\n\nconst endOfMonth$2 = /*@__PURE__*/ aligned$2(computeMonthCeil, -1);\n\nconst endOfWeek$2 = /*@__PURE__*/ aligned$2(computeIsoWeekCeil, -1);\n\nconst endOfDay$1 = /*@__PURE__*/ alignedTimeEnd(() => ({\n  hour: 23,\n  minute: 59,\n  second: 59,\n  millisecond: 999,\n  microsecond: 999,\n  nanosecond: 999\n}));\n\nconst endOfHour$1 = /*@__PURE__*/ alignedTimeEnd(slots => ({\n  hour: slots.hour,\n  minute: 59,\n  second: 59,\n  millisecond: 999,\n  microsecond: 999,\n  nanosecond: 999\n}));\n\nconst endOfMinute$1 = /*@__PURE__*/ alignedTimeEnd(slots => ({\n  hour: slots.hour,\n  minute: slots.minute,\n  second: 59,\n  millisecond: 999,\n  microsecond: 999,\n  nanosecond: 999\n}));\n\nconst endOfSecond$1 = /*@__PURE__*/ alignedTimeEnd(slots => ({\n  hour: slots.hour,\n  minute: slots.minute,\n  second: slots.second,\n  millisecond: 999,\n  microsecond: 999,\n  nanosecond: 999\n}));\n\nconst endOfMillisecond$1 = /*@__PURE__*/ alignedTimeEnd(slots => ({\n  hour: slots.hour,\n  minute: slots.minute,\n  second: slots.second,\n  millisecond: slots.millisecond,\n  microsecond: 999,\n  nanosecond: 999\n}));\n\nconst endOfMicrosecond$1 = /*@__PURE__*/ alignedTimeEnd(slots => ({\n  hour: slots.hour,\n  minute: slots.minute,\n  second: slots.second,\n  millisecond: slots.millisecond,\n  microsecond: slots.microsecond,\n  nanosecond: 999\n}));\n\nfunction diffYears$3(record0, record1, options) {\n  return diffDateTimeYears(getShimPlainDateTimeSlots(record0), getShimPlainDateTimeSlots(record1), options);\n}\n\nfunction diffMonths$3(record0, record1, options) {\n  return diffDateTimeMonths(getShimPlainDateTimeSlots(record0), getShimPlainDateTimeSlots(record1), options);\n}\n\nfunction diffWeeks$2(record0, record1, options) {\n  return diffDateTimeWeeks(getShimPlainDateTimeSlots(record0), getShimPlainDateTimeSlots(record1), options);\n}\n\nfunction diffDays$2(record0, record1, options) {\n  return diffDateTimeDays(getShimPlainDateTimeSlots(record0), getShimPlainDateTimeSlots(record1), options);\n}\n\nconst diffRecordTimeUnit$2 = /*@__PURE__*/ adaptRecordTimeUnitDiff(diffDateTimeEpochNanoTimeUnit, getShimPlainDateTimeSlots);\n\nconst diffHours$2 = /*@__PURE__*/ bindArgs(diffRecordTimeUnit$2, 5);\n\nconst diffMinutes$2 = /*@__PURE__*/ bindArgs(diffRecordTimeUnit$2, 4);\n\nconst diffSeconds$2 = /*@__PURE__*/ bindArgs(diffRecordTimeUnit$2, 3);\n\nconst diffMilliseconds$2 = /*@__PURE__*/ bindArgs(diffRecordTimeUnit$2, 2);\n\nconst diffMicroseconds$2 = /*@__PURE__*/ bindArgs(diffRecordTimeUnit$2, 1);\n\nconst diffNanoseconds$2 = /*@__PURE__*/ bindArgs(diffRecordTimeUnit$2, 0);\n\nfunction moveByTimeUnit$1(nanoInUnit, record, units) {\n  const slots = getShimPlainDateTimeSlots(record);\n  const delta = BigInt(toStrictInteger(units)) * BigInt(nanoInUnit);\n  return createShimPlainDateTimeRecord(createDateTimeSlots(moveDateTimeByNano(slots, delta), slots.calendar));\n}\n\nfunction roundToInterval$2(unit, computeInterval, record, options) {\n  const slots = getShimPlainDateTimeSlots(record);\n  const [, roundingMode] = refineUnitRoundOptions(unit, options);\n  const isoDateTime = roundDateTimeToInterval(computeInterval, slots.calendar, slots, roundingMode);\n  return createShimPlainDateTimeRecord(createDateTimeFromRefinedFields(isoDateTime, isoDateTime, slots.calendar));\n}\n\nfunction aligned$2(computeAlignment, nanoDelta = 0) {\n  return record => {\n    const slots = getShimPlainDateTimeSlots(record);\n    let isoDateTime = computeAlignment(slots.calendar, slots);\n    return nanoDelta && (isoDateTime = epochNanoToIsoDateTime(isoDateTimeToEpochNano(isoDateTime) + BigInt(nanoDelta))), \n    createShimPlainDateTimeRecord(createDateTimeFromRefinedFields(isoDateTime, isoDateTime, slots.calendar));\n  };\n}\n\nfunction alignedDateTimeStart(computeAlignment) {\n  return record => {\n    const slots = getShimPlainDateTimeSlots(record);\n    return createShimPlainDateTimeRecord(createDateTimeSlots(computeAlignment(slots), slots.calendar));\n  };\n}\n\nfunction alignedTimeStart(computeAlignment) {\n  return record => {\n    const slots = getShimPlainDateTimeSlots(record);\n    return createShimPlainDateTimeRecord(createDateTimeSlots(combineDateAndTime(slots, computeAlignment(slots)), slots.calendar));\n  };\n}\n\nfunction alignedTimeEnd(computeAlignment) {\n  return record => {\n    const slots = getShimPlainDateTimeSlots(record);\n    return createShimPlainDateTimeRecord(createDateTimeSlots(combineDateAndTime(slots, computeAlignment(slots)), slots.calendar));\n  };\n}\n\nconst getShimPlainMonthDaySlots = getPlainMonthDaySlots;\n\nconst ShimPlainMonthDayRecord = /*@__PURE__*/ defineTemporalClass(PlainMonthDayRecordBranding, class {\n  get calendarId() {\n    return getCalendarSlotId(getShimPlainMonthDaySlots(this).calendar);\n  }\n  toJSON() {\n    return formatMonthDayIsoAuto(getShimPlainMonthDaySlots(this));\n  }\n  valueOf() {\n    return forbiddenValueOf();\n  }\n}, getShimPlainMonthDaySlots, monthDayFieldGetters);\n\nfunction createShimPlainMonthDayRecord(slots) {\n  const instance = Object.create(ShimPlainMonthDayRecord.prototype);\n  return setPlainMonthDaySlots(instance, slots), attachDebugString(instance), instance;\n}\n\nfunction create$4(isoMonth, isoDay, calendar, referenceIsoYear) {\n  const isoMonthInt = toIntegerWithTrunc(isoMonth);\n  const isoDayInt = toIntegerWithTrunc(isoDay);\n  const calendarImpl = refineShimCalendarArgMaybe(calendar);\n  const isoYearInt = toIntegerWithTrunc(referenceIsoYear ?? isoEpochFirstLeapYear);\n  const fields = checkIsoDateInBounds(validateIsoDateFields({\n    year: isoYearInt,\n    month: isoMonthInt,\n    day: isoDayInt\n  }));\n  return createShimPlainMonthDayRecord(createDateSlots(fields, calendarImpl));\n}\n\nfunction fromFields$3(fields, options) {\n  const inputCalendar = fields.calendar;\n  const calendarImpl = refineShimCalendarArgMaybe(inputCalendar);\n  return createShimPlainMonthDayRecord(refinePlainMonthDayObjectLike(calendarImpl, !inputCalendar, fields, options));\n}\n\nfunction fromString$4(s, getCalendarRecord) {\n  return createShimPlainMonthDayRecord(parsePlainMonthDay(s, createShimCalendarStringResolver(getCalendarRecord)));\n}\n\nfunction withFields$3(record, mod, options) {\n  return createShimPlainMonthDayRecord(withMonthDayFields(getShimPlainMonthDaySlots(record), validateBag(mod), options));\n}\n\nfunction equals$4(record, otherRecord) {\n  const slots = getShimPlainMonthDaySlots(record);\n  const otherSlots = getShimPlainMonthDaySlots(otherRecord);\n  return plainMonthDaysEqual(slots, otherSlots);\n}\n\nconst createFormat$3 = /*@__PURE__*/ createDateTimeFormatFactory(internals => ({\n  A(record) {\n    const slots = getShimPlainMonthDaySlots(record);\n    const format = internals.t;\n    return checkResolvedCalendarCompatible(format, slots, 1), [ format, isoDateToEpochMilli(slots) ];\n  },\n  v(record0, record1) {\n    const slots0 = getShimPlainMonthDaySlots(record0);\n    const slots1 = getShimPlainMonthDaySlots(record1);\n    const format = internals.t;\n    return checkResolvedCalendarCompatible(format, slots0, 1), checkResolvedCalendarCompatible(format, slots1, 1), \n    [ format, isoDateToEpochMilli(slots0), isoDateToEpochMilli(slots1) ];\n  }\n}), options => applyPlainFormatTimeZone(transformMonthDayOptions(options, 1)));\n\nfunction toLocaleString$4(record, locales = void 0, options = {}) {\n  const slots = getShimPlainMonthDaySlots(record);\n  const format = new RawDateTimeFormat(locales, applyPlainFormatTimeZone(transformMonthDayOptions(options)));\n  return checkResolvedCalendarCompatible(format, slots, 1), format.format(isoDateToEpochMilli(slots));\n}\n\nfunction toString$4(record, options) {\n  return formatPlainMonthDayIso(getShimPlainMonthDaySlots(record), options);\n}\n\nfunction toBasicString$4(record) {\n  return formatMonthDayIsoAuto(getShimPlainMonthDaySlots(record));\n}\n\nfunction toPlainDate$2(record, fields) {\n  const slots = getShimPlainMonthDaySlots(record);\n  return createShimPlainDateRecord(monthDayToDate(slots.calendar, record, fields));\n}\n\nfunction toTemporal$4(record) {\n  const slots = getShimPlainMonthDaySlots(record);\n  return new Temporal.PlainMonthDay(slots.month, slots.day, getCalendarSlotId(slots.calendar), slots.year);\n}\n\nconst getShimPlainYearMonthSlots = getPlainYearMonthSlots;\n\nconst ShimPlainYearMonthRecord = /*@__PURE__*/ defineTemporalClass(PlainYearMonthRecordBranding, class {\n  get calendarId() {\n    return getCalendarSlotId(getShimPlainYearMonthSlots(this).calendar);\n  }\n  toJSON() {\n    return formatYearMonthIsoAuto(getShimPlainYearMonthSlots(this));\n  }\n  valueOf() {\n    return forbiddenValueOf();\n  }\n}, getShimPlainYearMonthSlots, yearMonthFieldGetters);\n\nfunction createShimPlainYearMonthRecord(slots) {\n  const instance = Object.create(ShimPlainYearMonthRecord.prototype);\n  return setPlainYearMonthSlots(instance, slots), attachDebugString(instance), instance;\n}\n\nfunction create$3(isoYear, isoMonth, calendar, referenceIsoDay) {\n  const isoYearInt = toIntegerWithTrunc(isoYear);\n  const isoMonthInt = toIntegerWithTrunc(isoMonth);\n  const calendarImpl = refineShimCalendarArgMaybe(calendar);\n  const isoDayInt = toIntegerWithTrunc(referenceIsoDay ?? 1);\n  const fields = checkIsoYearMonthInBounds(validateIsoDateFields({\n    year: isoYearInt,\n    month: isoMonthInt,\n    day: isoDayInt\n  }));\n  return createShimPlainYearMonthRecord(createDateSlots(fields, calendarImpl));\n}\n\nfunction fromFields$2(fields, options) {\n  const calendarImpl = refineShimCalendarArgMaybe(fields.calendar);\n  return createShimPlainYearMonthRecord(refinePlainYearMonthObjectLike(calendarImpl, fields, options));\n}\n\nfunction fromString$3(s, getCalendarRecord) {\n  return createShimPlainYearMonthRecord(parsePlainYearMonth(s, createShimCalendarStringResolver(getCalendarRecord)));\n}\n\nfunction daysInMonth$2(record) {\n  const slots = getShimPlainYearMonthSlots(record);\n  return computeCalendarDaysInMonth(slots.calendar, slots);\n}\n\nfunction daysInYear$2(record) {\n  const slots = getShimPlainYearMonthSlots(record);\n  return computeCalendarDaysInYear(slots.calendar, slots);\n}\n\nfunction monthsInYear$2(record) {\n  const slots = getShimPlainYearMonthSlots(record);\n  return computeCalendarMonthsInYear(slots.calendar, slots);\n}\n\nfunction inLeapYear$2(record) {\n  const slots = getShimPlainYearMonthSlots(record);\n  return computeCalendarInLeapYear(slots.calendar, slots);\n}\n\nfunction withFields$2(record, mod, options) {\n  return createShimPlainYearMonthRecord(withYearMonthFields(getShimPlainYearMonthSlots(record), validateBag(mod), options));\n}\n\nfunction add$3(record, durationRecord, options) {\n  const slots = getShimPlainYearMonthSlots(record);\n  const durationSlots = getShimDurationSlots(durationRecord);\n  return createShimPlainYearMonthRecord(createDateSlots(moveYearMonth(slots.calendar, slots, durationSlots, refineOverflowOptions(options)), slots.calendar));\n}\n\nfunction subtract$3(record, durationRecord, options) {\n  const slots = getShimPlainYearMonthSlots(record);\n  const durationSlots = getShimDurationSlots(durationRecord);\n  return createShimPlainYearMonthRecord(createDateSlots(moveYearMonth(slots.calendar, slots, negateDurationFields(durationSlots), refineOverflowOptions(options)), slots.calendar));\n}\n\nfunction diff$3(record, otherRecord, options) {\n  const slots = getShimPlainYearMonthSlots(record);\n  const otherSlots = getShimPlainYearMonthSlots(otherRecord);\n  return createShimDurationRecord(diffYearMonths(0, slots, otherSlots, options));\n}\n\nfunction equals$3(record, otherRecord) {\n  const slots = getShimPlainYearMonthSlots(record);\n  const otherSlots = getShimPlainYearMonthSlots(otherRecord);\n  return plainYearMonthsEqual(slots, otherSlots);\n}\n\nfunction compare$3(record, otherRecord) {\n  const slots = getShimPlainYearMonthSlots(record);\n  const otherSlots = getShimPlainYearMonthSlots(otherRecord);\n  return compareIsoDateFields(slots, otherSlots);\n}\n\nconst createFormat$2 = /*@__PURE__*/ createDateTimeFormatFactory(internals => ({\n  A(record) {\n    const slots = getShimPlainYearMonthSlots(record);\n    const format = internals.t;\n    return checkResolvedCalendarCompatible(format, slots, 1), [ format, isoDateToEpochMilli(slots) ];\n  },\n  v(record0, record1) {\n    const slots0 = getShimPlainYearMonthSlots(record0);\n    const slots1 = getShimPlainYearMonthSlots(record1);\n    const format = internals.t;\n    return checkResolvedCalendarCompatible(format, slots0, 1), checkResolvedCalendarCompatible(format, slots1, 1), \n    [ format, isoDateToEpochMilli(slots0), isoDateToEpochMilli(slots1) ];\n  }\n}), options => applyPlainFormatTimeZone(transformYearMonthOptions(options, 1)));\n\nfunction toLocaleString$3(record, locales = void 0, options = {}) {\n  const slots = getShimPlainYearMonthSlots(record);\n  const format = new RawDateTimeFormat(locales, applyPlainFormatTimeZone(transformYearMonthOptions(options)));\n  return checkResolvedCalendarCompatible(format, slots, 1), format.format(isoDateToEpochMilli(slots));\n}\n\nfunction toString$3(record, options) {\n  return formatPlainYearMonthIso(getShimPlainYearMonthSlots(record), options);\n}\n\nfunction toBasicString$3(record) {\n  return formatYearMonthIsoAuto(getShimPlainYearMonthSlots(record));\n}\n\nfunction toPlainDate$1(record, fields) {\n  const slots = getShimPlainYearMonthSlots(record);\n  return createShimPlainDateRecord(yearMonthToDate(slots.calendar, record, fields));\n}\n\nfunction toTemporal$3(record) {\n  const slots = getShimPlainYearMonthSlots(record);\n  return new Temporal.PlainYearMonth(slots.year, slots.month, getCalendarSlotId(slots.calendar), slots.day);\n}\n\nfunction addYears$2(record, years, options) {\n  const slots = getShimPlainYearMonthSlots(record);\n  return createShimPlainYearMonthRecord(createDateSlots(moveYearMonthByUnits(slots.calendar, slots, validateDurationCalendarUnit(\"years\", toStrictInteger(years)), 0, refineOverflowOptions(options)), slots.calendar));\n}\n\nfunction addMonths$2(record, months, options) {\n  const slots = getShimPlainYearMonthSlots(record);\n  return createShimPlainYearMonthRecord(createDateSlots(moveYearMonthByUnits(slots.calendar, slots, 0, validateDurationCalendarUnit(\"months\", toStrictInteger(months)), refineOverflowOptions(options)), slots.calendar));\n}\n\nconst subtractYears$2 = /*@__PURE__*/ reversedMove(addYears$2);\n\nconst subtractMonths$2 = /*@__PURE__*/ reversedMove(addMonths$2);\n\nfunction roundToYear$2(record, options) {\n  const slots = getShimPlainYearMonthSlots(record);\n  const [, roundingMode] = refineUnitRoundOptions(9, options);\n  const roundedIsoDateTime = roundDateToInterval(computeYearInterval, slots.calendar, slots, roundingMode);\n  return createShimPlainYearMonthRecord(createDateSlots(roundedIsoDateTime, slots.calendar));\n}\n\nfunction startOfYear$2(record) {\n  const slots = getShimPlainYearMonthSlots(record);\n  return createShimPlainYearMonthRecord(createDateSlots(computeYearFloor(slots.calendar, slots), slots.calendar));\n}\n\nfunction endOfYear$2(record) {\n  const slots = getShimPlainYearMonthSlots(record);\n  return createShimPlainYearMonthRecord(createDateSlots(moveYearMonthByUnits(slots.calendar, computeYearCeil(slots.calendar, slots), 0, -1, 0), slots.calendar));\n}\n\nfunction diffYears$2(record0, record1, options) {\n  return diffYearMonthYears(getShimPlainYearMonthSlots(record0), getShimPlainYearMonthSlots(record1), options);\n}\n\nfunction diffMonths$2(record0, record1, options) {\n  return diffYearMonthMonths(getShimPlainYearMonthSlots(record0), getShimPlainYearMonthSlots(record1), options);\n}\n\nconst getShimPlainDateSlots = getPlainDateSlots;\n\nconst ShimPlainDateRecord = /*@__PURE__*/ defineTemporalClass(PlainDateRecordBranding, class {\n  get calendarId() {\n    return getCalendarSlotId(getShimPlainDateSlots(this).calendar);\n  }\n  toJSON() {\n    return formatDateIsoAuto(getShimPlainDateSlots(this));\n  }\n  valueOf() {\n    return forbiddenValueOf();\n  }\n}, getShimPlainDateSlots, dateFieldGetters);\n\nfunction createShimPlainDateRecord(slots) {\n  const instance = Object.create(ShimPlainDateRecord.prototype);\n  return setPlainDateSlots(instance, slots), attachDebugString(instance), instance;\n}\n\nfunction create$2(isoYear, isoMonth, isoDay, calendar) {\n  const fields = checkIsoDateInBounds(validateIsoDateFields(mapProps(toIntegerWithTrunc, {\n    year: isoYear,\n    month: isoMonth,\n    day: isoDay\n  })));\n  const calendarImpl = refineShimCalendarArgMaybe(calendar);\n  return createShimPlainDateRecord(createDateSlots(fields, calendarImpl));\n}\n\nfunction fromFields$1(fields, options) {\n  const calendarImpl = refineShimCalendarArgMaybe(fields.calendar);\n  return createShimPlainDateRecord(refinePlainDateObjectLike(calendarImpl, fields, options));\n}\n\nfunction fromString$2(s, getCalendarRecord) {\n  return createShimPlainDateRecord(parsePlainDate(s, createShimCalendarStringResolver(getCalendarRecord)));\n}\n\nfunction withFields$1(record, mod, options) {\n  return createShimPlainDateRecord(withDateFields(getShimPlainDateSlots(record), validateBag(mod), options));\n}\n\nfunction withCalendar$1(record, inputCalendar) {\n  const slots = getShimPlainDateSlots(record);\n  const calendarImpl = getCalendarRecordImpl(inputCalendar);\n  return createShimPlainDateRecord(createDateSlots(slots, calendarImpl));\n}\n\nfunction dayOfWeek$1(record) {\n  return computeIsoDayOfWeek(getShimPlainDateSlots(record));\n}\n\nfunction daysInWeek$1(record) {\n  return getShimPlainDateSlots(record), 7;\n}\n\nfunction weekOfYear$1(record) {\n  const slots = getShimPlainDateSlots(record);\n  return computeCalendarWeekOfYear(slots.calendar, slots);\n}\n\nfunction yearOfWeek$1(record) {\n  const slots = getShimPlainDateSlots(record);\n  return computeCalendarYearOfWeek(slots.calendar, slots);\n}\n\nfunction dayOfYear$1(record) {\n  const slots = getShimPlainDateSlots(record);\n  return computeCalendarDayOfYear(slots.calendar, slots);\n}\n\nfunction daysInMonth$1(record) {\n  const slots = getShimPlainDateSlots(record);\n  return computeCalendarDaysInMonth(slots.calendar, slots);\n}\n\nfunction daysInYear$1(record) {\n  const slots = getShimPlainDateSlots(record);\n  return computeCalendarDaysInYear(slots.calendar, slots);\n}\n\nfunction monthsInYear$1(record) {\n  const slots = getShimPlainDateSlots(record);\n  return computeCalendarMonthsInYear(slots.calendar, slots);\n}\n\nfunction inLeapYear$1(record) {\n  const slots = getShimPlainDateSlots(record);\n  return computeCalendarInLeapYear(slots.calendar, slots);\n}\n\nfunction add$2(record, durationRecord, options) {\n  const slots = getShimPlainDateSlots(record);\n  const durationSlots = getShimDurationSlots(durationRecord);\n  return createShimPlainDateRecord(createDateSlots(moveDate(slots.calendar, slots, durationSlots, refineOverflowOptions(options)), slots.calendar));\n}\n\nfunction subtract$2(record, durationRecord, options) {\n  const slots = getShimPlainDateSlots(record);\n  const durationSlots = getShimDurationSlots(durationRecord);\n  return createShimPlainDateRecord(createDateSlots(moveDate(slots.calendar, slots, negateDurationFields(durationSlots), refineOverflowOptions(options)), slots.calendar));\n}\n\nfunction diff$2(record, otherRecord, options) {\n  const slots = getShimPlainDateSlots(record);\n  const otherSlots = getShimPlainDateSlots(otherRecord);\n  return createShimDurationRecord(diffDates(0, slots, otherSlots, options));\n}\n\nfunction equals$2(record, otherRecord) {\n  const slots = getShimPlainDateSlots(record);\n  const otherSlots = getShimPlainDateSlots(otherRecord);\n  return plainDatesEqual(slots, otherSlots);\n}\n\nfunction compare$2(record, otherRecord) {\n  const slots = getShimPlainDateSlots(record);\n  const otherSlots = getShimPlainDateSlots(otherRecord);\n  return compareIsoDateFields(slots, otherSlots);\n}\n\nconst createFormat$1 = /*@__PURE__*/ createDateTimeFormatFactory(internals => ({\n  A(record) {\n    const slots = getShimPlainDateSlots(record);\n    const format = internals.t;\n    return checkResolvedCalendarCompatible(format, slots), [ format, isoDateToEpochMilli(slots) ];\n  },\n  v(record0, record1) {\n    const slots0 = getShimPlainDateSlots(record0);\n    const slots1 = getShimPlainDateSlots(record1);\n    const format = internals.t;\n    return checkResolvedCalendarCompatible(format, slots0), checkResolvedCalendarCompatible(format, slots1), \n    [ format, isoDateToEpochMilli(slots0), isoDateToEpochMilli(slots1) ];\n  }\n}), options => applyPlainFormatTimeZone(transformDateOptions(options, 1)));\n\nfunction toLocaleString$2(record, locales = void 0, options = {}) {\n  const slots = getShimPlainDateSlots(record);\n  const format = new RawDateTimeFormat(locales, applyPlainFormatTimeZone(transformDateOptions(options)));\n  return checkResolvedCalendarCompatible(format, slots), format.format(isoDateToEpochMilli(slots));\n}\n\nfunction toString$2(record, options) {\n  return formatPlainDateIso(getShimPlainDateSlots(record), options);\n}\n\nfunction toBasicString$2(record) {\n  return formatDateIsoAuto(getShimPlainDateSlots(record));\n}\n\nfunction toZonedDateTime(record, options) {\n  const optionsObj = \"string\" == typeof options ? {\n    timeZone: options\n  } : options;\n  const slots = getShimPlainDateSlots(record);\n  const timeZoneId = refineTimeZoneId(optionsObj.timeZone);\n  const plainTimeArg = optionsObj.plainTime;\n  const timeFields = void 0 !== plainTimeArg ? getPlainTimeSlots(plainTimeArg) : void 0;\n  return createShimZonedDateTimeRecord(dateToZonedDateTime(slots, queryTimeZone(timeZoneId), timeFields));\n}\n\nfunction toPlainDateTime$1(record, plainTimeRecord = timeFieldDefaults) {\n  const slots = getShimPlainDateSlots(record);\n  const timeFields = getPlainTimeSlotsIfPresent(plainTimeRecord) || plainTimeRecord;\n  return createShimPlainDateTimeRecord(createDateTimeFromRefinedFields(slots, timeFields, slots.calendar));\n}\n\nfunction toPlainYearMonth(record) {\n  const slots = getShimPlainDateSlots(record);\n  const {year: year, month: month} = computeCalendarDateFields(slots.calendar, slots);\n  return createShimPlainYearMonthRecord(createYearMonthFromCalendarParts(slots.calendar, year, month));\n}\n\nfunction toPlainMonthDay(record) {\n  const slots = getShimPlainDateSlots(record);\n  const {year: year, month: month, day: day} = computeCalendarDateFields(slots.calendar, slots);\n  return createShimPlainMonthDayRecord(createMonthDayFromCalendarParts(slots.calendar, year, month, day));\n}\n\nfunction toTemporal$2(record) {\n  const slots = getShimPlainDateSlots(record);\n  return new Temporal.PlainDate(slots.year, slots.month, slots.day, getCalendarSlotId(slots.calendar));\n}\n\nfunction withDayOfYear$1(record, dayOfYear, options) {\n  const slots = getShimPlainDateSlots(record);\n  return createRecordFromDateFields(createDateSlots(moveToDayOfYear(slots.calendar, slots, dayOfYear, options), slots.calendar));\n}\n\nfunction withDayOfMonth$1(record, dayOfMonth, options) {\n  const slots = getShimPlainDateSlots(record);\n  return createRecordFromDateFields(createDateSlots(moveToDayOfMonth(slots.calendar, slots, dayOfMonth, options), slots.calendar));\n}\n\nfunction withDayOfWeek$1(record, dayOfWeek, options) {\n  const slots = getShimPlainDateSlots(record);\n  return createRecordFromDateFields(createDateSlots(moveToDayOfWeek(slots.calendar, slots, dayOfWeek, options), slots.calendar));\n}\n\nfunction withWeekOfYear$1(record, weekOfYear, options) {\n  const slots = getShimPlainDateSlots(record);\n  return createRecordFromDateFields(createDateSlots(moveToWeekOfYear(slots.calendar, slots, weekOfYear, options), slots.calendar));\n}\n\nfunction addYears$1(record, years, options) {\n  const slots = getShimPlainDateSlots(record);\n  return createRecordFromDateFields(createDateSlots(moveDateByYears(slots.calendar, slots, years, options), slots.calendar));\n}\n\nfunction addMonths$1(record, months, options) {\n  const slots = getShimPlainDateSlots(record);\n  return createRecordFromDateFields(createDateSlots(moveDateByMonths(slots.calendar, slots, months, options), slots.calendar));\n}\n\nfunction addWeeks$1(record, weeks) {\n  const slots = getShimPlainDateSlots(record);\n  return createRecordFromDateFields(createDateSlots(moveDateByDays(slots, 7 * toStrictInteger(weeks)), slots.calendar));\n}\n\nfunction addDays$1(record, days) {\n  const slots = getShimPlainDateSlots(record);\n  return createRecordFromDateFields(createDateSlots(moveDateByDays(slots, toStrictInteger(days)), slots.calendar));\n}\n\nconst subtractYears$1 = (record, units, options) => addYears$1(record, -units, options);\n\nconst subtractMonths$1 = (record, units, options) => addMonths$1(record, -units, options);\n\nconst subtractWeeks$1 = (record, units) => addWeeks$1(record, -units);\n\nconst subtractDays$1 = (record, units) => addDays$1(record, -units);\n\nconst roundToYear$1 = /*@__PURE__*/ bindArgs(roundToInterval$1, 9, computeYearInterval);\n\nconst roundToMonth$1 = /*@__PURE__*/ bindArgs(roundToInterval$1, 8, computeMonthInterval);\n\nconst roundToWeek$1 = /*@__PURE__*/ bindArgs(roundToInterval$1, 7, computeIsoWeekInterval);\n\nconst startOfYear$1 = /*@__PURE__*/ aligned$1(computeYearFloor);\n\nconst startOfMonth$1 = /*@__PURE__*/ aligned$1(computeMonthFloor);\n\nconst startOfWeek$1 = /*@__PURE__*/ aligned$1(computeIsoWeekFloor);\n\nconst endOfYear$1 = /*@__PURE__*/ aligned$1(computeYearCeil, -1);\n\nconst endOfMonth$1 = /*@__PURE__*/ aligned$1(computeMonthCeil, -1);\n\nconst endOfWeek$1 = /*@__PURE__*/ aligned$1(computeIsoWeekCeil, -1);\n\nfunction diffYears$1(record0, record1, options) {\n  return diffDateYears(getShimPlainDateSlots(record0), getShimPlainDateSlots(record1), options);\n}\n\nfunction diffMonths$1(record0, record1, options) {\n  return diffDateMonths(getShimPlainDateSlots(record0), getShimPlainDateSlots(record1), options);\n}\n\nfunction diffWeeks$1(record0, record1, options) {\n  return diffDateWeeks(getShimPlainDateSlots(record0), getShimPlainDateSlots(record1), options);\n}\n\nfunction diffDays$1(record0, record1, options) {\n  return diffDateDays(getShimPlainDateSlots(record0), getShimPlainDateSlots(record1), options);\n}\n\nfunction roundToInterval$1(unit, computeInterval, record, options) {\n  const slots = getShimPlainDateSlots(record);\n  const [, roundingMode] = refineUnitRoundOptions(unit, options);\n  return createRecordFromDateFields({\n    ...roundDateToInterval(computeInterval, slots.calendar, slots, roundingMode),\n    calendar: slots.calendar\n  });\n}\n\nfunction aligned$1(computeAlignment, dayDelta = 0) {\n  return record => {\n    const slots = getShimPlainDateSlots(record);\n    return createRecordFromDateFields({\n      ...moveDateByDays(computeAlignment(slots.calendar, slots), dayDelta),\n      calendar: slots.calendar\n    });\n  };\n}\n\nfunction createRecordFromDateFields(isoDate) {\n  return checkIsoDateInBounds(isoDate), createShimPlainDateRecord(createDateSlots(isoDate, isoDate.calendar));\n}\n\nconst getShimZonedDateTimeSlots = getZonedDateTimeSlots;\n\nconst ShimZonedDateTimeRecord = /*@__PURE__*/ defineTemporalClass(ZonedDateTimeRecordBranding, class {\n  get calendarId() {\n    return getCalendarSlotId(getShimZonedDateTimeSlots(this).calendar);\n  }\n  get timeZoneId() {\n    return getShimZonedDateTimeSlots(this).timeZone.id;\n  }\n  get epochMilliseconds() {\n    return epochNanoToMilli(getShimZonedDateTimeSlots(this).epochNanoseconds);\n  }\n  get epochNanoseconds() {\n    return getShimZonedDateTimeSlots(this).epochNanoseconds;\n  }\n  toJSON() {\n    return formatZonedDateTimeIsoAuto(getShimZonedDateTimeSlots(this));\n  }\n  valueOf() {\n    return forbiddenValueOf();\n  }\n}, getShimZonedDateTimeIsoSlots, dateFieldGetters, timeGetters);\n\nfunction createShimZonedDateTimeRecord(slots) {\n  const instance = Object.create(ShimZonedDateTimeRecord.prototype);\n  return setZonedDateTimeSlots(instance, slots), attachDebugString(instance), instance;\n}\n\nfunction getShimZonedDateTimeIsoSlots(record) {\n  const slots = getShimZonedDateTimeSlots(record);\n  return {\n    ...zonedEpochSlotsToIso(slots),\n    calendar: slots.calendar\n  };\n}\n\nfunction create$1(epochNanoseconds, timeZoneId, calendar) {\n  const epochNano = checkEpochNanoInBounds(toBigInt(epochNanoseconds));\n  const timeZone = queryTimeZone(refineTimeZoneId(timeZoneId));\n  const calendarImpl = refineShimCalendarArgMaybe(calendar);\n  return createShimZonedDateTimeRecord(createZonedEpochNanoSlots(epochNano, timeZone, calendarImpl));\n}\n\nfunction fromFields(fields, options) {\n  const calendarImpl = refineShimCalendarArgMaybe(fields.calendar);\n  return createShimZonedDateTimeRecord(refineZonedDateTimeObjectLike(refineTimeZoneId, calendarImpl, fields, options));\n}\n\nfunction fromString$1(s, getCalendarRecord, options) {\n  return createShimZonedDateTimeRecord(parseZonedDateTime(s, createShimCalendarStringResolver(getCalendarRecord), options));\n}\n\nfunction withFields(record, mod, options) {\n  return createShimZonedDateTimeRecord(withZonedDateTimeFields(getShimZonedDateTimeSlots(record), validateBag(mod), options));\n}\n\nfunction withCalendar(record, inputCalendar) {\n  const slots = getShimZonedDateTimeSlots(record);\n  const calendarImpl = getCalendarRecordImpl(inputCalendar);\n  return createShimZonedDateTimeRecord(createZonedEpochNanoSlots(slots.epochNanoseconds, slots.timeZone, calendarImpl));\n}\n\nfunction withTimeZone(record, timeZoneId) {\n  const slots = getShimZonedDateTimeSlots(record);\n  return createShimZonedDateTimeRecord(createZonedEpochNanoSlots(slots.epochNanoseconds, queryTimeZone(refineTimeZoneId(timeZoneId)), slots.calendar));\n}\n\nfunction withPlainTime(record, plainTimeRecord) {\n  const slots = getShimZonedDateTimeSlots(record);\n  const plainTimeSlots = void 0 === plainTimeRecord ? void 0 : getShimPlainTimeSlots(plainTimeRecord);\n  return createShimZonedDateTimeRecord(zonedDateTimeWithPlainTime(slots, plainTimeSlots));\n}\n\nfunction offsetNanoseconds(record) {\n  return zonedEpochSlotsToIso(getShimZonedDateTimeSlots(record)).offsetNanoseconds;\n}\n\nfunction offset(record) {\n  return formatOffsetNano(offsetNanoseconds(record));\n}\n\nfunction dayOfWeek(record) {\n  return computeIsoDayOfWeek(zonedEpochSlotsToIso(getShimZonedDateTimeSlots(record)));\n}\n\nfunction daysInWeek(record) {\n  return getShimZonedDateTimeSlots(record), 7;\n}\n\nfunction weekOfYear(record) {\n  const slots = getShimZonedDateTimeIsoSlots(record);\n  return computeCalendarWeekOfYear(slots.calendar, slots);\n}\n\nfunction yearOfWeek(record) {\n  const slots = getShimZonedDateTimeIsoSlots(record);\n  return computeCalendarYearOfWeek(slots.calendar, slots);\n}\n\nfunction dayOfYear(record) {\n  const slots = getShimZonedDateTimeIsoSlots(record);\n  return computeCalendarDayOfYear(slots.calendar, slots);\n}\n\nfunction daysInMonth(record) {\n  const slots = getShimZonedDateTimeIsoSlots(record);\n  return computeCalendarDaysInMonth(slots.calendar, slots);\n}\n\nfunction daysInYear(record) {\n  const slots = getShimZonedDateTimeIsoSlots(record);\n  return computeCalendarDaysInYear(slots.calendar, slots);\n}\n\nfunction monthsInYear(record) {\n  const slots = getShimZonedDateTimeIsoSlots(record);\n  return computeCalendarMonthsInYear(slots.calendar, slots);\n}\n\nfunction inLeapYear(record) {\n  const slots = getShimZonedDateTimeIsoSlots(record);\n  return computeCalendarInLeapYear(slots.calendar, slots);\n}\n\nfunction hoursInDay(record) {\n  return computeZonedHoursInDay(getShimZonedDateTimeSlots(record));\n}\n\nfunction toString$1(record, options) {\n  return formatZonedDateTimeIso(getShimZonedDateTimeSlots(record), options);\n}\n\nfunction toBasicString$1(record) {\n  return formatZonedDateTimeIsoAuto(getShimZonedDateTimeSlots(record));\n}\n\nfunction add$1(record, durationRecord, options) {\n  const slots = getShimZonedDateTimeSlots(record);\n  const durationSlots = getShimDurationSlots(durationRecord);\n  return createShimZonedDateTimeRecord(moveZonedEpochSlots(slots, durationSlots, refineOverflowOptions(options)));\n}\n\nfunction subtract$1(record, durationRecord, options) {\n  const slots = getShimZonedDateTimeSlots(record);\n  const durationSlots = getShimDurationSlots(durationRecord);\n  return createShimZonedDateTimeRecord(moveZonedEpochSlots(slots, negateDurationFields(durationSlots), refineOverflowOptions(options)));\n}\n\nfunction diff$1(record, otherRecord, options) {\n  const slots = getShimZonedDateTimeSlots(record);\n  const otherSlots = getShimZonedDateTimeSlots(otherRecord);\n  return createShimDurationRecord(diffZonedDateTimes(0, slots, otherSlots, options));\n}\n\nfunction startOfDay(record) {\n  return createShimZonedDateTimeRecord(computeZonedStartOfDay(getShimZonedDateTimeSlots(record)));\n}\n\nfunction getTimeZoneTransition(record, options) {\n  const slots = getShimZonedDateTimeSlots(record);\n  const epochNanoseconds = slots.timeZone.C(slots.epochNanoseconds, refineDirectionOptions(options));\n  return void 0 !== epochNanoseconds ? createShimZonedDateTimeRecord({\n    ...slots,\n    epochNanoseconds: epochNanoseconds\n  }) : null;\n}\n\nfunction equals$1(record, otherRecord) {\n  const slots = getShimZonedDateTimeSlots(record);\n  const otherSlots = getShimZonedDateTimeSlots(otherRecord);\n  return zonedDateTimesEqual(slots, otherSlots);\n}\n\nfunction compare$1(record, otherRecord) {\n  const slots = getShimZonedDateTimeSlots(record);\n  const otherSlots = getShimZonedDateTimeSlots(otherRecord);\n  return compareZonedEpochSlots(slots, otherSlots);\n}\n\nfunction toLocaleString$1(record, locales = void 0, options = {}) {\n  const slots = getShimZonedDateTimeSlots(record);\n  const format = new RawDateTimeFormat(locales, applyZonedFormatTimeZone(transformZonedOptions(options), getZonedTimeZoneId(slots)));\n  return checkResolvedCalendarCompatible(format, slots), format.format(epochNanoToMilli(slots.epochNanoseconds));\n}\n\nfunction toInstant(record) {\n  return createShimInstantRecord(zonedDateTimeToInstant(getShimZonedDateTimeSlots(record)));\n}\n\nfunction toPlainDateTime(record) {\n  return createShimPlainDateTimeRecord(zonedDateTimeToDateTime(getShimZonedDateTimeSlots(record)));\n}\n\nfunction toPlainDate(record) {\n  return createShimPlainDateRecord(zonedDateTimeToDate(getShimZonedDateTimeSlots(record)));\n}\n\nfunction toPlainTime(record) {\n  return createShimPlainTimeRecord(zonedDateTimeToTime(getShimZonedDateTimeSlots(record)));\n}\n\nfunction toTemporal$1(record) {\n  const slots = getShimZonedDateTimeSlots(record);\n  return new Temporal.ZonedDateTime(slots.epochNanoseconds, slots.timeZone.id, getCalendarSlotId(slots.calendar));\n}\n\nconst withDayOfYear = /*@__PURE__*/ zonedTransform(moveToDayOfYear);\n\nconst withDayOfMonth = /*@__PURE__*/ zonedTransform(moveToDayOfMonth);\n\nconst withDayOfWeek = /*@__PURE__*/ zonedTransform(moveToDayOfWeek);\n\nconst withWeekOfYear = /*@__PURE__*/ zonedTransform(moveToWeekOfYear);\n\nconst addYears = /*@__PURE__*/ zonedTransform(moveDateByYears);\n\nconst addMonths = /*@__PURE__*/ zonedTransform(moveDateByMonths);\n\nconst addWeeks = /*@__PURE__*/ zonedTransform((_calendar, isoDate, weeks) => moveDateByDays(isoDate, 7 * toStrictInteger(weeks)));\n\nconst addDays = /*@__PURE__*/ zonedTransform((_calendar, isoDate, days) => moveDateByDays(isoDate, toStrictInteger(days)));\n\nconst addHours$1 = /*@__PURE__*/ bindArgs(moveByTimeUnit, nanoInHour);\n\nconst addMinutes$1 = /*@__PURE__*/ bindArgs(moveByTimeUnit, nanoInMinute);\n\nconst addSeconds$1 = /*@__PURE__*/ bindArgs(moveByTimeUnit, nanoInSec);\n\nconst addMilliseconds$1 = /*@__PURE__*/ bindArgs(moveByTimeUnit, nanoInMilli);\n\nconst addMicroseconds$1 = /*@__PURE__*/ bindArgs(moveByTimeUnit, nanoInMicro);\n\nconst addNanoseconds$1 = /*@__PURE__*/ bindArgs(moveByTimeUnit, 1);\n\nconst subtractYears = /*@__PURE__*/ reversedMove(addYears);\n\nconst subtractMonths = /*@__PURE__*/ reversedMove(addMonths);\n\nconst subtractWeeks = /*@__PURE__*/ reversedMove(addWeeks);\n\nconst subtractDays = /*@__PURE__*/ reversedMove(addDays);\n\nconst subtractHours$1 = /*@__PURE__*/ reversedMove(addHours$1);\n\nconst subtractMinutes$1 = /*@__PURE__*/ reversedMove(addMinutes$1);\n\nconst subtractSeconds$1 = /*@__PURE__*/ reversedMove(addSeconds$1);\n\nconst subtractMilliseconds$1 = /*@__PURE__*/ reversedMove(addMilliseconds$1);\n\nconst subtractMicroseconds$1 = /*@__PURE__*/ reversedMove(addMicroseconds$1);\n\nconst subtractNanoseconds$1 = /*@__PURE__*/ reversedMove(addNanoseconds$1);\n\nconst roundToYear = /*@__PURE__*/ bindArgs(roundToInterval, 9, computeYearInterval);\n\nconst roundToMonth = /*@__PURE__*/ bindArgs(roundToInterval, 8, computeMonthInterval);\n\nconst roundToWeek = /*@__PURE__*/ bindArgs(roundToInterval, 7, computeIsoWeekInterval);\n\nfunction roundToTimeUnit(smallestUnit, record, options) {\n  const slots = getShimZonedDateTimeSlots(record);\n  const [roundingInc, roundingMode] = refineUnitRoundOptions(smallestUnit, options);\n  return createShimZonedDateTimeRecord(createZonedEpochNanoSlots(roundZonedEpochToTime(slots, smallestUnit, roundingInc, roundingMode), slots.timeZone, slots.calendar));\n}\n\nfunction roundToDay(record, options) {\n  const slots = getShimZonedDateTimeSlots(record);\n  const [, roundingMode] = refineUnitRoundOptions(6, options);\n  return createShimZonedDateTimeRecord(createZonedEpochNanoSlots(roundZonedEpochToDay(slots, roundingMode), slots.timeZone, slots.calendar));\n}\n\nconst roundToHour$1 = /*@__PURE__*/ bindArgs(roundToTimeUnit, 5);\n\nconst roundToMinute$1 = /*@__PURE__*/ bindArgs(roundToTimeUnit, 4);\n\nconst roundToSecond$1 = /*@__PURE__*/ bindArgs(roundToTimeUnit, 3);\n\nconst roundToMillisecond$1 = /*@__PURE__*/ bindArgs(roundToTimeUnit, 2);\n\nconst roundToMicrosecond$1 = /*@__PURE__*/ bindArgs(roundToTimeUnit, 1);\n\nconst startOfYear = /*@__PURE__*/ aligned(computeYearFloor);\n\nconst startOfMonth = /*@__PURE__*/ aligned(computeMonthFloor);\n\nconst startOfWeek = /*@__PURE__*/ aligned(computeIsoWeekFloor);\n\nconst startOfHour = /*@__PURE__*/ alignedZonedTime(slots => ({\n  hour: slots.hour,\n  minute: 0,\n  second: 0,\n  millisecond: 0,\n  microsecond: 0,\n  nanosecond: 0\n}));\n\nconst startOfMinute = /*@__PURE__*/ alignedZonedTime(slots => ({\n  hour: slots.hour,\n  minute: slots.minute,\n  second: 0,\n  millisecond: 0,\n  microsecond: 0,\n  nanosecond: 0\n}));\n\nconst startOfSecond = /*@__PURE__*/ alignedZonedTime(slots => ({\n  hour: slots.hour,\n  minute: slots.minute,\n  second: slots.second,\n  millisecond: 0,\n  microsecond: 0,\n  nanosecond: 0\n}));\n\nconst startOfMillisecond = /*@__PURE__*/ alignedZonedTime(slots => ({\n  hour: slots.hour,\n  minute: slots.minute,\n  second: slots.second,\n  millisecond: slots.millisecond,\n  microsecond: 0,\n  nanosecond: 0\n}));\n\nconst startOfMicrosecond = /*@__PURE__*/ alignedZonedTime(slots => ({\n  hour: slots.hour,\n  minute: slots.minute,\n  second: slots.second,\n  millisecond: slots.millisecond,\n  microsecond: slots.microsecond,\n  nanosecond: 0\n}));\n\nconst endOfYear = /*@__PURE__*/ aligned(computeYearCeil, -1);\n\nconst endOfMonth = /*@__PURE__*/ aligned(computeMonthCeil, -1);\n\nconst endOfWeek = /*@__PURE__*/ aligned(computeIsoWeekCeil, -1);\n\nconst endOfDay = /*@__PURE__*/ aligned(computeDayCeil, -1);\n\nconst endOfHour = /*@__PURE__*/ alignedZonedTime(slots => ({\n  hour: slots.hour,\n  minute: 0,\n  second: 0,\n  millisecond: 0,\n  microsecond: 0,\n  nanosecond: 0\n}), nanoInHour - 1);\n\nconst endOfMinute = /*@__PURE__*/ alignedZonedTime(slots => ({\n  hour: slots.hour,\n  minute: slots.minute,\n  second: 0,\n  millisecond: 0,\n  microsecond: 0,\n  nanosecond: 0\n}), nanoInMinute - 1);\n\nconst endOfSecond = /*@__PURE__*/ alignedZonedTime(slots => ({\n  hour: slots.hour,\n  minute: slots.minute,\n  second: slots.second,\n  millisecond: 0,\n  microsecond: 0,\n  nanosecond: 0\n}), nanoInSec - 1);\n\nconst endOfMillisecond = /*@__PURE__*/ alignedZonedTime(slots => ({\n  hour: slots.hour,\n  minute: slots.minute,\n  second: slots.second,\n  millisecond: slots.millisecond,\n  microsecond: 0,\n  nanosecond: 0\n}), nanoInMilli - 1);\n\nconst endOfMicrosecond = /*@__PURE__*/ alignedZonedTime(slots => ({\n  hour: slots.hour,\n  minute: slots.minute,\n  second: slots.second,\n  millisecond: slots.millisecond,\n  microsecond: slots.microsecond,\n  nanosecond: 0\n}), nanoInMicro - 1);\n\nfunction diffYears(record0, record1, options) {\n  return diffZonedYears(getShimZonedDateTimeSlots(record0), getShimZonedDateTimeSlots(record1), options);\n}\n\nfunction diffMonths(record0, record1, options) {\n  return diffZonedMonths(getShimZonedDateTimeSlots(record0), getShimZonedDateTimeSlots(record1), options);\n}\n\nfunction diffWeeks(record0, record1, options) {\n  return diffZonedWeeks(getShimZonedDateTimeSlots(record0), getShimZonedDateTimeSlots(record1), options);\n}\n\nfunction diffDays(record0, record1, options) {\n  return diffZonedDays(getShimZonedDateTimeSlots(record0), getShimZonedDateTimeSlots(record1), options);\n}\n\nconst diffRecordTimeUnit$1 = /*@__PURE__*/ adaptRecordTimeUnitDiff(diffZonedEpochNanoTimeUnit, getShimZonedDateTimeSlots);\n\nconst diffHours$1 = /*@__PURE__*/ bindArgs(diffRecordTimeUnit$1, 5);\n\nconst diffMinutes$1 = /*@__PURE__*/ bindArgs(diffRecordTimeUnit$1, 4);\n\nconst diffSeconds$1 = /*@__PURE__*/ bindArgs(diffRecordTimeUnit$1, 3);\n\nconst diffMilliseconds$1 = /*@__PURE__*/ bindArgs(diffRecordTimeUnit$1, 2);\n\nconst diffMicroseconds$1 = /*@__PURE__*/ bindArgs(diffRecordTimeUnit$1, 1);\n\nconst diffNanoseconds$1 = /*@__PURE__*/ bindArgs(diffRecordTimeUnit$1, 0);\n\nfunction moveByTimeUnit(nanoInUnit, record, units) {\n  const slots = getShimZonedDateTimeSlots(record);\n  const delta = BigInt(toStrictInteger(units)) * BigInt(nanoInUnit);\n  return createShimZonedDateTimeRecord({\n    ...slots,\n    epochNanoseconds: moveEpochNanoByNano(slots.epochNanoseconds, delta)\n  });\n}\n\nfunction roundToInterval(unit, computeInterval, record, options) {\n  const slots = getShimZonedDateTimeSlots(record);\n  const [, roundingMode] = refineUnitRoundOptions(unit, options);\n  const epochNanoseconds = roundZonedEpochToInterval(computeInterval, slots, roundingMode);\n  return createShimZonedDateTimeRecord({\n    ...slots,\n    epochNanoseconds: checkEpochNanoInBounds(epochNanoseconds)\n  });\n}\n\nfunction aligned(computeAlignment, nanoDelta = 0) {\n  return record => {\n    const slots = getShimZonedDateTimeSlots(record);\n    const epochNanoseconds = alignZonedEpoch(computeAlignment, slots) + BigInt(nanoDelta);\n    return createShimZonedDateTimeRecord({\n      ...slots,\n      epochNanoseconds: checkEpochNanoInBounds(epochNanoseconds)\n    });\n  };\n}\n\nfunction alignedZonedTime(computeAlignment, nanoDelta = 0) {\n  return record => {\n    const slots = getShimZonedDateTimeSlots(record);\n    const {timeZone: timeZone} = slots;\n    const isoDateTime = zonedEpochSlotsToIso(slots);\n    const alignedIsoDateTime = combineDateAndTime(isoDateTime, computeAlignment(isoDateTime));\n    const epochNanoseconds = getMatchingInstantFor(timeZone, alignedIsoDateTime, isoDateTime.offsetNanoseconds, 2, 0, 1) + BigInt(nanoDelta);\n    return createShimZonedDateTimeRecord({\n      ...slots,\n      epochNanoseconds: checkEpochNanoInBounds(epochNanoseconds)\n    });\n  };\n}\n\nfunction zonedTransform(transformIsoDate) {\n  return (record, ...args) => {\n    const slots = getShimZonedDateTimeSlots(record);\n    const {calendar: calendar, timeZone: timeZone} = slots;\n    const isoDateTime = zonedEpochSlotsToIso(slots);\n    const isoDate = transformIsoDate(calendar, isoDateTime, ...args);\n    const epochNanoseconds = getSingleInstantFor(timeZone, combineDateAndTime(isoDate, isoDateTime));\n    return createShimZonedDateTimeRecord({\n      ...slots,\n      epochNanoseconds: checkEpochNanoInBounds(epochNanoseconds)\n    });\n  };\n}\n\nconst getShimInstantSlots = getInstantSlots;\n\nconst ShimInstantRecord = /*@__PURE__*/ defineTemporalClass(InstantRecordBranding, class {\n  get epochMilliseconds() {\n    return epochNanoToMilli(getShimInstantSlots(this).epochNanoseconds);\n  }\n  get epochNanoseconds() {\n    return getShimInstantSlots(this).epochNanoseconds;\n  }\n  toJSON() {\n    return formatInstantIsoAuto(getShimInstantSlots(this));\n  }\n  valueOf() {\n    return forbiddenValueOf();\n  }\n});\n\nfunction createShimInstantRecord(slots) {\n  const instance = Object.create(ShimInstantRecord.prototype);\n  return setInstantSlots(instance, slots), attachDebugString(instance), instance;\n}\n\nfunction create(epochNanoseconds) {\n  const epochNano = checkEpochNanoInBounds(toBigInt(epochNanoseconds));\n  return createShimInstantRecord(createEpochNanoSlots(epochNano));\n}\n\nfunction fromEpochMilliseconds(epochMilliseconds) {\n  return createShimInstantRecord(epochMilliToInstant(epochMilliseconds));\n}\n\nfunction fromEpochNanoseconds(epochNanoseconds) {\n  return createShimInstantRecord(epochNanoToInstant(epochNanoseconds));\n}\n\nfunction fromString(s) {\n  return createShimInstantRecord(parseInstant(s));\n}\n\nfunction add(record, durationRecord) {\n  const slots = getShimInstantSlots(record);\n  const durationSlots = getShimDurationSlots(durationRecord);\n  return createShimInstantRecord(createEpochNanoSlots(moveEpochNano(slots.epochNanoseconds, durationSlots)));\n}\n\nfunction subtract(record, durationRecord) {\n  const slots = getShimInstantSlots(record);\n  const durationSlots = getShimDurationSlots(durationRecord);\n  return createShimInstantRecord(createEpochNanoSlots(moveEpochNano(slots.epochNanoseconds, negateDurationFields(durationSlots))));\n}\n\nfunction diff(record, otherRecord, options) {\n  const slots = getShimInstantSlots(record);\n  const otherSlots = getShimInstantSlots(otherRecord);\n  return createShimDurationRecord(diffInstants(0, slots, otherSlots, options));\n}\n\nfunction equals(record, otherRecord) {\n  const slots = getShimInstantSlots(record);\n  const otherSlots = getShimInstantSlots(otherRecord);\n  return instantsEqual(slots, otherSlots);\n}\n\nfunction compare(record, otherRecord) {\n  const slots = getShimInstantSlots(record);\n  const otherSlots = getShimInstantSlots(otherRecord);\n  return compareZonedEpochSlots(slots, otherSlots);\n}\n\nfunction toZonedDateTimeISO(record, timeZoneId) {\n  return createShimZonedDateTimeRecord(instantToZonedDateTime(getShimInstantSlots(record), queryTimeZone(refineTimeZoneId(timeZoneId))));\n}\n\nconst createFormat = /*@__PURE__*/ createDateTimeFormatFactory(internals => ({\n  A(record) {\n    const slots = getShimInstantSlots(record);\n    return [ internals.t, epochNanoToMilli(slots.epochNanoseconds) ];\n  },\n  v(record0, record1) {\n    const slots0 = getShimInstantSlots(record0);\n    const slots1 = getShimInstantSlots(record1);\n    return [ internals.t, epochNanoToMilli(slots0.epochNanoseconds), epochNanoToMilli(slots1.epochNanoseconds) ];\n  }\n}), options => transformInstantOptions(options, 1));\n\nfunction toLocaleString(record, locales = void 0, options = {}) {\n  const slots = getShimInstantSlots(record);\n  return new RawDateTimeFormat(locales, transformInstantOptions(options)).format(epochNanoToMilli(slots.epochNanoseconds));\n}\n\nfunction toString(record, options) {\n  return formatInstantIso(refineTimeZoneId, getShimInstantSlots(record), options);\n}\n\nfunction toBasicString(record) {\n  return formatInstantIsoAuto(getShimInstantSlots(record));\n}\n\nfunction toTemporal(record) {\n  const slots = getShimInstantSlots(record);\n  return new Temporal.Instant(slots.epochNanoseconds);\n}\n\nfunction moveByNanoseconds(record, nanoseconds) {\n  const slots = getShimInstantSlots(record);\n  return createShimInstantRecord(createEpochNanoSlots(moveEpochNanoByNano(slots.epochNanoseconds, nanoseconds)));\n}\n\nfunction addHours(record, hours) {\n  return moveByNanoseconds(record, BigInt(toStrictInteger(hours)) * bigNanoInHour);\n}\n\nfunction addMinutes(record, minutes) {\n  return moveByNanoseconds(record, BigInt(toStrictInteger(minutes)) * bigNanoInMinute);\n}\n\nfunction addSeconds(record, seconds) {\n  return moveByNanoseconds(record, BigInt(toStrictInteger(seconds)) * bigNanoInSec);\n}\n\nfunction addMilliseconds(record, milliseconds) {\n  return moveByNanoseconds(record, BigInt(toStrictInteger(milliseconds)) * bigNanoInMilli);\n}\n\nfunction addMicroseconds(record, microseconds) {\n  return moveByNanoseconds(record, BigInt(toStrictInteger(microseconds)) * bigNanoInMicro);\n}\n\nfunction addNanoseconds(record, nanoseconds) {\n  return moveByNanoseconds(record, BigInt(toStrictInteger(nanoseconds)));\n}\n\nfunction subtractHours(record, hours) {\n  return moveByNanoseconds(record, -BigInt(toStrictInteger(hours)) * bigNanoInHour);\n}\n\nfunction subtractMinutes(record, minutes) {\n  return moveByNanoseconds(record, -BigInt(toStrictInteger(minutes)) * bigNanoInMinute);\n}\n\nfunction subtractSeconds(record, seconds) {\n  return moveByNanoseconds(record, -BigInt(toStrictInteger(seconds)) * bigNanoInSec);\n}\n\nfunction subtractMilliseconds(record, milliseconds) {\n  return moveByNanoseconds(record, -BigInt(toStrictInteger(milliseconds)) * bigNanoInMilli);\n}\n\nfunction subtractMicroseconds(record, microseconds) {\n  return moveByNanoseconds(record, -BigInt(toStrictInteger(microseconds)) * bigNanoInMicro);\n}\n\nfunction subtractNanoseconds(record, nanoseconds) {\n  return moveByNanoseconds(record, -BigInt(toStrictInteger(nanoseconds)));\n}\n\nfunction roundToUnit(smallestUnit, record, options) {\n  const slots = getShimInstantSlots(record);\n  const [roundingInc, roundingMode] = refineUnitRoundOptions(smallestUnit, options, 1);\n  return createShimInstantRecord(createEpochNanoSlots(roundBigNanoToDayOriginInc(slots.epochNanoseconds, computeBigNanoInc(smallestUnit, roundingInc), roundingMode)));\n}\n\nconst roundToHour = /*@__PURE__*/ bindArgs(roundToUnit, 5);\n\nconst roundToMinute = /*@__PURE__*/ bindArgs(roundToUnit, 4);\n\nconst roundToSecond = /*@__PURE__*/ bindArgs(roundToUnit, 3);\n\nconst roundToMillisecond = /*@__PURE__*/ bindArgs(roundToUnit, 2);\n\nconst roundToMicrosecond = /*@__PURE__*/ bindArgs(roundToUnit, 1);\n\nconst diffRecordTimeUnit = /*@__PURE__*/ adaptRecordTimeUnitDiff(diffInstantEpochNanoTimeUnit, getShimInstantSlots);\n\nconst diffHours = /*@__PURE__*/ bindArgs(diffRecordTimeUnit, 5);\n\nconst diffMinutes = /*@__PURE__*/ bindArgs(diffRecordTimeUnit, 4);\n\nconst diffSeconds = /*@__PURE__*/ bindArgs(diffRecordTimeUnit, 3);\n\nconst diffMilliseconds = /*@__PURE__*/ bindArgs(diffRecordTimeUnit, 2);\n\nconst diffMicroseconds = /*@__PURE__*/ bindArgs(diffRecordTimeUnit, 1);\n\nconst diffNanoseconds = /*@__PURE__*/ bindArgs(diffRecordTimeUnit, 0);\n\nconst timeZoneId = getCurrentTimeZoneId;\n\nfunction instant() {\n  return createShimInstantRecord(createEpochNanoSlots(getCurrentEpochNano()));\n}\n\nfunction zonedDateTimeISO(timeZoneId = getCurrentTimeZoneId()) {\n  const timeZone = queryTimeZone(refineTimeZoneId(timeZoneId));\n  return createShimZonedDateTimeRecord(createZonedEpochNanoSlots(getCurrentEpochNano(), timeZone));\n}\n\nfunction plainDateTimeISO(timeZoneId = getCurrentTimeZoneId()) {\n  const isoDateTime = getCurrentIsoDateTime(queryTimeZone(refineTimeZoneId(timeZoneId)));\n  return createShimPlainDateTimeRecord(createDateTimeSlots(isoDateTime));\n}\n\nfunction plainDateISO(timeZoneId = getCurrentTimeZoneId()) {\n  const isoDateTime = getCurrentIsoDateTime(queryTimeZone(refineTimeZoneId(timeZoneId)));\n  return createShimPlainDateRecord(createDateSlots(isoDateTime));\n}\n\nfunction plainTimeISO(timeZoneId = getCurrentTimeZoneId()) {\n  const isoDateTime = getCurrentIsoDateTime(queryTimeZone(refineTimeZoneId(timeZoneId)));\n  return createShimPlainTimeRecord(createTimeSlots(isoDateTime));\n}\n\nexport { abs, add, add$1, add$4 as add$2, add$2 as add$3, add$5 as add$4, add$3 as add$5, add$6, addDays, addDays$2 as addDays$1, addDays$1 as addDays$2, addHours, addHours$1, addHours$2, addHours$3, addMicroseconds, addMicroseconds$1, addMicroseconds$2, addMicroseconds$3, addMilliseconds, addMilliseconds$1, addMilliseconds$2, addMilliseconds$3, addMinutes, addMinutes$1, addMinutes$2, addMinutes$3, addMonths, addMonths$3 as addMonths$1, addMonths$1 as addMonths$2, addMonths$2 as addMonths$3, addNanoseconds, addNanoseconds$1, addNanoseconds$2, addNanoseconds$3, addSeconds, addSeconds$1, addSeconds$2, addSeconds$3, addWeeks, addWeeks$2 as addWeeks$1, addWeeks$1 as addWeeks$2, addYears, addYears$3 as addYears$1, addYears$1 as addYears$2, addYears$2 as addYears$3, blank, compare, compare$1, compare$4 as compare$2, compare$2 as compare$3, compare$5 as compare$4, compare$3 as compare$5, compare$6, create, create$1, create$5 as create$2, create$2 as create$3, create$6 as create$4, create$3 as create$5, create$4 as create$6, create$7, createFormat, createFormat$4 as createFormat$1, createFormat$1 as createFormat$2, createFormat$5 as createFormat$3, createFormat$2 as createFormat$4, createFormat$3 as createFormat$5, dayOfWeek, dayOfWeek$2 as dayOfWeek$1, dayOfWeek$1 as dayOfWeek$2, dayOfYear, dayOfYear$2 as dayOfYear$1, dayOfYear$1 as dayOfYear$2, daysInMonth, daysInMonth$3 as daysInMonth$1, daysInMonth$1 as daysInMonth$2, daysInMonth$2 as daysInMonth$3, daysInWeek, daysInWeek$2 as daysInWeek$1, daysInWeek$1 as daysInWeek$2, daysInYear, daysInYear$3 as daysInYear$1, daysInYear$1 as daysInYear$2, daysInYear$2 as daysInYear$3, diff, diff$1, diff$4 as diff$2, diff$2 as diff$3, diff$5 as diff$4, diff$3 as diff$5, diffDays, diffDays$2 as diffDays$1, diffDays$1 as diffDays$2, diffHours, diffHours$1, diffHours$2, diffHours$3, diffMicroseconds, diffMicroseconds$1, diffMicroseconds$2, diffMicroseconds$3, diffMilliseconds, diffMilliseconds$1, diffMilliseconds$2, diffMilliseconds$3, diffMinutes, diffMinutes$1, diffMinutes$2, diffMinutes$3, diffMonths, diffMonths$3 as diffMonths$1, diffMonths$1 as diffMonths$2, diffMonths$2 as diffMonths$3, diffNanoseconds, diffNanoseconds$1, diffNanoseconds$2, diffNanoseconds$3, diffSeconds, diffSeconds$1, diffSeconds$2, diffSeconds$3, diffWeeks, diffWeeks$2 as diffWeeks$1, diffWeeks$1 as diffWeeks$2, diffYears, diffYears$3 as diffYears$1, diffYears$1 as diffYears$2, diffYears$2 as diffYears$3, endOfDay, endOfDay$1, endOfHour, endOfHour$1, endOfHour$2, endOfMicrosecond, endOfMicrosecond$1, endOfMicrosecond$2, endOfMillisecond, endOfMillisecond$1, endOfMillisecond$2, endOfMinute, endOfMinute$1, endOfMinute$2, endOfMonth, endOfMonth$2 as endOfMonth$1, endOfMonth$1 as endOfMonth$2, endOfSecond, endOfSecond$1, endOfSecond$2, endOfWeek, endOfWeek$2 as endOfWeek$1, endOfWeek$1 as endOfWeek$2, endOfYear, endOfYear$3 as endOfYear$1, endOfYear$1 as endOfYear$2, endOfYear$2 as endOfYear$3, equals, equals$1, equals$5 as equals$2, equals$2 as equals$3, equals$6 as equals$4, equals$3 as equals$5, equals$4 as equals$6, fromEpochMilliseconds, fromEpochNanoseconds, fromFields, fromFields$4 as fromFields$1, fromFields$1 as fromFields$2, fromFields$5 as fromFields$3, fromFields$2 as fromFields$4, fromFields$3 as fromFields$5, fromFields$6, fromString, fromString$1, fromString$5 as fromString$2, fromString$2 as fromString$3, fromString$6 as fromString$4, fromString$3 as fromString$5, fromString$4 as fromString$6, fromString$7, getTimeZoneTransition, hoursInDay, inLeapYear, inLeapYear$3 as inLeapYear$1, inLeapYear$1 as inLeapYear$2, inLeapYear$2 as inLeapYear$3, instant, monthsInYear, monthsInYear$3 as monthsInYear$1, monthsInYear$1 as monthsInYear$2, monthsInYear$2 as monthsInYear$3, negated, offset, offsetNanoseconds, plainDateISO, plainDateTimeISO, plainTimeISO, round, roundToDay, roundToDay$1, roundToHour, roundToHour$1, roundToHour$2, roundToHour$3, roundToMicrosecond, roundToMicrosecond$1, roundToMicrosecond$2, roundToMicrosecond$3, roundToMillisecond, roundToMillisecond$1, roundToMillisecond$2, roundToMillisecond$3, roundToMinute, roundToMinute$1, roundToMinute$2, roundToMinute$3, roundToMonth, roundToMonth$2 as roundToMonth$1, roundToMonth$1 as roundToMonth$2, roundToSecond, roundToSecond$1, roundToSecond$2, roundToSecond$3, roundToWeek, roundToWeek$2 as roundToWeek$1, roundToWeek$1 as roundToWeek$2, roundToYear, roundToYear$3 as roundToYear$1, roundToYear$1 as roundToYear$2, roundToYear$2 as roundToYear$3, sign, startOfDay, startOfDay$1, startOfHour, startOfHour$1, startOfHour$2, startOfMicrosecond, startOfMicrosecond$1, startOfMicrosecond$2, startOfMillisecond, startOfMillisecond$1, startOfMillisecond$2, startOfMinute, startOfMinute$1, startOfMinute$2, startOfMonth, startOfMonth$2 as startOfMonth$1, startOfMonth$1 as startOfMonth$2, startOfSecond, startOfSecond$1, startOfSecond$2, startOfWeek, startOfWeek$2 as startOfWeek$1, startOfWeek$1 as startOfWeek$2, startOfYear, startOfYear$3 as startOfYear$1, startOfYear$1 as startOfYear$2, startOfYear$2 as startOfYear$3, subtract, subtract$1, subtract$4 as subtract$2, subtract$2 as subtract$3, subtract$5 as subtract$4, subtract$3 as subtract$5, subtract$6, subtractDays, subtractDays$2 as subtractDays$1, subtractDays$1 as subtractDays$2, subtractHours, subtractHours$1, subtractHours$2, subtractHours$3, subtractMicroseconds, subtractMicroseconds$1, subtractMicroseconds$2, subtractMicroseconds$3, subtractMilliseconds, subtractMilliseconds$1, subtractMilliseconds$2, subtractMilliseconds$3, subtractMinutes, subtractMinutes$1, subtractMinutes$2, subtractMinutes$3, subtractMonths, subtractMonths$3 as subtractMonths$1, subtractMonths$1 as subtractMonths$2, subtractMonths$2 as subtractMonths$3, subtractNanoseconds, subtractNanoseconds$1, subtractNanoseconds$2, subtractNanoseconds$3, subtractSeconds, subtractSeconds$1, subtractSeconds$2, subtractSeconds$3, subtractWeeks, subtractWeeks$2 as subtractWeeks$1, subtractWeeks$1 as subtractWeeks$2, subtractYears, subtractYears$3 as subtractYears$1, subtractYears$1 as subtractYears$2, subtractYears$2 as subtractYears$3, timeZoneId, toBasicString, toBasicString$1, toBasicString$5 as toBasicString$2, toBasicString$2 as toBasicString$3, toBasicString$6 as toBasicString$4, toBasicString$3 as toBasicString$5, toBasicString$4 as toBasicString$6, toBasicString$7, toInstant, toLocaleString, toLocaleString$1, toLocaleString$5 as toLocaleString$2, toLocaleString$2 as toLocaleString$3, toLocaleString$6 as toLocaleString$4, toLocaleString$3 as toLocaleString$5, toLocaleString$4 as toLocaleString$6, toLocaleString$7, toPlainDate, toPlainDate$3 as toPlainDate$1, toPlainDate$1 as toPlainDate$2, toPlainDate$2 as toPlainDate$3, toPlainDateTime, toPlainDateTime$1, toPlainMonthDay, toPlainTime, toPlainTime$1, toPlainYearMonth, toString, toString$1, toString$5 as toString$2, toString$2 as toString$3, toString$6 as toString$4, toString$3 as toString$5, toString$4 as toString$6, toString$7, toTemporal, toTemporal$1, toTemporal$5 as toTemporal$2, toTemporal$2 as toTemporal$3, toTemporal$6 as toTemporal$4, toTemporal$3 as toTemporal$5, toTemporal$4 as toTemporal$6, toTemporal$7, toZonedDateTime$1 as toZonedDateTime, toZonedDateTime as toZonedDateTime$1, toZonedDateTimeISO, total, weekOfYear, weekOfYear$2 as weekOfYear$1, weekOfYear$1 as weekOfYear$2, withCalendar, withCalendar$2 as withCalendar$1, withCalendar$1 as withCalendar$2, withDayOfMonth, withDayOfMonth$2 as withDayOfMonth$1, withDayOfMonth$1 as withDayOfMonth$2, withDayOfWeek, withDayOfWeek$2 as withDayOfWeek$1, withDayOfWeek$1 as withDayOfWeek$2, withDayOfYear, withDayOfYear$2 as withDayOfYear$1, withDayOfYear$1 as withDayOfYear$2, withFields, withFields$4 as withFields$1, withFields$1 as withFields$2, withFields$5 as withFields$3, withFields$2 as withFields$4, withFields$3 as withFields$5, withFields$6, withPlainTime, withPlainTime$1, withTimeZone, withWeekOfYear, withWeekOfYear$2 as withWeekOfYear$1, withWeekOfYear$1 as withWeekOfYear$2, yearOfWeek, yearOfWeek$2 as yearOfWeek$1, yearOfWeek$1 as yearOfWeek$2, zonedDateTimeISO };\n","import { NativeTemporal } from \"../chunks/root.js\";\n\nimport { create$1, fromFields as fromFields$1, fromString$1, withFields as withFields$1, withCalendar as withCalendar$1, withTimeZone as withTimeZone$1, withPlainTime as withPlainTime$1, offsetNanoseconds as offsetNanoseconds$1, offset as offset$1, dayOfWeek as dayOfWeek$1, daysInWeek as daysInWeek$1, weekOfYear as weekOfYear$1, yearOfWeek as yearOfWeek$1, dayOfYear as dayOfYear$1, daysInMonth as daysInMonth$1, daysInYear as daysInYear$1, monthsInYear as monthsInYear$1, inLeapYear as inLeapYear$1, hoursInDay as hoursInDay$1, toString$1, toBasicString$1, add$1, subtract$1, diff$1, startOfDay as startOfDay$1, getTimeZoneTransition as getTimeZoneTransition$1, equals$1, compare$1, toLocaleString$1, toInstant as toInstant$1, toPlainDateTime as toPlainDateTime$1, toPlainDate as toPlainDate$1, toPlainTime as toPlainTime$1, toTemporal$1, withDayOfYear as withDayOfYear$1, withDayOfMonth as withDayOfMonth$1, withDayOfWeek as withDayOfWeek$1, withWeekOfYear as withWeekOfYear$1, addYears as addYears$1, addMonths as addMonths$1, addWeeks as addWeeks$1, addDays as addDays$1, addHours$1, addMinutes$1, addSeconds$1, addMilliseconds$1, addMicroseconds$1, addNanoseconds$1, subtractYears as subtractYears$1, subtractMonths as subtractMonths$1, subtractWeeks as subtractWeeks$1, subtractDays as subtractDays$1, subtractHours$1, subtractMinutes$1, subtractSeconds$1, subtractMilliseconds$1, subtractMicroseconds$1, subtractNanoseconds$1, roundToYear as roundToYear$1, roundToMonth as roundToMonth$1, roundToWeek as roundToWeek$1, roundToDay as roundToDay$1, roundToHour$1, roundToMinute$1, roundToSecond$1, roundToMillisecond$1, roundToMicrosecond$1, startOfYear as startOfYear$1, startOfMonth as startOfMonth$1, startOfWeek as startOfWeek$1, startOfHour as startOfHour$1, startOfMinute as startOfMinute$1, startOfSecond as startOfSecond$1, startOfMillisecond as startOfMillisecond$1, startOfMicrosecond as startOfMicrosecond$1, endOfYear as endOfYear$1, endOfMonth as endOfMonth$1, endOfWeek as endOfWeek$1, endOfDay as endOfDay$1, endOfHour as endOfHour$1, endOfMinute as endOfMinute$1, endOfSecond as endOfSecond$1, endOfMillisecond as endOfMillisecond$1, endOfMicrosecond as endOfMicrosecond$1, diffYears as diffYears$1, diffMonths as diffMonths$1, diffWeeks as diffWeeks$1, diffDays as diffDays$1, diffHours$1, diffMinutes$1, diffSeconds$1, diffMilliseconds$1, diffMicroseconds$1, diffNanoseconds$1 } from \"../chunks/funcApi-native.js\";\n\nimport { create$1 as create$2, fromFields as fromFields$2, fromString$1 as fromString$2, withFields as withFields$2, withCalendar as withCalendar$2, withTimeZone as withTimeZone$2, withPlainTime as withPlainTime$2, offsetNanoseconds as offsetNanoseconds$2, offset as offset$2, dayOfWeek as dayOfWeek$2, daysInWeek as daysInWeek$2, weekOfYear as weekOfYear$2, yearOfWeek as yearOfWeek$2, dayOfYear as dayOfYear$2, daysInMonth as daysInMonth$2, daysInYear as daysInYear$2, monthsInYear as monthsInYear$2, inLeapYear as inLeapYear$2, hoursInDay as hoursInDay$2, toString$1 as toString$2, toBasicString$1 as toBasicString$2, add$1 as add$2, subtract$1 as subtract$2, diff$1 as diff$2, startOfDay as startOfDay$2, getTimeZoneTransition as getTimeZoneTransition$2, equals$1 as equals$2, compare$1 as compare$2, toLocaleString$1 as toLocaleString$2, toInstant as toInstant$2, toPlainDateTime as toPlainDateTime$2, toPlainDate as toPlainDate$2, toPlainTime as toPlainTime$2, toTemporal$1 as toTemporal$2, withDayOfYear as withDayOfYear$2, withDayOfMonth as withDayOfMonth$2, withDayOfWeek as withDayOfWeek$2, withWeekOfYear as withWeekOfYear$2, addYears as addYears$2, addMonths as addMonths$2, addWeeks as addWeeks$2, addDays as addDays$2, addHours$1 as addHours$2, addMinutes$1 as addMinutes$2, addSeconds$1 as addSeconds$2, addMilliseconds$1 as addMilliseconds$2, addMicroseconds$1 as addMicroseconds$2, addNanoseconds$1 as addNanoseconds$2, subtractYears as subtractYears$2, subtractMonths as subtractMonths$2, subtractWeeks as subtractWeeks$2, subtractDays as subtractDays$2, subtractHours$1 as subtractHours$2, subtractMinutes$1 as subtractMinutes$2, subtractSeconds$1 as subtractSeconds$2, subtractMilliseconds$1 as subtractMilliseconds$2, subtractMicroseconds$1 as subtractMicroseconds$2, subtractNanoseconds$1 as subtractNanoseconds$2, roundToYear as roundToYear$2, roundToMonth as roundToMonth$2, roundToWeek as roundToWeek$2, roundToDay as roundToDay$2, roundToHour$1 as roundToHour$2, roundToMinute$1 as roundToMinute$2, roundToSecond$1 as roundToSecond$2, roundToMillisecond$1 as roundToMillisecond$2, roundToMicrosecond$1 as roundToMicrosecond$2, startOfYear as startOfYear$2, startOfMonth as startOfMonth$2, startOfWeek as startOfWeek$2, startOfHour as startOfHour$2, startOfMinute as startOfMinute$2, startOfSecond as startOfSecond$2, startOfMillisecond as startOfMillisecond$2, startOfMicrosecond as startOfMicrosecond$2, endOfYear as endOfYear$2, endOfMonth as endOfMonth$2, endOfWeek as endOfWeek$2, endOfDay as endOfDay$2, endOfHour as endOfHour$2, endOfMinute as endOfMinute$2, endOfSecond as endOfSecond$2, endOfMillisecond as endOfMillisecond$2, endOfMicrosecond as endOfMicrosecond$2, diffYears as diffYears$2, diffMonths as diffMonths$2, diffWeeks as diffWeeks$2, diffDays as diffDays$2, diffHours$1 as diffHours$2, diffMinutes$1 as diffMinutes$2, diffSeconds$1 as diffSeconds$2, diffMilliseconds$1 as diffMilliseconds$2, diffMicroseconds$1 as diffMicroseconds$2, diffNanoseconds$1 as diffNanoseconds$2 } from \"../chunks/funcApi-shim.js\";\n\nimport { isZonedDateTimeRecord } from \"../chunks/funcApi.js\";\n\nconst create = NativeTemporal ? create$1 : create$2;\n\nconst isRecord = isZonedDateTimeRecord;\n\nconst fromFields = NativeTemporal ? fromFields$1 : fromFields$2;\n\nconst fromString = NativeTemporal ? fromString$1 : fromString$2;\n\nconst withFields = NativeTemporal ? withFields$1 : withFields$2;\n\nconst withCalendar = NativeTemporal ? withCalendar$1 : withCalendar$2;\n\nconst withTimeZone = NativeTemporal ? withTimeZone$1 : withTimeZone$2;\n\nconst withPlainTime = NativeTemporal ? withPlainTime$1 : withPlainTime$2;\n\nconst offsetNanoseconds = NativeTemporal ? offsetNanoseconds$1 : offsetNanoseconds$2;\n\nconst offset = NativeTemporal ? offset$1 : offset$2;\n\nconst dayOfWeek = NativeTemporal ? dayOfWeek$1 : dayOfWeek$2;\n\nconst daysInWeek = NativeTemporal ? daysInWeek$1 : daysInWeek$2;\n\nconst weekOfYear = NativeTemporal ? weekOfYear$1 : weekOfYear$2;\n\nconst yearOfWeek = NativeTemporal ? yearOfWeek$1 : yearOfWeek$2;\n\nconst dayOfYear = NativeTemporal ? dayOfYear$1 : dayOfYear$2;\n\nconst daysInMonth = NativeTemporal ? daysInMonth$1 : daysInMonth$2;\n\nconst daysInYear = NativeTemporal ? daysInYear$1 : daysInYear$2;\n\nconst monthsInYear = NativeTemporal ? monthsInYear$1 : monthsInYear$2;\n\nconst inLeapYear = NativeTemporal ? inLeapYear$1 : inLeapYear$2;\n\nconst hoursInDay = NativeTemporal ? hoursInDay$1 : hoursInDay$2;\n\nconst toString = NativeTemporal ? toString$1 : toString$2;\n\nconst toBasicString = NativeTemporal ? toBasicString$1 : toBasicString$2;\n\nconst add = NativeTemporal ? add$1 : add$2;\n\nconst subtract = NativeTemporal ? subtract$1 : subtract$2;\n\nconst diff = NativeTemporal ? diff$1 : diff$2;\n\nconst startOfDay = NativeTemporal ? startOfDay$1 : startOfDay$2;\n\nconst getTimeZoneTransition = NativeTemporal ? getTimeZoneTransition$1 : getTimeZoneTransition$2;\n\nconst equals = NativeTemporal ? equals$1 : equals$2;\n\nconst compare = NativeTemporal ? compare$1 : compare$2;\n\nconst toLocaleString = NativeTemporal ? toLocaleString$1 : toLocaleString$2;\n\nconst toInstant = NativeTemporal ? toInstant$1 : toInstant$2;\n\nconst toPlainDateTime = NativeTemporal ? toPlainDateTime$1 : toPlainDateTime$2;\n\nconst toPlainDate = NativeTemporal ? toPlainDate$1 : toPlainDate$2;\n\nconst toPlainTime = NativeTemporal ? toPlainTime$1 : toPlainTime$2;\n\nconst toTemporal = NativeTemporal ? toTemporal$1 : toTemporal$2;\n\nconst withDayOfYear = NativeTemporal ? withDayOfYear$1 : withDayOfYear$2;\n\nconst withDayOfMonth = NativeTemporal ? withDayOfMonth$1 : withDayOfMonth$2;\n\nconst withDayOfWeek = NativeTemporal ? withDayOfWeek$1 : withDayOfWeek$2;\n\nconst withWeekOfYear = NativeTemporal ? withWeekOfYear$1 : withWeekOfYear$2;\n\nconst addYears = NativeTemporal ? addYears$1 : addYears$2;\n\nconst addMonths = NativeTemporal ? addMonths$1 : addMonths$2;\n\nconst addWeeks = NativeTemporal ? addWeeks$1 : addWeeks$2;\n\nconst addDays = NativeTemporal ? addDays$1 : addDays$2;\n\nconst addHours = NativeTemporal ? addHours$1 : addHours$2;\n\nconst addMinutes = NativeTemporal ? addMinutes$1 : addMinutes$2;\n\nconst addSeconds = NativeTemporal ? addSeconds$1 : addSeconds$2;\n\nconst addMilliseconds = NativeTemporal ? addMilliseconds$1 : addMilliseconds$2;\n\nconst addMicroseconds = NativeTemporal ? addMicroseconds$1 : addMicroseconds$2;\n\nconst addNanoseconds = NativeTemporal ? addNanoseconds$1 : addNanoseconds$2;\n\nconst subtractYears = NativeTemporal ? subtractYears$1 : subtractYears$2;\n\nconst subtractMonths = NativeTemporal ? subtractMonths$1 : subtractMonths$2;\n\nconst subtractWeeks = NativeTemporal ? subtractWeeks$1 : subtractWeeks$2;\n\nconst subtractDays = NativeTemporal ? subtractDays$1 : subtractDays$2;\n\nconst subtractHours = NativeTemporal ? subtractHours$1 : subtractHours$2;\n\nconst subtractMinutes = NativeTemporal ? subtractMinutes$1 : subtractMinutes$2;\n\nconst subtractSeconds = NativeTemporal ? subtractSeconds$1 : subtractSeconds$2;\n\nconst subtractMilliseconds = NativeTemporal ? subtractMilliseconds$1 : subtractMilliseconds$2;\n\nconst subtractMicroseconds = NativeTemporal ? subtractMicroseconds$1 : subtractMicroseconds$2;\n\nconst subtractNanoseconds = NativeTemporal ? subtractNanoseconds$1 : subtractNanoseconds$2;\n\nconst roundToYear = NativeTemporal ? roundToYear$1 : roundToYear$2;\n\nconst roundToMonth = NativeTemporal ? roundToMonth$1 : roundToMonth$2;\n\nconst roundToWeek = NativeTemporal ? roundToWeek$1 : roundToWeek$2;\n\nconst roundToDay = NativeTemporal ? roundToDay$1 : roundToDay$2;\n\nconst roundToHour = NativeTemporal ? roundToHour$1 : roundToHour$2;\n\nconst roundToMinute = NativeTemporal ? roundToMinute$1 : roundToMinute$2;\n\nconst roundToSecond = NativeTemporal ? roundToSecond$1 : roundToSecond$2;\n\nconst roundToMillisecond = NativeTemporal ? roundToMillisecond$1 : roundToMillisecond$2;\n\nconst roundToMicrosecond = NativeTemporal ? roundToMicrosecond$1 : roundToMicrosecond$2;\n\nconst startOfYear = NativeTemporal ? startOfYear$1 : startOfYear$2;\n\nconst startOfMonth = NativeTemporal ? startOfMonth$1 : startOfMonth$2;\n\nconst startOfWeek = NativeTemporal ? startOfWeek$1 : startOfWeek$2;\n\nconst startOfHour = NativeTemporal ? startOfHour$1 : startOfHour$2;\n\nconst startOfMinute = NativeTemporal ? startOfMinute$1 : startOfMinute$2;\n\nconst startOfSecond = NativeTemporal ? startOfSecond$1 : startOfSecond$2;\n\nconst startOfMillisecond = NativeTemporal ? startOfMillisecond$1 : startOfMillisecond$2;\n\nconst startOfMicrosecond = NativeTemporal ? startOfMicrosecond$1 : startOfMicrosecond$2;\n\nconst endOfYear = NativeTemporal ? endOfYear$1 : endOfYear$2;\n\nconst endOfMonth = NativeTemporal ? endOfMonth$1 : endOfMonth$2;\n\nconst endOfWeek = NativeTemporal ? endOfWeek$1 : endOfWeek$2;\n\nconst endOfDay = NativeTemporal ? endOfDay$1 : endOfDay$2;\n\nconst endOfHour = NativeTemporal ? endOfHour$1 : endOfHour$2;\n\nconst endOfMinute = NativeTemporal ? endOfMinute$1 : endOfMinute$2;\n\nconst endOfSecond = NativeTemporal ? endOfSecond$1 : endOfSecond$2;\n\nconst endOfMillisecond = NativeTemporal ? endOfMillisecond$1 : endOfMillisecond$2;\n\nconst endOfMicrosecond = NativeTemporal ? endOfMicrosecond$1 : endOfMicrosecond$2;\n\nconst diffYears = NativeTemporal ? diffYears$1 : diffYears$2;\n\nconst diffMonths = NativeTemporal ? diffMonths$1 : diffMonths$2;\n\nconst diffWeeks = NativeTemporal ? diffWeeks$1 : diffWeeks$2;\n\nconst diffDays = NativeTemporal ? diffDays$1 : diffDays$2;\n\nconst diffHours = NativeTemporal ? diffHours$1 : diffHours$2;\n\nconst diffMinutes = NativeTemporal ? diffMinutes$1 : diffMinutes$2;\n\nconst diffSeconds = NativeTemporal ? diffSeconds$1 : diffSeconds$2;\n\nconst diffMilliseconds = NativeTemporal ? diffMilliseconds$1 : diffMilliseconds$2;\n\nconst diffMicroseconds = NativeTemporal ? diffMicroseconds$1 : diffMicroseconds$2;\n\nconst diffNanoseconds = NativeTemporal ? diffNanoseconds$1 : diffNanoseconds$2;\n\nexport { add, addDays, addHours, addMicroseconds, addMilliseconds, addMinutes, addMonths, addNanoseconds, addSeconds, addWeeks, addYears, compare, create, dayOfWeek, dayOfYear, daysInMonth, daysInWeek, daysInYear, diff, diffDays, diffHours, diffMicroseconds, diffMilliseconds, diffMinutes, diffMonths, diffNanoseconds, diffSeconds, diffWeeks, diffYears, endOfDay, endOfHour, endOfMicrosecond, endOfMillisecond, endOfMinute, endOfMonth, endOfSecond, endOfWeek, endOfYear, equals, fromFields, fromString, getTimeZoneTransition, hoursInDay, inLeapYear, isRecord, monthsInYear, offset, offsetNanoseconds, roundToDay, roundToHour, roundToMicrosecond, roundToMillisecond, roundToMinute, roundToMonth, roundToSecond, roundToWeek, roundToYear, startOfDay, startOfHour, startOfMicrosecond, startOfMillisecond, startOfMinute, startOfMonth, startOfSecond, startOfWeek, startOfYear, subtract, subtractDays, subtractHours, subtractMicroseconds, subtractMilliseconds, subtractMinutes, subtractMonths, subtractNanoseconds, subtractSeconds, subtractWeeks, subtractYears, toBasicString, toInstant, toLocaleString, toPlainDate, toPlainDateTime, toPlainTime, toString, toTemporal, weekOfYear, withCalendar, withDayOfMonth, withDayOfWeek, withDayOfYear, withFields, withPlainTime, withTimeZone, withWeekOfYear, yearOfWeek };\n","import { NativeTemporal } from \"../chunks/root.js\";\n\nimport { create$2 as create$1, fromFields$1, fromString$2 as fromString$1, withCalendar$1, withFields$1, withPlainTime$1, dayOfWeek$1, daysInWeek$1, weekOfYear$1, yearOfWeek$1, dayOfYear$1, daysInMonth$1, daysInYear$1, monthsInYear$1, inLeapYear$1, add$2 as add$1, subtract$2 as subtract$1, diff$2 as diff$1, equals$2 as equals$1, compare$2 as compare$1, createFormat$1, toLocaleString$2 as toLocaleString$1, toString$2 as toString$1, toBasicString$2 as toBasicString$1, toZonedDateTime as toZonedDateTime$1, toPlainDate$1, toPlainTime$1, toTemporal$2 as toTemporal$1, withDayOfYear$1, withDayOfMonth$1, withDayOfWeek$1, withWeekOfYear$1, addYears$1, addMonths$1, addWeeks$1, addDays$1, addHours$2 as addHours$1, addMinutes$2 as addMinutes$1, addSeconds$2 as addSeconds$1, addMilliseconds$2 as addMilliseconds$1, addMicroseconds$2 as addMicroseconds$1, addNanoseconds$2 as addNanoseconds$1, subtractYears$1, subtractMonths$1, subtractWeeks$1, subtractDays$1, subtractHours$2 as subtractHours$1, subtractMinutes$2 as subtractMinutes$1, subtractSeconds$2 as subtractSeconds$1, subtractMilliseconds$2 as subtractMilliseconds$1, subtractMicroseconds$2 as subtractMicroseconds$1, subtractNanoseconds$2 as subtractNanoseconds$1, roundToYear$1, roundToMonth$1, roundToWeek$1, roundToDay$1, roundToHour$2 as roundToHour$1, roundToMinute$2 as roundToMinute$1, roundToSecond$2 as roundToSecond$1, roundToMillisecond$2 as roundToMillisecond$1, roundToMicrosecond$2 as roundToMicrosecond$1, startOfYear$1, startOfMonth$1, startOfWeek$1, startOfDay$1, startOfHour$1, startOfMinute$1, startOfSecond$1, startOfMillisecond$1, startOfMicrosecond$1, endOfYear$1, endOfMonth$1, endOfWeek$1, endOfDay$1, endOfHour$1, endOfMinute$1, endOfSecond$1, endOfMillisecond$1, endOfMicrosecond$1, diffYears$1, diffMonths$1, diffWeeks$1, diffDays$1, diffHours$2 as diffHours$1, diffMinutes$2 as diffMinutes$1, diffSeconds$2 as diffSeconds$1, diffMilliseconds$2 as diffMilliseconds$1, diffMicroseconds$2 as diffMicroseconds$1, diffNanoseconds$2 as diffNanoseconds$1 } from \"../chunks/funcApi-native.js\";\n\nimport { create$2, fromFields$1 as fromFields$2, fromString$2, withCalendar$1 as withCalendar$2, withFields$1 as withFields$2, withPlainTime$1 as withPlainTime$2, dayOfWeek$1 as dayOfWeek$2, daysInWeek$1 as daysInWeek$2, weekOfYear$1 as weekOfYear$2, yearOfWeek$1 as yearOfWeek$2, dayOfYear$1 as dayOfYear$2, daysInMonth$1 as daysInMonth$2, daysInYear$1 as daysInYear$2, monthsInYear$1 as monthsInYear$2, inLeapYear$1 as inLeapYear$2, add$2, subtract$2, diff$2, equals$2, compare$2, createFormat$1 as createFormat$2, toLocaleString$2, toString$2, toBasicString$2, toZonedDateTime as toZonedDateTime$2, toPlainDate$1 as toPlainDate$2, toPlainTime$1 as toPlainTime$2, toTemporal$2, withDayOfYear$1 as withDayOfYear$2, withDayOfMonth$1 as withDayOfMonth$2, withDayOfWeek$1 as withDayOfWeek$2, withWeekOfYear$1 as withWeekOfYear$2, addYears$1 as addYears$2, addMonths$1 as addMonths$2, addWeeks$1 as addWeeks$2, addDays$1 as addDays$2, addHours$2, addMinutes$2, addSeconds$2, addMilliseconds$2, addMicroseconds$2, addNanoseconds$2, subtractYears$1 as subtractYears$2, subtractMonths$1 as subtractMonths$2, subtractWeeks$1 as subtractWeeks$2, subtractDays$1 as subtractDays$2, subtractHours$2, subtractMinutes$2, subtractSeconds$2, subtractMilliseconds$2, subtractMicroseconds$2, subtractNanoseconds$2, roundToYear$1 as roundToYear$2, roundToMonth$1 as roundToMonth$2, roundToWeek$1 as roundToWeek$2, roundToDay$1 as roundToDay$2, roundToHour$2, roundToMinute$2, roundToSecond$2, roundToMillisecond$2, roundToMicrosecond$2, startOfYear$1 as startOfYear$2, startOfMonth$1 as startOfMonth$2, startOfWeek$1 as startOfWeek$2, startOfDay$1 as startOfDay$2, startOfHour$1 as startOfHour$2, startOfMinute$1 as startOfMinute$2, startOfSecond$1 as startOfSecond$2, startOfMillisecond$1 as startOfMillisecond$2, startOfMicrosecond$1 as startOfMicrosecond$2, endOfYear$1 as endOfYear$2, endOfMonth$1 as endOfMonth$2, endOfWeek$1 as endOfWeek$2, endOfDay$1 as endOfDay$2, endOfHour$1 as endOfHour$2, endOfMinute$1 as endOfMinute$2, endOfSecond$1 as endOfSecond$2, endOfMillisecond$1 as endOfMillisecond$2, endOfMicrosecond$1 as endOfMicrosecond$2, diffYears$1 as diffYears$2, diffMonths$1 as diffMonths$2, diffWeeks$1 as diffWeeks$2, diffDays$1 as diffDays$2, diffHours$2, diffMinutes$2, diffSeconds$2, diffMilliseconds$2, diffMicroseconds$2, diffNanoseconds$2 } from \"../chunks/funcApi-shim.js\";\n\nimport { isPlainDateTimeRecord } from \"../chunks/funcApi.js\";\n\nconst create = NativeTemporal ? create$1 : create$2;\n\nconst isRecord = isPlainDateTimeRecord;\n\nconst fromFields = NativeTemporal ? fromFields$1 : fromFields$2;\n\nconst fromString = NativeTemporal ? fromString$1 : fromString$2;\n\nconst withCalendar = NativeTemporal ? withCalendar$1 : withCalendar$2;\n\nconst withFields = NativeTemporal ? withFields$1 : withFields$2;\n\nconst withPlainTime = NativeTemporal ? withPlainTime$1 : withPlainTime$2;\n\nconst dayOfWeek = NativeTemporal ? dayOfWeek$1 : dayOfWeek$2;\n\nconst daysInWeek = NativeTemporal ? daysInWeek$1 : daysInWeek$2;\n\nconst weekOfYear = NativeTemporal ? weekOfYear$1 : weekOfYear$2;\n\nconst yearOfWeek = NativeTemporal ? yearOfWeek$1 : yearOfWeek$2;\n\nconst dayOfYear = NativeTemporal ? dayOfYear$1 : dayOfYear$2;\n\nconst daysInMonth = NativeTemporal ? daysInMonth$1 : daysInMonth$2;\n\nconst daysInYear = NativeTemporal ? daysInYear$1 : daysInYear$2;\n\nconst monthsInYear = NativeTemporal ? monthsInYear$1 : monthsInYear$2;\n\nconst inLeapYear = NativeTemporal ? inLeapYear$1 : inLeapYear$2;\n\nconst add = NativeTemporal ? add$1 : add$2;\n\nconst subtract = NativeTemporal ? subtract$1 : subtract$2;\n\nconst diff = NativeTemporal ? diff$1 : diff$2;\n\nconst equals = NativeTemporal ? equals$1 : equals$2;\n\nconst compare = NativeTemporal ? compare$1 : compare$2;\n\nconst createFormat = NativeTemporal ? createFormat$1 : createFormat$2;\n\nconst toLocaleString = NativeTemporal ? toLocaleString$1 : toLocaleString$2;\n\nconst toString = NativeTemporal ? toString$1 : toString$2;\n\nconst toBasicString = NativeTemporal ? toBasicString$1 : toBasicString$2;\n\nconst toZonedDateTime = NativeTemporal ? toZonedDateTime$1 : toZonedDateTime$2;\n\nconst toPlainDate = NativeTemporal ? toPlainDate$1 : toPlainDate$2;\n\nconst toPlainTime = NativeTemporal ? toPlainTime$1 : toPlainTime$2;\n\nconst toTemporal = NativeTemporal ? toTemporal$1 : toTemporal$2;\n\nconst withDayOfYear = NativeTemporal ? withDayOfYear$1 : withDayOfYear$2;\n\nconst withDayOfMonth = NativeTemporal ? withDayOfMonth$1 : withDayOfMonth$2;\n\nconst withDayOfWeek = NativeTemporal ? withDayOfWeek$1 : withDayOfWeek$2;\n\nconst withWeekOfYear = NativeTemporal ? withWeekOfYear$1 : withWeekOfYear$2;\n\nconst addYears = NativeTemporal ? addYears$1 : addYears$2;\n\nconst addMonths = NativeTemporal ? addMonths$1 : addMonths$2;\n\nconst addWeeks = NativeTemporal ? addWeeks$1 : addWeeks$2;\n\nconst addDays = NativeTemporal ? addDays$1 : addDays$2;\n\nconst addHours = NativeTemporal ? addHours$1 : addHours$2;\n\nconst addMinutes = NativeTemporal ? addMinutes$1 : addMinutes$2;\n\nconst addSeconds = NativeTemporal ? addSeconds$1 : addSeconds$2;\n\nconst addMilliseconds = NativeTemporal ? addMilliseconds$1 : addMilliseconds$2;\n\nconst addMicroseconds = NativeTemporal ? addMicroseconds$1 : addMicroseconds$2;\n\nconst addNanoseconds = NativeTemporal ? addNanoseconds$1 : addNanoseconds$2;\n\nconst subtractYears = NativeTemporal ? subtractYears$1 : subtractYears$2;\n\nconst subtractMonths = NativeTemporal ? subtractMonths$1 : subtractMonths$2;\n\nconst subtractWeeks = NativeTemporal ? subtractWeeks$1 : subtractWeeks$2;\n\nconst subtractDays = NativeTemporal ? subtractDays$1 : subtractDays$2;\n\nconst subtractHours = NativeTemporal ? subtractHours$1 : subtractHours$2;\n\nconst subtractMinutes = NativeTemporal ? subtractMinutes$1 : subtractMinutes$2;\n\nconst subtractSeconds = NativeTemporal ? subtractSeconds$1 : subtractSeconds$2;\n\nconst subtractMilliseconds = NativeTemporal ? subtractMilliseconds$1 : subtractMilliseconds$2;\n\nconst subtractMicroseconds = NativeTemporal ? subtractMicroseconds$1 : subtractMicroseconds$2;\n\nconst subtractNanoseconds = NativeTemporal ? subtractNanoseconds$1 : subtractNanoseconds$2;\n\nconst roundToYear = NativeTemporal ? roundToYear$1 : roundToYear$2;\n\nconst roundToMonth = NativeTemporal ? roundToMonth$1 : roundToMonth$2;\n\nconst roundToWeek = NativeTemporal ? roundToWeek$1 : roundToWeek$2;\n\nconst roundToDay = NativeTemporal ? roundToDay$1 : roundToDay$2;\n\nconst roundToHour = NativeTemporal ? roundToHour$1 : roundToHour$2;\n\nconst roundToMinute = NativeTemporal ? roundToMinute$1 : roundToMinute$2;\n\nconst roundToSecond = NativeTemporal ? roundToSecond$1 : roundToSecond$2;\n\nconst roundToMillisecond = NativeTemporal ? roundToMillisecond$1 : roundToMillisecond$2;\n\nconst roundToMicrosecond = NativeTemporal ? roundToMicrosecond$1 : roundToMicrosecond$2;\n\nconst startOfYear = NativeTemporal ? startOfYear$1 : startOfYear$2;\n\nconst startOfMonth = NativeTemporal ? startOfMonth$1 : startOfMonth$2;\n\nconst startOfWeek = NativeTemporal ? startOfWeek$1 : startOfWeek$2;\n\nconst startOfDay = NativeTemporal ? startOfDay$1 : startOfDay$2;\n\nconst startOfHour = NativeTemporal ? startOfHour$1 : startOfHour$2;\n\nconst startOfMinute = NativeTemporal ? startOfMinute$1 : startOfMinute$2;\n\nconst startOfSecond = NativeTemporal ? startOfSecond$1 : startOfSecond$2;\n\nconst startOfMillisecond = NativeTemporal ? startOfMillisecond$1 : startOfMillisecond$2;\n\nconst startOfMicrosecond = NativeTemporal ? startOfMicrosecond$1 : startOfMicrosecond$2;\n\nconst endOfYear = NativeTemporal ? endOfYear$1 : endOfYear$2;\n\nconst endOfMonth = NativeTemporal ? endOfMonth$1 : endOfMonth$2;\n\nconst endOfWeek = NativeTemporal ? endOfWeek$1 : endOfWeek$2;\n\nconst endOfDay = NativeTemporal ? endOfDay$1 : endOfDay$2;\n\nconst endOfHour = NativeTemporal ? endOfHour$1 : endOfHour$2;\n\nconst endOfMinute = NativeTemporal ? endOfMinute$1 : endOfMinute$2;\n\nconst endOfSecond = NativeTemporal ? endOfSecond$1 : endOfSecond$2;\n\nconst endOfMillisecond = NativeTemporal ? endOfMillisecond$1 : endOfMillisecond$2;\n\nconst endOfMicrosecond = NativeTemporal ? endOfMicrosecond$1 : endOfMicrosecond$2;\n\nconst diffYears = NativeTemporal ? diffYears$1 : diffYears$2;\n\nconst diffMonths = NativeTemporal ? diffMonths$1 : diffMonths$2;\n\nconst diffWeeks = NativeTemporal ? diffWeeks$1 : diffWeeks$2;\n\nconst diffDays = NativeTemporal ? diffDays$1 : diffDays$2;\n\nconst diffHours = NativeTemporal ? diffHours$1 : diffHours$2;\n\nconst diffMinutes = NativeTemporal ? diffMinutes$1 : diffMinutes$2;\n\nconst diffSeconds = NativeTemporal ? diffSeconds$1 : diffSeconds$2;\n\nconst diffMilliseconds = NativeTemporal ? diffMilliseconds$1 : diffMilliseconds$2;\n\nconst diffMicroseconds = NativeTemporal ? diffMicroseconds$1 : diffMicroseconds$2;\n\nconst diffNanoseconds = NativeTemporal ? diffNanoseconds$1 : diffNanoseconds$2;\n\nexport { add, addDays, addHours, addMicroseconds, addMilliseconds, addMinutes, addMonths, addNanoseconds, addSeconds, addWeeks, addYears, compare, create, createFormat, dayOfWeek, dayOfYear, daysInMonth, daysInWeek, daysInYear, diff, diffDays, diffHours, diffMicroseconds, diffMilliseconds, diffMinutes, diffMonths, diffNanoseconds, diffSeconds, diffWeeks, diffYears, endOfDay, endOfHour, endOfMicrosecond, endOfMillisecond, endOfMinute, endOfMonth, endOfSecond, endOfWeek, endOfYear, equals, fromFields, fromString, inLeapYear, isRecord, monthsInYear, roundToDay, roundToHour, roundToMicrosecond, roundToMillisecond, roundToMinute, roundToMonth, roundToSecond, roundToWeek, roundToYear, startOfDay, startOfHour, startOfMicrosecond, startOfMillisecond, startOfMinute, startOfMonth, startOfSecond, startOfWeek, startOfYear, subtract, subtractDays, subtractHours, subtractMicroseconds, subtractMilliseconds, subtractMinutes, subtractMonths, subtractNanoseconds, subtractSeconds, subtractWeeks, subtractYears, toBasicString, toLocaleString, toPlainDate, toPlainTime, toString, toTemporal, toZonedDateTime, weekOfYear, withCalendar, withDayOfMonth, withDayOfWeek, withDayOfYear, withFields, withPlainTime, withWeekOfYear, yearOfWeek };\n","import { NativeTemporal } from \"../chunks/root.js\";\n\nimport { create as create$1, fromEpochMilliseconds as fromEpochMilliseconds$1, fromEpochNanoseconds as fromEpochNanoseconds$1, fromString as fromString$1, add as add$1, subtract as subtract$1, diff as diff$1, equals as equals$1, compare as compare$1, toZonedDateTimeISO as toZonedDateTimeISO$1, createFormat as createFormat$1, toLocaleString as toLocaleString$1, toString as toString$1, toBasicString as toBasicString$1, toTemporal as toTemporal$1, addHours as addHours$1, addMinutes as addMinutes$1, addSeconds as addSeconds$1, addMilliseconds as addMilliseconds$1, addMicroseconds as addMicroseconds$1, addNanoseconds as addNanoseconds$1, subtractHours as subtractHours$1, subtractMinutes as subtractMinutes$1, subtractSeconds as subtractSeconds$1, subtractMilliseconds as subtractMilliseconds$1, subtractMicroseconds as subtractMicroseconds$1, subtractNanoseconds as subtractNanoseconds$1, roundToHour as roundToHour$1, roundToMinute as roundToMinute$1, roundToSecond as roundToSecond$1, roundToMillisecond as roundToMillisecond$1, roundToMicrosecond as roundToMicrosecond$1, diffHours as diffHours$1, diffMinutes as diffMinutes$1, diffSeconds as diffSeconds$1, diffMilliseconds as diffMilliseconds$1, diffMicroseconds as diffMicroseconds$1, diffNanoseconds as diffNanoseconds$1 } from \"../chunks/funcApi-native.js\";\n\nimport { create as create$2, fromEpochMilliseconds as fromEpochMilliseconds$2, fromEpochNanoseconds as fromEpochNanoseconds$2, fromString as fromString$2, add as add$2, subtract as subtract$2, diff as diff$2, equals as equals$2, compare as compare$2, toZonedDateTimeISO as toZonedDateTimeISO$2, createFormat as createFormat$2, toLocaleString as toLocaleString$2, toString as toString$2, toBasicString as toBasicString$2, toTemporal as toTemporal$2, addHours as addHours$2, addMinutes as addMinutes$2, addSeconds as addSeconds$2, addMilliseconds as addMilliseconds$2, addMicroseconds as addMicroseconds$2, addNanoseconds as addNanoseconds$2, subtractHours as subtractHours$2, subtractMinutes as subtractMinutes$2, subtractSeconds as subtractSeconds$2, subtractMilliseconds as subtractMilliseconds$2, subtractMicroseconds as subtractMicroseconds$2, subtractNanoseconds as subtractNanoseconds$2, roundToHour as roundToHour$2, roundToMinute as roundToMinute$2, roundToSecond as roundToSecond$2, roundToMillisecond as roundToMillisecond$2, roundToMicrosecond as roundToMicrosecond$2, diffHours as diffHours$2, diffMinutes as diffMinutes$2, diffSeconds as diffSeconds$2, diffMilliseconds as diffMilliseconds$2, diffMicroseconds as diffMicroseconds$2, diffNanoseconds as diffNanoseconds$2 } from \"../chunks/funcApi-shim.js\";\n\nimport { isInstantRecord } from \"../chunks/funcApi.js\";\n\nconst create = NativeTemporal ? create$1 : create$2;\n\nconst isRecord = isInstantRecord;\n\nconst fromEpochMilliseconds = NativeTemporal ? fromEpochMilliseconds$1 : fromEpochMilliseconds$2;\n\nconst fromEpochNanoseconds = NativeTemporal ? fromEpochNanoseconds$1 : fromEpochNanoseconds$2;\n\nconst fromString = NativeTemporal ? fromString$1 : fromString$2;\n\nconst add = NativeTemporal ? add$1 : add$2;\n\nconst subtract = NativeTemporal ? subtract$1 : subtract$2;\n\nconst diff = NativeTemporal ? diff$1 : diff$2;\n\nconst equals = NativeTemporal ? equals$1 : equals$2;\n\nconst compare = NativeTemporal ? compare$1 : compare$2;\n\nconst toZonedDateTimeISO = NativeTemporal ? toZonedDateTimeISO$1 : toZonedDateTimeISO$2;\n\nconst createFormat = NativeTemporal ? createFormat$1 : createFormat$2;\n\nconst toLocaleString = NativeTemporal ? toLocaleString$1 : toLocaleString$2;\n\nconst toString = NativeTemporal ? toString$1 : toString$2;\n\nconst toBasicString = NativeTemporal ? toBasicString$1 : toBasicString$2;\n\nconst toTemporal = NativeTemporal ? toTemporal$1 : toTemporal$2;\n\nconst addHours = NativeTemporal ? addHours$1 : addHours$2;\n\nconst addMinutes = NativeTemporal ? addMinutes$1 : addMinutes$2;\n\nconst addSeconds = NativeTemporal ? addSeconds$1 : addSeconds$2;\n\nconst addMilliseconds = NativeTemporal ? addMilliseconds$1 : addMilliseconds$2;\n\nconst addMicroseconds = NativeTemporal ? addMicroseconds$1 : addMicroseconds$2;\n\nconst addNanoseconds = NativeTemporal ? addNanoseconds$1 : addNanoseconds$2;\n\nconst subtractHours = NativeTemporal ? subtractHours$1 : subtractHours$2;\n\nconst subtractMinutes = NativeTemporal ? subtractMinutes$1 : subtractMinutes$2;\n\nconst subtractSeconds = NativeTemporal ? subtractSeconds$1 : subtractSeconds$2;\n\nconst subtractMilliseconds = NativeTemporal ? subtractMilliseconds$1 : subtractMilliseconds$2;\n\nconst subtractMicroseconds = NativeTemporal ? subtractMicroseconds$1 : subtractMicroseconds$2;\n\nconst subtractNanoseconds = NativeTemporal ? subtractNanoseconds$1 : subtractNanoseconds$2;\n\nconst roundToHour = NativeTemporal ? roundToHour$1 : roundToHour$2;\n\nconst roundToMinute = NativeTemporal ? roundToMinute$1 : roundToMinute$2;\n\nconst roundToSecond = NativeTemporal ? roundToSecond$1 : roundToSecond$2;\n\nconst roundToMillisecond = NativeTemporal ? roundToMillisecond$1 : roundToMillisecond$2;\n\nconst roundToMicrosecond = NativeTemporal ? roundToMicrosecond$1 : roundToMicrosecond$2;\n\nconst diffHours = NativeTemporal ? diffHours$1 : diffHours$2;\n\nconst diffMinutes = NativeTemporal ? diffMinutes$1 : diffMinutes$2;\n\nconst diffSeconds = NativeTemporal ? diffSeconds$1 : diffSeconds$2;\n\nconst diffMilliseconds = NativeTemporal ? diffMilliseconds$1 : diffMilliseconds$2;\n\nconst diffMicroseconds = NativeTemporal ? diffMicroseconds$1 : diffMicroseconds$2;\n\nconst diffNanoseconds = NativeTemporal ? diffNanoseconds$1 : diffNanoseconds$2;\n\nexport { add, addHours, addMicroseconds, addMilliseconds, addMinutes, addNanoseconds, addSeconds, compare, create, createFormat, diff, diffHours, diffMicroseconds, diffMilliseconds, diffMinutes, diffNanoseconds, diffSeconds, equals, fromEpochMilliseconds, fromEpochNanoseconds, fromString, isRecord, roundToHour, roundToMicrosecond, roundToMillisecond, roundToMinute, roundToSecond, subtract, subtractHours, subtractMicroseconds, subtractMilliseconds, subtractMinutes, subtractNanoseconds, subtractSeconds, toBasicString, toLocaleString, toString, toTemporal, toZonedDateTimeISO };\n","import * as ZonedDateTimeFns from 'temporal-polyfill/fns/ZonedDateTime';\nimport * as PlainDateTimeFns from 'temporal-polyfill/fns/PlainDateTime';\nimport * as InstantFns from 'temporal-polyfill/fns/Instant';\n\n// Adding\nfunction addWeeks(m, n) {\n    let a = dateToUtcArray(m);\n    a[2] += n * 7;\n    return arrayToUtcDate(a);\n}\nfunction addDays(m, n) {\n    let a = dateToUtcArray(m);\n    a[2] += n;\n    return arrayToUtcDate(a);\n}\nfunction addMs(m, n) {\n    let a = dateToUtcArray(m);\n    a[6] += n;\n    return arrayToUtcDate(a);\n}\n// Diffing (all return floats)\n// TODO: why not use ranges?\nfunction diffWeeks(m0, m1) {\n    return diffDays(m0, m1) / 7;\n}\nfunction diffDays(m0, m1) {\n    return (m1.valueOf() - m0.valueOf()) / (1000 * 60 * 60 * 24);\n}\nfunction diffHours(m0, m1) {\n    return (m1.valueOf() - m0.valueOf()) / (1000 * 60 * 60);\n}\nfunction diffMinutes(m0, m1) {\n    return (m1.valueOf() - m0.valueOf()) / (1000 * 60);\n}\nfunction diffSeconds(m0, m1) {\n    return (m1.valueOf() - m0.valueOf()) / 1000;\n}\nfunction diffDayAndTime(m0, m1) {\n    let m0day = startOfDay(m0);\n    let m1day = startOfDay(m1);\n    return {\n        years: 0,\n        months: 0,\n        days: Math.round(diffDays(m0day, m1day)),\n        milliseconds: (m1.valueOf() - m1day.valueOf()) - (m0.valueOf() - m0day.valueOf()),\n    };\n}\n// Diffing Whole Units\nfunction diffWholeWeeks(m0, m1) {\n    let d = diffWholeDays(m0, m1);\n    if (d !== null && d % 7 === 0) {\n        return d / 7;\n    }\n    return null;\n}\nfunction diffWholeDays(m0, m1) {\n    if (timeAsMs(m0) === timeAsMs(m1)) {\n        return Math.round(diffDays(m0, m1));\n    }\n    return null;\n}\n// Start-Of\nfunction startOfDay(m) {\n    return arrayToUtcDate([\n        m.getUTCFullYear(),\n        m.getUTCMonth(),\n        m.getUTCDate(),\n    ]);\n}\nfunction startOfHour(m) {\n    return arrayToUtcDate([\n        m.getUTCFullYear(),\n        m.getUTCMonth(),\n        m.getUTCDate(),\n        m.getUTCHours(),\n    ]);\n}\nfunction startOfMinute(m) {\n    return arrayToUtcDate([\n        m.getUTCFullYear(),\n        m.getUTCMonth(),\n        m.getUTCDate(),\n        m.getUTCHours(),\n        m.getUTCMinutes(),\n    ]);\n}\nfunction startOfSecond(m) {\n    return arrayToUtcDate([\n        m.getUTCFullYear(),\n        m.getUTCMonth(),\n        m.getUTCDate(),\n        m.getUTCHours(),\n        m.getUTCMinutes(),\n        m.getUTCSeconds(),\n    ]);\n}\n// Week Computation\nfunction weekOfYear(marker, dow, doy) {\n    let y = marker.getUTCFullYear();\n    let w = weekOfGivenYear(marker, y, dow, doy);\n    if (w < 1) {\n        return weekOfGivenYear(marker, y - 1, dow, doy);\n    }\n    let nextW = weekOfGivenYear(marker, y + 1, dow, doy);\n    if (nextW >= 1) {\n        return Math.min(w, nextW);\n    }\n    return w;\n}\nfunction weekOfGivenYear(marker, year, dow, doy) {\n    let firstWeekStart = arrayToUtcDate([year, 0, 1 + firstWeekOffset(year, dow, doy)]);\n    let dayStart = startOfDay(marker);\n    let days = Math.round(diffDays(firstWeekStart, dayStart));\n    return Math.floor(days / 7) + 1; // zero-indexed\n}\n// start-of-first-week - start-of-year\nfunction firstWeekOffset(year, dow, doy) {\n    // first-week day -- which january is always in the first week (4 for iso, 1 for other)\n    let fwd = 7 + dow - doy;\n    // first-week day local weekday -- which local weekday is fwd\n    let fwdlw = (7 + arrayToUtcDate([year, 0, fwd]).getUTCDay() - dow) % 7;\n    return -fwdlw + fwd - 1;\n}\n// Array Conversion\nfunction dateToLocalArray(date) {\n    return [\n        date.getFullYear(),\n        date.getMonth(),\n        date.getDate(),\n        date.getHours(),\n        date.getMinutes(),\n        date.getSeconds(),\n        date.getMilliseconds(),\n    ];\n}\nfunction arrayToLocalDate(a) {\n    return new Date(a[0], a[1] || 0, a[2] == null ? 1 : a[2], // day of month\n    a[3] || 0, a[4] || 0, a[5] || 0);\n}\nfunction dateToUtcArray(date) {\n    return [\n        date.getUTCFullYear(),\n        date.getUTCMonth(),\n        date.getUTCDate(),\n        date.getUTCHours(),\n        date.getUTCMinutes(),\n        date.getUTCSeconds(),\n        date.getUTCMilliseconds(),\n    ];\n}\nfunction arrayToUtcDate(a) {\n    // according to web standards (and Safari), a month index is required.\n    // massage if only given a year.\n    if (a.length === 1) {\n        a = a.concat([0]);\n    }\n    return new Date(Date.UTC(...a));\n}\n// Other Utils\nfunction isValidDate(m) {\n    return !isNaN(m.valueOf());\n}\nfunction timeAsMs(m) {\n    return m.getUTCHours() * 1000 * 60 * 60 +\n        m.getUTCMinutes() * 1000 * 60 +\n        m.getUTCSeconds() * 1000 +\n        m.getUTCMilliseconds();\n}\n\nlet calendarSystemClassMap = {};\nfunction registerCalendarSystem(name, theClass) {\n    calendarSystemClassMap[name] = theClass;\n}\nfunction createCalendarSystem(name) {\n    return new calendarSystemClassMap[name]();\n}\nclass GregorianCalendarSystem {\n    getMarkerYear(d) {\n        return d.getUTCFullYear();\n    }\n    getMarkerMonth(d) {\n        return d.getUTCMonth();\n    }\n    getMarkerDay(d) {\n        return d.getUTCDate();\n    }\n    arrayToMarker(arr) {\n        return arrayToUtcDate(arr);\n    }\n    markerToArray(marker) {\n        return dateToUtcArray(marker);\n    }\n}\nregisterCalendarSystem('gregory', GregorianCalendarSystem);\n\nfunction parseRange(input, dateEnv) {\n    let start = null;\n    let end = null;\n    if (input.start) {\n        start = dateEnv.createMarker(input.start);\n    }\n    if (input.end) {\n        end = dateEnv.createMarker(input.end);\n    }\n    if (!start && !end) {\n        return null;\n    }\n    if (start && end && end < start) {\n        return null;\n    }\n    return { start, end };\n}\n// SIDE-EFFECT: will mutate ranges.\n// Will return a new array result.\nfunction invertRanges(ranges, constraintRange) {\n    let invertedRanges = [];\n    let { start } = constraintRange; // the end of the previous range. the start of the new range\n    let i;\n    let dateRange;\n    // ranges need to be in order. required for our date-walking algorithm\n    ranges.sort(compareRanges);\n    for (i = 0; i < ranges.length; i += 1) {\n        dateRange = ranges[i];\n        // add the span of time before the event (if there is any)\n        if (dateRange.start > start) { // compare millisecond time (skip any ambig logic)\n            invertedRanges.push({ start, end: dateRange.start });\n        }\n        if (dateRange.end > start) {\n            start = dateRange.end;\n        }\n    }\n    // add the span of time after the last event (if there is any)\n    if (start < constraintRange.end) { // compare millisecond time (skip any ambig logic)\n        invertedRanges.push({ start, end: constraintRange.end });\n    }\n    return invertedRanges;\n}\nfunction compareRanges(range0, range1) {\n    return range0.start.valueOf() - range1.start.valueOf(); // earlier ranges go first\n}\nfunction intersectRanges(range0, range1) {\n    let { start, end } = range0;\n    let newRange = null;\n    if (range1.start !== null) {\n        if (start === null) {\n            start = range1.start;\n        }\n        else {\n            start = new Date(Math.max(start.valueOf(), range1.start.valueOf()));\n        }\n    }\n    if (range1.end != null) {\n        if (end === null) {\n            end = range1.end;\n        }\n        else {\n            end = new Date(Math.min(end.valueOf(), range1.end.valueOf()));\n        }\n    }\n    if (start === null || end === null || start < end) {\n        newRange = { start, end };\n    }\n    return newRange;\n}\nfunction rangesEqual(range0, range1) {\n    return (range0.start === null ? null : range0.start.valueOf()) === (range1.start === null ? null : range1.start.valueOf()) &&\n        (range0.end === null ? null : range0.end.valueOf()) === (range1.end === null ? null : range1.end.valueOf());\n}\nfunction rangesIntersect(range0, range1) {\n    return (range0.end === null || range1.start === null || range0.end > range1.start) &&\n        (range0.start === null || range1.end === null || range0.start < range1.end);\n}\nfunction rangeContainsRange(outerRange, innerRange) {\n    return (outerRange.start === null || (innerRange.start !== null && innerRange.start >= outerRange.start)) &&\n        (outerRange.end === null || (innerRange.end !== null && innerRange.end <= outerRange.end));\n}\nfunction rangeContainsMarker(range, date) {\n    return (range.start === null || date >= range.start) &&\n        (range.end === null || date < range.end);\n}\n// If the given date is not within the given range, move it inside.\n// (If it's past the end, make it one millisecond before the end).\nfunction constrainMarkerToRange(date, range) {\n    if (range.start != null && date < range.start) {\n        return range.start;\n    }\n    if (range.end != null && date >= range.end) {\n        return new Date(range.end.valueOf() - 1);\n    }\n    return date;\n}\n\nfunction expandZonedInstant(dateInfo, calendarSystem) {\n    let a = calendarSystem.markerToArray(dateInfo.marker);\n    return {\n        marker: dateInfo.marker,\n        instantMs: dateInfo.instantMs,\n        timeZoneOffset: (dateInfo.marker.valueOf() - dateInfo.instantMs) / 60000,\n        array: a,\n        year: a[0],\n        month: a[1],\n        day: a[2],\n        hour: a[3],\n        minute: a[4],\n        second: a[5],\n        millisecond: a[6],\n    };\n}\nfunction createVerboseFormattingArg(start, end, context) {\n    let startInfo = expandZonedInstant(start, context.calendarSystem);\n    let endInfo = end ? expandZonedInstant(end, context.calendarSystem) : null;\n    return {\n        date: startInfo,\n        start: startInfo,\n        end: endInfo,\n        timeZone: context.timeZone,\n        localeCodes: context.locale.codes,\n    };\n}\n\nfunction isInt(n) {\n    return n % 1 === 0;\n}\nfunction trimEnd(s) {\n    return s.replace(/\\s+$/, '');\n}\nfunction padStart(val, len) {\n    let s = String(val);\n    return '000'.substr(0, len - s.length) + s;\n}\n\nconst INTERNAL_UNITS = ['years', 'months', 'days', 'milliseconds'];\nconst PARSE_RE = /^(-?)(?:(\\d+)\\.)?(\\d+):(\\d\\d)(?::(\\d\\d)(?:\\.(\\d\\d\\d))?)?/;\n// Parsing and Creation\nfunction createDuration(input, unit) {\n    if (typeof input === 'string') {\n        return parseString(input);\n    }\n    if (typeof input === 'object' && input) { // non-null object\n        return parseObject(input);\n    }\n    if (typeof input === 'number') {\n        return parseObject({ [unit || 'milliseconds']: input });\n    }\n    return null;\n}\nfunction parseString(s) {\n    let m = PARSE_RE.exec(s);\n    if (m) {\n        let sign = m[1] ? -1 : 1;\n        return {\n            years: 0,\n            months: 0,\n            days: sign * (m[2] ? parseInt(m[2], 10) : 0),\n            milliseconds: sign * ((m[3] ? parseInt(m[3], 10) : 0) * 60 * 60 * 1000 + // hours\n                (m[4] ? parseInt(m[4], 10) : 0) * 60 * 1000 + // minutes\n                (m[5] ? parseInt(m[5], 10) : 0) * 1000 + // seconds\n                (m[6] ? parseInt(m[6], 10) : 0) // ms\n            ),\n        };\n    }\n    return null;\n}\nfunction parseObject(obj) {\n    let duration = {\n        years: obj.years || obj.year || 0,\n        months: obj.months || obj.month || 0,\n        days: obj.days || obj.day || 0,\n        milliseconds: (obj.hours || obj.hour || 0) * 60 * 60 * 1000 + // hours\n            (obj.minutes || obj.minute || 0) * 60 * 1000 + // minutes\n            (obj.seconds || obj.second || 0) * 1000 + // seconds\n            (obj.milliseconds || obj.millisecond || obj.ms || 0), // ms\n    };\n    let weeks = obj.weeks || obj.week;\n    if (weeks) {\n        duration.days += weeks * 7;\n        duration.specifiedWeeks = true;\n    }\n    return duration;\n}\n// Equality\nfunction durationsEqual(d0, d1) {\n    return d0.years === d1.years &&\n        d0.months === d1.months &&\n        d0.days === d1.days &&\n        d0.milliseconds === d1.milliseconds;\n}\nfunction asCleanDays(dur) {\n    if (!dur.years && !dur.months && !dur.milliseconds) {\n        return dur.days;\n    }\n    return 0;\n}\n// Simple Math\nfunction addDurations(d0, d1) {\n    return {\n        years: d0.years + d1.years,\n        months: d0.months + d1.months,\n        days: d0.days + d1.days,\n        milliseconds: d0.milliseconds + d1.milliseconds,\n    };\n}\nfunction subtractDurations(d1, d0) {\n    return {\n        years: d1.years - d0.years,\n        months: d1.months - d0.months,\n        days: d1.days - d0.days,\n        milliseconds: d1.milliseconds - d0.milliseconds,\n    };\n}\nfunction multiplyDuration(d, n) {\n    return {\n        years: d.years * n,\n        months: d.months * n,\n        days: d.days * n,\n        milliseconds: d.milliseconds * n,\n    };\n}\n// Conversions\n// \"Rough\" because they are based on average-case Gregorian months/years\nfunction asRoughYears(dur) {\n    return asRoughDays(dur) / 365;\n}\nfunction asRoughMonths(dur) {\n    return asRoughDays(dur) / 30;\n}\nfunction asRoughDays(dur) {\n    return asRoughMs(dur) / 864e5;\n}\nfunction asRoughHours(dur) {\n    return asRoughMs(dur) / (1000 * 60 * 60);\n}\nfunction asRoughMinutes(dur) {\n    return asRoughMs(dur) / (1000 * 60);\n}\nfunction asRoughSeconds(dur) {\n    return asRoughMs(dur) / 1000;\n}\nfunction asRoughMs(dur) {\n    return dur.years * (365 * 864e5) +\n        dur.months * (30 * 864e5) +\n        dur.days * 864e5 +\n        dur.milliseconds;\n}\n// Advanced Math\nfunction wholeDivideDurations(numerator, denominator) {\n    let res = null;\n    for (let i = 0; i < INTERNAL_UNITS.length; i += 1) {\n        let unit = INTERNAL_UNITS[i];\n        if (denominator[unit]) {\n            let localRes = numerator[unit] / denominator[unit];\n            if (!isInt(localRes) || (res !== null && res !== localRes)) {\n                return null;\n            }\n            res = localRes;\n        }\n        else if (numerator[unit]) {\n            // needs to divide by something but can't!\n            return null;\n        }\n    }\n    return res;\n}\nfunction greatestDurationDenominator(dur) {\n    let ms = dur.milliseconds;\n    if (ms) {\n        if (ms % 1000 !== 0) {\n            return { unit: 'millisecond', value: ms };\n        }\n        if (ms % (1000 * 60) !== 0) {\n            return { unit: 'second', value: ms / 1000 };\n        }\n        if (ms % (1000 * 60 * 60) !== 0) {\n            return { unit: 'minute', value: ms / (1000 * 60) };\n        }\n        if (ms) {\n            return { unit: 'hour', value: ms / (1000 * 60 * 60) };\n        }\n    }\n    if (dur.days) {\n        if (dur.specifiedWeeks && dur.days % 7 === 0) {\n            return { unit: 'week', value: dur.days / 7 };\n        }\n        return { unit: 'day', value: dur.days };\n    }\n    if (dur.months) {\n        return { unit: 'month', value: dur.months };\n    }\n    if (dur.years) {\n        return { unit: 'year', value: dur.years };\n    }\n    return { unit: 'millisecond', value: 0 };\n}\n\n// timeZoneOffset is in minutes\nfunction buildIsoString(marker, timeZoneOffset, stripZeroTime = false) {\n    let s = marker.toISOString();\n    s = s.replace('.000', '');\n    if (stripZeroTime) {\n        s = s.replace('T00:00:00Z', '');\n    }\n    if (s.length > 10) {\n        if (timeZoneOffset == null) {\n            s = s.replace('Z', '');\n        }\n        else if (timeZoneOffset !== 0) {\n            s = s.replace('Z', formatTimeZoneOffset(timeZoneOffset, true));\n        }\n    }\n    return s;\n}\nfunction formatDayString(marker) {\n    return marker.toISOString().replace(/T.*$/, '');\n}\nfunction formatIsoMonthStr(marker) {\n    return marker.toISOString().match(/^\\d{4}-\\d{2}/)[0];\n}\nfunction formatIsoTimeString(marker) {\n    return padStart(marker.getUTCHours(), 2) + ':' +\n        padStart(marker.getUTCMinutes(), 2) + ':' +\n        padStart(marker.getUTCSeconds(), 2);\n}\nfunction formatTimeZoneOffset(minutes, doIso = false) {\n    let sign = minutes < 0 ? '-' : '+';\n    let abs = Math.abs(minutes);\n    let hours = Math.floor(abs / 60);\n    let mins = Math.round(abs % 60);\n    if (doIso) {\n        return `${sign + padStart(hours, 2)}:${padStart(mins, 2)}`;\n    }\n    return `GMT${sign}${hours}${mins ? `:${padStart(mins, 2)}` : ''}`;\n}\nfunction joinDateTimeFormatParts(parts) {\n    let s = '';\n    for (const part of parts) {\n        s += part.value;\n    }\n    return s;\n}\n\nconst ISO_RE = /^\\s*(\\d{4})(-?(\\d{2})(-?(\\d{2})([T ](\\d{2}):?(\\d{2})(:?(\\d{2})(\\.(\\d+))?)?(Z|(([-+])(\\d{2})(:?(\\d{2}))?))?)?)?)?$/;\nfunction parse(str) {\n    let m = ISO_RE.exec(str);\n    if (m) {\n        let marker = new Date(Date.UTC(Number(m[1]), m[3] ? Number(m[3]) - 1 : 0, Number(m[5] || 1), Number(m[7] || 0), Number(m[8] || 0), Number(m[10] || 0), m[12] ? Number(`0.${m[12]}`) * 1000 : 0));\n        if (isValidDate(marker)) {\n            let timeZoneOffset = null;\n            if (m[13]) {\n                timeZoneOffset = (m[15] === '-' ? -1 : 1) * (Number(m[16] || 0) * 60 +\n                    Number(m[18] || 0));\n            }\n            return {\n                marker,\n                isTimeUnspecified: !m[6],\n                timeZoneOffset,\n            };\n        }\n    }\n    return null;\n}\n\nclass DateEnv {\n    constructor(settings) {\n        this.timeZone = settings.timeZone;\n        this.calendarSystem = createCalendarSystem(settings.calendarSystem);\n        this.locale = settings.locale;\n        this.weekDow = settings.locale.week.dow;\n        this.weekDoy = settings.locale.week.doy;\n        if (settings.weekNumberCalculation === 'ISO') {\n            this.weekDow = 1;\n            this.weekDoy = 4;\n        }\n        if (typeof settings.firstDay === 'number') {\n            this.weekDow = settings.firstDay;\n        }\n        if (typeof settings.weekNumberCalculation === 'function') {\n            this.weekNumberFunc = settings.weekNumberCalculation;\n        }\n        this.weekTextLong = settings.weekTextLong;\n        this.weekTextShort = settings.weekTextShort ?? settings.weekTextLong;\n        this.cmdFormatter = settings.cmdFormatter;\n    }\n    // Creating / Parsing\n    createMarker(input) {\n        let meta = this.createMarkerMeta(input);\n        if (meta === null) {\n            return null;\n        }\n        return meta.marker;\n    }\n    createNowMarker() {\n        return this.timestampToMarker(new Date().valueOf());\n    }\n    createMarkerMeta(input) {\n        if (typeof input === 'string') {\n            return this.parse(input);\n        }\n        let marker = null;\n        let instantMs;\n        if (typeof input === 'number') {\n            marker = this.timestampToMarker(input);\n            instantMs = input;\n        }\n        else if (input instanceof Date) {\n            input = input.valueOf();\n            if (!isNaN(input)) {\n                marker = this.timestampToMarker(input);\n                instantMs = input;\n            }\n        }\n        else if (Array.isArray(input)) {\n            marker = arrayToUtcDate(input);\n        }\n        if (marker === null || !isValidDate(marker)) {\n            return null;\n        }\n        return { marker, isTimeUnspecified: false, instantMs };\n    }\n    parse(s) {\n        let parts = parse(s);\n        if (parts === null) {\n            return null;\n        }\n        let { marker } = parts;\n        let instantMs;\n        if (parts.timeZoneOffset !== null) {\n            instantMs = marker.valueOf() - parts.timeZoneOffset * 60 * 1000;\n            marker = this.timestampToMarker(instantMs);\n        }\n        return { marker, isTimeUnspecified: parts.isTimeUnspecified, instantMs };\n    }\n    // Accessors\n    getYear(marker) {\n        return this.calendarSystem.getMarkerYear(marker);\n    }\n    getMonth(marker) {\n        return this.calendarSystem.getMarkerMonth(marker);\n    }\n    getDay(marker) {\n        return this.calendarSystem.getMarkerDay(marker);\n    }\n    // Adding / Subtracting\n    add(marker, dur) {\n        let a = this.calendarSystem.markerToArray(marker);\n        a[0] += dur.years;\n        a[1] += dur.months;\n        a[2] += dur.days;\n        a[6] += dur.milliseconds;\n        return this.calendarSystem.arrayToMarker(a);\n    }\n    subtract(marker, dur) {\n        let a = this.calendarSystem.markerToArray(marker);\n        a[0] -= dur.years;\n        a[1] -= dur.months;\n        a[2] -= dur.days;\n        a[6] -= dur.milliseconds;\n        return this.calendarSystem.arrayToMarker(a);\n    }\n    addYears(marker, n) {\n        let a = this.calendarSystem.markerToArray(marker);\n        a[0] += n;\n        return this.calendarSystem.arrayToMarker(a);\n    }\n    addMonths(marker, n) {\n        let a = this.calendarSystem.markerToArray(marker);\n        a[1] += n;\n        return this.calendarSystem.arrayToMarker(a);\n    }\n    // Diffing Whole Units\n    diffWholeYears(m0, m1) {\n        let { calendarSystem } = this;\n        if (timeAsMs(m0) === timeAsMs(m1) &&\n            calendarSystem.getMarkerDay(m0) === calendarSystem.getMarkerDay(m1) &&\n            calendarSystem.getMarkerMonth(m0) === calendarSystem.getMarkerMonth(m1)) {\n            return calendarSystem.getMarkerYear(m1) - calendarSystem.getMarkerYear(m0);\n        }\n        return null;\n    }\n    diffWholeMonths(m0, m1) {\n        let { calendarSystem } = this;\n        if (timeAsMs(m0) === timeAsMs(m1) &&\n            calendarSystem.getMarkerDay(m0) === calendarSystem.getMarkerDay(m1)) {\n            return (calendarSystem.getMarkerMonth(m1) - calendarSystem.getMarkerMonth(m0)) +\n                (calendarSystem.getMarkerYear(m1) - calendarSystem.getMarkerYear(m0)) * 12;\n        }\n        return null;\n    }\n    // Range / Duration\n    greatestWholeUnit(m0, m1) {\n        let n = this.diffWholeYears(m0, m1);\n        if (n !== null) {\n            return { unit: 'year', value: n };\n        }\n        n = this.diffWholeMonths(m0, m1);\n        if (n !== null) {\n            return { unit: 'month', value: n };\n        }\n        n = diffWholeWeeks(m0, m1);\n        if (n !== null) {\n            return { unit: 'week', value: n };\n        }\n        n = diffWholeDays(m0, m1);\n        if (n !== null) {\n            return { unit: 'day', value: n };\n        }\n        n = diffHours(m0, m1);\n        if (isInt(n)) {\n            return { unit: 'hour', value: n };\n        }\n        n = diffMinutes(m0, m1);\n        if (isInt(n)) {\n            return { unit: 'minute', value: n };\n        }\n        n = diffSeconds(m0, m1);\n        if (isInt(n)) {\n            return { unit: 'second', value: n };\n        }\n        return { unit: 'millisecond', value: m1.valueOf() - m0.valueOf() };\n    }\n    countDurationsBetween(m0, m1, d) {\n        // TODO: can use greatestWholeUnit\n        let diff;\n        if (d.years) {\n            diff = this.diffWholeYears(m0, m1);\n            if (diff !== null) {\n                return diff / asRoughYears(d);\n            }\n        }\n        if (d.months) {\n            diff = this.diffWholeMonths(m0, m1);\n            if (diff !== null) {\n                return diff / asRoughMonths(d);\n            }\n        }\n        if (d.days) {\n            diff = diffWholeDays(m0, m1);\n            if (diff !== null) {\n                return diff / asRoughDays(d);\n            }\n        }\n        return (m1.valueOf() - m0.valueOf()) / asRoughMs(d);\n    }\n    // Start-Of\n    // these DON'T return zoned-dates. only UTC start-of dates\n    startOf(m, unit) {\n        if (unit === 'year') {\n            return this.startOfYear(m);\n        }\n        if (unit === 'month') {\n            return this.startOfMonth(m);\n        }\n        if (unit === 'week') {\n            return this.startOfWeek(m);\n        }\n        if (unit === 'day') {\n            return startOfDay(m);\n        }\n        if (unit === 'hour') {\n            return startOfHour(m);\n        }\n        if (unit === 'minute') {\n            return startOfMinute(m);\n        }\n        if (unit === 'second') {\n            return startOfSecond(m);\n        }\n        return null;\n    }\n    startOfYear(m) {\n        return this.calendarSystem.arrayToMarker([\n            this.calendarSystem.getMarkerYear(m),\n        ]);\n    }\n    startOfMonth(m) {\n        return this.calendarSystem.arrayToMarker([\n            this.calendarSystem.getMarkerYear(m),\n            this.calendarSystem.getMarkerMonth(m),\n        ]);\n    }\n    startOfWeek(m) {\n        return this.calendarSystem.arrayToMarker([\n            this.calendarSystem.getMarkerYear(m),\n            this.calendarSystem.getMarkerMonth(m),\n            m.getUTCDate() - ((m.getUTCDay() - this.weekDow + 7) % 7),\n        ]);\n    }\n    // Week Number\n    computeWeekNumber(marker) {\n        if (this.weekNumberFunc) {\n            return this.weekNumberFunc(this.toDate(marker));\n        }\n        return weekOfYear(marker, this.weekDow, this.weekDoy);\n    }\n    formatToParts(marker, formatter, dateOptions = {}) {\n        return formatter.formatToParts(this.toZonedInstant(marker, dateOptions.instantMs), this);\n    }\n    formatRangeToParts(start, end, formatter, dateOptions = {}) {\n        let { endInstantMs } = dateOptions;\n        if (dateOptions.isEndExclusive) {\n            end = addMs(end, -1);\n            if (endInstantMs != null) {\n                endInstantMs -= 1;\n            }\n        }\n        return formatter.formatRangeToParts(this.toZonedInstant(start, dateOptions.startInstantMs), this.toZonedInstant(end, endInstantMs), this);\n    }\n    // pairs a wall-clock marker with its real epoch instant (first occurrence when the\n    // wall-clock is ambiguous), unless an exact instant is supplied. the marker is\n    // re-derived from the instant so the pair always agrees, even when the given marker\n    // was nonexistent (DST gap) or expressed in a different offset's reading\n    toZonedInstant(marker, instantMs) {\n        if (instantMs == null) {\n            instantMs = this.toDate(marker).valueOf();\n        }\n        return { marker: this.timestampToMarker(instantMs), instantMs };\n    }\n    /*\n    DUMB: the omitTime arg is dumb. if we omit the time, we want to omit the timezone offset. and if we do that,\n    might as well use buildIsoString or some other util directly\n    */\n    formatIso(marker, extraOptions = {}) {\n        let timeZoneOffset = null;\n        if (!extraOptions.omitTimeZoneOffset) {\n            timeZoneOffset = this.offsetForMarker(marker);\n        }\n        return buildIsoString(marker, timeZoneOffset, extraOptions.omitTime);\n    }\n    // TimeZone\n    timestampToMarker(ms) {\n        if (this.timeZone === 'local') {\n            return arrayToUtcDate(dateToLocalArray(new Date(ms)));\n        }\n        if (this.timeZone === 'UTC') {\n            return new Date(ms);\n        }\n        const zdt = InstantFns.toZonedDateTimeISO(InstantFns.fromEpochMilliseconds(ms), this.timeZone);\n        return new Date(// a \"Date Marker\", which is like PlainDateTime\n        Date.UTC(zdt.year, zdt.month - 1, zdt.day, zdt.hour, zdt.minute, zdt.second, zdt.millisecond));\n    }\n    offsetForMarker(m) {\n        if (this.timeZone === 'local') {\n            return -arrayToLocalDate(dateToUtcArray(m)).getTimezoneOffset(); // convert \"inverse\" offset to \"normal\" offset\n        }\n        if (this.timeZone === 'UTC') {\n            return 0;\n        }\n        return ZonedDateTimeFns.offsetNanoseconds(PlainDateTimeFns.toZonedDateTime(PlainDateTimeFns.create(m.getUTCFullYear(), m.getUTCMonth() + 1, m.getUTCDate(), m.getUTCHours(), m.getUTCMinutes(), m.getUTCSeconds(), m.getUTCMilliseconds()), this.timeZone)) / (1000000000 * 60);\n    }\n    // Conversion\n    toDate(m) {\n        if (this.timeZone === 'local') {\n            return arrayToLocalDate(dateToUtcArray(m));\n        }\n        if (this.timeZone === 'UTC') {\n            return new Date(m.valueOf()); // make sure it's a copy\n        }\n        return new Date(PlainDateTimeFns.toZonedDateTime(PlainDateTimeFns.create(m.getUTCFullYear(), m.getUTCMonth() + 1, m.getUTCDate(), m.getUTCHours(), m.getUTCMinutes(), m.getUTCSeconds(), m.getUTCMilliseconds()), this.timeZone).epochMilliseconds);\n    }\n}\n\nconst EXTENDED_SETTINGS = new Set([\n    'week',\n    'meridiem',\n    'omitZeroMinute',\n    'omitCommas',\n    'forceCommas',\n    'omitTrailing',\n    'weekdayJustify',\n]);\nconst MERIDIEM_RE = /([ap])\\.?m\\.?/i;\nconst COMMA_RE = /,/g;\nconst LTR_RE = /\\u200e/g; // control character\nconst TRAILING_RE = /[\\s.,]+$/;\nconst WHITESPACE_ONLY_RE = /^\\s+$/;\nclass NativeDateFormatter {\n    constructor(options) {\n        const standardOptions = {};\n        const extendedOptions = {};\n        for (const name in options) {\n            if (EXTENDED_SETTINGS.has(name)) {\n                extendedOptions[name] = options[name];\n            }\n            else {\n                standardOptions[name] = options[name];\n            }\n        }\n        // all zone-name requests render as offsets (\"GMT-4\") for now, matching the historical\n        // synthesized style. flipping to real zone names (\"EDT\") is a deliberate future change\n        if (standardOptions.timeZoneName) {\n            standardOptions.timeZoneName = 'shortOffset';\n        }\n        this.timeZoneOnly = Object.keys(standardOptions).length === 1 &&\n            Boolean(standardOptions.timeZoneName);\n        this.weekOnly = Boolean(!Object.keys(standardOptions).length && extendedOptions.week);\n        if (!this.timeZoneOnly) {\n            if (standardOptions.timeZoneName) {\n                if (!standardOptions.hour) {\n                    standardOptions.hour = '2-digit';\n                }\n                if (!standardOptions.minute) {\n                    standardOptions.minute = '2-digit';\n                }\n            }\n            if (extendedOptions.omitZeroMinute &&\n                (standardOptions.second || standardOptions.fractionalSecondDigits)) {\n                delete extendedOptions.omitZeroMinute;\n            }\n        }\n        this.standardOptions = standardOptions;\n        this.extendedOptions = extendedOptions;\n    }\n    formatToParts(date, context) {\n        const { extendedOptions } = this;\n        if (this.timeZoneOnly) {\n            return this.getFormats(context).normalFormat\n                .formatToParts(date.instantMs)\n                .filter((part) => part.type === 'timeZoneName');\n        }\n        if (this.weekOnly) {\n            return formatWeekNumberParts(context.computeWeekNumber(date.marker), context.weekTextLong, context.weekTextShort, context.locale, extendedOptions.week);\n        }\n        const { normalFormat, zeroFormat } = this.getFormats(context);\n        const format = (zeroFormat && !date.marker.getUTCMinutes())\n            ? zeroFormat\n            : normalFormat;\n        const parts = format.formatToParts(date.instantMs);\n        return postProcessParts(parts, extendedOptions);\n    }\n    formatRangeToParts(start, end, context) {\n        const { extendedOptions } = this;\n        if (this.timeZoneOnly || this.weekOnly) {\n            return this.formatToParts(start, context).map((part) => {\n                return {\n                    source: part.type === 'literal' ? 'shared' : 'startRange',\n                    ...part,\n                };\n            });\n        }\n        const { normalFormat, zeroFormat } = this.getFormats(context);\n        const format = (zeroFormat && !start.marker.getUTCMinutes() && !end.marker.getUTCMinutes())\n            ? zeroFormat\n            : normalFormat;\n        // the instants are real and ordered, so Intl's rendering is authoritative. ICU's\n        // interval output currently omits zone names and collapses equal-wall-clock\n        // endpoints — upstream limitations we deliberately do not paper over\n        const parts = format.formatRangeToParts(start.instantMs, end.instantMs);\n        return postProcessRangeParts(parts, extendedOptions);\n    }\n    getFormats(context) {\n        if (this.cachedContext !== context) {\n            const { extendedOptions } = this;\n            const { codes } = context.locale;\n            const standardOptions = {\n                ...this.standardOptions,\n                // 'local' means the system zone, which is Intl's default\n                timeZone: context.timeZone === 'local' ? undefined : context.timeZone,\n            };\n            const normalFormat = new Intl.DateTimeFormat(codes, standardOptions);\n            let zeroFormat;\n            if (extendedOptions.omitZeroMinute) {\n                const zeroProps = { ...standardOptions };\n                delete zeroProps.minute;\n                zeroFormat = new Intl.DateTimeFormat(codes, zeroProps);\n            }\n            this.cachedContext = context;\n            this.cachedFormats = { normalFormat, zeroFormat };\n        }\n        return this.cachedFormats;\n    }\n}\nfunction processPartsLoop(parts, extendedOptions) {\n    let priorLiteral;\n    for (const part of parts) {\n        const isLiteral = part.type === 'literal';\n        if (isLiteral || part.type === 'dayPeriod') {\n            let s = part.value;\n            s = s.replace(LTR_RE, '');\n            if (extendedOptions.omitCommas) {\n                s = s.replace(COMMA_RE, '');\n            }\n            if (!isLiteral) {\n                const { meridiem } = extendedOptions;\n                if (meridiem === false) {\n                    s = s.replace(MERIDIEM_RE, '');\n                }\n                else if (meridiem === 'narrow') {\n                    s = s.replace(MERIDIEM_RE, (_m0, m1) => m1.toLocaleLowerCase());\n                }\n                else if (meridiem === 'short') {\n                    s = s.replace(MERIDIEM_RE, (_m0, m1) => `${m1.toLocaleLowerCase()}m`);\n                }\n                else if (meridiem === 'lowercase') {\n                    s = s.replace(MERIDIEM_RE, (m0) => m0.toLocaleLowerCase());\n                }\n                if (priorLiteral) {\n                    priorLiteral.value = priorLiteral.value.trimEnd();\n                }\n            }\n            part.value = s;\n        }\n        priorLiteral = isLiteral ? part : undefined;\n    }\n}\nfunction postProcessParts(parts, extendedOptions) {\n    processPartsLoop(parts, extendedOptions);\n    if (extendedOptions.weekdayJustify &&\n        parts.length === 3 &&\n        WHITESPACE_ONLY_RE.test(parts[1].value)) {\n        if (parts[extendedOptions.weekdayJustify === 'start' ? 2 : 0].type === 'weekday') {\n            parts.reverse();\n        }\n    }\n    if (extendedOptions.forceCommas) {\n        for (const part of parts) {\n            if (part.type === 'literal' && WHITESPACE_ONLY_RE.test(part.value)) {\n                part.value = `,${part.value}`;\n            }\n        }\n    }\n    if (extendedOptions.omitTrailing) {\n        stripTrailingLiteral(parts);\n    }\n    return parts.filter((part) => part.value);\n}\nfunction postProcessRangeParts(parts, extendedOptions) {\n    processPartsLoop(parts, extendedOptions);\n    if (extendedOptions.forceCommas) {\n        for (const part of parts) {\n            if (part.type === 'literal' && WHITESPACE_ONLY_RE.test(part.value)) {\n                part.value = `,${part.value}`;\n            }\n        }\n    }\n    if (extendedOptions.omitTrailing) {\n        stripTrailingLiteral(parts);\n    }\n    return parts.filter((part) => part.value);\n}\nfunction stripTrailingLiteral(parts) {\n    const lastPart = parts[parts.length - 1];\n    if (lastPart?.type === 'literal') {\n        lastPart.value = lastPart.value.replace(TRAILING_RE, '');\n        if (!lastPart.value) {\n            parts.pop();\n        }\n    }\n}\nfunction formatWeekNumberParts(num, weekTextLong, weekTextShort, locale, display) {\n    const parts = [];\n    if (display === 'long') {\n        parts.push({ type: 'literal', value: weekTextLong });\n    }\n    else if (display === 'short' || display === 'narrow') {\n        parts.push({ type: 'literal', value: weekTextShort });\n    }\n    if (display === 'long' || display === 'short') {\n        parts.push({ type: 'literal', value: ' ' });\n    }\n    parts.push({\n        type: 'week',\n        value: locale.simpleNumberFormat.format(num),\n    });\n    if (locale.options.direction === 'rtl') {\n        parts.reverse();\n    }\n    return parts;\n}\n\nclass CmdDateFormatter {\n    constructor(cmdStr) {\n        this.cmdStr = cmdStr;\n    }\n    formatToParts(date, context) {\n        const res = context.cmdFormatter(this.cmdStr, createVerboseFormattingArg(date, null, context));\n        if (Array.isArray(res)) {\n            return res;\n        }\n        return [{ type: 'literal', value: res }];\n    }\n    formatRangeToParts(start, end, context) {\n        const res = context.cmdFormatter(this.cmdStr, createVerboseFormattingArg(start, end, context));\n        if (Array.isArray(res)) {\n            return res.map((part) => ({\n                source: 'shared',\n                ...part,\n            }));\n        }\n        return [{ source: 'shared', type: 'literal', value: res }];\n    }\n}\n\nclass FuncDateFormatter {\n    constructor(func) {\n        this.func = func;\n    }\n    formatToParts(date, context) {\n        const str = this.func(createVerboseFormattingArg(date, null, context));\n        return [{ type: 'literal', value: str }];\n    }\n    formatRangeToParts(start, end, context) {\n        const str = this.func(createVerboseFormattingArg(start, end, context));\n        return [{ source: 'shared', type: 'literal', value: str }];\n    }\n}\n\nexport { CmdDateFormatter, DateEnv, FuncDateFormatter, NativeDateFormatter, addDays, addDurations, addMs, addWeeks, arrayToLocalDate, arrayToUtcDate, asCleanDays, asRoughDays, asRoughHours, asRoughMinutes, asRoughMonths, asRoughMs, asRoughSeconds, asRoughYears, buildIsoString, constrainMarkerToRange, createCalendarSystem, createDuration, createVerboseFormattingArg, dateToLocalArray, dateToUtcArray, diffDayAndTime, diffDays, diffHours, diffMinutes, diffSeconds, diffWeeks, diffWholeDays, diffWholeWeeks, durationsEqual, expandZonedInstant, formatDayString, formatIsoMonthStr, formatIsoTimeString, formatTimeZoneOffset, greatestDurationDenominator, intersectRanges, invertRanges, isInt, isValidDate, joinDateTimeFormatParts, multiplyDuration, padStart, parse as parseMarker, parseRange, rangeContainsMarker, rangeContainsRange, rangesEqual, rangesIntersect, registerCalendarSystem, startOfDay, startOfHour, startOfMinute, startOfSecond, subtractDurations, timeAsMs, trimEnd, weekOfYear, wholeDivideDurations };\n","var classNames = {\"popoverZ\":\"fc-pj\",\"isolate\":\"fc-L2\",\"borderBoxRoot\":\"fc-oK\",\"notAllowed\":\"fc-Nr\",\"noScrollbars\":\"fc-h3\",\"noShrink\":\"fc-s2\",\"calendarScreenRoot\":\"fc-Qd\",\"safeTiles\":\"fc-j1\",\"calendarPrintRoot\":\"fc-Fn\",\"cursorPointer\":\"fc-3A\",\"cursorResizeT\":\"fc-3Z\",\"cursorResizeB\":\"fc-Bn\",\"cursorResizeS\":\"fc-Bs\",\"cursorResizeE\":\"fc-mJ\",\"cursorColResizer\":\"fc-xg\",\"hit\":\"fc-B6\",\"hitX\":\"fc-If\",\"hitY\":\"fc-uS\",\"hitXSkinny\":\"fc-gw\",\"selectNone\":\"fc-Qx\",\"invisible\":\"fc-DP\",\"borderless\":\"fc-m0\",\"borderlessX\":\"fc-lH\",\"borderlessY\":\"fc-T4\",\"borderlessTop\":\"fc-7v\",\"borderlessBottom\":\"fc-C1\",\"borderlessStart\":\"fc-QG\",\"borderlessEnd\":\"fc-N5\",\"flexRow\":\"fc-4L\",\"flexCol\":\"fc-Ir\",\"grow\":\"fc-o7\",\"liquid\":\"fc-bx\",\"minHeight0\":\"fc-PC\",\"liquidX\":\"fc-rJ\",\"printTable\":\"fc-2n\",\"noPadding\":\"fc-Ib\",\"noPaddingY\":\"fc-ho\",\"noMargin\":\"fc-Yg\",\"noMarginY\":\"fc-4U\",\"noMarginX\":\"fc-mC\",\"whiteSpaceNoWrap\":\"fc-XZ\",\"whiteSpacePre\":\"fc-5Z\",\"overflowAnchorNone\":\"fc-0T\",\"pointerEventsNone\":\"fc-8Y\",\"crop\":\"fc-Zz\",\"cropNowrap\":\"fc-Sr\",\"rel\":\"fc-7Q\",\"abs\":\"fc-Rs\",\"start0\":\"fc-Hv\",\"end0\":\"fc-97\",\"fill\":\"fc-ou\",\"fillTop\":\"fc-b1\",\"fillX\":\"fc-7k\",\"fillY\":\"fc-5V\",\"fillStart\":\"fc-Z6\",\"sticky\":\"fc-TI\",\"stickyT\":\"fc-G7\",\"stickyS\":\"fc-lC\",\"tableHeaderSticky\":\"fc-hw\",\"contentBox\":\"fc-Ap\",\"offscreen\":\"fc-hI\",\"srOnly\":\"fc-GR\",\"alignCenter\":\"fc-Hi\",\"alignStart\":\"fc-Yj\",\"alignEnd\":\"fc-io\",\"footerScrollbarSticky\":\"fc-4I\",\"footerScrollbar\":\"fc-Nd\",\"breakInsideAvoid\":\"fc-Gu\",\"printCellContentMinHeight\":\"fc-2s\",\"flowRoot\":\"fc-es\",\"z0\":\"fc-QB\",\"z1\":\"fc-eY\",\"z2\":\"fc-qd\",\"z3\":\"fc-9p\",\"z4\":\"fc-65\",\"z5\":\"fc-Hy\",\"z1000\":\"fc-T7\",\"z9999\":\"fc-mO\",\"focusZ2\":\"fc-zL\",\"internalTimelineSlot\":\"fc-7y\",\"internalEvent\":\"fc-Rq\",\"internalEventMirror\":\"fc-wf\",\"internalEventDraggable\":\"fc-QY\",\"internalEventSelected\":\"fc-1d\",\"internalEventResizable\":\"fc-3d\",\"internalEventResizer\":\"fc-bM\",\"internalEventResizerStart\":\"fc-ik\",\"internalEventResizerEnd\":\"fc-lw\",\"internalBgEvent\":\"fc-Sz\",\"internalMoreLink\":\"fc-4D\",\"internalNavLink\":\"fc-Wa\",\"internalPopover\":\"fc-JJ\",\"internalView\":\"fc-Ix\",\"internalScroller\":\"fc-0s\"};\n\nexport { classNames as c };\n","function joinClassNames(...args) {\n    return args.filter(Boolean).join(' ');\n}\n/*\nTODO: dedup with @full-ui/headless-grid somehow\n*/\nfunction fracToCssDim(frac) {\n    return frac * 100 + '%';\n}\n\nexport { fracToCssDim as f, joinClassNames as j };\n","import { NativeDateFormatter, CmdDateFormatter, FuncDateFormatter, addMs, startOfDay, asRoughMs, addDays, createDuration, durationsEqual, joinDateTimeFormatParts, rangeContainsMarker, buildIsoString, rangesIntersect, rangeContainsRange, diffDays, diffDayAndTime, intersectRanges, invertRanges, rangesEqual } from '@full-ui/headless-calendar';\nimport { c as classNames } from './0b389a37.js';\nimport { j as joinClassNames } from './d74440d5.js';\n\nfunction createFormatter(input) {\n    if (typeof input === 'object' && input) { // non-null object\n        return new NativeDateFormatter(input);\n    }\n    if (typeof input === 'string') {\n        return new CmdDateFormatter(input);\n    }\n    if (typeof input === 'function') {\n        return new FuncDateFormatter(input);\n    }\n    return null;\n}\n\nfunction warn(...args) {\n    console.warn('FullCalendar:', ...args);\n}\n\n/* eslint max-classes-per-file: off */\nconst warnedClassNameOptions = {};\nfunction refineClassName(input, optionName) {\n    if (!input || typeof input === 'string') {\n        return input;\n    }\n    warnInvalidClassName(optionName);\n    return '';\n}\nfunction refineClassNameGenerator(input, optionName) {\n    if (typeof input === 'function') {\n        return (renderProps) => refineClassName(input(renderProps), optionName);\n    }\n    return refineClassName(input, optionName);\n}\nfunction warnInvalidClassName(optionName) {\n    if (!warnedClassNameOptions[optionName]) {\n        warn(`Invalid option \\`${optionName}\\`: expected a className string or a falsy value.`);\n        warnedClassNameOptions[optionName] = true;\n    }\n}\n\n// Stops a mouse/touch event from doing it's native browser action\nfunction preventDefault(ev) {\n    ev.preventDefault();\n}\n// Event Delegation\n// ----------------------------------------------------------------------------------------------------------------\nfunction buildDelegationHandler(selector, handler) {\n    return (ev) => {\n        let matchedChild = ev.target.closest(selector);\n        if (matchedChild) {\n            handler.call(matchedChild, ev, matchedChild);\n        }\n    };\n}\nfunction listenBySelector(container, eventType, selector, handler) {\n    let attachedHandler = buildDelegationHandler(selector, handler);\n    container.addEventListener(eventType, attachedHandler);\n    return () => {\n        container.removeEventListener(eventType, attachedHandler);\n    };\n}\nfunction listenToHoverBySelector(container, selector, onMouseEnter, onMouseLeave) {\n    let currentMatchedChild;\n    return listenBySelector(container, 'mouseover', selector, (mouseOverEv, matchedChild) => {\n        if (matchedChild !== currentMatchedChild) {\n            currentMatchedChild = matchedChild;\n            onMouseEnter(mouseOverEv, matchedChild);\n            let realOnMouseLeave = (mouseLeaveEv) => {\n                currentMatchedChild = null;\n                onMouseLeave(mouseLeaveEv, matchedChild);\n                matchedChild.removeEventListener('mouseleave', realOnMouseLeave);\n            };\n            // listen to the next mouseleave, and then unattach\n            matchedChild.addEventListener('mouseleave', realOnMouseLeave);\n        }\n    });\n}\n// Animation\n// ----------------------------------------------------------------------------------------------------------------\nconst transitionEventNames = [\n    'webkitTransitionEnd',\n    'otransitionend',\n    'oTransitionEnd',\n    'msTransitionEnd',\n    'transitionend',\n];\n// triggered only when the next single subsequent transition finishes\nfunction whenTransitionDone(el, callback) {\n    let realCallback = (ev) => {\n        callback(ev);\n        transitionEventNames.forEach((eventName) => {\n            el.removeEventListener(eventName, realCallback);\n        });\n    };\n    transitionEventNames.forEach((eventName) => {\n        el.addEventListener(eventName, realCallback); // cross-browser way to determine when the transition finishes\n    });\n}\n// ARIA workarounds\n// ----------------------------------------------------------------------------------------------------------------\nfunction createAriaClickAttrs(handler) {\n    return {\n        onClick: handler,\n        ...createAriaKeyboardAttrs(handler),\n    };\n}\nfunction createAriaKeyboardAttrs(handler) {\n    return {\n        tabIndex: 0,\n        onKeyDown(ev) {\n            if (ev.key === 'Enter' || ev.key === ' ') {\n                handler(ev);\n                ev.preventDefault(); // if space, don't scroll down page\n            }\n        },\n    };\n}\n\nlet guidNumber = 0;\nfunction guid() {\n    guidNumber += 1;\n    return String(guidNumber);\n}\n/* FullCalendar-specific DOM Utilities\n----------------------------------------------------------------------------------------------------------------------*/\n// Make the mouse cursor express that an event is not allowed in the current area\nfunction disableCursor() {\n    document.body.classList.add(classNames.notAllowed);\n}\n// Returns the mouse cursor to its original look\nfunction enableCursor() {\n    document.body.classList.remove(classNames.notAllowed);\n}\n/* Selection\n----------------------------------------------------------------------------------------------------------------------*/\nfunction preventSelection(el) {\n    el.style.userSelect = 'none';\n    el.style.webkitUserSelect = 'none';\n    el.addEventListener('selectstart', preventDefault);\n}\nfunction allowSelection(el) {\n    el.style.userSelect = '';\n    el.style.webkitUserSelect = '';\n    el.removeEventListener('selectstart', preventDefault);\n}\n/* Context Menu\n----------------------------------------------------------------------------------------------------------------------*/\nfunction preventContextMenu(el) {\n    el.addEventListener('contextmenu', preventDefault);\n}\nfunction allowContextMenu(el) {\n    el.removeEventListener('contextmenu', preventDefault);\n}\nfunction parseFieldSpecs(input) {\n    let specs = [];\n    let tokens = [];\n    let i;\n    let token;\n    if (typeof input === 'string') {\n        tokens = input.split(/\\s*,\\s*/);\n    }\n    else if (typeof input === 'function') {\n        tokens = [input];\n    }\n    else if (Array.isArray(input)) {\n        tokens = input;\n    }\n    for (i = 0; i < tokens.length; i += 1) {\n        token = tokens[i];\n        if (typeof token === 'string') {\n            specs.push(token.charAt(0) === '-' ?\n                { field: token.substring(1), order: -1 } :\n                { field: token, order: 1 });\n        }\n        else if (typeof token === 'function') {\n            specs.push({ func: token });\n        }\n    }\n    return specs;\n}\nfunction compareByFieldSpecs(obj0, obj1, fieldSpecs) {\n    let i;\n    let cmp;\n    for (i = 0; i < fieldSpecs.length; i += 1) {\n        cmp = compareByFieldSpec(obj0, obj1, fieldSpecs[i]);\n        if (cmp) {\n            return cmp;\n        }\n    }\n    return 0;\n}\nfunction compareByFieldSpec(obj0, obj1, fieldSpec) {\n    if (fieldSpec.func) {\n        return fieldSpec.func(obj0, obj1);\n    }\n    return flexibleCompare(obj0[fieldSpec.field], obj1[fieldSpec.field])\n        * (fieldSpec.order || 1);\n}\nfunction flexibleCompare(a, b) {\n    if (!a && !b) {\n        return 0;\n    }\n    if (b == null) {\n        return -1;\n    }\n    if (a == null) {\n        return 1;\n    }\n    if (typeof a === 'string' || typeof b === 'string') {\n        return String(a).localeCompare(String(b));\n    }\n    return a - b;\n}\n/* String Utilities\n----------------------------------------------------------------------------------------------------------------------*/\nfunction formatWithOrdinals(formatter, args, fallbackText) {\n    if (typeof formatter === 'function') {\n        return formatter(...args);\n    }\n    if (typeof formatter === 'string') { // non-blank string\n        return args.reduce((str, arg, index) => (str.replace('$' + index, arg || '')), formatter);\n    }\n    return fallbackText;\n}\n/* Number Utilities\n----------------------------------------------------------------------------------------------------------------------*/\nfunction compareNumbers(a, b) {\n    return a - b;\n}\nfunction valuesIdentical(a, b) {\n    return a === b;\n}\nfunction computeViewBorderless(options) {\n    const borderless = options.borderless;\n    return {\n        borderlessX: Boolean(options.borderlessX ?? borderless),\n        borderlessTop: Boolean(options.borderlessTop ?? borderless),\n        borderlessBottom: Boolean(options.borderlessBottom ?? borderless),\n    };\n}\n\n// TODO: new util arrayify?\n// Array.prototype.slice.call(\nfunction flatArray(items) {\n    const res = [];\n    for (const item of items) {\n        if (Array.isArray(item)) {\n            for (const subItem of item) {\n                res.push(subItem);\n            }\n        }\n        else {\n            res.push(item);\n        }\n    }\n    return res;\n}\nfunction flatMapArray(inputs, mapFunc) {\n    const res = [];\n    for (let i = 0; i < inputs.length; i += 1) {\n        const output = mapFunc(inputs[i], i);\n        if (Array.isArray(output)) {\n            for (const subOutput of output) {\n                res.push(subOutput);\n            }\n        }\n        else {\n            res.push(output);\n        }\n    }\n    return res;\n}\nfunction removeExact(array, exactItem) {\n    let removeCnt = 0;\n    let i = 0;\n    while (i < array.length) {\n        if (array[i] === exactItem) {\n            array.splice(i, 1);\n            removeCnt += 1;\n        }\n        else {\n            i += 1;\n        }\n    }\n    return removeCnt;\n}\nfunction isMaybeArraysEqual(array0, array1) {\n    if (Array.isArray(array0) && Array.isArray(array1)) {\n        return isArraysEqual(array0, array1);\n    }\n    return array0 === array1;\n}\nfunction isArraysEqual(array0, array1, itemsEqual = valuesIdentical) {\n    if (array0 === array1) {\n        return true;\n    }\n    let len = array0.length;\n    let i;\n    if (len !== array1.length) { // not array? or not same length?\n        return false;\n    }\n    for (i = 0; i < len; i += 1) {\n        if (!itemsEqual(array0[i], array1[i])) {\n            return false;\n        }\n    }\n    return true;\n}\n\nconst { hasOwnProperty } = Object.prototype;\n// Filter / Map\n// -------------------------------------------------------------------------------------------------\nfunction filterHash(hash, func) {\n    let filtered = {};\n    for (let key in hash) {\n        if (func(hash[key], key)) {\n            filtered[key] = hash[key];\n        }\n    }\n    return filtered;\n}\nfunction mapHash(hash, func) {\n    let newHash = {};\n    for (let key in hash) {\n        newHash[key] = func(hash[key], key);\n    }\n    return newHash;\n}\n// Conversion\n// -------------------------------------------------------------------------------------------------\n// Can't use Object.values yet because no es2015 support\n// TODO: reassess browser support\n// https://caniuse.com/?search=object.values\nfunction hashValuesToArray(obj) {\n    let a = [];\n    for (let key in obj) {\n        a.push(obj[key]);\n    }\n    return a;\n}\n// TODO: rename to stringArrayToHash or something\nfunction arrayToHash(a) {\n    let hash = {};\n    for (let item of a) {\n        hash[item] = true;\n    }\n    return hash;\n}\n// Equality\n// -------------------------------------------------------------------------------------------------\nfunction isMaybePropsEqualDepth1(props0, props1) {\n    if (typeof props0 === 'object' && props0 && // non-null object\n        typeof props1 === 'object' && props1 // non-null object\n    ) {\n        return isPropsEqualWithFunc(props0, props1, isPropsEqualShallow);\n    }\n    return props0 === props1;\n}\nfunction isPropsEqualWithFunc(props0, props1, valuesEqual) {\n    if (props0 === props1) {\n        return true;\n    }\n    for (let key in props0) {\n        if (hasOwnProperty.call(props0, key)) {\n            if (!(key in props1)) {\n                return false;\n            }\n        }\n    }\n    for (let key in props1) {\n        if (hasOwnProperty.call(props1, key)) {\n            if (!(key in props0) || !valuesEqual(props0[key], props1[key], key)) {\n                return false;\n            }\n        }\n    }\n    return true;\n}\nfunction isMaybePropsEqualShallow(props0, props1) {\n    if (typeof props0 === 'object' &&\n        typeof props1 === 'object' &&\n        props0 && props1 // both non-null objects\n    ) {\n        return isPropsEqualShallow(props0, props1);\n    }\n    return props0 === props1;\n}\nfunction isPropsEqualShallow(props0, props1) {\n    return isPropsEqualWithFunc(props0, props1, valuesIdentical);\n}\n/*\nFor range inputs like { start, end }. Functions are compared by reference\n*/\nfunction isMaybeDateRangeInputsEqual(range0, range1) {\n    if (typeof range0 === 'object' &&\n        typeof range1 === 'object' &&\n        range0 && range1 // both non-null objects\n    ) {\n        return isPropsEqualWithFunc(range0, range1, isDateInputsEqual);\n    }\n    return range0 === range1;\n}\nfunction isDateInputsEqual(input0, input1) {\n    if (input0 instanceof Date && input1 instanceof Date) {\n        return input0.valueOf() === input1.valueOf();\n    }\n    if (Array.isArray(input0) && Array.isArray(input1)) {\n        return isArraysEqual(input0, input1);\n    }\n    return input0 === input1;\n}\nfunction isPropsEqualWithMap(props0, props1, equalityFuncMap) {\n    return isPropsEqualWithFunc(props0, props1, (val0, val1, key) => {\n        const equalityFunc = equalityFuncMap[key];\n        const isEqual = equalityFunc\n            ? equalityFunc(val0, val1)\n            : val0 === val1;\n        // if (debugMessage && !isEqual) {\n        //   console.log(\n        //     debugMessage, key, 'NOT EQUAL', 'rerunning...',\n        //     equalityFunc\n        //       ? equalityFunc(val0, val1)\n        //       : val0 === val1\n        //   )\n        // }\n        return isEqual;\n    });\n}\n/*\nReturns array of keys\n*/\nfunction getUnequalProps(props0, props1) {\n    let keys = [];\n    for (let key in props0) {\n        if (hasOwnProperty.call(props0, key)) {\n            if (!(key in props1)) {\n                keys.push(key);\n            }\n        }\n    }\n    for (let key in props1) {\n        if (hasOwnProperty.call(props1, key)) {\n            if (props0[key] !== props1[key]) {\n                keys.push(key);\n            }\n        }\n    }\n    return keys;\n}\n// Merge\n// -------------------------------------------------------------------------------------------------\nfunction mergeMaybePropsDepth1(props0, props1) {\n    if (!props0) {\n        return props1;\n    }\n    return mergePropsWithFunc(props0, props1, mergePropsShallow);\n}\nfunction mergePropsWithFunc(props0, props1, mergeValues) {\n    const dest = {};\n    for (let key in props0) {\n        if (hasOwnProperty.call(props0, key)) {\n            if (!(key in props1)) {\n                dest[key] = props0[key];\n            }\n        }\n    }\n    for (let key in props1) {\n        if (hasOwnProperty.call(props1, key)) {\n            if (!(key in props0)) {\n                dest[key] = props1[key];\n            }\n            else {\n                dest[key] = mergeValues(props0[key], props1[key]);\n            }\n        }\n    }\n    return dest;\n}\nfunction mergePropsShallow(props0, props1) {\n    return Object.assign({}, props0, props1);\n}\n\n// base options\n// ------------\nconst BASE_OPTION_REFINERS = {\n    navLinkDayClick: identity,\n    navLinkWeekClick: identity,\n    duration: createDuration,\n    buttons: identity,\n    toolbarElements: identity,\n    prevText: String,\n    nextText: String,\n    prevYearText: String,\n    nextYearText: String,\n    todayText: String,\n    yearText: String,\n    monthText: String,\n    weekTextLong: String,\n    weekTextShort: String,\n    dayText: String,\n    listText: identity,\n    todayHint: identity,\n    prevHint: identity,\n    nextHint: identity,\n    // TODO: make type for hint input\n    buttonDisplay: identity,\n    buttonGroupClass: refineClassNameGenerator,\n    buttonClass: refineClassNameGenerator,\n    defaultAllDayEventDuration: createDuration,\n    defaultTimedEventDuration: createDuration,\n    nextDayThreshold: createDuration,\n    scrollTime: createDuration,\n    scrollTimeReset: Boolean,\n    slotMinTime: createDuration,\n    slotMaxTime: createDuration,\n    popoverFormat: createFormatter,\n    slotDuration: createDuration,\n    snapDuration: createDuration,\n    headerToolbar: identity,\n    footerToolbar: identity,\n    forceEventDuration: Boolean,\n    // TODO: move to timegrid\n    dayLaneClass: refineClassNameGenerator,\n    dayLaneInnerClass: refineClassNameGenerator,\n    dayLaneDidMount: identity,\n    dayLaneWillUnmount: identity,\n    initialView: String,\n    aspectRatio: Number,\n    weekends: Boolean,\n    weekNumberCalculation: identity,\n    weekNumbers: Boolean,\n    weekNumberHeaderClass: refineClassNameGenerator,\n    weekNumberHeaderInnerClass: refineClassNameGenerator,\n    weekNumberHeaderContent: identity,\n    weekNumberHeaderDidMount: identity,\n    weekNumberHeaderWillUnmount: identity,\n    inlineWeekNumberClass: refineClassNameGenerator,\n    inlineWeekNumberContent: identity,\n    inlineWeekNumberDidMount: identity,\n    inlineWeekNumberWillUnmount: identity,\n    editable: Boolean,\n    controller: identity,\n    nowIndicator: Boolean,\n    nowIndicatorSnap: identity,\n    nowIndicatorHeaderClass: refineClassNameGenerator,\n    nowIndicatorHeaderContent: identity,\n    nowIndicatorHeaderDidMount: identity,\n    nowIndicatorHeaderWillUnmount: identity,\n    nowIndicatorDotClass: refineClassName,\n    nowIndicatorLineClass: refineClassNameGenerator,\n    nowIndicatorLineContent: identity,\n    nowIndicatorLineDidMount: identity,\n    nowIndicatorLineWillUnmount: identity,\n    showNonCurrentDates: Boolean,\n    lazyFetching: Boolean,\n    startParam: String,\n    endParam: String,\n    timeZoneParam: String,\n    timeZone: String,\n    locales: identity,\n    locale: identity,\n    dragRevertDuration: Number,\n    dragScroll: Boolean,\n    allDayMaintainDuration: Boolean,\n    unselectAuto: Boolean,\n    dropAccept: identity, // TODO: type draggable\n    eventOrder: parseFieldSpecs,\n    eventOrderStrict: Boolean,\n    eventSlicing: Boolean, // default: true\n    eventPrintLayout: String,\n    longPressDelay: Number,\n    eventDragMinDistance: Number,\n    expandRows: Boolean,\n    height: identity,\n    contentHeight: identity,\n    direction: String,\n    colorScheme: String,\n    weekNumberFormat: createFormatter,\n    eventResizableFromStart: Boolean,\n    displayEventTime: Boolean,\n    displayEventEnd: Boolean,\n    progressiveEventRendering: Boolean,\n    businessHours: identity,\n    initialDate: identity,\n    now: identity,\n    eventDataTransform: identity,\n    tableHeaderSticky: identity,\n    footerScrollbarSticky: identity,\n    defaultAllDay: Boolean,\n    eventSourceFailure: identity,\n    eventSourceSuccess: identity,\n    eventDisplay: String, // TODO: give more specific\n    eventStartEditable: Boolean,\n    eventDurationEditable: Boolean,\n    eventOverlap: identity,\n    eventConstraint: identity,\n    eventAllow: identity,\n    eventColor: String,\n    eventContrastColor: String,\n    eventDidMount: identity,\n    eventWillUnmount: identity,\n    eventContent: identity,\n    eventClass: refineClassNameGenerator,\n    eventInnerClass: refineClassNameGenerator,\n    eventTimeClass: refineClassNameGenerator,\n    eventTitleClass: refineClassNameGenerator,\n    eventBeforeClass: refineClassNameGenerator,\n    eventAfterClass: refineClassNameGenerator,\n    //\n    listItemEventClass: refineClassNameGenerator,\n    listItemEventInnerClass: refineClassNameGenerator,\n    listItemEventTimeClass: refineClassNameGenerator,\n    listItemEventTitleClass: refineClassNameGenerator,\n    listItemEventBeforeClass: refineClassNameGenerator,\n    listItemEventAfterClass: refineClassNameGenerator,\n    //\n    blockEventClass: refineClassNameGenerator,\n    blockEventInnerClass: refineClassNameGenerator,\n    blockEventTimeClass: refineClassNameGenerator,\n    blockEventTitleClass: refineClassNameGenerator,\n    blockEventBeforeClass: refineClassNameGenerator,\n    blockEventAfterClass: refineClassNameGenerator,\n    //\n    rowEventClass: refineClassNameGenerator,\n    rowEventInnerClass: refineClassNameGenerator,\n    rowEventTimeClass: refineClassNameGenerator,\n    rowEventTitleClass: refineClassNameGenerator,\n    rowEventTitleSticky: Boolean,\n    rowEventBeforeClass: refineClassNameGenerator,\n    rowEventBeforeContent: identity,\n    rowEventAfterClass: refineClassNameGenerator,\n    rowEventAfterContent: identity,\n    //\n    columnEventClass: refineClassNameGenerator,\n    columnEventInnerClass: refineClassNameGenerator,\n    columnEventTimeClass: refineClassNameGenerator,\n    columnEventTitleClass: refineClassNameGenerator,\n    columnEventTitleSticky: Boolean,\n    columnEventBeforeClass: refineClassNameGenerator,\n    columnEventAfterClass: refineClassNameGenerator,\n    //\n    backgroundEventClass: refineClassNameGenerator,\n    backgroundEventDidMount: identity,\n    backgroundEventWillUnmount: identity,\n    backgroundEventContent: identity,\n    backgroundEventInnerClass: refineClassNameGenerator,\n    backgroundEventTitleClass: refineClassNameGenerator,\n    backgroundEventColor: String,\n    selectConstraint: identity,\n    selectOverlap: identity,\n    selectAllow: identity,\n    droppable: Boolean,\n    unselectCancel: String,\n    slotHeaderFormat: identity,\n    slotLaneClass: refineClassNameGenerator,\n    slotLaneDidMount: identity,\n    slotLaneWillUnmount: identity,\n    slotHeaderClass: refineClassNameGenerator,\n    slotHeaderInnerClass: refineClassNameGenerator,\n    slotHeaderContent: identity,\n    slotHeaderDidMount: identity,\n    slotHeaderWillUnmount: identity,\n    slotHeaderAlign: identity,\n    slotHeaderSticky: identity,\n    slotHeaderRowClass: refineClassName,\n    slotHeaderDividerClass: refineClassNameGenerator,\n    dayMaxEvents: identity,\n    dayMaxEventRows: identity,\n    dayMinWidth: Number,\n    slotHeaderInterval: createDuration,\n    // in core because more-popover needs it\n    dayHeaderClass: refineClassNameGenerator,\n    dayHeaderInnerClass: refineClassNameGenerator,\n    dayHeaderContent: identity,\n    dayHeaderDidMount: identity,\n    dayHeaderWillUnmount: identity,\n    dayHeaderAlign: identity,\n    // stickiness for cell-inner-contents laterally. experimental settings\n    _dayHeaderSticky: identity,\n    dayHeaderRowClass: refineClassName,\n    dayHeaderDividerClass: refineClassNameGenerator,\n    dayRowClass: refineClassName,\n    dayCellDidMount: identity,\n    dayCellWillUnmount: identity,\n    dayCellClass: refineClassNameGenerator,\n    dayCellInnerClass: refineClassNameGenerator,\n    dayCellTopContent: identity,\n    dayCellTopClass: refineClassNameGenerator,\n    dayCellTopInnerClass: refineClassNameGenerator,\n    dayCellBottomClass: refineClassNameGenerator,\n    allDaySlot: Boolean,\n    allDayText: String,\n    allDayHeaderClass: refineClassNameGenerator,\n    allDayHeaderInnerClass: refineClassNameGenerator,\n    allDayHeaderContent: identity,\n    allDayHeaderDidMount: identity,\n    allDayHeaderWillUnmount: identity,\n    timedText: String,\n    slotMinWidth: Number,\n    slotMinHeight: Number,\n    navLinks: Boolean,\n    eventTimeFormat: createFormatter,\n    rerenderDelay: Number, // TODO: move to vanilla right? nah keep here\n    moreLinkText: identity, // this not enforced :( check others too\n    moreLinkHint: identity,\n    selectMinDistance: Number,\n    selectable: Boolean,\n    selectLongPressDelay: Number,\n    eventLongPressDelay: Number,\n    selectMirror: Boolean,\n    eventMaxStack: Number,\n    eventMinHeight: Number,\n    eventMinWidth: Number,\n    eventShortHeight: Number,\n    slotEventOverlap: Boolean,\n    firstDay: Number,\n    dayCount: Number,\n    dateAlignment: String,\n    dateIncrement: createDuration,\n    hiddenDays: identity,\n    fixedWeekCount: Boolean,\n    validRange: identity, // `this` works?\n    visibleRange: identity, // `this` works?\n    titleFormat: identity,\n    eventInteractive: Boolean,\n    // only used by list-view, but languages define the value, so we need it in base options\n    noEventsText: String,\n    viewHint: identity,\n    viewChangeHint: String, // for the tab container\n    navLinkHint: identity,\n    closeHint: String,\n    eventsHint: String,\n    headingLevel: Number,\n    moreLinkClick: identity,\n    moreLinkContent: identity,\n    moreLinkDidMount: identity,\n    moreLinkWillUnmount: identity,\n    moreLinkClass: refineClassNameGenerator,\n    moreLinkInnerClass: refineClassNameGenerator,\n    //\n    rowMoreLinkClass: refineClassNameGenerator,\n    rowMoreLinkInnerClass: refineClassNameGenerator,\n    //\n    columnMoreLinkClass: refineClassNameGenerator,\n    columnMoreLinkInnerClass: refineClassNameGenerator,\n    navLinkClass: refineClassName,\n    monthStartFormat: createFormatter,\n    dayCellFormat: createFormatter,\n    // for connectors\n    // (can't be part of plugin system b/c must be provided at runtime)\n    handleCustomRendering: identity,\n    customRenderingMetaMap: identity,\n    popoverClass: refineClassName,\n    popoverCloseClass: refineClassName,\n    popoverCloseContent: identity,\n    dayNarrowWidth: Number,\n    borderless: Boolean,\n    borderlessX: Boolean,\n    borderlessTop: Boolean,\n    borderlessBottom: Boolean,\n    fillerClass: refineClassNameGenerator,\n    headerToolbarClass: refineClassNameGenerator,\n    footerToolbarClass: refineClassNameGenerator,\n    toolbarClass: refineClassNameGenerator,\n    toolbarSectionClass: refineClassNameGenerator,\n    toolbarTitleClass: refineClassName,\n    tableClass: refineClassNameGenerator,\n    tableHeaderClass: refineClassNameGenerator,\n    tableBodyClass: refineClassNameGenerator,\n    nonBusinessHoursClass: refineClassName,\n    highlightClass: refineClassName,\n    // daygrid-only\n    dayHeaders: Boolean,\n    dayHeaderFormat: createFormatter,\n    // timegrid-only\n    allDayDividerClass: refineClassName,\n    // list-only\n    listDaysClass: refineClassName, // rename this?\n    listDayClass: refineClassNameGenerator,\n    //\n    listDayFormat: createFalsableFormatter, // defaults specified in list plugins\n    listDayAltFormat: createFalsableFormatter, // \"\n    //\n    listDayHeaderDidMount: identity,\n    listDayHeaderWillUnmount: identity,\n    listDayHeaderClass: refineClassNameGenerator,\n    listDayHeaderInnerClass: refineClassNameGenerator,\n    listDayHeaderContent: identity,\n    //\n    listDayBodyClass: refineClassNameGenerator,\n    //\n    noEventsClass: refineClassNameGenerator,\n    noEventsInnerClass: refineClassNameGenerator,\n    noEventsContent: identity,\n    noEventsDidMount: identity,\n    noEventsWillUnmount: identity,\n    // noEventsText is defined in base options\n    // multimonth-only\n    multiMonthMaxColumns: Number,\n    //\n    singleMonthMinWidth: Number,\n    singleMonthTitleFormat: createFormatter,\n    singleMonthDidMount: identity,\n    singleMonthWillUnmount: identity,\n    singleMonthClass: refineClassNameGenerator,\n    singleMonthHeaderClass: refineClassNameGenerator,\n    singleMonthHeaderInnerClass: refineClassNameGenerator,\n};\n// do NOT give a type here. need `typeof BASE_OPTION_DEFAULTS` to give real results.\n// raw values.\nconst BASE_OPTION_DEFAULTS = {\n    buttonDisplay: 'auto',\n    eventDisplay: 'auto',\n    defaultTimedEventDuration: '01:00:00',\n    defaultAllDayEventDuration: { day: 1 },\n    forceEventDuration: false,\n    nextDayThreshold: '00:00:00',\n    initialView: '',\n    aspectRatio: 1.35,\n    weekends: true,\n    weekNumbers: false,\n    weekNumberCalculation: 'local',\n    editable: false,\n    nowIndicator: false,\n    scrollTime: '06:00:00',\n    scrollTimeReset: true,\n    slotMinTime: '00:00:00',\n    slotMaxTime: '24:00:00',\n    showNonCurrentDates: true,\n    lazyFetching: true,\n    startParam: 'start',\n    endParam: 'end',\n    timeZoneParam: 'timeZone',\n    timeZone: 'local', // TODO: throw error if given falsy value?\n    locales: [],\n    locale: '', // blank values means it will compute based off locales[]\n    dragRevertDuration: 500,\n    dragScroll: true,\n    allDayMaintainDuration: false,\n    unselectAuto: true,\n    dropAccept: '*',\n    eventOrder: 'start,-duration,allDay,title',\n    eventSlicing: true,\n    eventPrintLayout: 'auto',\n    popoverFormat: { month: 'long', day: 'numeric', year: 'numeric' },\n    longPressDelay: 1000,\n    eventDragMinDistance: 5, // only applies to mouse\n    expandRows: false,\n    navLinks: false,\n    selectable: false,\n    eventMinHeight: 15,\n    eventMinWidth: 30,\n    eventShortHeight: 30,\n    monthStartFormat: { month: 'long', day: 'numeric' },\n    dayCellFormat: { day: 'numeric', omitTrailing: true },\n    headingLevel: 2, // like H2\n    outerBorder: true,\n    dayNarrowWidth: 80,\n    eventOverlap: true,\n    slotHeaderAlign: 'start',\n    slotHeaderSticky: true,\n    dayHeaderAlign: 'start',\n    _dayHeaderSticky: true,\n    rowEventTitleSticky: true,\n    columnEventTitleSticky: true,\n    nowIndicatorSnap: 'auto',\n    // daygrid-only\n    dayHeaders: true,\n};\n// calendar listeners\n// ------------------\nconst CALENDAR_LISTENER_REFINERS = {\n    datesSet: identity,\n    eventsSet: identity,\n    eventAdd: identity,\n    eventChange: identity,\n    eventRemove: identity,\n    eventClick: identity, // TODO: resource for scheduler????\n    eventMouseEnter: identity,\n    eventMouseLeave: identity,\n    select: identity, // resource for scheduler????\n    unselect: identity,\n    loading: identity,\n    // internal\n    _unmount: identity,\n    _beforeprint: identity,\n    _afterprint: identity,\n    _noDateSelect: identity,\n    _noEventDrop: identity,\n    _noEventResize: identity,\n    _timeScrollRequest: identity,\n    // interaction-plugin-only\n    dateClick: identity,\n    eventDragStart: identity,\n    eventDragStop: identity,\n    eventDrop: identity,\n    eventResizeStart: identity,\n    eventResizeStop: identity,\n    eventResize: identity,\n    drop: identity,\n    eventReceive: identity,\n    eventLeave: identity,\n};\n// calendar-only options (not for view-specific)\n// ---------------------------------------------\nconst CALENDAR_ONLY_OPTION_REFINERS = {\n    class: refineClassNameGenerator,\n    className: refineClassNameGenerator,\n    viewClass: refineClassNameGenerator,\n    viewDidMount: identity,\n    viewWillUnmount: identity,\n    views: identity,\n    plugins: identity,\n    initialEvents: identity,\n    events: identity,\n    eventSources: identity,\n};\n// view-specific options\n// ---------------------\nconst VIEW_ONLY_OPTION_REFINERS = {\n    type: String,\n    component: identity,\n    class: refineClassNameGenerator,\n    className: refineClassNameGenerator,\n    content: identity,\n    didMount: identity,\n    willUnmount: identity,\n    // internal only\n    buttonTextKey: String,\n    dateProfileGeneratorClass: identity,\n    usesMinMaxTime: Boolean,\n    disallowAmbigTitle: Boolean,\n};\nconst COMPLEX_OPTION_COMPARATORS = {\n    // Unfortunately always need 'maybe' to handle undefined inital value, because of CalendarDataManager\n    dateIncrement: isMaybePropsEqualShallow,\n    headerToolbar: isMaybePropsEqualShallow,\n    footerToolbar: isMaybePropsEqualShallow,\n    buttons: isMaybePropsEqualDepth1,\n    plugins: isMaybeArraysEqual,\n    events: isMaybeArraysEqual,\n    eventSources: isMaybeArraysEqual,\n    ['resources']: isMaybeArraysEqual,\n    // otherwise, an equal-but-new value, like from a React rerender, rebuilds the date profile (#7069)\n    validRange: isMaybeDateRangeInputsEqual,\n    visibleRange: isMaybeDateRangeInputsEqual,\n    hiddenDays: isMaybeArraysEqual,\n};\n// util funcs\n// ----------------------------------------------------------------------------------------------------\nfunction refineProps(input, refiners) {\n    let refined = {};\n    let extra = {};\n    for (let propName in refiners) {\n        if (propName in input) {\n            refined[propName] = refiners[propName](input[propName], propName);\n        }\n    }\n    for (let propName in input) {\n        if (!(propName in refiners)) {\n            extra[propName] = input[propName];\n        }\n    }\n    return { refined, extra };\n}\nfunction identity(raw) {\n    return raw;\n}\nfunction createFalsableFormatter(input) {\n    return input === false ? null : createFormatter(input);\n}\n\n/*\nThe canonical way to construct an EventInstanceRange. Pass undefined for an edge's\ninstant when the input didn't express one or the edge's marker was derived civilly —\nthe property is omitted entirely (never stored as an undefined-valued key).\n*/\nfunction buildEventInstanceRange(start, end, instantStartMs, instantEndMs) {\n    const range = { start, end };\n    if (instantStartMs != null) {\n        range.instantStartMs = instantStartMs;\n    }\n    if (instantEndMs != null) {\n        range.instantEndMs = instantEndMs;\n    }\n    return range;\n}\n// Resolves an edge to its real instant, choosing the deterministic first occurrence when\n// the marker is ambiguous and the edge does not carry an exact instant.\nfunction resolveEdgeInstantMs(marker, instantMs, dateEnv) {\n    return instantMs ?? dateEnv.toDate(marker).valueOf();\n}\n/*\nBuilds every outward-facing representation of a range edge from one policy. Exact timed\nedges use their true instant and its canonical wall-clock marker; civil/all-day edges keep\nthe supplied marker and DateEnv conversion.\n*/\nfunction buildRangeEdgeOutput(marker, instantMs, dateEnv, omitTime) {\n    const canonicalMarker = instantMs != null ? dateEnv.timestampToMarker(instantMs) : marker;\n    const timeZoneOffset = instantMs != null\n        ? Math.round((canonicalMarker.valueOf() - instantMs) / 60000)\n        : dateEnv.offsetForMarker(marker);\n    if (!omitTime && instantMs != null) {\n        return {\n            marker: canonicalMarker,\n            date: new Date(instantMs),\n            dateStr: buildIsoString(canonicalMarker, timeZoneOffset),\n        };\n    }\n    return {\n        marker: canonicalMarker,\n        date: dateEnv.toDate(marker),\n        dateStr: omitTime\n            ? dateEnv.formatIso(marker, { omitTime })\n            : buildIsoString(marker, timeZoneOffset),\n    };\n}\n// the exact epoch instant of a range's start: the stored instant when present, otherwise\n// deterministic first-occurrence resolution of the civil marker\nfunction getRangeInstantStartMs(range, dateEnv) {\n    return resolveEdgeInstantMs(range.start, range.instantStartMs, dateEnv);\n}\nfunction getRangeInstantEndMs(range, dateEnv) {\n    return resolveEdgeInstantMs(range.end, range.instantEndMs, dateEnv);\n}\n// The canonical civil end: recomputed from the exact instant for fold-compressed ranges.\nfunction canonicalRangeEndMarker(range, dateEnv) {\n    return range.instantEndMs != null ? dateEnv.timestampToMarker(range.instantEndMs) : range.end;\n}\nfunction rangeHasInstants(range) {\n    return range.instantStartMs != null || range.instantEndMs != null;\n}\n/*\nLike rangesIntersect, but exact: when either range carries stored instants, real instants\nare compared (a fold-compressed end's representational marker would otherwise falsely\ncollide with the other occurrence's civil times). Pure-civil pairs compare markers, as before.\n*/\nfunction instanceRangesIntersect(range0, range1, dateEnv) {\n    if (rangeHasInstants(range0) || rangeHasInstants(range1)) {\n        return getRangeInstantStartMs(range0, dateEnv) < getRangeInstantEndMs(range1, dateEnv) &&\n            getRangeInstantEndMs(range0, dateEnv) > getRangeInstantStartMs(range1, dateEnv);\n    }\n    return rangesIntersect(range0, range1);\n}\n/*\nLike rangeContainsRange, but exact in the same way as instanceRangesIntersect.\nThe outer range may be open-ended.\n*/\nfunction instanceRangeContainsRange(outerRange, innerRange, dateEnv) {\n    if (rangeHasInstants(outerRange) || rangeHasInstants(innerRange)) {\n        const outerStartMs = outerRange.start != null ?\n            resolveEdgeInstantMs(outerRange.start, outerRange.instantStartMs, dateEnv) :\n            -Infinity;\n        const outerEndMs = outerRange.end != null ?\n            resolveEdgeInstantMs(outerRange.end, outerRange.instantEndMs, dateEnv) :\n            Infinity;\n        return outerStartMs <= getRangeInstantStartMs(innerRange, dateEnv) &&\n            outerEndMs >= getRangeInstantEndMs(innerRange, dateEnv);\n    }\n    return rangeContainsRange(outerRange, innerRange);\n}\n/*\nAdds a positive duration to a start edge, deriving an END edge.\nWhen the edge carries an exact instant and the duration is pure clock-time, the addition\nhappens in instant space (exact real elapsed time) and the result carries an instant too.\nIf a fall-back fold keeps the resulting canonical marker from advancing past the edge's own\nmarker, the result uses the edge's UTC-offset reading instead (the sanctioned\ninstant/marker disagreement — see EventInstanceRange). Calendar-unit durations and\ninstant-less edges use civil arithmetic (no instant).\n*/\nfunction addDurationToEdge(edge, duration, dateEnv) {\n    if (edge.instantMs != null && !duration.years && !duration.months && !duration.days) {\n        const durMs = asRoughMs(duration);\n        const instantMs = edge.instantMs + durMs;\n        const marker = dateEnv.timestampToMarker(instantMs);\n        return marker > edge.marker\n            ? { marker, instantMs }\n            : { marker: addMs(edge.marker, durMs), instantMs };\n    }\n    return { marker: dateEnv.add(edge.marker, duration) };\n}\n/*\nBuilds a civilly-ordered EventInstanceRange from two edges, or null when the range is\ninvalid: pure-civil edges are invalid unless the end marker is after the start marker;\nwhen either edge carries an exact instant, REAL-time order is the truth instead.\nA real range that a DST fall-back fold civilly compresses (instants ordered, markers not)\nis not discarded: its end marker is re-expressed in the start's UTC-offset reading\n(start marker + real duration), keeping the exact end instant.\n*/\nfunction buildValidInstanceRange(start, end, dateEnv) {\n    if (start.instantMs == null && end.instantMs == null) {\n        return end.marker > start.marker\n            ? buildEventInstanceRange(start.marker, end.marker)\n            : null;\n    }\n    const startMs = resolveEdgeInstantMs(start.marker, start.instantMs, dateEnv);\n    const endMs = resolveEdgeInstantMs(end.marker, end.instantMs, dateEnv);\n    if (endMs <= startMs) {\n        return null;\n    }\n    return buildEventInstanceRange(start.marker, end.marker > start.marker\n        ? end.marker\n        : addMs(start.marker, endMs - startMs), // fold-compressed: start's offset reading\n    start.instantMs, end.instantMs);\n}\nfunction createEventInstance(defId, range) {\n    return {\n        instanceId: guid(),\n        defId,\n        range,\n    };\n}\n\n/* Date stuff that doesn't belong in datelib core\n----------------------------------------------------------------------------------------------------------------------*/\n// given a timed range, computes an all-day range that has the same exact duration,\n// but whose start time is aligned with the start of the day.\nfunction computeAlignedDayRange(timedRange) {\n    let dayCnt = Math.floor(diffDays(timedRange.start, timedRange.end)) || 1;\n    let start = startOfDay(timedRange.start);\n    let end = addDays(start, dayCnt);\n    return { start, end };\n}\n// given a timed range, computes an all-day range based on how for the end date bleeds into the next day\n// TODO: give nextDayThreshold a default arg\nfunction computeVisibleDayRange(timedRange, nextDayThreshold = createDuration(0)) {\n    let startDay = null;\n    let endDay = null;\n    if (timedRange.end) {\n        endDay = startOfDay(timedRange.end);\n        let endTimeMS = timedRange.end.valueOf() - endDay.valueOf(); // # of milliseconds into `endDay`\n        // If the end time is actually inclusively part of the next day and is equal to or\n        // beyond the next day threshold, adjust the end to be the exclusive end of `endDay`.\n        // Otherwise, leaving it as inclusive will cause it to exclude `endDay`.\n        if (endTimeMS && endTimeMS >= asRoughMs(nextDayThreshold)) {\n            endDay = addDays(endDay, 1);\n        }\n    }\n    if (timedRange.start) {\n        startDay = startOfDay(timedRange.start); // the beginning of the day the range starts\n        // If end is within `startDay` but not past nextDayThreshold, assign the default duration of one day.\n        if (endDay && endDay <= startDay) {\n            endDay = addDays(startDay, 1);\n        }\n    }\n    return { start: startDay, end: endDay };\n}\nfunction diffDates(date0, date1, dateEnv, largeUnit) {\n    if (largeUnit === 'year') {\n        return createDuration(dateEnv.diffWholeYears(date0, date1), 'year');\n    }\n    if (largeUnit === 'month') {\n        return createDuration(dateEnv.diffWholeMonths(date0, date1), 'month');\n    }\n    return diffDayAndTime(date0, date1); // returns a duration\n}\n\nfunction parseRecurring(refined, defaultAllDay, dateEnv, recurringTypes) {\n    for (let i = 0; i < recurringTypes.length; i += 1) {\n        let parsed = recurringTypes[i].parse(refined, dateEnv);\n        if (parsed) {\n            let { allDay } = refined;\n            if (allDay == null) {\n                allDay = defaultAllDay;\n                if (allDay == null) {\n                    allDay = parsed.allDayGuess;\n                    if (allDay == null) {\n                        allDay = false;\n                    }\n                }\n            }\n            return {\n                allDay,\n                duration: parsed.duration,\n                typeData: parsed.typeData,\n                typeId: i,\n            };\n        }\n    }\n    return null;\n}\nfunction expandRecurring(eventStore, framingRange, context) {\n    let { dateEnv, pluginHooks, options } = context;\n    let { defs, instances } = eventStore;\n    // remove existing recurring instances\n    // TODO: bad. always expand events as a second step\n    instances = filterHash(instances, (instance) => !defs[instance.defId].recurringDef);\n    for (let defId in defs) {\n        let def = defs[defId];\n        if (def.recurringDef) {\n            let { duration } = def.recurringDef;\n            if (!duration) {\n                duration = def.allDay ?\n                    options.defaultAllDayEventDuration :\n                    options.defaultTimedEventDuration;\n            }\n            let starts = expandRecurringRanges(def, duration, framingRange, dateEnv, pluginHooks.recurringTypes);\n            for (let start of starts) {\n                let instance = createEventInstance(defId, {\n                    start,\n                    end: dateEnv.add(start, duration),\n                });\n                instances[instance.instanceId] = instance;\n            }\n        }\n    }\n    return { defs, instances };\n}\n/*\nEvent MUST have a recurringDef\n*/\nfunction expandRecurringRanges(eventDef, duration, framingRange, dateEnv, recurringTypes) {\n    let typeDef = recurringTypes[eventDef.recurringDef.typeId];\n    let markers = typeDef.expand(eventDef.recurringDef.typeData, {\n        start: dateEnv.subtract(framingRange.start, duration), // for when event starts before framing range and goes into\n        end: framingRange.end,\n    }, dateEnv);\n    // the recurrence plugins don't guarantee that all-day events are start-of-day, so we have to\n    if (eventDef.allDay) {\n        markers = markers.map(startOfDay);\n    }\n    return markers;\n}\n\nfunction parseEvents(rawEvents, eventSource, context, allowOpenRange, defIdMap, instanceIdMap) {\n    let eventStore = createEmptyEventStore();\n    let eventRefiners = buildEventRefiners(context);\n    for (let rawEvent of rawEvents) {\n        let tuple = parseEvent(rawEvent, eventSource, context, allowOpenRange, eventRefiners, defIdMap, instanceIdMap);\n        if (tuple) {\n            eventTupleToStore(tuple, eventStore);\n        }\n    }\n    return eventStore;\n}\nfunction eventTupleToStore(tuple, eventStore = createEmptyEventStore()) {\n    eventStore.defs[tuple.def.defId] = tuple.def;\n    if (tuple.instance) {\n        eventStore.instances[tuple.instance.instanceId] = tuple.instance;\n    }\n    return eventStore;\n}\n// retrieves events that have the same groupId as the instance specified by `instanceId`\n// or they are the same as the instance.\n// why might instanceId not be in the store? an event from another calendar?\nfunction getRelevantEvents(eventStore, instanceId) {\n    let instance = eventStore.instances[instanceId];\n    if (instance) {\n        let def = eventStore.defs[instance.defId];\n        // get events/instances with same group\n        let newStore = filterEventStoreDefs(eventStore, (lookDef) => isEventDefsGrouped(def, lookDef));\n        // add the original\n        // TODO: wish we could use eventTupleToStore or something like it\n        newStore.defs[def.defId] = def;\n        newStore.instances[instance.instanceId] = instance;\n        return newStore;\n    }\n    return createEmptyEventStore();\n}\nfunction isEventDefsGrouped(def0, def1) {\n    return Boolean(def0.groupId && def0.groupId === def1.groupId);\n}\nfunction createEmptyEventStore() {\n    return { defs: {}, instances: {} };\n}\nfunction mergeEventStores(store0, store1) {\n    return {\n        defs: { ...store0.defs, ...store1.defs },\n        instances: { ...store0.instances, ...store1.instances },\n    };\n}\nfunction filterEventStoreDefs(eventStore, filterFunc) {\n    let defs = filterHash(eventStore.defs, filterFunc);\n    let instances = filterHash(eventStore.instances, (instance) => (defs[instance.defId] // still exists?\n    ));\n    return { defs, instances };\n}\nfunction excludeSubEventStore(master, sub) {\n    let { defs, instances } = master;\n    let filteredDefs = {};\n    let filteredInstances = {};\n    for (let defId in defs) {\n        if (!sub.defs[defId]) { // not explicitly excluded\n            filteredDefs[defId] = defs[defId];\n        }\n    }\n    for (let instanceId in instances) {\n        if (!sub.instances[instanceId] && // not explicitly excluded\n            filteredDefs[instances[instanceId].defId] // def wasn't filtered away\n        ) {\n            filteredInstances[instanceId] = instances[instanceId];\n        }\n    }\n    return {\n        defs: filteredDefs,\n        instances: filteredInstances,\n    };\n}\n\nfunction normalizeConstraint(input, context) {\n    if (Array.isArray(input)) {\n        return parseEvents(input, null, context, true); // allowOpenRange=true\n    }\n    if (typeof input === 'object' && input) { // non-null object\n        return parseEvents([input], null, context, true); // allowOpenRange=true\n    }\n    if (input != null) {\n        return String(input);\n    }\n    return null;\n}\n\n// TODO: better called \"EventSettings\" or \"EventConfig\"\n// TODO: move this file into structs\n// TODO: separate constraint/overlap/allow, because selection uses only that, not other props\nconst EVENT_UI_REFINERS = {\n    display: String,\n    editable: Boolean,\n    startEditable: Boolean,\n    durationEditable: Boolean,\n    constraint: identity, // Identity<ConstraintInput>, // circular reference. ts dies. event->constraint->event\n    overlap: identity,\n    allow: identity,\n    class: refineClassName,\n    className: refineClassName,\n    color: String,\n    contrastColor: String,\n};\nconst EMPTY_EVENT_UI = {\n    display: null,\n    startEditable: null,\n    durationEditable: null,\n    constraints: [],\n    overlap: null,\n    allows: [],\n    color: '',\n    contrastColor: '',\n    className: '',\n};\nfunction createEventUi(refined, context) {\n    let constraint = normalizeConstraint(refined.constraint, context);\n    return {\n        display: refined.display || null,\n        startEditable: refined.startEditable != null ? refined.startEditable : refined.editable,\n        durationEditable: refined.durationEditable != null ? refined.durationEditable : refined.editable,\n        constraints: constraint != null ? [constraint] : [],\n        overlap: refined.overlap != null ? refined.overlap : null,\n        allows: refined.allow != null ? [refined.allow] : [],\n        color: refined.color || '',\n        contrastColor: refined.contrastColor || '',\n        className: (refined.class ?? refined.className) || '',\n    };\n}\n// TODO: prevent against problems with <2 args!\nfunction combineEventUis(uis) {\n    return uis.reduce(combineTwoEventUis, EMPTY_EVENT_UI);\n}\nfunction combineTwoEventUis(item0, item1) {\n    return {\n        display: item1.display != null ? item1.display : item0.display,\n        startEditable: item1.startEditable != null ? item1.startEditable : item0.startEditable,\n        durationEditable: item1.durationEditable != null ? item1.durationEditable : item0.durationEditable,\n        constraints: item0.constraints.concat(item1.constraints),\n        overlap: typeof item1.overlap === 'boolean' ? item1.overlap : item0.overlap,\n        allows: item0.allows.concat(item1.allows),\n        color: item1.color || item0.color,\n        contrastColor: item1.contrastColor || item0.contrastColor,\n        className: joinClassNames(item0.className, item1.className),\n    };\n}\n\nconst EVENT_NON_DATE_REFINERS = {\n    id: String,\n    groupId: String,\n    title: String,\n    url: String,\n    interactive: Boolean,\n};\nconst EVENT_DATE_REFINERS = {\n    start: identity,\n    end: identity,\n    date: identity,\n    allDay: Boolean,\n};\nconst EVENT_REFINERS = {\n    ...EVENT_NON_DATE_REFINERS,\n    ...EVENT_DATE_REFINERS,\n    extendedProps: identity,\n};\nfunction parseEvent(raw, eventSource, context, allowOpenRange, refiners = buildEventRefiners(context), defIdMap, instanceIdMap) {\n    let { refined, extra } = refineEventDef(raw, context, refiners);\n    let defaultAllDay = computeIsDefaultAllDay(eventSource, context);\n    let recurringRes = parseRecurring(refined, defaultAllDay, context.dateEnv, context.pluginHooks.recurringTypes);\n    if (recurringRes) {\n        let def = parseEventDef(refined, extra, eventSource ? eventSource.sourceId : '', recurringRes.allDay, Boolean(recurringRes.duration), context, defIdMap);\n        def.recurringDef = {\n            typeId: recurringRes.typeId,\n            typeData: recurringRes.typeData,\n            duration: recurringRes.duration,\n        };\n        return { def, instance: null };\n    }\n    let singleRes = parseSingle(refined, defaultAllDay, context, allowOpenRange);\n    if (singleRes) {\n        let def = parseEventDef(refined, extra, eventSource ? eventSource.sourceId : '', singleRes.allDay, singleRes.hasEnd, context, defIdMap);\n        let instance = createEventInstance(def.defId, singleRes.range);\n        if (instanceIdMap && def.publicId && instanceIdMap[def.publicId]) {\n            instance.instanceId = instanceIdMap[def.publicId];\n        }\n        return { def, instance };\n    }\n    return null;\n}\nfunction refineEventDef(raw, context, refiners = buildEventRefiners(context)) {\n    return refineProps(raw, refiners);\n}\nfunction buildEventRefiners(context) {\n    return { ...EVENT_UI_REFINERS, ...EVENT_REFINERS, ...context.pluginHooks.eventRefiners };\n}\n/*\nWill NOT populate extendedProps with the leftover properties.\nWill NOT populate date-related props.\n*/\nfunction parseEventDef(refined, extra, sourceId, allDay, hasEnd, context, defIdMap) {\n    let def = {\n        title: refined.title || '',\n        groupId: refined.groupId || '',\n        publicId: refined.id || '',\n        url: refined.url || '',\n        recurringDef: null,\n        defId: ((defIdMap && refined.id) ? defIdMap[refined.id] : '') || guid(),\n        sourceId,\n        allDay,\n        hasEnd,\n        interactive: refined.interactive,\n        ui: createEventUi(refined, context),\n        extendedProps: {\n            ...(refined.extendedProps || {}),\n            ...extra,\n        },\n    };\n    for (let memberAdder of context.pluginHooks.eventDefMemberAdders) {\n        Object.assign(def, memberAdder(refined));\n    }\n    // help out EventImpl from having user modify props\n    Object.freeze(def.ui.className); // might be simple string, but freeze still works\n    Object.freeze(def.extendedProps);\n    return def;\n}\nfunction parseSingle(refined, defaultAllDay, context, allowOpenRange) {\n    let { allDay } = refined;\n    let startMeta;\n    let startMarker = null;\n    let hasEnd = false;\n    let endMeta;\n    let endMarker = null;\n    let startInput = refined.start != null ? refined.start : refined.date;\n    startMeta = context.dateEnv.createMarkerMeta(startInput);\n    if (startMeta) {\n        startMarker = startMeta.marker;\n    }\n    else if (!allowOpenRange) {\n        return null;\n    }\n    if (refined.end != null) {\n        endMeta = context.dateEnv.createMarkerMeta(refined.end);\n    }\n    if (allDay == null) {\n        if (defaultAllDay != null) {\n            allDay = defaultAllDay;\n        }\n        else {\n            // fall back to the date props LAST\n            allDay = (!startMeta || startMeta.isTimeUnspecified) &&\n                (!endMeta || endMeta.isTimeUnspecified);\n        }\n    }\n    if (allDay && startMarker) {\n        startMarker = startOfDay(startMarker);\n    }\n    // exact instants are stamped when the input expressed them (ISO with offset, Date,\n    // epoch ms) and the marker was used as-is. allDay truncation invalidates instants.\n    let startInstantMs = (!allDay && startMeta) ? startMeta.instantMs : undefined;\n    let range = null;\n    if (endMeta) {\n        endMarker = allDay ? startOfDay(endMeta.marker) : endMeta.marker;\n        if (!startMarker) { // open start (allowOpenRange)\n            range = buildEventInstanceRange(startMarker, endMarker, undefined, allDay ? undefined : endMeta.instantMs);\n        }\n        else if (allDay) {\n            if (endMarker > startMarker) {\n                range = buildEventInstanceRange(startMarker, endMarker);\n            }\n        }\n        else {\n            // rejects ends invalid in real time; real ranges that a DST fall-back fold civilly\n            // compresses keep their exact end, re-expressed in the start's offset reading\n            range = buildValidInstanceRange({ marker: startMarker, instantMs: startInstantMs }, { marker: endMarker, instantMs: endMeta.instantMs }, context.dateEnv);\n        }\n    }\n    if (range) {\n        hasEnd = true;\n    }\n    else if (allowOpenRange) {\n        range = buildEventInstanceRange(startMarker, null, startInstantMs);\n    }\n    else {\n        hasEnd = context.options.forceEventDuration || false;\n        // exact starts get an exact derived end (real elapsed duration), so the end can't\n        // re-resolve to the wrong side of a DST fold\n        let endEdge = addDurationToEdge({ marker: startMarker, instantMs: startInstantMs }, allDay ?\n            context.options.defaultAllDayEventDuration :\n            context.options.defaultTimedEventDuration, context.dateEnv);\n        range = buildEventInstanceRange(startMarker, endEdge.marker, startInstantMs, endEdge.instantMs);\n    }\n    return { allDay, hasEnd, range };\n}\nfunction computeIsDefaultAllDay(eventSource, context) {\n    let res = null;\n    if (eventSource) {\n        res = eventSource.defaultAllDay;\n    }\n    if (res == null) {\n        res = context.options.defaultAllDay;\n    }\n    return res;\n}\n\nconst STANDARD_PROPS = {\n    start: identity,\n    end: identity,\n    allDay: Boolean,\n};\nfunction parseDateSpan(raw, dateEnv, defaultDuration) {\n    let span = parseOpenDateSpan(raw, dateEnv);\n    if (!span) {\n        return null;\n    }\n    let { range } = span;\n    if (!range.start) {\n        return null;\n    }\n    if (!range.end) {\n        if (defaultDuration == null) {\n            return null;\n        }\n        const endEdge = addDurationToEdge({ marker: range.start, instantMs: span.instantStartMs }, defaultDuration, dateEnv);\n        range.end = endEdge.marker;\n        if (endEdge.instantMs != null) {\n            span.instantEndMs = endEdge.instantMs;\n        }\n    }\n    return span;\n}\n/*\nTODO: somehow combine with parseRange?\nWill return null if the start/end props were present but parsed invalidly.\n*/\nfunction parseOpenDateSpan(raw, dateEnv) {\n    let { refined: standardProps, extra } = refineProps(raw, STANDARD_PROPS);\n    let startMeta = standardProps.start ? dateEnv.createMarkerMeta(standardProps.start) : null;\n    let endMeta = standardProps.end ? dateEnv.createMarkerMeta(standardProps.end) : null;\n    let { allDay } = standardProps;\n    if (allDay == null) {\n        allDay = (startMeta && startMeta.isTimeUnspecified) &&\n            (!endMeta || endMeta.isTimeUnspecified);\n    }\n    let range = {\n        start: startMeta ? startMeta.marker : null,\n        end: endMeta ? endMeta.marker : null,\n    };\n    if (!allDay && startMeta && endMeta && (startMeta.instantMs != null || endMeta.instantMs != null)) {\n        const validRange = buildValidInstanceRange({ marker: startMeta.marker, instantMs: startMeta.instantMs }, { marker: endMeta.marker, instantMs: endMeta.instantMs }, dateEnv);\n        if (!validRange && startMeta.instantMs != null && endMeta.instantMs != null) {\n            return null;\n        }\n        if (validRange) {\n            range = { start: validRange.start, end: validRange.end };\n        }\n    }\n    const span = {\n        range,\n        allDay,\n        ...extra,\n    };\n    if (allDay) {\n        delete span.instantStartMs;\n        delete span.instantEndMs;\n    }\n    else {\n        if (startMeta?.instantMs != null) {\n            span.instantStartMs = startMeta.instantMs;\n        }\n        if (endMeta?.instantMs != null) {\n            span.instantEndMs = endMeta.instantMs;\n        }\n    }\n    return span;\n}\nfunction isDateSpansEqual(span0, span1) {\n    return rangesEqual(span0.range, span1.range) &&\n        span0.allDay === span1.allDay &&\n        isSpanPropsEqual(span0, span1);\n}\n// the NON-DATE-RELATED props\nfunction isSpanPropsEqual(span0, span1) {\n    for (let propName in span1) {\n        if (propName !== 'range' && propName !== 'allDay') {\n            if (span0[propName] !== span1[propName]) {\n                return false;\n            }\n        }\n    }\n    // are there any props that span0 has that span1 DOESN'T have?\n    // both have range/allDay, so no need to special-case.\n    for (let propName in span0) {\n        if (!(propName in span1)) {\n            return false;\n        }\n    }\n    return true;\n}\nfunction buildDateSpanApi(span, dateEnv) {\n    return {\n        ...buildRangeApi(span.range, dateEnv, span.allDay, span),\n        allDay: span.allDay,\n    };\n}\nfunction buildRangeApiWithTimeZone(range, dateEnv, omitTime) {\n    return {\n        ...buildRangeApi(range, dateEnv, omitTime),\n        timeZone: dateEnv.timeZone,\n    };\n}\nfunction buildRangeApi(range, dateEnv, omitTime, rangeMeta) {\n    // exact instants may ride on a span (rangeMeta) or on the range itself\n    const instantStartMs = rangeMeta?.instantStartMs ?? range.instantStartMs;\n    const instantEndMs = rangeMeta?.instantEndMs ?? range.instantEndMs;\n    const start = buildRangeEdgeOutput(range.start, instantStartMs, dateEnv, omitTime);\n    const end = buildRangeEdgeOutput(range.end, instantEndMs, dateEnv, omitTime);\n    return {\n        start: start.date,\n        end: end.date,\n        startStr: start.dateStr,\n        endStr: end.dateStr,\n    };\n}\nfunction getDateSpanInstantStartMs(dateSpan, dateEnv) {\n    return resolveEdgeInstantMs(dateSpan.range.start, dateSpan.instantStartMs, dateEnv);\n}\nfunction getDateSpanInstantEndMs(dateSpan, dateEnv) {\n    return resolveEdgeInstantMs(dateSpan.range.end, dateSpan.instantEndMs, dateEnv);\n}\nfunction fabricateEventRange(dateSpan, eventUiBases, context) {\n    let res = refineEventDef({ editable: false }, context);\n    let def = parseEventDef(res.refined, res.extra, '', // sourceId\n    dateSpan.allDay, true, // hasEnd\n    context);\n    return {\n        def,\n        ui: compileEventUi(def, eventUiBases),\n        instance: createEventInstance(def.defId, dateSpan.range),\n        range: dateSpan.range,\n        isStart: true,\n        isEnd: true,\n    };\n}\n\nfunction triggerDateSelect(selection, pev, context) {\n    context.emitter.trigger('select', {\n        ...buildDateSpanApiWithContext(selection, context),\n        jsEvent: pev ? pev.origEvent : null, // Is this always a mouse event? See #4655\n        view: context.viewApi || context.calendarApi.view,\n    });\n}\nfunction triggerDateUnselect(pev, context) {\n    context.emitter.trigger('unselect', {\n        jsEvent: pev ? pev.origEvent : null, // Is this always a mouse event? See #4655\n        view: context.viewApi || context.calendarApi.view,\n    });\n}\nfunction buildDateSpanApiWithContext(dateSpan, context) {\n    let props = {};\n    for (let transform of context.pluginHooks.dateSpanTransforms) {\n        Object.assign(props, transform(dateSpan, context));\n    }\n    Object.assign(props, buildDateSpanApi(dateSpan, context.dateEnv));\n    return props;\n}\n// Given an event's allDay status and start date, return what its fallback end date should be.\n// TODO: rename to computeDefaultEventEnd\nfunction getDefaultEventEnd(allDay, marker, context) {\n    let { dateEnv, options } = context;\n    let end = marker;\n    if (allDay) {\n        end = startOfDay(end);\n        end = dateEnv.add(end, options.defaultAllDayEventDuration);\n    }\n    else {\n        end = dateEnv.add(end, options.defaultTimedEventDuration);\n    }\n    return end;\n}\n// like getDefaultEventEnd, but edge-based: an exact start yields an exact derived end\n// (real elapsed duration), so the end can't re-resolve to the wrong side of a DST fold\nfunction getDefaultEventEndEdge(allDay, start, context) {\n    if (allDay) {\n        return { marker: getDefaultEventEnd(true, start.marker, context) };\n    }\n    return addDurationToEdge(start, context.options.defaultTimedEventDuration, context.dateEnv);\n}\n\n// applies the mutation to ALL defs/instances within the event store\nfunction applyMutationToEventStore(eventStore, eventConfigBase, mutation, context) {\n    let eventConfigs = compileEventUis(eventStore.defs, eventConfigBase);\n    let dest = createEmptyEventStore();\n    for (let defId in eventStore.defs) {\n        let def = eventStore.defs[defId];\n        dest.defs[defId] = applyMutationToEventDef(def, eventConfigs[defId], mutation, context);\n    }\n    for (let instanceId in eventStore.instances) {\n        let instance = eventStore.instances[instanceId];\n        let def = dest.defs[instance.defId]; // important to grab the newly modified def\n        dest.instances[instanceId] = applyMutationToEventInstance(instance, def, eventConfigs[instance.defId], mutation, context);\n    }\n    return dest;\n}\nfunction applyMutationToEventDef(eventDef, eventConfig, mutation, context) {\n    let standardProps = mutation.standardProps || {};\n    // if hasEnd has not been specified, guess a good value based on deltas.\n    // if duration will change, there's no way the default duration will persist,\n    // and thus, we need to mark the event as having a real end\n    if (standardProps.hasEnd == null &&\n        eventConfig.durationEditable &&\n        (mutation.startDelta || mutation.endDelta)) {\n        standardProps.hasEnd = true; // TODO: is this mutation okay?\n    }\n    let copy = {\n        ...eventDef,\n        ...standardProps,\n        ui: { ...eventDef.ui, ...standardProps.ui }, // the only prop we want to recursively overlay\n    };\n    if (mutation.extendedProps) {\n        copy.extendedProps = { ...copy.extendedProps, ...mutation.extendedProps };\n    }\n    for (let applier of context.pluginHooks.eventDefMutationAppliers) {\n        applier(copy, mutation, context);\n    }\n    if (!copy.hasEnd && context.options.forceEventDuration) {\n        copy.hasEnd = true;\n    }\n    return copy;\n}\nfunction applyMutationToEventInstance(eventInstance, eventDef, // must first be modified by applyMutationToEventDef\neventConfig, mutation, context) {\n    let forceAllDay = mutation.standardProps && mutation.standardProps.allDay === true;\n    let clearEnd = mutation.standardProps && mutation.standardProps.hasEnd === false;\n    let copy = { ...eventInstance };\n    if (forceAllDay) {\n        copy.range = computeAlignedDayRange(copy.range); // fresh plain range: instants stripped\n    }\n    if (mutation.datesDelta && eventConfig.startEditable) {\n        copy.range = buildInstanceRange(addDeltaToRangeEdge(copy.range.start, copy.range.instantStartMs, mutation.datesDelta, mutation.instantDatesDeltaMs, context), addDeltaToRangeEdge(copy.range.end, copy.range.instantEndMs, mutation.datesDelta, mutation.instantDatesDeltaMs, context));\n    }\n    if (mutation.startDelta && eventConfig.durationEditable) {\n        copy.range = buildInstanceRange(addDeltaToRangeEdge(copy.range.start, copy.range.instantStartMs, mutation.startDelta, mutation.instantStartDeltaMs, context), { marker: copy.range.end, instantMs: copy.range.instantEndMs });\n    }\n    if (mutation.endDelta && eventConfig.durationEditable) {\n        copy.range = buildInstanceRange({ marker: copy.range.start, instantMs: copy.range.instantStartMs }, addDeltaToRangeEdge(copy.range.end, copy.range.instantEndMs, mutation.endDelta, mutation.instantEndDeltaMs, context));\n    }\n    if (clearEnd) {\n        const startEdge = { marker: copy.range.start, instantMs: copy.range.instantStartMs };\n        copy.range = buildInstanceRange(startEdge, getDefaultEventEndEdge(eventDef.allDay, startEdge, context));\n    }\n    // in case event was all-day but the supplied deltas were not\n    // better util for this?\n    if (eventDef.allDay) {\n        copy.range = {\n            start: startOfDay(copy.range.start),\n            end: startOfDay(copy.range.end),\n        };\n    }\n    // handle invalid durations. a timed range can be invalid civilly or in real time.\n    // a real range that a DST fall-back fold civilly compresses is re-expressed (end in the\n    // start's offset reading) rather than repaired away\n    if (eventDef.allDay) {\n        if (copy.range.end <= copy.range.start) {\n            const startEdge = { marker: copy.range.start };\n            copy.range = buildInstanceRange(startEdge, getDefaultEventEndEdge(true, startEdge, context));\n        }\n    }\n    else {\n        const startEdge = { marker: copy.range.start, instantMs: copy.range.instantStartMs };\n        copy.range = buildValidInstanceRange(startEdge, { marker: copy.range.end, instantMs: copy.range.instantEndMs }, context.dateEnv) ?? buildInstanceRange(startEdge, getDefaultEventEndEdge(false, startEdge, context));\n    }\n    return copy;\n}\n/*\nWhen instantDeltaMs is given, moves the edge by an exact instant amount, basing off the\nedge's stored instant when present (preserves identity through DST fall-back doubled times).\nThe resulting marker is always a real local time in the current timeZone; ambiguous civil\ntimes resolve deterministically. Civil (Duration-only) deltas invalidate any stored instant.\n*/\nfunction addDeltaToRangeEdge(marker, instantMs, delta, instantDeltaMs, context) {\n    if (instantDeltaMs != null) {\n        const newInstantMs = resolveEdgeInstantMs(marker, instantMs, context.dateEnv) + instantDeltaMs;\n        return {\n            marker: context.dateEnv.timestampToMarker(newInstantMs),\n            instantMs: newInstantMs,\n        };\n    }\n    // civil deltas apply to the edge's canonical civil form — a fold-compressed end's\n    // stored marker is representational and must not enter civil arithmetic\n    return {\n        marker: context.dateEnv.add(instantMs != null ? context.dateEnv.timestampToMarker(instantMs) : marker, delta),\n    };\n}\nfunction buildInstanceRange(start, end) {\n    return buildEventInstanceRange(start.marker, end.marker, start.instantMs, end.instantMs);\n}\n\nclass EventSourceImpl {\n    constructor(context, internalEventSource) {\n        this.context = context;\n        this.internalEventSource = internalEventSource;\n    }\n    remove() {\n        this.context.dispatch({\n            type: 'REMOVE_EVENT_SOURCE',\n            sourceId: this.internalEventSource.sourceId,\n        });\n    }\n    refetch() {\n        this.context.dispatch({\n            type: 'FETCH_EVENT_SOURCES',\n            sourceIds: [this.internalEventSource.sourceId],\n            isRefetch: true,\n        });\n    }\n    get id() {\n        return this.internalEventSource.publicId;\n    }\n    get url() {\n        return this.internalEventSource.meta.url;\n    }\n    get format() {\n        return this.internalEventSource.meta.format; // TODO: bad. not guaranteed\n    }\n}\n\nclass EventImpl {\n    // instance will be null if expressing a recurring event that has no current instances,\n    // OR if trying to validate an incoming external event that has no dates assigned\n    constructor(context, def, instance) {\n        this._context = context;\n        this._def = def;\n        this._instance = instance || null;\n    }\n    /*\n    TODO: make event struct more responsible for this\n    */\n    setProp(name, val) {\n        if (name in EVENT_DATE_REFINERS) {\n            warn(`Cannot set date-related event property \\`${name}\\`. Use a method instead.`);\n            // TODO: make proper aliasing system?\n        }\n        else if (name === 'id') {\n            val = EVENT_NON_DATE_REFINERS[name](val);\n            this.mutate({\n                standardProps: { publicId: val }, // hardcoded internal name\n            });\n        }\n        else if (name in EVENT_NON_DATE_REFINERS) {\n            val = EVENT_NON_DATE_REFINERS[name](val);\n            this.mutate({\n                standardProps: { [name]: val },\n            });\n        }\n        else if (name in EVENT_UI_REFINERS) {\n            let ui = EVENT_UI_REFINERS[name](val);\n            if (name === 'editable') {\n                ui = { startEditable: val, durationEditable: val };\n            }\n            else {\n                ui = { [name]: val };\n            }\n            this.mutate({\n                standardProps: { ui },\n            });\n        }\n        else {\n            warn(`Cannot set event property \\`${name}\\`. Use setExtendedProp instead.`);\n        }\n    }\n    setExtendedProp(name, val) {\n        this.mutate({\n            extendedProps: { [name]: val },\n        });\n    }\n    setStart(startInput, options = {}) {\n        let { dateEnv } = this._context;\n        let startMeta = dateEnv.createMarkerMeta(startInput);\n        if (startMeta && this._instance) { // TODO: warning if parsed bad\n            let instanceRange = this._instance.range;\n            let startDelta = diffDates(instanceRange.start, startMeta.marker, dateEnv, options.granularity); // what if parsed bad!?\n            let instantDeltaMs = computeInstantDeltaMs(startMeta, getRangeInstantStartMs(instanceRange, dateEnv), options.granularity);\n            if (options.maintainDuration) {\n                this.mutate({ datesDelta: startDelta, instantDatesDeltaMs: instantDeltaMs });\n            }\n            else {\n                this.mutate({ startDelta, instantStartDeltaMs: instantDeltaMs });\n            }\n        }\n    }\n    setEnd(endInput, options = {}) {\n        let { dateEnv } = this._context;\n        let endMeta = null;\n        if (endInput != null) {\n            endMeta = dateEnv.createMarkerMeta(endInput);\n            if (!endMeta) {\n                return; // TODO: warning if parsed bad\n            }\n        }\n        if (this._instance) {\n            if (endMeta) {\n                let instanceRange = this._instance.range;\n                // canonical base: matches what a civil delta will be applied to\n                let endDelta = diffDates(canonicalRangeEndMarker(instanceRange, dateEnv), endMeta.marker, dateEnv, options.granularity);\n                let instantDeltaMs = computeInstantDeltaMs(endMeta, getRangeInstantEndMs(instanceRange, dateEnv), options.granularity);\n                this.mutate({ endDelta, instantEndDeltaMs: instantDeltaMs });\n            }\n            else {\n                this.mutate({ standardProps: { hasEnd: false } });\n            }\n        }\n    }\n    setDates(startInput, endInput, options = {}) {\n        let { dateEnv } = this._context;\n        let standardProps = { allDay: options.allDay };\n        let startMeta = dateEnv.createMarkerMeta(startInput);\n        let endMeta = null;\n        if (!startMeta) {\n            return; // TODO: warning if parsed bad\n        }\n        if (endInput != null) {\n            endMeta = dateEnv.createMarkerMeta(endInput);\n            if (!endMeta) { // TODO: warning if parsed bad\n                return;\n            }\n        }\n        if (this._instance) {\n            let instanceRange = this._instance.range;\n            // converting to all-day is civil-only: exact instants don't survive day-alignment\n            let skipInstants = options.allDay === true;\n            let instantStartDeltaMs = skipInstants ? undefined : computeInstantDeltaMs(startMeta, getRangeInstantStartMs(instanceRange, dateEnv), options.granularity);\n            let instantEndDeltaMs = (skipInstants || !endMeta) ? undefined : computeInstantDeltaMs(endMeta, getRangeInstantEndMs(instanceRange, dateEnv), options.granularity);\n            // when computing the diff for an event being converted to all-day,\n            // compute diff off of the all-day values the way event-mutation does.\n            if (options.allDay === true) {\n                instanceRange = computeAlignedDayRange(instanceRange);\n            }\n            // canonical bases: match what civil deltas will be applied to\n            let startDelta = diffDates(instanceRange.start, startMeta.marker, dateEnv, options.granularity);\n            if (endMeta) {\n                let endDelta = diffDates(canonicalRangeEndMarker(instanceRange, dateEnv), endMeta.marker, dateEnv, options.granularity);\n                if (durationsEqual(startDelta, endDelta) && instantStartDeltaMs === instantEndDeltaMs) {\n                    this.mutate({ datesDelta: startDelta, instantDatesDeltaMs: instantStartDeltaMs, standardProps });\n                }\n                else {\n                    this.mutate({ startDelta, endDelta, instantStartDeltaMs, instantEndDeltaMs, standardProps });\n                }\n            }\n            else { // means \"clear the end\"\n                standardProps.hasEnd = false;\n                this.mutate({ datesDelta: startDelta, instantDatesDeltaMs: instantStartDeltaMs, standardProps });\n            }\n        }\n    }\n    moveStart(deltaInput) {\n        let delta = createDuration(deltaInput);\n        if (delta) { // TODO: warning if parsed bad\n            this.mutate({ startDelta: delta });\n        }\n    }\n    moveEnd(deltaInput) {\n        let delta = createDuration(deltaInput);\n        if (delta) { // TODO: warning if parsed bad\n            this.mutate({ endDelta: delta });\n        }\n    }\n    moveDates(deltaInput) {\n        let delta = createDuration(deltaInput);\n        if (delta) { // TODO: warning if parsed bad\n            this.mutate({ datesDelta: delta });\n        }\n    }\n    setAllDay(allDay, options = {}) {\n        let standardProps = { allDay };\n        let { maintainDuration } = options;\n        if (maintainDuration == null) {\n            maintainDuration = this._context.options.allDayMaintainDuration;\n        }\n        if (this._def.allDay !== allDay) {\n            standardProps.hasEnd = maintainDuration;\n        }\n        this.mutate({ standardProps });\n    }\n    formatRange(formatInput) {\n        let { dateEnv } = this._context;\n        let instance = this._instance;\n        let formatter = createFormatter(formatInput);\n        let start = buildRangeEdgeOutput(instance.range.start, instance.range.instantStartMs, dateEnv);\n        if (this._def.hasEnd) {\n            let end = buildRangeEdgeOutput(instance.range.end, instance.range.instantEndMs, dateEnv);\n            return joinDateTimeFormatParts(dateEnv.formatRangeToParts(start.marker, end.marker, formatter, {\n                startInstantMs: start.date.valueOf(),\n                endInstantMs: end.date.valueOf(),\n            }));\n        }\n        return joinDateTimeFormatParts(dateEnv.formatToParts(start.marker, formatter, {\n            instantMs: start.date.valueOf(),\n        }));\n    }\n    mutate(mutation) {\n        let instance = this._instance;\n        if (instance) {\n            let def = this._def;\n            let context = this._context;\n            let { eventStore } = context.getCurrentData();\n            let relevantEvents = getRelevantEvents(eventStore, instance.instanceId);\n            let eventConfigBase = {\n                '': {\n                    display: '',\n                    startEditable: true,\n                    durationEditable: true,\n                    constraints: [],\n                    overlap: null,\n                    allows: [],\n                    color: '',\n                    contrastColor: '',\n                    className: '',\n                },\n            };\n            relevantEvents = applyMutationToEventStore(relevantEvents, eventConfigBase, mutation, context);\n            let oldEvent = new EventImpl(context, def, instance); // snapshot\n            this._def = relevantEvents.defs[def.defId];\n            this._instance = relevantEvents.instances[instance.instanceId];\n            context.dispatch({\n                type: 'MERGE_EVENTS',\n                eventStore: relevantEvents,\n            });\n            context.emitter.trigger('eventChange', {\n                oldEvent,\n                event: this,\n                relatedEvents: buildEventApis(relevantEvents, context, instance),\n                revert() {\n                    context.dispatch({\n                        type: 'RESET_EVENTS',\n                        eventStore, // the ORIGINAL store\n                    });\n                },\n            });\n        }\n    }\n    remove() {\n        let context = this._context;\n        let asStore = eventApiToStore(this);\n        context.dispatch({\n            type: 'REMOVE_EVENTS',\n            eventStore: asStore,\n        });\n        context.emitter.trigger('eventRemove', {\n            event: this,\n            relatedEvents: [],\n            revert() {\n                context.dispatch({\n                    type: 'MERGE_EVENTS',\n                    eventStore: asStore,\n                });\n            },\n        });\n    }\n    get source() {\n        let { sourceId } = this._def;\n        if (sourceId) {\n            return new EventSourceImpl(this._context, this._context.getCurrentData().eventSources[sourceId]);\n        }\n        return null;\n    }\n    get start() {\n        let instance = this._instance;\n        if (instance) {\n            return buildRangeEdgeOutput(instance.range.start, instance.range.instantStartMs, this._context.dateEnv, this._def.allDay).date;\n        }\n        return null;\n    }\n    get end() {\n        let instance = this._instance;\n        if (instance && this._def.hasEnd) {\n            return buildRangeEdgeOutput(instance.range.end, instance.range.instantEndMs, this._context.dateEnv, this._def.allDay).date;\n        }\n        return null;\n    }\n    get startStr() {\n        let instance = this._instance;\n        if (instance) {\n            return buildRangeEdgeOutput(instance.range.start, instance.range.instantStartMs, this._context.dateEnv, this._def.allDay).dateStr;\n        }\n        return '';\n    }\n    get endStr() {\n        let instance = this._instance;\n        if (instance && this._def.hasEnd) {\n            return buildRangeEdgeOutput(instance.range.end, instance.range.instantEndMs, this._context.dateEnv, this._def.allDay).dateStr;\n        }\n        return '';\n    }\n    // computable props that all access the def\n    // TODO: find a TypeScript-compatible way to do this at scale\n    get id() { return this._def.publicId; }\n    get groupId() { return this._def.groupId; }\n    get allDay() { return this._def.allDay; }\n    get title() { return this._def.title; }\n    get url() { return this._def.url; }\n    get display() { return this._def.ui.display || 'auto'; } // bad. just normalize the type earlier\n    get startEditable() { return this._def.ui.startEditable; }\n    get durationEditable() { return this._def.ui.durationEditable; }\n    get constraint() { return this._def.ui.constraints[0] || null; }\n    get overlap() { return this._def.ui.overlap; }\n    get allow() { return this._def.ui.allows[0] || null; }\n    get color() { return this._def.ui.color; }\n    get contrastColor() { return this._def.ui.contrastColor; }\n    // NOTE: user can't modify these because Object.freeze was called in event-def parsing\n    get className() { return this._def.ui.className; }\n    get extendedProps() { return this._def.extendedProps; }\n    toPlainObject(settings = {}) {\n        let def = this._def;\n        let { ui } = def;\n        let { startStr, endStr } = this;\n        let res = {\n            allDay: def.allDay,\n        };\n        if (def.title) {\n            res.title = def.title;\n        }\n        if (startStr) {\n            res.start = startStr;\n        }\n        if (endStr) {\n            res.end = endStr;\n        }\n        if (def.publicId) {\n            res.id = def.publicId;\n        }\n        if (def.groupId) {\n            res.groupId = def.groupId;\n        }\n        if (def.url) {\n            res.url = def.url;\n        }\n        if (ui.display && ui.display !== 'auto') {\n            res.display = ui.display;\n        }\n        // TODO: what about recurring-event properties???\n        // TODO: include startEditable/durationEditable/constraint/overlap/allow\n        if (ui.color) {\n            res.color = ui.color;\n        }\n        if (ui.contrastColor) {\n            res.contrastColor = ui.contrastColor;\n        }\n        if (ui.className) {\n            res.className = ui.className;\n        }\n        if (Object.keys(def.extendedProps).length) {\n            if (settings.collapseExtendedProps) {\n                Object.assign(res, def.extendedProps);\n            }\n            else {\n                res.extendedProps = def.extendedProps;\n            }\n        }\n        return res;\n    }\n    toJSON() {\n        return this.toPlainObject();\n    }\n}\n/*\nThe exact-ms counterpart of a civil delta, present when the input expressed an exact\ninstant (ISO with offset, Date, epoch ms). Undefined means the mutation applies only the\ncivil delta. Skipped when a granularity is requested (whole-unit semantics).\n*/\nfunction computeInstantDeltaMs(meta, fromInstantMs, granularity) {\n    return (meta.instantMs != null && !granularity)\n        ? meta.instantMs - fromInstantMs\n        : undefined;\n}\nfunction eventApiToStore(eventApi) {\n    let def = eventApi._def;\n    let instance = eventApi._instance;\n    return {\n        defs: { [def.defId]: def },\n        instances: instance\n            ? { [instance.instanceId]: instance }\n            : {},\n    };\n}\nfunction buildEventApis(eventStore, context, excludeInstance) {\n    let { defs, instances } = eventStore;\n    let eventApis = [];\n    let excludeInstanceId = excludeInstance ? excludeInstance.instanceId : '';\n    for (let id in instances) {\n        let instance = instances[id];\n        let def = defs[instance.defId];\n        if (instance.instanceId !== excludeInstanceId) {\n            eventApis.push(new EventImpl(context, def, instance));\n        }\n    }\n    return eventApis;\n}\n\n/*\nSpecifying nextDayThreshold signals that all-day ranges should be sliced.\n*/\nfunction sliceEventStore(eventStore, eventUiBases, framingRange, nextDayThreshold) {\n    let inverseBgByGroupId = {};\n    let inverseBgByDefId = {};\n    let defByGroupId = {};\n    let bgRanges = [];\n    let fgRanges = [];\n    let eventUis = compileEventUis(eventStore.defs, eventUiBases);\n    for (let defId in eventStore.defs) {\n        let def = eventStore.defs[defId];\n        let ui = eventUis[def.defId];\n        if (ui.display === 'inverse-background') {\n            if (def.groupId) {\n                inverseBgByGroupId[def.groupId] = [];\n                if (!defByGroupId[def.groupId]) {\n                    defByGroupId[def.groupId] = def;\n                }\n            }\n            else {\n                inverseBgByDefId[defId] = [];\n            }\n        }\n    }\n    for (let instanceId in eventStore.instances) {\n        let instance = eventStore.instances[instanceId];\n        let def = eventStore.defs[instance.defId];\n        let ui = eventUis[def.defId];\n        let origRange = instance.range;\n        let normalRange = (!def.allDay && nextDayThreshold) ?\n            computeVisibleDayRange(origRange, nextDayThreshold) :\n            origRange;\n        let slicedRange = intersectRanges(normalRange, framingRange);\n        if (slicedRange) {\n            if (ui.display === 'inverse-background') {\n                if (def.groupId) {\n                    inverseBgByGroupId[def.groupId].push(slicedRange);\n                }\n                else {\n                    inverseBgByDefId[instance.defId].push(slicedRange);\n                }\n            }\n            else if (ui.display !== 'none') {\n                (ui.display === 'background' ? bgRanges : fgRanges).push({\n                    def,\n                    ui,\n                    instance,\n                    range: buildSlicedEventRange(origRange, normalRange, slicedRange),\n                    isStart: normalRange.start && normalRange.start.valueOf() === slicedRange.start.valueOf(),\n                    isEnd: normalRange.end && normalRange.end.valueOf() === slicedRange.end.valueOf(),\n                });\n            }\n        }\n    }\n    for (let groupId in inverseBgByGroupId) { // BY GROUP\n        let ranges = inverseBgByGroupId[groupId];\n        let invertedRanges = invertRanges(ranges, framingRange);\n        for (let invertedRange of invertedRanges) {\n            let def = defByGroupId[groupId];\n            let ui = eventUis[def.defId];\n            bgRanges.push({\n                def,\n                ui,\n                instance: null,\n                range: invertedRange,\n                isStart: false,\n                isEnd: false,\n            });\n        }\n    }\n    for (let defId in inverseBgByDefId) {\n        let ranges = inverseBgByDefId[defId];\n        let invertedRanges = invertRanges(ranges, framingRange);\n        for (let invertedRange of invertedRanges) {\n            bgRanges.push({\n                def: eventStore.defs[defId],\n                ui: eventUis[defId],\n                instance: null,\n                range: invertedRange,\n                isStart: false,\n                isEnd: false,\n            });\n        }\n    }\n    return { bg: bgRanges, fg: fgRanges };\n}\n/*\nCarries instant fields from the original event range onto the sliced range, per-edge, only\nfor edges that were not clipped by the framing range. Only applies when the range was not\nday-normalized (normalRange === origRange, i.e. timed events not subject to nextDayThreshold).\n*/\nfunction buildSlicedEventRange(origRange, normalRange, slicedRange) {\n    if (normalRange !== origRange) {\n        return slicedRange;\n    }\n    return buildEventInstanceRange(slicedRange.start, slicedRange.end, slicedRange.start.valueOf() === origRange.start.valueOf() ? origRange.instantStartMs : undefined, slicedRange.end.valueOf() === origRange.end.valueOf() ? origRange.instantEndMs : undefined);\n}\nfunction hasBgRendering(def) {\n    return def.ui.display === 'background' || def.ui.display === 'inverse-background';\n}\nfunction setElEventRange(el, eventRange) {\n    el.fcEventRange = eventRange;\n}\nfunction getElEventRange(el) {\n    return el.fcEventRange ||\n        el.parentNode.fcEventRange || // for the harness\n        null;\n}\n// event ui computation\nfunction compileEventUis(eventDefs, eventUiBases) {\n    return mapHash(eventDefs, (eventDef) => compileEventUi(eventDef, eventUiBases));\n}\n/*\nI wish we didn't need to deal with inheritance of all properties all together\nI wish you could resolve just eventDisplay first, then the others\n*/\nfunction compileEventUi(eventDef, eventUiBases) {\n    const uis = [];\n    const fallbackBase = eventUiBases[''];\n    const defBase = eventUiBases[eventDef.defId];\n    if (fallbackBase) {\n        uis.push(fallbackBase);\n    }\n    if (defBase) {\n        uis.push(defBase);\n    }\n    uis.push(eventDef.ui);\n    return combineEventUis(uis);\n}\nfunction sortEventSegs(segs, eventOrderSpecs) {\n    let objs = segs.map(buildSegCompareObj);\n    objs.sort((obj0, obj1) => compareByFieldSpecs(obj0, obj1, eventOrderSpecs)); // !!!\n    return objs.map((c) => c._seg);\n}\n// returns a object with all primitive props that can be compared\nfunction buildSegCompareObj(seg) {\n    let { eventRange } = seg;\n    let eventDef = eventRange.def;\n    let range = eventRange.instance ? eventRange.instance.range : eventRange.range;\n    let start = range.start ? range.start.valueOf() : 0; // TODO: better support for open-range events\n    let end = range.end ? range.end.valueOf() : 0; // \"\n    return {\n        ...eventDef.extendedProps,\n        ...eventDef,\n        id: eventDef.publicId,\n        start,\n        end,\n        duration: end - start,\n        allDay: Number(eventDef.allDay),\n        _seg: seg, // for later retrieval\n    };\n}\nfunction computeEventRangeDraggable(eventRange, context) {\n    let { pluginHooks } = context;\n    let transformers = pluginHooks.isDraggableTransformers;\n    let { def, ui } = eventRange;\n    let val = ui.startEditable;\n    for (let transformer of transformers) {\n        val = transformer(val, def, ui, context);\n    }\n    return val;\n}\n/*\nslicedStart/slicedEnd are optionally supplied to signal where breaks occur in view-specific segment\na better approach is to always slice with dates and always supply this argument,\nhowever, daygrid only slices by row/col\n*/\nfunction buildEventRangeTimeText(timeFormat, eventRange, // timed/whole-day span\nslicedStart, // view-sliced timed/whole-day span\nslicedEnd, // view-sliced timed/whole-day span\nisStart, isEnd, context, defaultDisplayEventTime = true, defaultDisplayEventEnd = true) {\n    const { dateEnv, options } = context;\n    const { def } = eventRange;\n    const { range } = eventRange.instance;\n    const canonicalStart = buildRangeEdgeOutput(range.start, range.instantStartMs, dateEnv);\n    const canonicalEnd = buildRangeEdgeOutput(range.end, range.instantEndMs, dateEnv);\n    let { displayEventTime, displayEventEnd } = options;\n    if (displayEventTime == null) {\n        displayEventTime = defaultDisplayEventTime !== false;\n    }\n    if (displayEventEnd == null) {\n        displayEventEnd = defaultDisplayEventEnd !== false;\n    }\n    const startDate = (!isStart &&\n        slicedStart &&\n        // if seg is the first seg, but start-date cut-off by slotMinTime, (technically isStart=false)\n        // we still want to display the original start-time\n        startOfDay(slicedStart).valueOf() !== startOfDay(canonicalStart.marker).valueOf())\n        ? slicedStart\n        : canonicalStart.marker;\n    const endDate = (!isEnd &&\n        slicedEnd &&\n        // See above HACK, but for end-time\n        startOfDay(addMs(slicedEnd, -1)).valueOf() !== startOfDay(addMs(canonicalEnd.marker, -1)).valueOf())\n        ? slicedEnd\n        : canonicalEnd.marker;\n    const startInstantMs = startDate === canonicalStart.marker ? canonicalStart.date.valueOf() : undefined;\n    const endInstantMs = endDate === canonicalEnd.marker ? canonicalEnd.date.valueOf() : undefined;\n    if (displayEventTime && !def.allDay) {\n        if (displayEventEnd && (isStart || isEnd) && def.hasEnd) {\n            // TODO: put this functionality in @full-ui/headless-calendar ?\n            const rangeParts = dateEnv.formatRangeToParts(startDate, endDate, timeFormat, {\n                startInstantMs,\n                endInstantMs,\n            });\n            const multiDaySeparator = detectMultiDayTimes(rangeParts);\n            // NOTE: produces strings like '12:00pm - 1:00pm', without condensing dayPeriod,\n            // but that's okay since it's technically a different dayPeriod on a different day\n            if (multiDaySeparator != null) {\n                return joinDateTimeFormatParts(dateEnv.formatToParts(startDate, timeFormat, {\n                    instantMs: startInstantMs,\n                })) +\n                    multiDaySeparator +\n                    joinDateTimeFormatParts(dateEnv.formatToParts(endDate, timeFormat, {\n                        instantMs: endInstantMs,\n                    }));\n            }\n            return joinDateTimeFormatParts(rangeParts);\n        }\n        if (isStart) {\n            return joinDateTimeFormatParts(dateEnv.formatToParts(startDate, timeFormat, {\n                instantMs: startInstantMs,\n            }));\n        }\n    }\n    return '';\n}\nconst dateUnits = new Set(['year', 'month', 'day']); // TODO: DRY\nfunction detectMultiDayTimes(parts) {\n    let sharedPart;\n    let hasDatePart = false;\n    for (const part of parts) {\n        if (part.source === 'shared') {\n            sharedPart = part;\n        }\n        if (dateUnits.has(part.type)) {\n            hasDatePart = true;\n        }\n    }\n    return hasDatePart ? sharedPart.value : undefined;\n}\nfunction getEventRangeMeta(eventRange, todayRange, nowDate, nowMs) {\n    let segRange = eventRange.range;\n    return {\n        isPast: segRange.instantEndMs != null && nowMs != null\n            ? segRange.instantEndMs <= nowMs\n            : segRange.end <= (nowDate || todayRange.start),\n        isFuture: segRange.instantStartMs != null && nowMs != null\n            ? segRange.instantStartMs >= nowMs\n            : segRange.start >= (nowDate || todayRange.end),\n        isToday: todayRange && rangeContainsMarker(todayRange, segRange.start),\n    };\n}\nfunction buildEventRangeKey(eventRange) {\n    return eventRange.instance\n        ? eventRange.instance.instanceId\n        : `${eventRange.def.defId}:${eventRange.range.start.toISOString()}`;\n    // inverse-background events don't have specific instances. TODO: better solution\n}\nfunction getEventTagAndAttrs(eventRange, context) {\n    let { def, instance } = eventRange;\n    let { url } = def;\n    if (url) {\n        return ['a', { href: url }, true];\n    }\n    let { emitter, options } = context;\n    let { eventInteractive } = options;\n    if (eventInteractive == null) {\n        eventInteractive = def.interactive;\n        if (eventInteractive == null) {\n            eventInteractive = Boolean(emitter.hasHandlers('eventClick'));\n        }\n    }\n    let attrs;\n    // mock what happens in EventClicking\n    if (eventInteractive) {\n        // only attach keyboard-related handlers because click handler is already done in EventClicking\n        attrs = createAriaKeyboardAttrs((ev) => {\n            emitter.trigger('eventClick', {\n                el: ev.target,\n                event: new EventImpl(context, def, instance),\n                jsEvent: ev,\n                view: context.viewApi,\n            });\n        });\n        attrs = { role: 'button', ...attrs };\n    }\n    return ['div', attrs, eventInteractive];\n}\n\nexport { getRangeInstantEndMs as $, formatWithOrdinals as A, BASE_OPTION_DEFAULTS as B, CALENDAR_LISTENER_REFINERS as C, getElEventRange as D, EVENT_UI_REFINERS as E, listenBySelector as F, listenToHoverBySelector as G, isArraysEqual as H, isPropsEqualShallow as I, computeViewBorderless as J, isPropsEqualWithMap as K, createAriaClickAttrs as L, setElEventRange as M, buildEventRangeTimeText as N, getEventTagAndAttrs as O, computeEventRangeDraggable as P, refineClassName as Q, mergeMaybePropsDepth1 as R, getUnequalProps as S, computeVisibleDayRange as T, filterEventStoreDefs as U, VIEW_ONLY_OPTION_REFINERS as V, excludeSubEventStore as W, expandRecurring as X, mergeEventStores as Y, buildValidInstanceRange as Z, buildEventInstanceRange as _, buildEventApis as a, getRangeInstantStartMs as a0, enableCursor as a1, disableCursor as a2, getDateSpanInstantStartMs as a3, getDateSpanInstantEndMs as a4, compareNumbers as a5, getRelevantEvents as a6, applyMutationToEventStore as a7, addDeltaToRangeEdge as a8, preventSelection as a9, addDurationToEdge as aA, getDefaultEventEndEdge as aB, createEventInstance as aC, preventContextMenu as aa, allowSelection as ab, allowContextMenu as ac, isDateSpansEqual as ad, buildRangeEdgeOutput as ae, diffDates as af, whenTransitionDone as ag, sortEventSegs as ah, getEventRangeMeta as ai, compileEventUis as aj, instanceRangesIntersect as ak, buildDateSpanApiWithContext as al, instanceRangeContainsRange as am, fabricateEventRange as an, flatArray as ao, buildEventRangeKey as ap, flatMapArray as aq, combineEventUis as ar, hasBgRendering as as, compareByFieldSpecs as at, flexibleCompare as au, parseFieldSpecs as av, refineClassNameGenerator as aw, removeExact as ax, refineEventDef as ay, parseEventDef as az, buildRangeApiWithTimeZone as b, createEventUi as c, arrayToHash as d, createFormatter as e, filterHash as f, guid as g, hashValuesToArray as h, identity as i, createEmptyEventStore as j, BASE_OPTION_REFINERS as k, CALENDAR_ONLY_OPTION_REFINERS as l, COMPLEX_OPTION_COMPARATORS as m, mapHash as n, parseDateSpan as o, parseEvents as p, triggerDateUnselect as q, refineProps as r, sliceEventStore as s, triggerDateSelect as t, EventImpl as u, eventTupleToStore as v, warn as w, EventSourceImpl as x, parseEvent as y, eventApiToStore as z };\n","import { Q as refineClassName, R as mergeMaybePropsDepth1, S as getUnequalProps } from './d7fd1889.js';\nimport { j as joinClassNames } from './d74440d5.js';\n\nconst classNamesRe = /(^c|C)lass(Name)?$/;\nconst contentRe = /Content$/;\nconst lifecycleRe = /(DidMount|WillUnmount)$/;\nconst handlerRe = /^on[A-Z]/;\n// Somewhat tracks COMPLEX_OPTION_COMPARATORS\n// Unfortunately always need 'maybe' to handle undefined inital value, because of CalendarDataManager\nconst customMergeFuncs = {\n    buttons: mergeMaybePropsDepth1,\n};\nfunction mergeViewOptionsMap(...hashes) {\n    const merged = {};\n    for (const hash of hashes) {\n        for (const viewName in hash) {\n            const viewOptions = hash[viewName];\n            if (!merged[viewName]) {\n                merged[viewName] = viewOptions;\n            }\n            else {\n                merged[viewName] = mergeCalendarOptions(merged[viewName], viewOptions);\n            }\n        }\n    }\n    return merged;\n}\n/*\nMerges an array of RAW options objects into a single object.\nThe second argument allows for an array of property names who's object values will be merged together.\n*/\nfunction mergeCalendarOptions(...optionSets) {\n    let dest = {};\n    for (const options of optionSets) {\n        for (let name in options) {\n            if (name in dest) {\n                const mergeFunc = customMergeFuncs[name] || (classNamesRe.test(name) ? joinFuncishClassNames :\n                    contentRe.test(name) ? mergeContentInjectors :\n                        lifecycleRe.test(name) ? mergeLifecycleCallbacks : undefined);\n                dest[name] = mergeFunc\n                    ? mergeFunc(dest[name], options[name], name)\n                    : options[name]; // last wins\n            }\n            else {\n                dest[name] = options[name]; // last wins\n            }\n        }\n    }\n    return dest;\n}\n/*\nCalled while merging raw option objects, before the normal option refinement pass.\nClassName values are validated here because merging may join raw strings, or build a\ncombined function that joins raw generator outputs later. Without checking each part\nbefore joinClassNames, invalid values like objects/arrays could be stringified into\nvalid-looking class strings before refineClassName/refineClassNameGenerator see them.\n\nIdeally this would be a single-pass responsibility: either merge after refinement, or\nstore unjoined class parts during raw merging and have one later refiner validate and\njoin all parts. For now, this merge helper validates just enough to avoid corrupting\ninvalid values before the formal refinement pass.\n*/\nfunction joinFuncishClassNames(input0, // added to string first\ninput1, optionName) {\n    const isFunc0 = typeof input0 === 'function';\n    const isFunc1 = typeof input1 === 'function';\n    if (isFunc0 || isFunc1) {\n        const combinedFunc = (info) => {\n            return joinClassNames(refineClassName(isFunc0 ? input0(info) : input0, optionName), refineClassName(isFunc1 ? input1(info) : input1, optionName));\n        };\n        combinedFunc.parts = [input0, input1]; // see CalendarDataManager::processRawCalendarOptions\n        return combinedFunc;\n    }\n    return joinClassNames(refineClassName(input0, optionName), refineClassName(input1, optionName));\n}\nfunction mergeContentInjectors(contentGenerator0, // fallback\ncontentGenerator1) {\n    if (typeof contentGenerator1 === 'function') {\n        // fabricate new function\n        const combinedFunc = (renderProps) => {\n            const res = contentGenerator1(renderProps);\n            if (res === true) { // `true` indicates use-fallback\n                if (typeof contentGenerator0 === 'function') {\n                    return contentGenerator0(renderProps);\n                }\n                return contentGenerator0;\n            }\n            return res;\n        };\n        combinedFunc.parts = [contentGenerator0, contentGenerator1]; // see CalendarDataManager::processRawCalendarOptions\n        return combinedFunc;\n    }\n    if (contentGenerator1 != null) {\n        return contentGenerator1;\n    }\n    return contentGenerator0;\n}\nfunction mergeLifecycleCallbacks(fn0, // called first\nfn1) {\n    if (fn0 && fn1) {\n        // fabricate new function\n        const combinedFunc = (...args) => {\n            fn0(...args);\n            fn1(...args);\n        };\n        combinedFunc.parts = [fn0, fn1]; // see CalendarDataManager::processRawCalendarOptions\n        return combinedFunc;\n    }\n    return fn0 || fn1;\n}\nfunction isNonHandlerPropsEqual(obj0, obj1) {\n    const keys = getUnequalProps(obj0, obj1);\n    for (let key of keys) {\n        if (!handlerRe.test(key)) {\n            return false;\n        }\n    }\n    return true;\n}\nfunction isMergedPropsEqual(val0, val1) {\n    const parts0 = val0 && val0.parts;\n    const parts1 = val1 && val1.parts;\n    if (parts0 && parts1) {\n        const count0 = parts0.length;\n        const count1 = parts1.length;\n        if (count0 !== count1) {\n            return false;\n        }\n        for (let i = 0; i < count0; i++) {\n            if (!(parts0[i] === parts1[i] || isMergedPropsEqual(parts0[i], parts1[i]))) {\n                return false;\n            }\n        }\n        return true;\n    }\n    return false;\n}\n\nexport { mergeViewOptionsMap as a, isNonHandlerPropsEqual as b, mergeContentInjectors as c, mergeLifecycleCallbacks as d, isMergedPropsEqual as i, joinFuncishClassNames as j, mergeCalendarOptions as m };\n","import { m as mergeCalendarOptions } from './167cc14f.js';\nimport { b as buildRangeApiWithTimeZone, a as buildEventApis, h as hashValuesToArray, r as refineProps, g as guid, c as createEventUi, E as EVENT_UI_REFINERS, d as arrayToHash, f as filterHash, w as warn, i as identity } from './d7fd1889.js';\nimport { createDuration, subtractDurations, intersectRanges, startOfDay, addDays } from '@full-ui/headless-calendar';\n\nconst globalLocales = [];\n\nconst MINIMAL_RAW_EN_LOCALE = {\n    code: 'en',\n    week: {\n        dow: 0, // Sunday is the first day of the week\n        doy: 4, // 4 days need to be within the year to be considered the first week\n    },\n    direction: 'ltr', // TODO: make a real type for this\n    todayText: 'Today',\n    prevText: 'Prev',\n    nextText: 'Next',\n    prevYearText: 'Prev year',\n    nextYearText: 'Next year',\n    yearText: 'Year',\n    monthText: 'Month',\n    weekTextLong: 'Week',\n    dayText: 'Day',\n    listText: 'List',\n    closeHint: 'Close',\n    eventsHint: 'Events',\n    allDayText: 'All-day',\n    timedText: 'Timed',\n    moreLinkText: 'more',\n    noEventsText: 'No events to display',\n};\n/*\nIncludes things we don't want other locales to inherit,\nthings that derive from other translatable strings.\n*/\nconst RAW_EN_LOCALE = {\n    ...MINIMAL_RAW_EN_LOCALE,\n    // if a locale doesn't define this, fall back to weekTextLong, don't use EN\n    weekTextShort: 'W',\n    todayHint: (unitText, unit) => {\n        return (unit === 'day')\n            ? 'Today'\n            : `This ${unitText}`;\n    },\n    prevHint: 'Previous $0',\n    nextHint: 'Next $0',\n    viewHint: '$0 view',\n    viewChangeHint: 'Change view',\n    navLinkHint: 'Go to $0',\n    moreLinkHint(eventCnt) {\n        return `Show ${eventCnt} more event${eventCnt === 1 ? '' : 's'}`;\n    },\n};\nfunction organizeRawLocales(explicitRawLocales) {\n    let defaultCode = explicitRawLocales.length > 0 ? explicitRawLocales[0].code : 'en';\n    let allRawLocales = globalLocales.concat(explicitRawLocales);\n    let rawLocaleMap = {\n        en: RAW_EN_LOCALE,\n    };\n    for (let rawLocale of allRawLocales) {\n        rawLocaleMap[rawLocale.code] = rawLocale;\n    }\n    return {\n        map: rawLocaleMap,\n        defaultCode,\n    };\n}\nfunction buildLocale(inputSingular, available) {\n    if (typeof inputSingular === 'object' && !Array.isArray(inputSingular)) {\n        return parseLocale(inputSingular.code, [inputSingular.code], inputSingular);\n    }\n    return queryLocale(inputSingular, available);\n}\nfunction queryLocale(codeArg, available) {\n    let codes = [].concat(codeArg || []); // will convert to array\n    let raw = queryRawLocale(codes, available) || RAW_EN_LOCALE;\n    return parseLocale(codeArg, codes, raw);\n}\nfunction queryRawLocale(codes, available) {\n    for (let i = 0; i < codes.length; i += 1) {\n        let parts = codes[i].toLocaleLowerCase().split('-');\n        for (let j = parts.length; j > 0; j -= 1) {\n            let simpleId = parts.slice(0, j).join('-');\n            if (available[simpleId]) {\n                return available[simpleId];\n            }\n        }\n    }\n    return null;\n}\nfunction parseLocale(codeArg, codes, raw) {\n    let merged = mergeCalendarOptions(MINIMAL_RAW_EN_LOCALE, raw);\n    delete merged.code; // don't want this part of the options\n    let { week } = merged;\n    delete merged.week;\n    return {\n        codeArg,\n        codes,\n        week,\n        simpleNumberFormat: new Intl.NumberFormat(codeArg),\n        options: merged,\n    };\n}\n\nclass JsonRequestError extends Error {\n    constructor(message, response) {\n        super(message);\n        this.response = response;\n    }\n}\nfunction requestJson(method, url, params) {\n    method = method.toUpperCase();\n    const fetchOptions = {\n        method,\n    };\n    if (method === 'GET') {\n        url += (url.indexOf('?') === -1 ? '?' : '&') +\n            new URLSearchParams(params);\n    }\n    else {\n        fetchOptions.body = new URLSearchParams(params);\n        fetchOptions.headers = {\n            'Content-Type': 'application/x-www-form-urlencoded',\n        };\n    }\n    return fetch(url, fetchOptions).then((fetchRes) => {\n        if (fetchRes.ok) {\n            return fetchRes.json().then((parsedResponse) => {\n                return [parsedResponse, fetchRes];\n            }, () => {\n                throw new JsonRequestError('Failure parsing JSON', fetchRes);\n            });\n        }\n        else {\n            throw new JsonRequestError('Request failed', fetchRes);\n        }\n    });\n}\n\nfunction handleDateProfile(dateProfile, context) {\n    context.emitter.trigger('datesSet', {\n        ...buildRangeApiWithTimeZone(dateProfile.activeRange, context.dateEnv),\n        view: context.viewApi,\n    });\n}\n\nfunction handleEventStore(eventStore, context) {\n    let { emitter } = context;\n    if (emitter.hasHandlers('eventsSet')) {\n        emitter.trigger('eventsSet', buildEventApis(eventStore, context));\n    }\n}\n\nlet eventSourceDef$2 = {\n    ignoreRange: true,\n    parseMeta(refined) {\n        if (Array.isArray(refined.events)) {\n            return refined.events;\n        }\n        return null;\n    },\n    fetch(arg, successCallback) {\n        successCallback({\n            rawEvents: arg.eventSource.meta,\n        });\n    },\n};\nconst arrayEventSourcePlugin = {\n    name: 'array-event-source',\n    eventSourceDefs: [eventSourceDef$2],\n};\n\n/*\ngiven a function that resolves a result asynchronously.\nthe function can either call passed-in success and failure callbacks,\nor it can return a promise.\nif you need to pass additional params to func, bind them first.\n*/\nfunction unpromisify(func, normalizedSuccessCallback, normalizedFailureCallback) {\n    // guard against success/failure callbacks being called more than once\n    // and guard against a promise AND callback being used together.\n    let isResolved = false;\n    let wrappedSuccess = function (res) {\n        if (!isResolved) {\n            isResolved = true;\n            normalizedSuccessCallback(res);\n        }\n    };\n    let wrappedFailure = function (error) {\n        if (!isResolved) {\n            isResolved = true;\n            normalizedFailureCallback(error);\n        }\n    };\n    let res = func(wrappedSuccess, wrappedFailure);\n    if (res && typeof res.then === 'function') {\n        res.then(wrappedSuccess, wrappedFailure);\n    }\n}\n\nlet eventSourceDef$1 = {\n    parseMeta(refined) {\n        if (typeof refined.events === 'function') {\n            return refined.events;\n        }\n        return null;\n    },\n    fetch(arg, successCallback, errorCallback) {\n        const { dateEnv } = arg.context;\n        const func = arg.eventSource.meta;\n        unpromisify(func.bind(null, buildRangeApiWithTimeZone(arg.range, dateEnv)), (rawEvents) => successCallback({ rawEvents }), errorCallback);\n    },\n};\nconst funcEventSourcePlugin = {\n    name: 'func-event-source',\n    eventSourceDefs: [eventSourceDef$1],\n};\n\nconst JSON_FEED_EVENT_SOURCE_REFINERS = {\n    method: String,\n    extraParams: identity,\n    startParam: String,\n    endParam: String,\n    timeZoneParam: String,\n};\n\nlet eventSourceDef = {\n    parseMeta(refined) {\n        if (refined.url && (refined.format === 'json' || !refined.format)) {\n            return {\n                url: refined.url,\n                format: 'json',\n                method: (refined.method || 'GET').toUpperCase(),\n                extraParams: refined.extraParams,\n                startParam: refined.startParam,\n                endParam: refined.endParam,\n                timeZoneParam: refined.timeZoneParam,\n            };\n        }\n        return null;\n    },\n    fetch(arg, successCallback, errorCallback) {\n        const { meta } = arg.eventSource;\n        const requestParams = buildRequestParams(meta, arg.range, arg.context);\n        requestJson(meta.method, meta.url, requestParams).then(([rawEvents, response]) => {\n            successCallback({ rawEvents, response });\n        }, errorCallback);\n    },\n};\nconst jsonFeedEventSourcePlugin = {\n    name: 'json-event-source',\n    eventSourceRefiners: JSON_FEED_EVENT_SOURCE_REFINERS,\n    eventSourceDefs: [eventSourceDef],\n};\nfunction buildRequestParams(meta, range, context) {\n    let { dateEnv, options } = context;\n    let startParam;\n    let endParam;\n    let timeZoneParam;\n    let customRequestParams;\n    let params = {};\n    startParam = meta.startParam;\n    if (startParam == null) {\n        startParam = options.startParam;\n    }\n    endParam = meta.endParam;\n    if (endParam == null) {\n        endParam = options.endParam;\n    }\n    timeZoneParam = meta.timeZoneParam;\n    if (timeZoneParam == null) {\n        timeZoneParam = options.timeZoneParam;\n    }\n    // retrieve any outbound GET/POST data from the options\n    if (typeof meta.extraParams === 'function') {\n        // supplied as a function that returns a key/value object\n        customRequestParams = meta.extraParams();\n    }\n    else {\n        // probably supplied as a straight key/value object\n        customRequestParams = meta.extraParams || {};\n    }\n    Object.assign(params, customRequestParams);\n    params[startParam] = dateEnv.formatIso(range.start);\n    params[endParam] = dateEnv.formatIso(range.end);\n    if (dateEnv.timeZone !== 'local') {\n        params[timeZoneParam] = dateEnv.timeZone;\n    }\n    return params;\n}\n\nconst changeHandlerPlugin = {\n    name: 'change-handler',\n    optionChangeHandlers: {\n        controller(controller, context) {\n            // TODO: the initial setting is in CalendarDataManager\n            controller._setApi(context.calendarApi);\n        },\n        events(events, context) {\n            handleEventSources([events], context);\n        },\n        eventSources: handleEventSources,\n    },\n};\n/*\nBUG: if `event` was supplied, all previously-given `eventSources` will be wiped out\n*/\nfunction handleEventSources(inputs, context) {\n    let unfoundSources = hashValuesToArray(context.getCurrentData().eventSources);\n    if (unfoundSources.length === 1 &&\n        inputs.length === 1 &&\n        Array.isArray(unfoundSources[0]._raw) &&\n        Array.isArray(inputs[0])) {\n        context.dispatch({\n            type: 'RESET_RAW_EVENTS',\n            sourceId: unfoundSources[0].sourceId,\n            rawEvents: inputs[0],\n        });\n        return;\n    }\n    let newInputs = [];\n    for (let input of inputs) {\n        let inputFound = false;\n        for (let i = 0; i < unfoundSources.length; i += 1) {\n            if (unfoundSources[i]._raw === input) {\n                unfoundSources.splice(i, 1); // delete\n                inputFound = true;\n                break;\n            }\n        }\n        if (!inputFound) {\n            newInputs.push(input);\n        }\n    }\n    for (let unfoundSource of unfoundSources) {\n        context.dispatch({\n            type: 'REMOVE_EVENT_SOURCE',\n            sourceId: unfoundSource.sourceId,\n        });\n    }\n    for (let newInput of newInputs) {\n        context.calendarApi.addEventSource(newInput);\n    }\n}\n\nconst EVENT_SOURCE_REFINERS = {\n    id: String,\n    defaultAllDay: Boolean,\n    url: String,\n    format: String,\n    events: identity, // array or function\n    eventDataTransform: identity,\n    // for any network-related sources\n    success: identity,\n    failure: identity,\n};\nfunction parseEventSource(raw, context, refiners = buildEventSourceRefiners(context)) {\n    let rawObj;\n    if (typeof raw === 'string') {\n        rawObj = { url: raw };\n    }\n    else if (typeof raw === 'function' || Array.isArray(raw)) {\n        rawObj = { events: raw };\n    }\n    else if (typeof raw === 'object' && raw) { // not null\n        rawObj = raw;\n    }\n    if (rawObj) {\n        let { refined, extra } = refineProps(rawObj, refiners);\n        let metaRes = buildEventSourceMeta(refined, context);\n        if (metaRes) {\n            return {\n                _raw: raw,\n                isFetching: false,\n                latestFetchId: '',\n                fetchRange: null,\n                defaultAllDay: refined.defaultAllDay,\n                eventDataTransform: refined.eventDataTransform,\n                success: refined.success,\n                failure: refined.failure,\n                publicId: refined.id || '',\n                sourceId: guid(),\n                sourceDefId: metaRes.sourceDefId,\n                meta: metaRes.meta,\n                ui: createEventUi(refined, context),\n                extendedProps: extra,\n            };\n        }\n    }\n    return null;\n}\nfunction buildEventSourceRefiners(context) {\n    return { ...EVENT_UI_REFINERS, ...EVENT_SOURCE_REFINERS, ...context.pluginHooks.eventSourceRefiners };\n}\nfunction buildEventSourceMeta(raw, context) {\n    let defs = context.pluginHooks.eventSourceDefs;\n    for (let i = defs.length - 1; i >= 0; i -= 1) { // later-added plugins take precedence\n        let def = defs[i];\n        let meta = def.parseMeta(raw);\n        if (meta) {\n            return { sourceDefId: i, meta };\n        }\n    }\n    return null;\n}\n\nfunction initEventSources(calendarOptions, dateProfile, context) {\n    let activeRange = dateProfile ? dateProfile.activeRange : null;\n    return addSources({}, parseInitialSources(calendarOptions, context), activeRange, context);\n}\nfunction reduceEventSources(eventSources, action, dateProfile, context) {\n    let activeRange = dateProfile ? dateProfile.activeRange : null; // need this check?\n    switch (action.type) {\n        case 'ADD_EVENT_SOURCES': // already parsed\n            return addSources(eventSources, action.sources, activeRange, context);\n        case 'REMOVE_EVENT_SOURCE':\n            return removeSource(eventSources, action.sourceId);\n        case 'PREV': // TODO: how do we track all actions that affect dateProfile :(\n        case 'NEXT':\n        case 'CHANGE_DATE':\n        case 'CHANGE_VIEW_TYPE':\n            if (dateProfile) {\n                return fetchDirtySources(eventSources, activeRange, context);\n            }\n            return eventSources;\n        case 'FETCH_EVENT_SOURCES':\n            return fetchSourcesByIds(eventSources, action.sourceIds ? // why no type?\n                arrayToHash(action.sourceIds) :\n                excludeStaticSources(eventSources, context), activeRange, action.isRefetch || false, context);\n        case 'RECEIVE_EVENTS':\n        case 'RECEIVE_EVENT_ERROR':\n            return receiveResponse(eventSources, action.sourceId, action.fetchId, action.fetchRange);\n        case 'REMOVE_ALL_EVENT_SOURCES':\n            return {};\n        default:\n            return eventSources;\n    }\n}\nfunction reduceEventSourcesNewTimeZone(eventSources, dateProfile, context) {\n    let activeRange = dateProfile ? dateProfile.activeRange : null; // need this check?\n    return fetchSourcesByIds(eventSources, excludeStaticSources(eventSources, context), activeRange, true, context);\n}\nfunction computeEventSourcesLoading(eventSources) {\n    for (let sourceId in eventSources) {\n        if (eventSources[sourceId].isFetching) {\n            return true;\n        }\n    }\n    return false;\n}\nfunction addSources(eventSourceHash, sources, fetchRange, context) {\n    let hash = {};\n    for (let source of sources) {\n        hash[source.sourceId] = source;\n    }\n    if (fetchRange) {\n        hash = fetchDirtySources(hash, fetchRange, context);\n    }\n    return { ...eventSourceHash, ...hash };\n}\nfunction removeSource(eventSourceHash, sourceId) {\n    return filterHash(eventSourceHash, (eventSource) => eventSource.sourceId !== sourceId);\n}\nfunction fetchDirtySources(sourceHash, fetchRange, context) {\n    return fetchSourcesByIds(sourceHash, filterHash(sourceHash, (eventSource) => isSourceDirty(eventSource, fetchRange, context)), fetchRange, false, context);\n}\nfunction isSourceDirty(eventSource, fetchRange, context) {\n    if (!doesSourceNeedRange(eventSource, context)) {\n        return !eventSource.latestFetchId;\n    }\n    return !context.options.lazyFetching ||\n        !eventSource.fetchRange ||\n        eventSource.isFetching || // always cancel outdated in-progress fetches\n        fetchRange.start < eventSource.fetchRange.start ||\n        fetchRange.end > eventSource.fetchRange.end;\n}\nfunction fetchSourcesByIds(prevSources, sourceIdHash, fetchRange, isRefetch, context) {\n    let nextSources = {};\n    for (let sourceId in prevSources) {\n        let source = prevSources[sourceId];\n        if (sourceIdHash[sourceId]) {\n            nextSources[sourceId] = fetchSource(source, fetchRange, isRefetch, context);\n        }\n        else {\n            nextSources[sourceId] = source;\n        }\n    }\n    return nextSources;\n}\nfunction fetchSource(eventSource, fetchRange, isRefetch, context) {\n    let { options, calendarApi } = context;\n    let sourceDef = context.pluginHooks.eventSourceDefs[eventSource.sourceDefId];\n    let fetchId = guid();\n    sourceDef.fetch({\n        eventSource,\n        range: fetchRange,\n        isRefetch,\n        context,\n    }, (res) => {\n        let { rawEvents } = res;\n        if (options.eventSourceSuccess) {\n            rawEvents = options.eventSourceSuccess.call(calendarApi, rawEvents, res.response) || rawEvents;\n        }\n        if (eventSource.success) {\n            rawEvents = eventSource.success.call(calendarApi, rawEvents, res.response) || rawEvents;\n        }\n        context.dispatch({\n            type: 'RECEIVE_EVENTS',\n            sourceId: eventSource.sourceId,\n            fetchId,\n            fetchRange,\n            rawEvents,\n        });\n    }, (error) => {\n        let errorHandled = false;\n        if (options.eventSourceFailure) {\n            options.eventSourceFailure.call(calendarApi, error);\n            errorHandled = true;\n        }\n        if (eventSource.failure) {\n            eventSource.failure(error);\n            errorHandled = true;\n        }\n        if (!errorHandled) {\n            warn(`Unhandled event source error: ${error.message}`, error);\n        }\n        context.dispatch({\n            type: 'RECEIVE_EVENT_ERROR',\n            sourceId: eventSource.sourceId,\n            fetchId,\n            fetchRange,\n            error,\n        });\n    });\n    return {\n        ...eventSource,\n        isFetching: true,\n        latestFetchId: fetchId,\n    };\n}\nfunction receiveResponse(sourceHash, sourceId, fetchId, fetchRange) {\n    let eventSource = sourceHash[sourceId];\n    if (eventSource && // not already removed\n        fetchId === eventSource.latestFetchId) {\n        return {\n            ...sourceHash,\n            [sourceId]: {\n                ...eventSource,\n                isFetching: false,\n                fetchRange, // also serves as a marker that at least one fetch has completed\n            },\n        };\n    }\n    return sourceHash;\n}\nfunction excludeStaticSources(eventSources, context) {\n    return filterHash(eventSources, (eventSource) => doesSourceNeedRange(eventSource, context));\n}\nfunction parseInitialSources(rawOptions, context) {\n    let refiners = buildEventSourceRefiners(context);\n    let rawSources = [].concat(rawOptions.eventSources || []);\n    let sources = []; // parsed\n    if (rawOptions.initialEvents) {\n        rawSources.unshift(rawOptions.initialEvents);\n    }\n    if (rawOptions.events) {\n        rawSources.unshift(rawOptions.events);\n    }\n    for (let rawSource of rawSources) {\n        let source = parseEventSource(rawSource, context, refiners);\n        if (source) {\n            sources.push(source);\n        }\n    }\n    return sources;\n}\nfunction doesSourceNeedRange(eventSource, context) {\n    let defs = context.pluginHooks.eventSourceDefs;\n    return !defs[eventSource.sourceDefId].ignoreRange;\n}\n\nconst SIMPLE_RECURRING_REFINERS = {\n    daysOfWeek: identity,\n    startTime: createDuration,\n    endTime: createDuration,\n    duration: createDuration,\n    startRecur: identity,\n    endRecur: identity,\n};\n\nlet recurring = {\n    parse(refined, dateEnv) {\n        if (refined.daysOfWeek || refined.startTime || refined.endTime || refined.startRecur || refined.endRecur) {\n            let recurringData = {\n                daysOfWeek: refined.daysOfWeek || null,\n                startTime: refined.startTime || null,\n                endTime: refined.endTime || null,\n                startRecur: refined.startRecur ? dateEnv.createMarker(refined.startRecur) : null,\n                endRecur: refined.endRecur ? dateEnv.createMarker(refined.endRecur) : null,\n                dateEnv,\n            };\n            let duration;\n            if (refined.duration) {\n                duration = refined.duration;\n            }\n            if (!duration && refined.startTime && refined.endTime) {\n                duration = subtractDurations(refined.endTime, refined.startTime);\n            }\n            return {\n                allDayGuess: Boolean(!refined.startTime && !refined.endTime),\n                duration,\n                typeData: recurringData, // doesn't need endTime anymore but oh well\n            };\n        }\n        return null;\n    },\n    expand(typeData, framingRange, dateEnv) {\n        let clippedFramingRange = intersectRanges(framingRange, { start: typeData.startRecur, end: typeData.endRecur });\n        if (clippedFramingRange) {\n            return expandRanges(typeData.daysOfWeek, typeData.startTime, typeData.dateEnv, dateEnv, clippedFramingRange);\n        }\n        return [];\n    },\n};\nconst simpleRecurringEventsPlugin = {\n    name: 'simple-recurring-event',\n    recurringTypes: [recurring],\n    eventRefiners: SIMPLE_RECURRING_REFINERS,\n};\nfunction expandRanges(daysOfWeek, startTime, eventDateEnv, calendarDateEnv, framingRange) {\n    let dowHash = daysOfWeek ? arrayToHash(daysOfWeek) : null;\n    let dayMarker = startOfDay(framingRange.start);\n    let endMarker = framingRange.end;\n    let instanceStarts = [];\n    // https://github.com/fullcalendar/fullcalendar/issues/7934\n    if (startTime) {\n        if (startTime.milliseconds < 0) {\n            // possible for next-day to have negative business hours that go into current day\n            endMarker = addDays(endMarker, 1);\n        }\n        else if (startTime.milliseconds >= 1000 * 60 * 60 * 24) {\n            // possible for prev-day to have >24hr business hours that go into current day\n            dayMarker = addDays(dayMarker, -1);\n        }\n    }\n    while (dayMarker < endMarker) {\n        let instanceStart;\n        // if everyday, or this particular day-of-week\n        if (!dowHash || dowHash[dayMarker.getUTCDay()]) {\n            if (startTime) {\n                instanceStart = calendarDateEnv.add(dayMarker, startTime);\n            }\n            else {\n                instanceStart = dayMarker;\n            }\n            instanceStarts.push(calendarDateEnv.createMarker(eventDateEnv.toDate(instanceStart)));\n        }\n        dayMarker = addDays(dayMarker, 1);\n    }\n    return instanceStarts;\n}\n\n/*\nthis array is exposed on the root namespace so that UMD plugins can add to it.\nsee the rollup-bundles script.\n*/\nconst globalPlugins = [\n    arrayEventSourcePlugin,\n    funcEventSourcePlugin,\n    jsonFeedEventSourcePlugin,\n    simpleRecurringEventsPlugin,\n    changeHandlerPlugin,\n    {\n        name: 'misc',\n        isLoadingFuncs: [\n            (state) => computeEventSourcesLoading(state.eventSources),\n        ],\n        propSetHandlers: {\n            dateProfile: handleDateProfile,\n            eventStore: handleEventStore,\n        },\n    },\n];\n\nexport { JsonRequestError as J, globalPlugins as a, buildLocale as b, computeEventSourcesLoading as c, reduceEventSourcesNewTimeZone as d, requestJson as e, globalLocales as g, initEventSources as i, organizeRawLocales as o, parseEventSource as p, reduceEventSources as r, unpromisify as u };\n","class Emitter {\n    constructor() {\n        this.handlers = {};\n        this.thisContext = null;\n    }\n    setThisContext(thisContext) {\n        this.thisContext = thisContext;\n    }\n    setOptions(options) {\n        this.options = options;\n    }\n    on(type, handler) {\n        addToHash(this.handlers, type, handler);\n    }\n    off(type, handler) {\n        removeFromHash(this.handlers, type, handler);\n    }\n    trigger(type, ...args) {\n        let attachedHandlers = this.handlers[type] || [];\n        let optionHandler = this.options && this.options[type];\n        let handlers = [].concat(optionHandler || [], attachedHandlers);\n        for (let handler of handlers) {\n            handler.apply(this.thisContext, args);\n        }\n    }\n    hasHandlers(type) {\n        return Boolean((this.handlers[type] && this.handlers[type].length) ||\n            (this.options && this.options[type]));\n    }\n}\nfunction addToHash(hash, type, handler) {\n    (hash[type] || (hash[type] = []))\n        .push(handler);\n}\nfunction removeFromHash(hash, type, handler) {\n    if (handler) {\n        if (hash[type]) {\n            hash[type] = hash[type].filter((func) => func !== handler);\n        }\n    }\n    else {\n        delete hash[type]; // remove all handler funcs for this type\n    }\n}\n\nfunction getAppendableRoot(el) {\n    const root = el.getRootNode();\n    if (root instanceof Document) {\n        return root.body || root.documentElement; // pick body if available\n    }\n    return root;\n}\nfunction computeElIsRtl(el) {\n    return getComputedStyle(el).direction === 'rtl';\n}\n// Style\n// ----------------------------------------------------------------------------------------------------------------\nconst PIXEL_PROP_RE = /(top|left|right|bottom|width|height)$/i;\nfunction applyStyle(el, props) {\n    for (let propName in props) {\n        applyStyleProp(el, propName, props[propName]);\n    }\n}\nfunction applyStyleProp(el, name, val) {\n    if (val == null) {\n        el.style[name] = '';\n    }\n    else if (typeof val === 'number' && PIXEL_PROP_RE.test(name)) {\n        el.style[name] = `${val}px`;\n    }\n    else {\n        el.style[name] = val;\n    }\n}\n// Event Handling\n// ----------------------------------------------------------------------------------------------------------------\n// if intercepting bubbled events at the document/window/body level,\n// and want to see originating element (the 'target'), use this util instead\n// of `ev.target` because it goes within web-component boundaries.\nfunction getEventTargetViaRoot(ev) {\n    return ev.composedPath?.()[0] ?? ev.target;\n}\n\nexport { Emitter as E, applyStyleProp as a, getEventTargetViaRoot as b, computeElIsRtl as c, applyStyle as d, getAppendableRoot as g };\n","import { I as isPropsEqualShallow, H as isArraysEqual, K as isPropsEqualWithMap, g as guid, e as createFormatter, A as formatWithOrdinals, L as createAriaClickAttrs, J as computeViewBorderless, u as EventImpl, M as setElEventRange, N as buildEventRangeTimeText, O as getEventTagAndAttrs, P as computeEventRangeDraggable } from './d7fd1889.js';\nimport { createContext, Component, createElement, flushSync, isValidElement } from 'preact/compat';\nimport { b as isNonHandlerPropsEqual } from './167cc14f.js';\nimport { j as joinClassNames } from './d74440d5.js';\nimport { createDuration, startOfDay, addDays, rangeContainsMarker, joinDateTimeFormatParts } from '@full-ui/headless-calendar';\nimport { c as classNames } from './0b389a37.js';\nimport { jsx, jsxs, Fragment } from 'preact/jsx-runtime';\nimport { c as computeElIsRtl, E as Emitter } from './18d26d90.js';\n\nfunction memoize(workerFunc, resEquality, teardownFunc) {\n    let currentArgs;\n    let currentRes;\n    return function (...newArgs) {\n        if (!currentArgs) {\n            currentRes = workerFunc.apply(this, newArgs);\n        }\n        else if (!isArraysEqual(currentArgs, newArgs)) {\n            if (teardownFunc) {\n                teardownFunc(currentRes);\n            }\n            let res = workerFunc.apply(this, newArgs);\n            if (!resEquality || !resEquality(res, currentRes)) {\n                currentRes = res;\n            }\n        }\n        currentArgs = newArgs;\n        return currentRes;\n    };\n}\nfunction memoizeObjArg(workerFunc, resEquality, teardownFunc) {\n    let currentArg;\n    let currentRes;\n    return (newArg) => {\n        if (!currentArg) {\n            currentRes = workerFunc.call(this, newArg);\n        }\n        else if (!isPropsEqualShallow(currentArg, newArg)) {\n            if (teardownFunc) {\n                teardownFunc(currentRes);\n            }\n            let res = workerFunc.call(this, newArg);\n            if (!resEquality || !resEquality(res, currentRes)) {\n                currentRes = res;\n            }\n        }\n        currentArg = newArg;\n        return currentRes;\n    };\n}\n\nconst ViewContextType = createContext({}); // for Components\nfunction buildViewContext(viewSpec, viewApi, viewOptions, dateProfileGenerator, dateEnv, nowManager, pluginHooks, dispatch, getCurrentData, emitter, calendarApi, baseId, registerInteractiveComponent, unregisterInteractiveComponent) {\n    return {\n        dateEnv,\n        nowManager,\n        options: viewOptions,\n        pluginHooks,\n        emitter,\n        dispatch,\n        getCurrentData,\n        calendarApi,\n        viewSpec,\n        viewApi,\n        dateProfileGenerator,\n        baseId,\n        registerInteractiveComponent,\n        unregisterInteractiveComponent,\n    };\n}\n\n/* eslint max-classes-per-file: off */\nclass PureComponent extends Component {\n    // debug: boolean\n    shouldComponentUpdate(nextProps, nextState) {\n        return !isPropsEqualWithMap(this.props, nextProps, this.propEquality /*, this.debug && 'props' */) ||\n            !isPropsEqualWithMap(this.state, nextState, this.stateEquality /*, this.debug && 'state' */);\n    }\n}\nPureComponent.addPropsEquality = addPropsEquality;\nPureComponent.addStateEquality = addStateEquality;\nPureComponent.contextType = ViewContextType;\nPureComponent.prototype.propEquality = {};\nPureComponent.prototype.stateEquality = {};\nclass BaseComponent extends PureComponent {\n}\nBaseComponent.contextType = ViewContextType;\nfunction addPropsEquality(propEquality) {\n    let hash = Object.create(this.prototype.propEquality);\n    Object.assign(hash, propEquality);\n    this.prototype.propEquality = hash;\n}\nfunction addStateEquality(stateEquality) {\n    let hash = Object.create(this.prototype.stateEquality);\n    Object.assign(hash, stateEquality);\n    this.prototype.stateEquality = hash;\n}\n// use other one\nfunction setRef(ref, current) {\n    if (typeof ref === 'function') {\n        ref(current);\n    }\n    else if (ref) {\n        // see https://github.com/facebook/react/issues/13029\n        ref.current = current;\n    }\n}\n\nclass ContentInjector extends BaseComponent {\n    constructor() {\n        super(...arguments);\n        this.id = guid();\n        this.queuedDomNodes = [];\n        this.currentDomNodes = [];\n        this.handleEl = (el) => {\n            this.el = el;\n            if (this.props.elRef) {\n                setRef(this.props.elRef, el);\n            }\n        };\n    }\n    render() {\n        const { props, context } = this;\n        const { options } = context;\n        const { customGenerator, defaultGenerator, renderProps } = props;\n        const attrs = buildElAttrs(props, '', this.handleEl);\n        let useDefault = false;\n        let innerContent;\n        let queuedDomNodes = [];\n        let currentGeneratorMeta;\n        if (customGenerator != null) {\n            const customGeneratorRes = typeof customGenerator === 'function' ?\n                customGenerator(renderProps) :\n                customGenerator;\n            if (customGeneratorRes === true) {\n                useDefault = true;\n                // NOTE: see how mergeContentInjectors also uses `true` to signal useDefault\n            }\n            else {\n                const isObject = customGeneratorRes && typeof customGeneratorRes === 'object'; // non-null\n                if (isObject && ('html' in customGeneratorRes)) {\n                    attrs.dangerouslySetInnerHTML = { __html: customGeneratorRes.html };\n                }\n                else if (isObject && ('domNodes' in customGeneratorRes)) {\n                    queuedDomNodes = Array.prototype.slice.call(customGeneratorRes.domNodes);\n                }\n                else if (isObject\n                    ? isValidElement(customGeneratorRes) // vdom node\n                    : typeof customGeneratorRes !== 'function' // primitive value (like string or number)\n                ) {\n                    // use in vdom\n                    innerContent = customGeneratorRes;\n                }\n                else {\n                    // an exotic object for handleCustomRendering\n                    currentGeneratorMeta = customGeneratorRes;\n                }\n            }\n        }\n        else {\n            useDefault = !hasCustomRenderingHandler(props.generatorName, options);\n        }\n        if (useDefault && defaultGenerator) {\n            innerContent = defaultGenerator(renderProps);\n        }\n        this.queuedDomNodes = queuedDomNodes;\n        this.currentGeneratorMeta = currentGeneratorMeta;\n        return createElement(props.tag, attrs, innerContent);\n    }\n    componentDidMount() {\n        this.applyQueueudDomNodes();\n        this.triggerCustomRendering(true);\n    }\n    componentDidUpdate() {\n        this.applyQueueudDomNodes();\n        this.triggerCustomRendering(true);\n    }\n    componentWillUnmount() {\n        this.triggerCustomRendering(false); // TODO: different API for removal?\n    }\n    triggerCustomRendering(isActive) {\n        const { props, context } = this;\n        const { handleCustomRendering, customRenderingMetaMap } = context.options;\n        if (handleCustomRendering) {\n            const generatorMeta = this.currentGeneratorMeta ??\n                customRenderingMetaMap?.[props.generatorName];\n            if (generatorMeta) {\n                handleCustomRendering({\n                    id: this.id,\n                    isActive,\n                    containerEl: this.el,\n                    generatorMeta,\n                    renderProps: props.renderProps,\n                });\n            }\n        }\n    }\n    applyQueueudDomNodes() {\n        const { queuedDomNodes, currentDomNodes } = this;\n        const { el } = this;\n        if (!isArraysEqual(queuedDomNodes, currentDomNodes)) {\n            for (const domNode of currentDomNodes) {\n                domNode.remove();\n            }\n            for (let newNode of queuedDomNodes) {\n                el.appendChild(newNode);\n            }\n            this.currentDomNodes = queuedDomNodes;\n        }\n    }\n}\nContentInjector.addPropsEquality({\n    renderProps: isPropsEqualShallow,\n    attrs: isNonHandlerPropsEqual,\n    style: isPropsEqualShallow,\n});\n// Util\n/*\nDoes UI-framework provide custom way of rendering that does not use Preact VDOM\nAND does the calendar's options define custom rendering?\nAKA. Should we NOT render the default content?\n*/\nfunction hasCustomRenderingHandler(generatorName, options) {\n    return Boolean(options.handleCustomRendering &&\n        generatorName &&\n        options.customRenderingMetaMap?.[generatorName]);\n}\nfunction buildElAttrs(props, className, elRef) {\n    const attrs = { ...props.attrs, ref: elRef };\n    if (props.className || className) {\n        attrs.className = joinClassNames(className, props.className, attrs.className);\n    }\n    if (props.style) {\n        attrs.style = props.style;\n    }\n    return attrs;\n}\n\nconst RenderId = createContext(0);\n\nclass ContentContainer extends Component {\n    constructor() {\n        super(...arguments);\n        this.InnerContent = InnerContentInjector.bind(undefined, this);\n        this.handleEl = (el) => {\n            this.el = el;\n            if (this.props.elRef) {\n                setRef(this.props.elRef, el);\n                if (el && this.didMountMisfire) {\n                    this.componentDidMount();\n                }\n            }\n        };\n    }\n    render() {\n        const { props } = this;\n        const generatedClassName = generateClassName(props.classNameGenerator, props.renderProps);\n        if (props.children) {\n            const attrs = buildElAttrs(props, generatedClassName, this.handleEl);\n            const children = props.children(this.InnerContent, props.renderProps, attrs);\n            if (props.tag) {\n                return createElement(props.tag, attrs, children);\n            }\n            else {\n                return children;\n            }\n        }\n        else {\n            return createElement((ContentInjector), {\n                ...props,\n                elRef: this.handleEl,\n                tag: props.tag || 'div',\n                className: joinClassNames(props.className, generatedClassName),\n                renderId: this.context,\n            });\n        }\n    }\n    componentDidMount() {\n        if (this.el) {\n            this.props.didMount?.({\n                ...this.props.renderProps,\n                el: this.el,\n            });\n        }\n        else {\n            this.didMountMisfire = true;\n        }\n    }\n    componentWillUnmount() {\n        this.props.willUnmount?.({\n            ...this.props.renderProps,\n            el: this.el,\n        });\n    }\n}\nContentContainer.contextType = RenderId;\nfunction InnerContentInjector(containerComponent, props) {\n    const parentProps = containerComponent.props;\n    return createElement((ContentInjector), {\n        renderProps: parentProps.renderProps,\n        generatorName: parentProps.generatorName,\n        customGenerator: parentProps.customGenerator,\n        defaultGenerator: parentProps.defaultGenerator,\n        renderId: containerComponent.context,\n        ...props,\n    });\n}\n// Utils\nfunction generateClassName(classNameGenerator, renderProps) {\n    return (typeof classNameGenerator === 'function' ?\n        classNameGenerator(renderProps) :\n        classNameGenerator) || ''; // handles undefined\n}\nfunction renderText(renderProps) {\n    return renderProps.text;\n}\n\nfunction getIsHeightAuto(options) {\n    return options.height === 'auto' || options.contentHeight === 'auto';\n}\nfunction getTableHeaderSticky(options) {\n    let { tableHeaderSticky } = options;\n    if (tableHeaderSticky == null || tableHeaderSticky === 'auto') {\n        tableHeaderSticky = getIsHeightAuto(options);\n    }\n    return tableHeaderSticky;\n}\nfunction getFooterScrollbarSticky(options) {\n    const isHeightAuto = getIsHeightAuto(options);\n    let { footerScrollbarSticky } = options;\n    if (footerScrollbarSticky == null || footerScrollbarSticky === 'auto') {\n        footerScrollbarSticky = isHeightAuto;\n    }\n    return Boolean(footerScrollbarSticky) && isHeightAuto;\n}\nfunction getScrollerSyncerClass(pluginHooks) {\n    const ScrollerSyncer = pluginHooks.scrollerSyncerClass;\n    if (!ScrollerSyncer) {\n        throw new RangeError('Must import @fullcalendar/scrollgrid');\n    }\n    return ScrollerSyncer;\n}\n\nclass NowTimerRunner {\n    constructor(handleChange) {\n        this.handleChange = handleChange;\n        this.isMounted = false;\n        this.handleRefresh = () => {\n            let timing = this.computeTiming();\n            if (timing.nowDate.valueOf() !== this.nowDate.valueOf() ||\n                timing.nowMs !== this.nowMs // marker alone can't detect fold-hour changes\n            ) {\n                this.nowDate = timing.nowDate;\n                this.nowMs = timing.nowMs;\n                this.todayRange = timing.todayRange;\n                this.handleChange();\n            }\n            this.clearTimeout();\n            this.setTimeout(timing.waitMs);\n        };\n        this.handleVisibilityChange = () => {\n            if (!document.hidden) {\n                this.handleRefresh();\n            }\n        };\n    }\n    update(input) {\n        if (!this.isMounted) {\n            this.isMounted = true;\n            // init inputs\n            this.unit = input.unit;\n            this.unitValue = input.unitValue;\n            this.nowIndicatorSnap = input.nowIndicatorSnap;\n            this.nowManager = input.nowManager;\n            this.dateEnv = input.dateEnv;\n            // init outputs\n            const timing = this.computeTiming();\n            this.nowDate = timing.nowDate;\n            this.nowMs = timing.nowMs;\n            this.todayRange = timing.todayRange;\n            // init listeners\n            this.setTimeout(timing.waitMs);\n            this.nowManager.addResetListener(this.handleRefresh);\n            // fired tab becomes visible after being hidden\n            // SSR check. CalendarDataManager calls top-level sync :(\n            if (typeof document !== 'undefined') {\n                document.addEventListener('visibilitychange', this.handleVisibilityChange);\n            }\n        }\n        else if (input.unit !== this.unit ||\n            input.unitValue !== this.unitValue ||\n            input.nowIndicatorSnap !== this.nowIndicatorSnap ||\n            input.nowManager !== this.nowManager ||\n            input.dateEnv !== this.dateEnv) {\n            // update inputs\n            this.unit = input.unit;\n            this.unitValue = input.unitValue;\n            this.nowIndicatorSnap = input.nowIndicatorSnap;\n            this.nowManager = input.nowManager;\n            this.dateEnv = input.dateEnv;\n            // recompute outputs — a dateEnv (timezone) change re-projects the same exact \"now\"\n            // to a different civil time. (the nowManager reset listener can't do this: it fires\n            // before this runner receives the new dateEnv, so it recomputes with the old one)\n            const timing = this.computeTiming();\n            this.nowDate = timing.nowDate;\n            this.nowMs = timing.nowMs;\n            this.todayRange = timing.todayRange;\n            this.clearTimeout();\n            this.setTimeout(timing.waitMs);\n        }\n        return {\n            nowDate: this.nowDate,\n            nowMs: this.nowMs,\n            todayRange: this.todayRange,\n        };\n    }\n    destroy() {\n        if (this.isMounted) {\n            this.isMounted = false;\n            this.clearTimeout();\n            this.nowManager.removeResetListener(this.handleRefresh);\n            // SSR check. CalendarDataManager calls top-level sync :(\n            if (typeof document !== 'undefined') {\n                document.removeEventListener('visibilitychange', this.handleVisibilityChange);\n            }\n        }\n    }\n    computeTiming() {\n        let { unit, unitValue, nowIndicatorSnap, dateEnv } = this;\n        let unroundedNowMs = this.nowManager.getEpochMs();\n        let unroundedNow = dateEnv.timestampToMarker(unroundedNowMs);\n        if (nowIndicatorSnap === 'auto') {\n            nowIndicatorSnap =\n                // large unit?\n                /year|month|week|day/.test(unit) ||\n                    // if slotDuration 30 mins for example, would NOT appear to snap (legacy behavior)\n                    (unitValue || 1) === 1;\n        }\n        let nowDate;\n        let nowMs;\n        let waitMs;\n        if (nowIndicatorSnap) {\n            nowDate = dateEnv.startOf(unroundedNow, unit); // aka currentUnitStart\n            nowMs = resolveSnappedInstant(nowDate, unroundedNowMs, dateEnv);\n            let nextUnitStart = dateEnv.add(nowDate, createDuration(1, unit));\n            waitMs = resolveNextSnappedInstant(nextUnitStart, unroundedNowMs, dateEnv) - unroundedNowMs;\n        }\n        else {\n            nowDate = unroundedNow;\n            nowMs = unroundedNowMs;\n            waitMs = 1000 * 60; // 1 minute\n        }\n        // there is a max setTimeout ms value (https://stackoverflow.com/a/3468650/96342)\n        // ensure no longer than a day\n        waitMs = Math.min(1000 * 60 * 60 * 24, waitMs);\n        return {\n            nowDate,\n            nowMs,\n            todayRange: buildDayRange(nowDate),\n            waitMs,\n        };\n    }\n    setTimeout(waitMs = this.computeTiming().waitMs) {\n        // NOTE: timeout could take longer than expected if tab sleeps,\n        // which is why we listen to 'visibilitychange'\n        this.timeoutId = setTimeout(() => {\n            // NOTE: timeout could also return *earlier* than expected, and we need to wait like 2 ms more\n            // This is why use use same waitMs from computeTiming\n            const timing = this.computeTiming();\n            this.nowDate = timing.nowDate;\n            this.nowMs = timing.nowMs;\n            this.todayRange = timing.todayRange;\n            this.handleChange();\n            this.setTimeout(timing.waitMs);\n        }, waitMs);\n    }\n    clearTimeout() {\n        if (this.timeoutId) {\n            clearTimeout(this.timeoutId);\n        }\n    }\n}\n/*\nThe instant of `snappedMarker` (a civil rounding of the time at `rawMs`), choosing the\noccurrence on the same side of any DST transition as `rawMs` — during a fall-back fold, a\nsnapped civil time exists twice. Falls back to deterministic first-occurrence resolution\nwhen the same-offset guess doesn't round-trip (e.g. snapping crossed the transition).\n*/\nfunction resolveSnappedInstant(snappedMarker, rawMs, dateEnv) {\n    const offsetMs = dateEnv.timestampToMarker(rawMs).valueOf() - rawMs;\n    const candidateMs = snappedMarker.valueOf() - offsetMs;\n    if (dateEnv.timestampToMarker(candidateMs).valueOf() === snappedMarker.valueOf()) {\n        return candidateMs;\n    }\n    return dateEnv.toDate(snappedMarker).valueOf();\n}\n/*\nThe instant of the next change to the snapped display: the next civil unit boundary, or any\nDST transition before it — at a fall-back transition the clock jumps backward onto an earlier\nunit start (no civil boundary is crossed), and waking there recomputes with fresh offsets, so\nboundaries beyond a transition never need resolving here. Scenarios (NY fall-back, hour unit):\nfirst fold pass (05:30Z): guess for 02:00 fails round-trip → falls back to 07:00Z; transition\n06:00Z wins. Second pass (06:30Z): guess 07:00Z round-trips; no transition ahead. Spring\nforward: the nonexistent next unit normalizes past the gap; the transition candidate fires at\nthe jump itself.\n*/\nfunction resolveNextSnappedInstant(nextUnitStart, rawMs, dateEnv) {\n    const nextSnappedMs = resolveSnappedInstant(nextUnitStart, rawMs, dateEnv);\n    const transitionMs = findNextOffsetTransitionMs(rawMs, dateEnv, Math.min(nextSnappedMs - rawMs, 48 * 60 * 60 * 1000));\n    return transitionMs != null ? Math.min(nextSnappedMs, transitionMs) : nextSnappedMs;\n}\n// Finds the first instant whose UTC offset differs from rawMs within a short search horizon.\nfunction findNextOffsetTransitionMs(rawMs, dateEnv, horizonMs) {\n    if (horizonMs <= 0) {\n        return undefined;\n    }\n    const startOffsetMs = offsetAt(rawMs, dateEnv);\n    let lowerMs = rawMs;\n    let upperMs = rawMs + horizonMs;\n    if (offsetAt(upperMs, dateEnv) === startOffsetMs) {\n        return undefined;\n    }\n    while (upperMs - lowerMs > 1) {\n        const middleMs = Math.floor((lowerMs + upperMs) / 2);\n        if (offsetAt(middleMs, dateEnv) === startOffsetMs) {\n            lowerMs = middleMs;\n        }\n        else {\n            upperMs = middleMs;\n        }\n    }\n    return upperMs > rawMs ? upperMs : undefined;\n}\nfunction offsetAt(instantMs, dateEnv) {\n    return dateEnv.timestampToMarker(instantMs).valueOf() - instantMs;\n}\nfunction buildDayRange(date) {\n    let start = startOfDay(date);\n    let end = addDays(start, 1);\n    return { start, end };\n}\n\nfunction isDimsEqual(v0, v1) {\n    return v0 != null && (v0 === v1 || Math.abs(v0 - v1) < 0.01);\n}\n\nconst nativeBorderBoxEnabled = true;\nconst configMap = new Map();\nconst afterSizeCallbacks = new Set();\nlet isHandling = false;\nlet isStalling = false;\nlet isAcquiringImmediately = false;\nfunction afterSize(callback) {\n    afterSizeCallbacks.add(callback);\n    // batch & then flush when not within ResizeObserver handler loop\n    // happens for watchers that die and report `null` as dimension\n    if (!isHandling && !isStalling) {\n        isStalling = true;\n        requestAnimationFrame(() => {\n            isStalling = false;\n            flushAfterSize();\n        });\n    }\n}\nfunction flushAfterSize() {\n    for (const flushedCallback of afterSizeCallbacks.values()) {\n        afterSizeCallbacks.delete(flushedCallback);\n        flushedCallback();\n    }\n}\n/*\nCommits synchronously while switching every watcher registered during the\ncommit to immediate acquisition: registration reads getBoundingClientRect()\non the spot and fires the callback before returning, instead of waiting for\nthe shared ResizeObserver's later delivery. This is the \"measure now\" path\nrequired when print-only DOM mounts during the native beforeprint task —\nobserver delivery would arrive after the browser has already snapshotted.\n(gBCR reflects transforms while the observer's border-box does not; for\nprint DOM that distinction is acceptable. Once components go functional, a\n`useElementSize`-style hook performs this same acquire-then-observe.)\n\nThe afterSize work those callbacks (and any watcher deaths) queue\naccumulates and drains ONCE after the commit, not once per registration —\nso a commit mounting N measured wrappers costs one layout recomputation,\nnot N. The drain runs in its own flushSync so handler state updates still\nsettle within the calling task; additions made while draining are picked up\nby the same loop. Preact flushes mount lifecycles after the root diff, so\nthe reads don't interleave with the commit's DOM writes.\n\nAdopt this bracket a la carte, only for commits whose entire mounted-watcher\npopulation tolerates a synchronous first report (currently: entering print\nmode). Ordinary watchSize callers everywhere else keep their async-first\nResizeObserver semantics.\n*/\nfunction flushSyncWithSizeBatching(callback) {\n    const wasHandling = isHandling;\n    isHandling = true;\n    isAcquiringImmediately = true;\n    try {\n        flushSync(callback);\n        if (!wasHandling) {\n            flushSync(() => {\n                flushAfterSize();\n                isHandling = false; // before drain's own commit, so late afterSize calls schedule a flush\n            });\n        }\n    }\n    finally {\n        isHandling = wasHandling;\n        isAcquiringImmediately = false;\n    }\n}\n// Native\n// -------------------------------------------------------------------------------------------------\n// Single global ResizeObserver does batching and uses less memory than individuals\n// Will always fire with delay after DOM mutation, but before repaint,\n// thus doesn't need !isHandling check like checkConfigMap\nconst globalResizeObserver = typeof ResizeObserver !== 'undefined' && new ResizeObserver((entries) => {\n    isHandling = true;\n    // // debug\n    // console.log('RESIZE-OBSERVER', entries.map((entry) => entry.target))\n    for (let entry of entries) {\n        const el = entry.target;\n        const config = configMap.get(el);\n        let width;\n        let height;\n        if (entry.borderBoxSize && nativeBorderBoxEnabled) {\n            const borderBoxSize = entry.borderBoxSize[0] || entry.borderBoxSize; // HACK for Firefox\n            width = borderBoxSize.inlineSize;\n            height = borderBoxSize.blockSize;\n        }\n        else {\n            ({ width, height } = el.getBoundingClientRect());\n        }\n        let shouldFire = false;\n        if (!isDimsEqual(config.width, width)) {\n            config.width = width;\n            shouldFire = config.watchWidth;\n        }\n        if (!isDimsEqual(config.height, height)) {\n            config.height = height;\n            shouldFire || (shouldFire = config.watchHeight);\n        }\n        if (shouldFire) {\n            config.callback(width, height);\n        }\n    }\n    flushSync(() => {\n        flushAfterSize();\n        isHandling = false;\n    });\n});\n/*\nPRECONDITION: element can only have one listener attached\n*/\nfunction watchSize(el, callback, watchWidth = true, watchHeight = true) {\n    const config = { callback, watchWidth, watchHeight };\n    configMap.set(el, config);\n    // within a flushSyncWithSizeBatching commit; see its comment.\n    // the stored dims dedupe the observer's later initial delivery.\n    if (isAcquiringImmediately) {\n        const { width, height } = el.getBoundingClientRect();\n        config.width = width;\n        config.height = height;\n        callback(width, height);\n    }\n    // if statement is for jsdom and other shim environments that execute component effects, but\n    // haven't implemented ResizeObserver. Reference: https://github.com/jsdom/jsdom/issues/3368\n    if (globalResizeObserver) {\n        globalResizeObserver.observe(el, {\n            box: 'border-box'\n                 // default is 'content-box'\n        });\n    }\n    return () => {\n        configMap.delete(el);\n        // same reasoning as above\n        if (globalResizeObserver) {\n            globalResizeObserver.unobserve(el);\n        }\n    };\n}\nfunction watchWidth(el, callback) {\n    return watchSize(el, callback, \n    /* watchWidth = */ true);\n}\nfunction watchHeight(el, callback) {\n    return watchSize(el, (_width, height) => callback(height), \n    /* watchWidth = */ false, \n    /* watchHeight = */ true);\n}\n\nclass NowTimer extends Component {\n    constructor(props, context) {\n        super(props, context);\n        this.handleChange = () => {\n            this.forceUpdate();\n        };\n        this.runner = new NowTimerRunner(this.handleChange);\n    }\n    render() {\n        const { props, context } = this;\n        const { nowDate, nowMs, todayRange } = this.runner.update({\n            nowManager: context.nowManager,\n            unit: props.unit,\n            unitValue: props.unitValue,\n            nowIndicatorSnap: context.options.nowIndicatorSnap,\n            dateEnv: context.dateEnv,\n        });\n        return props.children(nowDate, todayRange, nowMs);\n    }\n    componentWillUnmount() {\n        this.runner.destroy();\n    }\n}\nNowTimer.contextType = ViewContextType;\n\nconst FULL_DATE_FORMAT = createFormatter({ year: 'numeric', month: 'long', day: 'numeric' });\nconst WEEK_FORMAT = createFormatter({ week: 'long' });\nconst WEEKDAY_ONLY_FORMAT = createFormatter({\n    weekday: 'long',\n});\nfunction findWeekdayText(parts) {\n    for (const part of parts) {\n        if (part.type === 'weekday') {\n            return part.value;\n        }\n    }\n    return '';\n}\nfunction findDayNumberText(parts) {\n    for (const part of parts) {\n        if (part.type === 'day') {\n            return part.value;\n        }\n    }\n    return '';\n}\nfunction findMonthText(parts) {\n    for (const part of parts) {\n        if (part.type === 'month') {\n            return part.value;\n        }\n    }\n    return '';\n}\n\n/*\nTODO: just have this return the string?\n*/\nfunction buildDateStr(context, dateMarker, viewType = 'day') {\n    return joinDateTimeFormatParts(context.dateEnv.formatToParts(dateMarker, viewType === 'week' ? WEEK_FORMAT : FULL_DATE_FORMAT));\n}\n/*\nAssumes navLinks enabled\nAlways hidden to screen readers. Do not point aria-labelledby at this. Use aria-label instead.\n*/\nfunction buildNavLinkAttrs(context, dateMarker, viewType = 'day', dateStr = buildDateStr(context, dateMarker, viewType), isTabbable = true, \n// for column headers: the label becomes the column's name, read for every cell in the column, and\n// screen readers already say \"link\". so it's just the date, without navLinkHint (\"Go to $0\")\nomitHint = false) {\n    const { dateEnv, options, calendarApi } = context;\n    const zonedDate = dateEnv.toDate(dateMarker);\n    const handleInteraction = (ev) => {\n        let customAction = viewType === 'day' ? options.navLinkDayClick :\n            viewType === 'week' ? options.navLinkWeekClick : null;\n        if (typeof customAction === 'function') {\n            customAction.call(calendarApi, dateEnv.toDate(dateMarker), ev);\n        }\n        else {\n            if (typeof customAction === 'string') {\n                viewType = customAction;\n            }\n            calendarApi.zoomTo(dateMarker, viewType);\n        }\n    };\n    return {\n        'role': 'link', // TODO\n        'aria-label': omitHint ? dateStr : formatWithOrdinals(options.navLinkHint, [dateStr, zonedDate], dateStr),\n        'className': joinClassNames(options.navLinkClass, classNames.cursorPointer, classNames.internalNavLink),\n        ...(isTabbable\n            ? createAriaClickAttrs(handleInteraction)\n            : { onClick: handleInteraction }),\n    };\n}\n\nfunction getDateMeta(dateMarker, dateEnv, dateProfile, todayRange, nowDate) {\n    const isDisabled = Boolean(dateProfile && (!dateProfile.activeRange || !rangeContainsMarker(dateProfile.activeRange, dateMarker)));\n    return {\n        date: dateEnv.toDate(dateMarker),\n        dow: dateMarker.getUTCDay(),\n        isDisabled,\n        isOther: !isDisabled && Boolean(dateProfile && !rangeContainsMarker(dateProfile.currentRange, dateMarker)),\n        isToday: !isDisabled && Boolean(todayRange && rangeContainsMarker(todayRange, dateMarker)),\n        isPast: !isDisabled && Boolean(nowDate ? (dateMarker < nowDate) : todayRange ? (dateMarker < todayRange.start) : false),\n        isFuture: !isDisabled && Boolean(nowDate ? (dateMarker > nowDate) : todayRange ? (dateMarker >= todayRange.end) : false),\n    };\n}\n\nclass ViewContainer extends BaseComponent {\n    constructor() {\n        super(...arguments);\n        this.refineRenderProps = memoizeObjArg(refineRenderProps);\n    }\n    render() {\n        const { props, context } = this;\n        const { options, viewSpec } = context;\n        const renderProps = this.refineRenderProps({\n            ...computeViewBorderless(options),\n            options: { headerToolbar: options.headerToolbar, footerToolbar: options.footerToolbar },\n            isHeightAuto: getIsHeightAuto(options),\n            viewApi: context.viewApi,\n        });\n        return (jsx(ContentContainer, { elRef: props.elRef, tag: props.tag || 'div', attrs: props.attrs, style: props.style, className: joinClassNames(props.className, generateClassName(options.viewClass, renderProps), \n            // WORKAROUND for way calendar's className would get merged into view's className\n            generateClassName(viewSpec.optionDefaults.class, renderProps), generateClassName(viewSpec.optionDefaults.className, renderProps), generateClassName(viewSpec.optionOverrides.class, renderProps), generateClassName(viewSpec.optionOverrides.className, renderProps)), renderProps: renderProps, generatorName: undefined, didMount: options.didMount || options.viewDidMount, willUnmount: options.willUnmount || options.viewWillUnmount, children: () => props.children }));\n    }\n}\nfunction refineRenderProps(raw) {\n    return {\n        view: raw.viewApi,\n        borderlessX: raw.borderlessX,\n        borderlessTop: raw.borderlessTop,\n        borderlessBottom: raw.borderlessBottom,\n        options: raw.options,\n        isHeightAuto: raw.isHeightAuto,\n    };\n}\n\n/*\nan INTERACTABLE date component\n\nPURPOSES:\n- hook up to fg, fill, and mirror renderers\n- interface for dragging and hits\n*/\nclass DateComponent extends BaseComponent {\n    constructor() {\n        super(...arguments);\n        this.uid = guid();\n    }\n    // Hit System\n    // -----------------------------------------------------------------------------------------------------------------\n    prepareHits() {\n    }\n    queryHit(isRtl, positionLeft, positionTop, elWidth, elHeight) {\n        return null; // this should be abstract\n    }\n    // Pointer Interaction Utils\n    // -----------------------------------------------------------------------------------------------------------------\n    isValidSegDownEl(el) {\n        return !this.props.eventDrag && // HACK\n            !this.props.eventResize && // HACK\n            !el.closest(`.${classNames.internalEventMirror}`);\n    }\n    isValidDateDownEl(el) {\n        return !el.closest(`.${classNames.internalEvent}:not(.${classNames.internalBgEvent})`) &&\n            !el.closest(`.${classNames.internalMoreLink}`) &&\n            !el.closest(`.${classNames.internalNavLink}`) &&\n            !el.closest(`.${classNames.internalPopover}`); // hack\n    }\n}\n\nclass DelayedRunner {\n    constructor(drainedOption) {\n        this.drainedOption = drainedOption;\n        this.isRunning = false;\n        this.isDirty = false;\n        this.pauseDepths = {};\n        this.timeoutId = 0;\n    }\n    request(delay) {\n        this.isDirty = true;\n        if (!this.isPaused()) {\n            this.clearTimeout();\n            if (delay == null) {\n                this.tryDrain();\n            }\n            else {\n                this.timeoutId = setTimeout(// NOT OPTIMAL! TODO: look at debounce\n                this.tryDrain.bind(this), delay);\n            }\n        }\n    }\n    pause(scope = '') {\n        let { pauseDepths } = this;\n        pauseDepths[scope] = (pauseDepths[scope] || 0) + 1;\n        this.clearTimeout();\n    }\n    resume(scope = '', force) {\n        let { pauseDepths } = this;\n        if (scope in pauseDepths) {\n            if (force) {\n                delete pauseDepths[scope];\n            }\n            else {\n                pauseDepths[scope] -= 1;\n                let depth = pauseDepths[scope];\n                if (depth <= 0) {\n                    delete pauseDepths[scope];\n                }\n            }\n            this.tryDrain();\n        }\n    }\n    isPaused() {\n        return Object.keys(this.pauseDepths).length;\n    }\n    tryDrain() {\n        if (!this.isRunning && !this.isPaused()) {\n            this.isRunning = true;\n            while (this.isDirty) {\n                this.isDirty = false;\n                this.drained(); // might set isDirty to true again\n            }\n            this.isRunning = false;\n        }\n    }\n    clear() {\n        this.clearTimeout();\n        this.isDirty = false;\n        this.pauseDepths = {};\n    }\n    clearTimeout() {\n        if (this.timeoutId) {\n            clearTimeout(this.timeoutId);\n            this.timeoutId = 0;\n        }\n    }\n    drained() {\n        if (this.drainedOption) {\n            this.drainedOption();\n        }\n    }\n}\n\n/*\nNOTE: detection is complicated (w/ touch and wheel) because ScrollerSyncer needs to know about it,\nbut are we sure we can't just ignore programmatic scrollTo() calls with a flag? and determine the\nthe scroll-master simply by who was the newest scroller? Does passive:true do things asynchronously?\n*/\nclass ScrollListener {\n    constructor(el) {\n        this.el = el;\n        this.emitter = new Emitter();\n        this.isScroll = false;\n        this.isScrollRecent = false;\n        this.isWheelRecent = false;\n        this.isMouseDown = false; // user currently has mouse down?\n        this.isTouchDown = false; // user currently has finger down?\n        // accumulated during scroll\n        this.isMouse = false;\n        this.isTouch = false;\n        this.isWheel = false;\n        // Handlers\n        // ----------------------------------------------------------------------------------------------\n        this.handleScroll = () => {\n            this.isScrollRecent = true;\n            if (this.isMouseDown) {\n                this.isMouse = true;\n            }\n            if (this.isTouchDown) {\n                this.isTouch = true;\n            }\n            if (this.isWheelRecent) {\n                this.isWheel = true;\n            }\n            this.startScroll();\n            this.emitter.trigger('scroll', this.getIsDevice());\n            this.scrollWaiter.request(500);\n        };\n        this.handleScrollWait = () => {\n            this.isScrollRecent = false;\n            // only end the scroll if not currently touching.\n            // if touching, the scrolling will end later, on touchend.\n            if (!this.isTouchDown) {\n                this.endScroll();\n            }\n        };\n        // will fire *before* the scroll event is fired (might not cause a scroll!)\n        this.handleWheel = () => {\n            this.isWheelRecent = true;\n            this.wheelWaiter.request(500);\n        };\n        this.handleWheelWait = () => {\n            this.isWheelRecent = false;\n        };\n        this.handleMouseDown = () => {\n            this.isMouseDown = true;\n        };\n        this.handleMouseUp = () => {\n            this.isMouseDown = false;\n        };\n        // will fire *before* the scroll event is fired (might not cause a scroll!)\n        this.handleTouchStart = () => {\n            this.isTouchDown = true;\n        };\n        this.handleTouchEnd = () => {\n            this.isTouchDown = false;\n            // if the user ended their touch, and the scroll area wasn't moving,\n            // we consider this to be the end of the scroll\n            // otherwise, wait for inertia to finish and handleScrollWait to fire\n            if (!this.isScrollRecent) {\n                this.endScroll();\n            }\n        };\n        this.wheelWaiter = new DelayedRunner(this.handleWheelWait);\n        this.scrollWaiter = new DelayedRunner(this.handleScrollWait);\n        el.addEventListener('scroll', this.handleScroll, { passive: true });\n        el.addEventListener('wheel', this.handleWheel, { passive: true });\n        el.addEventListener('mousedown', this.handleMouseDown);\n        el.addEventListener('mouseup', this.handleMouseUp);\n        el.addEventListener('touchstart', this.handleTouchStart, { passive: true });\n        el.addEventListener('touchend', this.handleTouchEnd);\n    }\n    destroy() {\n        let { el } = this;\n        el.removeEventListener('scroll', this.handleScroll, { passive: true });\n        el.removeEventListener('wheel', this.handleWheel, { passive: true });\n        el.removeEventListener('mousedown', this.handleMouseDown);\n        el.removeEventListener('mouseup', this.handleMouseUp);\n        el.removeEventListener('touchstart', this.handleTouchStart, { passive: true });\n        el.removeEventListener('touchend', this.handleTouchEnd);\n    }\n    // Start / Stop\n    // ----------------------------------------------------------------------------------------------\n    startScroll() {\n        if (!this.isScroll) {\n            this.isScroll = true;\n            this.emitter.trigger('scrollStart', this.getIsDevice());\n        }\n    }\n    endScroll() {\n        if (this.isScroll) { // extra protection because might be called publicly\n            this.scrollWaiter.clear(); // (same)\n            this.wheelWaiter.clear(); // (same)\n            this.isScroll = false;\n            this.isWheelRecent = false;\n            this.emitter.trigger('scrollEnd', this.getIsDevice());\n            this.isMouse = false;\n            this.isTouch = false;\n            this.isWheel = false;\n        }\n    }\n    getIsDevice() {\n        return this.isWheel || this.isMouse || this.isTouch;\n    }\n}\n\nclass Scroller extends DateComponent {\n    constructor() {\n        super(...arguments);\n        this.handleEl = (el) => {\n            if (this.el) {\n                this.el = null;\n                this._isUnmounting = true;\n                this.listener.destroy();\n            }\n            if (el) {\n                this.el = el;\n                this._isUnmounting = false;\n                this.listener = new ScrollListener(el);\n            }\n        };\n        this.handleHRuler = (el) => {\n            if (this.disconnectHRuler) {\n                this.disconnectHRuler();\n                this.disconnectHRuler = undefined;\n                if (this.clientWidth !== undefined) {\n                    this.clientWidth = undefined;\n                    setRef(this.props.clientWidthRef, null);\n                }\n            }\n            if (el) {\n                this.disconnectHRuler = watchWidth(el, (clientWidth) => {\n                    if (this._isUnmounting)\n                        return;\n                    if (clientWidth !== this.clientWidth) {\n                        this.clientWidth = clientWidth;\n                        setRef(this.props.clientWidthRef, clientWidth);\n                    }\n                });\n            }\n        };\n        this.handleVRuler = (el) => {\n            if (this.disconnectVRuler) {\n                this.disconnectVRuler();\n                this.disconnectVRuler = undefined;\n                if (this.clientHeight !== undefined) {\n                    this.clientHeight = undefined;\n                    setRef(this.props.clientHeightRef, null);\n                }\n            }\n            if (el) {\n                this.disconnectVRuler = watchHeight(el, (clientHeight) => {\n                    if (this._isUnmounting)\n                        return;\n                    if (clientHeight !== this.clientHeight) {\n                        this.clientHeight = clientHeight;\n                        setRef(this.props.clientHeightRef, clientHeight);\n                    }\n                    const bottomScrollbarWidth = Math.round(this.el.getBoundingClientRect().height - clientHeight);\n                    if (bottomScrollbarWidth !== this.bottomScrollbarWidth) {\n                        this.bottomScrollbarWidth = bottomScrollbarWidth;\n                        setRef(this.props.bottomScrollbarWidthRef, bottomScrollbarWidth);\n                    }\n                });\n            }\n        };\n    }\n    render() {\n        const { props } = this;\n        // if there's only one axis that needs scrolling, the other axis will unintentionally have\n        // scrollbars too if we don't force to 'hidden'\n        const fallbackOverflow = (props.horizontal || props.vertical) ? 'hidden' : '';\n        return (jsxs(\"div\", { ref: this.handleEl, className: joinClassNames(props.className, classNames.noPadding, classNames.rel, // for children fillTop/fillStart\n            props.hideScrollbars && classNames.noScrollbars, classNames.internalScroller), style: {\n                ...props.style,\n                overflowX: (props.horizontal ? 'auto' : fallbackOverflow),\n                overflowY: (props.vertical ? 'auto' : fallbackOverflow),\n            }, children: [props.children, Boolean(props.clientWidthRef) && (jsx(\"div\", { ref: this.handleHRuler, className: classNames.fillTop })), Boolean(props.clientHeightRef || props.bottomScrollbarWidthRef) && (jsx(\"div\", { ref: this.handleVRuler, className: classNames.fillStart }))] }));\n    }\n    endScroll() {\n        this.listener.endScroll();\n    }\n    // Public API\n    // -----------------------------------------------------------------------------------------------\n    get x() {\n        const { el } = this;\n        return el ? getNormalizedScrollX(el) : 0;\n    }\n    get y() {\n        const { el } = this;\n        return el ? el.scrollTop : 0;\n    }\n    scrollTo({ x, y }) {\n        const { el } = this;\n        if (el) {\n            if (y != null) {\n                el.scrollTop = y;\n            }\n            if (x != null) {\n                setNormalizedScrollX(el, x);\n            }\n        }\n    }\n    addScrollStartListener(handler) {\n        this.listener.emitter.on('scrollStart', handler);\n    }\n    removeScrollStartListener(handler) {\n        this.listener.emitter.off('scrollStart', handler);\n    }\n    addScrollEndListener(handler) {\n        this.listener.emitter.on('scrollEnd', handler);\n    }\n    removeScrollEndListener(handler) {\n        this.listener.emitter.off('scrollEnd', handler);\n    }\n}\n// Public API\n// -------------------------------------------------------------------------------------------------\n// We can drop normalization when support for Chromium-based <86 is dropped (see Notion)\nfunction getNormalizedScrollX(el) {\n    const { scrollLeft } = el;\n    const isRtl = computeElIsRtl(el);\n    return isRtl ? getNormalizedRtlScrollX(scrollLeft, el) : scrollLeft;\n}\nfunction setNormalizedScrollX(el, x) {\n    const isRtl = computeElIsRtl(el);\n    el.scrollLeft = isRtl ? getNormalizedRtlScrollLeft(x, el) : x;\n}\n/*\nReturns a value in the 'reverse' system\n*/\nfunction getNormalizedRtlScrollX(scrollLeft, el) {\n    switch (getRtlScrollerSystem()) {\n        case 'positive':\n            return el.scrollWidth - el.clientWidth - scrollLeft;\n        case 'negative':\n            return -scrollLeft;\n    }\n    return scrollLeft;\n}\n/*\nReceives a value in the 'reverse' system\nTODO: is this really the same equations as getNormalizedRtlScrollX??? I think so\n  If so, consolidate. With isRtl check too\n*/\nfunction getNormalizedRtlScrollLeft(x, el) {\n    switch (getRtlScrollerSystem()) {\n        case 'positive':\n            return el.scrollWidth - el.clientWidth - x;\n        case 'negative':\n            return -x;\n    }\n    return x;\n}\nlet _rtlScrollerSystem;\nfunction getRtlScrollerSystem() {\n    return _rtlScrollerSystem || (_rtlScrollerSystem = detectRtlScrollerSystem());\n}\nfunction detectRtlScrollerSystem() {\n    let el = document.createElement('div');\n    el.style.position = 'absolute';\n    el.style.top = '-1000px';\n    el.style.width = '100px'; // must be at least the side of scrollbars or you get inaccurate values (#7335)\n    el.style.height = '100px'; // \"\n    el.style.overflow = 'scroll';\n    el.style.direction = 'rtl';\n    let innerEl = document.createElement('div');\n    innerEl.style.width = '200px';\n    innerEl.style.height = '200px';\n    el.appendChild(innerEl);\n    document.body.appendChild(el);\n    let system;\n    if (el.scrollLeft > 0) {\n        system = 'positive'; // scroll is a positive number from the left edge\n    }\n    else {\n        el.scrollLeft = 50;\n        if (el.scrollLeft > 0) {\n            system = 'reverse'; // scroll is a positive number from the right edge\n        }\n        else {\n            system = 'negative'; // scroll is a negative number from the right edge\n        }\n    }\n    el.remove();\n    return system;\n}\n\nclass StandardEvent extends BaseComponent {\n    constructor() {\n        super(...arguments);\n        // memo\n        this.buildPublicEvent = memoize((context, eventDef, eventInstance) => new EventImpl(context, eventDef, eventInstance));\n        this.handleEl = (el) => {\n            this.el = el;\n            setRef(this.props.elRef, el);\n            if (el) {\n                setElEventRange(el, this.props.eventRange);\n            }\n        };\n    }\n    render() {\n        const { props, context } = this;\n        const { options } = context;\n        const { eventRange } = props;\n        const eventUi = eventRange.ui;\n        const timeFormat = options.eventTimeFormat || props.defaultTimeFormat;\n        const timeText = props.forcedTimeText ?? buildEventRangeTimeText(timeFormat, eventRange, // just for def/instance\n        props.slicedStart, props.slicedEnd, props.isStart, props.isEnd, context, props.defaultDisplayEventTime, props.defaultDisplayEventEnd);\n        const [tag, attrs, isInteractive] = getEventTagAndAttrs(eventRange, context);\n        const eventApi = this.buildPublicEvent(context, eventRange.def, eventRange.instance);\n        const isDraggable = !props.disableDragging && computeEventRangeDraggable(eventRange, context);\n        const isBlock = /row|column/.test(props.display);\n        const subcontentRenderProps = {\n            ...props.renderProps, // first, so built-in props take precedence\n            event: eventApi,\n            isNarrow: props.isNarrow || false,\n            isShort: props.isShort || false,\n            timeText,\n        };\n        const renderProps = {\n            ...props.renderProps, // first, so built-in props take precedence\n            event: eventApi, // make stable. everything else atomic. FYI, eventRange unfortunately gets reconstructed a lot, but def/instance is stable\n            view: context.viewApi,\n            timeText: timeText,\n            color: eventUi.color || options.eventColor,\n            contrastColor: eventUi.contrastColor || options.eventContrastColor,\n            isDraggable,\n            isStartResizable: !props.disableResizing && props.isStart && eventUi.durationEditable && options.eventResizableFromStart,\n            isEndResizable: !props.disableResizing && props.isEnd && eventUi.durationEditable,\n            isMirror: props.isMirror,\n            isStart: Boolean(props.isStart),\n            isEnd: Boolean(props.isEnd),\n            isFirst: Boolean(props.isFirst),\n            isLast: Boolean(props.isLast),\n            isPast: Boolean(props.isPast), // TODO: don't cast. getDateMeta does it\n            isFuture: Boolean(props.isFuture), // TODO: don't cast. getDateMeta does it\n            isToday: Boolean(props.isToday), // TODO: don't cast. getDateMeta does it\n            isSelected: Boolean(props.isSelected),\n            isDragging: Boolean(props.isDragging),\n            isResizing: Boolean(props.isResizing),\n            isInteractive,\n            isNarrow: props.isNarrow || false,\n            isShort: props.isShort || false,\n            level: props.level || 0,\n            timeClass: joinClassNames(generateClassName(options.eventTimeClass, subcontentRenderProps), isBlock && generateClassName(options.blockEventTimeClass, subcontentRenderProps), props.display === 'row' && generateClassName(options.rowEventTimeClass, subcontentRenderProps), props.display === 'column' && generateClassName(options.columnEventTimeClass, subcontentRenderProps), props.display === 'list-item' && generateClassName(options.listItemEventTimeClass, subcontentRenderProps)),\n            titleClass: joinClassNames(generateClassName(options.eventTitleClass, subcontentRenderProps), isBlock && generateClassName(options.blockEventTitleClass, subcontentRenderProps), props.display === 'row' && generateClassName(options.rowEventTitleClass, subcontentRenderProps), props.display === 'column' && generateClassName(options.columnEventTitleClass, subcontentRenderProps), props.display === 'list-item' && generateClassName(options.listItemEventTitleClass, subcontentRenderProps), props.display === 'row' && options.rowEventTitleSticky && classNames.stickyS, props.display === 'column' && options.columnEventTitleSticky && classNames.stickyT),\n            options: { eventOverlap: Boolean(options.eventOverlap) },\n        };\n        const outerClassName = joinClassNames(// already includes eventClass below\n        isBlock && generateClassName(options.blockEventClass, renderProps), props.display === 'row' && generateClassName(options.rowEventClass, renderProps), props.display === 'column' && generateClassName(options.columnEventClass, renderProps), props.display === 'list-item' && generateClassName(options.listItemEventClass, renderProps), eventUi.className, props.className, props.display === 'column'\n            ? classNames.flexCol\n            : classNames.flexRow, (eventRange.def.url || isDraggable) && classNames.cursorPointer, classNames.internalEvent, props.isMirror && classNames.internalEventMirror, isDraggable && classNames.internalEventDraggable, renderProps.isSelected && classNames.internalEventSelected, (renderProps.isStartResizable || renderProps.isEndResizable) && classNames.internalEventResizable);\n        const beforeClassName = joinClassNames(generateClassName(options.eventBeforeClass, renderProps), isBlock && generateClassName(options.blockEventBeforeClass, renderProps), props.display === 'row' && generateClassName(options.rowEventBeforeClass, renderProps), props.display === 'column' && generateClassName(options.columnEventBeforeClass, renderProps), props.display === 'list-item' && generateClassName(options.listItemEventBeforeClass, renderProps));\n        const afterClassName = joinClassNames(generateClassName(options.eventAfterClass, renderProps), isBlock && generateClassName(options.blockEventAfterClass, renderProps), props.display === 'row' && generateClassName(options.rowEventAfterClass, renderProps), props.display === 'column' && generateClassName(options.columnEventAfterClass, renderProps), props.display === 'list-item' && generateClassName(options.listItemEventAfterClass, renderProps));\n        const innerClassName = joinClassNames(generateClassName(options.eventInnerClass, renderProps), isBlock && generateClassName(options.blockEventInnerClass, renderProps), props.display === 'row' && generateClassName(options.rowEventInnerClass, renderProps), props.display === 'column' && generateClassName(options.columnEventInnerClass, renderProps), props.display === 'list-item' && generateClassName(options.listItemEventInnerClass, renderProps), !props.disableLiquid && classNames.liquid);\n        const beforeContent = props.display === 'row' && options.rowEventBeforeContent;\n        const afterContent = props.display === 'row' && options.rowEventAfterContent;\n        return (jsx(ContentContainer, { tag: tag, attrs: {\n                ...props.attrs,\n                ...attrs,\n                // HACK because this event-element gets attached to root during some dragging\n                dir: (props.isDragging && options.direction === 'rtl') ? 'rtl' : undefined,\n            }, className: outerClassName, style: {\n                '--fc-event-color': renderProps.color,\n                '--fc-event-contrast-color': renderProps.contrastColor,\n            }, elRef: this.handleEl, renderProps: renderProps, generatorName: \"eventContent\", customGenerator: options.eventContent, defaultGenerator: renderInnerContent, classNameGenerator: options.eventClass, didMount: options.eventDidMount, willUnmount: options.eventWillUnmount, children: (InnerContent) => (jsxs(Fragment, { children: [Boolean(renderProps.isSelected && isBlock) && (jsx(\"div\", { className: props.display === 'column'\n                            ? classNames.hitX\n                            : classNames.hitY })), (beforeClassName || beforeContent) && (jsxs(\"div\", { className: joinClassNames(beforeClassName, !props.disableZindexes && classNames.z1, renderProps.isStartResizable && joinClassNames(props.display === 'column'\n                            ? classNames.cursorResizeT\n                            : classNames.cursorResizeS, \n                        // these classnames required for dnd\n                        classNames.internalEventResizer, classNames.internalEventResizerStart)), children: [beforeContent && (jsx(ContentContainer, { tag: 'div', style: { display: 'contents' }, attrs: { 'aria-hidden': true }, renderProps: renderProps, generatorName: undefined, customGenerator: beforeContent })), Boolean(renderProps.isStartResizable && renderProps.isSelected) && (jsx(\"div\", { className: classNames.hit }))] })), jsx(InnerContent, { tag: \"div\", className: joinClassNames(innerClassName, !props.disableZindexes && classNames.z0) }), (afterClassName || afterContent) && (jsxs(\"div\", { className: joinClassNames(afterClassName, !props.disableZindexes && classNames.z1, renderProps.isEndResizable && joinClassNames(props.display === 'column'\n                            ? classNames.cursorResizeB\n                            : classNames.cursorResizeE, \n                        // these classnames required for dnd\n                        classNames.internalEventResizer, classNames.internalEventResizerEnd)), children: [afterContent && (jsx(ContentContainer, { tag: 'div', style: { display: 'contents' }, attrs: { 'aria-hidden': true }, renderProps: renderProps, generatorName: undefined, customGenerator: afterContent })), Boolean(renderProps.isEndResizable && renderProps.isSelected) && (jsx(\"div\", { className: classNames.hit }))] }))] })) }));\n    }\n    componentDidUpdate(prevProps) {\n        if (this.el && this.props.eventRange !== prevProps.eventRange) {\n            setElEventRange(this.el, this.props.eventRange);\n        }\n    }\n}\nStandardEvent.addPropsEquality({\n    seg: isPropsEqualShallow,\n});\nfunction renderInnerContent(innerProps) {\n    return (jsxs(Fragment, { children: [innerProps.timeText && (jsx(\"div\", { className: innerProps.timeClass, children: innerProps.timeText })), jsx(\"div\", { className: innerProps.titleClass, children: innerProps.event.title || jsx(Fragment, { children: \"\\u00A0\" }) })] }));\n}\n\nexport { BaseComponent as B, ContentContainer as C, DelayedRunner as D, FULL_DATE_FORMAT as F, NowTimerRunner as N, PureComponent as P, RenderId as R, Scroller as S, ViewContextType as V, WEEKDAY_ONLY_FORMAT as W, memoizeObjArg as a, buildViewContext as b, getIsHeightAuto as c, NowTimer as d, DateComponent as e, flushSyncWithSizeBatching as f, generateClassName as g, ViewContainer as h, getDateMeta as i, buildDateStr as j, StandardEvent as k, findWeekdayText as l, memoize as m, findDayNumberText as n, buildNavLinkAttrs as o, afterSize as p, watchWidth as q, renderText as r, setRef as s, findMonthText as t, watchSize as u, isDimsEqual as v, watchHeight as w, getTableHeaderSticky as x, getFooterScrollbarSticky as y, getScrollerSyncerClass as z };\n","import { constrainMarkerToRange, intersectRanges, rangesIntersect, rangeContainsMarker, greatestDurationDenominator, createDuration, asRoughDays, startOfDay, addDays, asRoughMs, parseRange, diffWholeWeeks, diffWholeDays } from '@full-ui/headless-calendar';\nimport { T as computeVisibleDayRange } from './d7fd1889.js';\n\nclass DateProfileGenerator {\n    constructor(props) {\n        this.props = props;\n        this.initHiddenDays();\n    }\n    /* Date Range Computation\n    ------------------------------------------------------------------------------------------------------------------*/\n    // Builds a structure with info about what the dates/ranges will be for the \"prev\" view.\n    buildPrev(currentDateProfile, currentDate, nowDate, forceToValid) {\n        let { dateEnv } = this.props;\n        let prevDate = dateEnv.subtract(dateEnv.startOf(currentDate, currentDateProfile.currentRangeUnit), // important for start-of-month\n        currentDateProfile.dateIncrement);\n        return this.build(prevDate, nowDate, -1, forceToValid);\n    }\n    // Builds a structure with info about what the dates/ranges will be for the \"next\" view.\n    buildNext(currentDateProfile, currentDate, nowDate, forceToValid) {\n        let { dateEnv } = this.props;\n        let nextDate = dateEnv.add(dateEnv.startOf(currentDate, currentDateProfile.currentRangeUnit), // important for start-of-month\n        currentDateProfile.dateIncrement);\n        return this.build(nextDate, nowDate, 1, forceToValid);\n    }\n    // Builds a structure holding dates/ranges for rendering around the given date.\n    // Optional direction param indicates whether the date is being incremented/decremented\n    // from its previous value. decremented = -1, incremented = 1 (default).\n    build(currentDate, nowDate, direction, forceToValid = true) {\n        let { props } = this;\n        let validRange;\n        let currentInfo;\n        let isRangeAllDay;\n        let renderRange;\n        let activeRange;\n        let isValid;\n        validRange = this.buildValidRange(nowDate);\n        validRange = this.trimHiddenDays(validRange);\n        if (forceToValid) {\n            currentDate = constrainMarkerToRange(currentDate, validRange);\n        }\n        currentInfo = this.buildCurrentRangeInfo(currentDate, direction);\n        isRangeAllDay = /^(year|month|week|day)$/.test(currentInfo.unit);\n        renderRange = this.buildRenderRange(this.trimHiddenDays(currentInfo.range), currentInfo.unit, isRangeAllDay);\n        renderRange = this.trimHiddenDays(renderRange);\n        activeRange = renderRange;\n        if (!props.showNonCurrentDates) {\n            activeRange = intersectRanges(activeRange, currentInfo.range);\n        }\n        activeRange = this.adjustActiveRange(activeRange);\n        activeRange = intersectRanges(activeRange, validRange); // might return null\n        // it's invalid if the originally requested date is not contained,\n        // or if the range is completely outside of the valid range.\n        isValid = rangesIntersect(currentInfo.range, validRange);\n        // HACK: constrain to render-range so `currentDate` is more useful to view rendering\n        if (!rangeContainsMarker(renderRange, currentDate)) {\n            currentDate = renderRange.start;\n        }\n        return {\n            currentDate,\n            // constraint for where prev/next operations can go and where events can be dragged/resized to.\n            // an object with optional start and end properties.\n            validRange,\n            // range the view is formally responsible for.\n            // for example, a month view might have 1st-31st, excluding padded dates\n            currentRange: currentInfo.range,\n            // name of largest unit being displayed, like \"month\" or \"week\"\n            currentRangeUnit: currentInfo.unit,\n            isRangeAllDay,\n            // dates that display events and accept drag-n-drop\n            // will be `null` if no dates accept events\n            activeRange,\n            // date range with a rendered skeleton\n            // includes not-active days that need some sort of DOM\n            renderRange,\n            // Duration object that denotes the first visible time of any given day\n            slotMinTime: props.slotMinTime,\n            // Duration object that denotes the exclusive visible end time of any given day\n            slotMaxTime: props.slotMaxTime,\n            isValid,\n            // how far the current date will move for a prev/next operation\n            dateIncrement: this.buildDateIncrement(currentInfo.duration),\n            // pass a fallback (might be null) ^\n        };\n    }\n    // Builds an object with optional start/end properties.\n    // Indicates the minimum/maximum dates to display.\n    // not responsible for trimming hidden days.\n    buildValidRange(nowDate) {\n        let input = this.props.validRangeInput;\n        let simpleInput = typeof input === 'function'\n            ? input.call(this.props.calendarApi, this.props.dateEnv.toDate(nowDate))\n            : input;\n        return this.refineRange(simpleInput) ||\n            { start: null, end: null }; // completely open-ended\n    }\n    // Builds a structure with info about the \"current\" range, the range that is\n    // highlighted as being the current month for example.\n    // See build() for a description of `direction`.\n    // Guaranteed to have `range` and `unit` properties. `duration` is optional.\n    buildCurrentRangeInfo(date, direction) {\n        let { props } = this;\n        let duration = null;\n        let unit = null;\n        let range = null;\n        let dayCount;\n        if (props.duration) {\n            duration = props.duration;\n            unit = props.durationUnit;\n            range = this.buildRangeFromDuration(date, direction, duration, unit);\n        }\n        else if ((dayCount = this.props.dayCount)) {\n            unit = 'day';\n            range = this.buildRangeFromDayCount(date, direction, dayCount);\n        }\n        else if ((range = this.buildCustomVisibleRange(date))) {\n            unit = props.dateEnv.greatestWholeUnit(range.start, range.end).unit;\n        }\n        else {\n            duration = this.getFallbackDuration();\n            unit = greatestDurationDenominator(duration).unit;\n            range = this.buildRangeFromDuration(date, direction, duration, unit);\n        }\n        return { duration, unit, range };\n    }\n    getFallbackDuration() {\n        return createDuration({ day: 1 });\n    }\n    // Returns a new activeRange to have time values (un-ambiguate)\n    // slotMinTime or slotMaxTime causes the range to expand.\n    adjustActiveRange(range) {\n        let { dateEnv, usesMinMaxTime, slotMinTime, slotMaxTime } = this.props;\n        let { start, end } = range;\n        if (usesMinMaxTime) {\n            // expand active range if slotMinTime is negative (why not when positive?)\n            if (asRoughDays(slotMinTime) < 0) {\n                start = startOfDay(start); // necessary?\n                start = dateEnv.add(start, slotMinTime);\n            }\n            // expand active range if slotMaxTime is beyond one day (why not when negative?)\n            if (asRoughDays(slotMaxTime) > 1) {\n                end = startOfDay(end); // necessary?\n                end = addDays(end, -1);\n                end = dateEnv.add(end, slotMaxTime);\n            }\n        }\n        return { start, end };\n    }\n    // Builds the \"current\" range when it is specified as an explicit duration.\n    // `unit` is the already-computed greatestDurationDenominator unit of duration.\n    buildRangeFromDuration(date, direction, duration, unit) {\n        let { dateEnv, dateAlignment } = this.props;\n        let start;\n        let end;\n        let res;\n        // compute what the alignment should be\n        if (!dateAlignment) {\n            let { dateIncrement } = this.props;\n            if (dateIncrement) {\n                // use the smaller of the two units\n                if (asRoughMs(dateIncrement) < asRoughMs(duration)) {\n                    dateAlignment = greatestDurationDenominator(dateIncrement).unit;\n                }\n                else {\n                    dateAlignment = unit;\n                }\n            }\n            else {\n                dateAlignment = unit;\n            }\n        }\n        // if the view displays a single day or smaller\n        if (asRoughDays(duration) <= 1) {\n            if (this.isHiddenDay(start)) {\n                start = this.skipHiddenDays(start, direction);\n                start = startOfDay(start);\n            }\n        }\n        function computeRes() {\n            start = dateEnv.startOf(date, dateAlignment);\n            end = dateEnv.add(start, duration);\n            res = { start, end };\n        }\n        computeRes();\n        // if range is completely enveloped by hidden days, go past the hidden days\n        if (!this.trimHiddenDays(res)) {\n            date = this.skipHiddenDays(date, direction);\n            computeRes();\n        }\n        return res;\n    }\n    // Builds the \"current\" range when a dayCount is specified.\n    buildRangeFromDayCount(date, direction, dayCount) {\n        let { dateEnv, dateAlignment } = this.props;\n        let runningCount = 0;\n        let start = date;\n        let end;\n        if (dateAlignment) {\n            start = dateEnv.startOf(start, dateAlignment);\n        }\n        start = startOfDay(start);\n        start = this.skipHiddenDays(start, direction);\n        end = start;\n        do {\n            end = addDays(end, 1);\n            if (!this.isHiddenDay(end)) {\n                runningCount += 1;\n            }\n        } while (runningCount < dayCount);\n        return { start, end };\n    }\n    // Builds a normalized range object for the \"visible\" range,\n    // which is a way to define the currentRange and activeRange at the same time.\n    buildCustomVisibleRange(date) {\n        let { props } = this;\n        let input = props.visibleRangeInput;\n        let simpleInput = typeof input === 'function'\n            ? input.call(props.calendarApi, props.dateEnv.toDate(date))\n            : input;\n        let range = this.refineRange(simpleInput);\n        if (range && (range.start == null || range.end == null)) {\n            return null;\n        }\n        return range;\n    }\n    // Computes the range that will represent the element/cells for *rendering*,\n    // but which may have voided days/times.\n    // not responsible for trimming hidden days.\n    buildRenderRange(currentRange, currentRangeUnit, isRangeAllDay) {\n        return currentRange;\n    }\n    // Compute the duration value that should be added/substracted to the current date\n    // when a prev/next operation happens.\n    buildDateIncrement(fallback) {\n        let { dateIncrement } = this.props;\n        let customAlignment;\n        if (dateIncrement) {\n            return dateIncrement;\n        }\n        if ((customAlignment = this.props.dateAlignment)) {\n            return createDuration(1, customAlignment);\n        }\n        if (fallback) {\n            return fallback;\n        }\n        return createDuration({ days: 1 });\n    }\n    refineRange(rangeInput) {\n        if (rangeInput) {\n            let range = parseRange(rangeInput, this.props.dateEnv);\n            if (range) {\n                range = computeVisibleDayRange(range);\n            }\n            return range;\n        }\n        return null;\n    }\n    /* Hidden Days\n    ------------------------------------------------------------------------------------------------------------------*/\n    // Initializes internal variables related to calculating hidden days-of-week\n    initHiddenDays() {\n        let hiddenDays = this.props.hiddenDays || []; // array of day-of-week indices that are hidden\n        let isHiddenDayHash = []; // is the day-of-week hidden? (hash with day-of-week-index -> bool)\n        let dayCnt = 0;\n        let i;\n        if (this.props.weekends === false) {\n            // copy. mutating the user's array would make it unequal to their next equal-but-new array (#7069)\n            hiddenDays = hiddenDays.concat([0, 6]); // 0=sunday, 6=saturday\n        }\n        for (i = 0; i < 7; i += 1) {\n            if (!(isHiddenDayHash[i] = hiddenDays.indexOf(i) !== -1)) {\n                dayCnt += 1;\n            }\n        }\n        if (!dayCnt) {\n            throw new Error('invalid hiddenDays'); // all days were hidden? bad.\n        }\n        this.isHiddenDayHash = isHiddenDayHash;\n    }\n    // Remove days from the beginning and end of the range that are computed as hidden.\n    // If the whole range is trimmed off, returns null\n    trimHiddenDays(range) {\n        let { start, end } = range;\n        if (start) {\n            start = this.skipHiddenDays(start);\n        }\n        if (end) {\n            end = this.skipHiddenDays(end, -1, true);\n        }\n        if (start == null || end == null || start < end) {\n            return { start, end };\n        }\n        return null;\n    }\n    // Is the current day hidden?\n    // `day` is a day-of-week index (0-6), or a Date (used for UTC)\n    isHiddenDay(day) {\n        if (day instanceof Date) {\n            day = day.getUTCDay();\n        }\n        return this.isHiddenDayHash[day];\n    }\n    // Incrementing the current day until it is no longer a hidden day, returning a copy.\n    // DOES NOT CONSIDER validRange!\n    // If the initial value of `date` is not a hidden day, don't do anything.\n    // Pass `isExclusive` as `true` if you are dealing with an end date.\n    // `inc` defaults to `1` (increment one day forward each time)\n    skipHiddenDays(date, inc = 1, isExclusive = false) {\n        while (this.isHiddenDayHash[(date.getUTCDay() + (isExclusive ? inc : 0) + 7) % 7]) {\n            date = addDays(date, inc);\n        }\n        return date;\n    }\n}\n// Utils\n// -------------------------------------------------------------------------------------------------\nfunction computeMajorUnit(dateProfile, dateEnv) {\n    const { currentRange } = dateProfile;\n    if (dateProfile.currentRangeUnit === 'year') {\n        if (dateEnv.diffWholeYears(currentRange.start, currentRange.end) > 1) {\n            return 'year';\n        }\n        else {\n            return 'month';\n        }\n    }\n    else if (dateProfile.currentRangeUnit === 'month') {\n        if (dateEnv.diffWholeMonths(currentRange.start, currentRange.end) > 1) {\n            return 'month';\n        }\n    }\n    else if (dateProfile.currentRangeUnit === 'week') {\n        if (diffWholeWeeks(currentRange.start, currentRange.end) > 1) {\n            return 'week';\n        }\n    }\n    else if (dateProfile.currentRangeUnit === 'day') {\n        if (diffWholeDays(currentRange.start, currentRange.end) > 1) {\n            return 'day';\n        }\n    }\n}\nfunction isMajorUnit(dateMarker, majorUnit, dateEnv) {\n    const isStartOfDay = dateMarker.valueOf() === startOfDay(dateMarker).valueOf();\n    if (isStartOfDay) {\n        if (majorUnit === 'year') {\n            return !dateEnv.getMonth(dateMarker) && dateEnv.getDay(dateMarker) === 1;\n        }\n        else if (majorUnit === 'month') {\n            return dateEnv.getDay(dateMarker) === 1;\n        }\n        else if (majorUnit === 'week') {\n            return dateMarker.getUTCDay() === dateEnv.weekDow;\n        }\n        else if (majorUnit === 'day') {\n            return true;\n        }\n    }\n    return false;\n}\n\nexport { DateProfileGenerator as D, computeMajorUnit as c, isMajorUnit as i };\n","import { j as createEmptyEventStore, U as filterEventStoreDefs, W as excludeSubEventStore, X as expandRecurring, Y as mergeEventStores, p as parseEvents, n as mapHash, Z as buildValidInstanceRange, _ as buildEventInstanceRange, $ as getRangeInstantEndMs, a0 as getRangeInstantStartMs, f as filterHash } from './d7fd1889.js';\nimport { addMs } from '@full-ui/headless-calendar';\n\nfunction reduceEventStore(eventStore, action, eventSources, dateProfile, context) {\n    switch (action.type) {\n        case 'RECEIVE_EVENTS': // raw\n            return receiveRawEvents(eventStore, eventSources[action.sourceId], action.fetchId, action.fetchRange, action.rawEvents, context);\n        case 'RESET_RAW_EVENTS':\n            return resetRawEvents(eventStore, eventSources[action.sourceId], action.rawEvents, dateProfile.activeRange, context);\n        case 'ADD_EVENTS': // already parsed, but not expanded\n            return addEvent(eventStore, action.eventStore, // new ones\n            dateProfile ? dateProfile.activeRange : null, context);\n        case 'RESET_EVENTS':\n            return action.eventStore;\n        case 'MERGE_EVENTS': // already parsed and expanded\n            return mergeEventStores(eventStore, action.eventStore);\n        case 'PREV': // TODO: how do we track all actions that affect dateProfile :(\n        case 'NEXT':\n        case 'CHANGE_DATE':\n        case 'CHANGE_VIEW_TYPE':\n            if (dateProfile) {\n                return expandRecurring(eventStore, dateProfile.activeRange, context);\n            }\n            return eventStore;\n        case 'REMOVE_EVENTS':\n            return excludeSubEventStore(eventStore, action.eventStore);\n        case 'REMOVE_EVENT_SOURCE':\n            return excludeEventsBySourceId(eventStore, action.sourceId);\n        case 'REMOVE_ALL_EVENT_SOURCES':\n            return filterEventStoreDefs(eventStore, (eventDef) => (!eventDef.sourceId // only keep events with no source id\n            ));\n        case 'REMOVE_ALL_EVENTS':\n            return createEmptyEventStore();\n        default:\n            return eventStore;\n    }\n}\nfunction receiveRawEvents(eventStore, eventSource, fetchId, fetchRange, rawEvents, context) {\n    if (eventSource && // not already removed\n        fetchId === eventSource.latestFetchId // TODO: wish this logic was always in event-sources\n    ) {\n        let subset = parseEvents(transformRawEvents(rawEvents, eventSource, context), eventSource, context);\n        if (fetchRange) {\n            subset = expandRecurring(subset, fetchRange, context);\n        }\n        return mergeEventStores(excludeEventsBySourceId(eventStore, eventSource.sourceId), subset);\n    }\n    return eventStore;\n}\nfunction resetRawEvents(existingEventStore, eventSource, rawEvents, activeRange, context) {\n    const { defIdMap, instanceIdMap } = buildPublicIdMaps(existingEventStore);\n    let newEventStore = parseEvents(transformRawEvents(rawEvents, eventSource, context), eventSource, context, false, defIdMap, instanceIdMap);\n    return expandRecurring(newEventStore, activeRange, context);\n}\nfunction transformRawEvents(rawEvents, eventSource, context) {\n    let calEachTransform = context.options.eventDataTransform;\n    let sourceEachTransform = eventSource ? eventSource.eventDataTransform : null;\n    if (sourceEachTransform) {\n        rawEvents = transformEachRawEvent(rawEvents, sourceEachTransform);\n    }\n    if (calEachTransform) {\n        rawEvents = transformEachRawEvent(rawEvents, calEachTransform);\n    }\n    return rawEvents;\n}\nfunction transformEachRawEvent(rawEvents, func) {\n    let refinedEvents;\n    if (!func) {\n        refinedEvents = rawEvents;\n    }\n    else {\n        refinedEvents = [];\n        for (let rawEvent of rawEvents) {\n            let refinedEvent = func(rawEvent);\n            if (refinedEvent) {\n                refinedEvents.push(refinedEvent);\n            }\n            else if (refinedEvent == null) {\n                refinedEvents.push(rawEvent);\n            } // if a different falsy value, do nothing\n        }\n    }\n    return refinedEvents;\n}\nfunction addEvent(eventStore, subset, expandRange, context) {\n    if (expandRange) {\n        subset = expandRecurring(subset, expandRange, context);\n    }\n    return mergeEventStores(eventStore, subset);\n}\nfunction rezoneEventStoreDates(eventStore, oldDateEnv, newDateEnv) {\n    let { defs } = eventStore;\n    let instances = mapHash(eventStore.instances, (instance) => {\n        let def = defs[instance.defId];\n        if (def.allDay) {\n            return instance; // isn't dependent on timezone\n        }\n        // markers are zone-dependent, instants are not. recompute markers FROM the exact\n        // instants when present (correctly re-resolves DST-fold identity in the new zone).\n        // buildValidInstanceRange re-expresses ranges the new zone's fold civilly compresses\n        let { instantStartMs, instantEndMs } = instance.range;\n        let start = instantStartMs != null ?\n            newDateEnv.timestampToMarker(instantStartMs) :\n            newDateEnv.createMarker(oldDateEnv.toDate(instance.range.start));\n        let end = instantEndMs != null ?\n            newDateEnv.timestampToMarker(instantEndMs) :\n            newDateEnv.createMarker(oldDateEnv.toDate(instance.range.end));\n        return {\n            ...instance,\n            range: buildValidInstanceRange({ marker: start, instantMs: instantStartMs }, { marker: end, instantMs: instantEndMs }, newDateEnv) ?? buildEventInstanceRange(\n            // mixed exact/civil edges whose real order degenerated in the new zone (rare):\n            // keep the exact start, apply the old real duration civilly\n            start, addMs(start, getRangeInstantEndMs(instance.range, oldDateEnv) - getRangeInstantStartMs(instance.range, oldDateEnv)), instantStartMs),\n        };\n    });\n    return { defs, instances };\n}\nfunction excludeEventsBySourceId(eventStore, sourceId) {\n    return filterEventStoreDefs(eventStore, (eventDef) => eventDef.sourceId !== sourceId);\n}\n// QUESTION: why not just return instances? do a general object-property-exclusion util\nfunction excludeInstances(eventStore, removals) {\n    return {\n        defs: eventStore.defs,\n        instances: filterHash(eventStore.instances, (instance) => !removals[instance.instanceId]),\n    };\n}\nfunction buildPublicIdMaps(eventStore) {\n    const { defs, instances } = eventStore;\n    const defIdMap = {};\n    const instanceIdMap = {};\n    for (let defId in defs) {\n        const def = defs[defId];\n        const { publicId } = def;\n        if (publicId) {\n            defIdMap[publicId] = defId;\n        }\n    }\n    for (let instanceId in instances) {\n        const instance = instances[instanceId];\n        const def = defs[instance.defId];\n        const { publicId } = def;\n        if (publicId) {\n            instanceIdMap[publicId] = instanceId;\n        }\n    }\n    return { defIdMap, instanceIdMap };\n}\n\nclass Interaction {\n    constructor(settings) {\n        this.component = settings.component;\n        this.isHitComboAllowed = settings.isHitComboAllowed || null;\n    }\n    destroy() {\n    }\n}\nfunction parseInteractionSettings(component, input) {\n    return {\n        component,\n        el: input.el,\n        useEventCenter: input.useEventCenter != null ? input.useEventCenter : true,\n        isHitComboAllowed: input.isHitComboAllowed || null,\n    };\n}\nfunction interactionSettingsToStore(settings) {\n    return {\n        [settings.component.uid]: settings,\n    };\n}\n// global state\nconst interactionSettingsStore = {};\n\nexport { Interaction as I, rezoneEventStoreDates as a, interactionSettingsToStore as b, excludeInstances as e, interactionSettingsStore as i, parseInteractionSettings as p, reduceEventStore as r };\n","import { o as organizeRawLocales, b as buildLocale, i as initEventSources, r as reduceEventSources, c as computeEventSourcesLoading, d as reduceEventSourcesNewTimeZone, a as globalPlugins, p as parseEventSource } from './2308e481.js';\nimport { m as memoize, a as memoizeObjArg, N as NowTimerRunner, f as flushSyncWithSizeBatching, g as generateClassName, P as PureComponent, b as buildViewContext, c as getIsHeightAuto, V as ViewContextType, B as BaseComponent, C as ContentContainer } from './2f45deb4.js';\nimport { p as parseEvents, j as createEmptyEventStore, B as BASE_OPTION_DEFAULTS, k as BASE_OPTION_REFINERS, C as CALENDAR_LISTENER_REFINERS, l as CALENDAR_ONLY_OPTION_REFINERS, m as COMPLEX_OPTION_COMPARATORS, V as VIEW_ONLY_OPTION_REFINERS, n as mapHash, c as createEventUi, w as warn, e as createFormatter, o as parseDateSpan, t as triggerDateSelect, q as triggerDateUnselect, u as EventImpl, v as eventTupleToStore, x as EventSourceImpl, h as hashValuesToArray, y as parseEvent, z as eventApiToStore, a as buildEventApis, A as formatWithOrdinals, D as getElEventRange, F as listenBySelector, G as listenToHoverBySelector, H as isArraysEqual, I as isPropsEqualShallow, J as computeViewBorderless } from './d7fd1889.js';\nimport { m as mergeCalendarOptions, i as isMergedPropsEqual, a as mergeViewOptionsMap } from './167cc14f.js';\nimport { rangeContainsMarker, DateEnv, createDuration, joinDateTimeFormatParts, greatestDurationDenominator, diffWholeDays } from '@full-ui/headless-calendar';\nimport { jsxs, jsx, Fragment } from 'preact/jsx-runtime';\nimport { j as joinClassNames } from './d74440d5.js';\nimport { D as DateProfileGenerator } from './4ddf07a5.js';\nimport { r as reduceEventStore, a as rezoneEventStoreDates, I as Interaction, p as parseInteractionSettings, i as interactionSettingsStore } from './8719026f.js';\nimport { E as Emitter } from './18d26d90.js';\nimport { c as classNames } from './0b389a37.js';\nimport { Component, Fragment as Fragment$1, createElement } from 'preact/compat';\n\n// TODO: easier way to add new hooks? need to update a million things\nfunction refinePluginDef(input) {\n    return {\n        name: input.name,\n        premiumReleaseDate: input.premiumReleaseDate ? new Date(input.premiumReleaseDate) : undefined,\n        reducers: input.reducers || [],\n        isLoadingFuncs: input.isLoadingFuncs || [],\n        contextInit: [].concat(input.contextInit || []),\n        eventRefiners: input.eventRefiners || {},\n        eventDefMemberAdders: input.eventDefMemberAdders || [],\n        eventSourceRefiners: input.eventSourceRefiners || {},\n        isDraggableTransformers: input.isDraggableTransformers || [],\n        eventDragMutationMassagers: input.eventDragMutationMassagers || [],\n        eventDefMutationAppliers: input.eventDefMutationAppliers || [],\n        dateSelectionTransformers: input.dateSelectionTransformers || [],\n        datePointTransforms: input.datePointTransforms || [],\n        dateSpanTransforms: input.dateSpanTransforms || [],\n        views: input.views || {},\n        viewPropsTransformers: input.viewPropsTransformers || [],\n        isPropsValid: input.isPropsValid || null,\n        externalDefTransforms: input.externalDefTransforms || [],\n        viewContainerAppends: input.viewContainerAppends || [],\n        eventDropTransformers: input.eventDropTransformers || [],\n        componentInteractions: input.componentInteractions || [],\n        calendarInteractions: input.calendarInteractions || [],\n        eventSourceDefs: input.eventSourceDefs || [],\n        cmdFormatter: input.cmdFormatter,\n        recurringTypes: input.recurringTypes || [],\n        initialView: input.initialView || '',\n        elementDraggingImpl: input.elementDraggingImpl,\n        optionChangeHandlers: input.optionChangeHandlers || {},\n        scrollerSyncerClass: input.scrollerSyncerClass || null,\n        listenerRefiners: input.listenerRefiners || {},\n        optionRefiners: input.optionRefiners || {},\n        optionDefaults: input.optionDefaults ? [input.optionDefaults] : [],\n        propSetHandlers: input.propSetHandlers || {},\n    };\n}\nfunction buildPluginHooks(pluginDefs, globalDefs) {\n    let pluginsByName = {};\n    let hooks = {\n        premiumReleaseDate: undefined,\n        reducers: [],\n        isLoadingFuncs: [],\n        contextInit: [],\n        eventRefiners: {},\n        eventDefMemberAdders: [],\n        eventSourceRefiners: {},\n        isDraggableTransformers: [],\n        eventDragMutationMassagers: [],\n        eventDefMutationAppliers: [],\n        dateSelectionTransformers: [],\n        datePointTransforms: [],\n        dateSpanTransforms: [],\n        views: {},\n        viewPropsTransformers: [],\n        isPropsValid: null,\n        externalDefTransforms: [],\n        viewContainerAppends: [],\n        eventDropTransformers: [],\n        componentInteractions: [],\n        calendarInteractions: [],\n        eventSourceDefs: [],\n        cmdFormatter: null,\n        recurringTypes: [],\n        initialView: '',\n        elementDraggingImpl: null,\n        optionChangeHandlers: {},\n        scrollerSyncerClass: null,\n        listenerRefiners: {},\n        optionRefiners: {},\n        optionDefaults: [],\n        propSetHandlers: {},\n    };\n    /*\n    IDs/names, etc\n    */\n    function addDefs(defs) {\n        for (let unrefinedDef of defs) {\n            const { name } = unrefinedDef;\n            if (!name) {\n                throw new Error('Plugin must specify a name');\n            }\n            if (unrefinedDef.majorVersionError) { // a plugin from an older major version, which can't work here\n                throw new Error(unrefinedDef.majorVersionError);\n            }\n            if (!pluginsByName[name]) {\n                const def = pluginsByName[name] = refinePluginDef(unrefinedDef);\n                hooks = combineHooks(hooks, def);\n                addDefs(unrefinedDef.deps || []);\n            }\n        }\n    }\n    if (pluginDefs) { // how could this be undefined?\n        addDefs(pluginDefs);\n    }\n    addDefs(globalDefs); // GLOBAL plugins\n    return hooks;\n}\nfunction buildBuildPluginHooks() {\n    let currentOverrideDefs = [];\n    let currentGlobalDefs = [];\n    let currentHooks;\n    return (overrideDefs, globalDefs) => {\n        if (!currentHooks || !isArraysEqual(overrideDefs, currentOverrideDefs) || !isArraysEqual(globalDefs, currentGlobalDefs)) {\n            currentHooks = buildPluginHooks(overrideDefs, globalDefs);\n        }\n        currentOverrideDefs = overrideDefs;\n        currentGlobalDefs = globalDefs;\n        return currentHooks;\n    };\n}\nfunction combineHooks(hooks0, hooks1) {\n    return {\n        premiumReleaseDate: compareOptionalDates(hooks0.premiumReleaseDate, hooks1.premiumReleaseDate),\n        reducers: hooks0.reducers.concat(hooks1.reducers),\n        isLoadingFuncs: hooks0.isLoadingFuncs.concat(hooks1.isLoadingFuncs),\n        contextInit: hooks0.contextInit.concat(hooks1.contextInit),\n        eventRefiners: { ...hooks0.eventRefiners, ...hooks1.eventRefiners },\n        eventDefMemberAdders: hooks0.eventDefMemberAdders.concat(hooks1.eventDefMemberAdders),\n        eventSourceRefiners: { ...hooks0.eventSourceRefiners, ...hooks1.eventSourceRefiners },\n        isDraggableTransformers: hooks0.isDraggableTransformers.concat(hooks1.isDraggableTransformers),\n        eventDragMutationMassagers: hooks0.eventDragMutationMassagers.concat(hooks1.eventDragMutationMassagers),\n        eventDefMutationAppliers: hooks0.eventDefMutationAppliers.concat(hooks1.eventDefMutationAppliers),\n        dateSelectionTransformers: hooks0.dateSelectionTransformers.concat(hooks1.dateSelectionTransformers),\n        datePointTransforms: hooks0.datePointTransforms.concat(hooks1.datePointTransforms),\n        dateSpanTransforms: hooks0.dateSpanTransforms.concat(hooks1.dateSpanTransforms),\n        views: mergeViewOptionsMap(hooks0.views, hooks1.views),\n        viewPropsTransformers: hooks0.viewPropsTransformers.concat(hooks1.viewPropsTransformers),\n        isPropsValid: hooks1.isPropsValid || hooks0.isPropsValid,\n        externalDefTransforms: hooks0.externalDefTransforms.concat(hooks1.externalDefTransforms),\n        viewContainerAppends: hooks0.viewContainerAppends.concat(hooks1.viewContainerAppends),\n        eventDropTransformers: hooks0.eventDropTransformers.concat(hooks1.eventDropTransformers),\n        calendarInteractions: hooks0.calendarInteractions.concat(hooks1.calendarInteractions),\n        componentInteractions: hooks0.componentInteractions.concat(hooks1.componentInteractions),\n        eventSourceDefs: hooks0.eventSourceDefs.concat(hooks1.eventSourceDefs),\n        cmdFormatter: hooks1.cmdFormatter || hooks0.cmdFormatter,\n        recurringTypes: hooks0.recurringTypes.concat(hooks1.recurringTypes),\n        initialView: hooks0.initialView || hooks1.initialView, // put earlier plugins FIRST\n        elementDraggingImpl: hooks0.elementDraggingImpl || hooks1.elementDraggingImpl, // \"\n        optionChangeHandlers: { ...hooks0.optionChangeHandlers, ...hooks1.optionChangeHandlers },\n        scrollerSyncerClass: hooks0.scrollerSyncerClass || hooks1.scrollerSyncerClass,\n        listenerRefiners: { ...hooks0.listenerRefiners, ...hooks1.listenerRefiners },\n        optionRefiners: { ...hooks0.optionRefiners, ...hooks1.optionRefiners },\n        optionDefaults: hooks0.optionDefaults.concat(hooks1.optionDefaults),\n        propSetHandlers: { ...hooks0.propSetHandlers, ...hooks1.propSetHandlers },\n    };\n}\nfunction compareOptionalDates(date0, date1) {\n    if (date0 === undefined) {\n        return date1;\n    }\n    if (date1 === undefined) {\n        return date0;\n    }\n    return new Date(Math.max(date0.valueOf(), date1.valueOf()));\n}\n\nfunction compileViewDefs(defaultConfigs, overrideConfigs) {\n    let hash = {};\n    let viewType;\n    for (viewType in defaultConfigs) {\n        ensureViewDef(viewType, hash, defaultConfigs, overrideConfigs);\n    }\n    for (viewType in overrideConfigs) {\n        ensureViewDef(viewType, hash, defaultConfigs, overrideConfigs);\n    }\n    return hash;\n}\nfunction ensureViewDef(viewType, hash, defaultConfigs, overrideConfigs) {\n    if (hash[viewType]) {\n        return hash[viewType];\n    }\n    let viewDef = buildViewDef(viewType, hash, defaultConfigs, overrideConfigs);\n    if (viewDef) {\n        hash[viewType] = viewDef;\n    }\n    return viewDef;\n}\nfunction buildViewDef(viewType, hash, defaultConfigs, overrideConfigs) {\n    let defaultConfig = defaultConfigs[viewType];\n    let overrideConfig = overrideConfigs[viewType];\n    let queryProp = (name) => ((defaultConfig && defaultConfig[name] !== null) ? defaultConfig[name] :\n        ((overrideConfig && overrideConfig[name] !== null) ? overrideConfig[name] : null));\n    let theComponent = queryProp('component');\n    let superType = queryProp('superType');\n    let superDef = null;\n    if (superType) {\n        if (superType === viewType) {\n            throw new Error('Can\\'t have a custom view type that references itself');\n        }\n        superDef = ensureViewDef(superType, hash, defaultConfigs, overrideConfigs);\n    }\n    if (!theComponent && superDef) {\n        theComponent = superDef.component;\n    }\n    if (!theComponent) {\n        return null; // don't throw a warning, might be settings for a single-unit view\n    }\n    return {\n        type: viewType,\n        component: theComponent,\n        defaults: mergeCalendarOptions(superDef ? superDef.defaults : {}, defaultConfig ? defaultConfig.rawOptions : {}),\n        overrides: mergeCalendarOptions(superDef ? superDef.overrides : {}, overrideConfig ? overrideConfig.rawOptions : {}),\n    };\n}\n\nfunction parseViewConfigs(inputs) {\n    return mapHash(inputs, parseViewConfig);\n}\nfunction parseViewConfig(input) {\n    let rawOptions = typeof input === 'function' ?\n        { component: input } :\n        input;\n    let { component } = rawOptions;\n    if (rawOptions.content) {\n        component = createViewHookComponent(rawOptions.content);\n    }\n    else if (component && !(component.prototype instanceof BaseComponent)) {\n        // WHY?: people were using `component` property for `content`\n        // TODO: converge on one setting name\n        component = createViewHookComponent(component);\n    }\n    return {\n        superType: rawOptions.type,\n        component: component,\n        rawOptions, // includes type and component too :(\n    };\n}\n/*\nTODO: converge with ViewContainer\n*/\nfunction createViewHookComponent(contentGenerator) {\n    return (viewProps) => (jsx(ViewContextType.Consumer, { children: (context) => {\n            const { options, viewSpec } = context;\n            const renderProps = {\n                // the \"extra\" props, for sliceEvents...\n                ...viewProps,\n                nextDayThreshold: options.nextDayThreshold,\n                // ViewDisplayInfo...\n                ...computeViewBorderless(options),\n                options: { headerToolbar: options.headerToolbar, footerToolbar: options.footerToolbar },\n                isHeightAuto: getIsHeightAuto(options),\n                view: context.viewApi,\n            };\n            return (jsx(ContentContainer, { tag: \"div\", className: joinClassNames(generateClassName(options.viewClass, renderProps), \n                // WORKAROUND for way calendar's className would get merged into view's className\n                generateClassName(viewSpec.optionDefaults.class, renderProps), generateClassName(viewSpec.optionDefaults.className, renderProps), generateClassName(viewSpec.optionOverrides.class, renderProps), generateClassName(viewSpec.optionOverrides.className, renderProps)), renderProps: renderProps, generatorName: undefined, customGenerator: contentGenerator, didMount: options.didMount || options.viewDidMount, willUnmount: options.willUnmount || options.viewWillUnmount }));\n        } }));\n}\n\nfunction buildViewSpecs(defaultInputs, optionOverrides, dynamicOptionOverrides) {\n    let defaultConfigs = parseViewConfigs(defaultInputs);\n    let overrideConfigs = parseViewConfigs(optionOverrides.views);\n    let viewDefs = compileViewDefs(defaultConfigs, overrideConfigs);\n    return mapHash(viewDefs, (viewDef) => buildViewSpec(viewDef, overrideConfigs, optionOverrides, dynamicOptionOverrides));\n}\nfunction buildViewSpec(viewDef, overrideConfigs, optionOverrides, dynamicOptionOverrides) {\n    let durationInput = viewDef.overrides.duration ||\n        viewDef.defaults.duration ||\n        dynamicOptionOverrides.duration ||\n        optionOverrides.duration;\n    let duration = null;\n    let durationUnit = '';\n    let singleUnit = '';\n    let singleUnitOverrides = {};\n    if (durationInput) {\n        duration = createDurationCached(durationInput);\n        if (duration) { // valid?\n            let denom = greatestDurationDenominator(duration);\n            durationUnit = denom.unit;\n            if (denom.value === 1) {\n                singleUnit = durationUnit;\n                singleUnitOverrides = overrideConfigs[durationUnit] ? overrideConfigs[durationUnit].rawOptions : {};\n            }\n        }\n    }\n    return {\n        type: viewDef.type,\n        component: viewDef.component,\n        duration,\n        durationUnit,\n        singleUnit,\n        optionDefaults: viewDef.defaults,\n        optionOverrides: { ...singleUnitOverrides, ...viewDef.overrides },\n    };\n}\n// hack to get memoization working\nlet durationInputMap = {};\nfunction createDurationCached(durationInput) {\n    let json = JSON.stringify(durationInput);\n    let res = durationInputMap[json];\n    if (res === undefined) {\n        res = createDuration(durationInput);\n        durationInputMap[json] = res;\n    }\n    return res;\n}\n\nfunction reduceViewType(viewType, action) {\n    switch (action.type) {\n        case 'CHANGE_VIEW_TYPE':\n            viewType = action.viewType;\n    }\n    return viewType;\n}\n\nfunction reduceCurrentDate(currentDate, action) {\n    switch (action.type) {\n        case 'CHANGE_DATE':\n            return action.dateMarker;\n        default:\n            return currentDate;\n    }\n}\n// should be initialized once and stay constant\n// this will change too\nfunction getInitialDate(options, dateEnv, nowManager) {\n    let initialDateInput = options.initialDate;\n    // compute the initial ambig-timezone date\n    if (initialDateInput != null) {\n        return dateEnv.createMarker(initialDateInput);\n    }\n    return nowManager.getDateMarker();\n}\n\nfunction reduceDynamicOptionOverrides(dynamicOptionOverrides, action) {\n    switch (action.type) {\n        case 'SET_OPTION':\n            return { ...dynamicOptionOverrides, [action.optionName]: action.rawOptionValue };\n        default:\n            return dynamicOptionOverrides;\n    }\n}\n\nfunction reduceDateProfile(currentDateProfile, action, currentDate, nowDate, dateProfileGenerator) {\n    let dp;\n    switch (action.type) {\n        case 'CHANGE_VIEW_TYPE':\n            return dateProfileGenerator.build(action.dateMarker || currentDate, nowDate);\n        case 'CHANGE_DATE':\n            return dateProfileGenerator.build(action.dateMarker, nowDate);\n        case 'PREV':\n            dp = dateProfileGenerator.buildPrev(currentDateProfile, currentDate, nowDate);\n            if (dp.isValid) {\n                return dp;\n            }\n            break;\n        case 'NEXT':\n            dp = dateProfileGenerator.buildNext(currentDateProfile, currentDate, nowDate);\n            if (dp.isValid) {\n                return dp;\n            }\n            break;\n    }\n    return currentDateProfile;\n}\n\nfunction reduceDateSelection(currentSelection, action) {\n    switch (action.type) {\n        case 'UNSELECT_DATES':\n            return null;\n        case 'SELECT_DATES':\n            return action.selection;\n        default:\n            return currentSelection;\n    }\n}\n\nfunction reduceSelectedEvent(currentInstanceId, action) {\n    switch (action.type) {\n        case 'UNSELECT_EVENT':\n            return '';\n        case 'SELECT_EVENT':\n            return action.eventInstanceId;\n        default:\n            return currentInstanceId;\n    }\n}\n\nfunction reduceEventDrag(currentDrag, action) {\n    let newDrag;\n    switch (action.type) {\n        case 'UNSET_EVENT_DRAG':\n            return null;\n        case 'SET_EVENT_DRAG':\n            newDrag = action.state;\n            return {\n                affectedEvents: newDrag.affectedEvents,\n                mutatedEvents: newDrag.mutatedEvents,\n                isEvent: newDrag.isEvent,\n            };\n        default:\n            return currentDrag;\n    }\n}\n\nfunction reduceEventResize(currentResize, action) {\n    let newResize;\n    switch (action.type) {\n        case 'UNSET_EVENT_RESIZE':\n            return null;\n        case 'SET_EVENT_RESIZE':\n            newResize = action.state;\n            return {\n                affectedEvents: newResize.affectedEvents,\n                mutatedEvents: newResize.mutatedEvents,\n                isEvent: newResize.isEvent,\n            };\n        default:\n            return currentResize;\n    }\n}\n\nfunction parseToolbars(calendarOptions, viewSpecs, calendarApi) {\n    let header = calendarOptions.headerToolbar ? parseToolbar(calendarOptions.headerToolbar, calendarOptions, viewSpecs, calendarApi) : null;\n    let footer = calendarOptions.footerToolbar ? parseToolbar(calendarOptions.footerToolbar, calendarOptions, viewSpecs, calendarApi) : null;\n    return { header, footer };\n}\nfunction parseToolbar(sectionStrHash, calendarOptions, viewSpecs, calendarApi) {\n    let isRtl = calendarOptions.direction === 'rtl';\n    let viewsWithButtons = [];\n    let hasTitle = false;\n    function processSectionStr(sectionStr) {\n        let sectionRes = parseSection(sectionStr, calendarOptions, viewSpecs, calendarApi);\n        viewsWithButtons.push(...sectionRes.viewsWithButtons);\n        hasTitle = hasTitle || sectionRes.hasTitle;\n        return sectionRes.widgets;\n    }\n    const sectionWidgets = {\n        start: processSectionStr(sectionStrHash[isRtl ? 'right' : 'left'] || sectionStrHash.start || ''),\n        center: processSectionStr(sectionStrHash.center || ''),\n        end: processSectionStr(sectionStrHash[isRtl ? 'left' : 'right'] || sectionStrHash.end || ''),\n    };\n    return {\n        sectionWidgets,\n        viewsWithButtons,\n        hasTitle,\n    };\n}\n/*\nBAD: querying icons and text here. should be done at render time\n*/\nfunction parseSection(sectionStr, calendarOptions, viewSpecs, calendarApi) {\n    let calendarButtons = calendarOptions.buttons || {};\n    let customElements = calendarOptions.toolbarElements || {};\n    let sectionSubstrs = sectionStr ? sectionStr.split(' ') : [];\n    let viewsWithButtons = [];\n    let hasTitle = false;\n    let widgets = sectionSubstrs.map((buttonGroupStr) => (buttonGroupStr.split(',').map((name) => {\n        if (name === 'title') {\n            hasTitle = true;\n            return { name };\n        }\n        if (customElements[name]) {\n            return { name, customElement: customElements[name] };\n        }\n        let viewSpec;\n        let buttonInput = calendarButtons[name] || {};\n        let buttonText;\n        let buttonHint;\n        let buttonClick;\n        if ((viewSpec = viewSpecs[name])) {\n            viewsWithButtons.push(name);\n            const buttonTextKey = viewSpec.optionDefaults.buttonTextKey;\n            buttonText = buttonInput.text ||\n                (buttonTextKey ? calendarOptions[buttonTextKey] : '') ||\n                (viewSpec.singleUnit\n                    ? (calendarOptions[viewSpec.singleUnit + 'TextLong'] ||\n                        calendarOptions[viewSpec.singleUnit + 'Text'])\n                    : '') ||\n                name;\n            /*\n            buttons{}.hint(viewButtonText, viewName)\n            viewHint(viewButtonText, viewName)\n            */\n            buttonHint = formatWithOrdinals(buttonInput.hint || calendarOptions.viewHint, [buttonText, name], // ordinal arguments\n            buttonText);\n            buttonClick = (ev) => {\n                buttonInput?.click?.(ev);\n                if (!ev.defaultPrevented) {\n                    calendarApi.changeView(name);\n                }\n            };\n        }\n        else {\n            buttonText = buttonInput.text ||\n                calendarOptions[name + 'TextLong'] ||\n                calendarOptions[name + 'Text'] ||\n                name;\n            /*\n            buttons{}.hint(currentUnitText, currentUnit)\n            prevHint(currentUnitUnitext, currentUnit)\n            nextHint -- same\n            todayHint -- same\n            */\n            if (name === 'prevYear') {\n                buttonHint = formatWithOrdinals(buttonInput.hint || calendarOptions.prevHint, [calendarOptions.yearText, 'year'], buttonText);\n            }\n            else if (name === 'nextYear') {\n                buttonHint = formatWithOrdinals(buttonInput.hint || calendarOptions.nextHint, [calendarOptions.yearText, 'year'], buttonText);\n            }\n            else {\n                buttonHint = (currentUnit) => {\n                    return formatWithOrdinals(buttonInput.hint || calendarOptions[name + 'Hint'], // todayHint/prevHint/nextHint\n                    [\n                        calendarOptions[currentUnit + 'TextLong'] ||\n                            calendarOptions[currentUnit + 'Text'],\n                        currentUnit\n                    ], buttonText);\n                };\n            }\n            buttonClick = (ev) => {\n                buttonInput?.click?.(ev);\n                if (!ev.defaultPrevented) {\n                    calendarApi[name]?.();\n                }\n            };\n        }\n        return {\n            name,\n            isView: Boolean(viewSpec),\n            buttonText,\n            buttonHint,\n            buttonDisplay: buttonInput.display,\n            buttonIconClass: buttonInput.iconClass,\n            buttonIconContent: buttonInput.iconContent,\n            buttonClick,\n            buttonIsPrimary: buttonInput.isPrimary || false,\n            buttonClass: buttonInput.class ?? buttonInput.className,\n            buttonDidMount: buttonInput.didMount,\n            buttonWillUnmount: buttonInput.willUnmount,\n        };\n    })));\n    return { widgets, viewsWithButtons, hasTitle };\n}\n\n// always represents the current view. otherwise, it'd need to change value every time date changes\nclass ViewImpl {\n    constructor(type, getCurrentData, dateEnv) {\n        this.type = type;\n        this.getCurrentData = getCurrentData;\n        this.dateEnv = dateEnv;\n    }\n    get calendar() {\n        return this.getCurrentData().calendarApi;\n    }\n    get title() {\n        return this.getCurrentData().viewTitle;\n    }\n    get activeStart() {\n        return this.dateEnv.toDate(this.getCurrentData().dateProfile.activeRange.start);\n    }\n    get activeEnd() {\n        return this.dateEnv.toDate(this.getCurrentData().dateProfile.activeRange.end);\n    }\n    get currentStart() {\n        return this.dateEnv.toDate(this.getCurrentData().dateProfile.currentRange.start);\n    }\n    get currentEnd() {\n        return this.dateEnv.toDate(this.getCurrentData().dateProfile.currentRange.end);\n    }\n    getOption(name) {\n        return this.getCurrentData().options[name]; // are the view-specific options\n    }\n}\n\nconst DEF_DEFAULTS = {\n    startTime: '09:00',\n    endTime: '17:00',\n    daysOfWeek: [1, 2, 3, 4, 5], // monday - friday\n    display: 'inverse-background',\n    className: '', // TODO: remove\n    groupId: '_businessHours', // so multiple defs get grouped\n};\n/*\nTODO: pass around as EventDefHash!!!\n*/\nfunction parseBusinessHours(input, context) {\n    return parseEvents(refineInputs(input), null, context);\n}\nfunction refineInputs(input) {\n    let rawDefs;\n    if (input === true) {\n        rawDefs = [{}]; // will get DEF_DEFAULTS verbatim\n    }\n    else if (Array.isArray(input)) {\n        // if specifying an array, every sub-definition NEEDS a day-of-week\n        rawDefs = input.filter((rawDef) => rawDef.daysOfWeek);\n    }\n    else if (typeof input === 'object' && input) { // non-null object\n        rawDefs = [input];\n    }\n    else { // is probably false\n        rawDefs = [];\n    }\n    rawDefs = rawDefs.map((rawDef) => ({ ...DEF_DEFAULTS, ...rawDef }));\n    return rawDefs;\n}\n\n// Computes what the title at the top of the calendarApi should be for this view\nfunction buildTitle(dateProfile, viewOptions, dateEnv) {\n    let range;\n    // for views that span a large unit of time, show the proper interval, ignoring stray days before and after\n    if (/^(year|month)$/.test(dateProfile.currentRangeUnit)) {\n        range = dateProfile.currentRange;\n    }\n    else { // for day units or smaller, use the actual day range\n        range = dateProfile.activeRange;\n    }\n    let parts;\n    const options = { isEndExclusive: dateProfile.isRangeAllDay };\n    if (viewOptions.titleFormat) {\n        parts = dateEnv.formatRangeToParts(range.start, range.end, createFormatter(viewOptions.titleFormat), options);\n    }\n    else {\n        parts = dateEnv.formatRangeToParts(range.start, range.end, createFormatter(buildTitleFormat(dateProfile, viewOptions.disallowAmbigTitle, 'long')), options);\n        if (hasTwoMonths(parts)) {\n            parts = dateEnv.formatRangeToParts(range.start, range.end, createFormatter(buildTitleFormat(dateProfile, viewOptions.disallowAmbigTitle, 'short')), options);\n        }\n    }\n    return joinDateTimeFormatParts(parts);\n}\n// Generates the format string that should be used to generate the title for the current date range.\n// Attempts to compute the most appropriate format if not explicitly specified with `titleFormat`.\nfunction buildTitleFormat(dateProfile, disallowAmbigTitle, monthFormat) {\n    const { currentRangeUnit } = dateProfile;\n    if (currentRangeUnit === 'year') {\n        return { year: 'numeric' };\n    }\n    if (currentRangeUnit === 'month') {\n        return { year: 'numeric', month: monthFormat };\n    }\n    if (!disallowAmbigTitle) {\n        const days = diffWholeDays(dateProfile.currentRange.start, dateProfile.currentRange.end);\n        if (days !== null && days > 1) {\n            return {\n                year: 'numeric',\n                month: monthFormat,\n            };\n        }\n    }\n    // one day. longer, like \"September 9 2014\"\n    return { year: 'numeric', month: 'long', day: 'numeric' };\n}\nfunction hasTwoMonths(parts) {\n    let hasStartMonth = false;\n    let hasEndMonth = false;\n    for (const part of parts) {\n        if (part.type === 'month') {\n            if (part.source === 'startRange')\n                hasStartMonth = true;\n            if (part.source === 'endRange')\n                hasEndMonth = true;\n        }\n    }\n    return hasStartMonth && hasEndMonth;\n}\n\n/*\nTODO: test switching timezones when NO timezone plugin\n*/\nclass CalendarNowManager {\n    constructor() {\n        this.resetListeners = new Set();\n    }\n    handleInput(dateEnv, // will change if timezone setup changed\n    nowInput) {\n        const oldDateEnv = this.dateEnv;\n        if (dateEnv !== oldDateEnv) {\n            if (typeof nowInput === 'function') {\n                this.nowFn = nowInput;\n            }\n            else if (!oldDateEnv) { // first time?\n                // inputs that express an exact instant (ISO with offset, Date, epoch ms) keep their\n                // exact epoch (marker round-trips are ambiguous during DST folds). civil inputs\n                // resolve deterministically to the first occurrence.\n                this.nowAnchorDate = nowInput\n                    ? resolveInputToDate(nowInput, dateEnv)\n                    : new Date();\n                this.nowAnchorQueried = Date.now();\n            }\n            this.dateEnv = dateEnv;\n            // not first time? fire reset handlers\n            if (oldDateEnv) {\n                for (const resetListener of this.resetListeners.values()) {\n                    resetListener();\n                }\n            }\n        }\n    }\n    getDateMarker() {\n        return this.dateEnv.timestampToMarker(this.getEpochMs());\n    }\n    /*\n    The exact instant of \"now\". Unlike a DateMarker, unambiguous during DST transitions.\n    When `now` was supplied as a function returning a civil time, resolves deterministically.\n    */\n    getEpochMs() {\n        return this.nowAnchorDate\n            ? this.nowAnchorDate.valueOf() + (Date.now() - this.nowAnchorQueried)\n            : resolveInputToDate(this.nowFn(), this.dateEnv).valueOf();\n    }\n    addResetListener(handler) {\n        this.resetListeners.add(handler);\n    }\n    removeResetListener(handler) {\n        this.resetListeners.delete(handler);\n    }\n}\n/*\nResolves a date input to an exact-instant Date. Prefers the instant the input itself\nexpressed (unambiguous during DST folds); falls back to first-occurrence resolution.\n*/\nfunction resolveInputToDate(input, dateEnv) {\n    const meta = dateEnv.createMarkerMeta(input);\n    return meta.instantMs != null\n        ? new Date(meta.instantMs)\n        : dateEnv.toDate(meta.marker);\n}\n\nclass CalendarDataManager {\n    constructor(config) {\n        this.computeCurrentViewData = memoize(this._computeCurrentViewData);\n        this.organizeRawLocales = memoize(organizeRawLocales);\n        this.buildLocale = memoize(buildLocale);\n        this.buildPluginHooks = buildBuildPluginHooks();\n        this.buildDateEnv = memoize(buildDateEnv);\n        this.parseToolbars = memoize(parseToolbars);\n        this.buildViewSpecs = memoize(buildViewSpecs);\n        this.buildDateProfileGenerator = memoizeObjArg(buildDateProfileGenerator);\n        this.buildViewApi = memoize(buildViewApi);\n        this.buildViewUiProps = memoizeObjArg(buildViewUiProps);\n        this.buildEventUiBySource = memoize(buildEventUiBySource, isPropsEqualShallow);\n        this.buildEventUiBases = memoize(buildEventUiBases);\n        this.parseContextBusinessHours = memoizeObjArg(parseContextBusinessHours);\n        this.buildToolbarProps = memoize(buildToolbarProps);\n        this.buildTitle = memoize(buildTitle);\n        this.nowManager = new CalendarNowManager();\n        this.isDrainingActionQueue = false;\n        this.actionQueue = [];\n        this.optionOverrides = {};\n        // used by CalendarApiImpl\n        this.emitter = new Emitter();\n        this.currentCalendarOptionsRefiners = {};\n        this.currentCalendarOptionsInput = {};\n        this.currentCalendarOptionsRefined = {};\n        this.currentViewOptionsInput = {};\n        this.currentViewOptionsRefined = {};\n        this.optionsForRefining = [];\n        this.optionsForHandling = [];\n        this.getCurrentData = () => this.data;\n        this.handleNowChange = () => {\n            this.dispatch({ type: 'UPDATE_NOW' });\n        };\n        this.dispatch = (action) => {\n            this.actionQueue.push(action);\n            if (!this.isDrainingActionQueue) {\n                this.drainActionQueue();\n            }\n        };\n        this.config = config;\n        this.nowManager = new CalendarNowManager();\n        this.nowTimer = new NowTimerRunner(this.handleNowChange);\n    }\n    destroy() {\n        this.nowTimer.destroy();\n    }\n    /*\n    Will NOT trigger onDataChange unless there were other actions in the queue\n    */\n    update(optionOverrides) {\n        this.optionOverrides = optionOverrides;\n        this.actionQueue.push({ type: 'IDLE' }); // ensure reducer gets called\n        this.drainActionQueue();\n        return this.data;\n    }\n    /*\n    WILL trigger onDataChange\n    */\n    resetOptions(optionOverrides, changedOptionNames) {\n        if (changedOptionNames === undefined) {\n            this.optionOverrides = optionOverrides;\n        }\n        else {\n            this.optionOverrides = { ...this.optionOverrides, ...optionOverrides };\n            this.optionsForRefining.push(...changedOptionNames);\n        }\n        this.dispatch({ type: 'RESET_OPTIONS' });\n    }\n    drainActionQueue() {\n        let calendarContext;\n        let { state, data } = this;\n        const isInit = !state;\n        const { actionQueue } = this;\n        const actionsComplete = []; // non-idle\n        this.isDrainingActionQueue = true;\n        while (actionQueue.length) {\n            const action = actionQueue.shift();\n            ({ state, data, calendarContext } = this.reduce(state, data, action));\n            this.state = state;\n            this.data = data;\n            if (action.type !== 'IDLE') {\n                actionsComplete.push(action);\n            }\n        }\n        this.isDrainingActionQueue = false;\n        if (isInit) {\n            const controllerOption = calendarContext.options.controller;\n            if (controllerOption) {\n                controllerOption._setApi(this.config.calendarApi);\n            }\n        }\n        if (!isInit && actionsComplete.length) {\n            const { onDataChange } = this.config;\n            if (onDataChange) {\n                onDataChange(this.data, actionsComplete);\n            }\n        }\n    }\n    reduce(prevState, prevData, action) {\n        let { config } = this;\n        let isInit = !prevState;\n        // === Compute options and view data ===\n        let dynamicOptionOverrides = isInit\n            ? {}\n            : reduceDynamicOptionOverrides(prevState.dynamicOptionOverrides, action);\n        let optionsData = this.computeOptionsData(this.optionOverrides, dynamicOptionOverrides, config.calendarApi);\n        let currentViewType = isInit\n            ? (optionsData.calendarOptions.initialView || optionsData.pluginHooks.initialView)\n            : reduceViewType(prevState.currentViewType, action);\n        let currentViewData = this.computeCurrentViewData(currentViewType, optionsData, this.optionOverrides, dynamicOptionOverrides);\n        // === Wire things up ===\n        config.calendarApi.currentDataManager = this;\n        this.emitter.setThisContext(config.calendarApi);\n        this.emitter.setOptions(currentViewData.options);\n        // === Build calendarContext ===\n        let calendarContext = {\n            nowManager: this.nowManager,\n            dateEnv: optionsData.dateEnv,\n            options: optionsData.calendarOptions,\n            pluginHooks: optionsData.pluginHooks,\n            calendarApi: config.calendarApi,\n            dispatch: this.dispatch,\n            emitter: this.emitter,\n            getCurrentData: this.getCurrentData,\n        };\n        // === Update now timer ===\n        let { nowDate } = this.nowTimer.update({\n            unit: 'day',\n            unitValue: 1,\n            nowIndicatorSnap: 'auto',\n            nowManager: this.nowManager,\n            dateEnv: optionsData.dateEnv,\n        });\n        // === Compute currentDate ===\n        let currentDate = isInit\n            ? getInitialDate(optionsData.calendarOptions, optionsData.dateEnv, this.nowManager)\n            : reduceCurrentDate(prevState.currentDate, action);\n        // === Compute dateProfile ===\n        let dateProfile;\n        if (isInit) {\n            dateProfile = currentViewData.dateProfileGenerator.build(currentDate, nowDate);\n        }\n        else {\n            dateProfile = prevState.dateProfile;\n            // Check for generator change\n            if (prevData && prevData.dateProfileGenerator !== currentViewData.dateProfileGenerator) {\n                dateProfile = currentViewData.dateProfileGenerator.build(currentDate, nowDate);\n            }\n            dateProfile = reduceDateProfile(dateProfile, action, currentDate, nowDate, currentViewData.dateProfileGenerator);\n        }\n        // === Adjust currentDate if out of range ===\n        if ((action && (action.type === 'PREV' || action.type === 'NEXT')) ||\n            !rangeContainsMarker(dateProfile.activeRange, currentDate)) {\n            currentDate = dateProfile.currentRange.start;\n        }\n        // === Compute eventSources, eventStore ===\n        let eventSources = isInit\n            ? initEventSources(optionsData.calendarOptions, dateProfile, calendarContext)\n            : reduceEventSources(prevState.eventSources, action, dateProfile, calendarContext);\n        let eventStore = isInit\n            ? createEmptyEventStore()\n            : reduceEventStore(prevState.eventStore, action, eventSources, dateProfile, calendarContext);\n        // === Compute renderableEventStore ===\n        let isEventsLoading = computeEventSourcesLoading(eventSources);\n        let renderableEventStore = isInit\n            ? createEmptyEventStore()\n            : (isEventsLoading && !currentViewData.options.progressiveEventRendering)\n                ? (prevState.renderableEventStore || eventStore)\n                : eventStore;\n        // === UI computation ===\n        let { eventUiSingleBase, selectionConfig } = this.buildViewUiProps(calendarContext);\n        let eventUiBySource = this.buildEventUiBySource(eventSources);\n        let eventUiBases = isInit\n            ? {}\n            : this.buildEventUiBases(renderableEventStore.defs, eventUiSingleBase, eventUiBySource);\n        // === Build new state ===\n        let newState = {\n            dynamicOptionOverrides,\n            currentViewType,\n            currentDate,\n            dateProfile,\n            eventSources,\n            eventStore,\n            renderableEventStore,\n            selectionConfig,\n            eventUiBases,\n            businessHours: this.parseContextBusinessHours(calendarContext),\n            dateSelection: isInit ? null : reduceDateSelection(prevState.dateSelection, action),\n            eventSelection: isInit ? '' : reduceSelectedEvent(prevState.eventSelection, action),\n            eventDrag: isInit ? null : reduceEventDrag(prevState.eventDrag, action),\n            eventResize: isInit ? null : reduceEventResize(prevState.eventResize, action),\n            nowDate,\n        };\n        // === Plugin reducers ===\n        let contextAndState = { ...calendarContext, ...newState };\n        for (let reducer of optionsData.pluginHooks.reducers) {\n            Object.assign(newState, reducer(prevState, action, contextAndState));\n        }\n        // === Loading state emission ===\n        let wasLoading = prevState ? computeIsLoading(prevState, calendarContext) : false;\n        let isLoading = computeIsLoading(newState, calendarContext);\n        if (!wasLoading && isLoading) {\n            this.emitter.trigger('loading', true);\n        }\n        else if (wasLoading && !isLoading) {\n            this.emitter.trigger('loading', false);\n        }\n        // === Build CalendarData ===\n        let viewTitle = this.buildTitle(dateProfile, currentViewData.options, optionsData.dateEnv);\n        let toolbarProps = this.buildToolbarProps(currentViewData.viewSpec, dateProfile, currentViewData.dateProfileGenerator, currentDate, nowDate, viewTitle);\n        let newData = {\n            viewTitle,\n            nowManager: this.nowManager,\n            calendarApi: config.calendarApi,\n            dispatch: this.dispatch,\n            emitter: this.emitter,\n            getCurrentData: this.getCurrentData,\n            toolbarProps,\n            ...optionsData,\n            ...currentViewData,\n            ...newState,\n        };\n        // === Handle option changes ===\n        let changeHandlers = optionsData.pluginHooks.optionChangeHandlers;\n        let prevCalendarOptions = prevData && prevData.calendarOptions;\n        let newCalendarOptions = optionsData.calendarOptions;\n        if (prevCalendarOptions && prevCalendarOptions !== newCalendarOptions) {\n            if (prevCalendarOptions.timeZone !== newCalendarOptions.timeZone) {\n                // HACK\n                newState.eventSources = newData.eventSources = reduceEventSourcesNewTimeZone(newData.eventSources, dateProfile, newData);\n                newState.eventStore = newData.eventStore = rezoneEventStoreDates(newData.eventStore, prevData.dateEnv, newData.dateEnv);\n                newState.renderableEventStore = newData.renderableEventStore = rezoneEventStoreDates(newData.renderableEventStore, prevData.dateEnv, newData.dateEnv);\n            }\n            for (let optionName in changeHandlers) {\n                if (this.optionsForHandling.indexOf(optionName) !== -1 ||\n                    prevCalendarOptions[optionName] !== newCalendarOptions[optionName]) {\n                    changeHandlers[optionName](newCalendarOptions[optionName], newData);\n                }\n            }\n        }\n        this.optionsForHandling = [];\n        return { state: newState, data: newData, calendarContext };\n    }\n    computeOptionsData(optionOverrides, dynamicOptionOverrides, calendarApi) {\n        // TODO: blacklist options that are handled by optionChangeHandlers\n        if (!this.optionsForRefining.length &&\n            optionOverrides === this.stableOptionOverrides &&\n            dynamicOptionOverrides === this.stableDynamicOptionOverrides) {\n            return this.stableCalendarOptionsData;\n        }\n        let { refinedOptions, pluginHooks, localeDefaults, availableLocaleData, } = this.processRawCalendarOptions(optionOverrides, dynamicOptionOverrides);\n        let dateEnv = this.buildDateEnv(refinedOptions.timeZone, refinedOptions.locale, refinedOptions.weekNumberCalculation, refinedOptions.firstDay, refinedOptions.weekTextLong, refinedOptions.weekTextShort, pluginHooks, availableLocaleData);\n        let viewSpecs = this.buildViewSpecs(pluginHooks.views, this.stableOptionOverrides, this.stableDynamicOptionOverrides);\n        let toolbarConfig = this.parseToolbars(refinedOptions, viewSpecs, calendarApi);\n        return this.stableCalendarOptionsData = {\n            calendarOptions: refinedOptions,\n            pluginHooks,\n            dateEnv,\n            viewSpecs,\n            toolbarConfig,\n            localeDefaults,\n            availableRawLocales: availableLocaleData.map,\n        };\n    }\n    // always called from behind a memoizer\n    processRawCalendarOptions(optionOverrides, dynamicOptionOverrides) {\n        let { locales, locale } = mergeCalendarOptions(BASE_OPTION_DEFAULTS, optionOverrides, dynamicOptionOverrides);\n        let availableLocaleData = this.organizeRawLocales(locales);\n        let availableRawLocales = availableLocaleData.map;\n        let localeDefaults = this.buildLocale(locale || availableLocaleData.defaultCode, availableRawLocales).options;\n        let pluginHooks = this.buildPluginHooks(optionOverrides.plugins || [], globalPlugins);\n        let refiners = this.currentCalendarOptionsRefiners = {\n            ...BASE_OPTION_REFINERS,\n            ...CALENDAR_LISTENER_REFINERS,\n            ...CALENDAR_ONLY_OPTION_REFINERS,\n            ...pluginHooks.listenerRefiners,\n            ...pluginHooks.optionRefiners,\n        };\n        let raw = mergeCalendarOptions(BASE_OPTION_DEFAULTS, ...pluginHooks.optionDefaults, localeDefaults, filterKnownOptions(mergeCalendarOptions(optionOverrides, dynamicOptionOverrides), refiners));\n        let refined = {};\n        let currentRaw = this.currentCalendarOptionsInput;\n        let currentRefined = this.currentCalendarOptionsRefined;\n        let anyChanges = false;\n        for (let optionName in raw) {\n            if (this.optionsForRefining.indexOf(optionName) === -1 && (raw[optionName] === currentRaw[optionName] || (COMPLEX_OPTION_COMPARATORS[optionName] &&\n                (optionName in currentRaw) &&\n                COMPLEX_OPTION_COMPARATORS[optionName](currentRaw[optionName], raw[optionName])) || isMergedPropsEqual(currentRaw[optionName], raw[optionName]))) {\n                refined[optionName] = currentRefined[optionName];\n            }\n            else if (refiners[optionName]) {\n                refined[optionName] = refiners[optionName](raw[optionName], optionName);\n                anyChanges = true;\n            }\n        }\n        if (anyChanges) {\n            this.currentCalendarOptionsInput = raw;\n            this.currentCalendarOptionsRefined = refined;\n            this.stableOptionOverrides = optionOverrides;\n            this.stableDynamicOptionOverrides = dynamicOptionOverrides;\n        }\n        this.optionsForHandling.push(...this.optionsForRefining);\n        this.optionsForRefining = [];\n        return {\n            rawOptions: this.currentCalendarOptionsInput,\n            refinedOptions: this.currentCalendarOptionsRefined,\n            pluginHooks,\n            availableLocaleData,\n            localeDefaults,\n        };\n    }\n    _computeCurrentViewData(viewType, optionsData, optionOverrides, dynamicOptionOverrides) {\n        let viewSpec = optionsData.viewSpecs[viewType];\n        if (!viewSpec) {\n            throw new Error(`viewType \"${viewType}\" is not available. Please make sure you've loaded all neccessary plugins`);\n        }\n        let { refinedOptions } = this.processRawViewOptions(viewSpec, optionsData.pluginHooks, optionsData.localeDefaults, optionOverrides, dynamicOptionOverrides);\n        this.nowManager.handleInput(optionsData.dateEnv, refinedOptions.now);\n        let dateProfileGenerator = this.buildDateProfileGenerator({\n            dateProfileGeneratorClass: viewSpec.optionDefaults.dateProfileGeneratorClass,\n            duration: viewSpec.duration,\n            durationUnit: viewSpec.durationUnit,\n            usesMinMaxTime: viewSpec.optionDefaults.usesMinMaxTime,\n            dateEnv: optionsData.dateEnv,\n            calendarApi: this.config.calendarApi,\n            slotMinTime: refinedOptions.slotMinTime,\n            slotMaxTime: refinedOptions.slotMaxTime,\n            showNonCurrentDates: refinedOptions.showNonCurrentDates,\n            dayCount: refinedOptions.dayCount,\n            dateAlignment: refinedOptions.dateAlignment,\n            dateIncrement: refinedOptions.dateIncrement,\n            hiddenDays: refinedOptions.hiddenDays,\n            weekends: refinedOptions.weekends,\n            validRangeInput: refinedOptions.validRange,\n            visibleRangeInput: refinedOptions.visibleRange,\n            fixedWeekCount: refinedOptions.fixedWeekCount,\n        });\n        let viewApi = this.buildViewApi(viewType, this.getCurrentData, optionsData.dateEnv);\n        return { viewSpec, options: refinedOptions, dateProfileGenerator, viewApi };\n    }\n    processRawViewOptions(viewSpec, pluginHooks, localeDefaults, optionOverrides, dynamicOptionOverrides) {\n        let refiners = {\n            ...BASE_OPTION_REFINERS,\n            ...CALENDAR_LISTENER_REFINERS,\n            ...CALENDAR_ONLY_OPTION_REFINERS,\n            ...VIEW_ONLY_OPTION_REFINERS,\n            ...pluginHooks.listenerRefiners,\n            ...pluginHooks.optionRefiners,\n        };\n        let raw = mergeCalendarOptions(BASE_OPTION_DEFAULTS, ...pluginHooks.optionDefaults, viewSpec.optionDefaults, localeDefaults, filterKnownOptions(mergeCalendarOptions(optionOverrides, viewSpec.optionOverrides, dynamicOptionOverrides), refiners));\n        let refined = {};\n        let currentRaw = this.currentViewOptionsInput;\n        let currentRefined = this.currentViewOptionsRefined;\n        let anyChanges = false;\n        for (let optionName in raw) {\n            if (raw[optionName] === currentRaw[optionName] || (COMPLEX_OPTION_COMPARATORS[optionName] &&\n                COMPLEX_OPTION_COMPARATORS[optionName](raw[optionName], currentRaw[optionName])) || isMergedPropsEqual(currentRaw[optionName], raw[optionName])) {\n                refined[optionName] = currentRefined[optionName];\n            }\n            else {\n                if (raw[optionName] === this.currentCalendarOptionsInput[optionName] ||\n                    (COMPLEX_OPTION_COMPARATORS[optionName] &&\n                        COMPLEX_OPTION_COMPARATORS[optionName](raw[optionName], this.currentCalendarOptionsInput[optionName]))) {\n                    if (optionName in this.currentCalendarOptionsRefined) { // might be an \"extra\" prop\n                        refined[optionName] = this.currentCalendarOptionsRefined[optionName];\n                    }\n                }\n                else if (refiners[optionName]) {\n                    refined[optionName] = refiners[optionName](raw[optionName], optionName);\n                }\n                anyChanges = true;\n            }\n        }\n        if (anyChanges) {\n            this.currentViewOptionsInput = raw;\n            this.currentViewOptionsRefined = refined;\n        }\n        return {\n            rawOptions: this.currentViewOptionsInput,\n            refinedOptions: this.currentViewOptionsRefined,\n        };\n    }\n}\nfunction buildDateEnv(timeZone, explicitLocale, weekNumberCalculation, firstDay, weekTextLong, weekTextShort, pluginHooks, availableLocaleData) {\n    let locale = buildLocale(explicitLocale || availableLocaleData.defaultCode, availableLocaleData.map);\n    return new DateEnv({\n        calendarSystem: 'gregory', // TODO: make this a setting\n        timeZone,\n        locale,\n        weekNumberCalculation,\n        firstDay,\n        weekTextLong,\n        weekTextShort,\n        cmdFormatter: pluginHooks.cmdFormatter,\n    });\n}\nfunction buildDateProfileGenerator(props) {\n    let DateProfileGeneratorClass = props.dateProfileGeneratorClass || DateProfileGenerator;\n    return new DateProfileGeneratorClass(props);\n}\nfunction buildViewApi(type, getCurrentData, dateEnv) {\n    return new ViewImpl(type, getCurrentData, dateEnv);\n}\nfunction buildEventUiBySource(eventSources) {\n    return mapHash(eventSources, (eventSource) => eventSource.ui);\n}\n/*\nThe result of this is processed by compileEventUi\n*/\nfunction buildEventUiBases(eventDefs, eventUiSingleBase, eventUiBySource) {\n    let eventUiBases = {\n        '': eventUiSingleBase, // fallback\n    };\n    for (let defId in eventDefs) {\n        let def = eventDefs[defId];\n        if (def.sourceId && eventUiBySource[def.sourceId]) {\n            eventUiBases[defId] = eventUiBySource[def.sourceId];\n        }\n    }\n    return eventUiBases;\n}\nfunction buildViewUiProps(calendarContext) {\n    const { options } = calendarContext;\n    return {\n        eventUiSingleBase: createEventUi({\n            display: options.eventDisplay,\n            editable: options.editable, // without \"event\" at start\n            startEditable: options.eventStartEditable,\n            durationEditable: options.eventDurationEditable,\n            constraint: options.eventConstraint,\n            overlap: typeof options.eventOverlap === 'boolean' ? options.eventOverlap : undefined,\n            allow: options.eventAllow,\n            // color: options.eventColor, // StandardEvent/BgEvent will handle this\n            // contrastColor: options.eventContrastColor, // StandardEvent/BgEvent will handle this\n            // className: options.eventClass // render hook will handle this\n        }, calendarContext),\n        selectionConfig: createEventUi({\n            constraint: options.selectConstraint,\n            overlap: typeof options.selectOverlap === 'boolean' ? options.selectOverlap : undefined,\n            allow: options.selectAllow,\n        }, calendarContext),\n    };\n}\nfunction computeIsLoading(state, context) {\n    for (let isLoadingFunc of context.pluginHooks.isLoadingFuncs) {\n        if (isLoadingFunc(state)) {\n            return true;\n        }\n    }\n    return false;\n}\nfunction parseContextBusinessHours(calendarContext) {\n    return parseBusinessHours(calendarContext.options.businessHours, calendarContext);\n}\nconst warnedUnknownOptions = {};\nfunction filterKnownOptions(options, optionRefiners) {\n    const knownOptions = {};\n    for (const optionName in options) {\n        if (optionRefiners[optionName]) {\n            knownOptions[optionName] = options[optionName];\n        }\n        else if (!warnedUnknownOptions[optionName]) {\n            warn(`Unknown option \\`${optionName}\\`.`);\n            warnedUnknownOptions[optionName] = true;\n        }\n    }\n    return knownOptions;\n}\nfunction buildToolbarProps(viewSpec, dateProfile, dateProfileGenerator, currentDate, nowDate, title) {\n    // don't force any date-profiles to valid date profiles (the `false`) so that we can tell if it's invalid\n    let todayInfo = dateProfileGenerator.build(nowDate, nowDate, undefined, /* forceToValid = */ false);\n    let prevInfo = dateProfileGenerator.buildPrev(dateProfile, currentDate, nowDate, /* forceToValid = */ false);\n    let nextInfo = dateProfileGenerator.buildNext(dateProfile, currentDate, nowDate, /* forceToValid = */ false);\n    return {\n        title,\n        selectedButton: viewSpec.type,\n        navUnit: viewSpec.singleUnit,\n        isTodayEnabled: todayInfo.isValid && !rangeContainsMarker(dateProfile.currentRange, nowDate),\n        isPrevEnabled: prevInfo.isValid,\n        isNextEnabled: nextInfo.isValid,\n    };\n}\n\nclass CalendarApiImpl {\n    getCurrentData() {\n        return this.currentDataManager.getCurrentData();\n    }\n    dispatch(action) {\n        this.currentDataManager.dispatch(action);\n    }\n    get view() { return this.getCurrentData().viewApi; }\n    batchRendering(callback) {\n        callback();\n    }\n    // Options\n    // -----------------------------------------------------------------------------------------------------------------\n    setOption(name, val) {\n        this.dispatch({\n            type: 'SET_OPTION',\n            optionName: name,\n            rawOptionValue: val,\n        });\n    }\n    getOption(name) {\n        return this.currentDataManager.currentCalendarOptionsInput[name];\n    }\n    getAvailableLocaleCodes() {\n        return Object.keys(this.getCurrentData().availableRawLocales);\n    }\n    // Trigger\n    // -----------------------------------------------------------------------------------------------------------------\n    on(handlerName, handler) {\n        let { currentDataManager } = this;\n        if (currentDataManager.currentCalendarOptionsRefiners[handlerName]) {\n            currentDataManager.emitter.on(handlerName, handler);\n        }\n        else {\n            warn(`Unknown listener \\`${handlerName}\\`.`);\n        }\n    }\n    off(handlerName, handler) {\n        this.currentDataManager.emitter.off(handlerName, handler);\n    }\n    // not meant for public use\n    trigger(handlerName, ...args) {\n        this.currentDataManager.emitter.trigger(handlerName, ...args);\n    }\n    // View\n    // -----------------------------------------------------------------------------------------------------------------\n    changeView(viewType, dateOrRange) {\n        this.batchRendering(() => {\n            this.unselect();\n            if (dateOrRange) {\n                if (dateOrRange.start && dateOrRange.end) { // a range\n                    this.dispatch({\n                        type: 'CHANGE_VIEW_TYPE',\n                        viewType,\n                    });\n                    this.dispatch({\n                        type: 'SET_OPTION',\n                        optionName: 'visibleRange',\n                        rawOptionValue: dateOrRange,\n                    });\n                }\n                else {\n                    let { dateEnv } = this.getCurrentData();\n                    this.dispatch({\n                        type: 'CHANGE_VIEW_TYPE',\n                        viewType,\n                        dateMarker: dateEnv.createMarker(dateOrRange),\n                    });\n                }\n            }\n            else {\n                this.dispatch({\n                    type: 'CHANGE_VIEW_TYPE',\n                    viewType,\n                });\n            }\n        });\n    }\n    // Forces navigation to a view for the given date.\n    // `viewType` can be a specific view name or a generic one like \"week\" or \"day\".\n    // needs to change\n    zoomTo(dateMarker, viewType) {\n        let state = this.getCurrentData();\n        let spec;\n        viewType = viewType || 'day'; // day is default zoom\n        spec = state.viewSpecs[viewType] || this.getUnitViewSpec(viewType);\n        this.unselect();\n        if (spec) {\n            this.dispatch({\n                type: 'CHANGE_VIEW_TYPE',\n                viewType: spec.type,\n                dateMarker,\n            });\n        }\n        else {\n            this.dispatch({\n                type: 'CHANGE_DATE',\n                dateMarker,\n            });\n        }\n    }\n    // Given a duration singular unit, like \"week\" or \"day\", finds a matching view spec.\n    // Preference is given to views that have corresponding buttons.\n    getUnitViewSpec(unit) {\n        let { viewSpecs, toolbarConfig } = this.getCurrentData();\n        let viewTypes = [].concat(toolbarConfig.header ? toolbarConfig.header.viewsWithButtons : [], toolbarConfig.footer ? toolbarConfig.footer.viewsWithButtons : []);\n        let i;\n        let spec;\n        for (let viewType in viewSpecs) {\n            viewTypes.push(viewType);\n        }\n        for (i = 0; i < viewTypes.length; i += 1) {\n            spec = viewSpecs[viewTypes[i]];\n            if (spec) {\n                if (spec.singleUnit === unit) {\n                    return spec;\n                }\n            }\n        }\n        return null;\n    }\n    // Current Date\n    // -----------------------------------------------------------------------------------------------------------------\n    prev() {\n        this.unselect();\n        this.dispatch({ type: 'PREV' });\n    }\n    next() {\n        this.unselect();\n        this.dispatch({ type: 'NEXT' });\n    }\n    prevYear() {\n        let state = this.getCurrentData();\n        this.unselect();\n        this.dispatch({\n            type: 'CHANGE_DATE',\n            dateMarker: state.dateEnv.addYears(state.currentDate, -1),\n        });\n    }\n    nextYear() {\n        let state = this.getCurrentData();\n        this.unselect();\n        this.dispatch({\n            type: 'CHANGE_DATE',\n            dateMarker: state.dateEnv.addYears(state.currentDate, 1),\n        });\n    }\n    today() {\n        let state = this.getCurrentData();\n        this.unselect();\n        this.dispatch({\n            type: 'CHANGE_DATE',\n            dateMarker: state.nowManager.getDateMarker(),\n        });\n    }\n    gotoDate(zonedDateInput) {\n        let state = this.getCurrentData();\n        this.unselect();\n        this.dispatch({\n            type: 'CHANGE_DATE',\n            dateMarker: state.dateEnv.createMarker(zonedDateInput),\n        });\n    }\n    incrementDate(deltaInput) {\n        let state = this.getCurrentData();\n        let delta = createDuration(deltaInput);\n        if (delta) { // else, warn about invalid input?\n            this.unselect();\n            this.dispatch({\n                type: 'CHANGE_DATE',\n                dateMarker: state.dateEnv.add(state.currentDate, delta),\n            });\n        }\n    }\n    getDate() {\n        let state = this.getCurrentData();\n        return state.dateEnv.toDate(state.currentDate);\n    }\n    // Date Formatting Utils\n    // -----------------------------------------------------------------------------------------------------------------\n    formatDate(d, formatter) {\n        let { dateEnv } = this.getCurrentData();\n        let dateMeta = dateEnv.createMarkerMeta(d);\n        return joinDateTimeFormatParts(dateEnv.formatToParts(dateMeta.marker, createFormatter(formatter), { instantMs: dateMeta.instantMs }));\n    }\n    // `settings` is for formatter AND isEndExclusive\n    formatRange(d0, d1, settings) {\n        let { dateEnv } = this.getCurrentData();\n        let startMeta = dateEnv.createMarkerMeta(d0);\n        let endMeta = dateEnv.createMarkerMeta(d1);\n        return joinDateTimeFormatParts(dateEnv.formatRangeToParts(startMeta.marker, endMeta.marker, createFormatter(settings), {\n            isEndExclusive: settings.isEndExclusive,\n            startInstantMs: startMeta.instantMs,\n            endInstantMs: endMeta.instantMs,\n        }));\n    }\n    formatIso(d, omitTime) {\n        let { dateEnv } = this.getCurrentData();\n        return dateEnv.formatIso(dateEnv.createMarker(d), { omitTime });\n    }\n    // Date Selection / Event Selection / DayClick\n    // -----------------------------------------------------------------------------------------------------------------\n    select(dateOrObj, endDate) {\n        let selectionInput;\n        if (endDate == null) {\n            if (dateOrObj.start != null) {\n                selectionInput = dateOrObj;\n            }\n            else {\n                selectionInput = {\n                    start: dateOrObj,\n                    end: null,\n                };\n            }\n        }\n        else {\n            selectionInput = {\n                start: dateOrObj,\n                end: endDate,\n            };\n        }\n        let state = this.getCurrentData();\n        let selection = parseDateSpan(selectionInput, state.dateEnv, createDuration({ days: 1 }));\n        if (selection) { // throw parse error otherwise?\n            this.dispatch({ type: 'SELECT_DATES', selection });\n            triggerDateSelect(selection, null, state);\n        }\n    }\n    unselect(pev) {\n        let state = this.getCurrentData();\n        if (state.dateSelection) {\n            this.dispatch({ type: 'UNSELECT_DATES' });\n            triggerDateUnselect(pev, state);\n        }\n    }\n    // Public Events API\n    // -----------------------------------------------------------------------------------------------------------------\n    addEvent(eventInput, sourceInput) {\n        if (eventInput instanceof EventImpl) {\n            let def = eventInput._def;\n            let instance = eventInput._instance;\n            let currentData = this.getCurrentData();\n            // not already present? don't want to add an old snapshot\n            if (!currentData.eventStore.defs[def.defId]) {\n                this.dispatch({\n                    type: 'ADD_EVENTS',\n                    eventStore: eventTupleToStore({ def, instance }), // TODO: better util for two args?\n                });\n                this.triggerEventAdd(eventInput);\n            }\n            return eventInput;\n        }\n        let state = this.getCurrentData();\n        let eventSource;\n        if (sourceInput instanceof EventSourceImpl) {\n            eventSource = sourceInput.internalEventSource;\n        }\n        else if (typeof sourceInput === 'boolean') {\n            if (sourceInput) { // true. part of the first event source\n                [eventSource] = hashValuesToArray(state.eventSources);\n            }\n        }\n        else if (sourceInput != null) { // an ID. accepts a number too\n            let sourceApi = this.getEventSourceById(sourceInput); // TODO: use an internal function\n            if (!sourceApi) {\n                warn(`Unknown event source ID \\`${sourceInput}\\`.`); // TODO: test\n                return null;\n            }\n            eventSource = sourceApi.internalEventSource;\n        }\n        let tuple = parseEvent(eventInput, eventSource, state, false);\n        if (tuple) {\n            let newEventApi = new EventImpl(state, tuple.def, tuple.def.recurringDef ? null : tuple.instance);\n            this.dispatch({\n                type: 'ADD_EVENTS',\n                eventStore: eventTupleToStore(tuple),\n            });\n            this.triggerEventAdd(newEventApi);\n            return newEventApi;\n        }\n        return null;\n    }\n    triggerEventAdd(eventApi) {\n        let { emitter } = this.getCurrentData();\n        emitter.trigger('eventAdd', {\n            event: eventApi,\n            relatedEvents: [],\n            revert: () => {\n                this.dispatch({\n                    type: 'REMOVE_EVENTS',\n                    eventStore: eventApiToStore(eventApi),\n                });\n            },\n        });\n    }\n    // TODO: optimize\n    getEventById(id) {\n        let state = this.getCurrentData();\n        let { defs, instances } = state.eventStore;\n        id = String(id);\n        for (let defId in defs) {\n            let def = defs[defId];\n            if (def.publicId === id) {\n                if (def.recurringDef) {\n                    return new EventImpl(state, def, null);\n                }\n                for (let instanceId in instances) {\n                    let instance = instances[instanceId];\n                    if (instance.defId === def.defId) {\n                        return new EventImpl(state, def, instance);\n                    }\n                }\n            }\n        }\n        return null;\n    }\n    getEvents() {\n        let currentData = this.getCurrentData();\n        return buildEventApis(currentData.eventStore, currentData);\n    }\n    removeAllEvents() {\n        this.dispatch({ type: 'REMOVE_ALL_EVENTS' });\n    }\n    // Public Event Sources API\n    // -----------------------------------------------------------------------------------------------------------------\n    getEventSources() {\n        let state = this.getCurrentData();\n        let sourceHash = state.eventSources;\n        let sourceApis = [];\n        for (let internalId in sourceHash) {\n            sourceApis.push(new EventSourceImpl(state, sourceHash[internalId]));\n        }\n        return sourceApis;\n    }\n    getEventSourceById(id) {\n        let state = this.getCurrentData();\n        let sourceHash = state.eventSources;\n        id = String(id);\n        for (let sourceId in sourceHash) {\n            if (sourceHash[sourceId].publicId === id) {\n                return new EventSourceImpl(state, sourceHash[sourceId]);\n            }\n        }\n        return null;\n    }\n    addEventSource(sourceInput) {\n        let state = this.getCurrentData();\n        if (sourceInput instanceof EventSourceImpl) {\n            // not already present? don't want to add an old snapshot\n            if (!state.eventSources[sourceInput.internalEventSource.sourceId]) {\n                this.dispatch({\n                    type: 'ADD_EVENT_SOURCES',\n                    sources: [sourceInput.internalEventSource],\n                });\n            }\n            return sourceInput;\n        }\n        let eventSource = parseEventSource(sourceInput, state);\n        if (eventSource) { // TODO: error otherwise?\n            this.dispatch({ type: 'ADD_EVENT_SOURCES', sources: [eventSource] });\n            return new EventSourceImpl(state, eventSource);\n        }\n        return null;\n    }\n    removeAllEventSources() {\n        this.dispatch({ type: 'REMOVE_ALL_EVENT_SOURCES' });\n    }\n    refetchEvents() {\n        this.dispatch({ type: 'FETCH_EVENT_SOURCES', isRefetch: true });\n    }\n    // Scroll\n    // -----------------------------------------------------------------------------------------------------------------\n    scrollToTime(timeInput) {\n        let time = createDuration(timeInput);\n        if (time) {\n            this.trigger('_timeScrollRequest', time);\n        }\n    }\n    // Button State\n    // -----------------------------------------------------------------------------------------------------------------\n    getButtonState() {\n        const currentData = this.getCurrentData();\n        const { toolbarProps } = currentData;\n        const options = currentData.calendarOptions;\n        const buttonConfigs = options.buttons || {};\n        const viewSpecs = currentData.viewSpecs;\n        const currentUnit = currentData.viewSpec.singleUnit;\n        const currentHintOrdinal = [\n            currentUnit ? getSingleUnitText(currentUnit, options) : '',\n            currentUnit,\n        ];\n        const buttonState = {\n            today: {\n                text: options.todayText,\n                hint: formatWithOrdinals(options.todayHint, currentHintOrdinal, options.todayText),\n                isDisabled: !toolbarProps.isTodayEnabled,\n            },\n            prev: {\n                text: options.prevText,\n                hint: formatWithOrdinals(options.prevHint, currentHintOrdinal, options.prevText),\n                isDisabled: !toolbarProps.isPrevEnabled,\n            },\n            next: {\n                text: options.nextText,\n                hint: formatWithOrdinals(options.nextHint, currentHintOrdinal, options.nextText),\n                isDisabled: !toolbarProps.isNextEnabled,\n            },\n            prevYear: {\n                text: options.prevYearText,\n                hint: formatWithOrdinals(options.prevHint, [options.yearText, 'year'], options.prevYearText),\n                isDisabled: false,\n            },\n            nextYear: {\n                text: options.prevYearText,\n                hint: formatWithOrdinals(options.nextHint, [options.yearText, 'year'], options.nextYearText),\n                isDisabled: false,\n            },\n        };\n        for (const viewSpecName in viewSpecs) {\n            const viewSpec = viewSpecs[viewSpecName];\n            const { singleUnit } = viewSpec;\n            const buttonTextKey = viewSpec.optionDefaults.buttonTextKey;\n            const buttonText = buttonConfigs[viewSpecName]?.text ||\n                (buttonTextKey ? options[buttonTextKey] : '') ||\n                (singleUnit ? getSingleUnitText(singleUnit, options) : '') ||\n                viewSpecName;\n            const buttonHint = formatWithOrdinals(options.viewHint, [buttonText, viewSpecName], // ordinal arguments\n            buttonText);\n            buttonState[viewSpecName] = {\n                text: buttonText,\n                hint: buttonHint,\n            };\n        }\n        return buttonState;\n    }\n}\nfunction getSingleUnitText(singleUnit, options) {\n    return options[singleUnit + 'TextLong'] || options[singleUnit + 'Text'];\n}\n\nclass CalendarMediaRoot extends Component {\n    constructor() {\n        super(...arguments);\n        this.state = {\n            forPrint: false,\n        };\n        this.handleBeforePrint = () => {\n            // The synchronous commit mounts print-only DOM during this beforeprint\n            // task. Watchers registering during the bracket measure immediately, and\n            // their layout recomputations settle in one batched drain before the\n            // native event returns.\n            flushSyncWithSizeBatching(() => {\n                this.setState({ forPrint: true });\n            });\n        };\n        this.handleAfterPrint = () => {\n            // No synchronous commit needed: nothing else listens to _afterprint, and\n            // the ordinary microtask-batched re-render restores the screen DOM before\n            // the next paint. Screen watchers keep their async-first measurement.\n            this.setState({ forPrint: false });\n        };\n    }\n    render() {\n        return this.props?.children(this.state.forPrint);\n    }\n    componentDidMount() {\n        const { props } = this;\n        const { emitter } = props;\n        emitter.on('_beforeprint', this.handleBeforePrint);\n        emitter.on('_afterprint', this.handleAfterPrint);\n    }\n    componentWillUnmount() {\n        const { props } = this;\n        const { emitter } = props;\n        emitter.off('_beforeprint', this.handleBeforePrint);\n        emitter.off('_afterprint', this.handleAfterPrint);\n    }\n}\nfunction computeRootClassName(options, forPrint) {\n    let borderlessX = options.borderlessX ?? options.borderless;\n    let borderlessTop = options.borderlessTop ?? options.borderless;\n    let borderlessBottom = options.borderlessBottom ?? options.borderless;\n    const calendarDisplayData = {\n        borderlessX: Boolean(borderlessX),\n        borderlessTop: Boolean(borderlessTop),\n        borderlessBottom: Boolean(borderlessBottom),\n    };\n    return joinClassNames(generateClassName(options.class, calendarDisplayData), generateClassName(options.className, calendarDisplayData), classNames.borderBoxRoot, classNames.isolate, classNames.flexCol, forPrint ? classNames.calendarPrintRoot : classNames.calendarScreenRoot);\n}\n\nclass ButtonIcon extends BaseComponent {\n    render() {\n        const { contentGenerator, className } = this.props;\n        if (contentGenerator) {\n            // TODO: somehow give className to the svg?\n            return (jsx(ContentContainer, { tag: 'span', style: { display: 'contents' }, attrs: { 'aria-hidden': true }, renderProps: {}, generatorName: undefined, customGenerator: contentGenerator }));\n        }\n        if (className !== undefined) {\n            return (jsx(\"span\", { \"aria-hidden\": true, className: className }));\n        }\n    }\n}\n\nclass ToolbarSection extends BaseComponent {\n    render() {\n        let { props } = this;\n        let { options } = this.context;\n        let children = props.widgetGroups.map((widgetGroup) => this.renderWidgetGroup(widgetGroup));\n        return createElement('div', {\n            className: generateClassName(options.toolbarSectionClass, { name: props.name }),\n        }, ...children);\n    }\n    renderWidgetGroup(widgetGroup) {\n        let { props, context } = this;\n        let { options } = context;\n        let children = [];\n        let isOnlyButtons = true;\n        let isOnlyView = true;\n        for (const widget of widgetGroup) {\n            const { name, isView } = widget;\n            if (name === 'title') {\n                isOnlyButtons = false;\n            }\n            else if (!isView) {\n                isOnlyView = false;\n            }\n        }\n        for (let widget of widgetGroup) {\n            let { name, customElement, buttonHint } = widget;\n            if (name === 'title') {\n                children.push(jsx(\"div\", { role: 'heading', \"aria-level\": options.headingLevel, id: props.titleId, className: joinClassNames(options.toolbarTitleClass), children: props.title }));\n            }\n            else if (customElement) {\n                children.push(jsx(ContentContainer, { tag: 'span', style: { display: 'contents' }, renderProps: {}, generatorName: undefined, customGenerator: customElement }));\n            }\n            else {\n                let isSelected = name === props.selectedButton;\n                let isDisabled = (!props.isTodayEnabled && name === 'today') ||\n                    (!props.isPrevEnabled && name === 'prev') ||\n                    (!props.isNextEnabled && name === 'next');\n                let buttonDisplay = widget.buttonDisplay ?? options.buttonDisplay;\n                if (buttonDisplay === 'auto') {\n                    buttonDisplay = (widget.buttonIconContent || widget.buttonIconClass)\n                        ? 'icon'\n                        : 'text';\n                }\n                let iconNode;\n                if (buttonDisplay !== 'text') {\n                    iconNode = (jsx(ButtonIcon, { className: widget.buttonIconClass, contentGenerator: widget.buttonIconContent }));\n                }\n                let inGroup = widgetGroup.length > 1 && isOnlyButtons;\n                let buttonGroup = inGroup ? { hasSelection: isOnlyView } : null;\n                let renderProps = {\n                    name,\n                    text: widget.buttonText,\n                    isPrimary: widget.buttonIsPrimary,\n                    isSelected,\n                    isDisabled,\n                    isIconOnly: buttonDisplay === 'icon',\n                    buttonGroup,\n                };\n                children.push(jsx(ContentContainer, { tag: 'button', attrs: {\n                        type: 'button',\n                        disabled: isDisabled,\n                        ...((isOnlyButtons && isOnlyView)\n                            ? { 'role': 'tab', 'aria-selected': isSelected }\n                            : { 'aria-pressed': isSelected }),\n                        'aria-label': typeof buttonHint === 'function'\n                            ? buttonHint(props.navUnit)\n                            : buttonHint,\n                        onClick: widget.buttonClick,\n                    }, className: joinClassNames(generateClassName(options.buttonClass, renderProps), !isDisabled && classNames.cursorPointer, inGroup && joinClassNames(isSelected ? classNames.z1 : classNames.z0, classNames.focusZ2)), renderProps: renderProps, generatorName: undefined, classNameGenerator: widget.buttonClass, didMount: widget.buttonDidMount, willUnmount: widget.buttonWillUnmount, children: () => (buttonDisplay === 'text'\n                        ? widget.buttonText\n                        : buttonDisplay === 'icon'\n                            ? iconNode\n                            : buttonDisplay === 'icon-text'\n                                ? (jsxs(Fragment, { children: [iconNode, widget.buttonText] }))\n                                : (jsxs(Fragment, { children: [widget.buttonText, iconNode] })) // text-icon\n                    ) }));\n            }\n        }\n        if (children.length > 1) {\n            return createElement('div', {\n                role: (isOnlyButtons && isOnlyView) ? 'tablist' : undefined,\n                'aria-label': (isOnlyButtons && isOnlyView) ? options.viewChangeHint : undefined,\n                className: joinClassNames(generateClassName(options.buttonGroupClass, { hasSelection: isOnlyView }), classNames.isolate),\n            }, ...children);\n        }\n        return children[0];\n    }\n}\n\nclass Toolbar extends BaseComponent {\n    render() {\n        let { props } = this;\n        let options = this.context.options;\n        let { sectionWidgets } = props.model;\n        const { borderlessX, borderlessTop, borderlessBottom } = computeViewBorderless(options);\n        const toolbarClassOption = props.isHeader ? options.headerToolbarClass : options.footerToolbarClass;\n        return (jsxs(\"div\", { className: joinClassNames(generateClassName(toolbarClassOption, { borderlessX, borderlessTop, borderlessBottom }), generateClassName(options.toolbarClass, { borderlessX, borderlessTop, borderlessBottom })), children: [this.renderSection('start', sectionWidgets.start), this.renderSection('center', sectionWidgets.center), this.renderSection('end', sectionWidgets.end)] }));\n    }\n    renderSection(name, widgetGroups) {\n        let { props } = this;\n        return (jsx(ToolbarSection, { name: name, widgetGroups: widgetGroups, title: props.title, titleId: props.titleId, navUnit: props.navUnit, selectedButton: props.selectedButton, isTodayEnabled: props.isTodayEnabled, isPrevEnabled: props.isPrevEnabled, isNextEnabled: props.isNextEnabled }, name));\n    }\n}\n\n/*\nDetects when the user clicks on an event within a DateComponent\n*/\nclass EventClicking extends Interaction {\n    constructor(settings) {\n        super(settings);\n        this.handleSegClick = (ev, segEl) => {\n            let { component } = this;\n            let { context } = component;\n            let eventRange = getElEventRange(segEl);\n            if (eventRange && // might be the <div> surrounding the more link\n                component.isValidSegDownEl(ev.target)) {\n                context.emitter.trigger('eventClick', {\n                    el: segEl,\n                    event: new EventImpl(component.context, eventRange.def, eventRange.instance),\n                    jsEvent: ev, // Is this always a mouse event? See #4655\n                    view: context.viewApi,\n                });\n            }\n        };\n        this.destroy = listenBySelector(settings.el, 'click', `.${classNames.internalEvent}`, // on both fg and bg events\n        this.handleSegClick);\n    }\n}\n\n/*\nTriggers events and adds/removes core classNames when the user's pointer\nenters/leaves event-elements of a component.\n*/\nclass EventHovering extends Interaction {\n    constructor(settings) {\n        super(settings);\n        // for simulating an eventMouseLeave when the event el is destroyed while mouse is over it\n        this.handleEventElRemove = (el) => {\n            if (el === this.currentSegEl) {\n                this.handleSegLeave(null, this.currentSegEl);\n            }\n        };\n        this.handleSegEnter = (ev, segEl) => {\n            if (getElEventRange(segEl)) { // TODO: better way to make sure not hovering over more+ link or its wrapper\n                this.currentSegEl = segEl;\n                this.triggerEvent('eventMouseEnter', ev, segEl);\n            }\n        };\n        this.handleSegLeave = (ev, segEl) => {\n            if (this.currentSegEl) {\n                this.currentSegEl = null;\n                this.triggerEvent('eventMouseLeave', ev, segEl);\n            }\n        };\n        this.removeHoverListeners = listenToHoverBySelector(settings.el, `.${classNames.internalEvent}`, // on both fg and bg events\n        this.handleSegEnter, this.handleSegLeave);\n    }\n    destroy() {\n        this.removeHoverListeners();\n    }\n    triggerEvent(publicEvName, ev, segEl) {\n        let { component } = this;\n        let { context } = component;\n        let eventRange = getElEventRange(segEl);\n        if (!ev || component.isValidSegDownEl(ev.target)) {\n            context.emitter.trigger(publicEvName, {\n                el: segEl,\n                event: new EventImpl(context, eventRange.def, eventRange.instance),\n                jsEvent: ev, // Is this always a mouse event? See #4655\n                view: context.viewApi,\n            });\n        }\n    }\n}\n\nclass CalendarInner extends PureComponent {\n    constructor() {\n        super(...arguments);\n        this.buildViewContext = memoize(buildViewContext);\n        this.buildViewPropTransformers = memoize(buildViewPropTransformers);\n        this.interactionsStore = {};\n        this.calendarInteractions = [];\n        this.registerInteractiveComponent = (component, settingsInput) => {\n            let settings = parseInteractionSettings(component, settingsInput);\n            let DEFAULT_INTERACTIONS = [\n                EventClicking,\n                EventHovering,\n            ];\n            let interactionClasses = DEFAULT_INTERACTIONS;\n            if (!settingsInput.disableHits) {\n                interactionClasses = interactionClasses.concat(this.props.pluginHooks.componentInteractions);\n            }\n            let interactions = interactionClasses.map((TheInteractionClass) => new TheInteractionClass(settings));\n            this.interactionsStore[component.uid] = interactions;\n            interactionSettingsStore[component.uid] = settings;\n        };\n        this.unregisterInteractiveComponent = (component) => {\n            let listeners = this.interactionsStore[component.uid];\n            if (listeners) {\n                for (let listener of listeners) {\n                    listener.destroy();\n                }\n                delete this.interactionsStore[component.uid];\n            }\n            delete interactionSettingsStore[component.uid];\n        };\n    }\n    get viewTitleId() {\n        return this.props.baseId + 'title';\n    }\n    render() {\n        const { props } = this;\n        let { toolbarConfig, options } = props;\n        let viewHeight;\n        let viewHeightLiquid = false;\n        let viewAspectRatio;\n        if (props.forPrint || getIsHeightAuto(options)) ;\n        else if (options.height != null) {\n            viewHeightLiquid = true;\n        }\n        else if (options.contentHeight != null) {\n            viewHeight = options.contentHeight;\n        }\n        else {\n            viewAspectRatio = Math.max(options.aspectRatio, 0.5); // prevent from getting too tall\n        }\n        let viewContext = this.buildViewContext(props.viewSpec, props.viewApi, props.options, props.dateProfileGenerator, props.dateEnv, props.nowManager, props.pluginHooks, props.dispatch, props.getCurrentData, props.emitter, props.calendarApi, props.baseId, this.registerInteractiveComponent, this.unregisterInteractiveComponent);\n        return (jsxs(ViewContextType.Provider, { value: viewContext, children: [toolbarConfig.header && (jsx(Toolbar, { model: toolbarConfig.header, isHeader: true, titleId: this.viewTitleId, ...props.toolbarProps })), jsxs(\"div\", { className: joinClassNames(classNames.flexCol, classNames.rel, \n                    // prevents browsers' \"scroll anchoring behavior\", which cause scroll thrashing\n                    // when clicking \"Next\" for month-view, because rows would flex-grow while other rows\n                    // temporarily removed. This behavior probably universally unhelpful for our uses,\n                    // esp with virtualization, but maybe in future put on more specific row-based parents\n                    classNames.overflowAnchorNone, \n                    // workaround for Safari pushing content area extremely wide after returning from\n                    // print-view. probably a good idea regardless, to circumvent 'auto' dimentions\n                    classNames.minHeight0, viewHeightLiquid && classNames.liquid), style: {\n                        height: viewHeight,\n                        aspectRatio: viewAspectRatio != null ? String(viewAspectRatio) : undefined,\n                    }, children: [this.renderView(joinClassNames((viewHeightLiquid || viewHeight) && classNames.liquid, viewAspectRatio != null && classNames.fill, classNames.internalView)), this.buildAppendContent()] }), toolbarConfig.footer && (jsx(Toolbar, { model: toolbarConfig.footer, isHeader: false, ...props.toolbarProps }))] }));\n    }\n    renderView(className) {\n        const { props } = this;\n        const { pluginHooks, viewSpec, toolbarConfig, toolbarProps } = props;\n        let viewProps = {\n            className,\n            dateProfile: props.dateProfile,\n            businessHours: props.businessHours,\n            eventStore: props.renderableEventStore, // !\n            eventUiBases: props.eventUiBases,\n            dateSelection: props.dateSelection,\n            eventSelection: props.eventSelection,\n            eventDrag: props.eventDrag,\n            eventResize: props.eventResize,\n            forPrint: props.forPrint,\n            labelId: toolbarConfig.header && toolbarConfig.header.hasTitle ? this.viewTitleId : undefined,\n            labelStr: toolbarConfig.header && toolbarConfig.header.hasTitle ? undefined : toolbarProps.title,\n        };\n        let transformers = this.buildViewPropTransformers(pluginHooks.viewPropsTransformers);\n        let contentProps = {\n            ...props,\n            toolbarProps,\n            forPrint: props.forPrint,\n        };\n        for (let transformer of transformers) {\n            Object.assign(viewProps, transformer.transform(viewProps, contentProps));\n        }\n        let ViewComponent = viewSpec.component;\n        return (jsx(ViewComponent, { ...viewProps }));\n    }\n    buildAppendContent() {\n        const { props } = this;\n        return (jsx(Fragment, { children: props.pluginHooks.viewContainerAppends.map((buildAppendContent, i) => (jsx(Fragment$1, { children: buildAppendContent(props) }, i))) }));\n    }\n    // BE AWARE React StrictMode might execute this twice\n    componentDidMount() {\n        const { props } = this;\n        this.calendarInteractions = props.pluginHooks.calendarInteractions\n            .map((CalendarInteractionClass) => new CalendarInteractionClass(props));\n        let { propSetHandlers } = props.pluginHooks;\n        for (let propName in propSetHandlers) {\n            propSetHandlers[propName](props[propName], props);\n        }\n        // call contextInit\n        for (let callback of props.pluginHooks.contextInit) {\n            callback(props);\n        }\n    }\n    componentDidUpdate(prevProps) {\n        const { props } = this;\n        let { propSetHandlers } = props.pluginHooks;\n        for (let propName in propSetHandlers) {\n            if (props[propName] !== prevProps[propName]) {\n                propSetHandlers[propName](props[propName], props);\n            }\n        }\n    }\n    // BE AWARE React StrictMode might execute this twice\n    componentWillUnmount() {\n        const { props } = this;\n        for (let interaction of this.calendarInteractions) {\n            interaction.destroy();\n        }\n        this.calendarInteractions = [];\n        // will likely undo what was done by contextInit\n        props.emitter.trigger('_unmount');\n    }\n}\nfunction buildViewPropTransformers(theClasses) {\n    return theClasses.map((TheClass) => new TheClass());\n}\n\nexport { CalendarApiImpl as C, CalendarMediaRoot as a, CalendarInner as b, computeRootClassName as c, CalendarDataManager as d, parseBusinessHours as p };\n","import { jsx } from 'preact/jsx-runtime';\nimport { flushSync } from 'preact/compat';\nimport { createRoot } from 'preact/compat/client';\nimport { C as CalendarApiImpl, a as CalendarMediaRoot, c as computeRootClassName, b as CalendarInner, d as CalendarDataManager } from './0b82b05c.js';\nimport { g as guid } from './d7fd1889.js';\nimport { R as RenderId, D as DelayedRunner } from './2f45deb4.js';\nimport { a as applyStyleProp } from './18d26d90.js';\nimport { Fragment } from 'preact';\n\n/*\nVanilla JS API\n*/\nclass Calendar extends CalendarApiImpl {\n    constructor(el, optionOverrides = {}) {\n        super();\n        this.baseId = `fc:${guid()}:`;\n        this.isRendering = false;\n        this.isRendered = false;\n        this.customContentRenderId = 0;\n        this.currentClassName = '';\n        this.currentColorScheme = '';\n        this.handleDataChange = (data, actions) => {\n            this.currentData = data;\n            let renderImmediate = false;\n            for (const action of actions) {\n                if (action.type === 'SET_EVENT_DRAG' ||\n                    action.type === 'UNSET_EVENT_DRAG' ||\n                    action.type === 'SET_EVENT_RESIZE' ||\n                    action.type === 'UNSET_EVENT_RESIZE' ||\n                    // could happen as a result of a drag or resize and must be part of same sync pipeline\n                    action.type === 'MERGE_EVENTS') {\n                    renderImmediate = true;\n                    break;\n                }\n            }\n            this.renderRunner.request(renderImmediate ? undefined : data.calendarOptions.rerenderDelay);\n        };\n        this.handleRenderRequest = () => {\n            if (this.isRendering) {\n                let { currentData } = this;\n                this.isRendered = true;\n                flushSync(() => {\n                    this.vdomRoot.render(jsx(Fragment, { children: jsx(RenderId.Provider, { value: this.customContentRenderId, children: jsx(CalendarMediaRoot, { emitter: currentData.emitter, children: (forPrint) => {\n                                    const options = currentData.calendarOptions;\n                                    const isRtl = options.direction === 'rtl';\n                                    const className = computeRootClassName(options, forPrint);\n                                    this.setIsRtl(isRtl);\n                                    this.setClassName(className);\n                                    this.setHeight(options.height);\n                                    this.setColorScheme(options.colorScheme || '');\n                                    return (jsx(CalendarInner, { ...currentData, forPrint: forPrint, baseId: this.baseId }));\n                                } }) }) }));\n                });\n            }\n            else if (this.isRendered) {\n                this.isRendered = false;\n                this.vdomRoot.unmount();\n                this.setIsRtl(false);\n                this.setClassName('');\n                this.setHeight('');\n                this.setColorScheme('');\n            }\n        };\n        this.el = el;\n        this.vdomRoot = createRoot(el);\n        this.renderRunner = new DelayedRunner(this.handleRenderRequest);\n        this.dataManager = new CalendarDataManager({\n            calendarApi: this,\n            onDataChange: this.handleDataChange,\n        });\n        this.currentData = this.dataManager.update(optionOverrides);\n    }\n    render() {\n        let wasRendering = this.isRendering;\n        if (!wasRendering) {\n            this.isRendering = true;\n        }\n        else {\n            this.customContentRenderId += 1;\n        }\n        this.renderRunner.request();\n    }\n    destroy() {\n        if (this.isRendering) {\n            this.isRendering = false;\n            this.renderRunner.request();\n        }\n        this.dataManager.destroy();\n    }\n    batchRendering(func) {\n        this.renderRunner.pause('batchRendering');\n        func();\n        this.renderRunner.resume('batchRendering');\n    }\n    pauseRendering() {\n        this.renderRunner.pause('pauseRendering');\n    }\n    resumeRendering() {\n        this.renderRunner.resume('pauseRendering', true);\n    }\n    resetOptions(optionOverrides, changedOptionNames) {\n        this.currentDataManager.resetOptions(optionOverrides, changedOptionNames);\n    }\n    setClassName(className) {\n        if (className !== this.currentClassName) {\n            let { classList } = this.el;\n            for (let singleClassName of this.currentClassName.split(' ')) {\n                if (singleClassName) {\n                    classList.remove(singleClassName);\n                }\n            }\n            for (let singleClassName of className.split(' ')) {\n                if (singleClassName) {\n                    classList.add(singleClassName);\n                }\n            }\n            this.currentClassName = className;\n        }\n    }\n    setHeight(height) {\n        applyStyleProp(this.el, 'height', height);\n    }\n    setColorScheme(colorScheme) {\n        if (colorScheme !== this.currentColorScheme) {\n            if (colorScheme) {\n                this.el.dataset.colorScheme = colorScheme;\n            }\n            else {\n                delete this.el.dataset.colorScheme;\n            }\n            this.currentColorScheme = colorScheme;\n        }\n    }\n    setIsRtl(isRtl) {\n        if (isRtl) {\n            this.el.dir = 'rtl';\n        }\n        else {\n            this.el.removeAttribute('dir');\n        }\n    }\n}\n\nexport { Calendar as C };\n","function pointInsideRect(point, rect) {\n    return point.left >= rect.left &&\n        point.left < rect.right &&\n        point.top >= rect.top &&\n        point.top < rect.bottom;\n}\n// Returns a new rectangle that is the intersection of the two rectangles. If they don't intersect, returns false\nfunction intersectRects(rect1, rect2) {\n    let res = {\n        left: Math.max(rect1.left, rect2.left),\n        right: Math.min(rect1.right, rect2.right),\n        top: Math.max(rect1.top, rect2.top),\n        bottom: Math.min(rect1.bottom, rect2.bottom),\n    };\n    if (res.left < res.right && res.top < res.bottom) {\n        return res;\n    }\n    return false;\n}\n// Returns a new point that will have been moved to reside within the given rectangle\nfunction constrainPoint(point, rect) {\n    return {\n        left: Math.min(Math.max(point.left, rect.left), rect.right),\n        top: Math.min(Math.max(point.top, rect.top), rect.bottom),\n    };\n}\n// Returns a point that is the center of the given rectangle\nfunction getRectCenter(rect) {\n    return {\n        left: (rect.left + rect.right) / 2,\n        top: (rect.top + rect.bottom) / 2,\n    };\n}\n// Subtracts point2's coordinates from point1's coordinates, returning a delta\nfunction diffPoints(point1, point2) {\n    return {\n        left: point1.left - point2.left,\n        top: point1.top - point2.top,\n    };\n}\n\nfunction computeEdges(el, getPadding = false) {\n    let computedStyle = window.getComputedStyle(el);\n    let borderLeft = parseInt(computedStyle.borderLeftWidth, 10) || 0;\n    let borderRight = parseInt(computedStyle.borderRightWidth, 10) || 0;\n    let borderTop = parseInt(computedStyle.borderTopWidth, 10) || 0;\n    let borderBottom = parseInt(computedStyle.borderBottomWidth, 10) || 0;\n    let badScrollbarWidths = computeScrollbarWidthsForEl(el); // includes border!\n    let scrollbarLeftRight = badScrollbarWidths.y - borderLeft - borderRight;\n    let scrollbarBottom = badScrollbarWidths.x - borderTop - borderBottom;\n    let res = {\n        borderLeft,\n        borderRight,\n        borderTop,\n        borderBottom,\n        scrollbarBottom,\n        scrollbarLeft: 0,\n        scrollbarRight: 0,\n    };\n    if (computedStyle.direction === 'rtl') {\n        res.scrollbarLeft = scrollbarLeftRight;\n    }\n    else {\n        res.scrollbarRight = scrollbarLeftRight;\n    }\n    if (getPadding) {\n        res.paddingLeft = parseInt(computedStyle.paddingLeft, 10) || 0;\n        res.paddingRight = parseInt(computedStyle.paddingRight, 10) || 0;\n        res.paddingTop = parseInt(computedStyle.paddingTop, 10) || 0;\n        res.paddingBottom = parseInt(computedStyle.paddingBottom, 10) || 0;\n    }\n    return res;\n}\nfunction computeInnerRect(el, goWithinPadding = false, doFromWindowViewport) {\n    let outerRect = doFromWindowViewport ? el.getBoundingClientRect() : computeRect(el);\n    let edges = computeEdges(el, goWithinPadding);\n    let res = {\n        left: outerRect.left + edges.borderLeft + edges.scrollbarLeft,\n        right: outerRect.right - edges.borderRight - edges.scrollbarRight,\n        top: outerRect.top + edges.borderTop,\n        bottom: outerRect.bottom - edges.borderBottom - edges.scrollbarBottom,\n    };\n    if (goWithinPadding) {\n        res.left += edges.paddingLeft;\n        res.right -= edges.paddingRight;\n        res.top += edges.paddingTop;\n        res.bottom -= edges.paddingBottom;\n    }\n    return res;\n}\nfunction computeRect(el) {\n    let rect = el.getBoundingClientRect();\n    return {\n        left: rect.left + window.scrollX,\n        top: rect.top + window.scrollY,\n        right: rect.right + window.scrollX,\n        bottom: rect.bottom + window.scrollY,\n    };\n}\n/*\nReturns relative to viewport origin\n*/\nfunction computeClippedClientRect(el) {\n    let clippingParents = getClippingParents(el);\n    let rect = el.getBoundingClientRect();\n    for (let clippingParent of clippingParents) {\n        let intersection = intersectRects(rect, clippingParent.getBoundingClientRect());\n        if (intersection) {\n            rect = intersection;\n        }\n        else {\n            return null;\n        }\n    }\n    return rect;\n}\n// does not return window\nfunction getClippingParents(el) {\n    let parents = [];\n    while (el instanceof HTMLElement) { // will stop when gets to document or null\n        let computedStyle = window.getComputedStyle(el);\n        if (computedStyle.position === 'fixed') {\n            break;\n        }\n        if ((/(auto|scroll)/).test(computedStyle.overflow + computedStyle.overflowY + computedStyle.overflowX)) {\n            parents.push(el);\n        }\n        el = el.parentNode;\n    }\n    return parents;\n}\n// WARNING: will include border\nfunction computeScrollbarWidthsForEl(el) {\n    return {\n        x: el.offsetHeight - el.clientHeight,\n        y: el.offsetWidth - el.clientWidth,\n    };\n}\n\nexport { constrainPoint as a, getClippingParents as b, computeRect as c, diffPoints as d, computeInnerRect as e, computeClippedClientRect as f, getRectCenter as g, computeEdges as h, intersectRects as i, pointInsideRect as p };\n","import { intersectRanges, addMs, addDays, rangeContainsMarker, formatDayString, joinDateTimeFormatParts, diffDays } from '@full-ui/headless-calendar';\nimport { X as expandRecurring, s as sliceEventStore, an as fabricateEventRange, g as guid, u as EventImpl, M as setElEventRange, A as formatWithOrdinals, L as createAriaClickAttrs, e as createFormatter, ao as flatArray, ae as buildRangeEdgeOutput, ah as sortEventSegs, ai as getEventRangeMeta, ap as buildEventRangeKey, aq as flatMapArray } from './d7fd1889.js';\nimport { m as memoize, i as getDateMeta, j as buildDateStr, o as buildNavLinkAttrs, W as WEEKDAY_ONLY_FORMAT, B as BaseComponent, q as watchWidth, s as setRef, g as generateClassName, C as ContentContainer, w as watchHeight, e as DateComponent, l as findWeekdayText, n as findDayNumberText, t as findMonthText, c as getIsHeightAuto, p as afterSize, r as renderText$1, k as StandardEvent, u as watchSize, a as memoizeObjArg, v as isDimsEqual } from './2f45deb4.js';\nimport { i as isMajorUnit, c as computeMajorUnit } from './4ddf07a5.js';\nimport { jsx, jsxs, Fragment } from 'preact/jsx-runtime';\nimport { createRef, Component, createPortal, createElement } from 'preact/compat';\nimport { j as joinClassNames } from './d74440d5.js';\nimport { c as classNames } from './0b389a37.js';\nimport { b as getEventTargetViaRoot, c as computeElIsRtl, g as getAppendableRoot, d as applyStyle } from './18d26d90.js';\nimport { f as computeClippedClientRect } from './72e3cc3d.js';\n\nclass Slicer {\n    constructor() {\n        this.sliceBusinessHours = memoize(this._sliceBusinessHours);\n        this.sliceDateSelection = memoize(this._sliceDateSpan);\n        this.sliceEventStore = memoize(this._sliceEventStore);\n        this.sliceEventDrag = memoize(this._sliceInteraction);\n        this.sliceEventResize = memoize(this._sliceInteraction);\n        this.forceDayIfListItem = false; // hack\n    }\n    intersectDateSpan(dateSpan, activeRange, ...extraArgs) {\n        const activeDateSpanRange = intersectRanges(dateSpan.range, activeRange);\n        if (activeDateSpanRange) {\n            const slicedDateSpan = { ...dateSpan, range: activeDateSpanRange };\n            if (activeDateSpanRange.start.valueOf() !== dateSpan.range.start.valueOf()) {\n                delete slicedDateSpan.instantStartMs;\n            }\n            if (activeDateSpanRange.end.valueOf() !== dateSpan.range.end.valueOf()) {\n                delete slicedDateSpan.instantEndMs;\n            }\n            return slicedDateSpan;\n        }\n        return null;\n    }\n    sliceDateSpan(dateSpan, ...extraArgs) {\n        return this.sliceRange(dateSpan.range, ...extraArgs);\n    }\n    sliceProps(props, dateProfile, nextDayThreshold, context, ...extraArgs) {\n        let { eventUiBases } = props;\n        let eventSegs = this.sliceEventStore(props.eventStore, eventUiBases, dateProfile, nextDayThreshold, ...extraArgs);\n        return {\n            dateSelectionSegs: this.sliceDateSelection(props.dateSelection, dateProfile, nextDayThreshold, eventUiBases, context, ...extraArgs),\n            businessHourSegs: this.sliceBusinessHours(props.businessHours, dateProfile, nextDayThreshold, context, ...extraArgs),\n            fgEventSegs: eventSegs.fg,\n            bgEventSegs: eventSegs.bg,\n            eventDrag: this.sliceEventDrag(props.eventDrag, eventUiBases, dateProfile, nextDayThreshold, ...extraArgs),\n            eventResize: this.sliceEventResize(props.eventResize, eventUiBases, dateProfile, nextDayThreshold, ...extraArgs),\n            eventSelection: props.eventSelection,\n        }; // TODO: give interactionSegs?\n    }\n    sliceNowDate(// does not memoize\n    date, dateProfile, nextDayThreshold, context, ...extraArgs) {\n        return this._sliceDateSpan({ range: { start: date, end: addMs(date, 1) }, allDay: false }, // add 1 ms, protect against null range\n        dateProfile, nextDayThreshold, {}, context, ...extraArgs);\n    }\n    _sliceBusinessHours(businessHours, dateProfile, nextDayThreshold, context, ...extraArgs) {\n        if (!businessHours) {\n            return [];\n        }\n        return this._sliceEventStore(expandRecurring(businessHours, computeActiveRange(dateProfile, Boolean(nextDayThreshold)), context), {}, dateProfile, nextDayThreshold, ...extraArgs).bg;\n    }\n    _sliceEventStore(eventStore, eventUiBases, dateProfile, nextDayThreshold, ...extraArgs) {\n        if (eventStore) {\n            let rangeRes = sliceEventStore(eventStore, eventUiBases, computeActiveRange(dateProfile, Boolean(nextDayThreshold)), nextDayThreshold);\n            return {\n                bg: this.sliceEventRanges(rangeRes.bg, extraArgs),\n                fg: this.sliceEventRanges(rangeRes.fg, extraArgs),\n            };\n        }\n        return { bg: [], fg: [] };\n    }\n    _sliceInteraction(interaction, eventUiBases, dateProfile, nextDayThreshold, ...extraArgs) {\n        if (!interaction) {\n            return null;\n        }\n        let rangeRes = sliceEventStore(interaction.mutatedEvents, eventUiBases, computeActiveRange(dateProfile, Boolean(nextDayThreshold)), nextDayThreshold);\n        return {\n            segs: this.sliceEventRanges(rangeRes.fg, extraArgs),\n            affectedInstances: interaction.affectedEvents.instances,\n            isEvent: interaction.isEvent,\n        };\n    }\n    _sliceDateSpan(dateSpan, dateProfile, nextDayThreshold, eventUiBases, context, ...extraArgs) {\n        if (!dateSpan) {\n            return [];\n        }\n        let activeRange = computeActiveRange(dateProfile, Boolean(nextDayThreshold));\n        let slicedDateSpan = this.intersectDateSpan(dateSpan, activeRange, ...extraArgs);\n        if (slicedDateSpan) {\n            dateSpan = slicedDateSpan;\n            let eventRange = fabricateEventRange(dateSpan, eventUiBases, context);\n            let segs = this.sliceDateSpan(dateSpan, ...extraArgs);\n            for (let seg of segs) {\n                seg.eventRange = eventRange;\n            }\n            return segs;\n        }\n        return [];\n    }\n    /*\n    \"complete\" seg means it has component and eventRange\n    */\n    sliceEventRanges(eventRanges, extraArgs) {\n        let segs = [];\n        for (let eventRange of eventRanges) {\n            segs.push(...this.sliceEventRange(eventRange, extraArgs));\n        }\n        return segs;\n    }\n    /*\n    \"complete\" seg means it has component and eventRange\n    */\n    sliceEventRange(eventRange, extraArgs) {\n        let dateRange = eventRange.range;\n        // hack to make multi-day events that are being force-displayed as list-items to take up only one day\n        if (this.forceDayIfListItem && eventRange.ui.display === 'list-item') {\n            dateRange = {\n                start: dateRange.start,\n                end: addDays(dateRange.start, 1),\n            };\n        }\n        let segs = this.sliceRange(dateRange, ...extraArgs); // !!!\n        for (let seg of segs) {\n            seg.eventRange = eventRange;\n            seg.isStart = eventRange.isStart && seg.isStart;\n            seg.isEnd = eventRange.isEnd && seg.isEnd;\n        }\n        return segs;\n    }\n}\n/*\nfor incorporating slotMinTime/slotMaxTime if appropriate\nTODO: should be part of DateProfile!\nTimelineDateProfile already does this btw\n*/\nfunction computeActiveRange(dateProfile, isComponentAllDay) {\n    let range = dateProfile.activeRange;\n    if (isComponentAllDay) {\n        return range;\n    }\n    return {\n        start: addMs(range.start, dateProfile.slotMinTime.milliseconds),\n        end: addMs(range.end, dateProfile.slotMaxTime.milliseconds - 864e5), // 864e5 = ms in a day\n    };\n}\n\nclass DayTableModel {\n    constructor(daySeries, breakOnWeeks, dateEnv, majorUnit = '', activeRange) {\n        this.daySeries = daySeries;\n        this.dateEnv = dateEnv;\n        this.majorUnit = majorUnit;\n        this.activeRange = activeRange;\n        let { dates } = daySeries;\n        let daysPerRow;\n        let firstDay;\n        let rowCount;\n        if (breakOnWeeks) {\n            // count columns until the day-of-week repeats\n            firstDay = dates[0].getUTCDay();\n            for (daysPerRow = 1; daysPerRow < dates.length; daysPerRow += 1) {\n                if (dates[daysPerRow].getUTCDay() === firstDay) {\n                    break;\n                }\n            }\n            rowCount = Math.ceil(dates.length / daysPerRow);\n        }\n        else {\n            rowCount = 1;\n            daysPerRow = dates.length;\n        }\n        this.rowCount = rowCount;\n        this.colCount = daysPerRow;\n        this.cellRows = this.buildCells();\n        this.headerDates = this.buildHeaderDates();\n    }\n    buildCells() {\n        let rows = [];\n        for (let row = 0; row < this.rowCount; row += 1) {\n            let cells = [];\n            for (let col = 0; col < this.colCount; col += 1) {\n                cells.push(this.buildCell(row, col));\n            }\n            rows.push(cells);\n        }\n        return rows;\n    }\n    buildCell(row, col) {\n        let date = this.daySeries.dates[row * this.colCount + col];\n        return {\n            key: date.toISOString(),\n            date,\n            isMajor: this.cellIsMajor(date),\n            isDisabled: this.activeRange === null || (this.activeRange !== undefined && !rangeContainsMarker(this.activeRange, date)),\n        };\n    }\n    cellIsMajor(dateMarker) {\n        return this.majorUnit ? isMajorUnit(dateMarker, this.majorUnit, this.dateEnv) : false;\n    }\n    buildHeaderDates() {\n        let dates = [];\n        for (let col = 0; col < this.colCount; col += 1) {\n            dates.push(this.cellRows[0][col].date);\n        }\n        return dates;\n    }\n}\nfunction buildDayGridRanges(seriesRange, daysPerRow) {\n    let ranges = [];\n    if (seriesRange) {\n        const { start, end } = seriesRange;\n        let index = start;\n        while (index < end) {\n            let row = Math.floor(index / daysPerRow);\n            let nextIndex = Math.min((row + 1) * daysPerRow, end);\n            ranges.push({\n                row,\n                start: index % daysPerRow,\n                end: (nextIndex - 1) % daysPerRow + 1,\n                isStart: seriesRange.isStart && index === start,\n                isEnd: seriesRange.isEnd && nextIndex === end,\n            });\n            index = nextIndex;\n        }\n    }\n    return ranges;\n}\n\nclass DayTableSlicer extends Slicer {\n    constructor() {\n        super(...arguments);\n        this.forceDayIfListItem = true;\n    }\n    sliceRange(dateRange, dayTableModel) {\n        return buildDayGridRanges(dayTableModel.daySeries.sliceRange(dateRange), dayTableModel.colCount);\n    }\n}\nclass DaySeriesSlicer extends Slicer {\n    constructor() {\n        super(...arguments);\n        this.forceDayIfListItem = true;\n    }\n    sliceRange(dateRange, daySeries) {\n        return buildDayGridRanges(daySeries.sliceRange(dateRange), daySeries.cnt);\n    }\n}\n\n// TODO: converge types with DayTableCell and DayCellContainer (the component) and refineRenderProps\n// the generation of DayTableCell will be distinct (for the BODY cells)\n// but can share some of the same types/utils\n// Date Cells\n// -------------------------------------------------------------------------------------------------\nconst firstSunday = new Date(259200000);\nfunction buildDateRowConfigs(dates, datesRepDistinctDays, dateProfile, todayRange, dayHeaderFormat, // TODO: rename to dateHeaderFormat?\ncontext) {\n    const rowConfig = buildDateRowConfig(dates, datesRepDistinctDays, dateProfile, todayRange, dayHeaderFormat, context);\n    const majorUnit = computeMajorUnit(dateProfile, context.dateEnv);\n    // HACK mutate isMajor\n    // Skip 'day' majorUnit: when each header cell IS a day, every cell would match,\n    // so there's no meaningful boundary to highlight (unlike timeline slots which can be sub-day).\n    if (datesRepDistinctDays && majorUnit !== 'day') {\n        for (const dataConfig of rowConfig.dataConfigs) {\n            if (isMajorUnit(dataConfig.dateMarker, majorUnit, context.dateEnv)) {\n                dataConfig.renderProps.isMajor = true;\n            }\n        }\n    }\n    return [rowConfig];\n}\n/*\nShould this receive resource data attributes?\nOr ResourceApi object itself?\n*/\nfunction buildDateRowConfig(dateMarkers, datesRepDistinctDays, dateProfile, todayRange, dayHeaderFormat, // TODO: rename to dateHeaderFormat?\ncontext, colSpan, isMajorMod, totalDateCnt) {\n    return {\n        isDateRow: true,\n        renderConfig: buildDateRenderConfig(dayHeaderFormat, datesRepDistinctDays, context),\n        dataConfigs: buildDateDataConfigs(dateMarkers, datesRepDistinctDays, dateProfile, todayRange, dayHeaderFormat, context, colSpan, undefined, undefined, undefined, undefined, isMajorMod, totalDateCnt)\n    };\n}\n/*\nFor header cells: how to connect w/ custom rendering\nApplies to all cells in a row\n*/\nfunction buildDateRenderConfig(dayHeaderFormat, datesRepDistinctDays, context) {\n    const { options } = context;\n    return {\n        generatorName: 'dayHeaderContent',\n        customGenerator: options.dayHeaderContent,\n        classNameGenerator: options.dayHeaderClass,\n        innerClassNameGenerator: options.dayHeaderInnerClass,\n        didMount: options.dayHeaderDidMount,\n        willUnmount: options.dayHeaderWillUnmount,\n        align: options.dayHeaderAlign,\n        sticky: options._dayHeaderSticky,\n        dayHeaderFormat,\n        datesRepDistinctDays,\n    };\n}\nconst dowDates = [];\nfor (let dow = 0; dow < 7; dow++) {\n    dowDates.push(addDays(new Date(259200000), dow)); // start with Sun, 04 Jan 1970 00:00:00 GMT)\n}\n/*\nFor header cells: data\n*/\nfunction buildDateDataConfigs(dateMarkers, datesRepDistinctDays, dateProfile, todayRange, dayHeaderFormat, // TODO: rename to dateHeaderFormat?\ncontext, colSpan = 1, keyPrefix = '', extraRenderProps = {}, // TODO\nextraAttrs = {}, // TODO\nclassName = '', isMajorMod, \n// how many dates the VIEW has, which is only different when a caller renders a subset:\n// resource views build one date row per resource, and per-date filtering can drop dates\n// that have no resources. nav links key off the view's count, not the subset's\ntotalDateCnt = dateMarkers.length) {\n    const { dateEnv, viewApi, options } = context;\n    return datesRepDistinctDays\n        ? dateMarkers.map((dateMarker, i) => {\n            const dateMeta = getDateMeta(dateMarker, dateEnv, dateProfile, todayRange);\n            const isMajor = isMajorMod != null && !(i % isMajorMod);\n            const hasNavLink = options.navLinks && !dateMeta.isDisabled &&\n                totalDateCnt > 1; // don't show navlink to day if only one day\n            const renderProps = {\n                ...dateMeta,\n                ...extraRenderProps,\n                isMajor,\n                isSticky: false, // HACK. gets overridden\n                inPopover: false,\n                hasNavLink,\n                view: viewApi,\n            };\n            const fullDateStr = buildDateStr(context, dateMarker);\n            // for DayGridHeaderCell\n            return {\n                key: keyPrefix + dateMarker.toUTCString(),\n                dateMarker,\n                renderProps,\n                attrs: {\n                    ...(dateMeta.isToday ? { 'aria-current': 'date' } : {}), // TODO: assign undefined for nonexistent\n                    'data-date': formatDayString(dateMarker),\n                    ...extraAttrs,\n                },\n                // navlink is already labeled. otherwise, a11yText read instead\n                innerAttrs: hasNavLink\n                    ? buildNavLinkAttrs(context, dateMarker, undefined, fullDateStr, \n                    /* isTabbable = */ true, \n                    /* omitHint = */ true)\n                    : undefined,\n                a11yText: hasNavLink ? undefined : fullDateStr,\n                colSpan,\n                hasNavLink,\n                className,\n            };\n        })\n        : dateMarkers.map((dateMarker, i) => {\n            const dow = dateMarker.getUTCDay();\n            const normDate = addDays(firstSunday, dow);\n            const dateMeta = {\n                date: dateEnv.toDate(dateMarker),\n                dow,\n                isDisabled: false,\n                isFuture: false,\n                isPast: false,\n                isToday: false,\n                isOther: false,\n            };\n            const isMajor = isMajorMod != null && !(i % isMajorMod);\n            const renderProps = {\n                ...dateMeta,\n                date: dowDates[dow],\n                isMajor,\n                isSticky: false, // HACK. gets overridden\n                inPopover: false,\n                hasNavLink: false,\n                view: viewApi,\n                ...extraRenderProps,\n            };\n            const fullWeekDayStr = joinDateTimeFormatParts(dateEnv.formatToParts(normDate, WEEKDAY_ONLY_FORMAT));\n            // for DayGridHeaderCell\n            return {\n                key: keyPrefix + String(dow),\n                dateMarker,\n                renderProps,\n                attrs: extraAttrs,\n                // NOT a navlink\n                a11yText: fullWeekDayStr,\n                colSpan,\n                className,\n            };\n        });\n}\n\n/*\nTODO: make API where createRefMap() called\n*/\nclass RefMap {\n    constructor(masterCallback, ignoreDeletes = false) {\n        this.masterCallback = masterCallback;\n        this.ignoreDeletes = ignoreDeletes;\n        this.rev = '';\n        this.current = new Map();\n        this.callbacks = new Map;\n        this.handleValue = (val, key) => {\n            let { current, callbacks } = this;\n            let priorExists = current.has(key);\n            let priorVal = priorExists ? current.get(key) : null;\n            let anyChange = false;\n            // null signals deletion\n            if (val === null) {\n                if (priorExists && !this.ignoreDeletes) {\n                    current.delete(key);\n                    callbacks.delete(key);\n                    anyChange = true;\n                }\n            }\n            else {\n                anyChange = priorVal !== val;\n                current.set(key, val);\n            }\n            if (anyChange) {\n                this.rev = guid();\n                if (this.masterCallback) {\n                    this.masterCallback(val, key, priorVal);\n                }\n            }\n        };\n    }\n    createRef(key) {\n        let refCallback = this.callbacks.get(key);\n        if (!refCallback) {\n            refCallback = (val) => {\n                this.handleValue(val, key);\n            };\n            this.callbacks.set(key, refCallback);\n        }\n        return refCallback;\n    }\n}\n\nclass Ruler extends BaseComponent {\n    constructor() {\n        super(...arguments);\n        this.elRef = createRef();\n    }\n    render() {\n        return (jsx(\"div\", { ref: this.elRef }));\n    }\n    componentDidMount() {\n        this._isUnmounting = false;\n        const { props } = this;\n        const el = this.elRef.current;\n        this.disconnectWidth = watchWidth(el, (width) => {\n            if (this._isUnmounting)\n                return;\n            setRef(props.widthRef, width);\n        });\n    }\n    componentWillUnmount() {\n        this._isUnmounting = true;\n        this.disconnectWidth();\n        const { props } = this;\n        if (props.widthRef) {\n            setRef(props.widthRef, null);\n        }\n    }\n}\n\n/** Identifies a DayGrid seg by event instance and start, remaining stable if its end changes. */\nfunction getDayGridSegKey(seg) {\n    return `${seg.eventRange.instance.instanceId}:${seg.start}`;\n}\n// DayGridRange utils (TODO: move)\n// -------------------------------------------------------------------------------------------------\nfunction splitSegsByRow(segs, rowCount) {\n    const byRow = [];\n    for (let row = 0; row < rowCount; row++) {\n        byRow[row] = [];\n    }\n    for (const seg of segs) {\n        byRow[seg.row].push(seg);\n    }\n    return byRow;\n}\nfunction splitInteractionByRow(ui, rowCount) {\n    const byRow = [];\n    if (!ui) {\n        for (let row = 0; row < rowCount; row++) {\n            byRow[row] = null;\n        }\n    }\n    else {\n        for (let row = 0; row < rowCount; row++) {\n            byRow[row] = {\n                affectedInstances: ui.affectedInstances,\n                isEvent: ui.isEvent,\n                segs: [],\n            };\n        }\n        for (const seg of ui.segs) {\n            byRow[seg.row].segs.push(seg);\n        }\n    }\n    return byRow;\n}\n\nclass BgEvent extends BaseComponent {\n    constructor() {\n        super(...arguments);\n        // memo\n        this.buildPublicEvent = memoize((context, eventDef, eventInstance) => new EventImpl(context, eventDef, eventInstance));\n        this.handleEl = (el) => {\n            this.el = el;\n            if (el) {\n                setElEventRange(el, this.props.eventRange);\n            }\n        };\n    }\n    render() {\n        const { props, context } = this;\n        const { eventRange } = props;\n        const { options } = context;\n        const eventUi = eventRange.ui;\n        const eventApi = this.buildPublicEvent(context, eventRange.def, eventRange.instance);\n        const subcontentRenderProps = {\n            ...props.renderProps, // first, so built-in props take precedence\n            event: eventApi,\n            timeText: '', // never display time\n            isNarrow: props.isNarrow || false,\n            isShort: props.isShort || false,\n        };\n        const renderProps = {\n            ...props.renderProps, // first, so built-in props take precedence\n            event: eventApi,\n            view: context.viewApi,\n            timeText: '', // never display time\n            color: eventUi.color || options.backgroundEventColor,\n            contrastColor: eventUi.contrastColor,\n            isDraggable: false,\n            isStartResizable: false,\n            isEndResizable: false,\n            isMirror: false,\n            isStart: props.isStart,\n            isEnd: props.isEnd,\n            isFirst: false,\n            isLast: false,\n            isPast: props.isPast,\n            isFuture: props.isFuture,\n            isToday: props.isToday,\n            isSelected: false,\n            isDragging: false,\n            isResizing: false,\n            isInteractive: false,\n            level: 0,\n            isNarrow: props.isNarrow || false,\n            isShort: props.isShort || false,\n            timeClass: '', // never display time\n            titleClass: generateClassName(options.backgroundEventTitleClass, subcontentRenderProps),\n            options: { eventOverlap: Boolean(options.eventOverlap) },\n        };\n        // does not include backgroundEventClass.. added below\n        const outerClassName = joinClassNames(eventUi.className, classNames.fill, classNames.internalEvent, classNames.internalBgEvent, props.isVertical ? classNames.flexCol : classNames.flexRow);\n        const innerClassName = joinClassNames(generateClassName(options.backgroundEventInnerClass, renderProps), classNames.liquid);\n        return (jsx(ContentContainer, { tag: 'div', className: outerClassName, style: {\n                '--fc-event-color': renderProps.color,\n                '--fc-event-contrast-color': renderProps.contrastColor,\n            }, defaultGenerator: renderInnerContent, elRef: this.handleEl, renderProps: renderProps, generatorName: \"backgroundEventContent\", customGenerator: options.backgroundEventContent, classNameGenerator: options.backgroundEventClass, didMount: options.backgroundEventDidMount, willUnmount: options.backgroundEventWillUnmount, children: (InnerContent) => (jsx(InnerContent, { tag: 'div', className: innerClassName })) }));\n    }\n    componentDidUpdate(prevProps) {\n        if (this.el && this.props.eventRange !== prevProps.eventRange) {\n            setElEventRange(this.el, this.props.eventRange);\n        }\n    }\n}\nfunction renderInnerContent(props) {\n    let { title } = props.event;\n    return title && (jsx(\"div\", { className: props.titleClass, children: props.event.title }));\n}\n// Other types of fills\n// -------------------------------------------------------------------------------------------------\nfunction renderFill(fillType, options) {\n    return (jsx(\"div\", { className: joinClassNames(fillType === 'non-business' ? options.nonBusinessHoursClass :\n            fillType === 'highlight' ? options.highlightClass : undefined, classNames.fill) }));\n}\n\n// Temporary stand-in for lateral cell border widths.\n// These should eventually be measured from the DOM.\nconst COL_BORDER_WIDTH = 1;\n// Temporary stand-in for row-bottom border widths.\n// These should eventually be measured from the DOM.\nconst ROW_BORDER_WIDTH = 1;\n\nconst SPACE_FROM_VIEWPORT = 10;\nclass MorePopover extends DateComponent {\n    constructor() {\n        super(...arguments);\n        // memo\n        this.getDateMeta = memoize(getDateMeta);\n        this.closeRef = createRef();\n        this.focusStartRef = createRef();\n        this.focusEndRef = createRef();\n        this.handleRootEl = (rootEl) => {\n            this.rootEl = rootEl;\n            if (rootEl) {\n                this.context.registerInteractiveComponent(this, {\n                    el: rootEl,\n                    useEventCenter: false,\n                });\n            }\n            else {\n                this.context.unregisterInteractiveComponent(this);\n            }\n        };\n        // Triggered when the user clicks *anywhere* in the document, for the autoHide feature\n        this.handleDocumentMouseDown = (ev) => {\n            // only hide the popover if the click happened outside the popover\n            const target = getEventTargetViaRoot(ev);\n            if (!this.rootEl.contains(target)) {\n                this.handleClose();\n            }\n        };\n        this.handleDocumentKeyDown = (ev) => {\n            if (ev.key === 'Escape') {\n                this.handleClose();\n            }\n        };\n        // for many different close techniques\n        // cannot accept params because might receive a browser Event\n        this.handleClose = () => {\n            let { onClose } = this.props;\n            if (onClose) {\n                onClose();\n            }\n        };\n    }\n    render() {\n        let { props, context } = this;\n        let { options, dateEnv, viewApi } = context;\n        let { startDate, todayRange, dateProfile } = props;\n        let dateMeta = this.getDateMeta(startDate, dateEnv, dateProfile, todayRange);\n        let textParts = dateEnv.formatToParts(startDate, options.popoverFormat);\n        let text = joinDateTimeFormatParts(textParts);\n        const dayHeaderRenderProps = {\n            ...props.renderProps, // first, so built-in props take precedence\n            ...dateMeta,\n            isMajor: false,\n            isNarrow: false,\n            isSticky: false,\n            inPopover: true,\n            level: 0,\n            hasNavLink: false,\n            text,\n            textParts,\n            get weekdayText() { return findWeekdayText(textParts); },\n            get dayNumberText() { return findDayNumberText(textParts); },\n            view: viewApi,\n        };\n        const dayCellRenderProps = {\n            ...props.renderProps, // first, so built-in props take precedence\n            ...dateMeta,\n            isMajor: false,\n            isNarrow: false,\n            inPopover: true,\n            hasNavLink: false,\n            get weekdayText() { return findWeekdayText(textParts); },\n            get dayNumberText() { return findDayNumberText(textParts); },\n            get monthText() { return findMonthText(textParts); },\n            view: viewApi,\n            text: '',\n            textParts: [],\n            options: { businessHours: Boolean(options.businessHours) },\n        };\n        const fullDateStr = formatDayString(startDate);\n        /*\n        TODO: DRY with TimelineHeaderCell\n        */\n        const { dayHeaderAlign } = options;\n        const align = typeof dayHeaderAlign === 'function'\n            ? dayHeaderAlign({ level: 0, inPopover: true, isNarrow: false })\n            : dayHeaderAlign;\n        const isRtl = computeElIsRtl(props.alignEl);\n        return createPortal(jsxs(\"div\", { \"data-date\": fullDateStr, id: props.id, role: 'dialog', \"aria-labelledby\": props.titleId, className: joinClassNames(options.popoverClass, classNames.flexCol, classNames.popoverZ, classNames.abs, classNames.borderBoxRoot, classNames.internalPopover), style: {\n                // positioning is mutated directly in updateSize, HOWEVER, we don't want popover to start\n                // low on screen because might cause unnecessary scrollbars\n                top: 0,\n                left: 0,\n            }, \n            // HACK because of portal\n            dir: isRtl ? 'rtl' : undefined, \"data-color-scheme\": options.colorScheme || undefined, ref: this.handleRootEl, children: [jsx(\"div\", { tabIndex: 0, style: { outline: 'none' }, ref: this.focusStartRef }), jsxs(\"div\", { className: joinClassNames(generateClassName(options.dayHeaderClass, dayHeaderRenderProps), classNames.flexCol, classNames.borderlessX, classNames.borderlessTop, align === 'center' ? classNames.alignCenter :\n                        align === 'end' ? classNames.alignEnd :\n                            classNames.alignStart), children: [jsx(\"div\", { children: jsx(ContentContainer, { tag: \"div\", attrs: {\n                                    id: props.titleId,\n                                    // NOTE: more-popover never has nav-links\n                                }, generatorName: \"dayHeaderContent\", renderProps: dayHeaderRenderProps, customGenerator: options.dayHeaderContent, defaultGenerator: renderText, classNameGenerator: options.dayHeaderInnerClass, didMount: options.dayHeaderDidMount, willUnmount: options.dayHeaderWillUnmount }) }), jsx(ContentContainer, { tag: 'button', attrs: {\n                                'aria-label': options.closeHint,\n                                ...createAriaClickAttrs(this.handleClose)\n                            }, elRef: this.closeRef, className: joinClassNames(options.popoverCloseClass, classNames.flexRow, classNames.cursorPointer), renderProps: {}, customGenerator: options.popoverCloseContent, generatorName: 'popoverCloseContent' })] }), jsx(\"div\", { className: joinClassNames(generateClassName(options.dayCellClass, dayCellRenderProps), classNames.flexCol, classNames.borderless), children: jsx(\"div\", { role: 'list' // children are list items\n                        , className: generateClassName(options.dayCellInnerClass, dayCellRenderProps), children: props.children }) }), jsx(\"div\", { tabIndex: 0, style: { outline: 'none' }, ref: this.focusEndRef })] }), getAppendableRoot(props.alignEl));\n    }\n    queryHit(isRtl, positionLeft, positionTop, elWidth, elHeight) {\n        let { rootEl, props } = this;\n        if (positionLeft >= 0 && positionLeft < elWidth &&\n            positionTop >= 0 && positionTop < elHeight) {\n            return {\n                dateProfile: props.dateProfile,\n                dateSpan: {\n                    allDay: !props.forceTimed,\n                    range: {\n                        start: props.startDate,\n                        end: props.endDate,\n                    },\n                    ...props.dateSpanProps,\n                },\n                getDayEl: () => rootEl,\n                rect: {\n                    left: 0,\n                    top: 0,\n                    right: elWidth,\n                    bottom: elHeight,\n                },\n                layer: 1, // important when comparing with hits from other components\n            };\n        }\n        return null;\n    }\n    componentDidMount() {\n        document.addEventListener('mousedown', this.handleDocumentMouseDown);\n        document.addEventListener('keydown', this.handleDocumentKeyDown);\n        this.focusStartRef.current.addEventListener('focus', this.handleClose);\n        this.focusEndRef.current.addEventListener('focus', this.handleClose);\n        this.closeRef.current.focus({ preventScroll: true });\n        this.updateSize();\n    }\n    componentWillUnmount() {\n        document.removeEventListener('mousedown', this.handleDocumentMouseDown);\n        document.removeEventListener('keydown', this.handleDocumentKeyDown);\n        this.focusStartRef.current.removeEventListener('focus', this.handleClose);\n        this.focusEndRef.current.removeEventListener('focus', this.handleClose);\n    }\n    updateSize() {\n        let { alignEl, alignParentTop } = this.props;\n        let { rootEl: popoverEl } = this;\n        const isRtl = computeElIsRtl(alignEl);\n        // position relative to viewport\n        const alignmentRect = computeClippedClientRect(alignEl);\n        if (alignmentRect) {\n            let popoverDims = popoverEl.getBoundingClientRect();\n            // position relative to viewport\n            let popoverVPTop = alignParentTop\n                // HACK: subtract 1 for DayGrid, which has borders on row-bottom. Only view that uses alignParentTop\n                ? alignEl.closest(alignParentTop).getBoundingClientRect().top - ROW_BORDER_WIDTH\n                : alignmentRect.top;\n            let popoverVPLeft = isRtl ? alignmentRect.right - popoverDims.width : alignmentRect.left;\n            // constrain\n            popoverVPTop = Math.max(popoverVPTop, SPACE_FROM_VIEWPORT);\n            popoverVPLeft = Math.min(popoverVPLeft, document.documentElement.clientWidth - SPACE_FROM_VIEWPORT - popoverDims.width);\n            popoverVPLeft = Math.max(popoverVPLeft, SPACE_FROM_VIEWPORT);\n            const { offsetParent } = popoverEl;\n            // final popover position, relative to offsetParent\n            let top;\n            let left;\n            // TODO: account for RTL\n            if (!offsetParent || offsetParent === document.body) {\n                top = popoverVPTop + window.scrollY;\n                left = popoverVPLeft + window.scrollX;\n            }\n            else {\n                const offsetParentRect = offsetParent.getBoundingClientRect();\n                top = popoverVPTop - offsetParentRect.top + offsetParent.scrollTop;\n                left = popoverVPLeft - offsetParentRect.left + offsetParent.scrollLeft;\n            }\n            applyStyle(popoverEl, { top, left });\n        }\n    }\n}\n// TODO: DRY\nfunction renderText(renderProps) {\n    return renderProps.text;\n}\n\n// NOTE: numeric span algebra (intersection, subtraction, unions, sorted\n// searches) lives in seg-placement/span-math.ts; CoordRange is structurally\n// identical to its LateralSpan.\n// { eventRange }\n// -------------------------------------------------------------------------------------------------\nfunction computeEarliestStart(segs) {\n    return segs.reduce(pickEarliestStart).eventRange.range.start;\n}\nfunction computeLatestEnd(segs) {\n    return segs.reduce(pickLatestEnd).eventRange.range.end;\n}\nfunction pickEarliestStart(r0, r1) {\n    return r0.eventRange.range.start < r1.eventRange.range.start ? r0 : r1;\n}\nfunction pickLatestEnd(r0, r1) {\n    return r0.eventRange.range.end > r1.eventRange.range.end ? r0 : r1;\n}\n\n/*\nRenders only the themed, customizable more-link presentation. Interaction,\npopover state, and date-range semantics belong to MoreLinkContainer.\n*/\nclass MoreLinkTrigger extends BaseComponent {\n    render() {\n        const { props, context } = this;\n        const { options } = context;\n        const renderProps = buildMoreLinkRenderProps(props.num, props.isNarrow, props.isMicro, props.display, props.renderProps, context);\n        return (jsx(ContentContainer, { tag: 'div', elRef: props.elRef, className: joinClassNames(generateClassName(props.display === 'row'\n                ? options.rowMoreLinkClass\n                : options.columnMoreLinkClass, renderProps), props.className, props.display === 'row'\n                ? classNames.flexRow\n                : classNames.flexCol, classNames.internalMoreLink, classNames.cursorPointer), style: props.style, attrs: props.attrs, renderProps: renderProps, generatorName: \"moreLinkContent\", customGenerator: options.moreLinkContent, defaultGenerator: renderMoreLinkText, classNameGenerator: options.moreLinkClass, didMount: props.didMount, willUnmount: props.willUnmount, children: (InnerContent) => (jsx(InnerContent, { tag: 'div', className: joinClassNames(generateClassName(options.moreLinkInnerClass, renderProps), generateClassName(props.display === 'row'\n                    ? options.rowMoreLinkInnerClass\n                    : options.columnMoreLinkInnerClass, renderProps), props.display === 'row'\n                    ? classNames.stickyS\n                    : classNames.stickyT) })) }));\n    }\n}\nclass MoreLinkContainer extends BaseComponent {\n    constructor() {\n        super(...arguments);\n        this.state = {\n            isPopoverOpen: false,\n        };\n        this.handleLinkEl = (linkEl) => {\n            this.linkEl = linkEl;\n            if (this.props.elRef) {\n                setRef(this.props.elRef, linkEl);\n            }\n        };\n        this.handleClick = (ev) => {\n            let { props, context } = this;\n            let { dateEnv, options } = context;\n            let { moreLinkClick } = options;\n            let date = computeRange(props).start;\n            function buildPublicSeg(seg) {\n                let { def, instance, range } = seg.eventRange;\n                const start = buildRangeEdgeOutput(range.start, range.instantStartMs, dateEnv);\n                const end = buildRangeEdgeOutput(range.end, range.instantEndMs, dateEnv);\n                return {\n                    event: new EventImpl(context, def, instance),\n                    start: start.date,\n                    end: end.date,\n                    isStart: seg.isStart,\n                    isEnd: seg.isEnd,\n                };\n            }\n            if (typeof moreLinkClick === 'function') {\n                moreLinkClick = moreLinkClick({\n                    date: dateEnv.toDate(date),\n                    allDay: Boolean(props.allDayDate),\n                    allSegs: props.segs.map(buildPublicSeg),\n                    hiddenSegs: props.hiddenSegs.map(buildPublicSeg),\n                    jsEvent: ev,\n                    view: context.viewApi,\n                });\n            }\n            if (!moreLinkClick || moreLinkClick === 'popover') {\n                this.setState({ isPopoverOpen: true });\n            }\n            else if (typeof moreLinkClick === 'string') { // a view name\n                context.calendarApi.zoomTo(date, moreLinkClick);\n            }\n        };\n        this.handlePopoverClose = () => {\n            if (this.linkEl) { // was null sometimes when initiating drag-n-drop would hide the popover\n                this.linkEl.focus();\n            }\n            this.setState({ isPopoverOpen: false });\n        };\n    }\n    render() {\n        const { props, state, context } = this;\n        const { options, baseId } = context;\n        const moreCnt = props.hiddenSegs.length;\n        const range = computeRange(props);\n        const popoverId = baseId + 'popover-' + range.start.toISOString();\n        const renderProps = buildMoreLinkRenderProps(moreCnt, props.isNarrow, props.isMicro, props.display, props.renderProps, context);\n        const hint = formatWithOrdinals(options.moreLinkHint, [moreCnt], renderProps.longText);\n        return (jsxs(Fragment, { children: [Boolean(moreCnt) && (jsx(MoreLinkTrigger, { num: moreCnt, display: props.display, isNarrow: props.isNarrow, isMicro: props.isMicro, renderProps: props.renderProps, elRef: this.handleLinkEl, className: props.className, style: props.style, attrs: {\n                        ...props.attrs,\n                        ...createAriaClickAttrs(this.handleClick),\n                        title: hint,\n                        'role': 'button',\n                        'aria-haspopup': 'dialog',\n                        'aria-expanded': state.isPopoverOpen,\n                        'aria-controls': state.isPopoverOpen ? popoverId : undefined,\n                    }, didMount: options.moreLinkDidMount, willUnmount: options.moreLinkWillUnmount })), state.isPopoverOpen && (jsx(MorePopover, { id: popoverId, titleId: popoverId + '-title', startDate: range.start, endDate: range.end, dateProfile: props.dateProfile, todayRange: props.todayRange, dateSpanProps: props.dateSpanProps, renderProps: props.renderProps, alignEl: props.alignElRef ? props.alignElRef.current : this.linkEl, alignParentTop: props.alignParentTop, forceTimed: props.forceTimed, onClose: this.handlePopoverClose, children: props.popoverContent() }))] }));\n    }\n}\nfunction renderMoreLinkText(props) {\n    return props.text;\n}\nfunction buildMoreLinkRenderProps(num, isNarrow, isMicro, display, extraRenderProps, context) {\n    const { viewApi, options, calendarApi } = context;\n    const numericText = `+${num}`; // TODO: offer hook or i18n?\n    const longText = typeof options.moreLinkText === 'function' // TODO: eventually use formatWithOrdinals\n        ? options.moreLinkText.call(calendarApi, num)\n        : `${numericText} ${options.moreLinkText}`;\n    return {\n        ...extraRenderProps, // first, so built-in props take precedence\n        num,\n        numericText,\n        longText,\n        text: (isMicro || display === 'column') ? numericText : longText,\n        isNarrow,\n        view: viewApi,\n    };\n}\nfunction computeRange(props) {\n    if (props.allDayDate) {\n        return {\n            start: props.allDayDate,\n            end: addDays(props.allDayDate, 1),\n        };\n    }\n    return {\n        start: computeEarliestStart(props.hiddenSegs),\n        end: computeLatestEnd(props.hiddenSegs),\n    };\n}\n\nconst DEFAULT_TABLE_EVENT_TIME_FORMAT = createFormatter({\n    hour: 'numeric',\n    minute: '2-digit',\n    omitZeroMinute: true,\n    meridiem: 'narrow',\n});\nfunction hasListItemDisplay(range, eventRange) {\n    let { display } = eventRange.ui;\n    return display === 'list-item' || (display === 'auto' &&\n        !eventRange.def.allDay &&\n        (range.end - range.start) === 1 && // single-day\n        range.isStart && // \"\n        range.isEnd // \"\n    );\n}\n\n// All positioned layers share the DayGrid row's isolated stacking context.\nconst DAY_GRID_NON_BUSINESS_Z_CLASS = classNames.z1;\nconst DAY_GRID_BG_EVENT_Z_CLASS = classNames.z2;\nconst DAY_GRID_HIGHLIGHT_Z_CLASS = classNames.z3;\nconst DAY_GRID_CELL_CONTENT_Z_CLASS = classNames.z4;\nconst DAY_GRID_EVENT_Z_CLASS = classNames.z5;\nconst DAY_GRID_INTERACTION_Z_CLASS = classNames.z1000;\n\nclass DayGridMoreLink extends BaseComponent {\n    render() {\n        let { props } = this;\n        return (jsx(MoreLinkContainer, { display: 'row', className: joinClassNames(props.className, DAY_GRID_CELL_CONTENT_Z_CLASS), isNarrow: props.isNarrow, isMicro: props.isMicro, dateProfile: props.dateProfile, todayRange: props.todayRange, allDayDate: props.allDayDate, segs: props.segs, hiddenSegs: props.hiddenSegs, alignElRef: props.alignElRef, alignParentTop: props.alignParentTop, dateSpanProps: props.dateSpanProps, renderProps: props.renderProps, popoverContent: () => (jsx(Fragment, { children: props.segs.map((seg) => {\n                    let { eventRange } = seg;\n                    let { instanceId } = eventRange.instance;\n                    let isDragging = Boolean(props.eventDrag && props.eventDrag.affectedInstances[instanceId]);\n                    let isResizing = Boolean(props.eventResize && props.eventResize.affectedInstances[instanceId]);\n                    let isInvisible = isDragging || isResizing;\n                    return (jsx(\"div\", { role: 'listitem', style: {\n                            visibility: isInvisible ? 'hidden' : undefined,\n                        }, children: jsx(StandardEvent, { display: hasListItemDisplay(seg, eventRange) ? 'list-item' : 'row', eventRange: eventRange, isStart: seg.isStart, isEnd: seg.isEnd, isDragging: isDragging, isResizing: isResizing, isMirror: false, isSelected: instanceId === props.eventSelection, defaultTimeFormat: DEFAULT_TABLE_EVENT_TIME_FORMAT, defaultDisplayEventEnd: false, renderProps: props.renderProps, ...getEventRangeMeta(eventRange, props.todayRange) }) }, instanceId));\n                }) })) }));\n    }\n}\n\nclass DayGridCell extends DateComponent {\n    constructor() {\n        super(...arguments);\n        // memo\n        this.getDateMeta = memoize(getDayGridCellDateMeta);\n        this.refineRenderProps = memoizeObjArg(refineRenderProps);\n        // ref\n        this.rootElRef = createRef();\n        this.handleBodyEl = (bodyEl) => {\n            if (this.disconnectBodyHeight) {\n                this.disconnectBodyHeight();\n                this.disconnectBodyHeight = undefined;\n                this.headerHeight = undefined;\n                setRef(this.props.headerHeightRef, null);\n                setRef(this.props.mainHeightRef, null);\n            }\n            // Print cells don't need this screen-only measurement.\n            if (bodyEl && (this.props.headerHeightRef || this.props.mainHeightRef)) {\n                // we want to fire on ANY size change, because we do more advanced stuff\n                this.disconnectBodyHeight = watchSize(bodyEl, (_bodyWidth, bodyHeight) => {\n                    if (this._isUnmounting) {\n                        return;\n                    }\n                    const { props } = this;\n                    const rootEl = this.rootElRef.current;\n                    // A queued resize can outlive the cell element.\n                    if (!rootEl) {\n                        return;\n                    }\n                    const mainRect = bodyEl.getBoundingClientRect();\n                    const rootRect = rootEl.getBoundingClientRect();\n                    const headerHeight = mainRect.top - rootRect.top;\n                    if (!isDimsEqual(this.headerHeight, headerHeight)) {\n                        this.headerHeight = headerHeight;\n                        setRef(props.headerHeightRef, headerHeight);\n                    }\n                    /*\n                    Reported in every mode, even though only a liquid cell's placement\n                    consumes it. The body keeps the same element and the same observer when\n                    `fgLiquidHeight` flips, and switching it between `grow` and `liquid`\n                    need not change its height at all, so a mode-conditional report would\n                    leave a newly liquid cell waiting for an unrelated resize before it\n                    ever learned its own ceiling.\n                    */\n                    setRef(props.mainHeightRef, bodyHeight);\n                });\n            }\n        };\n    }\n    render() {\n        let { props, context } = this;\n        let { options, dateEnv } = context;\n        const { tableMode } = props;\n        // TODO: memoize this\n        const isMonthStart = props.showDayNumber &&\n            shouldDisplayMonthStart(props.date, props.dateProfile.currentRange, dateEnv);\n        const dateMeta = this.getDateMeta(props.date, dateEnv, props.dateProfile, props.todayRange, props.isDisabled);\n        const baseClassName = joinClassNames(classNames.borderlessTop, classNames.borderlessEnd, !props.borderStart && classNames.borderlessStart, !(tableMode && props.borderBottom) && classNames.borderlessBottom, !tableMode && props.width == null && classNames.liquid, !tableMode && classNames.flexCol, classNames.rel, classNames.noMargin, classNames.noPadding);\n        const CellTag = tableMode ? 'td' : 'div';\n        const cellStyle = tableMode ? undefined : { width: props.width };\n        const hasNavLink = options.navLinks;\n        const renderProps = this.refineRenderProps({\n            date: props.date,\n            isMajor: props.isMajor,\n            isNarrow: props.isNarrow,\n            dateMeta: dateMeta,\n            hasLabel: props.showDayNumber,\n            hasMonthLabel: isMonthStart,\n            hasNavLink,\n            renderProps: props.renderProps,\n            viewApi: context.viewApi,\n            dateEnv: context.dateEnv,\n            monthStartFormat: options.monthStartFormat,\n            dayCellFormat: options.dayCellFormat,\n            businessHours: Boolean(options.businessHours),\n        });\n        if (dateMeta.isDisabled) {\n            return (jsx(CellTag, { role: 'cell', \"aria-disabled\": true, className: joinClassNames(generateClassName(options.dayCellClass, renderProps), props.className, baseClassName), style: cellStyle, children: props.fills }));\n        }\n        const fullDateStr = buildDateStr(context, props.date);\n        // only when the day number is shown: otherwise, the column header already reads the full date\n        const hasA11yDateText = props.showDayNumber && !hasNavLink;\n        return (jsx(ContentContainer, { tag: CellTag, elRef: this.rootElRef, className: joinClassNames(props.className, baseClassName), attrs: {\n                ...props.attrs,\n                role: 'cell',\n                ...(renderProps.isToday ? { 'aria-current': 'date' } : {}),\n                'data-date': formatDayString(props.date),\n            }, style: cellStyle, renderProps: renderProps, generatorName: \"dayCellTopContent\" // !!! for top\n            , customGenerator: options.dayCellTopContent /* !!! for top */, defaultGenerator: renderTopInner, classNameGenerator: options.dayCellClass, didMount: options.dayCellDidMount, willUnmount: options.dayCellWillUnmount, children: (InnerContent) => (jsxs(Fragment, { children: [props.fills, jsxs(\"div\", { \n                        // otherwise VoiceOver finds an empty group when there's no day number (ex: TimeGrid all-day).\n                        // children (srOnly date, day number, custom content) stay readable\n                        role: 'presentation', className: joinClassNames(classNames.rel, // puts it above bg-fills, which are positioned on TOP of this component :|\n                        DAY_GRID_CELL_CONTENT_Z_CLASS, generateClassName(options.dayCellTopClass, renderProps)), children: [hasA11yDateText && ( // a nav link is already labeled\n                            jsx(\"div\", { className: classNames.srOnly, children: fullDateStr })), props.showDayNumber && (jsx(InnerContent // the dayCellTopContent\n                            , { tag: 'div', attrs: hasNavLink\n                                    ? buildNavLinkAttrs(context, props.date, undefined, fullDateStr)\n                                    : { 'aria-hidden': true } // screen readers read the srOnly full date above, not this day number\n                                , className: generateClassName(options.dayCellTopInnerClass, renderProps) }))] }), jsxs(\"div\", { className: joinClassNames(!tableMode && classNames.flexCol, !tableMode && (props.fgLiquidHeight ? classNames.liquid : classNames.grow), tableMode && classNames.printCellContentMinHeight), ref: this.handleBodyEl, children: [jsx(\"div\", { \n                                // without events of its own, it's still sized (space reserved for multi-day events from\n                                // earlier days), and VoiceOver would find an empty group\n                                role: props.fgIsList ? 'list' : 'presentation', className: joinClassNames(classNames.rel, // origin for this cell's foreground event wrappers\n                                generateClassName(options.dayCellInnerClass, renderProps)), style: { minHeight: props.fgHeight }, children: props.fg }), jsx(DayGridMoreLink, { className: classNames.rel, allDayDate: props.date, segs: props.segs, hiddenSegs: props.hiddenSegs, alignElRef: this.rootElRef, alignParentTop: props.showDayNumber\n                                    ? '[role=row]'\n                                    : `.${classNames.internalView}`, dateSpanProps: props.dateSpanProps, renderProps: props.renderProps, dateProfile: props.dateProfile, eventSelection: props.eventSelection, eventDrag: props.eventDrag, eventResize: props.eventResize, todayRange: props.todayRange, isNarrow: props.isNarrow, isMicro: props.isMicro })] }), jsx(\"div\", { role: 'presentation' // otherwise VoiceOver finds an empty group. not aria-hidden, which would hide any content too\n                        , className: joinClassNames(classNames.rel, // puts it above bg-fills\n                        DAY_GRID_CELL_CONTENT_Z_CLASS, generateClassName(options.dayCellBottomClass, renderProps)) })] })) }));\n    }\n    componentDidMount() {\n        this._isUnmounting = false;\n    }\n    componentWillUnmount() {\n        this._isUnmounting = true;\n    }\n}\n// Utils\n// -------------------------------------------------------------------------------------------------\nfunction getDayGridCellDateMeta(date, dateEnv, dateProfile, todayRange, isDisabled) {\n    return {\n        ...getDateMeta(date, dateEnv, dateProfile, todayRange),\n        isDisabled,\n    };\n}\nfunction renderTopInner(props) {\n    return props.text || jsx(Fragment, { children: \"\\u00A0\" }); // TODO: DRY?\n}\nfunction shouldDisplayMonthStart(date, currentRange, dateEnv) {\n    const { start: currentStart, end: currentEnd } = currentRange;\n    const currentEndIncl = addMs(currentEnd, -1);\n    const currentFirstYear = dateEnv.getYear(currentStart);\n    const currentFirstMonth = dateEnv.getMonth(currentStart);\n    const currentLastYear = dateEnv.getYear(currentEndIncl);\n    const currentLastMonth = dateEnv.getMonth(currentEndIncl);\n    // spans more than one month?\n    return !(currentFirstYear === currentLastYear && currentFirstMonth === currentLastMonth) &&\n        Boolean(\n        // first date in current view?\n        date.valueOf() === currentStart.valueOf() ||\n            // a month-start that's within the current range?\n            (dateEnv.getDay(date) === 1 && date.valueOf() < currentEnd.valueOf()));\n}\nfunction refineRenderProps(raw) {\n    let { date, dateEnv, hasLabel, hasMonthLabel, hasNavLink, businessHours } = raw;\n    let textParts = [];\n    let text = '';\n    if (hasLabel) {\n        textParts = dateEnv.formatToParts(date, hasMonthLabel ? raw.monthStartFormat : raw.dayCellFormat);\n        text = joinDateTimeFormatParts(textParts);\n    }\n    return {\n        ...raw.dateMeta,\n        ...raw.renderProps,\n        text,\n        textParts,\n        isMajor: raw.isMajor,\n        isNarrow: raw.isNarrow,\n        inPopover: false,\n        hasNavLink,\n        get weekdayText() { return findWeekdayText(textParts); },\n        get dayNumberText() { return findDayNumberText(textParts); },\n        get monthText() { return findMonthText(textParts); },\n        options: { businessHours },\n        view: raw.viewApi,\n    };\n}\n\nclass MeasuredHeightHarness extends Component {\n    constructor() {\n        super(...arguments);\n        this.rootElRef = createRef();\n        this._isUnmounting = false;\n    }\n    render() {\n        const { props } = this;\n        return (jsx(\"div\", { ...props.attrs, className: props.className, style: props.style, ref: this.rootElRef, children: props.children }));\n    }\n    componentDidMount() {\n        this._isUnmounting = false;\n        const rootEl = this.rootElRef.current; // TODO: make dynamic with useEffect\n        this.disconnectHeight = watchHeight(rootEl, (height) => {\n            if (this._isUnmounting)\n                return;\n            this.height = height;\n            setRef(this.props.heightRef, height);\n        });\n    }\n    /*\n    A wrapper can gain or lose measurement responsibility without remounting,\n    because a row switches placement routes (screen<->print, for example) while\n    reusing the same keyed nodes. The size observer only fires on an actual size\n    change, so hand the newly attached ref what was already observed, and release\n    the detached one.\n    */\n    componentDidUpdate(prevProps) {\n        const { heightRef } = this.props;\n        if (prevProps.heightRef !== heightRef) {\n            setRef(prevProps.heightRef, null);\n            if (this.height != null) {\n                setRef(heightRef, this.height);\n            }\n        }\n    }\n    componentWillUnmount() {\n        this._isUnmounting = true;\n        this.disconnectHeight?.();\n        setRef(this.props.heightRef, null);\n    }\n}\n\n/**\n * Pure lateral-span geometry shared by the seg-placement engine.\n *\n * A span is a half-open interval `[start, end)` on the lateral axis. The axis\n * can be discrete (DayGrid columns) or continuous (Timeline pixels). Exactly\n * adjacent spans never intersect.\n */\nfunction doSpansIntersect(a, b) {\n    return a.start < b.end && b.start < a.end;\n}\n/** Returns the strict intersection; exactly adjacent spans do not intersect. */\nfunction intersectSpans(a, b) {\n    const start = Math.max(a.start, b.start);\n    const end = Math.min(a.end, b.end);\n    return start < end ? { start, end } : null;\n}\nfunction getSpanLength(span) {\n    return span.end - span.start;\n}\n/**\n * Finds every intersection within entries sorted by `start`. When the entries\n * are also pairwise non-intersecting, only the single entry before the lower\n * bound can straddle the span's start, so the scan begins one entry early.\n */\nfunction findIntersections(entries, span) {\n    let index = findLowerBoundByStart(entries, span.start);\n    if (index > 0) {\n        index--;\n    }\n    const matches = [];\n    for (; index < entries.length; index++) {\n        const entry = entries[index];\n        if (entry.start >= span.end) {\n            break;\n        }\n        if (doSpansIntersect(entry, span)) {\n            matches.push(entry);\n        }\n    }\n    return matches;\n}\n/**\n * Computes the coverage set difference `span - covered`. The covered spans\n * must be sorted by `start` and pairwise non-overlapping.\n */\nfunction subtractCoveredSpans(span, covered) {\n    const result = [];\n    let cursor = span.start;\n    for (const item of covered) {\n        if (item.end <= cursor) {\n            continue;\n        }\n        if (item.start >= span.end) {\n            break;\n        }\n        if (item.start > cursor) {\n            result.push({ start: cursor, end: Math.min(item.start, span.end) });\n        }\n        cursor = Math.max(cursor, item.end);\n        if (cursor >= span.end) {\n            break;\n        }\n    }\n    if (cursor < span.end) {\n        result.push({ start: cursor, end: span.end });\n    }\n    return result;\n}\n/** Maintains a sorted strict-overlap union; adjacent spans remain separate. */\nfunction addToUnion(spans, addition) {\n    const result = [];\n    let pending = { ...addition };\n    let inserted = false;\n    for (const span of spans) {\n        if (span.end <= pending.start) {\n            result.push(span);\n        }\n        else if (pending.end <= span.start) {\n            if (!inserted) {\n                result.push(pending);\n                inserted = true;\n            }\n            result.push(span);\n        }\n        else {\n            pending = {\n                start: Math.min(pending.start, span.start),\n                end: Math.max(pending.end, span.end),\n            };\n        }\n    }\n    if (!inserted) {\n        result.push(pending);\n    }\n    spans.splice(0, spans.length, ...result);\n}\n/** Preserves increasing lateral-start order within a sorted entry list. */\nfunction insertLaterally(entries, entry) {\n    entries.splice(findLowerBoundByStart(entries, entry.start), 0, entry);\n}\nfunction findLowerBoundByStart(entries, start) {\n    let low = 0;\n    let high = entries.length;\n    while (low < high) {\n        const middle = (low + high) >>> 1;\n        if (entries[middle].start < start) {\n            low = middle + 1;\n        }\n        else {\n            high = middle;\n        }\n    }\n    return low;\n}\n\n/**\n * Pure event-positioning kernel implementing measured logical repacking.\n *\n * Source segs own identity and event order. Slices own only lateral geometry,\n * while their outer array index is their dimensionless level. Limiting stays\n * primarily in logical slice-level space; the pixel path admits speculative\n * slices only through occupied logical territory, then monotonically prunes\n * the measured result against exact pixel and more-link boundaries.\n */\n/** Permissive epsilon for geometric coordinate and budget comparisons. */\nconst GEOMETRY_TOLERANCE = 0.000001;\n/** Shared estimate for an event wrapper that has not reported a thickness. */\nconst DEFAULT_UNMEASURED_EVENT_THICKNESS = 20;\n/** Shared estimate for a more-link wrapper that has not reported a thickness. */\nconst DEFAULT_UNMEASURED_MORE_LINK_THICKNESS = 20;\n/**\n * Streams at most `maxLevels` into the initial structure and fires every\n * rejected slice back at those levels in event order.\n *\n * With slicing disabled, a failed slice hides whole. With slicing enabled,\n * every level independently offers its maximal free runs and the winning plan\n * balances exposed length against fragmentation. Every hidden slice grows a\n * coverage accumulator; with a level tax, only newly covered runs reserve the\n * bottom event level for a more link, evicting any slice already there.\n */\nfunction buildLevelLimitedLayout(segs, eventOrderStrict, eventSlicing, maxLevels, moreLinkLevelTax, sliceHeights) {\n    const { segLevels, excludedSegs } = buildSegLevels(segs, eventOrderStrict, maxLevels);\n    const placement = placeExtraSlicesInLevels(convertSegLevelsToWholeSlices(segLevels), convertSegsToWholeSlices(excludedSegs), eventOrderStrict, eventSlicing, moreLinkLevelTax);\n    const resolution = resolveLevelCoords(placement.sliceLevels, sliceHeights);\n    return {\n        renderSlices: flatArray(placement.sliceLevels),\n        hiddenSlices: placement.hiddenSlices,\n        sliceLevels: placement.sliceLevels,\n        sliceCoords: resolution.sliceCoords,\n        isSettled: resolution.isSettled,\n    };\n}\n/**\n * Resolves the bounded whole-slice frontier, then offers excluded slices back\n * to its occupied logical territory through slicing. Exact pixel pruning hides\n * any measured result that crosses the canvas or an existing more-link band.\n * Placement-only slices remain mounted as invisible measurement donors until\n * measured, preventing mount-measure cycles.\n *\n * `levelCapacity` bounds the initial DOM whole-slice candidates; later\n * slices begin hidden and unmeasured.\n */\nfunction buildPixelLimitedLayout(segs, eventOrderStrict, eventSlicing, sliceHeights, canvasHeight, levelCapacity, moreLinkHeight) {\n    const { segLevels, excludedSegs } = buildSegLevels(segs, eventOrderStrict, levelCapacity);\n    const domWholeSliceLevels = convertSegLevelsToWholeSlices(segLevels);\n    const domExcludedWholeSlices = convertSegsToWholeSlices(excludedSegs);\n    const wholeResolution = resolveLevelCoords(domWholeSliceLevels, sliceHeights, canvasHeight);\n    // Until the canvas and the link probe report a size, mount only the bounded\n    // whole-slice frontier so its measurements can arrive.\n    if (canvasHeight == null || moreLinkHeight == null) {\n        return {\n            renderSlices: flatArray(domWholeSliceLevels),\n            hiddenSlices: domExcludedWholeSlices,\n            sliceLevels: domWholeSliceLevels,\n            sliceCoords: wholeResolution.sliceCoords,\n            isSettled: wholeResolution.isSettled,\n        };\n    }\n    // Pending frontier wholes stay out of links until measured; beyond-frontier\n    // wholes are definite logical exclusions and hide without measurement.\n    const excludedWholeSlices = wholeResolution.excludedSlices.concat(domExcludedWholeSlices);\n    excludedWholeSlices.sort(compareByEventOrder);\n    // With slicing, the level tax punches link holes while preserving event\n    // remainders; otherwise measured pruning makes the smarter pixel choice.\n    const placement = placeExtraSlicesInLevels(wholeResolution.placementSliceLevels, excludedWholeSlices, eventOrderStrict, eventSlicing, \n    /* moreLinkLevelTax = */ eventSlicing ? 1 : 0, \n    /* requiresSlicing = */ true, \n    /* taxDeepestOccupiedLevel = */ true);\n    const sliceResolution = resolveLevelCoords(placement.sliceLevels, sliceHeights);\n    // More links always render. When one consumes the full budget or more, zero\n    // is the deepest coordinate an intersecting event may reach.\n    const moreLinkEventMax = Math.max(0, canvasHeight - moreLinkHeight);\n    // Remove exact canvas and more-link overflows from the coordinated layout.\n    const pixelPrunedSlices = prunePixelLimitedSliceLevels(placement.sliceLevels, placement.hiddenSlices, sliceResolution.sliceCoords, sliceHeights, canvasHeight, moreLinkEventMax);\n    // Keep all frontier wholes and placement-added slices mounted as measurement\n    // donors; missing coordinates make rejected or pending slices invisible.\n    // Disjoint: requiresSlicing bars whole re-insertion, so every added slice is\n    // a freshly cut object, never a frontier whole.\n    const renderSlices = flatArray(domWholeSliceLevels).concat(placement.addedSlices);\n    // Frontier wholes resolve in the whole pass and every placement-added slice\n    // resolves in the placement pass, so together the two cover the render set.\n    const isSettled = wholeResolution.isSettled && sliceResolution.isSettled;\n    return {\n        renderSlices,\n        hiddenSlices: pixelPrunedSlices.concat(placement.hiddenSlices),\n        sliceLevels: placement.sliceLevels,\n        sliceCoords: sliceResolution.sliceCoords,\n        isSettled,\n    };\n}\n/* ========================================================================\n * Whole-source level construction\n * ===================================================================== */\n/** Builds whole-source logical levels without consulting any dimensions. */\nfunction buildSegLevels(segs, eventOrderStrict, maxLevels = Infinity) {\n    const segLevels = [];\n    const excludedSegs = [];\n    for (const seg of segs) {\n        const levelIndex = findPackedLevelIndex(segLevels, seg, eventOrderStrict);\n        if (levelIndex >= maxLevels) {\n            excludedSegs.push(seg);\n        }\n        else {\n            while (segLevels.length <= levelIndex) {\n                segLevels.push([]);\n            }\n            insertLaterally(segLevels[levelIndex], seg);\n        }\n    }\n    return { segLevels, excludedSegs };\n}\n/**\n * The packed level a span belongs to: the shallowest vacant level, or with\n * gap reuse forbidden, directly below the deepest intersecting occupant.\n * `levels.length` means a new level must open.\n */\nfunction findPackedLevelIndex(levels, span, orderStrict) {\n    let levelIndex = 0;\n    if (orderStrict) {\n        for (let i = 0; i < levels.length; i++) {\n            if (findIntersections(levels[i], span).length) {\n                levelIndex = i + 1;\n            }\n        }\n    }\n    else {\n        while (levelIndex < levels.length &&\n            findIntersections(levels[levelIndex], span).length) {\n            levelIndex++;\n        }\n    }\n    return levelIndex;\n}\nfunction convertSegLevelsToWholeSlices(segLevels) {\n    return segLevels.map((level) => convertSegsToWholeSlices(level));\n}\nfunction convertSegsToWholeSlices(segs) {\n    return segs.map(createWholeSlice);\n}\n/* ========================================================================\n * Slice-level coordinate resolution\n * ===================================================================== */\n/**\n * Resolves fixed logical levels without changing the input or its slices.\n * An unmeasured slice leaves the resolution unsettled; a measured bounded\n * rejection is final. Neither blocks later traversal entries, so excluding a\n * lower slice can let a later slice move upward. The returned placement\n * structure re-levels the admitted slices from scratch, compacted around\n * pending and excluded slices exactly like the coordinates. Each admitted\n * slice files below every admitted slice it intersects — never into a\n * shallower gap — so level order mirrors pixel stacking and strict input\n * order survives without consulting it.\n */\nfunction resolveLevelCoords(sliceLevels, sliceHeights, maxPixels = Infinity) {\n    const placementSliceLevels = [];\n    const sliceCoords = new Map();\n    let isSettled = true;\n    const excludedSlices = [];\n    for (let levelIndex = 0; levelIndex < sliceLevels.length; levelIndex++) {\n        for (const slice of sliceLevels[levelIndex]) {\n            const sliceHeight = sliceHeights.get(getSliceKey(slice));\n            if (sliceHeight === undefined) {\n                isSettled = false;\n                continue;\n            }\n            const { bottom: levelCoord, levelIndex: packedLevelIndex, } = computeLateralSpanPlacement(placementSliceLevels, slice, sliceCoords, sliceHeights);\n            if (levelCoord + sliceHeight <=\n                maxPixels + GEOMETRY_TOLERANCE) {\n                // Repacking admitted slices merges levels, so keep lateral sort.\n                while (placementSliceLevels.length <= packedLevelIndex) {\n                    placementSliceLevels.push([]);\n                }\n                insertLaterally(placementSliceLevels[packedLevelIndex], slice);\n                sliceCoords.set(getSliceKey(slice), levelCoord);\n            }\n            else {\n                excludedSlices.push(slice);\n            }\n        }\n    }\n    return { placementSliceLevels, sliceCoords, isSettled, excludedSlices };\n}\n/** Deepest measured, coordinated bottom and level among slices touching the span. */\nfunction computeLateralSpanPlacement(sliceLevels, span, sliceCoords, sliceHeights) {\n    let bottom = 0;\n    let levelIndex = 0;\n    for (let i = 0; i < sliceLevels.length; i++) {\n        const level = sliceLevels[i];\n        for (const slice of findIntersections(level, span)) {\n            const key = getSliceKey(slice);\n            const sliceTop = sliceCoords.get(key);\n            const sliceHeight = sliceHeights.get(key);\n            if (sliceTop !== undefined && sliceHeight !== undefined) {\n                bottom = Math.max(bottom, sliceTop + sliceHeight);\n                levelIndex = i + 1;\n            }\n        }\n    }\n    return { bottom, levelIndex };\n}\n/** Deepest measured, coordinated bottom among slices touching the span. */\nfunction computeLateralSpanBottom(sliceLevels, span, sliceCoords, sliceHeights) {\n    return computeLateralSpanPlacement(sliceLevels, span, sliceCoords, sliceHeights).bottom;\n}\n/** Recomputes every coordinated slice against the compacted visible set. */\nfunction recomputeVisibleCoords(sliceLevels, sliceHeights, sliceCoords) {\n    const visibleLevels = sliceLevels.map((level) => level.filter((slice) => sliceCoords.has(getSliceKey(slice))));\n    const freshCoords = resolveLevelCoords(visibleLevels, sliceHeights).sliceCoords;\n    for (const [key, coord] of freshCoords) {\n        sliceCoords.set(key, coord);\n    }\n}\n/** Returns a measured slice's bottom, or `undefined` while it is pending. */\nfunction getSliceBottom(slice, sliceCoords, sliceHeights) {\n    const key = getSliceKey(slice);\n    const coord = sliceCoords.get(key);\n    const height = sliceHeights.get(key);\n    return coord === undefined || height === undefined\n        ? undefined\n        : coord + height;\n}\n/**\n * Monotonically removes measured slices that cross either the canvas boundary\n * or an active more-link boundary. Hiding a slice grows the more-link coverage;\n * only newly covered spans are fired through the remaining slices, so every\n * removal can expose more link-band intruders without reconsidering old spans.\n *\n * SIDE EFFECT: mutates `sliceCoords`. A removed coordinate is the renderer's\n * signal that the still-mounted slice is invisible. After every removal,\n * surviving coordinates are resolved again so later queue entries are tested\n * against the compacted pixel structure. Slices without a proposed coordinate\n * are ignored. Existing hidden slices seed the more-link coverage before the\n * first removal is considered.\n *\n * Returns the slices whose coordinates this pass removed, with no ordering\n * guarantee.\n */\nfunction prunePixelLimitedSliceLevels(sliceLevels, initialHiddenSlices, sliceCoords, sliceHeights, maxPixelHeight, moreLinkMaxPixelHeight) {\n    const moreLinkGroups = [];\n    const pixelPrunedSlices = [];\n    const sliceHideQueue = [];\n    let sliceHideIndex = 0;\n    // Build the more-link coverage already established by logical placement.\n    for (const hiddenSlice of initialHiddenSlices) {\n        addHiddenSliceToGroups(moreLinkGroups, hiddenSlice);\n    }\n    // Seed the queue with canvas overflows and existing more-link intruders.\n    enqueueViolators();\n    // A head index preserves FIFO without shift()'s O(n) reindexing; pop() is LIFO.\n    while (sliceHideIndex < sliceHideQueue.length) {\n        const slice = sliceHideQueue[sliceHideIndex++];\n        const sliceBottom = getSliceBottom(slice, sliceCoords, sliceHeights);\n        // A missing coordinate means a prior queue entry already processed it, and\n        // compaction from earlier removals can make a queued slice compliant again.\n        if (sliceBottom === undefined ||\n            !violatesPixelBoundary(slice, sliceBottom)) {\n            continue;\n        }\n        // Removing the coordinate hides the still-mounted slice. The shared\n        // coordinate primitive then compacts later visible slices around it.\n        sliceCoords.delete(getSliceKey(slice));\n        pixelPrunedSlices.push(slice);\n        const newMoreLinkSpans = addHiddenSliceToGroups(moreLinkGroups, slice);\n        recomputeVisibleCoords(sliceLevels, sliceHeights, sliceCoords);\n        for (const newMoreLinkSpan of newMoreLinkSpans) {\n            enqueueViolators(newMoreLinkSpan);\n        }\n    }\n    return pixelPrunedSlices;\n    /** Whether a measured bottom crosses the canvas or an intersecting link band. */\n    function violatesPixelBoundary(slice, sliceBottom) {\n        return sliceBottom > maxPixelHeight + GEOMETRY_TOLERANCE ||\n            (sliceBottom > moreLinkMaxPixelHeight + GEOMETRY_TOLERANCE &&\n                findIntersections(moreLinkGroups, slice).length > 0);\n    }\n    /** Queues every measured violator, or only those touching one span. */\n    function enqueueViolators(withinSpan) {\n        for (const level of sliceLevels) {\n            const candidates = withinSpan\n                ? findIntersections(level, withinSpan)\n                : level;\n            for (const slice of candidates) {\n                const sliceBottom = getSliceBottom(slice, sliceCoords, sliceHeights);\n                if (sliceBottom !== undefined &&\n                    violatesPixelBoundary(slice, sliceBottom)) {\n                    sliceHideQueue.push(slice);\n                }\n            }\n        }\n    }\n}\n/**\n * Fires event-ordered extras into a fixed set of logical levels. Repacking may\n * reuse gaps in the received levels but never creates additional levels.\n * By default, a more-link tax reserves the globally final level. Pixel flows\n * can instead reserve the deepest occupied level local to each link span and\n * require initial extras to expose some hidden coverage before admission.\n *\n * PRECONDITION: `extraSlices` is sorted by event order.\n *\n * SIDE EFFECT: mutates `sliceLevels`; callers transfer ownership of its outer\n * array and level arrays to this placement operation.\n */\nfunction placeExtraSlicesInLevels(sliceLevels, extraSlices, eventOrderStrict, eventSlicing, moreLinkLevelTax, \n/** Whether initial extras must leave hidden coverage before admission. */\nrequiresSlicing = false, \n/** Whether each link taxes its deepest locally occupied level. */\ntaxDeepestOccupiedLevel = false) {\n    const addedSliceSet = new Set();\n    // Hidden membership remains flat for whole-layout operations. More-link\n    // groups duplicate that membership locally while also recording which\n    // lateral territory has already fired its link tax.\n    const hiddenSlices = [];\n    const moreLinkGroups = [];\n    const moreLinkReservations = [];\n    const placementState = {\n        levels: sliceLevels,\n        moreLinkReservations,\n        eventOrderStrict,\n    };\n    const work = [];\n    pushFire(extraSlices, requiresSlicing);\n    // LIFO runs newly created link reservations before older unrelated extras,\n    // so an extra cannot insert into space that a fresh reservation will claim.\n    while (work.length) {\n        const item = work.pop();\n        if (item.type === 'fire') {\n            fire(item.slice, item.requiresSlicing);\n        }\n        else {\n            fireMoreLink(item.span);\n        }\n    }\n    return {\n        sliceLevels,\n        hiddenSlices,\n        addedSlices: [...addedSliceSet],\n    };\n    /** Tries an allowed whole insertion before scored same-level slice plans. */\n    function fire(slice, requiresSlicing) {\n        if (!requiresSlicing) {\n            const levelIndex = findInsertionLevel(slice, placementState);\n            if (levelIndex !== null) {\n                insertLaterally(sliceLevels[levelIndex], slice);\n                addedSliceSet.add(slice);\n                return;\n            }\n        }\n        if (!eventSlicing) {\n            hide(slice);\n            return;\n        }\n        const plan = findBestSlicePlan(slice, placementState, requiresSlicing);\n        if (!plan) {\n            hide(slice);\n            return;\n        }\n        for (const visibleSlice of plan.slices) {\n            insertLaterally(sliceLevels[plan.levelIndex], visibleSlice);\n            addedSliceSet.add(visibleSlice);\n        }\n        for (const hiddenSlice of subtractSpansFromSlice(slice, plan.slices)) {\n            hide(hiddenSlice);\n        }\n    }\n    /** Adds hidden membership and fires links only over new accumulator coverage. */\n    function hide(slice) {\n        hiddenSlices.push(slice);\n        // Only the set difference is fresh more-link territory; it can consist of\n        // several disjoint runs.\n        const newMoreLinkSpans = addHiddenSliceToGroups(moreLinkGroups, slice);\n        if (moreLinkLevelTax) {\n            for (let i = newMoreLinkSpans.length - 1; i >= 0; i--) {\n                work.push({ type: 'moreLink', span: newMoreLinkSpans[i] });\n            }\n        }\n    }\n    /**\n     * Reserves one logical level over fresh accumulator coverage. The ordinary\n     * flow taxes the final level; span-local mode taxes the deepest level with\n     * an intersecting occupant, ignoring unrelated deeper territory.\n     */\n    function fireMoreLink(span) {\n        if (!sliceLevels.length) {\n            return;\n        }\n        let taxedLevelIndex = sliceLevels.length - 1;\n        let victims = findIntersections(sliceLevels[taxedLevelIndex], span);\n        if (taxDeepestOccupiedLevel) {\n            while (!victims.length && taxedLevelIndex > 0) {\n                taxedLevelIndex--;\n                victims = findIntersections(sliceLevels[taxedLevelIndex], span);\n            }\n        }\n        insertLaterally(moreLinkReservations, {\n            ...span,\n            levelIndex: taxedLevelIndex,\n        });\n        const taxedLevel = sliceLevels[taxedLevelIndex];\n        for (const victim of victims) {\n            taxedLevel.splice(taxedLevel.indexOf(victim), 1);\n            addedSliceSet.delete(victim);\n            if (eventSlicing) {\n                hide(intersectSlice(victim, span));\n                // The remainder has already satisfied the slicing requirement.\n                pushFire(subtractSpansFromSlice(victim, [span]), false);\n            }\n            else {\n                hide(victim);\n            }\n        }\n    }\n    /** Reversing preserves received order on the LIFO work stack. */\n    function pushFire(slices, requiresSlicing) {\n        for (let i = slices.length - 1; i >= 0; i--) {\n            work.push({ type: 'fire', slice: slices[i], requiresSlicing });\n        }\n    }\n}\n/** Returns the shallowest vacant level within the slice's fence, if any. */\nfunction findInsertionLevel(slice, state) {\n    const fence = computeLevelFence(slice, state);\n    for (let levelIndex = fence.min; levelIndex < fence.maxExclusive; levelIndex++) {\n        if (!findIntersections(state.levels[levelIndex], slice).length) {\n            return levelIndex;\n        }\n    }\n    return null;\n}\n/**\n * The level range where a slice may legally sit. The bottom reservation\n * closes its taxed level and everything deeper over link coverage; strict\n * event order additionally fences against intersecting neighbors' order.\n *\n * The pre-kernel SegHierarchy needed no upper fence: it inserted everything\n * in event order, so \"stay below anything you touch\" sufficed. Repacking\n * fires rejected extras after later-ordered slices are already committed,\n * which is what makes strict order two-sided here.\n */\nfunction computeLevelFence(slice, state) {\n    const { levels } = state;\n    let min = 0;\n    let maxExclusive = levels.length;\n    for (const reservation of findIntersections(state.moreLinkReservations, slice)) {\n        maxExclusive = Math.min(maxExclusive, reservation.levelIndex);\n    }\n    if (state.eventOrderStrict) {\n        for (let levelIndex = 0; levelIndex < levels.length; levelIndex++) {\n            for (const other of findIntersections(levels[levelIndex], slice)) {\n                if (other.sourceSeg.orderIndex < slice.sourceSeg.orderIndex) {\n                    min = Math.max(min, levelIndex + 1);\n                }\n                else if (other.sourceSeg.orderIndex > slice.sourceSeg.orderIndex) {\n                    maxExclusive = Math.min(maxExclusive, levelIndex);\n                }\n            }\n        }\n    }\n    return { min, maxExclusive };\n}\n/* ========================================================================\n * Slice plans\n * ===================================================================== */\nconst MAX_SLICES_PER_PLAN = 3;\nconst EXTRA_SLICE_PENALTY = 0.15;\n/**\n * Scores the best one-, two-, or three-run insertion offered by each level.\n * Runs from different levels are deliberately never mixed into one plan.\n */\nfunction findBestSlicePlan(slice, state, requiresSlicing) {\n    let selected = null;\n    const sourceLength = getSpanLength(slice);\n    for (let levelIndex = 0; levelIndex < state.levels.length; levelIndex++) {\n        // findIntersections returns a fresh, start-sorted array, and addToUnion\n        // replaces array contents without ever mutating a member, so link\n        // reservations can be folded in without touching the actual level.\n        const blockers = findIntersections(state.levels[levelIndex], slice);\n        for (const reservation of state.moreLinkReservations) {\n            if (levelIndex >= reservation.levelIndex) {\n                addToUnion(blockers, reservation);\n            }\n        }\n        const runs = subtractSpansFromSlice(slice, blockers)\n            .filter((run) => isWithinLevelFence(run, levelIndex, state))\n            .sort((a, b) => getSpanLength(b) - getSpanLength(a) || a.start - b.start);\n        let visibleLength = 0;\n        for (let sliceCount = 1; sliceCount <= Math.min(MAX_SLICES_PER_PLAN, runs.length); sliceCount++) {\n            visibleLength += getSpanLength(runs[sliceCount - 1]);\n            // Full exposure leaves no hidden coverage, and visible length only\n            // grows with more runs, so no longer plan can satisfy slicing either.\n            if (requiresSlicing &&\n                visibleLength >= sourceLength - GEOMETRY_TOLERANCE) {\n                break;\n            }\n            const candidate = {\n                levelIndex,\n                slices: runs.slice(0, sliceCount),\n                score: visibleLength / sourceLength -\n                    EXTRA_SLICE_PENALTY * (sliceCount - 1),\n            };\n            if (isBetterSlicePlan(candidate, selected)) {\n                selected = candidate;\n            }\n        }\n    }\n    if (selected) {\n        selected.slices.sort(compareByEventOrder);\n    }\n    return selected;\n}\n/** Whether a slice may legally sit at this level, per its own fence. */\nfunction isWithinLevelFence(slice, levelIndex, state) {\n    const fence = computeLevelFence(slice, state);\n    return levelIndex >= fence.min && levelIndex < fence.maxExclusive;\n}\n/** Comparison: score, then less fragmentation, then the shallower level. */\nfunction isBetterSlicePlan(candidate, current) {\n    if (!current || candidate.score > current.score) {\n        return true;\n    }\n    if (candidate.score < current.score) {\n        return false;\n    }\n    if (candidate.slices.length !== current.slices.length) {\n        return candidate.slices.length < current.slices.length;\n    }\n    return candidate.levelIndex < current.levelIndex;\n}\n/**\n * Merges strict lateral intersections into groups sorted by lateral start.\n * Each group's hidden slices are event-ordered.\n */\nfunction groupLaterallyIntersecting(hiddenSlices) {\n    const groups = [];\n    for (const slice of hiddenSlices) {\n        addHiddenSliceToGroups(groups, slice);\n    }\n    return finalizeHiddenGroups(groups);\n}\n/**\n * Adds one hidden slice to its strict-intersection component and returns only\n * the newly covered spans. Exactly adjacent groups deliberately stay separate\n * because each group corresponds to one independently rendered more link.\n * The group list remains sorted by lateral start.\n */\nfunction addHiddenSliceToGroups(groups, slice) {\n    const newSpans = subtractCoveredSpans(slice, groups);\n    const untouchedGroups = [];\n    const mergedSlices = [slice];\n    let start = slice.start;\n    let end = slice.end;\n    for (const group of groups) {\n        if (intersectSpans(group, slice)) {\n            mergedSlices.push(...group.hiddenSlices);\n            start = Math.min(start, group.start);\n            end = Math.max(end, group.end);\n        }\n        else {\n            untouchedGroups.push(group);\n        }\n    }\n    mergedSlices.sort(compareByEventOrder);\n    insertLaterally(untouchedGroups, {\n        start,\n        end,\n        hiddenSlices: mergedSlices,\n    });\n    groups.splice(0, groups.length, ...untouchedGroups);\n    return newSpans;\n}\n/**\n * Compiles internal accumulator groups for components: one entry per hidden\n * source event, in event order, spanning that source's fragment hull.\n */\nfunction finalizeHiddenGroups(groups) {\n    return groups.map((group) => {\n        const hiddenSlices = mergeAdjacentSlices(group.hiddenSlices);\n        return {\n            key: getSliceKey(hiddenSlices[0]),\n            start: group.start,\n            end: group.end,\n            hiddenSlices,\n        };\n    });\n}\n/* ========================================================================\n * Slice utilities\n * ===================================================================== */\n/**\n * Identifies a whole or partial slice derived from a source seg. Partial keys\n * deliberately omit the lateral end so a fragment re-cut at the same start\n * keeps its DOM wrapper. The re-cut fragment transiently reuses the previous\n * cut's measurement, which can mis-prune one pass; the structure still settles\n * because every fragment cut depends only on logical geometry — the same\n * wrapper just re-reports at its new width and the next pass corrects the\n * decision.\n */\nfunction getSliceKey(slice) {\n    if (!isPartialSlice(slice)) {\n        return slice.sourceSeg.key;\n    }\n    return `${slice.sourceSeg.key}:${slice.start}:slice`;\n}\nfunction isPartialSlice(slice) {\n    return slice.start !== slice.sourceSeg.start ||\n        slice.end !== slice.sourceSeg.end;\n}\nfunction compareByEventOrder(a, b) {\n    return a.sourceSeg.orderIndex - b.sourceSeg.orderIndex ||\n        a.start - b.start ||\n        b.end - a.end; // longer events first\n}\nfunction sortByEventOrder(slices) {\n    return [...slices].sort(compareByEventOrder);\n}\n/** Orders by axis start, then resolved event order. */\nfunction compareByAxisOrder(a, b) {\n    return a.start - b.start ||\n        a.sourceSeg.orderIndex - b.sourceSeg.orderIndex;\n}\nfunction sortByAxisOrder(items) {\n    return [...items].sort(compareByAxisOrder);\n}\n/**\n * Collapses same-source runs of an event-ordered slice list into one slice\n * per run spanning the run's lateral hull. The hull can bridge territory\n * where the source is actually visible; consumers derive start/end\n * continuity from the outermost hidden edges, not exact hidden coverage.\n */\nfunction mergeAdjacentSlices(slices) {\n    const merged = [];\n    for (const slice of slices) {\n        const previous = merged[merged.length - 1];\n        if (previous && previous.sourceSeg === slice.sourceSeg) {\n            merged[merged.length - 1] = createNarrowerSlice(createWholeSlice(previous.sourceSeg), previous.start, Math.max(previous.end, slice.end));\n        }\n        else {\n            merged.push(slice);\n        }\n    }\n    return merged;\n}\n/**\n * Removes covered spans from a slice, returning identity-preserving\n * remainders. Like `subtractCoveredSpans`, the covered spans must be sorted\n * by start and pairwise non-overlapping — every caller already holds them\n * that way (plan slices, union blockers, a single span).\n */\nfunction subtractSpansFromSlice(slice, covered) {\n    return subtractCoveredSpans(slice, covered).map((span) => createNarrowerSlice(slice, span.start, span.end));\n}\n/** Finds the strict intersection while retaining source identity. */\nfunction intersectSlice(slice, barrier) {\n    const intersection = intersectSpans(slice, barrier);\n    return intersection\n        ? createNarrowerSlice(slice, intersection.start, intersection.end)\n        : null;\n}\nfunction createWholeSlice(sourceSeg) {\n    return {\n        sourceSeg,\n        start: sourceSeg.start,\n        end: sourceSeg.end,\n        isStart: sourceSeg.isStart,\n        isEnd: sourceSeg.isEnd,\n    };\n}\nfunction createNarrowerSlice(parent, start, end) {\n    return {\n        sourceSeg: parent.sourceSeg,\n        start,\n        end,\n        isStart: parent.isStart && start === parent.start,\n        isEnd: parent.isEnd && end === parent.end,\n    };\n}\n\nconst DEFAULT_UNMEASURED_EVENT_AREA_HEIGHT = 150;\n/** Initial DOM candidate frontier, before any measurement can widen it. */\nconst DEFAULT_LEVEL_CAPACITY = estimateLevelCapacity(DEFAULT_UNMEASURED_EVENT_AREA_HEIGHT, DEFAULT_UNMEASURED_EVENT_THICKNESS);\n/** Converts sorted production ranges into the shared source vocabulary. */\nfunction buildDayGridSegSources(eventOrderedSegs) {\n    return eventOrderedSegs.map((seg, orderIndex) => ({\n        ...seg,\n        key: getDayGridSegKey(seg),\n        orderIndex,\n    }));\n}\n/**\n * Builds an immediately renderable kernel layout for unlimited and numeric\n * DayGrid modes. Boolean-auto uses the pixel-limited adapter below.\n */\nfunction buildDayGridLevelPlacements(eventOrderedSegs, maxLevels, moreLinkLevelTax, orderStrict, eventSlicing, columnCount, sliceHeights) {\n    const sourceSegs = buildDayGridSegSources(eventOrderedSegs);\n    const layout = buildLevelLimitedLayout(sourceSegs, orderStrict, eventSlicing, maxLevels, moreLinkLevelTax, sliceHeights);\n    return buildDayGridPlacementLayout(sourceSegs, layout, sliceHeights, columnCount);\n}\n/** Builds the boolean-auto DayGrid route with a real pixel ceiling. */\nfunction buildDayGridPixelPlacements(eventOrderedSegs, orderStrict, eventSlicing, columnCount, canvasHeight, moreLinkHeight, levelCapacity, sliceHeights) {\n    const sourceSegs = buildDayGridSegSources(eventOrderedSegs);\n    const layout = buildPixelLimitedLayout(sourceSegs, orderStrict, eventSlicing, sliceHeights, canvasHeight, levelCapacity, moreLinkHeight);\n    return buildDayGridPlacementLayout(sourceSegs, layout, sliceHeights, columnCount);\n}\n/** Projects ordered sources and event-ordered hidden slices into one cell. */\nfunction buildDayGridPopoverSegs(eventOrderedSegs, hiddenSlices, column) {\n    return {\n        segs: flatMapArray(eventOrderedSegs, (source) => cutSegToColumn(source, column) ?? []),\n        hiddenSegs: flatMapArray(hiddenSlices, (slice) => cutSegToColumn(slice.sourceSeg, column, slice) ?? []),\n    };\n}\n/**\n * Projects one complete source onto a column when its relevant span intersects.\n *\n * The optional span lets a hidden slice control membership while real event\n * boundaries still control whether the projected entry reports \"continues.\"\n */\nfunction cutSegToColumn(source, column, intersectionSpan = source) {\n    if (intersectionSpan.start >= column + 1 ||\n        column >= intersectionSpan.end)\n        return null;\n    const { key, orderIndex, ...seg } = source;\n    return {\n        ...seg,\n        start: column,\n        end: column + 1,\n        isStart: seg.isStart && source.start === column,\n        isEnd: seg.isEnd && source.end - 1 === column,\n    };\n}\n/**\n * Resolves which measured route a row takes from the two max options.\n *\n * This is the single definition of production's option precedence: a boolean\n * `true` on either option means auto, and only then does a number on either\n * one apply, `dayMaxEvents` first.\n */\nfunction resolveDayGridPlacementMode(dayMaxEvents, dayMaxEventRows) {\n    if (dayMaxEvents === true || dayMaxEventRows === true) {\n        return 'auto';\n    }\n    if (typeof dayMaxEvents === 'number') {\n        return 'maxEvents';\n    }\n    if (typeof dayMaxEventRows === 'number') {\n        return 'maxEventRows';\n    }\n    return 'unlimited';\n}\n/**\n * Computes the dimensionless DOM frontier from an already-resolved mode,\n * without applying more-link tax. Numeric limits own their explicit cap;\n * unlimited rows mount all sources; boolean-auto rows consume their row-local\n * observed frontier.\n */\nfunction computeDayGridDomCandidateMaxLevels(mode, dayMaxEvents, dayMaxEventRows, maxDomLevels) {\n    switch (mode) {\n        case 'auto': return maxDomLevels;\n        case 'maxEvents': return dayMaxEvents;\n        case 'maxEventRows': return dayMaxEventRows;\n        default: return Infinity;\n    }\n}\n/**\n * Logical levels an active more link charges its column. Only `dayMaxEventRows`\n * counts the link as one of its rows.\n */\nfunction computeDayGridMoreLinkLevelTax(mode) {\n    return mode === 'maxEventRows' ? 1 : 0;\n}\nfunction buildDayGridPlacementLayout(sourceSegs, layout, sliceHeights, columnCount) {\n    const { hiddenSlices, renderSlices, sliceCoords, } = layout;\n    const eventOrderedHiddenSlices = sortByEventOrder(hiddenSlices);\n    const slicesByStart = federateSlicesByStart(renderSlices, columnCount);\n    const columns = Array.from({ length: columnCount }, (_, column) => ({\n        // Freshly built per column by federateSlicesByStart; owned outright.\n        renderSlices: slicesByStart[column],\n        contentHeight: 0,\n        ...buildDayGridPopoverSegs(sourceSegs, eventOrderedHiddenSlices, column),\n    }));\n    // A mounted slice is visible exactly when it has a coordinate; a coordinate\n    // in turn guarantees a measurement.\n    for (const slice of renderSlices) {\n        const key = getSliceKey(slice);\n        const sliceTop = sliceCoords.get(key);\n        if (sliceTop === undefined) {\n            continue;\n        }\n        const sliceBottom = sliceTop + sliceHeights.get(key);\n        for (let column = slice.start; column < slice.end; column += 1) {\n            columns[column].contentHeight = Math.max(columns[column].contentHeight, sliceBottom);\n        }\n    }\n    return {\n        columns,\n        sliceCoords,\n    };\n}\nfunction federateSlicesByStart(renderSlices, columnCount) {\n    const slicesByStart = Array.from({ length: columnCount }, () => []);\n    for (const slice of renderSlices) {\n        slicesByStart[slice.start].push(slice);\n    }\n    for (const slices of slicesByStart) {\n        slices.sort(compareByEventOrder);\n    }\n    return slicesByStart;\n}\nfunction estimateLevelCapacity(eventAreaHeight, eventHeight) {\n    return Math.max(1, Math.ceil(eventAreaHeight / eventHeight));\n}\n\n/** High but finite safety cap for event levels in either print view. */\nconst DEFAULT_PRINT_MAX_LEVELS = 200;\nfunction planPrintDomCandidates(eventOrderedSegs, eventOrderStrict, eventSlicing) {\n    const { segLevels, excludedSegs } = buildSegLevels(eventOrderedSegs, eventOrderStrict, DEFAULT_PRINT_MAX_LEVELS);\n    const placement = placeExtraSlicesInLevels(convertSegLevelsToWholeSlices(segLevels), convertSegsToWholeSlices(excludedSegs), eventOrderStrict, eventSlicing, 0);\n    return {\n        sliceLevels: placement.sliceLevels,\n        hiddenSlices: placement.hiddenSlices,\n    };\n}\n/**\n * Projects dimensionless levels into independently page-breakable bands.\n *\n * The level entries may carry unit-thickness planning coordinates, but those\n * coordinates have no print meaning. Every print slice begins at level\n * coordinate zero in its own band, whose thickness is the largest current\n * slice-wrapper measurement. Missing measurements use the supplied fallback.\n * Empty or sparse levels do not create empty DOM bands. The key resolver lets\n * adapters retain their wrapper-level measurement identity.\n */\nfunction buildPrintEventBands(levels, printEventThicknesses, getPrintEventKey = (slice) => slice.sourceSeg.key, defaultPrintEventThickness = DEFAULT_UNMEASURED_EVENT_THICKNESS) {\n    const bands = [];\n    for (let levelIndex = 0; levelIndex < levels.length; levelIndex++) {\n        const entries = levels[levelIndex];\n        if (!entries?.length)\n            continue;\n        let thickness = 0;\n        const slices = entries.map((slice) => {\n            thickness = Math.max(thickness, printEventThicknesses.get(getPrintEventKey(slice)) ??\n                defaultPrintEventThickness);\n            return slice;\n        });\n        bands.push({\n            levelIndex,\n            slices,\n            thickness,\n        });\n    }\n    return bands;\n}\n/** Builds Timeline's one final print more-link band when hidden groups exist. */\nfunction buildPrintMoreLinkBand(hiddenGroups, printMoreLinkHeights) {\n    if (!hiddenGroups.length) {\n        return null;\n    }\n    // Group members arrive event-ordered, with the first member defining the key.\n    return {\n        moreLinkGroups: hiddenGroups,\n        thickness: Math.max(...hiddenGroups.map((group) => printMoreLinkHeights.get(group.key) ??\n            DEFAULT_UNMEASURED_MORE_LINK_THICKNESS)),\n    };\n}\n\n/** Plans one print row from its complete, resolved-order source list. */\nfunction buildDayGridPrintPlan(eventOrderedSegs, orderStrict, eventSlicing, columnCount) {\n    const sourceSegs = buildDayGridSegSources(eventOrderedSegs);\n    const candidatePlan = planPrintDomCandidates(sourceSegs, orderStrict, eventSlicing);\n    return {\n        ...candidatePlan,\n        hiddenSlices: sortByEventOrder(candidatePlan.hiddenSlices),\n        sourceSegs,\n        columnCount,\n    };\n}\n/** Transposes row-wide print bands into one aligned slot sequence per cell. */\nfunction buildDayGridPrintColumns(plan, printSegHeights) {\n    const columns = Array.from({ length: plan.columnCount }, () => []);\n    for (const band of buildPrintEventBands(plan.sliceLevels, printSegHeights, getDayGridPrintSliceKey)) {\n        const slicesByColumn = Array(plan.columnCount).fill(null);\n        for (const slice of band.slices) {\n            slicesByColumn[slice.start] = slice;\n        }\n        for (let column = 0; column < plan.columnCount; column++) {\n            columns[column].push({\n                levelIndex: band.levelIndex,\n                thickness: band.thickness,\n                slice: slicesByColumn[column],\n            });\n        }\n    }\n    return columns;\n}\n/** Stable identity for one print wrapper when a source is split laterally. */\nfunction getDayGridPrintSliceKey(slice) {\n    return `${slice.sourceSeg.key}:${slice.start}:${slice.end}`;\n}\n\nconst DEFAULT_WEEK_NUM_FORMAT = createFormatter({ week: 'narrow' });\nclass DayGridRow extends BaseComponent {\n    constructor() {\n        super(...arguments);\n        // ref\n        this.headerHeightRefMap = new RefMap(() => {\n            afterSize(this.handleSegPositioning);\n        });\n        this.mainHeightRefMap = new RefMap(() => {\n            // Recorded in every screen mode so a row that becomes liquid already knows its\n            // ceiling, but only a liquid row's placement depends on it.\n            const fgLiquidHeight = this.props.dayMaxEvents === true || this.props.dayMaxEventRows === true;\n            if (fgLiquidHeight) {\n                afterSize(this.handleSegPositioning);\n            }\n        });\n        // Every screen slice (whole or partial) reports its occupied height here.\n        this.sliceHeightRefMap = new RefMap(() => {\n            afterSize(this.handleSegPositioning);\n        });\n        // print-only (band thickness is row-wide while slots render per-cell, so\n        // this state must live here; see also buildPrintPlan, renderPrintBandSlots,\n        // handlePrintSegHeights, and the reset in componentDidUpdate)\n        this.handlePrintSegHeightChange = () => {\n            afterSize(this.handlePrintSegHeights);\n        };\n        this.printSegHeightRefMap = new RefMap(this.handlePrintSegHeightChange);\n        // memo\n        this.buildWeekNumberRenderProps = memoize(buildWeekNumberRenderProps);\n        this.buildPrintPlan = memoize(buildDayGridPrintPlan);\n        this.sortEventSegs = memoize(sortEventSegs);\n        this.levelCapacity = DEFAULT_LEVEL_CAPACITY;\n        // React 18 Strict Mode replays mount lifecycles without reattaching DOM refs.\n        // Keep height observation and cleanup tied to the DOM ref.\n        this.handleRootEl = (rootEl) => {\n            this.disconnectHeight?.();\n            this.disconnectHeight = undefined;\n            setRef(this.props.rootElRef, rootEl);\n            if (rootEl) {\n                this.disconnectHeight = watchHeight(rootEl, (contentHeight) => {\n                    setRef(this.props.heightRef, contentHeight);\n                });\n            }\n            else {\n                setRef(this.props.heightRef, null);\n            }\n        };\n        this.handleSegPositioning = () => {\n            if (this._isUnmounting || this.props.forPrint)\n                return;\n            this.updateAutoPlacementRatchets();\n            this.forceUpdate();\n        };\n        this.handlePrintSegHeights = () => {\n            if (this._isUnmounting || !this.props.forPrint)\n                return;\n            this.forceUpdate();\n        };\n    }\n    render() {\n        const { props, context, headerHeightRefMap, mainHeightRefMap } = this;\n        const { cells, tableMode } = props;\n        const { options } = context;\n        const weekDateMarker = props.cells[0].date;\n        const fgEventSegs = this.sortEventSegs(props.fgEventSegs, options.eventOrder);\n        const screenFgLiquidHeight = props.dayMaxEvents === true || props.dayMaxEventRows === true;\n        let printPlan = null;\n        let printColumns = null;\n        let screenColumns = null;\n        let screenSliceCoords = new Map();\n        let screenMainOffsetsByCol = [];\n        let screenHeightsByCol = [];\n        if (props.forPrint) {\n            printPlan = this.buildPrintPlan(fgEventSegs, options.eventOrderStrict, options.eventSlicing, cells.length);\n            printColumns = buildDayGridPrintColumns(printPlan, this.printSegHeightRefMap.current);\n        }\n        else {\n            const placementMode = resolveDayGridPlacementMode(props.dayMaxEvents, props.dayMaxEventRows);\n            const [maxMainTop, minMainHeight] = this.computeFgDims();\n            const screenLayout = placementMode === 'auto'\n                ? buildDayGridPixelPlacements(fgEventSegs, options.eventOrderStrict, options.eventSlicing, cells.length, minMainHeight, props.moreLinkHeight, this.levelCapacity, this.sliceHeightRefMap.current)\n                : buildDayGridLevelPlacements(fgEventSegs, computeDayGridDomCandidateMaxLevels(placementMode, props.dayMaxEvents, props.dayMaxEventRows, Infinity), computeDayGridMoreLinkLevelTax(placementMode), options.eventOrderStrict, options.eventSlicing, cells.length, this.sliceHeightRefMap.current);\n            screenColumns = screenLayout.columns;\n            screenSliceCoords = screenLayout.sliceCoords;\n            if (maxMainTop != null) {\n                for (let col = 0; col < cells.length; col++) {\n                    const cellHeaderHeight = headerHeightRefMap.current.get(cells[col].key);\n                    const mainOffset = cellHeaderHeight != null\n                        ? maxMainTop - cellHeaderHeight\n                        : undefined;\n                    screenMainOffsetsByCol.push(mainOffset);\n                    screenHeightsByCol.push(mainOffset != null\n                        ? screenColumns[col].contentHeight + mainOffset\n                        : undefined);\n                }\n            }\n        }\n        const highlightSegs = this.getHighlightSegs();\n        const hasNavLink = options.navLinks;\n        const fullWeekStr = buildDateStr(context, weekDateMarker, 'week');\n        const weekNumberRenderProps = this.buildWeekNumberRenderProps(weekDateMarker, context, props.cellIsNarrow, hasNavLink);\n        const fillsByCol = cells.map(() => []);\n        // Table mode gives this theme-positioned node a row-wide canvas hosted by the first cell.\n        const weekNumberNode = (props.showWeekNumbers && !props.cellIsMicro) ? (jsx(ContentContainer, { tag: \"div\", attrs: {\n                ...(hasNavLink\n                    ? buildNavLinkAttrs(context, weekDateMarker, 'week', fullWeekStr, \n                    /* isTabbable = */ false)\n                    : {}),\n                'role': undefined, // HACK: a 'link' role can't be child of a 'row' role\n                'aria-hidden': true, // HACK: never part of a11y tree because row already has label and role not allowed\n            }, className: DAY_GRID_EVENT_Z_CLASS, renderProps: weekNumberRenderProps, generatorName: \"inlineWeekNumberContent\", customGenerator: options.inlineWeekNumberContent, defaultGenerator: renderText$1, classNameGenerator: options.inlineWeekNumberClass, didMount: options.inlineWeekNumberDidMount, willUnmount: options.inlineWeekNumberWillUnmount })) : null;\n        if (tableMode && weekNumberNode) {\n            fillsByCol[0].push(jsx(\"div\", { className: joinClassNames(classNames.fillY, classNames.start0, classNames.pointerEventsNone), style: {\n                    width: this.computeSpanWidth(0, cells.length),\n                }, children: weekNumberNode }, \"week-number\"));\n        }\n        this.appendFillSegs(fillsByCol, props.businessHourSegs, 'non-business', DAY_GRID_NON_BUSINESS_Z_CLASS);\n        this.appendFillSegs(fillsByCol, props.bgEventSegs, 'bg-event', DAY_GRID_BG_EVENT_Z_CLASS);\n        this.appendFillSegs(fillsByCol, highlightSegs, 'highlight', DAY_GRID_HIGHLIGHT_Z_CLASS);\n        const RowTag = tableMode ? 'tr' : 'div';\n        return (jsxs(RowTag, { role: props.role /* !!! */, \"aria-label\": props.role === 'row' // HACK\n                ? fullWeekStr\n                : undefined // can't have label on non-role div\n            , className: joinClassNames(options.dayRowClass, props.className, tableMode && classNames.borderless, !tableMode && classNames.flexRow, !tableMode && classNames.rel, // origin for the inline week number\n            !tableMode && classNames.borderlessX, !tableMode && classNames.borderlessTop, (!tableMode && !props.borderBottom) && classNames.borderlessBottom, classNames.isolate), style: {\n                flexBasis: tableMode ? undefined : props.basis,\n            }, ref: this.handleRootEl, children: [!tableMode && weekNumberNode, props.cells.map((cell, col) => {\n                    const printPopover = printPlan\n                        ? buildDayGridPopoverSegs(printPlan.sourceSegs, printPlan.hiddenSlices, col)\n                        : null;\n                    const screenRenderSlices = printPlan ? null : screenColumns[col].renderSlices;\n                    let fg;\n                    if (printPlan) {\n                        fg = this.renderPrintBandSlots(printColumns[col]);\n                    }\n                    else {\n                        fg = [\n                            ...this.renderLevelFgSegs(screenMainOffsetsByCol[col], screenRenderSlices, screenSliceCoords),\n                            ...this.renderMirrorFgSegs(col, screenMainOffsetsByCol[col], screenSliceCoords),\n                        ];\n                    }\n                    return (jsx(DayGridCell, { dateProfile: props.dateProfile, todayRange: props.todayRange, date: cell.date, isMajor: cell.isMajor, isDisabled: cell.isDisabled, showDayNumber: props.showDayNumbers, isNarrow: props.cellIsNarrow, isMicro: props.cellIsMicro, borderStart: Boolean(col), borderBottom: props.borderBottom, tableMode: tableMode, \n                        // content\n                        fills: fillsByCol[col], segs: printPopover ? printPopover.segs : screenColumns[col].segs, hiddenSegs: printPopover ? printPopover.hiddenSegs : screenColumns[col].hiddenSegs, fgLiquidHeight: printPlan ? false : screenFgLiquidHeight, fg: fg, fgIsList: Boolean(screenRenderSlices?.length), eventDrag: printPlan ? null : props.eventDrag, eventResize: printPlan ? null : props.eventResize, eventSelection: props.eventSelection, \n                        // render hooks\n                        renderProps: cell.renderProps, dateSpanProps: cell.dateSpanProps, attrs: cell.attrs, className: cell.className, \n                        // dimensions\n                        fgHeight: printPlan ? undefined : screenHeightsByCol[col], width: props.colWidth, \n                        // refs\n                        headerHeightRef: printPlan ? undefined : headerHeightRefMap.createRef(cell.key), mainHeightRef: printPlan ? undefined : mainHeightRefMap.createRef(cell.key) }, cell.key));\n                })] }));\n    }\n    /** Mirrors align with kernel coordinates but bypass admission and measurement. */\n    renderMirrorFgSegs(col, mainOffset, sliceCoords) {\n        const { props } = this;\n        const { eventSelection } = props;\n        const nodes = [];\n        for (const seg of this.getMirrorSegs()) {\n            if (seg.start !== col) {\n                continue;\n            }\n            const key = getDayGridSegKey(seg);\n            const { eventRange } = seg;\n            const { instanceId } = eventRange.instance;\n            const top = mainOffset != null\n                ? mainOffset + (sliceCoords.get(key) ?? 0)\n                : undefined;\n            const isDragging = Boolean(props.eventDrag && props.eventDrag.affectedInstances[instanceId]);\n            const isResizing = Boolean(props.eventResize && props.eventResize.affectedInstances[instanceId]);\n            const isSelected = instanceId === eventSelection;\n            nodes.push(jsx(MeasuredHeightHarness, { attrs: { 'aria-hidden': true }, className: joinClassNames(classNames.abs, classNames.start0, DAY_GRID_INTERACTION_Z_CLASS), style: {\n                    top,\n                    width: this.computeSpanWidth(seg.start, seg.end),\n                }, heightRef: null, children: this.renderEventContent(seg, eventRange, {\n                    isDragging,\n                    isResizing,\n                    isMirror: true,\n                    isSelected,\n                }) }, `mirror:${key}`));\n        }\n        return nodes;\n    }\n    /** Renders every kernel slice with its own measurement ref. */\n    renderLevelFgSegs(mainOffset, slices, sliceCoords) {\n        const { props } = this;\n        const { eventSelection } = props;\n        const nodes = [];\n        for (const slice of slices) {\n            const key = getSliceKey(slice);\n            const sliceTop = sliceCoords.get(key);\n            const { eventRange } = slice.sourceSeg;\n            const { instanceId } = eventRange.instance;\n            const top = mainOffset != null && sliceTop != null\n                ? mainOffset + sliceTop\n                : undefined;\n            const isDragging = Boolean(props.eventDrag && props.eventDrag.affectedInstances[instanceId]);\n            const isResizing = Boolean(props.eventResize && props.eventResize.affectedInstances[instanceId]);\n            const isInvisible = isDragging || isResizing || top == null;\n            const isSelected = instanceId === eventSelection;\n            nodes.push(jsx(MeasuredHeightHarness, { attrs: { role: 'listitem' }, className: joinClassNames(classNames.abs, classNames.start0, isSelected ? DAY_GRID_INTERACTION_Z_CLASS : DAY_GRID_EVENT_Z_CLASS), style: {\n                    visibility: isInvisible ? 'hidden' : undefined,\n                    top,\n                    width: this.computeSpanWidth(slice.start, slice.end),\n                }, heightRef: this.sliceHeightRefMap.createRef(key), children: this.renderEventContent(slice, eventRange, {\n                    isDragging,\n                    isResizing,\n                    isSelected,\n                }) }, key));\n        }\n        return nodes;\n    }\n    /**\n     * The inner event, identical on both placement routes. Only the wrapper\n     * around it differs: the screen route positions it, print lets it sit at the\n     * static top of its band slot.\n    */\n    renderEventContent(range, eventRange, interaction) {\n        const { props } = this;\n        const isListItem = hasListItemDisplay(range, eventRange);\n        // the range's starting cell supplies extra render props\n        const cellRenderProps = props.cells[range.start]?.renderProps;\n        return (jsx(StandardEvent, { display: isListItem ? 'list-item' : 'row', eventRange: eventRange, isStart: range.isStart, isEnd: range.isEnd, isDragging: Boolean(interaction.isDragging), isResizing: Boolean(interaction.isResizing), isMirror: Boolean(interaction.isMirror), isSelected: Boolean(interaction.isSelected), isNarrow: props.cellIsNarrow, defaultTimeFormat: DEFAULT_TABLE_EVENT_TIME_FORMAT, defaultDisplayEventEnd: props.cells.length === 1, disableResizing: isListItem, forcedTimeText: props.cellIsMicro ? '' : undefined, renderProps: cellRenderProps, ...getEventRangeMeta(eventRange, props.todayRange) }));\n    }\n    /** Renders aligned print slots with in-flow event wrappers that can paginate with their bands. */\n    renderPrintBandSlots(slots) {\n        const { printSegHeightRefMap } = this;\n        return slots.map((slot) => {\n            const { slice } = slot;\n            let eventNode = null;\n            if (slice) {\n                const sliceKey = getDayGridPrintSliceKey(slice);\n                eventNode = (jsx(MeasuredHeightHarness, { className: joinClassNames(classNames.rel, classNames.flowRoot, DAY_GRID_EVENT_Z_CLASS), style: {\n                        width: this.computeSpanWidth(slice.start, slice.end),\n                    }, heightRef: printSegHeightRefMap.createRef(sliceKey), children: this.renderEventContent(slice, slice.sourceSeg.eventRange, {}) }, sliceKey));\n            }\n            return (jsx(\"div\", { className: classNames.breakInsideAvoid, style: { height: slot.thickness }, children: eventNode }, slot.levelIndex));\n        });\n    }\n    computeSpanWidth(start, end) {\n        const span = end - start;\n        const percentWidth = `${span * 100}%`;\n        // Flex cells have uniform inner widths, so spans must add crossed borders.\n        // Fixed-table cells have uniform outer widths; the borderless first cell's inner\n        // width already includes that space, so no border compensation is needed.\n        const crossedBorderWidth = this.props.tableMode && start === 0\n            ? 0\n            : Math.max(0, span - 1) * COL_BORDER_WIDTH;\n        return crossedBorderWidth\n            ? `calc(${percentWidth} + ${crossedBorderWidth}px)`\n            : percentWidth;\n    }\n    /** Places each fill in its first cell while allowing its wrapper to span subsequent cells. */\n    appendFillSegs(fillsByCol, segs, fillType, zClassName) {\n        const { props, context } = this;\n        const { todayRange } = props;\n        for (const seg of segs) {\n            fillsByCol[seg.start].push(jsx(\"div\", { \"aria-hidden\": true, className: joinClassNames(classNames.fillY, classNames.start0, zClassName), style: {\n                    width: this.computeSpanWidth(seg.start, seg.end),\n                }, children: fillType === 'bg-event' ?\n                    jsx(BgEvent, { eventRange: seg.eventRange, isStart: seg.isStart, isEnd: seg.isEnd, isNarrow: props.cellIsNarrow, isVertical: false, renderProps: props.cells[seg.start]?.renderProps, ...getEventRangeMeta(seg.eventRange, todayRange) }) : (renderFill(fillType, context.options)) }, `${fillType}:${buildEventRangeKey(seg.eventRange)}:${seg.start}:${seg.end}`));\n        }\n    }\n    // Sizing\n    // -----------------------------------------------------------------------------------------------\n    componentDidMount() {\n        this._isUnmounting = false;\n    }\n    componentDidUpdate(prevProps) {\n        if (prevProps.forPrint && !this.props.forPrint) {\n            this.printSegHeightRefMap = new RefMap(this.handlePrintSegHeightChange);\n        }\n    }\n    componentWillUnmount() {\n        this._isUnmounting = true;\n    }\n    computeFgDims() {\n        const { cells } = this.props;\n        const headerHeightMap = this.headerHeightRefMap.current;\n        const mainHeightMap = this.mainHeightRefMap.current;\n        let maxMainTop;\n        let minMainBottom;\n        let isComplete = true;\n        for (const cell of cells) {\n            if (cell.isDisabled) {\n                continue;\n            }\n            const mainTop = headerHeightMap.get(cell.key);\n            const mainHeight = mainHeightMap.get(cell.key);\n            if (mainTop == null || mainHeight == null) {\n                isComplete = false;\n            }\n            if (mainTop != null) {\n                if (maxMainTop === undefined || mainTop > maxMainTop) {\n                    maxMainTop = mainTop;\n                }\n                if (mainHeight != null) {\n                    const mainBottom = mainTop + mainHeight;\n                    if (minMainBottom === undefined || mainBottom < minMainBottom) {\n                        minMainBottom = mainBottom;\n                    }\n                }\n            }\n        }\n        return [\n            maxMainTop,\n            isComplete && minMainBottom != null && maxMainTop != null\n                ? minMainBottom - maxMainTop\n                : undefined,\n        ];\n    }\n    /**\n     * Grows the row-local DOM candidate frontier from one post-size snapshot.\n     * This is the only monotone state auto placement needs: the engine itself\n     * consumes exact measurements and never predicts a thickness.\n     */\n    updateAutoPlacementRatchets() {\n        if (resolveDayGridPlacementMode(this.props.dayMaxEvents, this.props.dayMaxEventRows) !== 'auto')\n            return;\n        const [, canvasHeight] = this.computeFgDims();\n        if (canvasHeight != null) {\n            const smallestSliceHeight = Math.min(...this.sliceHeightRefMap.current.values());\n            this.levelCapacity = Math.max(this.levelCapacity, estimateLevelCapacity(canvasHeight, smallestSliceHeight));\n        }\n    }\n    // Internal Utils\n    // -----------------------------------------------------------------------------------------------\n    getMirrorSegs() {\n        let { props } = this;\n        if (props.eventResize && props.eventResize.segs.length) { // messy check\n            return props.eventResize.segs;\n        }\n        return [];\n    }\n    getHighlightSegs() {\n        let { props } = this;\n        if (props.eventDrag && props.eventDrag.segs.length) { // messy check\n            return props.eventDrag.segs;\n        }\n        if (props.eventResize && props.eventResize.segs.length) { // messy check\n            return props.eventResize.segs;\n        }\n        return props.dateSelectionSegs;\n    }\n}\nfunction buildWeekNumberRenderProps(weekDateMarker, context, isNarrow, hasNavLink) {\n    const { dateEnv, options } = context;\n    const weekNum = dateEnv.computeWeekNumber(weekDateMarker);\n    const weekNumTextParts = dateEnv.formatToParts(weekDateMarker, options.weekNumberFormat || DEFAULT_WEEK_NUM_FORMAT);\n    const weekNumText = joinDateTimeFormatParts(weekNumTextParts);\n    const weekDateZoned = dateEnv.toDate(weekDateMarker);\n    return {\n        num: weekNum,\n        text: weekNumText,\n        textParts: weekNumTextParts,\n        date: weekDateZoned,\n        isNarrow,\n        hasNavLink,\n    };\n}\n\nclass DaySeriesModel {\n    constructor(range, dateProfileGenerator) {\n        let date = range.start;\n        let { end } = range;\n        let entries = [];\n        let dates = [];\n        let dayIndex = -1;\n        while (date < end) { // loop each day from start to end\n            if (dateProfileGenerator.isHiddenDay(date)) {\n                entries.push({\n                    kind: 'hidden',\n                    previousIndex: dayIndex,\n                    nextIndex: dayIndex + 1,\n                });\n            }\n            else {\n                dayIndex += 1;\n                entries.push({ kind: 'visible', index: dayIndex });\n                dates.push(date);\n            }\n            date = addDays(date, 1);\n        }\n        this.rangeStart = range.start;\n        this.dates = dates;\n        this.entries = entries;\n        this.cnt = dates.length;\n    }\n    sliceRange(range) {\n        let firstResult = this.getDateIndex(range.start);\n        let lastResult = this.getDateIndex(addDays(range.end, -1));\n        let firstIndex = getFirstVisibleIndex(firstResult);\n        let lastIndex = getLastVisibleIndex(lastResult);\n        let clippedFirstIndex = Math.max(0, firstIndex);\n        let clippedLastIndex = Math.min(this.cnt - 1, lastIndex);\n        if (clippedFirstIndex <= clippedLastIndex) {\n            return {\n                start: clippedFirstIndex,\n                end: clippedLastIndex + 1, // make exclusive\n                isStart: firstResult.kind === 'visible' && firstIndex === clippedFirstIndex,\n                isEnd: lastResult.kind === 'visible' && lastIndex === clippedLastIndex,\n            };\n        }\n        return null;\n    }\n    getDateIndex(date) {\n        let dayOffset = Math.floor(diffDays(this.rangeStart, date));\n        if (dayOffset < 0) {\n            return { kind: 'before', index: -1 };\n        }\n        if (dayOffset >= this.entries.length) {\n            return { kind: 'after', index: this.cnt };\n        }\n        return this.entries[dayOffset];\n    }\n}\nfunction getFirstVisibleIndex(result) {\n    return result.kind === 'hidden' ? result.nextIndex : result.index;\n}\nfunction getLastVisibleIndex(result) {\n    return result.kind === 'hidden' ? result.previousIndex : result.index;\n}\n\nfunction buildDayTableModel(dateProfile, dateProfileGenerator, dateEnv) {\n    const daySeries = new DaySeriesModel(dateProfile.renderRange, dateProfileGenerator);\n    const breakOnWeeks = /year|month|week/.test(dateProfile.currentRangeUnit);\n    const majorUnit = !breakOnWeeks && computeMajorUnit(dateProfile, dateEnv);\n    // Exclude 'day': when cells are themselves days, all would match and the boundary\n    // distinction is meaningless (unlike timeline slots which can be sub-day).\n    return new DayTableModel(daySeries, breakOnWeeks, dateEnv, majorUnit !== 'day' ? majorUnit : undefined, dateProfile.activeRange);\n}\nfunction computeColWidth(colCount, colMinWidth, viewportWidth) {\n    if (viewportWidth == null) {\n        return [undefined, undefined];\n    }\n    const colTempWidth = viewportWidth / colCount;\n    if (colTempWidth < colMinWidth) {\n        return [colMinWidth * colCount, colMinWidth];\n    }\n    return [viewportWidth, undefined];\n}\n// Positioning\n// -------------------------------------------------------------------------------------------------\n/*\nTODO: handle hidden-days better. If current day is hidden day, scrolls to way bottom\n*/\nfunction computeTopFromDate(date, cellRows, rowHeightMap) {\n    let top = 0;\n    for (const cells of cellRows) {\n        const key = cells[0].key;\n        const start = cells[0].date;\n        const end = cells[cells.length - 1].date; // inclusive end\n        if (date >= start && date <= end) {\n            return top;\n        }\n        const rowHeight = rowHeightMap.get(key);\n        if (rowHeight == null) {\n            return; // denote unknown\n        }\n        top += rowHeight;\n    }\n    return top;\n}\nfunction computeColFromPosition(positionLeft, elWidth, colWidth, colCount, isRtl) {\n    const realColWidth = colWidth != null ? colWidth : elWidth / colCount;\n    const colFromLeft = Math.floor(positionLeft / realColWidth);\n    const col = isRtl ? (colCount - colFromLeft - 1) : colFromLeft;\n    const left = colFromLeft * realColWidth;\n    const right = left + realColWidth;\n    return { col, left, right };\n}\nfunction computeRowFromPosition(positionTop, cellRows, rowHeightMap) {\n    let row = 0;\n    let top = 0;\n    let bottom = 0;\n    for (const cells of cellRows) {\n        const key = cells[0].key;\n        top = bottom;\n        bottom = top + rowHeightMap.get(key);\n        if (positionTop < bottom) {\n            break;\n        }\n        row++;\n    }\n    return { row, top, bottom };\n}\n// Hit Element\n// -------------------------------------------------------------------------------------------------\nfunction getRowEl(rootEl, row) {\n    return rootEl.querySelectorAll('[role=row]')[row];\n}\nfunction getCellEl(rowEl, col) {\n    return rowEl.querySelectorAll('[role=cell]')[col];\n}\n// Header Formatting\n// -------------------------------------------------------------------------------------------------\nconst dayMicroWidth = 60;\nconst dayHeaderMicroFormat = createFormatter({\n    weekday: 'narrow'\n});\nfunction createDayHeaderFormatter(explicitFormat, datesRepDistinctDays, dateCnt) {\n    return explicitFormat || computeFallbackHeaderFormat(datesRepDistinctDays, dateCnt);\n}\n// Computes a default column header formatting string if `colFormat` is not explicitly defined\nfunction computeFallbackHeaderFormat(datesRepDistinctDays, dayCnt) {\n    // if more than one week row, or if there are a lot of columns with not much space,\n    // put just the day numbers will be in each cell\n    if (!datesRepDistinctDays) {\n        return createFormatter({ weekday: 'short' }); // \"Sat\"\n    }\n    if (dayCnt > 1) {\n        return createFormatter({\n            weekday: 'short',\n            weekdayJustify: 'start',\n            day: 'numeric',\n            omitCommas: true,\n            omitTrailing: true,\n        });\n    }\n    return createFormatter({\n        weekday: 'long',\n        weekdayJustify: 'start',\n        day: 'numeric',\n        omitCommas: true,\n        omitTrailing: true,\n    });\n}\n\nclass DayGridRows extends DateComponent {\n    constructor() {\n        super(...arguments);\n        this.state = {};\n        // memo\n        this.splitBusinessHourSegs = memoize(splitSegsByRow);\n        this.splitBgEventSegs = memoize(splitAllDaySegsByRow);\n        this.splitFgEventSegs = memoize(splitSegsByRow);\n        this.splitDateSelectionSegs = memoize(splitSegsByRow);\n        this.splitEventDrag = memoize(splitInteractionByRow);\n        this.splitEventResize = memoize(splitInteractionByRow);\n        this.rowHeightRefMap = new RefMap((height, key) => {\n            // HACKy way of syncing RefMap results with prop\n            const { rowHeightRefMap } = this.props;\n            if (rowHeightRefMap) {\n                rowHeightRefMap.handleValue(height, key);\n            }\n        });\n        this.handleMoreLinkEl = (el) => {\n            this.disconnectMoreLinkHeight?.();\n            this.disconnectMoreLinkHeight = undefined;\n            if (el) {\n                this.disconnectMoreLinkHeight = watchHeight(el, (height) => {\n                    if (this._isUnmounting)\n                        return;\n                    this.setState({ moreLinkHeight: height });\n                });\n            }\n        };\n        this.handleRootEl = (rootEl) => {\n            this.rootEl = rootEl;\n            if (rootEl) {\n                this.context.registerInteractiveComponent(this, {\n                    el: rootEl,\n                    isHitComboAllowed: this.props.isHitComboAllowed,\n                });\n            }\n            else {\n                this.context.unregisterInteractiveComponent(this);\n            }\n        };\n    }\n    render() {\n        let { props, state, context, rowHeightRefMap } = this;\n        let { options } = context;\n        let { cellRows, tableMode } = props;\n        let rowCount = cellRows.length;\n        // Will cause rows to not be reused across months\n        let firstCellKey = cellRows[0]?.[0]?.key || '';\n        let fgEventSegsByRow = this.splitFgEventSegs(props.fgEventSegs, rowCount);\n        let bgEventSegsByRow = this.splitBgEventSegs(props.bgEventSegs, rowCount);\n        let businessHourSegsByRow = this.splitBusinessHourSegs(props.businessHourSegs, rowCount);\n        let dateSelectionSegsByRow = this.splitDateSelectionSegs(props.dateSelectionSegs, rowCount);\n        let eventDragByRow = this.splitEventDrag(props.eventDrag, rowCount);\n        let eventResizeByRow = this.splitEventResize(props.eventResize, rowCount);\n        let isHeightAuto = getIsHeightAuto(options);\n        let rowHeightsRedistribute = !props.forPrint && !isHeightAuto;\n        let rowBasis = computeRowBasis(props.visibleWidth, rowCount, isHeightAuto, options);\n        const needsMoreLinkProbe = !props.forPrint && resolveDayGridPlacementMode(props.dayMaxEvents, props.dayMaxEventRows) === 'auto';\n        const RowsTag = tableMode ? 'tbody' : 'div';\n        return (jsxs(Fragment, { children: [jsx(RowsTag, { role: \"rowgroup\", className: joinClassNames(props.className, \n                    // HACK for Safari. Can't do break-inside:avoid with flexbox items, likely b/c it's not standard:\n                    // https://stackoverflow.com/a/60256345\n                    !tableMode && !props.forPrint && classNames.flexCol), style: tableMode ? undefined : { width: props.width }, ref: this.handleRootEl, children: cellRows.map((cells, row) => (jsx(DayGridRow, { role: \"row\", dateProfile: props.dateProfile, todayRange: props.todayRange, cells: cells, cellIsNarrow: props.cellIsNarrow, cellIsMicro: props.cellIsMicro, showDayNumbers: rowCount > 1, showWeekNumbers: rowCount > 1 && options.weekNumbers, forPrint: props.forPrint, tableMode: tableMode, borderBottom: row < rowCount - 1, \n                        // if not auto-height, distribute height of container somewhat evently to rows\n                        className: rowHeightsRedistribute ? classNames.grow : undefined, \n                        // content\n                        fgEventSegs: fgEventSegsByRow[row], bgEventSegs: bgEventSegsByRow[row], businessHourSegs: businessHourSegsByRow[row], dateSelectionSegs: dateSelectionSegsByRow[row], eventSelection: props.eventSelection, eventDrag: eventDragByRow[row], eventResize: eventResizeByRow[row], dayMaxEvents: props.dayMaxEvents, dayMaxEventRows: props.dayMaxEventRows, \n                        // dimensions\n                        colWidth: props.colWidth, basis: rowBasis, moreLinkHeight: state.moreLinkHeight, \n                        // refs\n                        heightRef: rowHeightRefMap.createRef(cells[0].key) }, firstCellKey + ':' + cells[0].key))) }), needsMoreLinkProbe && (jsx(MoreLinkTrigger, { num: 1, display: 'row', isNarrow: props.cellIsNarrow, isMicro: props.cellIsMicro, elRef: this.handleMoreLinkEl, className: classNames.offscreen, attrs: {\n                        'aria-hidden': true, // redundant with .offscreen's visibility, but marks it as a probe\n                    } }))] }));\n    }\n    componentDidMount() {\n        this._isUnmounting = false;\n    }\n    componentWillUnmount() {\n        this._isUnmounting = true;\n    }\n    // Hit System\n    // -----------------------------------------------------------------------------------------------\n    queryHit(isRtl, positionLeft, positionTop, elWidth) {\n        const { props } = this;\n        const colCount = props.cellRows[0].length;\n        const { col, left, right } = computeColFromPosition(positionLeft, elWidth, props.colWidth, colCount, isRtl);\n        const { row, top, bottom } = computeRowFromPosition(positionTop, props.cellRows, this.rowHeightRefMap.current);\n        const cell = props.cellRows[row][col];\n        if (cell.isInert) {\n            return null;\n        }\n        const cellStartDate = cell.date;\n        const cellEndDate = addDays(cellStartDate, 1);\n        return {\n            dateProfile: props.dateProfile,\n            dateSpan: {\n                range: {\n                    start: cellStartDate,\n                    end: cellEndDate,\n                },\n                allDay: true,\n                ...cell.dateSpanProps,\n            },\n            getDayEl: () => getCellEl(getRowEl(this.rootEl, row), col),\n            rect: {\n                left,\n                right,\n                top,\n                bottom,\n            },\n            layer: 0,\n        };\n    }\n}\n// Utils\n// -------------------------------------------------------------------------------------------------\nfunction isSegAllDay(seg) {\n    return seg.eventRange.def.allDay;\n}\nfunction splitAllDaySegsByRow(segs, rowCnt) {\n    return splitSegsByRow(segs.filter(isSegAllDay), rowCnt);\n}\n/*\nAmount of height a row should consume prior to expanding\nWe don't want to use min-height with flexbox because we leverage min-height:auto,\nwhich yields value based on natural height of events\n*/\nfunction computeRowBasis(visibleWidth, // should INCLUDE any scrollbar width to avoid oscillation\nrowCount, isHeightAuto, options) {\n    if (visibleWidth != null) {\n        // ensure a consistent row min-height modelled after a month with 6 rows respecting aspectRatio\n        // will result in same minHeight regardless of weekends, dayMinWidth, height:auto\n        const rowBasis = visibleWidth / options.aspectRatio / 6;\n        // don't give minHeight when single-month non-auto-height\n        // TODO: better way to detect this with DateProfile?\n        return (rowCount > 6 || isHeightAuto) ? rowBasis : 0;\n    }\n    return 0;\n}\n\nclass DayGridHeaderCell extends BaseComponent {\n    constructor() {\n        super(...arguments);\n        this.state = {};\n        // memo\n        this.buildDayHeaderText = memoize(buildDayHeaderText);\n        this.handleInnerEl = (innerEl) => {\n            if (this.disconnectSize) {\n                this.disconnectSize();\n                this.disconnectSize = undefined;\n            }\n            if (innerEl) {\n                this.disconnectSize = watchSize(innerEl, (width, height) => {\n                    if (this._isUnmounting)\n                        return;\n                    setRef(this.props.innerHeightRef, height);\n                    this.setState({ innerWidth: width });\n                });\n            }\n            else {\n                setRef(this.props.innerHeightRef, null);\n            }\n        };\n    }\n    render() {\n        const { props, state, context } = this;\n        const { renderConfig, dataConfig, tableMode } = props;\n        const colSpan = dataConfig.colSpan || 1;\n        const totalColWidth = props.colWidth != null\n            ? props.colWidth * colSpan\n            : undefined;\n        const isLiquid = !tableMode && totalColWidth == null;\n        /*\n        A liquid cell that spans multiple columns can't use the .liquid class, which gives every\n        cell an equal share regardless of colSpan. Instead, grow proportionally to the columns\n        covered, reserving space for the internal column borders swallowed by the span.\n        Include this cell's own start border because flex-basis uses border-box sizing.\n        */\n        const isSpanning = isLiquid && colSpan > 1;\n        const style = tableMode ? undefined : isSpanning ? {\n            flexGrow: colSpan,\n            flexBasis: (colSpan - 1) * COL_BORDER_WIDTH + (props.borderStart ? COL_BORDER_WIDTH : 0),\n            minWidth: 0,\n        } : {\n            width: totalColWidth,\n        };\n        const CellTag = tableMode ? 'th' : 'div';\n        const baseClassName = joinClassNames(dataConfig.className, classNames.noMargin, classNames.noPadding, !tableMode && classNames.flexCol, classNames.borderlessTop, classNames.borderlessEnd, !props.borderStart && classNames.borderlessStart, !(tableMode && props.borderBottom) && classNames.borderlessBottom, isLiquid && !isSpanning && classNames.liquid);\n        // Structural gaps share cell geometry but never invoke the row's render hooks.\n        if (dataConfig.blank) {\n            return (jsx(CellTag, { role: 'cell' // is empty so can't be columnheader\n                , \"aria-colspan\": dataConfig.colSpan, colSpan: tableMode ? colSpan : undefined, ...dataConfig.attrs, className: joinClassNames(baseClassName, generateClassName(dataConfig.blank.classNameGenerator, {\n                    ...dataConfig.renderProps,\n                    isNarrow: props.cellIsNarrow,\n                })), style: style }));\n        }\n        // HACK\n        const isDisabled = dataConfig.renderProps.isDisabled;\n        const finalRenderProps = renderConfig.dayHeaderFormat\n            ? this.buildDayHeaderRenderProps(dataConfig.renderProps, props.cellIsNarrow, props.rowLevel, props.cellIsMicro, dataConfig.dateMarker, renderConfig.dayHeaderFormat, Boolean(renderConfig.datesRepDistinctDays), context.dateEnv)\n            : {\n                ...dataConfig.renderProps,\n                isNarrow: props.cellIsNarrow,\n                level: props.rowLevel,\n            };\n        /*\n        TODO: DRY with TimelineHeaderCell\n        */\n        const alignInput = renderConfig.align;\n        const align = // normalized string-enum value\n         typeof alignInput === 'function'\n            ? alignInput({ level: props.rowLevel, inPopover: dataConfig.renderProps.inPopover, isNarrow: props.cellIsNarrow })\n            : alignInput;\n        const stickyInput = renderConfig.sticky;\n        const isSticky = !tableMode &&\n            props.rowLevel > 0 &&\n            stickyInput !== false && (\n        // if center-aligned, and wants to be sticky, must be >75% viewport width,\n        // to avoid looking awkwardly aligned\n        align !== 'center' || (totalColWidth != null &&\n            props.viewportWidth != null &&\n            totalColWidth > props.viewportWidth * 0.75));\n        let edgeCoord;\n        if (isSticky) {\n            if (align === 'center') {\n                if (state.innerWidth != null) {\n                    edgeCoord = `calc(50% - ${state.innerWidth / 2}px)`;\n                }\n            }\n            else {\n                edgeCoord = (typeof stickyInput === 'number' ||\n                    typeof stickyInput === 'string') ? stickyInput : 0;\n            }\n        }\n        /*\n        In screen mode, alignment belongs on the outer flex cell so the inner element\n        remains shrink-wrapped for sticky positioning measurements. In table mode, the\n        <th> must remain a table cell, so alignment moves to its full-width inner flex\n        element. That width cannot support sticky positioning, which table mode disables.\n        */\n        const alignClassName = align === 'center' ? classNames.alignCenter :\n            align === 'end' ? classNames.alignEnd :\n                classNames.alignStart;\n        return (jsx(ContentContainer, { tag: CellTag, attrs: {\n                role: 'columnheader',\n                'aria-colspan': dataConfig.colSpan,\n                colSpan: tableMode ? colSpan : undefined,\n                ...dataConfig.attrs,\n            }, className: joinClassNames(baseClassName, !tableMode && alignClassName, !isSticky && classNames.crop), style: style, renderProps: finalRenderProps, generatorName: renderConfig.generatorName, customGenerator: renderConfig.customGenerator, defaultGenerator: renderText$1, classNameGenerator: \n            // don't use custom classNames if disabled\n            // TODO: make DRY with DayCellContainer\n            isDisabled ? undefined : renderConfig.classNameGenerator, didMount: renderConfig.didMount, willUnmount: renderConfig.willUnmount, children: (InnerContainer) => (jsxs(Fragment, { children: [dataConfig.a11yText && (jsx(\"div\", { className: classNames.srOnly, children: dataConfig.a11yText })), jsx(\"div\", { \"aria-hidden\": dataConfig.a11yText ? true : undefined, ref: this.handleInnerEl, className: joinClassNames(classNames.flexCol, classNames.noShrink, classNames.whiteSpaceNoWrap, tableMode && alignClassName, isSticky && classNames.sticky), style: {\n                            left: edgeCoord,\n                            right: edgeCoord,\n                        }, children: jsx(InnerContainer, { tag: 'div', attrs: dataConfig.innerAttrs, className: generateClassName(renderConfig.innerClassNameGenerator, finalRenderProps) }) })] })) }));\n    }\n    componentDidMount() {\n        this._isUnmounting = false;\n    }\n    componentWillUnmount() {\n        this._isUnmounting = true;\n    }\n    buildDayHeaderRenderProps(renderProps, cellIsNarrow, rowLevel, cellIsMicro, dateMarker, dayHeaderFormat, datesRepDistinctDays, dateEnv) {\n        const baseText = this.buildDayHeaderText(datesRepDistinctDays ? dateMarker : renderProps.date, dayHeaderFormat, datesRepDistinctDays, dateEnv);\n        const textData = cellIsMicro\n            ? this.buildDayHeaderText(dateMarker, dayHeaderMicroFormat, false, dateEnv)\n            : baseText;\n        return {\n            ...renderProps,\n            isNarrow: cellIsNarrow,\n            level: rowLevel,\n            text: textData.text,\n            textParts: textData.textParts,\n            weekdayText: cellIsMicro ? textData.text : baseText.weekdayText,\n            dayNumberText: baseText.dayNumberText,\n        };\n    }\n}\nfunction buildDayHeaderText(date, formatter, includeDayNumber, dateEnv) {\n    const textParts = dateEnv.formatToParts(date, formatter);\n    return {\n        text: joinDateTimeFormatParts(textParts),\n        textParts,\n        weekdayText: findWeekdayText(textParts),\n        dayNumberText: includeDayNumber ? findDayNumberText(textParts) : '',\n    };\n}\n\nclass DayGridHeaderRow extends BaseComponent {\n    constructor() {\n        super(...arguments);\n        // ref\n        this.innerHeightRefMap = new RefMap(() => {\n            afterSize(this.handleInnerHeights);\n        });\n        this.handleInnerHeights = () => {\n            if (this._isUnmounting)\n                return;\n            const innerHeightMap = this.innerHeightRefMap.current;\n            let max = 0;\n            for (const innerHeight of innerHeightMap.values()) {\n                max = Math.max(max, innerHeight);\n            }\n            if (this.currentInnerHeight !== max) {\n                this.currentInnerHeight = max;\n                setRef(this.props.innerHeightRef, max);\n            }\n        };\n    }\n    render() {\n        const { props, context } = this;\n        const { tableMode } = props;\n        const { options } = context;\n        const RowTag = tableMode ? 'tr' : 'div';\n        return (jsx(RowTag, { role: props.role /* !!! */, \"aria-rowindex\": props.rowIndex != null ? 1 + props.rowIndex : undefined, className: joinClassNames(options.dayHeaderRowClass, props.className, tableMode && classNames.borderless, !tableMode && classNames.flexRow, !tableMode && classNames.contentBox, !tableMode && classNames.borderlessX, !tableMode && classNames.borderlessTop, (!tableMode && !props.borderBottom) && classNames.borderlessBottom), style: {\n                height: props.height,\n            }, children: props.dataConfigs.map((dataConfig, cellI) => (jsx(DayGridHeaderCell, { renderConfig: props.renderConfig, dataConfig: dataConfig, borderStart: Boolean(cellI), colWidth: props.colWidth, viewportWidth: props.viewportWidth, innerHeightRef: this.innerHeightRefMap.createRef(dataConfig.key), cellIsNarrow: props.cellIsNarrow, cellIsMicro: props.cellIsMicro, rowLevel: props.rowLevel, tableMode: tableMode, borderBottom: props.borderBottom }, dataConfig.key))) }));\n    }\n    componentDidMount() {\n        this._isUnmounting = false;\n    }\n    componentWillUnmount() {\n        this._isUnmounting = true;\n        this.currentInnerHeight = undefined;\n        setRef(this.props.innerHeightRef, null);\n    }\n}\n\nclass DayGridHeaderRows extends BaseComponent {\n    render() {\n        const { props } = this;\n        const { headerTiers, tableMode } = props;\n        return headerTiers.map((rowConfig, i) => (createElement(DayGridHeaderRow, { ...rowConfig, key: i, role: 'row', borderBottom: i < headerTiers.length - 1, colWidth: props.colWidth, viewportWidth: props.viewportWidth, cellIsNarrow: props.cellIsNarrow, cellIsMicro: props.cellIsMicro, rowLevel: headerTiers.length - i - 1, tableMode: tableMode })));\n    }\n}\n\nclass DayGridLayoutPrint extends BaseComponent {\n    render() {\n        const { props, context } = this;\n        const { options } = context;\n        const tableDisplayInfo = {\n            borderlessX: props.borderlessX,\n            borderlessTop: props.borderlessTop,\n            borderlessBottom: props.borderlessBottom,\n            multiMonthColumns: props.multiMonthColumns,\n        };\n        return (jsxs(\"table\", { role: \"presentation\", className: joinClassNames(generateClassName(options.tableClass, tableDisplayInfo), classNames.printTable), style: props.style, children: [jsx(\"colgroup\", { children: props.cellRows[0].map((cell) => jsx(\"col\", {}, cell.key)) }), props.showHeader && (jsxs(\"thead\", { ref: props.headerElRef, role: \"rowgroup\", className: generateClassName(options.tableHeaderClass, {\n                        ...tableDisplayInfo,\n                        isSticky: false,\n                    }), children: [jsx(DayGridHeaderRows, { tableMode: true, headerTiers: props.headerTiers, cellIsNarrow: props.cellIsNarrow, cellIsMicro: props.cellIsMicro }), jsx(\"tr\", { role: \"presentation\", children: jsx(\"th\", { role: \"presentation\", colSpan: props.cellRows[0].length, className: joinClassNames(classNames.noPadding, generateClassName(options.dayHeaderDividerClass, {\n                                    isSticky: false,\n                                    multiMonthColumns: props.multiMonthColumns,\n                                    options: { allDaySlot: Boolean(options.allDaySlot) },\n                                })) }) })] })), jsx(DayGridRows, { dateProfile: props.dateProfile, todayRange: props.todayRange, cellRows: props.cellRows, forPrint: true, tableMode: true, className: generateClassName(options.tableBodyClass, tableDisplayInfo), dayMaxEvents: undefined, dayMaxEventRows: props.dayMaxEventRows, fgEventSegs: props.fgEventSegs, bgEventSegs: props.bgEventSegs, businessHourSegs: props.businessHourSegs, dateSelectionSegs: [], eventDrag: null, eventResize: null, eventSelection: props.eventSelection, visibleWidth: props.visibleWidth, cellIsNarrow: props.cellIsNarrow, cellIsMicro: props.cellIsMicro, rowHeightRefMap: props.rowHeightRefMap })] }));\n    }\n}\n\nexport { DayTableModel as A, BgEvent as B, MeasuredHeightHarness as C, DayTableSlicer as D, buildDateDataConfigs as E, buildDateRenderConfig as F, buildLevelLimitedLayout as G, buildPrintEventBands as H, buildPrintMoreLinkBand as I, computeLateralSpanBottom as J, getSliceKey as K, planPrintDomCandidates as L, MoreLinkTrigger as M, Ruler as R, Slicer as S, buildDateRowConfigs as a, buildDayTableModel as b, createDayHeaderFormatter as c, DaySeriesModel as d, DaySeriesSlicer as e, buildDateRowConfig as f, RefMap as g, DayGridLayoutPrint as h, DayGridHeaderRow as i, DayGridRows as j, dayMicroWidth as k, computeTopFromDate as l, computeColWidth as m, DayGridHeaderRows as n, getCellEl as o, DayGridRow as p, computeColFromPosition as q, resolveDayGridPlacementMode as r, renderFill as s, buildSegLevels as t, groupLaterallyIntersecting as u, convertSegsToWholeSlices as v, sortByAxisOrder as w, findIntersections as x, MoreLinkContainer as y, DEFAULT_UNMEASURED_EVENT_THICKNESS as z };\n","import { jsx, jsxs, Fragment } from 'preact/jsx-runtime';\nimport { B as BaseComponent, S as Scroller, w as watchHeight, s as setRef, p as afterSize, h as ViewContainer, g as generateClassName, c as getIsHeightAuto, x as getTableHeaderSticky, y as getFooterScrollbarSticky, z as getScrollerSyncerClass } from './2f45deb4.js';\nimport { g as RefMap, l as computeTopFromDate, h as DayGridLayoutPrint, j as DayGridRows, R as Ruler, m as computeColWidth, n as DayGridHeaderRows, k as dayMicroWidth } from './20c8a1fa.js';\nimport { j as joinClassNames } from './d74440d5.js';\nimport { createRef } from 'preact/compat';\nimport { c as classNames } from './0b389a37.js';\nimport { J as computeViewBorderless } from './d7fd1889.js';\n\n/*\nUsed only for screen rendering. Print places DayGridHeaderRows directly inside a table header.\n*/\nclass DayGridHeader extends BaseComponent {\n    render() {\n        const { props } = this;\n        return (jsx(\"div\", { role: 'rowgroup', className: joinClassNames(props.className, classNames.flexCol, props.width == null && classNames.liquid), style: {\n                width: props.width,\n            }, children: jsx(DayGridHeaderRows, { headerTiers: props.headerTiers, colWidth: props.colWidth, viewportWidth: props.viewportWidth, cellIsNarrow: props.cellIsNarrow, cellIsMicro: props.cellIsMicro }) }));\n    }\n}\n\nclass DayGridLayoutNormal extends BaseComponent {\n    constructor() {\n        super(...arguments);\n        this.state = {};\n        this.handleScroller = (scroller) => {\n            setRef(this.props.scrollerRef, scroller);\n        };\n        this.handleTotalWidth = (totalWidth) => {\n            if (this._isUnmounting)\n                return;\n            this.setState({ totalWidth });\n        };\n        this.handleClientWidth = (clientWidth) => {\n            if (this._isUnmounting)\n                return;\n            this.setState({ clientWidth });\n        };\n    }\n    render() {\n        const { props, state, context } = this;\n        const { options } = context;\n        const { borderlessX, borderlessTop, borderlessBottom } = computeViewBorderless(options);\n        const { totalWidth, clientWidth } = state;\n        let endScrollbarWidth = (totalWidth != null && clientWidth != null)\n            ? totalWidth - clientWidth\n            : undefined;\n        // HACK when clientWidth does NOT include body-border, compared to totalWidth\n        if (endScrollbarWidth < 3) {\n            endScrollbarWidth = 0;\n        }\n        const verticalScrollbars = !props.forPrint && !getIsHeightAuto(options);\n        const tableHeaderSticky = !props.forPrint && getTableHeaderSticky(options);\n        const colCount = props.cellRows[0].length;\n        const measuredColWidth = clientWidth != null ? clientWidth / colCount : undefined;\n        const cellIsMicro = measuredColWidth != null && measuredColWidth <= dayMicroWidth;\n        const cellIsNarrow = cellIsMicro || (measuredColWidth != null && measuredColWidth <= options.dayNarrowWidth);\n        if (props.forPrint) {\n            return (jsx(DayGridLayoutPrint, { dateProfile: props.dateProfile, todayRange: props.todayRange, cellRows: props.cellRows, headerTiers: props.headerTiers, showHeader: Boolean(options.dayHeaders), fgEventSegs: props.fgEventSegs, bgEventSegs: props.bgEventSegs, businessHourSegs: props.businessHourSegs, eventSelection: props.eventSelection, dayMaxEventRows: options.dayMaxEventRows, borderlessX: borderlessX, borderlessTop: borderlessTop, borderlessBottom: borderlessBottom, multiMonthColumns: 0, visibleWidth: totalWidth, cellIsNarrow: cellIsNarrow, cellIsMicro: cellIsMicro, rowHeightRefMap: props.rowHeightRefMap }));\n        }\n        return (jsxs(Fragment, { children: [options.dayHeaders && (jsxs(\"div\", { className: joinClassNames(generateClassName(options.tableHeaderClass, {\n                        isSticky: tableHeaderSticky,\n                        borderlessX,\n                        borderlessTop,\n                        borderlessBottom,\n                        multiMonthColumns: 0,\n                    }), classNames.flexCol, tableHeaderSticky && classNames.tableHeaderSticky), children: [jsxs(\"div\", { className: classNames.flexRow, children: [jsx(DayGridHeader, { headerTiers: props.headerTiers, cellIsNarrow: cellIsNarrow, cellIsMicro: cellIsMicro }), Boolean(endScrollbarWidth) && (jsx(\"div\", { className: joinClassNames(generateClassName(options.fillerClass, { inTableHeader: true }), classNames.borderlessY, classNames.borderlessEnd), style: { minWidth: endScrollbarWidth } }))] }), jsx(\"div\", { className: generateClassName(options.dayHeaderDividerClass, {\n                                isSticky: tableHeaderSticky,\n                                multiMonthColumns: 0,\n                                options: { allDaySlot: Boolean(options.allDaySlot) },\n                            }) })] })), jsx(Scroller, { vertical: verticalScrollbars, className: joinClassNames(generateClassName(options.tableBodyClass, {\n                        borderlessX,\n                        borderlessTop,\n                        borderlessBottom,\n                        multiMonthColumns: 0,\n                    }), \n                    // HACK for Safari. Can't do break-inside:avoid with flexbox items, likely b/c it's not standard:\n                    // https://stackoverflow.com/a/60256345\n                    !props.forPrint && classNames.flexCol, verticalScrollbars && classNames.liquid), ref: this.handleScroller, clientWidthRef: this.handleClientWidth, children: jsx(DayGridRows, { dateProfile: props.dateProfile, todayRange: props.todayRange, cellRows: props.cellRows, forPrint: props.forPrint, isHitComboAllowed: props.isHitComboAllowed, className: classNames.grow, dayMaxEvents: props.forPrint ? undefined : options.dayMaxEvents, dayMaxEventRows: options.dayMaxEventRows, \n                        // content\n                        fgEventSegs: props.fgEventSegs, bgEventSegs: props.bgEventSegs, businessHourSegs: props.businessHourSegs, dateSelectionSegs: props.dateSelectionSegs, eventDrag: props.eventDrag, eventResize: props.eventResize, eventSelection: props.eventSelection, \n                        // dimensions\n                        visibleWidth: totalWidth, cellIsNarrow: cellIsNarrow, cellIsMicro: cellIsMicro, \n                        // refs\n                        rowHeightRefMap: props.rowHeightRefMap }) }), jsx(Ruler, { widthRef: this.handleTotalWidth })] }));\n    }\n    componentDidMount() {\n        this._isUnmounting = false;\n    }\n    componentWillUnmount() {\n        this._isUnmounting = true;\n    }\n}\n\nclass FooterScrollbar extends BaseComponent {\n    constructor() {\n        super(...arguments);\n        this.rootElRef = createRef();\n    }\n    render() {\n        const { props } = this;\n        // NOTE: we need a wrapper around the Scroller because if scrollbars appear/hide,\n        // the outer dimensions change, but the inner dimensions do not. The Scroller's\n        // dimension-watching, when used in ponyfill-mode, can't fire on border-box change, so we\n        // workaround it by monitoring dimensions of a wrapper instead\n        return (jsx(\"div\", { ref: this.rootElRef, className: joinClassNames(classNames.footerScrollbar, props.isSticky && classNames.footerScrollbarSticky), children: jsx(Scroller, { horizontal: true, ref: props.scrollerRef, children: jsx(\"div\", { style: { minWidth: props.canvasWidth } }) }) }));\n    }\n    componentDidMount() {\n        this._isUnmounting = false;\n        this.disconnectHeight = watchHeight(this.rootElRef.current, (height) => {\n            if (this._isUnmounting)\n                return;\n            setRef(this.props.scrollbarWidthRef, height);\n        });\n    }\n    componentWillUnmount() {\n        this._isUnmounting = true;\n        this.disconnectHeight();\n        setRef(this.props.scrollbarWidthRef, null);\n    }\n}\n\nclass DayGridLayoutPannable extends BaseComponent {\n    constructor() {\n        super(...arguments);\n        this.state = {};\n        this.headerScrollerRef = createRef();\n        this.bodyScrollerRef = createRef();\n        this.footerScrollerRef = createRef();\n        // Sizing\n        // -----------------------------------------------------------------------------------------------\n        this.handleTotalWidth = (totalWidth) => {\n            if (this._isUnmounting)\n                return;\n            this.setState({ totalWidth });\n        };\n        this.handleClientWidth = (clientWidth) => {\n            if (this._isUnmounting)\n                return;\n            this.setState({ clientWidth });\n        };\n    }\n    render() {\n        const { props, state, context } = this;\n        const { options } = context;\n        const { borderlessX, borderlessTop, borderlessBottom } = computeViewBorderless(options);\n        const { totalWidth, clientWidth } = state;\n        const endScrollbarWidth = (totalWidth != null && clientWidth != null)\n            ? totalWidth - clientWidth\n            : undefined;\n        const verticalScrollbars = !props.forPrint && !getIsHeightAuto(options);\n        const tableHeaderSticky = !props.forPrint && getTableHeaderSticky(options);\n        const footerScrollbarSticky = !props.forPrint && getFooterScrollbarSticky(options);\n        const colCount = props.cellRows[0].length;\n        const [canvasWidth, appliedColWidth] = computeColWidth(colCount, props.dayMinWidth, clientWidth);\n        const measuredColWidth = appliedColWidth ?? (clientWidth != null ? clientWidth / colCount : undefined);\n        const cellIsMicro = measuredColWidth != null && measuredColWidth <= dayMicroWidth;\n        const cellIsNarrow = cellIsMicro || (measuredColWidth != null && measuredColWidth <= options.dayNarrowWidth);\n        if (props.forPrint) {\n            return (jsx(DayGridLayoutPrint, { dateProfile: props.dateProfile, todayRange: props.todayRange, cellRows: props.cellRows, headerTiers: props.headerTiers, showHeader: Boolean(options.dayHeaders), fgEventSegs: props.fgEventSegs, bgEventSegs: props.bgEventSegs, businessHourSegs: props.businessHourSegs, eventSelection: props.eventSelection, dayMaxEventRows: options.dayMaxEventRows, borderlessX: borderlessX, borderlessTop: borderlessTop, borderlessBottom: borderlessBottom, multiMonthColumns: 0, visibleWidth: totalWidth, cellIsNarrow: cellIsNarrow, cellIsMicro: cellIsMicro, rowHeightRefMap: props.rowHeightRefMap }));\n        }\n        return (jsxs(Fragment, { children: [options.dayHeaders && (jsxs(\"div\", { className: joinClassNames(generateClassName(options.tableHeaderClass, {\n                        isSticky: tableHeaderSticky,\n                        borderlessX,\n                        borderlessTop,\n                        borderlessBottom,\n                        multiMonthColumns: 0,\n                    }), classNames.flexCol, tableHeaderSticky && classNames.tableHeaderSticky), children: [jsxs(Scroller, { horizontal: true, hideScrollbars: true, className: classNames.flexRow, ref: this.headerScrollerRef, children: [jsx(DayGridHeader, { headerTiers: props.headerTiers, colWidth: appliedColWidth, viewportWidth: clientWidth, width: canvasWidth, cellIsNarrow: cellIsNarrow, cellIsMicro: cellIsMicro }), Boolean(endScrollbarWidth) && (jsx(\"div\", { className: joinClassNames(generateClassName(options.fillerClass, { inTableHeader: true }), classNames.borderlessY, classNames.borderlessEnd), style: { minWidth: endScrollbarWidth } }))] }), jsx(\"div\", { className: generateClassName(options.dayHeaderDividerClass, {\n                                isSticky: tableHeaderSticky,\n                                multiMonthColumns: 0,\n                                options: { allDaySlot: Boolean(options.allDaySlot) },\n                            }) })] })), jsx(Scroller, { vertical: verticalScrollbars, horizontal: true, hideScrollbars: footerScrollbarSticky ||\n                        props.forPrint // prevents blank space in print-view on Safari\n                    , className: joinClassNames(generateClassName(options.tableBodyClass, {\n                        borderlessX,\n                        borderlessTop,\n                        borderlessBottom,\n                        multiMonthColumns: 0,\n                    }), \n                    // HACK for Safari. Can't do break-inside:avoid with flexbox items, likely b/c it's not standard:\n                    // https://stackoverflow.com/a/60256345\n                    !props.forPrint && classNames.flexCol, verticalScrollbars && classNames.liquid), ref: this.bodyScrollerRef, clientWidthRef: this.handleClientWidth, children: jsx(DayGridRows, { dateProfile: props.dateProfile, todayRange: props.todayRange, cellRows: props.cellRows, forPrint: props.forPrint, isHitComboAllowed: props.isHitComboAllowed, className: classNames.grow, dayMaxEvents: props.forPrint ? undefined : options.dayMaxEvents, dayMaxEventRows: options.dayMaxEventRows, \n                        // content\n                        fgEventSegs: props.fgEventSegs, bgEventSegs: props.bgEventSegs, businessHourSegs: props.businessHourSegs, dateSelectionSegs: props.dateSelectionSegs, eventDrag: props.eventDrag, eventResize: props.eventResize, eventSelection: props.eventSelection, \n                        // dimensions\n                        colWidth: appliedColWidth, width: canvasWidth, visibleWidth: totalWidth, cellIsNarrow: cellIsNarrow, cellIsMicro: cellIsMicro, \n                        // refs\n                        rowHeightRefMap: props.rowHeightRefMap }) }), Boolean(footerScrollbarSticky) && (jsx(FooterScrollbar, { isSticky: true, canvasWidth: canvasWidth, scrollerRef: this.footerScrollerRef })), jsx(Ruler, { widthRef: this.handleTotalWidth })] }));\n    }\n    // Lifecycle\n    // -----------------------------------------------------------------------------------------------\n    componentDidMount() {\n        this._isUnmounting = false;\n        // scroller\n        const ScrollerSyncer = getScrollerSyncerClass(this.context.pluginHooks);\n        this.syncedScroller = new ScrollerSyncer(true); // horizontal=true\n        setRef(this.props.scrollerRef, this.syncedScroller);\n        this.updateSyncedScroller();\n    }\n    componentDidUpdate() {\n        // scroller\n        this.updateSyncedScroller();\n    }\n    componentWillUnmount() {\n        this._isUnmounting = true;\n        // scroller\n        this.syncedScroller.destroy();\n    }\n    // Scrolling\n    // -----------------------------------------------------------------------------------------------\n    updateSyncedScroller() {\n        this.syncedScroller.handleChildren([\n            this.headerScrollerRef.current,\n            this.bodyScrollerRef.current,\n            this.footerScrollerRef.current,\n        ]);\n    }\n}\n\nclass DayGridLayout extends BaseComponent {\n    constructor() {\n        super(...arguments);\n        // ref\n        this.scrollerRef = createRef();\n        this.rowHeightRefMap = new RefMap(() => {\n            afterSize(this.updateScrollY);\n        });\n        this.scrollDate = null;\n        this.updateScrollY = () => {\n            if (this._isUnmounting)\n                return;\n            const rowHeightMap = this.rowHeightRefMap.current;\n            const scroller = this.scrollerRef.current;\n            // Since updateScrollY is called by rowHeightRefMap, could be called with null during cleanup,\n            // and the scroller might not exist\n            if (scroller && this.scrollDate) {\n                let scrollTop = computeTopFromDate(this.scrollDate, this.props.cellRows, rowHeightMap);\n                if (scrollTop != null) {\n                    if (scrollTop) {\n                        scrollTop++; // clear top border\n                    }\n                    scroller.scrollTo({ y: scrollTop });\n                }\n            }\n        };\n        this.handleScrollEnd = (isDevice) => {\n            if (isDevice) {\n                this.scrollDate = null;\n            }\n        };\n    }\n    render() {\n        const { props, context } = this;\n        const { options } = context;\n        const { borderlessX, borderlessTop, borderlessBottom } = computeViewBorderless(options);\n        const dateSelectionSegs = props.forPrint ? [] : props.dateSelectionSegs;\n        const eventDrag = props.forPrint ? null : props.eventDrag;\n        const eventResize = props.forPrint ? null : props.eventResize;\n        const commonLayoutProps = {\n            ...props,\n            dateSelectionSegs,\n            eventDrag,\n            eventResize,\n            scrollerRef: this.scrollerRef,\n            rowHeightRefMap: this.rowHeightRefMap,\n        };\n        return (jsx(ViewContainer, { viewSpec: context.viewSpec, attrs: {\n                role: 'table',\n                'aria-rowcount': props.headerTiers.length + props.cellRows.length,\n                'aria-colcount': props.cellRows[0].length,\n                'aria-labelledby': props.labelId,\n                'aria-label': props.labelStr,\n            }, className: joinClassNames(props.className, !props.forPrint && classNames.flexCol, !props.forPrint && generateClassName(options.tableClass, {\n                borderlessX,\n                borderlessTop,\n                borderlessBottom,\n                multiMonthColumns: 0,\n            })), children: options.dayMinWidth ? (jsx(DayGridLayoutPannable, { ...commonLayoutProps, dayMinWidth: options.dayMinWidth })) : (jsx(DayGridLayoutNormal, { ...commonLayoutProps })) }));\n    }\n    // Lifecycle\n    // -----------------------------------------------------------------------------------------------\n    componentDidMount() {\n        this._isUnmounting = false;\n        if (!this.props.forPrint) {\n            this.resetScroll();\n            this.scrollerRef.current?.addScrollEndListener(this.handleScrollEnd);\n        }\n    }\n    componentDidUpdate(prevProps) {\n        if (prevProps.forPrint && !this.props.forPrint) {\n            this.scrollerRef.current?.addScrollEndListener(this.handleScrollEnd);\n            this.resetScroll();\n        }\n        if (prevProps.dateProfile !== this.props.dateProfile && this.context.options.scrollTimeReset) {\n            this.resetScroll();\n        }\n    }\n    componentWillUnmount() {\n        this._isUnmounting = true;\n        this.scrollerRef.current?.removeScrollEndListener(this.handleScrollEnd);\n    }\n    // Scrolling\n    // -----------------------------------------------------------------------------------------------\n    resetScroll() {\n        this.scrollDate = this.props.dateProfile.currentDate;\n        this.updateScrollY();\n        this.scrollerRef.current?.scrollTo({ x: 0 });\n    }\n}\n\nexport { DayGridLayout as D, FooterScrollbar as F };\n","import { jsx } from 'preact/jsx-runtime';\nimport { B as BaseComponent, m as memoize, d as NowTimer } from './2f45deb4.js';\nimport { b as buildDayTableModel, a as buildDateRowConfigs, c as createDayHeaderFormatter, D as DayTableSlicer } from './20c8a1fa.js';\nimport { D as DayGridLayout } from './4cda001f.js';\nimport { T as TableDateProfileGenerator } from './63421ff4.js';\n\nclass DayGridView extends BaseComponent {\n    constructor() {\n        super(...arguments);\n        // memo\n        this.buildDayTableModel = memoize(buildDayTableModel);\n        this.buildDateRowConfigs = memoize(buildDateRowConfigs);\n        this.createDayHeaderFormatter = memoize(createDayHeaderFormatter);\n        // internal\n        this.slicer = new DayTableSlicer();\n    }\n    render() {\n        const { props, context } = this;\n        const { dateProfile } = props;\n        const { options, dateEnv } = context;\n        const dayTableModel = this.buildDayTableModel(dateProfile, context.dateProfileGenerator, dateEnv);\n        const datesRepDistinctDays = dayTableModel.rowCount === 1;\n        const dayHeaderFormat = this.createDayHeaderFormatter(context.options.dayHeaderFormat, datesRepDistinctDays, dayTableModel.colCount);\n        const slicedProps = this.slicer.sliceProps(props, dateProfile, options.nextDayThreshold, context, dayTableModel);\n        return (jsx(NowTimer, { unit: \"day\", children: (nowDate, todayRange) => {\n                const headerTiers = this.buildDateRowConfigs(dayTableModel.headerDates, datesRepDistinctDays, dateProfile, todayRange, dayHeaderFormat, context);\n                return (jsx(DayGridLayout, { labelId: props.labelId, labelStr: props.labelStr, dateProfile: dateProfile, todayRange: todayRange, cellRows: dayTableModel.cellRows, forPrint: props.forPrint, className: props.className, \n                    // header content\n                    headerTiers: headerTiers, \n                    // body content\n                    fgEventSegs: slicedProps.fgEventSegs, bgEventSegs: slicedProps.bgEventSegs, businessHourSegs: slicedProps.businessHourSegs, dateSelectionSegs: slicedProps.dateSelectionSegs, eventDrag: slicedProps.eventDrag, eventResize: slicedProps.eventResize, eventSelection: slicedProps.eventSelection }));\n            } }));\n    }\n}\n\nvar dayGridPlugin = {\n    name: 'daygrid',\n    initialView: 'dayGridMonth',\n    views: {\n        dayGrid: {\n            component: DayGridView,\n            dateProfileGeneratorClass: TableDateProfileGenerator,\n        },\n        dayGridDay: {\n            type: 'dayGrid',\n            duration: { days: 1 },\n        },\n        dayGridWeek: {\n            type: 'dayGrid',\n            duration: { weeks: 1 },\n        },\n        dayGridMonth: {\n            type: 'dayGrid',\n            duration: { months: 1 },\n            fixedWeekCount: true,\n        },\n        dayGridYear: {\n            type: 'dayGrid',\n            duration: { years: 1 },\n        },\n    },\n};\n\nexport { dayGridPlugin as d };\n","import { D as DateProfileGenerator } from './4ddf07a5.js';\nimport { addWeeks, addDays, diffWeeks } from '@full-ui/headless-calendar';\n\nclass TableDateProfileGenerator extends DateProfileGenerator {\n    // Computes the date range that will be rendered\n    buildRenderRange(currentRange, currentRangeUnit, isRangeAllDay) {\n        let renderRange = super.buildRenderRange(currentRange, currentRangeUnit, isRangeAllDay);\n        let { props } = this;\n        return buildDayTableRenderRange({\n            currentRange: renderRange, // ???\n            snapToWeek: /^(year|month)$/.test(currentRangeUnit),\n            fixedWeekCount: props.fixedWeekCount,\n            dateEnv: props.dateEnv,\n        });\n    }\n}\nfunction buildDayTableRenderRange(props) {\n    let { dateEnv, currentRange } = props;\n    let { start, end } = currentRange;\n    let endOfWeek;\n    // year and month views should be aligned with weeks. this is already done for week\n    if (props.snapToWeek) {\n        start = dateEnv.startOfWeek(start);\n        // make end-of-week if not already\n        endOfWeek = dateEnv.startOfWeek(end);\n        if (endOfWeek.valueOf() !== end.valueOf()) {\n            end = addWeeks(endOfWeek, 1);\n        }\n    }\n    // ensure 6 weeks\n    if (props.fixedWeekCount) {\n        // TODO: instead of these date-math gymnastics (for multimonth view),\n        // compute dateprofiles of all months, then use start of first and end of last.\n        let lastMonthRenderStart = dateEnv.startOfWeek(dateEnv.startOfMonth(addDays(currentRange.end, -1)));\n        let rowCount = Math.ceil(// could be partial weeks due to hiddenDays\n        diffWeeks(lastMonthRenderStart, end));\n        end = addWeeks(end, 6 - rowCount);\n    }\n    return { start, end };\n}\n\nexport { TableDateProfileGenerator as T, buildDayTableRenderRange as b };\n","import { jsx, Fragment, jsxs } from 'preact/jsx-runtime';\nimport { j as joinClassNames } from './d74440d5.js';\nimport { formatDayString, intersectRanges, startOfDay, addDays, joinDateTimeFormatParts } from '@full-ui/headless-calendar';\nimport { e as DateComponent, m as memoize, c as getIsHeightAuto, h as ViewContainer, S as Scroller, C as ContentContainer, g as generateClassName, d as NowTimer, B as BaseComponent, i as getDateMeta, j as buildDateStr, W as WEEKDAY_ONLY_FORMAT, F as FULL_DATE_FORMAT, k as StandardEvent, l as findWeekdayText, n as findDayNumberText, o as buildNavLinkAttrs, r as renderText } from './2f45deb4.js';\nimport { e as createFormatter, s as sliceEventStore, ah as sortEventSegs, ai as getEventRangeMeta } from './d7fd1889.js';\nimport { c as classNames } from './0b389a37.js';\n\nclass ListDayHeaderInner extends BaseComponent {\n    render() {\n        const { props, context } = this;\n        const { options } = context;\n        const textParts = context.dateEnv.formatToParts(props.dayDate, props.dayFormat);\n        const text = joinDateTimeFormatParts(textParts);\n        const hasNavLink = options.navLinks;\n        const renderProps = {\n            ...props.dateMeta,\n            view: context.viewApi,\n            text,\n            textParts,\n            get weekdayText() { return findWeekdayText(textParts); },\n            get dayNumberText() { return findDayNumberText(textParts); },\n            hasNavLink,\n            level: props.level,\n        };\n        const navLinkAttrs = hasNavLink\n            ? buildNavLinkAttrs(this.context, props.dayDate, undefined, text, \n            /* isTabbable = */ this.props.isTabbable)\n            : {};\n        return (jsx(ContentContainer, { tag: \"div\", attrs: navLinkAttrs, renderProps: renderProps, generatorName: \"listDayHeaderContent\", customGenerator: options.listDayHeaderContent, defaultGenerator: renderText, classNameGenerator: options.listDayHeaderInnerClass }));\n    }\n}\n\nclass ListDayHeader extends BaseComponent {\n    render() {\n        let { options, viewApi, viewSpec } = this.context;\n        let { dayDate, dateMeta } = this.props;\n        let stickyHeaderDates = !this.props.forPrint;\n        const listDayFormat = options.listDayFormat ?? createDefaultListDayFormat(viewSpec);\n        const listDayAltFormat = options.listDayAltFormat ?? createDefaultListDaySideFormat(viewSpec);\n        let renderProps = {\n            ...dateMeta,\n            view: viewApi,\n        };\n        return (jsx(ContentContainer, { tag: \"div\", attrs: {\n                'data-date': formatDayString(dayDate),\n                ...(dateMeta.isToday ? { 'aria-current': 'date' } : {}),\n            }, className: stickyHeaderDates ? classNames.stickyT : '', renderProps: renderProps, generatorName: undefined, classNameGenerator: options.listDayHeaderClass, didMount: options.listDayHeaderDidMount, willUnmount: options.listDayHeaderWillUnmount, children: () => (jsxs(Fragment, { children: [Boolean(listDayFormat) && (jsx(ListDayHeaderInner, { dayDate: dayDate, dayFormat: listDayFormat, isTabbable: true, dateMeta: dateMeta, level: 0 })), Boolean(listDayAltFormat) && (jsx(ListDayHeaderInner, { dayDate: dayDate, dayFormat: listDayAltFormat, isTabbable: false, dateMeta: dateMeta, level: 1 }))] })) }));\n    }\n}\nfunction createDefaultListDayFormat({ durationUnit, singleUnit }) {\n    if (singleUnit === 'day') {\n        return WEEKDAY_ONLY_FORMAT;\n    }\n    else if (durationUnit === 'day' || singleUnit === 'week') {\n        return WEEKDAY_ONLY_FORMAT;\n    }\n    else {\n        return FULL_DATE_FORMAT;\n    }\n}\nfunction createDefaultListDaySideFormat({ durationUnit, singleUnit }) {\n    if (singleUnit === 'day') ;\n    else if (durationUnit === 'day' || singleUnit === 'week') {\n        return FULL_DATE_FORMAT;\n    }\n    else {\n        return WEEKDAY_ONLY_FORMAT;\n    }\n}\n\nconst DEFAULT_TIME_FORMAT = createFormatter({\n    hour: 'numeric',\n    minute: '2-digit',\n    meridiem: 'short',\n});\nclass ListEvent extends BaseComponent {\n    render() {\n        let { props, context } = this;\n        let { eventRange } = props;\n        const { displayEventTime } = context.options;\n        let forcedTimeText = (displayEventTime !== false) && (eventRange.def.allDay || (!props.isStart && !props.isEnd))\n            ? context.options.allDayText\n            : undefined;\n        return (jsx(StandardEvent, { ...props, forcedTimeText: forcedTimeText, defaultTimeFormat: DEFAULT_TIME_FORMAT, disableDragging: true, disableResizing: true, disableZindexes // because conflicts with sticky list headers\n            : true, display: 'list-item' }));\n    }\n}\n\nclass ListDay extends BaseComponent {\n    constructor() {\n        super(...arguments);\n        // memo\n        this.getDateMeta = memoize(getDateMeta);\n        this.sortEventSegs = memoize(sortEventSegs);\n    }\n    render() {\n        const { props, context } = this;\n        const { nowDate, todayRange } = props;\n        const { options } = context;\n        const dateMeta = this.getDateMeta(props.dayDate, context.dateEnv, undefined, todayRange);\n        const segs = this.sortEventSegs(props.segs, options.eventOrder);\n        const fullDateStr = buildDateStr(this.context, props.dayDate);\n        const listDayData = {\n            ...dateMeta,\n            isFirst: props.isFirst,\n            isLast: props.isLast,\n            view: context.viewApi,\n        };\n        const listDayEventsData = {\n            ...dateMeta,\n            view: context.viewApi,\n        };\n        return (jsxs(\"div\", { role: 'listitem', \"aria-label\": fullDateStr, className: generateClassName(options.listDayClass, listDayData), children: [jsx(ListDayHeader, { dayDate: props.dayDate, dateMeta: dateMeta, forPrint: props.forPrint }), jsx(\"div\", { role: 'list', \"aria-label\": options.eventsHint, className: joinClassNames(generateClassName(options.listDayBodyClass, listDayEventsData), classNames.flexCol), children: segs.map((seg, index) => {\n                        const key = seg.eventRange.instance.instanceId;\n                        const isFirst = index === 0;\n                        const isLast = index === segs.length - 1;\n                        return (\n                        // unstyled list item wraps the event, so the event's own role (link, button) is preserved\n                        jsx(\"div\", { role: 'listitem', className: classNames.flexCol, children: jsx(ListEvent, { eventRange: seg.eventRange, slicedStart: seg.slicedStart, slicedEnd: seg.slicedEnd, isStart: seg.isStart, isEnd: seg.isEnd, isFirst: isFirst, isLast: isLast, isDragging: false, isResizing: false, isMirror: false, isSelected: false, ...getEventRangeMeta(seg.eventRange, todayRange, nowDate, props.nowMs) }) }, key));\n                    }) })] }));\n    }\n}\n\n/*\nResponsible for the scroller, and forwarding event-related actions into the \"grid\".\n*/\nclass ListView extends DateComponent {\n    constructor() {\n        super(...arguments);\n        // memo\n        this.computeDateVars = memoize(computeDateVars);\n        this.eventStoreToSegs = memoize(this._eventStoreToSegs);\n        this.setRootEl = (rootEl) => {\n            if (rootEl) {\n                this.context.registerInteractiveComponent(this, {\n                    el: rootEl,\n                    disableHits: true, // HACK to not do date-clicking/selecting\n                });\n            }\n            else {\n                this.context.unregisterInteractiveComponent(this);\n            }\n        };\n    }\n    render() {\n        let { props, context } = this;\n        let { options } = context;\n        let { dayDates, dayRanges } = this.computeDateVars(props.dateProfile);\n        let eventSegs = this.eventStoreToSegs(props.eventStore, props.eventUiBases, dayRanges);\n        let verticalScrolling = !props.forPrint && !getIsHeightAuto(options);\n        return (jsx(ViewContainer, { viewSpec: context.viewSpec, className: joinClassNames(props.className, classNames.flexCol), elRef: this.setRootEl, children: eventSegs.length ? (jsx(Scroller // TODO: don't need heavyweight component\n            , { vertical: verticalScrolling, className: joinClassNames(classNames.flexCol, verticalScrolling ? classNames.liquid : ''), children: this.renderSegList(eventSegs, dayDates) })) : this.renderEmptyMessage() }));\n    }\n    renderEmptyMessage() {\n        let { options, viewApi } = this.context;\n        let renderProps = {\n            text: options.noEventsText,\n            view: viewApi,\n        };\n        return (jsx(ContentContainer, { tag: \"div\", attrs: {\n                role: 'status', // does a polite announcement\n            }, renderProps: renderProps, generatorName: \"noEventsContent\", customGenerator: options.noEventsContent, defaultGenerator: renderNoEventsInner, classNameGenerator: options.noEventsClass, className: classNames.grow, didMount: options.noEventsDidMount, willUnmount: options.noEventsWillUnmount, children: (InnerContent) => (jsx(InnerContent, { tag: \"div\", className: generateClassName(options.noEventsInnerClass, renderProps) })) }));\n    }\n    renderSegList(allSegs, dayDates) {\n        let { options } = this.context;\n        let segsByDay = groupSegsByDay(allSegs); // sparse array\n        return (jsx(\"div\", { role: \"list\", \"aria-labelledby\": this.props.labelId, \"aria-label\": this.props.labelStr, className: joinClassNames(classNames.flexCol, joinClassNames(options.listDaysClass)), children: jsx(NowTimer, { unit: \"day\", children: (nowDate, todayRange, nowMs) => {\n                    const dayNodes = [];\n                    const populatedDayCount = segsByDay.reduce((count, daySegs) => count + (daySegs ? 1 : 0), 0);\n                    let populatedDayIndex = 0;\n                    for (let dayIndex = 0; dayIndex < segsByDay.length; dayIndex += 1) {\n                        let daySegs = segsByDay[dayIndex];\n                        if (daySegs) { // sparse array, so might be undefined\n                            const dayDate = dayDates[dayIndex];\n                            const key = formatDayString(dayDate);\n                            const isFirst = populatedDayIndex === 0;\n                            const isLast = populatedDayIndex === populatedDayCount - 1;\n                            dayNodes.push(jsx(ListDay, { dayDate: dayDate, nowDate: nowDate, nowMs: nowMs, todayRange: todayRange, segs: daySegs, isFirst: isFirst, isLast: isLast, forPrint: this.props.forPrint }, key));\n                            populatedDayIndex += 1;\n                        }\n                    }\n                    return (jsx(Fragment, { children: dayNodes }));\n                } }) }));\n    }\n    _eventStoreToSegs(eventStore, eventUiBases, dayRanges) {\n        return this.eventRangesToSegs(sliceEventStore(eventStore, eventUiBases, \n        // HACKY to reference internal state...\n        this.props.dateProfile.activeRange, this.context.options.nextDayThreshold).fg, dayRanges);\n    }\n    eventRangesToSegs(fullDayEventRanges, dayRanges) {\n        let segs = [];\n        for (let fullDayEventRange of fullDayEventRanges) {\n            segs.push(...this.eventRangeToSegs(fullDayEventRange, dayRanges));\n        }\n        return segs;\n    }\n    eventRangeToSegs(fullDayEventRange, dayRanges) {\n        let fullDayRange = fullDayEventRange.range;\n        let dayIndex;\n        let segs = [];\n        for (dayIndex = 0; dayIndex < dayRanges.length; dayIndex += 1) {\n            const slicedFullDayRange = intersectRanges(fullDayRange, dayRanges[dayIndex]);\n            if (slicedFullDayRange) {\n                segs.push({\n                    eventRange: fullDayEventRange,\n                    slicedStart: slicedFullDayRange.start,\n                    slicedEnd: slicedFullDayRange.end,\n                    isStart: fullDayEventRange.isStart && fullDayRange.start.valueOf() === slicedFullDayRange.start.valueOf(),\n                    isEnd: fullDayEventRange.isEnd && fullDayRange.end.valueOf() === slicedFullDayRange.end.valueOf(),\n                    dayIndex,\n                });\n            }\n        }\n        return segs;\n    }\n}\nfunction renderNoEventsInner(renderProps) {\n    return renderProps.text;\n}\nfunction computeDateVars(dateProfile) {\n    let dayStart = startOfDay(dateProfile.renderRange.start);\n    let viewEnd = dateProfile.renderRange.end;\n    let dayDates = [];\n    let dayRanges = [];\n    while (dayStart < viewEnd) {\n        dayDates.push(dayStart);\n        dayRanges.push({\n            start: dayStart,\n            end: addDays(dayStart, 1),\n        });\n        dayStart = addDays(dayStart, 1);\n    }\n    return { dayDates, dayRanges };\n}\n// Returns a sparse array of arrays, segs grouped by their dayIndex\nfunction groupSegsByDay(segs) {\n    let segsByDay = []; // sparse array\n    let i;\n    let seg;\n    for (i = 0; i < segs.length; i += 1) {\n        seg = segs[i];\n        (segsByDay[seg.dayIndex] || (segsByDay[seg.dayIndex] = []))\n            .push(seg);\n    }\n    return segsByDay;\n}\n\nvar listPlugin = {\n    name: 'list',\n    views: {\n        list: {\n            component: ListView,\n            buttonTextKey: 'listText', // what to lookup in locale files\n            disallowAmbigTitle: true,\n        },\n        listDay: {\n            type: 'list',\n            duration: { days: 1 },\n        },\n        listWeek: {\n            type: 'list',\n            duration: { weeks: 1 },\n        },\n        listMonth: {\n            type: 'list',\n            duration: { month: 1 },\n        },\n        listYear: {\n            type: 'list',\n            duration: { year: 1 },\n        },\n    },\n};\n\nexport { listPlugin as l };\n","var l8 = {\n    code: 'az',\n    week: {\n        dow: 1, // Monday is the first day of the week.\n        doy: 4, // The week that contains Jan 4th is the first week of the year.\n    },\n    prevText: 'Əvvəl',\n    nextText: 'Sonra',\n    todayText: 'Bu Gün',\n    yearText: 'Il',\n    monthText: 'Ay',\n    weekTextLong: 'Həftə',\n    dayText: 'Gün',\n    listText: 'Gündəm',\n    allDayText: 'Bütün\\nGün',\n    moreLinkText(n) {\n        return '+ daha çox ' + n;\n    },\n    noEventsText: 'Göstərmək üçün hadisə yoxdur',\n};\n\nexport { l8 as l };\n","var l9 = {\n    code: 'be',\n    week: {\n        dow: 1, // Monday is the first day of the week.\n        doy: 7, // The week that contains Jan 1st is the first week of the year.\n    },\n    prevText: 'Папярэдні',\n    nextText: 'Наступны',\n    todayText: 'Сёння',\n    yearText: 'Год',\n    monthText: 'Месяц',\n    weekTextLong: 'Тыдзень',\n    weekTextShort: 'Тыд',\n    dayText: 'Дзень',\n    listText: 'Парадак дня',\n    allDayText: 'Увесь дзень',\n    moreLinkText(n) {\n        return '+ яшчэ ' + n;\n    },\n    noEventsText: 'Няма падзей для адлюстравання',\n    closeHint: 'Закрыць',\n    eventsHint: 'Падзеі',\n};\n\nexport { l9 as l };\n","// седмица and година are feminine; ден, месец, and the период fallback are masculine\nfunction isFeminine(unit) {\n    return unit === 'week' || unit === 'year';\n}\nfunction unitLabel(unitText) {\n    return (unitText || 'период').toLocaleLowerCase('bg');\n}\nvar l10 = {\n    code: 'bg',\n    week: {\n        dow: 1, // Monday is the first day of the week.\n        doy: 4, // The week that contains Jan 4th is the first week of the year.\n    },\n    prevText: 'назад',\n    nextText: 'напред',\n    todayText: 'днес',\n    yearText: 'година',\n    monthText: 'Месец',\n    weekTextLong: 'Седмица',\n    dayText: 'Ден',\n    listText: 'График',\n    allDayText: 'Цял ден',\n    moreLinkText(n) {\n        return '+още ' + n;\n    },\n    noEventsText: 'Няма събития за показване',\n    prevHint(unitText, unit) {\n        return `${isFeminine(unit) ? 'Предишна' : 'Предишен'} ${unitLabel(unitText)}`;\n    },\n    nextHint(unitText, unit) {\n        return `${isFeminine(unit) ? 'Следваща' : 'Следващ'} ${unitLabel(unitText)}`;\n    },\n    todayHint(unitText, unit) {\n        if (unit === 'day') {\n            return 'Днес';\n        }\n        return `${isFeminine(unit) ? 'Тази' : 'Този'} ${unitLabel(unitText)}`;\n    },\n    navLinkHint: 'Отиди на $0',\n    moreLinkHint(eventCnt) {\n        return eventCnt === 1 ? 'Покажи още едно събитие' : `Покажи още ${eventCnt} събития`;\n    },\n    closeHint: 'Затвори',\n    eventsHint: 'Събития',\n};\n\nexport { l10 as l };\n","var l11 = {\n    code: 'bn',\n    week: {\n        dow: 0, // Sunday is the first day of the week.\n        doy: 6, // The week that contains Jan 1st is the first week of the year.\n    },\n    prevText: 'পেছনে',\n    nextText: 'সামনে',\n    todayText: 'আজ',\n    yearText: 'বছর',\n    monthText: 'মাস',\n    weekTextLong: 'সপ্তাহ',\n    dayText: 'দিন',\n    listText: 'তালিকা',\n    allDayText: 'সারাদিন',\n    moreLinkText(n) {\n        return '+অন্যান্য ' + n;\n    },\n    noEventsText: 'কোনো ইভেন্ট নেই',\n};\n\nexport { l11 as l };\n","var l12 = {\n    code: 'bs',\n    week: {\n        dow: 1, // Monday is the first day of the week.\n        doy: 7, // The week that contains Jan 1st is the first week of the year.\n    },\n    prevText: 'Prošli',\n    nextText: 'Sljedeći',\n    todayText: 'Danas',\n    yearText: 'Godina',\n    monthText: 'Mjesec',\n    weekTextLong: 'Sedmica',\n    weekTextShort: 'Sed',\n    dayText: 'Dan',\n    listText: 'Raspored',\n    allDayText: 'Cijeli\\ndan',\n    moreLinkText(n) {\n        return '+ još ' + n;\n    },\n    noEventsText: 'Nema događaja za prikazivanje',\n};\n\nexport { l12 as l };\n","var l14 = {\n    code: 'cs',\n    week: {\n        dow: 1, // Monday is the first day of the week.\n        doy: 4, // The week that contains Jan 4th is the first week of the year.\n    },\n    prevText: 'Dříve',\n    nextText: 'Později',\n    todayText: 'Dnes',\n    yearText: 'Rok',\n    monthText: 'Měsíc',\n    weekTextLong: 'Týden',\n    weekTextShort: 'Týd',\n    dayText: 'Den',\n    listText: 'Agenda',\n    allDayText: 'Celý den',\n    moreLinkText(n) {\n        return '+další: ' + n;\n    },\n    noEventsText: 'Žádné akce k zobrazení',\n};\n\nexport { l14 as l };\n","function affix(unitText) {\n    return (unitText === 'Tag' || unitText === 'Monat') ? 'r' :\n        unitText === 'Jahr' ? 's' : '';\n}\nconst viewHints = {\n    Tag: 'Tagesansicht',\n    Woche: 'Wochenansicht',\n    Monat: 'Monatsansicht',\n    Jahr: 'Jahresansicht',\n};\nvar l17 = {\n    code: 'de-at',\n    week: {\n        dow: 1, // Monday is the first day of the week.\n        doy: 4, // The week that contains Jan 4th is the first week of the year.\n    },\n    prevText: 'Zurück',\n    nextText: 'Vor',\n    todayText: 'Heute',\n    yearText: 'Jahr',\n    monthText: 'Monat',\n    weekTextLong: 'Woche',\n    weekTextShort: 'KW',\n    dayText: 'Tag',\n    listText: 'Terminübersicht',\n    allDayText: 'Ganztägig',\n    moreLinkText(n) {\n        return '+ weitere ' + n;\n    },\n    noEventsText: 'Keine Ereignisse anzuzeigen',\n    prevHint(unitText) {\n        return `Vorherige${affix(unitText)} ${unitText}`;\n    },\n    nextHint(unitText) {\n        return `Nächste${affix(unitText)} ${unitText}`;\n    },\n    todayHint(unitText) {\n        // → Heute, Diese Woche, Dieser Monat, Dieses Jahr\n        if (unitText === 'Tag') {\n            return 'Heute';\n        }\n        return `Diese${affix(unitText)} ${unitText}`;\n    },\n    viewHint(unitText) {\n        // other button text, like Terminübersicht, already names the view\n        return viewHints[unitText] || unitText;\n    },\n    navLinkHint: 'Gehe zu $0',\n    moreLinkHint(eventCnt) {\n        return 'Zeige ' + (eventCnt === 1 ?\n            'ein weiteres Ereignis' :\n            eventCnt + ' weitere Ereignisse');\n    },\n    closeHint: 'Schließen',\n    eventsHint: 'Ereignisse',\n};\n\nexport { l17 as l };\n","function affix(unitText) {\n    return (unitText === 'Tag' || unitText === 'Monat') ? 'r' :\n        unitText === 'Jahr' ? 's' : '';\n}\nconst viewHints = {\n    Tag: 'Tagesansicht',\n    Woche: 'Wochenansicht',\n    Monat: 'Monatsansicht',\n    Jahr: 'Jahresansicht',\n};\nvar l18 = {\n    code: 'de',\n    week: {\n        dow: 1, // Monday is the first day of the week.\n        doy: 4, // The week that contains Jan 4th is the first week of the year.\n    },\n    prevText: 'Zurück',\n    nextText: 'Vor',\n    todayText: 'Heute',\n    yearText: 'Jahr',\n    monthText: 'Monat',\n    weekTextLong: 'Woche',\n    weekTextShort: 'KW',\n    dayText: 'Tag',\n    listText: 'Terminübersicht',\n    allDayText: 'Ganztägig',\n    moreLinkText(n) {\n        return '+ weitere ' + n;\n    },\n    noEventsText: 'Keine Ereignisse anzuzeigen',\n    prevHint(unitText) {\n        return `Vorherige${affix(unitText)} ${unitText}`;\n    },\n    nextHint(unitText) {\n        return `Nächste${affix(unitText)} ${unitText}`;\n    },\n    todayHint(unitText) {\n        // → Heute, Diese Woche, Dieser Monat, Dieses Jahr\n        if (unitText === 'Tag') {\n            return 'Heute';\n        }\n        return `Diese${affix(unitText)} ${unitText}`;\n    },\n    viewHint(unitText) {\n        // other button text, like Terminübersicht, already names the view\n        return viewHints[unitText] || unitText;\n    },\n    navLinkHint: 'Gehe zu $0',\n    moreLinkHint(eventCnt) {\n        return 'Zeige ' + (eventCnt === 1 ?\n            'ein weiteres Ereignis' :\n            eventCnt + ' weitere Ereignisse');\n    },\n    closeHint: 'Schließen',\n    eventsHint: 'Ereignisse',\n};\n\nexport { l18 as l };\n","var l26 = {\n    code: 'et',\n    week: {\n        dow: 1, // Monday is the first day of the week.\n        doy: 4, // The week that contains Jan 4th is the first week of the year.\n    },\n    prevText: 'Eelnev',\n    nextText: 'Järgnev',\n    todayText: 'Täna',\n    yearText: 'Aasta',\n    monthText: 'Kuu',\n    weekTextLong: 'Nädal',\n    weekTextShort: 'Näd',\n    dayText: 'Päev',\n    listText: 'Päevakord',\n    allDayText: 'Kogu\\npäev',\n    moreLinkText(n) {\n        return '+ veel ' + n;\n    },\n    noEventsText: 'Kuvamiseks puuduvad sündmused',\n};\n\nexport { l26 as l };\n","var l28 = {\n    code: 'fa',\n    week: {\n        dow: 6, // Saturday is the first day of the week.\n        doy: 12, // The week that contains Jan 1st is the first week of the year.\n    },\n    direction: 'rtl',\n    prevText: 'قبلی',\n    nextText: 'بعدی',\n    prevYearText: 'سال قبل',\n    nextYearText: 'سال بعد',\n    todayText: 'امروز',\n    yearText: 'سال',\n    monthText: 'ماه',\n    weekTextLong: 'هفته',\n    weekTextShort: 'هف',\n    dayText: 'روز',\n    listText: 'برنامه',\n    allDayText: 'تمام روز',\n    moreLinkText(n) {\n        return '+' + n + ' بیشتر';\n    },\n    noEventsText: 'هیچ رویدادی برای نمایش یافت نشد',\n    prevHint: '$0 قبلی',\n    nextHint: '$0 بعدی',\n    todayHint(unitText, unit) {\n        // → امروز, این هفته, این ماه, امسال\n        if (unit === 'day') {\n            return 'امروز';\n        }\n        if (unit === 'year') {\n            return 'امسال';\n        }\n        return `این ${unitText || 'دوره'}`;\n    },\n    viewHint: 'مشاهده $0',\n    navLinkHint: 'برو به $0',\n    closeHint: 'بستن',\n    eventsHint: 'رویدادها',\n};\n\nexport { l28 as l };\n","var l35 = {\n    code: 'hi',\n    week: {\n        dow: 0, // Sunday is the first day of the week.\n        doy: 6, // The week that contains Jan 1st is the first week of the year.\n    },\n    prevText: 'पिछला',\n    nextText: 'अगला',\n    todayText: 'आज',\n    yearText: 'वर्ष',\n    monthText: 'महीना',\n    weekTextLong: 'सप्ताह',\n    weekTextShort: 'हफ्ता',\n    dayText: 'दिन',\n    listText: 'कार्यसूची',\n    allDayText: 'सभी दिन',\n    moreLinkText(n) {\n        return '+अधिक ' + n;\n    },\n    noEventsText: 'कोई घटनाओं को प्रदर्शित करने के लिए',\n};\n\nexport { l35 as l };\n","var l36 = {\n    code: 'hr',\n    week: {\n        dow: 1, // Monday is the first day of the week.\n        doy: 7, // The week that contains Jan 1st is the first week of the year.\n    },\n    prevText: 'Prijašnji',\n    nextText: 'Sljedeći',\n    todayText: 'Danas',\n    yearText: 'Godina',\n    monthText: 'Mjesec',\n    weekTextLong: 'Tjedan',\n    weekTextShort: 'Tje',\n    dayText: 'Dan',\n    listText: 'Raspored',\n    allDayText: 'Cijeli\\ndan',\n    moreLinkText(n) {\n        return '+ još ' + n;\n    },\n    noEventsText: 'Nema događaja za prikaz',\n};\n\nexport { l36 as l };\n","var l38 = {\n    code: 'hy-am',\n    week: {\n        dow: 1, // Monday is the first day of the week.\n        doy: 4, // The week that contains Jan 4th is the first week of the year.\n    },\n    prevText: 'Նախորդ',\n    nextText: 'Հաջորդ',\n    todayText: 'Այսօր',\n    yearText: 'Տարի',\n    monthText: 'Ամիս',\n    weekTextLong: 'Շաբաթ',\n    weekTextShort: 'Շաբ',\n    dayText: 'Օր',\n    listText: 'Օրվա ցուցակ',\n    allDayText: 'Ամբողջ օր',\n    moreLinkText(n) {\n        return '+ ևս ' + n;\n    },\n    noEventsText: 'Բացակայում է իրադարձությունը ցուցադրելու',\n};\n\nexport { l38 as l };\n","var l41 = {\n    code: 'it',\n    week: {\n        dow: 1, // Monday is the first day of the week.\n        doy: 4, // The week that contains Jan 4th is the first week of the year.\n    },\n    prevText: 'Prec',\n    nextText: 'Succ',\n    todayText: 'Oggi',\n    yearText: 'Anno',\n    monthText: 'Mese',\n    weekTextLong: 'Settimana',\n    weekTextShort: 'Sm',\n    dayText: 'Giorno',\n    listText: 'Agenda',\n    allDayText: 'Tutto\\nil giorno',\n    moreLinkText(n) {\n        return '+altri ' + n;\n    },\n    noEventsText: 'Non ci sono eventi da visualizzare',\n};\n\nexport { l41 as l };\n","var l42 = {\n    code: 'ja',\n    prevText: '前',\n    nextText: '次',\n    todayText: '今日',\n    yearText: '年',\n    monthText: '月',\n    weekTextLong: '週',\n    dayText: '日',\n    listText: '予定リスト',\n    allDayText: '終日',\n    moreLinkText(n) {\n        return '他 ' + n + ' 件';\n    },\n    noEventsText: '表示する予定はありません',\n};\n\nexport { l42 as l };\n","var l43 = {\n    code: 'ka',\n    week: {\n        dow: 1,\n        doy: 7,\n    },\n    prevText: 'წინა',\n    nextText: 'შემდეგი',\n    todayText: 'დღეს',\n    yearText: 'წელიწადი',\n    monthText: 'თვე',\n    weekTextLong: 'კვირა',\n    weekTextShort: 'კვ',\n    dayText: 'დღე',\n    listText: 'დღის წესრიგი',\n    allDayText: 'მთელი\\nდღე',\n    moreLinkText(n) {\n        return '+ კიდევ ' + n;\n    },\n    noEventsText: 'ღონისძიებები არ არის',\n};\n\nexport { l43 as l };\n","var l44 = {\n    code: 'kk',\n    week: {\n        dow: 1, // Monday is the first day of the week.\n        doy: 7, // The week that contains Jan 1st is the first week of the year.\n    },\n    prevText: 'Алдыңғы',\n    nextText: 'Келесі',\n    todayText: 'Бүгін',\n    yearText: 'Жыл',\n    monthText: 'Ай',\n    weekTextLong: 'Апта',\n    dayText: 'Күн',\n    listText: 'Күн тәртібі',\n    allDayText: 'Күні\\nбойы',\n    moreLinkText(n) {\n        return '+ тағы ' + n;\n    },\n    noEventsText: 'Көрсету үшін оқиғалар жоқ',\n};\n\nexport { l44 as l };\n","var l46 = {\n    code: 'ko',\n    prevText: '이전',\n    nextText: '다음',\n    todayText: '오늘',\n    yearText: '연도',\n    monthText: '월',\n    weekTextLong: '주',\n    dayText: '일',\n    listText: '일정',\n    allDayText: '종일',\n    moreLinkText(n) {\n        return `+${n}개 더보기`;\n    },\n    noEventsText: '일정이 없습니다',\n};\n\nexport { l46 as l };\n","var l50 = {\n    code: 'lv',\n    week: {\n        dow: 1, // Monday is the first day of the week.\n        doy: 4, // The week that contains Jan 4th is the first week of the year.\n    },\n    prevText: 'Iepr.',\n    nextText: 'Nāk.',\n    todayText: 'Šodien',\n    yearText: 'Gads',\n    monthText: 'Mēnesis',\n    weekTextLong: 'Nedēļa',\n    weekTextShort: 'Ned.',\n    dayText: 'Diena',\n    listText: 'Dienas kārtība',\n    allDayText: 'Visu\\ndienu',\n    moreLinkText(n) {\n        return '+vēl ' + n;\n    },\n    noEventsText: 'Nav notikumu',\n};\n\nexport { l50 as l };\n","var l51 = {\n    code: 'mk',\n    prevText: 'претходно',\n    nextText: 'следно',\n    todayText: 'Денес',\n    yearText: 'година',\n    monthText: 'Месец',\n    weekTextLong: 'Недела',\n    weekTextShort: 'Сед',\n    dayText: 'Ден',\n    listText: 'График',\n    allDayText: 'Цел ден',\n    moreLinkText(n) {\n        return '+повеќе ' + n;\n    },\n    noEventsText: 'Нема настани за прикажување',\n};\n\nexport { l51 as l };\n","var l52 = {\n    code: 'ms',\n    week: {\n        dow: 1, // Monday is the first day of the week.\n        doy: 7, // The week that contains Jan 1st is the first week of the year.\n    },\n    prevText: 'Sebelum',\n    nextText: 'Selepas',\n    todayText: 'hari ini',\n    yearText: 'Tahun',\n    monthText: 'Bulan',\n    weekTextLong: 'Minggu',\n    weekTextShort: 'Mg',\n    dayText: 'Hari',\n    listText: 'Agenda',\n    allDayText: 'Sepanjang\\nhari',\n    moreLinkText(n) {\n        return 'masih ada ' + n + ' acara';\n    },\n    noEventsText: 'Tiada peristiwa untuk dipaparkan',\n};\n\nexport { l52 as l };\n","function unitLabel(unitText) {\n    return (unitText || 'periode').toLocaleLowerCase('nn');\n}\nconst todayHints = {\n    day: 'I dag',\n    week: 'Denne veka',\n    month: 'Denne månaden',\n    year: 'I år',\n};\nvar l56 = {\n    code: 'nn',\n    week: {\n        dow: 1, // Monday is the first day of the week.\n        doy: 4, // The week that contains Jan 4th is the first week of the year.\n    },\n    prevText: 'Førre',\n    nextText: 'Neste',\n    todayText: 'I dag',\n    yearText: 'År',\n    monthText: 'Månad',\n    weekTextLong: 'Veke',\n    dayText: 'Dag',\n    listText: 'Agenda',\n    allDayText: 'Heile\\ndagen',\n    moreLinkText: 'til',\n    noEventsText: 'Ingen hendingar å vise',\n    prevHint(unitText) {\n        return `Førre ${unitLabel(unitText)}`;\n    },\n    nextHint(unitText) {\n        return `Neste ${unitLabel(unitText)}`;\n    },\n    todayHint(unitText, unit) {\n        return todayHints[unit] || `Noverande ${unitLabel(unitText)}`;\n    },\n    viewHint(unitText) {\n        return `Vis ${unitLabel(unitText)}`;\n    },\n    navLinkHint: 'Gå til $0',\n    moreLinkHint(eventCnt) {\n        return `Vis ${eventCnt} hending${eventCnt === 1 ? '' : 'ar'} til`;\n    },\n    closeHint: 'Lukk',\n    eventsHint: 'Hendingar',\n};\n\nexport { l56 as l };\n","var l58 = {\n    code: 'pt-br',\n    prevText: 'Anterior',\n    nextText: 'Próximo',\n    prevYearText: 'Ano anterior',\n    nextYearText: 'Próximo ano',\n    yearText: 'Ano',\n    todayText: 'Hoje',\n    monthText: 'Mês',\n    weekTextLong: 'Semana',\n    weekTextShort: 'Sm',\n    dayText: 'Dia',\n    listText: 'Lista',\n    prevHint: '$0 Anterior',\n    nextHint: 'Próximo $0',\n    todayHint(unitText, unit) {\n        return (unit === 'day') ? 'Hoje' :\n            ((unit === 'week') ? 'Esta' : 'Este') + ' ' + unitText.toLocaleLowerCase();\n    },\n    viewHint(unitText, unit) {\n        return 'Visualizar ' + (unit === 'week' ? 'a' : 'o') + ' ' + unitText.toLocaleLowerCase();\n    },\n    allDayText: 'Dia\\ninteiro',\n    moreLinkText(n) {\n        return 'mais +' + n;\n    },\n    moreLinkHint(eventCnt) {\n        return `Mostrar mais ${eventCnt} eventos`;\n    },\n    noEventsText: 'Não há eventos para mostrar',\n    navLinkHint: 'Ir para $0',\n    closeHint: 'Fechar',\n    eventsHint: 'Eventos',\n};\n\nexport { l58 as l };\n","var l60 = {\n    code: 'ro',\n    week: {\n        dow: 1, // Monday is the first day of the week.\n        doy: 7, // The week that contains Jan 1st is the first week of the year.\n    },\n    prevText: 'precedentă',\n    nextText: 'următoare',\n    todayText: 'Azi',\n    yearText: 'An',\n    monthText: 'Lună',\n    weekTextLong: 'Săptămână',\n    weekTextShort: 'Săpt',\n    dayText: 'Zi',\n    listText: 'Agendă',\n    allDayText: 'Toată\\nziua',\n    moreLinkText(n) {\n        return '+alte ' + n;\n    },\n    noEventsText: 'Nu există evenimente de afișat',\n};\n\nexport { l60 as l };\n","var l61 = {\n    code: 'ru',\n    week: {\n        dow: 1, // Monday is the first day of the week.\n        doy: 4, // The week that contains Jan 4th is the first week of the year.\n    },\n    prevText: 'Пред',\n    nextText: 'След',\n    todayText: 'Сегодня',\n    yearText: 'Год',\n    monthText: 'Месяц',\n    weekTextLong: 'Неделя',\n    weekTextShort: 'Нед',\n    dayText: 'День',\n    listText: 'Повестка дня',\n    allDayText: 'Весь\\nдень',\n    moreLinkText(n) {\n        return '+ ещё ' + n;\n    },\n    noEventsText: 'Нет событий для отображения',\n};\n\nexport { l61 as l };\n","var l63 = {\n    code: 'sk',\n    week: {\n        dow: 1, // Monday is the first day of the week.\n        doy: 4, // The week that contains Jan 4th is the first week of the year.\n    },\n    prevText: 'Predchádzajúci',\n    nextText: 'Nasledujúci',\n    todayText: 'Dnes',\n    yearText: 'Rok',\n    monthText: 'Mesiac',\n    weekTextLong: 'Týždeň',\n    weekTextShort: 'Ty',\n    dayText: 'Deň',\n    listText: 'Rozvrh',\n    allDayText: 'Celý deň',\n    moreLinkText(n) {\n        return '+ďalšie: ' + n;\n    },\n    noEventsText: 'Žiadne akcie na zobrazenie',\n};\n\nexport { l63 as l };\n","var l66 = {\n    code: 'sq',\n    week: {\n        dow: 1, // Monday is the first day of the week.\n        doy: 4, // The week that contains Jan 4th is the first week of the year.\n    },\n    prevText: 'mbrapa',\n    nextText: 'Përpara',\n    todayText: 'Sot',\n    yearText: 'Viti',\n    monthText: 'Muaj',\n    weekTextLong: 'Javë',\n    weekTextShort: 'Ja',\n    dayText: 'Ditë',\n    listText: 'Listë',\n    allDayText: 'Gjithë\\nditën',\n    moreLinkText(n) {\n        return '+më tepër ' + n;\n    },\n    noEventsText: 'Nuk ka evente për të shfaqur',\n};\n\nexport { l66 as l };\n","var l67 = {\n    code: 'sr-cyrl',\n    week: {\n        dow: 1, // Monday is the first day of the week.\n        doy: 7, // The week that contains Jan 1st is the first week of the year.\n    },\n    prevText: 'Претходна',\n    nextText: 'следећи',\n    todayText: 'Данас',\n    yearText: 'Година',\n    monthText: 'Месец',\n    weekTextLong: 'Недеља',\n    weekTextShort: 'Сед',\n    dayText: 'Дан',\n    listText: 'Планер',\n    allDayText: 'Цео дан',\n    moreLinkText(n) {\n        return '+ још ' + n;\n    },\n    noEventsText: 'Нема догађаја за приказ',\n};\n\nexport { l67 as l };\n","var l68 = {\n    code: 'sr',\n    week: {\n        dow: 1, // Monday is the first day of the week.\n        doy: 7, // The week that contains Jan 1st is the first week of the year.\n    },\n    prevText: 'Prethodna',\n    nextText: 'Sledeći',\n    todayText: 'Danas',\n    yearText: 'Godina',\n    monthText: 'Mеsеc',\n    weekTextLong: 'Nеdеlja',\n    weekTextShort: 'Sed',\n    dayText: 'Dan',\n    listText: 'Planеr',\n    allDayText: 'Cеo dan',\n    moreLinkText(n) {\n        return '+ još ' + n;\n    },\n    noEventsText: 'Nеma događaja za prikaz',\n};\n\nexport { l68 as l };\n","var l70 = {\n    code: 'ta-in',\n    week: {\n        dow: 1, // Monday is the first day of the week.\n        doy: 4, // The week that contains Jan 4th is the first week of the year.\n    },\n    prevText: 'முந்தைய',\n    nextText: 'அடுத்தது',\n    todayText: 'இன்று',\n    yearText: 'ஆண்டு',\n    monthText: 'மாதம்',\n    weekTextLong: 'வாரம்',\n    dayText: 'நாள்',\n    listText: 'தினசரி அட்டவணை',\n    allDayText: 'நாள்\\nமுழுவதும்',\n    moreLinkText(n) {\n        return '+ மேலும் ' + n;\n    },\n    noEventsText: 'காண்பிக்க நிகழ்வுகள் இல்லை',\n};\n\nexport { l70 as l };\n","var l71 = {\n    code: 'tg',\n    week: {\n        dow: 1, // Monday is the first day of the week.\n        doy: 7, // The week that contains Jan 1st is the first week of the year.\n    },\n    prevText: 'Қаблӣ',\n    nextText: 'Баъдӣ',\n    todayText: 'Имрӯз',\n    yearText: 'Сол',\n    monthText: 'Моҳ',\n    weekTextLong: 'Ҳафта',\n    dayText: 'Рӯз',\n    listText: 'Рӯйхат',\n    allDayText: 'Тамоми рӯз',\n    moreLinkText(n) {\n        return '+ бештар ' + n;\n    },\n    noEventsText: 'Ҳеҷ рӯйдоде барои намоиш нест',\n    closeHint: 'Пӯшидан',\n    eventsHint: 'Рӯйдодҳо',\n};\n\nexport { l71 as l };\n","var l75 = {\n    code: 'uk',\n    week: {\n        dow: 1, // Monday is the first day of the week.\n        doy: 7, // The week that contains Jan 1st is the first week of the year.\n    },\n    prevText: 'Попередній',\n    nextText: 'далі',\n    todayText: 'Сьогодні',\n    yearText: 'рік',\n    monthText: 'Місяць',\n    weekTextLong: 'Тиждень',\n    weekTextShort: 'Тиж',\n    dayText: 'День',\n    listText: 'Порядок денний',\n    allDayText: 'Увесь\\nдень',\n    moreLinkText(n) {\n        return '+ще ' + n + '...';\n    },\n    noEventsText: 'Немає подій для відображення',\n};\n\nexport { l75 as l };\n","var l76 = {\n    code: 'uz-cy',\n    week: {\n        dow: 1, // Monday is the first day of the week.\n        doy: 4, // The week that contains Jan 4th is the first week of the year.\n    },\n    prevText: 'Олин',\n    nextText: 'Кейин',\n    todayText: 'Бугун',\n    monthText: 'Ой',\n    weekTextLong: 'Ҳафта',\n    dayText: 'Кун',\n    listText: 'Кун тартиби',\n    allDayText: 'Кун\\nбўйича',\n    moreLinkText(n) {\n        return '+ яна ' + n;\n    },\n    noEventsText: 'Кўрсатиш учун воқеалар йўқ',\n};\n\nexport { l76 as l };\n","var l77 = {\n    code: 'uz',\n    week: {\n        dow: 1, // Monday is the first day of the week.\n        doy: 4, // The week that contains Jan 4th is the first week of the year.\n    },\n    prevText: 'Oldingi',\n    nextText: 'Keyingi',\n    todayText: 'Bugun',\n    yearText: 'Yil',\n    monthText: 'Oy',\n    weekTextLong: 'Xafta',\n    dayText: 'Kun',\n    listText: 'Kun tartibi',\n    allDayText: 'Kun bo\\'yi',\n    moreLinkText(n) {\n        return '+ yana ' + n;\n    },\n    noEventsText: 'Ko\\'rsatish uchun voqealar yo\\'q',\n};\n\nexport { l77 as l };\n","var l78 = {\n    code: 'vi',\n    week: {\n        dow: 1, // Monday is the first day of the week.\n        doy: 4, // The week that contains Jan 4th is the first week of the year.\n    },\n    prevText: 'Trước',\n    nextText: 'Tiếp',\n    todayText: 'Hôm nay',\n    yearText: 'Năm',\n    monthText: 'Tháng',\n    weekTextLong: 'Tuần',\n    weekTextShort: 'Tu',\n    dayText: 'Ngày',\n    listText: 'Lịch biểu',\n    allDayText: 'Cả ngày',\n    moreLinkText(n) {\n        return '+ thêm ' + n;\n    },\n    noEventsText: 'Không có sự kiện để hiển thị',\n};\n\nexport { l78 as l };\n","var l79 = {\n    code: 'zh-cn',\n    week: {\n        // GB/T 7408-1994《数据元和交换格式·信息交换·日期和时间表示法》与ISO 8601:1988等效\n        dow: 1, // Monday is the first day of the week.\n        doy: 4, // The week that contains Jan 4th is the first week of the year.\n    },\n    prevText: '上月',\n    nextText: '下月',\n    todayText: '今天',\n    yearText: '年',\n    monthText: '月',\n    weekTextLong: '周',\n    dayText: '日',\n    listText: '日程',\n    allDayText: '全天',\n    moreLinkText(n) {\n        return '另外 ' + n + ' 个';\n    },\n    noEventsText: '没有事件显示',\n};\n\nexport { l79 as l };\n","import { l as l0 } from '../chunks/e9b25849.js';\nimport { l as l1 } from '../chunks/374ce2d5.js';\nimport { l as l2 } from '../chunks/706bd11c.js';\nimport { l as l3 } from '../chunks/87ea31a4.js';\nimport { l as l4 } from '../chunks/141f9d37.js';\nimport { l as l5 } from '../chunks/3a797b1a.js';\nimport { l as l6 } from '../chunks/ef2cc2c2.js';\nimport { l as l7 } from '../chunks/1577123f.js';\nimport { l as l8 } from '../chunks/c8bfd3b8.js';\nimport { l as l9 } from '../chunks/919f0b51.js';\nimport { l as l10 } from '../chunks/7da45925.js';\nimport { l as l11 } from '../chunks/f4fb1541.js';\nimport { l as l12 } from '../chunks/aebf6bd0.js';\nimport { l as l13 } from '../chunks/3e5ce859.js';\nimport { l as l14 } from '../chunks/33461ac4.js';\nimport { l as l15 } from '../chunks/62e6fc24.js';\nimport { l as l16 } from '../chunks/39d5fe19.js';\nimport { l as l17 } from '../chunks/7fd78f3a.js';\nimport { l as l18 } from '../chunks/8acff3e8.js';\nimport { l as l19 } from '../chunks/271e4e27.js';\nimport { l as l20 } from '../chunks/2a34c2af.js';\nimport { l as l21 } from '../chunks/c5f9ee8d.js';\nimport { l as l22 } from '../chunks/d683e1dc.js';\nimport { l as l23 } from '../chunks/2e14db02.js';\nimport { l as l24 } from '../chunks/ec51c942.js';\nimport { l as l25 } from '../chunks/59ff284f.js';\nimport { l as l26 } from '../chunks/c72f1c70.js';\nimport { l as l27 } from '../chunks/67ffa90b.js';\nimport { l as l28 } from '../chunks/c8705882.js';\nimport { l as l29 } from '../chunks/d9e1b164.js';\nimport { l as l30 } from '../chunks/c78e6a20.js';\nimport { l as l31 } from '../chunks/3919efc1.js';\nimport { l as l32 } from '../chunks/4cb239c3.js';\nimport { l as l33 } from '../chunks/9cb5389e.js';\nimport { l as l34 } from '../chunks/48804e93.js';\nimport { l as l35 } from '../chunks/9789701c.js';\nimport { l as l36 } from '../chunks/a5419a33.js';\nimport { l as l37 } from '../chunks/6b4e1e18.js';\nimport { l as l38 } from '../chunks/df021800.js';\nimport { l as l39 } from '../chunks/a018ee0e.js';\nimport { l as l40 } from '../chunks/588c5911.js';\nimport { l as l41 } from '../chunks/ff3da282.js';\nimport { l as l42 } from '../chunks/1603e6d0.js';\nimport { l as l43 } from '../chunks/252e9ac7.js';\nimport { l as l44 } from '../chunks/e3e2e4bc.js';\nimport { l as l45 } from '../chunks/91d714e4.js';\nimport { l as l46 } from '../chunks/eb12ffd7.js';\nimport { l as l47 } from '../chunks/ed111b60.js';\nimport { l as l48 } from '../chunks/4b069df5.js';\nimport { l as l49 } from '../chunks/98aa0f9f.js';\nimport { l as l50 } from '../chunks/231b2088.js';\nimport { l as l51 } from '../chunks/7783f561.js';\nimport { l as l52 } from '../chunks/6bcc4442.js';\nimport { l as l53 } from '../chunks/3afe0c3a.js';\nimport { l as l54 } from '../chunks/ee493988.js';\nimport { l as l55 } from '../chunks/9e01cae7.js';\nimport { l as l56 } from '../chunks/7f98e44b.js';\nimport { l as l57 } from '../chunks/d8aff20d.js';\nimport { l as l58 } from '../chunks/21344588.js';\nimport { l as l59 } from '../chunks/e6ea8eef.js';\nimport { l as l60 } from '../chunks/e06c9ff0.js';\nimport { l as l61 } from '../chunks/be24a822.js';\nimport { l as l62 } from '../chunks/21ae4032.js';\nimport { l as l63 } from '../chunks/84466fc0.js';\nimport { l as l64 } from '../chunks/8077a96d.js';\nimport { l as l65 } from '../chunks/2e6b2d23.js';\nimport { l as l66 } from '../chunks/b2bd9c22.js';\nimport { l as l67 } from '../chunks/91b24338.js';\nimport { l as l68 } from '../chunks/ee263d0c.js';\nimport { l as l69 } from '../chunks/8673d7cb.js';\nimport { l as l70 } from '../chunks/b4facd36.js';\nimport { l as l71 } from '../chunks/13e5ac15.js';\nimport { l as l72 } from '../chunks/9ca0d6e1.js';\nimport { l as l73 } from '../chunks/e8fabd18.js';\nimport { l as l74 } from '../chunks/f17b0fb2.js';\nimport { l as l75 } from '../chunks/a9707292.js';\nimport { l as l76 } from '../chunks/41f30021.js';\nimport { l as l77 } from '../chunks/75d26228.js';\nimport { l as l78 } from '../chunks/f26fddac.js';\nimport { l as l79 } from '../chunks/2cfa23a2.js';\nimport { l as l80 } from '../chunks/acf7b7fd.js';\n\nvar localesAll = [\n  l0, l1, l2, l3, l4, l5, l6, l7, l8, l9, l10, l11, l12, l13, l14, l15, l16, l17, l18, l19, l20, l21, l22, l23, l24, l25, l26, l27, l28, l29, l30, l31, l32, l33, l34, l35, l36, l37, l38, l39, l40, l41, l42, l43, l44, l45, l46, l47, l48, l49, l50, l51, l52, l53, l54, l55, l56, l57, l58, l59, l60, l61, l62, l63, l64, l65, l66, l67, l68, l69, l70, l71, l72, l73, l74, l75, l76, l77, l78, l79, l80, \n];\n\nexport { localesAll as default };\n","var l0 = {\n    code: 'af',\n    week: {\n        dow: 1, // Maandag is die eerste dag van die week.\n        doy: 4, // Die week wat die 4de Januarie bevat is die eerste week van die jaar.\n    },\n    prevText: 'Vorige',\n    nextText: 'Volgende',\n    todayText: 'Vandag',\n    yearText: 'Jaar',\n    monthText: 'Maand',\n    weekTextLong: 'Week',\n    dayText: 'Dag',\n    listText: 'Agenda',\n    allDayText: 'Heeldag',\n    moreLinkText: 'Addisionele',\n    noEventsText: 'Daar is geen gebeurtenisse nie',\n};\n\nexport { l0 as l };\n","var l1 = {\n    code: 'ar-dz',\n    week: {\n        dow: 0, // Sunday is the first day of the week.\n        doy: 4, // The week that contains Jan 1st is the first week of the year.\n    },\n    direction: 'rtl',\n    prevText: 'السابق',\n    nextText: 'التالي',\n    todayText: 'اليوم',\n    yearText: 'سنة',\n    monthText: 'شهر',\n    weekTextLong: 'أسبوع',\n    dayText: 'يوم',\n    listText: 'أجندة',\n    allDayText: 'اليوم كله',\n    moreLinkText: 'أخرى',\n    noEventsText: 'أي أحداث لعرض',\n};\n\nexport { l1 as l };\n","var l2 = {\n    code: 'ar-kw',\n    week: {\n        dow: 0, // Sunday is the first day of the week.\n        doy: 12, // The week that contains Jan 1st is the first week of the year.\n    },\n    direction: 'rtl',\n    prevText: 'السابق',\n    nextText: 'التالي',\n    todayText: 'اليوم',\n    yearText: 'سنة',\n    monthText: 'شهر',\n    weekTextLong: 'أسبوع',\n    dayText: 'يوم',\n    listText: 'أجندة',\n    allDayText: 'اليوم كله',\n    moreLinkText: 'أخرى',\n    noEventsText: 'أي أحداث لعرض',\n};\n\nexport { l2 as l };\n","var l3 = {\n    code: 'ar-ly',\n    week: {\n        dow: 6, // Saturday is the first day of the week.\n        doy: 12, // The week that contains Jan 1st is the first week of the year.\n    },\n    direction: 'rtl',\n    prevText: 'السابق',\n    nextText: 'التالي',\n    todayText: 'اليوم',\n    yearText: 'سنة',\n    monthText: 'شهر',\n    weekTextLong: 'أسبوع',\n    dayText: 'يوم',\n    listText: 'أجندة',\n    allDayText: 'اليوم كله',\n    moreLinkText: 'أخرى',\n    noEventsText: 'أي أحداث لعرض',\n};\n\nexport { l3 as l };\n","var l4 = {\n    code: 'ar-ma',\n    week: {\n        dow: 6, // Saturday is the first day of the week.\n        doy: 12, // The week that contains Jan 1st is the first week of the year.\n    },\n    direction: 'rtl',\n    prevText: 'السابق',\n    nextText: 'التالي',\n    todayText: 'اليوم',\n    yearText: 'سنة',\n    monthText: 'شهر',\n    weekTextLong: 'أسبوع',\n    dayText: 'يوم',\n    listText: 'أجندة',\n    allDayText: 'اليوم كله',\n    moreLinkText: 'أخرى',\n    noEventsText: 'أي أحداث لعرض',\n};\n\nexport { l4 as l };\n","var l5 = {\n    code: 'ar-sa',\n    week: {\n        dow: 0, // Sunday is the first day of the week.\n        doy: 6, // The week that contains Jan 1st is the first week of the year.\n    },\n    direction: 'rtl',\n    prevText: 'السابق',\n    nextText: 'التالي',\n    todayText: 'اليوم',\n    yearText: 'سنة',\n    monthText: 'شهر',\n    weekTextLong: 'أسبوع',\n    dayText: 'يوم',\n    listText: 'أجندة',\n    allDayText: 'اليوم كله',\n    moreLinkText: 'أخرى',\n    noEventsText: 'أي أحداث لعرض',\n};\n\nexport { l5 as l };\n","var l6 = {\n    code: 'ar-tn',\n    week: {\n        dow: 1, // Monday is the first day of the week.\n        doy: 4, // The week that contains Jan 4th is the first week of the year.\n    },\n    direction: 'rtl',\n    prevText: 'السابق',\n    nextText: 'التالي',\n    todayText: 'اليوم',\n    yearText: 'سنة',\n    monthText: 'شهر',\n    weekTextLong: 'أسبوع',\n    dayText: 'يوم',\n    listText: 'أجندة',\n    allDayText: 'اليوم كله',\n    moreLinkText: 'أخرى',\n    noEventsText: 'أي أحداث لعرض',\n};\n\nexport { l6 as l };\n","var l7 = {\n    code: 'ar',\n    week: {\n        dow: 6, // Saturday is the first day of the week.\n        doy: 12, // The week that contains Jan 1st is the first week of the year.\n    },\n    direction: 'rtl',\n    prevText: 'السابق',\n    nextText: 'التالي',\n    todayText: 'اليوم',\n    yearText: 'سنة',\n    monthText: 'شهر',\n    weekTextLong: 'أسبوع',\n    dayText: 'يوم',\n    listText: 'أجندة',\n    allDayText: 'اليوم كله',\n    moreLinkText: 'أخرى',\n    noEventsText: 'أي أحداث لعرض',\n};\n\nexport { l7 as l };\n","var l13 = {\n    code: 'ca',\n    week: {\n        dow: 1, // Monday is the first day of the week.\n        doy: 4, // The week that contains Jan 4th is the first week of the year.\n    },\n    prevText: 'Anterior',\n    nextText: 'Següent',\n    todayText: 'Avui',\n    yearText: 'Any',\n    monthText: 'Mes',\n    weekTextLong: 'Setmana',\n    weekTextShort: 'Set',\n    dayText: 'Dia',\n    listText: 'Agenda',\n    allDayText: 'Tot\\nel dia',\n    moreLinkText: 'més',\n    noEventsText: 'No hi ha esdeveniments per mostrar',\n};\n\nexport { l13 as l };\n","var l15 = {\n    code: 'cy',\n    week: {\n        dow: 1, // Monday is the first day of the week.\n        doy: 4, // The week that contains Jan 4th is the first week of the year.\n    },\n    prevText: 'Blaenorol',\n    nextText: 'Nesaf',\n    todayText: 'Heddiw',\n    yearText: 'Blwyddyn',\n    monthText: 'Mis',\n    weekTextLong: 'Wythnos',\n    dayText: 'Dydd',\n    listText: 'Rhestr',\n    allDayText: 'Trwy\\'r\\ndydd',\n    moreLinkText: 'Mwy',\n    noEventsText: 'Dim digwyddiadau',\n};\n\nexport { l15 as l };\n","var l16 = {\n    code: 'da',\n    week: {\n        dow: 1, // Monday is the first day of the week.\n        doy: 4, // The week that contains Jan 4th is the first week of the year.\n    },\n    prevText: 'Forrige',\n    nextText: 'Næste',\n    todayText: 'I dag',\n    yearText: 'År',\n    monthText: 'Måned',\n    weekTextLong: 'Uge',\n    dayText: 'Dag',\n    listText: 'Agenda',\n    allDayText: 'Hele\\ndagen',\n    moreLinkText: 'flere',\n    noEventsText: 'Ingen arrangementer at vise',\n};\n\nexport { l16 as l };\n","var l19 = {\n    code: 'el',\n    week: {\n        dow: 1, // Monday is the first day of the week.\n        doy: 4, // The week that contains Jan 4st is the first week of the year.\n    },\n    prevText: 'Προηγούμενος',\n    nextText: 'Επόμενος',\n    todayText: 'Σήμερα',\n    yearText: 'Ετος',\n    monthText: 'Μήνας',\n    weekTextLong: 'Εβδομάδα',\n    weekTextShort: 'Εβδ',\n    dayText: 'Ημέρα',\n    listText: 'Ατζέντα',\n    allDayText: 'Ολοήμερο',\n    moreLinkText: 'περισσότερα',\n    noEventsText: 'Δεν υπάρχουν γεγονότα προς εμφάνιση',\n};\n\nexport { l19 as l };\n","var l20 = {\n    code: 'en-au',\n    week: {\n        dow: 1, // Monday is the first day of the week.\n        doy: 4, // The week that contains Jan 4th is the first week of the year.\n    },\n    weekTextShort: 'W',\n    todayHint: 'This $0',\n    prevHint: 'Previous $0',\n    nextHint: 'Next $0',\n    viewHint: '$0 view',\n    navLinkHint: 'Go to $0',\n    moreLinkHint(eventCnt) {\n        return `Show ${eventCnt} more event${eventCnt === 1 ? '' : 's'}`;\n    },\n};\n\nexport { l20 as l };\n","var l21 = {\n    code: 'en-gb',\n    week: {\n        dow: 1, // Monday is the first day of the week.\n        doy: 4, // The week that contains Jan 4th is the first week of the year.\n    },\n    weekTextShort: 'W',\n    todayHint: 'This $0',\n    prevHint: 'Previous $0',\n    nextHint: 'Next $0',\n    viewHint: '$0 view',\n    navLinkHint: 'Go to $0',\n    moreLinkHint(eventCnt) {\n        return `Show ${eventCnt} more event${eventCnt === 1 ? '' : 's'}`;\n    },\n};\n\nexport { l21 as l };\n","var l22 = {\n    code: 'en-nz',\n    week: {\n        dow: 1, // Monday is the first day of the week.\n        doy: 4, // The week that contains Jan 4th is the first week of the year.\n    },\n    weekTextShort: 'W',\n    todayHint: 'This $0',\n    prevHint: 'Previous $0',\n    nextHint: 'Next $0',\n    viewHint: '$0 view',\n    navLinkHint: 'Go to $0',\n    moreLinkHint(eventCnt) {\n        return `Show ${eventCnt} more event${eventCnt === 1 ? '' : 's'}`;\n    },\n};\n\nexport { l22 as l };\n","var l23 = {\n    code: 'eo',\n    week: {\n        dow: 1, // Monday is the first day of the week.\n        doy: 4, // The week that contains Jan 4th is the first week of the year.\n    },\n    prevText: 'Antaŭa',\n    nextText: 'Sekva',\n    todayText: 'Hodiaŭ',\n    yearText: 'Jaro',\n    monthText: 'Monato',\n    weekTextLong: 'Semajno',\n    weekTextShort: 'Sm',\n    dayText: 'Tago',\n    listText: 'Tagordo',\n    allDayText: 'Tuta\\ntago',\n    moreLinkText: 'pli',\n    noEventsText: 'Neniuj eventoj por montri',\n};\n\nexport { l23 as l };\n","var l24 = {\n    code: 'es',\n    week: {\n        dow: 0, // Sunday is the first day of the week.\n        doy: 6, // The week that contains Jan 1st is the first week of the year.\n    },\n    prevText: 'Ant',\n    nextText: 'Sig',\n    todayText: 'Hoy',\n    yearText: 'Año',\n    monthText: 'Mes',\n    weekTextLong: 'Semana',\n    weekTextShort: 'Sm',\n    dayText: 'Día',\n    listText: 'Agenda',\n    prevHint: '$0 antes',\n    nextHint: '$0 siguiente',\n    todayHint(unitText, unit) {\n        return (unit === 'day') ? 'Hoy' :\n            ((unit === 'week') ? 'Esta' : 'Este') + ' ' + unitText.toLocaleLowerCase();\n    },\n    viewHint(unitText, unit) {\n        return 'Vista ' + (unit === 'week' ? 'de la' : 'del') + ' ' + unitText.toLocaleLowerCase();\n    },\n    allDayText: 'Todo\\nel día',\n    moreLinkText: 'más',\n    noEventsText: 'No hay eventos para mostrar',\n};\n\nexport { l24 as l };\n","var l25 = {\n    code: 'es',\n    week: {\n        dow: 1, // Monday is the first day of the week.\n        doy: 4, // The week that contains Jan 4th is the first week of the year.\n    },\n    prevText: 'Ant',\n    nextText: 'Sig',\n    todayText: 'Hoy',\n    yearText: 'Año',\n    monthText: 'Mes',\n    weekTextLong: 'Semana',\n    weekTextShort: 'Sm',\n    dayText: 'Día',\n    listText: 'Agenda',\n    prevHint: '$0 antes',\n    nextHint: '$0 siguiente',\n    todayHint(unitText, unit) {\n        return (unit === 'day') ? 'Hoy' :\n            ((unit === 'week') ? 'Esta' : 'Este') + ' ' + unitText.toLocaleLowerCase();\n    },\n    viewHint(unitText, unit) {\n        return 'Vista ' + (unit === 'week' ? 'de la' : 'del') + ' ' + unitText.toLocaleLowerCase();\n    },\n    allDayText: 'Todo\\nel día',\n    moreLinkText: 'más',\n    moreLinkHint(eventCnt) {\n        return `Mostrar ${eventCnt} eventos más`;\n    },\n    noEventsText: 'No hay eventos para mostrar',\n    navLinkHint: 'Ir al $0',\n    closeHint: 'Cerrar',\n    eventsHint: 'Eventos',\n};\n\nexport { l25 as l };\n","var l27 = {\n    code: 'eu',\n    week: {\n        dow: 1, // Monday is the first day of the week.\n        doy: 7, // The week that contains Jan 1st is the first week of the year.\n    },\n    prevText: 'Aur',\n    nextText: 'Hur',\n    todayText: 'Gaur',\n    yearText: 'Urtea',\n    monthText: 'Hilabetea',\n    weekTextLong: 'Astea',\n    weekTextShort: 'As',\n    dayText: 'Eguna',\n    listText: 'Agenda',\n    allDayText: 'Egun\\nosoa',\n    moreLinkText: 'gehiago',\n    noEventsText: 'Ez dago ekitaldirik erakusteko',\n};\n\nexport { l27 as l };\n","var l29 = {\n    code: 'fi',\n    week: {\n        dow: 1, // Monday is the first day of the week.\n        doy: 4, // The week that contains Jan 4th is the first week of the year.\n    },\n    prevText: 'Edellinen',\n    nextText: 'Seuraava',\n    todayText: 'Tänään',\n    yearText: 'Vuosi',\n    monthText: 'Kuukausi',\n    weekTextLong: 'Viikko',\n    weekTextShort: 'Vk',\n    dayText: 'Päivä',\n    listText: 'Tapahtumat',\n    allDayText: 'Koko\\npäivä',\n    moreLinkText: 'lisää',\n    noEventsText: 'Ei näytettäviä tapahtumia',\n};\n\nexport { l29 as l };\n","var l30 = {\n    code: 'fr',\n    prevText: 'Précédent',\n    nextText: 'Suivant',\n    todayText: 'Aujourd\\'hui',\n    yearText: 'Année',\n    monthText: 'Mois',\n    weekTextLong: 'Semaine',\n    weekTextShort: 'Sem.',\n    dayText: 'Jour',\n    listText: 'Mon planning',\n    allDayText: 'Toute la\\njournée',\n    moreLinkText: 'en plus',\n    noEventsText: 'Aucun évènement à afficher',\n};\n\nexport { l30 as l };\n","var l31 = {\n    code: 'fr-ch',\n    week: {\n        dow: 1, // Monday is the first day of the week.\n        doy: 4, // The week that contains Jan 4th is the first week of the year.\n    },\n    prevText: 'Précédent',\n    nextText: 'Suivant',\n    todayText: 'Courant',\n    yearText: 'Année',\n    monthText: 'Mois',\n    weekTextLong: 'Semaine',\n    weekTextShort: 'Sm',\n    dayText: 'Jour',\n    listText: 'Mon planning',\n    allDayText: 'Toute la\\njournée',\n    moreLinkText: 'en plus',\n    noEventsText: 'Aucun évènement à afficher',\n};\n\nexport { l31 as l };\n","var l32 = {\n    code: 'fr',\n    week: {\n        dow: 1, // Monday is the first day of the week.\n        doy: 4, // The week that contains Jan 4th is the first week of the year.\n    },\n    prevText: 'Précédent',\n    nextText: 'Suivant',\n    todayText: 'Aujourd\\'hui',\n    yearText: 'Année',\n    monthText: 'Mois',\n    weekTextLong: 'Semaine',\n    weekTextShort: 'Sem.',\n    dayText: 'Jour',\n    listText: 'Planning',\n    allDayText: 'Toute la\\njournée',\n    moreLinkText: 'en plus',\n    noEventsText: 'Aucun évènement à afficher',\n};\n\nexport { l32 as l };\n","var l33 = {\n    code: 'gl',\n    week: {\n        dow: 1, // Monday is the first day of the week.\n        doy: 4, // The week that contains Jan 4th is the first week of the year.\n    },\n    prevText: 'Ant',\n    nextText: 'Seg',\n    todayText: 'Hoxe',\n    yearText: 'Ano',\n    monthText: 'Mes',\n    weekTextLong: 'Semana',\n    weekTextShort: 'Sm',\n    dayText: 'Día',\n    listText: 'Axenda',\n    prevHint: '$0 antes',\n    nextHint: '$0 seguinte',\n    todayHint(unitText, unit) {\n        return (unit === 'day') ? 'Hoxe' :\n            ((unit === 'week') ? 'Esta' : 'Este') + ' ' + unitText.toLocaleLowerCase();\n    },\n    viewHint(unitText, unit) {\n        return 'Vista ' + (unit === 'week' ? 'da' : 'do') + ' ' + unitText.toLocaleLowerCase();\n    },\n    allDayText: 'Todo\\no día',\n    moreLinkText: 'máis',\n    moreLinkHint(eventCnt) {\n        return `Amosar ${eventCnt} eventos máis`;\n    },\n    noEventsText: 'Non hai eventos para amosar',\n    navLinkHint: 'Ir ao $0',\n    closeHint: 'Pechar',\n    eventsHint: 'Eventos',\n};\n\nexport { l33 as l };\n","var l34 = {\n    code: 'he',\n    direction: 'rtl',\n    prevText: 'הקודם',\n    nextText: 'הבא',\n    todayText: 'היום',\n    yearText: 'שנה',\n    monthText: 'חודש',\n    weekTextLong: 'שבוע',\n    dayText: 'יום',\n    listText: 'סדר יום',\n    allDayText: 'כל היום',\n    moreLinkText: 'נוספים',\n    noEventsText: 'אין אירועים להצגה',\n};\n\nexport { l34 as l };\n","var l37 = {\n    code: 'hu',\n    week: {\n        dow: 1, // Monday is the first day of the week.\n        doy: 4, // The week that contains Jan 4th is the first week of the year.\n    },\n    prevText: 'Vissza',\n    nextText: 'Előre',\n    todayText: 'Ma',\n    yearText: 'Év',\n    monthText: 'Hónap',\n    weekTextLong: 'Hét',\n    dayText: 'Nap',\n    listText: 'Lista',\n    allDayText: 'Egész\\nnap',\n    moreLinkText: 'további',\n    noEventsText: 'Nincs megjeleníthető esemény',\n};\n\nexport { l37 as l };\n","var l39 = {\n    code: 'id',\n    week: {\n        dow: 1, // Monday is the first day of the week.\n        doy: 7, // The week that contains Jan 1st is the first week of the year.\n    },\n    prevText: 'mundur',\n    nextText: 'maju',\n    todayText: 'hari ini',\n    yearText: 'Tahun',\n    monthText: 'Bulan',\n    weekTextLong: 'Minggu',\n    weekTextShort: 'Mg',\n    dayText: 'Hari',\n    listText: 'Agenda',\n    allDayText: 'Sehari\\npenuh',\n    moreLinkText: 'lebih',\n    noEventsText: 'Tidak ada acara untuk ditampilkan',\n};\n\nexport { l39 as l };\n","var l40 = {\n    code: 'is',\n    week: {\n        dow: 1, // Monday is the first day of the week.\n        doy: 4, // The week that contains Jan 4th is the first week of the year.\n    },\n    prevText: 'Fyrri',\n    nextText: 'Næsti',\n    todayText: 'Í dag',\n    yearText: 'Ár',\n    monthText: 'Mánuður',\n    weekTextLong: 'Vika',\n    dayText: 'Dagur',\n    listText: 'Dagskrá',\n    allDayText: 'Allan\\ndaginn',\n    moreLinkText: 'meira',\n    noEventsText: 'Engir viðburðir til að sýna',\n};\n\nexport { l40 as l };\n","var l45 = {\n    code: 'km',\n    week: {\n        dow: 1, // Monday is the first day of the week.\n        doy: 4, // The week that contains Jan 4th is the first week of the year.\n    },\n    prevText: 'មុន',\n    nextText: 'បន្ទាប់',\n    todayText: 'ថ្ងៃនេះ',\n    yearText: 'ឆ្នាំ',\n    monthText: 'ខែ',\n    weekTextLong: 'សប្តាហ៍',\n    dayText: 'ថ្ងៃ',\n    listText: 'បញ្ជី',\n    allDayText: 'ពេញមួយថ្ងៃ',\n    moreLinkText: 'ច្រើនទៀត',\n    noEventsText: 'គ្មានព្រឹត្តិការណ៍ត្រូវបង្ហាញ',\n};\n\nexport { l45 as l };\n","var l47 = {\n    code: 'ku',\n    week: {\n        dow: 6, // Saturday is the first day of the week.\n        doy: 12, // The week that contains Jan 1st is the first week of the year.\n    },\n    direction: 'rtl',\n    prevText: 'پێشتر',\n    nextText: 'دواتر',\n    todayText: 'ئەمڕو',\n    yearText: 'ساڵ',\n    monthText: 'مانگ',\n    weekTextLong: 'هەفتە',\n    dayText: 'ڕۆژ',\n    listText: 'بەرنامە',\n    allDayText: 'هەموو ڕۆژەکە',\n    moreLinkText: 'زیاتر',\n    noEventsText: 'هیچ ڕووداوێك نیە',\n};\n\nexport { l47 as l };\n","var l48 = {\n    code: 'lb',\n    week: {\n        dow: 1, // Monday is the first day of the week.\n        doy: 4, // The week that contains Jan 4th is the first week of the year.\n    },\n    prevText: 'Zréck',\n    nextText: 'Weider',\n    todayText: 'Haut',\n    yearText: 'Joer',\n    monthText: 'Mount',\n    weekTextLong: 'Woch',\n    weekTextShort: 'W',\n    dayText: 'Dag',\n    listText: 'Terminiwwersiicht',\n    allDayText: 'Ganzen\\nDag',\n    moreLinkText: 'méi',\n    noEventsText: 'Nee Evenementer ze affichéieren',\n};\n\nexport { l48 as l };\n","var l49 = {\n    code: 'lt',\n    week: {\n        dow: 1, // Monday is the first day of the week.\n        doy: 4, // The week that contains Jan 4th is the first week of the year.\n    },\n    prevText: 'Atgal',\n    nextText: 'Pirmyn',\n    todayText: 'Šiandien',\n    yearText: 'Metai',\n    monthText: 'Mėnuo',\n    weekTextLong: 'Savaitė',\n    weekTextShort: 'SAV',\n    dayText: 'Diena',\n    listText: 'Darbotvarkė',\n    allDayText: 'Visą\\ndieną',\n    moreLinkText: 'daugiau',\n    noEventsText: 'Nėra įvykių rodyti',\n};\n\nexport { l49 as l };\n","var l53 = {\n    code: 'nb',\n    week: {\n        dow: 1, // Monday is the first day of the week.\n        doy: 4, // The week that contains Jan 4th is the first week of the year.\n    },\n    prevText: 'Forrige',\n    nextText: 'Neste',\n    todayText: 'I dag',\n    yearText: 'År',\n    monthText: 'Måned',\n    weekTextLong: 'Uke',\n    dayText: 'Dag',\n    listText: 'Agenda',\n    allDayText: 'Hele\\ndagen',\n    moreLinkText: 'til',\n    noEventsText: 'Ingen hendelser å vise',\n    prevHint: 'Forrige $0',\n    nextHint: 'Neste $0',\n    todayHint: 'Nåværende $0',\n    viewHint: '$0 visning',\n    navLinkHint: 'Gå til $0',\n    moreLinkHint(eventCnt) {\n        return `Vis ${eventCnt} flere hendelse${eventCnt === 1 ? '' : 'r'}`;\n    },\n};\n\nexport { l53 as l };\n","var l54 = {\n    code: 'ne', // code for nepal\n    week: {\n        dow: 7, // Sunday is the first day of the week.\n        doy: 1, // The week that contains Jan 1st is the first week of the year.\n    },\n    prevText: 'अघिल्लो',\n    nextText: 'अर्को',\n    todayText: 'आज',\n    yearText: 'वर्ष',\n    monthText: 'महिना',\n    weekTextLong: 'हप्ता',\n    dayText: 'दिन',\n    listText: 'सूची',\n    allDayText: 'दिनभरि',\n    moreLinkText: 'थप लिंक',\n    noEventsText: 'देखाउनको लागि कुनै घटनाहरू छैनन्',\n};\n\nexport { l54 as l };\n","var l55 = {\n    code: 'nl',\n    week: {\n        dow: 1, // Monday is the first day of the week.\n        doy: 4, // The week that contains Jan 4th is the first week of the year.\n    },\n    prevText: 'Vorige',\n    nextText: 'Volgende',\n    todayText: 'Vandaag',\n    yearText: 'Jaar',\n    monthText: 'Maand',\n    weekTextLong: 'Week',\n    dayText: 'Dag',\n    listText: 'Lijst',\n    allDayText: 'Hele dag',\n    moreLinkText: 'extra',\n    noEventsText: 'Geen evenementen om te laten zien',\n};\n\nexport { l55 as l };\n","var l57 = {\n    code: 'pl',\n    week: {\n        dow: 1, // Monday is the first day of the week.\n        doy: 4, // The week that contains Jan 4th is the first week of the year.\n    },\n    prevText: 'Poprzedni',\n    nextText: 'Następny',\n    todayText: 'Dziś',\n    yearText: 'Rok',\n    monthText: 'Miesiąc',\n    weekTextLong: 'Tydzień',\n    weekTextShort: 'Tydz',\n    dayText: 'Dzień',\n    listText: 'Plan dnia',\n    allDayText: 'Cały\\ndzień',\n    moreLinkText: 'więcej',\n    noEventsText: 'Brak wydarzeń do wyświetlenia',\n};\n\nexport { l57 as l };\n","var l59 = {\n    code: 'pt',\n    week: {\n        dow: 1, // Monday is the first day of the week.\n        doy: 4, // The week that contains Jan 4th is the first week of the year.\n    },\n    prevText: 'Anterior',\n    nextText: 'Seguinte',\n    todayText: 'Hoje',\n    yearText: 'Ano',\n    monthText: 'Mês',\n    weekTextLong: 'Semana',\n    weekTextShort: 'Sem',\n    dayText: 'Dia',\n    listText: 'Agenda',\n    allDayText: 'Todo\\no dia',\n    moreLinkText: 'mais',\n    noEventsText: 'Não há eventos para mostrar',\n};\n\nexport { l59 as l };\n","var l62 = {\n    code: 'si-lk',\n    week: {\n        dow: 1, // Monday is the first day of the week.\n        doy: 4, // The week that contains Jan 4th is the first week of the year.\n    },\n    prevText: 'පෙර',\n    nextText: 'පසු',\n    todayText: 'අද',\n    yearText: 'අවුරුදු',\n    monthText: 'මාසය',\n    weekTextLong: 'සතිය',\n    weekTextShort: 'සති',\n    dayText: 'දවස',\n    listText: 'ලැයිස්තුව',\n    allDayText: 'සියලු',\n    moreLinkText: 'තවත්',\n    noEventsText: 'මුකුත් නැත',\n};\n\nexport { l62 as l };\n","var l64 = {\n    code: 'sl',\n    week: {\n        dow: 1, // Monday is the first day of the week.\n        doy: 7, // The week that contains Jan 1st is the first week of the year.\n    },\n    prevText: 'Prejšnji',\n    nextText: 'Naslednji',\n    todayText: 'Trenutni',\n    yearText: 'Leto',\n    monthText: 'Mesec',\n    weekTextLong: 'Teden',\n    dayText: 'Dan',\n    listText: 'Dnevni red',\n    allDayText: 'Ves dan',\n    moreLinkText: 'več',\n    noEventsText: 'Ni dogodkov za prikaz',\n};\n\nexport { l64 as l };\n","var l65 = {\n    code: 'sm',\n    prevText: 'Talu ai',\n    nextText: 'Mulimuli atu',\n    todayText: 'Aso nei',\n    yearText: 'Tausaga',\n    monthText: 'Masina',\n    weekTextLong: 'Vaiaso',\n    dayText: 'Aso',\n    listText: 'Faasologa',\n    allDayText: 'Aso atoa',\n    moreLinkText: 'sili atu',\n    noEventsText: 'Leai ni mea na tutupu',\n};\n\nexport { l65 as l };\n","var l69 = {\n    code: 'sv',\n    week: {\n        dow: 1, // Monday is the first day of the week.\n        doy: 4, // The week that contains Jan 4th is the first week of the year.\n    },\n    prevText: 'Förra',\n    nextText: 'Nästa',\n    todayText: 'Idag',\n    yearText: 'År',\n    monthText: 'Månad',\n    weekTextLong: 'Vecka',\n    weekTextShort: 'v.',\n    dayText: 'Dag',\n    listText: 'Program',\n    prevHint(unitText) {\n        return `Föregående ${unitText.toLocaleLowerCase()}`;\n    },\n    nextHint(unitText) {\n        return `Nästa ${unitText.toLocaleLowerCase()}`;\n    },\n    todayHint(unitText, unit) {\n        return (unit === 'year' ? 'I' : 'Denna') + ' ' + unitText.toLocaleLowerCase();\n    },\n    viewHint: '$0 vy',\n    navLinkHint: 'Gå till $0',\n    moreLinkHint(eventCnt) {\n        return `Visa ytterligare ${eventCnt} händelse${eventCnt === 1 ? '' : 'r'}`;\n    },\n    allDayText: 'Heldag',\n    moreLinkText: 'till',\n    noEventsText: 'Inga händelser att visa',\n    closeHint: 'Stäng',\n    eventsHint: 'Händelser',\n};\n\nexport { l69 as l };\n","var l72 = {\n    code: 'th',\n    week: {\n        dow: 1, // Monday is the first day of the week.\n        doy: 4, // The week that contains Jan 4th is the first week of the year.\n    },\n    prevText: 'ก่อนหน้า',\n    nextText: 'ถัดไป',\n    prevYearText: 'ปีก่อนหน้า',\n    nextYearText: 'ปีถัดไป',\n    yearText: 'ปี',\n    todayText: 'วันนี้',\n    monthText: 'เดือน',\n    weekTextLong: 'สัปดาห์',\n    dayText: 'วัน',\n    listText: 'กำหนดการ',\n    allDayText: 'ตลอดวัน',\n    moreLinkText: 'เพิ่มเติม',\n    noEventsText: 'ไม่มีกิจกรรมที่จะแสดง',\n};\n\nexport { l72 as l };\n","var l73 = {\n    code: 'tr',\n    week: {\n        dow: 1, // Monday is the first day of the week.\n        doy: 7, // The week that contains Jan 1st is the first week of the year.\n    },\n    prevText: 'geri',\n    nextText: 'ileri',\n    todayText: 'bugün',\n    yearText: 'Yıl',\n    monthText: 'Ay',\n    weekTextLong: 'Hafta',\n    weekTextShort: 'Hf',\n    dayText: 'Gün',\n    listText: 'Ajanda',\n    allDayText: 'Tüm gün',\n    moreLinkText: 'daha fazla',\n    noEventsText: 'Gösterilecek etkinlik yok',\n};\n\nexport { l73 as l };\n","var l74 = {\n    code: 'ug',\n    prevText: 'ئالدىنقى',\n    nextText: 'كېيىنكى',\n    todayText: 'بۈگۈن',\n    yearText: 'يىل',\n    monthText: 'ئاي',\n    weekTextLong: 'ھەپتە',\n    dayText: 'كۈن',\n    listText: 'كۈنتەرتىپ',\n    allDayText: 'پۈتۈن كۈن',\n};\n\nexport { l74 as l };\n","var l80 = {\n    code: 'zh-tw',\n    prevText: '上個',\n    nextText: '下個',\n    todayText: '今天',\n    yearText: '年',\n    monthText: '月',\n    weekTextLong: '週',\n    dayText: '天',\n    listText: '活動列表',\n    allDayText: '整天',\n    moreLinkText: '顯示更多',\n    noEventsText: '沒有任何活動',\n};\n\nexport { l80 as l };\n","import { jsx, jsxs } from 'preact/jsx-runtime';\nimport { j as joinClassNames } from '../../chunks/d74440d5.js';\n\n// usually 11px font / 12px line-height\nconst xxsTextClass = \"fc-classic-vQz\";\n// outline\nconst outlineWidthClass = \"fc-classic-0Bj\";\nconst outlineWidthFocusClass = \"fc-classic-uqo\";\nconst outlineOffsetClass = \"fc-classic-3Xj\";\nconst outlineInsetClass = \"fc-classic-fFh\";\nconst primaryOutlineColorClass = \"fc-classic-zIi\";\n// neutral buttons\nconst strongSolidPressableClass = \"fc-classic-BaR\";\nconst mutedHoverClass = \"fc-classic-4yP\";\nconst mutedHoverPressableClass = `${mutedHoverClass} fc-classic-tCP fc-classic-8gz`;\nconst faintHoverClass = \"fc-classic-Ubk\";\nconst faintHoverPressableClass = `${faintHoverClass} fc-classic-OIx fc-classic-28F`;\nconst buttonIconClass = \"fc-classic-XUJ\";\n// transparent resizer for mouse\nconst blockPointerResizerClass = \"fc-classic-1EY fc-classic-pps fc-classic-vs6\";\nconst rowPointerResizerClass = `${blockPointerResizerClass} fc-classic-AWB fc-classic-hza`;\nconst columnPointerResizerClass = `${blockPointerResizerClass} fc-classic-MaV fc-classic-uuA`;\n// circle resizer for touch\nconst blockTouchResizerClass = \"fc-classic-1EY fc-classic-3wQ fc-classic-wsy fc-classic-lNM fc-classic-Jk3 fc-classic-AAA\";\nconst rowTouchResizerClass = `${blockTouchResizerClass} fc-classic-ERR fc-classic-Dq8`;\nconst columnTouchResizerClass = `${blockTouchResizerClass} fc-classic-1V6 fc-classic-F99`;\nconst getDayClass = (info) => joinClassNames(\"fc-classic-wsy\", info.isMajor ? \"fc-classic-C0k\" : \"fc-classic-C1x\", info.isDisabled ? \"fc-classic-iYS\" :\n    info.isToday && \"fc-classic-hbn\");\nconst getSlotClass = (info) => joinClassNames(\"fc-classic-wsy fc-classic-C1x\", info.isMinor && \"fc-classic-TN2\");\nconst dayRowCommonClasses = {\n    /* Day Row > List-Item Event\n    ----------------------------------------------------------------------------------------------- */\n    listItemEventClass: (info) => joinClassNames(\"fc-classic-Ika fc-classic-7A6 fc-classic-Fvv\", info.isNarrow ? \"fc-classic-148\" : \"fc-classic-cKZ\", info.isSelected\n        ? joinClassNames(\"fc-classic-k3f\", info.isDragging && \"fc-classic-qNs\")\n        : (info.isInteractive ? mutedHoverPressableClass : mutedHoverClass)),\n    listItemEventBeforeClass: (info) => joinClassNames(\"fc-classic-Mjo\", info.isNarrow ? \"fc-classic-148\" : \"fc-classic-rVY\"),\n    listItemEventInnerClass: (info) => joinClassNames(\"fc-classic-dl1 fc-classic-1sP fc-classic-XpK fc-classic-z5u fc-classic-aTF\", info.isNarrow ? xxsTextClass : \"fc-classic-a3B\"),\n    listItemEventTimeClass: \"fc-classic-F1o fc-classic-TZ4 fc-classic-pKG fc-classic-1Zl\",\n    listItemEventTitleClass: \"fc-classic-F1o fc-classic-DIS fc-classic-TZ4 fc-classic-pKG fc-classic-OLq\",\n    /* Day Row > Row Event\n    ----------------------------------------------------------------------------------------------- */\n    rowEventClass: (info) => joinClassNames(info.isStart && joinClassNames(\"fc-classic-kmj\", info.isNarrow ? \"fc-classic-qvL\" : \"fc-classic-Jzj\"), info.isEnd && joinClassNames(\"fc-classic-Skl\", info.isNarrow ? \"fc-classic-9hC\" : \"fc-classic-3e1\")),\n    rowEventInnerClass: \"fc-classic-z5u fc-classic-aTF\",\n    rowEventTimeClass: \"fc-classic-F1o\",\n    rowEventTitleClass: \"fc-classic-F1o\",\n    /* Day Row > More-Link\n    ----------------------------------------------------------------------------------------------- */\n    rowMoreLinkClass: (info) => joinClassNames(\"fc-classic-Ika fc-classic-wsy fc-classic-Fvv\", info.isNarrow\n        ? \"fc-classic-148 fc-classic-0Pr\"\n        : \"fc-classic-sI7 fc-classic-cKZ fc-classic-d0j\", mutedHoverPressableClass),\n    rowMoreLinkInnerClass: (info) => joinClassNames(\"fc-classic-7A6\", info.isNarrow ? xxsTextClass : \"fc-classic-a3B\"),\n};\nconst expanderIconClass = \"fc-classic-vnf fc-classic-mAY\";\nconst continuationArrowClass = \"fc-classic-rVY fc-classic-XM3 fc-classic-rif fc-classic-lMo\";\nvar index = {\n    name: \"theme-classic\",\n    optionDefaults: {\n        className: \"fc-classic-yth fc-classic-n5m\",\n        viewClass: (info) => {\n            const hasBorderTop = info.options.headerToolbar || !info.borderlessTop;\n            const hasBorderBottom = info.options.footerToolbar || !info.borderlessBottom;\n            const hasBorderX = !info.borderlessX;\n            return joinClassNames(\"fc-classic-Jk3 fc-classic-GAX fc-classic-C1x\", hasBorderTop && \"fc-classic-ku3\", hasBorderBottom && \"fc-classic-zi1\", hasBorderX && \"fc-classic-1Wx\");\n        },\n        /* Toolbar\n        --------------------------------------------------------------------------------------------- */\n        toolbarClass: (info) => joinClassNames(\"fc-classic-dl1 fc-classic-1sP fc-classic-dNl fc-classic-XpK fc-classic-N2M fc-classic-wwb\", info.borderlessX && \"fc-classic-Apf\"),\n        toolbarSectionClass: \"fc-classic-yi0 fc-classic-dl1 fc-classic-1sP fc-classic-XpK fc-classic-wwb\",\n        toolbarTitleClass: \"fc-classic-AVD fc-classic-DIS\",\n        buttonGroupClass: \"fc-classic-dl1 fc-classic-1sP fc-classic-XpK\",\n        buttonClass: (info) => joinClassNames(\"fc-classic-dl6 fc-classic-1Wx fc-classic-dl1 fc-classic-1sP fc-classic-XpK fc-classic-sOR fc-classic-lYz fc-classic-vwH fc-classic-9yp fc-classic-RnT fc-classic-cfp fc-classic-Z9U\", info.isIconOnly ? \"fc-classic-Eaq\" : \"fc-classic-Apf\", info.buttonGroup\n            ? \"fc-classic-uk6 fc-classic-Tuc\"\n            : \"fc-classic-Ig4\", info.isSelected\n            ? \"fc-classic-rQI fc-classic-Adi\"\n            : \"fc-classic-vXO fc-classic-bqK fc-classic-aIH fc-classic-nQ5 fc-classic-JWq fc-classic-9Rj fc-classic-5ky\", info.isDisabled && \"fc-classic-Q3Z fc-classic-3Lc\"),\n        buttons: {\n            prev: {\n                iconContent: () => chevronLeft(`${buttonIconClass} fc-classic-asP`),\n            },\n            next: {\n                iconContent: () => chevronLeft(`${buttonIconClass} fc-classic-jmT fc-classic-jY6`),\n            },\n            prevYear: {\n                iconContent: () => chevronsLeft(`${buttonIconClass} fc-classic-asP`),\n            },\n            nextYear: {\n                iconContent: () => chevronsLeft(`${buttonIconClass} fc-classic-jmT fc-classic-jY6`),\n            },\n        },\n        /* Abstract Event\n        --------------------------------------------------------------------------------------------- */\n        eventColor: \"var(--fc-classic-event)\",\n        eventContrastColor: \"var(--fc-classic-event-contrast)\",\n        eventClass: (info) => joinClassNames(info.isDragging && \"fc-classic-n5m\", info.event.url && \"fc-classic-JiE\", info.isSelected\n            ? joinClassNames(outlineWidthClass, info.isDragging ? \"fc-classic-1kP\" : \"fc-classic-tkw\")\n            : outlineWidthFocusClass, primaryOutlineColorClass),\n        /* Background Event\n        --------------------------------------------------------------------------------------------- */\n        backgroundEventColor: \"var(--fc-classic-background-event)\",\n        backgroundEventClass: \"fc-classic-hsC fc-classic-jsy fc-classic-DO7\",\n        backgroundEventTitleClass: (info) => joinClassNames(\"fc-classic-MGT fc-classic-L1Y\", info.isNarrow\n            ? `fc-classic-KUX ${xxsTextClass}`\n            : \"fc-classic-XJa fc-classic-a3B\"),\n        /* List-Item Event\n        --------------------------------------------------------------------------------------------- */\n        listItemEventClass: \"fc-classic-XpK\",\n        listItemEventBeforeClass: \"fc-classic-lNM fc-classic-AAA\",\n        listItemEventInnerClass: \"fc-classic-GAX\",\n        /* Block Event\n        --------------------------------------------------------------------------------------------- */\n        blockEventClass: (info) => joinClassNames(\"fc-classic-bCs fc-classic-eYX fc-classic-d0j fc-classic-DO7 fc-classic-YjJ fc-classic-vwH\", (info.isDragging && !info.isSelected) && \"fc-classic-iTG\", outlineOffsetClass),\n        blockEventInnerClass: \"fc-classic-i9F fc-classic-cfp\",\n        blockEventTimeClass: \"fc-classic-TZ4 fc-classic-pKG fc-classic-1Zl\",\n        blockEventTitleClass: \"fc-classic-TZ4 fc-classic-pKG fc-classic-OLq\",\n        /* Row Event\n        --------------------------------------------------------------------------------------------- */\n        rowEventClass: (info) => joinClassNames(\"fc-classic-Ika fc-classic-JIC\", info.isStart && \"fc-classic-3J4\", info.isEnd && \"fc-classic-USt\"),\n        rowEventBeforeClass: (info) => joinClassNames(info.isStartResizable && joinClassNames(info.isSelected ? rowTouchResizerClass : rowPointerResizerClass, \"fc-classic-11a\")),\n        rowEventAfterClass: (info) => joinClassNames(info.isEndResizable && joinClassNames(info.isSelected ? rowTouchResizerClass : rowPointerResizerClass, \"fc-classic-bEw\")),\n        rowEventInnerClass: (info) => joinClassNames(\"fc-classic-dl1 fc-classic-1sP fc-classic-XpK\", info.isNarrow ? xxsTextClass : \"fc-classic-a3B\"),\n        rowEventTimeClass: \"fc-classic-DIS\",\n        /* Column Event\n        --------------------------------------------------------------------------------------------- */\n        columnEventClass: (info) => joinClassNames(\"fc-classic-1Wx fc-classic-A3h fc-classic-yKG\", info.isStart && \"fc-classic-ku3 fc-classic-Z7Q\", info.isEnd && \"fc-classic-Ika fc-classic-zi1 fc-classic-2qh\"),\n        columnEventBeforeClass: (info) => joinClassNames(info.isStartResizable && joinClassNames(info.isSelected ? columnTouchResizerClass : columnPointerResizerClass, \"fc-classic-YDC\")),\n        columnEventAfterClass: (info) => joinClassNames(info.isEndResizable && joinClassNames(info.isSelected ? columnTouchResizerClass : columnPointerResizerClass, \"fc-classic-fJL\")),\n        columnEventInnerClass: (info) => joinClassNames(\"fc-classic-dl1\", info.isShort\n            ? \"fc-classic-KUX fc-classic-1sP fc-classic-XpK fc-classic-NWN\"\n            : \"fc-classic-oQ2 fc-classic-sgX\"),\n        columnEventTimeClass: (info) => joinClassNames(!info.isShort && \"fc-classic-166\", xxsTextClass),\n        columnEventTitleClass: (info) => joinClassNames(!info.isShort && \"fc-classic-2rx\", (info.isShort || info.isNarrow) ? xxsTextClass : \"fc-classic-a3B\"),\n        /* More-Link\n        --------------------------------------------------------------------------------------------- */\n        moreLinkClass: `${outlineWidthFocusClass} ${primaryOutlineColorClass}`,\n        moreLinkInnerClass: \"fc-classic-TZ4 fc-classic-pKG\",\n        columnMoreLinkClass: `fc-classic-Ika fc-classic-Fvv fc-classic-wsy fc-classic-d0j fc-classic-4MR ${strongSolidPressableClass} fc-classic-vwH fc-classic-A3h fc-classic-yKG ${outlineOffsetClass}`,\n        columnMoreLinkInnerClass: (info) => joinClassNames(\"fc-classic-KUX\", info.isNarrow ? xxsTextClass : \"fc-classic-a3B\"),\n        /* Day Header\n        --------------------------------------------------------------------------------------------- */\n        dayHeaderAlign: (info) => info.inPopover ? \"start\" : \"center\",\n        dayHeaderClass: (info) => joinClassNames(\"fc-classic-E9P\", info.isDisabled && \"fc-classic-iYS\", info.inPopover\n            ? \"fc-classic-zi1 fc-classic-C1x fc-classic-k3f\"\n            : joinClassNames(\"fc-classic-wsy\", info.isMajor ? \"fc-classic-C0k\" : \"fc-classic-C1x\")),\n        dayHeaderInnerClass: (info) => joinClassNames(\"fc-classic-rVY fc-classic-cJ3 fc-classic-dl1 fc-classic-sgX\", info.isNarrow ? xxsTextClass : \"fc-classic-9yp\"),\n        dayHeaderDividerClass: \"fc-classic-zi1 fc-classic-C1x\",\n        /* Day Cell\n        --------------------------------------------------------------------------------------------- */\n        dayCellClass: getDayClass,\n        dayCellTopClass: (info) => joinClassNames(info.isNarrow ? \"fc-classic-toR\" : \"fc-classic-84e\", \"fc-classic-dl1 fc-classic-1sP fc-classic-LMv\"),\n        dayCellTopInnerClass: (info) => joinClassNames(\"fc-classic-rVY fc-classic-TZ4\", info.isNarrow\n            ? `fc-classic-cJ3 ${xxsTextClass}`\n            : \"fc-classic-V9v fc-classic-9yp\", info.isOther && \"fc-classic-taq\", info.monthText && \"fc-classic-DIS\"),\n        dayCellInnerClass: (info) => joinClassNames(info.inPopover && \"fc-classic-3N5\"),\n        /* Popover\n        --------------------------------------------------------------------------------------------- */\n        popoverClass: \"fc-classic-Jk3 fc-classic-GAX fc-classic-wsy fc-classic-C1x fc-classic-tkw fc-classic-aNc fc-classic-n5m\",\n        popoverCloseClass: `fc-classic-bCs fc-classic-1EY fc-classic-2ik fc-classic-2w8 ${outlineWidthFocusClass} ${primaryOutlineColorClass} fc-classic-Z9U`,\n        popoverCloseContent: () => x(\"fc-classic-XUJ fc-classic-9yp fc-classic-mAY\"),\n        /* Lane\n        --------------------------------------------------------------------------------------------- */\n        dayLaneClass: getDayClass,\n        dayLaneInnerClass: (info) => (info.isStack\n            ? \"fc-classic-gMS\"\n            : info.isNarrow ? \"fc-classic-148\" : \"fc-classic-Jzj fc-classic-B3G\"),\n        slotLaneClass: getSlotClass,\n        /* List Day\n        --------------------------------------------------------------------------------------------- */\n        listDayHeaderClass: \"fc-classic-zi1 fc-classic-C1x fc-classic-SDU fc-classic-nHS fc-classic-dl1 fc-classic-1sP fc-classic-XpK fc-classic-N2M\",\n        listDayHeaderInnerClass: \"fc-classic-Apf fc-classic-dl6 fc-classic-9yp fc-classic-DIS\",\n        /* Single Month (in Multi-Month)\n        --------------------------------------------------------------------------------------------- */\n        singleMonthClass: (info) => joinClassNames(info.multiMonthColumns > 1 && \"fc-classic-jD5\", (info.multiMonthColumns === 1 && !info.isLast) && \"fc-classic-zi1 fc-classic-C1x\"),\n        singleMonthHeaderClass: (info) => joinClassNames(info.multiMonthColumns > 1\n            ? \"fc-classic-cM0\"\n            : \"fc-classic-dl6 fc-classic-zi1 fc-classic-C1x fc-classic-Jk3\", \"fc-classic-XpK\"),\n        singleMonthHeaderInnerClass: \"fc-classic-1Po fc-classic-DIS\",\n        /* Misc Table\n        --------------------------------------------------------------------------------------------- */\n        tableHeaderClass: \"fc-classic-Jk3\",\n        fillerClass: \"fc-classic-wsy fc-classic-C1x fc-classic-lMo\",\n        dayHeaderRowClass: \"fc-classic-wsy fc-classic-C1x\",\n        dayRowClass: \"fc-classic-wsy fc-classic-C1x\",\n        slotHeaderRowClass: \"fc-classic-wsy fc-classic-C1x\",\n        slotHeaderClass: getSlotClass,\n        /* Misc Content\n        --------------------------------------------------------------------------------------------- */\n        navLinkClass: `fc-classic-Eu0 ${outlineWidthFocusClass} ${outlineInsetClass} ${primaryOutlineColorClass}`,\n        inlineWeekNumberClass: (info) => joinClassNames(\"fc-classic-1EY fc-classic-n9G fc-classic-rbS fc-classic-C2g fc-classic-KUX fc-classic-HXA fc-classic-m9h fc-classic-k3f\", info.isNarrow ? xxsTextClass : \"fc-classic-9yp\"),\n        nonBusinessHoursClass: \"fc-classic-iYS\",\n        highlightClass: \"fc-classic-hLU\",\n        /* Resource Day Header\n        --------------------------------------------------------------------------------------------- */\n        resourceDayHeaderAlign: \"center\",\n        resourceDayHeaderClass: (info) => joinClassNames(\"fc-classic-wsy\", info.isMajor ? \"fc-classic-C0k\" : \"fc-classic-C1x\"),\n        resourceDayHeaderInnerClass: (info) => joinClassNames(\"fc-classic-rVY fc-classic-cJ3 fc-classic-dl1 fc-classic-sgX\", info.isNarrow ? xxsTextClass : \"fc-classic-9yp\"),\n        /* Resource Data Grid\n        --------------------------------------------------------------------------------------------- */\n        resourceColumnHeaderClass: \"fc-classic-wsy fc-classic-C1x fc-classic-E9P\",\n        resourceColumnHeaderInnerClass: \"fc-classic-bvX fc-classic-9yp\",\n        resourceColumnResizerClass: \"fc-classic-1EY fc-classic-AWB fc-classic-4Tv fc-classic-dnf\",\n        resourceGroupHeaderClass: \"fc-classic-wsy fc-classic-C1x fc-classic-k3f\",\n        resourceGroupHeaderInnerClass: \"fc-classic-bvX fc-classic-9yp\",\n        resourceCellClass: \"fc-classic-wsy fc-classic-C1x\",\n        resourceCellInnerClass: \"fc-classic-bvX fc-classic-9yp\",\n        resourceIndentClass: \"fc-classic-Mde fc-classic-kp0 fc-classic-E9P\",\n        resourceExpanderClass: `fc-classic-bCs ${outlineWidthFocusClass} ${primaryOutlineColorClass}`,\n        resourceExpanderContent: (info) => info.isExpanded\n            ? minusSquare(expanderIconClass)\n            : plusSquare(expanderIconClass),\n        resourceHeaderRowClass: \"fc-classic-wsy fc-classic-C1x\",\n        resourceRowClass: \"fc-classic-wsy fc-classic-C1x\",\n        resourceColumnDividerClass: \"fc-classic-1Wx fc-classic-C1x fc-classic-a7i fc-classic-k3f\",\n        /* Timeline Lane\n        --------------------------------------------------------------------------------------------- */\n        resourceGroupLaneClass: \"fc-classic-wsy fc-classic-C1x fc-classic-k3f\",\n        resourceLaneClass: \"fc-classic-wsy fc-classic-C1x\",\n        resourceLaneBottomClass: (info) => info.options.eventOverlap && \"fc-classic-zrJ\",\n        timelineBottomClass: \"fc-classic-zrJ\",\n    },\n    views: {\n        dayGrid: {\n            ...dayRowCommonClasses,\n            dayCellBottomClass: \"fc-classic-toR\",\n        },\n        multiMonth: {\n            ...dayRowCommonClasses,\n            dayCellBottomClass: \"fc-classic-toR\",\n            tableClass: (info) => joinClassNames(info.multiMonthColumns > 1 && \"fc-classic-C1x fc-classic-wsy\"),\n        },\n        timeGrid: {\n            ...dayRowCommonClasses,\n            dayCellBottomClass: \"fc-classic-mhE\",\n            /* TimeGrid > Week Number Header\n            ------------------------------------------------------------------------------------------- */\n            weekNumberHeaderClass: \"fc-classic-XpK fc-classic-LMv\",\n            weekNumberHeaderInnerClass: (info) => joinClassNames(\"fc-classic-rVY fc-classic-cJ3\", info.isNarrow ? xxsTextClass : \"fc-classic-9yp\"),\n            /* TimeGrid > All-Day Header\n            ------------------------------------------------------------------------------------------- */\n            allDayHeaderClass: \"fc-classic-XpK fc-classic-LMv\",\n            allDayHeaderInnerClass: (info) => joinClassNames(\"fc-classic-rVY fc-classic-2tF fc-classic-2HE\", info.isNarrow ? xxsTextClass : \"fc-classic-9yp\"),\n            allDayDividerClass: \"fc-classic-JIC fc-classic-C1x fc-classic-8ub fc-classic-k3f\",\n            /* TimeGrid > Slot Header\n            ------------------------------------------------------------------------------------------- */\n            slotHeaderClass: \"fc-classic-LMv\",\n            slotHeaderInnerClass: (info) => joinClassNames(\"fc-classic-rVY fc-classic-cJ3\", info.isNarrow ? xxsTextClass : \"fc-classic-9yp\"),\n            slotHeaderDividerClass: \"fc-classic-USt fc-classic-C1x\",\n            /* TimeGrid > Now-Indicator\n            ------------------------------------------------------------------------------------------- */\n            nowIndicatorHeaderClass: \"fc-classic-rbS fc-classic-a10 fc-classic-XM3 fc-classic-rif fc-classic-jIH fc-classic-0qY\",\n            nowIndicatorLineClass: \"fc-classic-ku3 fc-classic-sYT\",\n        },\n        list: {\n            /* List-View > List-Item Event\n            ------------------------------------------------------------------------------------------- */\n            listDayClass: (info) => joinClassNames(!info.isLast && \"fc-classic-zi1 fc-classic-C1x\"),\n            listItemEventClass: (info) => joinClassNames(\"fc-classic-bCs fc-classic-Apf fc-classic-dl6 fc-classic-wwb fc-classic-ku3 fc-classic-C1x\", info.isInteractive\n                ? joinClassNames(faintHoverPressableClass, outlineInsetClass)\n                : faintHoverClass),\n            listItemEventBeforeClass: \"fc-classic-GOm\",\n            listItemEventInnerClass: \"fc-classic-eF2\",\n            listItemEventTimeClass: \"fc-classic-88I fc-classic-yi0 fc-classic-roZ fc-classic-kMV fc-classic-TZ4 fc-classic-pKG fc-classic-IPx fc-classic-9yp\",\n            listItemEventTitleClass: (info) => joinClassNames(\"fc-classic-1El fc-classic-2KU fc-classic-TZ4 fc-classic-pKG fc-classic-9yp\", info.event.url && \"fc-classic-Ogp\"),\n            /* No-Events Screen\n            ------------------------------------------------------------------------------------------- */\n            noEventsClass: \"fc-classic-k3f fc-classic-dl1 fc-classic-sgX fc-classic-XpK fc-classic-E9P\",\n            noEventsInnerClass: \"fc-classic-OUe fc-classic-jGI fc-classic-P9h\",\n        },\n        timeline: {\n            /* Timeline > Row Event\n            ------------------------------------------------------------------------------------------- */\n            rowEventClass: (info) => joinClassNames(info.isEnd && \"fc-classic-9hC\", \"fc-classic-XpK\"),\n            rowEventBeforeClass: (info) => (!info.isStart && `${continuationArrowClass} fc-classic-Bda fc-classic-5JV`),\n            rowEventAfterClass: (info) => (!info.isEnd && `${continuationArrowClass} fc-classic-hhi fc-classic-LaM`),\n            rowEventInnerClass: (info) => (info.options.eventOverlap\n                ? \"fc-classic-2rx\"\n                : \"fc-classic-End\"),\n            rowEventTimeClass: \"fc-classic-oQ2\",\n            rowEventTitleClass: \"fc-classic-oQ2\",\n            /* Timeline > More-Link\n            ------------------------------------------------------------------------------------------- */\n            rowMoreLinkClass: `fc-classic-9hC fc-classic-Ika fc-classic-wsy fc-classic-d0j fc-classic-4MR ${strongSolidPressableClass} fc-classic-vwH`,\n            rowMoreLinkInnerClass: \"fc-classic-KUX fc-classic-a3B\",\n            /* Timeline > Slot Header\n            ------------------------------------------------------------------------------------------- */\n            slotHeaderAlign: (info) => info.isTime ? \"start\" : \"center\",\n            slotHeaderClass: (info) => joinClassNames(\"fc-classic-E9P\", !info.level && \"fc-classic-pKG\"),\n            slotHeaderInnerClass: (info) => joinClassNames(\"fc-classic-fn8 fc-classic-V9v fc-classic-9yp\", info.hasNavLink && \"fc-classic-Eu0\"),\n            slotHeaderDividerClass: \"fc-classic-zi1 fc-classic-C1x\",\n            /* Timeline > Now-Indicator\n            ------------------------------------------------------------------------------------------- */\n            nowIndicatorHeaderClass: \"fc-classic-n9G fc-classic-J04 fc-classic-ybF fc-classic-Pqk fc-classic-bLA fc-classic-sYT\",\n            nowIndicatorLineClass: \"fc-classic-3J4 fc-classic-sYT\",\n        },\n    }\n};\n/* SVGs\n------------------------------------------------------------------------------------------------- */\nfunction chevronLeft(className) {\n    return jsx(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", className: className, width: \"20\", height: \"20\", viewBox: \"0 0 24 24\", fill: \"none\", stroke: \"currentColor\", strokeWidth: \"2\", strokeLinecap: \"round\", strokeLinejoin: \"round\", children: jsx(\"polyline\", { points: \"15 18 9 12 15 6\" }) });\n}\nfunction chevronsLeft(className) {\n    return jsxs(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", className: className, width: \"20\", height: \"20\", viewBox: \"0 0 24 24\", fill: \"none\", stroke: \"currentColor\", strokeWidth: \"2\", strokeLinecap: \"round\", strokeLinejoin: \"round\", children: [jsx(\"polyline\", { points: \"11 17 6 12 11 7\" }), jsx(\"polyline\", { points: \"18 17 13 12 18 7\" })] });\n}\nfunction x(className) {\n    return jsxs(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", className: className, width: \"20\", height: \"20\", viewBox: \"0 0 24 24\", fill: \"none\", stroke: \"currentColor\", strokeWidth: \"2\", strokeLinecap: \"round\", strokeLinejoin: \"round\", children: [jsx(\"line\", { x1: \"18\", y1: \"6\", x2: \"6\", y2: \"18\" }), jsx(\"line\", { x1: \"6\", y1: \"6\", x2: \"18\", y2: \"18\" })] });\n}\nfunction plusSquare(className) {\n    return jsxs(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", className: className, width: \"20\", height: \"20\", viewBox: \"0 0 24 24\", fill: \"none\", stroke: \"currentColor\", strokeWidth: \"2\", strokeLinecap: \"round\", strokeLinejoin: \"round\", children: [jsx(\"rect\", { x: \"3\", y: \"3\", width: \"18\", height: \"18\", rx: \"2\", ry: \"2\" }), jsx(\"line\", { x1: \"12\", y1: \"8\", x2: \"12\", y2: \"16\" }), jsx(\"line\", { x1: \"8\", y1: \"12\", x2: \"16\", y2: \"12\" })] });\n}\nfunction minusSquare(className) {\n    return jsxs(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", className: className, width: \"20\", height: \"20\", viewBox: \"0 0 24 24\", fill: \"none\", stroke: \"currentColor\", strokeWidth: \"2\", strokeLinecap: \"round\", strokeLinejoin: \"round\", children: [jsx(\"rect\", { x: \"3\", y: \"3\", width: \"18\", height: \"18\", rx: \"2\", ry: \"2\" }), jsx(\"line\", { x1: \"8\", y1: \"12\", x2: \"16\", y2: \"12\" })] });\n}\n\nexport { index as default };\n","import { addDays, rangeContainsMarker, intersectRanges, createDuration, asRoughMs, wholeDivideDurations, formatIsoTimeString, addDurations, multiplyDuration, startOfDay, formatDayString, joinDateTimeFormatParts, diffDays } from '@full-ui/headless-calendar';\nimport { i as isMajorUnit } from './4ddf07a5.js';\nimport { d as DaySeriesModel, S as Slicer, o as getCellEl, g as RefMap, m as computeColWidth, i as DayGridHeaderRow, R as Ruler, r as resolveDayGridPlacementMode, p as DayGridRow, M as MoreLinkTrigger, q as computeColFromPosition, B as BgEvent, s as renderFill, k as dayMicroWidth, t as buildSegLevels, u as groupLaterallyIntersecting, v as convertSegsToWholeSlices, w as sortByAxisOrder, x as findIntersections, y as MoreLinkContainer } from './20c8a1fa.js';\nimport { n as mapHash, j as createEmptyEventStore, ar as combineEventUis, as as hasBgRendering, e as createFormatter, I as isPropsEqualShallow, H as isArraysEqual, J as computeViewBorderless, ah as sortEventSegs, ai as getEventRangeMeta, ap as buildEventRangeKey, ao as flatArray } from './d7fd1889.js';\nimport { m as memoize, V as ViewContextType, C as ContentContainer, B as BaseComponent, p as afterSize, h as ViewContainer, g as generateClassName, e as DateComponent, c as getIsHeightAuto, x as getTableHeaderSticky, y as getFooterScrollbarSticky, S as Scroller, s as setRef, z as getScrollerSyncerClass, q as watchWidth, w as watchHeight, i as getDateMeta, u as watchSize, j as buildDateStr, r as renderText, o as buildNavLinkAttrs, k as StandardEvent } from './2f45deb4.js';\nimport { jsx, jsxs, Fragment } from 'preact/jsx-runtime';\nimport { j as joinClassNames, f as fracToCssDim } from './d74440d5.js';\nimport { createRef, createElement } from 'preact/compat';\nimport { c as classNames } from './0b389a37.js';\nimport { F as FooterScrollbar } from './4cda001f.js';\n\nfunction buildDayCols(dateProfile, dateProfileGenerator, dateEnv, slotRange, majorUnit = '') {\n    return buildDayColsFromSeries(new DaySeriesModel(dateProfile.renderRange, dateProfileGenerator), dateEnv, {\n        slotRange,\n        majorUnit,\n        activeRange: dateProfile.activeRange,\n    });\n}\nfunction buildDayColsFromSeries(daySeries, dateEnv, config = {}) {\n    const { slotRange, majorUnit = '', activeRange } = config;\n    return daySeries.dates.map((date) => ({\n        key: date.toISOString(),\n        date,\n        range: slotRange\n            ? {\n                start: dateEnv.add(date, slotRange.slotMinTime),\n                end: dateEnv.add(date, slotRange.slotMaxTime),\n            }\n            : {\n                start: date,\n                end: addDays(date, 1),\n            },\n        isMajor: majorUnit ? isMajorUnit(date, majorUnit, dateEnv) : false,\n        isDisabled: activeRange === null || (activeRange !== undefined && !rangeContainsMarker(activeRange, date)),\n    }));\n}\n\nconst EMPTY_EVENT_STORE = createEmptyEventStore(); // for purecomponents. TODO: keep elsewhere\nclass Splitter {\n    constructor() {\n        this.getKeysForEventDefs = memoize(this._getKeysForEventDefs);\n        this.splitDateSelection = memoize(this._splitDateSpan);\n        this.splitEventStore = memoize(this._splitEventStore);\n        this.splitIndividualUi = memoize(this._splitIndividualUi);\n        this.splitEventDrag = memoize(this._splitInteraction);\n        this.splitEventResize = memoize(this._splitInteraction);\n        this.eventUiBuilders = {}; // TODO: typescript protection\n    }\n    splitProps(props) {\n        let keyInfos = this.getKeyInfo(props);\n        let defKeys = this.getKeysForEventDefs(props.eventStore);\n        let dateSelections = this.splitDateSelection(props.dateSelection);\n        let individualUi = this.splitIndividualUi(props.eventUiBases, defKeys); // the individual *bases*\n        let eventStores = this.splitEventStore(props.eventStore, defKeys);\n        let eventDrags = this.splitEventDrag(props.eventDrag);\n        let eventResizes = this.splitEventResize(props.eventResize);\n        let splitProps = {};\n        this.eventUiBuilders = mapHash(keyInfos, (info, key) => this.eventUiBuilders[key] || memoize(buildEventUiForKey));\n        for (let key in keyInfos) {\n            let keyInfo = keyInfos[key];\n            let eventStore = eventStores[key] || EMPTY_EVENT_STORE;\n            let buildEventUi = this.eventUiBuilders[key];\n            splitProps[key] = {\n                businessHours: keyInfo.businessHours || props.businessHours,\n                dateSelection: dateSelections[key] || null,\n                eventStore,\n                eventUiBases: buildEventUi(props.eventUiBases[''], keyInfo.ui, individualUi[key]),\n                eventDrag: eventDrags[key] || null,\n                eventResize: eventResizes[key] || null,\n                eventSelection: eventStore.instances[props.eventSelection] ? props.eventSelection : '',\n            };\n        }\n        return splitProps;\n    }\n    _splitDateSpan(dateSpan) {\n        let dateSpans = {};\n        if (dateSpan) {\n            let keys = this.getKeysForDateSpan(dateSpan);\n            for (let key of keys) {\n                dateSpans[key] = dateSpan;\n            }\n        }\n        return dateSpans;\n    }\n    _getKeysForEventDefs(eventStore) {\n        return mapHash(eventStore.defs, (eventDef) => this.getKeysForEventDef(eventDef));\n    }\n    _splitEventStore(eventStore, defKeys) {\n        let { defs, instances } = eventStore;\n        let splitStores = {};\n        for (let defId in defs) {\n            for (let key of defKeys[defId]) {\n                if (!splitStores[key]) {\n                    splitStores[key] = createEmptyEventStore();\n                }\n                splitStores[key].defs[defId] = defs[defId];\n            }\n        }\n        for (let instanceId in instances) {\n            let instance = instances[instanceId];\n            for (let key of defKeys[instance.defId]) {\n                if (splitStores[key]) { // must have already been created\n                    splitStores[key].instances[instanceId] = instance;\n                }\n            }\n        }\n        return splitStores;\n    }\n    _splitIndividualUi(eventUiBases, defKeys) {\n        let splitHashes = {};\n        for (let defId in eventUiBases) {\n            if (defId) { // not the '' key\n                for (let key of defKeys[defId]) {\n                    if (!splitHashes[key]) {\n                        splitHashes[key] = {};\n                    }\n                    splitHashes[key][defId] = eventUiBases[defId];\n                }\n            }\n        }\n        return splitHashes;\n    }\n    _splitInteraction(interaction) {\n        let splitStates = {};\n        if (interaction) {\n            let affectedStores = this._splitEventStore(interaction.affectedEvents, this._getKeysForEventDefs(interaction.affectedEvents));\n            // can't rely on defKeys because event data is mutated\n            let mutatedKeysByDefId = this._getKeysForEventDefs(interaction.mutatedEvents);\n            let mutatedStores = this._splitEventStore(interaction.mutatedEvents, mutatedKeysByDefId);\n            let populate = (key) => {\n                if (!splitStates[key]) {\n                    splitStates[key] = {\n                        affectedEvents: affectedStores[key] || EMPTY_EVENT_STORE,\n                        mutatedEvents: mutatedStores[key] || EMPTY_EVENT_STORE,\n                        isEvent: interaction.isEvent,\n                    };\n                }\n            };\n            for (let key in affectedStores) {\n                populate(key);\n            }\n            for (let key in mutatedStores) {\n                populate(key);\n            }\n        }\n        return splitStates;\n    }\n}\nfunction buildEventUiForKey(allUi, eventUiForKey, individualUi) {\n    let baseParts = [];\n    if (allUi) {\n        baseParts.push(allUi);\n    }\n    if (eventUiForKey) {\n        baseParts.push(eventUiForKey);\n    }\n    let stuff = {\n        '': combineEventUis(baseParts),\n    };\n    if (individualUi) {\n        Object.assign(stuff, individualUi);\n    }\n    return stuff;\n}\n\nclass AllDaySplitter extends Splitter {\n    getKeyInfo() {\n        return {\n            allDay: {},\n            timed: {},\n        };\n    }\n    getKeysForDateSpan(dateSpan) {\n        if (dateSpan.allDay) {\n            return ['allDay'];\n        }\n        return ['timed'];\n    }\n    getKeysForEventDef(eventDef) {\n        if (!eventDef.allDay) {\n            return ['timed'];\n        }\n        if (hasBgRendering(eventDef)) {\n            return ['timed', 'allDay'];\n        }\n        return ['allDay'];\n    }\n}\n\nclass DayTimeColsSlicer extends Slicer {\n    sliceRange(range, dayRanges) {\n        let segs = [];\n        for (let col = 0; col < dayRanges.length; col += 1) {\n            let segRange = intersectRanges(range, dayRanges[col]);\n            if (segRange) {\n                segs.push({\n                    startDate: segRange.start,\n                    endDate: segRange.end,\n                    isStart: segRange.start.valueOf() === range.start.valueOf(),\n                    isEnd: segRange.end.valueOf() === range.end.valueOf(),\n                    col,\n                });\n            }\n        }\n        return segs;\n    }\n}\n\n/*\nTODO: more DRY with daygrid?\ncan be given null/undefined!\n*/\nfunction organizeSegsByCol(segs, colCount) {\n    let segsByCol = [];\n    let i;\n    for (i = 0; i < colCount; i += 1) {\n        segsByCol.push([]);\n    }\n    if (segs) {\n        for (i = 0; i < segs.length; i += 1) {\n            segsByCol[segs[i].col].push(segs[i]);\n        }\n    }\n    return segsByCol;\n}\n/*\nTODO: more DRY with daygrid?\ncan be given null/undefined!\n*/\nfunction splitInteractionByCol(ui, colCount) {\n    let byRow = [];\n    if (!ui) {\n        for (let i = 0; i < colCount; i += 1) {\n            byRow[i] = null;\n        }\n    }\n    else {\n        for (let i = 0; i < colCount; i += 1) {\n            byRow[i] = {\n                affectedInstances: ui.affectedInstances,\n                isEvent: ui.isEvent,\n                segs: [],\n            };\n        }\n        for (let seg of ui.segs) {\n            byRow[seg.col].segs.push(seg);\n        }\n    }\n    return byRow;\n}\n\n// potential nice values for the slot-duration and interval-duration\n// from largest to smallest\nconst STOCK_SUB_DURATIONS = [\n    { hours: 1 },\n    { minutes: 30 },\n    { minutes: 15 },\n    { seconds: 30 },\n    { seconds: 15 },\n];\nfunction buildSlatMetas(slotMinTime, slotMaxTime, explicitLabelInterval, slotDuration, dateEnv) {\n    let dayStart = new Date(0);\n    let slatTime = slotMinTime;\n    let slatIterator = createDuration(0);\n    let labelInterval = explicitLabelInterval || computeLabelInterval(slotDuration);\n    let metas = [];\n    let i = 0;\n    while (asRoughMs(slatTime) < asRoughMs(slotMaxTime)) {\n        let date = dateEnv.add(dayStart, slatTime);\n        let isLabeled = wholeDivideDurations(slatIterator, labelInterval) !== null;\n        metas.push({\n            date,\n            time: slatTime,\n            key: date.toISOString(), // we can't use the isoTimeStr for uniqueness when minTime/maxTime beyone 0h/24h\n            isoTimeStr: formatIsoTimeString(date),\n            isLabeled,\n            isFirst: i === 0,\n        });\n        slatTime = addDurations(slatTime, slotDuration);\n        slatIterator = addDurations(slatIterator, slotDuration);\n        i += 1;\n    }\n    return metas;\n}\n// Computes an automatic value for slotHeaderInterval\nfunction computeLabelInterval(slotDuration) {\n    let i;\n    let labelInterval;\n    let slotsPerLabel;\n    // find the smallest stock label interval that results in more than one slots-per-label\n    for (i = STOCK_SUB_DURATIONS.length - 1; i >= 0; i -= 1) {\n        labelInterval = createDuration(STOCK_SUB_DURATIONS[i]);\n        slotsPerLabel = wholeDivideDurations(labelInterval, slotDuration);\n        if (slotsPerLabel !== null && slotsPerLabel > 1) {\n            return labelInterval;\n        }\n    }\n    return slotDuration; // fall back\n}\n\nclass TimeGridAllDayHeader extends BaseComponent {\n    constructor() {\n        super(...arguments);\n        // ref\n        this.innerElRef = createRef();\n    }\n    render() {\n        let { props } = this;\n        let { options, viewApi } = this.context;\n        let renderProps = {\n            text: options.allDayText,\n            view: viewApi,\n            isNarrow: props.isNarrow,\n        };\n        return (jsx(ContentContainer, { tag: \"div\", attrs: {\n                role: 'rowheader',\n            }, className: joinClassNames(classNames.flexRow, classNames.noMargin, classNames.noPadding, classNames.contentBox), style: {\n                width: props.width,\n            }, renderProps: renderProps, generatorName: \"allDayHeaderContent\", customGenerator: options.allDayHeaderContent, defaultGenerator: renderAllDayInner, classNameGenerator: options.allDayHeaderClass, didMount: options.allDayHeaderDidMount, willUnmount: options.allDayHeaderWillUnmount, children: (InnerContent) => (jsx(\"div\", { className: joinClassNames(classNames.flexRow, classNames.noShrink, classNames.whiteSpacePre), ref: this.innerElRef, children: jsx(InnerContent, { tag: 'div', className: generateClassName(options.allDayHeaderInnerClass, renderProps) }) })) }));\n    }\n    componentDidMount() {\n        this._isUnmounting = false;\n        const { props } = this;\n        const innerEl = this.innerElRef.current; // TODO: make dynamic with useEffect\n        // TODO: only attach this if refs props present\n        this.disconnectInnerWidth = watchWidth(innerEl, (width) => {\n            if (this._isUnmounting)\n                return;\n            setRef(props.innerWidthRef, width);\n        });\n    }\n    componentWillUnmount() {\n        this._isUnmounting = true;\n        this.disconnectInnerWidth();\n        setRef(this.props.innerWidthRef, null);\n    }\n}\nfunction renderAllDayInner(renderProps) {\n    return renderProps.text;\n}\n\nclass TimeGridAllDayLane extends DateComponent {\n    constructor() {\n        super(...arguments);\n        this.state = {};\n        this.heightRef = createRef();\n        this.handleMoreLinkEl = (el) => {\n            this.disconnectMoreLinkHeight?.();\n            this.disconnectMoreLinkHeight = undefined;\n            if (el) {\n                this.disconnectMoreLinkHeight = watchHeight(el, (height) => {\n                    if (this._isUnmounting)\n                        return;\n                    this.setState({ moreLinkHeight: height });\n                });\n            }\n        };\n        this.handleRootEl = (rootEl) => {\n            this.rootEl = rootEl;\n            if (rootEl) {\n                this.context.registerInteractiveComponent(this, {\n                    el: rootEl,\n                });\n            }\n            else {\n                this.context.unregisterInteractiveComponent(this);\n            }\n        };\n    }\n    render() {\n        const { props, state } = this;\n        const needsMoreLinkProbe = !props.forPrint && resolveDayGridPlacementMode(props.dayMaxEvents, props.dayMaxEventRows) === 'auto';\n        return (jsxs(Fragment, { children: [jsx(DayGridRow, { ...props, moreLinkHeight: state.moreLinkHeight, \n                    /* BAD: these overwrite the props! caller might want to pass them */\n                    rootElRef: this.handleRootEl, heightRef: this.heightRef }), needsMoreLinkProbe && (jsx(MoreLinkTrigger, { num: 1, display: 'row', isNarrow: props.cellIsNarrow, isMicro: props.cellIsMicro, elRef: this.handleMoreLinkEl, className: classNames.offscreen, attrs: {\n                        'aria-hidden': true, // redundant with .offscreen's visibility, but marks it as a probe\n                    } }))] }));\n    }\n    componentDidMount() {\n        this._isUnmounting = false;\n    }\n    componentWillUnmount() {\n        this._isUnmounting = true;\n    }\n    queryHit(isRtl, positionLeft, positionTop, elWidth) {\n        const { props, heightRef } = this;\n        const colCount = props.cells.length;\n        const { col, left, right } = computeColFromPosition(positionLeft, elWidth, props.colWidth, colCount, isRtl);\n        const cell = props.cells[col];\n        if (cell.isInert) {\n            return null;\n        }\n        const cellStartDate = cell.date;\n        const cellEndDate = addDays(cellStartDate, 1);\n        return {\n            dateProfile: props.dateProfile,\n            dateSpan: {\n                range: {\n                    start: cellStartDate,\n                    end: cellEndDate,\n                },\n                allDay: true,\n                ...cell.dateSpanProps,\n            },\n            getDayEl: () => getCellEl(this.rootEl, col),\n            rect: {\n                left,\n                right,\n                top: 0,\n                bottom: heightRef.current,\n            },\n            layer: 0,\n        };\n    }\n}\n\nfunction computeSlatHeight(expandRows, slatCnt, explicitSlatMinHeight = 0, slatInnerHeight, // from the \"inner\" i think\nscrollerHeight) {\n    if (!slatInnerHeight || !scrollerHeight) {\n        return [undefined, false];\n    }\n    const slatMinHeight = Math.max(slatInnerHeight + 1, explicitSlatMinHeight);\n    const slatLiquidHeight = scrollerHeight / slatCnt;\n    let slatLiquid;\n    let slatHeight;\n    if (expandRows && slatLiquidHeight >= slatMinHeight) {\n        slatLiquid = true;\n        slatHeight = slatLiquidHeight;\n    }\n    else {\n        slatLiquid = false;\n        slatHeight = slatMinHeight;\n    }\n    return [slatHeight, slatLiquid];\n}\n/*\nThe day of the column that the now-indicator is drawn within. Usually now's own day, but when slotMaxTime\nextends past midnight, it might only be within the previous day's column (#6394).\nUndefined if now isn't within any column.\n*/\nfunction computeNowIndicatorDayDate(nowDate, nowIndicatorSegsByCol, cells) {\n    const nowDayMs = startOfDay(nowDate).valueOf();\n    let firstDayDate;\n    for (let col = 0; col < cells.length; col++) {\n        if (nowIndicatorSegsByCol[col]?.length) {\n            const { date } = cells[col];\n            if (date.valueOf() === nowDayMs) {\n                return date;\n            }\n            if (!firstDayDate) {\n                firstDayDate = date;\n            }\n        }\n    }\n    return firstDayDate;\n}\n/*\nA `startOfDayDate` must be given for avoiding ambiguity over how to treat midnight.\n*/\nfunction computeDateTopFrac(date, dateProfile, startOfDayDate) {\n    if (!startOfDayDate) {\n        startOfDayDate = startOfDay(date);\n    }\n    return computeTimeTopFrac(createDuration(date.valueOf() - startOfDayDate.valueOf()), dateProfile);\n}\nfunction computeTimeTopFrac(time, dateProfile) {\n    const startMs = asRoughMs(dateProfile.slotMinTime);\n    const endMs = asRoughMs(dateProfile.slotMaxTime);\n    let frac = (time.milliseconds - startMs) / (endMs - startMs);\n    frac = Math.max(0, frac);\n    frac = Math.min(1, frac);\n    return frac;\n}\n\n/**\n * Projects production's date range onto the slat canvas.\n *\n * This is TimeGrid's production-specific coordinate conversion: it owns hidden\n * days, DST, and `eventMinHeight`. The shared engine consumes only the numbers\n * it produces.\n *\n * The canvas height may be assumed rather than measured — callers substitute\n * `ESTIMATED_SLAT_HEIGHT` so the first paint contains events — in which case\n * they also pass no `eventMinHeight`. A null height still yields no verticals,\n * but no production caller passes one.\n */\nfunction computeFgSegVerticals(segs, dateProfile, colDate, slatCnt, slatHeight, // in pixels\neventMinHeight, // in pixels\neventShortHeight) {\n    const res = [];\n    if (slatHeight != null) {\n        const totalHeight = slatHeight * slatCnt;\n        for (const seg of segs) {\n            const startFrac = computeDateTopFrac(seg.startDate, dateProfile, colDate);\n            const endFrac = computeDateTopFrac(seg.endDate, dateProfile, colDate);\n            const startCoord = startFrac * totalHeight;\n            let endCoord = endFrac * totalHeight;\n            let height = endCoord - startCoord;\n            if (eventMinHeight != null && height < eventMinHeight) {\n                height = eventMinHeight;\n                endCoord = startCoord + height;\n            }\n            res.push({\n                start: startCoord,\n                end: endCoord,\n                size: height,\n                isShort: height <= eventShortHeight,\n            });\n        }\n    }\n    return res;\n}\n/**\n * Adapts production TimeGrid segs to and from the shared placement engine.\n *\n * The caller owns vertical geometry: `segVerticals` already incorporates\n * clipping, and `eventMinHeight` too once the slat height is measured — the\n * caller withholds that floor while the height is only assumed. Any missing\n * entry is excluded. The engine owns only admission and normalized horizontal\n * placement. `slotEventOverlap` remains a final CSS concern, and mirrors\n * deliberately stay outside this normal-event admission path.\n */\nfunction buildTimeGridSegPlacements(segs, segVerticals, eventOrderStrict, eventMaxStack) {\n    const sourceSegs = [];\n    const segVerticalBySeg = new Map();\n    for (let orderIndex = 0; orderIndex < segs.length; orderIndex += 1) {\n        const seg = segs[orderIndex];\n        const segVertical = segVerticals[orderIndex];\n        if (segVertical) {\n            const sourceSeg = {\n                ...seg,\n                key: seg.eventRange.instance.instanceId,\n                start: segVertical.start,\n                end: segVertical.end,\n                orderIndex,\n            };\n            sourceSegs.push(sourceSeg);\n            segVerticalBySeg.set(sourceSeg, segVertical);\n        }\n    }\n    const layout = layoutTimeGridColumnByMaxLevel(sourceSegs, eventMaxStack ?? Infinity, { orderStrict: eventOrderStrict ?? false });\n    return {\n        placements: layout.domOrderedPlacements.map((placement) => {\n            const seg = placement.sourceSeg;\n            return {\n                seg,\n                segVertical: segVerticalBySeg.get(seg),\n                levelCoord: placement.levelCoord,\n                thickness: placement.thickness,\n                stackDepth: placement.backwardDepth,\n                stackForward: placement.forwardDepth,\n            };\n        }),\n        hiddenGroups: layout.moreLinkGroups.map((group) => {\n            const groupSegs = group.hiddenSlices.map((slice) => slice.sourceSeg);\n            return {\n                key: group.key,\n                start: group.start,\n                end: group.end,\n                segs: groupSegs,\n            };\n        }),\n    };\n}\n/**\n * Builds, limits, and expands one TimeGrid day/resource column.\n *\n * TimeGrid rotates the visual meaning of the shared kernel's level structure.\n * A seg's lateral span runs down the time axis, while logical levels proceed\n * across the column. The retained levels become a normalized collision web:\n * connected components get equal base columns, and events widen through empty\n * deeper columns until their first collider.\n */\nfunction layoutTimeGridColumnByMaxLevel(eventOrderedSegs, maxLevels, options) {\n    const { segLevels, excludedSegs } = buildSegLevels(eventOrderedSegs, options.orderStrict, maxLevels);\n    const placements = positionTimeGridPlacements(segLevels);\n    const moreLinkGroups = groupLaterallyIntersecting(convertSegsToWholeSlices(excludedSegs));\n    return {\n        domOrderedPlacements: sortByAxisOrder(placements),\n        moreLinkGroups,\n    };\n}\n/**\n * Turns retained dimensionless levels into normalized placement rectangles.\n *\n * Each connected collision component shares equal-width base columns. An\n * event then expands through consecutive deeper columns until the first one\n * containing a collider. A single intersection sweep supplies component\n * membership, expansion stops, and backward/forward longest-chain depths.\n */\nfunction positionTimeGridPlacements(levels) {\n    const placementLevels = levels.map((level, levelIndex) => level.map((sourceSeg) => ({\n        sourceSeg,\n        start: sourceSeg.start,\n        end: sourceSeg.end,\n        isStart: sourceSeg.isStart,\n        isEnd: sourceSeg.isEnd,\n        levelIndex,\n    })));\n    // Level order matters below: every placement precedes its deeper colliders.\n    const placements = flatArray(placementLevels);\n    const collidersByKey = new Map();\n    const parentByKey = new Map(placements.map((placement) => [\n        placement.sourceSeg.key,\n        placement.sourceSeg.key,\n    ]));\n    for (const placement of placements) {\n        const colliders = [];\n        for (let levelIndex = placement.levelIndex + 1; levelIndex < levels.length; levelIndex += 1) {\n            colliders.push(...findIntersections(placementLevels[levelIndex], placement));\n        }\n        collidersByKey.set(placement.sourceSeg.key, colliders);\n        for (const collider of colliders) {\n            unionPlacementKeys(parentByKey, placement.sourceSeg.key, collider.sourceSeg.key);\n        }\n    }\n    const maxLevelByRoot = new Map();\n    for (const placement of placements) {\n        const root = findPlacementRoot(parentByKey, placement.sourceSeg.key);\n        maxLevelByRoot.set(root, Math.max(maxLevelByRoot.get(root) ?? 0, placement.levelIndex));\n    }\n    // Longest chains through the collision graph, as dynamic programming over\n    // the adjacency. The passes run in opposite level orders so each dependency\n    // is final before it contributes to the next placement.\n    const backwardDepthByKey = new Map(placements.map((placement) => [\n        placement.sourceSeg.key,\n        0,\n    ]));\n    const forwardDepthByKey = new Map(placements.map((placement) => [\n        placement.sourceSeg.key,\n        0,\n    ]));\n    for (const placement of placements) {\n        const depth = backwardDepthByKey.get(placement.sourceSeg.key) + 1;\n        for (const collider of collidersByKey.get(placement.sourceSeg.key)) {\n            backwardDepthByKey.set(collider.sourceSeg.key, Math.max(backwardDepthByKey.get(collider.sourceSeg.key), depth));\n        }\n    }\n    for (let index = placements.length - 1; index >= 0; index -= 1) {\n        const placement = placements[index];\n        let depth = 0;\n        for (const collider of collidersByKey.get(placement.sourceSeg.key)) {\n            depth = Math.max(depth, forwardDepthByKey.get(collider.sourceSeg.key) + 1);\n        }\n        forwardDepthByKey.set(placement.sourceSeg.key, depth);\n    }\n    return placements.map((placement) => {\n        const key = placement.sourceSeg.key;\n        const levelCount = maxLevelByRoot.get(findPlacementRoot(parentByKey, key)) + 1;\n        // Expand until the shallowest deeper collider. Colliders always share the\n        // component, so their levels stay within its column count.\n        let farLevel = levelCount;\n        for (const collider of collidersByKey.get(key)) {\n            farLevel = Math.min(farLevel, collider.levelIndex);\n        }\n        const levelCoord = placement.levelIndex / levelCount;\n        const thickness = (farLevel - placement.levelIndex) / levelCount;\n        return {\n            ...placement,\n            levelCoord,\n            thickness,\n            levelEndCoord: levelCoord + thickness,\n            backwardDepth: backwardDepthByKey.get(key),\n            forwardDepth: forwardDepthByKey.get(key),\n        };\n    });\n}\nfunction findPlacementRoot(parentByKey, key) {\n    const parent = parentByKey.get(key);\n    if (parent === key)\n        return key;\n    const root = findPlacementRoot(parentByKey, parent);\n    parentByKey.set(key, root);\n    return root;\n}\nfunction unionPlacementKeys(parentByKey, first, second) {\n    const firstRoot = findPlacementRoot(parentByKey, first);\n    const secondRoot = findPlacementRoot(parentByKey, second);\n    if (firstRoot !== secondRoot)\n        parentByKey.set(secondRoot, firstRoot);\n}\n\n/**\n * Slat height assumed on the first render, before the real one is measured.\n *\n * Without it, `computeFgSegVerticals` has no canvas to project onto and returns\n * nothing, so the view paints a frame containing no events at all and the\n * calendar looks empty until measurement lands. Projecting against an assumed\n * height instead means events are present in that very first paint.\n *\n * A flat constant is enough, and deliberately so. Placement compares segs\n * against each other and never against the axis length, so scaling every\n * coordinate by the same factor leaves collisions and level assignment\n * untouched. Guessing wrong rescales the raw geometry; it does not reorganize\n * it. That is why the caller withholds `eventMinHeight` while assuming — a\n * pixel floor applied at the wrong scale would stretch the wrong segs, and\n * stretching is what creates collisions.\n *\n * This is a claim about the raw coordinates only. The measured pass turns\n * `eventMinHeight` back on, and stretching a sub-minimum seg there can make it\n * collide with a neighbor it previously cleared, changing levels and\n * `eventMaxStack` admission. Expect the assumed pass to agree in the common\n * case; do not treat it as final.\n *\n * TimeGrid's caveat list stops there, unlike Timeline's: it places with unit\n * thickness and measures no event wrappers, so nothing about the rendered size\n * can feed back into placement. `isShort` also differs across passes, but that\n * is a styling decision rather than geometry.\n */\nconst ESTIMATED_SLAT_HEIGHT = 50;\n\n// Firefox is terrible at rendering absolute elements that span across multiple print pages\nconst isBrowserPrintQuirky = /* true || */ (typeof navigator !== 'undefined' &&\n    navigator.userAgent.toLowerCase().includes('firefox'));\nfunction computeTimeGridPrintMode(forPrint, eventPrintLayout) {\n    if (!forPrint) {\n        return 'positioned';\n    }\n    return eventPrintLayout === 'stack' || (eventPrintLayout !== 'grid' && isBrowserPrintQuirky)\n        ? 'stack'\n        : 'positioned';\n}\n\nconst DEFAULT_TIME_FORMAT = createFormatter({\n    hour: 'numeric',\n    minute: '2-digit',\n    meridiem: false,\n});\nclass TimeGridEvent extends BaseComponent {\n    render() {\n        const { props } = this;\n        return (jsx(StandardEvent, { ...props, display: 'column', level: props.level, isNarrow: props.isNarrow, isShort: props.isShort, className: \n            // see note in TimeGridCol on why we use flexbox\n            props.isLiquid ? classNames.liquid : '', disableLiquid: !props.isLiquid, defaultTimeFormat: DEFAULT_TIME_FORMAT }));\n    }\n}\n\nclass TimeGridMoreLink extends BaseComponent {\n    render() {\n        let { props } = this;\n        return (jsx(\"div\", { role: 'listitem', className: joinClassNames(classNames.abs, classNames.flexCol, classNames.end0, classNames.z9999), style: {\n                top: props.top,\n                height: props.height,\n            }, children: jsx(MoreLinkContainer, { className: classNames.liquid, display: 'column', allDayDate: null, segs: props.hiddenSegs, hiddenSegs: props.hiddenSegs, dateSpanProps: props.dateSpanProps, renderProps: props.renderProps, dateProfile: props.dateProfile, todayRange: props.todayRange, popoverContent: () => renderPlainFgSegs(props.hiddenSegs, props, /* isMirror = */ false), forceTimed: true, isNarrow: props.isNarrow, isMicro: props.isMicro }) }));\n    }\n}\n\nconst NowIndicatorDot = (props) => (jsx(ViewContextType.Consumer, { children: (context) => {\n        let { options } = context;\n        return (jsx(\"div\", { className: joinClassNames(props.className, options.nowIndicatorDotClass), style: props.style }));\n    } }));\n\nconst NowIndicatorLineContainer = (props) => (jsx(ViewContextType.Consumer, { children: (context) => {\n        let { options } = context;\n        let renderProps = {\n            date: context.dateEnv.toDate(props.date),\n            view: context.viewApi,\n        };\n        return (jsx(ContentContainer, { elRef: props.elRef, tag: props.tag || 'div', attrs: props.attrs, className: props.className, style: props.style, renderProps: renderProps, generatorName: \"nowIndicatorLineContent\", customGenerator: options.nowIndicatorLineContent, classNameGenerator: options.nowIndicatorLineClass, didMount: options.nowIndicatorLineDidMount, willUnmount: options.nowIndicatorLineWillUnmount, children: props.children }));\n    } }));\n\n/*\nRenders both the line AND the dot\nTODO: DRY with other NowIndicator components\n*/\nfunction TimeGridNowIndicatorLine(props) {\n    const top = props.totalHeight != null\n        ? props.totalHeight * computeDateTopFrac(props.nowDate, props.dateProfile, props.dayDate)\n        : undefined;\n    return (jsxs(\"div\", { className: joinClassNames(classNames.fill, classNames.pointerEventsNone, classNames.z2), children: [jsx(NowIndicatorLineContainer, { className: joinClassNames(classNames.fillX, classNames.noMarginX, classNames.borderlessX), style: { top }, date: props.nowDate }), (props.showDot ?? true) && (jsx(NowIndicatorDot, { className: joinClassNames(classNames.abs, classNames.start0), style: { top } }))] }));\n}\n\nclass TimeGridCol extends BaseComponent {\n    constructor() {\n        super(...arguments);\n        this.sortEventSegs = memoize(sortEventSegs);\n        this.getDateMeta = memoize(getDateMeta);\n    }\n    render() {\n        let { props, context } = this;\n        let { options, dateEnv } = context;\n        let isSelectMirror = options.selectMirror;\n        let mirrorSegs = // yuck\n         (props.eventDrag && props.eventDrag.segs) ||\n            (props.eventResize && props.eventResize.segs) ||\n            (isSelectMirror && props.dateSelectionSegs) ||\n            [];\n        let dateMeta = this.getDateMeta(props.date, dateEnv, props.dateProfile, props.todayRange);\n        const baseClassName = joinClassNames(classNames.borderlessY, classNames.borderlessEnd, !props.borderStart && classNames.borderlessStart, props.width == null && classNames.liquid, classNames.rel, // origin for abs-positioned children within\n        classNames.z1);\n        const baseStyle = {\n            width: props.width,\n        };\n        const isStack = this.getIsStack();\n        const renderProps = {\n            ...dateMeta,\n            ...props.renderProps,\n            isStack,\n            isNarrow: props.isNarrow,\n            isMajor: props.isMajor,\n            view: context.viewApi,\n        };\n        if (dateMeta.isDisabled) {\n            return (jsx(\"div\", { role: 'cell', \"aria-disabled\": true, className: joinClassNames(generateClassName(options.dayLaneClass, renderProps), baseClassName), style: baseStyle }));\n        }\n        const innerClassName = joinClassNames(generateClassName(options.dayLaneInnerClass, renderProps), !isStack && classNames.fill, classNames.z1);\n        const sortedFgSegs = this.sortEventSegs(props.fgEventSegs, options.eventOrder);\n        return (jsx(ContentContainer, { tag: \"div\", attrs: {\n                ...props.attrs,\n                role: 'cell',\n                ...(dateMeta.isToday ? { 'aria-current': 'date' } : {}),\n                'data-date': formatDayString(props.date),\n            }, className: baseClassName, style: baseStyle, renderProps: renderProps, generatorName: undefined, classNameGenerator: options.dayLaneClass, didMount: options.dayLaneDidMount, willUnmount: options.dayLaneWillUnmount, children: () => (jsxs(Fragment, { children: [this.renderFillSegs(props.businessHourSegs, 'non-business'), this.renderFillSegs(props.bgEventSegs, 'bg-event'), this.renderFillSegs(props.dateSelectionSegs, 'highlight'), jsx(\"div\", { \n                        // events and more-links are list items\n                        role: sortedFgSegs.length ? 'list' : undefined, className: innerClassName, children: this.renderFgSegs(sortedFgSegs, \n                        /* isMirror = */ false) }), Boolean(mirrorSegs.length) && (\n                    // but only show it when there are actual mirror events, to avoid blocking clicks\n                    jsx(\"div\", { className: innerClassName, children: this.renderFgSegs(mirrorSegs, \n                        /* isMirror = */ true) })), this.renderNowIndicator(props.nowIndicatorSegs)] })) }));\n    }\n    renderFgSegs(sortedFgSegs, isMirror) {\n        const { props } = this;\n        if (this.getIsStack()) {\n            return renderPlainFgSegs(sortedFgSegs, props, isMirror);\n        }\n        if (isMirror) {\n            return this.renderPositionedMirrorSegs(sortedFgSegs);\n        }\n        return this.renderPositionedFgSegs(sortedFgSegs);\n    }\n    renderPositionedFgSegs(segs) {\n        let { eventMaxStack, eventOrderStrict } = this.context.options;\n        let segVerticals = this.computeSegVerticals(segs);\n        let { placements, hiddenGroups } = buildTimeGridSegPlacements(segs, segVerticals, eventOrderStrict, eventMaxStack);\n        return (jsxs(Fragment, { children: [placements.map((placement) => this.renderPositionedSeg(placement.seg, placement.segVertical, this.computeSegHStyle(placement), placement.stackDepth, \n                /* isMirror = */ false)), this.renderHiddenGroups(hiddenGroups)] }));\n    }\n    // Mirrors bypass normal-event admission so limits cannot hide them or create more links.\n    renderPositionedMirrorSegs(segs) {\n        let segVerticals = this.computeSegVerticals(segs);\n        return segs.map((seg, index) => this.renderPositionedSeg(seg, segVerticals[index] || {}, { left: 0, right: 0, zIndex: 0 }, // full column width\n        /* level = */ 0, \n        /* isMirror = */ true));\n    }\n    renderPositionedSeg(seg, segVertical, hStyle, level, isMirror) {\n        let { props } = this;\n        let { eventRange } = seg;\n        let { instanceId } = eventRange.instance; // guaranteed because it's an fg event\n        let isSelected = instanceId === props.eventSelection;\n        if (isSelected) {\n            hStyle.zIndex += 1000; // HACK: relies on hardcoded z-index offset; fragile if stacking context changes\n        }\n        let isDragging = Boolean(props.eventDrag && props.eventDrag.affectedInstances[instanceId]);\n        let isResizing = Boolean(props.eventResize && props.eventResize.affectedInstances[instanceId]);\n        let isInvisible = !isMirror && (isDragging || isResizing);\n        return (jsx(\"div\", { role: isMirror ? undefined : 'listitem', \n            // we would have used classNames.fill, but multi-page spanning breaks in Firefox\n            // we would have used height:100%, but multi-page spanning breaks in Safari\n            className: joinClassNames(classNames.abs, classNames.flexCol), style: {\n                visibility: isInvisible ? 'hidden' : undefined,\n                top: segVertical.start,\n                height: segVertical.size,\n                ...hStyle,\n            }, children: jsx(TimeGridEvent, { eventRange: eventRange, slicedStart: seg.startDate, slicedEnd: seg.endDate, isStart: seg.isStart, isEnd: seg.isEnd, isDragging: isDragging, isResizing: isResizing, isMirror: isMirror, isSelected: isSelected, level: level, isNarrow: props.isNarrow, isShort: segVertical.isShort || false, isLiquid: true, renderProps: props.renderProps, ...getEventRangeMeta(eventRange, props.todayRange, props.nowDate, props.nowMs) }) }, instanceId));\n    }\n    /*\n    A pixel floor is only meaningful against a real slat height, so it stays off\n    while the height is assumed. See ESTIMATED_SLAT_HEIGHT for why, and for what\n    the assumed pass does and does not guarantee.\n    */\n    // TODO: memoize this?\n    computeSegVerticals(segs) {\n        let { props, context } = this;\n        let isMeasured = props.slatHeight != null;\n        return computeFgSegVerticals(segs, props.dateProfile, props.date, props.slatCnt, props.slatHeight ?? ESTIMATED_SLAT_HEIGHT, isMeasured ? context.options.eventMinHeight : undefined, context.options.eventShortHeight);\n    }\n    /*\n    NOTE: a group's coordinates come from computeFgSegVerticals, so eventMinHeight\n    has already been applied to the segs it was formed from\n    */\n    renderHiddenGroups(hiddenGroups) {\n        let { dateSpanProps, renderProps, dateProfile, todayRange, nowDate, nowMs, eventSelection, eventDrag, eventResize, isNarrow, isMicro } = this.props;\n        return (jsx(Fragment, { children: hiddenGroups.map((hiddenGroup) => {\n                return (jsx(TimeGridMoreLink, { hiddenSegs: hiddenGroup.segs, top: hiddenGroup.start, height: hiddenGroup.end - hiddenGroup.start, isNarrow: isNarrow, isMicro: isMicro, dateSpanProps: dateSpanProps, renderProps: renderProps, dateProfile: dateProfile, todayRange: todayRange, nowDate: nowDate, nowMs: nowMs, eventSelection: eventSelection, eventDrag: eventDrag, eventResize: eventResize }, hiddenGroup.key));\n            }) }));\n    }\n    renderFillSegs(segs, fillType) {\n        let { props, context } = this;\n        let segVerticals = this.computeSegVerticals(segs);\n        return (jsx(Fragment, { children: segs.map((seg, index) => {\n                const { eventRange } = seg;\n                const segVertical = segVerticals[index] || {};\n                return (jsx(\"div\", { \"aria-hidden\": true, className: classNames.fillX, style: {\n                        top: segVertical.start,\n                        height: segVertical.size,\n                        // HACK to get bg fills to overlap cell-start border\n                        // which matches how dayGrid looks,\n                        // which is important because all-day background events, in TimeGrid,\n                        // will render on both at the same time\n                        marginInlineStart: -1,\n                    }, children: fillType === 'bg-event' ?\n                        jsx(BgEvent, { eventRange: eventRange, isStart: seg.isStart, isEnd: seg.isEnd, isNarrow: props.isNarrow, isShort: segVertical.isShort || false, isVertical: true, renderProps: props.renderProps, ...getEventRangeMeta(eventRange, props.todayRange, props.nowDate, props.nowMs) }) :\n                        renderFill(fillType, context.options) }, buildEventRangeKey(eventRange)));\n            }) }));\n    }\n    renderNowIndicator(segs) {\n        let { props } = this;\n        if (props.forPrint || this.getIsStack()) {\n            return;\n        }\n        return segs.map((seg, i) => (jsx(TimeGridNowIndicatorLine, { nowDate: seg.startDate, dayDate: props.date, dateProfile: props.dateProfile, totalHeight: props.slatHeight != null ? props.slatHeight * props.slatCnt : undefined, showDot: seg.showDot ?? true }, i)));\n    }\n    /*\n    TODO: eventually move to width, not left+right\n    */\n    computeSegHStyle(segRect) {\n        let { options } = this.context;\n        let shouldOverlap = options.slotEventOverlap;\n        let nearCoord = segRect.levelCoord; // the left side if LTR. the right side if RTL. floating-point\n        let farCoord = segRect.levelCoord + segRect.thickness; // the right side if LTR. the left side if RTL. floating-point\n        if (shouldOverlap) {\n            // double the width, but don't go beyond the maximum forward coordinate (1.0)\n            farCoord = Math.min(1, nearCoord + (farCoord - nearCoord) * 2);\n        }\n        let props = {\n            zIndex: segRect.stackDepth + 1, // convert from 0-base to 1-based\n            insetInlineStart: fracToCssDim(nearCoord),\n            insetInlineEnd: fracToCssDim(1 - farCoord),\n            marginInlineEnd: undefined,\n        };\n        if (shouldOverlap && segRect.stackForward) {\n            // add padding to the edge so that forward stacked events don't cover the resizer's icon\n            props.marginInlineEnd = 10 * 2; // 10 is a guesstimate of the icon's width\n        }\n        return props;\n    }\n    getIsStack() {\n        const { eventPrintLayout } = this.context.options;\n        return computeTimeGridPrintMode(this.props.forPrint, eventPrintLayout) === 'stack';\n    }\n}\nfunction renderPlainFgSegs(sortedFgSegs, { todayRange, nowDate, nowMs, eventSelection, eventDrag, eventResize, renderProps }, isMirror) {\n    return (jsx(Fragment, { children: sortedFgSegs.map((seg) => {\n            let { eventRange } = seg;\n            let { instanceId } = eventRange.instance;\n            let isDragging = Boolean(eventDrag && eventDrag.affectedInstances[instanceId]);\n            let isResizing = Boolean(eventResize && eventResize.affectedInstances[instanceId]);\n            let isInvisible = isDragging || isResizing;\n            return (jsx(\"div\", { role: isMirror ? undefined : 'listitem', className: classNames.breakInsideAvoid, style: { visibility: isInvisible ? 'hidden' : undefined }, children: jsx(TimeGridEvent, { eventRange: eventRange, slicedStart: seg.startDate, slicedEnd: seg.endDate, isStart: seg.isStart, isEnd: seg.isEnd, isDragging: isDragging, isResizing: isResizing, isMirror: isMirror, isSelected: instanceId === eventSelection, level: 0, isShort: false, isNarrow: false, disableResizing: true, renderProps: renderProps, ...getEventRangeMeta(eventRange, todayRange, nowDate, nowMs) }) }, instanceId));\n        }) }));\n}\n\nclass TimeGridCols extends DateComponent {\n    constructor() {\n        super(...arguments);\n        // memo\n        this.processSlotOptions = memoize(processSlotOptions);\n        this.handleRootEl = (el) => {\n            this.rootEl = el;\n            if (el) {\n                this.context.registerInteractiveComponent(this, {\n                    el,\n                    isHitComboAllowed: this.props.isHitComboAllowed,\n                });\n            }\n            else {\n                this.context.unregisterInteractiveComponent(this);\n            }\n        };\n    }\n    render() {\n        const { props } = this;\n        return (jsx(\"div\", { role: props.role /* !!! */, className: joinClassNames(props.className, classNames.flexRow), ref: this.handleRootEl, children: props.cells.map((cell, col) => (jsx(TimeGridCol, { dateProfile: props.dateProfile, nowDate: props.nowDate, nowMs: props.nowMs, todayRange: props.todayRange, date: cell.date, isMajor: cell.isMajor, slatCnt: props.slatCnt, renderProps: cell.renderProps, attrs: cell.attrs, dateSpanProps: cell.dateSpanProps, forPrint: props.forPrint, borderStart: Boolean(col), isNarrow: props.cellIsNarrow, isMicro: props.cellIsMicro, \n                // content\n                fgEventSegs: props.fgEventSegsByCol[col], bgEventSegs: props.bgEventSegsByCol[col], businessHourSegs: props.businessHourSegsByCol[col], nowIndicatorSegs: props.nowIndicatorSegsByCol[col], dateSelectionSegs: props.dateSelectionSegsByCol[col], eventDrag: props.eventDragByCol[col], eventResize: props.eventResizeByCol[col], eventSelection: props.eventSelection, \n                // dimensions\n                width: props.colWidth, slatHeight: props.slatHeight }, cell.key))) }));\n    }\n    queryHit(isRtl, positionLeft, positionTop, elWidth) {\n        const { dateProfile, cells, colWidth, slatHeight } = this.props;\n        const { dateEnv, options } = this.context;\n        const { snapDuration, snapsPerSlot } = this.processSlotOptions(options.slotDuration, options.snapDuration);\n        const colCount = cells.length;\n        const { col, left, right } = computeColFromPosition(positionLeft, elWidth, colWidth, colCount, isRtl);\n        const cell = cells[col];\n        if (cell.isInert) {\n            return null;\n        }\n        const slatIndex = Math.floor(positionTop / slatHeight);\n        const slatTop = slatIndex * slatHeight;\n        const partial = (positionTop - slatTop) / slatHeight; // floating point number between 0 and 1\n        const localSnapIndex = Math.floor(partial * snapsPerSlot); // the snap # relative to start of slat\n        const snapIndex = slatIndex * snapsPerSlot + localSnapIndex;\n        const time = addDurations(dateProfile.slotMinTime, multiplyDuration(snapDuration, snapIndex));\n        const start = dateEnv.add(cell.date, time);\n        const end = dateEnv.add(start, snapDuration);\n        return {\n            dateProfile,\n            dateSpan: {\n                range: { start, end },\n                allDay: false,\n                ...cell.dateSpanProps,\n            },\n            getDayEl: () => getCellEl(this.rootEl, col),\n            rect: {\n                left,\n                right,\n                top: slatTop,\n                bottom: slatTop + slatHeight,\n            },\n            layer: 0,\n        };\n    }\n}\nTimeGridCols.addPropsEquality({\n    style: isPropsEqualShallow,\n});\n// Utils\n// -------------------------------------------------------------------------------------------------\nfunction processSlotOptions(slotDuration, snapDurationOverride) {\n    let snapDuration = snapDurationOverride || slotDuration;\n    let snapsPerSlot = wholeDivideDurations(slotDuration, snapDuration);\n    if (snapsPerSlot === null) {\n        snapDuration = slotDuration;\n        snapsPerSlot = 1;\n        // TODO: say warning?\n    }\n    return { snapDuration, snapsPerSlot };\n}\n\nconst NowIndicatorHeaderContainer = (props) => (jsx(ViewContextType.Consumer, { children: (context) => {\n        let { options } = context;\n        let renderProps = {\n            date: context.dateEnv.toDate(props.date),\n            view: context.viewApi,\n        };\n        return (jsx(ContentContainer, { elRef: props.elRef, tag: props.tag || 'div', attrs: props.attrs, className: props.className, style: props.style, renderProps: renderProps, generatorName: \"nowIndicatorHeaderContent\", customGenerator: options.nowIndicatorHeaderContent, classNameGenerator: options.nowIndicatorHeaderClass, didMount: options.nowIndicatorHeaderDidMount, willUnmount: options.nowIndicatorHeaderWillUnmount, children: props.children }));\n    } }));\n\n/*\nTODO: DRY with other NowIndicator components\n*/\nfunction TimeGridNowIndicatorArrow(props) {\n    return (jsx(\"div\", { \n        // crop any overflow that the arrow/line might cause\n        // TODO: just do this on the entire canvas within the scroller\n        className: joinClassNames(classNames.fill, classNames.crop, classNames.pointerEventsNone, classNames.z2), children: jsx(NowIndicatorHeaderContainer, { className: classNames.abs, style: {\n                top: props.totalHeight != null\n                    ? props.totalHeight * computeDateTopFrac(props.nowDate, props.dateProfile, props.dayDate)\n                    : undefined\n            }, date: props.nowDate }) }));\n}\n\nconst DEFAULT_SLAT_LABEL_FORMAT = createFormatter({\n    hour: 'numeric',\n    minute: '2-digit',\n    omitZeroMinute: true,\n    meridiem: 'short',\n});\n/*\nAlways oriented in a column\n*/\nclass TimeGridSlatHeader extends BaseComponent {\n    constructor() {\n        super(...arguments);\n        // memo\n        this.createRenderProps = memoize(createRenderProps);\n        // ref\n        this.innerElRef = createRef();\n    }\n    render() {\n        let { props, context } = this;\n        let { options } = context;\n        let headerFormat = // TODO: fully pre-parse\n         options.slotHeaderFormat == null ? DEFAULT_SLAT_LABEL_FORMAT :\n            Array.isArray(options.slotHeaderFormat) ? createFormatter(options.slotHeaderFormat[0]) :\n                createFormatter(options.slotHeaderFormat);\n        let renderProps = this.createRenderProps(props.date, props.time, !props.isLabeled, props.isNarrow, props.isFirst, headerFormat, context);\n        let className = joinClassNames(props.liquidHeight && classNames.liquid, classNames.flexRow, classNames.alignStart, classNames.noMargin, classNames.noPadding, classNames.borderlessX, classNames.borderlessBottom, !props.borderTop && classNames.borderlessTop);\n        if (!props.isLabeled) {\n            return (jsx(\"div\", { className: joinClassNames(generateClassName(options.slotHeaderClass, renderProps), className), style: {\n                    height: props.height,\n                } }));\n        }\n        return (jsx(ContentContainer, { tag: \"div\", attrs: {\n                'data-time': props.isoTimeStr,\n            }, style: {\n                height: props.height,\n            }, className: className, renderProps: renderProps, generatorName: \"slotHeaderContent\", customGenerator: options.slotHeaderContent, defaultGenerator: renderInnerContent, classNameGenerator: options.slotHeaderClass, didMount: options.slotHeaderDidMount, willUnmount: options.slotHeaderWillUnmount, children: (InnerContent) => (jsx(\"div\", { ref: this.innerElRef, className: joinClassNames(classNames.noShrink, classNames.whiteSpaceNoWrap, classNames.flexRow), children: jsx(InnerContent, { tag: \"div\", className: generateClassName(options.slotHeaderInnerClass, renderProps) }) })) }));\n    }\n    componentDidMount() {\n        this._isUnmounting = false;\n        const { props } = this;\n        const innerEl = this.innerElRef.current; // TODO: make dynamic with useEffect\n        if (innerEl) { // could be null if !isLabeled\n            // TODO: only attach this if refs props present\n            // TODO: fire width/height independently?\n            this.disconnectInnerSize = watchSize(innerEl, (width, height) => {\n                if (this._isUnmounting)\n                    return;\n                setRef(props.innerWidthRef, width);\n                setRef(props.innerHeightRef, height);\n            });\n        }\n    }\n    componentWillUnmount() {\n        const { props } = this;\n        this._isUnmounting = true;\n        if (this.disconnectInnerSize) {\n            this.disconnectInnerSize();\n            setRef(props.innerWidthRef, null);\n            setRef(props.innerHeightRef, null);\n        }\n    }\n}\nfunction createRenderProps(date, time, isMinor, isNarrow, isFirst, headerFormat, context) {\n    return {\n        // this is a time-specific slot. not day-specific, so don't do today/nowRange\n        ...getDateMeta(date, context.dateEnv),\n        level: 0, // axis level (for when multiple axes)\n        text: joinDateTimeFormatParts(context.dateEnv.formatToParts(date, headerFormat)),\n        time: time,\n        isMajor: false,\n        isMinor,\n        isTime: true,\n        isNarrow,\n        hasNavLink: false,\n        isFirst,\n        view: context.viewApi,\n    };\n}\nfunction renderInnerContent(props) {\n    return props.text;\n}\n\nclass TimeGridSlatLane extends BaseComponent {\n    constructor() {\n        super(...arguments);\n        // memo\n        this.getDateMeta = memoize(getDateMeta);\n    }\n    render() {\n        let { props, context } = this;\n        let { options } = context;\n        let renderProps = {\n            // this is a time-specific slot. not day-specific, so don't do today/nowRange\n            ...this.getDateMeta(props.date, context.dateEnv),\n            time: props.time,\n            isMajor: false,\n            isMinor: !props.isLabeled,\n            view: context.viewApi,\n        };\n        return (jsx(ContentContainer, { tag: \"div\", attrs: {\n                'data-time': props.isoTimeStr,\n            }, className: joinClassNames(classNames.noMargin, classNames.noPadding, classNames.liquid, classNames.borderlessX, classNames.borderlessBottom, !props.borderTop && classNames.borderlessTop), renderProps: renderProps, generatorName: undefined, classNameGenerator: options.slotLaneClass, didMount: options.slotLaneDidMount, willUnmount: options.slotLaneWillUnmount }));\n    }\n}\n\nconst DEFAULT_WEEK_NUM_FORMAT = createFormatter({ week: 'short' });\nclass TimeGridWeekNumber extends BaseComponent {\n    constructor() {\n        super(...arguments);\n        // ref\n        this.innerElRef = createRef();\n    }\n    render() {\n        let { props, context } = this;\n        let { options, dateEnv } = context;\n        let range = props.dateProfile.renderRange;\n        let dayCnt = diffDays(range.start, range.end);\n        // HACK: only make week-number a nav-link when NOT in week-view\n        let hasNavLink = dayCnt === 1 && options.navLinks;\n        let weekDateMarker = range.start;\n        let fullDateStr = buildDateStr(context, weekDateMarker, 'week');\n        let weekNum = dateEnv.computeWeekNumber(weekDateMarker);\n        let weekTextParts = dateEnv.formatToParts(weekDateMarker, options.weekNumberFormat || DEFAULT_WEEK_NUM_FORMAT);\n        let weekText = joinDateTimeFormatParts(weekTextParts);\n        let weekDateZoned = dateEnv.toDate(weekDateMarker);\n        const weekNumberRenderProps = {\n            num: weekNum,\n            text: weekText,\n            textParts: weekTextParts,\n            date: weekDateZoned,\n            isNarrow: props.isNarrow,\n            hasNavLink,\n            options: { dayMinWidth: options.dayMinWidth },\n        };\n        return (jsx(ContentContainer, { tag: 'div', attrs: {\n                role: 'columnheader',\n            }, className: joinClassNames(classNames.flexRow, classNames.noMargin, classNames.noPadding, props.isLiquid ? classNames.liquid : classNames.contentBox), style: {\n                width: props.width,\n            }, renderProps: weekNumberRenderProps, generatorName: \"weekNumberHeaderContent\", customGenerator: options.weekNumberHeaderContent, defaultGenerator: renderText, classNameGenerator: options.weekNumberHeaderClass, didMount: options.weekNumberHeaderDidMount, willUnmount: options.weekNumberHeaderWillUnmount, children: (InnerContent) => (jsxs(Fragment, { children: [!hasNavLink && ( // navlink is already labeled\n                    jsx(\"div\", { className: classNames.srOnly, children: fullDateStr })), jsx(\"div\", { \"aria-hidden\": hasNavLink ? undefined : true, ref: this.innerElRef, className: joinClassNames(classNames.flexRow, classNames.noShrink, classNames.whiteSpaceNoWrap), children: jsx(InnerContent, { tag: 'div', attrs: hasNavLink\n                                ? buildNavLinkAttrs(context, range.start, 'week', fullDateStr, \n                                /* isTabbable = */ true, \n                                /* omitHint = */ true)\n                                : undefined, className: generateClassName(options.weekNumberHeaderInnerClass, weekNumberRenderProps) }) })] })) }));\n    }\n    componentDidMount() {\n        this._isUnmounting = false;\n        const { props } = this;\n        const innerEl = this.innerElRef.current; // TODO: make dynamic with useEffect\n        // TODO: only attach this if refs props present\n        // TODO: handle width/height independently?\n        this.disconnectInnerSize = watchSize(innerEl, (width, height) => {\n            if (this._isUnmounting)\n                return;\n            setRef(props.innerWidthRef, width);\n            setRef(props.innerHeightRef, height);\n        });\n    }\n    componentWillUnmount() {\n        const { props } = this;\n        this._isUnmounting = true;\n        this.disconnectInnerSize();\n        setRef(props.innerWidthRef, null);\n        setRef(props.innerHeightRef, null);\n    }\n}\n\nfunction TimeGridAxisEmpty(props) {\n    return (jsx(\"div\", { role: 'cell' // is empty so can't be rowheader/columnheader\n        , className: props.isLiquid ? classNames.liquid : classNames.contentBox, style: { width: props.width } }));\n}\n\nclass TimeGridLayoutPannable extends BaseComponent {\n    constructor() {\n        super(...arguments);\n        this.state = {\n            headerTierHeights: [],\n        };\n        // refs\n        this.headerLabelInnerWidthRefMap = new RefMap(() => {\n            afterSize(this.handleAxisWidths);\n        });\n        this.headerLabelInnerHeightRefMap = new RefMap(() => {\n            afterSize(this.handleHeaderHeights);\n        });\n        this.headerMainInnerHeightRefMap = new RefMap(() => {\n            afterSize(this.handleHeaderHeights);\n        });\n        this.handleAllDayLabelInnerWidth = (width) => {\n            this.allDayLabelInnerWidth = width;\n            afterSize(this.handleAxisWidths);\n        };\n        this.slatLabelInnerWidthRefMap = new RefMap(() => {\n            afterSize(this.handleAxisWidths);\n        });\n        this.slatLabelInnerHeightRefMap = new RefMap(() => {\n            afterSize(this.handleSlatInnerHeights);\n        });\n        this.headerScrollerRef = createRef();\n        this.allDayScrollerRef = createRef();\n        this.mainScrollerRef = createRef();\n        this.footScrollerRef = createRef();\n        this.axisScrollerRef = createRef();\n        // Sizing\n        // -----------------------------------------------------------------------------------------------\n        this.handleTotalWidth = (totalWidth) => {\n            if (this._isUnmounting)\n                return;\n            this.setState({ totalWidth });\n        };\n        this.handleBodyHeight = (bodyHeight) => {\n            if (this._isUnmounting)\n                return;\n            this.setState({ bodyHeight });\n        };\n        this.handleClientWidth = (clientWidth) => {\n            if (this._isUnmounting)\n                return;\n            this.setState({ clientWidth });\n        };\n        this.handleClientHeight = (clientHeight) => {\n            if (this._isUnmounting)\n                return;\n            this.setState({ clientHeight });\n        };\n        this.handleStickyBottomScrollbarWidth = (sticykBottomScrollbarWidth) => {\n            if (this._isUnmounting)\n                return;\n            this.setState({ sticykBottomScrollbarWidth });\n        };\n        this.handleHeaderHeights = () => {\n            if (this._isUnmounting)\n                return;\n            const headerLabelInnerHeightMap = this.headerLabelInnerHeightRefMap.current;\n            const headerMainInnerHeightMap = this.headerMainInnerHeightRefMap.current;\n            const heights = [];\n            // important to loop using 'main' because 'label' might not be tracking height if empty\n            for (const [tierNum, mainHeight] of headerMainInnerHeightMap.entries()) {\n                heights[tierNum] = Math.max(headerLabelInnerHeightMap.get(tierNum) || 0, mainHeight);\n            }\n            this.setState({ headerTierHeights: heights });\n        };\n        this.handleSlatInnerHeights = () => {\n            if (this._isUnmounting)\n                return;\n            const slatLabelInnerHeightMap = this.slatLabelInnerHeightRefMap.current;\n            let max = 0;\n            for (const slatLabelInnerHeight of slatLabelInnerHeightMap.values()) {\n                max = Math.max(max, slatLabelInnerHeight);\n            }\n            if (this.state.slatInnerHeight !== max) {\n                this.setState({ slatInnerHeight: max });\n            }\n        };\n        this.handleAxisWidths = () => {\n            if (this._isUnmounting)\n                return;\n            const headerLabelInnerWidthMap = this.headerLabelInnerWidthRefMap.current;\n            const slatLabelInnerWidthMap = this.slatLabelInnerWidthRefMap.current;\n            let max = this.allDayLabelInnerWidth || 0; // guard against all-day slot hidden\n            for (const headerLabelInnerWidth of headerLabelInnerWidthMap.values()) {\n                max = Math.max(max, headerLabelInnerWidth);\n            }\n            for (const slatLableInnerWidth of slatLabelInnerWidthMap.values()) {\n                max = Math.max(max, slatLableInnerWidth);\n            }\n            if (this.state.axisWidth !== max) {\n                this.setState({ axisWidth: max });\n            }\n        };\n    }\n    render() {\n        const { props, state, context, headerLabelInnerWidthRefMap, headerLabelInnerHeightRefMap, headerMainInnerHeightRefMap, slatLabelInnerWidthRefMap, slatLabelInnerHeightRefMap, } = this;\n        const { nowDate, headerTiers, forPrint } = props;\n        const nowIndicatorDayDate = (!forPrint && context.options.nowIndicator)\n            ? computeNowIndicatorDayDate(nowDate, props.nowIndicatorSegsByCol, props.cells)\n            : undefined;\n        const { axisWidth, totalWidth, clientWidth, clientHeight, bodyHeight, sticykBottomScrollbarWidth } = state;\n        const { options } = context;\n        const { borderlessX, borderlessTop, borderlessBottom } = computeViewBorderless(options);\n        const endScrollbarWidth = (totalWidth != null && clientWidth != null && axisWidth != null)\n            ? totalWidth - clientWidth - (axisWidth + 1) // +1 for hardcoded divider!\n            : undefined;\n        const verticalScrolling = !forPrint && !getIsHeightAuto(options);\n        const tableHeaderSticky = !forPrint && getTableHeaderSticky(options);\n        const footerScrollbarSticky = !forPrint && getFooterScrollbarSticky(options);\n        const printStackEnabled = computeTimeGridPrintMode(forPrint, options.eventPrintLayout) === 'stack';\n        const absPrint = forPrint && !printStackEnabled;\n        const simplePrint = forPrint && printStackEnabled;\n        const colCount = props.cells.length;\n        const [canvasWidth, appliedColWidth] = computeColWidth(colCount, props.dayMinWidth, clientWidth);\n        const measuredColWidth = appliedColWidth ?? (clientWidth != null ? clientWidth / colCount : undefined);\n        const cellIsMicro = measuredColWidth != null && measuredColWidth <= dayMicroWidth;\n        const cellIsNarrow = cellIsMicro || (measuredColWidth != null && measuredColWidth <= options.dayNarrowWidth);\n        const slatCnt = props.slatMetas.length;\n        const [slatHeight, slatLiquidHeight] = computeSlatHeight(// TODO: memo?\n        verticalScrolling && options.expandRows, slatCnt, options.slotMinHeight, state.slatInnerHeight, clientHeight);\n        this.slatHeight = slatHeight;\n        // TODO: have computeSlatHeight return?\n        const totalSlatHeight = (slatHeight || 0) * slatCnt;\n        const forcedBodyHeight = absPrint ? totalSlatHeight : undefined;\n        const rowsNotExpanding = verticalScrolling && !options.expandRows &&\n            clientHeight != null && clientHeight > totalSlatHeight;\n        const firstBodyRowIndex = options.dayHeaders ? headerTiers.length + 1 : 1;\n        const bottomScrollbarWidth = footerScrollbarSticky\n            ? sticykBottomScrollbarWidth\n            : (bodyHeight != null && clientHeight != null)\n                ? (bodyHeight - clientHeight)\n                : undefined;\n        return (jsxs(Fragment, { children: [options.dayHeaders && (jsxs(\"div\", { className: joinClassNames(generateClassName(options.tableHeaderClass, {\n                        isSticky: tableHeaderSticky,\n                        borderlessX,\n                        borderlessTop,\n                        borderlessBottom,\n                        multiMonthColumns: 0,\n                    }), \n                    // See the note in TimeGridLayout about why print doesn't use repeating headers.\n                    classNames.flexCol, tableHeaderSticky && classNames.tableHeaderSticky, classNames.z1), children: [jsxs(\"div\", { className: classNames.flexRow, children: [jsx(\"div\", { role: 'rowgroup', className: classNames.contentBox, style: { width: axisWidth }, children: headerTiers.map((rowConfig, tierNum) => (jsx(\"div\", { role: 'row', \"aria-rowindex\": tierNum + 1, className: joinClassNames(options.dayHeaderRowClass, classNames.flexRow, classNames.contentBox, classNames.borderlessX, classNames.borderlessTop, tierNum === props.headerTiers.length - 1 && classNames.borderlessBottom), style: {\n                                            height: state.headerTierHeights[tierNum]\n                                        }, children: (options.weekNumbers && rowConfig.isDateRow) ? (jsx(TimeGridWeekNumber, { dateProfile: props.dateProfile, innerWidthRef: headerLabelInnerWidthRefMap.createRef(tierNum), innerHeightRef: headerLabelInnerHeightRefMap.createRef(tierNum), width: undefined, isLiquid: true, isNarrow: cellIsNarrow })) : (jsx(TimeGridAxisEmpty, { width: undefined, isLiquid: true })) }, tierNum))) }), jsx(\"div\", { className: generateClassName(options.slotHeaderDividerClass, {\n                                        inTableHeader: true,\n                                        options: { dayMinWidth: options.dayMinWidth },\n                                    }) }), jsxs(Scroller, { horizontal: true, hideScrollbars: true, className: joinClassNames(classNames.flexRow, classNames.liquid), ref: this.headerScrollerRef, children: [jsx(\"div\", { role: 'rowgroup', className: canvasWidth == null ? classNames.liquid : '', style: { width: canvasWidth }, children: props.headerTiers.map((rowConfig, tierNum) => (createElement(DayGridHeaderRow, { ...rowConfig, key: tierNum, role: 'row', rowIndex: tierNum, borderBottom: tierNum < props.headerTiers.length - 1, height: state.headerTierHeights[tierNum], colWidth: appliedColWidth, viewportWidth: clientWidth, innerHeightRef: headerMainInnerHeightRefMap.createRef(tierNum), cellIsNarrow: cellIsNarrow, cellIsMicro: cellIsMicro, rowLevel: props.headerTiers.length - tierNum - 1 }))) }), Boolean(endScrollbarWidth) && (jsx(\"div\", { className: joinClassNames(generateClassName(options.fillerClass, { inTableHeader: true }), classNames.borderlessY, classNames.borderlessEnd), style: { minWidth: endScrollbarWidth } }))] })] }), jsx(\"div\", { className: generateClassName(options.dayHeaderDividerClass, {\n                                isSticky: tableHeaderSticky,\n                                multiMonthColumns: 0,\n                                options: { allDaySlot: Boolean(options.allDaySlot) },\n                            }) })] })), jsxs(\"div\", { role: 'rowgroup', className: joinClassNames(generateClassName(options.tableBodyClass, {\n                        borderlessX,\n                        borderlessTop,\n                        borderlessBottom,\n                        multiMonthColumns: 0,\n                    }), classNames.flexCol, verticalScrolling && classNames.liquid, classNames.isolate, classNames.z0), children: [options.allDaySlot && (jsxs(Fragment, { children: [jsxs(\"div\", { role: 'row', \"aria-rowindex\": firstBodyRowIndex, className: joinClassNames(classNames.flexRow, classNames.z1), children: [jsx(TimeGridAllDayHeader, { width: axisWidth, innerWidthRef: this.handleAllDayLabelInnerWidth, isNarrow: cellIsNarrow }), jsx(\"div\", { className: generateClassName(options.slotHeaderDividerClass, {\n                                                inTableHeader: false,\n                                                options: { dayMinWidth: options.dayMinWidth },\n                                            }) }), jsxs(Scroller, { horizontal: true, hideScrollbars: true, \n                                            // fill remaining width\n                                            className: joinClassNames(classNames.flexRow, classNames.liquidX), ref: this.allDayScrollerRef, children: [jsx(\"div\", { className: classNames.flexRow, style: { width: canvasWidth }, children: jsx(TimeGridAllDayLane, { dateProfile: props.dateProfile, todayRange: props.todayRange, cells: props.cells, showDayNumbers: false, forPrint: forPrint, isHitComboAllowed: props.isHitComboAllowed, className: joinClassNames(classNames.borderless, classNames.liquidX), cellIsNarrow: cellIsNarrow, cellIsMicro: cellIsMicro, \n                                                        // content\n                                                        fgEventSegs: props.fgEventSegs, bgEventSegs: props.bgEventSegs, businessHourSegs: props.businessHourSegs, dateSelectionSegs: props.dateSelectionSegs, eventSelection: props.eventSelection, eventDrag: props.eventDrag, eventResize: props.eventResize, dayMaxEvents: props.dayMaxEvents, dayMaxEventRows: props.dayMaxEventRows, \n                                                        // dimensions\n                                                        colWidth: appliedColWidth }) }), Boolean(endScrollbarWidth) && (jsx(\"div\", { className: joinClassNames(generateClassName(options.fillerClass, { inTableHeader: false }), classNames.borderlessY, classNames.borderlessEnd), style: { minWidth: endScrollbarWidth } }))] })] }), jsx(\"div\", { className: joinClassNames(options.allDayDividerClass, classNames.z2) })] })), jsxs(\"div\", { role: 'row', \"aria-rowindex\": firstBodyRowIndex + (options.allDaySlot ? 1 : 0), className: joinClassNames(classNames.flexRow, classNames.rel, // for Ruler.fillStart\n                            verticalScrolling && classNames.liquid, classNames.z0), children: [jsx(Scroller, { vertical: verticalScrolling, hideScrollbars: true, className: joinClassNames(classNames.flexCol, classNames.contentBox), style: {\n                                        width: axisWidth,\n                                    }, ref: this.axisScrollerRef, clientHeightRef: this.handleBodyHeight, children: !simplePrint && (jsx(Fragment, { children: jsxs(\"div\", { role: 'rowheader', className: joinClassNames(classNames.flexCol, classNames.grow, classNames.rel), style: {\n                                                height: forcedBodyHeight,\n                                            }, children: [jsx(\"div\", { className: classNames.srOnly, children: options.timedText }), jsx(\"div\", { \"aria-hidden\": true, className: joinClassNames(classNames.flexCol, (verticalScrolling && options.expandRows) && classNames.grow, absPrint && classNames.fillX), children: props.slatMetas.map((slatMeta, slatI) => (createElement(TimeGridSlatHeader, { ...slatMeta /* FYI doesn't need isoTimeStr */, key: slatMeta.key, innerWidthRef: slatLabelInnerWidthRefMap.createRef(slatMeta.key), innerHeightRef: slatLabelInnerHeightRefMap.createRef(slatMeta.key), borderTop: Boolean(slatI), isNarrow: cellIsNarrow, height: slatLiquidHeight ? undefined : slatHeight, liquidHeight: slatLiquidHeight }))) }), nowIndicatorDayDate && (jsx(TimeGridNowIndicatorArrow, { nowDate: nowDate, dayDate: nowIndicatorDayDate, dateProfile: props.dateProfile, totalHeight: slatHeight != null ? slatHeight * slatCnt : undefined })), Boolean(rowsNotExpanding || bottomScrollbarWidth) && (jsx(\"div\", { className: joinClassNames(generateClassName(options.fillerClass, { inTableHeader: false }), classNames.borderlessX, classNames.borderlessBottom, rowsNotExpanding && classNames.liquid), style: {\n                                                        minHeight: bottomScrollbarWidth\n                                                    } }))] }) })) }), jsx(\"div\", { className: generateClassName(options.slotHeaderDividerClass, {\n                                        inTableHeader: false,\n                                        options: { dayMinWidth: options.dayMinWidth },\n                                    }) }), jsxs(\"div\", { \n                                    // we need this div because it's bad for Scroller to have left/right borders,\n                                    // AND because we need to containt the FooterScrollbar\n                                    className: joinClassNames(classNames.flexCol, classNames.liquid), children: [jsx(Scroller, { vertical: verticalScrolling, horizontal: true, hideScrollbars: footerScrollbarSticky || // also means height:auto, so won't need vertical scrollbars anyway\n                                                forPrint, className: joinClassNames(classNames.flexCol, classNames.rel, // for Ruler.fillStart\n                                            verticalScrolling && classNames.liquid), ref: this.mainScrollerRef, clientWidthRef: this.handleClientWidth, clientHeightRef: this.handleClientHeight, children: jsxs(\"div\", { className: joinClassNames(classNames.flexCol, classNames.grow, classNames.rel), style: {\n                                                    width: canvasWidth,\n                                                    height: forcedBodyHeight,\n                                                }, children: [jsx(TimeGridCols, { dateProfile: props.dateProfile, nowDate: props.nowDate, nowMs: props.nowMs, todayRange: props.todayRange, cells: props.cells, slatCnt: slatCnt, forPrint: forPrint, isHitComboAllowed: props.isHitComboAllowed, className: simplePrint ? '' : classNames.fill, \n                                                        // content\n                                                        fgEventSegsByCol: props.fgEventSegsByCol, bgEventSegsByCol: props.bgEventSegsByCol, businessHourSegsByCol: props.businessHourSegsByCol, nowIndicatorSegsByCol: props.nowIndicatorSegsByCol, dateSelectionSegsByCol: props.dateSelectionSegsByCol, eventDragByCol: props.eventDragByCol, eventResizeByCol: props.eventResizeByCol, eventSelection: props.eventSelection, \n                                                        // dimensions\n                                                        colWidth: appliedColWidth, slatHeight: slatHeight, cellIsNarrow: cellIsNarrow, cellIsMicro: cellIsMicro }), !simplePrint && (jsxs(Fragment, { children: [jsx(\"div\", { \"aria-hidden\": true, className: joinClassNames(classNames.flexCol, (verticalScrolling && options.expandRows) && classNames.grow, absPrint ? classNames.fillX : classNames.rel), children: props.slatMetas.map((slatMeta, slatI) => (jsx(\"div\", { className: joinClassNames(classNames.flexRow, slatLiquidHeight && classNames.liquid), style: {\n                                                                        height: slatLiquidHeight ? '' : slatHeight\n                                                                    }, children: createElement(TimeGridSlatLane, { ...slatMeta /* FYI doesn't need isoTimeStr */, key: slatMeta.key, borderTop: Boolean(slatI) }) }, slatMeta.key))) }), rowsNotExpanding && (jsx(\"div\", { className: joinClassNames(generateClassName(options.fillerClass, { inTableHeader: false }), classNames.borderlessX, classNames.borderlessBottom, classNames.liquid) }))] }))] }) }), Boolean(footerScrollbarSticky) && (jsx(FooterScrollbar, { isSticky: true, canvasWidth: canvasWidth, scrollerRef: this.footScrollerRef, scrollbarWidthRef: this.handleStickyBottomScrollbarWidth }))] })] })] }), jsx(Ruler, { widthRef: this.handleTotalWidth })] }));\n    }\n    // Lifecycle\n    // -----------------------------------------------------------------------------------------------\n    componentDidMount() {\n        this._isUnmounting = false;\n        this.initScrollers();\n        this.updateSlatHeight();\n    }\n    componentDidUpdate() {\n        this.updateScrollers();\n        this.updateSlatHeight();\n    }\n    componentWillUnmount() {\n        this._isUnmounting = true;\n        this.destroyScrollers();\n        this.prevSlatHeight = undefined;\n        setRef(this.props.slatHeightRef, null);\n    }\n    updateSlatHeight() {\n        if (this.prevSlatHeight !== this.slatHeight) {\n            setRef(this.props.slatHeightRef, this.prevSlatHeight = this.slatHeight);\n        }\n    }\n    // Scrolling\n    // -----------------------------------------------------------------------------------------------\n    initScrollers() {\n        const ScrollerSyncer = getScrollerSyncerClass(this.context.pluginHooks);\n        this.dayScroller = new ScrollerSyncer(true); // horizontal=true\n        this.timeScroller = new ScrollerSyncer(); // horizontal=false\n        setRef(this.props.dayScrollerRef, this.dayScroller);\n        setRef(this.props.timeScrollerRef, this.timeScroller);\n        this.updateScrollers();\n    }\n    updateScrollers() {\n        this.dayScroller.handleChildren([\n            this.headerScrollerRef.current,\n            this.allDayScrollerRef.current,\n            this.mainScrollerRef.current,\n            this.footScrollerRef.current,\n        ]);\n        this.timeScroller.handleChildren([\n            this.axisScrollerRef.current,\n            this.mainScrollerRef.current,\n        ]);\n    }\n    destroyScrollers() {\n        setRef(this.props.dayScrollerRef, null);\n        setRef(this.props.timeScrollerRef, null);\n    }\n}\nTimeGridLayoutPannable.addPropsEquality({\n    headerTierHeights: isArraysEqual,\n});\n\nclass TimeGridLayoutNormal extends BaseComponent {\n    constructor() {\n        super(...arguments);\n        this.state = {};\n        // refs\n        this.headerLabelInnerWidthRefMap = new RefMap(() => {\n            afterSize(this.handleAxisInnerWidths);\n        });\n        this.handleAllDayLabelInnerWidth = (width) => {\n            this.allDayLabelInnerWidth = width;\n            afterSize(this.handleAxisInnerWidths);\n        };\n        this.handleWeekNumberInnerWidth = (width) => {\n            this.weekNumberInnerWidth = width;\n            afterSize(this.handleAxisInnerWidths);\n        };\n        this.slatLabelInnerWidthRefMap = new RefMap(() => {\n            afterSize(this.handleAxisInnerWidths);\n        });\n        this.slatLabelInnerHeightRefMap = new RefMap(() => {\n            afterSize(this.handleSlatInnerHeights);\n        });\n        // Sizing\n        // -----------------------------------------------------------------------------------------------\n        this.handleTotalWidth = (totalWidth) => {\n            if (this._isUnmounting)\n                return;\n            // Must delay the rerender because might change the width of the all-day DayGridRow events,\n            // which shows a ResizeObserver loop warning\n            requestAnimationFrame(() => {\n                if (this._isUnmounting)\n                    return;\n                this.setState({ totalWidth });\n            });\n        };\n        this.handleClientWidth = (clientWidth) => {\n            if (this._isUnmounting)\n                return;\n            this.setState({ clientWidth });\n        };\n        this.handleClientHeight = (clientHeight) => {\n            if (this._isUnmounting)\n                return;\n            this.setState({ clientHeight });\n        };\n        this.handleAxisInnerWidths = () => {\n            if (this._isUnmounting)\n                return;\n            const headerLabelInnerWidthMap = this.headerLabelInnerWidthRefMap.current;\n            const slatLabelInnerWidthMap = this.slatLabelInnerWidthRefMap.current;\n            let max = Math.max(this.weekNumberInnerWidth || 0, // might not exist\n            this.allDayLabelInnerWidth || 0 // guard against all-day slot hidden\n            );\n            for (const headerLabelInnerWidth of headerLabelInnerWidthMap.values()) {\n                max = Math.max(max, headerLabelInnerWidth);\n            }\n            for (const slatLabelInnerWidth of slatLabelInnerWidthMap.values()) {\n                max = Math.max(max, slatLabelInnerWidth);\n            }\n            if (this.state.axisWidth !== max) {\n                this.setState({ axisWidth: max });\n            }\n        };\n        this.handleSlatInnerHeights = () => {\n            if (this._isUnmounting)\n                return;\n            const slatLabelInnerHeightMap = this.slatLabelInnerHeightRefMap.current;\n            let max = 0;\n            for (const slatLabelInnerHeight of slatLabelInnerHeightMap.values()) {\n                max = Math.max(max, slatLabelInnerHeight);\n            }\n            if (this.state.slatInnerHeight !== max) {\n                this.setState({ slatInnerHeight: max });\n            }\n        };\n    }\n    render() {\n        const { props, state, context, slatLabelInnerWidthRefMap, slatLabelInnerHeightRefMap, headerLabelInnerWidthRefMap } = this;\n        const { nowDate, forPrint } = props;\n        const nowIndicatorDayDate = (!forPrint && context.options.nowIndicator)\n            ? computeNowIndicatorDayDate(nowDate, props.nowIndicatorSegsByCol, props.cells)\n            : undefined;\n        const { axisWidth, clientWidth, totalWidth } = state;\n        const { options } = context;\n        const { borderlessX, borderlessTop, borderlessBottom } = computeViewBorderless(options);\n        const endScrollbarWidth = (totalWidth != null && clientWidth != null && !forPrint)\n            ? totalWidth - clientWidth\n            : undefined;\n        const verticalScrolling = !forPrint && !getIsHeightAuto(options);\n        const tableHeaderSticky = !forPrint && getTableHeaderSticky(options);\n        const slatCnt = props.slatMetas.length;\n        const [slatHeight, slatLiquidHeight] = computeSlatHeight(verticalScrolling && options.expandRows, slatCnt, options.slotMinHeight, state.slatInnerHeight, state.clientHeight);\n        this.slatHeight = slatHeight;\n        // TODO: have computeSlatHeight return?\n        const totalSlatHeight = (slatHeight || 0) * slatCnt;\n        const rowsNotExpanding = verticalScrolling && !options.expandRows &&\n            state.clientHeight != null && state.clientHeight > totalSlatHeight;\n        const printStackEnabled = computeTimeGridPrintMode(forPrint, options.eventPrintLayout) === 'stack';\n        const absPrint = forPrint && !printStackEnabled;\n        const simplePrint = forPrint && printStackEnabled;\n        // for printing\n        // in Chrome, slats and columns both need abs positioning within a relative container for them\n        // to sync across pages, and the relative container needs an explicit height\n        // in Firefox, same applies, but the flex-row for the cells has trouble spanning across page,\n        // so we need to set explicit height on flex-row and all parents\n        const forcedBodyHeight = absPrint ? totalSlatHeight : undefined;\n        const colCount = props.cells.length;\n        const measuredColWidth = clientWidth != null ? clientWidth / colCount : undefined;\n        const cellIsMicro = measuredColWidth != null && measuredColWidth <= dayMicroWidth;\n        const cellIsNarrow = cellIsMicro || (measuredColWidth != null && measuredColWidth <= options.dayNarrowWidth);\n        return (jsxs(Fragment, { children: [options.dayHeaders && (jsxs(\"div\", { role: 'rowgroup', className: joinClassNames(generateClassName(options.tableHeaderClass, {\n                        isSticky: tableHeaderSticky,\n                        borderlessX,\n                        borderlessTop,\n                        borderlessBottom,\n                        multiMonthColumns: 0,\n                    }), \n                    // See the note in TimeGridLayout about why print doesn't use repeating headers.\n                    classNames.flexCol, tableHeaderSticky && classNames.tableHeaderSticky, classNames.z1), children: [props.headerTiers.map((rowConfig, tierNum) => (jsxs(\"div\", { role: 'row', className: classNames.flexRow, children: [jsx(\"div\", { className: joinClassNames(options.dayHeaderRowClass, classNames.flexRow, classNames.borderlessX, classNames.borderlessTop, tierNum === props.headerTiers.length - 1 && classNames.borderlessBottom), children: (options.weekNumbers && rowConfig.isDateRow) ? (jsx(TimeGridWeekNumber, { dateProfile: props.dateProfile, innerWidthRef: this.handleWeekNumberInnerWidth, innerHeightRef: headerLabelInnerWidthRefMap.createRef(tierNum), width: axisWidth, isLiquid: false, isNarrow: cellIsNarrow })) : (jsx(TimeGridAxisEmpty, { width: axisWidth, isLiquid: false })) }), jsx(\"div\", { className: generateClassName(options.slotHeaderDividerClass, {\n                                        inTableHeader: true,\n                                        options: { dayMinWidth: options.dayMinWidth },\n                                    }) }), jsx(DayGridHeaderRow, { ...rowConfig, className: classNames.liquid, borderBottom: tierNum < props.headerTiers.length - 1, viewportWidth: clientWidth, cellIsNarrow: cellIsNarrow, cellIsMicro: cellIsMicro, rowLevel: props.headerTiers.length - tierNum - 1 }), Boolean(endScrollbarWidth) && (jsx(\"div\", { className: joinClassNames(generateClassName(options.fillerClass, { inTableHeader: true }), classNames.borderlessY, classNames.borderlessEnd), style: { minWidth: endScrollbarWidth } }))] }, tierNum))), jsx(\"div\", { className: generateClassName(options.dayHeaderDividerClass, {\n                                isSticky: tableHeaderSticky,\n                                multiMonthColumns: 0,\n                                options: { allDaySlot: Boolean(options.allDaySlot) },\n                            }) })] })), jsxs(\"div\", { role: 'rowgroup', className: joinClassNames(generateClassName(options.tableBodyClass, {\n                        borderlessX,\n                        borderlessTop,\n                        borderlessBottom,\n                        multiMonthColumns: 0,\n                    }), classNames.flexCol, verticalScrolling && classNames.liquid, classNames.isolate, classNames.z0), children: [options.allDaySlot && (jsxs(Fragment, { children: [jsxs(\"div\", { role: 'row', className: joinClassNames(classNames.flexRow, classNames.z1), children: [jsx(TimeGridAllDayHeader, { width: axisWidth, innerWidthRef: this.handleAllDayLabelInnerWidth, isNarrow: cellIsNarrow }), jsx(\"div\", { className: generateClassName(options.slotHeaderDividerClass, {\n                                                inTableHeader: false,\n                                                options: { dayMinWidth: options.dayMinWidth },\n                                            }) }), jsx(TimeGridAllDayLane, { dateProfile: props.dateProfile, todayRange: props.todayRange, cells: props.cells, showDayNumbers: false, forPrint: forPrint, isHitComboAllowed: props.isHitComboAllowed, className: joinClassNames(classNames.liquidX, classNames.borderless), cellIsNarrow: cellIsNarrow, cellIsMicro: cellIsMicro, \n                                            // content\n                                            fgEventSegs: props.fgEventSegs, bgEventSegs: props.bgEventSegs, businessHourSegs: props.businessHourSegs, dateSelectionSegs: props.dateSelectionSegs, eventDrag: props.eventDrag, eventResize: props.eventResize, eventSelection: props.eventSelection, dayMaxEvents: props.dayMaxEvents, dayMaxEventRows: props.dayMaxEventRows }), Boolean(endScrollbarWidth) && (jsx(\"div\", { className: joinClassNames(generateClassName(options.fillerClass, { inTableHeader: false }), classNames.borderlessY, classNames.borderlessEnd), style: { minWidth: endScrollbarWidth } }))] }), jsx(\"div\", { className: joinClassNames(options.allDayDividerClass, classNames.z2) })] })), jsx(Scroller, { vertical: verticalScrolling, className: joinClassNames(classNames.flexCol, classNames.rel, // for Ruler.fillStart\n                            verticalScrolling && classNames.liquid, classNames.z0), ref: props.timeScrollerRef, clientWidthRef: this.handleClientWidth, clientHeightRef: this.handleClientHeight, children: jsxs(\"div\", { className: joinClassNames(classNames.flexCol, classNames.grow, classNames.rel), style: {\n                                    // in print mode, this div creates the height and everything is absolutely positioned within\n                                    // we need to do this so that slats positioning synces with events's positioning\n                                    // otherwise, get out of sync on second page\n                                    height: forcedBodyHeight,\n                                }, children: [jsxs(\"div\", { role: 'row', className: joinClassNames(classNames.flexRow, !simplePrint && classNames.fill), children: [jsx(\"div\", { role: 'rowheader', className: classNames.contentBox, style: { width: axisWidth }, children: jsx(\"div\", { className: classNames.srOnly, children: options.timedText }) }), jsx(\"div\", { className: generateClassName(options.slotHeaderDividerClass, {\n                                                    inTableHeader: false,\n                                                    options: { dayMinWidth: options.dayMinWidth },\n                                                }) }), jsx(TimeGridCols, { dateProfile: props.dateProfile, nowDate: props.nowDate, nowMs: props.nowMs, todayRange: props.todayRange, cells: props.cells, slatCnt: slatCnt, forPrint: forPrint, isHitComboAllowed: props.isHitComboAllowed, className: classNames.liquid, \n                                                // content\n                                                fgEventSegsByCol: props.fgEventSegsByCol, bgEventSegsByCol: props.bgEventSegsByCol, businessHourSegsByCol: props.businessHourSegsByCol, nowIndicatorSegsByCol: props.nowIndicatorSegsByCol, dateSelectionSegsByCol: props.dateSelectionSegsByCol, eventDragByCol: props.eventDragByCol, eventResizeByCol: props.eventResizeByCol, eventSelection: props.eventSelection, \n                                                // dimensions\n                                                slatHeight: slatHeight, cellIsNarrow: cellIsNarrow, cellIsMicro: cellIsMicro })] }), !simplePrint && (jsxs(Fragment, { children: [jsx(\"div\", { \"aria-hidden\": true, className: joinClassNames(classNames.flexCol, (verticalScrolling && options.expandRows) && classNames.grow, absPrint\n                                                    ? classNames.fillX // will assume top:0, height will be decided naturally\n                                                    : classNames.rel), children: props.slatMetas.map((slatMeta, slatI) => (jsxs(\"div\", { className: joinClassNames(slatLiquidHeight && classNames.liquid, classNames.flexRow), style: {\n                                                        height: slatLiquidHeight ? undefined : slatHeight\n                                                    }, children: [jsx(\"div\", { \n                                                            // the pannable version of TimeGrid has axis labels all consecutive in one column\n                                                            // simulate this for the non-pannable version\n                                                            className: classNames.flexCol, style: { width: axisWidth }, children: createElement(TimeGridSlatHeader, { ...slatMeta /* FYI doesn't need isoTimeStr */, key: slatMeta.key, innerWidthRef: slatLabelInnerWidthRefMap.createRef(slatMeta.key), innerHeightRef: slatLabelInnerHeightRefMap.createRef(slatMeta.key), borderTop: Boolean(slatI), isNarrow: cellIsNarrow }) }), jsx(\"div\", { className: generateClassName(options.slotHeaderDividerClass, {\n                                                                inTableHeader: false,\n                                                                options: { dayMinWidth: options.dayMinWidth },\n                                                            }), style: { visibility: 'hidden' } }), createElement(TimeGridSlatLane, { ...slatMeta /* FYI doesn't need isoTimeStr */, key: slatMeta.key, borderTop: Boolean(slatI) })] }, slatMeta.key))) }), rowsNotExpanding && (jsx(\"div\", { className: joinClassNames(generateClassName(options.fillerClass, { inTableHeader: false }), classNames.borderlessX, classNames.borderlessBottom, classNames.liquid) })), nowIndicatorDayDate && (jsx(TimeGridNowIndicatorArrow, { nowDate: nowDate, dayDate: nowIndicatorDayDate, dateProfile: props.dateProfile, totalHeight: slatHeight != null ? slatHeight * slatCnt : undefined }))] }))] }) })] }), jsx(Ruler, { widthRef: this.handleTotalWidth })] }));\n    }\n    // Lifecycle\n    // -----------------------------------------------------------------------------------------------\n    componentDidMount() {\n        this._isUnmounting = false;\n        this.updateSlatHeight();\n    }\n    componentDidUpdate() {\n        this.updateSlatHeight();\n    }\n    componentWillUnmount() {\n        this._isUnmounting = true;\n        this.prevSlatHeight = undefined;\n        setRef(this.props.slatHeightRef, null);\n    }\n    updateSlatHeight() {\n        if (this.prevSlatHeight !== this.slatHeight) {\n            setRef(this.props.slatHeightRef, this.prevSlatHeight = this.slatHeight);\n        }\n    }\n}\n\nfunction buildEmptySegCols(segsByCol) {\n    return segsByCol.map(() => []);\n}\nfunction buildEmptyInteractionCols(interactionsByCol) {\n    return interactionsByCol.map(() => null);\n}\nclass TimeGridLayout extends BaseComponent {\n    constructor() {\n        super(...arguments);\n        // memo\n        this.buildSlatMetas = memoize(buildSlatMetas);\n        // refs\n        this.dayScrollerRef = createRef();\n        this.timeScrollerRef = createRef();\n        this.scrollState = {}; // updated in-place\n        // Sizing\n        // -----------------------------------------------------------------------------------------------\n        this.handleSlatHeight = (slatHeight) => {\n            if (this._isUnmounting)\n                return;\n            this.slatHeight = slatHeight;\n            if (slatHeight != null) {\n                afterSize(this.applyTimeScroll);\n            }\n        };\n        this.handleTimeScrollRequest = (scrollTime) => {\n            this.scrollState.time = scrollTime;\n            this.scrollState.y = undefined;\n            this.applyTimeScroll();\n        };\n        /*\n        Captures current values\n        */\n        this.handleTimeScrollEnd = (isDevice) => {\n            if (isDevice) {\n                const y = this.timeScrollerRef.current.y;\n                // record, but only if not forPrint, which could give bogus values in the case of\n                // TimeGridLayoutPannable, which kills y-scrolling, but retains x-scrolling,\n                // which reports as a 0 y-scroll.\n                if (!this.props.forPrint) {\n                    this.scrollState.y = y;\n                    this.scrollState.time = undefined;\n                }\n            }\n        };\n        this.applyTimeScroll = () => {\n            const timeScroller = this.timeScrollerRef.current;\n            const { slatHeight, scrollState } = this;\n            let { y, time } = scrollState;\n            if (y == null &&\n                time &&\n                slatHeight != null &&\n                // Since applyTimeScroll is called by handleSlatHeight, could be called with null during cleanup,\n                // and the timeScroller might not exist\n                timeScroller) {\n                y = computeTimeTopFrac(time, this.props.dateProfile)\n                    * (slatHeight * this.currentSlatCnt);\n                if (y) {\n                    y++; // overcome top border\n                }\n                scrollState.y = y; // HACK: store raw pixel value\n            }\n            if (y != null) {\n                timeScroller.scrollTo({ y });\n            }\n        };\n    }\n    render() {\n        const { props, context } = this;\n        const { dateProfile } = props;\n        const { options, dateEnv } = context;\n        const { dayMinWidth } = options;\n        const { borderlessX, borderlessTop, borderlessBottom } = computeViewBorderless(options);\n        const slatMetas = this.buildSlatMetas(dateProfile.slotMinTime, dateProfile.slotMaxTime, options.slotHeaderInterval, options.slotDuration, dateEnv);\n        this.currentSlatCnt = slatMetas.length;\n        const dateSelectionSegs = props.forPrint ? [] : props.dateSelectionSegs;\n        const eventDrag = props.forPrint ? null : props.eventDrag;\n        const eventResize = props.forPrint ? null : props.eventResize;\n        const dateSelectionSegsByCol = props.forPrint ? buildEmptySegCols(props.dateSelectionSegsByCol) : props.dateSelectionSegsByCol;\n        const eventDragByCol = props.forPrint ? buildEmptyInteractionCols(props.eventDragByCol) : props.eventDragByCol;\n        const eventResizeByCol = props.forPrint ? buildEmptyInteractionCols(props.eventResizeByCol) : props.eventResizeByCol;\n        const commonLayoutProps = {\n            dateProfile: dateProfile,\n            nowDate: props.nowDate,\n            nowMs: props.nowMs,\n            todayRange: props.todayRange,\n            cells: props.cells,\n            slatMetas,\n            forPrint: props.forPrint,\n            isHitComboAllowed: props.isHitComboAllowed,\n            // header content\n            headerTiers: props.headerTiers,\n            // all-day content\n            fgEventSegs: props.fgEventSegs,\n            bgEventSegs: props.bgEventSegs,\n            businessHourSegs: props.businessHourSegs,\n            dateSelectionSegs,\n            eventDrag,\n            eventResize,\n            ...getAllDayMaxEventProps(options),\n            // timed content\n            fgEventSegsByCol: props.fgEventSegsByCol,\n            bgEventSegsByCol: props.bgEventSegsByCol,\n            businessHourSegsByCol: props.businessHourSegsByCol,\n            nowIndicatorSegsByCol: props.nowIndicatorSegsByCol,\n            dateSelectionSegsByCol,\n            eventDragByCol,\n            eventResizeByCol,\n            // universal content\n            eventSelection: props.eventSelection,\n            // refs\n            timeScrollerRef: this.timeScrollerRef,\n            timeScrollState: this.scrollState,\n            slatHeightRef: this.handleSlatHeight,\n            borderlessX,\n            borderlessBottom,\n        };\n        return (jsx(ViewContainer, { attrs: {\n                role: 'table',\n                'aria-colcount': props.cells.length,\n                'aria-labelledby': props.labelId,\n                'aria-label': props.labelStr,\n            }, className: joinClassNames(props.className, generateClassName(options.tableClass, {\n                borderlessX,\n                borderlessTop,\n                borderlessBottom,\n                multiMonthColumns: 0,\n            }), \n            // We don't use the repeating-header print treatment here because it works poorly:\n            // - Firefox >85ish CAN have flexboxes within it, but those cannot do absolute positioning\n            // - Chrome works okay, but abs-positioned events cover the repeated header\n            //   Also, there's weird padding on the last page at bottom of container, which matches\n            //   the height of the repeated header\n            // - Safari was never able to do repeated headers in the first place\n            !props.forPrint && classNames.flexCol, classNames.isolate), viewSpec: context.viewSpec, children: dayMinWidth ? (jsx(TimeGridLayoutPannable, { ...commonLayoutProps, dayMinWidth: dayMinWidth, dayScrollerRef: this.dayScrollerRef })) : (jsx(TimeGridLayoutNormal, { ...commonLayoutProps })) }));\n    }\n    // Lifecycle\n    // -----------------------------------------------------------------------------------------------\n    componentDidMount() {\n        this._isUnmounting = false;\n        this.resetScroll();\n        this.context.emitter.on('_timeScrollRequest', this.handleTimeScrollRequest);\n        const timeScroller = this.timeScrollerRef.current;\n        if (timeScroller) {\n            timeScroller.addScrollEndListener(this.handleTimeScrollEnd);\n        }\n    }\n    componentDidUpdate(prevProps) {\n        if (prevProps.dateProfile !== this.props.dateProfile && this.context.options.scrollTimeReset) {\n            this.resetScroll();\n        }\n        else if (prevProps.forPrint && !this.props.forPrint) {\n            // returning from print\n            // reapply scrolling because scroll-divs were probably restored\n            this.applyTimeScroll();\n        }\n    }\n    componentWillUnmount() {\n        this._isUnmounting = true;\n        this.context.emitter.off('_timeScrollRequest', this.handleTimeScrollRequest);\n        const timeScroller = this.timeScrollerRef.current;\n        if (timeScroller) {\n            timeScroller.removeScrollEndListener(this.handleTimeScrollEnd);\n        }\n    }\n    // Scrolling\n    // -----------------------------------------------------------------------------------------------\n    resetScroll() {\n        this.handleTimeScrollRequest(this.context.options.scrollTime);\n        // also resets day scroll\n        const dayScroller = this.dayScrollerRef.current;\n        if (dayScroller) {\n            dayScroller.scrollTo({ x: 0 });\n        }\n    }\n}\n// Utils\n// -----------------------------------------------------------------------------------------------\nconst AUTO_ALL_DAY_MAX_EVENT_ROWS = 5;\nfunction getAllDayMaxEventProps(options) {\n    let { dayMaxEvents, dayMaxEventRows } = options;\n    if (dayMaxEvents === true || dayMaxEventRows === true) { // is auto?\n        dayMaxEvents = undefined;\n        dayMaxEventRows = AUTO_ALL_DAY_MAX_EVENT_ROWS; // make sure \"auto\" goes to a real number\n    }\n    return { dayMaxEvents, dayMaxEventRows };\n}\n\nexport { AllDaySplitter as A, DayTimeColsSlicer as D, NowIndicatorDot as N, Splitter as S, TimeGridLayout as T, NowIndicatorHeaderContainer as a, buildDayColsFromSeries as b, NowIndicatorLineContainer as c, buildDayCols as d, computeTimeGridPrintMode as e, organizeSegsByCol as o, splitInteractionByCol as s };\n","import { d as dayGridPlugin } from './7367f8ae.js';\nimport { jsx } from 'preact/jsx-runtime';\nimport { e as DateComponent, m as memoize, d as NowTimer } from './2f45deb4.js';\nimport { c as createDayHeaderFormatter, d as DaySeriesModel, a as buildDateRowConfigs, e as DaySeriesSlicer } from './20c8a1fa.js';\nimport { b as buildDayColsFromSeries, o as organizeSegsByCol, s as splitInteractionByCol, A as AllDaySplitter, D as DayTimeColsSlicer, T as TimeGridLayout } from './08b6f884.js';\n\nclass TimeGridView extends DateComponent {\n    constructor() {\n        super(...arguments);\n        // memo\n        this.createDayHeaderFormatter = memoize(createDayHeaderFormatter);\n        this.buildDaySeries = memoize((dateProfile, dateProfileGenerator) => (new DaySeriesModel(dateProfile.renderRange, dateProfileGenerator)));\n        this.buildDayCols = memoize(buildDayColsFromSeries);\n        this.extractColDates = memoize((cols) => cols.map((col) => col.date));\n        this.extractColRanges = memoize((cols) => cols.map((col) => col.range));\n        this.buildDateRowConfigs = memoize(buildDateRowConfigs);\n        this.splitFgEventSegs = memoize((organizeSegsByCol));\n        this.splitBgEventSegs = memoize((organizeSegsByCol));\n        this.splitBusinessHourSegs = memoize((organizeSegsByCol));\n        this.splitNowIndicatorSegs = memoize((organizeSegsByCol));\n        this.splitDateSelectionSegs = memoize((organizeSegsByCol));\n        this.splitEventDrag = memoize(splitInteractionByCol);\n        this.splitEventResize = memoize(splitInteractionByCol);\n        // internal\n        this.allDaySplitter = new AllDaySplitter();\n        this.daySeriesSlicer = new DaySeriesSlicer();\n        this.dayTimeColsSlicer = new DayTimeColsSlicer();\n    }\n    render() {\n        const { props, context } = this;\n        const { dateProfile } = props;\n        const { options, dateProfileGenerator } = context;\n        const daySeries = this.buildDaySeries(dateProfile, dateProfileGenerator);\n        const cols = this.buildDayCols(daySeries, context.dateEnv, {\n            slotRange: dateProfile,\n            activeRange: dateProfile.activeRange,\n        });\n        const colDates = this.extractColDates(cols);\n        const dayRanges = this.extractColRanges(cols);\n        const splitProps = this.allDaySplitter.splitProps(props);\n        const allDayProps = this.daySeriesSlicer.sliceProps(splitProps.allDay, dateProfile, options.nextDayThreshold, context, daySeries);\n        const timedProps = this.dayTimeColsSlicer.sliceProps(splitProps.timed, dateProfile, null, context, dayRanges);\n        const dayHeaderFormat = this.createDayHeaderFormatter(context.options.dayHeaderFormat, true, // datesRepDistinctDays\n        cols.length);\n        return (jsx(NowTimer, { unit: options.nowIndicator ? 'minute' : 'day' /* hacky */, children: (nowDate, todayRange, nowMs) => {\n                const colCount = cols.length;\n                const nowIndicatorSeg = !props.forPrint && options.nowIndicator &&\n                    this.dayTimeColsSlicer.sliceNowDate(nowDate, dateProfile, options.nextDayThreshold, context, dayRanges);\n                const fgEventSegsByCol = this.splitFgEventSegs(timedProps.fgEventSegs, colCount);\n                const bgEventSegsByCol = this.splitBgEventSegs(timedProps.bgEventSegs, colCount);\n                const businessHourSegsByCol = this.splitBusinessHourSegs(timedProps.businessHourSegs, colCount);\n                const nowIndicatorSegsByCol = this.splitNowIndicatorSegs(nowIndicatorSeg, colCount);\n                const dateSelectionSegsByCol = this.splitDateSelectionSegs(timedProps.dateSelectionSegs, colCount);\n                const eventDragByCol = this.splitEventDrag(timedProps.eventDrag, colCount);\n                const eventResizeByCol = this.splitEventResize(timedProps.eventResize, colCount);\n                const headerTiers = this.buildDateRowConfigs(colDates, true, // datesRepDistinctDays\n                props.dateProfile, todayRange, dayHeaderFormat, context);\n                return (jsx(TimeGridLayout, { labelId: props.labelId, labelStr: props.labelStr, dateProfile: dateProfile, nowDate: nowDate, nowMs: nowMs, todayRange: todayRange, cells: cols, forPrint: props.forPrint, className: props.className, \n                    // header content\n                    headerTiers: headerTiers, \n                    // all-day content\n                    fgEventSegs: allDayProps.fgEventSegs, bgEventSegs: allDayProps.bgEventSegs, businessHourSegs: allDayProps.businessHourSegs, dateSelectionSegs: allDayProps.dateSelectionSegs, eventDrag: allDayProps.eventDrag, eventResize: allDayProps.eventResize, \n                    // timed content\n                    fgEventSegsByCol: fgEventSegsByCol, bgEventSegsByCol: bgEventSegsByCol, businessHourSegsByCol: businessHourSegsByCol, nowIndicatorSegsByCol: nowIndicatorSegsByCol, dateSelectionSegsByCol: dateSelectionSegsByCol, eventDragByCol: eventDragByCol, eventResizeByCol: eventResizeByCol, \n                    // universal content\n                    eventSelection: props.eventSelection }));\n            } }));\n    }\n}\n\nvar timeGridPlugin = {\n    name: 'timegrid',\n    initialView: 'timeGridWeek',\n    deps: [dayGridPlugin],\n    views: {\n        timeGrid: {\n            component: TimeGridView,\n            usesMinMaxTime: true, // indicates that slotMinTime/slotMaxTime affects rendering\n            allDaySlot: true,\n            slotDuration: '00:30:00',\n            slotEventOverlap: true, // a bad name. confused with overlap/constraint system\n        },\n        timeGridDay: {\n            type: 'timeGrid',\n            duration: { days: 1 },\n        },\n        timeGridWeek: {\n            type: 'timeGrid',\n            duration: { weeks: 1 },\n        },\n    },\n};\n\nexport { timeGridPlugin as t };\n","var e=[],t=[];function n(n,r){if(n&&\"undefined\"!=typeof document){var a,s=!0===r.prepend?\"prepend\":\"append\",d=!0===r.singleTag,i=\"string\"==typeof r.container?document.querySelector(r.container):document.getElementsByTagName(\"head\")[0];if(d){var u=e.indexOf(i);-1===u&&(u=e.push(i)-1,t[u]={}),a=t[u]&&t[u][s]?t[u][s]:t[u][s]=c()}else a=c();65279===n.charCodeAt(0)&&(n=n.substring(1)),a.styleSheet?a.styleSheet.cssText+=n:a.appendChild(document.createTextNode(n))}function c(){var e=document.createElement(\"style\");if(e.setAttribute(\"type\",\"text/css\"),r.attributes)for(var t=Object.keys(r.attributes),n=0;n<t.length;n++)e.setAttribute(t[n],r.attributes[t[n]]);var a=\"prepend\"===s?\"afterbegin\":\"beforeend\";return i.insertAdjacentElement(a,e),e}}export{n as default};\n","import { Calendar } from 'fullcalendar';\nimport dayGridPlugin from 'fullcalendar/daygrid';\nimport listPlugin from 'fullcalendar/list';\nimport allLocales from 'fullcalendar/locales-all';\nimport themePlugin from 'fullcalendar/themes/classic';\nimport timeGridPlugin from 'fullcalendar/timegrid';\n\nimport 'fullcalendar/skeleton.css';\nimport 'fullcalendar/themes/classic/theme.css';\nimport 'fullcalendar/themes/classic/palette.css';\n\nexport function setupCalendar(domEl, events, initialDate, locale) {\n  const calendar = new Calendar(domEl, {\n    plugins: [dayGridPlugin, timeGridPlugin, listPlugin, themePlugin],\n    locales: allLocales,\n    initialView: 'dayGridMonth',\n    headerToolbar: {\n      left: 'prev,next today',\n      center: 'title',\n      right: 'dayGridMonth,timeGridWeek,listWeek',\n    },\n    initialDate,\n    events,\n    locale,\n  });\n  calendar.render();\n}\n"],"names":["n","l","u","i","r","o","e","f","c","a","s","h","p","v","y","d","w","_","g","Array","isArray","m","b","parentNode","removeChild","k","t","arguments","length","children","call","defaultProps","x","type","props","key","ref","__k","__","__b","__e","__c","constructor","__v","__i","__u","vnode","S","C","this","context","$","I","__P","__d","q","__n","namespaceURI","D","P","base","some","A","push","H","__r","debounceRendering","sort","shift","L","String","O","K","T","J","j","nextSibling","insertBefore","nodeType","F","z","setProperty","test","N","style","cssText","replace","toLowerCase","slice","addEventListener","removeEventListener","removeAttribute","setAttribute","V","event","M","prototype","render","contextType","value","__E","Q","sub","state","__h","_sb","__s","getDerivedStateFromProps","componentWillMount","componentDidMount","componentWillReceiveProps","shouldComponentUpdate","apply","componentWillUpdate","componentDidUpdate","getChildContext","getSnapshotBeforeUpdate","E","then","indexOf","B","G","diffed","map","localName","document","createTextNode","createElementNS","is","__m","data","defaultValue","childNodes","attributes","name","__html","innerHTML","content","current","unmount","componentWillUnmount","R","documentElement","firstChild","X","Set","forEach","add","delete","Provider","__l","Consumer","getDerivedStateFromError","setState","componentDidCatch","forceUpdate","Promise","bind","resolve","setTimeout","Math","random","toString","__source","__self","__H","__N","requestAnimationFrame","filter","clearTimeout","cancelAnimationFrame","isPureReactComponent","__f","U","W","appendChild","__a","__z","__R","__O","pop","createElement","fallback","revealOrder","size","Z","Y","contains","splice","get","Map","reverse","set","Symbol","for","isReactComponent","Object","defineProperty","configurable","writable","en","persist","isPropagationStopped","cancelBubble","isDefaultPrevented","defaultPrevented","nativeEvent","un","class","on","multiple","selected","className","$$typeof","ln","fn","bn","createRoot","container","textContent","unmountComponentAtNode","NativeTemporal","globalThis","Temporal","invalidObject","invalidEntity","fieldName","val","normalizeOptions","options","undefined","create","arg","isObjectLike","TypeError","errorMessages.invalidObject","requireObjectLike","toFiniteNumber","entityName","errorMessages.forbiddenBigIntToNumber","Number","isFinite","RangeError","num","errorMessages.expectedFinite","toIntegerWithTrunc","trunc","baseErrorMessages.invalidEntity","outOfBoundsDate","constrainToRange","min","max","throwRangeError","message","throwTypeError","clampProp","propName","overflow","clampEntity","propVal","choices","clamped","baseErrorMessages.numberOutOfRange","memoize","generator","MapClass","otherArgs","has","createPropDescriptors","propVals","readonly","mapProps","transformer","res","createPropGetters","propNames","getters","slots","pluckProps","dest","bindArgs","boundArgs","dynamicArgs","noop","capitalize","toUpperCase","substring","createRegExp","meat","RegExp","parseInt0","parseInt","padNumber","digits","padStart","padNumber2","compareNumbers","sign","divFloorBigInt","denom","whole","divModFloorBigInt","divisor","quotient","divModFloor","floor","modFloor","hasHalf","abs","isoCalendarImpl","getCalendarSlotId","calendar","id","unitNameMap","nanosecond","microsecond","millisecond","second","minute","hour","day","week","month","year","unitNamesAsc","keys","nanoInMicro","nanoInMilli","nanoInSec","nanoInMinute","nanoInHour","nanoInUtcDay","bigNanoInMilli","BigInt","bigNanoInSec","bigNanoInUtcDay","timeFieldNamesAsc","timeGetters","calendarDateFieldNamesAsc","validateTimeFields","timeFields","constrainedFields","maxValues","constrainTimeFields","timeFieldsToNano","timeFieldsToSec","timeFieldsToSubsecNano","nanoToTimeFields","timeNano","timeMilli","nanoAfterMilli","milliAfterHour","milliAfterMinute","milliToTimeFields","epochNanoToSecMod","epochNano","epochSec","nano","epochNanoToMilli","isoDateTimeToEpochNano","isoDateTime","isoDateToEpochNano","isoDate","isoDateToEpochDays","isoPartsToEpochDays","isoYear","isoMonth","isoDay","monthIndex","Date","UTC","epochNanoToIsoDateTime","epochDays","nanoAfterDay","epochDaysToIsoDate","legacyDate","getUTCFullYear","getUTCMonth","getUTCDate","validateIsoDateTimeFields","computeIsoInLeapYear","computeIsoDaysInMonth","constrainIsoDateFields","computeCalendarDateFields","de","computeCalendarEraFields","era","eraYear","computeGregoryEraFields","computeCalendarMonthCode","monthCodeNumber","isLeapMonth","computeIsoMonthCodeParts","computeCalendarMonthCodeParts","formatMonthCode","requireString","requireType","typeName","toStrictInteger","isInteger","requireNumberIsInteger","epochDisambigMap","compatible","reject","earlier","later","roundingModeFuncs","round","ceil","coerceChoiceOption","optionName","enumNameMap","defaultChoice","enumArg","enumStr","enumNum","choiceMap","join","coerceEpochDisambig","epochNanoMax","epochNanoMin","plainDateEpochNanoMin","checkIsoDateTimeInBounds","checkEpochNanoInBounds","isoDateTimeAndOffsetToEpochNano","offsetNano","roundNumberToInc","roundingInc","roundingMode","roundWithMode","createZonedEpochNanoSlots","timeZone","epochNanoseconds","createDateTimeSlots","createDateSlots","zonedEpochSlotsToIso","_zonedEpochSlotsToIso","WeakMap","offsetNanoseconds","offsetRegExp","parseOffsetNanoMaybe","onlyHourMinute","parts","exec","fractionIndex","search","main","split","every","part","firstSubMinutePart","fracStr","padEnd","parseSign","RawDateTimeFormat","Intl","DateTimeFormat","timeZonePeriodDaysByName","El_Aaiun","Tucuman","Tirane","Riga","Simferopol","Vienna","Tunis","Boa_Vista","Fortaleza","Maceio","Noronha","Recife","Gaza","Hebron","DeNoronha","minPossibleTransitionSec","formatZonedDateTimeIsoAuto","zonedDateTimeSlots","formatIsoDateTimeFields","formatOffsetNano","roundToMinute","formatCalendarId","subsecDigits","getSignStr","formatIsoYearMonthFields","formatSubsecNano","formatTimeFields","offsetDisplay","nanoRemainder0","nanoRemainder1","nanoRemainder2","calendarId","isCritical","trailingZerosRE","totalNano","icuRegExp","badCharactersRegExp","refineTimeZoneId","rawId","resolveTimeZoneRecord","resolveTimeZoneId","upperRawId","offsetRecord","kind","normId","partI","queryNamedTimeZoneRecord","upperNormId","format","queryTimeZoneIntlFormat","resolvedOptions","queryTimeZone","rawTimeZoneId","record","queryTimeZoneRecord","normTimeZoneId","IntlTimeZone","FixedTimeZone","compareKey","oe","computeOffsetSec","periodDays","getSample","getSplit","createSplitTuple","periodSec","getOffsetSec","startEpochSec","endEpochSec","computePeriod","clampedStartEpochSec","clampIntlSampleEpochSec","clampedEndEpochSec","startOffsetSec","endOffsetSec","pinch","forEpochSec","offsetSec","splitDurSec","middleEpochSec","Ae","zonedEpochSec","wideOffsetSec0","wideOffsetSec1","wideUtcEpochSec0","wideUtcEpochSec1","narrowOffsetSec0","ze","getTransition","direction","lookaheadEpochSec","getCurrentEpochSec","searchEpochSec","inc","searchLimit","inBounds","transitionEpochSec","intlParts","intlFormat","epochMilli","formatToParts","hash","formatEpochMilliToPartsRecord","relatedYear","normalized","normalize","normalizeEraName","timeZoneId","timeZoneName","subsecNano","resEpochSec","now","dateTimeToZonedDateTime","plainDateTimeSlots","epochDisambig","disambig","possibleEpochNanos","zonedEpochNano","gapNano","startOffsetNano","shiftedIsoDateTime","getSingleInstantFor","defineTemporalClass","branding","cls","getSlots","getterMaps","defineProperties","toStringTag","getter","assign","attachDebugString","instance","toJSON","invalidRecordType","forbiddenValueOf","dateFieldGetters$1","monthCode","createNativeGetters","shimGetters","timeGetters$1","dateFieldGetters","PlainDateTimeRecordBranding","ZonedDateTimeRecordBranding","InstantRecordBranding","calendarMap","instantMap","zonedDateTimeMap","plainDateTimeMap","getCalendarSlots","getCalendarSlotsIfPresent","getInstantSlots","getInstantSlotsIfPresent","setInstantSlots","getZonedDateTimeSlots","getZonedDateTimeSlotsIfPresent","setZonedDateTimeSlots","getPlainDateTimeSlots","getPlainDateTimeSlotsIfPresent","setPlainDateTimeSlots","getCalendarRecordId","getCalendarRecordImplCreator","getImpl","xe","refineNativeCalendarArgMaybe","calendarRecord","getNativePlainDateTime","NativePlainDateTimeRecord","valueOf","getNativeZonedDateTime","NativeZonedDateTimeRecord","epochMilliseconds","createNativeZonedDateTimeRecord","native","getNativeInstant","NativeInstantRecord","refineShimCalendarArgMaybe","getShimPlainDateTimeSlots","ShimPlainDateTimeRecord","isoDateTimeSlots","formatDateTimeIsoAuto","getShimZonedDateTimeSlots","ShimZonedDateTimeRecord","getShimZonedDateTimeIsoSlots","createShimZonedDateTimeRecord","getShimInstantSlots","ShimInstantRecord","createNativePlainDateTimeRecord","PlainDateTime","createShimPlainDateTimeRecord","toZonedDateTime","refineEpochDisambigOptions","fromEpochMilliseconds","createNativeInstantRecord","Instant","createShimInstantRecord","toZonedDateTimeISO","instantSlots","addWeeks","dateToUtcArray","arrayToUtcDate","addDays","addMs","diffDays","m0","m1","diffWholeWeeks","diffWholeDays","timeAsMs","startOfDay","weekOfGivenYear","marker","dow","doy","firstWeekStart","firstWeekOffset","dayStart","days","fwd","getUTCDay","arrayToLocalDate","date","getUTCHours","getUTCMinutes","getUTCSeconds","getUTCMilliseconds","concat","isValidDate","isNaN","calendarSystemClassMap","theClass","invertRanges","ranges","constraintRange","dateRange","invertedRanges","start","compareRanges","end","range0","range1","intersectRanges","newRange","rangeContainsMarker","range","expandZonedInstant","dateInfo","calendarSystem","markerToArray","instantMs","timeZoneOffset","array","createVerboseFormattingArg","startInfo","localeCodes","locale","codes","isInt","len","substr","getMarkerYear","getMarkerMonth","getMarkerDay","arrayToMarker","arr","INTERNAL_UNITS","PARSE_RE","createDuration","input","unit","years","months","milliseconds","parseString","parseObject","obj","duration","hours","minutes","seconds","ms","weeks","specifiedWeeks","addDurations","d0","d1","asRoughDays","dur","asRoughMs","wholeDivideDurations","numerator","denominator","localRes","greatestDurationDenominator","buildIsoString","stripZeroTime","toISOString","doIso","mins","formatTimeZoneOffset","formatDayString","formatIsoTimeString","joinDateTimeFormatParts","ISO_RE","DateEnv","settings","createCalendarSystem","weekDow","weekDoy","weekNumberCalculation","firstDay","weekNumberFunc","weekTextLong","weekTextShort","cmdFormatter","createMarker","meta","createMarkerMeta","createNowMarker","timestampToMarker","parse","isTimeUnspecified","str","getYear","getMonth","getDay","subtract","addYears","addMonths","diffWholeYears","diffWholeMonths","greatestWholeUnit","diffHours","diffMinutes","diffSeconds","countDurationsBetween","diff","asRoughMonths","startOf","startOfYear","startOfMonth","startOfWeek","startOfHour","startOfMinute","startOfSecond","computeWeekNumber","toDate","nextW","weekOfYear","formatter","dateOptions","toZonedInstant","formatRangeToParts","endInstantMs","isEndExclusive","startInstantMs","formatIso","extraOptions","omitTimeZoneOffset","offsetForMarker","omitTime","getFullYear","getDate","getHours","getMinutes","getSeconds","getMilliseconds","zdt","InstantFns.toZonedDateTimeISO","InstantFns.fromEpochMilliseconds","getTimezoneOffset","ZonedDateTimeFns.offsetNanoseconds","PlainDateTimeFns.toZonedDateTime","PlainDateTimeFns.create","EXTENDED_SETTINGS","MERIDIEM_RE","COMMA_RE","LTR_RE","TRAILING_RE","WHITESPACE_ONLY_RE","NativeDateFormatter","standardOptions","extendedOptions","timeZoneOnly","Boolean","weekOnly","omitZeroMinute","fractionalSecondDigits","getFormats","normalFormat","display","simpleNumberFormat","formatWeekNumberParts","zeroFormat","processPartsLoop","weekdayJustify","forceCommas","omitTrailing","stripTrailingLiteral","postProcessParts","source","postProcessRangeParts","cachedContext","zeroProps","cachedFormats","priorLiteral","isLiteral","omitCommas","meridiem","_m0","toLocaleLowerCase","trimEnd","lastPart","CmdDateFormatter","cmdStr","FuncDateFormatter","func","classNames","joinClassNames","args","fracToCssDim","frac","createFormatter","warn","console","warnedClassNameOptions","refineClassName","warnInvalidClassName","refineClassNameGenerator","renderProps","listenBySelector","eventType","selector","handler","attachedHandler","ev","matchedChild","target","closest","buildDelegationHandler","createAriaClickAttrs","onClick","createAriaKeyboardAttrs","tabIndex","onKeyDown","preventDefault","guidNumber","guid","compareByFieldSpec","obj0","obj1","fieldSpec","localeCompare","flexibleCompare","field","order","formatWithOrdinals","fallbackText","reduce","index","valuesIdentical","computeViewBorderless","borderless","borderlessX","borderlessTop","borderlessBottom","flatArray","items","item","subItem","flatMapArray","inputs","mapFunc","output","subOutput","isMaybeArraysEqual","array0","array1","isArraysEqual","itemsEqual","hasOwnProperty","filterHash","filtered","mapHash","newHash","hashValuesToArray","arrayToHash","isPropsEqualWithFunc","props0","props1","valuesEqual","isMaybePropsEqualShallow","isPropsEqualShallow","isMaybeDateRangeInputsEqual","isDateInputsEqual","input0","input1","isPropsEqualWithMap","equalityFuncMap","val0","val1","equalityFunc","mergePropsShallow","BASE_OPTION_REFINERS","navLinkDayClick","identity","navLinkWeekClick","buttons","toolbarElements","prevText","nextText","prevYearText","nextYearText","todayText","yearText","monthText","dayText","listText","todayHint","prevHint","nextHint","buttonDisplay","buttonGroupClass","buttonClass","defaultAllDayEventDuration","defaultTimedEventDuration","nextDayThreshold","scrollTime","scrollTimeReset","slotMinTime","slotMaxTime","popoverFormat","slotDuration","snapDuration","headerToolbar","footerToolbar","forceEventDuration","dayLaneClass","dayLaneInnerClass","dayLaneDidMount","dayLaneWillUnmount","initialView","aspectRatio","weekends","weekNumbers","weekNumberHeaderClass","weekNumberHeaderInnerClass","weekNumberHeaderContent","weekNumberHeaderDidMount","weekNumberHeaderWillUnmount","inlineWeekNumberClass","inlineWeekNumberContent","inlineWeekNumberDidMount","inlineWeekNumberWillUnmount","editable","controller","nowIndicator","nowIndicatorSnap","nowIndicatorHeaderClass","nowIndicatorHeaderContent","nowIndicatorHeaderDidMount","nowIndicatorHeaderWillUnmount","nowIndicatorDotClass","nowIndicatorLineClass","nowIndicatorLineContent","nowIndicatorLineDidMount","nowIndicatorLineWillUnmount","showNonCurrentDates","lazyFetching","startParam","endParam","timeZoneParam","locales","dragRevertDuration","dragScroll","allDayMaintainDuration","unselectAuto","dropAccept","eventOrder","token","specs","tokens","charAt","eventOrderStrict","eventSlicing","eventPrintLayout","longPressDelay","eventDragMinDistance","expandRows","height","contentHeight","colorScheme","weekNumberFormat","eventResizableFromStart","displayEventTime","displayEventEnd","progressiveEventRendering","businessHours","initialDate","eventDataTransform","tableHeaderSticky","footerScrollbarSticky","defaultAllDay","eventSourceFailure","eventSourceSuccess","eventDisplay","eventStartEditable","eventDurationEditable","eventOverlap","eventConstraint","eventAllow","eventColor","eventContrastColor","eventDidMount","eventWillUnmount","eventContent","eventClass","eventInnerClass","eventTimeClass","eventTitleClass","eventBeforeClass","eventAfterClass","listItemEventClass","listItemEventInnerClass","listItemEventTimeClass","listItemEventTitleClass","listItemEventBeforeClass","listItemEventAfterClass","blockEventClass","blockEventInnerClass","blockEventTimeClass","blockEventTitleClass","blockEventBeforeClass","blockEventAfterClass","rowEventClass","rowEventInnerClass","rowEventTimeClass","rowEventTitleClass","rowEventTitleSticky","rowEventBeforeClass","rowEventBeforeContent","rowEventAfterClass","rowEventAfterContent","columnEventClass","columnEventInnerClass","columnEventTimeClass","columnEventTitleClass","columnEventTitleSticky","columnEventBeforeClass","columnEventAfterClass","backgroundEventClass","backgroundEventDidMount","backgroundEventWillUnmount","backgroundEventContent","backgroundEventInnerClass","backgroundEventTitleClass","backgroundEventColor","selectConstraint","selectOverlap","selectAllow","droppable","unselectCancel","slotHeaderFormat","slotLaneClass","slotLaneDidMount","slotLaneWillUnmount","slotHeaderClass","slotHeaderInnerClass","slotHeaderContent","slotHeaderDidMount","slotHeaderWillUnmount","slotHeaderAlign","slotHeaderSticky","slotHeaderRowClass","slotHeaderDividerClass","dayMaxEvents","dayMaxEventRows","dayMinWidth","slotHeaderInterval","dayHeaderClass","dayHeaderInnerClass","dayHeaderContent","dayHeaderDidMount","dayHeaderWillUnmount","dayHeaderAlign","_dayHeaderSticky","dayHeaderRowClass","dayHeaderDividerClass","dayRowClass","dayCellDidMount","dayCellWillUnmount","dayCellClass","dayCellInnerClass","dayCellTopContent","dayCellTopClass","dayCellTopInnerClass","dayCellBottomClass","allDaySlot","allDayText","allDayHeaderClass","allDayHeaderInnerClass","allDayHeaderContent","allDayHeaderDidMount","allDayHeaderWillUnmount","timedText","slotMinWidth","slotMinHeight","navLinks","eventTimeFormat","rerenderDelay","moreLinkText","moreLinkHint","selectMinDistance","selectable","selectLongPressDelay","eventLongPressDelay","selectMirror","eventMaxStack","eventMinHeight","eventMinWidth","eventShortHeight","slotEventOverlap","dayCount","dateAlignment","dateIncrement","hiddenDays","fixedWeekCount","validRange","visibleRange","titleFormat","eventInteractive","noEventsText","viewHint","viewChangeHint","navLinkHint","closeHint","eventsHint","headingLevel","moreLinkClick","moreLinkContent","moreLinkDidMount","moreLinkWillUnmount","moreLinkClass","moreLinkInnerClass","rowMoreLinkClass","rowMoreLinkInnerClass","columnMoreLinkClass","columnMoreLinkInnerClass","navLinkClass","monthStartFormat","dayCellFormat","handleCustomRendering","customRenderingMetaMap","popoverClass","popoverCloseClass","popoverCloseContent","dayNarrowWidth","fillerClass","headerToolbarClass","footerToolbarClass","toolbarClass","toolbarSectionClass","toolbarTitleClass","tableClass","tableHeaderClass","tableBodyClass","nonBusinessHoursClass","highlightClass","dayHeaders","dayHeaderFormat","allDayDividerClass","listDaysClass","listDayClass","listDayFormat","createFalsableFormatter","listDayAltFormat","listDayHeaderDidMount","listDayHeaderWillUnmount","listDayHeaderClass","listDayHeaderInnerClass","listDayHeaderContent","listDayBodyClass","noEventsClass","noEventsInnerClass","noEventsContent","noEventsDidMount","noEventsWillUnmount","multiMonthMaxColumns","singleMonthMinWidth","singleMonthTitleFormat","singleMonthDidMount","singleMonthWillUnmount","singleMonthClass","singleMonthHeaderClass","singleMonthHeaderInnerClass","BASE_OPTION_DEFAULTS","outerBorder","CALENDAR_LISTENER_REFINERS","datesSet","eventsSet","eventAdd","eventChange","eventRemove","eventClick","eventMouseEnter","eventMouseLeave","select","unselect","loading","_unmount","_beforeprint","_afterprint","_noDateSelect","_noEventDrop","_noEventResize","_timeScrollRequest","dateClick","eventDragStart","eventDragStop","eventDrop","eventResizeStart","eventResizeStop","eventResize","drop","eventReceive","eventLeave","CALENDAR_ONLY_OPTION_REFINERS","viewClass","viewDidMount","viewWillUnmount","views","plugins","initialEvents","events","eventSources","VIEW_ONLY_OPTION_REFINERS","component","didMount","willUnmount","buttonTextKey","dateProfileGeneratorClass","usesMinMaxTime","disallowAmbigTitle","COMPLEX_OPTION_COMPARATORS","resources","refineProps","refiners","refined","extra","raw","buildEventInstanceRange","instantStartMs","instantEndMs","resolveEdgeInstantMs","dateEnv","buildRangeEdgeOutput","canonicalMarker","dateStr","getRangeInstantStartMs","getRangeInstantEndMs","canonicalRangeEndMarker","addDurationToEdge","edge","durMs","buildValidInstanceRange","startMs","endMs","createEventInstance","defId","instanceId","computeAlignedDayRange","timedRange","dayCnt","computeVisibleDayRange","startDay","endDay","endTimeMS","diffDates","date0","date1","largeUnit","m0day","m1day","diffDayAndTime","expandRecurring","eventStore","framingRange","pluginHooks","defs","instances","recurringDef","def","allDay","starts","expandRecurringRanges","recurringTypes","eventDef","markers","typeId","expand","typeData","parseEvents","rawEvents","eventSource","allowOpenRange","defIdMap","instanceIdMap","eventRefiners","buildEventRefiners","rawEvent","tuple","parseEvent","eventTupleToStore","getRelevantEvents","newStore","filterEventStoreDefs","lookDef","isEventDefsGrouped","def0","def1","groupId","createEmptyEventStore","mergeEventStores","store0","store1","filterFunc","EVENT_UI_REFINERS","startEditable","durationEditable","constraint","overlap","allow","color","contrastColor","EMPTY_EVENT_UI","constraints","allows","createEventUi","normalizeConstraint","combineEventUis","uis","combineTwoEventUis","item0","item1","EVENT_NON_DATE_REFINERS","title","url","interactive","EVENT_DATE_REFINERS","EVENT_REFINERS","extendedProps","refineEventDef","computeIsDefaultAllDay","recurringRes","parsed","allDayGuess","parseRecurring","parseEventDef","sourceId","singleRes","startMeta","endMeta","startMarker","hasEnd","endMarker","startInput","endEdge","parseSingle","publicId","ui","memberAdder","eventDefMemberAdders","freeze","STANDARD_PROPS","parseDateSpan","defaultDuration","span","standardProps","parseOpenDateSpan","buildRangeApiWithTimeZone","buildRangeApi","rangeMeta","startStr","endStr","buildDateSpanApiWithContext","dateSpan","transform","dateSpanTransforms","getDefaultEventEnd","getDefaultEventEndEdge","applyMutationToEventDef","eventConfig","mutation","startDelta","endDelta","copy","applier","eventDefMutationAppliers","applyMutationToEventInstance","eventInstance","forceAllDay","clearEnd","datesDelta","buildInstanceRange","addDeltaToRangeEdge","instantDatesDeltaMs","instantStartDeltaMs","instantEndDeltaMs","startEdge","delta","instantDeltaMs","newInstantMs","EventSourceImpl","internalEventSource","remove","dispatch","refetch","sourceIds","isRefetch","EventImpl","_context","_def","_instance","setProp","mutate","setExtendedProp","setStart","instanceRange","granularity","computeInstantDeltaMs","maintainDuration","setEnd","endInput","setDates","skipInstants","moveStart","deltaInput","moveEnd","moveDates","setAllDay","formatRange","formatInput","getCurrentData","relevantEvents","eventConfigBase","eventConfigs","compileEventUis","applyMutationToEventStore","oldEvent","emitter","trigger","relatedEvents","buildEventApis","revert","asStore","eventApiToStore","toPlainObject","collapseExtendedProps","fromInstantMs","eventApi","excludeInstance","eventApis","excludeInstanceId","sliceEventStore","eventUiBases","inverseBgByGroupId","inverseBgByDefId","defByGroupId","bgRanges","fgRanges","eventUis","origRange","normalRange","slicedRange","buildSlicedEventRange","isStart","isEnd","invertedRange","bg","fg","setElEventRange","el","eventRange","fcEventRange","getElEventRange","eventDefs","compileEventUi","fallbackBase","defBase","sortEventSegs","segs","eventOrderSpecs","objs","buildSegCompareObj","fieldSpecs","cmp","compareByFieldSpecs","_seg","seg","buildEventRangeTimeText","timeFormat","slicedStart","slicedEnd","defaultDisplayEventTime","defaultDisplayEventEnd","canonicalStart","canonicalEnd","startDate","endDate","rangeParts","multiDaySeparator","sharedPart","hasDatePart","dateUnits","detectMultiDayTimes","getEventRangeMeta","todayRange","nowDate","nowMs","segRange","isPast","isFuture","isToday","buildEventRangeKey","classNamesRe","contentRe","lifecycleRe","handlerRe","customMergeFuncs","mergeValues","mergePropsWithFunc","mergeViewOptionsMap","hashes","merged","viewName","viewOptions","mergeCalendarOptions","optionSets","mergeFunc","joinFuncishClassNames","mergeContentInjectors","mergeLifecycleCallbacks","isFunc0","isFunc1","combinedFunc","info","contentGenerator0","contentGenerator1","fn0","fn1","isMergedPropsEqual","parts0","parts1","count0","globalLocales","MINIMAL_RAW_EN_LOCALE","code","RAW_EN_LOCALE","unitText","eventCnt","organizeRawLocales","explicitRawLocales","defaultCode","allRawLocales","rawLocaleMap","rawLocale","buildLocale","inputSingular","available","codeArg","simpleId","queryRawLocale","parseLocale","queryLocale","NumberFormat","JsonRequestError","Error","response","super","arrayEventSourcePlugin","eventSourceDefs","ignoreRange","parseMeta","fetch","successCallback","funcEventSourcePlugin","errorCallback","normalizedSuccessCallback","normalizedFailureCallback","isResolved","wrappedSuccess","wrappedFailure","error","unpromisify","jsonFeedEventSourcePlugin","eventSourceRefiners","method","extraParams","requestParams","customRequestParams","params","buildRequestParams","fetchOptions","URLSearchParams","body","headers","fetchRes","ok","json","parsedResponse","requestJson","changeHandlerPlugin","optionChangeHandlers","_setApi","calendarApi","handleEventSources","unfoundSources","_raw","newInputs","inputFound","unfoundSource","newInput","addEventSource","EVENT_SOURCE_REFINERS","success","failure","parseEventSource","buildEventSourceRefiners","rawObj","metaRes","sourceDefId","buildEventSourceMeta","isFetching","latestFetchId","fetchRange","initEventSources","calendarOptions","dateProfile","activeRange","addSources","rawOptions","rawSources","sources","unshift","rawSource","parseInitialSources","reduceEventSources","action","eventSourceHash","fetchDirtySources","fetchSourcesByIds","excludeStaticSources","sourceHash","fetchId","receiveResponse","computeEventSourcesLoading","doesSourceNeedRange","isSourceDirty","prevSources","sourceIdHash","nextSources","fetchSource","sourceDef","errorHandled","SIMPLE_RECURRING_REFINERS","daysOfWeek","startTime","endTime","startRecur","endRecur","globalPlugins","recurringData","clippedFramingRange","eventDateEnv","calendarDateEnv","dowHash","dayMarker","instanceStarts","instanceStart","expandRanges","isLoadingFuncs","propSetHandlers","view","viewApi","hasHandlers","Emitter","handlers","thisContext","setThisContext","setOptions","addToHash","off","removeFromHash","attachedHandlers","optionHandler","computeElIsRtl","getComputedStyle","PIXEL_PROP_RE","applyStyleProp","workerFunc","resEquality","teardownFunc","currentArgs","currentRes","newArgs","memoizeObjArg","currentArg","newArg","ViewContextType","createContext","buildViewContext","viewSpec","dateProfileGenerator","nowManager","baseId","registerInteractiveComponent","unregisterInteractiveComponent","PureComponent","Component","nextProps","nextState","propEquality","stateEquality","addPropsEquality","addStateEquality","BaseComponent","setRef","ContentInjector","queuedDomNodes","currentDomNodes","handleEl","elRef","customGenerator","defaultGenerator","attrs","buildElAttrs","innerContent","currentGeneratorMeta","useDefault","customGeneratorRes","isObject","dangerouslySetInnerHTML","html","domNodes","isValidElement","generatorName","hasCustomRenderingHandler","tag","applyQueueudDomNodes","triggerCustomRendering","isActive","generatorMeta","containerEl","domNode","newNode","getUnequalProps","RenderId","ContentContainer","InnerContent","InnerContentInjector","didMountMisfire","generatedClassName","generateClassName","classNameGenerator","renderId","containerComponent","parentProps","renderText","text","getIsHeightAuto","getTableHeaderSticky","getFooterScrollbarSticky","isHeightAuto","getScrollerSyncerClass","ScrollerSyncer","scrollerSyncerClass","NowTimerRunner","handleChange","isMounted","handleRefresh","timing","computeTiming","waitMs","handleVisibilityChange","hidden","update","unitValue","addResetListener","destroy","removeResetListener","unroundedNowMs","getEpochMs","unroundedNow","resolveSnappedInstant","nextUnitStart","rawMs","nextSnappedMs","transitionMs","horizonMs","startOffsetMs","offsetAt","lowerMs","upperMs","middleMs","findNextOffsetTransitionMs","resolveNextSnappedInstant","buildDayRange","timeoutId","snappedMarker","offsetMs","candidateMs","isDimsEqual","v0","v1","configMap","afterSizeCallbacks","isHandling","isStalling","isAcquiringImmediately","afterSize","callback","flushAfterSize","flushedCallback","values","globalResizeObserver","ResizeObserver","entries","entry","config","width","borderBoxSize","inlineSize","blockSize","getBoundingClientRect","shouldFire","watchWidth","watchHeight","flushSync","watchSize","observe","box","unobserve","_width","NowTimer","runner","FULL_DATE_FORMAT","WEEK_FORMAT","WEEKDAY_ONLY_FORMAT","weekday","findWeekdayText","findDayNumberText","findMonthText","buildDateStr","dateMarker","viewType","buildNavLinkAttrs","isTabbable","omitHint","zonedDate","handleInteraction","customAction","zoomTo","role","getDateMeta","isDisabled","isOther","currentRange","ViewContainer","refineRenderProps","jsx","optionDefaults","optionOverrides","DateComponent","uid","prepareHits","queryHit","isRtl","positionLeft","positionTop","elWidth","elHeight","isValidSegDownEl","eventDrag","isValidDateDownEl","DelayedRunner","drainedOption","isRunning","isDirty","pauseDepths","request","delay","isPaused","tryDrain","pause","scope","resume","force","drained","clear","ScrollListener","isScroll","isScrollRecent","isWheelRecent","isMouseDown","isTouchDown","isMouse","isTouch","isWheel","handleScroll","startScroll","getIsDevice","scrollWaiter","handleScrollWait","endScroll","handleWheel","wheelWaiter","handleWheelWait","handleMouseDown","handleMouseUp","handleTouchStart","handleTouchEnd","passive","Scroller","_isUnmounting","listener","handleHRuler","disconnectHRuler","clientWidth","clientWidthRef","handleVRuler","disconnectVRuler","clientHeight","clientHeightRef","bottomScrollbarWidth","bottomScrollbarWidthRef","fallbackOverflow","horizontal","vertical","jsxs","hideScrollbars","overflowX","overflowY","scrollLeft","getRtlScrollerSystem","scrollWidth","getNormalizedRtlScrollX","getNormalizedScrollX","scrollTop","scrollTo","getNormalizedRtlScrollLeft","setNormalizedScrollX","addScrollStartListener","removeScrollStartListener","addScrollEndListener","removeScrollEndListener","_rtlScrollerSystem","position","top","system","innerEl","detectRtlScrollerSystem","StandardEvent","buildPublicEvent","eventUi","defaultTimeFormat","timeText","forcedTimeText","isInteractive","href","jsEvent","getEventTagAndAttrs","isDraggable","disableDragging","transformers","isDraggableTransformers","computeEventRangeDraggable","isBlock","subcontentRenderProps","isNarrow","isShort","isStartResizable","disableResizing","isEndResizable","isMirror","isFirst","isLast","isSelected","isDragging","isResizing","level","timeClass","titleClass","outerClassName","beforeClassName","afterClassName","innerClassName","disableLiquid","beforeContent","afterContent","dir","renderInnerContent","Fragment","disableZindexes","prevProps","innerProps","DateProfileGenerator","initHiddenDays","buildPrev","currentDateProfile","currentDate","forceToValid","prevDate","currentRangeUnit","build","buildNext","nextDate","currentInfo","isRangeAllDay","renderRange","isValid","buildValidRange","trimHiddenDays","buildCurrentRangeInfo","buildRenderRange","adjustActiveRange","buildDateIncrement","validRangeInput","simpleInput","refineRange","durationUnit","buildRangeFromDuration","buildRangeFromDayCount","buildCustomVisibleRange","getFallbackDuration","computeRes","isHiddenDay","skipHiddenDays","runningCount","visibleRangeInput","customAlignment","rangeInput","parseRange","isHiddenDayHash","isExclusive","computeMajorUnit","isMajorUnit","majorUnit","reduceEventStore","subset","transformRawEvents","excludeEventsBySourceId","receiveRawEvents","existingEventStore","buildPublicIdMaps","newEventStore","resetRawEvents","expandRange","addEvent","master","filteredDefs","filteredInstances","excludeSubEventStore","calEachTransform","sourceEachTransform","transformEachRawEvent","refinedEvents","refinedEvent","rezoneEventStoreDates","oldDateEnv","newDateEnv","Interaction","isHitComboAllowed","interactionSettingsStore","refinePluginDef","premiumReleaseDate","reducers","contextInit","eventDragMutationMassagers","dateSelectionTransformers","datePointTransforms","viewPropsTransformers","isPropsValid","externalDefTransforms","viewContainerAppends","eventDropTransformers","componentInteractions","calendarInteractions","elementDraggingImpl","listenerRefiners","optionRefiners","buildBuildPluginHooks","currentHooks","currentOverrideDefs","currentGlobalDefs","overrideDefs","globalDefs","pluginDefs","pluginsByName","hooks","addDefs","unrefinedDef","majorVersionError","combineHooks","deps","buildPluginHooks","hooks0","hooks1","compareOptionalDates","ensureViewDef","defaultConfigs","overrideConfigs","viewDef","defaultConfig","overrideConfig","queryProp","theComponent","superType","superDef","defaults","overrides","buildViewDef","parseViewConfigs","parseViewConfig","createViewHookComponent","contentGenerator","viewProps","buildViewSpecs","defaultInputs","dynamicOptionOverrides","viewDefs","compileViewDefs","durationInput","singleUnit","singleUnitOverrides","JSON","stringify","durationInputMap","createDurationCached","buildViewSpec","reduceDateSelection","currentSelection","selection","reduceSelectedEvent","currentInstanceId","eventInstanceId","reduceEventDrag","currentDrag","newDrag","affectedEvents","mutatedEvents","isEvent","reduceEventResize","currentResize","newResize","parseToolbars","viewSpecs","header","parseToolbar","footer","sectionStrHash","viewsWithButtons","hasTitle","processSectionStr","sectionStr","sectionRes","calendarButtons","customElements","sectionSubstrs","widgets","buttonGroupStr","customElement","buttonText","buttonHint","buttonClick","buttonInput","hint","click","changeView","currentUnit","isView","buttonIconClass","iconClass","buttonIconContent","iconContent","buttonIsPrimary","isPrimary","buttonDidMount","buttonWillUnmount","parseSection","sectionWidgets","center","ViewImpl","viewTitle","activeStart","activeEnd","currentStart","currentEnd","getOption","DEF_DEFAULTS","parseBusinessHours","rawDefs","rawDef","refineInputs","buildTitle","buildTitleFormat","hasStartMonth","hasEndMonth","hasTwoMonths","monthFormat","CalendarNowManager","resetListeners","handleInput","nowInput","nowFn","nowAnchorDate","resolveInputToDate","nowAnchorQueried","resetListener","getDateMarker","CalendarDataManager","computeCurrentViewData","_computeCurrentViewData","buildDateEnv","buildDateProfileGenerator","buildViewApi","buildViewUiProps","buildEventUiBySource","buildEventUiBases","parseContextBusinessHours","buildToolbarProps","isDrainingActionQueue","actionQueue","currentCalendarOptionsRefiners","currentCalendarOptionsInput","currentCalendarOptionsRefined","currentViewOptionsInput","currentViewOptionsRefined","optionsForRefining","optionsForHandling","handleNowChange","drainActionQueue","nowTimer","resetOptions","changedOptionNames","calendarContext","isInit","actionsComplete","controllerOption","onDataChange","prevState","prevData","rawOptionValue","reduceDynamicOptionOverrides","optionsData","computeOptionsData","currentViewType","reduceViewType","currentViewData","currentDataManager","initialDateInput","getInitialDate","reduceCurrentDate","dp","reduceDateProfile","isEventsLoading","renderableEventStore","eventUiSingleBase","selectionConfig","eventUiBySource","newState","dateSelection","eventSelection","contextAndState","reducer","wasLoading","computeIsLoading","isLoading","toolbarProps","newData","changeHandlers","prevCalendarOptions","newCalendarOptions","reduceEventSourcesNewTimeZone","stableOptionOverrides","stableDynamicOptionOverrides","stableCalendarOptionsData","refinedOptions","localeDefaults","availableLocaleData","processRawCalendarOptions","toolbarConfig","availableRawLocales","filterKnownOptions","currentRaw","currentRefined","anyChanges","processRawViewOptions","explicitLocale","isLoadingFunc","warnedUnknownOptions","knownOptions","todayInfo","prevInfo","nextInfo","selectedButton","navUnit","isTodayEnabled","isPrevEnabled","isNextEnabled","CalendarApiImpl","batchRendering","setOption","getAvailableLocaleCodes","handlerName","dateOrRange","spec","getUnitViewSpec","viewTypes","prev","next","prevYear","nextYear","today","gotoDate","zonedDateInput","incrementDate","formatDate","dateMeta","dateOrObj","selectionInput","pev","triggerDateSelect","origEvent","triggerDateUnselect","eventInput","sourceInput","triggerEventAdd","sourceApi","getEventSourceById","newEventApi","getEventById","getEvents","currentData","removeAllEvents","getEventSources","sourceApis","internalId","removeAllEventSources","refetchEvents","scrollToTime","timeInput","time","getButtonState","buttonConfigs","currentHintOrdinal","getSingleUnitText","buttonState","viewSpecName","CalendarMediaRoot","forPrint","handleBeforePrint","wasHandling","flushSyncWithSizeBatching","handleAfterPrint","ButtonIcon","ToolbarSection","widgetGroups","widgetGroup","renderWidgetGroup","isOnlyButtons","isOnlyView","widget","titleId","iconNode","inGroup","buttonGroup","hasSelection","isIconOnly","disabled","Toolbar","model","isHeader","renderSection","EventClicking","handleSegClick","segEl","EventHovering","handleEventElRemove","currentSegEl","handleSegLeave","handleSegEnter","triggerEvent","removeHoverListeners","onMouseEnter","onMouseLeave","currentMatchedChild","mouseOverEv","realOnMouseLeave","mouseLeaveEv","listenToHoverBySelector","publicEvName","CalendarInner","buildViewPropTransformers","interactionsStore","settingsInput","useEventCenter","parseInteractionSettings","interactionClasses","disableHits","interactions","TheInteractionClass","listeners","viewTitleId","viewHeight","viewAspectRatio","viewHeightLiquid","viewContext","renderView","buildAppendContent","labelId","labelStr","contentProps","Fragment$1","CalendarInteractionClass","interaction","theClasses","TheClass","Calendar","isRendering","isRendered","customContentRenderId","currentClassName","currentColorScheme","handleDataChange","actions","renderImmediate","renderRunner","handleRenderRequest","vdomRoot","calendarDisplayData","computeRootClassName","setIsRtl","setClassName","setHeight","setColorScheme","dataManager","pauseRendering","resumeRendering","classList","singleClassName","dataset","intersectRects","rect1","rect2","left","right","bottom","computeClippedClientRect","clippingParents","parents","HTMLElement","computedStyle","window","getClippingParents","rect","clippingParent","intersection","Slicer","sliceBusinessHours","_sliceBusinessHours","sliceDateSelection","_sliceDateSpan","_sliceEventStore","sliceEventDrag","_sliceInteraction","sliceEventResize","forceDayIfListItem","intersectDateSpan","extraArgs","activeDateSpanRange","slicedDateSpan","sliceDateSpan","sliceRange","sliceProps","eventSegs","dateSelectionSegs","businessHourSegs","fgEventSegs","bgEventSegs","sliceNowDate","computeActiveRange","rangeRes","sliceEventRanges","affectedInstances","fabricateEventRange","eventRanges","sliceEventRange","isComponentAllDay","DayTableModel","daySeries","breakOnWeeks","daysPerRow","rowCount","dates","colCount","cellRows","buildCells","headerDates","buildHeaderDates","rows","row","cells","col","buildCell","isMajor","cellIsMajor","buildDayGridRanges","seriesRange","nextIndex","DayTableSlicer","dayTableModel","DaySeriesSlicer","cnt","firstSunday","buildDateRowConfigs","datesRepDistinctDays","rowConfig","dateMarkers","colSpan","isMajorMod","totalDateCnt","isDateRow","renderConfig","buildDateRenderConfig","dataConfigs","buildDateDataConfigs","buildDateRowConfig","dataConfig","innerClassNameGenerator","align","sticky","dowDates","keyPrefix","extraRenderProps","extraAttrs","hasNavLink","isSticky","inPopover","fullDateStr","toUTCString","innerAttrs","a11yText","normDate","fullWeekDayStr","RefMap","masterCallback","ignoreDeletes","rev","callbacks","handleValue","priorExists","priorVal","anyChange","createRef","refCallback","Ruler","disconnectWidth","widthRef","getDayGridSegKey","splitSegsByRow","byRow","splitInteractionByRow","BgEvent","isVertical","renderFill","fillType","MorePopover","closeRef","focusStartRef","focusEndRef","handleRootEl","rootEl","handleDocumentMouseDown","composedPath","getEventTargetViaRoot","handleClose","handleDocumentKeyDown","onClose","textParts","dayHeaderRenderProps","weekdayText","dayNumberText","dayCellRenderProps","alignEl","containerInfo","createPortal","outline","root","getRootNode","Document","getAppendableRoot","forceTimed","dateSpanProps","getDayEl","layer","focus","preventScroll","updateSize","alignParentTop","popoverEl","alignmentRect","popoverDims","popoverVPTop","popoverVPLeft","offsetParent","offsetParentRect","scrollY","scrollX","applyStyle","computeLatestEnd","pickLatestEnd","pickEarliestStart","r0","r1","MoreLinkTrigger","buildMoreLinkRenderProps","isMicro","renderMoreLinkText","MoreLinkContainer","isPopoverOpen","handleLinkEl","linkEl","handleClick","computeRange","buildPublicSeg","allDayDate","allSegs","hiddenSegs","handlePopoverClose","moreCnt","popoverId","longText","alignElRef","popoverContent","numericText","DEFAULT_TABLE_EVENT_TIME_FORMAT","hasListItemDisplay","DAY_GRID_NON_BUSINESS_Z_CLASS","DAY_GRID_BG_EVENT_Z_CLASS","DAY_GRID_HIGHLIGHT_Z_CLASS","DAY_GRID_CELL_CONTENT_Z_CLASS","DAY_GRID_EVENT_Z_CLASS","DAY_GRID_INTERACTION_Z_CLASS","DayGridMoreLink","visibility","DayGridCell","getDayGridCellDateMeta","rootElRef","handleBodyEl","bodyEl","disconnectBodyHeight","headerHeight","headerHeightRef","mainHeightRef","_bodyWidth","bodyHeight","mainRect","rootRect","tableMode","isMonthStart","showDayNumber","currentEndIncl","currentFirstYear","currentFirstMonth","currentLastYear","currentLastMonth","shouldDisplayMonthStart","baseClassName","borderStart","borderBottom","CellTag","cellStyle","hasLabel","hasMonthLabel","fills","hasA11yDateText","renderTopInner","fgLiquidHeight","fgIsList","minHeight","fgHeight","MeasuredHeightHarness","disconnectHeight","heightRef","doSpansIntersect","intersectSpans","getSpanLength","findIntersections","findLowerBoundByStart","matches","subtractCoveredSpans","covered","result","cursor","addToUnion","spans","addition","pending","inserted","insertLaterally","low","high","middle","GEOMETRY_TOLERANCE","buildPixelLimitedLayout","sliceHeights","canvasHeight","levelCapacity","moreLinkHeight","segLevels","excludedSegs","buildSegLevels","domWholeSliceLevels","convertSegLevelsToWholeSlices","domExcludedWholeSlices","convertSegsToWholeSlices","wholeResolution","resolveLevelCoords","renderSlices","hiddenSlices","sliceLevels","sliceCoords","isSettled","excludedWholeSlices","excludedSlices","compareByEventOrder","placement","placeExtraSlicesInLevels","placementSliceLevels","sliceResolution","moreLinkEventMax","pixelPrunedSlices","initialHiddenSlices","maxPixelHeight","moreLinkMaxPixelHeight","moreLinkGroups","sliceHideQueue","sliceHideIndex","hiddenSlice","addHiddenSliceToGroups","enqueueViolators","sliceBottom","getSliceBottom","violatesPixelBoundary","getSliceKey","newMoreLinkSpans","recomputeVisibleCoords","newMoreLinkSpan","withinSpan","candidates","prunePixelLimitedSliceLevels","addedSlices","maxLevels","Infinity","levelIndex","findPackedLevelIndex","levels","orderStrict","createWholeSlice","maxPixels","sliceHeight","levelCoord","packedLevelIndex","computeLateralSpanPlacement","sliceTop","freshCoords","coord","extraSlices","moreLinkLevelTax","requiresSlicing","taxDeepestOccupiedLevel","addedSliceSet","moreLinkReservations","placementState","work","pushFire","fire","fireMoreLink","fence","computeLevelFence","maxExclusive","findInsertionLevel","hide","plan","sourceLength","blockers","reservation","runs","subtractSpansFromSlice","run","isWithinLevelFence","visibleLength","sliceCount","MAX_SLICES_PER_PLAN","candidate","slices","score","EXTRA_SLICE_PENALTY","isBetterSlicePlan","findBestSlicePlan","visibleSlice","taxedLevelIndex","victims","taxedLevel","victim","intersectSlice","other","sourceSeg","orderIndex","groupLaterallyIntersecting","groups","group","previous","createNarrowerSlice","mergeAdjacentSlices","finalizeHiddenGroups","newSpans","untouchedGroups","mergedSlices","isPartialSlice","sortByEventOrder","compareByAxisOrder","sortByAxisOrder","barrier","parent","DEFAULT_LEVEL_CAPACITY","estimateLevelCapacity","buildDayGridSegSources","eventOrderedSegs","buildDayGridLevelPlacements","columnCount","sourceSegs","layout","resolution","buildLevelLimitedLayout","buildDayGridPlacementLayout","buildDayGridPopoverSegs","column","cutSegToColumn","intersectionSpan","resolveDayGridPlacementMode","eventOrderedHiddenSlices","slicesByStart","from","federateSlicesByStart","columns","eventAreaHeight","eventHeight","buildDayGridPrintPlan","candidatePlan","planPrintDomCandidates","buildDayGridPrintColumns","printSegHeights","band","printEventThicknesses","getPrintEventKey","defaultPrintEventThickness","bands","thickness","buildPrintEventBands","getDayGridPrintSliceKey","slicesByColumn","fill","DEFAULT_WEEK_NUM_FORMAT","DayGridRow","headerHeightRefMap","handleSegPositioning","mainHeightRefMap","sliceHeightRefMap","handlePrintSegHeightChange","handlePrintSegHeights","printSegHeightRefMap","buildWeekNumberRenderProps","buildPrintPlan","updateAutoPlacementRatchets","weekDateMarker","screenFgLiquidHeight","printPlan","printColumns","screenColumns","screenSliceCoords","screenMainOffsetsByCol","screenHeightsByCol","placementMode","maxMainTop","minMainHeight","computeFgDims","screenLayout","buildDayGridPixelPlacements","mode","maxDomLevels","computeDayGridDomCandidateMaxLevels","cellHeaderHeight","mainOffset","highlightSegs","getHighlightSegs","fullWeekStr","weekNumberRenderProps","cellIsNarrow","fillsByCol","weekNumberNode","showWeekNumbers","cellIsMicro","renderText$1","computeSpanWidth","appendFillSegs","flexBasis","basis","cell","printPopover","screenRenderSlices","renderPrintBandSlots","renderLevelFgSegs","renderMirrorFgSegs","showDayNumbers","colWidth","nodes","getMirrorSegs","renderEventContent","isInvisible","isListItem","cellRenderProps","slot","eventNode","sliceKey","percentWidth","crossedBorderWidth","zClassName","headerHeightMap","mainHeightMap","minMainBottom","isComplete","mainTop","mainHeight","mainBottom","smallestSliceHeight","weekNum","weekNumTextParts","DaySeriesModel","dayIndex","previousIndex","rangeStart","firstResult","getDateIndex","lastResult","firstIndex","lastIndex","getLastVisibleIndex","clippedFirstIndex","clippedLastIndex","dayOffset","buildDayTableModel","computeColWidth","colMinWidth","viewportWidth","computeColFromPosition","realColWidth","colFromLeft","getCellEl","rowEl","querySelectorAll","dayHeaderMicroFormat","createDayHeaderFormatter","explicitFormat","dateCnt","computeFallbackHeaderFormat","DayGridRows","splitBusinessHourSegs","splitBgEventSegs","splitAllDaySegsByRow","splitFgEventSegs","splitDateSelectionSegs","splitEventDrag","splitEventResize","rowHeightRefMap","handleMoreLinkEl","disconnectMoreLinkHeight","firstCellKey","fgEventSegsByRow","bgEventSegsByRow","businessHourSegsByRow","dateSelectionSegsByRow","eventDragByRow","eventResizeByRow","rowHeightsRedistribute","rowBasis","visibleWidth","computeRowBasis","needsMoreLinkProbe","rowHeightMap","computeRowFromPosition","isInert","cellStartDate","cellEndDate","getRowEl","isSegAllDay","rowCnt","DayGridHeaderCell","buildDayHeaderText","handleInnerEl","disconnectSize","innerHeightRef","innerWidth","totalColWidth","isLiquid","isSpanning","flexGrow","minWidth","blank","finalRenderProps","buildDayHeaderRenderProps","rowLevel","alignInput","stickyInput","edgeCoord","alignClassName","InnerContainer","baseText","textData","includeDayNumber","DayGridHeaderRow","innerHeightRefMap","handleInnerHeights","innerHeightMap","innerHeight","currentInnerHeight","rowIndex","cellI","DayGridHeaderRows","headerTiers","DayGridLayoutPrint","tableDisplayInfo","multiMonthColumns","showHeader","headerElRef","DayGridHeader","DayGridLayoutNormal","handleScroller","scroller","scrollerRef","handleTotalWidth","totalWidth","handleClientWidth","endScrollbarWidth","verticalScrollbars","measuredColWidth","inTableHeader","FooterScrollbar","canvasWidth","scrollbarWidthRef","DayGridLayoutPannable","headerScrollerRef","bodyScrollerRef","footerScrollerRef","appliedColWidth","syncedScroller","updateSyncedScroller","handleChildren","DayGridLayout","updateScrollY","scrollDate","rowHeight","computeTopFromDate","handleScrollEnd","isDevice","commonLayoutProps","resetScroll","dayGridPlugin","dayGrid","slicer","slicedProps","endOfWeek","snapToWeek","lastMonthRenderStart","buildDayTableRenderRange","dayGridDay","dayGridWeek","dayGridMonth","dayGridYear","ListDayHeaderInner","dayDate","dayFormat","navLinkAttrs","ListDayHeader","stickyHeaderDates","createDefaultListDayFormat","createDefaultListDaySideFormat","DEFAULT_TIME_FORMAT","ListEvent","ListDay","listDayData","listDayEventsData","renderNoEventsInner","computeDateVars","viewEnd","dayDates","dayRanges","listPlugin","list","eventStoreToSegs","_eventStoreToSegs","setRootEl","verticalScrolling","renderSegList","renderEmptyMessage","segsByDay","groupSegsByDay","dayNodes","populatedDayCount","count","daySegs","populatedDayIndex","eventRangesToSegs","fullDayEventRanges","fullDayEventRange","eventRangeToSegs","fullDayRange","slicedFullDayRange","listDay","listWeek","listMonth","listYear","l8","l9","isFeminine","unitLabel","l10","l11","l12","l14","affix","viewHints","Tag","Woche","Monat","Jahr","l17","l18","l26","l28","l35","l36","l38","l41","l42","l43","l44","l46","l50","l51","l52","todayHints","l58","l60","l61","l63","l66","l67","l68","l70","l71","l75","l76","l77","l78","l79","localesAll","xxsTextClass","outlineWidthFocusClass","outlineOffsetClass","outlineInsetClass","primaryOutlineColorClass","strongSolidPressableClass","mutedHoverClass","mutedHoverPressableClass","faintHoverClass","faintHoverPressableClass","blockPointerResizerClass","rowPointerResizerClass","columnPointerResizerClass","blockTouchResizerClass","rowTouchResizerClass","columnTouchResizerClass","getDayClass","getSlotClass","isMinor","dayRowCommonClasses","expanderIconClass","continuationArrowClass","chevronLeft","chevronsLeft","xmlns","viewBox","stroke","strokeWidth","strokeLinecap","strokeLinejoin","x1","y1","x2","y2","isStack","resourceDayHeaderAlign","resourceDayHeaderClass","resourceDayHeaderInnerClass","resourceColumnHeaderClass","resourceColumnHeaderInnerClass","resourceColumnResizerClass","resourceGroupHeaderClass","resourceGroupHeaderInnerClass","resourceCellClass","resourceCellInnerClass","resourceIndentClass","resourceExpanderClass","resourceExpanderContent","isExpanded","rx","ry","plusSquare","resourceHeaderRowClass","resourceRowClass","resourceColumnDividerClass","resourceGroupLaneClass","resourceLaneClass","resourceLaneBottomClass","timelineBottomClass","multiMonth","timeGrid","timeline","isTime","points","buildDayColsFromSeries","slotRange","EMPTY_EVENT_STORE","Splitter","getKeysForEventDefs","_getKeysForEventDefs","splitDateSelection","_splitDateSpan","splitEventStore","_splitEventStore","splitIndividualUi","_splitIndividualUi","_splitInteraction","eventUiBuilders","splitProps","keyInfos","getKeyInfo","defKeys","dateSelections","individualUi","eventStores","eventDrags","eventResizes","buildEventUiForKey","keyInfo","buildEventUi","dateSpans","getKeysForDateSpan","getKeysForEventDef","splitStores","splitHashes","splitStates","affectedStores","mutatedKeysByDefId","mutatedStores","populate","allUi","eventUiForKey","baseParts","stuff","AllDaySplitter","timed","DayTimeColsSlicer","organizeSegsByCol","segsByCol","splitInteractionByCol","STOCK_SUB_DURATIONS","buildSlatMetas","explicitLabelInterval","slatTime","slatIterator","labelInterval","slotsPerLabel","computeLabelInterval","metas","isLabeled","isoTimeStr","TimeGridAllDayHeader","innerElRef","renderAllDayInner","disconnectInnerWidth","innerWidthRef","TimeGridAllDayLane","computeSlatHeight","slatCnt","explicitSlatMinHeight","slatInnerHeight","scrollerHeight","slatMinHeight","slatLiquidHeight","slatLiquid","slatHeight","computeNowIndicatorDayDate","nowIndicatorSegsByCol","nowDayMs","firstDayDate","computeDateTopFrac","startOfDayDate","computeTimeTopFrac","buildTimeGridSegPlacements","segVerticals","segVerticalBySeg","segVertical","placements","placementLevels","collidersByKey","parentByKey","colliders","collider","unionPlacementKeys","maxLevelByRoot","findPlacementRoot","backwardDepthByKey","forwardDepthByKey","depth","levelCount","farLevel","levelEndCoord","backwardDepth","forwardDepth","positionTimeGridPlacements","domOrderedPlacements","layoutTimeGridColumnByMaxLevel","stackDepth","stackForward","hiddenGroups","groupSegs","first","firstRoot","secondRoot","isBrowserPrintQuirky","navigator","userAgent","includes","computeTimeGridPrintMode","TimeGridEvent","TimeGridMoreLink","renderPlainFgSegs","NowIndicatorDot","NowIndicatorLineContainer","TimeGridNowIndicatorLine","totalHeight","showDot","TimeGridCol","isSelectMirror","mirrorSegs","baseStyle","getIsStack","sortedFgSegs","renderFillSegs","renderFgSegs","renderNowIndicator","nowIndicatorSegs","renderPositionedMirrorSegs","renderPositionedFgSegs","computeSegVerticals","renderPositionedSeg","computeSegHStyle","renderHiddenGroups","zIndex","hStyle","isMeasured","colDate","startCoord","endCoord","computeFgSegVerticals","hiddenGroup","marginInlineStart","segRect","shouldOverlap","nearCoord","farCoord","insetInlineStart","insetInlineEnd","marginInlineEnd","TimeGridCols","processSlotOptions","fgEventSegsByCol","bgEventSegsByCol","businessHourSegsByCol","dateSelectionSegsByCol","eventDragByCol","eventResizeByCol","snapsPerSlot","slatIndex","slatTop","partial","snapIndex","multiplyDuration","snapDurationOverride","NowIndicatorHeaderContainer","TimeGridNowIndicatorArrow","DEFAULT_SLAT_LABEL_FORMAT","TimeGridSlatHeader","createRenderProps","headerFormat","liquidHeight","borderTop","disconnectInnerSize","TimeGridSlatLane","TimeGridWeekNumber","weekTextParts","TimeGridAxisEmpty","TimeGridLayoutPannable","headerTierHeights","headerLabelInnerWidthRefMap","handleAxisWidths","headerLabelInnerHeightRefMap","handleHeaderHeights","headerMainInnerHeightRefMap","handleAllDayLabelInnerWidth","allDayLabelInnerWidth","slatLabelInnerWidthRefMap","slatLabelInnerHeightRefMap","handleSlatInnerHeights","allDayScrollerRef","mainScrollerRef","footScrollerRef","axisScrollerRef","handleBodyHeight","handleClientHeight","handleStickyBottomScrollbarWidth","sticykBottomScrollbarWidth","headerLabelInnerHeightMap","headerMainInnerHeightMap","heights","tierNum","slatLabelInnerHeightMap","slatLabelInnerHeight","headerLabelInnerWidthMap","slatLabelInnerWidthMap","headerLabelInnerWidth","slatLableInnerWidth","axisWidth","nowIndicatorDayDate","printStackEnabled","absPrint","simplePrint","slatMetas","totalSlatHeight","forcedBodyHeight","rowsNotExpanding","firstBodyRowIndex","slatMeta","slatI","initScrollers","updateSlatHeight","updateScrollers","destroyScrollers","prevSlatHeight","slatHeightRef","dayScroller","timeScroller","dayScrollerRef","timeScrollerRef","TimeGridLayoutNormal","handleAxisInnerWidths","handleWeekNumberInnerWidth","weekNumberInnerWidth","slatLabelInnerWidth","buildEmptyInteractionCols","interactionsByCol","TimeGridLayout","scrollState","handleSlatHeight","applyTimeScroll","handleTimeScrollRequest","handleTimeScrollEnd","currentSlatCnt","getAllDayMaxEventProps","timeScrollState","AUTO_ALL_DAY_MAX_EVENT_ROWS","timeGridPlugin","buildDaySeries","buildDayCols","extractColDates","cols","extractColRanges","splitNowIndicatorSegs","allDaySplitter","daySeriesSlicer","dayTimeColsSlicer","colDates","allDayProps","timedProps","nowIndicatorSeg","timeGridDay","timeGridWeek","prepend","singleTag","querySelector","getElementsByTagName","charCodeAt","styleSheet","insertAdjacentElement","domEl","themePlugin","allLocales"],"mappings":"4CAAG,IAACA,EAAEC,EAAEC,EAAIC,EAAEC,EAAEC,EAAEC,EAAEC,EAAEC,EAAEC,EAAEC,EAAEC,EAAEC,EAAEC,EAAEC,EAAEC,EAAE,GAAGC,EAAE,GAAGC,EAAE,oEAAoEC,EAAEC,MAAMC,QAAQ,SAASC,EAAErB,EAAEC,GAAG,IAAI,IAAIC,KAAKD,EAAED,EAAEE,GAAGD,EAAEC,GAAG,OAAOF,CAAC,CAAC,SAASsB,EAAEtB,GAAGA,GAAGA,EAAEuB,YAAYvB,EAAEuB,WAAWC,YAAYxB,EAAE,CAAC,SAASyB,EAAExB,EAAEC,EAAEwB,GAAG,IAAIvB,EAAEC,EAAEC,EAAEC,EAAE,CAAA,EAAG,IAAID,KAAKH,EAAE,OAAOG,EAAEF,EAAED,EAAEG,GAAG,OAAOA,EAAED,EAAEF,EAAEG,GAAGC,EAAED,GAAGH,EAAEG,GAAG,GAAGsB,UAAUC,OAAO,IAAItB,EAAEuB,SAASF,UAAUC,OAAO,EAAE5B,EAAE8B,KAAKH,UAAU,GAAGD,GAAG,mBAAmBzB,GAAG,MAAMA,EAAE8B,aAAa,IAAI1B,KAAKJ,EAAE8B,kBAAa,IAASzB,EAAED,KAAKC,EAAED,GAAGJ,EAAE8B,aAAa1B,IAAI,OAAO2B,EAAE/B,EAAEK,EAAEH,EAAEC,EAAE,KAAK,CAAC,SAAS4B,EAAEhC,EAAE0B,EAAEvB,EAAEC,EAAEC,GAAG,IAAIC,EAAE,CAAC2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AI4uD,GAASikC,EAAO,CACnC7uE,QAAS,CAACszD,GAAega,GAAgBlY,GAAY0Z,IACrDj/E,QAASk/E,GACTjhF,YAAa,eACbP,cAAe,CACbg/C,KAAM,kBACNxQ,OAAQ,QACRyQ,MAAO,sCAETj7C,cACA2O,SACAlkB,WAEOxmB,QACX","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119]}