1
0

3736-3736.js 207 KB

12
  1. (self.webpackChunknextcloud=self.webpackChunknextcloud||[]).push([[3736],{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,i){var r;r=function(){return function t(i,r,n){function s(o,l){if(!r[o]){if(!i[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=r[o]={exports:{}};i[o][0].call(h.exports,(function(e){return s(i[o][1][e]||e)}),h,h.exports,t,i,r,n)}return r[o].exports}for(var a=e,o=0;o<n.length;o++)s(n[o]);return s}({1:[function(e,t,i){t.exports=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then}},{}],2:[function(e,t,i){var r=e("./utils").getSymbolSize;i.getRowColCoords=function(e){if(1===e)return[];for(var t=Math.floor(e/7)+2,i=r(e),n=145===i?26:2*Math.ceil((i-13)/(2*t-2)),s=[i-7],a=1;a<t-1;a++)s[a]=s[a-1]-n;return s.push(6),s.reverse()},i.getPositions=function(e){for(var t=[],r=i.getRowColCoords(e),n=r.length,s=0;s<n;s++)for(var a=0;a<n;a++)0===s&&0===a||0===s&&a===n-1||s===n-1&&0===a||t.push([r[s],r[a]]);return t}},{"./utils":21}],3:[function(e,t,i){var r=e("./mode"),n=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function s(e){this.mode=r.ALPHANUMERIC,this.data=e}s.getBitsLength=function(e){return 11*Math.floor(e/2)+e%2*6},s.prototype.getLength=function(){return this.data.length},s.prototype.getBitsLength=function(){return s.getBitsLength(this.data.length)},s.prototype.write=function(e){var t;for(t=0;t+2<=this.data.length;t+=2){var i=45*n.indexOf(this.data[t]);i+=n.indexOf(this.data[t+1]),e.put(i,11)}this.data.length%2&&e.put(n.indexOf(this.data[t]),6)},t.exports=s},{"./mode":14}],4:[function(e,t,i){function r(){this.buffer=[],this.length=0}r.prototype={get:function(e){var t=Math.floor(e/8);return 1==(this.buffer[t]>>>7-e%8&1)},put:function(e,t){for(var i=0;i<t;i++)this.putBit(1==(e>>>t-i-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=r},{}],5:[function(e,t,i){var r=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=r.alloc(e*e),this.reservedBit=r.alloc(e*e)}n.prototype.set=function(e,t,i,r){var n=e*this.size+t;this.data[n]=i,r&&(this.reservedBit[n]=!0)},n.prototype.get=function(e,t){return this.data[e*this.size+t]},n.prototype.xor=function(e,t,i){this.data[e*this.size+t]^=i},n.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]},t.exports=n},{"../utils/buffer":28}],6:[function(e,t,i){var r=e("../utils/buffer"),n=e("./mode");function s(e){this.mode=n.BYTE,this.data=r.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,i=this.data.length;t<i;t++)e.put(this.data[t],8)},t.exports=s},{"../utils/buffer":28,"./mode":14}],7:[function(e,t,i){var r=e("./error-correction-level"),n=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],s=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];i.getBlocksCount=function(e,t){switch(t){case r.L:return n[4*(e-1)+0];case r.M:return n[4*(e-1)+1];case r.Q:return n[4*(e-1)+2];case r.H:return n[4*(e-1)+3];default:return}},i.getTotalCodewordsCount=function(e,t){switch(t){case r.L:return s[4*(e-1)+0];case r.M:return s[4*(e-1)+1];case r.Q:return s[4*(e-1)+2];case r.H:return s[4*(e-1)+3];default:return}}},{"./error-correction-level":8}],8:[function(e,t,i){i.L={bit:1},i.M={bit:0},i.Q={bit:3},i.H={bit:2},i.isValid=function(e){return e&&void 0!==e.bit&&e.bit>=0&&e.bit<4},i.from=function(e,t){if(i.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 i.L;case"m":case"medium":return i.M;case"q":case"quartile":return i.Q;case"h":case"high":return i.H;default:throw new Error("Unknown EC Level: "+e)}}(e)}catch(e){return t}}},{}],9:[function(e,t,i){var r=e("./utils").getSymbolSize;i.getPositions=function(e){var t=r(e);return[[0,0],[t-7,0],[0,t-7]]}},{"./utils":21}],10:[function(e,t,i){var r=e("./utils"),n=r.getBCHDigit(1335);i.getEncodedBits=function(e,t){for(var i=e.bit<<3|t,s=i<<10;r.getBCHDigit(s)-n>=0;)s^=1335<<r.getBCHDigit(s)-n;return 21522^(i<<10|s)}},{"./utils":21}],11:[function(e,t,i){var r=e("../utils/buffer"),n=r.alloc(512),s=r.alloc(256);!function(){for(var e=1,t=0;t<255;t++)n[t]=e,s[e]=t,256&(e<<=1)&&(e^=285);for(t=255;t<512;t++)n[t]=n[t-255]}(),i.log=function(e){if(e<1)throw new Error("log("+e+")");return s[e]},i.exp=function(e){return n[e]},i.mul=function(e,t){return 0===e||0===t?0:n[s[e]+s[t]]}},{"../utils/buffer":28}],12:[function(e,t,i){var r=e("./mode"),n=e("./utils");function s(e){this.mode=r.KANJI,this.data=e}s.getBitsLength=function(e){return 13*e},s.prototype.getLength=function(){return this.data.length},s.prototype.getBitsLength=function(){return s.getBitsLength(this.data.length)},s.prototype.write=function(e){var t;for(t=0;t<this.data.length;t++){var i=n.toSJIS(this.data[t]);if(i>=33088&&i<=40956)i-=33088;else{if(!(i>=57408&&i<=60351))throw new Error("Invalid SJIS character: "+this.data[t]+"\nMake sure your charset is UTF-8");i-=49472}i=192*(i>>>8&255)+(255&i),e.put(i,13)}},t.exports=s},{"./mode":14,"./utils":21}],13:[function(e,t,i){i.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};var r=3,n=3,s=40,a=10;function o(e,t,r){switch(e){case i.Patterns.PATTERN000:return(t+r)%2==0;case i.Patterns.PATTERN001:return t%2==0;case i.Patterns.PATTERN010:return r%3==0;case i.Patterns.PATTERN011:return(t+r)%3==0;case i.Patterns.PATTERN100:return(Math.floor(t/2)+Math.floor(r/3))%2==0;case i.Patterns.PATTERN101:return t*r%2+t*r%3==0;case i.Patterns.PATTERN110:return(t*r%2+t*r%3)%2==0;case i.Patterns.PATTERN111:return(t*r%3+(t+r)%2)%2==0;default:throw new Error("bad maskPattern:"+e)}}i.isValid=function(e){return null!=e&&""!==e&&!isNaN(e)&&e>=0&&e<=7},i.from=function(e){return i.isValid(e)?parseInt(e,10):void 0},i.getPenaltyN1=function(e){for(var t=e.size,i=0,n=0,s=0,a=null,o=null,l=0;l<t;l++){n=s=0,a=o=null;for(var c=0;c<t;c++){var h=e.get(l,c);h===a?n++:(n>=5&&(i+=r+(n-5)),a=h,n=1),(h=e.get(c,l))===o?s++:(s>=5&&(i+=r+(s-5)),o=h,s=1)}n>=5&&(i+=r+(n-5)),s>=5&&(i+=r+(s-5))}return i},i.getPenaltyN2=function(e){for(var t=e.size,i=0,r=0;r<t-1;r++)for(var s=0;s<t-1;s++){var a=e.get(r,s)+e.get(r,s+1)+e.get(r+1,s)+e.get(r+1,s+1);4!==a&&0!==a||i++}return i*n},i.getPenaltyN3=function(e){for(var t=e.size,i=0,r=0,n=0,a=0;a<t;a++){r=n=0;for(var o=0;o<t;o++)r=r<<1&2047|e.get(a,o),o>=10&&(1488===r||93===r)&&i++,n=n<<1&2047|e.get(o,a),o>=10&&(1488===n||93===n)&&i++}return i*s},i.getPenaltyN4=function(e){for(var t=0,i=e.data.length,r=0;r<i;r++)t+=e.data[r];return Math.abs(Math.ceil(100*t/i/5)-10)*a},i.applyMask=function(e,t){for(var i=t.size,r=0;r<i;r++)for(var n=0;n<i;n++)t.isReserved(n,r)||t.xor(n,r,o(e,n,r))},i.getBestMask=function(e,t){for(var r=Object.keys(i.Patterns).length,n=0,s=1/0,a=0;a<r;a++){t(a),i.applyMask(a,e);var o=i.getPenaltyN1(e)+i.getPenaltyN2(e)+i.getPenaltyN3(e)+i.getPenaltyN4(e);i.applyMask(a,e),o<s&&(s=o,n=a)}return n}},{}],14:[function(e,t,i){var r=e("./version-check"),n=e("./regex");i.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},i.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},i.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},i.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},i.MIXED={bit:-1},i.getCharCountIndicator=function(e,t){if(!e.ccBits)throw new Error("Invalid mode: "+e);if(!r.isValid(t))throw new Error("Invalid version: "+t);return t>=1&&t<10?e.ccBits[0]:t<27?e.ccBits[1]:e.ccBits[2]},i.getBestModeForData=function(e){return n.testNumeric(e)?i.NUMERIC:n.testAlphanumeric(e)?i.ALPHANUMERIC:n.testKanji(e)?i.KANJI:i.BYTE},i.toString=function(e){if(e&&e.id)return e.id;throw new Error("Invalid mode")},i.isValid=function(e){return e&&e.bit&&e.ccBits},i.from=function(e,t){if(i.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 i.NUMERIC;case"alphanumeric":return i.ALPHANUMERIC;case"kanji":return i.KANJI;case"byte":return i.BYTE;default:throw new Error("Unknown mode: "+e)}}(e)}catch(e){return t}}},{"./regex":19,"./version-check":22}],15:[function(e,t,i){var r=e("./mode");function n(e){this.mode=r.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,i,r;for(t=0;t+3<=this.data.length;t+=3)i=this.data.substr(t,3),r=parseInt(i,10),e.put(r,10);var n=this.data.length-t;n>0&&(i=this.data.substr(t),r=parseInt(i,10),e.put(r,3*n+1))},t.exports=n},{"./mode":14}],16:[function(e,t,i){var r=e("../utils/buffer"),n=e("./galois-field");i.mul=function(e,t){for(var i=r.alloc(e.length+t.length-1),s=0;s<e.length;s++)for(var a=0;a<t.length;a++)i[s+a]^=n.mul(e[s],t[a]);return i},i.mod=function(e,t){for(var i=r.from(e);i.length-t.length>=0;){for(var s=i[0],a=0;a<t.length;a++)i[a]^=n.mul(t[a],s);for(var o=0;o<i.length&&0===i[o];)o++;i=i.slice(o)}return i},i.generateECPolynomial=function(e){for(var t=r.from([1]),s=0;s<e;s++)t=i.mul(t,[1,n.exp(s)]);return t}},{"../utils/buffer":28,"./galois-field":11}],17:[function(e,t,i){var r=e("../utils/buffer"),n=e("./utils"),s=e("./error-correction-level"),a=e("./bit-buffer"),o=e("./bit-matrix"),l=e("./alignment-pattern"),c=e("./finder-pattern"),h=e("./mask-pattern"),u=e("./error-correction-code"),d=e("./reed-solomon-encoder"),p=e("./version"),f=e("./format-info"),A=e("./mode"),g=e("./segments"),m=e("isarray");function E(e,t,i){var r,n,s=e.size,a=f.getEncodedBits(t,i);for(r=0;r<15;r++)n=1==(a>>r&1),r<6?e.set(r,8,n,!0):r<8?e.set(r+1,8,n,!0):e.set(s-15+r,8,n,!0),r<8?e.set(8,s-r-1,n,!0):r<9?e.set(8,15-r-1+1,n,!0):e.set(8,15-r-1,n,!0);e.set(s-8,8,1,!0)}function y(e,t,i){var s=new a;i.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<l;c++)s.put(c%2?17:236,8);return function(e,t,i){for(var s=n.getSymbolTotalCodewords(t),a=s-u.getTotalCodewordsCount(t,i),o=u.getBlocksCount(t,i),l=o-s%o,c=Math.floor(s/o),h=Math.floor(a/o),p=h+1,f=c-h,A=new d(f),g=0,m=new Array(o),E=new Array(o),y=0,v=r.from(e.buffer),_=0;_<o;_++){var C=_<l?h:p;m[_]=v.slice(g,g+C),E[_]=A.encode(m[_]),g+=C,y=Math.max(y,C)}var w,b,S=r.alloc(s),x=0;for(w=0;w<y;w++)for(b=0;b<o;b++)w<m[b].length&&(S[x++]=m[b][w]);for(w=0;w<f;w++)for(b=0;b<o;b++)S[x++]=E[b][w];return S}(s,e,t)}function v(e,t,i,r){var s;if(m(e))s=g.fromArray(e);else{if("string"!=typeof e)throw new Error("Invalid data");var a=t;if(!a){var u=g.rawSplit(e);a=p.getBestVersionForData(u,i)}s=g.fromString(e,a||40)}var d=p.getBestVersionForData(s,i);if(!d)throw new Error("The amount of data is too big to be stored in a QR Code");if(t){if(t<d)throw new Error("\nThe chosen QR Code version cannot contain this amount of data.\nMinimum version required to store current data is: "+d+".\n")}else t=d;var f=y(t,i,s),A=n.getSymbolSize(t),v=new o(A);return function(e,t){for(var i=e.size,r=c.getPositions(t),n=0;n<r.length;n++)for(var s=r[n][0],a=r[n][1],o=-1;o<=7;o++)if(!(s+o<=-1||i<=s+o))for(var l=-1;l<=7;l++)a+l<=-1||i<=a+l||(o>=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))}(v,t),function(e){for(var t=e.size,i=8;i<t-8;i++){var r=i%2==0;e.set(i,6,r,!0),e.set(6,i,r,!0)}}(v),function(e,t){for(var i=l.getPositions(t),r=0;r<i.length;r++)for(var n=i[r][0],s=i[r][1],a=-2;a<=2;a++)for(var o=-2;o<=2;o++)-2===a||2===a||-2===o||2===o||0===a&&0===o?e.set(n+a,s+o,!0,!0):e.set(n+a,s+o,!1,!0)}(v,t),E(v,i,0),t>=7&&function(e,t){for(var i,r,n,s=e.size,a=p.getEncodedBits(t),o=0;o<18;o++)i=Math.floor(o/3),r=o%3+s-8-3,n=1==(a>>o&1),e.set(i,r,n,!0),e.set(r,i,n,!0)}(v,t),function(e,t){for(var i=e.size,r=-1,n=i-1,s=7,a=0,o=i-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<t.length&&(c=1==(t[a]>>>s&1)),e.set(n,o-l,c),-1==--s&&(a++,s=7)}if((n+=r)<0||i<=n){n-=r,r=-r;break}}}(v,f),isNaN(r)&&(r=h.getBestMask(v,E.bind(null,v,i))),h.applyMask(r,v),E(v,i,r),{modules:v,version:t,errorCorrectionLevel:i,maskPattern:r,segments:s}}i.create=function(e,t){if(void 0===e||""===e)throw new Error("No input text");var i,r,a=s.M;return void 0!==t&&(a=s.from(t.errorCorrectionLevel,s.M),i=p.from(t.version),r=h.from(t.maskPattern),t.toSJISFunc&&n.setToSJISFunction(t.toSJISFunc)),v(e,i,a,r)}},{"../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,i){var r=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=r.alloc(this.degree),i=s.concat([e,t],e.length+this.degree),a=n.mod(i,this.genPoly),o=this.degree-a.length;if(o>0){var l=r.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,i){var r="[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]))+";i.KANJI=new RegExp(n,"g"),i.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),i.BYTE=new RegExp(s,"g"),i.NUMERIC=new RegExp(r,"g"),i.ALPHANUMERIC=new RegExp("[A-Z $%*+\\-./:]+","g");var a=new RegExp("^"+n+"$"),o=new RegExp("^"+r+"$"),l=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");i.testKanji=function(e){return a.test(e)},i.testNumeric=function(e){return o.test(e)},i.testAlphanumeric=function(e){return l.test(e)}},{}],20:[function(e,t,i){var r=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,i){for(var r,n=[];null!==(r=e.exec(i));)n.push({data:r[0],index:r.index,mode:t,length:r[0].length});return n}function p(e){var t,i,n=d(l.NUMERIC,r.NUMERIC,e),s=d(l.ALPHANUMERIC,r.ALPHANUMERIC,e);return c.isKanjiModeEnabled()?(t=d(l.BYTE,r.BYTE,e),i=d(l.KANJI,r.KANJI,e)):(t=d(l.BYTE_KANJI,r.BYTE,e),i=[]),n.concat(s,t,i).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 r.NUMERIC:return n.getBitsLength(e);case r.ALPHANUMERIC:return s.getBitsLength(e);case r.KANJI:return o.getBitsLength(e);case r.BYTE:return a.getBitsLength(e)}}function A(e,t){var i,l=r.getBestModeForData(e);if((i=r.from(t,l))!==r.BYTE&&i.bit<l.bit)throw new Error('"'+e+'" cannot be encoded with mode '+r.toString(i)+".\n Suggested mode is: "+r.toString(l));switch(i!==r.KANJI||c.isKanjiModeEnabled()||(i=r.BYTE),i){case r.NUMERIC:return new n(e);case r.ALPHANUMERIC:return new s(e);case r.KANJI:return new o(e);case r.BYTE:return new a(e)}}i.fromArray=function(e){return e.reduce((function(e,t){return"string"==typeof t?e.push(A(t,null)):t.data&&e.push(A(t.data,t.mode)),e}),[])},i.fromString=function(e,t){for(var n=function(e,t){for(var i={},n={start:{}},s=["start"],a=0;a<e.length;a++){for(var o=e[a],l=[],c=0;c<o.length;c++){var h=o[c],u=""+a+c;l.push(u),i[u]={node:h,lastCount:0},n[u]={};for(var d=0;d<s.length;d++){var p=s[d];i[p]&&i[p].node.mode===h.mode?(n[p][u]=f(i[p].lastCount+h.length,h.mode)-f(i[p].lastCount,h.mode),i[p].lastCount+=h.length):(i[p]&&(i[p].lastCount=h.length),n[p][u]=f(h.length,h.mode)+4+r.getCharCountIndicator(h.mode,t))}}s=l}for(d=0;d<s.length;d++)n[s[d]].end=0;return{map:n,table:i}}(function(e){for(var t=[],i=0;i<e.length;i++){var n=e[i];switch(n.mode){case r.NUMERIC:t.push([n,{data:n.data,mode:r.ALPHANUMERIC,length:n.length},{data:n.data,mode:r.BYTE,length:n.length}]);break;case r.ALPHANUMERIC:t.push([n,{data:n.data,mode:r.BYTE,length:n.length}]);break;case r.KANJI:t.push([n,{data:n.data,mode:r.BYTE,length:u(n.data)}]);break;case r.BYTE:t.push([{data:n.data,mode:r.BYTE,length:u(n.data)}])}}return t}(p(e,c.isKanjiModeEnabled())),t),s=h.find_path(n.map,"start","end"),a=[],o=1;o<s.length-1;o++)a.push(n.table[s[o]].node);return i.fromArray(a.reduce((function(e,t){var i=e.length-1>=0?e[e.length-1]:null;return i&&i.mode===t.mode?(e[e.length-1].data+=t.data,e):(e.push(t),e)}),[]))},i.rawSplit=function(e){return i.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,i){var r,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];i.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},i.getSymbolTotalCodewords=function(e){return n[e]},i.getBCHDigit=function(e){for(var t=0;0!==e;)t++,e>>>=1;return t},i.setToSJISFunction=function(e){if("function"!=typeof e)throw new Error('"toSJISFunc" is not a valid function.');r=e},i.isKanjiModeEnabled=function(){return void 0!==r},i.toSJIS=function(e){return r(e)}},{}],22:[function(e,t,i){i.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40}},{}],23:[function(e,t,i){var r=e("./utils"),n=e("./error-correction-code"),s=e("./error-correction-level"),a=e("./mode"),o=e("./version-check"),l=e("isarray"),c=r.getBCHDigit(7973);function h(e,t){return a.getCharCountIndicator(e,t)+4}function u(e,t){var i=0;return e.forEach((function(e){var r=h(e.mode,t);i+=r+e.getBitsLength()})),i}i.from=function(e,t){return o.isValid(e)?parseInt(e,10):t},i.getCapacity=function(e,t,i){if(!o.isValid(e))throw new Error("Invalid QR Code version");void 0===i&&(i=a.BYTE);var s=8*(r.getSymbolTotalCodewords(e)-n.getTotalCodewordsCount(e,t));if(i===a.MIXED)return s;var l=s-h(i,e);switch(i){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)}},i.getBestVersionForData=function(e,t){var r,n=s.from(t,s.M);if(l(e)){if(e.length>1)return function(e,t){for(var r=1;r<=40;r++)if(u(e,r)<=i.getCapacity(r,t,a.MIXED))return r}(e,n);if(0===e.length)return 1;r=e[0]}else r=e;return function(e,t,r){for(var n=1;n<=40;n++)if(t<=i.getCapacity(n,r,e))return n}(r.mode,r.getLength(),n)},i.getEncodedBits=function(e){if(!o.isValid(e)||e<7)throw new Error("Invalid QR Code version");for(var t=e<<12;r.getBCHDigit(t)-c>=0;)t^=7973<<r.getBCHDigit(t)-c;return e<<12|t}},{"./error-correction-code":7,"./error-correction-level":8,"./mode":14,"./utils":21,"./version-check":22,isarray:33}],24:[function(e,t,i){var r=e("./can-promise"),n=e("./core/qrcode"),s=e("./renderer/canvas"),a=e("./renderer/svg-tag.js");function o(e,t,i,s,a){var o=[].slice.call(arguments,1),l=o.length,c="function"==typeof o[l-1];if(!c&&!r())throw new Error("Callback required as last argument");if(!c){if(l<1)throw new Error("Too few arguments provided");return 1===l?(i=t,t=s=void 0):2!==l||t.getContext||(s=i,i=t,t=void 0),new Promise((function(r,a){try{var o=n.create(i,s);r(e(o,t,s))}catch(e){a(e)}}))}if(l<2)throw new Error("Too few arguments provided");2===l?(a=i,i=t,t=s=void 0):3===l&&(t.getContext&&void 0===a?(a=s,s=void 0):(a=s,s=i,i=t,t=void 0));try{var h=n.create(i,s);a(null,e(h,t,s))}catch(e){a(e)}}i.create=n.create,i.toCanvas=o.bind(null,s.render),i.toDataURL=o.bind(null,s.renderToDataURL),i.toString=o.bind(null,(function(e,t,i){return a.render(e,i)}))},{"./can-promise":1,"./core/qrcode":17,"./renderer/canvas":25,"./renderer/svg-tag.js":26}],25:[function(e,t,i){var r=e("./utils");i.render=function(e,t,i){var n=i,s=t;void 0!==n||t&&t.getContext||(n=t,t=void 0),t||(s=function(){try{return document.createElement("canvas")}catch(e){throw new Error("You need to specify a canvas element")}}()),n=r.getOptions(n);var a=r.getImageWidth(e.modules.size,n),o=s.getContext("2d"),l=o.createImageData(a,a);return r.qrToImageData(l.data,e,n),function(e,t,i){e.clearRect(0,0,t.width,t.height),t.style||(t.style={}),t.height=i,t.width=i,t.style.height=i+"px",t.style.width=i+"px"}(o,s,a),o.putImageData(l,0,0),s},i.renderToDataURL=function(e,t,r){var n=r;void 0!==n||t&&t.getContext||(n=t,t=void 0),n||(n={});var s=i.render(e,t,n),a=n.type||"image/png",o=n.rendererOpts||{};return s.toDataURL(a,o.quality)}},{"./utils":27}],26:[function(e,t,i){var r=e("./utils");function n(e,t){var i=e.a/255,r=t+'="'+e.hex+'"';return i<1?r+" "+t+'-opacity="'+i.toFixed(2).slice(1)+'"':r}function s(e,t,i){var r=e+t;return void 0!==i&&(r+=" "+i),r}i.render=function(e,t,i){var a=r.getOptions(t),o=e.modules.size,l=e.modules.data,c=o+2*a.margin,h=a.color.light.a?"<path "+n(a.color.light,"fill")+' d="M0 0h'+c+"v"+c+'H0z"/>':"",u="<path "+n(a.color.dark,"stroke")+' d="'+function(e,t,i){for(var r="",n=0,a=!1,o=0,l=0;l<e.length;l++){var c=Math.floor(l%t),h=Math.floor(l/t);c||a||(a=!0),e[l]?(o++,l>0&&c>0&&e[l-1]||(r+=a?s("M",c+i,.5+h+i):s("m",n,0),n=0,a=!1),c+1<t&&e[l+1]||(r+=s("h",o),o=0)):n++}return r}(l,o,a.margin)+'"/>',d='viewBox="0 0 '+c+" "+c+'"',p='<svg xmlns="http://www.w3.org/2000/svg" '+(a.width?'width="'+a.width+'" height="'+a.width+'" ':"")+d+' shape-rendering="crispEdges">'+h+u+"</svg>\n";return"function"==typeof i&&i(null,p),p}},{"./utils":27}],27:[function(e,t,i){function r(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 i=parseInt(t.join(""),16);return{r:i>>24&255,g:i>>16&255,b:i>>8&255,a:255&i,hex:"#"+t.slice(0,6).join("")}}i.getOptions=function(e){e||(e={}),e.color||(e.color={});var t=void 0===e.margin||null===e.margin||e.margin<0?4:e.margin,i=e.width&&e.width>=21?e.width:void 0,n=e.scale||4;return{width:i,scale:i?4:n,margin:t,color:{dark:r(e.color.dark||"#000000ff"),light:r(e.color.light||"#ffffffff")},type:e.type,rendererOpts:e.rendererOpts||{}}},i.getScale=function(e,t){return t.width&&t.width>=e+2*t.margin?t.width/(e+2*t.margin):t.scale},i.getImageWidth=function(e,t){var r=i.getScale(e,t);return Math.floor((e+2*t.margin)*r)},i.qrToImageData=function(e,t,r){for(var n=t.modules.size,s=t.modules.data,a=i.getScale(n,r),o=Math.floor((n+2*r.margin)*a),l=r.margin*a,c=[r.color.light,r.color.dark],h=0;h<o;h++)for(var u=0;u<o;u++){var d=4*(h*o+u),p=r.color.light;h>=l&&u>=l&&h<o-l&&u<o-l&&(p=c[s[Math.floor((h-l)/a)*n+Math.floor((u-l)/a)]?1:0]),e[d++]=p.r,e[d++]=p.g,e[d++]=p.b,e[d]=p.a}}},{}],28:[function(e,t,i){var r=e("isarray");s.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()}catch(e){return!1}}();var n=s.TYPED_ARRAY_SUPPORT?2147483647:1073741823;function s(e,t,i){return s.TYPED_ARRAY_SUPPORT||this instanceof s?"number"==typeof e?l(this,e):function(e,t,i,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,i,r){if(i<0||t.byteLength<i)throw new RangeError("'offset' is out of bounds");if(t.byteLength<i+(r||0))throw new RangeError("'length' is out of bounds");var n;return n=void 0===i&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,i):new Uint8Array(t,i,r),s.TYPED_ARRAY_SUPPORT?n.__proto__=s.prototype:n=c(e,n),n}(e,t,i,r):"string"==typeof t?function(e,t){var i=0|u(t),r=o(e,i),n=r.write(t);return n!==i&&(r=r.slice(0,n)),r}(e,t):function(e,t){if(s.isBuffer(t)){var i=0|a(t.length),r=o(e,i);return 0===r.length||t.copy(r,0,0,i),r}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(n=t.length)!=n?o(e,0):c(e,t);if("Buffer"===t.type&&Array.isArray(t.data))return c(e,t.data)}var n;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}(this,e,t,i):new s(e,t,i)}function a(e){if(e>=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 i;return s.TYPED_ARRAY_SUPPORT?(i=new Uint8Array(t)).__proto__=s.prototype:(null===(i=e)&&(i=new s(t)),i.length=t),i}function l(e,t){var i=o(e,t<0?0:0|a(t));if(!s.TYPED_ARRAY_SUPPORT)for(var r=0;r<t;++r)i[r]=0;return i}function c(e,t){for(var i=t.length<0?0:0|a(t.length),r=o(e,i),n=0;n<i;n+=1)r[n]=255&t[n];return r}function h(e,t){var i;t=t||1/0;for(var r=e.length,n=null,s=[],a=0;a<r;++a){if((i=e.charCodeAt(a))>55295&&i<57344){if(!n){if(i>56319){(t-=3)>-1&&s.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&s.push(239,191,189);continue}n=i;continue}if(i<56320){(t-=3)>-1&&s.push(239,191,189),n=i;continue}i=65536+(n-55296<<10|i-56320)}else n&&(t-=3)>-1&&s.push(239,191,189);if(n=null,i<128){if((t-=1)<0)break;s.push(i)}else if(i<2048){if((t-=2)<0)break;s.push(i>>6|192,63&i|128)}else if(i<65536){if((t-=3)<0)break;s.push(i>>12|224,i>>6&63|128,63&i|128)}else{if(!(i<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;s.push(i>>18|240,i>>12&63|128,i>>6&63|128,63&i|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,i){void 0===t||void 0===i&&"string"==typeof t?(i=this.length,t=0):isFinite(t)&&(t|=0,isFinite(i)?i|=0:i=void 0);var r=this.length-t;if((void 0===i||i>r)&&(i=r),e.length>0&&(i<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");return function(e,t,i,r){return function(e,t,i,r){for(var n=0;n<r&&!(n+i>=t.length||n>=e.length);++n)t[n+i]=e[n];return n}(h(t,e.length-i),e,i,r)}(this,e,t,i)},s.prototype.slice=function(e,t){var i,r=this.length;if((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<e&&(t=e),s.TYPED_ARRAY_SUPPORT)(i=this.subarray(e,t)).__proto__=s.prototype;else{var n=t-e;i=new s(n,void 0);for(var a=0;a<n;++a)i[a]=this[a+e]}return i},s.prototype.copy=function(e,t,i,r){if(i||(i=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<i&&(r=i),r===i)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(i<0||i>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-i&&(r=e.length-t+i);var n,a=r-i;if(this===e&&i<t&&t<r)for(n=a-1;n>=0;--n)e[n+t]=this[n+i];else if(a<1e3||!s.TYPED_ARRAY_SUPPORT)for(n=0;n<a;++n)e[n+t]=this[n+i];else Uint8Array.prototype.set.call(e,this.subarray(i,i+a),t);return a},s.prototype.fill=function(e,t,i){if("string"==typeof e){if("string"==typeof t?(t=0,i=this.length):"string"==typeof i&&(i=this.length),1===e.length){var r=e.charCodeAt(0);r<256&&(e=r)}}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<i)throw new RangeError("Out of range index");if(i<=t)return this;var n;if(t>>>=0,i=void 0===i?this.length:i>>>0,e||(e=0),"number"==typeof e)for(n=t;n<i;++n)this[n]=e;else{var a=s.isBuffer(e)?e:new s(e),o=a.length;for(n=0;n<i-t;++n)this[n+t]=a[n%o]}return this},s.concat=function(e,t){if(!r(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return o(null,0);var i;if(void 0===t)for(t=0,i=0;i<e.length;++i)t+=e[i].length;var n=l(null,t),a=0;for(i=0;i<e.length;++i){var c=e[i];if(!s.isBuffer(c))throw new TypeError('"list" argument must be an Array of Buffers');c.copy(n,a),a+=c.length}return n},s.byteLength=u,s.prototype._isBuffer=!0,s.isBuffer=function(e){return!(null==e||!e._isBuffer)},t.exports.alloc=function(e){var t=new s(e);return t.fill(0),t},t.exports.from=function(e){return new s(e)}},{isarray:33}],29:[function(e,t,i){i.byteLength=function(e){var t=l(e),i=t[0],r=t[1];return 3*(i+r)/4-r},i.toByteArray=function(e){var t,i,r=l(e),a=r[0],o=r[1],c=new s(function(e,t,i){return 3*(t+i)/4-i}(0,a,o)),h=0,u=o>0?a-4:a;for(i=0;i<u;i+=4)t=n[e.charCodeAt(i)]<<18|n[e.charCodeAt(i+1)]<<12|n[e.charCodeAt(i+2)]<<6|n[e.charCodeAt(i+3)],c[h++]=t>>16&255,c[h++]=t>>8&255,c[h++]=255&t;return 2===o&&(t=n[e.charCodeAt(i)]<<2|n[e.charCodeAt(i+1)]>>4,c[h++]=255&t),1===o&&(t=n[e.charCodeAt(i)]<<10|n[e.charCodeAt(i+1)]<<4|n[e.charCodeAt(i+2)]>>2,c[h++]=t>>8&255,c[h++]=255&t),c},i.fromByteArray=function(e){for(var t,i=e.length,n=i%3,s=[],a=16383,o=0,l=i-n;o<l;o+=a)s.push(c(e,o,o+a>l?l:o+a));return 1===n?(t=e[i-1],s.push(r[t>>2]+r[t<<4&63]+"==")):2===n&&(t=(e[i-2]<<8)+e[i-1],s.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"=")),s.join("")};for(var r=[],n=[],s="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0;o<64;++o)r[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 i=e.indexOf("=");return-1===i&&(i=t),[i,i===t?0:4-i%4]}function c(e,t,i){for(var n,s=[],a=t;a<i;a+=3)n=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(255&e[a+2]),s.push(r[(o=n)>>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);var o;return s.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},{}],30:[function(e,t,i){var r=e("base64-js"),n=e("ieee754"),s="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;i.Buffer=l,i.SlowBuffer=function(e){return+e!=e&&(e=0),l.alloc(+e)},i.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,i){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,i)}function c(e,t,i){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 i=0|f(e,t),r=o(i),n=r.write(e,t);return n!==i&&(r=r.slice(0,n)),r}(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(F(e,ArrayBuffer)||e&&F(e.buffer,ArrayBuffer))return function(e,t,i){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(i||0))throw new RangeError('"length" is outside of buffer bounds');var r;return r=void 0===t&&void 0===i?new Uint8Array(e):void 0===i?new Uint8Array(e,t):new Uint8Array(e,t,i),Object.setPrototypeOf(r,l.prototype),r}(e,t,i);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');var r=e.valueOf&&e.valueOf();if(null!=r&&r!==e)return l.from(r,t,i);var n=function(e){if(l.isBuffer(e)){var t=0|p(e.length),i=o(t);return 0===i.length||e.copy(i,0,0,t),i}return void 0!==e.length?"number"!=typeof e.length||$(e.length)?o(0):d(e):"Buffer"===e.type&&Array.isArray(e.data)?d(e.data):void 0}(e);if(n)return n;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return l.from(e[Symbol.toPrimitive]("string"),t,i);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function h(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function u(e){return h(e),o(e<0?0:0|p(e))}function d(e){for(var t=e.length<0?0:0|p(e.length),i=o(t),r=0;r<t;r+=1)i[r]=255&e[r];return i}function p(e){if(e>=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)||F(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 i=e.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===i)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return i;case"utf8":case"utf-8":return H(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*i;case"hex":return i>>>1;case"base64":return U(e).length;default:if(n)return r?-1:H(e).length;t=(""+t).toLowerCase(),n=!0}}function A(e,t,i){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===i||i>this.length)&&(i=this.length),i<=0)return"";if((i>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return I(this,t,i);case"utf8":case"utf-8":return x(this,t,i);case"ascii":return P(this,t,i);case"latin1":case"binary":return R(this,t,i);case"base64":return S(this,t,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,t,i);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function g(e,t,i){var r=e[t];e[t]=e[i],e[i]=r}function m(e,t,i,r,n){if(0===e.length)return-1;if("string"==typeof i?(r=i,i=0):i>2147483647?i=2147483647:i<-2147483648&&(i=-2147483648),$(i=+i)&&(i=n?0:e.length-1),i<0&&(i=e.length+i),i>=e.length){if(n)return-1;i=e.length-1}else if(i<0){if(!n)return-1;i=0}if("string"==typeof t&&(t=l.from(t,r)),l.isBuffer(t))return 0===t.length?-1:E(e,t,i,r,n);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?n?Uint8Array.prototype.indexOf.call(e,t,i):Uint8Array.prototype.lastIndexOf.call(e,t,i):E(e,[t],i,r,n);throw new TypeError("val must be string, number or Buffer")}function E(e,t,i,r,n){var s,a=1,o=e.length,l=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,o/=2,l/=2,i/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(n){var h=-1;for(s=i;s<o;s++)if(c(e,s)===c(t,-1===h?0:s-h)){if(-1===h&&(h=s),s-h+1===l)return h*a}else-1!==h&&(s-=s-h),h=-1}else for(i+l>o&&(i=o-l),s=i;s>=0;s--){for(var u=!0,d=0;d<l;d++)if(c(e,s+d)!==c(t,d)){u=!1;break}if(u)return s}return-1}function y(e,t,i,r){i=Number(i)||0;var n=e.length-i;r?(r=Number(r))>n&&(r=n):r=n;var s=t.length;r>s/2&&(r=s/2);for(var a=0;a<r;++a){var o=parseInt(t.substr(2*a,2),16);if($(o))return a;e[i+a]=o}return a}function v(e,t,i,r){return Y(H(t,e.length-i),e,i,r)}function _(e,t,i,r){return Y(function(e){for(var t=[],i=0;i<e.length;++i)t.push(255&e.charCodeAt(i));return t}(t),e,i,r)}function C(e,t,i,r){return _(e,t,i,r)}function w(e,t,i,r){return Y(U(t),e,i,r)}function b(e,t,i,r){return Y(function(e,t){for(var i,r,n,s=[],a=0;a<e.length&&!((t-=2)<0);++a)r=(i=e.charCodeAt(a))>>8,n=i%256,s.push(n),s.push(r);return s}(t,e.length-i),e,i,r)}function S(e,t,i){return 0===t&&i===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,i))}function x(e,t,i){i=Math.min(e.length,i);for(var r=[],n=t;n<i;){var s,a,o,l,c=e[n],h=null,u=c>239?4:c>223?3:c>191?2:1;if(n+u<=i)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,r.push(h>>>10&1023|55296),h=56320|1023&h),r.push(h),n+=u}return function(e){var t=e.length;if(t<=T)return String.fromCharCode.apply(String,e);for(var i="",r=0;r<t;)i+=String.fromCharCode.apply(String,e.slice(r,r+=T));return i}(r)}i.kMaxLength=a,l.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),l.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(l.prototype,"parent",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.buffer}}),Object.defineProperty(l.prototype,"offset",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.byteOffset}}),"undefined"!=typeof Symbol&&null!=Symbol.species&&l[Symbol.species]===l&&Object.defineProperty(l,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),l.poolSize=8192,l.from=function(e,t,i){return c(e,t,i)},Object.setPrototypeOf(l.prototype,Uint8Array.prototype),Object.setPrototypeOf(l,Uint8Array),l.alloc=function(e,t,i){return function(e,t,i){return h(e),e<=0?o(e):void 0!==t?"string"==typeof i?o(e).fill(t,i):o(e).fill(t):o(e)}(e,t,i)},l.allocUnsafe=function(e){return u(e)},l.allocUnsafeSlow=function(e){return u(e)},l.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==l.prototype},l.compare=function(e,t){if(F(e,Uint8Array)&&(e=l.from(e,e.offset,e.byteLength)),F(t,Uint8Array)&&(t=l.from(t,t.offset,t.byteLength)),!l.isBuffer(e)||!l.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var i=e.length,r=t.length,n=0,s=Math.min(i,r);n<s;++n)if(e[n]!==t[n]){i=e[n],r=t[n];break}return i<r?-1:r<i?1:0},l.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},l.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return l.alloc(0);var i;if(void 0===t)for(t=0,i=0;i<e.length;++i)t+=e[i].length;var r=l.allocUnsafe(t),n=0;for(i=0;i<e.length;++i){var s=e[i];if(F(s,Uint8Array)&&(s=l.from(s)),!l.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(r,n),n+=s.length}return r},l.byteLength=f,l.prototype._isBuffer=!0,l.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)g(this,t,t+1);return this},l.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)g(this,t,t+3),g(this,t+1,t+2);return this},l.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)g(this,t,t+7),g(this,t+1,t+6),g(this,t+2,t+5),g(this,t+3,t+4);return this},l.prototype.toString=function(){var e=this.length;return 0===e?"":0===arguments.length?x(this,0,e):A.apply(this,arguments)},l.prototype.toLocaleString=l.prototype.toString,l.prototype.equals=function(e){if(!l.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===l.compare(this,e)},l.prototype.inspect=function(){var e="",t=i.INSPECT_MAX_BYTES;return e=this.toString("hex",0,t).replace(/(.{2})/g,"$1 ").trim(),this.length>t&&(e+=" ... "),"<Buffer "+e+">"},s&&(l.prototype[s]=l.prototype.inspect),l.prototype.compare=function(e,t,i,r,n){if(F(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===i&&(i=e?e.length:0),void 0===r&&(r=0),void 0===n&&(n=this.length),t<0||i>e.length||r<0||n>this.length)throw new RangeError("out of range index");if(r>=n&&t>=i)return 0;if(r>=n)return-1;if(t>=i)return 1;if(this===e)return 0;for(var s=(n>>>=0)-(r>>>=0),a=(i>>>=0)-(t>>>=0),o=Math.min(s,a),c=this.slice(r,n),h=e.slice(t,i),u=0;u<o;++u)if(c[u]!==h[u]){s=c[u],a=h[u];break}return s<a?-1:a<s?1:0},l.prototype.includes=function(e,t,i){return-1!==this.indexOf(e,t,i)},l.prototype.indexOf=function(e,t,i){return m(this,e,t,i,!0)},l.prototype.lastIndexOf=function(e,t,i){return m(this,e,t,i,!1)},l.prototype.write=function(e,t,i,r){if(void 0===t)r="utf8",i=this.length,t=0;else if(void 0===i&&"string"==typeof t)r=t,i=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(i)?(i>>>=0,void 0===r&&(r="utf8")):(r=i,i=void 0)}var n=this.length-t;if((void 0===i||i>n)&&(i=n),e.length>0&&(i<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var s=!1;;)switch(r){case"hex":return y(this,e,t,i);case"utf8":case"utf-8":return v(this,e,t,i);case"ascii":return _(this,e,t,i);case"latin1":case"binary":return C(this,e,t,i);case"base64":return w(this,e,t,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return b(this,e,t,i);default:if(s)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),s=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var T=4096;function P(e,t,i){var r="";i=Math.min(e.length,i);for(var n=t;n<i;++n)r+=String.fromCharCode(127&e[n]);return r}function R(e,t,i){var r="";i=Math.min(e.length,i);for(var n=t;n<i;++n)r+=String.fromCharCode(e[n]);return r}function I(e,t,i){var r=e.length;(!t||t<0)&&(t=0),(!i||i<0||i>r)&&(i=r);for(var n="",s=t;s<i;++s)n+=V[e[s]];return n}function k(e,t,i){for(var r=e.slice(t,i),n="",s=0;s<r.length;s+=2)n+=String.fromCharCode(r[s]+256*r[s+1]);return n}function N(e,t,i){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>i)throw new RangeError("Trying to access beyond buffer length")}function D(e,t,i,r,n,s){if(!l.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>n||t<s)throw new RangeError('"value" argument is out of bounds');if(i+r>e.length)throw new RangeError("Index out of range")}function B(e,t,i,r,n,s){if(i+r>e.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("Index out of range")}function L(e,t,i,r,s){return t=+t,i>>>=0,s||B(e,0,i,4),n.write(e,t,i,r,23,4),i+4}function O(e,t,i,r,s){return t=+t,i>>>=0,s||B(e,0,i,8),n.write(e,t,i,r,52,8),i+8}l.prototype.slice=function(e,t){var i=this.length;(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&&(t=e);var r=this.subarray(e,t);return Object.setPrototypeOf(r,l.prototype),r},l.prototype.readUIntLE=function(e,t,i){e>>>=0,t>>>=0,i||N(e,t,this.length);for(var r=this[e],n=1,s=0;++s<t&&(n*=256);)r+=this[e+s]*n;return r},l.prototype.readUIntBE=function(e,t,i){e>>>=0,t>>>=0,i||N(e,t,this.length);for(var r=this[e+--t],n=1;t>0&&(n*=256);)r+=this[e+--t]*n;return r},l.prototype.readUInt8=function(e,t){return e>>>=0,t||N(e,1,this.length),this[e]},l.prototype.readUInt16LE=function(e,t){return e>>>=0,t||N(e,2,this.length),this[e]|this[e+1]<<8},l.prototype.readUInt16BE=function(e,t){return e>>>=0,t||N(e,2,this.length),this[e]<<8|this[e+1]},l.prototype.readUInt32LE=function(e,t){return e>>>=0,t||N(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||N(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},l.prototype.readIntLE=function(e,t,i){e>>>=0,t>>>=0,i||N(e,t,this.length);for(var r=this[e],n=1,s=0;++s<t&&(n*=256);)r+=this[e+s]*n;return r>=(n*=128)&&(r-=Math.pow(2,8*t)),r},l.prototype.readIntBE=function(e,t,i){e>>>=0,t>>>=0,i||N(e,t,this.length);for(var r=t,n=1,s=this[e+--r];r>0&&(n*=256);)s+=this[e+--r]*n;return s>=(n*=128)&&(s-=Math.pow(2,8*t)),s},l.prototype.readInt8=function(e,t){return e>>>=0,t||N(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},l.prototype.readInt16LE=function(e,t){e>>>=0,t||N(e,2,this.length);var i=this[e]|this[e+1]<<8;return 32768&i?4294901760|i:i},l.prototype.readInt16BE=function(e,t){e>>>=0,t||N(e,2,this.length);var i=this[e+1]|this[e]<<8;return 32768&i?4294901760|i:i},l.prototype.readInt32LE=function(e,t){return e>>>=0,t||N(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||N(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||N(e,4,this.length),n.read(this,e,!0,23,4)},l.prototype.readFloatBE=function(e,t){return e>>>=0,t||N(e,4,this.length),n.read(this,e,!1,23,4)},l.prototype.readDoubleLE=function(e,t){return e>>>=0,t||N(e,8,this.length),n.read(this,e,!0,52,8)},l.prototype.readDoubleBE=function(e,t){return e>>>=0,t||N(e,8,this.length),n.read(this,e,!1,52,8)},l.prototype.writeUIntLE=function(e,t,i,r){e=+e,t>>>=0,i>>>=0,r||D(this,e,t,i,Math.pow(2,8*i)-1,0);var n=1,s=0;for(this[t]=255&e;++s<i&&(n*=256);)this[t+s]=e/n&255;return t+i},l.prototype.writeUIntBE=function(e,t,i,r){e=+e,t>>>=0,i>>>=0,r||D(this,e,t,i,Math.pow(2,8*i)-1,0);var n=i-1,s=1;for(this[t+n]=255&e;--n>=0&&(s*=256);)this[t+n]=e/s&255;return t+i},l.prototype.writeUInt8=function(e,t,i){return e=+e,t>>>=0,i||D(this,e,t,1,255,0),this[t]=255&e,t+1},l.prototype.writeUInt16LE=function(e,t,i){return e=+e,t>>>=0,i||D(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},l.prototype.writeUInt16BE=function(e,t,i){return e=+e,t>>>=0,i||D(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},l.prototype.writeUInt32LE=function(e,t,i){return e=+e,t>>>=0,i||D(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,i){return e=+e,t>>>=0,i||D(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,i,r){if(e=+e,t>>>=0,!r){var n=Math.pow(2,8*i-1);D(this,e,t,i,n-1,-n)}var s=0,a=1,o=0;for(this[t]=255&e;++s<i&&(a*=256);)e<0&&0===o&&0!==this[t+s-1]&&(o=1),this[t+s]=(e/a|0)-o&255;return t+i},l.prototype.writeIntBE=function(e,t,i,r){if(e=+e,t>>>=0,!r){var n=Math.pow(2,8*i-1);D(this,e,t,i,n-1,-n)}var s=i-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+i},l.prototype.writeInt8=function(e,t,i){return e=+e,t>>>=0,i||D(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},l.prototype.writeInt16LE=function(e,t,i){return e=+e,t>>>=0,i||D(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},l.prototype.writeInt16BE=function(e,t,i){return e=+e,t>>>=0,i||D(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},l.prototype.writeInt32LE=function(e,t,i){return e=+e,t>>>=0,i||D(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,i){return e=+e,t>>>=0,i||D(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,i){return L(this,e,t,!0,i)},l.prototype.writeFloatBE=function(e,t,i){return L(this,e,t,!1,i)},l.prototype.writeDoubleLE=function(e,t,i){return O(this,e,t,!0,i)},l.prototype.writeDoubleBE=function(e,t,i){return O(this,e,t,!1,i)},l.prototype.copy=function(e,t,i,r){if(!l.isBuffer(e))throw new TypeError("argument should be a Buffer");if(i||(i=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<i&&(r=i),r===i)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(i<0||i>=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-i&&(r=e.length-t+i);var n=r-i;if(this===e&&"function"==typeof Uint8Array.prototype.copyWithin)this.copyWithin(t,i,r);else if(this===e&&i<t&&t<r)for(var s=n-1;s>=0;--s)e[s+t]=this[s+i];else Uint8Array.prototype.set.call(e,this.subarray(i,r),t);return n},l.prototype.fill=function(e,t,i,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,i=this.length):"string"==typeof i&&(r=i,i=this.length),void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!l.isEncoding(r))throw new TypeError("Unknown encoding: "+r);if(1===e.length){var n=e.charCodeAt(0);("utf8"===r&&n<128||"latin1"===r)&&(e=n)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<i)throw new RangeError("Out of range index");if(i<=t)return this;var s;if(t>>>=0,i=void 0===i?this.length:i>>>0,e||(e=0),"number"==typeof e)for(s=t;s<i;++s)this[s]=e;else{var a=l.isBuffer(e)?e:l.from(e,r),o=a.length;if(0===o)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(s=0;s<i-t;++s)this[s+t]=a[s%o]}return this};var M=/[^+/0-9A-Za-z-_]/g;function H(e,t){var i;t=t||1/0;for(var r=e.length,n=null,s=[],a=0;a<r;++a){if((i=e.charCodeAt(a))>55295&&i<57344){if(!n){if(i>56319){(t-=3)>-1&&s.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&s.push(239,191,189);continue}n=i;continue}if(i<56320){(t-=3)>-1&&s.push(239,191,189),n=i;continue}i=65536+(n-55296<<10|i-56320)}else n&&(t-=3)>-1&&s.push(239,191,189);if(n=null,i<128){if((t-=1)<0)break;s.push(i)}else if(i<2048){if((t-=2)<0)break;s.push(i>>6|192,63&i|128)}else if(i<65536){if((t-=3)<0)break;s.push(i>>12|224,i>>6&63|128,63&i|128)}else{if(!(i<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;s.push(i>>18|240,i>>12&63|128,i>>6&63|128,63&i|128)}}return s}function U(e){return r.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 Y(e,t,i,r){for(var n=0;n<r&&!(n+i>=t.length||n>=e.length);++n)t[n+i]=e[n];return n}function F(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function $(e){return e!=e}var V=function(){for(var e="0123456789abcdef",t=new Array(256),i=0;i<16;++i)for(var r=16*i,n=0;n<16;++n)t[r+n]=e[i]+e[n];return t}()},{"base64-js":29,ieee754:32}],31:[function(e,t,i){var r={single_source_shortest_paths:function(e,t,i){var n={},s={};s[t]=0;var a,o,l,c,h,u,d,p=r.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!==i&&void 0===s[i]){var f=["Could not find a path from ",t," to ",i,"."].join("");throw new Error(f)}return n},extract_shortest_path_from_predecessor_list:function(e,t){for(var i=[],r=t;r;)i.push(r),e[r],r=e[r];return i.reverse(),i},find_path:function(e,t,i){var n=r.single_source_shortest_paths(e,t,i);return r.extract_shortest_path_from_predecessor_list(n,i)},PriorityQueue:{make:function(e){var t,i=r.PriorityQueue,n={};for(t in e=e||{},i)i.hasOwnProperty(t)&&(n[t]=i[t]);return n.queue=[],n.sorter=e.sorter||i.default_sorter,n},default_sorter:function(e,t){return e.cost-t.cost},push:function(e,t){var i={value:e,cost:t};this.queue.push(i),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}};void 0!==t&&(t.exports=r)},{}],32:[function(e,t,i){i.read=function(e,t,i,r,n){var s,a,o=8*n-r-1,l=(1<<o)-1,c=l>>1,h=-7,u=i?n-1:0,d=i?-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+=r;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,r),s-=c}return(p?-1:1)*a*Math.pow(2,s-r)},i.write=function(e,t,i,r,n,s){var a,o,l,c=8*s-n-1,h=(1<<c)-1,u=h>>1,d=23===n?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:s-1,f=r?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[i+p]=255&o,p+=f,o/=256,n-=8);for(a=a<<n|o,c+=n;c>0;e[i+p]=255&a,p+=f,a/=256,c-=8);e[i+p-f]|=128*A}},{}],33:[function(e,t,i){var r={}.toString;t.exports=Array.isArray||function(e){return"[object Array]"==r.call(e)}},{}]},{},[24])(24)},t.exports=r()}));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,i=this.options,r=this.tag,n=String(this.value);"canvas"===r?t.toCanvas(this.$el,n,i,(function(e){if(e)throw e})):"img"===r?t.toDataURL(n,i,(function(t,i){if(t)throw t;e.$el.src=i})):t.toString(n,i,(function(t,i){if(t)throw t;e.$el.innerHTML=i}))}},mounted:function(){this.generate()}}}()},97380:(e,t,i)=>{"use strict";i.d(t,{A:()=>o});var r=i(71354),n=i.n(r),s=i(76314),a=i.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},1709:(e,t,i)=>{"use strict";i.d(t,{A:()=>o});var r=i(71354),n=i.n(r),s=i(76314),a=i.n(s)()(n());a.push([e.id,".sharing-entry[data-v-fd4f3ea8]{display:flex;align-items:center;height:44px}.sharing-entry__summary[data-v-fd4f3ea8]{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-fd4f3ea8]{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-fd4f3ea8],.sharing-entry__summary__desc small[data-v-fd4f3ea8]{color:var(--color-text-maxcontrast)}.sharing-entry__summary__desc-unique[data-v-fd4f3ea8]{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,i)=>{"use strict";i.d(t,{A:()=>o});var r=i(71354),n=i.n(r),s=i(76314),a=i.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,i)=>{"use strict";i.d(t,{A:()=>o});var r=i(71354),n=i.n(r),s=i(76314),a=i.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},89553:(e,t,i)=>{"use strict";i.d(t,{A:()=>o});var r=i(71354),n=i.n(r),s=i(76314),a=i.n(s)()(n());a.push([e.id,".sharing-entry[data-v-0b6d6fb1]{display:flex;align-items:center;min-height:44px}.sharing-entry__summary[data-v-0b6d6fb1]{padding:8px;padding-inline-start:10px;display:flex;justify-content:space-between;flex:1 0;min-width:0}.sharing-entry__desc[data-v-0b6d6fb1]{display:flex;flex-direction:column;line-height:1.2em}.sharing-entry__desc p[data-v-0b6d6fb1]{color:var(--color-text-maxcontrast)}.sharing-entry__desc__title[data-v-0b6d6fb1]{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.sharing-entry:not(.sharing-entry--share) .sharing-entry__actions .new-share-link[data-v-0b6d6fb1]{border-top:1px solid var(--color-border)}.sharing-entry[data-v-0b6d6fb1] .avatar-link-share{background-color:var(--color-primary-element)}.sharing-entry .sharing-entry__action--public-upload[data-v-0b6d6fb1]{border-bottom:1px solid var(--color-border)}.sharing-entry__loading[data-v-0b6d6fb1]{width:44px;height:44px;margin:0;padding:14px;margin-inline-start:auto}.sharing-entry .action-item~.action-item[data-v-0b6d6fb1],.sharing-entry .action-item~.sharing-entry__loading[data-v-0b6d6fb1]{margin-inline-start:0}.sharing-entry .icon-checkmark-color[data-v-0b6d6fb1]{opacity:1;color:var(--color-success)}.qr-code-dialog[data-v-0b6d6fb1]{display:flex;width:100%;justify-content:center}.qr-code-dialog__img[data-v-0b6d6fb1]{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},88809:(e,t,i)=>{"use strict";i.d(t,{A:()=>o});var r=i(71354),n=i.n(r),s=i(76314),a=i.n(s)()(n());a.push([e.id,".share-select[data-v-60eea424]{display:block}.share-select[data-v-60eea424] .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-60eea424] .action-item__menutoggle .button-vue__text{font-weight:normal !important}.share-select[data-v-60eea424] .action-item__menutoggle .button-vue__icon{height:24px !important;min-height:24px !important;width:24px !important;min-width:24px !important}.share-select[data-v-60eea424] .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,i)=>{"use strict";i.d(t,{A:()=>o});var r=i(71354),n=i.n(r),s=i(76314),a=i.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},2134:(e,t,i)=>{"use strict";i.d(t,{A:()=>o});var r=i(71354),n=i.n(r),s=i(76314),a=i.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},31167:(e,t,i)=>{"use strict";i.d(t,{A:()=>o});var r=i(71354),n=i.n(r),s=i(76314),a=i.n(s)()(n());a.push([e.id,".sharingTabDetailsView[data-v-cbfe209a]{display:flex;flex-direction:column;width:100%;margin:0 auto;position:relative;height:100%;overflow:hidden}.sharingTabDetailsView__header[data-v-cbfe209a]{display:flex;align-items:center;box-sizing:border-box;margin:.2em}.sharingTabDetailsView__header span[data-v-cbfe209a]{display:flex;align-items:center}.sharingTabDetailsView__header span h1[data-v-cbfe209a]{font-size:15px;padding-inline-start:.3em}.sharingTabDetailsView__wrapper[data-v-cbfe209a]{position:relative;overflow:scroll;flex-shrink:1;padding:4px;padding-inline-end:12px}.sharingTabDetailsView__quick-permissions[data-v-cbfe209a]{display:flex;justify-content:center;width:100%;margin:0 auto;border-radius:0}.sharingTabDetailsView__quick-permissions div[data-v-cbfe209a]{width:100%}.sharingTabDetailsView__quick-permissions div span[data-v-cbfe209a]{width:100%}.sharingTabDetailsView__quick-permissions div span span[data-v-cbfe209a]:nth-child(1){align-items:center;justify-content:center;padding:.1em}.sharingTabDetailsView__quick-permissions div span[data-v-cbfe209a] label span{display:flex;flex-direction:column}.sharingTabDetailsView__quick-permissions div span[data-v-cbfe209a] span.checkbox-content__text.checkbox-radio-switch__text{flex-wrap:wrap}.sharingTabDetailsView__quick-permissions div span[data-v-cbfe209a] span.checkbox-content__text.checkbox-radio-switch__text .subline{display:block;flex-basis:100%}.sharingTabDetailsView__advanced-control[data-v-cbfe209a]{width:100%}.sharingTabDetailsView__advanced-control button[data-v-cbfe209a]{margin-top:.5em}.sharingTabDetailsView__advanced[data-v-cbfe209a]{width:100%;margin-bottom:.5em;text-align:start;padding-inline-start:0}.sharingTabDetailsView__advanced section textarea[data-v-cbfe209a],.sharingTabDetailsView__advanced section div.mx-datepicker[data-v-cbfe209a]{width:100%}.sharingTabDetailsView__advanced section textarea[data-v-cbfe209a]{height:80px;margin:0}.sharingTabDetailsView__advanced section span[data-v-cbfe209a] label{padding-inline-start:0 !important;background-color:initial !important;border:none !important}.sharingTabDetailsView__advanced section section.custom-permissions-group[data-v-cbfe209a]{padding-inline-start:1.5em}.sharingTabDetailsView__delete>button[data-v-cbfe209a]:first-child{color:#df0707}.sharingTabDetailsView__footer[data-v-cbfe209a]{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-cbfe209a]{display:flex;justify-content:space-between;width:100%;margin-top:16px}.sharingTabDetailsView__footer .button-group button[data-v-cbfe209a]{margin-inline-start:16px}.sharingTabDetailsView__footer .button-group button[data-v-cbfe209a]: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,CAKA,+EACC,YAAA,CACA,qBAAA,CAKF,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,CAaA,qEACC,iCAAA,CACA,mCAAA,CACA,sBAAA,CAIF,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,i)=>{"use strict";i.d(t,{A:()=>o});var r=i(71354),n=i.n(r),s=i(76314),a=i.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},71028:(e,t,i)=>{"use strict";i.d(t,{A:()=>o});var r=i(71354),n=i.n(r),s=i(76314),a=i.n(s)()(n());a.push([e.id,".emptyContentWithSections[data-v-7c6dc4a7]{margin:1rem auto}.sharingTab[data-v-7c6dc4a7]{position:relative;height:100%}.sharingTab__content[data-v-7c6dc4a7]{padding:0 6px}.sharingTab__additionalContent[data-v-7c6dc4a7]{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,i){!function(e){"use strict";var t,i=function(){try{if(e.URLSearchParams&&"bar"===new e.URLSearchParams("foo=bar").get("foo"))return e.URLSearchParams}catch(e){}return null}(),r=i&&"a=1"===new i({a:1}).toString(),n=i&&"+"===new i("s=%2B").get("s"),s=i&&"size"in i.prototype,a="__URLSearchParams__",o=!i||((t=new i).append("s"," &"),"s=+%26"===t.toString()),l=p.prototype,c=!(!e.Symbol||!e.Symbol.iterator);if(!(i&&r&&n&&o&&s)){l.append=function(e,t){E(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 v(this[a],e)},l.set=function(e,t){this[a][e]=[""+t]},l.toString=function(){var e,t,i,r,n=this[a],s=[];for(t in n)for(i=f(t),e=0,r=n[t];e<r.length;e++)s.push(i+"="+f(r[e]));return s.join("&")};var h,u=e.Proxy&&i&&(!n||!o||!r||!s);u?(h=new Proxy(i,{construct:function(e,t){return new e(new p(t[0]).toString())}})).toString=Function.prototype.toString.bind(p):h=p,Object.defineProperty(e,"URLSearchParams",{value:h});var d=e.URLSearchParams.prototype;d.polyfill=!0,!u&&e.Symbol&&(d[e.Symbol.toStringTag]="URLSearchParams"),"forEach"in d||(d.forEach=function(e,t){var i=m(this.toString());Object.getOwnPropertyNames(i).forEach((function(r){i[r].forEach((function(i){e.call(t,i,r,this)}),this)}),this)}),"sort"in d||(d.sort=function(){var e,t,i,r=m(this.toString()),n=[];for(e in r)n.push(e);for(n.sort(),t=0;t<n.length;t++)this.delete(n[t]);for(t=0;t<n.length;t++){var s=n[t],a=r[s];for(i=0;i<a.length;i++)this.append(s,a[i])}}),"keys"in d||(d.keys=function(){var e=[];return this.forEach((function(t,i){e.push(i)})),g(e)}),"values"in d||(d.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),g(e)}),"entries"in d||(d.entries=function(){var e=[];return this.forEach((function(t,i){e.push([i,t])})),g(e)}),c&&(d[e.Symbol.iterator]=d[e.Symbol.iterator]||d.entries),"size"in d||Object.defineProperty(d,"size",{get:function(){var e=m(this.toString());if(d===this)throw new TypeError("Illegal invocation at URLSearchParams.invokeGetter");return Object.keys(e).reduce((function(t,i){return t+e[i].length}),0)}})}function p(e){((e=e||"")instanceof URLSearchParams||e instanceof p)&&(e=e.toString()),this[a]=m(e)}function f(e){var t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'\(\)~]|%20|%00/g,(function(e){return t[e]}))}function A(e){return e.replace(/[ +]/g,"%20").replace(/(%[a-f0-9]{2})+/gi,(function(e){return decodeURIComponent(e)}))}function g(t){var i={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return c&&(i[e.Symbol.iterator]=function(){return i}),i}function m(e){var t={};if("object"==typeof e)if(y(e))for(var i=0;i<e.length;i++){var r=e[i];if(!y(r)||2!==r.length)throw new TypeError("Failed to construct 'URLSearchParams': Sequence initializer must only contain pair elements");E(t,r[0],r[1])}else for(var n in e)e.hasOwnProperty(n)&&E(t,n,e[n]);else{0===e.indexOf("?")&&(e=e.slice(1));for(var s=e.split("&"),a=0;a<s.length;a++){var o=s[a],l=o.indexOf("=");-1<l?E(t,A(o.slice(0,l)),A(o.slice(l+1))):o&&E(t,A(o),"")}}return t}function E(e,t,i){var r="string"==typeof i?i:null!=i&&"function"==typeof i.toString?i.toString():JSON.stringify(i);v(e,t)?e[t].push(r):e[t]=[r]}function y(e){return!!e&&"[object Array]"===Object.prototype.toString.call(e)}function v(e,t){return Object.prototype.hasOwnProperty.call(e,t)}}(void 0!==i.g?i.g:"undefined"!=typeof window?window:this)},33886:(e,i,r)=>{"use strict";r.r(i),r.d(i,{default:()=>wi});var n=r(21777),s=r(35810),a=r(32981),o=r(63814),l=r(85072),c=r.n(l),h=r(97825),u=r.n(h),d=r(77659),p=r.n(d),f=r(55056),A=r.n(f),g=r(10540),m=r.n(g),E=r(41113),y=r.n(E),v=r(97380),_={};_.styleTagTransform=y(),_.setAttributes=A(),_.insert=p().bind(null,"head"),_.domAPI=u(),_.insertStyleElement=m(),c()(v.A,_),v.A&&v.A.locals&&v.A.locals;var C=r(53334),w=r(41944),b=r(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 T="object"==typeof self&&self&&self.Object===Object&&self;const P=x||T||Function("return this")(),R=function(){return P.Date.now()};var I=/\s/;var k=/^\s+/;const N=function(e){return e?e.slice(0,function(e){for(var t=e.length;t--&&I.test(e.charAt(t)););return t}(e)+1).replace(k,""):e},D=P.Symbol;var B=Object.prototype,L=B.hasOwnProperty,O=B.toString,M=D?D.toStringTag:void 0;var H=Object.prototype.toString;var U=D?D.toStringTag:void 0;const Y=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":U&&U in Object(e)?function(e){var t=L.call(e,M),i=e[M];try{e[M]=void 0;var r=!0}catch(e){}var n=O.call(e);return r&&(t?e[M]=i:delete e[M]),n}(e):function(e){return H.call(e)}(e)};var F=/^[-+]0x[0-9a-f]+$/i,$=/^0b[01]+$/i,V=/^0o[0-7]+$/i,j=parseInt;const q=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]"==Y(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=N(e);var i=$.test(e);return i||V.test(e)?j(e.slice(2),i?2:8):F.test(e)?NaN:+e};var z=Math.max,W=Math.min;var G=r(24764),K=r(18503),X=r(85471),Q=r(65043);const Z=new class{constructor(){this.http=Q.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,i){return this.http.post((0,o.KT)("collaboration/resources/{resourceType}/{resourceId}",{resourceType:e,resourceId:t}),{name:i}).then((e=>e.data.ocs.data))}addResource(e,t,i){return i=""+i,this.http.post((0,o.KT)("collaboration/resources/collections/{collectionId}",{collectionId:e}),{resourceType:t,resourceId:i}).then((e=>e.data.ocs.data))}removeResource(e,t,i){return this.http.delete((0,o.KT)("collaboration/resources/collections/{collectionId}",{collectionId:e}),{params:{resourceType:t,resourceId:i}}).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,X.Kh)({collections:[]}),ee={addCollections(e){(0,X.hZ)(J,"collections",e)},addCollection(e){J.collections.push(e)},removeCollection(e){(0,X.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,X.hZ)(J.collections,t,e):J.collections.push(e)}},te={fetchCollectionsByResource:({resourceType:e,resourceId:t})=>Z.getCollectionsByResource(e,t).then((e=>(ee.addCollections(e),e))),createCollection:({baseResourceType:e,baseResourceId:t,resourceType:i,resourceId:r,name:n})=>Z.createCollection(e,t,n).then((e=>{ee.addCollection(e),te.addResourceToCollection({collectionId:e.id,resourceType:i,resourceId:r})})),renameCollection:({collectionId:e,name:t})=>Z.renameCollection(e,t).then((e=>(ee.updateCollection(e),e))),addResourceToCollection:({collectionId:e,resourceType:t,resourceId:i})=>Z.addResource(e,t,i).then((e=>(ee.updateCollection(e),e))),removeResource:({collectionId:e,resourceType:t,resourceId:i})=>Z.removeResource(e,t,i).then((e=>{e.resources.length>0?ee.updateCollection(e):ee.removeCollection(e)})),search:e=>Z.search(e)};function ie(e,t,i,r,n,s,a,o){var l,c="function"==typeof e?e.options:e;if(t&&(c.render=t,c.staticRenderFns=i,c._compiled=!0),r&&(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 re=ie({name:"CollectionListItem",components:{NcAvatar:w.A,NcActions:G.A,NcActionButton:K.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:C.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,C.t)("core","Failed to rename the project")),console.error(e),setTimeout((()=>{(0,X.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(i){return t("a",{key:i.type+"|"+i.id,class:e.typeClass(i),attrs:{title:i.name,href:i.link}},[t("img",{attrs:{src:e.iconUrl(i)}})])})),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(i){return t("li",{key:i.type+"|"+i.id,class:e.typeClass(i)},[t("a",{attrs:{href:i.link}},[t("img",{attrs:{src:e.iconUrl(i)}}),t("span",{staticClass:"resource-name"},[e._v(e._s(i.name||""))])]),t("span",{staticClass:"icon-close",on:{click:function(t){return e.removeResource(e.collection,i)}}})])})),0):e._e()])],1)}),[],!1,null,"42733c12",null,null).exports,ne=function(e,t,i){var r,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 i=r,s=n;return r=n=void 0,c=t,a=e.apply(s,i)}function f(e){var i=e-l;return void 0===l||i>=t||i<0||u&&e-c>=s}function A(){var e=R();if(f(e))return g(e);o=setTimeout(A,function(e){var i=t-(e-l);return u?W(i,s-(e-c)):i}(e))}function g(e){return o=void 0,d&&r?p(e):(r=n=void 0,a)}function m(){var e=R(),i=f(e);if(r=arguments,n=this,l=e,i){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=q(t)||0,S(i)&&(h=!!i.leading,s=(u="maxWait"in i)?z(q(i.maxWait)||0,t):s,d="trailing"in i?!!i.trailing:d),m.cancel=function(){void 0!==o&&clearTimeout(o),c=0,r=l=n=o=void 0},m.flush=function(){return void 0===o?a:g(R())},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:re,NcAvatar:w.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,C.t)("core","Type to search for existing projects"):(0,C.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:C.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,C.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,C.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=ie(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(i){return[t("span",{staticClass:"option__desc"},[t("span",{staticClass:"option__title"},[e._v(e._s(i.title))])])]}},{key:"option",fn:function(i){return[t("span",{staticClass:"option__wrapper"},[i.class?t("span",{staticClass:"avatar",class:i.class}):2!==i.method?t("NcAvatar",{attrs:{"allow-placeholder":"","display-name":i.title}}):e._e(),t("span",{staticClass:"option__title"},[e._v(e._s(i.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=r(19231),le=r(77905),ce=r(87485);class he{constructor(){(function(e,t,i){(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var i=t.call(e,"string");if("object"!=typeof i)return i;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:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i})(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=r(35947);const de=(0,ue.YK)().setApp("files_sharing").detectUser().build();class pe{constructor(e){if(function(e,t,i){(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var i=t.call(e,"string");if("object"!=typeof i)return i;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:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i}(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,i){const r={scope:e,key:t,value:i};for(const e in this._share.attributes){const t=this._share.attributes[e];if(t.scope===r.scope&&t.key===r.key)return void this._share.attributes.splice(e,1,r)}this._share.attributes.push(r)}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}}const fe={data:()=>({SHARE_TYPES:le.Z})};var Ae=r(85168),ge=r(85338),me=r(35111);const Ee={name:"SharingEntrySimple",components:{NcActions:G.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=r(86495),ve={};ve.styleTagTransform=y(),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 _e=r(14486);const Ce=(0,_e.A)(Ee,(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,we={name:"SharingEntryInternal",components:{NcActionButton:K.A,SharingEntrySimple:Ce,CheckIcon:ge.A,ClipboardIcon:me.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,Ae.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 be=r(23815),Se={};Se.styleTagTransform=y(),Se.setAttributes=A(),Se.insert=p().bind(null,"head"),Se.domAPI=u(),Se.insertStyleElement=m(),c()(be.A,Se),be.A&&be.A.locals&&be.A.locals;const xe=(0,_e.A)(we,(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 Te=r(17334),Pe=r.n(Te),Re=(r(48318),r(61338));const Ie=(0,o.KT)("apps/files_sharing/api/v1/shares"),ke={methods:{async createShare(e){let{path:i,permissions:r,shareType:n,shareWith:s,publicUpload:a,password:o,sendPasswordByTalk:l,expireDate:c,label:h,note:u,attributes:d}=e;try{const e=await Q.Ay.post(Ie,{path:i,permissions:r,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,Re.Ic)("files_sharing:share:created",{share:t}),t}catch(e){console.error("Error while creating share",e);const i=e?.response?.data?.ocs?.meta?.message;throw OC.Notification.showTemporary(i?t("files_sharing","Error creating the share: {errorMessage}",{errorMessage:i}):t("files_sharing","Error creating the share"),{type:"error"}),e}},async deleteShare(e){try{const t=await Q.Ay.delete(Ie+`/${e}`);if(!t?.data?.ocs)throw t;return(0,Re.Ic)("files_sharing:share:deleted",{id:e}),!0}catch(e){console.error("Error while deleting share",e);const i=e?.response?.data?.ocs?.meta?.message;throw OC.Notification.showTemporary(i?t("files_sharing","Error deleting the share: {errorMessage}",{errorMessage:i}):t("files_sharing","Error deleting the share"),{type:"error"}),e}},async updateShare(e,i){try{const t=await Q.Ay.put(Ie+`/${e}`,i);if((0,Re.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 i=e?.response?.data?.ocs?.meta?.message;OC.Notification.showTemporary(i?t("files_sharing","Error updating the share: {errorMessage}",{errorMessage:i}):t("files_sharing","Error updating the share"),{type:"error"})}const i=e.response.data.ocs.meta.message;throw new Error(i)}}}},Ne={methods:{async openSharingDetails(e){let t={};if(e.handler){const i={};this.suggestions&&(i.suggestions=this.suggestions,i.fileInfo=this.fileInfo,i.query=this.query);const r=await e.handler(i);t=this.mapShareRequestToShareObject(r)}else t=this.mapShareRequestToShareObject(e);const i={fileInfo:this.fileInfo,share:t};this.$emit("open-sharing-details",i)},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)}}},De={name:"SharingInput",components:{NcSelect:b.A},mixins:[fe,ke,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 i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.loading=!0,!0===(0,ce.F)().files_sharing.sharee.query_lookup_default&&(i=!0);const r=[this.SHARE_TYPES.SHARE_TYPE_USER,this.SHARE_TYPES.SHARE_TYPE_GROUP,this.SHARE_TYPES.SHARE_TYPE_REMOTE,this.SHARE_TYPES.SHARE_TYPE_REMOTE_GROUP,this.SHARE_TYPES.SHARE_TYPE_CIRCLE,this.SHARE_TYPES.SHARE_TYPE_ROOM,this.SHARE_TYPES.SHARE_TYPE_GUEST,this.SHARE_TYPES.SHARE_TYPE_DECK,this.SHARE_TYPES.SHARE_TYPE_SCIENCEMESH];!0===(0,ce.F)().files_sharing.public.enabled&&r.push(this.SHARE_TYPES.SHARE_TYPE_EMAIL);let n=null;try{n=await Q.Ay.get((0,o.KT)("apps/files_sharing/api/v1/sharees"),{params:{format:"json",itemType:"dir"===this.fileInfo.type?"folder":"file",search:e,lookup:i,perPage:this.config.maxAutocompleteResults,shareType:r}})}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&&!i&&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:Pe()((function(){this.getSuggestions(...arguments)}),300),async getRecommendations(){this.loading=!0;let e=null;try{e=await Q.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))),i=Object.values(e.data.ocs.data.exact).reduce(((e,t)=>e.concat(t)),[]);this.recommendations=this.filterOutExistingShares(i).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===this.SHARE_TYPES.SHARE_TYPE_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===this.SHARE_TYPES.SHARE_TYPE_EMAIL){if(-1!==this.linkShares.map((e=>e.shareWith)).indexOf(t.value.shareWith.trim()))return e}else{const i=this.shares.reduce(((e,t)=>(e[t.shareWith]=t.type,e)),{}),r=t.value.shareWith.trim();if(r in i&&i[r]===t.value.shareType)return e}e.push(t)}catch{return e}return e}),[])},shareTypeToIcon(e){switch(e){case this.SHARE_TYPES.SHARE_TYPE_GUEST:return{icon:"icon-user",iconTitle:t("files_sharing","Guest")};case this.SHARE_TYPES.SHARE_TYPE_REMOTE_GROUP:case this.SHARE_TYPES.SHARE_TYPE_GROUP:return{icon:"icon-group",iconTitle:t("files_sharing","Group")};case this.SHARE_TYPES.SHARE_TYPE_EMAIL:return{icon:"icon-mail",iconTitle:t("files_sharing","Email")};case this.SHARE_TYPES.SHARE_TYPE_CIRCLE:return{icon:"icon-teams",iconTitle:t("files_sharing","Team")};case this.SHARE_TYPES.SHARE_TYPE_ROOM:return{icon:"icon-room",iconTitle:t("files_sharing","Talk conversation")};case this.SHARE_TYPES.SHARE_TYPE_DECK:return{icon:"icon-deck",iconTitle:t("files_sharing","Deck board")};case this.SHARE_TYPES.SHARE_TYPE_SCIENCEMESH:return{icon:"icon-sciencemesh",iconTitle:t("files_sharing","ScienceMesh")};default:return{}}},formatForMultiselect(e){let i;return i=e.value.shareType===this.SHARE_TYPES.SHARE_TYPE_USER&&this.config.shouldAlwaysShowUnique?e.shareWithDisplayNameUnique??"":e.value.shareType!==this.SHARE_TYPES.SHARE_TYPE_REMOTE&&e.value.shareType!==this.SHARE_TYPES.SHARE_TYPE_REMOTE_GROUP||!e.value.server?e.value.shareType===this.SHARE_TYPES.SHARE_TYPE_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!==this.SHARE_TYPES.SHARE_TYPE_USER,displayName:e.name||e.label,subname:i,shareWithDisplayNameUnique:e.shareWithDisplayNameUnique||"",...this.shareTypeToIcon(e.value.shareType)}}}};var Be=r(2134),Le={};Le.styleTagTransform=y(),Le.setAttributes=A(),Le.insert=p().bind(null,"head"),Le.domAPI=u(),Le.insertStyleElement=m(),c()(Be.A,Le),Be.A&&Be.A.locals&&Be.A.locals;const Oe=(0,_e.A)(De,(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:i}=t;return[e._v("\n\t\t\t"+e._s(i?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 Me=r(71225),He=r(69321),Ue=r(73010);const Ye=(0,s.H4)();var Fe=r(49264);const $e={NONE:0,READ:1,UPDATE:2,CREATE:4,DELETE:8,SHARE:16},Ve={READ_ONLY:$e.READ,UPLOAD_AND_UPDATE:$e.READ|$e.UPDATE|$e.CREATE|$e.DELETE,FILE_DROP:$e.CREATE,ALL:$e.UPDATE|$e.CREATE|$e.READ|$e.DELETE|$e.SHARE,ALL_FILE:$e.UPDATE|$e.READ|$e.SHARE};const je={mixins:[ke,fe],props:{fileInfo:{type:Object,default:()=>{},required:!0},share:{type:pe,default:null},isUnique:{type:Boolean,default:!0}},data(){return{config:new he,node:null,errors:{},loading:!1,saving:!1,open:!1,updateQueue:new Fe.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[this.SHARE_TYPES.SHARE_TYPE_LINK,this.SHARE_TYPES.SHARE_TYPE_EMAIL].includes(e)},isRemoteShare(){return this.share.type===this.SHARE_TYPES.SHARE_TYPE_REMOTE_GROUP||this.share.type===this.SHARE_TYPES.SHARE_TYPE_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![Ve.ALL,Ve.READ_ONLY,Ve.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)(),i=await Ye.stat(`${s.lJ}${e.path}`,{details:!0,data:t});return(0,s.Al)(i.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:Pe()((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,Ae.Te)(e),this.$emit("remove:share",this.share),await this.getNode(),(0,Re.Ic)("files:node:updated",this.node)}catch(e){this.open=!0}finally{this.loading=!1}},queueUpdate(){for(var e=arguments.length,i=new Array(e),r=0;r<e;r++)i[r]=arguments[r];if(0!==i.length){if(this.share.id){const e={};return i.forEach((t=>{"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);i.indexOf("password")>=0&&(this.$delete(this.share,"newPassword"),this.share.passwordExpirationTime=t.password_expiration_time),this.$delete(this.errors,i[0]),(0,Ae.Te)(this.updateSuccessMessage(i))}catch(e){de.error("Could not update share",{error:e,share:this.share,propertyNames:i});const{message:r}=e;r&&""!==r?(this.onSyncError(i[0],r),(0,Ae.Qg)(r)):(0,Ae.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 i=this.$refs[e];if(i){i.$el&&(i=i.$el);const e=i.querySelector(".focusable");e&&e.focus()}break}case"sendPasswordByTalk":this.$set(this.errors,e,t),this.share.sendPasswordByTalk=!this.share.sendPasswordByTalk}},debounceQueueUpdate:Pe()((function(e){this.queueUpdate(e)}),500)}},qe={name:"SharingEntryInherited",components:{NcActionButton:K.A,NcActionLink:He.A,NcActionText:Ue.A,NcAvatar:w.A,SharingEntrySimple:Ce},mixins:[je],props:{share:{type:pe,required:!0}},computed:{viaFileTargetUrl(){return(0,o.Jv)("/f/{fileid}",{fileid:this.share.viaFileid})},viaFolderName(){return(0,Me.P8)(this.share.viaPath)}}};var ze=r(88346),We={};We.styleTagTransform=y(),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,_e.A)(qe,(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,Ke={name:"SharingInherited",components:{NcActionButton:K.A,SharingEntryInherited:Ge,SharingEntrySimple:Ce},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 Q.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=r(44377),Qe={};Qe.styleTagTransform=y(),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,_e.A)(Ke,(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(i){return t("SharingEntryInherited",{key:i.id,attrs:{"file-info":e.fileInfo,share:i},on:{"remove:share":e.removeShare}})}))],2)}),[],!1,null,"33849ae4",null).exports;var Je=r(17816),et=r.n(Je),tt=r(14681),it=r(44131),rt=r(15502),nt=r(94219);const st={name:"TuneIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},at=(0,_e.A)(st,(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,"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,ot={name:"CalendarBlankIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},lt=(0,_e.A)(ot,(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,"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,ct={name:"QrcodeIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},ht=(0,_e.A)(ct,(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,"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,ut={name:"ExclamationIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},dt=(0,_e.A)(ut,(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,"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,pt={name:"LockIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},ft=(0,_e.A)(pt,(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,"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,At={name:"CheckBoldIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},gt=(0,_e.A)(At,(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,"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 mt=r(24325),Et=r(27577);const yt={name:"TriangleSmallDownIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},vt=(0,_e.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,"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,_t={name:"EyeOutlineIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},Ct=(0,_e.A)(_t,(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,"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 wt=r(93919);const bt={name:"FileUploadIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},St=(0,_e.A)(bt,(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,"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,xt={name:"SharingEntryQuickShareSelect",components:{DropdownIcon:vt,NcActions:G.A,NcActionButton:K.A},mixins:[je,Ne,fe],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&~$e.SHARE)===Ve.READ_ONLY?this.canViewText:this.share.permissions===Ve.ALL||this.share.permissions===Ve.ALL_FILE?this.canEditText:(this.share.permissions&~$e.SHARE)===Ve.FILE_DROP?this.fileDropText:this.customPermissionsText},options(){const e=[{label:this.canViewText,icon:Ct},{label:this.canEditText,icon:wt.A}];return this.supportsFileDrop&&e.push({label:this.fileDropText,icon:St}),e.push({label:this.customPermissionsText,icon:at}),e},supportsFileDrop(){if(this.isFolder&&this.config.isPublicUploadEnabled){const e=this.share.type??this.share.shareType;return[this.SHARE_TYPES.SHARE_TYPE_LINK,this.SHARE_TYPES.SHARE_TYPE_EMAIL].includes(e)}return!1},dropDownPermissionValue(){switch(this.selectedOption){case this.canEditText:return this.isFolder?Ve.ALL:Ve.ALL_FILE;case this.fileDropText:return Ve.FILE_DROP;case this.customPermissionsText:return"custom";case this.canViewText:default:return Ve.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())}}},Tt=xt;var Pt=r(88809),Rt={};Rt.styleTagTransform=y(),Rt.setAttributes=A(),Rt.insert=p().bind(null,"head"),Rt.domAPI=u(),Rt.insertStyleElement=m(),c()(Pt.A,Rt),Pt.A&&Pt.A.locals&&Pt.A.locals;const It=(0,_e.A)(Tt,(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","force-name":""},scopedSlots:e._u([{key:"icon",fn:function(){return[t("DropdownIcon",{attrs:{size:15}})]},proxy:!0}])},[e._v(" "),e._l(e.options,(function(i){return t("NcActionButton",{key:i.label,attrs:{type:"radio","model-value":i.label===e.selectedOption,"close-after-click":""},on:{click:function(t){return e.selectOption(i.label)}},scopedSlots:e._u([{key:"icon",fn:function(){return[t(i.icon,{tag:"component"})]},proxy:!0}],null,!0)},[e._v("\n\t\t"+e._s(i.label)+"\n\t")])}))],2)}),[],!1,null,"60eea424",null).exports,kt={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,_e.A)(kt,(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,Dt=new he;async function Bt(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(Dt.passwordPolicy.api&&Dt.passwordPolicy.api.generate)try{const t=await Q.Ay.get(Dt.passwordPolicy.api.generate);if(t.data.ocs.data.password)return e&&(0,Ae.Te)((0,C.Tl)("files_sharing","Password created successfully")),t.data.ocs.data.password}catch(t){console.info("Error generating password from password_policy",t),e&&(0,Ae.Qg)((0,C.Tl)("files_sharing","Error generating password from password policy"))}const t=new Uint8Array(10),i=52/255;self.crypto.getRandomValues(t);let r="";for(let e=0;e<t.length;e++)r+="abcdefgijkmnopqrstwxyzABCDEFGHJKLMNPQRSTWXYZ23456789".charAt(t[e]*i);return r}const Lt={name:"SharingEntryLink",components:{ExternalShareAction:Nt,NcActions:G.A,NcActionButton:K.A,NcActionCheckbox:tt.N,NcActionInput:it.A,NcActionLink:He.A,NcActionText:Ue.A,NcActionSeparator:rt.A,NcAvatar:w.A,NcDialog:nt.A,VueQrcode:et(),Tune:at,IconCalendarBlank:lt,IconQr:ht,ErrorIcon:dt,LockIcon:ft,CheckIcon:gt,ClipboardIcon:me.A,CloseIcon:mt.A,PlusIcon:Et.A,SharingEntryQuickShareSelect:It},mixins:[je,Ne],props:{canReshare:{type:Boolean,default:!0},index:{type:Number,default:null}},data:()=>({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){X.Ay.set(this.share,"password",e?await Bt(!0):""),X.Ay.set(this.share,"newPassword",this.share.password)}},passwordExpirationTime(){if(null===this.share.passwordExpirationTime)return null;const e=(0,oe.A)(this.share.passwordExpirationTime);return!(e.diff((0,oe.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===this.SHARE_TYPES.SHARE_TYPE_EMAIL},canTogglePasswordProtectedByTalkAvailable(){return!(!this.isPasswordProtected||this.isEmailShareType&&!this.hasUnsavedPassword)},pendingDataIsMissing(){return this.pendingPassword||this.pendingEnforcedPassword||this.pendingEnforcedExpirationDate},pendingPassword(){return this.config.enableLinkPasswordByDefault&&this.isPendingShare},pendingEnforcedPassword(){return this.config.enforcePasswordForPublicLink&&this.isPendingShare},pendingEnforcedExpirationDate(){return this.config.isDefaultExpireDateEnforced&&this.isPendingShare},hasDefaultExpirationDate(){return(this.config.defaultExpirationDate instanceof Date||!isNaN(new Date(this.config.defaultExpirationDate).getTime()))&&this.isPendingShare},isPendingShare(){return!(!this.share||this.share.id)},shareRequiresReview(){return this.defaultExpirationDateEnabled||this.config.enableLinkPasswordByDefault},sharePolicyHasRequiredProperties(){return this.config.enforcePasswordForPublicLink||this.config.isDefaultExpireDateEnforced},requiredPropertiesMissing(){if(!this.sharePolicyHasRequiredProperties)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(le.I.Link)||e.shareType.includes(le.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:{async onNewLinkShare(){if(this.logger.debug("onNewLinkShare called (with this.share)",this.share),this.loading)return;const e={share_type:le.I.Link};if(this.config.isDefaultExpireDateEnforced&&(e.expiration=this.formatDateToString(this.config.defaultExpirationDate)),this.logger.debug("Missing required properties?",this.requiredPropertiesMissing),this.sharePolicyHasRequiredProperties&&this.requiredPropertiesMissing||this.shareRequiresReview){this.pending=!0,this.shareCreationComplete=!1,this.logger.info("Share policy requires mandated properties (password)..."),(this.config.enableLinkPasswordByDefault||this.config.enforcePasswordForPublicLink)&&(e.password=await Bt(!0));const t=new pe(e),i=await new Promise((e=>{this.$emit("add:share",t,e)}));this.open=!1,this.pending=!1,i.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,Ae.Qg)(t("files_sharing","Error, please enter proper password and/or expiration date")),!1}const i=new pe(e);await this.pushNewLinkShare(i),this.shareCreationComplete=!0}},async pushNewLinkShare(e,i){try{if(this.loading)return!0;this.loading=!0,this.errors={};const r={path:(this.fileInfo.path+"/"+this.fileInfo.name).replace("//","/"),shareType:le.I.Link,password:e.password,expireDate:e.expireDate,attributes:JSON.stringify(this.fileInfo.shareAttributes)};console.debug("Creating link share with options",r);const n=await this.createShare(r);let s;this.open=!1,this.shareCreationComplete=!0,console.debug("Link share created",n),s=i?await new Promise((e=>{this.$emit("update:share",n,e)})):await new Promise((e=>{this.$emit("add:share",n,e)})),await this.getNode(),(0,Re.Ic)("files:node:updated",this.node),this.config.enforcePasswordForPublicLink||s.copyLink(),(0,Ae.Te)(t("files_sharing","Link share created"))}catch(e){const i=e?.response?.data?.ocs?.meta?.message;if(!i)return(0,Ae.Qg)(t("files_sharing","Error while creating the share")),void console.error(e);throw i.match(/password/i)?this.onSyncError("password",i):i.match(/date/i)?this.onSyncError("expireDate",i):this.onSyncError("pending",i),e}finally{this.loading=!1,this.shareCreationComplete=!0}},async copyLink(){try{await navigator.clipboard.writeText(this.shareLink),(0,Ae.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)}}},Ot=Lt;var Mt=r(89553),Ht={};Ht.styleTagTransform=y(),Ht.setAttributes=A(),Ht.insert=p().bind(null,"head"),Ht.domAPI=u(),Ht.insertStyleElement=m(),c()(Mt.A,Ht),Mt.A&&Mt.A.locals&&Mt.A.locals;const Ut={name:"SharingLinkList",components:{SharingEntryLink:(0,_e.A)(Ot,(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:e.onNewLinkShare},scopedSlots:e._u([{key:"icon",fn:function(){return[t("LockIcon",{attrs:{size:20}})]},proxy:!0}],null,!1,2056568168)}):e._e(),e._v(" "),e.hasDefaultExpirationDate?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.hasDefaultExpirationDate||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.apply(null,arguments)}},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(i){return t("ExternalShareAction",{key:i.id,attrs:{id:i.id,action:i,"file-info":e.fileInfo,share:e.share}})})),e._v(" "),e._l(e.externalLegacyLinkActions,(function(i,r){let{icon:n,url:s,name:a}=i;return t("NcActionLink",{key:r,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,"0b6d6fb1",null).exports},mixins:[fe,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===this.SHARE_TYPES.SHARE_TYPE_LINK)).length>0},hasShares(){return this.shares.length>0}},methods:{t:C.t,addShare(e,t){this.shares.push(e),this.awaitForShare(e,t)},awaitForShare(e,t){this.$nextTick((()=>{const i=this.$children.find((t=>t.share===e));i&&t(i)}))},removeShare(e){const t=this.shares.findIndex((t=>t===e));this.shares.splice(t,1)}}},Yt=(0,_e.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(i,r){return t("SharingEntryLink",{key:i.id,attrs:{index:e.shares.length>1?r+1:null,"can-reshare":e.canReshare,share:e.shares[r],"file-info":e.fileInfo},on:{"update:share":[function(t){return e.$set(e.shares,r,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(i)}}})})):e._e()],2):e._e()}),[],!1,null,null,null).exports;var Ft=r(70995),$t=r(35559);const Vt={name:"SharingEntry",components:{NcButton:Ft.A,NcAvatar:w.A,DotsHorizontalIcon:$t.A,NcSelect:b.A,SharingEntryQuickShareSelect:It},mixins:[je,Ne],computed:{title(){let e=this.share.shareWithDisplayName;return this.share.type===this.SHARE_TYPES.SHARE_TYPE_GROUP?e+=` (${t("files_sharing","group")})`:this.share.type===this.SHARE_TYPES.SHARE_TYPE_ROOM?e+=` (${t("files_sharing","conversation")})`:this.share.type===this.SHARE_TYPES.SHARE_TYPE_REMOTE?e+=` (${t("files_sharing","remote")})`:this.share.type===this.SHARE_TYPES.SHARE_TYPE_REMOTE_GROUP?e+=` (${t("files_sharing","remote group")})`:this.share.type===this.SHARE_TYPES.SHARE_TYPE_GUEST&&(e+=` (${t("files_sharing","guest")})`),e},tooltip(){if(this.share.owner!==this.share.uidFileOwner){const e={user:this.share.shareWithDisplayName,owner:this.share.ownerDisplayName};return this.share.type===this.SHARE_TYPES.SHARE_TYPE_GROUP?t("files_sharing","Shared with the group {user} by {owner}",e):this.share.type===this.SHARE_TYPES.SHARE_TYPE_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===this.SHARE_TYPES.SHARE_TYPE_USER&&"object"==typeof this.share.status&&!Array.isArray(this.share.status)}},methods:{onMenuClose(){this.onNoteSubmit()}}};var jt=r(1709),qt={};qt.styleTagTransform=y(),qt.setAttributes=A(),qt.insert=p().bind(null,"head"),qt.domAPI=u(),qt.insertStyleElement=m(),c()(jt.A,qt),jt.A&&jt.A.locals&&jt.A.locals;const zt={name:"SharingList",components:{SharingEntry:(0,_e.A)(Vt,(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.SHARE_TYPES.SHARE_TYPE_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(" "),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}])})],1)}),[],!1,null,"fd4f3ea8",null).exports},mixins:[fe,Ne],props:{fileInfo:{type:Object,default:()=>{},required:!0},shares:{type:Array,default:()=>[],required:!0}},setup:()=>({t:C.t}),computed:{hasShares(){return 0===this.shares.length},isUnique(){return e=>[...this.shares].filter((t=>e.type===this.SHARE_TYPES.SHARE_TYPE_USER&&e.shareWithDisplayName===t.shareWithDisplayName)).length<=1}}},Wt=(0,_e.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(i){return t("SharingEntry",{key:i.id,attrs:{"file-info":e.fileInfo,share:i,"is-unique":e.isUnique(i)},on:{"open-sharing-details":function(t){return e.openSharingDetails(i)}}})})),1)}),[],!1,null,null,null).exports;var Gt=r(32073),Kt=r(15828),Xt=r(16879),Qt=r(59892),Zt=r(16044),Jt=r(177);const ei={name:"CircleOutlineIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},ti=(0,_e.A)(ei,(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,"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,ii={name:"EmailIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},ri=(0,_e.A)(ii,(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,"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 ni=r(89979),si=r(72755);const ai={name:"ShareCircleIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},oi=(0,_e.A)(ai,(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,"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,li={name:"AccountCircleOutlineIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},ci=(0,_e.A)(li,(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,"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,hi={name:"EyeIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},ui=(0,_e.A)(hi,(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,"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 di=r(45821),pi=r(1795),fi=r(33017);const Ai={name:"SharingDetailsTab",components:{NcAvatar:w.A,NcButton:Ft.A,NcCheckboxRadioSwitch:Gt.A,NcDateTimePickerNative:Kt.A,NcInputField:Xt.A,NcLoadingIcon:Qt.A,NcPasswordField:Zt.A,NcTextArea:Jt.A,CloseIcon:mt.A,CircleIcon:ti,EditIcon:wt.A,ExternalShareAction:Nt,LinkIcon:ni.A,GroupIcon:si.A,ShareIcon:oi,UserIcon:ci,UploadIcon:di.A,ViewIcon:ui,MenuDownIcon:pi.A,MenuUpIcon:fi.A,DotsHorizontalIcon:$t.A},mixins:[fe,ke,je],props:{shareRequestValue:{type:Object,required:!1},fileInfo:{type:Object,required:!0},share:{type:Object,required:!0}},data:()=>({writeNoteToRecipientIsChecked:!1,sharingPermission:Ve.ALL.toString(),revertSharingPermission:Ve.ALL.toString(),setCustomPermissions:!1,passwordError:!1,advancedSectionAccordionExpanded:!1,bundledPermissions:Ve,isFirstComponentLoad:!0,test:!1,creating:!1,ExternalShareActions:OCA.Sharing.ExternalShareActions.state}),computed:{title(){switch(this.share.type){case this.SHARE_TYPES.SHARE_TYPE_USER:return t("files_sharing","Share with {userName}",{userName:this.share.shareWithDisplayName});case this.SHARE_TYPES.SHARE_TYPE_EMAIL:return t("files_sharing","Share with email {email}",{email:this.share.shareWith});case this.SHARE_TYPES.SHARE_TYPE_LINK:return t("files_sharing","Share link");case this.SHARE_TYPES.SHARE_TYPE_GROUP:return t("files_sharing","Share with group");case this.SHARE_TYPES.SHARE_TYPE_ROOM:return t("files_sharing","Share in conversation");case this.SHARE_TYPES.SHARE_TYPE_REMOTE:{const[e,i]=this.share.shareWith.split("@");return t("files_sharing","Share with {user} on remote server {server}",{user:e,server:i})}case this.SHARE_TYPES.SHARE_TYPE_REMOTE_GROUP:return t("files_sharing","Share with remote group");case this.SHARE_TYPES.SHARE_TYPE_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 Bt(!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===this.SHARE_TYPES.SHARE_TYPE_USER},isGroupShare(){return this.share.type===this.SHARE_TYPES.SHARE_TYPE_GROUP},isNewShare(){return!this.share.id},allowsFileDrop(){return!(!this.isFolder||!this.config.isPublicUploadEnabled||this.share.type!==this.SHARE_TYPES.SHARE_TYPE_LINK&&this.share.type!==this.SHARE_TYPES.SHARE_TYPE_EMAIL)},hasFileDropPermissions(){return this.share.permissions===this.bundledPermissions.FILE_DROP},shareButtonText(){return this.isNewShare?t("files_sharing","Save share"):t("files_sharing","Update share")},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===this.SHARE_TYPES.SHARE_TYPE_LINK||this.share.type===this.SHARE_TYPES.SHARE_TYPE_EMAIL)},hasUnsavedPassword(){return void 0!==this.share.newPassword},passwordExpirationTime(){if(!this.isValidShareAttribute(this.share.passwordExpirationTime))return null;const e=(0,oe.A)(this.share.passwordExpirationTime);return!(e.diff((0,oe.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===this.SHARE_TYPES.SHARE_TYPE_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={[$e.READ]:this.t("files_sharing","Read"),[$e.CREATE]:this.t("files_sharing","Create"),[$e.UPDATE]:this.t("files_sharing","Edit"),[$e.SHARE]:this.t("files_sharing","Share"),[$e.DELETE]:this.t("files_sharing","Delete")};return[$e.READ,$e.CREATE,$e.UPDATE,$e.SHARE,$e.DELETE].filter((e=>{return t=this.share.permissions,i=e,t!==$e.NONE&&(t&i)===i;var t,i})).map(((t,i)=>0===i?e[t]:e[t].toLocaleLowerCase((0,C.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(le.I.Link)||e.shareType.includes(le.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:i=this.canCreate,isDeleteChecked:r=this.canDelete,isReshareChecked:n=this.canReshare}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const s=(e?$e.READ:0)|(i?$e.CREATE:0)|(r?$e.DELETE:0)|(t?$e.UPDATE:0)|(n?$e.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 Bt(!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===Ve.READ_ONLY||e===Ve.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!==Ve.ALL||(this.share.permissions=Ve.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,Re.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,Re.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 this.SHARE_TYPES.SHARE_TYPE_LINK:return ni.A;case this.SHARE_TYPES.SHARE_TYPE_GUEST:return ci;case this.SHARE_TYPES.SHARE_TYPE_REMOTE_GROUP:case this.SHARE_TYPES.SHARE_TYPE_GROUP:return si.A;case this.SHARE_TYPES.SHARE_TYPE_EMAIL:return ri;case this.SHARE_TYPES.SHARE_TYPE_CIRCLE:return ti;case this.SHARE_TYPES.SHARE_TYPE_ROOM:case this.SHARE_TYPES.SHARE_TYPE_DECK:case this.SHARE_TYPES.SHARE_TYPE_SCIENCEMESH:return oi;default:return null}}}};var gi=r(31167),mi={};mi.styleTagTransform=y(),mi.setAttributes=A(),mi.insert=p().bind(null,"head"),mi.domAPI=u(),mi.insertStyleElement=m(),c()(gi.A,mi),gi.A&&gi.A.locals&&gi.A.locals;const Ei=(0,_e.A)(Ai,(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.SHARE_TYPES.SHARE_TYPE_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(i){return t("ExternalShareAction",{key:i.id,ref:"externalLinkActions",refInFor:!0,attrs:{id:i.id,action:i,"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.config.isResharingAllowed&&e.share.type!==e.SHARE_TYPES.SHARE_TYPE_LINK?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,"cbfe209a",null).exports,yi={name:"SharingTab",components:{NcAvatar:w.A,CollectionList:ae,SharingEntryInternal:xe,SharingEntrySimple:Ce,SharingInherited:Ze,SharingInput:Oe,SharingLinkList:Yt,SharingList:Wt,SharingDetailsTab:Ei},mixins:[fe],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",i=(this.fileInfo.path+"/"+this.fileInfo.name).replace("//","/"),r=Q.Ay.get(e,{params:{format:t,path:i,reshares:!0}}),n=Q.Ay.get(e,{params:{format:t,path:i,shared_with_me:!0}}),[s,a]=await Promise.all([r,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 i=(0,oe.A)(e.expireDate).unix();this.$set(this.sharedWithMe,"subtitle",t("files_sharing","Expires {relativetime}",{relativetime:(0,oe.A)(1e3*i).fromNow()})),(0,oe.A)().unix()>i&&(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===this.SHARE_TYPES.SHARE_TYPE_LINK||e.type===this.SHARE_TYPES.SHARE_TYPE_EMAIL)),this.shares=e.filter((e=>e.type!==this.SHARE_TYPES.SHARE_TYPE_LINK&&e.type!==this.SHARE_TYPES.SHARE_TYPE_EMAIL)),console.debug("Processed",this.linkShares.length,"link share(s)"),console.debug("Processed",this.shares.length,"share(s)")}},processSharedWithMe(e){let{data:i}=e;if(i.ocs&&i.ocs.data&&i.ocs.data[0]){const e=new pe(i),r=function(e){return e.type===le.Z.SHARE_TYPE_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===le.Z.SHARE_TYPE_CIRCLE?t("files_sharing","Shared with you and {circle} by {owner}",{circle:e.shareWithDisplayName,owner:e.ownerDisplayName},void 0,{escape:!1}):e.type===le.Z.SHARE_TYPE_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:r,user:s},this.reshare=e,e.expireDate&&(0,oe.A)(e.expireDate).unix()>(0,oe.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===this.SHARE_TYPES.SHARE_TYPE_EMAIL?this.linkShares.unshift(e):this.shares.unshift(e),this.awaitForShare(e,t)},removeShare(e){const t=e.type===this.SHARE_TYPES.SHARE_TYPE_EMAIL||e.type===this.SHARE_TYPES.SHARE_TYPE_LINK?this.linkShares:this.shares,i=t.findIndex((t=>t.id===e.id));-1!==i&&t.splice(i,1)},awaitForShare(e,t){this.$nextTick((()=>{let i=this.$refs.shareList;e.type===this.SHARE_TYPES.SHARE_TYPE_EMAIL&&(i=this.$refs.linkShareList);const r=i.$children.find((t=>t.share===e));r&&t(r)}))},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}))}}},vi=yi;var _i=r(71028),Ci={};Ci.styleTagTransform=y(),Ci.setAttributes=A(),Ci.insert=p().bind(null,"head"),Ci.domAPI=u(),Ci.insertStyleElement=m(),c()(_i.A,Ci),_i.A&&_i.A.locals&&_i.A.locals;const wi=(0,_e.A)(vi,(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(i,r){return t("div",{directives:[{name:"show",rawName:"v-show",value:!e.showSharingDetailsView,expression:"!showSharingDetailsView"}],key:r,ref:"section-"+r,refInFor:!0,staticClass:"sharingTab__additionalContent"},[t(i(e.$refs["section-"+r],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,"7c6dc4a7",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,i)=>{"use strict";i.d(t,{Al:()=>r.r,H4:()=>r.c,My:()=>u,Q$:()=>r.e,R3:()=>r.n,VL:()=>r.l,lJ:()=>r.d,pt:()=>r.F,ur:()=>d,v7:()=>c});var r=i(29719),n=(i(43627),i(53334)),s=i(380),a=i(65606);Error;const o=["B","KB","MB","GB","TB","PB"],l=["B","KiB","MiB","GiB","TiB","PiB"];function c(e,t=!1,i=!1,r=!1){i=i&&!r,"string"==typeof e&&(e=Number(e));let s=e>0?Math.floor(Math.log(e)/Math.log(r?1e3:1024)):0;s=Math.min((i?l.length:o.length)-1,s);const a=i?l[s]:o[s];let c=(e/Math.pow(r?1e3:1024,s)).toFixed(1);return!0===t&&0===s?("0.0"!==c?"< 1 ":"0 ")+(i?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,i){i=i??[];const r=(t=t??[e=>e]).map(((e,t)=>"asc"===(i[t]??"asc")?1:-1)),s=Intl.Collator([(0,n.Z0)(),(0,n.lO)()],{numeric:!0,usage:"sort"});return[...e].sort(((e,i)=>{for(const[n,a]of t.entries()){const t=s.compare(h(a(e)),h(a(i)));if(0!==t)return t*r[n]}return 0}))}function d(e,t={}){const i={sortingMode:"basename",sortingOrder:"asc",...t};return u(e,[...i.sortFavoritesFirst?[e=>1!==e.attributes?.favorite]:[],...i.sortFoldersFirst?[e=>"folder"!==e.type]:[],..."basename"!==i.sortingMode?[e=>e[i.sortingMode]]:[],e=>{return(t=e.displayname||e.attributes?.displayname||e.basename).lastIndexOf(".")>0?t.slice(0,t.lastIndexOf(".")):t;var t},e=>e.basename],[...i.sortFavoritesFirst?["asc"]:[],...i.sortFoldersFirst?["asc"]:[],..."mtime"===i.sortingMode?["asc"===i.sortingOrder?"desc":"asc"]:[],..."mtime"!==i.sortingMode&&"basename"!==i.sortingMode?[i.sortingOrder]:[],i.sortingOrder,i.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",i="["+t+"]["+t+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*",r=new RegExp("^"+i+"$");e.isExist=function(e){return void 0!==e},e.isEmptyObject=function(e){return 0===Object.keys(e).length},e.merge=function(e,t,i){if(t){const r=Object.keys(t),n=r.length;for(let s=0;s<n;s++)e[r[s]]="strict"===i?[t[r[s]]]:t[r[s]]}},e.getValue=function(t){return e.isExist(t)?t:""},e.isName=function(e){return!(null==r.exec(e))},e.getAllMatches=function(e,t){const i=[];let r=t.exec(e);for(;r;){const n=[];n.startIndex=t.lastIndex-r[0].length;const s=r.length;for(let e=0;e<s;e++)n.push(r[e]);i.push(n),r=t.exec(e)}return i},e.nameRegexp=i}(p);new RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?","g");var f={};const A={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(e,t){return t},attributeValueProcessor:function(e,t){return t},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(e,t,i){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,i){let r;const n={};for(let s=0;s<e.length;s++){const a=e[s],o=E(a);let l="";if(l=void 0===i?o:i+"."+o,o===t.textNodeName)void 0===r?r=a[o]:r+=""+a[o];else{if(void 0===o)continue;if(a[o]){let e=m(a[o],t,l);const i=v(e,t);a[":@"]?y(e,a[":@"],l,t):1!==Object.keys(e).length||void 0===e[t.textNodeName]||t.alwaysCreateTextNode?0===Object.keys(e).length&&(t.alwaysCreateTextNode?e[t.textNodeName]="":e=""):e=e[t.textNodeName],void 0!==n[o]&&n.hasOwnProperty(o)?(Array.isArray(n[o])||(n[o]=[n[o]]),n[o].push(e)):t.isArray(o,l,i)?n[o]=[e]:n[o]=e}}}return"string"==typeof r?r.length>0&&(n[t.textNodeName]=r):void 0!==r&&(n[t.textNodeName]=r),n}function E(e){const t=Object.keys(e);for(let e=0;e<t.length;e++){const i=t[e];if(":@"!==i)return i}}function y(e,t,i,r){if(t){const n=Object.keys(t),s=n.length;for(let a=0;a<s;a++){const s=n[a];r.isArray(s,i+"."+s,!0,!0)?e[s]=[t[s]]:e[s]=t[s]}}}function v(e,t){const{textNodeName:i}=t,r=Object.keys(e).length;return 0===r||!(1!==r||!e[i]&&"boolean"!=typeof e[i]&&0!==e[i])}g.prettify=function(e,t){return m(e,t)};const{buildOptions:_}=f,{prettify:C}=g;function w(e,t,i,r){let n="",s=!1;for(let a=0;a<e.length;a++){const o=e[a],l=b(o);if(void 0===l)continue;let c="";if(c=0===i.length?l:`${i}.${l}`,l===t.textNodeName){let e=o[l];x(c,t)||(e=t.tagValueProcessor(l,e),e=T(e,t)),s&&(n+=r),n+=e,s=!1;continue}if(l===t.cdataPropName){s&&(n+=r),n+=`<![CDATA[${o[l][0][t.textNodeName]}]]>`,s=!1;continue}if(l===t.commentPropName){n+=r+`\x3c!--${o[l][0][t.textNodeName]}--\x3e`,s=!0;continue}if("?"===l[0]){const e=S(o[":@"],t),i="?xml"===l?"":r;let a=o[l][0][t.textNodeName];a=0!==a.length?" "+a:"",n+=i+`<${l}${a}${e}?>`,s=!0;continue}let h=r;""!==h&&(h+=t.indentBy);const u=r+`<${l}${S(o[":@"],t)}`,d=w(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}${r}</${l}>`:(n+=u+">",d&&""!==r&&(d.includes("/>")||d.includes("</"))?n+=r+t.indentBy+d+r:n+=d,n+=`</${l}>`):n+=u+"/>",s=!0}return n}function b(e){const t=Object.keys(e);for(let i=0;i<t.length;i++){const r=t[i];if(e.hasOwnProperty(r)&&":@"!==r)return r}}function S(e,t){let i="";if(e&&!t.ignoreAttributes)for(let r in e){if(!e.hasOwnProperty(r))continue;let n=t.attributeValueProcessor(r,e[r]);n=T(n,t),!0===n&&t.suppressBooleanAttributes?i+=` ${r.substr(t.attributeNamePrefix.length)}`:i+=` ${r.substr(t.attributeNamePrefix.length)}="${n}"`}return i}function x(e,t){let i=(e=e.substr(0,e.length-t.textNodeName.length-1)).substr(e.lastIndexOf(".")+1);for(let r in t.stopNodes)if(t.stopNodes[r]===e||t.stopNodes[r]==="*."+i)return!0;return!1}function T(e,t){if(e&&e.length>0&&t.processEntities)for(let i=0;i<t.entities.length;i++){const r=t.entities[i];e=e.replace(r.regex,r.val)}return e}const P=function(e,t){let i="";return t.format&&t.indentBy.length>0&&(i="\n"),w(e,t,"",i)},R=function(e){return"function"==typeof e?e:Array.isArray(e)?t=>{for(const i of e){if("string"==typeof i&&t===i)return!0;if(i instanceof RegExp&&i.test(t))return!0}}:()=>!1},I={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:"&amp;"},{regex:new RegExp(">","g"),val:"&gt;"},{regex:new RegExp("<","g"),val:"&lt;"},{regex:new RegExp("'","g"),val:"&apos;"},{regex:new RegExp('"',"g"),val:"&quot;"}],processEntities:!0,stopNodes:[],oneListGroup:!1};function k(e){this.options=Object.assign({},I,e),!0===this.options.ignoreAttributes||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.ignoreAttributesFn=R(this.options.ignoreAttributes),this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=B),this.processTextOrObjNode=N,this.options.format?(this.indentate=D,this.tagEndChar=">\n",this.newLine="\n"):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}function N(e,t,i,r){const n=this.j2x(e,i+1,r.concat(t));return void 0!==e[this.options.textNodeName]&&1===Object.keys(e).length?this.buildTextValNode(e[this.options.textNodeName],t,n.attrStr,i):this.buildObjectNode(n.val,t,n.attrStr,i)}function D(e){return this.options.indentBy.repeat(e)}function B(e){return!(!e.startsWith(this.options.attributeNamePrefix)||e===this.options.textNodeName)&&e.substr(this.attrPrefixLen)}k.prototype.build=function(e){return this.options.preserveOrder?P(e,this.options):(Array.isArray(e)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(e={[this.options.arrayNodeName]:e}),this.j2x(e,0,[]).val)},k.prototype.j2x=function(e,t,i){let r="",n="";const s=i.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 i=this.isAttribute(a);if(i&&!this.ignoreAttributesFn(i,s))r+=this.buildAttrPairStr(i,""+e[a]);else if(!i)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 r=e[a].length;let s="",o="";for(let l=0;l<r;l++){const r=e[a][l];if(void 0===r);else if(null===r)"?"===a[0]?n+=this.indentate(t)+"<"+a+"?"+this.tagEndChar:n+=this.indentate(t)+"<"+a+"/"+this.tagEndChar;else if("object"==typeof r)if(this.options.oneListGroup){const e=this.j2x(r,t+1,i.concat(a));s+=e.val,this.options.attributesGroupName&&r.hasOwnProperty(this.options.attributesGroupName)&&(o+=e.attrStr)}else s+=this.processTextOrObjNode(r,a,t,i);else if(this.options.oneListGroup){let e=this.options.tagValueProcessor(a,r);e=this.replaceEntitiesValue(e),s+=e}else s+=this.buildTextValNode(r,a,"",t)}this.options.oneListGroup&&(s=this.buildObjectNode(s,a,o,t)),n+=s}else if(this.options.attributesGroupName&&a===this.options.attributesGroupName){const t=Object.keys(e[a]),i=t.length;for(let n=0;n<i;n++)r+=this.buildAttrPairStr(t[n],""+e[a][t[n]])}else n+=this.processTextOrObjNode(e[a],a,t,i);return{attrStr:r,val:n}},k.prototype.buildAttrPairStr=function(e,t){return t=this.options.attributeValueProcessor(e,""+t),t=this.replaceEntitiesValue(t),this.options.suppressBooleanAttributes&&"true"===t?" "+e:" "+e+'="'+t+'"'},k.prototype.buildObjectNode=function(e,t,i,r){if(""===e)return"?"===t[0]?this.indentate(r)+"<"+t+i+"?"+this.tagEndChar:this.indentate(r)+"<"+t+i+this.closeTag(t)+this.tagEndChar;{let n="</"+t+this.tagEndChar,s="";return"?"===t[0]&&(s="?",n=""),!i&&""!==i||-1!==e.indexOf("<")?!1!==this.options.commentPropName&&t===this.options.commentPropName&&0===s.length?this.indentate(r)+`\x3c!--${e}--\x3e`+this.newLine:this.indentate(r)+"<"+t+i+s+this.tagEndChar+e+this.indentate(r)+n:this.indentate(r)+"<"+t+i+s+">"+e+n}},k.prototype.closeTag=function(e){let t="";return-1!==this.options.unpairedTags.indexOf(e)?this.options.suppressUnpairedNode||(t="/"):t=this.options.suppressEmptyNode?"/":`></${e}`,t},k.prototype.buildTextValNode=function(e,t,i,r){if(!1!==this.options.cdataPropName&&t===this.options.cdataPropName)return this.indentate(r)+`<![CDATA[${e}]]>`+this.newLine;if(!1!==this.options.commentPropName&&t===this.options.commentPropName)return this.indentate(r)+`\x3c!--${e}--\x3e`+this.newLine;if("?"===t[0])return this.indentate(r)+"<"+t+i+"?"+this.tagEndChar;{let n=this.options.tagValueProcessor(t,e);return n=this.replaceEntitiesValue(n),""===n?this.indentate(r)+"<"+t+i+this.closeTag(t)+this.tagEndChar:this.indentate(r)+"<"+t+i+">"+n+"</"+t+this.tagEndChar}},k.prototype.replaceEntitiesValue=function(e){if(e&&e.length>0&&this.options.processEntities)for(let t=0;t<this.options.entities.length;t++){const i=this.options.entities[t];e=e.replace(i.regex,i.val)}return e};var L="object"==typeof a&&a.env&&a.env.NODE_DEBUG&&/\bsemver\b/i.test(a.env.NODE_DEBUG)?(...e)=>console.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:i,MAX_SAFE_BUILD_LENGTH:r,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,r]],p=(e,t,i)=>{const r=(e=>{for(const[t,i]of d)e=e.split(`${t}*`).join(`${t}{0,${i}}`).split(`${t}+`).join(`${t}{1,${i}}`);return e})(t),n=h++;s(e,n,t),c[e]=n,l[n]=t,a[n]=new RegExp(t,i?"g":void 0),o[n]=new RegExp(r,i?"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,${i}})(?:\\.(\\d{1,${i}}))?(?:\\.(\\d{1,${i}}))?`),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 H=M.exports;Object.freeze({loose:!0}),Object.freeze({});const U=/^[0-9]+$/,Y=(e,t)=>{const i=U.test(e),r=U.test(t);return i&&r&&(e=+e,t=+t),e===t?0:i&&!r?-1:r&&!i?1:e<t?-1:1};var F={compareIdentifiers:Y,rcompareIdentifiers:(e,t)=>Y(t,e)};const{MAX_LENGTH:$,MAX_SAFE_INTEGER:V}=O,{safeRe:j,t:q}=H,{compareIdentifiers:z}=F;s.m}}]);
  2. //# sourceMappingURL=3736-3736.js.map?v=a5b1b1fb4fe2b115eb39