tocco-admin 1.0.246 → 1.0.248
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/changelog.md +13 -6
- package/dist/{chunk-280.fc70177b7ad0ff02c658.js → chunk-280.b0df5ee7b5063fb8e7ac.js} +1 -1
- package/dist/chunk-467.0f80916f2175ecc09e46.js +1 -0
- package/dist/{chunk-531.4c6166d2fe70c1e0507d.js → chunk-531.47e845499ca63e935ae2.js} +1 -1
- package/dist/{chunk-560.7226001f63806a1532bb.js → chunk-560.fd96eb53cd58eb8f09d8.js} +1 -1
- package/dist/chunk-834.441b2c29ff54b5ed889a.js +1 -0
- package/dist/chunk-860.4af1ca8729c42539a9f8.js +1 -0
- package/dist/chunk-896.5fa4268f01f679e80643.js +6 -0
- package/dist/chunk-actions.dba0772fc5f65dd519f1.js +1 -0
- package/dist/{chunk-code-editor.2ea317507f0ff6aef083.js → chunk-code-editor.20caf6999da927934858.js} +1 -1
- package/dist/chunk-docs-actions.98b85e2ceb3acb84dc04.js +1 -0
- package/dist/{chunk-html-editor.e6e0fc832e08a764b4f7.js → chunk-html-editor.9587bcf32761abbcf391.js} +1 -1
- package/dist/index.js +6 -6
- package/package.json +1 -1
- package/dist/chunk-568.8a4915056da26eac2876.js +0 -1
- package/dist/chunk-828.f4f977cbe6527a1d3194.js +0 -6
- package/dist/chunk-860.763f4a146d07d60e75b7.js +0 -1
- package/dist/chunk-actions.3ef6a68aa7c851c1d27c.js +0 -1
- package/dist/chunk-docs-actions.ce1391132fadc862b00f.js +0 -1
package/dist/{chunk-html-editor.e6e0fc832e08a764b4f7.js → chunk-html-editor.9587bcf32761abbcf391.js}
RENAMED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
4
4
|
* For licensing, see LICENSE.md.
|
|
5
5
|
*/
|
|
6
|
-
var o,a,i,u,l;o=e,a=function(e){return r=void 0,e?n(e):window.CKEDITOR?void t(CKEDITOR):n(new Error("Script loaded from editorUrl doesn't provide CKEDITOR namespace."))},u=document.head||document.getElementsByTagName("head")[0],l=document.createElement("script"),"function"==typeof a&&(i=a,a={}),a=a||{},i=i||function(){},l.type=a.type||"text/javascript",l.charset=a.charset||"utf8",l.async=!("async"in a)||!!a.async,l.src=o,a.attrs&&function(e,t){for(var n in t)e.setAttribute(n,t[n])}(l,a.attrs),a.text&&(l.text=String(a.text)),("onload"in l?c:s)(l,i),l.onload||c(l,i),u.appendChild(l)}))};var l=n(45697),d=function(){return(d=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function f(e,t,n){if(n||2===arguments.length)for(var r,o=0,a=t.length;o<a;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}var p=["activeEnterModeChange","activeFilterChange","afterCommandExec","afterInsertHtml","afterPaste","afterPasteFromWord","afterSetData","afterUndoImage","ariaEditorHelpLabel","ariaWidget","autogrow","beforeCommandExec","beforeDestroy","beforeGetData","beforeModeUnload","beforeSetMode","beforeUndoImage","blur","change","configLoaded","contentDirChanged","contentDom","contentDomInvalidated","contentDomUnload","contentPreview","customConfigLoaded","dataFiltered","dataReady","destroy","dialogHide","dialogShow","dirChanged","doubleclick","dragend","dragstart","drop","elementsPathUpdate","exportPdf","fileUploadRequest","fileUploadResponse","floatingSpaceLayout","focus","getData","getSnapshot","insertElement","insertHtml","insertText","instanceReady","key","langLoaded","loadSnapshot","loaded","lockSnapshot","maximize","menuShow","mode","notificationHide","notificationShow","notificationUpdate","paste","pasteFromWord","pluginsLoaded","readOnly","removeFormatCleanup","required","resize","save","saveSnapshot","selectionChange","setData","stylesRemove","stylesSet","template","toDataFormat","toHtml","uiSpace","unlockSnapshot","updateSnapshot","widgetDefinition"],h=["beforeLoad","namespaceLoaded"],y=f(f([],p,!0),h,!0),v="__CKE__";function m(e){var t=e.substr(0,1).toUpperCase()+e.substr(1);return"on".concat(t)}function g(e){return e.substr(2,1).toLowerCase()+e.substr(3)}var b=f(f([],p,!0),h,!0).reduce((function(e,t){var n;return d(d({},e),((n={})[t]=function(e){return"".concat(v).concat(e)}(t),n))}),{});function O(e){return e.split(/(?=[A-Z])/).join("-").toLowerCase()}function w(e,t,n){var r={display:"none",visibility:"hidden"};return"classic"===e?r:"ready"===t?null!=n?n:void 0:r}function T(e){var t=e.debug,n=e.editor,r=e.evtName,o=e.handler,a=e.listenerData,i=e.priority,c=t&&Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,5),s=o;return t&&(s=function(e){console.log({operation:"invoke",editor:n.name,evtName:r,handlerId:c,data:e.data,listenerData:e.listenerData}),o(e)}),t&&console.log({operation:"register",editor:n.name,evtName:r,handlerId:c}),n.on(r,s,null,a,i),function(){t&&console.log({operation:"unregister",editor:n.name,evtName:r,handlerId:c}),n.removeListener(r,s)}}var E=i.useEffect,P=i.useReducer,S=i.useRef,C={};function j(e,t){switch(t.type){case"init":return d(d({},e),{hookStatus:"init"});case"loading":return d(d({},e),{hookStatus:"loading"});case"unloaded":return{editor:t.payload,hookStatus:"unloaded"};case"loaded":return d(d({},e),{hookStatus:"loaded"});case"ready":return d(d({},e),{hookStatus:"ready"});case"destroyed":return{editor:void 0,hookStatus:"destroyed"};case"error":return{editor:void 0,hookStatus:"error"};default:return e}}var A=i.useEffect,x=i.useRef,k=i.useState;function L(e){var t=e.config,n=void 0===t?{}:t,r=e.debug,o=e.editorUrl,a=e.initData,c=e.name,s=e.readOnly,l=e.style,d=e.type,f=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(e,["config","debug","editorUrl","initData","name","readOnly","style","type"]),p=k(null),L=p[0],I=p[1],R=x(f);n&&"boolean"==typeof s&&(n.readOnly=s);var D=function(e){var t=e.config,n=e.debug,r=e.dispatchEvent,o=e.subscribeTo,a=void 0===o?y:o,i=e.editorUrl,c=e.element,s=e.initContent,l=e.type,d=void 0===l?"classic":l,f=S(i||"https://cdn.ckeditor.com/4.21.0/standard-all/ckeditor.js"),p=S(null!=a?a:y),m=S(n),g=S(r),O=S(s),w=S(t||C),A=S(d),x=P(j,{editor:void 0,hookStatus:"init"}),k=x[0],L=k.editor,I=k.hookStatus,R=x[1];return E((function(){return c&&!L&&(R({type:"loading"}),u(f.current,(function(e){var t;-1!==p.current.indexOf("namespaceLoaded")&&(null===(t=g.current)||void 0===t||t.call(g,{type:b.namespaceLoaded,payload:e}))})).then((function(e){var t,n="inline"===A.current,r=w.current.readOnly;-1!==p.current.indexOf("beforeLoad")&&(null===(t=g.current)||void 0===t||t.call(g,{type:b.beforeLoad,payload:e}));var o=e[n?"inline":"replace"](c,w.current);p.current.filter((function(e){return-1===h.indexOf(e)})).forEach((function(e){T({debug:m.current,editor:o,evtName:e,handler:function(t){var n;null===(n=g.current)||void 0===n||n.call(g,{type:"".concat(v).concat(e),payload:t})}})})),T({debug:m.current,editor:o,evtName:"loaded",handler:function(){R({type:"loaded"})},priority:-1}),T({debug:m.current,editor:o,evtName:"instanceReady",handler:function(e){var t=e.editor;R({type:"ready"}),n&&!r&&t.setReadOnly(!1),O.current&&t.setData(O.current,{noSnapshot:!0,callback:function(){t.resetUndo()}})},priority:-1}),T({debug:m.current,editor:o,evtName:"destroy",handler:function(){R({type:"destroyed"})},priority:-1}),R({type:"unloaded",payload:o})})).catch((function(e){console.error(e),R({type:"error"})}))),function(){L&&L.destroy()}}),[L,c]),{editor:L,status:null==L?void 0:L.status,error:"error"===I,loading:"loading"===I}}({config:n,dispatchEvent:function(e){var t=e.type,n=e.payload,r=m(t.substr(v.length)),o=R.current[r];o&&o(n)},debug:r,editorUrl:o,element:L,initContent:"string"==typeof a?a:void 0,subscribeTo:Object.keys(f).filter((function(e){return 0===e.indexOf("on")})).map(g),type:d}),N=D.editor,_=D.status;return A((function(){var e="inline"!==d&&N&&("loaded"===_||"ready"===_);return l&&e&&N.container.setStyles(l),function(){l&&e&&Object.keys(l).map(O).forEach((function(e){N.container.removeStyle(e)}))}}),[N,_,l,d]),A((function(){N&&"ready"===_&&"boolean"==typeof s&&N.setReadOnly(s)}),[N,_,s]),i.createElement("div",{id:null!=c?c:void 0,ref:I,style:w(null!=d?d:"classic",_,l)},"string"==typeof a?null:a)}var I=d({config:l.object,debug:l.bool,editorUrl:l.string,initData:l.node,name:l.string,readOnly:l.bool,style:l.object,type:l.oneOf(["classic","inline"])},y.reduce((function(e,t){var n;return d(d({},e),((n={})[m(t)]=l.func,n))}),{}));L.propTypes=I;var R,D=n(86896),N=n(28655),_=n.n(N),M=n(38205),U=n(56822),H=M.ZP.div.withConfig({displayName:"StyledHtmlEditor"})(R||(R=_()(["\n && {\n .ck-editor {\n --ck-border-radius: 0.27rem;\n ","\n\n .ck.ck-list__item .ck-button.ck-fontsize-option .ck-button__label {\n line-height: 1;\n }\n\n .ck-editor__editable {\n min-height: 100px;\n }\n }\n }\n"])),(function(e){return(0,U.L)(e,"ckeditor")})),F=n(85893);function B(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}var q=function(e){switch(e){case"fr-CH":return"fr";case"it-CH":return"it";case"en-US":return"en";case"fr":case"en":case"it":case"de":return e;case"de-CH":return"de-ch";case"de-DE":default:return"de"}},K=function(e){var t=e.value,r=e.onChange,o=e.contentLang,i=e.ckEditorConfig,c=(0,D.Z)().locale,s=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?B(Object(n),!0).forEach((function(t){a()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):B(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({language:q(c),contentsLanguage:o,entities:!1,allowedContent:!0,toolbar:[["Bold","Italic","Underline","Strike","RemoveFormat"],["Format","Font","FontSize","TextColor"],["NumberedList","BulletedList"],["Link","Unlink"],["Table","SpecialChar","Image"],["PasteText"],["Source"]],extraPlugins:["colorbutton","colordialog","dialogadvtab","font","codemirror"],removeButtons:[],removeDialogTabs:"",removePlugins:["elementspath"],codemirror:{mode:"htmlmixed",enableCodeFormatting:!0,autoFormatOnStart:!0}},i);return(0,F.jsx)(H,{children:(0,F.jsx)(L,{config:s,initData:t,type:"classic",onChange:function(e){var t=e.editor.getData();r(t)},onKey:function(e){"source"===e.editor.mode&&setTimeout((function(){var t=e.editor.editable().getValue();r(t)}),0)},editorUrl:"".concat(n.p,"ckeditor4/ckeditor.js")})})};K.defaultProps={value:"",contentLang:"de"};const W=K},81251:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>u});var r=n(59713),o=n.n(r),a=n(88162),i=n(85893);function c(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 s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const u=function(e){var t=e.size,n=e.style,r=e.icon;return(0,i.jsx)(a.Z,s(s({},n),{},{style:{fontSize:t},spin:!0,icon:r||"circle-notch"}))}},77840:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r.ZP});var r=n(12568)},67092:(e,t)=>{"use strict";t.__esModule=!0;t.canUseDOM=!("undefined"==typeof window||!window.document||!window.document.createElement),t.addEventListener=function(e,t,n){return e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent("on"+t,n)},t.removeEventListener=function(e,t,n){return e.removeEventListener?e.removeEventListener(t,n,!1):e.detachEvent("on"+t,n)},t.getConfirmation=function(e,t){return t(window.confirm(e))},t.supportsHistory=function(){var e=window.navigator.userAgent;return(-1===e.indexOf("Android 2.")&&-1===e.indexOf("Android 4.0")||-1===e.indexOf("Mobile Safari")||-1!==e.indexOf("Chrome")||-1!==e.indexOf("Windows Phone"))&&(window.history&&"pushState"in window.history)},t.supportsPopStateOnHashChange=function(){return-1===window.navigator.userAgent.indexOf("Trident")},t.supportsGoWithoutReloadUsingHash=function(){return-1===window.navigator.userAgent.indexOf("Firefox")},t.isExtraneousPopstateEvent=function(e){return void 0===e.state&&-1===navigator.userAgent.indexOf("CriOS")}},88536:(e,t,n)=>{"use strict";t.__esModule=!0,t.locationsAreEqual=t.createLocation=void 0;var r=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},o=c(n(14149)),a=c(n(54545)),i=n(3074);function c(e){return e&&e.__esModule?e:{default:e}}t.createLocation=function(e,t,n,a){var c=void 0;"string"==typeof e?(c=(0,i.parsePath)(e)).state=t:(void 0===(c=r({},e)).pathname&&(c.pathname=""),c.search?"?"!==c.search.charAt(0)&&(c.search="?"+c.search):c.search="",c.hash?"#"!==c.hash.charAt(0)&&(c.hash="#"+c.hash):c.hash="",void 0!==t&&void 0===c.state&&(c.state=t));try{c.pathname=decodeURI(c.pathname)}catch(e){throw e instanceof URIError?new URIError('Pathname "'+c.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):e}return n&&(c.key=n),a?c.pathname?"/"!==c.pathname.charAt(0)&&(c.pathname=(0,o.default)(c.pathname,a.pathname)):c.pathname=a.pathname:c.pathname||(c.pathname="/"),c},t.locationsAreEqual=function(e,t){return e.pathname===t.pathname&&e.search===t.search&&e.hash===t.hash&&e.key===t.key&&(0,a.default)(e.state,t.state)}},3074:(e,t)=>{"use strict";t.__esModule=!0;t.addLeadingSlash=function(e){return"/"===e.charAt(0)?e:"/"+e},t.stripLeadingSlash=function(e){return"/"===e.charAt(0)?e.substr(1):e};var n=t.hasBasename=function(e,t){return new RegExp("^"+t+"(\\/|\\?|#|$)","i").test(e)};t.stripBasename=function(e,t){return n(e,t)?e.substr(t.length):e},t.stripTrailingSlash=function(e){return"/"===e.charAt(e.length-1)?e.slice(0,-1):e},t.parsePath=function(e){var t=e||"/",n="",r="",o=t.indexOf("#");-1!==o&&(r=t.substr(o),t=t.substr(0,o));var a=t.indexOf("?");return-1!==a&&(n=t.substr(a),t=t.substr(0,a)),{pathname:t,search:"?"===n?"":n,hash:"#"===r?"":r}},t.createPath=function(e){var t=e.pathname,n=e.search,r=e.hash,o=t||"/";return n&&"?"!==n&&(o+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(o+="#"===r.charAt(0)?r:"#"+r),o}},52540:(e,t,n)=>{"use strict";var r=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},o=l(n(30670)),a=l(n(41143)),i=n(88536),c=n(3074),s=l(n(3405)),u=n(67092);function l(e){return e&&e.__esModule?e:{default:e}}var d="hashchange",f={hashbang:{encodePath:function(e){return"!"===e.charAt(0)?e:"!/"+(0,c.stripLeadingSlash)(e)},decodePath:function(e){return"!"===e.charAt(0)?e.substr(1):e}},noslash:{encodePath:c.stripLeadingSlash,decodePath:c.addLeadingSlash},slash:{encodePath:c.addLeadingSlash,decodePath:c.addLeadingSlash}},p=function(){var e=window.location.href,t=e.indexOf("#");return-1===t?"":e.substring(t+1)},h=function(e){return window.location.hash=e},y=function(e){var t=window.location.href.indexOf("#");window.location.replace(window.location.href.slice(0,t>=0?t:0)+"#"+e)};t.Z=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,a.default)(u.canUseDOM,"Hash history needs a DOM");var t=window.history,n=(0,u.supportsGoWithoutReloadUsingHash)(),l=e.getUserConfirmation,v=void 0===l?u.getConfirmation:l,m=e.hashType,g=void 0===m?"slash":m,b=e.basename?(0,c.stripTrailingSlash)((0,c.addLeadingSlash)(e.basename)):"",O=f[g],w=O.encodePath,T=O.decodePath,E=function(){var e=T(p());return(0,o.default)(!b||(0,c.hasBasename)(e,b),'You are attempting to use a basename on a page whose URL path does not begin with the basename. Expected path "'+e+'" to begin with "'+b+'".'),b&&(e=(0,c.stripBasename)(e,b)),(0,i.createLocation)(e)},P=(0,s.default)(),S=function(e){r(z,e),z.length=t.length,P.notifyListeners(z.location,z.action)},C=!1,j=null,A=function(){var e=p(),t=w(e);if(e!==t)y(t);else{var n=E(),r=z.location;if(!C&&(0,i.locationsAreEqual)(r,n))return;if(j===(0,c.createPath)(n))return;j=null,x(n)}},x=function(e){if(C)C=!1,S();else{P.confirmTransitionTo(e,"POP",v,(function(t){t?S({action:"POP",location:e}):k(e)}))}},k=function(e){var t=z.location,n=D.lastIndexOf((0,c.createPath)(t));-1===n&&(n=0);var r=D.lastIndexOf((0,c.createPath)(e));-1===r&&(r=0);var o=n-r;o&&(C=!0,U(o))},L=p(),I=w(L);L!==I&&y(I);var R=E(),D=[(0,c.createPath)(R)],N=function(e){return"#"+w(b+(0,c.createPath)(e))},_=function(e,t){(0,o.default)(void 0===t,"Hash history cannot push state; it is ignored");var n="PUSH",r=(0,i.createLocation)(e,void 0,void 0,z.location);P.confirmTransitionTo(r,n,v,(function(e){if(e){var t=(0,c.createPath)(r),a=w(b+t);if(p()!==a){j=t,h(a);var i=D.lastIndexOf((0,c.createPath)(z.location)),s=D.slice(0,-1===i?0:i+1);s.push(t),D=s,S({action:n,location:r})}else(0,o.default)(!1,"Hash history cannot PUSH the same path; a new entry will not be added to the history stack"),S()}}))},M=function(e,t){(0,o.default)(void 0===t,"Hash history cannot replace state; it is ignored");var n="REPLACE",r=(0,i.createLocation)(e,void 0,void 0,z.location);P.confirmTransitionTo(r,n,v,(function(e){if(e){var t=(0,c.createPath)(r),o=w(b+t);p()!==o&&(j=t,y(o));var a=D.indexOf((0,c.createPath)(z.location));-1!==a&&(D[a]=t),S({action:n,location:r})}}))},U=function(e){(0,o.default)(n,"Hash history go(n) causes a full page reload in this browser"),t.go(e)},H=function(){return U(-1)},F=function(){return U(1)},B=0,q=function(e){1===(B+=e)?(0,u.addEventListener)(window,d,A):0===B&&(0,u.removeEventListener)(window,d,A)},K=!1,W=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=P.setPrompt(e);return K||(q(1),K=!0),function(){return K&&(K=!1,q(-1)),t()}},Y=function(e){var t=P.appendListener(e);return q(1),function(){q(-1),t()}},z={length:t.length,action:"POP",location:R,createHref:N,push:_,replace:M,go:U,goBack:H,goForward:F,block:W,listen:Y};return z}},83682:(e,t,n)=>{"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=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},a=u(n(30670)),i=n(3074),c=n(88536),s=u(n(3405));function u(e){return e&&e.__esModule?e:{default:e}}var l=function(e,t,n){return Math.min(Math.max(e,t),n)};t.Z=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.getUserConfirmation,n=e.initialEntries,u=void 0===n?["/"]:n,d=e.initialIndex,f=void 0===d?0:d,p=e.keyLength,h=void 0===p?6:p,y=(0,s.default)(),v=function(e){o(x,e),x.length=x.entries.length,y.notifyListeners(x.location,x.action)},m=function(){return Math.random().toString(36).substr(2,h)},g=l(f,0,u.length-1),b=u.map((function(e){return"string"==typeof e?(0,c.createLocation)(e,void 0,m()):(0,c.createLocation)(e,void 0,e.key||m())})),O=i.createPath,w=function(e,n){(0,a.default)(!("object"===(void 0===e?"undefined":r(e))&&void 0!==e.state&&void 0!==n),"You should avoid providing a 2nd state argument to push when the 1st argument is a location-like object that already has state; it is ignored");var o="PUSH",i=(0,c.createLocation)(e,n,m(),x.location);y.confirmTransitionTo(i,o,t,(function(e){if(e){var t=x.index+1,n=x.entries.slice(0);n.length>t?n.splice(t,n.length-t,i):n.push(i),v({action:o,location:i,index:t,entries:n})}}))},T=function(e,n){(0,a.default)(!("object"===(void 0===e?"undefined":r(e))&&void 0!==e.state&&void 0!==n),"You should avoid providing a 2nd state argument to replace when the 1st argument is a location-like object that already has state; it is ignored");var o="REPLACE",i=(0,c.createLocation)(e,n,m(),x.location);y.confirmTransitionTo(i,o,t,(function(e){e&&(x.entries[x.index]=i,v({action:o,location:i}))}))},E=function(e){var n=l(x.index+e,0,x.entries.length-1),r=x.entries[n];y.confirmTransitionTo(r,"POP",t,(function(e){e?v({action:"POP",location:r,index:n}):v()}))},P=function(){return E(-1)},S=function(){return E(1)},C=function(e){var t=x.index+e;return t>=0&&t<x.entries.length},j=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return y.setPrompt(e)},A=function(e){return y.appendListener(e)},x={length:b.length,action:"POP",location:b[g],index:g,entries:b,createHref:O,push:w,replace:T,go:E,goBack:P,goForward:S,canGo:C,block:j,listen:A};return x}},3405:(e,t,n)=>{"use strict";t.__esModule=!0;var r,o=n(30670),a=(r=o)&&r.__esModule?r:{default:r};t.default=function(){var e=null,t=[];return{setPrompt:function(t){return(0,a.default)(null==e,"A history supports only one prompt at a time"),e=t,function(){e===t&&(e=null)}},confirmTransitionTo:function(t,n,r,o){if(null!=e){var i="function"==typeof e?e(t,n):e;"string"==typeof i?"function"==typeof r?r(i,o):((0,a.default)(!1,"A history needs a getUserConfirmation function in order to use a prompt message"),o(!0)):o(!1!==i)}else o(!0)},appendListener:function(e){var n=!0,r=function(){n&&e.apply(void 0,arguments)};return t.push(r),function(){n=!1,t=t.filter((function(e){return e!==r}))}},notifyListeners:function(){for(var e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];t.forEach((function(e){return e.apply(void 0,n)}))}}}},41143:e=>{"use strict";e.exports=function(e,t,n,r,o,a,i,c){if(!e){var s;if(void 0===t)s=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,r,o,a,i,c],l=0;(s=new Error(t.replace(/%s/g,(function(){return u[l++]})))).name="Invariant Violation"}throw s.framesToPop=1,s}}},27418:e=>{"use strict";
|
|
6
|
+
var o,a,i,u,l;o=e,a=function(e){return r=void 0,e?n(e):window.CKEDITOR?void t(CKEDITOR):n(new Error("Script loaded from editorUrl doesn't provide CKEDITOR namespace."))},u=document.head||document.getElementsByTagName("head")[0],l=document.createElement("script"),"function"==typeof a&&(i=a,a={}),a=a||{},i=i||function(){},l.type=a.type||"text/javascript",l.charset=a.charset||"utf8",l.async=!("async"in a)||!!a.async,l.src=o,a.attrs&&function(e,t){for(var n in t)e.setAttribute(n,t[n])}(l,a.attrs),a.text&&(l.text=String(a.text)),("onload"in l?c:s)(l,i),l.onload||c(l,i),u.appendChild(l)}))};var l=n(45697),d=function(){return(d=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function f(e,t,n){if(n||2===arguments.length)for(var r,o=0,a=t.length;o<a;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}var p=["activeEnterModeChange","activeFilterChange","afterCommandExec","afterInsertHtml","afterPaste","afterPasteFromWord","afterSetData","afterUndoImage","ariaEditorHelpLabel","ariaWidget","autogrow","beforeCommandExec","beforeDestroy","beforeGetData","beforeModeUnload","beforeSetMode","beforeUndoImage","blur","change","configLoaded","contentDirChanged","contentDom","contentDomInvalidated","contentDomUnload","contentPreview","customConfigLoaded","dataFiltered","dataReady","destroy","dialogHide","dialogShow","dirChanged","doubleclick","dragend","dragstart","drop","elementsPathUpdate","exportPdf","fileUploadRequest","fileUploadResponse","floatingSpaceLayout","focus","getData","getSnapshot","insertElement","insertHtml","insertText","instanceReady","key","langLoaded","loadSnapshot","loaded","lockSnapshot","maximize","menuShow","mode","notificationHide","notificationShow","notificationUpdate","paste","pasteFromWord","pluginsLoaded","readOnly","removeFormatCleanup","required","resize","save","saveSnapshot","selectionChange","setData","stylesRemove","stylesSet","template","toDataFormat","toHtml","uiSpace","unlockSnapshot","updateSnapshot","widgetDefinition"],h=["beforeLoad","namespaceLoaded"],y=f(f([],p,!0),h,!0),v="__CKE__";function m(e){var t=e.substr(0,1).toUpperCase()+e.substr(1);return"on".concat(t)}function g(e){return e.substr(2,1).toLowerCase()+e.substr(3)}var b=f(f([],p,!0),h,!0).reduce((function(e,t){var n;return d(d({},e),((n={})[t]=function(e){return"".concat(v).concat(e)}(t),n))}),{});function O(e){return e.split(/(?=[A-Z])/).join("-").toLowerCase()}function w(e,t,n){var r={display:"none",visibility:"hidden"};return"classic"===e?r:"ready"===t?null!=n?n:void 0:r}function T(e){var t=e.debug,n=e.editor,r=e.evtName,o=e.handler,a=e.listenerData,i=e.priority,c=t&&Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,5),s=o;return t&&(s=function(e){console.log({operation:"invoke",editor:n.name,evtName:r,handlerId:c,data:e.data,listenerData:e.listenerData}),o(e)}),t&&console.log({operation:"register",editor:n.name,evtName:r,handlerId:c}),n.on(r,s,null,a,i),function(){t&&console.log({operation:"unregister",editor:n.name,evtName:r,handlerId:c}),n.removeListener(r,s)}}var E=i.useEffect,P=i.useReducer,S=i.useRef,C={};function j(e,t){switch(t.type){case"init":return d(d({},e),{hookStatus:"init"});case"loading":return d(d({},e),{hookStatus:"loading"});case"unloaded":return{editor:t.payload,hookStatus:"unloaded"};case"loaded":return d(d({},e),{hookStatus:"loaded"});case"ready":return d(d({},e),{hookStatus:"ready"});case"destroyed":return{editor:void 0,hookStatus:"destroyed"};case"error":return{editor:void 0,hookStatus:"error"};default:return e}}var A=i.useEffect,x=i.useRef,k=i.useState;function L(e){var t=e.config,n=void 0===t?{}:t,r=e.debug,o=e.editorUrl,a=e.initData,c=e.name,s=e.readOnly,l=e.style,d=e.type,f=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(e,["config","debug","editorUrl","initData","name","readOnly","style","type"]),p=k(null),L=p[0],I=p[1],R=x(f);n&&"boolean"==typeof s&&(n.readOnly=s);var D=function(e){var t=e.config,n=e.debug,r=e.dispatchEvent,o=e.subscribeTo,a=void 0===o?y:o,i=e.editorUrl,c=e.element,s=e.initContent,l=e.type,d=void 0===l?"classic":l,f=S(i||"https://cdn.ckeditor.com/4.21.0/standard-all/ckeditor.js"),p=S(null!=a?a:y),m=S(n),g=S(r),O=S(s),w=S(t||C),A=S(d),x=P(j,{editor:void 0,hookStatus:"init"}),k=x[0],L=k.editor,I=k.hookStatus,R=x[1];return E((function(){return c&&!L&&(R({type:"loading"}),u(f.current,(function(e){var t;-1!==p.current.indexOf("namespaceLoaded")&&(null===(t=g.current)||void 0===t||t.call(g,{type:b.namespaceLoaded,payload:e}))})).then((function(e){var t,n="inline"===A.current,r=w.current.readOnly;-1!==p.current.indexOf("beforeLoad")&&(null===(t=g.current)||void 0===t||t.call(g,{type:b.beforeLoad,payload:e}));var o=e[n?"inline":"replace"](c,w.current);p.current.filter((function(e){return-1===h.indexOf(e)})).forEach((function(e){T({debug:m.current,editor:o,evtName:e,handler:function(t){var n;null===(n=g.current)||void 0===n||n.call(g,{type:"".concat(v).concat(e),payload:t})}})})),T({debug:m.current,editor:o,evtName:"loaded",handler:function(){R({type:"loaded"})},priority:-1}),T({debug:m.current,editor:o,evtName:"instanceReady",handler:function(e){var t=e.editor;R({type:"ready"}),n&&!r&&t.setReadOnly(!1),O.current&&t.setData(O.current,{noSnapshot:!0,callback:function(){t.resetUndo()}})},priority:-1}),T({debug:m.current,editor:o,evtName:"destroy",handler:function(){R({type:"destroyed"})},priority:-1}),R({type:"unloaded",payload:o})})).catch((function(e){console.error(e),R({type:"error"})}))),function(){L&&L.destroy()}}),[L,c]),{editor:L,status:null==L?void 0:L.status,error:"error"===I,loading:"loading"===I}}({config:n,dispatchEvent:function(e){var t=e.type,n=e.payload,r=m(t.substr(v.length)),o=R.current[r];o&&o(n)},debug:r,editorUrl:o,element:L,initContent:"string"==typeof a?a:void 0,subscribeTo:Object.keys(f).filter((function(e){return 0===e.indexOf("on")})).map(g),type:d}),N=D.editor,_=D.status;return A((function(){var e="inline"!==d&&N&&("loaded"===_||"ready"===_);return l&&e&&N.container.setStyles(l),function(){l&&e&&Object.keys(l).map(O).forEach((function(e){N.container.removeStyle(e)}))}}),[N,_,l,d]),A((function(){N&&"ready"===_&&"boolean"==typeof s&&N.setReadOnly(s)}),[N,_,s]),i.createElement("div",{id:null!=c?c:void 0,ref:I,style:w(null!=d?d:"classic",_,l)},"string"==typeof a?null:a)}var I=d({config:l.object,debug:l.bool,editorUrl:l.string,initData:l.node,name:l.string,readOnly:l.bool,style:l.object,type:l.oneOf(["classic","inline"])},y.reduce((function(e,t){var n;return d(d({},e),((n={})[m(t)]=l.func,n))}),{}));L.propTypes=I;var R,D=n(86896),N=n(28655),_=n.n(N),M=n(38205),U=n(56822),H=M.ZP.div.withConfig({displayName:"StyledHtmlEditor"})(R||(R=_()(["\n && {\n .ck-editor {\n --ck-border-radius: 0.27rem;\n ","\n\n .ck.ck-list__item .ck-button.ck-fontsize-option .ck-button__label {\n line-height: 1;\n }\n\n .ck-editor__editable {\n min-height: 100px;\n }\n }\n }\n"])),(function(e){return(0,U.L)(e,"ckeditor")})),F=n(85893);function B(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}var q=function(e){switch(e){case"fr-CH":return"fr";case"it-CH":return"it";case"en-US":return"en";case"fr":case"en":case"it":case"de":return e;case"de-CH":return"de-ch";case"de-DE":default:return"de"}},K=function(e){var t=e.value,r=e.onChange,o=e.contentLang,i=e.ckEditorConfig,c=(0,D.Z)().locale,s=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?B(Object(n),!0).forEach((function(t){a()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):B(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({language:q(c),contentsLanguage:o,entities:!1,allowedContent:!0,toolbar:[["Bold","Italic","Underline","Strike","RemoveFormat"],["Format","Font","FontSize","TextColor"],["NumberedList","BulletedList"],["Link","Unlink"],["Table","SpecialChar","Image"],["PasteText"],["Source"]],extraPlugins:["colorbutton","colordialog","dialogadvtab","font","codemirror"],removeButtons:[],removeDialogTabs:"",removePlugins:["elementspath"],codemirror:{mode:"htmlmixed",enableCodeFormatting:!0,autoFormatOnStart:!0}},i);return(0,F.jsx)(H,{children:(0,F.jsx)(L,{config:s,initData:t,type:"classic",onChange:function(e){var t=e.editor.getData();r(t)},onKey:function(e){"source"===e.editor.mode&&setTimeout((function(){var t=e.editor.editable().getValue();r(t)}),0)},editorUrl:"".concat(n.p,"ckeditor4/ckeditor.js")})})};K.defaultProps={value:"",contentLang:"de"};const W=K},81251:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>u});var r=n(59713),o=n.n(r),a=n(88162),i=n(85893);function c(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 s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const u=function(e){var t=e.size,n=e.style,r=e.icon;return(0,i.jsx)(a.Z,s(s({},n),{},{style:{fontSize:t},spin:!0,icon:r||"circle-notch"}))}},77840:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r.ZP});var r=n(44834)},67092:(e,t)=>{"use strict";t.__esModule=!0;t.canUseDOM=!("undefined"==typeof window||!window.document||!window.document.createElement),t.addEventListener=function(e,t,n){return e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent("on"+t,n)},t.removeEventListener=function(e,t,n){return e.removeEventListener?e.removeEventListener(t,n,!1):e.detachEvent("on"+t,n)},t.getConfirmation=function(e,t){return t(window.confirm(e))},t.supportsHistory=function(){var e=window.navigator.userAgent;return(-1===e.indexOf("Android 2.")&&-1===e.indexOf("Android 4.0")||-1===e.indexOf("Mobile Safari")||-1!==e.indexOf("Chrome")||-1!==e.indexOf("Windows Phone"))&&(window.history&&"pushState"in window.history)},t.supportsPopStateOnHashChange=function(){return-1===window.navigator.userAgent.indexOf("Trident")},t.supportsGoWithoutReloadUsingHash=function(){return-1===window.navigator.userAgent.indexOf("Firefox")},t.isExtraneousPopstateEvent=function(e){return void 0===e.state&&-1===navigator.userAgent.indexOf("CriOS")}},88536:(e,t,n)=>{"use strict";t.__esModule=!0,t.locationsAreEqual=t.createLocation=void 0;var r=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},o=c(n(14149)),a=c(n(54545)),i=n(3074);function c(e){return e&&e.__esModule?e:{default:e}}t.createLocation=function(e,t,n,a){var c=void 0;"string"==typeof e?(c=(0,i.parsePath)(e)).state=t:(void 0===(c=r({},e)).pathname&&(c.pathname=""),c.search?"?"!==c.search.charAt(0)&&(c.search="?"+c.search):c.search="",c.hash?"#"!==c.hash.charAt(0)&&(c.hash="#"+c.hash):c.hash="",void 0!==t&&void 0===c.state&&(c.state=t));try{c.pathname=decodeURI(c.pathname)}catch(e){throw e instanceof URIError?new URIError('Pathname "'+c.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):e}return n&&(c.key=n),a?c.pathname?"/"!==c.pathname.charAt(0)&&(c.pathname=(0,o.default)(c.pathname,a.pathname)):c.pathname=a.pathname:c.pathname||(c.pathname="/"),c},t.locationsAreEqual=function(e,t){return e.pathname===t.pathname&&e.search===t.search&&e.hash===t.hash&&e.key===t.key&&(0,a.default)(e.state,t.state)}},3074:(e,t)=>{"use strict";t.__esModule=!0;t.addLeadingSlash=function(e){return"/"===e.charAt(0)?e:"/"+e},t.stripLeadingSlash=function(e){return"/"===e.charAt(0)?e.substr(1):e};var n=t.hasBasename=function(e,t){return new RegExp("^"+t+"(\\/|\\?|#|$)","i").test(e)};t.stripBasename=function(e,t){return n(e,t)?e.substr(t.length):e},t.stripTrailingSlash=function(e){return"/"===e.charAt(e.length-1)?e.slice(0,-1):e},t.parsePath=function(e){var t=e||"/",n="",r="",o=t.indexOf("#");-1!==o&&(r=t.substr(o),t=t.substr(0,o));var a=t.indexOf("?");return-1!==a&&(n=t.substr(a),t=t.substr(0,a)),{pathname:t,search:"?"===n?"":n,hash:"#"===r?"":r}},t.createPath=function(e){var t=e.pathname,n=e.search,r=e.hash,o=t||"/";return n&&"?"!==n&&(o+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(o+="#"===r.charAt(0)?r:"#"+r),o}},52540:(e,t,n)=>{"use strict";var r=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},o=l(n(30670)),a=l(n(41143)),i=n(88536),c=n(3074),s=l(n(3405)),u=n(67092);function l(e){return e&&e.__esModule?e:{default:e}}var d="hashchange",f={hashbang:{encodePath:function(e){return"!"===e.charAt(0)?e:"!/"+(0,c.stripLeadingSlash)(e)},decodePath:function(e){return"!"===e.charAt(0)?e.substr(1):e}},noslash:{encodePath:c.stripLeadingSlash,decodePath:c.addLeadingSlash},slash:{encodePath:c.addLeadingSlash,decodePath:c.addLeadingSlash}},p=function(){var e=window.location.href,t=e.indexOf("#");return-1===t?"":e.substring(t+1)},h=function(e){return window.location.hash=e},y=function(e){var t=window.location.href.indexOf("#");window.location.replace(window.location.href.slice(0,t>=0?t:0)+"#"+e)};t.Z=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,a.default)(u.canUseDOM,"Hash history needs a DOM");var t=window.history,n=(0,u.supportsGoWithoutReloadUsingHash)(),l=e.getUserConfirmation,v=void 0===l?u.getConfirmation:l,m=e.hashType,g=void 0===m?"slash":m,b=e.basename?(0,c.stripTrailingSlash)((0,c.addLeadingSlash)(e.basename)):"",O=f[g],w=O.encodePath,T=O.decodePath,E=function(){var e=T(p());return(0,o.default)(!b||(0,c.hasBasename)(e,b),'You are attempting to use a basename on a page whose URL path does not begin with the basename. Expected path "'+e+'" to begin with "'+b+'".'),b&&(e=(0,c.stripBasename)(e,b)),(0,i.createLocation)(e)},P=(0,s.default)(),S=function(e){r(z,e),z.length=t.length,P.notifyListeners(z.location,z.action)},C=!1,j=null,A=function(){var e=p(),t=w(e);if(e!==t)y(t);else{var n=E(),r=z.location;if(!C&&(0,i.locationsAreEqual)(r,n))return;if(j===(0,c.createPath)(n))return;j=null,x(n)}},x=function(e){if(C)C=!1,S();else{P.confirmTransitionTo(e,"POP",v,(function(t){t?S({action:"POP",location:e}):k(e)}))}},k=function(e){var t=z.location,n=D.lastIndexOf((0,c.createPath)(t));-1===n&&(n=0);var r=D.lastIndexOf((0,c.createPath)(e));-1===r&&(r=0);var o=n-r;o&&(C=!0,U(o))},L=p(),I=w(L);L!==I&&y(I);var R=E(),D=[(0,c.createPath)(R)],N=function(e){return"#"+w(b+(0,c.createPath)(e))},_=function(e,t){(0,o.default)(void 0===t,"Hash history cannot push state; it is ignored");var n="PUSH",r=(0,i.createLocation)(e,void 0,void 0,z.location);P.confirmTransitionTo(r,n,v,(function(e){if(e){var t=(0,c.createPath)(r),a=w(b+t);if(p()!==a){j=t,h(a);var i=D.lastIndexOf((0,c.createPath)(z.location)),s=D.slice(0,-1===i?0:i+1);s.push(t),D=s,S({action:n,location:r})}else(0,o.default)(!1,"Hash history cannot PUSH the same path; a new entry will not be added to the history stack"),S()}}))},M=function(e,t){(0,o.default)(void 0===t,"Hash history cannot replace state; it is ignored");var n="REPLACE",r=(0,i.createLocation)(e,void 0,void 0,z.location);P.confirmTransitionTo(r,n,v,(function(e){if(e){var t=(0,c.createPath)(r),o=w(b+t);p()!==o&&(j=t,y(o));var a=D.indexOf((0,c.createPath)(z.location));-1!==a&&(D[a]=t),S({action:n,location:r})}}))},U=function(e){(0,o.default)(n,"Hash history go(n) causes a full page reload in this browser"),t.go(e)},H=function(){return U(-1)},F=function(){return U(1)},B=0,q=function(e){1===(B+=e)?(0,u.addEventListener)(window,d,A):0===B&&(0,u.removeEventListener)(window,d,A)},K=!1,W=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=P.setPrompt(e);return K||(q(1),K=!0),function(){return K&&(K=!1,q(-1)),t()}},Y=function(e){var t=P.appendListener(e);return q(1),function(){q(-1),t()}},z={length:t.length,action:"POP",location:R,createHref:N,push:_,replace:M,go:U,goBack:H,goForward:F,block:W,listen:Y};return z}},83682:(e,t,n)=>{"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=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},a=u(n(30670)),i=n(3074),c=n(88536),s=u(n(3405));function u(e){return e&&e.__esModule?e:{default:e}}var l=function(e,t,n){return Math.min(Math.max(e,t),n)};t.Z=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.getUserConfirmation,n=e.initialEntries,u=void 0===n?["/"]:n,d=e.initialIndex,f=void 0===d?0:d,p=e.keyLength,h=void 0===p?6:p,y=(0,s.default)(),v=function(e){o(x,e),x.length=x.entries.length,y.notifyListeners(x.location,x.action)},m=function(){return Math.random().toString(36).substr(2,h)},g=l(f,0,u.length-1),b=u.map((function(e){return"string"==typeof e?(0,c.createLocation)(e,void 0,m()):(0,c.createLocation)(e,void 0,e.key||m())})),O=i.createPath,w=function(e,n){(0,a.default)(!("object"===(void 0===e?"undefined":r(e))&&void 0!==e.state&&void 0!==n),"You should avoid providing a 2nd state argument to push when the 1st argument is a location-like object that already has state; it is ignored");var o="PUSH",i=(0,c.createLocation)(e,n,m(),x.location);y.confirmTransitionTo(i,o,t,(function(e){if(e){var t=x.index+1,n=x.entries.slice(0);n.length>t?n.splice(t,n.length-t,i):n.push(i),v({action:o,location:i,index:t,entries:n})}}))},T=function(e,n){(0,a.default)(!("object"===(void 0===e?"undefined":r(e))&&void 0!==e.state&&void 0!==n),"You should avoid providing a 2nd state argument to replace when the 1st argument is a location-like object that already has state; it is ignored");var o="REPLACE",i=(0,c.createLocation)(e,n,m(),x.location);y.confirmTransitionTo(i,o,t,(function(e){e&&(x.entries[x.index]=i,v({action:o,location:i}))}))},E=function(e){var n=l(x.index+e,0,x.entries.length-1),r=x.entries[n];y.confirmTransitionTo(r,"POP",t,(function(e){e?v({action:"POP",location:r,index:n}):v()}))},P=function(){return E(-1)},S=function(){return E(1)},C=function(e){var t=x.index+e;return t>=0&&t<x.entries.length},j=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return y.setPrompt(e)},A=function(e){return y.appendListener(e)},x={length:b.length,action:"POP",location:b[g],index:g,entries:b,createHref:O,push:w,replace:T,go:E,goBack:P,goForward:S,canGo:C,block:j,listen:A};return x}},3405:(e,t,n)=>{"use strict";t.__esModule=!0;var r,o=n(30670),a=(r=o)&&r.__esModule?r:{default:r};t.default=function(){var e=null,t=[];return{setPrompt:function(t){return(0,a.default)(null==e,"A history supports only one prompt at a time"),e=t,function(){e===t&&(e=null)}},confirmTransitionTo:function(t,n,r,o){if(null!=e){var i="function"==typeof e?e(t,n):e;"string"==typeof i?"function"==typeof r?r(i,o):((0,a.default)(!1,"A history needs a getUserConfirmation function in order to use a prompt message"),o(!0)):o(!1!==i)}else o(!0)},appendListener:function(e){var n=!0,r=function(){n&&e.apply(void 0,arguments)};return t.push(r),function(){n=!1,t=t.filter((function(e){return e!==r}))}},notifyListeners:function(){for(var e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];t.forEach((function(e){return e.apply(void 0,n)}))}}}},41143:e=>{"use strict";e.exports=function(e,t,n,r,o,a,i,c){if(!e){var s;if(void 0===t)s=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,r,o,a,i,c],l=0;(s=new Error(t.replace(/%s/g,(function(){return u[l++]})))).name="Invariant Violation"}throw s.framesToPop=1,s}}},27418:e=>{"use strict";
|
|
7
7
|
/*
|
|
8
8
|
object-assign
|
|
9
9
|
(c) Sindre Sorhus
|