foomo-docs/assets/js/8576.7d449cdb.js
2023-04-21 20:13:23 +00:00

1 line
9.1 KiB
JavaScript

"use strict";(self.webpackChunkfoomo=self.webpackChunkfoomo||[]).push([[8576],{3905:(e,t,n)=>{n.d(t,{Zo:()=>i,kt:()=>m});var r=n(7294);function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){l(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function s(e,t){if(null==e)return{};var n,r,l=function(e,t){if(null==e)return{};var n,r,l={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(l[n]=e[n]);return l}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(l[n]=e[n])}return l}var u=r.createContext({}),a=function(e){var t=r.useContext(u),n=t;return e&&(n="function"==typeof e?e(t):c(c({},t),e)),n},i=function(e){var t=a(e.components);return r.createElement(u.Provider,{value:t},e.children)},p="mdxType",f={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},y=r.forwardRef((function(e,t){var n=e.components,l=e.mdxType,o=e.originalType,u=e.parentName,i=s(e,["components","mdxType","originalType","parentName"]),p=a(n),y=l,m=p["".concat(u,".").concat(y)]||p[y]||f[y]||o;return n?r.createElement(m,c(c({ref:t},i),{},{components:n})):r.createElement(m,c({ref:t},i))}));function m(e,t){var n=arguments,l=t&&t.mdxType;if("string"==typeof e||l){var o=n.length,c=new Array(o);c[0]=y;var s={};for(var u in t)hasOwnProperty.call(t,u)&&(s[u]=t[u]);s.originalType=e,s[p]="string"==typeof e?e:l,c[1]=s;for(var a=2;a<o;a++)c[a]=n[a];return r.createElement.apply(null,c)}return r.createElement.apply(null,n)}y.displayName="MDXCreateElement"},3746:(e,t,n)=>{n.d(t,{ZP:()=>m,lG:()=>c});var r=n(7410);const l={plain:{backgroundColor:"#2a2734",color:"#9a86fd"},styles:[{types:["comment","prolog","doctype","cdata","punctuation"],style:{color:"#6c6783"}},{types:["namespace"],style:{opacity:.7}},{types:["tag","operator","number"],style:{color:"#e09142"}},{types:["property","function"],style:{color:"#9a86fd"}},{types:["tag-id","selector","atrule-id"],style:{color:"#eeebff"}},{types:["attr-name"],style:{color:"#c4b9fe"}},{types:["boolean","string","entity","url","attr-value","keyword","control","directive","unit","statement","regex","atrule","placeholder","variable"],style:{color:"#ffcc99"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"#c4b9fe"}}]};var o=n(7294),c={Prism:r.Z,theme:l};function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function u(){return u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u.apply(this,arguments)}var a=/\r\n|\r|\n/,i=function(e){0===e.length?e.push({types:["plain"],content:"\n",empty:!0}):1===e.length&&""===e[0].content&&(e[0].content="\n",e[0].empty=!0)},p=function(e,t){var n=e.length;return n>0&&e[n-1]===t?e:e.concat(t)};function f(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&-1===t.indexOf(r)&&(n[r]=e[r]);return n}var y=function(e){function t(){for(var t=this,n=[],r=arguments.length;r--;)n[r]=arguments[r];e.apply(this,n),s(this,"getThemeDict",(function(e){if(void 0!==t.themeDict&&e.theme===t.prevTheme&&e.language===t.prevLanguage)return t.themeDict;t.prevTheme=e.theme,t.prevLanguage=e.language;var n=e.theme?function(e,t){var n=e.plain,r=Object.create(null),l=e.styles.reduce((function(e,n){var r=n.languages,l=n.style;return r&&!r.includes(t)||n.types.forEach((function(t){var n=u({},e[t],l);e[t]=n})),e}),r);return l.root=n,l.plain=u({},n,{backgroundColor:null}),l}(e.theme,e.language):void 0;return t.themeDict=n})),s(this,"getLineProps",(function(e){var n=e.key,r=e.className,l=e.style,o=u({},f(e,["key","className","style","line"]),{className:"token-line",style:void 0,key:void 0}),c=t.getThemeDict(t.props);return void 0!==c&&(o.style=c.plain),void 0!==l&&(o.style=void 0!==o.style?u({},o.style,l):l),void 0!==n&&(o.key=n),r&&(o.className+=" "+r),o})),s(this,"getStyleForToken",(function(e){var n=e.types,r=e.empty,l=n.length,o=t.getThemeDict(t.props);if(void 0!==o){if(1===l&&"plain"===n[0])return r?{display:"inline-block"}:void 0;if(1===l&&!r)return o[n[0]];var c=r?{display:"inline-block"}:{},s=n.map((function(e){return o[e]}));return Object.assign.apply(Object,[c].concat(s))}})),s(this,"getTokenProps",(function(e){var n=e.key,r=e.className,l=e.style,o=e.token,c=u({},f(e,["key","className","style","token"]),{className:"token "+o.types.join(" "),children:o.content,style:t.getStyleForToken(o),key:void 0});return void 0!==l&&(c.style=void 0!==c.style?u({},c.style,l):l),void 0!==n&&(c.key=n),r&&(c.className+=" "+r),c})),s(this,"tokenize",(function(e,t,n,r){var l={code:t,grammar:n,language:r,tokens:[]};e.hooks.run("before-tokenize",l);var o=l.tokens=e.tokenize(l.code,l.grammar,l.language);return e.hooks.run("after-tokenize",l),o}))}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.render=function(){var e=this.props,t=e.Prism,n=e.language,r=e.code,l=e.children,o=this.getThemeDict(this.props),c=t.languages[n];return l({tokens:function(e){for(var t=[[]],n=[e],r=[0],l=[e.length],o=0,c=0,s=[],u=[s];c>-1;){for(;(o=r[c]++)<l[c];){var f=void 0,y=t[c],m=n[c][o];if("string"==typeof m?(y=c>0?y:["plain"],f=m):(y=p(y,m.type),m.alias&&(y=p(y,m.alias)),f=m.content),"string"==typeof f){var d=f.split(a),v=d.length;s.push({types:y,content:d[0]});for(var g=1;g<v;g++)i(s),u.push(s=[]),s.push({types:y,content:d[g]})}else c++,t.push(y),n.push(f),r.push(0),l.push(f.length)}c--,t.pop(),n.pop(),r.pop(),l.pop()}return i(s),u}(void 0!==c?this.tokenize(t,r,c,n):[r]),className:"prism-code language-"+n,style:void 0!==o?o.root:{},getLineProps:this.getLineProps,getTokenProps:this.getTokenProps})},t}(o.Component);const m=y},2801:(e,t,n)=>{n.d(t,{I:()=>f,r:()=>p});var r=n(7294),l={fullscreenEnabled:0,fullscreenElement:1,requestFullscreen:2,exitFullscreen:3,fullscreenchange:4,fullscreenerror:5,fullscreen:6},o=["webkitFullscreenEnabled","webkitFullscreenElement","webkitRequestFullscreen","webkitExitFullscreen","webkitfullscreenchange","webkitfullscreenerror","-webkit-full-screen"],c=["mozFullScreenEnabled","mozFullScreenElement","mozRequestFullScreen","mozCancelFullScreen","mozfullscreenchange","mozfullscreenerror","-moz-full-screen"],s=["msFullscreenEnabled","msFullscreenElement","msRequestFullscreen","msExitFullscreen","MSFullscreenChange","MSFullscreenError","-ms-fullscreen"],u="undefined"!=typeof window&&void 0!==window.document?window.document:{},a="fullscreenEnabled"in u&&Object.keys(l)||o[0]in u&&o||c[0]in u&&c||s[0]in u&&s||[];const i={requestFullscreen:function(e){return e[a[l.requestFullscreen]]()},requestFullscreenFunction:function(e){return e[a[l.requestFullscreen]]},get exitFullscreen(){return u[a[l.exitFullscreen]].bind(u)},get fullscreenPseudoClass(){return":"+a[l.fullscreen]},addEventListener:function(e,t,n){return u.addEventListener(a[l[e]],t,n)},removeEventListener:function(e,t,n){return u.removeEventListener(a[l[e]],t,n)},get fullscreenEnabled(){return Boolean(u[a[l.fullscreenEnabled]])},set fullscreenEnabled(e){},get fullscreenElement(){return u[a[l.fullscreenElement]]},set fullscreenElement(e){},get onfullscreenchange(){return u[("on"+a[l.fullscreenchange]).toLowerCase()]},set onfullscreenchange(e){return u[("on"+a[l.fullscreenchange]).toLowerCase()]=e},get onfullscreenerror(){return u[("on"+a[l.fullscreenerror]).toLowerCase()]},set onfullscreenerror(e){return u[("on"+a[l.fullscreenerror]).toLowerCase()]=e}};function p(){var e=(0,r.useState)(!1),t=e[0],n=e[1],l=(0,r.useRef)(null);(0,r.useEffect)((function(){var e=function(){n(i.fullscreenElement===l.current)};return i.addEventListener("fullscreenchange",e),function(){return i.removeEventListener("fullscreenchange",e)}}),[]);var o=(0,r.useCallback)((function(){return i.fullscreenElement?i.exitFullscreen().then((function(){return i.requestFullscreen(l.current)})):l.current?i.requestFullscreen(l.current):void 0}),[]),c=(0,r.useCallback)((function(){return i.fullscreenElement===l.current?i.exitFullscreen():Promise.resolve()}),[]);return(0,r.useMemo)((function(){return{active:t,enter:o,exit:c,node:l}}),[t,o,c])}var f=function(e){var t=e.handle,n=e.onChange,l=e.children,o=e.className,c=[];return o&&c.push(o),c.push("fullscreen"),t.active&&c.push("fullscreen-enabled"),(0,r.useEffect)((function(){n&&n(t.active,t)}),[t.active]),r.createElement("div",{className:c.join(" "),ref:t.node,style:t.active?{height:"100%",width:"100%"}:void 0},l)}}}]);