(self.webpackChunknextcloud=self.webpackChunknextcloud||[]).push([[9701],{17816:function(e){e.exports=function(){"use strict";function e(){throw new Error("Dynamic requires are not currently supported by rollup-plugin-commonjs")}var t=function(e,t){return e(t={exports:{}},t.exports),t.exports}((function(t,r){var i;i=function(){return function t(r,i,n){function s(o,l){if(!i[o]){if(!r[o]){if(!l&&e)return e();if(a)return a(o,!0);var c=new Error("Cannot find module '"+o+"'");throw c.code="MODULE_NOT_FOUND",c}var h=i[o]={exports:{}};r[o][0].call(h.exports,(function(e){return s(r[o][1][e]||e)}),h,h.exports,t,r,i,n)}return i[o].exports}for(var a=e,o=0;o>>7-e%8&1)},put:function(e,t){for(var r=0;r>>t-r-1&1))},getLengthInBits:function(){return this.length},putBit:function(e){var t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}},t.exports=i},{}],5:[function(e,t,r){var i=e("../utils/buffer");function n(e){if(!e||e<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=i.alloc(e*e),this.reservedBit=i.alloc(e*e)}n.prototype.set=function(e,t,r,i){var n=e*this.size+t;this.data[n]=r,i&&(this.reservedBit[n]=!0)},n.prototype.get=function(e,t){return this.data[e*this.size+t]},n.prototype.xor=function(e,t,r){this.data[e*this.size+t]^=r},n.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]},t.exports=n},{"../utils/buffer":28}],6:[function(e,t,r){var i=e("../utils/buffer"),n=e("./mode");function s(e){this.mode=n.BYTE,this.data=i.from(e)}s.getBitsLength=function(e){return 8*e},s.prototype.getLength=function(){return this.data.length},s.prototype.getBitsLength=function(){return s.getBitsLength(this.data.length)},s.prototype.write=function(e){for(var t=0,r=this.data.length;t=0&&e.bit<4},r.from=function(e,t){if(r.isValid(e))return e;try{return function(e){if("string"!=typeof e)throw new Error("Param is not a string");switch(e.toLowerCase()){case"l":case"low":return r.L;case"m":case"medium":return r.M;case"q":case"quartile":return r.Q;case"h":case"high":return r.H;default:throw new Error("Unknown EC Level: "+e)}}(e)}catch(e){return t}}},{}],9:[function(e,t,r){var i=e("./utils").getSymbolSize;r.getPositions=function(e){var t=i(e);return[[0,0],[t-7,0],[0,t-7]]}},{"./utils":21}],10:[function(e,t,r){var i=e("./utils"),n=i.getBCHDigit(1335);r.getEncodedBits=function(e,t){for(var r=e.bit<<3|t,s=r<<10;i.getBCHDigit(s)-n>=0;)s^=1335<=33088&&r<=40956)r-=33088;else{if(!(r>=57408&&r<=60351))throw new Error("Invalid SJIS character: "+this.data[t]+"\nMake sure your charset is UTF-8");r-=49472}r=192*(r>>>8&255)+(255&r),e.put(r,13)}},t.exports=s},{"./mode":14,"./utils":21}],13:[function(e,t,r){r.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};var i=3,n=3,s=40,a=10;function o(e,t,i){switch(e){case r.Patterns.PATTERN000:return(t+i)%2==0;case r.Patterns.PATTERN001:return t%2==0;case r.Patterns.PATTERN010:return i%3==0;case r.Patterns.PATTERN011:return(t+i)%3==0;case r.Patterns.PATTERN100:return(Math.floor(t/2)+Math.floor(i/3))%2==0;case r.Patterns.PATTERN101:return t*i%2+t*i%3==0;case r.Patterns.PATTERN110:return(t*i%2+t*i%3)%2==0;case r.Patterns.PATTERN111:return(t*i%3+(t+i)%2)%2==0;default:throw new Error("bad maskPattern:"+e)}}r.isValid=function(e){return null!=e&&""!==e&&!isNaN(e)&&e>=0&&e<=7},r.from=function(e){return r.isValid(e)?parseInt(e,10):void 0},r.getPenaltyN1=function(e){for(var t=e.size,r=0,n=0,s=0,a=null,o=null,l=0;l=5&&(r+=i+(n-5)),a=h,n=1),(h=e.get(c,l))===o?s++:(s>=5&&(r+=i+(s-5)),o=h,s=1)}n>=5&&(r+=i+(n-5)),s>=5&&(r+=i+(s-5))}return r},r.getPenaltyN2=function(e){for(var t=e.size,r=0,i=0;i=10&&(1488===i||93===i)&&r++,n=n<<1&2047|e.get(o,a),o>=10&&(1488===n||93===n)&&r++}return r*s},r.getPenaltyN4=function(e){for(var t=0,r=e.data.length,i=0;i=1&&t<10?e.ccBits[0]:t<27?e.ccBits[1]:e.ccBits[2]},r.getBestModeForData=function(e){return n.testNumeric(e)?r.NUMERIC:n.testAlphanumeric(e)?r.ALPHANUMERIC:n.testKanji(e)?r.KANJI:r.BYTE},r.toString=function(e){if(e&&e.id)return e.id;throw new Error("Invalid mode")},r.isValid=function(e){return e&&e.bit&&e.ccBits},r.from=function(e,t){if(r.isValid(e))return e;try{return function(e){if("string"!=typeof e)throw new Error("Param is not a string");switch(e.toLowerCase()){case"numeric":return r.NUMERIC;case"alphanumeric":return r.ALPHANUMERIC;case"kanji":return r.KANJI;case"byte":return r.BYTE;default:throw new Error("Unknown mode: "+e)}}(e)}catch(e){return t}}},{"./regex":19,"./version-check":22}],15:[function(e,t,r){var i=e("./mode");function n(e){this.mode=i.NUMERIC,this.data=e.toString()}n.getBitsLength=function(e){return 10*Math.floor(e/3)+(e%3?e%3*3+1:0)},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(e){var t,r,i;for(t=0;t+3<=this.data.length;t+=3)r=this.data.substr(t,3),i=parseInt(r,10),e.put(i,10);var n=this.data.length-t;n>0&&(r=this.data.substr(t),i=parseInt(r,10),e.put(i,3*n+1))},t.exports=n},{"./mode":14}],16:[function(e,t,r){var i=e("../utils/buffer"),n=e("./galois-field");r.mul=function(e,t){for(var r=i.alloc(e.length+t.length-1),s=0;s=0;){for(var s=r[0],a=0;a>i&1),i<6?e.set(i,8,n,!0):i<8?e.set(i+1,8,n,!0):e.set(s-15+i,8,n,!0),i<8?e.set(8,s-i-1,n,!0):i<9?e.set(8,15-i-1+1,n,!0):e.set(8,15-i-1,n,!0);e.set(s-8,8,1,!0)}function v(e,t,r){var s=new a;r.forEach((function(t){s.put(t.mode.bit,4),s.put(t.getLength(),A.getCharCountIndicator(t.mode,e)),t.write(s)}));var o=8*(n.getSymbolTotalCodewords(e)-u.getTotalCodewordsCount(e,t));for(s.getLengthInBits()+4<=o&&s.put(0,4);s.getLengthInBits()%8!=0;)s.putBit(0);for(var l=(o-s.getLengthInBits())/8,c=0;c=0&&o<=6&&(0===l||6===l)||l>=0&&l<=6&&(0===o||6===o)||o>=2&&o<=4&&l>=2&&l<=4?e.set(s+o,a+l,!0,!0):e.set(s+o,a+l,!1,!0))}(C,t),function(e){for(var t=e.size,r=8;r=7&&function(e,t){for(var r,i,n,s=e.size,a=p.getEncodedBits(t),o=0;o<18;o++)r=Math.floor(o/3),i=o%3+s-8-3,n=1==(a>>o&1),e.set(r,i,n,!0),e.set(i,r,n,!0)}(C,t),function(e,t){for(var r=e.size,i=-1,n=r-1,s=7,a=0,o=r-1;o>0;o-=2)for(6===o&&o--;;){for(var l=0;l<2;l++)if(!e.isReserved(n,o-l)){var c=!1;a>>s&1)),e.set(n,o-l,c),-1==--s&&(a++,s=7)}if((n+=i)<0||r<=n){n-=i,i=-i;break}}}(C,f),isNaN(i)&&(i=h.getBestMask(C,y.bind(null,C,r))),h.applyMask(i,C),y(C,r,i),{modules:C,version:t,errorCorrectionLevel:r,maskPattern:i,segments:s}}r.create=function(e,t){if(void 0===e||""===e)throw new Error("No input text");var r,i,a=s.M;return void 0!==t&&(a=s.from(t.errorCorrectionLevel,s.M),r=p.from(t.version),i=h.from(t.maskPattern),t.toSJISFunc&&n.setToSJISFunction(t.toSJISFunc)),C(e,r,a,i)}},{"../utils/buffer":28,"./alignment-pattern":2,"./bit-buffer":4,"./bit-matrix":5,"./error-correction-code":7,"./error-correction-level":8,"./finder-pattern":9,"./format-info":10,"./mask-pattern":13,"./mode":14,"./reed-solomon-encoder":18,"./segments":20,"./utils":21,"./version":23,isarray:33}],18:[function(e,t,r){var i=e("../utils/buffer"),n=e("./polynomial"),s=e("buffer").Buffer;function a(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}a.prototype.initialize=function(e){this.degree=e,this.genPoly=n.generateECPolynomial(this.degree)},a.prototype.encode=function(e){if(!this.genPoly)throw new Error("Encoder not initialized");var t=i.alloc(this.degree),r=s.concat([e,t],e.length+this.degree),a=n.mod(r,this.genPoly),o=this.degree-a.length;if(o>0){var l=i.alloc(this.degree);return a.copy(l,o),l}return a},t.exports=a},{"../utils/buffer":28,"./polynomial":16,buffer:30}],19:[function(e,t,r){var i="[0-9]+",n="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+",s="(?:(?![A-Z0-9 $%*+\\-./:]|"+(n=n.replace(/u/g,"\\u"))+")(?:.|[\r\n]))+";r.KANJI=new RegExp(n,"g"),r.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),r.BYTE=new RegExp(s,"g"),r.NUMERIC=new RegExp(i,"g"),r.ALPHANUMERIC=new RegExp("[A-Z $%*+\\-./:]+","g");var a=new RegExp("^"+n+"$"),o=new RegExp("^"+i+"$"),l=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");r.testKanji=function(e){return a.test(e)},r.testNumeric=function(e){return o.test(e)},r.testAlphanumeric=function(e){return l.test(e)}},{}],20:[function(e,t,r){var i=e("./mode"),n=e("./numeric-data"),s=e("./alphanumeric-data"),a=e("./byte-data"),o=e("./kanji-data"),l=e("./regex"),c=e("./utils"),h=e("dijkstrajs");function u(e){return unescape(encodeURIComponent(e)).length}function d(e,t,r){for(var i,n=[];null!==(i=e.exec(r));)n.push({data:i[0],index:i.index,mode:t,length:i[0].length});return n}function p(e){var t,r,n=d(l.NUMERIC,i.NUMERIC,e),s=d(l.ALPHANUMERIC,i.ALPHANUMERIC,e);return c.isKanjiModeEnabled()?(t=d(l.BYTE,i.BYTE,e),r=d(l.KANJI,i.KANJI,e)):(t=d(l.BYTE_KANJI,i.BYTE,e),r=[]),n.concat(s,t,r).sort((function(e,t){return e.index-t.index})).map((function(e){return{data:e.data,mode:e.mode,length:e.length}}))}function f(e,t){switch(t){case i.NUMERIC:return n.getBitsLength(e);case i.ALPHANUMERIC:return s.getBitsLength(e);case i.KANJI:return o.getBitsLength(e);case i.BYTE:return a.getBitsLength(e)}}function A(e,t){var r,l=i.getBestModeForData(e);if((r=i.from(t,l))!==i.BYTE&&r.bit=0?e[e.length-1]:null;return r&&r.mode===t.mode?(e[e.length-1].data+=t.data,e):(e.push(t),e)}),[]))},r.rawSplit=function(e){return r.fromArray(p(e,c.isKanjiModeEnabled()))}},{"./alphanumeric-data":3,"./byte-data":6,"./kanji-data":12,"./mode":14,"./numeric-data":15,"./regex":19,"./utils":21,dijkstrajs:31}],21:[function(e,t,r){var i,n=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];r.getSymbolSize=function(e){if(!e)throw new Error('"version" cannot be null or undefined');if(e<1||e>40)throw new Error('"version" should be in range from 1 to 40');return 4*e+17},r.getSymbolTotalCodewords=function(e){return n[e]},r.getBCHDigit=function(e){for(var t=0;0!==e;)t++,e>>>=1;return t},r.setToSJISFunction=function(e){if("function"!=typeof e)throw new Error('"toSJISFunc" is not a valid function.');i=e},r.isKanjiModeEnabled=function(){return void 0!==i},r.toSJIS=function(e){return i(e)}},{}],22:[function(e,t,r){r.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40}},{}],23:[function(e,t,r){var i=e("./utils"),n=e("./error-correction-code"),s=e("./error-correction-level"),a=e("./mode"),o=e("./version-check"),l=e("isarray"),c=i.getBCHDigit(7973);function h(e,t){return a.getCharCountIndicator(e,t)+4}function u(e,t){var r=0;return e.forEach((function(e){var i=h(e.mode,t);r+=i+e.getBitsLength()})),r}r.from=function(e,t){return o.isValid(e)?parseInt(e,10):t},r.getCapacity=function(e,t,r){if(!o.isValid(e))throw new Error("Invalid QR Code version");void 0===r&&(r=a.BYTE);var s=8*(i.getSymbolTotalCodewords(e)-n.getTotalCodewordsCount(e,t));if(r===a.MIXED)return s;var l=s-h(r,e);switch(r){case a.NUMERIC:return Math.floor(l/10*3);case a.ALPHANUMERIC:return Math.floor(l/11*2);case a.KANJI:return Math.floor(l/13);case a.BYTE:default:return Math.floor(l/8)}},r.getBestVersionForData=function(e,t){var i,n=s.from(t,s.M);if(l(e)){if(e.length>1)return function(e,t){for(var i=1;i<=40;i++)if(u(e,i)<=r.getCapacity(i,t,a.MIXED))return i}(e,n);if(0===e.length)return 1;i=e[0]}else i=e;return function(e,t,i){for(var n=1;n<=40;n++)if(t<=r.getCapacity(n,i,e))return n}(i.mode,i.getLength(),n)},r.getEncodedBits=function(e){if(!o.isValid(e)||e<7)throw new Error("Invalid QR Code version");for(var t=e<<12;i.getBCHDigit(t)-c>=0;)t^=7973<':"",u="0&&c>0&&e[l-1]||(i+=a?s("M",c+r,.5+h+r):s("m",n,0),n=0,a=!1),c+1',d='viewBox="0 0 '+c+" "+c+'"',p=''+h+u+"\n";return"function"==typeof r&&r(null,p),p}},{"./utils":27}],27:[function(e,t,r){function i(e){if("number"==typeof e&&(e=e.toString()),"string"!=typeof e)throw new Error("Color should be defined as hex string");var t=e.slice().replace("#","").split("");if(t.length<3||5===t.length||t.length>8)throw new Error("Invalid hex color: "+e);3!==t.length&&4!==t.length||(t=Array.prototype.concat.apply([],t.map((function(e){return[e,e]})))),6===t.length&&t.push("F","F");var r=parseInt(t.join(""),16);return{r:r>>24&255,g:r>>16&255,b:r>>8&255,a:255&r,hex:"#"+t.slice(0,6).join("")}}r.getOptions=function(e){e||(e={}),e.color||(e.color={});var t=void 0===e.margin||null===e.margin||e.margin<0?4:e.margin,r=e.width&&e.width>=21?e.width:void 0,n=e.scale||4;return{width:r,scale:r?4:n,margin:t,color:{dark:i(e.color.dark||"#000000ff"),light:i(e.color.light||"#ffffffff")},type:e.type,rendererOpts:e.rendererOpts||{}}},r.getScale=function(e,t){return t.width&&t.width>=e+2*t.margin?t.width/(e+2*t.margin):t.scale},r.getImageWidth=function(e,t){var i=r.getScale(e,t);return Math.floor((e+2*t.margin)*i)},r.qrToImageData=function(e,t,i){for(var n=t.modules.size,s=t.modules.data,a=r.getScale(n,i),o=Math.floor((n+2*i.margin)*a),l=i.margin*a,c=[i.color.light,i.color.dark],h=0;h=l&&u>=l&&h=n)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+n.toString(16)+" bytes");return 0|e}function o(e,t){var r;return s.TYPED_ARRAY_SUPPORT?(r=new Uint8Array(t)).__proto__=s.prototype:(null===(r=e)&&(r=new s(t)),r.length=t),r}function l(e,t){var r=o(e,t<0?0:0|a(t));if(!s.TYPED_ARRAY_SUPPORT)for(var i=0;i55295&&r<57344){if(!n){if(r>56319){(t-=3)>-1&&s.push(239,191,189);continue}if(a+1===i){(t-=3)>-1&&s.push(239,191,189);continue}n=r;continue}if(r<56320){(t-=3)>-1&&s.push(239,191,189),n=r;continue}r=65536+(n-55296<<10|r-56320)}else n&&(t-=3)>-1&&s.push(239,191,189);if(n=null,r<128){if((t-=1)<0)break;s.push(r)}else if(r<2048){if((t-=2)<0)break;s.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;s.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;s.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return s}function u(e){return s.isBuffer(e)?e.length:"undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer)?e.byteLength:("string"!=typeof e&&(e=""+e),0===e.length?0:h(e).length)}s.TYPED_ARRAY_SUPPORT&&(s.prototype.__proto__=Uint8Array.prototype,s.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&s[Symbol.species]===s&&Object.defineProperty(s,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1})),s.prototype.write=function(e,t,r){void 0===t||void 0===r&&"string"==typeof t?(r=this.length,t=0):isFinite(t)&&(t|=0,isFinite(r)?r|=0:r=void 0);var i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");return function(e,t,r,i){return function(e,t,r,i){for(var n=0;n=t.length||n>=e.length);++n)t[n+r]=e[n];return n}(h(t,e.length-r),e,r,i)}(this,e,t,r)},s.prototype.slice=function(e,t){var r,i=this.length;if((e=~~e)<0?(e+=i)<0&&(e=0):e>i&&(e=i),(t=void 0===t?i:~~t)<0?(t+=i)<0&&(t=0):t>i&&(t=i),t=e.length&&(t=e.length),t||(t=0),i>0&&i=this.length)throw new RangeError("sourceStart out of bounds");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-t=0;--n)e[n+t]=this[n+r];else if(a<1e3||!s.TYPED_ARRAY_SUPPORT)for(n=0;n>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(n=t;n0?a-4:a;for(r=0;r>16&255,c[h++]=t>>8&255,c[h++]=255&t;return 2===o&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,c[h++]=255&t),1===o&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,c[h++]=t>>8&255,c[h++]=255&t),c},r.fromByteArray=function(e){for(var t,r=e.length,n=r%3,s=[],a=16383,o=0,l=r-n;ol?l:o+a));return 1===n?(t=e[r-1],s.push(i[t>>2]+i[t<<4&63]+"==")):2===n&&(t=(e[r-2]<<8)+e[r-1],s.push(i[t>>10]+i[t>>4&63]+i[t<<2&63]+"=")),s.join("")};for(var i=[],n=[],s="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0;o<64;++o)i[o]=a[o],n[a.charCodeAt(o)]=o;function l(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function c(e,t,r){for(var n,s=[],a=t;a>18&63]+i[o>>12&63]+i[o>>6&63]+i[63&o]);var o;return s.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},{}],30:[function(e,t,r){var i=e("base64-js"),n=e("ieee754"),s="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;r.Buffer=l,r.SlowBuffer=function(e){return+e!=e&&(e=0),l.alloc(+e)},r.INSPECT_MAX_BYTES=50;var a=2147483647;function o(e){if(e>a)throw new RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return Object.setPrototypeOf(t,l.prototype),t}function l(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return u(e)}return c(e,t,r)}function c(e,t,r){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!l.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var r=0|f(e,t),i=o(r),n=i.write(e,t);return n!==r&&(i=i.slice(0,n)),i}(e,t);if(ArrayBuffer.isView(e))return d(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(V(e,ArrayBuffer)||e&&V(e.buffer,ArrayBuffer))return function(e,t,r){if(t<0||e.byteLength=a)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return 0|e}function f(e,t){if(l.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||V(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var r=e.length,i=arguments.length>2&&!0===arguments[2];if(!i&&0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return U(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return F(e).length;default:if(n)return i?-1:U(e).length;t=(""+t).toLowerCase(),n=!0}}function A(e,t,r){var i=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return T(this,t,r);case"utf8":case"utf-8":return x(this,t,r);case"ascii":return k(this,t,r);case"latin1":case"binary":return D(this,t,r);case"base64":return S(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N(this,t,r);default:if(i)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),i=!0}}function g(e,t,r){var i=e[t];e[t]=e[r],e[r]=i}function m(e,t,r,i,n){if(0===e.length)return-1;if("string"==typeof r?(i=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),j(r=+r)&&(r=n?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(n)return-1;r=e.length-1}else if(r<0){if(!n)return-1;r=0}if("string"==typeof t&&(t=l.from(t,i)),l.isBuffer(t))return 0===t.length?-1:y(e,t,r,i,n);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?n?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):y(e,[t],r,i,n);throw new TypeError("val must be string, number or Buffer")}function y(e,t,r,i,n){var s,a=1,o=e.length,l=t.length;if(void 0!==i&&("ucs2"===(i=String(i).toLowerCase())||"ucs-2"===i||"utf16le"===i||"utf-16le"===i)){if(e.length<2||t.length<2)return-1;a=2,o/=2,l/=2,r/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(n){var h=-1;for(s=r;so&&(r=o-l),s=r;s>=0;s--){for(var u=!0,d=0;dn&&(i=n):i=n;var s=t.length;i>s/2&&(i=s/2);for(var a=0;a>8,n=r%256,s.push(n),s.push(i);return s}(t,e.length-r),e,r,i)}function S(e,t,r){return 0===t&&r===e.length?i.fromByteArray(e):i.fromByteArray(e.slice(t,r))}function x(e,t,r){r=Math.min(e.length,r);for(var i=[],n=t;n239?4:c>223?3:c>191?2:1;if(n+u<=r)switch(u){case 1:c<128&&(h=c);break;case 2:128==(192&(s=e[n+1]))&&(l=(31&c)<<6|63&s)>127&&(h=l);break;case 3:s=e[n+1],a=e[n+2],128==(192&s)&&128==(192&a)&&(l=(15&c)<<12|(63&s)<<6|63&a)>2047&&(l<55296||l>57343)&&(h=l);break;case 4:s=e[n+1],a=e[n+2],o=e[n+3],128==(192&s)&&128==(192&a)&&128==(192&o)&&(l=(15&c)<<18|(63&s)<<12|(63&a)<<6|63&o)>65535&&l<1114112&&(h=l)}null===h?(h=65533,u=1):h>65535&&(h-=65536,i.push(h>>>10&1023|55296),h=56320|1023&h),i.push(h),n+=u}return function(e){var t=e.length;if(t<=I)return String.fromCharCode.apply(String,e);for(var r="",i=0;it&&(e+=" ... "),""},s&&(l.prototype[s]=l.prototype.inspect),l.prototype.compare=function(e,t,r,i,n){if(V(e,Uint8Array)&&(e=l.from(e,e.offset,e.byteLength)),!l.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===i&&(i=0),void 0===n&&(n=this.length),t<0||r>e.length||i<0||n>this.length)throw new RangeError("out of range index");if(i>=n&&t>=r)return 0;if(i>=n)return-1;if(t>=r)return 1;if(this===e)return 0;for(var s=(n>>>=0)-(i>>>=0),a=(r>>>=0)-(t>>>=0),o=Math.min(s,a),c=this.slice(i,n),h=e.slice(t,r),u=0;u>>=0,isFinite(r)?(r>>>=0,void 0===i&&(i="utf8")):(i=r,r=void 0)}var n=this.length-t;if((void 0===r||r>n)&&(r=n),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var s=!1;;)switch(i){case"hex":return v(this,e,t,r);case"utf8":case"utf-8":return C(this,e,t,r);case"ascii":return w(this,e,t,r);case"latin1":case"binary":return E(this,e,t,r);case"base64":return _(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return b(this,e,t,r);default:if(s)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),s=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var I=4096;function k(e,t,r){var i="";r=Math.min(e.length,r);for(var n=t;ni)&&(r=i);for(var n="",s=t;sr)throw new RangeError("Trying to access beyond buffer length")}function R(e,t,r,i,n,s){if(!l.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>n||te.length)throw new RangeError("Index out of range")}function B(e,t,r,i,n,s){if(r+i>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function L(e,t,r,i,s){return t=+t,r>>>=0,s||B(e,0,r,4),n.write(e,t,r,i,23,4),r+4}function O(e,t,r,i,s){return t=+t,r>>>=0,s||B(e,0,r,8),n.write(e,t,r,i,52,8),r+8}l.prototype.slice=function(e,t){var r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t>>=0,t>>>=0,r||P(e,t,this.length);for(var i=this[e],n=1,s=0;++s>>=0,t>>>=0,r||P(e,t,this.length);for(var i=this[e+--t],n=1;t>0&&(n*=256);)i+=this[e+--t]*n;return i},l.prototype.readUInt8=function(e,t){return e>>>=0,t||P(e,1,this.length),this[e]},l.prototype.readUInt16LE=function(e,t){return e>>>=0,t||P(e,2,this.length),this[e]|this[e+1]<<8},l.prototype.readUInt16BE=function(e,t){return e>>>=0,t||P(e,2,this.length),this[e]<<8|this[e+1]},l.prototype.readUInt32LE=function(e,t){return e>>>=0,t||P(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},l.prototype.readUInt32BE=function(e,t){return e>>>=0,t||P(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},l.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||P(e,t,this.length);for(var i=this[e],n=1,s=0;++s=(n*=128)&&(i-=Math.pow(2,8*t)),i},l.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||P(e,t,this.length);for(var i=t,n=1,s=this[e+--i];i>0&&(n*=256);)s+=this[e+--i]*n;return s>=(n*=128)&&(s-=Math.pow(2,8*t)),s},l.prototype.readInt8=function(e,t){return e>>>=0,t||P(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},l.prototype.readInt16LE=function(e,t){e>>>=0,t||P(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},l.prototype.readInt16BE=function(e,t){e>>>=0,t||P(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},l.prototype.readInt32LE=function(e,t){return e>>>=0,t||P(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},l.prototype.readInt32BE=function(e,t){return e>>>=0,t||P(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},l.prototype.readFloatLE=function(e,t){return e>>>=0,t||P(e,4,this.length),n.read(this,e,!0,23,4)},l.prototype.readFloatBE=function(e,t){return e>>>=0,t||P(e,4,this.length),n.read(this,e,!1,23,4)},l.prototype.readDoubleLE=function(e,t){return e>>>=0,t||P(e,8,this.length),n.read(this,e,!0,52,8)},l.prototype.readDoubleBE=function(e,t){return e>>>=0,t||P(e,8,this.length),n.read(this,e,!1,52,8)},l.prototype.writeUIntLE=function(e,t,r,i){e=+e,t>>>=0,r>>>=0,i||R(this,e,t,r,Math.pow(2,8*r)-1,0);var n=1,s=0;for(this[t]=255&e;++s>>=0,r>>>=0,i||R(this,e,t,r,Math.pow(2,8*r)-1,0);var n=r-1,s=1;for(this[t+n]=255&e;--n>=0&&(s*=256);)this[t+n]=e/s&255;return t+r},l.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,1,255,0),this[t]=255&e,t+1},l.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},l.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},l.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},l.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},l.prototype.writeIntLE=function(e,t,r,i){if(e=+e,t>>>=0,!i){var n=Math.pow(2,8*r-1);R(this,e,t,r,n-1,-n)}var s=0,a=1,o=0;for(this[t]=255&e;++s>>=0,!i){var n=Math.pow(2,8*r-1);R(this,e,t,r,n-1,-n)}var s=r-1,a=1,o=0;for(this[t+s]=255&e;--s>=0&&(a*=256);)e<0&&0===o&&0!==this[t+s+1]&&(o=1),this[t+s]=(e/a|0)-o&255;return t+r},l.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},l.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},l.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},l.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},l.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},l.prototype.writeFloatLE=function(e,t,r){return L(this,e,t,!0,r)},l.prototype.writeFloatBE=function(e,t,r){return L(this,e,t,!1,r)},l.prototype.writeDoubleLE=function(e,t,r){return O(this,e,t,!0,r)},l.prototype.writeDoubleBE=function(e,t,r){return O(this,e,t,!1,r)},l.prototype.copy=function(e,t,r,i){if(!l.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),i||0===i||(i=this.length),t>=e.length&&(t=e.length),t||(t=0),i>0&&i=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),e.length-t=0;--s)e[s+t]=this[s+r];else Uint8Array.prototype.set.call(e,this.subarray(r,i),t);return n},l.prototype.fill=function(e,t,r,i){if("string"==typeof e){if("string"==typeof t?(i=t,t=0,r=this.length):"string"==typeof r&&(i=r,r=this.length),void 0!==i&&"string"!=typeof i)throw new TypeError("encoding must be a string");if("string"==typeof i&&!l.isEncoding(i))throw new TypeError("Unknown encoding: "+i);if(1===e.length){var n=e.charCodeAt(0);("utf8"===i&&n<128||"latin1"===i)&&(e=n)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(s=t;s55295&&r<57344){if(!n){if(r>56319){(t-=3)>-1&&s.push(239,191,189);continue}if(a+1===i){(t-=3)>-1&&s.push(239,191,189);continue}n=r;continue}if(r<56320){(t-=3)>-1&&s.push(239,191,189),n=r;continue}r=65536+(n-55296<<10|r-56320)}else n&&(t-=3)>-1&&s.push(239,191,189);if(n=null,r<128){if((t-=1)<0)break;s.push(r)}else if(r<2048){if((t-=2)<0)break;s.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;s.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;s.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return s}function F(e){return i.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(M,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function $(e,t,r,i){for(var n=0;n=t.length||n>=e.length);++n)t[n+r]=e[n];return n}function V(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function j(e){return e!=e}var q=function(){for(var e="0123456789abcdef",t=new Array(256),r=0;r<16;++r)for(var i=16*r,n=0;n<16;++n)t[i+n]=e[r]+e[n];return t}()},{"base64-js":29,ieee754:32}],31:[function(e,t,r){var i={single_source_shortest_paths:function(e,t,r){var n={},s={};s[t]=0;var a,o,l,c,h,u,d,p=i.PriorityQueue.make();for(p.push(t,0);!p.empty();)for(l in o=(a=p.pop()).value,c=a.cost,h=e[o]||{})h.hasOwnProperty(l)&&(u=c+h[l],d=s[l],(void 0===s[l]||d>u)&&(s[l]=u,p.push(l,u),n[l]=o));if(void 0!==r&&void 0===s[r]){var f=["Could not find a path from ",t," to ",r,"."].join("");throw new Error(f)}return n},extract_shortest_path_from_predecessor_list:function(e,t){for(var r=[],i=t;i;)r.push(i),e[i],i=e[i];return r.reverse(),r},find_path:function(e,t,r){var n=i.single_source_shortest_paths(e,t,r);return i.extract_shortest_path_from_predecessor_list(n,r)},PriorityQueue:{make:function(e){var t,r=i.PriorityQueue,n={};for(t in e=e||{},r)r.hasOwnProperty(t)&&(n[t]=r[t]);return n.queue=[],n.sorter=e.sorter||r.default_sorter,n},default_sorter:function(e,t){return e.cost-t.cost},push:function(e,t){var r={value:e,cost:t};this.queue.push(r),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}};void 0!==t&&(t.exports=i)},{}],32:[function(e,t,r){r.read=function(e,t,r,i,n){var s,a,o=8*n-i-1,l=(1<>1,h=-7,u=r?n-1:0,d=r?-1:1,p=e[t+u];for(u+=d,s=p&(1<<-h)-1,p>>=-h,h+=o;h>0;s=256*s+e[t+u],u+=d,h-=8);for(a=s&(1<<-h)-1,s>>=-h,h+=i;h>0;a=256*a+e[t+u],u+=d,h-=8);if(0===s)s=1-c;else{if(s===l)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,i),s-=c}return(p?-1:1)*a*Math.pow(2,s-i)},r.write=function(e,t,r,i,n,s){var a,o,l,c=8*s-n-1,h=(1<>1,d=23===n?Math.pow(2,-24)-Math.pow(2,-77):0,p=i?0:s-1,f=i?1:-1,A=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(o=isNaN(t)?1:0,a=h):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),(t+=a+u>=1?d/l:d*Math.pow(2,1-u))*l>=2&&(a++,l/=2),a+u>=h?(o=0,a=h):a+u>=1?(o=(t*l-1)*Math.pow(2,n),a+=u):(o=t*Math.pow(2,u-1)*Math.pow(2,n),a=0));n>=8;e[r+p]=255&o,p+=f,o/=256,n-=8);for(a=a<0;e[r+p]=255&a,p+=f,a/=256,c-=8);e[r+p-f]|=128*A}},{}],33:[function(e,t,r){var i={}.toString;t.exports=Array.isArray||function(e){return"[object Array]"==i.call(e)}},{}]},{},[24])(24)},t.exports=i()}));return{name:"qrcode",props:{value:null,options:Object,tag:{type:String,default:"canvas"}},render:function(e){return e(this.tag,this.$slots.default)},watch:{$props:{deep:!0,immediate:!0,handler:function(){this.$el&&this.generate()}}},methods:{generate:function(){var e=this,r=this.options,i=this.tag,n=String(this.value);"canvas"===i?t.toCanvas(this.$el,n,r,(function(e){if(e)throw e})):"img"===i?t.toDataURL(n,r,(function(t,r){if(t)throw t;e.$el.src=r})):t.toString(n,r,(function(t,r){if(t)throw t;e.$el.innerHTML=r}))}},mounted:function(){this.generate()}}}()},97380:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var i=r(71354),n=r.n(i),s=r(76314),a=r.n(s)()(n());a.push([e.id,".fade-enter-active[data-v-42733c12], .fade-leave-active[data-v-42733c12] {\n transition: opacity 0.3s ease;\n}\n.fade-enter[data-v-42733c12], .fade-leave-to[data-v-42733c12] {\n opacity: 0;\n}\n.linked-icons[data-v-42733c12] {\n display: flex;\n}\n.linked-icons img[data-v-42733c12] {\n padding: 12px;\n height: 44px;\n display: block;\n background-repeat: no-repeat;\n background-position: center;\n opacity: 0.7;\n}\n.linked-icons img[data-v-42733c12]:hover {\n opacity: 1;\n}\n.popovermenu[data-v-42733c12] {\n display: none;\n}\n.popovermenu.open[data-v-42733c12] {\n display: block;\n}\nli.collection-list-item[data-v-42733c12] {\n flex-wrap: wrap;\n height: auto;\n cursor: pointer;\n margin-bottom: 0 !important;\n}\nli.collection-list-item .collection-avatar[data-v-42733c12] {\n margin-top: 6px;\n}\nli.collection-list-item form[data-v-42733c12], li.collection-list-item .collection-item-name[data-v-42733c12] {\n flex-basis: 10%;\n flex-grow: 1;\n display: flex;\n}\nli.collection-list-item .collection-item-name[data-v-42733c12] {\n padding: 12px 9px;\n}\nli.collection-list-item input[data-v-42733c12] {\n margin-top: 4px;\n border-color: var(--color-border-maxcontrast);\n}\nli.collection-list-item input[type=text][data-v-42733c12] {\n flex-grow: 1;\n}\nli.collection-list-item .error[data-v-42733c12] {\n flex-basis: 100%;\n width: 100%;\n}\nli.collection-list-item .resource-list-details[data-v-42733c12] {\n flex-basis: 100%;\n width: 100%;\n}\nli.collection-list-item .resource-list-details li[data-v-42733c12] {\n display: flex;\n margin-left: 44px;\n border-radius: 3px;\n cursor: pointer;\n}\nli.collection-list-item .resource-list-details li[data-v-42733c12]:hover {\n background-color: var(--color-background-dark);\n}\nli.collection-list-item .resource-list-details li a[data-v-42733c12] {\n flex-grow: 1;\n padding: 3px;\n max-width: calc(100% - 30px);\n display: flex;\n}\nli.collection-list-item .resource-list-details span[data-v-42733c12] {\n display: inline-block;\n vertical-align: top;\n margin-right: 10px;\n}\nli.collection-list-item .resource-list-details span.resource-name[data-v-42733c12] {\n text-overflow: ellipsis;\n overflow: hidden;\n position: relative;\n vertical-align: top;\n white-space: nowrap;\n flex-grow: 1;\n padding: 4px;\n}\nli.collection-list-item .resource-list-details img[data-v-42733c12] {\n width: 24px;\n height: 24px;\n}\nli.collection-list-item .resource-list-details .icon-close[data-v-42733c12] {\n opacity: 0.7;\n}\nli.collection-list-item .resource-list-details .icon-close[data-v-42733c12]:hover, li.collection-list-item .resource-list-details .icon-close[data-v-42733c12]:focus {\n opacity: 1;\n}\n.shouldshake[data-v-42733c12] {\n animation: shake-42733c12 0.6s 1 linear;\n}\n@keyframes shake-42733c12 {\n0% {\n transform: translate(15px);\n}\n20% {\n transform: translate(-15px);\n}\n40% {\n transform: translate(7px);\n}\n60% {\n transform: translate(-7px);\n}\n80% {\n transform: translate(3px);\n}\n100% {\n transform: translate(0px);\n}\n}.collection-list *[data-v-8ebb2593] {\n box-sizing: border-box;\n}\n.collection-list > li[data-v-8ebb2593] {\n display: flex;\n align-items: start;\n gap: 12px;\n}\n.collection-list > li > .avatar[data-v-8ebb2593] {\n margin-top: auto;\n}\n#collection-select-container[data-v-8ebb2593] {\n display: flex;\n flex-direction: column;\n}\n.v-select span.avatar[data-v-8ebb2593] {\n display: block;\n padding: 16px;\n opacity: 0.7;\n background-repeat: no-repeat;\n background-position: center;\n}\n.v-select span.avatar[data-v-8ebb2593]:hover {\n opacity: 1;\n}\np.hint[data-v-8ebb2593] {\n z-index: 1;\n margin-top: -16px;\n padding: 8px 8px;\n color: var(--color-text-maxcontrast);\n line-height: normal;\n}\ndiv.avatar[data-v-8ebb2593] {\n width: 32px;\n height: 32px;\n margin: 0;\n padding: 8px;\n background-color: var(--color-background-dark);\n margin-top: 30px;\n}\n\n/** TODO provide white icon in core */\n.icon-projects[data-v-8ebb2593] {\n display: block;\n padding: 8px;\n background-repeat: no-repeat;\n background-position: center;\n}\n.option__wrapper[data-v-8ebb2593] {\n display: flex;\n}\n.option__wrapper .avatar[data-v-8ebb2593] {\n display: block;\n background-color: var(--color-background-darker) !important;\n}\n.option__wrapper .option__title[data-v-8ebb2593] {\n padding: 4px;\n}\n.fade-enter-active[data-v-8ebb2593], .fade-leave-active[data-v-8ebb2593] {\n transition: opacity 0.5s;\n}\n.fade-enter[data-v-8ebb2593], .fade-leave-to[data-v-8ebb2593] {\n opacity: 0;\n}","",{version:3,sources:["webpack://./node_modules/nextcloud-vue-collections/dist/assets/index-CJAYjuyf.css"],names:[],mappings:"AAAA;EACE,6BAA6B;AAC/B;AACA;EACE,UAAU;AACZ;AACA;EACE,aAAa;AACf;AACA;EACE,aAAa;EACb,YAAY;EACZ,cAAc;EACd,4BAA4B;EAC5B,2BAA2B;EAC3B,YAAY;AACd;AACA;EACE,UAAU;AACZ;AACA;EACE,aAAa;AACf;AACA;EACE,cAAc;AAChB;AACA;EACE,eAAe;EACf,YAAY;EACZ,eAAe;EACf,2BAA2B;AAC7B;AACA;EACE,eAAe;AACjB;AACA;EACE,eAAe;EACf,YAAY;EACZ,aAAa;AACf;AACA;EACE,iBAAiB;AACnB;AACA;EACE,eAAe;EACf,6CAA6C;AAC/C;AACA;EACE,YAAY;AACd;AACA;EACE,gBAAgB;EAChB,WAAW;AACb;AACA;EACE,gBAAgB;EAChB,WAAW;AACb;AACA;EACE,aAAa;EACb,iBAAiB;EACjB,kBAAkB;EAClB,eAAe;AACjB;AACA;EACE,8CAA8C;AAChD;AACA;EACE,YAAY;EACZ,YAAY;EACZ,4BAA4B;EAC5B,aAAa;AACf;AACA;EACE,qBAAqB;EACrB,mBAAmB;EACnB,kBAAkB;AACpB;AACA;EACE,uBAAuB;EACvB,gBAAgB;EAChB,kBAAkB;EAClB,mBAAmB;EACnB,mBAAmB;EACnB,YAAY;EACZ,YAAY;AACd;AACA;EACE,WAAW;EACX,YAAY;AACd;AACA;EACE,YAAY;AACd;AACA;EACE,UAAU;AACZ;AACA;EACE,uCAAuC;AACzC;AACA;AACA;IACI,0BAA0B;AAC9B;AACA;IACI,2BAA2B;AAC/B;AACA;IACI,yBAAyB;AAC7B;AACA;IACI,0BAA0B;AAC9B;AACA;IACI,yBAAyB;AAC7B;AACA;IACI,yBAAyB;AAC7B;AACA,CAAC;EACC,sBAAsB;AACxB;AACA;EACE,aAAa;EACb,kBAAkB;EAClB,SAAS;AACX;AACA;EACE,gBAAgB;AAClB;AACA;EACE,aAAa;EACb,sBAAsB;AACxB;AACA;EACE,cAAc;EACd,aAAa;EACb,YAAY;EACZ,4BAA4B;EAC5B,2BAA2B;AAC7B;AACA;EACE,UAAU;AACZ;AACA;EACE,UAAU;EACV,iBAAiB;EACjB,gBAAgB;EAChB,oCAAoC;EACpC,mBAAmB;AACrB;AACA;EACE,WAAW;EACX,YAAY;EACZ,SAAS;EACT,YAAY;EACZ,8CAA8C;EAC9C,gBAAgB;AAClB;;AAEA,qCAAqC;AACrC;EACE,cAAc;EACd,YAAY;EACZ,4BAA4B;EAC5B,2BAA2B;AAC7B;AACA;EACE,aAAa;AACf;AACA;EACE,cAAc;EACd,2DAA2D;AAC7D;AACA;EACE,YAAY;AACd;AACA;EACE,wBAAwB;AAC1B;AACA;EACE,UAAU;AACZ",sourcesContent:[".fade-enter-active[data-v-42733c12], .fade-leave-active[data-v-42733c12] {\n transition: opacity 0.3s ease;\n}\n.fade-enter[data-v-42733c12], .fade-leave-to[data-v-42733c12] {\n opacity: 0;\n}\n.linked-icons[data-v-42733c12] {\n display: flex;\n}\n.linked-icons img[data-v-42733c12] {\n padding: 12px;\n height: 44px;\n display: block;\n background-repeat: no-repeat;\n background-position: center;\n opacity: 0.7;\n}\n.linked-icons img[data-v-42733c12]:hover {\n opacity: 1;\n}\n.popovermenu[data-v-42733c12] {\n display: none;\n}\n.popovermenu.open[data-v-42733c12] {\n display: block;\n}\nli.collection-list-item[data-v-42733c12] {\n flex-wrap: wrap;\n height: auto;\n cursor: pointer;\n margin-bottom: 0 !important;\n}\nli.collection-list-item .collection-avatar[data-v-42733c12] {\n margin-top: 6px;\n}\nli.collection-list-item form[data-v-42733c12], li.collection-list-item .collection-item-name[data-v-42733c12] {\n flex-basis: 10%;\n flex-grow: 1;\n display: flex;\n}\nli.collection-list-item .collection-item-name[data-v-42733c12] {\n padding: 12px 9px;\n}\nli.collection-list-item input[data-v-42733c12] {\n margin-top: 4px;\n border-color: var(--color-border-maxcontrast);\n}\nli.collection-list-item input[type=text][data-v-42733c12] {\n flex-grow: 1;\n}\nli.collection-list-item .error[data-v-42733c12] {\n flex-basis: 100%;\n width: 100%;\n}\nli.collection-list-item .resource-list-details[data-v-42733c12] {\n flex-basis: 100%;\n width: 100%;\n}\nli.collection-list-item .resource-list-details li[data-v-42733c12] {\n display: flex;\n margin-left: 44px;\n border-radius: 3px;\n cursor: pointer;\n}\nli.collection-list-item .resource-list-details li[data-v-42733c12]:hover {\n background-color: var(--color-background-dark);\n}\nli.collection-list-item .resource-list-details li a[data-v-42733c12] {\n flex-grow: 1;\n padding: 3px;\n max-width: calc(100% - 30px);\n display: flex;\n}\nli.collection-list-item .resource-list-details span[data-v-42733c12] {\n display: inline-block;\n vertical-align: top;\n margin-right: 10px;\n}\nli.collection-list-item .resource-list-details span.resource-name[data-v-42733c12] {\n text-overflow: ellipsis;\n overflow: hidden;\n position: relative;\n vertical-align: top;\n white-space: nowrap;\n flex-grow: 1;\n padding: 4px;\n}\nli.collection-list-item .resource-list-details img[data-v-42733c12] {\n width: 24px;\n height: 24px;\n}\nli.collection-list-item .resource-list-details .icon-close[data-v-42733c12] {\n opacity: 0.7;\n}\nli.collection-list-item .resource-list-details .icon-close[data-v-42733c12]:hover, li.collection-list-item .resource-list-details .icon-close[data-v-42733c12]:focus {\n opacity: 1;\n}\n.shouldshake[data-v-42733c12] {\n animation: shake-42733c12 0.6s 1 linear;\n}\n@keyframes shake-42733c12 {\n0% {\n transform: translate(15px);\n}\n20% {\n transform: translate(-15px);\n}\n40% {\n transform: translate(7px);\n}\n60% {\n transform: translate(-7px);\n}\n80% {\n transform: translate(3px);\n}\n100% {\n transform: translate(0px);\n}\n}.collection-list *[data-v-8ebb2593] {\n box-sizing: border-box;\n}\n.collection-list > li[data-v-8ebb2593] {\n display: flex;\n align-items: start;\n gap: 12px;\n}\n.collection-list > li > .avatar[data-v-8ebb2593] {\n margin-top: auto;\n}\n#collection-select-container[data-v-8ebb2593] {\n display: flex;\n flex-direction: column;\n}\n.v-select span.avatar[data-v-8ebb2593] {\n display: block;\n padding: 16px;\n opacity: 0.7;\n background-repeat: no-repeat;\n background-position: center;\n}\n.v-select span.avatar[data-v-8ebb2593]:hover {\n opacity: 1;\n}\np.hint[data-v-8ebb2593] {\n z-index: 1;\n margin-top: -16px;\n padding: 8px 8px;\n color: var(--color-text-maxcontrast);\n line-height: normal;\n}\ndiv.avatar[data-v-8ebb2593] {\n width: 32px;\n height: 32px;\n margin: 0;\n padding: 8px;\n background-color: var(--color-background-dark);\n margin-top: 30px;\n}\n\n/** TODO provide white icon in core */\n.icon-projects[data-v-8ebb2593] {\n display: block;\n padding: 8px;\n background-repeat: no-repeat;\n background-position: center;\n}\n.option__wrapper[data-v-8ebb2593] {\n display: flex;\n}\n.option__wrapper .avatar[data-v-8ebb2593] {\n display: block;\n background-color: var(--color-background-darker) !important;\n}\n.option__wrapper .option__title[data-v-8ebb2593] {\n padding: 4px;\n}\n.fade-enter-active[data-v-8ebb2593], .fade-leave-active[data-v-8ebb2593] {\n transition: opacity 0.5s;\n}\n.fade-enter[data-v-8ebb2593], .fade-leave-to[data-v-8ebb2593] {\n opacity: 0;\n}"],sourceRoot:""}]);const o=a},63592:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var i=r(71354),n=r.n(i),s=r(76314),a=r.n(s)()(n());a.push([e.id,".sharing-entry[data-v-e994747e]{display:flex;align-items:center;height:44px}.sharing-entry__summary[data-v-e994747e]{padding:8px;padding-inline-start:10px;display:flex;flex-direction:column;justify-content:center;align-items:flex-start;flex:1 0;min-width:0}.sharing-entry__summary__desc[data-v-e994747e]{display:inline-block;padding-bottom:0;line-height:1.2em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.sharing-entry__summary__desc p[data-v-e994747e],.sharing-entry__summary__desc small[data-v-e994747e]{color:var(--color-text-maxcontrast)}.sharing-entry__summary__desc-unique[data-v-e994747e]{color:var(--color-text-maxcontrast)}","",{version:3,sources:["webpack://./apps/files_sharing/src/components/SharingEntry.vue"],names:[],mappings:"AACA,gCACC,YAAA,CACA,kBAAA,CACA,WAAA,CACA,yCACC,WAAA,CACA,yBAAA,CACA,YAAA,CACA,qBAAA,CACA,sBAAA,CACA,sBAAA,CACA,QAAA,CACA,WAAA,CAEA,+CACC,oBAAA,CACA,gBAAA,CACA,iBAAA,CACA,kBAAA,CACA,eAAA,CACA,sBAAA,CAEA,sGAEC,mCAAA,CAGD,sDACC,mCAAA",sourceRoot:""}]);const o=a},88346:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var i=r(71354),n=r.n(i),s=r(76314),a=r.n(s)()(n());a.push([e.id,".sharing-entry[data-v-32cb91ce]{display:flex;align-items:center;height:44px}.sharing-entry__desc[data-v-32cb91ce]{display:flex;flex-direction:column;justify-content:space-between;padding:8px;padding-inline-start:10px;line-height:1.2em}.sharing-entry__desc p[data-v-32cb91ce]{color:var(--color-text-maxcontrast)}.sharing-entry__actions[data-v-32cb91ce]{margin-inline-start:auto}","",{version:3,sources:["webpack://./apps/files_sharing/src/components/SharingEntryInherited.vue"],names:[],mappings:"AACA,gCACC,YAAA,CACA,kBAAA,CACA,WAAA,CACA,sCACC,YAAA,CACA,qBAAA,CACA,6BAAA,CACA,WAAA,CACA,yBAAA,CACA,iBAAA,CACA,wCACC,mCAAA,CAGF,yCACC,wBAAA",sourceRoot:""}]);const o=a},23815:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var i=r(71354),n=r.n(i),s=r(76314),a=r.n(s)()(n());a.push([e.id,".sharing-entry__internal .avatar-external[data-v-1d9a7cfa]{width:32px;height:32px;line-height:32px;font-size:18px;background-color:var(--color-text-maxcontrast);border-radius:50%;flex-shrink:0}.sharing-entry__internal .icon-checkmark-color[data-v-1d9a7cfa]{opacity:1;color:var(--color-success)}","",{version:3,sources:["webpack://./apps/files_sharing/src/components/SharingEntryInternal.vue"],names:[],mappings:"AAEC,2DACC,UAAA,CACA,WAAA,CACA,gBAAA,CACA,cAAA,CACA,8CAAA,CACA,iBAAA,CACA,aAAA,CAED,gEACC,SAAA,CACA,0BAAA",sourceRoot:""}]);const o=a},84865:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var i=r(71354),n=r.n(i),s=r(76314),a=r.n(s)()(n());a.push([e.id,".sharing-entry[data-v-aab3eaf4]{display:flex;align-items:center;min-height:44px}.sharing-entry__summary[data-v-aab3eaf4]{padding:8px;padding-inline-start:10px;display:flex;justify-content:space-between;flex:1 0;min-width:0}.sharing-entry__desc[data-v-aab3eaf4]{display:flex;flex-direction:column;line-height:1.2em}.sharing-entry__desc p[data-v-aab3eaf4]{color:var(--color-text-maxcontrast)}.sharing-entry__desc__title[data-v-aab3eaf4]{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.sharing-entry:not(.sharing-entry--share) .sharing-entry__actions .new-share-link[data-v-aab3eaf4]{border-top:1px solid var(--color-border)}.sharing-entry[data-v-aab3eaf4] .avatar-link-share{background-color:var(--color-primary-element)}.sharing-entry .sharing-entry__action--public-upload[data-v-aab3eaf4]{border-bottom:1px solid var(--color-border)}.sharing-entry__loading[data-v-aab3eaf4]{width:44px;height:44px;margin:0;padding:14px;margin-inline-start:auto}.sharing-entry .action-item~.action-item[data-v-aab3eaf4],.sharing-entry .action-item~.sharing-entry__loading[data-v-aab3eaf4]{margin-inline-start:0}.sharing-entry .icon-checkmark-color[data-v-aab3eaf4]{opacity:1;color:var(--color-success)}.qr-code-dialog[data-v-aab3eaf4]{display:flex;width:100%;justify-content:center}.qr-code-dialog__img[data-v-aab3eaf4]{width:100%;height:auto}","",{version:3,sources:["webpack://./apps/files_sharing/src/components/SharingEntryLink.vue"],names:[],mappings:"AACA,gCACC,YAAA,CACA,kBAAA,CACA,eAAA,CAEA,yCACC,WAAA,CACA,yBAAA,CACA,YAAA,CACA,6BAAA,CACA,QAAA,CACA,WAAA,CAGA,sCACC,YAAA,CACA,qBAAA,CACA,iBAAA,CAEA,wCACC,mCAAA,CAGD,6CACC,sBAAA,CACA,eAAA,CACA,kBAAA,CAKF,mGACC,wCAAA,CAIF,mDACC,6CAAA,CAGD,sEACC,2CAAA,CAGD,yCACC,UAAA,CACA,WAAA,CACA,QAAA,CACA,YAAA,CACA,wBAAA,CAOA,+HAEC,qBAAA,CAIF,sDACC,SAAA,CACA,0BAAA,CAKF,iCACC,YAAA,CACA,UAAA,CACA,sBAAA,CAEA,sCACC,UAAA,CACA,WAAA",sourceRoot:""}]);const o=a},13462:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var i=r(71354),n=r.n(i),s=r(76314),a=r.n(s)()(n());a.push([e.id,".share-select[data-v-66ffdd9c]{display:block}.share-select[data-v-66ffdd9c] .action-item__menutoggle{color:var(--color-primary-element) !important;font-size:12.5px !important;height:auto !important;min-height:auto !important}.share-select[data-v-66ffdd9c] .action-item__menutoggle .button-vue__text{font-weight:normal !important}.share-select[data-v-66ffdd9c] .action-item__menutoggle .button-vue__icon{height:24px !important;min-height:24px !important;width:24px !important;min-width:24px !important}.share-select[data-v-66ffdd9c] .action-item__menutoggle .button-vue__wrapper{flex-direction:row-reverse !important}","",{version:3,sources:["webpack://./apps/files_sharing/src/components/SharingEntryQuickShareSelect.vue"],names:[],mappings:"AACA,+BACC,aAAA,CAIA,wDACC,6CAAA,CACA,2BAAA,CACA,sBAAA,CACA,0BAAA,CAEA,0EACC,6BAAA,CAGD,0EACC,sBAAA,CACA,0BAAA,CACA,qBAAA,CACA,yBAAA,CAGD,6EAEC,qCAAA",sourceRoot:""}]);const o=a},86495:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var i=r(71354),n=r.n(i),s=r(76314),a=r.n(s)()(n());a.push([e.id,".sharing-entry[data-v-4c49edf4]{display:flex;align-items:center;min-height:44px}.sharing-entry__desc[data-v-4c49edf4]{padding:8px;padding-inline-start:10px;line-height:1.2em;position:relative;flex:1 1;min-width:0}.sharing-entry__desc p[data-v-4c49edf4]{color:var(--color-text-maxcontrast)}.sharing-entry__title[data-v-4c49edf4]{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;max-width:inherit}.sharing-entry__actions[data-v-4c49edf4]{margin-inline-start:auto !important}","",{version:3,sources:["webpack://./apps/files_sharing/src/components/SharingEntrySimple.vue"],names:[],mappings:"AACA,gCACC,YAAA,CACA,kBAAA,CACA,eAAA,CACA,sCACC,WAAA,CACA,yBAAA,CACA,iBAAA,CACA,iBAAA,CACA,QAAA,CACA,WAAA,CACA,wCACC,mCAAA,CAGF,uCACC,kBAAA,CACA,sBAAA,CACA,eAAA,CACA,iBAAA,CAED,yCACC,mCAAA",sourceRoot:""}]);const o=a},6342:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var i=r(71354),n=r.n(i),s=r(76314),a=r.n(s)()(n());a.push([e.id,".sharing-search{display:flex;flex-direction:column;margin-bottom:4px}.sharing-search label[for=sharing-search-input]{margin-bottom:2px}.sharing-search__input{width:100%;margin:10px 0}.vs__dropdown-menu span[lookup] .avatardiv{background-image:var(--icon-search-white);background-repeat:no-repeat;background-position:center;background-color:var(--color-text-maxcontrast) !important}.vs__dropdown-menu span[lookup] .avatardiv .avatardiv__initials-wrapper{display:none}","",{version:3,sources:["webpack://./apps/files_sharing/src/components/SharingInput.vue"],names:[],mappings:"AACA,gBACC,YAAA,CACA,qBAAA,CACA,iBAAA,CAEA,gDACC,iBAAA,CAGD,uBACC,UAAA,CACA,aAAA,CAOA,2CACC,yCAAA,CACA,2BAAA,CACA,0BAAA,CACA,yDAAA,CACA,wEACC,YAAA",sourceRoot:""}]);const o=a},57241:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var i=r(71354),n=r.n(i),s=r(76314),a=r.n(s)()(n());a.push([e.id,".sharingTabDetailsView[data-v-208c98ca]{display:flex;flex-direction:column;width:100%;margin:0 auto;position:relative;height:100%;overflow:hidden}.sharingTabDetailsView__header[data-v-208c98ca]{display:flex;align-items:center;box-sizing:border-box;margin:.2em}.sharingTabDetailsView__header span[data-v-208c98ca]{display:flex;align-items:center}.sharingTabDetailsView__header span h1[data-v-208c98ca]{font-size:15px;padding-inline-start:.3em}.sharingTabDetailsView__wrapper[data-v-208c98ca]{position:relative;overflow:scroll;flex-shrink:1;padding:4px;padding-inline-end:12px}.sharingTabDetailsView__quick-permissions[data-v-208c98ca]{display:flex;justify-content:center;width:100%;margin:0 auto;border-radius:0}.sharingTabDetailsView__quick-permissions div[data-v-208c98ca]{width:100%}.sharingTabDetailsView__quick-permissions div span[data-v-208c98ca]{width:100%}.sharingTabDetailsView__quick-permissions div span span[data-v-208c98ca]:nth-child(1){align-items:center;justify-content:center;padding:.1em}.sharingTabDetailsView__quick-permissions div span[data-v-208c98ca] label span{display:flex;flex-direction:column}.sharingTabDetailsView__quick-permissions div span[data-v-208c98ca] span.checkbox-content__text.checkbox-radio-switch__text{flex-wrap:wrap}.sharingTabDetailsView__quick-permissions div span[data-v-208c98ca] span.checkbox-content__text.checkbox-radio-switch__text .subline{display:block;flex-basis:100%}.sharingTabDetailsView__advanced-control[data-v-208c98ca]{width:100%}.sharingTabDetailsView__advanced-control button[data-v-208c98ca]{margin-top:.5em}.sharingTabDetailsView__advanced[data-v-208c98ca]{width:100%;margin-bottom:.5em;text-align:start;padding-inline-start:0}.sharingTabDetailsView__advanced section textarea[data-v-208c98ca],.sharingTabDetailsView__advanced section div.mx-datepicker[data-v-208c98ca]{width:100%}.sharingTabDetailsView__advanced section textarea[data-v-208c98ca]{height:80px;margin:0}.sharingTabDetailsView__advanced section span[data-v-208c98ca] label{padding-inline-start:0 !important;background-color:initial !important;border:none !important}.sharingTabDetailsView__advanced section section.custom-permissions-group[data-v-208c98ca]{padding-inline-start:1.5em}.sharingTabDetailsView__delete>button[data-v-208c98ca]:first-child{color:#df0707}.sharingTabDetailsView__footer[data-v-208c98ca]{width:100%;display:flex;position:sticky;bottom:0;flex-direction:column;justify-content:space-between;align-items:flex-start;background:linear-gradient(to bottom, rgba(255, 255, 255, 0), var(--color-main-background))}.sharingTabDetailsView__footer .button-group[data-v-208c98ca]{display:flex;justify-content:space-between;width:100%;margin-top:16px}.sharingTabDetailsView__footer .button-group button[data-v-208c98ca]{margin-inline-start:16px}.sharingTabDetailsView__footer .button-group button[data-v-208c98ca]:first-child{margin-inline-start:0}","",{version:3,sources:["webpack://./apps/files_sharing/src/views/SharingDetailsTab.vue"],names:[],mappings:"AACA,wCACC,YAAA,CACA,qBAAA,CACA,UAAA,CACA,aAAA,CACA,iBAAA,CACA,WAAA,CACA,eAAA,CAEA,gDACC,YAAA,CACA,kBAAA,CACA,qBAAA,CACA,WAAA,CAEA,qDACC,YAAA,CACA,kBAAA,CAEA,wDACC,cAAA,CACA,yBAAA,CAMH,iDACC,iBAAA,CACA,eAAA,CACA,aAAA,CACA,WAAA,CACA,uBAAA,CAGD,2DACC,YAAA,CACA,sBAAA,CACA,UAAA,CACA,aAAA,CACA,eAAA,CAEA,+DACC,UAAA,CAEA,oEACC,UAAA,CAEA,sFACC,kBAAA,CACA,sBAAA,CACA,YAAA,CAGD,+EACC,YAAA,CACA,qBAAA,CAID,4HACC,cAAA,CAEA,qIACC,aAAA,CACA,eAAA,CAQL,0DACC,UAAA,CAEA,iEACC,eAAA,CAKF,kDACC,UAAA,CACA,kBAAA,CACA,gBAAA,CACA,sBAAA,CAIC,+IAEC,UAAA,CAGD,mEACC,WAAA,CACA,QAAA,CAYD,qEACC,iCAAA,CACA,mCAAA,CACA,sBAAA,CAGD,2FACC,0BAAA,CAMF,mEACC,aAAA,CAIF,gDACC,UAAA,CACA,YAAA,CACA,eAAA,CACA,QAAA,CACA,qBAAA,CACA,6BAAA,CACA,sBAAA,CACA,2FAAA,CAEA,8DACC,YAAA,CACA,6BAAA,CACA,UAAA,CACA,eAAA,CAEA,qEACC,wBAAA,CAEA,iFACC,qBAAA",sourceRoot:""}]);const o=a},44377:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var i=r(71354),n=r.n(i),s=r(76314),a=r.n(s)()(n());a.push([e.id,".sharing-entry__inherited .avatar-shared[data-v-33849ae4]{width:32px;height:32px;line-height:32px;font-size:18px;background-color:var(--color-text-maxcontrast);border-radius:50%;flex-shrink:0}","",{version:3,sources:["webpack://./apps/files_sharing/src/views/SharingInherited.vue"],names:[],mappings:"AAEC,0DACC,UAAA,CACA,WAAA,CACA,gBAAA,CACA,cAAA,CACA,8CAAA,CACA,iBAAA,CACA,aAAA",sourceRoot:""}]);const o=a},19093:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var i=r(71354),n=r.n(i),s=r(76314),a=r.n(s)()(n());a.push([e.id,".emptyContentWithSections[data-v-6332ffca]{margin:1rem auto}.sharingTab[data-v-6332ffca]{position:relative;height:100%}.sharingTab__content[data-v-6332ffca]{padding:0 6px}.sharingTab__additionalContent[data-v-6332ffca]{margin:44px 0}","",{version:3,sources:["webpack://./apps/files_sharing/src/views/SharingTab.vue"],names:[],mappings:"AACA,2CACC,gBAAA,CAGD,6BACC,iBAAA,CACA,WAAA,CAEA,sCACC,aAAA,CAGD,gDACC,aAAA",sourceRoot:""}]);const o=a},48318:function(e,t,r){!function(e){"use strict";var t,r=function(){try{if(e.URLSearchParams&&"bar"===new e.URLSearchParams("foo=bar").get("foo"))return e.URLSearchParams}catch(e){}return null}(),i=r&&"a=1"===new r({a:1}).toString(),n=r&&"+"===new r("s=%2B").get("s"),s=r&&"size"in r.prototype,a="__URLSearchParams__",o=!r||((t=new r).append("s"," &"),"s=+%26"===t.toString()),l=p.prototype,c=!(!e.Symbol||!e.Symbol.iterator);if(!(r&&i&&n&&o&&s)){l.append=function(e,t){y(this[a],e,t)},l.delete=function(e){delete this[a][e]},l.get=function(e){var t=this[a];return this.has(e)?t[e][0]:null},l.getAll=function(e){var t=this[a];return this.has(e)?t[e].slice(0):[]},l.has=function(e){return C(this[a],e)},l.set=function(e,t){this[a][e]=[""+t]},l.toString=function(){var e,t,r,i,n=this[a],s=[];for(t in n)for(r=f(t),e=0,i=n[t];e{"use strict";i.r(r),i.d(r,{default:()=>Er});var n=i(21777),s=i(35810),a=i(32981),o=i(63814),l=i(85072),c=i.n(l),h=i(97825),u=i.n(h),d=i(77659),p=i.n(d),f=i(55056),A=i.n(f),g=i(10540),m=i.n(g),y=i(41113),v=i.n(y),C=i(97380),w={};w.styleTagTransform=v(),w.setAttributes=A(),w.insert=p().bind(null,"head"),w.domAPI=u(),w.insertStyleElement=m(),c()(C.A,w),C.A&&C.A.locals&&C.A.locals;var E=i(53334),_=i(41944),b=i(67607);const S=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)},x="object"==typeof global&&global&&global.Object===Object&&global;var I="object"==typeof self&&self&&self.Object===Object&&self;const k=x||I||Function("return this")(),D=function(){return k.Date.now()};var T=/\s/;var N=/^\s+/;const P=function(e){return e?e.slice(0,function(e){for(var t=e.length;t--&&T.test(e.charAt(t)););return t}(e)+1).replace(N,""):e},R=k.Symbol;var B=Object.prototype,L=B.hasOwnProperty,O=B.toString,M=R?R.toStringTag:void 0;var U=Object.prototype.toString;var F=R?R.toStringTag:void 0;const $=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":F&&F in Object(e)?function(e){var t=L.call(e,M),r=e[M];try{e[M]=void 0;var i=!0}catch(e){}var n=O.call(e);return i&&(t?e[M]=r:delete e[M]),n}(e):function(e){return U.call(e)}(e)};var V=/^[-+]0x[0-9a-f]+$/i,j=/^0b[01]+$/i,q=/^0o[0-7]+$/i,H=parseInt;const z=function(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return null!=e&&"object"==typeof e}(e)&&"[object Symbol]"==$(e)}(e))return NaN;if(S(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=S(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=P(e);var r=j.test(e);return r||q.test(e)?H(e.slice(2),r?2:8):V.test(e)?NaN:+e};var W=Math.max,G=Math.min;var Y=i(24764),X=i(18503),Q=i(85471),Z=i(65043);const K=new class{constructor(){this.http=Z.Ay}listCollection(e){return this.http.get((0,o.KT)("collaboration/resources/collections/{collectionId}",{collectionId:e}))}renameCollection(e,t){return this.http.put((0,o.KT)("collaboration/resources/collections/{collectionId}",{collectionId:e}),{collectionName:t}).then((e=>e.data.ocs.data))}getCollectionsByResource(e,t){return this.http.get((0,o.KT)("collaboration/resources/{resourceType}/{resourceId}",{resourceType:e,resourceId:t})).then((e=>e.data.ocs.data))}createCollection(e,t,r){return this.http.post((0,o.KT)("collaboration/resources/{resourceType}/{resourceId}",{resourceType:e,resourceId:t}),{name:r}).then((e=>e.data.ocs.data))}addResource(e,t,r){return r=""+r,this.http.post((0,o.KT)("collaboration/resources/collections/{collectionId}",{collectionId:e}),{resourceType:t,resourceId:r}).then((e=>e.data.ocs.data))}removeResource(e,t,r){return this.http.delete((0,o.KT)("collaboration/resources/collections/{collectionId}",{collectionId:e}),{params:{resourceType:t,resourceId:r}}).then((e=>e.data.ocs.data))}search(e){return this.http.get((0,o.KT)("collaboration/resources/collections/search/{query}",{query:e})).then((e=>e.data.ocs.data))}},J=(0,Q.Kh)({collections:[]}),ee={addCollections(e){(0,Q.hZ)(J,"collections",e)},addCollection(e){J.collections.push(e)},removeCollection(e){(0,Q.hZ)(J,"collections",J.collections.filter((t=>t.id!==e)))},updateCollection(e){const t=J.collections.findIndex((t=>t.id===e.id));-1!==t?(0,Q.hZ)(J.collections,t,e):J.collections.push(e)}},te={fetchCollectionsByResource:({resourceType:e,resourceId:t})=>K.getCollectionsByResource(e,t).then((e=>(ee.addCollections(e),e))),createCollection:({baseResourceType:e,baseResourceId:t,resourceType:r,resourceId:i,name:n})=>K.createCollection(e,t,n).then((e=>{ee.addCollection(e),te.addResourceToCollection({collectionId:e.id,resourceType:r,resourceId:i})})),renameCollection:({collectionId:e,name:t})=>K.renameCollection(e,t).then((e=>(ee.updateCollection(e),e))),addResourceToCollection:({collectionId:e,resourceType:t,resourceId:r})=>K.addResource(e,t,r).then((e=>(ee.updateCollection(e),e))),removeResource:({collectionId:e,resourceType:t,resourceId:r})=>K.removeResource(e,t,r).then((e=>{e.resources.length>0?ee.updateCollection(e):ee.removeCollection(e)})),search:e=>K.search(e)};function re(e,t,r,i,n,s,a,o){var l,c="function"==typeof e?e.options:e;if(t&&(c.render=t,c.staticRenderFns=r,c._compiled=!0),i&&(c.functional=!0),s&&(c._scopeId="data-v-"+s),a?(l=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),n&&n.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(a)},c._ssrRegister=l):n&&(l=o?function(){n.call(this,(c.functional?this.parent:this).$root.$options.shadowRoot)}:n),l)if(c.functional){c._injectStyles=l;var h=c.render;c.render=function(e,t){return l.call(t),h(e,t)}}else{var u=c.beforeCreate;c.beforeCreate=u?[].concat(u,l):[l]}return{exports:e,options:c}}const ie=re({name:"CollectionListItem",components:{NcAvatar:_.A,NcActions:Y.A,NcActionButton:X.A},props:{collection:{type:Object,default:null}},data:()=>({detailsOpen:!1,newName:null,error:{}}),computed:{getIcon:()=>e=>[e.iconClass],typeClass:()=>e=>"resource-type-"+e.type,limitedResources:()=>e=>e.resources?e.resources.slice(0,2):[],iconUrl:()=>e=>e.mimetype?OC.MimeType.getIconUrl(e.mimetype):e.iconUrl?e.iconUrl:""},methods:{t:E.t,toggleDetails(){this.detailsOpen=!this.detailsOpen},showDetails(){this.detailsOpen=!0},hideDetails(){this.detailsOpen=!1},removeResource(e,t){te.removeResource({collectionId:e.id,resourceType:t.type,resourceId:t.id})},openRename(){this.newName=this.collection.name},renameCollection(){""!==this.newName?te.renameCollection({collectionId:this.collection.id,name:this.newName}).then((e=>{this.newName=null})).catch((e=>{this.$set(this.error,"rename",(0,E.t)("core","Failed to rename the project")),console.error(e),setTimeout((()=>{(0,Q.hZ)(this.error,"rename",null)}),3e3)})):this.newName=null}}},(function(){var e=this,t=e._self._c;return t("li",{staticClass:"collection-list-item"},[t("NcAvatar",{staticClass:"collection-avatar",attrs:{"display-name":e.collection.name,"allow-placeholder":""}}),null===e.newName?t("span",{staticClass:"collection-item-name",attrs:{title:""},on:{click:e.showDetails}},[e._v(e._s(e.collection.name))]):t("form",{class:{shouldshake:e.error.rename},on:{submit:function(t){return t.preventDefault(),e.renameCollection.apply(null,arguments)}}},[t("input",{directives:[{name:"model",rawName:"v-model",value:e.newName,expression:"newName"}],attrs:{type:"text",autocomplete:"off",autocapitalize:"off"},domProps:{value:e.newName},on:{input:function(t){t.target.composing||(e.newName=t.target.value)}}}),t("input",{staticClass:"icon-confirm",attrs:{type:"submit",value:""}})]),e.detailsOpen||null!==e.newName?e._e():t("div",{staticClass:"linked-icons"},e._l(e.limitedResources(e.collection),(function(r){return t("a",{key:r.type+"|"+r.id,class:e.typeClass(r),attrs:{title:r.name,href:r.link}},[t("img",{attrs:{src:e.iconUrl(r)}})])})),0),null===e.newName?t("span",{staticClass:"sharingOptionsGroup"},[t("NcActions",[t("NcActionButton",{attrs:{icon:"icon-info"},on:{click:function(t){return t.preventDefault(),e.toggleDetails.apply(null,arguments)}}},[e._v(" "+e._s(e.detailsOpen?e.t("core","Hide details"):e.t("core","Show details"))+" ")]),t("NcActionButton",{attrs:{icon:"icon-rename"},on:{click:function(t){return t.preventDefault(),e.openRename.apply(null,arguments)}}},[e._v(" "+e._s(e.t("core","Rename project"))+" ")])],1)],1):e._e(),t("transition",{attrs:{name:"fade"}},[e.error.rename?t("div",{staticClass:"error"},[e._v(" "+e._s(e.error.rename)+" ")]):e._e()]),t("transition",{attrs:{name:"fade"}},[e.detailsOpen?t("ul",{staticClass:"resource-list-details"},e._l(e.collection.resources,(function(r){return t("li",{key:r.type+"|"+r.id,class:e.typeClass(r)},[t("a",{attrs:{href:r.link}},[t("img",{attrs:{src:e.iconUrl(r)}}),t("span",{staticClass:"resource-name"},[e._v(e._s(r.name||""))])]),t("span",{staticClass:"icon-close",on:{click:function(t){return e.removeResource(e.collection,r)}}})])})),0):e._e()])],1)}),[],!1,null,"42733c12",null,null).exports,ne=function(e,t,r){var i,n,s,a,o,l,c=0,h=!1,u=!1,d=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function p(t){var r=i,s=n;return i=n=void 0,c=t,a=e.apply(s,r)}function f(e){var r=e-l;return void 0===l||r>=t||r<0||u&&e-c>=s}function A(){var e=D();if(f(e))return g(e);o=setTimeout(A,function(e){var r=t-(e-l);return u?G(r,s-(e-c)):r}(e))}function g(e){return o=void 0,d&&i?p(e):(i=n=void 0,a)}function m(){var e=D(),r=f(e);if(i=arguments,n=this,l=e,r){if(void 0===o)return function(e){return c=e,o=setTimeout(A,t),h?p(e):a}(l);if(u)return clearTimeout(o),o=setTimeout(A,t),p(l)}return void 0===o&&(o=setTimeout(A,t)),a}return t=z(t)||0,S(r)&&(h=!!r.leading,s=(u="maxWait"in r)?W(z(r.maxWait)||0,t):s,d="trailing"in r?!!r.trailing:d),m.cancel=function(){void 0!==o&&clearTimeout(o),c=0,i=l=n=o=void 0},m.flush=function(){return void 0===o?a:g(D())},m}((function(e,t){""!==e&&(t(!0),te.search(e).then((e=>{this.searchCollections=e})).catch((e=>{console.error("Failed to search for collections",e)})).finally((()=>{t(!1)})))}),500,{}),se={name:"CollectionList",components:{CollectionListItem:ie,NcAvatar:_.A,NcSelect:b.A},props:{type:{type:String,default:null},id:{type:String,default:null},name:{type:String,default:""},isActive:{type:Boolean,default:!0}},setup:()=>({state:J}),data:()=>({selectIsOpen:!1,generatingCodes:!1,codes:void 0,value:null,model:{},searchCollections:[],error:null,isSelectOpen:!1}),computed:{collections(){return this.state.collections.filter((e=>void 0!==e.resources.find((e=>e&&e.id===""+this.id&&e.type===this.type))))},placeholder(){return this.isSelectOpen?(0,E.t)("core","Type to search for existing projects"):(0,E.t)("core","Add to a project")},options(){const e=[];window.OCP.Collaboration.getTypes().sort().forEach((t=>{e.push({method:0,type:t,title:window.OCP.Collaboration.getLabel(t),class:window.OCP.Collaboration.getIcon(t),action:()=>window.OCP.Collaboration.trigger(t)})}));for(const t in this.searchCollections)-1===this.collections.findIndex((e=>e.id===this.searchCollections[t].id))&&e.push({method:1,title:this.searchCollections[t].name,collectionId:this.searchCollections[t].id});return e}},watch:{type(){this.isActive&&te.fetchCollectionsByResource({resourceType:this.type,resourceId:this.id})},id(){this.isActive&&te.fetchCollectionsByResource({resourceType:this.type,resourceId:this.id})},isActive(e){e&&te.fetchCollectionsByResource({resourceType:this.type,resourceId:this.id})}},mounted(){te.fetchCollectionsByResource({resourceType:this.type,resourceId:this.id})},methods:{t:E.t,select(e,t){0===e.method&&e.action().then((t=>{te.createCollection({baseResourceType:this.type,baseResourceId:this.id,resourceType:e.type,resourceId:t,name:this.name}).catch((e=>{this.setError((0,E.t)("core","Failed to create a project"),e)}))})).catch((e=>{console.error("No resource selected",e)})),1===e.method&&te.addResourceToCollection({collectionId:e.collectionId,resourceType:this.type,resourceId:this.id}).catch((e=>{this.setError((0,E.t)("core","Failed to add the item to the project"),e)}))},search(e,t){ne.bind(this)(e,t)},showSelect(){this.selectIsOpen=!0,this.$refs.select.$el.focus()},hideSelect(){this.selectIsOpen=!1},isVueComponent:e=>e._isVue,setError(e,t){console.error(e,t),this.error=e,setTimeout((()=>{this.error=null}),5e3)}}},ae=re(se,(function(){var e=this,t=e._self._c;return e.collections&&e.type&&e.id?t("ul",{staticClass:"collection-list",attrs:{id:"collection-list"}},[t("li",{on:{click:e.showSelect}},[e._m(0),t("div",{attrs:{id:"collection-select-container"}},[t("NcSelect",{ref:"select",attrs:{"aria-label-combobox":e.t("core","Add to a project"),options:e.options,placeholder:e.placeholder,label:"title",limit:5},on:{close:function(t){e.isSelectOpen=!1},open:function(t){e.isSelectOpen=!0},"option:selected":e.select,search:e.search},scopedSlots:e._u([{key:"selected-option",fn:function(r){return[t("span",{staticClass:"option__desc"},[t("span",{staticClass:"option__title"},[e._v(e._s(r.title))])])]}},{key:"option",fn:function(r){return[t("span",{staticClass:"option__wrapper"},[r.class?t("span",{staticClass:"avatar",class:r.class}):2!==r.method?t("NcAvatar",{attrs:{"allow-placeholder":"","display-name":r.title}}):e._e(),t("span",{staticClass:"option__title"},[e._v(e._s(r.title))])],1)]}}],null,!1,2397208459),model:{value:e.value,callback:function(t){e.value=t},expression:"value"}},[t("p",{staticClass:"hint"},[e._v(" "+e._s(e.t("core","Connect items to a project to make them easier to find"))+" ")])])],1)]),t("transition",{attrs:{name:"fade"}},[e.error?t("li",{staticClass:"error"},[e._v(" "+e._s(e.error)+" ")]):e._e()]),e._l(e.collections,(function(e){return t("CollectionListItem",{key:e.id,attrs:{collection:e}})}))],2):e._e()}),[function(){var e=this._self._c;return e("div",{staticClass:"avatar"},[e("span",{staticClass:"icon-projects"})])}],!1,null,"8ebb2593",null,null).exports;var oe=i(77905),le=i(19231),ce=i(87485);class he{constructor(){(function(e,t,r){(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})(this,"_capabilities",void 0),this._capabilities=(0,ce.F)()}get defaultPermissions(){return this._capabilities.files_sharing?.default_permissions}get isPublicUploadEnabled(){return!0===this._capabilities.files_sharing?.public?.upload}get federatedShareDocLink(){return window.OC.appConfig.core.federatedCloudShareDoc}get defaultExpirationDate(){return this.isDefaultExpireDateEnabled&&null!==this.defaultExpireDate?new Date((new Date).setDate((new Date).getDate()+this.defaultExpireDate)):null}get defaultInternalExpirationDate(){return this.isDefaultInternalExpireDateEnabled&&null!==this.defaultInternalExpireDate?new Date((new Date).setDate((new Date).getDate()+this.defaultInternalExpireDate)):null}get defaultRemoteExpirationDateString(){return this.isDefaultRemoteExpireDateEnabled&&null!==this.defaultRemoteExpireDate?new Date((new Date).setDate((new Date).getDate()+this.defaultRemoteExpireDate)):null}get enforcePasswordForPublicLink(){return!0===window.OC.appConfig.core.enforcePasswordForPublicLink}get enableLinkPasswordByDefault(){return!0===window.OC.appConfig.core.enableLinkPasswordByDefault}get isDefaultExpireDateEnforced(){return!0===window.OC.appConfig.core.defaultExpireDateEnforced}get isDefaultExpireDateEnabled(){return!0===window.OC.appConfig.core.defaultExpireDateEnabled}get isDefaultInternalExpireDateEnforced(){return!0===window.OC.appConfig.core.defaultInternalExpireDateEnforced}get isDefaultInternalExpireDateEnabled(){return!0===window.OC.appConfig.core.defaultInternalExpireDateEnabled}get isDefaultRemoteExpireDateEnforced(){return!0===window.OC.appConfig.core.defaultRemoteExpireDateEnforced}get isDefaultRemoteExpireDateEnabled(){return!0===window.OC.appConfig.core.defaultRemoteExpireDateEnabled}get isRemoteShareAllowed(){return!0===window.OC.appConfig.core.remoteShareAllowed}get isPublicShareAllowed(){return!0===this._capabilities?.files_sharing?.public?.enabled}get isMailShareAllowed(){return!0===this._capabilities?.files_sharing?.sharebymail?.enabled&&!0===this.isPublicShareAllowed}get defaultExpireDate(){return window.OC.appConfig.core.defaultExpireDate}get defaultInternalExpireDate(){return window.OC.appConfig.core.defaultInternalExpireDate}get defaultRemoteExpireDate(){return window.OC.appConfig.core.defaultRemoteExpireDate}get isResharingAllowed(){return!0===window.OC.appConfig.core.resharingAllowed}get isPasswordForMailSharesRequired(){return!0===this._capabilities.files_sharing?.sharebymail?.password?.enforced}get shouldAlwaysShowUnique(){return!0===this._capabilities.files_sharing?.sharee?.always_show_unique}get allowGroupSharing(){return!0===window.OC.appConfig.core.allowGroupSharing}get maxAutocompleteResults(){return parseInt(window.OC.config["sharing.maxAutocompleteResults"],10)||25}get minSearchStringLength(){return parseInt(window.OC.config["sharing.minSearchStringLength"],10)||0}get passwordPolicy(){return this._capabilities?.password_policy||{}}}var ue=i(35947);const de=(0,ue.YK)().setApp("files_sharing").detectUser().build();class pe{constructor(e){if(function(e,t,r){(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r}(this,"_share",void 0),e.ocs&&e.ocs.data&&e.ocs.data[0]&&(e=e.ocs.data[0]),e.hide_download=!!e.hide_download,e.mail_send=!!e.mail_send,e.attributes&&"string"==typeof e.attributes)try{e.attributes=JSON.parse(e.attributes)}catch(t){console.warn("Could not parse share attributes returned by server",e.attributes)}e.attributes=e.attributes??[],this._share=e}get state(){return this._share}get id(){return this._share.id}get type(){return this._share.share_type}get permissions(){return this._share.permissions}get attributes(){return this._share.attributes}set permissions(e){this._share.permissions=e}get owner(){return this._share.uid_owner}get ownerDisplayName(){return this._share.displayname_owner}get shareWith(){return this._share.share_with}get shareWithDisplayName(){return this._share.share_with_displayname||this._share.share_with}get shareWithDisplayNameUnique(){return this._share.share_with_displayname_unique||this._share.share_with}get shareWithLink(){return this._share.share_with_link}get shareWithAvatar(){return this._share.share_with_avatar}get uidFileOwner(){return this._share.uid_file_owner}get displaynameFileOwner(){return this._share.displayname_file_owner||this._share.uid_file_owner}get createdTime(){return this._share.stime}get expireDate(){return this._share.expiration}set expireDate(e){this._share.expiration=e}get token(){return this._share.token}get note(){return this._share.note}set note(e){this._share.note=e}get label(){return this._share.label??""}set label(e){this._share.label=e}get mailSend(){return!0===this._share.mail_send}get hideDownload(){return!0===this._share.hide_download}set hideDownload(e){this._share.hide_download=!0===e}get password(){return this._share.password}set password(e){this._share.password=e}get passwordExpirationTime(){return this._share.password_expiration_time}set passwordExpirationTime(e){this._share.password_expiration_time=e}get sendPasswordByTalk(){return this._share.send_password_by_talk}set sendPasswordByTalk(e){this._share.send_password_by_talk=e}get path(){return this._share.path}get itemType(){return this._share.item_type}get mimetype(){return this._share.mimetype}get fileSource(){return this._share.file_source}get fileTarget(){return this._share.file_target}get fileParent(){return this._share.file_parent}get hasReadPermission(){return!!(this.permissions&window.OC.PERMISSION_READ)}get hasCreatePermission(){return!!(this.permissions&window.OC.PERMISSION_CREATE)}get hasDeletePermission(){return!!(this.permissions&window.OC.PERMISSION_DELETE)}get hasUpdatePermission(){return!!(this.permissions&window.OC.PERMISSION_UPDATE)}get hasSharePermission(){return!!(this.permissions&window.OC.PERMISSION_SHARE)}get hasDownloadPermission(){return this.attributes.some((e=>"permissions"===e.scope&&"download"===e.key&&!1===e.value))}get isFileRequest(){return function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"[]";const t=e=>"fileRequest"===e.scope&&"enabled"===e.key&&!0===e.value;try{return JSON.parse(e).some(t)}catch(e){return de.error("Error while parsing share attributes",{error:e}),!1}}(JSON.stringify(this.attributes))}set hasDownloadPermission(e){this.setAttribute("permissions","download",!!e)}setAttribute(e,t,r){const i={scope:e,key:t,value:r};for(const e in this._share.attributes){const t=this._share.attributes[e];if(t.scope===i.scope&&t.key===i.key)return void this._share.attributes.splice(e,1,i)}this._share.attributes.push(i)}get canEdit(){return!0===this._share.can_edit}get canDelete(){return!0===this._share.can_delete}get viaFileid(){return this._share.via_fileid}get viaPath(){return this._share.via_path}get parent(){return this._share.parent}get storageId(){return this._share.storage_id}get storage(){return this._share.storage}get itemSource(){return this._share.item_source}get status(){return this._share.status}}var fe=i(85168),Ae=i(54373),ge=i(31773);const me={name:"SharingEntrySimple",components:{NcActions:Y.A},props:{title:{type:String,default:"",required:!0},subtitle:{type:String,default:""},isUnique:{type:Boolean,default:!0},ariaExpanded:{type:Boolean,default:null}},computed:{ariaExpandedValue(){return null===this.ariaExpanded?this.ariaExpanded:this.ariaExpanded?"true":"false"}}};var ye=i(86495),ve={};ve.styleTagTransform=v(),ve.setAttributes=A(),ve.insert=p().bind(null,"head"),ve.domAPI=u(),ve.insertStyleElement=m(),c()(ye.A,ve),ye.A&&ye.A.locals&&ye.A.locals;var Ce=i(14486);const we=(0,Ce.A)(me,(function(){var e=this,t=e._self._c;return t("li",{staticClass:"sharing-entry"},[e._t("avatar"),e._v(" "),t("div",{staticClass:"sharing-entry__desc"},[t("span",{staticClass:"sharing-entry__title"},[e._v(e._s(e.title))]),e._v(" "),e.subtitle?t("p",[e._v("\n\t\t\t"+e._s(e.subtitle)+"\n\t\t")]):e._e()]),e._v(" "),e.$slots.default?t("NcActions",{ref:"actionsComponent",staticClass:"sharing-entry__actions",attrs:{"menu-align":"right","aria-expanded":e.ariaExpandedValue}},[e._t("default")],2):e._e()],2)}),[],!1,null,"4c49edf4",null).exports,Ee={name:"SharingEntryInternal",components:{NcActionButton:X.A,SharingEntrySimple:we,CheckIcon:Ae.A,ClipboardIcon:ge.A},props:{fileInfo:{type:Object,default:()=>{},required:!0}},data:()=>({copied:!1,copySuccess:!1}),computed:{internalLink(){return window.location.protocol+"//"+window.location.host+(0,o.Jv)("/f/")+this.fileInfo.id},copyLinkTooltip(){return this.copied?this.copySuccess?"":t("files_sharing","Cannot copy, please copy the link manually"):t("files_sharing","Copy internal link to clipboard")},internalLinkSubtitle(){return"dir"===this.fileInfo.type?t("files_sharing","Only works for people with access to this folder"):t("files_sharing","Only works for people with access to this file")}},methods:{async copyLink(){try{await navigator.clipboard.writeText(this.internalLink),(0,fe.Te)(t("files_sharing","Link copied")),this.$refs.shareEntrySimple.$refs.actionsComponent.$el.focus(),this.copySuccess=!0,this.copied=!0}catch(e){this.copySuccess=!1,this.copied=!0,console.error(e)}finally{setTimeout((()=>{this.copySuccess=!1,this.copied=!1}),4e3)}}}};var _e=i(23815),be={};be.styleTagTransform=v(),be.setAttributes=A(),be.insert=p().bind(null,"head"),be.domAPI=u(),be.insertStyleElement=m(),c()(_e.A,be),_e.A&&_e.A.locals&&_e.A.locals;const Se=(0,Ce.A)(Ee,(function(){var e=this,t=e._self._c;return t("ul",[t("SharingEntrySimple",{ref:"shareEntrySimple",staticClass:"sharing-entry__internal",attrs:{title:e.t("files_sharing","Internal link"),subtitle:e.internalLinkSubtitle},scopedSlots:e._u([{key:"avatar",fn:function(){return[t("div",{staticClass:"avatar-external icon-external-white"})]},proxy:!0}])},[e._v(" "),t("NcActionButton",{attrs:{title:e.copyLinkTooltip,"aria-label":e.copyLinkTooltip},on:{click:e.copyLink},scopedSlots:e._u([{key:"icon",fn:function(){return[e.copied&&e.copySuccess?t("CheckIcon",{staticClass:"icon-checkmark-color",attrs:{size:20}}):t("ClipboardIcon",{attrs:{size:20}})]},proxy:!0}])})],1)],1)}),[],!1,null,"1d9a7cfa",null).exports;var xe=i(17334),Ie=i.n(xe),ke=(i(48318),i(61338));const De=(0,o.KT)("apps/files_sharing/api/v1/shares"),Te={methods:{async createShare(e){let{path:r,permissions:i,shareType:n,shareWith:s,publicUpload:a,password:o,sendPasswordByTalk:l,expireDate:c,label:h,note:u,attributes:d}=e;try{const e=await Z.Ay.post(De,{path:r,permissions:i,shareType:n,shareWith:s,publicUpload:a,password:o,sendPasswordByTalk:l,expireDate:c,label:h,note:u,attributes:d});if(!e?.data?.ocs)throw e;const t=new pe(e.data.ocs.data);return(0,ke.Ic)("files_sharing:share:created",{share:t}),t}catch(e){console.error("Error while creating share",e);const r=e?.response?.data?.ocs?.meta?.message;throw OC.Notification.showTemporary(r?t("files_sharing","Error creating the share: {errorMessage}",{errorMessage:r}):t("files_sharing","Error creating the share"),{type:"error"}),e}},async deleteShare(e){try{const t=await Z.Ay.delete(De+`/${e}`);if(!t?.data?.ocs)throw t;return(0,ke.Ic)("files_sharing:share:deleted",{id:e}),!0}catch(e){console.error("Error while deleting share",e);const r=e?.response?.data?.ocs?.meta?.message;throw OC.Notification.showTemporary(r?t("files_sharing","Error deleting the share: {errorMessage}",{errorMessage:r}):t("files_sharing","Error deleting the share"),{type:"error"}),e}},async updateShare(e,r){try{const t=await Z.Ay.put(De+`/${e}`,r);if((0,ke.Ic)("files_sharing:share:updated",{id:e}),t?.data?.ocs)return t.data.ocs.data;throw t}catch(e){if(console.error("Error while updating share",e),400!==e.response.status){const r=e?.response?.data?.ocs?.meta?.message;OC.Notification.showTemporary(r?t("files_sharing","Error updating the share: {errorMessage}",{errorMessage:r}):t("files_sharing","Error updating the share"),{type:"error"})}const r=e.response.data.ocs.meta.message;throw new Error(r)}}}},Ne={methods:{async openSharingDetails(e){let t={};if(e.handler){const r={};this.suggestions&&(r.suggestions=this.suggestions,r.fileInfo=this.fileInfo,r.query=this.query);const i=await e.handler(r);t=this.mapShareRequestToShareObject(i)}else t=this.mapShareRequestToShareObject(e);const r={fileInfo:this.fileInfo,share:t};this.$emit("open-sharing-details",r)},openShareDetailsForCustomSettings(e){e.setCustomPermissions=!0,this.openSharingDetails(e)},mapShareRequestToShareObject(e){if(e.id)return e;const t={attributes:[{value:!0,key:"download",scope:"permissions"}],share_type:e.shareType,share_with:e.shareWith,is_no_user:e.isNoUser,user:e.shareWith,share_with_displayname:e.displayName,subtitle:e.subtitle,permissions:e.permissions??(new he).defaultPermissions,expiration:""};return new pe(t)}}},Pe={name:"SharingInput",components:{NcSelect:b.A},mixins:[Te,Ne],props:{shares:{type:Array,default:()=>[],required:!0},linkShares:{type:Array,default:()=>[],required:!0},fileInfo:{type:Object,default:()=>{},required:!0},reshare:{type:pe,default:null},canReshare:{type:Boolean,required:!0}},data:()=>({config:new he,loading:!1,query:"",recommendations:[],ShareSearch:OCA.Sharing.ShareSearch.state,suggestions:[],value:null}),computed:{externalResults(){return this.ShareSearch.results},inputPlaceholder(){const e=this.config.isRemoteShareAllowed;return this.canReshare?e?t("files_sharing","Name, email, or Federated Cloud ID …"):t("files_sharing","Name or email …"):t("files_sharing","Resharing is not allowed")},isValidQuery(){return this.query&&""!==this.query.trim()&&this.query.length>this.config.minSearchStringLength},options(){return this.isValidQuery?this.suggestions:this.recommendations},noResultText(){return this.loading?t("files_sharing","Searching …"):t("files_sharing","No elements found.")}},mounted(){this.getRecommendations()},methods:{onSelected(e){this.value=null,this.openSharingDetails(e)},async asyncFind(e){this.query=e.trim(),this.isValidQuery&&(this.loading=!0,await this.debounceGetSuggestions(e))},async getSuggestions(e){let r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.loading=!0,!0===(0,ce.F)().files_sharing.sharee.query_lookup_default&&(r=!0);const i=[oe.I.User,oe.I.Group,oe.I.Remote,oe.I.RemoteGroup,oe.I.Team,oe.I.Room,oe.I.Guest,oe.I.Deck,oe.I.ScienceMesh];!0===(0,ce.F)().files_sharing.public.enabled&&i.push(oe.I.Email);let n=null;try{n=await Z.Ay.get((0,o.KT)("apps/files_sharing/api/v1/sharees"),{params:{format:"json",itemType:"dir"===this.fileInfo.type?"folder":"file",search:e,lookup:r,perPage:this.config.maxAutocompleteResults,shareType:i}})}catch(e){return void console.error("Error fetching suggestions",e)}const s=n.data.ocs.data,a=n.data.ocs.data.exact;s.exact=[];const l=Object.values(a).reduce(((e,t)=>e.concat(t)),[]),c=Object.values(s).reduce(((e,t)=>e.concat(t)),[]),h=this.filterOutExistingShares(l).map((e=>this.formatForMultiselect(e))).sort(((e,t)=>e.shareType-t.shareType)),u=this.filterOutExistingShares(c).map((e=>this.formatForMultiselect(e))).sort(((e,t)=>e.shareType-t.shareType)),d=[];s.lookupEnabled&&!r&&d.push({id:"global-lookup",isNoUser:!0,displayName:t("files_sharing","Search globally"),lookup:!0});const p=this.externalResults.filter((e=>!e.condition||e.condition(this))),f=h.concat(u).concat(p).concat(d),A=f.reduce(((e,t)=>t.displayName?(e[t.displayName]||(e[t.displayName]=0),e[t.displayName]++,e):e),{});this.suggestions=f.map((e=>A[e.displayName]>1&&!e.desc?{...e,desc:e.shareWithDisplayNameUnique}:e)),this.loading=!1,console.info("suggestions",this.suggestions)},debounceGetSuggestions:Ie()((function(){this.getSuggestions(...arguments)}),300),async getRecommendations(){this.loading=!0;let e=null;try{e=await Z.Ay.get((0,o.KT)("apps/files_sharing/api/v1/sharees_recommended"),{params:{format:"json",itemType:this.fileInfo.type}})}catch(e){return void console.error("Error fetching recommendations",e)}const t=this.externalResults.filter((e=>!e.condition||e.condition(this))),r=Object.values(e.data.ocs.data.exact).reduce(((e,t)=>e.concat(t)),[]);this.recommendations=this.filterOutExistingShares(r).map((e=>this.formatForMultiselect(e))).concat(t),this.loading=!1,console.info("recommendations",this.recommendations)},filterOutExistingShares(e){return e.reduce(((e,t)=>{if("object"!=typeof t)return e;try{if(t.value.shareType===oe.I.User){if(t.value.shareWith===(0,n.HW)().uid)return e;if(this.reshare&&t.value.shareWith===this.reshare.owner)return e}if(t.value.shareType===oe.I.Email){if(-1!==this.linkShares.map((e=>e.shareWith)).indexOf(t.value.shareWith.trim()))return e}else{const r=this.shares.reduce(((e,t)=>(e[t.shareWith]=t.type,e)),{}),i=t.value.shareWith.trim();if(i in r&&r[i]===t.value.shareType)return e}e.push(t)}catch{return e}return e}),[])},shareTypeToIcon(e){switch(e){case oe.I.Guest:return{icon:"icon-user",iconTitle:t("files_sharing","Guest")};case oe.I.RemoteGroup:case oe.I.Group:return{icon:"icon-group",iconTitle:t("files_sharing","Group")};case oe.I.Email:return{icon:"icon-mail",iconTitle:t("files_sharing","Email")};case oe.I.Team:return{icon:"icon-teams",iconTitle:t("files_sharing","Team")};case oe.I.Room:return{icon:"icon-room",iconTitle:t("files_sharing","Talk conversation")};case oe.I.Deck:return{icon:"icon-deck",iconTitle:t("files_sharing","Deck board")};case oe.I.Sciencemesh:return{icon:"icon-sciencemesh",iconTitle:t("files_sharing","ScienceMesh")};default:return{}}},formatForMultiselect(e){let r;return r=e.value.shareType===oe.I.User&&this.config.shouldAlwaysShowUnique?e.shareWithDisplayNameUnique??"":e.value.shareType!==oe.I.Remote&&e.value.shareType!==oe.I.RemoteGroup||!e.value.server?e.value.shareType===oe.I.Email?e.value.shareWith:e.shareWithDescription??"":t("files_sharing","on {server}",{server:e.value.server}),{shareWith:e.value.shareWith,shareType:e.value.shareType,user:e.uuid||e.value.shareWith,isNoUser:e.value.shareType!==oe.I.User,displayName:e.name||e.label,subname:r,shareWithDisplayNameUnique:e.shareWithDisplayNameUnique||"",...this.shareTypeToIcon(e.value.shareType)}}}};var Re=i(6342),Be={};Be.styleTagTransform=v(),Be.setAttributes=A(),Be.insert=p().bind(null,"head"),Be.domAPI=u(),Be.insertStyleElement=m(),c()(Re.A,Be),Re.A&&Re.A.locals&&Re.A.locals;const Le=(0,Ce.A)(Pe,(function(){var e=this,t=e._self._c;return t("div",{staticClass:"sharing-search"},[t("label",{attrs:{for:"sharing-search-input"}},[e._v(e._s(e.t("files_sharing","Search for share recipients")))]),e._v(" "),t("NcSelect",{ref:"select",staticClass:"sharing-search__input",attrs:{"input-id":"sharing-search-input",disabled:!e.canReshare,loading:e.loading,filterable:!1,placeholder:e.inputPlaceholder,"clear-search-on-blur":()=>!1,"user-select":!0,options:e.options,"label-outside":!0},on:{search:e.asyncFind,"option:selected":e.onSelected},scopedSlots:e._u([{key:"no-options",fn:function(t){let{search:r}=t;return[e._v("\n\t\t\t"+e._s(r?e.noResultText:e.t("files_sharing","No recommendations. Start typing."))+"\n\t\t")]}}]),model:{value:e.value,callback:function(t){e.value=t},expression:"value"}})],1)}),[],!1,null,null,null).exports;var Oe=i(71225),Me=i(69321),Ue=i(73010);const Fe=(0,s.H4)();var $e=i(49264);const Ve={NONE:0,READ:1,UPDATE:2,CREATE:4,DELETE:8,SHARE:16},je={READ_ONLY:Ve.READ,UPLOAD_AND_UPDATE:Ve.READ|Ve.UPDATE|Ve.CREATE|Ve.DELETE,FILE_DROP:Ve.CREATE,ALL:Ve.UPDATE|Ve.CREATE|Ve.READ|Ve.DELETE|Ve.SHARE,ALL_FILE:Ve.UPDATE|Ve.READ|Ve.SHARE};const qe={mixins:[Te],props:{fileInfo:{type:Object,default:()=>{},required:!0},share:{type:pe,default:null},isUnique:{type:Boolean,default:!0}},data(){return{config:new he,node:null,ShareType:oe.I,errors:{},loading:!1,saving:!1,open:!1,updateQueue:new $e.A({concurrency:1}),reactiveState:this.share?.state}},computed:{path(){return(this.fileInfo.path+"/"+this.fileInfo.name).replace("//","/")},hasNote:{get(){return""!==this.share.note},set(e){this.share.note=e?null:""}},dateTomorrow:()=>new Date((new Date).setDate((new Date).getDate()+1)),lang(){const e=window.dayNamesShort?window.dayNamesShort:["Sun.","Mon.","Tue.","Wed.","Thu.","Fri.","Sat."],t=window.monthNamesShort?window.monthNamesShort:["Jan.","Feb.","Mar.","Apr.","May.","Jun.","Jul.","Aug.","Sep.","Oct.","Nov.","Dec."];return{formatLocale:{firstDayOfWeek:window.firstDay?window.firstDay:0,monthsShort:t,weekdaysMin:e,weekdaysShort:e},monthFormat:"MMM"}},isFolder(){return"dir"===this.fileInfo.type},isPublicShare(){const e=this.share.shareType??this.share.type;return[oe.I.Link,oe.I.Email].includes(e)},isRemoteShare(){return this.share.type===oe.I.RemoteGroup||this.share.type===oe.I.Remote},isShareOwner(){return this.share&&this.share.owner===(0,n.HW)().uid},isExpiryDateEnforced(){return this.isPublicShare?this.config.isDefaultExpireDateEnforced:this.isRemoteShare?this.config.isDefaultRemoteExpireDateEnforced:this.config.isDefaultInternalExpireDateEnforced},hasCustomPermissions(){return![je.ALL,je.READ_ONLY,je.FILE_DROP].includes(this.share.permissions)},maxExpirationDateEnforced(){return this.isExpiryDateEnforced?this.isPublicShare?this.config.defaultExpirationDate:this.isRemoteShare?this.config.defaultRemoteExpirationDateString:this.config.defaultInternalExpirationDate:null}},methods:{async getNode(){const e={path:this.path};try{this.node=await(async e=>{const t=(0,s.VL)(),r=await Fe.stat(`${s.lJ}${e.path}`,{details:!0,data:t});return(0,s.Al)(r.data)})(e),de.info("Fetched node:",{node:this.node})}catch(e){de.error("Error:",e)}},checkShare:e=>(!e.password||"string"==typeof e.password&&""!==e.password.trim())&&!(e.expirationDate&&!e.expirationDate.isValid()),formatDateToString:e=>new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate())).toISOString().split("T")[0],onExpirationChange:Ie()((function(e){this.share.expireDate=this.formatDateToString(new Date(e))}),500),onExpirationDisable(){this.share.expireDate=""},onNoteChange(e){this.$set(this.share,"newNote",e.trim())},onNoteSubmit(){this.share.newNote&&(this.share.note=this.share.newNote,this.$delete(this.share,"newNote"),this.queueUpdate("note"))},async onDelete(){try{this.loading=!0,this.open=!1,await this.deleteShare(this.share.id),console.debug("Share deleted",this.share.id);const e="file"===this.share.itemType?t("files_sharing",'File "{path}" has been unshared',{path:this.share.path}):t("files_sharing",'Folder "{path}" has been unshared',{path:this.share.path});(0,fe.Te)(e),this.$emit("remove:share",this.share),await this.getNode(),(0,ke.Ic)("files:node:updated",this.node)}catch(e){this.open=!0}finally{this.loading=!1}},queueUpdate(){for(var e=arguments.length,r=new Array(e),i=0;i{"object"==typeof this.share[t]?e[t]=JSON.stringify(this.share[t]):e[t]=this.share[t].toString()})),void this.updateQueue.add((async()=>{this.saving=!0,this.errors={};try{const t=await this.updateShare(this.share.id,e);r.indexOf("password")>=0&&(this.$delete(this.share,"newPassword"),this.share.passwordExpirationTime=t.password_expiration_time),this.$delete(this.errors,r[0]),(0,fe.Te)(this.updateSuccessMessage(r))}catch(e){de.error("Could not update share",{error:e,share:this.share,propertyNames:r});const{message:i}=e;i&&""!==i?(this.onSyncError(r[0],i),(0,fe.Qg)(i)):(0,fe.Qg)(t("files_sharing","Could not update share"))}finally{this.saving=!1}}))}console.debug("Updated local share",this.share)}},updateSuccessMessage(e){if(1!==e.length)return t("files_sharing","Share saved");switch(e[0]){case"expireDate":return t("files_sharing","Share expiry date saved");case"hideDownload":return t("files_sharing","Share hide-download state saved");case"label":return t("files_sharing","Share label saved");case"note":return t("files_sharing","Share note for recipient saved");case"password":return t("files_sharing","Share password saved");case"permissions":return t("files_sharing","Share permissions saved");default:return t("files_sharing","Share saved")}},onSyncError(e,t){switch(this.open=!0,e){case"password":case"pending":case"expireDate":case"label":case"note":{this.$set(this.errors,e,t);let r=this.$refs[e];if(r){r.$el&&(r=r.$el);const e=r.querySelector(".focusable");e&&e.focus()}break}case"sendPasswordByTalk":this.$set(this.errors,e,t),this.share.sendPasswordByTalk=!this.share.sendPasswordByTalk}},debounceQueueUpdate:Ie()((function(e){this.queueUpdate(e)}),500)}},He={name:"SharingEntryInherited",components:{NcActionButton:X.A,NcActionLink:Me.A,NcActionText:Ue.A,NcAvatar:_.A,SharingEntrySimple:we},mixins:[qe],props:{share:{type:pe,required:!0}},computed:{viaFileTargetUrl(){return(0,o.Jv)("/f/{fileid}",{fileid:this.share.viaFileid})},viaFolderName(){return(0,Oe.P8)(this.share.viaPath)}}};var ze=i(88346),We={};We.styleTagTransform=v(),We.setAttributes=A(),We.insert=p().bind(null,"head"),We.domAPI=u(),We.insertStyleElement=m(),c()(ze.A,We),ze.A&&ze.A.locals&&ze.A.locals;const Ge=(0,Ce.A)(He,(function(){var e=this,t=e._self._c;return t("SharingEntrySimple",{key:e.share.id,staticClass:"sharing-entry__inherited",attrs:{title:e.share.shareWithDisplayName},scopedSlots:e._u([{key:"avatar",fn:function(){return[t("NcAvatar",{staticClass:"sharing-entry__avatar",attrs:{user:e.share.shareWith,"display-name":e.share.shareWithDisplayName}})]},proxy:!0}])},[e._v(" "),t("NcActionText",{attrs:{icon:"icon-user"}},[e._v("\n\t\t"+e._s(e.t("files_sharing","Added by {initiator}",{initiator:e.share.ownerDisplayName}))+"\n\t")]),e._v(" "),e.share.viaPath&&e.share.viaFileid?t("NcActionLink",{attrs:{icon:"icon-folder",href:e.viaFileTargetUrl}},[e._v("\n\t\t"+e._s(e.t("files_sharing","Via “{folder}”",{folder:e.viaFolderName}))+"\n\t")]):e._e(),e._v(" "),e.share.canDelete?t("NcActionButton",{attrs:{icon:"icon-close"},on:{click:function(t){return t.preventDefault(),e.onDelete.apply(null,arguments)}}},[e._v("\n\t\t"+e._s(e.t("files_sharing","Unshare"))+"\n\t")]):e._e()],1)}),[],!1,null,"32cb91ce",null).exports,Ye={name:"SharingInherited",components:{NcActionButton:X.A,SharingEntryInherited:Ge,SharingEntrySimple:we},props:{fileInfo:{type:Object,default:()=>{},required:!0}},data:()=>({loaded:!1,loading:!1,showInheritedShares:!1,shares:[]}),computed:{showInheritedSharesIcon(){return this.loading?"icon-loading-small":this.showInheritedShares?"icon-triangle-n":"icon-triangle-s"},mainTitle:()=>t("files_sharing","Others with access"),subTitle(){return this.showInheritedShares&&0===this.shares.length?t("files_sharing","No other accounts with access found"):""},toggleTooltip(){return"dir"===this.fileInfo.type?t("files_sharing","Toggle list of others with access to this directory"):t("files_sharing","Toggle list of others with access to this file")},fullPath(){return`${this.fileInfo.path}/${this.fileInfo.name}`.replace("//","/")}},watch:{fileInfo(){this.resetState()}},methods:{toggleInheritedShares(){this.showInheritedShares=!this.showInheritedShares,this.showInheritedShares?this.fetchInheritedShares():this.resetState()},async fetchInheritedShares(){this.loading=!0;try{const e=(0,o.KT)("apps/files_sharing/api/v1/shares/inherited?format=json&path={path}",{path:this.fullPath}),t=await Z.Ay.get(e);this.shares=t.data.ocs.data.map((e=>new pe(e))).sort(((e,t)=>t.createdTime-e.createdTime)),console.info(this.shares),this.loaded=!0}catch(e){OC.Notification.showTemporary(t("files_sharing","Unable to fetch inherited shares"),{type:"error"})}finally{this.loading=!1}},resetState(){this.loaded=!1,this.loading=!1,this.showInheritedShares=!1,this.shares=[]},removeShare(e){const t=this.shares.findIndex((t=>t===e));this.shares.splice(t,1)}}};var Xe=i(44377),Qe={};Qe.styleTagTransform=v(),Qe.setAttributes=A(),Qe.insert=p().bind(null,"head"),Qe.domAPI=u(),Qe.insertStyleElement=m(),c()(Xe.A,Qe),Xe.A&&Xe.A.locals&&Xe.A.locals;const Ze=(0,Ce.A)(Ye,(function(){var e=this,t=e._self._c;return t("ul",{attrs:{id:"sharing-inherited-shares"}},[t("SharingEntrySimple",{staticClass:"sharing-entry__inherited",attrs:{title:e.mainTitle,subtitle:e.subTitle,"aria-expanded":e.showInheritedShares},scopedSlots:e._u([{key:"avatar",fn:function(){return[t("div",{staticClass:"avatar-shared icon-more-white"})]},proxy:!0}])},[e._v(" "),t("NcActionButton",{attrs:{icon:e.showInheritedSharesIcon,"aria-label":e.toggleTooltip,title:e.toggleTooltip},on:{click:function(t){return t.preventDefault(),t.stopPropagation(),e.toggleInheritedShares.apply(null,arguments)}}})],1),e._v(" "),e._l(e.shares,(function(r){return t("SharingEntryInherited",{key:r.id,attrs:{"file-info":e.fileInfo,share:r},on:{"remove:share":e.removeShare}})}))],2)}),[],!1,null,"33849ae4",null).exports;var Ke=i(17816),Je=i.n(Ke),et=i(14681),tt=i(44131),rt=i(15502),it=i(94219);const nt={name:"TuneIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},st=(0,Ce.A)(nt,(function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon tune-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(t){return e.$emit("click",t)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M3,17V19H9V17H3M3,5V7H13V5H3M13,21V19H21V17H13V15H11V21H13M7,9V11H3V13H7V15H9V9H7M21,13V11H11V13H21M15,9H17V7H21V5H17V3H15V9Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])}),[],!1,null,null,null).exports,at={name:"CalendarBlankIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},ot=(0,Ce.A)(at,(function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon calendar-blank-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(t){return e.$emit("click",t)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M19,19H5V8H19M16,1V3H8V1H6V3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3H18V1"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])}),[],!1,null,null,null).exports,lt={name:"QrcodeIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},ct=(0,Ce.A)(lt,(function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon qrcode-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(t){return e.$emit("click",t)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M3,11H5V13H3V11M11,5H13V9H11V5M9,11H13V15H11V13H9V11M15,11H17V13H19V11H21V13H19V15H21V19H19V21H17V19H13V21H11V17H15V15H17V13H15V11M19,19V15H17V19H19M15,3H21V9H15V3M17,5V7H19V5H17M3,3H9V9H3V3M5,5V7H7V5H5M3,15H9V21H3V15M5,17V19H7V17H5Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])}),[],!1,null,null,null).exports,ht={name:"ExclamationIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},ut=(0,Ce.A)(ht,(function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon exclamation-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(t){return e.$emit("click",t)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M 11,4L 13,4L 13,15L 11,15L 11,4 Z M 13,18L 13,20L 11,20L 11,18L 13,18 Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])}),[],!1,null,null,null).exports,dt={name:"LockIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},pt=(0,Ce.A)(dt,(function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon lock-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(t){return e.$emit("click",t)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M12,17A2,2 0 0,0 14,15C14,13.89 13.1,13 12,13A2,2 0 0,0 10,15A2,2 0 0,0 12,17M18,8A2,2 0 0,1 20,10V20A2,2 0 0,1 18,22H6A2,2 0 0,1 4,20V10C4,8.89 4.9,8 6,8H7V6A5,5 0 0,1 12,1A5,5 0 0,1 17,6V8H18M12,3A3,3 0 0,0 9,6V8H15V6A3,3 0 0,0 12,3Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])}),[],!1,null,null,null).exports,ft={name:"CheckBoldIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},At=(0,Ce.A)(ft,(function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon check-bold-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(t){return e.$emit("click",t)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M9,20.42L2.79,14.21L5.62,11.38L9,14.77L18.88,4.88L21.71,7.71L9,20.42Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])}),[],!1,null,null,null).exports;var gt=i(66001),mt=i(96078);const yt={name:"TriangleSmallDownIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},vt=(0,Ce.A)(yt,(function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon triangle-small-down-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(t){return e.$emit("click",t)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M8 9H16L12 16"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])}),[],!1,null,null,null).exports,Ct={name:"EyeOutlineIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},wt=(0,Ce.A)(Ct,(function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon eye-outline-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(t){return e.$emit("click",t)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M12,9A3,3 0 0,1 15,12A3,3 0 0,1 12,15A3,3 0 0,1 9,12A3,3 0 0,1 12,9M12,4.5C17,4.5 21.27,7.61 23,12C21.27,16.39 17,19.5 12,19.5C7,19.5 2.73,16.39 1,12C2.73,7.61 7,4.5 12,4.5M3.18,12C4.83,15.36 8.24,17.5 12,17.5C15.76,17.5 19.17,15.36 20.82,12C19.17,8.64 15.76,6.5 12,6.5C8.24,6.5 4.83,8.64 3.18,12Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])}),[],!1,null,null,null).exports;var Et=i(2413);const _t={name:"FileUploadIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},bt=(0,Ce.A)(_t,(function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon file-upload-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(t){return e.$emit("click",t)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M14,2H6A2,2 0 0,0 4,4V20A2,2 0 0,0 6,22H18A2,2 0 0,0 20,20V8L14,2M13.5,16V19H10.5V16H8L12,12L16,16H13.5M13,9V3.5L18.5,9H13Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])}),[],!1,null,null,null).exports,St={name:"SharingEntryQuickShareSelect",components:{DropdownIcon:vt,NcActions:Y.A,NcActionButton:X.A},mixins:[qe,Ne],props:{share:{type:Object,required:!0}},emits:["open-sharing-details"],data:()=>({selectedOption:""}),computed:{ariaLabel(){return t("files_sharing",'Quick share options, the current selected is "{selectedOption}"',{selectedOption:this.selectedOption})},canViewText:()=>t("files_sharing","View only"),canEditText:()=>t("files_sharing","Can edit"),fileDropText:()=>t("files_sharing","File request"),customPermissionsText:()=>t("files_sharing","Custom permissions"),preSelectedOption(){return(this.share.permissions&~Ve.SHARE)===je.READ_ONLY?this.canViewText:this.share.permissions===je.ALL||this.share.permissions===je.ALL_FILE?this.canEditText:(this.share.permissions&~Ve.SHARE)===je.FILE_DROP?this.fileDropText:this.customPermissionsText},options(){const e=[{label:this.canViewText,icon:wt},{label:this.canEditText,icon:Et.A}];return this.supportsFileDrop&&e.push({label:this.fileDropText,icon:bt}),e.push({label:this.customPermissionsText,icon:st}),e},supportsFileDrop(){if(this.isFolder&&this.config.isPublicUploadEnabled){const e=this.share.type??this.share.shareType;return[oe.I.Link,oe.I.Email].includes(e)}return!1},dropDownPermissionValue(){switch(this.selectedOption){case this.canEditText:return this.isFolder?je.ALL:je.ALL_FILE;case this.fileDropText:return je.FILE_DROP;case this.customPermissionsText:return"custom";case this.canViewText:default:return je.READ_ONLY}}},created(){this.selectedOption=this.preSelectedOption},methods:{selectOption(e){this.selectedOption=e,e===this.customPermissionsText?this.$emit("open-sharing-details"):(this.share.permissions=this.dropDownPermissionValue,this.queueUpdate("permissions"),this.$refs.quickShareActions.$refs.menuButton.$el.focus())}}},xt=St;var It=i(13462),kt={};kt.styleTagTransform=v(),kt.setAttributes=A(),kt.insert=p().bind(null,"head"),kt.domAPI=u(),kt.insertStyleElement=m(),c()(It.A,kt),It.A&&It.A.locals&&It.A.locals;const Dt=(0,Ce.A)(xt,(function(){var e=this,t=e._self._c;return t("NcActions",{ref:"quickShareActions",staticClass:"share-select",attrs:{"menu-name":e.selectedOption,"aria-label":e.ariaLabel,type:"tertiary-no-background",disabled:!e.share.canEdit,"force-name":""},scopedSlots:e._u([{key:"icon",fn:function(){return[t("DropdownIcon",{attrs:{size:15}})]},proxy:!0}])},[e._v(" "),e._l(e.options,(function(r){return t("NcActionButton",{key:r.label,attrs:{type:"radio","model-value":r.label===e.selectedOption,"close-after-click":""},on:{click:function(t){return e.selectOption(r.label)}},scopedSlots:e._u([{key:"icon",fn:function(){return[t(r.icon,{tag:"component"})]},proxy:!0}],null,!0)},[e._v("\n\t\t"+e._s(r.label)+"\n\t")])}))],2)}),[],!1,null,"66ffdd9c",null).exports,Tt={name:"ExternalShareAction",props:{id:{type:String,required:!0},action:{type:Object,default:()=>({})},fileInfo:{type:Object,default:()=>{},required:!0},share:{type:pe,default:null}},computed:{data(){return this.action.data(this)}}},Nt=(0,Ce.A)(Tt,(function(){var e=this;return(0,e._self._c)(e.data.is,e._g(e._b({tag:"Component"},"Component",e.data,!1),e.action.handlers),[e._v("\n\t"+e._s(e.data.text)+"\n")])}),[],!1,null,null,null).exports,Pt=new he;async function Rt(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(Pt.passwordPolicy.api&&Pt.passwordPolicy.api.generate)try{const t=await Z.Ay.get(Pt.passwordPolicy.api.generate);if(t.data.ocs.data.password)return e&&(0,fe.Te)((0,E.Tl)("files_sharing","Password created successfully")),t.data.ocs.data.password}catch(t){console.info("Error generating password from password_policy",t),e&&(0,fe.Qg)((0,E.Tl)("files_sharing","Error generating password from password policy"))}const t=new Uint8Array(10),r=52/255;self.crypto.getRandomValues(t);let i="";for(let e=0;e({shareCreationComplete:!1,copySuccess:!0,copied:!1,defaultExpirationDateEnabled:!1,pending:!1,ExternalLegacyLinkActions:OCA.Sharing.ExternalLinkActions.state,ExternalShareActions:OCA.Sharing.ExternalShareActions.state,logger:(0,ue.YK)().setApp("files_sharing").detectUser().build(),showQRCode:!1}),computed:{title(){if(this.share&&this.share.id){if(!this.isShareOwner&&this.share.ownerDisplayName)return this.isEmailShareType?t("files_sharing","{shareWith} by {initiator}",{shareWith:this.share.shareWith,initiator:this.share.ownerDisplayName}):t("files_sharing","Shared via link by {initiator}",{initiator:this.share.ownerDisplayName});if(this.share.label&&""!==this.share.label.trim())return this.isEmailShareType?this.isFileRequest?t("files_sharing","File request ({label})",{label:this.share.label.trim()}):t("files_sharing","Mail share ({label})",{label:this.share.label.trim()}):t("files_sharing","Share link ({label})",{label:this.share.label.trim()});if(this.isEmailShareType)return this.share.shareWith&&""!==this.share.shareWith.trim()?this.share.shareWith:this.isFileRequest?t("files_sharing","File request"):t("files_sharing","Mail share")}return this.index>1?t("files_sharing","Share link ({index})",{index:this.index}):t("files_sharing","Share link")},subtitle(){return this.isEmailShareType&&this.title!==this.share.shareWith?this.share.shareWith:null},isPasswordProtected:{get(){return this.config.enforcePasswordForPublicLink||!!this.share.password},async set(e){Q.Ay.set(this.share,"password",e?await Rt(!0):""),Q.Ay.set(this.share,"newPassword",this.share.password)}},passwordExpirationTime(){if(null===this.share.passwordExpirationTime)return null;const e=(0,le.A)(this.share.passwordExpirationTime);return!(e.diff((0,le.A)())<0)&&e.fromNow()},isTalkEnabled:()=>void 0!==OC.appswebroots.spreed,isPasswordProtectedByTalkAvailable(){return this.isPasswordProtected&&this.isTalkEnabled},isPasswordProtectedByTalk:{get(){return this.share.sendPasswordByTalk},async set(e){this.share.sendPasswordByTalk=e}},isEmailShareType(){return!!this.share&&this.share.type===oe.I.Email},canTogglePasswordProtectedByTalkAvailable(){return!(!this.isPasswordProtected||this.isEmailShareType&&!this.hasUnsavedPassword)},pendingDataIsMissing(){return this.pendingPassword||this.pendingEnforcedPassword||this.pendingDefaultExpirationDate||this.pendingEnforcedExpirationDate},pendingPassword(){return this.config.enableLinkPasswordByDefault&&this.isPendingShare},pendingEnforcedPassword(){return this.config.enforcePasswordForPublicLink&&this.isPendingShare},pendingEnforcedExpirationDate(){return this.config.isDefaultExpireDateEnforced&&this.isPendingShare},pendingDefaultExpirationDate(){return(this.config.defaultExpirationDate instanceof Date||!isNaN(new Date(this.config.defaultExpirationDate).getTime()))&&this.isPendingShare},isPendingShare(){return!(!this.share||this.share.id)},sharePolicyHasEnforcedProperties(){return this.config.enforcePasswordForPublicLink||this.config.isDefaultExpireDateEnforced},enforcedPropertiesMissing(){if(!this.sharePolicyHasEnforcedProperties)return!1;if(!this.share)return!0;if(this.share.id)return!0;const e=this.config.enforcePasswordForPublicLink&&!this.share.password,t=this.config.isDefaultExpireDateEnforced&&!this.share.expireDate;return e||t},hasUnsavedPassword(){return void 0!==this.share.newPassword},shareLink(){return(0,o.Jv)("/s/{token}",{token:this.share.token},{baseURL:(0,o.$_)()})},actionsTooltip(){return t("files_sharing",'Actions for "{title}"',{title:this.title})},copyLinkTooltip(){return this.copied?this.copySuccess?"":t("files_sharing","Cannot copy, please copy the link manually"):t("files_sharing",'Copy public link of "{title}" to clipboard',{title:this.title})},externalLegacyLinkActions(){return this.ExternalLegacyLinkActions.actions},externalLinkActions(){return this.ExternalShareActions.actions.filter((e=>(e.shareType.includes(oe.I.Link)||e.shareType.includes(oe.I.Email))&&!e.advanced))},isPasswordPolicyEnabled(){return"object"==typeof this.config.passwordPolicy},canChangeHideDownload(){return this.fileInfo.shareAttributes.some((e=>"permissions"===e.scope&&"download"===e.key&&!1===e.value))},isFileRequest(){return this.share.isFileRequest}},mounted(){this.share&&(this.defaultExpirationDateEnabled=this.config.defaultExpirationDate instanceof Date,this.share.expireDate=this.defaultExpirationDateEnabled?this.formatDateToString(this.config.defaultExpirationDate):"")},methods:{shareRequiresReview(e){return!e&&(this.defaultExpirationDateEnabled||this.config.enableLinkPasswordByDefault)},async onNewLinkShare(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.logger.debug("onNewLinkShare called (with this.share)",this.share),this.loading)return;const r={share_type:oe.I.Link};if(this.config.isDefaultExpireDateEnforced&&(r.expiration=this.formatDateToString(this.config.defaultExpirationDate)),this.logger.debug("Missing required properties?",this.enforcedPropertiesMissing),this.sharePolicyHasEnforcedProperties&&this.enforcedPropertiesMissing||this.shareRequiresReview(!0===e)){this.pending=!0,this.shareCreationComplete=!1,this.logger.info("Share policy requires a review or has mandated properties (password, expirationDate)..."),(this.config.enableLinkPasswordByDefault||this.config.enforcePasswordForPublicLink)&&(r.password=await Rt(!0));const e=new pe(r),t=await new Promise((t=>{this.$emit("add:share",e,t)}));this.open=!1,this.pending=!1,t.open=!0}else{if(this.share&&!this.share.id){if(this.checkShare(this.share)){try{this.logger.info("Sending existing share to server",this.share),await this.pushNewLinkShare(this.share,!0),this.shareCreationComplete=!0,this.logger.info("Share created on server",this.share)}catch(e){return this.pending=!1,this.logger.error("Error creating share",e),!1}return!0}return this.open=!0,(0,fe.Qg)(t("files_sharing","Error, please enter proper password and/or expiration date")),!1}const e=new pe(r);await this.pushNewLinkShare(e),this.shareCreationComplete=!0}},async pushNewLinkShare(e,r){try{if(this.loading)return!0;this.loading=!0,this.errors={};const i={path:(this.fileInfo.path+"/"+this.fileInfo.name).replace("//","/"),shareType:oe.I.Link,password:e.password,expireDate:e.expireDate,attributes:JSON.stringify(this.fileInfo.shareAttributes)};console.debug("Creating link share with options",i);const n=await this.createShare(i);let s;this.open=!1,this.shareCreationComplete=!0,console.debug("Link share created",n),s=r?await new Promise((e=>{this.$emit("update:share",n,e)})):await new Promise((e=>{this.$emit("add:share",n,e)})),await this.getNode(),(0,ke.Ic)("files:node:updated",this.node),this.config.enforcePasswordForPublicLink||s.copyLink(),(0,fe.Te)(t("files_sharing","Link share created"))}catch(e){const r=e?.response?.data?.ocs?.meta?.message;if(!r)return(0,fe.Qg)(t("files_sharing","Error while creating the share")),void console.error(e);throw r.match(/password/i)?this.onSyncError("password",r):r.match(/date/i)?this.onSyncError("expireDate",r):this.onSyncError("pending",r),e}finally{this.loading=!1,this.shareCreationComplete=!0}},async copyLink(){try{await navigator.clipboard.writeText(this.shareLink),(0,fe.Te)(t("files_sharing","Link copied")),this.$refs.copyButton.$el.focus(),this.copySuccess=!0,this.copied=!0}catch(e){this.copySuccess=!1,this.copied=!0,console.error(e)}finally{setTimeout((()=>{this.copySuccess=!1,this.copied=!1}),4e3)}},onPasswordChange(e){this.$set(this.share,"newPassword",e)},onPasswordDisable(){this.share.password="",this.$delete(this.share,"newPassword"),this.share.id&&this.queueUpdate("password")},onPasswordSubmit(){this.hasUnsavedPassword&&(this.share.password=this.share.newPassword.trim(),this.queueUpdate("password"))},onPasswordProtectedByTalkChange(){this.hasUnsavedPassword&&(this.share.password=this.share.newPassword.trim()),this.queueUpdate("sendPasswordByTalk","password")},onMenuClose(){this.onPasswordSubmit(),this.onNoteSubmit()},onDefaultExpirationDateEnabledChange(e){this.share.expireDate=e?this.formatDateToString(this.config.defaultExpirationDate):""},onCancel(){this.shareCreationComplete||this.$emit("remove:share",this.share)}}},Lt=Bt;var Ot=i(84865),Mt={};Mt.styleTagTransform=v(),Mt.setAttributes=A(),Mt.insert=p().bind(null,"head"),Mt.domAPI=u(),Mt.insertStyleElement=m(),c()(Ot.A,Mt),Ot.A&&Ot.A.locals&&Ot.A.locals;const Ut={name:"SharingLinkList",components:{SharingEntryLink:(0,Ce.A)(Lt,(function(){var e=this,t=e._self._c;return t("li",{staticClass:"sharing-entry sharing-entry__link",class:{"sharing-entry--share":e.share}},[t("NcAvatar",{staticClass:"sharing-entry__avatar",attrs:{"is-no-user":!0,"icon-class":e.isEmailShareType?"avatar-link-share icon-mail-white":"avatar-link-share icon-public-white"}}),e._v(" "),t("div",{staticClass:"sharing-entry__summary"},[t("div",{staticClass:"sharing-entry__desc"},[t("span",{staticClass:"sharing-entry__title",attrs:{title:e.title}},[e._v("\n\t\t\t\t"+e._s(e.title)+"\n\t\t\t")]),e._v(" "),e.subtitle?t("p",[e._v("\n\t\t\t\t"+e._s(e.subtitle)+"\n\t\t\t")]):e._e(),e._v(" "),e.share&&void 0!==e.share.permissions?t("SharingEntryQuickShareSelect",{attrs:{share:e.share,"file-info":e.fileInfo},on:{"open-sharing-details":function(t){return e.openShareDetailsForCustomSettings(e.share)}}}):e._e()],1),e._v(" "),e.share&&(!e.isEmailShareType||e.isFileRequest)&&e.share.token?t("NcActions",{ref:"copyButton",staticClass:"sharing-entry__copy"},[t("NcActionButton",{attrs:{"aria-label":e.copyLinkTooltip,title:e.copyLinkTooltip,href:e.shareLink},on:{click:function(t){return t.preventDefault(),e.copyLink.apply(null,arguments)}},scopedSlots:e._u([{key:"icon",fn:function(){return[e.copied&&e.copySuccess?t("CheckIcon",{staticClass:"icon-checkmark-color",attrs:{size:20}}):t("ClipboardIcon",{attrs:{size:20}})]},proxy:!0}],null,!1,4269614823)})],1):e._e()],1),e._v(" "),!e.pending&&e.pendingDataIsMissing?t("NcActions",{staticClass:"sharing-entry__actions",attrs:{"aria-label":e.actionsTooltip,"menu-align":"right",open:e.open},on:{"update:open":function(t){e.open=t},close:e.onCancel}},[e.errors.pending?t("NcActionText",{staticClass:"error",scopedSlots:e._u([{key:"icon",fn:function(){return[t("ErrorIcon",{attrs:{size:20}})]},proxy:!0}],null,!1,1966124155)},[e._v("\n\t\t\t"+e._s(e.errors.pending)+"\n\t\t")]):t("NcActionText",{attrs:{icon:"icon-info"}},[e._v("\n\t\t\t"+e._s(e.t("files_sharing","Please enter the following required information before creating the share"))+"\n\t\t")]),e._v(" "),e.pendingPassword?t("NcActionCheckbox",{staticClass:"share-link-password-checkbox",attrs:{checked:e.isPasswordProtected,disabled:e.config.enforcePasswordForPublicLink||e.saving},on:{"update:checked":function(t){e.isPasswordProtected=t},uncheck:e.onPasswordDisable}},[e._v("\n\t\t\t"+e._s(e.config.enforcePasswordForPublicLink?e.t("files_sharing","Password protection (enforced)"):e.t("files_sharing","Password protection"))+"\n\t\t")]):e._e(),e._v(" "),e.pendingEnforcedPassword||e.share.password?t("NcActionInput",{staticClass:"share-link-password",attrs:{label:e.t("files_sharing","Enter a password"),value:e.share.password,disabled:e.saving,required:e.config.enableLinkPasswordByDefault||e.config.enforcePasswordForPublicLink,minlength:e.isPasswordPolicyEnabled&&e.config.passwordPolicy.minLength,autocomplete:"new-password"},on:{"update:value":function(t){return e.$set(e.share,"password",t)},submit:function(t){return e.onNewLinkShare(!0)}},scopedSlots:e._u([{key:"icon",fn:function(){return[t("LockIcon",{attrs:{size:20}})]},proxy:!0}],null,!1,2056568168)}):e._e(),e._v(" "),e.pendingDefaultExpirationDate?t("NcActionCheckbox",{staticClass:"share-link-expiration-date-checkbox",attrs:{checked:e.defaultExpirationDateEnabled,disabled:e.pendingEnforcedExpirationDate||e.saving},on:{"update:checked":function(t){e.defaultExpirationDateEnabled=t},change:e.onDefaultExpirationDateEnabledChange}},[e._v("\n\t\t\t"+e._s(e.config.enforcePasswordForPublicLink?e.t("files_sharing","Enable link expiration (enforced)"):e.t("files_sharing","Enable link expiration"))+"\n\t\t")]):e._e(),e._v(" "),(e.pendingDefaultExpirationDate||e.pendingEnforcedExpirationDate)&&e.defaultExpirationDateEnabled?t("NcActionInput",{staticClass:"share-link-expire-date",attrs:{label:e.pendingEnforcedExpirationDate?e.t("files_sharing","Enter expiration date (enforced)"):e.t("files_sharing","Enter expiration date"),disabled:e.saving,"is-native-picker":!0,"hide-label":!0,value:new Date(e.share.expireDate),type:"date",min:e.dateTomorrow,max:e.maxExpirationDateEnforced},on:{input:function(t){e.onExpirationChange}},scopedSlots:e._u([{key:"icon",fn:function(){return[t("IconCalendarBlank",{attrs:{size:20}})]},proxy:!0}],null,!1,3418578971)}):e._e(),e._v(" "),t("NcActionButton",{on:{click:function(t){return t.preventDefault(),t.stopPropagation(),e.onNewLinkShare(!0)}},scopedSlots:e._u([{key:"icon",fn:function(){return[t("CheckIcon",{attrs:{size:20}})]},proxy:!0}],null,!1,2630571749)},[e._v("\n\t\t\t"+e._s(e.t("files_sharing","Create share"))+"\n\t\t")]),e._v(" "),t("NcActionButton",{on:{click:function(t){return t.preventDefault(),t.stopPropagation(),e.onCancel.apply(null,arguments)}},scopedSlots:e._u([{key:"icon",fn:function(){return[t("CloseIcon",{attrs:{size:20}})]},proxy:!0}],null,!1,2428343285)},[e._v("\n\t\t\t"+e._s(e.t("files_sharing","Cancel"))+"\n\t\t")])],1):e.loading?t("div",{staticClass:"icon-loading-small sharing-entry__loading"}):t("NcActions",{staticClass:"sharing-entry__actions",attrs:{"aria-label":e.actionsTooltip,"menu-align":"right",open:e.open},on:{"update:open":function(t){e.open=t},close:e.onMenuClose}},[e.share?[e.share.canEdit&&e.canReshare?[t("NcActionButton",{attrs:{disabled:e.saving,"close-after-click":!0},on:{click:function(t){return t.preventDefault(),e.openSharingDetails.apply(null,arguments)}},scopedSlots:e._u([{key:"icon",fn:function(){return[t("Tune",{attrs:{size:20}})]},proxy:!0}],null,!1,1300586850)},[e._v("\n\t\t\t\t\t"+e._s(e.t("files_sharing","Customize link"))+"\n\t\t\t\t")])]:e._e(),e._v(" "),t("NcActionButton",{attrs:{"close-after-click":!0},on:{click:function(t){t.preventDefault(),e.showQRCode=!0}},scopedSlots:e._u([{key:"icon",fn:function(){return[t("IconQr",{attrs:{size:20}})]},proxy:!0}],null,!1,1082198240)},[e._v("\n\t\t\t\t"+e._s(e.t("files_sharing","Generate QR code"))+"\n\t\t\t")]),e._v(" "),t("NcActionSeparator"),e._v(" "),e._l(e.externalLinkActions,(function(r){return t("ExternalShareAction",{key:r.id,attrs:{id:r.id,action:r,"file-info":e.fileInfo,share:e.share}})})),e._v(" "),e._l(e.externalLegacyLinkActions,(function(r,i){let{icon:n,url:s,name:a}=r;return t("NcActionLink",{key:i,attrs:{href:s(e.shareLink),icon:n,target:"_blank"}},[e._v("\n\t\t\t\t"+e._s(a)+"\n\t\t\t")])})),e._v(" "),!e.isEmailShareType&&e.canReshare?t("NcActionButton",{staticClass:"new-share-link",on:{click:function(t){return t.preventDefault(),t.stopPropagation(),e.onNewLinkShare.apply(null,arguments)}},scopedSlots:e._u([{key:"icon",fn:function(){return[t("PlusIcon",{attrs:{size:20}})]},proxy:!0}],null,!1,2953566425)},[e._v("\n\t\t\t\t"+e._s(e.t("files_sharing","Add another link"))+"\n\t\t\t")]):e._e(),e._v(" "),e.share.canDelete?t("NcActionButton",{attrs:{disabled:e.saving},on:{click:function(t){return t.preventDefault(),e.onDelete.apply(null,arguments)}},scopedSlots:e._u([{key:"icon",fn:function(){return[t("CloseIcon",{attrs:{size:20}})]},proxy:!0}],null,!1,2428343285)},[e._v("\n\t\t\t\t"+e._s(e.t("files_sharing","Unshare"))+"\n\t\t\t")]):e._e()]:e.canReshare?t("NcActionButton",{staticClass:"new-share-link",attrs:{title:e.t("files_sharing","Create a new share link"),"aria-label":e.t("files_sharing","Create a new share link"),icon:e.loading?"icon-loading-small":"icon-add"},on:{click:function(t){return t.preventDefault(),t.stopPropagation(),e.onNewLinkShare.apply(null,arguments)}}}):e._e()],2),e._v(" "),e.showQRCode?t("NcDialog",{attrs:{size:"normal",open:e.showQRCode,name:e.title,"close-on-click-outside":!0},on:{"update:open":function(t){e.showQRCode=t},close:function(t){e.showQRCode=!1}}},[t("div",{staticClass:"qr-code-dialog"},[t("VueQrcode",{staticClass:"qr-code-dialog__img",attrs:{tag:"img",value:e.shareLink}})],1)]):e._e()],1)}),[],!1,null,"aab3eaf4",null).exports},mixins:[Ne],props:{fileInfo:{type:Object,default:()=>{},required:!0},shares:{type:Array,default:()=>[],required:!0},canReshare:{type:Boolean,required:!0}},data:()=>({canLinkShare:(0,ce.F)().files_sharing.public.enabled}),computed:{hasLinkShares(){return this.shares.filter((e=>e.type===oe.I.Link)).length>0},hasShares(){return this.shares.length>0}},methods:{t:E.t,addShare(e,t){this.shares.push(e),this.awaitForShare(e,t)},awaitForShare(e,t){this.$nextTick((()=>{const r=this.$children.find((t=>t.share===e));r&&t(r)}))},removeShare(e){const t=this.shares.findIndex((t=>t===e));this.shares.splice(t,1)}}},Ft=(0,Ce.A)(Ut,(function(){var e=this,t=e._self._c;return e.canLinkShare?t("ul",{staticClass:"sharing-link-list",attrs:{"aria-label":e.t("files_sharing","Link shares")}},[!e.hasLinkShares&&e.canReshare?t("SharingEntryLink",{attrs:{"can-reshare":e.canReshare,"file-info":e.fileInfo},on:{"add:share":e.addShare}}):e._e(),e._v(" "),e.hasShares?e._l(e.shares,(function(r,i){return t("SharingEntryLink",{key:r.id,attrs:{index:e.shares.length>1?i+1:null,"can-reshare":e.canReshare,share:e.shares[i],"file-info":e.fileInfo},on:{"update:share":[function(t){return e.$set(e.shares,i,t)},function(t){return e.awaitForShare(...arguments)}],"add:share":function(t){return e.addShare(...arguments)},"remove:share":e.removeShare,"open-sharing-details":function(t){return e.openSharingDetails(r)}}})})):e._e()],2):e._e()}),[],!1,null,null,null).exports;var $t=i(70995),Vt=i(26690);const jt={name:"SharingEntry",components:{NcButton:$t.A,NcAvatar:_.A,DotsHorizontalIcon:Vt.A,NcSelect:b.A,SharingEntryQuickShareSelect:Dt},mixins:[qe,Ne],computed:{title(){let e=this.share.shareWithDisplayName;return this.share.type===oe.I.Group?e+=` (${t("files_sharing","group")})`:this.share.type===oe.I.Room?e+=` (${t("files_sharing","conversation")})`:this.share.type===oe.I.Remote?e+=` (${t("files_sharing","remote")})`:this.share.type===oe.I.RemoteGroup?e+=` (${t("files_sharing","remote group")})`:this.share.type===oe.I.Guest&&(e+=` (${t("files_sharing","guest")})`),!this.isShareOwner&&this.share.ownerDisplayName&&(e+=" "+t("files_sharing","by {initiator}",{initiator:this.share.ownerDisplayName})),e},tooltip(){if(this.share.owner!==this.share.uidFileOwner){const e={user:this.share.shareWithDisplayName,owner:this.share.ownerDisplayName};return this.share.type===oe.I.Group?t("files_sharing","Shared with the group {user} by {owner}",e):this.share.type===oe.I.Room?t("files_sharing","Shared with the conversation {user} by {owner}",e):t("files_sharing","Shared with {user} by {owner}",e)}return null},hasStatus(){return this.share.type===oe.I.User&&"object"==typeof this.share.status&&!Array.isArray(this.share.status)}},methods:{onMenuClose(){this.onNoteSubmit()}}};var qt=i(63592),Ht={};Ht.styleTagTransform=v(),Ht.setAttributes=A(),Ht.insert=p().bind(null,"head"),Ht.domAPI=u(),Ht.insertStyleElement=m(),c()(qt.A,Ht),qt.A&&qt.A.locals&&qt.A.locals;const zt={name:"SharingList",components:{SharingEntry:(0,Ce.A)(jt,(function(){var e=this,t=e._self._c;return t("li",{staticClass:"sharing-entry"},[t("NcAvatar",{staticClass:"sharing-entry__avatar",attrs:{"is-no-user":e.share.type!==e.ShareType.User,user:e.share.shareWith,"display-name":e.share.shareWithDisplayName,"menu-position":"left",url:e.share.shareWithAvatar}}),e._v(" "),t("div",{staticClass:"sharing-entry__summary"},[t(e.share.shareWithLink?"a":"div",{tag:"component",staticClass:"sharing-entry__summary__desc",attrs:{title:e.tooltip,"aria-label":e.tooltip,href:e.share.shareWithLink}},[t("span",[e._v(e._s(e.title)+"\n\t\t\t\t"),e.isUnique?e._e():t("span",{staticClass:"sharing-entry__summary__desc-unique"},[e._v(" ("+e._s(e.share.shareWithDisplayNameUnique)+")")]),e._v(" "),e.hasStatus&&e.share.status.message?t("small",[e._v("("+e._s(e.share.status.message)+")")]):e._e()])]),e._v(" "),t("SharingEntryQuickShareSelect",{attrs:{share:e.share,"file-info":e.fileInfo},on:{"open-sharing-details":function(t){return e.openShareDetailsForCustomSettings(e.share)}}})],1),e._v(" "),e.share.canEdit?t("NcButton",{staticClass:"sharing-entry__action",attrs:{"data-cy-files-sharing-share-actions":"","aria-label":e.t("files_sharing","Open Sharing Details"),type:"tertiary"},on:{click:function(t){return e.openSharingDetails(e.share)}},scopedSlots:e._u([{key:"icon",fn:function(){return[t("DotsHorizontalIcon",{attrs:{size:20}})]},proxy:!0}],null,!1,1700783217)}):e._e()],1)}),[],!1,null,"e994747e",null).exports},mixins:[Ne],props:{fileInfo:{type:Object,default:()=>{},required:!0},shares:{type:Array,default:()=>[],required:!0}},setup:()=>({t:E.t}),computed:{hasShares(){return 0===this.shares.length},isUnique(){return e=>[...this.shares].filter((t=>e.type===oe.I.User&&e.shareWithDisplayName===t.shareWithDisplayName)).length<=1}}},Wt=(0,Ce.A)(zt,(function(){var e=this,t=e._self._c;return t("ul",{staticClass:"sharing-sharee-list",attrs:{"aria-label":e.t("files_sharing","Shares")}},e._l(e.shares,(function(r){return t("SharingEntry",{key:r.id,attrs:{"file-info":e.fileInfo,share:r,"is-unique":e.isUnique(r)},on:{"open-sharing-details":function(t){return e.openSharingDetails(r)}}})})),1)}),[],!1,null,null,null).exports;var Gt=i(32073),Yt=i(15828),Xt=i(16879),Qt=i(59892),Zt=i(16044),Kt=i(177);const Jt={name:"CircleOutlineIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},er=(0,Ce.A)(Jt,(function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon circle-outline-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(t){return e.$emit("click",t)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4A8,8 0 0,1 20,12A8,8 0 0,1 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])}),[],!1,null,null,null).exports,tr={name:"EmailIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},rr=(0,Ce.A)(tr,(function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon email-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(t){return e.$emit("click",t)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M20,8L12,13L4,8V6L12,11L20,6M20,4H4C2.89,4 2,4.89 2,6V18A2,2 0 0,0 4,20H20A2,2 0 0,0 22,18V6C22,4.89 21.1,4 20,4Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])}),[],!1,null,null,null).exports;var ir=i(36600),nr=i(43261);const sr={name:"ShareCircleIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},ar=(0,Ce.A)(sr,(function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon share-circle-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(t){return e.$emit("click",t)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M12 2C6.5 2 2 6.5 2 12S6.5 22 12 22 22 17.5 22 12 17.5 2 12 2M14 16V13C10.39 13 7.81 14.43 6 17C6.72 13.33 8.94 9.73 14 9V6L19 11L14 16Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])}),[],!1,null,null,null).exports,or={name:"AccountCircleOutlineIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},lr=(0,Ce.A)(or,(function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon account-circle-outline-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(t){return e.$emit("click",t)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M7.07,18.28C7.5,17.38 10.12,16.5 12,16.5C13.88,16.5 16.5,17.38 16.93,18.28C15.57,19.36 13.86,20 12,20C10.14,20 8.43,19.36 7.07,18.28M18.36,16.83C16.93,15.09 13.46,14.5 12,14.5C10.54,14.5 7.07,15.09 5.64,16.83C4.62,15.5 4,13.82 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20,12C20,13.82 19.38,15.5 18.36,16.83M12,6C10.06,6 8.5,7.56 8.5,9.5C8.5,11.44 10.06,13 12,13C13.94,13 15.5,11.44 15.5,9.5C15.5,7.56 13.94,6 12,6M12,11A1.5,1.5 0 0,1 10.5,9.5A1.5,1.5 0 0,1 12,8A1.5,1.5 0 0,1 13.5,9.5A1.5,1.5 0 0,1 12,11Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])}),[],!1,null,null,null).exports,cr={name:"EyeIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},hr=(0,Ce.A)(cr,(function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon eye-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(t){return e.$emit("click",t)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M12,9A3,3 0 0,0 9,12A3,3 0 0,0 12,15A3,3 0 0,0 15,12A3,3 0 0,0 12,9M12,17A5,5 0 0,1 7,12A5,5 0 0,1 12,7A5,5 0 0,1 17,12A5,5 0 0,1 12,17M12,4.5C7,4.5 2.73,7.61 1,12C2.73,16.39 7,19.5 12,19.5C17,19.5 21.27,16.39 23,12C21.27,7.61 17,4.5 12,4.5Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])}),[],!1,null,null,null).exports;var ur=i(65422),dr=i(25384),pr=i(33388);const fr={name:"SharingDetailsTab",components:{NcAvatar:_.A,NcButton:$t.A,NcCheckboxRadioSwitch:Gt.A,NcDateTimePickerNative:Yt.A,NcInputField:Xt.A,NcLoadingIcon:Qt.A,NcPasswordField:Zt.A,NcTextArea:Kt.A,CloseIcon:gt.A,CircleIcon:er,EditIcon:Et.A,ExternalShareAction:Nt,LinkIcon:ir.A,GroupIcon:nr.A,ShareIcon:ar,UserIcon:lr,UploadIcon:ur.A,ViewIcon:hr,MenuDownIcon:dr.A,MenuUpIcon:pr.A,DotsHorizontalIcon:Vt.A},mixins:[Te,qe],props:{shareRequestValue:{type:Object,required:!1},fileInfo:{type:Object,required:!0},share:{type:Object,required:!0}},data:()=>({writeNoteToRecipientIsChecked:!1,sharingPermission:je.ALL.toString(),revertSharingPermission:je.ALL.toString(),setCustomPermissions:!1,passwordError:!1,advancedSectionAccordionExpanded:!1,bundledPermissions:je,isFirstComponentLoad:!0,test:!1,creating:!1,ExternalShareActions:OCA.Sharing.ExternalShareActions.state}),computed:{title(){switch(this.share.type){case oe.I.User:return t("files_sharing","Share with {userName}",{userName:this.share.shareWithDisplayName});case oe.I.Email:return t("files_sharing","Share with email {email}",{email:this.share.shareWith});case oe.I.Link:return t("files_sharing","Share link");case oe.I.Group:return t("files_sharing","Share with group");case oe.I.Room:return t("files_sharing","Share in conversation");case oe.I.Remote:{const[e,r]=this.share.shareWith.split("@");return t("files_sharing","Share with {user} on remote server {server}",{user:e,server:r})}case oe.I.RemoteGroup:return t("files_sharing","Share with remote group");case oe.I.Guest:return t("files_sharing","Share with guest");default:return this.share.id?t("files_sharing","Update share"):t("files_sharing","Create share")}},canEdit:{get(){return this.share.hasUpdatePermission},set(e){this.updateAtomicPermissions({isEditChecked:e})}},canCreate:{get(){return this.share.hasCreatePermission},set(e){this.updateAtomicPermissions({isCreateChecked:e})}},canDelete:{get(){return this.share.hasDeletePermission},set(e){this.updateAtomicPermissions({isDeleteChecked:e})}},canReshare:{get(){return this.share.hasSharePermission},set(e){this.updateAtomicPermissions({isReshareChecked:e})}},canDownload:{get(){return this.share.attributes?.find((e=>"download"===e.key))?.value??!0},set(e){const t=this.share.attributes?.find((e=>"download"===e.key));t?t.value=e:(null===this.share.attributes&&this.$set(this.share,"attributes",[]),this.share.attributes.push({scope:"permissions",key:"download",value:e}))}},hasRead:{get(){return this.share.hasReadPermission},set(e){this.updateAtomicPermissions({isReadChecked:e})}},hasExpirationDate:{get(){return this.isValidShareAttribute(this.share.expireDate)},set(e){this.share.expireDate=e?this.formatDateToString(this.defaultExpiryDate):""}},isPasswordProtected:{get(){return this.config.enforcePasswordForPublicLink||!!this.share.password},async set(e){e?(this.share.password=await Rt(!0),this.$set(this.share,"newPassword",this.share.password)):(this.share.password="",this.$delete(this.share,"newPassword"))}},isFolder(){return"dir"===this.fileInfo.type},isSetDownloadButtonVisible(){return this.isFolder||["application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.ms-powerpoint","application/vnd.openxmlformats-officedocument.presentationml.presentation","application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/vnd.oasis.opendocument.text","application/vnd.oasis.opendocument.spreadsheet","application/vnd.oasis.opendocument.presentation"].includes(this.fileInfo.mimetype)},isPasswordEnforced(){return this.isPublicShare&&this.config.enforcePasswordForPublicLink},defaultExpiryDate(){return(this.isGroupShare||this.isUserShare)&&this.config.isDefaultInternalExpireDateEnabled?new Date(this.config.defaultInternalExpirationDate):this.isRemoteShare&&this.config.isDefaultRemoteExpireDateEnabled?new Date(this.config.defaultRemoteExpireDateEnabled):this.isPublicShare&&this.config.isDefaultExpireDateEnabled?new Date(this.config.defaultExpirationDate):new Date((new Date).setDate((new Date).getDate()+1))},isUserShare(){return this.share.type===oe.I.User},isGroupShare(){return this.share.type===oe.I.Group},isNewShare(){return!this.share.id},allowsFileDrop(){return!(!this.isFolder||!this.config.isPublicUploadEnabled||this.share.type!==oe.I.Link&&this.share.type!==oe.I.Email)},hasFileDropPermissions(){return this.share.permissions===this.bundledPermissions.FILE_DROP},shareButtonText(){return this.isNewShare?t("files_sharing","Save share"):t("files_sharing","Update share")},resharingIsPossible(){return this.config.isResharingAllowed&&this.share.type!==oe.I.Link&&this.share.type!==oe.I.Email},canSetEdit(){return this.fileInfo.sharePermissions&OC.PERMISSION_UPDATE||this.canEdit},canSetCreate(){return this.fileInfo.sharePermissions&OC.PERMISSION_CREATE||this.canCreate},canSetDelete(){return this.fileInfo.sharePermissions&OC.PERMISSION_DELETE||this.canDelete},canSetReshare(){return this.fileInfo.sharePermissions&OC.PERMISSION_SHARE||this.canReshare},canSetDownload(){return this.fileInfo.canDownload()||this.canDownload},canRemoveReadPermission(){return this.allowsFileDrop&&(this.share.type===oe.I.Link||this.share.type===oe.I.Email)},hasUnsavedPassword(){return void 0!==this.share.newPassword},passwordExpirationTime(){if(!this.isValidShareAttribute(this.share.passwordExpirationTime))return null;const e=(0,le.A)(this.share.passwordExpirationTime);return!(e.diff((0,le.A)())<0)&&e.fromNow()},isTalkEnabled:()=>void 0!==OC.appswebroots.spreed,isPasswordProtectedByTalkAvailable(){return this.isPasswordProtected&&this.isTalkEnabled},isPasswordProtectedByTalk:{get(){return this.share.sendPasswordByTalk},async set(e){this.share.sendPasswordByTalk=e}},isEmailShareType(){return!!this.share&&this.share.type===oe.I.Email},canTogglePasswordProtectedByTalkAvailable(){return!(!this.isPublicShare||!this.isPasswordProtected||this.isEmailShareType&&!this.hasUnsavedPassword||void 0===OC.appswebroots.spreed)},canChangeHideDownload(){return this.fileInfo.shareAttributes.some((e=>"download"===e.key&&"permissions"===e.scope&&!1===e.value))},customPermissionsList(){const e={[Ve.READ]:this.t("files_sharing","Read"),[Ve.CREATE]:this.t("files_sharing","Create"),[Ve.UPDATE]:this.t("files_sharing","Edit"),[Ve.SHARE]:this.t("files_sharing","Share"),[Ve.DELETE]:this.t("files_sharing","Delete")};return[Ve.READ,Ve.CREATE,Ve.UPDATE,...this.resharingIsPossible?[Ve.SHARE]:[],Ve.DELETE].filter((e=>{return t=this.share.permissions,r=e,t!==Ve.NONE&&(t&r)===r;var t,r})).map(((t,r)=>0===r?e[t]:e[t].toLocaleLowerCase((0,E.Z0)()))).join(", ")},advancedControlExpandedValue(){return this.advancedSectionAccordionExpanded?"true":"false"},errorPasswordLabel(){if(this.passwordError)return t("files_sharing","Password field can't be empty")},passwordHint(){if(!this.isNewShare&&!this.hasUnsavedPassword)return t("files_sharing","Replace current password")},externalLinkActions(){return this.ExternalShareActions.actions.filter((e=>(e.shareType.includes(oe.I.Link)||e.shareType.includes(oe.I.Email))&&e.advanced))}},watch:{setCustomPermissions(e){this.sharingPermission=e?"custom":this.revertSharingPermission}},beforeMount(){this.initializePermissions(),this.initializeAttributes(),de.debug("Share object received",{share:this.share}),de.debug("Configuration object received",{config:this.config})},mounted(){this.$refs.quickPermissions?.querySelector("input:checked")?.focus()},methods:{updateAtomicPermissions(){let{isReadChecked:e=this.hasRead,isEditChecked:t=this.canEdit,isCreateChecked:r=this.canCreate,isDeleteChecked:i=this.canDelete,isReshareChecked:n=this.canReshare}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const s=(e?Ve.READ:0)|(r?Ve.CREATE:0)|(i?Ve.DELETE:0)|(t?Ve.UPDATE:0)|(n?Ve.SHARE:0);this.share.permissions=s},expandCustomPermissions(){this.advancedSectionAccordionExpanded||(this.advancedSectionAccordionExpanded=!0),this.toggleCustomPermissions()},toggleCustomPermissions(e){const t="custom"===this.sharingPermission;this.revertSharingPermission=t?"custom":e,this.setCustomPermissions=t},async initializeAttributes(){if(this.isNewShare)return this.isPasswordEnforced&&this.isPublicShare&&(this.$set(this.share,"newPassword",await Rt(!0)),this.advancedSectionAccordionExpanded=!0),this.isPublicShare&&this.config.isDefaultExpireDateEnabled?this.share.expireDate=this.config.defaultExpirationDate.toDateString():this.isRemoteShare&&this.config.isDefaultRemoteExpireDateEnabled?this.share.expireDate=this.config.defaultRemoteExpirationDateString.toDateString():this.config.isDefaultInternalExpireDateEnabled&&(this.share.expireDate=this.config.defaultInternalExpirationDate.toDateString()),void(this.isValidShareAttribute(this.share.expireDate)&&(this.advancedSectionAccordionExpanded=!0));!this.isValidShareAttribute(this.share.expireDate)&&this.isExpiryDateEnforced&&(this.hasExpirationDate=!0),(this.isValidShareAttribute(this.share.password)||this.isValidShareAttribute(this.share.expireDate)||this.isValidShareAttribute(this.share.label))&&(this.advancedSectionAccordionExpanded=!0),this.share.note&&(this.writeNoteToRecipientIsChecked=!0)},handleShareType(){"shareType"in this.share?this.share.type=this.share.shareType:this.share.share_type&&(this.share.type=this.share.share_type)},handleDefaultPermissions(){if(this.isNewShare){const e=this.config.defaultPermissions;e===je.READ_ONLY||e===je.ALL?this.sharingPermission=e.toString():(this.sharingPermission="custom",this.share.permissions=e,this.advancedSectionAccordionExpanded=!0,this.setCustomPermissions=!0)}this.canRemoveReadPermission||(this.hasRead=!0)},handleCustomPermissions(){this.isNewShare||!this.hasCustomPermissions&&!this.share.setCustomPermissions?this.share.permissions&&(this.sharingPermission=this.share.permissions.toString()):(this.sharingPermission="custom",this.advancedSectionAccordionExpanded=!0,this.setCustomPermissions=!0)},initializePermissions(){this.handleShareType(),this.handleDefaultPermissions(),this.handleCustomPermissions()},async saveShare(){const e=["permissions","attributes","note","expireDate"];this.isPublicShare&&e.push("label","password","hideDownload");const t=parseInt(this.sharingPermission);if(this.setCustomPermissions?this.updateAtomicPermissions():this.share.permissions=t,this.isFolder||this.share.permissions!==je.ALL||(this.share.permissions=je.ALL_FILE),this.writeNoteToRecipientIsChecked||(this.share.note=""),this.isPasswordProtected?this.hasUnsavedPassword&&this.isValidShareAttribute(this.share.newPassword)?(this.share.password=this.share.newPassword,this.$delete(this.share,"newPassword")):this.isPasswordEnforced&&this.isNewShare&&!this.isValidShareAttribute(this.share.password)&&(this.passwordError=!0):this.share.password="",this.hasExpirationDate||(this.share.expireDate=""),this.isNewShare){const e={permissions:this.share.permissions,shareType:this.share.type,shareWith:this.share.shareWith,attributes:this.share.attributes,note:this.share.note,fileInfo:this.fileInfo};e.expireDate=this.hasExpirationDate?this.share.expireDate:"",this.isPasswordProtected&&(e.password=this.share.password),this.creating=!0;const t=await this.addShare(e);this.creating=!1,this.share=t,this.$emit("add:share",this.share)}else this.$emit("update:share",this.share),this.queueUpdate(...e);await this.getNode(),(0,ke.Ic)("files:node:updated",this.node),this.$refs.externalLinkActions?.length>0&&await Promise.allSettled(this.$refs.externalLinkActions.map((e=>"function"!=typeof e.$children.at(0)?.onSave?Promise.resolve():e.$children.at(0)?.onSave?.()))),this.$emit("close-sharing-details")},async addShare(e){de.debug("Adding a new share from the input for",{share:e});const t=this.path;try{return await this.createShare({path:t,shareType:e.shareType,shareWith:e.shareWith,permissions:e.permissions,expireDate:e.expireDate,attributes:JSON.stringify(e.attributes),...e.note?{note:e.note}:{},...e.password?{password:e.password}:{}})}catch(e){de.error("Error while adding new share",{error:e})}},async removeShare(){await this.onDelete(),await this.getNode(),(0,ke.Ic)("files:node:updated",this.node),this.$emit("close-sharing-details")},onPasswordChange(e){if(""===e)return this.$delete(this.share,"newPassword"),void(this.passwordError=this.isNewShare&&this.isPasswordEnforced);this.passwordError=!this.isValidShareAttribute(e),this.$set(this.share,"newPassword",e)},onPasswordProtectedByTalkChange(){this.hasUnsavedPassword&&(this.share.password=this.share.newPassword.trim()),this.queueUpdate("sendPasswordByTalk","password")},isValidShareAttribute:e=>![null,void 0].includes(e)&&e.trim().length>0,getShareTypeIcon(e){switch(e){case oe.I.Link:return ir.A;case oe.I.Guest:return lr;case oe.I.RemoteGroup:case oe.I.Group:return nr.A;case oe.I.Email:return rr;case oe.I.Team:return er;case oe.I.Room:case oe.I.Deck:case oe.I.ScienceMesh:return ar;default:return null}}}};var Ar=i(57241),gr={};gr.styleTagTransform=v(),gr.setAttributes=A(),gr.insert=p().bind(null,"head"),gr.domAPI=u(),gr.insertStyleElement=m(),c()(Ar.A,gr),Ar.A&&Ar.A.locals&&Ar.A.locals;const mr=(0,Ce.A)(fr,(function(){var e=this,t=e._self._c;return t("div",{staticClass:"sharingTabDetailsView"},[t("div",{staticClass:"sharingTabDetailsView__header"},[t("span",[e.isUserShare?t("NcAvatar",{staticClass:"sharing-entry__avatar",attrs:{"is-no-user":e.share.shareType!==e.ShareType.User,user:e.share.shareWith,"display-name":e.share.shareWithDisplayName,"menu-position":"left",url:e.share.shareWithAvatar}}):e._e(),e._v(" "),t(e.getShareTypeIcon(e.share.type),{tag:"component",attrs:{size:32}})],1),e._v(" "),t("span",[t("h1",[e._v(e._s(e.title))])])]),e._v(" "),t("div",{staticClass:"sharingTabDetailsView__wrapper"},[t("div",{ref:"quickPermissions",staticClass:"sharingTabDetailsView__quick-permissions"},[t("div",[t("NcCheckboxRadioSwitch",{attrs:{"button-variant":!0,"data-cy-files-sharing-share-permissions-bundle":"read-only",checked:e.sharingPermission,value:e.bundledPermissions.READ_ONLY.toString(),name:"sharing_permission_radio",type:"radio","button-variant-grouped":"vertical"},on:{"update:checked":[function(t){e.sharingPermission=t},e.toggleCustomPermissions]},scopedSlots:e._u([{key:"icon",fn:function(){return[t("ViewIcon",{attrs:{size:20}})]},proxy:!0}])},[e._v("\n\t\t\t\t\t"+e._s(e.t("files_sharing","View only"))+"\n\t\t\t\t\t")]),e._v(" "),t("NcCheckboxRadioSwitch",{attrs:{"button-variant":!0,"data-cy-files-sharing-share-permissions-bundle":"upload-edit",checked:e.sharingPermission,value:e.bundledPermissions.ALL.toString(),name:"sharing_permission_radio",type:"radio","button-variant-grouped":"vertical"},on:{"update:checked":[function(t){e.sharingPermission=t},e.toggleCustomPermissions]},scopedSlots:e._u([{key:"icon",fn:function(){return[t("EditIcon",{attrs:{size:20}})]},proxy:!0}])},[e.allowsFileDrop?[e._v("\n\t\t\t\t\t\t"+e._s(e.t("files_sharing","Allow upload and editing"))+"\n\t\t\t\t\t")]:[e._v("\n\t\t\t\t\t\t"+e._s(e.t("files_sharing","Allow editing"))+"\n\t\t\t\t\t")]],2),e._v(" "),e.allowsFileDrop?t("NcCheckboxRadioSwitch",{attrs:{"data-cy-files-sharing-share-permissions-bundle":"file-drop","button-variant":!0,checked:e.sharingPermission,value:e.bundledPermissions.FILE_DROP.toString(),name:"sharing_permission_radio",type:"radio","button-variant-grouped":"vertical"},on:{"update:checked":[function(t){e.sharingPermission=t},e.toggleCustomPermissions]},scopedSlots:e._u([{key:"icon",fn:function(){return[t("UploadIcon",{attrs:{size:20}})]},proxy:!0}],null,!1,1083194048)},[e._v("\n\t\t\t\t\t"+e._s(e.t("files_sharing","File request"))+"\n\t\t\t\t\t"),t("small",{staticClass:"subline"},[e._v(e._s(e.t("files_sharing","Upload only")))])]):e._e(),e._v(" "),t("NcCheckboxRadioSwitch",{attrs:{"button-variant":!0,"data-cy-files-sharing-share-permissions-bundle":"custom",checked:e.sharingPermission,value:"custom",name:"sharing_permission_radio",type:"radio","button-variant-grouped":"vertical"},on:{"update:checked":[function(t){e.sharingPermission=t},e.expandCustomPermissions]},scopedSlots:e._u([{key:"icon",fn:function(){return[t("DotsHorizontalIcon",{attrs:{size:20}})]},proxy:!0}])},[e._v("\n\t\t\t\t\t"+e._s(e.t("files_sharing","Custom permissions"))+"\n\t\t\t\t\t"),t("small",{staticClass:"subline"},[e._v(e._s(e.customPermissionsList))])])],1)]),e._v(" "),t("div",{staticClass:"sharingTabDetailsView__advanced-control"},[t("NcButton",{attrs:{id:"advancedSectionAccordionAdvancedControl",type:"tertiary",alignment:"end-reverse","aria-controls":"advancedSectionAccordionAdvanced","aria-expanded":e.advancedControlExpandedValue},on:{click:function(t){e.advancedSectionAccordionExpanded=!e.advancedSectionAccordionExpanded}},scopedSlots:e._u([{key:"icon",fn:function(){return[e.advancedSectionAccordionExpanded?t("MenuUpIcon"):t("MenuDownIcon")]},proxy:!0}])},[e._v("\n\t\t\t\t"+e._s(e.t("files_sharing","Advanced settings"))+"\n\t\t\t\t")])],1),e._v(" "),e.advancedSectionAccordionExpanded?t("div",{staticClass:"sharingTabDetailsView__advanced",attrs:{id:"advancedSectionAccordionAdvanced","aria-labelledby":"advancedSectionAccordionAdvancedControl",role:"region"}},[t("section",[e.isPublicShare?t("NcInputField",{attrs:{autocomplete:"off",label:e.t("files_sharing","Share label"),value:e.share.label},on:{"update:value":function(t){return e.$set(e.share,"label",t)}}}):e._e(),e._v(" "),e.isPublicShare?[t("NcCheckboxRadioSwitch",{attrs:{checked:e.isPasswordProtected,disabled:e.isPasswordEnforced},on:{"update:checked":function(t){e.isPasswordProtected=t}}},[e._v("\n\t\t\t\t\t\t"+e._s(e.t("files_sharing","Set password"))+"\n\t\t\t\t\t")]),e._v(" "),e.isPasswordProtected?t("NcPasswordField",{attrs:{autocomplete:"new-password",value:e.hasUnsavedPassword?e.share.newPassword:"",error:e.passwordError,"helper-text":e.errorPasswordLabel||e.passwordHint,required:e.isPasswordEnforced&&e.isNewShare,label:e.t("files_sharing","Password")},on:{"update:value":e.onPasswordChange}}):e._e(),e._v(" "),e.isEmailShareType&&e.passwordExpirationTime?t("span",{attrs:{icon:"icon-info"}},[e._v("\n\t\t\t\t\t\t"+e._s(e.t("files_sharing","Password expires {passwordExpirationTime}",{passwordExpirationTime:e.passwordExpirationTime}))+"\n\t\t\t\t\t")]):e.isEmailShareType&&null!==e.passwordExpirationTime?t("span",{attrs:{icon:"icon-error"}},[e._v("\n\t\t\t\t\t\t"+e._s(e.t("files_sharing","Password expired"))+"\n\t\t\t\t\t")]):e._e()]:e._e(),e._v(" "),e.canTogglePasswordProtectedByTalkAvailable?t("NcCheckboxRadioSwitch",{attrs:{checked:e.isPasswordProtectedByTalk},on:{"update:checked":[function(t){e.isPasswordProtectedByTalk=t},e.onPasswordProtectedByTalkChange]}},[e._v("\n\t\t\t\t\t"+e._s(e.t("files_sharing","Video verification"))+"\n\t\t\t\t")]):e._e(),e._v(" "),t("NcCheckboxRadioSwitch",{attrs:{checked:e.hasExpirationDate,disabled:e.isExpiryDateEnforced},on:{"update:checked":function(t){e.hasExpirationDate=t}}},[e._v("\n\t\t\t\t\t"+e._s(e.isExpiryDateEnforced?e.t("files_sharing","Expiration date (enforced)"):e.t("files_sharing","Set expiration date"))+"\n\t\t\t\t")]),e._v(" "),e.hasExpirationDate?t("NcDateTimePickerNative",{attrs:{id:"share-date-picker",value:new Date(e.share.expireDate??e.dateTomorrow),min:e.dateTomorrow,max:e.maxExpirationDateEnforced,"hide-label":!0,placeholder:e.t("files_sharing","Expiration date"),type:"date"},on:{input:e.onExpirationChange}}):e._e(),e._v(" "),e.isPublicShare?t("NcCheckboxRadioSwitch",{attrs:{disabled:e.canChangeHideDownload,checked:e.share.hideDownload},on:{"update:checked":[function(t){return e.$set(e.share,"hideDownload",t)},function(t){return e.queueUpdate("hideDownload")}]}},[e._v("\n\t\t\t\t\t"+e._s(e.t("files_sharing","Hide download"))+"\n\t\t\t\t")]):e._e(),e._v(" "),e.isPublicShare?e._e():t("NcCheckboxRadioSwitch",{attrs:{disabled:!e.canSetDownload,checked:e.canDownload,"data-cy-files-sharing-share-permissions-checkbox":"download"},on:{"update:checked":function(t){e.canDownload=t}}},[e._v("\n\t\t\t\t\t"+e._s(e.t("files_sharing","Allow download and sync"))+"\n\t\t\t\t")]),e._v(" "),t("NcCheckboxRadioSwitch",{attrs:{checked:e.writeNoteToRecipientIsChecked},on:{"update:checked":function(t){e.writeNoteToRecipientIsChecked=t}}},[e._v("\n\t\t\t\t\t"+e._s(e.t("files_sharing","Note to recipient"))+"\n\t\t\t\t")]),e._v(" "),e.writeNoteToRecipientIsChecked?[t("NcTextArea",{attrs:{label:e.t("files_sharing","Note to recipient"),placeholder:e.t("files_sharing","Enter a note for the share recipient"),value:e.share.note},on:{"update:value":function(t){return e.$set(e.share,"note",t)}}})]:e._e(),e._v(" "),e._l(e.externalLinkActions,(function(r){return t("ExternalShareAction",{key:r.id,ref:"externalLinkActions",refInFor:!0,attrs:{id:r.id,action:r,"file-info":e.fileInfo,share:e.share}})})),e._v(" "),t("NcCheckboxRadioSwitch",{attrs:{checked:e.setCustomPermissions},on:{"update:checked":function(t){e.setCustomPermissions=t}}},[e._v("\n\t\t\t\t\t"+e._s(e.t("files_sharing","Custom permissions"))+"\n\t\t\t\t")]),e._v(" "),e.setCustomPermissions?t("section",{staticClass:"custom-permissions-group"},[t("NcCheckboxRadioSwitch",{attrs:{disabled:!e.canRemoveReadPermission,checked:e.hasRead,"data-cy-files-sharing-share-permissions-checkbox":"read"},on:{"update:checked":function(t){e.hasRead=t}}},[e._v("\n\t\t\t\t\t\t"+e._s(e.t("files_sharing","Read"))+"\n\t\t\t\t\t")]),e._v(" "),e.isFolder?t("NcCheckboxRadioSwitch",{attrs:{disabled:!e.canSetCreate,checked:e.canCreate,"data-cy-files-sharing-share-permissions-checkbox":"create"},on:{"update:checked":function(t){e.canCreate=t}}},[e._v("\n\t\t\t\t\t\t"+e._s(e.t("files_sharing","Create"))+"\n\t\t\t\t\t")]):e._e(),e._v(" "),t("NcCheckboxRadioSwitch",{attrs:{disabled:!e.canSetEdit,checked:e.canEdit,"data-cy-files-sharing-share-permissions-checkbox":"update"},on:{"update:checked":function(t){e.canEdit=t}}},[e._v("\n\t\t\t\t\t\t"+e._s(e.t("files_sharing","Edit"))+"\n\t\t\t\t\t")]),e._v(" "),e.resharingIsPossible?t("NcCheckboxRadioSwitch",{attrs:{disabled:!e.canSetReshare,checked:e.canReshare,"data-cy-files-sharing-share-permissions-checkbox":"share"},on:{"update:checked":function(t){e.canReshare=t}}},[e._v("\n\t\t\t\t\t\t"+e._s(e.t("files_sharing","Share"))+"\n\t\t\t\t\t")]):e._e(),e._v(" "),t("NcCheckboxRadioSwitch",{attrs:{disabled:!e.canSetDelete,checked:e.canDelete,"data-cy-files-sharing-share-permissions-checkbox":"delete"},on:{"update:checked":function(t){e.canDelete=t}}},[e._v("\n\t\t\t\t\t\t"+e._s(e.t("files_sharing","Delete"))+"\n\t\t\t\t\t")])],1):e._e(),e._v(" "),t("div",{staticClass:"sharingTabDetailsView__delete"},[e.isNewShare?e._e():t("NcButton",{attrs:{"aria-label":e.t("files_sharing","Delete share"),disabled:!1,readonly:!1,type:"tertiary"},on:{click:function(t){return t.preventDefault(),e.removeShare.apply(null,arguments)}},scopedSlots:e._u([{key:"icon",fn:function(){return[t("CloseIcon",{attrs:{size:16}})]},proxy:!0}],null,!1,2746485232)},[e._v("\n\t\t\t\t\t\t"+e._s(e.t("files_sharing","Delete share"))+"\n\t\t\t\t\t")])],1)],2)]):e._e()]),e._v(" "),t("div",{staticClass:"sharingTabDetailsView__footer"},[t("div",{staticClass:"button-group"},[t("NcButton",{attrs:{"data-cy-files-sharing-share-editor-action":"cancel"},on:{click:function(t){return e.$emit("close-sharing-details")}}},[e._v("\n\t\t\t\t"+e._s(e.t("files_sharing","Cancel"))+"\n\t\t\t")]),e._v(" "),t("NcButton",{attrs:{type:"primary","data-cy-files-sharing-share-editor-action":"save"},on:{click:e.saveShare},scopedSlots:e._u([e.creating?{key:"icon",fn:function(){return[t("NcLoadingIcon")]},proxy:!0}:null],null,!0)},[e._v("\n\t\t\t\t"+e._s(e.shareButtonText)+"\n\t\t\t\t")])],1)])])}),[],!1,null,"208c98ca",null).exports,yr={name:"SharingTab",components:{NcAvatar:_.A,CollectionList:ae,SharingEntryInternal:Se,SharingEntrySimple:we,SharingInherited:Ze,SharingInput:Le,SharingLinkList:Ft,SharingList:Wt,SharingDetailsTab:mr},data:()=>({config:new he,deleteEvent:null,error:"",expirationInterval:null,loading:!0,fileInfo:null,reshare:null,sharedWithMe:{},shares:[],linkShares:[],sections:OCA.Sharing.ShareTabSections.getSections(),projectsEnabled:(0,a.C)("core","projects_enabled",!1),showSharingDetailsView:!1,shareDetailsData:{},returnFocusElement:null}),computed:{isSharedWithMe(){return Object.keys(this.sharedWithMe).length>0},canReshare(){return!!(this.fileInfo.permissions&OC.PERMISSION_SHARE)||!!(this.reshare&&this.reshare.hasSharePermission&&this.config.isResharingAllowed)}},methods:{async update(e){this.fileInfo=e,this.resetState(),this.getShares()},async getShares(){try{this.loading=!0;const e=(0,o.KT)("apps/files_sharing/api/v1/shares"),t="json",r=(this.fileInfo.path+"/"+this.fileInfo.name).replace("//","/"),i=Z.Ay.get(e,{params:{format:t,path:r,reshares:!0}}),n=Z.Ay.get(e,{params:{format:t,path:r,shared_with_me:!0}}),[s,a]=await Promise.all([i,n]);this.loading=!1,this.processSharedWithMe(a),this.processShares(s)}catch(e){this.error=e?.response?.data?.ocs?.meta?.message?e.response.data.ocs.meta.message:t("files_sharing","Unable to load the shares list"),this.loading=!1,console.error("Error loading the shares list",e)}},resetState(){clearInterval(this.expirationInterval),this.loading=!0,this.error="",this.sharedWithMe={},this.shares=[],this.linkShares=[],this.showSharingDetailsView=!1,this.shareDetailsData={}},updateExpirationSubtitle(e){const r=(0,le.A)(e.expireDate).unix();this.$set(this.sharedWithMe,"subtitle",t("files_sharing","Expires {relativetime}",{relativetime:(0,le.A)(1e3*r).fromNow()})),(0,le.A)().unix()>r&&(clearInterval(this.expirationInterval),this.$set(this.sharedWithMe,"subtitle",t("files_sharing","this share just expired.")))},processShares(e){let{data:t}=e;if(t.ocs&&t.ocs.data&&t.ocs.data.length>0){const e=(0,s.My)(t.ocs.data.map((e=>new pe(e))),[e=>e.shareWithDisplayName,e=>e.label,e=>e.createdTime]);this.linkShares=e.filter((e=>e.type===oe.I.Link||e.type===oe.I.Email)),this.shares=e.filter((e=>e.type!==oe.I.Link&&e.type!==oe.I.Email)),console.debug("Processed",this.linkShares.length,"link share(s)"),console.debug("Processed",this.shares.length,"share(s)")}},processSharedWithMe(e){let{data:r}=e;if(r.ocs&&r.ocs.data&&r.ocs.data[0]){const e=new pe(r),i=function(e){return e.type===oe.I.Group?t("files_sharing","Shared with you and the group {group} by {owner}",{group:e.shareWithDisplayName,owner:e.ownerDisplayName},void 0,{escape:!1}):e.type===oe.I.Team?t("files_sharing","Shared with you and {circle} by {owner}",{circle:e.shareWithDisplayName,owner:e.ownerDisplayName},void 0,{escape:!1}):e.type===oe.I.Room?e.shareWithDisplayName?t("files_sharing","Shared with you and the conversation {conversation} by {owner}",{conversation:e.shareWithDisplayName,owner:e.ownerDisplayName},void 0,{escape:!1}):t("files_sharing","Shared with you in a conversation by {owner}",{owner:e.ownerDisplayName},void 0,{escape:!1}):t("files_sharing","Shared with you by {owner}",{owner:e.ownerDisplayName},void 0,{escape:!1})}(e),n=e.ownerDisplayName,s=e.owner;this.sharedWithMe={displayName:n,title:i,user:s},this.reshare=e,e.expireDate&&(0,le.A)(e.expireDate).unix()>(0,le.A)().unix()&&(this.updateExpirationSubtitle(e),this.expirationInterval=setInterval(this.updateExpirationSubtitle,1e4,e))}else this.fileInfo&&void 0!==this.fileInfo.shareOwnerId&&this.fileInfo.shareOwnerId!==(0,n.HW)().uid&&(this.sharedWithMe={displayName:this.fileInfo.shareOwner,title:t("files_sharing","Shared with you by {owner}",{owner:this.fileInfo.shareOwner},void 0,{escape:!1}),user:this.fileInfo.shareOwnerId})},addShare(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>{};e.type===oe.I.Email?this.linkShares.unshift(e):this.shares.unshift(e),this.awaitForShare(e,t)},removeShare(e){const t=e.type===oe.I.Email||e.type===oe.I.Link?this.linkShares:this.shares,r=t.findIndex((t=>t.id===e.id));-1!==r&&t.splice(r,1)},awaitForShare(e,t){this.$nextTick((()=>{let r=this.$refs.shareList;e.type===oe.I.Email&&(r=this.$refs.linkShareList);const i=r.$children.find((t=>t.share===e));i&&t(i)}))},toggleShareDetailsView(e){if(!this.showSharingDetailsView)if(Array.from(document.activeElement.classList).some((e=>e.startsWith("action-")))){const e=document.activeElement.closest('[role="menu"]')?.id;this.returnFocusElement=document.querySelector(`[aria-controls="${e}"]`)}else this.returnFocusElement=document.activeElement;e&&(this.shareDetailsData=e),this.showSharingDetailsView=!this.showSharingDetailsView,this.showSharingDetailsView||this.$nextTick((()=>{this.returnFocusElement?.focus(),this.returnFocusElement=null}))}}},vr=yr;var Cr=i(19093),wr={};wr.styleTagTransform=v(),wr.setAttributes=A(),wr.insert=p().bind(null,"head"),wr.domAPI=u(),wr.insertStyleElement=m(),c()(Cr.A,wr),Cr.A&&Cr.A.locals&&Cr.A.locals;const Er=(0,Ce.A)(vr,(function(){var e=this,t=e._self._c;return t("div",{staticClass:"sharingTab",class:{"icon-loading":e.loading}},[e.error?t("div",{staticClass:"emptycontent",class:{emptyContentWithSections:e.sections.length>0}},[t("div",{staticClass:"icon icon-error"}),e._v(" "),t("h2",[e._v(e._s(e.error))])]):e._e(),e._v(" "),t("div",{directives:[{name:"show",rawName:"v-show",value:!e.showSharingDetailsView,expression:"!showSharingDetailsView"}],staticClass:"sharingTab__content"},[t("ul",[e.isSharedWithMe?t("SharingEntrySimple",e._b({staticClass:"sharing-entry__reshare",scopedSlots:e._u([{key:"avatar",fn:function(){return[t("NcAvatar",{staticClass:"sharing-entry__avatar",attrs:{user:e.sharedWithMe.user,"display-name":e.sharedWithMe.displayName}})]},proxy:!0}],null,!1,3197855346)},"SharingEntrySimple",e.sharedWithMe,!1)):e._e()],1),e._v(" "),e.loading?e._e():t("SharingInput",{attrs:{"can-reshare":e.canReshare,"file-info":e.fileInfo,"link-shares":e.linkShares,reshare:e.reshare,shares:e.shares},on:{"open-sharing-details":e.toggleShareDetailsView}}),e._v(" "),e.loading?e._e():t("SharingLinkList",{ref:"linkShareList",attrs:{"can-reshare":e.canReshare,"file-info":e.fileInfo,shares:e.linkShares},on:{"open-sharing-details":e.toggleShareDetailsView}}),e._v(" "),e.loading?e._e():t("SharingList",{ref:"shareList",attrs:{shares:e.shares,"file-info":e.fileInfo},on:{"open-sharing-details":e.toggleShareDetailsView}}),e._v(" "),e.canReshare&&!e.loading?t("SharingInherited",{attrs:{"file-info":e.fileInfo}}):e._e(),e._v(" "),t("SharingEntryInternal",{attrs:{"file-info":e.fileInfo}}),e._v(" "),e.projectsEnabled&&e.fileInfo?t("CollectionList",{attrs:{id:`${e.fileInfo.id}`,type:"file",name:e.fileInfo.name}}):e._e()],1),e._v(" "),e._l(e.sections,(function(r,i){return t("div",{directives:[{name:"show",rawName:"v-show",value:!e.showSharingDetailsView,expression:"!showSharingDetailsView"}],key:i,ref:"section-"+i,refInFor:!0,staticClass:"sharingTab__additionalContent"},[t(r(e.$refs["section-"+i],e.fileInfo),{tag:"component",attrs:{"file-info":e.fileInfo}})],1)})),e._v(" "),e.showSharingDetailsView?t("SharingDetailsTab",{attrs:{"file-info":e.shareDetailsData.fileInfo,share:e.shareDetailsData.share},on:{"close-sharing-details":e.toggleShareDetailsView,"add:share":e.addShare,"remove:share":e.removeShare}}):e._e()],2)}),[],!1,null,"6332ffca",null).exports},27518:e=>{"use strict";e.exports="data:image/svg+xml,%3c%21--%20-%20SPDX-FileCopyrightText:%202020%20Google%20Inc.%20-%20SPDX-License-Identifier:%20Apache-2.0%20--%3e%3csvg%20xmlns=%27http://www.w3.org/2000/svg%27%20width=%2724%27%20height=%2724%27%20fill=%27%23222%27%3e%3cpath%20d=%27M15.4%2016.6L10.8%2012l4.6-4.6L14%206l-6%206%206%206%201.4-1.4z%27/%3e%3c/svg%3e"},27514:e=>{"use strict";e.exports="data:image/svg+xml,%3c%21--%20-%20SPDX-FileCopyrightText:%202020%20Google%20Inc.%20-%20SPDX-License-Identifier:%20Apache-2.0%20--%3e%3csvg%20xmlns=%27http://www.w3.org/2000/svg%27%20width=%2724%27%20height=%2724%27%20fill=%27%23222%27%3e%3cpath%20d=%27M18.4%207.4L17%206l-6%206%206%206%201.4-1.4-4.6-4.6%204.6-4.6m-6%200L11%206l-6%206%206%206%201.4-1.4L7.8%2012l4.6-4.6z%27/%3e%3c/svg%3e"},79722:e=>{"use strict";e.exports="data:image/svg+xml,%3c%21--%20-%20SPDX-FileCopyrightText:%202020%20Google%20Inc.%20-%20SPDX-License-Identifier:%20Apache-2.0%20--%3e%3csvg%20xmlns=%27http://www.w3.org/2000/svg%27%20width=%2724%27%20height=%2724%27%20fill=%27%23222%27%3e%3cpath%20d=%27M5.6%207.4L7%206l6%206-6%206-1.4-1.4%204.6-4.6-4.6-4.6m6%200L13%206l6%206-6%206-1.4-1.4%204.6-4.6-4.6-4.6z%27/%3e%3c/svg%3e"},86886:e=>{"use strict";e.exports="data:image/svg+xml,%3c%21--%20-%20SPDX-FileCopyrightText:%202020%20Google%20Inc.%20-%20SPDX-License-Identifier:%20Apache-2.0%20--%3e%3csvg%20xmlns=%27http://www.w3.org/2000/svg%27%20width=%2724%27%20height=%2724%27%20fill=%27%23222%27%3e%3cpath%20d=%27M8.6%2016.6l4.6-4.6-4.6-4.6L10%206l6%206-6%206-1.4-1.4z%27/%3e%3c/svg%3e"},35810:(e,t,r)=>{"use strict";r.d(t,{Al:()=>i.r,H4:()=>i.c,My:()=>u,Q$:()=>i.e,R3:()=>i.n,VL:()=>i.l,lJ:()=>i.d,pt:()=>i.F,ur:()=>d,v7:()=>c});var i=r(68251),n=(r(43627),r(53334)),s=r(380),a=r(65606);Error;const o=["B","KB","MB","GB","TB","PB"],l=["B","KiB","MiB","GiB","TiB","PiB"];function c(e,t=!1,r=!1,i=!1){r=r&&!i,"string"==typeof e&&(e=Number(e));let s=e>0?Math.floor(Math.log(e)/Math.log(i?1e3:1024)):0;s=Math.min((r?l.length:o.length)-1,s);const a=r?l[s]:o[s];let c=(e/Math.pow(i?1e3:1024,s)).toFixed(1);return!0===t&&0===s?("0.0"!==c?"< 1 ":"0 ")+(r?l[1]:o[1]):(c=s<2?parseFloat(c).toFixed(0):parseFloat(c).toLocaleString((0,n.lO)()),c+" "+a)}function h(e){return e instanceof Date?e.toISOString():String(e)}function u(e,t,r){r=r??[];const i=(t=t??[e=>e]).map(((e,t)=>"asc"===(r[t]??"asc")?1:-1)),s=Intl.Collator([(0,n.Z0)(),(0,n.lO)()],{numeric:!0,usage:"sort"});return[...e].sort(((e,r)=>{for(const[n,a]of t.entries()){const t=s.compare(h(a(e)),h(a(r)));if(0!==t)return t*i[n]}return 0}))}function d(e,t={}){const r={sortingMode:"basename",sortingOrder:"asc",...t};return u(e,[...r.sortFavoritesFirst?[e=>1!==e.attributes?.favorite]:[],...r.sortFoldersFirst?[e=>"folder"!==e.type]:[],..."basename"!==r.sortingMode?[e=>e[r.sortingMode]]:[],e=>{return(t=e.displayname||e.attributes?.displayname||e.basename).lastIndexOf(".")>0?t.slice(0,t.lastIndexOf(".")):t;var t},e=>e.basename],[...r.sortFavoritesFirst?["asc"]:[],...r.sortFoldersFirst?["asc"]:[],..."mtime"===r.sortingMode?["asc"===r.sortingOrder?"desc":"asc"]:[],..."mtime"!==r.sortingMode&&"basename"!==r.sortingMode?[r.sortingOrder]:[],r.sortingOrder,r.sortingOrder])}var p={};!function(e){const t=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",r="["+t+"]["+t+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*",i=new RegExp("^"+r+"$");e.isExist=function(e){return void 0!==e},e.isEmptyObject=function(e){return 0===Object.keys(e).length},e.merge=function(e,t,r){if(t){const i=Object.keys(t),n=i.length;for(let s=0;s!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(e,t,r){return e}};f.buildOptions=function(e){return Object.assign({},A,e)},f.defaultOptions=A,!Number.parseInt&&window.parseInt&&(Number.parseInt=window.parseInt),!Number.parseFloat&&window.parseFloat&&(Number.parseFloat=window.parseFloat);new RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?","gm");var g={};function m(e,t,r){let i;const n={};for(let s=0;s0&&(n[t.textNodeName]=i):void 0!==i&&(n[t.textNodeName]=i),n}function y(e){const t=Object.keys(e);for(let e=0;e`,s=!1;continue}if(l===t.commentPropName){n+=i+`\x3c!--${o[l][0][t.textNodeName]}--\x3e`,s=!0;continue}if("?"===l[0]){const e=S(o[":@"],t),r="?xml"===l?"":i;let a=o[l][0][t.textNodeName];a=0!==a.length?" "+a:"",n+=r+`<${l}${a}${e}?>`,s=!0;continue}let h=i;""!==h&&(h+=t.indentBy);const u=i+`<${l}${S(o[":@"],t)}`,d=_(o[l],t,c,h);-1!==t.unpairedTags.indexOf(l)?t.suppressUnpairedNode?n+=u+">":n+=u+"/>":d&&0!==d.length||!t.suppressEmptyNode?d&&d.endsWith(">")?n+=u+`>${d}${i}`:(n+=u+">",d&&""!==i&&(d.includes("/>")||d.includes("`):n+=u+"/>",s=!0}return n}function b(e){const t=Object.keys(e);for(let r=0;r0&&t.processEntities)for(let r=0;r0&&(r="\n"),_(e,t,"",r)},D=function(e){return"function"==typeof e?e:Array.isArray(e)?t=>{for(const r of e){if("string"==typeof r&&t===r)return!0;if(r instanceof RegExp&&r.test(t))return!0}}:()=>!1},T={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(e,t){return t},attributeValueProcessor:function(e,t){return t},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&"},{regex:new RegExp(">","g"),val:">"},{regex:new RegExp("<","g"),val:"<"},{regex:new RegExp("'","g"),val:"'"},{regex:new RegExp('"',"g"),val:"""}],processEntities:!0,stopNodes:[],oneListGroup:!1};function N(e){this.options=Object.assign({},T,e),!0===this.options.ignoreAttributes||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.ignoreAttributesFn=D(this.options.ignoreAttributes),this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=B),this.processTextOrObjNode=P,this.options.format?(this.indentate=R,this.tagEndChar=">\n",this.newLine="\n"):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}function P(e,t,r,i){const n=this.j2x(e,r+1,i.concat(t));return void 0!==e[this.options.textNodeName]&&1===Object.keys(e).length?this.buildTextValNode(e[this.options.textNodeName],t,n.attrStr,r):this.buildObjectNode(n.val,t,n.attrStr,r)}function R(e){return this.options.indentBy.repeat(e)}function B(e){return!(!e.startsWith(this.options.attributeNamePrefix)||e===this.options.textNodeName)&&e.substr(this.attrPrefixLen)}N.prototype.build=function(e){return this.options.preserveOrder?k(e,this.options):(Array.isArray(e)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(e={[this.options.arrayNodeName]:e}),this.j2x(e,0,[]).val)},N.prototype.j2x=function(e,t,r){let i="",n="";const s=r.join(".");for(let a in e)if(Object.prototype.hasOwnProperty.call(e,a))if(void 0===e[a])this.isAttribute(a)&&(n+="");else if(null===e[a])this.isAttribute(a)?n+="":"?"===a[0]?n+=this.indentate(t)+"<"+a+"?"+this.tagEndChar:n+=this.indentate(t)+"<"+a+"/"+this.tagEndChar;else if(e[a]instanceof Date)n+=this.buildTextValNode(e[a],a,"",t);else if("object"!=typeof e[a]){const r=this.isAttribute(a);if(r&&!this.ignoreAttributesFn(r,s))i+=this.buildAttrPairStr(r,""+e[a]);else if(!r)if(a===this.options.textNodeName){let t=this.options.tagValueProcessor(a,""+e[a]);n+=this.replaceEntitiesValue(t)}else n+=this.buildTextValNode(e[a],a,"",t)}else if(Array.isArray(e[a])){const i=e[a].length;let s="",o="";for(let l=0;l"+e+n}},N.prototype.closeTag=function(e){let t="";return-1!==this.options.unpairedTags.indexOf(e)?this.options.suppressUnpairedNode||(t="/"):t=this.options.suppressEmptyNode?"/":`>`+this.newLine;if(!1!==this.options.commentPropName&&t===this.options.commentPropName)return this.indentate(i)+`\x3c!--${e}--\x3e`+this.newLine;if("?"===t[0])return this.indentate(i)+"<"+t+r+"?"+this.tagEndChar;{let n=this.options.tagValueProcessor(t,e);return n=this.replaceEntitiesValue(n),""===n?this.indentate(i)+"<"+t+r+this.closeTag(t)+this.tagEndChar:this.indentate(i)+"<"+t+r+">"+n+"0&&this.options.processEntities)for(let t=0;tconsole.error("SEMVER",...e):()=>{},O={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER||9007199254740991,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2},M={exports:{}};!function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:r,MAX_SAFE_BUILD_LENGTH:i,MAX_LENGTH:n}=O,s=L,a=(t=e.exports={}).re=[],o=t.safeRe=[],l=t.src=[],c=t.t={};let h=0;const u="[a-zA-Z0-9-]",d=[["\\s",1],["\\d",n],[u,i]],p=(e,t,r)=>{const i=(e=>{for(const[t,r]of d)e=e.split(`${t}*`).join(`${t}{0,${r}}`).split(`${t}+`).join(`${t}{1,${r}}`);return e})(t),n=h++;s(e,n,t),c[e]=n,l[n]=t,a[n]=new RegExp(t,r?"g":void 0),o[n]=new RegExp(i,r?"g":void 0)};p("NUMERICIDENTIFIER","0|[1-9]\\d*"),p("NUMERICIDENTIFIERLOOSE","\\d+"),p("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${u}*`),p("MAINVERSION",`(${l[c.NUMERICIDENTIFIER]})\\.(${l[c.NUMERICIDENTIFIER]})\\.(${l[c.NUMERICIDENTIFIER]})`),p("MAINVERSIONLOOSE",`(${l[c.NUMERICIDENTIFIERLOOSE]})\\.(${l[c.NUMERICIDENTIFIERLOOSE]})\\.(${l[c.NUMERICIDENTIFIERLOOSE]})`),p("PRERELEASEIDENTIFIER",`(?:${l[c.NUMERICIDENTIFIER]}|${l[c.NONNUMERICIDENTIFIER]})`),p("PRERELEASEIDENTIFIERLOOSE",`(?:${l[c.NUMERICIDENTIFIERLOOSE]}|${l[c.NONNUMERICIDENTIFIER]})`),p("PRERELEASE",`(?:-(${l[c.PRERELEASEIDENTIFIER]}(?:\\.${l[c.PRERELEASEIDENTIFIER]})*))`),p("PRERELEASELOOSE",`(?:-?(${l[c.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${l[c.PRERELEASEIDENTIFIERLOOSE]})*))`),p("BUILDIDENTIFIER",`${u}+`),p("BUILD",`(?:\\+(${l[c.BUILDIDENTIFIER]}(?:\\.${l[c.BUILDIDENTIFIER]})*))`),p("FULLPLAIN",`v?${l[c.MAINVERSION]}${l[c.PRERELEASE]}?${l[c.BUILD]}?`),p("FULL",`^${l[c.FULLPLAIN]}$`),p("LOOSEPLAIN",`[v=\\s]*${l[c.MAINVERSIONLOOSE]}${l[c.PRERELEASELOOSE]}?${l[c.BUILD]}?`),p("LOOSE",`^${l[c.LOOSEPLAIN]}$`),p("GTLT","((?:<|>)?=?)"),p("XRANGEIDENTIFIERLOOSE",`${l[c.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),p("XRANGEIDENTIFIER",`${l[c.NUMERICIDENTIFIER]}|x|X|\\*`),p("XRANGEPLAIN",`[v=\\s]*(${l[c.XRANGEIDENTIFIER]})(?:\\.(${l[c.XRANGEIDENTIFIER]})(?:\\.(${l[c.XRANGEIDENTIFIER]})(?:${l[c.PRERELEASE]})?${l[c.BUILD]}?)?)?`),p("XRANGEPLAINLOOSE",`[v=\\s]*(${l[c.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[c.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[c.XRANGEIDENTIFIERLOOSE]})(?:${l[c.PRERELEASELOOSE]})?${l[c.BUILD]}?)?)?`),p("XRANGE",`^${l[c.GTLT]}\\s*${l[c.XRANGEPLAIN]}$`),p("XRANGELOOSE",`^${l[c.GTLT]}\\s*${l[c.XRANGEPLAINLOOSE]}$`),p("COERCEPLAIN",`(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?`),p("COERCE",`${l[c.COERCEPLAIN]}(?:$|[^\\d])`),p("COERCEFULL",l[c.COERCEPLAIN]+`(?:${l[c.PRERELEASE]})?(?:${l[c.BUILD]})?(?:$|[^\\d])`),p("COERCERTL",l[c.COERCE],!0),p("COERCERTLFULL",l[c.COERCEFULL],!0),p("LONETILDE","(?:~>?)"),p("TILDETRIM",`(\\s*)${l[c.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",p("TILDE",`^${l[c.LONETILDE]}${l[c.XRANGEPLAIN]}$`),p("TILDELOOSE",`^${l[c.LONETILDE]}${l[c.XRANGEPLAINLOOSE]}$`),p("LONECARET","(?:\\^)"),p("CARETTRIM",`(\\s*)${l[c.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",p("CARET",`^${l[c.LONECARET]}${l[c.XRANGEPLAIN]}$`),p("CARETLOOSE",`^${l[c.LONECARET]}${l[c.XRANGEPLAINLOOSE]}$`),p("COMPARATORLOOSE",`^${l[c.GTLT]}\\s*(${l[c.LOOSEPLAIN]})$|^$`),p("COMPARATOR",`^${l[c.GTLT]}\\s*(${l[c.FULLPLAIN]})$|^$`),p("COMPARATORTRIM",`(\\s*)${l[c.GTLT]}\\s*(${l[c.LOOSEPLAIN]}|${l[c.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",p("HYPHENRANGE",`^\\s*(${l[c.XRANGEPLAIN]})\\s+-\\s+(${l[c.XRANGEPLAIN]})\\s*$`),p("HYPHENRANGELOOSE",`^\\s*(${l[c.XRANGEPLAINLOOSE]})\\s+-\\s+(${l[c.XRANGEPLAINLOOSE]})\\s*$`),p("STAR","(<|>)?=?\\s*\\*"),p("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),p("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}(M,M.exports);var U=M.exports;Object.freeze({loose:!0}),Object.freeze({});const F=/^[0-9]+$/,$=(e,t)=>{const r=F.test(e),i=F.test(t);return r&&i&&(e=+e,t=+t),e===t?0:r&&!i?-1:i&&!r?1:e$(t,e)};const{MAX_LENGTH:j,MAX_SAFE_INTEGER:q}=O,{safeRe:H,t:z}=U,{compareIdentifiers:W}=V;s.m}}]); //# sourceMappingURL=9701-9701.js.map?v=3fa79f72bc23927854f4