idea-react 2.0.0-rc.1 → 2.0.0-rc.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/ReadMe.md CHANGED
@@ -38,8 +38,9 @@ A **[React][1] advanced components library** based on [TypeScript][2] & [Bootstr
38
38
  13. [Editor HTML](source/EditorHTML.tsx)
39
39
  14. [Table Spinner](source/TableSpinner.tsx)
40
40
  15. [Loading](source/Loading.tsx)
41
- 16. [Overlay Box](source/OverlayBox.tsx)
42
- 17. [Dialog](source/Dialog.tsx)
41
+ 16. [Share Box](source/ShareBox.tsx)
42
+ 17. [Overlay Box](source/OverlayBox.tsx)
43
+ 18. [Dialog](source/Dialog.tsx)
43
44
 
44
45
  #### Data components
45
46
 
package/dist/index.d.ts CHANGED
@@ -11,6 +11,7 @@ import { HTMLAttributes } from 'react';
11
11
  import { ImgHTMLAttributes } from 'react';
12
12
  import { InputHTMLAttributes } from 'react';
13
13
  import { JSX as JSX_2 } from 'react/jsx-runtime';
14
+ import { MouseEvent as MouseEvent_2 } from 'react';
14
15
  import { NavProps } from 'react-bootstrap';
15
16
  import { OutputData } from '@editorjs/editorjs';
16
17
  import { OverlayTriggerProps } from 'react-bootstrap';
@@ -91,6 +92,8 @@ export declare type EditorHTMLProps = PropsWithoutRef<{
91
92
 
92
93
  export declare type EditorProps = PropsWithoutRef<WrapperProps & Pick<InputHTMLAttributes<HTMLInputElement>, 'name' | 'required'>>;
93
94
 
95
+ export declare function elementToImage(element: HTMLElement, type?: string, quality?: number): Promise<string>;
96
+
94
97
  declare type HeadingMeta = Record<'id' | 'text', string> & Record<'level' | 'top', number>;
95
98
 
96
99
  export declare const Icon: FC<IconProps>;
@@ -178,6 +181,20 @@ export declare interface SelectProps extends OptionProps, Pick<DropdownButtonPro
178
181
  valueRender?: (value: string) => ReactNode;
179
182
  }
180
183
 
184
+ export declare class ShareBox extends PureComponent<ShareBoxProps> {
185
+ static displayName: string;
186
+ root: RefObject<HTMLDivElement>;
187
+ accessor loading: boolean;
188
+ accessor imageURI: string;
189
+ componentDidMount(): void;
190
+ componentWillUnmount(): void;
191
+ generateImage: () => Promise<void>;
192
+ share: (event: MouseEvent_2<HTMLImageElement>) => Promise<void>;
193
+ render(): JSX_2.Element;
194
+ }
195
+
196
+ export declare type ShareBoxProps = PropsWithChildren<ShareData>;
197
+
181
198
  export declare const SpinnerButton: FC<SpinnerButtonProps>;
182
199
 
183
200
  export declare interface SpinnerButtonProps extends ButtonProps, Pick<SpinnerProps, 'animation'> {
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;AAEA,wBAAwB,IAAI,EAAE,MAAM,GAAG,YAAY,OAAO,CAAC,CAiB1D;AChBD,4BAA6B,SAAQ,kBAAkB,gBAAgB,CAAC;IACpE,IAAI,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,OAAO,MAAM,QAAQ,GAAG,WAAW,CAelC,CAAC;ACdF,iCAAiC,kBAC7B;IACI,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,GAAG,CAAC;IAC1C,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,GAAG,CAAC;CAC7C,GAAG,kBAAkB,eAAe,cAAc,CAAC,EAAE,cAAc,CAAC,CACxE,CAAC;AAEF,0BAA2B,SAAQ,cAAc,kBAAkB,CAAC;IAChE,IAAI,4CAA+B;IAEnC,WAAW,UAAW,UAAU,UAM9B;IAEF,iBAAiB;IAIjB,oBAAoB;IAIpB,MAAM;CAST;ACvCD,6BAA6B,kBAAkB;IAAE,QAAQ,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC;AAErE,0BAA0B,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,cAAc,2CAiB/D;ACrBD,2BAA2B,OAAO,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAAC,CAAC;AAE7D,OAAO,MAAM,eAAe,YAAY,EASvC,CAAC;AAEF,2BAA2B,GAAG,EAAE,MAAM,EAAE,a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AAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC,CAAC;AAaH,OAAO,MAAM,cAAc,GAAG,iBAAiB,CAqB9C,CAAC;ACrCF,4BAA4B,gBAAgB;IACxC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC,CAAC;AAEH,qBACsB,SAAQ,cAAc,aAAa,CAAC;IACtD,MAAM,CAAC,WAAW,SAAc;IAGhC,QAAQ,CAAC,MAAM,SAAM;IAErB,IAAI,EAAE,YAAY,cAAc,CAAC,CAcZ;IAErB,MAAM;CAUT","sources":["source/source/animate.ts","source/source/Avatar.tsx","source/source/ClickBoundary.tsx","source/source/CodeBlock.tsx","source/source/color.ts","source/source/Dialog.tsx","source/source/Editor.tsx","source/source/EditorHTML.tsx","source/source/Icon.tsx","source/source/Loading.tsx","source/source/OverlayBox.tsx","source/source/MonthCalendar.tsx","source/source/Nameplate.tsx","source/source/PageNav.tsx","source/source/Select.tsx","source/source/SpinnerButton.tsx","source/source/TableSpinner.tsx","source/source/TimeDistance.tsx","source/source/TypeEcho.tsx","source/source/index.ts","source/index.ts"],"sourcesContent":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"export * from './animate';\nexport * from './Avatar';\nexport * from './ClickBoundary';\nexport * from './CodeBlock';\nexport * from './color';\nexport * from './Dialog';\nexport * from './Editor';\nexport * from './EditorHTML';\nexport * from './Icon';\nexport * from './Loading';\nexport * from './MonthCalendar';\nexport * from './Nameplate';\nexport * from './OverlayBox';\nexport * from './PageNav';\nexport * from './Select';\nexport * from './SpinnerButton';\nexport * from './TableSpinner';\nexport * from './TimeDistance';\nexport * from './TypeEcho';\n"],"names":[],"version":3,"file":"index.d.ts.map"}
1
+ {"mappings":";;;;;;;;AAEA,wBAAwB,IAAI,EAAE,MAAM,GAAG,YAAY,OAAO,CAAC,CAi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,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC,CAAC;AAaH,OAAO,MAAM,cAAc,GAAG,iBAAiB,CAqB9C,CAAC;ACrCF,4BAA4B,gBAAgB;IACxC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC,CAAC;AAEH,qBACsB,SAAQ,cAAc,aAAa,CAAC;IACtD,MAAM,CAAC,WAAW,SAAc;IAGhC,QAAQ,CAAC,MAAM,SAAM;IAErB,IAAI,EAAE,YAAY,cAAc,CAAC,CAcZ;IAErB,MAAM;CAUT","sources":["source/source/animate.ts","source/source/Avatar.tsx","source/source/ClickBoundary.tsx","source/source/CodeBlock.tsx","source/source/color.ts","source/source/Dialog.tsx","source/source/Editor.tsx","source/source/EditorHTML.tsx","source/source/Icon.tsx","source/source/Loading.tsx","source/source/OverlayBox.tsx","source/source/MonthCalendar.tsx","source/source/Nameplate.tsx","source/source/PageNav.tsx","source/source/Select.tsx","source/source/ShareBox.tsx","source/source/SpinnerButton.tsx","source/source/TableSpinner.tsx","source/source/TimeDistance.tsx","source/source/TypeEcho.tsx","source/source/index.ts","source/index.ts"],"sourcesContent":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"export * from './animate';\nexport * from './Avatar';\nexport * from './ClickBoundary';\nexport * from './CodeBlock';\nexport * from './color';\nexport * from './Dialog';\nexport * from './Editor';\nexport * from './EditorHTML';\nexport * from './Icon';\nexport * from './Loading';\nexport * from './MonthCalendar';\nexport * from './Nameplate';\nexport * from './OverlayBox';\nexport * from './PageNav';\nexport * from './Select';\nexport * from './ShareBox';\nexport * from './SpinnerButton';\nexport * from './TableSpinner';\nexport * from './TimeDistance';\nexport * from './TypeEcho';\n"],"names":[],"version":3,"file":"index.d.ts.map"}
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- var e,t,r,n,a,o,i,c,l,s,u,d,f,p,v,h,m,y,b,g,w,j,O,x,_,P,k,T,E,S,N,D,C,I,M,q,Y,A,z,L,F,B,V,W,H,G,J,R,U,K,Q,X,Z,$,ee,et,er,en,ea,eo,ei,ec,el,es,eu,ed=require("@swc/helpers/cjs/_sliced_to_array.cjs"),ef=require("@swc/helpers/cjs/_to_consumable_array.cjs"),ep=require("react/jsx-runtime"),ev=require("classnames"),eh=require("@swc/helpers/cjs/_assert_this_initialized.cjs"),em=require("@swc/helpers/cjs/_class_call_check.cjs"),ey=require("@swc/helpers/cjs/_create_class.cjs"),eb=require("@swc/helpers/cjs/_inherits.cjs"),eg=require("@swc/helpers/cjs/_create_super.cjs"),ew=require("react"),ej=require("prismjs"),eO=require("react-element-to-jsx-string"),ex=require("@swc/helpers/cjs/_wrap_native_super.cjs"),e_=require("iterable-observer"),eP=require("mobx"),ek=require("mobx-react"),eT=require("@swc/helpers/cjs/_type_of.cjs"),eE=require("@swc/helpers/cjs/_ts_generator.cjs"),eS=require("react-editor-js"),eN=require("editorjs-html"),eD=require("react-bootstrap"),eC=require("mobx-react-helper"),eI=require("web-utility");function eM(e,t){return Object.keys(t).forEach(function(r){"default"===r||"__esModule"===r||Object.prototype.hasOwnProperty.call(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[r]}})}),e}function eq(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}function eY(e){return e&&e.__esModule?e.default:e}var eA={};function ez(e){return function(t){return t&&new IntersectionObserver(function(t,r){var n,a,o=(0,ed._)(t,1)[0],i=o.isIntersecting,c=o.target;if(i){var l=["animate__animated","animate__".concat(e)];(n=c.classList).add.apply(n,(0,ef._)(l)),c.addEventListener("animationend",function(){return(a=c.classList).remove.apply(a,(0,ef._)(l))},{once:!0}),r.disconnect()}}).observe(t)}}eq(eA,"animate",function(){return ez});var eL={};eq(eL,"Avatar",function(){return eB});var eF=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)0>t.indexOf(n[a])&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r},eB=function(e){var t=e.className,r=e.style,n=e.size,a=void 0===n?3:n,o=eF(e,["className","style","size"]);return(0,ep.jsx)("img",Object.assign({className:eY(ev)("object-fit-cover rounded-circle",t),style:Object.assign({width:"".concat(a,"rem"),height:"".concat(a,"rem")},r)},o))};eB.displayName="Avatar";var eV={};eq(eV,"ClickBoundary",function(){return eH});var eW=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)0>t.indexOf(n[a])&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r},eH=function(e){(0,eb._)(r,e);var t=(0,eg._)(r);function r(){var e;return(0,em._)(this,r),e=t.call.apply(t,[this].concat(Array.prototype.slice.call(arguments))),Object.defineProperty((0,eh._)(e),"root",{enumerable:!0,configurable:!0,writable:!0,value:(0,ew.createRef)()}),Object.defineProperty((0,eh._)(e),"switchClick",{enumerable:!0,configurable:!0,writable:!0,value:function(t){var r,n=e.props,a=n.onInnerClick,o=n.onOuterClick;(null===(r=e.root.current)||void 0===r?void 0:r.contains(t.target))?null==a||a(t):null==o||o(t)}}),e}return(0,ey._)(r,[{key:"componentDidMount",value:function(){window.addEventListener("click",this.switchClick,!0)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("click",this.switchClick,!0)}},{key:"render",value:function(){var e=this.props,t=e.children,r=(e.onInnerClick,e.onOuterClick,eW(e,["children","onInnerClick","onOuterClick"]));return(0,ep.jsx)("div",Object.assign({ref:this.root},r,{children:t}))}}]),r}(ew.PureComponent),eG={};function eJ(e){var t=e.language,r=e.children,n=(0,ej.highlight)(eY(eO)((0,ew.isValidElement)(r)?r:(0,ep.jsx)(ep.Fragment,{children:r})),ej.languages[t],t);return(0,ep.jsx)("pre",{children:(0,ep.jsx)("code",{className:"language-".concat(t),dangerouslySetInnerHTML:{__html:n}})})}eq(eG,"CodeBlock",function(){return eJ});var eR={};eq(eR,"VariantColors",function(){return eU}),eq(eR,"text2color",function(){return eK});var eU=["primary","secondary","success","danger","warning","info","dark","light"];function eK(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=t[0]?eU.filter(function(e){return!t.find(function(t){return t===e})}):eU;return r[(0,ef._)(e).reduce(function(e,t){return e+t.charCodeAt(0)},0)%r.length]}var eQ={};eq(eQ,"DialogClose",function(){return e0}),eq(eQ,"Dialog",function(){return e1});var eX=function(e,t,r){for(var n=arguments.length>2,a=0;a<t.length;a++)r=n?t[a].call(e,r):t[a].call(e);return n?r:void 0},eZ=function(e,t,r,n){if("a"===r&&!n)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)},e$=function(e,t,r,n,a){if("m"===n)throw TypeError("Private method is not writable");if("a"===n&&!a)throw TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!a:!t.has(e))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?a.call(e,r):a?a.value=r:t.set(e,r),r},e0=function(e){(0,eb._)(r,e);var t=(0,eg._)(r);function r(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"Dialog closed";return(0,em._)(this,r),t.call(this,e)}return r}((0,ex._)(Error)),e1=(r=[],n=[],e=function(){function e(a){var o=this;(0,em._)(this,e),t.set(this,(eX(this,r),eX(this,n,void 0))),Object.defineProperty(this,"Component",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.Component=(0,ek.observer)(function(){return(0,ep.jsx)(a,{defer:o.defer})}),this.Component.displayName="DialogComponent"}return(0,ey._)(e,[{key:"defer",get:function(){return eZ(this,t,"f")},set:function(e){e$(this,t,e,"f")}},{key:"open",value:function(){var e=this;return this.defer=new e_.Defer,this.defer.promise.finally(function(){return e.defer=void 0}),this.defer.promise}}]),e}(),t=new WeakMap,a="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0,function(e,t,r,n,a,o){function i(e){if(void 0!==e&&"function"!=typeof e)throw TypeError("Function expected");return e}for(var c,l=n.kind,s="getter"===l?"get":"setter"===l?"set":"value",u=!t&&e?n.static?e:e.prototype:null,d=t||(u?Object.getOwnPropertyDescriptor(u,n.name):{}),f=!1,p=r.length-1;p>=0;p--){var v={};for(var h in n)v[h]="access"===h?{}:n[h];for(var h in n.access)v.access[h]=n.access[h];v.addInitializer=function(e){if(f)throw TypeError("Cannot add initializers after decoration has completed");o.push(i(e||null))};var m=(0,r[p])("accessor"===l?{get:d.get,set:d.set}:d[s],v);if("accessor"===l){if(void 0===m)continue;if(null===m||"object"!=typeof m)throw TypeError("Object expected");(c=i(m.get))&&(d.get=c),(c=i(m.set))&&(d.set=c),(c=i(m.init))&&a.unshift(c)}else(c=i(m))&&("field"===l?a.unshift(c):d[s]=c)}u&&Object.defineProperty(u,n.name,d),f=!0}(e,null,[eP.observable],{kind:"accessor",name:"defer",static:!1,private:!1,access:{has:function(e){return"defer"in e},get:function(e){return e.defer},set:function(e,t){e.defer=t}},metadata:a},n,r),a&&Object.defineProperty(e,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:a}),e),e2={};eq(e2,"Editor",function(){return e9});var e3=function(e,t,r){for(var n=arguments.length>2,a=0;a<t.length;a++)r=n?t[a].call(e,r):t[a].call(e);return n?r:void 0},e4=function(e,t,r,n,a,o){function i(e){if(void 0!==e&&"function"!=typeof e)throw TypeError("Function expected");return e}for(var c,l=n.kind,s="getter"===l?"get":"setter"===l?"set":"value",u=!t&&e?n.static?e:e.prototype:null,d=t||(u?Object.getOwnPropertyDescriptor(u,n.name):{}),f=!1,p=r.length-1;p>=0;p--){var v={};for(var h in n)v[h]="access"===h?{}:n[h];for(var h in n.access)v.access[h]=n.access[h];v.addInitializer=function(e){if(f)throw TypeError("Cannot add initializers after decoration has completed");o.push(i(e||null))};var m=(0,r[p])("accessor"===l?{get:d.get,set:d.set}:d[s],v);if("accessor"===l){if(void 0===m)continue;if(null===m||"object"!=typeof m)throw TypeError("Object expected");(c=i(m.get))&&(d.get=c),(c=i(m.set))&&(d.set=c),(c=i(m.init))&&a.unshift(c)}else(c=i(m))&&("field"===l?a.unshift(c):d[s]=c)}u&&Object.defineProperty(u,n.name,d),f=!0},e5=function(e,t,r,n){if("a"===r&&!n)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)},e7=function(e,t,r,n,a){if("m"===n)throw TypeError("Private method is not writable");if("a"===n&&!a)throw TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!a:!t.has(e))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?a.call(e,r):a?a.value=r:t.set(e,r),r},e8=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)0>t.indexOf(n[a])&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r},e6=(0,eS.createReactEditorJS)(),e9=(l=[ek.observer],s=[],u=ew.PureComponent,d=[],f=[],c=function(e){(0,eb._)(r,e);var t=(0,eg._)(r);function r(){var e;return(0,em._)(this,r),e=t.call.apply(t,[this].concat(Array.prototype.slice.call(arguments))),Object.defineProperty((0,eh._)(e),"core",{enumerable:!0,configurable:!0,writable:!0,value:void e3((0,eh._)(e),d)}),o.set((0,eh._)(e),e3((0,eh._)(e),f,e.props.defaultValue)),Object.defineProperty((0,eh._)(e),"save",{enumerable:!0,configurable:!0,writable:!0,value:function(){var t,r,n,a;return t=(0,eh._)(e),r=void 0,n=void 0,a=function(){var e,t;return(0,eE._)(this,function(r){switch(r.label){case 0:if(!(e=this.core))return[3,2];return t=this,[4,this.core.save()];case 1:e=t.innerValue=r.sent(),r.label=2;case 2:return[2,e]}})},new(n||(n=Promise))(function(e,o){function i(e){try{l(a.next(e))}catch(e){o(e)}}function c(e){try{l(a.throw(e))}catch(e){o(e)}}function l(t){var r;t.done?e(t.value):((r=t.value)instanceof n?r:new n(function(e){e(r)})).then(i,c)}l((a=a.apply(t,r||[])).next())})}}),e}return(0,ey._)(r,[{key:"innerValue",get:function(){return e5(this,o,"f")},set:function(e){e7(this,o,e,"f")}},{key:"render",value:function(){var e=this,t=this.props,r=t.name,n=t.required,a=(t.children,e8(t,["name","required","children"])),o=this.innerValue;return(0,ep.jsxs)("div",{className:"form-control",tabIndex:-1,onBlur:this.save,children:[(0,ep.jsx)("input",{hidden:!0,name:r,required:n,value:JSON.stringify(o)}),(0,ep.jsx)(e6,Object.assign({},a,{onInitialize:function(t){var r;e.core=t,null===(r=a.onInitialize)||void 0===r||r.call(a,t)}}))]})}}]),r}(u),o=new WeakMap,p=c,v="Editor","symbol"===(0,eT._)(v)&&(v=v.description?"[".concat(v.description,"]"):""),Object.defineProperty(p,"name",{configurable:!0,value:h?"".concat(h," ",v):v}),y="function"==typeof Symbol&&Symbol.metadata?Object.create(null!==(m=u[Symbol.metadata])&&void 0!==m?m:null):void 0,e4(c,null,[eP.observable],{kind:"accessor",name:"innerValue",static:!1,private:!1,access:{has:function(e){return"innerValue"in e},get:function(e){return e.innerValue},set:function(e,t){e.innerValue=t}},metadata:y},f,d),e4(null,i={value:c},l,{kind:"class",name:c.name,metadata:y},null,s),c=i.value,y&&Object.defineProperty(c,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:y}),Object.defineProperty(c,"displayName",{enumerable:!0,configurable:!0,writable:!0,value:"Editor"}),e3(c,s),c),te={};eq(te,"parser",function(){return tt}),eq(te,"EditorHTML",function(){return tr});var tt=eY(eN)({link:function(e){var t=e.data.link;return'<a href="'.concat(t,'">').concat(t,"</a>")}}),tr=function(e){var t=e.className,r=e.data,n=tt.parse(r).join("");return(0,ep.jsx)("article",{className:t,dangerouslySetInnerHTML:{__html:n}})};tr.displayName="EditorHTML";var tn={};eq(tn,"Icon",function(){return to});var ta=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)0>t.indexOf(n[a])&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r},to=function(e){var t=e.className,r=e.style,n=e.name,a=e.size,o=ta(e,["className","style","name","size"]);return(0,ep.jsx)("i",Object.assign({className:eY(ev)("bi-".concat(n),t),style:Object.assign({fontSize:a&&"".concat(a,"rem")},r)},o))};to.displayName="Icon";var ti={};eq(ti,"Loading",function(){return tc});var tc=function(e){var t=e.children;return(0,ep.jsxs)("div",{className:"fixed-top h-100 w-100 d-flex justify-content-center align-items-center opacity-25 bg-black",children:[(0,ep.jsx)(eD.Spinner,{animation:"border",variant:"success"}),(0,ep.jsx)("span",{className:"ml-3 text-white",children:void 0===t?"Loading...":t})]})};tc.displayName="Loading";var tl={};eq(tl,"MonthCalendar",function(){return ty});var ts={};eq(ts,"OverlayBox",function(){return td});var tu=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)0>t.indexOf(n[a])&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r},td=function(e){var t=e.title,r=e.detail,n=e.children,a=tu(e,["title","detail","children"]);return(0,ep.jsx)(eD.OverlayTrigger,Object.assign({},a,{overlay:r?(0,ep.jsxs)(eD.Popover,{children:[(0,ep.jsx)(eD.Popover.Header,{children:t}),(0,ep.jsx)(eD.Popover.Body,{children:r})]}):(0,ep.jsx)(eD.Tooltip,{children:t}),children:n}))};td.displayName="OverlayBox";var tf=function(e,t,r,n,a,o){function i(e){if(void 0!==e&&"function"!=typeof e)throw TypeError("Function expected");return e}for(var c,l=n.kind,s="getter"===l?"get":"setter"===l?"set":"value",u=!t&&e?n.static?e:e.prototype:null,d=t||(u?Object.getOwnPropertyDescriptor(u,n.name):{}),f=!1,p=r.length-1;p>=0;p--){var v={};for(var h in n)v[h]="access"===h?{}:n[h];for(var h in n.access)v.access[h]=n.access[h];v.addInitializer=function(e){if(f)throw TypeError("Cannot add initializers after decoration has completed");o.push(i(e||null))};var m=(0,r[p])("accessor"===l?{get:d.get,set:d.set}:d[s],v);if("accessor"===l){if(void 0===m)continue;if(null===m||"object"!=typeof m)throw TypeError("Object expected");(c=i(m.get))&&(d.get=c),(c=i(m.set))&&(d.set=c),(c=i(m.init))&&a.unshift(c)}else(c=i(m))&&("field"===l?a.unshift(c):d[s]=c)}u&&Object.defineProperty(u,n.name,d),f=!0},tp=function(e,t,r){for(var n=arguments.length>2,a=0;a<t.length;a++)r=n?t[a].call(e,r):t[a].call(e);return n?r:void 0},tv=function(e,t,r,n){if("a"===r&&!n)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)},th=function(e,t,r,n,a){if("m"===n)throw TypeError("Private method is not writable");if("a"===n&&!a)throw TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!a:!t.has(e))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?a.call(e,r):a?a.value=r:t.set(e,r),r},tm=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)0>t.indexOf(n[a])&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r},ty=(_=[ek.observer,eC.observePropsState],P=[],k=ew.Component,T=[],E=[],w=function(e){(0,eb._)(r,e);var t=(0,eg._)(r);function r(){var e;return(0,em._)(this,r),e=t.call.apply(t,[this].concat(Array.prototype.slice.call(arguments))),b.set((0,eh._)(e),(tp((0,eh._)(e),T),tp((0,eh._)(e),E,new Date))),Object.defineProperty((0,eh._)(e),"renderDate",{enumerable:!0,configurable:!0,writable:!0,value:function(t){var r=e.observedProps,n=(r.variant,r.value),a=r.onSelect,o=(0,eI.formatDate)(t,"YYYY-MM-DD"),i=null==n?void 0:n.filter(function(e){var t=e.date;return(0,eI.formatDate)(t,"YYYY-MM-DD")===o});return(0,ep.jsxs)("td",{className:eY(ev)({"opacity-50":t.getMonth()!==e.currentDate.getMonth(),"fw-bold":o===(0,eI.formatDate)(new Date,"YYYY-MM-DD")}),children:[(0,ep.jsx)("time",{className:"d-block",dateTime:t.toJSON(),children:t.getDate()}),null==i?void 0:i.map(function(e){return"object"==typeof e.content?e.content:(0,ep.jsx)(td,{title:e.content,children:(0,ep.jsx)(eD.Badge,{as:"a",className:"d-inline-block text-decoration-none w-100 text-truncate",bg:eK(e.content+"",["light"]),href:e.link,onClick:function(){return null==a?void 0:a(e)},children:e.content})},e.date+"")})]},t+"")}}),e}return(0,ey._)(r,[{key:"weekFormatter",get:function(){var e,t=this.observedProps.locale,r=void 0===t?null===(e=globalThis.navigator)||void 0===e?void 0:e.language:t;return new Intl.DateTimeFormat(r,{weekday:"long"})}},{key:"currentDate",get:function(){return tv(this,b,"f")},set:function(e){th(this,b,e,"f")}},{key:"dateGrid",get:function(){var e=new Date(this.currentDate);e.setDate(1),e=new Date(+e-e.getDay()*eI.Day);var t=Array.from(Array(42),function(t,r){return new Date(+e+r*eI.Day)});return(0,eI.splitArray)(t,7)}},{key:"changeMonth",value:function(e){var t,r;this.currentDate=(0,eI.changeMonth)(this.currentDate,e),null===(r=(t=this.props).onChange)||void 0===r||r.call(t,this.currentDate)}},{key:"render",value:function(){var e=this,t=this.weekFormatter,r=this.currentDate,n=this.dateGrid,a=this.observedProps,o=a.style,i=a.variant,c=void 0===i?"primary":i,l=(a.onChange,a.onSelect,tm(a,["style","variant","onChange","onSelect"]));return(0,ep.jsxs)(eD.Table,Object.assign({},l,{style:Object.assign({tableLayout:"fixed"},o),children:[(0,ep.jsx)("caption",{children:(0,ep.jsxs)("div",{className:"d-flex justify-content-between align-items-center",children:[(0,ep.jsx)(eD.Button,{variant:c,onClick:function(){return e.changeMonth(-1)},children:"<"}),(0,eI.formatDate)(r,"YYYY-MM"),(0,ep.jsx)(eD.Button,{variant:c,onClick:function(){return e.changeMonth(1)},children:">"})]})}),(0,ep.jsx)("thead",{children:(0,ep.jsx)("tr",{children:n[0].map(function(e,r,n){var a=n.length;return(0,ep.jsx)("td",{className:"bg-".concat(c," text-white"),style:{width:"calc(100% / ".concat(a,")")},children:t.format(e)},r)})})}),(0,ep.jsx)("tbody",{children:n.map(function(t){return(0,ep.jsx)("tr",{children:t.map(e.renderDate)},t[0]+"")})})]}))}}]),r}(k),b=new WeakMap,S=w,N="MonthCalendar","symbol"===(0,eT._)(N)&&(N=N.description?"[".concat(N.description,"]"):""),Object.defineProperty(S,"name",{configurable:!0,value:D?"".concat(D," ",N):N}),I="function"==typeof Symbol&&Symbol.metadata?Object.create(null!==(C=k[Symbol.metadata])&&void 0!==C?C:null):void 0,j=[eP.computed],O=[eP.observable],x=[eP.computed],tf(w,null,j,{kind:"getter",name:"weekFormatter",static:!1,private:!1,access:{has:function(e){return"weekFormatter"in e},get:function(e){return e.weekFormatter}},metadata:I},null,T),tf(w,null,O,{kind:"accessor",name:"currentDate",static:!1,private:!1,access:{has:function(e){return"currentDate"in e},get:function(e){return e.currentDate},set:function(e,t){e.currentDate=t}},metadata:I},E,T),tf(w,null,x,{kind:"getter",name:"dateGrid",static:!1,private:!1,access:{has:function(e){return"dateGrid"in e},get:function(e){return e.dateGrid}},metadata:I},null,T),tf(null,g={value:w},_,{kind:"class",name:w.name,metadata:I},null,P),w=g.value,I&&Object.defineProperty(w,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:I}),Object.defineProperty(w,"displayName",{enumerable:!0,configurable:!0,writable:!0,value:"MonthCalendar"}),tp(w,P),w),tb={};eq(tb,"Nameplate",function(){return tg});var tg=function(e){var t=e.avatar,r=e.name;return(0,ep.jsxs)(ep.Fragment,{children:[(0,ep.jsx)(eB,{size:2,style:{marginRight:"0.5rem"},src:t}),(0,ep.jsx)("span",{className:"align-middle",children:r})]})};tg.displayName="Nameplate";var tw={};eq(tw,"PageNav",function(){return tT});var tj=function(e,t,r,n,a,o){function i(e){if(void 0!==e&&"function"!=typeof e)throw TypeError("Function expected");return e}for(var c,l=n.kind,s="getter"===l?"get":"setter"===l?"set":"value",u=!t&&e?n.static?e:e.prototype:null,d=t||(u?Object.getOwnPropertyDescriptor(u,n.name):{}),f=!1,p=r.length-1;p>=0;p--){var v={};for(var h in n)v[h]="access"===h?{}:n[h];for(var h in n.access)v.access[h]=n.access[h];v.addInitializer=function(e){if(f)throw TypeError("Cannot add initializers after decoration has completed");o.push(i(e||null))};var m=(0,r[p])("accessor"===l?{get:d.get,set:d.set}:d[s],v);if("accessor"===l){if(void 0===m)continue;if(null===m||"object"!=typeof m)throw TypeError("Object expected");(c=i(m.get))&&(d.get=c),(c=i(m.set))&&(d.set=c),(c=i(m.init))&&a.unshift(c)}else(c=i(m))&&("field"===l?a.unshift(c):d[s]=c)}u&&Object.defineProperty(u,n.name,d),f=!0},tO=function(e,t,r){for(var n=arguments.length>2,a=0;a<t.length;a++)r=n?t[a].call(e,r):t[a].call(e);return n?r:void 0},tx=function(e,t,r,n){if("a"===r&&!n)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)},t_=function(e,t,r,n,a){if("m"===n)throw TypeError("Private method is not writable");if("a"===n&&!a)throw TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!a:!t.has(e))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?a.call(e,r):a?a.value=r:t.set(e,r),r},tP=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)0>t.indexOf(n[a])&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r},tk=Array.from(Array(6),function(e,t){return"h".concat(++t)})+"",tT=(B=[ek.observer],V=[],W=ew.PureComponent,H=[],G=[],J=[],A=function(e){(0,eb._)(r,e);var t=(0,eg._)(r);function r(){var e;return(0,em._)(this,r),e=t.call.apply(t,[this].concat(Array.prototype.slice.call(arguments))),M.set((0,eh._)(e),(tO((0,eh._)(e),H),tO((0,eh._)(e),G,[]))),q.set((0,eh._)(e),tO((0,eh._)(e),J,0)),Object.defineProperty((0,eh._)(e),"updateScrollY",{enumerable:!0,configurable:!0,writable:!0,value:function(){return e.scrollY=window.scrollY}}),Object.defineProperty((0,eh._)(e),"scrollTo",{enumerable:!0,configurable:!0,writable:!0,value:function(t){return function(){var r,n;setTimeout(function(){return(0,eI.scrollTo)('[id="'.concat(t.id,'"]'))}),null===(n=(r=e.props).onItemClick)||void 0===n||n.call(r,t)}}}),Object.defineProperty((0,eh._)(e),"renderLink",{enumerable:!0,configurable:!0,writable:!0,value:function(t){var r=t.id,n=t.level,a=t.text,o=t.top,i=(0,eh._)(e).currentActiveId,c=e.props.depth;return n<=(void 0===c?1/0:c)&&(0,ep.jsx)(eD.Nav.Item,{style:{textIndent:"".concat(n-1,"rem")},children:(0,ep.jsx)(eD.Nav.Link,{href:"#".concat(r),active:i===r,onClick:e.scrollTo({id:r,level:n,text:a,top:o}),children:a})},r)}}),e}return(0,ey._)(r,[{key:"list",get:function(){return tx(this,M,"f")},set:function(e){t_(this,M,e,"f")}},{key:"scrollY",get:function(){return tx(this,q,"f")},set:function(e){t_(this,q,e,"f")}},{key:"currentActiveId",get:function(){var e,t=this.list,r=this.scrollY,n=t.findIndex(function(e){return e.top>r});return null===(e=t[n-1])||void 0===e?void 0:e.id}},{key:"componentDidMount",value:function(){globalThis.document&&(window.addEventListener("scroll",this.updateScrollY),this.list=Array.from(document.querySelectorAll(tk),function(e){e.id||(e.id=(0,eI.uniqueID)());var t=e.id,r=e.tagName,n=e.textContent,a=e.offsetTop;return{id:t,level:+r[1],text:n.trim(),top:a}}))}},{key:"componentWillUnmount",value:function(){var e;null===(e=globalThis.removeEventListener)||void 0===e||e.call(globalThis,"scroll",this.updateScrollY)}},{key:"render",value:function(){var e=this.list,t=this.props,r=t.style,n=t.variant,a=tP(t,["style","variant"]);return(0,ep.jsx)(eD.Nav,Object.assign({},a,{variant:void 0===n?"underline":n,style:Object.assign({flexDirection:"column"},r),children:e.map(this.renderLink)}))}}]),r}(W),M=new WeakMap,q=new WeakMap,R=A,U="PageNav","symbol"===(0,eT._)(U)&&(U=U.description?"[".concat(U.description,"]"):""),Object.defineProperty(R,"name",{configurable:!0,value:K?"".concat(K," ",U):U}),X="function"==typeof Symbol&&Symbol.metadata?Object.create(null!==(Q=W[Symbol.metadata])&&void 0!==Q?Q:null):void 0,z=[eP.observable],L=[eP.observable],F=[eP.computed],tj(A,null,z,{kind:"accessor",name:"list",static:!1,private:!1,access:{has:function(e){return"list"in e},get:function(e){return e.list},set:function(e,t){e.list=t}},metadata:X},G,H),tj(A,null,L,{kind:"accessor",name:"scrollY",static:!1,private:!1,access:{has:function(e){return"scrollY"in e},get:function(e){return e.scrollY},set:function(e,t){e.scrollY=t}},metadata:X},J,H),tj(A,null,F,{kind:"getter",name:"currentActiveId",static:!1,private:!1,access:{has:function(e){return"currentActiveId"in e},get:function(e){return e.currentActiveId}},metadata:X},null,H),tj(null,Y={value:A},B,{kind:"class",name:A.name,metadata:X},null,V),A=Y.value,X&&Object.defineProperty(A,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:X}),Object.defineProperty(A,"displayName",{enumerable:!0,configurable:!0,writable:!0,value:"PageNav"}),tO(A,V),A),tE={};eq(tE,"Option",function(){return tN}),eq(tE,"Select",function(){return tD});var tS=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)0>t.indexOf(n[a])&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r},tN=function(e){var t=e.value,r=e.children,n=tS(e,["value","children"]);return(0,ep.jsx)(eD.Dropdown.Item,Object.assign({},n,{"data-value":t,children:r}))};tN.displayName="Option";var tD=function(e){var t=e.className,r=e.style,n=e.variant,a=e.menuVariant,o=e.children,i=e.value,c=e.onChange,l=e.valueRender,s=(0,eI.makeArray)(o).flat(1/0).find(function(e){return(0,ew.isValidElement)(e)&&e.type===tN&&e.props.value===i});return(0,ep.jsxs)(eD.Dropdown,{onClick:function(e){var t=e.target.closest(".dropdown-item");if(t){var r=t.dataset.value;null==c||c(r)}},children:[(0,ep.jsx)(eD.Dropdown.Toggle,{className:eY(ev)("w-100","d-flex","justify-content-between","align-items-center",!n&&"bg-white text-dark",t),style:r,variant:n,children:(null==l?void 0:l(i))||(0,ep.jsx)("div",{className:null==s?void 0:s.props.className,children:null==s?void 0:s.props.children})}),(0,ep.jsx)(eD.Dropdown.Menu,{variant:a,children:o})]})};tD.displayName="Select";var tC={};eq(tC,"SpinnerButton",function(){return tM});var tI=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)0>t.indexOf(n[a])&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r},tM=function(e){var t=e.animation,r=e.loading,n=e.disabled,a=e.children,o=tI(e,["animation","loading","disabled","children"]);return(0,ep.jsxs)(eD.Button,Object.assign({},o,{disabled:r||n,children:[r&&(0,ep.jsxs)(ep.Fragment,{children:[(0,ep.jsx)(eD.Spinner,{as:"span",className:a?"me-2":"",size:"sm",animation:t,role:"status","aria-hidden":"true"}),!a&&(0,ep.jsx)("span",{className:"visually-hidden",children:"Loading..."})]}),a]}))};tM.displayName="SpinnerButton";var tq={};eq(tq,"TableSpinner",function(){return tY});var tY=function(e){var t=e.colSpan;return(0,ep.jsx)("tr",{children:(0,ep.jsx)("td",{className:"text-center p-4",colSpan:t,children:(0,ep.jsx)(eD.Spinner,{animation:"border",variant:"primary"})})})};tY.displayName="TableSpinner";var tA={};eq(tA,"TimeDistance",function(){return tL});var tz={ms:"millisecond(s)",s:"second(s)",m:"minute(s)",H:"hour(s)",D:"day(s)",W:"week(s)",M:"month(s)",Y:"year(s)"},tL=function(e){var t=e.className,r=e.date,n=e.unitWords,a=void 0===n?tz:n,o=e.beforeWord,i=e.afterWord;r=new Date(r);var c=(0,eI.diffTime)(r),l=c.distance,s=c.unit;return(0,ep.jsxs)("time",{className:t,dateTime:r.toJSON(),title:r.toLocaleString(),children:[Math.abs(l)," ",a[s],l<0?void 0===o?" before":o:void 0===i?" after":i]})};tL.displayName="TimeDistance";var tF={};eq(tF,"TypeEcho",function(){return tG});var tB=function(e,t,r,n,a,o){function i(e){if(void 0!==e&&"function"!=typeof e)throw TypeError("Function expected");return e}for(var c,l=n.kind,s="getter"===l?"get":"setter"===l?"set":"value",u=!t&&e?n.static?e:e.prototype:null,d=t||(u?Object.getOwnPropertyDescriptor(u,n.name):{}),f=!1,p=r.length-1;p>=0;p--){var v={};for(var h in n)v[h]="access"===h?{}:n[h];for(var h in n.access)v.access[h]=n.access[h];v.addInitializer=function(e){if(f)throw TypeError("Cannot add initializers after decoration has completed");o.push(i(e||null))};var m=(0,r[p])("accessor"===l?{get:d.get,set:d.set}:d[s],v);if("accessor"===l){if(void 0===m)continue;if(null===m||"object"!=typeof m)throw TypeError("Object expected");(c=i(m.get))&&(d.get=c),(c=i(m.set))&&(d.set=c),(c=i(m.init))&&a.unshift(c)}else(c=i(m))&&("field"===l?a.unshift(c):d[s]=c)}u&&Object.defineProperty(u,n.name,d),f=!0},tV=function(e,t,r){for(var n=arguments.length>2,a=0;a<t.length;a++)r=n?t[a].call(e,r):t[a].call(e);return n?r:void 0},tW=function(e,t,r,n){if("a"===r&&!n)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)},tH=function(e,t,r,n,a){if("m"===n)throw TypeError("Private method is not writable");if("a"===n&&!a)throw TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!a:!t.has(e))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?a.call(e,r):a?a.value=r:t.set(e,r),r},tG=(et=[ek.observer],er=[],en=ew.PureComponent,ea=[],eo=[],ee=function(e){(0,eb._)(r,e);var t=(0,eg._)(r);function r(){var e;return(0,em._)(this,r),e=t.call.apply(t,[this].concat(Array.prototype.slice.call(arguments))),Z.set((0,eh._)(e),(tV((0,eh._)(e),ea),tV((0,eh._)(e),eo,""))),Object.defineProperty((0,eh._)(e),"init",{enumerable:!0,configurable:!0,writable:!0,value:function(t){return t&&new IntersectionObserver(function(t,r){var n,a,o,i=(0,ed._)(t,1)[0].isIntersecting;return n=void 0,a=void 0,o=function(){var e,t,n,a,o,c,l,s,u,d,f;return(0,eE._)(this,function(p){switch(p.label){case 0:if(!i)return[2];r.disconnect(),t=(e=this.props).text,a=void 0===(n=e.intervals)?150:n,o=!0,c=!1,l=void 0,p.label=1;case 1:p.trys.push([1,6,7,8]),s=t[Symbol.iterator](),p.label=2;case 2:if(o=(u=s.next()).done)return[3,5];return d=u.value,[4,(0,eI.sleep)(a/1e3)];case 3:p.sent(),this.echoed+=d,p.label=4;case 4:return o=!0,[3,2];case 5:return[3,8];case 6:return f=p.sent(),c=!0,l=f,[3,8];case 7:try{o||null==s.return||s.return()}finally{if(c)throw l}return[7];case 8:return[2]}})},new(a||(a=Promise))(function(t,r){function i(e){try{l(o.next(e))}catch(e){r(e)}}function c(e){try{l(o.throw(e))}catch(e){r(e)}}function l(e){var r;e.done?t(e.value):((r=e.value)instanceof a?r:new a(function(e){e(r)})).then(i,c)}l((o=o.apply(e,n||[])).next())})}).observe(t)}}),e}return(0,ey._)(r,[{key:"echoed",get:function(){return tW(this,Z,"f")},set:function(e){tH(this,Z,e,"f")}},{key:"render",value:function(){var e=this.props,t=e.className,r=e.text,n=this.echoed;return(0,ep.jsx)("pre",{className:eY(ev)("text-wrap",t),ref:this.init,children:n+(n===r?"":"_")})}}]),r}(en),Z=new WeakMap,ei=ee,ec="TypeEcho","symbol"===(0,eT._)(ec)&&(ec=ec.description?"[".concat(ec.description,"]"):""),Object.defineProperty(ei,"name",{configurable:!0,value:el?"".concat(el," ",ec):ec}),eu="function"==typeof Symbol&&Symbol.metadata?Object.create(null!==(es=en[Symbol.metadata])&&void 0!==es?es:null):void 0,tB(ee,null,[eP.observable],{kind:"accessor",name:"echoed",static:!1,private:!1,access:{has:function(e){return"echoed"in e},get:function(e){return e.echoed},set:function(e,t){e.echoed=t}},metadata:eu},eo,ea),tB(null,$={value:ee},et,{kind:"class",name:ee.name,metadata:eu},null,er),ee=$.value,eu&&Object.defineProperty(ee,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:eu}),Object.defineProperty(ee,"displayName",{enumerable:!0,configurable:!0,writable:!0,value:"TypeEcho"}),tV(ee,er),ee);eM(module.exports,eA),eM(module.exports,eL),eM(module.exports,eV),eM(module.exports,eG),eM(module.exports,eR),eM(module.exports,eQ),eM(module.exports,e2),eM(module.exports,te),eM(module.exports,tn),eM(module.exports,ti),eM(module.exports,tl),eM(module.exports,tb),eM(module.exports,ts),eM(module.exports,tw),eM(module.exports,tE),eM(module.exports,tC),eM(module.exports,tq),eM(module.exports,tA),eM(module.exports,tF);
1
+ var e,t,r,n,a,i,o,c,l,s,u,d,f,p,v,h,m,y,b,g,w,j,O,x,_,P,k,T,E,S,I,N,C,D,M,q,Y,L,z,A,R,U,F,B,W,V,H,G,J,K,Q,X,Z,$,ee,et,er,en,ea,ei,eo,ec,el,es,eu,ed,ef,ep,ev,eh,em,ey,eb,eg,ew,ej,eO,ex,e_,eP,ek,eT,eE=require("@swc/helpers/cjs/_sliced_to_array.cjs"),eS=require("@swc/helpers/cjs/_to_consumable_array.cjs"),eI=require("react/jsx-runtime"),eN=require("classnames"),eC=require("@swc/helpers/cjs/_assert_this_initialized.cjs"),eD=require("@swc/helpers/cjs/_class_call_check.cjs"),eM=require("@swc/helpers/cjs/_create_class.cjs"),eq=require("@swc/helpers/cjs/_inherits.cjs"),eY=require("@swc/helpers/cjs/_create_super.cjs"),eL=require("react"),ez=require("prismjs"),eA=require("react-element-to-jsx-string"),eR=require("@swc/helpers/cjs/_wrap_native_super.cjs"),eU=require("iterable-observer"),eF=require("mobx"),eB=require("mobx-react"),eW=require("@swc/helpers/cjs/_type_of.cjs"),eV=require("@swc/helpers/cjs/_ts_generator.cjs"),eH=require("react-editor-js"),eG=require("editorjs-html"),eJ=require("react-bootstrap"),eK=require("mobx-react-helper"),eQ=require("web-utility"),eX=require("html2canvas");function eZ(e,t){return Object.keys(t).forEach(function(r){"default"===r||"__esModule"===r||Object.prototype.hasOwnProperty.call(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[r]}})}),e}function e$(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}function e0(e){return e&&e.__esModule?e.default:e}var e1={};function e2(e){return function(t){return t&&new IntersectionObserver(function(t,r){var n,a,i=(0,eE._)(t,1)[0],o=i.isIntersecting,c=i.target;if(o){var l=["animate__animated","animate__".concat(e)];(n=c.classList).add.apply(n,(0,eS._)(l)),c.addEventListener("animationend",function(){return(a=c.classList).remove.apply(a,(0,eS._)(l))},{once:!0}),r.disconnect()}}).observe(t)}}e$(e1,"animate",function(){return e2});var e4={};e$(e4,"Avatar",function(){return e5});var e3=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)0>t.indexOf(n[a])&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r},e5=function(e){var t=e.className,r=e.style,n=e.size,a=void 0===n?3:n,i=e3(e,["className","style","size"]);return(0,eI.jsx)("img",Object.assign({className:e0(eN)("object-fit-cover rounded-circle",t),style:Object.assign({width:"".concat(a,"rem"),height:"".concat(a,"rem")},r)},i))};e5.displayName="Avatar";var e7={};e$(e7,"ClickBoundary",function(){return e6});var e8=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)0>t.indexOf(n[a])&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r},e6=function(e){(0,eq._)(r,e);var t=(0,eY._)(r);function r(){var e;return(0,eD._)(this,r),e=t.call.apply(t,[this].concat(Array.prototype.slice.call(arguments))),Object.defineProperty((0,eC._)(e),"root",{enumerable:!0,configurable:!0,writable:!0,value:(0,eL.createRef)()}),Object.defineProperty((0,eC._)(e),"switchClick",{enumerable:!0,configurable:!0,writable:!0,value:function(t){var r,n=e.props,a=n.onInnerClick,i=n.onOuterClick;(null===(r=e.root.current)||void 0===r?void 0:r.contains(t.target))?null==a||a(t):null==i||i(t)}}),e}return(0,eM._)(r,[{key:"componentDidMount",value:function(){window.addEventListener("click",this.switchClick,!0)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("click",this.switchClick,!0)}},{key:"render",value:function(){var e=this.props,t=e.children,r=(e.onInnerClick,e.onOuterClick,e8(e,["children","onInnerClick","onOuterClick"]));return(0,eI.jsx)("div",Object.assign({ref:this.root},r,{children:t}))}}]),r}(eL.PureComponent),e9={};function te(e){var t=e.language,r=e.children,n=(0,ez.highlight)(e0(eA)((0,eL.isValidElement)(r)?r:(0,eI.jsx)(eI.Fragment,{children:r})),ez.languages[t],t);return(0,eI.jsx)("pre",{children:(0,eI.jsx)("code",{className:"language-".concat(t),dangerouslySetInnerHTML:{__html:n}})})}e$(e9,"CodeBlock",function(){return te});var tt={};e$(tt,"VariantColors",function(){return tr}),e$(tt,"text2color",function(){return tn});var tr=["primary","secondary","success","danger","warning","info","dark","light"];function tn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=t[0]?tr.filter(function(e){return!t.find(function(t){return t===e})}):tr;return r[(0,eS._)(e).reduce(function(e,t){return e+t.charCodeAt(0)},0)%r.length]}var ta={};e$(ta,"DialogClose",function(){return tl}),e$(ta,"Dialog",function(){return ts});var ti=function(e,t,r){for(var n=arguments.length>2,a=0;a<t.length;a++)r=n?t[a].call(e,r):t[a].call(e);return n?r:void 0},to=function(e,t,r,n){if("a"===r&&!n)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)},tc=function(e,t,r,n,a){if("m"===n)throw TypeError("Private method is not writable");if("a"===n&&!a)throw TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!a:!t.has(e))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?a.call(e,r):a?a.value=r:t.set(e,r),r},tl=function(e){(0,eq._)(r,e);var t=(0,eY._)(r);function r(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"Dialog closed";return(0,eD._)(this,r),t.call(this,e)}return r}((0,eR._)(Error)),ts=(r=[],n=[],e=function(){function e(a){var i=this;(0,eD._)(this,e),t.set(this,(ti(this,r),ti(this,n,void 0))),Object.defineProperty(this,"Component",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.Component=(0,eB.observer)(function(){return(0,eI.jsx)(a,{defer:i.defer})}),this.Component.displayName="DialogComponent"}return(0,eM._)(e,[{key:"defer",get:function(){return to(this,t,"f")},set:function(e){tc(this,t,e,"f")}},{key:"open",value:function(){var e=this;return this.defer=new eU.Defer,this.defer.promise.finally(function(){return e.defer=void 0}),this.defer.promise}}]),e}(),t=new WeakMap,a="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0,function(e,t,r,n,a,i){function o(e){if(void 0!==e&&"function"!=typeof e)throw TypeError("Function expected");return e}for(var c,l=n.kind,s="getter"===l?"get":"setter"===l?"set":"value",u=!t&&e?n.static?e:e.prototype:null,d=t||(u?Object.getOwnPropertyDescriptor(u,n.name):{}),f=!1,p=r.length-1;p>=0;p--){var v={};for(var h in n)v[h]="access"===h?{}:n[h];for(var h in n.access)v.access[h]=n.access[h];v.addInitializer=function(e){if(f)throw TypeError("Cannot add initializers after decoration has completed");i.push(o(e||null))};var m=(0,r[p])("accessor"===l?{get:d.get,set:d.set}:d[s],v);if("accessor"===l){if(void 0===m)continue;if(null===m||"object"!=typeof m)throw TypeError("Object expected");(c=o(m.get))&&(d.get=c),(c=o(m.set))&&(d.set=c),(c=o(m.init))&&a.unshift(c)}else(c=o(m))&&("field"===l?a.unshift(c):d[s]=c)}u&&Object.defineProperty(u,n.name,d),f=!0}(e,null,[eF.observable],{kind:"accessor",name:"defer",static:!1,private:!1,access:{has:function(e){return"defer"in e},get:function(e){return e.defer},set:function(e,t){e.defer=t}},metadata:a},n,r),a&&Object.defineProperty(e,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:a}),e),tu={};e$(tu,"Editor",function(){return ty});var td=function(e,t,r){for(var n=arguments.length>2,a=0;a<t.length;a++)r=n?t[a].call(e,r):t[a].call(e);return n?r:void 0},tf=function(e,t,r,n,a,i){function o(e){if(void 0!==e&&"function"!=typeof e)throw TypeError("Function expected");return e}for(var c,l=n.kind,s="getter"===l?"get":"setter"===l?"set":"value",u=!t&&e?n.static?e:e.prototype:null,d=t||(u?Object.getOwnPropertyDescriptor(u,n.name):{}),f=!1,p=r.length-1;p>=0;p--){var v={};for(var h in n)v[h]="access"===h?{}:n[h];for(var h in n.access)v.access[h]=n.access[h];v.addInitializer=function(e){if(f)throw TypeError("Cannot add initializers after decoration has completed");i.push(o(e||null))};var m=(0,r[p])("accessor"===l?{get:d.get,set:d.set}:d[s],v);if("accessor"===l){if(void 0===m)continue;if(null===m||"object"!=typeof m)throw TypeError("Object expected");(c=o(m.get))&&(d.get=c),(c=o(m.set))&&(d.set=c),(c=o(m.init))&&a.unshift(c)}else(c=o(m))&&("field"===l?a.unshift(c):d[s]=c)}u&&Object.defineProperty(u,n.name,d),f=!0},tp=function(e,t,r,n){if("a"===r&&!n)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)},tv=function(e,t,r,n,a){if("m"===n)throw TypeError("Private method is not writable");if("a"===n&&!a)throw TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!a:!t.has(e))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?a.call(e,r):a?a.value=r:t.set(e,r),r},th=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)0>t.indexOf(n[a])&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r},tm=(0,eH.createReactEditorJS)(),ty=(l=[eB.observer],s=[],u=eL.PureComponent,d=[],f=[],c=function(e){(0,eq._)(r,e);var t=(0,eY._)(r);function r(){var e;return(0,eD._)(this,r),e=t.call.apply(t,[this].concat(Array.prototype.slice.call(arguments))),Object.defineProperty((0,eC._)(e),"core",{enumerable:!0,configurable:!0,writable:!0,value:void td((0,eC._)(e),d)}),i.set((0,eC._)(e),td((0,eC._)(e),f,e.props.defaultValue)),Object.defineProperty((0,eC._)(e),"save",{enumerable:!0,configurable:!0,writable:!0,value:function(){var t,r,n,a;return t=(0,eC._)(e),r=void 0,n=void 0,a=function(){var e,t;return(0,eV._)(this,function(r){switch(r.label){case 0:if(!(e=this.core))return[3,2];return t=this,[4,this.core.save()];case 1:e=t.innerValue=r.sent(),r.label=2;case 2:return[2,e]}})},new(n||(n=Promise))(function(e,i){function o(e){try{l(a.next(e))}catch(e){i(e)}}function c(e){try{l(a.throw(e))}catch(e){i(e)}}function l(t){var r;t.done?e(t.value):((r=t.value)instanceof n?r:new n(function(e){e(r)})).then(o,c)}l((a=a.apply(t,r||[])).next())})}}),e}return(0,eM._)(r,[{key:"innerValue",get:function(){return tp(this,i,"f")},set:function(e){tv(this,i,e,"f")}},{key:"render",value:function(){var e=this,t=this.props,r=t.name,n=t.required,a=(t.children,th(t,["name","required","children"])),i=this.innerValue;return(0,eI.jsxs)("div",{className:"form-control",tabIndex:-1,onBlur:this.save,children:[(0,eI.jsx)("input",{hidden:!0,name:r,required:n,value:JSON.stringify(i)}),(0,eI.jsx)(tm,Object.assign({},a,{onInitialize:function(t){var r;e.core=t,null===(r=a.onInitialize)||void 0===r||r.call(a,t)}}))]})}}]),r}(u),i=new WeakMap,p=c,v="Editor","symbol"===(0,eW._)(v)&&(v=v.description?"[".concat(v.description,"]"):""),Object.defineProperty(p,"name",{configurable:!0,value:h?"".concat(h," ",v):v}),y="function"==typeof Symbol&&Symbol.metadata?Object.create(null!==(m=u[Symbol.metadata])&&void 0!==m?m:null):void 0,tf(c,null,[eF.observable],{kind:"accessor",name:"innerValue",static:!1,private:!1,access:{has:function(e){return"innerValue"in e},get:function(e){return e.innerValue},set:function(e,t){e.innerValue=t}},metadata:y},f,d),tf(null,o={value:c},l,{kind:"class",name:c.name,metadata:y},null,s),c=o.value,y&&Object.defineProperty(c,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:y}),Object.defineProperty(c,"displayName",{enumerable:!0,configurable:!0,writable:!0,value:"Editor"}),td(c,s),c),tb={};e$(tb,"parser",function(){return tg}),e$(tb,"EditorHTML",function(){return tw});var tg=e0(eG)({link:function(e){var t=e.data.link;return'<a href="'.concat(t,'">').concat(t,"</a>")}}),tw=function(e){var t=e.className,r=e.data,n=tg.parse(r).join("");return(0,eI.jsx)("article",{className:t,dangerouslySetInnerHTML:{__html:n}})};tw.displayName="EditorHTML";var tj={};e$(tj,"Icon",function(){return tx});var tO=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)0>t.indexOf(n[a])&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r},tx=function(e){var t=e.className,r=e.style,n=e.name,a=e.size,i=tO(e,["className","style","name","size"]);return(0,eI.jsx)("i",Object.assign({className:e0(eN)("bi-".concat(n),t),style:Object.assign({fontSize:a&&"".concat(a,"rem")},r)},i))};tx.displayName="Icon";var t_={};e$(t_,"Loading",function(){return tP});var tP=function(e){var t=e.children;return(0,eI.jsxs)("div",{className:"fixed-top h-100 w-100 d-flex justify-content-center align-items-center opacity-25 bg-black",children:[(0,eI.jsx)(eJ.Spinner,{animation:"border",variant:"success"}),(0,eI.jsx)("span",{className:"ml-3 text-white",children:void 0===t?"Loading...":t})]})};tP.displayName="Loading";var tk={};e$(tk,"MonthCalendar",function(){return tq});var tT={};e$(tT,"OverlayBox",function(){return tS});var tE=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)0>t.indexOf(n[a])&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r},tS=function(e){var t=e.title,r=e.detail,n=e.children,a=tE(e,["title","detail","children"]);return(0,eI.jsx)(eJ.OverlayTrigger,Object.assign({},a,{overlay:r?(0,eI.jsxs)(eJ.Popover,{children:[(0,eI.jsx)(eJ.Popover.Header,{children:t}),(0,eI.jsx)(eJ.Popover.Body,{children:r})]}):(0,eI.jsx)(eJ.Tooltip,{children:t}),children:n}))};tS.displayName="OverlayBox";var tI=function(e,t,r,n,a,i){function o(e){if(void 0!==e&&"function"!=typeof e)throw TypeError("Function expected");return e}for(var c,l=n.kind,s="getter"===l?"get":"setter"===l?"set":"value",u=!t&&e?n.static?e:e.prototype:null,d=t||(u?Object.getOwnPropertyDescriptor(u,n.name):{}),f=!1,p=r.length-1;p>=0;p--){var v={};for(var h in n)v[h]="access"===h?{}:n[h];for(var h in n.access)v.access[h]=n.access[h];v.addInitializer=function(e){if(f)throw TypeError("Cannot add initializers after decoration has completed");i.push(o(e||null))};var m=(0,r[p])("accessor"===l?{get:d.get,set:d.set}:d[s],v);if("accessor"===l){if(void 0===m)continue;if(null===m||"object"!=typeof m)throw TypeError("Object expected");(c=o(m.get))&&(d.get=c),(c=o(m.set))&&(d.set=c),(c=o(m.init))&&a.unshift(c)}else(c=o(m))&&("field"===l?a.unshift(c):d[s]=c)}u&&Object.defineProperty(u,n.name,d),f=!0},tN=function(e,t,r){for(var n=arguments.length>2,a=0;a<t.length;a++)r=n?t[a].call(e,r):t[a].call(e);return n?r:void 0},tC=function(e,t,r,n){if("a"===r&&!n)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)},tD=function(e,t,r,n,a){if("m"===n)throw TypeError("Private method is not writable");if("a"===n&&!a)throw TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!a:!t.has(e))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?a.call(e,r):a?a.value=r:t.set(e,r),r},tM=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)0>t.indexOf(n[a])&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r},tq=(_=[eB.observer,eK.observePropsState],P=[],k=eL.Component,T=[],E=[],w=function(e){(0,eq._)(r,e);var t=(0,eY._)(r);function r(){var e;return(0,eD._)(this,r),e=t.call.apply(t,[this].concat(Array.prototype.slice.call(arguments))),b.set((0,eC._)(e),(tN((0,eC._)(e),T),tN((0,eC._)(e),E,new Date))),Object.defineProperty((0,eC._)(e),"renderDate",{enumerable:!0,configurable:!0,writable:!0,value:function(t){var r=e.observedProps,n=(r.variant,r.value),a=r.onSelect,i=(0,eQ.formatDate)(t,"YYYY-MM-DD"),o=null==n?void 0:n.filter(function(e){var t=e.date;return(0,eQ.formatDate)(t,"YYYY-MM-DD")===i});return(0,eI.jsxs)("td",{className:e0(eN)({"opacity-50":t.getMonth()!==e.currentDate.getMonth(),"fw-bold":i===(0,eQ.formatDate)(new Date,"YYYY-MM-DD")}),children:[(0,eI.jsx)("time",{className:"d-block",dateTime:t.toJSON(),children:t.getDate()}),null==o?void 0:o.map(function(e){return"object"==typeof e.content?e.content:(0,eI.jsx)(tS,{title:e.content,children:(0,eI.jsx)(eJ.Badge,{as:"a",className:"d-inline-block text-decoration-none w-100 text-truncate",bg:tn(e.content+"",["light"]),href:e.link,onClick:function(){return null==a?void 0:a(e)},children:e.content})},e.date+"")})]},t+"")}}),e}return(0,eM._)(r,[{key:"weekFormatter",get:function(){var e,t=this.observedProps.locale,r=void 0===t?null===(e=globalThis.navigator)||void 0===e?void 0:e.language:t;return new Intl.DateTimeFormat(r,{weekday:"long"})}},{key:"currentDate",get:function(){return tC(this,b,"f")},set:function(e){tD(this,b,e,"f")}},{key:"dateGrid",get:function(){var e=new Date(this.currentDate);e.setDate(1),e=new Date(+e-e.getDay()*eQ.Day);var t=Array.from(Array(42),function(t,r){return new Date(+e+r*eQ.Day)});return(0,eQ.splitArray)(t,7)}},{key:"changeMonth",value:function(e){var t,r;this.currentDate=(0,eQ.changeMonth)(this.currentDate,e),null===(r=(t=this.props).onChange)||void 0===r||r.call(t,this.currentDate)}},{key:"render",value:function(){var e=this,t=this.weekFormatter,r=this.currentDate,n=this.dateGrid,a=this.observedProps,i=a.style,o=a.variant,c=void 0===o?"primary":o,l=(a.onChange,a.onSelect,tM(a,["style","variant","onChange","onSelect"]));return(0,eI.jsxs)(eJ.Table,Object.assign({},l,{style:Object.assign({tableLayout:"fixed"},i),children:[(0,eI.jsx)("caption",{children:(0,eI.jsxs)("div",{className:"d-flex justify-content-between align-items-center",children:[(0,eI.jsx)(eJ.Button,{variant:c,onClick:function(){return e.changeMonth(-1)},children:"<"}),(0,eQ.formatDate)(r,"YYYY-MM"),(0,eI.jsx)(eJ.Button,{variant:c,onClick:function(){return e.changeMonth(1)},children:">"})]})}),(0,eI.jsx)("thead",{children:(0,eI.jsx)("tr",{children:n[0].map(function(e,r,n){var a=n.length;return(0,eI.jsx)("td",{className:"bg-".concat(c," text-white"),style:{width:"calc(100% / ".concat(a,")")},children:t.format(e)},r)})})}),(0,eI.jsx)("tbody",{children:n.map(function(t){return(0,eI.jsx)("tr",{children:t.map(e.renderDate)},t[0]+"")})})]}))}}]),r}(k),b=new WeakMap,S=w,I="MonthCalendar","symbol"===(0,eW._)(I)&&(I=I.description?"[".concat(I.description,"]"):""),Object.defineProperty(S,"name",{configurable:!0,value:N?"".concat(N," ",I):I}),D="function"==typeof Symbol&&Symbol.metadata?Object.create(null!==(C=k[Symbol.metadata])&&void 0!==C?C:null):void 0,j=[eF.computed],O=[eF.observable],x=[eF.computed],tI(w,null,j,{kind:"getter",name:"weekFormatter",static:!1,private:!1,access:{has:function(e){return"weekFormatter"in e},get:function(e){return e.weekFormatter}},metadata:D},null,T),tI(w,null,O,{kind:"accessor",name:"currentDate",static:!1,private:!1,access:{has:function(e){return"currentDate"in e},get:function(e){return e.currentDate},set:function(e,t){e.currentDate=t}},metadata:D},E,T),tI(w,null,x,{kind:"getter",name:"dateGrid",static:!1,private:!1,access:{has:function(e){return"dateGrid"in e},get:function(e){return e.dateGrid}},metadata:D},null,T),tI(null,g={value:w},_,{kind:"class",name:w.name,metadata:D},null,P),w=g.value,D&&Object.defineProperty(w,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:D}),Object.defineProperty(w,"displayName",{enumerable:!0,configurable:!0,writable:!0,value:"MonthCalendar"}),tN(w,P),w),tY={};e$(tY,"Nameplate",function(){return tL});var tL=function(e){var t=e.avatar,r=e.name;return(0,eI.jsxs)(eI.Fragment,{children:[(0,eI.jsx)(e5,{size:2,style:{marginRight:"0.5rem"},src:t}),(0,eI.jsx)("span",{className:"align-middle",children:r})]})};tL.displayName="Nameplate";var tz={};e$(tz,"PageNav",function(){return tV});var tA=function(e,t,r,n,a,i){function o(e){if(void 0!==e&&"function"!=typeof e)throw TypeError("Function expected");return e}for(var c,l=n.kind,s="getter"===l?"get":"setter"===l?"set":"value",u=!t&&e?n.static?e:e.prototype:null,d=t||(u?Object.getOwnPropertyDescriptor(u,n.name):{}),f=!1,p=r.length-1;p>=0;p--){var v={};for(var h in n)v[h]="access"===h?{}:n[h];for(var h in n.access)v.access[h]=n.access[h];v.addInitializer=function(e){if(f)throw TypeError("Cannot add initializers after decoration has completed");i.push(o(e||null))};var m=(0,r[p])("accessor"===l?{get:d.get,set:d.set}:d[s],v);if("accessor"===l){if(void 0===m)continue;if(null===m||"object"!=typeof m)throw TypeError("Object expected");(c=o(m.get))&&(d.get=c),(c=o(m.set))&&(d.set=c),(c=o(m.init))&&a.unshift(c)}else(c=o(m))&&("field"===l?a.unshift(c):d[s]=c)}u&&Object.defineProperty(u,n.name,d),f=!0},tR=function(e,t,r){for(var n=arguments.length>2,a=0;a<t.length;a++)r=n?t[a].call(e,r):t[a].call(e);return n?r:void 0},tU=function(e,t,r,n){if("a"===r&&!n)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)},tF=function(e,t,r,n,a){if("m"===n)throw TypeError("Private method is not writable");if("a"===n&&!a)throw TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!a:!t.has(e))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?a.call(e,r):a?a.value=r:t.set(e,r),r},tB=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)0>t.indexOf(n[a])&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r},tW=Array.from(Array(6),function(e,t){return"h".concat(++t)})+"",tV=(U=[eB.observer],F=[],B=eL.PureComponent,W=[],V=[],H=[],L=function(e){(0,eq._)(r,e);var t=(0,eY._)(r);function r(){var e;return(0,eD._)(this,r),e=t.call.apply(t,[this].concat(Array.prototype.slice.call(arguments))),M.set((0,eC._)(e),(tR((0,eC._)(e),W),tR((0,eC._)(e),V,[]))),q.set((0,eC._)(e),tR((0,eC._)(e),H,0)),Object.defineProperty((0,eC._)(e),"updateScrollY",{enumerable:!0,configurable:!0,writable:!0,value:function(){return e.scrollY=window.scrollY}}),Object.defineProperty((0,eC._)(e),"scrollTo",{enumerable:!0,configurable:!0,writable:!0,value:function(t){return function(){var r,n;setTimeout(function(){return(0,eQ.scrollTo)('[id="'.concat(t.id,'"]'))}),null===(n=(r=e.props).onItemClick)||void 0===n||n.call(r,t)}}}),Object.defineProperty((0,eC._)(e),"renderLink",{enumerable:!0,configurable:!0,writable:!0,value:function(t){var r=t.id,n=t.level,a=t.text,i=t.top,o=(0,eC._)(e).currentActiveId,c=e.props.depth;return n<=(void 0===c?1/0:c)&&(0,eI.jsx)(eJ.Nav.Item,{style:{textIndent:"".concat(n-1,"rem")},children:(0,eI.jsx)(eJ.Nav.Link,{href:"#".concat(r),active:o===r,onClick:e.scrollTo({id:r,level:n,text:a,top:i}),children:a})},r)}}),e}return(0,eM._)(r,[{key:"list",get:function(){return tU(this,M,"f")},set:function(e){tF(this,M,e,"f")}},{key:"scrollY",get:function(){return tU(this,q,"f")},set:function(e){tF(this,q,e,"f")}},{key:"currentActiveId",get:function(){var e,t=this.list,r=this.scrollY,n=t.findIndex(function(e){return e.top>r});return null===(e=t[n-1])||void 0===e?void 0:e.id}},{key:"componentDidMount",value:function(){globalThis.document&&(window.addEventListener("scroll",this.updateScrollY),this.list=Array.from(document.querySelectorAll(tW),function(e){e.id||(e.id=(0,eQ.uniqueID)());var t=e.id,r=e.tagName,n=e.textContent,a=e.offsetTop;return{id:t,level:+r[1],text:n.trim(),top:a}}))}},{key:"componentWillUnmount",value:function(){var e;null===(e=globalThis.removeEventListener)||void 0===e||e.call(globalThis,"scroll",this.updateScrollY)}},{key:"render",value:function(){var e=this.list,t=this.props,r=t.style,n=t.variant,a=tB(t,["style","variant"]);return(0,eI.jsx)(eJ.Nav,Object.assign({},a,{variant:void 0===n?"underline":n,style:Object.assign({flexDirection:"column"},r),children:e.map(this.renderLink)}))}}]),r}(B),M=new WeakMap,q=new WeakMap,G=L,J="PageNav","symbol"===(0,eW._)(J)&&(J=J.description?"[".concat(J.description,"]"):""),Object.defineProperty(G,"name",{configurable:!0,value:K?"".concat(K," ",J):J}),X="function"==typeof Symbol&&Symbol.metadata?Object.create(null!==(Q=B[Symbol.metadata])&&void 0!==Q?Q:null):void 0,z=[eF.observable],A=[eF.observable],R=[eF.computed],tA(L,null,z,{kind:"accessor",name:"list",static:!1,private:!1,access:{has:function(e){return"list"in e},get:function(e){return e.list},set:function(e,t){e.list=t}},metadata:X},V,W),tA(L,null,A,{kind:"accessor",name:"scrollY",static:!1,private:!1,access:{has:function(e){return"scrollY"in e},get:function(e){return e.scrollY},set:function(e,t){e.scrollY=t}},metadata:X},H,W),tA(L,null,R,{kind:"getter",name:"currentActiveId",static:!1,private:!1,access:{has:function(e){return"currentActiveId"in e},get:function(e){return e.currentActiveId}},metadata:X},null,W),tA(null,Y={value:L},U,{kind:"class",name:L.name,metadata:X},null,F),L=Y.value,X&&Object.defineProperty(L,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:X}),Object.defineProperty(L,"displayName",{enumerable:!0,configurable:!0,writable:!0,value:"PageNav"}),tR(L,F),L),tH={};e$(tH,"Option",function(){return tJ}),e$(tH,"Select",function(){return tK});var tG=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)0>t.indexOf(n[a])&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r},tJ=function(e){var t=e.value,r=e.children,n=tG(e,["value","children"]);return(0,eI.jsx)(eJ.Dropdown.Item,Object.assign({},n,{"data-value":t,children:r}))};tJ.displayName="Option";var tK=function(e){var t=e.className,r=e.style,n=e.variant,a=e.menuVariant,i=e.children,o=e.value,c=e.onChange,l=e.valueRender,s=(0,eQ.makeArray)(i).flat(1/0).find(function(e){return(0,eL.isValidElement)(e)&&e.type===tJ&&e.props.value===o});return(0,eI.jsxs)(eJ.Dropdown,{onClick:function(e){var t=e.target.closest(".dropdown-item");if(t){var r=t.dataset.value;null==c||c(r)}},children:[(0,eI.jsx)(eJ.Dropdown.Toggle,{className:e0(eN)("w-100","d-flex","justify-content-between","align-items-center",!n&&"bg-white text-dark",t),style:r,variant:n,children:(null==l?void 0:l(o))||(0,eI.jsx)("div",{className:null==s?void 0:s.props.className,children:null==s?void 0:s.props.children})}),(0,eI.jsx)(eJ.Dropdown.Menu,{variant:a,children:i})]})};tK.displayName="Select";var tQ={};e$(tQ,"elementToImage",function(){return t2}),e$(tQ,"ShareBox",function(){return t4});var tX=function(e,t,r){for(var n=arguments.length>2,a=0;a<t.length;a++)r=n?t[a].call(e,r):t[a].call(e);return n?r:void 0},tZ=function(e,t,r,n,a,i){function o(e){if(void 0!==e&&"function"!=typeof e)throw TypeError("Function expected");return e}for(var c,l=n.kind,s="getter"===l?"get":"setter"===l?"set":"value",u=!t&&e?n.static?e:e.prototype:null,d=t||(u?Object.getOwnPropertyDescriptor(u,n.name):{}),f=!1,p=r.length-1;p>=0;p--){var v={};for(var h in n)v[h]="access"===h?{}:n[h];for(var h in n.access)v.access[h]=n.access[h];v.addInitializer=function(e){if(f)throw TypeError("Cannot add initializers after decoration has completed");i.push(o(e||null))};var m=(0,r[p])("accessor"===l?{get:d.get,set:d.set}:d[s],v);if("accessor"===l){if(void 0===m)continue;if(null===m||"object"!=typeof m)throw TypeError("Object expected");(c=o(m.get))&&(d.get=c),(c=o(m.set))&&(d.set=c),(c=o(m.init))&&a.unshift(c)}else(c=o(m))&&("field"===l?a.unshift(c):d[s]=c)}u&&Object.defineProperty(u,n.name,d),f=!0},t$=function(e,t,r,n){return new(r||(r=Promise))(function(a,i){function o(e){try{l(n.next(e))}catch(e){i(e)}}function c(e){try{l(n.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?a(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(o,c)}l((n=n.apply(e,t||[])).next())})},t0=function(e,t,r,n){if("a"===r&&!n)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)},t1=function(e,t,r,n,a){if("m"===n)throw TypeError("Private method is not writable");if("a"===n&&!a)throw TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!a:!t.has(e))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?a.call(e,r):a?a.value=r:t.set(e,r),r};function t2(e,t,r){return t$(this,void 0,void 0,function(){var n;return(0,eV._)(this,function(a){switch(a.label){case 0:return[4,e0(eX)(e,{useCORS:!0})];case 1:return n=a.sent(),[2,new Promise(function(e,a){return n.toBlob(function(t){return t?e(URL.createObjectURL(t)):a()},t,r)})]}})})}var t4=(ea=[eB.observer],ei=[],eo=eL.PureComponent,ec=[],el=[],es=[],et=function(e){(0,eq._)(r,e);var t=(0,eY._)(r);function r(){var e;return(0,eD._)(this,r),e=t.call.apply(t,[this].concat(Array.prototype.slice.call(arguments))),Object.defineProperty((0,eC._)(e),"root",{enumerable:!0,configurable:!0,writable:!0,value:(tX((0,eC._)(e),ec),(0,eL.createRef)())}),Z.set((0,eC._)(e),tX((0,eC._)(e),el,!1)),$.set((0,eC._)(e),tX((0,eC._)(e),es,"")),Object.defineProperty((0,eC._)(e),"generateImage",{enumerable:!0,configurable:!0,writable:!0,value:function(){return t$((0,eC._)(e),void 0,void 0,function(){var e;return(0,eV._)(this,function(t){switch(t.label){case 0:return this.imageURI&&(URL.revokeObjectURL(this.imageURI),this.imageURI=""),this.loading=!0,e=this,[4,t2(this.root.current)];case 1:return e.imageURI=t.sent(),this.loading=!1,[2]}})})}}),Object.defineProperty((0,eC._)(e),"share",{enumerable:!0,configurable:!0,writable:!0,value:function(t){return t$((0,eC._)(e),void 0,void 0,function(){var e,r,n;return(0,eV._)(this,function(a){switch(a.label){case 0:return t.stopPropagation(),[4,(0,eQ.blobOf)(this.imageURI)];case 1:return r=a.sent(),n=new File([r],"".concat(this.props.title,".png"),{type:r.type}),[4,null===(e=navigator.share)||void 0===e?void 0:e.call(navigator,Object.assign({files:[n]},this.props))];case 2:return a.sent(),[2]}})})}}),e}return(0,eM._)(r,[{key:"loading",get:function(){return t0(this,Z,"f")},set:function(e){t1(this,Z,e,"f")}},{key:"imageURI",get:function(){return t0(this,$,"f")},set:function(e){t1(this,$,e,"f")}},{key:"componentDidMount",value:function(){var e;null===(e=globalThis.addEventListener)||void 0===e||e.call(globalThis,"resize",this.generateImage)}},{key:"componentWillUnmount",value:function(){var e;null===(e=globalThis.removeEventListener)||void 0===e||e.call(globalThis,"resize",this.generateImage)}},{key:"render",value:function(){var e=this.props.children,t=this.loading,r=this.imageURI;return(0,eI.jsxs)(eI.Fragment,{children:[t&&(0,eI.jsx)(tP,{}),(0,eI.jsxs)("div",{ref:this.root,className:"position-relative",onMouseEnter:r?void 0:this.generateImage,onTouchStart:r?void 0:this.generateImage,children:[e,r&&(0,eI.jsx)(eJ.Image,{className:"position-absolute start-0 top-0 w-100 h-100",fluid:!0,src:r,alt:"Share Image",onClick:this.share})]})]})}}]),r}(eo),Z=new WeakMap,$=new WeakMap,eu=et,ed="ShareBox","symbol"===(0,eW._)(ed)&&(ed=ed.description?"[".concat(ed.description,"]"):""),Object.defineProperty(eu,"name",{configurable:!0,value:ef?"".concat(ef," ",ed):ed}),ev="function"==typeof Symbol&&Symbol.metadata?Object.create(null!==(ep=eo[Symbol.metadata])&&void 0!==ep?ep:null):void 0,er=[eF.observable],en=[eF.observable],tZ(et,null,er,{kind:"accessor",name:"loading",static:!1,private:!1,access:{has:function(e){return"loading"in e},get:function(e){return e.loading},set:function(e,t){e.loading=t}},metadata:ev},el,ec),tZ(et,null,en,{kind:"accessor",name:"imageURI",static:!1,private:!1,access:{has:function(e){return"imageURI"in e},get:function(e){return e.imageURI},set:function(e,t){e.imageURI=t}},metadata:ev},es,ec),tZ(null,ee={value:et},ea,{kind:"class",name:et.name,metadata:ev},null,ei),et=ee.value,ev&&Object.defineProperty(et,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:ev}),Object.defineProperty(et,"displayName",{enumerable:!0,configurable:!0,writable:!0,value:"ShareBox"}),tX(et,ei),et),t3={};e$(t3,"SpinnerButton",function(){return t7});var t5=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)0>t.indexOf(n[a])&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r},t7=function(e){var t=e.animation,r=e.loading,n=e.disabled,a=e.children,i=t5(e,["animation","loading","disabled","children"]);return(0,eI.jsxs)(eJ.Button,Object.assign({},i,{disabled:r||n,children:[r&&(0,eI.jsxs)(eI.Fragment,{children:[(0,eI.jsx)(eJ.Spinner,{as:"span",className:a?"me-2":"",size:"sm",animation:t,role:"status","aria-hidden":"true"}),!a&&(0,eI.jsx)("span",{className:"visually-hidden",children:"Loading..."})]}),a]}))};t7.displayName="SpinnerButton";var t8={};e$(t8,"TableSpinner",function(){return t6});var t6=function(e){var t=e.colSpan;return(0,eI.jsx)("tr",{children:(0,eI.jsx)("td",{className:"text-center p-4",colSpan:t,children:(0,eI.jsx)(eJ.Spinner,{animation:"border",variant:"primary"})})})};t6.displayName="TableSpinner";var t9={};e$(t9,"TimeDistance",function(){return rt});var re={ms:"millisecond(s)",s:"second(s)",m:"minute(s)",H:"hour(s)",D:"day(s)",W:"week(s)",M:"month(s)",Y:"year(s)"},rt=function(e){var t=e.className,r=e.date,n=e.unitWords,a=void 0===n?re:n,i=e.beforeWord,o=e.afterWord;r=new Date(r);var c=(0,eQ.diffTime)(r),l=c.distance,s=c.unit;return(0,eI.jsxs)("time",{className:t,dateTime:r.toJSON(),title:r.toLocaleString(),children:[Math.abs(l)," ",a[s],l<0?void 0===i?" before":i:void 0===o?" after":o]})};rt.displayName="TimeDistance";var rr={};e$(rr,"TypeEcho",function(){return rc});var rn=function(e,t,r,n,a,i){function o(e){if(void 0!==e&&"function"!=typeof e)throw TypeError("Function expected");return e}for(var c,l=n.kind,s="getter"===l?"get":"setter"===l?"set":"value",u=!t&&e?n.static?e:e.prototype:null,d=t||(u?Object.getOwnPropertyDescriptor(u,n.name):{}),f=!1,p=r.length-1;p>=0;p--){var v={};for(var h in n)v[h]="access"===h?{}:n[h];for(var h in n.access)v.access[h]=n.access[h];v.addInitializer=function(e){if(f)throw TypeError("Cannot add initializers after decoration has completed");i.push(o(e||null))};var m=(0,r[p])("accessor"===l?{get:d.get,set:d.set}:d[s],v);if("accessor"===l){if(void 0===m)continue;if(null===m||"object"!=typeof m)throw TypeError("Object expected");(c=o(m.get))&&(d.get=c),(c=o(m.set))&&(d.set=c),(c=o(m.init))&&a.unshift(c)}else(c=o(m))&&("field"===l?a.unshift(c):d[s]=c)}u&&Object.defineProperty(u,n.name,d),f=!0},ra=function(e,t,r){for(var n=arguments.length>2,a=0;a<t.length;a++)r=n?t[a].call(e,r):t[a].call(e);return n?r:void 0},ri=function(e,t,r,n){if("a"===r&&!n)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)},ro=function(e,t,r,n,a){if("m"===n)throw TypeError("Private method is not writable");if("a"===n&&!a)throw TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!a:!t.has(e))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?a.call(e,r):a?a.value=r:t.set(e,r),r},rc=(eb=[eB.observer],eg=[],ew=eL.PureComponent,ej=[],eO=[],ey=function(e){(0,eq._)(r,e);var t=(0,eY._)(r);function r(){var e;return(0,eD._)(this,r),e=t.call.apply(t,[this].concat(Array.prototype.slice.call(arguments))),eh.set((0,eC._)(e),(ra((0,eC._)(e),ej),ra((0,eC._)(e),eO,""))),Object.defineProperty((0,eC._)(e),"init",{enumerable:!0,configurable:!0,writable:!0,value:function(t){return t&&new IntersectionObserver(function(t,r){var n,a,i,o=(0,eE._)(t,1)[0].isIntersecting;return n=void 0,a=void 0,i=function(){var e,t,n,a,i,c,l,s,u,d,f;return(0,eV._)(this,function(p){switch(p.label){case 0:if(!o)return[2];r.disconnect(),t=(e=this.props).text,a=void 0===(n=e.intervals)?150:n,i=!0,c=!1,l=void 0,p.label=1;case 1:p.trys.push([1,6,7,8]),s=t[Symbol.iterator](),p.label=2;case 2:if(i=(u=s.next()).done)return[3,5];return d=u.value,[4,(0,eQ.sleep)(a/1e3)];case 3:p.sent(),this.echoed+=d,p.label=4;case 4:return i=!0,[3,2];case 5:return[3,8];case 6:return f=p.sent(),c=!0,l=f,[3,8];case 7:try{i||null==s.return||s.return()}finally{if(c)throw l}return[7];case 8:return[2]}})},new(a||(a=Promise))(function(t,r){function o(e){try{l(i.next(e))}catch(e){r(e)}}function c(e){try{l(i.throw(e))}catch(e){r(e)}}function l(e){var r;e.done?t(e.value):((r=e.value)instanceof a?r:new a(function(e){e(r)})).then(o,c)}l((i=i.apply(e,n||[])).next())})}).observe(t)}}),e}return(0,eM._)(r,[{key:"echoed",get:function(){return ri(this,eh,"f")},set:function(e){ro(this,eh,e,"f")}},{key:"render",value:function(){var e=this.props,t=e.className,r=e.text,n=this.echoed;return(0,eI.jsx)("pre",{className:e0(eN)("text-wrap",t),ref:this.init,children:n+(n===r?"":"_")})}}]),r}(ew),eh=new WeakMap,ex=ey,e_="TypeEcho","symbol"===(0,eW._)(e_)&&(e_=e_.description?"[".concat(e_.description,"]"):""),Object.defineProperty(ex,"name",{configurable:!0,value:eP?"".concat(eP," ",e_):e_}),eT="function"==typeof Symbol&&Symbol.metadata?Object.create(null!==(ek=ew[Symbol.metadata])&&void 0!==ek?ek:null):void 0,rn(ey,null,[eF.observable],{kind:"accessor",name:"echoed",static:!1,private:!1,access:{has:function(e){return"echoed"in e},get:function(e){return e.echoed},set:function(e,t){e.echoed=t}},metadata:eT},eO,ej),rn(null,em={value:ey},eb,{kind:"class",name:ey.name,metadata:eT},null,eg),ey=em.value,eT&&Object.defineProperty(ey,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:eT}),Object.defineProperty(ey,"displayName",{enumerable:!0,configurable:!0,writable:!0,value:"TypeEcho"}),ra(ey,eg),ey);eZ(module.exports,e1),eZ(module.exports,e4),eZ(module.exports,e7),eZ(module.exports,e9),eZ(module.exports,tt),eZ(module.exports,ta),eZ(module.exports,tu),eZ(module.exports,tb),eZ(module.exports,tj),eZ(module.exports,t_),eZ(module.exports,tk),eZ(module.exports,tY),eZ(module.exports,tT),eZ(module.exports,tz),eZ(module.exports,tH),eZ(module.exports,tQ),eZ(module.exports,t3),eZ(module.exports,t8),eZ(module.exports,t9),eZ(module.exports,rr);
2
2
  //# sourceMappingURL=index.js.map