validare
Version:
Validation tool for web projects
1 lines • 403 kB
JavaScript
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.validare=t():e.validare=t()}(self,(()=>(()=>{var e={8482:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Status=void 0;var r=n(2756);t.Status=function(e,t,o,i){if(this.status="no_error"==e,!this.status){var a=void 0;(a="undefined"!=typeof window?r.validare_messages:n.g.validare.messages)&&t&&(a[t]&&(a[t][e]?this.message=a[t][e].replaceAll("#{value}",o):a[t].$default&&(this.message=a[t].$default.replaceAll("#{value}",o))),this.message||a.$default&&a.$default[e]&&(this.message=a.$default[e].replaceAll("#{value}",o)))}this.value=i,this.error=e,this.reason=o}},1281:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{l(r.next(e))}catch(e){i(e)}}function s(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,r=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){i=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){i.label=s[1];break}if(6===s[0]&&i.label<o[1]){i.label=o[1],o=s;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(s);break}o[2]&&i.ops.pop(),i.trys.pop();continue}s=t.call(e,i)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.Schema=void 0;var i=n(2306),a=n(3866),s=n(8119),l=function(){function e(e){this.schema=e}return e.prototype.validate=function(e){var t=this;return new Promise((function(n,a){return r(t,void 0,void 0,(function(){var t;return o(this,(function(r){switch(r.label){case 0:return[4,(0,i.validator)(this.schema,e)];case 1:return t=r.sent(),n(t),[2]}}))}))}))},e.prototype.create_id=function(){var e=this;return new Promise((function(t,n){return r(e,void 0,void 0,(function(){var e;return o(this,(function(n){switch(n.label){case 0:return[4,(0,a.create_id)(this.schema)];case 1:return e=n.sent(),t(e),[2]}}))}))}))},e.prototype.random=function(){var e=this;return new Promise((function(t,n){return r(e,void 0,void 0,(function(){var e,n;return o(this,(function(r){switch(r.label){case 0:return"number"!=this.schema.type&&"bigint"!=this.schema.type&&"string-number"!=this.schema.type?[3,2]:[4,(0,s.randomize)({max:this.schema.max_length,min:this.schema.min_length,len:this.schema.length})];case 1:(e=r.sent())&&(n=10,this.schema.base&&(n=this.schema.base),t(e.toString(n))),r.label=2;case 2:return[2]}}))}))}))},e}();t.Schema=l},3866:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{l(r.next(e))}catch(e){i(e)}}function s(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,r=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){i=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){i.label=s[1];break}if(6===s[0]&&i.label<o[1]){i.label=o[1],o=s;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(s);break}o[2]&&i.ops.pop(),i.trys.pop();continue}s=t.call(e,i)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.create_id=function(e){return r(this,void 0,void 0,(function(){var t,r,c,u,h;return o(this,(function(o){switch(o.label){case 0:return t={chars:"standart",length:8},"undefined"==typeof window?[3,2]:[4,(0,i.get_remote_loaded_schemas)()];case 1:return r=o.sent(),[3,3];case 2:r=n.g.validare,o.label=3;case 3:return"string"==typeof e?r&&r[e]&&(c=r[e].length,u=r[e].chars,t={length:c,chars:u}):"object"==typeof e&&"string"==e.type&&"number"==typeof e.length&&(t={length:e.length,chars:e.chars}),h="",[2,new Promise((function(e,n){if(t.chars){var r=t.chars;s.syncForEach((function(e,n){var o;-1!=(null===(o=t.chars)||void 0===o?void 0:o.indexOf(e))&&(t.chars&&(r=r.replace(e,"")),h+=a.presets_characters[e]),n()}),(function(){h+=r;var n=l(t.length,h);e(n)}))}else{var o=l(t.length,a.presets_characters.all);e(o)}}))]}}))}))};var i=n(2756),a=n(4542),s=Object.keys(a.presets_characters);function l(e,t){e||(e=8);for(var n="",r=t.length,o=0;o<e;)n+=t.charAt(Math.floor(Math.random()*r)),o+=1;return n}},4542:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.presets_characters=void 0,t.presets_characters={all:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",standart:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789","A-Z":"ABCDEFGHIJKLMNOPQRSTUVWXYZ","a-z":"abcdefghijklmnopqrstuvwxyz","0-9":"0123456789","0-f":"0123456789abcdef","0-F":"0123456789ABCDEF",binary:"01"}},2780:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{l(r.next(e))}catch(e){i(e)}}function s(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,r=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){i=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){i.label=s[1];break}if(6===s[0]&&i.label<o[1]){i.label=o[1],o=s;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(s);break}o[2]&&i.ops.pop(),i.trys.pop();continue}s=t.call(e,i)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.validateFields=function(e,t){var n=this;return function(s,l,c){var u=[];e.syncForEach((function(e,t){return r(n,void 0,void 0,(function(){var n,r,c,h,p,m,d;return o(this,(function(o){switch(o.label){case 0:return c=!1,"string"==typeof e?(e.endsWith("?")&&(c=!0,e=e.slice(0,e.length-1)),m=e.split("."),n=e,r=m[m.length-1]):(n=e.dataname,r=e.schema,c=void 0!==e.allow_undefined&&e.allow_undefined),[4,(0,i.get_value)(n,s,l)];case 1:return void 0===(h=o.sent())&&c?[2,t()]:[4,(0,a.validator)(r,h)];case 2:return(p=o.sent()).status||(m=n.split("."),d=m[m.length-1],u.push({data:h,dataname:d,error:p.error,reason:p.reason,message:p.message})),t(),[2]}}))}))}),(function(){if(0!=u.length)return t(u,s,l);c()}))}},n(2718);var i=n(361),a=n(2306)},8627:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{l(r.next(e))}catch(e){i(e)}}function s(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,r=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){i=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){i.label=s[1];break}if(6===s[0]&&i.label<o[1]){i.label=o[1],o=s;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(s);break}o[2]&&i.ops.pop(),i.trys.pop();continue}s=t.call(e,i)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.validateFile=function(e,t){var n=this;return function(e,t,i){return r(n,void 0,void 0,(function(){return o(this,(function(e){return i(),[2]}))}))}},n(2718)},4509:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{l(r.next(e))}catch(e){i(e)}}function s(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,r=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){i=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){i.label=s[1];break}if(6===s[0]&&i.label<o[1]){i.label=o[1],o=s;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(s);break}o[2]&&i.ops.pop(),i.trys.pop();continue}s=t.call(e,i)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.validateSwitch=function(e,t,n){var s=this;return function(l,c,u){return r(s,void 0,void 0,(function(){var s,h,p,m=this;return o(this,(function(d){switch(d.label){case 0:return[4,(0,i.get_value)(e,l,c)];case 1:return null==(s=d.sent())||(h=t[s]?t[s]:t.$default?t.$default:[],p=[],h.syncForEach((function(e,t){return r(m,void 0,void 0,(function(){var n,r,s,u,h,m,d;return o(this,(function(o){switch(o.label){case 0:return s=!1,"string"==typeof e?(e.endsWith("?")&&(s=!0,e=e.slice(0,e.length-1)),m=e.split("."),n=e,r=m[m.length-1]):(n=e.dataname,r=e.schema,s=void 0!==e.allow_undefined&&e.allow_undefined),[4,(0,i.get_value)(n,l,c)];case 1:return void 0===(u=o.sent())&&s?[2,t()]:[4,(0,a.validator)(r,u)];case 2:return(h=o.sent()).status||(m=n.split("."),d=m[m.length-1],p.push({data:u,dataname:d,error:h.error,reason:h.reason,message:h.message})),t(),[2]}}))}))}),(function(){if(0!=p.length)return n(p,l,c);u()}))),[2]}}))}))}},n(2718);var i=n(361),a=n(2306)},2693:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{l(r.next(e))}catch(e){i(e)}}function s(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,r=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){i=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){i.label=s[1];break}if(6===s[0]&&i.label<o[1]){i.label=o[1],o=s;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(s);break}o[2]&&i.ops.pop(),i.trys.pop();continue}s=t.call(e,i)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.get_requiments=function(e){var t=this;return new Promise((function(a,s){return r(t,void 0,void 0,(function(){var t;return o(this,(function(r){switch(r.label){case 0:return"string"!=typeof e?[3,4]:"undefined"==typeof window?[3,2]:[4,(0,i.get_remote_loaded_schemas)()];case 1:return t=r.sent(),[3,3];case 2:t=n.g.validare,r.label=3;case 3:t||a({type:"string",required:!0}),t||a({type:"string",required:!0}),t[e]?a(t[e]):a({type:"string",required:!0}),r.label=4;case 4:return a(e),[2]}}))}))}))};var i=n(2756)},4061:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{l(r.next(e))}catch(e){i(e)}}function s(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,r=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){i=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){i.label=s[1];break}if(6===s[0]&&i.label<o[1]){i.label=o[1],o=s;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(s);break}o[2]&&i.ops.pop(),i.trys.pop();continue}s=t.call(e,i)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.get_schema=function(e){return r(this,void 0,void 0,(function(){var t=this;return o(this,(function(n){return[2,new Promise((function(n,a){return r(t,void 0,void 0,(function(){var t;return o(this,(function(r){switch(r.label){case 0:return[4,(0,i.get_requiments)(e)];case 1:return t=r.sent(),n(t),[2]}}))}))}))]}))}))};var i=n(2693)},839:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.get_time=function(e,t){return e*n[t]};var n={milisecond:1,second:1e3,minute:6e4,hour:36e5,day:864e5,week:6048e5,month:2592e6,year:31536e6}},361:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{l(r.next(e))}catch(e){i(e)}}function s(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,r=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){i=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){i.label=s[1];break}if(6===s[0]&&i.label<o[1]){i.label=o[1],o=s;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(s);break}o[2]&&i.ops.pop(),i.trys.pop();continue}s=t.call(e,i)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.get_value=function(e,t,n){return r(this,void 0,void 0,(function(){return o(this,(function(r){return[2,new Promise((function(r,o){var i,a=e.split(".");"req"==a[0]?(i=t,a.splice(0,1)):"res"==a[0]?(i=n,a.splice(0,1)):i=t,a.syncForEach((function(e,t){i=i[e],t()}),(function(){r(i)}))}))]}))}))},n(2718)},2756:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{l(r.next(e))}catch(e){i(e)}}function s(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,r=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){i=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){i.label=s[1];break}if(6===s[0]&&i.label<o[1]){i.label=o[1],o=s;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(s);break}o[2]&&i.ops.pop(),i.trys.pop();continue}s=t.call(e,i)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.validare_messages=void 0,t.remoteLoadFiles=s,t.get_remote_loaded_schemas=function(){var e=this;return new Promise((function(t,n){return r(e,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return a?[2,t(i)]:[4,s()];case 1:return e.sent(),[2,t(i)]}}))}))}))},n(2718);var i={};t.validare_messages={};var a=!1;function s(){var e=this;return new Promise((function(n,s){return r(e,void 0,void 0,(function(){var e,s,l,c,u,h;return o(this,(function(p){switch(p.label){case 0:return e=document.querySelector('[name="validare-schemas"]'),s=document.querySelector('[name="messages"]'),l=null==e?void 0:e.getAttribute("dist"),c=null==s?void 0:s.getAttribute("dist"),u=JSON.parse("[".concat(null==e?void 0:e.getAttribute("schemas"),"]")),h=JSON.parse("[".concat(null==s?void 0:s.getAttribute("schemas"),"]")),u?[4,u.syncForEach((function(e,t){return r(this,void 0,void 0,(function(){var n,r;return o(this,(function(o){switch(o.label){case 0:return[4,fetch("".concat(l,"/").concat(e))];case 1:return 200!=(n=o.sent()).status?(console.error("".concat(e," is not accessable")),[2,t()]):[4,n.json()];case 2:return r=o.sent(),i=Object.assign(i,r),t(),[2]}}))}))}))]:[2,console.error("No any schema attached")];case 1:return p.sent(),[4,h.syncForEach((function(e,n){return r(this,void 0,void 0,(function(){var r,i;return o(this,(function(o){switch(o.label){case 0:return[4,fetch("".concat(c,"/").concat(e))];case 1:return 200!=(r=o.sent()).status?(console.error("".concat(e," is not accessable")),[2,n()]):[4,r.json()];case 2:return i=o.sent(),t.validare_messages=Object.assign(t.validare_messages,i),n(),[2]}}))}))}))];case 2:return p.sent(),a=!0,n(),[2]}}))}))}))}},9354:function(e,t,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},r.apply(this,arguments)},o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{l(r.next(e))}catch(e){i(e)}}function s(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,r=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){i=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){i.label=s[1];break}if(6===s[0]&&i.label<o[1]){i.label=o[1],o=s;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(s);break}o[2]&&i.ops.pop(),i.trys.pop();continue}s=t.call(e,i)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.load_validare_messages=function(e){return o(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,(0,a.readdirSync)(e)];case 1:return[4,t.sent().syncForEach((function(t,o){var i=(0,a.readFileSync)("".concat(e,"/").concat(t)),s=JSON.parse("".concat(i));n.g.validare.messages=r(r({},n.g.validare.messages),s),o()}))];case 2:return t.sent(),[2]}}))}))};var a=n(3046)},2171:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{l(r.next(e))}catch(e){i(e)}}function s(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,r=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){i=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){i.label=s[1];break}if(6===s[0]&&i.label<o[1]){i.label=o[1],o=s;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(s);break}o[2]&&i.ops.pop(),i.trys.pop();continue}s=t.call(e,i)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.validate_inner_keys=function(e,t){var n=this,i=e.split("."),a=t;return new Promise((function(e,t){return r(n,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return[4,i.syncForEach((function(t,n){if(void 0===a[t]||null===a[t])return e(!1);a=a[t],n()}))];case 1:return t.sent(),e(!0),[2]}}))}))}))},n(2718)},9429:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{l(r.next(e))}catch(e){i(e)}}function s(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,r=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){i=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){i.label=s[1];break}if(6===s[0]&&i.label<o[1]){i.label=o[1],o=s;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(s);break}o[2]&&i.ops.pop(),i.trys.pop();continue}s=t.call(e,i)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.validate_element=a;var i=n(2306);function a(e,t){var n=this;return new Promise((function(a,s){return r(n,void 0,void 0,(function(){var n,r,s,l,c;return o(this,(function(o){switch(o.label){case 0:return null==(n="string"==typeof e?document.querySelector(e):e)?[2,a()]:(r=n.value,(s=""!=n.getAttribute("data-validate")?n.getAttribute("data-validate"):n.getAttribute("name"))?[4,(0,i.validator)(s,r)]:[2,a()]);case 1:return l=o.sent(),n.setAttribute("data-validation-status",l.status?"true":"false"),n.setAttribute("data-validation-full-result",JSON.stringify(l)),c=n.getAttribute("data-message-box"),t&&(l.status?document.getElementById(c).innerText="":document.getElementById(c).innerText=l.message),a(),[2]}}))}))}))}function s(e){a(e.target,"change"==e.type)}"undefined"!=typeof document&&document.addEventListener("DOMContentLoaded",(function(){document.querySelectorAll("[data-validate]").forEach((function(e){a(e,!1),null==e||e.addEventListener("change",s),null==e||e.addEventListener("focusout",s),null==e||e.addEventListener("keyup",s)}))}))},5171:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{l(r.next(e))}catch(e){i(e)}}function s(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,r=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){i=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){i.label=s[1];break}if(6===s[0]&&i.label<o[1]){i.label=o[1],o=s;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(s);break}o[2]&&i.ops.pop(),i.trys.pop();continue}s=t.call(e,i)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.get_schema=t.loadValidareMessages=t.validate_inner_keys=t.validate_element=t.validateFile=t.validateSwitch=t.validateFields=t.ID=t.validator=t.Schema=void 0,t.validationConfig=function(e){return r(this,void 0,void 0,(function(){return o(this,(function(t){return n.g.validare={},e.files&&(0,i.loadFiles)("validare",e.files),e.messages&&(0,f.load_validare_messages)(e.messages),[2]}))}))};var i=n(4625);n(2718);var a=n(1281);Object.defineProperty(t,"Schema",{enumerable:!0,get:function(){return a.Schema}});var s=n(3866);Object.defineProperty(t,"ID",{enumerable:!0,get:function(){return s.create_id}});var l=n(2306);Object.defineProperty(t,"validator",{enumerable:!0,get:function(){return l.validator}});var c=n(2780);Object.defineProperty(t,"validateFields",{enumerable:!0,get:function(){return c.validateFields}});var u=n(4509);Object.defineProperty(t,"validateSwitch",{enumerable:!0,get:function(){return u.validateSwitch}});var h=n(8627);Object.defineProperty(t,"validateFile",{enumerable:!0,get:function(){return h.validateFile}});var p=n(9429);Object.defineProperty(t,"validate_element",{enumerable:!0,get:function(){return p.validate_element}});var m=n(2171);Object.defineProperty(t,"validate_inner_keys",{enumerable:!0,get:function(){return m.validate_inner_keys}});var d=n(4061);Object.defineProperty(t,"get_schema",{enumerable:!0,get:function(){return d.get_schema}});var f=n(9354);Object.defineProperty(t,"loadValidareMessages",{enumerable:!0,get:function(){return f.load_validare_messages}}),n(9429)},8119:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.randomize=function(e){if("number"!=typeof e.min)return console.error("To use random number, the min_length property must take a number type value.");if("number"!=typeof e.max)return console.error("To use random number, the max_length property must take a number type value");if("number"!=typeof e.len)return console.error("To use random number, the length property must take a number type value");var t=0,n=1;return e.len?n=e.len:(e.min&&(t=e.min),e.max&&(n=e.max)),Math.floor(Math.random()*(n-t)+t)}},2306:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{l(r.next(e))}catch(e){i(e)}}function s(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,r=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){i=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){i.label=s[1];break}if(6===s[0]&&i.label<o[1]){i.label=o[1],o=s;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(s);break}o[2]&&i.ops.pop(),i.trys.pop();continue}s=t.call(e,i)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.validate_with_schema=l,t.validator=function(e,t,n){return r(this,void 0,void 0,(function(){var s=this;return o(this,(function(c){return[2,new Promise((function(c,u){return r(s,void 0,void 0,(function(){var s,u,h;return o(this,(function(p){switch(p.label){case 0:return s="$default","string"==typeof e?s=e:e.name&&(s=e.name),[4,(0,a.get_requiments)(e)];case 1:return e=p.sent(),u=JSON.parse(JSON.stringify(e)),n&&n.dont_validate?[4,null==n?void 0:n.dont_validate.syncForEach((function(e,t){delete u[e],t()}))]:[3,3];case 2:p.sent(),p.label=3;case 3:if(u.dont_validate_empty&&""==t)return[2,c(new i.Status("no_error",s,null,t))];if(u.allow_undefined&&void 0===t)return[2,c(new i.Status("no_error",s,null,t))];if(u.allow_null&&null===t)return[2,c(new i.Status("no_error",s,null,t))];if(u.required){if(void 0===t)return[2,c(new i.Status("undefined",s,u.required,t))];if(null===t)return[2,c(new i.Status("null",s,u.required,t))]}return"multi-type"!=u.type?[3,4]:(u.types.syncForEach((function(e,n){return r(this,void 0,void 0,(function(){var r;return o(this,(function(o){switch(o.label){case 0:return[4,l(e,t,s)];case 1:return 1==(r=o.sent()).status?[2,c(r)]:(n(),[2])}}))}))}),(function(){c(new i.Status("not-matched-with-any-type",s,u.required,t))})),[3,6]);case 4:return[4,l(u,t,s)];case 5:h=p.sent(),c(h),p.label=6;case 6:return[2]}}))}))}))]}))}))};var i=n(8482),a=n(2693),s=n(5099);function l(e,t,n){return r(this,void 0,void 0,(function(){var a=this;return o(this,(function(l){return[2,new Promise((function(l,c){return r(a,void 0,void 0,(function(){return o(this,(function(a){switch(a.label){case 0:return[4,s.validators[e.type]];case 1:return a.sent().syncForEach((function(a,s){return r(this,void 0,void 0,(function(){var r;return o(this,(function(o){switch(o.label){case 0:return[4,a(e,t)];case 1:return"no_error"==(r=o.sent())?s():l(new i.Status(r,n,e[r],t)),[2]}}))}))}),(function(){l(new i.Status("no_error",n,null,t))})),[2]}}))}))}))]}))}))}},5099:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validators=void 0;var r=n(8246),o=n(3740),i=n(3796),a=n(2761),s=n(159),l=n(944),c=n(5271),u=n(3110),h=n(9891),p=n(9307),m=n(7042),d=n(9744),f=n(7614),g=n(378),b=n(7183),y=n(6120),v=n(5426),w=n(553);t.validators={string:[r.validate_onlytype,w.ignore_empty,i.validate_string,a.validate_length,m.validate_case,d.validate_igonered],number:[r.validate_onlytype,o.validate_numbers],bigint:[r.validate_onlytype,o.validate_numbers],object:[r.validate_onlytype,a.validate_length],boolean:[r.validate_onlytype],undefined:[r.validate_onlytype],email:[w.ignore_empty,s.validate_email,a.validate_length],ip:[w.ignore_empty,l.validate_ip,a.validate_length],phone:[w.ignore_empty,c.validate_phone,a.validate_length],url:[w.ignore_empty,u.validate_url,a.validate_length],"string-number":[o.validate_numbers],file:[h.validate_file],values:[p.validate_values],array:[f.validate_array],base64:[g.validate_base64],doi:[w.ignore_empty,b.validate_doi],"unicode-name":[y.validate_unicode_name,w.ignore_empty,a.validate_length,m.validate_case],latex:[a.validate_length,v.validate_latex]}},7614:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{l(r.next(e))}catch(e){i(e)}}function s(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,r=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){i=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){i.label=s[1];break}if(6===s[0]&&i.label<o[1]){i.label=o[1],o=s;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(s);break}o[2]&&i.ops.pop(),i.trys.pop();continue}s=t.call(e,i)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.validate_array=function(e,t){var n=this;return new Promise((function(a,s){return r(n,void 0,void 0,(function(){return o(this,(function(n){return"object"!=typeof t?[2,a("type")]:Array.isArray(t)?e.max_element&&t.length>e.max_element?[2,a("max_element")]:e.min_element&&t.length<e.min_element?[2,a("min_element")]:e.max_element_eq&&t.length>e.max_element_eq?[2,a("max_element")]:e.min_element_eq&&t.length<e.min_element_eq?[2,a("min_element")]:e.possible_types?[2,t.syncForEach((function(t,n){var s;null===(s=e.possible_types)||void 0===s||s.syncForEach((function(e,a){return r(this,void 0,void 0,(function(){return o(this,(function(r){switch(r.label){case 0:return[4,(0,i.validator)(e,t)];case 1:return r.sent().status?[2,n()]:(a(),[2])}}))}))}),(function(){a("possible_types")}))}),(function(){return a("no_error")}))]:[2,a("no_error")]:[2,a("type")]}))}))}))};var i=n(2306)},378:function(e,t){"use strict";var n=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{l(r.next(e))}catch(e){i(e)}}function s(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},r=this&&this.__generator||function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,r=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){i=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){i.label=s[1];break}if(6===s[0]&&i.label<o[1]){i.label=o[1],o=s;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(s);break}o[2]&&i.ops.pop(),i.trys.pop();continue}s=t.call(e,i)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.validate_base64=function(e,t){var i=this;return new Promise((function(a,s){return n(i,void 0,void 0,(function(){return r(this,(function(n){return o.test(t)?e.max_size&&t.length>e.max_size?[2,a("max_size")]:e.min_size&&t.length<e.min_size?[2,a("min_size")]:(a("no_error"),[2]):[2,a("type")]}))}))}))};var o=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/},7042:function(e,t){"use strict";var n=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{l(r.next(e))}catch(e){i(e)}}function s(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},r=this&&this.__generator||function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,r=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){i=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){i.label=s[1];break}if(6===s[0]&&i.label<o[1]){i.label=o[1],o=s;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(s);break}o[2]&&i.ops.pop(),i.trys.pop();continue}s=t.call(e,i)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.validate_case=function(e,t){var o=this;return new Promise((function(i,a){return n(o,void 0,void 0,(function(){return r(this,(function(n){return e.casetype?"unset"==e.casetype||"lowercase"==e.casetype&&t==t.toLowerCase()||"uppercase"==e.casetype&&t==t.toUpperCase()||"combined"==e.casetype&&t!=t.toUpperCase()&&t!=t.toLowerCase()?[2,i("no_error")]:(i(e.casetype),[2]):[2,i("no_error")]}))}))}))}},9744:function(e,t){"use strict";var n=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{l(r.next(e))}catch(e){i(e)}}function s(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},r=this&&this.__generator||function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,r=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){i=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){i.label=s[1];break}if(6===s[0]&&i.label<o[1]){i.label=o[1],o=s;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(s);break}o[2]&&i.ops.pop(),i.trys.pop();continue}s=t.call(e,i)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.validate_igonered=function(e,t){var o=this;return new Promise((function(i,a){return n(o,void 0,void 0,(function(){var n;return r(this,(function(r){return e.ignored&&-1!=(null===(n=e.ignored)||void 0===n?void 0:n.indexOf(t))?[2,i("ignored")]:[2,i("no_error")]}))}))}))}},7183:function(e,t){"use strict";var n=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{l(r.next(e))}catch(e){i(e)}}function s(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},r=this&&this.__generator||function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,r=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){i=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){i.label=s[1];break}if(6===s[0]&&i.label<o[1]){i.label=o[1],o=s;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(s);break}o[2]&&i.ops.pop(),i.trys.pop();continue}s=t.call(e,i)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.validate_doi=function(e,t){var i=this;return new Promise((function(e,a){return n(i,void 0,void 0,(function(){return r(this,(function(n){return"string"!=typeof t?(e("invalid"),[2]):o.test(t)?[2,e("no_error")]:(e("invalid"),[2])}))}))}))};var o=/\b(10[.][0-9]{4,}(?:[.][0-9]+)*\/(?:(?!["&\'<>])\S)+)\b/},159:function(e,t){"use strict";var n=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{l(r.next(e))}catch(e){i(e)}}function s(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},r=this&&this.__generator||function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,r=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){i=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){i.label=s[1];break}if(6===s[0]&&i.label<o[1]){i.label=o[1],o=s;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(s);break}o[2]&&i.ops.pop(),i.trys.pop();continue}s=t.call(e,i)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.validate_email=function(e,t){var i=this;return new Promise((function(a,s){return n(i,void 0,void 0,(function(){var n,i;return r(this,(function(r){return"string"!=typeof t?(a("invalid"),[2]):((n=new RegExp(o,"g").exec(t))?n.groups&&(i=n.groups.service,e.services?-1!=e.services.indexOf(i)?a("no_error"):a("services"):a("no_error")):a("invalid"),[2])}))}))}))};var o="^[\\w-\\.]+@(?<service>[\\w-]+\\.+[\\w-]{2,4}$)"},9891:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{l(r.next(e))}catch(e){i(e)}}function s(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t