(self.webpackChunknextcloud=self.webpackChunknextcloud||[]).push([[1025,5810],{8679:(t,e,r)=>{"use strict";r.d(e,{A:()=>o});var i=r(71354),n=r.n(i),s=r(76314),a=r.n(s)()(n());a.push([t.id,".emptyContentWithSections[data-v-74a42206]{margin:1rem auto}.sharingTab[data-v-74a42206]{position:relative;height:100%}.sharingTab__content[data-v-74a42206]{padding:0 6px}.sharingTab__content section[data-v-74a42206]{padding-bottom:16px}.sharingTab__content section .section-header[data-v-74a42206]{margin-top:2px;margin-bottom:2px;display:flex;align-items:center;padding-bottom:4px}.sharingTab__content section .section-header h4[data-v-74a42206]{margin:0;font-size:16px}.sharingTab__content section .section-header .visually-hidden[data-v-74a42206]{display:none}.sharingTab__content section .section-header .hint-icon[data-v-74a42206]{color:var(--color-primary-element)}.sharingTab__content>section[data-v-74a42206]:not(:last-child){border-bottom:2px solid var(--color-border)}.sharingTab__additionalContent[data-v-74a42206]{margin:44px 0}.hint-body[data-v-74a42206]{max-width:300px;padding:var(--border-radius-element)}","",{version:3,sources:["webpack://./apps/files_sharing/src/views/SharingTab.vue"],names:[],mappings:"AACA,2CACC,gBAAA,CAGD,6BACC,iBAAA,CACA,WAAA,CAEA,sCACC,aAAA,CAEA,8CACC,mBAAA,CAEA,8DACC,cAAA,CACA,iBAAA,CACA,YAAA,CACA,kBAAA,CACA,kBAAA,CAEA,iEACC,QAAA,CACA,cAAA,CAGD,+EACC,YAAA,CAGD,yEACC,kCAAA,CAOH,+DACC,2CAAA,CAKF,gDACC,aAAA,CAIF,4BACC,eAAA,CACA,oCAAA",sourcesContent:["\n.emptyContentWithSections {\n\tmargin: 1rem auto;\n}\n\n.sharingTab {\n\tposition: relative;\n\theight: 100%;\n\n\t&__content {\n\t\tpadding: 0 6px;\n\n\t\tsection {\n\t\t\tpadding-bottom: 16px;\n\n\t\t\t.section-header {\n\t\t\t\tmargin-top: 2px;\n\t\t\t\tmargin-bottom: 2px;\n\t\t\t\tdisplay: flex;\n\t\t\t\talign-items: center;\n\t\t\t\tpadding-bottom: 4px;\n\n\t\t\t\th4 {\n\t\t\t\t\tmargin: 0;\n\t\t\t\t\tfont-size: 16px;\n\t\t\t\t}\n\n\t\t\t\t.visually-hidden {\n\t\t\t\t\tdisplay: none;\n\t\t\t\t}\n\n\t\t\t\t.hint-icon {\n\t\t\t\t\tcolor: var(--color-primary-element);\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\t& > section:not(:last-child) {\n\t\t\tborder-bottom: 2px solid var(--color-border);\n\t\t}\n\n\t}\n\n\t&__additionalContent {\n\t\tmargin: 44px 0;\n\t}\n}\n\n.hint-body {\n\tmax-width: 300px;\n\tpadding: var(--border-radius-element);\n}\n"],sourceRoot:""}]);const o=a},12143:(t,e,r)=>{"use strict";r.d(e,{A:()=>o});var i=r(71354),n=r.n(i),s=r(76314),a=r.n(s)()(n());a.push([t.id,".sharing-entry[data-v-42622a71]{display:flex;align-items:center;height:44px}.sharing-entry__summary[data-v-42622a71]{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-42622a71]{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-42622a71],.sharing-entry__summary__desc small[data-v-42622a71]{color:var(--color-text-maxcontrast)}.sharing-entry__summary__desc-unique[data-v-42622a71]{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",sourcesContent:["\n.sharing-entry {\n\tdisplay: flex;\n\talign-items: center;\n\theight: 44px;\n\t&__summary {\n\t\tpadding: 8px;\n\t\tpadding-inline-start: 10px;\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\tjustify-content: center;\n\t\talign-items: flex-start;\n\t\tflex: 1 0;\n\t\tmin-width: 0;\n\n\t\t&__desc {\n\t\t\tdisplay: inline-block;\n\t\t\tpadding-bottom: 0;\n\t\t\tline-height: 1.2em;\n\t\t\twhite-space: nowrap;\n\t\t\toverflow: hidden;\n\t\t\ttext-overflow: ellipsis;\n\n\t\t\tp,\n\t\t\tsmall {\n\t\t\t\tcolor: var(--color-text-maxcontrast);\n\t\t\t}\n\n\t\t\t&-unique {\n\t\t\t\tcolor: var(--color-text-maxcontrast);\n\t\t\t}\n\t\t}\n\t}\n\n}\n"],sourceRoot:""}]);const o=a},17816:function(t){t.exports=function(){"use strict";function t(){throw new Error("Dynamic requires are not currently supported by rollup-plugin-commonjs")}var e=function(t,e){return t(e={exports:{}},e.exports),e.exports}((function(e,r){var i;i=function(){return function e(r,i,n){function s(o,l){if(!i[o]){if(!r[o]){if(!l&&t)return t();if(a)return a(o,!0);var h=new Error("Cannot find module '"+o+"'");throw h.code="MODULE_NOT_FOUND",h}var c=i[o]={exports:{}};r[o][0].call(c.exports,(function(t){return s(r[o][1][t]||t)}),c,c.exports,e,r,i,n)}return i[o].exports}for(var a=t,o=0;o>>7-t%8&1)},put:function(t,e){for(var r=0;r>>e-r-1&1))},getLengthInBits:function(){return this.length},putBit:function(t){var e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++}},e.exports=i},{}],5:[function(t,e,r){var i=t("../utils/buffer");function n(t){if(!t||t<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=t,this.data=i.alloc(t*t),this.reservedBit=i.alloc(t*t)}n.prototype.set=function(t,e,r,i){var n=t*this.size+e;this.data[n]=r,i&&(this.reservedBit[n]=!0)},n.prototype.get=function(t,e){return this.data[t*this.size+e]},n.prototype.xor=function(t,e,r){this.data[t*this.size+e]^=r},n.prototype.isReserved=function(t,e){return this.reservedBit[t*this.size+e]},e.exports=n},{"../utils/buffer":28}],6:[function(t,e,r){var i=t("../utils/buffer"),n=t("./mode");function s(t){this.mode=n.BYTE,this.data=i.from(t)}s.getBitsLength=function(t){return 8*t},s.prototype.getLength=function(){return this.data.length},s.prototype.getBitsLength=function(){return s.getBitsLength(this.data.length)},s.prototype.write=function(t){for(var e=0,r=this.data.length;e=0&&t.bit<4},r.from=function(t,e){if(r.isValid(t))return t;try{return function(t){if("string"!=typeof t)throw new Error("Param is not a string");switch(t.toLowerCase()){case"l":case"low":return r.L;case"m":case"medium":return r.M;case"q":case"quartile":return r.Q;case"h":case"high":return r.H;default:throw new Error("Unknown EC Level: "+t)}}(t)}catch(t){return e}}},{}],9:[function(t,e,r){var i=t("./utils").getSymbolSize;r.getPositions=function(t){var e=i(t);return[[0,0],[e-7,0],[0,e-7]]}},{"./utils":21}],10:[function(t,e,r){var i=t("./utils"),n=i.getBCHDigit(1335);r.getEncodedBits=function(t,e){for(var r=t.bit<<3|e,s=r<<10;i.getBCHDigit(s)-n>=0;)s^=1335<=33088&&r<=40956)r-=33088;else{if(!(r>=57408&&r<=60351))throw new Error("Invalid SJIS character: "+this.data[e]+"\nMake sure your charset is UTF-8");r-=49472}r=192*(r>>>8&255)+(255&r),t.put(r,13)}},e.exports=s},{"./mode":14,"./utils":21}],13:[function(t,e,r){r.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};var i=3,n=3,s=40,a=10;function o(t,e,i){switch(t){case r.Patterns.PATTERN000:return(e+i)%2==0;case r.Patterns.PATTERN001:return e%2==0;case r.Patterns.PATTERN010:return i%3==0;case r.Patterns.PATTERN011:return(e+i)%3==0;case r.Patterns.PATTERN100:return(Math.floor(e/2)+Math.floor(i/3))%2==0;case r.Patterns.PATTERN101:return e*i%2+e*i%3==0;case r.Patterns.PATTERN110:return(e*i%2+e*i%3)%2==0;case r.Patterns.PATTERN111:return(e*i%3+(e+i)%2)%2==0;default:throw new Error("bad maskPattern:"+t)}}r.isValid=function(t){return null!=t&&""!==t&&!isNaN(t)&&t>=0&&t<=7},r.from=function(t){return r.isValid(t)?parseInt(t,10):void 0},r.getPenaltyN1=function(t){for(var e=t.size,r=0,n=0,s=0,a=null,o=null,l=0;l=5&&(r+=i+(n-5)),a=c,n=1),(c=t.get(h,l))===o?s++:(s>=5&&(r+=i+(s-5)),o=c,s=1)}n>=5&&(r+=i+(n-5)),s>=5&&(r+=i+(s-5))}return r},r.getPenaltyN2=function(t){for(var e=t.size,r=0,i=0;i=10&&(1488===i||93===i)&&r++,n=n<<1&2047|t.get(o,a),o>=10&&(1488===n||93===n)&&r++}return r*s},r.getPenaltyN4=function(t){for(var e=0,r=t.data.length,i=0;i=1&&e<10?t.ccBits[0]:e<27?t.ccBits[1]:t.ccBits[2]},r.getBestModeForData=function(t){return n.testNumeric(t)?r.NUMERIC:n.testAlphanumeric(t)?r.ALPHANUMERIC:n.testKanji(t)?r.KANJI:r.BYTE},r.toString=function(t){if(t&&t.id)return t.id;throw new Error("Invalid mode")},r.isValid=function(t){return t&&t.bit&&t.ccBits},r.from=function(t,e){if(r.isValid(t))return t;try{return function(t){if("string"!=typeof t)throw new Error("Param is not a string");switch(t.toLowerCase()){case"numeric":return r.NUMERIC;case"alphanumeric":return r.ALPHANUMERIC;case"kanji":return r.KANJI;case"byte":return r.BYTE;default:throw new Error("Unknown mode: "+t)}}(t)}catch(t){return e}}},{"./regex":19,"./version-check":22}],15:[function(t,e,r){var i=t("./mode");function n(t){this.mode=i.NUMERIC,this.data=t.toString()}n.getBitsLength=function(t){return 10*Math.floor(t/3)+(t%3?t%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(t){var e,r,i;for(e=0;e+3<=this.data.length;e+=3)r=this.data.substr(e,3),i=parseInt(r,10),t.put(i,10);var n=this.data.length-e;n>0&&(r=this.data.substr(e),i=parseInt(r,10),t.put(i,3*n+1))},e.exports=n},{"./mode":14}],16:[function(t,e,r){var i=t("../utils/buffer"),n=t("./galois-field");r.mul=function(t,e){for(var r=i.alloc(t.length+e.length-1),s=0;s=0;){for(var s=r[0],a=0;a>i&1),i<6?t.set(i,8,n,!0):i<8?t.set(i+1,8,n,!0):t.set(s-15+i,8,n,!0),i<8?t.set(8,s-i-1,n,!0):i<9?t.set(8,15-i-1+1,n,!0):t.set(8,15-i-1,n,!0);t.set(s-8,8,1,!0)}function _(t,e,r){var s=new a;r.forEach((function(e){s.put(e.mode.bit,4),s.put(e.getLength(),g.getCharCountIndicator(e.mode,t)),e.write(s)}));var o=8*(n.getSymbolTotalCodewords(t)-u.getTotalCodewordsCount(t,e));for(s.getLengthInBits()+4<=o&&s.put(0,4);s.getLengthInBits()%8!=0;)s.putBit(0);for(var l=(o-s.getLengthInBits())/8,h=0;h=0&&o<=6&&(0===l||6===l)||l>=0&&l<=6&&(0===o||6===o)||o>=2&&o<=4&&l>=2&&l<=4?t.set(s+o,a+l,!0,!0):t.set(s+o,a+l,!1,!0))}(v,e),function(t){for(var e=t.size,r=8;r=7&&function(t,e){for(var r,i,n,s=t.size,a=p.getEncodedBits(e),o=0;o<18;o++)r=Math.floor(o/3),i=o%3+s-8-3,n=1==(a>>o&1),t.set(r,i,n,!0),t.set(i,r,n,!0)}(v,e),function(t,e){for(var r=t.size,i=-1,n=r-1,s=7,a=0,o=r-1;o>0;o-=2)for(6===o&&o--;;){for(var l=0;l<2;l++)if(!t.isReserved(n,o-l)){var h=!1;a>>s&1)),t.set(n,o-l,h),-1==--s&&(a++,s=7)}if((n+=i)<0||r<=n){n-=i,i=-i;break}}}(v,f),isNaN(i)&&(i=c.getBestMask(v,y.bind(null,v,r))),c.applyMask(i,v),y(v,r,i),{modules:v,version:e,errorCorrectionLevel:r,maskPattern:i,segments:s}}r.create=function(t,e){if(void 0===t||""===t)throw new Error("No input text");var r,i,a=s.M;return void 0!==e&&(a=s.from(e.errorCorrectionLevel,s.M),r=p.from(e.version),i=c.from(e.maskPattern),e.toSJISFunc&&n.setToSJISFunction(e.toSJISFunc)),v(t,r,a,i)}},{"../utils/buffer":28,"./alignment-pattern":2,"./bit-buffer":4,"./bit-matrix":5,"./error-correction-code":7,"./error-correction-level":8,"./finder-pattern":9,"./format-info":10,"./mask-pattern":13,"./mode":14,"./reed-solomon-encoder":18,"./segments":20,"./utils":21,"./version":23,isarray:33}],18:[function(t,e,r){var i=t("../utils/buffer"),n=t("./polynomial"),s=t("buffer").Buffer;function a(t){this.genPoly=void 0,this.degree=t,this.degree&&this.initialize(this.degree)}a.prototype.initialize=function(t){this.degree=t,this.genPoly=n.generateECPolynomial(this.degree)},a.prototype.encode=function(t){if(!this.genPoly)throw new Error("Encoder not initialized");var e=i.alloc(this.degree),r=s.concat([t,e],t.length+this.degree),a=n.mod(r,this.genPoly),o=this.degree-a.length;if(o>0){var l=i.alloc(this.degree);return a.copy(l,o),l}return a},e.exports=a},{"../utils/buffer":28,"./polynomial":16,buffer:30}],19:[function(t,e,r){var i="[0-9]+",n="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+",s="(?:(?![A-Z0-9 $%*+\\-./:]|"+(n=n.replace(/u/g,"\\u"))+")(?:.|[\r\n]))+";r.KANJI=new RegExp(n,"g"),r.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),r.BYTE=new RegExp(s,"g"),r.NUMERIC=new RegExp(i,"g"),r.ALPHANUMERIC=new RegExp("[A-Z $%*+\\-./:]+","g");var a=new RegExp("^"+n+"$"),o=new RegExp("^"+i+"$"),l=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");r.testKanji=function(t){return a.test(t)},r.testNumeric=function(t){return o.test(t)},r.testAlphanumeric=function(t){return l.test(t)}},{}],20:[function(t,e,r){var i=t("./mode"),n=t("./numeric-data"),s=t("./alphanumeric-data"),a=t("./byte-data"),o=t("./kanji-data"),l=t("./regex"),h=t("./utils"),c=t("dijkstrajs");function u(t){return unescape(encodeURIComponent(t)).length}function d(t,e,r){for(var i,n=[];null!==(i=t.exec(r));)n.push({data:i[0],index:i.index,mode:e,length:i[0].length});return n}function p(t){var e,r,n=d(l.NUMERIC,i.NUMERIC,t),s=d(l.ALPHANUMERIC,i.ALPHANUMERIC,t);return h.isKanjiModeEnabled()?(e=d(l.BYTE,i.BYTE,t),r=d(l.KANJI,i.KANJI,t)):(e=d(l.BYTE_KANJI,i.BYTE,t),r=[]),n.concat(s,e,r).sort((function(t,e){return t.index-e.index})).map((function(t){return{data:t.data,mode:t.mode,length:t.length}}))}function f(t,e){switch(e){case i.NUMERIC:return n.getBitsLength(t);case i.ALPHANUMERIC:return s.getBitsLength(t);case i.KANJI:return o.getBitsLength(t);case i.BYTE:return a.getBitsLength(t)}}function g(t,e){var r,l=i.getBestModeForData(t);if((r=i.from(e,l))!==i.BYTE&&r.bit=0?t[t.length-1]:null;return r&&r.mode===e.mode?(t[t.length-1].data+=e.data,t):(t.push(e),t)}),[]))},r.rawSplit=function(t){return r.fromArray(p(t,h.isKanjiModeEnabled()))}},{"./alphanumeric-data":3,"./byte-data":6,"./kanji-data":12,"./mode":14,"./numeric-data":15,"./regex":19,"./utils":21,dijkstrajs:31}],21:[function(t,e,r){var i,n=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];r.getSymbolSize=function(t){if(!t)throw new Error('"version" cannot be null or undefined');if(t<1||t>40)throw new Error('"version" should be in range from 1 to 40');return 4*t+17},r.getSymbolTotalCodewords=function(t){return n[t]},r.getBCHDigit=function(t){for(var e=0;0!==t;)e++,t>>>=1;return e},r.setToSJISFunction=function(t){if("function"!=typeof t)throw new Error('"toSJISFunc" is not a valid function.');i=t},r.isKanjiModeEnabled=function(){return void 0!==i},r.toSJIS=function(t){return i(t)}},{}],22:[function(t,e,r){r.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40}},{}],23:[function(t,e,r){var i=t("./utils"),n=t("./error-correction-code"),s=t("./error-correction-level"),a=t("./mode"),o=t("./version-check"),l=t("isarray"),h=i.getBCHDigit(7973);function c(t,e){return a.getCharCountIndicator(t,e)+4}function u(t,e){var r=0;return t.forEach((function(t){var i=c(t.mode,e);r+=i+t.getBitsLength()})),r}r.from=function(t,e){return o.isValid(t)?parseInt(t,10):e},r.getCapacity=function(t,e,r){if(!o.isValid(t))throw new Error("Invalid QR Code version");void 0===r&&(r=a.BYTE);var s=8*(i.getSymbolTotalCodewords(t)-n.getTotalCodewordsCount(t,e));if(r===a.MIXED)return s;var l=s-c(r,t);switch(r){case a.NUMERIC:return Math.floor(l/10*3);case a.ALPHANUMERIC:return Math.floor(l/11*2);case a.KANJI:return Math.floor(l/13);case a.BYTE:default:return Math.floor(l/8)}},r.getBestVersionForData=function(t,e){var i,n=s.from(e,s.M);if(l(t)){if(t.length>1)return function(t,e){for(var i=1;i<=40;i++)if(u(t,i)<=r.getCapacity(i,e,a.MIXED))return i}(t,n);if(0===t.length)return 1;i=t[0]}else i=t;return function(t,e,i){for(var n=1;n<=40;n++)if(e<=r.getCapacity(n,i,t))return n}(i.mode,i.getLength(),n)},r.getEncodedBits=function(t){if(!o.isValid(t)||t<7)throw new Error("Invalid QR Code version");for(var e=t<<12;i.getBCHDigit(e)-h>=0;)e^=7973<':"",u="0&&h>0&&t[l-1]||(i+=a?s("M",h+r,.5+c+r):s("m",n,0),n=0,a=!1),h+1',d='viewBox="0 0 '+h+" "+h+'"',p=''+c+u+"\n";return"function"==typeof r&&r(null,p),p}},{"./utils":27}],27:[function(t,e,r){function i(t){if("number"==typeof t&&(t=t.toString()),"string"!=typeof t)throw new Error("Color should be defined as hex string");var e=t.slice().replace("#","").split("");if(e.length<3||5===e.length||e.length>8)throw new Error("Invalid hex color: "+t);3!==e.length&&4!==e.length||(e=Array.prototype.concat.apply([],e.map((function(t){return[t,t]})))),6===e.length&&e.push("F","F");var r=parseInt(e.join(""),16);return{r:r>>24&255,g:r>>16&255,b:r>>8&255,a:255&r,hex:"#"+e.slice(0,6).join("")}}r.getOptions=function(t){t||(t={}),t.color||(t.color={});var e=void 0===t.margin||null===t.margin||t.margin<0?4:t.margin,r=t.width&&t.width>=21?t.width:void 0,n=t.scale||4;return{width:r,scale:r?4:n,margin:e,color:{dark:i(t.color.dark||"#000000ff"),light:i(t.color.light||"#ffffffff")},type:t.type,rendererOpts:t.rendererOpts||{}}},r.getScale=function(t,e){return e.width&&e.width>=t+2*e.margin?e.width/(t+2*e.margin):e.scale},r.getImageWidth=function(t,e){var i=r.getScale(t,e);return Math.floor((t+2*e.margin)*i)},r.qrToImageData=function(t,e,i){for(var n=e.modules.size,s=e.modules.data,a=r.getScale(n,i),o=Math.floor((n+2*i.margin)*a),l=i.margin*a,h=[i.color.light,i.color.dark],c=0;c=l&&u>=l&&c=n)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+n.toString(16)+" bytes");return 0|t}function o(t,e){var r;return s.TYPED_ARRAY_SUPPORT?(r=new Uint8Array(e)).__proto__=s.prototype:(null===(r=t)&&(r=new s(e)),r.length=e),r}function l(t,e){var r=o(t,e<0?0:0|a(e));if(!s.TYPED_ARRAY_SUPPORT)for(var i=0;i55295&&r<57344){if(!n){if(r>56319){(e-=3)>-1&&s.push(239,191,189);continue}if(a+1===i){(e-=3)>-1&&s.push(239,191,189);continue}n=r;continue}if(r<56320){(e-=3)>-1&&s.push(239,191,189),n=r;continue}r=65536+(n-55296<<10|r-56320)}else n&&(e-=3)>-1&&s.push(239,191,189);if(n=null,r<128){if((e-=1)<0)break;s.push(r)}else if(r<2048){if((e-=2)<0)break;s.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;s.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;s.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return s}function u(t){return s.isBuffer(t)?t.length:"undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer)?t.byteLength:("string"!=typeof t&&(t=""+t),0===t.length?0:c(t).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(t,e,r){void 0===e||void 0===r&&"string"==typeof e?(r=this.length,e=0):isFinite(e)&&(e|=0,isFinite(r)?r|=0:r=void 0);var i=this.length-e;if((void 0===r||r>i)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");return function(t,e,r,i){return function(t,e,r,i){for(var n=0;n=e.length||n>=t.length);++n)e[n+r]=t[n];return n}(c(e,t.length-r),t,r,i)}(this,t,e,r)},s.prototype.slice=function(t,e){var r,i=this.length;if((t=~~t)<0?(t+=i)<0&&(t=0):t>i&&(t=i),(e=void 0===e?i:~~e)<0?(e+=i)<0&&(e=0):e>i&&(e=i),e=t.length&&(e=t.length),e||(e=0),i>0&&i=this.length)throw new RangeError("sourceStart out of bounds");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),t.length-e=0;--n)t[n+e]=this[n+r];else if(a<1e3||!s.TYPED_ARRAY_SUPPORT)for(n=0;n>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(n=e;n0?a-4:a;for(r=0;r>16&255,h[c++]=e>>8&255,h[c++]=255&e;return 2===o&&(e=n[t.charCodeAt(r)]<<2|n[t.charCodeAt(r+1)]>>4,h[c++]=255&e),1===o&&(e=n[t.charCodeAt(r)]<<10|n[t.charCodeAt(r+1)]<<4|n[t.charCodeAt(r+2)]>>2,h[c++]=e>>8&255,h[c++]=255&e),h},r.fromByteArray=function(t){for(var e,r=t.length,n=r%3,s=[],a=16383,o=0,l=r-n;ol?l:o+a));return 1===n?(e=t[r-1],s.push(i[e>>2]+i[e<<4&63]+"==")):2===n&&(e=(t[r-2]<<8)+t[r-1],s.push(i[e>>10]+i[e>>4&63]+i[e<<2&63]+"=")),s.join("")};for(var i=[],n=[],s="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0;o<64;++o)i[o]=a[o],n[a.charCodeAt(o)]=o;function l(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function h(t,e,r){for(var n,s=[],a=e;a>18&63]+i[o>>12&63]+i[o>>6&63]+i[63&o]);var o;return s.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},{}],30:[function(t,e,r){var i=t("base64-js"),n=t("ieee754"),s="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;r.Buffer=l,r.SlowBuffer=function(t){return+t!=t&&(t=0),l.alloc(+t)},r.INSPECT_MAX_BYTES=50;var a=2147483647;function o(t){if(t>a)throw new RangeError('The value "'+t+'" is invalid for option "size"');var e=new Uint8Array(t);return Object.setPrototypeOf(e,l.prototype),e}function l(t,e,r){if("number"==typeof t){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return u(t)}return h(t,e,r)}function h(t,e,r){if("string"==typeof t)return function(t,e){if("string"==typeof e&&""!==e||(e="utf8"),!l.isEncoding(e))throw new TypeError("Unknown encoding: "+e);var r=0|f(t,e),i=o(r),n=i.write(t,e);return n!==r&&(i=i.slice(0,n)),i}(t,e);if(ArrayBuffer.isView(t))return d(t);if(null==t)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if($(t,ArrayBuffer)||t&&$(t.buffer,ArrayBuffer))return function(t,e,r){if(e<0||t.byteLength=a)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return 0|t}function f(t,e){if(l.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||$(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);var r=t.length,i=arguments.length>2&&!0===arguments[2];if(!i&&0===r)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return F(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return U(t).length;default:if(n)return i?-1:F(t).length;e=(""+e).toLowerCase(),n=!0}}function g(t,e,r){var i=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return N(this,e,r);case"utf8":case"utf-8":return x(this,e,r);case"ascii":return I(this,e,r);case"latin1":case"binary":return D(this,e,r);case"base64":return S(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,e,r);default:if(i)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),i=!0}}function A(t,e,r){var i=t[e];t[e]=t[r],t[r]=i}function m(t,e,r,i,n){if(0===t.length)return-1;if("string"==typeof r?(i=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),H(r=+r)&&(r=n?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(n)return-1;r=t.length-1}else if(r<0){if(!n)return-1;r=0}if("string"==typeof e&&(e=l.from(e,i)),l.isBuffer(e))return 0===e.length?-1:y(t,e,r,i,n);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?n?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):y(t,[e],r,i,n);throw new TypeError("val must be string, number or Buffer")}function y(t,e,r,i,n){var s,a=1,o=t.length,l=e.length;if(void 0!==i&&("ucs2"===(i=String(i).toLowerCase())||"ucs-2"===i||"utf16le"===i||"utf-16le"===i)){if(t.length<2||e.length<2)return-1;a=2,o/=2,l/=2,r/=2}function h(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(n){var c=-1;for(s=r;so&&(r=o-l),s=r;s>=0;s--){for(var u=!0,d=0;dn&&(i=n):i=n;var s=e.length;i>s/2&&(i=s/2);for(var a=0;a>8,n=r%256,s.push(n),s.push(i);return s}(e,t.length-r),t,r,i)}function S(t,e,r){return 0===e&&r===t.length?i.fromByteArray(t):i.fromByteArray(t.slice(e,r))}function x(t,e,r){r=Math.min(t.length,r);for(var i=[],n=e;n239?4:h>223?3:h>191?2:1;if(n+u<=r)switch(u){case 1:h<128&&(c=h);break;case 2:128==(192&(s=t[n+1]))&&(l=(31&h)<<6|63&s)>127&&(c=l);break;case 3:s=t[n+1],a=t[n+2],128==(192&s)&&128==(192&a)&&(l=(15&h)<<12|(63&s)<<6|63&a)>2047&&(l<55296||l>57343)&&(c=l);break;case 4:s=t[n+1],a=t[n+2],o=t[n+3],128==(192&s)&&128==(192&a)&&128==(192&o)&&(l=(15&h)<<18|(63&s)<<12|(63&a)<<6|63&o)>65535&&l<1114112&&(c=l)}null===c?(c=65533,u=1):c>65535&&(c-=65536,i.push(c>>>10&1023|55296),c=56320|1023&c),i.push(c),n+=u}return function(t){var e=t.length;if(e<=T)return String.fromCharCode.apply(String,t);for(var r="",i=0;ie&&(t+=" ... "),""},s&&(l.prototype[s]=l.prototype.inspect),l.prototype.compare=function(t,e,r,i,n){if($(t,Uint8Array)&&(t=l.from(t,t.offset,t.byteLength)),!l.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===i&&(i=0),void 0===n&&(n=this.length),e<0||r>t.length||i<0||n>this.length)throw new RangeError("out of range index");if(i>=n&&e>=r)return 0;if(i>=n)return-1;if(e>=r)return 1;if(this===t)return 0;for(var s=(n>>>=0)-(i>>>=0),a=(r>>>=0)-(e>>>=0),o=Math.min(s,a),h=this.slice(i,n),c=t.slice(e,r),u=0;u>>=0,isFinite(r)?(r>>>=0,void 0===i&&(i="utf8")):(i=r,r=void 0)}var n=this.length-e;if((void 0===r||r>n)&&(r=n),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var s=!1;;)switch(i){case"hex":return _(this,t,e,r);case"utf8":case"utf-8":return v(this,t,e,r);case"ascii":return w(this,t,e,r);case"latin1":case"binary":return E(this,t,e,r);case"base64":return C(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return b(this,t,e,r);default:if(s)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),s=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var T=4096;function I(t,e,r){var i="";r=Math.min(t.length,r);for(var n=e;ni)&&(r=i);for(var n="",s=e;sr)throw new RangeError("Trying to access beyond buffer length")}function R(t,e,r,i,n,s){if(!l.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>n||et.length)throw new RangeError("Index out of range")}function L(t,e,r,i,n,s){if(r+i>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function B(t,e,r,i,s){return e=+e,r>>>=0,s||L(t,0,r,4),n.write(t,e,r,i,23,4),r+4}function O(t,e,r,i,s){return e=+e,r>>>=0,s||L(t,0,r,8),n.write(t,e,r,i,52,8),r+8}l.prototype.slice=function(t,e){var r=this.length;(t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e>>=0,e>>>=0,r||P(t,e,this.length);for(var i=this[t],n=1,s=0;++s>>=0,e>>>=0,r||P(t,e,this.length);for(var i=this[t+--e],n=1;e>0&&(n*=256);)i+=this[t+--e]*n;return i},l.prototype.readUInt8=function(t,e){return t>>>=0,e||P(t,1,this.length),this[t]},l.prototype.readUInt16LE=function(t,e){return t>>>=0,e||P(t,2,this.length),this[t]|this[t+1]<<8},l.prototype.readUInt16BE=function(t,e){return t>>>=0,e||P(t,2,this.length),this[t]<<8|this[t+1]},l.prototype.readUInt32LE=function(t,e){return t>>>=0,e||P(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},l.prototype.readUInt32BE=function(t,e){return t>>>=0,e||P(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},l.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||P(t,e,this.length);for(var i=this[t],n=1,s=0;++s=(n*=128)&&(i-=Math.pow(2,8*e)),i},l.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||P(t,e,this.length);for(var i=e,n=1,s=this[t+--i];i>0&&(n*=256);)s+=this[t+--i]*n;return s>=(n*=128)&&(s-=Math.pow(2,8*e)),s},l.prototype.readInt8=function(t,e){return t>>>=0,e||P(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},l.prototype.readInt16LE=function(t,e){t>>>=0,e||P(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},l.prototype.readInt16BE=function(t,e){t>>>=0,e||P(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},l.prototype.readInt32LE=function(t,e){return t>>>=0,e||P(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},l.prototype.readInt32BE=function(t,e){return t>>>=0,e||P(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},l.prototype.readFloatLE=function(t,e){return t>>>=0,e||P(t,4,this.length),n.read(this,t,!0,23,4)},l.prototype.readFloatBE=function(t,e){return t>>>=0,e||P(t,4,this.length),n.read(this,t,!1,23,4)},l.prototype.readDoubleLE=function(t,e){return t>>>=0,e||P(t,8,this.length),n.read(this,t,!0,52,8)},l.prototype.readDoubleBE=function(t,e){return t>>>=0,e||P(t,8,this.length),n.read(this,t,!1,52,8)},l.prototype.writeUIntLE=function(t,e,r,i){t=+t,e>>>=0,r>>>=0,i||R(this,t,e,r,Math.pow(2,8*r)-1,0);var n=1,s=0;for(this[e]=255&t;++s>>=0,r>>>=0,i||R(this,t,e,r,Math.pow(2,8*r)-1,0);var n=r-1,s=1;for(this[e+n]=255&t;--n>=0&&(s*=256);)this[e+n]=t/s&255;return e+r},l.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||R(this,t,e,1,255,0),this[e]=255&t,e+1},l.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||R(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},l.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||R(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},l.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||R(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},l.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||R(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},l.prototype.writeIntLE=function(t,e,r,i){if(t=+t,e>>>=0,!i){var n=Math.pow(2,8*r-1);R(this,t,e,r,n-1,-n)}var s=0,a=1,o=0;for(this[e]=255&t;++s>>=0,!i){var n=Math.pow(2,8*r-1);R(this,t,e,r,n-1,-n)}var s=r-1,a=1,o=0;for(this[e+s]=255&t;--s>=0&&(a*=256);)t<0&&0===o&&0!==this[e+s+1]&&(o=1),this[e+s]=(t/a|0)-o&255;return e+r},l.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||R(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},l.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||R(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},l.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||R(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},l.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||R(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},l.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||R(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},l.prototype.writeFloatLE=function(t,e,r){return B(this,t,e,!0,r)},l.prototype.writeFloatBE=function(t,e,r){return B(this,t,e,!1,r)},l.prototype.writeDoubleLE=function(t,e,r){return O(this,t,e,!0,r)},l.prototype.writeDoubleBE=function(t,e,r){return O(this,t,e,!1,r)},l.prototype.copy=function(t,e,r,i){if(!l.isBuffer(t))throw new TypeError("argument should be a Buffer");if(r||(r=0),i||0===i||(i=this.length),e>=t.length&&(e=t.length),e||(e=0),i>0&&i=this.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),t.length-e=0;--s)t[s+e]=this[s+r];else Uint8Array.prototype.set.call(t,this.subarray(r,i),e);return n},l.prototype.fill=function(t,e,r,i){if("string"==typeof t){if("string"==typeof e?(i=e,e=0,r=this.length):"string"==typeof r&&(i=r,r=this.length),void 0!==i&&"string"!=typeof i)throw new TypeError("encoding must be a string");if("string"==typeof i&&!l.isEncoding(i))throw new TypeError("Unknown encoding: "+i);if(1===t.length){var n=t.charCodeAt(0);("utf8"===i&&n<128||"latin1"===i)&&(t=n)}}else"number"==typeof t?t&=255:"boolean"==typeof t&&(t=Number(t));if(e<0||this.length>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(s=e;s55295&&r<57344){if(!n){if(r>56319){(e-=3)>-1&&s.push(239,191,189);continue}if(a+1===i){(e-=3)>-1&&s.push(239,191,189);continue}n=r;continue}if(r<56320){(e-=3)>-1&&s.push(239,191,189),n=r;continue}r=65536+(n-55296<<10|r-56320)}else n&&(e-=3)>-1&&s.push(239,191,189);if(n=null,r<128){if((e-=1)<0)break;s.push(r)}else if(r<2048){if((e-=2)<0)break;s.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;s.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;s.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return s}function U(t){return i.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(M,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function V(t,e,r,i){for(var n=0;n=e.length||n>=t.length);++n)e[n+r]=t[n];return n}function $(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function H(t){return t!=t}var q=function(){for(var t="0123456789abcdef",e=new Array(256),r=0;r<16;++r)for(var i=16*r,n=0;n<16;++n)e[i+n]=t[r]+t[n];return e}()},{"base64-js":29,ieee754:32}],31:[function(t,e,r){var i={single_source_shortest_paths:function(t,e,r){var n={},s={};s[e]=0;var a,o,l,h,c,u,d,p=i.PriorityQueue.make();for(p.push(e,0);!p.empty();)for(l in o=(a=p.pop()).value,h=a.cost,c=t[o]||{})c.hasOwnProperty(l)&&(u=h+c[l],d=s[l],(void 0===s[l]||d>u)&&(s[l]=u,p.push(l,u),n[l]=o));if(void 0!==r&&void 0===s[r]){var f=["Could not find a path from ",e," to ",r,"."].join("");throw new Error(f)}return n},extract_shortest_path_from_predecessor_list:function(t,e){for(var r=[],i=e;i;)r.push(i),t[i],i=t[i];return r.reverse(),r},find_path:function(t,e,r){var n=i.single_source_shortest_paths(t,e,r);return i.extract_shortest_path_from_predecessor_list(n,r)},PriorityQueue:{make:function(t){var e,r=i.PriorityQueue,n={};for(e in t=t||{},r)r.hasOwnProperty(e)&&(n[e]=r[e]);return n.queue=[],n.sorter=t.sorter||r.default_sorter,n},default_sorter:function(t,e){return t.cost-e.cost},push:function(t,e){var r={value:t,cost:e};this.queue.push(r),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}};void 0!==e&&(e.exports=i)},{}],32:[function(t,e,r){r.read=function(t,e,r,i,n){var s,a,o=8*n-i-1,l=(1<>1,c=-7,u=r?n-1:0,d=r?-1:1,p=t[e+u];for(u+=d,s=p&(1<<-c)-1,p>>=-c,c+=o;c>0;s=256*s+t[e+u],u+=d,c-=8);for(a=s&(1<<-c)-1,s>>=-c,c+=i;c>0;a=256*a+t[e+u],u+=d,c-=8);if(0===s)s=1-h;else{if(s===l)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,i),s-=h}return(p?-1:1)*a*Math.pow(2,s-i)},r.write=function(t,e,r,i,n,s){var a,o,l,h=8*s-n-1,c=(1<>1,d=23===n?Math.pow(2,-24)-Math.pow(2,-77):0,p=i?0:s-1,f=i?1:-1,g=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(o=isNaN(e)?1:0,a=c):(a=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-a))<1&&(a--,l*=2),(e+=a+u>=1?d/l:d*Math.pow(2,1-u))*l>=2&&(a++,l/=2),a+u>=c?(o=0,a=c):a+u>=1?(o=(e*l-1)*Math.pow(2,n),a+=u):(o=e*Math.pow(2,u-1)*Math.pow(2,n),a=0));n>=8;t[r+p]=255&o,p+=f,o/=256,n-=8);for(a=a<0;t[r+p]=255&a,p+=f,a/=256,h-=8);t[r+p-f]|=128*g}},{}],33:[function(t,e,r){var i={}.toString;e.exports=Array.isArray||function(t){return"[object Array]"==i.call(t)}},{}]},{},[24])(24)},e.exports=i()}));return{name:"qrcode",props:{value:null,options:Object,tag:{type:String,default:"canvas"}},render:function(t){return t(this.tag,this.$slots.default)},watch:{$props:{deep:!0,immediate:!0,handler:function(){this.$el&&this.generate()}}},methods:{generate:function(){var t=this,r=this.options,i=this.tag,n=String(this.value);"canvas"===i?e.toCanvas(this.$el,n,r,(function(t){if(t)throw t})):"img"===i?e.toDataURL(n,r,(function(e,r){if(e)throw e;t.$el.src=r})):e.toString(n,r,(function(e,r){if(e)throw e;t.$el.innerHTML=r}))}},mounted:function(){this.generate()}}}()},26162:(t,e,r)=>{"use strict";r.d(e,{A:()=>o});var i=r(71354),n=r.n(i),s=r(76314),a=r.n(s)()(n());a.push([t.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",sourcesContent:['\n.sharing-search {\n\tdisplay: flex;\n\tflex-direction: column;\n\tmargin-bottom: 4px;\n\n\tlabel[for="sharing-search-input"] {\n\t\tmargin-bottom: 2px;\n\t}\n\n\t&__input {\n\t\twidth: 100%;\n\t\tmargin: 10px 0;\n\t}\n}\n\n.vs__dropdown-menu {\n\t// properly style the lookup entry\n\tspan[lookup] {\n\t\t.avatardiv {\n\t\t\tbackground-image: var(--icon-search-white);\n\t\t\tbackground-repeat: no-repeat;\n\t\t\tbackground-position: center;\n\t\t\tbackground-color: var(--color-text-maxcontrast) !important;\n\t\t\t.avatardiv__initials-wrapper {\n\t\t\t\tdisplay: none;\n\t\t\t}\n\t\t}\n\t}\n}\n'],sourceRoot:""}]);const o=a},27514:t=>{"use strict";t.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"},27518:t=>{"use strict";t.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"},30951:(e,r,i)=>{"use strict";i.r(r),i.d(r,{default:()=>Ze});var n=i(21777),s=i(87485),a=i(35810),o=i(32981),l=i(63814),h=i(77905),c=i(41944),u=i(97012),d=i(51855),p=i(48718),f=i(41423),g=i(65043),A=i(51651);class m{constructor(){(function(t,e,r){(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r})(this,"_capabilities",void 0),this._capabilities=(0,s.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||{}}get allowCustomTokens(){return this._capabilities?.files_sharing?.public?.custom_tokens}get showFederatedSharesAsInternal(){return(0,o.C)("files_sharing","showFederatedSharesAsInternal",!1)}get showFederatedSharesToTrustedServersAsInternal(){return(0,o.C)("files_sharing","showFederatedSharesToTrustedServersAsInternal",!1)}}const y=(0,i(35947).YK)().setApp("files_sharing").detectUser().build();class _{constructor(t){if(function(t,e,r){(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r}(this,"_share",void 0),t.ocs&&t.ocs.data&&t.ocs.data[0]&&(t=t.ocs.data[0]),"string"==typeof t.id&&(t.id=Number.parseInt(t.id)),t.hide_download=!!t.hide_download,t.mail_send=!!t.mail_send,t.attributes&&"string"==typeof t.attributes)try{t.attributes=JSON.parse(t.attributes)}catch(e){console.warn("Could not parse share attributes returned by server",t.attributes)}t.attributes=t.attributes??[],this._share=t}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(t){this._share.permissions=t}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(t){this._share.expiration=t}get token(){return this._share.token}set token(t){this._share.token=t}get note(){return this._share.note}set note(t){this._share.note=t}get label(){return this._share.label??""}set label(t){this._share.label=t}get mailSend(){return!0===this._share.mail_send}get hideDownload(){return!0===this._share.hide_download||void 0!==this.attributes.find?.((t=>{let{scope:e,key:r,value:i}=t;return"permissions"===e&&"download"===r&&!i}))}set hideDownload(t){if(!t){const t=this.attributes.find((t=>{let{key:e,scope:r}=t;return"download"===e&&"permissions"===r}));t&&(t.value=!0)}this._share.hide_download=!0===t}get password(){return this._share.password}set password(t){this._share.password=t}get passwordExpirationTime(){return this._share.password_expiration_time}set passwordExpirationTime(t){this._share.password_expiration_time=t}get sendPasswordByTalk(){return this._share.send_password_by_talk}set sendPasswordByTalk(t){this._share.send_password_by_talk=t}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((t=>"permissions"===t.scope&&"download"===t.key&&!1===t.value))}get isFileRequest(){return function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"[]";const e=t=>"fileRequest"===t.scope&&"enabled"===t.key&&!0===t.value;try{return JSON.parse(t).some(e)}catch(t){return y.error("Error while parsing share attributes",{error:t}),!1}}(JSON.stringify(this.attributes))}set hasDownloadPermission(t){this.setAttribute("permissions","download",!!t)}setAttribute(t,e,r){const i={scope:t,key:e,value:r};for(const t in this._share.attributes){const e=this._share.attributes[t];if(e.scope===i.scope&&e.key===i.key)return void this._share.attributes.splice(t,1,i)}this._share.attributes.push(i)}get canEdit(){return!0===this._share.can_edit}get canDelete(){return!0===this._share.can_delete}get viaFileid(){return this._share.via_fileid}get viaPath(){return this._share.via_path}get parent(){return this._share.parent}get storageId(){return this._share.storage_id}get storage(){return this._share.storage}get itemSource(){return this._share.item_source}get status(){return this._share.status}get isTrustedServer(){return!!this._share.is_trusted_server}}var v=i(85168),w=i(57505),E=i(54373),C=i(31773),b=i(24764);const S={name:"SharingEntrySimple",components:{NcActions:b.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 x=i(85072),T=i.n(x),I=i(97825),D=i.n(I),N=i(77659),k=i.n(N),P=i(55056),R=i.n(P),L=i(10540),B=i.n(L),O=i(41113),M=i.n(O),F=i(43570),U={};U.styleTagTransform=M(),U.setAttributes=R(),U.insert=k().bind(null,"head"),U.domAPI=D(),U.insertStyleElement=B(),T()(F.A,U),F.A&&F.A.locals&&F.A.locals;var V=i(14486);const $=(0,V.A)(S,(function(){var t=this,e=t._self._c;return e("li",{staticClass:"sharing-entry"},[t._t("avatar"),t._v(" "),e("div",{staticClass:"sharing-entry__desc"},[e("span",{staticClass:"sharing-entry__title"},[t._v(t._s(t.title))]),t._v(" "),t.subtitle?e("p",[t._v("\n\t\t\t"+t._s(t.subtitle)+"\n\t\t")]):t._e()]),t._v(" "),t.$slots.default?e("NcActions",{ref:"actionsComponent",staticClass:"sharing-entry__actions",attrs:{"menu-align":"right","aria-expanded":t.ariaExpandedValue}},[t._t("default")],2):t._e()],2)}),[],!1,null,"44339fa4",null).exports,H={name:"SharingEntryInternal",components:{NcActionButton:w.A,SharingEntrySimple:$,CheckIcon:E.A,ClipboardIcon:C.A},props:{fileInfo:{type:Object,default:()=>{},required:!0}},data:()=>({copied:!1,copySuccess:!1}),computed:{internalLink(){return window.location.protocol+"//"+window.location.host+(0,l.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,v.Te)(t("files_sharing","Link copied")),this.$refs.shareEntrySimple.$refs.actionsComponent.$el.focus(),this.copySuccess=!0,this.copied=!0}catch(t){this.copySuccess=!1,this.copied=!0,console.error(t)}finally{setTimeout((()=>{this.copySuccess=!1,this.copied=!1}),4e3)}}}};var q=i(38779),G={};G.styleTagTransform=M(),G.setAttributes=R(),G.insert=k().bind(null,"head"),G.domAPI=D(),G.insertStyleElement=B(),T()(q.A,G),q.A&&q.A.locals&&q.A.locals;const z=(0,V.A)(H,(function(){var t=this,e=t._self._c;return e("ul",[e("SharingEntrySimple",{ref:"shareEntrySimple",staticClass:"sharing-entry__internal",attrs:{title:t.t("files_sharing","Internal link"),subtitle:t.internalLinkSubtitle},scopedSlots:t._u([{key:"avatar",fn:function(){return[e("div",{staticClass:"avatar-external icon-external-white"})]},proxy:!0}])},[t._v(" "),e("NcActionButton",{attrs:{title:t.copyLinkTooltip,"aria-label":t.copyLinkTooltip},on:{click:t.copyLink},scopedSlots:t._u([{key:"icon",fn:function(){return[t.copied&&t.copySuccess?e("CheckIcon",{staticClass:"icon-checkmark-color",attrs:{size:20}}):e("ClipboardIcon",{attrs:{size:20}})]},proxy:!0}])})],1)],1)}),[],!1,null,"57874406",null).exports;var j=i(17334),W=i.n(j),Y=i(67607),X=(i(48318),i(61338));const Q=(0,l.KT)("apps/files_sharing/api/v1/shares"),K={methods:{async createShare(e){let{path:r,permissions:i,shareType:n,shareWith:s,publicUpload:a,password:o,sendPasswordByTalk:l,expireDate:h,label:c,note:u,attributes:d}=e;try{const t=await g.Ay.post(Q,{path:r,permissions:i,shareType:n,shareWith:s,publicUpload:a,password:o,sendPasswordByTalk:l,expireDate:h,label:c,note:u,attributes:d});if(!t?.data?.ocs)throw t;const e=new _(t.data.ocs.data);return(0,X.Ic)("files_sharing:share:created",{share:e}),e}catch(e){console.error("Error while creating share",e);const r=e?.response?.data?.ocs?.meta?.message;throw(0,v.Qg)(r?t("files_sharing","Error creating the share: {errorMessage}",{errorMessage:r}):t("files_sharing","Error creating the share"),{type:"error"}),e}},async deleteShare(e){try{const t=await g.Ay.delete(Q+`/${e}`);if(!t?.data?.ocs)throw t;return(0,X.Ic)("files_sharing:share:deleted",{id:e}),!0}catch(e){console.error("Error while deleting share",e);const r=e?.response?.data?.ocs?.meta?.message;throw OC.Notification.showTemporary(r?t("files_sharing","Error deleting the share: {errorMessage}",{errorMessage:r}):t("files_sharing","Error deleting the share"),{type:"error"}),e}},async updateShare(e,r){try{const t=await g.Ay.put(Q+`/${e}`,r);if((0,X.Ic)("files_sharing:share:updated",{id:e}),t?.data?.ocs)return t.data.ocs.data;throw t}catch(e){if(console.error("Error while updating share",e),400!==e.response.status){const r=e?.response?.data?.ocs?.meta?.message;OC.Notification.showTemporary(r?t("files_sharing","Error updating the share: {errorMessage}",{errorMessage:r}):t("files_sharing","Error updating the share"),{type:"error"})}const r=e.response.data.ocs.meta.message;throw new Error(r)}}}},J={NONE:0,READ:1,UPDATE:2,CREATE:4,DELETE:8,SHARE:16},Z={READ_ONLY:J.READ,UPLOAD_AND_UPDATE:J.READ|J.UPDATE|J.CREATE|J.DELETE,FILE_DROP:J.CREATE,ALL:J.UPDATE|J.CREATE|J.READ|J.DELETE|J.SHARE,ALL_FILE:J.UPDATE|J.READ|J.SHARE};const tt={methods:{async openSharingDetails(t){let e={};if(t.handler){const r={};this.suggestions&&(r.suggestions=this.suggestions,r.fileInfo=this.fileInfo,r.query=this.query);const i=await t.handler(r);e=this.mapShareRequestToShareObject(i)}else e=this.mapShareRequestToShareObject(t);if("dir"!==this.fileInfo.type){const t=e.permissions,r=t&~J.CREATE&~J.DELETE;t!==r&&(y.debug("Removed create/delete permissions from file share (only valid for folders)"),e.permissions=r)}const r={fileInfo:this.fileInfo,share:e};this.$emit("open-sharing-details",r)},openShareDetailsForCustomSettings(t){t.setCustomPermissions=!0,this.openSharingDetails(t)},mapShareRequestToShareObject(t){if(t.id)return t;const e={attributes:[{value:!0,key:"download",scope:"permissions"}],hideDownload:!1,share_type:t.shareType,share_with:t.shareWith,is_no_user:t.isNoUser,user:t.shareWith,share_with_displayname:t.displayName,subtitle:t.subtitle,permissions:t.permissions??(new m).defaultPermissions,expiration:""};return new _(e)}}},et={name:"SharingInput",components:{NcSelect:Y.A},mixins:[K,tt],props:{shares:{type:Array,default:()=>[],required:!0},linkShares:{type:Array,default:()=>[],required:!0},fileInfo:{type:Object,default:()=>{},required:!0},reshare:{type:_,default:null},canReshare:{type:Boolean,required:!0},isExternal:{type:Boolean,default:!1},placeholder:{type:String,default:""}},setup:()=>({shareInputId:`share-input-${Math.random().toString(36).slice(2,7)}`}),data:()=>({config:new m,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?this.placeholder?this.placeholder: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.isExternal||this.getRecommendations()},methods:{onSelected(t){this.value=null,this.openSharingDetails(t)},async asyncFind(t){this.query=t.trim(),this.isValidQuery&&(this.loading=!0,await this.debounceGetSuggestions(t))},async getSuggestions(e){let r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.loading=!0,!0===(0,s.F)().files_sharing.sharee.query_lookup_default&&(r=!0);const i=[h.I.Remote,h.I.RemoteGroup],n=[],a=this.config.showFederatedSharesAsInternal||this.config.showFederatedSharesToTrustedServersAsInternal,o=!this.isExternal&&a||this.isExternal&&!a||this.isExternal&&this.config.showFederatedSharesToTrustedServersAsInternal;this.isExternal?!0===(0,s.F)().files_sharing.public.enabled&&n.push(h.I.Email):n.push(h.I.User,h.I.Group,h.I.Team,h.I.Room,h.I.Guest,h.I.Deck,h.I.ScienceMesh),o&&n.push(...i);let c=null;try{c=await g.Ay.get((0,l.KT)("apps/files_sharing/api/v1/sharees"),{params:{format:"json",itemType:"dir"===this.fileInfo.type?"folder":"file",search:e,lookup:r,perPage:this.config.maxAutocompleteResults,shareType:n}})}catch(t){return void console.error("Error fetching suggestions",t)}const u=c.data.ocs.data,d=c.data.ocs.data.exact;u.exact=[];const p=Object.values(d).reduce(((t,e)=>t.concat(e)),[]),f=Object.values(u).reduce(((t,e)=>t.concat(e)),[]),A=this.filterOutExistingShares(p).map((t=>this.formatForMultiselect(t))).sort(((t,e)=>t.shareType-e.shareType)),m=this.filterOutExistingShares(f).map((t=>this.formatForMultiselect(t))).sort(((t,e)=>t.shareType-e.shareType)),y=[];u.lookupEnabled&&!r&&y.push({id:"global-lookup",isNoUser:!0,displayName:t("files_sharing","Search globally"),lookup:!0});const _=this.externalResults.filter((t=>!t.condition||t.condition(this))),v=A.concat(m).concat(_).concat(y),w=v.reduce(((t,e)=>e.displayName?(t[e.displayName]||(t[e.displayName]=0),t[e.displayName]++,t):t),{});this.suggestions=v.map((t=>w[t.displayName]>1&&!t.desc?{...t,desc:t.shareWithDisplayNameUnique}:t)),this.loading=!1,console.info("suggestions",this.suggestions)},debounceGetSuggestions:W()((function(){this.getSuggestions(...arguments)}),300),async getRecommendations(){this.loading=!0;let t=null;try{t=await g.Ay.get((0,l.KT)("apps/files_sharing/api/v1/sharees_recommended"),{params:{format:"json",itemType:this.fileInfo.type}})}catch(t){return void console.error("Error fetching recommendations",t)}const e=this.externalResults.filter((t=>!t.condition||t.condition(this))),r=Object.values(t.data.ocs.data.exact).reduce(((t,e)=>t.concat(e)),[]);this.recommendations=this.filterOutExistingShares(r).map((t=>this.formatForMultiselect(t))).concat(e),this.loading=!1,console.info("recommendations",this.recommendations)},filterOutExistingShares(t){return t.reduce(((t,e)=>{if("object"!=typeof e)return t;try{if(e.value.shareType===h.I.User){if(e.value.shareWith===(0,n.HW)().uid)return t;if(this.reshare&&e.value.shareWith===this.reshare.owner)return t}if(e.value.shareType===h.I.Email){if(!this.isExternal)return t;if(-1!==this.linkShares.map((t=>t.shareWith)).indexOf(e.value.shareWith.trim()))return t}else{const r=this.shares.reduce(((t,e)=>(t[e.shareWith]=e.type,t)),{}),i=e.value.shareWith.trim();if(i in r&&r[i]===e.value.shareType)return t}t.push(e)}catch{return t}return t}),[])},shareTypeToIcon(e){switch(e){case h.I.Guest:return{icon:"icon-user",iconTitle:t("files_sharing","Guest")};case h.I.RemoteGroup:case h.I.Group:return{icon:"icon-group",iconTitle:t("files_sharing","Group")};case h.I.Email:return{icon:"icon-mail",iconTitle:t("files_sharing","Email")};case h.I.Team:return{icon:"icon-teams",iconTitle:t("files_sharing","Team")};case h.I.Room:return{icon:"icon-room",iconTitle:t("files_sharing","Talk conversation")};case h.I.Deck:return{icon:"icon-deck",iconTitle:t("files_sharing","Deck board")};case h.I.Sciencemesh:return{icon:"icon-sciencemesh",iconTitle:t("files_sharing","ScienceMesh")};default:return{}}},formatForMultiselect(e){let r;return r=e.value.shareType===h.I.User&&this.config.shouldAlwaysShowUnique?e.shareWithDisplayNameUnique??"":e.value.shareType!==h.I.Remote&&e.value.shareType!==h.I.RemoteGroup||!e.value.server?e.value.shareType===h.I.Email?e.value.shareWith:e.shareWithDescription??"":t("files_sharing","on {server}",{server:e.value.server}),{shareWith:e.value.shareWith,shareType:e.value.shareType,user:e.uuid||e.value.shareWith,isNoUser:e.value.shareType!==h.I.User,displayName:e.name||e.label,subname:r,shareWithDisplayNameUnique:e.shareWithDisplayNameUnique||"",...this.shareTypeToIcon(e.value.shareType)}}}};var rt=i(26162),it={};it.styleTagTransform=M(),it.setAttributes=R(),it.insert=k().bind(null,"head"),it.domAPI=D(),it.insertStyleElement=B(),T()(rt.A,it),rt.A&&rt.A.locals&&rt.A.locals;const nt=(0,V.A)(et,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"sharing-search"},[e("label",{staticClass:"hidden-visually",attrs:{for:t.shareInputId}},[t._v("\n\t\t"+t._s(t.isExternal?t.t("files_sharing","Enter external recipients"):t.t("files_sharing","Search for internal recipients"))+"\n\t")]),t._v(" "),e("NcSelect",{ref:"select",staticClass:"sharing-search__input",attrs:{"input-id":t.shareInputId,disabled:!t.canReshare,loading:t.loading,filterable:!1,placeholder:t.inputPlaceholder,"clear-search-on-blur":()=>!1,"user-select":!0,options:t.options,"label-outside":!0},on:{search:t.asyncFind,"option:selected":t.onSelected},scopedSlots:t._u([{key:"no-options",fn:function(e){let{search:r}=e;return[t._v("\n\t\t\t"+t._s(r?t.noResultText:t.placeholder)+"\n\t\t")]}}]),model:{value:t.value,callback:function(e){t.value=e},expression:"value"}})],1)}),[],!1,null,null,null).exports;var st=i(71225),at=i(72298),ot=i(55925),lt=i(49264),ht=i(53334);const ct=new m;async function ut(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(ct.passwordPolicy.api&&ct.passwordPolicy.api.generate)try{const e=await g.Ay.get(ct.passwordPolicy.api.generate);if(e.data.ocs.data.password)return t&&(0,v.Te)((0,ht.Tl)("files_sharing","Password created successfully")),e.data.ocs.data.password}catch(e){console.info("Error generating password from password_policy",e),t&&(0,v.Qg)((0,ht.Tl)("files_sharing","Error generating password from password policy"))}const e=new Uint8Array(10),r=52/255;!function(t){if(self?.crypto?.getRandomValues)return void self.crypto.getRandomValues(t);let e=t.length;for(;e--;)t[e]=Math.floor(256*Math.random())}(e);let i="";for(let t=0;t{},required:!0},share:{type:_,default:null},isUnique:{type:Boolean,default:!0}},data(){return{config:new m,node:null,ShareType:h.I,errors:{},loading:!1,saving:!1,open:!1,updateQueue:new lt.A({concurrency:1}),reactiveState:this.share?.state}},computed:{path(){return(this.fileInfo.path+"/"+this.fileInfo.name).replace("//","/")},hasNote:{get(){return""!==this.share.note},set(t){this.share.note=t?null:""}},dateTomorrow:()=>new Date((new Date).setDate((new Date).getDate()+1)),lang(){const t=window.dayNamesShort?window.dayNamesShort:["Sun.","Mon.","Tue.","Wed.","Thu.","Fri.","Sat."],e=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:e,weekdaysMin:t,weekdaysShort:t},monthFormat:"MMM"}},isNewShare(){return!this.share.id},isFolder(){return"dir"===this.fileInfo.type},isPublicShare(){const t=this.share.shareType??this.share.type;return[h.I.Link,h.I.Email].includes(t)},isRemoteShare(){return this.share.type===h.I.RemoteGroup||this.share.type===h.I.Remote},isShareOwner(){return this.share&&this.share.owner===(0,n.HW)().uid},isExpiryDateEnforced(){return this.isPublicShare?this.config.isDefaultExpireDateEnforced:this.isRemoteShare?this.config.isDefaultRemoteExpireDateEnforced:this.config.isDefaultInternalExpireDateEnforced},hasCustomPermissions(){return![Z.ALL,Z.READ_ONLY,Z.FILE_DROP].includes(this.share.permissions)},maxExpirationDateEnforced(){return this.isExpiryDateEnforced?this.isPublicShare?this.config.defaultExpirationDate:this.isRemoteShare?this.config.defaultRemoteExpirationDateString:this.config.defaultInternalExpirationDate:null},isPasswordProtected:{get(){return this.config.enforcePasswordForPublicLink||""!==this.share.password||void 0!==this.share.newPassword},async set(t){t?this.$set(this.share,"newPassword",await ut(!0)):(this.share.password="",this.$delete(this.share,"newPassword"))}}},methods:{async getNode(){const t={path:this.path};try{this.node=await(async t=>{const e=(0,dt.l)(),r=await pt.stat(`${(0,dt.g)()}${t}`,{details:!0,data:e});return(0,dt.r)(r.data)})(t.path),y.info("Fetched node:",{node:this.node})}catch(t){y.error("Error:",t)}},checkShare:t=>(!t.password||"string"==typeof t.password&&""!==t.password.trim())&&!(t.expirationDate&&!t.expirationDate.isValid()),formatDateToString:t=>new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate())).toISOString().split("T")[0],onExpirationChange(t){if(!t)return this.share.expireDate=null,void this.$set(this.share,"expireDate",null);const e=t instanceof Date?t:new Date(t);this.share.expireDate=this.formatDateToString(e)},onNoteChange(t){this.$set(this.share,"newNote",t.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),y.debug("Share deleted",{shareId: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,v.Te)(e),this.$emit("remove:share",this.share),await this.getNode(),(0,X.Ic)("files:node:updated",this.node)}catch(t){this.open=!0}finally{this.loading=!1}},queueUpdate(){for(var e=arguments.length,r=new Array(e),i=0;i{this.saving=!0,this.errors={};try{const t=await this.updateShare(this.share.id,e);r.includes("password")&&(this.share.password=this.share.newPassword??"",this.$delete(this.share,"newPassword"),this.share.passwordExpirationTime=t.password_expiration_time);for(const t of r)this.$delete(this.errors,t);(0,v.Te)(this.updateSuccessMessage(r))}catch(e){y.error("Could not update share",{error:e,share:this.share,propertyNames:r});const{message:i}=e;if(i&&""!==i){for(const t of r)this.onSyncError(t,i);(0,v.Qg)(i)}else(0,v.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(t,e){switch("password"===t&&this.share.newPassword&&(this.share.newPassword===this.share.password&&(this.share.password=""),this.$delete(this.share,"newPassword")),this.open=!0,t){case"password":case"pending":case"expireDate":case"label":case"note":{this.$set(this.errors,t,e);let r=this.$refs[t];if(r){r.$el&&(r=r.$el);const t=r.querySelector(".focusable");t&&t.focus()}break}case"sendPasswordByTalk":this.$set(this.errors,t,e),this.share.sendPasswordByTalk=!this.share.sendPasswordByTalk}},debounceQueueUpdate:W()((function(t){this.queueUpdate(t)}),500)}},gt={name:"SharingEntryInherited",components:{NcActionButton:w.A,NcActionLink:at.A,NcActionText:ot.A,NcAvatar:c.A,SharingEntrySimple:$},mixins:[ft],props:{share:{type:_,required:!0}},computed:{viaFileTargetUrl(){return(0,l.Jv)("/f/{fileid}",{fileid:this.share.viaFileid})},viaFolderName(){return(0,st.P8)(this.share.viaPath)}}};var At=i(59879),mt={};mt.styleTagTransform=M(),mt.setAttributes=R(),mt.insert=k().bind(null,"head"),mt.domAPI=D(),mt.insertStyleElement=B(),T()(At.A,mt),At.A&&At.A.locals&&At.A.locals;const yt=(0,V.A)(gt,(function(){var t=this,e=t._self._c;return e("SharingEntrySimple",{key:t.share.id,staticClass:"sharing-entry__inherited",attrs:{title:t.share.shareWithDisplayName},scopedSlots:t._u([{key:"avatar",fn:function(){return[e("NcAvatar",{staticClass:"sharing-entry__avatar",attrs:{user:t.share.shareWith,"display-name":t.share.shareWithDisplayName}})]},proxy:!0}])},[t._v(" "),e("NcActionText",{attrs:{icon:"icon-user"}},[t._v("\n\t\t"+t._s(t.t("files_sharing","Added by {initiator}",{initiator:t.share.ownerDisplayName}))+"\n\t")]),t._v(" "),t.share.viaPath&&t.share.viaFileid?e("NcActionLink",{attrs:{icon:"icon-folder",href:t.viaFileTargetUrl}},[t._v("\n\t\t"+t._s(t.t("files_sharing","Via “{folder}”",{folder:t.viaFolderName}))+"\n\t")]):t._e(),t._v(" "),t.share.canDelete?e("NcActionButton",{attrs:{icon:"icon-close"},on:{click:function(e){return e.preventDefault(),t.onDelete.apply(null,arguments)}}},[t._v("\n\t\t"+t._s(t.t("files_sharing","Unshare"))+"\n\t")]):t._e()],1)}),[],!1,null,"fe8ed59e",null).exports,_t={name:"SharingInherited",components:{NcActionButton:w.A,SharingEntryInherited:yt,SharingEntrySimple:$},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 t=(0,l.KT)("apps/files_sharing/api/v1/shares/inherited?format=json&path={path}",{path:this.fullPath}),e=await g.Ay.get(t);this.shares=e.data.ocs.data.map((t=>new _(t))).sort(((t,e)=>e.createdTime-t.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(t){const e=this.shares.findIndex((e=>e===t));this.shares.splice(e,1)}}};var vt=i(56467),wt={};wt.styleTagTransform=M(),wt.setAttributes=R(),wt.insert=k().bind(null,"head"),wt.domAPI=D(),wt.insertStyleElement=B(),T()(vt.A,wt),vt.A&&vt.A.locals&&vt.A.locals;const Et=(0,V.A)(_t,(function(){var t=this,e=t._self._c;return t.shares.length?e("ul",{attrs:{id:"sharing-inherited-shares"}},[e("SharingEntrySimple",{staticClass:"sharing-entry__inherited",attrs:{title:t.mainTitle,subtitle:t.subTitle,"aria-expanded":t.showInheritedShares},scopedSlots:t._u([{key:"avatar",fn:function(){return[e("div",{staticClass:"avatar-shared icon-more-white"})]},proxy:!0}],null,!1,1184892072)},[t._v(" "),e("NcActionButton",{attrs:{icon:t.showInheritedSharesIcon,"aria-label":t.toggleTooltip,title:t.toggleTooltip},on:{click:function(e){return e.preventDefault(),e.stopPropagation(),t.toggleInheritedShares.apply(null,arguments)}}})],1),t._v(" "),t._l(t.shares,(function(r){return e("SharingEntryInherited",{key:r.id,attrs:{"file-info":t.fileInfo,share:r},on:{"remove:share":t.removeShare}})}))],2):t._e()}),[],!1,null,"a6cc72e6",null).exports;var Ct=i(17816),bt=i.n(Ct),St=i(97691),xt=i(44131),Tt=i(15502),It=i(94219);const Dt={name:"TuneIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},Nt=(0,V.A)(Dt,(function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon tune-icon",attrs:{"aria-hidden":t.title?null:"true","aria-label":t.title,role:"img"},on:{click:function(e){return t.$emit("click",e)}}},"span",t.$attrs,!1),[e("svg",{staticClass:"material-design-icon__svg",attrs:{fill:t.fillColor,width:t.size,height:t.size,viewBox:"0 0 24 24"}},[e("path",{attrs:{d:"M3,17V19H9V17H3M3,5V7H13V5H3M13,21V19H21V17H13V15H11V21H13M7,9V11H3V13H7V15H9V9H7M21,13V11H11V13H21M15,9H17V7H21V5H17V3H15V9Z"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])}),[],!1,null,null,null).exports,kt={name:"CalendarBlankOutlineIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},Pt=(0,V.A)(kt,(function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon calendar-blank-outline-icon",attrs:{"aria-hidden":t.title?null:"true","aria-label":t.title,role:"img"},on:{click:function(e){return t.$emit("click",e)}}},"span",t.$attrs,!1),[e("svg",{staticClass:"material-design-icon__svg",attrs:{fill:t.fillColor,width:t.size,height:t.size,viewBox:"0 0 24 24"}},[e("path",{attrs:{d:"M19 3H18V1H16V3H8V1H6V3H5C3.89 3 3 3.9 3 5V19C3 20.11 3.9 21 5 21H19C20.11 21 21 20.11 21 19V5C21 3.9 20.11 3 19 3M19 19H5V9H19V19M19 7H5V5H19V7Z"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])}),[],!1,null,null,null).exports,Rt={name:"QrcodeIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},Lt=(0,V.A)(Rt,(function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon qrcode-icon",attrs:{"aria-hidden":t.title?null:"true","aria-label":t.title,role:"img"},on:{click:function(e){return t.$emit("click",e)}}},"span",t.$attrs,!1),[e("svg",{staticClass:"material-design-icon__svg",attrs:{fill:t.fillColor,width:t.size,height:t.size,viewBox:"0 0 24 24"}},[e("path",{attrs:{d:"M3,11H5V13H3V11M11,5H13V9H11V5M9,11H13V15H11V13H9V11M15,11H17V13H19V11H21V13H19V15H21V19H19V21H17V19H13V21H11V17H15V15H17V13H15V11M19,19V15H17V19H19M15,3H21V9H15V3M17,5V7H19V5H17M3,3H9V9H3V3M5,5V7H7V5H5M3,15H9V21H3V15M5,17V19H7V17H5Z"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])}),[],!1,null,null,null).exports,Bt={name:"ExclamationIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},Ot=(0,V.A)(Bt,(function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon exclamation-icon",attrs:{"aria-hidden":t.title?null:"true","aria-label":t.title,role:"img"},on:{click:function(e){return t.$emit("click",e)}}},"span",t.$attrs,!1),[e("svg",{staticClass:"material-design-icon__svg",attrs:{fill:t.fillColor,width:t.size,height:t.size,viewBox:"0 0 24 24"}},[e("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"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])}),[],!1,null,null,null).exports,Mt={name:"LockOutlineIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},Ft=(0,V.A)(Mt,(function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon lock-outline-icon",attrs:{"aria-hidden":t.title?null:"true","aria-label":t.title,role:"img"},on:{click:function(e){return t.$emit("click",e)}}},"span",t.$attrs,!1),[e("svg",{staticClass:"material-design-icon__svg",attrs:{fill:t.fillColor,width:t.size,height:t.size,viewBox:"0 0 24 24"}},[e("path",{attrs:{d:"M12,17C10.89,17 10,16.1 10,15C10,13.89 10.89,13 12,13A2,2 0 0,1 14,15A2,2 0 0,1 12,17M18,20V10H6V20H18M18,8A2,2 0 0,1 20,10V20A2,2 0 0,1 18,22H6C4.89,22 4,21.1 4,20V10C4,8.89 4.89,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"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])}),[],!1,null,null,null).exports,Ut={name:"CheckBoldIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},Vt=(0,V.A)(Ut,(function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon check-bold-icon",attrs:{"aria-hidden":t.title?null:"true","aria-label":t.title,role:"img"},on:{click:function(e){return t.$emit("click",e)}}},"span",t.$attrs,!1),[e("svg",{staticClass:"material-design-icon__svg",attrs:{fill:t.fillColor,width:t.size,height:t.size,viewBox:"0 0 24 24"}},[e("path",{attrs:{d:"M9,20.42L2.79,14.21L5.62,11.38L9,14.77L18.88,4.88L21.71,7.71L9,20.42Z"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])}),[],!1,null,null,null).exports;var $t=i(66001),Ht=i(96078);const qt={name:"TriangleSmallDownIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},Gt=(0,V.A)(qt,(function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon triangle-small-down-icon",attrs:{"aria-hidden":t.title?null:"true","aria-label":t.title,role:"img"},on:{click:function(e){return t.$emit("click",e)}}},"span",t.$attrs,!1),[e("svg",{staticClass:"material-design-icon__svg",attrs:{fill:t.fillColor,width:t.size,height:t.size,viewBox:"0 0 24 24"}},[e("path",{attrs:{d:"M8 9H16L12 16"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])}),[],!1,null,null,null).exports,zt={name:"EyeOutlineIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},jt=(0,V.A)(zt,(function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon eye-outline-icon",attrs:{"aria-hidden":t.title?null:"true","aria-label":t.title,role:"img"},on:{click:function(e){return t.$emit("click",e)}}},"span",t.$attrs,!1),[e("svg",{staticClass:"material-design-icon__svg",attrs:{fill:t.fillColor,width:t.size,height:t.size,viewBox:"0 0 24 24"}},[e("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"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])}),[],!1,null,null,null).exports;var Wt=i(16502);const Yt={name:"FileUploadIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},Xt=(0,V.A)(Yt,(function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon file-upload-icon",attrs:{"aria-hidden":t.title?null:"true","aria-label":t.title,role:"img"},on:{click:function(e){return t.$emit("click",e)}}},"span",t.$attrs,!1),[e("svg",{staticClass:"material-design-icon__svg",attrs:{fill:t.fillColor,width:t.size,height:t.size,viewBox:"0 0 24 24"}},[e("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"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])}),[],!1,null,null,null).exports,Qt={name:"SharingEntryQuickShareSelect",components:{DropdownIcon:Gt,NcActions:b.A,NcActionButton:w.A},mixins:[ft,tt],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&~J.SHARE)===Z.READ_ONLY?this.canViewText:this.share.permissions===Z.ALL||this.share.permissions===Z.ALL_FILE?this.canEditText:(this.share.permissions&~J.SHARE)===Z.FILE_DROP?this.fileDropText:this.customPermissionsText},options(){const t=[{label:this.canViewText,icon:jt},{label:this.canEditText,icon:Wt.A}];return this.supportsFileDrop&&t.push({label:this.fileDropText,icon:Xt}),t.push({label:this.customPermissionsText,icon:Nt}),t},supportsFileDrop(){if(this.isFolder&&this.config.isPublicUploadEnabled){const t=this.share.type??this.share.shareType;return[h.I.Link,h.I.Email].includes(t)}return!1},dropDownPermissionValue(){switch(this.selectedOption){case this.canEditText:return this.isFolder?Z.ALL:Z.ALL_FILE;case this.fileDropText:return Z.FILE_DROP;case this.customPermissionsText:return"custom";case this.canViewText:default:return Z.READ_ONLY}}},created(){this.selectedOption=this.preSelectedOption},mounted(){(0,X.B1)("update:share",(t=>{t.id===this.share.id&&(this.share.permissions=t.permissions,this.selectedOption=this.preSelectedOption)}))},unmounted(){(0,X.al)("update:share")},methods:{selectOption(t){this.selectedOption=t,t===this.customPermissionsText?this.$emit("open-sharing-details"):(this.share.permissions=this.dropDownPermissionValue,this.queueUpdate("permissions"),this.$refs.quickShareActions.$refs.menuButton.$el.focus())}}},Kt=Qt;var Jt=i(88152),Zt={};Zt.styleTagTransform=M(),Zt.setAttributes=R(),Zt.insert=k().bind(null,"head"),Zt.domAPI=D(),Zt.insertStyleElement=B(),T()(Jt.A,Zt),Jt.A&&Jt.A.locals&&Jt.A.locals;const te=(0,V.A)(Kt,(function(){var t=this,e=t._self._c;return e("NcActions",{ref:"quickShareActions",staticClass:"share-select",attrs:{"menu-name":t.selectedOption,"aria-label":t.ariaLabel,type:"tertiary-no-background",disabled:!t.share.canEdit,"force-name":""},scopedSlots:t._u([{key:"icon",fn:function(){return[e("DropdownIcon",{attrs:{size:15}})]},proxy:!0}])},[t._v(" "),t._l(t.options,(function(r){return e("NcActionButton",{key:r.label,attrs:{type:"radio","model-value":r.label===t.selectedOption,"close-after-click":""},on:{click:function(e){return t.selectOption(r.label)}},scopedSlots:t._u([{key:"icon",fn:function(){return[e(r.icon,{tag:"component"})]},proxy:!0}],null,!0)},[t._v("\n\t\t"+t._s(r.label)+"\n\t")])}))],2)}),[],!1,null,"68405a8b",null).exports;var ee=i(4604);const re={name:"ClockIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},ie=(0,V.A)(re,(function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon clock-icon",attrs:{"aria-hidden":t.title?null:"true","aria-label":t.title,role:"img"},on:{click:function(e){return t.$emit("click",e)}}},"span",t.$attrs,!1),[e("svg",{staticClass:"material-design-icon__svg",attrs:{fill:t.fillColor,width:t.size,height:t.size,viewBox:"0 0 24 24"}},[e("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,2M16.2,16.2L11,13V7H12.5V12.2L17,14.9L16.2,16.2Z"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])}),[],!1,null,null,null).exports,ne={name:"ShareExpiryTime",components:{NcButton:u.A,NcPopover:p.N,NcDateTime:ee.A,ClockIcon:ie},props:{share:{type:Object,required:!0}},computed:{expiryTime(){return this.share?.expireDate?new Date(this.share.expireDate).getTime():null},timeFormat:()=>({dateStyle:"full",timeStyle:"short"})}};var se=i(63316),ae={};ae.styleTagTransform=M(),ae.setAttributes=R(),ae.insert=k().bind(null,"head"),ae.domAPI=D(),ae.insertStyleElement=B(),T()(se.A,ae),se.A&&se.A.locals&&se.A.locals;const oe=(0,V.A)(ne,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"share-expiry-time"},[e("NcPopover",{attrs:{"popup-role":"dialog"},scopedSlots:t._u([{key:"trigger",fn:function(){return[t.expiryTime?e("NcButton",{staticClass:"hint-icon",attrs:{type:"tertiary","aria-label":t.t("files_sharing","Share expiration: {date}",{date:new Date(t.expiryTime).toLocaleString()})},scopedSlots:t._u([{key:"icon",fn:function(){return[e("ClockIcon",{attrs:{size:20}})]},proxy:!0}],null,!1,3754271979)}):t._e()]},proxy:!0}])},[t._v(" "),e("h3",{staticClass:"hint-heading"},[t._v("\n\t\t\t"+t._s(t.t("files_sharing","Share Expiration"))+"\n\t\t")]),t._v(" "),t.expiryTime?e("p",{staticClass:"hint-body"},[e("NcDateTime",{attrs:{timestamp:t.expiryTime,format:t.timeFormat,"relative-time":!1}}),t._v(" ("),e("NcDateTime",{attrs:{timestamp:t.expiryTime}}),t._v(")\n\t\t")],1):t._e()])],1)}),[],!1,null,"46cd2ca2",null).exports,le={name:"ExternalShareAction",props:{id:{type:String,required:!0},action:{type:Object,default:()=>({})},fileInfo:{type:Object,default:()=>{},required:!0},share:{type:_,default:null}},computed:{data(){return this.action.data(this)}}},he=(0,V.A)(le,(function(){var t=this;return(0,t._self._c)(t.data.is,t._g(t._b({tag:"Component"},"Component",t.data,!1),t.action.handlers),[t._v("\n\t"+t._s(t.data.text)+"\n")])}),[],!1,null,null,null).exports,ce={name:"SharingEntryLink",components:{ExternalShareAction:he,NcActions:b.A,NcActionButton:w.A,NcActionCheckbox:St.N,NcActionInput:xt.A,NcActionLink:at.A,NcActionText:ot.A,NcActionSeparator:Tt.A,NcAvatar:c.A,NcDialog:It.A,VueQrcode:bt(),Tune:Nt,IconCalendarBlank:Pt,IconQr:Lt,ErrorIcon:Ot,LockIcon:Ft,CheckIcon:Vt,ClipboardIcon:C.A,CloseIcon:$t.A,PlusIcon:Ht.A,SharingEntryQuickShareSelect:te,ShareExpiryTime:oe},mixins:[ft,tt],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,showQRCode:!1}),computed:{title(){const t={escape:!1};if(this.share&&this.share.id){if(!this.isShareOwner&&this.share.ownerDisplayName)return this.isEmailShareType?(0,ht.t)("files_sharing","{shareWith} by {initiator}",{shareWith:this.share.shareWith,initiator:this.share.ownerDisplayName},t):(0,ht.t)("files_sharing","Shared via link by {initiator}",{initiator:this.share.ownerDisplayName},t);if(this.share.label&&""!==this.share.label.trim())return this.isEmailShareType?this.isFileRequest?(0,ht.t)("files_sharing","File request ({label})",{label:this.share.label.trim()},t):(0,ht.t)("files_sharing","Mail share ({label})",{label:this.share.label.trim()},t):(0,ht.t)("files_sharing","Share link ({label})",{label:this.share.label.trim()},t);if(this.isEmailShareType)return this.share.shareWith&&""!==this.share.shareWith.trim()?this.share.shareWith:this.isFileRequest?(0,ht.t)("files_sharing","File request"):(0,ht.t)("files_sharing","Mail share");if(null===this.index)return(0,ht.t)("files_sharing","Share link")}return this.index>=1?(0,ht.t)("files_sharing","Share link ({index})",{index:this.index}):(0,ht.t)("files_sharing","Create public link")},subtitle(){return this.isEmailShareType&&this.title!==this.share.shareWith?this.share.shareWith:null},passwordExpirationTime(){if(null===this.share.passwordExpirationTime)return null;const t=(0,A.A)(this.share.passwordExpirationTime);return!(t.diff((0,A.A)())<0)&&t.fromNow()},isTalkEnabled:()=>void 0!==OC.appswebroots.spreed,isPasswordProtectedByTalkAvailable(){return this.isPasswordProtected&&this.isTalkEnabled},isPasswordProtectedByTalk:{get(){return this.share.sendPasswordByTalk},async set(t){this.share.sendPasswordByTalk=t}},isEmailShareType(){return!!this.share&&this.share.type===h.I.Email},canTogglePasswordProtectedByTalkAvailable(){return!(!this.isPasswordProtected||this.isEmailShareType&&!this.hasUnsavedPassword)},pendingDataIsMissing(){return this.pendingPassword||this.pendingEnforcedPassword||this.pendingDefaultExpirationDate||this.pendingEnforcedExpirationDate},pendingPassword(){return this.config.enableLinkPasswordByDefault&&this.isPendingShare},pendingEnforcedPassword(){return this.config.enforcePasswordForPublicLink&&this.isPendingShare},pendingEnforcedExpirationDate(){return this.config.isDefaultExpireDateEnforced&&this.isPendingShare},pendingDefaultExpirationDate(){return(this.config.defaultExpirationDate instanceof Date||!isNaN(new Date(this.config.defaultExpirationDate).getTime()))&&this.isPendingShare},isPendingShare(){return!(!this.share||this.share.id)},sharePolicyHasEnforcedProperties(){return this.config.enforcePasswordForPublicLink||this.config.isDefaultExpireDateEnforced},enforcedPropertiesMissing(){if(!this.sharePolicyHasEnforcedProperties)return!1;if(!this.share)return!0;if(this.share.id)return!0;const t=this.config.enforcePasswordForPublicLink&&!this.share.password,e=this.config.isDefaultExpireDateEnforced&&!this.share.expireDate;return t||e},hasUnsavedPassword(){return void 0!==this.share.newPassword},shareLink(){return(0,l.Jv)("/s/{token}",{token:this.share.token},{baseURL:(0,l.$_)()})},actionsTooltip(){return(0,ht.t)("files_sharing",'Actions for "{title}"',{title:this.title})},copyLinkTooltip(){return this.copied?this.copySuccess?"":(0,ht.t)("files_sharing","Cannot copy, please copy the link manually"):(0,ht.t)("files_sharing",'Copy public link of "{title}" to clipboard',{title:this.title})},externalLegacyLinkActions(){return this.ExternalLegacyLinkActions.actions},externalLinkActions(){return this.ExternalShareActions.actions.filter((t=>(t.shareType.includes(h.I.Link)||t.shareType.includes(h.I.Email))&&!t.advanced))},isPasswordPolicyEnabled(){return"object"==typeof this.config.passwordPolicy},canChangeHideDownload(){return this.fileInfo.shareAttributes.some((t=>"permissions"===t.scope&&"download"===t.key&&!1===t.value))},isFileRequest(){return this.share.isFileRequest}},mounted(){this.defaultExpirationDateEnabled=this.config.defaultExpirationDate instanceof Date,this.share&&this.isNewShare&&(this.share.expireDate=this.defaultExpirationDateEnabled?this.formatDateToString(this.config.defaultExpirationDate):"")},methods:{shareRequiresReview(t){return!t&&(this.defaultExpirationDateEnabled||this.config.enableLinkPasswordByDefault)},async onNewLinkShare(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(y.debug("onNewLinkShare called (with this.share)",this.share),this.loading)return;const e={share_type:h.I.Link};if(this.config.isDefaultExpireDateEnforced&&(e.expiration=this.formatDateToString(this.config.defaultExpirationDate)),y.debug("Missing required properties?",this.enforcedPropertiesMissing),this.sharePolicyHasEnforcedProperties&&this.enforcedPropertiesMissing||this.shareRequiresReview(!0===t)){this.pending=!0,this.shareCreationComplete=!1,y.info("Share policy requires a review or has mandated properties (password, expirationDate)..."),(this.config.enableLinkPasswordByDefault||this.config.enforcePasswordForPublicLink)&&(e.password=await ut(!0));const t=new _(e);t.newPassword=t.password;const r=await new Promise((e=>{this.$emit("add:share",t,e)}));this.open=!1,this.pending=!1,r.open=!0}else{if(this.share&&!this.share.id){if(this.checkShare(this.share)){try{y.info("Sending existing share to server",this.share),await this.pushNewLinkShare(this.share,!0),this.shareCreationComplete=!0,y.info("Share created on server",this.share)}catch(t){return this.pending=!1,y.error("Error creating share",t),!1}return!0}return this.open=!0,(0,v.Qg)((0,ht.t)("files_sharing","Error, please enter proper password and/or expiration date")),!1}const t=new _(e);await this.pushNewLinkShare(t),this.shareCreationComplete=!0}},async pushNewLinkShare(t,e){try{if(this.loading)return!0;this.loading=!0,this.errors={};const r={path:(this.fileInfo.path+"/"+this.fileInfo.name).replace("//","/"),shareType:h.I.Link,password:t.password,expireDate:t.expireDate??"",attributes:JSON.stringify(this.fileInfo.shareAttributes)};console.debug("Creating link share with options",r);const i=await this.createShare(r);let n;this.open=!1,this.shareCreationComplete=!0,console.debug("Link share created",i),n=e?await new Promise((t=>{this.$emit("update:share",i,t)})):await new Promise((t=>{this.$emit("add:share",i,t)})),await this.getNode(),(0,X.Ic)("files:node:updated",this.node),this.config.enforcePasswordForPublicLink||n.copyLink(),(0,v.Te)((0,ht.t)("files_sharing","Link share created"))}catch(t){const e=t?.response?.data?.ocs?.meta?.message;if(!e)return(0,v.Qg)((0,ht.t)("files_sharing","Error while creating the share")),void console.error(t);throw e.match(/password/i)?this.onSyncError("password",e):e.match(/date/i)?this.onSyncError("expireDate",e):this.onSyncError("pending",e),t}finally{this.loading=!1,this.shareCreationComplete=!0}},async copyLink(){try{await navigator.clipboard.writeText(this.shareLink),(0,v.Te)((0,ht.t)("files_sharing","Link copied")),this.$refs.copyButton.$el.focus(),this.copySuccess=!0,this.copied=!0}catch(t){this.copySuccess=!1,this.copied=!0,console.error(t)}finally{setTimeout((()=>{this.copySuccess=!1,this.copied=!1}),4e3)}},onPasswordChange(t){this.$set(this.share,"newPassword",t)},onPasswordDisable(){this.share.password="",this.$delete(this.share,"newPassword"),this.share.id&&this.queueUpdate("password")},onPasswordSubmit(){this.hasUnsavedPassword&&(this.share.newPassword=this.share.newPassword.trim(),this.queueUpdate("password"))},onPasswordProtectedByTalkChange(){this.hasUnsavedPassword&&(this.share.newPassword=this.share.newPassword.trim()),this.queueUpdate("sendPasswordByTalk","password")},onMenuClose(){this.onPasswordSubmit(),this.onNoteSubmit()},onExpirationDateToggleUpdate(t){this.share.expireDate=t?this.formatDateToString(this.config.defaultExpirationDate):""},expirationDateChanged(t){const e=t?.target?.value,r=!!e&&!isNaN(new Date(e).getTime());this.defaultExpirationDateEnabled=r},onCancel(){this.shareCreationComplete||this.$emit("remove:share",this.share)}}},ue=ce;var de=i(67530),pe={};pe.styleTagTransform=M(),pe.setAttributes=R(),pe.insert=k().bind(null,"head"),pe.domAPI=D(),pe.insertStyleElement=B(),T()(de.A,pe),de.A&&de.A.locals&&de.A.locals;const fe={name:"SharingLinkList",components:{SharingEntryLink:(0,V.A)(ue,(function(){var t=this,e=t._self._c;return e("li",{staticClass:"sharing-entry sharing-entry__link",class:{"sharing-entry--share":t.share}},[e("NcAvatar",{staticClass:"sharing-entry__avatar",attrs:{"is-no-user":!0,"icon-class":t.isEmailShareType?"avatar-link-share icon-mail-white":"avatar-link-share icon-public-white"}}),t._v(" "),e("div",{staticClass:"sharing-entry__summary"},[e("div",{staticClass:"sharing-entry__desc"},[e("span",{staticClass:"sharing-entry__title",attrs:{title:t.title}},[t._v("\n\t\t\t\t"+t._s(t.title)+"\n\t\t\t")]),t._v(" "),t.subtitle?e("p",[t._v("\n\t\t\t\t"+t._s(t.subtitle)+"\n\t\t\t")]):t._e(),t._v(" "),t.share&&void 0!==t.share.permissions?e("SharingEntryQuickShareSelect",{attrs:{share:t.share,"file-info":t.fileInfo},on:{"open-sharing-details":function(e){return t.openShareDetailsForCustomSettings(t.share)}}}):t._e()],1),t._v(" "),e("div",{staticClass:"sharing-entry__actions"},[t.share&&t.share.expireDate?e("ShareExpiryTime",{attrs:{share:t.share}}):t._e(),t._v(" "),e("div",[t.share&&(!t.isEmailShareType||t.isFileRequest)&&t.share.token?e("NcActions",{ref:"copyButton",staticClass:"sharing-entry__copy"},[e("NcActionButton",{attrs:{"aria-label":t.copyLinkTooltip,title:t.copyLinkTooltip,href:t.shareLink},on:{click:function(e){return e.preventDefault(),t.copyLink.apply(null,arguments)}},scopedSlots:t._u([{key:"icon",fn:function(){return[t.copied&&t.copySuccess?e("CheckIcon",{staticClass:"icon-checkmark-color",attrs:{size:20}}):e("ClipboardIcon",{attrs:{size:20}})]},proxy:!0}],null,!1,4269614823)})],1):t._e()],1)],1)]),t._v(" "),!t.pending&&t.pendingDataIsMissing?e("NcActions",{staticClass:"sharing-entry__actions",attrs:{"aria-label":t.actionsTooltip,"menu-align":"right",open:t.open},on:{"update:open":function(e){t.open=e},close:t.onCancel}},[t.errors.pending?e("NcActionText",{staticClass:"error",scopedSlots:t._u([{key:"icon",fn:function(){return[e("ErrorIcon",{attrs:{size:20}})]},proxy:!0}],null,!1,1966124155)},[t._v("\n\t\t\t"+t._s(t.errors.pending)+"\n\t\t")]):e("NcActionText",{attrs:{icon:"icon-info"}},[t._v("\n\t\t\t"+t._s(t.t("files_sharing","Please enter the following required information before creating the share"))+"\n\t\t")]),t._v(" "),t.pendingPassword?e("NcActionCheckbox",{staticClass:"share-link-password-checkbox",attrs:{checked:t.isPasswordProtected,disabled:t.config.enforcePasswordForPublicLink||t.saving},on:{"update:checked":function(e){t.isPasswordProtected=e},uncheck:t.onPasswordDisable}},[t._v("\n\t\t\t"+t._s(t.config.enforcePasswordForPublicLink?t.t("files_sharing","Password protection (enforced)"):t.t("files_sharing","Password protection"))+"\n\t\t")]):t._e(),t._v(" "),t.pendingEnforcedPassword||t.isPasswordProtected?e("NcActionInput",{staticClass:"share-link-password",attrs:{label:t.t("files_sharing","Enter a password"),value:t.share.newPassword,disabled:t.saving,required:t.config.enableLinkPasswordByDefault||t.config.enforcePasswordForPublicLink,minlength:t.isPasswordPolicyEnabled&&t.config.passwordPolicy.minLength,autocomplete:"new-password"},on:{"update:value":function(e){return t.$set(t.share,"newPassword",e)},submit:function(e){return t.onNewLinkShare(!0)}},scopedSlots:t._u([{key:"icon",fn:function(){return[e("LockIcon",{attrs:{size:20}})]},proxy:!0}],null,!1,2056568168)}):t._e(),t._v(" "),t.pendingDefaultExpirationDate?e("NcActionCheckbox",{staticClass:"share-link-expiration-date-checkbox",attrs:{checked:t.defaultExpirationDateEnabled,disabled:t.pendingEnforcedExpirationDate||t.saving},on:{"update:checked":function(e){t.defaultExpirationDateEnabled=e},"update:model-value":t.onExpirationDateToggleUpdate}},[t._v("\n\t\t\t"+t._s(t.config.isDefaultExpireDateEnforced?t.t("files_sharing","Enable link expiration (enforced)"):t.t("files_sharing","Enable link expiration"))+"\n\t\t")]):t._e(),t._v(" "),(t.pendingDefaultExpirationDate||t.pendingEnforcedExpirationDate)&&t.defaultExpirationDateEnabled?e("NcActionInput",{staticClass:"share-link-expire-date",attrs:{"data-cy-files-sharing-expiration-date-input":"",label:t.pendingEnforcedExpirationDate?t.t("files_sharing","Enter expiration date (enforced)"):t.t("files_sharing","Enter expiration date"),disabled:t.saving,"is-native-picker":!0,"hide-label":!0,value:new Date(t.share.expireDate),type:"date",min:t.dateTomorrow,max:t.maxExpirationDateEnforced},on:{"update:model-value":t.onExpirationChange,change:t.expirationDateChanged},scopedSlots:t._u([{key:"icon",fn:function(){return[e("IconCalendarBlank",{attrs:{size:20}})]},proxy:!0}],null,!1,3418578971)}):t._e(),t._v(" "),e("NcActionButton",{attrs:{disabled:t.pendingEnforcedPassword&&!t.share.newPassword},on:{click:function(e){return e.preventDefault(),e.stopPropagation(),t.onNewLinkShare(!0)}},scopedSlots:t._u([{key:"icon",fn:function(){return[e("CheckIcon",{attrs:{size:20}})]},proxy:!0}],null,!1,2630571749)},[t._v("\n\t\t\t"+t._s(t.t("files_sharing","Create share"))+"\n\t\t")]),t._v(" "),e("NcActionButton",{on:{click:function(e){return e.preventDefault(),e.stopPropagation(),t.onCancel.apply(null,arguments)}},scopedSlots:t._u([{key:"icon",fn:function(){return[e("CloseIcon",{attrs:{size:20}})]},proxy:!0}],null,!1,2428343285)},[t._v("\n\t\t\t"+t._s(t.t("files_sharing","Cancel"))+"\n\t\t")])],1):t.loading?e("div",{staticClass:"icon-loading-small sharing-entry__loading"}):e("NcActions",{staticClass:"sharing-entry__actions",attrs:{"aria-label":t.actionsTooltip,"menu-align":"right",open:t.open},on:{"update:open":function(e){t.open=e},close:t.onMenuClose}},[t.share?[t.share.canEdit&&t.canReshare?[e("NcActionButton",{attrs:{disabled:t.saving,"close-after-click":!0},on:{click:function(e){return e.preventDefault(),t.openSharingDetails.apply(null,arguments)}},scopedSlots:t._u([{key:"icon",fn:function(){return[e("Tune",{attrs:{size:20}})]},proxy:!0}],null,!1,1300586850)},[t._v("\n\t\t\t\t\t"+t._s(t.t("files_sharing","Customize link"))+"\n\t\t\t\t")])]:t._e(),t._v(" "),e("NcActionButton",{attrs:{"close-after-click":!0},on:{click:function(e){e.preventDefault(),t.showQRCode=!0}},scopedSlots:t._u([{key:"icon",fn:function(){return[e("IconQr",{attrs:{size:20}})]},proxy:!0}],null,!1,1082198240)},[t._v("\n\t\t\t\t"+t._s(t.t("files_sharing","Generate QR code"))+"\n\t\t\t")]),t._v(" "),e("NcActionSeparator"),t._v(" "),t._l(t.externalLinkActions,(function(r){return e("ExternalShareAction",{key:r.id,attrs:{id:r.id,action:r,"file-info":t.fileInfo,share:t.share}})})),t._v(" "),t._l(t.externalLegacyLinkActions,(function(r,i){let{icon:n,url:s,name:a}=r;return e("NcActionLink",{key:i,attrs:{href:s(t.shareLink),icon:n,target:"_blank"}},[t._v("\n\t\t\t\t"+t._s(a)+"\n\t\t\t")])})),t._v(" "),!t.isEmailShareType&&t.canReshare?e("NcActionButton",{staticClass:"new-share-link",on:{click:function(e){return e.preventDefault(),e.stopPropagation(),t.onNewLinkShare.apply(null,arguments)}},scopedSlots:t._u([{key:"icon",fn:function(){return[e("PlusIcon",{attrs:{size:20}})]},proxy:!0}],null,!1,2953566425)},[t._v("\n\t\t\t\t"+t._s(t.t("files_sharing","Add another link"))+"\n\t\t\t")]):t._e(),t._v(" "),t.share.canDelete?e("NcActionButton",{attrs:{disabled:t.saving},on:{click:function(e){return e.preventDefault(),t.onDelete.apply(null,arguments)}},scopedSlots:t._u([{key:"icon",fn:function(){return[e("CloseIcon",{attrs:{size:20}})]},proxy:!0}],null,!1,2428343285)},[t._v("\n\t\t\t\t"+t._s(t.t("files_sharing","Unshare"))+"\n\t\t\t")]):t._e()]:t.canReshare?e("NcActionButton",{staticClass:"new-share-link",attrs:{title:t.t("files_sharing","Create a new share link"),"aria-label":t.t("files_sharing","Create a new share link"),icon:t.loading?"icon-loading-small":"icon-add"},on:{click:function(e){return e.preventDefault(),e.stopPropagation(),t.onNewLinkShare.apply(null,arguments)}}}):t._e()],2),t._v(" "),t.showQRCode?e("NcDialog",{attrs:{size:"normal",open:t.showQRCode,name:t.title,"close-on-click-outside":!0},on:{"update:open":function(e){t.showQRCode=e},close:function(e){t.showQRCode=!1}}},[e("div",{staticClass:"qr-code-dialog"},[e("VueQrcode",{staticClass:"qr-code-dialog__img",attrs:{tag:"img",value:t.shareLink}})],1)]):t._e()],1)}),[],!1,null,"474c7155",null).exports},mixins:[tt],props:{fileInfo:{type:Object,default:()=>{},required:!0},shares:{type:Array,default:()=>[],required:!0},canReshare:{type:Boolean,required:!0}},data:()=>({canLinkShare:(0,s.F)().files_sharing.public.enabled}),computed:{hasLinkShares(){return this.shares.filter((t=>t.type===h.I.Link)).length>0},hasShares(){return this.shares.length>0}},methods:{t:ht.t,addShare(t,e){this.shares.push(t),this.awaitForShare(t,e)},awaitForShare(t,e){this.$nextTick((()=>{const r=this.$children.find((e=>e.share===t));r&&e(r)}))},removeShare(t){const e=this.shares.findIndex((e=>e===t));this.shares.splice(e,1)}}},ge=(0,V.A)(fe,(function(){var t=this,e=t._self._c;return t.canLinkShare?e("ul",{staticClass:"sharing-link-list",attrs:{"aria-label":t.t("files_sharing","Link shares")}},[t.hasShares?t._l(t.shares,(function(r,i){return e("SharingEntryLink",{key:r.id,attrs:{index:t.shares.length>1?i+1:null,"can-reshare":t.canReshare,share:t.shares[i],"file-info":t.fileInfo},on:{"update:share":[function(e){return t.$set(t.shares,i,e)},function(e){return t.awaitForShare(...arguments)}],"add:share":function(e){return t.addShare(...arguments)},"remove:share":t.removeShare,"open-sharing-details":function(e){return t.openSharingDetails(r)}}})})):t._e(),t._v(" "),!t.hasLinkShares&&t.canReshare?e("SharingEntryLink",{attrs:{"can-reshare":t.canReshare,"file-info":t.fileInfo},on:{"add:share":t.addShare}}):t._e()],2):t._e()}),[],!1,null,null,null).exports;var Ae=i(26690);const me={name:"SharingEntry",components:{NcButton:u.A,NcAvatar:c.A,DotsHorizontalIcon:Ae.A,NcSelect:Y.A,ShareExpiryTime:oe,SharingEntryQuickShareSelect:te},mixins:[ft,tt],computed:{title(){let e=this.share.shareWithDisplayName;return this.share.type===h.I.Group?e+=` (${t("files_sharing","group")})`:this.share.type===h.I.Room?e+=` (${t("files_sharing","conversation")})`:this.share.type!==h.I.Remote||this.share.isTrustedServer?this.share.type!==h.I.RemoteGroup||this.share.isTrustedServer?this.share.type===h.I.Guest&&(e+=` (${t("files_sharing","guest")})`):e+=` (${t("files_sharing","remote group")})`:e+=` (${t("files_sharing","remote")})`,!this.isShareOwner&&this.share.ownerDisplayName&&(e+=" "+t("files_sharing","by {initiator}",{initiator:this.share.ownerDisplayName})),e},tooltip(){if(this.share.owner!==this.share.uidFileOwner){const e={user:this.share.shareWithDisplayName,owner:this.share.ownerDisplayName};return this.share.type===h.I.Group?t("files_sharing","Shared with the group {user} by {owner}",e):this.share.type===h.I.Room?t("files_sharing","Shared with the conversation {user} by {owner}",e):t("files_sharing","Shared with {user} by {owner}",e)}return null},hasStatus(){return this.share.type===h.I.User&&"object"==typeof this.share.status&&!Array.isArray(this.share.status)}},methods:{onMenuClose(){this.onNoteSubmit()}}};var ye=i(12143),_e={};_e.styleTagTransform=M(),_e.setAttributes=R(),_e.insert=k().bind(null,"head"),_e.domAPI=D(),_e.insertStyleElement=B(),T()(ye.A,_e),ye.A&&ye.A.locals&&ye.A.locals;const ve={name:"SharingList",components:{SharingEntry:(0,V.A)(me,(function(){var t=this,e=t._self._c;return e("li",{staticClass:"sharing-entry"},[e("NcAvatar",{staticClass:"sharing-entry__avatar",attrs:{"is-no-user":t.share.type!==t.ShareType.User,user:t.share.shareWith,"display-name":t.share.shareWithDisplayName,"menu-position":"left",url:t.share.shareWithAvatar}}),t._v(" "),e("div",{staticClass:"sharing-entry__summary"},[e(t.share.shareWithLink?"a":"div",{tag:"component",staticClass:"sharing-entry__summary__desc",attrs:{title:t.tooltip,"aria-label":t.tooltip,href:t.share.shareWithLink}},[e("span",[t._v(t._s(t.title)+"\n\t\t\t\t"),t.isUnique?t._e():e("span",{staticClass:"sharing-entry__summary__desc-unique"},[t._v(" ("+t._s(t.share.shareWithDisplayNameUnique)+")")]),t._v(" "),t.hasStatus&&t.share.status.message?e("small",[t._v("("+t._s(t.share.status.message)+")")]):t._e()])]),t._v(" "),e("SharingEntryQuickShareSelect",{attrs:{share:t.share,"file-info":t.fileInfo},on:{"open-sharing-details":function(e){return t.openShareDetailsForCustomSettings(t.share)}}})],1),t._v(" "),t.share&&t.share.expireDate?e("ShareExpiryTime",{attrs:{share:t.share}}):t._e(),t._v(" "),t.share.canEdit?e("NcButton",{staticClass:"sharing-entry__action",attrs:{"data-cy-files-sharing-share-actions":"","aria-label":t.t("files_sharing","Open Sharing Details"),type:"tertiary"},on:{click:function(e){return t.openSharingDetails(t.share)}},scopedSlots:t._u([{key:"icon",fn:function(){return[e("DotsHorizontalIcon",{attrs:{size:20}})]},proxy:!0}],null,!1,1700783217)}):t._e()],1)}),[],!1,null,"42622a71",null).exports},mixins:[tt],props:{fileInfo:{type:Object,default:()=>{},required:!0},shares:{type:Array,default:()=>[],required:!0}},setup:()=>({t:ht.t}),computed:{hasShares(){return 0===this.shares.length},isUnique(){return t=>[...this.shares].filter((e=>t.type===h.I.User&&t.shareWithDisplayName===e.shareWithDisplayName)).length<=1}}},we=(0,V.A)(ve,(function(){var t=this,e=t._self._c;return e("ul",{staticClass:"sharing-sharee-list",attrs:{"aria-label":t.t("files_sharing","Shares")}},t._l(t.shares,(function(r){return e("SharingEntry",{key:r.id,attrs:{"file-info":t.fileInfo,share:r,"is-unique":t.isUnique(r)},on:{"open-sharing-details":function(e){return t.openSharingDetails(r)}}})})),1)}),[],!1,null,null,null).exports;var Ee=i(32073),Ce=i(88984),be=i(16879),Se=i(59892),xe=i(16044),Te=i(177),Ie=i(16039);const De={name:"EmailIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},Ne=(0,V.A)(De,(function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon email-icon",attrs:{"aria-hidden":t.title?null:"true","aria-label":t.title,role:"img"},on:{click:function(e){return t.$emit("click",e)}}},"span",t.$attrs,!1),[e("svg",{staticClass:"material-design-icon__svg",attrs:{fill:t.fillColor,width:t.size,height:t.size,viewBox:"0 0 24 24"}},[e("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"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])}),[],!1,null,null,null).exports;var ke=i(36600);const Pe={name:"AccountGroupIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},Re=(0,V.A)(Pe,(function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon account-group-icon",attrs:{"aria-hidden":t.title?null:"true","aria-label":t.title,role:"img"},on:{click:function(e){return t.$emit("click",e)}}},"span",t.$attrs,!1),[e("svg",{staticClass:"material-design-icon__svg",attrs:{fill:t.fillColor,width:t.size,height:t.size,viewBox:"0 0 24 24"}},[e("path",{attrs:{d:"M12,5.5A3.5,3.5 0 0,1 15.5,9A3.5,3.5 0 0,1 12,12.5A3.5,3.5 0 0,1 8.5,9A3.5,3.5 0 0,1 12,5.5M5,8C5.56,8 6.08,8.15 6.53,8.42C6.38,9.85 6.8,11.27 7.66,12.38C7.16,13.34 6.16,14 5,14A3,3 0 0,1 2,11A3,3 0 0,1 5,8M19,8A3,3 0 0,1 22,11A3,3 0 0,1 19,14C17.84,14 16.84,13.34 16.34,12.38C17.2,11.27 17.62,9.85 17.47,8.42C17.92,8.15 18.44,8 19,8M5.5,18.25C5.5,16.18 8.41,14.5 12,14.5C15.59,14.5 18.5,16.18 18.5,18.25V20H5.5V18.25M0,20V18.5C0,17.11 1.89,15.94 4.45,15.6C3.86,16.28 3.5,17.22 3.5,18.25V20H0M24,20H20.5V18.25C20.5,17.22 20.14,16.28 19.55,15.6C22.11,15.94 24,17.11 24,18.5V20Z"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])}),[],!1,null,null,null).exports,Le={name:"ShareCircleIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},Be=(0,V.A)(Le,(function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon share-circle-icon",attrs:{"aria-hidden":t.title?null:"true","aria-label":t.title,role:"img"},on:{click:function(e){return t.$emit("click",e)}}},"span",t.$attrs,!1),[e("svg",{staticClass:"material-design-icon__svg",attrs:{fill:t.fillColor,width:t.size,height:t.size,viewBox:"0 0 24 24"}},[e("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"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])}),[],!1,null,null,null).exports,Oe={name:"AccountCircleOutlineIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},Me=(0,V.A)(Oe,(function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon account-circle-outline-icon",attrs:{"aria-hidden":t.title?null:"true","aria-label":t.title,role:"img"},on:{click:function(e){return t.$emit("click",e)}}},"span",t.$attrs,!1),[e("svg",{staticClass:"material-design-icon__svg",attrs:{fill:t.fillColor,width:t.size,height:t.size,viewBox:"0 0 24 24"}},[e("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"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])}),[],!1,null,null,null).exports,Fe={name:"EyeIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},Ue=(0,V.A)(Fe,(function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon eye-icon",attrs:{"aria-hidden":t.title?null:"true","aria-label":t.title,role:"img"},on:{click:function(e){return t.$emit("click",e)}}},"span",t.$attrs,!1),[e("svg",{staticClass:"material-design-icon__svg",attrs:{fill:t.fillColor,width:t.size,height:t.size,viewBox:"0 0 24 24"}},[e("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"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])}),[],!1,null,null,null).exports;var Ve=i(65422),$e=i(25384),He=i(33388);const qe={name:"RefreshIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},Ge=(0,V.A)(qe,(function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon refresh-icon",attrs:{"aria-hidden":t.title?null:"true","aria-label":t.title,role:"img"},on:{click:function(e){return t.$emit("click",e)}}},"span",t.$attrs,!1),[e("svg",{staticClass:"material-design-icon__svg",attrs:{fill:t.fillColor,width:t.size,height:t.size,viewBox:"0 0 24 24"}},[e("path",{attrs:{d:"M17.65,6.35C16.2,4.9 14.21,4 12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20C15.73,20 18.84,17.45 19.73,14H17.65C16.83,16.33 14.61,18 12,18A6,6 0 0,1 6,12A6,6 0 0,1 12,6C13.66,6 15.14,6.69 16.22,7.78L13,11H20V4L17.65,6.35Z"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])}),[],!1,null,null,null).exports,ze={name:"SharingDetailsTab",components:{NcAvatar:c.A,NcButton:u.A,NcCheckboxRadioSwitch:Ee.A,NcDateTimePickerNative:Ce.A,NcInputField:be.A,NcLoadingIcon:Se.A,NcPasswordField:xe.A,NcTextArea:Te.A,CloseIcon:$t.A,CircleIcon:Ie.A,EditIcon:Wt.A,ExternalShareAction:he,LinkIcon:ke.A,GroupIcon:Re,ShareIcon:Be,UserIcon:Me,UploadIcon:Ve.A,ViewIcon:Ue,MenuDownIcon:$e.A,MenuUpIcon:He.A,DotsHorizontalIcon:Ae.A,Refresh:Ge},mixins:[K,ft],props:{shareRequestValue:{type:Object,required:!1},fileInfo:{type:Object,required:!0},share:{type:Object,required:!0}},data(){return{writeNoteToRecipientIsChecked:!1,sharingPermission:Z.ALL.toString(),revertSharingPermission:Z.ALL.toString(),setCustomPermissions:!1,passwordError:!1,advancedSectionAccordionExpanded:!1,bundledPermissions:Z,isFirstComponentLoad:!0,test:!1,creating:!1,initialToken:this.share.token,loadingToken:!1,ExternalShareActions:OCA.Sharing.ExternalShareActions.state}},computed:{title(){switch(this.share.type){case h.I.User:return t("files_sharing","Share with {userName}",{userName:this.share.shareWithDisplayName});case h.I.Email:return t("files_sharing","Share with email {email}",{email:this.share.shareWith});case h.I.Link:return t("files_sharing","Share link");case h.I.Group:return t("files_sharing","Share with group");case h.I.Room:return t("files_sharing","Share in conversation");case h.I.Remote:{const[e,r]=this.share.shareWith.split("@");return t("files_sharing","Share with {user} on remote server {server}",{user:e,server:r})}case h.I.RemoteGroup:return t("files_sharing","Share with remote group");case h.I.Guest:return t("files_sharing","Share with guest");default:return this.share.id?t("files_sharing","Update share"):t("files_sharing","Create share")}},allPermissions(){return this.isFolder?this.bundledPermissions.ALL.toString():this.bundledPermissions.ALL_FILE.toString()},canEdit:{get(){return this.share.hasUpdatePermission},set(t){this.updateAtomicPermissions({isEditChecked:t})}},canCreate:{get(){return this.share.hasCreatePermission},set(t){this.updateAtomicPermissions({isCreateChecked:t})}},canDelete:{get(){return this.share.hasDeletePermission},set(t){this.updateAtomicPermissions({isDeleteChecked:t})}},canReshare:{get(){return this.share.hasSharePermission},set(t){this.updateAtomicPermissions({isReshareChecked:t})}},showInGridView:{get(){return this.getShareAttribute("config","grid_view",!1)},set(t){this.setShareAttribute("config","grid_view",t)}},canDownload:{get(){return this.getShareAttribute("permissions","download",!0)},set(t){this.setShareAttribute("permissions","download",t)}},hasRead:{get(){return this.share.hasReadPermission},set(t){this.updateAtomicPermissions({isReadChecked:t})}},hasExpirationDate:{get(){return this.isValidShareAttribute(this.share.expireDate)},set(t){this.share.expireDate=t?this.formatDateToString(this.defaultExpiryDate):""}},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===h.I.User},isGroupShare(){return this.share.type===h.I.Group},allowsFileDrop(){return!(!this.isFolder||!this.config.isPublicUploadEnabled||this.share.type!==h.I.Link&&this.share.type!==h.I.Email)},hasFileDropPermissions(){return this.share.permissions===this.bundledPermissions.FILE_DROP},shareButtonText(){return this.isNewShare?t("files_sharing","Save share"):t("files_sharing","Update share")},resharingIsPossible(){return this.config.isResharingAllowed&&this.share.type!==h.I.Link&&this.share.type!==h.I.Email},canSetEdit(){return this.fileInfo.sharePermissions&OC.PERMISSION_UPDATE||this.canEdit},canSetCreate(){return this.fileInfo.sharePermissions&OC.PERMISSION_CREATE||this.canCreate},canSetDelete(){return this.fileInfo.sharePermissions&OC.PERMISSION_DELETE||this.canDelete},canSetReshare(){return this.fileInfo.sharePermissions&OC.PERMISSION_SHARE||this.canReshare},canSetDownload(){return this.fileInfo.canDownload()||this.canDownload},canRemoveReadPermission(){return this.allowsFileDrop&&(this.share.type===h.I.Link||this.share.type===h.I.Email)},hasUnsavedPassword(){return void 0!==this.share.newPassword},passwordExpirationTime(){if(!this.isValidShareAttribute(this.share.passwordExpirationTime))return null;const t=(0,A.A)(this.share.passwordExpirationTime);return!(t.diff((0,A.A)())<0)&&t.fromNow()},isTalkEnabled:()=>void 0!==OC.appswebroots.spreed,isPasswordProtectedByTalkAvailable(){return this.isPasswordProtected&&this.isTalkEnabled},isPasswordProtectedByTalk:{get(){return this.share.sendPasswordByTalk},async set(t){this.share.sendPasswordByTalk=t}},isEmailShareType(){return!!this.share&&this.share.type===h.I.Email},canTogglePasswordProtectedByTalkAvailable(){return!(!this.isPublicShare||!this.isPasswordProtected||this.isEmailShareType&&!this.hasUnsavedPassword||void 0===OC.appswebroots.spreed)},canChangeHideDownload(){return this.fileInfo.shareAttributes.some((t=>"download"===t.key&&"permissions"===t.scope&&!1===t.value))},customPermissionsList(){const t={[J.READ]:this.t("files_sharing","Read"),[J.CREATE]:this.t("files_sharing","Create"),[J.UPDATE]:this.t("files_sharing","Edit"),[J.SHARE]:this.t("files_sharing","Share"),[J.DELETE]:this.t("files_sharing","Delete")};return[J.READ,...this.isFolder?[J.CREATE]:[],J.UPDATE,...this.resharingIsPossible?[J.SHARE]:[],...this.isFolder?[J.DELETE]:[]].filter((t=>{return e=this.share.permissions,r=t,e!==J.NONE&&(e&r)===r;var e,r})).map(((e,r)=>0===r?t[e]:t[e].toLocaleLowerCase((0,ht.Z0)()))).join(", ")},advancedControlExpandedValue(){return this.advancedSectionAccordionExpanded?"true":"false"},errorPasswordLabel(){if(this.passwordError)return t("files_sharing","Password field cannot be empty")},passwordHint(){if(!this.isNewShare&&!this.hasUnsavedPassword)return t("files_sharing","Replace current password")},externalLinkActions(){return this.ExternalShareActions.actions.filter((t=>(t.shareType.includes(h.I.Link)||t.shareType.includes(h.I.Email))&&t.advanced))}},watch:{setCustomPermissions(t){this.sharingPermission=t?"custom":this.revertSharingPermission}},beforeMount(){this.initializePermissions(),this.initializeAttributes(),y.debug("Share object received",{share:this.share}),y.debug("Configuration object received",{config:this.config})},mounted(){this.$refs.quickPermissions?.querySelector("input:checked")?.focus()},methods:{setShareAttribute(t,e,r){this.share.attributes||this.$set(this.share,"attributes",[]);const i=this.share.attributes.find((r=>r.scope===t||r.key===e));i?i.value=r:this.share.attributes.push({scope:t,key:e,value:r})},getShareAttribute(t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;const i=this.share.attributes?.find((r=>r.scope===t&&r.key===e));return i?.value??r},async generateNewToken(){if(!this.loadingToken){this.loadingToken=!0;try{this.share.token=await(async()=>{const{data:t}=await g.Ay.get((0,l.KT)("/apps/files_sharing/api/v1/token"));return t.ocs.data.token})()}catch(e){(0,v.Qg)(t("files_sharing","Failed to generate a new token"))}this.loadingToken=!1}},cancel(){this.share.token=this.initialToken,this.$emit("close-sharing-details")},updateAtomicPermissions(){let{isReadChecked:t=this.hasRead,isEditChecked:e=this.canEdit,isCreateChecked:r=this.canCreate,isDeleteChecked:i=this.canDelete,isReshareChecked:n=this.canReshare}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.isFolder||!r&&!i||(y.debug("Ignoring create/delete permissions for file share — only available for folders"),r=!1,i=!1);const s=(t?J.READ:0)|(r?J.CREATE:0)|(i?J.DELETE:0)|(e?J.UPDATE:0)|(n?J.SHARE:0);this.share.permissions=s},expandCustomPermissions(){this.advancedSectionAccordionExpanded||(this.advancedSectionAccordionExpanded=!0),this.toggleCustomPermissions()},toggleCustomPermissions(t){const e="custom"===this.sharingPermission;this.revertSharingPermission=e?"custom":t,this.setCustomPermissions=e},async initializeAttributes(){if(this.isNewShare)return(this.config.enableLinkPasswordByDefault||this.isPasswordEnforced)&&this.isPublicShare&&(this.$set(this.share,"newPassword",await ut(!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.isValidShareAttribute(this.share.note)&&(this.writeNoteToRecipientIsChecked=!0,this.advancedSectionAccordionExpanded=!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 t=this.config.defaultPermissions;t===Z.READ_ONLY||t===Z.ALL?this.sharingPermission=t.toString():(this.sharingPermission="custom",this.share.permissions=t,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 t=["permissions","attributes","note","expireDate"],e=["label","password","hideDownload"];this.config.allowCustomTokens&&e.push("token"),this.isPublicShare&&t.push(...e);const r=parseInt(this.sharingPermission);if(this.setCustomPermissions?this.updateAtomicPermissions():this.share.permissions=r,this.isFolder||this.share.permissions!==Z.ALL||(this.share.permissions=Z.ALL_FILE),this.writeNoteToRecipientIsChecked||(this.share.note=""),this.isPasswordProtected?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};let r;e.expireDate=this.hasExpirationDate?this.share.expireDate:"",this.isPasswordProtected&&(e.password=this.share.newPassword);try{this.creating=!0,r=await this.addShare(e)}catch(t){return void(this.creating=!1)}this.share._share.id=r.id,await this.queueUpdate(...t);for(const e of t)if(e in r&&e in this.share)try{r[e]=this.share[e]}catch{r._share[e]=this.share[e]}this.share=r,this.creating=!1,this.$emit("add:share",this.share)}else await this.queueUpdate(...t),this.$emit("update:share",this.share);await this.getNode(),(0,X.Ic)("files:node:updated",this.node),this.$refs.externalLinkActions?.length>0&&await Promise.allSettled(this.$refs.externalLinkActions.map((t=>"function"!=typeof t.$children.at(0)?.onSave?Promise.resolve():t.$children.at(0)?.onSave?.()))),this.$emit("close-sharing-details")},async addShare(t){y.debug("Adding a new share from the input for",{share:t});const e=this.path;try{return await this.createShare({path:e,shareType:t.shareType,shareWith:t.shareWith,permissions:t.permissions,expireDate:t.expireDate,attributes:JSON.stringify(t.attributes),...t.note?{note:t.note}:{},...t.password?{password:t.password}:{}})}catch(t){y.error("Error while adding new share",{error:t})}},async removeShare(){await this.onDelete(),await this.getNode(),(0,X.Ic)("files:node:updated",this.node),this.$emit("close-sharing-details")},onPasswordChange(t){if(""===t)return this.$delete(this.share,"newPassword"),void(this.passwordError=this.isNewShare&&this.isPasswordEnforced);this.passwordError=!this.isValidShareAttribute(t),this.$set(this.share,"newPassword",t)},onPasswordProtectedByTalkChange(){this.queueUpdate("sendPasswordByTalk","password")},isValidShareAttribute:t=>![null,void 0].includes(t)&&t.trim().length>0,getShareTypeIcon(t){switch(t){case h.I.Link:return ke.A;case h.I.Guest:return Me;case h.I.RemoteGroup:case h.I.Group:return Re;case h.I.Email:return Ne;case h.I.Team:return Ie.A;case h.I.Room:case h.I.Deck:case h.I.ScienceMesh:return Be;default:return null}}}};var je=i(55421),We={};We.styleTagTransform=M(),We.setAttributes=R(),We.insert=k().bind(null,"head"),We.domAPI=D(),We.insertStyleElement=B(),T()(je.A,We),je.A&&je.A.locals&&je.A.locals;const Ye=(0,V.A)(ze,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"sharingTabDetailsView"},[e("div",{staticClass:"sharingTabDetailsView__header"},[e("span",[t.isUserShare?e("NcAvatar",{staticClass:"sharing-entry__avatar",attrs:{"is-no-user":t.share.shareType!==t.ShareType.User,user:t.share.shareWith,"display-name":t.share.shareWithDisplayName,"menu-position":"left",url:t.share.shareWithAvatar}}):t._e(),t._v(" "),e(t.getShareTypeIcon(t.share.type),{tag:"component",attrs:{size:32}})],1),t._v(" "),e("span",[e("h1",[t._v(t._s(t.title))])])]),t._v(" "),e("div",{staticClass:"sharingTabDetailsView__wrapper"},[e("div",{ref:"quickPermissions",staticClass:"sharingTabDetailsView__quick-permissions"},[e("div",[e("NcCheckboxRadioSwitch",{attrs:{"button-variant":!0,"data-cy-files-sharing-share-permissions-bundle":"read-only",checked:t.sharingPermission,value:t.bundledPermissions.READ_ONLY.toString(),name:"sharing_permission_radio",type:"radio","button-variant-grouped":"vertical"},on:{"update:checked":[function(e){t.sharingPermission=e},t.toggleCustomPermissions]},scopedSlots:t._u([{key:"icon",fn:function(){return[e("ViewIcon",{attrs:{size:20}})]},proxy:!0}])},[t._v("\n\t\t\t\t\t"+t._s(t.t("files_sharing","View only"))+"\n\t\t\t\t\t")]),t._v(" "),e("NcCheckboxRadioSwitch",{attrs:{"button-variant":!0,"data-cy-files-sharing-share-permissions-bundle":"upload-edit",checked:t.sharingPermission,value:t.allPermissions,name:"sharing_permission_radio",type:"radio","button-variant-grouped":"vertical"},on:{"update:checked":[function(e){t.sharingPermission=e},t.toggleCustomPermissions]},scopedSlots:t._u([{key:"icon",fn:function(){return[e("EditIcon",{attrs:{size:20}})]},proxy:!0}])},[t.allowsFileDrop?[t._v("\n\t\t\t\t\t\t"+t._s(t.t("files_sharing","Allow upload and editing"))+"\n\t\t\t\t\t")]:[t._v("\n\t\t\t\t\t\t"+t._s(t.t("files_sharing","Allow editing"))+"\n\t\t\t\t\t")]],2),t._v(" "),t.allowsFileDrop?e("NcCheckboxRadioSwitch",{attrs:{"data-cy-files-sharing-share-permissions-bundle":"file-drop","button-variant":!0,checked:t.sharingPermission,value:t.bundledPermissions.FILE_DROP.toString(),name:"sharing_permission_radio",type:"radio","button-variant-grouped":"vertical"},on:{"update:checked":[function(e){t.sharingPermission=e},t.toggleCustomPermissions]},scopedSlots:t._u([{key:"icon",fn:function(){return[e("UploadIcon",{attrs:{size:20}})]},proxy:!0}],null,!1,1083194048)},[t._v("\n\t\t\t\t\t"+t._s(t.t("files_sharing","File request"))+"\n\t\t\t\t\t"),e("small",{staticClass:"subline"},[t._v(t._s(t.t("files_sharing","Upload only")))])]):t._e(),t._v(" "),e("NcCheckboxRadioSwitch",{attrs:{"button-variant":!0,"data-cy-files-sharing-share-permissions-bundle":"custom",checked:t.sharingPermission,value:"custom",name:"sharing_permission_radio",type:"radio","button-variant-grouped":"vertical"},on:{"update:checked":[function(e){t.sharingPermission=e},t.expandCustomPermissions]},scopedSlots:t._u([{key:"icon",fn:function(){return[e("DotsHorizontalIcon",{attrs:{size:20}})]},proxy:!0}])},[t._v("\n\t\t\t\t\t"+t._s(t.t("files_sharing","Custom permissions"))+"\n\t\t\t\t\t"),e("small",{staticClass:"subline"},[t._v(t._s(t.customPermissionsList))])])],1)]),t._v(" "),e("div",{staticClass:"sharingTabDetailsView__advanced-control"},[e("NcButton",{attrs:{id:"advancedSectionAccordionAdvancedControl",type:"tertiary",alignment:"end-reverse","aria-controls":"advancedSectionAccordionAdvanced","aria-expanded":t.advancedControlExpandedValue},on:{click:function(e){t.advancedSectionAccordionExpanded=!t.advancedSectionAccordionExpanded}},scopedSlots:t._u([{key:"icon",fn:function(){return[t.advancedSectionAccordionExpanded?e("MenuUpIcon"):e("MenuDownIcon")]},proxy:!0}])},[t._v("\n\t\t\t\t"+t._s(t.t("files_sharing","Advanced settings"))+"\n\t\t\t\t")])],1),t._v(" "),t.advancedSectionAccordionExpanded?e("div",{staticClass:"sharingTabDetailsView__advanced",attrs:{id:"advancedSectionAccordionAdvanced","aria-labelledby":"advancedSectionAccordionAdvancedControl",role:"region"}},[e("section",[t.isPublicShare?e("NcInputField",{staticClass:"sharingTabDetailsView__label",attrs:{autocomplete:"off",label:t.t("files_sharing","Share label"),value:t.share.label},on:{"update:value":function(e){return t.$set(t.share,"label",e)}}}):t._e(),t._v(" "),t.config.allowCustomTokens&&t.isPublicShare&&!t.isNewShare?e("NcInputField",{attrs:{autocomplete:"off",label:t.t("files_sharing","Share link token"),"helper-text":t.t("files_sharing","Set the public share link token to something easy to remember or generate a new token. It is not recommended to use a guessable token for shares which contain sensitive information."),"show-trailing-button":"","trailing-button-label":t.loadingToken?t.t("files_sharing","Generating…"):t.t("files_sharing","Generate new token"),value:t.share.token},on:{"update:value":function(e){return t.$set(t.share,"token",e)},"trailing-button-click":t.generateNewToken},scopedSlots:t._u([{key:"trailing-button-icon",fn:function(){return[t.loadingToken?e("NcLoadingIcon"):e("Refresh",{attrs:{size:20}})]},proxy:!0}],null,!1,4228062821)}):t._e(),t._v(" "),t.isPublicShare?[e("NcCheckboxRadioSwitch",{attrs:{checked:t.isPasswordProtected,disabled:t.isPasswordEnforced},on:{"update:checked":function(e){t.isPasswordProtected=e}}},[t._v("\n\t\t\t\t\t\t"+t._s(t.t("files_sharing","Set password"))+"\n\t\t\t\t\t")]),t._v(" "),t.isPasswordProtected?e("NcPasswordField",{attrs:{autocomplete:"new-password",value:t.share.newPassword??"",error:t.passwordError,"helper-text":t.errorPasswordLabel||t.passwordHint,required:t.isPasswordEnforced&&t.isNewShare,label:t.t("files_sharing","Password")},on:{"update:value":t.onPasswordChange}}):t._e(),t._v(" "),t.isEmailShareType&&t.passwordExpirationTime?e("span",{attrs:{icon:"icon-info"}},[t._v("\n\t\t\t\t\t\t"+t._s(t.t("files_sharing","Password expires {passwordExpirationTime}",{passwordExpirationTime:t.passwordExpirationTime}))+"\n\t\t\t\t\t")]):t.isEmailShareType&&null!==t.passwordExpirationTime?e("span",{attrs:{icon:"icon-error"}},[t._v("\n\t\t\t\t\t\t"+t._s(t.t("files_sharing","Password expired"))+"\n\t\t\t\t\t")]):t._e()]:t._e(),t._v(" "),t.canTogglePasswordProtectedByTalkAvailable?e("NcCheckboxRadioSwitch",{attrs:{checked:t.isPasswordProtectedByTalk},on:{"update:checked":[function(e){t.isPasswordProtectedByTalk=e},t.onPasswordProtectedByTalkChange]}},[t._v("\n\t\t\t\t\t"+t._s(t.t("files_sharing","Video verification"))+"\n\t\t\t\t")]):t._e(),t._v(" "),e("NcCheckboxRadioSwitch",{attrs:{checked:t.hasExpirationDate,disabled:t.isExpiryDateEnforced},on:{"update:checked":function(e){t.hasExpirationDate=e}}},[t._v("\n\t\t\t\t\t"+t._s(t.isExpiryDateEnforced?t.t("files_sharing","Expiration date (enforced)"):t.t("files_sharing","Set expiration date"))+"\n\t\t\t\t")]),t._v(" "),t.hasExpirationDate?e("NcDateTimePickerNative",{attrs:{id:"share-date-picker",value:new Date(t.share.expireDate??t.dateTomorrow),min:t.dateTomorrow,max:t.maxExpirationDateEnforced,"hide-label":"",label:t.t("files_sharing","Expiration date"),placeholder:t.t("files_sharing","Expiration date"),type:"date"},on:{input:t.onExpirationChange}}):t._e(),t._v(" "),t.isPublicShare?e("NcCheckboxRadioSwitch",{attrs:{disabled:t.canChangeHideDownload,checked:t.share.hideDownload},on:{"update:checked":[function(e){return t.$set(t.share,"hideDownload",e)},function(e){return t.queueUpdate("hideDownload")}]}},[t._v("\n\t\t\t\t\t"+t._s(t.t("files_sharing","Hide download"))+"\n\t\t\t\t")]):e("NcCheckboxRadioSwitch",{attrs:{disabled:!t.canSetDownload,checked:t.canDownload,"data-cy-files-sharing-share-permissions-checkbox":"download"},on:{"update:checked":function(e){t.canDownload=e}}},[t._v("\n\t\t\t\t\t"+t._s(t.t("files_sharing","Allow download and sync"))+"\n\t\t\t\t")]),t._v(" "),e("NcCheckboxRadioSwitch",{attrs:{checked:t.writeNoteToRecipientIsChecked},on:{"update:checked":function(e){t.writeNoteToRecipientIsChecked=e}}},[t._v("\n\t\t\t\t\t"+t._s(t.t("files_sharing","Note to recipient"))+"\n\t\t\t\t")]),t._v(" "),t.writeNoteToRecipientIsChecked?[e("NcTextArea",{attrs:{label:t.t("files_sharing","Note to recipient"),placeholder:t.t("files_sharing","Enter a note for the share recipient"),value:t.share.note},on:{"update:value":function(e){return t.$set(t.share,"note",e)}}})]:t._e(),t._v(" "),t.isPublicShare&&t.isFolder?e("NcCheckboxRadioSwitch",{attrs:{checked:t.showInGridView},on:{"update:checked":function(e){t.showInGridView=e}}},[t._v("\n\t\t\t\t\t"+t._s(t.t("files_sharing","Show files in grid view"))+"\n\t\t\t\t")]):t._e(),t._v(" "),t._l(t.externalLinkActions,(function(r){return e("ExternalShareAction",{key:r.id,ref:"externalLinkActions",refInFor:!0,attrs:{id:r.id,action:r,"file-info":t.fileInfo,share:t.share}})})),t._v(" "),e("NcCheckboxRadioSwitch",{attrs:{checked:t.setCustomPermissions},on:{"update:checked":function(e){t.setCustomPermissions=e}}},[t._v("\n\t\t\t\t\t"+t._s(t.t("files_sharing","Custom permissions"))+"\n\t\t\t\t")]),t._v(" "),t.setCustomPermissions?e("section",{staticClass:"custom-permissions-group"},[e("NcCheckboxRadioSwitch",{attrs:{disabled:!t.canRemoveReadPermission,checked:t.hasRead,"data-cy-files-sharing-share-permissions-checkbox":"read"},on:{"update:checked":function(e){t.hasRead=e}}},[t._v("\n\t\t\t\t\t\t"+t._s(t.t("files_sharing","Read"))+"\n\t\t\t\t\t")]),t._v(" "),t.isFolder?e("NcCheckboxRadioSwitch",{attrs:{disabled:!t.canSetCreate,checked:t.canCreate,"data-cy-files-sharing-share-permissions-checkbox":"create"},on:{"update:checked":function(e){t.canCreate=e}}},[t._v("\n\t\t\t\t\t\t"+t._s(t.t("files_sharing","Create"))+"\n\t\t\t\t\t")]):t._e(),t._v(" "),e("NcCheckboxRadioSwitch",{attrs:{disabled:!t.canSetEdit,checked:t.canEdit,"data-cy-files-sharing-share-permissions-checkbox":"update"},on:{"update:checked":function(e){t.canEdit=e}}},[t._v("\n\t\t\t\t\t\t"+t._s(t.t("files_sharing","Edit"))+"\n\t\t\t\t\t")]),t._v(" "),t.resharingIsPossible?e("NcCheckboxRadioSwitch",{attrs:{disabled:!t.canSetReshare,checked:t.canReshare,"data-cy-files-sharing-share-permissions-checkbox":"share"},on:{"update:checked":function(e){t.canReshare=e}}},[t._v("\n\t\t\t\t\t\t"+t._s(t.t("files_sharing","Share"))+"\n\t\t\t\t\t")]):t._e(),t._v(" "),e("NcCheckboxRadioSwitch",{attrs:{disabled:!t.canSetDelete,checked:t.canDelete,"data-cy-files-sharing-share-permissions-checkbox":"delete"},on:{"update:checked":function(e){t.canDelete=e}}},[t._v("\n\t\t\t\t\t\t"+t._s(t.t("files_sharing","Delete"))+"\n\t\t\t\t\t")])],1):t._e()],2)]):t._e()]),t._v(" "),e("div",{staticClass:"sharingTabDetailsView__footer"},[e("div",{staticClass:"button-group"},[e("NcButton",{attrs:{"data-cy-files-sharing-share-editor-action":"cancel"},on:{click:t.cancel}},[t._v("\n\t\t\t\t"+t._s(t.t("files_sharing","Cancel"))+"\n\t\t\t")]),t._v(" "),e("div",{staticClass:"sharingTabDetailsView__delete"},[t.isNewShare?t._e():e("NcButton",{attrs:{"aria-label":t.t("files_sharing","Delete share"),disabled:!1,readonly:!1,variant:"tertiary"},on:{click:function(e){return e.preventDefault(),t.removeShare.apply(null,arguments)}},scopedSlots:t._u([{key:"icon",fn:function(){return[e("CloseIcon",{attrs:{size:20}})]},proxy:!0}],null,!1,2428343285)},[t._v("\n\t\t\t\t\t"+t._s(t.t("files_sharing","Delete share"))+"\n\t\t\t\t")])],1),t._v(" "),e("NcButton",{attrs:{type:"primary","data-cy-files-sharing-share-editor-action":"save",disabled:t.creating},on:{click:t.saveShare},scopedSlots:t._u([t.creating?{key:"icon",fn:function(){return[e("NcLoadingIcon")]},proxy:!0}:null],null,!0)},[t._v("\n\t\t\t\t"+t._s(t.shareButtonText)+"\n\t\t\t\t")])],1)])])}),[],!1,null,"18266eae",null).exports,Xe={name:"SharingTab",components:{InfoIcon:f.A,NcAvatar:c.A,NcButton:u.A,NcCollectionList:d.N,NcPopover:p.N,SharingEntryInternal:z,SharingEntrySimple:$,SharingInherited:Et,SharingInput:nt,SharingLinkList:ge,SharingList:we,SharingDetailsTab:Ye},mixins:[tt],data:()=>({config:new m,deleteEvent:null,error:"",expirationInterval:null,loading:!0,fileInfo:null,reshare:null,sharedWithMe:{},shares:[],linkShares:[],externalShares:[],sections:OCA.Sharing.ShareTabSections.getSections(),projectsEnabled:(0,o.C)("core","projects_enabled",!1),showSharingDetailsView:!1,shareDetailsData:{},returnFocusElement:null,internalSharesHelpText:t("files_sharing","Use this method to share files with individuals or teams within your organization. If the recipient already has access to the share but cannot locate it, you can send them the internal share link for easy access."),externalSharesHelpText:t("files_sharing","Use this method to share files with individuals or organizations outside your organization. Files and folders can be shared via public share links and email addresses. You can also share to other Nextcloud accounts hosted on different instances using their federated cloud ID."),additionalSharesHelpText:t("files_sharing","Shares that are not part of the internal or external shares. This can be shares from apps or other sources.")}),computed:{isSharedWithMe(){return null!==this.sharedWithMe&&void 0!==this.sharedWithMe},isLinkSharingAllowed(){if(!(0,n.HW)())return!1;const t=(0,s.F)();return!0===(t.files_sharing?.public||{}).enabled},canReshare(){return!!(this.fileInfo.permissions&OC.PERMISSION_SHARE)||!!(this.reshare&&this.reshare.hasSharePermission&&this.config.isResharingAllowed)},internalShareInputPlaceholder(){return this.config.showFederatedSharesAsInternal?t("files_sharing","Share with accounts, teams, federated cloud IDs"):t("files_sharing","Share with accounts and teams")},externalShareInputPlaceholder(){return this.isLinkSharingAllowed?this.config.showFederatedSharesAsInternal?t("files_sharing","Email"):t("files_sharing","Email, federated cloud ID"):t("files_sharing","Federated cloud ID")}},methods:{async update(t){this.fileInfo=t,this.resetState(),this.getShares()},async getShares(){try{this.loading=!0;const t=(0,l.KT)("apps/files_sharing/api/v1/shares"),e="json",r=(this.fileInfo.path+"/"+this.fileInfo.name).replace("//","/"),i=g.Ay.get(t,{params:{format:e,path:r,reshares:!0}}),n=g.Ay.get(t,{params:{format:e,path:r,shared_with_me:!0}}),[s,a]=await Promise.all([i,n]);this.loading=!1,this.processSharedWithMe(a),this.processShares(s)}catch(e){this.error=e?.response?.data?.ocs?.meta?.message?e.response.data.ocs.meta.message:t("files_sharing","Unable to load the shares list"),this.loading=!1,console.error("Error loading the shares list",e)}},resetState(){clearInterval(this.expirationInterval),this.loading=!0,this.error="",this.sharedWithMe={},this.shares=[],this.linkShares=[],this.showSharingDetailsView=!1,this.shareDetailsData={}},updateExpirationSubtitle(e){const r=(0,A.A)(e.expireDate).unix();this.$set(this.sharedWithMe,"subtitle",t("files_sharing","Expires {relativetime}",{relativetime:(0,A.A)(1e3*r).fromNow()})),(0,A.A)().unix()>r&&(clearInterval(this.expirationInterval),this.$set(this.sharedWithMe,"subtitle",t("files_sharing","this share just expired.")))},processShares(t){let{data:e}=t;if(e.ocs&&e.ocs.data&&e.ocs.data.length>0){const t=(0,a.My)(e.ocs.data.map((t=>new _(t))),[t=>t.shareWithDisplayName,t=>t.label,t=>t.createdTime]);for(const e of t)[h.I.Link,h.I.Email].includes(e.type)?this.linkShares.push(e):[h.I.Remote,h.I.RemoteGroup].includes(e.type)?this.config.showFederatedSharesToTrustedServersAsInternal?e.isTrustedServer?this.shares.push(e):this.externalShares.push(e):this.config.showFederatedSharesAsInternal?this.shares.push(e):this.externalShares.push(e):this.shares.push(e);y.debug(`Processed ${this.linkShares.length} link share(s)`),y.debug(`Processed ${this.shares.length} share(s)`),y.debug(`Processed ${this.externalShares.length} external share(s)`)}},processSharedWithMe(e){let{data:r}=e;if(r.ocs&&r.ocs.data&&r.ocs.data[0]){const e=new _(r),i=function(e){return e.type===h.I.Group?t("files_sharing","Shared with you and the group {group} by {owner}",{group:e.shareWithDisplayName,owner:e.ownerDisplayName},void 0,{escape:!1}):e.type===h.I.Team?t("files_sharing","Shared with you and {circle} by {owner}",{circle:e.shareWithDisplayName,owner:e.ownerDisplayName},void 0,{escape:!1}):e.type===h.I.Room?e.shareWithDisplayName?t("files_sharing","Shared with you and the conversation {conversation} by {owner}",{conversation:e.shareWithDisplayName,owner:e.ownerDisplayName},void 0,{escape:!1}):t("files_sharing","Shared with you in a conversation by {owner}",{owner:e.ownerDisplayName},void 0,{escape:!1}):t("files_sharing","Shared with you by {owner}",{owner:e.ownerDisplayName},void 0,{escape:!1})}(e),n=e.ownerDisplayName,s=e.owner;this.sharedWithMe={displayName:n,title:i,user:s},this.reshare=e,e.expireDate&&(0,A.A)(e.expireDate).unix()>(0,A.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(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>{};t.type===h.I.Email?this.linkShares.unshift(t):[h.I.Remote,h.I.RemoteGroup].includes(t.type)?(this.config.showFederatedSharesAsInternal&&this.shares.unshift(t),this.config.showFederatedSharesToTrustedServersAsInternal?t.isTrustedServer&&this.shares.unshift(t):this.externalShares.unshift(t)):this.shares.unshift(t),this.awaitForShare(t,e)},removeShare(t){const e=t.type===h.I.Email||t.type===h.I.Link?this.linkShares:this.shares,r=e.findIndex((e=>e.id===t.id));-1!==r&&e.splice(r,1)},awaitForShare(t,e){this.$nextTick((()=>{let r=this.$refs.shareList;t.type===h.I.Email&&(r=this.$refs.linkShareList);const i=r.$children.find((e=>e.share===t));i&&e(i)}))},toggleShareDetailsView(t){if(!this.showSharingDetailsView)if(Array.from(document.activeElement.classList).some((t=>t.startsWith("action-")))){const t=document.activeElement.closest('[role="menu"]')?.id;this.returnFocusElement=document.querySelector(`[aria-controls="${t}"]`)}else this.returnFocusElement=document.activeElement;t&&(this.shareDetailsData=t),this.showSharingDetailsView=!this.showSharingDetailsView,this.showSharingDetailsView||this.$nextTick((()=>{this.returnFocusElement?.focus(),this.returnFocusElement=null}))}}},Qe=Xe;var Ke=i(8679),Je={};Je.styleTagTransform=M(),Je.setAttributes=R(),Je.insert=k().bind(null,"head"),Je.domAPI=D(),Je.insertStyleElement=B(),T()(Ke.A,Je),Ke.A&&Ke.A.locals&&Ke.A.locals;const Ze=(0,V.A)(Qe,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"sharingTab",class:{"icon-loading":t.loading}},[t.error?e("div",{staticClass:"emptycontent",class:{emptyContentWithSections:t.sections.length>0}},[e("div",{staticClass:"icon icon-error"}),t._v(" "),e("h2",[t._v(t._s(t.error))])]):t._e(),t._v(" "),e("div",{directives:[{name:"show",rawName:"v-show",value:!t.showSharingDetailsView,expression:"!showSharingDetailsView"}],staticClass:"sharingTab__content"},[t.isSharedWithMe?e("ul",[e("SharingEntrySimple",t._b({staticClass:"sharing-entry__reshare",scopedSlots:t._u([{key:"avatar",fn:function(){return[e("NcAvatar",{staticClass:"sharing-entry__avatar",attrs:{user:t.sharedWithMe.user,"display-name":t.sharedWithMe.displayName}})]},proxy:!0}],null,!1,3197855346)},"SharingEntrySimple",t.sharedWithMe,!1))],1):t._e(),t._v(" "),e("section",[e("div",{staticClass:"section-header"},[e("h4",[t._v(t._s(t.t("files_sharing","Internal shares")))]),t._v(" "),e("NcPopover",{attrs:{"popup-role":"dialog"},scopedSlots:t._u([{key:"trigger",fn:function(){return[e("NcButton",{staticClass:"hint-icon",attrs:{type:"tertiary-no-background","aria-label":t.t("files_sharing","Internal shares explanation")},scopedSlots:t._u([{key:"icon",fn:function(){return[e("InfoIcon",{attrs:{size:20}})]},proxy:!0}])})]},proxy:!0}])},[t._v(" "),e("p",{staticClass:"hint-body"},[t._v("\n\t\t\t\t\t\t"+t._s(t.internalSharesHelpText)+"\n\t\t\t\t\t")])])],1),t._v(" "),t.loading?t._e():e("SharingInput",{attrs:{"can-reshare":t.canReshare,"file-info":t.fileInfo,"link-shares":t.linkShares,reshare:t.reshare,shares:t.shares,placeholder:t.internalShareInputPlaceholder},on:{"open-sharing-details":t.toggleShareDetailsView}}),t._v(" "),t.loading?t._e():e("SharingList",{ref:"shareList",attrs:{shares:t.shares,"file-info":t.fileInfo},on:{"open-sharing-details":t.toggleShareDetailsView}}),t._v(" "),t.canReshare&&!t.loading?e("SharingInherited",{attrs:{"file-info":t.fileInfo}}):t._e(),t._v(" "),e("SharingEntryInternal",{attrs:{"file-info":t.fileInfo}})],1),t._v(" "),e("section",[e("div",{staticClass:"section-header"},[e("h4",[t._v(t._s(t.t("files_sharing","External shares")))]),t._v(" "),e("NcPopover",{attrs:{"popup-role":"dialog"},scopedSlots:t._u([{key:"trigger",fn:function(){return[e("NcButton",{staticClass:"hint-icon",attrs:{type:"tertiary-no-background","aria-label":t.t("files_sharing","External shares explanation")},scopedSlots:t._u([{key:"icon",fn:function(){return[e("InfoIcon",{attrs:{size:20}})]},proxy:!0}])})]},proxy:!0}])},[t._v(" "),e("p",{staticClass:"hint-body"},[t._v("\n\t\t\t\t\t\t"+t._s(t.externalSharesHelpText)+"\n\t\t\t\t\t")])])],1),t._v(" "),t.loading?t._e():e("SharingInput",{attrs:{"can-reshare":t.canReshare,"file-info":t.fileInfo,"link-shares":t.linkShares,"is-external":!0,placeholder:t.externalShareInputPlaceholder,reshare:t.reshare,shares:t.shares},on:{"open-sharing-details":t.toggleShareDetailsView}}),t._v(" "),t.loading?t._e():e("SharingList",{attrs:{shares:t.externalShares,"file-info":t.fileInfo},on:{"open-sharing-details":t.toggleShareDetailsView}}),t._v(" "),!t.loading&&t.isLinkSharingAllowed?e("SharingLinkList",{ref:"linkShareList",attrs:{"can-reshare":t.canReshare,"file-info":t.fileInfo,shares:t.linkShares},on:{"open-sharing-details":t.toggleShareDetailsView}}):t._e()],1),t._v(" "),t.sections.length>0&&!t.showSharingDetailsView?e("section",[e("div",{staticClass:"section-header"},[e("h4",[t._v(t._s(t.t("files_sharing","Additional shares")))]),t._v(" "),e("NcPopover",{attrs:{"popup-role":"dialog"},scopedSlots:t._u([{key:"trigger",fn:function(){return[e("NcButton",{staticClass:"hint-icon",attrs:{type:"tertiary-no-background","aria-label":t.t("files_sharing","Additional shares explanation")},scopedSlots:t._u([{key:"icon",fn:function(){return[e("InfoIcon",{attrs:{size:20}})]},proxy:!0}],null,!1,915383693)})]},proxy:!0}],null,!1,1027936137)},[t._v(" "),e("p",{staticClass:"hint-body"},[t._v("\n\t\t\t\t\t\t"+t._s(t.additionalSharesHelpText)+"\n\t\t\t\t\t")])])],1),t._v(" "),t._l(t.sections,(function(r,i){return e("div",{key:i,ref:"section-"+i,refInFor:!0,staticClass:"sharingTab__additionalContent"},[e(r(t.$refs["section-"+i],t.fileInfo),{tag:"component",attrs:{"file-info":t.fileInfo}})],1)})),t._v(" "),t.projectsEnabled?e("div",{directives:[{name:"show",rawName:"v-show",value:!t.showSharingDetailsView&&t.fileInfo,expression:"!showSharingDetailsView && fileInfo"}],staticClass:"sharingTab__additionalContent"},[e("NcCollectionList",{attrs:{id:`${t.fileInfo.id}`,type:"file",name:t.fileInfo.name}})],1):t._e()],2):t._e()]),t._v(" "),t.showSharingDetailsView?e("SharingDetailsTab",{attrs:{"file-info":t.shareDetailsData.fileInfo,share:t.shareDetailsData.share},on:{"close-sharing-details":t.toggleShareDetailsView,"add:share":t.addShare,"remove:share":t.removeShare}}):t._e()],1)}),[],!1,null,"74a42206",null).exports},35810:(t,e,r)=>{"use strict";r.d(e,{Al:()=>o.r,H4:()=>o.c,KT:()=>L,My:()=>U,Q$:()=>o.e,R3:()=>o.n,VL:()=>o.l,di:()=>R,lJ:()=>o.d,nF:()=>P,pt:()=>o.F,ur:()=>V,v7:()=>M});var i,n,s,a,o=r(68896),l=r(380),h=r(83141),c=r(87485),u=(r(43627),r(53334)),d=r(65606),p=r(62045).hp;function f(){if(n)return i;n=1;const t="object"==typeof d&&d.env&&d.env.NODE_DEBUG&&/\bsemver\b/i.test(d.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};return i=t}function g(){if(a)return s;a=1;const t=Number.MAX_SAFE_INTEGER||9007199254740991;return s={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:t,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}}var A,m,y,_,v,w,E,C,b,S,x,T,I,D={exports:{}};function N(){if(E)return w;E=1;const t=f(),{MAX_LENGTH:e,MAX_SAFE_INTEGER:r}=g(),{safeRe:i,t:n}=(A||(A=1,function(t,e){const{MAX_SAFE_COMPONENT_LENGTH:r,MAX_SAFE_BUILD_LENGTH:i,MAX_LENGTH:n}=g(),s=f(),a=(e=t.exports={}).re=[],o=e.safeRe=[],l=e.src=[],h=e.t={};let c=0;const u="[a-zA-Z0-9-]",d=[["\\s",1],["\\d",n],[u,i]],p=(t,e,r)=>{const i=(t=>{for(const[e,r]of d)t=t.split(`${e}*`).join(`${e}{0,${r}}`).split(`${e}+`).join(`${e}{1,${r}}`);return t})(e),n=c++;s(t,n,e),h[t]=n,l[n]=e,a[n]=new RegExp(e,r?"g":void 0),o[n]=new RegExp(i,r?"g":void 0)};p("NUMERICIDENTIFIER","0|[1-9]\\d*"),p("NUMERICIDENTIFIERLOOSE","\\d+"),p("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${u}*`),p("MAINVERSION",`(${l[h.NUMERICIDENTIFIER]})\\.(${l[h.NUMERICIDENTIFIER]})\\.(${l[h.NUMERICIDENTIFIER]})`),p("MAINVERSIONLOOSE",`(${l[h.NUMERICIDENTIFIERLOOSE]})\\.(${l[h.NUMERICIDENTIFIERLOOSE]})\\.(${l[h.NUMERICIDENTIFIERLOOSE]})`),p("PRERELEASEIDENTIFIER",`(?:${l[h.NUMERICIDENTIFIER]}|${l[h.NONNUMERICIDENTIFIER]})`),p("PRERELEASEIDENTIFIERLOOSE",`(?:${l[h.NUMERICIDENTIFIERLOOSE]}|${l[h.NONNUMERICIDENTIFIER]})`),p("PRERELEASE",`(?:-(${l[h.PRERELEASEIDENTIFIER]}(?:\\.${l[h.PRERELEASEIDENTIFIER]})*))`),p("PRERELEASELOOSE",`(?:-?(${l[h.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${l[h.PRERELEASEIDENTIFIERLOOSE]})*))`),p("BUILDIDENTIFIER",`${u}+`),p("BUILD",`(?:\\+(${l[h.BUILDIDENTIFIER]}(?:\\.${l[h.BUILDIDENTIFIER]})*))`),p("FULLPLAIN",`v?${l[h.MAINVERSION]}${l[h.PRERELEASE]}?${l[h.BUILD]}?`),p("FULL",`^${l[h.FULLPLAIN]}$`),p("LOOSEPLAIN",`[v=\\s]*${l[h.MAINVERSIONLOOSE]}${l[h.PRERELEASELOOSE]}?${l[h.BUILD]}?`),p("LOOSE",`^${l[h.LOOSEPLAIN]}$`),p("GTLT","((?:<|>)?=?)"),p("XRANGEIDENTIFIERLOOSE",`${l[h.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),p("XRANGEIDENTIFIER",`${l[h.NUMERICIDENTIFIER]}|x|X|\\*`),p("XRANGEPLAIN",`[v=\\s]*(${l[h.XRANGEIDENTIFIER]})(?:\\.(${l[h.XRANGEIDENTIFIER]})(?:\\.(${l[h.XRANGEIDENTIFIER]})(?:${l[h.PRERELEASE]})?${l[h.BUILD]}?)?)?`),p("XRANGEPLAINLOOSE",`[v=\\s]*(${l[h.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[h.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[h.XRANGEIDENTIFIERLOOSE]})(?:${l[h.PRERELEASELOOSE]})?${l[h.BUILD]}?)?)?`),p("XRANGE",`^${l[h.GTLT]}\\s*${l[h.XRANGEPLAIN]}$`),p("XRANGELOOSE",`^${l[h.GTLT]}\\s*${l[h.XRANGEPLAINLOOSE]}$`),p("COERCEPLAIN",`(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?`),p("COERCE",`${l[h.COERCEPLAIN]}(?:$|[^\\d])`),p("COERCEFULL",l[h.COERCEPLAIN]+`(?:${l[h.PRERELEASE]})?(?:${l[h.BUILD]})?(?:$|[^\\d])`),p("COERCERTL",l[h.COERCE],!0),p("COERCERTLFULL",l[h.COERCEFULL],!0),p("LONETILDE","(?:~>?)"),p("TILDETRIM",`(\\s*)${l[h.LONETILDE]}\\s+`,!0),e.tildeTrimReplace="$1~",p("TILDE",`^${l[h.LONETILDE]}${l[h.XRANGEPLAIN]}$`),p("TILDELOOSE",`^${l[h.LONETILDE]}${l[h.XRANGEPLAINLOOSE]}$`),p("LONECARET","(?:\\^)"),p("CARETTRIM",`(\\s*)${l[h.LONECARET]}\\s+`,!0),e.caretTrimReplace="$1^",p("CARET",`^${l[h.LONECARET]}${l[h.XRANGEPLAIN]}$`),p("CARETLOOSE",`^${l[h.LONECARET]}${l[h.XRANGEPLAINLOOSE]}$`),p("COMPARATORLOOSE",`^${l[h.GTLT]}\\s*(${l[h.LOOSEPLAIN]})$|^$`),p("COMPARATOR",`^${l[h.GTLT]}\\s*(${l[h.FULLPLAIN]})$|^$`),p("COMPARATORTRIM",`(\\s*)${l[h.GTLT]}\\s*(${l[h.LOOSEPLAIN]}|${l[h.XRANGEPLAIN]})`,!0),e.comparatorTrimReplace="$1$2$3",p("HYPHENRANGE",`^\\s*(${l[h.XRANGEPLAIN]})\\s+-\\s+(${l[h.XRANGEPLAIN]})\\s*$`),p("HYPHENRANGELOOSE",`^\\s*(${l[h.XRANGEPLAINLOOSE]})\\s+-\\s+(${l[h.XRANGEPLAINLOOSE]})\\s*$`),p("STAR","(<|>)?=?\\s*\\*"),p("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),p("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}(D,D.exports)),D.exports),s=function(){if(y)return m;y=1;const t=Object.freeze({loose:!0}),e=Object.freeze({});return m=r=>r?"object"!=typeof r?t:r:e}(),{compareIdentifiers:a}=function(){if(v)return _;v=1;const t=/^[0-9]+$/,e=(e,r)=>{const i=t.test(e),n=t.test(r);return i&&n&&(e=+e,r=+r),e===r?0:i&&!n?-1:n&&!i?1:ee(r,t)}}();class o{constructor(a,l){if(l=s(l),a instanceof o){if(a.loose===!!l.loose&&a.includePrerelease===!!l.includePrerelease)return a;a=a.version}else if("string"!=typeof a)throw new TypeError(`Invalid version. Must be a string. Got type "${typeof a}".`);if(a.length>e)throw new TypeError(`version is longer than ${e} characters`);t("SemVer",a,l),this.options=l,this.loose=!!l.loose,this.includePrerelease=!!l.includePrerelease;const h=a.trim().match(l.loose?i[n.LOOSE]:i[n.FULL]);if(!h)throw new TypeError(`Invalid Version: ${a}`);if(this.raw=a,this.major=+h[1],this.minor=+h[2],this.patch=+h[3],this.major>r||this.major<0)throw new TypeError("Invalid major version");if(this.minor>r||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>r||this.patch<0)throw new TypeError("Invalid patch version");h[4]?this.prerelease=h[4].split(".").map((t=>{if(/^[0-9]+$/.test(t)){const e=+t;if(e>=0&&e=0;)"number"==typeof this.prerelease[i]&&(this.prerelease[i]++,i=-2);if(-1===i){if(e===this.prerelease.join(".")&&!1===r)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(t)}}if(e){let i=[e,t];!1===r&&(i=[e]),0===a(this.prerelease[0],e)?isNaN(this.prerelease[1])&&(this.prerelease=i):this.prerelease=i}break}default:throw new Error(`invalid increment argument: ${t}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}return w=o}!function(){if(x)return S;x=1;const t=function(){if(b)return C;b=1;const t=N();return C=(e,r,i=!1)=>{if(e instanceof t)return e;try{return new t(e,r)}catch(t){if(!i)return null;throw t}}}();S=(e,r)=>{const i=t(e,r);return i?i.version:null}}(),function(){if(I)return T;I=1;const t=N();T=(e,r)=>new t(e,r).major}(),l.m;var k;k||(k=1,function(t){t.parser=function(t,e){return new i(t,e)},t.SAXParser=i,t.SAXStream=s,t.createStream=function(t,e){return new s(t,e)},t.MAX_BUFFER_LENGTH=65536;var e,r=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];function i(e,n){if(!(this instanceof i))return new i(e,n);var s=this;!function(t){for(var e=0,i=r.length;e"===s?(I(i,"onsgmldeclaration",i.sgmlDecl),i.sgmlDecl="",i.state=S.TEXT):y(s)?(i.state=S.SGML_DECL_QUOTED,i.sgmlDecl+=s):i.sgmlDecl+=s;continue;case S.SGML_DECL_QUOTED:s===i.q&&(i.state=S.SGML_DECL,i.q=""),i.sgmlDecl+=s;continue;case S.DOCTYPE:">"===s?(i.state=S.TEXT,I(i,"ondoctype",i.doctype),i.doctype=!0):(i.doctype+=s,"["===s?i.state=S.DOCTYPE_DTD:y(s)&&(i.state=S.DOCTYPE_QUOTED,i.q=s));continue;case S.DOCTYPE_QUOTED:i.doctype+=s,s===i.q&&(i.q="",i.state=S.DOCTYPE);continue;case S.DOCTYPE_DTD:"]"===s?(i.doctype+=s,i.state=S.DOCTYPE):"<"===s?(i.state=S.OPEN_WAKA,i.startTagPosition=i.position):y(s)?(i.doctype+=s,i.state=S.DOCTYPE_DTD_QUOTED,i.q=s):i.doctype+=s;continue;case S.DOCTYPE_DTD_QUOTED:i.doctype+=s,s===i.q&&(i.state=S.DOCTYPE_DTD,i.q="");continue;case S.COMMENT:"-"===s?i.state=S.COMMENT_ENDING:i.comment+=s;continue;case S.COMMENT_ENDING:"-"===s?(i.state=S.COMMENT_ENDED,i.comment=N(i.opt,i.comment),i.comment&&I(i,"oncomment",i.comment),i.comment=""):(i.comment+="-"+s,i.state=S.COMMENT);continue;case S.COMMENT_ENDED:">"!==s?(R(i,"Malformed comment"),i.comment+="--"+s,i.state=S.COMMENT):i.doctype&&!0!==i.doctype?i.state=S.DOCTYPE_DTD:i.state=S.TEXT;continue;case S.CDATA:"]"===s?i.state=S.CDATA_ENDING:i.cdata+=s;continue;case S.CDATA_ENDING:"]"===s?i.state=S.CDATA_ENDING_2:(i.cdata+="]"+s,i.state=S.CDATA);continue;case S.CDATA_ENDING_2:">"===s?(i.cdata&&I(i,"oncdata",i.cdata),I(i,"onclosecdata"),i.cdata="",i.state=S.TEXT):"]"===s?i.cdata+="]":(i.cdata+="]]"+s,i.state=S.CDATA);continue;case S.PROC_INST:"?"===s?i.state=S.PROC_INST_ENDING:m(s)?i.state=S.PROC_INST_BODY:i.procInstName+=s;continue;case S.PROC_INST_BODY:if(!i.procInstBody&&m(s))continue;"?"===s?i.state=S.PROC_INST_ENDING:i.procInstBody+=s;continue;case S.PROC_INST_ENDING:">"===s?(I(i,"onprocessinginstruction",{name:i.procInstName,body:i.procInstBody}),i.procInstName=i.procInstBody="",i.state=S.TEXT):(i.procInstBody+="?"+s,i.state=S.PROC_INST_BODY);continue;case S.OPEN_TAG:v(f,s)?i.tagName+=s:(L(i),">"===s?M(i):"/"===s?i.state=S.OPEN_TAG_SLASH:(m(s)||R(i,"Invalid character in tag name"),i.state=S.ATTRIB));continue;case S.OPEN_TAG_SLASH:">"===s?(M(i,!0),F(i)):(R(i,"Forward-slash in opening tag not followed by >"),i.state=S.ATTRIB);continue;case S.ATTRIB:if(m(s))continue;">"===s?M(i):"/"===s?i.state=S.OPEN_TAG_SLASH:v(d,s)?(i.attribName=s,i.attribValue="",i.state=S.ATTRIB_NAME):R(i,"Invalid attribute name");continue;case S.ATTRIB_NAME:"="===s?i.state=S.ATTRIB_VALUE:">"===s?(R(i,"Attribute without value"),i.attribValue=i.attribName,O(i),M(i)):m(s)?i.state=S.ATTRIB_NAME_SAW_WHITE:v(f,s)?i.attribName+=s:R(i,"Invalid attribute name");continue;case S.ATTRIB_NAME_SAW_WHITE:if("="===s)i.state=S.ATTRIB_VALUE;else{if(m(s))continue;R(i,"Attribute without value"),i.tag.attributes[i.attribName]="",i.attribValue="",I(i,"onattribute",{name:i.attribName,value:""}),i.attribName="",">"===s?M(i):v(d,s)?(i.attribName=s,i.state=S.ATTRIB_NAME):(R(i,"Invalid attribute name"),i.state=S.ATTRIB)}continue;case S.ATTRIB_VALUE:if(m(s))continue;y(s)?(i.q=s,i.state=S.ATTRIB_VALUE_QUOTED):(i.opt.unquotedAttributeValues||k(i,"Unquoted attribute value"),i.state=S.ATTRIB_VALUE_UNQUOTED,i.attribValue=s);continue;case S.ATTRIB_VALUE_QUOTED:if(s!==i.q){"&"===s?i.state=S.ATTRIB_VALUE_ENTITY_Q:i.attribValue+=s;continue}O(i),i.q="",i.state=S.ATTRIB_VALUE_CLOSED;continue;case S.ATTRIB_VALUE_CLOSED:m(s)?i.state=S.ATTRIB:">"===s?M(i):"/"===s?i.state=S.OPEN_TAG_SLASH:v(d,s)?(R(i,"No whitespace between attributes"),i.attribName=s,i.attribValue="",i.state=S.ATTRIB_NAME):R(i,"Invalid attribute name");continue;case S.ATTRIB_VALUE_UNQUOTED:if(!_(s)){"&"===s?i.state=S.ATTRIB_VALUE_ENTITY_U:i.attribValue+=s;continue}O(i),">"===s?M(i):i.state=S.ATTRIB;continue;case S.CLOSE_TAG:if(i.tagName)">"===s?F(i):v(f,s)?i.tagName+=s:i.script?(i.script+=""===s?F(i):R(i,"Invalid characters in closing tag");continue;case S.TEXT_ENTITY:case S.ATTRIB_VALUE_ENTITY_Q:case S.ATTRIB_VALUE_ENTITY_U:var c,u;switch(i.state){case S.TEXT_ENTITY:c=S.TEXT,u="textNode";break;case S.ATTRIB_VALUE_ENTITY_Q:c=S.ATTRIB_VALUE_QUOTED,u="attribValue";break;case S.ATTRIB_VALUE_ENTITY_U:c=S.ATTRIB_VALUE_UNQUOTED,u="attribValue"}if(";"===s){var p=U(i);i.opt.unparsedEntities&&!Object.values(t.XML_ENTITIES).includes(p)?(i.entity="",i.state=c,i.write(p)):(i[u]+=p,i.entity="",i.state=c)}else v(i.entity.length?A:g,s)?i.entity+=s:(R(i,"Invalid character in entity name"),i[u]+="&"+i.entity+s,i.entity="",i.state=c);continue;default:throw new Error(i,"Unknown state: "+i.state)}return i.position>=i.bufferCheckPosition&&function(e){for(var i=Math.max(t.MAX_BUFFER_LENGTH,10),n=0,s=0,a=r.length;si)switch(r[s]){case"textNode":D(e);break;case"cdata":I(e,"oncdata",e.cdata),e.cdata="";break;case"script":I(e,"onscript",e.script),e.script="";break;default:k(e,"Max buffer length exceeded: "+r[s])}n=Math.max(n,o)}var l=t.MAX_BUFFER_LENGTH-n;e.bufferCheckPosition=l+e.position}(i),i},resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){var t;D(t=this),""!==t.cdata&&(I(t,"oncdata",t.cdata),t.cdata=""),""!==t.script&&(I(t,"onscript",t.script),t.script="")}};try{e=require("stream").Stream}catch(t){e=function(){}}e||(e=function(){});var n=t.EVENTS.filter((function(t){return"error"!==t&&"end"!==t}));function s(t,r){if(!(this instanceof s))return new s(t,r);e.apply(this),this._parser=new i(t,r),this.writable=!0,this.readable=!0;var a=this;this._parser.onend=function(){a.emit("end")},this._parser.onerror=function(t){a.emit("error",t),a._parser.error=null},this._decoder=null,n.forEach((function(t){Object.defineProperty(a,"on"+t,{get:function(){return a._parser["on"+t]},set:function(e){if(!e)return a.removeAllListeners(t),a._parser["on"+t]=e,e;a.on(t,e)},enumerable:!0,configurable:!1})}))}s.prototype=Object.create(e.prototype,{constructor:{value:s}}),s.prototype.write=function(t){if("function"==typeof p&&"function"==typeof p.isBuffer&&p.isBuffer(t)){if(!this._decoder){var e=h.I;this._decoder=new e("utf8")}t=this._decoder.write(t)}return this._parser.write(t.toString()),this.emit("data",t),!0},s.prototype.end=function(t){return t&&t.length&&this.write(t),this._parser.end(),!0},s.prototype.on=function(t,r){var i=this;return i._parser["on"+t]||-1===n.indexOf(t)||(i._parser["on"+t]=function(){var e=1===arguments.length?[arguments[0]]:Array.apply(null,arguments);e.splice(0,0,t),i.emit.apply(i,e)}),e.prototype.on.call(i,t,r)};var a="[CDATA[",o="DOCTYPE",l="http://www.w3.org/XML/1998/namespace",c="http://www.w3.org/2000/xmlns/",u={xml:l,xmlns:c},d=/[:_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]/,f=/[:_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\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,g=/[#:_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]/,A=/[#:_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\u00B7\u0300-\u036F\u203F-\u2040.\d-]/;function m(t){return" "===t||"\n"===t||"\r"===t||"\t"===t}function y(t){return'"'===t||"'"===t}function _(t){return">"===t||m(t)}function v(t,e){return t.test(e)}function w(t,e){return!v(t,e)}var E,C,b,S=0;for(var x in t.STATE={BEGIN:S++,BEGIN_WHITESPACE:S++,TEXT:S++,TEXT_ENTITY:S++,OPEN_WAKA:S++,SGML_DECL:S++,SGML_DECL_QUOTED:S++,DOCTYPE:S++,DOCTYPE_QUOTED:S++,DOCTYPE_DTD:S++,DOCTYPE_DTD_QUOTED:S++,COMMENT_STARTING:S++,COMMENT:S++,COMMENT_ENDING:S++,COMMENT_ENDED:S++,CDATA:S++,CDATA_ENDING:S++,CDATA_ENDING_2:S++,PROC_INST:S++,PROC_INST_BODY:S++,PROC_INST_ENDING:S++,OPEN_TAG:S++,OPEN_TAG_SLASH:S++,ATTRIB:S++,ATTRIB_NAME:S++,ATTRIB_NAME_SAW_WHITE:S++,ATTRIB_VALUE:S++,ATTRIB_VALUE_QUOTED:S++,ATTRIB_VALUE_CLOSED:S++,ATTRIB_VALUE_UNQUOTED:S++,ATTRIB_VALUE_ENTITY_Q:S++,ATTRIB_VALUE_ENTITY_U:S++,CLOSE_TAG:S++,CLOSE_TAG_SAW_WHITE:S++,SCRIPT:S++,SCRIPT_ENDING:S++},t.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},t.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},Object.keys(t.ENTITIES).forEach((function(e){var r=t.ENTITIES[e],i="number"==typeof r?String.fromCharCode(r):r;t.ENTITIES[e]=i})),t.STATE)t.STATE[t.STATE[x]]=x;function T(t,e,r){t[e]&&t[e](r)}function I(t,e,r){t.textNode&&D(t),T(t,e,r)}function D(t){t.textNode=N(t.opt,t.textNode),t.textNode&&T(t,"ontext",t.textNode),t.textNode=""}function N(t,e){return t.trim&&(e=e.trim()),t.normalize&&(e=e.replace(/\s+/g," ")),e}function k(t,e){return D(t),t.trackPosition&&(e+="\nLine: "+t.line+"\nColumn: "+t.column+"\nChar: "+t.c),e=new Error(e),t.error=e,T(t,"onerror",e),t}function P(t){return t.sawRoot&&!t.closedRoot&&R(t,"Unclosed root tag"),t.state!==S.BEGIN&&t.state!==S.BEGIN_WHITESPACE&&t.state!==S.TEXT&&k(t,"Unexpected end"),D(t),t.c="",t.closed=!0,T(t,"onend"),i.call(t,t.strict,t.opt),t}function R(t,e){if("object"!=typeof t||!(t instanceof i))throw new Error("bad call to strictFail");t.strict&&k(t,e)}function L(t){t.strict||(t.tagName=t.tagName[t.looseCase]());var e=t.tags[t.tags.length-1]||t,r=t.tag={name:t.tagName,attributes:{}};t.opt.xmlns&&(r.ns=e.ns),t.attribList.length=0,I(t,"onopentagstart",r)}function B(t,e){var r=t.indexOf(":")<0?["",t]:t.split(":"),i=r[0],n=r[1];return e&&"xmlns"===t&&(i="xmlns",n=""),{prefix:i,local:n}}function O(t){if(t.strict||(t.attribName=t.attribName[t.looseCase]()),-1!==t.attribList.indexOf(t.attribName)||t.tag.attributes.hasOwnProperty(t.attribName))t.attribName=t.attribValue="";else{if(t.opt.xmlns){var e=B(t.attribName,!0),r=e.prefix,i=e.local;if("xmlns"===r)if("xml"===i&&t.attribValue!==l)R(t,"xml: prefix must be bound to "+l+"\nActual: "+t.attribValue);else if("xmlns"===i&&t.attribValue!==c)R(t,"xmlns: prefix must be bound to "+c+"\nActual: "+t.attribValue);else{var n=t.tag,s=t.tags[t.tags.length-1]||t;n.ns===s.ns&&(n.ns=Object.create(s.ns)),n.ns[i]=t.attribValue}t.attribList.push([t.attribName,t.attribValue])}else t.tag.attributes[t.attribName]=t.attribValue,I(t,"onattribute",{name:t.attribName,value:t.attribValue});t.attribName=t.attribValue=""}}function M(t,e){if(t.opt.xmlns){var r=t.tag,i=B(t.tagName);r.prefix=i.prefix,r.local=i.local,r.uri=r.ns[i.prefix]||"",r.prefix&&!r.uri&&(R(t,"Unbound namespace prefix: "+JSON.stringify(t.tagName)),r.uri=i.prefix);var n=t.tags[t.tags.length-1]||t;r.ns&&n.ns!==r.ns&&Object.keys(r.ns).forEach((function(e){I(t,"onopennamespace",{prefix:e,uri:r.ns[e]})}));for(var s=0,a=t.attribList.length;s",t.tagName="",void(t.state=S.SCRIPT);I(t,"onscript",t.script),t.script=""}var e=t.tags.length,r=t.tagName;t.strict||(r=r[t.looseCase]());for(var i=r;e--&&t.tags[e].name!==i;)R(t,"Unexpected close tag");if(e<0)return R(t,"Unmatched closing tag: "+t.tagName),t.textNode+="",void(t.state=S.TEXT);t.tagName=r;for(var n=t.tags.length;n-- >e;){var s=t.tag=t.tags.pop();t.tagName=t.tag.name,I(t,"onclosetag",t.tagName);var a={};for(var o in s.ns)a[o]=s.ns[o];var l=t.tags[t.tags.length-1]||t;t.opt.xmlns&&s.ns!==l.ns&&Object.keys(s.ns).forEach((function(e){var r=s.ns[e];I(t,"onclosenamespace",{prefix:e,uri:r})}))}0===e&&(t.closedRoot=!0),t.tagName=t.attribValue=t.attribName="",t.attribList.length=0,t.state=S.TEXT}function U(t){var e,r=t.entity,i=r.toLowerCase(),n="";return t.ENTITIES[r]?t.ENTITIES[r]:t.ENTITIES[i]?t.ENTITIES[i]:("#"===(r=i).charAt(0)&&("x"===r.charAt(1)?(r=r.slice(2),n=(e=parseInt(r,16)).toString(16)):(r=r.slice(1),n=(e=parseInt(r,10)).toString(10))),r=r.replace(/^0+/,""),isNaN(e)||n.toLowerCase()!==r?(R(t,"Invalid character entity"),"&"+t.entity+";"):String.fromCodePoint(e))}function V(t,e){"<"===e?(t.state=S.OPEN_WAKA,t.startTagPosition=t.position):m(e)||(R(t,"Non-whitespace before first tag."),t.textNode=e,t.state=S.TEXT)}function $(t,e){var r="";return e1114111||C(a)!==a)throw RangeError("Invalid code point: "+a);a<=65535?r.push(a):(t=55296+((a-=65536)>>10),e=a%1024+56320,r.push(t,e)),(i+1===n||r.length>16384)&&(s+=E.apply(null,r),r.length=0)}return s},Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:b,configurable:!0,writable:!0}):String.fromCodePoint=b)}({}));var P=(t=>(t.ReservedName="reserved name",t.Character="character",t.Extension="extension",t))(P||{});class R extends Error{constructor(t){super(`Invalid ${t.reason} '${t.segment}' in filename '${t.filename}'`,{cause:t})}get filename(){return this.cause.filename}get reason(){return this.cause.reason}get segment(){return this.cause.segment}}function L(t){const e=(0,c.F)().files,r=e.forbidden_filename_characters??window._oc_config?.forbidden_filenames_characters??["/","\\"];for(const e of r)if(t.includes(e))throw new R({segment:e,reason:"character",filename:t});if(t=t.toLocaleLowerCase(),(e.forbidden_filenames??[".htaccess"]).includes(t))throw new R({filename:t,segment:t,reason:"reserved name"});const i=t.indexOf(".",1),n=t.substring(0,-1===i?void 0:i);if((e.forbidden_filename_basenames??[]).includes(n))throw new R({filename:t,segment:n,reason:"reserved name"});const s=e.forbidden_filename_extensions??[".part",".filepart"];for(const e of s)if(t.length>e.length&&t.endsWith(e))throw new R({segment:e,reason:"extension",filename:t})}const B=["B","KB","MB","GB","TB","PB"],O=["B","KiB","MiB","GiB","TiB","PiB"];function M(t,e=!1,r=!1,i=!1){r=r&&!i,"string"==typeof t&&(t=Number(t));let n=t>0?Math.floor(Math.log(t)/Math.log(i?1e3:1024)):0;n=Math.min((r?O.length:B.length)-1,n);const s=r?O[n]:B[n];let a=(t/Math.pow(i?1e3:1024,n)).toFixed(1);return!0===e&&0===n?("0.0"!==a?"< 1 ":"0 ")+(r?O[1]:B[1]):(a=n<2?parseFloat(a).toFixed(0):parseFloat(a).toLocaleString((0,u.lO)()),a+" "+s)}function F(t){return t instanceof Date?t.toISOString():String(t)}function U(t,e,r){r=r??[];const i=(e=e??[t=>t]).map(((t,e)=>"asc"===(r[e]??"asc")?1:-1)),n=Intl.Collator([(0,u.Z0)(),(0,u.lO)()],{numeric:!0,usage:"sort"});return[...t].sort(((t,r)=>{for(const[s,a]of e.entries()){const e=n.compare(F(a(t)),F(a(r)));if(0!==e)return e*i[s]}return 0}))}function V(t,e={}){const r={sortingMode:"basename",sortingOrder:"asc",...e};return U(t,[...r.sortFavoritesFirst?[t=>1!==t.attributes?.favorite]:[],...r.sortFoldersFirst?[t=>"folder"!==t.type]:[],..."basename"!==r.sortingMode?[t=>t[r.sortingMode]??t.attributes[r.sortingMode]]:[],t=>{return(e=t.displayname||t.attributes?.displayname||t.basename||"").lastIndexOf(".")>0?e.slice(0,e.lastIndexOf(".")):e;var e},t=>t.basename],[...r.sortFavoritesFirst?["asc"]:[],...r.sortFoldersFirst?["asc"]:[],..."mtime"===r.sortingMode?["asc"===r.sortingOrder?"desc":"asc"]:[],..."mtime"!==r.sortingMode&&"basename"!==r.sortingMode?[r.sortingOrder]:[],r.sortingOrder,r.sortingOrder])}},38779:(t,e,r)=>{"use strict";r.d(e,{A:()=>o});var i=r(71354),n=r.n(i),s=r(76314),a=r.n(s)()(n());a.push([t.id,".sharing-entry__internal .avatar-external[data-v-57874406]{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-57874406]{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",sourcesContent:["\n.sharing-entry__internal {\n\t.avatar-external {\n\t\twidth: 32px;\n\t\theight: 32px;\n\t\tline-height: 32px;\n\t\tfont-size: 18px;\n\t\tbackground-color: var(--color-text-maxcontrast);\n\t\tborder-radius: 50%;\n\t\tflex-shrink: 0;\n\t}\n\t.icon-checkmark-color {\n\t\topacity: 1;\n\t\tcolor: var(--color-success);\n\t}\n}\n"],sourceRoot:""}]);const o=a},43570:(t,e,r)=>{"use strict";r.d(e,{A:()=>o});var i=r(71354),n=r.n(i),s=r(76314),a=r.n(s)()(n());a.push([t.id,".sharing-entry[data-v-44339fa4]{display:flex;align-items:center;min-height:44px}.sharing-entry__desc[data-v-44339fa4]{padding:8px;padding-inline-start:10px;line-height:1.2em;position:relative;flex:1 1;min-width:0}.sharing-entry__desc p[data-v-44339fa4]{color:var(--color-text-maxcontrast)}.sharing-entry__title[data-v-44339fa4]{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;max-width:inherit}.sharing-entry__actions[data-v-44339fa4]{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",sourcesContent:["\n.sharing-entry {\n\tdisplay: flex;\n\talign-items: center;\n\tmin-height: 44px;\n\t&__desc {\n\t\tpadding: 8px;\n\t\tpadding-inline-start: 10px;\n\t\tline-height: 1.2em;\n\t\tposition: relative;\n\t\tflex: 1 1;\n\t\tmin-width: 0;\n\t\tp {\n\t\t\tcolor: var(--color-text-maxcontrast);\n\t\t}\n\t}\n\t&__title {\n\t\twhite-space: nowrap;\n\t\ttext-overflow: ellipsis;\n\t\toverflow: hidden;\n\t\tmax-width: inherit;\n\t}\n\t&__actions {\n\t\tmargin-inline-start: auto !important;\n\t}\n}\n"],sourceRoot:""}]);const o=a},48318:function(t,e,r){!function(t){"use strict";var e,r=function(){try{if(t.URLSearchParams&&"bar"===new t.URLSearchParams("foo=bar").get("foo"))return t.URLSearchParams}catch(t){}return null}(),i=r&&"a=1"===new r({a:1}).toString(),n=r&&"+"===new r("s=%2B").get("s"),s=r&&"size"in r.prototype,a="__URLSearchParams__",o=!r||((e=new r).append("s"," &"),"s=+%26"===e.toString()),l=p.prototype,h=!(!t.Symbol||!t.Symbol.iterator);if(!(r&&i&&n&&o&&s)){l.append=function(t,e){y(this[a],t,e)},l.delete=function(t){delete this[a][t]},l.get=function(t){var e=this[a];return this.has(t)?e[t][0]:null},l.getAll=function(t){var e=this[a];return this.has(t)?e[t].slice(0):[]},l.has=function(t){return v(this[a],t)},l.set=function(t,e){this[a][t]=[""+e]},l.toString=function(){var t,e,r,i,n=this[a],s=[];for(e in n)for(r=f(e),t=0,i=n[e];t{"use strict";r.d(e,{A:()=>o});var i=r(71354),n=r.n(i),s=r(76314),a=r.n(s)()(n());a.push([t.id,".sharingTabDetailsView[data-v-18266eae]{display:flex;flex-direction:column;width:100%;margin:0 auto;position:relative;height:100%;overflow:hidden}.sharingTabDetailsView__header[data-v-18266eae]{display:flex;align-items:center;box-sizing:border-box;margin:.2em}.sharingTabDetailsView__header span[data-v-18266eae]{display:flex;align-items:center}.sharingTabDetailsView__header span h1[data-v-18266eae]{font-size:15px;padding-inline-start:.3em}.sharingTabDetailsView__wrapper[data-v-18266eae]{position:relative;overflow:scroll;flex-shrink:1;padding:4px;padding-inline-end:12px}.sharingTabDetailsView__quick-permissions[data-v-18266eae]{display:flex;justify-content:center;width:100%;margin:0 auto;border-radius:0}.sharingTabDetailsView__quick-permissions div[data-v-18266eae]{width:100%}.sharingTabDetailsView__quick-permissions div span[data-v-18266eae]{width:100%}.sharingTabDetailsView__quick-permissions div span span[data-v-18266eae]:nth-child(1){align-items:center;justify-content:center;padding:.1em}.sharingTabDetailsView__quick-permissions div span[data-v-18266eae] label span{display:flex;flex-direction:column}.sharingTabDetailsView__quick-permissions div span[data-v-18266eae] span.checkbox-content__text.checkbox-radio-switch__text{flex-wrap:wrap}.sharingTabDetailsView__quick-permissions div span[data-v-18266eae] span.checkbox-content__text.checkbox-radio-switch__text .subline{display:block;flex-basis:100%}.sharingTabDetailsView__advanced-control[data-v-18266eae]{width:100%}.sharingTabDetailsView__advanced-control button[data-v-18266eae]{margin-top:.5em}.sharingTabDetailsView__advanced[data-v-18266eae]{width:100%;margin-bottom:.5em;text-align:start;padding-inline-start:0}.sharingTabDetailsView__advanced section textarea[data-v-18266eae],.sharingTabDetailsView__advanced section div.mx-datepicker[data-v-18266eae]{width:100%}.sharingTabDetailsView__advanced section textarea[data-v-18266eae]{height:80px;margin:0}.sharingTabDetailsView__advanced section span[data-v-18266eae] label{padding-inline-start:0 !important;background-color:initial !important;border:none !important}.sharingTabDetailsView__advanced section section.custom-permissions-group[data-v-18266eae]{padding-inline-start:1.5em}.sharingTabDetailsView__label[data-v-18266eae]{padding-block-end:6px}.sharingTabDetailsView__delete>button[data-v-18266eae]:first-child{color:#df0707}.sharingTabDetailsView__footer[data-v-18266eae]{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-18266eae]{display:flex;justify-content:space-between;width:100%;margin-top:16px}.sharingTabDetailsView__footer .button-group button[data-v-18266eae]{margin-inline-start:16px}.sharingTabDetailsView__footer .button-group button[data-v-18266eae]:first-child{margin-inline-start:0}","",{version:3,sources:["webpack://./apps/files_sharing/src/views/SharingDetailsTab.vue"],names:[],mappings:"AACA,wCACC,YAAA,CACA,qBAAA,CACA,UAAA,CACA,aAAA,CACA,iBAAA,CACA,WAAA,CACA,eAAA,CAEA,gDACC,YAAA,CACA,kBAAA,CACA,qBAAA,CACA,WAAA,CAEA,qDACC,YAAA,CACA,kBAAA,CAEA,wDACC,cAAA,CACA,yBAAA,CAMH,iDACC,iBAAA,CACA,eAAA,CACA,aAAA,CACA,WAAA,CACA,uBAAA,CAGD,2DACC,YAAA,CACA,sBAAA,CACA,UAAA,CACA,aAAA,CACA,eAAA,CAEA,+DACC,UAAA,CAEA,oEACC,UAAA,CAEA,sFACC,kBAAA,CACA,sBAAA,CACA,YAAA,CAGD,+EACC,YAAA,CACA,qBAAA,CAID,4HACC,cAAA,CAEA,qIACC,aAAA,CACA,eAAA,CAQL,0DACC,UAAA,CAEA,iEACC,eAAA,CAKF,kDACC,UAAA,CACA,kBAAA,CACA,gBAAA,CACA,sBAAA,CAIC,+IAEC,UAAA,CAGD,mEACC,WAAA,CACA,QAAA,CAYD,qEACC,iCAAA,CACA,mCAAA,CACA,sBAAA,CAGD,2FACC,0BAAA,CAKH,+CACC,qBAAA,CAIA,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",sourcesContent:["\n.sharingTabDetailsView {\n\tdisplay: flex;\n\tflex-direction: column;\n\twidth: 100%;\n\tmargin: 0 auto;\n\tposition: relative;\n\theight: 100%;\n\toverflow: hidden;\n\n\t&__header {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tbox-sizing: border-box;\n\t\tmargin: 0.2em;\n\n\t\tspan {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\n\t\t\th1 {\n\t\t\t\tfont-size: 15px;\n\t\t\t\tpadding-inline-start: 0.3em;\n\t\t\t}\n\n\t\t}\n\t}\n\n\t&__wrapper {\n\t\tposition: relative;\n\t\toverflow: scroll;\n\t\tflex-shrink: 1;\n\t\tpadding: 4px;\n\t\tpadding-inline-end: 12px;\n\t}\n\n\t&__quick-permissions {\n\t\tdisplay: flex;\n\t\tjustify-content: center;\n\t\twidth: 100%;\n\t\tmargin: 0 auto;\n\t\tborder-radius: 0;\n\n\t\tdiv {\n\t\t\twidth: 100%;\n\n\t\t\tspan {\n\t\t\t\twidth: 100%;\n\n\t\t\t\tspan:nth-child(1) {\n\t\t\t\t\talign-items: center;\n\t\t\t\t\tjustify-content: center;\n\t\t\t\t\tpadding: 0.1em;\n\t\t\t\t}\n\n\t\t\t\t:deep(label span) {\n\t\t\t\t\tdisplay: flex;\n\t\t\t\t\tflex-direction: column;\n\t\t\t\t}\n\n\t\t\t\t/* Target component based style in NcCheckboxRadioSwitch slot content*/\n\t\t\t\t:deep(span.checkbox-content__text.checkbox-radio-switch__text) {\n\t\t\t\t\tflex-wrap: wrap;\n\n\t\t\t\t\t.subline {\n\t\t\t\t\t\tdisplay: block;\n\t\t\t\t\t\tflex-basis: 100%;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\t}\n\n\t&__advanced-control {\n\t\twidth: 100%;\n\n\t\tbutton {\n\t\t\tmargin-top: 0.5em;\n\t\t}\n\n\t}\n\n\t&__advanced {\n\t\twidth: 100%;\n\t\tmargin-bottom: 0.5em;\n\t\ttext-align: start;\n\t\tpadding-inline-start: 0;\n\n\t\tsection {\n\n\t\t\ttextarea,\n\t\t\tdiv.mx-datepicker {\n\t\t\t\twidth: 100%;\n\t\t\t}\n\n\t\t\ttextarea {\n\t\t\t\theight: 80px;\n\t\t\t\tmargin: 0;\n\t\t\t}\n\n\t\t\t/*\n\t\t\t The following style is applied out of the component's scope\n\t\t\t to remove padding from the label.checkbox-radio-switch__label,\n\t\t\t which is used to group radio checkbox items. The use of ::v-deep\n\t\t\t ensures that the padding is modified without being affected by\n\t\t\t the component's scoping.\n\t\t\t Without this achieving left alignment for the checkboxes would not\n\t\t\t be possible.\n\t\t\t*/\n\t\t\tspan :deep(label) {\n\t\t\t\tpadding-inline-start: 0 !important;\n\t\t\t\tbackground-color: initial !important;\n\t\t\t\tborder: none !important;\n\t\t\t}\n\n\t\t\tsection.custom-permissions-group {\n\t\t\t\tpadding-inline-start: 1.5em;\n\t\t\t}\n\t\t}\n\t}\n\n\t&__label {\n\t\tpadding-block-end: 6px;\n\t}\n\n\t&__delete {\n\t\t> button:first-child {\n\t\t\tcolor: rgb(223, 7, 7);\n\t\t}\n\t}\n\n\t&__footer {\n\t\twidth: 100%;\n\t\tdisplay: flex;\n\t\tposition: sticky;\n\t\tbottom: 0;\n\t\tflex-direction: column;\n\t\tjustify-content: space-between;\n\t\talign-items: flex-start;\n\t\tbackground: linear-gradient(to bottom, rgba(255, 255, 255, 0), var(--color-main-background));\n\n\t\t.button-group {\n\t\t\tdisplay: flex;\n\t\t\tjustify-content: space-between;\n\t\t\twidth: 100%;\n\t\t\tmargin-top: 16px;\n\n\t\t\tbutton {\n\t\t\t\tmargin-inline-start: 16px;\n\n\t\t\t\t&:first-child {\n\t\t\t\t\tmargin-inline-start: 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n"],sourceRoot:""}]);const o=a},56467:(t,e,r)=>{"use strict";r.d(e,{A:()=>o});var i=r(71354),n=r.n(i),s=r(76314),a=r.n(s)()(n());a.push([t.id,".sharing-entry__inherited .avatar-shared[data-v-a6cc72e6]{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",sourcesContent:["\n.sharing-entry__inherited {\n\t.avatar-shared {\n\t\twidth: 32px;\n\t\theight: 32px;\n\t\tline-height: 32px;\n\t\tfont-size: 18px;\n\t\tbackground-color: var(--color-text-maxcontrast);\n\t\tborder-radius: 50%;\n\t\tflex-shrink: 0;\n\t}\n}\n"],sourceRoot:""}]);const o=a},59879:(t,e,r)=>{"use strict";r.d(e,{A:()=>o});var i=r(71354),n=r.n(i),s=r(76314),a=r.n(s)()(n());a.push([t.id,".sharing-entry[data-v-fe8ed59e]{display:flex;align-items:center;height:44px}.sharing-entry__desc[data-v-fe8ed59e]{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-fe8ed59e]{color:var(--color-text-maxcontrast)}.sharing-entry__actions[data-v-fe8ed59e]{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",sourcesContent:["\n.sharing-entry {\n\tdisplay: flex;\n\talign-items: center;\n\theight: 44px;\n\t&__desc {\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\tjustify-content: space-between;\n\t\tpadding: 8px;\n\t\tpadding-inline-start: 10px;\n\t\tline-height: 1.2em;\n\t\tp {\n\t\t\tcolor: var(--color-text-maxcontrast);\n\t\t}\n\t}\n\t&__actions {\n\t\tmargin-inline-start: auto;\n\t}\n}\n"],sourceRoot:""}]);const o=a},63316:(t,e,r)=>{"use strict";r.d(e,{A:()=>o});var i=r(71354),n=r.n(i),s=r(76314),a=r.n(s)()(n());a.push([t.id,".share-expiry-time[data-v-46cd2ca2]{display:inline-flex;align-items:center;justify-content:center}.share-expiry-time .hint-icon[data-v-46cd2ca2]{padding:0;margin:0;width:24px;height:24px}.hint-heading[data-v-46cd2ca2]{text-align:center;font-size:1rem;margin-top:8px;padding-bottom:8px;margin-bottom:0;border-bottom:1px solid var(--color-border)}.hint-body[data-v-46cd2ca2]{padding:var(--border-radius-element);max-width:300px}","",{version:3,sources:["webpack://./apps/files_sharing/src/components/ShareExpiryTime.vue"],names:[],mappings:"AACA,oCACI,mBAAA,CACA,kBAAA,CACA,sBAAA,CAEA,+CACI,SAAA,CACA,QAAA,CACA,UAAA,CACA,WAAA,CAIR,+BACI,iBAAA,CACA,cAAA,CACA,cAAA,CACA,kBAAA,CACA,eAAA,CACA,2CAAA,CAGJ,4BACI,oCAAA,CACA,eAAA",sourcesContent:["\n.share-expiry-time {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n\n .hint-icon {\n padding: 0;\n margin: 0;\n width: 24px;\n height: 24px;\n }\n}\n\n.hint-heading {\n text-align: center;\n font-size: 1rem;\n margin-top: 8px;\n padding-bottom: 8px;\n margin-bottom: 0;\n border-bottom: 1px solid var(--color-border);\n}\n\n.hint-body {\n padding: var(--border-radius-element);\n max-width: 300px;\n}\n"],sourceRoot:""}]);const o=a},67530:(t,e,r)=>{"use strict";r.d(e,{A:()=>o});var i=r(71354),n=r.n(i),s=r(76314),a=r.n(s)()(n());a.push([t.id,".sharing-entry[data-v-474c7155]{display:flex;align-items:center;min-height:44px}.sharing-entry__summary[data-v-474c7155]{padding:8px;padding-inline-start:10px;display:flex;justify-content:space-between;flex:1 0;min-width:0}.sharing-entry__desc[data-v-474c7155]{display:flex;flex-direction:column;line-height:1.2em}.sharing-entry__desc p[data-v-474c7155]{color:var(--color-text-maxcontrast)}.sharing-entry__desc__title[data-v-474c7155]{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.sharing-entry__actions[data-v-474c7155]{display:flex;align-items:center;margin-inline-start:auto}.sharing-entry:not(.sharing-entry--share) .sharing-entry__actions .new-share-link[data-v-474c7155]{border-top:1px solid var(--color-border)}.sharing-entry[data-v-474c7155] .avatar-link-share{background-color:var(--color-primary-element)}.sharing-entry .sharing-entry__action--public-upload[data-v-474c7155]{border-bottom:1px solid var(--color-border)}.sharing-entry__loading[data-v-474c7155]{width:44px;height:44px;margin:0;padding:14px;margin-inline-start:auto}.sharing-entry .action-item~.action-item[data-v-474c7155],.sharing-entry .action-item~.sharing-entry__loading[data-v-474c7155]{margin-inline-start:0}.sharing-entry .icon-checkmark-color[data-v-474c7155]{opacity:1;color:var(--color-success)}.qr-code-dialog[data-v-474c7155]{display:flex;width:100%;justify-content:center}.qr-code-dialog__img[data-v-474c7155]{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,CAIF,yCACC,YAAA,CACA,kBAAA,CACA,wBAAA,CAID,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",sourcesContent:["\n.sharing-entry {\n\tdisplay: flex;\n\talign-items: center;\n\tmin-height: 44px;\n\n\t&__summary {\n\t\tpadding: 8px;\n\t\tpadding-inline-start: 10px;\n\t\tdisplay: flex;\n\t\tjustify-content: space-between;\n\t\tflex: 1 0;\n\t\tmin-width: 0;\n\t}\n\n\t\t&__desc {\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t\tline-height: 1.2em;\n\n\t\t\tp {\n\t\t\t\tcolor: var(--color-text-maxcontrast);\n\t\t\t}\n\n\t\t\t&__title {\n\t\t\t\ttext-overflow: ellipsis;\n\t\t\t\toverflow: hidden;\n\t\t\t\twhite-space: nowrap;\n\t\t\t}\n\t\t}\n\n\t\t&__actions {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tmargin-inline-start: auto;\n\t\t}\n\n\t&:not(.sharing-entry--share) &__actions {\n\t\t.new-share-link {\n\t\t\tborder-top: 1px solid var(--color-border);\n\t\t}\n\t}\n\n\t:deep(.avatar-link-share) {\n\t\tbackground-color: var(--color-primary-element);\n\t}\n\n\t.sharing-entry__action--public-upload {\n\t\tborder-bottom: 1px solid var(--color-border);\n\t}\n\n\t&__loading {\n\t\twidth: 44px;\n\t\theight: 44px;\n\t\tmargin: 0;\n\t\tpadding: 14px;\n\t\tmargin-inline-start: auto;\n\t}\n\n\t// put menus to the left\n\t// but only the first one\n\t.action-item {\n\n\t\t~.action-item,\n\t\t~.sharing-entry__loading {\n\t\t\tmargin-inline-start: 0;\n\t\t}\n\t}\n\n\t.icon-checkmark-color {\n\t\topacity: 1;\n\t\tcolor: var(--color-success);\n\t}\n}\n\n// styling for the qr-code container\n.qr-code-dialog {\n\tdisplay: flex;\n\twidth: 100%;\n\tjustify-content: center;\n\n\t&__img {\n\t\twidth: 100%;\n\t\theight: auto;\n\t}\n}\n"],sourceRoot:""}]);const o=a},79722:t=>{"use strict";t.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:t=>{"use strict";t.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"},88152:(t,e,r)=>{"use strict";r.d(e,{A:()=>o});var i=r(71354),n=r.n(i),s=r(76314),a=r.n(s)()(n());a.push([t.id,".share-select[data-v-68405a8b]{display:block}.share-select[data-v-68405a8b] .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-68405a8b] .action-item__menutoggle .button-vue__text{font-weight:normal !important}.share-select[data-v-68405a8b] .action-item__menutoggle .button-vue__icon{height:24px !important;min-height:24px !important;width:24px !important;min-width:24px !important}.share-select[data-v-68405a8b] .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",sourcesContent:["\n.share-select {\n\tdisplay: block;\n\n\t// TODO: NcActions should have a slot for custom trigger button like NcPopover\n\t// Overrider NcActionms button to make it small\n\t:deep(.action-item__menutoggle) {\n\t\tcolor: var(--color-primary-element) !important;\n\t\tfont-size: 12.5px !important;\n\t\theight: auto !important;\n\t\tmin-height: auto !important;\n\n\t\t.button-vue__text {\n\t\t\tfont-weight: normal !important;\n\t\t}\n\n\t\t.button-vue__icon {\n\t\t\theight: 24px !important;\n\t\t\tmin-height: 24px !important;\n\t\t\twidth: 24px !important;\n\t\t\tmin-width: 24px !important;\n\t\t}\n\n\t\t.button-vue__wrapper {\n\t\t\t// Emulate NcButton's alignment=center-reverse\n\t\t\tflex-direction: row-reverse !important;\n\t\t}\n\t}\n}\n"],sourceRoot:""}]);const o=a}}]); //# sourceMappingURL=1025-1025.js.map?v=39cb0543c41624508ed2