diff options
author | nextcloud-command <nextcloud-command@users.noreply.github.com> | 2024-06-07 06:36:07 +0000 |
---|---|---|
committer | skjnldsv <skjnldsv@protonmail.com> | 2024-06-07 10:59:38 +0200 |
commit | 6605872cd0b99f228e6e5060a5540b549edd6d83 (patch) | |
tree | dd97e69a9bff541496bfe9e891973595ce1e76ff /dist/files_sharing-init.js | |
parent | ca9a5b7a1edb1e215578eb2403fe84201fc605a6 (diff) | |
download | nextcloud-server-6605872cd0b99f228e6e5060a5540b549edd6d83.tar.gz nextcloud-server-6605872cd0b99f228e6e5060a5540b549edd6d83.zip |
chore(assets): Recompile assets
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
Diffstat (limited to 'dist/files_sharing-init.js')
-rw-r--r-- | dist/files_sharing-init.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/dist/files_sharing-init.js b/dist/files_sharing-init.js index 73ec6cb10d1..7c542fbe0bb 100644 --- a/dist/files_sharing-init.js +++ b/dist/files_sharing-init.js @@ -1,3 +1,3 @@ -/*! For license information please see files_sharing-init.js.license?v=606d53cecb3f2aff3207 */ -(()=>{"use strict";var t,e={5924:(t,e,i)=>{var n=i(21777),r=i(84697),s=i(43627),o=i(71089),a=i(63814);i(44719),i(36117),i(2568);const l=null===(d=(0,n.HW)())?(0,r.YK)().setApp("files").build():(0,r.YK)().setApp("files").setUid(d.uid).build();var d,u=(t=>(t.DEFAULT="default",t.HIDDEN="hidden",t))(u||{});class c{_action;constructor(t){this.validateAction(t),this._action=t}get id(){return this._action.id}get displayName(){return this._action.displayName}get title(){return this._action.title}get iconSvgInline(){return this._action.iconSvgInline}get enabled(){return this._action.enabled}get exec(){return this._action.exec}get execBatch(){return this._action.execBatch}get order(){return this._action.order}get parent(){return this._action.parent}get default(){return this._action.default}get inline(){return this._action.inline}get renderInline(){return this._action.renderInline}validateAction(t){if(!t.id||"string"!=typeof t.id)throw new Error("Invalid id");if(!t.displayName||"function"!=typeof t.displayName)throw new Error("Invalid displayName function");if("title"in t&&"function"!=typeof t.title)throw new Error("Invalid title function");if(!t.iconSvgInline||"function"!=typeof t.iconSvgInline)throw new Error("Invalid iconSvgInline function");if(!t.exec||"function"!=typeof t.exec)throw new Error("Invalid exec function");if("enabled"in t&&"function"!=typeof t.enabled)throw new Error("Invalid enabled function");if("execBatch"in t&&"function"!=typeof t.execBatch)throw new Error("Invalid execBatch function");if("order"in t&&"number"!=typeof t.order)throw new Error("Invalid order");if("parent"in t&&"string"!=typeof t.parent)throw new Error("Invalid parent");if(t.default&&!Object.values(u).includes(t.default))throw new Error("Invalid default");if("inline"in t&&"function"!=typeof t.inline)throw new Error("Invalid inline function");if("renderInline"in t&&"function"!=typeof t.renderInline)throw new Error("Invalid renderInline function")}}const h=function(t){void 0===window._nc_fileactions&&(window._nc_fileactions=[],l.debug("FileActions initialized")),window._nc_fileactions.find((e=>e.id===t.id))?l.error(`FileAction ${t.id} already registered`,{action:t}):window._nc_fileactions.push(t)};var p=(t=>(t[t.NONE=0]="NONE",t[t.CREATE=4]="CREATE",t[t.READ=1]="READ",t[t.UPDATE=2]="UPDATE",t[t.DELETE=8]="DELETE",t[t.SHARE=16]="SHARE",t[t.ALL=31]="ALL",t))(p||{});const g=["d:getcontentlength","d:getcontenttype","d:getetag","d:getlastmodified","d:quota-available-bytes","d:resourcetype","nc:has-preview","nc:is-encrypted","nc:mount-type","oc:comments-unread","oc:favorite","oc:fileid","oc:owner-display-name","oc:owner-id","oc:permissions","oc:size"],f={d:"DAV:",nc:"http://nextcloud.org/ns",oc:"http://owncloud.org/ns",ocs:"http://open-collaboration-services.org/ns"},m=function(t,e={nc:"http://nextcloud.org/ns"}){void 0===window._nc_dav_properties&&(window._nc_dav_properties=[...g],window._nc_dav_namespaces={...f});const i={...window._nc_dav_namespaces,...e};return window._nc_dav_properties.find((e=>e===t))?(l.warn(`${t} already registered`,{prop:t}),!1):t.startsWith("<")||2!==t.split(":").length?(l.error(`${t} is not valid. See example: 'oc:fileid'`,{prop:t}),!1):i[t.split(":")[0]]?(window._nc_dav_properties.push(t),window._nc_dav_namespaces=i,!0):(l.error(`${t} namespace unknown`,{prop:t,namespaces:i}),!1)};var w=(t=>(t.Folder="folder",t.File="file",t))(w||{});const v=function(t,e){return null!==t.match(e)},b=(t,e)=>{if(t.id&&"number"!=typeof t.id)throw new Error("Invalid id type of value");if(!t.source)throw new Error("Missing mandatory source");try{new URL(t.source)}catch(t){throw new Error("Invalid source format, source must be a valid URL")}if(!t.source.startsWith("http"))throw new Error("Invalid source format, only http(s) is supported");if(t.mtime&&!(t.mtime instanceof Date))throw new Error("Invalid mtime type");if(t.crtime&&!(t.crtime instanceof Date))throw new Error("Invalid crtime type");if(!t.mime||"string"!=typeof t.mime||!t.mime.match(/^[-\w.]+\/[-+\w.]+$/gi))throw new Error("Missing or invalid mandatory mime");if("size"in t&&"number"!=typeof t.size&&void 0!==t.size)throw new Error("Invalid size type");if("permissions"in t&&void 0!==t.permissions&&!("number"==typeof t.permissions&&t.permissions>=p.NONE&&t.permissions<=p.ALL))throw new Error("Invalid permissions");if(t.owner&&null!==t.owner&&"string"!=typeof t.owner)throw new Error("Invalid owner type");if(t.attributes&&"object"!=typeof t.attributes)throw new Error("Invalid attributes type");if(t.root&&"string"!=typeof t.root)throw new Error("Invalid root type");if(t.root&&!t.root.startsWith("/"))throw new Error("Root must start with a leading slash");if(t.root&&!t.source.includes(t.root))throw new Error("Root must be part of the source");if(t.root&&v(t.source,e)){const i=t.source.match(e)[0];if(!t.source.includes((0,s.join)(i,t.root)))throw new Error("The root must be relative to the service. e.g /files/emma")}if(t.status&&!Object.values(x).includes(t.status))throw new Error("Status must be a valid NodeStatus")};var x=(t=>(t.NEW="new",t.FAILED="failed",t.LOADING="loading",t.LOCKED="locked",t))(x||{});class y{_data;_attributes;_knownDavService=/(remote|public)\.php\/(web)?dav/i;readonlyAttributes=Object.entries(Object.getOwnPropertyDescriptors(y.prototype)).filter((t=>"function"==typeof t[1].get&&"__proto__"!==t[0])).map((t=>t[0]));handler={set:(t,e,i)=>!this.readonlyAttributes.includes(e)&&(this.updateMtime(),Reflect.set(t,e,i)),deleteProperty:(t,e)=>!this.readonlyAttributes.includes(e)&&(this.updateMtime(),Reflect.deleteProperty(t,e)),get:(t,e,i)=>this.readonlyAttributes.includes(e)?(l.warn(`Accessing "Node.attributes.${e}" is deprecated, access it directly on the Node instance.`),Reflect.get(this,e)):Reflect.get(t,e,i)};constructor(t,e){b(t,e||this._knownDavService),this._data={...t,attributes:{}},this._attributes=new Proxy(this._data.attributes,this.handler),this.update(t.attributes??{}),this._data.mtime=t.mtime,e&&(this._knownDavService=e)}get source(){return this._data.source.replace(/\/$/i,"")}get encodedSource(){const{origin:t}=new URL(this.source);return t+(0,o.O0)(this.source.slice(t.length))}get basename(){return(0,s.basename)(this.source)}get extension(){return(0,s.extname)(this.source)}get dirname(){if(this.root){let t=this.source;this.isDavRessource&&(t=t.split(this._knownDavService).pop());const e=t.indexOf(this.root),i=this.root.replace(/\/$/,"");return(0,s.dirname)(t.slice(e+i.length)||"/")}const t=new URL(this.source);return(0,s.dirname)(t.pathname)}get mime(){return this._data.mime}get mtime(){return this._data.mtime}get crtime(){return this._data.crtime}get size(){return this._data.size}set size(t){this.updateMtime(),this._data.size=t}get attributes(){return this._attributes}get permissions(){return null!==this.owner||this.isDavRessource?void 0!==this._data.permissions?this._data.permissions:p.NONE:p.READ}set permissions(t){this.updateMtime(),this._data.permissions=t}get owner(){return this.isDavRessource?this._data.owner:null}get isDavRessource(){return v(this.source,this._knownDavService)}get root(){return this._data.root?this._data.root.replace(/^(.+)\/$/,"$1"):this.isDavRessource&&(0,s.dirname)(this.source).split(this._knownDavService).pop()||null}get path(){if(this.root){let t=this.source;this.isDavRessource&&(t=t.split(this._knownDavService).pop());const e=t.indexOf(this.root),i=this.root.replace(/\/$/,"");return t.slice(e+i.length)||"/"}return(this.dirname+"/"+this.basename).replace(/\/\//g,"/")}get fileid(){return this._data?.id}get status(){return this._data?.status}set status(t){this._data.status=t}move(t){b({...this._data,source:t},this._knownDavService),this._data.source=t,this.updateMtime()}rename(t){if(t.includes("/"))throw new Error("Invalid basename");this.move((0,s.dirname)(this.source)+"/"+t)}updateMtime(){this._data.mtime&&(this._data.mtime=new Date)}update(t){for(const[e,i]of Object.entries(t))try{void 0===i?delete this.attributes[e]:this.attributes[e]=i}catch(t){if(t instanceof TypeError)continue;throw t}}}class _ extends y{get type(){return w.File}}class A extends y{constructor(t){super({...t,mime:"httpd/unix-directory"})}get type(){return w.Folder}get extension(){return null}get mime(){return"httpd/unix-directory"}}(0,a.dC)("dav"),window._oc_config,window._oc_config?.blacklist_files_regex&&new RegExp(window._oc_config.blacklist_files_regex);class E{_views=[];_currentView=null;register(t){if(this._views.find((e=>e.id===t.id)))throw new Error(`View id ${t.id} is already registered`);this._views.push(t)}remove(t){const e=this._views.findIndex((e=>e.id===t));-1!==e&&this._views.splice(e,1)}get views(){return this._views}setActive(t){this._currentView=t}get active(){return this._currentView}}const N=function(){return void 0===window._nc_navigation&&(window._nc_navigation=new E,l.debug("Navigation service initialized")),window._nc_navigation};class T{_column;constructor(t){C(t),this._column=t}get id(){return this._column.id}get title(){return this._column.title}get render(){return this._column.render}get sort(){return this._column.sort}get summary(){return this._column.summary}}const C=function(t){if(!t.id||"string"!=typeof t.id)throw new Error("A column id is required");if(!t.title||"string"!=typeof t.title)throw new Error("A column title is required");if(!t.render||"function"!=typeof t.render)throw new Error("A render function is required");if(t.sort&&"function"!=typeof t.sort)throw new Error("Column sortFunction must be a function");if(t.summary&&"function"!=typeof t.summary)throw new Error("Column summary must be a function");return!0};var O={},I={};!function(t){const e=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",i="["+e+"]["+e+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*",n=new RegExp("^"+i+"$");t.isExist=function(t){return void 0!==t},t.isEmptyObject=function(t){return 0===Object.keys(t).length},t.merge=function(t,e,i){if(e){const n=Object.keys(e),r=n.length;for(let s=0;s<r;s++)t[n[s]]="strict"===i?[e[n[s]]]:e[n[s]]}},t.getValue=function(e){return t.isExist(e)?e:""},t.isName=function(t){return!(null==n.exec(t))},t.getAllMatches=function(t,e){const i=[];let n=e.exec(t);for(;n;){const r=[];r.startIndex=e.lastIndex-n[0].length;const s=n.length;for(let t=0;t<s;t++)r.push(n[t]);i.push(r),n=e.exec(t)}return i},t.nameRegexp=i}(I);const P=I,S={allowBooleanAttributes:!1,unpairedTags:[]};function V(t){return" "===t||"\t"===t||"\n"===t||"\r"===t}function L(t,e){const i=e;for(;e<t.length;e++)if("?"!=t[e]&&" "!=t[e]);else{const n=t.substr(i,e-i);if(e>5&&"xml"===n)return B("InvalidXml","XML declaration allowed only at the start of the document.",K(t,e));if("?"==t[e]&&">"==t[e+1]){e++;break}}return e}function D(t,e){if(t.length>e+5&&"-"===t[e+1]&&"-"===t[e+2]){for(e+=3;e<t.length;e++)if("-"===t[e]&&"-"===t[e+1]&&">"===t[e+2]){e+=2;break}}else if(t.length>e+8&&"D"===t[e+1]&&"O"===t[e+2]&&"C"===t[e+3]&&"T"===t[e+4]&&"Y"===t[e+5]&&"P"===t[e+6]&&"E"===t[e+7]){let i=1;for(e+=8;e<t.length;e++)if("<"===t[e])i++;else if(">"===t[e]&&(i--,0===i))break}else if(t.length>e+9&&"["===t[e+1]&&"C"===t[e+2]&&"D"===t[e+3]&&"A"===t[e+4]&&"T"===t[e+5]&&"A"===t[e+6]&&"["===t[e+7])for(e+=8;e<t.length;e++)if("]"===t[e]&&"]"===t[e+1]&&">"===t[e+2]){e+=2;break}return e}O.validate=function(t,e){e=Object.assign({},S,e);const i=[];let n=!1,r=!1;"\ufeff"===t[0]&&(t=t.substr(1));for(let o=0;o<t.length;o++)if("<"===t[o]&&"?"===t[o+1]){if(o+=2,o=L(t,o),o.err)return o}else{if("<"!==t[o]){if(V(t[o]))continue;return B("InvalidChar","char '"+t[o]+"' is not expected.",K(t,o))}{let a=o;if(o++,"!"===t[o]){o=D(t,o);continue}{let l=!1;"/"===t[o]&&(l=!0,o++);let d="";for(;o<t.length&&">"!==t[o]&&" "!==t[o]&&"\t"!==t[o]&&"\n"!==t[o]&&"\r"!==t[o];o++)d+=t[o];if(d=d.trim(),"/"===d[d.length-1]&&(d=d.substring(0,d.length-1),o--),s=d,!P.isName(s)){let e;return e=0===d.trim().length?"Invalid space after '<'.":"Tag '"+d+"' is an invalid name.",B("InvalidTag",e,K(t,o))}const u=M(t,o);if(!1===u)return B("InvalidAttr","Attributes for '"+d+"' have open quote.",K(t,o));let c=u.value;if(o=u.index,"/"===c[c.length-1]){const i=o-c.length;c=c.substring(0,c.length-1);const r=H(c,e);if(!0!==r)return B(r.err.code,r.err.msg,K(t,i+r.err.line));n=!0}else if(l){if(!u.tagClosed)return B("InvalidTag","Closing tag '"+d+"' doesn't have proper closing.",K(t,o));if(c.trim().length>0)return B("InvalidTag","Closing tag '"+d+"' can't have attributes or invalid starting.",K(t,a));if(0===i.length)return B("InvalidTag","Closing tag '"+d+"' has not been opened.",K(t,a));{const e=i.pop();if(d!==e.tagName){let i=K(t,e.tagStartPos);return B("InvalidTag","Expected closing tag '"+e.tagName+"' (opened in line "+i.line+", col "+i.col+") instead of closing tag '"+d+"'.",K(t,a))}0==i.length&&(r=!0)}}else{const s=H(c,e);if(!0!==s)return B(s.err.code,s.err.msg,K(t,o-c.length+s.err.line));if(!0===r)return B("InvalidXml","Multiple possible root nodes found.",K(t,o));-1!==e.unpairedTags.indexOf(d)||i.push({tagName:d,tagStartPos:a}),n=!0}for(o++;o<t.length;o++)if("<"===t[o]){if("!"===t[o+1]){o++,o=D(t,o);continue}if("?"!==t[o+1])break;if(o=L(t,++o),o.err)return o}else if("&"===t[o]){const e=F(t,o);if(-1==e)return B("InvalidChar","char '&' is not expected.",K(t,o));o=e}else if(!0===r&&!V(t[o]))return B("InvalidXml","Extra text at the end",K(t,o));"<"===t[o]&&o--}}}var s;return n?1==i.length?B("InvalidTag","Unclosed tag '"+i[0].tagName+"'.",K(t,i[0].tagStartPos)):!(i.length>0)||B("InvalidXml","Invalid '"+JSON.stringify(i.map((t=>t.tagName)),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1}):B("InvalidXml","Start tag expected.",1)};const k='"',R="'";function M(t,e){let i="",n="",r=!1;for(;e<t.length;e++){if(t[e]===k||t[e]===R)""===n?n=t[e]:n!==t[e]||(n="");else if(">"===t[e]&&""===n){r=!0;break}i+=t[e]}return""===n&&{value:i,index:e,tagClosed:r}}const j=new RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?","g");function H(t,e){const i=P.getAllMatches(t,j),n={};for(let t=0;t<i.length;t++){if(0===i[t][1].length)return B("InvalidAttr","Attribute '"+i[t][2]+"' has no space in starting.",U(i[t]));if(void 0!==i[t][3]&&void 0===i[t][4])return B("InvalidAttr","Attribute '"+i[t][2]+"' is without value.",U(i[t]));if(void 0===i[t][3]&&!e.allowBooleanAttributes)return B("InvalidAttr","boolean attribute '"+i[t][2]+"' is not allowed.",U(i[t]));const r=i[t][2];if(!$(r))return B("InvalidAttr","Attribute '"+r+"' is an invalid name.",U(i[t]));if(n.hasOwnProperty(r))return B("InvalidAttr","Attribute '"+r+"' is repeated.",U(i[t]));n[r]=1}return!0}function F(t,e){if(";"===t[++e])return-1;if("#"===t[e])return function(t,e){let i=/\d/;for("x"===t[e]&&(e++,i=/[\da-fA-F]/);e<t.length;e++){if(";"===t[e])return e;if(!t[e].match(i))break}return-1}(t,++e);let i=0;for(;e<t.length;e++,i++)if(!(t[e].match(/\w/)&&i<20)){if(";"===t[e])break;return-1}return e}function B(t,e,i){return{err:{code:t,msg:e,line:i.line||i,col:i.col}}}function $(t){return P.isName(t)}function K(t,e){const i=t.substring(0,e).split(/\r?\n/);return{line:i.length,col:i[i.length-1].length+1}}function U(t){return t.startIndex+t[1].length}var Z={};const G={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(t,e){return e},attributeValueProcessor:function(t,e){return e},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(t,e,i){return t}};Z.buildOptions=function(t){return Object.assign({},G,t)},Z.defaultOptions=G;const z=I;function Y(t,e){let i="";for(;e<t.length&&"'"!==t[e]&&'"'!==t[e];e++)i+=t[e];if(i=i.trim(),-1!==i.indexOf(" "))throw new Error("External entites are not supported");const n=t[e++];let r="";for(;e<t.length&&t[e]!==n;e++)r+=t[e];return[i,r,e]}function q(t,e){return"!"===t[e+1]&&"-"===t[e+2]&&"-"===t[e+3]}function X(t,e){return"!"===t[e+1]&&"E"===t[e+2]&&"N"===t[e+3]&&"T"===t[e+4]&&"I"===t[e+5]&&"T"===t[e+6]&&"Y"===t[e+7]}function W(t,e){return"!"===t[e+1]&&"E"===t[e+2]&&"L"===t[e+3]&&"E"===t[e+4]&&"M"===t[e+5]&&"E"===t[e+6]&&"N"===t[e+7]&&"T"===t[e+8]}function J(t,e){return"!"===t[e+1]&&"A"===t[e+2]&&"T"===t[e+3]&&"T"===t[e+4]&&"L"===t[e+5]&&"I"===t[e+6]&&"S"===t[e+7]&&"T"===t[e+8]}function Q(t,e){return"!"===t[e+1]&&"N"===t[e+2]&&"O"===t[e+3]&&"T"===t[e+4]&&"A"===t[e+5]&&"T"===t[e+6]&&"I"===t[e+7]&&"O"===t[e+8]&&"N"===t[e+9]}function tt(t){if(z.isName(t))return t;throw new Error(`Invalid entity name ${t}`)}const et=/^[-+]?0x[a-fA-F0-9]+$/,it=/^([\-\+])?(0*)(\.[0-9]+([eE]\-?[0-9]+)?|[0-9]+(\.[0-9]+([eE]\-?[0-9]+)?)?)$/;!Number.parseInt&&window.parseInt&&(Number.parseInt=window.parseInt),!Number.parseFloat&&window.parseFloat&&(Number.parseFloat=window.parseFloat);const nt={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};const rt=I,st=class{constructor(t){this.tagname=t,this.child=[],this[":@"]={}}add(t,e){"__proto__"===t&&(t="#__proto__"),this.child.push({[t]:e})}addChild(t){"__proto__"===t.tagname&&(t.tagname="#__proto__"),t[":@"]&&Object.keys(t[":@"]).length>0?this.child.push({[t.tagname]:t.child,":@":t[":@"]}):this.child.push({[t.tagname]:t.child})}},ot=function(t,e){const i={};if("O"!==t[e+3]||"C"!==t[e+4]||"T"!==t[e+5]||"Y"!==t[e+6]||"P"!==t[e+7]||"E"!==t[e+8])throw new Error("Invalid Tag instead of DOCTYPE");{e+=9;let n=1,r=!1,s=!1,o="";for(;e<t.length;e++)if("<"!==t[e]||s)if(">"===t[e]){if(s?"-"===t[e-1]&&"-"===t[e-2]&&(s=!1,n--):n--,0===n)break}else"["===t[e]?r=!0:o+=t[e];else{if(r&&X(t,e))e+=7,[entityName,val,e]=Y(t,e+1),-1===val.indexOf("&")&&(i[tt(entityName)]={regx:RegExp(`&${entityName};`,"g"),val});else if(r&&W(t,e))e+=8;else if(r&&J(t,e))e+=8;else if(r&&Q(t,e))e+=9;else{if(!q)throw new Error("Invalid DOCTYPE");s=!0}n++,o=""}if(0!==n)throw new Error("Unclosed DOCTYPE")}return{entities:i,i:e}},at=function(t,e={}){if(e=Object.assign({},nt,e),!t||"string"!=typeof t)return t;let i=t.trim();if(void 0!==e.skipLike&&e.skipLike.test(i))return t;if(e.hex&&et.test(i))return Number.parseInt(i,16);{const r=it.exec(i);if(r){const s=r[1],o=r[2];let a=(n=r[3])&&-1!==n.indexOf(".")?("."===(n=n.replace(/0+$/,""))?n="0":"."===n[0]?n="0"+n:"."===n[n.length-1]&&(n=n.substr(0,n.length-1)),n):n;const l=r[4]||r[6];if(!e.leadingZeros&&o.length>0&&s&&"."!==i[2])return t;if(!e.leadingZeros&&o.length>0&&!s&&"."!==i[1])return t;{const n=Number(i),r=""+n;return-1!==r.search(/[eE]/)||l?e.eNotation?n:t:-1!==i.indexOf(".")?"0"===r&&""===a||r===a||s&&r==="-"+a?n:t:o?a===r||s+a===r?n:t:i===r||i===s+r?n:t}}return t}var n};function lt(t){const e=Object.keys(t);for(let i=0;i<e.length;i++){const n=e[i];this.lastEntities[n]={regex:new RegExp("&"+n+";","g"),val:t[n]}}}function dt(t,e,i,n,r,s,o){if(void 0!==t&&(this.options.trimValues&&!n&&(t=t.trim()),t.length>0)){o||(t=this.replaceEntitiesValue(t));const n=this.options.tagValueProcessor(e,t,i,r,s);return null==n?t:typeof n!=typeof t||n!==t?n:this.options.trimValues||t.trim()===t?yt(t,this.options.parseTagValue,this.options.numberParseOptions):t}}function ut(t){if(this.options.removeNSPrefix){const e=t.split(":"),i="/"===t.charAt(0)?"/":"";if("xmlns"===e[0])return"";2===e.length&&(t=i+e[1])}return t}const ct=new RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?","gm");function ht(t,e,i){if(!this.options.ignoreAttributes&&"string"==typeof t){const i=rt.getAllMatches(t,ct),n=i.length,r={};for(let t=0;t<n;t++){const n=this.resolveNameSpace(i[t][1]);let s=i[t][4],o=this.options.attributeNamePrefix+n;if(n.length)if(this.options.transformAttributeName&&(o=this.options.transformAttributeName(o)),"__proto__"===o&&(o="#__proto__"),void 0!==s){this.options.trimValues&&(s=s.trim()),s=this.replaceEntitiesValue(s);const t=this.options.attributeValueProcessor(n,s,e);r[o]=null==t?s:typeof t!=typeof s||t!==s?t:yt(s,this.options.parseAttributeValue,this.options.numberParseOptions)}else this.options.allowBooleanAttributes&&(r[o]=!0)}if(!Object.keys(r).length)return;if(this.options.attributesGroupName){const t={};return t[this.options.attributesGroupName]=r,t}return r}}const pt=function(t){t=t.replace(/\r\n?/g,"\n");const e=new st("!xml");let i=e,n="",r="";for(let s=0;s<t.length;s++)if("<"===t[s])if("/"===t[s+1]){const e=vt(t,">",s,"Closing Tag is not closed.");let o=t.substring(s+2,e).trim();if(this.options.removeNSPrefix){const t=o.indexOf(":");-1!==t&&(o=o.substr(t+1))}this.options.transformTagName&&(o=this.options.transformTagName(o)),i&&(n=this.saveTextToParentTag(n,i,r));const a=r.substring(r.lastIndexOf(".")+1);if(o&&-1!==this.options.unpairedTags.indexOf(o))throw new Error(`Unpaired tag can not be used as closing tag: </${o}>`);let l=0;a&&-1!==this.options.unpairedTags.indexOf(a)?(l=r.lastIndexOf(".",r.lastIndexOf(".")-1),this.tagsNodeStack.pop()):l=r.lastIndexOf("."),r=r.substring(0,l),i=this.tagsNodeStack.pop(),n="",s=e}else if("?"===t[s+1]){let e=bt(t,s,!1,"?>");if(!e)throw new Error("Pi Tag is not closed.");if(n=this.saveTextToParentTag(n,i,r),this.options.ignoreDeclaration&&"?xml"===e.tagName||this.options.ignorePiTags);else{const t=new st(e.tagName);t.add(this.options.textNodeName,""),e.tagName!==e.tagExp&&e.attrExpPresent&&(t[":@"]=this.buildAttributesMap(e.tagExp,r,e.tagName)),this.addChild(i,t,r)}s=e.closeIndex+1}else if("!--"===t.substr(s+1,3)){const e=vt(t,"--\x3e",s+4,"Comment is not closed.");if(this.options.commentPropName){const o=t.substring(s+4,e-2);n=this.saveTextToParentTag(n,i,r),i.add(this.options.commentPropName,[{[this.options.textNodeName]:o}])}s=e}else if("!D"===t.substr(s+1,2)){const e=ot(t,s);this.docTypeEntities=e.entities,s=e.i}else if("!["===t.substr(s+1,2)){const e=vt(t,"]]>",s,"CDATA is not closed.")-2,o=t.substring(s+9,e);n=this.saveTextToParentTag(n,i,r);let a=this.parseTextData(o,i.tagname,r,!0,!1,!0,!0);null==a&&(a=""),this.options.cdataPropName?i.add(this.options.cdataPropName,[{[this.options.textNodeName]:o}]):i.add(this.options.textNodeName,a),s=e+2}else{let o=bt(t,s,this.options.removeNSPrefix),a=o.tagName;const l=o.rawTagName;let d=o.tagExp,u=o.attrExpPresent,c=o.closeIndex;this.options.transformTagName&&(a=this.options.transformTagName(a)),i&&n&&"!xml"!==i.tagname&&(n=this.saveTextToParentTag(n,i,r,!1));const h=i;if(h&&-1!==this.options.unpairedTags.indexOf(h.tagname)&&(i=this.tagsNodeStack.pop(),r=r.substring(0,r.lastIndexOf("."))),a!==e.tagname&&(r+=r?"."+a:a),this.isItStopNode(this.options.stopNodes,r,a)){let e="";if(d.length>0&&d.lastIndexOf("/")===d.length-1)"/"===a[a.length-1]?(a=a.substr(0,a.length-1),r=r.substr(0,r.length-1),d=a):d=d.substr(0,d.length-1),s=o.closeIndex;else if(-1!==this.options.unpairedTags.indexOf(a))s=o.closeIndex;else{const i=this.readStopNodeData(t,l,c+1);if(!i)throw new Error(`Unexpected end of ${l}`);s=i.i,e=i.tagContent}const n=new st(a);a!==d&&u&&(n[":@"]=this.buildAttributesMap(d,r,a)),e&&(e=this.parseTextData(e,a,r,!0,u,!0,!0)),r=r.substr(0,r.lastIndexOf(".")),n.add(this.options.textNodeName,e),this.addChild(i,n,r)}else{if(d.length>0&&d.lastIndexOf("/")===d.length-1){"/"===a[a.length-1]?(a=a.substr(0,a.length-1),r=r.substr(0,r.length-1),d=a):d=d.substr(0,d.length-1),this.options.transformTagName&&(a=this.options.transformTagName(a));const t=new st(a);a!==d&&u&&(t[":@"]=this.buildAttributesMap(d,r,a)),this.addChild(i,t,r),r=r.substr(0,r.lastIndexOf("."))}else{const t=new st(a);this.tagsNodeStack.push(i),a!==d&&u&&(t[":@"]=this.buildAttributesMap(d,r,a)),this.addChild(i,t,r),i=t}n="",s=c}}else n+=t[s];return e.child};function gt(t,e,i){const n=this.options.updateTag(e.tagname,i,e[":@"]);!1===n||("string"==typeof n?(e.tagname=n,t.addChild(e)):t.addChild(e))}const ft=function(t){if(this.options.processEntities){for(let e in this.docTypeEntities){const i=this.docTypeEntities[e];t=t.replace(i.regx,i.val)}for(let e in this.lastEntities){const i=this.lastEntities[e];t=t.replace(i.regex,i.val)}if(this.options.htmlEntities)for(let e in this.htmlEntities){const i=this.htmlEntities[e];t=t.replace(i.regex,i.val)}t=t.replace(this.ampEntity.regex,this.ampEntity.val)}return t};function mt(t,e,i,n){return t&&(void 0===n&&(n=0===Object.keys(e.child).length),void 0!==(t=this.parseTextData(t,e.tagname,i,!1,!!e[":@"]&&0!==Object.keys(e[":@"]).length,n))&&""!==t&&e.add(this.options.textNodeName,t),t=""),t}function wt(t,e,i){const n="*."+i;for(const i in t){const r=t[i];if(n===r||e===r)return!0}return!1}function vt(t,e,i,n){const r=t.indexOf(e,i);if(-1===r)throw new Error(n);return r+e.length-1}function bt(t,e,i,n=">"){const r=function(t,e,i=">"){let n,r="";for(let s=e;s<t.length;s++){let e=t[s];if(n)e===n&&(n="");else if('"'===e||"'"===e)n=e;else if(e===i[0]){if(!i[1])return{data:r,index:s};if(t[s+1]===i[1])return{data:r,index:s}}else"\t"===e&&(e=" ");r+=e}}(t,e+1,n);if(!r)return;let s=r.data;const o=r.index,a=s.search(/\s/);let l=s,d=!0;-1!==a&&(l=s.substring(0,a),s=s.substring(a+1).trimStart());const u=l;if(i){const t=l.indexOf(":");-1!==t&&(l=l.substr(t+1),d=l!==r.data.substr(t+1))}return{tagName:l,tagExp:s,closeIndex:o,attrExpPresent:d,rawTagName:u}}function xt(t,e,i){const n=i;let r=1;for(;i<t.length;i++)if("<"===t[i])if("/"===t[i+1]){const s=vt(t,">",i,`${e} is not closed`);if(t.substring(i+2,s).trim()===e&&(r--,0===r))return{tagContent:t.substring(n,i),i:s};i=s}else if("?"===t[i+1])i=vt(t,"?>",i+1,"StopNode is not closed.");else if("!--"===t.substr(i+1,3))i=vt(t,"--\x3e",i+3,"StopNode is not closed.");else if("!["===t.substr(i+1,2))i=vt(t,"]]>",i,"StopNode is not closed.")-2;else{const n=bt(t,i,">");n&&((n&&n.tagName)===e&&"/"!==n.tagExp[n.tagExp.length-1]&&r++,i=n.closeIndex)}}function yt(t,e,i){if(e&&"string"==typeof t){const e=t.trim();return"true"===e||"false"!==e&&at(t,i)}return rt.isExist(t)?t:""}var _t={};function At(t,e,i){let n;const r={};for(let s=0;s<t.length;s++){const o=t[s],a=Et(o);let l="";if(l=void 0===i?a:i+"."+a,a===e.textNodeName)void 0===n?n=o[a]:n+=""+o[a];else{if(void 0===a)continue;if(o[a]){let t=At(o[a],e,l);const i=Tt(t,e);o[":@"]?Nt(t,o[":@"],l,e):1!==Object.keys(t).length||void 0===t[e.textNodeName]||e.alwaysCreateTextNode?0===Object.keys(t).length&&(e.alwaysCreateTextNode?t[e.textNodeName]="":t=""):t=t[e.textNodeName],void 0!==r[a]&&r.hasOwnProperty(a)?(Array.isArray(r[a])||(r[a]=[r[a]]),r[a].push(t)):e.isArray(a,l,i)?r[a]=[t]:r[a]=t}}}return"string"==typeof n?n.length>0&&(r[e.textNodeName]=n):void 0!==n&&(r[e.textNodeName]=n),r}function Et(t){const e=Object.keys(t);for(let t=0;t<e.length;t++){const i=e[t];if(":@"!==i)return i}}function Nt(t,e,i,n){if(e){const r=Object.keys(e),s=r.length;for(let o=0;o<s;o++){const s=r[o];n.isArray(s,i+"."+s,!0,!0)?t[s]=[e[s]]:t[s]=e[s]}}}function Tt(t,e){const{textNodeName:i}=e,n=Object.keys(t).length;return 0===n||!(1!==n||!t[i]&&"boolean"!=typeof t[i]&&0!==t[i])}_t.prettify=function(t,e){return At(t,e)};const{buildOptions:Ct}=Z,Ot=class{constructor(t){this.options=t,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"¢"},pound:{regex:/&(pound|#163);/g,val:"£"},yen:{regex:/&(yen|#165);/g,val:"¥"},euro:{regex:/&(euro|#8364);/g,val:"€"},copyright:{regex:/&(copy|#169);/g,val:"©"},reg:{regex:/&(reg|#174);/g,val:"®"},inr:{regex:/&(inr|#8377);/g,val:"₹"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(t,e)=>String.fromCharCode(Number.parseInt(e,10))},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(t,e)=>String.fromCharCode(Number.parseInt(e,16))}},this.addExternalEntities=lt,this.parseXml=pt,this.parseTextData=dt,this.resolveNameSpace=ut,this.buildAttributesMap=ht,this.isItStopNode=wt,this.replaceEntitiesValue=ft,this.readStopNodeData=xt,this.saveTextToParentTag=mt,this.addChild=gt}},{prettify:It}=_t,Pt=O;function St(t,e,i,n){let r="",s=!1;for(let o=0;o<t.length;o++){const a=t[o],l=Vt(a);if(void 0===l)continue;let d="";if(d=0===i.length?l:`${i}.${l}`,l===e.textNodeName){let t=a[l];Dt(d,e)||(t=e.tagValueProcessor(l,t),t=kt(t,e)),s&&(r+=n),r+=t,s=!1;continue}if(l===e.cdataPropName){s&&(r+=n),r+=`<![CDATA[${a[l][0][e.textNodeName]}]]>`,s=!1;continue}if(l===e.commentPropName){r+=n+`\x3c!--${a[l][0][e.textNodeName]}--\x3e`,s=!0;continue}if("?"===l[0]){const t=Lt(a[":@"],e),i="?xml"===l?"":n;let o=a[l][0][e.textNodeName];o=0!==o.length?" "+o:"",r+=i+`<${l}${o}${t}?>`,s=!0;continue}let u=n;""!==u&&(u+=e.indentBy);const c=n+`<${l}${Lt(a[":@"],e)}`,h=St(a[l],e,d,u);-1!==e.unpairedTags.indexOf(l)?e.suppressUnpairedNode?r+=c+">":r+=c+"/>":h&&0!==h.length||!e.suppressEmptyNode?h&&h.endsWith(">")?r+=c+`>${h}${n}</${l}>`:(r+=c+">",h&&""!==n&&(h.includes("/>")||h.includes("</"))?r+=n+e.indentBy+h+n:r+=h,r+=`</${l}>`):r+=c+"/>",s=!0}return r}function Vt(t){const e=Object.keys(t);for(let i=0;i<e.length;i++){const n=e[i];if(t.hasOwnProperty(n)&&":@"!==n)return n}}function Lt(t,e){let i="";if(t&&!e.ignoreAttributes)for(let n in t){if(!t.hasOwnProperty(n))continue;let r=e.attributeValueProcessor(n,t[n]);r=kt(r,e),!0===r&&e.suppressBooleanAttributes?i+=` ${n.substr(e.attributeNamePrefix.length)}`:i+=` ${n.substr(e.attributeNamePrefix.length)}="${r}"`}return i}function Dt(t,e){let i=(t=t.substr(0,t.length-e.textNodeName.length-1)).substr(t.lastIndexOf(".")+1);for(let n in e.stopNodes)if(e.stopNodes[n]===t||e.stopNodes[n]==="*."+i)return!0;return!1}function kt(t,e){if(t&&t.length>0&&e.processEntities)for(let i=0;i<e.entities.length;i++){const n=e.entities[i];t=t.replace(n.regex,n.val)}return t}const Rt=function(t,e){let i="";return e.format&&e.indentBy.length>0&&(i="\n"),St(t,e,"",i)},Mt={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(t,e){return e},attributeValueProcessor:function(t,e){return e},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&"},{regex:new RegExp(">","g"),val:">"},{regex:new RegExp("<","g"),val:"<"},{regex:new RegExp("'","g"),val:"'"},{regex:new RegExp('"',"g"),val:"""}],processEntities:!0,stopNodes:[],oneListGroup:!1};function jt(t){this.options=Object.assign({},Mt,t),this.options.ignoreAttributes||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=Bt),this.processTextOrObjNode=Ht,this.options.format?(this.indentate=Ft,this.tagEndChar=">\n",this.newLine="\n"):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}function Ht(t,e,i){const n=this.j2x(t,i+1);return void 0!==t[this.options.textNodeName]&&1===Object.keys(t).length?this.buildTextValNode(t[this.options.textNodeName],e,n.attrStr,i):this.buildObjectNode(n.val,e,n.attrStr,i)}function Ft(t){return this.options.indentBy.repeat(t)}function Bt(t){return!(!t.startsWith(this.options.attributeNamePrefix)||t===this.options.textNodeName)&&t.substr(this.attrPrefixLen)}jt.prototype.build=function(t){return this.options.preserveOrder?Rt(t,this.options):(Array.isArray(t)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(t={[this.options.arrayNodeName]:t}),this.j2x(t,0).val)},jt.prototype.j2x=function(t,e){let i="",n="";for(let r in t)if(Object.prototype.hasOwnProperty.call(t,r))if(void 0===t[r])this.isAttribute(r)&&(n+="");else if(null===t[r])this.isAttribute(r)?n+="":"?"===r[0]?n+=this.indentate(e)+"<"+r+"?"+this.tagEndChar:n+=this.indentate(e)+"<"+r+"/"+this.tagEndChar;else if(t[r]instanceof Date)n+=this.buildTextValNode(t[r],r,"",e);else if("object"!=typeof t[r]){const s=this.isAttribute(r);if(s)i+=this.buildAttrPairStr(s,""+t[r]);else if(r===this.options.textNodeName){let e=this.options.tagValueProcessor(r,""+t[r]);n+=this.replaceEntitiesValue(e)}else n+=this.buildTextValNode(t[r],r,"",e)}else if(Array.isArray(t[r])){const i=t[r].length;let s="";for(let o=0;o<i;o++){const i=t[r][o];void 0===i||(null===i?"?"===r[0]?n+=this.indentate(e)+"<"+r+"?"+this.tagEndChar:n+=this.indentate(e)+"<"+r+"/"+this.tagEndChar:"object"==typeof i?this.options.oneListGroup?s+=this.j2x(i,e+1).val:s+=this.processTextOrObjNode(i,r,e):s+=this.buildTextValNode(i,r,"",e))}this.options.oneListGroup&&(s=this.buildObjectNode(s,r,"",e)),n+=s}else if(this.options.attributesGroupName&&r===this.options.attributesGroupName){const e=Object.keys(t[r]),n=e.length;for(let s=0;s<n;s++)i+=this.buildAttrPairStr(e[s],""+t[r][e[s]])}else n+=this.processTextOrObjNode(t[r],r,e);return{attrStr:i,val:n}},jt.prototype.buildAttrPairStr=function(t,e){return e=this.options.attributeValueProcessor(t,""+e),e=this.replaceEntitiesValue(e),this.options.suppressBooleanAttributes&&"true"===e?" "+t:" "+t+'="'+e+'"'},jt.prototype.buildObjectNode=function(t,e,i,n){if(""===t)return"?"===e[0]?this.indentate(n)+"<"+e+i+"?"+this.tagEndChar:this.indentate(n)+"<"+e+i+this.closeTag(e)+this.tagEndChar;{let r="</"+e+this.tagEndChar,s="";return"?"===e[0]&&(s="?",r=""),!i&&""!==i||-1!==t.indexOf("<")?!1!==this.options.commentPropName&&e===this.options.commentPropName&&0===s.length?this.indentate(n)+`\x3c!--${t}--\x3e`+this.newLine:this.indentate(n)+"<"+e+i+s+this.tagEndChar+t+this.indentate(n)+r:this.indentate(n)+"<"+e+i+s+">"+t+r}},jt.prototype.closeTag=function(t){let e="";return-1!==this.options.unpairedTags.indexOf(t)?this.options.suppressUnpairedNode||(e="/"):e=this.options.suppressEmptyNode?"/":`></${t}`,e},jt.prototype.buildTextValNode=function(t,e,i,n){if(!1!==this.options.cdataPropName&&e===this.options.cdataPropName)return this.indentate(n)+`<![CDATA[${t}]]>`+this.newLine;if(!1!==this.options.commentPropName&&e===this.options.commentPropName)return this.indentate(n)+`\x3c!--${t}--\x3e`+this.newLine;if("?"===e[0])return this.indentate(n)+"<"+e+i+"?"+this.tagEndChar;{let r=this.options.tagValueProcessor(e,t);return r=this.replaceEntitiesValue(r),""===r?this.indentate(n)+"<"+e+i+this.closeTag(e)+this.tagEndChar:this.indentate(n)+"<"+e+i+">"+r+"</"+e+this.tagEndChar}},jt.prototype.replaceEntitiesValue=function(t){if(t&&t.length>0&&this.options.processEntities)for(let e=0;e<this.options.entities.length;e++){const i=this.options.entities[e];t=t.replace(i.regex,i.val)}return t};var $t={XMLParser:class{constructor(t){this.externalEntities={},this.options=Ct(t)}parse(t,e){if("string"==typeof t);else{if(!t.toString)throw new Error("XML data is accepted in String or Bytes[] form.");t=t.toString()}if(e){!0===e&&(e={});const i=Pt.validate(t,e);if(!0!==i)throw Error(`${i.err.msg}:${i.err.line}:${i.err.col}`)}const i=new Ot(this.options);i.addExternalEntities(this.externalEntities);const n=i.parseXml(t);return this.options.preserveOrder||void 0===n?n:It(n,this.options)}addEntity(t,e){if(-1!==e.indexOf("&"))throw new Error("Entity value can't have '&'");if(-1!==t.indexOf("&")||-1!==t.indexOf(";"))throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '
'");if("&"===e)throw new Error("An entity with value '&' is not permitted");this.externalEntities[t]=e}},XMLValidator:O,XMLBuilder:jt};class Kt{_view;constructor(t){Ut(t),this._view=t}get id(){return this._view.id}get name(){return this._view.name}get caption(){return this._view.caption}get emptyTitle(){return this._view.emptyTitle}get emptyCaption(){return this._view.emptyCaption}get getContents(){return this._view.getContents}get icon(){return this._view.icon}set icon(t){this._view.icon=t}get order(){return this._view.order}set order(t){this._view.order=t}get params(){return this._view.params}set params(t){this._view.params=t}get columns(){return this._view.columns}get emptyView(){return this._view.emptyView}get parent(){return this._view.parent}get sticky(){return this._view.sticky}get expanded(){return this._view.expanded}set expanded(t){this._view.expanded=t}get defaultSortKey(){return this._view.defaultSortKey}}const Ut=function(t){if(!t.id||"string"!=typeof t.id)throw new Error("View id is required and must be a string");if(!t.name||"string"!=typeof t.name)throw new Error("View name is required and must be a string");if(t.columns&&t.columns.length>0&&(!t.caption||"string"!=typeof t.caption))throw new Error("View caption is required for top-level views and must be a string");if(!t.getContents||"function"!=typeof t.getContents)throw new Error("View getContents is required and must be a function");if(!t.icon||"string"!=typeof t.icon||!function(t){if("string"!=typeof t)throw new TypeError(`Expected a \`string\`, got \`${typeof t}\``);if(0===(t=t.trim()).length)return!1;if(!0!==$t.XMLValidator.validate(t))return!1;let e;const i=new $t.XMLParser;try{e=i.parse(t)}catch{return!1}return!!e&&!!Object.keys(e).some((t=>"svg"===t.toLowerCase()))}(t.icon))throw new Error("View icon is required and must be a valid svg string");if(!("order"in t)||"number"!=typeof t.order)throw new Error("View order is required and must be a number");if(t.columns&&t.columns.forEach((t=>{if(!(t instanceof T))throw new Error("View columns must be an array of Column. Invalid column found")})),t.emptyView&&"function"!=typeof t.emptyView)throw new Error("View emptyView must be a function");if(t.parent&&"string"!=typeof t.parent)throw new Error("View parent must be a string");if("sticky"in t&&"boolean"!=typeof t.sticky)throw new Error("View sticky must be a boolean");if("expanded"in t&&"boolean"!=typeof t.expanded)throw new Error("View expanded must be a boolean");if(t.defaultSortKey&&"string"!=typeof t.defaultSortKey)throw new Error("View defaultSortKey must be a string");return!0};var Zt=i(53334);const Gt='<svg xmlns="http://www.w3.org/2000/svg" id="mdi-account-group" viewBox="0 0 24 24"><path d="M12,5.5A3.5,3.5 0 0,1 15.5,9A3.5,3.5 0 0,1 12,12.5A3.5,3.5 0 0,1 8.5,9A3.5,3.5 0 0,1 12,5.5M5,8C5.56,8 6.08,8.15 6.53,8.42C6.38,9.85 6.8,11.27 7.66,12.38C7.16,13.34 6.16,14 5,14A3,3 0 0,1 2,11A3,3 0 0,1 5,8M19,8A3,3 0 0,1 22,11A3,3 0 0,1 19,14C17.84,14 16.84,13.34 16.34,12.38C17.2,11.27 17.62,9.85 17.47,8.42C17.92,8.15 18.44,8 19,8M5.5,18.25C5.5,16.18 8.41,14.5 12,14.5C15.59,14.5 18.5,16.18 18.5,18.25V20H5.5V18.25M0,20V18.5C0,17.11 1.89,15.94 4.45,15.6C3.86,16.28 3.5,17.22 3.5,18.25V20H0M24,20H20.5V18.25C20.5,17.22 20.14,16.28 19.55,15.6C22.11,15.94 24,17.11 24,18.5V20Z" /></svg>',zt='<svg xmlns="http://www.w3.org/2000/svg" id="mdi-account-plus" viewBox="0 0 24 24"><path d="M15,14C12.33,14 7,15.33 7,18V20H23V18C23,15.33 17.67,14 15,14M6,10V7H4V10H1V12H4V15H6V12H9V10M15,12A4,4 0 0,0 19,8A4,4 0 0,0 15,4A4,4 0 0,0 11,8A4,4 0 0,0 15,12Z" /></svg>',Yt='<svg xmlns="http://www.w3.org/2000/svg" id="mdi-link" viewBox="0 0 24 24"><path d="M3.9,12C3.9,10.29 5.29,8.9 7,8.9H11V7H7A5,5 0 0,0 2,12A5,5 0 0,0 7,17H11V15.1H7C5.29,15.1 3.9,13.71 3.9,12M8,13H16V11H8V13M17,7H13V8.9H17C18.71,8.9 20.1,10.29 20.1,12C20.1,13.71 18.71,15.1 17,15.1H13V17H17A5,5 0 0,0 22,12A5,5 0 0,0 17,7Z" /></svg>';var qt=i(26287),Xt=i(53529);const Wt=(0,Xt.YK)().setApp("files_sharing").detectUser().build();var Jt;const Qt="/files/".concat(null===(Jt=(0,n.HW)())||void 0===Jt?void 0:Jt.uid),te={"Content-Type":"application/json"},ee=function(t){try{var e;const i="folder"===(null==t?void 0:t.item_type),n=!0===(null==t?void 0:t.has_preview),r=i?A:_,s=t.file_source,o=(null==t?void 0:t.path)||t.file_target,l=(0,a.dC)("dav/".concat(Qt,"/").concat(o).replaceAll(/\/\//gm,"/"));let d=null!=t&&t.item_mtime?new Date(1e3*t.item_mtime):void 0;return(null==t?void 0:t.stime)>((null==t?void 0:t.item_mtime)||0)&&(d=new Date(1e3*t.stime)),new r({id:s,source:l,owner:null==t?void 0:t.uid_owner,mime:null==t?void 0:t.mimetype,mtime:d,size:null==t?void 0:t.item_size,permissions:(null==t?void 0:t.item_permissions)||(null==t?void 0:t.permissions),root:Qt,attributes:{...t,"has-preview":n,"owner-id":null==t?void 0:t.uid_owner,"owner-display-name":null==t?void 0:t.displayname_owner,"share-types":null==t?void 0:t.share_type,favorite:null!=t&&null!==(e=t.tags)&&void 0!==e&&e.includes(window.OC.TAG_FAVORITE)?1:0}})}catch(t){return Wt.error("Error while parsing OCS entry",{error:t}),null}},ie=function(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const e=(0,a.KT)("apps/files_sharing/api/v1/shares");return qt.A.get(e,{headers:te,params:{shared_with_me:t,include_tags:!0}})},ne=async function(){var t;let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[];const o=[];(!(arguments.length>0&&void 0!==arguments[0])||arguments[0])&&o.push(ie(!0),function(){const t=(0,a.KT)("apps/files_sharing/api/v1/remote_shares");return qt.A.get(t,{headers:te,params:{include_tags:!0}})}()),e&&o.push(ie()),i&&o.push(function(){const t=(0,a.KT)("apps/files_sharing/api/v1/shares/pending");return qt.A.get(t,{headers:te,params:{include_tags:!0}})}(),function(){const t=(0,a.KT)("apps/files_sharing/api/v1/remote_shares/pending");return qt.A.get(t,{headers:te,params:{include_tags:!0}})}()),r&&o.push(function(){const t=(0,a.KT)("apps/files_sharing/api/v1/deletedshares");return qt.A.get(t,{headers:te,params:{include_tags:!0}})}());let l=(await Promise.all(o)).map((t=>t.data.ocs.data)).flat().map(ee).filter((t=>null!==t));var d,u;return s.length>0&&(l=l.filter((t=>{var e;return s.includes(null===(e=t.attributes)||void 0===e?void 0:e.share_type)}))),l=(d=l,u="source",Object.values(d.reduce((function(t,e){return(t[e[u]]=t[e[u]]||[]).push(e),t}),{}))).map((t=>{const e=t[0];return e.attributes["share-types"]=t.map((t=>t.attributes["share-types"])),e})),{folder:new A({id:0,source:(0,a.dC)("dav"+Qt),owner:(null===(t=(0,n.HW)())||void 0===t?void 0:t.uid)||null}),contents:l}},re="shareoverview",se="sharingin",oe="sharingout",ae="sharinglinks",le="deletedshares",de="pendingshares";var ue=i(61338);h(new c({id:"accept-share",displayName:t=>(0,Zt.zw)("files_sharing","Accept share","Accept shares",t.length),iconSvgInline:()=>'<svg xmlns="http://www.w3.org/2000/svg" id="mdi-check" viewBox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z" /></svg>',enabled:(t,e)=>t.length>0&&e.id===de,async exec(t){try{const e=!!t.attributes.remote,i=(0,a.KT)("apps/files_sharing/api/v1/{shareBase}/pending/{id}",{shareBase:e?"remote_shares":"shares",id:t.attributes.id});return await qt.A.post(i),(0,ue.Ic)("files:node:deleted",t),!0}catch(t){return!1}},async execBatch(t,e,i){return Promise.all(t.map((t=>this.exec(t,e,i))))},order:1,inline:()=>!0})),h(new c({id:"open-in-files",displayName:()=>(0,Zt.Tl)("files","Open in Files"),iconSvgInline:()=>"",enabled:(t,e)=>[re,se,oe,ae].includes(e.id),exec:async t=>(window.OCP.Files.Router.goToRoute(null,{view:"files",fileid:t.fileid},{dir:t.dirname}),null),order:-1e3,default:u.HIDDEN})),h(new c({id:"reject-share",displayName:t=>(0,Zt.zw)("files_sharing","Reject share","Reject shares",t.length),iconSvgInline:()=>'<svg xmlns="http://www.w3.org/2000/svg" id="mdi-close" viewBox="0 0 24 24"><path d="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z" /></svg>',enabled:(t,e)=>e.id===de&&0!==t.length&&!t.some((t=>t.attributes.remote_id&&t.attributes.share_type===window.OC.Share.SHARE_TYPE_REMOTE_GROUP)),async exec(t){try{const e=!!t.attributes.remote,i=(0,a.KT)("apps/files_sharing/api/v1/{shareBase}/{id}",{shareBase:e?"remote_shares":"shares",id:t.attributes.id});return await qt.A.delete(i),(0,ue.Ic)("files:node:deleted",t),!0}catch(t){return!1}},async execBatch(t,e,i){return Promise.all(t.map((t=>this.exec(t,e,i))))},order:2,inline:()=>!0})),h(new c({id:"restore-share",displayName:t=>(0,Zt.zw)("files_sharing","Restore share","Restore shares",t.length),iconSvgInline:()=>'<svg xmlns="http://www.w3.org/2000/svg" id="mdi-arrow-u-left-top" viewBox="0 0 24 24"><path d="M20 13.5C20 17.09 17.09 20 13.5 20H6V18H13.5C16 18 18 16 18 13.5S16 9 13.5 9H7.83L10.91 12.09L9.5 13.5L4 8L9.5 2.5L10.92 3.91L7.83 7H13.5C17.09 7 20 9.91 20 13.5Z" /></svg>',enabled:(t,e)=>t.length>0&&e.id===le,async exec(t){try{const e=(0,a.KT)("apps/files_sharing/api/v1/deletedshares/{id}",{id:t.attributes.id});return await qt.A.post(e),(0,ue.Ic)("files:node:deleted",t),!0}catch(t){return!1}},async execBatch(t,e,i){return Promise.all(t.map((t=>this.exec(t,e,i))))},order:1,inline:()=>!0}));var ce=i(52129),he=i(49981);const pe=(0,Xt.YK)().setApp("files").detectUser().build(),ge=new c({id:"details",displayName:()=>(0,Zt.Tl)("files","Open details"),iconSvgInline:()=>he,enabled:t=>{var e,i,n;return 1===t.length&&!!t[0]&&!(null===(e=window)||void 0===e||null===(e=e.OCA)||void 0===e||null===(e=e.Files)||void 0===e||!e.Sidebar)&&null!==(i=(null===(n=t[0].root)||void 0===n?void 0:n.startsWith("/files/"))&&t[0].permissions!==p.NONE)&&void 0!==i&&i},async exec(t,e,i){try{return await window.OCA.Files.Sidebar.open(t.path),window.OCP.Files.Router.goToRoute(null,{view:e.id,fileid:t.fileid},{dir:i},!0),null}catch(t){return pe.error("Error while opening sidebar",{error:t}),!1}},order:-50});var fe=i(85072),me=i.n(fe),we=i(97825),ve=i.n(we),be=i(77659),xe=i.n(be),ye=i(55056),_e=i.n(ye),Ae=i(10540),Ee=i.n(Ae),Ne=i(41113),Te=i.n(Ne),Ce=i(8132),Oe={};Oe.styleTagTransform=Te(),Oe.setAttributes=_e(),Oe.insert=xe().bind(null,"head"),Oe.domAPI=ve(),Oe.insertStyleElement=Ee(),me()(Ce.A,Oe),Ce.A&&Ce.A.locals&&Ce.A.locals;const Ie=new c({id:"sharing-status",displayName(t){var e,i,r;const s=t[0],o=Object.values((null==s||null===(e=s.attributes)||void 0===e?void 0:e["share-types"])||{}).flat(),a=null==s||null===(i=s.attributes)||void 0===i?void 0:i["owner-id"];return o.length>0||a&&a!==(null===(r=(0,n.HW)())||void 0===r?void 0:r.uid)?(0,Zt.Tl)("files_sharing","Shared"):""},title(t){var e,i,r,s;const o=t[0],a=null==o||null===(e=o.attributes)||void 0===e?void 0:e["owner-id"],l=null==o||null===(i=o.attributes)||void 0===i?void 0:i["owner-display-name"];return Array.isArray(null===(r=o.attributes)||void 0===r?void 0:r["share-types"])?(0,Zt.Tl)("files_sharing","Shared multiple times with different people"):a&&a!==(null===(s=(0,n.HW)())||void 0===s?void 0:s.uid)?(0,Zt.Tl)("files_sharing","Shared by {ownerDisplayName}",{ownerDisplayName:l}):(0,Zt.Tl)("files_sharing","Show sharing options")},iconSvgInline(t){var e,i,r,s;const o=t[0],l=Object.values((null==o||null===(e=o.attributes)||void 0===e?void 0:e["share-types"])||{}).flat();if(Array.isArray(null===(i=o.attributes)||void 0===i?void 0:i["share-types"]))return zt;if(l.includes(ce.Z.SHARE_TYPE_LINK)||l.includes(ce.Z.SHARE_TYPE_EMAIL))return Yt;if(l.includes(ce.Z.SHARE_TYPE_GROUP)||l.includes(ce.Z.SHARE_TYPE_REMOTE_GROUP))return Gt;if(l.includes(ce.Z.SHARE_TYPE_CIRCLE))return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12,5.5A3.5,3.5 0 0,1 15.5,9A3.5,3.5 0 0,1 12,12.5A3.5,3.5 0 0,1 8.5,9A3.5,3.5 0 0,1 12,5.5M5,8C5.56,8 6.08,8.15 6.53,8.42C6.38,9.85 6.8,11.27 7.66,12.38C7.16,13.34 6.16,14 5,14A3,3 0 0,1 2,11A3,3 0 0,1 5,8M19,8A3,3 0 0,1 22,11A3,3 0 0,1 19,14C17.84,14 16.84,13.34 16.34,12.38C17.2,11.27 17.62,9.85 17.47,8.42C17.92,8.15 18.44,8 19,8M5.5,18.25C5.5,16.18 8.41,14.5 12,14.5C15.59,14.5 18.5,16.18 18.5,18.25V20H5.5V18.25M0,20V18.5C0,17.11 1.89,15.94 4.45,15.6C3.86,16.28 3.5,17.22 3.5,18.25V20H0M24,20H20.5V18.25C20.5,17.22 20.14,16.28 19.55,15.6C22.11,15.94 24,17.11 24,18.5V20Z" /></svg>';const d=null==o||null===(r=o.attributes)||void 0===r?void 0:r["owner-id"];return d&&d!==(null===(s=(0,n.HW)())||void 0===s?void 0:s.uid)?(t=>{const e=(0,a.Jv)("/avatar/{userId}/32",{userId:t});return'<svg width="32" height="32" viewBox="0 0 32 32"\n\t\txmlns="http://www.w3.org/2000/svg" class="sharing-status__avatar">\n\t\t<image href="'.concat(e,'" height="32" width="32" />\n\t</svg>')})(d):zt},enabled(t){var e,i,r;if(1!==t.length)return!1;const s=t[0],o=null==s||null===(e=s.attributes)||void 0===e?void 0:e["owner-id"];return!!Array.isArray(null===(i=s.attributes)||void 0===i?void 0:i["share-types"])||!(!o||o===(null===(r=(0,n.HW)())||void 0===r?void 0:r.uid))||0!=(s.permissions&p.SHARE)},async exec(t,e,i){var n,r;return 0!=(t.permissions&p.READ)?(null===(n=window.OCA)||void 0===n||null===(n=n.Files)||void 0===n||null===(n=n.Sidebar)||void 0===n||null===(r=n.setActiveTab)||void 0===r||r.call(n,"sharing"),ge.exec(t,e,i)):null},inline:()=>!0});h(Ie),(()=>{const t=N();t.register(new Kt({id:re,name:(0,Zt.Tl)("files_sharing","Shares"),caption:(0,Zt.Tl)("files_sharing","Overview of shared files."),emptyTitle:(0,Zt.Tl)("files_sharing","No shares"),emptyCaption:(0,Zt.Tl)("files_sharing","Files and folders you shared or have been shared with you will show up here"),icon:zt,order:20,columns:[],getContents:()=>ne()})),t.register(new Kt({id:se,name:(0,Zt.Tl)("files_sharing","Shared with you"),caption:(0,Zt.Tl)("files_sharing","List of files that are shared with you."),emptyTitle:(0,Zt.Tl)("files_sharing","Nothing shared with you yet"),emptyCaption:(0,Zt.Tl)("files_sharing","Files and folders others shared with you will show up here"),icon:'<svg xmlns="http://www.w3.org/2000/svg" id="mdi-account" viewBox="0 0 24 24"><path d="M12,4A4,4 0 0,1 16,8A4,4 0 0,1 12,12A4,4 0 0,1 8,8A4,4 0 0,1 12,4M12,14C16.42,14 20,15.79 20,18V20H4V18C4,15.79 7.58,14 12,14Z" /></svg>',order:1,parent:re,columns:[],getContents:()=>ne(!0,!1,!1,!1)})),t.register(new Kt({id:oe,name:(0,Zt.Tl)("files_sharing","Shared with others"),caption:(0,Zt.Tl)("files_sharing","List of files that you shared with others."),emptyTitle:(0,Zt.Tl)("files_sharing","Nothing shared yet"),emptyCaption:(0,Zt.Tl)("files_sharing","Files and folders you shared will show up here"),icon:Gt,order:2,parent:re,columns:[],getContents:()=>ne(!1,!0,!1,!1)})),t.register(new Kt({id:ae,name:(0,Zt.Tl)("files_sharing","Shared by link"),caption:(0,Zt.Tl)("files_sharing","List of files that are shared by link."),emptyTitle:(0,Zt.Tl)("files_sharing","No shared links"),emptyCaption:(0,Zt.Tl)("files_sharing","Files and folders you shared by link will show up here"),icon:Yt,order:3,parent:re,columns:[],getContents:()=>ne(!1,!0,!1,!1,[window.OC.Share.SHARE_TYPE_LINK])})),t.register(new Kt({id:le,name:(0,Zt.Tl)("files_sharing","Deleted shares"),caption:(0,Zt.Tl)("files_sharing","List of shares you left."),emptyTitle:(0,Zt.Tl)("files_sharing","No deleted shares"),emptyCaption:(0,Zt.Tl)("files_sharing","Shares you have left will show up here"),icon:'<svg xmlns="http://www.w3.org/2000/svg" id="mdi-delete" viewBox="0 0 24 24"><path d="M19,4H15.5L14.5,3H9.5L8.5,4H5V6H19M6,19A2,2 0 0,0 8,21H16A2,2 0 0,0 18,19V7H6V19Z" /></svg>',order:4,parent:re,columns:[],getContents:()=>ne(!1,!1,!1,!0)})),t.register(new Kt({id:de,name:(0,Zt.Tl)("files_sharing","Pending shares"),caption:(0,Zt.Tl)("files_sharing","List of unapproved shares."),emptyTitle:(0,Zt.Tl)("files_sharing","No pending shares"),emptyCaption:(0,Zt.Tl)("files_sharing","Shares you have received but not approved will show up here"),icon:'<svg xmlns="http://www.w3.org/2000/svg" id="mdi-account-clock" viewBox="0 0 24 24"><path d="M10.63,14.1C12.23,10.58 16.38,9.03 19.9,10.63C23.42,12.23 24.97,16.38 23.37,19.9C22.24,22.4 19.75,24 17,24C14.3,24 11.83,22.44 10.67,20H1V18C1.06,16.86 1.84,15.93 3.34,15.18C4.84,14.43 6.72,14.04 9,14C9.57,14 10.11,14.05 10.63,14.1V14.1M9,4C10.12,4.03 11.06,4.42 11.81,5.17C12.56,5.92 12.93,6.86 12.93,8C12.93,9.14 12.56,10.08 11.81,10.83C11.06,11.58 10.12,11.95 9,11.95C7.88,11.95 6.94,11.58 6.19,10.83C5.44,10.08 5.07,9.14 5.07,8C5.07,6.86 5.44,5.92 6.19,5.17C6.94,4.42 7.88,4.03 9,4M17,22A5,5 0 0,0 22,17A5,5 0 0,0 17,12A5,5 0 0,0 12,17A5,5 0 0,0 17,22M16,14H17.5V16.82L19.94,18.23L19.19,19.53L16,17.69V14Z" /></svg>',order:5,parent:re,columns:[],getContents:()=>ne(!1,!1,!0,!1)}))})(),m("nc:share-attributes",{nc:"http://nextcloud.org/ns"}),m("oc:share-types",{oc:"http://owncloud.org/ns"}),m("ocs:share-permissions",{ocs:"http://open-collaboration-services.org/ns"})},8132:(t,e,i)=>{i.d(e,{A:()=>a});var n=i(71354),r=i.n(n),s=i(76314),o=i.n(s)()(r());o.push([t.id,".action-items>.files-list__row-action-sharing-status{direction:rtl;padding-right:0 !important}svg.sharing-status__avatar{height:32px !important;width:32px !important;max-height:32px !important;max-width:32px !important;border-radius:32px;overflow:hidden}","",{version:3,sources:["webpack://./apps/files_sharing/src/actions/sharingStatusAction.scss"],names:[],mappings:"AAKA,qDAEC,aAAA,CAEG,0BAAA,CAGJ,2BACC,sBAAA,CACA,qBAAA,CACA,0BAAA,CACA,yBAAA,CACA,kBAAA,CACA,eAAA",sourcesContent:["/**\n * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n // Only when rendered inline, when not enough space, this is put in the menu\n.action-items > .files-list__row-action-sharing-status {\n\t// put icon at the end of the button\n\tdirection: rtl;\n\t// align icons with textless inline actions\n padding-right: 0 !important;\n}\n\nsvg.sharing-status__avatar {\n\theight: 32px !important;\n\twidth: 32px !important;\n\tmax-height: 32px !important;\n\tmax-width: 32px !important;\n\tborder-radius: 32px;\n\toverflow: hidden;\n}\n"],sourceRoot:""}]);const a=o}},i={};function n(t){var r=i[t];if(void 0!==r)return r.exports;var s=i[t]={id:t,loaded:!1,exports:{}};return e[t].call(s.exports,s,s.exports,n),s.loaded=!0,s.exports}n.m=e,t=[],n.O=(e,i,r,s)=>{if(!i){var o=1/0;for(u=0;u<t.length;u++){i=t[u][0],r=t[u][1],s=t[u][2];for(var a=!0,l=0;l<i.length;l++)(!1&s||o>=s)&&Object.keys(n.O).every((t=>n.O[t](i[l])))?i.splice(l--,1):(a=!1,s<o&&(o=s));if(a){t.splice(u--,1);var d=r();void 0!==d&&(e=d)}}return e}s=s||0;for(var u=t.length;u>0&&t[u-1][2]>s;u--)t[u]=t[u-1];t[u]=[i,r,s]},n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.e=()=>Promise.resolve(),n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.nmd=t=>(t.paths=[],t.children||(t.children=[]),t),n.j=5928,(()=>{n.b=document.baseURI||self.location.href;var t={5928:0};n.O.j=e=>0===t[e];var e=(e,i)=>{var r,s,o=i[0],a=i[1],l=i[2],d=0;if(o.some((e=>0!==t[e]))){for(r in a)n.o(a,r)&&(n.m[r]=a[r]);if(l)var u=l(n)}for(e&&e(i);d<o.length;d++)s=o[d],n.o(t,s)&&t[s]&&t[s][0](),t[s]=0;return n.O(u)},i=self.webpackChunknextcloud=self.webpackChunknextcloud||[];i.forEach(e.bind(null,0)),i.push=e.bind(null,i.push.bind(i))})(),n.nc=void 0;var r=n.O(void 0,[4208],(()=>n(5924)));r=n.O(r)})(); -//# sourceMappingURL=files_sharing-init.js.map?v=606d53cecb3f2aff3207
\ No newline at end of file +/*! For license information please see files_sharing-init.js.license?v=c0a7fef12c8bceca823b */ +(()=>{"use strict";var t,e={5924:(t,e,i)=>{var n=i(21777),r=i(84697),s=i(43627),o=i(71089),a=i(63814);i(44719),i(36117),i(2568);const l=null===(d=(0,n.HW)())?(0,r.YK)().setApp("files").build():(0,r.YK)().setApp("files").setUid(d.uid).build();var d,u=(t=>(t.DEFAULT="default",t.HIDDEN="hidden",t))(u||{});class c{_action;constructor(t){this.validateAction(t),this._action=t}get id(){return this._action.id}get displayName(){return this._action.displayName}get title(){return this._action.title}get iconSvgInline(){return this._action.iconSvgInline}get enabled(){return this._action.enabled}get exec(){return this._action.exec}get execBatch(){return this._action.execBatch}get order(){return this._action.order}get parent(){return this._action.parent}get default(){return this._action.default}get inline(){return this._action.inline}get renderInline(){return this._action.renderInline}validateAction(t){if(!t.id||"string"!=typeof t.id)throw new Error("Invalid id");if(!t.displayName||"function"!=typeof t.displayName)throw new Error("Invalid displayName function");if("title"in t&&"function"!=typeof t.title)throw new Error("Invalid title function");if(!t.iconSvgInline||"function"!=typeof t.iconSvgInline)throw new Error("Invalid iconSvgInline function");if(!t.exec||"function"!=typeof t.exec)throw new Error("Invalid exec function");if("enabled"in t&&"function"!=typeof t.enabled)throw new Error("Invalid enabled function");if("execBatch"in t&&"function"!=typeof t.execBatch)throw new Error("Invalid execBatch function");if("order"in t&&"number"!=typeof t.order)throw new Error("Invalid order");if("parent"in t&&"string"!=typeof t.parent)throw new Error("Invalid parent");if(t.default&&!Object.values(u).includes(t.default))throw new Error("Invalid default");if("inline"in t&&"function"!=typeof t.inline)throw new Error("Invalid inline function");if("renderInline"in t&&"function"!=typeof t.renderInline)throw new Error("Invalid renderInline function")}}const h=function(t){void 0===window._nc_fileactions&&(window._nc_fileactions=[],l.debug("FileActions initialized")),window._nc_fileactions.find((e=>e.id===t.id))?l.error(`FileAction ${t.id} already registered`,{action:t}):window._nc_fileactions.push(t)};var p=(t=>(t[t.NONE=0]="NONE",t[t.CREATE=4]="CREATE",t[t.READ=1]="READ",t[t.UPDATE=2]="UPDATE",t[t.DELETE=8]="DELETE",t[t.SHARE=16]="SHARE",t[t.ALL=31]="ALL",t))(p||{});const g=["d:getcontentlength","d:getcontenttype","d:getetag","d:getlastmodified","d:quota-available-bytes","d:resourcetype","nc:has-preview","nc:is-encrypted","nc:mount-type","oc:comments-unread","oc:favorite","oc:fileid","oc:owner-display-name","oc:owner-id","oc:permissions","oc:size"],f={d:"DAV:",nc:"http://nextcloud.org/ns",oc:"http://owncloud.org/ns",ocs:"http://open-collaboration-services.org/ns"},m=function(t,e={nc:"http://nextcloud.org/ns"}){void 0===window._nc_dav_properties&&(window._nc_dav_properties=[...g],window._nc_dav_namespaces={...f});const i={...window._nc_dav_namespaces,...e};return window._nc_dav_properties.find((e=>e===t))?(l.warn(`${t} already registered`,{prop:t}),!1):t.startsWith("<")||2!==t.split(":").length?(l.error(`${t} is not valid. See example: 'oc:fileid'`,{prop:t}),!1):i[t.split(":")[0]]?(window._nc_dav_properties.push(t),window._nc_dav_namespaces=i,!0):(l.error(`${t} namespace unknown`,{prop:t,namespaces:i}),!1)};var w=(t=>(t.Folder="folder",t.File="file",t))(w||{});const v=function(t,e){return null!==t.match(e)},b=(t,e)=>{if(t.id&&"number"!=typeof t.id)throw new Error("Invalid id type of value");if(!t.source)throw new Error("Missing mandatory source");try{new URL(t.source)}catch(t){throw new Error("Invalid source format, source must be a valid URL")}if(!t.source.startsWith("http"))throw new Error("Invalid source format, only http(s) is supported");if(t.mtime&&!(t.mtime instanceof Date))throw new Error("Invalid mtime type");if(t.crtime&&!(t.crtime instanceof Date))throw new Error("Invalid crtime type");if(!t.mime||"string"!=typeof t.mime||!t.mime.match(/^[-\w.]+\/[-+\w.]+$/gi))throw new Error("Missing or invalid mandatory mime");if("size"in t&&"number"!=typeof t.size&&void 0!==t.size)throw new Error("Invalid size type");if("permissions"in t&&void 0!==t.permissions&&!("number"==typeof t.permissions&&t.permissions>=p.NONE&&t.permissions<=p.ALL))throw new Error("Invalid permissions");if(t.owner&&null!==t.owner&&"string"!=typeof t.owner)throw new Error("Invalid owner type");if(t.attributes&&"object"!=typeof t.attributes)throw new Error("Invalid attributes type");if(t.root&&"string"!=typeof t.root)throw new Error("Invalid root type");if(t.root&&!t.root.startsWith("/"))throw new Error("Root must start with a leading slash");if(t.root&&!t.source.includes(t.root))throw new Error("Root must be part of the source");if(t.root&&v(t.source,e)){const i=t.source.match(e)[0];if(!t.source.includes((0,s.join)(i,t.root)))throw new Error("The root must be relative to the service. e.g /files/emma")}if(t.status&&!Object.values(x).includes(t.status))throw new Error("Status must be a valid NodeStatus")};var x=(t=>(t.NEW="new",t.FAILED="failed",t.LOADING="loading",t.LOCKED="locked",t))(x||{});class y{_data;_attributes;_knownDavService=/(remote|public)\.php\/(web)?dav/i;readonlyAttributes=Object.entries(Object.getOwnPropertyDescriptors(y.prototype)).filter((t=>"function"==typeof t[1].get&&"__proto__"!==t[0])).map((t=>t[0]));handler={set:(t,e,i)=>!this.readonlyAttributes.includes(e)&&Reflect.set(t,e,i),deleteProperty:(t,e)=>!this.readonlyAttributes.includes(e)&&Reflect.deleteProperty(t,e),get:(t,e,i)=>this.readonlyAttributes.includes(e)?(l.warn(`Accessing "Node.attributes.${e}" is deprecated, access it directly on the Node instance.`),Reflect.get(this,e)):Reflect.get(t,e,i)};constructor(t,e){b(t,e||this._knownDavService),this._data={...t,attributes:{}},this._attributes=new Proxy(this._data.attributes,this.handler),this.update(t.attributes??{}),e&&(this._knownDavService=e)}get source(){return this._data.source.replace(/\/$/i,"")}get encodedSource(){const{origin:t}=new URL(this.source);return t+(0,o.O0)(this.source.slice(t.length))}get basename(){return(0,s.basename)(this.source)}get extension(){return(0,s.extname)(this.source)}get dirname(){if(this.root){let t=this.source;this.isDavRessource&&(t=t.split(this._knownDavService).pop());const e=t.indexOf(this.root),i=this.root.replace(/\/$/,"");return(0,s.dirname)(t.slice(e+i.length)||"/")}const t=new URL(this.source);return(0,s.dirname)(t.pathname)}get mime(){return this._data.mime}get mtime(){return this._data.mtime}set mtime(t){this._data.mtime=t}get crtime(){return this._data.crtime}get size(){return this._data.size}set size(t){this.updateMtime(),this._data.size=t}get attributes(){return this._attributes}get permissions(){return null!==this.owner||this.isDavRessource?void 0!==this._data.permissions?this._data.permissions:p.NONE:p.READ}set permissions(t){this.updateMtime(),this._data.permissions=t}get owner(){return this.isDavRessource?this._data.owner:null}get isDavRessource(){return v(this.source,this._knownDavService)}get root(){return this._data.root?this._data.root.replace(/^(.+)\/$/,"$1"):this.isDavRessource&&(0,s.dirname)(this.source).split(this._knownDavService).pop()||null}get path(){if(this.root){let t=this.source;this.isDavRessource&&(t=t.split(this._knownDavService).pop());const e=t.indexOf(this.root),i=this.root.replace(/\/$/,"");return t.slice(e+i.length)||"/"}return(this.dirname+"/"+this.basename).replace(/\/\//g,"/")}get fileid(){return this._data?.id}get status(){return this._data?.status}set status(t){this._data.status=t}move(t){b({...this._data,source:t},this._knownDavService),this._data.source=t,this.updateMtime()}rename(t){if(t.includes("/"))throw new Error("Invalid basename");this.move((0,s.dirname)(this.source)+"/"+t)}updateMtime(){this._data.mtime&&(this._data.mtime=new Date)}update(t){for(const[e,i]of Object.entries(t))try{void 0===i?delete this.attributes[e]:this.attributes[e]=i}catch(t){if(t instanceof TypeError)continue;throw t}}}class _ extends y{get type(){return w.File}}class A extends y{constructor(t){super({...t,mime:"httpd/unix-directory"})}get type(){return w.Folder}get extension(){return null}get mime(){return"httpd/unix-directory"}}(0,a.dC)("dav"),window._oc_config,window._oc_config?.blacklist_files_regex&&new RegExp(window._oc_config.blacklist_files_regex);class E{_views=[];_currentView=null;register(t){if(this._views.find((e=>e.id===t.id)))throw new Error(`View id ${t.id} is already registered`);this._views.push(t)}remove(t){const e=this._views.findIndex((e=>e.id===t));-1!==e&&this._views.splice(e,1)}get views(){return this._views}setActive(t){this._currentView=t}get active(){return this._currentView}}const N=function(){return void 0===window._nc_navigation&&(window._nc_navigation=new E,l.debug("Navigation service initialized")),window._nc_navigation};class T{_column;constructor(t){C(t),this._column=t}get id(){return this._column.id}get title(){return this._column.title}get render(){return this._column.render}get sort(){return this._column.sort}get summary(){return this._column.summary}}const C=function(t){if(!t.id||"string"!=typeof t.id)throw new Error("A column id is required");if(!t.title||"string"!=typeof t.title)throw new Error("A column title is required");if(!t.render||"function"!=typeof t.render)throw new Error("A render function is required");if(t.sort&&"function"!=typeof t.sort)throw new Error("Column sortFunction must be a function");if(t.summary&&"function"!=typeof t.summary)throw new Error("Column summary must be a function");return!0};var O={},I={};!function(t){const e=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",i="["+e+"]["+e+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*",n=new RegExp("^"+i+"$");t.isExist=function(t){return void 0!==t},t.isEmptyObject=function(t){return 0===Object.keys(t).length},t.merge=function(t,e,i){if(e){const n=Object.keys(e),r=n.length;for(let s=0;s<r;s++)t[n[s]]="strict"===i?[e[n[s]]]:e[n[s]]}},t.getValue=function(e){return t.isExist(e)?e:""},t.isName=function(t){return!(null==n.exec(t))},t.getAllMatches=function(t,e){const i=[];let n=e.exec(t);for(;n;){const r=[];r.startIndex=e.lastIndex-n[0].length;const s=n.length;for(let t=0;t<s;t++)r.push(n[t]);i.push(r),n=e.exec(t)}return i},t.nameRegexp=i}(I);const P=I,S={allowBooleanAttributes:!1,unpairedTags:[]};function V(t){return" "===t||"\t"===t||"\n"===t||"\r"===t}function L(t,e){const i=e;for(;e<t.length;e++)if("?"!=t[e]&&" "!=t[e]);else{const n=t.substr(i,e-i);if(e>5&&"xml"===n)return B("InvalidXml","XML declaration allowed only at the start of the document.",K(t,e));if("?"==t[e]&&">"==t[e+1]){e++;break}}return e}function D(t,e){if(t.length>e+5&&"-"===t[e+1]&&"-"===t[e+2]){for(e+=3;e<t.length;e++)if("-"===t[e]&&"-"===t[e+1]&&">"===t[e+2]){e+=2;break}}else if(t.length>e+8&&"D"===t[e+1]&&"O"===t[e+2]&&"C"===t[e+3]&&"T"===t[e+4]&&"Y"===t[e+5]&&"P"===t[e+6]&&"E"===t[e+7]){let i=1;for(e+=8;e<t.length;e++)if("<"===t[e])i++;else if(">"===t[e]&&(i--,0===i))break}else if(t.length>e+9&&"["===t[e+1]&&"C"===t[e+2]&&"D"===t[e+3]&&"A"===t[e+4]&&"T"===t[e+5]&&"A"===t[e+6]&&"["===t[e+7])for(e+=8;e<t.length;e++)if("]"===t[e]&&"]"===t[e+1]&&">"===t[e+2]){e+=2;break}return e}O.validate=function(t,e){e=Object.assign({},S,e);const i=[];let n=!1,r=!1;"\ufeff"===t[0]&&(t=t.substr(1));for(let o=0;o<t.length;o++)if("<"===t[o]&&"?"===t[o+1]){if(o+=2,o=L(t,o),o.err)return o}else{if("<"!==t[o]){if(V(t[o]))continue;return B("InvalidChar","char '"+t[o]+"' is not expected.",K(t,o))}{let a=o;if(o++,"!"===t[o]){o=D(t,o);continue}{let l=!1;"/"===t[o]&&(l=!0,o++);let d="";for(;o<t.length&&">"!==t[o]&&" "!==t[o]&&"\t"!==t[o]&&"\n"!==t[o]&&"\r"!==t[o];o++)d+=t[o];if(d=d.trim(),"/"===d[d.length-1]&&(d=d.substring(0,d.length-1),o--),s=d,!P.isName(s)){let e;return e=0===d.trim().length?"Invalid space after '<'.":"Tag '"+d+"' is an invalid name.",B("InvalidTag",e,K(t,o))}const u=M(t,o);if(!1===u)return B("InvalidAttr","Attributes for '"+d+"' have open quote.",K(t,o));let c=u.value;if(o=u.index,"/"===c[c.length-1]){const i=o-c.length;c=c.substring(0,c.length-1);const r=H(c,e);if(!0!==r)return B(r.err.code,r.err.msg,K(t,i+r.err.line));n=!0}else if(l){if(!u.tagClosed)return B("InvalidTag","Closing tag '"+d+"' doesn't have proper closing.",K(t,o));if(c.trim().length>0)return B("InvalidTag","Closing tag '"+d+"' can't have attributes or invalid starting.",K(t,a));if(0===i.length)return B("InvalidTag","Closing tag '"+d+"' has not been opened.",K(t,a));{const e=i.pop();if(d!==e.tagName){let i=K(t,e.tagStartPos);return B("InvalidTag","Expected closing tag '"+e.tagName+"' (opened in line "+i.line+", col "+i.col+") instead of closing tag '"+d+"'.",K(t,a))}0==i.length&&(r=!0)}}else{const s=H(c,e);if(!0!==s)return B(s.err.code,s.err.msg,K(t,o-c.length+s.err.line));if(!0===r)return B("InvalidXml","Multiple possible root nodes found.",K(t,o));-1!==e.unpairedTags.indexOf(d)||i.push({tagName:d,tagStartPos:a}),n=!0}for(o++;o<t.length;o++)if("<"===t[o]){if("!"===t[o+1]){o++,o=D(t,o);continue}if("?"!==t[o+1])break;if(o=L(t,++o),o.err)return o}else if("&"===t[o]){const e=F(t,o);if(-1==e)return B("InvalidChar","char '&' is not expected.",K(t,o));o=e}else if(!0===r&&!V(t[o]))return B("InvalidXml","Extra text at the end",K(t,o));"<"===t[o]&&o--}}}var s;return n?1==i.length?B("InvalidTag","Unclosed tag '"+i[0].tagName+"'.",K(t,i[0].tagStartPos)):!(i.length>0)||B("InvalidXml","Invalid '"+JSON.stringify(i.map((t=>t.tagName)),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1}):B("InvalidXml","Start tag expected.",1)};const k='"',R="'";function M(t,e){let i="",n="",r=!1;for(;e<t.length;e++){if(t[e]===k||t[e]===R)""===n?n=t[e]:n!==t[e]||(n="");else if(">"===t[e]&&""===n){r=!0;break}i+=t[e]}return""===n&&{value:i,index:e,tagClosed:r}}const j=new RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?","g");function H(t,e){const i=P.getAllMatches(t,j),n={};for(let t=0;t<i.length;t++){if(0===i[t][1].length)return B("InvalidAttr","Attribute '"+i[t][2]+"' has no space in starting.",U(i[t]));if(void 0!==i[t][3]&&void 0===i[t][4])return B("InvalidAttr","Attribute '"+i[t][2]+"' is without value.",U(i[t]));if(void 0===i[t][3]&&!e.allowBooleanAttributes)return B("InvalidAttr","boolean attribute '"+i[t][2]+"' is not allowed.",U(i[t]));const r=i[t][2];if(!$(r))return B("InvalidAttr","Attribute '"+r+"' is an invalid name.",U(i[t]));if(n.hasOwnProperty(r))return B("InvalidAttr","Attribute '"+r+"' is repeated.",U(i[t]));n[r]=1}return!0}function F(t,e){if(";"===t[++e])return-1;if("#"===t[e])return function(t,e){let i=/\d/;for("x"===t[e]&&(e++,i=/[\da-fA-F]/);e<t.length;e++){if(";"===t[e])return e;if(!t[e].match(i))break}return-1}(t,++e);let i=0;for(;e<t.length;e++,i++)if(!(t[e].match(/\w/)&&i<20)){if(";"===t[e])break;return-1}return e}function B(t,e,i){return{err:{code:t,msg:e,line:i.line||i,col:i.col}}}function $(t){return P.isName(t)}function K(t,e){const i=t.substring(0,e).split(/\r?\n/);return{line:i.length,col:i[i.length-1].length+1}}function U(t){return t.startIndex+t[1].length}var Z={};const G={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(t,e){return e},attributeValueProcessor:function(t,e){return e},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(t,e,i){return t}};Z.buildOptions=function(t){return Object.assign({},G,t)},Z.defaultOptions=G;const z=I;function Y(t,e){let i="";for(;e<t.length&&"'"!==t[e]&&'"'!==t[e];e++)i+=t[e];if(i=i.trim(),-1!==i.indexOf(" "))throw new Error("External entites are not supported");const n=t[e++];let r="";for(;e<t.length&&t[e]!==n;e++)r+=t[e];return[i,r,e]}function q(t,e){return"!"===t[e+1]&&"-"===t[e+2]&&"-"===t[e+3]}function X(t,e){return"!"===t[e+1]&&"E"===t[e+2]&&"N"===t[e+3]&&"T"===t[e+4]&&"I"===t[e+5]&&"T"===t[e+6]&&"Y"===t[e+7]}function W(t,e){return"!"===t[e+1]&&"E"===t[e+2]&&"L"===t[e+3]&&"E"===t[e+4]&&"M"===t[e+5]&&"E"===t[e+6]&&"N"===t[e+7]&&"T"===t[e+8]}function J(t,e){return"!"===t[e+1]&&"A"===t[e+2]&&"T"===t[e+3]&&"T"===t[e+4]&&"L"===t[e+5]&&"I"===t[e+6]&&"S"===t[e+7]&&"T"===t[e+8]}function Q(t,e){return"!"===t[e+1]&&"N"===t[e+2]&&"O"===t[e+3]&&"T"===t[e+4]&&"A"===t[e+5]&&"T"===t[e+6]&&"I"===t[e+7]&&"O"===t[e+8]&&"N"===t[e+9]}function tt(t){if(z.isName(t))return t;throw new Error(`Invalid entity name ${t}`)}const et=/^[-+]?0x[a-fA-F0-9]+$/,it=/^([\-\+])?(0*)(\.[0-9]+([eE]\-?[0-9]+)?|[0-9]+(\.[0-9]+([eE]\-?[0-9]+)?)?)$/;!Number.parseInt&&window.parseInt&&(Number.parseInt=window.parseInt),!Number.parseFloat&&window.parseFloat&&(Number.parseFloat=window.parseFloat);const nt={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};const rt=I,st=class{constructor(t){this.tagname=t,this.child=[],this[":@"]={}}add(t,e){"__proto__"===t&&(t="#__proto__"),this.child.push({[t]:e})}addChild(t){"__proto__"===t.tagname&&(t.tagname="#__proto__"),t[":@"]&&Object.keys(t[":@"]).length>0?this.child.push({[t.tagname]:t.child,":@":t[":@"]}):this.child.push({[t.tagname]:t.child})}},ot=function(t,e){const i={};if("O"!==t[e+3]||"C"!==t[e+4]||"T"!==t[e+5]||"Y"!==t[e+6]||"P"!==t[e+7]||"E"!==t[e+8])throw new Error("Invalid Tag instead of DOCTYPE");{e+=9;let n=1,r=!1,s=!1,o="";for(;e<t.length;e++)if("<"!==t[e]||s)if(">"===t[e]){if(s?"-"===t[e-1]&&"-"===t[e-2]&&(s=!1,n--):n--,0===n)break}else"["===t[e]?r=!0:o+=t[e];else{if(r&&X(t,e))e+=7,[entityName,val,e]=Y(t,e+1),-1===val.indexOf("&")&&(i[tt(entityName)]={regx:RegExp(`&${entityName};`,"g"),val});else if(r&&W(t,e))e+=8;else if(r&&J(t,e))e+=8;else if(r&&Q(t,e))e+=9;else{if(!q)throw new Error("Invalid DOCTYPE");s=!0}n++,o=""}if(0!==n)throw new Error("Unclosed DOCTYPE")}return{entities:i,i:e}},at=function(t,e={}){if(e=Object.assign({},nt,e),!t||"string"!=typeof t)return t;let i=t.trim();if(void 0!==e.skipLike&&e.skipLike.test(i))return t;if(e.hex&&et.test(i))return Number.parseInt(i,16);{const r=it.exec(i);if(r){const s=r[1],o=r[2];let a=(n=r[3])&&-1!==n.indexOf(".")?("."===(n=n.replace(/0+$/,""))?n="0":"."===n[0]?n="0"+n:"."===n[n.length-1]&&(n=n.substr(0,n.length-1)),n):n;const l=r[4]||r[6];if(!e.leadingZeros&&o.length>0&&s&&"."!==i[2])return t;if(!e.leadingZeros&&o.length>0&&!s&&"."!==i[1])return t;{const n=Number(i),r=""+n;return-1!==r.search(/[eE]/)||l?e.eNotation?n:t:-1!==i.indexOf(".")?"0"===r&&""===a||r===a||s&&r==="-"+a?n:t:o?a===r||s+a===r?n:t:i===r||i===s+r?n:t}}return t}var n};function lt(t){const e=Object.keys(t);for(let i=0;i<e.length;i++){const n=e[i];this.lastEntities[n]={regex:new RegExp("&"+n+";","g"),val:t[n]}}}function dt(t,e,i,n,r,s,o){if(void 0!==t&&(this.options.trimValues&&!n&&(t=t.trim()),t.length>0)){o||(t=this.replaceEntitiesValue(t));const n=this.options.tagValueProcessor(e,t,i,r,s);return null==n?t:typeof n!=typeof t||n!==t?n:this.options.trimValues||t.trim()===t?yt(t,this.options.parseTagValue,this.options.numberParseOptions):t}}function ut(t){if(this.options.removeNSPrefix){const e=t.split(":"),i="/"===t.charAt(0)?"/":"";if("xmlns"===e[0])return"";2===e.length&&(t=i+e[1])}return t}const ct=new RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?","gm");function ht(t,e,i){if(!this.options.ignoreAttributes&&"string"==typeof t){const i=rt.getAllMatches(t,ct),n=i.length,r={};for(let t=0;t<n;t++){const n=this.resolveNameSpace(i[t][1]);let s=i[t][4],o=this.options.attributeNamePrefix+n;if(n.length)if(this.options.transformAttributeName&&(o=this.options.transformAttributeName(o)),"__proto__"===o&&(o="#__proto__"),void 0!==s){this.options.trimValues&&(s=s.trim()),s=this.replaceEntitiesValue(s);const t=this.options.attributeValueProcessor(n,s,e);r[o]=null==t?s:typeof t!=typeof s||t!==s?t:yt(s,this.options.parseAttributeValue,this.options.numberParseOptions)}else this.options.allowBooleanAttributes&&(r[o]=!0)}if(!Object.keys(r).length)return;if(this.options.attributesGroupName){const t={};return t[this.options.attributesGroupName]=r,t}return r}}const pt=function(t){t=t.replace(/\r\n?/g,"\n");const e=new st("!xml");let i=e,n="",r="";for(let s=0;s<t.length;s++)if("<"===t[s])if("/"===t[s+1]){const e=vt(t,">",s,"Closing Tag is not closed.");let o=t.substring(s+2,e).trim();if(this.options.removeNSPrefix){const t=o.indexOf(":");-1!==t&&(o=o.substr(t+1))}this.options.transformTagName&&(o=this.options.transformTagName(o)),i&&(n=this.saveTextToParentTag(n,i,r));const a=r.substring(r.lastIndexOf(".")+1);if(o&&-1!==this.options.unpairedTags.indexOf(o))throw new Error(`Unpaired tag can not be used as closing tag: </${o}>`);let l=0;a&&-1!==this.options.unpairedTags.indexOf(a)?(l=r.lastIndexOf(".",r.lastIndexOf(".")-1),this.tagsNodeStack.pop()):l=r.lastIndexOf("."),r=r.substring(0,l),i=this.tagsNodeStack.pop(),n="",s=e}else if("?"===t[s+1]){let e=bt(t,s,!1,"?>");if(!e)throw new Error("Pi Tag is not closed.");if(n=this.saveTextToParentTag(n,i,r),this.options.ignoreDeclaration&&"?xml"===e.tagName||this.options.ignorePiTags);else{const t=new st(e.tagName);t.add(this.options.textNodeName,""),e.tagName!==e.tagExp&&e.attrExpPresent&&(t[":@"]=this.buildAttributesMap(e.tagExp,r,e.tagName)),this.addChild(i,t,r)}s=e.closeIndex+1}else if("!--"===t.substr(s+1,3)){const e=vt(t,"--\x3e",s+4,"Comment is not closed.");if(this.options.commentPropName){const o=t.substring(s+4,e-2);n=this.saveTextToParentTag(n,i,r),i.add(this.options.commentPropName,[{[this.options.textNodeName]:o}])}s=e}else if("!D"===t.substr(s+1,2)){const e=ot(t,s);this.docTypeEntities=e.entities,s=e.i}else if("!["===t.substr(s+1,2)){const e=vt(t,"]]>",s,"CDATA is not closed.")-2,o=t.substring(s+9,e);n=this.saveTextToParentTag(n,i,r);let a=this.parseTextData(o,i.tagname,r,!0,!1,!0,!0);null==a&&(a=""),this.options.cdataPropName?i.add(this.options.cdataPropName,[{[this.options.textNodeName]:o}]):i.add(this.options.textNodeName,a),s=e+2}else{let o=bt(t,s,this.options.removeNSPrefix),a=o.tagName;const l=o.rawTagName;let d=o.tagExp,u=o.attrExpPresent,c=o.closeIndex;this.options.transformTagName&&(a=this.options.transformTagName(a)),i&&n&&"!xml"!==i.tagname&&(n=this.saveTextToParentTag(n,i,r,!1));const h=i;if(h&&-1!==this.options.unpairedTags.indexOf(h.tagname)&&(i=this.tagsNodeStack.pop(),r=r.substring(0,r.lastIndexOf("."))),a!==e.tagname&&(r+=r?"."+a:a),this.isItStopNode(this.options.stopNodes,r,a)){let e="";if(d.length>0&&d.lastIndexOf("/")===d.length-1)"/"===a[a.length-1]?(a=a.substr(0,a.length-1),r=r.substr(0,r.length-1),d=a):d=d.substr(0,d.length-1),s=o.closeIndex;else if(-1!==this.options.unpairedTags.indexOf(a))s=o.closeIndex;else{const i=this.readStopNodeData(t,l,c+1);if(!i)throw new Error(`Unexpected end of ${l}`);s=i.i,e=i.tagContent}const n=new st(a);a!==d&&u&&(n[":@"]=this.buildAttributesMap(d,r,a)),e&&(e=this.parseTextData(e,a,r,!0,u,!0,!0)),r=r.substr(0,r.lastIndexOf(".")),n.add(this.options.textNodeName,e),this.addChild(i,n,r)}else{if(d.length>0&&d.lastIndexOf("/")===d.length-1){"/"===a[a.length-1]?(a=a.substr(0,a.length-1),r=r.substr(0,r.length-1),d=a):d=d.substr(0,d.length-1),this.options.transformTagName&&(a=this.options.transformTagName(a));const t=new st(a);a!==d&&u&&(t[":@"]=this.buildAttributesMap(d,r,a)),this.addChild(i,t,r),r=r.substr(0,r.lastIndexOf("."))}else{const t=new st(a);this.tagsNodeStack.push(i),a!==d&&u&&(t[":@"]=this.buildAttributesMap(d,r,a)),this.addChild(i,t,r),i=t}n="",s=c}}else n+=t[s];return e.child};function gt(t,e,i){const n=this.options.updateTag(e.tagname,i,e[":@"]);!1===n||("string"==typeof n?(e.tagname=n,t.addChild(e)):t.addChild(e))}const ft=function(t){if(this.options.processEntities){for(let e in this.docTypeEntities){const i=this.docTypeEntities[e];t=t.replace(i.regx,i.val)}for(let e in this.lastEntities){const i=this.lastEntities[e];t=t.replace(i.regex,i.val)}if(this.options.htmlEntities)for(let e in this.htmlEntities){const i=this.htmlEntities[e];t=t.replace(i.regex,i.val)}t=t.replace(this.ampEntity.regex,this.ampEntity.val)}return t};function mt(t,e,i,n){return t&&(void 0===n&&(n=0===Object.keys(e.child).length),void 0!==(t=this.parseTextData(t,e.tagname,i,!1,!!e[":@"]&&0!==Object.keys(e[":@"]).length,n))&&""!==t&&e.add(this.options.textNodeName,t),t=""),t}function wt(t,e,i){const n="*."+i;for(const i in t){const r=t[i];if(n===r||e===r)return!0}return!1}function vt(t,e,i,n){const r=t.indexOf(e,i);if(-1===r)throw new Error(n);return r+e.length-1}function bt(t,e,i,n=">"){const r=function(t,e,i=">"){let n,r="";for(let s=e;s<t.length;s++){let e=t[s];if(n)e===n&&(n="");else if('"'===e||"'"===e)n=e;else if(e===i[0]){if(!i[1])return{data:r,index:s};if(t[s+1]===i[1])return{data:r,index:s}}else"\t"===e&&(e=" ");r+=e}}(t,e+1,n);if(!r)return;let s=r.data;const o=r.index,a=s.search(/\s/);let l=s,d=!0;-1!==a&&(l=s.substring(0,a),s=s.substring(a+1).trimStart());const u=l;if(i){const t=l.indexOf(":");-1!==t&&(l=l.substr(t+1),d=l!==r.data.substr(t+1))}return{tagName:l,tagExp:s,closeIndex:o,attrExpPresent:d,rawTagName:u}}function xt(t,e,i){const n=i;let r=1;for(;i<t.length;i++)if("<"===t[i])if("/"===t[i+1]){const s=vt(t,">",i,`${e} is not closed`);if(t.substring(i+2,s).trim()===e&&(r--,0===r))return{tagContent:t.substring(n,i),i:s};i=s}else if("?"===t[i+1])i=vt(t,"?>",i+1,"StopNode is not closed.");else if("!--"===t.substr(i+1,3))i=vt(t,"--\x3e",i+3,"StopNode is not closed.");else if("!["===t.substr(i+1,2))i=vt(t,"]]>",i,"StopNode is not closed.")-2;else{const n=bt(t,i,">");n&&((n&&n.tagName)===e&&"/"!==n.tagExp[n.tagExp.length-1]&&r++,i=n.closeIndex)}}function yt(t,e,i){if(e&&"string"==typeof t){const e=t.trim();return"true"===e||"false"!==e&&at(t,i)}return rt.isExist(t)?t:""}var _t={};function At(t,e,i){let n;const r={};for(let s=0;s<t.length;s++){const o=t[s],a=Et(o);let l="";if(l=void 0===i?a:i+"."+a,a===e.textNodeName)void 0===n?n=o[a]:n+=""+o[a];else{if(void 0===a)continue;if(o[a]){let t=At(o[a],e,l);const i=Tt(t,e);o[":@"]?Nt(t,o[":@"],l,e):1!==Object.keys(t).length||void 0===t[e.textNodeName]||e.alwaysCreateTextNode?0===Object.keys(t).length&&(e.alwaysCreateTextNode?t[e.textNodeName]="":t=""):t=t[e.textNodeName],void 0!==r[a]&&r.hasOwnProperty(a)?(Array.isArray(r[a])||(r[a]=[r[a]]),r[a].push(t)):e.isArray(a,l,i)?r[a]=[t]:r[a]=t}}}return"string"==typeof n?n.length>0&&(r[e.textNodeName]=n):void 0!==n&&(r[e.textNodeName]=n),r}function Et(t){const e=Object.keys(t);for(let t=0;t<e.length;t++){const i=e[t];if(":@"!==i)return i}}function Nt(t,e,i,n){if(e){const r=Object.keys(e),s=r.length;for(let o=0;o<s;o++){const s=r[o];n.isArray(s,i+"."+s,!0,!0)?t[s]=[e[s]]:t[s]=e[s]}}}function Tt(t,e){const{textNodeName:i}=e,n=Object.keys(t).length;return 0===n||!(1!==n||!t[i]&&"boolean"!=typeof t[i]&&0!==t[i])}_t.prettify=function(t,e){return At(t,e)};const{buildOptions:Ct}=Z,Ot=class{constructor(t){this.options=t,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"¢"},pound:{regex:/&(pound|#163);/g,val:"£"},yen:{regex:/&(yen|#165);/g,val:"¥"},euro:{regex:/&(euro|#8364);/g,val:"€"},copyright:{regex:/&(copy|#169);/g,val:"©"},reg:{regex:/&(reg|#174);/g,val:"®"},inr:{regex:/&(inr|#8377);/g,val:"₹"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(t,e)=>String.fromCharCode(Number.parseInt(e,10))},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(t,e)=>String.fromCharCode(Number.parseInt(e,16))}},this.addExternalEntities=lt,this.parseXml=pt,this.parseTextData=dt,this.resolveNameSpace=ut,this.buildAttributesMap=ht,this.isItStopNode=wt,this.replaceEntitiesValue=ft,this.readStopNodeData=xt,this.saveTextToParentTag=mt,this.addChild=gt}},{prettify:It}=_t,Pt=O;function St(t,e,i,n){let r="",s=!1;for(let o=0;o<t.length;o++){const a=t[o],l=Vt(a);if(void 0===l)continue;let d="";if(d=0===i.length?l:`${i}.${l}`,l===e.textNodeName){let t=a[l];Dt(d,e)||(t=e.tagValueProcessor(l,t),t=kt(t,e)),s&&(r+=n),r+=t,s=!1;continue}if(l===e.cdataPropName){s&&(r+=n),r+=`<![CDATA[${a[l][0][e.textNodeName]}]]>`,s=!1;continue}if(l===e.commentPropName){r+=n+`\x3c!--${a[l][0][e.textNodeName]}--\x3e`,s=!0;continue}if("?"===l[0]){const t=Lt(a[":@"],e),i="?xml"===l?"":n;let o=a[l][0][e.textNodeName];o=0!==o.length?" "+o:"",r+=i+`<${l}${o}${t}?>`,s=!0;continue}let u=n;""!==u&&(u+=e.indentBy);const c=n+`<${l}${Lt(a[":@"],e)}`,h=St(a[l],e,d,u);-1!==e.unpairedTags.indexOf(l)?e.suppressUnpairedNode?r+=c+">":r+=c+"/>":h&&0!==h.length||!e.suppressEmptyNode?h&&h.endsWith(">")?r+=c+`>${h}${n}</${l}>`:(r+=c+">",h&&""!==n&&(h.includes("/>")||h.includes("</"))?r+=n+e.indentBy+h+n:r+=h,r+=`</${l}>`):r+=c+"/>",s=!0}return r}function Vt(t){const e=Object.keys(t);for(let i=0;i<e.length;i++){const n=e[i];if(t.hasOwnProperty(n)&&":@"!==n)return n}}function Lt(t,e){let i="";if(t&&!e.ignoreAttributes)for(let n in t){if(!t.hasOwnProperty(n))continue;let r=e.attributeValueProcessor(n,t[n]);r=kt(r,e),!0===r&&e.suppressBooleanAttributes?i+=` ${n.substr(e.attributeNamePrefix.length)}`:i+=` ${n.substr(e.attributeNamePrefix.length)}="${r}"`}return i}function Dt(t,e){let i=(t=t.substr(0,t.length-e.textNodeName.length-1)).substr(t.lastIndexOf(".")+1);for(let n in e.stopNodes)if(e.stopNodes[n]===t||e.stopNodes[n]==="*."+i)return!0;return!1}function kt(t,e){if(t&&t.length>0&&e.processEntities)for(let i=0;i<e.entities.length;i++){const n=e.entities[i];t=t.replace(n.regex,n.val)}return t}const Rt=function(t,e){let i="";return e.format&&e.indentBy.length>0&&(i="\n"),St(t,e,"",i)},Mt={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(t,e){return e},attributeValueProcessor:function(t,e){return e},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&"},{regex:new RegExp(">","g"),val:">"},{regex:new RegExp("<","g"),val:"<"},{regex:new RegExp("'","g"),val:"'"},{regex:new RegExp('"',"g"),val:"""}],processEntities:!0,stopNodes:[],oneListGroup:!1};function jt(t){this.options=Object.assign({},Mt,t),this.options.ignoreAttributes||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=Bt),this.processTextOrObjNode=Ht,this.options.format?(this.indentate=Ft,this.tagEndChar=">\n",this.newLine="\n"):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}function Ht(t,e,i){const n=this.j2x(t,i+1);return void 0!==t[this.options.textNodeName]&&1===Object.keys(t).length?this.buildTextValNode(t[this.options.textNodeName],e,n.attrStr,i):this.buildObjectNode(n.val,e,n.attrStr,i)}function Ft(t){return this.options.indentBy.repeat(t)}function Bt(t){return!(!t.startsWith(this.options.attributeNamePrefix)||t===this.options.textNodeName)&&t.substr(this.attrPrefixLen)}jt.prototype.build=function(t){return this.options.preserveOrder?Rt(t,this.options):(Array.isArray(t)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(t={[this.options.arrayNodeName]:t}),this.j2x(t,0).val)},jt.prototype.j2x=function(t,e){let i="",n="";for(let r in t)if(Object.prototype.hasOwnProperty.call(t,r))if(void 0===t[r])this.isAttribute(r)&&(n+="");else if(null===t[r])this.isAttribute(r)?n+="":"?"===r[0]?n+=this.indentate(e)+"<"+r+"?"+this.tagEndChar:n+=this.indentate(e)+"<"+r+"/"+this.tagEndChar;else if(t[r]instanceof Date)n+=this.buildTextValNode(t[r],r,"",e);else if("object"!=typeof t[r]){const s=this.isAttribute(r);if(s)i+=this.buildAttrPairStr(s,""+t[r]);else if(r===this.options.textNodeName){let e=this.options.tagValueProcessor(r,""+t[r]);n+=this.replaceEntitiesValue(e)}else n+=this.buildTextValNode(t[r],r,"",e)}else if(Array.isArray(t[r])){const i=t[r].length;let s="";for(let o=0;o<i;o++){const i=t[r][o];void 0===i||(null===i?"?"===r[0]?n+=this.indentate(e)+"<"+r+"?"+this.tagEndChar:n+=this.indentate(e)+"<"+r+"/"+this.tagEndChar:"object"==typeof i?this.options.oneListGroup?s+=this.j2x(i,e+1).val:s+=this.processTextOrObjNode(i,r,e):s+=this.buildTextValNode(i,r,"",e))}this.options.oneListGroup&&(s=this.buildObjectNode(s,r,"",e)),n+=s}else if(this.options.attributesGroupName&&r===this.options.attributesGroupName){const e=Object.keys(t[r]),n=e.length;for(let s=0;s<n;s++)i+=this.buildAttrPairStr(e[s],""+t[r][e[s]])}else n+=this.processTextOrObjNode(t[r],r,e);return{attrStr:i,val:n}},jt.prototype.buildAttrPairStr=function(t,e){return e=this.options.attributeValueProcessor(t,""+e),e=this.replaceEntitiesValue(e),this.options.suppressBooleanAttributes&&"true"===e?" "+t:" "+t+'="'+e+'"'},jt.prototype.buildObjectNode=function(t,e,i,n){if(""===t)return"?"===e[0]?this.indentate(n)+"<"+e+i+"?"+this.tagEndChar:this.indentate(n)+"<"+e+i+this.closeTag(e)+this.tagEndChar;{let r="</"+e+this.tagEndChar,s="";return"?"===e[0]&&(s="?",r=""),!i&&""!==i||-1!==t.indexOf("<")?!1!==this.options.commentPropName&&e===this.options.commentPropName&&0===s.length?this.indentate(n)+`\x3c!--${t}--\x3e`+this.newLine:this.indentate(n)+"<"+e+i+s+this.tagEndChar+t+this.indentate(n)+r:this.indentate(n)+"<"+e+i+s+">"+t+r}},jt.prototype.closeTag=function(t){let e="";return-1!==this.options.unpairedTags.indexOf(t)?this.options.suppressUnpairedNode||(e="/"):e=this.options.suppressEmptyNode?"/":`></${t}`,e},jt.prototype.buildTextValNode=function(t,e,i,n){if(!1!==this.options.cdataPropName&&e===this.options.cdataPropName)return this.indentate(n)+`<![CDATA[${t}]]>`+this.newLine;if(!1!==this.options.commentPropName&&e===this.options.commentPropName)return this.indentate(n)+`\x3c!--${t}--\x3e`+this.newLine;if("?"===e[0])return this.indentate(n)+"<"+e+i+"?"+this.tagEndChar;{let r=this.options.tagValueProcessor(e,t);return r=this.replaceEntitiesValue(r),""===r?this.indentate(n)+"<"+e+i+this.closeTag(e)+this.tagEndChar:this.indentate(n)+"<"+e+i+">"+r+"</"+e+this.tagEndChar}},jt.prototype.replaceEntitiesValue=function(t){if(t&&t.length>0&&this.options.processEntities)for(let e=0;e<this.options.entities.length;e++){const i=this.options.entities[e];t=t.replace(i.regex,i.val)}return t};var $t={XMLParser:class{constructor(t){this.externalEntities={},this.options=Ct(t)}parse(t,e){if("string"==typeof t);else{if(!t.toString)throw new Error("XML data is accepted in String or Bytes[] form.");t=t.toString()}if(e){!0===e&&(e={});const i=Pt.validate(t,e);if(!0!==i)throw Error(`${i.err.msg}:${i.err.line}:${i.err.col}`)}const i=new Ot(this.options);i.addExternalEntities(this.externalEntities);const n=i.parseXml(t);return this.options.preserveOrder||void 0===n?n:It(n,this.options)}addEntity(t,e){if(-1!==e.indexOf("&"))throw new Error("Entity value can't have '&'");if(-1!==t.indexOf("&")||-1!==t.indexOf(";"))throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '
'");if("&"===e)throw new Error("An entity with value '&' is not permitted");this.externalEntities[t]=e}},XMLValidator:O,XMLBuilder:jt};class Kt{_view;constructor(t){Ut(t),this._view=t}get id(){return this._view.id}get name(){return this._view.name}get caption(){return this._view.caption}get emptyTitle(){return this._view.emptyTitle}get emptyCaption(){return this._view.emptyCaption}get getContents(){return this._view.getContents}get icon(){return this._view.icon}set icon(t){this._view.icon=t}get order(){return this._view.order}set order(t){this._view.order=t}get params(){return this._view.params}set params(t){this._view.params=t}get columns(){return this._view.columns}get emptyView(){return this._view.emptyView}get parent(){return this._view.parent}get sticky(){return this._view.sticky}get expanded(){return this._view.expanded}set expanded(t){this._view.expanded=t}get defaultSortKey(){return this._view.defaultSortKey}}const Ut=function(t){if(!t.id||"string"!=typeof t.id)throw new Error("View id is required and must be a string");if(!t.name||"string"!=typeof t.name)throw new Error("View name is required and must be a string");if(t.columns&&t.columns.length>0&&(!t.caption||"string"!=typeof t.caption))throw new Error("View caption is required for top-level views and must be a string");if(!t.getContents||"function"!=typeof t.getContents)throw new Error("View getContents is required and must be a function");if(!t.icon||"string"!=typeof t.icon||!function(t){if("string"!=typeof t)throw new TypeError(`Expected a \`string\`, got \`${typeof t}\``);if(0===(t=t.trim()).length)return!1;if(!0!==$t.XMLValidator.validate(t))return!1;let e;const i=new $t.XMLParser;try{e=i.parse(t)}catch{return!1}return!!e&&!!Object.keys(e).some((t=>"svg"===t.toLowerCase()))}(t.icon))throw new Error("View icon is required and must be a valid svg string");if(!("order"in t)||"number"!=typeof t.order)throw new Error("View order is required and must be a number");if(t.columns&&t.columns.forEach((t=>{if(!(t instanceof T))throw new Error("View columns must be an array of Column. Invalid column found")})),t.emptyView&&"function"!=typeof t.emptyView)throw new Error("View emptyView must be a function");if(t.parent&&"string"!=typeof t.parent)throw new Error("View parent must be a string");if("sticky"in t&&"boolean"!=typeof t.sticky)throw new Error("View sticky must be a boolean");if("expanded"in t&&"boolean"!=typeof t.expanded)throw new Error("View expanded must be a boolean");if(t.defaultSortKey&&"string"!=typeof t.defaultSortKey)throw new Error("View defaultSortKey must be a string");return!0};var Zt=i(53334);const Gt='<svg xmlns="http://www.w3.org/2000/svg" id="mdi-account-group" viewBox="0 0 24 24"><path d="M12,5.5A3.5,3.5 0 0,1 15.5,9A3.5,3.5 0 0,1 12,12.5A3.5,3.5 0 0,1 8.5,9A3.5,3.5 0 0,1 12,5.5M5,8C5.56,8 6.08,8.15 6.53,8.42C6.38,9.85 6.8,11.27 7.66,12.38C7.16,13.34 6.16,14 5,14A3,3 0 0,1 2,11A3,3 0 0,1 5,8M19,8A3,3 0 0,1 22,11A3,3 0 0,1 19,14C17.84,14 16.84,13.34 16.34,12.38C17.2,11.27 17.62,9.85 17.47,8.42C17.92,8.15 18.44,8 19,8M5.5,18.25C5.5,16.18 8.41,14.5 12,14.5C15.59,14.5 18.5,16.18 18.5,18.25V20H5.5V18.25M0,20V18.5C0,17.11 1.89,15.94 4.45,15.6C3.86,16.28 3.5,17.22 3.5,18.25V20H0M24,20H20.5V18.25C20.5,17.22 20.14,16.28 19.55,15.6C22.11,15.94 24,17.11 24,18.5V20Z" /></svg>',zt='<svg xmlns="http://www.w3.org/2000/svg" id="mdi-account-plus" viewBox="0 0 24 24"><path d="M15,14C12.33,14 7,15.33 7,18V20H23V18C23,15.33 17.67,14 15,14M6,10V7H4V10H1V12H4V15H6V12H9V10M15,12A4,4 0 0,0 19,8A4,4 0 0,0 15,4A4,4 0 0,0 11,8A4,4 0 0,0 15,12Z" /></svg>',Yt='<svg xmlns="http://www.w3.org/2000/svg" id="mdi-link" viewBox="0 0 24 24"><path d="M3.9,12C3.9,10.29 5.29,8.9 7,8.9H11V7H7A5,5 0 0,0 2,12A5,5 0 0,0 7,17H11V15.1H7C5.29,15.1 3.9,13.71 3.9,12M8,13H16V11H8V13M17,7H13V8.9H17C18.71,8.9 20.1,10.29 20.1,12C20.1,13.71 18.71,15.1 17,15.1H13V17H17A5,5 0 0,0 22,12A5,5 0 0,0 17,7Z" /></svg>';var qt=i(26287),Xt=i(53529);const Wt=(0,Xt.YK)().setApp("files_sharing").detectUser().build();var Jt;const Qt="/files/".concat(null===(Jt=(0,n.HW)())||void 0===Jt?void 0:Jt.uid),te={"Content-Type":"application/json"},ee=function(t){try{var e;const i="folder"===(null==t?void 0:t.item_type),n=!0===(null==t?void 0:t.has_preview),r=i?A:_,s=t.file_source,o=(null==t?void 0:t.path)||t.file_target,l=(0,a.dC)("dav/".concat(Qt,"/").concat(o).replaceAll(/\/\//gm,"/"));let d=null!=t&&t.item_mtime?new Date(1e3*t.item_mtime):void 0;return(null==t?void 0:t.stime)>((null==t?void 0:t.item_mtime)||0)&&(d=new Date(1e3*t.stime)),new r({id:s,source:l,owner:null==t?void 0:t.uid_owner,mime:null==t?void 0:t.mimetype,mtime:d,size:null==t?void 0:t.item_size,permissions:(null==t?void 0:t.item_permissions)||(null==t?void 0:t.permissions),root:Qt,attributes:{...t,"has-preview":n,"owner-id":null==t?void 0:t.uid_owner,"owner-display-name":null==t?void 0:t.displayname_owner,"share-types":null==t?void 0:t.share_type,favorite:null!=t&&null!==(e=t.tags)&&void 0!==e&&e.includes(window.OC.TAG_FAVORITE)?1:0}})}catch(t){return Wt.error("Error while parsing OCS entry",{error:t}),null}},ie=function(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const e=(0,a.KT)("apps/files_sharing/api/v1/shares");return qt.A.get(e,{headers:te,params:{shared_with_me:t,include_tags:!0}})},ne=async function(){var t;let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[];const o=[];(!(arguments.length>0&&void 0!==arguments[0])||arguments[0])&&o.push(ie(!0),function(){const t=(0,a.KT)("apps/files_sharing/api/v1/remote_shares");return qt.A.get(t,{headers:te,params:{include_tags:!0}})}()),e&&o.push(ie()),i&&o.push(function(){const t=(0,a.KT)("apps/files_sharing/api/v1/shares/pending");return qt.A.get(t,{headers:te,params:{include_tags:!0}})}(),function(){const t=(0,a.KT)("apps/files_sharing/api/v1/remote_shares/pending");return qt.A.get(t,{headers:te,params:{include_tags:!0}})}()),r&&o.push(function(){const t=(0,a.KT)("apps/files_sharing/api/v1/deletedshares");return qt.A.get(t,{headers:te,params:{include_tags:!0}})}());let l=(await Promise.all(o)).map((t=>t.data.ocs.data)).flat().map(ee).filter((t=>null!==t));var d,u;return s.length>0&&(l=l.filter((t=>{var e;return s.includes(null===(e=t.attributes)||void 0===e?void 0:e.share_type)}))),l=(d=l,u="source",Object.values(d.reduce((function(t,e){return(t[e[u]]=t[e[u]]||[]).push(e),t}),{}))).map((t=>{const e=t[0];return e.attributes["share-types"]=t.map((t=>t.attributes["share-types"])),e})),{folder:new A({id:0,source:(0,a.dC)("dav"+Qt),owner:(null===(t=(0,n.HW)())||void 0===t?void 0:t.uid)||null}),contents:l}},re="shareoverview",se="sharingin",oe="sharingout",ae="sharinglinks",le="deletedshares",de="pendingshares";var ue=i(61338);h(new c({id:"accept-share",displayName:t=>(0,Zt.zw)("files_sharing","Accept share","Accept shares",t.length),iconSvgInline:()=>'<svg xmlns="http://www.w3.org/2000/svg" id="mdi-check" viewBox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z" /></svg>',enabled:(t,e)=>t.length>0&&e.id===de,async exec(t){try{const e=!!t.attributes.remote,i=(0,a.KT)("apps/files_sharing/api/v1/{shareBase}/pending/{id}",{shareBase:e?"remote_shares":"shares",id:t.attributes.id});return await qt.A.post(i),(0,ue.Ic)("files:node:deleted",t),!0}catch(t){return!1}},async execBatch(t,e,i){return Promise.all(t.map((t=>this.exec(t,e,i))))},order:1,inline:()=>!0})),h(new c({id:"open-in-files",displayName:()=>(0,Zt.Tl)("files","Open in Files"),iconSvgInline:()=>"",enabled:(t,e)=>[re,se,oe,ae].includes(e.id),exec:async t=>(window.OCP.Files.Router.goToRoute(null,{view:"files",fileid:t.fileid},{dir:t.dirname}),null),order:-1e3,default:u.HIDDEN})),h(new c({id:"reject-share",displayName:t=>(0,Zt.zw)("files_sharing","Reject share","Reject shares",t.length),iconSvgInline:()=>'<svg xmlns="http://www.w3.org/2000/svg" id="mdi-close" viewBox="0 0 24 24"><path d="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z" /></svg>',enabled:(t,e)=>e.id===de&&0!==t.length&&!t.some((t=>t.attributes.remote_id&&t.attributes.share_type===window.OC.Share.SHARE_TYPE_REMOTE_GROUP)),async exec(t){try{const e=!!t.attributes.remote,i=(0,a.KT)("apps/files_sharing/api/v1/{shareBase}/{id}",{shareBase:e?"remote_shares":"shares",id:t.attributes.id});return await qt.A.delete(i),(0,ue.Ic)("files:node:deleted",t),!0}catch(t){return!1}},async execBatch(t,e,i){return Promise.all(t.map((t=>this.exec(t,e,i))))},order:2,inline:()=>!0})),h(new c({id:"restore-share",displayName:t=>(0,Zt.zw)("files_sharing","Restore share","Restore shares",t.length),iconSvgInline:()=>'<svg xmlns="http://www.w3.org/2000/svg" id="mdi-arrow-u-left-top" viewBox="0 0 24 24"><path d="M20 13.5C20 17.09 17.09 20 13.5 20H6V18H13.5C16 18 18 16 18 13.5S16 9 13.5 9H7.83L10.91 12.09L9.5 13.5L4 8L9.5 2.5L10.92 3.91L7.83 7H13.5C17.09 7 20 9.91 20 13.5Z" /></svg>',enabled:(t,e)=>t.length>0&&e.id===le,async exec(t){try{const e=(0,a.KT)("apps/files_sharing/api/v1/deletedshares/{id}",{id:t.attributes.id});return await qt.A.post(e),(0,ue.Ic)("files:node:deleted",t),!0}catch(t){return!1}},async execBatch(t,e,i){return Promise.all(t.map((t=>this.exec(t,e,i))))},order:1,inline:()=>!0}));var ce=i(52129),he=i(49981);const pe=(0,Xt.YK)().setApp("files").detectUser().build(),ge=new c({id:"details",displayName:()=>(0,Zt.Tl)("files","Open details"),iconSvgInline:()=>he,enabled:t=>{var e,i,n;return 1===t.length&&!!t[0]&&!(null===(e=window)||void 0===e||null===(e=e.OCA)||void 0===e||null===(e=e.Files)||void 0===e||!e.Sidebar)&&null!==(i=(null===(n=t[0].root)||void 0===n?void 0:n.startsWith("/files/"))&&t[0].permissions!==p.NONE)&&void 0!==i&&i},async exec(t,e,i){try{return await window.OCA.Files.Sidebar.open(t.path),window.OCP.Files.Router.goToRoute(null,{view:e.id,fileid:t.fileid},{dir:i},!0),null}catch(t){return pe.error("Error while opening sidebar",{error:t}),!1}},order:-50});var fe=i(85072),me=i.n(fe),we=i(97825),ve=i.n(we),be=i(77659),xe=i.n(be),ye=i(55056),_e=i.n(ye),Ae=i(10540),Ee=i.n(Ae),Ne=i(41113),Te=i.n(Ne),Ce=i(8132),Oe={};Oe.styleTagTransform=Te(),Oe.setAttributes=_e(),Oe.insert=xe().bind(null,"head"),Oe.domAPI=ve(),Oe.insertStyleElement=Ee(),me()(Ce.A,Oe),Ce.A&&Ce.A.locals&&Ce.A.locals;const Ie=new c({id:"sharing-status",displayName(t){var e,i,r;const s=t[0],o=Object.values((null==s||null===(e=s.attributes)||void 0===e?void 0:e["share-types"])||{}).flat(),a=null==s||null===(i=s.attributes)||void 0===i?void 0:i["owner-id"];return o.length>0||a&&a!==(null===(r=(0,n.HW)())||void 0===r?void 0:r.uid)?(0,Zt.Tl)("files_sharing","Shared"):""},title(t){var e,i,r,s;const o=t[0],a=null==o||null===(e=o.attributes)||void 0===e?void 0:e["owner-id"],l=null==o||null===(i=o.attributes)||void 0===i?void 0:i["owner-display-name"];return Array.isArray(null===(r=o.attributes)||void 0===r?void 0:r["share-types"])?(0,Zt.Tl)("files_sharing","Shared multiple times with different people"):a&&a!==(null===(s=(0,n.HW)())||void 0===s?void 0:s.uid)?(0,Zt.Tl)("files_sharing","Shared by {ownerDisplayName}",{ownerDisplayName:l}):(0,Zt.Tl)("files_sharing","Show sharing options")},iconSvgInline(t){var e,i,r,s;const o=t[0],l=Object.values((null==o||null===(e=o.attributes)||void 0===e?void 0:e["share-types"])||{}).flat();if(Array.isArray(null===(i=o.attributes)||void 0===i?void 0:i["share-types"]))return zt;if(l.includes(ce.Z.SHARE_TYPE_LINK)||l.includes(ce.Z.SHARE_TYPE_EMAIL))return Yt;if(l.includes(ce.Z.SHARE_TYPE_GROUP)||l.includes(ce.Z.SHARE_TYPE_REMOTE_GROUP))return Gt;if(l.includes(ce.Z.SHARE_TYPE_CIRCLE))return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12,5.5A3.5,3.5 0 0,1 15.5,9A3.5,3.5 0 0,1 12,12.5A3.5,3.5 0 0,1 8.5,9A3.5,3.5 0 0,1 12,5.5M5,8C5.56,8 6.08,8.15 6.53,8.42C6.38,9.85 6.8,11.27 7.66,12.38C7.16,13.34 6.16,14 5,14A3,3 0 0,1 2,11A3,3 0 0,1 5,8M19,8A3,3 0 0,1 22,11A3,3 0 0,1 19,14C17.84,14 16.84,13.34 16.34,12.38C17.2,11.27 17.62,9.85 17.47,8.42C17.92,8.15 18.44,8 19,8M5.5,18.25C5.5,16.18 8.41,14.5 12,14.5C15.59,14.5 18.5,16.18 18.5,18.25V20H5.5V18.25M0,20V18.5C0,17.11 1.89,15.94 4.45,15.6C3.86,16.28 3.5,17.22 3.5,18.25V20H0M24,20H20.5V18.25C20.5,17.22 20.14,16.28 19.55,15.6C22.11,15.94 24,17.11 24,18.5V20Z" /></svg>';const d=null==o||null===(r=o.attributes)||void 0===r?void 0:r["owner-id"];return d&&d!==(null===(s=(0,n.HW)())||void 0===s?void 0:s.uid)?(t=>{const e=(0,a.Jv)("/avatar/{userId}/32",{userId:t});return'<svg width="32" height="32" viewBox="0 0 32 32"\n\t\txmlns="http://www.w3.org/2000/svg" class="sharing-status__avatar">\n\t\t<image href="'.concat(e,'" height="32" width="32" />\n\t</svg>')})(d):zt},enabled(t){var e,i,r;if(1!==t.length)return!1;const s=t[0],o=null==s||null===(e=s.attributes)||void 0===e?void 0:e["owner-id"];return!!Array.isArray(null===(i=s.attributes)||void 0===i?void 0:i["share-types"])||!(!o||o===(null===(r=(0,n.HW)())||void 0===r?void 0:r.uid))||0!=(s.permissions&p.SHARE)},async exec(t,e,i){var n,r;return 0!=(t.permissions&p.READ)?(null===(n=window.OCA)||void 0===n||null===(n=n.Files)||void 0===n||null===(n=n.Sidebar)||void 0===n||null===(r=n.setActiveTab)||void 0===r||r.call(n,"sharing"),ge.exec(t,e,i)):null},inline:()=>!0});h(Ie),(()=>{const t=N();t.register(new Kt({id:re,name:(0,Zt.Tl)("files_sharing","Shares"),caption:(0,Zt.Tl)("files_sharing","Overview of shared files."),emptyTitle:(0,Zt.Tl)("files_sharing","No shares"),emptyCaption:(0,Zt.Tl)("files_sharing","Files and folders you shared or have been shared with you will show up here"),icon:zt,order:20,columns:[],getContents:()=>ne()})),t.register(new Kt({id:se,name:(0,Zt.Tl)("files_sharing","Shared with you"),caption:(0,Zt.Tl)("files_sharing","List of files that are shared with you."),emptyTitle:(0,Zt.Tl)("files_sharing","Nothing shared with you yet"),emptyCaption:(0,Zt.Tl)("files_sharing","Files and folders others shared with you will show up here"),icon:'<svg xmlns="http://www.w3.org/2000/svg" id="mdi-account" viewBox="0 0 24 24"><path d="M12,4A4,4 0 0,1 16,8A4,4 0 0,1 12,12A4,4 0 0,1 8,8A4,4 0 0,1 12,4M12,14C16.42,14 20,15.79 20,18V20H4V18C4,15.79 7.58,14 12,14Z" /></svg>',order:1,parent:re,columns:[],getContents:()=>ne(!0,!1,!1,!1)})),t.register(new Kt({id:oe,name:(0,Zt.Tl)("files_sharing","Shared with others"),caption:(0,Zt.Tl)("files_sharing","List of files that you shared with others."),emptyTitle:(0,Zt.Tl)("files_sharing","Nothing shared yet"),emptyCaption:(0,Zt.Tl)("files_sharing","Files and folders you shared will show up here"),icon:Gt,order:2,parent:re,columns:[],getContents:()=>ne(!1,!0,!1,!1)})),t.register(new Kt({id:ae,name:(0,Zt.Tl)("files_sharing","Shared by link"),caption:(0,Zt.Tl)("files_sharing","List of files that are shared by link."),emptyTitle:(0,Zt.Tl)("files_sharing","No shared links"),emptyCaption:(0,Zt.Tl)("files_sharing","Files and folders you shared by link will show up here"),icon:Yt,order:3,parent:re,columns:[],getContents:()=>ne(!1,!0,!1,!1,[window.OC.Share.SHARE_TYPE_LINK])})),t.register(new Kt({id:le,name:(0,Zt.Tl)("files_sharing","Deleted shares"),caption:(0,Zt.Tl)("files_sharing","List of shares you left."),emptyTitle:(0,Zt.Tl)("files_sharing","No deleted shares"),emptyCaption:(0,Zt.Tl)("files_sharing","Shares you have left will show up here"),icon:'<svg xmlns="http://www.w3.org/2000/svg" id="mdi-delete" viewBox="0 0 24 24"><path d="M19,4H15.5L14.5,3H9.5L8.5,4H5V6H19M6,19A2,2 0 0,0 8,21H16A2,2 0 0,0 18,19V7H6V19Z" /></svg>',order:4,parent:re,columns:[],getContents:()=>ne(!1,!1,!1,!0)})),t.register(new Kt({id:de,name:(0,Zt.Tl)("files_sharing","Pending shares"),caption:(0,Zt.Tl)("files_sharing","List of unapproved shares."),emptyTitle:(0,Zt.Tl)("files_sharing","No pending shares"),emptyCaption:(0,Zt.Tl)("files_sharing","Shares you have received but not approved will show up here"),icon:'<svg xmlns="http://www.w3.org/2000/svg" id="mdi-account-clock" viewBox="0 0 24 24"><path d="M10.63,14.1C12.23,10.58 16.38,9.03 19.9,10.63C23.42,12.23 24.97,16.38 23.37,19.9C22.24,22.4 19.75,24 17,24C14.3,24 11.83,22.44 10.67,20H1V18C1.06,16.86 1.84,15.93 3.34,15.18C4.84,14.43 6.72,14.04 9,14C9.57,14 10.11,14.05 10.63,14.1V14.1M9,4C10.12,4.03 11.06,4.42 11.81,5.17C12.56,5.92 12.93,6.86 12.93,8C12.93,9.14 12.56,10.08 11.81,10.83C11.06,11.58 10.12,11.95 9,11.95C7.88,11.95 6.94,11.58 6.19,10.83C5.44,10.08 5.07,9.14 5.07,8C5.07,6.86 5.44,5.92 6.19,5.17C6.94,4.42 7.88,4.03 9,4M17,22A5,5 0 0,0 22,17A5,5 0 0,0 17,12A5,5 0 0,0 12,17A5,5 0 0,0 17,22M16,14H17.5V16.82L19.94,18.23L19.19,19.53L16,17.69V14Z" /></svg>',order:5,parent:re,columns:[],getContents:()=>ne(!1,!1,!0,!1)}))})(),m("nc:share-attributes",{nc:"http://nextcloud.org/ns"}),m("oc:share-types",{oc:"http://owncloud.org/ns"}),m("ocs:share-permissions",{ocs:"http://open-collaboration-services.org/ns"})},8132:(t,e,i)=>{i.d(e,{A:()=>a});var n=i(71354),r=i.n(n),s=i(76314),o=i.n(s)()(r());o.push([t.id,".action-items>.files-list__row-action-sharing-status{direction:rtl;padding-right:0 !important}svg.sharing-status__avatar{height:32px !important;width:32px !important;max-height:32px !important;max-width:32px !important;border-radius:32px;overflow:hidden}","",{version:3,sources:["webpack://./apps/files_sharing/src/actions/sharingStatusAction.scss"],names:[],mappings:"AAKA,qDAEC,aAAA,CAEG,0BAAA,CAGJ,2BACC,sBAAA,CACA,qBAAA,CACA,0BAAA,CACA,yBAAA,CACA,kBAAA,CACA,eAAA",sourcesContent:["/**\n * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n // Only when rendered inline, when not enough space, this is put in the menu\n.action-items > .files-list__row-action-sharing-status {\n\t// put icon at the end of the button\n\tdirection: rtl;\n\t// align icons with textless inline actions\n padding-right: 0 !important;\n}\n\nsvg.sharing-status__avatar {\n\theight: 32px !important;\n\twidth: 32px !important;\n\tmax-height: 32px !important;\n\tmax-width: 32px !important;\n\tborder-radius: 32px;\n\toverflow: hidden;\n}\n"],sourceRoot:""}]);const a=o}},i={};function n(t){var r=i[t];if(void 0!==r)return r.exports;var s=i[t]={id:t,loaded:!1,exports:{}};return e[t].call(s.exports,s,s.exports,n),s.loaded=!0,s.exports}n.m=e,t=[],n.O=(e,i,r,s)=>{if(!i){var o=1/0;for(u=0;u<t.length;u++){i=t[u][0],r=t[u][1],s=t[u][2];for(var a=!0,l=0;l<i.length;l++)(!1&s||o>=s)&&Object.keys(n.O).every((t=>n.O[t](i[l])))?i.splice(l--,1):(a=!1,s<o&&(o=s));if(a){t.splice(u--,1);var d=r();void 0!==d&&(e=d)}}return e}s=s||0;for(var u=t.length;u>0&&t[u-1][2]>s;u--)t[u]=t[u-1];t[u]=[i,r,s]},n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.e=()=>Promise.resolve(),n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.nmd=t=>(t.paths=[],t.children||(t.children=[]),t),n.j=5928,(()=>{n.b=document.baseURI||self.location.href;var t={5928:0};n.O.j=e=>0===t[e];var e=(e,i)=>{var r,s,o=i[0],a=i[1],l=i[2],d=0;if(o.some((e=>0!==t[e]))){for(r in a)n.o(a,r)&&(n.m[r]=a[r]);if(l)var u=l(n)}for(e&&e(i);d<o.length;d++)s=o[d],n.o(t,s)&&t[s]&&t[s][0](),t[s]=0;return n.O(u)},i=self.webpackChunknextcloud=self.webpackChunknextcloud||[];i.forEach(e.bind(null,0)),i.push=e.bind(null,i.push.bind(i))})(),n.nc=void 0;var r=n.O(void 0,[4208],(()=>n(5924)));r=n.O(r)})(); +//# sourceMappingURL=files_sharing-init.js.map?v=c0a7fef12c8bceca823b
\ No newline at end of file |