nextcloud-server/dist/files-search.js

2 lines
4.4 KiB
JavaScript

(()=>{"use strict";var e,r,t,a={97986:(e,r,t)=>{var a=t(61338),i=t(85168),o=t(63814),l=t(53334);const n=(0,t(35947).YK)().setApp("files").detectUser().build();document.addEventListener("DOMContentLoaded",(function(){const e=window.OCA;e.UnifiedSearch&&(n.info("Initializing unified search plugin: folder search from files app"),e.UnifiedSearch.registerFilterAction({id:"in-folder",appId:"files",searchFrom:"files",label:(0,l.Tl)("files","In folder"),icon:(0,o.d0)("files","app.svg"),callback:(e=!0)=>{e?(0,i.a1)("Pick plain text files").addMimeTypeFilter("httpd/unix-directory").allowDirectories(!0).addButton({label:"Pick",callback:e=>{n.info("Folder picked",{folder:e[0]});const r=e[0],t=r.root==="/files/"+r.basename?(0,l.Tl)("files","Search in all files"):(0,l.Tl)("files","Search in folder: {folder}",{folder:r.basename});(0,a.Ic)("nextcloud:unified-search:add-filter",{id:"in-folder",appId:"files",searchFrom:"files",payload:r,filterUpdateText:t,filterParams:{path:r.path}})}}).build().pick():n.debug("Folder search callback was handled without showing the file picker, it might already be open")}}))}))}},i={};function o(e){var r=i[e];if(void 0!==r)return r.exports;var t=i[e]={id:e,loaded:!1,exports:{}};return a[e].call(t.exports,t,t.exports,o),t.loaded=!0,t.exports}o.m=a,e=[],o.O=(r,t,a,i)=>{if(!t){var l=1/0;for(s=0;s<e.length;s++){for(var[t,a,i]=e[s],n=!0,d=0;d<t.length;d++)(!1&i||l>=i)&&Object.keys(o.O).every((e=>o.O[e](t[d])))?t.splice(d--,1):(n=!1,i<l&&(l=i));if(n){e.splice(s--,1);var c=a();void 0!==c&&(r=c)}}return r}i=i||0;for(var s=e.length;s>0&&e[s-1][2]>i;s--)e[s]=e[s-1];e[s]=[t,a,i]},o.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return o.d(r,{a:r}),r},o.d=(e,r)=>{for(var t in r)o.o(r,t)&&!o.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},o.f={},o.e=e=>Promise.all(Object.keys(o.f).reduce(((r,t)=>(o.f[t](e,r),r)),[])),o.u=e=>e+"-"+e+".js?v="+{3278:"692a9325b59026ce7553",3564:"1f97cb34040f17de0c20",5664:"a50e018ed5dd17d08d83",7471:"428f6893ae52e7aca00b"}[e],o.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),r={},t="nextcloud:",o.l=(e,a,i,l)=>{if(r[e])r[e].push(a);else{var n,d;if(void 0!==i)for(var c=document.getElementsByTagName("script"),s=0;s<c.length;s++){var f=c[s];if(f.getAttribute("src")==e||f.getAttribute("data-webpack")==t+i){n=f;break}}n||(d=!0,(n=document.createElement("script")).charset="utf-8",o.nc&&n.setAttribute("nonce",o.nc),n.setAttribute("data-webpack",t+i),n.src=e),r[e]=[a];var p=(t,a)=>{n.onerror=n.onload=null,clearTimeout(u);var i=r[e];if(delete r[e],n.parentNode&&n.parentNode.removeChild(n),i&&i.forEach((e=>e(a))),t)return t(a)},u=setTimeout(p.bind(null,void 0,{type:"timeout",target:n}),12e4);n.onerror=p.bind(null,n.onerror),n.onload=p.bind(null,n.onload),d&&document.head.appendChild(n)}},o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),o.j=2277,(()=>{var e;globalThis.importScripts&&(e=globalThis.location+"");var r=globalThis.document;if(!e&&r&&(r.currentScript&&"SCRIPT"===r.currentScript.tagName.toUpperCase()&&(e=r.currentScript.src),!e)){var t=r.getElementsByTagName("script");if(t.length)for(var a=t.length-1;a>-1&&(!e||!/^http(s?):/.test(e));)e=t[a--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),o.p=e})(),(()=>{o.b="undefined"!=typeof document&&document.baseURI||self.location.href;var e={2277:0};o.f.j=(r,t)=>{var a=o.o(e,r)?e[r]:void 0;if(0!==a)if(a)t.push(a[2]);else{var i=new Promise(((t,i)=>a=e[r]=[t,i]));t.push(a[2]=i);var l=o.p+o.u(r),n=new Error;o.l(l,(t=>{if(o.o(e,r)&&(0!==(a=e[r])&&(e[r]=void 0),a)){var i=t&&("load"===t.type?"missing":t.type),l=t&&t.target&&t.target.src;n.message="Loading chunk "+r+" failed.\n("+i+": "+l+")",n.name="ChunkLoadError",n.type=i,n.request=l,a[1](n)}}),"chunk-"+r,r)}},o.O.j=r=>0===e[r];var r=(r,t)=>{var a,i,[l,n,d]=t,c=0;if(l.some((r=>0!==e[r]))){for(a in n)o.o(n,a)&&(o.m[a]=n[a]);if(d)var s=d(o)}for(r&&r(t);c<l.length;c++)i=l[c],o.o(e,i)&&e[i]&&e[i][0](),e[i]=0;return o.O(s)},t=globalThis.webpackChunknextcloud=globalThis.webpackChunknextcloud||[];t.forEach(r.bind(null,0)),t.push=r.bind(null,t.push.bind(t))})(),o.nc=void 0;var l=o.O(void 0,[4208],(()=>o(97986)));l=o.O(l)})();
//# sourceMappingURL=files-search.js.map?v=55acf6d05752f7826035