mirror of
https://github.com/antos-rde/antosdk-apps.git
synced 2024-11-15 18:08:21 +01:00
1 line
31 KiB
XML
1 line
31 KiB
XML
{"version":3,"file":"ext-opensave.js","sources":["../../../../node_modules/browser-fs-access/dist/index.modern.js","../../../../src/editor/extensions/ext-opensave/ext-opensave.js","../../../../src/editor/extensions/ext-opensave/locale/en.js","../../../../src/editor/extensions/ext-opensave/locale/fr.js","../../../../src/editor/extensions/ext-opensave/locale/tr.js","../../../../src/editor/extensions/ext-opensave/locale/zh-CN.js"],"sourcesContent":["const e=(()=>{if(\"undefined\"==typeof self)return!1;if(\"top\"in self&&self!==top)try{top}catch(e){return!1}else if(\"showOpenFilePicker\"in self)return\"showOpenFilePicker\";return!1})(),t=e?Promise.resolve().then(function(){return l}):Promise.resolve().then(function(){return v});async function n(...e){return(await t).default(...e)}const r=e?Promise.resolve().then(function(){return y}):Promise.resolve().then(function(){return b});async function i(...e){return(await r).default(...e)}const a=e?Promise.resolve().then(function(){return m}):Promise.resolve().then(function(){return _});async function o(...e){return(await a).default(...e)}const s=async e=>{const t=await e.getFile();return t.handle=e,t};var c=async(e=[{}])=>{Array.isArray(e)||(e=[e]);const t=[];e.forEach((e,n)=>{t[n]={description:e.description||\"Files\",accept:{}},e.mimeTypes?e.mimeTypes.map(r=>{t[n].accept[r]=e.extensions||[]}):t[n].accept[\"*/*\"]=e.extensions||[]});const n=await window.showOpenFilePicker({id:e[0].id,startIn:e[0].startIn,types:t,multiple:e[0].multiple||!1,excludeAcceptAllOption:e[0].excludeAcceptAllOption||!1}),r=await Promise.all(n.map(s));return e[0].multiple?r:r[0]},l={__proto__:null,default:c};function u(e){function t(e){if(Object(e)!==e)return Promise.reject(new TypeError(e+\" is not an object.\"));var t=e.done;return Promise.resolve(e.value).then(function(e){return{value:e,done:t}})}return u=function(e){this.s=e,this.n=e.next},u.prototype={s:null,n:null,next:function(){return t(this.n.apply(this.s,arguments))},return:function(e){var n=this.s.return;return void 0===n?Promise.resolve({value:e,done:!0}):t(n.apply(this.s,arguments))},throw:function(e){var n=this.s.return;return void 0===n?Promise.reject(e):t(n.apply(this.s,arguments))}},new u(e)}const p=async(e,t,n=e.name,r)=>{const i=[],a=[];var o,s=!1,c=!1;try{for(var l,d=function(e){var t,n,r,i=2;for(\"undefined\"!=typeof Symbol&&(n=Symbol.asyncIterator,r=Symbol.iterator);i--;){if(n&&null!=(t=e[n]))return t.call(e);if(r&&null!=(t=e[r]))return new u(t.call(e));n=\"@@asyncIterator\",r=\"@@iterator\"}throw new TypeError(\"Object is not async iterable\")}(e.values());s=!(l=await d.next()).done;s=!1){const o=l.value,s=`${n}/${o.name}`;\"file\"===o.kind?a.push(o.getFile().then(t=>(t.directoryHandle=e,t.handle=o,Object.defineProperty(t,\"webkitRelativePath\",{configurable:!0,enumerable:!0,get:()=>s})))):\"directory\"!==o.kind||!t||r&&r(o)||i.push(p(o,t,s,r))}}catch(e){c=!0,o=e}finally{try{s&&null!=d.return&&await d.return()}finally{if(c)throw o}}return[...(await Promise.all(i)).flat(),...await Promise.all(a)]};var d=async(e={})=>{e.recursive=e.recursive||!1,e.mode=e.mode||\"read\";const t=await window.showDirectoryPicker({id:e.id,startIn:e.startIn,mode:e.mode});return p(t,e.recursive,void 0,e.skipDirectory)},y={__proto__:null,default:d},f=async(e,t=[{}],n=null,r=!1,i=null)=>{Array.isArray(t)||(t=[t]),t[0].fileName=t[0].fileName||\"Untitled\";const a=[];let o=null;if(e instanceof Blob&&e.type?o=e.type:e.headers&&e.headers.get(\"content-type\")&&(o=e.headers.get(\"content-type\")),t.forEach((e,t)=>{a[t]={description:e.description||\"Files\",accept:{}},e.mimeTypes?(0===t&&o&&e.mimeTypes.push(o),e.mimeTypes.map(n=>{a[t].accept[n]=e.extensions||[]})):o?a[t].accept[o]=e.extensions||[]:a[t].accept[\"*/*\"]=e.extensions||[]}),n)try{await n.getFile()}catch(e){if(n=null,r)throw e}const s=n||await window.showSaveFilePicker({suggestedName:t[0].fileName,id:t[0].id,startIn:t[0].startIn,types:a,excludeAcceptAllOption:t[0].excludeAcceptAllOption||!1});!n&&i&&i(s);const c=await s.createWritable();if(\"stream\"in e){const t=e.stream();return await t.pipeTo(c),s}return\"body\"in e?(await e.body.pipeTo(c),s):(await c.write(await e),await c.close(),s)},m={__proto__:null,default:f},w=async(e=[{}])=>(Array.isArray(e)||(e=[e]),new Promise((t,n)=>{const r=document.createElement(\"input\");r.type=\"file\";const i=[...e.map(e=>e.mimeTypes||[]),...e.map(e=>e.extensions||[])].join();r.multiple=e[0].multiple||!1,r.accept=i||\"\",r.style.display=\"none\",document.body.append(r);const a=e=>{\"function\"==typeof o&&o(),t(e)},o=e[0].legacySetup&&e[0].legacySetup(a,()=>o(n),r),s=()=>{window.removeEventListener(\"focus\",s),r.remove()};r.addEventListener(\"click\",()=>{window.addEventListener(\"focus\",s)}),r.addEventListener(\"change\",()=>{window.removeEventListener(\"focus\",s),r.remove(),a(r.multiple?Array.from(r.files):r.files[0])}),r.click()})),v={__proto__:null,default:w},h=async(e=[{}])=>(Array.isArray(e)||(e=[e]),e[0].recursive=e[0].recursive||!1,new Promise((t,n)=>{const r=document.createElement(\"input\");r.type=\"file\",r.webkitdirectory=!0;const i=e=>{\"function\"==typeof a&&a(),t(e)},a=e[0].legacySetup&&e[0].legacySetup(i,()=>a(n),r);r.addEventListener(\"change\",()=>{let t=Array.from(r.files);e[0].recursive?e[0].recursive&&e[0].skipDirectory&&(t=t.filter(t=>t.webkitRelativePath.split(\"/\").every(t=>!e[0].skipDirectory({name:t,kind:\"directory\"})))):t=t.filter(e=>2===e.webkitRelativePath.split(\"/\").length),i(t)}),r.click()})),b={__proto__:null,default:h},P=async(e,t={})=>{Array.isArray(t)&&(t=t[0]);const n=document.createElement(\"a\");let r=e;\"body\"in e&&(r=await async function(e,t){const n=e.getReader(),r=new ReadableStream({start:e=>async function t(){return n.read().then(({done:n,value:r})=>{if(!n)return e.enqueue(r),t();e.close()})}()}),i=new Response(r),a=await i.blob();return n.releaseLock(),new Blob([a],{type:t})}(e.body,e.headers.get(\"content-type\"))),n.download=t.fileName||\"Untitled\",n.href=URL.createObjectURL(await r);const i=()=>{\"function\"==typeof a&&a()},a=t.legacySetup&&t.legacySetup(i,()=>a(),n);return n.addEventListener(\"click\",()=>{setTimeout(()=>URL.revokeObjectURL(n.href),3e4),i()}),n.click(),null},_={__proto__:null,default:P};export{i as directoryOpen,h as directoryOpenLegacy,d as directoryOpenModern,n as fileOpen,w as fileOpenLegacy,c as fileOpenModern,o as fileSave,P as fileSaveLegacy,f as fileSaveModern,e as supported};\n","/* globals seConfirm */\n/**\n * @file ext-opensave.js\n *\n * @license MIT\n *\n * @copyright 2020 OptimistikSAS\n *\n */\n\n/**\n * @type {module:svgcanvas.EventHandler}\n * @param {external:Window} wind\n * @param {module:svgcanvas.SvgCanvas#event:saved} svg The SVG source\n * @listens module:svgcanvas.SvgCanvas#event:saved\n * @returns {void}\n */\nimport { fileOpen, fileSave } from 'browser-fs-access'\n\nconst name = 'opensave'\nlet handle = null\n\nconst loadExtensionTranslation = async function (svgEditor) {\n let translationModule\n const lang = svgEditor.configObj.pref('lang')\n try {\n translationModule = await import(`./locale/${lang}.js`)\n } catch (_error) {\n console.warn(`Missing translation (${lang}) for ${name} - using 'en'`)\n translationModule = await import('./locale/en.js')\n }\n svgEditor.i18next.addResourceBundle(lang, 'translation', translationModule.default, true, true)\n}\n\nexport default {\n name,\n async init (_S) {\n const svgEditor = this\n const { svgCanvas } = svgEditor\n const { $id, $click } = svgCanvas\n await loadExtensionTranslation(svgEditor)\n /**\n * @param {Event} e\n * @returns {void}\n */\n const importImage = (e) => {\n $id('se-prompt-dialog').title = this.i18next.t('notification.loadingImage')\n $id('se-prompt-dialog').setAttribute('close', false)\n e.stopPropagation()\n e.preventDefault()\n const file = (e.type === 'drop') ? e.dataTransfer.files[0] : e.currentTarget.files[0]\n if (!file) {\n $id('se-prompt-dialog').setAttribute('close', true)\n return\n }\n\n if (!file.type.includes('image')) {\n return\n }\n // Detected an image\n // svg handling\n let reader\n if (file.type.includes('svg')) {\n reader = new FileReader()\n reader.onloadend = (ev) => {\n const newElement = this.svgCanvas.importSvgString(ev.target.result, true)\n this.svgCanvas.alignSelectedElements('m', 'page')\n this.svgCanvas.alignSelectedElements('c', 'page')\n // highlight imported element, otherwise we get strange empty selectbox\n this.svgCanvas.selectOnly([newElement])\n $id('se-prompt-dialog').setAttribute('close', true)\n }\n reader.readAsText(file)\n } else {\n // bitmap handling\n reader = new FileReader()\n reader.onloadend = ({ target: { result } }) => {\n /**\n * Insert the new image until we know its dimensions.\n * @param {Float} imageWidth\n * @param {Float} imageHeight\n * @returns {void}\n */\n const insertNewImage = (imageWidth, imageHeight) => {\n const newImage = this.svgCanvas.addSVGElementsFromJson({\n element: 'image',\n attr: {\n x: 0,\n y: 0,\n width: imageWidth,\n height: imageHeight,\n id: this.svgCanvas.getNextId(),\n style: 'pointer-events:inherit'\n }\n })\n this.svgCanvas.setHref(newImage, result)\n this.svgCanvas.selectOnly([newImage])\n this.svgCanvas.alignSelectedElements('m', 'page')\n this.svgCanvas.alignSelectedElements('c', 'page')\n this.topPanel.updateContextPanel()\n $id('se-prompt-dialog').setAttribute('close', true)\n }\n // create dummy img so we know the default dimensions\n let imgWidth = 100\n let imgHeight = 100\n const img = new Image()\n img.style.opacity = 0\n img.addEventListener('load', () => {\n imgWidth = img.offsetWidth || img.naturalWidth || img.width\n imgHeight = img.offsetHeight || img.naturalHeight || img.height\n insertNewImage(imgWidth, imgHeight)\n })\n img.src = result\n }\n reader.readAsDataURL(file)\n }\n }\n // create an input with type file to open the filesystem dialog\n const imgImport = document.createElement('input')\n imgImport.type = 'file'\n imgImport.addEventListener('change', importImage)\n // dropping a svg file will import it in the svg as well\n this.workarea.addEventListener('drop', importImage)\n\n const clickClear = async function () {\n const [x, y] = svgEditor.configObj.curConfig.dimensions\n const ok = await seConfirm(svgEditor.i18next.t('notification.QwantToClear'))\n if (ok === 'Cancel') {\n return\n }\n svgEditor.leftPanel.clickSelect()\n svgEditor.svgCanvas.clear()\n svgEditor.svgCanvas.setResolution(x, y)\n svgEditor.updateCanvas(true)\n svgEditor.zoomImage()\n svgEditor.layersPanel.populateLayers()\n svgEditor.topPanel.updateContextPanel()\n svgEditor.topPanel.updateTitle('untitled.svg')\n }\n\n /**\n * By default, this.editor.svgCanvas.open() is a no-op. It is up to an extension\n * mechanism (opera widget, etc.) to call `setCustomHandlers()` which\n * will make it do something.\n * @returns {void}\n */\n const clickOpen = async function () {\n // ask user before clearing an unsaved SVG\n const response = await svgEditor.openPrep()\n if (response === 'Cancel') { return }\n svgCanvas.clear()\n try {\n const blob = await fileOpen({\n mimeTypes: ['image/*']\n })\n const svgContent = await blob.text()\n await svgEditor.loadSvgString(svgContent)\n svgEditor.updateCanvas()\n handle = blob.handle\n svgEditor.topPanel.updateTitle(blob.name)\n svgEditor.svgCanvas.runExtensions('onOpenedDocument', {\n name: blob.name,\n lastModified: blob.lastModified,\n size: blob.size,\n type: blob.type\n })\n } catch (err) {\n if (err.name !== 'AbortError') {\n return console.error(err)\n }\n }\n }\n const b64toBlob = (b64Data, contentType = '', sliceSize = 512) => {\n const byteCharacters = atob(b64Data)\n const byteArrays = []\n for (let offset = 0; offset < byteCharacters.length; offset += sliceSize) {\n const slice = byteCharacters.slice(offset, offset + sliceSize)\n const byteNumbers = new Array(slice.length)\n for (let i = 0; i < slice.length; i++) {\n byteNumbers[i] = slice.charCodeAt(i)\n }\n const byteArray = new Uint8Array(byteNumbers)\n byteArrays.push(byteArray)\n }\n const blob = new Blob(byteArrays, { type: contentType })\n return blob\n }\n\n /**\n *\n * @returns {void}\n */\n const clickSave = async function (type) {\n const $editorDialog = $id('se-svg-editor-dialog')\n const editingsource = $editorDialog.getAttribute('dialog') === 'open'\n if (editingsource) {\n svgEditor.saveSourceEditor()\n } else {\n // In the future, more options can be provided here\n const saveOpts = {\n images: svgEditor.configObj.pref('img_save'),\n round_digits: 2\n }\n // remove the selected outline before serializing\n svgCanvas.clearSelection()\n // Update save options if provided\n if (saveOpts) {\n const saveOptions = svgCanvas.mergeDeep(svgCanvas.getSvgOption(), saveOpts)\n for (const [key, value] of Object.entries(saveOptions)) {\n svgCanvas.setSvgOption(key, value)\n }\n }\n svgCanvas.setSvgOption('apply', true)\n\n // no need for doctype, see https://jwatt.org/svg/authoring/#doctype-declaration\n const svg = '<?xml version=\"1.0\"?>\\n' + svgCanvas.svgCanvasToString()\n const b64Data = svgCanvas.encode64(svg)\n const blob = b64toBlob(b64Data, 'image/svg+xml')\n try {\n if (type === 'save' && handle !== null) {\n const throwIfExistingHandleNotGood = false\n handle = await fileSave(blob, {\n fileName: 'untitled.svg',\n extensions: ['.svg']\n }, handle, throwIfExistingHandleNotGood)\n } else {\n handle = await fileSave(blob, {\n fileName: svgEditor.title,\n extensions: ['.svg']\n })\n }\n svgEditor.topPanel.updateTitle(handle.name)\n svgCanvas.runExtensions('onSavedDocument', {\n name: handle.name,\n kind: handle.kind\n })\n } catch (err) {\n if (err.name !== 'AbortError') {\n return console.error(err)\n }\n }\n }\n }\n\n return {\n name: svgEditor.i18next.t(`${name}:name`),\n // The callback should be used to load the DOM with the appropriate UI items\n callback () {\n const buttonTemplate = `\n <se-menu-item id=\"tool_clear\" label=\"opensave.new_doc\" shortcut=\"N\" src=\"new.svg\"></se-menu-item>`\n svgCanvas.insertChildAtIndex($id('main_button'), buttonTemplate, 0)\n const openButtonTemplate = '<se-menu-item id=\"tool_open\" label=\"opensave.open_image_doc\" src=\"open.svg\"></se-menu-item>'\n svgCanvas.insertChildAtIndex($id('main_button'), openButtonTemplate, 1)\n const saveButtonTemplate = '<se-menu-item id=\"tool_save\" label=\"opensave.save_doc\" shortcut=\"S\" src=\"saveImg.svg\"></se-menu-item>'\n svgCanvas.insertChildAtIndex($id('main_button'), saveButtonTemplate, 2)\n const saveAsButtonTemplate = '<se-menu-item id=\"tool_save_as\" label=\"opensave.save_as_doc\" src=\"saveImg.svg\"></se-menu-item>'\n svgCanvas.insertChildAtIndex($id('main_button'), saveAsButtonTemplate, 3)\n const importButtonTemplate = '<se-menu-item id=\"tool_import\" label=\"tools.import_doc\" src=\"importImg.svg\"></se-menu-item>'\n svgCanvas.insertChildAtIndex($id('main_button'), importButtonTemplate, 4)\n\n // handler\n $click($id('tool_clear'), clickClear.bind(this))\n $click($id('tool_open'), clickOpen.bind(this))\n $click($id('tool_save'), clickSave.bind(this, 'save'))\n $click($id('tool_save_as'), clickSave.bind(this, 'saveas'))\n $click($id('tool_import'), () => imgImport.click())\n }\n }\n }\n}\n","export default {\n opensave: {\n new_doc: 'New Image',\n open_image_doc: 'Open SVG',\n save_doc: 'Save SVG',\n save_as_doc: 'Save as SVG'\n }\n}\n","export default {\n opensave: {\n new_doc: 'Nouvelle image',\n open_image_doc: 'Ouvrir le SVG',\n save_doc: 'Enregistrer l\\'image',\n save_as_doc: 'Enregistrer en tant qu\\'image'\n }\n}\n","export default {\n opensave: {\n new_doc: 'Yeni Resim',\n open_image_doc: 'SVG Aç',\n save_doc: 'SVG Kaydet',\n save_as_doc: 'SVG olarak Kaydet'\n }\n}\n","export default {\n opensave: {\n new_doc: '新图片',\n open_image_doc: '打开 SVG',\n save_doc: '保存图像',\n save_as_doc: '另存为图像'\n }\n}\n"],"names":["e","self","top","t","Promise","resolve","then","l","v","y","b","a","m","_","async","o","default","s","getFile","handle","__proto__","arguments","length","undefined","Array","isArray","forEach","n","description","accept","mimeTypes","map","r","extensions","window","showOpenFilePicker","id","startIn","types","multiple","excludeAcceptAllOption","all","u","Object","reject","TypeError","done","value","this","next","prototype","apply","return","throw","p","name","i","c","d","Symbol","asyncIterator","iterator","call","values","kind","push","directoryHandle","defineProperty","configurable","enumerable","get","flat","recursive","mode","showDirectoryPicker","skipDirectory","fileName","Blob","type","headers","showSaveFilePicker","suggestedName","createWritable","stream","pipeTo","body","write","close","document","createElement","join","style","display","append","legacySetup","removeEventListener","remove","addEventListener","from","files","click","webkitdirectory","filter","webkitRelativePath","split","every","getReader","ReadableStream","start","read","_ref","enqueue","Response","blob","releaseLock","download","href","URL","createObjectURL","setTimeout","revokeObjectURL","loadExtensionTranslation","svgEditor","translationModule","lang","configObj","pref","__variableDynamicImportRuntime0__","concat","_error","console","warn","en$1","i18next","addResourceBundle","extOpensave","_S","svgCanvas","$id","$click","importImage","title","setAttribute","stopPropagation","preventDefault","file","dataTransfer","currentTarget","includes","reader","FileReader","onloadend","ev","newElement","importSvgString","target","result","alignSelectedElements","selectOnly","readAsText","insertNewImage","imageWidth","imageHeight","newImage","addSVGElementsFromJson","element","attr","x","width","height","getNextId","setHref","topPanel","updateContextPanel","imgWidth","imgHeight","img","Image","opacity","offsetWidth","naturalWidth","offsetHeight","naturalHeight","src","readAsDataURL","imgImport","workarea","clickClear","curConfig","dimensions","seConfirm","leftPanel","clickSelect","clear","setResolution","updateCanvas","zoomImage","layersPanel","populateLayers","updateTitle","clickOpen","openPrep","fileOpen","svgContent","text","loadSvgString","runExtensions","lastModified","size","err","error","clickSave","getAttribute","saveSourceEditor","saveOpts","images","round_digits","clearSelection","saveOptions","mergeDeep","getSvgOption","key","entries","setSvgOption","svg","svgCanvasToString","b64Data","contentType","sliceSize","byteCharacters","atob","byteArrays","offset","slice","byteNumbers","charCodeAt","byteArray","Uint8Array","b64toBlob","encode64","throwIfExistingHandleNotGood","fileSave","callback","insertChildAtIndex","bind","opensave","new_doc","open_image_doc","save_doc","save_as_doc"],"mappings":"AAAA,MAAMA,EAAE,MAAM,GAAG,oBAAoBC,KAAK,OAAM,EAAG,GAAG,QAAQA,MAAMA,OAAOC,IAAI,IAAIA,IAAI,MAAMF,GAAG,OAAM,OAAQ,GAAG,uBAAuBC,KAAK,MAAM,qBAAqB,OAAM,GAAtK,GAA6KE,EAAEH,EAAEI,QAAQC,UAAUC,MAAK,WAAW,OAAOC,KAAIH,QAAQC,UAAUC,MAAK,WAAW,OAAOE,KAAiER,EAAEI,QAAQC,UAAUC,MAAK,WAAW,OAAOG,KAAIL,QAAQC,UAAUC,MAAK,WAAW,OAAO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