@opencloud-eu/web-client 0.1.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/LICENSE +661 -0
- package/README.md +95 -0
- package/dist/functions-CsnDdpYv.js +1232 -0
- package/dist/functions-ikwhAVhP.cjs +1 -0
- package/dist/index-C1H-OgNf.cjs +6 -0
- package/dist/index-C6VnMvgz.cjs +6 -0
- package/dist/index-DbVGtwLH.cjs +1 -0
- package/dist/index-DqVarwg_.js +1705 -0
- package/dist/index-Pl8khka8.js +1141 -0
- package/dist/index-VvbQMSOr.js +4651 -0
- package/dist/index-eFi29SPG.cjs +16 -0
- package/dist/index-oQ7995oB.js +672 -0
- package/dist/src/errors.d.ts +10 -0
- package/dist/src/graph/activities/activities.d.ts +3 -0
- package/dist/src/graph/activities/index.d.ts +2 -0
- package/dist/src/graph/activities/types.d.ts +5 -0
- package/dist/src/graph/applications/applications.d.ts +3 -0
- package/dist/src/graph/applications/index.d.ts +2 -0
- package/dist/src/graph/applications/types.d.ts +6 -0
- package/dist/src/graph/driveItems/driveItems.d.ts +3 -0
- package/dist/src/graph/driveItems/index.d.ts +2 -0
- package/dist/src/graph/driveItems/types.d.ts +10 -0
- package/dist/src/graph/drives/drives.d.ts +3 -0
- package/dist/src/graph/drives/index.d.ts +2 -0
- package/dist/src/graph/drives/types.d.ts +18 -0
- package/dist/src/graph/generated/api.d.ts +6506 -0
- package/dist/src/graph/generated/base.d.ts +55 -0
- package/dist/src/graph/generated/common.d.ts +54 -0
- package/dist/src/graph/generated/configuration.d.ts +91 -0
- package/dist/src/graph/generated/index.d.ts +13 -0
- package/dist/src/graph/groups/groups.d.ts +3 -0
- package/dist/src/graph/groups/index.d.ts +2 -0
- package/dist/src/graph/groups/types.d.ts +19 -0
- package/dist/src/graph/index.d.ts +20 -0
- package/dist/src/graph/permissions/index.d.ts +2 -0
- package/dist/src/graph/permissions/permissions.d.ts +3 -0
- package/dist/src/graph/permissions/types.d.ts +23 -0
- package/dist/src/graph/tags/index.d.ts +2 -0
- package/dist/src/graph/tags/tags.d.ts +3 -0
- package/dist/src/graph/tags/types.d.ts +7 -0
- package/dist/src/graph/types.d.ts +11 -0
- package/dist/src/graph/users/index.d.ts +2 -0
- package/dist/src/graph/users/types.d.ts +25 -0
- package/dist/src/graph/users/users.d.ts +3 -0
- package/dist/src/helpers/call.d.ts +1 -0
- package/dist/src/helpers/httpError.d.ts +9 -0
- package/dist/src/helpers/index.d.ts +7 -0
- package/dist/src/helpers/item.d.ts +3 -0
- package/dist/src/helpers/publicLink/functions.d.ts +2 -0
- package/dist/src/helpers/publicLink/index.d.ts +1 -0
- package/dist/src/helpers/resource/functions.d.ts +12 -0
- package/dist/src/helpers/resource/index.d.ts +2 -0
- package/dist/src/helpers/resource/types.d.ts +103 -0
- package/dist/src/helpers/share/constants.d.ts +9 -0
- package/dist/src/helpers/share/functions.d.ts +37 -0
- package/dist/src/helpers/share/index.d.ts +4 -0
- package/dist/src/helpers/share/type.d.ts +32 -0
- package/dist/src/helpers/share/types.d.ts +72 -0
- package/dist/src/helpers/space/functions.d.ts +27 -0
- package/dist/src/helpers/space/index.d.ts +2 -0
- package/dist/src/helpers/space/types.d.ts +84 -0
- package/dist/src/index.d.ts +19 -0
- package/dist/src/ocs/capabilities.d.ts +181 -0
- package/dist/src/ocs/index.d.ts +8 -0
- package/dist/src/ocs/urlSign.d.ts +18 -0
- package/dist/src/sse/index.d.ts +50 -0
- package/dist/src/utils/encodePath.d.ts +1 -0
- package/dist/src/utils/index.d.ts +2 -0
- package/dist/src/utils/urlJoin.d.ts +19 -0
- package/dist/src/webdav/clearTrashBin.d.ts +10 -0
- package/dist/src/webdav/client/builders.d.ts +8 -0
- package/dist/src/webdav/client/dav.d.ts +53 -0
- package/dist/src/webdav/client/index.d.ts +3 -0
- package/dist/src/webdav/client/parsers.d.ts +8 -0
- package/dist/src/webdav/constants/dav.d.ts +106 -0
- package/dist/src/webdav/constants/index.d.ts +1 -0
- package/dist/src/webdav/copyFiles.d.ts +15 -0
- package/dist/src/webdav/createFolder.d.ts +14 -0
- package/dist/src/webdav/deleteFile.d.ts +8 -0
- package/dist/src/webdav/getFileContents.d.ts +17 -0
- package/dist/src/webdav/getFileInfo.d.ts +9 -0
- package/dist/src/webdav/getFileUrl.d.ts +15 -0
- package/dist/src/webdav/getPathForFileId.d.ts +5 -0
- package/dist/src/webdav/getPublicFileUrl.d.ts +6 -0
- package/dist/src/webdav/index.d.ts +7 -0
- package/dist/src/webdav/listFavoriteFiles.d.ts +12 -0
- package/dist/src/webdav/listFileVersions.d.ts +5 -0
- package/dist/src/webdav/listFiles.d.ts +21 -0
- package/dist/src/webdav/moveFiles.d.ts +15 -0
- package/dist/src/webdav/putFileContents.d.ts +18 -0
- package/dist/src/webdav/restoreFile.d.ts +12 -0
- package/dist/src/webdav/restoreFileVersion.d.ts +10 -0
- package/dist/src/webdav/search.d.ts +15 -0
- package/dist/src/webdav/setFavorite.d.ts +8 -0
- package/dist/src/webdav/types.d.ts +47 -0
- package/dist/src/webdav/utils.d.ts +13 -0
- package/dist/toString-Cn0xCZ28.js +261 -0
- package/dist/toString-hHr716Th.cjs +1 -0
- package/dist/vite.config.d.ts +2 -0
- package/dist/web-client/graph/generated.cjs +1 -0
- package/dist/web-client/graph/generated.js +5499 -0
- package/dist/web-client/graph.cjs +1 -0
- package/dist/web-client/graph.js +5 -0
- package/dist/web-client/ocs.cjs +25 -0
- package/dist/web-client/ocs.js +6014 -0
- package/dist/web-client/sse.cjs +2 -0
- package/dist/web-client/sse.js +218 -0
- package/dist/web-client/webdav.cjs +1 -0
- package/dist/web-client/webdav.js +10 -0
- package/dist/web-client.cjs +1 -0
- package/dist/web-client.js +99 -0
- package/package.json +67 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var Te=Object.defineProperty;var Ue=(e,t,i)=>t in e?Te(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i;var b=(e,t,i)=>Ue(e,typeof t!="symbol"?t+"":t,i);const I=require("./toString-hHr716Th.cjs"),Ee=require("./index-C6VnMvgz.cjs");function ne(e,t=""){return`/public-files/${e}/${t}`.split("/").filter(Boolean).join("/")}function re(e,t=""){return`/ocm/${e}/${t}`.split("/").filter(Boolean).join("/")}var N,q;function Fe(){if(q)return N;q=1;function e(a){if(typeof a!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(a))}function t(a,n){for(var r="",l=0,c=-1,p=0,o,f=0;f<=a.length;++f){if(f<a.length)o=a.charCodeAt(f);else{if(o===47)break;o=47}if(o===47){if(!(c===f-1||p===1))if(c!==f-1&&p===2){if(r.length<2||l!==2||r.charCodeAt(r.length-1)!==46||r.charCodeAt(r.length-2)!==46){if(r.length>2){var h=r.lastIndexOf("/");if(h!==r.length-1){h===-1?(r="",l=0):(r=r.slice(0,h),l=r.length-1-r.lastIndexOf("/")),c=f,p=0;continue}}else if(r.length===2||r.length===1){r="",l=0,c=f,p=0;continue}}n&&(r.length>0?r+="/..":r="..",l=2)}else r.length>0?r+="/"+a.slice(c+1,f):r=a.slice(c+1,f),l=f-c-1;c=f,p=0}else o===46&&p!==-1?++p:p=-1}return r}function i(a,n){var r=n.dir||n.root,l=n.base||(n.name||"")+(n.ext||"");return r?r===n.root?r+l:r+a+l:l}var u={resolve:function(){for(var n="",r=!1,l,c=arguments.length-1;c>=-1&&!r;c--){var p;c>=0?p=arguments[c]:(l===void 0&&(l=Ee.process$1.cwd()),p=l),e(p),p.length!==0&&(n=p+"/"+n,r=p.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?".":u.normalize(n)},relative:function(n,r){if(e(n),e(r),n===r||(n=u.resolve(n),r=u.resolve(r),n===r))return"";for(var l=1;l<n.length&&n.charCodeAt(l)===47;++l);for(var c=n.length,p=c-l,o=1;o<r.length&&r.charCodeAt(o)===47;++o);for(var f=r.length,h=f-o,S=p<h?p:h,v=-1,g=0;g<=S;++g){if(g===S){if(h>S){if(r.charCodeAt(o+g)===47)return r.slice(o+g+1);if(g===0)return r.slice(o+g)}else p>S&&(n.charCodeAt(l+g)===47?v=g:g===0&&(v=0));break}var P=n.charCodeAt(l+g),d=r.charCodeAt(o+g);if(P!==d)break;P===47&&(v=g)}var m="";for(g=l+v+1;g<=c;++g)(g===c||n.charCodeAt(g)===47)&&(m.length===0?m+="..":m+="/..");return m.length>0?m+r.slice(o+v):(o+=v,r.charCodeAt(o)===47&&++o,r.slice(o))},_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,p=!0,o=n.length-1;o>=1;--o)if(r=n.charCodeAt(o),r===47){if(!p){c=o;break}}else p=!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,p=!0,o;if(r!==void 0&&r.length>0&&r.length<=n.length){if(r.length===n.length&&r===n)return"";var f=r.length-1,h=-1;for(o=n.length-1;o>=0;--o){var S=n.charCodeAt(o);if(S===47){if(!p){l=o+1;break}}else h===-1&&(p=!1,h=o+1),f>=0&&(S===r.charCodeAt(f)?--f===-1&&(c=o):(f=-1,c=h))}return l===c?c=h:c===-1&&(c=n.length),n.slice(l,c)}else{for(o=n.length-1;o>=0;--o)if(n.charCodeAt(o)===47){if(!p){l=o+1;break}}else c===-1&&(p=!1,c=o+1);return c===-1?"":n.slice(l,c)}},extname:function(n){e(n);for(var r=-1,l=0,c=-1,p=!0,o=0,f=n.length-1;f>=0;--f){var h=n.charCodeAt(f);if(h===47){if(!p){l=f+1;break}continue}c===-1&&(p=!1,c=f+1),h===46?r===-1?r=f:o!==1&&(o=1):r!==-1&&(o=-1)}return r===-1||c===-1||o===0||o===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,p;c?(r.root="/",p=1):p=0;for(var o=-1,f=0,h=-1,S=!0,v=n.length-1,g=0;v>=p;--v){if(l=n.charCodeAt(v),l===47){if(!S){f=v+1;break}continue}h===-1&&(S=!1,h=v+1),l===46?o===-1?o=v:g!==1&&(g=1):o!==-1&&(g=-1)}return o===-1||h===-1||g===0||g===1&&o===h-1&&o===f+1?h!==-1&&(f===0&&c?r.base=r.name=n.slice(1,h):r.base=r.name=n.slice(f,h)):(f===0&&c?(r.name=n.slice(1,o),r.base=n.slice(1,h)):(r.name=n.slice(f,o),r.base=n.slice(f,h)),r.ext=n.slice(o,h)),f>0?r.dir=n.slice(0,f-1):c&&(r.dir="/"),r},sep:"/",delimiter:":",win32:null,posix:null};return u.posix=u,N=u,N}var E=Fe();const K=I.getDefaultExportFromCjs(E);class D{}b(D,"Shared","S"),b(D,"Shareable","R"),b(D,"Mounted","M"),b(D,"Deletable","D"),b(D,"Renameable","N"),b(D,"Moveable","V"),b(D,"Updateable","NV"),b(D,"FileUpdateable","W"),b(D,"FolderCreateable","CK"),b(D,"Deny","Z"),b(D,"SecureView","X");var ie=(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))(ie||{});const F=e=>({value:e,type:null}),Me=e=>F(e),x=e=>F(e),j=e=>F(e),$e=e=>F(e),Ne={Permissions:x("permissions"),IsFavorite:j("favorite"),FileId:x("fileid"),FileParent:x("file-parent"),Name:x("name"),OwnerId:x("owner-id"),OwnerDisplayName:x("owner-display-name"),PrivateLink:x("privatelink"),ContentLength:j("getcontentlength"),ContentSize:j("size"),LastModifiedDate:x("getlastmodified"),Tags:Me("tags"),Audio:{value:"audio",type:null},Location:{value:"location",type:null},Image:{value:"image",type:null},Photo:{value:"photo",type:null},ETag:x("getetag"),MimeType:x("getcontenttype"),ResourceType:$e("resourcetype"),LockDiscovery:{value:"lockdiscovery",type:null},LockOwner:x("owner"),LockTime:x("locktime"),ActiveLock:{value:"activelock",type:null},DownloadURL:x("downloadURL"),Highlights:x("highlights"),MetaPathForUser:x("meta-path-for-user"),RemoteItemId:x("remote-item-id"),ShareId:x("shareid"),ShareRoot:x("shareroot"),ShareTypes:{value:"share-types",type:null},SharePermissions:x("share-permissions"),TrashbinOriginalFilename:x("trashbin-original-filename"),TrashbinOriginalLocation:x("trashbin-original-location"),TrashbinDeletedDate:x("trashbin-delete-datetime"),PublicLinkItemType:x("public-link-item-type"),PublicLinkPermission:x("public-link-permission"),PublicLinkExpiration:x("public-link-expiration"),PublicLinkShareDate:x("public-link-share-datetime"),PublicLinkShareOwner:x("public-link-share-owner")},s=Object.fromEntries(Object.entries(Ne).map(([e,t])=>[e,t.value])),k=class k{};b(k,"Default",[s.Permissions,s.IsFavorite,s.FileId,s.FileParent,s.Name,s.LockDiscovery,s.ActiveLock,s.OwnerId,s.OwnerDisplayName,s.RemoteItemId,s.ShareRoot,s.ShareTypes,s.PrivateLink,s.ContentLength,s.ContentSize,s.LastModifiedDate,s.ETag,s.MimeType,s.ResourceType,s.DownloadURL,s.Tags,s.Audio,s.Location,s.Image,s.Photo]),b(k,"PublicLink",k.Default.concat([s.PublicLinkItemType,s.PublicLinkPermission,s.PublicLinkExpiration,s.PublicLinkShareDate,s.PublicLinkShareOwner])),b(k,"Trashbin",[s.ContentLength,s.ResourceType,s.TrashbinOriginalLocation,s.TrashbinOriginalFilename,s.TrashbinDeletedDate,s.Permissions,s.FileParent]),b(k,"DavNamespace",[s.ContentLength,s.LastModifiedDate,s.ETag,s.MimeType,s.ResourceType,s.LockDiscovery,s.ActiveLock]);let z=k;function ae(e){return e}function je(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 ze=800,We=16,Ve=Date.now;function Je(e){var t=0,i=0;return function(){var u=Ve(),a=We-(u-i);if(i=u,a>0){if(++t>=ze)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function He(e){return function(){return e}}var Y=function(){try{var e=I.getNative(Object,"defineProperty");return e({},"",{}),e}catch{}}(),_e=Y?function(e,t){return Y(e,"toString",{configurable:!0,enumerable:!1,value:He(t),writable:!0})}:ae,Be=Je(_e);function Ze(e,t,i,u){for(var a=e.length,n=i+-1;++n<a;)if(t(e[n],n,e))return n;return-1}function qe(e){return e!==e}function Ke(e,t,i){for(var u=i-1,a=e.length;++u<a;)if(e[u]===t)return u;return-1}function Ye(e,t,i){return t===t?Ke(e,t,i):Ze(e,qe,i)}function se(e,t){var i=e==null?0:e.length;return!!i&&Ye(e,t,0)>-1}var Q=Math.max;function Qe(e,t,i){return t=Q(t===void 0?e.length-1:t,0),function(){for(var u=arguments,a=-1,n=Q(u.length-t,0),r=Array(n);++a<n;)r[a]=u[t+a];a=-1;for(var l=Array(t+1);++a<t;)l[a]=u[a];return l[t]=i(r),je(e,this,l)}}function Xe(e,t){return Be(Qe(e,t,ae),e+"")}var Ge=9007199254740991;function et(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Ge}function tt(e){return e!=null&&et(e.length)&&!I.isFunction(e)}function nt(e,t,i){var u=-1,a=e.length;t<0&&(t=-t>a?0:a+t),i=i>a?a:i,i<0&&(i+=a),a=t>i?0:i-t>>>0,t>>>=0;for(var n=Array(a);++u<a;)n[u]=e[u+t];return n}function rt(e,t,i){var u=e.length;return i=i===void 0?u:i,nt(e,t,i)}var it="\\ud800-\\udfff",at="\\u0300-\\u036f",st="\\ufe20-\\ufe2f",ot="\\u20d0-\\u20ff",ut=at+st+ot,lt="\\ufe0e\\ufe0f",ct="\\u200d",dt=RegExp("["+ct+it+ut+lt+"]");function oe(e){return dt.test(e)}function ft(e){return e.split("")}var ue="\\ud800-\\udfff",pt="\\u0300-\\u036f",ht="\\ufe20-\\ufe2f",mt="\\u20d0-\\u20ff",gt=pt+ht+mt,bt="\\ufe0e\\ufe0f",vt="["+ue+"]",W="["+gt+"]",V="\\ud83c[\\udffb-\\udfff]",xt="(?:"+W+"|"+V+")",le="[^"+ue+"]",ce="(?:\\ud83c[\\udde6-\\uddff]){2}",de="[\\ud800-\\udbff][\\udc00-\\udfff]",Rt="\\u200d",fe=xt+"?",pe="["+bt+"]?",St="(?:"+Rt+"(?:"+[le,ce,de].join("|")+")"+pe+fe+")*",Dt=pe+fe+St,It="(?:"+[le+W+"?",W,ce,de,vt].join("|")+")",Lt=RegExp(V+"(?="+V+")|"+It+Dt,"g");function wt(e){return e.match(Lt)||[]}function Pt(e){return oe(e)?wt(e):ft(e)}function kt(e){return function(t){t=I.toString(t);var i=oe(t)?Pt(t):void 0,u=i?i[0]:t.charAt(0),a=i?rt(i,1).join(""):t.slice(1);return u[e]()+a}}var At=kt("toUpperCase");function Ct(e){return At(I.toString(e).toLowerCase())}function Ot(e,t,i,u){for(var a=-1,n=e==null?0:e.length;++a<n;)i=t(i,e[a],a,e);return i}function yt(e){return function(t){return e==null?void 0:e[t]}}var Tt={À:"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"},Ut=yt(Tt),Et=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ft="\\u0300-\\u036f",Mt="\\ufe20-\\ufe2f",$t="\\u20d0-\\u20ff",Nt=Ft+Mt+$t,jt="["+Nt+"]",zt=RegExp(jt,"g");function Wt(e){return e=I.toString(e),e&&e.replace(Et,Ut).replace(zt,"")}var Vt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function Jt(e){return e.match(Vt)||[]}var Ht=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function _t(e){return Ht.test(e)}var he="\\ud800-\\udfff",Bt="\\u0300-\\u036f",Zt="\\ufe20-\\ufe2f",qt="\\u20d0-\\u20ff",Kt=Bt+Zt+qt,me="\\u2700-\\u27bf",ge="a-z\\xdf-\\xf6\\xf8-\\xff",Yt="\\xac\\xb1\\xd7\\xf7",Qt="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Xt="\\u2000-\\u206f",Gt=" \\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",be="A-Z\\xc0-\\xd6\\xd8-\\xde",en="\\ufe0e\\ufe0f",ve=Yt+Qt+Xt+Gt,xe="['’]",X="["+ve+"]",tn="["+Kt+"]",Re="\\d+",nn="["+me+"]",Se="["+ge+"]",De="[^"+he+ve+Re+me+ge+be+"]",rn="\\ud83c[\\udffb-\\udfff]",an="(?:"+tn+"|"+rn+")",sn="[^"+he+"]",Ie="(?:\\ud83c[\\udde6-\\uddff]){2}",Le="[\\ud800-\\udbff][\\udc00-\\udfff]",A="["+be+"]",on="\\u200d",G="(?:"+Se+"|"+De+")",un="(?:"+A+"|"+De+")",ee="(?:"+xe+"(?:d|ll|m|re|s|t|ve))?",te="(?:"+xe+"(?:D|LL|M|RE|S|T|VE))?",we=an+"?",Pe="["+en+"]?",ln="(?:"+on+"(?:"+[sn,Ie,Le].join("|")+")"+Pe+we+")*",cn="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",dn="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",fn=Pe+we+ln,pn="(?:"+[nn,Ie,Le].join("|")+")"+fn,hn=RegExp([A+"?"+Se+"+"+ee+"(?="+[X,A,"$"].join("|")+")",un+"+"+te+"(?="+[X,A+G,"$"].join("|")+")",A+"?"+G+"+"+ee,A+"+"+te,dn,cn,Re,pn].join("|"),"g");function mn(e){return e.match(hn)||[]}function gn(e,t,i){return e=I.toString(e),t=t,t===void 0?_t(e)?mn(e):Jt(e):e.match(t)||[]}var bn="['’]",vn=RegExp(bn,"g");function xn(e){return function(t){return Ot(gn(Wt(t).replace(vn,"")),e,"")}}var Rn=xn(function(e,t,i){return t=t.toLowerCase(),e+(i?Ct(t):t)}),Sn="__lodash_hash_undefined__";function Dn(e){return this.__data__.set(e,Sn),this}function In(e){return this.__data__.has(e)}function y(e){var t=-1,i=e==null?0:e.length;for(this.__data__=new I.MapCache;++t<i;)this.add(e[t])}y.prototype.add=y.prototype.push=Dn;y.prototype.has=In;function J(e,t){return e.has(t)}function Ln(e){return I.isObjectLike(e)&&tt(e)}var wn=Math.min;function Pn(e,t,i){for(var u=se,a=e[0].length,n=e.length,r=n,l=Array(n),c=1/0,p=[];r--;){var o=e[r];c=wn(o.length,c),l[r]=a>=120&&o.length>=120?new y(r&&o):void 0}o=e[0];var f=-1,h=l[0];e:for(;++f<a&&p.length<c;){var S=o[f],v=S;if(S=S!==0?S:0,!(h?J(h,v):u(p,v))){for(r=n;--r;){var g=l[r];if(!(g?J(g,v):u(e[r],v)))continue e}h&&h.push(v),p.push(S)}}return p}function kn(e){return Ln(e)?e:[]}var An=Xe(function(e){var t=I.arrayMap(e,kn);return t.length&&t[0]===e[0]?Pn(t):[]});const Cn={complex:["tar.bz2","tar.gz","tar.xz"]},On=e=>Object.hasOwn(e,"ddate"),yn=e=>Object.hasOwn(e,"highlights"),M=e=>e.replace(/[^A-Za-z0-9\-_]/g,""),ke=(e,t)=>!e||typeof e!="string"?"":e.indexOf("!")>=0?e.split("!")[t]:"",Ae=e=>ke(e,0),B=e=>ke(e,1),Tn=e=>{const t=e.extension||"",i=e.name||"";if(!t.length)return i;const u=i.lastIndexOf(`.${t}`);return i.substring(0,u)},$=e=>{const t=e.name;if(e.type==="directory"||e.isFolder)return"";const i=t.split(".");if(i.length>2)for(let u=0;u<i.length;u++){const a=i.slice(u,i.length).join(".");if(Cn.complex.includes(a))return a}return i.length<2?"":i[i.length-1]},Un=e=>E.basename(E.dirname(e.path))||null,En=e=>typeof e.isShareRoot=="function"&&e.isShareRoot(),U=e=>{if(!e)return e;const t={};return Object.keys(e).forEach(i=>{t[Rn(i)]=e[i]}),t};function Fn(e,t=[]){var v,g,P;const i=((v=e.props[s.Name])==null?void 0:v.toString())||E.basename(e.filename),u=e.props[s.FileId],a=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[s.LockDiscovery];let c,p,o;l&&(c=l[s.ActiveLock],p=c[s.LockOwner],o=c[s.LockTime]);let f=[];e.props[s.ShareTypes]&&(f=e.props[s.ShareTypes]["share-type"],Array.isArray(f)||(f=[f]));const h={};for(const d of t||[]){const m=d.split(":").pop();e.props[m]&&(h[d]=e.props[m])}const S={id:u,fileId:u,storageId:Ae(u),parentFolderId:e.props[s.FileParent],mimeType:e.props[s.MimeType],name:i,extension:a?"":r,path:n,webDavPath:e.filename,type:a?"folder":e.type,isFolder:a,locked:!!c,lockOwner:p,lockTime:o,processing:e.processing||!1,mdate:e.props[s.LastModifiedDate],size:a?((g=e.props[s.ContentSize])==null?void 0:g.toString())||"0":((P=e.props[s.ContentLength])==null?void 0:P.toString())||"0",indicators:[],permissions:e.props[s.Permissions]||"",starred:e.props[s.IsFavorite]!==0,etag:e.props[s.ETag],shareTypes:f,privateLink:e.props[s.PrivateLink],downloadURL:e.props[s.DownloadURL],remoteItemId:e.props[s.RemoteItemId],remoteItemPath:e.props[s.ShareRoot],owner:{id:e.props[s.OwnerId],displayName:e.props[s.OwnerDisplayName]},tags:(e.props[s.Tags]||"").toString().split(",").filter(Boolean),audio:U(e.props[s.Audio]),location:U(e.props[s.Location]),image:U(e.props[s.Image]),photo:U(e.props[s.Photo]),extraProps:h,canUpload:function(){return this.permissions.indexOf(D.FolderCreateable)>=0},canDownload:function(){return this.permissions.indexOf(D.SecureView)===-1},canBeDeleted:function(){return this.permissions.indexOf(D.Deletable)>=0},canRename:function(){return this.permissions.indexOf(D.Renameable)>=0},canShare:function({ability:d}){return d.can("create-all","Share")&&this.permissions.indexOf(D.Shareable)>=0},canCreate:function(){return this.permissions.indexOf(D.FolderCreateable)>=0},canEditTags:function(){return this.permissions.indexOf(D.Updateable)>=0||this.permissions.indexOf(D.FileUpdateable)>=0},isMounted:function(){return this.permissions.indexOf(D.Mounted)>=0},isReceivedShare:function(){return this.permissions.indexOf(D.Shared)>=0},isShareRoot(){return e.props[s.ShareRoot]?e.filename.split("/").length===3:!1},canDeny:function(){return this.permissions.indexOf(D.Deny)>=0},getDomSelector:()=>M(u)};return Object.defineProperty(S,"nodeId",{get(){return B(this.id)}}),S}function Mn(e){var n;const t=e.type==="directory",i=(n=e.props[s.TrashbinOriginalFilename])==null?void 0:n.toString(),u=$({name:i,type:e.type}),a=K.basename(e.filename);return{type:t?"folder":e.type,isFolder:t,ddate:e.props[s.TrashbinDeletedDate],name:K.basename(i),extension:u,path:I.urlJoin(e.props[s.TrashbinOriginalLocation],{leadingSlash:!0}),id:a,parentFolderId:e.props[s.FileParent],indicators:[],webDavPath:"",canUpload:()=>!1,canDownload:()=>!1,canBeDeleted:()=>!0,canBeRestored:function(){return!0},canRename:()=>!1,canShare:()=>!1,canCreate:()=>!1,isMounted:()=>!1,isReceivedShare:()=>!1,getDomSelector:()=>M(a)}}var L=(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))(L||{});const O=e=>e;class C{constructor(t,i,u,a){b(this,"_key");b(this,"_value");b(this,"_label");b(this,"_icon");this._key=t,this._value=i,this._label=u,this._icon=a}get key(){return this._key}get value(){return this._value}get label(){return this._label}get icon(){return this._icon}}const R=class R{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(u=>u.key===i))}static getValues(t){return t.map(i=>i.value)}static containsAnyValue(t,i){return An(this.getValues(t),i).length>0}};b(R,"user",new C("user",0,O("User"),"user")),b(R,"group",new C("group",1,O("Group"),"group")),b(R,"link",new C("link",3,O("Link"),"link")),b(R,"guest",new C("guest",4,O("Guest"),"global")),b(R,"remote",new C("remote",6,O("External"),"earth")),b(R,"individuals",[R.user,R.guest,R.remote]),b(R,"collectives",[R.group]),b(R,"unauthenticated",[R.link]),b(R,"authenticated",[R.user,R.group,R.guest,R.remote]),b(R,"all",[R.user,R.group,R.link,R.guest,R.remote]);let H=R;const $n="a0ca6a90-a365-4782-871e-d44447bbc668",Nn="89f37a33-858b-45fa-8890-a1f2b27d90e1",jn=e=>(e==null?void 0:e.type)==="space",_=e=>(e==null?void 0:e.driveType)==="personal",zn=e=>(e==null?void 0:e.driveType)==="project",Wn=e=>(e==null?void 0:e.driveType)==="share",Vn=e=>(e==null?void 0:e.driveType)==="mountpoint",Ce=e=>(e==null?void 0:e.driveType)==="public";function Oe(e,t){return I.urlJoin("spaces",e,t,{leadingSlash:!0})}function ye(e,t=""){return I.urlJoin("spaces","trash-bin",e,t,{leadingSlash:!0})}function Jn(e,t){const u=e[{image:"spaceImageData",readme:"spaceReadmeData"}[t]];if(!u)return"";const a=decodeURI(u.webDavUrl).split("/"),n=a.find(r=>r.startsWith(e.id));return n?a.slice(a.indexOf(n)+1).join("/"):""}function Hn(e){return Object.values(e.members).filter(({permissions:t})=>t.includes(L.deletePermissions))}function _n(e){var o,f,h,S,v,g;const t=e.publicLinkPassword,i=(o=e.props)==null?void 0:o[s.FileId],u=(f=e.props)==null?void 0:f[s.PublicLinkItemType],a=(h=e.props)==null?void 0:h[s.PublicLinkPermission],n=(S=e.props)==null?void 0:S[s.PublicLinkExpiration],r=(v=e.props)==null?void 0:v[s.PublicLinkShareDate],l=(g=e.props)==null?void 0:g[s.PublicLinkShareOwner];let c,p;return e.publicLinkType==="ocm"?(c=`ocm/${e.id}`,p=re(e.id)):(c=`public/${e.id}`,p=ne(e.id)),Object.assign(Z({...e,driveType:"public",driveAlias:c,webDavPath:p},{}),{...i&&{fileId:i},...t&&{publicLinkPassword:t},...u&&{publicLinkItemType:u},...a&&{publicLinkPermission:parseInt(a)},...n&&{publicLinkExpiration:n},...r&&{publicLinkShareDate:r},...l&&{publicLinkShareOwner:l}})}function Bn({driveAliasPrefix:e,id:t,shareName:i,serverUrl:u}){const a=Z({id:t,driveAlias:`${e}/${i}`,driveType:"share",name:i,serverUrl:u},{});return a.rename=n=>{a.driveAlias=`${e}/${n}`,a.name=n},a}function Z(e,t){var f,h,S,v,g,P;let i,u;e.special&&(i=e.special.find(d=>d.specialFolder.name==="image"),u=e.special.find(d=>d.specialFolder.name==="readme"),i&&(i.webDavUrl=decodeURI(i.webDavUrl)),u&&(u.webDavUrl=decodeURI(u.webDavUrl)));const a=((h=(f=e.root)==null?void 0:f.deleted)==null?void 0:h.state)==="trashed",n=I.urlJoin(e.webDavPath||Oe(e.id),{leadingSlash:!0}),r=I.urlJoin(e.serverUrl,"remote.php/dav",n),l=I.urlJoin(e.webDavTrashPath||ye(e.id),{leadingSlash:!0}),c=I.urlJoin(e.serverUrl,"remote.php/dav",l),p=(v=(S=e.root)==null?void 0:S.permissions)==null?void 0:v.reduce((d,m)=>{var T;return d[(m.grantedToV2.user||m.grantedToV2.group).id]={grantedTo:m.grantedToV2,permissions:qn(m,t),roleId:(T=m.roles)==null?void 0:T[0]},d},{}),o={id:e.id,fileId:e.id,storageId:e.id,mimeType:"",name:e.name,description:e.description,extension:"",path:"/",webDavPath:n,webDavTrashPath:l,driveAlias:e.driveAlias,driveType:e.driveType,type:"space",isFolder:!0,mdate:e.lastModifiedDateTime,size:(g=e.quota)==null?void 0:g.used,indicators:[],tags:[],permissions:"",starred:!1,etag:"",shareTypes:[],privateLink:e.webUrl,downloadURL:"",owner:(P=e.owner)==null?void 0:P.user,disabled:a,root:e.root,spaceQuota:e.quota,members:p||{},spaceImageData:i,spaceReadmeData:u,canUpload:function({user:d}={}){return _(this)&&this.isOwner(d)?!0:w(this,d).includes(L.createUpload)},canDownload:function(){return!0},canBeDeleted:function({user:d,ability:m}={}){return this.disabled?m!=null&&m.can("delete-all","Drive")?!0:w(this,d).includes(L.deletePermissions):!1},canRename:function({user:d,ability:m}={}){return m!=null&&m.can("update-all","Drive")?!0:w(this,d).includes(L.deletePermissions)},canEditDescription:function({user:d,ability:m}={}){return m!=null&&m.can("update-all","Drive")?!0:w(this,d).includes(L.deletePermissions)},canRestore:function({user:d,ability:m}={}){return this.disabled?m!=null&&m.can("update-all","Drive")?!0:w(this,d).includes(L.deletePermissions):!1},canDisable:function({user:d,ability:m}={}){return this.disabled?!1:m!=null&&m.can("delete-all","Drive")?!0:w(this,d).includes(L.deletePermissions)},canShare:function({user:d}={}){return w(this,d).includes(L.createPermissions)},canEditImage:function({user:d}={}){return this.disabled?!1:w(this,d).includes(L.deletePermissions)},canEditReadme:function({user:d}={}){return this.disabled?!1:w(this,d).includes(L.deletePermissions)},canRestoreFromTrashbin:function({user:d}={}){return w(this,d).includes(L.updateDeleted)},canDeleteFromTrashBin:function({user:d}={}){return w(this,d).includes(L.deletePermissions)},canListVersions:function({user:d}={}){return _(this)&&this.isOwner(d)?!0:w(this,d).includes(L.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:()=>M(e.id),getDriveAliasAndItem({path:d}){return I.urlJoin(this.driveAlias,d,{leadingSlash:!1})},getWebDavUrl({path:d}){return I.urlJoin(r,d)},getWebDavTrashUrl({path:d}){return I.urlJoin(c,d)},isMember(d){var m;return Ce(this)?!1:this.isOwner(d)||this.members[d.id]?!0:(m=d.memberOf)==null?void 0:m.some(T=>!!this.members[T.id])},isOwner(d){var m;return(d==null?void 0:d.id)===((m=this.owner)==null?void 0:m.id)}};return Object.defineProperty(o,"nodeId",{get(){return B(this.id)}}),o}function Zn(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:I.urlJoin(e.webDavPath,".space",e.spaceImageData.name),canDownload:()=>!0}}function w(e,t){var a;const i=[];if(!t)return i;const u=e.members[t.id];return u&&i.push(...u.permissions),(a=t.memberOf)==null||a.forEach(n=>{const r=e.members[n.id];r&&i.push(...r.permissions)}),[...new Set(i)]}function qn(e,t){var u;if(e["@libre.graph.permissions.actions"])return e["@libre.graph.permissions.actions"];const i=t[(u=e.roles)==null?void 0:u[0]];if(i){const a=i.rolePermissions.find(({condition:n})=>n==="exists @Resource.Root");return(a==null?void 0:a.allowedResourceActions)||[]}return[]}exports.DavMethod=ie;exports.DavPermission=D;exports.DavProperties=z;exports.DavProperty=s;exports.GraphSharePermission=L;exports.OCM_PROVIDER_ID=Nn;exports.SHARE_JAIL_ID=$n;exports.SetCache=y;exports.ShareType=C;exports.ShareTypes=H;exports.arrayIncludes=se;exports.buildDeletedResource=Mn;exports.buildPublicSpaceResource=_n;exports.buildResource=Fn;exports.buildShareSpaceResource=Bn;exports.buildSpace=Z;exports.buildSpaceImageResource=Zn;exports.buildWebDavOcmPath=re;exports.buildWebDavPublicPath=ne;exports.buildWebDavSpacesPath=Oe;exports.buildWebDavSpacesTrashPath=ye;exports.cacheHas=J;exports.extractDomSelector=M;exports.extractExtensionFromFile=$;exports.extractNameWithoutExtension=Tn;exports.extractNodeId=B;exports.extractParentFolderName=Un;exports.extractStorageId=Ae;exports.getPermissionsForSpaceMember=w;exports.getRelativeSpecialFolderSpacePath=Jn;exports.getSpaceManagers=Hn;exports.isMountPointSpaceResource=Vn;exports.isPersonalSpaceResource=_;exports.isProjectSpaceResource=zn;exports.isPublicSpaceResource=Ce;exports.isSearchResource=yn;exports.isShareRoot=En;exports.isShareSpaceResource=Wn;exports.isSpaceResource=jn;exports.isTrashResource=On;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";const V=require("./index-C6VnMvgz.cjs");function Ne(e,t){return function(){return e.apply(t,arguments)}}const{toString:Ye}=Object.prototype,{getPrototypeOf:le}=Object,v=(e=>t=>{const n=Ye.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),C=e=>(e=e.toLowerCase(),t=>v(t)===e),X=e=>t=>typeof t===e,{isArray:U}=Array,q=X("undefined");function et(e){return e!==null&&!q(e)&&e.constructor!==null&&!q(e.constructor)&&x(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Pe=C("ArrayBuffer");function tt(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Pe(e.buffer),t}const nt=X("string"),x=X("function"),_e=X("number"),G=e=>e!==null&&typeof e=="object",rt=e=>e===!0||e===!1,$=e=>{if(v(e)!=="object")return!1;const t=le(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},st=C("Date"),ot=C("File"),it=C("Blob"),at=C("FileList"),ct=e=>G(e)&&x(e.pipe),ut=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||x(e.append)&&((t=v(e))==="formdata"||t==="object"&&x(e.toString)&&e.toString()==="[object FormData]"))},lt=C("URLSearchParams"),[ft,dt,pt,ht]=["ReadableStream","Request","Response","Headers"].map(C),mt=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function H(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,s;if(typeof e!="object"&&(e=[e]),U(e))for(r=0,s=e.length;r<s;r++)t.call(null,e[r],r,e);else{const o=n?Object.getOwnPropertyNames(e):Object.keys(e),i=o.length;let c;for(r=0;r<i;r++)c=o[r],t.call(null,e[c],c,e)}}function Fe(e,t){t=t.toLowerCase();const n=Object.keys(e);let r=n.length,s;for(;r-- >0;)if(s=n[r],t===s.toLowerCase())return s;return null}const L=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:V.global,Le=e=>!q(e)&&e!==L;function se(){const{caseless:e}=Le(this)&&this||{},t={},n=(r,s)=>{const o=e&&Fe(t,s)||s;$(t[o])&&$(r)?t[o]=se(t[o],r):$(r)?t[o]=se({},r):U(r)?t[o]=r.slice():t[o]=r};for(let r=0,s=arguments.length;r<s;r++)arguments[r]&&H(arguments[r],n);return t}const yt=(e,t,n,{allOwnKeys:r}={})=>(H(t,(s,o)=>{n&&x(s)?e[o]=Ne(s,n):e[o]=s},{allOwnKeys:r}),e),bt=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),wt=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},Et=(e,t,n,r)=>{let s,o,i;const c={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),o=s.length;o-- >0;)i=s[o],(!r||r(i,e,t))&&!c[i]&&(t[i]=e[i],c[i]=!0);e=n!==!1&&le(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Rt=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},St=e=>{if(!e)return null;if(U(e))return e;let t=e.length;if(!_e(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},gt=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&le(Uint8Array)),Ot=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let s;for(;(s=r.next())&&!s.done;){const o=s.value;t.call(e,o[0],o[1])}},Tt=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},At=C("HTMLFormElement"),xt=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),he=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Ct=C("RegExp"),Be=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};H(n,(s,o)=>{let i;(i=t(s,o,e))!==!1&&(r[o]=i||s)}),Object.defineProperties(e,r)},Nt=e=>{Be(e,(t,n)=>{if(x(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(x(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},Pt=(e,t)=>{const n={},r=s=>{s.forEach(o=>{n[o]=!0})};return U(e)?r(e):r(String(e).split(t)),n},_t=()=>{},Ft=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,ee="abcdefghijklmnopqrstuvwxyz",me="0123456789",De={DIGIT:me,ALPHA:ee,ALPHA_DIGIT:ee+ee.toUpperCase()+me},Lt=(e=16,t=De.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function Bt(e){return!!(e&&x(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const Dt=e=>{const t=new Array(10),n=(r,s)=>{if(G(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[s]=r;const o=U(r)?[]:{};return H(r,(i,c)=>{const f=n(i,s+1);!q(f)&&(o[c]=f)}),t[s]=void 0,o}}return r};return n(e,0)},Ut=C("AsyncFunction"),kt=e=>e&&(G(e)||x(e))&&x(e.then)&&x(e.catch),Ue=((e,t)=>e?setImmediate:t?((n,r)=>(L.addEventListener("message",({source:s,data:o})=>{s===L&&o===n&&r.length&&r.shift()()},!1),s=>{r.push(s),L.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",x(L.postMessage)),jt=typeof queueMicrotask<"u"?queueMicrotask.bind(L):typeof V.process$1<"u"&&V.process$1.nextTick||Ue,a={isArray:U,isArrayBuffer:Pe,isBuffer:et,isFormData:ut,isArrayBufferView:tt,isString:nt,isNumber:_e,isBoolean:rt,isObject:G,isPlainObject:$,isReadableStream:ft,isRequest:dt,isResponse:pt,isHeaders:ht,isUndefined:q,isDate:st,isFile:ot,isBlob:it,isRegExp:Ct,isFunction:x,isStream:ct,isURLSearchParams:lt,isTypedArray:gt,isFileList:at,forEach:H,merge:se,extend:yt,trim:mt,stripBOM:bt,inherits:wt,toFlatObject:Et,kindOf:v,kindOfTest:C,endsWith:Rt,toArray:St,forEachEntry:Ot,matchAll:Tt,isHTMLForm:At,hasOwnProperty:he,hasOwnProp:he,reduceDescriptors:Be,freezeMethods:Nt,toObjectSet:Pt,toCamelCase:xt,noop:_t,toFiniteNumber:Ft,findKey:Fe,global:L,isContextDefined:Le,ALPHABET:De,generateString:Lt,isSpecCompliantForm:Bt,toJSONObject:Dt,isAsyncFn:Ut,isThenable:kt,setImmediate:Ue,asap:jt};function m(e,t,n,r,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),s&&(this.response=s,this.status=s.status?s.status:null)}a.inherits(m,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:a.toJSONObject(this.config),code:this.code,status:this.status}}});const ke=m.prototype,je={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{je[e]={value:e}});Object.defineProperties(m,je);Object.defineProperty(ke,"isAxiosError",{value:!0});m.from=(e,t,n,r,s,o)=>{const i=Object.create(ke);return a.toFlatObject(e,i,function(f){return f!==Error.prototype},c=>c!=="isAxiosError"),m.call(i,e.message,t,n,r,s),i.cause=e,i.name=e.name,o&&Object.assign(i,o),i};const qt=null;function oe(e){return a.isPlainObject(e)||a.isArray(e)}function qe(e){return a.endsWith(e,"[]")?e.slice(0,-2):e}function ye(e,t,n){return e?e.concat(t).map(function(s,o){return s=qe(s),!n&&o?"["+s+"]":s}).join(n?".":""):t}function Ht(e){return a.isArray(e)&&!e.some(oe)}const It=a.toFlatObject(a,{},null,function(t){return/^is[A-Z]/.test(t)});function Q(e,t,n){if(!a.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=a.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(y,h){return!a.isUndefined(h[y])});const r=n.metaTokens,s=n.visitor||l,o=n.dots,i=n.indexes,f=(n.Blob||typeof Blob<"u"&&Blob)&&a.isSpecCompliantForm(t);if(!a.isFunction(s))throw new TypeError("visitor must be a function");function u(p){if(p===null)return"";if(a.isDate(p))return p.toISOString();if(!f&&a.isBlob(p))throw new m("Blob is not supported. Use a Buffer instead.");return a.isArrayBuffer(p)||a.isTypedArray(p)?f&&typeof Blob=="function"?new Blob([p]):V.Buffer.from(p):p}function l(p,y,h){let w=p;if(p&&!h&&typeof p=="object"){if(a.endsWith(y,"{}"))y=r?y:y.slice(0,-2),p=JSON.stringify(p);else if(a.isArray(p)&&Ht(p)||(a.isFileList(p)||a.endsWith(y,"[]"))&&(w=a.toArray(p)))return y=qe(y),w.forEach(function(g,P){!(a.isUndefined(g)||g===null)&&t.append(i===!0?ye([y],P,o):i===null?y:y+"[]",u(g))}),!1}return oe(p)?!0:(t.append(ye(h,y,o),u(p)),!1)}const d=[],b=Object.assign(It,{defaultVisitor:l,convertValue:u,isVisitable:oe});function R(p,y){if(!a.isUndefined(p)){if(d.indexOf(p)!==-1)throw Error("Circular reference detected in "+y.join("."));d.push(p),a.forEach(p,function(w,S){(!(a.isUndefined(w)||w===null)&&s.call(t,w,a.isString(S)?S.trim():S,y,b))===!0&&R(w,y?y.concat(S):[S])}),d.pop()}}if(!a.isObject(e))throw new TypeError("data must be an object");return R(e),t}function be(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function fe(e,t){this._pairs=[],e&&Q(e,this,t)}const He=fe.prototype;He.append=function(t,n){this._pairs.push([t,n])};He.toString=function(t){const n=t?function(r){return t.call(this,r,be)}:be;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function Mt(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Ie(e,t,n){if(!t)return e;const r=n&&n.encode||Mt;a.isFunction(n)&&(n={serialize:n});const s=n&&n.serialize;let o;if(s?o=s(t,n):o=a.isURLSearchParams(t)?t.toString():new fe(t,n).toString(r),o){const i=e.indexOf("#");i!==-1&&(e=e.slice(0,i)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}class we{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){a.forEach(this.handlers,function(r){r!==null&&t(r)})}}const Me={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},$t=typeof URLSearchParams<"u"?URLSearchParams:fe,zt=typeof FormData<"u"?FormData:null,Jt=typeof Blob<"u"?Blob:null,Vt={isBrowser:!0,classes:{URLSearchParams:$t,FormData:zt,Blob:Jt},protocols:["http","https","file","blob","url","data"]},de=typeof window<"u"&&typeof document<"u",ie=typeof navigator=="object"&&navigator||void 0,Wt=de&&(!ie||["ReactNative","NativeScript","NS"].indexOf(ie.product)<0),Kt=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",vt=de&&window.location.href||"http://localhost",Xt=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:de,hasStandardBrowserEnv:Wt,hasStandardBrowserWebWorkerEnv:Kt,navigator:ie,origin:vt},Symbol.toStringTag,{value:"Module"})),O={...Xt,...Vt};function Gt(e,t){return Q(e,new O.classes.URLSearchParams,Object.assign({visitor:function(n,r,s,o){return O.isNode&&a.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},t))}function Qt(e){return a.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Zt(e){const t={},n=Object.keys(e);let r;const s=n.length;let o;for(r=0;r<s;r++)o=n[r],t[o]=e[o];return t}function $e(e){function t(n,r,s,o){let i=n[o++];if(i==="__proto__")return!0;const c=Number.isFinite(+i),f=o>=n.length;return i=!i&&a.isArray(s)?s.length:i,f?(a.hasOwnProp(s,i)?s[i]=[s[i],r]:s[i]=r,!c):((!s[i]||!a.isObject(s[i]))&&(s[i]=[]),t(n,r,s[i],o)&&a.isArray(s[i])&&(s[i]=Zt(s[i])),!c)}if(a.isFormData(e)&&a.isFunction(e.entries)){const n={};return a.forEachEntry(e,(r,s)=>{t(Qt(r),s,n,0)}),n}return null}function Yt(e,t,n){if(a.isString(e))try{return(t||JSON.parse)(e),a.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const I={transitional:Me,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",s=r.indexOf("application/json")>-1,o=a.isObject(t);if(o&&a.isHTMLForm(t)&&(t=new FormData(t)),a.isFormData(t))return s?JSON.stringify($e(t)):t;if(a.isArrayBuffer(t)||a.isBuffer(t)||a.isStream(t)||a.isFile(t)||a.isBlob(t)||a.isReadableStream(t))return t;if(a.isArrayBufferView(t))return t.buffer;if(a.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Gt(t,this.formSerializer).toString();if((c=a.isFileList(t))||r.indexOf("multipart/form-data")>-1){const f=this.env&&this.env.FormData;return Q(c?{"files[]":t}:t,f&&new f,this.formSerializer)}}return o||s?(n.setContentType("application/json",!1),Yt(t)):t}],transformResponse:[function(t){const n=this.transitional||I.transitional,r=n&&n.forcedJSONParsing,s=this.responseType==="json";if(a.isResponse(t)||a.isReadableStream(t))return t;if(t&&a.isString(t)&&(r&&!this.responseType||s)){const i=!(n&&n.silentJSONParsing)&&s;try{return JSON.parse(t)}catch(c){if(i)throw c.name==="SyntaxError"?m.from(c,m.ERR_BAD_RESPONSE,this,null,this.response):c}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:O.classes.FormData,Blob:O.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};a.forEach(["delete","get","head","post","put","patch"],e=>{I.headers[e]={}});const en=a.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),tn=e=>{const t={};let n,r,s;return e&&e.split(`
|
|
2
|
+
`).forEach(function(i){s=i.indexOf(":"),n=i.substring(0,s).trim().toLowerCase(),r=i.substring(s+1).trim(),!(!n||t[n]&&en[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},Ee=Symbol("internals");function j(e){return e&&String(e).trim().toLowerCase()}function z(e){return e===!1||e==null?e:a.isArray(e)?e.map(z):String(e)}function nn(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const rn=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function te(e,t,n,r,s){if(a.isFunction(r))return r.call(this,t,n);if(s&&(t=n),!!a.isString(t)){if(a.isString(r))return t.indexOf(r)!==-1;if(a.isRegExp(r))return r.test(t)}}function sn(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function on(e,t){const n=a.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(s,o,i){return this[r].call(this,t,s,o,i)},configurable:!0})})}let A=class{constructor(t){t&&this.set(t)}set(t,n,r){const s=this;function o(c,f,u){const l=j(f);if(!l)throw new Error("header name must be a non-empty string");const d=a.findKey(s,l);(!d||s[d]===void 0||u===!0||u===void 0&&s[d]!==!1)&&(s[d||f]=z(c))}const i=(c,f)=>a.forEach(c,(u,l)=>o(u,l,f));if(a.isPlainObject(t)||t instanceof this.constructor)i(t,n);else if(a.isString(t)&&(t=t.trim())&&!rn(t))i(tn(t),n);else if(a.isHeaders(t))for(const[c,f]of t.entries())o(f,c,r);else t!=null&&o(n,t,r);return this}get(t,n){if(t=j(t),t){const r=a.findKey(this,t);if(r){const s=this[r];if(!n)return s;if(n===!0)return nn(s);if(a.isFunction(n))return n.call(this,s,r);if(a.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=j(t),t){const r=a.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||te(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let s=!1;function o(i){if(i=j(i),i){const c=a.findKey(r,i);c&&(!n||te(r,r[c],c,n))&&(delete r[c],s=!0)}}return a.isArray(t)?t.forEach(o):o(t),s}clear(t){const n=Object.keys(this);let r=n.length,s=!1;for(;r--;){const o=n[r];(!t||te(this,this[o],o,t,!0))&&(delete this[o],s=!0)}return s}normalize(t){const n=this,r={};return a.forEach(this,(s,o)=>{const i=a.findKey(r,o);if(i){n[i]=z(s),delete n[o];return}const c=t?sn(o):String(o).trim();c!==o&&delete n[o],n[c]=z(s),r[c]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return a.forEach(this,(r,s)=>{r!=null&&r!==!1&&(n[s]=t&&a.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
|
|
3
|
+
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(s=>r.set(s)),r}static accessor(t){const r=(this[Ee]=this[Ee]={accessors:{}}).accessors,s=this.prototype;function o(i){const c=j(i);r[c]||(on(s,i),r[c]=!0)}return a.isArray(t)?t.forEach(o):o(t),this}};A.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);a.reduceDescriptors(A.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});a.freezeMethods(A);function ne(e,t){const n=this||I,r=t||n,s=A.from(r.headers);let o=r.data;return a.forEach(e,function(c){o=c.call(n,o,s.normalize(),t?t.status:void 0)}),s.normalize(),o}function ze(e){return!!(e&&e.__CANCEL__)}function k(e,t,n){m.call(this,e??"canceled",m.ERR_CANCELED,t,n),this.name="CanceledError"}a.inherits(k,m,{__CANCEL__:!0});function Je(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new m("Request failed with status code "+n.status,[m.ERR_BAD_REQUEST,m.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function an(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function cn(e,t){e=e||10;const n=new Array(e),r=new Array(e);let s=0,o=0,i;return t=t!==void 0?t:1e3,function(f){const u=Date.now(),l=r[o];i||(i=u),n[s]=f,r[s]=u;let d=o,b=0;for(;d!==s;)b+=n[d++],d=d%e;if(s=(s+1)%e,s===o&&(o=(o+1)%e),u-i<t)return;const R=l&&u-l;return R?Math.round(b*1e3/R):void 0}}function un(e,t){let n=0,r=1e3/t,s,o;const i=(u,l=Date.now())=>{n=l,s=null,o&&(clearTimeout(o),o=null),e.apply(null,u)};return[(...u)=>{const l=Date.now(),d=l-n;d>=r?i(u,l):(s=u,o||(o=setTimeout(()=>{o=null,i(s)},r-d)))},()=>s&&i(s)]}const W=(e,t,n=3)=>{let r=0;const s=cn(50,250);return un(o=>{const i=o.loaded,c=o.lengthComputable?o.total:void 0,f=i-r,u=s(f),l=i<=c;r=i;const d={loaded:i,total:c,progress:c?i/c:void 0,bytes:f,rate:u||void 0,estimated:u&&c&&l?(c-i)/u:void 0,event:o,lengthComputable:c!=null,[t?"download":"upload"]:!0};e(d)},n)},Re=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Se=e=>(...t)=>a.asap(()=>e(...t)),ln=O.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,O.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(O.origin),O.navigator&&/(msie|trident)/i.test(O.navigator.userAgent)):()=>!0,fn=O.hasStandardBrowserEnv?{write(e,t,n,r,s,o){const i=[e+"="+encodeURIComponent(t)];a.isNumber(n)&&i.push("expires="+new Date(n).toGMTString()),a.isString(r)&&i.push("path="+r),a.isString(s)&&i.push("domain="+s),o===!0&&i.push("secure"),document.cookie=i.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function dn(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function pn(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Ve(e,t){return e&&!dn(t)?pn(e,t):t}const ge=e=>e instanceof A?{...e}:e;function D(e,t){t=t||{};const n={};function r(u,l,d,b){return a.isPlainObject(u)&&a.isPlainObject(l)?a.merge.call({caseless:b},u,l):a.isPlainObject(l)?a.merge({},l):a.isArray(l)?l.slice():l}function s(u,l,d,b){if(a.isUndefined(l)){if(!a.isUndefined(u))return r(void 0,u,d,b)}else return r(u,l,d,b)}function o(u,l){if(!a.isUndefined(l))return r(void 0,l)}function i(u,l){if(a.isUndefined(l)){if(!a.isUndefined(u))return r(void 0,u)}else return r(void 0,l)}function c(u,l,d){if(d in t)return r(u,l);if(d in e)return r(void 0,u)}const f={url:o,method:o,data:o,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:c,headers:(u,l,d)=>s(ge(u),ge(l),d,!0)};return a.forEach(Object.keys(Object.assign({},e,t)),function(l){const d=f[l]||s,b=d(e[l],t[l],l);a.isUndefined(b)&&d!==c||(n[l]=b)}),n}const We=e=>{const t=D({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:s,xsrfCookieName:o,headers:i,auth:c}=t;t.headers=i=A.from(i),t.url=Ie(Ve(t.baseURL,t.url),e.params,e.paramsSerializer),c&&i.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):"")));let f;if(a.isFormData(n)){if(O.hasStandardBrowserEnv||O.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if((f=i.getContentType())!==!1){const[u,...l]=f?f.split(";").map(d=>d.trim()).filter(Boolean):[];i.setContentType([u||"multipart/form-data",...l].join("; "))}}if(O.hasStandardBrowserEnv&&(r&&a.isFunction(r)&&(r=r(t)),r||r!==!1&&ln(t.url))){const u=s&&o&&fn.read(o);u&&i.set(s,u)}return t},hn=typeof XMLHttpRequest<"u",mn=hn&&function(e){return new Promise(function(n,r){const s=We(e);let o=s.data;const i=A.from(s.headers).normalize();let{responseType:c,onUploadProgress:f,onDownloadProgress:u}=s,l,d,b,R,p;function y(){R&&R(),p&&p(),s.cancelToken&&s.cancelToken.unsubscribe(l),s.signal&&s.signal.removeEventListener("abort",l)}let h=new XMLHttpRequest;h.open(s.method.toUpperCase(),s.url,!0),h.timeout=s.timeout;function w(){if(!h)return;const g=A.from("getAllResponseHeaders"in h&&h.getAllResponseHeaders()),T={data:!c||c==="text"||c==="json"?h.responseText:h.response,status:h.status,statusText:h.statusText,headers:g,config:e,request:h};Je(function(F){n(F),y()},function(F){r(F),y()},T),h=null}"onloadend"in h?h.onloadend=w:h.onreadystatechange=function(){!h||h.readyState!==4||h.status===0&&!(h.responseURL&&h.responseURL.indexOf("file:")===0)||setTimeout(w)},h.onabort=function(){h&&(r(new m("Request aborted",m.ECONNABORTED,e,h)),h=null)},h.onerror=function(){r(new m("Network Error",m.ERR_NETWORK,e,h)),h=null},h.ontimeout=function(){let P=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const T=s.transitional||Me;s.timeoutErrorMessage&&(P=s.timeoutErrorMessage),r(new m(P,T.clarifyTimeoutError?m.ETIMEDOUT:m.ECONNABORTED,e,h)),h=null},o===void 0&&i.setContentType(null),"setRequestHeader"in h&&a.forEach(i.toJSON(),function(P,T){h.setRequestHeader(T,P)}),a.isUndefined(s.withCredentials)||(h.withCredentials=!!s.withCredentials),c&&c!=="json"&&(h.responseType=s.responseType),u&&([b,p]=W(u,!0),h.addEventListener("progress",b)),f&&h.upload&&([d,R]=W(f),h.upload.addEventListener("progress",d),h.upload.addEventListener("loadend",R)),(s.cancelToken||s.signal)&&(l=g=>{h&&(r(!g||g.type?new k(null,e,h):g),h.abort(),h=null)},s.cancelToken&&s.cancelToken.subscribe(l),s.signal&&(s.signal.aborted?l():s.signal.addEventListener("abort",l)));const S=an(s.url);if(S&&O.protocols.indexOf(S)===-1){r(new m("Unsupported protocol "+S+":",m.ERR_BAD_REQUEST,e));return}h.send(o||null)})},yn=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,s;const o=function(u){if(!s){s=!0,c();const l=u instanceof Error?u:this.reason;r.abort(l instanceof m?l:new k(l instanceof Error?l.message:l))}};let i=t&&setTimeout(()=>{i=null,o(new m(`timeout ${t} of ms exceeded`,m.ETIMEDOUT))},t);const c=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(u=>{u.unsubscribe?u.unsubscribe(o):u.removeEventListener("abort",o)}),e=null)};e.forEach(u=>u.addEventListener("abort",o));const{signal:f}=r;return f.unsubscribe=()=>a.asap(c),f}},bn=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,s;for(;r<n;)s=r+t,yield e.slice(r,s),r=s},wn=async function*(e,t){for await(const n of En(e))yield*bn(n,t)},En=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},Oe=(e,t,n,r)=>{const s=wn(e,t);let o=0,i,c=f=>{i||(i=!0,r&&r(f))};return new ReadableStream({async pull(f){try{const{done:u,value:l}=await s.next();if(u){c(),f.close();return}let d=l.byteLength;if(n){let b=o+=d;n(b)}f.enqueue(new Uint8Array(l))}catch(u){throw c(u),u}},cancel(f){return c(f),s.return()}},{highWaterMark:2})},Z=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Ke=Z&&typeof ReadableStream=="function",Rn=Z&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),ve=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Sn=Ke&&ve(()=>{let e=!1;const t=new Request(O.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),Te=64*1024,ae=Ke&&ve(()=>a.isReadableStream(new Response("").body)),K={stream:ae&&(e=>e.body)};Z&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!K[t]&&(K[t]=a.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new m(`Response type '${t}' is not supported`,m.ERR_NOT_SUPPORT,r)})})})(new Response);const gn=async e=>{if(e==null)return 0;if(a.isBlob(e))return e.size;if(a.isSpecCompliantForm(e))return(await new Request(O.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(a.isArrayBufferView(e)||a.isArrayBuffer(e))return e.byteLength;if(a.isURLSearchParams(e)&&(e=e+""),a.isString(e))return(await Rn(e)).byteLength},On=async(e,t)=>{const n=a.toFiniteNumber(e.getContentLength());return n??gn(t)},Tn=Z&&(async e=>{let{url:t,method:n,data:r,signal:s,cancelToken:o,timeout:i,onDownloadProgress:c,onUploadProgress:f,responseType:u,headers:l,withCredentials:d="same-origin",fetchOptions:b}=We(e);u=u?(u+"").toLowerCase():"text";let R=yn([s,o&&o.toAbortSignal()],i),p;const y=R&&R.unsubscribe&&(()=>{R.unsubscribe()});let h;try{if(f&&Sn&&n!=="get"&&n!=="head"&&(h=await On(l,r))!==0){let T=new Request(t,{method:"POST",body:r,duplex:"half"}),_;if(a.isFormData(r)&&(_=T.headers.get("content-type"))&&l.setContentType(_),T.body){const[F,M]=Re(h,W(Se(f)));r=Oe(T.body,Te,F,M)}}a.isString(d)||(d=d?"include":"omit");const w="credentials"in Request.prototype;p=new Request(t,{...b,signal:R,method:n.toUpperCase(),headers:l.normalize().toJSON(),body:r,duplex:"half",credentials:w?d:void 0});let S=await fetch(p);const g=ae&&(u==="stream"||u==="response");if(ae&&(c||g&&y)){const T={};["status","statusText","headers"].forEach(pe=>{T[pe]=S[pe]});const _=a.toFiniteNumber(S.headers.get("content-length")),[F,M]=c&&Re(_,W(Se(c),!0))||[];S=new Response(Oe(S.body,Te,F,()=>{M&&M(),y&&y()}),T)}u=u||"text";let P=await K[a.findKey(K,u)||"text"](S,e);return!g&&y&&y(),await new Promise((T,_)=>{Je(T,_,{data:P,headers:A.from(S.headers),status:S.status,statusText:S.statusText,config:e,request:p})})}catch(w){throw y&&y(),w&&w.name==="TypeError"&&/fetch/i.test(w.message)?Object.assign(new m("Network Error",m.ERR_NETWORK,e,p),{cause:w.cause||w}):m.from(w,w&&w.code,e,p)}}),ce={http:qt,xhr:mn,fetch:Tn};a.forEach(ce,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Ae=e=>`- ${e}`,An=e=>a.isFunction(e)||e===null||e===!1,Xe={getAdapter:e=>{e=a.isArray(e)?e:[e];const{length:t}=e;let n,r;const s={};for(let o=0;o<t;o++){n=e[o];let i;if(r=n,!An(n)&&(r=ce[(i=String(n)).toLowerCase()],r===void 0))throw new m(`Unknown adapter '${i}'`);if(r)break;s[i||"#"+o]=r}if(!r){const o=Object.entries(s).map(([c,f])=>`adapter ${c} `+(f===!1?"is not supported by the environment":"is not available in the build"));let i=t?o.length>1?`since :
|
|
4
|
+
`+o.map(Ae).join(`
|
|
5
|
+
`):" "+Ae(o[0]):"as no adapter specified";throw new m("There is no suitable adapter to dispatch the request "+i,"ERR_NOT_SUPPORT")}return r},adapters:ce};function re(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new k(null,e)}function xe(e){return re(e),e.headers=A.from(e.headers),e.data=ne.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Xe.getAdapter(e.adapter||I.adapter)(e).then(function(r){return re(e),r.data=ne.call(e,e.transformResponse,r),r.headers=A.from(r.headers),r},function(r){return ze(r)||(re(e),r&&r.response&&(r.response.data=ne.call(e,e.transformResponse,r.response),r.response.headers=A.from(r.response.headers))),Promise.reject(r)})}const Ge="1.7.9",Y={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Y[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const Ce={};Y.transitional=function(t,n,r){function s(o,i){return"[Axios v"+Ge+"] Transitional option '"+o+"'"+i+(r?". "+r:"")}return(o,i,c)=>{if(t===!1)throw new m(s(i," has been removed"+(n?" in "+n:"")),m.ERR_DEPRECATED);return n&&!Ce[i]&&(Ce[i]=!0,console.warn(s(i," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(o,i,c):!0}};Y.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function xn(e,t,n){if(typeof e!="object")throw new m("options must be an object",m.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let s=r.length;for(;s-- >0;){const o=r[s],i=t[o];if(i){const c=e[o],f=c===void 0||i(c,o,e);if(f!==!0)throw new m("option "+o+" must be "+f,m.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new m("Unknown option "+o,m.ERR_BAD_OPTION)}}const J={assertOptions:xn,validators:Y},N=J.validators;let B=class{constructor(t){this.defaults=t,this.interceptors={request:new we,response:new we}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let s={};Error.captureStackTrace?Error.captureStackTrace(s):s=new Error;const o=s.stack?s.stack.replace(/^.+\n/,""):"";try{r.stack?o&&!String(r.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(r.stack+=`
|
|
6
|
+
`+o):r.stack=o}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=D(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:o}=n;r!==void 0&&J.assertOptions(r,{silentJSONParsing:N.transitional(N.boolean),forcedJSONParsing:N.transitional(N.boolean),clarifyTimeoutError:N.transitional(N.boolean)},!1),s!=null&&(a.isFunction(s)?n.paramsSerializer={serialize:s}:J.assertOptions(s,{encode:N.function,serialize:N.function},!0)),J.assertOptions(n,{baseUrl:N.spelling("baseURL"),withXsrfToken:N.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=o&&a.merge(o.common,o[n.method]);o&&a.forEach(["delete","get","head","post","put","patch","common"],p=>{delete o[p]}),n.headers=A.concat(i,o);const c=[];let f=!0;this.interceptors.request.forEach(function(y){typeof y.runWhen=="function"&&y.runWhen(n)===!1||(f=f&&y.synchronous,c.unshift(y.fulfilled,y.rejected))});const u=[];this.interceptors.response.forEach(function(y){u.push(y.fulfilled,y.rejected)});let l,d=0,b;if(!f){const p=[xe.bind(this),void 0];for(p.unshift.apply(p,c),p.push.apply(p,u),b=p.length,l=Promise.resolve(n);d<b;)l=l.then(p[d++],p[d++]);return l}b=c.length;let R=n;for(d=0;d<b;){const p=c[d++],y=c[d++];try{R=p(R)}catch(h){y.call(this,h);break}}try{l=xe.call(this,R)}catch(p){return Promise.reject(p)}for(d=0,b=u.length;d<b;)l=l.then(u[d++],u[d++]);return l}getUri(t){t=D(this.defaults,t);const n=Ve(t.baseURL,t.url);return Ie(n,t.params,t.paramsSerializer)}};a.forEach(["delete","get","head","options"],function(t){B.prototype[t]=function(n,r){return this.request(D(r||{},{method:t,url:n,data:(r||{}).data}))}});a.forEach(["post","put","patch"],function(t){function n(r){return function(o,i,c){return this.request(D(c||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:i}))}}B.prototype[t]=n(),B.prototype[t+"Form"]=n(!0)});let Cn=class Qe{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(o){n=o});const r=this;this.promise.then(s=>{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](s);r._listeners=null}),this.promise.then=s=>{let o;const i=new Promise(c=>{r.subscribe(c),o=c}).then(s);return i.cancel=function(){r.unsubscribe(o)},i},t(function(o,i,c){r.reason||(r.reason=new k(o,i,c),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new Qe(function(s){t=s}),cancel:t}}};function Nn(e){return function(n){return e.apply(null,n)}}function Pn(e){return a.isObject(e)&&e.isAxiosError===!0}const ue={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(ue).forEach(([e,t])=>{ue[t]=e});function Ze(e){const t=new B(e),n=Ne(B.prototype.request,t);return a.extend(n,B.prototype,t,{allOwnKeys:!0}),a.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return Ze(D(e,s))},n}const E=Ze(I);E.Axios=B;E.CanceledError=k;E.CancelToken=Cn;E.isCancel=ze;E.VERSION=Ge;E.toFormData=Q;E.AxiosError=m;E.Cancel=E.CanceledError;E.all=function(t){return Promise.all(t)};E.spread=Nn;E.isAxiosError=Pn;E.mergeConfig=D;E.AxiosHeaders=A;E.formToJSON=e=>$e(a.isHTMLForm(e)?new FormData(e):e);E.getAdapter=Xe.getAdapter;E.HttpStatusCode=ue;E.default=E;const{Axios:Ln,AxiosError:Bn,CanceledError:Dn,isCancel:Un,CancelToken:kn,VERSION:jn,all:qn,Cancel:Hn,isAxiosError:In,spread:Mn,toFormData:$n,AxiosHeaders:zn,HttpStatusCode:Jn,formToJSON:Vn,getAdapter:Wn,mergeConfig:Kn}=E;exports.axios=E;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";const Vr=globalThis||void 0||self;function Xr(c){return c&&c.__esModule&&Object.prototype.hasOwnProperty.call(c,"default")?c.default:c}var Er={exports:{}},g=Er.exports={},_,S;function er(){throw new Error("setTimeout has not been defined")}function nr(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?_=setTimeout:_=er}catch{_=er}try{typeof clearTimeout=="function"?S=clearTimeout:S=nr}catch{S=nr}})();function dr(c){if(_===setTimeout)return setTimeout(c,0);if((_===er||!_)&&setTimeout)return _=setTimeout,setTimeout(c,0);try{return _(c,0)}catch{try{return _.call(null,c,0)}catch{return _.call(this,c,0)}}}function Jr(c){if(S===clearTimeout)return clearTimeout(c);if((S===nr||!S)&&clearTimeout)return S=clearTimeout,clearTimeout(c);try{return S(c)}catch{try{return S.call(null,c)}catch{return S.call(this,c)}}}var M=[],q=!1,O,V=-1;function zr(){!q||!O||(q=!1,O.length?M=O.concat(M):V=-1,M.length&&mr())}function mr(){if(!q){var c=dr(zr);q=!0;for(var f=M.length;f;){for(O=M,M=[];++V<f;)O&&O[V].run();V=-1,f=M.length}O=null,q=!1,Jr(c)}}g.nextTick=function(c){var f=new Array(arguments.length-1);if(arguments.length>1)for(var l=1;l<arguments.length;l++)f[l-1]=arguments[l];M.push(new gr(c,f)),M.length===1&&!q&&dr(mr)};function gr(c,f){this.fun=c,this.array=f}gr.prototype.run=function(){this.fun.apply(null,this.array)};g.title="browser";g.browser=!0;g.env={};g.argv=[];g.version="";g.versions={};function D(){}g.on=D;g.addListener=D;g.once=D;g.off=D;g.removeListener=D;g.removeAllListeners=D;g.emit=D;g.prependListener=D;g.prependOnceListener=D;g.listeners=function(c){return[]};g.binding=function(c){throw new Error("process.binding is not supported")};g.cwd=function(){return"/"};g.chdir=function(c){throw new Error("process.chdir is not supported")};g.umask=function(){return 0};var Qr=Er.exports;const Kr=Xr(Qr);var Ir={},X={};X.byteLength=rt;X.toByteArray=et;X.fromByteArray=ot;var L=[],C=[],Zr=typeof Uint8Array<"u"?Uint8Array:Array,tr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var j=0,vr=tr.length;j<vr;++j)L[j]=tr[j],C[tr.charCodeAt(j)]=j;C[45]=62;C[95]=63;function Fr(c){var f=c.length;if(f%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var l=c.indexOf("=");l===-1&&(l=f);var x=l===f?0:4-l%4;return[l,x]}function rt(c){var f=Fr(c),l=f[0],x=f[1];return(l+x)*3/4-x}function tt(c,f,l){return(f+l)*3/4-l}function et(c){var f,l=Fr(c),x=l[0],w=l[1],p=new Zr(tt(c,x,w)),s=0,I=w>0?x-4:x,B;for(B=0;B<I;B+=4)f=C[c.charCodeAt(B)]<<18|C[c.charCodeAt(B+1)]<<12|C[c.charCodeAt(B+2)]<<6|C[c.charCodeAt(B+3)],p[s++]=f>>16&255,p[s++]=f>>8&255,p[s++]=f&255;return w===2&&(f=C[c.charCodeAt(B)]<<2|C[c.charCodeAt(B+1)]>>4,p[s++]=f&255),w===1&&(f=C[c.charCodeAt(B)]<<10|C[c.charCodeAt(B+1)]<<4|C[c.charCodeAt(B+2)]>>2,p[s++]=f>>8&255,p[s++]=f&255),p}function nt(c){return L[c>>18&63]+L[c>>12&63]+L[c>>6&63]+L[c&63]}function it(c,f,l){for(var x,w=[],p=f;p<l;p+=3)x=(c[p]<<16&16711680)+(c[p+1]<<8&65280)+(c[p+2]&255),w.push(nt(x));return w.join("")}function ot(c){for(var f,l=c.length,x=l%3,w=[],p=16383,s=0,I=l-x;s<I;s+=p)w.push(it(c,s,s+p>I?I:s+p));return x===1?(f=c[l-1],w.push(L[f>>2]+L[f<<4&63]+"==")):x===2&&(f=(c[l-2]<<8)+c[l-1],w.push(L[f>>10]+L[f>>4&63]+L[f<<2&63]+"=")),w.join("")}var ir={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */ir.read=function(c,f,l,x,w){var p,s,I=w*8-x-1,B=(1<<I)-1,T=B>>1,o=-7,A=l?w-1:0,N=l?-1:1,R=c[f+A];for(A+=N,p=R&(1<<-o)-1,R>>=-o,o+=I;o>0;p=p*256+c[f+A],A+=N,o-=8);for(s=p&(1<<-o)-1,p>>=-o,o+=x;o>0;s=s*256+c[f+A],A+=N,o-=8);if(p===0)p=1-T;else{if(p===B)return s?NaN:(R?-1:1)*(1/0);s=s+Math.pow(2,x),p=p-T}return(R?-1:1)*s*Math.pow(2,p-x)};ir.write=function(c,f,l,x,w,p){var s,I,B,T=p*8-w-1,o=(1<<T)-1,A=o>>1,N=w===23?Math.pow(2,-24)-Math.pow(2,-77):0,R=x?0:p-1,$=x?1:-1,J=f<0||f===0&&1/f<0?1:0;for(f=Math.abs(f),isNaN(f)||f===1/0?(I=isNaN(f)?1:0,s=o):(s=Math.floor(Math.log(f)/Math.LN2),f*(B=Math.pow(2,-s))<1&&(s--,B*=2),s+A>=1?f+=N/B:f+=N*Math.pow(2,1-A),f*B>=2&&(s++,B/=2),s+A>=o?(I=0,s=o):s+A>=1?(I=(f*B-1)*Math.pow(2,w),s=s+A):(I=f*Math.pow(2,A-1)*Math.pow(2,w),s=0));w>=8;c[l+R]=I&255,R+=$,I/=256,w-=8);for(s=s<<w|I,T+=w;T>0;c[l+R]=s&255,R+=$,s/=256,T-=8);c[l+R-$]|=J*128};/*!
|
|
2
|
+
* The buffer module from node.js, for the browser.
|
|
3
|
+
*
|
|
4
|
+
* @author Feross Aboukhadijeh <https://feross.org>
|
|
5
|
+
* @license MIT
|
|
6
|
+
*/(function(c){const f=X,l=ir,x=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;c.Buffer=o,c.SlowBuffer=Ur,c.INSPECT_MAX_BYTES=50;const w=2147483647;c.kMaxLength=w;const{Uint8Array:p,ArrayBuffer:s,SharedArrayBuffer:I}=globalThis;o.TYPED_ARRAY_SUPPORT=B(),!o.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function B(){try{const e=new p(1),r={foo:function(){return 42}};return Object.setPrototypeOf(r,p.prototype),Object.setPrototypeOf(e,r),e.foo()===42}catch{return!1}}Object.defineProperty(o.prototype,"parent",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.buffer}}),Object.defineProperty(o.prototype,"offset",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.byteOffset}});function T(e){if(e>w)throw new RangeError('The value "'+e+'" is invalid for option "size"');const r=new p(e);return Object.setPrototypeOf(r,o.prototype),r}function o(e,r,t){if(typeof e=="number"){if(typeof r=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return $(e)}return A(e,r,t)}o.poolSize=8192;function A(e,r,t){if(typeof e=="string")return J(e,r);if(s.isView(e))return Tr(e);if(e==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(b(e,s)||e&&b(e.buffer,s)||typeof I<"u"&&(b(e,I)||e&&b(e.buffer,I)))return Q(e,r,t);if(typeof e=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const n=e.valueOf&&e.valueOf();if(n!=null&&n!==e)return o.from(n,r,t);const i=Ar(e);if(i)return i;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]=="function")return o.from(e[Symbol.toPrimitive]("string"),r,t);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}o.from=function(e,r,t){return A(e,r,t)},Object.setPrototypeOf(o.prototype,p.prototype),Object.setPrototypeOf(o,p);function N(e){if(typeof e!="number")throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function R(e,r,t){return N(e),e<=0?T(e):r!==void 0?typeof t=="string"?T(e).fill(r,t):T(e).fill(r):T(e)}o.alloc=function(e,r,t){return R(e,r,t)};function $(e){return N(e),T(e<0?0:K(e)|0)}o.allocUnsafe=function(e){return $(e)},o.allocUnsafeSlow=function(e){return $(e)};function J(e,r){if((typeof r!="string"||r==="")&&(r="utf8"),!o.isEncoding(r))throw new TypeError("Unknown encoding: "+r);const t=or(e,r)|0;let n=T(t);const i=n.write(e,r);return i!==t&&(n=n.slice(0,i)),n}function z(e){const r=e.length<0?0:K(e.length)|0,t=T(r);for(let n=0;n<r;n+=1)t[n]=e[n]&255;return t}function Tr(e){if(b(e,p)){const r=new p(e);return Q(r.buffer,r.byteOffset,r.byteLength)}return z(e)}function Q(e,r,t){if(r<0||e.byteLength<r)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<r+(t||0))throw new RangeError('"length" is outside of buffer bounds');let n;return r===void 0&&t===void 0?n=new p(e):t===void 0?n=new p(e,r):n=new p(e,r,t),Object.setPrototypeOf(n,o.prototype),n}function Ar(e){if(o.isBuffer(e)){const r=K(e.length)|0,t=T(r);return t.length===0||e.copy(t,0,0,r),t}if(e.length!==void 0)return typeof e.length!="number"||rr(e.length)?T(0):z(e);if(e.type==="Buffer"&&Array.isArray(e.data))return z(e.data)}function K(e){if(e>=w)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+w.toString(16)+" bytes");return e|0}function Ur(e){return+e!=e&&(e=0),o.alloc(+e)}o.isBuffer=function(r){return r!=null&&r._isBuffer===!0&&r!==o.prototype},o.compare=function(r,t){if(b(r,p)&&(r=o.from(r,r.offset,r.byteLength)),b(t,p)&&(t=o.from(t,t.offset,t.byteLength)),!o.isBuffer(r)||!o.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(r===t)return 0;let n=r.length,i=t.length;for(let u=0,h=Math.min(n,i);u<h;++u)if(r[u]!==t[u]){n=r[u],i=t[u];break}return n<i?-1:i<n?1:0},o.isEncoding=function(r){switch(String(r).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},o.concat=function(r,t){if(!Array.isArray(r))throw new TypeError('"list" argument must be an Array of Buffers');if(r.length===0)return o.alloc(0);let n;if(t===void 0)for(t=0,n=0;n<r.length;++n)t+=r[n].length;const i=o.allocUnsafe(t);let u=0;for(n=0;n<r.length;++n){let h=r[n];if(b(h,p))u+h.length>i.length?(o.isBuffer(h)||(h=o.from(h)),h.copy(i,u)):p.prototype.set.call(i,h,u);else if(o.isBuffer(h))h.copy(i,u);else throw new TypeError('"list" argument must be an Array of Buffers');u+=h.length}return i};function or(e,r){if(o.isBuffer(e))return e.length;if(s.isView(e)||b(e,s))return e.byteLength;if(typeof e!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const t=e.length,n=arguments.length>2&&arguments[2]===!0;if(!n&&t===0)return 0;let i=!1;for(;;)switch(r){case"ascii":case"latin1":case"binary":return t;case"utf8":case"utf-8":return v(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return t*2;case"hex":return t>>>1;case"base64":return Br(e).length;default:if(i)return n?-1:v(e).length;r=(""+r).toLowerCase(),i=!0}}o.byteLength=or;function Rr(e,r,t){let n=!1;if((r===void 0||r<0)&&(r=0),r>this.length||((t===void 0||t>this.length)&&(t=this.length),t<=0)||(t>>>=0,r>>>=0,t<=r))return"";for(e||(e="utf8");;)switch(e){case"hex":return $r(this,r,t);case"utf8":case"utf-8":return cr(this,r,t);case"ascii":return Dr(this,r,t);case"latin1":case"binary":return kr(this,r,t);case"base64":return Nr(this,r,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Pr(this,r,t);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}o.prototype._isBuffer=!0;function P(e,r,t){const n=e[r];e[r]=e[t],e[t]=n}o.prototype.swap16=function(){const r=this.length;if(r%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<r;t+=2)P(this,t,t+1);return this},o.prototype.swap32=function(){const r=this.length;if(r%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<r;t+=4)P(this,t,t+3),P(this,t+1,t+2);return this},o.prototype.swap64=function(){const r=this.length;if(r%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<r;t+=8)P(this,t,t+7),P(this,t+1,t+6),P(this,t+2,t+5),P(this,t+3,t+4);return this},o.prototype.toString=function(){const r=this.length;return r===0?"":arguments.length===0?cr(this,0,r):Rr.apply(this,arguments)},o.prototype.toLocaleString=o.prototype.toString,o.prototype.equals=function(r){if(!o.isBuffer(r))throw new TypeError("Argument must be a Buffer");return this===r?!0:o.compare(this,r)===0},o.prototype.inspect=function(){let r="";const t=c.INSPECT_MAX_BYTES;return r=this.toString("hex",0,t).replace(/(.{2})/g,"$1 ").trim(),this.length>t&&(r+=" ... "),"<Buffer "+r+">"},x&&(o.prototype[x]=o.prototype.inspect),o.prototype.compare=function(r,t,n,i,u){if(b(r,p)&&(r=o.from(r,r.offset,r.byteLength)),!o.isBuffer(r))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof r);if(t===void 0&&(t=0),n===void 0&&(n=r?r.length:0),i===void 0&&(i=0),u===void 0&&(u=this.length),t<0||n>r.length||i<0||u>this.length)throw new RangeError("out of range index");if(i>=u&&t>=n)return 0;if(i>=u)return-1;if(t>=n)return 1;if(t>>>=0,n>>>=0,i>>>=0,u>>>=0,this===r)return 0;let h=u-i,a=n-t;const d=Math.min(h,a),E=this.slice(i,u),m=r.slice(t,n);for(let y=0;y<d;++y)if(E[y]!==m[y]){h=E[y],a=m[y];break}return h<a?-1:a<h?1:0};function ur(e,r,t,n,i){if(e.length===0)return-1;if(typeof t=="string"?(n=t,t=0):t>2147483647?t=2147483647:t<-2147483648&&(t=-2147483648),t=+t,rr(t)&&(t=i?0:e.length-1),t<0&&(t=e.length+t),t>=e.length){if(i)return-1;t=e.length-1}else if(t<0)if(i)t=0;else return-1;if(typeof r=="string"&&(r=o.from(r,n)),o.isBuffer(r))return r.length===0?-1:hr(e,r,t,n,i);if(typeof r=="number")return r=r&255,typeof p.prototype.indexOf=="function"?i?p.prototype.indexOf.call(e,r,t):p.prototype.lastIndexOf.call(e,r,t):hr(e,[r],t,n,i);throw new TypeError("val must be string, number or Buffer")}function hr(e,r,t,n,i){let u=1,h=e.length,a=r.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(e.length<2||r.length<2)return-1;u=2,h/=2,a/=2,t/=2}function d(m,y){return u===1?m[y]:m.readUInt16BE(y*u)}let E;if(i){let m=-1;for(E=t;E<h;E++)if(d(e,E)===d(r,m===-1?0:E-m)){if(m===-1&&(m=E),E-m+1===a)return m*u}else m!==-1&&(E-=E-m),m=-1}else for(t+a>h&&(t=h-a),E=t;E>=0;E--){let m=!0;for(let y=0;y<a;y++)if(d(e,E+y)!==d(r,y)){m=!1;break}if(m)return E}return-1}o.prototype.includes=function(r,t,n){return this.indexOf(r,t,n)!==-1},o.prototype.indexOf=function(r,t,n){return ur(this,r,t,n,!0)},o.prototype.lastIndexOf=function(r,t,n){return ur(this,r,t,n,!1)};function Cr(e,r,t,n){t=Number(t)||0;const i=e.length-t;n?(n=Number(n),n>i&&(n=i)):n=i;const u=r.length;n>u/2&&(n=u/2);let h;for(h=0;h<n;++h){const a=parseInt(r.substr(h*2,2),16);if(rr(a))return h;e[t+h]=a}return h}function br(e,r,t,n){return H(v(r,e.length-t),e,t,n)}function _r(e,r,t,n){return H(jr(r),e,t,n)}function Sr(e,r,t,n){return H(Br(r),e,t,n)}function Lr(e,r,t,n){return H(qr(r,e.length-t),e,t,n)}o.prototype.write=function(r,t,n,i){if(t===void 0)i="utf8",n=this.length,t=0;else if(n===void 0&&typeof t=="string")i=t,n=this.length,t=0;else if(isFinite(t))t=t>>>0,isFinite(n)?(n=n>>>0,i===void 0&&(i="utf8")):(i=n,n=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const u=this.length-t;if((n===void 0||n>u)&&(n=u),r.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");let h=!1;for(;;)switch(i){case"hex":return Cr(this,r,t,n);case"utf8":case"utf-8":return br(this,r,t,n);case"ascii":case"latin1":case"binary":return _r(this,r,t,n);case"base64":return Sr(this,r,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Lr(this,r,t,n);default:if(h)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),h=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Nr(e,r,t){return r===0&&t===e.length?f.fromByteArray(e):f.fromByteArray(e.slice(r,t))}function cr(e,r,t){t=Math.min(e.length,t);const n=[];let i=r;for(;i<t;){const u=e[i];let h=null,a=u>239?4:u>223?3:u>191?2:1;if(i+a<=t){let d,E,m,y;switch(a){case 1:u<128&&(h=u);break;case 2:d=e[i+1],(d&192)===128&&(y=(u&31)<<6|d&63,y>127&&(h=y));break;case 3:d=e[i+1],E=e[i+2],(d&192)===128&&(E&192)===128&&(y=(u&15)<<12|(d&63)<<6|E&63,y>2047&&(y<55296||y>57343)&&(h=y));break;case 4:d=e[i+1],E=e[i+2],m=e[i+3],(d&192)===128&&(E&192)===128&&(m&192)===128&&(y=(u&15)<<18|(d&63)<<12|(E&63)<<6|m&63,y>65535&&y<1114112&&(h=y))}}h===null?(h=65533,a=1):h>65535&&(h-=65536,n.push(h>>>10&1023|55296),h=56320|h&1023),n.push(h),i+=a}return Mr(n)}const fr=4096;function Mr(e){const r=e.length;if(r<=fr)return String.fromCharCode.apply(String,e);let t="",n=0;for(;n<r;)t+=String.fromCharCode.apply(String,e.slice(n,n+=fr));return t}function Dr(e,r,t){let n="";t=Math.min(e.length,t);for(let i=r;i<t;++i)n+=String.fromCharCode(e[i]&127);return n}function kr(e,r,t){let n="";t=Math.min(e.length,t);for(let i=r;i<t;++i)n+=String.fromCharCode(e[i]);return n}function $r(e,r,t){const n=e.length;(!r||r<0)&&(r=0),(!t||t<0||t>n)&&(t=n);let i="";for(let u=r;u<t;++u)i+=Wr[e[u]];return i}function Pr(e,r,t){const n=e.slice(r,t);let i="";for(let u=0;u<n.length-1;u+=2)i+=String.fromCharCode(n[u]+n[u+1]*256);return i}o.prototype.slice=function(r,t){const n=this.length;r=~~r,t=t===void 0?n:~~t,r<0?(r+=n,r<0&&(r=0)):r>n&&(r=n),t<0?(t+=n,t<0&&(t=0)):t>n&&(t=n),t<r&&(t=r);const i=this.subarray(r,t);return Object.setPrototypeOf(i,o.prototype),i};function F(e,r,t){if(e%1!==0||e<0)throw new RangeError("offset is not uint");if(e+r>t)throw new RangeError("Trying to access beyond buffer length")}o.prototype.readUintLE=o.prototype.readUIntLE=function(r,t,n){r=r>>>0,t=t>>>0,n||F(r,t,this.length);let i=this[r],u=1,h=0;for(;++h<t&&(u*=256);)i+=this[r+h]*u;return i},o.prototype.readUintBE=o.prototype.readUIntBE=function(r,t,n){r=r>>>0,t=t>>>0,n||F(r,t,this.length);let i=this[r+--t],u=1;for(;t>0&&(u*=256);)i+=this[r+--t]*u;return i},o.prototype.readUint8=o.prototype.readUInt8=function(r,t){return r=r>>>0,t||F(r,1,this.length),this[r]},o.prototype.readUint16LE=o.prototype.readUInt16LE=function(r,t){return r=r>>>0,t||F(r,2,this.length),this[r]|this[r+1]<<8},o.prototype.readUint16BE=o.prototype.readUInt16BE=function(r,t){return r=r>>>0,t||F(r,2,this.length),this[r]<<8|this[r+1]},o.prototype.readUint32LE=o.prototype.readUInt32LE=function(r,t){return r=r>>>0,t||F(r,4,this.length),(this[r]|this[r+1]<<8|this[r+2]<<16)+this[r+3]*16777216},o.prototype.readUint32BE=o.prototype.readUInt32BE=function(r,t){return r=r>>>0,t||F(r,4,this.length),this[r]*16777216+(this[r+1]<<16|this[r+2]<<8|this[r+3])},o.prototype.readBigUInt64LE=k(function(r){r=r>>>0,Y(r,"offset");const t=this[r],n=this[r+7];(t===void 0||n===void 0)&&W(r,this.length-8);const i=t+this[++r]*2**8+this[++r]*2**16+this[++r]*2**24,u=this[++r]+this[++r]*2**8+this[++r]*2**16+n*2**24;return BigInt(i)+(BigInt(u)<<BigInt(32))}),o.prototype.readBigUInt64BE=k(function(r){r=r>>>0,Y(r,"offset");const t=this[r],n=this[r+7];(t===void 0||n===void 0)&&W(r,this.length-8);const i=t*2**24+this[++r]*2**16+this[++r]*2**8+this[++r],u=this[++r]*2**24+this[++r]*2**16+this[++r]*2**8+n;return(BigInt(i)<<BigInt(32))+BigInt(u)}),o.prototype.readIntLE=function(r,t,n){r=r>>>0,t=t>>>0,n||F(r,t,this.length);let i=this[r],u=1,h=0;for(;++h<t&&(u*=256);)i+=this[r+h]*u;return u*=128,i>=u&&(i-=Math.pow(2,8*t)),i},o.prototype.readIntBE=function(r,t,n){r=r>>>0,t=t>>>0,n||F(r,t,this.length);let i=t,u=1,h=this[r+--i];for(;i>0&&(u*=256);)h+=this[r+--i]*u;return u*=128,h>=u&&(h-=Math.pow(2,8*t)),h},o.prototype.readInt8=function(r,t){return r=r>>>0,t||F(r,1,this.length),this[r]&128?(255-this[r]+1)*-1:this[r]},o.prototype.readInt16LE=function(r,t){r=r>>>0,t||F(r,2,this.length);const n=this[r]|this[r+1]<<8;return n&32768?n|4294901760:n},o.prototype.readInt16BE=function(r,t){r=r>>>0,t||F(r,2,this.length);const n=this[r+1]|this[r]<<8;return n&32768?n|4294901760:n},o.prototype.readInt32LE=function(r,t){return r=r>>>0,t||F(r,4,this.length),this[r]|this[r+1]<<8|this[r+2]<<16|this[r+3]<<24},o.prototype.readInt32BE=function(r,t){return r=r>>>0,t||F(r,4,this.length),this[r]<<24|this[r+1]<<16|this[r+2]<<8|this[r+3]},o.prototype.readBigInt64LE=k(function(r){r=r>>>0,Y(r,"offset");const t=this[r],n=this[r+7];(t===void 0||n===void 0)&&W(r,this.length-8);const i=this[r+4]+this[r+5]*2**8+this[r+6]*2**16+(n<<24);return(BigInt(i)<<BigInt(32))+BigInt(t+this[++r]*2**8+this[++r]*2**16+this[++r]*2**24)}),o.prototype.readBigInt64BE=k(function(r){r=r>>>0,Y(r,"offset");const t=this[r],n=this[r+7];(t===void 0||n===void 0)&&W(r,this.length-8);const i=(t<<24)+this[++r]*2**16+this[++r]*2**8+this[++r];return(BigInt(i)<<BigInt(32))+BigInt(this[++r]*2**24+this[++r]*2**16+this[++r]*2**8+n)}),o.prototype.readFloatLE=function(r,t){return r=r>>>0,t||F(r,4,this.length),l.read(this,r,!0,23,4)},o.prototype.readFloatBE=function(r,t){return r=r>>>0,t||F(r,4,this.length),l.read(this,r,!1,23,4)},o.prototype.readDoubleLE=function(r,t){return r=r>>>0,t||F(r,8,this.length),l.read(this,r,!0,52,8)},o.prototype.readDoubleBE=function(r,t){return r=r>>>0,t||F(r,8,this.length),l.read(this,r,!1,52,8)};function U(e,r,t,n,i,u){if(!o.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>i||r<u)throw new RangeError('"value" argument is out of bounds');if(t+n>e.length)throw new RangeError("Index out of range")}o.prototype.writeUintLE=o.prototype.writeUIntLE=function(r,t,n,i){if(r=+r,t=t>>>0,n=n>>>0,!i){const a=Math.pow(2,8*n)-1;U(this,r,t,n,a,0)}let u=1,h=0;for(this[t]=r&255;++h<n&&(u*=256);)this[t+h]=r/u&255;return t+n},o.prototype.writeUintBE=o.prototype.writeUIntBE=function(r,t,n,i){if(r=+r,t=t>>>0,n=n>>>0,!i){const a=Math.pow(2,8*n)-1;U(this,r,t,n,a,0)}let u=n-1,h=1;for(this[t+u]=r&255;--u>=0&&(h*=256);)this[t+u]=r/h&255;return t+n},o.prototype.writeUint8=o.prototype.writeUInt8=function(r,t,n){return r=+r,t=t>>>0,n||U(this,r,t,1,255,0),this[t]=r&255,t+1},o.prototype.writeUint16LE=o.prototype.writeUInt16LE=function(r,t,n){return r=+r,t=t>>>0,n||U(this,r,t,2,65535,0),this[t]=r&255,this[t+1]=r>>>8,t+2},o.prototype.writeUint16BE=o.prototype.writeUInt16BE=function(r,t,n){return r=+r,t=t>>>0,n||U(this,r,t,2,65535,0),this[t]=r>>>8,this[t+1]=r&255,t+2},o.prototype.writeUint32LE=o.prototype.writeUInt32LE=function(r,t,n){return r=+r,t=t>>>0,n||U(this,r,t,4,4294967295,0),this[t+3]=r>>>24,this[t+2]=r>>>16,this[t+1]=r>>>8,this[t]=r&255,t+4},o.prototype.writeUint32BE=o.prototype.writeUInt32BE=function(r,t,n){return r=+r,t=t>>>0,n||U(this,r,t,4,4294967295,0),this[t]=r>>>24,this[t+1]=r>>>16,this[t+2]=r>>>8,this[t+3]=r&255,t+4};function pr(e,r,t,n,i){xr(r,n,i,e,t,7);let u=Number(r&BigInt(4294967295));e[t++]=u,u=u>>8,e[t++]=u,u=u>>8,e[t++]=u,u=u>>8,e[t++]=u;let h=Number(r>>BigInt(32)&BigInt(4294967295));return e[t++]=h,h=h>>8,e[t++]=h,h=h>>8,e[t++]=h,h=h>>8,e[t++]=h,t}function sr(e,r,t,n,i){xr(r,n,i,e,t,7);let u=Number(r&BigInt(4294967295));e[t+7]=u,u=u>>8,e[t+6]=u,u=u>>8,e[t+5]=u,u=u>>8,e[t+4]=u;let h=Number(r>>BigInt(32)&BigInt(4294967295));return e[t+3]=h,h=h>>8,e[t+2]=h,h=h>>8,e[t+1]=h,h=h>>8,e[t]=h,t+8}o.prototype.writeBigUInt64LE=k(function(r,t=0){return pr(this,r,t,BigInt(0),BigInt("0xffffffffffffffff"))}),o.prototype.writeBigUInt64BE=k(function(r,t=0){return sr(this,r,t,BigInt(0),BigInt("0xffffffffffffffff"))}),o.prototype.writeIntLE=function(r,t,n,i){if(r=+r,t=t>>>0,!i){const d=Math.pow(2,8*n-1);U(this,r,t,n,d-1,-d)}let u=0,h=1,a=0;for(this[t]=r&255;++u<n&&(h*=256);)r<0&&a===0&&this[t+u-1]!==0&&(a=1),this[t+u]=(r/h>>0)-a&255;return t+n},o.prototype.writeIntBE=function(r,t,n,i){if(r=+r,t=t>>>0,!i){const d=Math.pow(2,8*n-1);U(this,r,t,n,d-1,-d)}let u=n-1,h=1,a=0;for(this[t+u]=r&255;--u>=0&&(h*=256);)r<0&&a===0&&this[t+u+1]!==0&&(a=1),this[t+u]=(r/h>>0)-a&255;return t+n},o.prototype.writeInt8=function(r,t,n){return r=+r,t=t>>>0,n||U(this,r,t,1,127,-128),r<0&&(r=255+r+1),this[t]=r&255,t+1},o.prototype.writeInt16LE=function(r,t,n){return r=+r,t=t>>>0,n||U(this,r,t,2,32767,-32768),this[t]=r&255,this[t+1]=r>>>8,t+2},o.prototype.writeInt16BE=function(r,t,n){return r=+r,t=t>>>0,n||U(this,r,t,2,32767,-32768),this[t]=r>>>8,this[t+1]=r&255,t+2},o.prototype.writeInt32LE=function(r,t,n){return r=+r,t=t>>>0,n||U(this,r,t,4,2147483647,-2147483648),this[t]=r&255,this[t+1]=r>>>8,this[t+2]=r>>>16,this[t+3]=r>>>24,t+4},o.prototype.writeInt32BE=function(r,t,n){return r=+r,t=t>>>0,n||U(this,r,t,4,2147483647,-2147483648),r<0&&(r=4294967295+r+1),this[t]=r>>>24,this[t+1]=r>>>16,this[t+2]=r>>>8,this[t+3]=r&255,t+4},o.prototype.writeBigInt64LE=k(function(r,t=0){return pr(this,r,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),o.prototype.writeBigInt64BE=k(function(r,t=0){return sr(this,r,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function lr(e,r,t,n,i,u){if(t+n>e.length)throw new RangeError("Index out of range");if(t<0)throw new RangeError("Index out of range")}function ar(e,r,t,n,i){return r=+r,t=t>>>0,i||lr(e,r,t,4),l.write(e,r,t,n,23,4),t+4}o.prototype.writeFloatLE=function(r,t,n){return ar(this,r,t,!0,n)},o.prototype.writeFloatBE=function(r,t,n){return ar(this,r,t,!1,n)};function wr(e,r,t,n,i){return r=+r,t=t>>>0,i||lr(e,r,t,8),l.write(e,r,t,n,52,8),t+8}o.prototype.writeDoubleLE=function(r,t,n){return wr(this,r,t,!0,n)},o.prototype.writeDoubleBE=function(r,t,n){return wr(this,r,t,!1,n)},o.prototype.copy=function(r,t,n,i){if(!o.isBuffer(r))throw new TypeError("argument should be a Buffer");if(n||(n=0),!i&&i!==0&&(i=this.length),t>=r.length&&(t=r.length),t||(t=0),i>0&&i<n&&(i=n),i===n||r.length===0||this.length===0)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),r.length-t<i-n&&(i=r.length-t+n);const u=i-n;return this===r&&typeof p.prototype.copyWithin=="function"?this.copyWithin(t,n,i):p.prototype.set.call(r,this.subarray(n,i),t),u},o.prototype.fill=function(r,t,n,i){if(typeof r=="string"){if(typeof t=="string"?(i=t,t=0,n=this.length):typeof n=="string"&&(i=n,n=this.length),i!==void 0&&typeof i!="string")throw new TypeError("encoding must be a string");if(typeof i=="string"&&!o.isEncoding(i))throw new TypeError("Unknown encoding: "+i);if(r.length===1){const h=r.charCodeAt(0);(i==="utf8"&&h<128||i==="latin1")&&(r=h)}}else typeof r=="number"?r=r&255:typeof r=="boolean"&&(r=Number(r));if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;t=t>>>0,n=n===void 0?this.length:n>>>0,r||(r=0);let u;if(typeof r=="number")for(u=t;u<n;++u)this[u]=r;else{const h=o.isBuffer(r)?r:o.from(r,i),a=h.length;if(a===0)throw new TypeError('The value "'+r+'" is invalid for argument "value"');for(u=0;u<n-t;++u)this[u+t]=h[u%a]}return this};const G={};function Z(e,r,t){G[e]=class extends t{constructor(){super(),Object.defineProperty(this,"message",{value:r.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(i){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:i,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}Z("ERR_BUFFER_OUT_OF_BOUNDS",function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),Z("ERR_INVALID_ARG_TYPE",function(e,r){return`The "${e}" argument must be of type number. Received type ${typeof r}`},TypeError),Z("ERR_OUT_OF_RANGE",function(e,r,t){let n=`The value of "${e}" is out of range.`,i=t;return Number.isInteger(t)&&Math.abs(t)>2**32?i=yr(String(t)):typeof t=="bigint"&&(i=String(t),(t>BigInt(2)**BigInt(32)||t<-(BigInt(2)**BigInt(32)))&&(i=yr(i)),i+="n"),n+=` It must be ${r}. Received ${i}`,n},RangeError);function yr(e){let r="",t=e.length;const n=e[0]==="-"?1:0;for(;t>=n+4;t-=3)r=`_${e.slice(t-3,t)}${r}`;return`${e.slice(0,t)}${r}`}function Or(e,r,t){Y(r,"offset"),(e[r]===void 0||e[r+t]===void 0)&&W(r,e.length-(t+1))}function xr(e,r,t,n,i,u){if(e>t||e<r){const h=typeof r=="bigint"?"n":"";let a;throw r===0||r===BigInt(0)?a=`>= 0${h} and < 2${h} ** ${(u+1)*8}${h}`:a=`>= -(2${h} ** ${(u+1)*8-1}${h}) and < 2 ** ${(u+1)*8-1}${h}`,new G.ERR_OUT_OF_RANGE("value",a,e)}Or(n,i,u)}function Y(e,r){if(typeof e!="number")throw new G.ERR_INVALID_ARG_TYPE(r,"number",e)}function W(e,r,t){throw Math.floor(e)!==e?(Y(e,t),new G.ERR_OUT_OF_RANGE("offset","an integer",e)):r<0?new G.ERR_BUFFER_OUT_OF_BOUNDS:new G.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${r}`,e)}const Gr=/[^+/0-9A-Za-z-_]/g;function Yr(e){if(e=e.split("=")[0],e=e.trim().replace(Gr,""),e.length<2)return"";for(;e.length%4!==0;)e=e+"=";return e}function v(e,r){r=r||1/0;let t;const n=e.length;let i=null;const u=[];for(let h=0;h<n;++h){if(t=e.charCodeAt(h),t>55295&&t<57344){if(!i){if(t>56319){(r-=3)>-1&&u.push(239,191,189);continue}else if(h+1===n){(r-=3)>-1&&u.push(239,191,189);continue}i=t;continue}if(t<56320){(r-=3)>-1&&u.push(239,191,189),i=t;continue}t=(i-55296<<10|t-56320)+65536}else i&&(r-=3)>-1&&u.push(239,191,189);if(i=null,t<128){if((r-=1)<0)break;u.push(t)}else if(t<2048){if((r-=2)<0)break;u.push(t>>6|192,t&63|128)}else if(t<65536){if((r-=3)<0)break;u.push(t>>12|224,t>>6&63|128,t&63|128)}else if(t<1114112){if((r-=4)<0)break;u.push(t>>18|240,t>>12&63|128,t>>6&63|128,t&63|128)}else throw new Error("Invalid code point")}return u}function jr(e){const r=[];for(let t=0;t<e.length;++t)r.push(e.charCodeAt(t)&255);return r}function qr(e,r){let t,n,i;const u=[];for(let h=0;h<e.length&&!((r-=2)<0);++h)t=e.charCodeAt(h),n=t>>8,i=t%256,u.push(i),u.push(n);return u}function Br(e){return f.toByteArray(Yr(e))}function H(e,r,t,n){let i;for(i=0;i<n&&!(i+t>=r.length||i>=e.length);++i)r[i+t]=e[i];return i}function b(e,r){return e instanceof r||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===r.name}function rr(e){return e!==e}const Wr=function(){const e="0123456789abcdef",r=new Array(256);for(let t=0;t<16;++t){const n=t*16;for(let i=0;i<16;++i)r[n+i]=e[t]+e[i]}return r}();function k(e){return typeof BigInt>"u"?Hr:e}function Hr(){throw new Error("BigInt not supported")}})(Ir);const ut=Ir.Buffer;exports.Buffer=ut;exports.global=Vr;exports.process$1=Kr;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const y=require("./web-client/graph/generated.cjs"),b=require("./toString-hHr716Th.cjs"),o=require("./functions-ikwhAVhP.cjs"),N=({axiosClient:e,config:n})=>{const l=y.UserApiFactory(n,n.basePath,e),c=y.UsersApiFactory(n,n.basePath,e),i=y.MeUserApiFactory(n,n.basePath,e),r=y.MeChangepasswordApiFactory(n,n.basePath,e),t=y.UserAppRoleAssignmentApiFactory(n,n.basePath,e);return{async getUser(a,s,u){const{data:d}=await l.getUser(a,s!=null&&s.select?new Set([...s.select]):null,s!=null&&s.expand?new Set([...s.expand]):new Set(["drive","memberOf","appRoleAssignments"]),u);return d},async createUser(a,s){const{data:u}=await c.createUser(a,s);return u},async editUser(a,s,u){const{data:d}=await l.updateUser(a,s,u);return d},async deleteUser(a,s,u){await l.deleteUser(a,s,u)},async listUsers(a,s){const{data:{value:u}}=await c.listUsers(a==null?void 0:a.search,a==null?void 0:a.filter,a!=null&&a.orderBy?new Set([...a.orderBy]):null,a!=null&&a.select?new Set([...a.select]):null,a!=null&&a.expand?new Set([...a.expand]):null,s);return u},async getMe(a,s){const{data:u}=await i.getOwnUser(a!=null&&a.expand?new Set([...a.expand]):new Set(["memberOf"]),s);return u},async editMe(a,s){const{data:u}=await i.updateOwnUser(a,s);return u},async changeOwnPassword(a,s){await r.changeOwnPassword(a,s)},async exportPersonalData(a,s,u){await l.exportPersonalData(a,s,u)},async createUserAppRoleAssignment(a,s,u){const{data:d}=await t.userCreateAppRoleAssignments(a,s,u);return d}}},E=({axiosClient:e,config:n})=>{const l=y.GroupApiFactory(n,n.basePath,e),c=y.GroupsApiFactory(n,n.basePath,e);return{async getGroup(i,r,t){const{data:a}=await l.getGroup(i,r!=null&&r.select?new Set([...r.select]):null,r!=null&&r.expand?new Set([...r.expand]):new Set(["members"]),t);return a},async createGroup(i,r){const{data:t}=await c.createGroup(i,r);return t},async editGroup(i,r,t){const{data:a}=await l.updateGroup(i,r,t);return a},async deleteGroup(i,r,t){await l.deleteGroup(i,r,t)},async listGroups(i,r){const{data:{value:t}}=await c.listGroups(i==null?void 0:i.search,i!=null&&i.orderBy?new Set([...i.orderBy]):null,i!=null&&i.select?new Set([...i.select]):null,i!=null&&i.expand?new Set([...i.expand]):null,r);return t},async addMember(i,r,t){await l.addMember(i,{"@odata.id":b.urlJoin(n.basePath,"v1.0","users",r)},t)},async deleteMember(i,r,t,a){await l.deleteMember(i,r,t,a)}}},L=({axiosClient:e,config:n})=>{const l=y.ApplicationsApiFactory(n,n.basePath,e);return{async getApplication(c,i){const{data:r}=await l.getApplication(c,i);return r},async listApplications(c){const{data:{value:i}}=await l.listApplications(c);return i||[]}}};function x(){}var P=b.getNative(b.root,"Set");function k(e){var n=-1,l=Array(e.size);return e.forEach(function(c){l[++n]=c}),l}var W=1/0,z=P&&1/k(new P([,-0]))[1]==W?function(e){return new P(e)}:x,j=200;function J(e,n,l){var c=-1,i=o.arrayIncludes,r=e.length,t=!0,a=[],s=a;if(r>=j){var u=z(e);if(u)return k(u);t=!1,i=o.cacheHas,s=new o.SetCache}else s=a;e:for(;++c<r;){var d=e[c],h=d;if(d=d!==0?d:0,t&&h===h){for(var m=s.length;m--;)if(s[m]===h)continue e;a.push(d)}else i(s,h,l)||(s!==a&&s.push(h),a.push(d))}return a}function _(e){return e&&e.length?J(e):[]}const U=e=>Object.hasOwn(e,"sharedWith"),O=e=>U(e)&&e.outgoing,H=e=>U(e)&&!e.outgoing,Y=e=>Object.hasOwn(e,"role"),Q=e=>!Object.hasOwn(e,"role"),M=({driveItem:e,graphRoles:n})=>{var l;return(l=e.remoteItem)==null?void 0:l.permissions.reduce((c,i)=>{var r;return(r=i.roles)==null||r.forEach(t=>{const a=n[t];a&&!c.some(({id:s})=>s===a.id)&&c.push(a)}),c},[])},G=({driveItem:e,shareRoles:n})=>{var c;if(!n.length){const i=(c=e.remoteItem)==null?void 0:c.permissions.reduce((r,t)=>{const a=t["@libre.graph.permissions.actions"];return a&&r.push(...a),r},[]);return[...new Set(i)]}const l=n.reduce((i,r)=>(r.rolePermissions.forEach(t=>{i.push(...t.allowedResourceActions)}),i),[]);return[...new Set(l)]};function Z({driveItem:e,graphRoles:n,serverUrl:l}){var m,p,R,w;const c=e.name||e.remoteItem.name,i=o.extractStorageId(e.remoteItem.id),r=e.remoteItem.permissions.map(S=>{const{grantedToV2:v}=S;return{...v.group||v.user,shareType:f(S)}}),t=e.remoteItem.permissions.reduce((S,v)=>{const F=v.invitation.invitedBy.user;return S.some(({id:B})=>B===F.id)||S.push(F),S},[]);let a=_(e.remoteItem.permissions.map(f));t.some(S=>S["@libre.graph.userType"]==="Federated")&&(a=[o.ShareTypes.remote.value]);const u=M({driveItem:e,graphRoles:n}),d=G({driveItem:e,shareRoles:u}),h={id:e.id,remoteItemId:e.remoteItem.id,driveId:(m=e.parentReference)==null?void 0:m.driveId,path:"/",name:c,fileId:e.remoteItem.id,size:e.size,storageId:i,parentFolderId:(p=e.parentReference)==null?void 0:p.id,sdate:e.remoteItem.permissions[0].createdDateTime,indicators:[],tags:[],webDavPath:o.buildWebDavSpacesPath(e.remoteItem.id,"/"),sharedBy:t,owner:(R=e.remoteItem.createdBy)==null?void 0:R.user,sharedWith:r,shareTypes:a,isFolder:!!e.folder,type:e.folder?"folder":"file",mimeType:((w=e.file)==null?void 0:w.mimeType)||"httpd/unix-directory",mdate:e.lastModifiedDateTime?new Date(e.lastModifiedDateTime).toUTCString():void 0,syncEnabled:e["@client.synchronize"],hidden:e["@UI.Hidden"],shareRoles:u,sharePermissions:d,outgoing:!1,privateLink:b.urlJoin(l,"f",e.remoteItem.id),canRename:()=>e["@client.synchronize"],canDownload:()=>d.includes(o.GraphSharePermission.readContent),canUpload:()=>d.includes(o.GraphSharePermission.createUpload),canCreate:()=>d.includes(o.GraphSharePermission.createChildren),canBeDeleted:()=>d.includes(o.GraphSharePermission.deleteStandard),canEditTags:()=>d.includes(o.GraphSharePermission.createChildren),isMounted:()=>!1,isReceivedShare:()=>!0,canShare:()=>!1,canDeny:()=>!1,getDomSelector:()=>o.extractDomSelector(e.id)};return h.extension=o.extractExtensionFromFile(h),h}function $({driveItem:e,user:n,serverUrl:l}){var t,a,s;const c=o.extractStorageId(e.id),i=b.urlJoin(e.parentReference.path,e.name),r={id:e.id,driveId:(t=e.parentReference)==null?void 0:t.driveId,path:i,name:e.name,fileId:e.id,size:e.size,storageId:c,parentFolderId:(a=e.parentReference)==null?void 0:a.id,sdate:e.permissions[0].createdDateTime,indicators:[],tags:[],webDavPath:o.buildWebDavSpacesPath(c,i),sharedBy:[{id:n.id,displayName:n.displayName}],owner:{id:n.id,displayName:n.displayName},sharedWith:e.permissions.map(u=>{if(u.link)return{id:u.id,displayName:u.link["@libre.graph.displayName"],shareType:o.ShareTypes.link.value};const d=f(u);return{...u.grantedToV2.user||u.grantedToV2.group,shareType:d}}),shareTypes:e.permissions.map(f),isFolder:!!e.folder,type:e.folder?"folder":"file",mimeType:((s=e.file)==null?void 0:s.mimeType)||"httpd/unix-directory",outgoing:!0,privateLink:b.urlJoin(l,"f",e.id),canRename:()=>!0,canDownload:()=>!0,canUpload:()=>!0,canCreate:()=>!0,canBeDeleted:()=>!0,canEditTags:()=>!0,isMounted:()=>!1,isReceivedShare:()=>!0,canShare:()=>!0,canDeny:()=>!0,getDomSelector:()=>o.extractDomSelector(e.id)};return r.extension=o.extractExtensionFromFile(r),r}function A({graphPermission:e,graphRoles:n,resourceId:l,indirect:c=!1}){var t,a,s;const i=n[(t=e.roles)==null?void 0:t[0]],r=(s=(a=e.invitation)==null?void 0:a.invitedBy)==null?void 0:s.user;return{id:e.id,resourceId:l,indirect:c,shareType:f(e),role:i,sharedBy:{id:r==null?void 0:r.id,displayName:r==null?void 0:r.displayName},sharedWith:e.grantedToV2.user||e.grantedToV2.group,permissions:e["@libre.graph.permissions.actions"]?e["@libre.graph.permissions.actions"]:i.rolePermissions.flatMap(u=>u.allowedResourceActions),createdDateTime:e.createdDateTime,expirationDateTime:e.expirationDateTime}}function g({graphPermission:e,resourceId:n,indirect:l=!1}){var i,r;const c=(r=(i=e.invitation)==null?void 0:i.invitedBy)==null?void 0:r.user;return{id:e.id,resourceId:n,indirect:l,shareType:o.ShareTypes.link.value,sharedBy:{id:c==null?void 0:c.id,displayName:c==null?void 0:c.displayName},hasPassword:e.hasPassword,createdDateTime:e.createdDateTime,expirationDateTime:e.expirationDateTime,displayName:e.link["@libre.graph.displayName"],isQuickLink:e.link["@libre.graph.quickLink"],type:e.link.type,webUrl:e.link.webUrl,preventsDownload:e.link.preventsDownload}}function f({link:e,grantedToV2:n}){var l;return e?o.ShareTypes.link.value:n!=null&&n.group?o.ShareTypes.group.value:((l=n==null?void 0:n.user)==null?void 0:l["@libre.graph.userType"])==="Federated"?o.ShareTypes.remote.value:o.ShareTypes.user.value}const D=e=>new URL(e.webUrl).origin,K={manager:"312c0871-5ef7-4b3a-85b6-0e4074c64049",editor:"58c63c02-1d89-4572-916a-870abc5a1b7d",viewer:"a8d5fe5e-96e3-418d-825b-534dbdf22b99"},T=e=>{var n,l;return(l=(n=e.root)==null?void 0:n.permissions)==null||l.forEach(c=>{var r;c.grantedToV2=c.grantedToV2||((r=c.grantedToIdentities)==null?void 0:r[0]),delete c.grantedToIdentities;const i=c.roles[0];i&&(c.roles[0]=K[i])}),e},V=({axiosClient:e,config:n})=>{const l=y.DrivesApiFactory(n,n.basePath,e),c=new y.MeDrivesApi(n,n.basePath,e),i=new y.DrivesGetDrivesApi(n,n.basePath,e);return{async getDrive(r,t,a){let{data:s}=await l.getDrive(r,a);return s=T(s),o.buildSpace({...s,serverUrl:D(s)},t)},async createDrive(r,t,a){let{data:s}=await l.createDrive(r,a);return s=T(s),o.buildSpace({...s,serverUrl:D(s)},t)},async updateDrive(r,t,a,s){let{data:u}=await l.updateDrive(r,t,s);return u=T(u),o.buildSpace({...u,serverUrl:D(u)},a)},async disableDrive(r,t,a){await l.deleteDrive(r,t,a)},async deleteDrive(r,t,a){await l.deleteDrive(r,t,{headers:{...(a==null?void 0:a.headers)&&a.headers||{},Purge:"T"},...a&&{requestOptions:a}||{}})},async listMyDrives(r,t,a){const{data:{value:s}}=await c.listMyDrivesBeta(t==null?void 0:t.orderBy,t==null?void 0:t.filter,a);return s.map(u=>o.buildSpace({...u,serverUrl:D(u)},r))},async listAllDrives(r,t,a){const{data:{value:s}}=await i.listAllDrivesBeta(t==null?void 0:t.orderBy,t==null?void 0:t.filter,a);return s.map(u=>o.buildSpace({...u,serverUrl:D(u)},r))}}},X=({axiosClient:e,config:n})=>{const l=y.DriveItemApiFactory(n,n.basePath,e),c=y.DrivesRootApiFactory(n,n.basePath,e),i=y.MeDriveApiFactory(n,n.basePath,e);return{async getDriveItem(r,t,a){const{data:s}=await l.getDriveItem(r,t,a);return s},async createDriveItem(r,t,a){const{data:s}=await c.createDriveItem(r,t,a);return s},async updateDriveItem(r,t,a,s){const{data:u}=await l.updateDriveItem(r,t,a,s);return u},async deleteDriveItem(r,t,a){await l.deleteDriveItem(r,t,a)},async listSharedByMe(r){const{data:t}=await i.listSharedByMe(r);return(t==null?void 0:t.value)||[]},async listSharedWithMe(r){const{data:t}=await i.listSharedWithMe(r);return(t==null?void 0:t.value)||[]}}},C=({axiosClient:e,config:n})=>{const l=y.TagsApiFactory(n,n.basePath,e);return{async listTags(c){const{data:{value:i}}=await l.getTags(c);return i||[]},async assignTags(c,i){await l.assignTags(c,i)},async unassignTags(c,i){await l.unassignTags(c,i)}}},q=({axiosClient:e,config:n})=>{const l=y.ActivitiesApiFactory(n,n.basePath,e);return{async listActivities(c,i){const{data:{value:r}}=await l.getActivities(c,i);return r||[]}}},I=({axiosClient:e,config:n})=>{const l=y.DrivesRootApiFactory(n,n.basePath,e),c=y.RoleManagementApiFactory(n,n.basePath,e),i=y.DrivesPermissionsApiFactory(n,n.basePath,e);return{async getPermission(r,t,a,s,u){const{data:d}=await i.getPermission(r,t,a,u);return d.link?g({graphPermission:d,resourceId:t}):A({graphPermission:d,resourceId:t,graphRoles:s||{}})},async listPermissions(r,t,a,s,u){let d;if(r===t){const{data:w}=await l.listPermissionsSpaceRoot(r,s==null?void 0:s.filter,s!=null&&s.select?new Set([...s.select]):null,u);d=w}else{const{data:w}=await i.listPermissions(r,t,s==null?void 0:s.filter,s!=null&&s.select?new Set([...s.select]):null,u);d=w}const h=d.value||[],m=d["@libre.graph.permissions.actions.allowedValues"],p=d["@libre.graph.permissions.roles.allowedValues"];return{shares:h.map(w=>w.link?g({graphPermission:w,resourceId:t}):A({graphPermission:w,resourceId:t,graphRoles:a||{}})),allowedActions:m,allowedRoles:p}},async updatePermission(r,t,a,s,u,d){let h;if(r===t){const{data:m}=await l.updatePermissionSpaceRoot(r,a,s,d);h=m}else{const{data:m}=await i.updatePermission(r,t,a,s,d);h=m}return h.link?g({graphPermission:h,resourceId:t}):A({graphPermission:h,resourceId:t,graphRoles:u||{}})},async deletePermission(r,t,a,s){if(r===t){await l.deletePermissionSpaceRoot(r,a,s);return}await i.deletePermission(r,t,a,s)},async createInvite(r,t,a,s,u){var h,m;let d;if(r===t){const{data:p}=await l.inviteSpaceRoot(r,a,u);d=(h=p.value)==null?void 0:h[0]}else{const{data:p}=await i.invite(r,t,a,u);d=(m=p.value)==null?void 0:m[0]}if(!d)throw new Error("no permission returned");return A({graphPermission:d,resourceId:t,graphRoles:s||{}})},async createLink(r,t,a,s){let u;if(r===t){const{data:d}=await l.createLinkSpaceRoot(r,a,s);u=d}else{const{data:d}=await i.createLink(r,t,a,s);u=d}return g({graphPermission:u,resourceId:t})},async setPermissionPassword(r,t,a,s,u){let d;if(r===t){const{data:h}=await l.setPermissionPasswordSpaceRoot(r,a,s,u);d=h}else{const{data:h}=await i.setPermissionPassword(r,t,a,s,u);d=h}return g({graphPermission:d,resourceId:t})},async listRoleDefinitions(r){const{data:t}=await c.listPermissionRoleDefinitions(r);return t}}},ee=(e,n)=>{const l=new URL(e);l.pathname=[...l.pathname.split("/"),"graph"].filter(Boolean).join("/");const c=new y.Configuration({basePath:l.href});return{activities:q({axiosClient:n,config:c}),applications:L({axiosClient:n,config:c}),tags:C({axiosClient:n,config:c}),drives:V({axiosClient:n,config:c}),driveItems:X({axiosClient:n,config:c}),users:N({axiosClient:n,config:c}),groups:E({axiosClient:n,config:c}),permissions:I({axiosClient:n,config:c})}};exports.buildCollaboratorShare=A;exports.buildIncomingShareResource=Z;exports.buildLinkShare=g;exports.buildOutgoingShareResource=$;exports.getShareResourcePermissions=G;exports.getShareResourceRoles=M;exports.graph=ee;exports.isCollaboratorShare=Y;exports.isIncomingShareResource=H;exports.isLinkShare=Q;exports.isOutgoingShareResource=O;exports.isShareResource=U;
|