From 3b88374ca575e1086052fb7fff9cc77080651a43 Mon Sep 17 00:00:00 2001 From: Dennis Sieben Date: Thu, 2 Feb 2023 19:33:57 +0100 Subject: [PATCH] - added fail if authentication fails --- run/share-upload-rename-default.js | 2 +- src/lib/api/share.ts | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/run/share-upload-rename-default.js b/run/share-upload-rename-default.js index e8aff25..2ca3256 100644 --- a/run/share-upload-rename-default.js +++ b/run/share-upload-rename-default.js @@ -1 +1 @@ -"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("k6/crypto"),t=require("k6/execution"),r=require("k6"),n=require("k6/http"),o=require("k6/encoding"),a=require("https://jslib.k6.io/url/1.0.0/index.js");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u=i(t),s=i(n),c=i(o);function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){for(var r=0;r9007199254740991)return[];var r=4294967295,n=Q(e,4294967295);t=O(t),e-=4294967295;for(var o=E(n,t);++r-1};var ue=function(e,t){var r=this.__data__,n=re(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this};function se(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t-1&&e%1==0&&e<=9007199254740991};var Nt=function(e){return null!=e&&wt(e.length)&&!ve(e)};var _t=function(e){return $(e)&&Nt(e)};var Et=function(){return!1},Tt=S((function(e,t){var r=t&&!t.nodeType&&t,n=r&&e&&!e.nodeType&&e,o=n&&n.exports===r?R.Buffer:void 0,a=(o?o.isBuffer:void 0)||Et;e.exports=a})),Ot=Function.prototype,xt=Object.prototype,Dt=Ot.toString,St=xt.hasOwnProperty,At=Dt.call(Object);var It=function(e){if(!$(e)||"[object Object]"!=z(e))return!1;var t=lt(e);if(null===t)return!0;var r=St.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&Dt.call(r)==At},Rt={};Rt["[object Float32Array]"]=Rt["[object Float64Array]"]=Rt["[object Int8Array]"]=Rt["[object Int16Array]"]=Rt["[object Int32Array]"]=Rt["[object Uint8Array]"]=Rt["[object Uint8ClampedArray]"]=Rt["[object Uint16Array]"]=Rt["[object Uint32Array]"]=!0,Rt["[object Arguments]"]=Rt["[object Array]"]=Rt["[object ArrayBuffer]"]=Rt["[object Boolean]"]=Rt["[object DataView]"]=Rt["[object Date]"]=Rt["[object Error]"]=Rt["[object Function]"]=Rt["[object Map]"]=Rt["[object Number]"]=Rt["[object Object]"]=Rt["[object RegExp]"]=Rt["[object Set]"]=Rt["[object String]"]=Rt["[object WeakMap]"]=!1;var Ct=function(e){return $(e)&&wt(e.length)&&!!Rt[z(e)]};var jt=function(e){return function(t){return e(t)}},kt=S((function(e,t){var r=t&&!t.nodeType&&t,n=r&&e&&!e.nodeType&&e,o=n&&n.exports===r&&A.process,a=function(){try{var e=n&&n.require&&n.require("util").types;return e||o&&o.binding&&o.binding("util")}catch(e){}}();e.exports=a})),Ut=kt&&kt.isTypedArray,Pt=Ut?jt(Ut):Ct;var Mt=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]},Lt=Object.prototype.hasOwnProperty;var qt=function(e,t,r){var n=e[t];Lt.call(e,t)&&te(n,r)&&(void 0!==r||t in e)||et(e,t,r)};var Ft=function(e,t,r,n){var o=!r;r||(r={});for(var a=-1,i=t.length;++a-1&&e%1==0&&e0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(rr);var ar=function(e,t){return or(er(e,t,T),e+"")};var ir=function(e,t,r){if(!x(r))return!1;var n=typeof t;return!!("number"==n?Nt(r)&&$t(t,r.length):"string"==n&&t in r)&&te(r[t],e)};var ur=function(e){return ar((function(t,r){var n=-1,o=r.length,a=o>1?r[o-1]:void 0,i=o>2?r[2]:void 0;for(a=e.length>3&&"function"==typeof a?(o--,a):void 0,i&&ir(r[0],r[1],i)&&(a=o<3?void 0:a,o=1),t=Object(t);++n2&&void 0!==arguments[2]?arguments[2]:{},o=n.selector,a=s.default.request("GET","".concat(this.baseURL,"/graph/v1.0/me/drives"),void 0,sr({},{credential:t}));r.check(a,{"user driveInfo":function(e){return 200===e.status}});var i=a.json(o);return i||e}}]),n}(),dr={entityMap:{lt:"<",gt:">",amp:"&",quot:'"',apos:"'",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",times:"×",divide:"÷",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",euro:"€",trade:"™",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦"}},hr=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,vr=new RegExp("[\\-\\.0-9"+hr.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),mr=new RegExp("^"+hr.source+vr.source+"*(?::"+hr.source+vr.source+"*)?$");function gr(){}function br(e,t){return t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber,t}function yr(e,t,r,n,o,a){for(var i,u=++t,s=0;;){var c=e.charAt(u);switch(c){case"=":if(1===s)i=e.slice(t,u),s=3;else{if(2!==s)throw new Error("attribute equal must after attrName");s=3}break;case"'":case'"':if(3===s||1===s){if(1===s&&(a.warning('attribute value must after "="'),i=e.slice(t,u)),t=u+1,!((u=e.indexOf(c,t))>0))throw new Error("attribute value no end '"+c+"' match");l=e.slice(t,u).replace(/&#?\w+;/g,o),r.add(i,l,t-1),s=5}else{if(4!=s)throw new Error('attribute value must after "="');l=e.slice(t,u).replace(/&#?\w+;/g,o),r.add(i,l,t),a.warning('attribute "'+i+'" missed start quot('+c+")!!"),t=u+1,s=5}break;case"/":switch(s){case 0:r.setTagName(e.slice(t,u));case 5:case 6:case 7:s=7,r.closed=!0;case 4:case 1:case 2:break;default:throw new Error("attribute invalid close char('/')")}break;case"":return a.error("unexpected end of input"),0==s&&r.setTagName(e.slice(t,u)),u;case">":switch(s){case 0:r.setTagName(e.slice(t,u));case 5:case 6:case 7:break;case 4:case 1:"/"===(l=e.slice(t,u)).slice(-1)&&(r.closed=!0,l=l.slice(0,-1));case 2:2===s&&(l=i),4==s?(a.warning('attribute "'+l+'" missed quot(")!!'),r.add(i,l.replace(/&#?\w+;/g,o),t)):("http://www.w3.org/1999/xhtml"===n[""]&&l.match(/^(?:disabled|checked|selected)$/i)||a.warning('attribute "'+l+'" missed value!! "'+l+'" instead!!'),r.add(l,l,t));break;case 3:throw new Error("attribute value missed!!")}return u;case"€":c=" ";default:if(c<=" ")switch(s){case 0:r.setTagName(e.slice(t,u)),s=6;break;case 1:i=e.slice(t,u),s=2;break;case 4:var l=e.slice(t,u).replace(/&#?\w+;/g,o);a.warning('attribute "'+l+'" missed quot(")!!'),r.add(i,l,t);case 5:s=6}else switch(s){case 2:r.tagName,"http://www.w3.org/1999/xhtml"===n[""]&&i.match(/^(?:disabled|checked|selected)$/i)||a.warning('attribute "'+i+'" missed value!! "'+i+'" instead2!!'),r.add(i,i,t),t=u,s=1;break;case 5:a.warning('attribute space is required"'+i+'"!!');case 6:s=1,t=u;break;case 3:s=4,t=u;break;case 7:throw new Error("elements closed character '/' and '>' must be connected to")}}u++}}function wr(e,t,r){for(var n=e.tagName,o=null,a=e.length;a--;){var i=e[a],u=i.qName,s=i.value;if((p=u.indexOf(":"))>0)var c=i.prefix=u.slice(0,p),l=u.slice(p+1),f="xmlns"===c&&l;else l=u,c=null,f="xmlns"===u&&"";i.localName=l,!1!==f&&(null==o&&(o={},Er(r,r={})),r[f]=o[f]=s,i.uri="http://www.w3.org/2000/xmlns/",t.startPrefixMapping(f,s))}for(a=e.length;a--;){(c=(i=e[a]).prefix)&&("xml"===c&&(i.uri="http://www.w3.org/XML/1998/namespace"),"xmlns"!==c&&(i.uri=r[c||""]))}var p;(p=n.indexOf(":"))>0?(c=e.prefix=n.slice(0,p),l=e.localName=n.slice(p+1)):(c=null,l=e.localName=n);var d=e.uri=r[c||""];if(t.startElement(d,l,n,e),!e.closed)return e.currentNSMap=r,e.localNSMap=o,!0;if(t.endElement(d,l,n),o)for(c in o)t.endPrefixMapping(c)}function Nr(e,t,r,n,o){if(/^(?:script|textarea)$/i.test(r)){var a=e.indexOf("",t),i=e.substring(t+1,a);if(/[&<]/.test(i))return/^script$/i.test(r)?(o.characters(i,0,i.length),a):(i=i.replace(/&#?\w+;/g,n),o.characters(i,0,i.length),a)}return t+1}function _r(e,t,r,n){var o=n[r];return null==o&&((o=e.lastIndexOf(""))t?(r.comment(e,t+4,o-t-4),o+3):(n.error("Unclosed comment"),-1):-1;default:if("CDATA["==e.substr(t+3,6)){var o=e.indexOf("]]>",t+9);return r.startCDATA(),r.characters(e,t+9,o-t-9),r.endCDATA(),o+3}var a=function(e,t){var r,n=[],o=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;o.lastIndex=t,o.exec(e);for(;r=o.exec(e);)if(n.push(r),r[1])return n}(e,t),i=a.length;if(i>1&&/!doctype/i.test(a[0][0])){var u=a[1][0],s=!1,c=!1;i>3&&(/^public$/i.test(a[2][0])?(s=a[3][0],c=i>4&&a[4][0]):/^system$/i.test(a[2][0])&&(c=a[3][0]));var l=a[i-1];return r.startDTD(u,s&&s.replace(/^(['"])(.*?)\1$/,"$2"),c&&c.replace(/^(['"])(.*?)\1$/,"$2")),r.endDTD(),l.index+l[0].length}}return-1}function Or(e,t,r){var n=e.indexOf("?>",t);if(n){var o=e.substring(t,n).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);return o?(o[0].length,r.processingInstruction(o[1],o[2]),n+2):-1}return-1}function xr(e){}gr.prototype={parse:function(e,t,r){var n=this.domBuilder;n.startDocument(),Er(t,t={}),function(e,t,r,n,o){function a(e){var t=e.slice(1,-1);return t in r?r[t]:"#"===t.charAt(0)?function(e){if(e>65535){var t=55296+((e-=65536)>>10),r=56320+(1023&e);return String.fromCharCode(t,r)}return String.fromCharCode(e)}(parseInt(t.substr(1).replace("x","0x"))):(o.error("entity not found:"+e),e)}function i(t){if(t>h){var r=e.substring(h,t).replace(/&#?\w+;/g,a);f&&u(h),n.characters(r,0,t-h),h=t}}function u(t,r){for(;t>=c&&(r=l.exec(e));)s=r.index,c=s+r[0].length,f.lineNumber++;f.columnNumber=t-s+1}var s=0,c=0,l=/.*(?:\r\n?|\n)|.*$/g,f=n.locator,p=[{currentNSMap:t}],d={},h=0;for(;;){try{var v=e.indexOf("<",h);if(v<0){if(!e.substr(h).match(/^\s*$/)){var m=n.doc,g=m.createTextNode(e.substr(h));m.appendChild(g),n.currentElement=g}return}switch(v>h&&i(v),e.charAt(v+1)){case"/":var b=e.indexOf(">",v+3),y=e.substring(v+2,b),w=p.pop();b<0?(y=e.substring(v+2).replace(/[\s<].*/,""),o.error("end tag name: "+y+" is not complete:"+w.tagName),b=v+1+y.length):y.match(/\sh?h=b:i(Math.max(v,h)+1)}}(e,t,r,n,this.errorHandler),n.endDocument()}},xr.prototype={setTagName:function(e){if(!mr.test(e))throw new Error("invalid tagName:"+e);this.tagName=e},add:function(e,t,r){if(!mr.test(e))throw new Error("invalid attribute:"+e);this[this.length++]={qName:e,value:t,offset:r}},length:0,getLocalName:function(e){return this[e].localName},getLocator:function(e){return this[e].locator},getQName:function(e){return this[e].qName},getURI:function(e){return this[e].uri},getValue:function(e){return this[e].value}};var Dr={XMLReader:gr};function Sr(e,t){for(var r in e)t[r]=e[r]}function Ar(e,t){var r=e.prototype;if(!(r instanceof t)){function n(){}n.prototype=t.prototype,Sr(r,n=new n),e.prototype=r=n}r.constructor!=e&&("function"!=typeof e&&console.error("unknow Class:"+e),r.constructor=e)}var Ir={},Rr=Ir.ELEMENT_NODE=1,Cr=Ir.ATTRIBUTE_NODE=2,jr=Ir.TEXT_NODE=3,kr=Ir.CDATA_SECTION_NODE=4,Ur=Ir.ENTITY_REFERENCE_NODE=5,Pr=Ir.ENTITY_NODE=6,Mr=Ir.PROCESSING_INSTRUCTION_NODE=7,Lr=Ir.COMMENT_NODE=8,qr=Ir.DOCUMENT_NODE=9,Fr=Ir.DOCUMENT_TYPE_NODE=10,zr=Ir.DOCUMENT_FRAGMENT_NODE=11,$r=Ir.NOTATION_NODE=12,Br={},Vr={};Br.INDEX_SIZE_ERR=(Vr[1]="Index size error",1),Br.DOMSTRING_SIZE_ERR=(Vr[2]="DOMString size error",2);var Wr=Br.HIERARCHY_REQUEST_ERR=(Vr[3]="Hierarchy request error",3);Br.WRONG_DOCUMENT_ERR=(Vr[4]="Wrong document",4),Br.INVALID_CHARACTER_ERR=(Vr[5]="Invalid character",5),Br.NO_DATA_ALLOWED_ERR=(Vr[6]="No data allowed",6),Br.NO_MODIFICATION_ALLOWED_ERR=(Vr[7]="No modification allowed",7);var Xr=Br.NOT_FOUND_ERR=(Vr[8]="Not found",8);Br.NOT_SUPPORTED_ERR=(Vr[9]="Not supported",9);var Hr=Br.INUSE_ATTRIBUTE_ERR=(Vr[10]="Attribute in use",10);function Yr(e,t){if(t instanceof Error)var r=t;else r=this,Error.call(this,Vr[e]),this.message=Vr[e],Error.captureStackTrace&&Error.captureStackTrace(this,Yr);return r.code=e,t&&(this.message=this.message+": "+t),r}function Gr(){}function Kr(e,t){this._node=e,this._refresh=t,Zr(this)}function Zr(e){var t=e._node._inc||e._node.ownerDocument._inc;if(e._inc!=t){var r=e._refresh(e._node);Sn(e,"length",r.length),Sr(r,e),e._inc=t}}function Qr(){}function Jr(e,t){for(var r=e.length;r--;)if(e[r]===t)return r}function en(e,t,r,n){if(n?t[Jr(t,n)]=r:t[t.length++]=r,e){r.ownerElement=e;var o=e.ownerDocument;o&&(n&&sn(o,e,n),function(e,t,r){e&&e._inc++,"http://www.w3.org/2000/xmlns/"==r.namespaceURI&&(t._nsMap[r.prefix?r.localName:""]=r.value)}(o,e,r))}}function tn(e,t,r){var n=Jr(t,r);if(!(n>=0))throw Yr(Xr,new Error(e.tagName+"@"+r));for(var o=t.length-1;n"==e&&">")||"&"==e&&"&"||'"'==e&&"""||"&#"+e.charCodeAt()+";"}function an(e,t){if(t(e))return!0;if(e=e.firstChild)do{if(an(e,t))return!0}while(e=e.nextSibling)}function un(){}function sn(e,t,r,n){e&&e._inc++,"http://www.w3.org/2000/xmlns/"==r.namespaceURI&&delete t._nsMap[r.prefix?r.localName:""]}function cn(e,t,r){if(e&&e._inc){e._inc++;var n=t.childNodes;if(r)n[n.length++]=r;else{for(var o=t.firstChild,a=0;o;)n[a++]=o,o=o.nextSibling;n.length=a}}}function ln(e,t){var r=t.previousSibling,n=t.nextSibling;return r?r.nextSibling=n:e.firstChild=n,n?n.previousSibling=r:e.lastChild=r,cn(e.ownerDocument,e),t}function fn(e,t,r){var n=t.parentNode;if(n&&n.removeChild(t),t.nodeType===zr){var o=t.firstChild;if(null==o)return t;var a=t.lastChild}else o=a=t;var i=r?r.previousSibling:e.lastChild;o.previousSibling=i,a.nextSibling=r,i?i.nextSibling=o:e.firstChild=o,null==r?e.lastChild=a:r.previousSibling=a;do{o.parentNode=e}while(o!==a&&(o=o.nextSibling));return cn(e.ownerDocument||e,e),t.nodeType==zr&&(t.firstChild=t.lastChild=null),t}function pn(){this._nsMap={}}function dn(){}function hn(){}function vn(){}function mn(){}function gn(){}function bn(){}function yn(){}function wn(){}function Nn(){}function _n(){}function En(){}function Tn(){}function On(e,t){var r=[],n=9==this.nodeType&&this.documentElement||this,o=n.prefix,a=n.namespaceURI;if(a&&null==o&&null==(o=n.lookupPrefix(a)))var i=[{namespace:a,prefix:null}];return Dn(this,r,e,t,i),r.join("")}function xn(e,t,r){var n=e.prefix||"",o=e.namespaceURI;if(!n&&!o)return!1;if("xml"===n&&"http://www.w3.org/XML/1998/namespace"===o||"http://www.w3.org/2000/xmlns/"==o)return!1;for(var a=r.length;a--;){var i=r[a];if(i.prefix==n)return i.namespace!=o}return!0}function Dn(e,t,r,n,o){if(n){if(!(e=n(e)))return;if("string"==typeof e)return void t.push(e)}switch(e.nodeType){case Rr:o||(o=[]),o.length;var a=e.attributes,i=a.length,u=e.firstChild,s=e.tagName;r="http://www.w3.org/1999/xhtml"===e.namespaceURI||r,t.push("<",s);for(var c=0;c"),r&&/^script$/i.test(s))for(;u;)u.data?t.push(u.data):Dn(u,t,r,n,o),u=u.nextSibling;else for(;u;)Dn(u,t,r,n,o),u=u.nextSibling;t.push("")}else t.push("/>");return;case qr:case zr:for(u=e.firstChild;u;)Dn(u,t,r,n,o),u=u.nextSibling;return;case Cr:return t.push(" ",e.name,'="',e.value.replace(/[<&"]/g,on),'"');case jr:return t.push(e.data.replace(/[<&]/g,on));case kr:return t.push("");case Lr:return t.push("\x3c!--",e.data,"--\x3e");case Fr:var h=e.publicId,v=e.systemId;if(t.push("');else if(v&&"."!=v)t.push(' SYSTEM "',v,'">');else{var m=e.internalSubset;m&&t.push(" [",m,"]"),t.push(">")}return;case Mr:return t.push("");case Ur:return t.push("&",e.nodeName,";");default:t.push("??",e.nodeName)}}function Sn(e,t,r){e[t]=r}Br.INVALID_STATE_ERR=(Vr[11]="Invalid state",11),Br.SYNTAX_ERR=(Vr[12]="Syntax error",12),Br.INVALID_MODIFICATION_ERR=(Vr[13]="Invalid modification",13),Br.NAMESPACE_ERR=(Vr[14]="Invalid namespace",14),Br.INVALID_ACCESS_ERR=(Vr[15]="Invalid access",15),Yr.prototype=Error.prototype,Sr(Br,Yr),Gr.prototype={length:0,item:function(e){return this[e]||null},toString:function(e,t){for(var r=[],n=0;n0},lookupPrefix:function(e){for(var t=this;t;){var r=t._nsMap;if(r)for(var n in r)if(r[n]==e)return n;t=t.nodeType==Cr?t.ownerDocument:t.parentNode}return null},lookupNamespaceURI:function(e){for(var t=this;t;){var r=t._nsMap;if(r&&e in r)return r[e];t=t.nodeType==Cr?t.ownerDocument:t.parentNode}return null},isDefaultNamespace:function(e){return null==this.lookupPrefix(e)}},Sr(Ir,nn),Sr(Ir,nn.prototype),un.prototype={nodeName:"#document",nodeType:qr,doctype:null,documentElement:null,_inc:1,insertBefore:function(e,t){if(e.nodeType==zr){for(var r=e.firstChild;r;){var n=r.nextSibling;this.insertBefore(r,t),r=n}return e}return null==this.documentElement&&e.nodeType==Rr&&(this.documentElement=e),fn(this,e,t),e.ownerDocument=this,e},removeChild:function(e){return this.documentElement==e&&(this.documentElement=null),ln(this,e)},importNode:function(e,t){return function e(t,r,n){var o;switch(r.nodeType){case Rr:(o=r.cloneNode(!1)).ownerDocument=t;case zr:break;case Cr:n=!0}o||(o=r.cloneNode(!1));if(o.ownerDocument=t,o.parentNode=null,n)for(var a=r.firstChild;a;)o.appendChild(e(t,a,n)),a=a.nextSibling;return o}(this,e,t)},getElementById:function(e){var t=null;return an(this.documentElement,(function(r){if(r.nodeType==Rr&&r.getAttribute("id")==e)return t=r,!0})),t},getElementsByClassName:function(e){var t=new RegExp("(^|\\s)"+e+"(\\s|$)");return new Kr(this,(function(e){var r=[];return an(e.documentElement,(function(n){n!==e&&n.nodeType==Rr&&t.test(n.getAttribute("class"))&&r.push(n)})),r}))},createElement:function(e){var t=new pn;return t.ownerDocument=this,t.nodeName=e,t.tagName=e,t.childNodes=new Gr,(t.attributes=new Qr)._ownerElement=t,t},createDocumentFragment:function(){var e=new _n;return e.ownerDocument=this,e.childNodes=new Gr,e},createTextNode:function(e){var t=new vn;return t.ownerDocument=this,t.appendData(e),t},createComment:function(e){var t=new mn;return t.ownerDocument=this,t.appendData(e),t},createCDATASection:function(e){var t=new gn;return t.ownerDocument=this,t.appendData(e),t},createProcessingInstruction:function(e,t){var r=new En;return r.ownerDocument=this,r.tagName=r.target=e,r.nodeValue=r.data=t,r},createAttribute:function(e){var t=new dn;return t.ownerDocument=this,t.name=e,t.nodeName=e,t.localName=e,t.specified=!0,t},createEntityReference:function(e){var t=new Nn;return t.ownerDocument=this,t.nodeName=e,t},createElementNS:function(e,t){var r=new pn,n=t.split(":"),o=r.attributes=new Qr;return r.childNodes=new Gr,r.ownerDocument=this,r.nodeName=t,r.tagName=t,r.namespaceURI=e,2==n.length?(r.prefix=n[0],r.localName=n[1]):r.localName=t,o._ownerElement=r,r},createAttributeNS:function(e,t){var r=new dn,n=t.split(":");return r.ownerDocument=this,r.nodeName=t,r.name=t,r.namespaceURI=e,r.specified=!0,2==n.length?(r.prefix=n[0],r.localName=n[1]):r.localName=t,r}},Ar(un,nn),pn.prototype={nodeType:Rr,hasAttribute:function(e){return null!=this.getAttributeNode(e)},getAttribute:function(e){var t=this.getAttributeNode(e);return t&&t.value||""},getAttributeNode:function(e){return this.attributes.getNamedItem(e)},setAttribute:function(e,t){var r=this.ownerDocument.createAttribute(e);r.value=r.nodeValue=""+t,this.setAttributeNode(r)},removeAttribute:function(e){var t=this.getAttributeNode(e);t&&this.removeAttributeNode(t)},appendChild:function(e){return e.nodeType===zr?this.insertBefore(e,null):function(e,t){var r=t.parentNode;if(r){var n=e.lastChild;r.removeChild(t);n=e.lastChild}return n=e.lastChild,t.parentNode=e,t.previousSibling=n,t.nextSibling=null,n?n.nextSibling=t:e.firstChild=t,e.lastChild=t,cn(e.ownerDocument,e,t),t}(this,e)},setAttributeNode:function(e){return this.attributes.setNamedItem(e)},setAttributeNodeNS:function(e){return this.attributes.setNamedItemNS(e)},removeAttributeNode:function(e){return this.attributes.removeNamedItem(e.nodeName)},removeAttributeNS:function(e,t){var r=this.getAttributeNodeNS(e,t);r&&this.removeAttributeNode(r)},hasAttributeNS:function(e,t){return null!=this.getAttributeNodeNS(e,t)},getAttributeNS:function(e,t){var r=this.getAttributeNodeNS(e,t);return r&&r.value||""},setAttributeNS:function(e,t,r){var n=this.ownerDocument.createAttributeNS(e,t);n.value=n.nodeValue=""+r,this.setAttributeNode(n)},getAttributeNodeNS:function(e,t){return this.attributes.getNamedItemNS(e,t)},getElementsByTagName:function(e){return new Kr(this,(function(t){var r=[];return an(t,(function(n){n===t||n.nodeType!=Rr||"*"!==e&&n.tagName!=e||r.push(n)})),r}))},getElementsByTagNameNS:function(e,t){return new Kr(this,(function(r){var n=[];return an(r,(function(o){o===r||o.nodeType!==Rr||"*"!==e&&o.namespaceURI!==e||"*"!==t&&o.localName!=t||n.push(o)})),n}))}},un.prototype.getElementsByTagName=pn.prototype.getElementsByTagName,un.prototype.getElementsByTagNameNS=pn.prototype.getElementsByTagNameNS,Ar(pn,nn),dn.prototype.nodeType=Cr,Ar(dn,nn),hn.prototype={data:"",substringData:function(e,t){return this.data.substring(e,e+t)},appendData:function(e){e=this.data+e,this.nodeValue=this.data=e,this.length=e.length},insertData:function(e,t){this.replaceData(e,0,t)},appendChild:function(e){throw new Error(Vr[Wr])},deleteData:function(e,t){this.replaceData(e,t,"")},replaceData:function(e,t,r){r=this.data.substring(0,e)+r+this.data.substring(e+t),this.nodeValue=this.data=r,this.length=r.length}},Ar(hn,nn),vn.prototype={nodeName:"#text",nodeType:jr,splitText:function(e){var t=this.data,r=t.substring(e);t=t.substring(0,e),this.data=this.nodeValue=t,this.length=t.length;var n=this.ownerDocument.createTextNode(r);return this.parentNode&&this.parentNode.insertBefore(n,this.nextSibling),n}},Ar(vn,hn),mn.prototype={nodeName:"#comment",nodeType:Lr},Ar(mn,hn),gn.prototype={nodeName:"#cdata-section",nodeType:kr},Ar(gn,hn),bn.prototype.nodeType=Fr,Ar(bn,nn),yn.prototype.nodeType=$r,Ar(yn,nn),wn.prototype.nodeType=Pr,Ar(wn,nn),Nn.prototype.nodeType=Ur,Ar(Nn,nn),_n.prototype.nodeName="#document-fragment",_n.prototype.nodeType=zr,Ar(_n,nn),En.prototype.nodeType=Mr,Ar(En,nn),Tn.prototype.serializeToString=function(e,t,r){return On.call(e,t,r)},nn.prototype.toString=On;try{if(Object.defineProperty){Object.defineProperty(Kr.prototype,"length",{get:function(){return Zr(this),this.$$length}}),Object.defineProperty(nn.prototype,"textContent",{get:function(){return function e(t){switch(t.nodeType){case Rr:case zr:var r=[];for(t=t.firstChild;t;)7!==t.nodeType&&8!==t.nodeType&&r.push(e(t)),t=t.nextSibling;return r.join("");default:return t.nodeValue}}(this)},set:function(e){switch(this.nodeType){case Rr:case zr:for(;this.firstChild;)this.removeChild(this.firstChild);(e||String(e))&&this.appendChild(this.ownerDocument.createTextNode(e));break;default:this.data=e,this.value=e,this.nodeValue=e}}}),Sn=function(e,t,r){e["$$"+t]=r}}}catch(e){}var An={Node:nn,DOMImplementation:rn,XMLSerializer:Tn},In=S((function(e,t){function r(e){this.options=e||{locator:{}}}function n(){this.cdata=!1}function o(e,t){t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber}function a(e){if(e)return"\n@"+(e.systemId||"")+"#[line:"+e.lineNumber+",col:"+e.columnNumber+"]"}function i(e,t,r){return"string"==typeof e?e.substr(t,r):e.length>=t+r||t?new java.lang.String(e,t,r)+"":e}function u(e,t){e.currentElement?e.currentElement.appendChild(t):e.doc.appendChild(t)}r.prototype.parseFromString=function(e,t){var r=this.options,o=new s,i=r.domBuilder||new n,u=r.errorHandler,c=r.locator,l=r.xmlns||{},f=/\/x?html?$/.test(t),p=f?dr.entityMap:{lt:"<",gt:">",amp:"&",quot:'"',apos:"'"};return c&&i.setDocumentLocator(c),o.errorHandler=function(e,t,r){if(!e){if(t instanceof n)return t;e=t}var o={},i=e instanceof Function;function u(t){var n=e[t];!n&&i&&(n=2==e.length?function(r){e(t,r)}:e),o[t]=n&&function(e){n("[xmldom "+t+"]\t"+e+a(r))}||function(){}}return r=r||{},u("warning"),u("error"),u("fatalError"),o}(u,i,c),o.domBuilder=r.domBuilder||i,f&&(l[""]="http://www.w3.org/1999/xhtml"),l.xml=l.xml||"http://www.w3.org/XML/1998/namespace",e&&"string"==typeof e?o.parse(e,l,p):o.errorHandler.error("invalid doc source"),i.doc},n.prototype={startDocument:function(){this.doc=(new c).createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(e,t,r,n){var a=this.doc,i=a.createElementNS(e,r||t),s=n.length;u(this,i),this.currentElement=i,this.locator&&o(this.locator,i);for(var c=0;c0&&void 0!==arguments[0]?arguments[0]:{},t=e.length,r=void 0===t?10:t,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",o="",a=0;a3&&void 0!==arguments[3]?arguments[3]:{},a=o.permissions,i=void 0===a?"31":a,u=o.type,c=void 0===u?"0":u,l=s.default.request("POST","".concat(this.baseURL,"/ocs/v1.php/apps/files_sharing/api/v1/shares"),{shareType:c,shareWith:n,path:e,permissions:i},sr({headers:{"OCS-APIRequest":"true"}},{credential:t}));return r.check(l,{"share create":function(e){return 200===e.status}}),{id:jn(l.body).getElementsByTagName("id")[0].childNodes[0].textContent,response:l}}},{key:"accept",value:function(e,t){var n=s.default.request("POST","".concat(this.baseURL,"/ocs/v1.php/apps/files_sharing/api/v1/shares/pending/").concat(e),void 0,sr({headers:{"OCS-APIRequest":"true"}},{credential:t}));return r.check(n,{"share accept":function(e){return 200===e.status}}),{response:n}}}]),e}(),Un="openIDConnect",Pn="basicAuth",Mn=new WeakMap,Ln=function(){function e(t){l(this,e),Mn.set(this,{writable:!0,value:void 0}),_(this,Mn,t)}return p(e,[{key:"credential",get:function(){return N(this,Mn)}}]),e}(),qn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Fn=/^\w*$/;var zn=function(e,t){if(yt(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!B(e))||(Fn.test(e)||!qn.test(e)||null!=t&&e in Object(t))};function $n(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],a=r.cache;if(a.has(o))return a.get(o);var i=e.apply(this,n);return r.cache=a.set(o,i)||a,i};return r.cache=new($n.Cache||Ge),r}$n.Cache=Ge;var Bn=$n;var Vn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Wn=/\\(\\)?/g,Xn=function(e){var t=Bn(e,(function(e){return 500===r.size&&r.clear(),e})),r=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(Vn,(function(e,r,n,o){t.push(n?o.replace(Wn,"$1"):r||e)})),t}));var Hn=function(e,t){for(var r=-1,n=null==e?0:e.length,o=Array(n);++r9007199254740991)return[];var r=4294967295,n=Q(e,4294967295);t=O(t),e-=4294967295;for(var o=E(n,t);++r-1};var ue=function(e,t){var r=this.__data__,n=re(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this};function se(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t-1&&e%1==0&&e<=9007199254740991};var Nt=function(e){return null!=e&&wt(e.length)&&!ve(e)};var _t=function(e){return $(e)&&Nt(e)};var Et=function(){return!1},Tt=S((function(e,t){var r=t&&!t.nodeType&&t,n=r&&e&&!e.nodeType&&e,o=n&&n.exports===r?R.Buffer:void 0,a=(o?o.isBuffer:void 0)||Et;e.exports=a})),Ot=Function.prototype,xt=Object.prototype,Dt=Ot.toString,St=xt.hasOwnProperty,At=Dt.call(Object);var It=function(e){if(!$(e)||"[object Object]"!=z(e))return!1;var t=lt(e);if(null===t)return!0;var r=St.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&Dt.call(r)==At},Rt={};Rt["[object Float32Array]"]=Rt["[object Float64Array]"]=Rt["[object Int8Array]"]=Rt["[object Int16Array]"]=Rt["[object Int32Array]"]=Rt["[object Uint8Array]"]=Rt["[object Uint8ClampedArray]"]=Rt["[object Uint16Array]"]=Rt["[object Uint32Array]"]=!0,Rt["[object Arguments]"]=Rt["[object Array]"]=Rt["[object ArrayBuffer]"]=Rt["[object Boolean]"]=Rt["[object DataView]"]=Rt["[object Date]"]=Rt["[object Error]"]=Rt["[object Function]"]=Rt["[object Map]"]=Rt["[object Number]"]=Rt["[object Object]"]=Rt["[object RegExp]"]=Rt["[object Set]"]=Rt["[object String]"]=Rt["[object WeakMap]"]=!1;var Ct=function(e){return $(e)&&wt(e.length)&&!!Rt[z(e)]};var kt=function(e){return function(t){return e(t)}},jt=S((function(e,t){var r=t&&!t.nodeType&&t,n=r&&e&&!e.nodeType&&e,o=n&&n.exports===r&&A.process,a=function(){try{var e=n&&n.require&&n.require("util").types;return e||o&&o.binding&&o.binding("util")}catch(e){}}();e.exports=a})),Ut=jt&&jt.isTypedArray,Pt=Ut?kt(Ut):Ct;var Mt=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]},Lt=Object.prototype.hasOwnProperty;var qt=function(e,t,r){var n=e[t];Lt.call(e,t)&&te(n,r)&&(void 0!==r||t in e)||et(e,t,r)};var Ft=function(e,t,r,n){var o=!r;r||(r={});for(var a=-1,i=t.length;++a-1&&e%1==0&&e0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(rr);var ar=function(e,t){return or(er(e,t,T),e+"")};var ir=function(e,t,r){if(!x(r))return!1;var n=typeof t;return!!("number"==n?Nt(r)&&$t(t,r.length):"string"==n&&t in r)&&te(r[t],e)};var ur=function(e){return ar((function(t,r){var n=-1,o=r.length,a=o>1?r[o-1]:void 0,i=o>2?r[2]:void 0;for(a=e.length>3&&"function"==typeof a?(o--,a):void 0,i&&ir(r[0],r[1],i)&&(a=o<3?void 0:a,o=1),t=Object(t);++n2&&void 0!==arguments[2]?arguments[2]:{},o=n.selector,a=s.default.request("GET","".concat(this.baseURL,"/graph/v1.0/me/drives"),void 0,sr({},{credential:t}));r.check(a,{"user driveInfo":function(e){return 200===e.status}});var i=a.json(o);return i||e}}]),n}(),dr={entityMap:{lt:"<",gt:">",amp:"&",quot:'"',apos:"'",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",times:"×",divide:"÷",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",euro:"€",trade:"™",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦"}},hr=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,vr=new RegExp("[\\-\\.0-9"+hr.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),mr=new RegExp("^"+hr.source+vr.source+"*(?::"+hr.source+vr.source+"*)?$");function gr(){}function br(e,t){return t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber,t}function yr(e,t,r,n,o,a){for(var i,u=++t,s=0;;){var c=e.charAt(u);switch(c){case"=":if(1===s)i=e.slice(t,u),s=3;else{if(2!==s)throw new Error("attribute equal must after attrName");s=3}break;case"'":case'"':if(3===s||1===s){if(1===s&&(a.warning('attribute value must after "="'),i=e.slice(t,u)),t=u+1,!((u=e.indexOf(c,t))>0))throw new Error("attribute value no end '"+c+"' match");l=e.slice(t,u).replace(/&#?\w+;/g,o),r.add(i,l,t-1),s=5}else{if(4!=s)throw new Error('attribute value must after "="');l=e.slice(t,u).replace(/&#?\w+;/g,o),r.add(i,l,t),a.warning('attribute "'+i+'" missed start quot('+c+")!!"),t=u+1,s=5}break;case"/":switch(s){case 0:r.setTagName(e.slice(t,u));case 5:case 6:case 7:s=7,r.closed=!0;case 4:case 1:case 2:break;default:throw new Error("attribute invalid close char('/')")}break;case"":return a.error("unexpected end of input"),0==s&&r.setTagName(e.slice(t,u)),u;case">":switch(s){case 0:r.setTagName(e.slice(t,u));case 5:case 6:case 7:break;case 4:case 1:"/"===(l=e.slice(t,u)).slice(-1)&&(r.closed=!0,l=l.slice(0,-1));case 2:2===s&&(l=i),4==s?(a.warning('attribute "'+l+'" missed quot(")!!'),r.add(i,l.replace(/&#?\w+;/g,o),t)):("http://www.w3.org/1999/xhtml"===n[""]&&l.match(/^(?:disabled|checked|selected)$/i)||a.warning('attribute "'+l+'" missed value!! "'+l+'" instead!!'),r.add(l,l,t));break;case 3:throw new Error("attribute value missed!!")}return u;case"€":c=" ";default:if(c<=" ")switch(s){case 0:r.setTagName(e.slice(t,u)),s=6;break;case 1:i=e.slice(t,u),s=2;break;case 4:var l=e.slice(t,u).replace(/&#?\w+;/g,o);a.warning('attribute "'+l+'" missed quot(")!!'),r.add(i,l,t);case 5:s=6}else switch(s){case 2:r.tagName,"http://www.w3.org/1999/xhtml"===n[""]&&i.match(/^(?:disabled|checked|selected)$/i)||a.warning('attribute "'+i+'" missed value!! "'+i+'" instead2!!'),r.add(i,i,t),t=u,s=1;break;case 5:a.warning('attribute space is required"'+i+'"!!');case 6:s=1,t=u;break;case 3:s=4,t=u;break;case 7:throw new Error("elements closed character '/' and '>' must be connected to")}}u++}}function wr(e,t,r){for(var n=e.tagName,o=null,a=e.length;a--;){var i=e[a],u=i.qName,s=i.value;if((p=u.indexOf(":"))>0)var c=i.prefix=u.slice(0,p),l=u.slice(p+1),f="xmlns"===c&&l;else l=u,c=null,f="xmlns"===u&&"";i.localName=l,!1!==f&&(null==o&&(o={},Er(r,r={})),r[f]=o[f]=s,i.uri="http://www.w3.org/2000/xmlns/",t.startPrefixMapping(f,s))}for(a=e.length;a--;){(c=(i=e[a]).prefix)&&("xml"===c&&(i.uri="http://www.w3.org/XML/1998/namespace"),"xmlns"!==c&&(i.uri=r[c||""]))}var p;(p=n.indexOf(":"))>0?(c=e.prefix=n.slice(0,p),l=e.localName=n.slice(p+1)):(c=null,l=e.localName=n);var d=e.uri=r[c||""];if(t.startElement(d,l,n,e),!e.closed)return e.currentNSMap=r,e.localNSMap=o,!0;if(t.endElement(d,l,n),o)for(c in o)t.endPrefixMapping(c)}function Nr(e,t,r,n,o){if(/^(?:script|textarea)$/i.test(r)){var a=e.indexOf("",t),i=e.substring(t+1,a);if(/[&<]/.test(i))return/^script$/i.test(r)?(o.characters(i,0,i.length),a):(i=i.replace(/&#?\w+;/g,n),o.characters(i,0,i.length),a)}return t+1}function _r(e,t,r,n){var o=n[r];return null==o&&((o=e.lastIndexOf(""))t?(r.comment(e,t+4,o-t-4),o+3):(n.error("Unclosed comment"),-1):-1;default:if("CDATA["==e.substr(t+3,6)){var o=e.indexOf("]]>",t+9);return r.startCDATA(),r.characters(e,t+9,o-t-9),r.endCDATA(),o+3}var a=function(e,t){var r,n=[],o=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;o.lastIndex=t,o.exec(e);for(;r=o.exec(e);)if(n.push(r),r[1])return n}(e,t),i=a.length;if(i>1&&/!doctype/i.test(a[0][0])){var u=a[1][0],s=!1,c=!1;i>3&&(/^public$/i.test(a[2][0])?(s=a[3][0],c=i>4&&a[4][0]):/^system$/i.test(a[2][0])&&(c=a[3][0]));var l=a[i-1];return r.startDTD(u,s&&s.replace(/^(['"])(.*?)\1$/,"$2"),c&&c.replace(/^(['"])(.*?)\1$/,"$2")),r.endDTD(),l.index+l[0].length}}return-1}function Or(e,t,r){var n=e.indexOf("?>",t);if(n){var o=e.substring(t,n).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);return o?(o[0].length,r.processingInstruction(o[1],o[2]),n+2):-1}return-1}function xr(e){}gr.prototype={parse:function(e,t,r){var n=this.domBuilder;n.startDocument(),Er(t,t={}),function(e,t,r,n,o){function a(e){var t=e.slice(1,-1);return t in r?r[t]:"#"===t.charAt(0)?function(e){if(e>65535){var t=55296+((e-=65536)>>10),r=56320+(1023&e);return String.fromCharCode(t,r)}return String.fromCharCode(e)}(parseInt(t.substr(1).replace("x","0x"))):(o.error("entity not found:"+e),e)}function i(t){if(t>h){var r=e.substring(h,t).replace(/&#?\w+;/g,a);f&&u(h),n.characters(r,0,t-h),h=t}}function u(t,r){for(;t>=c&&(r=l.exec(e));)s=r.index,c=s+r[0].length,f.lineNumber++;f.columnNumber=t-s+1}var s=0,c=0,l=/.*(?:\r\n?|\n)|.*$/g,f=n.locator,p=[{currentNSMap:t}],d={},h=0;for(;;){try{var v=e.indexOf("<",h);if(v<0){if(!e.substr(h).match(/^\s*$/)){var m=n.doc,g=m.createTextNode(e.substr(h));m.appendChild(g),n.currentElement=g}return}switch(v>h&&i(v),e.charAt(v+1)){case"/":var b=e.indexOf(">",v+3),y=e.substring(v+2,b),w=p.pop();b<0?(y=e.substring(v+2).replace(/[\s<].*/,""),o.error("end tag name: "+y+" is not complete:"+w.tagName),b=v+1+y.length):y.match(/\sh?h=b:i(Math.max(v,h)+1)}}(e,t,r,n,this.errorHandler),n.endDocument()}},xr.prototype={setTagName:function(e){if(!mr.test(e))throw new Error("invalid tagName:"+e);this.tagName=e},add:function(e,t,r){if(!mr.test(e))throw new Error("invalid attribute:"+e);this[this.length++]={qName:e,value:t,offset:r}},length:0,getLocalName:function(e){return this[e].localName},getLocator:function(e){return this[e].locator},getQName:function(e){return this[e].qName},getURI:function(e){return this[e].uri},getValue:function(e){return this[e].value}};var Dr={XMLReader:gr};function Sr(e,t){for(var r in e)t[r]=e[r]}function Ar(e,t){var r=e.prototype;if(!(r instanceof t)){function n(){}n.prototype=t.prototype,Sr(r,n=new n),e.prototype=r=n}r.constructor!=e&&("function"!=typeof e&&console.error("unknow Class:"+e),r.constructor=e)}var Ir={},Rr=Ir.ELEMENT_NODE=1,Cr=Ir.ATTRIBUTE_NODE=2,kr=Ir.TEXT_NODE=3,jr=Ir.CDATA_SECTION_NODE=4,Ur=Ir.ENTITY_REFERENCE_NODE=5,Pr=Ir.ENTITY_NODE=6,Mr=Ir.PROCESSING_INSTRUCTION_NODE=7,Lr=Ir.COMMENT_NODE=8,qr=Ir.DOCUMENT_NODE=9,Fr=Ir.DOCUMENT_TYPE_NODE=10,zr=Ir.DOCUMENT_FRAGMENT_NODE=11,$r=Ir.NOTATION_NODE=12,Br={},Vr={};Br.INDEX_SIZE_ERR=(Vr[1]="Index size error",1),Br.DOMSTRING_SIZE_ERR=(Vr[2]="DOMString size error",2);var Wr=Br.HIERARCHY_REQUEST_ERR=(Vr[3]="Hierarchy request error",3);Br.WRONG_DOCUMENT_ERR=(Vr[4]="Wrong document",4),Br.INVALID_CHARACTER_ERR=(Vr[5]="Invalid character",5),Br.NO_DATA_ALLOWED_ERR=(Vr[6]="No data allowed",6),Br.NO_MODIFICATION_ALLOWED_ERR=(Vr[7]="No modification allowed",7);var Xr=Br.NOT_FOUND_ERR=(Vr[8]="Not found",8);Br.NOT_SUPPORTED_ERR=(Vr[9]="Not supported",9);var Hr=Br.INUSE_ATTRIBUTE_ERR=(Vr[10]="Attribute in use",10);function Yr(e,t){if(t instanceof Error)var r=t;else r=this,Error.call(this,Vr[e]),this.message=Vr[e],Error.captureStackTrace&&Error.captureStackTrace(this,Yr);return r.code=e,t&&(this.message=this.message+": "+t),r}function Gr(){}function Kr(e,t){this._node=e,this._refresh=t,Zr(this)}function Zr(e){var t=e._node._inc||e._node.ownerDocument._inc;if(e._inc!=t){var r=e._refresh(e._node);Sn(e,"length",r.length),Sr(r,e),e._inc=t}}function Qr(){}function Jr(e,t){for(var r=e.length;r--;)if(e[r]===t)return r}function en(e,t,r,n){if(n?t[Jr(t,n)]=r:t[t.length++]=r,e){r.ownerElement=e;var o=e.ownerDocument;o&&(n&&sn(o,e,n),function(e,t,r){e&&e._inc++,"http://www.w3.org/2000/xmlns/"==r.namespaceURI&&(t._nsMap[r.prefix?r.localName:""]=r.value)}(o,e,r))}}function tn(e,t,r){var n=Jr(t,r);if(!(n>=0))throw Yr(Xr,new Error(e.tagName+"@"+r));for(var o=t.length-1;n"==e&&">")||"&"==e&&"&"||'"'==e&&"""||"&#"+e.charCodeAt()+";"}function an(e,t){if(t(e))return!0;if(e=e.firstChild)do{if(an(e,t))return!0}while(e=e.nextSibling)}function un(){}function sn(e,t,r,n){e&&e._inc++,"http://www.w3.org/2000/xmlns/"==r.namespaceURI&&delete t._nsMap[r.prefix?r.localName:""]}function cn(e,t,r){if(e&&e._inc){e._inc++;var n=t.childNodes;if(r)n[n.length++]=r;else{for(var o=t.firstChild,a=0;o;)n[a++]=o,o=o.nextSibling;n.length=a}}}function ln(e,t){var r=t.previousSibling,n=t.nextSibling;return r?r.nextSibling=n:e.firstChild=n,n?n.previousSibling=r:e.lastChild=r,cn(e.ownerDocument,e),t}function fn(e,t,r){var n=t.parentNode;if(n&&n.removeChild(t),t.nodeType===zr){var o=t.firstChild;if(null==o)return t;var a=t.lastChild}else o=a=t;var i=r?r.previousSibling:e.lastChild;o.previousSibling=i,a.nextSibling=r,i?i.nextSibling=o:e.firstChild=o,null==r?e.lastChild=a:r.previousSibling=a;do{o.parentNode=e}while(o!==a&&(o=o.nextSibling));return cn(e.ownerDocument||e,e),t.nodeType==zr&&(t.firstChild=t.lastChild=null),t}function pn(){this._nsMap={}}function dn(){}function hn(){}function vn(){}function mn(){}function gn(){}function bn(){}function yn(){}function wn(){}function Nn(){}function _n(){}function En(){}function Tn(){}function On(e,t){var r=[],n=9==this.nodeType&&this.documentElement||this,o=n.prefix,a=n.namespaceURI;if(a&&null==o&&null==(o=n.lookupPrefix(a)))var i=[{namespace:a,prefix:null}];return Dn(this,r,e,t,i),r.join("")}function xn(e,t,r){var n=e.prefix||"",o=e.namespaceURI;if(!n&&!o)return!1;if("xml"===n&&"http://www.w3.org/XML/1998/namespace"===o||"http://www.w3.org/2000/xmlns/"==o)return!1;for(var a=r.length;a--;){var i=r[a];if(i.prefix==n)return i.namespace!=o}return!0}function Dn(e,t,r,n,o){if(n){if(!(e=n(e)))return;if("string"==typeof e)return void t.push(e)}switch(e.nodeType){case Rr:o||(o=[]),o.length;var a=e.attributes,i=a.length,u=e.firstChild,s=e.tagName;r="http://www.w3.org/1999/xhtml"===e.namespaceURI||r,t.push("<",s);for(var c=0;c"),r&&/^script$/i.test(s))for(;u;)u.data?t.push(u.data):Dn(u,t,r,n,o),u=u.nextSibling;else for(;u;)Dn(u,t,r,n,o),u=u.nextSibling;t.push("")}else t.push("/>");return;case qr:case zr:for(u=e.firstChild;u;)Dn(u,t,r,n,o),u=u.nextSibling;return;case Cr:return t.push(" ",e.name,'="',e.value.replace(/[<&"]/g,on),'"');case kr:return t.push(e.data.replace(/[<&]/g,on));case jr:return t.push("");case Lr:return t.push("\x3c!--",e.data,"--\x3e");case Fr:var h=e.publicId,v=e.systemId;if(t.push("');else if(v&&"."!=v)t.push(' SYSTEM "',v,'">');else{var m=e.internalSubset;m&&t.push(" [",m,"]"),t.push(">")}return;case Mr:return t.push("");case Ur:return t.push("&",e.nodeName,";");default:t.push("??",e.nodeName)}}function Sn(e,t,r){e[t]=r}Br.INVALID_STATE_ERR=(Vr[11]="Invalid state",11),Br.SYNTAX_ERR=(Vr[12]="Syntax error",12),Br.INVALID_MODIFICATION_ERR=(Vr[13]="Invalid modification",13),Br.NAMESPACE_ERR=(Vr[14]="Invalid namespace",14),Br.INVALID_ACCESS_ERR=(Vr[15]="Invalid access",15),Yr.prototype=Error.prototype,Sr(Br,Yr),Gr.prototype={length:0,item:function(e){return this[e]||null},toString:function(e,t){for(var r=[],n=0;n0},lookupPrefix:function(e){for(var t=this;t;){var r=t._nsMap;if(r)for(var n in r)if(r[n]==e)return n;t=t.nodeType==Cr?t.ownerDocument:t.parentNode}return null},lookupNamespaceURI:function(e){for(var t=this;t;){var r=t._nsMap;if(r&&e in r)return r[e];t=t.nodeType==Cr?t.ownerDocument:t.parentNode}return null},isDefaultNamespace:function(e){return null==this.lookupPrefix(e)}},Sr(Ir,nn),Sr(Ir,nn.prototype),un.prototype={nodeName:"#document",nodeType:qr,doctype:null,documentElement:null,_inc:1,insertBefore:function(e,t){if(e.nodeType==zr){for(var r=e.firstChild;r;){var n=r.nextSibling;this.insertBefore(r,t),r=n}return e}return null==this.documentElement&&e.nodeType==Rr&&(this.documentElement=e),fn(this,e,t),e.ownerDocument=this,e},removeChild:function(e){return this.documentElement==e&&(this.documentElement=null),ln(this,e)},importNode:function(e,t){return function e(t,r,n){var o;switch(r.nodeType){case Rr:(o=r.cloneNode(!1)).ownerDocument=t;case zr:break;case Cr:n=!0}o||(o=r.cloneNode(!1));if(o.ownerDocument=t,o.parentNode=null,n)for(var a=r.firstChild;a;)o.appendChild(e(t,a,n)),a=a.nextSibling;return o}(this,e,t)},getElementById:function(e){var t=null;return an(this.documentElement,(function(r){if(r.nodeType==Rr&&r.getAttribute("id")==e)return t=r,!0})),t},getElementsByClassName:function(e){var t=new RegExp("(^|\\s)"+e+"(\\s|$)");return new Kr(this,(function(e){var r=[];return an(e.documentElement,(function(n){n!==e&&n.nodeType==Rr&&t.test(n.getAttribute("class"))&&r.push(n)})),r}))},createElement:function(e){var t=new pn;return t.ownerDocument=this,t.nodeName=e,t.tagName=e,t.childNodes=new Gr,(t.attributes=new Qr)._ownerElement=t,t},createDocumentFragment:function(){var e=new _n;return e.ownerDocument=this,e.childNodes=new Gr,e},createTextNode:function(e){var t=new vn;return t.ownerDocument=this,t.appendData(e),t},createComment:function(e){var t=new mn;return t.ownerDocument=this,t.appendData(e),t},createCDATASection:function(e){var t=new gn;return t.ownerDocument=this,t.appendData(e),t},createProcessingInstruction:function(e,t){var r=new En;return r.ownerDocument=this,r.tagName=r.target=e,r.nodeValue=r.data=t,r},createAttribute:function(e){var t=new dn;return t.ownerDocument=this,t.name=e,t.nodeName=e,t.localName=e,t.specified=!0,t},createEntityReference:function(e){var t=new Nn;return t.ownerDocument=this,t.nodeName=e,t},createElementNS:function(e,t){var r=new pn,n=t.split(":"),o=r.attributes=new Qr;return r.childNodes=new Gr,r.ownerDocument=this,r.nodeName=t,r.tagName=t,r.namespaceURI=e,2==n.length?(r.prefix=n[0],r.localName=n[1]):r.localName=t,o._ownerElement=r,r},createAttributeNS:function(e,t){var r=new dn,n=t.split(":");return r.ownerDocument=this,r.nodeName=t,r.name=t,r.namespaceURI=e,r.specified=!0,2==n.length?(r.prefix=n[0],r.localName=n[1]):r.localName=t,r}},Ar(un,nn),pn.prototype={nodeType:Rr,hasAttribute:function(e){return null!=this.getAttributeNode(e)},getAttribute:function(e){var t=this.getAttributeNode(e);return t&&t.value||""},getAttributeNode:function(e){return this.attributes.getNamedItem(e)},setAttribute:function(e,t){var r=this.ownerDocument.createAttribute(e);r.value=r.nodeValue=""+t,this.setAttributeNode(r)},removeAttribute:function(e){var t=this.getAttributeNode(e);t&&this.removeAttributeNode(t)},appendChild:function(e){return e.nodeType===zr?this.insertBefore(e,null):function(e,t){var r=t.parentNode;if(r){var n=e.lastChild;r.removeChild(t);n=e.lastChild}return n=e.lastChild,t.parentNode=e,t.previousSibling=n,t.nextSibling=null,n?n.nextSibling=t:e.firstChild=t,e.lastChild=t,cn(e.ownerDocument,e,t),t}(this,e)},setAttributeNode:function(e){return this.attributes.setNamedItem(e)},setAttributeNodeNS:function(e){return this.attributes.setNamedItemNS(e)},removeAttributeNode:function(e){return this.attributes.removeNamedItem(e.nodeName)},removeAttributeNS:function(e,t){var r=this.getAttributeNodeNS(e,t);r&&this.removeAttributeNode(r)},hasAttributeNS:function(e,t){return null!=this.getAttributeNodeNS(e,t)},getAttributeNS:function(e,t){var r=this.getAttributeNodeNS(e,t);return r&&r.value||""},setAttributeNS:function(e,t,r){var n=this.ownerDocument.createAttributeNS(e,t);n.value=n.nodeValue=""+r,this.setAttributeNode(n)},getAttributeNodeNS:function(e,t){return this.attributes.getNamedItemNS(e,t)},getElementsByTagName:function(e){return new Kr(this,(function(t){var r=[];return an(t,(function(n){n===t||n.nodeType!=Rr||"*"!==e&&n.tagName!=e||r.push(n)})),r}))},getElementsByTagNameNS:function(e,t){return new Kr(this,(function(r){var n=[];return an(r,(function(o){o===r||o.nodeType!==Rr||"*"!==e&&o.namespaceURI!==e||"*"!==t&&o.localName!=t||n.push(o)})),n}))}},un.prototype.getElementsByTagName=pn.prototype.getElementsByTagName,un.prototype.getElementsByTagNameNS=pn.prototype.getElementsByTagNameNS,Ar(pn,nn),dn.prototype.nodeType=Cr,Ar(dn,nn),hn.prototype={data:"",substringData:function(e,t){return this.data.substring(e,e+t)},appendData:function(e){e=this.data+e,this.nodeValue=this.data=e,this.length=e.length},insertData:function(e,t){this.replaceData(e,0,t)},appendChild:function(e){throw new Error(Vr[Wr])},deleteData:function(e,t){this.replaceData(e,t,"")},replaceData:function(e,t,r){r=this.data.substring(0,e)+r+this.data.substring(e+t),this.nodeValue=this.data=r,this.length=r.length}},Ar(hn,nn),vn.prototype={nodeName:"#text",nodeType:kr,splitText:function(e){var t=this.data,r=t.substring(e);t=t.substring(0,e),this.data=this.nodeValue=t,this.length=t.length;var n=this.ownerDocument.createTextNode(r);return this.parentNode&&this.parentNode.insertBefore(n,this.nextSibling),n}},Ar(vn,hn),mn.prototype={nodeName:"#comment",nodeType:Lr},Ar(mn,hn),gn.prototype={nodeName:"#cdata-section",nodeType:jr},Ar(gn,hn),bn.prototype.nodeType=Fr,Ar(bn,nn),yn.prototype.nodeType=$r,Ar(yn,nn),wn.prototype.nodeType=Pr,Ar(wn,nn),Nn.prototype.nodeType=Ur,Ar(Nn,nn),_n.prototype.nodeName="#document-fragment",_n.prototype.nodeType=zr,Ar(_n,nn),En.prototype.nodeType=Mr,Ar(En,nn),Tn.prototype.serializeToString=function(e,t,r){return On.call(e,t,r)},nn.prototype.toString=On;try{if(Object.defineProperty){Object.defineProperty(Kr.prototype,"length",{get:function(){return Zr(this),this.$$length}}),Object.defineProperty(nn.prototype,"textContent",{get:function(){return function e(t){switch(t.nodeType){case Rr:case zr:var r=[];for(t=t.firstChild;t;)7!==t.nodeType&&8!==t.nodeType&&r.push(e(t)),t=t.nextSibling;return r.join("");default:return t.nodeValue}}(this)},set:function(e){switch(this.nodeType){case Rr:case zr:for(;this.firstChild;)this.removeChild(this.firstChild);(e||String(e))&&this.appendChild(this.ownerDocument.createTextNode(e));break;default:this.data=e,this.value=e,this.nodeValue=e}}}),Sn=function(e,t,r){e["$$"+t]=r}}}catch(e){}var An={Node:nn,DOMImplementation:rn,XMLSerializer:Tn},In=S((function(e,t){function r(e){this.options=e||{locator:{}}}function n(){this.cdata=!1}function o(e,t){t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber}function a(e){if(e)return"\n@"+(e.systemId||"")+"#[line:"+e.lineNumber+",col:"+e.columnNumber+"]"}function i(e,t,r){return"string"==typeof e?e.substr(t,r):e.length>=t+r||t?new java.lang.String(e,t,r)+"":e}function u(e,t){e.currentElement?e.currentElement.appendChild(t):e.doc.appendChild(t)}r.prototype.parseFromString=function(e,t){var r=this.options,o=new s,i=r.domBuilder||new n,u=r.errorHandler,c=r.locator,l=r.xmlns||{},f=/\/x?html?$/.test(t),p=f?dr.entityMap:{lt:"<",gt:">",amp:"&",quot:'"',apos:"'"};return c&&i.setDocumentLocator(c),o.errorHandler=function(e,t,r){if(!e){if(t instanceof n)return t;e=t}var o={},i=e instanceof Function;function u(t){var n=e[t];!n&&i&&(n=2==e.length?function(r){e(t,r)}:e),o[t]=n&&function(e){n("[xmldom "+t+"]\t"+e+a(r))}||function(){}}return r=r||{},u("warning"),u("error"),u("fatalError"),o}(u,i,c),o.domBuilder=r.domBuilder||i,f&&(l[""]="http://www.w3.org/1999/xhtml"),l.xml=l.xml||"http://www.w3.org/XML/1998/namespace",e&&"string"==typeof e?o.parse(e,l,p):o.errorHandler.error("invalid doc source"),i.doc},n.prototype={startDocument:function(){this.doc=(new c).createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(e,t,r,n){var a=this.doc,i=a.createElementNS(e,r||t),s=n.length;u(this,i),this.currentElement=i,this.locator&&o(this.locator,i);for(var c=0;c0&&void 0!==arguments[0]?arguments[0]:{},t=e.length,r=void 0===t?10:t,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",o="",a=0;a3&&void 0!==arguments[3]?arguments[3]:{},i=a.permissions,u=void 0===i?"31":i,c=a.type,l=void 0===c?"0":c,f=s.default.request("POST","".concat(this.baseURL,"/ocs/v1.php/apps/files_sharing/api/v1/shares"),{shareType:l,shareWith:n,path:e,permissions:u},sr({headers:{"OCS-APIRequest":"true"}},{credential:t}));return r.check(f,{"share create":function(e){return 200===e.status}}),r.check(f,{"share create":function(e){return 401===e.status}})&&r.fail("Authentication failed"),{id:null===(o=kn(f.body).getElementsByTagName("id")[0])||void 0===o?void 0:o.childNodes[0].textContent,response:f}}},{key:"accept",value:function(e,t){var n=s.default.request("POST","".concat(this.baseURL,"/ocs/v1.php/apps/files_sharing/api/v1/shares/pending/").concat(e),void 0,sr({headers:{"OCS-APIRequest":"true"}},{credential:t}));return r.check(n,{"share accept":function(e){return 200===e.status}}),{response:n}}}]),e}(),Un="openIDConnect",Pn="basicAuth",Mn=new WeakMap,Ln=function(){function e(t){l(this,e),Mn.set(this,{writable:!0,value:void 0}),_(this,Mn,t)}return p(e,[{key:"credential",get:function(){return N(this,Mn)}}]),e}(),qn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Fn=/^\w*$/;var zn=function(e,t){if(yt(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!B(e))||(Fn.test(e)||!qn.test(e)||null!=t&&e in Object(t))};function $n(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],a=r.cache;if(a.has(o))return a.get(o);var i=e.apply(this,n);return r.cache=a.set(o,i)||a,i};return r.cache=new($n.Cache||Ge),r}$n.Cache=Ge;var Bn=$n;var Vn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Wn=/\\(\\)?/g,Xn=function(e){var t=Bn(e,(function(e){return 500===r.size&&r.clear(),e})),r=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(Vn,(function(e,r,n,o){t.push(n?o.replace(Wn,"$1"):r||e)})),t}));var Hn=function(e,t){for(var r=-1,n=null==e?0:e.length,o=Array(n);++r status === 200, }); + if ( + check(createResponse, { + 'share create': ({ status }) => status === 401, + }) + ) { + fail('Authentication failed'); + }; return { - id: parseXML(createResponse.body).getElementsByTagName('id')[0].childNodes[0].textContent!, + id: parseXML(createResponse.body).getElementsByTagName('id')[0]?.childNodes[0].textContent!, response: createResponse, }; }