!function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="/",r(r.s=35)}({28:function(e,t,r){(function(e){ /*! * validate.js 0.13.1 * * (c) 2013-2019 Nicklas Ansman, 2013 Wrapp * Validate.js may be freely distributed under the MIT license. * For all details and documentation: * http://validatejs.org/ */ (function(e,t,n){"use strict";var i=function(e,t,r){r=a.extend({},a.options,r);var n=a.runValidations(e,t,r);if(n.some((function(e){return a.isPromise(e.error)})))throw new Error("Use validate.async if you want support for promises");return i.processValidationResults(n,r)},a=i;a.extend=function(e){return[].slice.call(arguments,1).forEach((function(t){for(var r in t)e[r]=t[r]})),e},a.extend(i,{version:{major:0,minor:13,patch:1,metadata:null,toString:function(){var e=a.format("%{major}.%{minor}.%{patch}",a.version);return a.isEmpty(a.version.metadata)||(e+="+"+a.version.metadata),e}},Promise:"undefined"!=typeof Promise?Promise:null,EMPTY_STRING_REGEXP:/^\s*$/,runValidations:function(e,t,r){var n,i,s,o,u,l,c,f=[];for(n in(a.isDomElement(e)||a.isJqueryElement(e))&&(e=a.collectFormValues(e)),t)for(i in s=a.getDeepObjectValue(e,n),o=a.result(t[n],s,e,n,r,t)){if(!(u=a.validators[i]))throw c=a.format("Unknown validator %{name}",{name:i}),new Error(c);l=o[i],(l=a.result(l,s,e,n,r,t))&&f.push({attribute:n,value:s,validator:i,globalOptions:r,attributes:e,options:l,error:u.call(u,s,l,n,e,r)})}return f},processValidationResults:function(e,t){e=a.pruneEmptyErrors(e,t),e=a.expandMultipleErrors(e,t),e=a.convertErrorMessages(e,t);var r=t.format||"grouped";if("function"!=typeof a.formatters[r])throw new Error(a.format("Unknown format %{format}",t));return e=a.formatters[r](e),a.isEmpty(e)?void 0:e},async:function(e,t,r){var n=(r=a.extend({},a.async.options,r)).wrapErrors||function(e){return e};!1!==r.cleanAttributes&&(e=a.cleanAttributes(e,t));var i=a.runValidations(e,t,r);return new a.Promise((function(s,o){a.waitForResults(i).then((function(){var u=a.processValidationResults(i,r);u?o(new n(u,r,e,t)):s(e)}),(function(e){o(e)}))}))},single:function(e,t,r){return r=a.extend({},a.single.options,r,{format:"flat",fullMessages:!1}),a({single:e},{single:t},r)},waitForResults:function(e){return e.reduce((function(e,t){return a.isPromise(t.error)?e.then((function(){return t.error.then((function(e){t.error=e||null}))})):e}),new a.Promise((function(e){e()})))},result:function(e){var t=[].slice.call(arguments,1);return"function"==typeof e&&(e=e.apply(null,t)),e},isNumber:function(e){return"number"==typeof e&&!isNaN(e)},isFunction:function(e){return"function"==typeof e},isInteger:function(e){return a.isNumber(e)&&e%1==0},isBoolean:function(e){return"boolean"==typeof e},isObject:function(e){return e===Object(e)},isDate:function(e){return e instanceof Date},isDefined:function(e){return null!=e},isPromise:function(e){return!!e&&a.isFunction(e.then)},isJqueryElement:function(e){return e&&a.isString(e.jquery)},isDomElement:function(e){return!!e&&(!(!e.querySelectorAll||!e.querySelector)&&(!(!a.isObject(document)||e!==document)||("object"==typeof HTMLElement?e instanceof HTMLElement:e&&"object"==typeof e&&null!==e&&1===e.nodeType&&"string"==typeof e.nodeName)))},isEmpty:function(e){var t;if(!a.isDefined(e))return!0;if(a.isFunction(e))return!1;if(a.isString(e))return a.EMPTY_STRING_REGEXP.test(e);if(a.isArray(e))return 0===e.length;if(a.isDate(e))return!1;if(a.isObject(e)){for(t in e)return!1;return!0}return!1},format:a.extend((function(e,t){return a.isString(e)?e.replace(a.format.FORMAT_REGEXP,(function(e,r,n){return"%"===r?"%{"+n+"}":String(t[n])})):e}),{FORMAT_REGEXP:/(%?)%\{([^\}]+)\}/g}),prettify:function(e){return a.isNumber(e)?100*e%1==0?""+e:parseFloat(Math.round(100*e)/100).toFixed(2):a.isArray(e)?e.map((function(e){return a.prettify(e)})).join(", "):a.isObject(e)?a.isDefined(e.toString)?e.toString():JSON.stringify(e):(e=""+e).replace(/([^\s])\.([^\s])/g,"$1 $2").replace(/\\+/g,"").replace(/[_-]/g," ").replace(/([a-z])([A-Z])/g,(function(e,t,r){return t+" "+r.toLowerCase()})).toLowerCase()},stringifyValue:function(e,t){return(t&&t.prettify||a.prettify)(e)},isString:function(e){return"string"==typeof e},isArray:function(e){return"[object Array]"==={}.toString.call(e)},isHash:function(e){return a.isObject(e)&&!a.isArray(e)&&!a.isFunction(e)},contains:function(e,t){return!!a.isDefined(e)&&(a.isArray(e)?-1!==e.indexOf(t):t in e)},unique:function(e){return a.isArray(e)?e.filter((function(e,t,r){return r.indexOf(e)==t})):e},forEachKeyInKeypath:function(e,t,r){if(a.isString(t)){var n,i="",s=!1;for(n=0;ns&&(n=t.tooLong||this.tooLong||"is too long (maximum is %{count} characters)",u.push(a.format(n,{count:s}))),u.length>0?t.message||u:void 0):t.message||this.notValid||"has an incorrect length"}},numericality:function(e,t,r,n,i){if(a.isDefined(e)){var s,o,u=[],l={greaterThan:function(e,t){return e>t},greaterThanOrEqualTo:function(e,t){return e>=t},equalTo:function(e,t){return e===t},lessThan:function(e,t){return es&&(r=t.tooLate||t.message||this.tooLate||"must be no later than %{date}",r=a.format(r,{date:this.format(s,t),value:this.format(e,t)}),n.push(r)),n.length?a.unique(n):void 0)}}),{parse:null,format:null}),date:function(e,t){return t=a.extend({},t,{dateOnly:!0}),a.validators.datetime.call(a.validators.datetime,e,t)},format:function(e,t){(a.isString(t)||t instanceof RegExp)&&(t={pattern:t});var r,n=(t=a.extend({},this.options,t)).message||this.message||"is invalid",i=t.pattern;if(a.isDefined(e))return a.isString(e)?(a.isString(i)&&(i=new RegExp(t.pattern,t.flags)),(r=i.exec(e))&&r[0].length==e.length?void 0:n):n},inclusion:function(e,t){if(a.isDefined(e)&&(a.isArray(t)&&(t={within:t}),t=a.extend({},this.options,t),!a.contains(t.within,e))){var r=t.message||this.message||"^%{value} is not included in the list";return a.format(r,{value:e})}},exclusion:function(e,t){if(a.isDefined(e)&&(a.isArray(t)&&(t={within:t}),t=a.extend({},this.options,t),a.contains(t.within,e))){var r=t.message||this.message||"^%{value} is restricted";return a.isString(t.within[e])&&(e=t.within[e]),a.format(r,{value:e})}},email:a.extend((function(e,t){var r=(t=a.extend({},this.options,t)).message||this.message||"is not a valid email";if(a.isDefined(e))return a.isString(e)&&this.PATTERN.exec(e)?void 0:r}),{PATTERN:/^(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])$/i}),equality:function(e,t,r,n,i){if(a.isDefined(e)){a.isString(t)&&(t={attribute:t});var s=(t=a.extend({},this.options,t)).message||this.message||"is not equal to %{attribute}";if(a.isEmpty(t.attribute)||!a.isString(t.attribute))throw new Error("The attribute must be a non empty string");var o=a.getDeepObjectValue(n,t.attribute),u=t.comparator||function(e,t){return e===t},l=t.prettify||i&&i.prettify||a.prettify;return u(e,o,t,r,n)?void 0:a.format(s,{attribute:l(t.attribute)})}},url:function(e,t){if(a.isDefined(e)){var r=(t=a.extend({},this.options,t)).message||this.message||"is not a valid url",n=t.schemes||this.schemes||["http","https"],i=t.allowLocal||this.allowLocal||!1,s=t.allowDataUrl||this.allowDataUrl||!1;if(!a.isString(e))return r;var o="^(?:(?:"+n.join("|")+")://)(?:\\S+(?::\\S*)?@)?(?:",u="(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))";if(i?u+="?":o+="(?!(?:10|127)(?:\\.\\d{1,3}){3})(?!(?:169\\.254|192\\.168)(?:\\.\\d{1,3}){2})(?!172\\.(?:1[6-9]|2\\d|3[0-1])(?:\\.\\d{1,3}){2})",o+="(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*"+u+")(?::\\d{2,5})?(?:[/?#]\\S*)?$",s){o="(?:"+o+")|(?:^data:(?:\\w+\\/[-+.\\w]+(?:;[\\w=]+)*)?(?:;base64)?,[A-Za-z0-9-_.!~\\*'();\\/?:@&=+$,%]*$)"}return new RegExp(o,"i").exec(e)?void 0:r}},type:a.extend((function(e,t,r,n,i){if(a.isString(t)&&(t={type:t}),a.isDefined(e)){var s,o=a.extend({},this.options,t),u=o.type;if(!a.isDefined(u))throw new Error("No type was specified");if(s=a.isFunction(u)?u:this.types[u],!a.isFunction(s))throw new Error("validate.validators.type.types."+u+" must be a function.");if(!s(e,o,r,n,i)){var l=t.message||this.messages[u]||this.message||o.message||(a.isFunction(u)?"must be of the correct type":"must be of type %{type}");return a.isFunction(l)&&(l=l(e,t,r,n,i)),a.format(l,{attribute:a.prettify(r),type:u})}}}),{types:{object:function(e){return a.isObject(e)&&!a.isArray(e)},array:a.isArray,integer:a.isInteger,number:a.isNumber,string:a.isString,date:a.isDate,boolean:a.isBoolean},messages:{}})},i.formatters={detailed:function(e){return e},flat:a.flattenErrorsToArray,grouped:function(e){var t;for(t in e=a.groupErrorsByAttribute(e))e[t]=a.flattenErrorsToArray(e[t]);return e},constraint:function(e){var t;for(t in e=a.groupErrorsByAttribute(e))e[t]=e[t].map((function(e){return e.validator})).sort();return e}},i.exposeModule(i,this,e,t,r(29))}).call(this,t,e,r(29))}).call(this,r(36)(e))},29:function(e,t){e.exports=function(){throw new Error("define cannot be used indirect")}},30:function(e,t){var r=/^(?:submit|button|image|reset|file)$/i,n=/^(?:input|select|textarea|keygen)/i,i=/(\[[^\[\]]*\])/g;function a(e,t,r){if(t.match(i)){!function e(t,r,n){if(0===r.length)return t=n;var i=r.shift(),a=i.match(/^\[(.+?)\]$/);if("[]"===i)return t=t||[],Array.isArray(t)?t.push(e(null,r,n)):(t._values=t._values||[],t._values.push(e(null,r,n))),t;if(a){var s=a[1],o=+s;isNaN(o)?(t=t||{})[s]=e(t[s],r,n):(t=t||[])[o]=e(t[o],r,n)}else t[i]=e(t[i],r,n);return t}(e,function(e){var t=[],r=new RegExp(i),n=/^([^\[\]]*)/.exec(e);for(n[1]&&t.push(n[1]);null!==(n=r.exec(e));)t.push(n[1]);return t}(t),r)}else{var n=e[t];n?(Array.isArray(n)||(e[t]=[n]),e[t].push(r)):e[t]=r}return e}function s(e,t,r){return r=r.replace(/(\r)?\n/g,"\r\n"),r=(r=encodeURIComponent(r)).replace(/%20/g,"+"),e+(e?"&":"")+encodeURIComponent(t)+"="+r}e.exports=function(e,t){"object"!=typeof t?t={hash:!!t}:void 0===t.hash&&(t.hash=!0);for(var i=t.hash?{}:"",o=t.serializer||(t.hash?a:s),u=e&&e.elements?e.elements:[],l=Object.create(null),c=0;c0?t.errors=e.errors:t.errors=[]}},template:function(e,t,r,n){return e('
',[{type:r.IF,evaluate:function(e){return e.state.errors.length>0},redundantAttribute:"expr46",selector:"[expr46]",template:e('
',[{type:r.EACH,getKey:null,condition:null,template:e(" ",[{expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:function(e){return e.error}}]}]),redundantAttribute:"expr47",selector:"[expr47]",itemName:"error",indexName:null,evaluate:function(e){return e.state.errors}}])}])},name:"field-error"};riot.register("field-error",u);var l={css:null,exports:{onBeforeMount(e,t){t.validator=new o({name:{presence:!0,length:{maximum:255}},description:{length:{maximum:255}}},this);const r=document.querySelector("meta[name='csrf-token']");r&&(t.csrfToken=r.getAttribute("content"))},getClasses(e,t){const r=[t],n=this.state.validator.errors(e);return n&&n.length>0&&r.push("is-danger"),r.join(" ")}},template:function(e,t,r,n){return e('

\n path for storage files, if empty default path will be used\n

\n everyone can see bucket, files and download them\n
',[{type:r.IF,evaluate:function(e){return e.state.csrfToken},redundantAttribute:"expr22",selector:"[expr22]",template:e(null,[{expressions:[{type:t.ATTRIBUTE,name:"value",evaluate:function(e){return e.state.csrfToken}}]}])},{redundantAttribute:"expr23",selector:"[expr23]",expressions:[{type:t.ATTRIBUTE,name:"class",evaluate:function(e){return e.getClasses("name","input")}},{type:t.VALUE,evaluate:function(e){return e.props.name}},{type:t.EVENT,name:"onkeyup",evaluate:function(e){return t=>{e.state.validator.handle(t,"name")}}}]},{type:r.TAG,getComponent:n,evaluate:function(e){return"field-error"},slots:[],attributes:[{type:t.ATTRIBUTE,name:"errors",evaluate:function(e){return e.state.validator.errors("name")}}],redundantAttribute:"expr24",selector:"[expr24]"},{redundantAttribute:"expr25",selector:"[expr25]",expressions:[{type:t.ATTRIBUTE,name:"class",evaluate:function(e){return e.getClasses("description","textarea")}},{type:t.VALUE,evaluate:function(e){return e.props.description}},{type:t.EVENT,name:"onkeyup",evaluate:function(e){return t=>{e.state.validator.handle(t,"description")}}}]},{type:r.TAG,getComponent:n,evaluate:function(e){return"field-error"},slots:[],attributes:[{type:t.ATTRIBUTE,name:"errors",evaluate:function(e){return e.state.validator.errors("description")}}],redundantAttribute:"expr26",selector:"[expr26]"},{redundantAttribute:"expr27",selector:"[expr27]",expressions:[{type:t.ATTRIBUTE,name:"class",evaluate:function(e){return e.getClasses("path","input")}},{type:t.VALUE,evaluate:function(e){return e.props.path}},{type:t.EVENT,name:"onkeyup",evaluate:function(e){return t=>{e.state.validator.handle(t,"path")}}}]},{type:r.TAG,getComponent:n,evaluate:function(e){return"field-error"},slots:[],attributes:[{type:t.ATTRIBUTE,name:"errors",evaluate:function(e){return e.state.validator.errors("path")}}],redundantAttribute:"expr28",selector:"[expr28]"},{redundantAttribute:"expr29",selector:"[expr29]",expressions:[{type:t.ATTRIBUTE,name:"checked",evaluate:function(e){return e.props.public}}]},{redundantAttribute:"expr30",selector:"[expr30]",expressions:[{type:t.ATTRIBUTE,name:"disabled",evaluate:function(e){return e.state.validator.errors().length>0}}]}])},name:"urban-bucket-form"};riot.register("urban-bucket-form",l)}});