"use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[4091],{4091(e,t,r){r.r(t),r.d(t,{default:()=>p});var n=r(6540),o=r(952),i=(r(2327),r(1766),r(4854),r(8),r(846),r(975),r(4286),r(766),r(1234),r(7507),r(7268),r(4522)),c=r.n(i),u=r(7444),a=r(6417),l=r(8247);function f(e){return f="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},f(e)}function s(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function d(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=f(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=f(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==f(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function b(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,c,u=[],a=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;a=!1}else for(;!(a=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);a=!0);}catch(e){l=!0,o=e}finally{try{if(!a&&null!=r.return&&(c=r.return(),Object(c)!==c))return}finally{if(l)throw o}}return u}}(e,t)||function(e,t){if(e){if("string"==typeof e)return m(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?m(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function p(e){var t=(0,n.useRef)(null),r=b((0,u.L4)(a.AG.user_base_info),2),i=r[0],f=(r[1],"dark"===i.user_data.theme?"cloud_editor_dark":"cloud9_day");return(0,n.useEffect)(function(){var r,n,i=o.edit(t.current,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?s(Object(r),!0).forEach(function(t){d(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}({value:l.xK.get_value_temp(e.editor_id),showPrintMargin:!1,theme:"ace/theme/".concat(f),mode:null!==(r=e.model)&&void 0!==r?r:c().getModeForPath(null!==(n=e.name)&&void 0!==n?n:"").mode,wrap:!1,highlightActiveLine:!1,fontSize:14},e.options));return i.setOptions({}),i.container.addEventListener("wheel",function(e){e.preventDefault()}),i.focus(),i.on("change",function(t){e.on_change&&e.on_change()}),t.current=i,i.formatCode=function(){var e=o.require("ace/ext/beautify"),r=t.current;r&&e.beautify(r.session)},l.xK.set_editor_temp(i,e.editor_id),function(){l.xK.delete_editor_temp(e.editor_id),i.destroy()}},[]),n.createElement("div",{ref:t,style:{height:"100%",width:"100%"}})}o.config.set("basePath","https://gcore.jsdelivr.net/npm/ace-builds@".concat(o.version,"/src-min-noconflict/")),o.config.set("modePath","https://gcore.jsdelivr.net/npm/ace-builds@".concat(o.version,"/src-min-noconflict/")),o.config.set("themePath","https://gcore.jsdelivr.net/npm/ace-builds@".concat(o.version,"/src-min-noconflict/")),o.config.set("workerPath","https://gcore.jsdelivr.net/npm/ace-builds@".concat(o.version,"/src-min-noconflict/")),o.config.set("basePath","https://gcore.jsdelivr.net/npm/ace-builds@".concat(o.version,"/src-min-noconflict/"))}}]);