tiro-notes 0.41.19 → 0.41.21

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.
@@ -1 +1 @@
1
- (this["webpackJsonptiro-notes-client"]=this["webpackJsonptiro-notes-client"]||[]).push([[10],{101:function(t,n,e){"use strict";e.d(n,"b",(function(){return j})),e.d(n,"a",(function(){return k})),e.d(n,"c",(function(){return y}));var o=e(5),i=e(0),c=e(70),a=e(19),r=e(56),l=e(67),s=e(11),u=e(60),p=e(55),d=e(51),f=e(9),b=e(65),g=e(18),h=e(35),m=e(31),v=e(13),w=e(24),O=e(1),j=function(t){var n=localStorage.getItem("settings-".concat(t))||"";return Object(b.a)(n,[['"',""]])},x=function(t){return"<br/> <br/> Default value: ".concat(h.a[t].toString().replaceAll("\n","<br/>"))},k=function(t){var n="<br/> Requires interface reload",e=Object(c.a)("settings-backend-port",-1),f=Object(o.a)(e,2),b=f[0],v=f[1],w=Object(c.a)("settings-backend-protocol","same"),j=Object(o.a)(w,2),k=(j[0],j[1],Object(i.useContext)(s.a)),y=a.a.settingsPopup,_=[];if(k){var C=k.userSettings,E="".concat(window.location.protocol,"//"),S="".concat(E).concat(k.status.ipsServer.getLocal()).concat(d.a.global.port);"https://api.qrserver.com/v1/create-qr-code/?size=400x400&margin=50&data=".concat(S);_=[{title:"layout",fields:[{type:"text",title:"Main color",expl:"A color string like 'orange' or 'blue' or an Hex string like '#E86666' (tiro red) or '#729fc4'",var:C.get("ui_layout_colors_main"),modifier:function(t){C.set("ui_layout_colors_main",t)}},{type:"text",title:"Font color for main color",expl:"Font color for items with main color as background",var:C.get("ui_layout_colors_main_font"),modifier:function(t){C.set("ui_layout_colors_main_font",t)}},{type:"number",title:"Font size (desktop)",expl:"General font size for desktop"+x("ui_layout_general_font_size")+n,var:C.get("ui_layout_general_font_size"),max:20,min:5,modifier:function(t){C.set("ui_layout_general_font_size",t),L(!0)}},{type:"text",title:"Font family for interface",expl:"Font family for interface"+x("ui_layout_font_family_interface")+n,var:C.get("ui_layout_font_family_interface"),modifier:function(t){C.set("ui_layout_font_family_interface",t),L(!0)}},{type:"text",title:"Font family for editor",expl:"Font family for editor"+x("ui_layout_font_family_editor")+n,var:C.get("ui_layout_font_family_editor"),modifier:function(t){C.set("ui_layout_font_family_editor",t),L(!0)}},{type:"checkbox",title:"Enable Background Image",expl:"Enable Background Image"+n,var:C.get("ui_layout_background_image_enable"),modifier:function(t){C.set("ui_layout_background_image_enable",t),L(!0)}},{type:"checkbox",title:"Enable Background Video",expl:"Enable Background Video"+n,var:C.get("ui_layout_background_video_enable"),modifier:function(t){C.set("ui_layout_background_video_enable",t),L(!0)}},{type:"text",title:"Background image/video url",expl:"Background image/video url.<br>- it can start with http. <br> - You can also upload a picture in Tiro, then copy the uploaded image link here, in that case only keep the part without the hostname <br>(ex: 'static/_new/useful/.resources/wintersolstice.jpg'). <br> - you can add a youtube video/webcam stream in background by using the embed url like 'https://www.youtube-nocookie.com/embed/dQw4w9WgXcQ' or 'https://www.skaping.com/batz-sur-mer/plage-valentin' or even websites",var:C.get("ui_layout_background_image"),modifier:function(t){C.set("ui_layout_background_image",t),L(!0)}},{type:"number",title:"Windows opacity",expl:"If Background image, how opaque should the windows be (between 0 and 100)"+x("ui_layout_background_image_window_opacity")+n,var:C.get("ui_layout_background_image_window_opacity"),max:100,min:0,modifier:function(t){C.set("ui_layout_background_image_window_opacity",t),L(!0)}},{type:"number",title:"Active Windows opacity",expl:"If Background image, how opaque should the active windows be (between 0 and 100)"+x("ui_layout_background_image_window_opacity_active")+n,var:C.get("ui_layout_background_image_window_opacity_active"),max:100,min:0,modifier:function(t){C.set("ui_layout_background_image_window_opacity_active",t),L(!0)}},{type:"number",title:"background video width",expl:"background video width in percent (between 0 and 200)"+x("ui_layout_background_video_width")+n,var:C.get("ui_layout_background_video_width"),max:200,min:0,modifier:function(t){C.set("ui_layout_background_video_width",t),L(!0)}},{type:"number",title:"background video height",expl:"background video height percent (between 0 and 200)"+x("ui_layout_background_video_height")+n,var:C.get("ui_layout_background_video_height"),max:200,min:0,modifier:function(t){C.set("ui_layout_background_video_height",t),L(!0)}},{type:"checkbox",title:"Sidebar Shortcut Panel",expl:"Adds a shortcuts/scratchpad space in the sidebar. To edit it, create a note in '.tiro/shortcuts.md'",var:C.get("ui_layout_shortcuts_panel"),modifier:function(t){C.set("ui_layout_shortcuts_panel",t)}}]},{title:"editor",fields:[{type:"checkbox",title:"AI Suggest",expl:"Send the selected text as a question to an AI",var:C.get("ui_editor_ai_text_selection"),modifier:function(t){C.set("ui_editor_ai_text_selection",t)}},{type:"textarea",title:"AI Suggest command line",expl:"Which AI API command to be called, {{input}} will be replaced by the selection. <br/><br/> For ChatGPT, you need an <a href='https://platform.openai.com/account/api-keys' target='_blank'>api key</a> and enter the following command : "+"<br/><code>".concat(h.a.ui_editor_ai_command,"</code>"),var:C.get("ui_editor_ai_command"),modifier:function(t){C.set("ui_editor_ai_command",t)}},{type:"checkbox",title:"Markdown Tags",expl:"Displays #tag as clickable tag you can interact with "+n,var:C.get("ui_editor_markdown_tags"),modifier:function(t){L(!0),C.set("ui_editor_markdown_tags",t)}},{type:"checkbox",title:"Markdown Preview",expl:"Markdown preview "+n,var:C.get("ui_editor_markdown_preview"),modifier:function(t){L(!0),C.set("ui_editor_markdown_preview",t)}},{type:"checkbox",title:"Enhanced Markdown",expl:"Enhanced Markdown Preview for files, documents, date etc"+n,var:C.get("ui_editor_markdown_enhanced_preview"),modifier:function(t){L(!0),C.set("ui_editor_markdown_enhanced_preview",t)}},{type:"checkbox",title:"Links button",expl:"Replace http links into buttons in the editor by adding a '/' at the end of it."+n,var:C.get("ui_editor_links_as_button"),modifier:function(t){L(!0),C.set("ui_editor_links_as_button",t)}},{type:"checkbox",title:"Latex preview",expl:"Add Latex preview. Add '--latex' in the note to activate it then use $_latex_expression_$"+n,var:C.get("ui_editor_markdown_latex_preview"),modifier:function(t){L(!0),C.set("ui_editor_markdown_latex_preview",t)}},{type:"checkbox",title:"Improved Markdown Table",expl:"Improves the display of markdown table. Add '--table' in the note to activate it."+n,var:C.get("ui_editor_markdown_table_preview"),modifier:function(t){L(!0),C.set("ui_editor_markdown_table_preview",t)}},{type:"checkbox",title:"Spellcheck",expl:"Enable/disable native browser spellcheck for all notes. <br> You can also activate it per note by adding '--spellcheck' inside the note content <br>"+n,var:C.get("ui_editor_spellcheck"),modifier:function(t){L(!0),C.set("ui_editor_spellcheck",t)}},{type:"checkbox",title:"Image title",expl:"Show image title on interface and exports"+n,var:C.get("ui_editor_show_image_title"),modifier:function(t){L(!0),C.set("ui_editor_show_image_title",t)}},{type:"checkbox",title:"Live Edition",expl:"If other clients edit the same note, update everybody on live. <br> That functionality is required for AI assistant and the inline calculator"+n,var:C.get("ui_editor_live_watch"),modifier:function(t){L(!0),C.set("ui_editor_live_watch",t)}}]},{title:"exports",fields:[{type:"textarea",title:"Options for Pandoc exporter",expl:"Modify how pandoc exports files. All options can be found at <a href='https://pandoc.org/MANUAL.html' target=\"_blank\">pandoc options manual</a>. One file extension options per line.<br/><br/>format: <br/> file extention | options ".concat(x("export_pandoc_cli_options")),var:C.get("export_pandoc_cli_options"),modifier:function(t){C.set("export_pandoc_cli_options",t)}},{type:"none",var:"",customHtml:" ",title:"Export Install",readOnly:!0,expl:'In order to export in many formats, Tiro notes needs to install Pandoc on your computer. (At least v2.9) <br/>\n\t\t\t\t\t\t<a href="https://pandoc.org/installing.html" target="_blank">Guide here </a>\n\t\t\t\t\t\t<br/><br/>\n\t\t\t\t\t\tFor PDF, make sure pdflatex is installed \n\t\t\t\t\t\t<br/> (if you are on termux: <code>pkg install texlive-installer texlive-tlmgr; termux-install-tl</code>)',modifier:function(){},onCustomHtmlClick:function(){}}]},{title:"plugins",fields:[{type:"text",title:"Plugins Marketplace URL",expl:"Custom Plugins Marketplace URL, should redirect to a marketplace.json file <br> Goes to the official 'https://raw.githubusercontent.com/dotgreg/tiro-notes/master/docs/marketplace.json' by default/if empty.",var:C.get("plugins_marketplace_url"),modifier:function(t){C.set("plugins_marketplace_url",t)}},{type:"none",var:"",customHtml:"<button> Clean Plugins Cache </button>",title:"Clean Plugins Cache",readOnly:!0,expl:"Clean Plugins Cache",modifier:function(){},onCustomHtmlClick:function(){Object(m.b)("cache","clean_cache")}}]},{title:"Users and Rights",fields:[{type:"checkbox",title:"Enable read-only viewer",expl:'Create a "viewer" user that can read but not edit the content',var:C.get("users_viewer_user_enable"),modifier:function(t){C.set("users_viewer_user_enable",t,{writeInSetupJson:!0})}},{type:"text",title:"Viewer user password",expl:'Define the "viewer" user password',var:C.get("users_viewer_user_password"),modifier:function(t){C.set("users_viewer_user_password",t,{writeInSetupJson:!0})}},{type:"checkbox",title:"Demo Mode",expl:"Autofill the 'viewer' user and password on login popup for easier access during a demo mode",var:C.get("demo_mode_enable"),modifier:function(t){C.set("demo_mode_enable",t,{writeInSetupJson:!0})}},{type:"none",var:"",customHtml:"<button> Logout </button>",title:"Logout current User",readOnly:!0,expl:"Logout Current User",modifier:function(){},onCustomHtmlClick:function(){Object(g.a)(),t.onClose(),Object(s.d)((function(t){t.folders.get(["/"],(function(){}))}))}}]},{title:"Advanced",fields:[{type:"text",var:b,title:y.backend.port,expl:y.backend.portExpl,modifier:v},{type:"checkbox",title:"Activity Logging",expl:"Enable the activity logging for events like read/write files, you can then consult it using api.activity.getReport(). \n Requires an app restart to take effect.",var:C.get("server_activity_logging_enable"),modifier:function(t){C.set("server_activity_logging_enable",t)}},{type:"checkbox",title:"Disable notification popups",expl:"Force notification popups to not appear on the interface"+n,var:C.get("view_disable_notification_popups"),modifier:function(t){L(!0),C.set("view_disable_notification_popups",t)}},{type:"textarea",title:"Options for Image compression",expl:"Modify default image compression settings ".concat(x("advanced_image_compression_settings")),var:C.get("advanced_image_compression_settings"),modifier:function(t){C.set("advanced_image_compression_settings",t)}}]},{title:"Beta",fields:[{type:"checkbox",title:"Floating Windows",expl:"Enable the floating window system"+n,var:C.get("beta_floating_windows"),modifier:function(t){L(!0),C.set("beta_floating_windows",t)}},{type:"checkbox",title:"Plugins Marketplace",expl:"Enable the plugin marketplace system",var:C.get("beta_plugins_marketplace"),modifier:function(t){C.set("beta_plugins_marketplace",t)}}]}]}var T=Object(u.a)("config-panels-opened",[]),I=Object(o.a)(T,3),N=I[0],P=I[1],R=(I[2],Object(i.useState)(!1)),A=Object(o.a)(R,2),F=A[0],L=A[1];return Object(O.c)("div",{className:"settings-popup-wrapper"},Object(O.c)(r.a,{title:"".concat(y.title),onClose:function(){t.onClose()}},_.map((function(t,n){return Object(O.c)("div",{className:"settings-panel"},Object(O.c)("h3",{onClick:function(){!function(t){var n=Object(p.a)(N);n[t]=!n[t],P(n)}(n)}},Object(O.c)("div",{className:"arrow"},N[n]?"\u25bc":"\u25ba"),t.title),Object(O.c)("div",{className:"fields-wrapper ".concat(N[n]?"active":"")},t.fields.map((function(t){return Object(O.c)("div",{className:"field-wrapper"},Object(O.c)("div",{className:"input-and-html-wrapper"},"none"===t.type&&Object(O.c)("span",null,t.title),"none"!==t.type&&Object(O.c)(l.a,{value:t.var,shouldNotSelectOnClick:!0,label:t.title,type:t.type,max:t.max,min:t.min,readonly:t.readOnly,onChange:function(n){"checkbox"!==t.type&&t.modifier(n)},onCheckedChange:function(n){"checkbox"===t.type&&t.modifier(n)}}),t.customHtml&&Object(O.c)("div",{className:"custom-html-wrapper",onClick:function(n){t.onCustomHtmlClick&&t.onCustomHtmlClick()},dangerouslySetInnerHTML:{__html:t.customHtml}})),Object(O.c)("div",{className:"explanation",dangerouslySetInnerHTML:{__html:t.expl||"woop"}}))}))))})),F&&Object(O.c)("button",{className:"submit-button reload-btn",onClick:function(t){window.location.reload()}},"Reload App")))},y=function(){return"\n//\n// mobile version\n//\n\n.device-view-mobile {\n\t.settings-popup-wrapper .popup-wrapper .popupContent {\n\t\t\t\twidth: 80vw;\n\t\t\t\t.field-wrapper {\n\t\t\t\t\t\tdisplay: block;\n\t\t\t\t\t\t.explanation {\n\t\t\t\t\t\t\t\twidth: 100%;\n\t\t\t\t\t\t\t\tpadding: 5px 0px;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tinput {\n\t\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t}\n}\n\n.settings-popup-wrapper .popup-wrapper {\n\theight: 70%;\n}\n.settings-popup-wrapper .popup-wrapper .popupContent {\n padding: 0px 20px;\n\t\twidth: 70vw;\n\t\t// min-height: 50vh;\n\t\t// max-height: 70vh;\n\t\toverflow-y: scroll;\n\n}\n\n.reload-btn {\n\tposition: absolute;\n\tbottom: 10px;\n\tright: 10px;\n}\n\n\n.settings-panel {\n\t\t\n\t\t.input-and-html-wrapper {\n\t\t\twidth: 50%;\n\t\t\t.input-component-wrapper {\n\t\t\t\t.input-component {\n\t\t\t\t\t".concat("desktop"===Object(v.a)()?"":"display:block!important;","\n\t\t\t\t\t.input-wrapper {\n\t\t\t\t\t\ttextarea, input {\n\t\t\t\t\t\t\t").concat("desktop"===Object(v.a)()?" ":"width: calc(100% - 30px); margin: 5px 0px; ",'\n\t\t\t\t\t\t}\n\t\t\t\t\t\tinput[type=checkbox] {\n\t\t\t\t\t\t\twidth: 20px;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tinput[type="text"] {\n\t\t\t\t\t\t\t').concat("desktop"===Object(v.a)()?" ":"width: calc(100% - 40px);","\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\th3 {\n\t\t\t\tcursor: pointer;\n\t\t\t\ttext-transform: uppercase;\n\t\t\t\t.arrow {\n\t\t\t\t\t\tdisplay: inline-block;\n\t\t\t\t\t\tfont-size: 7px;\n\t\t\t\t\t\tposition: relative;\n\t\t\t\t\t\tbottom: 2px;\n\t\t\t\t\t\tmargin-right: 10px;\n\t\t\t\t}\n\t\t}\n\t\t.fields-wrapper {\n\t\t\t\tdisplay: none;\n\t\t\t\t&.active {\n\t\t\t\t\t\tdisplay: block;\n\t\t\t\t\t\tdisplay: block;\n\t\t\t\t\t\tpadding: 12px 12px 0px 12px;\n\t\t\t\t\t\tbackground: ").concat(f.a.colors.bgPopup2,";\n\t\t\t\t\t\tborder-radius: 5px;\n\t\t\t\t\t\tborder: 1px ").concat(f.a.colors.bgPopup3," solid;\n\t\t\t\t\t\tmargin-top: 10px;\n\t\t\t\t}\n\t\t\t\t.field-wrapper {\n\t\t\t\t\t\ttextarea {\n\t\t\t\t\t\t\twidth: 100%;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tdisplay: flex;\n\t\t\t\t\t\tpadding-bottom: 11px;\n\t\t\t\t\t\talign-items: center;\n\t\t\t\t\t\t// 3 EXPLANATION\n\t\t\t\t\t\t.explanation {\n\t\t\t\t\t\t\t// width: 50%;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t.input-and-html-wrapper {\n\t\t\t\t\t\t\tdisplay: flex;\n\t\t\t\t\t\t\t.input-component {\n\t\t\t\t\t\t\t\t// 1 TITLE\n\t\t\t\t\t\t\t\tspan {\n\t\t\t\t\t\t\t\t\twidth: 100px;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t// 2 INPUT\n\t\t\t\t\t\t\t\t.input-wrapper {\n\t\t\t\t\t\t\t\t\twidth: 300px;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tdisplay: flex;\n\t\t\t\t\t\t\t\tjustify-content: space-evenly;\n\t\t\t\t\t\t\t\tpadding: 0px;\n\t\t\t\t\t\t\t\tinput {\n\t\t\t\t\t\t\t\t\tfont-size: ").concat(Object(w.a)(),"px;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t.custom-html-wrapper {\n\t\t\t\t\t\t\t\t\tmargin-left: 20px;\n\t\t\t\t\t\t\t\t\t.qrcode-wrapper {\n\t\t\t\t\t\t\t\t\t\t\timg {\n\t\t\t\t\t\t\t\t\t\t\t\t\tmargin: 5px 25px 0px 0px;\n\t\t\t\t\t\t\t\t\t\t\t\t\tcursor: pointer;\n\t\t\t\t\t\t\t\t\t\t\t\t\twidth: 50px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t&:hover {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//\twidth: 150px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t}\n\t\t}\n\n}\n\n\n\n\n.buttons {\n display: flex;\n padding: 20px 0px 0px 0px;\n button {\n width: 30%;\n padding: 10px;\n }\n}\n")}},11:function(t,n,e){"use strict";e.d(n,"e",(function(){return lt})),e.d(n,"d",(function(){return st})),e.d(n,"a",(function(){return ut})),e.d(n,"f",(function(){return pt})),e.d(n,"c",(function(){return dt})),e.d(n,"b",(function(){return ft}));var o=e(15),i=e(25),c=e(122),a=e(55),r=e(200),l=e(0),s=e.n(l),u=e(38),p=e(35),d=e(132),f=e(29),b=e(30),g=e(131),h=e(14),m=e(18),v=function(t){Object(l.useEffect)((function(){h.b.on("moveFolderAnswer",(function(n){t.eventBus.notify(n.idReq,n.idReq)}))}),[]);return{file:function(n,e,cb){var o=dt("move-file-get-files");t.eventBus.subscribe(o,cb||function(){}),console.log("[MOVEFILE] ".concat(n," -> ").concat(e)),h.b.emit("moveFile",{initPath:n,endPath:e,idReq:o,token:Object(m.b)()})},folder:function(n,e,cb){var o=dt("move-folder-get-files");t.eventBus.subscribe(o,cb||function(){}),console.log("[MOVEFOLDER] ".concat(n," -> ").concat(e)),h.b.emit("moveFolder",{initPath:n,endPath:e,idReq:o,token:Object(m.b)()})}}},w=e(32),O=e(121),j=e(377),x=function(t){var n="[FILE API] 005363 ";Object(l.useEffect)((function(){h.b.on("onServerTaskFinished",(function(n){t.eventBus.notify(n.idReq,{data:n})})),h.b.on("getFileContent",(function(n){n.error?t.eventBus.notify(n.idReq,{error:n.error}):t.eventBus.notify(n.idReq,{content:n.fileContent})}))}),[]);var e=Object(l.useRef)(""),o=function(n,o,i,cb){var c=!(!i||!i.history)&&i.history,a=(!i||!i.withMetas||i.withMetas,dt("save-file-content"));cb&&t.eventBus.subscribe(a,(function(t){cb&&cb(t)}));var r=k(n);h.b.emit("saveFileContent",{filePath:r,newFileContent:o,token:Object(m.b)(),idReq:a,withCb:!!cb}),c&&(n!==e.current&&lt().then((function(t){var e=t.ui.browser.folders.current.get();if(e===Object(f.c)(n)){var o,i="",c=t.ui.windows.active.get();if(c)i=(null===(o=c.content.file)||void 0===o?void 0:o.name)||"";t.ui.browser.goTo(e,i)}})),t.historyApi.intervalSave(n,o),e.current=n)},i=(Object(w.a)((function(t,n,e,cb){o(t,n,e,cb)}),500),Object(l.useRef)({})),c=Object(l.useRef)({});return{getContent:function(n,cb,e){var o=Object(g.a)("getFileContent "+n),i=k(n),c=dt("get-file-content");t.eventBus.subscribe(c,(function(t){t.error&&e&&e.onError?e.onError(t.error):!t.error||e&&e.onError?t.error||cb(t.content):cb(t.error),o()})),h.b.emit("askForFileContent",{filePath:i,token:Object(m.b)(),idReq:c})},saveContent:function(t,n,e,cb){var a=!(!e||!e.debounced)&&e.debounced,r=!(!e||!e.withThrottle)&&e.withThrottle;a?function(t,n,e,a,r,cb){var l=function(t,n){return"".concat(t,"-").concat(n)}(e,t);i.current[l]||(i.current[l]=Object(O.a)((function(t,n,e,cb){o(t,n,e,cb)}),t),!0===n&&(c.current[l]=Object(j.a)((function(n,e,i,cb){console.log("throttledFuncs",t,n),o(n,e,i,cb)}),t))),i.current[l](e,a,r,cb),!0===n&&c.current[l](e,a,r,cb)}(a,r,t,n,e,cb):o(t,n,e,cb)},delete:function(e,cb){var o=dt("delete-file");console.log("".concat(n," delete file ").concat(e.path)),t.eventBus.subscribe(o,cb),h.b.emit("onFileDelete",{filepath:e.path,idReq:o,token:Object(m.b)()})},move:v({eventBus:t.eventBus}).file,create:function(e,cb){var o=dt("create-file");console.log("".concat(n," create file in ").concat(e)),t.eventBus.subscribe(o,cb),h.b.emit("createNote",{folderPath:e,idReq:o,token:Object(m.b)()})}}},k=function(t){return t.replace(b.a.linklink,"$2/$1")},y=e(17),_=e(10),C=e(5),E=e(34),S=e(52),T=e(280),I=function(){var t=Object(S.a)(Object(E.a)().mark((function t(n){return Object(E.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t,e){var o={},c=[];lt().then((function(e){e.search.word("#",n,(function(n){var e=[],r={};console.log(n),Object(i.a)(n,(function(t,n){var c={file:t.file,titleName:""};Object(i.a)(t.results,(function(t,n){var l=[],s=t.match(b.a.titleMd);if(s&&s[0]){var u=s[0].split("#").join("").trim();c.titleName=u}var p=t.match(b.a.hashtag3);Object(i.a)(p,(function(t){t=t.substring(1),o[t]||(o[t]={id:Object.keys(o).length+1,name:t,lines:[],noteParts:[]}),o[t].noteParts.push(Object(a.a)(c)),o[t].lines.push(n),o[t].lines=Object(T.a)(o[t].lines);var e=c.file.name+"-"+c.titleName;r[e]||(r[e]=[]),r[e].push(o[t].id),l.push(o[t])})),Object(i.a)(l,(function(t,n){Object(i.a)(l,(function(o,i){if(n!==i){var c=t.id,a=o.id,r="".concat(c,"-").concat(a),l="".concat(a,"-").concat(c);-1===e.indexOf(r)&&-1===e.indexOf(l)&&e.push(r)}}))}))}))})),Object(i.a)(o,(function(t){c.push(t)})),t({nodesObj:o,nodesArr:c,edges:e})}))}))})));case 1:case"end":return t.stop()}}),t)})));return function(n){return t.apply(this,arguments)}}(),N=function(t){var n="[SEARCH API] 00563 ",e=Object(l.useState)(""),o=Object(C.a)(e,2),i=o[0],c=o[1];Object(l.useEffect)((function(){h.b.on("getWordSearch",(function(n){t.eventBus.notify(n.idReq,n.result)}))}),[]);var a=function(e,cb){!function(e,cb,o){var i=dt("search-".concat(o,"-"));console.log("".concat(n," searching ").concat(e," with type ").concat(o)),t.statusApi.searching.set(!0),t.eventBus.subscribe(i,(function(n){t.statusApi.searching.set(!1),cb(n)})),h.b.emit("searchFor",{term:e,token:Object(m.b)(),type:o,idReq:i})}(e,cb,"text")};return{files:{search:a},word:function(e,o,cb){var i=dt("search-word-");e=e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),console.log("".concat(n," searching WORD ").concat(e)),t.eventBus.subscribe(i,(function(t){cb(t)})),h.b.emit("searchWord",{word:e,folder:o,token:Object(m.b)(),idReq:i})},hashtags:function(t,cb){I(t).then((function(t){cb(t)}))},ui:{search:function(t){lt().then((function(n){n.ui.browser.files.set([]),c(t),a(t,(function(t){n.ui.browser.files.set(t)}))}))},term:{set:c,get:i}}}},P=e(130),R=e(31),A=e(13),F=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm,L=/([^\s,]+)/g,M=e(92),D=e(369),z=e(65),B="/".concat(y.a.path.configFolder,"/").concat(y.a.path.cacheFolder,"/cache-api"),H="[CACHE API]",U=y.a.client.log.verbose,W=y.a.client.log.verbose,q=function(){return(new Date).getTime()},V=function(t){var n=t-q()<0;return U&&console.log(H,"isExpired? : ",n,(t-q())/6e4,"mins"),n},J=function(t){var n=function(t){return"".concat(B,"/cache-api-storage-").concat(Object(z.b)(t),".md")},e=Object(l.useRef)({}),o=function(t,n,o){var i;e.current[t]={content:n,until:(i=o,q()+60*i*1e3)}},i=9e5,c="__CHUNKED__CACHED__OBJ__SIZE:",a="[CACHE CHUNK]",r=function(t,e,o){var r=JSON.stringify(e),l=function(t,e,cb){W&&console.log(a,n(t),{str:e}),st((function(o){o.file.saveContent(n(t),"".concat(e),{},(function(t){cb(t)}))}))};if(!(r.length>i))return l(t,r,(function(){o&&o()}));var s=(u=i,r.match(new RegExp(".{1,"+u+"}","g")));W&&console.log(a,"SAVE >> TOO LARGE, split in ".concat(s.length," parts"),{cacheId:t,contentArr:s});var u,p=0,d=function(){++p===s.length-1&&o&&o()};l(t,"".concat(c).concat(s.length),d);for(var f=function(n){setTimeout((function(){l("c".concat(n,"_").concat(t),s[n],d)}),1e3*n)},b=0;b<s.length;b++)f(b)},s=function(t,cb,e){var o=function(t,e,o){st((function(i){i.file.getContent(n(t),e,{onError:o})}))},i="___ERROR___CHUNK___LOADING___FAILURE";o(t,(function(n){try{if(n.startsWith(c)){var r=parseInt(n.replaceAll(c,""));W&&console.log(H,"GET >> remerging a ".concat(r," part"),{cacheId:t}),function(n,e,c,r){for(var l=Object(g.a)("".concat(H," getAllChunksAndMerge")),s=[],u=0,p=function(){if(u===e){var n=s.join(""),o=n.includes(i);W&&console.log("GET >> RESULT remerging",{hasFailed:o,cacheId:t,nbChunks:e,resMerge:n}),l(),o?r():c(n)}},d=function(n){o("c".concat(n,"_").concat(t),(function(o){s[n]=o,W&&console.log(a,"c".concat(n,"_").concat(t),{loadingCounter:u,nbChunks:e}),u++,p()}),(function(t){u++,s[n]=i,p()}))},f=0;f<e;f++)d(f)}(0,r,(function(t){cb(t)}),(function(t){e()}))}else cb(n)}catch(l){e(l)}}),(function(t){e(t)}))},u=function(){e.current={}};return{get:function(t,cb,n){if(!0===(null===n||void 0===n?void 0:n.disableRamCache)&&u(),t in e.current){var i=e.current[t],c=V(i.until);c&&(i.content=void 0),U&&console.log(H,"FROM RAM",t," expired:",c),cb(i.content)}else s(t,(function(n){try{var i=JSON.parse(n);e.current[t]=Object(_.a)({},i);var c=e.current[t],a=V(c.until);a&&(c.content=void 0),U&&console.log(H,"FROM FILE",t," expired:",a),cb(c.content)}catch(r){U&&console.log(H,"error getting cache",r,t),o(t,void 0,60),cb(e.current[t].content)}}),(function(n){return"NO_FILE"===n?(U&&console.log(H,"FROM FILE: NO_FILE",t),o(t,void 0,60),cb(e.current[t].content)):cb(void 0)}))},set:function(t,n,i,cb){i||(i=60),-1===i&&(i=1e32),o(t,n,i);var c=e.current[t];U&&console.log(H,"SETTING",t," with cachedTime in min",i),r(t,c,(function(t){cb&&cb(t)}))},cleanRamCache:u}},K=e(184),G=e(376),Y=e(116),$=e(243),Z=e(36),X="[PLUGINS]",Q="[NOTIFICATIONS]",tt={obj:null},nt={play:function(t){st((function(n){n.ressource.fetch(t,(function(t,n){tt.obj=new Audio(n),tt.obj.play()}),{returnsPathOnly:!0})}))},stop:function(){tt.obj&&(tt.obj.pause(),tt.obj.currentTime=0)}},et=e(60),ot=e(89),it="[FLOATING PANELS]",ct=1e3,at=function(t){var n=Object(et.a)("floatingPanelsConfig3",[],{history:!1,onInitialRefresh:function(t){u.current=t,"mobile"===Object(A.a)()&&(u.current=u.current.filter((function(t){return"mobile"!==t.device}))),p(u.current)},debouncedSave:5e3}),e=Object(C.a)(n,3),i=e[0],c=e[1],r=e[2],u=s.a.useRef([]),p=function(t){u.current=t,c(t)};Object(l.useEffect)((function(){u.current=i}),[i]);var d=function(t){var n=20;"full-center"===t.layout?(t.position={x:n,y:n},t.size={width:window.innerWidth-40,height:window.innerHeight-40}):"half-right"===t.layout?(t.position={x:window.innerWidth/2,y:n},t.size={width:window.innerWidth/2-40,height:window.innerHeight-40}):"half-left"===t.layout?(t.position={x:n,y:n},t.size={width:window.innerWidth/2-40,height:window.innerHeight-40}):"full-bottom"===t.layout||"bottom"===t.layout?(t.position={x:n,y:window.innerHeight/2},t.size={width:window.innerWidth-40,height:window.innerHeight/2-40}):"full-top"===t.layout||"top"===t.layout?(t.position={x:n,y:n},t.size={width:window.innerWidth-40,height:window.innerHeight/2-40}):"left"===t.layout?(t.position={x:n,y:n},t.size={width:window.innerWidth/2-40,height:window.innerHeight-40}):"right"===t.layout?(t.position={x:window.innerWidth/2,y:n},t.size={width:window.innerWidth/2-40,height:window.innerHeight-40}):"bottom-left"===t.layout?(t.position={x:n,y:window.innerHeight/2},t.size={width:window.innerWidth/2-40,height:window.innerHeight/2-40}):"bottom-right"===t.layout?(t.position={x:window.innerWidth/2,y:window.innerHeight/2},t.size={width:window.innerWidth/2-40,height:window.innerHeight/2-40}):"top-left"===t.layout?(t.position={x:n,y:n},t.size={width:window.innerWidth/2-40,height:window.innerHeight/2-40}):"top-right"===t.layout&&(t.position={x:window.innerWidth/2,y:n},t.size={width:window.innerWidth/2-40,height:window.innerHeight/2-40});var e=u.current.filter((function(t){return!t.status.includes("hidden")})),i="mobile"===Object(A.a)()?10:100,c=window.innerWidth/2-i;"mobile"===Object(A.a)()&&(c=window.innerWidth-2*i);var a=window.innerHeight/1.2-i,r=Object(_.a)({position:{x:i+20*e.length,y:i+20*e.length},size:{width:c,height:a},status:"visible",file:Object(ot.a)(),view:"editor",id:Math.random().toString(36).substring(7),zIndex:ct,device:Object(A.a)(),orderPosition:e.length},t);p([r].concat(Object(o.a)(u.current))),m(r.id,"first"),g(r.id)},b=function(t){var n=u.current.map((function(n){return n.id===t.id?t:n}));p(n)},g=function(t){var n=Math.max.apply(Math,Object(o.a)(u.current.map((function(t){return t.zIndex||0})))),e=u.current.findIndex((function(n){return n.id===t}));if(-1!==e&&(Object(a.a)(u.current)[e].zIndex=n+1,b(Object(_.a)(Object(_.a)({},u.current[e]),{},{zIndex:n+1})),n>ct+2*u.current.length)){var i=Object(a.a)(u.current);i.forEach((function(t){t.zIndex=t.zIndex-u.current.length})),p(i)}},h=function(t){p(Object(a.a)(t))},m=function(t,n){var e=Object(a.a)(u.current.find((function(n){return n.id===t})));if(e){if("last"===n){var i=Math.max.apply(Math,Object(o.a)(u.current.map((function(t){return t.orderPosition||0}))));n=i+1}if("first"===n){var c=Math.min.apply(Math,Object(o.a)(u.current.map((function(t){return t.orderPosition||0}))));n=c-1}e.orderPosition=n,b(e)}},v={create:d,openFile:function(t,n){var e=n||{},o=e.idpanel,i=e.layout,c=e.searchedString,r=e.replacementString;o||(o=Math.random().toString(36).substring(7));var l=Object(a.a)(u.current.find((function(t){return t.id===o})));if(l)"minimized"===l.status&&(l.status="visible"),l.file=Object(f.d)(t),c&&(l.searchedString=c),r&&(l.replacementString=r),b(l),g(null===l||void 0===l?void 0:l.id);else{var s={id:o,type:"file",file:Object(f.d)(t)};i&&(s.layout=i),c&&(s.searchedString=c),r&&(s.replacementString=r),d(s)}},update:b,updateAll:h,delete:function(t){console.log("".concat(it," deletePanel"),t);var n=u.current.filter((function(n){return n.id!==t}));p(n)},movePanel:function(t,n){b(Object(_.a)(Object(_.a)({},u.current.find((function(n){return n.id===t}))),{},{position:n}))},resizePanel:function(t,n){b(Object(_.a)(Object(_.a)({},u.current.find((function(n){return n.id===t}))),{},{size:n}))},minimizePanel:function(t){u.current.find((function(n){return n.id===t}));b(Object(_.a)(Object(_.a)({},u.current.find((function(n){return n.id===t}))),{},{status:"minimized"}))},actionAll:function(t){if("organizeWindows"===t)return function(){console.log("".concat(it," reorganizeAll"));var t=Object(a.a)(u.current),n=0;t.forEach((function(t){"visible"===t.status&&(t.zIndex=ct+n,t.position={x:100+20*n,y:100+20*n},t.size={width:320,height:200},n++)})),h(t)}();var n=Object(a.a)(u.current);n.forEach((function(n){n.status="hide"===t?"visible":"minimized"})),h(n)},panels:i,refreshFromBackend:r,pushWindowOnTop:g,movePositioninArray:function(t,n){var e=Object(a.a)(u.current),o=e.findIndex((function(n){return n.id===t}));if(-1!==o){var i=e.splice(o,1)[0];"up"===n?e.splice(o-1,0,i):"down"===n?e.splice(o+1,0,i):"first"===n?e.splice(0,0,i):"last"===n&&e.push(i),h(e)}},updateOrderPosition:m};return v},rt=null,lt=function(){return new Promise((function(t,n){if(rt)return t(rt);var e=setInterval((function(){if(rt)return clearInterval(e),t(rt)}),200)}))},st=function(cb){lt().then((function(t){cb(t)}))},ut=s.a.createContext(null),pt=function(t){var n=Object(l.useRef)({}),e=function(t){delete n.current[t]},o={subscribe:function(t,cb,e){e||(e={}),n.current[t]||(n.current[t]=[]),n.current[t].push({cb:cb,options:e})},unsubscribe:e,notify:function(t,o){Object(i.a)(n.current,(function(n,c){c===t&&Object(i.a)(n,(function(n){try{n.cb(o)}catch(i){console.warn("[CLIENT API] error with function",i)}n.options.persistent||e(t)}))}))}};Object(l.useEffect)((function(){y.a.client.log.verbose&&console.log("[CLIENT API ]INIT ")}),[]);var c=function(t){Object(l.useEffect)((function(){h.b.on("reconnect",(function(){t.eventBus.notify(n,{isConnected:!0})})),h.b.on("reconnect",(function(){t.eventBus.notify(n,{isConnected:!0})})),h.b.on("disconnect",(function(){t.eventBus.notify(n,{isConnected:!1})}))}),[]);var n="watch-api-unique-id-request";return Object(l.useEffect)((function(){h.b.on("onNoteWatchUpdate",(function(e){t.eventBus.notify(n,e)}))}),[]),{file:function(e,cb){t.eventBus.subscribe(n,(function(t){e===t.filePath&&cb(t)}),{persistent:!0})},appStatus:function(cb){t.eventBus.subscribe(n,(function(t){cb(t)}),{persistent:!0})},dev:{toggleIsConnected:function(e){t.eventBus.notify(n,{isConnected:e})}}}}({eventBus:o}),a=N({eventBus:o,statusApi:t.statusApi}),r=x({eventBus:o,historyApi:t.historyApi}),s=function(t){return Object(l.useEffect)((function(){h.b.on("getFiles",(function(n){t.eventBus.notify(n.idReq,n.files)})),h.b.on("getFilesPreview",(function(n){t.eventBus.notify(n.idReq,n.filesPreview)}))}),[]),{get:function(n,cb){y.a.client.log.socket&&console.log("[CLIENT API] get files ".concat(n));var e=dt("get-files-");t.statusApi.searching.set(!0),t.eventBus.subscribe(e,(function(e){t.statusApi.searching.set(!1),cb(e,n)})),h.b.emit("askForFiles",{folderPath:n,token:Object(m.b)(),idReq:e})},getPreviews:function(n,cb){var e=dt("get-files-");t.eventBus.subscribe(e,cb),h.b.emit("askFilesPreview",{filesPath:n,idReq:e,token:Object(m.b)()})},search:t.searchApi.files.search}}({eventBus:o,searchApi:a,statusApi:t.statusApi}),u=function(t){var n=Object(_.a)({},t).eventBus;Object(l.useEffect)((function(){h.b.on("getUploadedFile",(function(t){n.notify(t.idReq,t)}))}),[]);var e=function(t,cb){try{var e=dt("upload-file");n.subscribe(e,(function(n){delete n.idReq,t.onSuccess&&t.onSuccess(n),cb&&cb({message:"success",succesObj:n})})),Object(P.a)({file:t.file,path:t.folderPath,idReq:e,onProgress:function(n){t.onProgress&&t.onProgress(n)}})}catch(o){console.warn(o)}},o=Object(l.useRef)([]),c=Object(w.a)(Object(S.a)(Object(E.a)().mark((function t(){var n,c,a,r;return Object(E.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(o.current.length<1)){t.next=2;break}return t.abrupt("return");case 2:if(n=o.current.length,c=0,Object(R.d)("Files Uploaded: \n ".concat(c,"/").concat(n),"upload-info"),"mobile"!==Object(A.a)()){t.next=16;break}a=Object(E.a)().mark((function t(i){return Object(E.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,new Promise((function(t,a){var r=o.current[i];if(console.log("uploadObj",r),!r)return a(void 0);console.log("[UPLOAD] starting upload item ".concat(r.uploadInfos.file.name)),e(r.uploadInfos,(function(e){var o=++c===n?5:60;Object(R.d)("Files Uploaded: \n ".concat(c,"/").concat(n),"upload-info",o),r&&r.cb&&r.cb(e),t(void 0)}))}));case 2:case"end":return t.stop()}}),t)})),r=0;case 8:if(!(r<o.current.length)){t.next=13;break}return t.delegateYield(a(r),"t0",10);case 10:r++,t.next=8;break;case 13:o.current=[],t.next=18;break;case 16:Object(i.a)(o.current,(function(t,o){setTimeout((function(){console.log("[UPLOAD] starting upload item ".concat(t.uploadInfos.file.name)),e(t.uploadInfos,(function(e){var o=++c===n?5:60;Object(R.d)("Files Uploaded: \n ".concat(c,"/").concat(n),"upload-info",o),t.cb&&t.cb(e)}))}),500*o)})),o.current=[];case 18:case"end":return t.stop()}}),t)}))),500);return{uploadFile:function(t,cb){o.current.length,Object(R.d)("Starting Uploading Files...","upload-info"),o.current.push({uploadInfos:t,cb:cb}),c()}}}({eventBus:o}),b=Object(D.a)({eventBus:o}),g=function(t){return Object(l.useEffect)((function(){h.b.on("getFoldersScan",(function(n){t.eventBus.notify(n.idReq,{folders:n.folders,pathBase:n.pathBase})})),h.b.on("onServerTaskFinished",(function(n){t.eventBus.notify(n.idReq,n.status)}))}),[]),{get:function(n,cb,e){y.a.client.log.socket&&console.log("[FOLDERS API] get folders ",n,e);var o=dt("get-folders-");t.eventBus.subscribe(o,(function(t){var e=Object(_.a)({},t);e.folderPaths=n,cb(e)})),h.b.emit("askFoldersScan",{foldersPaths:n,depth:(null===e||void 0===e?void 0:e.depth)||0,token:Object(m.b)(),idReq:o})},move:v({eventBus:t.eventBus}).folder,create:function(n,cb){console.log("[askFolderCreate]",n);var e=dt("create-folder-");n=Object(f.b)(n),cb&&t.eventBus.subscribe(e,(function(t){cb(t)})),h.b.emit("askFolderCreate",{newFolderPath:n,token:Object(m.b)(),idReq:e})},delete:d.a}}({eventBus:o}),O=function(t){return Object(l.useEffect)((function(){h.b.on("getCommandExec",(function(n){t.eventBus.notify(n.idReq,n.resultCommand)})),h.b.on("getCommandExecStream",(function(n){t.eventBus.notify(n.idReq,n.streamChunk)}))}),[]),{exec:function(n,cb){var e=dt("command-exec-");t.eventBus.subscribe(e,(function(t){Object(G.a)(t)||(t=JSON.stringify(t)),cb(t)}),{persistent:!0}),h.b.emit("askCommandExec",{commandString:n,token:Object(m.b)(),idReq:e})},stream:function(n,cb){var e=dt("command-stream-");t.eventBus.subscribe(e,(function(n){cb(n),n.isLast&&t.eventBus.unsubscribe(e)}),{persistent:!0}),h.b.emit("askCommandExecStream",{commandString:n,token:Object(m.b)(),idReq:e})}}}({eventBus:o}),j=function(t){Object(l.useEffect)((function(){h.b.on("getBackendConfig",(function(n){t.eventBus.notify(n.idReq,n.config)}))}),[]);var n={get:function(cb){var n=dt("get-config-");t.eventBus.subscribe(n,(function(t){cb(t)})),h.b.emit("askBackendConfig",{token:Object(m.b)(),idReq:n})},getPlatform:function t(){return t()}};return n}({eventBus:o}),k=function(t){Object(l.useEffect)((function(){h.b.on("getPluginsList",(function(n){t.eventBus.notify(n.idReq,n)}))}),[]);var n=function(cb,n){n||(n={}),n.noCache||(n.noCache=!1),y.a.client.log.socket&&console.log("".concat(X," get plugins"));var e=dt("get-plugins-");t.eventBus.subscribe(e,(function(t){t.scanLog.length>0&&st((function(n){return n.ui.notification.emit({content:"PLUGIN SCAN LOG:<br/>".concat(JSON.stringify(t.scanLog)),options:{hideAfter:60}})}));var n=Object($.a)(t.plugins,(function(t){return t.name}));cb(n,t.scanLog)})),h.b.emit("askPluginsList",{noCache:n.noCache,token:Object(m.b)(),idReq:e})},e={list:n,get:function(t,e,cb){n((function(n,o){var i=n.filter((function(n){return n.name===t&&n.type===e}))[0]||null;cb(i)}),{noCache:!0})},cronCache:{set:function(t,n){var e="plugins-cron-infos";st((function(o){o.cache.get(e,(function(i){i||(i={}),i[t]||(i[t]={vars:{}}),i[t].vars=n,o.cache.set(e,i,-1)}))}))}},marketplace:{fetchList:function(cb){st((function(t){var n=t.userSettings.get("plugins_marketplace_url"),e="".concat(X," api.plugins.marketplace.fetchList error for url: ").concat(n," :");t.ressource.fetch(n,(function(t){try{var o=JSON.parse(t),c=[];Object(Z.a)(o)?(Object(i.a)(o,(function(t){var n={name:"",description:"",versions:[],configuration:[]};t.name&&(n.name=t.name),t.description&&(n.description=t.description),t.versions&&(n.versions=t.versions),t.images&&(n.images=t.images),t.icon&&(n.icon=t.icon),t.configuration&&(n.configuration=t.configuration),""!==n.name&&c.push(n)})),cb(c)):Object(R.d)("".concat(e,": did not find a plugin list"))}catch(a){Object(R.d)("".concat(e," ").concat(JSON.stringify(a),", url: ").concat(n))}}),{disableCache:!0})}))}}};return e}({eventBus:o}),T=J(),I={emit:function(t,cb){var n,e=function(){console.log(Q,"emitNotification",t),cb&&cb(),h.b.emit("emitNotification",{notification:t,token:Object(m.b)()})};null!==(n=t.options)&&void 0!==n&&n.showOnceEvery&&t.id?st((function(n){var o="notif-showevery-".concat(t.id);n.cache.get(o,(function(i){var c;if(i&&!0===i.alreadyShown)return console.log(Q,"showOnceEvery => already shown notif, dont reshow it",t);e(),n.cache.set(o,{alreadyShown:!0},null===(c=t.options)||void 0===c?void 0:c.showOnceEvery)}))})):e()}},F={get:function(cb){var t=setInterval((function(){h.b&&(cb(h.b),clearInterval(t))}),10)}},L=Object(p.c)({eventBus:o}).userSettingsApi,z=Object(d.c)({searchUiApi:a.ui,statusApi:t.statusApi,filesApi:s,foldersApi:g,windowApi:t.windowsApi,tabsApi:t.tabsApi,userSettingsApi:L}),B=function(t){var n=Object(l.useState)(null),e=Object(C.a)(n,2),o=e[0],i=e[1],c=function(t){t.windowId||(t.windowId="active"),t.insertPos||(t.insertPos="currentPos"),i(t)};return Object(_.a)(Object(_.a)({},M.b),{},{ui:{lineJump:{jump:function(t,n){c({type:"lineJump",windowId:t,lineJumpNb:n})}},editorAction:{dispatch:c,get:o}}})}(),H=Object(K.b)({}),U=function(t){return Object(l.useEffect)((function(){h.b.on("getPerformanceReport",(function(n){t.eventBus.notify(n.idReq,n)}))}),[]),{getReport:function(cb){var n=dt("get-perf-report");t.eventBus.subscribe(n,(function(t){cb?cb(t):(console.log("[PERF API]","report"),console.log(t.report))})),h.b.emit("askPerformanceReport",{token:Object(m.b)(),idReq:n})}}}({eventBus:o}),W=function(t){var n="[ACTIVITY API]";return Object(l.useEffect)((function(){h.b.on("getActivityReport",(function(n){t.eventBus.notify(n.idReq,n)}))}),[]),{getReport:function(e,cb){console.log(n,"asked for report (if no cb provided, will be outputed to console.log)",e);var o=dt("get-perf-report");t.eventBus.subscribe(o,(function(t){cb?cb(t):(console.log(n,"report"),console.log(t.report))})),h.b.emit("askActivityReport",{params:e,token:Object(m.b)(),idReq:o})}}}({eventBus:o}),q=at(),V={cache:T,file:r,audio:nt,encryption:Y.b,files:s,socket:F,popup:t.popupApi,upload:u,ressource:b,tabs:t.tabsApi,folders:g,config:j,userSettings:L,history:t.historyApi,status:t.statusApi,note:B,analytics:H,search:a,command:O,plugins:k,watch:c,performance:U,activity:W,ui:{browser:z,floatingPanel:q,notification:I,windows:t.windowsApi,lightbox:t.lightboxApi,textToSpeechPopup:t.ttsApi,search:a.ui,note:B.ui,notePreviewPopup:t.notePreviewPopupApi}};return rt=V,V},dt=function(t){return"client-api-".concat(t,"-req-").concat(Object(u.a)())},ft=function(t,cb){lt().then((function(n){var e=t.apiName.split("."),r=n;if(Object(i.a)(e,(function(t){r=r[t]?r[t]:null})),null===r)return cb("nok",{error:'"'.concat(t.apiName,'" does not exists in current api \n\nAvailable Api properties :\n\n').concat(gt("",n))});try{var l=bt(r);if(!Object(c.a)(l)){var s=r.apply(void 0,Object(o.a)(t.apiArguments));return cb("ok",s)}var u=Object(a.a)(t.apiArguments);u.splice(l,0,(function(t){cb("ok",t)})),r.apply(void 0,Object(o.a)(u))}catch(p){return cb("nok",{error:'error "'.concat(JSON.stringify(p),'" when executing "').concat(t.apiName,'" with props ').concat(t.apiArguments)})}}))},bt=function(t){var n=function(t){var n=t.toString().replace(F,""),e=null;return null===(e=n.startsWith("cb =>")?["cb"]:n.slice(n.indexOf("(")+1,n.indexOf(")")).match(L))&&(e=[]),e}(t),e=n.indexOf("cb");return-1===e?null:e},gt=function t(n,e){var o="";for(var c in e)if("object"===typeof e[c]&&e[c].constructor!==Array){if(c.length>1&&"get"!==c){var a=""!==n?"".concat(n,"."):"";o+=t("".concat(a).concat(c),e[c])}}else o="".concat(o).concat(n,".").concat(c,"\n");var l=o.split("\n"),s=[];return lt().then((function(t){Object(i.a)(l,(function(n){var e=n.split("."),o=t;Object(i.a)(e,(function(t,n){o[t]&&(o=o[t])}));var c="var",a="";Object(r.a)(o)&&(c="Function",a=o.toString()),s.push({name:n,type:c,description:a})}))})),o}},110:function(t,n,e){"use strict";e.d(n,"c",(function(){return b})),e.d(n,"a",(function(){return h})),e.d(n,"b",(function(){return m}));var o=e(30),i=e(41),c=e(45),a=e(18),r=e(25),l=e(11),s=e(28),u=e(206),p=e(29),d=e(35),f=function(t){if(t){var n=t.dataset.filePath,e=t.dataset.src;Object(l.d)((function(t){t.file.getContent(n,(function(o){var i=Object(u.a)(o,Object(p.d)(n));if(!(i.length<1)){var c=[],a=0;Object(r.a)(i,(function(t,n){e.includes(t.url)&&(a=n),c.push(t.url)})),t.ui.lightbox.open(a,c)}}))}))}},b=function(t,n){return Object(c.a)({file:t,windowId:n,pattern:o.a.image2,replacement:function(n){var e=n.matchs,o=document.createElement("div");return o.innerHTML=g(e[0],e[2],e[1],e[5],t),o}})},g=function(t,n,e,o,c){"image"!==e&&(e='<div class="mdpreview-source">'.concat(e,"</div>")),d.d.curr.ui_editor_show_image_title||(e="");var r=n.startsWith("http")?n:"".concat(Object(i.a)(c.folder),"/").concat(n).concat(Object(a.c)());o||(o="");var l=o.trim().split("="),u="";if("width"===l[0]||"height"===l[0]){var p="width"===l[0]?"height:auto;max-height:none":"width:auto; max-width:none;";u='style="'.concat(l[0],":").concat(l[1],"; ").concat(p,'"')}return'<div class="cm-mdpreview-wrapper image-wrapper"><div class="cm-mdpreview-image" data-file-path="'.concat(c.path,'" data-src="').concat(r,'" onclick="').concat(Object(s.c)("image-open-lightbox",f),'"> <img onerror="this.style.display=\'none\'" ').concat(u,' src="').concat(r,'" /></div></div>').concat(e)},h=function(t,n,e){var o="",c=t.split("[")[1].split("]")[0];"image"!==c&&(o='<div class="mdpreview-source">'.concat(c,"</div>")),d.d.curr.ui_editor_show_image_title||(o="");var r=n.startsWith("http")?n:"".concat(Object(i.a)(e.folder),"/").concat(n).concat(Object(a.c)());return'<div class="cm-mdpreview-wrapper image-wrapper"><div class="cm-mdpreview-image" data-file-path="'.concat(e.path,'" data-src="').concat(r,'" onclick="').concat(Object(s.c)("image-open-lightbox",f),'"> <img onerror="this.style.display=\'none\'" src="').concat(r,'" /></div></div>').concat(o)},m=function(){return"\n.cm-mdpreview-wrapper.image-wrapper {\n\t\t// display: inline;\n\t\tdiv {\n\t\t\t// display: inline;\n\t\t}\n\t\t.cm-mdpreview-image {\n\t\t\tcursor:pointer;\n\t\t}\n\t\t.mdpreview-source {\n\t\t\t\tline-height: initial;\n\t\t}\n}\n\n"}},115:function(t,n,e){"use strict";e.d(n,"b",(function(){return f})),e.d(n,"a",(function(){return g})),e.d(n,"c",(function(){return v})),e.d(n,"d",(function(){return w}));var o=e(3),i=e(6),c=e(7),a=e(21),r=e(22),l=e(12),s=e(8),u=e(4),p=e(99),d=e(110),f={LatexMdEl:u.a.define()},b={resolve:"LatexMdEl"},g={defineNodes:["LatexMdEl"],parseInline:[{name:"MdCustomTagsParser",parse:function(t,n,e){return 36===n?t.addDelimiter(b,e,e+1,!0,!0):-1},after:"Emphasis"}],props:[Object(u.c)({LatexMdEl:f.LatexMdEl})]},h=function(t){Object(a.a)(e,t);var n=Object(r.a)(e);function e(t){var o;return Object(i.a)(this,e),(o=n.call(this)).str=t,o}return Object(c.a)(e,[{key:"ignoreEvent",value:function(){return!1}},{key:"toDOM",value:function(){var t=document.createElement("div");t.classList.add("cm-mdpreview-wrapper"),t.classList.add("latex-wrapper");var n=Object(p.e)(this.str);return t.innerHTML=' <div class="latex-height" >'.concat(n,"</div> "),t}}]),e}(l.g);function m(t,n){var e,i=[],c=Object(o.a)(t.visibleRanges);try{for(c.s();!(e=c.n()).done;){var a=e.value,r=a.from,u=a.to;Object(s.F)(t.state).iterate({from:r,to:u,enter:function(n){if("LatexMdEl"===n.name){var e=t.state.doc.sliceString(n.from,n.to),o=l.a.widget({widget:new h(e),side:1});i.push(o.range(n.from))}}})}}catch(p){c.e(p)}finally{c.f()}return l.a.set(i)}var v=function(t){return l.f.fromClass(function(){function n(e){Object(i.a)(this,n),this.decorations=void 0,this.decorations=m(e,t.file)}return Object(c.a)(n,[{key:"update",value:function(n){(n.docChanged||n.viewportChanged)&&(this.decorations=m(n.view,t.file))}}]),n}(),{decorations:function(t){return t.decorations},eventHandlers:{mousedown:function(t,n){t.target}}})},w=function(){return"\n.latex-height {\n\t\theight: 20px;\n\t\toverflow: auto;\n\t\tline-height: initial;\n\t\tbackground: rgb(247,247,247);\n\t\tpadding: 10px;\n\t\tborder-radius: 5px;\n\t\tcolor: rgba(0,0,0,0);\n\t\ttransition: all 0.2s;\n\t\t.katex, .katex span {\n\t\t\t\tcolor: black;\n\t\t}\n}\n\n.mdpreview-source {\n\t\tfont-weight: bold;\n\t\tcolor: #b4b4b4;\n\t\tfont-size: 9px;\n\t\tdisplay: block;\n}\n\n\n\n\n.cm-mdpreview-wrapper {\n\t\tline-height: 0px;\n\n\t\t&.latex-wrapper {\n\t\t\t\tposition: relative;\n\t\t\t\tleft: -10px;\n\t\t\t\tdisplay: inline-block;\n\t\t}\n\t\t&.image-wrapper {\n\t\t\t\t/* max-height: 160px; */\n\t\t}\n\n\t\t.cm-mdpreview-image {\n\t\t\t\tposition: relative;\n\t\t\t\tdisplay: inline-block;\n\n\t\t\t\timg {\n\t\t\t\t\t\tmargin: 5px 0px;\n\t\t\t\t\t\tborder-radius: 5px;\n\t\t\t\t\t\tbox-shadow: 0px 0px 5px rgba(0,0,0,.2);\n\t\t\t\t\t\tmax-width: calc(100% - 20px);\n\t\t\t\t\t\tborder-radius: 5px;\n\t\t\t\t\t\tmax-height: 220px;\n\t\t\t\t}\n\t\t\t\t.enlarge {\n\t\t\t\t\t\twidth: 10px;\n\t\t\t\t\t\topacity: 0;\n\t\t\t\t\t\ttransition: 0.2s all;\n\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\ttop: 8px;\n\t\t\t\t\t\tright: 23px;\n\t\t\t\t\t\tz-index: 2;\n\t\t\t\t\t\tpadding: 6px;\n\t\t\t\t\t\tcursor: pointer;\n\t\t\t\t\t\tbackground: rgba(0,0,0,0.6);\n\t\t\t\t\t\tborder-radius: 19px;\n\t\t\t\t}\n\t\t\t\tsvg, span {\n\t\t\t\t\t\tpointer-events: none;\n\t\t\t\t}\n\t\t\t\tsvg {\n\t\t\t\t\t\tbox-shadow: 0 0 0 rgba(0,0,0,0.4);\n\t\t\t\t}\n\n\t\t}\n\t\t&:hover .enlarge {\n\t\t\t\topacity: 0.3;\n\t\t\t\t/* pointer-events: all; */\n\t\t}\n}\n\n ".concat(Object(d.b)(),"\n ")}},116:function(t,n,e){"use strict";e.d(n,"c",(function(){return c})),e.d(n,"a",(function(){return a})),e.d(n,"b",(function(){return r})),e.d(n,"d",(function(){return u}));var o=e(169),i=e.n(o),c=function(t,n){var e=i.a.generateRSAKey(n,1024),o=i.a.publicKeyString(e);return i.a.encrypt(t,o)},a=function(t,n){var e=i.a.generateRSAKey(n,1024);return i.a.decrypt(t,e)},r={encryptText:c,decryptText:a,encryptUrlParam:function(t,n){var e=c(t,n);return e.cipher&&(e.cipher=encodeURIComponent(e.cipher)),e},decryptUrlParam:function(t,n){return t=decodeURIComponent(t),a(t,n)}},l=function(t,n){var e=n.replace(t,"").length,o=n.length;return Math.round(e/o*100)/100},s=function(t){return t>0&&t<=.9},u=function(t){var n=!1,e={nb:l(/[^0-9]/g,t),up:l(/[^A-Z]/g,t),low:l(/[^a-z]/g,t),spe:l(/[^\/\=\?\+]/g,t)},o=s(e.nb)&&s(e.up)&&s(e.low)&&e.spe>0,i=(t.trim().endsWith("==")||t.trim().endsWith("="),/^[a-zA-Z0-9\/\=\?\+]+$/.test(t)),c=t.length>100;return i&&o&&c&&(n=!0),n}},118:function(t,n,e){"use strict";e.d(n,"c",(function(){return j})),e.d(n,"a",(function(){return k})),e.d(n,"b",(function(){return y})),e.d(n,"d",(function(){return _}));var o=e(5),i=e(0),c=e.n(i),a=e(55),r=e(667),l=e(25),s=e(366),u=e.n(s),p=(e(537),e(538),e(211)),d=e(155),f=e(213),b=e(135),g=e(9),h=e(42),m=e(11),v=e(13),w=e(214),O=e(1),j={rows:2,cols:4},x={m:10,rows:j.rows,cols:j.cols,decalBottom:10},k=function(t){var n=Object(i.useState)([]),e=Object(o.a)(n,2),s=e[0],g=e[1],k=function(t){g(t),y.current=t},y=Object(i.useRef)([]),_=Object(i.useState)([]),C=Object(o.a)(_,2),E=C[0],S=C[1],T=Object(i.useRef)();Object(i.useEffect)((function(){t.grid&&t.grid.layout&&(S(t.grid.layout),k(t.grid.content))}),[t.refresh]),Object(i.useEffect)((function(){U(),L()}),[E]);var I=function(n,e){t.onGridUpdate({layout:n,content:e})},N=function(){var t=s[0].file;if(t){var n=function(t){for(var n=[],e=j,o=function(o){for(var i=[],c=function(n){var e=0;Object(l.a)(t,(function(t){for(var i=0;i<t.w;i++)for(var c=0;c<t.h;c++){var a=t.x+i,r=t.y+c;a===n&&r===o&&(e=1)}})),i.push(e)},a=0;a<e.cols;a++)c(a);n.push(i)},i=0;i<e.rows;i++)o(i);for(var c=[-1,-1],a=[-1,-1],r=0;r<e.rows;r++)for(var s=0;s<e.cols;s++)0===n[r][s]&&-1===c[0]&&-1===c[1]&&(c[0]=s,c[1]=r),0===n[r][s]&&(a[0]=s,a[1]=r);var u=a[0]-c[0]+1,p=a[1]-c[1]+1;return{x:c[0],y:c[1],w:u,h:p}}(E),e=Object(d.a)({file:t,w:n.w,h:n.h,x:n.x,y:n.y}),o=Object(a.a)(E);o.push(e.layout),J(o)&&(S(o),setTimeout((function(){var t=Object(a.a)(s);t.push(e.content);var n=W(e.content.i,t);k(n),I(o,n)})),I(o,s))}},P=Object(i.useState)(!1),R=Object(o.a)(P,2),A=R[0],F=R[1],L=function(){F(E.length>1)},M=function(t){var n=Object(r.a)(Object(a.a)(E),(function(n){return n.i!==t})),e=function(t){var n=j;return 1===t.length&&(t[0].x=0,t[0].y=0,t[0].h=n.rows,t[0].w=n.cols),t}(n);S(e),setTimeout((function(){var e=Object(r.a)(Object(a.a)(s),(function(n){return n.i!==t}));k(e),I(n,e)})),I(n,s)},D=Object(i.useState)(!1),z=Object(o.a)(D,2),B=z[0],H=z[1],U=function(){var t=0,n=x.cols*x.rows;Object(l.a)(E,(function(n){t+=n.w*n.h})),H(t!==n)},W=function(t,n){var e=Object(a.a)(n);return Object(l.a)(e,(function(n){n.active=n.i===t})),e},q=function(t,n){var e=W(t,y.current);k(e),I(E,e)},V=function(t){T.current=Object(a.a)(t)},J=function(t){for(var n=!0,e=0;e<t.length;e++){var o=t[e];o.y>1&&(n=!1),o.h>1&&o.y>0&&(n=!1)}return n};Object(f.b)(),Object(i.useEffect)((function(){var t=K.current;if(t)return t.addEventListener("resize",(function(){})),function(){t.removeEventListener("resize",(function(){}))}}),[]);var K=Object(i.useRef)(null),G={width:300,height:300};K.current&&(G.width=K.current.clientWidth,G.height=K.current.clientHeight-x.decalBottom);Object(i.useContext)(m.a);var Y=function(n,e){return function(o,i){if("windowActiveStatus"===o)n&&!n.active&&q(n.i,n.file);else if("windowViewChange"===o){var c;if(null===i||void 0===i||!i.view||!t.grid.content[e].file)return;!function(t,n){var e=Object(a.a)(s);e[n].view=t,k(e),I(E,e)}(null===i||void 0===i?void 0:i.view,e);var r=(null===(c=t.grid.content[e].file)||void 0===c?void 0:c.path)||"";Object(w.b)(r,null===i||void 0===i?void 0:i.view)}}};return Object(O.c)("div",{className:"draggable-grid-wrapper"},Object(O.c)("div",{className:"draggable-grid-wrapper-in",ref:K},"mobile"!==Object(v.a)()&&Object(O.c)(u.a,{className:"draggable-grid",autoSize:!1,layout:E,onLayoutChange:function(t){var n=Object(a.a)(t);if(J(n)){var e=n;V(e),S(e),I(e,s)}else{if(!T.current)return;var o=function(t){var n=t,e=j,o=null;console.log("0035",n),(2===n.length&&(n[0].w===e.cols-1&&n[0].h===e.rows&&n[1].w===e.cols/2&&n[1].h===e.rows||n[1].w===e.cols-1&&n[1].h===e.rows&&n[0].w===e.cols/2&&n[0].h===e.rows)||2===n.length&&(n[0].w===e.cols-1&&n[0].h===e.rows&&n[1].w===e.cols/2&&n[1].h===e.rows||n[1].w===e.cols-1&&n[1].h===e.rows&&n[0].w===e.cols/2&&n[0].h===e.rows))&&(console.log("[ALT LAYOUT] 0035 found i|iii to ii|ii"),o=Object(a.a)(t),Object(l.a)(o,(function(t,n){t.w=e.cols/2,t.y=0,1===n&&(t.x=e.cols/2)})));return o}(t);o&&V(o);var i=o||T.current,c=Object(a.a)(i);Object(l.a)(c,(function(t){t.refresh=Object(p.a)(t.refresh)})),S(c),I(c,s)}},cols:x.cols,compactType:"horizontal",useCSSTransforms:!1,rowHeight:G.height/x.rows-x.m*(x.rows+1),draggableHandle:".drag-handle",width:G.width,margin:[x.m,x.m]},E.map((function(n,e){return Object(O.c)("div",{key:n.i,className:" ".concat(s[e]&&s[e].active?"active":""," window-wrapper "),onClick:function(){s[e]&&!s[e].active&&q(s[e].i,s[e].file)},onMouseEnter:function(){}},function(t,n,e){var o=[{icon:"faGripVertical",title:"Move Window",class:"drag-handle",size:1.2,action:function(){},onHover:function(){t&&!t.active&&q(t.i,t.file)}},{icon:"faPlus",title:"Add Window",class:"add-button",action:function(){N()}},{icon:"faPlus",title:"Delete Window",class:"delete-button",action:function(){M(t.i)}}];return Object(O.c)(c.a.Fragment,null,Object(O.c)("div",{className:"note-active-ribbon"}),Object(O.c)("div",{className:"window-buttons-bar ".concat(B?"can-add":""," ").concat(A?"can-remove":"")},Object(O.c)(h.a,{design:"horizontal",popup:!1,buttons:o,colors:["#d4d1d1","#615f5f"],size:.8})))}(n,0,t.grid.content[e]),Object(O.c)("div",{className:"window-editor-wrapper-wrapper"},Object(O.c)(b.a,{content:t.grid.content[e]&&t.grid.content[e],forceView:t.grid.content[e]&&t.grid.content[e].view,onLayoutUpdate:Y(n,e),mobileView:t.mobileView})))}))),"mobile"===Object(v.a)()&&Object(O.c)("div",{className:"mobile-grid-view"},Object(O.c)("div",{className:" window-wrapper"},Object(O.c)("div",{className:"window-editor-wrapper-wrapper"},t.grid.content[0]&&Object(O.c)(b.a,{content:t.grid.content[0],onLayoutUpdate:Y(window,0),mobileView:t.mobileView}))))))},y=function(){return"\n.draggable-grid-wrapper \n.draggable-grid-wrapper-in \n.mobile-grid-view {\n\t\t.window-wrapper {\n\n\t\t\t\t.window-buttons-bar {\n\t\t\t\t\t\tdisplay: none;\n\t\t\t\t}\n\n\t\t\t\t.window-editor-wrapper-wrapper {\n\t\t\t\t\t\t.dual-view-wrapper {\n\t\t\t\t\t\t\t\t.editor-area {\n\t\t\t\t\t\t\t\t\t\tmargin-top: 47px;\n\t\t\t\t\t\t\t\t\t\t.infos-editor-wrapper {\n\t\t\t\t\t\t\t\t\t\t\t\tmargin-top: 10px;\n\t\t\t\t\t\t\t\t\t\t\t\ttop: -43px;\n\t\t\t\t\t\t\t\t\t\t\t\t.title-input-wrapper {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tinput {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcolor: ".concat(g.a.colors.main,";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t.dropdown-icon {\n\t\t\t\t\t\t\t\t\t\t\t\ttop: -15px;\n\t\t\t\t\t\t\t\t\t\t\t\tright: 10px;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t.context-menu {\n\t\t\t\t\t\t\t\t\t\t\t\tright: 10px;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t.main-editor-wrapper {\n\t\t\t\t\t\t\t\t\t\t\t\t.textarea-editor {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\theight: calc(100% - 300px);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tpadding: 20px 20px 70px 20px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\twidth: calc(100% - 40px);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tresize: none;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t.preview-area-wrapper {\n\t\t\t\t\t\t\t\t\t\t// height: calc(100% - 165px);\n\t\t\t\t\t\t\t\t\t\theight: calc(100% - 85px);\n\t\t\t\t\t\t\t\t\t\t.preview-area {\n\t\t\t\t\t\t\t\t\t\t\t\ttop: 0px!important;\n\t\t\t\t\t\t\t\t\t\t\t\tbottom: 0px!important;\n\t\t\t\t\t\t\t\t\t\t\t\t.dates-wrapper {\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t.preview-content {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tpadding: 0px 0px 50px 0px;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t.scrolling-bar-wrapper {\n\t\t\t\t\t\t\t\t\t\tdisplay:none;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t}\n}\n")},_=function(t){return"\n\n.draggable-grid-wrapper {\n\t\t// remove transition\n\n\t\theight: calc(100% + ".concat(t.topTab?"0":"44","px);\n\t\ttop: ").concat(t.topTab&&"mobile"!==Object(v.a)()?"44":"0","px;\n\t\tposition: relative;\n\n\t\t.react-grid-item {\n\t\t\t\ttransition: all 0ms ease;\n\t\t\t\ttransition-property: left, top;\n\t\t\t\t.react-resizable-handle {\n\t\t\t\t\t\tbottom: 0px;\n\t\t\t\t\t\tright: 0px;\n\t\t\t\t\t\tcursor: se-resize;\n\t\t\t\t\t\topacity: 1;\n\t\t\t\t\t\twidth: 10px;\n\t\t\t\t\t\theight: 18px;\n\t\t\t\t\t\tbackground: rgb(247,247,247);\n\t\t\t\t}\n\t\t\t\t.react-resizable-handle:after {\n\t\t\t\t\t\ttop: 5px;\n\t\t\t\t\t\tleft: 1px;\n\t\t\t\t\t\topacity: 0.3;\n\t\t\t\t}\n\t\t}\n\n\t\t.draggable-grid-wrapper-in {\n\t\t\t\theight: 100%;\n\t\t\t\tposition: relative;\n\n\t\t\t\t.draggable-grid, .mobile-grid-view {\n\t\t\t\t\t\theight: 100%;\n\t\t\t\t\t\twidth: 100%;\n\t\t\t\t\t\t.window-wrapper {\n\t\t\t\t\t\t\t//overflow: hidden;\n\t\t\t\t\t\t\tborder-radius: 5px;\n\t\t\t\t\t\t\tcolor: ").concat(g.a.colors.fontEditor,";\n\t\t\t\t\t\t\tbackground: ").concat(g.a.colors.bgEditor,";\n\t\t\t\t\t\t\tbox-shadow: 0px 0px 5px rgba(0,0,0,.1);\n\t\t\t\t\t\t\toverflow-y: hidden;\n\t\t\t\t\t\t\toverflow-x: hidden;\n\t\t\t\t\t\t\theight:100%;\n\n\t\t\t\t\t\t\t.window-buttons-bar {\n\t\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\t\tz-index:3;\n\t\t\t\t\t\t\t\tright: 30px;\n\t\t\t\t\t\t\t\ttop: 8px;\n\t\t\t\t\t\t\t\t.delete-button {display: none;}\n\t\t\t\t\t\t\t\t.add-button {display: none;}\n\t\t\t\t\t\t\t\t.drag-handle {\n\t\t\t\t\t\t\t\t\t\tcursor: grab;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t.delete-button span.icon-wrapper {\n\t\t\t\t\t\t\t\t\ttransform: rotate(45deg);\n\t\t\t\t\t\t\t\t\tdisplay: inline-block;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t&.can-add {\n\t\t\t\t\t\t\t\t\t\t.add-button {display: block;}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t&.can-remove {\n\t\t\t\t\t\t\t\t\t\t.delete-button {display: block;}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t&.active {\n\t\t\t\t\t\t\t\t.note-active-ribbon {\n\t\t\t\t\t\t\t\t\t\t//background:").concat(g.a.colors.main,";\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t.dual-view-wrapper\n\t\t\t\t\t\t\t\t.editor-area\n\t\t\t\t\t\t\t\t.infos-editor-wrapper\n\t\t\t\t\t\t\t\t.title-input-wrapper\n\t\t\t\t\t\t\t\t.big-title {\n\t\t\t\t\t\t\t\t\t\tcolor: ").concat(g.a.colors.main,";\n\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t}\n\n\t\t\n}\n")}},128:function(t,n,e){"use strict";e.d(n,"c",(function(){return r})),e.d(n,"b",(function(){return l})),e.d(n,"a",(function(){return s}));var o=e(15),i=e(362),c=e(38),a=e(241),r=function(t,n){var e="render-react-wrapper-".concat(Object(c.a)()),o=function(){var n=l(t),o=setInterval((function(){var t=document.getElementById(e);t&&(t.innerHTML="",t.appendChild(n),clearInterval(o))}),10)};return n&&n.delay?setTimeout(o,n.delay):o(),e},l=function(t,n){return n||(n=document.createElement("div")),Object(i.createRoot)(n).render(t),n},s=function(t){return Object(a.a)((function(){return t.apply(void 0,arguments)}),(function(t){return JSON.stringify(Object(o.a)(t))}))}},13:function(t,n,e){"use strict";e.d(n,"e",(function(){return o})),e.d(n,"c",(function(){return i})),e.d(n,"b",(function(){return c})),e.d(n,"d",(function(){return a})),e.d(n,"a",(function(){return r}));var o=function(){var t,n=!1;return t=navigator.userAgent||navigator.vendor||window.opera,(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(t)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(t.substr(0,4)))&&(n=!0),n},i=function(t){return r()===t},c=function(){var t=navigator.platform.toLowerCase();return t.includes("mac")?"mac":t.includes("win")?"windows":t.includes("linux")?"linux":t.includes("android")?"android":"other"};function a(){return!!/iPad/.test(navigator.platform)||navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&/MacIntel/.test(navigator.platform)}var r=function(){var t=window.innerWidth,n="desktop";return l()||t<1e3&&(n="tablet"),t<500&&(n="mobile"),n},l=function(){return!s()},s=function(){var t,n=!1;return t=navigator.userAgent||navigator.vendor||window.opera,(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(t)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(t.substr(0,4)))&&(n=!0),n}},130:function(t,n,e){"use strict";e.d(n,"b",(function(){return d})),e.d(n,"a",(function(){return f}));var o=e(10),i=e(121),c=e(25),a=e(11),r=e(18),l=e(14),s=e(539),u={curr:[]},p=Object(i.a)((function(t){console.log("[UPLOAD] inserting ".concat(u.curr.length," files after debounce")),Object(a.d)((function(n){var e="";Object(c.a)(u.curr,(function(t,n){if(!t.inserted){var o=t.file.name.replace(/\[/g,"").replace(/\]/g,"");e+="![".concat(o,"](").concat(t.file.path,")\n"),t.inserted=!0}})),n.ui.note.editorAction.dispatch({type:"insertText",insertPos:"currentLineStart",insertText:e,windowId:t})}))}),1e3),d=function(t){console.log("[UPLOAD] FILE TO EDITOR started",t.fileToUpload);var n=Object(o.a)({},t),e=n.fileToUpload,i=n.folder,c=n.windowId;Object(a.d)((function(t){t.upload.uploadFile({file:e,folderPath:i,onSuccess:function(t){u.curr.push({file:t,inserted:!1}),p(c)},onProgress:function(n){t.ui.note.editorAction.dispatch({type:"uploadProgress",uploadProgress:n,windowId:c})}})}))},f=function(t){var n=Object(o.a)({},t),e=n.file,i=n.path,c=n.idReq,a=n.onProgress,u=new s(l.a);u.addEventListener("start",(function(t){t.file.meta.idReq=c,t.file.meta.path=i,t.file.meta.token=Object(r.b)()})),u.addEventListener("progress",(function(t){var n=Math.round(t.bytesLoaded/t.file.size*100);a(n)})),u.submitFiles([e])}},131:function(t,n,e){"use strict";e.d(n,"a",(function(){return l}));var o=e(136),i=e(31),c="[FRONT PERF]",a={value:!1};"true"===Object(o.a)("tiroConsoleLogEnabled")||(console.error("=============================================================================="),console.error("!!! console.log is disabled, to enable it again, tiroDevCli.log.toggle_enable()"),console.error("=============================================================================="),window.console={warn:function(){},error:function(){},info:function(){},log:function(){}}),Object(i.a)("log","toggle_enable",(function(){var t="true"===Object(o.a)("tiroConsoleLogEnabled");Object(o.b)("tiroConsoleLogEnabled",t?"false":"true",720),window.location.reload()})),Object(i.a)("performance","toggle_monitoring",(function(){a.value=!a.value,console.log(c,"toggled to ".concat(a.value))}));var r={},l=function(t){if(!a.value)return function(){};r[t]||(r[t]=[]),r[t][0]=performance.now();return function(){r[t][1]=performance.now();var n=r[t],e=n[1]-n[0];console.warn(c,"".concat(t," = ").concat(e," ms"),n)}}},132:function(t,n,e){"use strict";e.d(n,"c",(function(){return O})),e.d(n,"b",(function(){return y})),e.d(n,"a",(function(){return _}));var o=e(15),i=e(5),c=e(25),a=e(280),r=e(170),l=e(55),s=e(36),u=e(0),p=e(29),d=e(17),f=e(31),b=e(14),g=e(93),h=e(18),m=e(60),v=e(70),w=e(11),O=function(t){var n=Object(u.useState)([]),e=Object(i.a)(n,2),s=e[0],f=e[1],b=Object(u.useState)(-1),h=Object(i.a)(b,2),O=h[0],y=h[1],_=Object(v.a)("selected-folder",""),C=Object(i.a)(_,2),E=C[0],S=C[1],T=Object(u.useRef)("");Object(u.useEffect)((function(){T.current=E}),[E]);var I=Object(u.useRef)({}),N=Object(u.useState)(j),P=Object(i.a)(N,2),R=P[0],A=P[1],F=Object(u.useState)(""),L=Object(i.a)(F,2),M=L[0],D=L[1],z=Object(m.a)("folders-open",["/"]),B=Object(i.a)(z,3),H=B[0],U=B[1],W=B[2],q=Object(u.useRef)([]),V=function(t){t=Object(a.a)(t),U(t)},J=Object(u.useRef)(!1);Object(u.useEffect)((function(){J.current||(K(H),H.length>1&&(J.current=!0))}),[H]);var K=function(t,n){Object(c.a)(t,(function(n,e){""===t[e]&&(t[e]="/")})),t=Object(a.a)(t),n||(n={}),Object(r.a)(n.cache)||(n.cache=!0);var e=!!Object(r.a)(n.background)&&n.background,o=0;Object(w.d)((function(i){Object(c.a)(t,(function(c){i.folders.get([c],(function(i){var c;!e&&Y(i.pathBase,i.folders),++o>=t.length&&(null===(c=n)||void 0===c?void 0:c.cb)&&n.cb()}))}))}))},G=Object(u.useRef)([]),Y=function(t,n){var e=Object(l.a)(G.current),o={current:e};Object(c.a)(n,(function(t){t&&(o.current=o.current.filter((function(n){return t.path!==n.path})))})),Object(c.a)(n,(function(t){t&&(o.current=k(t,o.current))})),e=o.current,G.current=e;var i=x("/",e);i&&A(i),D(t)};return{goTo:function(t,n,e){var o=function(t){Object(w.d)((function(o){o.status.searching.set(!1);var i=o.userSettings.get("ui_filesList_sortMode"),a=Object(g.d)(t,i),r=-1;if(n&&Object(c.a)(a,(function(t,e){t.name===n&&(r=e)})),y(r),f(a),e&&e.openIn){var l=a[r];if("active"===e.openIn||"activeWindow"===e.openIn){var s=o.tabs.active.get();null===s||void 0===s||s.grid.content[0].i;s?o.ui.windows.active.setContent(l):o.tabs.openInNewTab(l)}else o.ui.windows.updateWindows([e.openIn],l)}}))},i=function(){Object(w.d)((function(o){t=Object(p.b)("".concat(t,"/"));d.a.client.log.verbose&&console.log("".concat("[BROWSER GO TO] "," ").concat(t," ").concat(n," ").concat(JSON.stringify(e))),o.ui.search.term.set(""),o.status.searching.set(!0),S(t)}))};if(e&&e.ramCache&&I.current[t])i(),console.log("RAM CACHE",t,I.current[t].length),o(I.current[t]);else{if(""===t)return;Object(w.d)((function(n){i(),n.files.get(t,(function(n){o(n),I.current[t]=n}))}))}},files:{active:{get:s[O],getIndex:O,set:y},set:f,get:s},folders:{refreshFromBackend:function(){W((function(t){q.current=t}))},base:M,get:function(cb){return cb&&cb(R),R},clean:function(){A(j)},scan:K,open:{get:function(){return q.current},add:function(t){console.log("ADD",t),q.current=[].concat(Object(o.a)(q.current),[t]),q.current=Object(a.a)(q.current),V(q.current)},remove:function(t){console.log("REMOVE",t),Object(c.a)(t,(function(t){q.current=q.current.filter((function(n){return n!==t}))})),V(q.current)}},current:{get:function(){return T.current},set:S,getSync:E}}}},j={title:"",key:"",path:""},x=function t(n,e){for(var o,i=0;i<e.length;i++)if(Object(p.a)(e[i].path,n)){o=Object(l.a)(e[i]);var c=e[i].children;if(Object(s.a)(c))for(var a=0;a<c.length;a++){var r=t(c[a].path,e);r&&(o.children[a]=r)}}return o},k=function(t,n){for(var e="add",o=0;o<n.length;o++)Object(p.a)(t.path,n[o].path)&&(n[o]=t,e="update");return"add"===e&&n.push(t),n},y={title:".trash",key:"/.tiro/.trash",path:"/.tiro/.trash"},_=function(t,n){console.log("[askFolderDelete]",t,n),b.b.emit("askFolderDelete",{typeFolder:t,cacheFolderName:n,token:Object(h.b)()})};Object(f.a)("cache","clean_cache",(function(){Object(f.d)("Cache clean started...","clean_cache"),Object(w.d)((function(t){t.folders.delete("cache","ctag-ressources"),t.ressource.cleanCache(),t.cache.cleanRamCache(),Object(f.d)("Cache cleaned successfully","clean_cache")}))}))},135:function(t,n,e){"use strict";e.d(n,"a",(function(){return w})),e.d(n,"b",(function(){return O}));var o=e(5),i=e(10),c=e(170),a=e(0),r=e.n(a),l=e(11),s=e(32),u=e(178),p=e(214),d=e(216),f=e(9),b=(e(65),e(215)),g=e(130),h=e(35),m=e(1),v=function(t){var n=Object(i.a)({},t.content),e=n.file,f=n.view,v=n.active,w=n.i,O=Object(a.useState)(""),j=Object(o.a)(O,2),x=j[0],k=j[1],y=Object(a.useState)("editor"),_=Object(o.a)(y,2),C=_[0],E=_[1],S=w;Object(a.useEffect)((function(){if(t.forceView)return E(t.forceView);E(f),Object(p.a)(null===e||void 0===e?void 0:e.path).then((function(t){E(t||"editor")}))}),[f,null===e||void 0===e?void 0:e.path,S,t.forceView]);var T=Object(a.useState)(!0),I=Object(o.a)(T,2),N=I[0],P=I[1],R=Object(a.useRef)((null===e||void 0===e?void 0:e.path)||"");Object(a.useEffect)((function(){R.current=(null===e||void 0===e?void 0:e.path)||"",M(!1),e&&Object(l.d)((function(t){t.file.getContent(e.path,(function(t){k(t),M(!0)})),!0===h.d.curr.ui_editor_live_watch&&(console.log("[FILE CONTENT WATCH] enabled for ".concat(e.path)),t.watch.file(e.path,(function(t){if(R.current===t.filePath)return!0===V.current?q.current=t.fileContent:void k(t.fileContent)})))}))}),[null===e||void 0===e?void 0:e.path,S,N]);var A=Object(a.useState)(!1),F=Object(o.a)(A,2),L=F[0],M=F[1],D=Object(s.a)((function(t){Object(u.a)(t,20)}),3e3),z=Object(a.useRef)(!1),B=(Object(s.a)((function(){z.current=!1,console.log("reenable watch file")}),1e4),Object(a.useRef)({})),H=Object(a.useRef)(0);Object(a.useEffect)((function(){B.current;Object(l.d)((function(t){t.watch.appStatus((function(t){if(!1===t.isConnected)H.current=H.current+1,console.log("disabling watch update as disconnected"),z.current=!0;else if(!0===t.isConnected){if(H.current>=1&&t.isConnected)return}}))}))}),[null===e||void 0===e?void 0:e.path,x]);var U=Object(a.useRef)(x);Object(a.useEffect)((function(){U.current=x}),[x]);var W=function(t,n){Object(l.d)((function(e){e.file.saveContent(t,n,{history:!0,debounced:500})})),V.current=!0,J(),B.current={content:n,path:null===e||void 0===e?void 0:e.path},D({path:t,content:n,timestamp:Date.now()})},q=Object(a.useRef)(!1),V=Object(a.useRef)(!1),J=Object(s.a)((function(){V.current=!1,Object(c.a)(q.current)||(q.current=!1)}),2e3);Object(a.useEffect)((function(){e&&v&&Object(l.d)((function(t){t.ui.browser.goTo(e.folder,e.name,{ramCache:!0})}))}),[v]);var K=Object(s.a)((function(){Z(!1)}),100),G=Object(a.useState)(!1),Y=Object(o.a)(G,2),$=Y[0],Z=Y[1];return Object(m.c)(r.a.Fragment,null,N&&e&&Object(m.c)("div",{className:"window-editor-wrapper",onPaste:function(t){null!==e&&void 0!==e&&e.path&&Object(b.b)(t,(function(t){Object(g.b)({fileToUpload:t,folder:e.folder,windowId:S})}))},onDragOver:function(t){t.preventDefault(),t.stopPropagation(),console.log("handle dragover",null===e||void 0===e?void 0:e.path),Z(!0),K()},onDragLeave:function(t){},onDrop:function(t){console.log("window drop"),t.preventDefault(),t.stopPropagation(),Z(!1),console.log("handle drop",null===e||void 0===e?void 0:e.path),null!==e&&void 0!==e&&e.path&&function(t,n){if(console.log("handleFileDrop"),t.preventDefault(),t.dataTransfer&&t.dataTransfer.items){var e=t.dataTransfer.items;if(!e[0])return;for(var o=0;o<e.length;o++)n(e[o].getAsFile())}}(t,(function(t){Object(g.b)({fileToUpload:t,folder:e.folder,windowId:S})}))}},Object(m.c)(d.a,{windowId:S,file:e,fileContent:x,isActive:v,canEdit:L,isDragging:$,showViewToggler:t.showViewToggler,showToolbar:t.showToolbar,titleEditor:t.titleEditor,viewType:C,mobileView:t.mobileView,onLayoutUpdate:t.onLayoutUpdate,onReloadContent:function(){P(!1),setTimeout((function(){P(!0)}),100)},onFileEdited:function(t,n){W(t,n)}})))},w=r.a.memo(v,(function(t,n){return!1})),O=function(){return"\n\t.content-different-preview {\n\t\tmax-height: 50vh;\n\t\twidth: 70vw;\n\t\toverflow-y: auto;\n\t\ttext-align: left;\n\t\t.content-different-preview-inner {\n\t\t\tbackground: #e7e7e7;\n\t\t\tpadding: 10px;\n\t\t\tborder-radius: 10px;\n\t\t}\n\t\t.diff-sign {\n\t\t\tfont-weight: bold;\n\t\t}\n\t\t.diff-sign.diff-modified {\n\t\t\tcolor: orange;\n\t\t}\n\t\t.diff-sign.diff-deleted {\n\t\t\tcolor: red;\n\t\t}\n\t\t.diff-sign.diff-added {\n\t\t\tcolor: green;\n\t\t}\n\t}\n\n\t// height 100% everywhere\n\t.window-editor-wrapper-wrapper,\n\t.window-editor-wrapper,\n\t.dual-view-wrapper,\n\t.editor-area,\n\t.preview-area-wrapper,\n\t.preview-area,\n\t.main-editor-wrapper{\n\t\t\theight: 100%;\n\t}\n\n\t.window-editor-wrapper {\n\t\n\t\t\n\n\t\t.content-wrapper {\n\t\t\t\theight:100%;\n\t\t}\n\t\t.note-active-ribbon {\n\t\t\t\theight: 2px;\n\t\t\t\twidth: 100%;\n\t\t}\n\t\t\n\n\t\t.editor-toolbar-dropdown {\n\t\t\tposition: absolute;\n\t\t\ttop: 10px;\n\t\t\tright: 0px;\n\t\t}\n\n\n\n\n\n\t\t\n\n\n\n\t\t// content css modification\n\t\t.dual-view-wrapper {\n\t\t\t\t.file-path-wrapper {\n\t\t\t\t\t\tdisplay:none;\n\t\t\t\t}\n\t\t\t\t\n\n\t\t\t\t//\n\t\t\t\t// ALL\n\t\t\t\t//\n\t\t\t\t&.device-desktop {\n\t\t\t\t\t\t.preview-area-wrapper {\n\t\t\t\t\t\t\t\tmargin-top: 33px;\n\t\t\t\t\t\t\t\t//padding: 5px 5px 5px 5px;\n\t\t\t\t\t\t\t\tbackground: ".concat(f.a.colors.bgPreview,";\n\t\t\t\t\t\t}\n\t\t\t\t\t\t.preview-area {\n\t\t\t\t\t\t\t\t//padding: 10px 10px 10px 10px;\n\t\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t//\n\t\t\t\t// FULL PREVIEW\n\t\t\t\t//\n\t\t\t\t&.device-desktop.view-preview {\n\t\t\t\t\t\t.editor-area {\n\t\t\t\t\t\t\t\twidth: 0%;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t.preview-area-wrapper {\n\t\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t//\n\t\t\t\t// FULL EDITOR\n\t\t\t\t//\n\t\t\t\t&.device-desktop.view-editor {\n\t\t\t\t\t\t.preview-area-wrapper {\n\t\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t.scrolling-bar-wrapper {\n\t\t\t\t\t\ttop: 33px;\n\t\t\t\t}\n\t\t}\n\t}\n")}},136:function(t,n,e){"use strict";e.d(n,"a",(function(){return o})),e.d(n,"b",(function(){return i}));var o=function(t){var n,e="; ".concat(document.cookie).split("; ".concat(t,"="));return 2===e.length?null===(n=e.pop())||void 0===n?void 0:n.split(";").shift():void 0},i=function(t,n,e){var o=new Date;o.setTime(o.getTime()+60*e*60*1e3);var i="expires="+o.toUTCString();document.cookie=t+"="+n+";"+i+";path=/"}},14:function(t,n,e){"use strict";e.d(n,"a",(function(){return o})),e.d(n,"b",(function(){return h})),e.d(n,"c",(function(){return m})),e.d(n,"d",(function(){return v}));var o,i=e(10),c=e(15),a=e(666),r=e(101),l=e(51),s=e(279),u=e.n(s),p=e(11),d=e(29),f=e(17),b="[RIPGREP INSTALL]",g=function(t){var n="rg-".concat(t.os,"-").concat(t.arch);"win"===t.os&&(n+=".exe");var e=-1!==["rg-darwin-arm","rg-darwin-x64","rg-darwin-x64","rg-linux-x64","rg-win-x64.exe"].indexOf(n),o="Tiro Notes requires the tool Ripgrep, which does not seem to be installed on your computer",i="Install Ripgrep",c=function(){},a="rg-install-notif";e&&(o+="<br>Do you want Tiro to download and install it? <br><br> The following version will be downloaded and installed: <br><code>".concat(n,"</code>"),c=function(){var e="".concat("https://github.com/dotgreg/tiro-notes/raw/master/platforms/electron/not-packaged/ripgrep/").concat(n);Object(p.d)((function(o){o.config.get((function(i){var c=Object(d.b)("".concat(f.a.path.configFolder,"/bin/")),r=Object(d.b)("".concat(i.dataFolder,"/").concat(c,"/").concat(n));console.log(c,r),o.ui.notification.emit({id:a,content:"".concat(b," downloading ripgrep..."),options:{hideAfter:-1}}),o.ressource.download(e,c,(function(){var n,cb;o.ui.notification.emit({id:a,content:"".concat(b," updating config..."),options:{hideAfter:-1}}),n=r,cb=function(){o.userSettings.updateSetupJson("rg_path",r,(function(t){o.ui.notification.emit({id:a,content:"".concat(b," finished, restarting tiro notes..."),options:{hideAfter:10}})}),{requiresServerRestart:!0})},"win"!==t.os?Object(p.d)((function(t){var e="chmod 0755 ".concat(n);t.command.exec(e,(function(t){console.log("".concat(b," -> cmd: ").concat(e," : ").concat(t)),cb(t)}))})):cb()}),{fileName:n})}))}))}),e||(o+='\n <br><br>To install it, follow these instructions :<br> <a href="https://github.com/BurntSushi/ripgrep#installation">https://github.com/BurntSushi/ripgrep#installation</a> \n <br> then restart Tiro',i="ok"),Object(p.d)((function(t){t.popup.prompt({title:"Ripgrep install required",text:o,onAccept:c,onRefuse:function(){},acceptLabelButton:i})}))},h={on:function(){},off:function(){}},m=function(){var t=l.a.global.protocol,n=Object(r.b)("backend-port")?":".concat(Object(r.b)("backend-port")):"".concat(l.a.global.port),e="".concat(t).concat(l.a.global.url).concat(n);return Object(r.b)("backend-port").includes(".")&&(e="".concat(t).concat(Object(r.b)("backend-port"))),e},v=function(){return new Promise((function(t,n){if(!o){var e=s?u.a:function(){};o=e(m()),l.a.log.socket&&console.log("[SOCKET] try connecting to ".concat(m(),"...")),(h=O(o)).on("onServerError",(function(t){"NO_RIPGREP_COMMAND_AVAILABLE"===t.status&&Object(p.d)((function(n){g(t.platform)}))})),h.on("connectionSuccess",(function(n){l.a.log.socket&&console.log("[SOCKET] connection successful!, socket.connected :".concat(o.connected),n),n.isRgGood,t({socket:o,ipsServer:n.ipsServer,socketManager:h})}))}}))},w=function(t,n){return["%c [CLIENT SOCKET 2] ".concat(t),"background: #ccc; color: red",n||null]},O=function(t){var n={};return{on:function(e,o){var r=function(t,n){return function(e){var o;l.a.log.socket&&(o=console).log.apply(o,Object(c.a)(w("<== ON ".concat(t," "),Object(i.a)({},e)))),n(e)}}(e,o),s=Object(a.a)(1,1e8);return n[s]={endpoint:e,apiFn:r},t.on(e,r),s},off:function(e){n[e]&&(t.off(n[e].endpoint,n[e].apiFn),delete n[e])},emit:function(n,e){var o;l.a.log.socket&&(o=console).log.apply(o,Object(c.a)(w("==> EMIT ".concat(n," "),Object(i.a)({},e)))),t.emit(n,e)}}}},153:function(t,n,e){"use strict";e.d(n,"a",(function(){return d})),e.d(n,"c",(function(){return f})),e.d(n,"b",(function(){return g}));var o=e(15),i=e(30),c=e(11),a=e(13),r=e(28),l=e(9),s=e(45),u=e(128),p=e(72),d=Object(u.a)((function(t,n){return b(t,n)})),f=function(t,n){return Object(s.a)({file:t,windowId:n,pattern:i.a.externalLink3,replacement:function(t){var n=t.matchs,e=document.createElement("span");return e.innerHTML=d(n),e}})},b=function(t,n){var e=[];e=Array.isArray(t)?t:Object(o.a)(t.matchAll(i.a.externalLink3))[0];var l=document.createElement("span"),s=e[0].slice(0,-1),u=Object(p.b)(s),d=function(t,cb){var n=t.dataset.link;Object(c.d)((function(t){t.ressource.fetchUrlArticle(n,(function(n){var e=encodeURIComponent(n.html);t.ui.floatingPanel.create({type:"ctag",ctagConfig:{tagName:"web",content:e}}),cb(n)}))}))},f="";null!==n&&void 0!==n&&n.addLineJump&&(f="\n");var b=r.d,g='<span title="Open link in detached window"\nonclick="'.concat(Object(r.c)("open-win-link",(function(t){if(t){var n=t.dataset.link;window.open(n,"popup-preview-link","width=800,height=1000")}})),'"\nclass="link-action link-openwindow" data-link="').concat(s,'">').concat(b("up-right-from-square"),"</span>"),h='<span\nonclick="'.concat(Object(r.c)("fetch-link",(function(t){t&&d(t,(function(){}))})),'"\ntitle="Display url content" class="link-fetcharticle link-action" data-link="').concat(s,'">').concat(b("file-lines"),"</span>"),m='<span\nonclick="'.concat(Object(r.c)("audio-link",(function(t){t&&d(t,(function(t){t.text&&Object(c.d)((function(n){n.ui.textToSpeechPopup.open(t.text)}))}))})),'"\ntitle="Text to speech url content" class="link-audio link-action" data-link="').concat(s,'">').concat(b("volume-high"),"</span>"),v='<span\n\t\tonclick="'.concat(Object(r.c)("detach-link",(function(t){if(t){var n=t.dataset.link;Object(c.d)((function(t){t.ui.floatingPanel.create({type:"ctag",ctagConfig:{tagName:"web",content:n}})}))}})),'"\n\t\ttitle="Detach link in floating panel" class="link-detach link-action" data-link="').concat(s,'">').concat(b("window-restore"),"</span>"),w='<span class="link-action-more"><span class="icon-more">'.concat(b("ellipsis"),'</span><span class="link-action-wrapper">').concat(h," ").concat(m," ").concat(v," ").concat(g," </span></span>"),O='<span class="'.concat(Object(a.e)()?"mobile-version":"",' link-mdpreview-wrapper"><a href="').concat(s,'" class="link-mdpreview" title="').concat(s,'" target="_blank" rel="noreferrer">').concat(b("link")).concat(u,"</a>").concat(w).concat('<span class="cm-hover-popup cm-hover-popup"></span>',"</span>").concat(f);return l.innerHTML="".concat(O),l.outerHTML},g=function(t){var n=parseFloat(t.get("ui_editor_links_preview_zoom")),e=t.get("beta_floating_windows");return isNaN(n)&&(n=1),isNaN(e)&&(e=!1),"\n.link-fetch-preview-wrapper {\n\t\tbackground: grey;\n}\n// .preview-area-wrapper .link-mdpreview-wrapper,\n// .preview-area .link-mdpreview-wrapper {\n// \tdisplay: inline-block;\n// }\n\n".concat(e?"":".link-detach {display:none;}","\n\n.link-mdpreview-wrapper {\n\t\tposition: relative;\n}\n.link-mdpreview-wrapper .link-action {\n}\n.link-deco {\n\t\tpadding-right:2px;\n}\n.link-action-more {\n\t\tposition: relative;\n}\n.link-action-wrapper {\n\t\tdisplay:flex;\n\t\tposition: absolute;\n\t\tright: -30px;\n\t\ttop: -10px;\n\t\topacity: 0;\n\t\ttransition: 0.2s all;\n\t\tpointer-events: none;\n\t\tbackground: white;\n\t\tbox-shadow: 0px 0px 5px rgba(0,0,0,0.1);\n\t\tpadding: 7px;\n\t\tz-index: 10000;\n}\n.link-action-wrapper span {\n\tmargin: 0px 2px;\n}\n\n\n// mobile version\n.mobile-version .link-action-wrapper {\n\t\tright: 10px ;\n}\n.mobile-version .link-action {\n\t\ttransform: scale(1.3);\n\t\tpadding: 7px; \n}\n.link-action-wrapper .link-action {\n\t\tpadding-left:4px;\n}\n\n.link-action-more {\n\t\tmargin-right: 6px;\n\t\topacity: 0.3;\n}\n.link-action-more .icon-more {\n\t\tposition:relative;\n\t\ttop:1px;\n}\n.link-action-more .icon-more svg {\n\t\ttransform: scale(0.7);\n}\n.link-action-more:hover {\n\t\topacity: 1;\n}\n.link-action-more:hover .link-action-wrapper {\n\t\topacity: 1;\n\t\tpointer-events:all;\n}\n\n.link-action \t\tsvg,\n.link-action span,\n.link-action div {\n\t\tpointer-events:none;\n}\n\n.link-action {\n\t\topacity: 0.5;\n\t\tcursor: pointer;\n}\n.cm-hover-popup {\n}\n.cm-hover-popup .resource-link-ctag {\n\t\tborder-radius: 7px;\n\t\toverflow:hidden;\n\t\tbox-shadow: 0 0 4px rgba(0,0,0,0.3);\n}\n\n// height size iframe here\n.cm-hover-popup .resource-link-ctag .iframe-view-wrapper.not-fullscreen {\n\t\n\theight: 400px!important;\n}\n\n.cm-hover-popup .resource-link-ctag .iframe-view-wrapper iframe {\n\t\twidth: ").concat(100/n,"%!important;\n\t\theight: ").concat(100/n,"!important;\n\t\tmax-height: ").concat(100/n,"%!important;\n\t\ttransform-origin:top left;\n\t\ttransform: scale(").concat(n,");\n\t\tmargin-left: 15px;\n}\n\n.link-mdpreview-wrapper {\n\n}\n.link-mdpreview {\n\t\topacity: 0.6;\n\t\ttransition: 0.2s all;\n\t\t&:hover {\n\t\t\t\topacity: 1;\n\t\t}\n\t\tline-height: 20px;\n\t\ttext-decoration: none;\n\t\tcolor: ").concat(l.a.colors.main,";\n\t\t// border: solid 2px ").concat(l.a.colors.main,";\n\t\tpadding: 0px 2px 0px 0px;\n\t\tcursor: pointer;\n\t\tborder-radius: 5px;\n\t\tsvg {\n\t\t\t\tcolor: ").concat(l.a.colors.main,";\n\t\t}\n}\n")}},155:function(t,n,e){"use strict";e.d(n,"a",(function(){return h})),e.d(n,"b",(function(){return m}));var o=e(15),i=e(5),c=e(10),a=e(38),r=e(55),l=e(25),s=e(122),u=e(211),p=e(60),d=e(118),f=e(11),b=e(13),g=e(0),h=function(t){var n=Object(c.a)({},t),e=n.w,o=n.h,i=n.x,r=n.y,l=n.file;o||(o=d.c.rows),e||(e=d.c.cols),i||(i=0),r||(r=0);var s=Object(a.a)();return{layout:{i:s,x:i,y:r,w:e,h:o,minH:1,maxH:2,forceRender:0},content:{i:s,active:!1,file:l,view:"both"}}},m=function(){var t=Object(g.useState)([]),n=Object(i.a)(t,2),e=n[0],c=n[1],a=Object(p.a)("tabs",[],{history:!1,debouncedSave:5e3}),u=Object(i.a)(a,3),d=u[0],h=u[1],m=u[2],k=Object(p.a)("tabs-mobile",[],{history:!1,debouncedSave:5e3}),y=Object(i.a)(k,3),_=y[0],C=y[1],E=y[2],S=Object(g.useRef)([]),T=function(t,cb){S.current=t,c(S.current),"mobile"!==Object(b.a)()&&h(S.current),"mobile"===Object(b.a)()&&C(S.current)},I=function(){m(),E()};Object(g.useEffect)((function(){I()}),[]),Object(g.useEffect)((function(){S.current=e}),[e]),Object(g.useEffect)((function(){"mobile"!==Object(b.a)()&&c(d)}),[d]),Object(g.useEffect)((function(){"mobile"===Object(b.a)()&&c(_)}),[_]);var N=function(t){var n=x({fullWindowFile:t});if(n){var e=[].concat(Object(o.a)(S.current),[n]),i=j(n.id,e);T(i)}},P=function(t){var n=[],e=Object(r.a)(S.current);Object(l.a)(e,(function(e,o){e.id!==t&&n.push(e)})),T(n)},R=function(t){if(!t){var n=Object(r.a)(S.current),e=O(n);if(!Object(s.a)(e))return;t=n[e]}if(t.grid.layout[0]){var o=t.grid,i={layout:o.layout[0],content:o.content[0]};return Object(l.a)(o.content,(function(t,n){t.active&&(i={layout:o.layout[n],content:o.content[n]})})),i}};return{tabs:e,updateTab:function(t,n,e){if("add"===t)Object(f.e)().then((function(t){N(t.ui.browser.files.active.get)}));else if("close"===t){if(!n)return;P(n.id)}else if("rename"===t){if(!n)return;if(e.length>15)return;var o=Object(r.a)(S.current);Object(l.a)(o,(function(t){t.id===n.id&&(t.name=e,t.manualName=!0)})),T(o)}else if("activate"===t){if(!n)return;var i=j(n.id,S.current),c=v(i);if(T(c),"desktop"!==Object(b.a)()){var a,s=null===(a=R(n))||void 0===a?void 0:a.content.file;if(!s)return;Object(f.d)((function(t){t.ui.browser.goTo(s.folder,s.name)}))}}},refreshTabsFromBackend:I,updateActiveTabGrid:function(t,cb){var n=Object(r.a)(S.current),e=O(n);if(Object(s.a)(e)){n[e].grid=Object.assign(n[e].grid,t);var o=n[e].refresh;n[e].refresh=o?o+1:1,T(n)}},refreshWindowGrid:function(){var t=v(S.current);T(t)},tabsApi:{get:function(){return S.current},close:P,openInNewTab:N,reorder:function(t,n){var e=Object(r.a)(S.current),o=e[t];e.splice(t,1),e.splice(n,0,o),T(e)},active:{get:function(){var t=null;return Object(l.a)(S.current,(function(n){n.active&&(t=n)})),t}}},windowsApi:{close:function(t){var n=Object(r.a)(S.current);Object(l.a)(t,(function(t){Object(l.a)(n,(function(n,e){for(var o=0;o<n.grid.content.length;o++){var i=n.grid.content[o],c=n.grid.layout[o];i.i===t&&n.grid.content.splice(o,1),c.i===t&&n.grid.layout.splice(o,1)}}))}));var e=v(n);T(e)},active:{get:R,setContent:function(t){if(t){var n=Object(r.a)(S.current),e=O(n);if(Object(s.a)(e)){var o=n[e],i=o.grid.content;if(!(i.length<1)){var c=0;Object(l.a)(i,(function(t,n){!0===t.active&&(c=n)})),i[c].file=Object(r.a)(t),o.manualName||(o.name=w(t.name));var a=v(n);T(a)}}}}},updateWindows:function(t,n){var e=Object(r.a)(S.current);Object(l.a)(t,(function(t){Object(l.a)(e,(function(e,o){Object(l.a)(e.grid.content,(function(e){e.i===t&&(e.file=n)}))}))}));var o=v(e);T(o)},getIdsFromFile:function(t){var n=[];return Object(l.a)(S.current,(function(e){Object(l.a)(e.grid.content,(function(e){e.file&&e.file.path===t&&n.push(e.i)}))})),n}}}},v=function(t){var n=Object(r.a)(t);return Object(l.a)(n,(function(t){t.refresh=Object(u.a)(t.refresh)})),n},w=function(t){return t.length>15?"".concat(t.substring(0,13),".."):t},O=function(t){var n=void 0;return Object(l.a)(t,(function(t,e){t.active&&(n=e)})),n},j=function(t,n){var e=Object(r.a)(n);return Object(l.a)(e,(function(n){n.refresh=Object(s.a)(n.refresh)?n.refresh++:1,n.id===t?n.active=!0:n.active=!1})),e},x=function(t){if(t.copiedTab){var n=Object(r.a)(t.copiedTab);return n.id=Object(a.a)(),n.name=k(t.copiedTab.name),n}if(t.fullWindowFile){var e=h({file:t.fullWindowFile});return{id:Object(a.a)(),name:w(t.fullWindowFile.name),active:!0,grid:{layout:[e.layout],content:[e.content]}}}},k=function(t){var n=t,e=n[n.length-1];return isNaN(parseInt(e))?n+=" 1":(n=n.slice(0,-1),n+="".concat(parseInt(e)+1)),n}},159:function(t,n,e){"use strict";e.d(n,"c",(function(){return Z})),e.d(n,"a",(function(){return X})),e.d(n,"b",(function(){return Q}));var o=e(23),i=e(15),c=e(5),a=e(0),r=e.n(a),l=e(13),s=e(237),u=e(54),p=e(68),d="[TEXT MANIP ACTION]",f=function(t){var n=Object(a.useRef)(0),e=t.editorRef,o=t.editorRef,i=t.editorRef,c=function(){var c;if("codemirror"===t.editorType){var a=u.a.getCurrentLineInfos(e.current);if(!a)return null;c=a,n.current=a.currentPosition}else if("monaco-textarea"===t.editorType){var r;if("desktop"===t.deviceType)c=null===(r=o.current)||void 0===r?void 0:r.getCurrentLineInfos(),n.current=c&&c.monacoPosition?c.monacoPosition:0;else c=i.current?Object(p.c)(i.current):null,n.current=c&&c.currentPosition?c.currentPosition:0}return c},r=function(c){var a=n.current+c;if("codemirror"===t.editorType)u.a.updateCursor(e.current,a,!0);else if(Object(l.c)("desktop")){var r;null===(r=o.current)||void 0===r||r.editor.setPosition(a)}else{var s=i.current;if(!s)return;s.focus(),setTimeout((function(){s&&(s.selectionStart=a,s.selectionEnd=a)}))}};return{getLineTextInfos:c,resetCursorPosition:r,applyTextModifAction:function(t,n){var e=c();return e?(console.log(d,"applying =>",t,n),Object(p.f)(t,e,(function(t){console.log(d,"applying a decal of cursor of :",t),r(t)}),n)):null}}},b=e(121),g=function(t,n){var e=f({editorType:"monaco-textarea",deviceType:"mobile",editorRef:n.mobileTextarea}),o=e.getLineTextInfos,i=e.resetCursorPosition,r=function(t){var n=Object(a.useState)(0),e=Object(c.a)(n,2),o=e[0],i=e[1];return{saveYTextarea:function(n){var e=t.current?t.current.scrollTop:0;i(n||e)},resetYTextarea:function(){t.current&&(console.log("resetYTextarea",o),t.current.scrollTop=o)}}}(n.mobileTextarea),l=r.saveYTextarea,s=r.resetYTextarea,u=Object(a.useState)(!1),d=Object(c.a)(u,2),g=d[0],h=d[1];Object(b.a)((function(){h(!1)}),500);return{onTextareaChange:function(e){console.log("onTextareaChange");var c=e.target.value,a=c[e.target.selectionStart-1]&&c[e.target.selectionStart-1].charCodeAt(0);if(c.length>t.length){var r=o();if(!r)return;c=Object(p.g)(r,a,(function(t){setTimeout((function(){i(t),s()}))}))}n.onMobileNoteEdition(c)},onTextareaScroll:function(t){if(!g){var n=t.target.scrollTop;l(n),console.log("onTextareaScroll")}}}},h="",m=e(210),v=e(116),w=e(1),O=e(14),j=e(66),x=e(9),k=e(19),y=e(226),_=e(42),C=e(225),E=e(219),S=e(182),T=e(220),I=e(233),N=e(11),P=e(215),R=e(162),A=e(25),F=e(78),L=function(t,n){var e=".window-id-".concat(t," .preview-area-wrapper"),o=document.querySelector(e),i="print-wrapper";if(o){!function(){var t=document.querySelectorAll(".".concat(i));Object(A.a)(t,(function(t){t.classList.remove(i)}))}();var c=Object(j.a)(new Date(n.modified||0)),a=Object(j.a)(new Date(n.modified||0)),r="\n<head>\n\t<title>".concat(n.name,' </title>\n\t\n</head>\n<html>\n\t<body>\n\t\t\n\t\t<div class="simple-css-print-wrapper">\n\t\t\t<div class="hide-print">\n\t\t\t\t<bm> Export options </bm>\n\t\t\t\t<button onclick="window.print()">print</button>\n\t\t\t\t<button onclick="window.print()">export to pdf</button>\n\t\t\t\t<button onclick="window.alert(\'CTRL+ S then select *complete webpage* if available\')">export to html</button>\n\t\t\t</div>\n\t\t\t\t<div class="file-infos-wrapper">\n\t\t\t\t\tNote Name : ').concat(n.name,"<br>\n\t\t\t\t\tNote Path : ").concat(n.path,"<br>\n\t\t\t\t\tCreated : ").concat(c,"<br>\n\t\t\t\t\tEdited : ").concat(a,"<br>\n\t\t\t\t</div>\n\t\t\t\t").concat(o.innerHTML,"\n\t\t\t</div>\n\t\t\t<style>").concat(Object(F.c)({w:".simple-css-print-wrapper",pl:".preview-link",r:".resource-link-icon"}),"</style>\n\t\t\t<style>").concat(M(),'</style>\n\n<script>\n\tconsole.log("hello world")\n<\/script>\n\n\n\t</body>\n</html>\n\t\t\t\t'),l=window.open("","print-popup","width=800,height=1000");null===l||void 0===l||l.document.write(r)}},M=function(){return"\n@page {\nmargin: 0;\n}\n@media print {\n.hide-print {\ndisplay: none;\n\n}\n}\n\n* {\n\t-webkit-print-color-adjust: exact; \n\tprint-color-adjust: exact; \n}\n\n\t.file-path-wrapper {\n\t\tdisplay: none;\n\t}\n\th1.title.big-title {\n\t\tdisplay: none;\n\t}\n\t.file-infos-wrapper {\n\t\tdisplay: none;\n\t\tbackground: #eeeeee;\n\t\tpadding: 10px;\n\t\tmargin: 10px;\n\t}\n\n\t.simple-css-print-wrapper {\n\t\tmargin: 20px;\n\t\twidth: 90%;\n\t}\n\t.simple-css-wrapper {\n\t\tfont-size: 12px;\n\t}\n\n\ttable {\n\t\tfont-size: 12px!important;\n\t}\n\timg {\n\t\t// max-width: 300px!important;\n\t\t// max-height: 500px!important;\n\t\tmax-width: 100%;\n\t\tmax-height: 500px;\n\t}\n\t.block-tag {\n\t\t\tdisplay: none;\n\t}\n"},D=e(183),z=e(29),B=e(17),H=e(218),U=e(28),W=function(t){if(t){var n=t.dataset.format,e=t.dataset.path;if(n&&e){var o=Object(z.d)(e);Object(N.d)((function(t){Object(N.d)((function(t){t.ui.notification.emit({content:"[EXPORT] converting...",id:"export",options:{hideAfter:-1}})})),t.config.get((function(e){var i="/".concat(B.a.path.configFolder,"/").concat(B.a.path.cacheFolder,"/pandoc");t.folders.create(i,(function(c){var a="";"dzslides"===n&&(a="--self-contained"),"slideous"===n&&(a="--self-contained"),"revealjs"===n&&(a="--self-contained"),"beamer"===n&&(a="--self-contained");var r=n;"dzslides"===n&&(r="html"),"slideous"===n&&(r="html"),"revealjs"===n&&(r="html"),"latex"===n&&(r="tex"),"gfm"===n&&(r="md"),"latex-pdf"===n&&(r="pdf"),"beamer"===n&&(r="pdf");var l="".concat(o.name),s="".concat(l,".").concat(r),u="".concat(e.dataFolder,"/"),p=Object(z.b)("".concat(u,"/").concat(o.folder)),d=Object(z.b)("./".concat(o.name)),f=Object(z.b)("".concat(u,"/").concat(i)),b=Object(z.b)("".concat(f,"/").concat(s)),g=Object(z.b)("/".concat(B.a.path.configFolder,"/").concat(B.a.path.cacheFolder,"/pandoc/").concat(s)),h='cd "'.concat(p,'" && pandoc --output="').concat(b,'" --verbose ').concat(function(t,n){var e=t.userSettings.get("export_pandoc_cli_options").split("\n")||[],o={};return Object(A.a)(e,(function(t){var n=t.split("|");2===n.length&&(o[n[0].trim()]=n[1].trim())})),console.log(o,e),o[n]||""}(t,n)," ").concat(a," --to=").concat(n,' "').concat(d,'" ');!1===h.includes("--from=")&&(h=h.replace("--to=","--from=markdown --to="));var m=h;"latex-pdf"===n&&(m='cd "'.concat(p,'" && pdflatex -halt-on-error -output-directory="').concat(f,'" -jobname="').concat(l,'" "').concat(d,'" '));var v=function(n){var e=""===n.stderr?n.stdout:n.stderr;console.error("[CONVERT ERROR]:",n),t.ui.notification.emit({content:'[EXPORT] Error <br/> "'.concat(e," <br/><br/> ").concat(n.shortMessage,'"'),id:"export",options:{hideAfter:-1}})};t.command.exec("pkill -9 pandoc",(function(n){t.command.exec(m,(function(t){var n={failed:!1,stderr:null,shortMessage:null};try{n=JSON.parse(t)||{failed:!1}}catch(o){v(n)}if(n.failed)v(n);else{var e=Object(H.a)(g);!function(t,n){var e=document.createElement("a");e.setAttribute("download",t),e.setAttribute("href",n),e.setAttribute("target","_blank"),Object(N.d)((function(t){t.ui.notification.emit({content:"[EXPORT] done",id:"export",options:{hideAfter:3}})})),e.click()}(s,e)}}))}))}))}))}))}}},q=e(170),V=e(376),J=e(122),K=e(167),G=e(35),Y=e(24),$=function(t){var n,e=Object(a.useState)(""),o=Object(c.a)(e,2),d=o[0],b=o[1],x=Object(a.useRef)(null),F=!0;!1===t.canEdit&&(F=!1),!1===t.isConnected&&(F=!1);var M=!0;!1===t.showViewToggler&&(M=!1);var B=!0;!1===t.showToolbar&&(B=!1);var H=!Object(q.a)(t.titleEditor)&&!Object(V.a)(t.titleEditor)||t.titleEditor,Y=Object(a.useRef)(t.file);Object(a.useEffect)((function(){Y.current=t.file}),[t.file.path]);var $=function(t){var n=Object(a.useRef)(!1),e=Object(a.useRef)(!1);Object(a.useEffect)((function(){e.current=t.canEdit}),[t.canEdit]),Object(a.useEffect)((function(){return n.current=!1,t.onEditorDidMount&&t.onEditorDidMount(),function(){t.onEditorWillUnmount&&(o(),t.onEditorWillUnmount())}}),[t.file.path]),Object(a.useEffect)((function(){o()}),[t.file.path]),Object(a.useEffect)((function(){t.onNoteContentDidLoad&&t.onNoteContentDidLoad()}),[t.fileContent,t.file.path]);var o=function(){""!==h&&t.onNoteLeaving&&t.onNoteLeaving(n.current,h),h=t.file.path};return{triggerNoteEdition:function(e){n.current?t.onNoteEdition&&t.onNoteEdition(e,!1):t.onNoteEdition&&t.onNoteEdition(e,!0),n.current=!0}}}({file:t.file,fileContent:t.fileContent,canEdit:F,onEditorDidMount:function(){b(t.fileContent)},onEditorWillUnmount:function(){},onNoteContentDidLoad:function(){O.a&&b(t.fileContent)},onNoteEdition:function(n,e){var o=Y.current;b(n),e&&Object(N.d)((function(n){n.history.save(o.path,t.fileContent,"enter")})),t.onFileEdited(o.path,n)},onNoteLeaving:function(t,n){}}).triggerNoteEdition,Z=Object(a.useRef)(null),X=g(d,{mobileTextarea:Z,onMobileNoteEdition:$}),Q=(X.onTextareaChange,X.onTextareaScroll,Object(a.useRef)(null)),tt="desktop"!==Object(l.a)()?Z:x;"codemirror"===t.editorType&&(tt=Q);var nt=f({editorType:t.editorType,deviceType:Object(l.a)(),editorRef:tt}).applyTextModifAction,et=function(t,n,e){var o=nt("insertAt",{textToInsert:t,insertPosition:n,replaceText:e});o&&($(o),Tt())},ot=function(t){var n=Object(a.useState)(null),e=Object(c.a)(n,2),o=e[0],i=e[1],r=Object(a.useState)(!1),l=Object(c.a)(r,2),s=l[0],u=l[1],p=Object(a.useState)(!1),d=Object(c.a)(p,2),f=d[0],b=d[1],g=Object(a.useState)(null),h=Object(c.a)(g,2),O=h[0],j=h[1],x=function(n){var e=t.fileContent,o=Object(v.c)(e,n);if("failure"===o.status)j(null);else{console.log("encryption done",o),u(!1);var i=o.cipher;t.onTextEncrypted(i)}},k=function(n){var e=t.fileContent,o=Object(v.a)(e,n);if("failure"===o.status)j(null),alert("wrong password");else{b(!0),u(!0),console.log("decryption done",o);var i=o.plaintext;t.onTextDecrypted(i)}};return{APasswordPopup:Object(w.c)(m.a,{onClose:function(){i(null)},onSubmit:function(t){var n=o;i(null),j(t),"toEncrypt"===n&&x(t),"toDecrypt"===n&&k(t)}}),askForPassword:o,decryptButtonConfig:{title:"decrypt text",icon:"faUnlock",action:function(){O?k(O):i("toDecrypt")}},encryptButtonConfig:{title:"encrypt text",icon:"faLock",action:function(){O?x(O):i("toEncrypt")}},ifEncryptOnLeave:function(cb){if(s&&O){console.log("[EVENTS EDITOR] shouldEncryptOnLeave");var n=Object(v.c)(t.fileContent,O);n.cipher&&cb(n.cipher)}j(null),b(!1)},noHistoryBackupWhenDecrypted:f}}({fileContent:d,onTextEncrypted:function(n){$(n),Tt(),Object(N.d)((function(e){e.history.save(t.file.path,n,"int")}))},onTextDecrypted:function(t){$(t),Tt()}}),it=ot.APasswordPopup,ct=ot.askForPassword,at=ot.decryptButtonConfig,rt=ot.encryptButtonConfig,lt=(ot.ifEncryptOnLeave,ot.noHistoryBackupWhenDecrypted,Object(a.useContext)(I.a)),st=Object(a.useState)(-1),ut=Object(c.a)(st,2),pt=ut[0],dt=ut[1],ft=function(n,e){return{title:"",class:"upload-button-wrapper",action:function(){},customHtml:Object(w.c)(S.a,{file:t.file,windowId:t.windowId,type:n,label:e})}},bt=[{title:"Reload content",icon:"faSync",action:function(){kt.current=kt.current+1,t.onReloadContent(kt.current)}},G.d.curr.beta_floating_windows?{icon:"faWindowRestore",title:"Detach Window",action:function(){Object(N.d)((function(n){n.ui.floatingPanel.create({type:"file",file:t.file,view:t.viewType})}))}}:{}].concat(Object(i.a)(function(){var t=[ft("all","Upload files")];return"desktop"!==Object(l.a)()&&(t.push(ft("image","Upload Gallery")),t.push(ft("camera","Capture")),t.push(ft("microphone","Record"))),t}()),[{title:"Search",icon:"faSearch",action:function(){Object(N.d)((function(t){t.ui.note.editorAction.dispatch({type:"searchWord",searchWordString:" "})}))}},Object(v.d)(d)?at:rt,{title:"Export",icon:"faFileDownload",action:function(){var n;n=t.file,Object(N.d)((function(t){t.popup.show('\n <div id="export-popup-wrapper">\n <div class="buttons-list"> \n <button onclick="'.concat(Object(U.c)("export-note-to",W),'" data-format="docx" data-path="').concat(n.path,'">docx</button>\n <button onclick="').concat(Object(U.c)("export-note-to",W),'" data-format="odt " data-path="').concat(n.path,'">odt</button>\n <button onclick="').concat(Object(U.c)("export-note-to",W),'" data-format="pdf" data-path="').concat(n.path,'">pdf</button>\n \n <button onclick="').concat(Object(U.c)("export-note-to",W),'" data-format="gfm" data-path="').concat(n.path,'">markdown</button>\n <button onclick="').concat(Object(U.c)("export-note-to",W),'" data-format="epub" data-path="').concat(n.path,'">epub</button>\n <button onclick="').concat(Object(U.c)("export-note-to",W),'" data-format="rtf" data-path="').concat(n.path,'">rtf</button>\n </div>\n <br/>\n <div class="buttons-list"> \n Latex:\n <br/>\n <button onclick="').concat(Object(U.c)("export-note-to",W),'" data-format="latex" data-path="').concat(n.path,'">latex (.tex)</button>\n <button onclick="').concat(Object(U.c)("export-note-to",W),'" data-format="latex-pdf" data-path="').concat(n.path,'">latex (.pdf)</button>\n \n </div>\n <br/>\n <div class="buttons-list"> \n Slides: \n <br/>\n <button onclick="').concat(Object(U.c)("export-note-to",W),'" data-format="pptx" data-path="').concat(n.path,'">pptx</button>\n <button onclick="').concat(Object(U.c)("export-note-to",W),'" data-format="beamer" data-path="').concat(n.path,'">beamer</button>\n <br/>\n <br/>\n HTML Slides: <br/>\n <button onclick="').concat(Object(U.c)("export-note-to",W),'" data-format="revealjs" data-path="').concat(n.path,'">revealjs</button>\n <button onclick="').concat(Object(U.c)("export-note-to",W),'" data-format="dzslides" data-path="').concat(n.path,'">dzslides</button>\n <button onclick="').concat(Object(U.c)("export-note-to",W),'" data-format="slideous" data-path="').concat(n.path,'">slideous</button>\n \n </div>\n <br/>\n <br/>\n <div class="advice"> \n Export requires extra install, please check settings > export.\n </div>\n </div>\n '),"Export Note to :",(function(t){console.log(t)}))}))}},{title:"Print",icon:"faPrint",action:function(){"editor"===(t.viewType||"editor")?(Dt("both"),setTimeout((function(){L(t.windowId,t.file),setTimeout((function(){Dt("editor")}))}),100)):L(t.windowId,t.file)}},{title:k.a.editorBar.explanation.history,icon:"faHistory",action:function(){vt(!mt)}},{title:k.a.editorBar.tts,icon:"faCommentDots",action:function(){Object(N.d)((function(n){n.ui.textToSpeechPopup.open(d,{id:t.file.name})}))}},{title:"Delete note",class:"delete",icon:"faTrash",action:function(){lt.file.onFileDelete(t.file)}}]),gt=Object(a.useState)(!1),ht=Object(c.a)(gt,2),mt=ht[0],vt=ht[1],wt=Object(a.useRef)(null),Ot=wt.current,jt=700;Ot&&(jt=Ot.clientHeight/1.3),"mobile"===Object(l.a)()&&(jt=window.innerHeight);var xt=Object(a.useRef)(null);Object(a.useEffect)((function(){Tt()}),[t.fileContent,t.file.path,t.windowId]);var kt=Object(a.useRef)(0),yt=Object(a.useRef)(0),_t=Object(a.useState)(0),Ct=Object(c.a)(_t,2),Et=Ct[0],St=Ct[1],Tt=function(){yt.current=yt.current+1,St(yt.current)},It=Object(a.useState)(!1),Nt=Object(c.a)(It,2),Pt=Nt[0],Rt=Nt[1],At=Object(a.useState)(!1),Ft=Object(c.a)(At,2),Lt=Ft[0],Mt=Ft[1];Object(a.useEffect)((function(){var t=d.length>3e10&&"desktop"!==Object(l.a)();Rt(t)}),[d,t.viewType]),Object(a.useEffect)((function(){var n=d.length>3e9&&"desktop"!==Object(l.a)();Rt(n),Tt();var e="desktop"===Object(l.a)()&&"preview"===t.viewType||"desktop"!==Object(l.a)()&&"preview"===t.mobileView;Mt(e);var o=t.file.path;setTimeout((function(){o===t.file.path&&Tt()}),100)}),[t.viewType,t.mobileView]);var Dt=function(n){t.onLayoutUpdate("windowViewChange",{view:n})},zt=Object(a.useState)(-1),Bt=Object(c.a)(zt,2),Ht=Bt[0],Ut=Bt[1];Object(a.useEffect)((function(){var n=t.editorAction;if(n&&(console.log("[EDITOR ACTION] action ".concat(n.type," triggered on ").concat(n.windowId)),("mobile"===Object(l.a)()||"active"!==n.windowId||t.isActive)&&("mobile"===Object(l.a)()||"active"===n.windowId||n.windowId===t.windowId))){if("lineJump"===n.type){var e=0;if(n.lineJumpNb&&(e=n.lineJumpNb),n.lineJumpString){var o=(null===n||void 0===n?void 0:n.lineJumpString)||"",i=t.fileContent.split("\n");Object(A.a)(i,(function(t,n){t.includes(o)&&(e=n+3)}))}Ut(e),setTimeout((function(){Ut(-1)}),100)}if("insertText"===n.type&&n.insertText&&n.insertPos&&et(n.insertText,n.insertPos,!1),"replaceText"===n.type&&n.replaceText&&n.replacePos){et(n.replaceText,n.replacePos,!0);var c=Q.current;if(!c)return;if(!Object(J.a)(n.replacePos))return;u.a.updateCursor(c,n.replacePos,!0)}if("searchWord"===n.type&&n.searchWordString){var a=Q.current;if(!a)return;u.a.searchWord(a,n.searchWordString,n.searchReplacementString,!0)}if("setSelection"===n.type&&n.selection){var r=Q.current;if(!r)return;u.a.setSelection(r,n.selection)}if("undo"===n.type){var s=Q.current;if(!s)return;u.a.undo(s.view)}if("redo"===n.type){var p=Q.current;if(console.log(p,p.view),!p)return;u.a.redo(p.view)}"uploadProgress"===n.type&&dt(n.uploadProgress||-1)}}),[t.editorAction,t.windowId]);var Wt=function(){Object(N.d)((function(n){var e;null===(e=n.lastNotesApi)||void 0===e||e.addToHistory(t.file,!1)}))},qt=Object(a.useState)({x:0,y:0,from:0,to:0,fromPx:0,toPx:0}),Vt=Object(c.a)(qt,2),Jt=Vt[0],Kt=Vt[1],Gt=d.substring(Jt.from,Jt.to),Yt=".window-id-".concat(t.windowId),$t=(null===(n=document.querySelector(Yt))||void 0===n?void 0:n.getBoundingClientRect().top)||0,Zt=(Jt.y,"desktop"===Object(l.a)()?40:10),Xt="desktop"===Object(l.a)()?0:10;return Object(w.c)("div",{className:"editor-area",ref:wt},Object(w.c)("div",{className:"infos-editor-wrapper ".concat(H?"with-title-editor":"no-title-editor")},(!0===H||"disabled"===H)&&Object(w.c)(r.a.Fragment,null,Object(w.c)("div",{className:"file-path-wrapper"},t.file.path.replace("/".concat(t.file.name),"")),Object(w.c)(s.a,{title:t.file.name.replace(".md",""),enabled:!0===H,onEdited:function(n,e){t.onTitleEditedHook&&t.onTitleEditedHook();var o="".concat(t.file.folder).concat(n,".md"),i="".concat(t.file.folder).concat(e,".md");lt.file.onTitleUpdate(o,i);Object(z.d)(i);Tt()}})),B&&Object(w.c)("div",{className:"toolbar-and-dates-wrapper"},Object(w.c)("div",{className:"editor-toolbar-dropdown"},Object(w.c)(E.a,{hover:!0,dir:"right",maxHeight:jt,onMouseEnter:function(n){t.onLayoutUpdate("windowActiveStatus")}},Object(w.c)(r.a.Fragment,null,M&&Object(w.c)("div",{className:"view-toggler-wrapper"},"mobile"!==Object(l.a)()&&Object(w.c)(_.a,{class:"editor-view-toolbar",size:.8,buttons:[{title:"Editor",icon:"custom_icons/view-3.svg",action:function(){Dt("editor")}},{title:"Editor with minimap",icon:"custom_icons/view-4.svg",action:function(){Dt("editor-with-map")}},{title:"Dual view",icon:"custom_icons/view-1.svg",action:function(){Dt("both")}},{title:"Render view",icon:"custom_icons/view-2.svg",action:function(){Dt("preview")}}]})),Object(w.c)("div",{className:"toolbar-wrapper"},Object(w.c)(_.a,{class:"editor-main-toolbar",design:"vertical",size:1,buttons:bt})),Object(w.c)("div",{className:"separation-bar"}),Object(w.c)("div",{className:"note-id-wrapper"},Object(w.c)("h4",null,"Note Link"),Object(w.c)("div",{className:"note-id-form"},Object(w.c)("input",{type:"text",ref:xt,onClick:function(t){var n=t.target;n.setSelectionRange(0,n.value.length)},value:Object(D.a)(t.file),readOnly:!0}),Object(w.c)(_.a,{class:"note-id-toolbar",size:1,buttons:[{title:"Copy note ID",icon:"faClipboard",action:function(){var t=xt.current;t&&Object(P.a)(t)}}]}))),Object(w.c)("div",{className:"dates-wrapper"},Object(w.c)("div",{className:"date modified"},Object(w.c)("h4",null,"Modified"),Object(j.a)(new Date(t.file.modified||0))),Object(w.c)("div",{className:"date created"},Object(w.c)("h4",null,"Created"),Object(j.a)(new Date(t.file.created||0)))),Object(w.c)("div",{className:"path-wrapper"},Object(w.c)("div",{className:"path"},Object(w.c)("h4",null,"Path"),Object(w.c)("span",{className:"path-link",onClick:function(){Object(N.d)((function(n){n.ui.browser.goTo(t.file.folder,t.file.name)}))}}," ",t.file.folder," ")))))))),Object(w.c)(T.a,{progress:pt}),Object(w.c)("div",{className:"main-editor-wrapper ".concat(H?"with-title-editor":"no-title-editor"," ").concat(t.windowId)},!Lt&&!Pt&&"codemirror"===t.editorType&&Object(w.c)(R.a,{windowId:t.windowId,ref:Q,file:t.file,pluginsConfig:t.pluginsConfig,value:d,posY:t.posY,jumpToLine:Ht||0,forceRender:Et,onChange:function(t){Wt(),$(t)},onEvent:function(t){},onScroll:function(n){t.onScroll(n),Kt({x:-9999,y:-9999,from:0,to:0,fromPx:-9999,toPx:-9999})},onTitleClick:t.onTitleClick,onCursorMove:function(t){Kt(t)}}),!Lt&&Pt&&Object(w.c)("div",{className:"codemirror-mobile-fallback"},Object(w.c)("p",null," Note is too long for mobile, the advanced edition features are disabled "),Object(w.c)("textarea",{defaultValue:d,onChange:function(t){Wt(),$(t.target.value)}}))),Object(w.c)("div",{className:"mobile-text-manip-toolbar-wrapper",style:{top:Zt,left:Xt}},Object(w.c)(C.a,{cursorInfos:Jt,selection:Gt,onButtonClicked:function(n){if("aiSearch"===n)Object(K.b)({windowId:t.windowId,file:t.file,fileContent:d,selectionTxt:Gt,insertPos:Jt.to});else if("calc"===n)Object(p.e)({windowId:t.windowId,file:t.file,fileContent:d,selectionTxt:Gt,insertPos:Jt.to});else if("undo"===n)Object(N.d)((function(n){n.ui.note.editorAction.dispatch({windowId:t.windowId,type:"undo"})}));else if("redo"===n)Object(N.d)((function(n){n.ui.note.editorAction.dispatch({windowId:t.windowId,type:"redo"})}));else if("proofread"===n)Object(N.d)((function(n){n.ui.floatingPanel.create({type:"ctag",layout:"bottom",ctagConfig:{tagName:"proofread",content:Gt,opts:{file:t.file}}})}));else if("copyLineLink"===n)Object(N.d)((function(n){var e=Object(D.a)(t.file,Gt);n.popup.prompt({title:"Selection note link",text:'Link to the selected text <br/><br/> <input type="text" value="'.concat(e,'">')})}));else{var e=nt(n);e&&(Wt(),$(e),Tt())}}})),ct&&it,mt&&Object(w.c)(y.a,{file:t.file,onClose:function(){vt(!1)}}))},Z=function(t){return"\n\n\n.editor-area {\n\t\twidth: ".concat(Object(l.c)("desktop")?"50%":"editor"===t?"100vw":"0vw",";\n\t\tdisplay: block;\n\n\t\tposition: ").concat(Object(l.c)("desktop")||"editor"===t?"relative":"absolute!important",";\n\t\ttop: ").concat("editor"!==t||Object(l.c)("desktop")?"-9999px":"0px",";\n\n\n\t\t.mobile-text-manip-toolbar {\n\t\t\t\tdisplay: ").concat("editor"!==t||Object(l.c)("desktop")?"none":"flex",";\n\t\t}\n\n\t\t.infos-editor-wrapper {\n\t\t\t\t").concat(Object(l.c)("desktop")?"":"height: ".concat(x.a.sizes.mobile.editorTopWrapper,"px;"),"\n\t\t\t\t").concat(Object(l.c)("desktop")?"width: calc(200% - ".concat(3*x.a.sizes.block*2,"px);"):"","\n\t\t\t\tpadding: 0px ").concat(Object(l.c)("desktop")?3*x.a.sizes.block:2*x.a.sizes.block,"px;\n\t\t\t\tposition: relative;\n\n\t\t\t\t").concat(Q(),"\n\n\t\t\t\t.title-input-wrapper {\n\t\t\t\t\t\tposition:relative;\n\t\t\t\t\t\tmargin-top: ").concat(Object(l.c)("desktop")?6:0,"px;\n\t\t\t\t\t\t.press-to-save {\n\t\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\t\ttop: 39px;\n\t\t\t\t\t\t\t\tfont-size: 8px;\n\t\t\t\t\t\t\t\tcolor: ").concat(x.a.colors.main,";\n\t\t\t\t\t\t\t\tright: 0px;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tinput {\n\t\t\t\t\t\t\t\tpadding: 0px;\n\t\t\t\t\t\t\t\tborder: none;\n\t\t\t\t\t\t\t\tbackground: none;\n\t\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t\n\n\t\t\t\t.toolbar-and-dates-wrapper {\n\t\t\t\t\t\tdisplay: flex;\n\t\t\t\t}\n\n\t\t\t\t.dates-wrapper {\n\t\t\t\t\t\tdisplay: ").concat(Object(l.c)("desktop")?"block":"none",";\n\t\t\t\t\t\t.date {\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t").concat(S.b,"\n }\n}\n\n\n\n\n.main-editor-wrapper {\n ").concat(Object(l.c)("desktop")?"":"padding: 0px ".concat(2*x.a.sizes.block,"px 0px ").concat(2*x.a.sizes.block,"px;"),"\n ").concat(Object(l.c)("desktop")?"":"margin: 0px 0px ".concat(x.a.sizes.mobile.bottomBarHeight,"px 0px;"),"\n .monaco-editor {\n\t\t\t\tmargin: 0px;\n }\n .textarea-editor {\n\t\t\t\tborder: none;\n\t\t\t\twidth: 100%;\n\t\t\t\theight: calc(100vh - ").concat(x.a.sizes.mobile.editorTopWrapper+x.a.sizes.mobile.editorBar+2*x.a.sizes.mobile.bottomBarHeight,"px);\n\t\t\t\tmargin: 0px;\n\t\t\t\tpadding: 0px;\n\t\t\t\tbackground: rgba(255,255,255,0.7);\n }\n}\n\n.editor-area {\n\tposition:initial;\n\t.infos-editor-wrapper {\n\t\t\tz-index: 2;\n\t\t\tposition:absolute;\n\t\t\ttop: 0px;\n\t\t\tright: 7px;\n\t\t\twidth: 100%;\n\t\t\t&.with-title-editor {\n\t\t\t\tborder-bottom: 1px solid rgba(0 0 0 / 5%);\n\t\t\t}\n\t\t\t//box-shadow: 0px 0px 5px rgba(0,0,0,.2);\n\t\t\theight: 32px;\n\t\t\tpadding: 0px;\n\t}\n\t.main-editor-wrapper {\n\t\t\tpadding-left: 0px;\n\t\t\tpadding-rigth: 10px;\n\t\t\t").concat(Object(l.c)("desktop")?"margin-top: 33px;":"margin-top: 0px;","; \n\t\t\twidth: 100%;\n\t}\n\t.main-editor-wrapper.no-title-editor {\n\t\tmargin-top: 0px;\n\t}\n\t.infos-editor-wrapper {\n\t\t\tpadding-left: 3px;\n\t\t\tpadding-rigth: 10px;\n\t\t\twidth: calc(100% - 10px);\n\t\t\t&.no-title-editor {\n\t\t\t\twidth: 30px;\n\t\t\t}\n\t\t\t.title-input-wrapper {\n\t\t\t\t\tpadding-left: 10px;\n\t\t\t\t\t.press-to-save {\n\t\t\t\t\t\t\ttop: -6px;\n\t\t\t\t\t\t\tleft: 0px;\n\t\t\t\t\t\t\tright: initial;\n\t\t\t\t\t\t\topacity: 0.5;\n\t\t\t\t\t}\n\t\t\t\t\t.big-title {\n\t\t\t\t\t\t\twidth: calc(100% - 65px);\n\t\t\t\t\t\t\tfont-family: ").concat(x.a.font.editor,";\n\t\t\t\t\t\t\tcolor: grey;\n\t\t\t\t\t\t\tfont-size: ").concat(Object(Y.a)(5),"px;\n\t\t\t\t\t}\n\t\t\t}\n\t}\n}\n\n")},X=function(t){var n=Object(a.useContext)(N.a),e=(null===n||void 0===n?void 0:n.status.isConnected)||!1;return Object(a.useMemo)((function(){return Object(w.c)($,Object(o.a)({},t,{isConnected:e}))}),[t.viewType,t.mobileView,e,t.canEdit,t.editorType,t.windowId,t.file.created,t.file.name,t.file.path,t.file,t.fileContent,t.isActive,t.editorAction])},Q=function(){return"\n\n\n.file-path-wrapper {\n\t\tpadding-top: ".concat(Object(l.c)("desktop")?x.a.sizes.block:x.a.sizes.block/2,"px;\n\t\tfont-size: ").concat(Object(Y.a)(3),"px;\n\t\tfont-weight: 600;\n\t\tcolor: #b6b5b5;\n\t\tcursor: pointer;\n\t\ttext-transform: capitalize;\n}\n.big-title {\n\t\tcolor: ").concat(x.a.colors.main,";\n\t\tfont-size: ").concat(Object(Y.a)(5),"px;\n\t\tfont-weight: 600;\n\t\twidth: 100%;\n}\n\n.separation-bar {\n\t\twidth: 86%;\n height: 1px;\n background: #e6e6e6;\n margin: 10px 6%;\n}\n\n.dates-wrapper {\n\t\tposition: relative;\n\t\tmargin: 0px 0px 5px 0px;\n\t\tdisplay: block!important;\n .modified {\n\t\t\t\tcolor: grey;\n\t\t\t\ttext-align: left;\n }\n\t\t.created {\n\t\t\t\ttext-align: right;\n\t\t\t\tposition: absolute;\n\t\t\t\ttop: 0px;\n\t\t\t\tright: 0px;\n\t\t\t\tcolor: ").concat(x.a.colors.editor.interfaceGrey,";\n\t\t}\n}\n\n.path-wrapper {\n\t\tcolor: grey;\n text-align: left;\n\t\tpadding: 0px 0px 5px 0px;\n .path-link {\n\t\t\t\tcolor: ").concat(x.a.colors.main,";\n\t\t\t\tfont-weight: bold;\n\t\t\t\tcursor: pointer;\n }\n}\n\n.note-id-wrapper {\n\t\tcolor: grey;\n text-align: left;\n\t\t.note-id-form {\n\t\t\t\tmargin-bottom: 5px;\n\t\t\t\tdisplay:flex;\n\t\t\t\tinput {\n\t\t\t\t\t\tborder: none;\n\t\t\t\t\t\tpadding: 5px;\n\t\t\t\t\t\tbackground: #ebebeb;\n\t\t\t\t\t\tborder-radius: 3px;\n\t\t\t\t\t\tfont-size: 9px;\n\t\t\t\t\t\tfont-weight: 400;\n\t\t\t\t}\n\t\t}\n}\n.toolbar-and-dates-wrapper {\n\t\th4 {\n\t\t\t\tmargin: 0px;\n\n\t\t}\n}\n")}},160:function(t,n,e){"use strict";e.d(n,"a",(function(){return z})),e.d(n,"b",(function(){return H}));var o=e(10),i=e(23),c=e(5),a=e(0),r=e.n(a),l=e(38),s=e(92),u=function(t){var n=t.headerLog,e={},o=function(t){e[t]&&delete e[t]};return{notify:function(t){for(var i in e){var c=e[i],a=!1;if(i.endsWith("-once")&&(i=i.replace("-once",""),a=!0),i===t.subId)try{c(t.data),a&&o("".concat(i,"-once"))}catch(r){n&&console.log("".concat(n," error with function"),r)}}},subscribe:function(t,cb){e[t]=cb},subscribeOnce:function(t,cb){var n="".concat(t,"-once");e[n]=cb},unsubscribe:o}},p=e(91),d=e(41),f=e(18),b=e(14),g=e(17),h="[IFRAME PARENT] 00563",m=g.a.client.log.iframe,v=u({headerLog:h}),w=v.notify,O=v.subscribe,j=v.unsubscribe;window.addEventListener("message",(function(t){t.data.subId&&(m&&console.log(h,"parent <== iframe",t.data.data),w(t.data))}));var x={subscribe:O,unsubscribe:j,send:function(t,n){t&&t.contentWindow&&(m&&console.log(h,"parent ==> iframe",n),t.contentWindow.postMessage(n,"*"))}},k=function(t){var n="[IFRAME child js]",e={file:null,frameId:"",reloadCounter:0,windowId:"",innerTag:"",tagName:"",tagContent:"",loginToken:t.loginToken,backendUrl:t.backendUrl},o=function(t){if(""===e.frameId)return console.warn(n,"NO FRAME ID, CANNOT SEND TO PARENT");var o={subId:e.frameId,data:t};window.parent.postMessage(o,"*")},i=function(t){var n={error:"CUSTOM TAG/SCRIPT ERROR: ".concat(t)};o({action:"iframeError",data:n})};window.addEventListener("resize",(function(t){r("100%")}));var c,a={value:"100%"},r=function(t){var n=document.getElementById("content-wrapper");if(!t){if(!n||0===n.clientHeight)return;t=n.clientHeight+20}a.value="".concat(t),o({action:"resize",data:{height:t}})},l=function(){var t=document.body,n=t.requestFullScreen||t.webkitRequestFullScreen||t.mozRequestFullScreen||t.msRequestFullScreen;n&&n.call(t)},s=t.createEventBus({headerLog:"[FRAME API] 00567"}),u=s.subscribeOnce,p=s.notify,d=function(t,e){var o,i=t.url;i.includes(".js")?((o=document.createElement("script")).crossorigin="anonymous",o.rel="preload",o.src=i,t.type&&(o.type=t.type)):i.includes(".css")?((o=document.createElement("link")).href=i,o.rel="stylesheet",o.crossorigin="anonymous",o.type="text/css",t.type&&(o.type=t.type)):i.includes(".wasm")&&((o=document.createElement("link")).rel="preload",o.href=i,o.as="fetch",o.crossorigin="anonymous",o.type="application/wasm",t.type&&(o.type=t.type)),o.onload=function(){e()};var c=document.getElementById("external-ressources-wrapper");if(!c)return console.error(n,"could not load ".concat(i," because ressource wrapper was not detected"));c.appendChild(o)},f=function(n,e){var o="?token=".concat(t.loginToken),i=e||t.getRessourceIdFromUrl(n);return"".concat(t.backendUrl,"/static").concat("/.tiro/cache/ctag-ressources/").concat(i).concat(o)},b=function(t,cb){for(var e=0,o=function(){if(++e===t.length)try{cb&&cb()}catch(o){console.error(n,"ERROR LoadScript Callback : ".concat(o))}},i=function(){var e,i=t[c],a=(e=i.constructor===String?{url:i}:JSON.parse(JSON.stringify(i))).fileName,r=f(e.url,a),l=JSON.parse(JSON.stringify(e));l.url=r;var s,u,p,b=!0===window.disableCache,h=function(){g("ressource.download",[e.url,"/.tiro/cache/ctag-ressources/",{fileName:a}],(function(t){d(l,(function(){o()}))}))};b?(console.warn(n,"CACHE DISABLED, DOWNLOADING RESSOURCES EVERYTIME!"),h()):(s=l.url,u=function(){d(l,(function(){o()}))},p=function(){h()},fetch(s,{method:"HEAD"}).then((function(t){return t.ok?u():p()})).catch((function(t){return p(t)})))},c=0;c<t.length;c++)i()},g=function(n,e,cb){if(!e||!n||e.constructor!==Array||"string"!==typeof n)return i("Call Api : ".concat(n," => wrong arguments type / number(").concat(JSON.stringify({apiName:n,apiArguments:e,cb:cb}),")"));var c="iframe-api-call-".concat(t.generateUUID()," ");u(c,(function(t){cb&&cb(t)})),o({action:"apiCall",data:{reqId:c,apiName:n,apiArguments:e}})},h={version:1.2,call:g,utils:{getInfos:function(){return e},loadCachedRessources:b,getCachedRessourceUrl:f,getRessourceIdFromUrl:t.getRessourceIdFromUrl,loadScripts:function(t,cb){b(t,cb)},loadRessources:function(t,cb){b(t,cb)},loadScriptsNoCache:function(t,cb){for(var e=0,o=0;o<t.length;o++){var i=t[o],c=document.createElement("script");c.src=i,c.onload=function(){if(++e===t.length)try{cb&&cb()}catch(o){console.error(n,"ERROR LoadScript Callback : ".concat(o))}};var a=document.getElementById("external-ressources-wrapper");a&&a.appendChild(c)}},resizeIframe:r,fullscreenIframe:l,canScrollIframe:function(t){o({action:"canScrollIframe",data:{status:t}})},loadCustomTag:function(t,n,e){var o=h.utils.createDiv(),i=o.div,c=o.updateContent;e||(e={}),e.base_url=t.split("/").slice(0,-1).join("/").replace("//","/"),e.plugins_root_url=e.base_url.split("/").slice(0,-1).join("/").replace("//","/");var a=!0;return!1===e.padding&&(a=e.padding),h.utils.loadScripts([t],(function(){var t=window.initCustomTag("".concat(n),e);a&&(t='<div class="with-padding" style="padding: 0px 15px;">'.concat(t,"</div>")),c(t)})),i},uuid:t.generateUUID,createDiv:function(){var n="ctag-content-wrapper-".concat(t.generateUUID()," ");return{div:'<div id="'.concat(n,'"></div>'),updateContent:function t(e){var o=document.getElementById(n);o?o.innerHTML=e:setTimeout((function(){t(e)}),100)}}}}};return window.api=h,c={init:function(o){e.frameId=o.frameId,e.innerTag=o.innerTag,e.tagContent=o.tagContent,e.tagName=o.tagName,e.file=o.file,e.reloadCounter=o.reloadCounter,e.windowId=o.windowId;var c,a=document.getElementById("content-wrapper");if(a){var l=t.unescapeHtml(a.innerHTML),s=(c=l,t.replaceCustomMdTags(c,"[[script]]",(function(t){var e="".concat(t);try{return new Function(e)()}catch(o){console.warn(n,"[SCRIPT] error: ".concat(o),e),i("".concat(o,' in Code "').concat(e,'"'))}})));a.innerHTML=s,setTimeout((function(){r()}),100),t.bindToElClass("title-search-link",(function(t){var n=t.dataset.file,e=t.dataset.folder,o=t.dataset.windowid;h.call("ui.browser.goTo",[e,n,{openIn:o}])}))}},askFullscreen:l,apiAnswer:function(t){var n={subId:t.reqId,data:t.data};p(n)}},window.onmessage=function(t){var n=t.data;if(n)for(var e in c)c&&c[e]&&e===n.action&&c[e](t.data.data)},h},y=e(11),_=e(78),C=e(32),E=e(376),S=e(122),T=e(65);g.a.client.log.verbose;var I=["epub","pdf","iframe","web","smartlist","proofread"],N=function(t,cb){Object(y.d)((function(n){n.file.getContent("/.tiro/tags/".concat(t,".md"),(function(t){cb(t)}),{onError:function(){I.includes(t)?function(t,cb){var n="https://raw.githubusercontent.com/dotgreg/tiro-notes/dev/plugins/".concat(t,"/").concat(t,".js"),e="";"epub"===t&&(e='open:true, size: "80%"'),"pdf"===t&&(e="open:true"),"web"===t&&(e='"search_engines": {\n "default":"https://search.bowlman.org/search?q=",\n "g":"https://www.google.com/search?q=",\n "m": "https://www.google.com/maps/search/"\n }');var o='\n [[script]]\n return api.utils.loadCustomTag("'.concat(n,'",`{{innerTag}}`,{').concat(e,"})\n [[script]]\n ");console.log("".concat("[CTAG MANAGER]",' : ctag "').concat(t,'" not present in tiro/tags but part of the base, return base config'),{baseCtagTxt:o}),cb(o)}(t,(function(t){cb(t)})):cb(null)}})}))},P=e(13),R=e(31),A=e(1),F=(g.a.client.log.verbose,{}),L={},M=["latex","l"],D=function(t){var n="tag"===t.block.type&&!M.includes(t.block.tagName||""),e=Object(a.useState)(null),o=Object(c.a)(e,2),r=o[0],l=o[1],u=Object(a.useState)(null),p=Object(c.a)(u,2),d=p[0],f=p[1],b=Object(a.useState)("null"),g=Object(c.a)(b,2),h=g[0],m=g[1];Object(a.useEffect)((function(){var e,cb;n&&(m("loading"),"script"===t.block.tagName?(l("\n[[script]]".concat(t.block.content,"[[script]]")),setTimeout((function(){m("loaded")}),100),t.block.content=""):t.block.tagName&&(e=t.block.tagName,cb=function(t){t?(l(t),setTimeout((function(){m("loaded")}),100)):l(null)},Object(y.d)((function(t){t.plugins.get(e,"tag",(function(t){t&&"tag"===t.type?cb(t.code):("iframe"===e&&(e="web"),N(e,(function(t){cb(t)})))}))}))))}),[t.windowId,t.block.content]);var v="l"===t.block.tagName||"latex"===t.block.tagName;return Object(a.useEffect)((function(){if(!n){var e=s.b.render({raw:t.block.content,file:t.file,windowId:t.windowId});v&&(e="[[l]]".concat(t.block.content,"[[l]]")),f(e)}}),[t.windowId,t.file,t.block]),Object(A.c)("span",{className:"content-block ".concat(n?"block-tag":"block-text"," ")},"loaded"===h&&n&&r&&Object(A.c)(B,Object(i.a)({},t,{noteTagContent:r})),!n&&d&&Object(A.c)("span",{className:"content-block-text",dangerouslySetInnerHTML:{__html:d}}))},z=r.a.memo(D,(function(t,n){var e=!0;return JSON.stringify(t.block)!==JSON.stringify(n.block)&&(e=!1),t.block.content!==n.block.content&&(e=!1),t.file.path!==n.file.path&&(e=!1),t.windowId!==n.windowId&&(e=!1),e})),B=function(t){var n=Object(o.a)({},t).noteTagContent,e=Object(a.useState)(""),i=Object(c.a)(e,2),g=i[0],h=i[1],m=Object(a.useRef)(null),v=Object(a.useState)(""),w=Object(c.a)(v,2),O=w[0],j=w[1],I=Object(a.useState)(!1),N=Object(c.a)(I,2),M=N[0],D=N[1],z=Object(a.useState)(0),B=Object(c.a)(z,2),H=B[0],U=B[1],W=Object(a.useState)(null),q=Object(c.a)(W,2),V=q[0],J=q[1],K=Object(a.useState)(!1),G=Object(c.a)(K,2),Y=G[0],$=G[1],Z=function(){var n,e,o=function(n){Y&&t.onIframeMouseWheel(n)};return null===(n=m.current)||void 0===n||null===(e=n.contentDocument)||void 0===e||e.addEventListener("mousewheel",o),function(){var t,n;return null===(t=m.current)||void 0===t||null===(n=t.contentDocument)||void 0===n?void 0:n.removeEventListener("mousewheel",o)}};Object(a.useEffect)(Z,[t.yCnt,Y]);var X=Object(C.a)((function(e){Z(),j(e),J(null),x.subscribe(e,(function(n){if("resize"===n.action){var e=n.data,o=0,i=document.querySelector(".window-id-sizeref-".concat(t.windowId));if(!i)return;var c=i.getBoundingClientRect();if(Object(E.a)(e.height)&&e.height.endsWith("%")){var a=parseInt(e.height.replace("%",""))/100;o=c.height*a}else if(Object(S.a)(e.height))o=e.height;else{i.getBoundingClientRect();o=300}t.ctagHeightOffset&&(o+=t.ctagHeightOffset),U("".concat(o,"px")),D(!0)}if("canScrollIframe"===n.action){var r=n.data;$(r.status)}if("apiCall"===n.action){var l=n.data;Object(y.b)(l,(function(t,e){if("nok"===t)return J(e.error);var o={reqId:n.data.reqId,data:e};x.send(m.current,{action:"apiAnswer",data:o})}))}if("iframeError"===n.action){var s=n.data.error;J(s),Object(R.d)("".concat(s))}})),setTimeout((function(){var o={file:t.file,innerTag:t.block.content,windowId:t.windowId,frameId:e,reloadCounter:et,tagContent:n,tagName:t.block.tagName||"",loginToken:Object(f.b)(),backendUrl:Object(b.c)()};x.send(m.current,{action:"init",data:o})}),100)}),500),Q=function(){var e=s.b.render({raw:n,windowId:t.windowId,file:t.file}),o='\n<html>\n\t\t<div id="content-wrapper">\n\t\t\t\t'.concat(e,'\n\t\t</div>\n\t\t<div id="external-ressources-wrapper"></div>\n\t\t<script>\n\t\t\t\tconst IMPORTED_backend_url = "').concat(Object(b.c)(),'"\n\t\t\t\tconst IMPORTED_login_token = "').concat(Object(f.b)(),'"\n\t\t\t\tconst IMPORTED_replaceCustomMdTags = ').concat(p.c.toString(),"\n\t\t\t\tconst IMPORTED_unescapeHtml = ").concat(d.h.toString(),"\n\t\t\t\tconst IMPORTED_createEventBus = ").concat(u.toString(),"\n\t\t\t\tconst IMPORTED_generateUUID = ").concat(l.a.toString(),"\n\t\t\t\tconst IMPORTED_getRessourceIdFromUrl = ").concat(l.b.toString(),"\n\t\t\t\tconst IMPORTED_bindToElClass = ").concat(s.a.toString(),"\n\t\t\t\tconst main = ").concat(k.toString(),";\n\t\t\t\tmain({\n\t\t\t\t\tbackendUrl: IMPORTED_backend_url,\n\t\t\t\t\tloginToken: IMPORTED_login_token,\n\t\t\t\t\treplaceCustomMdTags: IMPORTED_replaceCustomMdTags,\n\t\t\t\t\tunescapeHtml: IMPORTED_unescapeHtml,\n\t\t\t\t\tcreateEventBus: IMPORTED_createEventBus,\n\t\t\t\t\tgenerateUUID: IMPORTED_generateUUID,\n\t\t\t\t\tgetRessourceIdFromUrl: IMPORTED_getRessourceIdFromUrl,\n\t\t\t\t\tbindToElClass: IMPORTED_bindToElClass\n\t\t\t\t})\n\t\t<\/script>\n<style>\n\t\tbody::backdrop {\n\t\t\tbackground: #F7F7F7;\n\t\t}\n</style>\n</html>\n"),i='\n\t\t\t\t<div class="simple-css-wrapper">\n\t\t\t\t'.concat(o,"\n\t\t\t\t</div>\n\t\t\t\t<style>\n\t\t\t\t").concat(Object(_.c)(),"\n\t\t\t\t</style>\n\t\t\t\t");i=Object(T.a)(i,[["{{innerTag}}",t.block.content.trim()]]),h(i)},tt=Object(a.useState)(0),nt=Object(c.a)(tt,2),et=nt[0],ot=(nt[1],Object(a.useState)(!1)),it=Object(c.a)(ot,2),ct=it[0];it[1];Object(a.useEffect)((function(){D(!1),Q();var t="iframe-".concat(Object(l.a)());return X(t),function(){x.unsubscribe(t)}}),[t.windowId,t.block.content,t.block.tagName,t.noteTagContent,et]);var at=t.index||0,rt="".concat(t.windowId,"-").concat(at,"-").concat(t.block.tagName);Object(a.useEffect)((function(){F[rt]?pt(!0):F={},L[rt]?gt(!0):F={}}),[]);var lt=Object(a.useState)(!1),st=Object(c.a)(lt,2),ut=st[0],pt=st[1],dt=Object(a.useState)(!1),ft=Object(c.a)(dt,2),bt=ft[0],gt=ft[1],ht=function(t){t||(t=!bt),L[rt]=t,gt(t),pt(!1)};Object(a.useEffect)((function(){t.ctagFullscreen&&ht(!0)}),[t.ctagFullscreen]);var mt=Object(l.a)();return Object(A.c)(r.a.Fragment,null,bt&&Object(A.c)("div",{className:"fullscreen-pin-bg",onClick:function(n){ht(!1),t.ctagOnFullscreenClose&&t.ctagOnFullscreenClose()}}),Object(A.c)("div",{className:"iframe-view-wrapper ".concat(M?"can-show":"hide"," iframe-tag-").concat(t.block.tagName," ").concat(ut?"pinned":"not-pinned"," ").concat(bt?"pinned fullscreen":"not-fullscreen"," ").concat(Object(P.e)()?"mobile":"")},!ct&&Object(A.c)("iframe",{onMouseLeave:function(t){!function(t,n){var e=document.getElementById(n);e&&e.focus({preventScroll:!0})}(0,mt)},ref:m,id:O,"data-testid":"iframe",title:O,srcDoc:g,className:"tag-iframe",style:{height:H},sandbox:t.ctagSandboxed?"allow-scripts allow-same-origin allow-popups":void 0}),V&&Object(A.c)("div",{className:"iframe-error"},Object(A.c)("code",null,Object(A.c)("pre",null,V))),Object(A.c)("input",{className:"refocus-input",id:mt,type:"text"})))},H=function(){return"\n.refocus-input {\n\tposition: fixed;\n\tz-index: -10000;\n\twidth: 0px;\n\theight: 0px;\n\topacity: 0.00001;\n\ttop: -10000px;\n\tleft: -10000px;\n}\n.content-blocks-wrapper {\n\t\t// padding: 0px 15px;\n}\n.simple-css-wrapper {\n}\n\n.content-blocks-wrapper,\n.simple-css-wrapper,\n.simple-css-wrapper > div,\n.content-block,\n.iframe-view-wrapper\n{\n}\n\n.fullscreen-pin-bg {\n\t\tposition: fixed;\n\t\ttop:0px;\n\t\tright: 0px;\n\t\twidth: 100vw;\n\t\theight: 100vh;\n\t\tbackground: rgba(0,0,0,0.5);\n\t\tz-index:101;\n}\n.iframe-view-wrapper {\n\t\t&.pinned {\n\t\t\t\tposition: fixed;\n\t\t\t\ttransform: rotate(360deg);\n\t\t\t\ttop: 10px;\n\t\t\t\tright: 10px;\n\t\t\t\tz-index: 1000;\n\t\t\t\toverflow:hidden;\n\t\t\t\tborder: 2px;\n\t\t\t\tbackground: white;\n\t\t\t\tborder-radius: 12px;\n\t\t\t\tbox-shadow: 0px 0px 5px #0006;\n\t\t\t\tiframe {\n\t\t\t\t\t\tmax-height: 90vh;\n\t\t\t\t\t\toverflow-y: scroll;\n\t\t\t\t}\n\t\t}\n\t\t&.pinned.fullscreen.mobile {\n\t\t\theight: calc(100vh - 80px);\n\t\t\tright: 10px;\n\t\t\twidth: calc(100vw - 20px);\n\t\t}\n\t\t&.pinned.fullscreen {\n\t\t\t\ttop: 20px;\n\t\t\t\tright: 20px;\n\t\t\t\tz-index:102;\n\t\t\t\twidth: calc(100vw - 40px);\n\t\t\t\theight: calc(100vh - 40px);\n\t\t\t\tiframe {\n\t\t\t\t\t\theight: calc(100% - 1px)!important;\n\t\t\t\t\t\tmax-height: calc(100% - 1px)!important;\n\t\t\t\t}\n\t\t}\n\t\tposition: relative;\n\t\t.ctag-menu {\n\t\t\t\tposition: absolute;\n\t\t\t\ttop: 3px;\n\t\t\t\tz-index: 10;\n\t\t\t\tleft: 15px;\n\t\t\t\tcursor: pointer;\n\t\t\t\topacity: 0;\n\t\t\t\ttransition: 0.2s all; \n\t\t\t\tdisplay: flex;\n\t\t\t\tpadding: 3px;\n\t\t\t\tpadding-left: 8px;\n\n\t\t\t\tmargin-left: 8px;\n\t\t\t\tmargin-right: 8px;\n\n\t\t\t\t.ctag-ellipsis {\n\t\t\t\t\t\tmargin-right: 15px;\n\t\t\t\t}\n\t\t}\n\t\t.ctag-menu .ctag-menu-button {\n\t\t\t\tdisplay: none;\n\t\t}\n\t\t&:hover {\n\t\t\t\t.ctag-menu {\n\t\t\t\t\t\topacity:0.5;\n\t\t\t\t}\n\t\t\t\t.ctag-menu:hover {\n\t\t\t\t\t\topacity:1;\n\t\t\t\t\t\tbackground: white;\n\t\t\t\t\t\tbox-shadow: 0px 0px 3px rgba(0,0,0,.1);\n\t\t\t\t\t\tborder-radius: 5px;\n\t\t\t\t\t\t.ctag-menu-button {\n\t\t\t\t\t\t\t\tmargin-right: 15px;\n\t\t\t\t\t\t\t\tdisplay: block;\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t}\n\n\t\t&.hide iframe {\n\t\t\t\topacity: 0;\n\t\t}\n\t\tiframe::backdrop {\n\t\t\t\tbackground-color: rgba(255,255,255,1);\n\t\t}\n\n\t\tiframe {\n\t\t\t\t// transition: 0.3s all;\n\t\t\t\twidth: calc(100% );\n\t\t\t\tborder: none;\n\t\t\t\tborder-radius: 5px;\n\t\t}\n\t\t.iframe-error {\n\t\t\t\tbackground: #ffddba;\n\t\t\t\tfont-size: 8px;\n\t\t\t\tpadding: 14px;\n\t\t\t\tborder: 2px #ffc080 solid;\n\t\t\t\tborder-radius: 5px;\n\t\t\t\tline-height: 14px;\n\t\t}\n}\n\n.content-block.block-text {\n\t\tpadding-bottom: 0px;\n}\n\n/* .content-block-text > * { */\n/* \t\tpadding: 0px 15px; */\n/* } */\n\n.content-block.block-tag {\n\t\tpadding: 0px 0px 0px 0px;\n position: relative;\n left: -15px;\n top: 0;\n width: calc(100% + 20px);\n height: calc(100% );\n display: block;\n}\n\n"}},162:function(t,n,e){"use strict";e.d(n,"a",(function(){return Q})),e.d(n,"b",(function(){return tt}));var o=e(5),i=e(0),c=e.n(i),a=e(240),r=e(242),l=e(49),s=e(12),u=e(373),p=e(9),d=e(63),f=e(13),b=e(213),g=e(54),h=e(209),m=e(15),v=e(25),w=e(17),O=e(11),j=e(31),x=(w.a.client.log.verbose,function(t,n,e,o,i){return{label:t,apply:n||t,info:e,detail:i,type:"tag",boost:o||0}}),k=function(t,n){var e=_(t,n);return[C(n),e,y(n)]},y=function(t){return function(n){var e=n.matchBefore(/\-\-/);if(!n.explicit&&!e)return null;var o="".concat(w.a.path.configFolder,"/snippets.md");return new Promise((function(i,c){Object(O.d)((function(c){c.file.getContent(o,(function(o){var c=[],a=o.split("\n");Object(v.a)(a,(function(t){var n,e=(t=t.split("\\n").join("\n")).split("|"),o=null===(n=e.shift())||void 0===n?void 0:n.trim(),i=e.join("|").trim();if(i&&o){if(o="--"+o,i.includes("${")){var a=i;try{i=new Function("return `"+a+"`")()}catch(s){var r="".concat("[Code Mirror]"," snippets error: ").concat(JSON.stringify({e:s,oto:a}));Object(j.d)(r)}}var l=i.length>20?"".concat(i.substring(0,20),"..."):i;c.push(x(o,i,void 0,void 0,l))}}));var r={from:e?e.from:n.pos,options:c,validFor:/.*/};t("snippets"),i(r)}))}))}))}},_=function(t,n){return function(e){var o=e.matchBefore(/\#/);return e.explicit||o?new Promise((function(i,c){Object(O.d)((function(c){var a=t.folder;console.log("searching for folder",a),c.search.word("#",a,(function(t){var c=[];Object(v.a)(t,(function(t){Object(v.a)(t.results,(function(t){var n=t.split(" ");Object(v.a)(n,(function(t){(t=t.trim())&&t.startsWith("#")&&(t.length<=1||"#"!==t[1]&&c.push(x(t,t)))}))}))}));var a={from:o?o.from:e.pos,options:c,validFor:/.*/};n("hashtag"),i(a)}))}))})):null}},C=function(t){return function(n){var e=n.matchBefore(/\[\[/);return n.explicit||e?new Promise((function(o,i){var c=new Promise((function(t,n){Object(O.d)((function(n){n.files.get("/.tiro/tags",(function(e){var o=0,i=[];Object(v.a)(e,(function(c){n.file.getContent(c.path,(function(n){o++,i.push({name:c.name,content:n}),o===e.length&&t(i)}))}))}))}))})),a=new Promise((function(t,n){Object(O.d)((function(n){var e=[];n.plugins.list((function(n){Object(v.a)(n,(function(t){"tag"===t.type&&e.push({name:t.name,content:t.code})})),t(e)}))}))}));Promise.all([a,c]).then((function(t){var n=function(t){var n=[];return Object(v.a)(t,(function(t){var e=t.name.replace(".md",""),o="[[".concat(e,"]]"),i="".concat(o," ").concat(o),c="Insert installed custom tag ".concat(o),a=0,r=t.content.split("\n"),l="// --insert:",s="// --comment:",u="// --boost:";Object(v.a)(r,(function(t){(t=t.split("\\n").join("\n")).startsWith(l)&&(i=t.replace(l,"")),t.startsWith(s)&&(c=t.replace(s,"")),t.startsWith(u)&&(a=parseInt(t.replace(u,"")))})),n.push(x(o,i,c,a))})),n}([].concat(Object(m.a)(t[0]),Object(m.a)(t[1])));r(n)})).catch((function(){console.warn("ERROR HERE")}));var r=function(i){var c={from:e?e.from:n.pos,options:i,validFor:/.*/};t("ctag"),o(c)}})):null}},E=e(115),S=e(88),T=e(153),I=e(73),N=e(110),P=e(207),R=e(30),A=e(84),F=e(45),L=e(1),M=function(t,n){return Object(F.a)({file:t,windowId:n,pattern:R.a.ressource,replacement:function(e){var o=e.matchs,i=document.createElement("span"),c=o[2];return"none"===Object(A.a)(c)?i.innerHTML=Object(N.a)(o[0],o[2],t,!0):i.innerHTML=function(t,n,e){var o=t[0],i='<div class="mdpreview-source">'.concat(o,"</div>"),c=Object(P.renderToString)(Object(L.c)(S.a,{markdownTag:o,file:n,windowId:e}));return"".concat(c," ").concat(i)}(o,t,n),i}})},D=e(95),z=e(224),B=e(27),H=e(170),U=e(122),W=e(55),q=e(32),V=e(221),J=e(222),K=e(99),G=e(24),Y=e(223),$="[Code Mirror]",Z=w.a.client.log.verbose,X=Object(i.forwardRef)((function(t,n){var e=function(){var t=n.current;return t&&t.state?t:null},p=Object(i.useRef)(null);Object(i.useEffect)((function(){!function(){var n,o=e();if(!o)return!1;if(t.value===p.current)return!1;if("loading..."===t.value)return!1;if((null===(n=o.view)||void 0===n?void 0:n.state.doc.toString())===t.value)return!1;var i=g.a.getCurrentLineInfos(o);if(!i)return!1;var c=i.currentPosition;g.a.updateText(o,t.value,c),p.current=t.value}()}),[t.value,t.forceRender,t.file.path]);var m=Object(i.useState)(!1),w=Object(o.a)(m,2),j=w[0],x=w[1];Object(i.useEffect)((function(){x(!1)}),[t.file.path]),Object(i.useEffect)((function(){!0===j&&y()}),[t.value]);var y=Object(q.a)((function(){var t=e();g.a.foldAllChildren(t)}),500),_=Object(i.useRef)(t.value);Object(i.useEffect)((function(){_.current=t.value}),[t.value]);var C=function(n,e){n!==t.value&&(p.current=n,_.current=n,t.onChange(n),Ft(!1),D.a.val=!1,P(),tt(n))};Object(i.useEffect)((function(){if(Z&&console.log($,"JUMP to line :",t.jumpToLine),-1!==t.jumpToLine){var n=e();if(n&&!(t.posY<=-10))try{g.a.scrollToLine(n,t.jumpToLine)}catch(o){console.log(o)}}}),[t.jumpToLine]);Object(i.useEffect)((function(){P()}),[t.value]),Object(i.useEffect)((function(){P()}),[]);var S=Object(b.a)(".window-id-".concat(t.windowId)).resizeState;Object(i.useEffect)((function(){P()}),[S,t.windowId]);var P=function(){var n=e();if(n){var o=g.a.getEditorInfos(n.view);d.a.updateEditorDims(t.windowId,{viewport:o.viewportHeight(),full:o.contentHeight}),d.a.updateScrollerDims(t.windowId)}},R=Object(E.c)({file:t.file,onTitleClick:function(n){!function(n){var o=e();if(o){var i=g.a.getCurrentLineInfos(o);i&&(Z&&console.log($,"CLICK ON TITLE DETECTED",n,i),t.onTitleClick(i.lineIndex))}}(n)}}),A=Object(i.useState)(null),F=Object(o.a)(A,2),G=F[0],X=F[1];Object(i.useEffect)((function(){var t=null;Object(v.a)(r.a,(function(n){"Javascript"===n.name&&(t=n)})),X(t)}),[]),Object(v.a)(r.a);var Q={base:a.markdownLanguage,codeLanguages:r.a,extensions:[]};G&&(Q.defaultCodeLanguage=G);var tt=Object(q.a)((function(t){t.includes("--table")&&!ot&&(it(!0),mt()),t.includes("--latex")&&!rt&&(lt(!0),mt()),t.includes("--spellcheck")&&!pt&&(dt(!0),mt()),!t.includes("--table")&&ot&&(it(!1),mt()),!t.includes("--latex")&&rt&&(lt(!1),mt()),!t.includes("--spellcheck")&&pt&&(dt(!1),mt())}),500),nt=Object(i.useState)(!1),et=Object(o.a)(nt,2),ot=et[0],it=et[1],ct=Object(i.useState)(!1),at=Object(o.a)(ct,2),rt=at[0],lt=at[1],st=Object(i.useState)(!1),ut=Object(o.a)(st,2),pt=ut[0],dt=ut[1],ft=Object(i.useState)(0),bt=Object(o.a)(ft,2),gt=bt[0],ht=bt[1],mt=function(){ht(gt+1)};Object(i.useEffect)((function(){tt(t.value)}),[t.value]);var vt=Object(i.useState)([]),wt=Object(o.a)(vt,2),Ot=wt[0],jt=wt[1],xt=Object(i.useState)(""),kt=Object(o.a)(xt,2),yt=kt[0],_t=kt[1],Ct=function(){var t,e=(null===n||void 0===n||null===(t=n.current)||void 0===t?void 0:t.editor)||null;if(console.log("onAutocomplete editorDiv",e),e){var o=e.getBoundingClientRect();setTimeout((function(){var t=document.querySelector(".cm-tooltip");console.log("open onAutocomplete",o,t),t.style.transform="translate(-".concat(o.left,"px, -").concat(o.top-40,"px)")}),100)}};Object(i.useEffect)((function(){Object(O.d)((function(n){var e=[Object(l.a)({override:k(t.file,Ct)}),s.c.domEventHandlers({scroll:function(t,n){},wheel:function(n,e){var o=g.a.getEditorInfos(e);d.a.onEditorScroll(t.windowId,o.currentPercentScrolled()),t.onScroll()}})];(n.userSettings.get("ui_editor_spellcheck")||pt)&&e.push(s.c.contentAttributes.of({spellcheck:"true"}));var o=t.pluginsConfig;o||(o={}),Object(H.a)(o.markdown)||(o.markdown=!0),Object(H.a)(o.linkPreview)||(o.linkPreview=!0);var i=n.userSettings;Object(f.a)();i.get("ui_editor_markdown_tags")&&e.push(Object(V.b)(t.file,t.windowId)),i.get("ui_editor_links_as_button")&&(e.push(Object(T.c)(t.file,t.windowId)),e.push(Object(I.c)(t.file,t.windowId,o.linkPreview))),i.get("ui_editor_markdown_table_preview")&&ot&&(e.push(Object(D.f)(t.file,t.windowId)),e.push(Object(D.g)(t.file,t.windowId)),e.push(Object(D.d)(t.file,t.windowId)),e.push(Object(D.c)(t.file,t.windowId))),i.get("ui_editor_markdown_latex_preview")&&rt&&Q.extensions.push(E.a),i.get("ui_editor_markdown_preview")&&(K.b||Object(K.a)(),e.push(R),i.get("ui_editor_markdown_enhanced_preview")&&(e.push(Object(J.a)(t.file,t.windowId)),e.push(Object(Y.a)(t.file,t.windowId)),e.push(Object(N.c)(t.file,t.windowId)),e.push(M(t.file,t.windowId)),e.push(Object(z.a)(t.file,t.windowId)))),o.markdown?e.push(Object(a.markdown)(Q)):e.push(Object(D.b)(t.file,t.windowId));var c="device-".concat(Object(f.a)()," ");i.get("ui_editor_markdown_table_preview")&&(c+="md-table-preview-enabled"),e.push(Et),jt(e),_t(c)}))}),[t.pluginsConfig,t.windowId,t.file.path,t.value,rt,ot,pt,gt]);var Et=s.c.domEventHandlers({blur:function(n,e){t.onEvent("blur")},focus:function(n,e){t.onEvent("focus")}}),St=Object(i.useRef)(""),Tt=Object(i.useRef)([-9999,-9999]),It=Object(i.useState)([-9999,-9999]),Nt=Object(o.a)(It,2),Pt=(Nt[0],Nt[1]),Rt=Object(i.useState)(!1),At=Object(o.a)(Rt,2),Ft=(At[0],At[1]),Lt=Object(i.useRef)({from:-1,to:-1}),Mt=Object(i.useRef)({from:-1,to:-1}),Dt=[30,10],zt=Object(i.useState)({x:0,y:0}),Bt=Object(o.a)(zt,2),Ht=(Bt[0],Bt[1],Object(q.a)((function(n){var o,i=null===(o=e())||void 0===o?void 0:o.view;if(i){var c=i.coordsAtPos(i.state.selection.main.head),a=i.coordsAtPos(i.state.selection.ranges[0].from);if(!c)return;t.onCursorMove({x:c.left,y:c.top,from:n.from,to:n.to,fromPx:(null===a||void 0===a?void 0:a.top)||0,toPx:(null===a||void 0===a?void 0:a.bottom)||0})}n.from!==n.to&&Object(U.a)(n.from)&&Object(U.a)(n.to)&&(n.from<0||n.to<0||JSON.stringify(Mt.current)!==JSON.stringify(n)&&(Mt.current=Object(W.a)(n),Wt()))}),200)),Ut=function(t,n){"up"===t?St.current=t:"down"===t?Ft(!1):"move"===t&&(Tt.current=[n.clientX,n.clientY])},Wt=function(){Object(O.d)((function(t){if(t.userSettings.get("ui_editor_ai_text_selection")){Ft(!0);var n=Tt.current;Pt([n[0]+Dt[0],n[1]+Dt[1]])}}))},qt=Object(i.useMemo)((function(){return Object(L.c)(c.a.Fragment,null,Object(L.c)(u.a,{value:"",ref:n,theme:Object(h.a)(),onChange:C,onUpdate:function(t){!function(t){var n=t.state.selection.ranges[0];Lt.current=n,Ht(n)}(t)},basicSetup:{foldGutter:!0,dropCursor:!1,allowMultipleSelections:!1,indentOnInput:!1,closeBrackets:!1,history:!0,bracketMatching:!1,lineNumbers:!1},extensions:Ot}))}),[t.value,Ot]);return Object(L.c)(c.a.Fragment,null,Object(L.c)("div",{className:"codemirror-editor-wrapper ".concat(yt," "),onClick:function(t){Ut("up",t)},onMouseDown:function(t){Ut("down",t)},onMouseMove:function(t){return Ut("move",t)}},Object(L.c)("div",{className:"foldall-wrapper ".concat(Object(f.a)()),onClick:function(t){!function(){var t=e();j?g.a.unfoldAllChildren(t):g.a.foldAllChildren(t,!1),x(!j)}()}},Object(L.c)(B.b,{name:"".concat(j?"up-right-and-down-left-from-center":"down-left-and-up-right-to-center"),label:"".concat(j?"Unfold all text":"Fold all text")})),qt))})),Q=c.a.memo(X,(function(t,n){var e=!0;return t.forceRender!==n.forceRender&&(e=!1),t.jumpToLine!==n.jumpToLine&&(e=!1),t.file.path!==n.file.path&&(e=!1),e})),tt=function(){return"\n.draggable-grid-wrapper .cm-tooltip {\n\ttransform: inherit!important;\n}\n\n.codemirror-popup-cursor {\n\tposition: fixed;\n\tz-index: 2;\n\tbackground: white;\n\tpadding: 5px;\n\tbox-shadow: 0px 0px 5px rgba(0,0,0,0.3);\n\tborder-radius: 3px;\n}\n.cm-hover-popup.cm-selection-popup {\n\tdisplay: flex;\n\tposition: fixed;\n\tz-index: 2;\n\tbackground: white;\n\tpadding: 5px;\n\tbox-shadow: 0px 0px 5px rgba(0,0,0,0.3);\n\tborder-radius: 3px;\n\topacity:0.4;\n\ttransition: all 0.2s;\n\t.link-action {\n\t\tpadding: 0px 3px;\n\t\tdisplay: flex;\n\t\t.result-calc {\n\t\t\tpadding: 0px 3px;\n\t\t}\n\t}\n\t&:hover {\n\t\topacity:1;\n\t}\n\n}\n.cm-selectionLayer {\n pointer-events: none;\n\t\tz-index:0!important;\n}\n.cm-selectionBackground {\n\t\tbackground: rgba(0,0,0,0.1)!important;\n}\n\n.cm-search {\n\tz-index: 10;\n}\n\n.cm-gutters {\n\t\tborder: none;\n\t\topacity: 0;\n\t\tz-index: 0;\n\t\t&:hover {\n\t\t\t\topacity: 1;\n\t\t}\n\t\t.cm-gutter {\n\t\t\t\t.cm-gutterElement span {\n\t\t\t\t\t\tcolor: #cccaca;\n\t\t\t\t}\n\t\t}\n}\n.device-mobile {\n\t\t.cm-gutters {\n\t\t\t\topacity:1!important;\n\t\t\t\t// background:red!important;\n\t\t}\n}\n\n.foldall-wrapper {\n\t\t&.desktop {\n\t\t\t\topacity: 0;\n\t\t}\n\t\t&.desktop:hover {\t\n\t\t\t\topacity: 1;\n\t\t}\n\t\t&::selection {\n\t\t\t\tbackground: none;\n\t\t}\n\t\t\n\t\topacity:0.6;\n\t\tposition: absolute;\n\t\tz-index: 1;\n\t\ttop: 2px;\n\t\tcolor: #d7d7d7;\n\t\tcursor: pointer;\n\t\tpadding: 5px 4px;\n\t\tleft: 0px;\n\t\tbackground: white;\n}\n\n\n.actionable-title {\n\t\tcolor: ".concat(p.a.colors.main,";\n\t\tdisplay: inline-block;\n\t\tposition: relative;\n\t\t&:hover {\n\t\t\t\t&:before {\n\t\t\t\t\t\topacity: 1\n\t\t\t\t}\n\t\t}\n\t\t&.h1 {\n\t\t\t\tfont-size: ").concat(Object(G.a)(4),"px;\n\t\t\t\tfont-weight: bold;\n\t\t\t\tborder-bottom: ").concat(p.a.colors.main," 2px solid;\n\t\t\t\tmargin-bottom: 3px;\n\t\t}\n\t\t&.h2 {\n\t\t\t\tfont-size: ").concat(Object(G.a)(3),"px;\n\t\t\t\t// text-decoration: underline;\n\t\t\t\tborder-bottom: ").concat(p.a.colors.main," 1px solid;\n\t\t\t\tpadding-bottom: 1px;\n\n\t\t}\n\t\t&.h3 {\n\t\t\t\tfont-size: ").concat(Object(G.a)(2),"px;\n\t\t}\n\t\t&.h4 {\n\t\t\t\tfont-size: ").concat(Object(G.a)(1),"px;\n\t\t}\n\n}\n\n\n.cm-matchingBracket {\n\t\tbackground-color: rgba(0,0,0,0)!important;\n}\n\n\n.cm-content {\n\t\t// font-family: 'Open sans', sans-serif;\n\t\tfont-family: ").concat(p.a.font.editor,";\n\t\tfont-size:").concat(Object(G.a)(1),"px;\n}\n\n.cm-foldPlaceholder {\n\t\tmargin-left: 8px;\n\t\topacity: 0.5;\n\t\tpadding: 2px 5px;\n\t\tborder: none;\n}\n.cm-foldGutter {\n\t\t&::before {\n\n\t\t}\n}\n\n.cm-focused {\n\t\toutline: none!important;\n}\n.main-editor-wrapper {\n\t\t// width: calc(100% + 18px);\n\t\t// margin: 32px 0px 0px 0px;\n\t\tpadding: 0px;\n\t\twidth:100%;\n\t\theight: ").concat(Object(f.c)("desktop")?"calc(100% - 32px);":"calc(100% - 180px);",'; \n}\n\n.codemirror-editor-wrapper {\n\t\t// margin-right: 18px;\n\t\t// width: calc(100% - 10px);\n\t\tposition: relative;\n\t\t// left: -10px;\n}\n.codemirror-editor-wrapper, .cm-editor, .cm-theme {\n\t\t// height: calc(100% - 30px);\n}\n.codemirror-editor-wrapper, \t.cm-editor, .cm-theme {\n\t\theight: 100% ;\n\t\toverflow:hidden;\n\t\tpadding: 0px;\n}\n.cm-editor {\n\t\tword-break: break-word;\n}\n.cm-search {\n\t\tpadding: 6px 10px 11px;\n}\n\n.cm-scroller {\n\t\tz-index: auto!important;\n\t\twidth: calc(100% - 30px);\n\t\twidth: calc(100% - 23px); // reduce width overall CM\n\t\tpadding-right: 35px; // make scrollbar disappear\n\t\tpadding-left: 5px; // some space for the gutter\n\t\t.cm-content {\n\t\twidth: calc(100% - 10px); // needed otherwise x scroll\n\t\toverflow:hidden;\n\t\twhite-space: pre-wrap;\n\t}\xa0\n}\n.cm-line {\n}\n.cm-cursor {\n}\n\n.cm-tooltip-autocomplete {\n\t\t// transform: translate(-50%,-50%);\n\t\tpadding: 10px 5px;\n\t\tbackground: white;\n\t\tborder-radius: 5px;\n\t\tborder: none;\n\t\tbox-shadow: 0px 0px 5px rgba(0,0,0,0.3);\n\t\t[aria-selected="true"]{\n\t\t\t\tbackground: ').concat(p.a.colors.main,";\n\t\t\t\tborder-radius: 2px;\n\t\t}\n\n}\n\n.codemirror-mobile-fallback {\n\t\tmargin: 10px;\n\t\tp {\n\t\t\t\tcolor:grey;\n\t\t\t\tfont-size: ").concat(Object(G.a)(),'px;\n\t\t}\n\t\ttextarea {\n\t\t\t\twidth: calc(100% - 20px);\n\t\t\t\theight: calc(100vh - 230px);\n\t\t\t\tborder: 0px;\n\t\t}\n}\n\n.test-success {\n\t\t// background: orange;\n\t\tcolor: red;\n\t\tdisplay: block;\n\t\tpadding-top: 50px;\n}\n.tiro-image {\n\t\tcolor: red;\n\t\tdisplay: block;\n\t\tpadding: 20px;\n}\n.tiro-image-wrapper{\n\t\tposition: relative;\n\n\t\t&:before {\n\t\t\t\tposition: absolute;\n\t\t\t\ttop: 0px;\n\t\t\t\tleft: 50%;\n\t\t\t\tcontent: "x";\n\t\t\t\twidth: 50%;\n\t\t\t\theight: 100px;\n\t\t\t\tdisplay:block;\n\t\t\t\t// background: orange;\n\n\t\t}\n}\n\n// ').concat(Object(E.d)(),"\n\n// // FILE RESSOURCE PREVIEW\n// ").concat(Object(S.b)(),"\n\n// // PREVIEW LINK\n// ").concat(Object(I.b)(),"\n\n\n// ").concat(Object(D.e)(),"\n")}},166:function(t,n,e){"use strict";e.d(n,"a",(function(){return o}));var o=function(t){!function(){var t=document.getElementById("icon-page");t&&t.remove()}(),function(t){var n=document.createElement("link");n.rel="icon",n.href=t,n.id="icon-page",document.getElementsByTagName("head")[0].appendChild(n)}(t)}},167:function(t,n,e){"use strict";e.d(n,"a",(function(){return a})),e.d(n,"b",(function(){return r}));var o=e(10),i=e(11),c=e(68),a={},r=function(t){console.log("trigger AI search",t.windowId,t.file.path,t.selectionTxt,t.insertPos);var n=t.selectionTxt,e=t.fileContent,r=t.insertPos,l=e,s=!1,u=n=(n=(n=(n=n.replaceAll('"','\\"')).replaceAll("'","\\'")).replaceAll("`","\\`")).replaceAll("$","\\$"),p=function(){return{title:"Ai Answer",currentContent:l,textUpdate:" waiting for answer...",question:u,insertPos:r,windowId:t.windowId,file:t.file,isLast:!1}};a[t.windowId]=!0,Object(i.d)((function(e){var i=e.userSettings.get("ui_editor_ai_command");i=i.replace("{{input}}",n),Object(c.b)(p()),e.command.stream(i,(function(n){if(n.isError&&(s=!0),s){if(console.log("[AI ERROR]",n),""===n.text||"[object Object]"===n.text)return;e.ui.notification.emit({content:"[AI] Error while executing command <br/>============<br/> ANSWER => <br/>".concat(n.text," </br>============"),options:{hideAfter:600}}),Object(c.b)(Object(o.a)(Object(o.a)({},p()),{},{textUpdate:"",isLast:!0,linejump:a[t.windowId]}))}else Object(c.b)(Object(o.a)(Object(o.a)({},p()),{},{textUpdate:n.textTot,isLast:n.isLast,linejump:a[t.windowId]}))}))}))}},17:function(t,n,e){"use strict";e.d(n,"a",(function(){return o}));var o={tokenRefreshInHours:96,path:{staticResources:"static",defaultDataFolder:"markdown-notes",configFolder:".tiro",backendStateFolder:".states",cacheFolder:"cache",historyFolder:".history",archiveFolder:".history_archive",uploadFolder:".resources",relativeUploadFolderName:".resources"},metas:{headerStart:"=== HEADER ===",headerEnd:"=== END HEADER ==="},strings:{folders:"Folders",files:"files",images:"images",trashNote:"Are you sure to trash that note?",clickHereDisconnected:"(click here if persist)",searchingLabel:"searching...",lastNotes:"Last Notes",newNote:"New Note",dateModified:"Modified :",dateCreated:"Created :",searchPlaceholder:"Search Note",hoursAgo:" hours ago",daysAgo:" days ago",minsAgo:" mins ago",months:["January","February","March","April","May","June","July","August","September","October","November","December"],createFolder:"Create folder",createFolderPrompt:"New Folder name to create in",renameFolder:"Rename folder",renameFolderPrompt:"Rename folder to :",deleteFolder:"Delete folder",deleteFolderPrompt:"Are you sure you want to delete the folder and all its notes (no recovery possible) : ",deleteTabPrompt:"Are you sure you want to delete that tab? : ",moveToTrash:"Move to trash",moveToTrashPrompt:"Are you sure you want move folder in .tiro/.trash : ",loadingFolder:"loading...",moveFolderPrompt:"move folder",setupForm:{title:"Login to Tiro",saveToLs:"Autologin/Save for 30 days on that device",introText:"Welcome to Tiro, please fill these informations to get started",user:"user",password:"password",dataFolder:"folder path",userExplanation:"should have > 3 chars",passwordExplanation:"should have > 3 chars",folderExplanation:"relative from Tiro folder installation (../data for example)",successReload:"Configuration file successfully written, reloading application...",submit:"login",noFolder1:"folder path",noFolder2:"doesn't exists, please create it or choose another folder (no data will be deleted)."},appviews:{image:"Switch to Gallery View",text:"Switch to Files View"},loginForm:{wrongUserPassword:"Wrong login/password",wrongToken:"Authentication expired, please log again"},passwordForm:{explanation:"please enter your password",submit:"submit"},editorBar:{tts:"Text to speech",explanation:{history:"File history"},lightbox:"Show Images"},ttsPopup:{title:"Text to speech",voice:"Voice"},settingsPopup:{title:"Tiro Settings",backend:{title:"Server settings",explanation:"Only fill if server is on another port/protocol than the client (usually in development)",protocol:"Https",protocolExpl:"https or http",port:"Backend Port or URL",portExpl:'Port/Url used by backend (ex: "3023" or "backend.myurl.com" or "backend.url.com:3023")'}},historyPopup:{title:"Versions for ",thead:{date:"date",name:"version"}},rgNotWorking:"ERROR: Tiro requires Ripgrep to be working, it seems that ripgrep (rg command) is either not installed or not functionning correctly on you computer. To install it, follow these instructions : https://github.com/BurntSushi/ripgrep#installation",promptPopup:{defaultTitle:"User Prompt",confirmTitle:"Confirm",accept:"Ok",refuse:"Cancel"},tabs:{newTab:"New Tab"}},server:{log:{socket:!1,verbose:!1,fs:!1,ripgrep:!1}},client:{log:{verbose:!1,socket:!1,upload:!1,iframe:!1,eventManager:!1},version:"0.40.1"},dev:{disableLogin:!1}}},178:function(t,n,e){"use strict";e.d(n,"b",(function(){return b})),e.d(n,"a",(function(){return g}));var o=e(15),i=e(55),c=e(666),a=e(17),r=e(31),l="tiro-ls-id-",s=function(t,n){var e=JSON.stringify(n);localStorage.setItem(l+t,e)},u="local_node_history",p="[".concat(u.toUpperCase(),"]"),d=a.a.client.log.verbose,f="notes-history-ls",b=function(t){var n=[],e=Object(i.a)(function(t){var n,e=window.localStorage.getItem(l+t);return e&&(n=JSON.parse(e)),n||null}(f));e&&(n=t?e.filter((function(n){return n.path===t})):e);return n},g=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:6,e=arguments.length>2?arguments[2]:void 0;if(!t.content.includes("--disable-history--")){var i=t,c=b(),a=b(i.path);e&&console.log(p,"adding el to ls : ",{itAdd:i}),c=c.filter((function(t){return t.path!==i.path})),a.unshift(i),a.length>n&&(a=a.slice(0,n)),c=[].concat(Object(o.a)(a),Object(o.a)(c));var r=h(c,3);s(f,r)}},h=function t(n,e){var o=n,i=JSON.stringify(o);return m(i)>e&&o.length>1?(o.pop(),d&&console.log(p,"recursivelyReduceArrTillSmallerThan REDUCE ARR > new length=",o.length),t(o,e)):o},m=function(t){return new Blob([t]).size/1048576};Object(r.a)(u,"addLocalNoteHistory",(function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"/woopy/doopy",e={timestamp:Date.now(),path:n,content:"".concat(Object(c.a)(0,1e7)," helllo helllo helllohelllo helllo helllohelllo helllo helllohelllo helllo helllohelllo helllo helllohelllo helllo helllohelllo helllo helllohelllo helllo helllohelllo helllo helllohelllo helllo helllohelllo helllo helllohelllo helllo helllohelllo helllo helllohelllo helllo helllohelllo helllo helllohelllo helllo helllohelllo helllo helllohelllo helllo helllohelllo helllo helllohelllo helllo helllohelllo helllo helllohelllo helllo helllo")};g(e,10,t)})),Object(r.a)(u,"addLocalNoteHistorySeveral",(function(){for(var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:10,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"/woopy/doopy",o=0;o<t;o++)Object(r.c)(u,"addLocalNoteHistory")(n,e)})),Object(r.a)(u,"getLocalNoteHistory",(function(t){console.log(b(t),"size: ".concat(m(JSON.stringify(b(t))),"MB"))})),Object(r.a)(u,"cleanLocalNoteHistory",(function(){s(f,[]),console.log(b(),"size: ".concat(m(JSON.stringify(b())),"MB"))}))},18:function(t,n,e){"use strict";e.d(n,"b",(function(){return m})),e.d(n,"c",(function(){return v})),e.d(n,"a",(function(){return O})),e.d(n,"d",(function(){return j}));var o=e(5),i=e(55),c=e(0),a=e.n(c),r=e(17),l=e(67),s=e(56),u=e(136),p=e(14),d=e(19),f=e(72),b=e(11),g=e(70),h=e(1),m=function(){var t=Object(u.a)("tiro-login-token");return t||""},v=function(){return"?token=".concat(m())},w=function(t){Object(u.b)("tiro-login-token",t,r.a.tokenRefreshInHours)},O=function(){w("")},j=function(t){var n=Object(c.useState)(!1),e=Object(o.a)(n,2),r=e[0],u=e[1],v=Object(c.useState)(""),O=Object(o.a)(v,2),j=O[0],x=O[1],k=Object(c.useState)(""),y=Object(o.a)(k,2),_=y[0],C=y[1],E=Object(c.useState)(),S=Object(o.a)(E,2),T=S[0],I=S[1],N=Object(c.useRef)(0);Object(c.useEffect)((function(){return N.current=p.b.on("getLoginInfos",(function(n){switch(n.code){case"SUCCESS":if(!n.token)return;w(n.token),u(!1),t.onLoginSuccess();break;case"WRONG_TOKEN":u(!0),I(["error",d.a.loginForm.wrongToken]);var e=n.loginInfos;null!==e&&void 0!==e&&e.demo_mode&&(x("viewer"),C(e.viewer_password)),t.onLoginAsked();break;case"WRONG_USER_PASSWORD":I(["error",d.a.loginForm.wrongUserPassword]),u(!0)}})),function(){p.b.off(N.current)}}),[]);var P=Object(g.a)("user-password-cache-ls",{}),R=Object(o.a)(P,2),A=R[0],F=R[1];Object(c.useEffect)((function(){if(r){var t=Object(f.c)().dic,n="__HARDCODED_LOGIN_LS_PASSWORD_0129dsfaf1029__";t.l1&&t.l2&&t.l1.value&&t.l2.value&&Object(b.d)((function(e){var o,c,a=t.l1.value+t.l2.value;if(A[a])o=A[a].usr,c=A[a].pass;else if(o=e.encryption.decryptUrlParam(t.l1.value,n).plaintext,c=e.encryption.decryptUrlParam(t.l2.value,n).plaintext,o&&c){var r=Object(i.a)(A);r[a]={usr:o,pass:c},F(r)}o&&c&&(x(o),C(c),setTimeout((function(){console.log("success login url, submitting it"),p.b.emit("sendLoginInfos",{user:o,password:c,token:m()})}),1e3))}))}}),[r]);var L=function(){I(void 0),p.b.emit("sendLoginInfos",{user:j,password:_,token:m()})},M=Object(c.useState)(1),D=Object(o.a)(M,2),z=D[0],B=D[1],H=Object(g.a)("login-to-ls",!1),U=Object(o.a)(H,2);U[0],U[1];return{displayLoginPopup:r,LoginPopupComponent:function(t){return Object(h.c)(a.a.Fragment,null,r&&Object(h.c)("div",{className:"setup-popup-component"},Object(h.c)(s.a,{title:d.a.setupForm.title,onClose:function(){}},Object(h.c)("div",null,Object(h.c)(l.a,{shouldFocus:1===z,value:j,onEnterPressed:function(){B(2)},label:d.a.setupForm.user,onChange:function(t){x(t)}}),Object(h.c)(l.a,{shouldFocus:2===z,value:_,label:d.a.setupForm.password,type:"password",onEnterPressed:function(){L()},onChange:function(t){C(t)}}),Object(h.c)("button",{value:"submit",className:"submit-button",onClick:function(t){L()}},d.a.setupForm.submit),T&&Object(h.c)("div",{className:T[0]},T[1])))))}}}},182:function(t,n,e){"use strict";e.d(n,"a",(function(){return u})),e.d(n,"b",(function(){return p}));var o=e(563),i=e(25),c=(e(0),e(9)),a=e(27),r=e(130),l=e(24),s=e(1),u=function(t){var n="faPaperclip";"image"===t.type&&(n="faImage"),"camera"===t.type&&(n="faCamera"),"microphone"===t.type&&(n="faMicrophone");var e="*";"image"===t.type&&(e="image/*"),"camera"===t.type&&(e="image/*"),"microphone"===t.type&&(e="audio/*");var c=Object(o.a)();return Object(s.c)("div",{className:"upload-button-component"},Object(s.c)("input",{className:"input-file-hidden",id:"file-".concat(c),multiple:!0,name:"file-".concat(c),type:"file",capture:"camera"===t.type||"microphone"===t.type,accept:e,onChange:function(n){var e=n.target.files;0!==e.length&&Object(i.a)(e,(function(n,e){Object(r.b)({fileToUpload:n,folder:t.file.folder,windowId:t.windowId})}))}}),Object(s.c)("label",{htmlFor:"file-".concat(c)},Object(s.c)(a.a,{name:n}),Object(s.c)("span",{className:"label-text"},t.label)))},p=function(){return"\n.upload-button-wrapper {\n\t\twidth: 100%;\n\t\tcursor: pointer;\n\t\t.inside-html-wrapper {\n\t\t\t\twidth: 100%;\n\t\t}\n\t\t&:hover {\n\t\t\t\t.label-text { color :".concat(c.a.colors.main,"; }\n\t\t}\n\t\t.upload-button-component {\n\t\t\t\tcursor: pointer;\n\t\t\t\tdisplay: flex;\n\t\t\t\tposition: relative;\n\t\t\t\twidth: 100%;\n\t\t\t\t.input-file-hidden {\n\t\t\t\t\t\twidth: 0.1px;\n\t\t\t\t\t\theight: 0.1px;\n\t\t\t\t\t\topacity: 0;\n\t\t\t\t\t\toverflow: hidden;\n\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\tz-index: -1;\n\t\t\t\t}\n\t\t\t\t.label-text {\n\t\t\t\t\t\tcursor: pointer;\n\t\t\t\t\t\tmargin-left: 18px;\n\t\t\t\t\t\tfont-size:").concat(Object(l.a)(1),"px;\n\t\t\t\t\t\tfont-weight: 400;\n\t\t\t\t}\n\t\t}\n}\n")}},183:function(t,n,e){"use strict";e.d(n,"a",(function(){return o}));var o=function(t,n){var e=n?"|".concat(n):"";return"[link|".concat(t.realname," ").concat(t.folder).concat(e,"]\n")}},184:function(t,n,e){"use strict";e.d(n,"a",(function(){return s})),e.d(n,"b",(function(){return p}));var o=e(10),i=e(66),c=e(11),a=e(122),r="tiro-analytics",l=function(cb){Object(c.d)((function(t){t.cache.get(r,(function(t){var n={};t&&(n=t),cb(n)}))}))},s=function(t){var n=Object(i.c)();l((function(e){var i,l=Object(o.a)({},e);l[n[0]]||(l[n[0]]={}),l[n[0]][n[1]]||(l[n[0]][n[1]]={}),l[n[0]][n[1]][n[2]]||(l[n[0]][n[1]][n[2]]={}),Object(a.a)(l[n[0]][n[1]][n[2]][t])?l[n[0]][n[1]][n[2]][t]++:l[n[0]][n[1]][n[2]][t]=1,i=l,Object(c.d)((function(t){t.cache.set(r,i,-1)}))}))},u=function(cb,t){t||(t={});t.start?t.start:Object(i.c)(Object(i.b)("lastMonth")),t.end?t.end:Object(i.c)();l((function(t){cb(t)}))},p=function(t){return{log:s,report:u}}},19:function(t,n,e){"use strict";e.d(n,"a",(function(){return o}));var o=e(17).a.strings},206:function(t,n,e){"use strict";e.d(n,"a",(function(){return a}));var o=e(25),i=e(30),c=e(41),a=function(t,n){var e=t.match(i.a.image),a=[];return Object(o.a)(e,(function(t){var e=t.match(i.a.firstPartImg),o=e&&e[0]?e[0].replace("![","").replace("]","").replace("(",""):"",r=t.replace(i.a.firstPartImg,"").replace(")",""),l={url:Object(c.a)(n.folder)+"/"+r,title:o,file:n};a.push(l)})),a}},209:function(t,n,e){"use strict";e.d(n,"a",(function(){return l}));var o=e(365),i=e(4),c=e(9),a=e(115),r=e(35),l=function(){return Object(o.a)({theme:"light",settings:{background:"#ffffff",foreground:"#4D4D4C",caret:"#AEAFAD",selection:"#D6D6D6",selectionMatch:"#D6D6D6",gutterBackground:"#FFFFFF",gutterForeground:"#4D4D4C",gutterBorder:"#ddd",lineHighlight:"#fff"},styles:[{tag:i.e.comment,color:"#787b80"},{tag:i.e.definition(i.e.typeName),color:"#194a7b"},{tag:i.e.typeName,color:"#194a7b"},{tag:i.e.tagName,color:"#008a02"},{tag:i.e.variableName,color:"#1a00db"},{tag:i.e.heading,color:c.a.colors.main},{tag:u.Image,color:"red",class:"tiro-image"},{tag:a.b.LatexMdEl,class:"cm-mdpreview-latex-code mdpreview-source"},{tag:i.e.heading1,class:"actionable-title h1"},{tag:i.e.heading2,class:"actionable-title h2"},{tag:i.e.heading3,class:"actionable-title h3"},{tag:i.e.monospace,class:"code-wrapper"},{tag:i.e.content,fontSize:"".concat(r.d.curr.ui_layout_general_font_size,"px")}]})},s={ImageTwo:i.a.define()},u=(Object(i.c)({ImageTwo:s.ImageTwo,"Strikethrough/...":s.ImageTwo}),{ListItem:i.a.define(),headingMark:i.a.define(),LinkReference:i.a.define(),Image:i.a.define(),LinkTitle:i.a.define(),LinkLabel:i.a.define(),Link:i.a.define(),LinkMark:i.a.define(),BulletList:i.a.define()});Object(i.c)({LinkReference:u.LinkReference,ListItem:u.ListItem,Link:u.Link,Image:u.Image,LinkTitle:u.LinkTitle,LinkLabel:u.LinkLabel,LinkMark:u.LinkMark,BulletList:u.BulletList})},210:function(t,n,e){"use strict";e.d(n,"a",(function(){return u})),e.d(n,"b",(function(){return p}));var o=e(5),i=e(0),c=e(56),a=e(19),r=e(9),l=e(67),s=e(1),u=function(t){var n=Object(i.useState)(""),e=Object(o.a)(n,2),r=e[0],u=e[1],p=function(){t.onSubmit(r)};return Object(s.c)("div",{className:"password-popup-wrapper"},Object(s.c)(c.a,{title:a.a.passwordForm.explanation,onClose:function(){t.onClose()}},Object(s.c)("div",null,Object(s.c)(l.a,{value:r,label:a.a.setupForm.password,type:"password",shouldFocus:!0,onChange:function(t){u(t)},onEnterPressed:function(){p()}}),Object(s.c)("button",{className:"submit-button",onClick:function(t){p()}},a.a.passwordForm.submit))))},p=function(){return"\n .submit-button {\n margin-top: 10px;\n ".concat(r.a.els().redButton,";\n\t\tbackground: ").concat(r.a.colors.main,"!important;\n padding: 10px 20px;\n }\n ")}},211:function(t,n,e){"use strict";e.d(n,"a",(function(){return i}));var o=e(367),i=function(t){return t||(t=0),Object(o.isNumber)(t)?t+1:0}},213:function(t,n,e){"use strict";e.d(n,"b",(function(){return a})),e.d(n,"a",(function(){return r}));var o=e(5),i=e(121),c=e(0),a=function(){var t=Object(c.useState)(!1),n=Object(o.a)(t,2),e=n[0],a=n[1],r=Object(c.useRef)(0);return Object(c.useEffect)((function(){var t=Object(i.a)((function(){r.current=r.current+1,a(!0),setTimeout((function(){a(!1)}),200)}),200);return function(){window.removeEventListener("resize",(function(){t()}))}}),[]),{resizeState:e,resizeCount:r}},r=function(t){var n=Object(c.useState)(!1),e=Object(o.a)(n,2),a=e[0],r=e[1];return Object(c.useEffect)((function(){var n=Object(i.a)((function(){r(!0),setTimeout((function(){r(!1)}),200)}),200),e=document.querySelector(t);if(e){var o=new ResizeObserver((function(t){n()}));return o.observe(e),function(){o.disconnect()}}}),[]),{resizeState:a}}},214:function(t,n,e){"use strict";e.d(n,"a",(function(){return c})),e.d(n,"b",(function(){return a}));e(25);var o=e(11),i="notes-view-type",c=function(t){return new Promise((function(n,e){Object(o.d)((function(e){e.cache.get(i,(function(e){if(e){var o=e[t];n(o||!1)}}))}))}))},a=function(t,n){Object(o.d)((function(e){e.cache.get(i,(function(o){o||(o={}),o[t]=n,e.cache.set(i,o,-1)}))}))}},215:function(t,n,e){"use strict";e.d(n,"b",(function(){return o})),e.d(n,"a",(function(){return i}));var o=function(t,n){c(t,(function(t){console.log("ON IMAGE PASTE"),t&&n(t)}))},i=function(t){var n=t.value;navigator&&navigator.clipboard&&navigator.clipboard.writeText(n).then((function(){console.log("Text copied to clipboard...")})).catch((function(t){console.log("Something went wrong",t)}))},c=function(t,n){0==t.clipboardData&&"function"==typeof n&&n(void 0);var e=t.clipboardData.items;void 0==e&&"function"==typeof n&&n(void 0);for(var o=0;o<e.length;o++)if(-1!=e[o].type.indexOf("image")){console.log("[PASTE] informations on files pasted : ",t,e,e.length);var i=e[o].getAsFile();"function"==typeof n&&n(i)}}},216:function(t,n,e){"use strict";e.d(n,"b",(function(){return O})),e.d(n,"a",(function(){return j}));var o=e(23),i=e(5),c=e(0),a=e(78),r=e(159),l=e(63),s=e(13),u=e(25),p=e(122),d=e(217),f=e(11),b=e(32),g=e(91),h=e(9),m=e(73),v=e(1),w=function(t){var n=Object(c.useState)(""),e=Object(i.a)(n,2),o=e[0],f=e[1],h=Object(c.useState)(0),w=Object(i.a)(h,2),O=(w[0],w[1]),j=Object(c.useRef)(0),x=function(t){t>j.current&&(j.current=t),O(j.current)};Object(c.useEffect)((function(){O(0)}),[t.fileContent,t.windowId]);Object(b.a)((function(t){f(t)}),Object(s.e)()?3e3:1e3),Object(b.b)((function(t){f(t)}),1e3);var k=function(t){f(t)};Object(c.useEffect)((function(){k(t.fileContent)}),[t.fileContent,t.file.path,t.windowId]),Object(c.useEffect)((function(){setTimeout((function(){l.a.onWindowLoad(t.windowId)}),500)}),[t.file.path,t.windowId]),Object(c.useEffect)((function(){Object(m.d)(!0)}),[t.file.path,t.windowId]);var y={id:"",line:0,title:""},_=function(n){var e=Object(g.a)(o),i=y;if(Object(u.a)(e,(function(t){n>=t.line&&(i=t)})),""!==i.id){var c=".window-id-".concat(t.windowId," #t-").concat(i.id);try{var a,r=null===(a=document.querySelector(c))||void 0===a?void 0:a.offsetTop;Object(p.a)(r)&&(l.a.updatePreviewOffset(t.windowId,r),l.a.scrollPreview(t.windowId))}catch(s){console.error(s)}}},C=Object(b.b)(_,200),E=Object(b.a)(_,500),S="desktop"===Object(s.a)()&&"editor"===t.viewType||"desktop"!==Object(s.a)()&&"editor"===t.mobileView,T=Object(c.useState)(!1),I=Object(i.a)(T,2),N=I[0],P=I[1];return Object(c.useEffect)((function(){P(!t.canEdit)}),[t.canEdit]),Object(v.c)("div",{className:"dual-view-wrapper view-".concat(t.viewType," device-").concat(Object(s.a)()," window-id-").concat(t.windowId," window-id-sizeref-").concat(t.windowId)},t.isDragging&&Object(v.c)("div",{className:"loading-overlay"},Object(v.c)("div",{className:"loading-text"}," drop to upload")),Object(v.c)(r.a,{viewType:t.viewType,mobileView:t.mobileView,windowId:t.windowId,editorType:"codemirror",showViewToggler:t.showViewToggler,showToolbar:t.showToolbar,titleEditor:t.titleEditor,onTitleEditedHook:function(){P(!0)},file:t.file,canEdit:t.canEdit,fileContent:t.fileContent,isActive:t.isActive,onReloadContent:t.onReloadContent,editorAction:t.editorAction,posY:0,onTitleClick:function(t){!function(t){C(t),E(t)}(t)},onScroll:function(t){},onUpdateY:function(t){},onMaxYUpdate:x,onFileEdited:function(n,e){t.onFileEdited(n,e),k(e)},onScrollModeChange:function(t){},onLayoutUpdate:t.onLayoutUpdate,pluginsConfig:t.pluginsConfig}),N&&Object(v.c)("div",{className:"loading-overlay"},Object(v.c)("div",{className:"loading-text"},"loading...")),!S&&Object(v.c)(a.a,{windowId:t.windowId,file:t.file,posY:0,fileContent:o,onMaxYUpdate:x,yCnt:0,onIframeMouseWheel:function(t){}}),Object(v.c)(d.a,{windowId:t.windowId}))},O=function(t,n){return"\n.omnibar-popup-wrapper {\n\t.dual-view-wrapper {\n\t\t.loading-overlay {\n\t\t\ttop: -2px;\n\t\t}\n\t}\n}\n\t.dual-view-wrapper {\n\t\tposition: relative;\n\t\t.loading-overlay {\n\t\t\t.loading-text {\n\t\t\t\tcolor: ".concat(h.a.colors.main,";\n\t\t\t}\n\n\t\t\tdisplay: flex;\n\t\t\talign-content: center;\n\t\t\tjustify-content: center;\n\t\t\talign-items: center;\n\t\t\twidth: 100%;\n\t\t\theight: calc(120% - 32px);\n\t\t\tposition: absolute;\n\t\t\tbackground: rgba(0,0,0,0.1);\n\t\t\ttop: ").concat("desktop"===Object(s.a)()?"32px":"0px",";\n\t\t\tleft: 0px;\n\t\t\tfont-weight: bold;\n\t\t\tcolor: white;\n\t\t\tz-index: 2;\n\t\t}\n\t}\n\n\t.mobile-view-preview {\n\t\t\n\t\t.editor-area {\n\t\t\tdisplay: none;\n\t\t}\n\t}\n\t\n\t.dual-view-wrapper.device-tablet, \n\t.dual-view-wrapper.device-mobile {\n\t\t\t.editor-area,\n\t\t\t.preview-area-wrapper {\n\t\t\t\t\twidth: 100%;\n\t\t\t}\n\t}\n\t.dual-view-wrapper {\n\t\t\t&.view-both.device-desktop {\n\t\t\t\t\t.preview-area-wrapper {\n\t\t\t\t\t\t\twidth: 50%;\n\t\t\t\t\t}\n\t\t\t}\n\n\n\n\t\t\t.__EDITOR_DESIGN HERE__ {}\n\t\t\t&.view-editor.device-desktop {\n\t\t\t\t\t.editor-area {\n\t\t\t\t\t\t\twidth: 100%;\n\t\t\t\t\t}\n\n\t\t\t\t\t.preview-area-wrapper {\n\t\t\t\t\t\t\t/* display:none; */\n\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\twidth: 10px;\n\t\t\t\t\t\t\tleft: -9999px;\n\t\t\t\t\t\t\ttop: -9999px;\n\n\t\t\t\t\t}\n\t\t\t}\n\n\t\t\t&.view-editor-with-map.device-desktop {\n\t\t\t\t\t.editor-area {\n\t\t\t\t\t\t\twidth: 80%;\n\t\t\t\t\t}\n\n\t\t\t\t\t.__MINIMAP_DESIGN HERE__ {}\n\n\t\t\t\t\t.preview-area-wrapper:hover {\n\t\t\t\t\t\t\theight: calc(100% - 30px);\n\t\t\t\t\t\t\ttransform: scale(1);\n\t\t\t\t\t\t\tright: -50%;\n\t\t\t\t\t\t\topacity: 1;\n\t\t\t\t\t\t\tbox-shadow: -4px 5px 10px rgba(0, 0, 0, 0.10);\n\t\t\t\t\t\t\t.preview-area-transitions {\n\t\t\t\t\t\t\t\t\twidth: 50%;\n\t\t\t\t\t\t\t\t\tpadding: 0px;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t.preview-area-wrapper {\n\t\t\t\t\t\t\ttransition-delay: ").concat(h.a.anim.time,";\n\t\t\t\t\t\t\t/* transition-delay: 0ms; */\n\t\t\t\t\t\t\t/* transition-property: bottom; */\n\t\t\t\t\t\t\tword-break: break-word;\n\t\t\t\t\t\t\ttransform: scale(0.2) translateZ(0);\n\t\t\t\t\t\t\ttransform-origin: 0px 0px;\n\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\twidth: 100%;\n\t\t\t\t\t\t\tright: calc(-80%);\n\t\t\t\t\t\t\t// height: 500vh;\n\t\t\t\t\t\t\theight: calc(100% * 5);\n\t\t\t\t\t\t\t.preview-area-transitions {\n\n\t\t\t\t\t\t\t\t\t/* transition-delay: 0ms; */\n\t\t\t\t\t\t\t\t\t/* transition-property: bottom; */\n\n\t\t\t\t\t\t\t\t\t/* transition-delay:").concat(h.a.anim.time,"; */\n\t\t\t\t\t\t\t\t\t/* transition-property: padding; */\n\n\t\t\t\t\t\t\t\t\ttransition-delay:").concat(h.a.anim.time,"; \n\t\t\t\t\t\t\t\t\t/* transition-property: all; */\n\n\t\t\t\t\t\t\t\t\t/* transition-delay: 0ms; */\n\t\t\t\t\t\t\t\t\t/* transition-property: bottom; */\n\n\t\t\t\t\t\t\t\t\twidth: 73%;\n\t\t\t\t\t\t\t\t\tpadding: 80px;\n\t\t\t\t\t\t\t\t\tpadding-right: 140px;\n\t\t\t\t\t\t\t\t\tpadding-left: 40px;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t}\n\n\t\t\t&.view-preview.device-desktop {\n\t\t\t\t\t.editor-area {\n\t\t\t\t\t\t\twidth: 0%;\n\t\t\t\t\t\t\t.main-editor-wrapper {\n\t\t\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\t\t\tleft: -9999px;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t.preview-area-wrapper {\n\t\t\t\t\t\t\twidth: 100%;\n\t\t\t\t\t\t\t.preview-area {\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t}\n\n\t\t\tposition:relative;\n\t\t\tdisplay: ").concat("desktop"===Object(s.a)()?"flex":"block",";\n\t}\n\t\n")},j=function(t){var n=Object(c.useContext)(f.a),e=(null===n||void 0===n?void 0:n.ui.note.editorAction.get)||null;return Object(v.c)(w,Object(o.a)({},t,{editorAction:e}))}},217:function(t,n,e){"use strict";e.d(n,"a",(function(){return u})),e.d(n,"b",(function(){return p}));var o=e(3),i=e(5),c=e(0),a=e(127),r=e.n(a),l=e(63),s=e(1),u=function(t){var n=Object(c.useState)(0),e=Object(i.a)(n,2),a=e[0],u=e[1],p=Object(c.useRef)(null),d=Object(c.useRef)(null),f=function(){var t={maxY:0,y:0,percent:0},n=d.current?d.current:null,e=p.current?p.current:null;if(!e||!n)return t;var o=e.getBoundingClientRect().height,i=n.getBoundingClientRect().y;return t.maxY=n.getBoundingClientRect().height-o,t.y=e.getBoundingClientRect().y-i,t.percent=t.y/t.maxY*100,t};Object(c.useEffect)((function(){var n=d.current?d.current:null;if(n){var e=new MutationObserver((function(n,e){var i,c=Object(o.a)(n);try{for(c.s();!(i=c.n()).done;){if("data-scroll-refresh"===i.value.attributeName){var a=l.a.getScrollObj(t.windowId),r=a.dims.scroller.viewport;r<20&&(r=20),m(r);var s=(a.dims.scroller.full-a.dims.scroller.viewport)/100,p=a.posPercent*s;u(p)}}}catch(d){c.e(d)}finally{c.f()}}));return e.observe(n,{attributes:!0}),function(){e.disconnect()}}}),[t.windowId]);var b=Object(c.useState)(0),g=Object(i.a)(b,2),h=g[0],m=g[1];return Object(s.c)("div",{className:"scrolling-bar-wrapper",ref:d},Object(s.c)(r.a,{onDrag:function(n){l.a.onScrollerScroll(t.windowId,f().percent)},onStop:function(){u(f().y)},position:{x:0,y:a},axis:"y",bounds:"parent"},Object(s.c)("div",{ref:p,style:{height:"".concat(h,"px")},className:"scrolling-bar"})))},p=function(){return"\n.view-editor .scrolling-bar-wrapper {\n}\n\n.scrolling-bar-wrapper {\n\t\toverflow: hidden;\n\t\tposition: absolute;\n\t\ttop: 33px;\n\t\theight: calc(100% - 53px);\n\t\tbackground: rgb(226,226,226);\n\t\twidth: 10px;\n\t\tright: 0px;\n\t\tposition: absolute;\n\n\t\t.scrolling-bar {\n\t\t\t\tcursor: ns-resize;\n\t\t\t\tbackground: #cdcccc;\n\t\t\t\theight: 20px;\n\n\t\t}\n}\n"}},218:function(t,n,e){"use strict";e.d(n,"a",(function(){return r}));var o=e(29),i=e(17),c=e(18),a=e(14),r=function(t){return Object(o.b)("".concat(Object(a.c)(),"/").concat(i.a.path.staticResources,"/").concat(t,"?token=").concat(Object(c.b)()))}},219:function(t,n,e){"use strict";e.d(n,"a",(function(){return a})),e.d(n,"b",(function(){return r}));e(0);var o=e(9),i=e(27),c=e(1),a=function(t){var n=t.dir?t.dir:"left",e=t.maxHeight?t.maxHeight:50;return Object(c.c)("div",{className:"dropdown-wrapper ".concat(n," ").concat(t.hover?"hover-active":"")},Object(c.c)("span",{onMouseEnter:function(){t.onMouseEnter&&t.onMouseEnter()},onMouseLeave:function(){t.onMouseLeave&&t.onMouseLeave()},onClick:function(){},className:"context-menu-wrapper"},Object(c.c)("div",{className:"dropdown-icon"},Object(c.c)(i.a,{name:"faEllipsisH"})),Object(c.c)("div",{className:"context-menu",style:{maxHeight:e}},t.children)))},r=function(){return"\n.dropdown-wrapper {\n\t\t\n\t\tposition: relative;\n\t\t&.hover-active:hover {\n\t\t\t\t.context-menu {\n\t\t\t\t\t\topacity: 1;\n\t\t\t\t\t\tpointer-events: all;\n\t\t\t\t}\n\t\t\t\t.dropdown-icon {\n\t\t\t\t\t\tsvg {\n\t\t\t\t\t\t\t\tcolor: ".concat(o.a.colors.main,";\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t}\n\n\t\t.dropdown-icon {\n\t\t\t\tposition: absolute;\n\t\t\t\tpadding: 10px;\n\t\t\t\ttop: -10px;\n\t\t\t\tsvg {\n\t\t\t\t\t\tcolor: #d4d1d1;\n\t\t\t\t}\n\t\t}\n\n\t\t.context-menu {\n\t\t\t\toverflow-y: scroll;\n\t\t\t\tz-index: 1000;\n\t\t\t\tright: 10px;\n\t\t\t\ttop: 20px;\n\t\t\t\tpointer-events: none;\n\n\n\t\t\t\ttransition: 0.2s all;\n\t\t\t\ttransition-delay: 0.2s, 0s;\n\t\t\t\tposition: absolute;\n\t\t\t\topacity: 0;\n\n\t\t\t\tmin-width: 140px;\n\t\t\t\tpadding: 10px;\n\t\t\t\tborder-radius: 5px;\n\t\t\t\tbackground: white;\n\t\t\t\tbox-shadow: 0px 0px 5px rgba(0,0,0,.2);\n\t\t\t\toverflow: auto;\n\t\t}\t\n\n\t\t&.right {\n\t\t\t\t.dropdown-icon {\n\t\t\t\t\t\tright: 0px;\n\t\t\t\t}\n\t\t}\n}\n")}},220:function(t,n,e){"use strict";e.d(n,"a",(function(){return a})),e.d(n,"b",(function(){return r}));var o=e(0),i=e.n(o),c=e(1),a=function(t){var n=t.progress,e=n>=0&&n<100;return Object(c.c)(i.a.Fragment,null,e&&Object(c.c)("div",{className:"upload-progress-bar-wrapper"},Object(c.c)("div",{className:"bg-fill",style:{width:"".concat(n,"%")}}),Object(c.c)("div",{className:"label"},n,"% uploaded... ")))},r=function(){return"\n.device-mobile {\n\t\t.upload-progress-bar-wrapper {\n\t\t\t\tbottom: 176px;\n\t\t}\n}\n.upload-progress-bar-wrapper {\n\t\t.label {\n\t\t\t\tposition: relative;\n\t\t}\n\t\t.bg-fill {\n\t\t\t\ttransition: 0.1s all;\n\t\t\t\tposition:absolute;\n\t\t\t\tbackground: #077e00;\n\t\t\t\theight: 100%;\n\t\t\t\ttop: 0px;\n\t\t\t\tleft: 0px;\n\t\t}\n\t\tposition:absolute;\n\t\tbottom: 0px;\n\t\twidth: 100%;\n\t\tleft: 0px;\n\t\t/* background: green; */\n\t\tbackground: #a0a0a0;\n\t\tcolor: white;\n\t\ttext-align: center;\n\t\tz-index:3;\n\t\tfont-size: 9px;\n\t\tpadding: 5px;\n}\n"}},221:function(t,n,e){"use strict";e.d(n,"b",(function(){return l})),e.d(n,"a",(function(){return u}));var o=e(30),i=e(11),c=e(28),a=e(9),r=e(45),l=function(t,n){return Object(r.a)({file:t,windowId:n,pattern:o.a.hashtag,replacement:function(n){var e=n.matchs,o=document.createElement("span");return o.classList.add("cm-hashtag"),o.innerHTML='<span class="hash-inner" \n data-hashtag="'.concat(e[1],'"\n data-hashtag2="').concat(e[0],'"\n data-folder="').concat(t.folder,'"\n onclick="').concat(Object(c.c)("open-win-smartlist-hashtag",s),'" >').concat(e[0],"</a>"),o},options:{isAtomic:!1}})},s=function(t){if(t){var n=t.dataset.hashtag2,e=t.dataset.folder;Object(i.d)((function(t){t.ui.floatingPanel.create({type:"ctag",layout:"full-bottom",ctagConfig:{tagName:"smartlist",content:"- | ".concat(e," | ").concat(n)}})}))}},u=function(){return"\n .cm-hashtag {\n &:hover {\n opacity: 1;\n }\n opacity: 0.3;\n transition: opacity 0.2s;\n // color: var(--color-text);\n color: grey;\n background: ".concat(a.a.colors.main,";\n color: ").concat(a.a.colors.mainFont,";\n border-radius: 3px;\n padding: 2px 4px;\n margin: 0 2px;\n // display: inline-block;\n font-size: 0.9em;\n .hash-inner {\n cursor: pointer;\n }\n }\n")}},222:function(t,n,e){"use strict";e.d(n,"a",(function(){return s})),e.d(n,"b",(function(){return p}));var o=e(30),i=e(11),c=e(28),a=e(9),r=e(45),l=e(24),s=function(t,n){return Object(r.a)({file:t,windowId:n,pattern:o.a.dateFrFormat,replacement:function(t){var e=t.matchs,o=(t.view,t.pos),i=document.createElement("span"),a=e[0].split("/"),r="".concat(a[2],"-").concat(a[1],"-").concat(a[0]);return i.innerHTML='<span class="date-picker-cm-wrapper"><input type="date" id="date-picker-cm-input" lang="fr-FR" data-replacepos="'.concat(o,'" data-windowid="').concat(n,'" value="').concat(r,'" onchange="').concat(Object(c.c)("replace-date-text-datepicker",u),'"/></span>'),i},options:{cache:!1}})},u=function(t){if(console.log("el1"),t){var n=t.dataset.replacepos,e=t.dataset.windowid;console.log("el",t.value,n);var o=t.value.split("-"),c="".concat(o[2],"/").concat(o[1],"/").concat(o[0]);if(-1===(n=parseInt(n)||-1))return console.warn("no pos");Object(i.d)((function(t){console.log("replacedatetext",c,n),t.ui.note.editorAction.dispatch({windowId:e,type:"replaceText",replaceText:c,replacePos:n})}))}},p=function(){return"\n .date-picker-cm-wrapper {\n cursor: pointer;\n input {\n padding: 0px;\n border: none;\n font-size: ".concat(Object(l.a)(),"px;\n font-weight: 400;\n font-family: ").concat(a.a.font.editor,";\n margin-right: 0px;\n color: #4d4d4d;\n background: #e9e9e9;\n position: relative;\n border-radius: 3px;\n padding: 2px 6px;\n cursor: pointer;\n }\n }\n")}},223:function(t,n,e){"use strict";e.d(n,"a",(function(){return r})),e.d(n,"b",(function(){return s}));var o=e(30),i=e(11),c=e(28),a=e(45),r=function(t,n){return Object(a.a)({file:t,windowId:n,pattern:o.a.checkbox,replacement:function(t){var e=t.matchs,o=(t.view,t.pos),i=document.createElement("span"),a=e[0].toLocaleLowerCase().includes("x"),r=a?"checked='checked'":"";return i.innerHTML='<span class="checkbox-todo-cm-wrapper">'+'<input type="checkbox" id="checkbox-todo-cm-input" '.concat(r)+'data-replacepos="'.concat(o,'" data-ischecked="').concat(a,'" data-windowid="').concat(n,'" value="" ')+'onchange="'.concat(Object(c.c)("replace-checkbox-todo-text",l),'"/></span>'),i},options:{cache:!1}})},l=function(t){if(t){var n=t.dataset.replacepos,e=t.dataset.windowid,o=t.dataset.ischecked;if(-1===(n=parseInt(n)||-1))return console.warn("no pos");Object(i.d)((function(t){t.ui.note.editorAction.dispatch({windowId:e,type:"replaceText",replaceText:"true"===o?"[ ]":"[x]",replacePos:n})}))}},s=function(){return"\n .checkbox-todo-cm-wrapper {\n cursor: pointer;\n input {\n position: relative;\n top: 4px;\n transform: scale(.7);\n cursor: pointer;\n margin: 0px;\n }\n }\n"}},224:function(t,n,e){"use strict";e.d(n,"a",(function(){return u})),e.d(n,"b",(function(){return p}));var o=e(29),i=e(30),c=e(28),a=e(71),r=e(65),l=e(9),s=e(45),u=function(t,n){return Object(s.a)({file:t,windowId:n,pattern:i.a.userCustomTagFull2,replacement:function(e){var i=document.createElement("span");return i.innerHTML=function(t,n,e){var i=t[2].replaceAll("[[","").replaceAll("]]",""),l=t[0].replaceAll("[[".concat(i,"]]"),""),s=function(t,n,e){return"".concat(Object(r.b)(t,""),"-").concat(Object(r.b)(n,""),"-").concat(Object(r.b)(e,""))},u=s(i,l,n.path),p="ress-".concat(u);Object(c.a)(n,u,(function(){var t=document.querySelector(".".concat(p," .iframe-wrapper-cm-ctag"));if(t){var o=Object(a.b)(i,l,e,{file:n});Object(a.c)(t,o)}}));var d='\n\t<div class="button-ctag-cm-toggle" \n\t\tonclick="'.concat(Object(c.c)("toggle-ctag-link",(function(t){if(t){var n=t.dataset.filepath,e=decodeURIComponent(t.dataset.tagcontent),i=t.dataset.tagname,r=t.dataset.windowid,l=s(i,e,n),u=Object(o.d)(n),p=t.parentNode.parentNode.querySelector(".iframe-wrapper-cm-ctag"),d=p.querySelector("iframe")?"closed":"open";Object(c.b)(u,l,d);var f=Object(a.b)(i,e,r,{file:u});Object(a.c)(p,f)}})),'"\n\t\tdata-filepath="').concat(n.path,'"\n\t\tdata-windowid="').concat(e,'"\n\t\tdata-tagname="').concat(i,'"\n\t\tdata-tagcontent="').concat(encodeURIComponent(l),'"\n\t>').concat(Object(c.d)("eye"),"</div>"),f='<div class="cm-ctag-name">[[ '.concat(i," ]]</div>"),b='<div class="cm-ctag-overview">'.concat(f).concat(d,"</div>");return'<div class="cm-ctag-wrapper '.concat(p,'">').concat(b).concat('<div class="iframe-wrapper-cm-ctag"></div>',"</div>")}(e.matchs,t,n),i}})},p=function(){return"\n\t.cm-ctag-wrapper {\n\t\tposition:relative;\n\t\tbackground: #f2f2f2;\n\t\tpadding: 8px;\n\t\tborder-radius: 5px;\n\t\t.cm-ctag-overview {\n\t\t\tdisplay: flex;\n\t\t\t.cm-ctag-name {\n\t\t\t\tfont-weight: bold;\n\t\t\t\tcolor: ".concat(l.a.colors.main,";\n\t\t\t}\n\t\t\t.button-ctag-cm-toggle {\n\t\t\t\tposition: absolute;\n\t\t\t\tright: 0px;\n\t\t\t\ttop: -1px;\n\t\t\t\topacity: 0.5;\n\t\t\t\tcursor: pointer;\n\t\t\t\tpadding: 10px;\n\t\t\t\t&:hover {\n\t\t\t\t\topacity: 0.7;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t.iframe-wrapper-cm-ctag {\n\n\t\t}\n\t}\n\t\n\n\t")}},225:function(t,n,e){"use strict";e.d(n,"a",(function(){return f})),e.d(n,"b",(function(){return b}));var o=e(10),i=e(5),c=e(0),a=e(68),r=e(9),l=e(42),s=e(13),u=e(35),p=e(24),d=e(1),f=function(t){var n=Object(c.useState)(!1),e=Object(i.a)(n,2),p=e[0],f=e[1],b=Object(c.useState)(!1),g=Object(i.a)(b,2),h=g[0],m=g[1];Object(c.useEffect)((function(){p&&m(!0)}),[t.cursorInfos.y]);var v=function(n){m(!1),t.onButtonClicked(n)},w=[{icon:"faCircle",action:function(){f(!1),m(!1)},class:"separator"},{icon:"faUndo",action:function(){return v("undo")}},{icon:"faRedo",action:function(){return v("redo")}},{icon:"faAngleLeft",action:function(){return v("<-")}},{icon:"faAngleRight",action:function(){return v("->")}},{icon:"faCheckSquare",action:function(){return v("[x]")}},{icon:"faAngleUp",action:function(){return v("^")}},{icon:"faAngleDown",action:function(){return v("v")}},{icon:"faEraser",action:function(){return v("X")}},{icon:"faClone",action:function(){return v("C")}}],O=[];if(O.push({icon:"faCircle",action:function(){return f(!0)}}),t.selection.length>0){var j=Object(a.d)(t.selection),x={icon:"chart-line",action:function(){},customHtml:Object(d.c)("div",{className:"numbers-preview-wrapper"},Object(d.c)("i",{className:"fa fa-chart-line"}),Object(d.c)("span",{className:"numbers-preview"},Object(a.h)(t.selection)))};j&&(x={icon:"calculator",title:"Calculate selection",customHtml:Object(d.c)("div",{className:"numbers-preview-wrapper"},Object(d.c)("i",{className:"fa fa-calculator"}),Object(d.c)("span",{className:"numbers-preview"},Object(a.a)(t.selection))),action:function(){t.onButtonClicked("calc"),f(!1)}});var k={icon:"wand-magic-sparkles",title:"AI assistant",action:function(){t.onButtonClicked("aiSearch"),f(!1)}},y={icon:"copy",title:"Copy line link",action:function(){t.onButtonClicked("copyLineLink"),f(!1)}},_={icon:"spell-check",title:"Proofread selection",action:function(){t.onButtonClicked("proofread"),f(!1)}};u.d.curr.ui_editor_live_watch&&O.push(k),O.push(y),O.push(_),u.d.curr.ui_editor_live_watch&&O.push(x);var C=Object(o.a)({},x);C.class="separator-right",u.d.curr.ui_editor_live_watch&&w.push(C),w.push(y),w.push(_),u.d.curr.ui_editor_live_watch&&w.push(k)}return Object(d.c)("div",{className:"mobile-toolbar-wrapper device-".concat(Object(s.a)()," ").concat(p?"open":"closed"," ").concat(h?"popup-transparent":"")},!p&&Object(d.c)(l.a,{class:"mobile-text-manip-toolbar closed",size:"desktop"===Object(s.a)()?.8:1,colors:[r.a.colors.editor.mobileToolbar.font,r.a.colors.editor.mobileToolbar.font],buttons:O,popup:!1}),p&&Object(d.c)(l.a,{class:"mobile-text-manip-toolbar",size:"desktop"===Object(s.a)()?.8:1,colors:[r.a.colors.editor.mobileToolbar.font,r.a.colors.editor.mobileToolbar.font],buttons:w,popup:!1}))},b=function(){return"\n.mobile-text-manip-toolbar-wrapper {\n z-index:1;\n \n \n pointer-events: none;\n position: absolute;\n width: 100%;\n // z-index: 100;\n display: flex;\n justify-content: flex-end;\n}\n.mobile-text-manip-toolbar {\n \n \n\t\t.toolbar-button {\n\t\t\t\tpadding: 13px 20px;\n\t\t}\n}\n\n.numbers-preview-wrapper {\n display: flex;\n font-size: ".concat(Object(p.a)(),"px;\n font-weight: 400;\n i {\n margin-top: 2px;\n }\n .numbers-preview {\n margin-left: 5px;\n }\n}\n\n .mobile-toolbar-wrapper {\n &.popup-transparent {\n opacity: 0.4;\n }\n\n\n .mobile-text-manip-toolbar {\n width: 10px;\n flex-direction: column;\n pointer-events: all;\n margin-right:20px;\n \n background: #fff;\n border-radius: 10px;\n display: flex;\n list-style: none;\n padding: 0px 10px;\n box-shadow: 0px 0px 5px 0px rgba(0,0,0,0.2);\n align-content: center;\n justify-content: center;\n align-items: center;\n // height: ").concat(r.a.sizes.mobile.editorBar,"px;\n &:hover {\n opacity: 1;\n }\n opacity: 0.4;\n left: 15px;\n \n transition: opacity 0.2s;\n \n .toolbar-button {\n padding: 3px 5px; \n }\n .separator {\n // margin-left: 8px;\n }\n .separator-right {\n // margin-right: 8px;\n }\n\n li {\n flex: 1 1 auto;\n justify-content: center;\n display: flex;\n }\n\n &.closed {\n opacity: 0.2;\n background: none;\n box-shadow: none;\n &:hover {\n background: #fff;\n box-shadow: 0px 0px 5px 0px rgba(0,0,0,0.2);\n opacity: 1;\n }\n }\n\n \n }\n\n &.device-mobile {\n .mobile-text-manip-toolbar {\n transform: scale(0.9);r\n opacity: 1;\n &.closed {\n opacity: 0.2;\n &:hover {\n opacity: 1;\n }\n } \n transform: scale(1);\n .toolbar-button {\n // padding: 12px; \n }\n }\n }\n \n }\n")}},226:function(t,n,e){"use strict";e.d(n,"a",(function(){return x})),e.d(n,"b",(function(){return k}));var o=e(15),i=e(5),c=e(25),a=e(564),r=e(0),l=e.n(r),s=e(227),u=e(11),p=e(18),d=e(89),f=e(66),b=e(178),g=e(14),h=e(19),m=e(9),v=e(27),w=e(56),O=e(24),j=e(1),x=function(t){var n=Object(r.useState)([]),e=Object(i.a)(n,2),m=e[0],O=e[1],x=Object(r.useState)(!1),k=Object(i.a)(x,2),y=k[0],_=k[1],C=function(){var n=E();O([].concat(n)),_(!0),g.b.emit("askFileHistory",{filepath:t.file.path,token:Object(p.b)()});var e=g.b.on("getFileHistory",(function(t){var i=[];Object(c.a)(t.files,(function(t){var n,e=null===(n=t.filenameWithoutExt)||void 0===n?void 0:n.split("___")[1];e&&(t.created=Object(s.a)(e).num.timestamp),t.created&&t.created<Date.now()&&i.push(t)}));var r=Object(a.a)(i,["created"],["desc"]);O([].concat(n,Object(o.a)(r))),_(!1),g.b.off(e)}))},E=function(){var n=[],e=Object(b.b)(t.file.path);return Object(c.a)(e,(function(t,e){var o=e+1,i=Object(d.a)();i.created=t.timestamp,i.path=t.path+o;var c="Temporary local save ".concat(o," from ").concat(Object(f.a)(new Date(i.created||0)));i.name=c,i.realname=c,i.localContent=t.content,i.isLocal=!0,n.push(i)})),console.log("getLSHistoryList",e,t.file.path),n};Object(r.useEffect)((function(){C()}),[]);var S=Object(r.useContext)(u.a),T=Object(r.useState)(""),I=Object(i.a)(T,2),N=I[0],P=I[1],R=Object(r.useState)(null),A=Object(i.a)(R,2),F=A[0],L=A[1];return Object(j.c)("div",{className:"history-popup-wrapper"},Object(j.c)(w.a,{title:"".concat(h.a.historyPopup.title,'"').concat(t.file.realname,'"'),onClose:function(){t.onClose()}},Object(j.c)("div",{className:"count"},m.length," backups found :"),y&&Object(j.c)("div",{className:"count"}," (Loading backend history files...)"),Object(j.c)("div",{className:"table-wrapper"},Object(j.c)("table",null,Object(j.c)("thead",null,Object(j.c)("tr",null,Object(j.c)("th",null,h.a.historyPopup.thead.name),Object(j.c)("th",null,h.a.historyPopup.thead.date))),Object(j.c)("tbody",null,m.map((function(t){return Object(j.c)("tr",{className:"".concat((null===F||void 0===F?void 0:F.path)===t.path?"active":""),onClick:function(){!function(t){t.isLocal&&t.localContent?(P(t.localContent),L(t)):S&&S.file.getContent(t.path,(function(n){P(n),L(t)}))}(t)}},Object(j.c)("td",null," ",t.realname," "),Object(j.c)("td",null," ",Object(f.a)(new Date(t.created||0))," "),Object(j.c)("td",null," ",!t.isLocal&&Object(j.c)("div",{className:"trash",onClick:function(){!function(t){Object(u.d)((function(n){n.file.delete(t,(function(t){C(),L(null),P("")}))}))}(t)}}," ",Object(j.c)(v.a,{name:"faTrash",color:"grey"})," ")))}))))),N&&Object(j.c)(l.a.Fragment,null,Object(j.c)("div",{className:"note-preview"},Object(j.c)("textarea",{className:"note-preview-textarea",value:N}),Object(j.c)("div",{className:"button-wrapper"},Object(j.c)("button",{className:"button",onClick:function(){Object(u.d)((function(n){n.file.saveContent(t.file.path,N)}))}},"Restore version")),Object(j.c)("div",{className:"advice"},' To disable history backup for a note, add "--disable-history--"in it')))))},k=function(){return"\n.history-popup-wrapper .popup-wrapper-component .popup-wrapper {\n\theight: 70%;\n}\n.history-popup-wrapper .popup-wrapper .count {\n\tposition: relative;\n top: -9px;\n font-weight: 600;\n}\n.filemain-wrapper .history-popup-wrapper .popup-wrapper-component .popup-wrapper {\n\twidth: 90%;\n}\n.history-popup-wrapper {\n\t.popup-wrapper .popupContent {\n\t\t// max-height: 70vh;\n\t\tpadding: 0px;\n\t}\n\t.table-wrapper {\n\t\t// max-height: 30vh;\n\t\theight: 50%;\n\t\toverflow-y: auto;\n\t\tpadding: 0px 0px 20px 0px;\n\t\t\n\t\ttable {\n\t\t\tborder-spacing: 0px;\n\t\t\tthead {\n\t\t\t\ttr {\n\t\t\t\t\tth {\n\t\t\t\t\t\tpadding: 8px;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\ttbody {\n\t\t\t\ttext-align: left;\n\t\t\t\ttr {\n\t\t\t\t\tcursor: pointer;\n\t\t\t\t\tbackground: #f1f0f0;\n\t\t\t\t\t&:nth-child(2n) {\n\t\t\t\t\t\tbackground: none;\n\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t&.active {\n\t\t\t\t\t\t\t\t\t\t\tfont-weight: bold;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t&: hover {\n\t\t\t\t\t\tbackground: r".concat(m.a.colors.main,";\n\t\t\t\t\t}\n\t\t\t\t\ttd {\n\t\t\t\t\t\tpadding: 8px;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t.note-preview {\n\t\theight: 50%;\n\t\t.note-preview-textarea {\n\t\t\tpadding: 6px;\n\t\t\tmargin: 10px 0px 0px 0px;\n\t\t\twidth: calc(100% - 10px);\n\t\t\t// height: calc(100% - 90px);\n\t\t\theight: calc(100% - 89px);\n\t\t\tborder: none;\n\t\t\tbackground: gainsboro;\n\t\t}\n\t}\n\t.advice {\n\t\tcolor: #a4a4a4;\n\tfont-size: ").concat(Object(O.a)(),"px;\n\tpadding: 3px 3px;\n\t}\n\t.trash {\n\tmargin-right: 15px;\n\t}\n}\n")}},227:function(t,n,e){"use strict";e.d(n,"a",(function(){return i}));var o=function(t){return("0"+t).slice(-2)};String.prototype.replaceAll||(String.prototype.replaceAll=function(t,n){return"[object regexp]"===Object.prototype.toString.call(t).toLowerCase()?this.replace(t,n):this.replace(new RegExp(t,"g"),n)});var i=function(t){var n=function(t){var n=new Date;if(t&&""!==t&&"undefined"!==t)if("string"===typeof t){var e=t,i=t;if(t.startsWith("f")){var c=(e=t.replaceAll("f","").replaceAll("h",":").replaceAll("m",":00").replaceAll("-","/").replaceAll("_"," ")).split("/");e="".concat(c[1],"/").concat(c[0],"/").concat(c[2]),i="".concat(c[0],"/").concat(c[1],"/").concat(c[2])}else if(t.startsWith("d")){var a=t.replaceAll("d","").split("_")[0].split("-");e="".concat(a[1],"/").concat(a[0],"/").concat(a[2])}else if(t.startsWith("w")){var r=t.replaceAll("w","").split("-"),l=o(7*parseInt(r[0]));e="".concat(r[1],"/").concat(l,"/").concat(r[2])}else if(t.startsWith("h")){var s=(e=t.replace("h","").replaceAll("h",":00:00").replaceAll("-","/").replaceAll("_"," ")).split("/");e="".concat(s[1],"/").concat(s[0],"/").concat(s[2])}var u=Number.isNaN(new Date(e).getDate());n=new Date(e),u&&(n=new Date(i))}else n=new Date(t);else n=new Date;return n}(t),e=n.getFullYear(),i=n.getMonth()+1,c=n.getDate(),a=e.toString(),r=o(i),l=o(c),s=o(n.getHours()),u=o(n.getMinutes()),p="".concat(r,"/").concat(l,"/").concat(a," ").concat(s,":").concat(u),d="".concat(r,"-").concat(l,"-").concat(a,"_").concat(s,"h").concat(u,"m"),f="".concat(l,"-").concat(r,"-").concat(a,"_").concat(s,"h").concat(u,"m"),b="".concat(r,"/").concat(l,"/").concat(a),g={year:e,month:i,day:c,hour:n.getHours(),min:n.getMinutes(),timestamp:n.getTime()},h=function(){return Math.ceil(c/7)};return{year:a,month:r,day:l,hour:s,min:u,full:p,num:g,date:b,raw:n,full_file:d,full_file_fr:f,getWeekNb:h,getCustomFormat:function(t){var n="f".concat(f);return"day"===t&&(n="d".concat(l,"-").concat(r,"-").concat(e)),"week"===t&&(n="w".concat(h(),"-").concat(r,"-").concat(e)),"hour"===t&&(n="h".concat(l,"-").concat(r,"-").concat(e,"_").concat(s,"h")),"".concat(n)}}}},233:function(t,n,e){"use strict";e.d(n,"a",(function(){return g})),e.d(n,"b",(function(){return h}));var o=e(5),i=e(10),c=e(235),a=e(25),r=e(55),l=e(0),s=e.n(l),u=e(11),p=e(19),d=e(118),f=e(1);var b={upload:{uploadCounter:0,reinit:function(){}},file:{onTitleUpdate:function(t,n){},onFileDelete:function(t){}}},g=s.a.createContext(b),h=function(t){var n=Object(i.a)({},t).tab,e=Object(l.useContext)(u.a),c=Object(l.useState)(b),s=Object(o.a)(c,2),h=s[0],v=s[1],w=function(){var t=Object(l.useContext)(u.a),n=Object(l.useState)({name:"",data:{}}),e=Object(o.a)(n,2),i=e[0],c=e[1],a=Object(l.useRef)({});return Object(l.useEffect)((function(){if(t){var cb=a.current[i.name];cb&&cb(t,i.data)}}),[i]),{onNextStateTrigger:function(t){c(t)},addNextStateAction:function(t,cb){a.current[t]=cb}}}(),O=w.onNextStateTrigger,j=w.addNextStateAction;j("refreshFolderList",(function(t,n){var e=t.ui.browser.folders.current.get();e===n.folder&&(t.ui.browser.goTo(e,n.name,{openIn:"activeWindow"}),O({name:"checkIfNoWindows"}))})),j("checkIfNoWindows",(function(t){0===n.grid.content.length&&t.tabs.close(n.id)}));var x=Object(r.a)(h);x.file.onFileDelete=function(t){e&&e.popup.confirm("".concat(p.a.trashNote),(function(){var n;null===(n=e.lastNotesApi)||void 0===n||n.removeFile(t.path),e.file.delete(t,(function(n){e.ui.windows.getIdsFromFile(t.path),n[n.length-1];var o=n[0];Object(a.a)(n,(function(t){t.modified&&o.modified&&t.modified>o.modified&&(o=t)})),O({name:"refreshFolderList",data:o})}))}))},x.file.onTitleUpdate=function(t,n){e&&e.file.move(t,n,(function(o){var i,c=null;if(Object(a.a)(o,(function(t){t.path===n&&(c=t)})),c){var r=e.ui.windows.getIdsFromFile(t);e.ui.windows.updateWindows(r,c),null===(i=e.lastNotesApi)||void 0===i||i.removeFile(t),O({name:"refreshFolderList",data:c})}}))},x.upload.reinit=function(){var t=Object(r.a)(h);delete t.upload.file,v(t)};var k=Object(l.useState)(0),y=Object(o.a)(k,2),_=y[0],C=y[1];return Object(l.useEffect)((function(){C(_+1)}),[n.refresh,JSON.stringify(t.pinStatus),t.forceRefresh]),Object(f.c)(m,null,Object(f.c)("div",{className:"window-grid-wrapper"},Object(f.c)(g.Provider,{value:x},Object(f.c)(d.a,{refresh:_,grid:n.grid,onGridUpdate:t.onGridUpdate,mobileView:t.mobileView}))))},m=Object(c.a)("div",{target:"ejnwhwz0"})({name:"zk0z9r",styles:"height:100%;.window-grid-wrapper{height:100%;}"})},237:function(t,n,e){"use strict";e.d(n,"b",(function(){return d})),e.d(n,"a",(function(){return f}));var o=e(5),i=e(0),c=e.n(i),a=e(13),r=e(9),l=e(27),s=e(170),u=e(1),p=function(t){var n=Object(i.useState)(""),e=Object(o.a)(n,2),c=e[0],p=e[1],d=Object(i.useState)(!1),f=Object(o.a)(d,2),b=f[0],g=f[1],h=!Object(s.a)(t.enabled)||t.enabled;Object(i.useEffect)((function(){p(t.title),g(!1)}),[t.title]);return Object(u.c)("div",{className:"title-input-wrapper"},Object(u.c)("input",{className:"big-title",type:"text",value:c,disabled:!h,onChange:function(t){var n=function(t){var n=t;return n.replace(/[^A-Za-z0-9_\ \-\u00a9\u00ae\u2000-\u3300\ud83c\ud000-\udfff\ud83d\ud000-\udfff\ud83e\ud000-\udfff]/g,"")}(t.target.value);p(n),g(!0)},onKeyDown:function(n){if(!1!==h&&"Enter"===n.key){if(c.length<3)return;t.onEdited(t.title,c),g(!1)}}}),b&&Object(u.c)("div",{className:"press-to-save"},Object(u.c)(l.a,{name:"faCircle",color:r.a.colors.main,size:.7})),b&&"mobile"===Object(a.a)()&&Object(u.c)("button",{className:"buttonSaveTitleMobile",onClick:function(){0!==c.length&&(g(!1),t.onEdited(t.title,c))}}," Save "))},d=function(){return"\n.buttonSaveTitleMobile {\n\t\tposition: relative;\n\t\tright: 20px;\n\n\n}\n"},f=c.a.memo(p,(function(t,n){var e=!1;return t.title!==n.title&&(e=!1),e}))},24:function(t,n,e){"use strict";e.d(n,"a",(function(){return c}));var o=e(35),i=e(13),c=function(t){return t||(t=0),"desktop"!==Object(i.a)()?10+t:(parseInt(Object(o.b)().ui_layout_general_font_size)||10)+t}},27:function(t,n,e){"use strict";e.d(n,"b",(function(){return r})),e.d(n,"c",(function(){return l})),e.d(n,"a",(function(){return s}));var o=e(0),i=e.n(o),c=e(28),a=e(1),r=function(t){var n=t.name,e=n.endsWith(".svg")||n.endsWith(".png")||n.endsWith(".jpg"),o=t.size?t.size:1;return o-=.2,n.startsWith("fa")&&(n=n.substr(2)),n[0]===n[0].toUpperCase()&&(n=n[0].toLowerCase()+n.substr(1)),n=n.replace(/[A-Z]/g,(function(t){return"-".concat(t.toLowerCase())})),Object(a.c)("span",{style:{transform:"scale(".concat(o,")"),display:"inline-block"}},!e&&Object(a.c)("span",{className:"icon-2-wrapper icon-wrapper",title:t.label,dangerouslySetInnerHTML:{__html:Object(c.d)(n)},style:{color:t.color||"#797979"}}),e&&Object(a.c)("span",{style:{transform:"scale(".concat(t.size,")"),display:"inline-block",width:"20px",height:"20px",background:"url('".concat(t.name,"')"),backgroundSize:"contain",backgroundRepeat:"no-repeat"}}))},l=function(){return"\n\t.icon-wrapper{\n\t\tdisplay: inline-block;\n\t}\n"},s=i.a.memo(r,(function(t,n){return JSON.stringify(t)===JSON.stringify(n)}))},28:function(t,n,e){"use strict";e.d(n,"d",(function(){return i})),e.d(n,"c",(function(){return c})),e.d(n,"b",(function(){return r})),e.d(n,"a",(function(){return l}));e(422);var o=e(11),i=function(t){return'<i class="ssr-icon fa-solid fa-'.concat(t,'"></i>')};window.ssrActionsDic={};var c=function(t,n){var e="window.ssrActionsDic['".concat(t,"'](this)"),o=window.ssrActionsDic;return o[t]||(o[t]=function(t){n(t)}),e},a=function(t,n){var e="ressource-preview-status-".concat(t.path),o=n.indexOf("token=");return o>-1&&(n=n.substring(0,o)),{cacheId:e,idRess:"".concat(t.path,"-").concat(n)}},r=function(t,n,e){var i=a(t,n),c=i.cacheId,r=i.idRess;Object(o.d)((function(t){t.cache.get(c,(function(n){n||(n={}),n[r]=e,t.cache.set(c,n,-1)}))}))},l=function(t,n,e){!function(t,n,cb){var e=a(t,n),i=e.cacheId,c=e.idRess;Object(o.d)((function(t){t.cache.get(i,(function(t){if(t){var n=t[c]?t[c]:"closed";cb(n)}}))}))}(t,n,(function(t){"open"===t&&setTimeout((function(){e()}),500)}))}},29:function(t,n,e){"use strict";e.d(n,"b",(function(){return o})),e.d(n,"d",(function(){return i})),e.d(n,"c",(function(){return c})),e.d(n,"a",(function(){return a}));var o=function(t){return t=(t=(t=(t=(t=t.split("://").join("__HTTP__SEP")).split("//").join("/")).split("\\").join("/")).split("//").join("/")).split("__HTTP__SEP").join("://")},i=function(t){var n=function(t){var n=t.split("/"),e=t.split("\\"),o=n.length>e.length?n:e,i=o[o.length-1],c=i.split("."),a=t.replace(i,""),r="";c.length>1&&(r=c[c.length-1]);var l=i.replace(".".concat(r),"");return{filename:i,extension:r,path:t,folder:a,filenameWithoutExt:l}}(t),e=n.extension?"file":"folder";return{path:t,realname:n.filename,nature:e,name:n.filename,extension:n.extension,folder:n.folder,filenameWithoutExt:n.filenameWithoutExt}},c=function(t){var n=t.match(/(.*)[\/\\]/),e=n?n[1]+"/":"";return o(e)},a=function(t,n){return o(t+"/")===o(n+"/")}},30:function(t,n,e){"use strict";e.d(n,"a",(function(){return r}));var o=e(37),i=e.n(o),c=e(17),a={img:i()().find(".").then("jpg").or("jpeg").or("png").or("gif").or("webm").or("svg").or("webp"),imgMdConfig:i()().anythingBut("[]|").maybe("|").beginCapture().anythingBut("[]|").endCapture().maybe("|").beginCapture().anythingBut("[]|").endCapture(),customTag:/\[\[[a-zA-Z0-9-\ _\/]*\]\]/},r={strings:{charWithAccents:"[a-zA-Z\xc0-\u024f\u1e00-\u1eff]{1}",tableLine:"([a-z\xc0-\xfaA-Z0-9@:%,-*._+~#= ]+|)"},checkbox:/\[ \]|\[x\]|\[X\]/gi,dateFrFormat:/([0-9]{1,2})\/([0-9]{1,2})\/([0-9]{4})/gi,metas:i()().find(c.a.metas.headerStart).beginCapture().anythingBut("").endCapture().then(c.a.metas.headerEnd),titleHtml:/<(title)[^>]*>([^<]*)<\/\1>/gi,metasHtml:/<meta[^>]*(name|property)="([^"]*)"[^>]*content="([^"]*)"[^>]*>/gi,externalLink3:/https?:\/\/((www\.)?[a-z\xc0-\xfaA-Z0-9@:%._\+~#=]{1,256})\b(\/[-a-zA-Z\xc0-\xfa0-9()\*\;\!@:%_\-\+.,~#?&\/=]*\/)?([-a-zA-Z\xc0-\xfa0-9()\*\;\!@:%_\-\+.,~#?&\/=]*)\/(\n| |$)/gim,externalLink3Int:/https?:\/\/((www\.)?[a-z\xc0-\xfaA-Z0-9@:%._\+~#=]{1,256})\b(\/[-a-zA-Z\xc0-\xfa0-9()\*\;\!@:%_\-\+.,~#?&\/=]*\/)?([-a-zA-Z\xc0-\xfa0-9()\*\;\!@:%_\-\+.,~#?&\/=]*)\//gim,mdTableLine:/\|?(([^\|]+\|)+([^\|]+))\|?/gim,mdTitle:/^([#]{1,9})\ (.+)/gi,mdTableCell:/((([^|\n])+\|)|(([^|\n])+))/gim,hashtag:/#([A-z\xc0-\xfa0-9_\-]+)/gi,matchingHtmlTags:/<([^>]*)>([^<]*)<\/\1>/,baliseHtml:i()().find("<").anythingBut("<>").then(">"),ressource:i()().find("![").beginCapture().anythingBut("[]").endCapture().then("](").beginCapture().anythingBut("()").endCapture().then(")"),ref:i()().find("[").anythingBut("[]").then("](").anythingBut("()").then(")"),extimage:i()().find("![").anythingBut("[]").then("](").beginCapture().then("http").anythingBut("()").then(a.img).anythingBut("()").endCapture().then(")"),image:i()().find("![").anythingBut("[]").then("](").beginCapture().anythingBut("()").then(a.img).anythingBut("()").endCapture().then(")"),image2:/!\[(.*?)\]\((.*?\.(jpg|png|gif|bmp|jpeg|webm|svg|webp"))\)(\{(.*)\})?/gim,fullImageMd:i()().beginCapture().find("![").anythingBut("[]").then("](").anythingBut("()").then(a.img).anythingBut("()").endCapture().then(")"),imageMdSrc:i()().find("![").anythingBut("[]").then("](").beginCapture().anythingBut("()").then(a.img).anythingBut("()").endCapture().then(")"),imageAndTitleCapture:i()().find("![").beginCapture().anythingBut("[]").endCapture().then("](").beginCapture().anythingBut("()").then(a.img).anythingBut("()").endCapture().then(")"),imageAndTitleCapture2:/\!\[([^\[\]]+)\]\(([^\(\)]+\.(jpg|jpeg|png|gif|webm|svg|webp))\)/gi,imageAndConfig:i()().find("![").then(a.imgMdConfig).then("](").beginCapture().anythingBut("()").then(a.img).anythingBut("()").endCapture().then(")"),searchlink:i()().find("[search|").beginCapture().anythingBut("[]").endCapture().then("]"),linklink2:i()().find("123").beginCapture().anythingBut("456").endCapture().then("456"),linklink:i()().find("[link|").beginCapture().anythingBut("[]").endCapture().then(" ").beginCapture().then("/").anythingBut("[]").endCapture().then("]"),latexTag:i()().find("[[latex]]").beginCapture().anythingBut("").endCapture().then("[[latex]]"),scriptTag:i()().find("[[script]]").beginCapture().anythingBut("").endCapture().then("[[script]]"),userCustomTagFull:i()().find(a.customTag).beginCapture().anythingBut("").endCapture().then(a.customTag),userCustomTagFull2:i()().beginCapture().beginCapture().find(a.customTag).endCapture().anythingBut("").beginCapture().then(a.customTag).endCapture().endCapture(),userCustomTagFull3:i()().beginCapture().find(a.customTag).endCapture(),userCustomTag3:i()().beginCapture().then(a.customTag).endCapture(),userCustomTagManual:a.customTag,externalLink:i()().find("http").maybe("s").then("://").beginCapture().anythingBut("/ ").endCapture().beginCapture().anythingBut(" ").then("/").beginCapture().anythingBut("? ").endCapture().anythingBut(" \n").then("\\n").endCapture(),url2transform:i()().find("!").beginCapture().find("http").maybe("s").then("://").beginCapture().anything().endCapture().endCapture(),searchFolder:i()().find(" /").anything().endOfLine(),searchFolderNoSpace:i()().find("/").anything().endOfLine(),firstPartImg:i()().find("![").anythingBut("[]").then("]("),hashtag3:i()().find(/[-| |\n]{1}\#([A-z\xc0-\xfa1-9_\-]+)/gi),titleMd:i()().startOfLine().find("#").oneOrMore().then(" ").beginCapture().anythingBut("").endCapture(),scriptHtml:i()().find("<script>").beginCapture().anythingBut("").endCapture().then("<\/script>")}},31:function(t,n,e){"use strict";e.d(n,"a",(function(){return c})),e.d(n,"c",(function(){return a})),e.d(n,"b",(function(){return r})),e.d(n,"d",(function(){return l}));e(10);var o=e(11),i="tiroDevCli",c=function(t,n,e){window[i]||(window[i]={}),window[i][t]||(window[i][t]={}),window[i][t][n]=e},a=function(t,n){return window[i]&&window[i][t]&&window[i][t][n]?window[i][t][n]:function(){console.log("DEV FN",t,n,"does not exists")}},r=function(t,n){if(window[i]&&window[i][t]&&window[i][t][n])window[i][t][n]();else{var e="DEV FN ".concat(t," ").concat(n," does not exists");console.log(e),l(e)}},l=function(t,n,e){console.log("[NOTIF LOG]: ",t),e||(e=60),Object(o.d)((function(o){o.ui.notification.emit({content:t,id:n,options:{hideAfter:e,type:"warning",keepInHistory:!0}})}))}},32:function(t,n,e){"use strict";e.d(n,"b",(function(){return a})),e.d(n,"a",(function(){return r}));var o=e(377),i=e(121),c=e(0);function a(cb,t){var n=Object(c.useRef)(cb);return Object(c.useEffect)((function(){n.current=cb})),Object(c.useCallback)(Object(o.a)((function(){return n.current.apply(n,arguments)}),t,{leading:!0,trailing:!1}),[t])}function r(cb,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],e={leading:!1,trailing:!0};n&&(e.leading=n);var o=Object(c.useRef)(cb),a=function(){var t=Object(c.useRef)(!0);return Object(c.useEffect)((function(){return function(){t.current=!1}}),[]),function(){return t.current}}();return Object(c.useEffect)((function(){o.current={cb:cb,delay:t}})),Object(c.useCallback)(Object(i.a)((function(){var n;o.current.delay===t&&a()&&(n=o.current).cb.apply(n,arguments)}),t,e),[t,i.a])}},35:function(t,n,e){"use strict";e.d(n,"d",(function(){return h})),e.d(n,"b",(function(){return m})),e.d(n,"a",(function(){return j})),e.d(n,"c",(function(){return _}));var o=e(5),i=e(25),c=e(565),a=e(378),r=e(55),l=e(0),s=e(38),u=e(17),p=e(14),d=e(9),f=e(18),b=e(32),g=e(60),h={curr:{}},m=function(){return h.curr},v=function(t){var n={};return new URLSearchParams(t).forEach((function(t,e){n[e]=t})),n}(window.location.search),w={};for(var O in v)w[O]=v[O];var j={ui_sidebar:!0,ui_filesList_sortMode:2,ui_layout_colors_main:"#E86666",ui_layout_colors_main_font:"#FFFFFF",ui_editor_markdown_preview:!0,ui_editor_markdown_latex_preview:!0,ui_editor_markdown_enhanced_preview:!0,ui_editor_markdown_table_preview:!0,ui_editor_spellcheck:!0,ui_editor_live_watch:!0,ui_editor_links_as_button:!0,ui_editor_markdown_tags:!0,ui_editor_links_preview_zoom:.8,ui_editor_show_image_title:!1,export_pandoc_cli_options:"\ndocx | --wrap=preserve --toc --number-sections \n revealjs | -V theme=moon \n beamer | --wrap=preserve --include-in-header=./include-tex.md ",advanced_image_compression_settings:JSON.stringify({quality:80,maxWidth:1500}),ui_editor_ai_text_selection:!0,ui_editor_ai_command:"export OPENAI_API_KEY='YOUR_OPENAI_API_KEY'; npx chatgpt \" {{input}}\" --continue --model gpt-4 ",server_activity_logging_enable:!1,view_disable_notification_popups:!1,beta_floating_windows:!1,beta_plugins_marketplace:!1,plugins_marketplace_url:"https://raw.githubusercontent.com/dotgreg/tiro-notes/master/docs/marketplace.json",ui_layout_general_font_size:10,ui_layout_background_image_enable:!1,ui_layout_background_video_enable:!1,ui_layout_background_image_window_opacity:70,ui_layout_background_image_window_opacity_active:90,ui_layout_background_video_width:100,ui_layout_background_video_height:100,ui_layout_font_family_interface:"Helvetica neue, Open sans, arial, sans-serif",ui_layout_font_family_editor:"Helvetica neue, Open sans, arial, sans-serif"},x=j,k="[USER SETTINGS] :",y=u.a.client.log.verbose,_=function(t){var n=Object(g.a)("user-settings",{},{history:!0}),e=Object(o.a)(n,3),u=e[0],m=e[1],v=e[2],w=Object(l.useState)(0),O=Object(o.a)(w,2),_=O[0],C=O[1],E=Object(l.useRef)([]),S=function(t,n,e){E.current[t]||(E.current[t]=n[e]);var o=u[t];Object(c.a)(o)||Object(a.a)(o)||(""===o&&E.current[t]&&(o=E.current[t]),n[e]=o)};Object(l.useEffect)((function(){T(),h.curr=u,Object(i.a)(x,(function(t,n){Object(a.a)(u[n])&&(u[n]=t)}))}),[u]);var T=Object(b.a)((function(){y&&console.log(k,"UPDATE!",u,_),S("ui_layout_colors_main",d.a.colors,"main"),S("ui_layout_colors_main_font",d.a.colors,"mainFont"),S("ui_layout_font_family_editor",d.a.font,"editor"),S("ui_layout_font_family_interface",d.a.font,"main"),C(_+1)}),1e3),I=function(n,e,cb,o){var i="updateSetupJson-".concat(Object(s.a)());t.eventBus.subscribe(i,(function(t){cb&&cb(t)})),p.b.emit("updateSetupJson",{paramName:n,paramValue:e,opts:o,token:Object(f.b)(),idReq:i})};Object(l.useEffect)((function(){p.b.on("onServerTaskFinished",(function(n){t.eventBus.notify(n.idReq,{data:n})}))}),[]);var N={refreshUserSettingsFromBackend:v,updateSetupJson:I,set:function(t,n,e){e||(e={}),e.writeInSetupJson||(e.writeInSetupJson=!1),e.writeInSetupJson&&I(t,"".concat(n)),y&&console.log(k,"updateUserSettings ".concat(t," to ").concat(n));var o=Object(r.a)(u);o[t]=n,m(o)},get:function(t,cb){var n=x[t],e=n;return t in u&&(e=u[t]),""===e&&(e=n),cb&&cb({currentValue:e,defaultValue:n}),e},list:function(){return function(t){var n=[];return Object(i.a)(t,(function(t,e){var o=e;n.push({key:o,val:t})})),Object(i.a)(j,(function(t,e){var o=e;n.find((function(t){return t.key===o}))||n.push({key:o,val:t})})),n}(u)},refresh:{css:{get:_}}};return{userSettingsApi:N}}},369:function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"a",(function(){return useRessourceApi}));var _config_workspace_tiro_notes_client_node_modules_babel_runtime_helpers_esm_construct_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(228),_config_workspace_tiro_notes_client_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(10),react__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(0),react__WEBPACK_IMPORTED_MODULE_2___default=__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__),_shared_helpers_id_helper__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(38),_shared_shared_config__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(17),_managers_sockets_socket_manager__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(14),_app_loginToken_hook__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(18),_api_hook__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(11),_managers_url_manager__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__(72),lodash_es__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__(25),_managers_ressource_manager__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__(218),_managers_devCli_manager__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__(31),_managers_tryCatch_manager__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__(370),h="[RESSOURCE API] ",useRessourceApi=function useRessourceApi(p){var _p=Object(_config_workspace_tiro_notes_client_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1__.a)({},p),eventBus=_p.eventBus;Object(react__WEBPACK_IMPORTED_MODULE_2__.useEffect)((function(){_managers_sockets_socket_manager__WEBPACK_IMPORTED_MODULE_5__.b.on("getRessourceApiAnswer",(function(t){eventBus.notify(t.idReq,t)})),_managers_sockets_socket_manager__WEBPACK_IMPORTED_MODULE_5__.b.on("getRessourceScan",(function(t){eventBus.notify(t.idReq,t)}))}),[]);var deleteRessource=function(t,cb){var n=Object(_api_hook__WEBPACK_IMPORTED_MODULE_7__.c)("delete-ressource");console.log("".concat(h," delete ressource ").concat(t)),p.eventBus.subscribe(n,cb),_managers_sockets_socket_manager__WEBPACK_IMPORTED_MODULE_5__.b.emit("askRessourceDelete",{path:t,idReq:n,token:Object(_app_loginToken_hook__WEBPACK_IMPORTED_MODULE_6__.b)()})},downloadRessource=function(t,n,cb,e){var o=Object(_api_hook__WEBPACK_IMPORTED_MODULE_7__.c)("download-ressource");p.eventBus.subscribe(o,cb),_managers_sockets_socket_manager__WEBPACK_IMPORTED_MODULE_5__.b.emit("askRessourceDownload",{url:t,folder:n,idReq:o,opts:e,token:Object(_app_loginToken_hook__WEBPACK_IMPORTED_MODULE_6__.b)()})},fetchRessource=function(t,cb,n){n||(n={}),n.disableCache||(n.disableCache=!1),n.returnsPathOnly||(n.returnsPathOnly=!1),"false"===n.disableCache&&(n.disableCache=!1),"true"===n.disableCache&&(n.disableCache=!0);var e="/.tiro/cache/fetch/",o=Object(_managers_ressource_manager__WEBPACK_IMPORTED_MODULE_10__.a)("/".concat(e).concat(Object(_shared_helpers_id_helper__WEBPACK_IMPORTED_MODULE_3__.b)(t))),i=function(){fetch(o).then((function(t){return t.text()})).then((function(t){Object(_managers_tryCatch_manager__WEBPACK_IMPORTED_MODULE_12__.a)((function(){return cb(t,o)}))}))},c=function(){downloadRessource(t,e,(function(t){var e;t.message&&(null!==(e=n)&&void 0!==e&&e.returnsPathOnly?cb("",o):i())}),n)};!0===n.disableCache?c():Object(_managers_url_manager__WEBPACK_IMPORTED_MODULE_8__.a)({url:o,onSuccess:function(){i()},onFail:function(){c()}})},fetchUrlArticle=function fetchUrlArticle(url,cb,options){var readabilityUrl="https://cdn.jsdelivr.net/npm/moz-readability@0.2.1/Readability.js";fetchRessource(readabilityUrl,(function(readabilityTxt){var r1=eval(readabilityTxt);fetchRessource(url,(function(t){var n=document.implementation.createHTMLDocument("");n.open(),n.write(t),n.close();var e=new r1(n).parse(),o=(null===e||void 0===e?void 0:e.textContent.replaceAll(" ","\n"))||"";o=(o=(o=(o=o.replaceAll(" ","\n")).replaceAll(" ","\n")).replaceAll(" ","\n")).replaceAll(" ","\n");var i=(null===e||void 0===e?void 0:e.content)||"",c=(null===e||void 0===e?void 0:e.title)||"";cb({title:c,text:o,html:i,raw:t})}))}))},ramFetchEvalCache={val:{}},fetchEval=function(t,n,e,cb){e||(e={}),e.disableCache||(e.disableCache=!1),"true"===e.disableCache&&(e.disableCache=!0),console.log(h,"fetchEval",t,n,e);var o=function(o){try{var i=[],c=[];Object(lodash_es__WEBPACK_IMPORTED_MODULE_9__.a)(n,(function(t,n){i.push(n),c.push(t)}));var a=Object(_config_workspace_tiro_notes_client_node_modules_babel_runtime_helpers_esm_construct_js__WEBPACK_IMPORTED_MODULE_0__.a)(Function,i.concat([o])).apply(void 0,c);cb&&cb(a)}catch(l){var r="[ERR remote code] (api.ress.fetchEval): ".concat(l," <br> url: ").concat(t," (more infos in console)");console.log(r,l,{url:t,funcParams:n,options:e}),Object(_managers_devCli_manager__WEBPACK_IMPORTED_MODULE_11__.d)("".concat(r))}};!0===e.disableCache&&(ramFetchEvalCache.val[t]=null),ramFetchEvalCache.val[t]&&!0!==e.disableCache?o(ramFetchEvalCache.val[t]):fetchRessource(t,(function(n){o(n),ramFetchEvalCache.val[t]=n}),e)},cleanCache=function(){ramFetchEvalCache.val={},Object(_api_hook__WEBPACK_IMPORTED_MODULE_7__.d)((function(t){t.folders.delete("cache","fetch")}))},scanRessourceFolder=function(t,cb){_shared_shared_config__WEBPACK_IMPORTED_MODULE_4__.a.client.log.socket&&console.log("[CLIENT API] get ressources files ".concat(t));var n=Object(_api_hook__WEBPACK_IMPORTED_MODULE_7__.c)("get-ressources-files-");p.eventBus.subscribe(n,cb),_managers_sockets_socket_manager__WEBPACK_IMPORTED_MODULE_5__.b.emit("askRessourceScan",{folderPath:t,token:Object(_app_loginToken_hook__WEBPACK_IMPORTED_MODULE_6__.b)(),idReq:n})},compressImage=function(t,cb){var n=Object(_api_hook__WEBPACK_IMPORTED_MODULE_7__.c)("compress-image");console.log("".concat(h," compress image ").concat(t.path)),p.eventBus.subscribe(n,cb||function(){}),_managers_sockets_socket_manager__WEBPACK_IMPORTED_MODULE_5__.b.emit("askRessourceImageCompress",{params:t,idReq:n,token:Object(_app_loginToken_hook__WEBPACK_IMPORTED_MODULE_6__.b)()})},ressourceApi={delete:deleteRessource,download:downloadRessource,compressImage:compressImage,scanFolder:scanRessourceFolder,fetch:fetchRessource,fetchEval:fetchEval,fetchUrlArticle:fetchUrlArticle,cleanCache:cleanCache};return ressourceApi}},370:function(t,n,e){"use strict";e.d(n,"a",(function(){return i}));var o=e(31),i=function(t){try{t()}catch(n){Object(o.d)("".concat(n))}}},38:function(t,n,e){"use strict";e.d(n,"a",(function(){return o})),e.d(n,"b",(function(){return i}));var o=function(){var t=(new Date).getTime(),n="undefined"!==typeof performance&&performance.now&&1e3*performance.now()||0;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var o=16*Math.random();return t>0?(o=(t+o)%16|0,t=Math.floor(t/16)):(o=(n+o)%16|0,n=Math.floor(n/16)),("x"===e?o:3&o|8).toString(16)}))},i=function(t){var n=t,e=n.split("?")[1]||"",o=n.split("?")[0],i=o.replace(/[^\w\s]/gi,"_"),c=e.replace(/[^\w\s]/gi,"_"),a=o.split(".").pop()||"";((a="."+a.replace(/[^\w\s]/gi,"_")).length>6||a.length<=1)&&(a="");var r="".concat(i,"_").concat(c);return r.length>200&&(r=r.slice(0,200)),"".concat(r).concat(a)}},41:function(t,n,e){"use strict";e.d(n,"g",(function(){return b})),e.d(n,"f",(function(){return g})),e.d(n,"e",(function(){return h})),e.d(n,"a",(function(){return m})),e.d(n,"d",(function(){return v})),e.d(n,"c",(function(){return w})),e.d(n,"b",(function(){return O})),e.d(n,"h",(function(){return j}));e(0);var o=e(17),i=e(30),c=e(65),a=e(14),r=e(91),l=e(88),s=e(207),u=e(73),p=(e(25),e(153)),d=e(110),f=e(1),b=function(t){return Object(r.d)(t,i.a.externalLink3,(function(t){return Object(p.a)(t,{addLineJump:!0})}))},g=function(t,n){var e=Object(u.a)("$1","$2",null,t,!0);return n.replace(i.a.linklink,e)},h=function(t){var n=t.replace(i.a.searchlink,'<a class="search-link preview-link" href="javascript:window.tiroCli.triggerSearch.func(\'$1$2\');">$1</a>');return n=Object(c.a)(n,[[">[__id_",">["],[">[__tags_",">["],[">[__tag_",">["],[" ]</a>","]</a>"]])},m=function(t){var n=t.replace("".concat(Object(a.c)(),"/").concat(o.a.path.staticResources,"/"),"");n=t.replace("".concat(o.a.path.staticResources),"");var e="".concat(Object(a.c)(),"/").concat(o.a.path.staticResources,"/").concat(n);return t.startsWith("http")?t:e},v=function(t,n,e){var o=0,c=Object(r.d)(e,i.a.ressource,(function(e){o++;"".concat(e,"-").concat(o);var i="".concat(function(t,n,e){return Object(s.renderToString)(Object(f.c)(l.a,{markdownTag:t,file:n,windowId:e}))}(e,t,n)," ");return i}));return c},w=function(t,n){return Object(r.d)(n,i.a.image,(function(n){var e=n.split("](")[1].slice(0,-1);return Object(d.a)(n,e,t)}))},O=function(t){return t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")},j=function(t){return t.replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"').replace(/&#039;/g,"'")}},416:function(t,n){},42:function(t,n,e){"use strict";e.d(n,"a",(function(){return d})),e.d(n,"b",(function(){return b}));var o=e(10),i=e(0),c=e.n(i),a=e(134),r=e(9),l=e(27),s=e(24),u=e(1),p=function(t){var n=Object(o.a)({},t),e=n.design,c=n.colors,l=n.size;e||(e="horizontal");var s=void 0===t.popup||t.popup,p=Object(a.a)("button.toolbar-button{position:relative;&.active{svg,i,span.icon-wrapper{color:",c?c[1]:r.a.colors.main,";}}svg,i,span.icon-wrapper{transform:scale(",l||1.3,");color:",c?c[0]:r.a.colors.editor.interfaceGrey,";&:hover{color:",c?c[1]:r.a.colors.main,";}}}","");return Object(i.useMemo)((function(){return Object(u.c)("div",{className:p},Object(u.c)("ul",{className:"buttons-toolbar-component ".concat(t.class," ").concat(e," ").concat(!0===s?"with-popup":"no-popup")},t.buttons.map((function(t,n){var e;return t.action&&Object(u.c)("li",{className:"".concat(t.class," btn-").concat(null===(e=t.title)||void 0===e?void 0:e.toLowerCase()),title:t.title,key:n},Object(u.c)(f,t))}))))}),[t.buttons])},d=c.a.memo(p,(function(t,n){return!1})),f=function(t){var n=Object(u.c)(c.a.Fragment,null);t.title&&(n=Object(u.c)(c.a.Fragment,null,t.title));var e=t.size?t.size:1;t.icon&&(n=t.icon.startsWith("fa")||t.icon.includes(".")?Object(u.c)(l.a,{name:t.icon,size:e,color:t.color}):Object(u.c)(l.b,{name:t.icon,size:e,color:t.color})),t.customHtml&&(n=t.customHtml);var o="toolbar-button ".concat(t.class&&t.class," ").concat(t.active&&"active");return Object(u.c)("button",{className:o,onMouseEnter:function(n){t.onHover&&t.onHover()},onClick:function(n){t.action&&t.action(n)}},Object(u.c)("div",{className:"inside-html-wrapper"},n),t.title&&Object(u.c)("div",{className:"button-title-wrapper "},t.title))},b=function(){return"\n ul.buttons-toolbar-component {\n list-style: none;\n padding: 0px;\n margin: 0px;\n button.toolbar-button {\n ".concat(r.a.els().button,";\n cursor: pointer;\n }\n\t\t\t\t&.vertical {\n\t\t\t\t\t\t.toolbar-button {\n\t\t\t\t\t\t\t\tdisplay: flex;\n\t\t\t\t\t\t\t\t&:hover {\n\t\t\t\t\t\t\t\t\t\t.inside-html-wrapper {\n\t\t\t\t\t\t\t\t\t\t\t\tsvg {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tcolor:").concat(r.a.colors.main,";\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t.button-title-wrapper {\n\t\t\t\t\t\t\t\t\t\t\t\tcolor:").concat(r.a.colors.main,";\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t.inside-html-wrapper {\n\t\t\t\t\t\t\t\t\t\t// width: 15px;\n\t\t\t\t\t\t\t\t\t\tspan {\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t.button-title-wrapper {\n\t\t\t\t\t\t\t\t\t\tmargin-left: 15px;\n\t\t\t\t\t\t\t\t\t\tfont-weight: 400;\n\t\t\t\t\t\t\t\t\t\tfont-size:").concat(Object(s.a)(1),"px;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t&.horizontal.with-popup {\n\t\t\t\t\t\t\t\tli button:hover .button-title-wrapper {\n\t\t\t\t\t\t\t\t\t\tdisplay: block;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t&.horizontal {\n\t\t\t\t\t\tdisplay: flex;\n\t\t\t\t\t\tli {\n\t\t\t\t\t\tbutton {\n\t\t\t\t\t\t\t\t.button-title-wrapper {\n\t\t\t\t\t\t\t\t\t\tdisplay: none;\n\t\t\t\t\t\t\t\t\t\topacity: 0.2;\n\t\t\t\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\t\t\t\tbottom: 22px;\n\t\t\t\t\t\t\t\t\t\tbackground: ").concat(r.a.colors.editor.interfaceGrey,";\n\t\t\t\t\t\t\t\t\t\tcolor: black;\n\t\t\t\t\t\t\t\t\t\tpadding: 5px;\n\t\t\t\t\t\t\t\t\t\tleft: 50%;\n\t\t\t\t\t\t\t\t\t\twidth: max-content;\n\t\t\t\t\t\t\t\t\t\tfont-size: 8px;\n\t\t\t\t\t\t\t\t\t\tborder-radius: 5px;\n\t\t\t\t\t\t\t\t\t\ttransform: translateX(-50%);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t}\n }\n}\n")}},430:function(t,n){},432:function(t,n){},443:function(t,n){},445:function(t,n){},45:function(t,n,e){"use strict";e.d(n,"a",(function(){return f}));var o=e(6),i=e(7),c=e(21),a=e(22),r=e(12),l=e(31),s=function(t){Object(c.a)(e,t);var n=Object(a.a)(e);function e(t,i,c,a){var r;return Object(o.a)(this,e),(r=n.call(this)).match=t,r.view=i,r.pos=c,r.replacement=a,r}return Object(i.a)(e,[{key:"toDOM",value:function(){return this.replacement({matchs:this.match,view:this.view,pos:this.pos})}}]),e}(r.g),u={};Object(l.a)("code_mirror","cache_get",(function(){return u}));var p=function(t,n,e,o,i){return new r.e({regexp:t,decoration:function(t,c,a){var l,p=t.input+t.index,d=e.path+o;if(u[d]||(u[d]={}),u[d][p])l=u[d][p];else{var f=new s(t,c,a,n),b=r.a.replace({widget:f});u[d][p]=b,!1===i?(delete u[d][p],l=b):l=u[d][p]}return l}})},d=function(t,n){return new r.e({regexp:t,decoration:function(t,e,o){return r.a.mark({class:n(t)})}})},f=function(t){var n,e=t.replacement,c=!1!==(null===(n=t.options)||void 0===n?void 0:n.cache);return r.f.fromClass(function(){function n(i){Object(o.a)(this,n),this.decorations=void 0,this.decorations=e?p(t.pattern,e,t.file,t.windowId,c).createDeco(i):d(t.pattern,t.classWrap).createDeco(i)}return Object(i.a)(n,[{key:"update",value:function(n){try{e&&(n.docChanged||n.viewportChanged)?this.decorations=p(t.pattern,t.replacement,t.file,t.windowId,c).updateDeco(n,this.decorations):this.decorations=d(t.pattern,t.classWrap).updateDeco(n,this.decorations)}catch(o){console.warn("[ERROR VIEWPLUGIN CM]",o,n)}}}]),n}(),{decorations:function(t){return t.decorations},provide:function(n){return r.c.atomicRanges.of((function(e){var o,i,c=(null===(o=e.plugin(n))||void 0===o?void 0:o.decorations)||r.a.none;return null!==(i=t.options)&&void 0!==i&&i.isAtomic||(c=r.a.none),c}))}})}},470:function(t,n){},472:function(t,n){},473:function(t,n){},478:function(t,n){},480:function(t,n){},486:function(t,n){},488:function(t,n){},507:function(t,n){},51:function(t,n,e){"use strict";e.d(n,"a",(function(){return a}));var o=e(10),i=e(17),c="80"===window.location.port?"":":".concat(window.location.port);"3000"===window.location.port&&(c=":3023");var a=Object(o.a)(Object(o.a)({},i.a.client),{},{global:{protocol:"".concat(window.location.protocol,"//"),url:"".concat(window.location.hostname),port:c}})},519:function(t,n){},522:function(t,n){},54:function(t,n,e){"use strict";e.d(n,"a",(function(){return w}));var o=e(15),i=e(2),c=e(17),a=e(209),r=e(25),l=e(8),s=e(120),u=e(80),p=e(30),d="[Code Mirror]",f=c.a.client.log.verbose,b=function(t,n){var e=arguments.length>2&&void 0!==arguments[2]&&arguments[2];f&&console.log(d," update cursor",n,t);try{e&&t.view.dispatch({selection:{anchor:n,head:n},scrollIntoView:!0})}catch(o){console.warn(d,"update Cursor error",o)}},g=function(t){if(!(t&&t.view&&t.view.state))return null;var n=t.view.state.doc.lineAt(t.view.state.selection.main.head).number-1,e=function(t){return t.view.state.selection.ranges[0].from}(t),o=t.view.state.doc.toString().split("\n");return{lines:o,currentPosition:e,activeLine:o[n]||"",lineIndex:n}},h=0,m=function(t){if(console.log("GET SCROLLING LINE -> NOT USED, SHOULD BE UPDATED"),!t.view)return-1;for(var n=t.view.state.doc.toString(),e=t.view.elementAtHeight(t.view.scrollDOM.scrollTop).from,o=n.split("\n"),i=0,c=0,a=0;a<o.length&&(i+=o[a].length)<e;a++)c=a;h=c},v=function(t){var n=null===t||void 0===t?void 0:t.view;if(!n)return[];for(var e=n.state.doc.toString().split("\n"),i=[],c=0,a=0;a<e.length;a++){var r=e[a],l=r.length+1,s=Object(o.a)(r.matchAll(p.a.mdTitle)),u=c,d=u+l;if(s.length>0){var f=s[0],b=f[1].length;i[i.length-1]&&i[i.length-1].level<b&&(i[i.length-1].lastChild=!1),i.push({raw:r,matches:f,line:a,title:f[2],from:u,to:d,level:b,lastChild:!0})}c+=l}return i},w={getEditorInfos:function(t){var n=t,e=Math.round(n.viewState.pixelViewport.top),o=n.contentHeight,i=function(){return n.viewState.editorHeight},c=function(){return(o-i())/100};return{viewportHeight:i,contentHeight:o,visibleFirstLine:function(){var t=n.lineBlockAtHeight(e);return n.state.doc.lineAt(t.from).number},percentPx:c,currentPercentScrolled:function(){return n.viewState.pixelViewport.top/c()}}},getCurrentLineInfos:g,getScrolledLine:function(t){return m(t),h},updateCursor:b,updateText:function(t,n,e){var o=t.view.state.doc.toString().length,i=t.view.state.selection.ranges[0].from;t.view.dispatch(t.view.state.update({changes:{from:0,to:o,insert:n}})),b(t,i,!0)},scrollTo:function(t,n){if(!t.view)return-1;b(t,n,!0)},scrollToLine:function(t,n){var e=t.view.state.doc.line(n);b(t,e.from,!0)},getCustomTheme:a.a,getMarkdownStructure:v,foldAllChildren:function(t){var n=v(t),e=g(t);Object(r.a)(n,(function(o,i){if(null!==t&&void 0!==t&&t.view){var c=n[i+1]?n[i+1].from-1:t.view.state.doc.length,a=o.to-1;e&&e.currentPosition>a&&e.currentPosition;try{t.view.dispatch({effects:l.p.of({from:a,to:c})})}catch(r){console.warn("ERROR FOR ".concat(o.title),r)}}}))},unfoldAllChildren:function(t){null!==t&&void 0!==t&&t.view&&Object(l.G)(t.view)},searchWord:function(t,n){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,o=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if(null!==t&&void 0!==t&&t.view)try{var i=t.view;Object(s.d)(i);var c={search:n};e&&Object.assign(c,{replace:e}),i.dispatch({effects:s.f.of(new s.a(c))}),o&&Object(s.b)(i)}catch(a){console.log("[CM utils > search word] error:",a)}},setSelection:function(t,n){if(null!==t&&void 0!==t&&t.view)try{var e=t.view,o=[0,0];n.range&&(o=n.range),e.dispatch({selection:i.e.create([i.e.range(o[0],o[1])])})}catch(c){console.log("[CM utils > set selection] error:",c)}},undo:u.f,redo:u.e}},56:function(t,n,e){"use strict";e.d(n,"a",(function(){return d})),e.d(n,"b",(function(){return f}));var o=e(6),i=e(7),c=e(21),a=e(22),r=e(0),l=e.n(r),s=e(9),u=e(13),p=e(1),d=function(t){Object(c.a)(e,t);var n=Object(a.a)(e);function e(){var t;Object(o.a)(this,e);for(var i=arguments.length,c=new Array(i),a=0;a<i;a++)c[a]=arguments[a];return(t=n.call.apply(n,[this].concat(c))).canBgClose=!t.props.canBgClose||t.props.canBgClose,t}return Object(i.a)(e,[{key:"render",value:function(){var t=this;return Object(p.c)("div",{className:"popup-wrapper-component"},Object(p.c)("div",{className:"overlay-click-popup",onClick:function(n){t.canBgClose&&t.props.onClose()}}),Object(p.c)("div",{className:"popup-wrapper ".concat(Object(u.d)()?"ipad":"")},Object(p.c)("div",{className:"popupTitle"}," ",this.props.title),Object(p.c)("div",{className:"popupContent"},this.props.children)))}}]),e}(l.a.Component),f=function(){return"\n.popup-wrapper-component {\n\t\t\t\tposition: absolute;\n top: 0px;\n left: 0px;\n .overlay-click-popup {\n position: fixed;\n z-index:10000;\n top: 0px;\n left: 0px;\n width: 100vw;\n height: 100vh;\n background: rgba(0,0,0,0.1);\n }\n .popup-wrapper {\n position: fixed;\n z-index:10010;\n left: 50%;\n top:50%;\n &.ipad {\n top:20%;\n }\n max-height: 70%;\n \n width : auto;\n max-width: 90%;\n transform:translate(-50%,-50%);\n\t\t\t\tbackground: ".concat(s.a.colors.bgPopup,";\n border-radius:6px;\n box-shadow: 0px 0px 5px rgba(0,0,0,.2);\n .popupTitle {\n margin: 0px 0px 20px 0px;\n text-align: left;\n background: ").concat(s.a.colors.main,";\n color: white;\n font-weight: 700;\n text-transform: uppercase;\n font-size: 14px;\n padding: 5px 0px 5px 20px;\n border-radius:6px 6px 0px 0px;\n }\n .popupContent {\n padding: 0px 20px 20px 20px;\n // min-width : 350px;\n height: calc(100% - 69px);\n }\n img{\n padding: 0px 5px 0px 0px;\n margin: 5px 5px 0px 0px;\n }\n }\n}\n")}},562:function(t,n,e){"use strict";e.r(n);var o=e(0),i=e.n(o),c=e(5),a=e(1),r=e(13),l=e(14),s=e(10),u=e(134),p=e(9),d=e(159),f=e(78),b=e(42),g=e(666),h=e(70),m={};window.tiroCli=m;var v=function(t,n){var e,r,l=Object(h.a)("showRenderId",!1),s=Object(c.a)(l,2),u=s[0],p=s[1];e="toggleRenderId",(r={description:"toggle display of renderId for each block",func:function(){console.log("[toggleRenderId]"),p(!u),setTimeout((function(){window.location.reload()}),1e3)}}).f=r.func,m[e]=r;var d=Object(g.a)(0,1e3);return Object(o.useMemo)((function(){var n=(new Date).getTime(),e=(new Error).stack,o=(null===e||void 0===e||e.split("\n")[6].replace("at ","").replace(/\(.*\)/gi,"").trim(),Object(a.c)(i.a.Fragment,null,u&&Object(a.c)("p",{style:{position:"absolute",fontSize:"10px",color:"rgba(255,0,0,0.8)"}},d),t));(new Date).getTime();return o}),n)},w=function(){var t=Object(o.useState)("navigator"),n=Object(c.a)(t,2),e=n[0],l=n[1];return{mobileView:e,setMobileView:l,MobileToolbarComponent:function(t){return v(Object(a.c)(i.a.Fragment,null,"desktop"!==Object(r.a)()&&Object(a.c)(b.a,{class:"mobile-view-toggler",colors:["white","white"],buttons:[{icon:"faStream",class:"".concat("navigator"===e?"active":""),action:function(){l("navigator")}},{icon:"faPenNib",class:"".concat("editor"===e?"active":""),action:function(){l("editor")}},{icon:"faEye",class:"".concat("preview"===e?"active":""),action:function(){l("preview")}},{icon:"faSearch",class:"",action:function(){t.onButtons[0]&&t.onButtons[0]()}}]})),[e,t.forceRerender])}}},O=e(17),j=e(51),x=e(11),k=function(t,n){var e=Object(o.useRef)();Object(o.useEffect)((function(){e.current=t}),[t]),Object(o.useEffect)((function(){if(null!==n){var t=setInterval((function(){e.current()}),n);return function(){return clearInterval(t)}}}),[n])},y=function(){return"Tiro (".concat(j.a.version,")")},_=function(){Object(o.useRef)([]);var t=Object(o.useState)(!1),n=Object(c.a)(t,2),e=n[0],i=n[1],l=Object(o.useState)(!1),s=Object(c.a)(l,2),u=s[0],p=s[1],d="(DISCONNECTED)",f=Object(o.useRef)(d);k((function(){f.current=f.current===d?"(/!\\ DISCONNECTED /!\\)":d;var t=e?"".concat(y()," (Connected)"):"".concat(y()," ").concat(f.current);"mobile"!==Object(r.a)()&&(document.title=t)}),1e3),Object(o.useEffect)((function(){Object(x.d)((function(t){t.watch.appStatus((function(t){!1===t.isConnected?b(!1):!0===t.isConnected&&(b(!0),p(!0),setTimeout((function(){p(!1)}),1e3))}))}))}),[]);var b=function(t){O.a.client.log.verbose&&console.log("[SOCKET CONNECTION TOGGLE] to ".concat(t)),i(t)};return{isConnected:e,connectionStatusComponent:function(){var t=["connected","connected"];return u&&(t=["back-online","back online"]),e||(t=["disconnected","disconnected"]),Object(a.c)("div",{className:"connection-status"},Object(a.c)("div",{className:t[0]},t[1]))},toggleSocketConnection:b}},C=e(27),E=e(19),S=function(t){return Object(a.c)("button",{className:"new-file-button",onClick:function(n){t.onNewFile()}},Object(a.c)(C.a,{name:"faPlusCircle",color:"white"}),Object(a.c)("span",null,E.a.newNote))},T=i.a.memo(S,(function(t,n){return!0})),I=e(6),N=e(7),P=e(21),R=e(22),A=e(121),F=e(55),L=e(66),M=e(41),D=e(374),z=e(371),B=e(18),H=e(565),U={ctrl:!1,shift:!1,alt:!1,opt:!1,Meta:!1},W={38:"up",40:"down",17:"ctrl",16:"shift",18:"alt",93:"opt",13:"enter"},q=function(t){return t=t||window.event,W[t.keyCode]?W[t.keyCode]:t.key},V={},J=e(93),K=e(24),G=function(t){Object(P.a)(e,t);var n=Object(R.a)(e);function e(t){var o;return Object(I.a)(this,e),(o=n.call(this,t)).oldFiles=[],o.liRefs=[],o.scrollerWrapperRef=i.a.createRef(),o.scrollerListRef=i.a.createRef(),o.canAutoScroll=!1,o.getVisibleItemsDebounced=Object(A.a)((function(){var t=o.scrollerWrapperRef.current;if(t){for(var n=t.getBoundingClientRect().height,e=-1,i=[],c=0;c<o.liRefs.length;c++){var a=o.liRefs[c].current;if(a){var r,l=a.getBoundingClientRect().top;if(l>-50&&l<n+100)-1===e&&(e=c),o.props.files[c]&&i.push(null===(r=o.props.files[c])||void 0===r?void 0:r.path)}}o.props.onVisibleItemsChange(i)}}),500),o.onListScroll=function(){o.canAutoScroll=!1,o.getVisibleItemsDebounced()},o.isMultiSelected=function(t){var n=!1;return o.state.selectionEdges[0]<=t&&o.state.selectionEdges[1]>=t&&(n=!0),n},o.itemToScroll=0,o.autoScrollToItem=function(t){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];o.itemToScroll=n?t:o.itemToScroll+t,o.itemToScroll<0&&(o.itemToScroll=0),o.itemToScroll>o.props.files.length&&(o.itemToScroll=o.props.files.length),o.scrollerListRef.current.scrollToItem(o.itemToScroll)},o.getUrlLoginToken=function(){return"?token=".concat(Object(B.b)())},o.state={hoverMode:!1,selectionEdges:[-1,-1]},o}return Object(N.a)(e,[{key:"shouldComponentUpdate",value:function(t,n){if(JSON.stringify(t.files)!==JSON.stringify(this.oldFiles)){this.oldFiles=Object(F.a)(t.files),this.liRefs=[];for(var e=0;e<t.files.length;e++)this.liRefs.push(i.a.createRef());this.getVisibleItemsDebounced(),this.setState({selectionEdges:[-1,-1]}),this.canAutoScroll=!0}return this.props.activeFileIndex>0&&this.canAutoScroll&&(this.canAutoScroll=!1,this.autoScrollToItem(this.props.activeFileIndex)),!0}},{key:"render",value:function(){var t=this,n=J.a[this.props.sortMode],e=p.a.sizes.l2.fileLi.height+2*p.a.sizes.l2.fileLi.padding+p.a.sizes.l2.fileLi.margin,o=window.innerHeight-(p.a.sizes.search.h+p.a.sizes.search.padding),c=Object(r.c)("desktop")?o:o-p.a.sizes.mobile.bottomBarHeight;return Object(a.c)(i.a.Fragment,null,Object(a.c)("div",{className:"list-wrapper-scroller",style:{height:c},onScroll:this.onListScroll,ref:this.scrollerWrapperRef},Object(a.c)(z.a,null,(function(o){o.height;var r=o.width;return Object(a.c)(D.a,{itemData:t.props.files,className:"List",ref:t.scrollerListRef,height:c,itemCount:t.props.files.length,itemSize:e,width:r||0,onScroll:t.onListScroll},(function(e){var o=e.index,c=e.style,l=t.props.files[o],s=t.props.filesPreview[l.path];return Object(a.c)("div",{style:c},Object(a.c)("li",{ref:t.liRefs[o],style:{width:r||0-2*X.l2.fileLi.padding-2*X.l2.fileLi.margin-35},className:["file-element-list","element-".concat(o),"".concat(t.isMultiSelected(o)?"active":""),"".concat(o===t.props.activeFileIndex?"active":""),"".concat(s&&s.picture?"with-image":"")].join(" "),key:o,draggable:!0,onDragStart:function(){var n=[],e=t.state.selectionEdges;n=-1!==e[0]||-1!==e[1]?t.props.files.slice(e[0],e[1]+1):[l],t.props.onFileDragStart(n)},onDragEnd:function(){t.props.onFileDragEnd()},onClick:function(n){if(U["shift"]){var e=[t.props.activeFileIndex,o];e.sort(),t.setState({selectionEdges:e})}else t.props.onFileClicked(o),t.setState({selectionEdges:[-1,-1]});t.props.onFileClicked(o)}},Object(a.c)("div",{className:"background-item"}),Object(a.c)("div",{className:"background-item-border"}),Object(a.c)("div",{className:"left"},Object(a.c)("h3",{className:"label ".concat(l.name.length<=35?"oneliner":"more"),onMouseEnter:function(n){t.props.hoverMode&&t.props.onFileClicked(o)}},l.name),Object(a.c)("div",{className:"content"},s&&s.content&&Object(a.c)(i.a.Fragment,null,s.content)),Object(a.c)("div",{className:"date ".concat(n)},Object(L.a)(new Date(("modified"===n?l.modified:l.created)||0)))),Object(a.c)("div",{className:"right"},s&&s.picture&&Object(a.c)("div",{className:"picture",style:{backgroundColor:"white",backgroundImage:"url('".concat(s.picture.startsWith("http")?s.picture+t.getUrlLoginToken():"".concat(Object(M.a)(t.props.files[0].folder),"/").concat(s.picture).concat(t.getUrlLoginToken()),"')")}}))))}))}))))}}]),e}(i.a.Component),Y=i.a.memo(G,(function(t,n){return!1})),$=Object(s.a)({},p.a),Z=($.els,$.colors),X=($.font,$.sizes),Q=e(225),tt=e(29),nt=function(t){return Object(a.c)("div",{className:"folder-tree-view-component"},Object(a.c)("h3",{className:"subtitle"},E.a.folders),Object(a.c)(et,{openFolders:t.openFolders,folder:t.folder,current:t.current,onFolderClicked:t.onFolderClicked,onFolderMenuAction:t.onFolderMenuAction,onFolderOpen:function(n){Object(x.d)((function(e){e.ui.browser.folders.open.add(n),t.onFolderOpen(n)}))},onFolderClose:function(n){Object(x.d)((function(e){console.log("ONFOLDERCLOSE",n),e.ui.browser.folders.open.remove([n]),t.onFolderClose(n)}))},onFolderDragStart:t.onFolderDragStart,onFolderDragEnd:t.onFolderDragEnd,onFolderDrop:t.onFolderDrop}))},et=function t(n){var e=n.openFolders.includes(n.folder.path)&&n.folder.hasFolderChildren,i=Object(o.useState)(!1),r=Object(c.a)(i,2),l=r[0],s=r[1],u=Object(o.useState)(!1),d=Object(c.a)(u,2),f=d[0],b=d[1],g=Object(o.useState)(""),h=Object(c.a)(g,2),m=h[0],v=h[1];Object(o.useEffect)((function(){e&&!n.folder.children||e&&n.folder.children&&0===n.folder.children.length?b(!0):b(!1)}),[n.folder.children,e]);var w=Object(tt.a)(n.current,n.folder.key);return Object(a.c)("li",{className:"folder-wrapper ".concat(w?"current":""," "),draggable:!0,onDrop:function(t){console.log("DROP",t),n.folder.key&&(n.onFolderDrop(n.folder),t.stopPropagation())},onDragStart:function(t){n.folder.key&&(n.onFolderDragStart(n.folder),t.stopPropagation())},onDragOver:function(t){v("drag"),t.preventDefault(),t.stopPropagation()},onDragEnd:function(){n.folder.key&&n.onFolderDragEnd()},onMouseLeave:function(){l&&s(!1)}},Object(a.c)("div",{className:"folder-title ".concat(m),onDragEnter:function(t){},onDrop:function(t){console.log("DROP2",t),v("")},onDragLeave:function(t){v("")}},Object(a.c)("span",{className:"icon",onClick:function(t){e?n.onFolderClose(n.folder.key):n.onFolderOpen(n.folder.key)}},n.folder.hasFolderChildren&&Object(a.c)(C.a,{name:e?"faCaretDown":"faCaretRight",color:p.a.colors.main})),Object(a.c)("span",{className:"title",onClick:function(t){n.onFolderClicked(n.folder.key)}},Object(a.c)("div",{className:"title-drag-bg"}),Object(a.c)("div",{className:"title-label"}," ",n.folder.title)),Object(a.c)("span",{onClick:function(){s(!l)},className:"context-menu-wrapper"},Object(a.c)(C.a,{name:"faEllipsisH",color:p.a.colors.l1.font}),l&&Object(a.c)("div",{className:"context-menu context-menu-folders"},Object(a.c)("ul",null,Object(a.c)("li",{onClick:function(){if(""===n.folder.path)return s(!1);var t=prompt("".concat(E.a.renameFolderPrompt," "),n.folder.title);t&&""!==t&&t!==n.folder.title&&n.onFolderMenuAction("rename",n.folder,t),s(!1)}},E.a.renameFolder),Object(a.c)("li",{onClick:function(){if(""===n.folder.path)return s(!1);Object(x.e)().then((function(t){t.popup.prompt({text:"".concat(E.a.createFolderPrompt,' "').concat(n.folder.path,'"?'),userInput:!0,onAccept:function(t){t&&""!==t&&n.onFolderMenuAction("create",n.folder,t)},onRefuse:function(){}})})),s(!1)}},E.a.createFolder),-1===n.folder.path.indexOf(".tiro/.trash")&&Object(a.c)("li",{onClick:function(){if(""===n.folder.path)return s(!1);s(!1),n.onFolderMenuAction("moveToTrash",n.folder)}},E.a.moveToTrash),-1!==n.folder.path.indexOf(".tiro/.trash")&&Object(a.c)("li",{onClick:function(){if(""===n.folder.path)return s(!1);s(!1),Object(x.e)().then((function(t){t.popup.confirm("".concat(E.a.deleteFolderPrompt,' "').concat(n.folder.path,'"?'),(function(){n.onFolderMenuAction("delete",n.folder)}))}))}},E.a.deleteFolder))))),f&&Object(a.c)("div",{className:"loading"},"..."),e&&Object(a.c)("ul",{className:"folder-children"},n.folder.children&&n.folder.children.map((function(e,o){return Object(a.c)(t,{openFolders:n.openFolders,key:o,folder:e,current:n.current,onFolderOpen:n.onFolderOpen,onFolderMenuAction:n.onFolderMenuAction,onFolderClose:n.onFolderClose,onFolderClicked:n.onFolderClicked,onFolderDragStart:n.onFolderDragStart,onFolderDragEnd:n.onFolderDragEnd,onFolderDrop:n.onFolderDrop})}))))},ot=e(36),it=function(t){var n=Object(s.a)({},t).files,e=Object(ot.a)(n)?n.slice(0,20):[];return Object(a.c)(i.a.Fragment,null,e.length>0&&Object(a.c)("div",{className:"last-notes-component"},Object(a.c)("h3",{className:"subtitle"},E.a.lastNotes),Object(a.c)("ul",null,e.map((function(n,e){var o=n.name.replace(".md","");return o=o.length>20?"".concat(o.substr(0,20)):o,Object(a.c)("li",{key:e,title:o,onClick:function(e){t.onClick(n)},className:"note"},Object(a.c)(C.a,{name:"faFile"}),o)})))))},ct=i.a.memo(it,(function(t,n){return t.files===n.files})),at=e(67),rt=e(56),lt=function(t){var n=Object(o.useContext)(x.a),e=!!n&&n.status.searching.get;return Object(a.c)(i.a.Fragment,null,Object(a.c)("div",{className:"search-bar-component"},Object(a.c)("input",{type:"text",placeholder:E.a.searchPlaceholder,value:t.term,onKeyDown:function(e){if("Enter"===e.key){if(t.term.length<3)return;n&&n.ui.search.search(t.term)}},onChange:function(e){!function(e,o){if(n){var i=n.ui.browser.folders.current.get();""===t.term&&""!==i&&(e=e+" "+i,o&&setTimeout((function(){var t=(o.selectionStart||0)-i.length-1;o.selectionStart=t,o.selectionEnd=t}),10)),n.ui.search.term.set(e)}}(e.target.value,e.target)}}),Object(a.c)("div",{className:"search-status"},e&&E.a.searchingLabel)))},st=e(72),ut=function(t){var n={title:t.realname,folder:t.folder,mobileview:"editor"},e="".concat(j.a.global.protocol).concat(j.a.global.url).concat(j.a.global.port,"?").concat(Object(st.f)(n));window.open(e,"popupDetached","width=600,height=600")},pt=e(32),dt=e(96),ft=function(t,n){dt&&dt.bind&&dt.bind(t,n)},bt=function(t,n){dt&&dt.bind&&dt.unbind(t,n)},gt=function(t){var n=Object(o.useState)(0),e=Object(c.a)(n,2),i=e[0],l=e[1],s=Object(o.useRef)(0);Object(o.useEffect)((function(){u(t.startingIndex)}),[t.startingIndex]);var u=function(t){l(t),s.current=t},p=function(n){O(!1),h(10),-1===n&&0===s.current?s.current=t.images.length-1:1===n&&s.current===t.images.length-1?s.current=0:s.current=s.current+n,u(s.current)},d=Object(o.useState)(10),f=Object(c.a)(d,2),g=f[0],h=f[1],m=Object(o.useState)(!1),v=Object(c.a)(m,2),w=v[0],O=v[1],j=function(t){var n=t+g;n<0&&(n=0),n>20&&(n=20),h(n)},x=Object(o.useRef)(null),k=(function(){var t="0px";if(x.current){var n=x.current.clientHeight;t="".concat(n-5,"px")}}(),Object(pt.b)((function(t){var n=t.deltaY>0?1:-1;j(n)}),150)),y=Object(o.useRef)(0),_=(Object(pt.b)((function(t){if(2===t.touches.length){var n=t.touches[0].clientY>y.current?1:-1;y.current=t.touches[0].clientY,j(n)}}),150),function(){var n="mobile"===Object(r.a)()?"mobile":"desktop",e=[{class:"left ".concat(n),title:"left",icon:"faChevronLeft",action:function(){p(-1)}},{class:"close",title:"close",icon:"faTimes",action:function(){t.onClose()}},{class:"right ".concat(n),title:"right",icon:"faChevronRight",action:function(){p(1)}}];return w&&(e.unshift({class:"zoom",title:"zoom",icon:"faPlus",action:function(){j(1)}}),e.unshift({class:"dezoom",title:"dezoom",icon:"faMinus",action:function(){j(-1)}})),e.push({class:"zoomToggle",title:"zoomToggle",icon:"magnifying-glass-".concat(w?"minus":"plus"),action:function(){O(!w)}}),e});Object(o.useEffect)((function(){var t=function(){p(1)},n=function(){p(-1)};return ft("right",t),ft("left",n),function(){console.log("destroying lightbox"),bt("right",t),bt("left",n)}}),[]);return Object(a.c)("div",{className:"lightbox-component"},Object(a.c)("div",{className:"lightbox-bg",onClick:function(){t.onClose()}}),Object(a.c)("div",{className:"lightbox-content images-nb-".concat(t.images.length),onWheel:k,ref:x},t.images.map((function(n,e){return Object(a.c)("div",{key:e,className:"lightbox-image",style:{display:e===i?"flex":"none"}},Object(a.c)("figure",{className:"zoom2 ".concat(w?"zoomed":"not-zoomed"),style:{backgroundSize:"".concat(g/10*100,"%")},onMouseMove:function(t){!function(t){var n,e,o,i,c=t.currentTarget;n=t.clientX,e=t.clientY,o=n/c.offsetWidth*100,i=e/c.offsetHeight*100;var a=function(t){return(t-50)/("mobile"===Object(r.a)()?1:3)},l=(o+=a(o))+"% "+(i+=a(i))+"%";c.style.backgroundPosition=l}(t)}},Object(a.c)("img",{src:Object(M.a)(n.url)+Object(B.c)(),onClick:function(t){!function(t){var n=t.target.src;t.target.parentElement.style.backgroundImage="url(".concat(n,")"),O(!0)}(t)}})),Object(a.c)("div",{className:"counter"},i+1,"/",t.images.length,!0===w&&" - [".concat(20*g,"%]")),Object(a.c)("div",{className:"image-infos"},n.file.name&&n.title&&Object(a.c)("div",{className:"image-name",onClick:function(t){return ut(n.file)}},n.file.name," - ",n.title),Object(a.c)(b.a,{popup:!1,buttons:_()})))}))))},ht={onAccept:function(){},onRefuse:function(){}},mt=function(t){var n=Object(o.useState)(!1),e=Object(c.a)(n,2),r=e[0],l=e[1],s=Object(o.useState)(""),u=Object(c.a)(s,2),p=u[0],d=u[1],f=Object(o.useState)(null),b=Object(c.a)(f,2),g=b[0],h=b[1],m=Object(o.useState)(E.a.promptPopup.defaultTitle),v=Object(c.a)(m,2),w=v[0],O=v[1],j=Object(o.useState)(!1),x=Object(c.a)(j,2),k=x[0],y=x[1],_=Object(o.useState)(E.a.promptPopup.accept),C=Object(c.a)(_,2),S=C[0],T=C[1],I=Object(o.useState)(E.a.promptPopup.refuse),N=Object(c.a)(I,2),P=N[0],R=N[1],A=function(t){l(!0),d(t.text),t.acceptLabelButton&&T(t.acceptLabelButton),t.refuseLabelButton&&R(t.refuseLabelButton),t.title&&O(t.title),t.userInput&&h(""),t.onAccept&&(ht.onAccept=t.onAccept),t.onRefuse?(ht.onRefuse=t.onRefuse,y(!0)):y(!1)},F=function(){l(!1),h(null),O(""),d(""),y(!1)},L={confirm:function(t,cb,n){A({title:"",text:t,onAccept:cb,onRefuse:function(t){function n(){return t.apply(this,arguments)}return n.toString=function(){return t.toString()},n}((function(){n&&n()}))})},show:function(t,n,cb){A({title:n,text:t,onAccept:cb,onRefuse:function(){}})},prompt:A};return{popupApi:L,PromptPopupComponent:function(){return Object(a.c)(i.a.Fragment,null,r&&Object(a.c)("div",{className:"prompt-popup-component"},Object(a.c)(rt.a,{title:w,onClose:F,canBgClose:!1},Object(a.c)("div",null,Object(a.c)("div",{className:"content",dangerouslySetInnerHTML:{__html:p}}),Object(a.c)("br",null),null!==g&&Object(a.c)("div",null,Object(a.c)("input",{type:"text",value:g,onChange:function(t){h(t.target.value)}}),Object(a.c)("br",null)),Object(a.c)("button",{value:"submit",className:"accept submit-button",onClick:function(t){ht.onAccept(g),F()}},S),k&&Object(a.c)("button",{value:"submit",className:"refuse submit-button",onClick:function(t){ht.onRefuse(g),F()}},P)))))}}},vt=e(217),wt=e(118),Ot=function(t){var n=Object(o.useContext)(x.a),e=Object(o.useState)(-1),i=Object(c.a)(e,2),r=i[0],l=i[1],s=Object(ot.a)(t.tabs)?t.tabs:[];return Object(a.c)("div",{className:"tab-list-wrapper-hover ".concat(t.pinStatus?"pinned":"unpinned")},Object(a.c)("div",{className:"top-hover-bar"}," "),Object(a.c)("div",{className:"tab-list-scroll-wrapper",style:{top:"".concat(t.pinStatus?0:-44,"px")}},Object(a.c)("div",{className:"tab-list-invisible-scroll"},Object(a.c)("div",{className:"tab-list-wrapper"},s.map((function(e,o){return Object(a.c)(xt,{key:o,tab:e,onDrop:function(t){l(t)},onDragEnter:function(t){l(t)},onDragEnd:function(t){n&&n.tabs.reorder(t,r),l(-1)},dragIndic:r,pos:o,onUpdate:t.onUpdate})})),(null===n||void 0===n?void 0:n.ui.browser.files.active.get)&&Object(a.c)("div",{className:"tab-wrapper tab-more",onClick:function(n){t.onUpdate("add")}},"+"),Object(a.c)("div",{className:"tab-wrapper tab-more",onClick:function(n){t.onPinToggle()}},Object(a.c)(C.b,{name:"thumbtack",size:.8}))))))},jt=function(t){var n=Object(s.a)({},t),e=n.tab,o=n.pos,c="Six",l=e.grid.layout.length;return 2===l&&(c="Two"),3===l&&(c="Three"),4===l&&(c="Four"),5===l&&(c="Five"),c="faDice".concat(c),Object(a.c)("div",{className:"tab-and-drag-wrapper"},t.dragIndic===o&&Object(a.c)("div",{className:"drag-indic"},"\u25bc"),Object(a.c)("div",{className:"tab-wrapper ".concat(e.active?"active":""),draggable:!0,onDragEnter:function(){t.onDragEnter(o)},onDrop:function(){t.onDrop(o)},onDragEnd:function(){t.onDragEnd(o)}},Object(a.c)("div",{className:"active-ribbon"}),Object(a.c)("div",{className:"tab-name",onClick:function(){t.onUpdate("activate",e)}},"mobile"!==Object(r.a)()&&Object(a.c)("input",{type:"text",className:"tab-input-text",value:e.name,style:{width:10*e.name.length+"px"},onChange:function(n){t.onUpdate("rename",e,n.target.value)}}),"mobile"===Object(r.a)()&&Object(a.c)(i.a.Fragment,null,e.name)),e.grid.layout.length>1&&Object(a.c)("div",{className:"tab-nb-windows",onClick:function(){t.onUpdate("activate",e)}},Object(a.c)(C.a,{name:c,color:"#b2b2b2"})),Object(a.c)("div",{className:"tab-close",onClick:function(){Object(x.d)((function(n){n.popup.confirm("".concat(E.a.deleteTabPrompt,' "').concat(e.name,'"?'),(function(){t.onUpdate("close",e)}))}))}},Object(a.c)(C.a,{name:"faPlus",color:"#b2b2b2"}))))},xt=i.a.memo(jt,(function(t,n){var e=!0,o=Object(F.a)({n:t.tab,p:n.tab});return o.n.grid=o.p.grid={},o.n.refresh=o.p.refresh="",JSON.stringify(o.p)!==JSON.stringify(o.n)&&(e=!1),n.pos!==t.pos&&(e=!1),n.dragIndic!==t.dragIndic&&(e=!1),n.tab.active!==t.tab.active&&(e=!1),n.onUpdate!==t.onUpdate&&(e=!1),e})),kt=e(219),yt=e(182),_t=e(220),Ct=e(160),Et=e(101),St=e(162),Tt=e(99),It=e(15),Nt=e(372),Pt=e(25),Rt=e(564),At=e(38),Ft=e(135),Lt=function(t){var n=Object(o.useState)(""),e=Object(c.a)(n,2),i=(e[0],e[1]),r=Object(o.useState)(t.view),l=Object(c.a)(r,2),s=l[0],u=(l[1],Object(pt.a)((function(){Object(x.d)((function(n){n.file.getContent(t.file.path,(function(n){i(n),t.searchedString&&Object(x.d)((function(n){setTimeout((function(){console.log("searchword",t.searchedString,t.replacementString,t.windowId),n.ui.note.editorAction.dispatch({type:"searchWord",searchWordString:t.searchedString,searchReplacementString:t.replacementString,windowId:t.windowId});var e=document.querySelector(".select-wrapper input");e&&(e.focus(),setTimeout((function(){e.focus(),setTimeout((function(){e.focus()}),100)}),50))}),300)}))}))}))}),200));Object(o.useEffect)((function(){u()}),[t.file,t.searchedString,s]);var p=t.height?t.height+"px":"100%",d=Object(o.useState)(t.windowId||Object(At.a)()),f=Object(c.a)(d,2),b=f[0],g=f[1];return Object(o.useEffect)((function(){g(t.windowId||Object(At.a)())}),[t.windowId]),Object(a.c)("div",{className:"note-preview-wrapper "+s,style:{height:p}},Object(a.c)(Ft.a,{content:{i:b,file:t.file,active:!1,view:t.view},forceView:t.view,canEdit:!0,showViewToggler:t.showViewToggler,showToolbar:t.showToolbar,titleEditor:t.titleEditor,onLayoutUpdate:t.onLayoutUpdate||function(){}}))},Mt=i.a.memo(Lt,(function(t,n){return JSON.stringify(t)===JSON.stringify(n)})),Dt=e(184),zt=e(183),Bt=e(60),Ht=e(228),Ut=e(378),Wt=e(31),qt="[PLUGIN CRON]";Object(Wt.a)("cron","trigger",(function(){Kt()}));var Vt="plugins-cron-infos",Jt=function(t,n){var e=[],o=[];Object(Pt.a)(n,(function(t,n){e.push(n),o.push(t)}));try{Object(Ht.a)(Function,e.concat([t.code])).apply(void 0,o)}catch(c){var i="[ERR in ".concat(t.type.toLocaleUpperCase()," plugin ").concat(t.name.toLocaleUpperCase(),"]: ").concat(c);console.log(i,c,{paramsNames:e,paramsValues:o,plugin:t}),console.trace(c),Object(Wt.d)("".concat(i))}},Kt=function(){Object(x.d)((function(t){t.plugins.list((function(n){t.cache.get(Vt,(function(e){e||(e={}),console.log(qt,"starting new batch cron",{plugins:n,cronState:e}),Object(Pt.a)(n,(function(n){var o,i,c,a=!0;if(!1===(null===(o=n.options)||void 0===o?void 0:o.disabled)&&(a=!1),"background"===n.type&&a){e[n.name]||(e[n.name]={vars:{}});var r=60*((null===(i=n.options)||void 0===i?void 0:i.background_exec_interval_in_min)||60)*1e3,l=(new Date).getTime(),s=(null===(c=e[n.name])||void 0===c?void 0:c.lastRunTime)||0;if(s+r>l)return console.log(qt,"bg plugin ".concat(n.name,", wait for ").concat(Math.round((s+r-l)/1e3)," seconds"));var u=s+r>l;console.log(qt,"exec the bg plugin ".concat(n.name,", last exec was ").concat(new Date(s).toJSON()),{p:n,lastRun:s,intervalRun:r,now:l,status:u});var p=e[n.name];Jt(n,{tiroApi:t,bgState:p}),e[n.name]&&!Object(Ut.a)(e[n.name])||(e[n.name]={vars:{}}),e[n.name].lastRunTime=l}})),t.cache.set(Vt,e,-1)}),{disableRamCache:!0})}))}))},Gt=e(35),Yt={charsStart:2},$t=[{label:"loading...",value:""}],Zt="[\ud83d\udd0e Search Mode]",Xt="[\ud83d\udcc1 Explorer Mode]",Qt="[\u2728 History Mode]",tn="[\ud83c\udf44 Plugin Mode]",nn={dict:{},config:{enabled:!0}},en=function(){nn.config.enabled=!1,nn.dict={}},on={hasBeenLoaded:!1},cn=function(t){var n=Object(o.useState)("editable"),e=Object(c.a)(n,2),i=e[0],l=e[1];Object(o.useEffect)((function(){F.current.focus()}),[i]);var u=Object(o.useState)([]),d=Object(c.a)(u,2),f=d[0],b=d[1],g=Object(o.useRef)([]),h=function(t){Object(ot.a)(t)&&(b(t),g.current=t)},m=Object(o.useState)([]),v=Object(c.a)(m,2),w=v[0],O=v[1],j=function(t){Object(x.d)((function(n){var e=n.tabs.active.get();"mobile"!==Object(r.a)()&&Object(Pt.a)(null===e||void 0===e?void 0:e.grid.content,(function(n){if(n.file){var e=n.file;Object(Pt.a)(t,(function(n,o){if(n&&n.value&&n.value===e.path)return delete t[o],!1}))}})),nn(t),O(t)}))},k=Object(o.useState)("No Options"),y=Object(c.a)(k,2),_=y[0],E=(y[1],function(n){Object(x.d)((function(e){e.ui.note.editorAction.dispatch({type:"insertText",insertText:Object(zt.a)(n)}),t.onClose()}))}),S=function(n){Object(x.d)((function(e){e.ui.floatingPanel.create({view:"editor",type:"file",file:n}),t.onClose()}))},T=function(t){var n=Object(o.useState)(!1),e=Object(c.a)(n,2),i=e[0],l=e[1];return Object(o.useMemo)((function(){return Object(a.c)("div",{className:"path-option-wrapper device-".concat(Object(r.a)()),onMouseEnter:function(t){l(!0)},onMouseLeave:function(t){l(!1)}},Object(a.c)("div",{className:"file"},t.file.name),Object(a.c)("div",{className:"folder"},t.file.folder),i&&Object(a.c)("div",{className:"actions"},Object(a.c)("div",{className:"action",onClick:function(n){n.stopPropagation(),E(t.file)}},Object(a.c)(C.b,{name:"link",label:"insert note link in the current note"})),Gt.d.curr.beta_floating_windows&&Object(a.c)("div",{className:"action",onClick:function(n){n.stopPropagation(),S(t.file)}},Object(a.c)(C.b,{name:"window-restore",label:"Open note in a floating window"}))))}),[t.file,i])},I=function(t){return Object(a.c)(T,{file:t})},N=(Object(o.useRef)(!1),Object(o.useState)({indicatorsContainer:function(t,n){return Object(s.a)(Object(s.a)({},t),{},{display:"none"})},menuList:function(t,n){var e="mobile"===Object(r.a)()?{}:{maxHeight:"150px"};return Object(s.a)(Object(s.a)({},t),e)},menu:function(t,n){var e="mobile"===Object(r.a)()?"all":"none";return Object(s.a)(Object(s.a)({},t),{},{position:"relative",pointerEvents:e})},control:function(t,n){return Object(s.a)(Object(s.a)({},t),{},{outline:"none",boxShadow:"none",border:0})},multiValue:function(t,n){return n.data.editable?t:Object(s.a)(Object(s.a)({},t),{},{backgroundColor:p.a.colors.main})},multiValueLabel:function(t,n){var e=Object(s.a)(Object(s.a)({},t),{},{color:"#919090!important"});return Object(s.a)({},e)},multiValueRemove:function(t,n){var e="mobile"===Object(r.a)()?"block":"none";return n.data.editable?t:Object(s.a)(Object(s.a)({},t),{},{display:e,opacity:"0.2",position:"relative",top:"3px"})}})),P=Object(c.a)(N,2),R=P[0],A=P[1];Object(o.useEffect)((function(){setTimeout((function(){R.menu=function(t,n){var e=(Object(r.a)(),"all");return Object(s.a)(Object(s.a)({},t),{},{position:"relative",pointerEvents:e})},A(R)}),500)}),[]);var F=Object(o.useRef)(),L=w[0]||{label:"",value:""},M=function(n){var e=Object(tt.d)(n);Object(x.d)((function(n){n.ui.browser.goTo(e.folder,e.name,{openIn:"activeWindow"}),t.onClose()}))},D=Object(o.useState)(""),z=Object(c.a)(D,2),B=z[0],H=z[1],U=Object(o.useRef)(null);Object(o.useEffect)((function(){U.current=B}),[B]);var W=Object(o.useRef)(""),q=Object(Bt.a)("omni-history",[],{history:!0}),V=Object(c.a)(q,3),J=V[0],K=V[1],G=V[2];Object(o.useEffect)((function(){!function(){var t=g.current,n=B.trim();if(fn("editor"),0===t.length)"/"===n&&(Object(Dt.a)("omnibar_explorer"),Object(x.d)((function(t){H("");var n=t.ui.browser.folders.current.get();setTimeout((function(){console.log(t.ui.browser.folders.current.get())})),lt(n)}))),""===n&&gt(),"?"===n&&(Object(Dt.a)("omnibar_search"),st()),":"===n&&ht(),","===n&&et();else if(t[0].label===Zt)dt(t,n);else if(t[0].label===Xt){var e=function(){var n=Object(It.a)(t);n.shift();var e="";return Object(Pt.a)(n,(function(t){e+="/"+t.value})),e}();if(e.endsWith(".md")){var o=Object(It.a)(t);o.pop(),console.log("histSelec",o,B),""===B&&o.push({label:B,value:B}),it(o),e=e.replace(t[0].label,""),M(e)}else W.current!==e&&(W.current=e,lt(e))}else t[0].label===tn?mt(n,t):t[0].label===Qt&&ct(n,t)}(),vt.current&&vt.current()}),[f,B,J]);var Y=function(t){return t.replaceAll("[","").replaceAll("]","")},$='[OMNIBAR "ctrl+alt+space"] type "?" for '.concat(Y(Zt),', "/" for ').concat(Y(Xt),', ":" for ').concat(Y(tn),', "," for ').concat(Y(Qt)),Z=Object(o.useState)($),X=Object(c.a)(Z,2),Q=X[0],nt=X[1],et=function(){h([{value:Qt,label:Qt}])};Object(o.useEffect)((function(){on.hasBeenLoaded||(G(),on.hasBeenLoaded=!0)}),[]);var it=function(t){console.log("1/2 [HIST mode]: addToOmniHistory",Object(It.a)(t));var n=[];Object(Pt.a)(t,(function(t){n.push(t.label)}));var e=n.join(" "),o={options:t,id:e},i=J.filter((function(t){return t.id!==e})),c=[o].concat(Object(It.a)(i));c.length>100&&c.splice(0,100),console.log("2/2 [HIST mode] add to omnihist ",{nItem:o,nItems:c}),K(c)},ct=function(t,n){if(Ct(null),n[1]){if(n[1]){var e;console.log("HIST selected",n[1]);var o=null===(e=n[1].payload)||void 0===e?void 0:e.options;if(!o)return;var i=o.pop();i&&H(i.label),h(o)}}else{var c=J,a=[];j(a),Object(Pt.a)(c,(function(t){a.push({label:t.id,value:t.id,payload:t})})),nt("history mode"),j(a),","===t&&H("")}},at=Object(o.useRef)(0),rt=Object(o.useRef)(""),lt=function(t){if(""!==t&&(t.endsWith("/")||(t+="/"),t!==rt.current)){rt.current=t,console.log("== EXPLORER",t),j($t),l("locked"),at.current++;var n=at.current;Object(x.d)((function(e){var o=[t];e.folders.get(o,(function(i){if(n===at.current&&(i.folderPaths.join("")===o.join("")&&i.folders[0])){var c=i.folders[0].children;e.files.get(t,(function(n,e){if(e===t){var o=t.split("/"),i=[];i.push({value:Xt,label:Xt}),i.push({value:"/",label:"/"}),Object(Pt.a)(o,(function(t){""!==t&&i.push({value:t,label:t+"/"})}));var r=[];Object(a.c)("div",{style:{},className:"barimage"});Object(Pt.a)(c,(function(t){var n=t.path.split("/"),e=n[n.length-1]+"/";r.push({value:e,label:"\ud83d\udcc1 "+e})})),Object(Pt.a)(n,(function(t){var n=t.path.split("/"),e=n[n.length-1],o={file:t},i=I(t);r.push({value:e,label:i,payload:o})})),h(i),j(r),l("editable")}}))}}))}))}},st=function(){h([{value:Zt,label:Zt}])},ut=Object(o.useRef)(""),dt=function(t,n){if(t[1]){if(2===t.length)fn("editor"),bt(n,t[1].label,t);else if(3===t.length&&ft.current===t[2].value)fn("preview"),console.log("STEP 3-1 (optional) : filter found results",ft.current);else if(3===t.length||4===t.length){var e;console.log("STEP 3-2 : jump to page",{w:ft.current,stags:t});var o=t.length-1;if(null===(e=t[o].payload)||void 0===e||!e.file)return;var i=t[o].payload.file;M(i.path)}}else"?"===n&&Object(x.d)((function(t){var n=t.ui.browser.folders.current.get;H(n)})),""===n?H(ut.current):ut.current=n.slice(0,-1),nt('Path to search (ex:"/path/to/folder") + ENTER'),j([{label:n,value:n}])},ft=Object(o.useRef)(null),bt=Object(pt.a)((function(t,n,e){var o=n,i=t;if(i&&o&&i.length>=Yt.charsStart&&o.length>0){nt('Searching "'.concat(i,'" in "').concat(o,'" ...')),j($t);var c=i.includes("*"),r=[];j(r),ft.current=i,it([].concat(Object(It.a)(e),[{label:i,value:i}])),Object(x.d)((function(t){t.search.word(i,o,(function(t){Object(Pt.a)(t,(function(t){Object(Pt.a)(t.results,(function(n){var e=c?"(".concat(i,")"):"",o="".concat(t.file.path," ").concat(e),l=n.indexOf(i),s=100,u=n,p=l>50?l-50:0,d=l+50<u.length?l+50:u.length;u.length>s&&(u=u.substring(p,d));var f=u,b=u.replaceAll(i,"<b>".concat(i,"</b>")),g=Object(a.c)("div",{className:"path-option-wrapper"},Object(a.c)("div",{className:"search-location"},o),Object(a.c)("div",{className:"occur-wrapper",dangerouslySetInnerHTML:{__html:b}}));r.push({label:g,value:ft.current+t.file+f+o,payload:{file:t.file,line:f,raw:n}})}))})),0===r.length&&Ct(null),r.unshift({label:"\ud83d\udd0e Filter the ".concat(r.length,' results for "').concat(ft.current,'"'),value:ft.current}),nt("".concat(r.length-1,' results found for "').concat(i,'" in "').concat(o,'" ')),j(r)}))}))}else nt("Type the searched word"),j([]),setTimeout((function(){F.current.focus()}),100),Ct(null),ft.current=""}),500),gt=function(){var n;nt($);var e=function(t){var n=[];return Object(Pt.a)(t,(function(t){var e={value:t.path,label:I(t),payload:{file:t}};n.push(e)})),n}(t.lastNotes),o=e.shift(),i=e.shift();e.unshift(o),e.unshift(i);var c=e[0]?null===(n=e[0].payload)||void 0===n?void 0:n.file:null;c&&Ct(c),j(e)},ht=function(){h([{value:tn,label:tn}])},mt=function(n,e){Ct(null),Object(x.d)((function(o){if(1===e.length){var i=[];o.plugins.list((function(t){Object(Pt.a)(t,(function(t){"bar"===t.type&&i.push({label:t.name,value:t})})),j(i),":"===n&&H(""),i=Object(Rt.a)(i,["label"]),nt("".concat(i.length," bar plugins found"))}))}else if(e.length>=2){var c={input:n,setInputTxt:H,inputTxt:B,inputTxtRef:U,options:w,setOptions:j,onChange:vt,onClose:t.onClose,onHide:t.onHide,close:t.onClose,hide:t.onHide,selectedOptionRef:g,setSelectedOption:h,addToOmniHistory:it,selectedTags:e,setNotePreview:Ct,notePreview:yt,setHtmlPreview:Ft,htmlPreview:Tt,disableCache:en},a=e[1].value;j($t),Object(x.d)((function(t){Jt(a,{barApi:c,tiroApi:t})}))}}))},vt=Object(o.useRef)(null),wt=Object(o.useState)(Object(At.a)()),Ot=Object(c.a)(wt,2),jt=Ot[0],xt=(Ot[1],Object(o.useState)(null)),kt=Object(c.a)(xt,2),yt=kt[0],_t=kt[1],Ct=function(t){_t(t)},Et=Object(o.useState)(null),St=Object(c.a)(Et,2),Tt=St[0],Ft=St[1],Lt=Object(o.useState)(void 0),Ht=Object(c.a)(Lt,2),Ut=Ht[0],Wt=Ht[1],qt=function(t,n){var e=g.current;e[0]&&e[0].label===Xt?Ct(t):e[0]&&e[0].label===Zt?(Ct(t),setTimeout((function(){Wt(n)}),300)):e[0]?Ct(null):Ct(t)},Vt=Object(o.useRef)([]),Kt=Object(pt.a)((function(){var t=document.querySelectorAll("div[id*='-option']");if(0===t.length)return Ct(null);Object(Pt.a)(t,(function(t){if("rgb(222, 235, 255)"===getComputedStyle(t)["background-color"]){var n=parseInt(t.id.split("-").pop()),e=w[n].payload;if(!e)return;var o=e.file,i=e.line||void 0;qt(o,i)}}))}),400),nn=Object(pt.a)((function(t){!function(t){Object(Pt.a)(Vt.current,(function(t){t.disconnect()})),Vt.current=[];var n=document.querySelectorAll("div[id*='-option']");Object(Pt.a)(n,(function(t,n){var e=new MutationObserver((function(n){var e=parseInt(t.id.split("-").pop());if("rgba(0, 0, 0, 0)"!==getComputedStyle(t)["background-color"]&&w[e]&&w[e].payload){var o=w[e].payload;if(!o)return;var i=o.file,c=o.line||void 0;document.querySelectorAll("div[id*='-option']"),qt(i,c)}}));e.observe(t,{childList:!0,attributes:!0,subtree:!1}),Vt.current.push(e)}))}()}),100);Object(o.useEffect)((function(){nn(w)}),[w,B,J]);var cn=Object(o.useState)(300),an=Object(c.a)(cn,2),rn=an[0],ln=an[1],sn=Object(o.useRef)(null);Object(pt.a)((function(){if(sn&&sn.current){var t=sn.current.clientHeight+30,n=window.innerHeight-t-50;rn!==n&&ln(n)}}),10)();var un=Object(o.useState)("editor"),pn=Object(c.a)(un,2),dn=pn[0],fn=pn[1];return Object(a.c)("div",{className:"omnibar-popup-bg ".concat(t.show?"":"hide"),onClick:function(n){t.onClose()}},Object(a.c)("div",{className:"omnibar-popup-wrapper device-".concat(Object(r.a)()," ").concat(i)},Object(a.c)("div",{className:"flex-wrapper",onClick:function(t){t.stopPropagation()}},Object(a.c)("div",{className:"select-wrapper",ref:sn},Object(a.c)("div",{className:"help"},Q),Object(a.c)("div",{className:"help-right",onClick:function(n){t.onHide()}},Object(a.c)(C.a,{name:"faEyeSlash",color:"#b2b2b2"})),Object(a.c)(Nt.a,{isMulti:!0,ref:F,menuIsOpen:!0,defaultValue:L,value:f,autoFocus:!0,isDisabled:"locked"===i,onChange:function(t,n){var e=t[0];if(e&&e.payload&&e.payload.file){var o=e.payload.file;M(o.path),t=[]}h(t)},openMenuOnClick:!1,inputValue:B,onInputChange:function(t,n){Kt(),"input-blur"===n.action||"menu-close"===n.action||H(t)},onFocus:function(t){},options:w,styles:R,noOptionsMessage:function(){return _}})),yt&&"mobile"!==Object(r.a)()&&Object(a.c)("div",{className:"preview-wrapper ".concat(yt?"note-preview":"html-preview-wrapper"),style:{height:rn}},yt&&"mobile"!==Object(r.a)()&&Object(a.c)(Mt,{file:yt,showToolbar:!0,titleEditor:!1,searchedString:Ut,height:rn,view:dn,windowId:jt}),Tt&&Object(a.c)("div",{className:"html-preview",dangerouslySetInnerHTML:{__html:Tt},style:{height:rn}})))))},an=function(t){var n=Object(o.useState)(""),e=Object(c.a)(n,2),r=e[0],l=e[1];return Object(o.useEffect)((function(){Object(x.d)((function(n){n.file.getContent(t.filePath,(function(e){var o=Object(tt.d)(t.filePath),i=n.note.render({raw:e,file:o});l(i)}))}))}),[t.filePath]),Object(a.c)(i.a.Fragment,null,Object(a.c)("div",{className:"rendered-note-component"},Object(a.c)("span",{className:"rendered-note-content-wrapper",dangerouslySetInnerHTML:{__html:r}})))},rn=function(t){return Object(a.c)(i.a.Fragment,null,Object(a.c)("div",{className:"shortcut-component"},Object(a.c)("h3",{className:"subtitle"},"shortcuts"),Object(a.c)(an,{filePath:t.filePath})))},ln=e(153),sn=e(237),un=e(224);Object(Wt.a)("notification","emit",(function(t,n){var e=t||"";Object(x.d)((function(o){console.log(t,n),o.ui.notification.emit({content:(new Date).toJSON()+" \n\n <br/> test notif => \n"+e,options:Object(s.a)({},n)})}))}));var pn=function(t){var n=Object(o.useState)([]),e=Object(c.a)(n,2),i=e[0],r=e[1],l=Object(o.useRef)([]);Object(o.useEffect)((function(){Object(x.d)((function(t){t.socket.get((function(t){t.on("getNotification",(function(t){var cb;cb=function(n){if(!0===!n)return console.log("[NOTIFS] notifications disabled, not displaying it");t.notification.id||(t.notification.id=Object(At.a)()),p(t.notification),u(t.notification)},Object(x.d)((function(t){cb(!t.userSettings.get("view_disable_notification_popups"))}))}))}))}))}),[]);var s=Object(o.useRef)({}),u=function(t){var n,e=1e3*((null===(n=t.options)||void 0===n?void 0:n.hideAfter)||10);e<0||t.id&&(s.current[t.id]=setTimeout((function(){d(t.id)}),e))},p=function(t){l.current=l.current.filter((function(n){return n.id!==t.id})),t.id&&s.current[t.id]&&clearTimeout(s.current[t.id]),l.current.unshift(t),r(Object(It.a)(l.current))},d=function(t){t&&(l.current=l.current.filter((function(n){return n.id!==t})),r(Object(It.a)(l.current)))},f=function(t){var n,e,o="normal";return null!==(n=t.options)&&void 0!==n&&n.type&&(o=null===(e=t.options)||void 0===e?void 0:e.type),o};return Object(a.c)("div",{className:"notifications-center-wrapper"},Object(a.c)("div",{className:"notifications-list"},i.map((function(t){return Object(a.c)("div",{key:t.id,className:"notif-wrapper notif-type-".concat(f(t))},Object(a.c)("div",{className:"notif-close",onClick:function(n){d(t.id)}},Object(a.c)(C.b,{name:"close"})),Object(a.c)("div",{className:"notif-content",dangerouslySetInnerHTML:{__html:t.content}}))}))))},dn=e(216),fn=e(73),bn=function(t){var n,e,i=Object(tt.d)(t.notePreview.filepath);Object(o.useEffect)((function(){u("note-preview-popup-wid-".concat(Object(At.a)()))}),[]);var r=Object(o.useState)(""),l=Object(c.a)(r,2),s=l[0],u=l[1];return Object(a.c)("div",{className:"page-link-preview-popup-ext",onMouseLeave:function(t){Object(x.d)((function(t){t.ui.notePreviewPopup.close()}))},style:{left:t.notePreview.position[0],top:t.notePreview.position[1]}},Object(a.c)("div",{className:"click-throught",onClick:function(n){var e,o=Object(tt.d)(t.notePreview.filepath);o&&null!==(e=t.notePreview.opts)&&void 0!==e&&e.windowIdToOpenIn&&(Object(fn.d)(!0),Object(x.d)((function(n){var e;n.ui.browser.goTo(o.folder,o.name,{openIn:null===(e=t.notePreview.opts)||void 0===e?void 0:e.windowIdToOpenIn})})))}}),Object(a.c)("div",{className:"page-link-preview-popup-int"},Object(a.c)(Mt,{file:i,searchedString:null===(n=t.notePreview.opts)||void 0===n?void 0:n.searchedString,replacementString:null===(e=t.notePreview.opts)||void 0===e?void 0:e.replacementString,windowId:s,showToolbar:!0,titleEditor:!1,view:"editor",linkPreview:!1})))},gn=400,hn=300,mn=e(115),vn=e(88),wn=e(95),On=window._tiro_generatePluginsMarketplaceHtml?window._tiro_generatePluginsMarketplaceHtml:function(){},jn=function(t){var n=Object(o.useState)([]),e=Object(c.a)(n,2),i=e[0],r=e[1],l=Object(o.useState)(""),s=Object(c.a)(l,2),u=s[0],p=s[1];return Object(o.useEffect)((function(){Object(x.d)((function(t){t.plugins.marketplace.fetchList((function(t){r(t);var n=On({pluginsDescriptions:t,fullDisplayMode:!0,onPluginClick:function(t){console.log("pluginClick",t)},onSettingChange:function(t){console.log("onSettingChange",t)}});p(n)}))}))}),[]),Object(a.c)("div",{className:"plugins-marketplace-popup-wrapper"},Object(a.c)(rt.a,{title:"Plugins Marketplace",onClose:function(){t.onClose()}},i.length>0&&Object(a.c)("div",{id:"plugin-marketplace-placeholder",dangerouslySetInnerHTML:{__html:u}}),0===i.length&&Object(a.c)("div",{className:"plugins-list-loading"},"Contacting Marketplace...")))},xn=e(131),kn=e(241),yn=e(375),_n=e(127),Cn=e.n(_n),En=e(71),Sn=e(243),Tn=15,In=!1,Nn=function(){if(In)return Tn;var t=document.createElement("div");t.style.visibility="hidden",t.style.overflow="scroll",t.style.msOverflowStyle="scrollbar",document.body.appendChild(t);var n=document.createElement("div");return t.appendChild(n),Tn=t.offsetWidth-n.offsetWidth,t.parentNode.removeChild(t),In=!0,Tn},Pn=function(t){var n,e=Object(o.useRef)(t.panel);Object(o.useEffect)((function(){e.current=t.panel}),[t.panel]);var i=function(n){t.onPanelUpdate&&Object(x.d)((function(t){t.ui.floatingPanel.update(n)}))},l=Object(o.useState)(!1),u=Object(c.a)(l,2),p=u[0],d=u[1],f=function(t){d(t)},g=Object(o.useState)(!1),h=Object(c.a)(g,2),m=h[0],v=h[1],w=function(){A(),v(!0),t.onPanelDragStart()},O=function(){v(!1),t.onPanelDragEnd()},j=Object(o.useState)(t.panel),k=Object(c.a)(j,2),y=k[0],_=k[1],E=Object(pt.a)((function(){O()}),500),S=function(){Object(x.d)((function(n){n.ui.floatingPanel.minimizePanel(t.panel.id)}))},T=t.panel.size.height;t.panel.ctagConfig&&(t.panel.ctagConfig.opts||(t.panel.ctagConfig.opts={}),t.panel.ctagConfig.opts.wrapperHeight="100%",t.panel.ctagConfig.opts.sandboxed=!1);var I=Object(o.useState)(!0),N=Object(c.a)(I,2),P=N[0],R=N[1],A=function(){t.highestVisibleZIndex!==t.panel.zIndex&&Object(x.d)((function(n){n.ui.floatingPanel.pushWindowOnTop(t.panel.id)}))},F=p&&t.panelsVisibleNumber>1&&t.highestVisibleZIndex!==t.panel.zIndex,L=Object(o.useState)(Object(At.a)()),M=Object(c.a)(L,2),D=M[0];M[1];t.panel.ctagConfig&&(t.panel.ctagConfig.opts||(t.panel.ctagConfig.opts={}),t.panel.ctagConfig.opts.windowId=D);var z="type-".concat(t.panel.type," ").concat(null!==(n=t.panel.ctagConfig)&&void 0!==n&&n.tagName?"ctag-".concat(t.panel.ctagConfig.tagName):"");return Object(a.c)("div",{className:"floating-panel-wrapper ".concat(z," ").concat(t.panel.status),style:{zIndex:t.panel.zIndex},key:t.panel.id,onMouseDown:function(){A()}},Object(a.c)(Cn.a,{cancel:"body",handle:".handle",position:t.panel.position,scale:1,onStart:function(n,e){A(),w(),i(Object(s.a)(Object(s.a)({},t.panel),{},{position:{x:e.x,y:e.y}}))},onDrag:function(n,e){i(Object(s.a)(Object(s.a)({},t.panel),{},{position:{x:e.x,y:e.y}}))},onStop:function(n,e){O(),i(Object(s.a)(Object(s.a)({},t.panel),{},{position:{x:e.x,y:e.y}}))}},Object(a.c)(yn.a,{boundsByDirection:!0,className:"floating-panel",size:t.panel.size,onResize:function(n,e,o,c){i(Object(s.a)(Object(s.a)({},t.panel),{},{size:{width:o.offsetWidth,height:o.offsetHeight}})),w(),E()}},Object(a.c)("div",{className:"floating-panel__wrapper"},Object(a.c)("div",{className:"floating-panel__actions"},Object(a.c)(b.a,{class:"floating-bar-toolbar",size:1,buttons:[{title:"Move Window",customHtml:Object(a.c)("div",{className:"handle"},Object(a.c)(C.b,{name:"grip-vertical"})),action:function(){}},"desktop"===Object(r.a)()?{title:"Minimize",icon:"window-minimize",action:S}:{},{title:"Maximize",icon:"expand",action:function(){var n=t.panel;n.size.width===window.innerWidth&&n.size.height===window.innerHeight&&0===n.position.x&&0===n.position.y?i(y):(_(n),i(Object(s.a)(Object(s.a)({},n),{},{size:{width:window.innerWidth,height:window.innerHeight},position:{x:0,y:0}})))}},"ctag"===t.panel.type?{title:"Reload content",icon:"rotate-right",action:function(){R(!1),setTimeout((function(){R(!0)}),100)}}:{},{title:"Close window",icon:"xmark",action:function(){Object(x.d)((function(n){n.ui.floatingPanel.delete(t.panel.id)}))}}]})),Object(a.c)("div",{className:"floating-panel__content content-type-".concat(t.panel.type),style:{height:T},onMouseDown:function(){A()},onMouseEnter:function(){f(!0)},onMouseLeave:function(){f(!1)}},Object(a.c)("div",{className:"floating-panel__drag-overlay ".concat(m?"":"hide"," ").concat(F?"hover-mode":""),onMouseDown:function(){A(),f(!1)}}),"file"===t.panel.type&&t.panel.file&&Object(a.c)("div",{className:"floating-panel__inner-content"},Object(a.c)(Mt,{windowId:t.panel.id||Object(At.a)(),file:t.panel.file,height:t.panel.size.height,view:t.panel.view||"editor",searchedString:t.panel.searchedString,replacementString:t.panel.replacementString,titleEditor:"disabled",onLayoutUpdate:function(t,n){"windowViewChange"===t&&null!==n&&void 0!==n&&n.view&&i(Object(s.a)(Object(s.a)({},e.current),{},{view:n.view}))}})),"ctag"===t.panel.type&&t.panel.ctagConfig&&P&&Object(a.c)("div",{className:"floating-panel__inner-content window-id-sizeref-".concat(D),style:{height:T}},Object(En.a)(t.panel.ctagConfig)))))))},Rn=function(t){var n=t.panels,e=Object(o.useRef)([]);Object(o.useEffect)((function(){e.current=n}),[n]);var i=function(t){Object(x.d)((function(n){n.ui.floatingPanel.update(t)}))},l=Object(o.useState)(!1),s=Object(c.a)(l,2),u=s[0],p=s[1],d=function(t){return function(){p("start"===t)}},f=Object(o.useState)(!1),b=Object(c.a)(f,2),g=b[0],h=b[1];Object(o.useEffect)((function(){if(!g&&0!==e.current.length){h(!0);var t=Object(F.a)(e.current);Object(ot.a)(t)||(t=[]),t.forEach((function(t){"minimized"===t.status&&(t.status="hidden")})),Object(x.d)((function(n){n.ui.floatingPanel.updateAll(t)}))}}),[g]);var m=Object(o.useState)([]),v=Object(c.a)(m,2),w=v[0],O=v[1],j=Object(o.useState)(0),k=Object(c.a)(j,2),y=k[0],_=k[1],E=Object(o.useState)(0),S=Object(c.a)(E,2),T=S[0],I=S[1],N=Object(pt.a)((function(){var t=0;n.forEach((function(n){void 0!==n.zIndex&&n.zIndex>t&&(t=n.zIndex)})),_(t),I(n.filter((function(t){return"visible"===t.status})).length);var o=Object(F.a)(e.current),i=o.filter((function(t){return"minimized"===t.status})),c=o.filter((function(t){return"hidden"===t.status})),a=o.filter((function(t){return"visible"===t.status})),r=i.concat(c).concat(a);r=Object(Sn.a)(r,(function(t){return t.orderPosition})),O(r)}),100);return Object(o.useEffect)((function(){N()}),[n]),Object(a.c)("div",{className:"floating-panels-wrapper",style:{pointerEvents:u?"all":"none"}},Object(ot.a)(n)&&n.map((function(t){return"hidden"!==t.status&&t.device===Object(r.a)()&&Object(a.c)("div",{key:t.id},Object(a.c)(Pn,{panel:t,onPanelUpdate:i,onPanelDragStart:d("start"),onPanelDragEnd:d("end"),panelsVisibleNumber:T,highestVisibleZIndex:y}))})),"desktop"===Object(r.a)()&&Object(a.c)("div",{className:"panels-minimized-bottom-bar-wrapper",style:{height:"".concat(35+Nn(),"px"),bottom:"-".concat(Nn(),"px")}},Object(a.c)("div",{className:"panels-minimized-bottom-bar-background ".concat(t.pinStatus?"pinned":"")}," "),Object(a.c)("div",{className:"bottom-hover-bar"}," "),Object(a.c)("div",{className:"panels-minimized-bottom-bar ".concat(t.pinStatus?"pinned":""),style:{width:"".concat(n.length>8?15*n.length:100,"%")}},Object(a.c)("div",{className:"floating-panels-bottom-toolbar"},Object(a.c)("div",{className:"btn-action reinit-position-and-size",onClick:function(){Object(x.d)((function(t){t.ui.floatingPanel.actionAll("organizeWindows")}))}},Object(a.c)(C.b,{name:"layer-group"})," "),Object(a.c)("div",{className:"btn-action pin-bar",onClick:function(){return t.onPinChange(!t.pinStatus)}}," ",Object(a.c)(C.b,{name:"thumbtack"})," ")),w.map((function(t){return"visible"!==t.status&&Object(a.c)("div",{key:t.id,className:"panel-minimized ".concat("minimized"===t.status?"active-tab":""),onClick:function(n){!function(t){t.status="visible",i(t),Object(x.d)((function(n){n.ui.floatingPanel.pushWindowOnTop(t.id),n.ui.floatingPanel.updateOrderPosition(t.id,"first")}))}(t)}},Object(a.c)("div",{className:"label"},function(t){if(!t)return"";if("file"===t.type)return t.file.name.replace(".md","");if("ctag"===t.type){var n,e;if("iframe"===(null===(n=t.ctagConfig)||void 0===n?void 0:n.tagName)){var o,i=null===(o=t.ctagConfig)||void 0===o?void 0:o.content;return Object(st.b)(i)}return"".concat(null===(e=t.ctagConfig)||void 0===e?void 0:e.tagName," | ").concat(t.file.name)}return""}(t)),Object(a.c)("div",{className:"close-btn",onClick:function(n){n.stopPropagation(),"minimized"===t.status?function(t){t.status="hidden",i(t)}(t):function(t){Object(x.d)((function(n){n.ui.floatingPanel.delete(t.id)}))}(t)}},Object(a.c)(C.b,{name:"xmark"})))})))))},An=e(210),Fn=e(221),Ln=e(222),Mn=e(226),Dn=function(t){var n=t.url;(n=n.trim()).includes("?")?n+="&autoplay=1&mute=1":n+="?autoplay=1&mute=1";var e=Object(o.useState)(!1),i=Object(c.a)(e,2),r=i[0],l=i[1];return Object(o.useEffect)((function(){setTimeout((function(){l(!0)}),3e3)}),[]),Object(a.c)("div",{className:"background-video",style:{width:"".concat(t.width,"%"),height:"".concat(t.height,"%")}},r&&Object(a.c)("iframe",{src:"".concat(n),allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"}))},zn=e(223),Bn=(Object(r.a)(),Object(s.a)({},p.a)),Hn=Bn.els,Un=Bn.colors,Wn=(Bn.font,Bn.sizes),qn=Object(kn.a)((function(t,n,e,o){return Kn(t,n,e,o)}),(function(){for(var t=arguments.length,n=new Array(t),e=0;e<t;e++)n[e]=arguments[e];return JSON.stringify(n)})),Vn=Object(kn.a)((function(t){return Jn(t)}),(function(){for(var t=arguments.length,n=new Array(t),e=0;e<t;e++)n[e]=arguments[e];return JSON.stringify(n)})),Jn=function(t){var n=Object(xn.a)("CssAppDynamic"),e=Gt.d.curr.ui_layout_background_image_enable,o=Gt.d.curr.ui_layout_background_image,i=100,c=100,a=Gt.d.curr.ui_layout_background_video_enable;if(!0===e&&!1===a){var l=o.indexOf("?token=");l>0&&(o=o.substring(0,l)),(o+="?token=".concat(Object(B.b)())).startsWith("http")||(o="".concat(Object(M.a)(o)))}!0!==a&&!0!==e||(i=parseInt(Gt.d.curr.ui_layout_background_image_window_opacity)/100,c=parseInt(Gt.d.curr.ui_layout_background_image_window_opacity_active)/100);var s="\n\t\t// IMPORTANT for all height app\n\t\theight:100%;\n\t\t\n\t\t//\n\t\t// Background image\n\t\t//\n\t\t".concat(e?"background-image: url('".concat(o,"');"):"","\n\t\t\n\t\tbackground-size: cover;\n\t\t.react-grid-item {\n\t\t\topacity: ").concat(i,";\n\t\t}\n\t\t.react-grid-item.active {\n\t\t\topacity: ").concat(c,";\n\t\t}\n\n\t\t").concat("\n.background-video {\n position: fixed;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n iframe {\n width: 100%;\n height: 100%;\n }\n}\n","\n\n\n\t\t// for preview css\n\t\t").concat(Object(mn.d)(),"\n\t\t// FILE RESSOURCE PREVIEW\n\t\t").concat(Object(vn.b)(),"\n\t\t// PREVIEW LINK\n\t\t").concat(Object(fn.b)(),"\n\t\t").concat(Object(wn.e)(),"\n\n\t\t").concat(Object(Mn.b)(),"\n\n\t\t").concat(Object(C.c)(),"\n\t\t").concat(Object(Fn.a)(),"\n\t\t").concat("\n .mobile-view-preview {\n .page-link-preview-popup-int {\n .editor-area {\n display:block;\n }\n .preview-area-wrapper {\n display:none;\n }\n }\n }\n .page-link-preview-popup-ext {\n // pointer-events: none;\n position: absolute;\n z-index: 10001;\n .click-throught {\n cursor:pointer;\n position: absolute;\n top: 0px;\n left: 0px;\n width: 100%;\n height: 30px;\n }\n .page-link-preview-popup-int {\n cursor:default;\n margin-top: 20px;\n background: white;\n width: ".concat(gn,"px;\n height: ").concat(hn,"px;\n border-radius: 10px;\n box-shadow: 0px 0px 3px 1px rgba(0,0,0,0.1);\n overflow-y:hidden;\n overflow-x:hidden;\n .cm-scroller {\n width: calc(100% - 40px)!important;\n }\n\n // disable links inside\n .title-search-link {\n pointer-events: none;\n }\n }\n .\n }\n"),"\n\t\t").concat("\n .main-wrapper.view-image {\n .mobile-view-toggler {\n display: none;\n }\n \n .left-wrapper {\n width: ".concat("desktop"===Object(r.a)()?15:40,"vw ;\n .left-wrapper-1 {\n width: 100%\n }\n .left-wrapper-2 {\n display: none;\n }\n }\n\n\n .right-wrapper.draggable-grid-editors-view {\n display: none;\n }\n .right-wrapper {\n height: 100vh;\n }\n .right-wrapper.image-gallery-view {\n width: ").concat(100-("desktop"===Object(r.a)()?15:40),"vw;\n }\n }\n \n .main-wrapper.view-text {\n .right-wrapper.draggable-grid-editors-view {\n \n }\n .right-wrapper.image-gallery-view {\n display: none;\n }\n }\n"),"\n\t\t").concat("\n.notifications-center-wrapper {\n\t\tposition: fixed;\n\t\ttop: 0px;\n\t\tright: 0px;\n\t\tz-index: 2000;\n\n\t\t.notifications-list {\n\t\t\t\t.notif-wrapper {\n\t\t\t\t\t\t// background: ".concat(p.a.colors.main,"; \n\t\t\t\t\t\tbackground: white;\n\t\t\t\t\t\tposition: relative;\n\t\t\t\t\t\tmargin: 5px;\n\n\n\t\t\t\t\t\tpadding: 5px;\n\t\t\t\t\t\tborder-radius: 5px;\n\t\t\t\t\t\tbox-shadow: 0px 0px 5px #0006;\n\t\t\t\t\t\t.notif-close {\n\t\t\t\t\t\t\t\tcursor: pointer;\n\t\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\t\ttop: 3px;\n\t\t\t\t\t\t\t\tright: 5px;\n\t\t\t\t\t\t\t\tpadding: 5px;\n\t\t\t\t\t\t\t\tbackground: white;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t.notif-content {\n\t\t\t\t\t\t\t\tpadding: 5px 29px 5px 5px;\n\t\t\t\t\t\t\t\tmax-width: 190px;\n\t\t\t\t\t\t\t\tmax-height: 180px;\n\t\t\t\t\t\t\t\toverflow-y: auto;\n\t\t\t\t\t\t\t\tword-break: break-word;\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t}\n}\n"),"\n\t\t").concat(Object(Tt.c)(),"\n\t\t").concat("\n.lightbox-component {\n\tfigure.zoom2 {\n\t\tposition: relative;\n\t\t\n\t\tbackground-repeat: no-repeat;\n\t\tmargin: 0px;\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\toverflow: hidden;\n\t\t\n\t\tz-index: 10;\n\t\t\n\t}\n\t.counter {\n\t\tposition: absolute;\n\t\tbottom: 5px;\n\t\tleft: 10px;\n\t\tcolor: rgba(255,255,255,0.2);\n\t\tz-index: 15;\n\t}\n\tfigure.zoom2.not-zoomed {\n\t\tbackground-size: 0%!important;\n\t\tcursor: zoom-in;\n\t}\n\tfigure.zoom2.zoomed {\n\t\tbackground-position: 50% 50%;\n\n\t\timg {\n\t\t\topacity: 0;\n\t\t}\n\t}\n\tfigure.zoom2 img {\n\t\ttransition: opacity .5s;\n\t\tdisplay: block;\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\tobject-fit: contain;\n\t}\n\t \n\n position: fixed;\n\tz-index: 2000;\n top: 0px;\n left: 0px;\n width: 100vw;\n height: 100vh;\n \n .lightbox-bg {\n top: 0px;\n left: 0px;\n width: 100vw;\n height: 100vh;\n position: absolute;\n\t\t\t\tbackground: rgb(0 0 0 / 82%);\n }\n\n .lightbox-content {\n\t\t&.images-nb-1 {\n\t\t\t\t.left, .right {\n\t\t\t\t\t\tdisplay: none!important;\n\t\t\t\t}\n\t\t}\n\n\t\tborder-radius: 9px;\n\t\toverflow: hidden;\n position: absolute;\n width: 95vw;\n height: 85vh;\n background: black;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%); \n\t\t.zoomToggle {\n\t\t\tposition: absolute;\n\t\t\ttop: 9px;\n\t\t\tleft: 11px;\n\t\t\tz-index: 13;\n\t\t}\n\t\t.zoom {\n\t\t\ttop: 3px;\n\t\t\tleft: 28px;\n\t\t}\n\t\t.dezoom {\n\t\t\ttop: 3px;\n\t\t\tleft: 45px;\n\t\t}\n\t\t.zoom, .dezoom {\n\t\t\t\tposition: absolute;\n\t\t\t\t\n\t\t\t\tz-index: 100;\n\t\t\t\theight: 43px;\n\t\t\t\tmargin-right: 5px;\n\t\t\t\tsvg path {\n\t\t\t\t\t\tbox-shadow: 0px 0px 5px #0006;\n\t\t\t\t}\n\t\t}\n\t\tsvg {\n\t\t\tpadding: 3px;\n\t\t\tborder-radius: 22px;\n\t\t\twidth: 13px;\n\t\t\tbox-shadow: 0px 0px 5px #00000040;\n\t\t\ttransition: all 0.2s ease-in-out;\n\t\t\t&:hover {\n\t\t\t\tbackground: white;\n\t\t\t}\n\t\t}\n\n\t\t\n .lightbox-image {\n position: relative;\n justify-content: space-around;\n align-items: center;\n width: 100%;\n height: 100%;\n\n &:hover {\n .image-infos {\n display: block;\n }\n }\n .image-infos {\n\t\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\t\ttop: 0px;\n\t\t\t\t\t\t\t\theight: 55px;\n\t\t\t\t\t\t\t\tleft: 0px;\n\t\t\t\t\t\t\t\twidth: 100%;\n\t\t\t\t\t\t\t\tbackground: linear-gradient(180deg, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0) 100%);\n\t\t\t\t\t\t\t\tul {\n\t\t\t\t\t\t\t\t\t\tmargin-top: 5px;\n\t\t\t\t\t\t\t\t\t\tjustify-content: flex-end;\n\t\t\t\t\t\t\t\t\t\theight: 95vh;\n\t\t\t\t\t\t\t\t\t\tposition: relative;\n\t\t\t\t\t\t\t\t\t\tmargin: 0px;\n\t\t\t\t\t\t\t\t\t\tli {\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t&.left,\n\t\t\t\t\t\t\t\t\t\t\t\t&.right {\n\t\t\t\t\t\t\t\t\t\t\t\t\ttop: calc(50% - 20px);\n\t\t\t\t\t\t\t\t\t\t\t\t\theight: 40px;\n\t\t\t\t\t\t\t\t\t\t\t\t\twidth: 40px;\n\t\t\t\t\t\t\t\t\t\t\t\t\tz-index: 15;\n\n\t\t\t\t\t\t\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\t\t\t\t\t\t\tdisplay: flex;\n\t\t\t\t\t\t\t\t\t\t\t\t\tjustify-content: space-evenly;\n\t\t\t\t\t\t\t\t\t\t\t\t\tbutton {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// display: none;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\twidth: 100%;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t&.mobile {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tbutton {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// display: block;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsvg {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tbackground: white;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t&.desktop:hover {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tbutton {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// display: block;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t&.left {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tleft: 0px;\n\t\t\t\t\t\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t&.right {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tright: 0px;\n\t\t\t\t\t\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t\t\t\t\t\t\t&.close {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tpadding: 10px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tposition:relative;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tz-index:14;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n // position: relative;\n &:hover {\n .image-name {\n display: block;\n }\n }\n .image-name {\n display: none;\n cursor: pointer;\n color: grey;\n padding: 5px;\n font-size: ".concat(Object(K.a)(),"px;\n position: absolute;\n top: 5px;\n left: 5px;\n }\n }\n\t\t\t.image-zoom-wrapper {\n\t\t\t\tdisplay: flex;\n\t\t\t\tjustify-content: center;\n\t\t\t\talign-items: center;\n\t\t\t\twidth: 100%;\n\t\t\t\theight: 100%;\n\t\t\t\ttext-align: center;\n\t\t\t\toverflow: auto;\n\t\t\t\tposition: relative;\n\t\t\t\tz-index: 2;\n\t\t\t\t\timg {\n\t\t\t\t\t\tvertical-align: middle;\n\t\t\t\t\t\tz-index:2;\n\t\t\t\t\t}\n\t\t\t}\n }\n }\n\n}\n"),"\n\t\t").concat("\n .prompt-popup-component {\n\t\t\t\t.popup-wrapper {\n\t\t\t\t\t\tmin-width: 200px;\n\t\t\t\t\t\tmin-height: 100px;\n\t\t\t\t\t\ttext-align:center;\n\t\t\t\t}\n }\n","\n\t\t").concat("\n\t\t\t\t\t\t&.device-view-mobile {\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t.omnibar-popup-bg.hide {\n\t\t\t\t\t\t\t\tdisplay:none;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t.omnibar-popup-bg {\n\t\t\t\t\t\t\t\tbackground: rgba(0,0,0,0.5);\n\t\t\t\t\t\t\t\ttop: 0px;\n\t\t\t\t\t\t\t\tleft: 0px;\n\t\t\t\t\t\t\t\twidth: 100vw;\n\t\t\t\t\t\t\t\theight: 100vh;\n\t\t\t\t\t\t\t\tz-index: 10000;\n\t\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t.omnibar-popup-wrapper {\n\t\t\t\t\t\t\t\t&.locked {\n\t\t\t\t\t\t\t\t\tpointer-events:none;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\twidth: 88%;\n\t\t\t\t\t\t\t\tmargin: 0 auto;\n\t\t\t\t\t\t\t\tz-index: 100;\n\t\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\t\tleft: 50%;\n\t\t\t\t\t\t\t\ttransform: translate(-50%);\n\t\t\t\t\t\t\t\ttop: 22px;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t.help-right {\n\t\t\t\t\t\t\t\tcursor:pointer;\n\t\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\t\tright: 3px;\n\t\t\t\t\t\t\t\ttop: 3px;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t.help {\n\t\t\t\t\t\t\t\tcolor:white;\n\t\t\t\t\t\t\t\tmargin-bottom: 10px;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t.preview-wrapper {\n\t\t\t\t\t\t\t\toverflow-y: scroll;\n\t\t\t\t\t\t\t\tbackground: white;\n\t\t\t\t\t\t\t\tborder-radius: 5px;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t.barimage {\n\t\t\t\t\t\t\t\theight: 60px; \n\t\t\t\t\t\t\t\twidth: 100px;\n\n\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\tdiv[class$='-menu']>div {\n\t\t\t\t\t\t\t\tdisplay: flex;\n\t\t\t\t\t\t\t\tflex-wrap: wrap;\n\t\t\t\t\t\t\t\tjustify-content: flex-start;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tdiv[class$='-option'] {\n\t\t\t\t\t\t\t\twidth: ".concat("mobile"===Object(r.a)()?"100":"20","%;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t.path-option-wrapper {\n\t\t\t\t\t\t\tposition: relative;\n\t\t\t\t\t\t\tword-break: break-word;\n\t\t\t\t\t\t\t.search-location {\n\t\t\t\t\t\t\t\t\tcolor: #b3b1b1;\n\t\t\t\t\t\t\t\t\tfont-size: 9px;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t.folder {\n\t\t\t\t\t\t\t\t\tcolor: grey;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t.file {\n\t\t\t\t\t\t\t\t\tfont-weight: bold;\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t&.device-desktop .actions {\n\t\t\t\t\t\t\t\ttransition: all 0.2s;\n\t\t\t\t\t\t\t\topacity: 0;\n\t\t\t\t\t\t\t\t.action {\n\t\t\t\t\t\t\t\t\tmargin-left: 8px;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t&.device-desktop:hover .actions {\n\t\t\t\t\t\t\t\topacity: 1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t.actions {\n\t\t\t\t\t\t\t\tdisplay:flex;\n\t\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\t\tright: 0px;\n\t\t\t\t\t\t\t\ttop: 0px;\n\t\t\t\t\t\t\t\talign-items: center;\n\t\t\t\t\t\t\t\theight: 100%;\n\t\t\t\t\t\t\t\t.action {\n\t\t\t\t\t\t\t\t\ttransition: all 0.2s;\n\t\t\t\t\t\t\t\t\topacity: 0.3;\n\t\t\t\t\t\t\t\t\tcursor: pointer;\n\t\t\t\t\t\t\t\t\tcolor: grey;\n\t\t\t\t\t\t\t\t\t&:hover {\n\t\t\t\t\t\t\t\t\t\topacity: 1;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t.html-preview-wrapper {\n\t\t\t\t\t\t\t\toverflow: hidden;\n\t\t\t\t\t\t\t\t.html-preview {\n\t\t\t\t\t\t\t\t\t\tiframe {\n\t\t\t\t\t\t\t\t\t\t\t\t// transform: scale(0.65);\n\t\t\t\t\t\t\t\t\t\t\t\ttransform: scale(0.8);\n\t\t\t\t\t\t\t\t\t\t\t\ttransform-origin:top left;\n\t\t\t\t\t\t\t\t\t\t\t\tborder:none;\n\t\t\t\t\t\t\t\t\t\t\t\twidth: 125%;\n\t\t\t\t\t\t\t\t\t\t\t\theight: 125%;\n\t\t\t\t\t\t\t\t\t\t\t\t// width: 155%;\n\t\t\t\t\t\t\t\t\t\t\t\t// height: 155%;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\t"),"\n\n\t\t").concat("\n .app-view-switcher-component {\n margin: 0px 10px 10px 10px;\n ul.buttons-toolbar-component {\n li {\n margin-left: 5px;\n margin-right: 5px;\n }\n }\n }\n","\n\t\t").concat(Object(b.b)(),"\n\n\n\t\t").concat("\n .image-gallery-component-wrapper {\n margin: 0px 17px;\n overflow-y: scroll;\n // height: calc(100vh - ".concat(p.a.sizes.search.padding+p.a.sizes.gallery.topH+("desktop"===Object(r.a)()?0:190),"px);\n height: calc(100vh - ").concat(p.a.sizes.search.padding+p.a.sizes.gallery.topH,"px);\n // height: 100%;\n width: 100%;\n\n .masonry-gallery {\n display: flex;\n list-style: none;\n flex-direction: row;\n flex-wrap: wrap;\n\n .masonry-col {\n width: ").concat("desktop"===Object(r.a)()?32:90,"%;\n margin-right: 1%;\n\n .masonry-col-item {\n position: relative;\n &:hover {\n .image-infos {\n display: block;\n }\n }\n .image-infos {\n display: none;\n ").concat(p.a.els().imageInfos,"\n }\n img {\n ").concat(p.a.els().images,"\n }\n margin-bottom: 10px;\n }\n }\n }\n }\n"),"\n\n\t\t").concat(Object(kt.b)(),"\n\n\t\t").concat("\n.search-bar-component {\n input {\n\t\t\t\tborder-radius: 5px;\n width: calc(100% - ".concat(2*p.a.sizes.block+20,"px);\n border: none;\n background: white;\n\t\t\t\tpadding: 18px 9px;\n\t\t\t\tmargin: 0px 15px 15px 15px;\n\t\t\t\tbox-shadow: 0px 0px 6px rgb(0 0 0 / 5%);\n\t\t\t\tfont-size:").concat(Object(K.a)(1),"px;\n margin: 0px ").concat(p.a.sizes.block,"px ").concat(p.a.sizes.block,"px ").concat(p.a.sizes.block,"px; \n &::placeholder {\n color: #afadad;\n }\n }\n .search-status {\n text-align: center;\n font-size: 8px;\n\t\t\t\tposition: relative;\n\t\t\t\tbottom:9px;\n\t\t\t\tcolor: grey;\n }\n}\n"),"\n\n\t\t").concat("\n.mobile-view-toggler {\n position: fixed;\n bottom: 0px;\n left: 0px;\n z-index: 10;\n display:flex;\n width: 100%;\n list-style: none;\n margin: 0px;\n padding: 0px;\n background: ".concat(p.a.colors.main,";\n li {\n flex: 1 1 auto;\n button {\n ").concat(p.a.els().button,";\n padding: 8px;\n width: 100%;\n span.icon-wrapper {\n transform: scale(1.1);\n background: rgba(255,255,255,0);\n padding: 10px 27px;\n border-radius: 6px;\n }\n &:hover {\n span.icon-wrapper {\n }\n }\n &.active {\n span.icon-wrapper {\n background: rgba(255,255,255,0.2);\n }\n }\n }\n }\n}\n"),"\n\n\t\t").concat("\n.connection-status {\n font-size: 9px;\n z-index: 11;\n a {\n margin-left: 10px;\n color: white;\n }\n .back-online, .disconnected {\n position: absolute;\n text-align:center;\n color:white;\n top: 0px;\n left: 0px;\n width: 100vw;\n padding: 1px;\n }\n .back-online{\n background: green;\n }\n .disconnected{\n background: ".concat(p.a.colors.main,";\n }\n .connected {\n display:none;\n position: absolute;\n bottom: 5px;\n right: 5px;\n color: ").concat(p.a.colors.green,";\n }\n}\n"),"\n\n\t\t").concat("\n .setup-popup-component {\n .submit-button {\n margin-top: 10px;\n ".concat(p.a.els().redButton,";\n padding: 10px 20px;\n }\n .error {\n color: ").concat(p.a.colors.main,";\n }\n .success {\n color: ").concat(p.a.colors.green,";\n }\n }\n"),"\n\n\t\t").concat(Object(at.b)(),"\n\n\t\t").concat(Object(Ct.b)(),"\n\n\t\t").concat(Object(Et.c)(),"\n\t\t").concat("\n.device-view-mobile {\n\t\n\t.plugins-marketplace-popup-wrapper .popup-wrapper .popupContent {\n\t\twidth: 80vw;\n\t}\n}\n\n.plugins-list-loading {\n\tpadding: 60px;\n}\n.plugins-marketplace-popup-wrapper .popup-wrapper {\n\theight: 70%;\n}\n.plugins-marketplace-popup-wrapper .popup-wrapper .popupContent {\n padding: 0px 20px;\n\twidth: 50vw;\n\t// min-height: 50vh;\n\t// max-height: 70vh;\n\toverflow-y: scroll;\n}\n\n\n","\n\n\t\t").concat("\n.last-notes-component {\n padding: 0px ".concat(p.a.sizes.block,"px;\n \n h3 {\n\n }\n ul {\n height: ").concat(110,"px;\n overflow: hidden;\n &:hover {\n min-height: ").concat(110,"px;\n height: auto;\n }\n\n padding: 0px;\n margin: 0px;\n li {\n cursor: pointer;\n // margin-bottom: ").concat(Object(K.a)(-3),"px;\n margin-bottom: 4px;\n overflow: hidden;\n height: ").concat(15,"px;\n list-style: none;\n font-size:").concat(Object(K.a)(1),"px;\n font-weight: 400;\n svg, i {\n color: ").concat(p.a.colors.main,";\n margin-right: 10px;\n }\n }\n }\n}\n"),"\n\t\t").concat("\n.shortcut-component {\n\t\tmargin: 0px ".concat(p.a.sizes.block,"px;\n\t\tmargin-bottom: 10px;\n\t\toverflow: hidden;\n\t\t.rendered-note-component {\n\t\t\t\twidth: 800px;\n\t\t\t\t.preview-link {\n\t\t\t\t\t\tcolor: #585757!important;\n\t\t\t\t}\n\t\t\t\t.preview-link {\n\t\t\t\t\t\tfont-weight: 400!important;\n\t\t\t\t}\n\t\t\t\t\n\t\t}\n}\n"),"\n\t\t").concat("\n.rendered-note-component {\n\t\th3 {\n\n\t\t}\n\t\t.rendered-note-content-wrapper {\n\t\t\t".concat(Object(f.c)(),"\n\t\t\t\t&>p {\n\t\t\t\t\t\tmargin: 0px;\n\t\t\t\t\t\tpadding:0px;\n\t\t\t\t}\n\n\t\t}\n\n}\n"),"\n\n\t\t").concat("\n\n.note-preview-wrapper {\n\t\t&.preview {\n\t\t\tpadding: 15px ;\n\t\t}\n\n\t\t\n\n\t\t".concat(Object(f.b)(),"\n\t\t").concat(Object(St.b)(),"\n\n\t\t.preview-area-wrapper {\n\t\t\theight: calc(100% - 0px);\n\t\t\tmargin-top: 0px;\n\t\t}\n\n\t\t.preview-area {\n\t\t\twidth: calc(100% + ").concat("mac"===Object(r.b)()&&"0px",");\n\t\t\t// width: calc(100%);\n\t\t\t// padding-left: 22px; // for left bar\n\t\t\t// padding: 15px;\n\t\t}\n\n\t\t// .note-preview-wrapper .preview-area-wrapper\n\t\t//\n\t\t// PREVIEW\n\t\t//\n\t\t\n\t\t\n\t\t\t\t.simple-css-wrapper {\n\n\t\t\t\t.resource-link-content-wrapper ul {\n\t\t\t\t\t\topacity:1!important;\n\t\t\t\t\t\tpointer-events:all!important;\n\t\t\t\t}\n\t\t\t\tiframe {\n\t\t\t\t\t\t// height: 100%!important;\n\t\t\t\t}\n\t\t\t\t.resource-link-iframe-wrapper {\n\t\t\t\t\t\tmargin-bottom: 5px;\n\t\t\t\t}\n\t\t}\n\n\t\t.found-word {\n\t\t\t\tfont-weight: bold;\n\t\t\t\tbackground: #fff876;\n\t\t\t\tpadding: 2px;\n\t\t}\n\n\t\t\n\n\t\t//\n\t\t// EDITOR VIEW\n\t\t//\n\n\t\t&.editor,\n\t\t.window-editor-wrapper,\n\t\t.dual-view-wrapper,\n\t\t.editor-area,\n\t\t.codemirror-editor-wrapper {height: 100%}\n\n\t\t.main-editor-wrapper {height: calc(100% - 35px)}\n\n\n}\n"),"\n\t\t").concat(Object(sn.b)(),"\n\n\t\t").concat(Object(rt.b)(),"\n\t\t").concat(Object(ln.b)(t),"\n\t\t").concat(Object(un.b)(),"\n\t\t").concat(Object(An.b)(),"\n\t\t").concat(Object(Ln.b)(),"\n\t\t").concat(Object(zn.b)(),"\n\n\t\t").concat("\n\n//\n// PANEL\n//\n// resizing handles\n.floating-panel__wrapper + div > div { z-index: 100000;}\n\n.floating-panels-wrapper {\n position: absolute;\n top: 0;\n left: 0;\n width: 100vw;\n height: 100vh;\n pointer-events: none;\n .floating-panel-wrapper {\n &.ctag-pdf {\n .floating-panel {\n .floating-panel__actions {\n top: 30px;\n right: 5px;\n }\n }\n }\n &.minimized {\n display:none;\n }\n position: absolute;\n top: 0px;\n left: 0px;\n \n .floating-panel {\n overflow: hidden;\n background: #fff;\n border: 1px solid #000;\n border-radius: 4px;\n box-shadow: 0 0 4px rgba(0,0,0,0.3);\n z-index: 1000;\n pointer-events: all;\n .floating-panel__drag-overlay {\n position: absolute;\n top: 0px;\n left: 0px;\n width: 100%;\n height: 100%;\n background: rgba(255,255,255,0.5);\n z-index: 100;\n opacity: 0.5;\n transition: 0.1s opacity;\n &.hide {\n opacity: 0;\n pointer-events: none;\n }\n &.hover-mode {\n opacity: 0.5;\n pointer-events: all;\n }\n }\n .floating-panel__actions {\n position: absolute;\n top: 4px;\n transition: 0.5s all;\n right: 40px;\n z-index:102;\n padding: 4px;\n &:hover {\n background: white;\n padding: 4px;\n box-shadow: 0px 0px 4px rgba(0,0,0,0.3);\n border-radius: 4px;\n }\n }\n .floating-panel__content {\n // overflow-y: auto;\n // overflow: hidden;\n position: absolute;\n top:0px;\n left: 0px;\n width: 100%;\n overflow: hidden;\n &.content-type-file {\n }\n }\n }\n }\n \n \n}\n\n\n//\n// BAR\n//\n.panels-minimized-bottom-bar-wrapper {\n position: absolute;\n left: left: 18px;\n width: 100vw;\n overflow: hidden;\n overflow-x: scroll;\n pointer-events: none;\n\n .panels-minimized-bottom-bar-background {\n &.pinned {\n bottom: 0px;\n }\n transition: all 0.3s ease-in-out 0.5s;\n position: fixed;\n left: 0px;\n width: 100%;\n height: 30px;\n background: #fff;\n z-index: 11;\n pointer-events: all;\n bottom: -30px;\n }\n\n .bottom-hover-bar {\n pointer-events: all;\n cursor: pointer;\n position: absolute;\n width: 150vw;\n height: 15px;\n bottom: 0px;\n box-shadow: 0 0 0px rgba(0,0,0,0.3);\n z-index: 10;\n transition: 0.5s all;\n opacity: 0;\n }\n \n &:hover {\n .panels-minimized-bottom-bar-background {\n box-shadow: 0px 0px 5px rgba(0,0,0,.2);\n bottom: 0px;\n }\n .panels-minimized-bottom-bar {\n bottom: 0px;\n \n }\n .bottom-hover-bar {\n box-shadow: 0px 0px 5px rgba(0,0,0,.2);\n background: ".concat(p.a.colors.main,";\n opacity: 0.5;\n }\n }\n\n .panels-minimized-bottom-bar{\n z-index: 11;\n pointer-events: all;\n left: 18px;\n\n // transition: all 0.3s ease-in-out 0.5s, box-shadow 0.5s ease-in-out 0s;\n transition: all 0.3s ease-in-out 0.5s;\n \n position: absolute;\n width: 100%;\n bottom: -30px;\n &.pinned {\n bottom: 0px;\n }\n height: 30px;\n background: #fff;\n display: flex;\n flex-direction: row;\n justify-content: flex-start;\n align-items: center;\n .floating-panels-bottom-toolbar {\n \n display: flex;\n flex-direction: row;\n justify-content: flex-start;\n align-items: center;\n margin-left: 10px;\n .floating-bar-toolbar {\n }\n .btn-action {\n padding: 5px;\n margin: 0px 5px;\n cursor: pointer;\n transition: 0.3s all;\n &:hover {\n background: #f0f0f0;\n }\n }\n }\n }\n}\n\n\n.panel-minimized {\n background: #c9c9c9;\n margin: 0px 0px 0px 4px;\n border-radius: 7px;\n height: 24px;\n width: 5vw;\n display: flex;\n font-size:10px;\n overflow: hidden;\n align-content: center;\n justify-content: space-around;\n padding: 0 10px;\n cursor: pointer;\n transition: 0.5s all;\n position: relative;\n :hover {\n background: #f0f0f0;\n }\n .label {\n margin-top: 5px;\n height: 14px;\n overflow: hidden;\n }\n .active-icon {\n color: rgb(121, 121, 121);\n margin: 6px 6px 0px 6px;\n\n }\n &.active-tab {\n background: #f0f0f0;\n }\n .close-btn {\n &:hover {\n background: ").concat(p.a.colors.main,";\n i {\n color: white!important;\n }\n }\n i {\n line-height: 8px;\n }\n background: rgba(0,0,0,0);\n position: relative;\n top: -2px;\n transition: 0.3s all;\n border-radius: 20px;\n padding: 5px;\n margin-top: 6px;\n line-height: 1px;\n cursor: pointer;\n left: 6px;\n }\n}\n\n//\n// Modifying style of the note preview\n//\n.floating-panel__wrapper .note-preview-wrapper .cm-mdpreview-wrapper .cm-mdpreview-image img {\n\tmax-height: none;\n}\n.floating-panel__wrapper .note-preview-wrapper.preview {\n padding: 0px\n}\n\n\n.content-block.block-tag {\n left: 0px;\n width: calc(100%)\n}\n\n"),"\n\n\t\t").concat(Object(Ft.b)(),"\n\t\t").concat(Object(f.b)(),"\n\t\t").concat(Object(St.b)(),"\n\t\t").concat(Object(yt.b)(),"\n\t\t").concat(Object(_t.b)(),"\n\n\t\t\n\t\t.config-buttons-bar {\n\t\t\tposition: fixed;\n\t\t\tz-index: 300;\n\t\t\tbackground: ").concat("mobile"===Object(r.a)()?"none":"white",";\n\t\t\tright: ").concat("mobile"===Object(r.a)()?"3px":"0px",";\n\t\t\tbottom: ").concat("mobile"===Object(r.a)()?"55px":"3px",";\n\t\t\tdisplay: ").concat("mobile"===Object(r.a)()?"block":"flex",";\n\t\t\tpadding: 0px 9px;\n\n\t\t\t.config-button {\n\t\t\t\t// margin-top: 10px;\n\t\t\t\topacity: 0.6;\n\t\t\t\ttransition: 0.2s all; \n\t\t\t\tpadding: 6px;\n\t\t\t\tcursor: pointer;\n\t\t\t\t&:hover {\n\t\t\t\t\topacity: 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\t.plugins-marketplace-button {\n\n\t\t\t}\n\t\t\t.settings-button {\n\t\t\t\t\n\t\t\t}\t\n\t\t}\n\t\t\t\n\t\t\n\n\t\t\n\t\t.main-wrapper,\n\t\t.mobile-view-container {\n\t\t\theight:100%;\n\t\t}\n\n\t\t.content-image {\n\t\t\t\twidth: 90%; \n\t\t}\n\t\t.full {\n\t\t\t\t.content-image {\n\t\t\t\t}\n\t\t}\n\n\t\t.main-wrapper {\n\t\t\t").concat("\n&.device-view-mobile {\n\t\t.folder-tree-view-component {\n\t\t\t\tli.folder-wrapper {\n\t\t\t\t\t\t.context-menu-wrapper {\n\t\t\t\t\t\t\t\tright: -10px;\n\t\t\t\t\t\t\t\t.context-menu {\n\t\t\t\t\t\t\t\t\t\tright: 5px;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t}\n}\n\n.folder-tree-view-component {\n\t\tpadding: ".concat(p.a.sizes.block,"px;\n\t\tpadding-right: 0px;\n\t\tmargin: 0px 0px 100px 0px;\n\t\twidth: calc(100% - ").concat(p.a.sizes.block*(Object(r.c)("desktop")&&!Object(r.d)()?1:2),"px);\n\n\t\tul.folder-children {\n\t\t\t\tmargin: 0px 0px 0px 0px;\n\t\t\t\tpadding: 0px 0px 0px 10px;\n\t\t}\n\n\t\t.loading {\n\t\t\tmargin-left: 30px;\n\t\t\tfont-size: 12px;\n\t\t\tfont-weight: 400;\n\t\t}\n\t\tli.folder-wrapper {\n\n\t\t\t\tposition: relative;\n\t\t\t\tlist-style: none;\n\t\t\t\tfont-size: ").concat(Object(K.a)(3),"px;\n\t\t\t\tfont-weight: 600;\n\t\t\t\tcursor: pointer;\n\n\t\t\t\t.context-menu-wrapper {\n\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\tright: 10px;\n\t\t\t\t\t\ttop: -10px;\n\t\t\t\t\t\tpadding: 10px;\n\t\t\t\t\t\tdisplay:none;\n\t\t\t\t\t\t.context-menu {\n\t\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\t\tright: 0px;\n\t\t\t\t\t\t\t\ttop: 15px;\n\t\t\t\t\t\t\t\tbackground: white;\n\t\t\t\t\t\t\t\tbox-shadow: 0px 0px 4px rgb(0 0 0 / 10%);\n\t\t\t\t\t\t\t\tcolor: black;\n\t\t\t\t\t\t\t\tpadding: 0px 0px;\n\t\t\t\t\t\t\t\twidth: 100px;\n\t\t\t\t\t\t\t\tz-index: 100;\n\t\t\t\t\t\t\t\tborder-radius: 4px;\n\t\t\t\t\t\t\t\tfont-size: ").concat(Object(K.a)(),"px;\n\t\t\t\t\t\t\t\tul {\n\t\t\t\t\t\t\t\t\t\tlist-style: none;\n\t\t\t\t\t\t\t\t\t\tpadding: 0px;\n\t\t\t\t\t\t\t\t\t\tmargin: 0px;\n\t\t\t\t\t\t\t\t\t\tli {\n\t\t\t\t\t\t\t\t\t\t\t\tpadding: 4px 11px;\n\t\t\t\t\t\t\t\t\t\t\t\t&:hover {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tbackground: ").concat(p.a.colors.main,";\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t.folder-title:hover > .context-menu-wrapper {\n\t\t\t\t\t\tcursor:pointer;\n\t\t\t\t\t\tdisplay:block;\n\t\t\t\t}\n\t\t\t\t&.current > .folder-title {\n\t\t\t\t\t\tcolor: ").concat(p.a.colors.main,";\n\t\t\t\t\t\ttext-decoration: underline;\n\t\t\t\t}\n\t\t\t\t.folder-title {\n\t\t\t\t\t\tposition: relative;\n\n\t\t\t\t\t\t.title-label {\n\t\t\t\t\t\t\t\tposition: relative;\n\t\t\t\t\t\t\t\tz-index: 0;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t.title-drag-bg {\n\t\t\t\t\t\t\t\tborder-radius: 5px;\n\t\t\t\t\t\t\t\tpadding: 5px;\n\t\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\t\twidth: calc(100% - 8px);\n\t\t\t\t\t\t\t\theight: 100%;\n\t\t\t\t\t\t\t\ttop: -4px;\n\t\t\t\t\t\t\t\tz-index: -1;\n\t\t\t\t\t\t\t\tleft: -5px;\n\t\t\t\t\t\t\t\ttransition: 50ms;\n\t\t\t\t\t\t\t\tbackground: rgba(255,255,255,0);\n\t\t\t\t\t\t\t\tz-index:0;\n\t\t\t\t\t\t\t\tpointer-events: none;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t&.drag .title-drag-bg {\n\t\t\t\t\t\t\t\tbackground: rgba(255,255,255,0.6);\n\t\t\t\t\t\t\t\tpointer-events: all;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tpadding: 1px;\n\t\t\t\t\t\tposition:relative;\n\t\t\t\t\t\tpadding-left: 20px;\n\t\t\t\t\t\t.icon {\n\t\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\t\tleft: 2px;\n\t\t\t\t\t\t\t\tcursor: pointer;\n\t\t\t\t\t\t\t\tpadding: 1px;\n\t\t\t\t\t\t\t\ttop: 0px;\n\t\t\t\t\t\t\t\tsvg {\n\t\t\t\t\t\t\t\t\t\tcolor: ").concat(p.a.colors.main,";\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t}\n\t\t}\n\t\t\n}\n"),"\n\t\t\tdisplay: flex;\n\t\t\t.no-file {\n\t\t\t\t\ttext-align: center;\n\t\t\t\t\tmargin-top: 49vh;\n\t\t\t}\n\n\t\t\t////////////////////////////////////////////v \n\t\t\t// LEFT 1\n\t\t\t////////////////////////////////////////////v\n\t\t\t\n\t\t\t").concat("\n .new-file-button {\n ".concat(p.a.els().redButton,"\n ").concat(p.a.font.main,";\n padding: ").concat(Object(r.c)("desktop")?"14px 5px":"13px 7px",";\n margin: 13px 15px 15px 15px;\n\t\t\t\twidth: calc(100% - 30px); \n font-size: ").concat((Object(r.c)("desktop"),11),"px;\n .icon-wrapper {\n margin-right: ").concat(Object(r.c)("desktop")?"10px":"5px",";\n }\n\t\t\n \n }\n"),"\n\n\t\t\t\n\t\t\t \n\n\n\t\t\t&.without-sidebar.device-view-desktop {\n\t\t\t\t\t.left-sidebar-indicator {\n\t\t\t\t\t\t\ttransition: 0.5s all;\t\n\t\t\t\t\t\t\t&:hover {\n\t\t\t\t\t\t\t\tbackground: ").concat(p.a.colors.main,";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdisplay: block;\n\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\ttop: 0%;\n\t\t\t\t\t\t\tz-index:100;\n\t\t\t\t\t\t\twidth: 18px;\n\t\t\t\t\t\t\theight: 100vh;\n\t\t\t\t\t\t\tbackground: rgb(236, 236, 236);\n\t\t\t\t\t\t\tbox-shadow: 0px 0px 5px rgba(0,0,0,.2);\n\t\t\t\t\t\t\tmargin: 0% 0px;\n\t\t\t\t\t\t\tborder-radius: 0px 5px;\n\t\t\t\t\t\t\t.left-wrapper {\n\t\t\t\t\t\t\t\t\tbox-shadow: 0px 0px 5px rgba(0,0,0,.2);\n\t\t\t\t\t\t\t\t\ttransition: 0.2s all;\n\t\t\t\t\t\t\t\t\ttransition-delay: 500ms, 0ms;\n\t\t\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\t\t\tleft: -").concat(Wn.desktop.l,"vw;\n\t\t\t\t\t\t\t\t\ttop: 0px;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t.left-sidebar-indicator:hover {\n\t\t\t\t\t\t\t.left-wrapper {\n\t\t\t\t\t\t\t\t\tleft: 0vw;\n\t\t\t\t\t\t\t\t\ttop: 0px;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t}\n\n\t\t\t.invisible-scrollbars {\n\t\t\t\t\twidth: 100%;\n\t\t\t\t\tpadding-right: 18px;\n\t\t\t\t\toverflow-y: scroll;\n\t\t\t\t\theight: ").concat("desktop"===Object(r.a)()?"100vh":"calc(100vh - 48px)","; \n\t\t\t}\n\n\t\t\t.left-wrapper {\n\t\t\t\tbackground: ").concat(Un.l2.bg,"; \n\t\t\t\t.left-wrapper-1 {\n\t\t\t\t\toverflow: hidden;\n\t\t\t\t\tbackground-image: url('").concat(p.a.assets.decoBgMap,"');\n\t\t\t\t\tbackground-color: ").concat(p.a.colors.bgInterface2,";\n\t\t\t\t\tbackground-blend-mode: color-burn;\n\t\t\t\t\tcolor: ").concat(p.a.colors.fontInterface2,";\n\t\t\t\t\twidth: ").concat(Wn.desktop.l1,'%;\n\t\t\t\t\theight:100vh;\n\t\t\t\t\tposition: relative;\n\n\n\t\t\t\t\th3.subtitle {\n\t\t\t\t\t\tmargin: 0px 0px 15px;\n\t\t\t\t\t\tfont-family: "Open sans", sans-serif;\n\t\t\t\t\t\ttext-transform: uppercase;\n\t\t\t\t\t\tfont-size: 14px;\n\t\t\t\t\t\tfont-weight: 800;\n\t\t\t\t\t\tfont-style: italic;\n\t\t\t\t\t\tcolor: ').concat(Un.main,";\n\t\t\t\t\t}\n\t\t\t\t}\n\n\n\t\t\t\t////////////////////////////////////////////v \n\t\t\t\t// TEXT VIEW : LEFT 2\n\t\t\t\t////////////////////////////////////////////v2\n\t\t\t\t.left-wrapper-2 {\n\t\t\t\t\t\twidth: ").concat(Wn.desktop.l2,"%;\n\t\t\t\t\t\theight:100vh;\n\t\t\t\t\t\toverflow: hidden;\n\t\t\t\t\t\tbackground: ").concat(p.a.colors.bgInterface,";\n\n\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t.top-files-list-wrapper {\n\t\t\t\t\t\t\t\tpadding-top: ").concat(Wn.search.padding,"px;\n\t\t\t\t\t\t\t\theight: ").concat(Wn.search.h,"px;\n\t\t\t\t\t\t\t\t.subtitle-wrapper {\n\t\t\t\t\t\t\t\t\t\tposition: relative;\n\t\t\t\t\t\t\t\t\t\tdisplay: flex;\n\t\t\t\t\t\t\t\t\t\t.folder-wrapper {\n\t\t\t\t\t\t\t\t\t\t\t\tpadding: 2px 16px 10px 20px;\n\t\t\t\t\t\t\t\t\t\t\t\t/* margin-top: 4px; */\n\t\t\t\t\t\t\t\t\t\t\t\tfont-weight: bold;\n\t\t\t\t\t\t\t\t\t\t\t\tcolor: #aeadad;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t.toggle-sidebar-btn {\n\t\t\t\t\t\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\t\t\t\t\t\tright: 10px;\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\th3.subtitle {\n\t\t\t\t\t\t\t\t\t\t\t\tmargin: 0px ").concat(Wn.block,"px ").concat(Wn.block,"px ").concat(Wn.block,"px; \n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t.counter {\n\t\t\t\t\t\t\t\t\t\t\t\tmargin: 0px;\n\t\t\t\t\t\t\t\t\t\t\t\tmargin-top: 2px;\n\t\t\t\t\t\t\t\t\t\t\t\tcolor: ").concat(Un.l2.text,";\n\t\t\t\t\t\t\t\t\t\t\t\tfont-size: ").concat(Object(K.a)(),"px;\n\t\t\t\t\t\t\t\t\t\t\t\tfont-weight: 800;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\n\t\t\t\t}\n\n\t\t\t\t\n\n\t\t\t\t\n\t\t\t\t\n\n\t\t\t\t.files-list-component {\n\t\t\t\t\t\tposition: relative\n\t\t\t\t}\n\n\t\t\t\t.list-toolbar {\n\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\ttop: -93px;\n\t\t\t\t\t\tright: 23px;\n\t\t\t\t\t\tcolor: ").concat(Un.l2.text,";\n\t\t\t\t\t\tbutton {\n\t\t\t\t\t\t\t\tcolor: ").concat(Un.l2.text,";\n\t\t\t\t\t\t\t\t").concat(Hn().button,"\n\t\t\t\t\t\t\t\tpadding: 0px;\n\t\t\t\t\t\t\t\tmargin-right: ").concat(Wn.block,"px; \n\t\t\t\t\t\t\t\tfont-size: ").concat(Object(K.a)(),"px;\n\t\t\t\t\t\t\t\tcursor: pointer;\n\t\t\t\t\t\t\t\tspan {\n\t\t\t\t\t\t\t\t\t\tmargin-right: 5px;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t.items-list-count {\n\t\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\t\tcolor: grey;\n\t\t\t\t\t\t\t\tfont-size: ").concat(Object(K.a)(),"px;\n\t\t\t\t\t\t\t\tright: 10px;\n\t\t\t\t\t\t\t\ttop: 5px;\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t").concat("\n.list-wrapper {\n .list-wrapper-scroller{\n height: 100%;\n width: calc(100% + 20px);\n overflow-y:scroll;\n overflow: hidden;\n }\n\n .mobile-buttons-up-down {\n position: fixed;\n right: 0px;\n z-index: 10;\n top: 50%;\n div {\n background: #d6d6d6;\n padding: 10px;\n color:white;\n cursor: pointer;\n }\n }\n\n div.List {\n list-style: none;\n margin-right:20px;\n padding: 0px 0px 0px 0px;\n &.multiselect-mode {\n\t\t\t\t\t\tli .label {\n\t\t\t\t\t\t\t\tmargin-left: 4px;\n\t\t\t\t\t\t}\n }\n\n // NORMAL\n li {\n\t\t\tmax-width:calc(100% - 47px);\n padding: ".concat(X.l2.fileLi.padding,"px ").concat(X.block-X.l2.fileLi.margin,"px;\n margin: ").concat(X.l2.fileLi.margin,"px ").concat(X.l2.fileLi.margin+5,"px ").concat(X.l2.fileLi.margin,"px ").concat(X.l2.fileLi.margin,"px ;\n display: block;\n cursor: pointer;\n position: relative;\n height: ").concat(X.l2.fileLi.height,"px;\n overflow: hidden;\n border: 2px rgba(0,0,0,0) solid;\n \n // ACTIVE\n &:hover,\n &.multiselected,\n &.active {\n }\n\n display: flex;\n justify-content: center;\n\t\t\t\t\t\t&.active .background-item-border,\n\t\t\t\t\t\t&.active .background-item {\n\t\t\t\t\t\t\t\twidth: 100%;\n\t\t\t\t\t\t\t\theight: 100%;\n\t\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\t\ttop: 0px;\n\t\t\t\t\t\t\t\tleft: 0px;\n\t\t\t\t\t\t\t\tbackground: ").concat(p.a.colors.main,";\n\t\t\t\t\t\t\t\tborder-radius: 5px;\n\t\t\t\t\t\t\t\tz-index: -1;\n\t\t\t\t\t\t\t\topacity: 0.2;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t&.active .background-item-border {\n\t\t\t\t\t\t\t\twidth: calc(100% - 4px);\n\t\t\t\t\t\t\t\theight: calc(100% - 4px);\n\t\t\t\t\t\t\t\tbackground: none;\n\t\t\t\t\t\t\t\tborder: 2px ").concat(p.a.colors.main," solid;\n\t\t\t\t\t\t\t\topacity: 0.3;\n\t\t\t\t\t\t}\n \n\t\t\t\t\t\th3 {\n\t\t\t\t\t\t\t\tfont-size: 12px;\n\t\t\t\t\t\t}\n .left {\n\t\t\t\t\t\t\t\t// width: calc(100% - ").concat(X.l2.fileLi.img,"px - 10px);\n\t\t\t\t\t\t\t\twidth: 100%;\n\t\t\t\t\t\t\t\tpadding-right: 10px;\n\n\t\t\t\t\t\t\t\tdisplay:flex;\n\t\t\t\t\t\t\t\tflex-direction:column;\n\n\t\t\t\t\t\t\t\t.label {\n\t\t\t\t\t\t\t\t\t\tmargin: 0px;\n\t\t\t\t\t\t\t\t\t\tmax-height: 35px;\n\t\t\t\t\t\t\t\t\t\t//height: 46px;\n\t\t\t\t\t\t\t\t\t\t// display: flex;\n\t\t\t\t\t\t\t\t\t\t// align-items: center;\n\t\t\t\t\t\t\t\t\t\tmargin-bottom: 2px;\n\t\t\t\t\t\t\t\t\t\toverflow: hidden;\n\t\t\t\t\t\t\t\t\t\ttext-overflow: ellipsis;\n\t\t\t\t\t\t\t\t\t\tcolor: ").concat(Z.l2.title,";\n\t\t\t\t\t\t\t\t\t\tline-break: anywhere;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t.content {\n\t\t\t\t\t\t\t\t\t\tcolor: grey;\n\t\t\t\t\t\t\t\t\t\tmargin-bottom: 3px;\n\t\t\t\t\t\t\t\t\t\theight: 25px;\n\t\t\t\t\t\t\t\t\t\tfont-size: 9px;\n\t\t\t\t\t\t\t\t\t\toverflow: hidden;\n\t\t\t\t\t\t\t\t\t\tline-break: anywhere;\n\t\t\t\t\t\t\t\t\t\tword-break: break-word;\n\t\t\t\t\t\t\t\t\t\t").concat(Object(r.c)("desktop")?"":"max-height: 25px;","\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t.date {\n\t\t\t\t\t\t\t\t\t\tcolor: ").concat(Z.l2.date,";\n\t\t\t\t\t\t\t\t\t\tfont-size: ").concat(Object(K.a)(),"px;\n\t\t\t\t\t\t\t\t\t\tfont-weight: 700;\n\t\t\t\t\t\t\t\t}\n }\n\n .right {\n\t\t\t\t\t\t\t\t.picture {\n\t\t\t\t\t\t\t\t\t\twidth: ").concat(X.l2.fileLi.img,"px;\n\t\t\t\t\t\t\t\t\t\theight: ").concat(X.l2.fileLi.img,"px;\n\t\t\t\t\t\t\t\t\t\tbackground-size: cover;\n\t\t\t\t\t\t\t\t\t\tz-index: 1;\n\t\t\t\t\t\t\t\t\t\tmargin-top: 3px;\n\t\t\t\t\t\t\t\t\t\tborder-radius: 5px;\n\t\t\t\t\t\t\t\t\t\tborder: 2px white solid;\n\t\t\t\t\t\t\t\t}\n }\n }\n }\n}\n"),"\n\t\t\t}\n\t\t\t////////////////////////////////////////////v \n\t\t\t// IMAGE GALLERY VIEW\n\t\t\t////////////////////////////////////////////v\n\t\t\t.right-wrapper.image-gallery-view {\n\t\t\t\t\tbackground: ").concat(Un.l2.bg,"; \n\t\t\t\t\t.image-gallery-header {\n\t\t\t\t\t\t\tpadding-top: ").concat(Wn.search.padding,"px;\n\t\t\t\t\t\t\theight: ").concat(Wn.gallery.topH,"px;\n\n\t\t\t\t\t\t\t.search-bar-component {\n\t\t\t\t\t\t\t\t\t// padding: 10px 0px;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t.image-gallery-component-wrapper {\n\t\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t}\n\t\t\t////////////////////////////////////////////v \n\t\t\t// TEXT VIEW : RIGHT\n\t\t\t////////////////////////////////////////////v \n\t\t\t").concat("\n\n.tab-list-wrapper-hover {\n\t.top-hover-bar {\n\t\tcursor: pointer;\n\t\theight: 14px;\n\t\twidth: 100%;\n\t\tposition: absolute;\n\t\topacity: 0;\n\t\ttransition: 0.5s all;\n\t}\n\t&:hover {\n\t\t.top-hover-bar {\n\t\t\tbackground: ".concat(p.a.colors.main,";\n\t\t\topacity: 0.5;\n\t\t}\n\t}\n\ttransition: 0.5s all;\n\tposition: absolute;\n z-index: 22;\n\twidth: 100%;\n\t&.pinned {\n\t\tposition: initial;\n\t\t.top-hover-bar { display:none}\n\t}\n\t&.unpinned {\n\t\t.tab-list-scroll-wrapper {\n\t\t\tbox-shadow: 0px 0px 5px rgba(0,0,0,0.3);\n\t\t}\n\t}\n\t&:hover {\n\t\t.tab-list-scroll-wrapper {\n\t\t\ttop: 0px!important;\n\t\t}\n\t}\n}\n\n.tab-list-scroll-wrapper {\n\t\n\tposition: absolute;\n\theight: 44px;\n\twidth: 100%;\n\ttransition: all 0.3s ease-in-out;\n\ttransition-delay: 500ms, 0ms;\n\tbackground: ").concat(p.a.colors.bgTabs,";\n border-radius: 0px 0px 0px 5px;\n\t\toverflow: hidden;\n\t\t.tab-list-invisible-scroll {\n\t\t\t\twidth: 100%;\n\t\t\t\toverflow-x: scroll;\n\t\t\t\tpadding-bottom: 18px;\n\t\t\t\t.tab-list-wrapper {\n\t\t\t\t\t\tpadding: 7px 0px 0px 13px;\n\t\t\t\t\t\tdisplay: flex;\n\t\t\t\t\t\tbackground: ").concat(p.a.colors.bgTabs,";\n\t\t\t\t\t\tborder-radius: 0px 0px 0px 5px;\n\t\t\t\t\t\tposition: relative;\n\t\t\t\t\t\t&>div:last-child {\n\t\t\t\t\t\t\t\tmargin-right: 30px;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t.tab-and-drag-wrapper {\n\t\t\t\t\t\t\t\tposition:relative;\n\t\t\t\t\t\t\t\t.drag-indic {\n\t\t\t\t\t\t\t\t\t\tz-index: 2;\n\t\t\t\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\t\t\t\ttop: -8px;\n\t\t\t\t\t\t\t\t\t\tleft: -6px;\n\t\t\t\t\t\t\t\t\t\twidth: 20px;\n\t\t\t\t\t\t\t\t\t\theight: 20px;\n\t\t\t\t\t\t\t\t\t\tcolor: #aaaaaa;\n\t\t\t\t\t\t\t\t\t\tfont-size: 8px;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t.tab-wrapper {\n\t\t\t\t\t\t\t\tposition: relative;\n\t\t\t\t\t\t\t\talign-items:center;\n\t\t\t\t\t\t\t\tdisplay:flex;\n\t\t\t\t\t\t\t\tmargin-right: 5px;\n\t\t\t\t\t\t\t\tpadding: 5px;\n\t\t\t\t\t\t\t\tbackground: ").concat(p.a.colors.bgTab,";\n\t\t\t\t\t\t\t\tdisplay: flex;\n\t\t\t\t\t\t\t\tcolor: ").concat(p.a.colors.fontTab,";\n\t\t\t\t\t\t\t\tfont-family: ").concat(p.a.font.editor,";\n\t\t\t\t\t\t\t\theight: 35px;\n\t\t\t\t\t\t\t\tbox-shadow:rgb(0 0 0 / 20%) 0px -1px 2px ;\n\t\t\t\t\t\t\t\tborder-radius: 5px 5px 0px 0px;\n\t\t\t\t\t\t\t\tjustify-content: space-between;\n\t\t\t\t\t\t\t\tmax-height: 27px;\n\t\t\t\t\t\t\t\toverflow: hidden;\n\t\t\t\t\t\t\t\ttext-align: center;\n\t\t\t\t\t\t\t\t.tab-nb-windows {\n\t\t\t\t\t\t\t\t\t\tmargin-left: 10px;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t.active-ribbon {\n\t\t\t\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\t\t\t\ttop: 0px;\n\t\t\t\t\t\t\t\t\t\tleft: 0px;\n\t\t\t\t\t\t\t\t\t\twidth: 100%;\n\t\t\t\t\t\t\t\t\t\theight: 2px;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t&.active {\n\t\t\t\t\t\t\t\t\t\t.active-ribbon {\n\t\t\t\t\t\t\t\t\t\t\t\tbackground: ").concat(p.a.colors.main,";\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\tbackground: ").concat(p.a.colors.bgTabActive,";\n\t\t\t\t\t\t\t\t\t\tfont-weight: bold\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t&.tab-more {\n\t\t\t\t\t\t\t\t\t\tmin-width: 30px;\n\t\t\t\t\t\t\t\t\t\twidth: 30px;\n\t\t\t\t\t\t\t\t\t\tmax-width: 30px;\n\t\t\t\t\t\t\t\t\t\tcursor: pointer;\n\t\t\t\t\t\t\t\t\t\tfont-weight: bold;\n\t\t\t\t\t\t\t\t\t\tfont-family: ").concat(p.a.font.main,";\n\t\t\t\t\t\t\t\t\t\tdisplay:flex;\n\t\t\t\t\t\t\t\t\t\twidth: 100%;\n\t\t\t\t\t\t\t\t\t\tfont-size:14px;\n\t\t\t\t\t\t\t\t\t\tjustify-content: center;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t.tab-name {\n\t\t\t\t\t\t\t\t\t\tpadding: 10px 0px 10px 10px;\n\n\t\t\t\t\t\t\t\t\t\tinput {\n\t\t\t\t\t\t\t\t\t\t\t\tcolor:").concat(p.a.colors.fontTab," ;\n\t\t\t\t\t\t\t\t\t\t\t\tfont-size:").concat(Object(K.a)(1),"px;\n\t\t\t\t\t\t\t\t\t\t\t\tbackground: none;\n\t\t\t\t\t\t\t\t\t\t\t\tborder: none;\n\t\t\t\t\t\t\t\t\t\t\t\tmin-width: 30px;\n\t\t\t\t\t\t\t\t\t\t\t\tmax-width: 100px;\n\t\t\t\t\t\t\t\t\t\t\t\tfont-weight: 400;\n\t\t\t\t\t\t\t\t\t\t\t\tfont-family: ").concat(p.a.font.editor,";\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t.tab-nb-windows {\n\t\t\t\t\t\t\t\t\t\tpadding: 10px 0px 10px 0px;\n\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t.tab-close {\n\t\t\t\t\t\t\t\t\t\tcursor: pointer;\n\t\t\t\t\t\t\t\t\t\tmargin-left: 5px;\n\t\t\t\t\t\t\t\t\t\ttransform: rotate(45deg);\n\t\t\t\t\t\t\t\t\t\tcursor: pointer;\n\t\t\t\t\t\t\t\t\t\tmargin-left: 5px;\n\t\t\t\t\t\t\t\t\t\tpadding: 5px;\n\t\t\t\t\t\t\t\t\t\tfont-weight: bold;\n\t\t\t\t\t\t\t\t\t\tfont-family: ").concat(p.a.font.main,";\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t}\n}\n"),"\n\t\t\t").concat(Object(wt.b)(),"\n\n\t\t\t").concat(Object(Q.b)(),"\n\t\t\t").concat(Object(vt.b)(),'\n\n\t\t\t&.without-sidebar.device-view-desktop {\n\t\t\t\t\t.right-wrapper.draggable-grid-editors-view {\n\t\t\t\t\t\t\twidth: calc(100vw - 18px);\n\t\t\t\t\t\t\tmargin-left: 18px;\n\t\t\t\t\t}\n\t\t\t}\n\t\t}// end main-wrapper\n\t\t.preview-content {\n\t\t\t\tcounter-reset: h2counter;\n\t\t\th1 {\n\t\t\t\tcounter-reset: h2counter;\n\t\t\t}\n\t\t\th2:before {\n\t\t\t\tcontent: counter(h2counter) ".\\0000a0\\0000a0";\n\t\t\t\tcounter-increment: h2counter;\n\t\t\t\tcounter-reset: h3counter;\n\t\t\t}\n\t\t\th3:before {\n\t\t\t\tcontent: counter(h2counter) "." counter(h3counter) ".\\0000a0\\0000a0";\n\t\t\t\tcounter-increment: h3counter;\n\t\t\t}\n\t\t}\n\t\n\t');return n(),Object(u.a)(s,";","")},Kn=function(t,n,e,o){var i=Object(xn.a)("CssAppDynamic"+t+n),c="\n\t\t// IMPORTANT for all height app\n\t\theight:100%;\n\t\t".concat(Object(d.c)(t),"\n\t\t").concat(Object(dn.b)(t,o),"\n\t\t.draggable-grid-editors-view {\n\t\t\twidth: ").concat("desktop"===Object(r.a)()?p.a.sizes.desktop.r:"navigator"!==t?100:0,"vw;\n\t\t\theight: ").concat("desktop"===Object(r.a)()?"calc(100vh - ".concat(o.bottomBar?"30":"10","px)"):"100%",";\n\t\t\tdisplay: ").concat("desktop"===Object(r.a)()||"navigator"!==t?"block":"none",";\n\t\t\tpadding-top: 0px;\n\t\t\th3 {\n\t\t\t\tmargin-bottom: 0px;\n\t\t\t}\n\t\t\tpre {\n\t\t\t\t\twhite-space: -moz-pre-wrap; /* Mozilla, supported since 1999 */\n\t\t\t\t\twhite-space: -pre-wrap; /* Opera */\n\t\t\t\t\twhite-space: -o-pre-wrap; /* Opera */\n\t\t\t\t\twhite-space: pre-wrap; /* CSS3 - Text module (Candidate Recommendation) http://www.w3.org/TR/css3-text/#white-space */\n\t\t\t\t\tword-wrap: break-word; /* IE 5.5+ */\n\t\t\t}\n\t\t}\n\t\t.main-wrapper {\n\t\t\t////////////////////////////////////////////v \n\t\t\t// TEXT VIEW : RIGHT\n\t\t\t////////////////////////////////////////////v \n\t\t\t").concat(Object(wt.d)(o),"\n\t\t\t.left-wrapper {\n\t\t\t\twidth: ").concat("desktop"===Object(r.a)()?Wn.desktop.l:"navigator"!==t?0:100,"vw;\n\t\t\t\tdisplay: ").concat("desktop"===Object(r.a)()?"flex":"navigator"!==t?"none":"flex",";\n\t\t\t}\n\t\t} // end main-wrapper\n");return i(),Object(u.a)(c,";","")},Gn=function(t){return t.path.substr(0,t.path.length-(t.title.length+1))},Yn=function(t){var n=t.split("/");(n=n.filter((function(t){return""!==t}))).pop();var e="/"+n.join("/")+"/";return e=e.replaceAll("//","/")},$n="\n<style>\n.popupContent p {\n\t\tbackground: #dadada;\n padding: 3px 5px;\n\t\tmargin: 0px 4px;\n\t\tdisplay: inline-block;\n}\n</style>\n",Zn=function(t,n,e,o){var i=function(t,n){console.log("[MOVEFILE] ".concat(t," -> ").concat(n)),Object(x.e)().then((function(e){e.file.move(t,n,(function(){e&&e.ui.browser.goTo(e.ui.browser.folders.current.get())}))}))};return{askForMoveFile:i,promptAndBatchMoveFiles:function(n){var e=n.files,o=n.folderToDropInto,c="Move <p>".concat(null===e||void 0===e?void 0:e.length,'</p> file(s) to <p>"').concat(o.key,'"</p>?\n<br>\n<br>\nRessources links will be automatically updated<br>\n').concat($n,"\n");Object(x.d)((function(n){n.popup.confirm(c,(function(){!function(){for(var n=0;n<e.length;n++){var c=e[n],a="".concat(c.path),r="".concat(o.key,"/").concat(c.name);i(a,r),t()}}()}))}))},promptAndMoveFolder:function(e){var o=Object(s.a)({},e),i=o.folder,c=o.folderToDropInto,a=o.folderBasePath,r=o.newTitle,l=o.renameOnly,u=[i.path,"".concat(l?Gn(c):c.path,"/").concat(r||i.title)],p="".concat(a,"/").concat(u[0]),d="".concat(a,"/").concat(u[1]),f="\n".concat(E.a.moveFolderPrompt," <p>").concat(u[0],"</p> to <p>").concat(u[1],"</p>?\n").concat($n,"\n"),b=function(){!function(t,n,cb){console.log("[MOVEFOLDER] ".concat(t," -> ").concat(n)),Object(x.d)((function(e){e.folders.move(t,n,(function(){e&&e.ui.browser.goTo(e.ui.browser.folders.current.get()),cb&&cb()}))}))}(p,d,(function(){t(),n(),e.onMoveFn&&e.onMoveFn()}))};e.disablePrompt?b():Object(x.e)().then((function(t){t.popup.confirm(f,(function(){b()}))}))}}},Xn=e(227),Qn="[LAST FILE]",te=O.a.client.log.verbose,ne=function(t){var n=Object(Bt.a)("files-history",[],{history:!1,debouncedSave:5e3}),e=Object(c.a)(n,3),a=e[0],r=e[1],l=e[2],s=i.a.useRef(a);Object(o.useEffect)((function(){s.current=a}),[a]),Object(o.useEffect)((function(){te&&console.log(Qn," activeFile changed!",t),t&&u(t)}),[t]);var u=function(t){te&&console.log(Qn,"Add to history",t.name);var n=s.current;if(!(n.length>0&&n[0].name===t.name)){var e=!0,o=-1,i=n;!1===Object(ot.a)(n)&&(i=[]);for(var c=0;c<n.length;c++)n[c].name===t.name&&(e=!1,o=c);e||i.splice(o,1),(i=i.slice(0,400)).unshift(t),r(i)}},p=Object(pt.a)(u,300),d={getAll:function(){return a},removeFile:function(t){console.log("".concat(Qn," removing ").concat(t," from last notes"));var n=Object(F.a)(a);n=n.filter((function(n){return n.path!==t})),r(n)},addToHistory:function(t){!(arguments.length>1&&void 0!==arguments[1])||arguments[1]?p(t):u(t)}};return{filesHistory:a,filesHistoryRef:s,cleanLastFilesHistory:function(){r([])},refreshFilesHistoryFromBackend:l,lastFilesHistoryApi:d}},ee=function(){var t=Object(o.useState)(!1),n=Object(c.a)(t,2),e=n[0],i=n[1],a=Object(o.useState)(0),r=Object(c.a)(a,2),l=r[0],s=r[1],u=Object(o.useRef)(0);return Object(o.useEffect)((function(){var t=Object(A.a)((function(){u.current=u.current+1,s(l+1),i(!0),setTimeout((function(){i(!1)}),200)}),200);return window.addEventListener("resize",(function(){t()})),function(){window.removeEventListener("resize",(function(){t()}))}}),[]),{forceResponsiveRender:e,frr:u,responsiveRefreshCounter:l,setResponsiveRefresh:s}},oe=e(155),ie=e(233),ce=e(89),ae=function(t){var n=Object(o.useState)({}),e=Object(c.a)(n,2),i=e[0],r=e[1];Object(o.useEffect)((function(){}),[t.files]);var l=Object(o.useReducer)((function(t){return t+1}),0),s=Object(c.a)(l,2)[1],u=Object(o.useState)(2),d=Object(c.a)(u,2),f=d[0],b=d[1];Object(o.useEffect)((function(){Object(x.d)((function(t){b(t.userSettings.get("ui_filesList_sortMode"))}))}),[]);return Object(a.c)("div",{className:"files-list-component"},Object(a.c)("div",{className:"list-toolbar"},Object(a.c)("button",{type:"button",title:"sort",onClick:function(){var n=f+1>=J.a.length?0:f+1;Object(x.d)((function(e){e.userSettings.set("ui_filesList_sortMode",n),b(n),t.onSortFiles(Object(J.d)(t.files,n))}))}},Object(a.c)("span",null,t.files.length>0&&Object(a.c)("span",{className:"list-count"},"(",t.files.length,")"),J.b[f]),Object(a.c)(C.a,{name:"faSort",color:p.a.colors.l2.text}))),Object(a.c)("div",{className:"list-wrapper"},Object(a.c)(Y,{files:t.files,filesPreview:i,hoverMode:!1,activeFileIndex:t.activeFileIndex,sortMode:f,onFileClicked:function(n){t.onFileClicked(n)},onFileDragStart:t.onFileDragStart,onFileDragEnd:t.onFileDragEnd,onVisibleItemsChange:function(t){!function(t){for(var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],e=[],o=0;o<t.length;o++){var c=t[o];i[c]&&!n||e.push(c)}e.length>1&&Object(x.d)((function(t){t.files.getPreviews(e,(function(t){Object(Pt.a)(t,(function(t){i[t.path]=t})),r(i),s()}))}))}(t,!0)}})))},re=function(){var t="[NOTE HISTORY] ",n=O.a.client.log.verbose,e=Object(o.useRef)({}),i=function(){return(new Date).getTime()},c=function(e,o,i){n&&console.log("".concat(t," saveNoteHistory ").concat(e)),l.b.emit("createHistoryFile",{filePath:e,content:o,historyFileType:i,token:Object(B.b)()})};return{save:c,intervalSave:function(o,a){var r=e.current[o];(!r||r&&r+6e4<i())&&(n&&console.log("".concat(t," ").concat(o,", time ").concat(1," expired/inexistand, PROCEED BACKUP")),c(o,a,"int"),e.current[o]=i())}}},le=function(t){var n=Object(o.useState)(!1),e=Object(c.a)(n,2),i=e[0],a=e[1],r=Object(o.useState)([]),l=Object(c.a)(r,2),u=l[0],p=l[1];return{isConnected:t.isConnected,searching:{get:i,set:a},ipsServer:{get:u,set:p,getLocal:function(){var t=u[0];return Object(Pt.a)(u,(function(n){n.startsWith("192.168")&&(t=n)})),t}},refresh:Object(s.a)(Object(s.a)({},t.refresh),{},{increment:function(){t.refresh.set(t.refresh.get+1)}})}},se=e(132),ue="[PWA]",pe=O.a.client.log.verbose,de=function(){pe&&console.log(ue," init"),"serviceWorker"in navigator&&navigator.serviceWorker.register("/service-worker.js"),window.addEventListener("beforeinstallprompt",(function(t){t.preventDefault(),pe&&console.log(ue," beforeinstallprompt WORKING=>",t),window.deferredPrompt=t}))},fe=e(235),be=e(30),ge=function(){var t=[];return window.speechSynthesis.getVoices().forEach((function(n,e){var o=n.lang?" (".concat(n.lang,")"):"",i="".concat(n.name).concat(o);t.push({key:e,label:i,obj:n})})),t},he=Object(N.a)((function t(n){var e=this;Object(I.a)(this,t),this.rawText=void 0,this.voice=void 0,this.text2read=void 0,this.chunkedText=void 0,this.chunkLength=1e3,this.currChunkId=0,this.currSpeechObj=void 0,this.speed=1,this.isLoaded=!1,this.shouldStop=!1,this.chunkText=function(t){for(var n=(t=t.replace(/(\r\n\r\n|\n\n|\r\r|\n)/gm,".")).split(/[.!?]+/),o=[],i=0;i<n.length;i++){var c=n[i];if(c.length>e.chunkLength)for(var a=c.split(" "),r="",l=0;l<a.length;l++)((r+=a[l]+" ").length>e.chunkLength||l===a.length-1)&&(o.push(r),r="");else o.push(c)}return o},this.loadVoice=function(t){console.log("[TTS] LOAD VOICE",t),e.voice=t,e.pause(),e.play()},this.updateSpeed=function(t){e.speed=t,e.pause(),e.play()},this.play=function(){if(e.isLoaded)window.speechSynthesis.resume();else{if(e.currChunkId>e.chunkedText.length-1)return console.log("[TTS] finished played");e.isLoaded=!0,e.currSpeechObj=new SpeechSynthesisUtterance,e.currSpeechObj.text=e.chunkedText[e.currChunkId],e.currSpeechObj.rate=e.speed,e.voice&&(e.currSpeechObj.voice=e.voice),setTimeout((function(){window.speechSynthesis.speak(e.currSpeechObj)}),0),e.currSpeechObj.addEventListener("end",(function(){e.isLoaded=!1,e.shouldStop?e.shouldStop=!1:(e.currChunkId+=1,e.play())}))}},this.isPlaying=function(){var t=window.speechSynthesis.speaking;return t&&(t=!window.speechSynthesis.paused),t},this.pause=function(){e.stop()},this.stop=function(){e.shouldStop=!0,e.isLoaded=!1,e.debounceReinitStop(),window.speechSynthesis.cancel()},this.debounceReinitStop=Object(A.a)((function(){e.shouldStop=!1}),1e3),this.goToChunk=function(t){t<=0||t>e.chunkedText.length-1||(e.currChunkId=t,e.isPlaying()&&e.debounceRestart())},this.extractToChunkPos=function(t){var n=e.chunkText(t),o=null;if(Object(Pt.a)(n,(function(t){if(t.length>50)return o=t,!1})),!o)return-1;var i=-1;return Object(Pt.a)(e.chunkedText,(function(t,n){if(-1!==t.indexOf(o))return i=n,!1})),i},this.getCurrentChunkText=function(){return e.chunkedText[e.currChunkId]},this.debounceRestart=Object(A.a)((function(){e.stop(),e.play()}),500),this.goBack=function(){e.goToChunk(e.currChunkId-1)},this.goForward=function(){e.goToChunk(e.currChunkId+1)},this.rawText=n.text,this.text2read=n.text.replace(be.a.ressource,"").replace(be.a.ref,"").replace(be.a.baliseHtml,"").replace(/<[^>]*>?/gm," ").replace(/((&lt;!--).+?(--&gt;))/gm," ").replace(/(<!--).+?(-->)/gm," ").replace(/(\r\n|\n|\r)/gm," ").replace(/(\r\n|\n|\r)/gm," "),this.chunkedText=this.chunkText(this.text2read),console.log("[TTS] init new manager ",{p:n,text:this.chunkedText,length:this.chunkedText.length})})),me=e(34),ve=e(52),we="[SCREEN WAKE LOCK]",Oe=null,je=function(){var t=Object(ve.a)(Object(me.a)().mark((function t(){return Object(me.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,navigator.wakeLock.request("screen");case 3:Oe=t.sent,console.log(we,"ACTIVE"),t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),console.log(we,"Error : ".concat(t.t0.name,", ").concat(t.t0.message));case 10:case"end":return t.stop()}}),t,null,[[0,7]])})));return function(){return t.apply(this,arguments)}}();var xe=function(t){var n=Object(o.useState)(!1),e=Object(c.a)(n,2),i=e[0],l=e[1],s=Object(h.a)("tts-selected-voice",0),u=Object(c.a)(s,2),p=u[0],d=u[1],f=Object(o.useState)(!1),b=Object(c.a)(f,2),g=b[0],m=b[1],v=function(t){!0===t?je():Oe&&Oe.release().then((function(){Oe=null,console.log(we,"DISABLED")})),m(t)},w=Object(h.a)("tts-pos-".concat(t.id),0),O=Object(c.a)(w,2),j=O[0],x=O[1],y=Object(h.a)("tts-rate",1),_=Object(c.a)(y,2),S=_[0],T=_[1],I=Object(o.useState)(0),N=Object(c.a)(I,2),P=N[0],R=N[1],A=Object(o.useState)(""),F=Object(c.a)(A,2),L=F[0],M=F[1];Object(o.useEffect)((function(){var t=function(t){var n=0,e="".concat(Math.ceil(t),"m");if(t>60){n=Math.floor(t/60);Math.ceil(t%60);e="".concat(n,"h")}return e},n=t(6*(P-j)/(60*S)),e=t(6*P/(60*S)),o=" ".concat(n," left of ").concat(e);M(o)}),[P,S,j]);var D=Object(o.useRef)();window.tts=D,Object(o.useEffect)((function(){D.current=new he({text:t.fileContent}),D.current.goToChunk(j)}),[]),Object(o.useEffect)((function(){D.current.updateSpeed(S)}),[S]);var z=Object(o.useRef)(!1);return k((function(){l(D.current.isPlaying());var n=-1;(n=0!==D.current.currChunkId?D.current.currChunkId:D.current.currChunkId=1,t.startString&&!z.current)&&(n=D.current.extractToChunkPos(t.startString),D.current.goToChunk(n),z.current=!0);-1!==n&&x(n),R(D.current.chunkedText.length)}),500),Object(o.useEffect)((function(){var n=D.current.getCurrentChunkText();t.onUpdate({totalChunks:P,currentChunk:j,isPlaying:i,currentText:n})}),[P,j,i]),Object(a.c)(ke,null,Object(a.c)(rt.a,{title:"".concat(E.a.ttsPopup.title),onClose:function(){D.current.stop(),t.onUpdate({totalChunks:P,currentChunk:j,isPlaying:!1}),t.onClose()}},Object(a.c)(at.a,{value:p,type:"select",list:ge(),label:E.a.ttsPopup.voice,onSelectChange:function(t){!function(t){d(t);var n=ge();n[p]&&D.current.loadVoice(n[p].obj)}(parseInt(t))}}),Object(a.c)("span",null," SPEED : "),Object(a.c)("input",{className:"speed-range",type:"range",value:S,min:"0",max:"3",step:"0.1",onChange:function(t){var n=t.target.value;T(n)}})," (",S,")",Object(a.c)("br",null),Object(a.c)("br",null),Object(a.c)("b",null," SENTENCES : "),Object(a.c)("input",{type:"number",className:"text-pos",value:j,min:"0",max:P,onChange:function(t){var n=parseInt(t.target.value);D.current.goToChunk(n),x(n)}})," / ",P,Object(a.c)("br",null),Object(a.c)("input",{type:"range",value:j,className:"range-pos",min:"0",max:P,onChange:function(t){var n=parseInt(t.target.value);D.current.goToChunk(n),x(n)}}),Object(a.c)("div",{className:"estimated-time"},Object(a.c)("b",null,"Reading Time")," :",L),Object(a.c)("div",{className:"buttons"},Object(a.c)("button",{onClick:function(t){D.current.goBack()}},Object(a.c)(C.a,{name:"faFastBackward",color:"black"})),Object(a.c)("button",{onClick:function(t){i||D.current.goToChunk(j),i?D.current.stop():D.current.play()}},Object(a.c)(C.a,{name:i?"faPause":"faPlay",color:"black"})),Object(a.c)("button",{onClick:function(t){D.current.goForward()}},Object(a.c)(C.a,{name:"faFastForward",color:"black"})),"desktop"!==Object(r.a)()&&Object(a.c)("button",{onClick:function(t){v(!0)}},Object(a.c)(C.a,{name:"faLock",color:"black"})))),g&&Object(a.c)("div",{className:"bg-lock"},Object(a.c)("button",{onContextMenu:function(t){v(!1)}},Object(a.c)(C.a,{name:"faUnlock",color:"black"}))))},ke=Object(fe.a)("div",{target:"e1kwupat0"})({name:"13zwzvp",styles:".bg-lock{position:fixed;top:0px;left:0px;width:100vw;height:100vh;z-index:100005;background:rgba(0,0,0,0.3);display:flex;justify-content:center;align-items:center;button{}}.popup-wrapper .popupContent{padding:20px;.input-component span,span{display:inline-block;width:30%;font-size:12px;font-weight:bold;}.speed-range{position:relative;top:8px;}.range-pos{width:100%;margin-bottom:10px;}.text-pos{width:50px;margin-bottom:10px;}}.buttons{display:flex;padding:20px 0px 0px 0px;button{width:30%;padding:10px;}}"}),ye=function(){var t=Object(o.useState)(!1),n=Object(c.a)(t,2),e=n[0],i=n[1],a=Object(o.useState)(null),r=Object(c.a)(a,2),l=r[0],s=r[1],u=Object(o.useState)(null),p=Object(c.a)(u,2),d=p[0],f=p[1],b=Object(o.useState)(""),g=Object(c.a)(b,2),h=g[0],m=g[1],v=Object(o.useRef)(null);return{ttsApi:{open:function(t,n){var e=(n=n||{}).id?n.id:null,o=n.startString?n.startString:null;console.log("[TTS API]","open",{id:e,content:t,startString:o}),s(e),o&&f(o),m(t),i(!0)},close:function(){i(!1)},getStatus:function(cb){v.current&&cb(v.current)}},ttsPopupContent:h,ttsPopupId:l,ttsPos:d,setTtsPopup:i,ttsPopup:e,syncTtsStatus:function(t){v.current=t}}},_e=function(){var t=Object(o.useState)(null),n=Object(c.a)(t,2),e=n[0],i=n[1];return{notePreviewPopupApi:{open:function(t,n,e){var o=n[0],c=n[1];gn+o>window.innerWidth&&(o-=Math.abs(window.innerWidth-gn-o-10)),hn+c>window.innerHeight&&(c-=Math.abs(window.innerHeight-hn-c-10)),"50%"===o&&(o="calc(50% - ".concat(gn/2,"px)")),"50%"===c&&(c="calc(50% - ".concat(gn/2,"px)")),i({isOpen:!0,filepath:t,position:n=[o,c],opts:e})},close:function(){i(null)}},notePreviewPopup:e,setNotePreviewPopup:i}},Ce=e(39),Ee=e(166),Se=e(128);window.location.pathname.startsWith("/public_site")?Object(Se.b)(Object(a.c)((function(){Object(o.useEffect)((function(){de(),console.log("========= [APP PUBLIC] MOUNTED on a ".concat(Object(r.a)())),Object(l.d)().then((function(t){Object(x.d)((function(n){n.status.ipsServer.set(t.ipsServer),n.ui.browser.folders.refreshFromBackend()}))}))}),[]);var t=_(),n=t.isConnected,e=(t.connectionStatusComponent,t.toggleSocketConnection,ee()),i=(e.forceResponsiveRender,e.responsiveRefreshCounter),c=e.setResponsiveRefresh,s=le({isConnected:n,refresh:{get:i,set:c}}),u=Object(oe.b)(),p=(u.tabs,u.updateTab,u.refreshTabsFromBackend,u.updateActiveTabGrid,u.refreshWindowGrid,u.tabsApi),d=u.windowsApi,f=Object(ce.b)(),b=f.lightboxApi,g=(f.lightboxImages,f.lightboxIndex,mt()),h=(g.PromptPopupComponent,g.popupApi),m=re(),v=ye(),O=v.ttsApi,j=(v.ttsPos,v.ttsPopup,v.setTtsPopup,v.ttsPopupContent,v.ttsPopupId,v.syncTtsStatus,_e()),k=j.notePreviewPopupApi,y=(j.notePreviewPopup,Object(x.f)({popupApi:h,tabsApi:p,windowsApi:d,statusApi:s,historyApi:m,notePreviewPopupApi:k,lightboxApi:b,ttsApi:O})),C=y,E=C.ui.browser.files,S=C.ui.browser.folders,T=(S.scan,S.clean,S.base,ne(E.active.get)),I=(T.filesHistory,T.filesHistoryRef,T.cleanLastFilesHistory,T.refreshFilesHistoryFromBackend,T.lastFilesHistoryApi);C.lastNotesApi=I;var N=Zn((function(){E.active.set(-1)}),(function(){y.ui.browser.files.set([])})),P=(N.askForMoveFile,N.promptAndMoveFolder,N.promptAndBatchMoveFiles,w());return P.mobileView,P.setMobileView,P.MobileToolbarComponent,window.api=C,Object(a.c)("div",null,"hello world public app",window.location.pathname)}),null),document.getElementById("root")):Object(Se.b)(Object(a.c)((function(){Object(o.useEffect)((function(){return setTimeout((function(){console.log(qt,"starting frontendBackgroundPlugins Cron"),setInterval((function(){Kt()}),6e4)}),Object(g.a)(1e3,1e4)),de(),console.log("========= [APP] MOUNTED on a ".concat(Object(r.a)())),Object(l.d)().then((function(t){G(!0),At&&At.status.ipsServer.set(t.ipsServer),Object(x.d)((function(t){t.ui.browser.folders.refreshFromBackend()}))})),t(),window.onkeydown=function(t){var n=q(t);Object(H.a)(U[n])||(U[n]=!0);var e="".concat(n,"-down");V[e]&&V[e]()},window.onkeyup=function(t){var n=q(t);Object(H.a)(U[n])||(U[n]=!1);var e="".concat(n,"-up");V[e]&&V[e]()},Object(Wt.a)("init","init",(function(){})),function(){console.log("app will unmount")}}),[]);var t=function(){setTimeout((function(){Object(st.d)(nn)}),300)},n=function(){Ft.active.set(-1)},e=function(){Rt.ui.browser.files.set([])},u=function(t){var n=Object(o.useState)(!1),e=Object(c.a)(n,2),r=e[0],s=e[1],u=Object(o.useState)(""),p=Object(c.a)(u,2),d=p[0],f=p[1],b=Object(o.useState)(""),g=Object(c.a)(b,2),h=g[0],m=g[1],v=Object(o.useState)(""),w=Object(c.a)(v,2),j=w[0],x=w[1],k=Object(o.useState)(),y=Object(c.a)(k,2),_=y[0],C=y[1],S="[SETUP CONFIG]",T=O.a.client.log.verbose,I=Object(o.useRef)(0);return Object(o.useEffect)((function(){return T&&console.log(S," init socket listener"),I.current=l.b.on("getSetupInfos",(function(n){"SUCCESS_CONFIG_CREATION"===n.code?(C(["success","".concat(E.a.setupForm.successReload)]),setTimeout((function(){window.location.reload()}),3e3)):"ASK_SETUP"===n.code?(t.cleanAllApp(),s(!0),n.defaultFolder&&x(n.defaultFolder)):C(["error","".concat(n.code,": ").concat(n.message)])})),function(){T&&console.log(S," clean socket listener"),l.b.off(I.current)}}),[]),{displayWelcomePopup:r,SetupPopupComponent:function(t){return Object(a.c)(i.a.Fragment,null,r&&Object(a.c)("div",{className:"setup-popup-component"},Object(a.c)(rt.a,{title:"Welcome to Tiro",onClose:function(){}},Object(a.c)("p",null,E.a.setupForm.introText)," ",Object(a.c)("br",null),Object(a.c)("div",null,Object(a.c)(at.a,{value:d,label:E.a.setupForm.user,explanation:E.a.setupForm.userExplanation,onChange:function(t){f(t)},shouldNotSelectOnClick:!0}),Object(a.c)(at.a,{value:h,label:E.a.setupForm.password,type:"password",explanation:E.a.setupForm.passwordExplanation,onChange:function(t){m(t)},shouldNotSelectOnClick:!0}),Object(a.c)(at.a,{value:j,label:E.a.setupForm.dataFolder,explanation:E.a.setupForm.folderExplanation,onChange:function(t){x(t)},shouldNotSelectOnClick:!0}),Object(a.c)("input",{type:"button",value:"submit",className:"submit-button",onClick:function(t){C(void 0),l.b.emit("sendSetupInfos",{form:{user:d,password:h,dataFolder:j},token:Object(B.b)()})}}),_&&Object(a.c)("div",{className:_[0]},_[1])))))}}}({cleanAllApp:function(){console.log("[cleanAllApp]"),Vt(),Dt(),n(),e()}}).SetupPopupComponent,d=Object(B.d)({onLoginAsked:function(){console.log("[cleanListAndFileContent]"),n(),e()},onLoginSuccess:function(){v(),yn(),Jt(),Object(x.d)((function(t){t.userSettings.refreshUserSettingsFromBackend(),t.ui.floatingPanel.refreshFromBackend()})),Object(x.d)((function(t){t.ui.browser.folders.refreshFromBackend()})),Mt(["/"]),t()}}).LoginPopupComponent,f=Object(oe.b)(),h=f.tabs,m=f.updateTab,v=f.refreshTabsFromBackend,j=f.updateActiveTabGrid,k=f.refreshWindowGrid,y=f.tabsApi,S=f.windowsApi,I=Object(o.useState)(0),N=Object(c.a)(I,2),P=N[0],R=N[1],A=y.active.get(),F=mt(),L=F.PromptPopupComponent,M=F.popupApi,D=_(),z=D.isConnected,W=D.connectionStatusComponent,G=D.toggleSocketConnection,Y=ee(),$=Y.forceResponsiveRender,Z=Y.responsiveRefreshCounter,X=Y.setResponsiveRefresh,Q=Object(o.useRef)([]),tt=Object(o.useState)(null),et=Object(c.a)(tt,2),ot=et[0],it=et[1];Object(o.useEffect)((function(){setTimeout((function(){}),2e3)}),[]);var ut=Object(ce.b)(),pt=ut.lightboxApi,bt=ut.lightboxImages,ht=ut.lightboxIndex,vt=ye(),wt=vt.ttsApi,jt=vt.ttsPos,xt=vt.ttsPopup,kt=vt.setTtsPopup,yt=vt.ttsPopupContent,_t=vt.ttsPopupId,Ct=vt.syncTtsStatus,St=le({isConnected:z,refresh:{get:Z,set:X}}),Tt=re(),It=_e(),Nt=It.notePreviewPopupApi,Pt=It.notePreviewPopup,Rt=Object(x.f)({popupApi:M,tabsApi:y,windowsApi:S,statusApi:St,historyApi:Tt,notePreviewPopupApi:Nt,lightboxApi:pt,ttsApi:wt}),At=Rt,Ft=At.ui.browser.files,Lt=At.ui.browser.folders,Mt=Lt.scan,Dt=Lt.clean,zt=Lt.base,Ht=ne(Ft.active.get),Ut=Ht.filesHistory,Vt=(Ht.filesHistoryRef,Ht.cleanLastFilesHistory),Jt=Ht.refreshFilesHistoryFromBackend,Yt=Ht.lastFilesHistoryApi;At.lastNotesApi=Yt;var $t=Zn(n,e),Zt=($t.askForMoveFile,$t.promptAndMoveFolder),Xt=$t.promptAndBatchMoveFiles,Qt=w(),tn=Qt.mobileView,nn=Qt.setMobileView,en=Qt.MobileToolbarComponent;window.api=At;var on=Object(o.useState)(!1),an=Object(c.a)(on,2),ln=an[0],sn=an[1],un=Object(o.useState)(!1),dn=Object(c.a)(un,2),fn=dn[0],gn=dn[1];Object(o.useEffect)((function(){return ft("alt + spacebar",(function(){sn(!0),gn(!0)})),ft("esc",(function(){sn(!1)})),function(){dt&&dt.bind&&dt.releaseAllKeys()}}),[Ut]),Object(o.useEffect)((function(){if("mobile"!==Object(r.a)())return Object(Ee.a)("/favicon.png");Object(st.e)(h,tn)}),[h,tn]);var hn=$?0:1,mn=At.userSettings.refresh.css.get+hn,vn=At.userSettings,wn=function(){var t=Object(Bt.a)("interface-pin-element-status",{topTab:!1,bottomBar:!1}),n=Object(c.a)(t,3),e=n[0],i=n[1],a=n[2];return Object(o.useEffect)((function(){a()}),[]),{pinStatus:e,updatePinStatus:function(t){return function(n){i(Object(s.a)(Object(s.a)({},e),{},Object(Ce.a)({},t,n)))}},togglePinStatus:function(t){return function(){i(Object(s.a)(Object(s.a)({},e),{},Object(Ce.a)({},t,!e[t])))}},refreshPinStatus:a}}(),On=wn.pinStatus,xn=wn.updatePinStatus,kn=wn.togglePinStatus,yn=wn.refreshPinStatus,_n=Object(o.useState)(void 0),Cn=Object(c.a)(_n,2),En=Cn[0],Sn=Cn[1],Tn=Gt.d.curr.ui_layout_background_video_width,In=Gt.d.curr.ui_layout_background_video_height;return Object(o.useEffect)((function(){var t=Gt.d.curr.ui_layout_background_video_enable,n=Gt.d.curr.ui_layout_background_image;t&&n&&Sn(n)}),[mn,vn]),Object(a.c)("div",{className:Vn(vn)},Object(a.c)("div",{className:qn(tn,mn,vn,On)},En&&Object(a.c)(Dn,{url:En,width:Tn,height:In}),Object(a.c)("div",{className:" ".concat("mobile"===Object(r.a)()?"mobile-view-container mobile-view-".concat(tn):"")},Object(a.c)(x.a.Provider,{value:Rt},Object(a.c)("div",{className:"config-buttons-bar"},At.userSettings.get("beta_plugins_marketplace")&&Object(a.c)("div",{className:"config-button plugins-marketplace-button",onClick:function(){it("plugins-marketplace")}},Object(a.c)(C.b,{name:"puzzle-piece"})),"mobile"!==Object(r.a)()&&Object(a.c)("div",{className:"config-button search-button",onClick:function(){gn(!0),sn(!0)}},Object(a.c)(C.b,{name:"search"})),Object(a.c)("div",{className:"config-button settings-button",onClick:function(){it("settings")}},Object(a.c)(C.b,{name:"cog"}))),(null===Pt||void 0===Pt?void 0:Pt.isOpen)&&Object(a.c)(bn,{notePreview:Pt}),ln&&Object(a.c)(cn,{show:fn,lastNotes:Ut,onClose:function(t){sn(!1)},onHide:function(t){gn(!1)}}),Object(a.c)(a.a,{styles:Object(a.b)("*{-webkit-print-color-adjust:exact!important;color-adjust:exact!important;}*:focus{outline:none;}body{margin:0;padding:0px;background:",p.a.colors.bg.light,";font-size:",Object(K.a)(1),"px;font-family:",p.a.font.main,";}html,body{height:100vh;overflow:hidden;background:",p.a.colors.bgInterface,";}#root{height:100%;}button,input{font-family:",p.a.font.main,";font-weight:700;color:",p.a.colors.l2.title,";}","\n@page {\n margin: 0;\n padding: 0;\n}\n\n.main-wrapper,\n#root,\n.print-body {\n\t// position: absolute;\n// top: 22px;\n\t\t// height: 1000vh;\n\t\t// overflow: auto;\n}\n\n.print-wrapper {\n\t\tz-index: 10000000000000;\n\t\tbackground-color: white;\n\t\toverflow: hidden;\n width: 100%!important;\n\t\theight: 1000vh!important;\n position: fixed;\n top: 0;\n left: 0;\n margin: 0;\n padding: 15px;\n font-size: 14px;\n line-height: 18px;\n\t\tmargin-top: 0px!important;\n\t\tdisplay: block!important;\n}\n/* .print-wrapper { */\n/* \t\tz-index: 10000000000000; */\n/* \t\ttop: 0px; */\n/* \t\tleft: 0px; */\n/* \t\tposition: fixed; */\n/* \t\twidth: 100%!important; */\n/* \t\t/* height: 100vh; */ */\n/* } */\n\n"," body{position:relative;}","")}),Object(a.c)("div",{role:"dialog",className:"main-wrapper ".concat(At.userSettings.get("ui_sidebar")?"with-sidebar":"without-sidebar"," device-view-").concat(Object(r.a)())},L(),d({}),u({}),W(),en({forceRerender:$,onButtons:[function(){gn(!0),sn(!0)}]}),Object(a.c)("div",{className:"left-sidebar-indicator"},Object(a.c)("div",{className:"left-wrapper"},Object(a.c)("div",{className:"left-wrapper-1"},Object(a.c)("div",{className:"invisible-scrollbars"},Object(a.c)(T,{onNewFile:function(){Object(x.d)((function(t){var n=t.ui.browser.folders.current.get();t.file.create(n,(function(e){var o=Object(J.c)(e);o&&t.ui.browser.goTo(n,o.name,{openIn:"activeWindow"})}))}))}}),At.userSettings.get("ui_layout_shortcuts_panel")&&Object(a.c)(rn,{filePath:".tiro/shortcuts.md",onClick:function(){}}),Object(a.c)(ct,{files:Ut,onClick:function(t){Rt.ui.browser.goTo(t.folder,t.name,{openIn:"active"})}}),Object(a.c)(nt,{openFolders:Lt.open.get(),folder:Lt.get(),current:Lt.current.get(),onFolderClicked:function(t){Rt.ui.browser.goTo(t,null)},onFolderMenuAction:function(t,n,e){"rename"===t&&e?Zt({folder:n,folderToDropInto:n,folderBasePath:zt,newTitle:e,renameOnly:!0,disablePrompt:!0,onMoveFn:function(){Mt([Yn(n.path)],{cache:!1,cb:function(){}})}}):"create"===t&&e?Object(x.d)((function(t){t.folders.create("".concat(n.path,"/").concat(e),(function(t){Mt([n.path],{cache:!1})}))})):"moveToTrash"===t?Zt({folder:n,folderToDropInto:se.b,folderBasePath:zt,newTitle:"".concat(n.title,"_").concat(Object(Xn.a)().full_file),onMoveFn:function(){Mt([Yn(n.path),n.path],{cache:!1,cb:function(){Lt.open.add(n.path)}})}}):"delete"===t&&(Object(se.a)("trash"),setTimeout((function(){Mt([n.path],{cache:!1})})))},onFolderOpen:function(t){Mt([t],{cache:!1})},onFolderClose:function(t){},onFolderDragStart:function(t){console.log("[DRAG MOVE] onFolderDragStart",t),Q.current=[{type:"folder",folder:t}]},onFolderDragEnd:function(){console.log("[DRAG MOVE] onFolderDragEnd"),Q.current=[]},onFolderDrop:function(t){!function(t){console.log("[DRAG MOVE] processDragDropAction ->",Q.current,t);var n=Q.current[0];"file"===n.type&&n.files?Xt({files:n.files,folderToDropInto:t}):"folder"===n.type&&n.folder&&Zt({folder:n.folder,folderToDropInto:t,folderBasePath:zt,disablePrompt:!0,onMoveFn:function(){if(n.folder){var e=n.folder.path,o=t.path;Mt([Yn(e),Yn(o),o,e],{cache:!1,cb:function(){Lt.open.add(e),Lt.open.add(o),Lt.open.add(Yn(e)),Lt.open.add(Yn(o))}})}}})}(t)}}))),Object(a.c)("div",{className:"left-wrapper-2"},Object(a.c)("div",{className:"top-files-list-wrapper"},Object(a.c)("div",{className:"subtitle-wrapper"},Object(a.c)("div",{className:"folder-wrapper"},At&&At.ui.browser.folders.current.get(),!At.ui.browser.folders.current.get()&&"/"),"mobile"!==Object(r.a)()&&Object(a.c)("div",{className:"toggle-sidebar-btn"},Object(a.c)(b.a,{popup:!1,buttons:[{title:"Toggle Sidebar",action:function(t){Object(x.d)((function(t){t.userSettings.set("ui_sidebar",!t.userSettings.get("ui_sidebar"))})),k()},active:!0===Rt.userSettings.get("ui_sidebar")}],colors:["#d4d1d1","#615f5f"],size:.8}))),Object(a.c)(lt,{term:Rt.ui.search.term.get})),Object(a.c)("div",{className:"files-list-wrapper"},Object(a.c)(ae,{files:Ft.get,activeFileIndex:Ft.active.getIndex,onSortFiles:function(t){Rt.ui.browser.files.set(t)},onFileClicked:function(t){Ft.active.set(t);var n=Ft.get[t];At.tabs.active.get()?S.active.setContent(n):At.tabs.openInNewTab(n)},onFileDragStart:function(t){console.log("[DRAG MOVE] onFileDragStart",t),Q.current=[{type:"file",files:t}]},onFileDragEnd:function(){console.log("[DRAG MOVE] onFileDragEnd"),Q.current=[]}}))))),Object(a.c)("div",{className:"right-wrapper draggable-grid-editors-view"},"mobile"!==Object(r.a)()&&Object(a.c)(Ot,{tabs:h,onUpdate:m,onPinToggle:kn("topTab"),pinStatus:On.topTab}),A&&Object(a.c)(ie.b,{tab:A,forceRefresh:P,onGridUpdate:function(t){j(t),R(P+1)},mobileView:tn,pinStatus:On})),Gt.d.curr.beta_floating_windows&&Object(a.c)(Rn,{panels:At.ui.floatingPanel.panels,pinStatus:On.bottomBar,onPinChange:xn("bottomBar")}),"plugins-marketplace"===ot&&Object(a.c)(jn,{onClose:function(){it(null)}}),"settings"===ot&&Object(a.c)(Et.a,{onClose:function(){it(null)}})))),Object(a.c)(pn,null),bt.length>0&&Object(a.c)(gt,{images:bt,startingIndex:ht,onClose:Rt.ui.lightbox.close}),xt&&Object(a.c)(xe,{id:_t,fileContent:yt,startString:jt,onUpdate:function(t){Ct(t)},onClose:function(){kt(!1)}})))}),null),document.getElementById("root"))},60:function(t,n,e){"use strict";e.d(n,"a",(function(){return s}));var o=e(5),i=e(0),c=e(17),a=e(11),r=e(55),l=e(32);function s(t,n,e){var s=Object(i.useState)(n),u=Object(o.a)(s,2),p=u[0],d=u[1],f="/".concat(c.a.path.configFolder,"/").concat(c.a.path.backendStateFolder,"/").concat(t,".md");'[BACKEND STATE] "'.concat(t,'" clientApi not loaded! Persistance system will not work correctly');Object(i.useEffect)((function(){var cb=null!==e&&void 0!==e&&e.onInitialRefresh?e.onInitialRefresh:void 0;g(cb)}),[]);var b=Object(l.a)((function(t){Object(a.d)((function(n){n.history.save(f,t,"int")}))}),6e4),g=function(cb){Object(a.d)((function(n){n.file.getContent(f,(function(n){var o=JSON.parse(n);!0===(null===e||void 0===e?void 0:e.debug)&&console.log("[BACKEND STATE] refreshValFromBackend: ".concat(t," => "),o),d(o),cb&&cb(o)}))}))};return[p,function(n){var o=Object(r.a)(n);d(Object(r.a)(o)),!0===(null===e||void 0===e?void 0:e.debug)&&console.log("[BACKEND STATE] setValue: ".concat(t," => "),o);var i=JSON.stringify(o),c=!(null===e||void 0===e||!e.debouncedSave)&&(null===e||void 0===e?void 0:e.debouncedSave),l=!0===(null===e||void 0===e?void 0:e.debouncedSaveWithThrottle);Object(a.d)((function(t){t.file.saveContent(f,i,{debounced:c,withThrottle:l})})),!0===(null===e||void 0===e?void 0:e.history)&&b(i)},g]}},63:function(t,n,e){"use strict";e.d(n,"a",(function(){return f}));var o=e(17),i=e(167),c=e(31),a={};window.dbscroll=a,Object(c.a)("syncscroll","get_db",(function(){return a}));o.a.client.log.verbose;var r=function(t){var n=document.querySelector(".window-id-".concat(t," .preview-area")),e=document.querySelector(".window-id-".concat(t," .cm-scroller")),o=document.querySelector(".window-id-".concat(t," .scrolling-bar-wrapper"));return a[t]||(a[t]={els:{preview:n,editor:e,scroller:o},dims:{editor:{viewport:0,full:0},preview:{viewport:0,full:0},scroller:{viewport:0,full:0}},posPercent:0,previewOffsetY:0}),a[t].els.preview=n,a[t].els.editor=e,a[t].els.scroller=o,a[t]},l=function(t){var n,e,o=r(t),i=o.dims.editor.viewport/o.dims.editor.full||1e7,c=o.dims.preview.viewport/o.dims.preview.full||1e7,a=i<c?i:c,l=(null===(n=o.els.scroller)||void 0===n?void 0:n.clientHeight)||0,s=a*l,u={viewport:s=s>l?l:s,full:l};o.dims.scroller=u;var p=null===(e=o.els.scroller)||void 0===e?void 0:e.dataset;p&&(p.scrollRefresh||(p.scrollRefresh=1),p.scrollRefresh=parseInt(p.scrollRefresh)+1)},s=function(t,n){var e;i.a[t]=!1;var o=r(t);n||(n=o.posPercent);var c=null===(e=o.els.scroller)||void 0===e?void 0:e.dataset;c&&(c.scrollRefresh||(c.scrollRefresh=1),c.scrollRefresh=parseInt(c.scrollRefresh)+1)},u=function(t,n){i.a[t]=!1;var e=r(t);if(e.els.editor){var o=e.dims.editor;n||(n=e.posPercent);var c=(o.full-o.viewport)/100;e.els.editor.scrollTop=c*n}},p=function(t,n){i.a[t]=!1;var e=r(t);if(e.els.preview){var o=e.dims.preview;n||(n=e.posPercent);var c=o.full/100,a=Math.round(c*n);e.els.preview.scrollTop=a+e.previewOffsetY}},d=function(t,n){var e=r(t),o=e.dims.preview.full/100,i=n-Math.round(o*e.posPercent);e.previewOffsetY=i},f={getScrollObj:r,updateEditorDims:function(t,n){var e=r(t);e.els.editor&&(e.dims.editor=n)},updatePreviewDims:function(t){var n=r(t);if(n.els.preview){var e=n.els.preview.querySelector(".preview-area-full-height-content"),o=e.clientHeight-e.parentNode.clientHeight,i=n.els.preview.clientHeight;n.dims.preview={viewport:i,full:o},n.dims.preview={viewport:i,full:o}}},updateScrollerDims:l,updatePreviewOffset:d,onEditorScroll:function(t,n){var e=r(t);e.els.editor&&(e.posPercent=n,s(t,n),p(t,n))},onScrollerScroll:function(t,n){r(t).posPercent=n,u(t,n),p(t,n)},onPreviewScroll:function(t){var n=r(t),e=n.els.preview.scrollTop;d(t,e),n.posPercent=e/n.dims.preview.full*100,u(t,n.posPercent),s(t,n.posPercent)},onWindowLoad:function(t){if(a[t]){var n=r(t).posPercent;l(t),s(t,n),u(t,n),p(t,n)}},scrollEditor:u,scrollPreview:p,scrollScroller:s}},65:function(t,n,e){"use strict";e.d(n,"b",(function(){return o})),e.d(n,"a",(function(){return i})),e.d(n,"c",(function(){return c}));var o=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"_";return(t=i(t,[["-",n],["_",n],[" ",n],["/",n]])).replace(/[^\w\s]/gi,"")},i=function(t,n){for(var e=0;e<n.length;e++){var o=n[e];t=t.split(o[0]).join(o[1])}return t};function c(t,n){for(var e=t.split("\n"),o=n.split("\n"),i=Math.max(e.length,o.length),c=[],a=0;a<i;a++)void 0!==e[a]&&void 0!==o[a]?e[a]!==o[a]?c.push('<span class="diff-sign diff-modified">~~~</span> '+o[a]):c.push(o[a]):void 0!==e[a]&&void 0===o[a]?c.push('<span class="diff-sign diff-deleted">---</span> '+e[a]):void 0===e[a]&&void 0!==o[a]&&c.push('<span class="diff-sign diff-added">+++</span> '+o[a]);return c.join("\n")}},66:function(t,n,e){"use strict";e.d(n,"a",(function(){return i})),e.d(n,"c",(function(){return c})),e.d(n,"b",(function(){return a}));var o=e(19),i=function(t){var n=((new Date).getTime()-t.getTime())/1e3,e=604800,i="";if(n<=3600)i="".concat(Math.ceil(n/60)," ").concat(o.a.minsAgo);else if(n>3600&&n<=86400)i="".concat(Math.ceil(n/3600)," ").concat(o.a.hoursAgo);else if(n>86400&&n<=e)i="".concat(Math.ceil(n/86400)," ").concat(o.a.daysAgo);else if(n>e){var c=("0"+t.getDate()).slice(-2),a=o.a.months[t.getMonth()],r=t.getFullYear().toString();i="".concat(c," ").concat(a," ").concat(r)}return i},c=function(t){t||(t=(new Date).getTime());var n=new Date(t);return[n.getFullYear(),n.getMonth()+1,n.getDate()]},a=function(t){var n=(new Date).getTime();return"lastMonth"===t&&(n=n-432e5),n}},67:function(t,n,e){"use strict";e.d(n,"a",(function(){return l})),e.d(n,"b",(function(){return s}));var o=e(134),i=e(170),c=e(0),a=e(24),r=e(1),l=function(t){var n,e=Object(c.useRef)(),a=function(){t.shouldFocus&&e.current.focus()};Object(c.useEffect)((function(){a()}),[t.shouldFocus]),Object(c.useEffect)((function(){a()}),[]);var l="checkbox"===t.type&&(!0===t.value||"true"===t.value),s=t.value;Object(i.a)(s)&&(s="");return Object(r.c)("div",{className:"input-component-wrapper ".concat(t.style?Object(o.a)(t.style,";",""):"")},Object(r.c)("div",{className:"input-component ".concat(t.id?t.id:""," ").concat(t.type)},t.label&&Object(r.c)("span",{onClick:function(n){"checkbox"===t.type&&(e.current.checked=!e.current.checked,t.onChange&&t.onChange(e.current.checked))}},t.label," "),Object(r.c)("div",{className:"input-wrapper"},"select"!==t.type&&"textarea"!==t.type&&Object(r.c)("input",{ref:e,type:t.type?t.type:"text",value:s,checked:l,readOnly:t.readonly,max:t.max,min:t.min,onFocus:function(){t.onFocus&&t.onFocus()},onClick:function(){!t.shouldNotSelectOnClick&&e.current.select()},onKeyPress:function(n){"Enter"==(n.code||n.key)&&t.onEnterPressed&&t.onEnterPressed()},onChange:function(n){t.onCheckedChange&&t.onCheckedChange(n.target.checked),function(n){var e=n;"number"===t.type&&(e=parseInt(e),t.max&&e>t.max&&(e=t.max),t.min&&e<t.min&&(e=t.min),e=e.toString()),t.onChange&&t.onChange(e)}(n.target.value)}}),"select"===t.type&&Object(r.c)("select",{value:s,onChange:function(n){t.onSelectChange&&t.onSelectChange(n.target.value)}},null===(n=t.list)||void 0===n?void 0:n.map((function(t,n){return Object(r.c)("option",{value:t.key},t.label," ")}))),"textarea"===t.type&&Object(r.c)("textarea",{defaultValue:s,onChange:function(n){t.onChange&&t.onChange(n.target.value)}}),t.explanation&&Object(r.c)("div",{className:"explanation"}," ",t.explanation," "))))},s=function(){return"\n .input-component {\n display: flex;\n align-items: center;\n padding-bottom: 10px;\n input, select {\n max-width: 100%;\n }\n &.select {\n span {\n width: 20%;\n }\n }\n span {\n width: 30%;\n font-weight: 700;\n text-transform: uppercase;\n }\n .input-wrapper {\n // width: 70%;\n input {\n padding: 7px;\n border: none;\n\t\t\t\tfont-size:".concat(Object(a.a)(1),"px;\n background: #ececec;\n border-radius: 5px;\n }\n\t\t\ttextarea {\n\t\t\t\theight: 120px;\n\t\t\t\tfont-size: ").concat(Object(a.a)(),"px;\n\t\t\t\tborder: none;\n\t\t\t\tbackground: #ececec;\n border-radius: 5px;\n\t\t\t\tpadding: 2px;\n\t\t\t}\n .explanation {\n font-size:").concat(Object(a.a)(1),"px;\n color: grey;\n }\n }\n }\n")}},68:function(t,n,e){"use strict";e.d(n,"c",(function(){return d})),e.d(n,"g",(function(){return b})),e.d(n,"f",(function(){return g})),e.d(n,"h",(function(){return h})),e.d(n,"d",(function(){return m})),e.d(n,"a",(function(){return v})),e.d(n,"e",(function(){return w})),e.d(n,"b",(function(){return O}));var o=e(10),i=e(15),c=e(122),a=e(376),r=e(25),l=e(170),s=e(377),u=e(11),p=e(31),d=function(t){for(var n=t.value.split("\n"),e=t.selectionStart,o=0,i=0;o<e+1;){o+=n[i].length+1,i++}return{currentPosition:e,lines:n,activeLine:n[--i],lineIndex:i}},f=function(t){for(var n=!0,e=0;e<t.length;e++)32!==t[e].charCodeAt(0)&&45!==t[e].charCodeAt(0)&&91!==t[e].charCodeAt(0)&&93!==t[e].charCodeAt(0)&&(n=!1);return n},b=function(t,n,cb){if(10===n){console.log("updateTextFromLetterInput => ENTER PRESSED");var e=t.lines[t.lineIndex-1],o=e.indexOf("- ["),i=e.indexOf("-"),c="";-1!==o&&"- [ ] "!==e?(c=e.substr(0,o+3)+" ] ",f(c)&&(t.lines[t.lineIndex]=c+t.activeLine,cb(c.length))):-1!==i&&"- "!==e&&"- [ ] "!==e&&(c=e.substr(0,i+1)+" ",f(c)&&(t.lines[t.lineIndex]=c+t.activeLine,cb(c.length)))}return t.lines.join("\n")},g=function(t,n,cb,e){var o=n.lines;if("^"===t){var r=o[n.lineIndex-1],l=o[n.lineIndex];o[n.lineIndex]=r,o[n.lineIndex-1]=l,cb(-r.length-1)}if("v"===t){var s=o[n.lineIndex+1],u=o[n.lineIndex];o[n.lineIndex]=s,o[n.lineIndex+1]=u,cb(+s.length+1)}if("X"===t){o[n.lineIndex].length;var p=Object(i.a)(o).splice(0,n.lineIndex).join("\n").length+1-n.currentPosition;o[n.lineIndex]="",cb(p)}if("C"===t){var d=o[n.lineIndex].length,f=o[n.lineIndex];o.splice(n.lineIndex,0,f),cb(d+1)}"->"===t&&(o[n.lineIndex]=" "+o[n.lineIndex],cb(2)),"<-"===t&&(n.activeLine.startsWith(" ")?(o[n.lineIndex]=o[n.lineIndex].substr(2,o[n.lineIndex].length),cb(-2)):cb(0));var b=n.activeLine.trim();if("[x]"===t&&(b.startsWith("- [ ]")||b.startsWith("- [x]")?b.startsWith("- [ ]")?(o[n.lineIndex]=o[n.lineIndex].replace("[ ]","[x]"),cb(0)):b.startsWith("- [x]")?(o[n.lineIndex]=o[n.lineIndex].replace("[x]","[ ]"),cb(0)):cb(0):(o[n.lineIndex]=o[n.lineIndex].replace(b,"- [ ] "+b.replace("-","")),cb(6))),"insertAt"===t&&e&&e.textToInsert&&(Object(c.a)(e.insertPosition)||Object(a.a)(e.insertPosition))){var g=0;Object(c.a)(e.insertPosition)&&(g=e.insertPosition),"currentPos"===e.insertPosition&&(g=n.currentPosition+1),"currentLineStart"===e.insertPosition&&(g=Object(i.a)(o).splice(0,n.lineIndex).join("\n").length);var h=o.join("\n"),m=e.textToInsert.length;o=[h.slice(0,g),e.textToInsert,e.replaceText?h.slice(g+m,h.length):h.slice(g,h.length)].join("").split("\n")}return o.join("\n")},h=function(t){var n=t.split("\n"),e=0;return Array.isArray(n)?(Object(r.a)(n,(function(t){var n=t.split(" ").filter((function(t){return""!==t}));e+=n.length})),e):e},m=function(t){var n=!1;return(t="".concat(t)).toLowerCase().startsWith("math.")&&(n=!0),t.startsWith("(")&&(n=!0),isNaN(parseInt(t))||(n=!0),t.includes("\n")&&(n=!1),t.length>400&&(n=!1),n},v=function(t){var n=null;if(!m(t))return n;try{n=new Function("return ".concat(t))()}catch(e){}return n},w=function(t){var n=t.windowId,e=t.file,i=t.fileContent,c=t.selectionTxt,a=t.insertPos;try{var r=new Function("return ".concat(c))(),l=Object(o.a)(Object(o.a)({},{wrapSyntax:!1,title:"",currentContent:i,insertPos:a,windowId:n,selection:c,file:e,linejump:!1,isLast:!1}),{},{textUpdate:" = ".concat(r),isLast:!0});O(l)}catch(s){Object(p.d)('[CALC] Error <br/> "'.concat(s,'"'))}},O=function(t){t.question||(t.question=""),t.title||(t.title=""),Object(l.a)(t.linejump)||(t.linejump=!0),Object(l.a)(t.viewFollow)||(t.viewFollow=!0),Object(l.a)(t.wrapSyntax)||(t.wrapSyntax=!0);var n=t.linejump?"\n\n":" ",e="###",o="---",i="".concat(n," ").concat(e," [").concat(t.title,"] (generating ...) ").concat(n),c="".concat(n," ").concat(o," [").concat(t.title,"] (done) ").concat(n),a="".concat(n).concat(t.textUpdate);t.wrapSyntax||(i=c=o=e=""),a="".concat(i).concat(t.textUpdate).concat(n).concat(e," \n"),t.isLast&&(a="".concat(c).concat(t.textUpdate).concat(n).concat(o," \n"));var r=t.currentContent.substring(0,t.insertPos),s=t.currentContent.substring(t.insertPos),p=r+a+s;Object(u.d)((function(n){if(n.file.saveContent(t.file.path,p),t.viewFollow){var e=("".concat(r).concat(a).split("\n").length||0)-2;e<0&&(e=0),j(t.windowId,e)}}))},j=Object(s.a)((function(t,n){Object(u.d)((function(e){e.ui.note.editorAction.dispatch({windowId:t,type:"lineJump",lineJumpNb:n})}))}),1e3)},70:function(t,n,e){"use strict";e.d(n,"a",(function(){return c}));var o=e(5),i=e(0);function c(t,n){var e=Object(i.useState)((function(){try{var e=window.localStorage.getItem(t);return e?JSON.parse(e):n}catch(o){return console.log(o),n}})),c=Object(o.a)(e,2),a=c[0],r=c[1];return[a,function(n){try{var e=n instanceof Function?n(a):n;r(e),window.localStorage.setItem(t,JSON.stringify(e))}catch(o){console.log(o)}}]}},71:function(t,n,e){"use strict";e.d(n,"c",(function(){return r})),e.d(n,"a",(function(){return l})),e.d(n,"b",(function(){return s}));e(0);var o=e(160),i=e(89),c=e(128),a=e(1),r=function(t,n,e){if(!t)return"";var o=t.querySelector("iframe"),i=Object(c.c)(n,{delay:100}),a='<div id="'.concat(i,'" class="resource-link-ctag"><div class="loading-string">loading...</div></div>'),r=!o||!0===e;t.innerHTML=r?a:""},l=function(t){var n;return s(t.tagName,t.content,(null===(n=t.opts)||void 0===n?void 0:n.windowId)||"null",t.opts)},s=function(t,n,e,c){var r;c||(c={}),c.file||(c.file=Object(i.a)());var l=(null===(r=c)||void 0===r?void 0:r.ctagHeightOffset)||0;return Object(a.c)(o.a,{file:c.file,block:{type:"tag",tagName:t,content:n,start:0,end:0},windowId:e,ctagHeightOffset:l,yCnt:0,onIframeMouseWheel:function(){},ctagSandboxed:c.sandboxed,ctagFullscreen:c.fullscreen,ctagOnFullscreenClose:c.onFullscreenClose})}},72:function(t,n,e){"use strict";e.d(n,"b",(function(){return d})),e.d(n,"e",(function(){return b})),e.d(n,"d",(function(){return g})),e.d(n,"c",(function(){return m})),e.d(n,"f",(function(){return v})),e.d(n,"a",(function(){return w}));var o=e(3),i=e(25),c=e(29),a=e(51),r=e(11),l=e(13),s=e(206),u=e(18),p=e(166),d=function(t){var n=new URL(t),e=n.hostname.replace(/^www\./,""),o=n.pathname.split("/").filter((function(t){return""!==t.trim()})),i="";return o.length>0&&(i=(i=o[o.length-1]).length>20?i.substring(0,20).replace(/[^A-Za-z0-9-_\ ]/g,""):i.replace(/[^A-Za-z0-9]/g,"")),e.length>15&&(e=e.substring(0,15)),i.length>0?"".concat(e,"/").concat(i):e},f={value:!1},b=function(t,n){f.value&&Object(r.d)((function(t){var e,o=t.ui.windows.active.get(),i=null===o||void 0===o||null===(e=o.content.file)||void 0===e?void 0:e.path,a=null===o||void 0===o?void 0:o.content.view,r=m().array;r=r.filter((function(t){return"filepath"!==t.name&&"view"!==t.name})),i&&a&&(r.unshift({name:"filepath",value:i}),Object(p.a)("/favicon.png"),document.title="Tiro","mobile"===Object(l.a)()?r.unshift({name:"view",value:n}):r.unshift({name:"view",value:a}),h(r),t.file.getContent(i,(function(t){var n=Object(s.a)(t,Object(c.d)(i));if(!(n.length<1)){var e="".concat(n[0].url).concat(Object(u.c)()),o=Object(c.d)(i).filenameWithoutExt||Object(c.d)(i).name;console.log("fullurl",e,o),document.title=o,Object(p.a)(e),setTimeout((function(){document.title=o}),300)}})))}))},g=function(t){var n,e;Object(p.a)("/favicon.png"),document.title="Tiro",setTimeout((function(){f.value=!0}),5e3);var o=m().dic,i=null===(n=o.filepath)||void 0===n?void 0:n.value,a=null===(e=o.view)||void 0===e?void 0:e.value;if(i&&a&&"mobile"===Object(l.a)()){var s=Object(c.d)(i);Object(r.d)((function(n){n.ui.browser.goTo(s.folder,s.name,{openIn:"activeWindow"}),t(a)}))}},h=function(t){var n="".concat(a.a.global.protocol).concat(a.a.global.url).concat(a.a.global.port,"/?");Object(i.a)(t,(function(e,o){var i=o<t.length-1?"&":"";n+="".concat(e.name,"=").concat(e.value).concat(i)})),window.history.pushState({},document.title,n)},m=function(){var t,n=[],e={},i=window.location.search,c=new URLSearchParams(i).entries(),a=Object(o.a)(c);try{for(a.s();!(t=a.n()).done;){var r=t.value;n.push({name:r[0],value:r[1]}),e[r[0]]={name:r[0],value:r[1]}}}catch(l){a.e(l)}finally{a.f()}return{array:n,dic:e}},v=function(t){var n="",e=0;for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&t[o]&&(n+="".concat(0===e?"":"&").concat(o.toLowerCase(),"=").concat(t[o]),e++);return n},w=function(t){try{var n=new XMLHttpRequest;return n.open("HEAD",t.url,!1),n.send(),404!==n.status?t.onSuccess():t.onFail()}catch(e){t.onFail(e)}}},73:function(t,n,e){"use strict";e.d(n,"c",(function(){return s})),e.d(n,"d",(function(){return g})),e.d(n,"a",(function(){return m})),e.d(n,"b",(function(){return v}));var o=e(30),i=e(11),c=e(13),a=e(28),r=e(9),l=e(45),s=function(t,n,e){return Object(l.a)({file:t,windowId:n,pattern:o.a.linklink,replacement:function(t){var o=e||!1,i=t.matchs,c=document.createElement("span");c.classList.add("note-link-mdpreview-wrapper"),c.classList.add("note-link-wrapper");var a=i[2],r=i[1],l=null;if(a.includes("|")){var s=a.split("|");a=s[0],l=s[1]}var u=m(r,a,l,n,o);return c.innerHTML="".concat(u),c}})},u=function(t){if(t){g(),f++;var n=t.dataset.file,e=t.dataset.folder,o=(t.dataset.searchedstring,t.dataset.windowid||"active");n&&e&&o&&Object(i.d)((function(t){t.ui.browser.goTo(e,n,{openIn:o})}))}},p=function(t){if(t&&"desktop"===Object(c.a)()){var n=t.getBoundingClientRect(),e=[n.left+window.scrollX,n.top+window.scrollY],o=t.dataset.file,a=t.dataset.folder,r=t.dataset.searchedstring,l=t.dataset.windowid,s="".concat(a).concat(o);"preview-popup"!==l&&(Object(i.d)((function(t){t.ui.notePreviewPopup.close()})),h(s,e,r,l))}},d=null,f=0,b=function(t){t.dataset.windowid;g()},g=function(t){d&&clearTimeout(d),f++,t&&setTimeout((function(){f++}),700)},h=function(t,n,e,o){var c=++f;d&&clearTimeout(d),d=setTimeout((function(){f===c&&(""===e&&(e=null),Object(i.d)((function(i){i.ui.notePreviewPopup.open(t,n,{windowIdToOpenIn:o,searchedString:e})})))}),700)},m=function(t,n,e,o,i){var c=t;if(e){var r=e.length>20?e.substring(0,20)+"...":e;c="".concat(t," > ").concat(r)}return'<a\n\t\tonclick="'.concat(Object(a.c)("open-link-page",u),'"\n\t\tonmouseenter="').concat(i&&Object(a.c)("hover-link-page-enter",p),'"\n\t\tonmouseleave="').concat(i&&Object(a.c)("hover-link-page-leave",b),'"\n\t\tclass="title-search-link preview-link" \n\t\tdata-file="').concat(t,'" \n\t\tdata-folder="').concat(n,'" \n\t\tdata-searchedstring="').concat(e||"",'"\n\t\tdata-windowid="').concat(o,'">').concat(c,"</a>")},v=function(t){return t||(t=""),"\n\t\t\t.preview-link {\t\t\t\t\t\t\t\n\t\t\t\tfont-weight: 800;\n\t\t\t\tbackground-repeat: no-repeat;\n\t\t\t\tbackground-position: 4px 2px;\n\t\t\t\tpadding-left: 20px;\n\t\t\t\tbackground-size: 10px;\n\t\t}\n\n\t\t".concat(t,".external-link {\n\t\t\t\tbackground-image: url(").concat(r.a.assets.worldIcon,");\n\t\t}\n\t\t").concat(t,".search-link {\n\t\t\t\tcolor: ").concat(r.a.colors.main,";\n\t\t\t\tbackground-image: url(").concat(r.a.assets.searchIcon,");\n\t\t}\n\t\t").concat(t,".title-search-link {\n\t\t\t\ttransition: 1s all;\n\t\t\t\tbackground-color: rgba(0,0,0,0);\n\t\t\t\t&:hover {\n\t\t\t\t\tcolor: white;\n\t\t\t\t\tbackground-color: ").concat(r.a.colors.main,";\n\t\t\t\t}\n\t\t\t\t&.popup-link {\n\t\t\t\t\tposition: relative;\n\t\t\t\t\tz-index: 99;\n\t\t\t\t}\n\t\t\t\tcolor: ").concat(r.a.colors.main,";\n\t\t\t\tbackground-image: url(").concat(r.a.assets.linkIcon,");\n\t\t\t\tcursor: pointer;\n\t\t}\n\t\t").concat(t,".resource-link {\n\t\t\t\tcolor: ").concat(r.a.colors.main,";\n\t\t} ")}},78:function(t,n,e){"use strict";e.d(n,"a",(function(){return h})),e.d(n,"c",(function(){return m})),e.d(n,"b",(function(){return v}));var o=e(5),i=e(566),c=e(0),a=e(13),r=e(92),l=e(9),s=e(159),u=e(160),p=e(63),d=e(88),f=e(73),b=e(24),g=e(1),h=function(t){var n={wrapper:Object(c.useRef)(null),main:Object(c.useRef)(null)},e=t.file.path.split("/");e.pop();e.join("/");Object(c.useEffect)((function(){setTimeout((function(){t.onMaxYUpdate(a())}),1e3)}),[t.fileContent]);var a=function(){var t=n.main.current;return 2*((null===t||void 0===t?void 0:t.clientHeight)||3e3)},l=Object(c.useState)([]),s=Object(o.a)(l,2),d=s[0],f=s[1];return Object(c.useEffect)((function(){var n=r.b.chunks.chunk(t.fileContent);f(n),setTimeout((function(){r.b.injectLogic({fileContent:t.fileContent,file:t.file})}),100),setTimeout((function(){p.a.updatePreviewDims(t.windowId),p.a.updateScrollerDims(t.windowId),setTimeout((function(){p.a.updatePreviewDims(t.windowId),p.a.updateScrollerDims(t.windowId)}),100)}),100)}),[t.fileContent,t.file.path,t.windowId]),Object(g.c)("div",{className:"preview-area-wrapper render-latex",onWheelCapture:function(n){p.a.onPreviewScroll(t.windowId)}},Object(g.c)("div",{className:"preview-area",ref:n.wrapper,style:{bottom:function(){var n=a(),e=t.posY+0;return Object(i.a)(e,0,n)}()}},Object(g.c)("div",{className:"preview-area-transitions"},Object(g.c)("div",{className:"infos-preview-wrapper"},Object(g.c)("div",{className:"file-path-wrapper"},t.file.path.replace("/".concat(t.file.name),"")),Object(g.c)("h1",{className:"title big-title"},t.file.name.replace(".md",""))),Object(g.c)("div",{className:"content-blocks-wrapper"},Object(g.c)("div",{className:"simple-css-wrapper"},Object(g.c)("div",{className:"preview-area-full-height-content"},d.map((function(n,e){return Object(g.c)(u.a,{key:e,index:e,block:n,windowId:t.windowId,file:t.file,reactOnHeightResize:t.reactOnHeightResize,yCnt:t.yCnt,onIframeMouseWheel:t.onIframeMouseWheel})}))))))))},m=function(t){return t||(t={w:".simple-css-wrapper",pl:".preview-link",r:".resource-link-icon"}),"\n\n\t\thtml, body {\n\t\t\t\tmargin: 0px;\n\t\t\t\tpadding: 0px;\n\t\t}\n\n\t\t".concat(t.w," {\n\t\t\t\tcolor: ").concat(l.a.colors.editor.font,";\n\t\t\t\tline-height: 19px;\n\t\t\t\tfont-size:").concat(Object(b.a)(1),"px;\n\t\t\t\tfont-family:").concat(l.a.font.main,";\n\t\t}\n\n\t\tbutton,\n\t\tinput {\n\t\t\t\tfont-family:").concat(l.a.font.main,";\n\t\t\t\tfont-weight: 700;\n\t\t\t\tcolor: ").concat(l.a.colors.l2.title,";\n\t\t}\n\n\t\t/**********************************************************\n\n\t\t// COUNTER TITLES\n\n*********************************************************/\n\n\t\t").concat(t.w,' {\n\t\t\t\toverflow-wrap: break-word;\n\t\t\t\tcounter-reset: sh1 ;\n\t\t}\n\n\n\t\th1:before {\n\t\t\t\tcontent: ""counter(sh1)" \u2219 ";\n\t\t\t\tcounter-increment: sh1;\n\t\t}\n\t\th1 {\n\t\t\t\tcounter-reset: sh2;\n\t\t}\n\n\t\th2:before {\n\t\t\t\tcontent: ""counter(sh1)"." counter(sh2)" \u2219 ";\n\t\t\t\tcounter-increment: sh2;\n\t\t}\n\t\th2 {\n\t\t\t\tcounter-reset: sh3;\n\t\t}\n\n\t\th3:before {\n\t\t\t\tcontent: ""counter(sh1)"." counter(sh2)"."counter(sh3)" \u2219 ";\n\t\t\t\tcounter-increment: sh3;\n\t\t}\n\t\th3 {\n\t\t}\n\n\n\n\t\t/**********************************************************\n\n\t\t// BASIC STYLE\n\n**********************************************************/\n\n\t\ta {\n\t\t\t\tcolor: ').concat(l.a.colors.main,";\n\t\t}\n\n\t\t.main-color, .main-color:before, .main-color:after {\n\t\t\t\tcolor: ").concat(l.a.colors.main,";\n\t\t}\n\t\t.title {\n\t\t\t\tmargin: 0px 0px;\n\t\t}\n\n\t\th1:before, h2:before, h3:before, h4:before, h5:before, h6:before {\n\t\t\t\tcolor: ").concat(l.a.colors.main,";\n\t\t}\n\t\th1, h2, h3, h4, h5, h6 {\n\t\t\t\tposition:relative;\n\t\t\t\tcolor: ").concat(l.a.colors.main,';\n\t\t\t\tmargin-top: 0px;\n\t\t\t\tline-height: normal;\n\t\t\t\tmargin-right: 10px;\n\t\t}\n\t\th1:after,\n\t\th2:after {\n\t\t\t\t// LONG LINE STYLE\n\t\t\t\t// content: "-";\n\t\t\t\t// background: ').concat(l.a.colors.main,";\n\t\t\t\t// width: 100%;\n\t\t\t\t// height: 2px;\n\t\t\t\t// position: absolute;\n\t\t\t\t// bottom: 0px;\n\t\t\t\t// left: 0px;\n\t\t\t\t// font-size: 0px;\n\t\t\t\t/* opacity: 0.4; */\n\t\t}\n\t\th2:after {\n\t\t\t\t/* width: 70%; */\n\t\t\t\theight: 1px;\n\t\t}\n\t\th1 {\n\t\t\t\tpadding: 5px;\n\t\t\t\t/* border-bottom: 2px solid; */\n\t\t\t\tmargin-top: 30px;\n\t\t\t\tmargin-bottom: 20px;\n\t\t}\n\t\th2 {\n\t\t\t\tpadding: 5px;\n\t\t\t\t/* border-bottom: 1px solid; */\n\t\t}\n\t\th2, h3, h4, h5, h6 {\n\t\t\t\tmargin-bottom: 10px;\n\t\t\t\tmargin-top: 25px;\n\t\t}\n\n img,\n .content-image {\n\t\t\t\tcursor: pointer;\n }\n\t\t\t.content-image-img {\n\t\t\t\t\t").concat(l.a.els().images,"\n\t\t\t\t\tcursor: pointer;\n\t\t\t}\n\n p {\n\t\t\t\t//display: inline;\n }\n\n\n\t\t/**********************************************************\n\n\t\t// LIST\n\n**********************************************************/\n\t\t.no-css ul li {\n\t\t\t\tbackground: none!important;\n\t\t\t\tpadding: 0px;\n\t\t}\n\n\t\tul {\n\t\t\t\tpadding: 0px;\n\t\t\t\tlist-style-image: \"./custom_icons/view-1.svg\"; \n\t\t\t\tlist-style: none; \n\t\t}\n\n\t\tul li {\n\t\t\t\tpadding-left: 12px;\n\t\t}\n\t\tul li:before {\n\t\t\t\tcontent: '-';\n\t\t\t\tcolor: ").concat(l.a.colors.main,";\n\t\t\t\twidth: 10px;\n\t\t\t\tdisplay: inline-block;\n\t\t\t\tfont-size: ").concat(Object(b.a)(5),"px;\n\n\t\t\t\t/* background-image: url(./custom_icons/line.svg); */\n\t\t\t\t/* background-repeat: no-repeat; */\n\t\t\t\t/* background-position: -3px 4px; */\n\t\t\t\t/* background-size: 11px; */\n\n\t\t\t\t/* background-image: url(./custom_icons/line.svg); */\n\t\t\t\t/* background-repeat: no-repeat; */\n\t\t\t\t/* background-color: ").concat(l.a.colors.main,'; */\n\t\t\t\t/* -webkit-mask-position: -3px 4px; */\n\t\t\t\t/* -webkit-mask-size: 11px; */\n\t\t\t\t/* -webkit-mask-image: url(./custom_icons/line.svg); */\n\t\t\t\t/* -webkit-mask-repeat: no-repeat; */\n\t\t}\n\t\tul li p {\n\t\t\t\tmargin: 0px;\n\t\t}\n\n\t\tul input[type=checkbox] {\n\t\t\t\tposition: relative;\n\t\t\t\twidth: 0px;\n\t\t\t\theight: 10px;\n\t\t\t\tmargin-right: 9px\n\t\t}\n\t\tul input[type=checkbox]:before {\n\t\t\t\tcontent: "";\n\t\t\t\tdisplay: block;\n\t\t\t\tposition: absolute;\n\t\t\t\twidth: 15px;\n\t\t\t\theight: 15px;\n\t\t\t\ttop: 0px;\n\t\t\t\tleft: -4px;\n\n\t\t\t\tbackground-color: ').concat(l.a.colors.main,";\n\t\t\t\t/* background-image: url(./custom_icons/check.svg); */\n\t\t\t\t/* background-repeat: no-repeat; */\n\t\t\t\t/* background-size: contain; */\n\t\t\t\tmask-position: -2px -1px;\n\t\t\t\tmask-image: url(./custom_icons/check.svg);\n\t\t\t\tmask-size: contain;\n\t\t\t\tmask-repeat: no-repeat;\n\n\t\t\t\t-webkit-mask-position: -2px -1px;\n\t\t\t\t-webkit-mask-image: url(./custom_icons/check.svg);\n\t\t\t\t-webkit-mask-size: contain;\n\t\t\t\t-webkit-mask-repeat: no-repeat;\n\t\t}\n\t\tul input[type=checkbox]:checked:before {\n\t\t\t\t/* background-color: red; */\n\t\t\t\t/* -webkit-mask-image: url(./custom_icons/uncheck.svg); */\n\t\t\t\t/* mask-image: url(./custom_icons/uncheck.svg); */\n\t\t\t\t/* background-image: url(./custom_icons/uncheck.svg); */\n\n\t\t\t\t/* background-color: red; */\n\t\t\t\t/* -webkit-mask-image: url(./custom_icons/uncheck.svg); */\n\t\t\t\t/* mask-image: url(./custom_icons/uncheck.svg); */\n\t\t\t\tmask-image: url(./custom_icons/uncheck.svg);\n\t\t\t\t-webkit-mask-image: url(./custom_icons/uncheck.svg);\n\n\t\t}\n\n\t\t/**********************************************************\n\n\t\t PREVIEW LINK\n\n**********************************************************/\n\n\n\t\t").concat(Object(f.b)(t.pl),"\n\n\t\t/**********************************************************\n\n\t\t// TABLE\n\n**********************************************************/\n\n\t\ttable {\n\t\t\t\tmargin: 10px 0px;\n\t\t\t\tpadding 15px;\n\t\t\t\tborder-spacing: 0;\n\t\t\t\tborder-collapse: collapse;\n\t\t}\n\n\n\t\tth {\n\t\t\t\ttext-align: left;\n\t\t\t\tpadding: 10px 10px;\n\t\t}\n\t\ttd {\n\t\t\t\tpadding: 5px 10px;\n\t\t}\n\t\tthead tr {\n\t\t\t\tbackground: #e4e3e3;\n\t\t}\n\t\tth, td {\n\t\t\t\tborder: 1px solid #ccc;\n\t\t}\n\t\ttbody {\n\t\t}\n\t\t// tbody tr:nth-child(even) {background: #CCC}\n\t\t// tbody tr:nth-child(odd) {background: #EEE}\n\n\t\t/**********************************************************\n\n\t\t// RESSOURCE LINK\n\n**********************************************************/\n\t\t").concat(Object(d.b)(),"\n\n\t\tpre {\n\t\t}\n\n\t\tpre code {\n\t\t\t\tdisplay: block;\n\t\t\t\tborder-radius: 8px;\n\t\t\t\tbackground: #d2d2d2;\n\t\t\t\tpadding: 11px 23px;F\n\t\t}\n\t\t")},v=function(){return"\n\n\n.preview-area {\n\t\tmargin-top: 0px;\n \t.infos-preview-wrapper {\n\t\t\t\tborder-bottom: 1px solid rgba(0 0 0 / 5%);\n \t\tdisplay: ".concat(Object(a.c)("desktop")?"none":"block",";\n\t\t\t\tpadding: 14px 0px 14px 0px;\n\t\t}\n}\n.preview-area {\n position: relative;\n display: block;\n\toverflow: auto; \n\twidth: calc(100% );\n padding-right: 30px;\n\n\t//@TODO padding preview area\n\t.content-block.block-text {\n\t\tpadding-left: 10px;\n\t\tpadding-right: 20px;\n\t\tdisplay: block;\n\t}\n\n ").concat(Object(s.b)(),"\n\n\t.infos-preview-wrapper h1.big-title {\n\t\t\twidth: calc(100% - 65px);\n\t\t\tfont-family: ").concat(l.a.font.editor,";\n\t\t\tcolor: grey;\n\t\t\tfont-size: ").concat(Object(b.a)(5),"px;\n\t\t\tmargin: 0px;\n\t\t\tpadding: 0px 14px;\n\t}\n}\n.content-blocks-wrapper {\n\t\t").concat(m(),"\n}\n.view-both .preview-area {\n\t\t// margin-top: 20px;\n\t\tmargin-top: 0px;\n}\n\n.preview-area-wrapper {\n\theight: calc(100% - 35px);\n margin-top: ").concat(Object(a.c)("desktop")?"140":"0","px;\n}\n\n.preview-area, .preview-area-transitions, .content-blocks-wrapper, .simple-css-wrapper { height: 100%; }\n\n")}},84:function(t,n,e){"use strict";e.d(n,"a",(function(){return o}));var o=function(t){var n="none",e=t.split(".");return"7z"===(n=e[e.length-1].split("?")[0])&&(n="d7z"),n.length>5&&(n="none"),n}},88:function(t,n,e){"use strict";e.d(n,"a",(function(){return h})),e.d(n,"b",(function(){return v}));e(25),e(0);var o=e(29),i=e(18),c=e(13),a=e(84),r=e(28),l=e(71),s=e(65),u=e(9),p=e(41),d=e(11),f=e(24),b=e(1),g=400,h=function(t){var n=t.markdownTag.split("](")[1].slice(0,-1),e=t.markdownTag.split("](")[0].replace("![",""),u="".concat(Object(p.a)(t.file.folder),"/").concat(n).concat(Object(i.c)()),f="".concat(e,".").concat(Object(a.a)(n)),g=Object(o.b)(u),h="ress-".concat(Object(s.b)(g));Object(r.a)(t.file,g,(function(){var n=document.querySelector(".".concat(h," .iframe-wrapper"));n&&v(g,n,t.file.path)}));var m=r.d,v=function(n,e,i,s){var u=(null===s||void 0===s?void 0:s.fullscreen)||!1;null===s||void 0===s||s.fullscreen;if(e){var p=Object(o.d)(i);if(null!==s&&void 0!==s&&s.persist){var d=e.querySelector("iframe")?"closed":"open";Object(r.b)(p,n,d)}var f=function(){e.innerHTML=""},b="mobile"===Object(c.a)()?-300:-100;"epub"===Object(a.a)(n).toLocaleLowerCase()?Object(l.c)(e,Object(l.b)("epub",n,t.windowId,{file:p,fullscreen:u,onFullscreenClose:f,ctagHeightOffset:b}),null===s||void 0===s?void 0:s.openOnly):"pdf"===Object(a.a)(n).toLocaleLowerCase()?Object(l.c)(e,Object(l.b)("pdf",n,t.windowId,{file:p,fullscreen:u,onFullscreenClose:f,ctagHeightOffset:b}),null===s||void 0===s?void 0:s.openOnly):Object(l.c)(e,Object(l.b)("iframe",n,t.windowId,{fullscreen:u,onFullscreenClose:f,ctagHeightOffset:b}))}},O='<li title="Open link in detached window"\n\t\tonclick="'.concat(Object(r.c)("open-win-ress",(function(t){if(t){var n=t.dataset.link;window.open(n,"popup-preview-link","width=800,height=1000")}})),'"\n\t\tdata-link="').concat(g,'">').concat(m("up-right-from-square"),"</li>"),j='<li\n\t\tonclick="'.concat(Object(r.c)("preview-link-ress",(function(t){return function(t,n){if(t){var e=t.dataset.link,o=t.dataset.filepath,i=function(t){return t.parentNode.parentNode.parentNode.parentNode.parentNode.querySelector(".iframe-wrapper")}(t);v(e,i,o,n)}}(t,{persist:!0})})),'"\n\t\ttitle="Toggle a pinned preview" \n\t\tdata-filepath="').concat(t.file.path,'" \n\t\tdata-link="').concat(g,'">').concat(m("eye"),"</li>"),x='<li\n\t\tonclick="'.concat(Object(r.c)("download-link-ress",(function(t){if(t){var n=t.dataset.link,e=t.dataset.filename;console.log(u,f),w(e,n)}})),'"\n\t\ttitle="Preview link" data-filename="').concat(f,'" data-link="').concat(g,'">').concat(m("download"),"</li>"),k="<ul>".concat(j," ").concat(O," ").concat(x,"</ul>"),y='<div \n\t\tclass="ressource-link-label" \n\t\tdata-filepath="'.concat(t.file.path,'" \n\t\tdata-link="').concat(g,'" \n\t\tonclick="').concat(Object(r.c)("click-ress-main-action",(function(t){if(t){var n=t.dataset.link,e="iframe",o=Object(a.a)(n).toLocaleLowerCase();"epub"===o&&(e="epub"),"pdf"===o&&(e="pdf"),Object(d.d)((function(t){t.ui.floatingPanel.create({type:"ctag",layout:"full-center",ctagConfig:{tagName:e,content:n}})}))}})),'">\n\t\t\t').concat(e," (").concat(Object(a.a)(g),")\n\t\t</div>").split("\n").join("");return Object(b.c)("div",{className:"".concat(h," resource-link-iframe-wrapper")},Object(b.c)("div",{className:" resource-link-wrapper device-".concat(Object(c.a)())},Object(b.c)("div",{className:"resource-link-icon ".concat(Object(a.a)(g))}),Object(b.c)("div",{className:"resource-link-content-wrapper"},Object(b.c)("div",{dangerouslySetInnerHTML:{__html:y}}),Object(b.c)("div",{dangerouslySetInnerHTML:{__html:k},className:"buttons-wrapper"}))),Object(b.c)("div",{className:"iframe-wrapper"}))},m=".resource-link-icon",v=function(){return"\n.loading-string {\n text-align: center;\n padding: 50px;\n}\n.ressource-link-label {\n\t\tfont-weight: bold;\n\t\tcursor: pointer;\n}\n.resource-link-ctag {\n\t\t// height: ".concat(g-21,"px;\n\t\tmin-height: 120px;\n\t\toverflow:hidden;\n\t\twidth: 100%;\n\t\tborder:none;\n}\n.resource-link-iframe {\n\t\tborder: none;\n\t\twidth: 100%;\n}\n\n.resource-link-wrapper,\n.resource-link-wrapper a {\n\t\tcolor: ").concat(u.a.colors.main,";\n}\n.resource-link-iframe-wrapper {\n\t\tbackground: #f7f6f6;\n\t\tborder-radius: 5px;\n\t\toverflow:hidden;\n}\n.preview-area-wrapper .resource-link-iframe-wrapper {\n\t\tmargin-top: 3px;\n\t\tbackground:#eee!important;\n}\n\n.resource-link-wrapper {\n\t\tpadding: 7px;\n\t\tborder-radius: 10px;\n\t\tposition: relative;\n\t\tmargin: 5px 0px;\n}\n\n.buttons-wrapper {\n\t\tposition: relative;\n\t\ttop: -10px;\n\t\theight: 10px;\n}\n.resource-link-content-wrapper .ssr-icon {\n\t\tpadding: 3px;\n\t\tfont-size: ").concat(Object(f.a)(3),"px;\n\t\tmargin: 0px 5px 0px 0px;\n\t\tcolor: #b9b9b9;\n\t\tcursor: pointer;\n}\n.resource-link-content-wrapper .ssr-icon:hover {\n\t\tcolor:grey;\n}\n\n.mdpreview-source {\n\t\t// display:none!important;\n}\n\n.resource-link-icon {\n\t\ttop: 10px;\n\t\tleft: 19px;\n\t\twidth: 12px;\n\t\theight: 27px;\n\t\tdisplay: inline-block;\n\t\tbackground-image: url(/static/media/file-solid.6415173e.svg);\n\t\topacity: 0.08;\n\t\tposition: absolute;\n\t\tbackground-repeat: no-repeat;\n\t\ttransform: scale(1.5);\n\t\tbackground-image: url(").concat(u.a.assets.fileIcon,");\n}\n\n").concat(m,".epub, ").concat(m,".cbr, ").concat(m,".cbz,").concat(m,".mobi, ").concat(m,".azw, ").concat(m,".azw3, ").concat(m,".iba {background-image: url(").concat(u.a.assets.bookIcon,"); }\n").concat(m,".pdf\n{background-image: url(").concat(u.a.assets.pdfIcon,"); }\n\n").concat(m,".xls, ").concat(m,".xlsm, ").concat(m,".xlsx, ").concat(m,".ods\n{background-image: url(").concat(u.a.assets.excelIcon,"); }\n\n").concat(m,".avi, ").concat(m,".flv, ").concat(m,".h264, ").concat(m,".m4v, ").concat(m,".mov, ").concat(m,".mp4, ").concat(m,".mpg, ").concat(m,".mpeg, ").concat(m,".rm, ").concat(m,".swf, ").concat(m,".vob, ").concat(m,".wmv, ").concat(m,".mkv\n{background-image: url(").concat(u.a.assets.videoIcon,"); }\n\n").concat(m,".d7z, ").concat(m,".arj, ").concat(m,".deb, ").concat(m,".rar, ").concat(m,".gz, ").concat(m,".zip, ").concat(m,".rpm, ").concat(m,".pkg\n{background-image: url(").concat(u.a.assets.archiveIcon,");}\n\n").concat(m,".aif, ").concat(m,".mp3, ").concat(m,".cda, ").concat(m,".mid, ").concat(m,".mpa, ").concat(m,".ogg, ").concat(m,".wav, ").concat(m,".wpl, ").concat(m,".wma, ").concat(m,".midi\n{background-image: url(").concat(u.a.assets.audioIcon,"); }\n\n").concat(m,".doc, ").concat(m,".docx, ").concat(m,".odt, ").concat(m,".txt\n{background-image: url(").concat(u.a.assets.wordIcon,"); }\n\n").concat(m,".html, ").concat(m,".css, ").concat(m,".js, ").concat(m,".json, ").concat(m,".ts, ").concat(m,".jsx, ").concat(m,".tsx\n{background-image: url(").concat(u.a.assets.codeIcon,"); }\n\n").concat(m,".bin, ").concat(m,".dmg, ").concat(m,".iso, ").concat(m,".toast, ").concat(m,".vcd\n{\n\t\ttop: 19px;\n\t\ttransform: scale(1.8);\n\t\tbackground-image: url(").concat(u.a.assets.diskIcon,");\n}\n\n").concat(m,".ppt, ").concat(m,".pptx, ").concat(m,".odp, ").concat(m,".key, ").concat(m,".pps\n{background-image: url(").concat(u.a.assets.presIcon,"); }\n\n\n.resource-link-content-wrapper {\n\t\tdisplay: flex;\n\t\tjustify-content: space-between;\n}\n\n.resource-link-content-wrapper {\n}\n\n.resource-link-content-wrapper ul {\n\t\tpadding-left: 7px;\n\t\tdisplay: flex;\n}\n.resource-link-content-wrapper ul li {\n\t\tlist-style: none;\n\t\tpadding-left: 0px;\n}\n.resource-link-content-wrapper ul li:before {\n\t\tdisplay: none;\n}\n\n\n// HIDING IT ON DESKTOP \n// .device-desktop .resource-link-wrapper:hover .resource-link-content-wrapper ul {\n// \t\topacity:1;\n// \t\twidth: 90px;\n// \t\t// margin-top: 15px;\n// \t\tpointer-events: all;\n// }\n// .device-desktop .resource-link-content-wrapper ul {\n// \t\topacity: 0;\n// \t\twidth: 0px;\n// \t\ttransition: 0.2s all;\n// \t\ttransition-delay: 0.2s, 0s;\n// \t\tpointer-events: none;\n// }\n.device-desktop .resource-link-wrapper .resource-link-content-wrapper ul {\n\t\topacity:1;\n\t\twidth: 90px;\n\t\tpointer-events: all;\n}\n\n")},w=function(t,n){var e=document.createElement("a");e.style.display="none",document.body.appendChild(e),e.href=n,e.target="_blank",e.setAttribute("download",t),e.click(),window.URL.revokeObjectURL(e.href),document.body.removeChild(e)}},89:function(t,n,e){"use strict";e.d(n,"b",(function(){return r})),e.d(n,"a",(function(){return l}));var o=e(5),i=e(25),c=e(376),a=e(0),r=function(){var t=Object(a.useState)([]),n=Object(o.a)(t,2),e=n[0],r=n[1],s=Object(a.useState)(0),u=Object(o.a)(s,2),p=u[0],d=u[1];return{lightboxApi:{open:function(t,n){var e=[];Object(i.a)(n,(function(t){if(Object(c.a)(t)){var n={file:l(),title:"",url:t};e.push(n)}else e.push(t)})),r(e),d(t)},close:function(){r([]),d(0)}},lightboxImages:e,lightboxIndex:p}},l=function(t,n){return{nature:"file",name:t||"",realname:"",path:n||"",folder:""}}},9:function(t,n,e){"use strict";e.d(n,"a",(function(){return w}));e(423),e(424),e(425),e(426);var o=e.p+"static/media/deco-bg-map.7ca9103b.png",i=e.p+"static/media/file-solid.6415173e.svg",c=e.p+"static/media/compact-disc-solid.55b6e50c.svg",a=e.p+"static/media/file-pdf-solid.0a9d75fe.svg",r=e.p+"static/media/file-word-solid.9228e1ff.svg",l=e.p+"static/media/file-code-solid.62b467ac.svg",s=e.p+"static/media/book-solid.87f5b737.svg",u=e.p+"static/media/file-excel-solid.217d73db.svg",p=e.p+"static/media/file-video-solid.312288cf.svg",d=e.p+"static/media/file-audio-solid.a76f99f0.svg",f=e.p+"static/media/file-zipper-solid.7db57917.svg",b=e.p+"static/media/file-powerpoint-solid.4d969453.svg",g=e.p+"static/media/link-solid.7b689dbd.svg",h=e.p+"static/media/globe-africa-solid.0ad34146.svg",m=e.p+"static/media/search-solid.cc51b702.svg",v={main:"#E86666",mainFont:"#FFFFFF",bgPopup:"#FFF",bgPopup2:"#f9f9f9",bgPopup3:"#f5efef",bgTabs:"#D8D8D8",bgTab:"#D0D0D0",fontTab:"#797979",bgTabActive:"#EFEFEF",bgInterface:"#efefef",fontInterface:"#323232",bgInterface2:"#e1e1e1",fontInterface2:"#585757",bgEditor:"#FFFFFF",bgPreview:"#F7F7F7",fontEditor:"#323232",dev:["#C3668B","#A766A7","#CE66E8","#E4E866"],compl:["#11abf8","#3fd7a4"],pal1:["#5c1a70","#ffa67c","#ffda77"],grey1:"#797979",grey2:"red",green:"green",l1:{bg:"#e1e1e1",font:"#615f5f"},l2:{bg:"#eeecec",title:"#797979",text:"#615f5f",date:"#b3b2b2"},editor:{bg:"#ffffff",font:"#525252",interfaceGrey:"#d4d1d1",mobileToolbar:{bg:"#e1e1e1",font:"#747474"}},bg:{l1:"#e1e1e1",dark:"rgb(39, 39, 39)",grey:"rgb(221, 221, 221)",light:"#FFFFFF",black:"#000000"},font:{light:"#FFFFFF",black:"#000000"}},w={els:function(){return{button:"\n\t\tbackground: none;\n border: none;\n ",images:"\n\t\tborder-radius: 7px;\n box-shadow: 0px 0px 10px rgb(0 0 0 / 10%);\n max-width: 100%;\n ",imageInfos:"\n ",redButton:"\n\t\t\tborder: none;\n\t\t\tbackground: ".concat(v.main,";\n\t\t\t&:hover {\n\t\t\t\t\topacity: 0.9;\n\t\t\t}\n\t\t\tcolor: white;\n\t\t\tborder-radius: 5px;\n\t\t\tmargin-right: 5px;\n\t\t\tcursor: pointer;\n\t\t\tfont-weight: 700;\n\t\t\ttext-transform: uppercase;\n\t\t\tletter-spacing: 1px;\n ")}},colors:v,font:{main:"Helvetica neue, Open sans, arial, sans-serif",editor:"Consolas, monaco, monospace"},sizes:{desktop:{l:37,l1:37,l2:63,r:63},search:{h:94,padding:10},gallery:{topH:100},block:15,scrollbar:17,l2:{fileLi:{height:77,padding:5,margin:5,img:67}},editor:{padding:45},mobile:{bottomBarHeight:50,editorBar:40,editorTopWrapper:100}},assets:{decoBgMap:o,linkIcon:g,worldIcon:h,fileIcon:i,diskIcon:c,pdfIcon:a,presIcon:b,audioIcon:d,videoIcon:p,excelIcon:u,wordIcon:r,codeIcon:l,bookIcon:s,archiveIcon:f,searchIcon:m},anim:{time:"100ms"}}},91:function(t,n,e){"use strict";e.d(n,"b",(function(){return a})),e.d(n,"d",(function(){return r})),e.d(n,"c",(function(){return l})),e.d(n,"a",(function(){return u}));var o=e(15),i=e(25),c=e(421);c.setOptions({gfm:!0,breaks:!0,headerPrefix:"t-"});var a=function(t){var n=t;return n=c.parse(n)},r=function(t,n,e){var o=t,c=o.match(n)||"";return Object(i.a)(c,(function(t){o=o.replace(t,e(t))})),o},l=function(t,n,e){var o=t,i=n.replace("[[","").replace("]]",""),c="(?:\\[\\[".concat(i,"\\]\\])((?:[^]*))(?:\\[\\[").concat(i,"\\]\\])"),a=new RegExp(c,"gm"),r=o.match(a)||"";if(r[0]){for(var l=r[0].split(n),s=[],u=0;u<l.length;u++){var p=l[u];""!==p&&s.push(p)}for(var d=0;d<s.length;d++){s[d];if(d%2===0)try{s[d]=e(s[d])}catch(b){console.warn("[REPLACE CUSTOM MD TAGS] error: ".concat(b),s[d])}}var f=s.join("");o=o.replace(a,f)}return o},s=function t(n,e){var o=!1;if(Object(i.a)(n,(function(t){t.id===e&&(o=!0)})),o){var c=!1,a=[e[e.length-2],e[e.length-1]],r=e.slice(0,-2),l=parseInt(a[1]);return"-"!==a[0]||isNaN(l)||(c=!0),c?e="".concat(r,"-").concat(l+1):e+="-1",t(n,e)}return e},u=function(t){for(var n=[],e=t.split("\n"),i=[],c=0;c<e.length;c++){var a=e[c],r=Object(o.a)(a.matchAll(/([#]{1,9})\ (.+)/gi));if(r.length>0){var l=r[0],u=l[2].toLowerCase(),p=c,d=u.trim().split(" ").join("-").replace(/[^a-zA-Z0-9-_\xc0-\xfa]/gi,"");d=s(i,d),i.push({raw:a,matches:l,id:d,line:p,title:u,ranking:l[1].length}),n.push({id:d,title:u,line:p})}}return n}},92:function(t,n,e){"use strict";e.d(n,"a",(function(){return u})),e.d(n,"b",(function(){return f}));var o=e(10),i=e(25),c=e(30),a=e(99),r=e(91),l=e(41),s=function(t){var n=Object(o.a)({},t),e=n.raw,i=n.file,c=n.windowId;c||(c="");var s=Object(r.b)(Object(l.d)(i,c,Object(l.c)(i,Object(l.e)(Object(l.f)(c,Object(l.g)(e))))));return Object(a.d)(),s},u=function(t,cb){for(var n=document.getElementsByClassName(t),e=function(){var t=n[o];t.onclick=function(){cb(t)}},o=0;o<n.length;o++)e()},p=function(t){var n=t.split(c.a.userCustomTagManual),e=[],o=[],a=c.a.userCustomTag3,r=t.match(a)||"",l=[];Object(i.a)(r,(function(t){l.push(t)}));var s=null,u=-1,p=[],d=[],f={};if(Object(i.a)(l,(function(t){f[t]?f[t]=f[t]+1:f[t]=1})),Object(i.a)(f,(function(t,n){t>=2&&d.push(n)})),Object(i.a)(l,(function(t,e){if(d.includes(t))if(s){if(s===t){var i=[u+1,e+1];p.push.apply(p,i);for(var c=n.slice(i[0],i[1]),a=l.slice(u+1,e+1),r="",f=0;f<c.length;f++){var b=f===c.length-1?"":a[f];r+="".concat(c[f]).concat(b)}o.push({type:"tag",tagName:s.replace("[[","").replace("]]",""),content:r,start:u,end:e}),u=-1,s=null}}else s=t,u=e})),0===p.length)e.push({type:"text",content:t,start:0,end:1});else{p.unshift(0);for(var b=0;b<p.length;b+=2){var g=p[b];n[g]&&e.push({type:"text",content:n[g],start:g,end:g+1})}}for(var h=0===t.indexOf(l[0]),m=[],v=o.length>e.length?o.length:e.length,w=0;w<v;w++)h?(o[w]&&m.push(o[w]),e[w]&&m.push(e[w])):(e[w]&&m.push(e[w]),o[w]&&m.push(o[w]));return m},d=function(t){var n="";return Object(i.a)(t,(function(t){"text"===t.type?n+=t.content:"tag"===t.type&&(n+="[[".concat(t.tagName,"]]").concat(t.content,"[[").concat(t.tagName,"]]"))})),n},f={render:function(t){var n=Object(o.a)({},t),e=n.raw,c=n.file,a=n.windowId;a||(a="");var r=p(e);return Object(i.a)(r,(function(t){"text"===t.type&&(t.content=s({raw:t.content,file:c,windowId:a})),"tag"===t.type&&(t.content=Object(l.b)(t.content))})),d(r)},injectLogic:function(t){},chunks:{chunk:p,merge:d}}},93:function(t,n,e){"use strict";e.d(n,"b",(function(){return c})),e.d(n,"a",(function(){return a})),e.d(n,"d",(function(){return r})),e.d(n,"c",(function(){return l}));var o=e(243),i=e(25),c=["Az","Crea","Modif"],a=["alphabetical","created","modified"],r=function(t,n){var e;switch(a[n]){case"alphabetical":default:e=Object(o.a)(t,[function(t){return t.realname.toLocaleLowerCase()}]);break;case"created":e=Object(o.a)(t,["created"]).reverse();break;case"modified":e=Object(o.a)(t,["modified"]).reverse()}return e},l=function(t){var n=t[0];return n?(Object(i.a)(t,(function(t){t.created&&n.created&&t.created>n.created&&(n=t)})),n):null}},95:function(t,n,e){"use strict";e.d(n,"a",(function(){return r})),e.d(n,"f",(function(){return s})),e.d(n,"g",(function(){return u})),e.d(n,"d",(function(){return p})),e.d(n,"b",(function(){return d})),e.d(n,"c",(function(){return f})),e.d(n,"e",(function(){return b}));var o=e(30),i=e(9),c=e(45),a=e(24),r={val:!1},l=r,s=function(t,n){return Object(c.a)({file:t,windowId:n,pattern:/\|/gim,classWrap:function(t){return"md-table-limiter"}})},u=function(t,n){return Object(c.a)({file:t,windowId:n,pattern:/t1.+t2/gim,classWrap:function(t){return"ttt4"}})},p=function(t,n){return Object(c.a)({file:t,windowId:n,pattern:o.a.mdTableCell,classWrap:function(t){var n=t[0];return n&&"-"===n||n&&"-|"===n?"":"md-table-cell"}})},d=function(t,n){return Object(c.a)({file:t,windowId:n,pattern:o.a.mdTitle,classWrap:function(t){var n=t[1].length;return"md-title-wrapper level-".concat(n)}})},f=function(t,n){return Object(c.a)({file:t,windowId:n,pattern:o.a.mdTableLine,classWrap:function(t){var n=t[0].trim();n.startsWith("|")&&(n=n.substring(1)),n.endsWith("|")&&(n=n.substring(0,n.length-1));var e=n.split("|").length;return l.val=!l.val,"md-table-line md-table-".concat(e," ").concat(l.val?"even":"")}})},b=function(){for(var t="",n=0;n<30;n++){var e=Math.floor(100/n);t+="\n\t\t\t\t&.md-table-".concat(n," span.md-table-cell{\n\t\t\t\t\t\twidth: calc(").concat(e,"% - 15px);\n\t\t\t\t}")}return"\n.md-title-wrapper {\n\tcolor: ".concat(i.a.colors.main,";\n\t\n\t&.level-1 {\n\t\tfont-size: ").concat(Object(a.a)(5),"px;\n\t\ttext-decoration: underline;\n\t\tfont-weight: bold;\n\t}\n\t&.level-2 {\n\t\tfont-size: ").concat(Object(a.a)(3),"px;\n\t\ttext-decoration: underline;\n\t\t// font-weight: bold;\n\t}\n\t&.level-3 {\n\t\tfont-size: ").concat(Object(a.a)(2),"px;\n\t}\n}\n.md-table-preview-enabled {\n\t\t.md-table-line {\n\t\t\t\t&.even {\n\t\t\t\t\t\tbackground: #e3e3e3;\n\t\t\t\t}\n\t\t\t\tdisplay: inline-flex;\n\n\t\t\t\tdisplay: block;\n\t\t\t\tbackground: #f4f4f4;\n\t\t\t\tpadding: 5px;\n\t\t\t\t").concat(t,"\n\t\t\t\tspan.md-table-cell {\n\t\t\t\t\t\tpadding-right:13px;\n\t\t\t\t\t\tposition: relative;\n\t\t\t\t\t\tdisplay: inline-block;\n\t\t\t\t\t\tvertical-align: top;\n\t\t\t\t}\n\t\t\t\tspan.md-table-cell:not(:has(> span)) {\n\t\t\t\t\t&:last-child{\n\t\t\t\t\t\tdisplay: none!important;\n\t\t\t\t\t}\n\t\t\t\t\t/* CSS rules */\n\t\t\t\t}\n\t\t\t\tspan.md-table-cell span.md-table-limiter {\n\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\ttop: 0px;\n\t\t\t\t\t\tright:0px;\n\t\t\t\t\t\tcolor: #c8c3c3;\n\t\t\t\t\t\tdisplay: inline-block;\n\t\t\t\t}\n\t\t\t\tspan.md-table-cell>span:first-child {\n\t\t\t\t\t\twidth: 100%;\n\t\t\t\t\t\ttext-align: right;\n\t\t\t\t}\n\n }\n\t\t.cm-activeLine {\n\t\t\t\t.md-table-line {\n\t\t\t\t\t\tbackground: #d9d9d9;\n\t\t\t\t\t\tspan.md-table-cell span.md-table-limiter {\n\t\t\t\t\t\t\t\tcolor: black;\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t}\n\t\t.cm-line .md-table-limiter {\n\t\t\t\tdisplay: inline;\n\t\t}\n\n}\n\t\t")}},99:function(t,n,e){"use strict";e.d(n,"b",(function(){return l})),e.d(n,"a",(function(){return d})),e.d(n,"e",(function(){return f})),e.d(n,"d",(function(){return b})),e.d(n,"c",(function(){return h}));var o=e(121),i=e(25),c=e(17),a=null,r=null,l=!1,s="[LATEX]",u=c.a.client.log.verbose,p=function(t,n){var e=document.createElement("script");e.src=t,e.crossorigin="anonymous",document.body.appendChild(e),e.onload=function(){n()}},d=function(){p("https://cdn.jsdelivr.net/npm/katex@0.15.2/dist/katex.min.js",(function(){p("https://cdn.jsdelivr.net/npm/katex@0.16.2/dist/contrib/auto-render.min.js",(function(){l=!0,a=window.katex,r=window.renderMathInElement}))})),function(t){var n=document.createElement("link");n.type="text/css",n.rel="stylesheet",n.href=t,document.body.appendChild(n)}("https://cdn.jsdelivr.net/npm/katex@0.15.2/dist/katex.css")},f=function(t){var n=t=t.replaceAll("$","");if(!a)return n;try{window.ka=a,n=a.renderToString(t)}catch(e){u&&console.log("LATEX ERR:",e)}return n},b=Object(o.a)((function(){u&&console.log(s,"REFRESH"),g(".render-latex")}),100),g=function(t){if(r){var n=document.querySelectorAll(t);if(!n)return console.warn(s,"no el found :",t);u&&console.log(s,n),Object(i.a)(n,(function(t){r(t,{delimiters:[{left:"$$",right:"$$",display:!0},{left:"$",right:"$",display:!1},{left:"\\(",right:"\\)",display:!0},{left:"[[l]]",right:"[[l]]",display:!0},{left:"\\[",right:"\\]",display:!0}],throwOnError:!1})}))}},h=function(){return"\n.katex-display {\n\t\tdisplay: inline;\n\t\t.katex {\n\t\t\t\tdisplay: inline;\n\t\t\t\t.katex-html {\n\t\t\t\t\t\tdisplay: inline;\n\t\t\t\t}\n\t\t}\n}\n"}}},[[562,11,12]]]);
1
+ (this["webpackJsonptiro-notes-client"]=this["webpackJsonptiro-notes-client"]||[]).push([[10],{101:function(t,n,e){"use strict";e.d(n,"b",(function(){return j})),e.d(n,"a",(function(){return k})),e.d(n,"c",(function(){return y}));var o=e(5),i=e(0),c=e(70),a=e(19),r=e(56),l=e(67),s=e(11),u=e(60),p=e(55),d=e(51),f=e(9),b=e(65),g=e(18),h=e(35),m=e(31),v=e(13),w=e(24),O=e(1),j=function(t){var n=localStorage.getItem("settings-".concat(t))||"";return Object(b.a)(n,[['"',""]])},x=function(t){return"<br/> <br/> Default value: ".concat(h.a[t].toString().replaceAll("\n","<br/>"))},k=function(t){var n="<br/> Requires interface reload",e=Object(c.a)("settings-backend-port",-1),f=Object(o.a)(e,2),b=f[0],v=f[1],w=Object(c.a)("settings-backend-protocol","same"),j=Object(o.a)(w,2),k=(j[0],j[1],Object(i.useContext)(s.a)),y=a.a.settingsPopup,_=[];if(k){var C=k.userSettings,E="".concat(window.location.protocol,"//"),S="".concat(E).concat(k.status.ipsServer.getLocal()).concat(d.a.global.port);"https://api.qrserver.com/v1/create-qr-code/?size=400x400&margin=50&data=".concat(S);_=[{title:"layout",fields:[{type:"text",title:"Main color",expl:"A color string like 'orange' or 'blue' or an Hex string like '#E86666' (tiro red) or '#729fc4'",var:C.get("ui_layout_colors_main"),modifier:function(t){C.set("ui_layout_colors_main",t)}},{type:"text",title:"Font color for main color",expl:"Font color for items with main color as background",var:C.get("ui_layout_colors_main_font"),modifier:function(t){C.set("ui_layout_colors_main_font",t)}},{type:"number",title:"Font size (desktop)",expl:"General font size for desktop"+x("ui_layout_general_font_size")+n,var:C.get("ui_layout_general_font_size"),max:20,min:5,modifier:function(t){C.set("ui_layout_general_font_size",t),L(!0)}},{type:"text",title:"Font family for interface",expl:"Font family for interface"+x("ui_layout_font_family_interface")+n,var:C.get("ui_layout_font_family_interface"),modifier:function(t){C.set("ui_layout_font_family_interface",t),L(!0)}},{type:"text",title:"Font family for editor",expl:"Font family for editor"+x("ui_layout_font_family_editor")+n,var:C.get("ui_layout_font_family_editor"),modifier:function(t){C.set("ui_layout_font_family_editor",t),L(!0)}},{type:"checkbox",title:"Enable Background Image",expl:"Enable Background Image"+n,var:C.get("ui_layout_background_image_enable"),modifier:function(t){C.set("ui_layout_background_image_enable",t),L(!0)}},{type:"checkbox",title:"Enable Background Video",expl:"Enable Background Video"+n,var:C.get("ui_layout_background_video_enable"),modifier:function(t){C.set("ui_layout_background_video_enable",t),L(!0)}},{type:"text",title:"Background image/video url",expl:"Background image/video url.<br>- it can start with http. <br> - You can also upload a picture in Tiro, then copy the uploaded image link here, in that case only keep the part without the hostname <br>(ex: 'static/_new/useful/.resources/wintersolstice.jpg'). <br> - you can add a youtube video/webcam stream in background by using the embed url like 'https://www.youtube-nocookie.com/embed/dQw4w9WgXcQ' or 'https://www.skaping.com/batz-sur-mer/plage-valentin' or even websites",var:C.get("ui_layout_background_image"),modifier:function(t){C.set("ui_layout_background_image",t),L(!0)}},{type:"number",title:"Windows opacity",expl:"If Background image, how opaque should the windows be (between 0 and 100)"+x("ui_layout_background_image_window_opacity")+n,var:C.get("ui_layout_background_image_window_opacity"),max:100,min:0,modifier:function(t){C.set("ui_layout_background_image_window_opacity",t),L(!0)}},{type:"number",title:"Active Windows opacity",expl:"If Background image, how opaque should the active windows be (between 0 and 100)"+x("ui_layout_background_image_window_opacity_active")+n,var:C.get("ui_layout_background_image_window_opacity_active"),max:100,min:0,modifier:function(t){C.set("ui_layout_background_image_window_opacity_active",t),L(!0)}},{type:"number",title:"background video width",expl:"background video width in percent (between 0 and 200)"+x("ui_layout_background_video_width")+n,var:C.get("ui_layout_background_video_width"),max:200,min:0,modifier:function(t){C.set("ui_layout_background_video_width",t),L(!0)}},{type:"number",title:"background video height",expl:"background video height percent (between 0 and 200)"+x("ui_layout_background_video_height")+n,var:C.get("ui_layout_background_video_height"),max:200,min:0,modifier:function(t){C.set("ui_layout_background_video_height",t),L(!0)}},{type:"checkbox",title:"Sidebar Shortcut Panel",expl:"Adds a shortcuts/scratchpad space in the sidebar. To edit it, create a note in '.tiro/shortcuts.md'",var:C.get("ui_layout_shortcuts_panel"),modifier:function(t){C.set("ui_layout_shortcuts_panel",t)}}]},{title:"editor",fields:[{type:"checkbox",title:"AI Suggest",expl:"Send the selected text as a question to an AI",var:C.get("ui_editor_ai_text_selection"),modifier:function(t){C.set("ui_editor_ai_text_selection",t)}},{type:"textarea",title:"AI Suggest command line",expl:"Which AI API command to be called, {{input}} will be replaced by the selection. <br/><br/> For ChatGPT, you need an <a href='https://platform.openai.com/account/api-keys' target='_blank'>api key</a> and enter the following command : "+"<br/><code>".concat(h.a.ui_editor_ai_command,"</code>"),var:C.get("ui_editor_ai_command"),modifier:function(t){C.set("ui_editor_ai_command",t)}},{type:"checkbox",title:"Markdown Tags",expl:"Displays #tag as clickable tag you can interact with "+n,var:C.get("ui_editor_markdown_tags"),modifier:function(t){L(!0),C.set("ui_editor_markdown_tags",t)}},{type:"checkbox",title:"Markdown Preview",expl:"Markdown preview "+n,var:C.get("ui_editor_markdown_preview"),modifier:function(t){L(!0),C.set("ui_editor_markdown_preview",t)}},{type:"checkbox",title:"Enhanced Markdown",expl:"Enhanced Markdown Preview for files, documents, date etc"+n,var:C.get("ui_editor_markdown_enhanced_preview"),modifier:function(t){L(!0),C.set("ui_editor_markdown_enhanced_preview",t)}},{type:"checkbox",title:"Links button",expl:"Replace http links into buttons in the editor by adding a '/' at the end of it."+n,var:C.get("ui_editor_links_as_button"),modifier:function(t){L(!0),C.set("ui_editor_links_as_button",t)}},{type:"checkbox",title:"Latex preview",expl:"Add Latex preview. Add '--latex' in the note to activate it then use $_latex_expression_$"+n,var:C.get("ui_editor_markdown_latex_preview"),modifier:function(t){L(!0),C.set("ui_editor_markdown_latex_preview",t)}},{type:"checkbox",title:"Improved Markdown Table",expl:"Improves the display of markdown table. Add '--table' in the note to activate it."+n,var:C.get("ui_editor_markdown_table_preview"),modifier:function(t){L(!0),C.set("ui_editor_markdown_table_preview",t)}},{type:"checkbox",title:"Spellcheck",expl:"Enable/disable native browser spellcheck for all notes. <br> You can also activate it per note by adding '--spellcheck' inside the note content <br>"+n,var:C.get("ui_editor_spellcheck"),modifier:function(t){L(!0),C.set("ui_editor_spellcheck",t)}},{type:"checkbox",title:"Image title",expl:"Show image title on interface and exports"+n,var:C.get("ui_editor_show_image_title"),modifier:function(t){L(!0),C.set("ui_editor_show_image_title",t)}},{type:"checkbox",title:"Live Edition",expl:"If other clients edit the same note, update everybody on live. <br> That functionality is required for AI assistant and the inline calculator"+n,var:C.get("ui_editor_live_watch"),modifier:function(t){L(!0),C.set("ui_editor_live_watch",t)}}]},{title:"exports",fields:[{type:"textarea",title:"Options for Pandoc exporter",expl:"Modify how pandoc exports files. All options can be found at <a href='https://pandoc.org/MANUAL.html' target=\"_blank\">pandoc options manual</a>. One file extension options per line.<br/><br/>format: <br/> file extention | options ".concat(x("export_pandoc_cli_options")),var:C.get("export_pandoc_cli_options"),modifier:function(t){C.set("export_pandoc_cli_options",t)}},{type:"none",var:"",customHtml:" ",title:"Export Install",readOnly:!0,expl:'In order to export in many formats, Tiro notes needs to install Pandoc on your computer. (At least v2.9) <br/>\n\t\t\t\t\t\t<a href="https://pandoc.org/installing.html" target="_blank">Guide here </a>\n\t\t\t\t\t\t<br/><br/>\n\t\t\t\t\t\tFor PDF, make sure pdflatex is installed \n\t\t\t\t\t\t<br/> (if you are on termux: <code>pkg install texlive-installer texlive-tlmgr; termux-install-tl</code>)',modifier:function(){},onCustomHtmlClick:function(){}}]},{title:"plugins",fields:[{type:"text",title:"Plugins Marketplace URL",expl:"Custom Plugins Marketplace URL, should redirect to a marketplace.json file <br> Goes to the official 'https://raw.githubusercontent.com/dotgreg/tiro-notes/master/docs/marketplace.json' by default/if empty.",var:C.get("plugins_marketplace_url"),modifier:function(t){C.set("plugins_marketplace_url",t)}},{type:"none",var:"",customHtml:"<button> Clean Plugins Cache </button>",title:"Clean Plugins Cache",readOnly:!0,expl:"Clean Plugins Cache",modifier:function(){},onCustomHtmlClick:function(){Object(m.b)("cache","clean_cache")}}]},{title:"Users and Rights",fields:[{type:"checkbox",title:"Enable read-only viewer",expl:'Create a "viewer" user that can read but not edit the content',var:C.get("users_viewer_user_enable"),modifier:function(t){C.set("users_viewer_user_enable",t,{writeInSetupJson:!0})}},{type:"text",title:"Viewer user password",expl:'Define the "viewer" user password',var:C.get("users_viewer_user_password"),modifier:function(t){C.set("users_viewer_user_password",t,{writeInSetupJson:!0})}},{type:"checkbox",title:"Demo Mode",expl:"Autofill the 'viewer' user and password on login popup for easier access during a demo mode",var:C.get("demo_mode_enable"),modifier:function(t){C.set("demo_mode_enable",t,{writeInSetupJson:!0})}},{type:"none",var:"",customHtml:"<button> Logout </button>",title:"Logout current User",readOnly:!0,expl:"Logout Current User",modifier:function(){},onCustomHtmlClick:function(){Object(g.a)(),t.onClose(),Object(s.d)((function(t){t.folders.get(["/"],(function(){}))}))}}]},{title:"Advanced",fields:[{type:"text",var:b,title:y.backend.port,expl:y.backend.portExpl,modifier:v},{type:"checkbox",title:"Activity Logging",expl:"Enable the activity logging for events like read/write files, you can then consult it using api.activity.getReport(). \n Requires an app restart to take effect.",var:C.get("server_activity_logging_enable"),modifier:function(t){C.set("server_activity_logging_enable",t)}},{type:"checkbox",title:"Disable notification popups",expl:"Force notification popups to not appear on the interface"+n,var:C.get("view_disable_notification_popups"),modifier:function(t){L(!0),C.set("view_disable_notification_popups",t)}},{type:"textarea",title:"Options for Image compression",expl:"Modify default image compression settings ".concat(x("advanced_image_compression_settings")),var:C.get("advanced_image_compression_settings"),modifier:function(t){C.set("advanced_image_compression_settings",t)}}]},{title:"Beta",fields:[{type:"checkbox",title:"Floating Windows",expl:"Enable the floating window system"+n,var:C.get("beta_floating_windows"),modifier:function(t){L(!0),C.set("beta_floating_windows",t)}},{type:"checkbox",title:"Plugins Marketplace",expl:"Enable the plugin marketplace system",var:C.get("beta_plugins_marketplace"),modifier:function(t){C.set("beta_plugins_marketplace",t)}}]}]}var T=Object(u.a)("config-panels-opened",[]),I=Object(o.a)(T,3),N=I[0],P=I[1],R=(I[2],Object(i.useState)(!1)),A=Object(o.a)(R,2),F=A[0],L=A[1];return Object(O.c)("div",{className:"settings-popup-wrapper"},Object(O.c)(r.a,{title:"".concat(y.title),onClose:function(){t.onClose()}},_.map((function(t,n){return Object(O.c)("div",{className:"settings-panel"},Object(O.c)("h3",{onClick:function(){!function(t){var n=Object(p.a)(N);n[t]=!n[t],P(n)}(n)}},Object(O.c)("div",{className:"arrow"},N[n]?"\u25bc":"\u25ba"),t.title),Object(O.c)("div",{className:"fields-wrapper ".concat(N[n]?"active":"")},t.fields.map((function(t){return Object(O.c)("div",{className:"field-wrapper"},Object(O.c)("div",{className:"input-and-html-wrapper"},"none"===t.type&&Object(O.c)("span",null,t.title),"none"!==t.type&&Object(O.c)(l.a,{value:t.var,shouldNotSelectOnClick:!0,label:t.title,type:t.type,max:t.max,min:t.min,readonly:t.readOnly,onChange:function(n){"checkbox"!==t.type&&t.modifier(n)},onCheckedChange:function(n){"checkbox"===t.type&&t.modifier(n)}}),t.customHtml&&Object(O.c)("div",{className:"custom-html-wrapper",onClick:function(n){t.onCustomHtmlClick&&t.onCustomHtmlClick()},dangerouslySetInnerHTML:{__html:t.customHtml}})),Object(O.c)("div",{className:"explanation",dangerouslySetInnerHTML:{__html:t.expl||"woop"}}))}))))})),F&&Object(O.c)("button",{className:"submit-button reload-btn",onClick:function(t){window.location.reload()}},"Reload App")))},y=function(){return"\n//\n// mobile version\n//\n\n.device-view-mobile {\n\t.settings-popup-wrapper .popup-wrapper .popupContent {\n\t\t\t\twidth: 80vw;\n\t\t\t\t.field-wrapper {\n\t\t\t\t\t\tdisplay: block;\n\t\t\t\t\t\t.explanation {\n\t\t\t\t\t\t\t\twidth: 100%;\n\t\t\t\t\t\t\t\tpadding: 5px 0px;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tinput {\n\t\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t}\n}\n\n.settings-popup-wrapper .popup-wrapper {\n\theight: 70%;\n}\n.settings-popup-wrapper .popup-wrapper .popupContent {\n padding: 0px 20px;\n\t\twidth: 70vw;\n\t\t// min-height: 50vh;\n\t\t// max-height: 70vh;\n\t\toverflow-y: scroll;\n\n}\n\n.reload-btn {\n\tposition: absolute;\n\tbottom: 10px;\n\tright: 10px;\n}\n\n\n.settings-panel {\n\t\t\n\t\t.input-and-html-wrapper {\n\t\t\twidth: 50%;\n\t\t\t.input-component-wrapper {\n\t\t\t\t.input-component {\n\t\t\t\t\t".concat("desktop"===Object(v.a)()?"":"display:block!important;","\n\t\t\t\t\t.input-wrapper {\n\t\t\t\t\t\ttextarea, input {\n\t\t\t\t\t\t\t").concat("desktop"===Object(v.a)()?" ":"width: calc(100% - 30px); margin: 5px 0px; ",'\n\t\t\t\t\t\t}\n\t\t\t\t\t\tinput[type=checkbox] {\n\t\t\t\t\t\t\twidth: 20px;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tinput[type="text"] {\n\t\t\t\t\t\t\t').concat("desktop"===Object(v.a)()?" ":"width: calc(100% - 40px);","\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\th3 {\n\t\t\t\tcursor: pointer;\n\t\t\t\ttext-transform: uppercase;\n\t\t\t\t.arrow {\n\t\t\t\t\t\tdisplay: inline-block;\n\t\t\t\t\t\tfont-size: 7px;\n\t\t\t\t\t\tposition: relative;\n\t\t\t\t\t\tbottom: 2px;\n\t\t\t\t\t\tmargin-right: 10px;\n\t\t\t\t}\n\t\t}\n\t\t.fields-wrapper {\n\t\t\t\tdisplay: none;\n\t\t\t\t&.active {\n\t\t\t\t\t\tdisplay: block;\n\t\t\t\t\t\tdisplay: block;\n\t\t\t\t\t\tpadding: 12px 12px 0px 12px;\n\t\t\t\t\t\tbackground: ").concat(f.a.colors.bgPopup2,";\n\t\t\t\t\t\tborder-radius: 5px;\n\t\t\t\t\t\tborder: 1px ").concat(f.a.colors.bgPopup3," solid;\n\t\t\t\t\t\tmargin-top: 10px;\n\t\t\t\t}\n\t\t\t\t.field-wrapper {\n\t\t\t\t\t\ttextarea {\n\t\t\t\t\t\t\twidth: 100%;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tdisplay: flex;\n\t\t\t\t\t\tpadding-bottom: 11px;\n\t\t\t\t\t\talign-items: center;\n\t\t\t\t\t\t// 3 EXPLANATION\n\t\t\t\t\t\t.explanation {\n\t\t\t\t\t\t\t// width: 50%;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t.input-and-html-wrapper {\n\t\t\t\t\t\t\tdisplay: flex;\n\t\t\t\t\t\t\t.input-component {\n\t\t\t\t\t\t\t\t// 1 TITLE\n\t\t\t\t\t\t\t\tspan {\n\t\t\t\t\t\t\t\t\twidth: 100px;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t// 2 INPUT\n\t\t\t\t\t\t\t\t.input-wrapper {\n\t\t\t\t\t\t\t\t\twidth: 300px;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tdisplay: flex;\n\t\t\t\t\t\t\t\tjustify-content: space-evenly;\n\t\t\t\t\t\t\t\tpadding: 0px;\n\t\t\t\t\t\t\t\tinput {\n\t\t\t\t\t\t\t\t\tfont-size: ").concat(Object(w.a)(),"px;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t.custom-html-wrapper {\n\t\t\t\t\t\t\t\t\tmargin-left: 20px;\n\t\t\t\t\t\t\t\t\t.qrcode-wrapper {\n\t\t\t\t\t\t\t\t\t\t\timg {\n\t\t\t\t\t\t\t\t\t\t\t\t\tmargin: 5px 25px 0px 0px;\n\t\t\t\t\t\t\t\t\t\t\t\t\tcursor: pointer;\n\t\t\t\t\t\t\t\t\t\t\t\t\twidth: 50px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t&:hover {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//\twidth: 150px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t}\n\t\t}\n\n}\n\n\n\n\n.buttons {\n display: flex;\n padding: 20px 0px 0px 0px;\n button {\n width: 30%;\n padding: 10px;\n }\n}\n")}},11:function(t,n,e){"use strict";e.d(n,"e",(function(){return lt})),e.d(n,"d",(function(){return st})),e.d(n,"a",(function(){return ut})),e.d(n,"f",(function(){return pt})),e.d(n,"c",(function(){return dt})),e.d(n,"b",(function(){return ft}));var o=e(15),i=e(25),c=e(122),a=e(55),r=e(200),l=e(0),s=e.n(l),u=e(38),p=e(35),d=e(132),f=e(29),b=e(30),g=e(131),h=e(14),m=e(18),v=function(t){Object(l.useEffect)((function(){h.b.on("moveFolderAnswer",(function(n){t.eventBus.notify(n.idReq,n.idReq)}))}),[]);return{file:function(n,e,cb){var o=dt("move-file-get-files");t.eventBus.subscribe(o,cb||function(){}),console.log("[MOVEFILE] ".concat(n," -> ").concat(e)),h.b.emit("moveFile",{initPath:n,endPath:e,idReq:o,token:Object(m.b)()})},folder:function(n,e,cb){var o=dt("move-folder-get-files");t.eventBus.subscribe(o,cb||function(){}),console.log("[MOVEFOLDER] ".concat(n," -> ").concat(e)),h.b.emit("moveFolder",{initPath:n,endPath:e,idReq:o,token:Object(m.b)()})}}},w=e(32),O=e(121),j=e(377),x=function(t){var n="[FILE API] 005363 ";Object(l.useEffect)((function(){h.b.on("onServerTaskFinished",(function(n){t.eventBus.notify(n.idReq,{data:n})})),h.b.on("getFileContent",(function(n){n.error?t.eventBus.notify(n.idReq,{error:n.error}):t.eventBus.notify(n.idReq,{content:n.fileContent})}))}),[]);var e=Object(l.useRef)(""),o=function(n,o,i,cb){var c=!(!i||!i.history)&&i.history,a=(!i||!i.withMetas||i.withMetas,dt("save-file-content"));cb&&t.eventBus.subscribe(a,(function(t){cb&&cb(t)}));var r=k(n);h.b.emit("saveFileContent",{filePath:r,newFileContent:o,token:Object(m.b)(),idReq:a,withCb:!!cb}),c&&(n!==e.current&&lt().then((function(t){var e=t.ui.browser.folders.current.get();if(e===Object(f.c)(n)){var o,i="",c=t.ui.windows.active.get();if(c)i=(null===(o=c.content.file)||void 0===o?void 0:o.name)||"";t.ui.browser.goTo(e,i)}})),t.historyApi.intervalSave(n,o),e.current=n)},i=(Object(w.a)((function(t,n,e,cb){o(t,n,e,cb)}),500),Object(l.useRef)({})),c=Object(l.useRef)({});return{getContent:function(n,cb,e){var o=Object(g.a)("getFileContent "+n),i=k(n),c=dt("get-file-content");t.eventBus.subscribe(c,(function(t){t.error&&e&&e.onError?e.onError(t.error):!t.error||e&&e.onError?t.error||cb(t.content):cb(t.error),o()})),h.b.emit("askForFileContent",{filePath:i,token:Object(m.b)(),idReq:c})},saveContent:function(t,n,e,cb){var a=!(!e||!e.debounced)&&e.debounced,r=!(!e||!e.withThrottle)&&e.withThrottle;a?function(t,n,e,a,r,cb){var l=function(t,n){return"".concat(t,"-").concat(n)}(e,t);i.current[l]||(i.current[l]=Object(O.a)((function(t,n,e,cb){o(t,n,e,cb)}),t),!0===n&&(c.current[l]=Object(j.a)((function(n,e,i,cb){console.log("throttledFuncs",t,n),o(n,e,i,cb)}),t))),i.current[l](e,a,r,cb),!0===n&&c.current[l](e,a,r,cb)}(a,r,t,n,e,cb):o(t,n,e,cb)},delete:function(e,cb){var o=dt("delete-file");console.log("".concat(n," delete file ").concat(e.path)),t.eventBus.subscribe(o,cb),h.b.emit("onFileDelete",{filepath:e.path,idReq:o,token:Object(m.b)()})},move:v({eventBus:t.eventBus}).file,create:function(e,cb){var o=dt("create-file");console.log("".concat(n," create file in ").concat(e)),t.eventBus.subscribe(o,cb),h.b.emit("createNote",{folderPath:e,idReq:o,token:Object(m.b)()})}}},k=function(t){return t.replace(b.a.linklink,"$2/$1")},y=e(17),_=e(10),C=e(5),E=e(34),S=e(52),T=e(280),I=function(){var t=Object(S.a)(Object(E.a)().mark((function t(n){return Object(E.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t,e){var o={},c=[];lt().then((function(e){e.search.word("#",n,(function(n){var e=[],r={};console.log(n),Object(i.a)(n,(function(t,n){var c={file:t.file,titleName:""};Object(i.a)(t.results,(function(t,n){var l=[],s=t.match(b.a.titleMd);if(s&&s[0]){var u=s[0].split("#").join("").trim();c.titleName=u}var p=t.match(b.a.hashtag3);Object(i.a)(p,(function(t){t=t.substring(1),o[t]||(o[t]={id:Object.keys(o).length+1,name:t,lines:[],noteParts:[]}),o[t].noteParts.push(Object(a.a)(c)),o[t].lines.push(n),o[t].lines=Object(T.a)(o[t].lines);var e=c.file.name+"-"+c.titleName;r[e]||(r[e]=[]),r[e].push(o[t].id),l.push(o[t])})),Object(i.a)(l,(function(t,n){Object(i.a)(l,(function(o,i){if(n!==i){var c=t.id,a=o.id,r="".concat(c,"-").concat(a),l="".concat(a,"-").concat(c);-1===e.indexOf(r)&&-1===e.indexOf(l)&&e.push(r)}}))}))}))})),Object(i.a)(o,(function(t){c.push(t)})),t({nodesObj:o,nodesArr:c,edges:e})}))}))})));case 1:case"end":return t.stop()}}),t)})));return function(n){return t.apply(this,arguments)}}(),N=function(t){var n="[SEARCH API] 00563 ",e=Object(l.useState)(""),o=Object(C.a)(e,2),i=o[0],c=o[1];Object(l.useEffect)((function(){h.b.on("getWordSearch",(function(n){t.eventBus.notify(n.idReq,n.result)}))}),[]);var a=function(e,cb){!function(e,cb,o){var i=dt("search-".concat(o,"-"));console.log("".concat(n," searching ").concat(e," with type ").concat(o)),t.statusApi.searching.set(!0),t.eventBus.subscribe(i,(function(n){t.statusApi.searching.set(!1),cb(n)})),h.b.emit("searchFor",{term:e,token:Object(m.b)(),type:o,idReq:i})}(e,cb,"text")};return{files:{search:a},word:function(e,o,cb){var i=dt("search-word-");e=e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),console.log("".concat(n," searching WORD ").concat(e)),t.eventBus.subscribe(i,(function(t){cb(t)})),h.b.emit("searchWord",{word:e,folder:o,token:Object(m.b)(),idReq:i})},hashtags:function(t,cb){I(t).then((function(t){cb(t)}))},ui:{search:function(t){lt().then((function(n){n.ui.browser.files.set([]),c(t),a(t,(function(t){n.ui.browser.files.set(t)}))}))},term:{set:c,get:i}}}},P=e(130),R=e(31),A=e(13),F=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm,L=/([^\s,]+)/g,M=e(92),z=e(369),D=e(65),B="/".concat(y.a.path.configFolder,"/").concat(y.a.path.cacheFolder,"/cache-api"),H="[CACHE API]",U=y.a.client.log.verbose,W=y.a.client.log.verbose,q=function(){return(new Date).getTime()},V=function(t){var n=t-q()<0;return U&&console.log(H,"isExpired? : ",n,(t-q())/6e4,"mins"),n},J=function(t){var n=function(t){return"".concat(B,"/cache-api-storage-").concat(Object(D.b)(t),".md")},e=Object(l.useRef)({}),o=function(t,n,o){var i;e.current[t]={content:n,until:(i=o,q()+60*i*1e3)}},i=9e5,c="__CHUNKED__CACHED__OBJ__SIZE:",a="[CACHE CHUNK]",r=function(t,e,o){var r=JSON.stringify(e),l=function(t,e,cb){W&&console.log(a,n(t),{str:e}),st((function(o){o.file.saveContent(n(t),"".concat(e),{},(function(t){cb(t)}))}))};if(!(r.length>i))return l(t,r,(function(){o&&o()}));var s=(u=i,r.match(new RegExp(".{1,"+u+"}","g")));W&&console.log(a,"SAVE >> TOO LARGE, split in ".concat(s.length," parts"),{cacheId:t,contentArr:s});var u,p=0,d=function(){++p===s.length-1&&o&&o()};l(t,"".concat(c).concat(s.length),d);for(var f=function(n){setTimeout((function(){l("c".concat(n,"_").concat(t),s[n],d)}),1e3*n)},b=0;b<s.length;b++)f(b)},s=function(t,cb,e){var o=function(t,e,o){st((function(i){i.file.getContent(n(t),e,{onError:o})}))},i="___ERROR___CHUNK___LOADING___FAILURE";o(t,(function(n){try{if(n.startsWith(c)){var r=parseInt(n.replaceAll(c,""));W&&console.log(H,"GET >> remerging a ".concat(r," part"),{cacheId:t}),function(n,e,c,r){for(var l=Object(g.a)("".concat(H," getAllChunksAndMerge")),s=[],u=0,p=function(){if(u===e){var n=s.join(""),o=n.includes(i);W&&console.log("GET >> RESULT remerging",{hasFailed:o,cacheId:t,nbChunks:e,resMerge:n}),l(),o?r():c(n)}},d=function(n){o("c".concat(n,"_").concat(t),(function(o){s[n]=o,W&&console.log(a,"c".concat(n,"_").concat(t),{loadingCounter:u,nbChunks:e}),u++,p()}),(function(t){u++,s[n]=i,p()}))},f=0;f<e;f++)d(f)}(0,r,(function(t){cb(t)}),(function(t){e()}))}else cb(n)}catch(l){e(l)}}),(function(t){e(t)}))},u=function(){e.current={}};return{get:function(t,cb,n){if(!0===(null===n||void 0===n?void 0:n.disableRamCache)&&u(),t in e.current){var i=e.current[t],c=V(i.until);c&&(i.content=void 0),U&&console.log(H,"FROM RAM",t," expired:",c),cb(i.content)}else s(t,(function(n){try{var i=JSON.parse(n);e.current[t]=Object(_.a)({},i);var c=e.current[t],a=V(c.until);a&&(c.content=void 0),U&&console.log(H,"FROM FILE",t," expired:",a),cb(c.content)}catch(r){U&&console.log(H,"error getting cache",r,t),o(t,void 0,60),cb(e.current[t].content)}}),(function(n){return"NO_FILE"===n?(U&&console.log(H,"FROM FILE: NO_FILE",t),o(t,void 0,60),cb(e.current[t].content)):cb(void 0)}))},set:function(t,n,i,cb){i||(i=60),-1===i&&(i=1e32),o(t,n,i);var c=e.current[t];U&&console.log(H,"SETTING",t," with cachedTime in min",i),r(t,c,(function(t){cb&&cb(t)}))},cleanRamCache:u}},K=e(184),G=e(376),Y=e(116),$=e(243),Z=e(36),X="[PLUGINS]",Q="[NOTIFICATIONS]",tt={obj:null},nt={play:function(t){st((function(n){n.ressource.fetch(t,(function(t,n){tt.obj=new Audio(n),tt.obj.play()}),{returnsPathOnly:!0})}))},stop:function(){tt.obj&&(tt.obj.pause(),tt.obj.currentTime=0)}},et=e(60),ot=e(89),it="[FLOATING PANELS]",ct=1e3,at=function(t){var n=Object(et.a)("floatingPanelsConfig3",[],{history:!1,onInitialRefresh:function(t){u.current=t,"mobile"===Object(A.a)()&&(u.current=u.current.filter((function(t){return"mobile"!==t.device}))),p(u.current)},debouncedSave:5e3}),e=Object(C.a)(n,3),i=e[0],c=e[1],r=e[2],u=s.a.useRef([]),p=function(t){u.current=t,c(t)};Object(l.useEffect)((function(){u.current=i}),[i]);var d=function(t){var n=20;"full-center"===t.layout?(t.position={x:n,y:n},t.size={width:window.innerWidth-40,height:window.innerHeight-40}):"half-right"===t.layout?(t.position={x:window.innerWidth/2,y:n},t.size={width:window.innerWidth/2-40,height:window.innerHeight-40}):"half-left"===t.layout?(t.position={x:n,y:n},t.size={width:window.innerWidth/2-40,height:window.innerHeight-40}):"full-bottom"===t.layout||"bottom"===t.layout?(t.position={x:n,y:window.innerHeight/2},t.size={width:window.innerWidth-40,height:window.innerHeight/2-40}):"full-top"===t.layout||"top"===t.layout?(t.position={x:n,y:n},t.size={width:window.innerWidth-40,height:window.innerHeight/2-40}):"left"===t.layout?(t.position={x:n,y:n},t.size={width:window.innerWidth/2-40,height:window.innerHeight-40}):"right"===t.layout?(t.position={x:window.innerWidth/2,y:n},t.size={width:window.innerWidth/2-40,height:window.innerHeight-40}):"bottom-left"===t.layout?(t.position={x:n,y:window.innerHeight/2},t.size={width:window.innerWidth/2-40,height:window.innerHeight/2-40}):"bottom-right"===t.layout?(t.position={x:window.innerWidth/2,y:window.innerHeight/2},t.size={width:window.innerWidth/2-40,height:window.innerHeight/2-40}):"top-left"===t.layout?(t.position={x:n,y:n},t.size={width:window.innerWidth/2-40,height:window.innerHeight/2-40}):"top-right"===t.layout&&(t.position={x:window.innerWidth/2,y:n},t.size={width:window.innerWidth/2-40,height:window.innerHeight/2-40});var e=u.current.filter((function(t){return!t.status.includes("hidden")})),i="mobile"===Object(A.a)()?10:100,c=window.innerWidth/2-i;"mobile"===Object(A.a)()&&(c=window.innerWidth-2*i);var a=window.innerHeight/1.2-i,r=Object(_.a)({position:{x:i+20*e.length,y:i+20*e.length},size:{width:c,height:a},status:"visible",file:Object(ot.a)(),view:"editor",id:Math.random().toString(36).substring(7),zIndex:ct,device:Object(A.a)(),orderPosition:e.length},t);p([r].concat(Object(o.a)(u.current))),m(r.id,"first"),g(r.id)},b=function(t){var n=u.current.map((function(n){return n.id===t.id?t:n}));p(n)},g=function(t){var n=Math.max.apply(Math,Object(o.a)(u.current.map((function(t){return t.zIndex||0})))),e=u.current.findIndex((function(n){return n.id===t}));if(-1!==e&&(Object(a.a)(u.current)[e].zIndex=n+1,b(Object(_.a)(Object(_.a)({},u.current[e]),{},{zIndex:n+1})),n>ct+2*u.current.length)){var i=Object(a.a)(u.current);i.forEach((function(t){t.zIndex=t.zIndex-u.current.length})),p(i)}},h=function(t){p(Object(a.a)(t))},m=function(t,n){var e=Object(a.a)(u.current.find((function(n){return n.id===t})));if(e){if("last"===n){var i=Math.max.apply(Math,Object(o.a)(u.current.map((function(t){return t.orderPosition||0}))));n=i+1}if("first"===n){var c=Math.min.apply(Math,Object(o.a)(u.current.map((function(t){return t.orderPosition||0}))));n=c-1}e.orderPosition=n,b(e)}},v={create:d,openFile:function(t,n){var e=n||{},o=e.idpanel,i=e.layout,c=e.searchedString,r=e.replacementString;o||(o=Math.random().toString(36).substring(7));var l=Object(a.a)(u.current.find((function(t){return t.id===o})));if(l)"minimized"===l.status&&(l.status="visible"),l.file=Object(f.d)(t),c&&(l.searchedString=c),r&&(l.replacementString=r),b(l),g(null===l||void 0===l?void 0:l.id);else{var s={id:o,type:"file",file:Object(f.d)(t)};i&&(s.layout=i),c&&(s.searchedString=c),r&&(s.replacementString=r),d(s)}},update:b,updateAll:h,delete:function(t){console.log("".concat(it," deletePanel"),t);var n=u.current.filter((function(n){return n.id!==t}));p(n)},movePanel:function(t,n){b(Object(_.a)(Object(_.a)({},u.current.find((function(n){return n.id===t}))),{},{position:n}))},resizePanel:function(t,n){b(Object(_.a)(Object(_.a)({},u.current.find((function(n){return n.id===t}))),{},{size:n}))},minimizePanel:function(t){u.current.find((function(n){return n.id===t}));b(Object(_.a)(Object(_.a)({},u.current.find((function(n){return n.id===t}))),{},{status:"minimized"}))},actionAll:function(t){if("organizeWindows"===t)return function(){console.log("".concat(it," reorganizeAll"));var t=Object(a.a)(u.current),n=0;t.forEach((function(t){"visible"===t.status&&(t.zIndex=ct+n,t.position={x:100+20*n,y:100+20*n},t.size={width:320,height:200},n++)})),h(t)}();var n=Object(a.a)(u.current);n.forEach((function(n){n.status="hide"===t?"visible":"minimized"})),h(n)},panels:i,refreshFromBackend:r,pushWindowOnTop:g,movePositioninArray:function(t,n){var e=Object(a.a)(u.current),o=e.findIndex((function(n){return n.id===t}));if(-1!==o){var i=e.splice(o,1)[0];"up"===n?e.splice(o-1,0,i):"down"===n?e.splice(o+1,0,i):"first"===n?e.splice(0,0,i):"last"===n&&e.push(i),h(e)}},updateOrderPosition:m};return v},rt=null,lt=function(){return new Promise((function(t,n){if(rt)return t(rt);var e=setInterval((function(){if(rt)return clearInterval(e),t(rt)}),200)}))},st=function(cb){lt().then((function(t){cb(t)}))},ut=s.a.createContext(null),pt=function(t){var n=Object(l.useRef)({}),e=function(t){delete n.current[t]},o={subscribe:function(t,cb,e){e||(e={}),n.current[t]||(n.current[t]=[]),n.current[t].push({cb:cb,options:e})},unsubscribe:e,notify:function(t,o){Object(i.a)(n.current,(function(n,c){c===t&&Object(i.a)(n,(function(n){try{n.cb(o)}catch(i){console.warn("[CLIENT API] error with function",i)}n.options.persistent||e(t)}))}))}};Object(l.useEffect)((function(){y.a.client.log.verbose&&console.log("[CLIENT API ]INIT ")}),[]);var c=function(t){Object(l.useEffect)((function(){h.b.on("reconnect",(function(){t.eventBus.notify(n,{isConnected:!0})})),h.b.on("reconnect",(function(){t.eventBus.notify(n,{isConnected:!0})})),h.b.on("disconnect",(function(){t.eventBus.notify(n,{isConnected:!1})}))}),[]);var n="watch-api-unique-id-request";return Object(l.useEffect)((function(){h.b.on("onNoteWatchUpdate",(function(e){t.eventBus.notify(n,e)}))}),[]),{file:function(e,cb){t.eventBus.subscribe(n,(function(t){e===t.filePath&&cb(t)}),{persistent:!0})},appStatus:function(cb){t.eventBus.subscribe(n,(function(t){cb(t)}),{persistent:!0})},dev:{toggleIsConnected:function(e){t.eventBus.notify(n,{isConnected:e})}}}}({eventBus:o}),a=N({eventBus:o,statusApi:t.statusApi}),r=x({eventBus:o,historyApi:t.historyApi}),s=function(t){return Object(l.useEffect)((function(){h.b.on("getFiles",(function(n){t.eventBus.notify(n.idReq,n.files)})),h.b.on("getFilesPreview",(function(n){t.eventBus.notify(n.idReq,n.filesPreview)}))}),[]),{get:function(n,cb){y.a.client.log.socket&&console.log("[CLIENT API] get files ".concat(n));var e=dt("get-files-");t.statusApi.searching.set(!0),t.eventBus.subscribe(e,(function(e){t.statusApi.searching.set(!1),cb(e,n)})),h.b.emit("askForFiles",{folderPath:n,token:Object(m.b)(),idReq:e})},getPreviews:function(n,cb){var e=dt("get-files-");t.eventBus.subscribe(e,cb),h.b.emit("askFilesPreview",{filesPath:n,idReq:e,token:Object(m.b)()})},search:t.searchApi.files.search}}({eventBus:o,searchApi:a,statusApi:t.statusApi}),u=function(t){var n=Object(_.a)({},t).eventBus;Object(l.useEffect)((function(){h.b.on("getUploadedFile",(function(t){n.notify(t.idReq,t)}))}),[]);var e=function(t,cb){try{var e=dt("upload-file");n.subscribe(e,(function(n){delete n.idReq,t.onSuccess&&t.onSuccess(n),cb&&cb({message:"success",succesObj:n})})),Object(P.a)({file:t.file,path:t.folderPath,idReq:e,onProgress:function(n){t.onProgress&&t.onProgress(n)}})}catch(o){console.warn(o)}},o=Object(l.useRef)([]),c=Object(w.a)(Object(S.a)(Object(E.a)().mark((function t(){var n,c,a,r;return Object(E.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(o.current.length<1)){t.next=2;break}return t.abrupt("return");case 2:if(n=o.current.length,c=0,Object(R.d)("Files Uploaded: \n ".concat(c,"/").concat(n),"upload-info"),"mobile"!==Object(A.a)()){t.next=16;break}a=Object(E.a)().mark((function t(i){return Object(E.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,new Promise((function(t,a){var r=o.current[i];if(console.log("uploadObj",r),!r)return a(void 0);console.log("[UPLOAD] starting upload item ".concat(r.uploadInfos.file.name)),e(r.uploadInfos,(function(e){var o=++c===n?5:60;Object(R.d)("Files Uploaded: \n ".concat(c,"/").concat(n),"upload-info",o),r&&r.cb&&r.cb(e),t(void 0)}))}));case 2:case"end":return t.stop()}}),t)})),r=0;case 8:if(!(r<o.current.length)){t.next=13;break}return t.delegateYield(a(r),"t0",10);case 10:r++,t.next=8;break;case 13:o.current=[],t.next=18;break;case 16:Object(i.a)(o.current,(function(t,o){setTimeout((function(){console.log("[UPLOAD] starting upload item ".concat(t.uploadInfos.file.name)),e(t.uploadInfos,(function(e){var o=++c===n?5:60;Object(R.d)("Files Uploaded: \n ".concat(c,"/").concat(n),"upload-info",o),t.cb&&t.cb(e)}))}),500*o)})),o.current=[];case 18:case"end":return t.stop()}}),t)}))),500);return{uploadFile:function(t,cb){o.current.length,Object(R.d)("Starting Uploading Files...","upload-info"),o.current.push({uploadInfos:t,cb:cb}),c()}}}({eventBus:o}),b=Object(z.a)({eventBus:o}),g=function(t){return Object(l.useEffect)((function(){h.b.on("getFoldersScan",(function(n){t.eventBus.notify(n.idReq,{folders:n.folders,pathBase:n.pathBase})})),h.b.on("onServerTaskFinished",(function(n){t.eventBus.notify(n.idReq,n.status)}))}),[]),{get:function(n,cb,e){y.a.client.log.socket&&console.log("[FOLDERS API] get folders ",n,e);var o=dt("get-folders-");t.eventBus.subscribe(o,(function(t){var e=Object(_.a)({},t);e.folderPaths=n,cb(e)})),h.b.emit("askFoldersScan",{foldersPaths:n,depth:(null===e||void 0===e?void 0:e.depth)||0,token:Object(m.b)(),idReq:o})},move:v({eventBus:t.eventBus}).folder,create:function(n,cb){console.log("[askFolderCreate]",n);var e=dt("create-folder-");n=Object(f.b)(n),cb&&t.eventBus.subscribe(e,(function(t){cb(t)})),h.b.emit("askFolderCreate",{newFolderPath:n,token:Object(m.b)(),idReq:e})},delete:d.a}}({eventBus:o}),O=function(t){return Object(l.useEffect)((function(){h.b.on("getCommandExec",(function(n){t.eventBus.notify(n.idReq,n.resultCommand)})),h.b.on("getCommandExecStream",(function(n){t.eventBus.notify(n.idReq,n.streamChunk)}))}),[]),{exec:function(n,cb){var e=dt("command-exec-");t.eventBus.subscribe(e,(function(t){Object(G.a)(t)||(t=JSON.stringify(t)),cb(t)}),{persistent:!0}),h.b.emit("askCommandExec",{commandString:n,token:Object(m.b)(),idReq:e})},stream:function(n,cb){var e=dt("command-stream-");t.eventBus.subscribe(e,(function(n){cb(n),n.isLast&&t.eventBus.unsubscribe(e)}),{persistent:!0}),h.b.emit("askCommandExecStream",{commandString:n,token:Object(m.b)(),idReq:e})}}}({eventBus:o}),j=function(t){Object(l.useEffect)((function(){h.b.on("getBackendConfig",(function(n){t.eventBus.notify(n.idReq,n.config)}))}),[]);var n={get:function(cb){var n=dt("get-config-");t.eventBus.subscribe(n,(function(t){cb(t)})),h.b.emit("askBackendConfig",{token:Object(m.b)(),idReq:n})},getPlatform:function t(){return t()}};return n}({eventBus:o}),k=function(t){Object(l.useEffect)((function(){h.b.on("getPluginsList",(function(n){t.eventBus.notify(n.idReq,n)}))}),[]);var n=function(cb,n){n||(n={}),n.noCache||(n.noCache=!1),y.a.client.log.socket&&console.log("".concat(X," get plugins"));var e=dt("get-plugins-");t.eventBus.subscribe(e,(function(t){t.scanLog.length>0&&st((function(n){return n.ui.notification.emit({content:"PLUGIN SCAN LOG:<br/>".concat(JSON.stringify(t.scanLog)),options:{hideAfter:60}})}));var n=Object($.a)(t.plugins,(function(t){return t.name}));cb(n,t.scanLog)})),h.b.emit("askPluginsList",{noCache:n.noCache,token:Object(m.b)(),idReq:e})},e={list:n,get:function(t,e,cb){n((function(n,o){var i=n.filter((function(n){return n.name===t&&n.type===e}))[0]||null;cb(i)}),{noCache:!0})},cronCache:{set:function(t,n){var e="plugins-cron-infos";st((function(o){o.cache.get(e,(function(i){i||(i={}),i[t]||(i[t]={vars:{}}),i[t].vars=n,o.cache.set(e,i,-1)}))}))}},marketplace:{fetchList:function(cb){st((function(t){var n=t.userSettings.get("plugins_marketplace_url"),e="".concat(X," api.plugins.marketplace.fetchList error for url: ").concat(n," :");t.ressource.fetch(n,(function(t){try{var o=JSON.parse(t),c=[];Object(Z.a)(o)?(Object(i.a)(o,(function(t){var n={name:"",description:"",versions:[],configuration:[]};t.name&&(n.name=t.name),t.description&&(n.description=t.description),t.versions&&(n.versions=t.versions),t.images&&(n.images=t.images),t.icon&&(n.icon=t.icon),t.configuration&&(n.configuration=t.configuration),""!==n.name&&c.push(n)})),cb(c)):Object(R.d)("".concat(e,": did not find a plugin list"))}catch(a){Object(R.d)("".concat(e," ").concat(JSON.stringify(a),", url: ").concat(n))}}),{disableCache:!0})}))}}};return e}({eventBus:o}),T=J(),I={emit:function(t,cb){var n,e=function(){console.log(Q,"emitNotification",t),cb&&cb(),h.b.emit("emitNotification",{notification:t,token:Object(m.b)()})};null!==(n=t.options)&&void 0!==n&&n.showOnceEvery&&t.id?st((function(n){var o="notif-showevery-".concat(t.id);n.cache.get(o,(function(i){var c;if(i&&!0===i.alreadyShown)return console.log(Q,"showOnceEvery => already shown notif, dont reshow it",t);e(),n.cache.set(o,{alreadyShown:!0},null===(c=t.options)||void 0===c?void 0:c.showOnceEvery)}))})):e()}},F={get:function(cb){var t=setInterval((function(){h.b&&(cb(h.b),clearInterval(t))}),10)}},L=Object(p.c)({eventBus:o}).userSettingsApi,D=Object(d.c)({searchUiApi:a.ui,statusApi:t.statusApi,filesApi:s,foldersApi:g,windowApi:t.windowsApi,tabsApi:t.tabsApi,userSettingsApi:L}),B=function(t){var n=Object(l.useState)(null),e=Object(C.a)(n,2),o=e[0],i=e[1],c=function(t){t.windowId||(t.windowId="active"),t.insertPos||(t.insertPos="currentPos"),i(t)};return Object(_.a)(Object(_.a)({},M.b),{},{ui:{lineJump:{jump:function(t,n){c({type:"lineJump",windowId:t,lineJumpNb:n})}},editorAction:{dispatch:c,get:o}}})}(),H=Object(K.b)({}),U=function(t){return Object(l.useEffect)((function(){h.b.on("getPerformanceReport",(function(n){t.eventBus.notify(n.idReq,n)}))}),[]),{getReport:function(cb){var n=dt("get-perf-report");t.eventBus.subscribe(n,(function(t){cb?cb(t):(console.log("[PERF API]","report"),console.log(t.report))})),h.b.emit("askPerformanceReport",{token:Object(m.b)(),idReq:n})}}}({eventBus:o}),W=function(t){var n="[ACTIVITY API]";return Object(l.useEffect)((function(){h.b.on("getActivityReport",(function(n){t.eventBus.notify(n.idReq,n)}))}),[]),{getReport:function(e,cb){console.log(n,"asked for report (if no cb provided, will be outputed to console.log)",e);var o=dt("get-perf-report");t.eventBus.subscribe(o,(function(t){cb?cb(t):(console.log(n,"report"),console.log(t.report))})),h.b.emit("askActivityReport",{params:e,token:Object(m.b)(),idReq:o})}}}({eventBus:o}),q=at(),V={cache:T,file:r,audio:nt,encryption:Y.b,files:s,socket:F,popup:t.popupApi,upload:u,ressource:b,tabs:t.tabsApi,folders:g,config:j,userSettings:L,history:t.historyApi,status:t.statusApi,note:B,analytics:H,search:a,command:O,plugins:k,watch:c,performance:U,activity:W,ui:{browser:D,floatingPanel:q,notification:I,windows:t.windowsApi,lightbox:t.lightboxApi,textToSpeechPopup:t.ttsApi,search:a.ui,note:B.ui,notePreviewPopup:t.notePreviewPopupApi}};return rt=V,V},dt=function(t){return"client-api-".concat(t,"-req-").concat(Object(u.a)())},ft=function(t,cb){lt().then((function(n){var e=t.apiName.split("."),r=n;if(Object(i.a)(e,(function(t){r=r[t]?r[t]:null})),null===r)return cb("nok",{error:'"'.concat(t.apiName,'" does not exists in current api \n\nAvailable Api properties :\n\n').concat(gt("",n))});try{var l=bt(r);if(!Object(c.a)(l)){var s=r.apply(void 0,Object(o.a)(t.apiArguments));return cb("ok",s)}var u=Object(a.a)(t.apiArguments);u.splice(l,0,(function(t){cb("ok",t)})),r.apply(void 0,Object(o.a)(u))}catch(p){return cb("nok",{error:'error "'.concat(JSON.stringify(p),'" when executing "').concat(t.apiName,'" with props ').concat(t.apiArguments)})}}))},bt=function(t){var n=function(t){var n=t.toString().replace(F,""),e=null;return null===(e=n.startsWith("cb =>")?["cb"]:n.slice(n.indexOf("(")+1,n.indexOf(")")).match(L))&&(e=[]),e}(t),e=n.indexOf("cb");return-1===e?null:e},gt=function t(n,e){var o="";for(var c in e)if("object"===typeof e[c]&&e[c].constructor!==Array){if(c.length>1&&"get"!==c){var a=""!==n?"".concat(n,"."):"";o+=t("".concat(a).concat(c),e[c])}}else o="".concat(o).concat(n,".").concat(c,"\n");var l=o.split("\n"),s=[];return lt().then((function(t){Object(i.a)(l,(function(n){var e=n.split("."),o=t;Object(i.a)(e,(function(t,n){o[t]&&(o=o[t])}));var c="var",a="";Object(r.a)(o)&&(c="Function",a=o.toString()),s.push({name:n,type:c,description:a})}))})),o}},110:function(t,n,e){"use strict";e.d(n,"c",(function(){return b})),e.d(n,"a",(function(){return h})),e.d(n,"b",(function(){return m}));var o=e(30),i=e(41),c=e(45),a=e(18),r=e(25),l=e(11),s=e(28),u=e(206),p=e(29),d=e(35),f=function(t){if(t){var n=t.dataset.filePath,e=t.dataset.src;Object(l.d)((function(t){t.file.getContent(n,(function(o){var i=Object(u.a)(o,Object(p.d)(n));if(!(i.length<1)){var c=[],a=0;Object(r.a)(i,(function(t,n){e.includes(t.url)&&(a=n),c.push(t.url)})),t.ui.lightbox.open(a,c)}}))}))}},b=function(t,n){return Object(c.a)({file:t,windowId:n,pattern:o.a.image2,replacement:function(n){var e=n.matchs,o=document.createElement("div");return o.innerHTML=g(e[0],e[2],e[1],e[5],t),o}})},g=function(t,n,e,o,c){"image"!==e&&(e='<div class="mdpreview-source">'.concat(e,"</div>")),d.d.curr.ui_editor_show_image_title||(e="");var r=n.startsWith("http")?n:"".concat(Object(i.a)(c.folder),"/").concat(n).concat(Object(a.c)());o||(o="");var l=o.trim().split("="),u="";if("width"===l[0]||"height"===l[0]){var p="width"===l[0]?"height:auto;max-height:none":"width:auto; max-width:none;";u='style="'.concat(l[0],":").concat(l[1],"; ").concat(p,'"')}return'<div class="cm-mdpreview-wrapper image-wrapper"><div class="cm-mdpreview-image" data-file-path="'.concat(c.path,'" data-src="').concat(r,'" onclick="').concat(Object(s.c)("image-open-lightbox",f),'"> <img onerror="this.style.display=\'none\'" ').concat(u,' src="').concat(r,'" /></div></div>').concat(e)},h=function(t,n,e){var o="",c=t.split("[")[1].split("]")[0];"image"!==c&&(o='<div class="mdpreview-source">'.concat(c,"</div>")),d.d.curr.ui_editor_show_image_title||(o="");var r=n.startsWith("http")?n:"".concat(Object(i.a)(e.folder),"/").concat(n).concat(Object(a.c)());return'<div class="cm-mdpreview-wrapper image-wrapper"><div class="cm-mdpreview-image" data-file-path="'.concat(e.path,'" data-src="').concat(r,'" onclick="').concat(Object(s.c)("image-open-lightbox",f),'"> <img onerror="this.style.display=\'none\'" src="').concat(r,'" /></div></div>').concat(o)},m=function(){return"\n.cm-mdpreview-wrapper.image-wrapper {\n\t\t// display: inline;\n\t\tdiv {\n\t\t\t// display: inline;\n\t\t}\n\t\t.cm-mdpreview-image {\n\t\t\tcursor:pointer;\n\t\t}\n\t\t.mdpreview-source {\n\t\t\t\tline-height: initial;\n\t\t}\n}\n\n"}},115:function(t,n,e){"use strict";e.d(n,"b",(function(){return f})),e.d(n,"a",(function(){return g})),e.d(n,"c",(function(){return v})),e.d(n,"d",(function(){return w}));var o=e(3),i=e(6),c=e(7),a=e(21),r=e(22),l=e(12),s=e(8),u=e(4),p=e(99),d=e(110),f={LatexMdEl:u.a.define()},b={resolve:"LatexMdEl"},g={defineNodes:["LatexMdEl"],parseInline:[{name:"MdCustomTagsParser",parse:function(t,n,e){return 36===n?t.addDelimiter(b,e,e+1,!0,!0):-1},after:"Emphasis"}],props:[Object(u.c)({LatexMdEl:f.LatexMdEl})]},h=function(t){Object(a.a)(e,t);var n=Object(r.a)(e);function e(t){var o;return Object(i.a)(this,e),(o=n.call(this)).str=t,o}return Object(c.a)(e,[{key:"ignoreEvent",value:function(){return!1}},{key:"toDOM",value:function(){var t=document.createElement("div");t.classList.add("cm-mdpreview-wrapper"),t.classList.add("latex-wrapper");var n=Object(p.e)(this.str);return t.innerHTML=' <div class="latex-height" >'.concat(n,"</div> "),t}}]),e}(l.g);function m(t,n){var e,i=[],c=Object(o.a)(t.visibleRanges);try{for(c.s();!(e=c.n()).done;){var a=e.value,r=a.from,u=a.to;Object(s.F)(t.state).iterate({from:r,to:u,enter:function(n){if("LatexMdEl"===n.name){var e=t.state.doc.sliceString(n.from,n.to),o=l.a.widget({widget:new h(e),side:1});i.push(o.range(n.from))}}})}}catch(p){c.e(p)}finally{c.f()}return l.a.set(i)}var v=function(t){return l.f.fromClass(function(){function n(e){Object(i.a)(this,n),this.decorations=void 0,this.decorations=m(e,t.file)}return Object(c.a)(n,[{key:"update",value:function(n){(n.docChanged||n.viewportChanged)&&(this.decorations=m(n.view,t.file))}}]),n}(),{decorations:function(t){return t.decorations},eventHandlers:{mousedown:function(t,n){t.target}}})},w=function(){return"\n.latex-height {\n\t\theight: 20px;\n\t\toverflow: auto;\n\t\tline-height: initial;\n\t\tbackground: rgb(247,247,247);\n\t\tpadding: 10px;\n\t\tborder-radius: 5px;\n\t\tcolor: rgba(0,0,0,0);\n\t\ttransition: all 0.2s;\n\t\t.katex, .katex span {\n\t\t\t\tcolor: black;\n\t\t}\n}\n\n.mdpreview-source {\n\t\tfont-weight: bold;\n\t\tcolor: #b4b4b4;\n\t\tfont-size: 9px;\n\t\tdisplay: block;\n}\n\n\n\n\n.cm-mdpreview-wrapper {\n\t\tline-height: 0px;\n\n\t\t&.latex-wrapper {\n\t\t\t\tposition: relative;\n\t\t\t\tleft: -10px;\n\t\t\t\tdisplay: inline-block;\n\t\t}\n\t\t&.image-wrapper {\n\t\t\t\t/* max-height: 160px; */\n\t\t}\n\n\t\t.cm-mdpreview-image {\n\t\t\t\tposition: relative;\n\t\t\t\tdisplay: inline-block;\n\n\t\t\t\timg {\n\t\t\t\t\t\tmargin: 5px 0px;\n\t\t\t\t\t\tborder-radius: 5px;\n\t\t\t\t\t\tbox-shadow: 0px 0px 5px rgba(0,0,0,.2);\n\t\t\t\t\t\tmax-width: calc(100% - 20px);\n\t\t\t\t\t\tborder-radius: 5px;\n\t\t\t\t\t\tmax-height: 220px;\n\t\t\t\t}\n\t\t\t\t.enlarge {\n\t\t\t\t\t\twidth: 10px;\n\t\t\t\t\t\topacity: 0;\n\t\t\t\t\t\ttransition: 0.2s all;\n\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\ttop: 8px;\n\t\t\t\t\t\tright: 23px;\n\t\t\t\t\t\tz-index: 2;\n\t\t\t\t\t\tpadding: 6px;\n\t\t\t\t\t\tcursor: pointer;\n\t\t\t\t\t\tbackground: rgba(0,0,0,0.6);\n\t\t\t\t\t\tborder-radius: 19px;\n\t\t\t\t}\n\t\t\t\tsvg, span {\n\t\t\t\t\t\tpointer-events: none;\n\t\t\t\t}\n\t\t\t\tsvg {\n\t\t\t\t\t\tbox-shadow: 0 0 0 rgba(0,0,0,0.4);\n\t\t\t\t}\n\n\t\t}\n\t\t&:hover .enlarge {\n\t\t\t\topacity: 0.3;\n\t\t\t\t/* pointer-events: all; */\n\t\t}\n}\n\n ".concat(Object(d.b)(),"\n ")}},116:function(t,n,e){"use strict";e.d(n,"c",(function(){return c})),e.d(n,"a",(function(){return a})),e.d(n,"b",(function(){return r})),e.d(n,"d",(function(){return u}));var o=e(169),i=e.n(o),c=function(t,n){var e=i.a.generateRSAKey(n,1024),o=i.a.publicKeyString(e);return i.a.encrypt(t,o)},a=function(t,n){var e=i.a.generateRSAKey(n,1024);return i.a.decrypt(t,e)},r={encryptText:c,decryptText:a,encryptUrlParam:function(t,n){var e=c(t,n);return e.cipher&&(e.cipher=encodeURIComponent(e.cipher)),e},decryptUrlParam:function(t,n){return t=decodeURIComponent(t),a(t,n)}},l=function(t,n){var e=n.replace(t,"").length,o=n.length;return Math.round(e/o*100)/100},s=function(t){return t>0&&t<=.9},u=function(t){var n=!1,e={nb:l(/[^0-9]/g,t),up:l(/[^A-Z]/g,t),low:l(/[^a-z]/g,t),spe:l(/[^\/\=\?\+]/g,t)},o=s(e.nb)&&s(e.up)&&s(e.low)&&e.spe>0,i=(t.trim().endsWith("==")||t.trim().endsWith("="),/^[a-zA-Z0-9\/\=\?\+]+$/.test(t)),c=t.length>100;return i&&o&&c&&(n=!0),n}},118:function(t,n,e){"use strict";e.d(n,"c",(function(){return j})),e.d(n,"a",(function(){return k})),e.d(n,"b",(function(){return y})),e.d(n,"d",(function(){return _}));var o=e(5),i=e(0),c=e.n(i),a=e(55),r=e(667),l=e(25),s=e(366),u=e.n(s),p=(e(537),e(538),e(211)),d=e(155),f=e(213),b=e(135),g=e(9),h=e(42),m=e(11),v=e(13),w=e(214),O=e(1),j={rows:2,cols:4},x={m:10,rows:j.rows,cols:j.cols,decalBottom:10},k=function(t){var n=Object(i.useState)([]),e=Object(o.a)(n,2),s=e[0],g=e[1],k=function(t){g(t),y.current=t},y=Object(i.useRef)([]),_=Object(i.useState)([]),C=Object(o.a)(_,2),E=C[0],S=C[1],T=Object(i.useRef)();Object(i.useEffect)((function(){t.grid&&t.grid.layout&&(S(t.grid.layout),k(t.grid.content))}),[t.refresh]),Object(i.useEffect)((function(){U(),L()}),[E]);var I=function(n,e){t.onGridUpdate({layout:n,content:e})},N=function(){var t=s[0].file;if(t){var n=function(t){for(var n=[],e=j,o=function(o){for(var i=[],c=function(n){var e=0;Object(l.a)(t,(function(t){for(var i=0;i<t.w;i++)for(var c=0;c<t.h;c++){var a=t.x+i,r=t.y+c;a===n&&r===o&&(e=1)}})),i.push(e)},a=0;a<e.cols;a++)c(a);n.push(i)},i=0;i<e.rows;i++)o(i);for(var c=[-1,-1],a=[-1,-1],r=0;r<e.rows;r++)for(var s=0;s<e.cols;s++)0===n[r][s]&&-1===c[0]&&-1===c[1]&&(c[0]=s,c[1]=r),0===n[r][s]&&(a[0]=s,a[1]=r);var u=a[0]-c[0]+1,p=a[1]-c[1]+1;return{x:c[0],y:c[1],w:u,h:p}}(E),e=Object(d.a)({file:t,w:n.w,h:n.h,x:n.x,y:n.y}),o=Object(a.a)(E);o.push(e.layout),J(o)&&(S(o),setTimeout((function(){var t=Object(a.a)(s);t.push(e.content);var n=W(e.content.i,t);k(n),I(o,n)})),I(o,s))}},P=Object(i.useState)(!1),R=Object(o.a)(P,2),A=R[0],F=R[1],L=function(){F(E.length>1)},M=function(t){var n=Object(r.a)(Object(a.a)(E),(function(n){return n.i!==t})),e=function(t){var n=j;return 1===t.length&&(t[0].x=0,t[0].y=0,t[0].h=n.rows,t[0].w=n.cols),t}(n);S(e),setTimeout((function(){var e=Object(r.a)(Object(a.a)(s),(function(n){return n.i!==t}));k(e),I(n,e)})),I(n,s)},z=Object(i.useState)(!1),D=Object(o.a)(z,2),B=D[0],H=D[1],U=function(){var t=0,n=x.cols*x.rows;Object(l.a)(E,(function(n){t+=n.w*n.h})),H(t!==n)},W=function(t,n){var e=Object(a.a)(n);return Object(l.a)(e,(function(n){n.active=n.i===t})),e},q=function(t,n){var e=W(t,y.current);k(e),I(E,e)},V=function(t){T.current=Object(a.a)(t)},J=function(t){for(var n=!0,e=0;e<t.length;e++){var o=t[e];o.y>1&&(n=!1),o.h>1&&o.y>0&&(n=!1)}return n};Object(f.b)(),Object(i.useEffect)((function(){var t=K.current;if(t)return t.addEventListener("resize",(function(){})),function(){t.removeEventListener("resize",(function(){}))}}),[]);var K=Object(i.useRef)(null),G={width:300,height:300};K.current&&(G.width=K.current.clientWidth,G.height=K.current.clientHeight-x.decalBottom);Object(i.useContext)(m.a);var Y=function(n,e){return function(o,i){if("windowActiveStatus"===o)n&&!n.active&&q(n.i,n.file);else if("windowViewChange"===o){var c;if(null===i||void 0===i||!i.view||!t.grid.content[e].file)return;!function(t,n){var e=Object(a.a)(s);e[n].view=t,k(e),I(E,e)}(null===i||void 0===i?void 0:i.view,e);var r=(null===(c=t.grid.content[e].file)||void 0===c?void 0:c.path)||"";Object(w.b)(r,null===i||void 0===i?void 0:i.view)}}};return Object(O.c)("div",{className:"draggable-grid-wrapper"},Object(O.c)("div",{className:"draggable-grid-wrapper-in",ref:K},"mobile"!==Object(v.a)()&&Object(O.c)(u.a,{className:"draggable-grid",autoSize:!1,layout:E,onLayoutChange:function(t){var n=Object(a.a)(t);if(J(n)){var e=n;V(e),S(e),I(e,s)}else{if(!T.current)return;var o=function(t){var n=t,e=j,o=null;console.log("0035",n),(2===n.length&&(n[0].w===e.cols-1&&n[0].h===e.rows&&n[1].w===e.cols/2&&n[1].h===e.rows||n[1].w===e.cols-1&&n[1].h===e.rows&&n[0].w===e.cols/2&&n[0].h===e.rows)||2===n.length&&(n[0].w===e.cols-1&&n[0].h===e.rows&&n[1].w===e.cols/2&&n[1].h===e.rows||n[1].w===e.cols-1&&n[1].h===e.rows&&n[0].w===e.cols/2&&n[0].h===e.rows))&&(console.log("[ALT LAYOUT] 0035 found i|iii to ii|ii"),o=Object(a.a)(t),Object(l.a)(o,(function(t,n){t.w=e.cols/2,t.y=0,1===n&&(t.x=e.cols/2)})));return o}(t);o&&V(o);var i=o||T.current,c=Object(a.a)(i);Object(l.a)(c,(function(t){t.refresh=Object(p.a)(t.refresh)})),S(c),I(c,s)}},cols:x.cols,compactType:"horizontal",useCSSTransforms:!1,rowHeight:G.height/x.rows-x.m*(x.rows+1),draggableHandle:".drag-handle",width:G.width,margin:[x.m,x.m]},E.map((function(n,e){return Object(O.c)("div",{key:n.i,className:" ".concat(s[e]&&s[e].active?"active":""," window-wrapper "),onClick:function(){s[e]&&!s[e].active&&q(s[e].i,s[e].file)},onMouseEnter:function(){}},function(t,n,e){var o=[{icon:"faGripVertical",title:"Move Window",class:"drag-handle",size:1.2,action:function(){},onHover:function(){t&&!t.active&&q(t.i,t.file)}},{icon:"faPlus",title:"Add Window",class:"add-button",action:function(){N()}},{icon:"faPlus",title:"Delete Window",class:"delete-button",action:function(){M(t.i)}}];return Object(O.c)(c.a.Fragment,null,Object(O.c)("div",{className:"note-active-ribbon"}),Object(O.c)("div",{className:"window-buttons-bar ".concat(B?"can-add":""," ").concat(A?"can-remove":"")},Object(O.c)(h.a,{design:"horizontal",popup:!1,buttons:o,colors:["#d4d1d1","#615f5f"],size:.8})))}(n,0,t.grid.content[e]),Object(O.c)("div",{className:"window-editor-wrapper-wrapper"},Object(O.c)(b.a,{content:t.grid.content[e]&&t.grid.content[e],forceView:t.grid.content[e]&&t.grid.content[e].view,onLayoutUpdate:Y(n,e),mobileView:t.mobileView})))}))),"mobile"===Object(v.a)()&&Object(O.c)("div",{className:"mobile-grid-view"},Object(O.c)("div",{className:" window-wrapper"},Object(O.c)("div",{className:"window-editor-wrapper-wrapper"},t.grid.content[0]&&Object(O.c)(b.a,{content:t.grid.content[0],onLayoutUpdate:Y(window,0),mobileView:t.mobileView}))))))},y=function(){return"\n.draggable-grid-wrapper \n.draggable-grid-wrapper-in \n.mobile-grid-view {\n\t\t.window-wrapper {\n\n\t\t\t\t.window-buttons-bar {\n\t\t\t\t\t\tdisplay: none;\n\t\t\t\t}\n\n\t\t\t\t.window-editor-wrapper-wrapper {\n\t\t\t\t\t\t.dual-view-wrapper {\n\t\t\t\t\t\t\t\t.editor-area {\n\t\t\t\t\t\t\t\t\t\tmargin-top: 47px;\n\t\t\t\t\t\t\t\t\t\t.infos-editor-wrapper {\n\t\t\t\t\t\t\t\t\t\t\t\tmargin-top: 10px;\n\t\t\t\t\t\t\t\t\t\t\t\ttop: -43px;\n\t\t\t\t\t\t\t\t\t\t\t\t.title-input-wrapper {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tinput {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcolor: ".concat(g.a.colors.main,";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t.dropdown-icon {\n\t\t\t\t\t\t\t\t\t\t\t\ttop: -15px;\n\t\t\t\t\t\t\t\t\t\t\t\tright: 10px;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t.context-menu {\n\t\t\t\t\t\t\t\t\t\t\t\tright: 10px;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t.main-editor-wrapper {\n\t\t\t\t\t\t\t\t\t\t\t\t.textarea-editor {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\theight: calc(100% - 300px);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tpadding: 20px 20px 70px 20px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\twidth: calc(100% - 40px);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tresize: none;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t.preview-area-wrapper {\n\t\t\t\t\t\t\t\t\t\t// height: calc(100% - 165px);\n\t\t\t\t\t\t\t\t\t\theight: calc(100% - 85px);\n\t\t\t\t\t\t\t\t\t\t.preview-area {\n\t\t\t\t\t\t\t\t\t\t\t\ttop: 0px!important;\n\t\t\t\t\t\t\t\t\t\t\t\tbottom: 0px!important;\n\t\t\t\t\t\t\t\t\t\t\t\t.dates-wrapper {\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t.preview-content {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tpadding: 0px 0px 50px 0px;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t.scrolling-bar-wrapper {\n\t\t\t\t\t\t\t\t\t\tdisplay:none;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t}\n}\n")},_=function(t){return"\n\n.draggable-grid-wrapper {\n\t\t// remove transition\n\n\t\theight: calc(100% + ".concat(t.topTab?"0":"44","px);\n\t\ttop: ").concat(t.topTab&&"mobile"!==Object(v.a)()?"44":"0","px;\n\t\tposition: relative;\n\n\t\t.react-grid-item {\n\t\t\t\ttransition: all 0ms ease;\n\t\t\t\ttransition-property: left, top;\n\t\t\t\t.react-resizable-handle {\n\t\t\t\t\t\tbottom: 0px;\n\t\t\t\t\t\tright: 0px;\n\t\t\t\t\t\tcursor: se-resize;\n\t\t\t\t\t\topacity: 1;\n\t\t\t\t\t\twidth: 10px;\n\t\t\t\t\t\theight: 18px;\n\t\t\t\t\t\tbackground: rgb(247,247,247);\n\t\t\t\t}\n\t\t\t\t.react-resizable-handle:after {\n\t\t\t\t\t\ttop: 5px;\n\t\t\t\t\t\tleft: 1px;\n\t\t\t\t\t\topacity: 0.3;\n\t\t\t\t}\n\t\t}\n\n\t\t.draggable-grid-wrapper-in {\n\t\t\t\theight: 100%;\n\t\t\t\tposition: relative;\n\n\t\t\t\t.draggable-grid, .mobile-grid-view {\n\t\t\t\t\t\theight: 100%;\n\t\t\t\t\t\twidth: 100%;\n\t\t\t\t\t\t.window-wrapper {\n\t\t\t\t\t\t\t//overflow: hidden;\n\t\t\t\t\t\t\tborder-radius: 5px;\n\t\t\t\t\t\t\tcolor: ").concat(g.a.colors.fontEditor,";\n\t\t\t\t\t\t\tbackground: ").concat(g.a.colors.bgEditor,";\n\t\t\t\t\t\t\tbox-shadow: 0px 0px 5px rgba(0,0,0,.1);\n\t\t\t\t\t\t\toverflow-y: hidden;\n\t\t\t\t\t\t\toverflow-x: hidden;\n\t\t\t\t\t\t\theight:100%;\n\n\t\t\t\t\t\t\t.window-buttons-bar {\n\t\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\t\tz-index:3;\n\t\t\t\t\t\t\t\tright: 30px;\n\t\t\t\t\t\t\t\ttop: 8px;\n\t\t\t\t\t\t\t\t.delete-button {display: none;}\n\t\t\t\t\t\t\t\t.add-button {display: none;}\n\t\t\t\t\t\t\t\t.drag-handle {\n\t\t\t\t\t\t\t\t\t\tcursor: grab;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t.delete-button span.icon-wrapper {\n\t\t\t\t\t\t\t\t\ttransform: rotate(45deg);\n\t\t\t\t\t\t\t\t\tdisplay: inline-block;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t&.can-add {\n\t\t\t\t\t\t\t\t\t\t.add-button {display: block;}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t&.can-remove {\n\t\t\t\t\t\t\t\t\t\t.delete-button {display: block;}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t&.active {\n\t\t\t\t\t\t\t\t.note-active-ribbon {\n\t\t\t\t\t\t\t\t\t\t//background:").concat(g.a.colors.main,";\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t.dual-view-wrapper\n\t\t\t\t\t\t\t\t.editor-area\n\t\t\t\t\t\t\t\t.infos-editor-wrapper\n\t\t\t\t\t\t\t\t.title-input-wrapper\n\t\t\t\t\t\t\t\t.big-title {\n\t\t\t\t\t\t\t\t\t\tcolor: ").concat(g.a.colors.main,";\n\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t}\n\n\t\t\n}\n")}},128:function(t,n,e){"use strict";e.d(n,"c",(function(){return r})),e.d(n,"b",(function(){return l})),e.d(n,"a",(function(){return s}));var o=e(15),i=e(362),c=e(38),a=e(241),r=function(t,n){var e="render-react-wrapper-".concat(Object(c.a)()),o=function(){var n=l(t),o=setInterval((function(){var t=document.getElementById(e);t&&(t.innerHTML="",t.appendChild(n),clearInterval(o))}),10)};return n&&n.delay?setTimeout(o,n.delay):o(),e},l=function(t,n){return n||(n=document.createElement("div")),Object(i.createRoot)(n).render(t),n},s=function(t){return Object(a.a)((function(){return t.apply(void 0,arguments)}),(function(t){return JSON.stringify(Object(o.a)(t))}))}},13:function(t,n,e){"use strict";e.d(n,"e",(function(){return o})),e.d(n,"c",(function(){return i})),e.d(n,"b",(function(){return c})),e.d(n,"d",(function(){return a})),e.d(n,"a",(function(){return r}));var o=function(){var t,n=!1;return t=navigator.userAgent||navigator.vendor||window.opera,(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(t)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(t.substr(0,4)))&&(n=!0),n},i=function(t){return r()===t},c=function(){var t=navigator.platform.toLowerCase();return t.includes("mac")?"mac":t.includes("win")?"windows":t.includes("linux")?"linux":t.includes("android")?"android":"other"};function a(){return!!/iPad/.test(navigator.platform)||navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&/MacIntel/.test(navigator.platform)}var r=function(){var t=window.innerWidth,n="desktop";return l()||t<1e3&&(n="tablet"),t<500&&(n="mobile"),n},l=function(){return!s()},s=function(){var t,n=!1;return t=navigator.userAgent||navigator.vendor||window.opera,(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(t)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(t.substr(0,4)))&&(n=!0),n}},130:function(t,n,e){"use strict";e.d(n,"b",(function(){return d})),e.d(n,"a",(function(){return f}));var o=e(10),i=e(121),c=e(25),a=e(11),r=e(18),l=e(14),s=e(539),u={curr:[]},p=Object(i.a)((function(t){console.log("[UPLOAD] inserting ".concat(u.curr.length," files after debounce")),Object(a.d)((function(n){var e="";Object(c.a)(u.curr,(function(t,n){if(!t.inserted){var o=t.file.name.replace(/\[/g,"").replace(/\]/g,"");e+="![".concat(o,"](").concat(t.file.path,")\n"),t.inserted=!0}})),n.ui.note.editorAction.dispatch({type:"insertText",insertPos:"currentLineStart",insertText:e,windowId:t})}))}),1e3),d=function(t){console.log("[UPLOAD] FILE TO EDITOR started",t.fileToUpload);var n=Object(o.a)({},t),e=n.fileToUpload,i=n.folder,c=n.windowId;Object(a.d)((function(t){t.upload.uploadFile({file:e,folderPath:i,onSuccess:function(t){u.curr.push({file:t,inserted:!1}),p(c)},onProgress:function(n){t.ui.note.editorAction.dispatch({type:"uploadProgress",uploadProgress:n,windowId:c})}})}))},f=function(t){var n=Object(o.a)({},t),e=n.file,i=n.path,c=n.idReq,a=n.onProgress,u=new s(l.a);u.addEventListener("start",(function(t){t.file.meta.idReq=c,t.file.meta.path=i,t.file.meta.token=Object(r.b)()})),u.addEventListener("progress",(function(t){var n=Math.round(t.bytesLoaded/t.file.size*100);a(n)})),u.submitFiles([e])}},131:function(t,n,e){"use strict";e.d(n,"a",(function(){return l}));var o=e(136),i=e(31),c="[FRONT PERF]",a={value:!1};"true"===Object(o.a)("tiroConsoleLogEnabled")||(console.error("=============================================================================="),console.error("!!! console.log is disabled, to enable it again, tiroDevCli.log.toggle_enable()"),console.error("=============================================================================="),window.console={warn:function(){},error:function(){},info:function(){},log:function(){}}),Object(i.a)("log","toggle_enable",(function(){var t="true"===Object(o.a)("tiroConsoleLogEnabled");Object(o.b)("tiroConsoleLogEnabled",t?"false":"true",720),window.location.reload()})),Object(i.a)("performance","toggle_monitoring",(function(){a.value=!a.value,console.log(c,"toggled to ".concat(a.value))}));var r={},l=function(t){if(!a.value)return function(){};r[t]||(r[t]=[]),r[t][0]=performance.now();return function(){r[t][1]=performance.now();var n=r[t],e=n[1]-n[0];console.warn(c,"".concat(t," = ").concat(e," ms"),n)}}},132:function(t,n,e){"use strict";e.d(n,"c",(function(){return O})),e.d(n,"b",(function(){return y})),e.d(n,"a",(function(){return _}));var o=e(15),i=e(5),c=e(25),a=e(280),r=e(170),l=e(55),s=e(36),u=e(0),p=e(29),d=e(17),f=e(31),b=e(14),g=e(93),h=e(18),m=e(60),v=e(70),w=e(11),O=function(t){var n=Object(u.useState)([]),e=Object(i.a)(n,2),s=e[0],f=e[1],b=Object(u.useState)(-1),h=Object(i.a)(b,2),O=h[0],y=h[1],_=Object(v.a)("selected-folder",""),C=Object(i.a)(_,2),E=C[0],S=C[1],T=Object(u.useRef)("");Object(u.useEffect)((function(){T.current=E}),[E]);var I=Object(u.useRef)({}),N=Object(u.useState)(j),P=Object(i.a)(N,2),R=P[0],A=P[1],F=Object(u.useState)(""),L=Object(i.a)(F,2),M=L[0],z=L[1],D=Object(m.a)("folders-open",["/"]),B=Object(i.a)(D,3),H=B[0],U=B[1],W=B[2],q=Object(u.useRef)([]),V=function(t){t=Object(a.a)(t),U(t)},J=Object(u.useRef)(!1);Object(u.useEffect)((function(){J.current||(K(H),H.length>1&&(J.current=!0))}),[H]);var K=function(t,n){Object(c.a)(t,(function(n,e){""===t[e]&&(t[e]="/")})),t=Object(a.a)(t),n||(n={}),Object(r.a)(n.cache)||(n.cache=!0);var e=!!Object(r.a)(n.background)&&n.background,o=0;Object(w.d)((function(i){Object(c.a)(t,(function(c){i.folders.get([c],(function(i){var c;!e&&Y(i.pathBase,i.folders),++o>=t.length&&(null===(c=n)||void 0===c?void 0:c.cb)&&n.cb()}))}))}))},G=Object(u.useRef)([]),Y=function(t,n){var e=Object(l.a)(G.current),o={current:e};Object(c.a)(n,(function(t){t&&(o.current=o.current.filter((function(n){return t.path!==n.path})))})),Object(c.a)(n,(function(t){t&&(o.current=k(t,o.current))})),e=o.current,G.current=e;var i=x("/",e);i&&A(i),z(t)};return{goTo:function(t,n,e){var o=function(t){Object(w.d)((function(o){o.status.searching.set(!1);var i=o.userSettings.get("ui_filesList_sortMode"),a=Object(g.d)(t,i),r=-1;if(n&&Object(c.a)(a,(function(t,e){t.name===n&&(r=e)})),y(r),f(a),e&&e.openIn){var l=a[r];if("active"===e.openIn||"activeWindow"===e.openIn){var s=o.tabs.active.get();null===s||void 0===s||s.grid.content[0].i;s?o.ui.windows.active.setContent(l):o.tabs.openInNewTab(l)}else o.ui.windows.updateWindows([e.openIn],l)}}))},i=function(){Object(w.d)((function(o){t=Object(p.b)("".concat(t,"/"));d.a.client.log.verbose&&console.log("".concat("[BROWSER GO TO] "," ").concat(t," ").concat(n," ").concat(JSON.stringify(e))),o.ui.search.term.set(""),o.status.searching.set(!0),S(t)}))};if(e&&e.ramCache&&I.current[t])i(),console.log("RAM CACHE",t,I.current[t].length),o(I.current[t]);else{if(""===t)return;Object(w.d)((function(n){i(),n.files.get(t,(function(n){o(n),I.current[t]=n}))}))}},files:{active:{get:s[O],getIndex:O,set:y},set:f,get:s},folders:{refreshFromBackend:function(){W((function(t){q.current=t}))},base:M,get:function(cb){return cb&&cb(R),R},clean:function(){A(j)},scan:K,open:{get:function(){return q.current},add:function(t){console.log("ADD",t),q.current=[].concat(Object(o.a)(q.current),[t]),q.current=Object(a.a)(q.current),V(q.current)},remove:function(t){console.log("REMOVE",t),Object(c.a)(t,(function(t){q.current=q.current.filter((function(n){return n!==t}))})),V(q.current)}},current:{get:function(){return T.current},set:S,getSync:E}}}},j={title:"",key:"",path:""},x=function t(n,e){for(var o,i=0;i<e.length;i++)if(Object(p.a)(e[i].path,n)){o=Object(l.a)(e[i]);var c=e[i].children;if(Object(s.a)(c))for(var a=0;a<c.length;a++){var r=t(c[a].path,e);r&&(o.children[a]=r)}}return o},k=function(t,n){for(var e="add",o=0;o<n.length;o++)Object(p.a)(t.path,n[o].path)&&(n[o]=t,e="update");return"add"===e&&n.push(t),n},y={title:".trash",key:"/.tiro/.trash",path:"/.tiro/.trash"},_=function(t,n){console.log("[askFolderDelete]",t,n),b.b.emit("askFolderDelete",{typeFolder:t,cacheFolderName:n,token:Object(h.b)()})};Object(f.a)("cache","clean_cache",(function(){Object(f.d)("Cache clean started...","clean_cache"),Object(w.d)((function(t){t.folders.delete("cache","ctag-ressources"),t.ressource.cleanCache(),t.cache.cleanRamCache(),Object(f.d)("Cache cleaned successfully","clean_cache")}))}))},135:function(t,n,e){"use strict";e.d(n,"a",(function(){return w})),e.d(n,"b",(function(){return O}));var o=e(5),i=e(10),c=e(170),a=e(0),r=e.n(a),l=e(11),s=e(32),u=e(178),p=e(214),d=e(216),f=e(9),b=(e(65),e(215)),g=e(130),h=e(35),m=e(1),v=function(t){var n=Object(i.a)({},t.content),e=n.file,f=n.view,v=n.active,w=n.i,O=Object(a.useState)(""),j=Object(o.a)(O,2),x=j[0],k=j[1],y=Object(a.useState)("editor"),_=Object(o.a)(y,2),C=_[0],E=_[1],S=w;Object(a.useEffect)((function(){if(t.forceView)return E(t.forceView);E(f),Object(p.a)(null===e||void 0===e?void 0:e.path).then((function(t){E(t||"editor")}))}),[f,null===e||void 0===e?void 0:e.path,S,t.forceView]);var T=Object(a.useState)(!0),I=Object(o.a)(T,2),N=I[0],P=I[1],R=Object(a.useRef)((null===e||void 0===e?void 0:e.path)||"");Object(a.useEffect)((function(){R.current=(null===e||void 0===e?void 0:e.path)||"",M(!1),e&&Object(l.d)((function(t){t.file.getContent(e.path,(function(t){k(t),M(!0)})),!0===h.d.curr.ui_editor_live_watch&&(console.log("[FILE CONTENT WATCH] enabled for ".concat(e.path)),t.watch.file(e.path,(function(t){if(R.current===t.filePath)return!0===V.current?q.current=t.fileContent:void k(t.fileContent)})))}))}),[null===e||void 0===e?void 0:e.path,S,N]);var A=Object(a.useState)(!1),F=Object(o.a)(A,2),L=F[0],M=F[1],z=Object(s.a)((function(t){Object(u.a)(t,20)}),3e3),D=Object(a.useRef)(!1),B=(Object(s.a)((function(){D.current=!1,console.log("reenable watch file")}),1e4),Object(a.useRef)({})),H=Object(a.useRef)(0);Object(a.useEffect)((function(){B.current;Object(l.d)((function(t){t.watch.appStatus((function(t){if(!1===t.isConnected)H.current=H.current+1,console.log("disabling watch update as disconnected"),D.current=!0;else if(!0===t.isConnected){if(H.current>=1&&t.isConnected)return}}))}))}),[null===e||void 0===e?void 0:e.path,x]);var U=Object(a.useRef)(x);Object(a.useEffect)((function(){U.current=x}),[x]);var W=function(t,n){Object(l.d)((function(e){e.file.saveContent(t,n,{history:!0,debounced:500})})),V.current=!0,J(),B.current={content:n,path:null===e||void 0===e?void 0:e.path},z({path:t,content:n,timestamp:Date.now()})},q=Object(a.useRef)(!1),V=Object(a.useRef)(!1),J=Object(s.a)((function(){V.current=!1,Object(c.a)(q.current)||(q.current=!1)}),2e3);Object(a.useEffect)((function(){e&&v&&Object(l.d)((function(t){t.ui.browser.goTo(e.folder,e.name,{ramCache:!0})}))}),[v]);var K=Object(s.a)((function(){Z(!1)}),100),G=Object(a.useState)(!1),Y=Object(o.a)(G,2),$=Y[0],Z=Y[1];return Object(m.c)(r.a.Fragment,null,N&&e&&Object(m.c)("div",{className:"window-editor-wrapper",onPaste:function(t){null!==e&&void 0!==e&&e.path&&Object(b.b)(t,(function(t){Object(g.b)({fileToUpload:t,folder:e.folder,windowId:S})}))},onDragOver:function(t){t.preventDefault(),t.stopPropagation(),console.log("handle dragover",null===e||void 0===e?void 0:e.path),Z(!0),K()},onDragLeave:function(t){},onDrop:function(t){console.log("window drop"),t.preventDefault(),t.stopPropagation(),Z(!1),console.log("handle drop",null===e||void 0===e?void 0:e.path),null!==e&&void 0!==e&&e.path&&function(t,n){if(console.log("handleFileDrop"),t.preventDefault(),t.dataTransfer&&t.dataTransfer.items){var e=t.dataTransfer.items;if(!e[0])return;for(var o=0;o<e.length;o++)n(e[o].getAsFile())}}(t,(function(t){Object(g.b)({fileToUpload:t,folder:e.folder,windowId:S})}))}},Object(m.c)(d.a,{windowId:S,file:e,fileContent:x,isActive:v,canEdit:L,isDragging:$,showViewToggler:t.showViewToggler,showToolbar:t.showToolbar,titleEditor:t.titleEditor,viewType:C,mobileView:t.mobileView,onLayoutUpdate:t.onLayoutUpdate,onReloadContent:function(){P(!1),setTimeout((function(){P(!0)}),100)},onFileEdited:function(t,n){W(t,n)}})))},w=r.a.memo(v,(function(t,n){return!1})),O=function(){return"\n\t.content-different-preview {\n\t\tmax-height: 50vh;\n\t\twidth: 70vw;\n\t\toverflow-y: auto;\n\t\ttext-align: left;\n\t\t.content-different-preview-inner {\n\t\t\tbackground: #e7e7e7;\n\t\t\tpadding: 10px;\n\t\t\tborder-radius: 10px;\n\t\t}\n\t\t.diff-sign {\n\t\t\tfont-weight: bold;\n\t\t}\n\t\t.diff-sign.diff-modified {\n\t\t\tcolor: orange;\n\t\t}\n\t\t.diff-sign.diff-deleted {\n\t\t\tcolor: red;\n\t\t}\n\t\t.diff-sign.diff-added {\n\t\t\tcolor: green;\n\t\t}\n\t}\n\n\t// height 100% everywhere\n\t.window-editor-wrapper-wrapper,\n\t.window-editor-wrapper,\n\t.dual-view-wrapper,\n\t.editor-area,\n\t.preview-area-wrapper,\n\t.preview-area,\n\t.main-editor-wrapper{\n\t\t\theight: 100%;\n\t}\n\n\t.window-editor-wrapper {\n\t\n\t\t\n\n\t\t.content-wrapper {\n\t\t\t\theight:100%;\n\t\t}\n\t\t.note-active-ribbon {\n\t\t\t\theight: 2px;\n\t\t\t\twidth: 100%;\n\t\t}\n\t\t\n\n\t\t.editor-toolbar-dropdown {\n\t\t\tposition: absolute;\n\t\t\ttop: 10px;\n\t\t\tright: 0px;\n\t\t}\n\n\n\n\n\n\t\t\n\n\n\n\t\t// content css modification\n\t\t.dual-view-wrapper {\n\t\t\t\t.file-path-wrapper {\n\t\t\t\t\t\tdisplay:none;\n\t\t\t\t}\n\t\t\t\t\n\n\t\t\t\t//\n\t\t\t\t// ALL\n\t\t\t\t//\n\t\t\t\t&.device-desktop {\n\t\t\t\t\t\t.preview-area-wrapper {\n\t\t\t\t\t\t\t\tmargin-top: 33px;\n\t\t\t\t\t\t\t\t//padding: 5px 5px 5px 5px;\n\t\t\t\t\t\t\t\tbackground: ".concat(f.a.colors.bgPreview,";\n\t\t\t\t\t\t}\n\t\t\t\t\t\t.preview-area {\n\t\t\t\t\t\t\t\t//padding: 10px 10px 10px 10px;\n\t\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t//\n\t\t\t\t// FULL PREVIEW\n\t\t\t\t//\n\t\t\t\t&.device-desktop.view-preview {\n\t\t\t\t\t\t.editor-area {\n\t\t\t\t\t\t\t\twidth: 0%;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t.preview-area-wrapper {\n\t\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t//\n\t\t\t\t// FULL EDITOR\n\t\t\t\t//\n\t\t\t\t&.device-desktop.view-editor {\n\t\t\t\t\t\t.preview-area-wrapper {\n\t\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t.scrolling-bar-wrapper {\n\t\t\t\t\t\ttop: 33px;\n\t\t\t\t}\n\t\t}\n\t}\n")}},136:function(t,n,e){"use strict";e.d(n,"a",(function(){return o})),e.d(n,"b",(function(){return i}));var o=function(t){var n,e="; ".concat(document.cookie).split("; ".concat(t,"="));return 2===e.length?null===(n=e.pop())||void 0===n?void 0:n.split(";").shift():void 0},i=function(t,n,e){var o=new Date;o.setTime(o.getTime()+60*e*60*1e3);var i="expires="+o.toUTCString();document.cookie=t+"="+n+";"+i+";path=/"}},14:function(t,n,e){"use strict";e.d(n,"a",(function(){return o})),e.d(n,"b",(function(){return h})),e.d(n,"c",(function(){return m})),e.d(n,"d",(function(){return v}));var o,i=e(10),c=e(15),a=e(666),r=e(101),l=e(51),s=e(279),u=e.n(s),p=e(11),d=e(29),f=e(17),b="[RIPGREP INSTALL]",g=function(t){var n="rg-".concat(t.os,"-").concat(t.arch);"win"===t.os&&(n+=".exe");var e=-1!==["rg-darwin-arm","rg-darwin-x64","rg-darwin-x64","rg-linux-x64","rg-win-x64.exe"].indexOf(n),o="Tiro Notes requires the tool Ripgrep, which does not seem to be installed on your computer",i="Install Ripgrep",c=function(){},a="rg-install-notif";e&&(o+="<br>Do you want Tiro to download and install it? <br><br> The following version will be downloaded and installed: <br><code>".concat(n,"</code>"),c=function(){var e="".concat("https://github.com/dotgreg/tiro-notes/raw/master/platforms/electron/not-packaged/ripgrep/").concat(n);Object(p.d)((function(o){o.config.get((function(i){var c=Object(d.b)("".concat(f.a.path.configFolder,"/bin/")),r=Object(d.b)("".concat(i.dataFolder,"/").concat(c,"/").concat(n));console.log(c,r),o.ui.notification.emit({id:a,content:"".concat(b," downloading ripgrep..."),options:{hideAfter:-1}}),o.ressource.download(e,c,(function(){var n,cb;o.ui.notification.emit({id:a,content:"".concat(b," updating config..."),options:{hideAfter:-1}}),n=r,cb=function(){o.userSettings.updateSetupJson("rg_path",r,(function(t){o.ui.notification.emit({id:a,content:"".concat(b," finished, restarting tiro notes..."),options:{hideAfter:10}})}),{requiresServerRestart:!0})},"win"!==t.os?Object(p.d)((function(t){var e="chmod 0755 ".concat(n);t.command.exec(e,(function(t){console.log("".concat(b," -> cmd: ").concat(e," : ").concat(t)),cb(t)}))})):cb()}),{fileName:n})}))}))}),e||(o+='\n <br><br>To install it, follow these instructions :<br> <a href="https://github.com/BurntSushi/ripgrep#installation">https://github.com/BurntSushi/ripgrep#installation</a> \n <br> then restart Tiro',i="ok"),Object(p.d)((function(t){t.popup.prompt({title:"Ripgrep install required",text:o,onAccept:c,onRefuse:function(){},acceptLabelButton:i})}))},h={on:function(){},off:function(){}},m=function(){var t=l.a.global.protocol,n=Object(r.b)("backend-port")?":".concat(Object(r.b)("backend-port")):"".concat(l.a.global.port),e="".concat(t).concat(l.a.global.url).concat(n);return Object(r.b)("backend-port").includes(".")&&(e="".concat(t).concat(Object(r.b)("backend-port"))),e},v=function(){return new Promise((function(t,n){if(!o){var e=s?u.a:function(){};o=e(m()),l.a.log.socket&&console.log("[SOCKET] try connecting to ".concat(m(),"...")),(h=O(o)).on("onServerError",(function(t){"NO_RIPGREP_COMMAND_AVAILABLE"===t.status&&Object(p.d)((function(n){g(t.platform)}))})),h.on("connectionSuccess",(function(n){l.a.log.socket&&console.log("[SOCKET] connection successful!, socket.connected :".concat(o.connected),n),n.isRgGood,t({socket:o,ipsServer:n.ipsServer,socketManager:h})}))}}))},w=function(t,n){return["%c [CLIENT SOCKET 2] ".concat(t),"background: #ccc; color: red",n||null]},O=function(t){var n={};return{on:function(e,o){var r=function(t,n){return function(e){var o;l.a.log.socket&&(o=console).log.apply(o,Object(c.a)(w("<== ON ".concat(t," "),Object(i.a)({},e)))),n(e)}}(e,o),s=Object(a.a)(1,1e8);return n[s]={endpoint:e,apiFn:r},t.on(e,r),s},off:function(e){n[e]&&(t.off(n[e].endpoint,n[e].apiFn),delete n[e])},emit:function(n,e){var o;l.a.log.socket&&(o=console).log.apply(o,Object(c.a)(w("==> EMIT ".concat(n," "),Object(i.a)({},e)))),t.emit(n,e)}}}},153:function(t,n,e){"use strict";e.d(n,"a",(function(){return d})),e.d(n,"c",(function(){return f})),e.d(n,"b",(function(){return g}));var o=e(15),i=e(30),c=e(11),a=e(13),r=e(28),l=e(9),s=e(45),u=e(128),p=e(72),d=Object(u.a)((function(t,n){return b(t,n)})),f=function(t,n){return Object(s.a)({file:t,windowId:n,pattern:i.a.externalLink3,replacement:function(t){var n=t.matchs,e=document.createElement("span");return e.innerHTML=d(n),e}})},b=function(t,n){var e=[];e=Array.isArray(t)?t:Object(o.a)(t.matchAll(i.a.externalLink3))[0];var l=document.createElement("span"),s=e[0].slice(0,-1),u=Object(p.b)(s),d=function(t,cb){var n=t.dataset.link;Object(c.d)((function(t){t.ressource.fetchUrlArticle(n,(function(n){var e=encodeURIComponent(n.html);t.ui.floatingPanel.create({type:"ctag",ctagConfig:{tagName:"web",content:e}}),cb(n)}))}))},f="";null!==n&&void 0!==n&&n.addLineJump&&(f="\n");var b=r.d,g='<span title="Open link in detached window"\nonclick="'.concat(Object(r.c)("open-win-link",(function(t){if(t){var n=t.dataset.link;window.open(n,"popup-preview-link","width=800,height=1000")}})),'"\nclass="link-action link-openwindow" data-link="').concat(s,'">').concat(b("up-right-from-square"),"</span>"),h='<span\nonclick="'.concat(Object(r.c)("fetch-link",(function(t){t&&d(t,(function(){}))})),'"\ntitle="Display url content" class="link-fetcharticle link-action" data-link="').concat(s,'">').concat(b("file-lines"),"</span>"),m='<span\nonclick="'.concat(Object(r.c)("audio-link",(function(t){t&&d(t,(function(t){t.text&&Object(c.d)((function(n){n.ui.textToSpeechPopup.open(t.text)}))}))})),'"\ntitle="Text to speech url content" class="link-audio link-action" data-link="').concat(s,'">').concat(b("volume-high"),"</span>"),v='<span\n\t\tonclick="'.concat(Object(r.c)("detach-link",(function(t){if(t){var n=t.dataset.link;Object(c.d)((function(t){t.ui.floatingPanel.create({type:"ctag",ctagConfig:{tagName:"web",content:n}})}))}})),'"\n\t\ttitle="Detach link in floating panel" class="link-detach link-action" data-link="').concat(s,'">').concat(b("window-restore"),"</span>"),w='<span class="link-action-more"><span class="icon-more">'.concat(b("ellipsis"),'</span><span class="link-action-wrapper">').concat(h," ").concat(m," ").concat(v," ").concat(g," </span></span>"),O='<span class="'.concat(Object(a.e)()?"mobile-version":"",' link-mdpreview-wrapper"><a href="').concat(s,'" class="link-mdpreview" title="').concat(s,'" target="_blank" rel="noreferrer">').concat(b("link")).concat(u,"</a>").concat(w).concat('<span class="cm-hover-popup cm-hover-popup"></span>',"</span>").concat(f);return l.innerHTML="".concat(O),l.outerHTML},g=function(t){var n=parseFloat(t.get("ui_editor_links_preview_zoom")),e=t.get("beta_floating_windows");return isNaN(n)&&(n=1),isNaN(e)&&(e=!1),"\n.link-fetch-preview-wrapper {\n\t\tbackground: grey;\n}\n// .preview-area-wrapper .link-mdpreview-wrapper,\n// .preview-area .link-mdpreview-wrapper {\n// \tdisplay: inline-block;\n// }\n\n".concat(e?"":".link-detach {display:none;}","\n\n.link-mdpreview-wrapper {\n\t\tposition: relative;\n}\n.link-mdpreview-wrapper .link-action {\n}\n.link-deco {\n\t\tpadding-right:2px;\n}\n.link-action-more {\n\t\tposition: relative;\n}\n.link-action-wrapper {\n\t\tdisplay:flex;\n\t\tposition: absolute;\n\t\tright: -30px;\n\t\ttop: -10px;\n\t\topacity: 0;\n\t\ttransition: 0.2s all;\n\t\tpointer-events: none;\n\t\tbackground: white;\n\t\tbox-shadow: 0px 0px 5px rgba(0,0,0,0.1);\n\t\tpadding: 7px;\n\t\tz-index: 10000;\n}\n.link-action-wrapper span {\n\tmargin: 0px 2px;\n}\n\n\n// mobile version\n.mobile-version .link-action-wrapper {\n\t\tright: 10px ;\n}\n.mobile-version .link-action {\n\t\ttransform: scale(1.3);\n\t\tpadding: 7px; \n}\n.link-action-wrapper .link-action {\n\t\tpadding-left:4px;\n}\n\n.link-action-more {\n\t\tmargin-right: 6px;\n\t\topacity: 0.3;\n}\n.link-action-more .icon-more {\n\t\tposition:relative;\n\t\ttop:1px;\n}\n.link-action-more .icon-more svg {\n\t\ttransform: scale(0.7);\n}\n.link-action-more:hover {\n\t\topacity: 1;\n}\n.link-action-more:hover .link-action-wrapper {\n\t\topacity: 1;\n\t\tpointer-events:all;\n}\n\n.link-action \t\tsvg,\n.link-action span,\n.link-action div {\n\t\tpointer-events:none;\n}\n\n.link-action {\n\t\topacity: 0.5;\n\t\tcursor: pointer;\n}\n.cm-hover-popup {\n}\n.cm-hover-popup .resource-link-ctag {\n\t\tborder-radius: 7px;\n\t\toverflow:hidden;\n\t\tbox-shadow: 0 0 4px rgba(0,0,0,0.3);\n}\n\n// height size iframe here\n.cm-hover-popup .resource-link-ctag .iframe-view-wrapper.not-fullscreen {\n\t\n\theight: 400px!important;\n}\n\n.cm-hover-popup .resource-link-ctag .iframe-view-wrapper iframe {\n\t\twidth: ").concat(100/n,"%!important;\n\t\theight: ").concat(100/n,"!important;\n\t\tmax-height: ").concat(100/n,"%!important;\n\t\ttransform-origin:top left;\n\t\ttransform: scale(").concat(n,");\n\t\tmargin-left: 15px;\n}\n\n.link-mdpreview-wrapper {\n\n}\n.link-mdpreview {\n\t\topacity: 0.6;\n\t\ttransition: 0.2s all;\n\t\t&:hover {\n\t\t\t\topacity: 1;\n\t\t}\n\t\tline-height: 20px;\n\t\ttext-decoration: none;\n\t\tcolor: ").concat(l.a.colors.main,";\n\t\t// border: solid 2px ").concat(l.a.colors.main,";\n\t\tpadding: 0px 2px 0px 0px;\n\t\tcursor: pointer;\n\t\tborder-radius: 5px;\n\t\tsvg {\n\t\t\t\tcolor: ").concat(l.a.colors.main,";\n\t\t}\n}\n")}},155:function(t,n,e){"use strict";e.d(n,"a",(function(){return h})),e.d(n,"b",(function(){return m}));var o=e(15),i=e(5),c=e(10),a=e(38),r=e(55),l=e(25),s=e(122),u=e(211),p=e(60),d=e(118),f=e(11),b=e(13),g=e(0),h=function(t){var n=Object(c.a)({},t),e=n.w,o=n.h,i=n.x,r=n.y,l=n.file;o||(o=d.c.rows),e||(e=d.c.cols),i||(i=0),r||(r=0);var s=Object(a.a)();return{layout:{i:s,x:i,y:r,w:e,h:o,minH:1,maxH:2,forceRender:0},content:{i:s,active:!1,file:l,view:"both"}}},m=function(){var t=Object(g.useState)([]),n=Object(i.a)(t,2),e=n[0],c=n[1],a=Object(p.a)("tabs",[],{history:!1,debouncedSave:5e3}),u=Object(i.a)(a,3),d=u[0],h=u[1],m=u[2],k=Object(p.a)("tabs-mobile",[],{history:!1,debouncedSave:5e3}),y=Object(i.a)(k,3),_=y[0],C=y[1],E=y[2],S=Object(g.useRef)([]),T=function(t,cb){S.current=t,c(S.current),"mobile"!==Object(b.a)()&&h(S.current),"mobile"===Object(b.a)()&&C(S.current)},I=function(){m(),E()};Object(g.useEffect)((function(){I()}),[]),Object(g.useEffect)((function(){S.current=e}),[e]),Object(g.useEffect)((function(){"mobile"!==Object(b.a)()&&c(d)}),[d]),Object(g.useEffect)((function(){"mobile"===Object(b.a)()&&c(_)}),[_]);var N=function(t){var n=x({fullWindowFile:t});if(n){var e=[].concat(Object(o.a)(S.current),[n]),i=j(n.id,e);T(i)}},P=function(t){var n=[],e=Object(r.a)(S.current);Object(l.a)(e,(function(e,o){e.id!==t&&n.push(e)})),T(n)},R=function(t){if(!t){var n=Object(r.a)(S.current),e=O(n);if(!Object(s.a)(e))return;t=n[e]}if(t.grid.layout[0]){var o=t.grid,i={layout:o.layout[0],content:o.content[0]};return Object(l.a)(o.content,(function(t,n){t.active&&(i={layout:o.layout[n],content:o.content[n]})})),i}};return{tabs:e,updateTab:function(t,n,e){if("add"===t)Object(f.e)().then((function(t){N(t.ui.browser.files.active.get)}));else if("close"===t){if(!n)return;P(n.id)}else if("rename"===t){if(!n)return;if(e.length>15)return;var o=Object(r.a)(S.current);Object(l.a)(o,(function(t){t.id===n.id&&(t.name=e,t.manualName=!0)})),T(o)}else if("activate"===t){if(!n)return;var i=j(n.id,S.current),c=v(i);if(T(c),"desktop"!==Object(b.a)()){var a,s=null===(a=R(n))||void 0===a?void 0:a.content.file;if(!s)return;Object(f.d)((function(t){t.ui.browser.goTo(s.folder,s.name)}))}}},refreshTabsFromBackend:I,updateActiveTabGrid:function(t,cb){var n=Object(r.a)(S.current),e=O(n);if(Object(s.a)(e)){n[e].grid=Object.assign(n[e].grid,t);var o=n[e].refresh;n[e].refresh=o?o+1:1,T(n)}},refreshWindowGrid:function(){var t=v(S.current);T(t)},tabsApi:{get:function(){return S.current},close:P,openInNewTab:N,reorder:function(t,n){var e=Object(r.a)(S.current),o=e[t];e.splice(t,1),e.splice(n,0,o),T(e)},active:{get:function(){var t=null;return Object(l.a)(S.current,(function(n){n.active&&(t=n)})),t}}},windowsApi:{close:function(t){var n=Object(r.a)(S.current);Object(l.a)(t,(function(t){Object(l.a)(n,(function(n,e){for(var o=0;o<n.grid.content.length;o++){var i=n.grid.content[o],c=n.grid.layout[o];i.i===t&&n.grid.content.splice(o,1),c.i===t&&n.grid.layout.splice(o,1)}}))}));var e=v(n);T(e)},active:{get:R,setContent:function(t){if(t){var n=Object(r.a)(S.current),e=O(n);if(Object(s.a)(e)){var o=n[e],i=o.grid.content;if(!(i.length<1)){var c=0;Object(l.a)(i,(function(t,n){!0===t.active&&(c=n)})),i[c].file=Object(r.a)(t),o.manualName||(o.name=w(t.name));var a=v(n);T(a)}}}}},updateWindows:function(t,n){var e=Object(r.a)(S.current);Object(l.a)(t,(function(t){Object(l.a)(e,(function(e,o){Object(l.a)(e.grid.content,(function(e){e.i===t&&(e.file=n)}))}))}));var o=v(e);T(o)},getIdsFromFile:function(t){var n=[];return Object(l.a)(S.current,(function(e){Object(l.a)(e.grid.content,(function(e){e.file&&e.file.path===t&&n.push(e.i)}))})),n}}}},v=function(t){var n=Object(r.a)(t);return Object(l.a)(n,(function(t){t.refresh=Object(u.a)(t.refresh)})),n},w=function(t){return t.length>15?"".concat(t.substring(0,13),".."):t},O=function(t){var n=void 0;return Object(l.a)(t,(function(t,e){t.active&&(n=e)})),n},j=function(t,n){var e=Object(r.a)(n);return Object(l.a)(e,(function(n){n.refresh=Object(s.a)(n.refresh)?n.refresh++:1,n.id===t?n.active=!0:n.active=!1})),e},x=function(t){if(t.copiedTab){var n=Object(r.a)(t.copiedTab);return n.id=Object(a.a)(),n.name=k(t.copiedTab.name),n}if(t.fullWindowFile){var e=h({file:t.fullWindowFile});return{id:Object(a.a)(),name:w(t.fullWindowFile.name),active:!0,grid:{layout:[e.layout],content:[e.content]}}}},k=function(t){var n=t,e=n[n.length-1];return isNaN(parseInt(e))?n+=" 1":(n=n.slice(0,-1),n+="".concat(parseInt(e)+1)),n}},159:function(t,n,e){"use strict";e.d(n,"c",(function(){return Z})),e.d(n,"a",(function(){return X})),e.d(n,"b",(function(){return Q}));var o=e(23),i=e(15),c=e(5),a=e(0),r=e.n(a),l=e(13),s=e(237),u=e(54),p=e(68),d="[TEXT MANIP ACTION]",f=function(t){var n=Object(a.useRef)(0),e=t.editorRef,o=t.editorRef,i=t.editorRef,c=function(){var c;if("codemirror"===t.editorType){var a=u.a.getCurrentLineInfos(e.current);if(!a)return null;c=a,n.current=a.currentPosition}else if("monaco-textarea"===t.editorType){var r;if("desktop"===t.deviceType)c=null===(r=o.current)||void 0===r?void 0:r.getCurrentLineInfos(),n.current=c&&c.monacoPosition?c.monacoPosition:0;else c=i.current?Object(p.c)(i.current):null,n.current=c&&c.currentPosition?c.currentPosition:0}return c},r=function(c){var a=n.current+c;if("codemirror"===t.editorType)u.a.updateCursor(e.current,a,!0);else if(Object(l.c)("desktop")){var r;null===(r=o.current)||void 0===r||r.editor.setPosition(a)}else{var s=i.current;if(!s)return;s.focus(),setTimeout((function(){s&&(s.selectionStart=a,s.selectionEnd=a)}))}};return{getLineTextInfos:c,resetCursorPosition:r,applyTextModifAction:function(t,n){var e=c();return e?(console.log(d,"applying =>",t,n),Object(p.f)(t,e,(function(t){console.log(d,"applying a decal of cursor of :",t),r(t)}),n)):null}}},b=e(121),g=function(t,n){var e=f({editorType:"monaco-textarea",deviceType:"mobile",editorRef:n.mobileTextarea}),o=e.getLineTextInfos,i=e.resetCursorPosition,r=function(t){var n=Object(a.useState)(0),e=Object(c.a)(n,2),o=e[0],i=e[1];return{saveYTextarea:function(n){var e=t.current?t.current.scrollTop:0;i(n||e)},resetYTextarea:function(){t.current&&(console.log("resetYTextarea",o),t.current.scrollTop=o)}}}(n.mobileTextarea),l=r.saveYTextarea,s=r.resetYTextarea,u=Object(a.useState)(!1),d=Object(c.a)(u,2),g=d[0],h=d[1];Object(b.a)((function(){h(!1)}),500);return{onTextareaChange:function(e){console.log("onTextareaChange");var c=e.target.value,a=c[e.target.selectionStart-1]&&c[e.target.selectionStart-1].charCodeAt(0);if(c.length>t.length){var r=o();if(!r)return;c=Object(p.g)(r,a,(function(t){setTimeout((function(){i(t),s()}))}))}n.onMobileNoteEdition(c)},onTextareaScroll:function(t){if(!g){var n=t.target.scrollTop;l(n),console.log("onTextareaScroll")}}}},h="",m=e(210),v=e(116),w=e(1),O=e(14),j=e(66),x=e(9),k=e(19),y=e(226),_=e(42),C=e(225),E=e(219),S=e(182),T=e(220),I=e(233),N=e(11),P=e(215),R=e(162),A=e(25),F=e(78),L=function(t,n){var e=".window-id-".concat(t," .preview-area-wrapper"),o=document.querySelector(e),i="print-wrapper";if(o){!function(){var t=document.querySelectorAll(".".concat(i));Object(A.a)(t,(function(t){t.classList.remove(i)}))}();var c=Object(j.a)(new Date(n.modified||0)),a=Object(j.a)(new Date(n.modified||0)),r="\n<head>\n\t<title>".concat(n.name,' </title>\n\t\n</head>\n<html>\n\t<body>\n\t\t\n\t\t<div class="simple-css-print-wrapper">\n\t\t\t<div class="hide-print">\n\t\t\t\t<bm> Export options </bm>\n\t\t\t\t<button onclick="window.print()">print</button>\n\t\t\t\t<button onclick="window.print()">export to pdf</button>\n\t\t\t\t<button onclick="window.alert(\'CTRL+ S then select *complete webpage* if available\')">export to html</button>\n\t\t\t</div>\n\t\t\t\t<div class="file-infos-wrapper">\n\t\t\t\t\tNote Name : ').concat(n.name,"<br>\n\t\t\t\t\tNote Path : ").concat(n.path,"<br>\n\t\t\t\t\tCreated : ").concat(c,"<br>\n\t\t\t\t\tEdited : ").concat(a,"<br>\n\t\t\t\t</div>\n\t\t\t\t").concat(o.innerHTML,"\n\t\t\t</div>\n\t\t\t<style>").concat(Object(F.c)({w:".simple-css-print-wrapper",pl:".preview-link",r:".resource-link-icon"}),"</style>\n\t\t\t<style>").concat(M(),'</style>\n\n<script>\n\tconsole.log("hello world")\n<\/script>\n\n\n\t</body>\n</html>\n\t\t\t\t'),l=window.open("","print-popup","width=800,height=1000");null===l||void 0===l||l.document.write(r)}},M=function(){return"\n@page {\nmargin: 0;\n}\n@media print {\n.hide-print {\ndisplay: none;\n\n}\n}\n\n* {\n\t-webkit-print-color-adjust: exact; \n\tprint-color-adjust: exact; \n}\n\n\t.file-path-wrapper {\n\t\tdisplay: none;\n\t}\n\th1.title.big-title {\n\t\tdisplay: none;\n\t}\n\t.file-infos-wrapper {\n\t\tdisplay: none;\n\t\tbackground: #eeeeee;\n\t\tpadding: 10px;\n\t\tmargin: 10px;\n\t}\n\n\t.simple-css-print-wrapper {\n\t\tmargin: 20px;\n\t\twidth: 90%;\n\t}\n\t.simple-css-wrapper {\n\t\tfont-size: 12px;\n\t}\n\n\ttable {\n\t\tfont-size: 12px!important;\n\t}\n\timg {\n\t\t// max-width: 300px!important;\n\t\t// max-height: 500px!important;\n\t\tmax-width: 100%;\n\t\tmax-height: 500px;\n\t}\n\t.block-tag {\n\t\t\tdisplay: none;\n\t}\n"},z=e(183),D=e(29),B=e(17),H=e(218),U=e(28),W=function(t){if(t){var n=t.dataset.format,e=t.dataset.path;if(n&&e){var o=Object(D.d)(e);Object(N.d)((function(t){Object(N.d)((function(t){t.ui.notification.emit({content:"[EXPORT] converting...",id:"export",options:{hideAfter:-1}})})),t.config.get((function(e){var i="/".concat(B.a.path.configFolder,"/").concat(B.a.path.cacheFolder,"/pandoc");t.folders.create(i,(function(c){var a="";"dzslides"===n&&(a="--self-contained"),"slideous"===n&&(a="--self-contained"),"revealjs"===n&&(a="--self-contained"),"beamer"===n&&(a="--self-contained");var r=n;"dzslides"===n&&(r="html"),"slideous"===n&&(r="html"),"revealjs"===n&&(r="html"),"latex"===n&&(r="tex"),"gfm"===n&&(r="md"),"latex-pdf"===n&&(r="pdf"),"beamer"===n&&(r="pdf");var l="".concat(o.name),s="".concat(l,".").concat(r),u="".concat(e.dataFolder,"/"),p=Object(D.b)("".concat(u,"/").concat(o.folder)),d=Object(D.b)("./".concat(o.name)),f=Object(D.b)("".concat(u,"/").concat(i)),b=Object(D.b)("".concat(f,"/").concat(s)),g=Object(D.b)("/".concat(B.a.path.configFolder,"/").concat(B.a.path.cacheFolder,"/pandoc/").concat(s)),h='cd "'.concat(p,'" && pandoc --output="').concat(b,'" --verbose ').concat(function(t,n){var e=t.userSettings.get("export_pandoc_cli_options").split("\n")||[],o={};return Object(A.a)(e,(function(t){var n=t.split("|");2===n.length&&(o[n[0].trim()]=n[1].trim())})),console.log(o,e),o[n]||""}(t,n)," ").concat(a," --to=").concat(n,' "').concat(d,'" ');!1===h.includes("--from=")&&(h=h.replace("--to=","--from=markdown --to="));var m=h;"latex-pdf"===n&&(m='cd "'.concat(p,'" && pdflatex -halt-on-error -output-directory="').concat(f,'" -jobname="').concat(l,'" "').concat(d,'" '));var v=function(n){var e=""===n.stderr?n.stdout:n.stderr;console.error("[CONVERT ERROR]:",n),t.ui.notification.emit({content:'[EXPORT] Error <br/> "'.concat(e," <br/><br/> ").concat(n.shortMessage,'"'),id:"export",options:{hideAfter:-1}})};t.command.exec("pkill -9 pandoc",(function(n){t.command.exec(m,(function(t){var n={failed:!1,stderr:null,shortMessage:null};try{n=JSON.parse(t)||{failed:!1}}catch(o){v(n)}if(n.failed)v(n);else{var e=Object(H.a)(g);!function(t,n){var e=document.createElement("a");e.setAttribute("download",t),e.setAttribute("href",n),e.setAttribute("target","_blank"),Object(N.d)((function(t){t.ui.notification.emit({content:"[EXPORT] done",id:"export",options:{hideAfter:3}})})),e.click()}(s,e)}}))}))}))}))}))}}},q=e(170),V=e(376),J=e(122),K=e(167),G=e(35),Y=e(24),$=function(t){var n,e=Object(a.useState)(""),o=Object(c.a)(e,2),d=o[0],b=o[1],x=Object(a.useRef)(null),F=!0;!1===t.canEdit&&(F=!1),!1===t.isConnected&&(F=!1);var M=!0;!1===t.showViewToggler&&(M=!1);var B=!0;!1===t.showToolbar&&(B=!1);var H=!Object(q.a)(t.titleEditor)&&!Object(V.a)(t.titleEditor)||t.titleEditor,Y=Object(a.useRef)(t.file);Object(a.useEffect)((function(){Y.current=t.file}),[t.file.path]);var $=function(t){var n=Object(a.useRef)(!1),e=Object(a.useRef)(!1);Object(a.useEffect)((function(){e.current=t.canEdit}),[t.canEdit]),Object(a.useEffect)((function(){return n.current=!1,t.onEditorDidMount&&t.onEditorDidMount(),function(){t.onEditorWillUnmount&&(o(),t.onEditorWillUnmount())}}),[t.file.path]),Object(a.useEffect)((function(){o()}),[t.file.path]),Object(a.useEffect)((function(){t.onNoteContentDidLoad&&t.onNoteContentDidLoad()}),[t.fileContent,t.file.path]);var o=function(){""!==h&&t.onNoteLeaving&&t.onNoteLeaving(n.current,h),h=t.file.path};return{triggerNoteEdition:function(e){n.current?t.onNoteEdition&&t.onNoteEdition(e,!1):t.onNoteEdition&&t.onNoteEdition(e,!0),n.current=!0}}}({file:t.file,fileContent:t.fileContent,canEdit:F,onEditorDidMount:function(){b(t.fileContent)},onEditorWillUnmount:function(){},onNoteContentDidLoad:function(){O.a&&b(t.fileContent)},onNoteEdition:function(n,e){var o=Y.current;b(n),e&&Object(N.d)((function(n){n.history.save(o.path,t.fileContent,"enter")})),t.onFileEdited(o.path,n)},onNoteLeaving:function(t,n){}}).triggerNoteEdition,Z=Object(a.useRef)(null),X=g(d,{mobileTextarea:Z,onMobileNoteEdition:$}),Q=(X.onTextareaChange,X.onTextareaScroll,Object(a.useRef)(null)),tt="desktop"!==Object(l.a)()?Z:x;"codemirror"===t.editorType&&(tt=Q);var nt=f({editorType:t.editorType,deviceType:Object(l.a)(),editorRef:tt}).applyTextModifAction,et=function(t,n,e){var o=nt("insertAt",{textToInsert:t,insertPosition:n,replaceText:e});o&&($(o),Tt())},ot=function(t){var n=Object(a.useState)(null),e=Object(c.a)(n,2),o=e[0],i=e[1],r=Object(a.useState)(!1),l=Object(c.a)(r,2),s=l[0],u=l[1],p=Object(a.useState)(!1),d=Object(c.a)(p,2),f=d[0],b=d[1],g=Object(a.useState)(null),h=Object(c.a)(g,2),O=h[0],j=h[1],x=function(n){var e=t.fileContent,o=Object(v.c)(e,n);if("failure"===o.status)j(null);else{console.log("encryption done",o),u(!1);var i=o.cipher;t.onTextEncrypted(i)}},k=function(n){var e=t.fileContent,o=Object(v.a)(e,n);if("failure"===o.status)j(null),alert("wrong password");else{b(!0),u(!0),console.log("decryption done",o);var i=o.plaintext;t.onTextDecrypted(i)}};return{APasswordPopup:Object(w.c)(m.a,{onClose:function(){i(null)},onSubmit:function(t){var n=o;i(null),j(t),"toEncrypt"===n&&x(t),"toDecrypt"===n&&k(t)}}),askForPassword:o,decryptButtonConfig:{title:"decrypt text",icon:"faUnlock",action:function(){O?k(O):i("toDecrypt")}},encryptButtonConfig:{title:"encrypt text",icon:"faLock",action:function(){O?x(O):i("toEncrypt")}},ifEncryptOnLeave:function(cb){if(s&&O){console.log("[EVENTS EDITOR] shouldEncryptOnLeave");var n=Object(v.c)(t.fileContent,O);n.cipher&&cb(n.cipher)}j(null),b(!1)},noHistoryBackupWhenDecrypted:f}}({fileContent:d,onTextEncrypted:function(n){$(n),Tt(),Object(N.d)((function(e){e.history.save(t.file.path,n,"int")}))},onTextDecrypted:function(t){$(t),Tt()}}),it=ot.APasswordPopup,ct=ot.askForPassword,at=ot.decryptButtonConfig,rt=ot.encryptButtonConfig,lt=(ot.ifEncryptOnLeave,ot.noHistoryBackupWhenDecrypted,Object(a.useContext)(I.a)),st=Object(a.useState)(-1),ut=Object(c.a)(st,2),pt=ut[0],dt=ut[1],ft=function(n,e){return{title:"",class:"upload-button-wrapper",action:function(){},customHtml:Object(w.c)(S.a,{file:t.file,windowId:t.windowId,type:n,label:e})}},bt=[{title:"Reload content",icon:"faSync",action:function(){kt.current=kt.current+1,t.onReloadContent(kt.current)}},G.d.curr.beta_floating_windows?{icon:"faWindowRestore",title:"Detach Window",action:function(){Object(N.d)((function(n){n.ui.floatingPanel.create({type:"file",file:t.file,view:t.viewType})}))}}:{}].concat(Object(i.a)(function(){var t=[ft("all","Upload files")];return"desktop"!==Object(l.a)()&&(t.push(ft("image","Upload Gallery")),t.push(ft("camera","Capture")),t.push(ft("microphone","Record"))),t}()),[{title:"Search",icon:"faSearch",action:function(){Object(N.d)((function(t){t.ui.note.editorAction.dispatch({type:"searchWord",searchWordString:" "})}))}},Object(v.d)(d)?at:rt,{title:"Export",icon:"faFileDownload",action:function(){var n;n=t.file,Object(N.d)((function(t){t.popup.show('\n <div id="export-popup-wrapper">\n <div class="buttons-list"> \n <button onclick="'.concat(Object(U.c)("export-note-to",W),'" data-format="docx" data-path="').concat(n.path,'">docx</button>\n <button onclick="').concat(Object(U.c)("export-note-to",W),'" data-format="odt " data-path="').concat(n.path,'">odt</button>\n <button onclick="').concat(Object(U.c)("export-note-to",W),'" data-format="pdf" data-path="').concat(n.path,'">pdf</button>\n \n <button onclick="').concat(Object(U.c)("export-note-to",W),'" data-format="gfm" data-path="').concat(n.path,'">markdown</button>\n <button onclick="').concat(Object(U.c)("export-note-to",W),'" data-format="epub" data-path="').concat(n.path,'">epub</button>\n <button onclick="').concat(Object(U.c)("export-note-to",W),'" data-format="rtf" data-path="').concat(n.path,'">rtf</button>\n </div>\n <br/>\n <div class="buttons-list"> \n Latex:\n <br/>\n <button onclick="').concat(Object(U.c)("export-note-to",W),'" data-format="latex" data-path="').concat(n.path,'">latex (.tex)</button>\n <button onclick="').concat(Object(U.c)("export-note-to",W),'" data-format="latex-pdf" data-path="').concat(n.path,'">latex (.pdf)</button>\n \n </div>\n <br/>\n <div class="buttons-list"> \n Slides: \n <br/>\n <button onclick="').concat(Object(U.c)("export-note-to",W),'" data-format="pptx" data-path="').concat(n.path,'">pptx</button>\n <button onclick="').concat(Object(U.c)("export-note-to",W),'" data-format="beamer" data-path="').concat(n.path,'">beamer</button>\n <br/>\n <br/>\n HTML Slides: <br/>\n <button onclick="').concat(Object(U.c)("export-note-to",W),'" data-format="revealjs" data-path="').concat(n.path,'">revealjs</button>\n <button onclick="').concat(Object(U.c)("export-note-to",W),'" data-format="dzslides" data-path="').concat(n.path,'">dzslides</button>\n <button onclick="').concat(Object(U.c)("export-note-to",W),'" data-format="slideous" data-path="').concat(n.path,'">slideous</button>\n \n </div>\n <br/>\n <br/>\n <div class="advice"> \n Export requires extra install, please check settings > export.\n </div>\n </div>\n '),"Export Note to :",(function(t){console.log(t)}))}))}},{title:"Print",icon:"faPrint",action:function(){"editor"===(t.viewType||"editor")?(zt("both"),setTimeout((function(){L(t.windowId,t.file),setTimeout((function(){zt("editor")}))}),100)):L(t.windowId,t.file)}},{title:k.a.editorBar.explanation.history,icon:"faHistory",action:function(){vt(!mt)}},{title:k.a.editorBar.tts,icon:"faCommentDots",action:function(){Object(N.d)((function(n){n.ui.textToSpeechPopup.open(d,{id:t.file.name})}))}},{title:"Delete note",class:"delete",icon:"faTrash",action:function(){lt.file.onFileDelete(t.file)}}]),gt=Object(a.useState)(!1),ht=Object(c.a)(gt,2),mt=ht[0],vt=ht[1],wt=Object(a.useRef)(null),Ot=wt.current,jt=700;Ot&&(jt=Ot.clientHeight/1.3),"mobile"===Object(l.a)()&&(jt=window.innerHeight);var xt=Object(a.useRef)(null);Object(a.useEffect)((function(){Tt()}),[t.fileContent,t.file.path,t.windowId]);var kt=Object(a.useRef)(0),yt=Object(a.useRef)(0),_t=Object(a.useState)(0),Ct=Object(c.a)(_t,2),Et=Ct[0],St=Ct[1],Tt=function(){yt.current=yt.current+1,St(yt.current)},It=Object(a.useState)(!1),Nt=Object(c.a)(It,2),Pt=Nt[0],Rt=Nt[1],At=Object(a.useState)(!1),Ft=Object(c.a)(At,2),Lt=Ft[0],Mt=Ft[1];Object(a.useEffect)((function(){var t=d.length>3e10&&"desktop"!==Object(l.a)();Rt(t)}),[d,t.viewType]),Object(a.useEffect)((function(){var n=d.length>3e9&&"desktop"!==Object(l.a)();Rt(n),Tt();var e="desktop"===Object(l.a)()&&"preview"===t.viewType||"desktop"!==Object(l.a)()&&"preview"===t.mobileView;Mt(e);var o=t.file.path;setTimeout((function(){o===t.file.path&&Tt()}),100)}),[t.viewType,t.mobileView]);var zt=function(n){t.onLayoutUpdate("windowViewChange",{view:n})},Dt=Object(a.useState)(-1),Bt=Object(c.a)(Dt,2),Ht=Bt[0],Ut=Bt[1];Object(a.useEffect)((function(){var n=t.editorAction;if(n&&(console.log("[EDITOR ACTION] action ".concat(n.type," triggered on ").concat(n.windowId)),("mobile"===Object(l.a)()||"active"!==n.windowId||t.isActive)&&("mobile"===Object(l.a)()||"active"===n.windowId||n.windowId===t.windowId))){if("lineJump"===n.type){var e=0;if(n.lineJumpNb&&(e=n.lineJumpNb),n.lineJumpString){var o=(null===n||void 0===n?void 0:n.lineJumpString)||"",i=t.fileContent.split("\n");Object(A.a)(i,(function(t,n){t.includes(o)&&(e=n+3)}))}Ut(e),setTimeout((function(){Ut(-1)}),100)}if("insertText"===n.type&&n.insertText&&n.insertPos&&et(n.insertText,n.insertPos,!1),"replaceText"===n.type&&n.replaceText&&n.replacePos){et(n.replaceText,n.replacePos,!0);var c=Q.current;if(!c)return;if(!Object(J.a)(n.replacePos))return;u.a.updateCursor(c,n.replacePos,!0)}if("searchWord"===n.type&&n.searchWordString){var a=Q.current;if(!a)return;u.a.searchWord(a,n.searchWordString,n.searchReplacementString,!0)}if("setSelection"===n.type&&n.selection){var r=Q.current;if(!r)return;u.a.setSelection(r,n.selection)}if("undo"===n.type){var s=Q.current;if(!s)return;u.a.undo(s.view)}if("redo"===n.type){var p=Q.current;if(console.log(p,p.view),!p)return;u.a.redo(p.view)}"uploadProgress"===n.type&&dt(n.uploadProgress||-1)}}),[t.editorAction,t.windowId]);var Wt=function(){Object(N.d)((function(n){var e;null===(e=n.lastNotesApi)||void 0===e||e.addToHistory(t.file,!1)}))},qt=Object(a.useState)({x:0,y:0,from:0,to:0,fromPx:0,toPx:0}),Vt=Object(c.a)(qt,2),Jt=Vt[0],Kt=Vt[1],Gt=d.substring(Jt.from,Jt.to),Yt=".window-id-".concat(t.windowId),$t=(null===(n=document.querySelector(Yt))||void 0===n?void 0:n.getBoundingClientRect().top)||0,Zt=(Jt.y,"desktop"===Object(l.a)()?40:10),Xt="desktop"===Object(l.a)()?0:10;return Object(w.c)("div",{className:"editor-area",ref:wt},Object(w.c)("div",{className:"infos-editor-wrapper ".concat(H?"with-title-editor":"no-title-editor")},(!0===H||"disabled"===H)&&Object(w.c)(r.a.Fragment,null,Object(w.c)("div",{className:"file-path-wrapper"},t.file.path.replace("/".concat(t.file.name),"")),Object(w.c)(s.a,{title:t.file.name.replace(".md",""),enabled:!0===H,onEdited:function(n,e){t.onTitleEditedHook&&t.onTitleEditedHook();var o="".concat(t.file.folder).concat(n,".md"),i="".concat(t.file.folder).concat(e,".md");lt.file.onTitleUpdate(o,i);Object(D.d)(i);Tt()}})),B&&Object(w.c)("div",{className:"toolbar-and-dates-wrapper"},Object(w.c)("div",{className:"editor-toolbar-dropdown"},Object(w.c)(E.a,{hover:!0,dir:"right",maxHeight:jt,onMouseEnter:function(n){t.onLayoutUpdate("windowActiveStatus")}},Object(w.c)(r.a.Fragment,null,M&&Object(w.c)("div",{className:"view-toggler-wrapper"},"mobile"!==Object(l.a)()&&Object(w.c)(_.a,{class:"editor-view-toolbar",size:.8,buttons:[{title:"Editor",icon:"custom_icons/view-3.svg",action:function(){zt("editor")}},{title:"Editor with minimap",icon:"custom_icons/view-4.svg",action:function(){zt("editor-with-map")}},{title:"Dual view",icon:"custom_icons/view-1.svg",action:function(){zt("both")}},{title:"Render view",icon:"custom_icons/view-2.svg",action:function(){zt("preview")}}]})),Object(w.c)("div",{className:"toolbar-wrapper"},Object(w.c)(_.a,{class:"editor-main-toolbar",design:"vertical",size:1,buttons:bt})),Object(w.c)("div",{className:"separation-bar"}),Object(w.c)("div",{className:"note-id-wrapper"},Object(w.c)("h4",null,"Note Link"),Object(w.c)("div",{className:"note-id-form"},Object(w.c)("input",{type:"text",ref:xt,onClick:function(t){var n=t.target;n.setSelectionRange(0,n.value.length)},value:Object(z.a)(t.file),readOnly:!0}),Object(w.c)(_.a,{class:"note-id-toolbar",size:1,buttons:[{title:"Copy note ID",icon:"faClipboard",action:function(){var t=xt.current;t&&Object(P.a)(t)}}]}))),Object(w.c)("div",{className:"dates-wrapper"},Object(w.c)("div",{className:"date modified"},Object(w.c)("h4",null,"Modified"),Object(j.a)(new Date(t.file.modified||0))),Object(w.c)("div",{className:"date created"},Object(w.c)("h4",null,"Created"),Object(j.a)(new Date(t.file.created||0)))),Object(w.c)("div",{className:"path-wrapper"},Object(w.c)("div",{className:"path"},Object(w.c)("h4",null,"Path"),Object(w.c)("span",{className:"path-link",onClick:function(){Object(N.d)((function(n){n.ui.browser.goTo(t.file.folder,t.file.name)}))}}," ",t.file.folder," ")))))))),Object(w.c)(T.a,{progress:pt}),Object(w.c)("div",{className:"main-editor-wrapper ".concat(H?"with-title-editor":"no-title-editor"," ").concat(t.windowId)},!Lt&&!Pt&&"codemirror"===t.editorType&&Object(w.c)(R.a,{windowId:t.windowId,ref:Q,file:t.file,pluginsConfig:t.pluginsConfig,value:d,posY:t.posY,jumpToLine:Ht||0,forceRender:Et,onChange:function(t){Wt(),$(t)},onEvent:function(t){},onScroll:function(n){t.onScroll(n),Kt({x:-9999,y:-9999,from:0,to:0,fromPx:-9999,toPx:-9999})},onTitleClick:t.onTitleClick,onCursorMove:function(t){Kt(t)}}),!Lt&&Pt&&Object(w.c)("div",{className:"codemirror-mobile-fallback"},Object(w.c)("p",null," Note is too long for mobile, the advanced edition features are disabled "),Object(w.c)("textarea",{defaultValue:d,onChange:function(t){Wt(),$(t.target.value)}}))),Object(w.c)("div",{className:"mobile-text-manip-toolbar-wrapper",style:{top:Zt,left:Xt}},Object(w.c)(C.a,{cursorInfos:Jt,selection:Gt,onButtonClicked:function(n){if("aiSearch"===n)Object(K.b)({windowId:t.windowId,file:t.file,fileContent:d,selectionTxt:Gt,insertPos:Jt.to});else if("calc"===n)Object(p.e)({windowId:t.windowId,file:t.file,fileContent:d,selectionTxt:Gt,insertPos:Jt.to});else if("undo"===n)Object(N.d)((function(n){n.ui.note.editorAction.dispatch({windowId:t.windowId,type:"undo"})}));else if("redo"===n)Object(N.d)((function(n){n.ui.note.editorAction.dispatch({windowId:t.windowId,type:"redo"})}));else if("proofread"===n)Object(N.d)((function(n){n.ui.floatingPanel.create({type:"ctag",layout:"bottom",ctagConfig:{tagName:"proofread",content:Gt,opts:{file:t.file}}})}));else if("copyLineLink"===n)Object(N.d)((function(n){var e=Object(z.a)(t.file,Gt);n.popup.prompt({title:"Selection note link",text:'Link to the selected text <br/><br/> <input type="text" value="'.concat(e,'">')})}));else{var e=nt(n);e&&(Wt(),$(e),Tt())}}})),ct&&it,mt&&Object(w.c)(y.a,{file:t.file,onClose:function(){vt(!1)}}))},Z=function(t){return"\n\n\n.editor-area {\n\t\twidth: ".concat(Object(l.c)("desktop")?"50%":"editor"===t?"100vw":"0vw",";\n\t\tdisplay: block;\n\n\t\tposition: ").concat(Object(l.c)("desktop")||"editor"===t?"relative":"absolute!important",";\n\t\ttop: ").concat("editor"!==t||Object(l.c)("desktop")?"-9999px":"0px",";\n\n\n\t\t.mobile-text-manip-toolbar {\n\t\t\t\tdisplay: ").concat("editor"!==t||Object(l.c)("desktop")?"none":"flex",";\n\t\t}\n\n\t\t.infos-editor-wrapper {\n\t\t\t\t").concat(Object(l.c)("desktop")?"":"height: ".concat(x.a.sizes.mobile.editorTopWrapper,"px;"),"\n\t\t\t\t").concat(Object(l.c)("desktop")?"width: calc(200% - ".concat(3*x.a.sizes.block*2,"px);"):"","\n\t\t\t\tpadding: 0px ").concat(Object(l.c)("desktop")?3*x.a.sizes.block:2*x.a.sizes.block,"px;\n\t\t\t\tposition: relative;\n\n\t\t\t\t").concat(Q(),"\n\n\t\t\t\t.title-input-wrapper {\n\t\t\t\t\t\tposition:relative;\n\t\t\t\t\t\tmargin-top: ").concat(Object(l.c)("desktop")?6:0,"px;\n\t\t\t\t\t\t.press-to-save {\n\t\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\t\ttop: 39px;\n\t\t\t\t\t\t\t\tfont-size: 8px;\n\t\t\t\t\t\t\t\tcolor: ").concat(x.a.colors.main,";\n\t\t\t\t\t\t\t\tright: 0px;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tinput {\n\t\t\t\t\t\t\t\tpadding: 0px;\n\t\t\t\t\t\t\t\tborder: none;\n\t\t\t\t\t\t\t\tbackground: none;\n\t\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t\n\n\t\t\t\t.toolbar-and-dates-wrapper {\n\t\t\t\t\t\tdisplay: flex;\n\t\t\t\t}\n\n\t\t\t\t.dates-wrapper {\n\t\t\t\t\t\tdisplay: ").concat(Object(l.c)("desktop")?"block":"none",";\n\t\t\t\t\t\t.date {\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t").concat(S.b,"\n }\n}\n\n\n\n\n.main-editor-wrapper {\n ").concat(Object(l.c)("desktop")?"":"padding: 0px ".concat(2*x.a.sizes.block,"px 0px ").concat(2*x.a.sizes.block,"px;"),"\n ").concat(Object(l.c)("desktop")?"":"margin: 0px 0px ".concat(x.a.sizes.mobile.bottomBarHeight,"px 0px;"),"\n .monaco-editor {\n\t\t\t\tmargin: 0px;\n }\n .textarea-editor {\n\t\t\t\tborder: none;\n\t\t\t\twidth: 100%;\n\t\t\t\theight: calc(100vh - ").concat(x.a.sizes.mobile.editorTopWrapper+x.a.sizes.mobile.editorBar+2*x.a.sizes.mobile.bottomBarHeight,"px);\n\t\t\t\tmargin: 0px;\n\t\t\t\tpadding: 0px;\n\t\t\t\tbackground: rgba(255,255,255,0.7);\n }\n}\n\n.editor-area {\n\tposition:initial;\n\t.infos-editor-wrapper {\n\t\t\tz-index: 2;\n\t\t\tposition:absolute;\n\t\t\ttop: 0px;\n\t\t\tright: 7px;\n\t\t\twidth: 100%;\n\t\t\t&.with-title-editor {\n\t\t\t\tborder-bottom: 1px solid rgba(0 0 0 / 5%);\n\t\t\t}\n\t\t\t//box-shadow: 0px 0px 5px rgba(0,0,0,.2);\n\t\t\theight: 32px;\n\t\t\tpadding: 0px;\n\t}\n\t.main-editor-wrapper {\n\t\t\tpadding-left: 0px;\n\t\t\tpadding-rigth: 10px;\n\t\t\t").concat(Object(l.c)("desktop")?"margin-top: 33px;":"margin-top: 0px;","; \n\t\t\twidth: 100%;\n\t}\n\t.main-editor-wrapper.no-title-editor {\n\t\tmargin-top: 0px;\n\t}\n\t.infos-editor-wrapper {\n\t\t\tpadding-left: 3px;\n\t\t\tpadding-rigth: 10px;\n\t\t\twidth: calc(100% - 10px);\n\t\t\t&.no-title-editor {\n\t\t\t\twidth: 30px;\n\t\t\t}\n\t\t\t.title-input-wrapper {\n\t\t\t\t\tpadding-left: 10px;\n\t\t\t\t\t.press-to-save {\n\t\t\t\t\t\t\ttop: -6px;\n\t\t\t\t\t\t\tleft: 0px;\n\t\t\t\t\t\t\tright: initial;\n\t\t\t\t\t\t\topacity: 0.5;\n\t\t\t\t\t}\n\t\t\t\t\t.big-title {\n\t\t\t\t\t\t\twidth: calc(100% - 65px);\n\t\t\t\t\t\t\tfont-family: ").concat(x.a.font.editor,";\n\t\t\t\t\t\t\tcolor: grey;\n\t\t\t\t\t\t\tfont-size: ").concat(Object(Y.a)(5),"px;\n\t\t\t\t\t}\n\t\t\t}\n\t}\n}\n\n")},X=function(t){var n=Object(a.useContext)(N.a),e=(null===n||void 0===n?void 0:n.status.isConnected)||!1;return Object(a.useMemo)((function(){return Object(w.c)($,Object(o.a)({},t,{isConnected:e}))}),[t.viewType,t.mobileView,e,t.canEdit,t.editorType,t.windowId,t.file.created,t.file.name,t.file.path,t.file,t.fileContent,t.isActive,t.editorAction])},Q=function(){return"\n\n\n.file-path-wrapper {\n\t\tpadding-top: ".concat(Object(l.c)("desktop")?x.a.sizes.block:x.a.sizes.block/2,"px;\n\t\tfont-size: ").concat(Object(Y.a)(3),"px;\n\t\tfont-weight: 600;\n\t\tcolor: #b6b5b5;\n\t\tcursor: pointer;\n\t\ttext-transform: capitalize;\n}\n.big-title {\n\t\tcolor: ").concat(x.a.colors.main,";\n\t\tfont-size: ").concat(Object(Y.a)(5),"px;\n\t\tfont-weight: 600;\n\t\twidth: 100%;\n}\n\n.separation-bar {\n\t\twidth: 86%;\n height: 1px;\n background: #e6e6e6;\n margin: 10px 6%;\n}\n\n.dates-wrapper {\n\t\tposition: relative;\n\t\tmargin: 0px 0px 5px 0px;\n\t\tdisplay: block!important;\n .modified {\n\t\t\t\tcolor: grey;\n\t\t\t\ttext-align: left;\n }\n\t\t.created {\n\t\t\t\ttext-align: right;\n\t\t\t\tposition: absolute;\n\t\t\t\ttop: 0px;\n\t\t\t\tright: 0px;\n\t\t\t\tcolor: ").concat(x.a.colors.editor.interfaceGrey,";\n\t\t}\n}\n\n.path-wrapper {\n\t\tcolor: grey;\n text-align: left;\n\t\tpadding: 0px 0px 5px 0px;\n .path-link {\n\t\t\t\tcolor: ").concat(x.a.colors.main,";\n\t\t\t\tfont-weight: bold;\n\t\t\t\tcursor: pointer;\n }\n}\n\n.note-id-wrapper {\n\t\tcolor: grey;\n text-align: left;\n\t\t.note-id-form {\n\t\t\t\tmargin-bottom: 5px;\n\t\t\t\tdisplay:flex;\n\t\t\t\tinput {\n\t\t\t\t\t\tborder: none;\n\t\t\t\t\t\tpadding: 5px;\n\t\t\t\t\t\tbackground: #ebebeb;\n\t\t\t\t\t\tborder-radius: 3px;\n\t\t\t\t\t\tfont-size: 9px;\n\t\t\t\t\t\tfont-weight: 400;\n\t\t\t\t}\n\t\t}\n}\n.toolbar-and-dates-wrapper {\n\t\th4 {\n\t\t\t\tmargin: 0px;\n\n\t\t}\n}\n")}},160:function(t,n,e){"use strict";e.d(n,"a",(function(){return D})),e.d(n,"b",(function(){return H}));var o=e(10),i=e(23),c=e(5),a=e(0),r=e.n(a),l=e(38),s=e(92),u=function(t){var n=t.headerLog,e={},o=function(t){e[t]&&delete e[t]};return{notify:function(t){for(var i in e){var c=e[i],a=!1;if(i.endsWith("-once")&&(i=i.replace("-once",""),a=!0),i===t.subId)try{c(t.data),a&&o("".concat(i,"-once"))}catch(r){n&&console.log("".concat(n," error with function"),r)}}},subscribe:function(t,cb){e[t]=cb},subscribeOnce:function(t,cb){var n="".concat(t,"-once");e[n]=cb},unsubscribe:o}},p=e(91),d=e(41),f=e(18),b=e(14),g=e(17),h="[IFRAME PARENT] 00563",m=g.a.client.log.iframe,v=u({headerLog:h}),w=v.notify,O=v.subscribe,j=v.unsubscribe;window.addEventListener("message",(function(t){t.data.subId&&(m&&console.log(h,"parent <== iframe",t.data.data),w(t.data))}));var x={subscribe:O,unsubscribe:j,send:function(t,n){t&&t.contentWindow&&(m&&console.log(h,"parent ==> iframe",n),t.contentWindow.postMessage(n,"*"))}},k=function(t){var n="[IFRAME child js]",e={file:null,frameId:"",reloadCounter:0,windowId:"",innerTag:"",tagName:"",tagContent:"",loginToken:t.loginToken,backendUrl:t.backendUrl},o=function(t){if(""===e.frameId)return console.warn(n,"NO FRAME ID, CANNOT SEND TO PARENT");var o={subId:e.frameId,data:t};window.parent.postMessage(o,"*")},i=function(t){var n={error:"CUSTOM TAG/SCRIPT ERROR: ".concat(t)};o({action:"iframeError",data:n})};window.addEventListener("resize",(function(t){r("100%")}));var c,a={value:"100%"},r=function(t){var n=document.getElementById("content-wrapper");if(!t){if(!n||0===n.clientHeight)return;t=n.clientHeight+20}a.value="".concat(t),o({action:"resize",data:{height:t}})},l=function(){var t=document.body,n=t.requestFullScreen||t.webkitRequestFullScreen||t.mozRequestFullScreen||t.msRequestFullScreen;n&&n.call(t)},s=t.createEventBus({headerLog:"[FRAME API] 00567"}),u=s.subscribeOnce,p=s.notify,d=function(t,e){var o,i=t.url;i.includes(".js")?((o=document.createElement("script")).crossorigin="anonymous",o.rel="preload",o.src=i,t.type&&(o.type=t.type)):i.includes(".css")?((o=document.createElement("link")).href=i,o.rel="stylesheet",o.crossorigin="anonymous",o.type="text/css",t.type&&(o.type=t.type)):i.includes(".wasm")&&((o=document.createElement("link")).rel="preload",o.href=i,o.as="fetch",o.crossorigin="anonymous",o.type="application/wasm",t.type&&(o.type=t.type)),o.onload=function(){e()};var c=document.getElementById("external-ressources-wrapper");if(!c)return console.error(n,"could not load ".concat(i," because ressource wrapper was not detected"));c.appendChild(o)},f=function(n,e){var o="?token=".concat(t.loginToken),i=e||t.getRessourceIdFromUrl(n);return"".concat(t.backendUrl,"/static").concat("/.tiro/cache/ctag-ressources/").concat(i).concat(o)},b=function(t,cb){for(var e=0,o=function(){if(++e===t.length)try{cb&&cb()}catch(o){console.error(n,"ERROR LoadScript Callback : ".concat(o))}},i=function(){var e,i=t[c],a=(e=i.constructor===String?{url:i}:JSON.parse(JSON.stringify(i))).fileName,r=f(e.url,a),l=JSON.parse(JSON.stringify(e));l.url=r;var s,u,p,b=!0===window.disableCache,h=function(){g("ressource.download",[e.url,"/.tiro/cache/ctag-ressources/",{fileName:a}],(function(t){d(l,(function(){o()}))}))};b?(console.warn(n,"CACHE DISABLED, DOWNLOADING RESSOURCES EVERYTIME!"),h()):(s=l.url,u=function(){d(l,(function(){o()}))},p=function(){h()},fetch(s,{method:"HEAD"}).then((function(t){return t.ok?u():p()})).catch((function(t){return p(t)})))},c=0;c<t.length;c++)i()},g=function(n,e,cb){if(!e||!n||e.constructor!==Array||"string"!==typeof n)return i("Call Api : ".concat(n," => wrong arguments type / number(").concat(JSON.stringify({apiName:n,apiArguments:e,cb:cb}),")"));var c="iframe-api-call-".concat(t.generateUUID()," ");u(c,(function(t){cb&&cb(t)})),o({action:"apiCall",data:{reqId:c,apiName:n,apiArguments:e}})},h={version:1.2,call:g,utils:{getInfos:function(){return e},loadCachedRessources:b,getCachedRessourceUrl:f,getRessourceIdFromUrl:t.getRessourceIdFromUrl,loadScripts:function(t,cb){b(t,cb)},loadRessources:function(t,cb){b(t,cb)},loadScriptsNoCache:function(t,cb){for(var e=0,o=0;o<t.length;o++){var i=t[o],c=document.createElement("script");c.src=i,c.onload=function(){if(++e===t.length)try{cb&&cb()}catch(o){console.error(n,"ERROR LoadScript Callback : ".concat(o))}};var a=document.getElementById("external-ressources-wrapper");a&&a.appendChild(c)}},resizeIframe:r,fullscreenIframe:l,canScrollIframe:function(t){o({action:"canScrollIframe",data:{status:t}})},loadCustomTag:function(t,n,e){var o=h.utils.createDiv(),i=o.div,c=o.updateContent;e||(e={}),e.base_url=t.split("/").slice(0,-1).join("/").replace("//","/"),e.plugins_root_url=e.base_url.split("/").slice(0,-1).join("/").replace("//","/");var a=!0;return!1===e.padding&&(a=e.padding),h.utils.loadScripts([t],(function(){var t=window.initCustomTag("".concat(n),e);a&&(t='<div class="with-padding" style="padding: 0px 15px;">'.concat(t,"</div>")),c(t)})),i},uuid:t.generateUUID,createDiv:function(){var n="ctag-content-wrapper-".concat(t.generateUUID()," ");return{div:'<div id="'.concat(n,'"></div>'),updateContent:function t(e){var o=document.getElementById(n);o?o.innerHTML=e:setTimeout((function(){t(e)}),100)}}}}};return window.api=h,c={init:function(o){e.frameId=o.frameId,e.innerTag=o.innerTag,e.tagContent=o.tagContent,e.tagName=o.tagName,e.file=o.file,e.reloadCounter=o.reloadCounter,e.windowId=o.windowId;var c,a=document.getElementById("content-wrapper");if(a){var l=t.unescapeHtml(a.innerHTML),s=(c=l,t.replaceCustomMdTags(c,"[[script]]",(function(t){var e="".concat(t);try{return new Function(e)()}catch(o){console.warn(n,"[SCRIPT] error: ".concat(o),e),i("".concat(o,' in Code "').concat(e,'"'))}})));a.innerHTML=s,setTimeout((function(){r()}),100),t.bindToElClass("title-search-link",(function(t){var n=t.dataset.file,e=t.dataset.folder,o=t.dataset.windowid;h.call("ui.browser.goTo",[e,n,{openIn:o}])}))}},askFullscreen:l,apiAnswer:function(t){var n={subId:t.reqId,data:t.data};p(n)}},window.onmessage=function(t){var n=t.data;if(n)for(var e in c)c&&c[e]&&e===n.action&&c[e](t.data.data)},h},y=e(11),_=e(78),C=e(32),E=e(376),S=e(122),T=e(65);g.a.client.log.verbose;var I=["epub","pdf","iframe","web","smartlist","proofread"],N=function(t,cb){Object(y.d)((function(n){n.file.getContent("/.tiro/tags/".concat(t,".md"),(function(t){cb(t)}),{onError:function(){I.includes(t)?function(t,cb){var n="https://raw.githubusercontent.com/dotgreg/tiro-notes/dev/plugins/".concat(t,"/").concat(t,".js"),e="";"epub"===t&&(e='open:true, size: "80%"'),"pdf"===t&&(e="open:true"),"web"===t&&(e='"search_engines": {\n "default":"https://search.bowlman.org/search?q=",\n "g":"https://www.google.com/search?q=",\n "m": "https://www.google.com/maps/search/"\n }');var o='\n [[script]]\n return api.utils.loadCustomTag("'.concat(n,'",`{{innerTag}}`,{').concat(e,"})\n [[script]]\n ");console.log("".concat("[CTAG MANAGER]",' : ctag "').concat(t,'" not present in tiro/tags but part of the base, return base config'),{baseCtagTxt:o}),cb(o)}(t,(function(t){cb(t)})):cb(null)}})}))},P=e(13),R=e(31),A=e(1),F=(g.a.client.log.verbose,{}),L={},M=["latex","l"],z=function(t){var n="tag"===t.block.type&&!M.includes(t.block.tagName||""),e=Object(a.useState)(null),o=Object(c.a)(e,2),r=o[0],l=o[1],u=Object(a.useState)(null),p=Object(c.a)(u,2),d=p[0],f=p[1],b=Object(a.useState)("null"),g=Object(c.a)(b,2),h=g[0],m=g[1];Object(a.useEffect)((function(){var e,cb;n&&(m("loading"),"script"===t.block.tagName?(l("\n[[script]]".concat(t.block.content,"[[script]]")),setTimeout((function(){m("loaded")}),100),t.block.content=""):t.block.tagName&&(e=t.block.tagName,cb=function(t){t?(l(t),setTimeout((function(){m("loaded")}),100)):l(null)},Object(y.d)((function(t){t.plugins.get(e,"tag",(function(t){t&&"tag"===t.type?cb(t.code):("iframe"===e&&(e="web"),N(e,(function(t){cb(t)})))}))}))))}),[t.windowId,t.block.content]);var v="l"===t.block.tagName||"latex"===t.block.tagName;return Object(a.useEffect)((function(){if(!n){var e=s.b.render({raw:t.block.content,file:t.file,windowId:t.windowId});v&&(e="[[l]]".concat(t.block.content,"[[l]]")),f(e)}}),[t.windowId,t.file,t.block]),Object(A.c)("span",{className:"content-block ".concat(n?"block-tag":"block-text"," ")},"loaded"===h&&n&&r&&Object(A.c)(B,Object(i.a)({},t,{noteTagContent:r})),!n&&d&&Object(A.c)("span",{className:"content-block-text",dangerouslySetInnerHTML:{__html:d}}))},D=r.a.memo(z,(function(t,n){var e=!0;return JSON.stringify(t.block)!==JSON.stringify(n.block)&&(e=!1),t.block.content!==n.block.content&&(e=!1),t.file.path!==n.file.path&&(e=!1),t.windowId!==n.windowId&&(e=!1),e})),B=function(t){var n=Object(o.a)({},t).noteTagContent,e=Object(a.useState)(""),i=Object(c.a)(e,2),g=i[0],h=i[1],m=Object(a.useRef)(null),v=Object(a.useState)(""),w=Object(c.a)(v,2),O=w[0],j=w[1],I=Object(a.useState)(!1),N=Object(c.a)(I,2),M=N[0],z=N[1],D=Object(a.useState)(0),B=Object(c.a)(D,2),H=B[0],U=B[1],W=Object(a.useState)(null),q=Object(c.a)(W,2),V=q[0],J=q[1],K=Object(a.useState)(!1),G=Object(c.a)(K,2),Y=G[0],$=G[1],Z=function(){var n,e,o=function(n){Y&&t.onIframeMouseWheel(n)};return null===(n=m.current)||void 0===n||null===(e=n.contentDocument)||void 0===e||e.addEventListener("mousewheel",o),function(){var t,n;return null===(t=m.current)||void 0===t||null===(n=t.contentDocument)||void 0===n?void 0:n.removeEventListener("mousewheel",o)}};Object(a.useEffect)(Z,[t.yCnt,Y]);var X=Object(C.a)((function(e){Z(),j(e),J(null),x.subscribe(e,(function(n){if("resize"===n.action){var e=n.data,o=0,i=document.querySelector(".window-id-sizeref-".concat(t.windowId));if(!i)return;var c=i.getBoundingClientRect();if(Object(E.a)(e.height)&&e.height.endsWith("%")){var a=parseInt(e.height.replace("%",""))/100;o=c.height*a}else if(Object(S.a)(e.height))o=e.height;else{i.getBoundingClientRect();o=300}t.ctagHeightOffset&&(o+=t.ctagHeightOffset),U("".concat(o,"px")),z(!0)}if("canScrollIframe"===n.action){var r=n.data;$(r.status)}if("apiCall"===n.action){var l=n.data;Object(y.b)(l,(function(t,e){if("nok"===t)return J(e.error);var o={reqId:n.data.reqId,data:e};x.send(m.current,{action:"apiAnswer",data:o})}))}if("iframeError"===n.action){var s=n.data.error;J(s),Object(R.d)("".concat(s))}})),setTimeout((function(){var o={file:t.file,innerTag:t.block.content,windowId:t.windowId,frameId:e,reloadCounter:et,tagContent:n,tagName:t.block.tagName||"",loginToken:Object(f.b)(),backendUrl:Object(b.c)()};x.send(m.current,{action:"init",data:o})}),100)}),500),Q=function(){var e=s.b.render({raw:n,windowId:t.windowId,file:t.file}),o='\n<html>\n\t\t<div id="content-wrapper">\n\t\t\t\t'.concat(e,'\n\t\t</div>\n\t\t<div id="external-ressources-wrapper"></div>\n\t\t<script>\n\t\t\t\tconst IMPORTED_backend_url = "').concat(Object(b.c)(),'"\n\t\t\t\tconst IMPORTED_login_token = "').concat(Object(f.b)(),'"\n\t\t\t\tconst IMPORTED_replaceCustomMdTags = ').concat(p.c.toString(),"\n\t\t\t\tconst IMPORTED_unescapeHtml = ").concat(d.h.toString(),"\n\t\t\t\tconst IMPORTED_createEventBus = ").concat(u.toString(),"\n\t\t\t\tconst IMPORTED_generateUUID = ").concat(l.a.toString(),"\n\t\t\t\tconst IMPORTED_getRessourceIdFromUrl = ").concat(l.b.toString(),"\n\t\t\t\tconst IMPORTED_bindToElClass = ").concat(s.a.toString(),"\n\t\t\t\tconst main = ").concat(k.toString(),";\n\t\t\t\tmain({\n\t\t\t\t\tbackendUrl: IMPORTED_backend_url,\n\t\t\t\t\tloginToken: IMPORTED_login_token,\n\t\t\t\t\treplaceCustomMdTags: IMPORTED_replaceCustomMdTags,\n\t\t\t\t\tunescapeHtml: IMPORTED_unescapeHtml,\n\t\t\t\t\tcreateEventBus: IMPORTED_createEventBus,\n\t\t\t\t\tgenerateUUID: IMPORTED_generateUUID,\n\t\t\t\t\tgetRessourceIdFromUrl: IMPORTED_getRessourceIdFromUrl,\n\t\t\t\t\tbindToElClass: IMPORTED_bindToElClass\n\t\t\t\t})\n\t\t<\/script>\n<style>\n\t\tbody::backdrop {\n\t\t\tbackground: #F7F7F7;\n\t\t}\n</style>\n</html>\n"),i='\n\t\t\t\t<div class="simple-css-wrapper">\n\t\t\t\t'.concat(o,"\n\t\t\t\t</div>\n\t\t\t\t<style>\n\t\t\t\t").concat(Object(_.c)(),"\n\t\t\t\t</style>\n\t\t\t\t");i=Object(T.a)(i,[["{{innerTag}}",t.block.content.trim()]]),h(i)},tt=Object(a.useState)(0),nt=Object(c.a)(tt,2),et=nt[0],ot=(nt[1],Object(a.useState)(!1)),it=Object(c.a)(ot,2),ct=it[0];it[1];Object(a.useEffect)((function(){z(!1),Q();var t="iframe-".concat(Object(l.a)());return X(t),function(){x.unsubscribe(t)}}),[t.windowId,t.block.content,t.block.tagName,t.noteTagContent,et]);var at=t.index||0,rt="".concat(t.windowId,"-").concat(at,"-").concat(t.block.tagName);Object(a.useEffect)((function(){F[rt]?pt(!0):F={},L[rt]?gt(!0):F={}}),[]);var lt=Object(a.useState)(!1),st=Object(c.a)(lt,2),ut=st[0],pt=st[1],dt=Object(a.useState)(!1),ft=Object(c.a)(dt,2),bt=ft[0],gt=ft[1],ht=function(t){t||(t=!bt),L[rt]=t,gt(t),pt(!1)};Object(a.useEffect)((function(){t.ctagFullscreen&&ht(!0)}),[t.ctagFullscreen]);var mt=Object(l.a)();return Object(A.c)(r.a.Fragment,null,bt&&Object(A.c)("div",{className:"fullscreen-pin-bg",onClick:function(n){ht(!1),t.ctagOnFullscreenClose&&t.ctagOnFullscreenClose()}}),Object(A.c)("div",{className:"iframe-view-wrapper ".concat(M?"can-show":"hide"," iframe-tag-").concat(t.block.tagName," ").concat(ut?"pinned":"not-pinned"," ").concat(bt?"pinned fullscreen":"not-fullscreen"," ").concat(Object(P.e)()?"mobile":"")},!ct&&Object(A.c)("iframe",{onMouseLeave:function(t){!function(t,n){var e=document.getElementById(n);e&&e.focus({preventScroll:!0})}(0,mt)},ref:m,id:O,"data-testid":"iframe",title:O,srcDoc:g,className:"tag-iframe",style:{height:H},sandbox:t.ctagSandboxed?"allow-scripts allow-same-origin allow-popups":void 0}),V&&Object(A.c)("div",{className:"iframe-error"},Object(A.c)("code",null,Object(A.c)("pre",null,V))),Object(A.c)("input",{className:"refocus-input",id:mt,type:"text"})))},H=function(){return"\n.refocus-input {\n\tposition: fixed;\n\tz-index: -10000;\n\twidth: 0px;\n\theight: 0px;\n\topacity: 0.00001;\n\ttop: -10000px;\n\tleft: -10000px;\n}\n.content-blocks-wrapper {\n\t\t// padding: 0px 15px;\n}\n.simple-css-wrapper {\n}\n\n.content-blocks-wrapper,\n.simple-css-wrapper,\n.simple-css-wrapper > div,\n.content-block,\n.iframe-view-wrapper\n{\n}\n\n.fullscreen-pin-bg {\n\t\tposition: fixed;\n\t\ttop:0px;\n\t\tright: 0px;\n\t\twidth: 100vw;\n\t\theight: 100vh;\n\t\tbackground: rgba(0,0,0,0.5);\n\t\tz-index:101;\n}\n.iframe-view-wrapper {\n\t\t&.pinned {\n\t\t\t\tposition: fixed;\n\t\t\t\ttransform: rotate(360deg);\n\t\t\t\ttop: 10px;\n\t\t\t\tright: 10px;\n\t\t\t\tz-index: 1000;\n\t\t\t\toverflow:hidden;\n\t\t\t\tborder: 2px;\n\t\t\t\tbackground: white;\n\t\t\t\tborder-radius: 12px;\n\t\t\t\tbox-shadow: 0px 0px 5px #0006;\n\t\t\t\tiframe {\n\t\t\t\t\t\tmax-height: 90vh;\n\t\t\t\t\t\toverflow-y: scroll;\n\t\t\t\t}\n\t\t}\n\t\t&.pinned.fullscreen.mobile {\n\t\t\theight: calc(100vh - 80px);\n\t\t\tright: 10px;\n\t\t\twidth: calc(100vw - 20px);\n\t\t}\n\t\t&.pinned.fullscreen {\n\t\t\t\ttop: 20px;\n\t\t\t\tright: 20px;\n\t\t\t\tz-index:102;\n\t\t\t\twidth: calc(100vw - 40px);\n\t\t\t\theight: calc(100vh - 40px);\n\t\t\t\tiframe {\n\t\t\t\t\t\theight: calc(100% - 1px)!important;\n\t\t\t\t\t\tmax-height: calc(100% - 1px)!important;\n\t\t\t\t}\n\t\t}\n\t\tposition: relative;\n\t\t.ctag-menu {\n\t\t\t\tposition: absolute;\n\t\t\t\ttop: 3px;\n\t\t\t\tz-index: 10;\n\t\t\t\tleft: 15px;\n\t\t\t\tcursor: pointer;\n\t\t\t\topacity: 0;\n\t\t\t\ttransition: 0.2s all; \n\t\t\t\tdisplay: flex;\n\t\t\t\tpadding: 3px;\n\t\t\t\tpadding-left: 8px;\n\n\t\t\t\tmargin-left: 8px;\n\t\t\t\tmargin-right: 8px;\n\n\t\t\t\t.ctag-ellipsis {\n\t\t\t\t\t\tmargin-right: 15px;\n\t\t\t\t}\n\t\t}\n\t\t.ctag-menu .ctag-menu-button {\n\t\t\t\tdisplay: none;\n\t\t}\n\t\t&:hover {\n\t\t\t\t.ctag-menu {\n\t\t\t\t\t\topacity:0.5;\n\t\t\t\t}\n\t\t\t\t.ctag-menu:hover {\n\t\t\t\t\t\topacity:1;\n\t\t\t\t\t\tbackground: white;\n\t\t\t\t\t\tbox-shadow: 0px 0px 3px rgba(0,0,0,.1);\n\t\t\t\t\t\tborder-radius: 5px;\n\t\t\t\t\t\t.ctag-menu-button {\n\t\t\t\t\t\t\t\tmargin-right: 15px;\n\t\t\t\t\t\t\t\tdisplay: block;\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t}\n\n\t\t&.hide iframe {\n\t\t\t\topacity: 0;\n\t\t}\n\t\tiframe::backdrop {\n\t\t\t\tbackground-color: rgba(255,255,255,1);\n\t\t}\n\n\t\tiframe {\n\t\t\t\t// transition: 0.3s all;\n\t\t\t\twidth: calc(100% );\n\t\t\t\tborder: none;\n\t\t\t\tborder-radius: 5px;\n\t\t}\n\t\t.iframe-error {\n\t\t\t\tbackground: #ffddba;\n\t\t\t\tfont-size: 8px;\n\t\t\t\tpadding: 14px;\n\t\t\t\tborder: 2px #ffc080 solid;\n\t\t\t\tborder-radius: 5px;\n\t\t\t\tline-height: 14px;\n\t\t}\n}\n\n.content-block.block-text {\n\t\tpadding-bottom: 0px;\n}\n\n/* .content-block-text > * { */\n/* \t\tpadding: 0px 15px; */\n/* } */\n\n.content-block.block-tag {\n\t\tpadding: 0px 0px 0px 0px;\n position: relative;\n left: -15px;\n top: 0;\n width: calc(100% + 20px);\n height: calc(100% );\n display: block;\n}\n\n"}},162:function(t,n,e){"use strict";e.d(n,"a",(function(){return Q})),e.d(n,"b",(function(){return tt}));var o=e(5),i=e(0),c=e.n(i),a=e(240),r=e(242),l=e(49),s=e(12),u=e(373),p=e(9),d=e(63),f=e(13),b=e(213),g=e(54),h=e(209),m=e(15),v=e(25),w=e(17),O=e(11),j=e(31),x=(w.a.client.log.verbose,function(t,n,e,o,i){return{label:t,apply:n||t,info:e,detail:i,type:"tag",boost:o||0}}),k=function(t,n){var e=_(t,n);return[C(n),e,y(n)]},y=function(t){return function(n){var e=n.matchBefore(/\-\-/);if(!n.explicit&&!e)return null;var o="".concat(w.a.path.configFolder,"/snippets.md");return new Promise((function(i,c){Object(O.d)((function(c){c.file.getContent(o,(function(o){var c=[],a=o.split("\n");Object(v.a)(a,(function(t){var n,e=(t=t.split("\\n").join("\n")).split("|"),o=null===(n=e.shift())||void 0===n?void 0:n.trim(),i=e.join("|").trim();if(i&&o){if(o="--"+o,i.includes("${")){var a=i;try{i=new Function("return `"+a+"`")()}catch(s){var r="".concat("[Code Mirror]"," snippets error: ").concat(JSON.stringify({e:s,oto:a}));Object(j.d)(r)}}var l=i.length>20?"".concat(i.substring(0,20),"..."):i;c.push(x(o,i,void 0,void 0,l))}}));var r={from:e?e.from:n.pos,options:c,validFor:/.*/};t("snippets"),i(r)}))}))}))}},_=function(t,n){return function(e){var o=e.matchBefore(/\#/);return e.explicit||o?new Promise((function(i,c){Object(O.d)((function(c){var a=t.folder;console.log("searching for folder",a),c.search.word("#",a,(function(t){var c=[];Object(v.a)(t,(function(t){Object(v.a)(t.results,(function(t){var n=t.split(" ");Object(v.a)(n,(function(t){(t=t.trim())&&t.startsWith("#")&&(t.length<=1||"#"!==t[1]&&c.push(x(t,t)))}))}))}));var a={from:o?o.from:e.pos,options:c,validFor:/.*/};n("hashtag"),i(a)}))}))})):null}},C=function(t){return function(n){var e=n.matchBefore(/\[\[/);return n.explicit||e?new Promise((function(o,i){var c=new Promise((function(t,n){Object(O.d)((function(n){n.files.get("/.tiro/tags",(function(e){var o=0,i=[];Object(v.a)(e,(function(c){n.file.getContent(c.path,(function(n){o++,i.push({name:c.name,content:n}),o===e.length&&t(i)}))}))}))}))})),a=new Promise((function(t,n){Object(O.d)((function(n){var e=[];n.plugins.list((function(n){Object(v.a)(n,(function(t){"tag"===t.type&&e.push({name:t.name,content:t.code})})),t(e)}))}))}));Promise.all([a,c]).then((function(t){var n=function(t){var n=[];return Object(v.a)(t,(function(t){var e=t.name.replace(".md",""),o="[[".concat(e,"]]"),i="".concat(o," ").concat(o),c="Insert installed custom tag ".concat(o),a=0,r=t.content.split("\n"),l="// --insert:",s="// --comment:",u="// --boost:";Object(v.a)(r,(function(t){(t=t.split("\\n").join("\n")).startsWith(l)&&(i=t.replace(l,"")),t.startsWith(s)&&(c=t.replace(s,"")),t.startsWith(u)&&(a=parseInt(t.replace(u,"")))})),n.push(x(o,i,c,a))})),n}([].concat(Object(m.a)(t[0]),Object(m.a)(t[1])));r(n)})).catch((function(){console.warn("ERROR HERE")}));var r=function(i){var c={from:e?e.from:n.pos,options:i,validFor:/.*/};t("ctag"),o(c)}})):null}},E=e(115),S=e(88),T=e(153),I=e(73),N=e(110),P=e(207),R=e(30),A=e(84),F=e(45),L=e(1),M=function(t,n){return Object(F.a)({file:t,windowId:n,pattern:R.a.ressource,replacement:function(e){var o=e.matchs,i=document.createElement("span"),c=o[2];return"none"===Object(A.a)(c)?i.innerHTML=Object(N.a)(o[0],o[2],t,!0):i.innerHTML=function(t,n,e){var o=t[0],i='<div class="mdpreview-source">'.concat(o,"</div>"),c=Object(P.renderToString)(Object(L.c)(S.a,{markdownTag:o,file:n,windowId:e}));return"".concat(c," ").concat(i)}(o,t,n),i}})},z=e(95),D=e(224),B=e(27),H=e(170),U=e(122),W=e(55),q=e(32),V=e(221),J=e(222),K=e(99),G=e(24),Y=e(223),$="[Code Mirror]",Z=w.a.client.log.verbose,X=Object(i.forwardRef)((function(t,n){var e=function(){var t=n.current;return t&&t.state?t:null},p=Object(i.useRef)(null);Object(i.useEffect)((function(){!function(){var n,o=e();if(!o)return!1;if(t.value===p.current)return!1;if("loading..."===t.value)return!1;if((null===(n=o.view)||void 0===n?void 0:n.state.doc.toString())===t.value)return!1;var i=g.a.getCurrentLineInfos(o);if(!i)return!1;var c=i.currentPosition;g.a.updateText(o,t.value,c),p.current=t.value}()}),[t.value,t.forceRender,t.file.path]);var m=Object(i.useState)(!1),w=Object(o.a)(m,2),j=w[0],x=w[1];Object(i.useEffect)((function(){x(!1)}),[t.file.path]),Object(i.useEffect)((function(){!0===j&&y()}),[t.value]);var y=Object(q.a)((function(){var t=e();g.a.foldAllChildren(t)}),500),_=Object(i.useRef)(t.value);Object(i.useEffect)((function(){_.current=t.value}),[t.value]);var C=function(n,e){n!==t.value&&(p.current=n,_.current=n,t.onChange(n),Ft(!1),z.a.val=!1,P(),tt(n))};Object(i.useEffect)((function(){if(Z&&console.log($,"JUMP to line :",t.jumpToLine),-1!==t.jumpToLine){var n=e();if(n&&!(t.posY<=-10))try{g.a.scrollToLine(n,t.jumpToLine)}catch(o){console.log(o)}}}),[t.jumpToLine]);Object(i.useEffect)((function(){P()}),[t.value]),Object(i.useEffect)((function(){P()}),[]);var S=Object(b.a)(".window-id-".concat(t.windowId)).resizeState;Object(i.useEffect)((function(){P()}),[S,t.windowId]);var P=function(){var n=e();if(n){var o=g.a.getEditorInfos(n.view);d.a.updateEditorDims(t.windowId,{viewport:o.viewportHeight(),full:o.contentHeight}),d.a.updateScrollerDims(t.windowId)}},R=Object(E.c)({file:t.file,onTitleClick:function(n){!function(n){var o=e();if(o){var i=g.a.getCurrentLineInfos(o);i&&(Z&&console.log($,"CLICK ON TITLE DETECTED",n,i),t.onTitleClick(i.lineIndex))}}(n)}}),A=Object(i.useState)(null),F=Object(o.a)(A,2),G=F[0],X=F[1];Object(i.useEffect)((function(){var t=null;Object(v.a)(r.a,(function(n){"Javascript"===n.name&&(t=n)})),X(t)}),[]),Object(v.a)(r.a);var Q={base:a.markdownLanguage,codeLanguages:r.a,extensions:[]};G&&(Q.defaultCodeLanguage=G);var tt=Object(q.a)((function(t){t.includes("--table")&&!ot&&(it(!0),mt()),t.includes("--latex")&&!rt&&(lt(!0),mt()),t.includes("--spellcheck")&&!pt&&(dt(!0),mt()),!t.includes("--table")&&ot&&(it(!1),mt()),!t.includes("--latex")&&rt&&(lt(!1),mt()),!t.includes("--spellcheck")&&pt&&(dt(!1),mt())}),500),nt=Object(i.useState)(!1),et=Object(o.a)(nt,2),ot=et[0],it=et[1],ct=Object(i.useState)(!1),at=Object(o.a)(ct,2),rt=at[0],lt=at[1],st=Object(i.useState)(!1),ut=Object(o.a)(st,2),pt=ut[0],dt=ut[1],ft=Object(i.useState)(0),bt=Object(o.a)(ft,2),gt=bt[0],ht=bt[1],mt=function(){ht(gt+1)};Object(i.useEffect)((function(){tt(t.value)}),[t.value]);var vt=Object(i.useState)([]),wt=Object(o.a)(vt,2),Ot=wt[0],jt=wt[1],xt=Object(i.useState)(""),kt=Object(o.a)(xt,2),yt=kt[0],_t=kt[1],Ct=function(){var t,e=(null===n||void 0===n||null===(t=n.current)||void 0===t?void 0:t.editor)||null;if(console.log("onAutocomplete editorDiv",e),e){var o=e.getBoundingClientRect();setTimeout((function(){var t=document.querySelector(".cm-tooltip");console.log("open onAutocomplete",o,t),t.style.transform="translate(-".concat(o.left,"px, -").concat(o.top-40,"px)")}),100)}};Object(i.useEffect)((function(){Object(O.d)((function(n){var e=[Object(l.a)({override:k(t.file,Ct)}),s.c.domEventHandlers({scroll:function(t,n){},wheel:function(n,e){var o=g.a.getEditorInfos(e);d.a.onEditorScroll(t.windowId,o.currentPercentScrolled()),t.onScroll()}})];(n.userSettings.get("ui_editor_spellcheck")||pt)&&e.push(s.c.contentAttributes.of({spellcheck:"true"}));var o=t.pluginsConfig;o||(o={}),Object(H.a)(o.markdown)||(o.markdown=!0),Object(H.a)(o.linkPreview)||(o.linkPreview=!0);var i=n.userSettings;Object(f.a)();i.get("ui_editor_markdown_tags")&&e.push(Object(V.b)(t.file,t.windowId)),i.get("ui_editor_links_as_button")&&(e.push(Object(T.c)(t.file,t.windowId)),e.push(Object(I.c)(t.file,t.windowId,o.linkPreview))),i.get("ui_editor_markdown_table_preview")&&ot&&(e.push(Object(z.f)(t.file,t.windowId)),e.push(Object(z.g)(t.file,t.windowId)),e.push(Object(z.d)(t.file,t.windowId)),e.push(Object(z.c)(t.file,t.windowId))),i.get("ui_editor_markdown_latex_preview")&&rt&&Q.extensions.push(E.a),i.get("ui_editor_markdown_preview")&&(K.b||Object(K.a)(),e.push(R),i.get("ui_editor_markdown_enhanced_preview")&&(e.push(Object(J.a)(t.file,t.windowId)),e.push(Object(Y.a)(t.file,t.windowId)),e.push(Object(N.c)(t.file,t.windowId)),e.push(M(t.file,t.windowId)),e.push(Object(D.a)(t.file,t.windowId)))),o.markdown?e.push(Object(a.markdown)(Q)):e.push(Object(z.b)(t.file,t.windowId));var c="device-".concat(Object(f.a)()," ");i.get("ui_editor_markdown_table_preview")&&(c+="md-table-preview-enabled"),e.push(Et),jt(e),_t(c)}))}),[t.pluginsConfig,t.windowId,t.file.path,t.value,rt,ot,pt,gt]);var Et=s.c.domEventHandlers({blur:function(n,e){t.onEvent("blur")},focus:function(n,e){t.onEvent("focus")}}),St=Object(i.useRef)(""),Tt=Object(i.useRef)([-9999,-9999]),It=Object(i.useState)([-9999,-9999]),Nt=Object(o.a)(It,2),Pt=(Nt[0],Nt[1]),Rt=Object(i.useState)(!1),At=Object(o.a)(Rt,2),Ft=(At[0],At[1]),Lt=Object(i.useRef)({from:-1,to:-1}),Mt=Object(i.useRef)({from:-1,to:-1}),zt=[30,10],Dt=Object(i.useState)({x:0,y:0}),Bt=Object(o.a)(Dt,2),Ht=(Bt[0],Bt[1],Object(q.a)((function(n){var o,i=null===(o=e())||void 0===o?void 0:o.view;if(i){var c=i.coordsAtPos(i.state.selection.main.head),a=i.coordsAtPos(i.state.selection.ranges[0].from);if(!c)return;t.onCursorMove({x:c.left,y:c.top,from:n.from,to:n.to,fromPx:(null===a||void 0===a?void 0:a.top)||0,toPx:(null===a||void 0===a?void 0:a.bottom)||0})}n.from!==n.to&&Object(U.a)(n.from)&&Object(U.a)(n.to)&&(n.from<0||n.to<0||JSON.stringify(Mt.current)!==JSON.stringify(n)&&(Mt.current=Object(W.a)(n),Wt()))}),200)),Ut=function(t,n){"up"===t?St.current=t:"down"===t?Ft(!1):"move"===t&&(Tt.current=[n.clientX,n.clientY])},Wt=function(){Object(O.d)((function(t){if(t.userSettings.get("ui_editor_ai_text_selection")){Ft(!0);var n=Tt.current;Pt([n[0]+zt[0],n[1]+zt[1]])}}))},qt=Object(i.useMemo)((function(){return Object(L.c)(c.a.Fragment,null,Object(L.c)(u.a,{value:"",ref:n,theme:Object(h.a)(),onChange:C,onUpdate:function(t){!function(t){var n=t.state.selection.ranges[0];Lt.current=n,Ht(n)}(t)},basicSetup:{foldGutter:!0,dropCursor:!1,allowMultipleSelections:!1,indentOnInput:!1,closeBrackets:!1,history:!0,bracketMatching:!1,lineNumbers:!1},extensions:Ot}))}),[t.value,Ot]);return Object(L.c)(c.a.Fragment,null,Object(L.c)("div",{className:"codemirror-editor-wrapper ".concat(yt," "),onClick:function(t){Ut("up",t)},onMouseDown:function(t){Ut("down",t)},onMouseMove:function(t){return Ut("move",t)}},Object(L.c)("div",{className:"foldall-wrapper ".concat(Object(f.a)()),onClick:function(t){!function(){var t=e();j?g.a.unfoldAllChildren(t):g.a.foldAllChildren(t,!1),x(!j)}()}},Object(L.c)(B.b,{name:"".concat(j?"up-right-and-down-left-from-center":"down-left-and-up-right-to-center"),label:"".concat(j?"Unfold all text":"Fold all text")})),qt))})),Q=c.a.memo(X,(function(t,n){var e=!0;return t.forceRender!==n.forceRender&&(e=!1),t.jumpToLine!==n.jumpToLine&&(e=!1),t.file.path!==n.file.path&&(e=!1),e})),tt=function(){return"\n.draggable-grid-wrapper .cm-tooltip {\n\ttransform: inherit!important;\n}\n\n.codemirror-popup-cursor {\n\tposition: fixed;\n\tz-index: 2;\n\tbackground: white;\n\tpadding: 5px;\n\tbox-shadow: 0px 0px 5px rgba(0,0,0,0.3);\n\tborder-radius: 3px;\n}\n.cm-hover-popup.cm-selection-popup {\n\tdisplay: flex;\n\tposition: fixed;\n\tz-index: 2;\n\tbackground: white;\n\tpadding: 5px;\n\tbox-shadow: 0px 0px 5px rgba(0,0,0,0.3);\n\tborder-radius: 3px;\n\topacity:0.4;\n\ttransition: all 0.2s;\n\t.link-action {\n\t\tpadding: 0px 3px;\n\t\tdisplay: flex;\n\t\t.result-calc {\n\t\t\tpadding: 0px 3px;\n\t\t}\n\t}\n\t&:hover {\n\t\topacity:1;\n\t}\n\n}\n.cm-selectionLayer {\n pointer-events: none;\n\t\tz-index:0!important;\n}\n.cm-selectionBackground {\n\t\tbackground: rgba(0,0,0,0.1)!important;\n}\n\n.cm-search {\n\tz-index: 10;\n}\n\n.cm-gutters {\n\t\tborder: none;\n\t\topacity: 0;\n\t\tz-index: 0;\n\t\t&:hover {\n\t\t\t\topacity: 1;\n\t\t}\n\t\t.cm-gutter {\n\t\t\t\t.cm-gutterElement span {\n\t\t\t\t\t\tcolor: #cccaca;\n\t\t\t\t}\n\t\t}\n}\n.device-mobile {\n\t\t.cm-gutters {\n\t\t\t\topacity:1!important;\n\t\t\t\t// background:red!important;\n\t\t}\n}\n\n.foldall-wrapper {\n\t\t&.desktop {\n\t\t\t\topacity: 0;\n\t\t}\n\t\t&.desktop:hover {\t\n\t\t\t\topacity: 1;\n\t\t}\n\t\t&::selection {\n\t\t\t\tbackground: none;\n\t\t}\n\t\t\n\t\topacity:0.6;\n\t\tposition: absolute;\n\t\tz-index: 1;\n\t\ttop: 2px;\n\t\tcolor: #d7d7d7;\n\t\tcursor: pointer;\n\t\tpadding: 5px 4px;\n\t\tleft: 0px;\n\t\tbackground: white;\n}\n\n\n.actionable-title {\n\t\tcolor: ".concat(p.a.colors.main,";\n\t\tdisplay: inline-block;\n\t\tposition: relative;\n\t\t&:hover {\n\t\t\t\t&:before {\n\t\t\t\t\t\topacity: 1\n\t\t\t\t}\n\t\t}\n\t\t&.h1 {\n\t\t\t\tfont-size: ").concat(Object(G.a)(4),"px;\n\t\t\t\tfont-weight: bold;\n\t\t\t\tborder-bottom: ").concat(p.a.colors.main," 2px solid;\n\t\t\t\tmargin-bottom: 3px;\n\t\t}\n\t\t&.h2 {\n\t\t\t\tfont-size: ").concat(Object(G.a)(3),"px;\n\t\t\t\t// text-decoration: underline;\n\t\t\t\tborder-bottom: ").concat(p.a.colors.main," 1px solid;\n\t\t\t\tpadding-bottom: 1px;\n\n\t\t}\n\t\t&.h3 {\n\t\t\t\tfont-size: ").concat(Object(G.a)(2),"px;\n\t\t}\n\t\t&.h4 {\n\t\t\t\tfont-size: ").concat(Object(G.a)(1),"px;\n\t\t}\n\n}\n\n\n.cm-matchingBracket {\n\t\tbackground-color: rgba(0,0,0,0)!important;\n}\n\n\n.cm-content {\n\t\t// font-family: 'Open sans', sans-serif;\n\t\tfont-family: ").concat(p.a.font.editor,";\n\t\tfont-size:").concat(Object(G.a)(1),"px;\n}\n\n.cm-foldPlaceholder {\n\t\tmargin-left: 8px;\n\t\topacity: 0.5;\n\t\tpadding: 2px 5px;\n\t\tborder: none;\n}\n.cm-foldGutter {\n\t\t&::before {\n\n\t\t}\n}\n\n.cm-focused {\n\t\toutline: none!important;\n}\n.main-editor-wrapper {\n\t\t// width: calc(100% + 18px);\n\t\t// margin: 32px 0px 0px 0px;\n\t\tpadding: 0px;\n\t\twidth:100%;\n\t\theight: ").concat(Object(f.c)("desktop")?"calc(100% - 32px);":"calc(100% - 180px);",'; \n}\n\n.codemirror-editor-wrapper {\n\t\t// margin-right: 18px;\n\t\t// width: calc(100% - 10px);\n\t\tposition: relative;\n\t\t// left: -10px;\n}\n.codemirror-editor-wrapper, .cm-editor, .cm-theme {\n\t\t// height: calc(100% - 30px);\n}\n.codemirror-editor-wrapper, \t.cm-editor, .cm-theme {\n\t\theight: 100% ;\n\t\toverflow:hidden;\n\t\tpadding: 0px;\n}\n.cm-editor {\n\t\tword-break: break-word;\n}\n.cm-search {\n\t\tpadding: 6px 10px 11px;\n}\n\n.cm-scroller {\n\t\tz-index: auto!important;\n\t\twidth: calc(100% - 30px);\n\t\twidth: calc(100% - 23px); // reduce width overall CM\n\t\tpadding-right: 35px; // make scrollbar disappear\n\t\tpadding-left: 5px; // some space for the gutter\n\t\t.cm-content {\n\t\twidth: calc(100% - 10px); // needed otherwise x scroll\n\t\toverflow:hidden;\n\t\twhite-space: pre-wrap;\n\t}\xa0\n}\n.cm-line {\n}\n.cm-cursor {\n}\n\n.cm-tooltip-autocomplete {\n\t\t// transform: translate(-50%,-50%);\n\t\tpadding: 10px 5px;\n\t\tbackground: white;\n\t\tborder-radius: 5px;\n\t\tborder: none;\n\t\tbox-shadow: 0px 0px 5px rgba(0,0,0,0.3);\n\t\t[aria-selected="true"]{\n\t\t\t\tbackground: ').concat(p.a.colors.main,";\n\t\t\t\tborder-radius: 2px;\n\t\t}\n\n}\n\n.codemirror-mobile-fallback {\n\t\tmargin: 10px;\n\t\tp {\n\t\t\t\tcolor:grey;\n\t\t\t\tfont-size: ").concat(Object(G.a)(),'px;\n\t\t}\n\t\ttextarea {\n\t\t\t\twidth: calc(100% - 20px);\n\t\t\t\theight: calc(100vh - 230px);\n\t\t\t\tborder: 0px;\n\t\t}\n}\n\n.test-success {\n\t\t// background: orange;\n\t\tcolor: red;\n\t\tdisplay: block;\n\t\tpadding-top: 50px;\n}\n.tiro-image {\n\t\tcolor: red;\n\t\tdisplay: block;\n\t\tpadding: 20px;\n}\n.tiro-image-wrapper{\n\t\tposition: relative;\n\n\t\t&:before {\n\t\t\t\tposition: absolute;\n\t\t\t\ttop: 0px;\n\t\t\t\tleft: 50%;\n\t\t\t\tcontent: "x";\n\t\t\t\twidth: 50%;\n\t\t\t\theight: 100px;\n\t\t\t\tdisplay:block;\n\t\t\t\t// background: orange;\n\n\t\t}\n}\n\n// ').concat(Object(E.d)(),"\n\n// // FILE RESSOURCE PREVIEW\n// ").concat(Object(S.b)(),"\n\n// // PREVIEW LINK\n// ").concat(Object(I.b)(),"\n\n\n// ").concat(Object(z.e)(),"\n")}},166:function(t,n,e){"use strict";e.d(n,"a",(function(){return o}));var o=function(t){!function(){var t=document.getElementById("icon-page");t&&t.remove()}(),function(t){var n=document.createElement("link");n.rel="icon",n.href=t,n.id="icon-page",document.getElementsByTagName("head")[0].appendChild(n)}(t)}},167:function(t,n,e){"use strict";e.d(n,"a",(function(){return a})),e.d(n,"b",(function(){return r}));var o=e(10),i=e(11),c=e(68),a={},r=function(t){console.log("trigger AI search",t.windowId,t.file.path,t.selectionTxt,t.insertPos);var n=t.selectionTxt,e=t.fileContent,r=t.insertPos,l=e,s=!1,u=n=(n=(n=(n=n.replaceAll('"','\\"')).replaceAll("'","\\'")).replaceAll("`","\\`")).replaceAll("$","\\$"),p=function(){return{title:"Ai Answer",currentContent:l,textUpdate:" waiting for answer...",question:u,insertPos:r,windowId:t.windowId,file:t.file,isLast:!1}};a[t.windowId]=!0,Object(i.d)((function(e){var i=e.userSettings.get("ui_editor_ai_command");i=i.replace("{{input}}",n),Object(c.b)(p()),e.command.stream(i,(function(n){if(n.isError&&(s=!0),s){if(console.log("[AI ERROR]",n),""===n.text||"[object Object]"===n.text)return;e.ui.notification.emit({content:"[AI] Error while executing command <br/>============<br/> ANSWER => <br/>".concat(n.text," </br>============"),options:{hideAfter:600}}),Object(c.b)(Object(o.a)(Object(o.a)({},p()),{},{textUpdate:"",isLast:!0,linejump:a[t.windowId]}))}else Object(c.b)(Object(o.a)(Object(o.a)({},p()),{},{textUpdate:n.textTot,isLast:n.isLast,linejump:a[t.windowId]}))}))}))}},17:function(t,n,e){"use strict";e.d(n,"a",(function(){return o}));var o={tokenRefreshInHours:96,path:{staticResources:"static",defaultDataFolder:"markdown-notes",configFolder:".tiro",backendStateFolder:".states",cacheFolder:"cache",historyFolder:".history",archiveFolder:".history_archive",uploadFolder:".resources",relativeUploadFolderName:".resources"},metas:{headerStart:"=== HEADER ===",headerEnd:"=== END HEADER ==="},strings:{folders:"Folders",files:"files",images:"images",trashNote:"Are you sure to trash that note?",clickHereDisconnected:"(click here if persist)",searchingLabel:"searching...",lastNotes:"Last Notes",newNote:"New Note",dateModified:"Modified :",dateCreated:"Created :",searchPlaceholder:"Search Note",hoursAgo:" hours ago",daysAgo:" days ago",minsAgo:" mins ago",months:["January","February","March","April","May","June","July","August","September","October","November","December"],createFolder:"Create folder",createFolderPrompt:"New Folder name to create in",renameFolder:"Rename folder",renameFolderPrompt:"Rename folder to :",deleteFolder:"Delete folder",deleteFolderPrompt:"Are you sure you want to delete the folder and all its notes (no recovery possible) : ",deleteTabPrompt:"Are you sure you want to delete that tab? : ",moveToTrash:"Move to trash",moveToTrashPrompt:"Are you sure you want move folder in .tiro/.trash : ",loadingFolder:"loading...",moveFolderPrompt:"move folder",setupForm:{title:"Login to Tiro",saveToLs:"Autologin/Save for 30 days on that device",introText:"Welcome to Tiro, please fill these informations to get started",user:"user",password:"password",dataFolder:"folder path",userExplanation:"should have > 3 chars",passwordExplanation:"should have > 3 chars",folderExplanation:"relative from Tiro folder installation (../data for example)",successReload:"Configuration file successfully written, reloading application...",submit:"login",noFolder1:"folder path",noFolder2:"doesn't exists, please create it or choose another folder (no data will be deleted)."},appviews:{image:"Switch to Gallery View",text:"Switch to Files View"},loginForm:{wrongUserPassword:"Wrong login/password",wrongToken:"Authentication expired, please log again"},passwordForm:{explanation:"please enter your password",submit:"submit"},editorBar:{tts:"Text to speech",explanation:{history:"File history"},lightbox:"Show Images"},ttsPopup:{title:"Text to speech",voice:"Voice"},settingsPopup:{title:"Tiro Settings",backend:{title:"Server settings",explanation:"Only fill if server is on another port/protocol than the client (usually in development)",protocol:"Https",protocolExpl:"https or http",port:"Backend Port or URL",portExpl:'Port/Url used by backend (ex: "3023" or "backend.myurl.com" or "backend.url.com:3023")'}},historyPopup:{title:"Versions for ",thead:{date:"date",name:"version"}},rgNotWorking:"ERROR: Tiro requires Ripgrep to be working, it seems that ripgrep (rg command) is either not installed or not functionning correctly on you computer. To install it, follow these instructions : https://github.com/BurntSushi/ripgrep#installation",promptPopup:{defaultTitle:"User Prompt",confirmTitle:"Confirm",accept:"Ok",refuse:"Cancel"},tabs:{newTab:"New Tab"}},server:{log:{socket:!1,verbose:!1,fs:!1,ripgrep:!1}},client:{log:{verbose:!1,socket:!1,upload:!1,iframe:!1,eventManager:!1},version:"0.40.1"},dev:{disableLogin:!1}}},178:function(t,n,e){"use strict";e.d(n,"b",(function(){return b})),e.d(n,"a",(function(){return g}));var o=e(15),i=e(55),c=e(666),a=e(17),r=e(31),l="tiro-ls-id-",s=function(t,n){var e=JSON.stringify(n);localStorage.setItem(l+t,e)},u="local_node_history",p="[".concat(u.toUpperCase(),"]"),d=a.a.client.log.verbose,f="notes-history-ls",b=function(t){var n=[],e=Object(i.a)(function(t){var n,e=window.localStorage.getItem(l+t);return e&&(n=JSON.parse(e)),n||null}(f));e&&(n=t?e.filter((function(n){return n.path===t})):e);return n},g=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:6,e=arguments.length>2?arguments[2]:void 0;if(!t.content.includes("--disable-history--")){var i=t,c=b(),a=b(i.path);e&&console.log(p,"adding el to ls : ",{itAdd:i}),c=c.filter((function(t){return t.path!==i.path})),a.unshift(i),a.length>n&&(a=a.slice(0,n)),c=[].concat(Object(o.a)(a),Object(o.a)(c));var r=h(c,3);s(f,r)}},h=function t(n,e){var o=n,i=JSON.stringify(o);return m(i)>e&&o.length>1?(o.pop(),d&&console.log(p,"recursivelyReduceArrTillSmallerThan REDUCE ARR > new length=",o.length),t(o,e)):o},m=function(t){return new Blob([t]).size/1048576};Object(r.a)(u,"addLocalNoteHistory",(function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"/woopy/doopy",e={timestamp:Date.now(),path:n,content:"".concat(Object(c.a)(0,1e7)," helllo helllo helllohelllo helllo helllohelllo helllo helllohelllo helllo helllohelllo helllo helllohelllo helllo helllohelllo helllo helllohelllo helllo helllohelllo helllo helllohelllo helllo helllohelllo helllo helllohelllo helllo helllohelllo helllo helllohelllo helllo helllohelllo helllo helllohelllo helllo helllohelllo helllo helllohelllo helllo helllohelllo helllo helllohelllo helllo helllohelllo helllo helllohelllo helllo helllo")};g(e,10,t)})),Object(r.a)(u,"addLocalNoteHistorySeveral",(function(){for(var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:10,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"/woopy/doopy",o=0;o<t;o++)Object(r.c)(u,"addLocalNoteHistory")(n,e)})),Object(r.a)(u,"getLocalNoteHistory",(function(t){console.log(b(t),"size: ".concat(m(JSON.stringify(b(t))),"MB"))})),Object(r.a)(u,"cleanLocalNoteHistory",(function(){s(f,[]),console.log(b(),"size: ".concat(m(JSON.stringify(b())),"MB"))}))},18:function(t,n,e){"use strict";e.d(n,"b",(function(){return m})),e.d(n,"c",(function(){return v})),e.d(n,"a",(function(){return O})),e.d(n,"d",(function(){return j}));var o=e(5),i=e(55),c=e(0),a=e.n(c),r=e(17),l=e(67),s=e(56),u=e(136),p=e(14),d=e(19),f=e(72),b=e(11),g=e(70),h=e(1),m=function(){var t=Object(u.a)("tiro-login-token");return t||""},v=function(){return"?token=".concat(m())},w=function(t){Object(u.b)("tiro-login-token",t,r.a.tokenRefreshInHours)},O=function(){w("")},j=function(t){var n=Object(c.useState)(!1),e=Object(o.a)(n,2),r=e[0],u=e[1],v=Object(c.useState)(""),O=Object(o.a)(v,2),j=O[0],x=O[1],k=Object(c.useState)(""),y=Object(o.a)(k,2),_=y[0],C=y[1],E=Object(c.useState)(),S=Object(o.a)(E,2),T=S[0],I=S[1],N=Object(c.useRef)(0);Object(c.useEffect)((function(){return N.current=p.b.on("getLoginInfos",(function(n){switch(n.code){case"SUCCESS":if(!n.token)return;w(n.token),u(!1),t.onLoginSuccess();break;case"WRONG_TOKEN":u(!0),I(["error",d.a.loginForm.wrongToken]);var e=n.loginInfos;null!==e&&void 0!==e&&e.demo_mode&&(x("viewer"),C(e.viewer_password)),t.onLoginAsked();break;case"WRONG_USER_PASSWORD":I(["error",d.a.loginForm.wrongUserPassword]),u(!0)}})),function(){p.b.off(N.current)}}),[]);var P=Object(g.a)("user-password-cache-ls",{}),R=Object(o.a)(P,2),A=R[0],F=R[1];Object(c.useEffect)((function(){if(r){var t=Object(f.c)().dic,n="__HARDCODED_LOGIN_LS_PASSWORD_0129dsfaf1029__";t.l1&&t.l2&&t.l1.value&&t.l2.value&&Object(b.d)((function(e){var o,c,a=t.l1.value+t.l2.value;if(A[a])o=A[a].usr,c=A[a].pass;else if(o=e.encryption.decryptUrlParam(t.l1.value,n).plaintext,c=e.encryption.decryptUrlParam(t.l2.value,n).plaintext,o&&c){var r=Object(i.a)(A);r[a]={usr:o,pass:c},F(r)}o&&c&&(x(o),C(c),setTimeout((function(){console.log("success login url, submitting it"),p.b.emit("sendLoginInfos",{user:o,password:c,token:m()})}),1e3))}))}}),[r]);var L=function(){I(void 0),p.b.emit("sendLoginInfos",{user:j,password:_,token:m()})},M=Object(c.useState)(1),z=Object(o.a)(M,2),D=z[0],B=z[1],H=Object(g.a)("login-to-ls",!1),U=Object(o.a)(H,2);U[0],U[1];return{displayLoginPopup:r,LoginPopupComponent:function(t){return Object(h.c)(a.a.Fragment,null,r&&Object(h.c)("div",{className:"setup-popup-component"},Object(h.c)(s.a,{title:d.a.setupForm.title,onClose:function(){}},Object(h.c)("div",null,Object(h.c)(l.a,{shouldFocus:1===D,value:j,onEnterPressed:function(){B(2)},label:d.a.setupForm.user,onChange:function(t){x(t)}}),Object(h.c)(l.a,{shouldFocus:2===D,value:_,label:d.a.setupForm.password,type:"password",onEnterPressed:function(){L()},onChange:function(t){C(t)}}),Object(h.c)("button",{value:"submit",className:"submit-button",onClick:function(t){L()}},d.a.setupForm.submit),T&&Object(h.c)("div",{className:T[0]},T[1])))))}}}},182:function(t,n,e){"use strict";e.d(n,"a",(function(){return u})),e.d(n,"b",(function(){return p}));var o=e(563),i=e(25),c=(e(0),e(9)),a=e(27),r=e(130),l=e(24),s=e(1),u=function(t){var n="faPaperclip";"image"===t.type&&(n="faImage"),"camera"===t.type&&(n="faCamera"),"microphone"===t.type&&(n="faMicrophone");var e="*";"image"===t.type&&(e="image/*"),"camera"===t.type&&(e="image/*"),"microphone"===t.type&&(e="audio/*");var c=Object(o.a)();return Object(s.c)("div",{className:"upload-button-component"},Object(s.c)("input",{className:"input-file-hidden",id:"file-".concat(c),multiple:!0,name:"file-".concat(c),type:"file",capture:"camera"===t.type||"microphone"===t.type,accept:e,onChange:function(n){var e=n.target.files;0!==e.length&&Object(i.a)(e,(function(n,e){Object(r.b)({fileToUpload:n,folder:t.file.folder,windowId:t.windowId})}))}}),Object(s.c)("label",{htmlFor:"file-".concat(c)},Object(s.c)(a.a,{name:n}),Object(s.c)("span",{className:"label-text"},t.label)))},p=function(){return"\n.upload-button-wrapper {\n\t\twidth: 100%;\n\t\tcursor: pointer;\n\t\t.inside-html-wrapper {\n\t\t\t\twidth: 100%;\n\t\t}\n\t\t&:hover {\n\t\t\t\t.label-text { color :".concat(c.a.colors.main,"; }\n\t\t}\n\t\t.upload-button-component {\n\t\t\t\tcursor: pointer;\n\t\t\t\tdisplay: flex;\n\t\t\t\tposition: relative;\n\t\t\t\twidth: 100%;\n\t\t\t\t.input-file-hidden {\n\t\t\t\t\t\twidth: 0.1px;\n\t\t\t\t\t\theight: 0.1px;\n\t\t\t\t\t\topacity: 0;\n\t\t\t\t\t\toverflow: hidden;\n\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\tz-index: -1;\n\t\t\t\t}\n\t\t\t\t.label-text {\n\t\t\t\t\t\tcursor: pointer;\n\t\t\t\t\t\tmargin-left: 18px;\n\t\t\t\t\t\tfont-size:").concat(Object(l.a)(1),"px;\n\t\t\t\t\t\tfont-weight: 400;\n\t\t\t\t}\n\t\t}\n}\n")}},183:function(t,n,e){"use strict";e.d(n,"a",(function(){return o}));var o=function(t,n){var e=n?"|".concat(n):"";return"[link|".concat(t.realname," ").concat(t.folder).concat(e,"]\n")}},184:function(t,n,e){"use strict";e.d(n,"a",(function(){return s})),e.d(n,"b",(function(){return p}));var o=e(10),i=e(66),c=e(11),a=e(122),r="tiro-analytics",l=function(cb){Object(c.d)((function(t){t.cache.get(r,(function(t){var n={};t&&(n=t),cb(n)}))}))},s=function(t){var n=Object(i.c)();l((function(e){var i,l=Object(o.a)({},e);l[n[0]]||(l[n[0]]={}),l[n[0]][n[1]]||(l[n[0]][n[1]]={}),l[n[0]][n[1]][n[2]]||(l[n[0]][n[1]][n[2]]={}),Object(a.a)(l[n[0]][n[1]][n[2]][t])?l[n[0]][n[1]][n[2]][t]++:l[n[0]][n[1]][n[2]][t]=1,i=l,Object(c.d)((function(t){t.cache.set(r,i,-1)}))}))},u=function(cb,t){t||(t={});t.start?t.start:Object(i.c)(Object(i.b)("lastMonth")),t.end?t.end:Object(i.c)();l((function(t){cb(t)}))},p=function(t){return{log:s,report:u}}},19:function(t,n,e){"use strict";e.d(n,"a",(function(){return o}));var o=e(17).a.strings},206:function(t,n,e){"use strict";e.d(n,"a",(function(){return a}));var o=e(25),i=e(30),c=e(41),a=function(t,n){var e=t.match(i.a.image),a=[];return Object(o.a)(e,(function(t){var e=t.match(i.a.firstPartImg),o=e&&e[0]?e[0].replace("![","").replace("]","").replace("(",""):"",r=t.replace(i.a.firstPartImg,"").replace(")",""),l={url:Object(c.a)(n.folder)+"/"+r,title:o,file:n};a.push(l)})),a}},209:function(t,n,e){"use strict";e.d(n,"a",(function(){return l}));var o=e(365),i=e(4),c=e(9),a=e(115),r=e(35),l=function(){return Object(o.a)({theme:"light",settings:{background:"#ffffff",foreground:"#4D4D4C",caret:"#AEAFAD",selection:"#D6D6D6",selectionMatch:"#D6D6D6",gutterBackground:"#FFFFFF",gutterForeground:"#4D4D4C",gutterBorder:"#ddd",lineHighlight:"#fff"},styles:[{tag:i.e.comment,color:"#787b80"},{tag:i.e.definition(i.e.typeName),color:"#194a7b"},{tag:i.e.typeName,color:"#194a7b"},{tag:i.e.tagName,color:"#008a02"},{tag:i.e.variableName,color:"#1a00db"},{tag:i.e.heading,color:c.a.colors.main},{tag:u.Image,color:"red",class:"tiro-image"},{tag:a.b.LatexMdEl,class:"cm-mdpreview-latex-code mdpreview-source"},{tag:i.e.heading1,class:"actionable-title h1"},{tag:i.e.heading2,class:"actionable-title h2"},{tag:i.e.heading3,class:"actionable-title h3"},{tag:i.e.monospace,class:"code-wrapper"},{tag:i.e.content,fontSize:"".concat(r.d.curr.ui_layout_general_font_size,"px")}]})},s={ImageTwo:i.a.define()},u=(Object(i.c)({ImageTwo:s.ImageTwo,"Strikethrough/...":s.ImageTwo}),{ListItem:i.a.define(),headingMark:i.a.define(),LinkReference:i.a.define(),Image:i.a.define(),LinkTitle:i.a.define(),LinkLabel:i.a.define(),Link:i.a.define(),LinkMark:i.a.define(),BulletList:i.a.define()});Object(i.c)({LinkReference:u.LinkReference,ListItem:u.ListItem,Link:u.Link,Image:u.Image,LinkTitle:u.LinkTitle,LinkLabel:u.LinkLabel,LinkMark:u.LinkMark,BulletList:u.BulletList})},210:function(t,n,e){"use strict";e.d(n,"a",(function(){return u})),e.d(n,"b",(function(){return p}));var o=e(5),i=e(0),c=e(56),a=e(19),r=e(9),l=e(67),s=e(1),u=function(t){var n=Object(i.useState)(""),e=Object(o.a)(n,2),r=e[0],u=e[1],p=function(){t.onSubmit(r)};return Object(s.c)("div",{className:"password-popup-wrapper"},Object(s.c)(c.a,{title:a.a.passwordForm.explanation,onClose:function(){t.onClose()}},Object(s.c)("div",null,Object(s.c)(l.a,{value:r,label:a.a.setupForm.password,type:"password",shouldFocus:!0,onChange:function(t){u(t)},onEnterPressed:function(){p()}}),Object(s.c)("button",{className:"submit-button",onClick:function(t){p()}},a.a.passwordForm.submit))))},p=function(){return"\n .submit-button {\n margin-top: 10px;\n ".concat(r.a.els().redButton,";\n\t\tbackground: ").concat(r.a.colors.main,"!important;\n padding: 10px 20px;\n }\n ")}},211:function(t,n,e){"use strict";e.d(n,"a",(function(){return i}));var o=e(367),i=function(t){return t||(t=0),Object(o.isNumber)(t)?t+1:0}},213:function(t,n,e){"use strict";e.d(n,"b",(function(){return a})),e.d(n,"a",(function(){return r}));var o=e(5),i=e(121),c=e(0),a=function(){var t=Object(c.useState)(!1),n=Object(o.a)(t,2),e=n[0],a=n[1],r=Object(c.useRef)(0);return Object(c.useEffect)((function(){var t=Object(i.a)((function(){r.current=r.current+1,a(!0),setTimeout((function(){a(!1)}),200)}),200);return function(){window.removeEventListener("resize",(function(){t()}))}}),[]),{resizeState:e,resizeCount:r}},r=function(t){var n=Object(c.useState)(!1),e=Object(o.a)(n,2),a=e[0],r=e[1];return Object(c.useEffect)((function(){var n=Object(i.a)((function(){r(!0),setTimeout((function(){r(!1)}),200)}),200),e=document.querySelector(t);if(e){var o=new ResizeObserver((function(t){n()}));return o.observe(e),function(){o.disconnect()}}}),[]),{resizeState:a}}},214:function(t,n,e){"use strict";e.d(n,"a",(function(){return c})),e.d(n,"b",(function(){return a}));e(25);var o=e(11),i="notes-view-type",c=function(t){return new Promise((function(n,e){Object(o.d)((function(e){e.cache.get(i,(function(e){if(e){var o=e[t];n(o||!1)}}))}))}))},a=function(t,n){Object(o.d)((function(e){e.cache.get(i,(function(o){o||(o={}),o[t]=n,e.cache.set(i,o,-1)}))}))}},215:function(t,n,e){"use strict";e.d(n,"b",(function(){return o})),e.d(n,"a",(function(){return i}));var o=function(t,n){c(t,(function(t){console.log("ON IMAGE PASTE"),t&&n(t)}))},i=function(t){var n=t.value;navigator&&navigator.clipboard&&navigator.clipboard.writeText(n).then((function(){console.log("Text copied to clipboard...")})).catch((function(t){console.log("Something went wrong",t)}))},c=function(t,n){0==t.clipboardData&&"function"==typeof n&&n(void 0);var e=t.clipboardData.items;void 0==e&&"function"==typeof n&&n(void 0);for(var o=0;o<e.length;o++)if(-1!=e[o].type.indexOf("image")){console.log("[PASTE] informations on files pasted : ",t,e,e.length);var i=e[o].getAsFile();"function"==typeof n&&n(i)}}},216:function(t,n,e){"use strict";e.d(n,"b",(function(){return O})),e.d(n,"a",(function(){return j}));var o=e(23),i=e(5),c=e(0),a=e(78),r=e(159),l=e(63),s=e(13),u=e(25),p=e(122),d=e(217),f=e(11),b=e(32),g=e(91),h=e(9),m=e(73),v=e(1),w=function(t){var n=Object(c.useState)(""),e=Object(i.a)(n,2),o=e[0],f=e[1],h=Object(c.useState)(0),w=Object(i.a)(h,2),O=(w[0],w[1]),j=Object(c.useRef)(0),x=function(t){t>j.current&&(j.current=t),O(j.current)};Object(c.useEffect)((function(){O(0)}),[t.fileContent,t.windowId]);Object(b.a)((function(t){f(t)}),Object(s.e)()?3e3:1e3),Object(b.b)((function(t){f(t)}),1e3);var k=function(t){f(t)};Object(c.useEffect)((function(){k(t.fileContent)}),[t.fileContent,t.file.path,t.windowId]),Object(c.useEffect)((function(){setTimeout((function(){l.a.onWindowLoad(t.windowId)}),500)}),[t.file.path,t.windowId]),Object(c.useEffect)((function(){Object(m.d)(!0)}),[t.file.path,t.windowId]);var y={id:"",line:0,title:""},_=function(n){var e=Object(g.a)(o),i=y;if(Object(u.a)(e,(function(t){n>=t.line&&(i=t)})),""!==i.id){var c=".window-id-".concat(t.windowId," #t-").concat(i.id);try{var a,r=null===(a=document.querySelector(c))||void 0===a?void 0:a.offsetTop;Object(p.a)(r)&&(l.a.updatePreviewOffset(t.windowId,r),l.a.scrollPreview(t.windowId))}catch(s){console.error(s)}}},C=Object(b.b)(_,200),E=Object(b.a)(_,500),S="desktop"===Object(s.a)()&&"editor"===t.viewType||"desktop"!==Object(s.a)()&&"editor"===t.mobileView,T=Object(c.useState)(!1),I=Object(i.a)(T,2),N=I[0],P=I[1];return Object(c.useEffect)((function(){P(!t.canEdit)}),[t.canEdit]),Object(v.c)("div",{className:"dual-view-wrapper view-".concat(t.viewType," device-").concat(Object(s.a)()," window-id-").concat(t.windowId," window-id-sizeref-").concat(t.windowId)},t.isDragging&&Object(v.c)("div",{className:"loading-overlay"},Object(v.c)("div",{className:"loading-text"}," drop to upload")),Object(v.c)(r.a,{viewType:t.viewType,mobileView:t.mobileView,windowId:t.windowId,editorType:"codemirror",showViewToggler:t.showViewToggler,showToolbar:t.showToolbar,titleEditor:t.titleEditor,onTitleEditedHook:function(){P(!0)},file:t.file,canEdit:t.canEdit,fileContent:t.fileContent,isActive:t.isActive,onReloadContent:t.onReloadContent,editorAction:t.editorAction,posY:0,onTitleClick:function(t){!function(t){C(t),E(t)}(t)},onScroll:function(t){},onUpdateY:function(t){},onMaxYUpdate:x,onFileEdited:function(n,e){t.onFileEdited(n,e),k(e)},onScrollModeChange:function(t){},onLayoutUpdate:t.onLayoutUpdate,pluginsConfig:t.pluginsConfig}),N&&Object(v.c)("div",{className:"loading-overlay"},Object(v.c)("div",{className:"loading-text"},"loading...")),!S&&Object(v.c)(a.a,{windowId:t.windowId,file:t.file,posY:0,fileContent:o,onMaxYUpdate:x,yCnt:0,onIframeMouseWheel:function(t){}}),Object(v.c)(d.a,{windowId:t.windowId}))},O=function(t,n){return"\n.omnibar-popup-wrapper {\n\t.dual-view-wrapper {\n\t\t.loading-overlay {\n\t\t\ttop: -2px;\n\t\t}\n\t}\n}\n\t.dual-view-wrapper {\n\t\tposition: relative;\n\t\t.loading-overlay {\n\t\t\t.loading-text {\n\t\t\t\tcolor: ".concat(h.a.colors.main,";\n\t\t\t}\n\n\t\t\tdisplay: flex;\n\t\t\talign-content: center;\n\t\t\tjustify-content: center;\n\t\t\talign-items: center;\n\t\t\twidth: 100%;\n\t\t\theight: calc(120% - 32px);\n\t\t\tposition: absolute;\n\t\t\tbackground: rgba(0,0,0,0.1);\n\t\t\ttop: ").concat("desktop"===Object(s.a)()?"32px":"0px",";\n\t\t\tleft: 0px;\n\t\t\tfont-weight: bold;\n\t\t\tcolor: white;\n\t\t\tz-index: 2;\n\t\t}\n\t}\n\n\t.mobile-view-preview {\n\t\t\n\t\t.editor-area {\n\t\t\tdisplay: none;\n\t\t}\n\t}\n\t\n\t.dual-view-wrapper.device-tablet, \n\t.dual-view-wrapper.device-mobile {\n\t\t\t.editor-area,\n\t\t\t.preview-area-wrapper {\n\t\t\t\t\twidth: 100%;\n\t\t\t}\n\t}\n\t.dual-view-wrapper {\n\t\t\t&.view-both.device-desktop {\n\t\t\t\t\t.preview-area-wrapper {\n\t\t\t\t\t\t\twidth: 50%;\n\t\t\t\t\t}\n\t\t\t}\n\n\n\n\t\t\t.__EDITOR_DESIGN HERE__ {}\n\t\t\t&.view-editor.device-desktop {\n\t\t\t\t\t.editor-area {\n\t\t\t\t\t\t\twidth: 100%;\n\t\t\t\t\t}\n\n\t\t\t\t\t.preview-area-wrapper {\n\t\t\t\t\t\t\t/* display:none; */\n\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\twidth: 10px;\n\t\t\t\t\t\t\tleft: -9999px;\n\t\t\t\t\t\t\ttop: -9999px;\n\n\t\t\t\t\t}\n\t\t\t}\n\n\t\t\t&.view-editor-with-map.device-desktop {\n\t\t\t\t\t.editor-area {\n\t\t\t\t\t\t\twidth: 80%;\n\t\t\t\t\t}\n\n\t\t\t\t\t.__MINIMAP_DESIGN HERE__ {}\n\n\t\t\t\t\t.preview-area-wrapper:hover {\n\t\t\t\t\t\t\theight: calc(100% - 30px);\n\t\t\t\t\t\t\ttransform: scale(1);\n\t\t\t\t\t\t\tright: -50%;\n\t\t\t\t\t\t\topacity: 1;\n\t\t\t\t\t\t\tbox-shadow: -4px 5px 10px rgba(0, 0, 0, 0.10);\n\t\t\t\t\t\t\t.preview-area-transitions {\n\t\t\t\t\t\t\t\t\twidth: 50%;\n\t\t\t\t\t\t\t\t\tpadding: 0px;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t.preview-area-wrapper {\n\t\t\t\t\t\t\ttransition-delay: ").concat(h.a.anim.time,";\n\t\t\t\t\t\t\t/* transition-delay: 0ms; */\n\t\t\t\t\t\t\t/* transition-property: bottom; */\n\t\t\t\t\t\t\tword-break: break-word;\n\t\t\t\t\t\t\ttransform: scale(0.2) translateZ(0);\n\t\t\t\t\t\t\ttransform-origin: 0px 0px;\n\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\twidth: 100%;\n\t\t\t\t\t\t\tright: calc(-80%);\n\t\t\t\t\t\t\t// height: 500vh;\n\t\t\t\t\t\t\theight: calc(100% * 5);\n\t\t\t\t\t\t\t.preview-area-transitions {\n\n\t\t\t\t\t\t\t\t\t/* transition-delay: 0ms; */\n\t\t\t\t\t\t\t\t\t/* transition-property: bottom; */\n\n\t\t\t\t\t\t\t\t\t/* transition-delay:").concat(h.a.anim.time,"; */\n\t\t\t\t\t\t\t\t\t/* transition-property: padding; */\n\n\t\t\t\t\t\t\t\t\ttransition-delay:").concat(h.a.anim.time,"; \n\t\t\t\t\t\t\t\t\t/* transition-property: all; */\n\n\t\t\t\t\t\t\t\t\t/* transition-delay: 0ms; */\n\t\t\t\t\t\t\t\t\t/* transition-property: bottom; */\n\n\t\t\t\t\t\t\t\t\twidth: 73%;\n\t\t\t\t\t\t\t\t\tpadding: 80px;\n\t\t\t\t\t\t\t\t\tpadding-right: 140px;\n\t\t\t\t\t\t\t\t\tpadding-left: 40px;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t}\n\n\t\t\t&.view-preview.device-desktop {\n\t\t\t\t\t.editor-area {\n\t\t\t\t\t\t\twidth: 0%;\n\t\t\t\t\t\t\t.main-editor-wrapper {\n\t\t\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\t\t\tleft: -9999px;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t.preview-area-wrapper {\n\t\t\t\t\t\t\twidth: 100%;\n\t\t\t\t\t\t\t.preview-area {\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t}\n\n\t\t\tposition:relative;\n\t\t\tdisplay: ").concat("desktop"===Object(s.a)()?"flex":"block",";\n\t}\n\t\n")},j=function(t){var n=Object(c.useContext)(f.a),e=(null===n||void 0===n?void 0:n.ui.note.editorAction.get)||null;return Object(v.c)(w,Object(o.a)({},t,{editorAction:e}))}},217:function(t,n,e){"use strict";e.d(n,"a",(function(){return u})),e.d(n,"b",(function(){return p}));var o=e(3),i=e(5),c=e(0),a=e(127),r=e.n(a),l=e(63),s=e(1),u=function(t){var n=Object(c.useState)(0),e=Object(i.a)(n,2),a=e[0],u=e[1],p=Object(c.useRef)(null),d=Object(c.useRef)(null),f=function(){var t={maxY:0,y:0,percent:0},n=d.current?d.current:null,e=p.current?p.current:null;if(!e||!n)return t;var o=e.getBoundingClientRect().height,i=n.getBoundingClientRect().y;return t.maxY=n.getBoundingClientRect().height-o,t.y=e.getBoundingClientRect().y-i,t.percent=t.y/t.maxY*100,t};Object(c.useEffect)((function(){var n=d.current?d.current:null;if(n){var e=new MutationObserver((function(n,e){var i,c=Object(o.a)(n);try{for(c.s();!(i=c.n()).done;){if("data-scroll-refresh"===i.value.attributeName){var a=l.a.getScrollObj(t.windowId),r=a.dims.scroller.viewport;r<20&&(r=20),m(r);var s=(a.dims.scroller.full-a.dims.scroller.viewport)/100,p=a.posPercent*s;u(p)}}}catch(d){c.e(d)}finally{c.f()}}));return e.observe(n,{attributes:!0}),function(){e.disconnect()}}}),[t.windowId]);var b=Object(c.useState)(0),g=Object(i.a)(b,2),h=g[0],m=g[1];return Object(s.c)("div",{className:"scrolling-bar-wrapper",ref:d},Object(s.c)(r.a,{onDrag:function(n){l.a.onScrollerScroll(t.windowId,f().percent)},onStop:function(){u(f().y)},position:{x:0,y:a},axis:"y",bounds:"parent"},Object(s.c)("div",{ref:p,style:{height:"".concat(h,"px")},className:"scrolling-bar"})))},p=function(){return"\n.view-editor .scrolling-bar-wrapper {\n}\n\n.scrolling-bar-wrapper {\n\t\toverflow: hidden;\n\t\tposition: absolute;\n\t\ttop: 33px;\n\t\theight: calc(100% - 53px);\n\t\tbackground: rgb(226,226,226);\n\t\twidth: 10px;\n\t\tright: 0px;\n\t\tposition: absolute;\n\n\t\t.scrolling-bar {\n\t\t\t\tcursor: ns-resize;\n\t\t\t\tbackground: #cdcccc;\n\t\t\t\theight: 20px;\n\n\t\t}\n}\n"}},218:function(t,n,e){"use strict";e.d(n,"a",(function(){return r}));var o=e(29),i=e(17),c=e(18),a=e(14),r=function(t){return Object(o.b)("".concat(Object(a.c)(),"/").concat(i.a.path.staticResources,"/").concat(t,"?token=").concat(Object(c.b)()))}},219:function(t,n,e){"use strict";e.d(n,"a",(function(){return a})),e.d(n,"b",(function(){return r}));e(0);var o=e(9),i=e(27),c=e(1),a=function(t){var n=t.dir?t.dir:"left",e=t.maxHeight?t.maxHeight:50;return Object(c.c)("div",{className:"dropdown-wrapper ".concat(n," ").concat(t.hover?"hover-active":"")},Object(c.c)("span",{onMouseEnter:function(){t.onMouseEnter&&t.onMouseEnter()},onMouseLeave:function(){t.onMouseLeave&&t.onMouseLeave()},onClick:function(){},className:"context-menu-wrapper"},Object(c.c)("div",{className:"dropdown-icon"},Object(c.c)(i.a,{name:"faEllipsisH"})),Object(c.c)("div",{className:"context-menu",style:{maxHeight:e}},t.children)))},r=function(){return"\n.dropdown-wrapper {\n\t\t\n\t\tposition: relative;\n\t\t&.hover-active:hover {\n\t\t\t\t.context-menu {\n\t\t\t\t\t\topacity: 1;\n\t\t\t\t\t\tpointer-events: all;\n\t\t\t\t}\n\t\t\t\t.dropdown-icon {\n\t\t\t\t\t\tsvg {\n\t\t\t\t\t\t\t\tcolor: ".concat(o.a.colors.main,";\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t}\n\n\t\t.dropdown-icon {\n\t\t\t\tposition: absolute;\n\t\t\t\tpadding: 10px;\n\t\t\t\ttop: -10px;\n\t\t\t\tsvg {\n\t\t\t\t\t\tcolor: #d4d1d1;\n\t\t\t\t}\n\t\t}\n\n\t\t.context-menu {\n\t\t\t\toverflow-y: scroll;\n\t\t\t\tz-index: 1000;\n\t\t\t\tright: 10px;\n\t\t\t\ttop: 20px;\n\t\t\t\tpointer-events: none;\n\n\n\t\t\t\ttransition: 0.2s all;\n\t\t\t\ttransition-delay: 0.2s, 0s;\n\t\t\t\tposition: absolute;\n\t\t\t\topacity: 0;\n\n\t\t\t\tmin-width: 140px;\n\t\t\t\tpadding: 10px;\n\t\t\t\tborder-radius: 5px;\n\t\t\t\tbackground: white;\n\t\t\t\tbox-shadow: 0px 0px 5px rgba(0,0,0,.2);\n\t\t\t\toverflow: auto;\n\t\t}\t\n\n\t\t&.right {\n\t\t\t\t.dropdown-icon {\n\t\t\t\t\t\tright: 0px;\n\t\t\t\t}\n\t\t}\n}\n")}},220:function(t,n,e){"use strict";e.d(n,"a",(function(){return a})),e.d(n,"b",(function(){return r}));var o=e(0),i=e.n(o),c=e(1),a=function(t){var n=t.progress,e=n>=0&&n<100;return Object(c.c)(i.a.Fragment,null,e&&Object(c.c)("div",{className:"upload-progress-bar-wrapper"},Object(c.c)("div",{className:"bg-fill",style:{width:"".concat(n,"%")}}),Object(c.c)("div",{className:"label"},n,"% uploaded... ")))},r=function(){return"\n.device-mobile {\n\t\t.upload-progress-bar-wrapper {\n\t\t\t\tbottom: 176px;\n\t\t}\n}\n.upload-progress-bar-wrapper {\n\t\t.label {\n\t\t\t\tposition: relative;\n\t\t}\n\t\t.bg-fill {\n\t\t\t\ttransition: 0.1s all;\n\t\t\t\tposition:absolute;\n\t\t\t\tbackground: #077e00;\n\t\t\t\theight: 100%;\n\t\t\t\ttop: 0px;\n\t\t\t\tleft: 0px;\n\t\t}\n\t\tposition:absolute;\n\t\tbottom: 0px;\n\t\twidth: 100%;\n\t\tleft: 0px;\n\t\t/* background: green; */\n\t\tbackground: #a0a0a0;\n\t\tcolor: white;\n\t\ttext-align: center;\n\t\tz-index:3;\n\t\tfont-size: 9px;\n\t\tpadding: 5px;\n}\n"}},221:function(t,n,e){"use strict";e.d(n,"b",(function(){return l})),e.d(n,"a",(function(){return u}));var o=e(30),i=e(11),c=e(28),a=e(9),r=e(45),l=function(t,n){return Object(r.a)({file:t,windowId:n,pattern:o.a.hashtag,replacement:function(n){var e=n.matchs,o=document.createElement("span");return o.classList.add("cm-hashtag"),o.innerHTML='<span class="hash-inner" \n data-hashtag="'.concat(e[1],'"\n data-hashtag2="').concat(e[0],'"\n data-folder="').concat(t.folder,'"\n onclick="').concat(Object(c.c)("open-win-smartlist-hashtag",s),'" >').concat(e[0],"</a>"),o},options:{isAtomic:!1}})},s=function(t){if(t){var n=t.dataset.hashtag2,e=t.dataset.folder;Object(i.d)((function(t){t.ui.floatingPanel.create({type:"ctag",layout:"full-bottom",ctagConfig:{tagName:"smartlist",content:"- | ".concat(e," | ").concat(n)}})}))}},u=function(){return"\n .cm-hashtag {\n &:hover {\n opacity: 1;\n }\n opacity: 0.3;\n transition: opacity 0.2s;\n // color: var(--color-text);\n color: grey;\n background: ".concat(a.a.colors.main,";\n color: ").concat(a.a.colors.mainFont,";\n border-radius: 3px;\n padding: 2px 4px;\n margin: 0 2px;\n // display: inline-block;\n font-size: 0.9em;\n .hash-inner {\n cursor: pointer;\n }\n }\n")}},222:function(t,n,e){"use strict";e.d(n,"a",(function(){return s})),e.d(n,"b",(function(){return p}));var o=e(30),i=e(11),c=e(28),a=e(9),r=e(45),l=e(24),s=function(t,n){return Object(r.a)({file:t,windowId:n,pattern:o.a.dateFrFormat,replacement:function(t){var e=t.matchs,o=(t.view,t.pos),i=document.createElement("span"),a=e[0].split("/"),r="".concat(a[2],"-").concat(a[1],"-").concat(a[0]);return i.innerHTML='<span class="date-picker-cm-wrapper"><input type="date" id="date-picker-cm-input" lang="fr-FR" data-replacepos="'.concat(o,'" data-windowid="').concat(n,'" value="').concat(r,'" onchange="').concat(Object(c.c)("replace-date-text-datepicker",u),'"/></span>'),i},options:{cache:!1}})},u=function(t){if(console.log("el1"),t){var n=t.dataset.replacepos,e=t.dataset.windowid;console.log("el",t.value,n);var o=t.value.split("-"),c="".concat(o[2],"/").concat(o[1],"/").concat(o[0]);if(-1===(n=parseInt(n)||-1))return console.warn("no pos");Object(i.d)((function(t){console.log("replacedatetext",c,n),t.ui.note.editorAction.dispatch({windowId:e,type:"replaceText",replaceText:c,replacePos:n})}))}},p=function(){return"\n .date-picker-cm-wrapper {\n cursor: pointer;\n input {\n padding: 0px;\n border: none;\n font-size: ".concat(Object(l.a)(),"px;\n font-weight: 400;\n font-family: ").concat(a.a.font.editor,";\n margin-right: 0px;\n color: #4d4d4d;\n background: #e9e9e9;\n position: relative;\n border-radius: 3px;\n padding: 2px 6px;\n cursor: pointer;\n }\n }\n")}},223:function(t,n,e){"use strict";e.d(n,"a",(function(){return r})),e.d(n,"b",(function(){return s}));var o=e(30),i=e(11),c=e(28),a=e(45),r=function(t,n){return Object(a.a)({file:t,windowId:n,pattern:o.a.checkbox,replacement:function(t){var e=t.matchs,o=(t.view,t.pos),i=document.createElement("span"),a=e[0].toLocaleLowerCase().includes("x"),r=a?"checked='checked'":"";return i.innerHTML='<span class="checkbox-todo-cm-wrapper">'+'<input type="checkbox" id="checkbox-todo-cm-input" '.concat(r)+'data-replacepos="'.concat(o,'" data-ischecked="').concat(a,'" data-windowid="').concat(n,'" value="" ')+'onchange="'.concat(Object(c.c)("replace-checkbox-todo-text",l),'"/></span>'),i},options:{cache:!1}})},l=function(t){if(t){var n=t.dataset.replacepos,e=t.dataset.windowid,o=t.dataset.ischecked;if(-1===(n=parseInt(n)||-1))return console.warn("no pos");Object(i.d)((function(t){t.ui.note.editorAction.dispatch({windowId:e,type:"replaceText",replaceText:"true"===o?"[ ]":"[x]",replacePos:n})}))}},s=function(){return"\n .checkbox-todo-cm-wrapper {\n cursor: pointer;\n input {\n position: relative;\n top: 4px;\n transform: scale(.7);\n cursor: pointer;\n margin: 0px;\n }\n }\n"}},224:function(t,n,e){"use strict";e.d(n,"a",(function(){return u})),e.d(n,"b",(function(){return p}));var o=e(29),i=e(30),c=e(28),a=e(71),r=e(65),l=e(9),s=e(45),u=function(t,n){return Object(s.a)({file:t,windowId:n,pattern:i.a.userCustomTagFull2,replacement:function(e){var i=document.createElement("span");return i.innerHTML=function(t,n,e){var i=t[2].replaceAll("[[","").replaceAll("]]",""),l=t[0].replaceAll("[[".concat(i,"]]"),""),s=function(t,n,e){return"".concat(Object(r.b)(t,""),"-").concat(Object(r.b)(n,""),"-").concat(Object(r.b)(e,""))},u=s(i,l,n.path),p="ress-".concat(u);Object(c.a)(n,u,(function(){var t=document.querySelector(".".concat(p," .iframe-wrapper-cm-ctag"));if(t){var o=Object(a.b)(i,l,e,{file:n});Object(a.c)(t,o)}}));var d='\n\t<div class="button-ctag-cm-toggle" \n\t\tonclick="'.concat(Object(c.c)("toggle-ctag-link",(function(t){if(t){var n=t.dataset.filepath,e=decodeURIComponent(t.dataset.tagcontent),i=t.dataset.tagname,r=t.dataset.windowid,l=s(i,e,n),u=Object(o.d)(n),p=t.parentNode.parentNode.querySelector(".iframe-wrapper-cm-ctag"),d=p.querySelector("iframe")?"closed":"open";Object(c.b)(u,l,d);var f=Object(a.b)(i,e,r,{file:u});Object(a.c)(p,f)}})),'"\n\t\tdata-filepath="').concat(n.path,'"\n\t\tdata-windowid="').concat(e,'"\n\t\tdata-tagname="').concat(i,'"\n\t\tdata-tagcontent="').concat(encodeURIComponent(l),'"\n\t>').concat(Object(c.d)("eye"),"</div>"),f='<div class="cm-ctag-name">[[ '.concat(i," ]]</div>"),b='<div class="cm-ctag-overview">'.concat(f).concat(d,"</div>");return'<div class="cm-ctag-wrapper '.concat(p,'">').concat(b).concat('<div class="iframe-wrapper-cm-ctag"></div>',"</div>")}(e.matchs,t,n),i}})},p=function(){return"\n\t.cm-ctag-wrapper {\n\t\tposition:relative;\n\t\tbackground: #f2f2f2;\n\t\tpadding: 8px;\n\t\tborder-radius: 5px;\n\t\t.cm-ctag-overview {\n\t\t\tdisplay: flex;\n\t\t\t.cm-ctag-name {\n\t\t\t\tfont-weight: bold;\n\t\t\t\tcolor: ".concat(l.a.colors.main,";\n\t\t\t}\n\t\t\t.button-ctag-cm-toggle {\n\t\t\t\tposition: absolute;\n\t\t\t\tright: 0px;\n\t\t\t\ttop: -1px;\n\t\t\t\topacity: 0.5;\n\t\t\t\tcursor: pointer;\n\t\t\t\tpadding: 10px;\n\t\t\t\t&:hover {\n\t\t\t\t\topacity: 0.7;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t.iframe-wrapper-cm-ctag {\n\n\t\t}\n\t}\n\t\n\n\t")}},225:function(t,n,e){"use strict";e.d(n,"a",(function(){return f})),e.d(n,"b",(function(){return b}));var o=e(10),i=e(5),c=e(0),a=e(68),r=e(9),l=e(42),s=e(13),u=e(35),p=e(24),d=e(1),f=function(t){var n=Object(c.useState)(!1),e=Object(i.a)(n,2),p=e[0],f=e[1],b=Object(c.useState)(!1),g=Object(i.a)(b,2),h=g[0],m=g[1];Object(c.useEffect)((function(){p&&m(!0)}),[t.cursorInfos.y]);var v=function(n){m(!1),t.onButtonClicked(n)},w=[{icon:"faCircle",action:function(){f(!1),m(!1)},class:"separator"},{icon:"faUndo",action:function(){return v("undo")}},{icon:"faRedo",action:function(){return v("redo")}},{icon:"faAngleLeft",action:function(){return v("<-")}},{icon:"faAngleRight",action:function(){return v("->")}},{icon:"faCheckSquare",action:function(){return v("[x]")}},{icon:"faAngleUp",action:function(){return v("^")}},{icon:"faAngleDown",action:function(){return v("v")}},{icon:"faEraser",action:function(){return v("X")}},{icon:"faClone",action:function(){return v("C")}}],O=[];if(O.push({icon:"faCircle",action:function(){return f(!0)}}),t.selection.length>0){var j=Object(a.d)(t.selection),x={icon:"chart-line",action:function(){},customHtml:Object(d.c)("div",{className:"numbers-preview-wrapper"},Object(d.c)("i",{className:"fa fa-chart-line"}),Object(d.c)("span",{className:"numbers-preview"},Object(a.h)(t.selection)))};j&&(x={icon:"calculator",title:"Calculate selection",customHtml:Object(d.c)("div",{className:"numbers-preview-wrapper"},Object(d.c)("i",{className:"fa fa-calculator"}),Object(d.c)("span",{className:"numbers-preview"},Object(a.a)(t.selection))),action:function(){t.onButtonClicked("calc"),f(!1)}});var k={icon:"wand-magic-sparkles",title:"AI assistant",action:function(){t.onButtonClicked("aiSearch"),f(!1)}},y={icon:"copy",title:"Copy line link",action:function(){t.onButtonClicked("copyLineLink"),f(!1)}},_={icon:"spell-check",title:"Proofread selection",action:function(){t.onButtonClicked("proofread"),f(!1)}};u.d.curr.ui_editor_live_watch&&O.push(k),O.push(y),O.push(_),u.d.curr.ui_editor_live_watch&&O.push(x);var C=Object(o.a)({},x);C.class="separator-right",u.d.curr.ui_editor_live_watch&&w.push(C),w.push(y),w.push(_),u.d.curr.ui_editor_live_watch&&w.push(k)}return Object(d.c)("div",{className:"mobile-toolbar-wrapper device-".concat(Object(s.a)()," ").concat(p?"open":"closed"," ").concat(h?"popup-transparent":"")},!p&&Object(d.c)(l.a,{class:"mobile-text-manip-toolbar closed",size:"desktop"===Object(s.a)()?.8:1,colors:[r.a.colors.editor.mobileToolbar.font,r.a.colors.editor.mobileToolbar.font],buttons:O,popup:!1}),p&&Object(d.c)(l.a,{class:"mobile-text-manip-toolbar",size:"desktop"===Object(s.a)()?.8:1,colors:[r.a.colors.editor.mobileToolbar.font,r.a.colors.editor.mobileToolbar.font],buttons:w,popup:!1}))},b=function(){return"\n.mobile-text-manip-toolbar-wrapper {\n z-index:1;\n \n \n pointer-events: none;\n position: absolute;\n width: 100%;\n // z-index: 100;\n display: flex;\n justify-content: flex-end;\n}\n.mobile-text-manip-toolbar {\n \n \n\t\t.toolbar-button {\n\t\t\t\tpadding: 13px 20px;\n\t\t}\n}\n\n.numbers-preview-wrapper {\n display: flex;\n font-size: ".concat(Object(p.a)(),"px;\n font-weight: 400;\n i {\n margin-top: 2px;\n }\n .numbers-preview {\n margin-left: 5px;\n }\n}\n\n .mobile-toolbar-wrapper {\n &.popup-transparent {\n opacity: 0.4;\n }\n\n\n .mobile-text-manip-toolbar {\n width: 10px;\n flex-direction: column;\n pointer-events: all;\n margin-right:20px;\n \n background: #fff;\n border-radius: 10px;\n display: flex;\n list-style: none;\n padding: 0px 10px;\n box-shadow: 0px 0px 5px 0px rgba(0,0,0,0.2);\n align-content: center;\n justify-content: center;\n align-items: center;\n // height: ").concat(r.a.sizes.mobile.editorBar,"px;\n &:hover {\n opacity: 1;\n }\n opacity: 0.4;\n left: 15px;\n \n transition: opacity 0.2s;\n \n .toolbar-button {\n padding: 3px 5px; \n }\n .separator {\n // margin-left: 8px;\n }\n .separator-right {\n // margin-right: 8px;\n }\n\n li {\n flex: 1 1 auto;\n justify-content: center;\n display: flex;\n }\n\n &.closed {\n opacity: 0.2;\n background: none;\n box-shadow: none;\n &:hover {\n background: #fff;\n box-shadow: 0px 0px 5px 0px rgba(0,0,0,0.2);\n opacity: 1;\n }\n }\n\n \n }\n\n &.device-mobile {\n .mobile-text-manip-toolbar {\n transform: scale(0.9);r\n opacity: 1;\n &.closed {\n opacity: 0.2;\n &:hover {\n opacity: 1;\n }\n } \n transform: scale(1);\n .toolbar-button {\n // padding: 12px; \n }\n }\n }\n \n }\n")}},226:function(t,n,e){"use strict";e.d(n,"a",(function(){return x})),e.d(n,"b",(function(){return k}));var o=e(15),i=e(5),c=e(25),a=e(564),r=e(0),l=e.n(r),s=e(227),u=e(11),p=e(18),d=e(89),f=e(66),b=e(178),g=e(14),h=e(19),m=e(9),v=e(27),w=e(56),O=e(24),j=e(1),x=function(t){var n=Object(r.useState)([]),e=Object(i.a)(n,2),m=e[0],O=e[1],x=Object(r.useState)(!1),k=Object(i.a)(x,2),y=k[0],_=k[1],C=function(){var n=E();O([].concat(n)),_(!0),g.b.emit("askFileHistory",{filepath:t.file.path,token:Object(p.b)()});var e=g.b.on("getFileHistory",(function(t){var i=[];Object(c.a)(t.files,(function(t){var n,e=null===(n=t.filenameWithoutExt)||void 0===n?void 0:n.split("___")[1];e&&(t.created=Object(s.a)(e).num.timestamp),t.created&&t.created<Date.now()&&i.push(t)}));var r=Object(a.a)(i,["created"],["desc"]);O([].concat(n,Object(o.a)(r))),_(!1),g.b.off(e)}))},E=function(){var n=[],e=Object(b.b)(t.file.path);return Object(c.a)(e,(function(t,e){var o=e+1,i=Object(d.a)();i.created=t.timestamp,i.path=t.path+o;var c="Temporary local save ".concat(o," from ").concat(Object(f.a)(new Date(i.created||0)));i.name=c,i.realname=c,i.localContent=t.content,i.isLocal=!0,n.push(i)})),console.log("getLSHistoryList",e,t.file.path),n};Object(r.useEffect)((function(){C()}),[]);var S=Object(r.useContext)(u.a),T=Object(r.useState)(""),I=Object(i.a)(T,2),N=I[0],P=I[1],R=Object(r.useState)(null),A=Object(i.a)(R,2),F=A[0],L=A[1];return Object(j.c)("div",{className:"history-popup-wrapper"},Object(j.c)(w.a,{title:"".concat(h.a.historyPopup.title,'"').concat(t.file.realname,'"'),onClose:function(){t.onClose()}},Object(j.c)("div",{className:"count"},m.length," backups found :"),y&&Object(j.c)("div",{className:"count"}," (Loading backend history files...)"),Object(j.c)("div",{className:"table-wrapper"},Object(j.c)("table",null,Object(j.c)("thead",null,Object(j.c)("tr",null,Object(j.c)("th",null,h.a.historyPopup.thead.name),Object(j.c)("th",null,h.a.historyPopup.thead.date))),Object(j.c)("tbody",null,m.map((function(t){return Object(j.c)("tr",{className:"".concat((null===F||void 0===F?void 0:F.path)===t.path?"active":""),onClick:function(){!function(t){t.isLocal&&t.localContent?(P(t.localContent),L(t)):S&&S.file.getContent(t.path,(function(n){P(n),L(t)}))}(t)}},Object(j.c)("td",null," ",t.realname," "),Object(j.c)("td",null," ",Object(f.a)(new Date(t.created||0))," "),Object(j.c)("td",null," ",!t.isLocal&&Object(j.c)("div",{className:"trash",onClick:function(){!function(t){Object(u.d)((function(n){n.file.delete(t,(function(t){C(),L(null),P("")}))}))}(t)}}," ",Object(j.c)(v.a,{name:"faTrash",color:"grey"})," ")))}))))),N&&Object(j.c)(l.a.Fragment,null,Object(j.c)("div",{className:"note-preview"},Object(j.c)("textarea",{className:"note-preview-textarea",value:N}),Object(j.c)("div",{className:"button-wrapper"},Object(j.c)("button",{className:"button",onClick:function(){Object(u.d)((function(n){n.file.saveContent(t.file.path,N)}))}},"Restore version")),Object(j.c)("div",{className:"advice"},' To disable history backup for a note, add "--disable-history--"in it')))))},k=function(){return"\n.history-popup-wrapper .popup-wrapper-component .popup-wrapper {\n\theight: 70%;\n}\n.history-popup-wrapper .popup-wrapper .count {\n\tposition: relative;\n top: -9px;\n font-weight: 600;\n}\n.filemain-wrapper .history-popup-wrapper .popup-wrapper-component .popup-wrapper {\n\twidth: 90%;\n}\n.history-popup-wrapper {\n\t.popup-wrapper .popupContent {\n\t\t// max-height: 70vh;\n\t\tpadding: 0px;\n\t}\n\t.table-wrapper {\n\t\t// max-height: 30vh;\n\t\theight: 50%;\n\t\toverflow-y: auto;\n\t\tpadding: 0px 0px 20px 0px;\n\t\t\n\t\ttable {\n\t\t\tborder-spacing: 0px;\n\t\t\tthead {\n\t\t\t\ttr {\n\t\t\t\t\tth {\n\t\t\t\t\t\tpadding: 8px;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\ttbody {\n\t\t\t\ttext-align: left;\n\t\t\t\ttr {\n\t\t\t\t\tcursor: pointer;\n\t\t\t\t\tbackground: #f1f0f0;\n\t\t\t\t\t&:nth-child(2n) {\n\t\t\t\t\t\tbackground: none;\n\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t&.active {\n\t\t\t\t\t\t\t\t\t\t\tfont-weight: bold;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t&: hover {\n\t\t\t\t\t\tbackground: r".concat(m.a.colors.main,";\n\t\t\t\t\t}\n\t\t\t\t\ttd {\n\t\t\t\t\t\tpadding: 8px;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t.note-preview {\n\t\theight: 50%;\n\t\t.note-preview-textarea {\n\t\t\tpadding: 6px;\n\t\t\tmargin: 10px 0px 0px 0px;\n\t\t\twidth: calc(100% - 10px);\n\t\t\t// height: calc(100% - 90px);\n\t\t\theight: calc(100% - 89px);\n\t\t\tborder: none;\n\t\t\tbackground: gainsboro;\n\t\t}\n\t}\n\t.advice {\n\t\tcolor: #a4a4a4;\n\tfont-size: ").concat(Object(O.a)(),"px;\n\tpadding: 3px 3px;\n\t}\n\t.trash {\n\tmargin-right: 15px;\n\t}\n}\n")}},227:function(t,n,e){"use strict";e.d(n,"a",(function(){return i}));var o=function(t){return("0"+t).slice(-2)};String.prototype.replaceAll||(String.prototype.replaceAll=function(t,n){return"[object regexp]"===Object.prototype.toString.call(t).toLowerCase()?this.replace(t,n):this.replace(new RegExp(t,"g"),n)});var i=function(t){var n=function(t){var n=new Date;if(t&&""!==t&&"undefined"!==t)if("string"===typeof t){var e=t,i=t;if(t.startsWith("f")){var c=(e=t.replaceAll("f","").replaceAll("h",":").replaceAll("m",":00").replaceAll("-","/").replaceAll("_"," ")).split("/");e="".concat(c[1],"/").concat(c[0],"/").concat(c[2]),i="".concat(c[0],"/").concat(c[1],"/").concat(c[2])}else if(t.startsWith("d")){var a=t.replaceAll("d","").split("_")[0].split("-");e="".concat(a[1],"/").concat(a[0],"/").concat(a[2])}else if(t.startsWith("w")){var r=t.replaceAll("w","").split("-"),l=o(7*parseInt(r[0]));e="".concat(r[1],"/").concat(l,"/").concat(r[2])}else if(t.startsWith("h")){var s=(e=t.replace("h","").replaceAll("h",":00:00").replaceAll("-","/").replaceAll("_"," ")).split("/");e="".concat(s[1],"/").concat(s[0],"/").concat(s[2])}var u=Number.isNaN(new Date(e).getDate());n=new Date(e),u&&(n=new Date(i))}else n=new Date(t);else n=new Date;return n}(t),e=n.getFullYear(),i=n.getMonth()+1,c=n.getDate(),a=e.toString(),r=o(i),l=o(c),s=o(n.getHours()),u=o(n.getMinutes()),p="".concat(r,"/").concat(l,"/").concat(a," ").concat(s,":").concat(u),d="".concat(r,"-").concat(l,"-").concat(a,"_").concat(s,"h").concat(u,"m"),f="".concat(l,"-").concat(r,"-").concat(a,"_").concat(s,"h").concat(u,"m"),b="".concat(r,"/").concat(l,"/").concat(a),g={year:e,month:i,day:c,hour:n.getHours(),min:n.getMinutes(),timestamp:n.getTime()},h=function(){return Math.ceil(c/7)};return{year:a,month:r,day:l,hour:s,min:u,full:p,num:g,date:b,raw:n,full_file:d,full_file_fr:f,getWeekNb:h,getCustomFormat:function(t){var n="f".concat(f);return"day"===t&&(n="d".concat(l,"-").concat(r,"-").concat(e)),"week"===t&&(n="w".concat(h(),"-").concat(r,"-").concat(e)),"hour"===t&&(n="h".concat(l,"-").concat(r,"-").concat(e,"_").concat(s,"h")),"".concat(n)}}}},233:function(t,n,e){"use strict";e.d(n,"a",(function(){return g})),e.d(n,"b",(function(){return h}));var o=e(5),i=e(10),c=e(235),a=e(25),r=e(55),l=e(0),s=e.n(l),u=e(11),p=e(19),d=e(118),f=e(1);var b={upload:{uploadCounter:0,reinit:function(){}},file:{onTitleUpdate:function(t,n){},onFileDelete:function(t){}}},g=s.a.createContext(b),h=function(t){var n=Object(i.a)({},t).tab,e=Object(l.useContext)(u.a),c=Object(l.useState)(b),s=Object(o.a)(c,2),h=s[0],v=s[1],w=function(){var t=Object(l.useContext)(u.a),n=Object(l.useState)({name:"",data:{}}),e=Object(o.a)(n,2),i=e[0],c=e[1],a=Object(l.useRef)({});return Object(l.useEffect)((function(){if(t){var cb=a.current[i.name];cb&&cb(t,i.data)}}),[i]),{onNextStateTrigger:function(t){c(t)},addNextStateAction:function(t,cb){a.current[t]=cb}}}(),O=w.onNextStateTrigger,j=w.addNextStateAction;j("refreshFolderList",(function(t,n){var e=t.ui.browser.folders.current.get();e===n.folder&&(t.ui.browser.goTo(e,n.name,{openIn:"activeWindow"}),O({name:"checkIfNoWindows"}))})),j("checkIfNoWindows",(function(t){0===n.grid.content.length&&t.tabs.close(n.id)}));var x=Object(r.a)(h);x.file.onFileDelete=function(t){e&&e.popup.confirm("".concat(p.a.trashNote),(function(){var n;null===(n=e.lastNotesApi)||void 0===n||n.removeFile(t.path),e.file.delete(t,(function(n){e.ui.windows.getIdsFromFile(t.path),n[n.length-1];var o=n[0];Object(a.a)(n,(function(t){t.modified&&o.modified&&t.modified>o.modified&&(o=t)})),O({name:"refreshFolderList",data:o})}))}))},x.file.onTitleUpdate=function(t,n){e&&e.file.move(t,n,(function(o){var i,c=null;if(Object(a.a)(o,(function(t){t.path===n&&(c=t)})),c){var r=e.ui.windows.getIdsFromFile(t);e.ui.windows.updateWindows(r,c),null===(i=e.lastNotesApi)||void 0===i||i.removeFile(t),O({name:"refreshFolderList",data:c})}}))},x.upload.reinit=function(){var t=Object(r.a)(h);delete t.upload.file,v(t)};var k=Object(l.useState)(0),y=Object(o.a)(k,2),_=y[0],C=y[1];return Object(l.useEffect)((function(){C(_+1)}),[n.refresh,JSON.stringify(t.pinStatus),t.forceRefresh]),Object(f.c)(m,null,Object(f.c)("div",{className:"window-grid-wrapper"},Object(f.c)(g.Provider,{value:x},Object(f.c)(d.a,{refresh:_,grid:n.grid,onGridUpdate:t.onGridUpdate,mobileView:t.mobileView}))))},m=Object(c.a)("div",{target:"ejnwhwz0"})({name:"zk0z9r",styles:"height:100%;.window-grid-wrapper{height:100%;}"})},237:function(t,n,e){"use strict";e.d(n,"b",(function(){return d})),e.d(n,"a",(function(){return f}));var o=e(5),i=e(0),c=e.n(i),a=e(13),r=e(9),l=e(27),s=e(170),u=e(1),p=function(t){var n=Object(i.useState)(""),e=Object(o.a)(n,2),c=e[0],p=e[1],d=Object(i.useState)(!1),f=Object(o.a)(d,2),b=f[0],g=f[1],h=!Object(s.a)(t.enabled)||t.enabled;Object(i.useEffect)((function(){p(t.title),g(!1)}),[t.title]);return Object(u.c)("div",{className:"title-input-wrapper"},Object(u.c)("input",{className:"big-title",type:"text",value:c,disabled:!h,onChange:function(t){var n=function(t){var n=t;return n.replace(/[^A-Za-z0-9_\ \-\u00a9\u00ae\u2000-\u3300\ud83c\ud000-\udfff\ud83d\ud000-\udfff\ud83e\ud000-\udfff]/g,"")}(t.target.value);p(n),g(!0)},onKeyDown:function(n){if(!1!==h&&"Enter"===n.key){if(c.length<3)return;t.onEdited(t.title,c),g(!1)}}}),b&&Object(u.c)("div",{className:"press-to-save"},Object(u.c)(l.a,{name:"faCircle",color:r.a.colors.main,size:.7})),b&&"mobile"===Object(a.a)()&&Object(u.c)("button",{className:"buttonSaveTitleMobile",onClick:function(){0!==c.length&&(g(!1),t.onEdited(t.title,c))}}," Save "))},d=function(){return"\n.buttonSaveTitleMobile {\n\t\tposition: relative;\n\t\tright: 20px;\n\n\n}\n"},f=c.a.memo(p,(function(t,n){var e=!1;return t.title!==n.title&&(e=!1),e}))},24:function(t,n,e){"use strict";e.d(n,"a",(function(){return c}));var o=e(35),i=e(13),c=function(t){return t||(t=0),"desktop"!==Object(i.a)()?10+t:(parseInt(Object(o.b)().ui_layout_general_font_size)||10)+t}},27:function(t,n,e){"use strict";e.d(n,"b",(function(){return r})),e.d(n,"c",(function(){return l})),e.d(n,"a",(function(){return s}));var o=e(0),i=e.n(o),c=e(28),a=e(1),r=function(t){var n=t.name,e=n.endsWith(".svg")||n.endsWith(".png")||n.endsWith(".jpg"),o=t.size?t.size:1;return o-=.2,n.startsWith("fa")&&(n=n.substr(2)),n[0]===n[0].toUpperCase()&&(n=n[0].toLowerCase()+n.substr(1)),n=n.replace(/[A-Z]/g,(function(t){return"-".concat(t.toLowerCase())})),Object(a.c)("span",{style:{transform:"scale(".concat(o,")"),display:"inline-block"}},!e&&Object(a.c)("span",{className:"icon-2-wrapper icon-wrapper",title:t.label,dangerouslySetInnerHTML:{__html:Object(c.d)(n)},style:{color:t.color||"#797979"}}),e&&Object(a.c)("span",{style:{transform:"scale(".concat(t.size,")"),display:"inline-block",width:"20px",height:"20px",background:"url('".concat(t.name,"')"),backgroundSize:"contain",backgroundRepeat:"no-repeat"}}))},l=function(){return"\n\t.icon-wrapper{\n\t\tdisplay: inline-block;\n\t}\n"},s=i.a.memo(r,(function(t,n){return JSON.stringify(t)===JSON.stringify(n)}))},28:function(t,n,e){"use strict";e.d(n,"d",(function(){return i})),e.d(n,"c",(function(){return c})),e.d(n,"b",(function(){return r})),e.d(n,"a",(function(){return l}));e(422);var o=e(11),i=function(t){return'<i class="ssr-icon fa-solid fa-'.concat(t,'"></i>')};window.ssrActionsDic={};var c=function(t,n){var e="window.ssrActionsDic['".concat(t,"'](this)"),o=window.ssrActionsDic;return o[t]||(o[t]=function(t){n(t)}),e},a=function(t,n){var e="ressource-preview-status-".concat(t.path),o=n.indexOf("token=");return o>-1&&(n=n.substring(0,o)),{cacheId:e,idRess:"".concat(t.path,"-").concat(n)}},r=function(t,n,e){var i=a(t,n),c=i.cacheId,r=i.idRess;Object(o.d)((function(t){t.cache.get(c,(function(n){n||(n={}),n[r]=e,t.cache.set(c,n,-1)}))}))},l=function(t,n,e){!function(t,n,cb){var e=a(t,n),i=e.cacheId,c=e.idRess;Object(o.d)((function(t){t.cache.get(i,(function(t){if(t){var n=t[c]?t[c]:"closed";cb(n)}}))}))}(t,n,(function(t){"open"===t&&setTimeout((function(){e()}),500)}))}},29:function(t,n,e){"use strict";e.d(n,"b",(function(){return o})),e.d(n,"d",(function(){return i})),e.d(n,"c",(function(){return c})),e.d(n,"a",(function(){return a}));var o=function(t){return t=(t=(t=(t=(t=t.split("://").join("__HTTP__SEP")).split("//").join("/")).split("\\").join("/")).split("//").join("/")).split("__HTTP__SEP").join("://")},i=function(t){var n=function(t){var n=t.split("/"),e=t.split("\\"),o=n.length>e.length?n:e,i=o[o.length-1],c=i.split("."),a=t.replace(i,""),r="";c.length>1&&(r=c[c.length-1]);var l=i.replace(".".concat(r),"");return{filename:i,extension:r,path:t,folder:a,filenameWithoutExt:l}}(t),e=n.extension?"file":"folder";return{path:t,realname:n.filename,nature:e,name:n.filename,extension:n.extension,folder:n.folder,filenameWithoutExt:n.filenameWithoutExt}},c=function(t){var n=t.match(/(.*)[\/\\]/),e=n?n[1]+"/":"";return o(e)},a=function(t,n){return o(t+"/")===o(n+"/")}},30:function(t,n,e){"use strict";e.d(n,"a",(function(){return r}));var o=e(37),i=e.n(o),c=e(17),a={img:i()().find(".").then("jpg").or("jpeg").or("png").or("gif").or("webm").or("svg").or("webp"),imgMdConfig:i()().anythingBut("[]|").maybe("|").beginCapture().anythingBut("[]|").endCapture().maybe("|").beginCapture().anythingBut("[]|").endCapture(),customTag:/\[\[[a-zA-Z0-9-\ _\/]*\]\]/},r={strings:{charWithAccents:"[a-zA-Z\xc0-\u024f\u1e00-\u1eff]{1}",tableLine:"([a-z\xc0-\xfaA-Z0-9@:%,-*._+~#= ]+|)"},checkbox:/\[ \]|\[x\]|\[X\]/gi,dateFrFormat:/([0-9]{1,2})\/([0-9]{1,2})\/([0-9]{4})/gi,metas:i()().find(c.a.metas.headerStart).beginCapture().anythingBut("").endCapture().then(c.a.metas.headerEnd),titleHtml:/<(title)[^>]*>([^<]*)<\/\1>/gi,metasHtml:/<meta[^>]*(name|property)="([^"]*)"[^>]*content="([^"]*)"[^>]*>/gi,externalLink3:/https?:\/\/((www\.)?[a-z\xc0-\xfaA-Z0-9@:%._\+~#=]{1,256})\b(\/[-a-zA-Z\xc0-\xfa0-9()\*\;\!@:%_\-\+.,~#?&\/=]*\/)?([-a-zA-Z\xc0-\xfa0-9()\*\;\!@:%_\-\+.,~#?&\/=]*)\/(\n| |$)/gim,externalLink3Int:/https?:\/\/((www\.)?[a-z\xc0-\xfaA-Z0-9@:%._\+~#=]{1,256})\b(\/[-a-zA-Z\xc0-\xfa0-9()\*\;\!@:%_\-\+.,~#?&\/=]*\/)?([-a-zA-Z\xc0-\xfa0-9()\*\;\!@:%_\-\+.,~#?&\/=]*)\//gim,mdTableLine:/\|?(([^\|]+\|)+([^\|]+))\|?/gim,mdTitle:/^([#]{1,9})\ (.+)/gi,mdTableCell:/((([^|\n])+\|)|(([^|\n])+))/gim,hashtag:/#([A-z\xc0-\xfa0-9_\-]+)/gi,matchingHtmlTags:/<([^>]*)>([^<]*)<\/\1>/,baliseHtml:i()().find("<").anythingBut("<>").then(">"),ressource:i()().find("![").beginCapture().anythingBut("[]").endCapture().then("](").beginCapture().anythingBut("()").endCapture().then(")"),ref:i()().find("[").anythingBut("[]").then("](").anythingBut("()").then(")"),extimage:i()().find("![").anythingBut("[]").then("](").beginCapture().then("http").anythingBut("()").then(a.img).anythingBut("()").endCapture().then(")"),image:i()().find("![").anythingBut("[]").then("](").beginCapture().anythingBut("()").then(a.img).anythingBut("()").endCapture().then(")"),image2:/!\[(.*?)\]\((.*?\.(jpg|png|gif|bmp|jpeg|webm|svg|webp"))\)(\{(.*)\})?/gim,fullImageMd:i()().beginCapture().find("![").anythingBut("[]").then("](").anythingBut("()").then(a.img).anythingBut("()").endCapture().then(")"),imageMdSrc:i()().find("![").anythingBut("[]").then("](").beginCapture().anythingBut("()").then(a.img).anythingBut("()").endCapture().then(")"),imageAndTitleCapture:i()().find("![").beginCapture().anythingBut("[]").endCapture().then("](").beginCapture().anythingBut("()").then(a.img).anythingBut("()").endCapture().then(")"),imageAndTitleCapture2:/\!\[([^\[\]]+)\]\(([^\(\)]+\.(jpg|jpeg|png|gif|webm|svg|webp))\)/gi,imageAndConfig:i()().find("![").then(a.imgMdConfig).then("](").beginCapture().anythingBut("()").then(a.img).anythingBut("()").endCapture().then(")"),searchlink:i()().find("[search|").beginCapture().anythingBut("[]").endCapture().then("]"),linklink2:i()().find("123").beginCapture().anythingBut("456").endCapture().then("456"),linklink:i()().find("[link|").beginCapture().anythingBut("[]").endCapture().then(" ").beginCapture().then("/").anythingBut("[]").endCapture().then("]"),latexTag:i()().find("[[latex]]").beginCapture().anythingBut("").endCapture().then("[[latex]]"),scriptTag:i()().find("[[script]]").beginCapture().anythingBut("").endCapture().then("[[script]]"),userCustomTagFull:i()().find(a.customTag).beginCapture().anythingBut("").endCapture().then(a.customTag),userCustomTagFull2:i()().beginCapture().beginCapture().find(a.customTag).endCapture().anythingBut("").beginCapture().then(a.customTag).endCapture().endCapture(),userCustomTagFull3:i()().beginCapture().find(a.customTag).endCapture(),userCustomTag3:i()().beginCapture().then(a.customTag).endCapture(),userCustomTagManual:a.customTag,externalLink:i()().find("http").maybe("s").then("://").beginCapture().anythingBut("/ ").endCapture().beginCapture().anythingBut(" ").then("/").beginCapture().anythingBut("? ").endCapture().anythingBut(" \n").then("\\n").endCapture(),url2transform:i()().find("!").beginCapture().find("http").maybe("s").then("://").beginCapture().anything().endCapture().endCapture(),searchFolder:i()().find(" /").anything().endOfLine(),searchFolderNoSpace:i()().find("/").anything().endOfLine(),firstPartImg:i()().find("![").anythingBut("[]").then("]("),hashtag3:i()().find(/[-| |\n]{1}\#([A-z\xc0-\xfa1-9_\-]+)/gi),titleMd:i()().startOfLine().find("#").oneOrMore().then(" ").beginCapture().anythingBut("").endCapture(),scriptHtml:i()().find("<script>").beginCapture().anythingBut("").endCapture().then("<\/script>")}},31:function(t,n,e){"use strict";e.d(n,"a",(function(){return c})),e.d(n,"c",(function(){return a})),e.d(n,"b",(function(){return r})),e.d(n,"d",(function(){return l}));e(10);var o=e(11),i="tiroDevCli",c=function(t,n,e){window[i]||(window[i]={}),window[i][t]||(window[i][t]={}),window[i][t][n]=e},a=function(t,n){return window[i]&&window[i][t]&&window[i][t][n]?window[i][t][n]:function(){console.log("DEV FN",t,n,"does not exists")}},r=function(t,n){if(window[i]&&window[i][t]&&window[i][t][n])window[i][t][n]();else{var e="DEV FN ".concat(t," ").concat(n," does not exists");console.log(e),l(e)}},l=function(t,n,e){console.log("[NOTIF LOG]: ",t),e||(e=60),Object(o.d)((function(o){o.ui.notification.emit({content:t,id:n,options:{hideAfter:e,type:"warning",keepInHistory:!0}})}))}},32:function(t,n,e){"use strict";e.d(n,"b",(function(){return a})),e.d(n,"a",(function(){return r}));var o=e(377),i=e(121),c=e(0);function a(cb,t){var n=Object(c.useRef)(cb);return Object(c.useEffect)((function(){n.current=cb})),Object(c.useCallback)(Object(o.a)((function(){return n.current.apply(n,arguments)}),t,{leading:!0,trailing:!1}),[t])}function r(cb,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],e={leading:!1,trailing:!0};n&&(e.leading=n);var o=Object(c.useRef)(cb),a=function(){var t=Object(c.useRef)(!0);return Object(c.useEffect)((function(){return function(){t.current=!1}}),[]),function(){return t.current}}();return Object(c.useEffect)((function(){o.current={cb:cb,delay:t}})),Object(c.useCallback)(Object(i.a)((function(){var n;o.current.delay===t&&a()&&(n=o.current).cb.apply(n,arguments)}),t,e),[t,i.a])}},35:function(t,n,e){"use strict";e.d(n,"d",(function(){return h})),e.d(n,"b",(function(){return m})),e.d(n,"a",(function(){return j})),e.d(n,"c",(function(){return _}));var o=e(5),i=e(25),c=e(565),a=e(378),r=e(55),l=e(0),s=e(38),u=e(17),p=e(14),d=e(9),f=e(18),b=e(32),g=e(60),h={curr:{}},m=function(){return h.curr},v=function(t){var n={};return new URLSearchParams(t).forEach((function(t,e){n[e]=t})),n}(window.location.search),w={};for(var O in v)w[O]=v[O];var j={ui_sidebar:!0,ui_filesList_sortMode:2,ui_layout_colors_main:"#E86666",ui_layout_colors_main_font:"#FFFFFF",ui_editor_markdown_preview:!0,ui_editor_markdown_latex_preview:!0,ui_editor_markdown_enhanced_preview:!0,ui_editor_markdown_table_preview:!0,ui_editor_spellcheck:!0,ui_editor_live_watch:!0,ui_editor_links_as_button:!0,ui_editor_markdown_tags:!0,ui_editor_links_preview_zoom:.8,ui_editor_show_image_title:!1,export_pandoc_cli_options:"\ndocx | --wrap=preserve --toc --number-sections \n revealjs | -V theme=moon \n beamer | --wrap=preserve --include-in-header=./include-tex.md ",advanced_image_compression_settings:JSON.stringify({quality:80,maxWidth:1500}),ui_editor_ai_text_selection:!0,ui_editor_ai_command:"export OPENAI_API_KEY='YOUR_OPENAI_API_KEY'; npx chatgpt \" {{input}}\" --continue --model gpt-4 ",server_activity_logging_enable:!1,view_disable_notification_popups:!1,beta_floating_windows:!1,beta_plugins_marketplace:!1,plugins_marketplace_url:"https://raw.githubusercontent.com/dotgreg/tiro-notes/master/docs/marketplace.json",ui_layout_general_font_size:10,ui_layout_background_image_enable:!1,ui_layout_background_video_enable:!1,ui_layout_background_image_window_opacity:70,ui_layout_background_image_window_opacity_active:90,ui_layout_background_video_width:100,ui_layout_background_video_height:100,ui_layout_font_family_interface:"Helvetica neue, Open sans, arial, sans-serif",ui_layout_font_family_editor:"Helvetica neue, Open sans, arial, sans-serif"},x=j,k="[USER SETTINGS] :",y=u.a.client.log.verbose,_=function(t){var n=Object(g.a)("user-settings",{},{history:!0}),e=Object(o.a)(n,3),u=e[0],m=e[1],v=e[2],w=Object(l.useState)(0),O=Object(o.a)(w,2),_=O[0],C=O[1],E=Object(l.useRef)([]),S=function(t,n,e){E.current[t]||(E.current[t]=n[e]);var o=u[t];Object(c.a)(o)||Object(a.a)(o)||(""===o&&E.current[t]&&(o=E.current[t]),n[e]=o)};Object(l.useEffect)((function(){T(),h.curr=u,Object(i.a)(x,(function(t,n){Object(a.a)(u[n])&&(u[n]=t)}))}),[u]);var T=Object(b.a)((function(){y&&console.log(k,"UPDATE!",u,_),S("ui_layout_colors_main",d.a.colors,"main"),S("ui_layout_colors_main_font",d.a.colors,"mainFont"),S("ui_layout_font_family_editor",d.a.font,"editor"),S("ui_layout_font_family_interface",d.a.font,"main"),C(_+1)}),1e3),I=function(n,e,cb,o){var i="updateSetupJson-".concat(Object(s.a)());t.eventBus.subscribe(i,(function(t){cb&&cb(t)})),p.b.emit("updateSetupJson",{paramName:n,paramValue:e,opts:o,token:Object(f.b)(),idReq:i})};Object(l.useEffect)((function(){p.b.on("onServerTaskFinished",(function(n){t.eventBus.notify(n.idReq,{data:n})}))}),[]);var N={refreshUserSettingsFromBackend:v,updateSetupJson:I,set:function(t,n,e){e||(e={}),e.writeInSetupJson||(e.writeInSetupJson=!1),e.writeInSetupJson&&I(t,"".concat(n)),y&&console.log(k,"updateUserSettings ".concat(t," to ").concat(n));var o=Object(r.a)(u);o[t]=n,m(o)},get:function(t,cb){var n=x[t],e=n;return t in u&&(e=u[t]),""===e&&(e=n),cb&&cb({currentValue:e,defaultValue:n}),e},list:function(){return function(t){var n=[];return Object(i.a)(t,(function(t,e){var o=e;n.push({key:o,val:t})})),Object(i.a)(j,(function(t,e){var o=e;n.find((function(t){return t.key===o}))||n.push({key:o,val:t})})),n}(u)},refresh:{css:{get:_}}};return{userSettingsApi:N}}},369:function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"a",(function(){return useRessourceApi}));var _config_workspace_tiro_notes_client_node_modules_babel_runtime_helpers_esm_construct_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(228),_config_workspace_tiro_notes_client_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(10),react__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(0),react__WEBPACK_IMPORTED_MODULE_2___default=__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__),_shared_helpers_id_helper__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(38),_shared_shared_config__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(17),_managers_sockets_socket_manager__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(14),_app_loginToken_hook__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(18),_api_hook__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(11),_managers_url_manager__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__(72),lodash_es__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__(25),_managers_ressource_manager__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__(218),_managers_devCli_manager__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__(31),_managers_tryCatch_manager__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__(370),h="[RESSOURCE API] ",useRessourceApi=function useRessourceApi(p){var _p=Object(_config_workspace_tiro_notes_client_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1__.a)({},p),eventBus=_p.eventBus;Object(react__WEBPACK_IMPORTED_MODULE_2__.useEffect)((function(){_managers_sockets_socket_manager__WEBPACK_IMPORTED_MODULE_5__.b.on("getRessourceApiAnswer",(function(t){eventBus.notify(t.idReq,t)})),_managers_sockets_socket_manager__WEBPACK_IMPORTED_MODULE_5__.b.on("getRessourceScan",(function(t){eventBus.notify(t.idReq,t)}))}),[]);var deleteRessource=function(t,cb){var n=Object(_api_hook__WEBPACK_IMPORTED_MODULE_7__.c)("delete-ressource");console.log("".concat(h," delete ressource ").concat(t)),p.eventBus.subscribe(n,cb),_managers_sockets_socket_manager__WEBPACK_IMPORTED_MODULE_5__.b.emit("askRessourceDelete",{path:t,idReq:n,token:Object(_app_loginToken_hook__WEBPACK_IMPORTED_MODULE_6__.b)()})},downloadRessource=function(t,n,cb,e){var o=Object(_api_hook__WEBPACK_IMPORTED_MODULE_7__.c)("download-ressource");p.eventBus.subscribe(o,cb),_managers_sockets_socket_manager__WEBPACK_IMPORTED_MODULE_5__.b.emit("askRessourceDownload",{url:t,folder:n,idReq:o,opts:e,token:Object(_app_loginToken_hook__WEBPACK_IMPORTED_MODULE_6__.b)()})},fetchRessource=function(t,cb,n){n||(n={}),n.disableCache||(n.disableCache=!1),n.returnsPathOnly||(n.returnsPathOnly=!1),"false"===n.disableCache&&(n.disableCache=!1),"true"===n.disableCache&&(n.disableCache=!0);var e="/.tiro/cache/fetch/",o=Object(_managers_ressource_manager__WEBPACK_IMPORTED_MODULE_10__.a)("/".concat(e).concat(Object(_shared_helpers_id_helper__WEBPACK_IMPORTED_MODULE_3__.b)(t))),i=function(){fetch(o).then((function(t){return t.text()})).then((function(t){Object(_managers_tryCatch_manager__WEBPACK_IMPORTED_MODULE_12__.a)((function(){return cb(t,o)}))}))},c=function(){downloadRessource(t,e,(function(t){var e;t.message&&(null!==(e=n)&&void 0!==e&&e.returnsPathOnly?cb("",o):i())}),n)};!0===n.disableCache?c():Object(_managers_url_manager__WEBPACK_IMPORTED_MODULE_8__.a)({url:o,onSuccess:function(){i()},onFail:function(){c()}})},fetchUrlArticle=function fetchUrlArticle(url,cb,options){var readabilityUrl="https://cdn.jsdelivr.net/npm/moz-readability@0.2.1/Readability.js";fetchRessource(readabilityUrl,(function(readabilityTxt){var r1=eval(readabilityTxt);fetchRessource(url,(function(t){var n=document.implementation.createHTMLDocument("");n.open(),n.write(t),n.close();var e=new r1(n).parse(),o=(null===e||void 0===e?void 0:e.textContent.replaceAll(" ","\n"))||"";o=(o=(o=(o=o.replaceAll(" ","\n")).replaceAll(" ","\n")).replaceAll(" ","\n")).replaceAll(" ","\n");var i=(null===e||void 0===e?void 0:e.content)||"",c=(null===e||void 0===e?void 0:e.title)||"";cb({title:c,text:o,html:i,raw:t})}))}))},ramFetchEvalCache={val:{}},fetchEval=function(t,n,e,cb){e||(e={}),e.disableCache||(e.disableCache=!1),"true"===e.disableCache&&(e.disableCache=!0),console.log(h,"fetchEval",t,n,e);var o=function(o){try{var i=[],c=[];Object(lodash_es__WEBPACK_IMPORTED_MODULE_9__.a)(n,(function(t,n){i.push(n),c.push(t)}));var a=Object(_config_workspace_tiro_notes_client_node_modules_babel_runtime_helpers_esm_construct_js__WEBPACK_IMPORTED_MODULE_0__.a)(Function,i.concat([o])).apply(void 0,c);cb&&cb(a)}catch(l){var r="[ERR remote code] (api.ress.fetchEval): ".concat(l," <br> url: ").concat(t," (more infos in console)");console.log(r,l,{url:t,funcParams:n,options:e}),Object(_managers_devCli_manager__WEBPACK_IMPORTED_MODULE_11__.d)("".concat(r))}};!0===e.disableCache&&(ramFetchEvalCache.val[t]=null),ramFetchEvalCache.val[t]&&!0!==e.disableCache?o(ramFetchEvalCache.val[t]):fetchRessource(t,(function(n){o(n),ramFetchEvalCache.val[t]=n}),e)},cleanCache=function(){ramFetchEvalCache.val={},Object(_api_hook__WEBPACK_IMPORTED_MODULE_7__.d)((function(t){t.folders.delete("cache","fetch")}))},scanRessourceFolder=function(t,cb){_shared_shared_config__WEBPACK_IMPORTED_MODULE_4__.a.client.log.socket&&console.log("[CLIENT API] get ressources files ".concat(t));var n=Object(_api_hook__WEBPACK_IMPORTED_MODULE_7__.c)("get-ressources-files-");p.eventBus.subscribe(n,cb),_managers_sockets_socket_manager__WEBPACK_IMPORTED_MODULE_5__.b.emit("askRessourceScan",{folderPath:t,token:Object(_app_loginToken_hook__WEBPACK_IMPORTED_MODULE_6__.b)(),idReq:n})},compressImage=function(t,cb){var n=Object(_api_hook__WEBPACK_IMPORTED_MODULE_7__.c)("compress-image");console.log("".concat(h," compress image ").concat(t.path)),p.eventBus.subscribe(n,cb||function(){}),_managers_sockets_socket_manager__WEBPACK_IMPORTED_MODULE_5__.b.emit("askRessourceImageCompress",{params:t,idReq:n,token:Object(_app_loginToken_hook__WEBPACK_IMPORTED_MODULE_6__.b)()})},ressourceApi={delete:deleteRessource,download:downloadRessource,compressImage:compressImage,scanFolder:scanRessourceFolder,fetch:fetchRessource,fetchEval:fetchEval,fetchUrlArticle:fetchUrlArticle,cleanCache:cleanCache};return ressourceApi}},370:function(t,n,e){"use strict";e.d(n,"a",(function(){return i}));var o=e(31),i=function(t){try{t()}catch(n){Object(o.d)("".concat(n))}}},38:function(t,n,e){"use strict";e.d(n,"a",(function(){return o})),e.d(n,"b",(function(){return i}));var o=function(){var t=(new Date).getTime(),n="undefined"!==typeof performance&&performance.now&&1e3*performance.now()||0;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var o=16*Math.random();return t>0?(o=(t+o)%16|0,t=Math.floor(t/16)):(o=(n+o)%16|0,n=Math.floor(n/16)),("x"===e?o:3&o|8).toString(16)}))},i=function(t){var n=t,e=n.split("?")[1]||"",o=n.split("?")[0],i=o.replace(/[^\w\s]/gi,"_"),c=e.replace(/[^\w\s]/gi,"_"),a=o.split(".").pop()||"";((a="."+a.replace(/[^\w\s]/gi,"_")).length>6||a.length<=1)&&(a="");var r="".concat(i,"_").concat(c);return r.length>200&&(r=r.slice(0,200)),"".concat(r).concat(a)}},41:function(t,n,e){"use strict";e.d(n,"g",(function(){return b})),e.d(n,"f",(function(){return g})),e.d(n,"e",(function(){return h})),e.d(n,"a",(function(){return m})),e.d(n,"d",(function(){return v})),e.d(n,"c",(function(){return w})),e.d(n,"b",(function(){return O})),e.d(n,"h",(function(){return j}));e(0);var o=e(17),i=e(30),c=e(65),a=e(14),r=e(91),l=e(88),s=e(207),u=e(73),p=(e(25),e(153)),d=e(110),f=e(1),b=function(t){return Object(r.d)(t,i.a.externalLink3,(function(t){return Object(p.a)(t,{addLineJump:!0})}))},g=function(t,n){var e=Object(u.a)("$1","$2",null,t,!0);return n.replace(i.a.linklink,e)},h=function(t){var n=t.replace(i.a.searchlink,'<a class="search-link preview-link" href="javascript:window.tiroCli.triggerSearch.func(\'$1$2\');">$1</a>');return n=Object(c.a)(n,[[">[__id_",">["],[">[__tags_",">["],[">[__tag_",">["],[" ]</a>","]</a>"]])},m=function(t){var n=t.replace("".concat(Object(a.c)(),"/").concat(o.a.path.staticResources,"/"),"");n=t.replace("".concat(o.a.path.staticResources),"");var e="".concat(Object(a.c)(),"/").concat(o.a.path.staticResources,"/").concat(n);return t.startsWith("http")?t:e},v=function(t,n,e){var o=0,c=Object(r.d)(e,i.a.ressource,(function(e){o++;"".concat(e,"-").concat(o);var i="".concat(function(t,n,e){return Object(s.renderToString)(Object(f.c)(l.a,{markdownTag:t,file:n,windowId:e}))}(e,t,n)," ");return i}));return c},w=function(t,n){return Object(r.d)(n,i.a.image,(function(n){var e=n.split("](")[1].slice(0,-1);return Object(d.a)(n,e,t)}))},O=function(t){return t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")},j=function(t){return t.replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"').replace(/&#039;/g,"'")}},416:function(t,n){},42:function(t,n,e){"use strict";e.d(n,"a",(function(){return d})),e.d(n,"b",(function(){return b}));var o=e(10),i=e(0),c=e.n(i),a=e(134),r=e(9),l=e(27),s=e(24),u=e(1),p=function(t){var n=Object(o.a)({},t),e=n.design,c=n.colors,l=n.size;e||(e="horizontal");var s=void 0===t.popup||t.popup,p=Object(a.a)("button.toolbar-button{position:relative;&.active{svg,i,span.icon-wrapper{color:",c?c[1]:r.a.colors.main,";}}svg,i,span.icon-wrapper{transform:scale(",l||1.3,");color:",c?c[0]:r.a.colors.editor.interfaceGrey,";&:hover{color:",c?c[1]:r.a.colors.main,";}}}","");return Object(i.useMemo)((function(){return Object(u.c)("div",{className:p},Object(u.c)("ul",{className:"buttons-toolbar-component ".concat(t.class," ").concat(e," ").concat(!0===s?"with-popup":"no-popup")},t.buttons.map((function(t,n){var e;return t.action&&Object(u.c)("li",{className:"".concat(t.class," btn-").concat(null===(e=t.title)||void 0===e?void 0:e.toLowerCase()),title:t.title,key:n},Object(u.c)(f,t))}))))}),[t.buttons])},d=c.a.memo(p,(function(t,n){return!1})),f=function(t){var n=Object(u.c)(c.a.Fragment,null);t.title&&(n=Object(u.c)(c.a.Fragment,null,t.title));var e=t.size?t.size:1;t.icon&&(n=t.icon.startsWith("fa")||t.icon.includes(".")?Object(u.c)(l.a,{name:t.icon,size:e,color:t.color}):Object(u.c)(l.b,{name:t.icon,size:e,color:t.color})),t.customHtml&&(n=t.customHtml);var o="toolbar-button ".concat(t.class&&t.class," ").concat(t.active&&"active");return Object(u.c)("button",{className:o,onMouseEnter:function(n){t.onHover&&t.onHover()},onClick:function(n){t.action&&t.action(n)}},Object(u.c)("div",{className:"inside-html-wrapper"},n),t.title&&Object(u.c)("div",{className:"button-title-wrapper "},t.title))},b=function(){return"\n ul.buttons-toolbar-component {\n list-style: none;\n padding: 0px;\n margin: 0px;\n button.toolbar-button {\n ".concat(r.a.els().button,";\n cursor: pointer;\n }\n\t\t\t\t&.vertical {\n\t\t\t\t\t\t.toolbar-button {\n\t\t\t\t\t\t\t\tdisplay: flex;\n\t\t\t\t\t\t\t\t&:hover {\n\t\t\t\t\t\t\t\t\t\t.inside-html-wrapper {\n\t\t\t\t\t\t\t\t\t\t\t\tsvg {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tcolor:").concat(r.a.colors.main,";\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t.button-title-wrapper {\n\t\t\t\t\t\t\t\t\t\t\t\tcolor:").concat(r.a.colors.main,";\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t.inside-html-wrapper {\n\t\t\t\t\t\t\t\t\t\t// width: 15px;\n\t\t\t\t\t\t\t\t\t\tspan {\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t.button-title-wrapper {\n\t\t\t\t\t\t\t\t\t\tmargin-left: 15px;\n\t\t\t\t\t\t\t\t\t\tfont-weight: 400;\n\t\t\t\t\t\t\t\t\t\tfont-size:").concat(Object(s.a)(1),"px;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t&.horizontal.with-popup {\n\t\t\t\t\t\t\t\tli button:hover .button-title-wrapper {\n\t\t\t\t\t\t\t\t\t\tdisplay: block;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t&.horizontal {\n\t\t\t\t\t\tdisplay: flex;\n\t\t\t\t\t\tli {\n\t\t\t\t\t\tbutton {\n\t\t\t\t\t\t\t\t.button-title-wrapper {\n\t\t\t\t\t\t\t\t\t\tdisplay: none;\n\t\t\t\t\t\t\t\t\t\topacity: 0.2;\n\t\t\t\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\t\t\t\tbottom: 22px;\n\t\t\t\t\t\t\t\t\t\tbackground: ").concat(r.a.colors.editor.interfaceGrey,";\n\t\t\t\t\t\t\t\t\t\tcolor: black;\n\t\t\t\t\t\t\t\t\t\tpadding: 5px;\n\t\t\t\t\t\t\t\t\t\tleft: 50%;\n\t\t\t\t\t\t\t\t\t\twidth: max-content;\n\t\t\t\t\t\t\t\t\t\tfont-size: 8px;\n\t\t\t\t\t\t\t\t\t\tborder-radius: 5px;\n\t\t\t\t\t\t\t\t\t\ttransform: translateX(-50%);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t}\n }\n}\n")}},430:function(t,n){},432:function(t,n){},443:function(t,n){},445:function(t,n){},45:function(t,n,e){"use strict";e.d(n,"a",(function(){return f}));var o=e(6),i=e(7),c=e(21),a=e(22),r=e(12),l=e(31),s=function(t){Object(c.a)(e,t);var n=Object(a.a)(e);function e(t,i,c,a){var r;return Object(o.a)(this,e),(r=n.call(this)).match=t,r.view=i,r.pos=c,r.replacement=a,r}return Object(i.a)(e,[{key:"toDOM",value:function(){return this.replacement({matchs:this.match,view:this.view,pos:this.pos})}}]),e}(r.g),u={};Object(l.a)("code_mirror","cache_get",(function(){return u}));var p=function(t,n,e,o,i){return new r.e({regexp:t,decoration:function(t,c,a){var l,p=t.input+t.index,d=e.path+o;if(u[d]||(u[d]={}),u[d][p])l=u[d][p];else{var f=new s(t,c,a,n),b=r.a.replace({widget:f});u[d][p]=b,!1===i?(delete u[d][p],l=b):l=u[d][p]}return l}})},d=function(t,n){return new r.e({regexp:t,decoration:function(t,e,o){return r.a.mark({class:n(t)})}})},f=function(t){var n,e=t.replacement,c=!1!==(null===(n=t.options)||void 0===n?void 0:n.cache);return r.f.fromClass(function(){function n(i){Object(o.a)(this,n),this.decorations=void 0,this.decorations=e?p(t.pattern,e,t.file,t.windowId,c).createDeco(i):d(t.pattern,t.classWrap).createDeco(i)}return Object(i.a)(n,[{key:"update",value:function(n){try{e&&(n.docChanged||n.viewportChanged)?this.decorations=p(t.pattern,t.replacement,t.file,t.windowId,c).updateDeco(n,this.decorations):this.decorations=d(t.pattern,t.classWrap).updateDeco(n,this.decorations)}catch(o){console.warn("[ERROR VIEWPLUGIN CM]",o,n)}}}]),n}(),{decorations:function(t){return t.decorations},provide:function(n){return r.c.atomicRanges.of((function(e){var o,i,c=(null===(o=e.plugin(n))||void 0===o?void 0:o.decorations)||r.a.none;return null!==(i=t.options)&&void 0!==i&&i.isAtomic||(c=r.a.none),c}))}})}},470:function(t,n){},472:function(t,n){},473:function(t,n){},478:function(t,n){},480:function(t,n){},486:function(t,n){},488:function(t,n){},507:function(t,n){},51:function(t,n,e){"use strict";e.d(n,"a",(function(){return a}));var o=e(10),i=e(17),c="80"===window.location.port?"":":".concat(window.location.port);"3000"===window.location.port&&(c=":3023");var a=Object(o.a)(Object(o.a)({},i.a.client),{},{global:{protocol:"".concat(window.location.protocol,"//"),url:"".concat(window.location.hostname),port:c}})},519:function(t,n){},522:function(t,n){},54:function(t,n,e){"use strict";e.d(n,"a",(function(){return w}));var o=e(15),i=e(2),c=e(17),a=e(209),r=e(25),l=e(8),s=e(120),u=e(80),p=e(30),d="[Code Mirror]",f=c.a.client.log.verbose,b=function(t,n){var e=arguments.length>2&&void 0!==arguments[2]&&arguments[2];f&&console.log(d," update cursor",n,t);try{e&&t.view.dispatch({selection:{anchor:n,head:n},scrollIntoView:!0})}catch(o){console.warn(d,"update Cursor error",o)}},g=function(t){if(!(t&&t.view&&t.view.state))return null;var n=t.view.state.doc.lineAt(t.view.state.selection.main.head).number-1,e=function(t){return t.view.state.selection.ranges[0].from}(t),o=t.view.state.doc.toString().split("\n");return{lines:o,currentPosition:e,activeLine:o[n]||"",lineIndex:n}},h=0,m=function(t){if(console.log("GET SCROLLING LINE -> NOT USED, SHOULD BE UPDATED"),!t.view)return-1;for(var n=t.view.state.doc.toString(),e=t.view.elementAtHeight(t.view.scrollDOM.scrollTop).from,o=n.split("\n"),i=0,c=0,a=0;a<o.length&&(i+=o[a].length)<e;a++)c=a;h=c},v=function(t){var n=null===t||void 0===t?void 0:t.view;if(!n)return[];for(var e=n.state.doc.toString().split("\n"),i=[],c=0,a=0;a<e.length;a++){var r=e[a],l=r.length+1,s=Object(o.a)(r.matchAll(p.a.mdTitle)),u=c,d=u+l;if(s.length>0){var f=s[0],b=f[1].length;i[i.length-1]&&i[i.length-1].level<b&&(i[i.length-1].lastChild=!1),i.push({raw:r,matches:f,line:a,title:f[2],from:u,to:d,level:b,lastChild:!0})}c+=l}return i},w={getEditorInfos:function(t){var n=t,e=Math.round(n.viewState.pixelViewport.top),o=n.contentHeight,i=function(){return n.viewState.editorHeight},c=function(){return(o-i())/100};return{viewportHeight:i,contentHeight:o,visibleFirstLine:function(){var t=n.lineBlockAtHeight(e);return n.state.doc.lineAt(t.from).number},percentPx:c,currentPercentScrolled:function(){return n.viewState.pixelViewport.top/c()}}},getCurrentLineInfos:g,getScrolledLine:function(t){return m(t),h},updateCursor:b,updateText:function(t,n,e){var o=t.view.state.doc.toString().length,i=t.view.state.selection.ranges[0].from;t.view.dispatch(t.view.state.update({changes:{from:0,to:o,insert:n}})),b(t,i,!0)},scrollTo:function(t,n){if(!t.view)return-1;b(t,n,!0)},scrollToLine:function(t,n){var e=t.view.state.doc.line(n);b(t,e.from,!0)},getCustomTheme:a.a,getMarkdownStructure:v,foldAllChildren:function(t){var n=v(t),e=g(t);Object(r.a)(n,(function(o,i){if(null!==t&&void 0!==t&&t.view){var c=n[i+1]?n[i+1].from-1:t.view.state.doc.length,a=o.to-1;e&&e.currentPosition>a&&e.currentPosition;try{t.view.dispatch({effects:l.p.of({from:a,to:c})})}catch(r){console.warn("ERROR FOR ".concat(o.title),r)}}}))},unfoldAllChildren:function(t){null!==t&&void 0!==t&&t.view&&Object(l.G)(t.view)},searchWord:function(t,n){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,o=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if(null!==t&&void 0!==t&&t.view)try{var i=t.view;Object(s.d)(i);var c={search:n};e&&Object.assign(c,{replace:e}),i.dispatch({effects:s.f.of(new s.a(c))}),o&&Object(s.b)(i)}catch(a){console.log("[CM utils > search word] error:",a)}},setSelection:function(t,n){if(null!==t&&void 0!==t&&t.view)try{var e=t.view,o=[0,0];n.range&&(o=n.range),e.dispatch({selection:i.e.create([i.e.range(o[0],o[1])])})}catch(c){console.log("[CM utils > set selection] error:",c)}},undo:u.f,redo:u.e}},56:function(t,n,e){"use strict";e.d(n,"a",(function(){return d})),e.d(n,"b",(function(){return f}));var o=e(6),i=e(7),c=e(21),a=e(22),r=e(0),l=e.n(r),s=e(9),u=e(13),p=e(1),d=function(t){Object(c.a)(e,t);var n=Object(a.a)(e);function e(){var t;Object(o.a)(this,e);for(var i=arguments.length,c=new Array(i),a=0;a<i;a++)c[a]=arguments[a];return(t=n.call.apply(n,[this].concat(c))).canBgClose=!t.props.canBgClose||t.props.canBgClose,t}return Object(i.a)(e,[{key:"render",value:function(){var t=this;return Object(p.c)("div",{className:"popup-wrapper-component"},Object(p.c)("div",{className:"overlay-click-popup",onClick:function(n){t.canBgClose&&t.props.onClose()}}),Object(p.c)("div",{className:"popup-wrapper ".concat(Object(u.d)()?"ipad":"")},Object(p.c)("div",{className:"popupTitle"}," ",this.props.title),Object(p.c)("div",{className:"popupContent"},this.props.children)))}}]),e}(l.a.Component),f=function(){return"\n.popup-wrapper-component {\n\t\t\t\tposition: absolute;\n top: 0px;\n left: 0px;\n .overlay-click-popup {\n position: fixed;\n z-index:10000;\n top: 0px;\n left: 0px;\n width: 100vw;\n height: 100vh;\n background: rgba(0,0,0,0.1);\n }\n .popup-wrapper {\n position: fixed;\n z-index:10010;\n left: 50%;\n top:50%;\n &.ipad {\n top:20%;\n }\n max-height: 70%;\n \n width : auto;\n max-width: 90%;\n transform:translate(-50%,-50%);\n\t\t\t\tbackground: ".concat(s.a.colors.bgPopup,";\n border-radius:6px;\n box-shadow: 0px 0px 5px rgba(0,0,0,.2);\n .popupTitle {\n margin: 0px 0px 20px 0px;\n text-align: left;\n background: ").concat(s.a.colors.main,";\n color: white;\n font-weight: 700;\n text-transform: uppercase;\n font-size: 14px;\n padding: 5px 0px 5px 20px;\n border-radius:6px 6px 0px 0px;\n }\n .popupContent {\n padding: 0px 20px 20px 20px;\n // min-width : 350px;\n height: calc(100% - 69px);\n }\n img{\n padding: 0px 5px 0px 0px;\n margin: 5px 5px 0px 0px;\n }\n }\n}\n")}},562:function(t,n,e){"use strict";e.r(n);var o=e(0),i=e.n(o),c=e(5),a=e(1),r=e(13),l=e(14),s=e(10),u=e(134),p=e(9),d=e(159),f=e(78),b=e(42),g=e(666),h=e(70),m={};window.tiroCli=m;var v=function(t,n){var e,r,l=Object(h.a)("showRenderId",!1),s=Object(c.a)(l,2),u=s[0],p=s[1];e="toggleRenderId",(r={description:"toggle display of renderId for each block",func:function(){console.log("[toggleRenderId]"),p(!u),setTimeout((function(){window.location.reload()}),1e3)}}).f=r.func,m[e]=r;var d=Object(g.a)(0,1e3);return Object(o.useMemo)((function(){var n=(new Date).getTime(),e=(new Error).stack,o=(null===e||void 0===e||e.split("\n")[6].replace("at ","").replace(/\(.*\)/gi,"").trim(),Object(a.c)(i.a.Fragment,null,u&&Object(a.c)("p",{style:{position:"absolute",fontSize:"10px",color:"rgba(255,0,0,0.8)"}},d),t));(new Date).getTime();return o}),n)},w=function(){var t=Object(o.useState)("navigator"),n=Object(c.a)(t,2),e=n[0],l=n[1];return{mobileView:e,setMobileView:l,MobileToolbarComponent:function(t){return v(Object(a.c)(i.a.Fragment,null,"desktop"!==Object(r.a)()&&Object(a.c)(b.a,{class:"mobile-view-toggler",colors:["white","white"],buttons:[{icon:"faStream",class:"".concat("navigator"===e?"active":""),action:function(){l("navigator")}},{icon:"faPenNib",class:"".concat("editor"===e?"active":""),action:function(){l("editor")}},{icon:"faEye",class:"".concat("preview"===e?"active":""),action:function(){l("preview")}},{icon:"faSearch",class:"",action:function(){t.onButtons[0]&&t.onButtons[0]()}}]})),[e,t.forceRerender])}}},O=e(17),j=e(51),x=e(11),k=function(t,n){var e=Object(o.useRef)();Object(o.useEffect)((function(){e.current=t}),[t]),Object(o.useEffect)((function(){if(null!==n){var t=setInterval((function(){e.current()}),n);return function(){return clearInterval(t)}}}),[n])},y=function(){return"Tiro (".concat(j.a.version,")")},_=function(){Object(o.useRef)([]);var t=Object(o.useState)(!1),n=Object(c.a)(t,2),e=n[0],i=n[1],l=Object(o.useState)(!1),s=Object(c.a)(l,2),u=s[0],p=s[1],d="(DISCONNECTED)",f=Object(o.useRef)(d);k((function(){f.current=f.current===d?"(/!\\ DISCONNECTED /!\\)":d;var t=e?"".concat(y()," (Connected)"):"".concat(y()," ").concat(f.current);"mobile"!==Object(r.a)()&&(document.title=t)}),1e3),Object(o.useEffect)((function(){Object(x.d)((function(t){t.watch.appStatus((function(t){!1===t.isConnected?b(!1):!0===t.isConnected&&(b(!0),p(!0),setTimeout((function(){p(!1)}),1e3))}))}))}),[]);var b=function(t){O.a.client.log.verbose&&console.log("[SOCKET CONNECTION TOGGLE] to ".concat(t)),i(t)};return{isConnected:e,connectionStatusComponent:function(){var t=["connected","connected"];return u&&(t=["back-online","back online"]),e||(t=["disconnected","disconnected"]),Object(a.c)("div",{className:"connection-status"},Object(a.c)("div",{className:t[0]},t[1]))},toggleSocketConnection:b}},C=e(27),E=e(19),S=function(t){return Object(a.c)("button",{className:"new-file-button",onClick:function(n){t.onNewFile()}},Object(a.c)(C.a,{name:"faPlusCircle",color:"white"}),Object(a.c)("span",null,E.a.newNote))},T=i.a.memo(S,(function(t,n){return!0})),I=e(6),N=e(7),P=e(21),R=e(22),A=e(121),F=e(55),L=e(66),M=e(41),z=e(374),D=e(371),B=e(18),H=e(565),U={ctrl:!1,shift:!1,alt:!1,opt:!1,Meta:!1},W={38:"up",40:"down",17:"ctrl",16:"shift",18:"alt",93:"opt",13:"enter"},q=function(t){return t=t||window.event,W[t.keyCode]?W[t.keyCode]:t.key},V={},J=e(93),K=e(24),G=function(t){Object(P.a)(e,t);var n=Object(R.a)(e);function e(t){var o;return Object(I.a)(this,e),(o=n.call(this,t)).oldFiles=[],o.liRefs=[],o.scrollerWrapperRef=i.a.createRef(),o.scrollerListRef=i.a.createRef(),o.canAutoScroll=!1,o.getVisibleItemsDebounced=Object(A.a)((function(){var t=o.scrollerWrapperRef.current;if(t){for(var n=t.getBoundingClientRect().height,e=-1,i=[],c=0;c<o.liRefs.length;c++){var a=o.liRefs[c].current;if(a){var r,l=a.getBoundingClientRect().top;if(l>-50&&l<n+100)-1===e&&(e=c),o.props.files[c]&&i.push(null===(r=o.props.files[c])||void 0===r?void 0:r.path)}}o.props.onVisibleItemsChange(i)}}),500),o.onListScroll=function(){o.canAutoScroll=!1,o.getVisibleItemsDebounced()},o.isMultiSelected=function(t){var n=!1;return o.state.selectionEdges[0]<=t&&o.state.selectionEdges[1]>=t&&(n=!0),n},o.itemToScroll=0,o.autoScrollToItem=function(t){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];o.itemToScroll=n?t:o.itemToScroll+t,o.itemToScroll<0&&(o.itemToScroll=0),o.itemToScroll>o.props.files.length&&(o.itemToScroll=o.props.files.length),o.scrollerListRef.current.scrollToItem(o.itemToScroll)},o.getUrlLoginToken=function(){return"?token=".concat(Object(B.b)())},o.state={hoverMode:!1,selectionEdges:[-1,-1]},o}return Object(N.a)(e,[{key:"shouldComponentUpdate",value:function(t,n){if(JSON.stringify(t.files)!==JSON.stringify(this.oldFiles)){this.oldFiles=Object(F.a)(t.files),this.liRefs=[];for(var e=0;e<t.files.length;e++)this.liRefs.push(i.a.createRef());this.getVisibleItemsDebounced(),this.setState({selectionEdges:[-1,-1]}),this.canAutoScroll=!0}return this.props.activeFileIndex>0&&this.canAutoScroll&&(this.canAutoScroll=!1,this.autoScrollToItem(this.props.activeFileIndex)),!0}},{key:"render",value:function(){var t=this,n=J.a[this.props.sortMode],e=p.a.sizes.l2.fileLi.height+2*p.a.sizes.l2.fileLi.padding+p.a.sizes.l2.fileLi.margin,o=window.innerHeight-(p.a.sizes.search.h+p.a.sizes.search.padding),c=Object(r.c)("desktop")?o:o-p.a.sizes.mobile.bottomBarHeight;return Object(a.c)(i.a.Fragment,null,Object(a.c)("div",{className:"list-wrapper-scroller",style:{height:c},onScroll:this.onListScroll,ref:this.scrollerWrapperRef},Object(a.c)(D.a,null,(function(o){o.height;var r=o.width;return Object(a.c)(z.a,{itemData:t.props.files,className:"List",ref:t.scrollerListRef,height:c,itemCount:t.props.files.length,itemSize:e,width:r||0,onScroll:t.onListScroll},(function(e){var o=e.index,c=e.style,l=t.props.files[o],s=t.props.filesPreview[l.path];return Object(a.c)("div",{style:c},Object(a.c)("li",{ref:t.liRefs[o],style:{width:r||0-2*X.l2.fileLi.padding-2*X.l2.fileLi.margin-35},className:["file-element-list","element-".concat(o),"".concat(t.isMultiSelected(o)?"active":""),"".concat(o===t.props.activeFileIndex?"active":""),"".concat(s&&s.picture?"with-image":"")].join(" "),key:o,draggable:!0,onDragStart:function(){var n=[],e=t.state.selectionEdges;n=-1!==e[0]||-1!==e[1]?t.props.files.slice(e[0],e[1]+1):[l],t.props.onFileDragStart(n)},onDragEnd:function(){t.props.onFileDragEnd()},onClick:function(n){if(U["shift"]){var e=[t.props.activeFileIndex,o];e.sort(),t.setState({selectionEdges:e})}else t.props.onFileClicked(o),t.setState({selectionEdges:[-1,-1]});t.props.onFileClicked(o)}},Object(a.c)("div",{className:"background-item"}),Object(a.c)("div",{className:"background-item-border"}),Object(a.c)("div",{className:"left"},Object(a.c)("h3",{className:"label ".concat(l.name.length<=35?"oneliner":"more"),onMouseEnter:function(n){t.props.hoverMode&&t.props.onFileClicked(o)}},l.name),Object(a.c)("div",{className:"content"},s&&s.content&&Object(a.c)(i.a.Fragment,null,s.content)),Object(a.c)("div",{className:"date ".concat(n)},Object(L.a)(new Date(("modified"===n?l.modified:l.created)||0)))),Object(a.c)("div",{className:"right"},s&&s.picture&&Object(a.c)("div",{className:"picture",style:{backgroundColor:"white",backgroundImage:"url('".concat(s.picture.startsWith("http")?s.picture+t.getUrlLoginToken():"".concat(Object(M.a)(t.props.files[0].folder),"/").concat(s.picture).concat(t.getUrlLoginToken()),"')")}}))))}))}))))}}]),e}(i.a.Component),Y=i.a.memo(G,(function(t,n){return!1})),$=Object(s.a)({},p.a),Z=($.els,$.colors),X=($.font,$.sizes),Q=e(225),tt=e(29),nt=function(t){return Object(a.c)("div",{className:"folder-tree-view-component"},Object(a.c)("h3",{className:"subtitle"},E.a.folders),Object(a.c)(et,{openFolders:t.openFolders,folder:t.folder,current:t.current,onFolderClicked:t.onFolderClicked,onFolderMenuAction:t.onFolderMenuAction,onFolderOpen:function(n){Object(x.d)((function(e){e.ui.browser.folders.open.add(n),t.onFolderOpen(n)}))},onFolderClose:function(n){Object(x.d)((function(e){console.log("ONFOLDERCLOSE",n),e.ui.browser.folders.open.remove([n]),t.onFolderClose(n)}))},onFolderDragStart:t.onFolderDragStart,onFolderDragEnd:t.onFolderDragEnd,onFolderDrop:t.onFolderDrop}))},et=function t(n){var e=n.openFolders.includes(n.folder.path)&&n.folder.hasFolderChildren,i=Object(o.useState)(!1),r=Object(c.a)(i,2),l=r[0],s=r[1],u=Object(o.useState)(!1),d=Object(c.a)(u,2),f=d[0],b=d[1],g=Object(o.useState)(""),h=Object(c.a)(g,2),m=h[0],v=h[1];Object(o.useEffect)((function(){e&&!n.folder.children||e&&n.folder.children&&0===n.folder.children.length?b(!0):b(!1)}),[n.folder.children,e]);var w=Object(tt.a)(n.current,n.folder.key);return Object(a.c)("li",{className:"folder-wrapper ".concat(w?"current":""," "),draggable:!0,onDrop:function(t){console.log("DROP",t),n.folder.key&&(n.onFolderDrop(n.folder),t.stopPropagation())},onDragStart:function(t){n.folder.key&&(n.onFolderDragStart(n.folder),t.stopPropagation())},onDragOver:function(t){v("drag"),t.preventDefault(),t.stopPropagation()},onDragEnd:function(){n.folder.key&&n.onFolderDragEnd()},onMouseLeave:function(){l&&s(!1)}},Object(a.c)("div",{className:"folder-title ".concat(m),onDragEnter:function(t){},onDrop:function(t){console.log("DROP2",t),v("")},onDragLeave:function(t){v("")}},Object(a.c)("span",{className:"icon",onClick:function(t){e?n.onFolderClose(n.folder.key):n.onFolderOpen(n.folder.key)}},n.folder.hasFolderChildren&&Object(a.c)(C.a,{name:e?"faCaretDown":"faCaretRight",color:p.a.colors.main})),Object(a.c)("span",{className:"title",onClick:function(t){n.onFolderClicked(n.folder.key)}},Object(a.c)("div",{className:"title-drag-bg"}),Object(a.c)("div",{className:"title-label"}," ",n.folder.title)),Object(a.c)("span",{onClick:function(){s(!l)},className:"context-menu-wrapper"},Object(a.c)(C.a,{name:"faEllipsisH",color:p.a.colors.l1.font}),l&&Object(a.c)("div",{className:"context-menu context-menu-folders"},Object(a.c)("ul",null,Object(a.c)("li",{onClick:function(){if(""===n.folder.path)return s(!1);var t=prompt("".concat(E.a.renameFolderPrompt," "),n.folder.title);t&&""!==t&&t!==n.folder.title&&n.onFolderMenuAction("rename",n.folder,t),s(!1)}},E.a.renameFolder),Object(a.c)("li",{onClick:function(){if(""===n.folder.path)return s(!1);Object(x.e)().then((function(t){t.popup.prompt({text:"".concat(E.a.createFolderPrompt,' "').concat(n.folder.path,'"?'),userInput:!0,onAccept:function(t){t&&""!==t&&n.onFolderMenuAction("create",n.folder,t)},onRefuse:function(){}})})),s(!1)}},E.a.createFolder),-1===n.folder.path.indexOf(".tiro/.trash")&&Object(a.c)("li",{onClick:function(){if(""===n.folder.path)return s(!1);s(!1),n.onFolderMenuAction("moveToTrash",n.folder)}},E.a.moveToTrash),-1!==n.folder.path.indexOf(".tiro/.trash")&&Object(a.c)("li",{onClick:function(){if(""===n.folder.path)return s(!1);s(!1),Object(x.e)().then((function(t){t.popup.confirm("".concat(E.a.deleteFolderPrompt,' "').concat(n.folder.path,'"?'),(function(){n.onFolderMenuAction("delete",n.folder)}))}))}},E.a.deleteFolder))))),f&&Object(a.c)("div",{className:"loading"},"..."),e&&Object(a.c)("ul",{className:"folder-children"},n.folder.children&&n.folder.children.map((function(e,o){return Object(a.c)(t,{openFolders:n.openFolders,key:o,folder:e,current:n.current,onFolderOpen:n.onFolderOpen,onFolderMenuAction:n.onFolderMenuAction,onFolderClose:n.onFolderClose,onFolderClicked:n.onFolderClicked,onFolderDragStart:n.onFolderDragStart,onFolderDragEnd:n.onFolderDragEnd,onFolderDrop:n.onFolderDrop})}))))},ot=e(36),it=function(t){var n=Object(s.a)({},t).files,e=Object(ot.a)(n)?n.slice(0,20):[];return Object(a.c)(i.a.Fragment,null,e.length>0&&Object(a.c)("div",{className:"last-notes-component"},Object(a.c)("h3",{className:"subtitle"},E.a.lastNotes),Object(a.c)("ul",null,e.map((function(n,e){var o=n.name.replace(".md","");return o=o.length>20?"".concat(o.substr(0,20)):o,Object(a.c)("li",{key:e,title:o,onClick:function(e){t.onClick(n)},className:"note"},Object(a.c)(C.a,{name:"faFile"}),o)})))))},ct=i.a.memo(it,(function(t,n){return t.files===n.files})),at=e(67),rt=e(56),lt=function(t){var n=Object(o.useContext)(x.a),e=!!n&&n.status.searching.get;return Object(a.c)(i.a.Fragment,null,Object(a.c)("div",{className:"search-bar-component"},Object(a.c)("input",{type:"text",placeholder:E.a.searchPlaceholder,value:t.term,onKeyDown:function(e){if("Enter"===e.key){if(t.term.length<3)return;n&&n.ui.search.search(t.term)}},onChange:function(e){!function(e,o){if(n){var i=n.ui.browser.folders.current.get();""===t.term&&""!==i&&(e=e+" "+i,o&&setTimeout((function(){var t=(o.selectionStart||0)-i.length-1;o.selectionStart=t,o.selectionEnd=t}),10)),n.ui.search.term.set(e)}}(e.target.value,e.target)}}),Object(a.c)("div",{className:"search-status"},e&&E.a.searchingLabel)))},st=e(72),ut=function(t){var n={title:t.realname,folder:t.folder,mobileview:"editor"},e="".concat(j.a.global.protocol).concat(j.a.global.url).concat(j.a.global.port,"?").concat(Object(st.f)(n));window.open(e,"popupDetached","width=600,height=600")},pt=e(32),dt=e(96),ft=function(t,n){dt&&dt.bind&&dt.bind(t,n)},bt=function(t,n){dt&&dt.bind&&dt.unbind(t,n)},gt=function(t){var n=Object(o.useState)(0),e=Object(c.a)(n,2),i=e[0],l=e[1],s=Object(o.useRef)(0);Object(o.useEffect)((function(){u(t.startingIndex)}),[t.startingIndex]);var u=function(t){l(t),s.current=t},p=function(n){O(!1),h(10),-1===n&&0===s.current?s.current=t.images.length-1:1===n&&s.current===t.images.length-1?s.current=0:s.current=s.current+n,u(s.current)},d=Object(o.useState)(10),f=Object(c.a)(d,2),g=f[0],h=f[1],m=Object(o.useState)(!1),v=Object(c.a)(m,2),w=v[0],O=v[1],j=function(t){var n=t+g;n<0&&(n=0),n>20&&(n=20),h(n)},x=Object(o.useRef)(null),k=(function(){var t="0px";if(x.current){var n=x.current.clientHeight;t="".concat(n-5,"px")}}(),Object(pt.b)((function(t){var n=t.deltaY>0?1:-1;j(n)}),150)),y=Object(o.useRef)(0),_=(Object(pt.b)((function(t){if(2===t.touches.length){var n=t.touches[0].clientY>y.current?1:-1;y.current=t.touches[0].clientY,j(n)}}),150),function(){var n="mobile"===Object(r.a)()?"mobile":"desktop",e=[{class:"left ".concat(n),title:"left",icon:"faChevronLeft",action:function(){p(-1)}},{class:"close",title:"close",icon:"faTimes",action:function(){t.onClose()}},{class:"right ".concat(n),title:"right",icon:"faChevronRight",action:function(){p(1)}}];return w&&(e.unshift({class:"zoom",title:"zoom",icon:"faPlus",action:function(){j(1)}}),e.unshift({class:"dezoom",title:"dezoom",icon:"faMinus",action:function(){j(-1)}})),e.push({class:"zoomToggle",title:"zoomToggle",icon:"magnifying-glass-".concat(w?"minus":"plus"),action:function(){O(!w)}}),e});Object(o.useEffect)((function(){var t=function(){p(1)},n=function(){p(-1)};return ft("right",t),ft("left",n),function(){console.log("destroying lightbox"),bt("right",t),bt("left",n)}}),[]);return Object(a.c)("div",{className:"lightbox-component"},Object(a.c)("div",{className:"lightbox-bg",onClick:function(){t.onClose()}}),Object(a.c)("div",{className:"lightbox-content images-nb-".concat(t.images.length),onWheel:k,ref:x},t.images.map((function(n,e){return Object(a.c)("div",{key:e,className:"lightbox-image",style:{display:e===i?"flex":"none"}},Object(a.c)("figure",{className:"zoom2 ".concat(w?"zoomed":"not-zoomed"),style:{backgroundSize:"".concat(g/10*100,"%")},onMouseMove:function(t){!function(t){var n,e,o,i,c=t.currentTarget;n=t.clientX,e=t.clientY,o=n/c.offsetWidth*100,i=e/c.offsetHeight*100;var a=function(t){return(t-50)/("mobile"===Object(r.a)()?1:3)},l=(o+=a(o))+"% "+(i+=a(i))+"%";c.style.backgroundPosition=l}(t)}},Object(a.c)("img",{src:Object(M.a)(n.url)+Object(B.c)(),onClick:function(t){!function(t){var n=t.target.src;t.target.parentElement.style.backgroundImage="url(".concat(n,")"),O(!0)}(t)}})),Object(a.c)("div",{className:"counter"},i+1,"/",t.images.length,!0===w&&" - [".concat(20*g,"%]")),Object(a.c)("div",{className:"image-infos"},n.file.name&&n.title&&Object(a.c)("div",{className:"image-name",onClick:function(t){return ut(n.file)}},n.file.name," - ",n.title),Object(a.c)(b.a,{popup:!1,buttons:_()})))}))))},ht={onAccept:function(){},onRefuse:function(){}},mt=function(t){var n=Object(o.useState)(!1),e=Object(c.a)(n,2),r=e[0],l=e[1],s=Object(o.useState)(""),u=Object(c.a)(s,2),p=u[0],d=u[1],f=Object(o.useState)(null),b=Object(c.a)(f,2),g=b[0],h=b[1],m=Object(o.useState)(E.a.promptPopup.defaultTitle),v=Object(c.a)(m,2),w=v[0],O=v[1],j=Object(o.useState)(!1),x=Object(c.a)(j,2),k=x[0],y=x[1],_=Object(o.useState)(E.a.promptPopup.accept),C=Object(c.a)(_,2),S=C[0],T=C[1],I=Object(o.useState)(E.a.promptPopup.refuse),N=Object(c.a)(I,2),P=N[0],R=N[1],A=function(t){l(!0),d(t.text),t.acceptLabelButton&&T(t.acceptLabelButton),t.refuseLabelButton&&R(t.refuseLabelButton),t.title&&O(t.title),t.userInput&&h(""),t.onAccept&&(ht.onAccept=t.onAccept),t.onRefuse?(ht.onRefuse=t.onRefuse,y(!0)):y(!1)},F=function(){l(!1),h(null),O(""),d(""),y(!1)},L={confirm:function(t,cb,n){A({title:"",text:t,onAccept:cb,onRefuse:function(t){function n(){return t.apply(this,arguments)}return n.toString=function(){return t.toString()},n}((function(){n&&n()}))})},show:function(t,n,cb){A({title:n,text:t,onAccept:cb,onRefuse:function(){}})},prompt:A};return{popupApi:L,PromptPopupComponent:function(){return Object(a.c)(i.a.Fragment,null,r&&Object(a.c)("div",{className:"prompt-popup-component"},Object(a.c)(rt.a,{title:w,onClose:F,canBgClose:!1},Object(a.c)("div",null,Object(a.c)("div",{className:"content",dangerouslySetInnerHTML:{__html:p}}),Object(a.c)("br",null),null!==g&&Object(a.c)("div",null,Object(a.c)("input",{type:"text",value:g,onChange:function(t){h(t.target.value)}}),Object(a.c)("br",null)),Object(a.c)("button",{value:"submit",className:"accept submit-button",onClick:function(t){ht.onAccept(g),F()}},S),k&&Object(a.c)("button",{value:"submit",className:"refuse submit-button",onClick:function(t){ht.onRefuse(g),F()}},P)))))}}},vt=e(217),wt=e(118),Ot=function(t){var n=Object(o.useContext)(x.a),e=Object(o.useState)(-1),i=Object(c.a)(e,2),r=i[0],l=i[1],s=Object(ot.a)(t.tabs)?t.tabs:[];return Object(a.c)("div",{className:"tab-list-wrapper-hover ".concat(t.pinStatus?"pinned":"unpinned")},Object(a.c)("div",{className:"top-hover-bar"}," "),Object(a.c)("div",{className:"tab-list-scroll-wrapper",style:{top:"".concat(t.pinStatus?0:-44,"px")}},Object(a.c)("div",{className:"tab-list-invisible-scroll"},Object(a.c)("div",{className:"tab-list-wrapper"},s.map((function(e,o){return Object(a.c)(xt,{key:o,tab:e,onDrop:function(t){l(t)},onDragEnter:function(t){l(t)},onDragEnd:function(t){n&&n.tabs.reorder(t,r),l(-1)},dragIndic:r,pos:o,onUpdate:t.onUpdate})})),(null===n||void 0===n?void 0:n.ui.browser.files.active.get)&&Object(a.c)("div",{className:"tab-wrapper tab-more",onClick:function(n){t.onUpdate("add")}},"+"),Object(a.c)("div",{className:"tab-wrapper tab-more",onClick:function(n){t.onPinToggle()}},Object(a.c)(C.b,{name:"thumbtack",size:.8}))))))},jt=function(t){var n=Object(s.a)({},t),e=n.tab,o=n.pos,c="Six",l=e.grid.layout.length;return 2===l&&(c="Two"),3===l&&(c="Three"),4===l&&(c="Four"),5===l&&(c="Five"),c="faDice".concat(c),Object(a.c)("div",{className:"tab-and-drag-wrapper"},t.dragIndic===o&&Object(a.c)("div",{className:"drag-indic"},"\u25bc"),Object(a.c)("div",{className:"tab-wrapper ".concat(e.active?"active":""),draggable:!0,onDragEnter:function(){t.onDragEnter(o)},onDrop:function(){t.onDrop(o)},onDragEnd:function(){t.onDragEnd(o)}},Object(a.c)("div",{className:"active-ribbon"}),Object(a.c)("div",{className:"tab-name",onClick:function(){t.onUpdate("activate",e)}},"mobile"!==Object(r.a)()&&Object(a.c)("input",{type:"text",className:"tab-input-text",value:e.name,style:{width:10*e.name.length+"px"},onChange:function(n){t.onUpdate("rename",e,n.target.value)}}),"mobile"===Object(r.a)()&&Object(a.c)(i.a.Fragment,null,e.name)),e.grid.layout.length>1&&Object(a.c)("div",{className:"tab-nb-windows",onClick:function(){t.onUpdate("activate",e)}},Object(a.c)(C.a,{name:c,color:"#b2b2b2"})),Object(a.c)("div",{className:"tab-close",onClick:function(){Object(x.d)((function(n){n.popup.confirm("".concat(E.a.deleteTabPrompt,' "').concat(e.name,'"?'),(function(){t.onUpdate("close",e)}))}))}},Object(a.c)(C.a,{name:"faPlus",color:"#b2b2b2"}))))},xt=i.a.memo(jt,(function(t,n){var e=!0,o=Object(F.a)({n:t.tab,p:n.tab});return o.n.grid=o.p.grid={},o.n.refresh=o.p.refresh="",JSON.stringify(o.p)!==JSON.stringify(o.n)&&(e=!1),n.pos!==t.pos&&(e=!1),n.dragIndic!==t.dragIndic&&(e=!1),n.tab.active!==t.tab.active&&(e=!1),n.onUpdate!==t.onUpdate&&(e=!1),e})),kt=e(219),yt=e(182),_t=e(220),Ct=e(160),Et=e(101),St=e(162),Tt=e(99),It=e(15),Nt=e(372),Pt=e(25),Rt=e(564),At=e(38),Ft=e(135),Lt=function(t){var n=Object(o.useState)(""),e=Object(c.a)(n,2),i=(e[0],e[1]),r=Object(o.useState)(t.view),l=Object(c.a)(r,2),s=l[0],u=(l[1],Object(pt.a)((function(){Object(x.d)((function(n){n.file.getContent(t.file.path,(function(n){i(n),t.searchedString&&Object(x.d)((function(n){setTimeout((function(){console.log("searchword",t.searchedString,t.replacementString,t.windowId),n.ui.note.editorAction.dispatch({type:"searchWord",searchWordString:t.searchedString,searchReplacementString:t.replacementString,windowId:t.windowId});var e=document.querySelector(".select-wrapper input");e&&(e.focus(),setTimeout((function(){e.focus(),setTimeout((function(){e.focus()}),100)}),50))}),300)}))}))}))}),200));Object(o.useEffect)((function(){u()}),[t.file,t.searchedString,s]);var p=t.height?t.height+"px":"100%",d=Object(o.useState)(t.windowId||Object(At.a)()),f=Object(c.a)(d,2),b=f[0],g=f[1];return Object(o.useEffect)((function(){g(t.windowId||Object(At.a)())}),[t.windowId]),Object(a.c)("div",{className:"note-preview-wrapper "+s,style:{height:p}},Object(a.c)(Ft.a,{content:{i:b,file:t.file,active:!1,view:t.view},forceView:t.view,canEdit:!0,showViewToggler:t.showViewToggler,showToolbar:t.showToolbar,titleEditor:t.titleEditor,onLayoutUpdate:t.onLayoutUpdate||function(){}}))},Mt=i.a.memo(Lt,(function(t,n){return JSON.stringify(t)===JSON.stringify(n)})),zt=e(184),Dt=e(183),Bt=e(60),Ht=e(228),Ut=e(378),Wt=e(31),qt="[PLUGIN CRON]";Object(Wt.a)("cron","trigger",(function(){Kt()}));var Vt="plugins-cron-infos",Jt=function(t,n){var e=[],o=[];Object(Pt.a)(n,(function(t,n){e.push(n),o.push(t)}));try{Object(Ht.a)(Function,e.concat([t.code])).apply(void 0,o)}catch(c){var i="[ERR in ".concat(t.type.toLocaleUpperCase()," plugin ").concat(t.name.toLocaleUpperCase(),"]: ").concat(c);console.log(i,c,{paramsNames:e,paramsValues:o,plugin:t}),console.trace(c),Object(Wt.d)("".concat(i))}},Kt=function(){Object(x.d)((function(t){t.plugins.list((function(n){t.cache.get(Vt,(function(e){e||(e={}),console.log(qt,"starting new batch cron",{plugins:n,cronState:e}),Object(Pt.a)(n,(function(n){var o,i,c,a=!0;if(!1===(null===(o=n.options)||void 0===o?void 0:o.disabled)&&(a=!1),"background"===n.type&&a){e[n.name]||(e[n.name]={vars:{}});var r=60*((null===(i=n.options)||void 0===i?void 0:i.background_exec_interval_in_min)||60)*1e3,l=(new Date).getTime(),s=(null===(c=e[n.name])||void 0===c?void 0:c.lastRunTime)||0;if(s+r>l)return console.log(qt,"bg plugin ".concat(n.name,", wait for ").concat(Math.round((s+r-l)/1e3)," seconds"));var u=s+r>l;console.log(qt,"exec the bg plugin ".concat(n.name,", last exec was ").concat(new Date(s).toJSON()),{p:n,lastRun:s,intervalRun:r,now:l,status:u});var p=e[n.name];Jt(n,{tiroApi:t,bgState:p}),e[n.name]&&!Object(Ut.a)(e[n.name])||(e[n.name]={vars:{}}),e[n.name].lastRunTime=l}})),t.cache.set(Vt,e,-1)}),{disableRamCache:!0})}))}))},Gt=e(35),Yt={charsStart:2},$t=[{label:"loading...",value:""}],Zt="[\ud83d\udd0e Search Mode]",Xt="[\ud83d\udcc1 Explorer Mode]",Qt="[\u2728 History Mode]",tn="[\ud83c\udf44 Plugin Mode]",nn={dict:{},config:{enabled:!0}},en=function(){nn.config.enabled=!1,nn.dict={}},on={hasBeenLoaded:!1},cn=function(t){var n=Object(o.useState)("editable"),e=Object(c.a)(n,2),i=e[0],l=e[1];Object(o.useEffect)((function(){F.current.focus()}),[i]);var u=Object(o.useState)([]),d=Object(c.a)(u,2),f=d[0],b=d[1],g=Object(o.useRef)([]),h=function(t){Object(ot.a)(t)&&(b(t),g.current=t)},m=Object(o.useState)([]),v=Object(c.a)(m,2),w=v[0],O=v[1],j=function(t){Object(x.d)((function(n){var e=n.tabs.active.get();"mobile"!==Object(r.a)()&&Object(Pt.a)(null===e||void 0===e?void 0:e.grid.content,(function(n){if(n.file){var e=n.file;Object(Pt.a)(t,(function(n,o){if(n&&n.value&&n.value===e.path)return delete t[o],!1}))}})),nn(t),O(t)}))},k=Object(o.useState)("No Options"),y=Object(c.a)(k,2),_=y[0],E=(y[1],function(n){Object(x.d)((function(e){e.ui.note.editorAction.dispatch({type:"insertText",insertText:Object(Dt.a)(n)}),t.onClose()}))}),S=function(n){Object(x.d)((function(e){e.ui.floatingPanel.create({view:"editor",type:"file",file:n}),t.onClose()}))},T=function(t){var n=Object(o.useState)(!1),e=Object(c.a)(n,2),i=e[0],l=e[1];return Object(o.useMemo)((function(){return Object(a.c)("div",{className:"path-option-wrapper device-".concat(Object(r.a)()),onMouseEnter:function(t){l(!0)},onMouseLeave:function(t){l(!1)}},Object(a.c)("div",{className:"file"},t.file.name),Object(a.c)("div",{className:"folder"},t.file.folder),i&&Object(a.c)("div",{className:"actions"},Object(a.c)("div",{className:"action",onClick:function(n){n.stopPropagation(),E(t.file)}},Object(a.c)(C.b,{name:"link",label:"insert note link in the current note"})),Gt.d.curr.beta_floating_windows&&Object(a.c)("div",{className:"action",onClick:function(n){n.stopPropagation(),S(t.file)}},Object(a.c)(C.b,{name:"window-restore",label:"Open note in a floating window"}))))}),[t.file,i])},I=function(t){return Object(a.c)(T,{file:t})},N=(Object(o.useRef)(!1),Object(o.useState)({indicatorsContainer:function(t,n){return Object(s.a)(Object(s.a)({},t),{},{display:"none"})},menuList:function(t,n){var e="mobile"===Object(r.a)()?{}:{maxHeight:"150px"};return Object(s.a)(Object(s.a)({},t),e)},menu:function(t,n){var e="mobile"===Object(r.a)()?"all":"none";return Object(s.a)(Object(s.a)({},t),{},{position:"relative",pointerEvents:e})},control:function(t,n){return Object(s.a)(Object(s.a)({},t),{},{outline:"none",boxShadow:"none",border:0})},multiValue:function(t,n){return n.data.editable?t:Object(s.a)(Object(s.a)({},t),{},{backgroundColor:p.a.colors.main})},multiValueLabel:function(t,n){var e=Object(s.a)(Object(s.a)({},t),{},{color:"#919090!important"});return Object(s.a)({},e)},multiValueRemove:function(t,n){var e="mobile"===Object(r.a)()?"block":"none";return n.data.editable?t:Object(s.a)(Object(s.a)({},t),{},{display:e,opacity:"0.2",position:"relative",top:"3px"})}})),P=Object(c.a)(N,2),R=P[0],A=P[1];Object(o.useEffect)((function(){setTimeout((function(){R.menu=function(t,n){var e=(Object(r.a)(),"all");return Object(s.a)(Object(s.a)({},t),{},{position:"relative",pointerEvents:e})},A(R)}),500)}),[]);var F=Object(o.useRef)(),L=w[0]||{label:"",value:""},M=function(n){var e=Object(tt.d)(n);Object(x.d)((function(n){n.ui.browser.goTo(e.folder,e.name,{openIn:"activeWindow"}),t.onClose()}))},z=Object(o.useState)(""),D=Object(c.a)(z,2),B=D[0],H=D[1],U=Object(o.useRef)(null);Object(o.useEffect)((function(){U.current=B}),[B]);var W=Object(o.useRef)(""),q=Object(Bt.a)("omni-history",[],{history:!0}),V=Object(c.a)(q,3),J=V[0],K=V[1],G=V[2];Object(o.useEffect)((function(){!function(){var t=g.current,n=B.trim();if(fn("editor"),0===t.length)"/"===n&&(Object(zt.a)("omnibar_explorer"),Object(x.d)((function(t){H("");var n=t.ui.browser.folders.current.get();setTimeout((function(){console.log(t.ui.browser.folders.current.get())})),lt(n)}))),""===n&&gt(),"?"===n&&(Object(zt.a)("omnibar_search"),st()),":"===n&&ht(),","===n&&et();else if(t[0].label===Zt)dt(t,n);else if(t[0].label===Xt){var e=function(){var n=Object(It.a)(t);n.shift();var e="";return Object(Pt.a)(n,(function(t){e+="/"+t.value})),e}();if(e.endsWith(".md")){var o=Object(It.a)(t);o.pop(),""===B&&o.push({label:B,value:B}),it(o),e=e.replace(t[0].label,""),M(e)}else W.current!==e&&(W.current=e,lt(e))}else t[0].label===tn?mt(n,t):t[0].label===Qt&&ct(n,t)}(),vt.current&&vt.current()}),[f,B,J]);var Y=function(t){return t.replaceAll("[","").replaceAll("]","")},$='[OMNIBAR "ctrl+alt+space"] type "?" for '.concat(Y(Zt),', "/" for ').concat(Y(Xt),', ":" for ').concat(Y(tn),', "," for ').concat(Y(Qt)),Z=Object(o.useState)($),X=Object(c.a)(Z,2),Q=X[0],nt=X[1],et=function(){h([{value:Qt,label:Qt}])};Object(o.useEffect)((function(){on.hasBeenLoaded||(G(),on.hasBeenLoaded=!0)}),[]);var it=function(t){console.log("1/2 [HIST mode]: addToOmniHistory",Object(It.a)(t));var n=[];Object(Pt.a)(t,(function(t){n.push(t.label)}));var e=n.join(" "),o={options:t,id:e},i=J.filter((function(t){return t.id!==e})),c=[o].concat(Object(It.a)(i));c.length>100&&c.splice(0,100),console.log("2/2 [HIST mode] add to omnihist ",{nItem:o,nItems:c}),K(c)},ct=function(t,n){if(Ct(null),n[1]){if(n[1]){var e;console.log("HIST selected",n[1]);var o=null===(e=n[1].payload)||void 0===e?void 0:e.options;if(!o)return;var i=o.pop();i&&H(i.label),h(o)}}else{var c=J,a=[];j(a),Object(Pt.a)(c,(function(t){a.push({label:t.id,value:t.id,payload:t})})),nt("history mode"),j(a),","===t&&H("")}},at=Object(o.useRef)(0),rt=Object(o.useRef)(""),lt=function(t){if(""!==t&&(t.endsWith("/")||(t+="/"),t!==rt.current)){rt.current=t,console.log("== EXPLORER",t),j($t),l("locked"),at.current++;var n=at.current;Object(x.d)((function(e){var o=[t];e.folders.get(o,(function(i){if(n===at.current&&(i.folderPaths.join("")===o.join("")&&i.folders[0])){var c=i.folders[0].children;e.files.get(t,(function(n,e){if(e===t){var o=t.split("/"),i=[];i.push({value:Xt,label:Xt}),i.push({value:"/",label:"/"}),Object(Pt.a)(o,(function(t){""!==t&&i.push({value:t,label:t+"/"})}));var r=[];Object(a.c)("div",{style:{},className:"barimage"});Object(Pt.a)(c,(function(t){var n=t.path.split("/"),e=n[n.length-1]+"/";r.push({value:e,label:"\ud83d\udcc1 "+e})})),n=Object(Rt.a)(n,["modified"],["desc"]),Object(Pt.a)(n,(function(t){var n=t.path.split("/"),e=n[n.length-1],o={file:t},i=I(t);r.push({value:e,label:i,payload:o})})),h(i),j(r),l("editable")}}))}}))}))}},st=function(){h([{value:Zt,label:Zt}])},ut=Object(o.useRef)(""),dt=function(t,n){if(t[1]){if(2===t.length)fn("editor"),bt(n,t[1].label,t);else if(3===t.length&&ft.current===t[2].value)fn("preview"),console.log("STEP 3-1 (optional) : filter found results",ft.current);else if(3===t.length||4===t.length){var e;console.log("STEP 3-2 : jump to page",{w:ft.current,stags:t});var o=t.length-1;if(null===(e=t[o].payload)||void 0===e||!e.file)return;var i=t[o].payload.file;M(i.path)}}else"?"===n&&Object(x.d)((function(t){var n=t.ui.browser.folders.current.get;H(n)})),""===n?H(ut.current):ut.current=n.slice(0,-1),nt('Path to search (ex:"/path/to/folder") + ENTER'),j([{label:n,value:n}])},ft=Object(o.useRef)(null),bt=Object(pt.a)((function(t,n,e){var o=n,i=t;if(i&&o&&i.length>=Yt.charsStart&&o.length>0){nt('Searching "'.concat(i,'" in "').concat(o,'" ...')),j($t);var c=i.includes("*"),r=[];j(r),ft.current=i,it([].concat(Object(It.a)(e),[{label:i,value:i}])),Object(x.d)((function(t){t.search.word(i,o,(function(t){Object(Pt.a)(t,(function(t){Object(Pt.a)(t.results,(function(n){var e=c?"(".concat(i,")"):"",o="".concat(t.file.path," ").concat(e),l=n.indexOf(i),s=100,u=n,p=l>50?l-50:0,d=l+50<u.length?l+50:u.length;u.length>s&&(u=u.substring(p,d));var f=u,b=u.replaceAll(i,"<b>".concat(i,"</b>")),g=Object(a.c)("div",{className:"path-option-wrapper"},Object(a.c)("div",{className:"search-location"},o),Object(a.c)("div",{className:"occur-wrapper",dangerouslySetInnerHTML:{__html:b}}));r.push({label:g,value:ft.current+t.file+f+o,payload:{file:t.file,line:f,raw:n}})}))})),0===r.length&&Ct(null),r.unshift({label:"\ud83d\udd0e Filter the ".concat(r.length,' results for "').concat(ft.current,'"'),value:ft.current}),nt("".concat(r.length-1,' results found for "').concat(i,'" in "').concat(o,'" ')),j(r)}))}))}else nt("Type the searched word"),j([]),setTimeout((function(){F.current.focus()}),100),Ct(null),ft.current=""}),500),gt=function(){var n;nt($);var e=function(t){var n=[];return Object(Pt.a)(t,(function(t){var e={value:t.path,label:I(t),payload:{file:t}};n.push(e)})),n}(t.lastNotes),o=e.shift(),i=e.shift();e.unshift(o),e.unshift(i);var c=e[0]?null===(n=e[0].payload)||void 0===n?void 0:n.file:null;c&&Ct(c),j(e)},ht=function(){h([{value:tn,label:tn}])},mt=function(n,e){Ct(null),Object(x.d)((function(o){if(1===e.length){var i=[];o.plugins.list((function(t){Object(Pt.a)(t,(function(t){"bar"===t.type&&i.push({label:t.name,value:t})})),j(i),":"===n&&H(""),i=Object(Rt.a)(i,["label"]),nt("".concat(i.length," bar plugins found"))}))}else if(e.length>=2){var c={input:n,setInputTxt:H,inputTxt:B,inputTxtRef:U,options:w,setOptions:j,onChange:vt,onClose:t.onClose,onHide:t.onHide,close:t.onClose,hide:t.onHide,selectedOptionRef:g,setSelectedOption:h,addToOmniHistory:it,selectedTags:e,setNotePreview:Ct,notePreview:yt,setHtmlPreview:Ft,htmlPreview:Tt,disableCache:en},a=e[1].value;j($t),Object(x.d)((function(t){Jt(a,{barApi:c,tiroApi:t})}))}}))},vt=Object(o.useRef)(null),wt=Object(o.useState)(Object(At.a)()),Ot=Object(c.a)(wt,2),jt=Ot[0],xt=(Ot[1],Object(o.useState)(null)),kt=Object(c.a)(xt,2),yt=kt[0],_t=kt[1],Ct=function(t){_t(t)},Et=Object(o.useState)(null),St=Object(c.a)(Et,2),Tt=St[0],Ft=St[1],Lt=Object(o.useState)(void 0),Ht=Object(c.a)(Lt,2),Ut=Ht[0],Wt=Ht[1],qt=function(t,n){var e=g.current;e[0]&&e[0].label===Xt?Ct(t):e[0]&&e[0].label===Zt?(Ct(t),setTimeout((function(){Wt(n)}),300)):e[0]?Ct(null):Ct(t)},Vt=Object(o.useRef)([]),Kt=Object(pt.a)((function(){var t=document.querySelectorAll("div[id*='-option']");if(0===t.length)return Ct(null);Object(Pt.a)(t,(function(t){if("rgb(222, 235, 255)"===getComputedStyle(t)["background-color"]){var n=parseInt(t.id.split("-").pop()),e=w[n].payload;if(!e)return;var o=e.file,i=e.line||void 0;qt(o,i)}}))}),400),nn=Object(pt.a)((function(t){!function(t){Object(Pt.a)(Vt.current,(function(t){t.disconnect()})),Vt.current=[];var n=document.querySelectorAll("div[id*='-option']");Object(Pt.a)(n,(function(t,n){var e=new MutationObserver((function(n){var e=parseInt(t.id.split("-").pop());if("rgba(0, 0, 0, 0)"!==getComputedStyle(t)["background-color"]&&w[e]&&w[e].payload){var o=w[e].payload;if(!o)return;var i=o.file,c=o.line||void 0;document.querySelectorAll("div[id*='-option']"),qt(i,c)}}));e.observe(t,{childList:!0,attributes:!0,subtree:!1}),Vt.current.push(e)}))}()}),100);Object(o.useEffect)((function(){nn(w)}),[w,B,J]);var cn=Object(o.useState)(300),an=Object(c.a)(cn,2),rn=an[0],ln=an[1],sn=Object(o.useRef)(null);Object(pt.a)((function(){if(sn&&sn.current){var t=sn.current.clientHeight+30,n=window.innerHeight-t-50;rn!==n&&ln(n)}}),10)();var un=Object(o.useState)("editor"),pn=Object(c.a)(un,2),dn=pn[0],fn=pn[1];return Object(a.c)("div",{className:"omnibar-popup-bg ".concat(t.show?"":"hide"),onClick:function(n){t.onClose()}},Object(a.c)("div",{className:"omnibar-popup-wrapper device-".concat(Object(r.a)()," ").concat(i)},Object(a.c)("div",{className:"flex-wrapper",onClick:function(t){t.stopPropagation()}},Object(a.c)("div",{className:"select-wrapper",ref:sn},Object(a.c)("div",{className:"help"},Q),Object(a.c)("div",{className:"help-right",onClick:function(n){t.onHide()}},Object(a.c)(C.a,{name:"faEyeSlash",color:"#b2b2b2"})),Object(a.c)(Nt.a,{isMulti:!0,ref:F,menuIsOpen:!0,defaultValue:L,value:f,autoFocus:!0,isDisabled:"locked"===i,onChange:function(t,n){var e=t[0];if(e&&e.payload&&e.payload.file){var o=e.payload.file;M(o.path),t=[]}h(t)},openMenuOnClick:!1,inputValue:B,onInputChange:function(t,n){Kt(),"input-blur"===n.action||"menu-close"===n.action||H(t)},onFocus:function(t){},options:w,styles:R,noOptionsMessage:function(){return _}})),yt&&"mobile"!==Object(r.a)()&&Object(a.c)("div",{className:"preview-wrapper ".concat(yt?"note-preview":"html-preview-wrapper"),style:{height:rn}},yt&&"mobile"!==Object(r.a)()&&Object(a.c)(Mt,{file:yt,showToolbar:!0,titleEditor:!1,searchedString:Ut,height:rn,view:dn,windowId:jt}),Tt&&Object(a.c)("div",{className:"html-preview",dangerouslySetInnerHTML:{__html:Tt},style:{height:rn}})))))},an=function(t){var n=Object(o.useState)(""),e=Object(c.a)(n,2),r=e[0],l=e[1];return Object(o.useEffect)((function(){Object(x.d)((function(n){n.file.getContent(t.filePath,(function(e){var o=Object(tt.d)(t.filePath),i=n.note.render({raw:e,file:o});l(i)}))}))}),[t.filePath]),Object(a.c)(i.a.Fragment,null,Object(a.c)("div",{className:"rendered-note-component"},Object(a.c)("span",{className:"rendered-note-content-wrapper",dangerouslySetInnerHTML:{__html:r}})))},rn=function(t){return Object(a.c)(i.a.Fragment,null,Object(a.c)("div",{className:"shortcut-component"},Object(a.c)("h3",{className:"subtitle"},"shortcuts"),Object(a.c)(an,{filePath:t.filePath})))},ln=e(153),sn=e(237),un=e(224);Object(Wt.a)("notification","emit",(function(t,n){var e=t||"";Object(x.d)((function(o){console.log(t,n),o.ui.notification.emit({content:(new Date).toJSON()+" \n\n <br/> test notif => \n"+e,options:Object(s.a)({},n)})}))}));var pn=function(t){var n=Object(o.useState)([]),e=Object(c.a)(n,2),i=e[0],r=e[1],l=Object(o.useRef)([]);Object(o.useEffect)((function(){Object(x.d)((function(t){t.socket.get((function(t){t.on("getNotification",(function(t){var cb;cb=function(n){if(!0===!n)return console.log("[NOTIFS] notifications disabled, not displaying it");t.notification.id||(t.notification.id=Object(At.a)()),p(t.notification),u(t.notification)},Object(x.d)((function(t){cb(!t.userSettings.get("view_disable_notification_popups"))}))}))}))}))}),[]);var s=Object(o.useRef)({}),u=function(t){var n,e=1e3*((null===(n=t.options)||void 0===n?void 0:n.hideAfter)||10);e<0||t.id&&(s.current[t.id]=setTimeout((function(){d(t.id)}),e))},p=function(t){l.current=l.current.filter((function(n){return n.id!==t.id})),t.id&&s.current[t.id]&&clearTimeout(s.current[t.id]),l.current.unshift(t),r(Object(It.a)(l.current))},d=function(t){t&&(l.current=l.current.filter((function(n){return n.id!==t})),r(Object(It.a)(l.current)))},f=function(t){var n,e,o="normal";return null!==(n=t.options)&&void 0!==n&&n.type&&(o=null===(e=t.options)||void 0===e?void 0:e.type),o};return Object(a.c)("div",{className:"notifications-center-wrapper"},Object(a.c)("div",{className:"notifications-list"},i.map((function(t){return Object(a.c)("div",{key:t.id,className:"notif-wrapper notif-type-".concat(f(t))},Object(a.c)("div",{className:"notif-close",onClick:function(n){d(t.id)}},Object(a.c)(C.b,{name:"close"})),Object(a.c)("div",{className:"notif-content",dangerouslySetInnerHTML:{__html:t.content}}))}))))},dn=e(216),fn=e(73),bn=function(t){var n,e,i=Object(tt.d)(t.notePreview.filepath);Object(o.useEffect)((function(){u("note-preview-popup-wid-".concat(Object(At.a)()))}),[]);var r=Object(o.useState)(""),l=Object(c.a)(r,2),s=l[0],u=l[1];return Object(a.c)("div",{className:"page-link-preview-popup-ext",onMouseLeave:function(t){Object(x.d)((function(t){t.ui.notePreviewPopup.close()}))},style:{left:t.notePreview.position[0],top:t.notePreview.position[1]}},Object(a.c)("div",{className:"click-throught",onClick:function(n){var e,o=Object(tt.d)(t.notePreview.filepath);o&&null!==(e=t.notePreview.opts)&&void 0!==e&&e.windowIdToOpenIn&&(Object(fn.d)(!0),Object(x.d)((function(n){var e;n.ui.browser.goTo(o.folder,o.name,{openIn:null===(e=t.notePreview.opts)||void 0===e?void 0:e.windowIdToOpenIn})})))}}),Object(a.c)("div",{className:"page-link-preview-popup-int"},Object(a.c)(Mt,{file:i,searchedString:null===(n=t.notePreview.opts)||void 0===n?void 0:n.searchedString,replacementString:null===(e=t.notePreview.opts)||void 0===e?void 0:e.replacementString,windowId:s,showToolbar:!0,titleEditor:!1,view:"editor",linkPreview:!1})))},gn=400,hn=300,mn=e(115),vn=e(88),wn=e(95),On=window._tiro_generatePluginsMarketplaceHtml?window._tiro_generatePluginsMarketplaceHtml:function(){},jn=function(t){var n=Object(o.useState)([]),e=Object(c.a)(n,2),i=e[0],r=e[1],l=Object(o.useState)(""),s=Object(c.a)(l,2),u=s[0],p=s[1];return Object(o.useEffect)((function(){Object(x.d)((function(t){t.plugins.marketplace.fetchList((function(t){r(t);var n=On({pluginsDescriptions:t,fullDisplayMode:!0,onPluginClick:function(t){console.log("pluginClick",t)},onSettingChange:function(t){console.log("onSettingChange",t)}});p(n)}))}))}),[]),Object(a.c)("div",{className:"plugins-marketplace-popup-wrapper"},Object(a.c)(rt.a,{title:"Plugins Marketplace",onClose:function(){t.onClose()}},i.length>0&&Object(a.c)("div",{id:"plugin-marketplace-placeholder",dangerouslySetInnerHTML:{__html:u}}),0===i.length&&Object(a.c)("div",{className:"plugins-list-loading"},"Contacting Marketplace...")))},xn=e(131),kn=e(241),yn=e(375),_n=e(127),Cn=e.n(_n),En=e(71),Sn=e(243),Tn=15,In=!1,Nn=function(){if(In)return Tn;var t=document.createElement("div");t.style.visibility="hidden",t.style.overflow="scroll",t.style.msOverflowStyle="scrollbar",document.body.appendChild(t);var n=document.createElement("div");return t.appendChild(n),Tn=t.offsetWidth-n.offsetWidth,t.parentNode.removeChild(t),In=!0,Tn},Pn=function(t){var n,e=Object(o.useRef)(t.panel);Object(o.useEffect)((function(){e.current=t.panel}),[t.panel]);var i=function(n){t.onPanelUpdate&&Object(x.d)((function(t){t.ui.floatingPanel.update(n)}))},l=Object(o.useState)(!1),u=Object(c.a)(l,2),p=u[0],d=u[1],f=function(t){d(t)},g=Object(o.useState)(!1),h=Object(c.a)(g,2),m=h[0],v=h[1],w=function(){A(),v(!0),t.onPanelDragStart()},O=function(){v(!1),t.onPanelDragEnd()},j=Object(o.useState)(t.panel),k=Object(c.a)(j,2),y=k[0],_=k[1],E=Object(pt.a)((function(){O()}),500),S=function(){Object(x.d)((function(n){n.ui.floatingPanel.minimizePanel(t.panel.id)}))},T=t.panel.size.height;t.panel.ctagConfig&&(t.panel.ctagConfig.opts||(t.panel.ctagConfig.opts={}),t.panel.ctagConfig.opts.wrapperHeight="100%",t.panel.ctagConfig.opts.sandboxed=!1);var I=Object(o.useState)(!0),N=Object(c.a)(I,2),P=N[0],R=N[1],A=function(){t.highestVisibleZIndex!==t.panel.zIndex&&Object(x.d)((function(n){n.ui.floatingPanel.pushWindowOnTop(t.panel.id)}))},F=p&&t.panelsVisibleNumber>1&&t.highestVisibleZIndex!==t.panel.zIndex,L=Object(o.useState)(Object(At.a)()),M=Object(c.a)(L,2),z=M[0];M[1];t.panel.ctagConfig&&(t.panel.ctagConfig.opts||(t.panel.ctagConfig.opts={}),t.panel.ctagConfig.opts.windowId=z);var D="type-".concat(t.panel.type," ").concat(null!==(n=t.panel.ctagConfig)&&void 0!==n&&n.tagName?"ctag-".concat(t.panel.ctagConfig.tagName):"");return Object(a.c)("div",{className:"floating-panel-wrapper ".concat(D," ").concat(t.panel.status),style:{zIndex:t.panel.zIndex},key:t.panel.id,onMouseDown:function(){A()}},Object(a.c)(Cn.a,{cancel:"body",handle:".handle",position:t.panel.position,scale:1,onStart:function(n,e){A(),w(),i(Object(s.a)(Object(s.a)({},t.panel),{},{position:{x:e.x,y:e.y}}))},onDrag:function(n,e){i(Object(s.a)(Object(s.a)({},t.panel),{},{position:{x:e.x,y:e.y}}))},onStop:function(n,e){O(),i(Object(s.a)(Object(s.a)({},t.panel),{},{position:{x:e.x,y:e.y}}))}},Object(a.c)(yn.a,{boundsByDirection:!0,className:"floating-panel",size:t.panel.size,onResize:function(n,e,o,c){i(Object(s.a)(Object(s.a)({},t.panel),{},{size:{width:o.offsetWidth,height:o.offsetHeight}})),w(),E()}},Object(a.c)("div",{className:"floating-panel__wrapper"},Object(a.c)("div",{className:"floating-panel__actions"},Object(a.c)(b.a,{class:"floating-bar-toolbar",size:1,buttons:[{title:"Move Window",customHtml:Object(a.c)("div",{className:"handle"},Object(a.c)(C.b,{name:"grip-vertical"})),action:function(){}},"desktop"===Object(r.a)()?{title:"Minimize",icon:"window-minimize",action:S}:{},{title:"Maximize",icon:"expand",action:function(){var n=t.panel;n.size.width===window.innerWidth&&n.size.height===window.innerHeight&&0===n.position.x&&0===n.position.y?i(y):(_(n),i(Object(s.a)(Object(s.a)({},n),{},{size:{width:window.innerWidth,height:window.innerHeight},position:{x:0,y:0}})))}},"ctag"===t.panel.type?{title:"Reload content",icon:"rotate-right",action:function(){R(!1),setTimeout((function(){R(!0)}),100)}}:{},{title:"Close window",icon:"xmark",action:function(){Object(x.d)((function(n){n.ui.floatingPanel.delete(t.panel.id)}))}}]})),Object(a.c)("div",{className:"floating-panel__content content-type-".concat(t.panel.type),style:{height:T},onMouseDown:function(){A()},onMouseEnter:function(){f(!0)},onMouseLeave:function(){f(!1)}},Object(a.c)("div",{className:"floating-panel__drag-overlay ".concat(m?"":"hide"," ").concat(F?"hover-mode":""),onMouseDown:function(){A(),f(!1)}}),"file"===t.panel.type&&t.panel.file&&Object(a.c)("div",{className:"floating-panel__inner-content"},Object(a.c)(Mt,{windowId:t.panel.id||Object(At.a)(),file:t.panel.file,height:t.panel.size.height,view:t.panel.view||"editor",searchedString:t.panel.searchedString,replacementString:t.panel.replacementString,titleEditor:"disabled",onLayoutUpdate:function(t,n){"windowViewChange"===t&&null!==n&&void 0!==n&&n.view&&i(Object(s.a)(Object(s.a)({},e.current),{},{view:n.view}))}})),"ctag"===t.panel.type&&t.panel.ctagConfig&&P&&Object(a.c)("div",{className:"floating-panel__inner-content window-id-sizeref-".concat(z),style:{height:T}},Object(En.a)(t.panel.ctagConfig)))))))},Rn=function(t){var n=t.panels,e=Object(o.useRef)([]);Object(o.useEffect)((function(){e.current=n}),[n]);var i=function(t){Object(x.d)((function(n){n.ui.floatingPanel.update(t)}))},l=Object(o.useState)(!1),s=Object(c.a)(l,2),u=s[0],p=s[1],d=function(t){return function(){p("start"===t)}},f=Object(o.useState)(!1),b=Object(c.a)(f,2),g=b[0],h=b[1];Object(o.useEffect)((function(){if(!g&&0!==e.current.length){h(!0);var t=Object(F.a)(e.current);Object(ot.a)(t)||(t=[]),t.forEach((function(t){"minimized"===t.status&&(t.status="hidden")})),Object(x.d)((function(n){n.ui.floatingPanel.updateAll(t)}))}}),[g]);var m=Object(o.useState)([]),v=Object(c.a)(m,2),w=v[0],O=v[1],j=Object(o.useState)(0),k=Object(c.a)(j,2),y=k[0],_=k[1],E=Object(o.useState)(0),S=Object(c.a)(E,2),T=S[0],I=S[1],N=Object(pt.a)((function(){var t=0;n.forEach((function(n){void 0!==n.zIndex&&n.zIndex>t&&(t=n.zIndex)})),_(t),I(n.filter((function(t){return"visible"===t.status})).length);var o=Object(F.a)(e.current),i=o.filter((function(t){return"minimized"===t.status})),c=o.filter((function(t){return"hidden"===t.status})),a=o.filter((function(t){return"visible"===t.status})),r=i.concat(c).concat(a);r=Object(Sn.a)(r,(function(t){return t.orderPosition})),O(r)}),100);return Object(o.useEffect)((function(){N()}),[n]),Object(a.c)("div",{className:"floating-panels-wrapper",style:{pointerEvents:u?"all":"none"}},Object(ot.a)(n)&&n.map((function(t){return"hidden"!==t.status&&t.device===Object(r.a)()&&Object(a.c)("div",{key:t.id},Object(a.c)(Pn,{panel:t,onPanelUpdate:i,onPanelDragStart:d("start"),onPanelDragEnd:d("end"),panelsVisibleNumber:T,highestVisibleZIndex:y}))})),"desktop"===Object(r.a)()&&Object(a.c)("div",{className:"panels-minimized-bottom-bar-wrapper",style:{height:"".concat(35+Nn(),"px"),bottom:"-".concat(Nn(),"px")}},Object(a.c)("div",{className:"panels-minimized-bottom-bar-background ".concat(t.pinStatus?"pinned":"")}," "),Object(a.c)("div",{className:"bottom-hover-bar"}," "),Object(a.c)("div",{className:"panels-minimized-bottom-bar ".concat(t.pinStatus?"pinned":""),style:{width:"".concat(n.length>8?15*n.length:100,"%")}},Object(a.c)("div",{className:"floating-panels-bottom-toolbar"},Object(a.c)("div",{className:"btn-action reinit-position-and-size",onClick:function(){Object(x.d)((function(t){t.ui.floatingPanel.actionAll("organizeWindows")}))}},Object(a.c)(C.b,{name:"layer-group"})," "),Object(a.c)("div",{className:"btn-action pin-bar",onClick:function(){return t.onPinChange(!t.pinStatus)}}," ",Object(a.c)(C.b,{name:"thumbtack"})," ")),w.map((function(t){return"visible"!==t.status&&Object(a.c)("div",{key:t.id,className:"panel-minimized ".concat("minimized"===t.status?"active-tab":""),onClick:function(n){!function(t){t.status="visible",i(t),Object(x.d)((function(n){n.ui.floatingPanel.pushWindowOnTop(t.id),n.ui.floatingPanel.updateOrderPosition(t.id,"first")}))}(t)}},Object(a.c)("div",{className:"label"},function(t){if(!t)return"";if("file"===t.type)return t.file.name.replace(".md","");if("ctag"===t.type){var n,e;if("iframe"===(null===(n=t.ctagConfig)||void 0===n?void 0:n.tagName)){var o,i=null===(o=t.ctagConfig)||void 0===o?void 0:o.content;return Object(st.b)(i)}return"".concat(null===(e=t.ctagConfig)||void 0===e?void 0:e.tagName," | ").concat(t.file.name)}return""}(t)),Object(a.c)("div",{className:"close-btn",onClick:function(n){n.stopPropagation(),"minimized"===t.status?function(t){t.status="hidden",i(t)}(t):function(t){Object(x.d)((function(n){n.ui.floatingPanel.delete(t.id)}))}(t)}},Object(a.c)(C.b,{name:"xmark"})))})))))},An=e(210),Fn=e(221),Ln=e(222),Mn=e(226),zn=function(t){var n=t.url;(n=n.trim()).includes("?")?n+="&autoplay=1&mute=1":n+="?autoplay=1&mute=1";var e=Object(o.useState)(!1),i=Object(c.a)(e,2),r=i[0],l=i[1];return Object(o.useEffect)((function(){setTimeout((function(){l(!0)}),3e3)}),[]),Object(a.c)("div",{className:"background-video",style:{width:"".concat(t.width,"%"),height:"".concat(t.height,"%")}},r&&Object(a.c)("iframe",{src:"".concat(n),allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"}))},Dn=e(223),Bn=(Object(r.a)(),Object(s.a)({},p.a)),Hn=Bn.els,Un=Bn.colors,Wn=(Bn.font,Bn.sizes),qn=Object(kn.a)((function(t,n,e,o){return Kn(t,n,e,o)}),(function(){for(var t=arguments.length,n=new Array(t),e=0;e<t;e++)n[e]=arguments[e];return JSON.stringify(n)})),Vn=Object(kn.a)((function(t){return Jn(t)}),(function(){for(var t=arguments.length,n=new Array(t),e=0;e<t;e++)n[e]=arguments[e];return JSON.stringify(n)})),Jn=function(t){var n=Object(xn.a)("CssAppDynamic"),e=Gt.d.curr.ui_layout_background_image_enable,o=Gt.d.curr.ui_layout_background_image,i=100,c=100,a=Gt.d.curr.ui_layout_background_video_enable;if(!0===e&&!1===a){var l=o.indexOf("?token=");l>0&&(o=o.substring(0,l)),(o+="?token=".concat(Object(B.b)())).startsWith("http")||(o="".concat(Object(M.a)(o)))}!0!==a&&!0!==e||(i=parseInt(Gt.d.curr.ui_layout_background_image_window_opacity)/100,c=parseInt(Gt.d.curr.ui_layout_background_image_window_opacity_active)/100);var s="\n\t\t// IMPORTANT for all height app\n\t\theight:100%;\n\t\t\n\t\t//\n\t\t// Background image\n\t\t//\n\t\t".concat(e?"background-image: url('".concat(o,"');"):"","\n\t\t\n\t\tbackground-size: cover;\n\t\t.react-grid-item {\n\t\t\topacity: ").concat(i,";\n\t\t}\n\t\t.react-grid-item.active {\n\t\t\topacity: ").concat(c,";\n\t\t}\n\n\t\t").concat("\n.background-video {\n position: fixed;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n iframe {\n width: 100%;\n height: 100%;\n }\n}\n","\n\n\n\t\t// for preview css\n\t\t").concat(Object(mn.d)(),"\n\t\t// FILE RESSOURCE PREVIEW\n\t\t").concat(Object(vn.b)(),"\n\t\t// PREVIEW LINK\n\t\t").concat(Object(fn.b)(),"\n\t\t").concat(Object(wn.e)(),"\n\n\t\t").concat(Object(Mn.b)(),"\n\n\t\t").concat(Object(C.c)(),"\n\t\t").concat(Object(Fn.a)(),"\n\t\t").concat("\n .mobile-view-preview {\n .page-link-preview-popup-int {\n .editor-area {\n display:block;\n }\n .preview-area-wrapper {\n display:none;\n }\n }\n }\n .page-link-preview-popup-ext {\n // pointer-events: none;\n position: absolute;\n z-index: 10001;\n .click-throught {\n cursor:pointer;\n position: absolute;\n top: 0px;\n left: 0px;\n width: 100%;\n height: 30px;\n }\n .page-link-preview-popup-int {\n cursor:default;\n margin-top: 20px;\n background: white;\n width: ".concat(gn,"px;\n height: ").concat(hn,"px;\n border-radius: 10px;\n box-shadow: 0px 0px 3px 1px rgba(0,0,0,0.1);\n overflow-y:hidden;\n overflow-x:hidden;\n .cm-scroller {\n width: calc(100% - 40px)!important;\n }\n\n // disable links inside\n .title-search-link {\n pointer-events: none;\n }\n }\n .\n }\n"),"\n\t\t").concat("\n .main-wrapper.view-image {\n .mobile-view-toggler {\n display: none;\n }\n \n .left-wrapper {\n width: ".concat("desktop"===Object(r.a)()?15:40,"vw ;\n .left-wrapper-1 {\n width: 100%\n }\n .left-wrapper-2 {\n display: none;\n }\n }\n\n\n .right-wrapper.draggable-grid-editors-view {\n display: none;\n }\n .right-wrapper {\n height: 100vh;\n }\n .right-wrapper.image-gallery-view {\n width: ").concat(100-("desktop"===Object(r.a)()?15:40),"vw;\n }\n }\n \n .main-wrapper.view-text {\n .right-wrapper.draggable-grid-editors-view {\n \n }\n .right-wrapper.image-gallery-view {\n display: none;\n }\n }\n"),"\n\t\t").concat("\n.notifications-center-wrapper {\n\t\tposition: fixed;\n\t\ttop: 0px;\n\t\tright: 0px;\n\t\tz-index: 2000;\n\n\t\t.notifications-list {\n\t\t\t\t.notif-wrapper {\n\t\t\t\t\t\t// background: ".concat(p.a.colors.main,"; \n\t\t\t\t\t\tbackground: white;\n\t\t\t\t\t\tposition: relative;\n\t\t\t\t\t\tmargin: 5px;\n\n\n\t\t\t\t\t\tpadding: 5px;\n\t\t\t\t\t\tborder-radius: 5px;\n\t\t\t\t\t\tbox-shadow: 0px 0px 5px #0006;\n\t\t\t\t\t\t.notif-close {\n\t\t\t\t\t\t\t\tcursor: pointer;\n\t\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\t\ttop: 3px;\n\t\t\t\t\t\t\t\tright: 5px;\n\t\t\t\t\t\t\t\tpadding: 5px;\n\t\t\t\t\t\t\t\tbackground: white;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t.notif-content {\n\t\t\t\t\t\t\t\tpadding: 5px 29px 5px 5px;\n\t\t\t\t\t\t\t\tmax-width: 190px;\n\t\t\t\t\t\t\t\tmax-height: 180px;\n\t\t\t\t\t\t\t\toverflow-y: auto;\n\t\t\t\t\t\t\t\tword-break: break-word;\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t}\n}\n"),"\n\t\t").concat(Object(Tt.c)(),"\n\t\t").concat("\n.lightbox-component {\n\tfigure.zoom2 {\n\t\tposition: relative;\n\t\t\n\t\tbackground-repeat: no-repeat;\n\t\tmargin: 0px;\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\toverflow: hidden;\n\t\t\n\t\tz-index: 10;\n\t\t\n\t}\n\t.counter {\n\t\tposition: absolute;\n\t\tbottom: 5px;\n\t\tleft: 10px;\n\t\tcolor: rgba(255,255,255,0.2);\n\t\tz-index: 15;\n\t}\n\tfigure.zoom2.not-zoomed {\n\t\tbackground-size: 0%!important;\n\t\tcursor: zoom-in;\n\t}\n\tfigure.zoom2.zoomed {\n\t\tbackground-position: 50% 50%;\n\n\t\timg {\n\t\t\topacity: 0;\n\t\t}\n\t}\n\tfigure.zoom2 img {\n\t\ttransition: opacity .5s;\n\t\tdisplay: block;\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\tobject-fit: contain;\n\t}\n\t \n\n position: fixed;\n\tz-index: 2000;\n top: 0px;\n left: 0px;\n width: 100vw;\n height: 100vh;\n \n .lightbox-bg {\n top: 0px;\n left: 0px;\n width: 100vw;\n height: 100vh;\n position: absolute;\n\t\t\t\tbackground: rgb(0 0 0 / 82%);\n }\n\n .lightbox-content {\n\t\t&.images-nb-1 {\n\t\t\t\t.left, .right {\n\t\t\t\t\t\tdisplay: none!important;\n\t\t\t\t}\n\t\t}\n\n\t\tborder-radius: 9px;\n\t\toverflow: hidden;\n position: absolute;\n width: 95vw;\n height: 85vh;\n background: black;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%); \n\t\t.zoomToggle {\n\t\t\tposition: absolute;\n\t\t\ttop: 9px;\n\t\t\tleft: 11px;\n\t\t\tz-index: 13;\n\t\t}\n\t\t.zoom {\n\t\t\ttop: 3px;\n\t\t\tleft: 28px;\n\t\t}\n\t\t.dezoom {\n\t\t\ttop: 3px;\n\t\t\tleft: 45px;\n\t\t}\n\t\t.zoom, .dezoom {\n\t\t\t\tposition: absolute;\n\t\t\t\t\n\t\t\t\tz-index: 100;\n\t\t\t\theight: 43px;\n\t\t\t\tmargin-right: 5px;\n\t\t\t\tsvg path {\n\t\t\t\t\t\tbox-shadow: 0px 0px 5px #0006;\n\t\t\t\t}\n\t\t}\n\t\tsvg {\n\t\t\tpadding: 3px;\n\t\t\tborder-radius: 22px;\n\t\t\twidth: 13px;\n\t\t\tbox-shadow: 0px 0px 5px #00000040;\n\t\t\ttransition: all 0.2s ease-in-out;\n\t\t\t&:hover {\n\t\t\t\tbackground: white;\n\t\t\t}\n\t\t}\n\n\t\t\n .lightbox-image {\n position: relative;\n justify-content: space-around;\n align-items: center;\n width: 100%;\n height: 100%;\n\n &:hover {\n .image-infos {\n display: block;\n }\n }\n .image-infos {\n\t\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\t\ttop: 0px;\n\t\t\t\t\t\t\t\theight: 55px;\n\t\t\t\t\t\t\t\tleft: 0px;\n\t\t\t\t\t\t\t\twidth: 100%;\n\t\t\t\t\t\t\t\tbackground: linear-gradient(180deg, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0) 100%);\n\t\t\t\t\t\t\t\tul {\n\t\t\t\t\t\t\t\t\t\tmargin-top: 5px;\n\t\t\t\t\t\t\t\t\t\tjustify-content: flex-end;\n\t\t\t\t\t\t\t\t\t\theight: 95vh;\n\t\t\t\t\t\t\t\t\t\tposition: relative;\n\t\t\t\t\t\t\t\t\t\tmargin: 0px;\n\t\t\t\t\t\t\t\t\t\tli {\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t&.left,\n\t\t\t\t\t\t\t\t\t\t\t\t&.right {\n\t\t\t\t\t\t\t\t\t\t\t\t\ttop: calc(50% - 20px);\n\t\t\t\t\t\t\t\t\t\t\t\t\theight: 40px;\n\t\t\t\t\t\t\t\t\t\t\t\t\twidth: 40px;\n\t\t\t\t\t\t\t\t\t\t\t\t\tz-index: 15;\n\n\t\t\t\t\t\t\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\t\t\t\t\t\t\tdisplay: flex;\n\t\t\t\t\t\t\t\t\t\t\t\t\tjustify-content: space-evenly;\n\t\t\t\t\t\t\t\t\t\t\t\t\tbutton {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// display: none;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\twidth: 100%;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t&.mobile {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tbutton {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// display: block;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsvg {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tbackground: white;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t&.desktop:hover {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tbutton {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// display: block;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t&.left {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tleft: 0px;\n\t\t\t\t\t\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t&.right {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tright: 0px;\n\t\t\t\t\t\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t\t\t\t\t\t\t&.close {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tpadding: 10px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tposition:relative;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tz-index:14;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n // position: relative;\n &:hover {\n .image-name {\n display: block;\n }\n }\n .image-name {\n display: none;\n cursor: pointer;\n color: grey;\n padding: 5px;\n font-size: ".concat(Object(K.a)(),"px;\n position: absolute;\n top: 5px;\n left: 5px;\n }\n }\n\t\t\t.image-zoom-wrapper {\n\t\t\t\tdisplay: flex;\n\t\t\t\tjustify-content: center;\n\t\t\t\talign-items: center;\n\t\t\t\twidth: 100%;\n\t\t\t\theight: 100%;\n\t\t\t\ttext-align: center;\n\t\t\t\toverflow: auto;\n\t\t\t\tposition: relative;\n\t\t\t\tz-index: 2;\n\t\t\t\t\timg {\n\t\t\t\t\t\tvertical-align: middle;\n\t\t\t\t\t\tz-index:2;\n\t\t\t\t\t}\n\t\t\t}\n }\n }\n\n}\n"),"\n\t\t").concat("\n .prompt-popup-component {\n\t\t\t\t.popup-wrapper {\n\t\t\t\t\t\tmin-width: 200px;\n\t\t\t\t\t\tmin-height: 100px;\n\t\t\t\t\t\ttext-align:center;\n\t\t\t\t}\n }\n","\n\t\t").concat("\n\t\t\t\t\t\t&.device-view-mobile {\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t.omnibar-popup-bg.hide {\n\t\t\t\t\t\t\t\tdisplay:none;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t.omnibar-popup-bg {\n\t\t\t\t\t\t\t\tbackground: rgba(0,0,0,0.5);\n\t\t\t\t\t\t\t\ttop: 0px;\n\t\t\t\t\t\t\t\tleft: 0px;\n\t\t\t\t\t\t\t\twidth: 100vw;\n\t\t\t\t\t\t\t\theight: 100vh;\n\t\t\t\t\t\t\t\tz-index: 10000;\n\t\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t.omnibar-popup-wrapper {\n\t\t\t\t\t\t\t\t&.locked {\n\t\t\t\t\t\t\t\t\tpointer-events:none;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\twidth: 88%;\n\t\t\t\t\t\t\t\tmargin: 0 auto;\n\t\t\t\t\t\t\t\tz-index: 100;\n\t\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\t\tleft: 50%;\n\t\t\t\t\t\t\t\ttransform: translate(-50%);\n\t\t\t\t\t\t\t\ttop: 22px;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t.help-right {\n\t\t\t\t\t\t\t\tcursor:pointer;\n\t\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\t\tright: 3px;\n\t\t\t\t\t\t\t\ttop: 3px;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t.help {\n\t\t\t\t\t\t\t\tcolor:white;\n\t\t\t\t\t\t\t\tmargin-bottom: 10px;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t.preview-wrapper {\n\t\t\t\t\t\t\t\toverflow-y: scroll;\n\t\t\t\t\t\t\t\tbackground: white;\n\t\t\t\t\t\t\t\tborder-radius: 5px;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t.barimage {\n\t\t\t\t\t\t\t\theight: 60px; \n\t\t\t\t\t\t\t\twidth: 100px;\n\n\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\tdiv[class$='-menu']>div {\n\t\t\t\t\t\t\t\tdisplay: flex;\n\t\t\t\t\t\t\t\tflex-wrap: wrap;\n\t\t\t\t\t\t\t\tjustify-content: flex-start;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tdiv[class$='-option'] {\n\t\t\t\t\t\t\t\twidth: ".concat("mobile"===Object(r.a)()?"100":"20","%;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t.path-option-wrapper {\n\t\t\t\t\t\t\tposition: relative;\n\t\t\t\t\t\t\tword-break: break-word;\n\t\t\t\t\t\t\t.search-location {\n\t\t\t\t\t\t\t\t\tcolor: #b3b1b1;\n\t\t\t\t\t\t\t\t\tfont-size: 9px;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t.folder {\n\t\t\t\t\t\t\t\t\tcolor: grey;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t.file {\n\t\t\t\t\t\t\t\t\tfont-weight: bold;\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t&.device-desktop .actions {\n\t\t\t\t\t\t\t\ttransition: all 0.2s;\n\t\t\t\t\t\t\t\topacity: 0;\n\t\t\t\t\t\t\t\t.action {\n\t\t\t\t\t\t\t\t\tmargin-left: 8px;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t&.device-desktop:hover .actions {\n\t\t\t\t\t\t\t\topacity: 1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t.actions {\n\t\t\t\t\t\t\t\tdisplay:flex;\n\t\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\t\tright: 0px;\n\t\t\t\t\t\t\t\ttop: 0px;\n\t\t\t\t\t\t\t\talign-items: center;\n\t\t\t\t\t\t\t\theight: 100%;\n\t\t\t\t\t\t\t\t.action {\n\t\t\t\t\t\t\t\t\ttransition: all 0.2s;\n\t\t\t\t\t\t\t\t\topacity: 0.3;\n\t\t\t\t\t\t\t\t\tcursor: pointer;\n\t\t\t\t\t\t\t\t\tcolor: grey;\n\t\t\t\t\t\t\t\t\t&:hover {\n\t\t\t\t\t\t\t\t\t\topacity: 1;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t.html-preview-wrapper {\n\t\t\t\t\t\t\t\toverflow: hidden;\n\t\t\t\t\t\t\t\t.html-preview {\n\t\t\t\t\t\t\t\t\t\tiframe {\n\t\t\t\t\t\t\t\t\t\t\t\t// transform: scale(0.65);\n\t\t\t\t\t\t\t\t\t\t\t\ttransform: scale(0.8);\n\t\t\t\t\t\t\t\t\t\t\t\ttransform-origin:top left;\n\t\t\t\t\t\t\t\t\t\t\t\tborder:none;\n\t\t\t\t\t\t\t\t\t\t\t\twidth: 125%;\n\t\t\t\t\t\t\t\t\t\t\t\theight: 125%;\n\t\t\t\t\t\t\t\t\t\t\t\t// width: 155%;\n\t\t\t\t\t\t\t\t\t\t\t\t// height: 155%;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\t"),"\n\n\t\t").concat("\n .app-view-switcher-component {\n margin: 0px 10px 10px 10px;\n ul.buttons-toolbar-component {\n li {\n margin-left: 5px;\n margin-right: 5px;\n }\n }\n }\n","\n\t\t").concat(Object(b.b)(),"\n\n\n\t\t").concat("\n .image-gallery-component-wrapper {\n margin: 0px 17px;\n overflow-y: scroll;\n // height: calc(100vh - ".concat(p.a.sizes.search.padding+p.a.sizes.gallery.topH+("desktop"===Object(r.a)()?0:190),"px);\n height: calc(100vh - ").concat(p.a.sizes.search.padding+p.a.sizes.gallery.topH,"px);\n // height: 100%;\n width: 100%;\n\n .masonry-gallery {\n display: flex;\n list-style: none;\n flex-direction: row;\n flex-wrap: wrap;\n\n .masonry-col {\n width: ").concat("desktop"===Object(r.a)()?32:90,"%;\n margin-right: 1%;\n\n .masonry-col-item {\n position: relative;\n &:hover {\n .image-infos {\n display: block;\n }\n }\n .image-infos {\n display: none;\n ").concat(p.a.els().imageInfos,"\n }\n img {\n ").concat(p.a.els().images,"\n }\n margin-bottom: 10px;\n }\n }\n }\n }\n"),"\n\n\t\t").concat(Object(kt.b)(),"\n\n\t\t").concat("\n.search-bar-component {\n input {\n\t\t\t\tborder-radius: 5px;\n width: calc(100% - ".concat(2*p.a.sizes.block+20,"px);\n border: none;\n background: white;\n\t\t\t\tpadding: 18px 9px;\n\t\t\t\tmargin: 0px 15px 15px 15px;\n\t\t\t\tbox-shadow: 0px 0px 6px rgb(0 0 0 / 5%);\n\t\t\t\tfont-size:").concat(Object(K.a)(1),"px;\n margin: 0px ").concat(p.a.sizes.block,"px ").concat(p.a.sizes.block,"px ").concat(p.a.sizes.block,"px; \n &::placeholder {\n color: #afadad;\n }\n }\n .search-status {\n text-align: center;\n font-size: 8px;\n\t\t\t\tposition: relative;\n\t\t\t\tbottom:9px;\n\t\t\t\tcolor: grey;\n }\n}\n"),"\n\n\t\t").concat("\n.mobile-view-toggler {\n position: fixed;\n bottom: 0px;\n left: 0px;\n z-index: 10;\n display:flex;\n width: 100%;\n list-style: none;\n margin: 0px;\n padding: 0px;\n background: ".concat(p.a.colors.main,";\n li {\n flex: 1 1 auto;\n button {\n ").concat(p.a.els().button,";\n padding: 8px;\n width: 100%;\n span.icon-wrapper {\n transform: scale(1.1);\n background: rgba(255,255,255,0);\n padding: 10px 27px;\n border-radius: 6px;\n }\n &:hover {\n span.icon-wrapper {\n }\n }\n &.active {\n span.icon-wrapper {\n background: rgba(255,255,255,0.2);\n }\n }\n }\n }\n}\n"),"\n\n\t\t").concat("\n.connection-status {\n font-size: 9px;\n z-index: 11;\n a {\n margin-left: 10px;\n color: white;\n }\n .back-online, .disconnected {\n position: absolute;\n text-align:center;\n color:white;\n top: 0px;\n left: 0px;\n width: 100vw;\n padding: 1px;\n }\n .back-online{\n background: green;\n }\n .disconnected{\n background: ".concat(p.a.colors.main,";\n }\n .connected {\n display:none;\n position: absolute;\n bottom: 5px;\n right: 5px;\n color: ").concat(p.a.colors.green,";\n }\n}\n"),"\n\n\t\t").concat("\n .setup-popup-component {\n .submit-button {\n margin-top: 10px;\n ".concat(p.a.els().redButton,";\n padding: 10px 20px;\n }\n .error {\n color: ").concat(p.a.colors.main,";\n }\n .success {\n color: ").concat(p.a.colors.green,";\n }\n }\n"),"\n\n\t\t").concat(Object(at.b)(),"\n\n\t\t").concat(Object(Ct.b)(),"\n\n\t\t").concat(Object(Et.c)(),"\n\t\t").concat("\n.device-view-mobile {\n\t\n\t.plugins-marketplace-popup-wrapper .popup-wrapper .popupContent {\n\t\twidth: 80vw;\n\t}\n}\n\n.plugins-list-loading {\n\tpadding: 60px;\n}\n.plugins-marketplace-popup-wrapper .popup-wrapper {\n\theight: 70%;\n}\n.plugins-marketplace-popup-wrapper .popup-wrapper .popupContent {\n padding: 0px 20px;\n\twidth: 50vw;\n\t// min-height: 50vh;\n\t// max-height: 70vh;\n\toverflow-y: scroll;\n}\n\n\n","\n\n\t\t").concat("\n.last-notes-component {\n padding: 0px ".concat(p.a.sizes.block,"px;\n \n h3 {\n\n }\n ul {\n height: ").concat(110,"px;\n overflow: hidden;\n &:hover {\n min-height: ").concat(110,"px;\n height: auto;\n }\n\n padding: 0px;\n margin: 0px;\n li {\n cursor: pointer;\n // margin-bottom: ").concat(Object(K.a)(-3),"px;\n margin-bottom: 4px;\n overflow: hidden;\n height: ").concat(15,"px;\n list-style: none;\n font-size:").concat(Object(K.a)(1),"px;\n font-weight: 400;\n svg, i {\n color: ").concat(p.a.colors.main,";\n margin-right: 10px;\n }\n }\n }\n}\n"),"\n\t\t").concat("\n.shortcut-component {\n\t\tmargin: 0px ".concat(p.a.sizes.block,"px;\n\t\tmargin-bottom: 10px;\n\t\toverflow: hidden;\n\t\t.rendered-note-component {\n\t\t\t\twidth: 800px;\n\t\t\t\t.preview-link {\n\t\t\t\t\t\tcolor: #585757!important;\n\t\t\t\t}\n\t\t\t\t.preview-link {\n\t\t\t\t\t\tfont-weight: 400!important;\n\t\t\t\t}\n\t\t\t\t\n\t\t}\n}\n"),"\n\t\t").concat("\n.rendered-note-component {\n\t\th3 {\n\n\t\t}\n\t\t.rendered-note-content-wrapper {\n\t\t\t".concat(Object(f.c)(),"\n\t\t\t\t&>p {\n\t\t\t\t\t\tmargin: 0px;\n\t\t\t\t\t\tpadding:0px;\n\t\t\t\t}\n\n\t\t}\n\n}\n"),"\n\n\t\t").concat("\n\n.note-preview-wrapper {\n\t\t&.preview {\n\t\t\tpadding: 15px ;\n\t\t}\n\n\t\t\n\n\t\t".concat(Object(f.b)(),"\n\t\t").concat(Object(St.b)(),"\n\n\t\t.preview-area-wrapper {\n\t\t\theight: calc(100% - 0px);\n\t\t\tmargin-top: 0px;\n\t\t}\n\n\t\t.preview-area {\n\t\t\twidth: calc(100% + ").concat("mac"===Object(r.b)()&&"0px",");\n\t\t\t// width: calc(100%);\n\t\t\t// padding-left: 22px; // for left bar\n\t\t\t// padding: 15px;\n\t\t}\n\n\t\t// .note-preview-wrapper .preview-area-wrapper\n\t\t//\n\t\t// PREVIEW\n\t\t//\n\t\t\n\t\t\n\t\t\t\t.simple-css-wrapper {\n\n\t\t\t\t.resource-link-content-wrapper ul {\n\t\t\t\t\t\topacity:1!important;\n\t\t\t\t\t\tpointer-events:all!important;\n\t\t\t\t}\n\t\t\t\tiframe {\n\t\t\t\t\t\t// height: 100%!important;\n\t\t\t\t}\n\t\t\t\t.resource-link-iframe-wrapper {\n\t\t\t\t\t\tmargin-bottom: 5px;\n\t\t\t\t}\n\t\t}\n\n\t\t.found-word {\n\t\t\t\tfont-weight: bold;\n\t\t\t\tbackground: #fff876;\n\t\t\t\tpadding: 2px;\n\t\t}\n\n\t\t\n\n\t\t//\n\t\t// EDITOR VIEW\n\t\t//\n\n\t\t&.editor,\n\t\t.window-editor-wrapper,\n\t\t.dual-view-wrapper,\n\t\t.editor-area,\n\t\t.codemirror-editor-wrapper {height: 100%}\n\n\t\t.main-editor-wrapper {height: calc(100% - 35px)}\n\n\n}\n"),"\n\t\t").concat(Object(sn.b)(),"\n\n\t\t").concat(Object(rt.b)(),"\n\t\t").concat(Object(ln.b)(t),"\n\t\t").concat(Object(un.b)(),"\n\t\t").concat(Object(An.b)(),"\n\t\t").concat(Object(Ln.b)(),"\n\t\t").concat(Object(Dn.b)(),"\n\n\t\t").concat("\n\n//\n// PANEL\n//\n// resizing handles\n.floating-panel__wrapper + div > div { z-index: 100000;}\n\n.floating-panels-wrapper {\n position: absolute;\n top: 0;\n left: 0;\n width: 100vw;\n height: 100vh;\n pointer-events: none;\n .floating-panel-wrapper {\n &.ctag-pdf {\n .floating-panel {\n .floating-panel__actions {\n top: 30px;\n right: 5px;\n }\n }\n }\n &.minimized {\n display:none;\n }\n position: absolute;\n top: 0px;\n left: 0px;\n \n .floating-panel {\n overflow: hidden;\n background: #fff;\n border: 1px solid #000;\n border-radius: 4px;\n box-shadow: 0 0 4px rgba(0,0,0,0.3);\n z-index: 1000;\n pointer-events: all;\n .floating-panel__drag-overlay {\n position: absolute;\n top: 0px;\n left: 0px;\n width: 100%;\n height: 100%;\n background: rgba(255,255,255,0.5);\n z-index: 100;\n opacity: 0.5;\n transition: 0.1s opacity;\n &.hide {\n opacity: 0;\n pointer-events: none;\n }\n &.hover-mode {\n opacity: 0.5;\n pointer-events: all;\n }\n }\n .floating-panel__actions {\n position: absolute;\n top: 4px;\n transition: 0.5s all;\n right: 40px;\n z-index:102;\n padding: 4px;\n &:hover {\n background: white;\n padding: 4px;\n box-shadow: 0px 0px 4px rgba(0,0,0,0.3);\n border-radius: 4px;\n }\n }\n .floating-panel__content {\n // overflow-y: auto;\n // overflow: hidden;\n position: absolute;\n top:0px;\n left: 0px;\n width: 100%;\n overflow: hidden;\n &.content-type-file {\n }\n }\n }\n }\n \n \n}\n\n\n//\n// BAR\n//\n.panels-minimized-bottom-bar-wrapper {\n position: absolute;\n left: left: 18px;\n width: 100vw;\n overflow: hidden;\n overflow-x: scroll;\n pointer-events: none;\n\n .panels-minimized-bottom-bar-background {\n &.pinned {\n bottom: 0px;\n }\n transition: all 0.3s ease-in-out 0.5s;\n position: fixed;\n left: 0px;\n width: 100%;\n height: 30px;\n background: #fff;\n z-index: 11;\n pointer-events: all;\n bottom: -30px;\n }\n\n .bottom-hover-bar {\n pointer-events: all;\n cursor: pointer;\n position: absolute;\n width: 150vw;\n height: 15px;\n bottom: 0px;\n box-shadow: 0 0 0px rgba(0,0,0,0.3);\n z-index: 10;\n transition: 0.5s all;\n opacity: 0;\n }\n \n &:hover {\n .panels-minimized-bottom-bar-background {\n box-shadow: 0px 0px 5px rgba(0,0,0,.2);\n bottom: 0px;\n }\n .panels-minimized-bottom-bar {\n bottom: 0px;\n \n }\n .bottom-hover-bar {\n box-shadow: 0px 0px 5px rgba(0,0,0,.2);\n background: ".concat(p.a.colors.main,";\n opacity: 0.5;\n }\n }\n\n .panels-minimized-bottom-bar{\n z-index: 11;\n pointer-events: all;\n left: 18px;\n\n // transition: all 0.3s ease-in-out 0.5s, box-shadow 0.5s ease-in-out 0s;\n transition: all 0.3s ease-in-out 0.5s;\n \n position: absolute;\n width: 100%;\n bottom: -30px;\n &.pinned {\n bottom: 0px;\n }\n height: 30px;\n background: #fff;\n display: flex;\n flex-direction: row;\n justify-content: flex-start;\n align-items: center;\n .floating-panels-bottom-toolbar {\n \n display: flex;\n flex-direction: row;\n justify-content: flex-start;\n align-items: center;\n margin-left: 10px;\n .floating-bar-toolbar {\n }\n .btn-action {\n padding: 5px;\n margin: 0px 5px;\n cursor: pointer;\n transition: 0.3s all;\n &:hover {\n background: #f0f0f0;\n }\n }\n }\n }\n}\n\n\n.panel-minimized {\n background: #c9c9c9;\n margin: 0px 0px 0px 4px;\n border-radius: 7px;\n height: 24px;\n width: 5vw;\n display: flex;\n font-size:10px;\n overflow: hidden;\n align-content: center;\n justify-content: space-around;\n padding: 0 10px;\n cursor: pointer;\n transition: 0.5s all;\n position: relative;\n :hover {\n background: #f0f0f0;\n }\n .label {\n margin-top: 5px;\n height: 14px;\n overflow: hidden;\n }\n .active-icon {\n color: rgb(121, 121, 121);\n margin: 6px 6px 0px 6px;\n\n }\n &.active-tab {\n background: #f0f0f0;\n }\n .close-btn {\n &:hover {\n background: ").concat(p.a.colors.main,";\n i {\n color: white!important;\n }\n }\n i {\n line-height: 8px;\n }\n background: rgba(0,0,0,0);\n position: relative;\n top: -2px;\n transition: 0.3s all;\n border-radius: 20px;\n padding: 5px;\n margin-top: 6px;\n line-height: 1px;\n cursor: pointer;\n left: 6px;\n }\n}\n\n//\n// Modifying style of the note preview\n//\n.floating-panel__wrapper .note-preview-wrapper .cm-mdpreview-wrapper .cm-mdpreview-image img {\n\tmax-height: none;\n}\n.floating-panel__wrapper .note-preview-wrapper.preview {\n padding: 0px\n}\n\n\n.content-block.block-tag {\n left: 0px;\n width: calc(100%)\n}\n\n"),"\n\n\t\t").concat(Object(Ft.b)(),"\n\t\t").concat(Object(f.b)(),"\n\t\t").concat(Object(St.b)(),"\n\t\t").concat(Object(yt.b)(),"\n\t\t").concat(Object(_t.b)(),"\n\n\t\t\n\t\t.config-buttons-bar {\n\t\t\tposition: fixed;\n\t\t\tz-index: 300;\n\t\t\tbackground: ").concat("mobile"===Object(r.a)()?"none":"white",";\n\t\t\tright: ").concat("mobile"===Object(r.a)()?"3px":"0px",";\n\t\t\tbottom: ").concat("mobile"===Object(r.a)()?"55px":"3px",";\n\t\t\tdisplay: ").concat("mobile"===Object(r.a)()?"block":"flex",";\n\t\t\tpadding: 0px 9px;\n\t\t\tfont-size: 10px;\n\n\t\t\t.config-button {\n\t\t\t\tfont-size: 10px;\n\t\t\t\t// margin-top: 10px;\n\t\t\t\topacity: 0.6;\n\t\t\t\ttransition: 0.2s all; \n\t\t\t\tpadding: 6px;\n\t\t\t\tcursor: pointer;\n\t\t\t\t&:hover {\n\t\t\t\t\topacity: 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\t.plugins-marketplace-button {\n\n\t\t\t}\n\t\t\t.settings-button {\n\t\t\t\t\n\t\t\t}\t\n\t\t}\n\t\t\t\n\t\t\n\n\t\t\n\t\t.main-wrapper,\n\t\t.mobile-view-container {\n\t\t\theight:100%;\n\t\t}\n\n\t\t.content-image {\n\t\t\t\twidth: 90%; \n\t\t}\n\t\t.full {\n\t\t\t\t.content-image {\n\t\t\t\t}\n\t\t}\n\n\t\t.main-wrapper {\n\t\t\t").concat("\n&.device-view-mobile {\n\t\t.folder-tree-view-component {\n\t\t\t\tli.folder-wrapper {\n\t\t\t\t\t\t.context-menu-wrapper {\n\t\t\t\t\t\t\t\tright: -10px;\n\t\t\t\t\t\t\t\t.context-menu {\n\t\t\t\t\t\t\t\t\t\tright: 5px;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t}\n}\n\n.folder-tree-view-component {\n\t\tpadding: ".concat(p.a.sizes.block,"px;\n\t\tpadding-right: 0px;\n\t\tmargin: 0px 0px 100px 0px;\n\t\twidth: calc(100% - ").concat(p.a.sizes.block*(Object(r.c)("desktop")&&!Object(r.d)()?1:2),"px);\n\n\t\tul.folder-children {\n\t\t\t\tmargin: 0px 0px 0px 0px;\n\t\t\t\tpadding: 0px 0px 0px 10px;\n\t\t}\n\n\t\t.loading {\n\t\t\tmargin-left: 30px;\n\t\t\tfont-size: 12px;\n\t\t\tfont-weight: 400;\n\t\t}\n\t\tli.folder-wrapper {\n\n\t\t\t\tposition: relative;\n\t\t\t\tlist-style: none;\n\t\t\t\tfont-size: ").concat(Object(K.a)(3),"px;\n\t\t\t\tfont-weight: 600;\n\t\t\t\tcursor: pointer;\n\n\t\t\t\t.context-menu-wrapper {\n\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\tright: 10px;\n\t\t\t\t\t\ttop: -10px;\n\t\t\t\t\t\tpadding: 10px;\n\t\t\t\t\t\tdisplay:none;\n\t\t\t\t\t\t.context-menu {\n\t\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\t\tright: 0px;\n\t\t\t\t\t\t\t\ttop: 15px;\n\t\t\t\t\t\t\t\tbackground: white;\n\t\t\t\t\t\t\t\tbox-shadow: 0px 0px 4px rgb(0 0 0 / 10%);\n\t\t\t\t\t\t\t\tcolor: black;\n\t\t\t\t\t\t\t\tpadding: 0px 0px;\n\t\t\t\t\t\t\t\twidth: 100px;\n\t\t\t\t\t\t\t\tz-index: 100;\n\t\t\t\t\t\t\t\tborder-radius: 4px;\n\t\t\t\t\t\t\t\tfont-size: ").concat(Object(K.a)(),"px;\n\t\t\t\t\t\t\t\tul {\n\t\t\t\t\t\t\t\t\t\tlist-style: none;\n\t\t\t\t\t\t\t\t\t\tpadding: 0px;\n\t\t\t\t\t\t\t\t\t\tmargin: 0px;\n\t\t\t\t\t\t\t\t\t\tli {\n\t\t\t\t\t\t\t\t\t\t\t\tpadding: 4px 11px;\n\t\t\t\t\t\t\t\t\t\t\t\t&:hover {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tbackground: ").concat(p.a.colors.main,";\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t.folder-title:hover > .context-menu-wrapper {\n\t\t\t\t\t\tcursor:pointer;\n\t\t\t\t\t\tdisplay:block;\n\t\t\t\t}\n\t\t\t\t&.current > .folder-title {\n\t\t\t\t\t\tcolor: ").concat(p.a.colors.main,";\n\t\t\t\t\t\ttext-decoration: underline;\n\t\t\t\t}\n\t\t\t\t.folder-title {\n\t\t\t\t\t\tposition: relative;\n\n\t\t\t\t\t\t.title-label {\n\t\t\t\t\t\t\t\tposition: relative;\n\t\t\t\t\t\t\t\tz-index: 0;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t.title-drag-bg {\n\t\t\t\t\t\t\t\tborder-radius: 5px;\n\t\t\t\t\t\t\t\tpadding: 5px;\n\t\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\t\twidth: calc(100% - 8px);\n\t\t\t\t\t\t\t\theight: 100%;\n\t\t\t\t\t\t\t\ttop: -4px;\n\t\t\t\t\t\t\t\tz-index: -1;\n\t\t\t\t\t\t\t\tleft: -5px;\n\t\t\t\t\t\t\t\ttransition: 50ms;\n\t\t\t\t\t\t\t\tbackground: rgba(255,255,255,0);\n\t\t\t\t\t\t\t\tz-index:0;\n\t\t\t\t\t\t\t\tpointer-events: none;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t&.drag .title-drag-bg {\n\t\t\t\t\t\t\t\tbackground: rgba(255,255,255,0.6);\n\t\t\t\t\t\t\t\tpointer-events: all;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tpadding: 1px;\n\t\t\t\t\t\tposition:relative;\n\t\t\t\t\t\tpadding-left: 20px;\n\t\t\t\t\t\t.icon {\n\t\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\t\tleft: 2px;\n\t\t\t\t\t\t\t\tcursor: pointer;\n\t\t\t\t\t\t\t\tpadding: 1px;\n\t\t\t\t\t\t\t\ttop: 0px;\n\t\t\t\t\t\t\t\tsvg {\n\t\t\t\t\t\t\t\t\t\tcolor: ").concat(p.a.colors.main,";\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t}\n\t\t}\n\t\t\n}\n"),"\n\t\t\tdisplay: flex;\n\t\t\t.no-file {\n\t\t\t\t\ttext-align: center;\n\t\t\t\t\tmargin-top: 49vh;\n\t\t\t}\n\n\t\t\t////////////////////////////////////////////v \n\t\t\t// LEFT 1\n\t\t\t////////////////////////////////////////////v\n\t\t\t\n\t\t\t").concat("\n .new-file-button {\n ".concat(p.a.els().redButton,"\n ").concat(p.a.font.main,";\n padding: ").concat(Object(r.c)("desktop")?"14px 5px":"13px 7px",";\n margin: 13px 15px 15px 15px;\n\t\t\t\twidth: calc(100% - 30px); \n font-size: ").concat((Object(r.c)("desktop"),11),"px;\n .icon-wrapper {\n margin-right: ").concat(Object(r.c)("desktop")?"10px":"5px",";\n }\n\t\t\n \n }\n"),"\n\n\t\t\t\n\t\t\t \n\n\n\t\t\t&.without-sidebar.device-view-desktop {\n\t\t\t\t\t.left-sidebar-indicator {\n\t\t\t\t\t\t\ttransition: 0.5s all;\t\n\t\t\t\t\t\t\t&:hover {\n\t\t\t\t\t\t\t\tbackground: ").concat(p.a.colors.main,";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdisplay: block;\n\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\ttop: 0%;\n\t\t\t\t\t\t\tz-index:100;\n\t\t\t\t\t\t\twidth: 18px;\n\t\t\t\t\t\t\theight: 100vh;\n\t\t\t\t\t\t\tbackground: rgb(236, 236, 236);\n\t\t\t\t\t\t\tbox-shadow: 0px 0px 5px rgba(0,0,0,.2);\n\t\t\t\t\t\t\tmargin: 0% 0px;\n\t\t\t\t\t\t\tborder-radius: 0px 5px;\n\t\t\t\t\t\t\t.left-wrapper {\n\t\t\t\t\t\t\t\t\tbox-shadow: 0px 0px 5px rgba(0,0,0,.2);\n\t\t\t\t\t\t\t\t\ttransition: 0.2s all;\n\t\t\t\t\t\t\t\t\ttransition-delay: 500ms, 0ms;\n\t\t\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\t\t\tleft: -").concat(Wn.desktop.l,"vw;\n\t\t\t\t\t\t\t\t\ttop: 0px;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t.left-sidebar-indicator:hover {\n\t\t\t\t\t\t\t.left-wrapper {\n\t\t\t\t\t\t\t\t\tleft: 0vw;\n\t\t\t\t\t\t\t\t\ttop: 0px;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t}\n\n\t\t\t.invisible-scrollbars {\n\t\t\t\t\twidth: 100%;\n\t\t\t\t\tpadding-right: 18px;\n\t\t\t\t\toverflow-y: scroll;\n\t\t\t\t\theight: ").concat("desktop"===Object(r.a)()?"100vh":"calc(100vh - 48px)","; \n\t\t\t}\n\n\t\t\t.left-wrapper {\n\t\t\t\tbackground: ").concat(Un.l2.bg,"; \n\t\t\t\t.left-wrapper-1 {\n\t\t\t\t\toverflow: hidden;\n\t\t\t\t\tbackground-image: url('").concat(p.a.assets.decoBgMap,"');\n\t\t\t\t\tbackground-color: ").concat(p.a.colors.bgInterface2,";\n\t\t\t\t\tbackground-blend-mode: color-burn;\n\t\t\t\t\tcolor: ").concat(p.a.colors.fontInterface2,";\n\t\t\t\t\twidth: ").concat(Wn.desktop.l1,'%;\n\t\t\t\t\theight:100vh;\n\t\t\t\t\tposition: relative;\n\n\n\t\t\t\t\th3.subtitle {\n\t\t\t\t\t\tmargin: 0px 0px 15px;\n\t\t\t\t\t\tfont-family: "Open sans", sans-serif;\n\t\t\t\t\t\ttext-transform: uppercase;\n\t\t\t\t\t\tfont-size: 14px;\n\t\t\t\t\t\tfont-weight: 800;\n\t\t\t\t\t\tfont-style: italic;\n\t\t\t\t\t\tcolor: ').concat(Un.main,";\n\t\t\t\t\t}\n\t\t\t\t}\n\n\n\t\t\t\t////////////////////////////////////////////v \n\t\t\t\t// TEXT VIEW : LEFT 2\n\t\t\t\t////////////////////////////////////////////v2\n\t\t\t\t.left-wrapper-2 {\n\t\t\t\t\t\twidth: ").concat(Wn.desktop.l2,"%;\n\t\t\t\t\t\theight:100vh;\n\t\t\t\t\t\toverflow: hidden;\n\t\t\t\t\t\tbackground: ").concat(p.a.colors.bgInterface,";\n\n\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t.top-files-list-wrapper {\n\t\t\t\t\t\t\t\tpadding-top: ").concat(Wn.search.padding,"px;\n\t\t\t\t\t\t\t\theight: ").concat(Wn.search.h,"px;\n\t\t\t\t\t\t\t\t.subtitle-wrapper {\n\t\t\t\t\t\t\t\t\t\tposition: relative;\n\t\t\t\t\t\t\t\t\t\tdisplay: flex;\n\t\t\t\t\t\t\t\t\t\t.folder-wrapper {\n\t\t\t\t\t\t\t\t\t\t\t\tpadding: 2px 16px 10px 20px;\n\t\t\t\t\t\t\t\t\t\t\t\t/* margin-top: 4px; */\n\t\t\t\t\t\t\t\t\t\t\t\tfont-weight: bold;\n\t\t\t\t\t\t\t\t\t\t\t\tcolor: #aeadad;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t.toggle-sidebar-btn {\n\t\t\t\t\t\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\t\t\t\t\t\tright: 10px;\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\th3.subtitle {\n\t\t\t\t\t\t\t\t\t\t\t\tmargin: 0px ").concat(Wn.block,"px ").concat(Wn.block,"px ").concat(Wn.block,"px; \n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t.counter {\n\t\t\t\t\t\t\t\t\t\t\t\tmargin: 0px;\n\t\t\t\t\t\t\t\t\t\t\t\tmargin-top: 2px;\n\t\t\t\t\t\t\t\t\t\t\t\tcolor: ").concat(Un.l2.text,";\n\t\t\t\t\t\t\t\t\t\t\t\tfont-size: ").concat(Object(K.a)(),"px;\n\t\t\t\t\t\t\t\t\t\t\t\tfont-weight: 800;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\n\t\t\t\t}\n\n\t\t\t\t\n\n\t\t\t\t\n\t\t\t\t\n\n\t\t\t\t.files-list-component {\n\t\t\t\t\t\tposition: relative\n\t\t\t\t}\n\n\t\t\t\t.list-toolbar {\n\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\ttop: -93px;\n\t\t\t\t\t\tright: 23px;\n\t\t\t\t\t\tcolor: ").concat(Un.l2.text,";\n\t\t\t\t\t\tbutton {\n\t\t\t\t\t\t\t\tcolor: ").concat(Un.l2.text,";\n\t\t\t\t\t\t\t\t").concat(Hn().button,"\n\t\t\t\t\t\t\t\tpadding: 0px;\n\t\t\t\t\t\t\t\tmargin-right: ").concat(Wn.block,"px; \n\t\t\t\t\t\t\t\tfont-size: ").concat(Object(K.a)(),"px;\n\t\t\t\t\t\t\t\tcursor: pointer;\n\t\t\t\t\t\t\t\tspan {\n\t\t\t\t\t\t\t\t\t\tmargin-right: 5px;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t.items-list-count {\n\t\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\t\tcolor: grey;\n\t\t\t\t\t\t\t\tfont-size: ").concat(Object(K.a)(),"px;\n\t\t\t\t\t\t\t\tright: 10px;\n\t\t\t\t\t\t\t\ttop: 5px;\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t").concat("\n.list-wrapper {\n .list-wrapper-scroller{\n height: 100%;\n width: calc(100% + 20px);\n overflow-y:scroll;\n overflow: hidden;\n }\n\n .mobile-buttons-up-down {\n position: fixed;\n right: 0px;\n z-index: 10;\n top: 50%;\n div {\n background: #d6d6d6;\n padding: 10px;\n color:white;\n cursor: pointer;\n }\n }\n\n div.List {\n list-style: none;\n margin-right:20px;\n padding: 0px 0px 0px 0px;\n &.multiselect-mode {\n\t\t\t\t\t\tli .label {\n\t\t\t\t\t\t\t\tmargin-left: 4px;\n\t\t\t\t\t\t}\n }\n\n // NORMAL\n li {\n\t\t\tmax-width:calc(100% - 47px);\n padding: ".concat(X.l2.fileLi.padding,"px ").concat(X.block-X.l2.fileLi.margin,"px;\n margin: ").concat(X.l2.fileLi.margin,"px ").concat(X.l2.fileLi.margin+5,"px ").concat(X.l2.fileLi.margin,"px ").concat(X.l2.fileLi.margin,"px ;\n display: block;\n cursor: pointer;\n position: relative;\n height: ").concat(X.l2.fileLi.height,"px;\n overflow: hidden;\n border: 2px rgba(0,0,0,0) solid;\n \n // ACTIVE\n &:hover,\n &.multiselected,\n &.active {\n }\n\n display: flex;\n justify-content: center;\n\t\t\t\t\t\t&.active .background-item-border,\n\t\t\t\t\t\t&.active .background-item {\n\t\t\t\t\t\t\t\twidth: 100%;\n\t\t\t\t\t\t\t\theight: 100%;\n\t\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\t\ttop: 0px;\n\t\t\t\t\t\t\t\tleft: 0px;\n\t\t\t\t\t\t\t\tbackground: ").concat(p.a.colors.main,";\n\t\t\t\t\t\t\t\tborder-radius: 5px;\n\t\t\t\t\t\t\t\tz-index: -1;\n\t\t\t\t\t\t\t\topacity: 0.2;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t&.active .background-item-border {\n\t\t\t\t\t\t\t\twidth: calc(100% - 4px);\n\t\t\t\t\t\t\t\theight: calc(100% - 4px);\n\t\t\t\t\t\t\t\tbackground: none;\n\t\t\t\t\t\t\t\tborder: 2px ").concat(p.a.colors.main," solid;\n\t\t\t\t\t\t\t\topacity: 0.3;\n\t\t\t\t\t\t}\n \n\t\t\t\t\t\th3 {\n\t\t\t\t\t\t\t\tfont-size: 12px;\n\t\t\t\t\t\t}\n .left {\n\t\t\t\t\t\t\t\t// width: calc(100% - ").concat(X.l2.fileLi.img,"px - 10px);\n\t\t\t\t\t\t\t\twidth: 100%;\n\t\t\t\t\t\t\t\tpadding-right: 10px;\n\n\t\t\t\t\t\t\t\tdisplay:flex;\n\t\t\t\t\t\t\t\tflex-direction:column;\n\n\t\t\t\t\t\t\t\t.label {\n\t\t\t\t\t\t\t\t\t\tmargin: 0px;\n\t\t\t\t\t\t\t\t\t\tmax-height: 35px;\n\t\t\t\t\t\t\t\t\t\t//height: 46px;\n\t\t\t\t\t\t\t\t\t\t// display: flex;\n\t\t\t\t\t\t\t\t\t\t// align-items: center;\n\t\t\t\t\t\t\t\t\t\tmargin-bottom: 2px;\n\t\t\t\t\t\t\t\t\t\toverflow: hidden;\n\t\t\t\t\t\t\t\t\t\ttext-overflow: ellipsis;\n\t\t\t\t\t\t\t\t\t\tcolor: ").concat(Z.l2.title,";\n\t\t\t\t\t\t\t\t\t\tline-break: anywhere;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t.content {\n\t\t\t\t\t\t\t\t\t\tcolor: grey;\n\t\t\t\t\t\t\t\t\t\tmargin-bottom: 3px;\n\t\t\t\t\t\t\t\t\t\theight: 25px;\n\t\t\t\t\t\t\t\t\t\tfont-size: 9px;\n\t\t\t\t\t\t\t\t\t\toverflow: hidden;\n\t\t\t\t\t\t\t\t\t\tline-break: anywhere;\n\t\t\t\t\t\t\t\t\t\tword-break: break-word;\n\t\t\t\t\t\t\t\t\t\t").concat(Object(r.c)("desktop")?"":"max-height: 25px;","\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t.date {\n\t\t\t\t\t\t\t\t\t\tcolor: ").concat(Z.l2.date,";\n\t\t\t\t\t\t\t\t\t\tfont-size: ").concat(Object(K.a)(),"px;\n\t\t\t\t\t\t\t\t\t\tfont-weight: 700;\n\t\t\t\t\t\t\t\t}\n }\n\n .right {\n\t\t\t\t\t\t\t\t.picture {\n\t\t\t\t\t\t\t\t\t\twidth: ").concat(X.l2.fileLi.img,"px;\n\t\t\t\t\t\t\t\t\t\theight: ").concat(X.l2.fileLi.img,"px;\n\t\t\t\t\t\t\t\t\t\tbackground-size: cover;\n\t\t\t\t\t\t\t\t\t\tz-index: 1;\n\t\t\t\t\t\t\t\t\t\tmargin-top: 3px;\n\t\t\t\t\t\t\t\t\t\tborder-radius: 5px;\n\t\t\t\t\t\t\t\t\t\tborder: 2px white solid;\n\t\t\t\t\t\t\t\t}\n }\n }\n }\n}\n"),"\n\t\t\t}\n\t\t\t////////////////////////////////////////////v \n\t\t\t// IMAGE GALLERY VIEW\n\t\t\t////////////////////////////////////////////v\n\t\t\t.right-wrapper.image-gallery-view {\n\t\t\t\t\tbackground: ").concat(Un.l2.bg,"; \n\t\t\t\t\t.image-gallery-header {\n\t\t\t\t\t\t\tpadding-top: ").concat(Wn.search.padding,"px;\n\t\t\t\t\t\t\theight: ").concat(Wn.gallery.topH,"px;\n\n\t\t\t\t\t\t\t.search-bar-component {\n\t\t\t\t\t\t\t\t\t// padding: 10px 0px;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t.image-gallery-component-wrapper {\n\t\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t}\n\t\t\t////////////////////////////////////////////v \n\t\t\t// TEXT VIEW : RIGHT\n\t\t\t////////////////////////////////////////////v \n\t\t\t").concat("\n\n.tab-list-wrapper-hover {\n\t.top-hover-bar {\n\t\tcursor: pointer;\n\t\theight: 14px;\n\t\twidth: 100%;\n\t\tposition: absolute;\n\t\topacity: 0;\n\t\ttransition: 0.5s all;\n\t}\n\t&:hover {\n\t\t.top-hover-bar {\n\t\t\tbackground: ".concat(p.a.colors.main,";\n\t\t\topacity: 0.5;\n\t\t}\n\t}\n\ttransition: 0.5s all;\n\tposition: absolute;\n z-index: 22;\n\twidth: 100%;\n\t&.pinned {\n\t\tposition: initial;\n\t\t.top-hover-bar { display:none}\n\t}\n\t&.unpinned {\n\t\t.tab-list-scroll-wrapper {\n\t\t\tbox-shadow: 0px 0px 5px rgba(0,0,0,0.3);\n\t\t}\n\t}\n\t&:hover {\n\t\t.tab-list-scroll-wrapper {\n\t\t\ttop: 0px!important;\n\t\t}\n\t}\n}\n\n.tab-list-scroll-wrapper {\n\t\n\tposition: absolute;\n\theight: 44px;\n\twidth: 100%;\n\ttransition: all 0.3s ease-in-out;\n\ttransition-delay: 500ms, 0ms;\n\tbackground: ").concat(p.a.colors.bgTabs,";\n border-radius: 0px 0px 0px 5px;\n\t\toverflow: hidden;\n\t\t.tab-list-invisible-scroll {\n\t\t\t\twidth: 100%;\n\t\t\t\toverflow-x: scroll;\n\t\t\t\tpadding-bottom: 18px;\n\t\t\t\t.tab-list-wrapper {\n\t\t\t\t\t\tpadding: 7px 0px 0px 13px;\n\t\t\t\t\t\tdisplay: flex;\n\t\t\t\t\t\tbackground: ").concat(p.a.colors.bgTabs,";\n\t\t\t\t\t\tborder-radius: 0px 0px 0px 5px;\n\t\t\t\t\t\tposition: relative;\n\t\t\t\t\t\t&>div:last-child {\n\t\t\t\t\t\t\t\tmargin-right: 30px;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t.tab-and-drag-wrapper {\n\t\t\t\t\t\t\t\tposition:relative;\n\t\t\t\t\t\t\t\t.drag-indic {\n\t\t\t\t\t\t\t\t\t\tz-index: 2;\n\t\t\t\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\t\t\t\ttop: -8px;\n\t\t\t\t\t\t\t\t\t\tleft: -6px;\n\t\t\t\t\t\t\t\t\t\twidth: 20px;\n\t\t\t\t\t\t\t\t\t\theight: 20px;\n\t\t\t\t\t\t\t\t\t\tcolor: #aaaaaa;\n\t\t\t\t\t\t\t\t\t\tfont-size: 8px;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t.tab-wrapper {\n\t\t\t\t\t\t\t\tposition: relative;\n\t\t\t\t\t\t\t\talign-items:center;\n\t\t\t\t\t\t\t\tdisplay:flex;\n\t\t\t\t\t\t\t\tmargin-right: 5px;\n\t\t\t\t\t\t\t\tpadding: 5px;\n\t\t\t\t\t\t\t\tbackground: ").concat(p.a.colors.bgTab,";\n\t\t\t\t\t\t\t\tdisplay: flex;\n\t\t\t\t\t\t\t\tcolor: ").concat(p.a.colors.fontTab,";\n\t\t\t\t\t\t\t\tfont-family: ").concat(p.a.font.editor,";\n\t\t\t\t\t\t\t\theight: 35px;\n\t\t\t\t\t\t\t\tbox-shadow:rgb(0 0 0 / 20%) 0px -1px 2px ;\n\t\t\t\t\t\t\t\tborder-radius: 5px 5px 0px 0px;\n\t\t\t\t\t\t\t\tjustify-content: space-between;\n\t\t\t\t\t\t\t\tmax-height: 27px;\n\t\t\t\t\t\t\t\toverflow: hidden;\n\t\t\t\t\t\t\t\ttext-align: center;\n\t\t\t\t\t\t\t\t.tab-nb-windows {\n\t\t\t\t\t\t\t\t\t\tmargin-left: 10px;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t.active-ribbon {\n\t\t\t\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\t\t\t\ttop: 0px;\n\t\t\t\t\t\t\t\t\t\tleft: 0px;\n\t\t\t\t\t\t\t\t\t\twidth: 100%;\n\t\t\t\t\t\t\t\t\t\theight: 2px;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t&.active {\n\t\t\t\t\t\t\t\t\t\t.active-ribbon {\n\t\t\t\t\t\t\t\t\t\t\t\tbackground: ").concat(p.a.colors.main,";\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\tbackground: ").concat(p.a.colors.bgTabActive,";\n\t\t\t\t\t\t\t\t\t\tfont-weight: bold\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t&.tab-more {\n\t\t\t\t\t\t\t\t\t\tmin-width: 30px;\n\t\t\t\t\t\t\t\t\t\twidth: 30px;\n\t\t\t\t\t\t\t\t\t\tmax-width: 30px;\n\t\t\t\t\t\t\t\t\t\tcursor: pointer;\n\t\t\t\t\t\t\t\t\t\tfont-weight: bold;\n\t\t\t\t\t\t\t\t\t\tfont-family: ").concat(p.a.font.main,";\n\t\t\t\t\t\t\t\t\t\tdisplay:flex;\n\t\t\t\t\t\t\t\t\t\twidth: 100%;\n\t\t\t\t\t\t\t\t\t\tfont-size:14px;\n\t\t\t\t\t\t\t\t\t\tjustify-content: center;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t.tab-name {\n\t\t\t\t\t\t\t\t\t\tpadding: 10px 0px 10px 10px;\n\n\t\t\t\t\t\t\t\t\t\tinput {\n\t\t\t\t\t\t\t\t\t\t\t\tcolor:").concat(p.a.colors.fontTab," ;\n\t\t\t\t\t\t\t\t\t\t\t\tfont-size:").concat(Object(K.a)(1),"px;\n\t\t\t\t\t\t\t\t\t\t\t\tbackground: none;\n\t\t\t\t\t\t\t\t\t\t\t\tborder: none;\n\t\t\t\t\t\t\t\t\t\t\t\tmin-width: 30px;\n\t\t\t\t\t\t\t\t\t\t\t\tmax-width: 100px;\n\t\t\t\t\t\t\t\t\t\t\t\tfont-weight: 400;\n\t\t\t\t\t\t\t\t\t\t\t\tfont-family: ").concat(p.a.font.editor,";\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t.tab-nb-windows {\n\t\t\t\t\t\t\t\t\t\tpadding: 10px 0px 10px 0px;\n\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t.tab-close {\n\t\t\t\t\t\t\t\t\t\tcursor: pointer;\n\t\t\t\t\t\t\t\t\t\tmargin-left: 5px;\n\t\t\t\t\t\t\t\t\t\ttransform: rotate(45deg);\n\t\t\t\t\t\t\t\t\t\tcursor: pointer;\n\t\t\t\t\t\t\t\t\t\tmargin-left: 5px;\n\t\t\t\t\t\t\t\t\t\tpadding: 5px;\n\t\t\t\t\t\t\t\t\t\tfont-weight: bold;\n\t\t\t\t\t\t\t\t\t\tfont-family: ").concat(p.a.font.main,";\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t}\n}\n"),"\n\t\t\t").concat(Object(wt.b)(),"\n\n\t\t\t").concat(Object(Q.b)(),"\n\t\t\t").concat(Object(vt.b)(),'\n\n\t\t\t&.without-sidebar.device-view-desktop {\n\t\t\t\t\t.right-wrapper.draggable-grid-editors-view {\n\t\t\t\t\t\t\twidth: calc(100vw - 18px);\n\t\t\t\t\t\t\tmargin-left: 18px;\n\t\t\t\t\t}\n\t\t\t}\n\t\t}// end main-wrapper\n\t\t.preview-content {\n\t\t\t\tcounter-reset: h2counter;\n\t\t\th1 {\n\t\t\t\tcounter-reset: h2counter;\n\t\t\t}\n\t\t\th2:before {\n\t\t\t\tcontent: counter(h2counter) ".\\0000a0\\0000a0";\n\t\t\t\tcounter-increment: h2counter;\n\t\t\t\tcounter-reset: h3counter;\n\t\t\t}\n\t\t\th3:before {\n\t\t\t\tcontent: counter(h2counter) "." counter(h3counter) ".\\0000a0\\0000a0";\n\t\t\t\tcounter-increment: h3counter;\n\t\t\t}\n\t\t}\n\t\n\t');return n(),Object(u.a)(s,";","")},Kn=function(t,n,e,o){var i=Object(xn.a)("CssAppDynamic"+t+n),c="\n\t\t// IMPORTANT for all height app\n\t\theight:100%;\n\t\t".concat(Object(d.c)(t),"\n\t\t").concat(Object(dn.b)(t,o),"\n\t\t.draggable-grid-editors-view {\n\t\t\twidth: ").concat("desktop"===Object(r.a)()?p.a.sizes.desktop.r:"navigator"!==t?100:0,"vw;\n\t\t\theight: ").concat("desktop"===Object(r.a)()?"calc(100vh - ".concat(o.bottomBar?"30":"10","px)"):"100%",";\n\t\t\tdisplay: ").concat("desktop"===Object(r.a)()||"navigator"!==t?"block":"none",";\n\t\t\tpadding-top: 0px;\n\t\t\th3 {\n\t\t\t\tmargin-bottom: 0px;\n\t\t\t}\n\t\t\tpre {\n\t\t\t\t\twhite-space: -moz-pre-wrap; /* Mozilla, supported since 1999 */\n\t\t\t\t\twhite-space: -pre-wrap; /* Opera */\n\t\t\t\t\twhite-space: -o-pre-wrap; /* Opera */\n\t\t\t\t\twhite-space: pre-wrap; /* CSS3 - Text module (Candidate Recommendation) http://www.w3.org/TR/css3-text/#white-space */\n\t\t\t\t\tword-wrap: break-word; /* IE 5.5+ */\n\t\t\t}\n\t\t}\n\t\t.main-wrapper {\n\t\t\t////////////////////////////////////////////v \n\t\t\t// TEXT VIEW : RIGHT\n\t\t\t////////////////////////////////////////////v \n\t\t\t").concat(Object(wt.d)(o),"\n\t\t\t.left-wrapper {\n\t\t\t\twidth: ").concat("desktop"===Object(r.a)()?Wn.desktop.l:"navigator"!==t?0:100,"vw;\n\t\t\t\tdisplay: ").concat("desktop"===Object(r.a)()?"flex":"navigator"!==t?"none":"flex",";\n\t\t\t}\n\t\t} // end main-wrapper\n");return i(),Object(u.a)(c,";","")},Gn=function(t){return t.path.substr(0,t.path.length-(t.title.length+1))},Yn=function(t){var n=t.split("/");(n=n.filter((function(t){return""!==t}))).pop();var e="/"+n.join("/")+"/";return e=e.replaceAll("//","/")},$n="\n<style>\n.popupContent p {\n\t\tbackground: #dadada;\n padding: 3px 5px;\n\t\tmargin: 0px 4px;\n\t\tdisplay: inline-block;\n}\n</style>\n",Zn=function(t,n,e,o){var i=function(t,n){console.log("[MOVEFILE] ".concat(t," -> ").concat(n)),Object(x.e)().then((function(e){e.file.move(t,n,(function(){e&&e.ui.browser.goTo(e.ui.browser.folders.current.get())}))}))};return{askForMoveFile:i,promptAndBatchMoveFiles:function(n){var e=n.files,o=n.folderToDropInto,c="Move <p>".concat(null===e||void 0===e?void 0:e.length,'</p> file(s) to <p>"').concat(o.key,'"</p>?\n<br>\n<br>\nRessources links will be automatically updated<br>\n').concat($n,"\n");Object(x.d)((function(n){n.popup.confirm(c,(function(){!function(){for(var n=0;n<e.length;n++){var c=e[n],a="".concat(c.path),r="".concat(o.key,"/").concat(c.name);i(a,r),t()}}()}))}))},promptAndMoveFolder:function(e){var o=Object(s.a)({},e),i=o.folder,c=o.folderToDropInto,a=o.folderBasePath,r=o.newTitle,l=o.renameOnly,u=[i.path,"".concat(l?Gn(c):c.path,"/").concat(r||i.title)],p="".concat(a,"/").concat(u[0]),d="".concat(a,"/").concat(u[1]),f="\n".concat(E.a.moveFolderPrompt," <p>").concat(u[0],"</p> to <p>").concat(u[1],"</p>?\n").concat($n,"\n"),b=function(){!function(t,n,cb){console.log("[MOVEFOLDER] ".concat(t," -> ").concat(n)),Object(x.d)((function(e){e.folders.move(t,n,(function(){e&&e.ui.browser.goTo(e.ui.browser.folders.current.get()),cb&&cb()}))}))}(p,d,(function(){t(),n(),e.onMoveFn&&e.onMoveFn()}))};e.disablePrompt?b():Object(x.e)().then((function(t){t.popup.confirm(f,(function(){b()}))}))}}},Xn=e(227),Qn="[LAST FILE]",te=O.a.client.log.verbose,ne=function(t){var n=Object(Bt.a)("files-history",[],{history:!1,debouncedSave:5e3}),e=Object(c.a)(n,3),a=e[0],r=e[1],l=e[2],s=i.a.useRef(a);Object(o.useEffect)((function(){s.current=a}),[a]),Object(o.useEffect)((function(){te&&console.log(Qn," activeFile changed!",t),t&&u(t)}),[t]);var u=function(t){te&&console.log(Qn,"Add to history",t.name);var n=s.current;if(!(n.length>0&&n[0].name===t.name)){var e=!0,o=-1,i=n;!1===Object(ot.a)(n)&&(i=[]);for(var c=0;c<n.length;c++)n[c].name===t.name&&(e=!1,o=c);e||i.splice(o,1),(i=i.slice(0,400)).unshift(t),r(i)}},p=Object(pt.a)(u,300),d={getAll:function(){return a},removeFile:function(t){console.log("".concat(Qn," removing ").concat(t," from last notes"));var n=Object(F.a)(a);n=n.filter((function(n){return n.path!==t})),r(n)},addToHistory:function(t){!(arguments.length>1&&void 0!==arguments[1])||arguments[1]?p(t):u(t)}};return{filesHistory:a,filesHistoryRef:s,cleanLastFilesHistory:function(){r([])},refreshFilesHistoryFromBackend:l,lastFilesHistoryApi:d}},ee=function(){var t=Object(o.useState)(!1),n=Object(c.a)(t,2),e=n[0],i=n[1],a=Object(o.useState)(0),r=Object(c.a)(a,2),l=r[0],s=r[1],u=Object(o.useRef)(0);return Object(o.useEffect)((function(){var t=Object(A.a)((function(){u.current=u.current+1,s(l+1),i(!0),setTimeout((function(){i(!1)}),200)}),200);return window.addEventListener("resize",(function(){t()})),function(){window.removeEventListener("resize",(function(){t()}))}}),[]),{forceResponsiveRender:e,frr:u,responsiveRefreshCounter:l,setResponsiveRefresh:s}},oe=e(155),ie=e(233),ce=e(89),ae=function(t){var n=Object(o.useState)({}),e=Object(c.a)(n,2),i=e[0],r=e[1];Object(o.useEffect)((function(){}),[t.files]);var l=Object(o.useReducer)((function(t){return t+1}),0),s=Object(c.a)(l,2)[1],u=Object(o.useState)(2),d=Object(c.a)(u,2),f=d[0],b=d[1];Object(o.useEffect)((function(){Object(x.d)((function(t){b(t.userSettings.get("ui_filesList_sortMode"))}))}),[]);return Object(a.c)("div",{className:"files-list-component"},Object(a.c)("div",{className:"list-toolbar"},Object(a.c)("button",{type:"button",title:"sort",onClick:function(){var n=f+1>=J.a.length?0:f+1;Object(x.d)((function(e){e.userSettings.set("ui_filesList_sortMode",n),b(n),t.onSortFiles(Object(J.d)(t.files,n))}))}},Object(a.c)("span",null,t.files.length>0&&Object(a.c)("span",{className:"list-count"},"(",t.files.length,")"),J.b[f]),Object(a.c)(C.a,{name:"faSort",color:p.a.colors.l2.text}))),Object(a.c)("div",{className:"list-wrapper"},Object(a.c)(Y,{files:t.files,filesPreview:i,hoverMode:!1,activeFileIndex:t.activeFileIndex,sortMode:f,onFileClicked:function(n){t.onFileClicked(n)},onFileDragStart:t.onFileDragStart,onFileDragEnd:t.onFileDragEnd,onVisibleItemsChange:function(t){!function(t){for(var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],e=[],o=0;o<t.length;o++){var c=t[o];i[c]&&!n||e.push(c)}e.length>1&&Object(x.d)((function(t){t.files.getPreviews(e,(function(t){Object(Pt.a)(t,(function(t){i[t.path]=t})),r(i),s()}))}))}(t,!0)}})))},re=function(){var t="[NOTE HISTORY] ",n=O.a.client.log.verbose,e=Object(o.useRef)({}),i=function(){return(new Date).getTime()},c=function(e,o,i){n&&console.log("".concat(t," saveNoteHistory ").concat(e)),l.b.emit("createHistoryFile",{filePath:e,content:o,historyFileType:i,token:Object(B.b)()})};return{save:c,intervalSave:function(o,a){var r=e.current[o];(!r||r&&r+6e4<i())&&(n&&console.log("".concat(t," ").concat(o,", time ").concat(1," expired/inexistand, PROCEED BACKUP")),c(o,a,"int"),e.current[o]=i())}}},le=function(t){var n=Object(o.useState)(!1),e=Object(c.a)(n,2),i=e[0],a=e[1],r=Object(o.useState)([]),l=Object(c.a)(r,2),u=l[0],p=l[1];return{isConnected:t.isConnected,searching:{get:i,set:a},ipsServer:{get:u,set:p,getLocal:function(){var t=u[0];return Object(Pt.a)(u,(function(n){n.startsWith("192.168")&&(t=n)})),t}},refresh:Object(s.a)(Object(s.a)({},t.refresh),{},{increment:function(){t.refresh.set(t.refresh.get+1)}})}},se=e(132),ue="[PWA]",pe=O.a.client.log.verbose,de=function(){pe&&console.log(ue," init"),"serviceWorker"in navigator&&navigator.serviceWorker.register("/service-worker.js"),window.addEventListener("beforeinstallprompt",(function(t){t.preventDefault(),pe&&console.log(ue," beforeinstallprompt WORKING=>",t),window.deferredPrompt=t}))},fe=e(235),be=e(30),ge=function(){var t=[];return window.speechSynthesis.getVoices().forEach((function(n,e){var o=n.lang?" (".concat(n.lang,")"):"",i="".concat(n.name).concat(o);t.push({key:e,label:i,obj:n})})),t},he=Object(N.a)((function t(n){var e=this;Object(I.a)(this,t),this.rawText=void 0,this.voice=void 0,this.text2read=void 0,this.chunkedText=void 0,this.chunkLength=1e3,this.currChunkId=0,this.currSpeechObj=void 0,this.speed=1,this.isLoaded=!1,this.shouldStop=!1,this.chunkText=function(t){for(var n=(t=t.replace(/(\r\n\r\n|\n\n|\r\r|\n)/gm,".")).split(/[.!?]+/),o=[],i=0;i<n.length;i++){var c=n[i];if(c.length>e.chunkLength)for(var a=c.split(" "),r="",l=0;l<a.length;l++)((r+=a[l]+" ").length>e.chunkLength||l===a.length-1)&&(o.push(r),r="");else o.push(c)}return o},this.loadVoice=function(t){console.log("[TTS] LOAD VOICE",t),e.voice=t,e.pause(),e.play()},this.updateSpeed=function(t){e.speed=t,e.pause(),e.play()},this.play=function(){if(e.isLoaded)window.speechSynthesis.resume();else{if(e.currChunkId>e.chunkedText.length-1)return console.log("[TTS] finished played");e.isLoaded=!0,e.currSpeechObj=new SpeechSynthesisUtterance,e.currSpeechObj.text=e.chunkedText[e.currChunkId],e.currSpeechObj.rate=e.speed,e.voice&&(e.currSpeechObj.voice=e.voice),setTimeout((function(){window.speechSynthesis.speak(e.currSpeechObj)}),0),e.currSpeechObj.addEventListener("end",(function(){e.isLoaded=!1,e.shouldStop?e.shouldStop=!1:(e.currChunkId+=1,e.play())}))}},this.isPlaying=function(){var t=window.speechSynthesis.speaking;return t&&(t=!window.speechSynthesis.paused),t},this.pause=function(){e.stop()},this.stop=function(){e.shouldStop=!0,e.isLoaded=!1,e.debounceReinitStop(),window.speechSynthesis.cancel()},this.debounceReinitStop=Object(A.a)((function(){e.shouldStop=!1}),1e3),this.goToChunk=function(t){t<=0||t>e.chunkedText.length-1||(e.currChunkId=t,e.isPlaying()&&e.debounceRestart())},this.extractToChunkPos=function(t){var n=e.chunkText(t),o=null;if(Object(Pt.a)(n,(function(t){if(t.length>50)return o=t,!1})),!o)return-1;var i=-1;return Object(Pt.a)(e.chunkedText,(function(t,n){if(-1!==t.indexOf(o))return i=n,!1})),i},this.getCurrentChunkText=function(){return e.chunkedText[e.currChunkId]},this.debounceRestart=Object(A.a)((function(){e.stop(),e.play()}),500),this.goBack=function(){e.goToChunk(e.currChunkId-1)},this.goForward=function(){e.goToChunk(e.currChunkId+1)},this.rawText=n.text,this.text2read=n.text.replace(be.a.ressource,"").replace(be.a.ref,"").replace(be.a.baliseHtml,"").replace(/<[^>]*>?/gm," ").replace(/((&lt;!--).+?(--&gt;))/gm," ").replace(/(<!--).+?(-->)/gm," ").replace(/(\r\n|\n|\r)/gm," ").replace(/(\r\n|\n|\r)/gm," "),this.chunkedText=this.chunkText(this.text2read),console.log("[TTS] init new manager ",{p:n,text:this.chunkedText,length:this.chunkedText.length})})),me=e(34),ve=e(52),we="[SCREEN WAKE LOCK]",Oe=null,je=function(){var t=Object(ve.a)(Object(me.a)().mark((function t(){return Object(me.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,navigator.wakeLock.request("screen");case 3:Oe=t.sent,console.log(we,"ACTIVE"),t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),console.log(we,"Error : ".concat(t.t0.name,", ").concat(t.t0.message));case 10:case"end":return t.stop()}}),t,null,[[0,7]])})));return function(){return t.apply(this,arguments)}}();var xe=function(t){var n=Object(o.useState)(!1),e=Object(c.a)(n,2),i=e[0],l=e[1],s=Object(h.a)("tts-selected-voice",0),u=Object(c.a)(s,2),p=u[0],d=u[1],f=Object(o.useState)(!1),b=Object(c.a)(f,2),g=b[0],m=b[1],v=function(t){!0===t?je():Oe&&Oe.release().then((function(){Oe=null,console.log(we,"DISABLED")})),m(t)},w=Object(h.a)("tts-pos-".concat(t.id),0),O=Object(c.a)(w,2),j=O[0],x=O[1],y=Object(h.a)("tts-rate",1),_=Object(c.a)(y,2),S=_[0],T=_[1],I=Object(o.useState)(0),N=Object(c.a)(I,2),P=N[0],R=N[1],A=Object(o.useState)(""),F=Object(c.a)(A,2),L=F[0],M=F[1];Object(o.useEffect)((function(){var t=function(t){var n=0,e="".concat(Math.ceil(t),"m");if(t>60){n=Math.floor(t/60);Math.ceil(t%60);e="".concat(n,"h")}return e},n=t(6*(P-j)/(60*S)),e=t(6*P/(60*S)),o=" ".concat(n," left of ").concat(e);M(o)}),[P,S,j]);var z=Object(o.useRef)();window.tts=z,Object(o.useEffect)((function(){z.current=new he({text:t.fileContent}),z.current.goToChunk(j)}),[]),Object(o.useEffect)((function(){z.current.updateSpeed(S)}),[S]);var D=Object(o.useRef)(!1);return k((function(){l(z.current.isPlaying());var n=-1;(n=0!==z.current.currChunkId?z.current.currChunkId:z.current.currChunkId=1,t.startString&&!D.current)&&(n=z.current.extractToChunkPos(t.startString),z.current.goToChunk(n),D.current=!0);-1!==n&&x(n),R(z.current.chunkedText.length)}),500),Object(o.useEffect)((function(){var n=z.current.getCurrentChunkText();t.onUpdate({totalChunks:P,currentChunk:j,isPlaying:i,currentText:n})}),[P,j,i]),Object(a.c)(ke,null,Object(a.c)(rt.a,{title:"".concat(E.a.ttsPopup.title),onClose:function(){z.current.stop(),t.onUpdate({totalChunks:P,currentChunk:j,isPlaying:!1}),t.onClose()}},Object(a.c)(at.a,{value:p,type:"select",list:ge(),label:E.a.ttsPopup.voice,onSelectChange:function(t){!function(t){d(t);var n=ge();n[p]&&z.current.loadVoice(n[p].obj)}(parseInt(t))}}),Object(a.c)("span",null," SPEED : "),Object(a.c)("input",{className:"speed-range",type:"range",value:S,min:"0",max:"3",step:"0.1",onChange:function(t){var n=t.target.value;T(n)}})," (",S,")",Object(a.c)("br",null),Object(a.c)("br",null),Object(a.c)("b",null," SENTENCES : "),Object(a.c)("input",{type:"number",className:"text-pos",value:j,min:"0",max:P,onChange:function(t){var n=parseInt(t.target.value);z.current.goToChunk(n),x(n)}})," / ",P,Object(a.c)("br",null),Object(a.c)("input",{type:"range",value:j,className:"range-pos",min:"0",max:P,onChange:function(t){var n=parseInt(t.target.value);z.current.goToChunk(n),x(n)}}),Object(a.c)("div",{className:"estimated-time"},Object(a.c)("b",null,"Reading Time")," :",L),Object(a.c)("div",{className:"buttons"},Object(a.c)("button",{onClick:function(t){z.current.goBack()}},Object(a.c)(C.a,{name:"faFastBackward",color:"black"})),Object(a.c)("button",{onClick:function(t){i||z.current.goToChunk(j),i?z.current.stop():z.current.play()}},Object(a.c)(C.a,{name:i?"faPause":"faPlay",color:"black"})),Object(a.c)("button",{onClick:function(t){z.current.goForward()}},Object(a.c)(C.a,{name:"faFastForward",color:"black"})),"desktop"!==Object(r.a)()&&Object(a.c)("button",{onClick:function(t){v(!0)}},Object(a.c)(C.a,{name:"faLock",color:"black"})))),g&&Object(a.c)("div",{className:"bg-lock"},Object(a.c)("button",{onContextMenu:function(t){v(!1)}},Object(a.c)(C.a,{name:"faUnlock",color:"black"}))))},ke=Object(fe.a)("div",{target:"e1kwupat0"})({name:"13zwzvp",styles:".bg-lock{position:fixed;top:0px;left:0px;width:100vw;height:100vh;z-index:100005;background:rgba(0,0,0,0.3);display:flex;justify-content:center;align-items:center;button{}}.popup-wrapper .popupContent{padding:20px;.input-component span,span{display:inline-block;width:30%;font-size:12px;font-weight:bold;}.speed-range{position:relative;top:8px;}.range-pos{width:100%;margin-bottom:10px;}.text-pos{width:50px;margin-bottom:10px;}}.buttons{display:flex;padding:20px 0px 0px 0px;button{width:30%;padding:10px;}}"}),ye=function(){var t=Object(o.useState)(!1),n=Object(c.a)(t,2),e=n[0],i=n[1],a=Object(o.useState)(null),r=Object(c.a)(a,2),l=r[0],s=r[1],u=Object(o.useState)(null),p=Object(c.a)(u,2),d=p[0],f=p[1],b=Object(o.useState)(""),g=Object(c.a)(b,2),h=g[0],m=g[1],v=Object(o.useRef)(null);return{ttsApi:{open:function(t,n){var e=(n=n||{}).id?n.id:null,o=n.startString?n.startString:null;console.log("[TTS API]","open",{id:e,content:t,startString:o}),s(e),o&&f(o),m(t),i(!0)},close:function(){i(!1)},getStatus:function(cb){v.current&&cb(v.current)}},ttsPopupContent:h,ttsPopupId:l,ttsPos:d,setTtsPopup:i,ttsPopup:e,syncTtsStatus:function(t){v.current=t}}},_e=function(){var t=Object(o.useState)(null),n=Object(c.a)(t,2),e=n[0],i=n[1];return{notePreviewPopupApi:{open:function(t,n,e){var o=n[0],c=n[1];gn+o>window.innerWidth&&(o-=Math.abs(window.innerWidth-gn-o-10)),hn+c>window.innerHeight&&(c-=Math.abs(window.innerHeight-hn-c-10)),"50%"===o&&(o="calc(50% - ".concat(gn/2,"px)")),"50%"===c&&(c="calc(50% - ".concat(gn/2,"px)")),i({isOpen:!0,filepath:t,position:n=[o,c],opts:e})},close:function(){i(null)}},notePreviewPopup:e,setNotePreviewPopup:i}},Ce=e(39),Ee=e(166),Se=e(128);window.location.pathname.startsWith("/public_site")?Object(Se.b)(Object(a.c)((function(){Object(o.useEffect)((function(){de(),console.log("========= [APP PUBLIC] MOUNTED on a ".concat(Object(r.a)())),Object(l.d)().then((function(t){Object(x.d)((function(n){n.status.ipsServer.set(t.ipsServer),n.ui.browser.folders.refreshFromBackend()}))}))}),[]);var t=_(),n=t.isConnected,e=(t.connectionStatusComponent,t.toggleSocketConnection,ee()),i=(e.forceResponsiveRender,e.responsiveRefreshCounter),c=e.setResponsiveRefresh,s=le({isConnected:n,refresh:{get:i,set:c}}),u=Object(oe.b)(),p=(u.tabs,u.updateTab,u.refreshTabsFromBackend,u.updateActiveTabGrid,u.refreshWindowGrid,u.tabsApi),d=u.windowsApi,f=Object(ce.b)(),b=f.lightboxApi,g=(f.lightboxImages,f.lightboxIndex,mt()),h=(g.PromptPopupComponent,g.popupApi),m=re(),v=ye(),O=v.ttsApi,j=(v.ttsPos,v.ttsPopup,v.setTtsPopup,v.ttsPopupContent,v.ttsPopupId,v.syncTtsStatus,_e()),k=j.notePreviewPopupApi,y=(j.notePreviewPopup,Object(x.f)({popupApi:h,tabsApi:p,windowsApi:d,statusApi:s,historyApi:m,notePreviewPopupApi:k,lightboxApi:b,ttsApi:O})),C=y,E=C.ui.browser.files,S=C.ui.browser.folders,T=(S.scan,S.clean,S.base,ne(E.active.get)),I=(T.filesHistory,T.filesHistoryRef,T.cleanLastFilesHistory,T.refreshFilesHistoryFromBackend,T.lastFilesHistoryApi);C.lastNotesApi=I;var N=Zn((function(){E.active.set(-1)}),(function(){y.ui.browser.files.set([])})),P=(N.askForMoveFile,N.promptAndMoveFolder,N.promptAndBatchMoveFiles,w());return P.mobileView,P.setMobileView,P.MobileToolbarComponent,window.api=C,Object(a.c)("div",null,"hello world public app",window.location.pathname)}),null),document.getElementById("root")):Object(Se.b)(Object(a.c)((function(){Object(o.useEffect)((function(){return setTimeout((function(){console.log(qt,"starting frontendBackgroundPlugins Cron"),setInterval((function(){Kt()}),6e4)}),Object(g.a)(1e3,1e4)),de(),console.log("========= [APP] MOUNTED on a ".concat(Object(r.a)())),Object(l.d)().then((function(t){G(!0),At&&At.status.ipsServer.set(t.ipsServer),Object(x.d)((function(t){t.ui.browser.folders.refreshFromBackend()}))})),t(),window.onkeydown=function(t){var n=q(t);Object(H.a)(U[n])||(U[n]=!0);var e="".concat(n,"-down");V[e]&&V[e]()},window.onkeyup=function(t){var n=q(t);Object(H.a)(U[n])||(U[n]=!1);var e="".concat(n,"-up");V[e]&&V[e]()},Object(Wt.a)("init","init",(function(){})),function(){console.log("app will unmount")}}),[]);var t=function(){setTimeout((function(){Object(st.d)(nn)}),300)},n=function(){Ft.active.set(-1)},e=function(){Rt.ui.browser.files.set([])},u=function(t){var n=Object(o.useState)(!1),e=Object(c.a)(n,2),r=e[0],s=e[1],u=Object(o.useState)(""),p=Object(c.a)(u,2),d=p[0],f=p[1],b=Object(o.useState)(""),g=Object(c.a)(b,2),h=g[0],m=g[1],v=Object(o.useState)(""),w=Object(c.a)(v,2),j=w[0],x=w[1],k=Object(o.useState)(),y=Object(c.a)(k,2),_=y[0],C=y[1],S="[SETUP CONFIG]",T=O.a.client.log.verbose,I=Object(o.useRef)(0);return Object(o.useEffect)((function(){return T&&console.log(S," init socket listener"),I.current=l.b.on("getSetupInfos",(function(n){"SUCCESS_CONFIG_CREATION"===n.code?(C(["success","".concat(E.a.setupForm.successReload)]),setTimeout((function(){window.location.reload()}),3e3)):"ASK_SETUP"===n.code?(t.cleanAllApp(),s(!0),n.defaultFolder&&x(n.defaultFolder)):C(["error","".concat(n.code,": ").concat(n.message)])})),function(){T&&console.log(S," clean socket listener"),l.b.off(I.current)}}),[]),{displayWelcomePopup:r,SetupPopupComponent:function(t){return Object(a.c)(i.a.Fragment,null,r&&Object(a.c)("div",{className:"setup-popup-component"},Object(a.c)(rt.a,{title:"Welcome to Tiro",onClose:function(){}},Object(a.c)("p",null,E.a.setupForm.introText)," ",Object(a.c)("br",null),Object(a.c)("div",null,Object(a.c)(at.a,{value:d,label:E.a.setupForm.user,explanation:E.a.setupForm.userExplanation,onChange:function(t){f(t)},shouldNotSelectOnClick:!0}),Object(a.c)(at.a,{value:h,label:E.a.setupForm.password,type:"password",explanation:E.a.setupForm.passwordExplanation,onChange:function(t){m(t)},shouldNotSelectOnClick:!0}),Object(a.c)(at.a,{value:j,label:E.a.setupForm.dataFolder,explanation:E.a.setupForm.folderExplanation,onChange:function(t){x(t)},shouldNotSelectOnClick:!0}),Object(a.c)("input",{type:"button",value:"submit",className:"submit-button",onClick:function(t){C(void 0),l.b.emit("sendSetupInfos",{form:{user:d,password:h,dataFolder:j},token:Object(B.b)()})}}),_&&Object(a.c)("div",{className:_[0]},_[1])))))}}}({cleanAllApp:function(){console.log("[cleanAllApp]"),Vt(),zt(),n(),e()}}).SetupPopupComponent,d=Object(B.d)({onLoginAsked:function(){console.log("[cleanListAndFileContent]"),n(),e()},onLoginSuccess:function(){v(),yn(),Jt(),Object(x.d)((function(t){t.userSettings.refreshUserSettingsFromBackend(),t.ui.floatingPanel.refreshFromBackend()})),Object(x.d)((function(t){t.ui.browser.folders.refreshFromBackend()})),Mt(["/"]),t()}}).LoginPopupComponent,f=Object(oe.b)(),h=f.tabs,m=f.updateTab,v=f.refreshTabsFromBackend,j=f.updateActiveTabGrid,k=f.refreshWindowGrid,y=f.tabsApi,S=f.windowsApi,I=Object(o.useState)(0),N=Object(c.a)(I,2),P=N[0],R=N[1],A=y.active.get(),F=mt(),L=F.PromptPopupComponent,M=F.popupApi,z=_(),D=z.isConnected,W=z.connectionStatusComponent,G=z.toggleSocketConnection,Y=ee(),$=Y.forceResponsiveRender,Z=Y.responsiveRefreshCounter,X=Y.setResponsiveRefresh,Q=Object(o.useRef)([]),tt=Object(o.useState)(null),et=Object(c.a)(tt,2),ot=et[0],it=et[1];Object(o.useEffect)((function(){setTimeout((function(){}),2e3)}),[]);var ut=Object(ce.b)(),pt=ut.lightboxApi,bt=ut.lightboxImages,ht=ut.lightboxIndex,vt=ye(),wt=vt.ttsApi,jt=vt.ttsPos,xt=vt.ttsPopup,kt=vt.setTtsPopup,yt=vt.ttsPopupContent,_t=vt.ttsPopupId,Ct=vt.syncTtsStatus,St=le({isConnected:D,refresh:{get:Z,set:X}}),Tt=re(),It=_e(),Nt=It.notePreviewPopupApi,Pt=It.notePreviewPopup,Rt=Object(x.f)({popupApi:M,tabsApi:y,windowsApi:S,statusApi:St,historyApi:Tt,notePreviewPopupApi:Nt,lightboxApi:pt,ttsApi:wt}),At=Rt,Ft=At.ui.browser.files,Lt=At.ui.browser.folders,Mt=Lt.scan,zt=Lt.clean,Dt=Lt.base,Ht=ne(Ft.active.get),Ut=Ht.filesHistory,Vt=(Ht.filesHistoryRef,Ht.cleanLastFilesHistory),Jt=Ht.refreshFilesHistoryFromBackend,Yt=Ht.lastFilesHistoryApi;At.lastNotesApi=Yt;var $t=Zn(n,e),Zt=($t.askForMoveFile,$t.promptAndMoveFolder),Xt=$t.promptAndBatchMoveFiles,Qt=w(),tn=Qt.mobileView,nn=Qt.setMobileView,en=Qt.MobileToolbarComponent;window.api=At;var on=Object(o.useState)(!1),an=Object(c.a)(on,2),ln=an[0],sn=an[1],un=Object(o.useState)(!1),dn=Object(c.a)(un,2),fn=dn[0],gn=dn[1];Object(o.useEffect)((function(){return ft("alt + spacebar",(function(){sn(!0),gn(!0)})),ft("esc",(function(){sn(!1)})),function(){dt&&dt.bind&&dt.releaseAllKeys()}}),[Ut]),Object(o.useEffect)((function(){if("mobile"!==Object(r.a)())return Object(Ee.a)("/favicon.png");Object(st.e)(h,tn)}),[h,tn]);var hn=$?0:1,mn=At.userSettings.refresh.css.get+hn,vn=At.userSettings,wn=function(){var t=Object(Bt.a)("interface-pin-element-status",{topTab:!1,bottomBar:!1}),n=Object(c.a)(t,3),e=n[0],i=n[1],a=n[2];return Object(o.useEffect)((function(){a()}),[]),{pinStatus:e,updatePinStatus:function(t){return function(n){i(Object(s.a)(Object(s.a)({},e),{},Object(Ce.a)({},t,n)))}},togglePinStatus:function(t){return function(){i(Object(s.a)(Object(s.a)({},e),{},Object(Ce.a)({},t,!e[t])))}},refreshPinStatus:a}}(),On=wn.pinStatus,xn=wn.updatePinStatus,kn=wn.togglePinStatus,yn=wn.refreshPinStatus,_n=Object(o.useState)(void 0),Cn=Object(c.a)(_n,2),En=Cn[0],Sn=Cn[1],Tn=Gt.d.curr.ui_layout_background_video_width,In=Gt.d.curr.ui_layout_background_video_height;return Object(o.useEffect)((function(){var t=Gt.d.curr.ui_layout_background_video_enable,n=Gt.d.curr.ui_layout_background_image;t&&n&&Sn(n)}),[mn,vn]),Object(a.c)("div",{className:Vn(vn)},Object(a.c)("div",{className:qn(tn,mn,vn,On)},En&&Object(a.c)(zn,{url:En,width:Tn,height:In}),Object(a.c)("div",{className:" ".concat("mobile"===Object(r.a)()?"mobile-view-container mobile-view-".concat(tn):"")},Object(a.c)(x.a.Provider,{value:Rt},Object(a.c)("div",{className:"config-buttons-bar"},At.userSettings.get("beta_plugins_marketplace")&&Object(a.c)("div",{className:"config-button plugins-marketplace-button",onClick:function(){it("plugins-marketplace")}},Object(a.c)(C.b,{name:"puzzle-piece"})),"mobile"!==Object(r.a)()&&Object(a.c)("div",{className:"config-button search-button",onClick:function(){gn(!0),sn(!0)}},Object(a.c)(C.b,{name:"search"})),Object(a.c)("div",{className:"config-button settings-button",onClick:function(){it("settings")}},Object(a.c)(C.b,{name:"cog"}))),(null===Pt||void 0===Pt?void 0:Pt.isOpen)&&Object(a.c)(bn,{notePreview:Pt}),ln&&Object(a.c)(cn,{show:fn,lastNotes:Ut,onClose:function(t){sn(!1)},onHide:function(t){gn(!1)}}),Object(a.c)(a.a,{styles:Object(a.b)("*{-webkit-print-color-adjust:exact!important;color-adjust:exact!important;}*:focus{outline:none;}body{margin:0;padding:0px;background:",p.a.colors.bg.light,";font-size:",Object(K.a)(1),"px;font-family:",p.a.font.main,";}html,body{height:100vh;overflow:hidden;background:",p.a.colors.bgInterface,";}#root{height:100%;}button,input{font-family:",p.a.font.main,";font-weight:700;color:",p.a.colors.l2.title,";}","\n@page {\n margin: 0;\n padding: 0;\n}\n\n.main-wrapper,\n#root,\n.print-body {\n\t// position: absolute;\n// top: 22px;\n\t\t// height: 1000vh;\n\t\t// overflow: auto;\n}\n\n.print-wrapper {\n\t\tz-index: 10000000000000;\n\t\tbackground-color: white;\n\t\toverflow: hidden;\n width: 100%!important;\n\t\theight: 1000vh!important;\n position: fixed;\n top: 0;\n left: 0;\n margin: 0;\n padding: 15px;\n font-size: 14px;\n line-height: 18px;\n\t\tmargin-top: 0px!important;\n\t\tdisplay: block!important;\n}\n/* .print-wrapper { */\n/* \t\tz-index: 10000000000000; */\n/* \t\ttop: 0px; */\n/* \t\tleft: 0px; */\n/* \t\tposition: fixed; */\n/* \t\twidth: 100%!important; */\n/* \t\t/* height: 100vh; */ */\n/* } */\n\n"," body{position:relative;}","")}),Object(a.c)("div",{role:"dialog",className:"main-wrapper ".concat(At.userSettings.get("ui_sidebar")?"with-sidebar":"without-sidebar"," device-view-").concat(Object(r.a)())},L(),d({}),u({}),W(),en({forceRerender:$,onButtons:[function(){gn(!0),sn(!0)}]}),Object(a.c)("div",{className:"left-sidebar-indicator"},Object(a.c)("div",{className:"left-wrapper"},Object(a.c)("div",{className:"left-wrapper-1"},Object(a.c)("div",{className:"invisible-scrollbars"},Object(a.c)(T,{onNewFile:function(){Object(x.d)((function(t){var n=t.ui.browser.folders.current.get();t.file.create(n,(function(e){var o=Object(J.c)(e);o&&t.ui.browser.goTo(n,o.name,{openIn:"activeWindow"})}))}))}}),At.userSettings.get("ui_layout_shortcuts_panel")&&Object(a.c)(rn,{filePath:".tiro/shortcuts.md",onClick:function(){}}),Object(a.c)(ct,{files:Ut,onClick:function(t){Rt.ui.browser.goTo(t.folder,t.name,{openIn:"active"})}}),Object(a.c)(nt,{openFolders:Lt.open.get(),folder:Lt.get(),current:Lt.current.get(),onFolderClicked:function(t){Rt.ui.browser.goTo(t,null)},onFolderMenuAction:function(t,n,e){"rename"===t&&e?Zt({folder:n,folderToDropInto:n,folderBasePath:Dt,newTitle:e,renameOnly:!0,disablePrompt:!0,onMoveFn:function(){Mt([Yn(n.path)],{cache:!1,cb:function(){}})}}):"create"===t&&e?Object(x.d)((function(t){t.folders.create("".concat(n.path,"/").concat(e),(function(t){Mt([n.path],{cache:!1})}))})):"moveToTrash"===t?Zt({folder:n,folderToDropInto:se.b,folderBasePath:Dt,newTitle:"".concat(n.title,"_").concat(Object(Xn.a)().full_file),onMoveFn:function(){Mt([Yn(n.path),n.path],{cache:!1,cb:function(){Lt.open.add(n.path)}})}}):"delete"===t&&(Object(se.a)("trash"),setTimeout((function(){Mt([n.path],{cache:!1})})))},onFolderOpen:function(t){Mt([t],{cache:!1})},onFolderClose:function(t){},onFolderDragStart:function(t){console.log("[DRAG MOVE] onFolderDragStart",t),Q.current=[{type:"folder",folder:t}]},onFolderDragEnd:function(){console.log("[DRAG MOVE] onFolderDragEnd"),Q.current=[]},onFolderDrop:function(t){!function(t){console.log("[DRAG MOVE] processDragDropAction ->",Q.current,t);var n=Q.current[0];"file"===n.type&&n.files?Xt({files:n.files,folderToDropInto:t}):"folder"===n.type&&n.folder&&Zt({folder:n.folder,folderToDropInto:t,folderBasePath:Dt,disablePrompt:!0,onMoveFn:function(){if(n.folder){var e=n.folder.path,o=t.path;Mt([Yn(e),Yn(o),o,e],{cache:!1,cb:function(){Lt.open.add(e),Lt.open.add(o),Lt.open.add(Yn(e)),Lt.open.add(Yn(o))}})}}})}(t)}}))),Object(a.c)("div",{className:"left-wrapper-2"},Object(a.c)("div",{className:"top-files-list-wrapper"},Object(a.c)("div",{className:"subtitle-wrapper"},Object(a.c)("div",{className:"folder-wrapper"},At&&At.ui.browser.folders.current.get(),!At.ui.browser.folders.current.get()&&"/"),"mobile"!==Object(r.a)()&&Object(a.c)("div",{className:"toggle-sidebar-btn"},Object(a.c)(b.a,{popup:!1,buttons:[{title:"Toggle Sidebar",action:function(t){Object(x.d)((function(t){t.userSettings.set("ui_sidebar",!t.userSettings.get("ui_sidebar"))})),k()},active:!0===Rt.userSettings.get("ui_sidebar")}],colors:["#d4d1d1","#615f5f"],size:.8}))),Object(a.c)(lt,{term:Rt.ui.search.term.get})),Object(a.c)("div",{className:"files-list-wrapper"},Object(a.c)(ae,{files:Ft.get,activeFileIndex:Ft.active.getIndex,onSortFiles:function(t){Rt.ui.browser.files.set(t)},onFileClicked:function(t){Ft.active.set(t);var n=Ft.get[t];At.tabs.active.get()?S.active.setContent(n):At.tabs.openInNewTab(n)},onFileDragStart:function(t){console.log("[DRAG MOVE] onFileDragStart",t),Q.current=[{type:"file",files:t}]},onFileDragEnd:function(){console.log("[DRAG MOVE] onFileDragEnd"),Q.current=[]}}))))),Object(a.c)("div",{className:"right-wrapper draggable-grid-editors-view"},"mobile"!==Object(r.a)()&&Object(a.c)(Ot,{tabs:h,onUpdate:m,onPinToggle:kn("topTab"),pinStatus:On.topTab}),A&&Object(a.c)(ie.b,{tab:A,forceRefresh:P,onGridUpdate:function(t){j(t),R(P+1)},mobileView:tn,pinStatus:On})),Gt.d.curr.beta_floating_windows&&Object(a.c)(Rn,{panels:At.ui.floatingPanel.panels,pinStatus:On.bottomBar,onPinChange:xn("bottomBar")}),"plugins-marketplace"===ot&&Object(a.c)(jn,{onClose:function(){it(null)}}),"settings"===ot&&Object(a.c)(Et.a,{onClose:function(){it(null)}})))),Object(a.c)(pn,null),bt.length>0&&Object(a.c)(gt,{images:bt,startingIndex:ht,onClose:Rt.ui.lightbox.close}),xt&&Object(a.c)(xe,{id:_t,fileContent:yt,startString:jt,onUpdate:function(t){Ct(t)},onClose:function(){kt(!1)}})))}),null),document.getElementById("root"))},60:function(t,n,e){"use strict";e.d(n,"a",(function(){return s}));var o=e(5),i=e(0),c=e(17),a=e(11),r=e(55),l=e(32);function s(t,n,e){var s=Object(i.useState)(n),u=Object(o.a)(s,2),p=u[0],d=u[1],f="/".concat(c.a.path.configFolder,"/").concat(c.a.path.backendStateFolder,"/").concat(t,".md");'[BACKEND STATE] "'.concat(t,'" clientApi not loaded! Persistance system will not work correctly');Object(i.useEffect)((function(){var cb=null!==e&&void 0!==e&&e.onInitialRefresh?e.onInitialRefresh:void 0;g(cb)}),[]);var b=Object(l.a)((function(t){Object(a.d)((function(n){n.history.save(f,t,"int")}))}),6e4),g=function(cb){Object(a.d)((function(n){n.file.getContent(f,(function(n){var o=JSON.parse(n);!0===(null===e||void 0===e?void 0:e.debug)&&console.log("[BACKEND STATE] refreshValFromBackend: ".concat(t," => "),o),d(o),cb&&cb(o)}))}))};return[p,function(n){var o=Object(r.a)(n);d(Object(r.a)(o)),!0===(null===e||void 0===e?void 0:e.debug)&&console.log("[BACKEND STATE] setValue: ".concat(t," => "),o);var i=JSON.stringify(o),c=!(null===e||void 0===e||!e.debouncedSave)&&(null===e||void 0===e?void 0:e.debouncedSave),l=!0===(null===e||void 0===e?void 0:e.debouncedSaveWithThrottle);Object(a.d)((function(t){t.file.saveContent(f,i,{debounced:c,withThrottle:l})})),!0===(null===e||void 0===e?void 0:e.history)&&b(i)},g]}},63:function(t,n,e){"use strict";e.d(n,"a",(function(){return f}));var o=e(17),i=e(167),c=e(31),a={};window.dbscroll=a,Object(c.a)("syncscroll","get_db",(function(){return a}));o.a.client.log.verbose;var r=function(t){var n=document.querySelector(".window-id-".concat(t," .preview-area")),e=document.querySelector(".window-id-".concat(t," .cm-scroller")),o=document.querySelector(".window-id-".concat(t," .scrolling-bar-wrapper"));return a[t]||(a[t]={els:{preview:n,editor:e,scroller:o},dims:{editor:{viewport:0,full:0},preview:{viewport:0,full:0},scroller:{viewport:0,full:0}},posPercent:0,previewOffsetY:0}),a[t].els.preview=n,a[t].els.editor=e,a[t].els.scroller=o,a[t]},l=function(t){var n,e,o=r(t),i=o.dims.editor.viewport/o.dims.editor.full||1e7,c=o.dims.preview.viewport/o.dims.preview.full||1e7,a=i<c?i:c,l=(null===(n=o.els.scroller)||void 0===n?void 0:n.clientHeight)||0,s=a*l,u={viewport:s=s>l?l:s,full:l};o.dims.scroller=u;var p=null===(e=o.els.scroller)||void 0===e?void 0:e.dataset;p&&(p.scrollRefresh||(p.scrollRefresh=1),p.scrollRefresh=parseInt(p.scrollRefresh)+1)},s=function(t,n){var e;i.a[t]=!1;var o=r(t);n||(n=o.posPercent);var c=null===(e=o.els.scroller)||void 0===e?void 0:e.dataset;c&&(c.scrollRefresh||(c.scrollRefresh=1),c.scrollRefresh=parseInt(c.scrollRefresh)+1)},u=function(t,n){i.a[t]=!1;var e=r(t);if(e.els.editor){var o=e.dims.editor;n||(n=e.posPercent);var c=(o.full-o.viewport)/100;e.els.editor.scrollTop=c*n}},p=function(t,n){i.a[t]=!1;var e=r(t);if(e.els.preview){var o=e.dims.preview;n||(n=e.posPercent);var c=o.full/100,a=Math.round(c*n);e.els.preview.scrollTop=a+e.previewOffsetY}},d=function(t,n){var e=r(t),o=e.dims.preview.full/100,i=n-Math.round(o*e.posPercent);e.previewOffsetY=i},f={getScrollObj:r,updateEditorDims:function(t,n){var e=r(t);e.els.editor&&(e.dims.editor=n)},updatePreviewDims:function(t){var n=r(t);if(n.els.preview){var e=n.els.preview.querySelector(".preview-area-full-height-content"),o=e.clientHeight-e.parentNode.clientHeight,i=n.els.preview.clientHeight;n.dims.preview={viewport:i,full:o},n.dims.preview={viewport:i,full:o}}},updateScrollerDims:l,updatePreviewOffset:d,onEditorScroll:function(t,n){var e=r(t);e.els.editor&&(e.posPercent=n,s(t,n),p(t,n))},onScrollerScroll:function(t,n){r(t).posPercent=n,u(t,n),p(t,n)},onPreviewScroll:function(t){var n=r(t),e=n.els.preview.scrollTop;d(t,e),n.posPercent=e/n.dims.preview.full*100,u(t,n.posPercent),s(t,n.posPercent)},onWindowLoad:function(t){if(a[t]){var n=r(t).posPercent;l(t),s(t,n),u(t,n),p(t,n)}},scrollEditor:u,scrollPreview:p,scrollScroller:s}},65:function(t,n,e){"use strict";e.d(n,"b",(function(){return o})),e.d(n,"a",(function(){return i})),e.d(n,"c",(function(){return c}));var o=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"_";return(t=i(t,[["-",n],["_",n],[" ",n],["/",n]])).replace(/[^\w\s]/gi,"")},i=function(t,n){for(var e=0;e<n.length;e++){var o=n[e];t=t.split(o[0]).join(o[1])}return t};function c(t,n){for(var e=t.split("\n"),o=n.split("\n"),i=Math.max(e.length,o.length),c=[],a=0;a<i;a++)void 0!==e[a]&&void 0!==o[a]?e[a]!==o[a]?c.push('<span class="diff-sign diff-modified">~~~</span> '+o[a]):c.push(o[a]):void 0!==e[a]&&void 0===o[a]?c.push('<span class="diff-sign diff-deleted">---</span> '+e[a]):void 0===e[a]&&void 0!==o[a]&&c.push('<span class="diff-sign diff-added">+++</span> '+o[a]);return c.join("\n")}},66:function(t,n,e){"use strict";e.d(n,"a",(function(){return i})),e.d(n,"c",(function(){return c})),e.d(n,"b",(function(){return a}));var o=e(19),i=function(t){var n=((new Date).getTime()-t.getTime())/1e3,e=604800,i="";if(n<=3600)i="".concat(Math.ceil(n/60)," ").concat(o.a.minsAgo);else if(n>3600&&n<=86400)i="".concat(Math.ceil(n/3600)," ").concat(o.a.hoursAgo);else if(n>86400&&n<=e)i="".concat(Math.ceil(n/86400)," ").concat(o.a.daysAgo);else if(n>e){var c=("0"+t.getDate()).slice(-2),a=o.a.months[t.getMonth()],r=t.getFullYear().toString();i="".concat(c," ").concat(a," ").concat(r)}return i},c=function(t){t||(t=(new Date).getTime());var n=new Date(t);return[n.getFullYear(),n.getMonth()+1,n.getDate()]},a=function(t){var n=(new Date).getTime();return"lastMonth"===t&&(n=n-432e5),n}},67:function(t,n,e){"use strict";e.d(n,"a",(function(){return l})),e.d(n,"b",(function(){return s}));var o=e(134),i=e(170),c=e(0),a=e(24),r=e(1),l=function(t){var n,e=Object(c.useRef)(),a=function(){t.shouldFocus&&e.current.focus()};Object(c.useEffect)((function(){a()}),[t.shouldFocus]),Object(c.useEffect)((function(){a()}),[]);var l="checkbox"===t.type&&(!0===t.value||"true"===t.value),s=t.value;Object(i.a)(s)&&(s="");return Object(r.c)("div",{className:"input-component-wrapper ".concat(t.style?Object(o.a)(t.style,";",""):"")},Object(r.c)("div",{className:"input-component ".concat(t.id?t.id:""," ").concat(t.type)},t.label&&Object(r.c)("span",{onClick:function(n){"checkbox"===t.type&&(e.current.checked=!e.current.checked,t.onChange&&t.onChange(e.current.checked))}},t.label," "),Object(r.c)("div",{className:"input-wrapper"},"select"!==t.type&&"textarea"!==t.type&&Object(r.c)("input",{ref:e,type:t.type?t.type:"text",value:s,checked:l,readOnly:t.readonly,max:t.max,min:t.min,onFocus:function(){t.onFocus&&t.onFocus()},onClick:function(){!t.shouldNotSelectOnClick&&e.current.select()},onKeyPress:function(n){"Enter"==(n.code||n.key)&&t.onEnterPressed&&t.onEnterPressed()},onChange:function(n){t.onCheckedChange&&t.onCheckedChange(n.target.checked),function(n){var e=n;"number"===t.type&&(e=parseInt(e),t.max&&e>t.max&&(e=t.max),t.min&&e<t.min&&(e=t.min),e=e.toString()),t.onChange&&t.onChange(e)}(n.target.value)}}),"select"===t.type&&Object(r.c)("select",{value:s,onChange:function(n){t.onSelectChange&&t.onSelectChange(n.target.value)}},null===(n=t.list)||void 0===n?void 0:n.map((function(t,n){return Object(r.c)("option",{value:t.key},t.label," ")}))),"textarea"===t.type&&Object(r.c)("textarea",{defaultValue:s,onChange:function(n){t.onChange&&t.onChange(n.target.value)}}),t.explanation&&Object(r.c)("div",{className:"explanation"}," ",t.explanation," "))))},s=function(){return"\n .input-component {\n display: flex;\n align-items: center;\n padding-bottom: 10px;\n input, select {\n max-width: 100%;\n }\n &.select {\n span {\n width: 20%;\n }\n }\n span {\n width: 30%;\n font-weight: 700;\n text-transform: uppercase;\n }\n .input-wrapper {\n // width: 70%;\n input {\n padding: 7px;\n border: none;\n\t\t\t\tfont-size:".concat(Object(a.a)(1),"px;\n background: #ececec;\n border-radius: 5px;\n }\n\t\t\ttextarea {\n\t\t\t\theight: 120px;\n\t\t\t\tfont-size: ").concat(Object(a.a)(),"px;\n\t\t\t\tborder: none;\n\t\t\t\tbackground: #ececec;\n border-radius: 5px;\n\t\t\t\tpadding: 2px;\n\t\t\t}\n .explanation {\n font-size:").concat(Object(a.a)(1),"px;\n color: grey;\n }\n }\n }\n")}},68:function(t,n,e){"use strict";e.d(n,"c",(function(){return d})),e.d(n,"g",(function(){return b})),e.d(n,"f",(function(){return g})),e.d(n,"h",(function(){return h})),e.d(n,"d",(function(){return m})),e.d(n,"a",(function(){return v})),e.d(n,"e",(function(){return w})),e.d(n,"b",(function(){return O}));var o=e(10),i=e(15),c=e(122),a=e(376),r=e(25),l=e(170),s=e(377),u=e(11),p=e(31),d=function(t){for(var n=t.value.split("\n"),e=t.selectionStart,o=0,i=0;o<e+1;){o+=n[i].length+1,i++}return{currentPosition:e,lines:n,activeLine:n[--i],lineIndex:i}},f=function(t){for(var n=!0,e=0;e<t.length;e++)32!==t[e].charCodeAt(0)&&45!==t[e].charCodeAt(0)&&91!==t[e].charCodeAt(0)&&93!==t[e].charCodeAt(0)&&(n=!1);return n},b=function(t,n,cb){if(10===n){console.log("updateTextFromLetterInput => ENTER PRESSED");var e=t.lines[t.lineIndex-1],o=e.indexOf("- ["),i=e.indexOf("-"),c="";-1!==o&&"- [ ] "!==e?(c=e.substr(0,o+3)+" ] ",f(c)&&(t.lines[t.lineIndex]=c+t.activeLine,cb(c.length))):-1!==i&&"- "!==e&&"- [ ] "!==e&&(c=e.substr(0,i+1)+" ",f(c)&&(t.lines[t.lineIndex]=c+t.activeLine,cb(c.length)))}return t.lines.join("\n")},g=function(t,n,cb,e){var o=n.lines;if("^"===t){var r=o[n.lineIndex-1],l=o[n.lineIndex];o[n.lineIndex]=r,o[n.lineIndex-1]=l,cb(-r.length-1)}if("v"===t){var s=o[n.lineIndex+1],u=o[n.lineIndex];o[n.lineIndex]=s,o[n.lineIndex+1]=u,cb(+s.length+1)}if("X"===t){o[n.lineIndex].length;var p=Object(i.a)(o).splice(0,n.lineIndex).join("\n").length+1-n.currentPosition;o[n.lineIndex]="",cb(p)}if("C"===t){var d=o[n.lineIndex].length,f=o[n.lineIndex];o.splice(n.lineIndex,0,f),cb(d+1)}"->"===t&&(o[n.lineIndex]=" "+o[n.lineIndex],cb(2)),"<-"===t&&(n.activeLine.startsWith(" ")?(o[n.lineIndex]=o[n.lineIndex].substr(2,o[n.lineIndex].length),cb(-2)):cb(0));var b=n.activeLine.trim();if("[x]"===t&&(b.startsWith("- [ ]")||b.startsWith("- [x]")?b.startsWith("- [ ]")?(o[n.lineIndex]=o[n.lineIndex].replace("[ ]","[x]"),cb(0)):b.startsWith("- [x]")?(o[n.lineIndex]=o[n.lineIndex].replace("[x]","[ ]"),cb(0)):cb(0):(o[n.lineIndex]=o[n.lineIndex].replace(b,"- [ ] "+b.replace("-","")),cb(6))),"insertAt"===t&&e&&e.textToInsert&&(Object(c.a)(e.insertPosition)||Object(a.a)(e.insertPosition))){var g=0;Object(c.a)(e.insertPosition)&&(g=e.insertPosition),"currentPos"===e.insertPosition&&(g=n.currentPosition+1),"currentLineStart"===e.insertPosition&&(g=Object(i.a)(o).splice(0,n.lineIndex).join("\n").length);var h=o.join("\n"),m=e.textToInsert.length;o=[h.slice(0,g),e.textToInsert,e.replaceText?h.slice(g+m,h.length):h.slice(g,h.length)].join("").split("\n")}return o.join("\n")},h=function(t){var n=t.split("\n"),e=0;return Array.isArray(n)?(Object(r.a)(n,(function(t){var n=t.split(" ").filter((function(t){return""!==t}));e+=n.length})),e):e},m=function(t){var n=!1;return(t="".concat(t)).toLowerCase().startsWith("math.")&&(n=!0),t.startsWith("(")&&(n=!0),isNaN(parseInt(t))||(n=!0),t.includes("\n")&&(n=!1),t.length>400&&(n=!1),n},v=function(t){var n=null;if(!m(t))return n;try{n=new Function("return ".concat(t))()}catch(e){}return n},w=function(t){var n=t.windowId,e=t.file,i=t.fileContent,c=t.selectionTxt,a=t.insertPos;try{var r=new Function("return ".concat(c))(),l=Object(o.a)(Object(o.a)({},{wrapSyntax:!1,title:"",currentContent:i,insertPos:a,windowId:n,selection:c,file:e,linejump:!1,isLast:!1}),{},{textUpdate:" = ".concat(r),isLast:!0});O(l)}catch(s){Object(p.d)('[CALC] Error <br/> "'.concat(s,'"'))}},O=function(t){t.question||(t.question=""),t.title||(t.title=""),Object(l.a)(t.linejump)||(t.linejump=!0),Object(l.a)(t.viewFollow)||(t.viewFollow=!0),Object(l.a)(t.wrapSyntax)||(t.wrapSyntax=!0);var n=t.linejump?"\n\n":" ",e="###",o="---",i="".concat(n," ").concat(e," [").concat(t.title,"] (generating ...) ").concat(n),c="".concat(n," ").concat(o," [").concat(t.title,"] (done) ").concat(n),a="".concat(n).concat(t.textUpdate);t.wrapSyntax||(i=c=o=e=""),a="".concat(i).concat(t.textUpdate).concat(n).concat(e," \n"),t.isLast&&(a="".concat(c).concat(t.textUpdate).concat(n).concat(o," \n"));var r=t.currentContent.substring(0,t.insertPos),s=t.currentContent.substring(t.insertPos),p=r+a+s;Object(u.d)((function(n){if(n.file.saveContent(t.file.path,p),t.viewFollow){var e=("".concat(r).concat(a).split("\n").length||0)-2;e<0&&(e=0),j(t.windowId,e)}}))},j=Object(s.a)((function(t,n){Object(u.d)((function(e){e.ui.note.editorAction.dispatch({windowId:t,type:"lineJump",lineJumpNb:n})}))}),1e3)},70:function(t,n,e){"use strict";e.d(n,"a",(function(){return c}));var o=e(5),i=e(0);function c(t,n){var e=Object(i.useState)((function(){try{var e=window.localStorage.getItem(t);return e?JSON.parse(e):n}catch(o){return console.log(o),n}})),c=Object(o.a)(e,2),a=c[0],r=c[1];return[a,function(n){try{var e=n instanceof Function?n(a):n;r(e),window.localStorage.setItem(t,JSON.stringify(e))}catch(o){console.log(o)}}]}},71:function(t,n,e){"use strict";e.d(n,"c",(function(){return r})),e.d(n,"a",(function(){return l})),e.d(n,"b",(function(){return s}));e(0);var o=e(160),i=e(89),c=e(128),a=e(1),r=function(t,n,e){if(!t)return"";var o=t.querySelector("iframe"),i=Object(c.c)(n,{delay:100}),a='<div id="'.concat(i,'" class="resource-link-ctag"><div class="loading-string">loading...</div></div>'),r=!o||!0===e;t.innerHTML=r?a:""},l=function(t){var n;return s(t.tagName,t.content,(null===(n=t.opts)||void 0===n?void 0:n.windowId)||"null",t.opts)},s=function(t,n,e,c){var r;c||(c={}),c.file||(c.file=Object(i.a)());var l=(null===(r=c)||void 0===r?void 0:r.ctagHeightOffset)||0;return Object(a.c)(o.a,{file:c.file,block:{type:"tag",tagName:t,content:n,start:0,end:0},windowId:e,ctagHeightOffset:l,yCnt:0,onIframeMouseWheel:function(){},ctagSandboxed:c.sandboxed,ctagFullscreen:c.fullscreen,ctagOnFullscreenClose:c.onFullscreenClose})}},72:function(t,n,e){"use strict";e.d(n,"b",(function(){return d})),e.d(n,"e",(function(){return b})),e.d(n,"d",(function(){return g})),e.d(n,"c",(function(){return m})),e.d(n,"f",(function(){return v})),e.d(n,"a",(function(){return w}));var o=e(3),i=e(25),c=e(29),a=e(51),r=e(11),l=e(13),s=e(206),u=e(18),p=e(166),d=function(t){var n=new URL(t),e=n.hostname.replace(/^www\./,""),o=n.pathname.split("/").filter((function(t){return""!==t.trim()})),i="";return o.length>0&&(i=(i=o[o.length-1]).length>20?i.substring(0,20).replace(/[^A-Za-z0-9-_\ ]/g,""):i.replace(/[^A-Za-z0-9]/g,"")),e.length>15&&(e=e.substring(0,15)),i.length>0?"".concat(e,"/").concat(i):e},f={value:!1},b=function(t,n){f.value&&Object(r.d)((function(t){var e,o=t.ui.windows.active.get(),i=null===o||void 0===o||null===(e=o.content.file)||void 0===e?void 0:e.path,a=null===o||void 0===o?void 0:o.content.view,r=m().array;r=r.filter((function(t){return"filepath"!==t.name&&"view"!==t.name})),i&&a&&(r.unshift({name:"filepath",value:i}),Object(p.a)("/favicon.png"),document.title="Tiro","mobile"===Object(l.a)()?r.unshift({name:"view",value:n}):r.unshift({name:"view",value:a}),h(r),t.file.getContent(i,(function(t){var n=Object(s.a)(t,Object(c.d)(i));if(!(n.length<1)){var e="".concat(n[0].url).concat(Object(u.c)()),o=Object(c.d)(i).filenameWithoutExt||Object(c.d)(i).name;console.log("fullurl",e,o),document.title=o,Object(p.a)(e),setTimeout((function(){document.title=o}),300)}})))}))},g=function(t){var n,e;Object(p.a)("/favicon.png"),document.title="Tiro",setTimeout((function(){f.value=!0}),5e3);var o=m().dic,i=null===(n=o.filepath)||void 0===n?void 0:n.value,a=null===(e=o.view)||void 0===e?void 0:e.value;if(i&&a&&"mobile"===Object(l.a)()){var s=Object(c.d)(i);Object(r.d)((function(n){n.ui.browser.goTo(s.folder,s.name,{openIn:"activeWindow"}),t(a)}))}},h=function(t){var n="".concat(a.a.global.protocol).concat(a.a.global.url).concat(a.a.global.port,"/?");Object(i.a)(t,(function(e,o){var i=o<t.length-1?"&":"";n+="".concat(e.name,"=").concat(e.value).concat(i)})),window.history.pushState({},document.title,n)},m=function(){var t,n=[],e={},i=window.location.search,c=new URLSearchParams(i).entries(),a=Object(o.a)(c);try{for(a.s();!(t=a.n()).done;){var r=t.value;n.push({name:r[0],value:r[1]}),e[r[0]]={name:r[0],value:r[1]}}}catch(l){a.e(l)}finally{a.f()}return{array:n,dic:e}},v=function(t){var n="",e=0;for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&t[o]&&(n+="".concat(0===e?"":"&").concat(o.toLowerCase(),"=").concat(t[o]),e++);return n},w=function(t){try{var n=new XMLHttpRequest;return n.open("HEAD",t.url,!1),n.send(),404!==n.status?t.onSuccess():t.onFail()}catch(e){t.onFail(e)}}},73:function(t,n,e){"use strict";e.d(n,"c",(function(){return s})),e.d(n,"d",(function(){return g})),e.d(n,"a",(function(){return m})),e.d(n,"b",(function(){return v}));var o=e(30),i=e(11),c=e(13),a=e(28),r=e(9),l=e(45),s=function(t,n,e){return Object(l.a)({file:t,windowId:n,pattern:o.a.linklink,replacement:function(t){var o=e||!1,i=t.matchs,c=document.createElement("span");c.classList.add("note-link-mdpreview-wrapper"),c.classList.add("note-link-wrapper");var a=i[2],r=i[1],l=null;if(a.includes("|")){var s=a.split("|");a=s[0],l=s[1]}var u=m(r,a,l,n,o);return c.innerHTML="".concat(u),c}})},u=function(t){if(t){g(),f++;var n=t.dataset.file,e=t.dataset.folder,o=(t.dataset.searchedstring,t.dataset.windowid||"active");n&&e&&o&&Object(i.d)((function(t){t.ui.browser.goTo(e,n,{openIn:o})}))}},p=function(t){if(t&&"desktop"===Object(c.a)()){var n=t.getBoundingClientRect(),e=[n.left+window.scrollX,n.top+window.scrollY],o=t.dataset.file,a=t.dataset.folder,r=t.dataset.searchedstring,l=t.dataset.windowid,s="".concat(a).concat(o);"preview-popup"!==l&&(Object(i.d)((function(t){t.ui.notePreviewPopup.close()})),h(s,e,r,l))}},d=null,f=0,b=function(t){t.dataset.windowid;g()},g=function(t){d&&clearTimeout(d),f++,t&&setTimeout((function(){f++}),700)},h=function(t,n,e,o){var c=++f;d&&clearTimeout(d),d=setTimeout((function(){f===c&&(""===e&&(e=null),Object(i.d)((function(i){i.ui.notePreviewPopup.open(t,n,{windowIdToOpenIn:o,searchedString:e})})))}),700)},m=function(t,n,e,o,i){var c=t;if(e){var r=e.length>20?e.substring(0,20)+"...":e;c="".concat(t," > ").concat(r)}return'<a\n\t\tonclick="'.concat(Object(a.c)("open-link-page",u),'"\n\t\tonmouseenter="').concat(i&&Object(a.c)("hover-link-page-enter",p),'"\n\t\tonmouseleave="').concat(i&&Object(a.c)("hover-link-page-leave",b),'"\n\t\tclass="title-search-link preview-link" \n\t\tdata-file="').concat(t,'" \n\t\tdata-folder="').concat(n,'" \n\t\tdata-searchedstring="').concat(e||"",'"\n\t\tdata-windowid="').concat(o,'">').concat(c,"</a>")},v=function(t){return t||(t=""),"\n\t\t\t.preview-link {\t\t\t\t\t\t\t\n\t\t\t\tfont-weight: 800;\n\t\t\t\tbackground-repeat: no-repeat;\n\t\t\t\tbackground-position: 4px 2px;\n\t\t\t\tpadding-left: 20px;\n\t\t\t\tbackground-size: 10px;\n\t\t}\n\n\t\t".concat(t,".external-link {\n\t\t\t\tbackground-image: url(").concat(r.a.assets.worldIcon,");\n\t\t}\n\t\t").concat(t,".search-link {\n\t\t\t\tcolor: ").concat(r.a.colors.main,";\n\t\t\t\tbackground-image: url(").concat(r.a.assets.searchIcon,");\n\t\t}\n\t\t").concat(t,".title-search-link {\n\t\t\t\ttransition: 1s all;\n\t\t\t\tbackground-color: rgba(0,0,0,0);\n\t\t\t\t&:hover {\n\t\t\t\t\tcolor: white;\n\t\t\t\t\tbackground-color: ").concat(r.a.colors.main,";\n\t\t\t\t}\n\t\t\t\t&.popup-link {\n\t\t\t\t\tposition: relative;\n\t\t\t\t\tz-index: 99;\n\t\t\t\t}\n\t\t\t\tcolor: ").concat(r.a.colors.main,";\n\t\t\t\tbackground-image: url(").concat(r.a.assets.linkIcon,");\n\t\t\t\tcursor: pointer;\n\t\t}\n\t\t").concat(t,".resource-link {\n\t\t\t\tcolor: ").concat(r.a.colors.main,";\n\t\t} ")}},78:function(t,n,e){"use strict";e.d(n,"a",(function(){return h})),e.d(n,"c",(function(){return m})),e.d(n,"b",(function(){return v}));var o=e(5),i=e(566),c=e(0),a=e(13),r=e(92),l=e(9),s=e(159),u=e(160),p=e(63),d=e(88),f=e(73),b=e(24),g=e(1),h=function(t){var n={wrapper:Object(c.useRef)(null),main:Object(c.useRef)(null)},e=t.file.path.split("/");e.pop();e.join("/");Object(c.useEffect)((function(){setTimeout((function(){t.onMaxYUpdate(a())}),1e3)}),[t.fileContent]);var a=function(){var t=n.main.current;return 2*((null===t||void 0===t?void 0:t.clientHeight)||3e3)},l=Object(c.useState)([]),s=Object(o.a)(l,2),d=s[0],f=s[1];return Object(c.useEffect)((function(){var n=r.b.chunks.chunk(t.fileContent);f(n),setTimeout((function(){r.b.injectLogic({fileContent:t.fileContent,file:t.file})}),100),setTimeout((function(){p.a.updatePreviewDims(t.windowId),p.a.updateScrollerDims(t.windowId),setTimeout((function(){p.a.updatePreviewDims(t.windowId),p.a.updateScrollerDims(t.windowId)}),100)}),100)}),[t.fileContent,t.file.path,t.windowId]),Object(g.c)("div",{className:"preview-area-wrapper render-latex",onWheelCapture:function(n){p.a.onPreviewScroll(t.windowId)}},Object(g.c)("div",{className:"preview-area",ref:n.wrapper,style:{bottom:function(){var n=a(),e=t.posY+0;return Object(i.a)(e,0,n)}()}},Object(g.c)("div",{className:"preview-area-transitions"},Object(g.c)("div",{className:"infos-preview-wrapper"},Object(g.c)("div",{className:"file-path-wrapper"},t.file.path.replace("/".concat(t.file.name),"")),Object(g.c)("h1",{className:"title big-title"},t.file.name.replace(".md",""))),Object(g.c)("div",{className:"content-blocks-wrapper"},Object(g.c)("div",{className:"simple-css-wrapper"},Object(g.c)("div",{className:"preview-area-full-height-content"},d.map((function(n,e){return Object(g.c)(u.a,{key:e,index:e,block:n,windowId:t.windowId,file:t.file,reactOnHeightResize:t.reactOnHeightResize,yCnt:t.yCnt,onIframeMouseWheel:t.onIframeMouseWheel})}))))))))},m=function(t){return t||(t={w:".simple-css-wrapper",pl:".preview-link",r:".resource-link-icon"}),"\n\n\t\thtml, body {\n\t\t\t\tmargin: 0px;\n\t\t\t\tpadding: 0px;\n\t\t}\n\n\t\t".concat(t.w," {\n\t\t\t\tcolor: ").concat(l.a.colors.editor.font,";\n\t\t\t\tline-height: 19px;\n\t\t\t\tfont-size:").concat(Object(b.a)(1),"px;\n\t\t\t\tfont-family:").concat(l.a.font.main,";\n\t\t}\n\n\t\tbutton,\n\t\tinput {\n\t\t\t\tfont-family:").concat(l.a.font.main,";\n\t\t\t\tfont-weight: 700;\n\t\t\t\tcolor: ").concat(l.a.colors.l2.title,";\n\t\t}\n\n\t\t/**********************************************************\n\n\t\t// COUNTER TITLES\n\n*********************************************************/\n\n\t\t").concat(t.w,' {\n\t\t\t\toverflow-wrap: break-word;\n\t\t\t\tcounter-reset: sh1 ;\n\t\t}\n\n\n\t\th1:before {\n\t\t\t\tcontent: ""counter(sh1)" \u2219 ";\n\t\t\t\tcounter-increment: sh1;\n\t\t}\n\t\th1 {\n\t\t\t\tcounter-reset: sh2;\n\t\t}\n\n\t\th2:before {\n\t\t\t\tcontent: ""counter(sh1)"." counter(sh2)" \u2219 ";\n\t\t\t\tcounter-increment: sh2;\n\t\t}\n\t\th2 {\n\t\t\t\tcounter-reset: sh3;\n\t\t}\n\n\t\th3:before {\n\t\t\t\tcontent: ""counter(sh1)"." counter(sh2)"."counter(sh3)" \u2219 ";\n\t\t\t\tcounter-increment: sh3;\n\t\t}\n\t\th3 {\n\t\t}\n\n\n\n\t\t/**********************************************************\n\n\t\t// BASIC STYLE\n\n**********************************************************/\n\n\t\ta {\n\t\t\t\tcolor: ').concat(l.a.colors.main,";\n\t\t}\n\n\t\t.main-color, .main-color:before, .main-color:after {\n\t\t\t\tcolor: ").concat(l.a.colors.main,";\n\t\t}\n\t\t.title {\n\t\t\t\tmargin: 0px 0px;\n\t\t}\n\n\t\th1:before, h2:before, h3:before, h4:before, h5:before, h6:before {\n\t\t\t\tcolor: ").concat(l.a.colors.main,";\n\t\t}\n\t\th1, h2, h3, h4, h5, h6 {\n\t\t\t\tposition:relative;\n\t\t\t\tcolor: ").concat(l.a.colors.main,';\n\t\t\t\tmargin-top: 0px;\n\t\t\t\tline-height: normal;\n\t\t\t\tmargin-right: 10px;\n\t\t}\n\t\th1:after,\n\t\th2:after {\n\t\t\t\t// LONG LINE STYLE\n\t\t\t\t// content: "-";\n\t\t\t\t// background: ').concat(l.a.colors.main,";\n\t\t\t\t// width: 100%;\n\t\t\t\t// height: 2px;\n\t\t\t\t// position: absolute;\n\t\t\t\t// bottom: 0px;\n\t\t\t\t// left: 0px;\n\t\t\t\t// font-size: 0px;\n\t\t\t\t/* opacity: 0.4; */\n\t\t}\n\t\th2:after {\n\t\t\t\t/* width: 70%; */\n\t\t\t\theight: 1px;\n\t\t}\n\t\th1 {\n\t\t\t\tpadding: 5px;\n\t\t\t\t/* border-bottom: 2px solid; */\n\t\t\t\tmargin-top: 30px;\n\t\t\t\tmargin-bottom: 20px;\n\t\t}\n\t\th2 {\n\t\t\t\tpadding: 5px;\n\t\t\t\t/* border-bottom: 1px solid; */\n\t\t}\n\t\th2, h3, h4, h5, h6 {\n\t\t\t\tmargin-bottom: 10px;\n\t\t\t\tmargin-top: 25px;\n\t\t}\n\n img,\n .content-image {\n\t\t\t\tcursor: pointer;\n }\n\t\t\t.content-image-img {\n\t\t\t\t\t").concat(l.a.els().images,"\n\t\t\t\t\tcursor: pointer;\n\t\t\t}\n\n p {\n\t\t\t\t//display: inline;\n }\n\n\n\t\t/**********************************************************\n\n\t\t// LIST\n\n**********************************************************/\n\t\t.no-css ul li {\n\t\t\t\tbackground: none!important;\n\t\t\t\tpadding: 0px;\n\t\t}\n\n\t\tul {\n\t\t\t\tpadding: 0px;\n\t\t\t\tlist-style-image: \"./custom_icons/view-1.svg\"; \n\t\t\t\tlist-style: none; \n\t\t}\n\n\t\tul li {\n\t\t\t\tpadding-left: 12px;\n\t\t}\n\t\tul li:before {\n\t\t\t\tcontent: '-';\n\t\t\t\tcolor: ").concat(l.a.colors.main,";\n\t\t\t\twidth: 10px;\n\t\t\t\tdisplay: inline-block;\n\t\t\t\tfont-size: ").concat(Object(b.a)(5),"px;\n\n\t\t\t\t/* background-image: url(./custom_icons/line.svg); */\n\t\t\t\t/* background-repeat: no-repeat; */\n\t\t\t\t/* background-position: -3px 4px; */\n\t\t\t\t/* background-size: 11px; */\n\n\t\t\t\t/* background-image: url(./custom_icons/line.svg); */\n\t\t\t\t/* background-repeat: no-repeat; */\n\t\t\t\t/* background-color: ").concat(l.a.colors.main,'; */\n\t\t\t\t/* -webkit-mask-position: -3px 4px; */\n\t\t\t\t/* -webkit-mask-size: 11px; */\n\t\t\t\t/* -webkit-mask-image: url(./custom_icons/line.svg); */\n\t\t\t\t/* -webkit-mask-repeat: no-repeat; */\n\t\t}\n\t\tul li p {\n\t\t\t\tmargin: 0px;\n\t\t}\n\n\t\tul input[type=checkbox] {\n\t\t\t\tposition: relative;\n\t\t\t\twidth: 0px;\n\t\t\t\theight: 10px;\n\t\t\t\tmargin-right: 9px\n\t\t}\n\t\tul input[type=checkbox]:before {\n\t\t\t\tcontent: "";\n\t\t\t\tdisplay: block;\n\t\t\t\tposition: absolute;\n\t\t\t\twidth: 15px;\n\t\t\t\theight: 15px;\n\t\t\t\ttop: 0px;\n\t\t\t\tleft: -4px;\n\n\t\t\t\tbackground-color: ').concat(l.a.colors.main,";\n\t\t\t\t/* background-image: url(./custom_icons/check.svg); */\n\t\t\t\t/* background-repeat: no-repeat; */\n\t\t\t\t/* background-size: contain; */\n\t\t\t\tmask-position: -2px -1px;\n\t\t\t\tmask-image: url(./custom_icons/check.svg);\n\t\t\t\tmask-size: contain;\n\t\t\t\tmask-repeat: no-repeat;\n\n\t\t\t\t-webkit-mask-position: -2px -1px;\n\t\t\t\t-webkit-mask-image: url(./custom_icons/check.svg);\n\t\t\t\t-webkit-mask-size: contain;\n\t\t\t\t-webkit-mask-repeat: no-repeat;\n\t\t}\n\t\tul input[type=checkbox]:checked:before {\n\t\t\t\t/* background-color: red; */\n\t\t\t\t/* -webkit-mask-image: url(./custom_icons/uncheck.svg); */\n\t\t\t\t/* mask-image: url(./custom_icons/uncheck.svg); */\n\t\t\t\t/* background-image: url(./custom_icons/uncheck.svg); */\n\n\t\t\t\t/* background-color: red; */\n\t\t\t\t/* -webkit-mask-image: url(./custom_icons/uncheck.svg); */\n\t\t\t\t/* mask-image: url(./custom_icons/uncheck.svg); */\n\t\t\t\tmask-image: url(./custom_icons/uncheck.svg);\n\t\t\t\t-webkit-mask-image: url(./custom_icons/uncheck.svg);\n\n\t\t}\n\n\t\t/**********************************************************\n\n\t\t PREVIEW LINK\n\n**********************************************************/\n\n\n\t\t").concat(Object(f.b)(t.pl),"\n\n\t\t/**********************************************************\n\n\t\t// TABLE\n\n**********************************************************/\n\n\t\ttable {\n\t\t\t\tmargin: 10px 0px;\n\t\t\t\tpadding 15px;\n\t\t\t\tborder-spacing: 0;\n\t\t\t\tborder-collapse: collapse;\n\t\t}\n\n\n\t\tth {\n\t\t\t\ttext-align: left;\n\t\t\t\tpadding: 10px 10px;\n\t\t}\n\t\ttd {\n\t\t\t\tpadding: 5px 10px;\n\t\t}\n\t\tthead tr {\n\t\t\t\tbackground: #e4e3e3;\n\t\t}\n\t\tth, td {\n\t\t\t\tborder: 1px solid #ccc;\n\t\t}\n\t\ttbody {\n\t\t}\n\t\t// tbody tr:nth-child(even) {background: #CCC}\n\t\t// tbody tr:nth-child(odd) {background: #EEE}\n\n\t\t/**********************************************************\n\n\t\t// RESSOURCE LINK\n\n**********************************************************/\n\t\t").concat(Object(d.b)(),"\n\n\t\tpre {\n\t\t}\n\n\t\tpre code {\n\t\t\t\tdisplay: block;\n\t\t\t\tborder-radius: 8px;\n\t\t\t\tbackground: #d2d2d2;\n\t\t\t\tpadding: 11px 23px;F\n\t\t}\n\t\t")},v=function(){return"\n\n\n.preview-area {\n\t\tmargin-top: 0px;\n \t.infos-preview-wrapper {\n\t\t\t\tborder-bottom: 1px solid rgba(0 0 0 / 5%);\n \t\tdisplay: ".concat(Object(a.c)("desktop")?"none":"block",";\n\t\t\t\tpadding: 14px 0px 14px 0px;\n\t\t}\n}\n.preview-area {\n position: relative;\n display: block;\n\toverflow: auto; \n\twidth: calc(100% );\n padding-right: 30px;\n\n\t//@TODO padding preview area\n\t.content-block.block-text {\n\t\tpadding-left: 10px;\n\t\tpadding-right: 20px;\n\t\tdisplay: block;\n\t}\n\n ").concat(Object(s.b)(),"\n\n\t.infos-preview-wrapper h1.big-title {\n\t\t\twidth: calc(100% - 65px);\n\t\t\tfont-family: ").concat(l.a.font.editor,";\n\t\t\tcolor: grey;\n\t\t\tfont-size: ").concat(Object(b.a)(5),"px;\n\t\t\tmargin: 0px;\n\t\t\tpadding: 0px 14px;\n\t}\n}\n.content-blocks-wrapper {\n\t\t").concat(m(),"\n}\n.view-both .preview-area {\n\t\t// margin-top: 20px;\n\t\tmargin-top: 0px;\n}\n\n.preview-area-wrapper {\n\theight: calc(100% - 35px);\n margin-top: ").concat(Object(a.c)("desktop")?"140":"0","px;\n}\n\n.preview-area, .preview-area-transitions, .content-blocks-wrapper, .simple-css-wrapper { height: 100%; }\n\n")}},84:function(t,n,e){"use strict";e.d(n,"a",(function(){return o}));var o=function(t){var n="none",e=t.split(".");return"7z"===(n=e[e.length-1].split("?")[0])&&(n="d7z"),n.length>5&&(n="none"),n}},88:function(t,n,e){"use strict";e.d(n,"a",(function(){return h})),e.d(n,"b",(function(){return v}));e(25),e(0);var o=e(29),i=e(18),c=e(13),a=e(84),r=e(28),l=e(71),s=e(65),u=e(9),p=e(41),d=e(11),f=e(24),b=e(1),g=400,h=function(t){var n=t.markdownTag.split("](")[1].slice(0,-1),e=t.markdownTag.split("](")[0].replace("![",""),u="".concat(Object(p.a)(t.file.folder),"/").concat(n).concat(Object(i.c)()),f="".concat(e,".").concat(Object(a.a)(n)),g=Object(o.b)(u),h="ress-".concat(Object(s.b)(g));Object(r.a)(t.file,g,(function(){var n=document.querySelector(".".concat(h," .iframe-wrapper"));n&&v(g,n,t.file.path)}));var m=r.d,v=function(n,e,i,s){var u=(null===s||void 0===s?void 0:s.fullscreen)||!1;null===s||void 0===s||s.fullscreen;if(e){var p=Object(o.d)(i);if(null!==s&&void 0!==s&&s.persist){var d=e.querySelector("iframe")?"closed":"open";Object(r.b)(p,n,d)}var f=function(){e.innerHTML=""},b="mobile"===Object(c.a)()?-300:-100;"epub"===Object(a.a)(n).toLocaleLowerCase()?Object(l.c)(e,Object(l.b)("epub",n,t.windowId,{file:p,fullscreen:u,onFullscreenClose:f,ctagHeightOffset:b}),null===s||void 0===s?void 0:s.openOnly):"pdf"===Object(a.a)(n).toLocaleLowerCase()?Object(l.c)(e,Object(l.b)("pdf",n,t.windowId,{file:p,fullscreen:u,onFullscreenClose:f,ctagHeightOffset:b}),null===s||void 0===s?void 0:s.openOnly):Object(l.c)(e,Object(l.b)("iframe",n,t.windowId,{fullscreen:u,onFullscreenClose:f,ctagHeightOffset:b}))}},O='<li title="Open link in detached window"\n\t\tonclick="'.concat(Object(r.c)("open-win-ress",(function(t){if(t){var n=t.dataset.link;window.open(n,"popup-preview-link","width=800,height=1000")}})),'"\n\t\tdata-link="').concat(g,'">').concat(m("up-right-from-square"),"</li>"),j='<li\n\t\tonclick="'.concat(Object(r.c)("preview-link-ress",(function(t){return function(t,n){if(t){var e=t.dataset.link,o=t.dataset.filepath,i=function(t){return t.parentNode.parentNode.parentNode.parentNode.parentNode.querySelector(".iframe-wrapper")}(t);v(e,i,o,n)}}(t,{persist:!0})})),'"\n\t\ttitle="Toggle a pinned preview" \n\t\tdata-filepath="').concat(t.file.path,'" \n\t\tdata-link="').concat(g,'">').concat(m("eye"),"</li>"),x='<li\n\t\tonclick="'.concat(Object(r.c)("download-link-ress",(function(t){if(t){var n=t.dataset.link,e=t.dataset.filename;console.log(u,f),w(e,n)}})),'"\n\t\ttitle="Preview link" data-filename="').concat(f,'" data-link="').concat(g,'">').concat(m("download"),"</li>"),k="<ul>".concat(j," ").concat(O," ").concat(x,"</ul>"),y='<div \n\t\tclass="ressource-link-label" \n\t\tdata-filepath="'.concat(t.file.path,'" \n\t\tdata-link="').concat(g,'" \n\t\tonclick="').concat(Object(r.c)("click-ress-main-action",(function(t){if(t){var n=t.dataset.link,e="iframe",o=Object(a.a)(n).toLocaleLowerCase();"epub"===o&&(e="epub"),"pdf"===o&&(e="pdf"),Object(d.d)((function(t){t.ui.floatingPanel.create({type:"ctag",layout:"full-center",ctagConfig:{tagName:e,content:n}})}))}})),'">\n\t\t\t').concat(e," (").concat(Object(a.a)(g),")\n\t\t</div>").split("\n").join("");return Object(b.c)("div",{className:"".concat(h," resource-link-iframe-wrapper")},Object(b.c)("div",{className:" resource-link-wrapper device-".concat(Object(c.a)())},Object(b.c)("div",{className:"resource-link-icon ".concat(Object(a.a)(g))}),Object(b.c)("div",{className:"resource-link-content-wrapper"},Object(b.c)("div",{dangerouslySetInnerHTML:{__html:y}}),Object(b.c)("div",{dangerouslySetInnerHTML:{__html:k},className:"buttons-wrapper"}))),Object(b.c)("div",{className:"iframe-wrapper"}))},m=".resource-link-icon",v=function(){return"\n.loading-string {\n text-align: center;\n padding: 50px;\n}\n.ressource-link-label {\n\t\tfont-weight: bold;\n\t\tcursor: pointer;\n}\n.resource-link-ctag {\n\t\t// height: ".concat(g-21,"px;\n\t\tmin-height: 120px;\n\t\toverflow:hidden;\n\t\twidth: 100%;\n\t\tborder:none;\n}\n.resource-link-iframe {\n\t\tborder: none;\n\t\twidth: 100%;\n}\n\n.resource-link-wrapper,\n.resource-link-wrapper a {\n\t\tcolor: ").concat(u.a.colors.main,";\n}\n.resource-link-iframe-wrapper {\n\t\tbackground: #f7f6f6;\n\t\tborder-radius: 5px;\n\t\toverflow:hidden;\n}\n.preview-area-wrapper .resource-link-iframe-wrapper {\n\t\tmargin-top: 3px;\n\t\tbackground:#eee!important;\n}\n\n.resource-link-wrapper {\n\t\tpadding: 7px;\n\t\tborder-radius: 10px;\n\t\tposition: relative;\n\t\tmargin: 5px 0px;\n}\n\n.buttons-wrapper {\n\t\tposition: relative;\n\t\ttop: -10px;\n\t\theight: 10px;\n}\n.resource-link-content-wrapper .ssr-icon {\n\t\tpadding: 3px;\n\t\tfont-size: ").concat(Object(f.a)(3),"px;\n\t\tmargin: 0px 5px 0px 0px;\n\t\tcolor: #b9b9b9;\n\t\tcursor: pointer;\n}\n.resource-link-content-wrapper .ssr-icon:hover {\n\t\tcolor:grey;\n}\n\n.mdpreview-source {\n\t\t// display:none!important;\n}\n\n.resource-link-icon {\n\t\ttop: 10px;\n\t\tleft: 19px;\n\t\twidth: 12px;\n\t\theight: 27px;\n\t\tdisplay: inline-block;\n\t\tbackground-image: url(/static/media/file-solid.6415173e.svg);\n\t\topacity: 0.08;\n\t\tposition: absolute;\n\t\tbackground-repeat: no-repeat;\n\t\ttransform: scale(1.5);\n\t\tbackground-image: url(").concat(u.a.assets.fileIcon,");\n}\n\n").concat(m,".epub, ").concat(m,".cbr, ").concat(m,".cbz,").concat(m,".mobi, ").concat(m,".azw, ").concat(m,".azw3, ").concat(m,".iba {background-image: url(").concat(u.a.assets.bookIcon,"); }\n").concat(m,".pdf\n{background-image: url(").concat(u.a.assets.pdfIcon,"); }\n\n").concat(m,".xls, ").concat(m,".xlsm, ").concat(m,".xlsx, ").concat(m,".ods\n{background-image: url(").concat(u.a.assets.excelIcon,"); }\n\n").concat(m,".avi, ").concat(m,".flv, ").concat(m,".h264, ").concat(m,".m4v, ").concat(m,".mov, ").concat(m,".mp4, ").concat(m,".mpg, ").concat(m,".mpeg, ").concat(m,".rm, ").concat(m,".swf, ").concat(m,".vob, ").concat(m,".wmv, ").concat(m,".mkv\n{background-image: url(").concat(u.a.assets.videoIcon,"); }\n\n").concat(m,".d7z, ").concat(m,".arj, ").concat(m,".deb, ").concat(m,".rar, ").concat(m,".gz, ").concat(m,".zip, ").concat(m,".rpm, ").concat(m,".pkg\n{background-image: url(").concat(u.a.assets.archiveIcon,");}\n\n").concat(m,".aif, ").concat(m,".mp3, ").concat(m,".cda, ").concat(m,".mid, ").concat(m,".mpa, ").concat(m,".ogg, ").concat(m,".wav, ").concat(m,".wpl, ").concat(m,".wma, ").concat(m,".midi\n{background-image: url(").concat(u.a.assets.audioIcon,"); }\n\n").concat(m,".doc, ").concat(m,".docx, ").concat(m,".odt, ").concat(m,".txt\n{background-image: url(").concat(u.a.assets.wordIcon,"); }\n\n").concat(m,".html, ").concat(m,".css, ").concat(m,".js, ").concat(m,".json, ").concat(m,".ts, ").concat(m,".jsx, ").concat(m,".tsx\n{background-image: url(").concat(u.a.assets.codeIcon,"); }\n\n").concat(m,".bin, ").concat(m,".dmg, ").concat(m,".iso, ").concat(m,".toast, ").concat(m,".vcd\n{\n\t\ttop: 19px;\n\t\ttransform: scale(1.8);\n\t\tbackground-image: url(").concat(u.a.assets.diskIcon,");\n}\n\n").concat(m,".ppt, ").concat(m,".pptx, ").concat(m,".odp, ").concat(m,".key, ").concat(m,".pps\n{background-image: url(").concat(u.a.assets.presIcon,"); }\n\n\n.resource-link-content-wrapper {\n\t\tdisplay: flex;\n\t\tjustify-content: space-between;\n}\n\n.resource-link-content-wrapper {\n}\n\n.resource-link-content-wrapper ul {\n\t\tpadding-left: 7px;\n\t\tdisplay: flex;\n}\n.resource-link-content-wrapper ul li {\n\t\tlist-style: none;\n\t\tpadding-left: 0px;\n}\n.resource-link-content-wrapper ul li:before {\n\t\tdisplay: none;\n}\n\n\n// HIDING IT ON DESKTOP \n// .device-desktop .resource-link-wrapper:hover .resource-link-content-wrapper ul {\n// \t\topacity:1;\n// \t\twidth: 90px;\n// \t\t// margin-top: 15px;\n// \t\tpointer-events: all;\n// }\n// .device-desktop .resource-link-content-wrapper ul {\n// \t\topacity: 0;\n// \t\twidth: 0px;\n// \t\ttransition: 0.2s all;\n// \t\ttransition-delay: 0.2s, 0s;\n// \t\tpointer-events: none;\n// }\n.device-desktop .resource-link-wrapper .resource-link-content-wrapper ul {\n\t\topacity:1;\n\t\twidth: 90px;\n\t\tpointer-events: all;\n}\n\n")},w=function(t,n){var e=document.createElement("a");e.style.display="none",document.body.appendChild(e),e.href=n,e.target="_blank",e.setAttribute("download",t),e.click(),window.URL.revokeObjectURL(e.href),document.body.removeChild(e)}},89:function(t,n,e){"use strict";e.d(n,"b",(function(){return r})),e.d(n,"a",(function(){return l}));var o=e(5),i=e(25),c=e(376),a=e(0),r=function(){var t=Object(a.useState)([]),n=Object(o.a)(t,2),e=n[0],r=n[1],s=Object(a.useState)(0),u=Object(o.a)(s,2),p=u[0],d=u[1];return{lightboxApi:{open:function(t,n){var e=[];Object(i.a)(n,(function(t){if(Object(c.a)(t)){var n={file:l(),title:"",url:t};e.push(n)}else e.push(t)})),r(e),d(t)},close:function(){r([]),d(0)}},lightboxImages:e,lightboxIndex:p}},l=function(t,n){return{nature:"file",name:t||"",realname:"",path:n||"",folder:""}}},9:function(t,n,e){"use strict";e.d(n,"a",(function(){return w}));e(423),e(424),e(425),e(426);var o=e.p+"static/media/deco-bg-map.7ca9103b.png",i=e.p+"static/media/file-solid.6415173e.svg",c=e.p+"static/media/compact-disc-solid.55b6e50c.svg",a=e.p+"static/media/file-pdf-solid.0a9d75fe.svg",r=e.p+"static/media/file-word-solid.9228e1ff.svg",l=e.p+"static/media/file-code-solid.62b467ac.svg",s=e.p+"static/media/book-solid.87f5b737.svg",u=e.p+"static/media/file-excel-solid.217d73db.svg",p=e.p+"static/media/file-video-solid.312288cf.svg",d=e.p+"static/media/file-audio-solid.a76f99f0.svg",f=e.p+"static/media/file-zipper-solid.7db57917.svg",b=e.p+"static/media/file-powerpoint-solid.4d969453.svg",g=e.p+"static/media/link-solid.7b689dbd.svg",h=e.p+"static/media/globe-africa-solid.0ad34146.svg",m=e.p+"static/media/search-solid.cc51b702.svg",v={main:"#E86666",mainFont:"#FFFFFF",bgPopup:"#FFF",bgPopup2:"#f9f9f9",bgPopup3:"#f5efef",bgTabs:"#D8D8D8",bgTab:"#D0D0D0",fontTab:"#797979",bgTabActive:"#EFEFEF",bgInterface:"#efefef",fontInterface:"#323232",bgInterface2:"#e1e1e1",fontInterface2:"#585757",bgEditor:"#FFFFFF",bgPreview:"#F7F7F7",fontEditor:"#323232",dev:["#C3668B","#A766A7","#CE66E8","#E4E866"],compl:["#11abf8","#3fd7a4"],pal1:["#5c1a70","#ffa67c","#ffda77"],grey1:"#797979",grey2:"red",green:"green",l1:{bg:"#e1e1e1",font:"#615f5f"},l2:{bg:"#eeecec",title:"#797979",text:"#615f5f",date:"#b3b2b2"},editor:{bg:"#ffffff",font:"#525252",interfaceGrey:"#d4d1d1",mobileToolbar:{bg:"#e1e1e1",font:"#747474"}},bg:{l1:"#e1e1e1",dark:"rgb(39, 39, 39)",grey:"rgb(221, 221, 221)",light:"#FFFFFF",black:"#000000"},font:{light:"#FFFFFF",black:"#000000"}},w={els:function(){return{button:"\n\t\tbackground: none;\n border: none;\n ",images:"\n\t\tborder-radius: 7px;\n box-shadow: 0px 0px 10px rgb(0 0 0 / 10%);\n max-width: 100%;\n ",imageInfos:"\n ",redButton:"\n\t\t\tborder: none;\n\t\t\tbackground: ".concat(v.main,";\n\t\t\t&:hover {\n\t\t\t\t\topacity: 0.9;\n\t\t\t}\n\t\t\tcolor: white;\n\t\t\tborder-radius: 5px;\n\t\t\tmargin-right: 5px;\n\t\t\tcursor: pointer;\n\t\t\tfont-weight: 700;\n\t\t\ttext-transform: uppercase;\n\t\t\tletter-spacing: 1px;\n ")}},colors:v,font:{main:"Helvetica neue, Open sans, arial, sans-serif",editor:"Consolas, monaco, monospace"},sizes:{desktop:{l:37,l1:37,l2:63,r:63},search:{h:94,padding:10},gallery:{topH:100},block:15,scrollbar:17,l2:{fileLi:{height:77,padding:5,margin:5,img:67}},editor:{padding:45},mobile:{bottomBarHeight:50,editorBar:40,editorTopWrapper:100}},assets:{decoBgMap:o,linkIcon:g,worldIcon:h,fileIcon:i,diskIcon:c,pdfIcon:a,presIcon:b,audioIcon:d,videoIcon:p,excelIcon:u,wordIcon:r,codeIcon:l,bookIcon:s,archiveIcon:f,searchIcon:m},anim:{time:"100ms"}}},91:function(t,n,e){"use strict";e.d(n,"b",(function(){return a})),e.d(n,"d",(function(){return r})),e.d(n,"c",(function(){return l})),e.d(n,"a",(function(){return u}));var o=e(15),i=e(25),c=e(421);c.setOptions({gfm:!0,breaks:!0,headerPrefix:"t-"});var a=function(t){var n=t;return n=c.parse(n)},r=function(t,n,e){var o=t,c=o.match(n)||"";return Object(i.a)(c,(function(t){o=o.replace(t,e(t))})),o},l=function(t,n,e){var o=t,i=n.replace("[[","").replace("]]",""),c="(?:\\[\\[".concat(i,"\\]\\])((?:[^]*))(?:\\[\\[").concat(i,"\\]\\])"),a=new RegExp(c,"gm"),r=o.match(a)||"";if(r[0]){for(var l=r[0].split(n),s=[],u=0;u<l.length;u++){var p=l[u];""!==p&&s.push(p)}for(var d=0;d<s.length;d++){s[d];if(d%2===0)try{s[d]=e(s[d])}catch(b){console.warn("[REPLACE CUSTOM MD TAGS] error: ".concat(b),s[d])}}var f=s.join("");o=o.replace(a,f)}return o},s=function t(n,e){var o=!1;if(Object(i.a)(n,(function(t){t.id===e&&(o=!0)})),o){var c=!1,a=[e[e.length-2],e[e.length-1]],r=e.slice(0,-2),l=parseInt(a[1]);return"-"!==a[0]||isNaN(l)||(c=!0),c?e="".concat(r,"-").concat(l+1):e+="-1",t(n,e)}return e},u=function(t){for(var n=[],e=t.split("\n"),i=[],c=0;c<e.length;c++){var a=e[c],r=Object(o.a)(a.matchAll(/([#]{1,9})\ (.+)/gi));if(r.length>0){var l=r[0],u=l[2].toLowerCase(),p=c,d=u.trim().split(" ").join("-").replace(/[^a-zA-Z0-9-_\xc0-\xfa]/gi,"");d=s(i,d),i.push({raw:a,matches:l,id:d,line:p,title:u,ranking:l[1].length}),n.push({id:d,title:u,line:p})}}return n}},92:function(t,n,e){"use strict";e.d(n,"a",(function(){return u})),e.d(n,"b",(function(){return f}));var o=e(10),i=e(25),c=e(30),a=e(99),r=e(91),l=e(41),s=function(t){var n=Object(o.a)({},t),e=n.raw,i=n.file,c=n.windowId;c||(c="");var s=Object(r.b)(Object(l.d)(i,c,Object(l.c)(i,Object(l.e)(Object(l.f)(c,Object(l.g)(e))))));return Object(a.d)(),s},u=function(t,cb){for(var n=document.getElementsByClassName(t),e=function(){var t=n[o];t.onclick=function(){cb(t)}},o=0;o<n.length;o++)e()},p=function(t){var n=t.split(c.a.userCustomTagManual),e=[],o=[],a=c.a.userCustomTag3,r=t.match(a)||"",l=[];Object(i.a)(r,(function(t){l.push(t)}));var s=null,u=-1,p=[],d=[],f={};if(Object(i.a)(l,(function(t){f[t]?f[t]=f[t]+1:f[t]=1})),Object(i.a)(f,(function(t,n){t>=2&&d.push(n)})),Object(i.a)(l,(function(t,e){if(d.includes(t))if(s){if(s===t){var i=[u+1,e+1];p.push.apply(p,i);for(var c=n.slice(i[0],i[1]),a=l.slice(u+1,e+1),r="",f=0;f<c.length;f++){var b=f===c.length-1?"":a[f];r+="".concat(c[f]).concat(b)}o.push({type:"tag",tagName:s.replace("[[","").replace("]]",""),content:r,start:u,end:e}),u=-1,s=null}}else s=t,u=e})),0===p.length)e.push({type:"text",content:t,start:0,end:1});else{p.unshift(0);for(var b=0;b<p.length;b+=2){var g=p[b];n[g]&&e.push({type:"text",content:n[g],start:g,end:g+1})}}for(var h=0===t.indexOf(l[0]),m=[],v=o.length>e.length?o.length:e.length,w=0;w<v;w++)h?(o[w]&&m.push(o[w]),e[w]&&m.push(e[w])):(e[w]&&m.push(e[w]),o[w]&&m.push(o[w]));return m},d=function(t){var n="";return Object(i.a)(t,(function(t){"text"===t.type?n+=t.content:"tag"===t.type&&(n+="[[".concat(t.tagName,"]]").concat(t.content,"[[").concat(t.tagName,"]]"))})),n},f={render:function(t){var n=Object(o.a)({},t),e=n.raw,c=n.file,a=n.windowId;a||(a="");var r=p(e);return Object(i.a)(r,(function(t){"text"===t.type&&(t.content=s({raw:t.content,file:c,windowId:a})),"tag"===t.type&&(t.content=Object(l.b)(t.content))})),d(r)},injectLogic:function(t){},chunks:{chunk:p,merge:d}}},93:function(t,n,e){"use strict";e.d(n,"b",(function(){return c})),e.d(n,"a",(function(){return a})),e.d(n,"d",(function(){return r})),e.d(n,"c",(function(){return l}));var o=e(243),i=e(25),c=["Az","Crea","Modif"],a=["alphabetical","created","modified"],r=function(t,n){var e;switch(a[n]){case"alphabetical":default:e=Object(o.a)(t,[function(t){return t.realname.toLocaleLowerCase()}]);break;case"created":e=Object(o.a)(t,["created"]).reverse();break;case"modified":e=Object(o.a)(t,["modified"]).reverse()}return e},l=function(t){var n=t[0];return n?(Object(i.a)(t,(function(t){t.created&&n.created&&t.created>n.created&&(n=t)})),n):null}},95:function(t,n,e){"use strict";e.d(n,"a",(function(){return r})),e.d(n,"f",(function(){return s})),e.d(n,"g",(function(){return u})),e.d(n,"d",(function(){return p})),e.d(n,"b",(function(){return d})),e.d(n,"c",(function(){return f})),e.d(n,"e",(function(){return b}));var o=e(30),i=e(9),c=e(45),a=e(24),r={val:!1},l=r,s=function(t,n){return Object(c.a)({file:t,windowId:n,pattern:/\|/gim,classWrap:function(t){return"md-table-limiter"}})},u=function(t,n){return Object(c.a)({file:t,windowId:n,pattern:/t1.+t2/gim,classWrap:function(t){return"ttt4"}})},p=function(t,n){return Object(c.a)({file:t,windowId:n,pattern:o.a.mdTableCell,classWrap:function(t){var n=t[0];return n&&"-"===n||n&&"-|"===n?"":"md-table-cell"}})},d=function(t,n){return Object(c.a)({file:t,windowId:n,pattern:o.a.mdTitle,classWrap:function(t){var n=t[1].length;return"md-title-wrapper level-".concat(n)}})},f=function(t,n){return Object(c.a)({file:t,windowId:n,pattern:o.a.mdTableLine,classWrap:function(t){var n=t[0].trim();n.startsWith("|")&&(n=n.substring(1)),n.endsWith("|")&&(n=n.substring(0,n.length-1));var e=n.split("|").length;return l.val=!l.val,"md-table-line md-table-".concat(e," ").concat(l.val?"even":"")}})},b=function(){for(var t="",n=0;n<30;n++){var e=Math.floor(100/n);t+="\n\t\t\t\t&.md-table-".concat(n," span.md-table-cell{\n\t\t\t\t\t\twidth: calc(").concat(e,"% - 15px);\n\t\t\t\t}")}return"\n.md-title-wrapper {\n\tcolor: ".concat(i.a.colors.main,";\n\t\n\t&.level-1 {\n\t\tfont-size: ").concat(Object(a.a)(5),"px;\n\t\ttext-decoration: underline;\n\t\tfont-weight: bold;\n\t}\n\t&.level-2 {\n\t\tfont-size: ").concat(Object(a.a)(3),"px;\n\t\ttext-decoration: underline;\n\t\t// font-weight: bold;\n\t}\n\t&.level-3 {\n\t\tfont-size: ").concat(Object(a.a)(2),"px;\n\t}\n}\n.md-table-preview-enabled {\n\t\t.md-table-line {\n\t\t\t\t&.even {\n\t\t\t\t\t\tbackground: #e3e3e3;\n\t\t\t\t}\n\t\t\t\tdisplay: inline-flex;\n\n\t\t\t\tdisplay: block;\n\t\t\t\tbackground: #f4f4f4;\n\t\t\t\tpadding: 5px;\n\t\t\t\t").concat(t,"\n\t\t\t\tspan.md-table-cell {\n\t\t\t\t\t\tpadding-right:13px;\n\t\t\t\t\t\tposition: relative;\n\t\t\t\t\t\tdisplay: inline-block;\n\t\t\t\t\t\tvertical-align: top;\n\t\t\t\t}\n\t\t\t\tspan.md-table-cell:not(:has(> span)) {\n\t\t\t\t\t&:last-child{\n\t\t\t\t\t\tdisplay: none!important;\n\t\t\t\t\t}\n\t\t\t\t\t/* CSS rules */\n\t\t\t\t}\n\t\t\t\tspan.md-table-cell span.md-table-limiter {\n\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\ttop: 0px;\n\t\t\t\t\t\tright:0px;\n\t\t\t\t\t\tcolor: #c8c3c3;\n\t\t\t\t\t\tdisplay: inline-block;\n\t\t\t\t}\n\t\t\t\tspan.md-table-cell>span:first-child {\n\t\t\t\t\t\twidth: 100%;\n\t\t\t\t\t\ttext-align: right;\n\t\t\t\t}\n\n }\n\t\t.cm-activeLine {\n\t\t\t\t.md-table-line {\n\t\t\t\t\t\tbackground: #d9d9d9;\n\t\t\t\t\t\tspan.md-table-cell span.md-table-limiter {\n\t\t\t\t\t\t\t\tcolor: black;\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t}\n\t\t.cm-line .md-table-limiter {\n\t\t\t\tdisplay: inline;\n\t\t}\n\n}\n\t\t")}},99:function(t,n,e){"use strict";e.d(n,"b",(function(){return l})),e.d(n,"a",(function(){return d})),e.d(n,"e",(function(){return f})),e.d(n,"d",(function(){return b})),e.d(n,"c",(function(){return h}));var o=e(121),i=e(25),c=e(17),a=null,r=null,l=!1,s="[LATEX]",u=c.a.client.log.verbose,p=function(t,n){var e=document.createElement("script");e.src=t,e.crossorigin="anonymous",document.body.appendChild(e),e.onload=function(){n()}},d=function(){p("https://cdn.jsdelivr.net/npm/katex@0.15.2/dist/katex.min.js",(function(){p("https://cdn.jsdelivr.net/npm/katex@0.16.2/dist/contrib/auto-render.min.js",(function(){l=!0,a=window.katex,r=window.renderMathInElement}))})),function(t){var n=document.createElement("link");n.type="text/css",n.rel="stylesheet",n.href=t,document.body.appendChild(n)}("https://cdn.jsdelivr.net/npm/katex@0.15.2/dist/katex.css")},f=function(t){var n=t=t.replaceAll("$","");if(!a)return n;try{window.ka=a,n=a.renderToString(t)}catch(e){u&&console.log("LATEX ERR:",e)}return n},b=Object(o.a)((function(){u&&console.log(s,"REFRESH"),g(".render-latex")}),100),g=function(t){if(r){var n=document.querySelectorAll(t);if(!n)return console.warn(s,"no el found :",t);u&&console.log(s,n),Object(i.a)(n,(function(t){r(t,{delimiters:[{left:"$$",right:"$$",display:!0},{left:"$",right:"$",display:!1},{left:"\\(",right:"\\)",display:!0},{left:"[[l]]",right:"[[l]]",display:!0},{left:"\\[",right:"\\]",display:!0}],throwOnError:!1})}))}},h=function(){return"\n.katex-display {\n\t\tdisplay: inline;\n\t\t.katex {\n\t\t\t\tdisplay: inline;\n\t\t\t\t.katex-html {\n\t\t\t\t\t\tdisplay: inline;\n\t\t\t\t}\n\t\t}\n}\n"}}},[[562,11,12]]]);