-
Notifications
You must be signed in to change notification settings - Fork 1
/
angular-xregexp.min.js
2 lines (2 loc) · 1.78 KB
/
angular-xregexp.min.js
1
2
"format amd";!function(){"use strict";function a(){try{return require("xregexp")}catch(a){throw new Error("Please install XRegExp via npm. Please reference to: https://github.com/cosimomeli/angular-xregexp")}}function b(b,c){function d(a){a=b.element(a).clone();try{a.empty()}catch(c){}var d=b.element("<div>").append(a).html();try{return a[0].nodeType===f?b.lowercase(d):d.match(/^(<[^>]+>)/)[1].replace(/^<([\w\-]+)/,function(a,c){return"<"+b.lowercase(c)})}catch(c){return b.lowercase(d)}}function e(a,e,f,g){function h(a){var b=/^\/(.+)\/([a-z]*)$/;a instanceof RegExp&&(a=a.toString());var d=a.match(b);if(d)return new c(d[1],d[2])}if(g){var i,j=h(f.ngPattern||f.pattern);f.$observe("pattern",function(a){if(b.isString(a)&&a.length>0?a=new c("^"+a+"$"):a instanceof RegExp&&(a=h(a)),a&&!a.test)throw b.$$minErr("ngPattern")("noregexp","Expected {0} to be a RegExp but was {1}. Element: {2}",j,a,d(e));i=a||void 0,g.$validate()}),g.$validators.pattern=function(a,c){return g.$isEmpty(c)||b.isUndefined(i)||i.test(c)}}}if("undefined"==typeof c){if("function"!=typeof require)throw new Error("XRegExp cannot be found by angular-xregexp! Please reference to: https://github.com/cosimomeli/angular-xregexp");c=a()}var f=3;return b.module("angularXRegExp",[]).config(["$provide",function(a){a.decorator("ngPatternDirective",["$delegate",function(a){return a[0].compile=function(){return function(){e.apply(this,arguments)}},a}])}]),"angularXRegExp"}var c=window&&window.process&&window.process.type;"function"==typeof define&&define.amd?define(["angular","xregexp"],b):"undefined"!=typeof module&&module&&module.exports&&"function"==typeof require&&!c?module.exports=b(require("angular"),require("xregexp")):b(angular,("undefined"!=typeof global?global:window).XRegExp)}();
//# sourceMappingURL=angular-xregexp.min.js.map