@opencloud-eu/web-client 2.4.0 → 3.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/functions-CYOnwClV.js +1178 -0
- package/dist/functions-DEaUzlbB.cjs +1 -0
- package/dist/{index-sA0pvHeb.cjs → index-B3tdq56F.cjs} +1 -1
- package/dist/{index-DcTD5HFk.js → index-BTGj2rHD.js} +69 -67
- package/dist/{index-43W1CNwK.cjs → index-C-U4KVPG.cjs} +5 -5
- package/dist/index-D3QfKFAH.cjs +1 -0
- package/dist/{index-BEuG72fj.js → index-DxUgq3ag.js} +2 -2
- package/dist/index-oCdLZPEA.js +699 -0
- package/dist/src/graph/drives/types.d.ts +16 -7
- package/dist/src/graph/generated/api.d.ts +333 -24
- package/dist/src/graph/generated/configuration.d.ts +1 -1
- package/dist/src/graph/generated/index.d.ts +1 -1
- package/dist/src/graph/index.d.ts +2 -0
- package/dist/src/graph/permissions/types.d.ts +3 -0
- package/dist/src/graph/photos/index.d.ts +2 -0
- package/dist/src/graph/photos/photo.d.ts +3 -0
- package/dist/src/graph/photos/types.d.ts +7 -0
- package/dist/src/graph/types.d.ts +2 -1
- package/dist/src/helpers/space/functions.d.ts +4 -6
- package/dist/src/helpers/space/types.d.ts +3 -8
- package/dist/web-client/graph/generated.cjs +1 -1
- package/dist/web-client/graph/generated.js +2071 -1731
- package/dist/web-client/graph.cjs +1 -1
- package/dist/web-client/graph.js +1 -1
- package/dist/web-client/webdav.cjs +1 -1
- package/dist/web-client/webdav.js +3 -3
- package/dist/web-client.cjs +1 -1
- package/dist/web-client.js +35 -36
- package/package.json +2 -2
- package/dist/functions-DJR5h-q5.cjs +0 -1
- package/dist/functions-l5kdzi5h.js +0 -1230
- package/dist/index-Cjn81zI6.cjs +0 -1
- package/dist/index-mFyj5iN2.js +0 -670
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var Ae=Object.defineProperty;var Oe=(e,t,i)=>t in e?Ae(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i;var b=(e,t,i)=>Oe(e,typeof t!="symbol"?t+"":t,i);const P=require("./toString-hHr716Th.cjs"),ye=require("./index-C6VnMvgz.cjs");function ee(e,t=""){return`/public-files/${e}/${t}`.split("/").filter(Boolean).join("/")}function te(e,t=""){return`/ocm/${e}/${t}`.split("/").filter(Boolean).join("/")}var M,B;function Te(){if(B)return M;B=1;function e(s){if(typeof s!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(s))}function t(s,n){for(var r="",l=0,c=-1,h=0,u,p=0;p<=s.length;++p){if(p<s.length)u=s.charCodeAt(p);else{if(u===47)break;u=47}if(u===47){if(!(c===p-1||h===1))if(c!==p-1&&h===2){if(r.length<2||l!==2||r.charCodeAt(r.length-1)!==46||r.charCodeAt(r.length-2)!==46){if(r.length>2){var g=r.lastIndexOf("/");if(g!==r.length-1){g===-1?(r="",l=0):(r=r.slice(0,g),l=r.length-1-r.lastIndexOf("/")),c=p,h=0;continue}}else if(r.length===2||r.length===1){r="",l=0,c=p,h=0;continue}}n&&(r.length>0?r+="/..":r="..",l=2)}else r.length>0?r+="/"+s.slice(c+1,p):r=s.slice(c+1,p),l=p-c-1;c=p,h=0}else u===46&&h!==-1?++h:h=-1}return r}function i(s,n){var r=n.dir||n.root,l=n.base||(n.name||"")+(n.ext||"");return r?r===n.root?r+l:r+s+l:l}var d={resolve:function(){for(var n="",r=!1,l,c=arguments.length-1;c>=-1&&!r;c--){var h;c>=0?h=arguments[c]:(l===void 0&&(l=ye.process$1.cwd()),h=l),e(h),h.length!==0&&(n=h+"/"+n,r=h.charCodeAt(0)===47)}return n=t(n,!r),r?n.length>0?"/"+n:"/":n.length>0?n:"."},normalize:function(n){if(e(n),n.length===0)return".";var r=n.charCodeAt(0)===47,l=n.charCodeAt(n.length-1)===47;return n=t(n,!r),n.length===0&&!r&&(n="."),n.length>0&&l&&(n+="/"),r?"/"+n:n},isAbsolute:function(n){return e(n),n.length>0&&n.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var n,r=0;r<arguments.length;++r){var l=arguments[r];e(l),l.length>0&&(n===void 0?n=l:n+="/"+l)}return n===void 0?".":d.normalize(n)},relative:function(n,r){if(e(n),e(r),n===r||(n=d.resolve(n),r=d.resolve(r),n===r))return"";for(var l=1;l<n.length&&n.charCodeAt(l)===47;++l);for(var c=n.length,h=c-l,u=1;u<r.length&&r.charCodeAt(u)===47;++u);for(var p=r.length,g=p-u,o=h<g?h:g,f=-1,m=0;m<=o;++m){if(m===o){if(g>o){if(r.charCodeAt(u+m)===47)return r.slice(u+m+1);if(m===0)return r.slice(u+m)}else h>o&&(n.charCodeAt(l+m)===47?f=m:m===0&&(f=0));break}var D=n.charCodeAt(l+m),k=r.charCodeAt(u+m);if(D!==k)break;D===47&&(f=m)}var S="";for(m=l+f+1;m<=c;++m)(m===c||n.charCodeAt(m)===47)&&(S.length===0?S+="..":S+="/..");return S.length>0?S+r.slice(u+f):(u+=f,r.charCodeAt(u)===47&&++u,r.slice(u))},_makeLong:function(n){return n},dirname:function(n){if(e(n),n.length===0)return".";for(var r=n.charCodeAt(0),l=r===47,c=-1,h=!0,u=n.length-1;u>=1;--u)if(r=n.charCodeAt(u),r===47){if(!h){c=u;break}}else h=!1;return c===-1?l?"/":".":l&&c===1?"//":n.slice(0,c)},basename:function(n,r){if(r!==void 0&&typeof r!="string")throw new TypeError('"ext" argument must be a string');e(n);var l=0,c=-1,h=!0,u;if(r!==void 0&&r.length>0&&r.length<=n.length){if(r.length===n.length&&r===n)return"";var p=r.length-1,g=-1;for(u=n.length-1;u>=0;--u){var o=n.charCodeAt(u);if(o===47){if(!h){l=u+1;break}}else g===-1&&(h=!1,g=u+1),p>=0&&(o===r.charCodeAt(p)?--p===-1&&(c=u):(p=-1,c=g))}return l===c?c=g:c===-1&&(c=n.length),n.slice(l,c)}else{for(u=n.length-1;u>=0;--u)if(n.charCodeAt(u)===47){if(!h){l=u+1;break}}else c===-1&&(h=!1,c=u+1);return c===-1?"":n.slice(l,c)}},extname:function(n){e(n);for(var r=-1,l=0,c=-1,h=!0,u=0,p=n.length-1;p>=0;--p){var g=n.charCodeAt(p);if(g===47){if(!h){l=p+1;break}continue}c===-1&&(h=!1,c=p+1),g===46?r===-1?r=p:u!==1&&(u=1):r!==-1&&(u=-1)}return r===-1||c===-1||u===0||u===1&&r===c-1&&r===l+1?"":n.slice(r,c)},format:function(n){if(n===null||typeof n!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof n);return i("/",n)},parse:function(n){e(n);var r={root:"",dir:"",base:"",ext:"",name:""};if(n.length===0)return r;var l=n.charCodeAt(0),c=l===47,h;c?(r.root="/",h=1):h=0;for(var u=-1,p=0,g=-1,o=!0,f=n.length-1,m=0;f>=h;--f){if(l=n.charCodeAt(f),l===47){if(!o){p=f+1;break}continue}g===-1&&(o=!1,g=f+1),l===46?u===-1?u=f:m!==1&&(m=1):u!==-1&&(m=-1)}return u===-1||g===-1||m===0||m===1&&u===g-1&&u===p+1?g!==-1&&(p===0&&c?r.base=r.name=n.slice(1,g):r.base=r.name=n.slice(p,g)):(p===0&&c?(r.name=n.slice(1,u),r.base=n.slice(1,g)):(r.name=n.slice(p,u),r.base=n.slice(p,g)),r.ext=n.slice(u,g)),p>0?r.dir=n.slice(0,p-1):c&&(r.dir="/"),r},sep:"/",delimiter:":",win32:null,posix:null};return d.posix=d,M=d,M}var U=Te();const Z=P.getDefaultExportFromCjs(U);class R{}b(R,"Shared","S"),b(R,"Shareable","R"),b(R,"Mounted","M"),b(R,"Deletable","D"),b(R,"Renameable","N"),b(R,"Moveable","V"),b(R,"Updateable","NV"),b(R,"FileUpdateable","W"),b(R,"FolderCreateable","CK"),b(R,"Deny","Z"),b(R,"SecureView","X");var ne=(e=>(e.copy="COPY",e.delete="DELETE",e.lock="LOCK",e.mkcol="MKCOL",e.move="MOVE",e.propfind="PROPFIND",e.proppatch="PROPPATCH",e.put="PUT",e.report="REPORT",e.unlock="UNLOCK",e))(ne||{});const E=e=>({value:e,type:null}),Ue=e=>E(e),v=e=>E(e),N=e=>E(e),Ee=e=>E(e),Fe={Permissions:v("permissions"),IsFavorite:N("favorite"),FileId:v("fileid"),FileParent:v("file-parent"),Name:v("name"),OwnerId:v("owner-id"),OwnerDisplayName:v("owner-display-name"),PrivateLink:v("privatelink"),ContentLength:N("getcontentlength"),ContentSize:N("size"),LastModifiedDate:v("getlastmodified"),Tags:Ue("tags"),Audio:{value:"audio",type:null},Location:{value:"location",type:null},Image:{value:"image",type:null},Photo:{value:"photo",type:null},ETag:v("getetag"),MimeType:v("getcontenttype"),ResourceType:Ee("resourcetype"),LockDiscovery:{value:"lockdiscovery",type:null},LockOwner:v("owner"),LockTime:v("locktime"),ActiveLock:{value:"activelock",type:null},DownloadURL:v("downloadURL"),Highlights:v("highlights"),MetaPathForUser:v("meta-path-for-user"),RemoteItemId:v("remote-item-id"),ShareId:v("shareid"),ShareRoot:v("shareroot"),ShareTypes:{value:"share-types",type:null},SharePermissions:v("share-permissions"),TrashbinOriginalFilename:v("trashbin-original-filename"),TrashbinOriginalLocation:v("trashbin-original-location"),TrashbinDeletedDate:v("trashbin-delete-datetime"),PublicLinkItemType:v("public-link-item-type"),PublicLinkPermission:v("public-link-permission"),PublicLinkExpiration:v("public-link-expiration"),PublicLinkShareDate:v("public-link-share-datetime"),PublicLinkShareOwner:v("public-link-share-owner")},a=Object.fromEntries(Object.entries(Fe).map(([e,t])=>[e,t.value])),L=class L{};b(L,"Default",[a.Permissions,a.IsFavorite,a.FileId,a.FileParent,a.Name,a.LockDiscovery,a.ActiveLock,a.OwnerId,a.OwnerDisplayName,a.RemoteItemId,a.ShareRoot,a.ShareTypes,a.PrivateLink,a.ContentLength,a.ContentSize,a.LastModifiedDate,a.ETag,a.MimeType,a.ResourceType,a.DownloadURL,a.Tags,a.Audio,a.Location,a.Image,a.Photo]),b(L,"PublicLink",L.Default.concat([a.PublicLinkItemType,a.PublicLinkPermission,a.PublicLinkExpiration,a.PublicLinkShareDate,a.PublicLinkShareOwner])),b(L,"Trashbin",[a.ContentLength,a.ResourceType,a.TrashbinOriginalLocation,a.TrashbinOriginalFilename,a.TrashbinDeletedDate,a.Permissions,a.FileParent]),b(L,"DavNamespace",[a.ContentLength,a.LastModifiedDate,a.ETag,a.MimeType,a.ResourceType,a.LockDiscovery,a.ActiveLock]);let j=L;function re(e){return e}function $e(e,t,i){switch(i.length){case 0:return e.call(t);case 1:return e.call(t,i[0]);case 2:return e.call(t,i[0],i[1]);case 3:return e.call(t,i[0],i[1],i[2])}return e.apply(t,i)}var Me=800,Ne=16,je=Date.now;function ze(e){var t=0,i=0;return function(){var d=je(),s=Ne-(d-i);if(i=d,s>0){if(++t>=Me)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function We(e){return function(){return e}}var q=function(){try{var e=P.getNative(Object,"defineProperty");return e({},"",{}),e}catch{}}(),Ve=q?function(e,t){return q(e,"toString",{configurable:!0,enumerable:!1,value:We(t),writable:!0})}:re,Je=ze(Ve);function He(e,t,i,d){for(var s=e.length,n=i+-1;++n<s;)if(t(e[n],n,e))return n;return-1}function _e(e){return e!==e}function Be(e,t,i){for(var d=i-1,s=e.length;++d<s;)if(e[d]===t)return d;return-1}function Ze(e,t,i){return t===t?Be(e,t,i):He(e,_e,i)}function ie(e,t){var i=e==null?0:e.length;return!!i&&Ze(e,t,0)>-1}var K=Math.max;function qe(e,t,i){return t=K(t===void 0?e.length-1:t,0),function(){for(var d=arguments,s=-1,n=K(d.length-t,0),r=Array(n);++s<n;)r[s]=d[t+s];s=-1;for(var l=Array(t+1);++s<t;)l[s]=d[s];return l[t]=i(r),$e(e,this,l)}}function Ke(e,t){return Je(qe(e,t,re),e+"")}var Ye=9007199254740991;function Qe(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Ye}function Xe(e){return e!=null&&Qe(e.length)&&!P.isFunction(e)}function Ge(e,t,i){var d=-1,s=e.length;t<0&&(t=-t>s?0:s+t),i=i>s?s:i,i<0&&(i+=s),s=t>i?0:i-t>>>0,t>>>=0;for(var n=Array(s);++d<s;)n[d]=e[d+t];return n}function et(e,t,i){var d=e.length;return i=i===void 0?d:i,Ge(e,t,i)}var tt="\\ud800-\\udfff",nt="\\u0300-\\u036f",rt="\\ufe20-\\ufe2f",it="\\u20d0-\\u20ff",at=nt+rt+it,st="\\ufe0e\\ufe0f",ot="\\u200d",ut=RegExp("["+ot+tt+at+st+"]");function ae(e){return ut.test(e)}function lt(e){return e.split("")}var se="\\ud800-\\udfff",ct="\\u0300-\\u036f",dt="\\ufe20-\\ufe2f",ft="\\u20d0-\\u20ff",pt=ct+dt+ft,ht="\\ufe0e\\ufe0f",gt="["+se+"]",z="["+pt+"]",W="\\ud83c[\\udffb-\\udfff]",mt="(?:"+z+"|"+W+")",oe="[^"+se+"]",ue="(?:\\ud83c[\\udde6-\\uddff]){2}",le="[\\ud800-\\udbff][\\udc00-\\udfff]",bt="\\u200d",ce=mt+"?",de="["+ht+"]?",vt="(?:"+bt+"(?:"+[oe,ue,le].join("|")+")"+de+ce+")*",xt=de+ce+vt,Rt="(?:"+[oe+z+"?",z,ue,le,gt].join("|")+")",Pt=RegExp(W+"(?="+W+")|"+Rt+xt,"g");function It(e){return e.match(Pt)||[]}function Dt(e){return ae(e)?It(e):lt(e)}function St(e){return function(t){t=P.toString(t);var i=ae(t)?Dt(t):void 0,d=i?i[0]:t.charAt(0),s=i?et(i,1).join(""):t.slice(1);return d[e]()+s}}var Lt=St("toUpperCase");function kt(e){return Lt(P.toString(e).toLowerCase())}function wt(e,t,i,d){for(var s=-1,n=e==null?0:e.length;++s<n;)i=t(i,e[s],s,e);return i}function Ct(e){return function(t){return e==null?void 0:e[t]}}var At={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},Ot=Ct(At),yt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Tt="\\u0300-\\u036f",Ut="\\ufe20-\\ufe2f",Et="\\u20d0-\\u20ff",Ft=Tt+Ut+Et,$t="["+Ft+"]",Mt=RegExp($t,"g");function Nt(e){return e=P.toString(e),e&&e.replace(yt,Ot).replace(Mt,"")}var jt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function zt(e){return e.match(jt)||[]}var Wt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function Vt(e){return Wt.test(e)}var fe="\\ud800-\\udfff",Jt="\\u0300-\\u036f",Ht="\\ufe20-\\ufe2f",_t="\\u20d0-\\u20ff",Bt=Jt+Ht+_t,pe="\\u2700-\\u27bf",he="a-z\\xdf-\\xf6\\xf8-\\xff",Zt="\\xac\\xb1\\xd7\\xf7",qt="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Kt="\\u2000-\\u206f",Yt=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",ge="A-Z\\xc0-\\xd6\\xd8-\\xde",Qt="\\ufe0e\\ufe0f",me=Zt+qt+Kt+Yt,be="['’]",Y="["+me+"]",Xt="["+Bt+"]",ve="\\d+",Gt="["+pe+"]",xe="["+he+"]",Re="[^"+fe+me+ve+pe+he+ge+"]",en="\\ud83c[\\udffb-\\udfff]",tn="(?:"+Xt+"|"+en+")",nn="[^"+fe+"]",Pe="(?:\\ud83c[\\udde6-\\uddff]){2}",Ie="[\\ud800-\\udbff][\\udc00-\\udfff]",w="["+ge+"]",rn="\\u200d",Q="(?:"+xe+"|"+Re+")",an="(?:"+w+"|"+Re+")",X="(?:"+be+"(?:d|ll|m|re|s|t|ve))?",G="(?:"+be+"(?:D|LL|M|RE|S|T|VE))?",De=tn+"?",Se="["+Qt+"]?",sn="(?:"+rn+"(?:"+[nn,Pe,Ie].join("|")+")"+Se+De+")*",on="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",un="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",ln=Se+De+sn,cn="(?:"+[Gt,Pe,Ie].join("|")+")"+ln,dn=RegExp([w+"?"+xe+"+"+X+"(?="+[Y,w,"$"].join("|")+")",an+"+"+G+"(?="+[Y,w+Q,"$"].join("|")+")",w+"?"+Q+"+"+X,w+"+"+G,un,on,ve,cn].join("|"),"g");function fn(e){return e.match(dn)||[]}function pn(e,t,i){return e=P.toString(e),t=t,t===void 0?Vt(e)?fn(e):zt(e):e.match(t)||[]}var hn="['’]",gn=RegExp(hn,"g");function mn(e){return function(t){return wt(pn(Nt(t).replace(gn,"")),e,"")}}var bn=mn(function(e,t,i){return t=t.toLowerCase(),e+(i?kt(t):t)}),vn="__lodash_hash_undefined__";function xn(e){return this.__data__.set(e,vn),this}function Rn(e){return this.__data__.has(e)}function O(e){var t=-1,i=e==null?0:e.length;for(this.__data__=new P.MapCache;++t<i;)this.add(e[t])}O.prototype.add=O.prototype.push=xn;O.prototype.has=Rn;function V(e,t){return e.has(t)}function Pn(e){return P.isObjectLike(e)&&Xe(e)}var In=Math.min;function Dn(e,t,i){for(var d=ie,s=e[0].length,n=e.length,r=n,l=Array(n),c=1/0,h=[];r--;){var u=e[r];c=In(u.length,c),l[r]=s>=120&&u.length>=120?new O(r&&u):void 0}u=e[0];var p=-1,g=l[0];e:for(;++p<s&&h.length<c;){var o=u[p],f=o;if(o=o!==0?o:0,!(g?V(g,f):d(h,f))){for(r=n;--r;){var m=l[r];if(!(m?V(m,f):d(e[r],f)))continue e}g&&g.push(f),h.push(o)}}return h}function Sn(e){return Pn(e)?e:[]}var Ln=Ke(function(e){var t=P.arrayMap(e,Sn);return t.length&&t[0]===e[0]?Dn(t):[]});const kn={complex:["tar.bz2","tar.gz","tar.xz"]},wn=e=>Object.hasOwn(e,"ddate"),Cn=e=>Object.hasOwn(e,"highlights"),F=e=>e.replace(/[^A-Za-z0-9\-_]/g,""),Le=(e,t)=>!e||typeof e!="string"?"":e.indexOf("!")>=0?e.split("!")[t]:"",ke=e=>Le(e,0),H=e=>Le(e,1),An=e=>{const t=e.extension||"",i=e.name||"";if(!t.length)return i;const d=i.lastIndexOf(`.${t}`);return i.substring(0,d)},$=e=>{const t=e.name;if(e.type==="directory"||e.isFolder)return"";const i=t.split(".");if(i.length>2)for(let d=0;d<i.length;d++){const s=i.slice(d,i.length).join(".");if(kn.complex.includes(s))return s}return i.length<2?"":i[i.length-1]},On=e=>U.basename(U.dirname(e.path))||null,yn=e=>typeof e.isShareRoot=="function"&&e.isShareRoot(),y=e=>{if(!e)return e;const t={};return Object.keys(e).forEach(i=>{t[bn(i)]=e[i]}),t};function Tn(e,t=[]){var f,m,D;const i=((f=e.props[a.Name])==null?void 0:f.toString())||U.basename(e.filename),d=e.props[a.FileId],s=e.type==="directory";let n;e.filename.startsWith("/files")||e.filename.startsWith("/space")?n=e.filename.split("/").slice(3).join("/"):n=e.filename,n.startsWith("/")||(n=`/${n}`);const r=$({...e,name:i}),l=e.props[a.LockDiscovery];let c,h,u;l&&(c=l[a.ActiveLock],h=c[a.LockOwner],u=c[a.LockTime]);let p=[];e.props[a.ShareTypes]&&(p=e.props[a.ShareTypes]["share-type"],Array.isArray(p)||(p=[p]));const g={};for(const k of t||[]){const S=k.split(":").pop();e.props[S]&&(g[k]=e.props[S])}const o={id:d,fileId:d,storageId:ke(d),parentFolderId:e.props[a.FileParent],mimeType:e.props[a.MimeType],name:i,extension:s?"":r,path:n,webDavPath:e.filename,type:s?"folder":e.type,isFolder:s,locked:!!c,lockOwner:h,lockTime:u,processing:e.processing||!1,mdate:e.props[a.LastModifiedDate],size:s?((m=e.props[a.ContentSize])==null?void 0:m.toString())||"0":((D=e.props[a.ContentLength])==null?void 0:D.toString())||"0",permissions:e.props[a.Permissions]||"",starred:e.props[a.IsFavorite]!==0,etag:e.props[a.ETag],shareTypes:p,privateLink:e.props[a.PrivateLink],downloadURL:e.props[a.DownloadURL],remoteItemId:e.props[a.RemoteItemId],remoteItemPath:e.props[a.ShareRoot],owner:{id:e.props[a.OwnerId],displayName:e.props[a.OwnerDisplayName]},tags:(e.props[a.Tags]||"").toString().split(",").filter(Boolean),audio:y(e.props[a.Audio]),location:y(e.props[a.Location]),image:y(e.props[a.Image]),photo:y(e.props[a.Photo]),extraProps:g,canUpload:function(){return this.permissions.indexOf(R.FolderCreateable)>=0},canDownload:function(){return this.permissions.indexOf(R.SecureView)===-1},canBeDeleted:function(){return this.permissions.indexOf(R.Deletable)>=0},canRename:function(){return this.permissions.indexOf(R.Renameable)>=0},canShare:function({ability:k}){return k.can("create-all","Share")&&this.permissions.indexOf(R.Shareable)>=0},canCreate:function(){return this.permissions.indexOf(R.FolderCreateable)>=0},canEditTags:function(){return this.permissions.indexOf(R.Updateable)>=0||this.permissions.indexOf(R.FileUpdateable)>=0},isMounted:function(){return this.permissions.indexOf(R.Mounted)>=0},isReceivedShare:function(){return this.permissions.indexOf(R.Shared)>=0},isShareRoot(){return e.props[a.ShareRoot]?e.filename.split("/").length===3:!1},canDeny:function(){return this.permissions.indexOf(R.Deny)>=0},getDomSelector:()=>F(d)};return Object.defineProperty(o,"nodeId",{get(){return H(this.id)}}),o}function Un(e){var n;const t=e.type==="directory",i=(n=e.props[a.TrashbinOriginalFilename])==null?void 0:n.toString(),d=$({name:i,type:e.type}),s=Z.basename(e.filename);return{type:t?"folder":e.type,isFolder:t,ddate:e.props[a.TrashbinDeletedDate],name:Z.basename(i),extension:d,path:P.urlJoin(e.props[a.TrashbinOriginalLocation],{leadingSlash:!0}),id:s,parentFolderId:e.props[a.FileParent],webDavPath:"",canUpload:()=>!1,canDownload:()=>!1,canBeDeleted:()=>!0,canBeRestored:function(){return!0},canRename:()=>!1,canShare:()=>!1,canCreate:()=>!1,isMounted:()=>!1,isReceivedShare:()=>!1,getDomSelector:()=>F(s)}}var I=(e=>(e.createUpload="libre.graph/driveItem/upload/create",e.createPermissions="libre.graph/driveItem/permissions/create",e.createChildren="libre.graph/driveItem/children/create",e.readBasic="libre.graph/driveItem/basic/read",e.readPath="libre.graph/driveItem/path/read",e.readQuota="libre.graph/driveItem/quota/read",e.readContent="libre.graph/driveItem/content/read",e.readChildren="libre.graph/driveItem/children/read",e.readDeleted="libre.graph/driveItem/deleted/read",e.readPermissions="libre.graph/driveItem/permissions/read",e.readVersions="libre.graph/driveItem/versions/read",e.updatePath="libre.graph/driveItem/path/update",e.updateDeleted="libre.graph/driveItem/deleted/update",e.updatePermissions="libre.graph/driveItem/permissions/update",e.updateVersions="libre.graph/driveItem/versions/update",e.deleteStandard="libre.graph/driveItem/standard/delete",e.deleteDeleted="libre.graph/driveItem/deleted/delete",e.deletePermissions="libre.graph/driveItem/permissions/delete",e))(I||{});const A=e=>e;class C{constructor(t,i,d,s){b(this,"_key");b(this,"_value");b(this,"_label");b(this,"_icon");this._key=t,this._value=i,this._label=d,this._icon=s}get key(){return this._key}get value(){return this._value}get label(){return this._label}get icon(){return this._icon}}const x=class x{static isIndividual(t){return this.individuals.includes(t)}static isCollective(t){return this.collectives.includes(t)}static isUnauthenticated(t){return this.unauthenticated.includes(t)}static isAuthenticated(t){return this.authenticated.includes(t)}static getByValue(t){return this.all.find(i=>i.value===t)}static getByValues(t){return t.map(i=>this.getByValue(i))}static getByKeys(t){return t.map(i=>this.all.find(d=>d.key===i))}static getValues(t){return t.map(i=>i.value)}static containsAnyValue(t,i){return Ln(this.getValues(t),i).length>0}};b(x,"user",new C("user",0,A("User"),"user")),b(x,"group",new C("group",1,A("Group"),"group")),b(x,"link",new C("link",3,A("Link"),"link")),b(x,"guest",new C("guest",4,A("Guest"),"global")),b(x,"remote",new C("remote",6,A("External"),"earth")),b(x,"individuals",[x.user,x.guest,x.remote]),b(x,"collectives",[x.group]),b(x,"unauthenticated",[x.link]),b(x,"authenticated",[x.user,x.group,x.guest,x.remote]),b(x,"all",[x.user,x.group,x.link,x.guest,x.remote]);let J=x;const En="a0ca6a90-a365-4782-871e-d44447bbc668",Fn="89f37a33-858b-45fa-8890-a1f2b27d90e1",$n=e=>(e==null?void 0:e.type)==="space",T=e=>(e==null?void 0:e.driveType)==="personal",Mn=e=>(e==null?void 0:e.driveType)==="project",Nn=e=>(e==null?void 0:e.driveType)==="share",jn=e=>(e==null?void 0:e.driveType)==="mountpoint",zn=e=>(e==null?void 0:e.driveType)==="public";function we(e,t){return P.urlJoin("spaces",e,t,{leadingSlash:!0})}function Ce(e,t=""){return P.urlJoin("spaces","trash-bin",e,t,{leadingSlash:!0})}function Wn(e,t){const d=e[{image:"spaceImageData",readme:"spaceReadmeData"}[t]];if(!d)return"";const s=decodeURI(d.webDavUrl).split("/"),n=s.find(r=>r.startsWith(e.id));return n?s.slice(s.indexOf(n)+1).join("/"):""}function Vn(e){return e.permissions.includes(I.deletePermissions)}function Jn(e){var p,g,o,f,m,D;const t=e.publicLinkPassword,i=(p=e.props)==null?void 0:p[a.FileId],d=(g=e.props)==null?void 0:g[a.PublicLinkItemType],s=(o=e.props)==null?void 0:o[a.PublicLinkPermission],n=(f=e.props)==null?void 0:f[a.PublicLinkExpiration],r=(m=e.props)==null?void 0:m[a.PublicLinkShareDate],l=(D=e.props)==null?void 0:D[a.PublicLinkShareOwner],c=e.publicLinkType;let h,u;return c==="ocm"?(h=`ocm/${e.id}`,u=te(e.id)):(h=`public/${e.id}`,u=ee(e.id)),Object.assign(_({...e,driveType:"public",driveAlias:h,webDavPath:u}),{...i&&{fileId:i},...t&&{publicLinkPassword:t},...d&&{publicLinkItemType:d},...s&&{publicLinkPermission:parseInt(s)},...n&&{publicLinkExpiration:n},...r&&{publicLinkShareDate:r},...l&&{publicLinkShareOwner:l},publicLinkType:c})}function Hn({driveAliasPrefix:e,id:t,shareName:i,serverUrl:d}){const s=_({id:t,driveAlias:`${e}/${i}`,driveType:"share",name:i,serverUrl:d});return s.rename=n=>{s.driveAlias=`${e}/${n}`,s.name=n},s}function _(e){var h,u,p,g;let t,i;e.special&&(t=e.special.find(o=>o.specialFolder.name==="image"),i=e.special.find(o=>o.specialFolder.name==="readme"),t&&(t.webDavUrl=decodeURI(t.webDavUrl)),i&&(i.webDavUrl=decodeURI(i.webDavUrl)));const d=((u=(h=e.root)==null?void 0:h.deleted)==null?void 0:u.state)==="trashed",s=P.urlJoin(e.webDavPath||we(e.id),{leadingSlash:!0}),n=P.urlJoin(e.serverUrl,"remote.php/dav",s),r=P.urlJoin(e.webDavTrashPath||Ce(e.id),{leadingSlash:!0}),l=P.urlJoin(e.serverUrl,"remote.php/dav",r),c={id:e.id,fileId:e.id,storageId:e.id,mimeType:"",name:e.name,description:e.description,extension:"",path:"/",webDavPath:s,webDavTrashPath:r,driveAlias:e.driveAlias,driveType:e.driveType,type:"space",isFolder:!0,mdate:e.lastModifiedDateTime,size:((p=e.quota)==null?void 0:p.used)||0,tags:[],permissions:"",starred:!1,etag:"",shareTypes:[],privateLink:e.webUrl,downloadURL:"",owner:(g=e.owner)==null?void 0:g.user,disabled:d,root:e.root,spaceQuota:e.quota,spaceImageData:t,spaceReadmeData:i,hasTrashedItems:e["@libre.graph.hasTrashedItems"]||!1,graphPermissions:void 0,canUpload:function({user:o}={}){var f;return T(this)&&this.isOwner(o)?!0:(f=this.graphPermissions)==null?void 0:f.includes(I.createUpload)},canDownload:function(){return!0},canBeDeleted:function({ability:o}={}){var f;return this.disabled?o!=null&&o.can("delete-all","Drive")?!0:(f=this.graphPermissions)==null?void 0:f.includes(I.deletePermissions):!1},canRename:function({ability:o}={}){var f;return o!=null&&o.can("update-all","Drive")?!0:(f=this.graphPermissions)==null?void 0:f.includes(I.deletePermissions)},canEditDescription:function({ability:o}={}){var f;return o!=null&&o.can("update-all","Drive")?!0:(f=this.graphPermissions)==null?void 0:f.includes(I.deletePermissions)},canRestore:function({ability:o}={}){var f;return this.disabled?o!=null&&o.can("update-all","Drive")?!0:(f=this.graphPermissions)==null?void 0:f.includes(I.deletePermissions):!1},canDisable:function({ability:o}={}){var f;return this.disabled?!1:o!=null&&o.can("delete-all","Drive")?!0:(f=this.graphPermissions)==null?void 0:f.includes(I.deletePermissions)},canShare:function(){var o;return(o=this.graphPermissions)==null?void 0:o.includes(I.createPermissions)},canEditImage:function(){var o;return this.disabled?!1:(o=this.graphPermissions)==null?void 0:o.includes(I.deletePermissions)},canEditReadme:function(){var o;return this.disabled?!1:(o=this.graphPermissions)==null?void 0:o.includes(I.deletePermissions)},canRestoreFromTrashbin:function(){var o;return(o=this.graphPermissions)==null?void 0:o.includes(I.updateDeleted)},canDeleteFromTrashBin:function({user:o}={}){var f;return T(this)&&this.isOwner(o)?!0:(f=this.graphPermissions)==null?void 0:f.includes(I.deletePermissions)},canListVersions:function({user:o}={}){var f;return T(this)&&this.isOwner(o)?!0:(f=this.graphPermissions)==null?void 0:f.includes(I.readVersions)},canCreate:function(){return!0},canEditTags:function(){return!1},isMounted:function(){return!0},isReceivedShare:function(){return!1},isShareRoot:function(){return["share","mountpoint","public"].includes(e.driveType)},canDeny:()=>!1,getDomSelector:()=>F(e.id),getDriveAliasAndItem({path:o}){return P.urlJoin(this.driveAlias,o,{leadingSlash:!1})},getWebDavUrl({path:o}){return P.urlJoin(n,o)},getWebDavTrashUrl({path:o}){return P.urlJoin(l,o)},isOwner(o){var f;return(o==null?void 0:o.id)===((f=this.owner)==null?void 0:f.id)}};return Object.defineProperty(c,"nodeId",{get(){return H(this.id)}}),c}function _n(e){return{id:e.spaceImageData.id,name:e.spaceImageData.name,etag:e.spaceImageData.eTag,extension:$({name:e.spaceImageData.name}),mimeType:e.spaceImageData.file.mimeType,type:"file",webDavPath:P.urlJoin(e.webDavPath,".space",e.spaceImageData.name),canDownload:()=>!0}}exports.DavMethod=ne;exports.DavPermission=R;exports.DavProperties=j;exports.DavProperty=a;exports.GraphSharePermission=I;exports.OCM_PROVIDER_ID=Fn;exports.SHARE_JAIL_ID=En;exports.SetCache=O;exports.ShareType=C;exports.ShareTypes=J;exports.arrayIncludes=ie;exports.buildDeletedResource=Un;exports.buildPublicSpaceResource=Jn;exports.buildResource=Tn;exports.buildShareSpaceResource=Hn;exports.buildSpace=_;exports.buildSpaceImageResource=_n;exports.buildWebDavOcmPath=te;exports.buildWebDavPublicPath=ee;exports.buildWebDavSpacesPath=we;exports.buildWebDavSpacesTrashPath=Ce;exports.cacheHas=V;exports.extractDomSelector=F;exports.extractExtensionFromFile=$;exports.extractNameWithoutExtension=An;exports.extractNodeId=H;exports.extractParentFolderName=On;exports.extractStorageId=ke;exports.getRelativeSpecialFolderSpacePath=Wn;exports.isManager=Vn;exports.isMountPointSpaceResource=jn;exports.isPersonalSpaceResource=T;exports.isProjectSpaceResource=Mn;exports.isPublicSpaceResource=zn;exports.isSearchResource=Cn;exports.isShareRoot=yn;exports.isShareSpaceResource=Nn;exports.isSpaceResource=$n;exports.isTrashResource=wn;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var Br=Object.defineProperty;var Rt=r=>{throw TypeError(r)};var qr=(r,e,t)=>e in r?Br(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var U=(r,e,t)=>qr(r,typeof e!="symbol"?e+"":e,t),Je=(r,e,t)=>e.has(r)||Rt("Cannot "+t);var S=(r,e,t)=>(Je(r,e,"read from private field"),t?t.call(r):e.get(r)),oe=(r,e,t)=>e.has(r)?Rt("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(r):e.set(r,t),X=(r,e,t,n)=>(Je(r,e,"write to private field"),n?n.call(r,t):e.set(r,t),t),me=(r,e,t)=>(Je(r,e,"access private method"),t);const Wr=require("./index-43W1CNwK.cjs"),L=require("./functions-DJR5h-q5.cjs"),W=require("./toString-hHr716Th.cjs"),Xr=require("./web-client/ocs.cjs"),ce=require("./index-C6VnMvgz.cjs"),Ie=r=>encodeURIComponent(r).split("%2F").join("/");class xt extends Error{constructor(t,n,o=null){super(t);U(this,"response");U(this,"statusCode");this.response=n,this.statusCode=o}}class mr extends xt{constructor(t,n,o,u=null){super(t,o,u);U(this,"errorCode");this.errorCode=n}}const ge=(r,{fileId:e,path:t,name:n})=>{if(t!==void 0)return W.urlJoin(r.webDavPath,t);if(e!==void 0){if(L.isPublicSpaceResource(r))throw new Error("public spaces need a path provided");return W.urlJoin("spaces",e,n||"")}return r.webDavPath},Gr=(r,e)=>({copyFiles(t,{path:n,fileId:o},u,{path:l,parentFolderId:i,name:h},{overwrite:a,...s}={}){const f=ge(t,{fileId:o,path:n}),c=ge(u,{fileId:i,path:l,name:h});return r.copy(f,c,{overwrite:a||!1,...s})}}),zr=(r,e,t)=>({async createFolder(n,{path:o,parentFolderId:u,folderName:l,fetchFolder:i=!0,...h}){const a=ge(n,{fileId:u,path:o,name:l});if(await r.mkcol(a),i)return e.getFileInfo(n,{path:o},h)}}),Jr=(r,{axiosClient:e})=>({async getFileContents(t,{fileId:n,path:o},{responseType:u="text",noCache:l=!0,headers:i,...h}={}){try{const a=ge(t,{fileId:n,path:o}),s=await e.get(r.getFileUrl(a),{responseType:u,headers:{...l&&{"Cache-Control":"no-cache"},...i||{}},...h});return{response:s,body:s.data,headers:{ETag:s.headers.etag,"OC-ETag":s.headers["oc-etag"],"OC-FileId":s.headers["oc-fileid"]}}}catch(a){const{message:s,response:f}=a;throw new xt(s,f,f.status)}}}),Hr=(r,e)=>({async getFileInfo(t,n,o){return(await r.listFiles(t,n,{depth:0,...o})).resource}}),Zr=(r,e,{axiosClient:t,baseUrl:n})=>({async getFileUrl(o,u,{disposition:l="attachment",isUrlSigningEnabled:i=!1,signUrlTimeout:h=86400,version:a=null,doHeadRequest:s=!1,username:f="",...c}){const d=l==="inline";let{downloadURL:m}=u,g=!0;if(!m&&!d&&(m=a?r.getFileUrl(W.urlJoin("meta",u.fileId,"v",a)):r.getFileUrl(u.webDavPath),f&&s&&await t.head(m),i&&f?m=await Xr.ocs(n,t).signUrl(m,f):g=!1),!g||d){const w=await e.getFileContents(o,u,{responseType:"blob",...c});m=URL.createObjectURL(w.body)}return m},revokeUrl:o=>{o&&o.startsWith("blob:")&&URL.revokeObjectURL(o)}}),Yr=(r,e)=>({getPublicFileUrl(t,n){return r.getFileUrl(W.urlJoin("public-files",n))}}),Kr=(r,e,t)=>({async listFiles(n,{path:o,fileId:u}={},{depth:l=1,davProperties:i,isTrash:h=!1,...a}={}){let s;if(L.isPublicSpaceResource(n)){s=await r.propfind(W.urlJoin(n.webDavPath,o),{depth:l,properties:i||L.DavProperties.PublicLink,...a}),s.forEach(m=>{m.filename=m.filename.split("/").slice(1).join("/")}),s.length===1&&(s[0].filename=W.urlJoin(n.id,o,{leadingSlash:!0})),s.forEach(m=>{m.filename=m.filename.split("/").slice(2).join("/")});const c=n.driveAlias.startsWith("ocm/")?"ocm":"public-link";if((!o||o==="/")&&l>0&&c==="ocm"&&s[0].props[L.DavProperty.PublicLinkItemType]==="file"&&(s=[{basename:n.fileId,type:"directory",filename:"",props:{}},...s]),!o){const[m,...g]=s;return{resource:L.buildPublicSpaceResource({...m,id:n.id,driveAlias:n.driveAlias,webDavPath:n.webDavPath,publicLinkType:c}),children:g.map(w=>L.buildResource(w,r.extraProps))}}const d=s.map(m=>L.buildResource(m,r.extraProps));return{resource:d[0],children:d.slice(1)}}const f=async()=>{const c=await e.getPathForFileId(u);return this.listFiles(n,{path:c},{depth:l,davProperties:i})};try{let c="";if(h?c=L.buildWebDavSpacesTrashPath(n.id):c=ge(n,{fileId:u,path:o}),s=await r.propfind(c,{depth:l,properties:i||L.DavProperties.Default,...a}),h)return{resource:L.buildResource(s[0],r.extraProps),children:s.slice(1).map(L.buildDeletedResource)};const d=s.map(g=>L.buildResource(g,r.extraProps)),m=u===n.id;return u&&!m&&u!==d[0].fileId?f():{resource:d[0],children:d.slice(1)}}catch(c){if(c.statusCode===404&&u)return f();throw c}}}),Qr=(r,e)=>({moveFiles(t,{path:n,fileId:o},u,{path:l,parentFolderId:i,name:h},{overwrite:a,...s}={}){const f=ge(t,{fileId:o,path:n}),c=ge(u,{fileId:i,path:l,name:h});return r.move(f,c,{overwrite:a||!1,...s})}}),Dr=(r,e,t)=>({async putFileContents(n,{fileName:o,path:u,parentFolderId:l,content:i="",previousEntityTag:h="",overwrite:a,onUploadProgress:s=null,...f}){const c=ge(n,{fileId:l,name:o,path:u}),{result:d}=await r.put(c,i,{previousEntityTag:h,overwrite:a,onUploadProgress:s,...f});return e.getFileInfo(n,{fileId:d.headers.get("Oc-Fileid"),path:u})}}),en=(r,e)=>({deleteFile(t,{path:n,...o}){return r.delete(W.urlJoin(t.webDavPath,n),o)}}),tn=(r,e)=>({restoreFile(t,{id:n},{path:o},{overwrite:u,...l}={}){if(L.isPublicSpaceResource(t))return;const i=W.urlJoin(t.webDavPath,o);return r.move(W.urlJoin(t.webDavTrashPath,n),i,{overwrite:u,...l})}}),rn=(r,e)=>({restoreFileVersion(t,{parentFolderId:n,name:o,path:u},l,i={}){const h=ge(t,{path:u,fileId:n,name:o}),a=W.urlJoin("meta",n,"v",l,{leadingSlash:!0}),s=W.urlJoin("files",h,{leadingSlash:!0});return r.copy(a,s,i)}}),nn=(r,e)=>({clearTrashBin(t,{id:n,...o}={}){let u=L.buildWebDavSpacesTrashPath(t.id);return n&&(u=W.urlJoin(u,n)),r.delete(u,o)}}),sn=(r,e)=>({async search(t,{davProperties:n=L.DavProperties.Default,searchLimit:o,...u}){const l="/spaces/",{range:i,results:h}=await r.report(l,{pattern:t,limit:o,properties:n,...u});return{resources:h.map(a=>({...L.buildResource(a,r.extraProps),highlights:a.props[L.DavProperty.Highlights]||""})),totalResults:i?parseInt(i==null?void 0:i.split("/")[1]):null}}}),on=(r,e)=>({async getPathForFileId(t,n={}){return(await r.propfind(W.urlJoin("meta",t,{leadingSlash:!0}),{properties:[L.DavProperty.MetaPathForUser],...n}))[0].props[L.DavProperty.MetaPathForUser]}});/*! For license information please see index.js.LICENSE.txt */var an={2:r=>{function e(o,u,l){o instanceof RegExp&&(o=t(o,l)),u instanceof RegExp&&(u=t(u,l));var i=n(o,u,l);return i&&{start:i[0],end:i[1],pre:l.slice(0,i[0]),body:l.slice(i[0]+o.length,i[1]),post:l.slice(i[1]+u.length)}}function t(o,u){var l=u.match(o);return l?l[0]:null}function n(o,u,l){var i,h,a,s,f,c=l.indexOf(o),d=l.indexOf(u,c+1),m=c;if(c>=0&&d>0){for(i=[],a=l.length;m>=0&&!f;)m==c?(i.push(m),c=l.indexOf(o,m+1)):i.length==1?f=[i.pop(),d]:((h=i.pop())<a&&(a=h,s=d),d=l.indexOf(u,m+1)),m=c<d&&c>=0?c:d;i.length&&(f=[a,s])}return f}r.exports=e,e.range=n},101:function(r,e,t){var n;r=t.nmd(r),function(o){var u=(r&&r.exports,typeof ce.global=="object"&&ce.global);u.global!==u&&u.window;var l=function(f){this.message=f};(l.prototype=new Error).name="InvalidCharacterError";var i=function(f){throw new l(f)},h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=/[\t\n\f\r ]/g,s={encode:function(f){f=String(f),/[^\0-\xFF]/.test(f)&&i("The string to be encoded contains characters outside of the Latin1 range.");for(var c,d,m,g,w=f.length%3,y="",p=-1,v=f.length-w;++p<v;)c=f.charCodeAt(p)<<16,d=f.charCodeAt(++p)<<8,m=f.charCodeAt(++p),y+=h.charAt((g=c+d+m)>>18&63)+h.charAt(g>>12&63)+h.charAt(g>>6&63)+h.charAt(63&g);return w==2?(c=f.charCodeAt(p)<<8,d=f.charCodeAt(++p),y+=h.charAt((g=c+d)>>10)+h.charAt(g>>4&63)+h.charAt(g<<2&63)+"="):w==1&&(g=f.charCodeAt(p),y+=h.charAt(g>>2)+h.charAt(g<<4&63)+"=="),y},decode:function(f){var c=(f=String(f).replace(a,"")).length;c%4==0&&(c=(f=f.replace(/==?$/,"")).length),(c%4==1||/[^+a-zA-Z0-9/]/.test(f))&&i("Invalid character: the string to be decoded is not correctly encoded.");for(var d,m,g=0,w="",y=-1;++y<c;)m=h.indexOf(f.charAt(y)),d=g%4?64*d+m:m,g++%4&&(w+=String.fromCharCode(255&d>>(-2*g&6)));return w},version:"1.0.0"};(n=(function(){return s}).call(e,t,e,r))===void 0||(r.exports=n)}()},172:(r,e)=>{e.d=function(t){if(!t)return 0;for(var n=(t=t.toString()).length,o=t.length;o--;){var u=t.charCodeAt(o);56320<=u&&u<=57343&&o--,127<u&&u<=2047?n++:2047<u&&u<=65535&&(n+=2)}return n}},526:r=>{var e={utf8:{stringToBytes:function(t){return e.bin.stringToBytes(unescape(encodeURIComponent(t)))},bytesToString:function(t){return decodeURIComponent(escape(e.bin.bytesToString(t)))}},bin:{stringToBytes:function(t){for(var n=[],o=0;o<t.length;o++)n.push(255&t.charCodeAt(o));return n},bytesToString:function(t){for(var n=[],o=0;o<t.length;o++)n.push(String.fromCharCode(t[o]));return n.join("")}}};r.exports=e},298:r=>{var e,t;e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t={rotl:function(n,o){return n<<o|n>>>32-o},rotr:function(n,o){return n<<32-o|n>>>o},endian:function(n){if(n.constructor==Number)return 16711935&t.rotl(n,8)|4278255360&t.rotl(n,24);for(var o=0;o<n.length;o++)n[o]=t.endian(n[o]);return n},randomBytes:function(n){for(var o=[];n>0;n--)o.push(Math.floor(256*Math.random()));return o},bytesToWords:function(n){for(var o=[],u=0,l=0;u<n.length;u++,l+=8)o[l>>>5]|=n[u]<<24-l%32;return o},wordsToBytes:function(n){for(var o=[],u=0;u<32*n.length;u+=8)o.push(n[u>>>5]>>>24-u%32&255);return o},bytesToHex:function(n){for(var o=[],u=0;u<n.length;u++)o.push((n[u]>>>4).toString(16)),o.push((15&n[u]).toString(16));return o.join("")},hexToBytes:function(n){for(var o=[],u=0;u<n.length;u+=2)o.push(parseInt(n.substr(u,2),16));return o},bytesToBase64:function(n){for(var o=[],u=0;u<n.length;u+=3)for(var l=n[u]<<16|n[u+1]<<8|n[u+2],i=0;i<4;i++)8*u+6*i<=8*n.length?o.push(e.charAt(l>>>6*(3-i)&63)):o.push("=");return o.join("")},base64ToBytes:function(n){n=n.replace(/[^A-Z0-9+\/]/gi,"");for(var o=[],u=0,l=0;u<n.length;l=++u%4)l!=0&&o.push((e.indexOf(n.charAt(u-1))&Math.pow(2,-2*l+8)-1)<<2*l|e.indexOf(n.charAt(u))>>>6-2*l);return o}},r.exports=t},635:(r,e,t)=>{const n=t(31),o=t(338),u=t(221);r.exports={XMLParser:o,XMLValidator:n,XMLBuilder:u}},118:r=>{r.exports=function(e){return typeof e=="function"?e:Array.isArray(e)?t=>{for(const n of e)if(typeof n=="string"&&t===n||n instanceof RegExp&&n.test(t))return!0}:()=>!1}},705:(r,e)=>{const t=":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",n="["+t+"]["+t+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*",o=new RegExp("^"+n+"$");e.isExist=function(u){return u!==void 0},e.isEmptyObject=function(u){return Object.keys(u).length===0},e.merge=function(u,l,i){if(l){const h=Object.keys(l),a=h.length;for(let s=0;s<a;s++)u[h[s]]=i==="strict"?[l[h[s]]]:l[h[s]]}},e.getValue=function(u){return e.isExist(u)?u:""},e.isName=function(u){return o.exec(u)!=null},e.getAllMatches=function(u,l){const i=[];let h=l.exec(u);for(;h;){const a=[];a.startIndex=l.lastIndex-h[0].length;const s=h.length;for(let f=0;f<s;f++)a.push(h[f]);i.push(a),h=l.exec(u)}return i},e.nameRegexp=n},31:(r,e,t)=>{const n=t(705),o={allowBooleanAttributes:!1,unpairedTags:[]};function u(p){return p===" "||p===" "||p===`
|
|
1
|
+
"use strict";var Br=Object.defineProperty;var Rt=r=>{throw TypeError(r)};var qr=(r,e,t)=>e in r?Br(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var U=(r,e,t)=>qr(r,typeof e!="symbol"?e+"":e,t),Je=(r,e,t)=>e.has(r)||Rt("Cannot "+t);var S=(r,e,t)=>(Je(r,e,"read from private field"),t?t.call(r):e.get(r)),oe=(r,e,t)=>e.has(r)?Rt("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(r):e.set(r,t),X=(r,e,t,n)=>(Je(r,e,"write to private field"),n?n.call(r,t):e.set(r,t),t),me=(r,e,t)=>(Je(r,e,"access private method"),t);const Wr=require("./index-C-U4KVPG.cjs"),L=require("./functions-DEaUzlbB.cjs"),W=require("./toString-hHr716Th.cjs"),Xr=require("./web-client/ocs.cjs"),ce=require("./index-C6VnMvgz.cjs"),Ie=r=>encodeURIComponent(r).split("%2F").join("/");class xt extends Error{constructor(t,n,o=null){super(t);U(this,"response");U(this,"statusCode");this.response=n,this.statusCode=o}}class mr extends xt{constructor(t,n,o,u=null){super(t,o,u);U(this,"errorCode");this.errorCode=n}}const ge=(r,{fileId:e,path:t,name:n})=>{if(t!==void 0)return W.urlJoin(r.webDavPath,t);if(e!==void 0){if(L.isPublicSpaceResource(r))throw new Error("public spaces need a path provided");return W.urlJoin("spaces",e,n||"")}return r.webDavPath},Gr=(r,e)=>({copyFiles(t,{path:n,fileId:o},u,{path:l,parentFolderId:i,name:h},{overwrite:a,...s}={}){const f=ge(t,{fileId:o,path:n}),c=ge(u,{fileId:i,path:l,name:h});return r.copy(f,c,{overwrite:a||!1,...s})}}),zr=(r,e,t)=>({async createFolder(n,{path:o,parentFolderId:u,folderName:l,fetchFolder:i=!0,...h}){const a=ge(n,{fileId:u,path:o,name:l});if(await r.mkcol(a),i)return e.getFileInfo(n,{path:o},h)}}),Jr=(r,{axiosClient:e})=>({async getFileContents(t,{fileId:n,path:o},{responseType:u="text",noCache:l=!0,headers:i,...h}={}){try{const a=ge(t,{fileId:n,path:o}),s=await e.get(r.getFileUrl(a),{responseType:u,headers:{...l&&{"Cache-Control":"no-cache"},...i||{}},...h});return{response:s,body:s.data,headers:{ETag:s.headers.etag,"OC-ETag":s.headers["oc-etag"],"OC-FileId":s.headers["oc-fileid"]}}}catch(a){const{message:s,response:f}=a;throw new xt(s,f,f.status)}}}),Hr=(r,e)=>({async getFileInfo(t,n,o){return(await r.listFiles(t,n,{depth:0,...o})).resource}}),Zr=(r,e,{axiosClient:t,baseUrl:n})=>({async getFileUrl(o,u,{disposition:l="attachment",isUrlSigningEnabled:i=!1,signUrlTimeout:h=86400,version:a=null,doHeadRequest:s=!1,username:f="",...c}){const d=l==="inline";let{downloadURL:m}=u,g=!0;if(!m&&!d&&(m=a?r.getFileUrl(W.urlJoin("meta",u.fileId,"v",a)):r.getFileUrl(u.webDavPath),f&&s&&await t.head(m),i&&f?m=await Xr.ocs(n,t).signUrl(m,f):g=!1),!g||d){const w=await e.getFileContents(o,u,{responseType:"blob",...c});m=URL.createObjectURL(w.body)}return m},revokeUrl:o=>{o&&o.startsWith("blob:")&&URL.revokeObjectURL(o)}}),Yr=(r,e)=>({getPublicFileUrl(t,n){return r.getFileUrl(W.urlJoin("public-files",n))}}),Kr=(r,e,t)=>({async listFiles(n,{path:o,fileId:u}={},{depth:l=1,davProperties:i,isTrash:h=!1,...a}={}){let s;if(L.isPublicSpaceResource(n)){s=await r.propfind(W.urlJoin(n.webDavPath,o),{depth:l,properties:i||L.DavProperties.PublicLink,...a}),s.forEach(m=>{m.filename=m.filename.split("/").slice(1).join("/")}),s.length===1&&(s[0].filename=W.urlJoin(n.id,o,{leadingSlash:!0})),s.forEach(m=>{m.filename=m.filename.split("/").slice(2).join("/")});const c=n.driveAlias.startsWith("ocm/")?"ocm":"public-link";if((!o||o==="/")&&l>0&&c==="ocm"&&s[0].props[L.DavProperty.PublicLinkItemType]==="file"&&(s=[{basename:n.fileId,type:"directory",filename:"",props:{}},...s]),!o){const[m,...g]=s;return{resource:L.buildPublicSpaceResource({...m,id:n.id,driveAlias:n.driveAlias,webDavPath:n.webDavPath,publicLinkType:c}),children:g.map(w=>L.buildResource(w,r.extraProps))}}const d=s.map(m=>L.buildResource(m,r.extraProps));return{resource:d[0],children:d.slice(1)}}const f=async()=>{const c=await e.getPathForFileId(u);return this.listFiles(n,{path:c},{depth:l,davProperties:i})};try{let c="";if(h?c=L.buildWebDavSpacesTrashPath(n.id):c=ge(n,{fileId:u,path:o}),s=await r.propfind(c,{depth:l,properties:i||L.DavProperties.Default,...a}),h)return{resource:L.buildResource(s[0],r.extraProps),children:s.slice(1).map(L.buildDeletedResource)};const d=s.map(g=>L.buildResource(g,r.extraProps)),m=u===n.id;return u&&!m&&u!==d[0].fileId?f():{resource:d[0],children:d.slice(1)}}catch(c){if(c.statusCode===404&&u)return f();throw c}}}),Qr=(r,e)=>({moveFiles(t,{path:n,fileId:o},u,{path:l,parentFolderId:i,name:h},{overwrite:a,...s}={}){const f=ge(t,{fileId:o,path:n}),c=ge(u,{fileId:i,path:l,name:h});return r.move(f,c,{overwrite:a||!1,...s})}}),Dr=(r,e,t)=>({async putFileContents(n,{fileName:o,path:u,parentFolderId:l,content:i="",previousEntityTag:h="",overwrite:a,onUploadProgress:s=null,...f}){const c=ge(n,{fileId:l,name:o,path:u}),{result:d}=await r.put(c,i,{previousEntityTag:h,overwrite:a,onUploadProgress:s,...f});return e.getFileInfo(n,{fileId:d.headers.get("Oc-Fileid"),path:u})}}),en=(r,e)=>({deleteFile(t,{path:n,...o}){return r.delete(W.urlJoin(t.webDavPath,n),o)}}),tn=(r,e)=>({restoreFile(t,{id:n},{path:o},{overwrite:u,...l}={}){if(L.isPublicSpaceResource(t))return;const i=W.urlJoin(t.webDavPath,o);return r.move(W.urlJoin(t.webDavTrashPath,n),i,{overwrite:u,...l})}}),rn=(r,e)=>({restoreFileVersion(t,{parentFolderId:n,name:o,path:u},l,i={}){const h=ge(t,{path:u,fileId:n,name:o}),a=W.urlJoin("meta",n,"v",l,{leadingSlash:!0}),s=W.urlJoin("files",h,{leadingSlash:!0});return r.copy(a,s,i)}}),nn=(r,e)=>({clearTrashBin(t,{id:n,...o}={}){let u=L.buildWebDavSpacesTrashPath(t.id);return n&&(u=W.urlJoin(u,n)),r.delete(u,o)}}),sn=(r,e)=>({async search(t,{davProperties:n=L.DavProperties.Default,searchLimit:o,...u}){const l="/spaces/",{range:i,results:h}=await r.report(l,{pattern:t,limit:o,properties:n,...u});return{resources:h.map(a=>({...L.buildResource(a,r.extraProps),highlights:a.props[L.DavProperty.Highlights]||""})),totalResults:i?parseInt(i==null?void 0:i.split("/")[1]):null}}}),on=(r,e)=>({async getPathForFileId(t,n={}){return(await r.propfind(W.urlJoin("meta",t,{leadingSlash:!0}),{properties:[L.DavProperty.MetaPathForUser],...n}))[0].props[L.DavProperty.MetaPathForUser]}});/*! For license information please see index.js.LICENSE.txt */var an={2:r=>{function e(o,u,l){o instanceof RegExp&&(o=t(o,l)),u instanceof RegExp&&(u=t(u,l));var i=n(o,u,l);return i&&{start:i[0],end:i[1],pre:l.slice(0,i[0]),body:l.slice(i[0]+o.length,i[1]),post:l.slice(i[1]+u.length)}}function t(o,u){var l=u.match(o);return l?l[0]:null}function n(o,u,l){var i,h,a,s,f,c=l.indexOf(o),d=l.indexOf(u,c+1),m=c;if(c>=0&&d>0){for(i=[],a=l.length;m>=0&&!f;)m==c?(i.push(m),c=l.indexOf(o,m+1)):i.length==1?f=[i.pop(),d]:((h=i.pop())<a&&(a=h,s=d),d=l.indexOf(u,m+1)),m=c<d&&c>=0?c:d;i.length&&(f=[a,s])}return f}r.exports=e,e.range=n},101:function(r,e,t){var n;r=t.nmd(r),function(o){var u=(r&&r.exports,typeof ce.global=="object"&&ce.global);u.global!==u&&u.window;var l=function(f){this.message=f};(l.prototype=new Error).name="InvalidCharacterError";var i=function(f){throw new l(f)},h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=/[\t\n\f\r ]/g,s={encode:function(f){f=String(f),/[^\0-\xFF]/.test(f)&&i("The string to be encoded contains characters outside of the Latin1 range.");for(var c,d,m,g,w=f.length%3,y="",p=-1,v=f.length-w;++p<v;)c=f.charCodeAt(p)<<16,d=f.charCodeAt(++p)<<8,m=f.charCodeAt(++p),y+=h.charAt((g=c+d+m)>>18&63)+h.charAt(g>>12&63)+h.charAt(g>>6&63)+h.charAt(63&g);return w==2?(c=f.charCodeAt(p)<<8,d=f.charCodeAt(++p),y+=h.charAt((g=c+d)>>10)+h.charAt(g>>4&63)+h.charAt(g<<2&63)+"="):w==1&&(g=f.charCodeAt(p),y+=h.charAt(g>>2)+h.charAt(g<<4&63)+"=="),y},decode:function(f){var c=(f=String(f).replace(a,"")).length;c%4==0&&(c=(f=f.replace(/==?$/,"")).length),(c%4==1||/[^+a-zA-Z0-9/]/.test(f))&&i("Invalid character: the string to be decoded is not correctly encoded.");for(var d,m,g=0,w="",y=-1;++y<c;)m=h.indexOf(f.charAt(y)),d=g%4?64*d+m:m,g++%4&&(w+=String.fromCharCode(255&d>>(-2*g&6)));return w},version:"1.0.0"};(n=(function(){return s}).call(e,t,e,r))===void 0||(r.exports=n)}()},172:(r,e)=>{e.d=function(t){if(!t)return 0;for(var n=(t=t.toString()).length,o=t.length;o--;){var u=t.charCodeAt(o);56320<=u&&u<=57343&&o--,127<u&&u<=2047?n++:2047<u&&u<=65535&&(n+=2)}return n}},526:r=>{var e={utf8:{stringToBytes:function(t){return e.bin.stringToBytes(unescape(encodeURIComponent(t)))},bytesToString:function(t){return decodeURIComponent(escape(e.bin.bytesToString(t)))}},bin:{stringToBytes:function(t){for(var n=[],o=0;o<t.length;o++)n.push(255&t.charCodeAt(o));return n},bytesToString:function(t){for(var n=[],o=0;o<t.length;o++)n.push(String.fromCharCode(t[o]));return n.join("")}}};r.exports=e},298:r=>{var e,t;e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t={rotl:function(n,o){return n<<o|n>>>32-o},rotr:function(n,o){return n<<32-o|n>>>o},endian:function(n){if(n.constructor==Number)return 16711935&t.rotl(n,8)|4278255360&t.rotl(n,24);for(var o=0;o<n.length;o++)n[o]=t.endian(n[o]);return n},randomBytes:function(n){for(var o=[];n>0;n--)o.push(Math.floor(256*Math.random()));return o},bytesToWords:function(n){for(var o=[],u=0,l=0;u<n.length;u++,l+=8)o[l>>>5]|=n[u]<<24-l%32;return o},wordsToBytes:function(n){for(var o=[],u=0;u<32*n.length;u+=8)o.push(n[u>>>5]>>>24-u%32&255);return o},bytesToHex:function(n){for(var o=[],u=0;u<n.length;u++)o.push((n[u]>>>4).toString(16)),o.push((15&n[u]).toString(16));return o.join("")},hexToBytes:function(n){for(var o=[],u=0;u<n.length;u+=2)o.push(parseInt(n.substr(u,2),16));return o},bytesToBase64:function(n){for(var o=[],u=0;u<n.length;u+=3)for(var l=n[u]<<16|n[u+1]<<8|n[u+2],i=0;i<4;i++)8*u+6*i<=8*n.length?o.push(e.charAt(l>>>6*(3-i)&63)):o.push("=");return o.join("")},base64ToBytes:function(n){n=n.replace(/[^A-Z0-9+\/]/gi,"");for(var o=[],u=0,l=0;u<n.length;l=++u%4)l!=0&&o.push((e.indexOf(n.charAt(u-1))&Math.pow(2,-2*l+8)-1)<<2*l|e.indexOf(n.charAt(u))>>>6-2*l);return o}},r.exports=t},635:(r,e,t)=>{const n=t(31),o=t(338),u=t(221);r.exports={XMLParser:o,XMLValidator:n,XMLBuilder:u}},118:r=>{r.exports=function(e){return typeof e=="function"?e:Array.isArray(e)?t=>{for(const n of e)if(typeof n=="string"&&t===n||n instanceof RegExp&&n.test(t))return!0}:()=>!1}},705:(r,e)=>{const t=":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",n="["+t+"]["+t+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*",o=new RegExp("^"+n+"$");e.isExist=function(u){return u!==void 0},e.isEmptyObject=function(u){return Object.keys(u).length===0},e.merge=function(u,l,i){if(l){const h=Object.keys(l),a=h.length;for(let s=0;s<a;s++)u[h[s]]=i==="strict"?[l[h[s]]]:l[h[s]]}},e.getValue=function(u){return e.isExist(u)?u:""},e.isName=function(u){return o.exec(u)!=null},e.getAllMatches=function(u,l){const i=[];let h=l.exec(u);for(;h;){const a=[];a.startIndex=l.lastIndex-h[0].length;const s=h.length;for(let f=0;f<s;f++)a.push(h[f]);i.push(a),h=l.exec(u)}return i},e.nameRegexp=n},31:(r,e,t)=>{const n=t(705),o={allowBooleanAttributes:!1,unpairedTags:[]};function u(p){return p===" "||p===" "||p===`
|
|
2
2
|
`||p==="\r"}function l(p,v){const A=v;for(;v<p.length;v++)if(!(p[v]!="?"&&p[v]!=" ")){const N=p.substr(A,v-A);if(v>5&&N==="xml")return m("InvalidXml","XML declaration allowed only at the start of the document.",w(p,v));if(p[v]=="?"&&p[v+1]==">"){v++;break}}return v}function i(p,v){if(p.length>v+5&&p[v+1]==="-"&&p[v+2]==="-"){for(v+=3;v<p.length;v++)if(p[v]==="-"&&p[v+1]==="-"&&p[v+2]===">"){v+=2;break}}else if(p.length>v+8&&p[v+1]==="D"&&p[v+2]==="O"&&p[v+3]==="C"&&p[v+4]==="T"&&p[v+5]==="Y"&&p[v+6]==="P"&&p[v+7]==="E"){let A=1;for(v+=8;v<p.length;v++)if(p[v]==="<")A++;else if(p[v]===">"&&(A--,A===0))break}else if(p.length>v+9&&p[v+1]==="["&&p[v+2]==="C"&&p[v+3]==="D"&&p[v+4]==="A"&&p[v+5]==="T"&&p[v+6]==="A"&&p[v+7]==="["){for(v+=8;v<p.length;v++)if(p[v]==="]"&&p[v+1]==="]"&&p[v+2]===">"){v+=2;break}}return v}e.validate=function(p,v){v=Object.assign({},o,v);const A=[];let N=!1,b=!1;p[0]==="\uFEFF"&&(p=p.substr(1));for(let x=0;x<p.length;x++)if(p[x]==="<"&&p[x+1]==="?"){if(x+=2,x=l(p,x),x.err)return x}else{if(p[x]!=="<"){if(u(p[x]))continue;return m("InvalidChar","char '"+p[x]+"' is not expected.",w(p,x))}{let T=x;if(x++,p[x]==="!"){x=i(p,x);continue}{let O=!1;p[x]==="/"&&(O=!0,x++);let I="";for(;x<p.length&&p[x]!==">"&&p[x]!==" "&&p[x]!==" "&&p[x]!==`
|
|
3
3
|
`&&p[x]!=="\r";x++)I+=p[x];if(I=I.trim(),I[I.length-1]==="/"&&(I=I.substring(0,I.length-1),x--),E=I,!n.isName(E)){let $;return $=I.trim().length===0?"Invalid space after '<'.":"Tag '"+I+"' is an invalid name.",m("InvalidTag",$,w(p,x))}const C=s(p,x);if(C===!1)return m("InvalidAttr","Attributes for '"+I+"' have open quote.",w(p,x));let P=C.value;if(x=C.index,P[P.length-1]==="/"){const $=x-P.length;P=P.substring(0,P.length-1);const F=c(P,v);if(F!==!0)return m(F.err.code,F.err.msg,w(p,$+F.err.line));N=!0}else if(O){if(!C.tagClosed)return m("InvalidTag","Closing tag '"+I+"' doesn't have proper closing.",w(p,x));if(P.trim().length>0)return m("InvalidTag","Closing tag '"+I+"' can't have attributes or invalid starting.",w(p,T));if(A.length===0)return m("InvalidTag","Closing tag '"+I+"' has not been opened.",w(p,T));{const $=A.pop();if(I!==$.tagName){let F=w(p,$.tagStartPos);return m("InvalidTag","Expected closing tag '"+$.tagName+"' (opened in line "+F.line+", col "+F.col+") instead of closing tag '"+I+"'.",w(p,T))}A.length==0&&(b=!0)}}else{const $=c(P,v);if($!==!0)return m($.err.code,$.err.msg,w(p,x-P.length+$.err.line));if(b===!0)return m("InvalidXml","Multiple possible root nodes found.",w(p,x));v.unpairedTags.indexOf(I)!==-1||A.push({tagName:I,tagStartPos:T}),N=!0}for(x++;x<p.length;x++)if(p[x]==="<"){if(p[x+1]==="!"){x++,x=i(p,x);continue}if(p[x+1]!=="?")break;if(x=l(p,++x),x.err)return x}else if(p[x]==="&"){const $=d(p,x);if($==-1)return m("InvalidChar","char '&' is not expected.",w(p,x));x=$}else if(b===!0&&!u(p[x]))return m("InvalidXml","Extra text at the end",w(p,x));p[x]==="<"&&x--}}}var E;return N?A.length==1?m("InvalidTag","Unclosed tag '"+A[0].tagName+"'.",w(p,A[0].tagStartPos)):!(A.length>0)||m("InvalidXml","Invalid '"+JSON.stringify(A.map(x=>x.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1}):m("InvalidXml","Start tag expected.",1)};const h='"',a="'";function s(p,v){let A="",N="",b=!1;for(;v<p.length;v++){if(p[v]===h||p[v]===a)N===""?N=p[v]:N!==p[v]||(N="");else if(p[v]===">"&&N===""){b=!0;break}A+=p[v]}return N===""&&{value:A,index:v,tagClosed:b}}const f=new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g");function c(p,v){const A=n.getAllMatches(p,f),N={};for(let b=0;b<A.length;b++){if(A[b][1].length===0)return m("InvalidAttr","Attribute '"+A[b][2]+"' has no space in starting.",y(A[b]));if(A[b][3]!==void 0&&A[b][4]===void 0)return m("InvalidAttr","Attribute '"+A[b][2]+"' is without value.",y(A[b]));if(A[b][3]===void 0&&!v.allowBooleanAttributes)return m("InvalidAttr","boolean attribute '"+A[b][2]+"' is not allowed.",y(A[b]));const E=A[b][2];if(!g(E))return m("InvalidAttr","Attribute '"+E+"' is an invalid name.",y(A[b]));if(N.hasOwnProperty(E))return m("InvalidAttr","Attribute '"+E+"' is repeated.",y(A[b]));N[E]=1}return!0}function d(p,v){if(p[++v]===";")return-1;if(p[v]==="#")return function(N,b){let E=/\d/;for(N[b]==="x"&&(b++,E=/[\da-fA-F]/);b<N.length;b++){if(N[b]===";")return b;if(!N[b].match(E))break}return-1}(p,++v);let A=0;for(;v<p.length;v++,A++)if(!(p[v].match(/\w/)&&A<20)){if(p[v]===";")break;return-1}return v}function m(p,v,A){return{err:{code:p,msg:v,line:A.line||A,col:A.col}}}function g(p){return n.isName(p)}function w(p,v){const A=p.substring(0,v).split(/\r?\n/);return{line:A.length,col:A[A.length-1].length+1}}function y(p){return p.startIndex+p[1].length}},221:(r,e,t)=>{const n=t(87),o=t(118),u={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(s,f){return f},attributeValueProcessor:function(s,f){return f},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 l(s){this.options=Object.assign({},u,s),this.options.ignoreAttributes===!0||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.ignoreAttributesFn=o(this.options.ignoreAttributes),this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=a),this.processTextOrObjNode=i,this.options.format?(this.indentate=h,this.tagEndChar=`>
|
|
4
4
|
`,this.newLine=`
|
|
@@ -303,20 +303,22 @@ function Q(e, t, n) {
|
|
|
303
303
|
const r = n.metaTokens, s = n.visitor || u, o = n.dots, i = n.indexes, f = (n.Blob || typeof Blob < "u" && Blob) && a.isSpecCompliantForm(t);
|
|
304
304
|
if (!a.isFunction(s))
|
|
305
305
|
throw new TypeError("visitor must be a function");
|
|
306
|
-
function l(
|
|
307
|
-
if (
|
|
308
|
-
if (a.isDate(
|
|
309
|
-
return
|
|
310
|
-
if (
|
|
306
|
+
function l(d) {
|
|
307
|
+
if (d === null) return "";
|
|
308
|
+
if (a.isDate(d))
|
|
309
|
+
return d.toISOString();
|
|
310
|
+
if (a.isBoolean(d))
|
|
311
|
+
return d.toString();
|
|
312
|
+
if (!f && a.isBlob(d))
|
|
311
313
|
throw new m("Blob is not supported. Use a Buffer instead.");
|
|
312
|
-
return a.isArrayBuffer(
|
|
314
|
+
return a.isArrayBuffer(d) || a.isTypedArray(d) ? f && typeof Blob == "function" ? new Blob([d]) : Ye.from(d) : d;
|
|
313
315
|
}
|
|
314
|
-
function u(
|
|
315
|
-
let w =
|
|
316
|
-
if (
|
|
316
|
+
function u(d, y, h) {
|
|
317
|
+
let w = d;
|
|
318
|
+
if (d && !h && typeof d == "object") {
|
|
317
319
|
if (a.endsWith(y, "{}"))
|
|
318
|
-
y = r ? y : y.slice(0, -2),
|
|
319
|
-
else if (a.isArray(
|
|
320
|
+
y = r ? y : y.slice(0, -2), d = JSON.stringify(d);
|
|
321
|
+
else if (a.isArray(d) && It(d) || (a.isFileList(d) || a.endsWith(y, "[]")) && (w = a.toArray(d)))
|
|
320
322
|
return y = je(y), w.forEach(function(g, P) {
|
|
321
323
|
!(a.isUndefined(g) || g === null) && t.append(
|
|
322
324
|
// eslint-disable-next-line no-nested-ternary
|
|
@@ -325,18 +327,18 @@ function Q(e, t, n) {
|
|
|
325
327
|
);
|
|
326
328
|
}), !1;
|
|
327
329
|
}
|
|
328
|
-
return se(
|
|
330
|
+
return se(d) ? !0 : (t.append(me(h, y, o), l(d)), !1);
|
|
329
331
|
}
|
|
330
|
-
const
|
|
332
|
+
const p = [], b = Object.assign(Mt, {
|
|
331
333
|
defaultVisitor: u,
|
|
332
334
|
convertValue: l,
|
|
333
335
|
isVisitable: se
|
|
334
336
|
});
|
|
335
|
-
function R(
|
|
336
|
-
if (!a.isUndefined(
|
|
337
|
-
if (
|
|
337
|
+
function R(d, y) {
|
|
338
|
+
if (!a.isUndefined(d)) {
|
|
339
|
+
if (p.indexOf(d) !== -1)
|
|
338
340
|
throw Error("Circular reference detected in " + y.join("."));
|
|
339
|
-
|
|
341
|
+
p.push(d), a.forEach(d, function(w, S) {
|
|
340
342
|
(!(a.isUndefined(w) || w === null) && s.call(
|
|
341
343
|
t,
|
|
342
344
|
w,
|
|
@@ -344,7 +346,7 @@ function Q(e, t, n) {
|
|
|
344
346
|
y,
|
|
345
347
|
b
|
|
346
348
|
)) === !0 && R(w, y ? y.concat(S) : [S]);
|
|
347
|
-
}),
|
|
349
|
+
}), p.pop();
|
|
348
350
|
}
|
|
349
351
|
}
|
|
350
352
|
if (!a.isObject(e))
|
|
@@ -663,8 +665,8 @@ let x = class {
|
|
|
663
665
|
const u = j(f);
|
|
664
666
|
if (!u)
|
|
665
667
|
throw new Error("header name must be a non-empty string");
|
|
666
|
-
const
|
|
667
|
-
(!
|
|
668
|
+
const p = a.findKey(s, u);
|
|
669
|
+
(!p || s[p] === void 0 || l === !0 || l === void 0 && s[p] !== !1) && (s[p || f] = z(c));
|
|
668
670
|
}
|
|
669
671
|
const i = (c, f) => a.forEach(c, (l, u) => o(l, u, f));
|
|
670
672
|
if (a.isPlainObject(t) || t instanceof this.constructor)
|
|
@@ -827,9 +829,9 @@ function ln(e, t) {
|
|
|
827
829
|
return t = t !== void 0 ? t : 1e3, function(f) {
|
|
828
830
|
const l = Date.now(), u = r[o];
|
|
829
831
|
i || (i = l), n[s] = f, r[s] = l;
|
|
830
|
-
let
|
|
831
|
-
for (;
|
|
832
|
-
b += n[
|
|
832
|
+
let p = o, b = 0;
|
|
833
|
+
for (; p !== s; )
|
|
834
|
+
b += n[p++], p = p % e;
|
|
833
835
|
if (s = (s + 1) % e, s === o && (o = (o + 1) % e), l - i < t)
|
|
834
836
|
return;
|
|
835
837
|
const R = u && l - u;
|
|
@@ -842,10 +844,10 @@ function un(e, t) {
|
|
|
842
844
|
n = u, s = null, o && (clearTimeout(o), o = null), e.apply(null, l);
|
|
843
845
|
};
|
|
844
846
|
return [(...l) => {
|
|
845
|
-
const u = Date.now(),
|
|
846
|
-
|
|
847
|
+
const u = Date.now(), p = u - n;
|
|
848
|
+
p >= r ? i(l, u) : (s = l, o || (o = setTimeout(() => {
|
|
847
849
|
o = null, i(s);
|
|
848
|
-
}, r -
|
|
850
|
+
}, r - p)));
|
|
849
851
|
}, () => s && i(s)];
|
|
850
852
|
}
|
|
851
853
|
const V = (e, t, n = 3) => {
|
|
@@ -854,7 +856,7 @@ const V = (e, t, n = 3) => {
|
|
|
854
856
|
return un((o) => {
|
|
855
857
|
const i = o.loaded, c = o.lengthComputable ? o.total : void 0, f = i - r, l = s(f), u = i <= c;
|
|
856
858
|
r = i;
|
|
857
|
-
const
|
|
859
|
+
const p = {
|
|
858
860
|
loaded: i,
|
|
859
861
|
total: c,
|
|
860
862
|
progress: c ? i / c : void 0,
|
|
@@ -865,7 +867,7 @@ const V = (e, t, n = 3) => {
|
|
|
865
867
|
lengthComputable: c != null,
|
|
866
868
|
[t ? "download" : "upload"]: !0
|
|
867
869
|
};
|
|
868
|
-
e(
|
|
870
|
+
e(p);
|
|
869
871
|
}, n);
|
|
870
872
|
}, Ee = (e, t) => {
|
|
871
873
|
const n = e != null;
|
|
@@ -918,14 +920,14 @@ const Se = (e) => e instanceof x ? { ...e } : e;
|
|
|
918
920
|
function B(e, t) {
|
|
919
921
|
t = t || {};
|
|
920
922
|
const n = {};
|
|
921
|
-
function r(l, u,
|
|
923
|
+
function r(l, u, p, b) {
|
|
922
924
|
return a.isPlainObject(l) && a.isPlainObject(u) ? a.merge.call({ caseless: b }, l, u) : a.isPlainObject(u) ? a.merge({}, u) : a.isArray(u) ? u.slice() : u;
|
|
923
925
|
}
|
|
924
|
-
function s(l, u,
|
|
926
|
+
function s(l, u, p, b) {
|
|
925
927
|
if (a.isUndefined(u)) {
|
|
926
928
|
if (!a.isUndefined(l))
|
|
927
|
-
return r(void 0, l,
|
|
928
|
-
} else return r(l, u,
|
|
929
|
+
return r(void 0, l, p, b);
|
|
930
|
+
} else return r(l, u, p, b);
|
|
929
931
|
}
|
|
930
932
|
function o(l, u) {
|
|
931
933
|
if (!a.isUndefined(u))
|
|
@@ -937,10 +939,10 @@ function B(e, t) {
|
|
|
937
939
|
return r(void 0, l);
|
|
938
940
|
} else return r(void 0, u);
|
|
939
941
|
}
|
|
940
|
-
function c(l, u,
|
|
941
|
-
if (
|
|
942
|
+
function c(l, u, p) {
|
|
943
|
+
if (p in t)
|
|
942
944
|
return r(l, u);
|
|
943
|
-
if (
|
|
945
|
+
if (p in e)
|
|
944
946
|
return r(void 0, l);
|
|
945
947
|
}
|
|
946
948
|
const f = {
|
|
@@ -972,11 +974,11 @@ function B(e, t) {
|
|
|
972
974
|
socketPath: i,
|
|
973
975
|
responseEncoding: i,
|
|
974
976
|
validateStatus: c,
|
|
975
|
-
headers: (l, u,
|
|
977
|
+
headers: (l, u, p) => s(Se(l), Se(u), p, !0)
|
|
976
978
|
};
|
|
977
979
|
return a.forEach(Object.keys(Object.assign({}, e, t)), function(u) {
|
|
978
|
-
const
|
|
979
|
-
a.isUndefined(b) &&
|
|
980
|
+
const p = f[u] || s, b = p(e[u], t[u], u);
|
|
981
|
+
a.isUndefined(b) && p !== c || (n[u] = b);
|
|
980
982
|
}), n;
|
|
981
983
|
}
|
|
982
984
|
const Ve = (e) => {
|
|
@@ -991,7 +993,7 @@ const Ve = (e) => {
|
|
|
991
993
|
if (O.hasStandardBrowserEnv || O.hasStandardBrowserWebWorkerEnv)
|
|
992
994
|
i.setContentType(void 0);
|
|
993
995
|
else if ((f = i.getContentType()) !== !1) {
|
|
994
|
-
const [l, ...u] = f ? f.split(";").map((
|
|
996
|
+
const [l, ...u] = f ? f.split(";").map((p) => p.trim()).filter(Boolean) : [];
|
|
995
997
|
i.setContentType([l || "multipart/form-data", ...u].join("; "));
|
|
996
998
|
}
|
|
997
999
|
}
|
|
@@ -1005,9 +1007,9 @@ const Ve = (e) => {
|
|
|
1005
1007
|
const s = Ve(e);
|
|
1006
1008
|
let o = s.data;
|
|
1007
1009
|
const i = x.from(s.headers).normalize();
|
|
1008
|
-
let { responseType: c, onUploadProgress: f, onDownloadProgress: l } = s, u,
|
|
1010
|
+
let { responseType: c, onUploadProgress: f, onDownloadProgress: l } = s, u, p, b, R, d;
|
|
1009
1011
|
function y() {
|
|
1010
|
-
R && R(),
|
|
1012
|
+
R && R(), d && d(), s.cancelToken && s.cancelToken.unsubscribe(u), s.signal && s.signal.removeEventListener("abort", u);
|
|
1011
1013
|
}
|
|
1012
1014
|
let h = new XMLHttpRequest();
|
|
1013
1015
|
h.open(s.method.toUpperCase(), s.url, !0), h.timeout = s.timeout;
|
|
@@ -1047,7 +1049,7 @@ const Ve = (e) => {
|
|
|
1047
1049
|
)), h = null;
|
|
1048
1050
|
}, o === void 0 && i.setContentType(null), "setRequestHeader" in h && a.forEach(i.toJSON(), function(P, T) {
|
|
1049
1051
|
h.setRequestHeader(T, P);
|
|
1050
|
-
}), a.isUndefined(s.withCredentials) || (h.withCredentials = !!s.withCredentials), c && c !== "json" && (h.responseType = s.responseType), l && ([b,
|
|
1052
|
+
}), a.isUndefined(s.withCredentials) || (h.withCredentials = !!s.withCredentials), c && c !== "json" && (h.responseType = s.responseType), l && ([b, d] = V(l, !0), h.addEventListener("progress", b)), f && h.upload && ([p, R] = V(f), h.upload.addEventListener("progress", p), h.upload.addEventListener("loadend", R)), (s.cancelToken || s.signal) && (u = (g) => {
|
|
1051
1053
|
h && (r(!g || g.type ? new k(null, e, h) : g), h.abort(), h = null);
|
|
1052
1054
|
}, s.cancelToken && s.cancelToken.subscribe(u), s.signal && (s.signal.aborted ? u() : s.signal.addEventListener("abort", u)));
|
|
1053
1055
|
const S = cn(s.url);
|
|
@@ -1121,9 +1123,9 @@ const Ve = (e) => {
|
|
|
1121
1123
|
c(), f.close();
|
|
1122
1124
|
return;
|
|
1123
1125
|
}
|
|
1124
|
-
let
|
|
1126
|
+
let p = u.byteLength;
|
|
1125
1127
|
if (n) {
|
|
1126
|
-
let b = o +=
|
|
1128
|
+
let b = o += p;
|
|
1127
1129
|
n(b);
|
|
1128
1130
|
}
|
|
1129
1131
|
f.enqueue(new Uint8Array(u));
|
|
@@ -1192,11 +1194,11 @@ const On = async (e) => {
|
|
|
1192
1194
|
onUploadProgress: f,
|
|
1193
1195
|
responseType: l,
|
|
1194
1196
|
headers: u,
|
|
1195
|
-
withCredentials:
|
|
1197
|
+
withCredentials: p = "same-origin",
|
|
1196
1198
|
fetchOptions: b
|
|
1197
1199
|
} = Ve(e);
|
|
1198
1200
|
l = l ? (l + "").toLowerCase() : "text";
|
|
1199
|
-
let R = bn([s, o && o.toAbortSignal()], i),
|
|
1201
|
+
let R = bn([s, o && o.toAbortSignal()], i), d;
|
|
1200
1202
|
const y = R && R.unsubscribe && (() => {
|
|
1201
1203
|
R.unsubscribe();
|
|
1202
1204
|
});
|
|
@@ -1216,18 +1218,18 @@ const On = async (e) => {
|
|
|
1216
1218
|
r = ge(T.body, Oe, _, M);
|
|
1217
1219
|
}
|
|
1218
1220
|
}
|
|
1219
|
-
a.isString(
|
|
1221
|
+
a.isString(p) || (p = p ? "include" : "omit");
|
|
1220
1222
|
const w = "credentials" in Request.prototype;
|
|
1221
|
-
|
|
1223
|
+
d = new Request(t, {
|
|
1222
1224
|
...b,
|
|
1223
1225
|
signal: R,
|
|
1224
1226
|
method: n.toUpperCase(),
|
|
1225
1227
|
headers: u.normalize().toJSON(),
|
|
1226
1228
|
body: r,
|
|
1227
1229
|
duplex: "half",
|
|
1228
|
-
credentials: w ?
|
|
1230
|
+
credentials: w ? p : void 0
|
|
1229
1231
|
});
|
|
1230
|
-
let S = await fetch(
|
|
1232
|
+
let S = await fetch(d, b);
|
|
1231
1233
|
const g = ie && (l === "stream" || l === "response");
|
|
1232
1234
|
if (ie && (c || g && y)) {
|
|
1233
1235
|
const T = {};
|
|
@@ -1254,16 +1256,16 @@ const On = async (e) => {
|
|
|
1254
1256
|
status: S.status,
|
|
1255
1257
|
statusText: S.statusText,
|
|
1256
1258
|
config: e,
|
|
1257
|
-
request:
|
|
1259
|
+
request: d
|
|
1258
1260
|
});
|
|
1259
1261
|
});
|
|
1260
1262
|
} catch (w) {
|
|
1261
1263
|
throw y && y(), w && w.name === "TypeError" && /Load failed|fetch/i.test(w.message) ? Object.assign(
|
|
1262
|
-
new m("Network Error", m.ERR_NETWORK, e,
|
|
1264
|
+
new m("Network Error", m.ERR_NETWORK, e, d),
|
|
1263
1265
|
{
|
|
1264
1266
|
cause: w.cause || w
|
|
1265
1267
|
}
|
|
1266
|
-
) : m.from(w, w && w.code, e,
|
|
1268
|
+
) : m.from(w, w && w.code, e, d);
|
|
1267
1269
|
}
|
|
1268
1270
|
}), ae = {
|
|
1269
1271
|
http: Ht,
|
|
@@ -1332,7 +1334,7 @@ function Ae(e) {
|
|
|
1332
1334
|
), r.response.headers = x.from(r.response.headers))), Promise.reject(r);
|
|
1333
1335
|
});
|
|
1334
1336
|
}
|
|
1335
|
-
const Xe = "1.
|
|
1337
|
+
const Xe = "1.10.0", Y = {};
|
|
1336
1338
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
|
|
1337
1339
|
Y[e] = function(r) {
|
|
1338
1340
|
return typeof r === e || "a" + (t < 1 ? "n " : " ") + e;
|
|
@@ -1435,8 +1437,8 @@ let L = class {
|
|
|
1435
1437
|
);
|
|
1436
1438
|
o && a.forEach(
|
|
1437
1439
|
["delete", "get", "head", "post", "put", "patch", "common"],
|
|
1438
|
-
(
|
|
1439
|
-
delete o[
|
|
1440
|
+
(d) => {
|
|
1441
|
+
delete o[d];
|
|
1440
1442
|
}
|
|
1441
1443
|
), n.headers = x.concat(i, o);
|
|
1442
1444
|
const c = [];
|
|
@@ -1448,19 +1450,19 @@ let L = class {
|
|
|
1448
1450
|
this.interceptors.response.forEach(function(y) {
|
|
1449
1451
|
l.push(y.fulfilled, y.rejected);
|
|
1450
1452
|
});
|
|
1451
|
-
let u,
|
|
1453
|
+
let u, p = 0, b;
|
|
1452
1454
|
if (!f) {
|
|
1453
|
-
const
|
|
1454
|
-
for (
|
|
1455
|
-
u = u.then(p
|
|
1455
|
+
const d = [Ae.bind(this), void 0];
|
|
1456
|
+
for (d.unshift.apply(d, c), d.push.apply(d, l), b = d.length, u = Promise.resolve(n); p < b; )
|
|
1457
|
+
u = u.then(d[p++], d[p++]);
|
|
1456
1458
|
return u;
|
|
1457
1459
|
}
|
|
1458
1460
|
b = c.length;
|
|
1459
1461
|
let R = n;
|
|
1460
|
-
for (
|
|
1461
|
-
const
|
|
1462
|
+
for (p = 0; p < b; ) {
|
|
1463
|
+
const d = c[p++], y = c[p++];
|
|
1462
1464
|
try {
|
|
1463
|
-
R =
|
|
1465
|
+
R = d(R);
|
|
1464
1466
|
} catch (h) {
|
|
1465
1467
|
y.call(this, h);
|
|
1466
1468
|
break;
|
|
@@ -1468,11 +1470,11 @@ let L = class {
|
|
|
1468
1470
|
}
|
|
1469
1471
|
try {
|
|
1470
1472
|
u = Ae.call(this, R);
|
|
1471
|
-
} catch (
|
|
1472
|
-
return Promise.reject(
|
|
1473
|
+
} catch (d) {
|
|
1474
|
+
return Promise.reject(d);
|
|
1473
1475
|
}
|
|
1474
|
-
for (
|
|
1475
|
-
u = u.then(l[
|
|
1476
|
+
for (p = 0, b = l.length; p < b; )
|
|
1477
|
+
u = u.then(l[p++], l[p++]);
|
|
1476
1478
|
return u;
|
|
1477
1479
|
}
|
|
1478
1480
|
getUri(t) {
|