1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9561],{69561:function(e,n,t){t.r(n),t.d(n,{default:function(){return common_TinyMCECustom}});var o,i,r,a=t(85893),s=t(5379),c=t.n(s),u=t(67294),l=t(45697),__assign=function(){return(__assign=Object.assign||function(e){for(var n,t=1,o=arguments.length;t<o;t++)for(var i in n=arguments[t])Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i]);return e}).apply(this,arguments)},d={onActivate:l.func,onAddUndo:l.func,onBeforeAddUndo:l.func,onBeforeExecCommand:l.func,onBeforeGetContent:l.func,onBeforeRenderUI:l.func,onBeforeSetContent:l.func,onBeforePaste:l.func,onBlur:l.func,onChange:l.func,onClearUndos:l.func,onClick:l.func,onContextMenu:l.func,onCopy:l.func,onCut:l.func,onDblclick:l.func,onDeactivate:l.func,onDirty:l.func,onDrag:l.func,onDragDrop:l.func,onDragEnd:l.func,onDragGesture:l.func,onDragOver:l.func,onDrop:l.func,onExecCommand:l.func,onFocus:l.func,onFocusIn:l.func,onFocusOut:l.func,onGetContent:l.func,onHide:l.func,onInit:l.func,onKeyDown:l.func,onKeyPress:l.func,onKeyUp:l.func,onLoadContent:l.func,onMouseDown:l.func,onMouseEnter:l.func,onMouseLeave:l.func,onMouseMove:l.func,onMouseOut:l.func,onMouseOver:l.func,onMouseUp:l.func,onNodeChange:l.func,onObjectResizeStart:l.func,onObjectResized:l.func,onObjectSelected:l.func,onPaste:l.func,onPostProcess:l.func,onPostRender:l.func,onPreProcess:l.func,onProgressState:l.func,onRedo:l.func,onRemove:l.func,onReset:l.func,onSaveContent:l.func,onSelectionChange:l.func,onSetAttrib:l.func,onSetContent:l.func,onShow:l.func,onSubmit:l.func,onUndo:l.func,onVisualAid:l.func},p=__assign({apiKey:l.string,id:l.string,inline:l.bool,init:l.object,initialValue:l.string,onEditorChange:l.func,outputFormat:l.oneOf(["html","text"]),value:l.string,tagName:l.string,cloudChannel:l.string,plugins:l.oneOfType([l.string,l.array]),toolbar:l.oneOfType([l.string,l.array]),disabled:l.bool,textareaName:l.string,tinymceScriptSrc:l.string,rollback:l.oneOfType([l.number,l.oneOf([!1])]),scriptLoading:l.shape({async:l.bool,defer:l.bool,delay:l.number})},d),isFunction=function(e){return"function"==typeof e},isEventProp=function(e){return e in d},eventAttrToEventName=function(e){return e.substr(2)},configHandlers2=function(e,n,t,o,i,r,a){var s=Object.keys(i).filter(isEventProp),c=Object.keys(r).filter(isEventProp),u=s.filter(function(e){return void 0===r[e]}),l=c.filter(function(e){return void 0===i[e]});u.forEach(function(e){var n=eventAttrToEventName(e),o=a[n];t(n,o),delete a[n]}),l.forEach(function(t){var i=o(e,t),r=eventAttrToEventName(t);a[r]=i,n(r,i)})},f=0,uuid=function(e){var n=Date.now();return e+"_"+Math.floor(1e9*Math.random())+ ++f+String(n)},isTextareaOrInput=function(e){return null!==e&&("textarea"===e.tagName.toLowerCase()||"input"===e.tagName.toLowerCase())},normalizePluginArray=function(e){return void 0===e||""===e?[]:Array.isArray(e)?e:e.split(" ")},isInDoc=function(e){if(!("isConnected"in Node.prototype)){for(var n=e,t=e.parentNode;null!=t;)t=(n=t).parentNode;return n===e.ownerDocument}return e.isConnected},setMode=function(e,n){void 0!==e&&(null!=e.mode&&"object"==typeof e.mode&&"function"==typeof e.mode.set?e.mode.set(n):e.setMode(n))},createState=function(){return{listeners:[],scriptId:uuid("tiny-script"),scriptLoading:!1,scriptLoaded:!1}},h=(o=createState(),i=function(e,n,t,o,i,r){var a=n.createElement("script");a.referrerPolicy="origin",a.type="application/javascript",a.id=e,a.src=t,a.async=o,a.defer=i;var handler=function(){a.removeEventListener("load",handler),r()};a.addEventListener("load",handler),n.head&&n.head.appendChild(a)},{load:function(e,n,t,r,a,s){var scriptTagInjection=function(){return i(o.scriptId,e,n,t,r,function(){o.listeners.forEach(function(e){return e()}),o.scriptLoaded=!0})};o.scriptLoaded?s():(o.listeners.push(s),o.scriptLoading||(o.scriptLoading=!0,a>0?setTimeout(scriptTagInjection,a):scriptTagInjection()))},reinitialize:function(){o=createState()}}),getTinymce=function(){var e="undefined"!=typeof window?window:t.g;return e&&e.tinymce?e.tinymce:null},g=(r=function(e,n){return(r=Object.setPrototypeOf||({__proto__:[]}
1)instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(e[t]=n[t])})(e,n)},function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function __(){this.constructor=e}r(e,n),e.prototype=null===n?Object.create(n):(__.prototype=n.prototype,new __)}),Editor_assign=function(){return(Editor_assign=Object.assign||function(e){for(var n,t=1,o=arguments.length;t<o;t++)for(var i in n=arguments[t])Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i]);return e}).apply(this,arguments)},changeEvents=function(){var e,n,t;return(null===(t=null===(n=null===(e=getTinymce())||void 0===e?void 0:e.Env)||void 0===n?void 0:n.browser)||void 0===t?void 0:t.isIE())?"change keyup compositionend setcontent":"change input compositionend setcontent"},beforeInputEvent=function(){return window.InputEvent&&"function"==typeof InputEvent.prototype.getTargetRanges?"beforeinput SelectionChange":"SelectionChange"},b=function(e){function Editor(n){var t,o,i,r=this;return(r=e.call(this,n)||this).rollbackTimer=void 0,r.valueCursor=void 0,r.rollbackChange=function(){var e=r.editor,n=r.props.value;e&&n&&n!==r.currentContent&&e.undoManager.ignore(function(){if(e.setContent(n),r.valueCursor&&(!r.inline||e.hasFocus()))try{e.selection.moveToBookmark(r.valueCursor)}catch(e){}}),r.rollbackTimer=void 0},r.handleBeforeInput=function(e){if(void 0!==r.props.value&&r.props.value===r.currentContent&&r.editor&&(!r.inline||r.editor.hasFocus))try{r.valueCursor=r.editor.selection.getBookmark(3)}catch(e){}},r.handleBeforeInputSpecial=function(e){("Enter"===e.key||"Backspace"===e.key||"Delete"===e.key)&&r.handleBeforeInput(e)},r.handleEditorChange=function(e){var n=r.editor;if(n&&n.initialized){var t=n.getContent();if(void 0===r.props.value||r.props.value===t||!1===r.props.rollback||r.rollbackTimer||(r.rollbackTimer=window.setTimeout(r.rollbackChange,"number"==typeof r.props.rollback?r.props.rollback:200)),t!==r.currentContent&&(r.currentContent=t,isFunction(r.props.onEditorChange))){var o=r.props.outputFormat,i="html"===o?t:n.getContent({format:o});r.props.onEditorChange(i,n)}}},r.handleEditorChangeSpecial=function(e){("Backspace"===e.key||"Delete"===e.key)&&r.handleEditorChange(e)},r.initialise=function(e){void 0===e&&(e=0);var n,t,o,i,a,s=r.elementRef.current;if(s){if(!isInDoc(s)){if(0===e)setTimeout(function(){return r.initialise(1)},1);else if(e<100)setTimeout(function(){return r.initialise(e+1)},100);else throw Error("tinymce can only be initialised when in a document");return}var c=getTinymce();if(!c)throw Error("tinymce should have been loaded into global scope");var u=Editor_assign(Editor_assign({},r.props.init),{selector:void 0,target:s,readonly:r.props.disabled,inline:r.inline,plugins:(n=null===(o=r.props.init)||void 0===o?void 0:o.plugins,t=r.props.plugins,normalizePluginArray(n).concat(normalizePluginArray(t))),toolbar:null!==(i=r.props.toolbar)&&void 0!==i?i:null===(a=r.props.init)||void 0===a?void 0:a.toolbar,setup:function(e){r.editor=e,r.bindHandlers({}),r.inline&&!isTextareaOrInput(s)&&e.once("PostRender",function(n){e.setContent(r.getInitialValue(),{no_events:!0})}),r.props.init&&isFunction(r.props.init.setup)&&r.props.init.setup(e)},init_instance_callback:function(e){var n,t,o=r.getInitialValue();r.currentContent=null!==(n=r.currentContent)&&void 0!==n?n:e.getContent(),r.currentContent!==o&&(r.currentContent=o,e.setContent(o),e.undoManager.clear(),e.undoManager.add(),e.setDirty(!1));var i=null!==(t=r.props.disabled)&&void 0!==t&&t;setMode(r.editor,i?"readonly":"design"),r.props.init&&isFunction(r.props.init.init_instance_callback)&&r.props.init.init_instance_callback(e)}});r.inline||(s.style.visibility=""),isTextareaOrInput(s)&&(s.value=r.getInitialValue()),c.init(u)}},r.id=r.props.id||uuid("tiny-react"),r.elementRef=u.createRef(),r.inline=null!==(i=null!==(t=r.props.inline)&&void 0!==t?t:null===(o=r.props.init)||void 0===o?void 0:o.inline)&&void 0!==i&&i,r.boundHandlers={},r}return g(Editor,e),Editor.prototype.componentDidUpdate=function(e){var n,t,o=this;if(this.rollbackTimer&&(clearTimeout(this.rollbackTimer),this.rollbackTimer=void 0),this.editor&&(this.bindHandlers(e),this.editor.initialized)){if(this.currentContent=null!==(n=this.currentContent)&&void 0!==n?n:this.editor.getContent(),"string"==typeof this.props.initialValue&&this.props.initialValue!==e.initialValue)this.editor.setContent(this.props.initialValue),this.editor.undoManager.clear(),this.editor.undoManager.add(),this.editor.setDirty(!1);else if("string"==typeof this.props.value&&this.props.value!==this.currentContent){var i=this.editor;i.undoManager.transact(function(){if(!o.inline||i.hasFocus())try{e=i.selection.getBookmark(3)}catch(e){}var e,n=o.valueCursor;if(i.setContent(o.props.value),!o.inline||i.hasFocus())for(var t=0,r=[e,n];t<r.length;t++){var a=r[t];if(a)try{i.selection.moveToBookmark(a),o.valueCursor=a;break}catch(e){}}})}if(this.props.disabled!==e.disabled){var r=null!==(t=this.props.disabled)&&void 0!==t&&t;setMode(this.editor,r?"readonly":"design")}}},Editor.prototype.componentDidMount=function(){var e,n,t,o,i,r;null!==getTinymce()?this.initialise():this.elementRef.current&&this.elementRef.current.ownerDocument&&h.load(this.elementRef.current.ownerDocument,this.get
1ScriptSrc(),null!==(n=null===(e=this.props.scriptLoading)||void 0===e?void 0:e.async)&&void 0!==n&&n,null!==(o=null===(t=this.props.scriptLoading)||void 0===t?void 0:t.defer)&&void 0!==o&&o,null!==(r=null===(i=this.props.scriptLoading)||void 0===i?void 0:i.delay)&&void 0!==r?r:0,this.initialise)},Editor.prototype.componentWillUnmount=function(){var e=this,n=this.editor;n&&(n.off(changeEvents(),this.handleEditorChange),n.off(beforeInputEvent(),this.handleBeforeInput),n.off("keypress",this.handleEditorChangeSpecial),n.off("keydown",this.handleBeforeInputSpecial),n.off("NewBlock",this.handleEditorChange),Object.keys(this.boundHandlers).forEach(function(t){n.off(t,e.boundHandlers[t])}),this.boundHandlers={},n.remove(),this.editor=void 0)},Editor.prototype.render=function(){return this.inline?this.renderInline():this.renderIframe()},Editor.prototype.renderInline=function(){var e=this.props.tagName,n=void 0===e?"div":e;return u.createElement(n,{ref:this.elementRef,id:this.id})},Editor.prototype.renderIframe=function(){return u.createElement("textarea",{ref:this.elementRef,style:{visibility:"hidden"},name:this.props.textareaName,id:this.id})},Editor.prototype.getScriptSrc=function(){if("string"==typeof this.props.tinymceScriptSrc)return this.props.tinymceScriptSrc;var e=this.props.cloudChannel,n=this.props.apiKey?this.props.apiKey:"no-api-key";return"https://cdn.tiny.cloud/1/".concat(n,"/tinymce/").concat(e,"/tinymce.min.js")},Editor.prototype.getInitialValue=function(){return"string"==typeof this.props.initialValue?this.props.initialValue:"string"==typeof this.props.value?this.props.value:""},Editor.prototype.bindHandlers=function(e){var n=this;if(void 0!==this.editor){t=this.editor,o=this.props,i=this.boundHandlers,configHandlers2(function(e){return n.props[e]},t.on.bind(t),t.off.bind(t),function(e,n){return function(o){var i;return null===(i=e(n))||void 0===i?void 0:i(o,t)}},e,o,i);var t,o,i,isValueControlled=function(e){return void 0!==e.onEditorChange||void 0!==e.value},r=isValueControlled(e),a=isValueControlled(this.props);!r&&a?(this.editor.on(changeEvents(),this.handleEditorChange),this.editor.on(beforeInputEvent(),this.handleBeforeInput),this.editor.on("keydown",this.handleBeforeInputSpecial),this.editor.on("keyup",this.handleEditorChangeSpecial),this.editor.on("NewBlock",this.handleEditorChange)):r&&!a&&(this.editor.off(changeEvents(),this.handleEditorChange),this.editor.off(beforeInputEvent(),this.handleBeforeInput),this.editor.off("keydown",this.handleBeforeInputSpecial),this.editor.off("keyup",this.handleEditorChangeSpecial),this.editor.off("NewBlock",this.handleEditorChange))}},Editor.propTypes=p,Editor.defaultProps={cloudChannel:"5"},Editor}(u.Component),v=t(53573),m=t(89163),y=t(3126);let x={language_url:"/tinymce/langs/ja.js",skin:"oxide",icons:"thin",menubar:!1,content_css:"default",plugins:["lists link image table paste emoticons"],toolbar:["bold italic strikethrough | forecolor | link | alignleft aligncenter alignright | fontsizeselect lineheight | removeformat | emoticons | bullist numlist | moregroup"],fontsize_formats:"10px 12px 14px 16px 18px 20px 22px 24px 26px 28px 30px 32px 34px 36px 38px 40px",paste_as_text:!0,toolbar_groups:{moregroup:{icon:"more-drawer",tooltip:"More tools",items:"backcolor | indent outdent | formatselect"}}};var common_TinyMCECustom=e=>{let{html:n,editorBackground:t,tinymceChanged:o,backgroundChanged:i,propertyName:r,label:s=!1}=e,{t:u,i18n:l}=(0,v.$)(),d={language:l.language,...x},onBgChange=(e,n)=>{e.preventDefault(),i(n)};return(0,a.jsxs)(m.Z,{className:"editorbg-".concat(t),children:[s&&(0,a.jsx)(y.Z,{children:u("Label")}),(0,a.jsx)(b,{init:d,value:null!=n?n:"",tinymceScriptSrc:"/tinymce/tinymce.min.js",onEditorChange:e=>o(e)},"tinymce"+l.language),(0,a.jsxs)("div",{className:"jsx-8ba4a2addeb4141b editor-bg-switcher",children:[(0,a.jsxs)("div",{className:"jsx-8ba4a2addeb4141b",children:[u("Editor background"),":"]}),(0,a.jsxs)("div",{className:"jsx-8ba4a2addeb4141b",children:[(0,a.jsx)("button",{onClick:e=>onBgChange(e,"light"),className:"jsx-8ba4a2addeb4141b "+"editorbg-button ".concat("light"===t?"active":""),children:u("Light")}),(0,a.jsx)("button",{onClick:e=>onBgChange(e,"dark"),className:"jsx-8ba4a2addeb4141b "+"editorbg-button ".concat("dark"===t?"active":""),children:u("Dark")})]})]}),(0,a.jsx)(c(),{id:"8ba4a2addeb4141b",children:".editorbg-dark .tox .tox-edit-area__iframe{background:#444!important}.editor-bg-switcher.jsx-8ba4a2addeb4141b{background:#eff2f7;border:1px solid#dfe3e8;padding:3px 0;font-size:10px;border-top:0;-webkit-border-radius:0 0 5px 5px;-moz-border-radius:0 0 5px 5px;border-radius:0 0 5px 5px;margin:0 15px;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-moz-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;
1-webkit-justify-content:center;-moz-box-pack:center;-ms-flex-pack:center;justify-content:center}.editorbg-button.jsx-8ba4a2addeb4141b{border:1px solid#ccc;padding:2px 5px;margin:0;cursor:pointer;line-height:12px}.editorbg-button.active.jsx-8ba4a2addeb4141b{background:#fff}.editorbg-button.jsx-8ba4a2addeb4141b:first-child{-webkit-border-radius:5px 0 0 5px;-moz-border-radius:5px 0 0 5px;border-radius:5px 0 0 5px;border-right:0;margin-left:5px}.editorbg-button.jsx-8ba4a2addeb4141b:last-child{-webkit-border-radius:0 5px 5px 0;-moz-border-radius:0 5px 5px 0;border-radius:0 5px 5px 0}"})]})}}}]); 2//# sourceMappingURL=9561.77bc44980429d9b7.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.