Rev 7287 | Ir a la última revisión | Autoría | Comparar con el anterior | Ultima modificación | Ver Log |
(self.webpackChunkleaderslinked=self.webpackChunkleaderslinked||[]).push([[9494],{78298:(e,t,r)=>{"use strict";var n=r(64836);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=n(r(64938)),a=r(85893),i=(0,o.default)((0,a.jsx)("path",{d:"M17.77 3.77 16 2 6 12l10 10 1.77-1.77L9.54 12z"}),"ArrowBackIosNew");t.default=i},41733:(e,t,r)=>{"use strict";var n=r(64836);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=n(r(64938)),a=r(85893),i=(0,o.default)((0,a.jsx)("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"}),"Delete");t.default=i},77957:(e,t,r)=>{"use strict";var n=r(64836);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=n(r(64938)),a=r(85893),i=(0,o.default)((0,a.jsx)("path",{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 0 0-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"}),"Edit");t.default=i},54048:(e,t,r)=>{"use strict";var n=r(64836);Object.def
ineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=n(r(64938)),a=r(85893),i=(0,o.default)((0,a.jsx)("path",{d:"M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"}),"OpenInNew");t.default=i},64938:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return n.createSvgIcon}});var n=r(64298)},55390:(e,t,r)=>{"use strict";r.r(t),r.d(t,{CKEditor:()=>R,CKEditorEventAction:()=>b,prefixEventName:()=>v,registerEditorEventHandler:()=>E,stripPrefix:()=>h,useCKEditor:()=>D});var n,o=r(67294);function a(e,t){e.onload=function(){this.onerror=this.onload=null,t(null,e)},e.onerror=function(){this.onerror=this.onload=null,t(new Error("Failed to load "+this.src),e)}}function i(e,t){e.onreadystatechange=function(){"complete"!=this.readyState&&"loaded"!=this.readyState||(this.onreadystatechange=null,t(null,e))}}function d(e,t){return"CKEDITOR"in window?Pro
mise.resolve(CKEDITOR):"string"!=typeof e||e.length<1?Promise.reject(new TypeError("CKEditor URL must be a non-empty string.")):(n||(n=d.scriptLoader(e).then((function(e){return t&&t(e),e}))),n)}d.scriptLoader=function(e){return new Promise((function(t,r){
/**
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md.
*/
var o,d,l,c,u;o=e,d=function(e){return n=void 0,e?r(e):window.CKEDITOR?void t(CKEDITOR):r(new Error("Script loaded from editorUrl doesn't provide CKEDITOR namespace."))},c=document.head||document.getElementsByTagName("head")[0],u=document.createElement("script"),"function"==typeof d&&(l=d,d={}),d=d||{},l=l||function(){},u.type=d.type||"text/javascript",u.charset=d.charset||"utf8",u.async=!("async"in d)||!!d.async,u.src=o,d.attrs&&function(e,t){for(var r in t)e.setAttribute(r,t[r])}(u,d.attrs),d.text&&(u.text=String(d.text)),("onload"in u?a:i)(u,l),u.onload||a(u,l),c.appendChild(u)}))};var l=r(45697),c=function(){return c=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},c.apply(this,arguments)};function u(e,t,r){if(r||2===arguments.length)for(var n,o=0,a=t.length;o<a;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))}var s=["activeE
nterModeChange","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","se
tData","stylesRemove","stylesSet","template","toDataFormat","toHtml","uiSpace","unlockSnapshot","updateSnapshot","widgetDefinition"],f=["beforeLoad","namespaceLoaded"],p=u(u([],s,!0),f,!0),y="__CKE__";function v(e){return"".concat(y).concat(e)}function h(e){return e.substr(y.length)}function g(e){var t=e.substr(0,1).toUpperCase()+e.substr(1);return"on".concat(t)}function m(e){return e.substr(2,1).toLowerCase()+e.substr(3)}var b=u(u([],s,!0),f,!0).reduce((function(e,t){var r;return c(c({},e),((r={})[t]=v(t),r))}),{});function O(e){return e.split(/(?=[A-Z])/).join("-").toLowerCase()}function S(e,t,r){var n={display:"none",visibility:"hidden"};return"classic"===e?n:"ready"===t?null!=r?r:void 0:n}function E(e){var t=e.debug,r=e.editor,n=e.evtName,o=e.handler,a=e.listenerData,i=e.priority,d=t&&Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,5),l=o;return t&&(l=function(e){console.log({operation:"invoke",editor:r.name,evtName:n,handlerId:d,data:e.data,listenerData:e.listenerData}),o(e)}),t&&console.log(
{operation:"register",editor:r.name,evtName:n,handlerId:d}),r.on(n,l,null,a,i),function(){t&&console.log({operation:"unregister",editor:r.name,evtName:n,handlerId:d}),r.removeListener(n,l)}}var C=o.useEffect,k=o.useReducer,w=o.useRef,x="https://cdn.ckeditor.com/4.17.2/standard-all/ckeditor.js",j={};function D(e){var t=e.config,r=e.debug,n=e.dispatchEvent,o=e.subscribeTo,a=void 0===o?p:o,i=e.editorUrl,l=e.element,c=e.initContent,u=e.type,s=void 0===u?"classic":u,v=w(i||x),h=w(null!=a?a:p),g=w(r),m=w(n),O=w(c),S=w(t||j),D=w(s),P=k(L,{editor:void 0,hookStatus:"init"}),M=P[0],_=M.editor,R=M.hookStatus,U=P[1];return C((function(){if(l&&!_){U({type:"loading"});d(v.current,(function(e){var t;-1!==h.current.indexOf("namespaceLoaded")&&(null===(t=m.current)||void 0===t||t.call(m,{type:b.namespaceLoaded,payload:e}))})).then((function(e){var t,r="inline"===D.current,n=S.current.readOnly;-1!==h.current.indexOf("beforeLoad")&&(null===(t=m.current)||void 0===t||t.call(m,{type:b.beforeLoad,payload:e}));var o=e[r?"inline":"
replace"](l,S.current);h.current.filter((function(e){return-1===f.indexOf(e)})).forEach((function(e){E({debug:g.current,editor:o,evtName:e,handler:function(t){var r;null===(r=m.current)||void 0===r||r.call(m,{type:"".concat(y).concat(e),payload:t})}})})),E({debug:g.current,editor:o,evtName:"loaded",handler:function(){U({type:"loaded"})},priority:-1}),E({debug:g.current,editor:o,evtName:"instanceReady",handler:function(e){var t=e.editor;U({type:"ready"}),r&&!n&&t.setReadOnly(!1),O.current&&t.setData(O.current,{noSnapshot:!0,callback:function(){t.resetUndo()}})},priority:-1}),E({debug:g.current,editor:o,evtName:"destroy",handler:function(){U({type:"destroyed"})},priority:-1}),U({type:"unloaded",payload:o})})).catch((function(e){console.error(e),U({type:"error"})}))}return function(){_&&_.destroy()}}),[_,l]),{editor:_,status:null==_?void 0:_.status,error:"error"===R,loading:"loading"===R}}function L(e,t){switch(t.type){case"init":return c(c({},e),{hookStatus:"init"});case"loading":return c(c({},e),{hookStatus:"
loading"});case"unloaded":return{editor:t.payload,hookStatus:"unloaded"};case"loaded":return c(c({},e),{hookStatus:"loaded"});case"ready":return c(c({},e),{hookStatus:"ready"});case"destroyed":return{editor:void 0,hookStatus:"destroyed"};case"error":return{editor:void 0,hookStatus:"error"};default:return e}}var P=o.useEffect,M=o.useRef,_=o.useState;function R(e){var t=e.config,r=void 0===t?{}:t,n=e.debug,a=e.editorUrl,i=e.initData,d=e.name,l=e.readOnly,c=e.style,u=e.type,s=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}(e,["config","debug","editorUrl","initData","name","readOnly","style","type"]),f=_(null),p=f[0],y=f[1],v=M(s);r&&"boolean"==typeof l&&(r.readOnly=l);var b=D({config:r,dispatchEvent:function(e){var t=e.type,r=e.payloa
d,n=g(h(t)),o=v.current[n];o&&o(r)},debug:n,editorUrl:a,element:p,initContent:"string"==typeof i?i:void 0,subscribeTo:Object.keys(s).filter((function(e){return 0===e.indexOf("on")})).map(m),type:u}),E=b.editor,C=b.status;return P((function(){var e="inline"!==u&&E&&("loaded"===C||"ready"===C);return c&&e&&E.container.setStyles(c),function(){c&&e&&Object.keys(c).map(O).forEach((function(e){E.container.removeStyle(e)}))}}),[E,C,c,u]),P((function(){E&&"ready"===C&&"boolean"==typeof l&&E.setReadOnly(l)}),[E,C,l]),o.createElement("div",{id:null!=d?d:void 0,ref:y,style:S(null!=u?u:"classic",C,c)},"string"==typeof i?null:i)}var U=c({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"])},p.reduce((function(e,t){var r;return c(c({},e),((r={})[g(t)]=l.func,r))}),{}));R.propTypes=U},64836:e=>{e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports}}]);