{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///dist/formly.min.js","webpack:///webpack/bootstrap 96d235d5d0c240ffbf96","webpack:///./index.js","webpack:///./angular-fix/index.js","webpack:///./other/utils.js","webpack:///external {\"root\":\"apiCheck\",\"amd\":\"api-check\",\"commonjs2\":\"api-check\",\"commonjs\":\"api-check\"}","webpack:///./directives/formly-custom-validation.js","webpack:///./directives/formly-field.js","webpack:///./directives/formly-focus.js","webpack:///./directives/formly-form.js","webpack:///./index.common.js","webpack:///./providers/formlyApiCheck.js","webpack:///./providers/formlyConfig.js","webpack:///./providers/formlyUsability.js","webpack:///./providers/formlyValidationMessages.js","webpack:///./run/formlyCustomTags.js","webpack:///./run/formlyNgModelAttrsManipulator.js","webpack:///./services/formlyUtil.js","webpack:///./services/formlyWarn.js","webpack:///external \"angular\""],"names":["root","factory","exports","module","require","define","amd","this","__WEBPACK_EXTERNAL_MODULE_4__","__WEBPACK_EXTERNAL_MODULE_18__","modules","__webpack_require__","moduleId","installedModules","id","loaded","call","m","c","p","_interopRequireDefault","obj","__esModule","default","Object","defineProperty","value","_indexCommon","_indexCommon2","angular","version","window","formlyEval","scope","expression","$modelValue","$viewValue","extraLocals","_angularFix2","isFunction","$eval","extend","getFieldId","formId","options","index","type","template","templateUrl","key","join","reverseDeepMerge","dest","forEach","arguments","src","val","prop","isDefined","objAndSameType","copy","obj1","obj2","isObject","getPrototypeOf","findByNodeName","el","nodeName","element","toUpperCase","children","i","length","node","arrayify","isArray","extendFunction","_len","fns","Array","_key","args","fn","apply","extendArray","primary","secondary","property","item","indexOf","push","_angularFix","formlyCustomValidation","formlyConfig","formlyUtil","$q","formlyWarn","isPromiseLike","then","restrict","link","attrs","ctrl","addValidatorToPipeline","isAsync","validator","name","setupMessage","useNewValidatorsApi","setupWithValidators","setupWithParsers","message","opts","validation","messages","isPossiblyAsync","isString","validatorCollection","extras","explicitAsync","modelValue","viewValue","logAsyncValidatorsDeprecationNotice","when","reject","inFlightValidator","undefined","$parsers","unshift","isValid","$pending","$setValidity","keys","warnedValidators","hasOwnProperty","validators","bind","asyncValidators","$inject","_toConsumableArray","arr","arr2","from","formlyField","$http","$compile","$templateCache","$interpolate","formlyValidationMessages","formlyApiCheck","formlyUsability","FormlyFieldController","$scope","$timeout","$parse","$controller","runExpressions","field","currentValue","valueGetterSetter","expressionProperties","setter","assign","promise","newVal","model","simplifyLife","data","templateOptions","to","formOptions","setFieldIdAndName","formName","form","$name","setDefaultValue","defaultValue","setInitialValue","initialValue","mergeFieldOptionsWithTypeDefaults","mergeOptions","defaultOptions","properOrder","optionsTypes","reverse","typeName","getType","extraOptions","extendOptionsWithDefaults","resetModel","updateInitialValue","formControl","resetFormControl","isMultiNgModel","$setViewValue","$render","$setUntouched","$setPristine","$root","$$phase","$digest","addValidationMessages","invokeControllers","controller","setupFieldGroup","formState","fieldGroup","fieldType","getFieldType","checkApi","fieldLink","formlyFormCtrl","setFieldGroupTemplate","checkFieldGroupApi","addClass","extraAttributes","elementAttributes","map","setElementTemplate","className","addAttributes","attr","addClasses","templateString","html","asHtml","contents","watchFormControl","watchFieldNameOrExistence","nameExpressionRegex","nameExpression","exec","watchFieldExistence","$watch","fieldCount","fc","stopWatchingShowError","addShowMessagesWatcher","addParsers","addFormatters","customExpression","errorExistsAndShouldBeVisibleExpression","$invalid","show","noTouchedButDirty","isUndefined","$touched","$dirty","errorExistsAndShouldBeVisible","showError","setParsersOrFormatters","formWasPristine","$pristine","formatters","$formatters","formatter","which","getThingsFromType","theType","typeThings","getDefaultOptionsProperty","getThingsFromOptionsTypes","getDefaultOptionsOptionsTypes","optionsTypesThings","optionsTypeName","getFormlyExpressionThing","thing","formlyExpressionParserOrFormatterFunction","originalThingProp","things","ngModelCtrls","ngModelCtrl","_ngModelCtrl","concat","noop","noFormControl","templateEl","ngModelNodes","querySelectorAll","ngModelNode","getAttribute","callLinkFunctions","thusly","runManipulators","manipulators","templateToManipulate","chain","manipulator","newTemplate","fieldManipulators","getManipulators","getFieldTemplate","preWrapper","transcludeInWrappers","postWrapper","error","wrapper","append","addManipulators","_ref","_ref$preWrapper","pre","_ref$postWrapper","post","templateManipulators","fromOptionsOrType","getFieldError","getTemplate","isUrl","templatePromise","_ret2","httpOptions","cache","v","url","get","response","getWrapperOption","aWrapper","checkWrapper","validateOptions","runApiCheck","promises","w","all","wrappersTemplates","wrapperTemplate","checkWrapperTemplate","totalWrapper","shift","doTransclusion","superWrapper","transcludeEl","find","replaceWith","getWrapper","getWrapperByType","typeWrappers","formWrappers","defaultWrapper","formlyFieldOptions","prefix","hide","_ref2","forType","apiCheck","apiCheckInstance","apiCheckFunction","apiCheckOptions","runApiCheckForType","getTypeHeritage","instance","config","disabled","_apiCheck2","globalConfig","checkerObjects","shape","checker","checkOptions","output","docsBaseUrl","transclude","fields","_apiCheck","formlyFocus","$document","previousEl","doc","$observe","activeElement","focus","focusWait","blur","formlyForm","formlyFormGetTemplate","getRootEl","rootEl","getFieldRootEl","fieldRootEl","getHideDirective","hideDirective","defaultHideDirective","getTrackBy","trackBy","getFormName","bindName","minor","getFormlyError","startSymbol","endSymbol","getTranscludeClass","transcludeClass","copyAttributes","attributes","excluded","arrayAttrs","toKebabCase","currentFormId","parentFormAttributes","parent","hasClass","FormlyFormController","onModelOrFormStateChange","hideExpression","evalCloseToFormlyExpression","validateOnModelChange","$validate","setupFields","fieldTransform","setupModels","attachKey","setupWatchers","setupOptions","formOptionsApi","optional","isFieldGroup","watchedModels","initModel","watcher","watchers","listener","watchExpression","getWatchExpression","watchListener","getWatchListener","stopWatching","watchDeep","originalExpression","modifyArgs","_slice","displayName","originalListener","originalArgs","getFormlyFieldLikeLocals","formlyFormLink","setFormController","theFormlyForm","getter","parentForm","$parent","$removeControl","removeData","disableWarnings","fixChromeAutocomplete","global","removeChromeAutoComplete","offInstance","onInstance","input","document","createElement","setAttribute","appendChild","string","replace","$1","toLowerCase","prototype","slice","_providersFormlyApiCheck","_providersFormlyApiCheck2","_otherDocsBaseUrl","_otherDocsBaseUrl2","_providersFormlyUsability","_providersFormlyUsability2","_providersFormlyConfig","_providersFormlyConfig2","_providersFormlyValidationMessages","_providersFormlyValidationMessages2","_servicesFormlyUtil","_servicesFormlyUtil2","_servicesFormlyWarn","_servicesFormlyWarn2","_directivesFormlyCustomValidation","_directivesFormlyCustomValidation2","_directivesFormlyField","_directivesFormlyField2","_directivesFormlyFocus","_directivesFormlyFocus2","_directivesFormlyForm","_directivesFormlyForm2","_runFormlyNgModelAttrsManipulator","_runFormlyNgModelAttrsManipulator2","_runFormlyCustomTags","_runFormlyCustomTags2","ngModuleName","ngModule","constant","provider","directive","run","shapeRequiredIfNot","otherProps","propChecker","shapeRequiredIfNotDefinition","propName","location","propExists","otherPropsExist","some","otherProp","utils","getError","checkerHelpers","setupChecker","nullable","oneOfType","oneOf","formlyExpression","func","specifyWrapperType","typeOrArrayOf","apiCheckProperty","objectOf","apiCheckInstanceProperty","onlyIf","withProperties","warn","throw","apiCheckFunctionProperty","formlyWrapperType","ifNot","types","overwriteOk","bool","object","strict","modelChecker","arrayOf","validatorChecker","fieldOptionsApiShape","$$hashKey","any","number","skipNgModelAttrsManipulator","modelOptions","updateOn","debounce","allowInvalid","getterSetter","timezone","parsers","ngModelAttrs","attribute","bound","array","typeOptionsDefaultOptions","formlyTypeOptions","extends","formlyUsabilityProvider","formlyErrorAndWarningsUrlPrefix","setType","checkType","extendTypeOptions","typeMap","JSON","stringify","_ret","allTypes","checkApiCheck","checkOverwrite","extendsType","extendTypeControllerFunction","extendTypeLinkFunction","extendTypeValidateOptionsFunction","extendTypeDefaultOptions","_otherUtils2","extendTemplate","extendsCtrl","optionsCtrl","extendsFn","optionsFn","originalDefaultOptions","mergedOptions","extendsDO","optionsDO","optionsDOIsFn","extendsDOIsFn","extendsDefaultOptions","mergedDefaultOptions","extenderOptionsDefaultOptions","newDefaultOptions","throwError","errorContext","heritage","setWrapper","_x","_x2","_again","wrapperOptions","getOptionsTypes","getOptionsName","checkWrapperAPI","templateWrappersMap","defaultWrapperName","checkWrapperTypes","shouldThrow","every","newValue","objectName","wrappers","_name","removeWrapperByName","removeWrappersForType","_this","console","warnInfoSlug","_this2","disableNgModelAttrsManipulator","ngModelAttrsManipulatorPreferUnbound","$get","_otherUtils","errorInfoSlug","Error","getErrorMessage","toJson","urlSuffix","additionalInfo","formlyTransclude","addTemplateOptionValueMessage","suffix","alternate","validationMessages","templateOptionValue","addStringMessage","addCustomTags","div","innerHTML","isIeLessThan9","getElementsByTagName","customElements","addFormlyNgModelAttrsManipulator","ngModelAttrsManipulator","addValidation","addIfNotPresent","modelNodes","addModelOptions","modelNode","addTemplateOptionsAttrs","ep","ngModelAttributes","getBuiltInAttributes","attrVal","attrName","ref","toVal","epVal","getEpValue","inTo","inEp","skip","getSkip","getNgModelNodes","selectorNot","skipNot","query","e","getNgModelNodesFallback","allNgModelNodes","matchingNgModelNodes","hasAttribute","nodeMatches","selector","outerHTML","querySelector","boundOnly","bothBooleanAndBound","bothAttributeAndBound","expressionOnly","attributeOnly","boolean","substr","nodes","$log"],"mappings":";CAAA,SAAAA,EAAAC,GACA,gBAAAC,UAAA,gBAAAC,QACAA,OAAAD,QAAAD,EAAAG,QAAA,aAAAA,QAAA,YACA,kBAAAC,gBAAAC,IACAD,QAAA,uBAAAJ,GACA,gBAAAC,SACAA,QAAA,SAAAD,EAAAG,QAAA,aAAAA,QAAA,YAEAJ,EAAA,SAAAC,EAAAD,EAAA,SAAAA,EAAA,UACCO,KAAA,SAAAC,EAAAC,GACD,MCEgB,UAAUC,GCR1B,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAV,OAGA,IAAAC,GAAAU,EAAAD,IACAV,WACAY,GAAAF,EACAG,QAAA,EAUA,OANAL,GAAAE,GAAAI,KAAAb,EAAAD,QAAAC,IAAAD,QAAAS,GAGAR,EAAAY,QAAA,EAGAZ,EAAAD,QAvBA,GAAAW,KAqCA,OATAF,GAAAM,EAAAP,EAGAC,EAAAO,EAAAL,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AAIqE,EAAIpE,OAAQD,IAAKsE,EAAKtE,GAAKqE,EAAIrE,EAAI,OAAOsE,GAAe,MAAO9D,OAAM+D,KAAKF,GkB5iFvL,QAAS5C,GAAWH,EAAc0c,EAAiC2H,GACjE,MAAO,YACL,IAAKrkB,EAAa8V,gBAAiB,CACjC,GAAM1W,GAAOF,MAAM2X,UAAUC,MAAM3b,KAAKsC,WAClCyiB,EAAe9gB,EAAKwP,OAC1BxP,GAAK+C,QAAQ,mBACb/C,EAAKS,KAAI,GAAI6c,EAAkCwD,GAC/CmE,EAAK5J,KAAInb,MAAT+kB,EAAIvhB,EAAS1D,MlBiiFlBzD,OAAOC,eAAevB,EAAS,cAC7BwB,OAAO,IAKTxB,EAAQ,WkBjjFM8F,ElB+jFdA,EAAW0C,SAAW,eAAgB,kCAAmC,QACzEvI,EAAOD,QAAUA,EAAQ,YAIpB,SAASC,EAAQD,GmBpkFvBC,EAAAD,QAAAO","file":"dist/formly.min.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"api-check\"), require(\"angular\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"api-check\", \"angular\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"ngFormly\"] = factory(require(\"api-check\"), require(\"angular\"));\n\telse\n\t\troot[\"ngFormly\"] = factory(root[\"apiCheck\"], root[\"angular\"]);\n})(this, function(__WEBPACK_EXTERNAL_MODULE_4__, __WEBPACK_EXTERNAL_MODULE_18__) {\nreturn \n\n\n/** WEBPACK FOOTER **\n ** webpack/universalModuleDefinition\n **/","//! angular-formly version 6.23.6 built with ♥ by Astrism , Kent C. Dodds (ó ì_í)=óò=(ì_í ò)\n\n(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"api-check\"), require(\"angular\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"api-check\", \"angular\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"ngFormly\"] = factory(require(\"api-check\"), require(\"angular\"));\n\telse\n\t\troot[\"ngFormly\"] = factory(root[\"apiCheck\"], root[\"angular\"]);\n})(this, function(__WEBPACK_EXTERNAL_MODULE_4__, __WEBPACK_EXTERNAL_MODULE_18__) {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId])\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\texports: {},\n/******/ \t\t\tid: moduleId,\n/******/ \t\t\tloaded: false\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.loaded = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, '__esModule', {\n\t value: true\n\t});\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\t\n\tvar _indexCommon = __webpack_require__(9);\n\t\n\tvar _indexCommon2 = _interopRequireDefault(_indexCommon);\n\n\texports['default'] = _indexCommon2['default'];\n\tmodule.exports = exports['default'];\n\n/***/ },\n/* 1 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t// some versions of angular don't export the angular module properly,\n\t// so we get it from window in this case.\n\t'use strict';\n\t\n\tObject.defineProperty(exports, '__esModule', {\n\t value: true\n\t});\n\tvar angular = __webpack_require__(18);\n\t\n\t/* istanbul ignore next */\n\tif (!angular.version) {\n\t angular = window.angular;\n\t}\n\texports['default'] = angular;\n\tmodule.exports = exports['default'];\n\n/***/ },\n/* 2 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\texports[\"default\"] = \"https://github.com/formly-js/angular-formly/blob/\" + (\"6.23.6\") + \"/other/ERRORS_AND_WARNINGS.md#\";\n\tmodule.exports = exports[\"default\"];\n\n/***/ },\n/* 3 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, '__esModule', {\n\t value: true\n\t});\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\t\n\tvar _angularFix = __webpack_require__(1);\n\t\n\tvar _angularFix2 = _interopRequireDefault(_angularFix);\n\t\n\texports['default'] = { formlyEval: formlyEval, getFieldId: getFieldId, reverseDeepMerge: reverseDeepMerge, findByNodeName: findByNodeName, arrayify: arrayify, extendFunction: extendFunction, extendArray: extendArray };\n\t\n\tfunction formlyEval(scope, expression, $modelValue, $viewValue, extraLocals) {\n\t if (_angularFix2['default'].isFunction(expression)) {\n\t return expression($viewValue, $modelValue, scope, extraLocals);\n\t } else {\n\t return scope.$eval(expression, _angularFix2['default'].extend({ $viewValue: $viewValue, $modelValue: $modelValue }, extraLocals));\n\t }\n\t}\n\t\n\tfunction getFieldId(formId, options, index) {\n\t if (options.id) {\n\t return options.id;\n\t }\n\t var type = options.type;\n\t if (!type && options.template) {\n\t type = 'template';\n\t } else if (!type && options.templateUrl) {\n\t type = 'templateUrl';\n\t }\n\t\n\t return [formId, type, options.key, index].join('_');\n\t}\n\t\n\tfunction reverseDeepMerge(dest) {\n\t _angularFix2['default'].forEach(arguments, function (src, index) {\n\t if (!index) {\n\t return;\n\t }\n\t _angularFix2['default'].forEach(src, function (val, prop) {\n\t if (!_angularFix2['default'].isDefined(dest[prop])) {\n\t dest[prop] = _angularFix2['default'].copy(val);\n\t } else if (objAndSameType(dest[prop], val)) {\n\t reverseDeepMerge(dest[prop], val);\n\t }\n\t });\n\t });\n\t return dest;\n\t}\n\t\n\tfunction objAndSameType(obj1, obj2) {\n\t return _angularFix2['default'].isObject(obj1) && _angularFix2['default'].isObject(obj2) && Object.getPrototypeOf(obj1) === Object.getPrototypeOf(obj2);\n\t}\n\t\n\t// recurse down a node tree to find a node with matching nodeName, for custom tags jQuery.find doesn't work in IE8\n\tfunction findByNodeName(el, nodeName) {\n\t if (!el.prop) {\n\t // not a jQuery or jqLite object -> wrap it\n\t el = _angularFix2['default'].element(el);\n\t }\n\t\n\t if (el.prop('nodeName') === nodeName.toUpperCase()) {\n\t return el;\n\t }\n\t\n\t var c = el.children();\n\t for (var i = 0; c && i < c.length; i++) {\n\t var node = findByNodeName(c[i], nodeName);\n\t if (node) {\n\t return node;\n\t }\n\t }\n\t}\n\t\n\tfunction arrayify(obj) {\n\t if (obj && !_angularFix2['default'].isArray(obj)) {\n\t obj = [obj];\n\t } else if (!obj) {\n\t obj = [];\n\t }\n\t return obj;\n\t}\n\t\n\tfunction extendFunction() {\n\t for (var _len = arguments.length, fns = Array(_len), _key = 0; _key < _len; _key++) {\n\t fns[_key] = arguments[_key];\n\t }\n\t\n\t return function extendedFunction() {\n\t var args = arguments;\n\t fns.forEach(function (fn) {\n\t return fn.apply(null, args);\n\t });\n\t };\n\t}\n\t\n\tfunction extendArray(primary, secondary, property) {\n\t if (property) {\n\t primary = primary[property];\n\t secondary = secondary[property];\n\t }\n\t if (secondary && primary) {\n\t _angularFix2['default'].forEach(secondary, function (item) {\n\t if (primary.indexOf(item) === -1) {\n\t primary.push(item);\n\t }\n\t });\n\t return primary;\n\t } else if (secondary) {\n\t return secondary;\n\t } else {\n\t return primary;\n\t }\n\t}\n\tmodule.exports = exports['default'];\n\n/***/ },\n/* 4 */\n/***/ function(module, exports) {\n\n\tmodule.exports = __WEBPACK_EXTERNAL_MODULE_4__;\n\n/***/ },\n/* 5 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, '__esModule', {\n\t value: true\n\t});\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\t\n\tvar _angularFix = __webpack_require__(1);\n\t\n\tvar _angularFix2 = _interopRequireDefault(_angularFix);\n\t\n\texports['default'] = formlyCustomValidation;\n\t\n\t// @ngInject\n\tfunction formlyCustomValidation(formlyConfig, formlyUtil, $q, formlyWarn) {\n\t return {\n\t restrict: 'A',\n\t require: 'ngModel',\n\t link: function formlyCustomValidationLink(scope, el, attrs, ctrl) {\n\t var opts = scope.options;\n\t var warnedValidators = [];\n\t opts.validation.messages = opts.validation.messages || {};\n\t _angularFix2['default'].forEach(opts.validation.messages, function (message, key) {\n\t opts.validation.messages[key] = function () {\n\t return formlyUtil.formlyEval(scope, message, ctrl.$modelValue, ctrl.$viewValue);\n\t };\n\t });\n\t\n\t var useNewValidatorsApi = ctrl.hasOwnProperty('$validators') && !attrs.hasOwnProperty('useParsers');\n\t _angularFix2['default'].forEach(opts.validators, addValidatorToPipeline.bind(null, false));\n\t _angularFix2['default'].forEach(opts.asyncValidators, addValidatorToPipeline.bind(null, true));\n\t\n\t function addValidatorToPipeline(isAsync, validator, name) {\n\t setupMessage(validator, name);\n\t validator = _angularFix2['default'].isObject(validator) ? validator.expression : validator;\n\t if (useNewValidatorsApi) {\n\t setupWithValidators(validator, name, isAsync);\n\t } else {\n\t setupWithParsers(validator, name, isAsync);\n\t }\n\t }\n\t\n\t function setupMessage(validator, name) {\n\t var message = validator.message;\n\t if (message) {\n\t opts.validation.messages[name] = function () {\n\t return formlyUtil.formlyEval(scope, message, ctrl.$modelValue, ctrl.$viewValue);\n\t };\n\t }\n\t }\n\t\n\t function setupWithValidators(validator, name, isAsync) {\n\t var isPossiblyAsync = !_angularFix2['default'].isString(validator);\n\t var validatorCollection = isPossiblyAsync || isAsync ? '$asyncValidators' : '$validators';\n\t\n\t // UPDATE IN 7.0.0\n\t // this is temporary until we can have a breaking change. Allow people to get the wins of the explicitAsync api\n\t if (formlyConfig.extras.explicitAsync && !isAsync) {\n\t validatorCollection = '$validators';\n\t }\n\t\n\t ctrl[validatorCollection][name] = function evalValidity(modelValue, viewValue) {\n\t var value = formlyUtil.formlyEval(scope, validator, modelValue, viewValue);\n\t // UPDATE IN 7.0.0\n\t // In the next breaking change, this code should simply return the value\n\t if (isAsync) {\n\t return value;\n\t } else if (isPossiblyAsync && !formlyConfig.extras.explicitAsync) {\n\t if (isPromiseLike(value)) {\n\t logAsyncValidatorsDeprecationNotice(validator, opts);\n\t return value;\n\t } else {\n\t return value ? $q.when(value) : $q.reject(value);\n\t }\n\t } else {\n\t return value;\n\t }\n\t };\n\t }\n\t\n\t function setupWithParsers(validator, name, isAsync) {\n\t var inFlightValidator = undefined;\n\t ctrl.$parsers.unshift(function evalValidityOfParser(viewValue) {\n\t var isValid = formlyUtil.formlyEval(scope, validator, ctrl.$modelValue, viewValue);\n\t // UPDATE IN 7.0.0\n\t // In the next breaking change, rather than checking for isPromiseLike, it should just check for isAsync.\n\t\n\t if (isAsync || isPromiseLike(isValid)) {\n\t if (!isAsync) {\n\t logAsyncValidatorsDeprecationNotice(validator, opts);\n\t }\n\t ctrl.$pending = ctrl.$pending || {};\n\t ctrl.$pending[name] = true;\n\t inFlightValidator = isValid;\n\t isValid.then(function () {\n\t if (inFlightValidator === isValid) {\n\t ctrl.$setValidity(name, true);\n\t }\n\t })['catch'](function () {\n\t if (inFlightValidator === isValid) {\n\t ctrl.$setValidity(name, false);\n\t }\n\t })['finally'](function () {\n\t var $pending = ctrl.$pending || {};\n\t if (Object.keys($pending).length === 1) {\n\t delete ctrl.$pending;\n\t } else {\n\t delete ctrl.$pending[name];\n\t }\n\t });\n\t } else {\n\t ctrl.$setValidity(name, isValid);\n\t }\n\t return viewValue;\n\t });\n\t }\n\t\n\t function logAsyncValidatorsDeprecationNotice(validator, options) {\n\t if (warnedValidators.indexOf(validator) !== -1) {\n\t // we've warned about this one before. No spam necessary...\n\t return;\n\t }\n\t warnedValidators.push(validator);\n\t formlyWarn('validators-returning-promises-should-use-asyncvalidators', 'Validators returning promises should use asyncValidators instead of validators.', options);\n\t }\n\t }\n\t };\n\t\n\t function isPromiseLike(obj) {\n\t return obj && _angularFix2['default'].isFunction(obj.then);\n\t }\n\t}\n\tformlyCustomValidation.$inject = [\"formlyConfig\", \"formlyUtil\", \"$q\", \"formlyWarn\"];\n\tmodule.exports = exports['default'];\n\n/***/ },\n/* 6 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, '__esModule', {\n\t value: true\n\t});\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\t\n\tfunction _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i]; return arr2; } else { return Array.from(arr); } }\n\t\n\tvar _angularFix = __webpack_require__(1);\n\t\n\tvar _angularFix2 = _interopRequireDefault(_angularFix);\n\t\n\tvar _apiCheck = __webpack_require__(4);\n\t\n\tvar _apiCheck2 = _interopRequireDefault(_apiCheck);\n\t\n\texports['default'] = formlyField;\n\t\n\t/**\n\t * @ngdoc directive\n\t * @name formlyField\n\t * @restrict AE\n\t */\n\t// @ngInject\n\tfunction formlyField($http, $q, $compile, $templateCache, $interpolate, formlyConfig, formlyValidationMessages, formlyApiCheck, formlyUtil, formlyUsability, formlyWarn) {\n\t var arrayify = formlyUtil.arrayify;\n\t\n\t FormlyFieldController.$inject = [\"$scope\", \"$timeout\", \"$parse\", \"$controller\"];\n\t return {\n\t restrict: 'AE',\n\t transclude: true,\n\t require: '?^formlyForm',\n\t scope: {\n\t options: '=',\n\t model: '=',\n\t formId: '@', // TODO remove formId in a breaking release\n\t index: '=?',\n\t fields: '=?',\n\t formState: '=?',\n\t formOptions: '=?',\n\t form: '=?' // TODO require form in a breaking release\n\t },\n\t controller: FormlyFieldController,\n\t link: fieldLink\n\t };\n\t\n\t // @ngInject\n\t function FormlyFieldController($scope, $timeout, $parse, $controller) {\n\t /* eslint max-statements:[2, 31] */\n\t if ($scope.options.fieldGroup) {\n\t setupFieldGroup();\n\t return;\n\t }\n\t\n\t var fieldType = getFieldType($scope.options);\n\t simplifyLife($scope.options);\n\t mergeFieldOptionsWithTypeDefaults($scope.options, fieldType);\n\t extendOptionsWithDefaults($scope.options, $scope.index);\n\t checkApi($scope.options);\n\t // set field id to link labels and fields\n\t\n\t // initalization\n\t setFieldIdAndName();\n\t setDefaultValue();\n\t setInitialValue();\n\t runExpressions();\n\t addValidationMessages($scope.options);\n\t invokeControllers($scope, $scope.options, fieldType);\n\t\n\t // function definitions\n\t function runExpressions() {\n\t // must run on next tick to make sure that the current value is correct.\n\t $timeout(function runExpressionsOnNextTick() {\n\t var field = $scope.options;\n\t var currentValue = valueGetterSetter();\n\t _angularFix2['default'].forEach(field.expressionProperties, function runExpression(expression, prop) {\n\t var setter = $parse(prop).assign;\n\t var promise = $q.when(formlyUtil.formlyEval($scope, expression, currentValue, currentValue));\n\t promise.then(function setFieldValue(value) {\n\t setter(field, value);\n\t });\n\t });\n\t });\n\t }\n\t\n\t function valueGetterSetter(newVal) {\n\t if (!$scope.model || !$scope.options.key) {\n\t return undefined;\n\t }\n\t if (_angularFix2['default'].isDefined(newVal)) {\n\t $scope.model[$scope.options.key] = newVal;\n\t }\n\t return $scope.model[$scope.options.key];\n\t }\n\t\n\t function simplifyLife(options) {\n\t // add a few empty objects (if they don't already exist) so you don't have to undefined check everywhere\n\t formlyUtil.reverseDeepMerge(options, {\n\t extras: {},\n\t data: {},\n\t templateOptions: {},\n\t validation: {}\n\t });\n\t // create $scope.to so template authors can reference to instead of $scope.options.templateOptions\n\t $scope.to = $scope.options.templateOptions;\n\t $scope.formOptions = $scope.formOptions || {};\n\t }\n\t\n\t function setFieldIdAndName() {\n\t if (_angularFix2['default'].isFunction(formlyConfig.extras.getFieldId)) {\n\t $scope.id = formlyConfig.extras.getFieldId($scope.options, $scope.model, $scope);\n\t } else {\n\t var formName = $scope.form && $scope.form.$name || $scope.formId;\n\t $scope.id = formlyUtil.getFieldId(formName, $scope.options, $scope.index);\n\t }\n\t $scope.options.id = $scope.id;\n\t $scope.name = $scope.options.name || $scope.options.id;\n\t $scope.options.name = $scope.name;\n\t }\n\t\n\t function setDefaultValue() {\n\t if (_angularFix2['default'].isDefined($scope.options.defaultValue) && !_angularFix2['default'].isDefined($scope.model[$scope.options.key])) {\n\t $scope.model[$scope.options.key] = $scope.options.defaultValue;\n\t }\n\t }\n\t\n\t function setInitialValue() {\n\t $scope.options.initialValue = $scope.model && $scope.model[$scope.options.key];\n\t }\n\t\n\t function mergeFieldOptionsWithTypeDefaults(options, type) {\n\t if (type) {\n\t mergeOptions(options, type.defaultOptions);\n\t }\n\t var properOrder = arrayify(options.optionsTypes).reverse(); // so the right things are overridden\n\t _angularFix2['default'].forEach(properOrder, function (typeName) {\n\t mergeOptions(options, formlyConfig.getType(typeName, true, options).defaultOptions);\n\t });\n\t }\n\t\n\t function mergeOptions(options, extraOptions) {\n\t if (extraOptions) {\n\t if (_angularFix2['default'].isFunction(extraOptions)) {\n\t extraOptions = extraOptions(options);\n\t }\n\t formlyUtil.reverseDeepMerge(options, extraOptions);\n\t }\n\t }\n\t\n\t function extendOptionsWithDefaults(options, index) {\n\t var key = options.key || index || 0;\n\t _angularFix2['default'].extend(options, {\n\t // attach the key in case the formly-field directive is used directly\n\t key: key,\n\t value: options.value || valueGetterSetter,\n\t runExpressions: runExpressions,\n\t resetModel: resetModel,\n\t updateInitialValue: updateInitialValue\n\t });\n\t }\n\t\n\t function resetModel() {\n\t $scope.model[$scope.options.key] = $scope.options.initialValue;\n\t if ($scope.options.formControl) {\n\t if (_angularFix2['default'].isArray($scope.options.formControl)) {\n\t _angularFix2['default'].forEach($scope.options.formControl, function (formControl) {\n\t resetFormControl(formControl, true);\n\t });\n\t } else {\n\t resetFormControl($scope.options.formControl);\n\t }\n\t }\n\t }\n\t\n\t function resetFormControl(formControl, isMultiNgModel) {\n\t if (!isMultiNgModel) {\n\t formControl.$setViewValue($scope.model[$scope.options.key]);\n\t }\n\t\n\t formControl.$render();\n\t formControl.$setUntouched();\n\t formControl.$setPristine();\n\t\n\t // To prevent breaking change requiring a digest to reset $viewModel\n\t if (!$scope.$root.$$phase) {\n\t $scope.$digest();\n\t }\n\t }\n\t\n\t function updateInitialValue() {\n\t $scope.options.initialValue = $scope.model[$scope.options.key];\n\t }\n\t\n\t function addValidationMessages(options) {\n\t options.validation.messages = options.validation.messages || {};\n\t _angularFix2['default'].forEach(formlyValidationMessages.messages, function createFunctionForMessage(expression, name) {\n\t if (!options.validation.messages[name]) {\n\t options.validation.messages[name] = function evaluateMessage(viewValue, modelValue, scope) {\n\t return formlyUtil.formlyEval(scope, expression, modelValue, viewValue);\n\t };\n\t }\n\t });\n\t }\n\t\n\t function invokeControllers(scope) {\n\t var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];\n\t var type = arguments.length <= 2 || arguments[2] === undefined ? {} : arguments[2];\n\t\n\t _angularFix2['default'].forEach([type.controller, options.controller], function (controller) {\n\t if (controller) {\n\t $controller(controller, { $scope: scope });\n\t }\n\t });\n\t }\n\t\n\t function setupFieldGroup() {\n\t $scope.options.options = $scope.options.options || {};\n\t $scope.options.options.formState = $scope.formState;\n\t }\n\t }\n\t\n\t // link function\n\t function fieldLink(scope, el, attrs, formlyFormCtrl) {\n\t if (scope.options.fieldGroup) {\n\t setFieldGroupTemplate();\n\t return;\n\t }\n\t\n\t // watch the field model (if exists) if there is no parent formly-form directive (that would watch it instead)\n\t if (!formlyFormCtrl && scope.options.model) {\n\t scope.$watch('options.model', function () {\n\t return scope.options.runExpressions();\n\t }, true);\n\t }\n\t\n\t addAttributes();\n\t addClasses();\n\t\n\t var type = getFieldType(scope.options);\n\t var args = arguments;\n\t var thusly = this;\n\t var fieldCount = 0;\n\t var fieldManipulators = getManipulators(scope.options, scope.formOptions);\n\t getFieldTemplate(scope.options).then(runManipulators(fieldManipulators.preWrapper)).then(transcludeInWrappers(scope.options, scope.formOptions)).then(runManipulators(fieldManipulators.postWrapper)).then(setElementTemplate).then(watchFormControl).then(callLinkFunctions)['catch'](function (error) {\n\t formlyWarn('there-was-a-problem-setting-the-template-for-this-field', 'There was a problem setting the template for this field ', scope.options, error);\n\t });\n\t\n\t function setFieldGroupTemplate() {\n\t checkFieldGroupApi(scope.options);\n\t el.addClass('formly-field-group');\n\t var extraAttributes = '';\n\t if (scope.options.elementAttributes) {\n\t extraAttributes = Object.keys(scope.options.elementAttributes).map(function (key) {\n\t return key + '=\"' + scope.options.elementAttributes[key] + '\"';\n\t }).join(' ');\n\t }\n\t var modelValue = 'model';\n\t scope.options.form = scope.form;\n\t if (scope.options.key) {\n\t modelValue = 'model[\\'' + scope.options.key + '\\']';\n\t }\n\t setElementTemplate('\\n \\n \\n ');\n\t }\n\t\n\t function addAttributes() {\n\t if (scope.options.elementAttributes) {\n\t el.attr(scope.options.elementAttributes);\n\t }\n\t }\n\t\n\t function addClasses() {\n\t if (scope.options.className) {\n\t el.addClass(scope.options.className);\n\t }\n\t if (scope.options.type) {\n\t el.addClass('formly-field-' + scope.options.type);\n\t }\n\t }\n\t\n\t function setElementTemplate(templateString) {\n\t el.html(asHtml(templateString));\n\t $compile(el.contents())(scope);\n\t return templateString;\n\t }\n\t\n\t function watchFormControl(templateString) {\n\t var stopWatchingShowError = _angularFix2['default'].noop;\n\t if (scope.options.noFormControl) {\n\t return;\n\t }\n\t var templateEl = _angularFix2['default'].element('
' + templateString + '
');\n\t var ngModelNodes = templateEl[0].querySelectorAll('[ng-model],[data-ng-model]');\n\t\n\t if (ngModelNodes.length) {\n\t _angularFix2['default'].forEach(ngModelNodes, function (ngModelNode) {\n\t fieldCount++;\n\t watchFieldNameOrExistence(ngModelNode.getAttribute('name'));\n\t });\n\t }\n\t\n\t function watchFieldNameOrExistence(name) {\n\t var nameExpressionRegex = /\\{\\{(.*?)}}/;\n\t var nameExpression = nameExpressionRegex.exec(name);\n\t if (nameExpression) {\n\t name = $interpolate(name)(scope);\n\t }\n\t watchFieldExistence(name);\n\t }\n\t\n\t function watchFieldExistence(name) {\n\t scope.$watch('form[\"' + name + '\"]', function formControlChange(formControl) {\n\t if (formControl) {\n\t if (fieldCount > 1) {\n\t if (!scope.options.formControl) {\n\t scope.options.formControl = [];\n\t }\n\t scope.options.formControl.push(formControl);\n\t } else {\n\t scope.options.formControl = formControl;\n\t }\n\t scope.fc = scope.options.formControl; // shortcut for template authors\n\t stopWatchingShowError();\n\t addShowMessagesWatcher();\n\t addParsers();\n\t addFormatters();\n\t }\n\t });\n\t }\n\t\n\t function addShowMessagesWatcher() {\n\t stopWatchingShowError = scope.$watch(function watchShowValidationChange() {\n\t var customExpression = formlyConfig.extras.errorExistsAndShouldBeVisibleExpression;\n\t var options = scope.options;\n\t var fc = scope.fc;\n\t\n\t if (!fc.$invalid) {\n\t return false;\n\t } else if (typeof options.validation.show === 'boolean') {\n\t return options.validation.show;\n\t } else if (customExpression) {\n\t return formlyUtil.formlyEval(scope, customExpression, fc.$modelValue, fc.$viewValue);\n\t } else {\n\t var noTouchedButDirty = _angularFix2['default'].isUndefined(fc.$touched) && fc.$dirty;\n\t return scope.fc.$touched || noTouchedButDirty;\n\t }\n\t }, function onShowValidationChange(show) {\n\t scope.options.validation.errorExistsAndShouldBeVisible = show;\n\t scope.showError = show; // shortcut for template authors\n\t });\n\t }\n\t\n\t function addParsers() {\n\t setParsersOrFormatters('parsers');\n\t }\n\t\n\t function addFormatters() {\n\t setParsersOrFormatters('formatters');\n\t var ctrl = scope.fc;\n\t var formWasPristine = scope.form.$pristine;\n\t if (scope.options.formatters) {\n\t (function () {\n\t var value = ctrl.$modelValue;\n\t ctrl.$formatters.forEach(function (formatter) {\n\t value = formatter(value);\n\t });\n\t\n\t ctrl.$setViewValue(value);\n\t ctrl.$render();\n\t ctrl.$setPristine();\n\t if (formWasPristine) {\n\t scope.form.$setPristine();\n\t }\n\t })();\n\t }\n\t }\n\t\n\t function setParsersOrFormatters(which) {\n\t var originalThingProp = 'originalParser';\n\t if (which === 'formatters') {\n\t originalThingProp = 'originalFormatter';\n\t }\n\t\n\t // init with type's parsers\n\t var things = getThingsFromType(type);\n\t\n\t // get optionsTypes things\n\t things = formlyUtil.extendArray(things, getThingsFromOptionsTypes(scope.options.optionsTypes));\n\t\n\t // get field's things\n\t things = formlyUtil.extendArray(things, scope.options[which]);\n\t\n\t // convert things into formlyExpression things\n\t _angularFix2['default'].forEach(things, function (thing, index) {\n\t things[index] = getFormlyExpressionThing(thing);\n\t });\n\t\n\t var ngModelCtrls = scope.fc;\n\t if (!_angularFix2['default'].isArray(ngModelCtrls)) {\n\t ngModelCtrls = [ngModelCtrls];\n\t }\n\t\n\t _angularFix2['default'].forEach(ngModelCtrls, function (ngModelCtrl) {\n\t var _ngModelCtrl;\n\t\n\t ngModelCtrl['$' + which] = (_ngModelCtrl = ngModelCtrl['$' + which]).concat.apply(_ngModelCtrl, _toConsumableArray(things));\n\t });\n\t\n\t function getThingsFromType(theType) {\n\t if (!theType) {\n\t return [];\n\t }\n\t if (_angularFix2['default'].isString(theType)) {\n\t theType = formlyConfig.getType(theType, true, scope.options);\n\t }\n\t var typeThings = [];\n\t\n\t // get things from parent\n\t if (theType['extends']) {\n\t typeThings = formlyUtil.extendArray(typeThings, getThingsFromType(theType['extends']));\n\t }\n\t\n\t // get own type's things\n\t typeThings = formlyUtil.extendArray(typeThings, getDefaultOptionsProperty(theType, which, []));\n\t\n\t // get things from optionsTypes\n\t typeThings = formlyUtil.extendArray(typeThings, getThingsFromOptionsTypes(getDefaultOptionsOptionsTypes(theType)));\n\t\n\t return typeThings;\n\t }\n\t\n\t function getThingsFromOptionsTypes() {\n\t var optionsTypes = arguments.length <= 0 || arguments[0] === undefined ? [] : arguments[0];\n\t\n\t var optionsTypesThings = [];\n\t _angularFix2['default'].forEach(_angularFix2['default'].copy(arrayify(optionsTypes)).reverse(), function (optionsTypeName) {\n\t optionsTypesThings = formlyUtil.extendArray(optionsTypesThings, getThingsFromType(optionsTypeName));\n\t });\n\t return optionsTypesThings;\n\t }\n\t\n\t function getFormlyExpressionThing(thing) {\n\t formlyExpressionParserOrFormatterFunction[originalThingProp] = thing;\n\t return formlyExpressionParserOrFormatterFunction;\n\t\n\t function formlyExpressionParserOrFormatterFunction($viewValue) {\n\t var $modelValue = scope.options.value();\n\t return formlyUtil.formlyEval(scope, thing, $modelValue, $viewValue);\n\t }\n\t }\n\t }\n\t }\n\t\n\t function callLinkFunctions() {\n\t if (type && type.link) {\n\t type.link.apply(thusly, args);\n\t }\n\t if (scope.options.link) {\n\t scope.options.link.apply(thusly, args);\n\t }\n\t }\n\t\n\t function runManipulators(manipulators) {\n\t return function runManipulatorsOnTemplate(templateToManipulate) {\n\t var chain = $q.when(templateToManipulate);\n\t _angularFix2['default'].forEach(manipulators, function (manipulator) {\n\t chain = chain.then(function (template) {\n\t return $q.when(manipulator(template, scope.options, scope)).then(function (newTemplate) {\n\t return _angularFix2['default'].isString(newTemplate) ? newTemplate : asHtml(newTemplate);\n\t });\n\t });\n\t });\n\t return chain;\n\t };\n\t }\n\t }\n\t\n\t // sort-of stateless util functions\n\t function asHtml(el) {\n\t var wrapper = _angularFix2['default'].element('');\n\t return wrapper.append(el).html();\n\t }\n\t\n\t function getFieldType(options) {\n\t return options.type && formlyConfig.getType(options.type);\n\t }\n\t\n\t function getManipulators(options, formOptions) {\n\t var preWrapper = [];\n\t var postWrapper = [];\n\t addManipulators(options.templateManipulators);\n\t addManipulators(formOptions.templateManipulators);\n\t addManipulators(formlyConfig.templateManipulators);\n\t return { preWrapper: preWrapper, postWrapper: postWrapper };\n\t\n\t function addManipulators(manipulators) {\n\t /* eslint-disable */ // it doesn't understand this :-(\n\t\n\t var _ref = manipulators || {};\n\t\n\t var _ref$preWrapper = _ref.preWrapper;\n\t var pre = _ref$preWrapper === undefined ? [] : _ref$preWrapper;\n\t var _ref$postWrapper = _ref.postWrapper;\n\t var post = _ref$postWrapper === undefined ? [] : _ref$postWrapper;\n\t\n\t preWrapper = preWrapper.concat(pre);\n\t postWrapper = postWrapper.concat(post);\n\t /* eslint-enable */\n\t }\n\t }\n\t\n\t function getFieldTemplate(options) {\n\t function fromOptionsOrType(key, fieldType) {\n\t if (_angularFix2['default'].isDefined(options[key])) {\n\t return options[key];\n\t } else if (fieldType && _angularFix2['default'].isDefined(fieldType[key])) {\n\t return fieldType[key];\n\t }\n\t }\n\t\n\t var type = formlyConfig.getType(options.type, true, options);\n\t var template = fromOptionsOrType('template', type);\n\t var templateUrl = fromOptionsOrType('templateUrl', type);\n\t if (_angularFix2['default'].isUndefined(template) && !templateUrl) {\n\t throw formlyUsability.getFieldError('type-type-has-no-template', 'Type \\'' + options.type + '\\' has not template. On element:', options);\n\t }\n\t\n\t return getTemplate(templateUrl || template, _angularFix2['default'].isUndefined(template), options);\n\t }\n\t\n\t function getTemplate(template, isUrl, options) {\n\t var templatePromise = undefined;\n\t if (_angularFix2['default'].isFunction(template)) {\n\t templatePromise = $q.when(template(options));\n\t } else {\n\t templatePromise = $q.when(template);\n\t }\n\t\n\t if (!isUrl) {\n\t return templatePromise;\n\t } else {\n\t var _ret2 = (function () {\n\t var httpOptions = { cache: $templateCache };\n\t return {\n\t v: templatePromise.then(function (url) {\n\t return $http.get(url, httpOptions);\n\t }).then(function (response) {\n\t return response.data;\n\t })['catch'](function handleErrorGettingATemplate(error) {\n\t formlyWarn('problem-loading-template-for-templateurl', 'Problem loading template for ' + template, error);\n\t })\n\t };\n\t })();\n\t\n\t if (typeof _ret2 === 'object') return _ret2.v;\n\t }\n\t }\n\t\n\t function transcludeInWrappers(options, formOptions) {\n\t var wrapper = getWrapperOption(options, formOptions);\n\t\n\t return function transcludeTemplate(template) {\n\t if (!wrapper.length) {\n\t return $q.when(template);\n\t }\n\t\n\t wrapper.forEach(function (aWrapper) {\n\t formlyUsability.checkWrapper(aWrapper, options);\n\t aWrapper.validateOptions && aWrapper.validateOptions(options);\n\t runApiCheck(aWrapper, options);\n\t });\n\t var promises = wrapper.map(function (w) {\n\t return getTemplate(w.template || w.templateUrl, !w.template);\n\t });\n\t return $q.all(promises).then(function (wrappersTemplates) {\n\t wrappersTemplates.forEach(function (wrapperTemplate, index) {\n\t formlyUsability.checkWrapperTemplate(wrapperTemplate, wrapper[index]);\n\t });\n\t wrappersTemplates.reverse(); // wrapper 0 is wrapped in wrapper 1 and so on...\n\t var totalWrapper = wrappersTemplates.shift();\n\t wrappersTemplates.forEach(function (wrapperTemplate) {\n\t totalWrapper = doTransclusion(totalWrapper, wrapperTemplate);\n\t });\n\t return doTransclusion(totalWrapper, template);\n\t });\n\t };\n\t }\n\t\n\t function doTransclusion(wrapper, template) {\n\t var superWrapper = _angularFix2['default'].element(''); // this allows people not have to have a single root in wrappers\n\t superWrapper.append(wrapper);\n\t var transcludeEl = superWrapper.find('formly-transclude');\n\t if (!transcludeEl.length) {\n\t // try it using our custom find function\n\t transcludeEl = formlyUtil.findByNodeName(superWrapper, 'formly-transclude');\n\t }\n\t transcludeEl.replaceWith(template);\n\t return superWrapper.html();\n\t }\n\t\n\t function getWrapperOption(options, formOptions) {\n\t /* eslint complexity:[2, 6] */\n\t var wrapper = options.wrapper;\n\t // explicit null means no wrapper\n\t if (wrapper === null) {\n\t return [];\n\t }\n\t\n\t // nothing specified means use the default wrapper for the type\n\t if (!wrapper) {\n\t // get all wrappers that specify they apply to this type\n\t wrapper = arrayify(formlyConfig.getWrapperByType(options.type));\n\t } else {\n\t wrapper = arrayify(wrapper).map(formlyConfig.getWrapper);\n\t }\n\t\n\t // get all wrappers for that the type specified that it uses.\n\t var type = formlyConfig.getType(options.type, true, options);\n\t if (type && type.wrapper) {\n\t var typeWrappers = arrayify(type.wrapper).map(formlyConfig.getWrapper);\n\t wrapper = wrapper.concat(typeWrappers);\n\t }\n\t\n\t // add form wrappers\n\t if (formOptions.wrapper) {\n\t var formWrappers = arrayify(formOptions.wrapper).map(formlyConfig.getWrapper);\n\t wrapper = wrapper.concat(formWrappers);\n\t }\n\t\n\t // add the default wrapper last\n\t var defaultWrapper = formlyConfig.getWrapper();\n\t if (defaultWrapper) {\n\t wrapper.push(defaultWrapper);\n\t }\n\t return wrapper;\n\t }\n\t\n\t function checkApi(options) {\n\t formlyApiCheck['throw'](formlyApiCheck.formlyFieldOptions, options, {\n\t prefix: 'formly-field directive',\n\t url: 'formly-field-directive-validation-failed'\n\t });\n\t // validate with the type\n\t var type = options.type && formlyConfig.getType(options.type);\n\t if (type) {\n\t if (type.validateOptions) {\n\t type.validateOptions(options);\n\t }\n\t runApiCheck(type, options, true);\n\t }\n\t if (options.expressionProperties && options.expressionProperties.hide) {\n\t formlyWarn('dont-use-expressionproperties.hide-use-hideexpression-instead', 'You have specified `hide` in `expressionProperties`. Use `hideExpression` instead', options);\n\t }\n\t }\n\t\n\t function checkFieldGroupApi(options) {\n\t formlyApiCheck['throw'](formlyApiCheck.fieldGroup, options, {\n\t prefix: 'formly-field directive',\n\t url: 'formly-field-directive-validation-failed'\n\t });\n\t }\n\t\n\t function runApiCheck(_ref2, options, forType) {\n\t var apiCheck = _ref2.apiCheck;\n\t var apiCheckInstance = _ref2.apiCheckInstance;\n\t var apiCheckFunction = _ref2.apiCheckFunction;\n\t var apiCheckOptions = _ref2.apiCheckOptions;\n\t\n\t runApiCheckForType(apiCheck, apiCheckInstance, apiCheckFunction, apiCheckOptions, options);\n\t if (forType && options.type) {\n\t _angularFix2['default'].forEach(formlyConfig.getTypeHeritage(options.type), function (type) {\n\t runApiCheckForType(type.apiCheck, type.apiCheckInstance, type.apiCheckFunction, type.apiCheckOptions, options);\n\t });\n\t }\n\t }\n\t\n\t function runApiCheckForType(apiCheck, apiCheckInstance, apiCheckFunction, apiCheckOptions, options) {\n\t /* eslint complexity:[2, 9] */\n\t if (!apiCheck) {\n\t return;\n\t }\n\t var instance = apiCheckInstance || formlyConfig.extras.apiCheckInstance || formlyApiCheck;\n\t if (instance.config.disabled || _apiCheck2['default'].globalConfig.disabled) {\n\t return;\n\t }\n\t var fn = apiCheckFunction || 'warn';\n\t if (_angularFix2['default'].isFunction(apiCheck)) {\n\t // this is the new API\n\t var checkerObjects = apiCheck(instance);\n\t _angularFix2['default'].forEach(checkerObjects, function (shape, name) {\n\t var checker = instance.shape(shape);\n\t var checkOptions = _angularFix2['default'].extend({\n\t prefix: 'formly-field type ' + options.type + ' for property ' + name,\n\t url: formlyApiCheck.config.output.docsBaseUrl + 'formly-field-type-apicheck-failed'\n\t }, apiCheckOptions);\n\t instance[fn](checker, options[name], checkOptions);\n\t });\n\t } else {\n\t // TODO this is the deprecated API. Remove this in a breaking change.\n\t var checker = instance.shape(apiCheck);\n\t var checkOptions = apiCheckOptions || {\n\t prefix: 'formly-field type ' + options.type,\n\t url: formlyApiCheck.config.output.docsBaseUrl + 'formly-field-type-apicheck-failed'\n\t };\n\t instance[fn](checker, options, checkOptions);\n\t }\n\t }\n\t}\n\tformlyField.$inject = [\"$http\", \"$q\", \"$compile\", \"$templateCache\", \"$interpolate\", \"formlyConfig\", \"formlyValidationMessages\", \"formlyApiCheck\", \"formlyUtil\", \"formlyUsability\", \"formlyWarn\"];\n\t\n\t// Stateless util functions\n\tfunction getDefaultOptionsOptionsTypes(type) {\n\t return getDefaultOptionsProperty(type, 'optionsTypes', []);\n\t}\n\t\n\tfunction getDefaultOptionsProperty(type, prop, defaultValue) {\n\t return type.defaultOptions && type.defaultOptions[prop] || defaultValue;\n\t}\n\tmodule.exports = exports['default'];\n\n/***/ },\n/* 7 */\n/***/ function(module, exports) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, '__esModule', {\n\t value: true\n\t});\n\texports['default'] = formlyFocus;\n\t\n\t// @ngInject\n\tfunction formlyFocus($timeout, $document) {\n\t return {\n\t restrict: 'A',\n\t link: function formlyFocusLink(scope, element, attrs) {\n\t var previousEl = null;\n\t var el = element[0];\n\t var doc = $document[0];\n\t attrs.$observe('formlyFocus', function respondToFocusExpressionChange(value) {\n\t /* eslint no-bitwise:0 */ // I know what I'm doing. I promise...\n\t if (value === 'true') {\n\t $timeout(function setElementFocus() {\n\t previousEl = doc.activeElement;\n\t el.focus();\n\t }, ~ ~attrs.focusWait);\n\t } else if (value === 'false') {\n\t if (doc.activeElement === el) {\n\t el.blur();\n\t if (attrs.hasOwnProperty('refocus') && previousEl) {\n\t previousEl.focus();\n\t }\n\t }\n\t }\n\t });\n\t }\n\t };\n\t}\n\tformlyFocus.$inject = [\"$timeout\", \"$document\"];\n\tmodule.exports = exports['default'];\n\n/***/ },\n/* 8 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, '__esModule', {\n\t value: true\n\t});\n\tvar _slice = Array.prototype.slice;\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\t\n\tfunction _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i]; return arr2; } else { return Array.from(arr); } }\n\t\n\tvar _angularFix = __webpack_require__(1);\n\t\n\tvar _angularFix2 = _interopRequireDefault(_angularFix);\n\t\n\texports['default'] = formlyForm;\n\t\n\t/**\n\t * @ngdoc directive\n\t * @name formlyForm\n\t * @restrict E\n\t */\n\t// @ngInject\n\tfunction formlyForm(formlyUsability, formlyWarn, $parse, formlyConfig, $interpolate) {\n\t var currentFormId = 1;\n\t FormlyFormController.$inject = [\"$scope\", \"formlyApiCheck\", \"formlyUtil\"];\n\t return {\n\t restrict: 'E',\n\t template: formlyFormGetTemplate,\n\t replace: true,\n\t transclude: true,\n\t scope: {\n\t fields: '=',\n\t model: '=',\n\t form: '=?',\n\t options: '=?'\n\t },\n\t controller: FormlyFormController,\n\t link: formlyFormLink\n\t };\n\t\n\t function formlyFormGetTemplate(el, attrs) {\n\t var rootEl = getRootEl();\n\t var fieldRootEl = getFieldRootEl();\n\t var formId = 'formly_' + currentFormId++;\n\t var parentFormAttributes = '';\n\t if (attrs.hasOwnProperty('isFieldGroup') && el.parent().parent().hasClass('formly')) {\n\t parentFormAttributes = copyAttributes(el.parent().parent()[0].attributes);\n\t }\n\t return '\\n <' + rootEl + ' class=\"formly\"\\n name=\"' + getFormName() + '\"\\n role=\"form\" ' + parentFormAttributes + '>\\n <' + fieldRootEl + ' formly-field\\n ng-repeat=\"field in fields ' + getTrackBy() + '\"\\n ' + getHideDirective() + '=\"!field.hide\"\\n class=\"formly-field\"\\n options=\"field\"\\n model=\"field.model || model\"\\n fields=\"fields\"\\n form=\"theFormlyForm\"\\n form-id=\"' + getFormName() + '\"\\n form-state=\"options.formState\"\\n form-options=\"options\"\\n index=\"$index\">\\n \\n
\\n \\n ';\n\t\n\t function getRootEl() {\n\t return attrs.rootEl || 'ng-form';\n\t }\n\t\n\t function getFieldRootEl() {\n\t return attrs.fieldRootEl || 'div';\n\t }\n\t\n\t function getHideDirective() {\n\t return attrs.hideDirective || formlyConfig.extras.defaultHideDirective || 'ng-if';\n\t }\n\t\n\t function getTrackBy() {\n\t if (!attrs.trackBy) {\n\t return '';\n\t } else {\n\t return 'track by ' + attrs.trackBy;\n\t }\n\t }\n\t\n\t function getFormName() {\n\t var formName = formId;\n\t var bindName = attrs.bindName;\n\t if (bindName) {\n\t if (_angularFix2['default'].version.minor < 3) {\n\t throw formlyUsability.getFormlyError('bind-name attribute on formly-form not allowed in < angular 1.3');\n\t }\n\t // we can do a one-time binding here because we know we're in 1.3.x territory\n\t formName = $interpolate.startSymbol() + '::\\'formly_\\' + ' + bindName + $interpolate.endSymbol();\n\t }\n\t return formName;\n\t }\n\t\n\t function getTranscludeClass() {\n\t return attrs.transcludeClass || '';\n\t }\n\t\n\t function copyAttributes(attributes) {\n\t var excluded = ['model', 'form', 'fields', 'options', 'name', 'role', 'class', 'data-model', 'data-form', 'data-fields', 'data-options', 'data-name'];\n\t var arrayAttrs = [];\n\t _angularFix2['default'].forEach(attributes, function (_ref) {\n\t var nodeName = _ref.nodeName;\n\t var value = _ref.value;\n\t\n\t if (nodeName !== 'undefined' && excluded.indexOf(nodeName) === -1) {\n\t arrayAttrs.push(toKebabCase(nodeName) + '=\"' + value + '\"');\n\t }\n\t });\n\t return arrayAttrs.join(' ');\n\t }\n\t }\n\t\n\t // @ngInject\n\t function FormlyFormController($scope, formlyApiCheck, formlyUtil) {\n\t setupOptions();\n\t $scope.model = $scope.model || {};\n\t setupFields();\n\t\n\t // watch the model and evaluate watch expressions that depend on it.\n\t $scope.$watch('model', onModelOrFormStateChange, true);\n\t if ($scope.options.formState) {\n\t $scope.$watch('options.formState', onModelOrFormStateChange, true);\n\t }\n\t\n\t function onModelOrFormStateChange() {\n\t _angularFix2['default'].forEach($scope.fields, function runFieldExpressionProperties(field, index) {\n\t var model = field.model || $scope.model;\n\t field.runExpressions && field.runExpressions();\n\t if (field.hideExpression) {\n\t // can't use hide with expressionProperties reliably\n\t var val = model[field.key];\n\t field.hide = evalCloseToFormlyExpression(field.hideExpression, val, field, index);\n\t }\n\t if (field.extras && field.extras.validateOnModelChange && field.formControl) {\n\t field.formControl.$validate();\n\t }\n\t });\n\t }\n\t\n\t function setupFields() {\n\t $scope.fields = $scope.fields || [];\n\t var fieldTransform = $scope.options.fieldTransform || formlyConfig.extras.fieldTransform;\n\t\n\t if (fieldTransform) {\n\t $scope.fields = fieldTransform($scope.fields, $scope.model, $scope.options, $scope.form);\n\t if (!$scope.fields) {\n\t throw formlyUsability.getFormlyError('fieldTransform must return an array of fields');\n\t }\n\t }\n\t\n\t setupModels();\n\t\n\t _angularFix2['default'].forEach($scope.fields, attachKey); // attaches a key based on the index if a key isn't specified\n\t _angularFix2['default'].forEach($scope.fields, setupWatchers); // setup watchers for all fields\n\t }\n\t\n\t function setupOptions() {\n\t formlyApiCheck['throw']([formlyApiCheck.formOptionsApi.optional], [$scope.options], { prefix: 'formly-form options check' });\n\t $scope.options = $scope.options || {};\n\t $scope.options.formState = $scope.options.formState || {};\n\t\n\t _angularFix2['default'].extend($scope.options, {\n\t updateInitialValue: updateInitialValue,\n\t resetModel: resetModel\n\t });\n\t }\n\t\n\t function updateInitialValue() {\n\t _angularFix2['default'].forEach($scope.fields, function (field) {\n\t if (isFieldGroup(field) && field.options) {\n\t field.options.updateInitialValue();\n\t } else {\n\t field.updateInitialValue();\n\t }\n\t });\n\t }\n\t\n\t function resetModel() {\n\t _angularFix2['default'].forEach($scope.fields, function (field) {\n\t if (isFieldGroup(field) && field.options) {\n\t field.options.resetModel();\n\t } else if (field.resetModel) {\n\t field.resetModel();\n\t }\n\t });\n\t }\n\t\n\t function setupModels() {\n\t // a set of field models that are already watched (the $scope.model will have its own watcher)\n\t var watchedModels = [$scope.model];\n\t\n\t _angularFix2['default'].forEach($scope.fields, function (field) {\n\t initModel(field);\n\t\n\t if (field.model && watchedModels.indexOf(field.model) === -1) {\n\t $scope.$watch(function () {\n\t return field.model;\n\t }, onModelOrFormStateChange, true);\n\t watchedModels.push(field.model);\n\t }\n\t });\n\t }\n\t\n\t function initModel(field) {\n\t if (_angularFix2['default'].isString(field.model)) {\n\t var expression = field.model;\n\t var index = $scope.fields.indexOf(field);\n\t field.model = evalCloseToFormlyExpression(expression, undefined, field, index);\n\t if (!field.model) {\n\t throw formlyUsability.getFieldError('field-model-must-be-initialized', 'Field model must be initialized. When specifying a model as a string for a field, the result of the' + ' expression must have been initialized ahead of time.', field);\n\t }\n\t }\n\t }\n\t\n\t function attachKey(field, index) {\n\t if (!isFieldGroup(field)) {\n\t field.key = field.key || index || 0;\n\t }\n\t }\n\t\n\t function setupWatchers(field, index) {\n\t if (isFieldGroup(field) || !_angularFix2['default'].isDefined(field.watcher)) {\n\t return;\n\t }\n\t var watchers = field.watcher;\n\t if (!_angularFix2['default'].isArray(watchers)) {\n\t watchers = [watchers];\n\t }\n\t _angularFix2['default'].forEach(watchers, function setupWatcher(watcher) {\n\t if (!_angularFix2['default'].isDefined(watcher.listener)) {\n\t throw formlyUsability.getFieldError('all-field-watchers-must-have-a-listener', 'All field watchers must have a listener', field);\n\t }\n\t var watchExpression = getWatchExpression(watcher, field, index);\n\t var watchListener = getWatchListener(watcher, field, index);\n\t\n\t var type = watcher.type || '$watch';\n\t watcher.stopWatching = $scope[type](watchExpression, watchListener, watcher.watchDeep);\n\t });\n\t }\n\t\n\t function getWatchExpression(watcher, field, index) {\n\t var watchExpression = watcher.expression || 'model[\\'' + field.key + '\\']';\n\t if (_angularFix2['default'].isFunction(watchExpression)) {\n\t (function () {\n\t // wrap the field's watch expression so we can call it with the field as the first arg\n\t // and the stop function as the last arg as a helper\n\t var originalExpression = watchExpression;\n\t watchExpression = function formlyWatchExpression() {\n\t var args = modifyArgs.apply(undefined, [watcher, index].concat(_slice.call(arguments)));\n\t return originalExpression.apply(undefined, _toConsumableArray(args));\n\t };\n\t watchExpression.displayName = 'Formly Watch Expression for field for ' + field.key;\n\t })();\n\t }\n\t return watchExpression;\n\t }\n\t\n\t function getWatchListener(watcher, field, index) {\n\t var watchListener = watcher.listener;\n\t if (_angularFix2['default'].isFunction(watchListener)) {\n\t (function () {\n\t // wrap the field's watch listener so we can call it with the field as the first arg\n\t // and the stop function as the last arg as a helper\n\t var originalListener = watchListener;\n\t watchListener = function formlyWatchListener() {\n\t var args = modifyArgs.apply(undefined, [watcher, index].concat(_slice.call(arguments)));\n\t return originalListener.apply(undefined, _toConsumableArray(args));\n\t };\n\t watchListener.displayName = 'Formly Watch Listener for field for ' + field.key;\n\t })();\n\t }\n\t return watchListener;\n\t }\n\t\n\t function modifyArgs(watcher, index) {\n\t for (var _len = arguments.length, originalArgs = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {\n\t originalArgs[_key - 2] = arguments[_key];\n\t }\n\t\n\t return [$scope.fields[index]].concat(originalArgs, [watcher.stopWatching]);\n\t }\n\t\n\t function evalCloseToFormlyExpression(expression, val, field, index) {\n\t var extraLocals = getFormlyFieldLikeLocals(field, index);\n\t return formlyUtil.formlyEval($scope, expression, val, val, extraLocals);\n\t }\n\t\n\t function getFormlyFieldLikeLocals(field, index) {\n\t // this makes it closer to what a regular formlyExpression would be\n\t return {\n\t options: field,\n\t index: index,\n\t formState: $scope.options.formState,\n\t formId: $scope.formId\n\t };\n\t }\n\t }\n\t\n\t function formlyFormLink(scope, el, attrs) {\n\t setFormController();\n\t fixChromeAutocomplete();\n\t\n\t function setFormController() {\n\t var formId = attrs.name;\n\t scope.formId = formId;\n\t scope.theFormlyForm = scope[formId];\n\t if (attrs.form) {\n\t var getter = $parse(attrs.form);\n\t var setter = getter.assign;\n\t var parentForm = getter(scope.$parent);\n\t if (parentForm) {\n\t scope.theFormlyForm = parentForm;\n\t if (scope[formId]) {\n\t scope.theFormlyForm.$removeControl(scope[formId]);\n\t }\n\t\n\t // this next line is probably one of the more dangerous things that angular-formly does to improve the\n\t // API for angular-formly forms. It ensures that the NgModelControllers inside of formly-form will be\n\t // attached to the form that is passed to formly-form rather than the one that formly-form creates\n\t // this is necessary because it's confusing to have a step between the form you pass in\n\t // and the fields in that form. It also is because angular doesn't propagate properties like $submitted down\n\t // to children forms :-( This line was added to solve this issue:\n\t // https://github.com/formly-js/angular-formly/issues/287\n\t // luckily, this is how the formController has been accessed by the NgModelController since angular 1.0.0\n\t // so I expect it will remain this way for the life of angular 1.x\n\t el.removeData('$formController');\n\t } else {\n\t setter(scope.$parent, scope[formId]);\n\t }\n\t }\n\t if (!scope.theFormlyForm && !formlyConfig.disableWarnings) {\n\t /* eslint no-console:0 */\n\t formlyWarn('formly-form-has-no-formcontroller', 'Your formly-form does not have a `form` property. Many functions of the form (like validation) may not work', el, scope);\n\t }\n\t }\n\t\n\t /*\n\t * chrome autocomplete lameness\n\t * see https://code.google.com/p/chromium/issues/detail?id=468153#c14\n\t * ლ(ಠ益ಠლ) (╯°□°)╯︵ ┻━┻ (◞‸◟;)\n\t */\n\t function fixChromeAutocomplete() {\n\t var global = formlyConfig.extras.removeChromeAutoComplete === true;\n\t var offInstance = scope.options && scope.options.removeChromeAutoComplete === false;\n\t var onInstance = scope.options && scope.options.removeChromeAutoComplete === true;\n\t if (global && !offInstance || onInstance) {\n\t var input = document.createElement('input');\n\t input.setAttribute('autocomplete', 'address-level4');\n\t input.setAttribute('hidden', 'true');\n\t el[0].appendChild(input);\n\t }\n\t }\n\t }\n\t\n\t // stateless util functions\n\t function toKebabCase(string) {\n\t if (string) {\n\t return string.replace(/([A-Z])/g, function ($1) {\n\t return '-' + $1.toLowerCase();\n\t });\n\t } else {\n\t return '';\n\t }\n\t }\n\t\n\t function isFieldGroup(field) {\n\t return field && !!field.fieldGroup;\n\t }\n\t}\n\tformlyForm.$inject = [\"formlyUsability\", \"formlyWarn\", \"$parse\", \"formlyConfig\", \"$interpolate\"];\n\tmodule.exports = exports['default'];\n\n/***/ },\n/* 9 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, '__esModule', {\n\t value: true\n\t});\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\t\n\tvar _angularFix = __webpack_require__(1);\n\t\n\tvar _angularFix2 = _interopRequireDefault(_angularFix);\n\t\n\tvar _providersFormlyApiCheck = __webpack_require__(10);\n\t\n\tvar _providersFormlyApiCheck2 = _interopRequireDefault(_providersFormlyApiCheck);\n\t\n\tvar _otherDocsBaseUrl = __webpack_require__(2);\n\t\n\tvar _otherDocsBaseUrl2 = _interopRequireDefault(_otherDocsBaseUrl);\n\t\n\tvar _providersFormlyUsability = __webpack_require__(12);\n\t\n\tvar _providersFormlyUsability2 = _interopRequireDefault(_providersFormlyUsability);\n\t\n\tvar _providersFormlyConfig = __webpack_require__(11);\n\t\n\tvar _providersFormlyConfig2 = _interopRequireDefault(_providersFormlyConfig);\n\t\n\tvar _providersFormlyValidationMessages = __webpack_require__(13);\n\t\n\tvar _providersFormlyValidationMessages2 = _interopRequireDefault(_providersFormlyValidationMessages);\n\t\n\tvar _servicesFormlyUtil = __webpack_require__(16);\n\t\n\tvar _servicesFormlyUtil2 = _interopRequireDefault(_servicesFormlyUtil);\n\t\n\tvar _servicesFormlyWarn = __webpack_require__(17);\n\t\n\tvar _servicesFormlyWarn2 = _interopRequireDefault(_servicesFormlyWarn);\n\t\n\tvar _directivesFormlyCustomValidation = __webpack_require__(5);\n\t\n\tvar _directivesFormlyCustomValidation2 = _interopRequireDefault(_directivesFormlyCustomValidation);\n\t\n\tvar _directivesFormlyField = __webpack_require__(6);\n\t\n\tvar _directivesFormlyField2 = _interopRequireDefault(_directivesFormlyField);\n\t\n\tvar _directivesFormlyFocus = __webpack_require__(7);\n\t\n\tvar _directivesFormlyFocus2 = _interopRequireDefault(_directivesFormlyFocus);\n\t\n\tvar _directivesFormlyForm = __webpack_require__(8);\n\t\n\tvar _directivesFormlyForm2 = _interopRequireDefault(_directivesFormlyForm);\n\t\n\tvar _runFormlyNgModelAttrsManipulator = __webpack_require__(15);\n\t\n\tvar _runFormlyNgModelAttrsManipulator2 = _interopRequireDefault(_runFormlyNgModelAttrsManipulator);\n\t\n\tvar _runFormlyCustomTags = __webpack_require__(14);\n\t\n\tvar _runFormlyCustomTags2 = _interopRequireDefault(_runFormlyCustomTags);\n\t\n\tvar ngModuleName = 'formly';\n\t\n\texports['default'] = ngModuleName;\n\t\n\tvar ngModule = _angularFix2['default'].module(ngModuleName, []);\n\t\n\tngModule.constant('formlyApiCheck', _providersFormlyApiCheck2['default']);\n\tngModule.constant('formlyErrorAndWarningsUrlPrefix', _otherDocsBaseUrl2['default']);\n\tngModule.constant('formlyVersion', (\"6.23.6\")); // <-- webpack variable\n\t\n\tngModule.provider('formlyUsability', _providersFormlyUsability2['default']);\n\tngModule.provider('formlyConfig', _providersFormlyConfig2['default']);\n\t\n\tngModule.factory('formlyValidationMessages', _providersFormlyValidationMessages2['default']);\n\tngModule.factory('formlyUtil', _servicesFormlyUtil2['default']);\n\tngModule.factory('formlyWarn', _servicesFormlyWarn2['default']);\n\t\n\tngModule.directive('formlyCustomValidation', _directivesFormlyCustomValidation2['default']);\n\tngModule.directive('formlyField', _directivesFormlyField2['default']);\n\tngModule.directive('formlyFocus', _directivesFormlyFocus2['default']);\n\tngModule.directive('formlyForm', _directivesFormlyForm2['default']);\n\t\n\tngModule.run(_runFormlyNgModelAttrsManipulator2['default']);\n\tngModule.run(_runFormlyCustomTags2['default']);\n\tmodule.exports = exports['default'];\n\n/***/ },\n/* 10 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, '__esModule', {\n\t value: true\n\t});\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\t\n\tvar _angularFix = __webpack_require__(1);\n\t\n\tvar _angularFix2 = _interopRequireDefault(_angularFix);\n\t\n\tvar _apiCheck = __webpack_require__(4);\n\t\n\tvar _apiCheck2 = _interopRequireDefault(_apiCheck);\n\t\n\tvar apiCheck = (0, _apiCheck2['default'])({\n\t output: {\n\t prefix: 'angular-formly:',\n\t docsBaseUrl: __webpack_require__(2)\n\t }\n\t});\n\t\n\tfunction shapeRequiredIfNot(otherProps, propChecker) {\n\t if (!_angularFix2['default'].isArray(otherProps)) {\n\t otherProps = [otherProps];\n\t }\n\t var type = 'specified if these are not specified: `' + otherProps.join(', ') + '` (otherwise it\\'s optional)';\n\t\n\t function shapeRequiredIfNotDefinition(prop, propName, location, obj) {\n\t var propExists = obj && obj.hasOwnProperty(propName);\n\t var otherPropsExist = otherProps.some(function (otherProp) {\n\t return obj && obj.hasOwnProperty(otherProp);\n\t });\n\t if (!otherPropsExist && !propExists) {\n\t return apiCheck.utils.getError(propName, location, type);\n\t } else if (propExists) {\n\t return propChecker(prop, propName, location, obj);\n\t }\n\t }\n\t\n\t shapeRequiredIfNotDefinition.type = type;\n\t return apiCheck.utils.checkerHelpers.setupChecker(shapeRequiredIfNotDefinition);\n\t}\n\t\n\t// TODO in 7.0.0 .nullable is available on all checkers\n\tfunction nullable(checker) {\n\t return apiCheck.oneOfType([apiCheck.oneOf([null]), checker]);\n\t}\n\t\n\tvar formlyExpression = apiCheck.oneOfType([apiCheck.string, apiCheck.func]);\n\tvar specifyWrapperType = nullable(apiCheck.typeOrArrayOf(apiCheck.string));\n\t\n\tvar apiCheckProperty = apiCheck.oneOfType([apiCheck.func, apiCheck.objectOf(apiCheck.func)]);\n\t\n\tvar apiCheckInstanceProperty = apiCheck.shape.onlyIf('apiCheck', apiCheck.func.withProperties({\n\t warn: apiCheck.func,\n\t 'throw': apiCheck.func,\n\t shape: apiCheck.func\n\t}));\n\t\n\tvar apiCheckFunctionProperty = apiCheck.shape.onlyIf('apiCheck', apiCheck.oneOf(['throw', 'warn']));\n\t\n\tvar formlyWrapperType = apiCheck.shape({\n\t name: shapeRequiredIfNot('types', apiCheck.string).optional,\n\t template: apiCheck.shape.ifNot('templateUrl', apiCheck.string).optional,\n\t templateUrl: apiCheck.shape.ifNot('template', apiCheck.string).optional,\n\t types: apiCheck.typeOrArrayOf(apiCheck.string).optional,\n\t overwriteOk: apiCheck.bool.optional,\n\t validateOptions: apiCheck.func.optional,\n\t apiCheck: apiCheckProperty.optional,\n\t apiCheckInstance: apiCheckInstanceProperty.optional,\n\t apiCheckFunction: apiCheckFunctionProperty.optional,\n\t apiCheckOptions: apiCheck.object.optional\n\t}).strict;\n\t\n\tvar expressionProperties = apiCheck.objectOf(apiCheck.oneOfType([formlyExpression, apiCheck.shape({\n\t expression: formlyExpression,\n\t message: formlyExpression.optional\n\t}).strict]));\n\t\n\tvar modelChecker = apiCheck.oneOfType([apiCheck.string, apiCheck.object]);\n\t\n\tvar templateManipulators = nullable(apiCheck.shape({\n\t preWrapper: nullable(apiCheck.arrayOf(apiCheck.func)).optional,\n\t postWrapper: nullable(apiCheck.arrayOf(apiCheck.func)).optional\n\t}).strict);\n\t\n\tvar validatorChecker = apiCheck.objectOf(apiCheck.oneOfType([formlyExpression, apiCheck.shape({\n\t expression: formlyExpression,\n\t message: formlyExpression.optional\n\t}).strict]));\n\t\n\tvar fieldOptionsApiShape = {\n\t $$hashKey: apiCheck.any.optional,\n\t type: apiCheck.shape.ifNot(['template', 'templateUrl'], apiCheck.string).optional,\n\t template: apiCheck.shape.ifNot(['type', 'templateUrl'], apiCheck.oneOfType([apiCheck.string, apiCheck.func])).optional,\n\t templateUrl: apiCheck.shape.ifNot(['type', 'template'], apiCheck.oneOfType([apiCheck.string, apiCheck.func])).optional,\n\t key: apiCheck.oneOfType([apiCheck.string, apiCheck.number]).optional,\n\t model: modelChecker.optional,\n\t className: apiCheck.string.optional,\n\t id: apiCheck.string.optional,\n\t name: apiCheck.string.optional,\n\t expressionProperties: expressionProperties.optional,\n\t extras: apiCheck.shape({\n\t validateOnModelChange: apiCheck.bool.optional,\n\t skipNgModelAttrsManipulator: apiCheck.oneOfType([apiCheck.string, apiCheck.bool]).optional\n\t }).strict.optional,\n\t data: apiCheck.object.optional,\n\t templateOptions: apiCheck.object.optional,\n\t wrapper: specifyWrapperType.optional,\n\t modelOptions: apiCheck.shape({\n\t updateOn: apiCheck.string.optional,\n\t debounce: apiCheck.oneOfType([apiCheck.objectOf(apiCheck.number), apiCheck.number]).optional,\n\t allowInvalid: apiCheck.bool.optional,\n\t getterSetter: apiCheck.bool.optional,\n\t timezone: apiCheck.string.optional\n\t }).optional,\n\t watcher: apiCheck.typeOrArrayOf(apiCheck.shape({\n\t expression: formlyExpression.optional,\n\t listener: formlyExpression\n\t })).optional,\n\t validators: validatorChecker.optional,\n\t asyncValidators: validatorChecker.optional,\n\t parsers: apiCheck.arrayOf(formlyExpression).optional,\n\t formatters: apiCheck.arrayOf(formlyExpression).optional,\n\t noFormControl: apiCheck.bool.optional,\n\t hide: apiCheck.bool.optional,\n\t hideExpression: formlyExpression.optional,\n\t ngModelAttrs: apiCheck.objectOf(apiCheck.shape({\n\t expression: apiCheck.shape.ifNot(['value', 'attribute', 'bound'], apiCheck.any).optional,\n\t value: apiCheck.shape.ifNot('expression', apiCheck.any).optional,\n\t attribute: apiCheck.shape.ifNot('expression', apiCheck.any).optional,\n\t bound: apiCheck.shape.ifNot('expression', apiCheck.any).optional\n\t }).strict).optional,\n\t elementAttributes: apiCheck.objectOf(apiCheck.string).optional,\n\t optionsTypes: apiCheck.typeOrArrayOf(apiCheck.string).optional,\n\t link: apiCheck.func.optional,\n\t controller: apiCheck.oneOfType([apiCheck.string, apiCheck.func, apiCheck.array]).optional,\n\t validation: apiCheck.shape({\n\t show: nullable(apiCheck.bool).optional,\n\t messages: apiCheck.objectOf(formlyExpression).optional,\n\t errorExistsAndShouldBeVisible: apiCheck.bool.optional\n\t }).optional,\n\t formControl: apiCheck.typeOrArrayOf(apiCheck.object).optional,\n\t value: apiCheck.func.optional,\n\t runExpressions: apiCheck.func.optional,\n\t templateManipulators: templateManipulators.optional,\n\t resetModel: apiCheck.func.optional,\n\t updateInitialValue: apiCheck.func.optional,\n\t initialValue: apiCheck.any.optional,\n\t defaultValue: apiCheck.any.optional\n\t};\n\t\n\tvar formlyFieldOptions = apiCheck.shape(fieldOptionsApiShape).strict;\n\t\n\tvar formOptionsApi = apiCheck.shape({\n\t formState: apiCheck.object.optional,\n\t resetModel: apiCheck.func.optional,\n\t updateInitialValue: apiCheck.func.optional,\n\t removeChromeAutoComplete: apiCheck.bool.optional,\n\t templateManipulators: templateManipulators.optional,\n\t wrapper: specifyWrapperType.optional,\n\t fieldTransform: apiCheck.func.optional,\n\t data: apiCheck.object.optional\n\t}).strict;\n\t\n\tvar fieldGroup = apiCheck.shape({\n\t $$hashKey: apiCheck.any.optional,\n\t key: apiCheck.oneOfType([apiCheck.string, apiCheck.number]).optional,\n\t // danger. Nested field groups wont get api-checked...\n\t fieldGroup: apiCheck.arrayOf(apiCheck.oneOfType([formlyFieldOptions, apiCheck.object])),\n\t className: apiCheck.string.optional,\n\t options: formOptionsApi.optional,\n\t hide: apiCheck.bool.optional,\n\t hideExpression: formlyExpression.optional,\n\t data: apiCheck.object.optional,\n\t model: modelChecker.optional,\n\t form: apiCheck.object.optional,\n\t elementAttributes: apiCheck.objectOf(apiCheck.string).optional\n\t}).strict;\n\t\n\tvar typeOptionsDefaultOptions = _angularFix2['default'].copy(fieldOptionsApiShape);\n\ttypeOptionsDefaultOptions.key = apiCheck.string.optional;\n\t\n\tvar formlyTypeOptions = apiCheck.shape({\n\t name: apiCheck.string,\n\t template: apiCheck.shape.ifNot('templateUrl', apiCheck.oneOfType([apiCheck.string, apiCheck.func])).optional,\n\t templateUrl: apiCheck.shape.ifNot('template', apiCheck.oneOfType([apiCheck.string, apiCheck.func])).optional,\n\t controller: apiCheck.oneOfType([apiCheck.func, apiCheck.string, apiCheck.array]).optional,\n\t link: apiCheck.func.optional,\n\t defaultOptions: apiCheck.oneOfType([apiCheck.func, apiCheck.shape(typeOptionsDefaultOptions)]).optional,\n\t 'extends': apiCheck.string.optional,\n\t wrapper: specifyWrapperType.optional,\n\t data: apiCheck.object.optional,\n\t validateOptions: apiCheck.func.optional,\n\t apiCheck: apiCheckProperty.optional,\n\t apiCheckInstance: apiCheckInstanceProperty.optional,\n\t apiCheckFunction: apiCheckFunctionProperty.optional,\n\t apiCheckOptions: apiCheck.object.optional,\n\t overwriteOk: apiCheck.bool.optional\n\t}).strict;\n\t\n\t_angularFix2['default'].extend(apiCheck, {\n\t formlyTypeOptions: formlyTypeOptions, formlyFieldOptions: formlyFieldOptions, formlyExpression: formlyExpression, formlyWrapperType: formlyWrapperType, fieldGroup: fieldGroup, formOptionsApi: formOptionsApi\n\t});\n\t\n\texports['default'] = apiCheck;\n\tmodule.exports = exports['default'];\n\n/***/ },\n/* 11 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, '__esModule', {\n\t value: true\n\t});\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\t\n\tfunction _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i]; return arr2; } else { return Array.from(arr); } }\n\t\n\tvar _angularFix = __webpack_require__(1);\n\t\n\tvar _angularFix2 = _interopRequireDefault(_angularFix);\n\t\n\tvar _otherUtils = __webpack_require__(3);\n\t\n\tvar _otherUtils2 = _interopRequireDefault(_otherUtils);\n\t\n\texports['default'] = formlyConfig;\n\t\n\t// @ngInject\n\tfunction formlyConfig(formlyUsabilityProvider, formlyErrorAndWarningsUrlPrefix, formlyApiCheck) {\n\t var _this2 = this;\n\t\n\t var typeMap = {};\n\t var templateWrappersMap = {};\n\t var defaultWrapperName = 'default';\n\t var _this = this;\n\t var getError = formlyUsabilityProvider.getFormlyError;\n\t\n\t _angularFix2['default'].extend(this, {\n\t setType: setType,\n\t getType: getType,\n\t getTypeHeritage: getTypeHeritage,\n\t setWrapper: setWrapper,\n\t getWrapper: getWrapper,\n\t getWrapperByType: getWrapperByType,\n\t removeWrapperByName: removeWrapperByName,\n\t removeWrappersForType: removeWrappersForType,\n\t disableWarnings: false,\n\t extras: {\n\t disableNgModelAttrsManipulator: false,\n\t ngModelAttrsManipulatorPreferUnbound: false,\n\t removeChromeAutoComplete: false,\n\t defaultHideDirective: 'ng-if',\n\t getFieldId: null,\n\t explicitAsync: false\n\t },\n\t templateManipulators: {\n\t preWrapper: [],\n\t postWrapper: []\n\t },\n\t $get: function $get() {\n\t return _this2;\n\t }\n\t });\n\t\n\t function setType(options) {\n\t if (_angularFix2['default'].isArray(options)) {\n\t var _ret = (function () {\n\t var allTypes = [];\n\t _angularFix2['default'].forEach(options, function (item) {\n\t allTypes.push(setType(item));\n\t });\n\t return {\n\t v: allTypes\n\t };\n\t })();\n\t\n\t if (typeof _ret === 'object') return _ret.v;\n\t } else if (_angularFix2['default'].isObject(options)) {\n\t checkType(options);\n\t if (options['extends']) {\n\t extendTypeOptions(options);\n\t }\n\t typeMap[options.name] = options;\n\t return typeMap[options.name];\n\t } else {\n\t throw getError('You must provide an object or array for setType. You provided: ' + JSON.stringify(arguments));\n\t }\n\t }\n\t\n\t function checkType(options) {\n\t formlyApiCheck['throw'](formlyApiCheck.formlyTypeOptions, options, {\n\t prefix: 'formlyConfig.setType',\n\t url: 'settype-validation-failed'\n\t });\n\t checkApiCheck(options);\n\t if (!options.overwriteOk) {\n\t checkOverwrite(options.name, typeMap, options, 'types');\n\t } else {\n\t options.overwriteOk = undefined;\n\t }\n\t }\n\t\n\t function extendTypeOptions(options) {\n\t var extendsType = getType(options['extends'], true, options);\n\t extendTypeControllerFunction(options, extendsType);\n\t extendTypeLinkFunction(options, extendsType);\n\t extendTypeValidateOptionsFunction(options, extendsType);\n\t extendTypeDefaultOptions(options, extendsType);\n\t _otherUtils2['default'].reverseDeepMerge(options, extendsType);\n\t extendTemplate(options, extendsType);\n\t }\n\t\n\t function extendTemplate(options, extendsType) {\n\t if (options.template && extendsType.templateUrl) {\n\t delete options.templateUrl;\n\t } else if (options.templateUrl && extendsType.template) {\n\t delete options.template;\n\t }\n\t }\n\t\n\t function extendTypeControllerFunction(options, extendsType) {\n\t var extendsCtrl = extendsType.controller;\n\t if (!_angularFix2['default'].isDefined(extendsCtrl)) {\n\t return;\n\t }\n\t var optionsCtrl = options.controller;\n\t if (_angularFix2['default'].isDefined(optionsCtrl)) {\n\t options.controller = function ($scope, $controller) {\n\t $controller(extendsCtrl, { $scope: $scope });\n\t $controller(optionsCtrl, { $scope: $scope });\n\t };\n\t options.controller.$inject = ['$scope', '$controller'];\n\t } else {\n\t options.controller = extendsCtrl;\n\t }\n\t }\n\t\n\t function extendTypeLinkFunction(options, extendsType) {\n\t var extendsFn = extendsType.link;\n\t if (!_angularFix2['default'].isDefined(extendsFn)) {\n\t return;\n\t }\n\t var optionsFn = options.link;\n\t if (_angularFix2['default'].isDefined(optionsFn)) {\n\t options.link = function () {\n\t extendsFn.apply(undefined, arguments);\n\t optionsFn.apply(undefined, arguments);\n\t };\n\t } else {\n\t options.link = extendsFn;\n\t }\n\t }\n\t\n\t function extendTypeValidateOptionsFunction(options, extendsType) {\n\t var extendsFn = extendsType.validateOptions;\n\t if (!_angularFix2['default'].isDefined(extendsFn)) {\n\t return;\n\t }\n\t var optionsFn = options.validateOptions;\n\t var originalDefaultOptions = options.defaultOptions;\n\t if (_angularFix2['default'].isDefined(optionsFn)) {\n\t options.validateOptions = function (opts) {\n\t optionsFn(opts);\n\t var mergedOptions = _angularFix2['default'].copy(opts);\n\t var defaultOptions = originalDefaultOptions;\n\t if (defaultOptions) {\n\t if (_angularFix2['default'].isFunction(defaultOptions)) {\n\t defaultOptions = defaultOptions(mergedOptions);\n\t }\n\t _otherUtils2['default'].reverseDeepMerge(mergedOptions, defaultOptions);\n\t }\n\t extendsFn(mergedOptions);\n\t };\n\t } else {\n\t options.validateOptions = extendsFn;\n\t }\n\t }\n\t\n\t function extendTypeDefaultOptions(options, extendsType) {\n\t var extendsDO = extendsType.defaultOptions;\n\t if (!_angularFix2['default'].isDefined(extendsDO)) {\n\t return;\n\t }\n\t var optionsDO = options.defaultOptions;\n\t var optionsDOIsFn = _angularFix2['default'].isFunction(optionsDO);\n\t var extendsDOIsFn = _angularFix2['default'].isFunction(extendsDO);\n\t if (extendsDOIsFn) {\n\t options.defaultOptions = function defaultOptions(opts) {\n\t var extendsDefaultOptions = extendsDO(opts);\n\t var mergedDefaultOptions = {};\n\t _otherUtils2['default'].reverseDeepMerge(mergedDefaultOptions, opts, extendsDefaultOptions);\n\t var extenderOptionsDefaultOptions = optionsDO;\n\t if (optionsDOIsFn) {\n\t extenderOptionsDefaultOptions = extenderOptionsDefaultOptions(mergedDefaultOptions);\n\t }\n\t _otherUtils2['default'].reverseDeepMerge(extendsDefaultOptions, extenderOptionsDefaultOptions);\n\t return extendsDefaultOptions;\n\t };\n\t } else if (optionsDOIsFn) {\n\t options.defaultOptions = function defaultOptions(opts) {\n\t var newDefaultOptions = {};\n\t _otherUtils2['default'].reverseDeepMerge(newDefaultOptions, opts, extendsDO);\n\t return optionsDO(newDefaultOptions);\n\t };\n\t }\n\t }\n\t\n\t function getType(name, throwError, errorContext) {\n\t if (!name) {\n\t return undefined;\n\t }\n\t var type = typeMap[name];\n\t if (!type && throwError === true) {\n\t throw getError('There is no type by the name of \"' + name + '\": ' + JSON.stringify(errorContext));\n\t } else {\n\t return type;\n\t }\n\t }\n\t\n\t function getTypeHeritage(parent) {\n\t var heritage = [];\n\t var type = parent;\n\t if (_angularFix2['default'].isString(type)) {\n\t type = getType(parent);\n\t }\n\t parent = type['extends'];\n\t while (parent) {\n\t type = getType(parent);\n\t heritage.push(type);\n\t parent = type['extends'];\n\t }\n\t return heritage;\n\t }\n\t\n\t function setWrapper(_x, _x2) {\n\t var _again = true;\n\t\n\t _function: while (_again) {\n\t var options = _x,\n\t name = _x2;\n\t _again = false;\n\t\n\t if (_angularFix2['default'].isArray(options)) {\n\t return options.map(function (wrapperOptions) {\n\t return setWrapper(wrapperOptions);\n\t });\n\t } else if (_angularFix2['default'].isObject(options)) {\n\t options.types = getOptionsTypes(options);\n\t options.name = getOptionsName(options, name);\n\t checkWrapperAPI(options);\n\t templateWrappersMap[options.name] = options;\n\t return options;\n\t } else if (_angularFix2['default'].isString(options)) {\n\t _x = {\n\t template: options,\n\t name: name\n\t };\n\t _x2 = undefined;\n\t _again = true;\n\t continue _function;\n\t }\n\t }\n\t }\n\t\n\t function getOptionsTypes(options) {\n\t if (_angularFix2['default'].isString(options.types)) {\n\t return [options.types];\n\t }\n\t if (!_angularFix2['default'].isDefined(options.types)) {\n\t return [];\n\t } else {\n\t return options.types;\n\t }\n\t }\n\t\n\t function getOptionsName(options, name) {\n\t return options.name || name || options.types.join(' ') || defaultWrapperName;\n\t }\n\t\n\t function checkWrapperAPI(options) {\n\t formlyUsabilityProvider.checkWrapper(options);\n\t if (options.template) {\n\t formlyUsabilityProvider.checkWrapperTemplate(options.template, options);\n\t }\n\t checkApiCheck(options);\n\t if (!options.overwriteOk) {\n\t checkOverwrite(options.name, templateWrappersMap, options, 'templateWrappers');\n\t } else {\n\t delete options.overwriteOk;\n\t }\n\t checkWrapperTypes(options);\n\t }\n\t\n\t function checkWrapperTypes(options) {\n\t var shouldThrow = !_angularFix2['default'].isArray(options.types) || !options.types.every(_angularFix2['default'].isString);\n\t if (shouldThrow) {\n\t throw getError('Attempted to create a template wrapper with types that is not a string or an array of strings');\n\t }\n\t }\n\t\n\t function checkOverwrite(property, object, newValue, objectName) {\n\t if (object.hasOwnProperty(property)) {\n\t warn('overwriting-types-or-wrappers', ['Attempting to overwrite ' + property + ' on ' + objectName + ' which is currently', JSON.stringify(object[property]) + ' with ' + JSON.stringify(newValue), 'To supress this warning, specify the property \"overwriteOk: true\"'].join(' '));\n\t }\n\t }\n\t\n\t function checkApiCheck(options) {\n\t if (options.apiCheck && !_angularFix2['default'].isFunction(options.apiCheck)) {\n\t warn('apicheck-as-an-object-deprecated', 'apiCheck as an object has been deprecated', 'Attempted for type: ' + options.name, options);\n\t }\n\t }\n\t\n\t function getWrapper(name) {\n\t return templateWrappersMap[name || defaultWrapperName];\n\t }\n\t\n\t function getWrapperByType(type) {\n\t /* eslint prefer-const:0 */\n\t var wrappers = [];\n\t for (var _name in templateWrappersMap) {\n\t if (templateWrappersMap.hasOwnProperty(_name)) {\n\t if (templateWrappersMap[_name].types && templateWrappersMap[_name].types.indexOf(type) !== -1) {\n\t wrappers.push(templateWrappersMap[_name]);\n\t }\n\t }\n\t }\n\t return wrappers;\n\t }\n\t\n\t function removeWrapperByName(name) {\n\t var wrapper = templateWrappersMap[name];\n\t delete templateWrappersMap[name];\n\t return wrapper;\n\t }\n\t\n\t function removeWrappersForType(type) {\n\t var wrappers = getWrapperByType(type);\n\t if (!wrappers) {\n\t return undefined;\n\t }\n\t if (!_angularFix2['default'].isArray(wrappers)) {\n\t return removeWrapperByName(wrappers.name);\n\t } else {\n\t wrappers.forEach(function (wrapper) {\n\t return removeWrapperByName(wrapper.name);\n\t });\n\t return wrappers;\n\t }\n\t }\n\t\n\t function warn() {\n\t if (!_this.disableWarnings && console.warn) {\n\t /* eslint no-console:0 */\n\t var args = Array.prototype.slice.call(arguments);\n\t var warnInfoSlug = args.shift();\n\t args.unshift('Formly Warning:');\n\t args.push('' + formlyErrorAndWarningsUrlPrefix + warnInfoSlug);\n\t console.warn.apply(console, _toConsumableArray(args));\n\t }\n\t }\n\t}\n\tformlyConfig.$inject = [\"formlyUsabilityProvider\", \"formlyErrorAndWarningsUrlPrefix\", \"formlyApiCheck\"];\n\tmodule.exports = exports['default'];\n\n/***/ },\n/* 12 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, '__esModule', {\n\t value: true\n\t});\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\t\n\tvar _angularFix = __webpack_require__(1);\n\t\n\tvar _angularFix2 = _interopRequireDefault(_angularFix);\n\t\n\texports['default'] = formlyUsability;\n\t\n\t// @ngInject\n\tfunction formlyUsability(formlyApiCheck, formlyErrorAndWarningsUrlPrefix) {\n\t var _this = this;\n\t\n\t _angularFix2['default'].extend(this, {\n\t getFormlyError: getFormlyError,\n\t getFieldError: getFieldError,\n\t checkWrapper: checkWrapper,\n\t checkWrapperTemplate: checkWrapperTemplate,\n\t getErrorMessage: getErrorMessage,\n\t $get: function $get() {\n\t return _this;\n\t }\n\t });\n\t\n\t function getFieldError(errorInfoSlug, message, field) {\n\t if (arguments.length < 3) {\n\t field = message;\n\t message = errorInfoSlug;\n\t errorInfoSlug = null;\n\t }\n\t return new Error(getErrorMessage(errorInfoSlug, message) + (' Field definition: ' + _angularFix2['default'].toJson(field)));\n\t }\n\t\n\t function getFormlyError(errorInfoSlug, message) {\n\t if (!message) {\n\t message = errorInfoSlug;\n\t errorInfoSlug = null;\n\t }\n\t return new Error(getErrorMessage(errorInfoSlug, message));\n\t }\n\t\n\t function getErrorMessage(errorInfoSlug, message) {\n\t var url = '';\n\t if (errorInfoSlug !== null) {\n\t url = '' + formlyErrorAndWarningsUrlPrefix + errorInfoSlug;\n\t }\n\t return 'Formly Error: ' + message + '. ' + url;\n\t }\n\t\n\t function checkWrapper(wrapper) {\n\t formlyApiCheck['throw'](formlyApiCheck.formlyWrapperType, wrapper, {\n\t prefix: 'formlyConfig.setWrapper',\n\t urlSuffix: 'setwrapper-validation-failed'\n\t });\n\t }\n\t\n\t function checkWrapperTemplate(template, additionalInfo) {\n\t var formlyTransclude = '';\n\t if (template.indexOf(formlyTransclude) === -1) {\n\t throw getFormlyError('Template wrapper templates must use \"' + formlyTransclude + '\" somewhere in them. ' + ('This one does not have \"\" in it: ' + template) + '\\n' + ('Additional information: ' + JSON.stringify(additionalInfo)));\n\t }\n\t }\n\t}\n\tformlyUsability.$inject = [\"formlyApiCheck\", \"formlyErrorAndWarningsUrlPrefix\"];\n\tmodule.exports = exports['default'];\n\n/***/ },\n/* 13 */\n/***/ function(module, exports) {\n\n\t\"use strict\";\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\texports[\"default\"] = formlyValidationMessages;\n\t\n\t// @ngInject\n\tfunction formlyValidationMessages() {\n\t\n\t var validationMessages = {\n\t addTemplateOptionValueMessage: addTemplateOptionValueMessage,\n\t addStringMessage: addStringMessage,\n\t messages: {}\n\t };\n\t\n\t return validationMessages;\n\t\n\t function addTemplateOptionValueMessage(name, prop, prefix, suffix, alternate) {\n\t validationMessages.messages[name] = templateOptionValue(prop, prefix, suffix, alternate);\n\t }\n\t\n\t function addStringMessage(name, string) {\n\t validationMessages.messages[name] = function () {\n\t return string;\n\t };\n\t }\n\t\n\t function templateOptionValue(prop, prefix, suffix, alternate) {\n\t return function getValidationMessage(viewValue, modelValue, scope) {\n\t if (scope.options.templateOptions[prop]) {\n\t return prefix + \" \" + scope.options.templateOptions[prop] + \" \" + suffix;\n\t } else {\n\t return alternate;\n\t }\n\t };\n\t }\n\t}\n\tmodule.exports = exports[\"default\"];\n\n/***/ },\n/* 14 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, '__esModule', {\n\t value: true\n\t});\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\t\n\tvar _angularFix = __webpack_require__(1);\n\t\n\tvar _angularFix2 = _interopRequireDefault(_angularFix);\n\t\n\texports['default'] = addCustomTags;\n\t\n\t// @ngInject\n\tfunction addCustomTags($document) {\n\t if ($document && $document.get) {\n\t (function () {\n\t // IE8 check ->\n\t // http://stackoverflow.com/questions/10964966/detect-ie-version-prior-to-v9-in-javascript/10965203#10965203\n\t var document = $document.get(0);\n\t var div = document.createElement('div');\n\t div.innerHTML = '';\n\t var isIeLessThan9 = div.getElementsByTagName('i').length === 1;\n\t\n\t if (isIeLessThan9) {\n\t // add the custom elements that we need for formly\n\t var customElements = ['formly-field', 'formly-form', 'formly-custom-validation', 'formly-focus', 'formly-transpose'];\n\t _angularFix2['default'].forEach(customElements, function (el) {\n\t document.createElement(el);\n\t });\n\t }\n\t })();\n\t }\n\t}\n\taddCustomTags.$inject = [\"$document\"];\n\tmodule.exports = exports['default'];\n\n/***/ },\n/* 15 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, '__esModule', {\n\t value: true\n\t});\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\t\n\tvar _angularFix = __webpack_require__(1);\n\t\n\tvar _angularFix2 = _interopRequireDefault(_angularFix);\n\t\n\texports['default'] = addFormlyNgModelAttrsManipulator;\n\t\n\t// @ngInject\n\tfunction addFormlyNgModelAttrsManipulator(formlyConfig, $interpolate, formlyWarn) {\n\t if (formlyConfig.extras.disableNgModelAttrsManipulator) {\n\t return;\n\t }\n\t formlyConfig.templateManipulators.preWrapper.push(ngModelAttrsManipulator);\n\t\n\t function ngModelAttrsManipulator(template, options, scope) {\n\t var node = document.createElement('div');\n\t var skip = getSkip(options);\n\t if (skip === true) {\n\t return template;\n\t }\n\t node.innerHTML = template;\n\t\n\t var modelNodes = getNgModelNodes(node, skip);\n\t if (!modelNodes || !modelNodes.length) {\n\t return template;\n\t }\n\t\n\t addIfNotPresent(modelNodes, 'id', scope.id);\n\t addIfNotPresent(modelNodes, 'name', scope.name || scope.id);\n\t\n\t addValidation();\n\t addModelOptions();\n\t addTemplateOptionsAttrs();\n\t\n\t return node.innerHTML;\n\t\n\t function addValidation() {\n\t if (_angularFix2['default'].isDefined(options.validators) || _angularFix2['default'].isDefined(options.validation.messages)) {\n\t addIfNotPresent(modelNodes, 'formly-custom-validation', '');\n\t }\n\t }\n\t\n\t function addModelOptions() {\n\t if (_angularFix2['default'].isDefined(options.modelOptions)) {\n\t addIfNotPresent(modelNodes, 'ng-model-options', 'options.modelOptions');\n\t if (options.modelOptions.getterSetter) {\n\t _angularFix2['default'].forEach(modelNodes, function (modelNode) {\n\t modelNode.setAttribute('ng-model', 'options.value');\n\t });\n\t }\n\t }\n\t }\n\t\n\t function addTemplateOptionsAttrs() {\n\t if (!options.templateOptions && !options.expressionProperties) {\n\t // no need to run these if there are no templateOptions or expressionProperties\n\t return;\n\t }\n\t var to = options.templateOptions || {};\n\t var ep = options.expressionProperties || {};\n\t\n\t var ngModelAttributes = getBuiltInAttributes();\n\t\n\t // extend with the user's specifications winning\n\t _angularFix2['default'].extend(ngModelAttributes, options.ngModelAttrs);\n\t\n\t // Feel free to make this more simple :-)\n\t _angularFix2['default'].forEach(ngModelAttributes, function (val, name) {\n\t /* eslint complexity:[2, 14] */\n\t var attrVal = undefined,\n\t attrName = undefined;\n\t var ref = 'options.templateOptions[\\'' + name + '\\']';\n\t var toVal = to[name];\n\t var epVal = getEpValue(ep, name);\n\t\n\t var inTo = _angularFix2['default'].isDefined(toVal);\n\t var inEp = _angularFix2['default'].isDefined(epVal);\n\t if (val.value) {\n\t // I realize this looks backwards, but it's right, trust me...\n\t attrName = val.value;\n\t attrVal = name;\n\t } else if (val.expression && inTo) {\n\t attrName = val.expression;\n\t if (_angularFix2['default'].isString(to[name])) {\n\t attrVal = '$eval(' + ref + ')';\n\t } else if (_angularFix2['default'].isFunction(to[name])) {\n\t attrVal = ref + '(model[options.key], options, this, $event)';\n\t } else {\n\t throw new Error('options.templateOptions.' + name + ' must be a string or function: ' + JSON.stringify(options));\n\t }\n\t } else if (val.bound && inEp) {\n\t attrName = val.bound;\n\t attrVal = ref;\n\t } else if ((val.attribute || val.boolean) && inEp) {\n\t attrName = val.attribute || val.boolean;\n\t attrVal = '' + $interpolate.startSymbol() + ref + $interpolate.endSymbol();\n\t } else if (val.attribute && inTo) {\n\t attrName = val.attribute;\n\t attrVal = toVal;\n\t } else if (val.boolean) {\n\t if (inTo && !inEp && toVal) {\n\t attrName = val.boolean;\n\t attrVal = true;\n\t } else {\n\t /* eslint no-empty:0 */\n\t // empty to illustrate that a boolean will not be added via val.bound\n\t // if you want it added via val.bound, then put it in expressionProperties\n\t }\n\t } else if (val.bound && inTo) {\n\t attrName = val.bound;\n\t attrVal = ref;\n\t }\n\t\n\t if (_angularFix2['default'].isDefined(attrName) && _angularFix2['default'].isDefined(attrVal)) {\n\t addIfNotPresent(modelNodes, attrName, attrVal);\n\t }\n\t });\n\t }\n\t }\n\t\n\t // Utility functions\n\t function getNgModelNodes(node, skip) {\n\t var selectorNot = _angularFix2['default'].isString(skip) ? ':not(' + skip + ')' : '';\n\t var skipNot = ':not([formly-skip-ng-model-attrs-manipulator])';\n\t var query = '[ng-model]' + selectorNot + skipNot + ', [data-ng-model]' + selectorNot + skipNot;\n\t try {\n\t return node.querySelectorAll(query);\n\t } catch (e) {\n\t //this code is needed for IE8, as it does not support the CSS3 ':not' selector\n\t //it should be removed when IE8 support is dropped\n\t return getNgModelNodesFallback(node, skip);\n\t }\n\t }\n\t\n\t function getNgModelNodesFallback(node, skip) {\n\t var allNgModelNodes = node.querySelectorAll('[ng-model], [data-ng-model]');\n\t var matchingNgModelNodes = [];\n\t\n\t //make sure this array is compatible with NodeList type by adding an 'item' function\n\t matchingNgModelNodes.item = function (i) {\n\t return this[i];\n\t };\n\t\n\t for (var i = 0; i < allNgModelNodes.length; i++) {\n\t var ngModelNode = allNgModelNodes[i];\n\t if (!ngModelNode.hasAttribute('formly-skip-ng-model-attrs-manipulator') && !(_angularFix2['default'].isString(skip) && nodeMatches(ngModelNode, skip))) {\n\t matchingNgModelNodes.push(ngModelNode);\n\t }\n\t }\n\t\n\t return matchingNgModelNodes;\n\t }\n\t\n\t function nodeMatches(node, selector) {\n\t var div = document.createElement('div');\n\t div.innerHTML = node.outerHTML;\n\t return div.querySelector(selector);\n\t }\n\t\n\t function getSkip(options) {\n\t // UPDATE IN 7.0.0\n\t var skip = options.extras && options.extras.skipNgModelAttrsManipulator;\n\t if (!_angularFix2['default'].isDefined(skip)) {\n\t skip = options.data && options.data.skipNgModelAttrsManipulator;\n\t if (_angularFix2['default'].isDefined(skip)) {\n\t formlyWarn('skipngmodelattrsmanipulator-moved', 'The skipNgModelAttrsManipulator property has been moved from the `data` property to the `extras` property', options);\n\t }\n\t }\n\t return skip;\n\t }\n\t\n\t function getBuiltInAttributes() {\n\t var ngModelAttributes = {\n\t focus: {\n\t attribute: 'formly-focus'\n\t }\n\t };\n\t var boundOnly = [];\n\t var bothBooleanAndBound = ['required', 'disabled'];\n\t var bothAttributeAndBound = ['pattern', 'minlength'];\n\t var expressionOnly = ['change', 'keydown', 'keyup', 'keypress', 'click', 'focus', 'blur'];\n\t var attributeOnly = ['placeholder', 'min', 'max', 'tabindex', 'type'];\n\t if (formlyConfig.extras.ngModelAttrsManipulatorPreferUnbound) {\n\t bothAttributeAndBound.push('maxlength');\n\t } else {\n\t boundOnly.push('maxlength');\n\t }\n\t\n\t _angularFix2['default'].forEach(boundOnly, function (item) {\n\t ngModelAttributes[item] = { bound: 'ng-' + item };\n\t });\n\t\n\t _angularFix2['default'].forEach(bothBooleanAndBound, function (item) {\n\t ngModelAttributes[item] = { boolean: item, bound: 'ng-' + item };\n\t });\n\t\n\t _angularFix2['default'].forEach(bothAttributeAndBound, function (item) {\n\t ngModelAttributes[item] = { attribute: item, bound: 'ng-' + item };\n\t });\n\t\n\t _angularFix2['default'].forEach(expressionOnly, function (item) {\n\t var propName = 'on' + item.substr(0, 1).toUpperCase() + item.substr(1);\n\t ngModelAttributes[propName] = { expression: 'ng-' + item };\n\t });\n\t\n\t _angularFix2['default'].forEach(attributeOnly, function (item) {\n\t ngModelAttributes[item] = { attribute: item };\n\t });\n\t return ngModelAttributes;\n\t }\n\t\n\t function getEpValue(ep, name) {\n\t return ep['templateOptions.' + name] || ep['templateOptions[\\'' + name + '\\']'] || ep['templateOptions[\"' + name + '\"]'];\n\t }\n\t\n\t function addIfNotPresent(nodes, attr, val) {\n\t _angularFix2['default'].forEach(nodes, function (node) {\n\t if (!node.getAttribute(attr)) {\n\t node.setAttribute(attr, val);\n\t }\n\t });\n\t }\n\t}\n\taddFormlyNgModelAttrsManipulator.$inject = [\"formlyConfig\", \"$interpolate\", \"formlyWarn\"];\n\tmodule.exports = exports['default'];\n\n/***/ },\n/* 16 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, '__esModule', {\n\t value: true\n\t});\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\t\n\tvar _otherUtils = __webpack_require__(3);\n\t\n\tvar _otherUtils2 = _interopRequireDefault(_otherUtils);\n\t\n\texports['default'] = formlyUtil;\n\t\n\t// @ngInject\n\tfunction formlyUtil() {\n\t return _otherUtils2['default'];\n\t}\n\tmodule.exports = exports['default'];\n\n/***/ },\n/* 17 */\n/***/ function(module, exports) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, '__esModule', {\n\t value: true\n\t});\n\t\n\tfunction _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i]; return arr2; } else { return Array.from(arr); } }\n\t\n\texports['default'] = formlyWarn;\n\t\n\t// @ngInject\n\tfunction formlyWarn(formlyConfig, formlyErrorAndWarningsUrlPrefix, $log) {\n\t return function warn() {\n\t if (!formlyConfig.disableWarnings) {\n\t var args = Array.prototype.slice.call(arguments);\n\t var warnInfoSlug = args.shift();\n\t args.unshift('Formly Warning:');\n\t args.push('' + formlyErrorAndWarningsUrlPrefix + warnInfoSlug);\n\t $log.warn.apply($log, _toConsumableArray(args));\n\t }\n\t };\n\t}\n\tformlyWarn.$inject = [\"formlyConfig\", \"formlyErrorAndWarningsUrlPrefix\", \"$log\"];\n\tmodule.exports = exports['default'];\n\n/***/ },\n/* 18 */\n/***/ function(module, exports) {\n\n\tmodule.exports = __WEBPACK_EXTERNAL_MODULE_18__;\n\n/***/ }\n/******/ ])\n});\n;\n\n\n/** WEBPACK FOOTER **\n ** dist/formly.min.js\n **/"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n/** WEBPACK FOOTER **\n ** webpack/bootstrap 96d235d5d0c240ffbf96\n **/","import index from './index.common';\nexport default index;\n\n\n\n/** WEBPACK FOOTER **\n ** ../~/eslint-loader!./index.js\n **/","// some versions of angular don't export the angular module properly,\n// so we get it from window in this case.\nlet angular = require('angular');\n\n/* istanbul ignore next */\nif (!angular.version) {\n angular = window.angular;\n}\nexport default angular;\n\n\n\n/** WEBPACK FOOTER **\n ** ../~/eslint-loader!./angular-fix/index.js\n **/","import angular from 'angular-fix';\n\nexport default {formlyEval, getFieldId, reverseDeepMerge, findByNodeName, arrayify, extendFunction, extendArray};\n\nfunction formlyEval(scope, expression, $modelValue, $viewValue, extraLocals) {\n if (angular.isFunction(expression)) {\n return expression($viewValue, $modelValue, scope, extraLocals);\n } else {\n return scope.$eval(expression, angular.extend({$viewValue, $modelValue}, extraLocals));\n }\n}\n\nfunction getFieldId(formId, options, index) {\n if (options.id) {\n return options.id;\n }\n let type = options.type;\n if (!type && options.template) {\n type = 'template';\n } else if (!type && options.templateUrl) {\n type = 'templateUrl';\n }\n\n return [formId, type, options.key, index].join('_');\n}\n\n\nfunction reverseDeepMerge(dest) {\n angular.forEach(arguments, (src, index) => {\n if (!index) {\n return;\n }\n angular.forEach(src, (val, prop) => {\n if (!angular.isDefined(dest[prop])) {\n dest[prop] = angular.copy(val);\n } else if (objAndSameType(dest[prop], val)) {\n reverseDeepMerge(dest[prop], val);\n }\n });\n });\n return dest;\n}\n\nfunction objAndSameType(obj1, obj2) {\n return angular.isObject(obj1) && angular.isObject(obj2) &&\n Object.getPrototypeOf(obj1) === Object.getPrototypeOf(obj2);\n}\n\n// recurse down a node tree to find a node with matching nodeName, for custom tags jQuery.find doesn't work in IE8\nfunction findByNodeName(el, nodeName) {\n if (!el.prop) { // not a jQuery or jqLite object -> wrap it\n el = angular.element(el);\n }\n\n if (el.prop('nodeName') === nodeName.toUpperCase()) {\n return el;\n }\n\n const c = el.children();\n for (let i = 0; c && i < c.length; i++) {\n const node = findByNodeName(c[i], nodeName);\n if (node) {\n return node;\n }\n }\n}\n\n\nfunction arrayify(obj) {\n if (obj && !angular.isArray(obj)) {\n obj = [obj];\n } else if (!obj) {\n obj = [];\n }\n return obj;\n}\n\n\nfunction extendFunction(...fns) {\n return function extendedFunction() {\n const args = arguments;\n fns.forEach(fn => fn.apply(null, args));\n };\n}\n\nfunction extendArray(primary, secondary, property) {\n if (property) {\n primary = primary[property];\n secondary = secondary[property];\n }\n if (secondary && primary) {\n angular.forEach(secondary, function(item) {\n if (primary.indexOf(item) === -1) {\n primary.push(item);\n }\n });\n return primary;\n } else if (secondary) {\n return secondary;\n } else {\n return primary;\n }\n}\n\n\n\n\n/** WEBPACK FOOTER **\n ** ../~/eslint-loader!./other/utils.js\n **/","module.exports = __WEBPACK_EXTERNAL_MODULE_4__;\n\n\n/*****************\n ** WEBPACK FOOTER\n ** external {\"root\":\"apiCheck\",\"amd\":\"api-check\",\"commonjs2\":\"api-check\",\"commonjs\":\"api-check\"}\n ** module id = 4\n ** module chunks = 0\n **/","import angular from 'angular-fix';\nexport default formlyCustomValidation;\n\n// @ngInject\nfunction formlyCustomValidation(formlyConfig, formlyUtil, $q, formlyWarn) {\n return {\n restrict: 'A',\n require: 'ngModel',\n link: function formlyCustomValidationLink(scope, el, attrs, ctrl) {\n const opts = scope.options;\n const warnedValidators = [];\n opts.validation.messages = opts.validation.messages || {};\n angular.forEach(opts.validation.messages, (message, key) => {\n opts.validation.messages[key] = () => {\n return formlyUtil.formlyEval(scope, message, ctrl.$modelValue, ctrl.$viewValue);\n };\n });\n\n\n const useNewValidatorsApi = ctrl.hasOwnProperty('$validators') && !attrs.hasOwnProperty('useParsers');\n angular.forEach(opts.validators, addValidatorToPipeline.bind(null, false));\n angular.forEach(opts.asyncValidators, addValidatorToPipeline.bind(null, true));\n\n function addValidatorToPipeline(isAsync, validator, name) {\n setupMessage(validator, name);\n validator = angular.isObject(validator) ? validator.expression : validator;\n if (useNewValidatorsApi) {\n setupWithValidators(validator, name, isAsync);\n } else {\n setupWithParsers(validator, name, isAsync);\n }\n }\n\n function setupMessage(validator, name) {\n const message = validator.message;\n if (message) {\n opts.validation.messages[name] = () => {\n return formlyUtil.formlyEval(scope, message, ctrl.$modelValue, ctrl.$viewValue);\n };\n }\n }\n\n function setupWithValidators(validator, name, isAsync) {\n const isPossiblyAsync = !angular.isString(validator);\n let validatorCollection = (isPossiblyAsync || isAsync) ? '$asyncValidators' : '$validators';\n\n // UPDATE IN 7.0.0\n // this is temporary until we can have a breaking change. Allow people to get the wins of the explicitAsync api\n if (formlyConfig.extras.explicitAsync && !isAsync) {\n validatorCollection = '$validators';\n }\n\n ctrl[validatorCollection][name] = function evalValidity(modelValue, viewValue) {\n const value = formlyUtil.formlyEval(scope, validator, modelValue, viewValue);\n // UPDATE IN 7.0.0\n // In the next breaking change, this code should simply return the value\n if (isAsync) {\n return value;\n } else if (isPossiblyAsync && !formlyConfig.extras.explicitAsync) {\n if (isPromiseLike(value)) {\n logAsyncValidatorsDeprecationNotice(validator, opts);\n return value;\n } else {\n return value ? $q.when(value) : $q.reject(value);\n }\n } else {\n return value;\n }\n };\n }\n\n function setupWithParsers(validator, name, isAsync) {\n let inFlightValidator;\n ctrl.$parsers.unshift(function evalValidityOfParser(viewValue) {\n const isValid = formlyUtil.formlyEval(scope, validator, ctrl.$modelValue, viewValue);\n // UPDATE IN 7.0.0\n // In the next breaking change, rather than checking for isPromiseLike, it should just check for isAsync.\n\n if (isAsync || isPromiseLike(isValid)) {\n if (!isAsync) {\n logAsyncValidatorsDeprecationNotice(validator, opts);\n }\n ctrl.$pending = ctrl.$pending || {};\n ctrl.$pending[name] = true;\n inFlightValidator = isValid;\n isValid.then(() => {\n if (inFlightValidator === isValid) {\n ctrl.$setValidity(name, true);\n }\n }).catch(() => {\n if (inFlightValidator === isValid) {\n ctrl.$setValidity(name, false);\n }\n }).finally(() => {\n const $pending = ctrl.$pending || {};\n if (Object.keys($pending).length === 1) {\n delete ctrl.$pending;\n } else {\n delete ctrl.$pending[name];\n }\n });\n } else {\n ctrl.$setValidity(name, isValid);\n }\n return viewValue;\n });\n }\n\n function logAsyncValidatorsDeprecationNotice(validator, options) {\n if (warnedValidators.indexOf(validator) !== -1) {\n // we've warned about this one before. No spam necessary...\n return;\n }\n warnedValidators.push(validator);\n formlyWarn(\n 'validators-returning-promises-should-use-asyncvalidators',\n 'Validators returning promises should use asyncValidators instead of validators.',\n options\n );\n }\n }\n };\n\n\n function isPromiseLike(obj) {\n return obj && angular.isFunction(obj.then);\n }\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ../~/eslint-loader!./directives/formly-custom-validation.js\n **/","import angular from 'angular-fix';\nimport apiCheckFactory from 'api-check';\n\nexport default formlyField;\n\n/**\n * @ngdoc directive\n * @name formlyField\n * @restrict AE\n */\n// @ngInject\nfunction formlyField($http, $q, $compile, $templateCache, $interpolate, formlyConfig, formlyValidationMessages,\n formlyApiCheck, formlyUtil, formlyUsability, formlyWarn) {\n const {arrayify} = formlyUtil;\n\n return {\n restrict: 'AE',\n transclude: true,\n require: '?^formlyForm',\n scope: {\n options: '=',\n model: '=',\n formId: '@', // TODO remove formId in a breaking release\n index: '=?',\n fields: '=?',\n formState: '=?',\n formOptions: '=?',\n form: '=?' // TODO require form in a breaking release\n },\n controller: FormlyFieldController,\n link: fieldLink\n };\n\n\n // @ngInject\n function FormlyFieldController($scope, $timeout, $parse, $controller) {\n /* eslint max-statements:[2, 31] */\n if ($scope.options.fieldGroup) {\n setupFieldGroup();\n return;\n }\n\n const fieldType = getFieldType($scope.options);\n simplifyLife($scope.options);\n mergeFieldOptionsWithTypeDefaults($scope.options, fieldType);\n extendOptionsWithDefaults($scope.options, $scope.index);\n checkApi($scope.options);\n // set field id to link labels and fields\n\n // initalization\n setFieldIdAndName();\n setDefaultValue();\n setInitialValue();\n runExpressions();\n addValidationMessages($scope.options);\n invokeControllers($scope, $scope.options, fieldType);\n\n // function definitions\n function runExpressions() {\n // must run on next tick to make sure that the current value is correct.\n $timeout(function runExpressionsOnNextTick() {\n const field = $scope.options;\n const currentValue = valueGetterSetter();\n angular.forEach(field.expressionProperties, function runExpression(expression, prop) {\n const setter = $parse(prop).assign;\n const promise = $q.when(formlyUtil.formlyEval($scope, expression, currentValue, currentValue));\n promise.then(function setFieldValue(value) {\n setter(field, value);\n });\n });\n });\n }\n\n function valueGetterSetter(newVal) {\n if (!$scope.model || !$scope.options.key) {\n return undefined;\n }\n if (angular.isDefined(newVal)) {\n $scope.model[$scope.options.key] = newVal;\n }\n return $scope.model[$scope.options.key];\n }\n\n function simplifyLife(options) {\n // add a few empty objects (if they don't already exist) so you don't have to undefined check everywhere\n formlyUtil.reverseDeepMerge(options, {\n extras: {},\n data: {},\n templateOptions: {},\n validation: {}\n });\n // create $scope.to so template authors can reference to instead of $scope.options.templateOptions\n $scope.to = $scope.options.templateOptions;\n $scope.formOptions = $scope.formOptions || {};\n }\n\n function setFieldIdAndName() {\n if (angular.isFunction(formlyConfig.extras.getFieldId)) {\n $scope.id = formlyConfig.extras.getFieldId($scope.options, $scope.model, $scope);\n } else {\n const formName = ($scope.form && $scope.form.$name) || $scope.formId;\n $scope.id = formlyUtil.getFieldId(formName, $scope.options, $scope.index);\n }\n $scope.options.id = $scope.id;\n $scope.name = $scope.options.name || $scope.options.id;\n $scope.options.name = $scope.name;\n }\n\n function setDefaultValue() {\n if (angular.isDefined($scope.options.defaultValue) && !angular.isDefined($scope.model[$scope.options.key])) {\n $scope.model[$scope.options.key] = $scope.options.defaultValue;\n }\n }\n\n function setInitialValue() {\n $scope.options.initialValue = $scope.model && $scope.model[$scope.options.key];\n }\n\n function mergeFieldOptionsWithTypeDefaults(options, type) {\n if (type) {\n mergeOptions(options, type.defaultOptions);\n }\n const properOrder = arrayify(options.optionsTypes).reverse(); // so the right things are overridden\n angular.forEach(properOrder, typeName => {\n mergeOptions(options, formlyConfig.getType(typeName, true, options).defaultOptions);\n });\n }\n\n function mergeOptions(options, extraOptions) {\n if (extraOptions) {\n if (angular.isFunction(extraOptions)) {\n extraOptions = extraOptions(options);\n }\n formlyUtil.reverseDeepMerge(options, extraOptions);\n }\n }\n\n function extendOptionsWithDefaults(options, index) {\n const key = options.key || index || 0;\n angular.extend(options, {\n // attach the key in case the formly-field directive is used directly\n key,\n value: options.value || valueGetterSetter,\n runExpressions,\n resetModel,\n updateInitialValue\n });\n }\n\n function resetModel() {\n $scope.model[$scope.options.key] = $scope.options.initialValue;\n if ($scope.options.formControl) {\n if (angular.isArray($scope.options.formControl)) {\n angular.forEach($scope.options.formControl, function(formControl) {\n resetFormControl(formControl, true);\n });\n } else {\n resetFormControl($scope.options.formControl);\n }\n }\n }\n\n function resetFormControl(formControl, isMultiNgModel) {\n if (!isMultiNgModel) {\n formControl.$setViewValue($scope.model[$scope.options.key]);\n }\n\n formControl.$render();\n formControl.$setUntouched();\n formControl.$setPristine();\n\n // To prevent breaking change requiring a digest to reset $viewModel\n if (!$scope.$root.$$phase) {\n $scope.$digest();\n }\n }\n\n function updateInitialValue() {\n $scope.options.initialValue = $scope.model[$scope.options.key];\n }\n\n function addValidationMessages(options) {\n options.validation.messages = options.validation.messages || {};\n angular.forEach(formlyValidationMessages.messages, function createFunctionForMessage(expression, name) {\n if (!options.validation.messages[name]) {\n options.validation.messages[name] = function evaluateMessage(viewValue, modelValue, scope) {\n return formlyUtil.formlyEval(scope, expression, modelValue, viewValue);\n };\n }\n });\n }\n\n function invokeControllers(scope, options = {}, type = {}) {\n angular.forEach([type.controller, options.controller], controller => {\n if (controller) {\n $controller(controller, {$scope: scope});\n }\n });\n }\n\n function setupFieldGroup() {\n $scope.options.options = $scope.options.options || {};\n $scope.options.options.formState = $scope.formState;\n }\n }\n\n\n // link function\n function fieldLink(scope, el, attrs, formlyFormCtrl) {\n if (scope.options.fieldGroup) {\n setFieldGroupTemplate();\n return;\n }\n\n // watch the field model (if exists) if there is no parent formly-form directive (that would watch it instead)\n if (!formlyFormCtrl && scope.options.model) {\n scope.$watch('options.model', () => scope.options.runExpressions(), true);\n }\n\n addAttributes();\n addClasses();\n\n const type = getFieldType(scope.options);\n const args = arguments;\n const thusly = this;\n let fieldCount = 0;\n const fieldManipulators = getManipulators(scope.options, scope.formOptions);\n getFieldTemplate(scope.options)\n .then(runManipulators(fieldManipulators.preWrapper))\n .then(transcludeInWrappers(scope.options, scope.formOptions))\n .then(runManipulators(fieldManipulators.postWrapper))\n .then(setElementTemplate)\n .then(watchFormControl)\n .then(callLinkFunctions)\n .catch(error => {\n formlyWarn(\n 'there-was-a-problem-setting-the-template-for-this-field',\n 'There was a problem setting the template for this field ',\n scope.options,\n error\n );\n });\n\n function setFieldGroupTemplate() {\n checkFieldGroupApi(scope.options);\n el.addClass('formly-field-group');\n let extraAttributes = '';\n if (scope.options.elementAttributes) {\n extraAttributes = Object.keys(scope.options.elementAttributes).map(key => {\n return `${key}=\"${scope.options.elementAttributes[key]}\"`;\n }).join(' ');\n }\n let modelValue = 'model';\n scope.options.form = scope.form;\n if (scope.options.key) {\n modelValue = `model['${scope.options.key}']`;\n }\n setElementTemplate(`\n \n \n `);\n }\n\n function addAttributes() {\n if (scope.options.elementAttributes) {\n el.attr(scope.options.elementAttributes);\n }\n }\n\n function addClasses() {\n if (scope.options.className) {\n el.addClass(scope.options.className);\n }\n if (scope.options.type) {\n el.addClass(`formly-field-${scope.options.type}`);\n }\n }\n\n function setElementTemplate(templateString) {\n el.html(asHtml(templateString));\n $compile(el.contents())(scope);\n return templateString;\n }\n\n function watchFormControl(templateString) {\n let stopWatchingShowError = angular.noop;\n if (scope.options.noFormControl) {\n return;\n }\n const templateEl = angular.element(`
${templateString}
`);\n const ngModelNodes = templateEl[0].querySelectorAll('[ng-model],[data-ng-model]');\n\n\n if (ngModelNodes.length) {\n angular.forEach(ngModelNodes, function(ngModelNode) {\n fieldCount++;\n watchFieldNameOrExistence(ngModelNode.getAttribute('name'));\n });\n }\n\n function watchFieldNameOrExistence(name) {\n const nameExpressionRegex = /\\{\\{(.*?)}}/;\n const nameExpression = nameExpressionRegex.exec(name);\n if (nameExpression) {\n name = $interpolate(name)(scope);\n }\n watchFieldExistence(name);\n }\n\n function watchFieldExistence(name) {\n scope.$watch(`form[\"${name}\"]`, function formControlChange(formControl) {\n if (formControl) {\n if (fieldCount > 1) {\n if (!scope.options.formControl) {\n scope.options.formControl = [];\n }\n scope.options.formControl.push(formControl);\n } else {\n scope.options.formControl = formControl;\n }\n scope.fc = scope.options.formControl; // shortcut for template authors\n stopWatchingShowError();\n addShowMessagesWatcher();\n addParsers();\n addFormatters();\n }\n });\n }\n\n function addShowMessagesWatcher() {\n stopWatchingShowError = scope.$watch(function watchShowValidationChange() {\n const customExpression = formlyConfig.extras.errorExistsAndShouldBeVisibleExpression;\n const {options, fc} = scope;\n if (!fc.$invalid) {\n return false;\n } else if (typeof options.validation.show === 'boolean') {\n return options.validation.show;\n } else if (customExpression) {\n return formlyUtil.formlyEval(scope, customExpression, fc.$modelValue, fc.$viewValue);\n } else {\n const noTouchedButDirty = (angular.isUndefined(fc.$touched) && fc.$dirty);\n return (scope.fc.$touched || noTouchedButDirty);\n }\n }, function onShowValidationChange(show) {\n scope.options.validation.errorExistsAndShouldBeVisible = show;\n scope.showError = show; // shortcut for template authors\n });\n }\n\n function addParsers() {\n setParsersOrFormatters('parsers');\n }\n\n function addFormatters() {\n setParsersOrFormatters('formatters');\n const ctrl = scope.fc;\n const formWasPristine = scope.form.$pristine;\n if (scope.options.formatters) {\n let value = ctrl.$modelValue;\n ctrl.$formatters.forEach((formatter) => {\n value = formatter(value);\n });\n\n ctrl.$setViewValue(value);\n ctrl.$render();\n ctrl.$setPristine();\n if (formWasPristine) {\n scope.form.$setPristine();\n }\n }\n }\n\n function setParsersOrFormatters(which) {\n let originalThingProp = 'originalParser';\n if (which === 'formatters') {\n originalThingProp = 'originalFormatter';\n }\n\n // init with type's parsers\n let things = getThingsFromType(type);\n\n // get optionsTypes things\n things = formlyUtil.extendArray(things, getThingsFromOptionsTypes(scope.options.optionsTypes));\n\n // get field's things\n things = formlyUtil.extendArray(things, scope.options[which]);\n\n // convert things into formlyExpression things\n angular.forEach(things, (thing, index) => {\n things[index] = getFormlyExpressionThing(thing);\n });\n\n let ngModelCtrls = scope.fc;\n if (!angular.isArray(ngModelCtrls)) {\n ngModelCtrls = [ngModelCtrls];\n }\n\n angular.forEach(ngModelCtrls, ngModelCtrl => {\n ngModelCtrl['$' + which] = ngModelCtrl['$' + which].concat(...things);\n });\n\n function getThingsFromType(theType) {\n if (!theType) {\n return [];\n }\n if (angular.isString(theType)) {\n theType = formlyConfig.getType(theType, true, scope.options);\n }\n let typeThings = [];\n\n // get things from parent\n if (theType.extends) {\n typeThings = formlyUtil.extendArray(typeThings, getThingsFromType(theType.extends));\n }\n\n // get own type's things\n typeThings = formlyUtil.extendArray(typeThings, getDefaultOptionsProperty(theType, which, []));\n\n // get things from optionsTypes\n typeThings = formlyUtil.extendArray(\n typeThings,\n getThingsFromOptionsTypes(getDefaultOptionsOptionsTypes(theType))\n );\n\n return typeThings;\n }\n\n function getThingsFromOptionsTypes(optionsTypes = []) {\n let optionsTypesThings = [];\n angular.forEach(angular.copy(arrayify(optionsTypes)).reverse(), optionsTypeName => {\n optionsTypesThings = formlyUtil.extendArray(optionsTypesThings, getThingsFromType(optionsTypeName));\n });\n return optionsTypesThings;\n }\n\n function getFormlyExpressionThing(thing) {\n formlyExpressionParserOrFormatterFunction[originalThingProp] = thing;\n return formlyExpressionParserOrFormatterFunction;\n\n function formlyExpressionParserOrFormatterFunction($viewValue) {\n const $modelValue = scope.options.value();\n return formlyUtil.formlyEval(scope, thing, $modelValue, $viewValue);\n }\n }\n\n }\n }\n\n function callLinkFunctions() {\n if (type && type.link) {\n type.link.apply(thusly, args);\n }\n if (scope.options.link) {\n scope.options.link.apply(thusly, args);\n }\n }\n\n\n function runManipulators(manipulators) {\n return function runManipulatorsOnTemplate(templateToManipulate) {\n let chain = $q.when(templateToManipulate);\n angular.forEach(manipulators, manipulator => {\n chain = chain.then(template => {\n return $q.when(manipulator(template, scope.options, scope)).then(newTemplate => {\n return angular.isString(newTemplate) ? newTemplate : asHtml(newTemplate);\n });\n });\n });\n return chain;\n };\n }\n }\n\n // sort-of stateless util functions\n function asHtml(el) {\n const wrapper = angular.element('');\n return wrapper.append(el).html();\n }\n\n function getFieldType(options) {\n return options.type && formlyConfig.getType(options.type);\n }\n\n function getManipulators(options, formOptions) {\n let preWrapper = [];\n let postWrapper = [];\n addManipulators(options.templateManipulators);\n addManipulators(formOptions.templateManipulators);\n addManipulators(formlyConfig.templateManipulators);\n return {preWrapper, postWrapper};\n\n function addManipulators(manipulators) {\n /* eslint-disable */ // it doesn't understand this :-(\n const {preWrapper:pre = [], postWrapper:post = []} = (manipulators || {});\n preWrapper = preWrapper.concat(pre);\n postWrapper = postWrapper.concat(post);\n /* eslint-enable */\n }\n }\n\n function getFieldTemplate(options) {\n function fromOptionsOrType(key, fieldType) {\n if (angular.isDefined(options[key])) {\n return options[key];\n } else if (fieldType && angular.isDefined(fieldType[key])) {\n return fieldType[key];\n }\n }\n\n const type = formlyConfig.getType(options.type, true, options);\n const template = fromOptionsOrType('template', type);\n const templateUrl = fromOptionsOrType('templateUrl', type);\n if (angular.isUndefined(template) && !templateUrl) {\n throw formlyUsability.getFieldError(\n 'type-type-has-no-template',\n `Type '${options.type}' has not template. On element:`, options\n );\n }\n\n return getTemplate(templateUrl || template, angular.isUndefined(template), options);\n }\n\n\n function getTemplate(template, isUrl, options) {\n let templatePromise;\n if (angular.isFunction(template)) {\n templatePromise = $q.when(template(options));\n } else {\n templatePromise = $q.when(template);\n }\n\n if (!isUrl) {\n return templatePromise;\n } else {\n const httpOptions = {cache: $templateCache};\n return templatePromise\n .then((url) => $http.get(url, httpOptions))\n .then((response) => response.data)\n .catch(function handleErrorGettingATemplate(error) {\n formlyWarn(\n 'problem-loading-template-for-templateurl',\n 'Problem loading template for ' + template,\n error\n );\n });\n }\n }\n\n function transcludeInWrappers(options, formOptions) {\n const wrapper = getWrapperOption(options, formOptions);\n\n return function transcludeTemplate(template) {\n if (!wrapper.length) {\n return $q.when(template);\n }\n\n wrapper.forEach((aWrapper) => {\n formlyUsability.checkWrapper(aWrapper, options);\n aWrapper.validateOptions && aWrapper.validateOptions(options);\n runApiCheck(aWrapper, options);\n });\n const promises = wrapper.map(w => getTemplate(w.template || w.templateUrl, !w.template));\n return $q.all(promises).then(wrappersTemplates => {\n wrappersTemplates.forEach((wrapperTemplate, index) => {\n formlyUsability.checkWrapperTemplate(wrapperTemplate, wrapper[index]);\n });\n wrappersTemplates.reverse(); // wrapper 0 is wrapped in wrapper 1 and so on...\n let totalWrapper = wrappersTemplates.shift();\n wrappersTemplates.forEach(wrapperTemplate => {\n totalWrapper = doTransclusion(totalWrapper, wrapperTemplate);\n });\n return doTransclusion(totalWrapper, template);\n });\n };\n }\n\n function doTransclusion(wrapper, template) {\n const superWrapper = angular.element(''); // this allows people not have to have a single root in wrappers\n superWrapper.append(wrapper);\n let transcludeEl = superWrapper.find('formly-transclude');\n if (!transcludeEl.length) {\n // try it using our custom find function\n transcludeEl = formlyUtil.findByNodeName(superWrapper, 'formly-transclude');\n }\n transcludeEl.replaceWith(template);\n return superWrapper.html();\n }\n\n function getWrapperOption(options, formOptions) {\n /* eslint complexity:[2, 6] */\n let wrapper = options.wrapper;\n // explicit null means no wrapper\n if (wrapper === null) {\n return [];\n }\n\n // nothing specified means use the default wrapper for the type\n if (!wrapper) {\n // get all wrappers that specify they apply to this type\n wrapper = arrayify(formlyConfig.getWrapperByType(options.type));\n } else {\n wrapper = arrayify(wrapper).map(formlyConfig.getWrapper);\n }\n\n // get all wrappers for that the type specified that it uses.\n const type = formlyConfig.getType(options.type, true, options);\n if (type && type.wrapper) {\n const typeWrappers = arrayify(type.wrapper).map(formlyConfig.getWrapper);\n wrapper = wrapper.concat(typeWrappers);\n }\n\n // add form wrappers\n if (formOptions.wrapper) {\n const formWrappers = arrayify(formOptions.wrapper).map(formlyConfig.getWrapper);\n wrapper = wrapper.concat(formWrappers);\n }\n\n // add the default wrapper last\n const defaultWrapper = formlyConfig.getWrapper();\n if (defaultWrapper) {\n wrapper.push(defaultWrapper);\n }\n return wrapper;\n }\n\n function checkApi(options) {\n formlyApiCheck.throw(formlyApiCheck.formlyFieldOptions, options, {\n prefix: 'formly-field directive',\n url: 'formly-field-directive-validation-failed'\n });\n // validate with the type\n const type = options.type && formlyConfig.getType(options.type);\n if (type) {\n if (type.validateOptions) {\n type.validateOptions(options);\n }\n runApiCheck(type, options, true);\n }\n if (options.expressionProperties && options.expressionProperties.hide) {\n formlyWarn(\n 'dont-use-expressionproperties.hide-use-hideexpression-instead',\n 'You have specified `hide` in `expressionProperties`. Use `hideExpression` instead',\n options\n );\n }\n }\n\n function checkFieldGroupApi(options) {\n formlyApiCheck.throw(formlyApiCheck.fieldGroup, options, {\n prefix: 'formly-field directive',\n url: 'formly-field-directive-validation-failed'\n });\n }\n\n function runApiCheck({apiCheck, apiCheckInstance, apiCheckFunction, apiCheckOptions}, options, forType) {\n runApiCheckForType(apiCheck, apiCheckInstance, apiCheckFunction, apiCheckOptions, options);\n if (forType && options.type) {\n angular.forEach(formlyConfig.getTypeHeritage(options.type), function(type) {\n runApiCheckForType(type.apiCheck, type.apiCheckInstance, type.apiCheckFunction, type.apiCheckOptions, options);\n });\n }\n }\n\n function runApiCheckForType(apiCheck, apiCheckInstance, apiCheckFunction, apiCheckOptions, options) {\n /* eslint complexity:[2, 9] */\n if (!apiCheck) {\n return;\n }\n const instance = apiCheckInstance || formlyConfig.extras.apiCheckInstance || formlyApiCheck;\n if (instance.config.disabled || apiCheckFactory.globalConfig.disabled) {\n return;\n }\n const fn = apiCheckFunction || 'warn';\n if (angular.isFunction(apiCheck)) {\n // this is the new API\n const checkerObjects = apiCheck(instance);\n angular.forEach(checkerObjects, (shape, name) => {\n const checker = instance.shape(shape);\n const checkOptions = angular.extend({\n prefix: `formly-field type ${options.type} for property ${name}`,\n url: formlyApiCheck.config.output.docsBaseUrl + 'formly-field-type-apicheck-failed'\n }, apiCheckOptions);\n instance[fn](checker, options[name], checkOptions);\n });\n } else {\n // TODO this is the deprecated API. Remove this in a breaking change.\n const checker = instance.shape(apiCheck);\n const checkOptions = apiCheckOptions || {\n prefix: `formly-field type ${options.type}`,\n url: formlyApiCheck.config.output.docsBaseUrl + 'formly-field-type-apicheck-failed'\n };\n instance[fn](checker, options, checkOptions);\n }\n }\n\n\n}\n\n\n// Stateless util functions\nfunction getDefaultOptionsOptionsTypes(type) {\n return getDefaultOptionsProperty(type, 'optionsTypes', []);\n}\n\nfunction getDefaultOptionsProperty(type, prop, defaultValue) {\n return type.defaultOptions && type.defaultOptions[prop] || defaultValue;\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ../~/eslint-loader!./directives/formly-field.js\n **/","export default formlyFocus;\n\n// @ngInject\nfunction formlyFocus($timeout, $document) {\n return {\n restrict: 'A',\n link: function formlyFocusLink(scope, element, attrs) {\n let previousEl = null;\n const el = element[0];\n const doc = $document[0];\n attrs.$observe('formlyFocus', function respondToFocusExpressionChange(value) {\n /* eslint no-bitwise:0 */ // I know what I'm doing. I promise...\n if (value === 'true') {\n $timeout(function setElementFocus() {\n previousEl = doc.activeElement;\n el.focus();\n }, ~~attrs.focusWait);\n } else if (value === 'false') {\n if (doc.activeElement === el) {\n el.blur();\n if (attrs.hasOwnProperty('refocus') && previousEl) {\n previousEl.focus();\n }\n }\n }\n });\n }\n };\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ../~/eslint-loader!./directives/formly-focus.js\n **/","import angular from 'angular-fix';\n\nexport default formlyForm;\n\n/**\n * @ngdoc directive\n * @name formlyForm\n * @restrict E\n */\n// @ngInject\nfunction formlyForm(formlyUsability, formlyWarn, $parse, formlyConfig, $interpolate) {\n let currentFormId = 1;\n return {\n restrict: 'E',\n template: formlyFormGetTemplate,\n replace: true,\n transclude: true,\n scope: {\n fields: '=',\n model: '=',\n form: '=?',\n options: '=?'\n },\n controller: FormlyFormController,\n link: formlyFormLink\n };\n\n function formlyFormGetTemplate(el, attrs) {\n const rootEl = getRootEl();\n const fieldRootEl = getFieldRootEl();\n const formId = `formly_${currentFormId++}`;\n let parentFormAttributes = '';\n if (attrs.hasOwnProperty('isFieldGroup') && el.parent().parent().hasClass('formly')) {\n parentFormAttributes = copyAttributes(el.parent().parent()[0].attributes);\n }\n return `\n <${rootEl} class=\"formly\"\n name=\"${getFormName()}\"\n role=\"form\" ${parentFormAttributes}>\n <${fieldRootEl} formly-field\n ng-repeat=\"field in fields ${getTrackBy()}\"\n ${getHideDirective()}=\"!field.hide\"\n class=\"formly-field\"\n options=\"field\"\n model=\"field.model || model\"\n fields=\"fields\"\n form=\"theFormlyForm\"\n form-id=\"${getFormName()}\"\n form-state=\"options.formState\"\n form-options=\"options\"\n index=\"$index\">\n \n
\n \n `;\n\n function getRootEl() {\n return attrs.rootEl || 'ng-form';\n }\n\n function getFieldRootEl() {\n return attrs.fieldRootEl || 'div';\n }\n\n function getHideDirective() {\n return attrs.hideDirective || formlyConfig.extras.defaultHideDirective || 'ng-if';\n }\n\n function getTrackBy() {\n if (!attrs.trackBy) {\n return '';\n } else {\n return `track by ${attrs.trackBy}`;\n }\n }\n\n function getFormName() {\n let formName = formId;\n const bindName = attrs.bindName;\n if (bindName) {\n if (angular.version.minor < 3) {\n throw formlyUsability.getFormlyError('bind-name attribute on formly-form not allowed in < angular 1.3');\n }\n // we can do a one-time binding here because we know we're in 1.3.x territory\n formName = `${$interpolate.startSymbol()}::'formly_' + ${bindName}${$interpolate.endSymbol()}`;\n }\n return formName;\n }\n\n function getTranscludeClass() {\n return attrs.transcludeClass || '';\n }\n\n function copyAttributes(attributes) {\n const excluded = ['model', 'form', 'fields', 'options', 'name', 'role', 'class',\n 'data-model', 'data-form', 'data-fields', 'data-options', 'data-name'];\n const arrayAttrs = [];\n angular.forEach(attributes, ({nodeName, value}) => {\n if (nodeName !== 'undefined' && excluded.indexOf(nodeName) === -1) {\n arrayAttrs.push(`${toKebabCase(nodeName)}=\"${value}\"`);\n }\n });\n return arrayAttrs.join(' ');\n }\n }\n\n // @ngInject\n function FormlyFormController($scope, formlyApiCheck, formlyUtil) {\n setupOptions();\n $scope.model = $scope.model || {};\n setupFields();\n\n // watch the model and evaluate watch expressions that depend on it.\n $scope.$watch('model', onModelOrFormStateChange, true);\n if ($scope.options.formState) {\n $scope.$watch('options.formState', onModelOrFormStateChange, true);\n }\n\n function onModelOrFormStateChange() {\n angular.forEach($scope.fields, function runFieldExpressionProperties(field, index) {\n const model = field.model || $scope.model;\n field.runExpressions && field.runExpressions();\n if (field.hideExpression) { // can't use hide with expressionProperties reliably\n const val = model[field.key];\n field.hide = evalCloseToFormlyExpression(field.hideExpression, val, field, index);\n }\n if (field.extras && field.extras.validateOnModelChange && field.formControl) {\n field.formControl.$validate();\n }\n });\n }\n\n function setupFields() {\n $scope.fields = $scope.fields || [];\n const fieldTransform = $scope.options.fieldTransform || formlyConfig.extras.fieldTransform;\n\n if (fieldTransform) {\n $scope.fields = fieldTransform($scope.fields, $scope.model, $scope.options, $scope.form);\n if (!$scope.fields) {\n throw formlyUsability.getFormlyError('fieldTransform must return an array of fields');\n }\n }\n\n setupModels();\n\n angular.forEach($scope.fields, attachKey); // attaches a key based on the index if a key isn't specified\n angular.forEach($scope.fields, setupWatchers); // setup watchers for all fields\n }\n\n\n function setupOptions() {\n formlyApiCheck.throw(\n [formlyApiCheck.formOptionsApi.optional], [$scope.options], {prefix: 'formly-form options check'}\n );\n $scope.options = $scope.options || {};\n $scope.options.formState = $scope.options.formState || {};\n\n angular.extend($scope.options, {\n updateInitialValue,\n resetModel\n });\n\n }\n\n function updateInitialValue() {\n angular.forEach($scope.fields, field => {\n if (isFieldGroup(field) && field.options) {\n field.options.updateInitialValue();\n } else {\n field.updateInitialValue();\n }\n });\n }\n\n function resetModel() {\n angular.forEach($scope.fields, field => {\n if (isFieldGroup(field) && field.options) {\n field.options.resetModel();\n } else if (field.resetModel) {\n field.resetModel();\n }\n });\n }\n\n function setupModels() {\n // a set of field models that are already watched (the $scope.model will have its own watcher)\n const watchedModels = [$scope.model];\n\n angular.forEach($scope.fields, (field) => {\n initModel(field);\n\n if (field.model && watchedModels.indexOf(field.model) === -1) {\n $scope.$watch(() => field.model, onModelOrFormStateChange, true);\n watchedModels.push(field.model);\n }\n });\n }\n\n function initModel(field) {\n if (angular.isString(field.model)) {\n const expression = field.model;\n const index = $scope.fields.indexOf(field);\n field.model = evalCloseToFormlyExpression(expression, undefined, field, index);\n if (!field.model) {\n throw formlyUsability.getFieldError(\n 'field-model-must-be-initialized',\n 'Field model must be initialized. When specifying a model as a string for a field, the result of the' +\n ' expression must have been initialized ahead of time.',\n field);\n }\n }\n }\n\n function attachKey(field, index) {\n if (!isFieldGroup(field)) {\n field.key = field.key || index || 0;\n }\n }\n\n function setupWatchers(field, index) {\n if (isFieldGroup(field) || !angular.isDefined(field.watcher)) {\n return;\n }\n let watchers = field.watcher;\n if (!angular.isArray(watchers)) {\n watchers = [watchers];\n }\n angular.forEach(watchers, function setupWatcher(watcher) {\n if (!angular.isDefined(watcher.listener)) {\n throw formlyUsability.getFieldError(\n 'all-field-watchers-must-have-a-listener',\n 'All field watchers must have a listener', field\n );\n }\n const watchExpression = getWatchExpression(watcher, field, index);\n const watchListener = getWatchListener(watcher, field, index);\n\n const type = watcher.type || '$watch';\n watcher.stopWatching = $scope[type](watchExpression, watchListener, watcher.watchDeep);\n });\n }\n\n function getWatchExpression(watcher, field, index) {\n let watchExpression = watcher.expression || `model['${field.key}']`;\n if (angular.isFunction(watchExpression)) {\n // wrap the field's watch expression so we can call it with the field as the first arg\n // and the stop function as the last arg as a helper\n const originalExpression = watchExpression;\n watchExpression = function formlyWatchExpression() {\n const args = modifyArgs(watcher, index, ...arguments);\n return originalExpression(...args);\n };\n watchExpression.displayName = `Formly Watch Expression for field for ${field.key}`;\n }\n return watchExpression;\n }\n\n function getWatchListener(watcher, field, index) {\n let watchListener = watcher.listener;\n if (angular.isFunction(watchListener)) {\n // wrap the field's watch listener so we can call it with the field as the first arg\n // and the stop function as the last arg as a helper\n const originalListener = watchListener;\n watchListener = function formlyWatchListener() {\n const args = modifyArgs(watcher, index, ...arguments);\n return originalListener(...args);\n };\n watchListener.displayName = `Formly Watch Listener for field for ${field.key}`;\n }\n return watchListener;\n }\n\n function modifyArgs(watcher, index, ...originalArgs) {\n return [$scope.fields[index], ...originalArgs, watcher.stopWatching];\n }\n\n function evalCloseToFormlyExpression(expression, val, field, index) {\n const extraLocals = getFormlyFieldLikeLocals(field, index);\n return formlyUtil.formlyEval($scope, expression, val, val, extraLocals);\n }\n\n function getFormlyFieldLikeLocals(field, index) {\n // this makes it closer to what a regular formlyExpression would be\n return {\n options: field,\n index,\n formState: $scope.options.formState,\n formId: $scope.formId\n };\n }\n }\n\n function formlyFormLink(scope, el, attrs) {\n setFormController();\n fixChromeAutocomplete();\n\n function setFormController() {\n const formId = attrs.name;\n scope.formId = formId;\n scope.theFormlyForm = scope[formId];\n if (attrs.form) {\n const getter = $parse(attrs.form);\n const setter = getter.assign;\n const parentForm = getter(scope.$parent);\n if (parentForm) {\n scope.theFormlyForm = parentForm;\n if (scope[formId]) {\n scope.theFormlyForm.$removeControl(scope[formId]);\n }\n\n // this next line is probably one of the more dangerous things that angular-formly does to improve the\n // API for angular-formly forms. It ensures that the NgModelControllers inside of formly-form will be\n // attached to the form that is passed to formly-form rather than the one that formly-form creates\n // this is necessary because it's confusing to have a step between the form you pass in\n // and the fields in that form. It also is because angular doesn't propagate properties like $submitted down\n // to children forms :-( This line was added to solve this issue:\n // https://github.com/formly-js/angular-formly/issues/287\n // luckily, this is how the formController has been accessed by the NgModelController since angular 1.0.0\n // so I expect it will remain this way for the life of angular 1.x\n el.removeData('$formController');\n } else {\n setter(scope.$parent, scope[formId]);\n }\n }\n if (!scope.theFormlyForm && !formlyConfig.disableWarnings) {\n /* eslint no-console:0 */\n formlyWarn(\n 'formly-form-has-no-formcontroller',\n 'Your formly-form does not have a `form` property. Many functions of the form (like validation) may not work',\n el,\n scope\n );\n }\n }\n\n /*\n * chrome autocomplete lameness\n * see https://code.google.com/p/chromium/issues/detail?id=468153#c14\n * ლ(ಠ益ಠლ) (╯°□°)╯︵ ┻━┻ (◞‸◟;)\n */\n function fixChromeAutocomplete() {\n const global = formlyConfig.extras.removeChromeAutoComplete === true;\n const offInstance = scope.options && scope.options.removeChromeAutoComplete === false;\n const onInstance = scope.options && scope.options.removeChromeAutoComplete === true;\n if ((global && !offInstance) || onInstance) {\n const input = document.createElement('input');\n input.setAttribute('autocomplete', 'address-level4');\n input.setAttribute('hidden', 'true');\n el[0].appendChild(input);\n }\n\n }\n }\n\n\n // stateless util functions\n function toKebabCase(string) {\n if (string) {\n return string.replace(/([A-Z])/g, $1 => '-' + $1.toLowerCase());\n } else {\n return '';\n }\n }\n\n function isFieldGroup(field) {\n return field && !!field.fieldGroup;\n }\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ../~/eslint-loader!./directives/formly-form.js\n **/","import angular from 'angular-fix';\n\nimport formlyApiCheck from './providers/formlyApiCheck';\nimport formlyErrorAndWarningsUrlPrefix from './other/docsBaseUrl';\nimport formlyUsability from './providers/formlyUsability';\nimport formlyConfig from './providers/formlyConfig';\nimport formlyValidationMessages from './providers/formlyValidationMessages';\nimport formlyUtil from './services/formlyUtil';\nimport formlyWarn from './services/formlyWarn';\n\nimport formlyCustomValidation from './directives/formly-custom-validation';\nimport formlyField from './directives/formly-field';\nimport formlyFocus from './directives/formly-focus';\nimport formlyForm from './directives/formly-form';\n\nimport formlyNgModelAttrsManipulator from './run/formlyNgModelAttrsManipulator';\nimport formlyCustomTags from './run/formlyCustomTags';\n\nconst ngModuleName = 'formly';\n\nexport default ngModuleName;\n\nconst ngModule = angular.module(ngModuleName, []);\n\nngModule.constant('formlyApiCheck', formlyApiCheck);\nngModule.constant('formlyErrorAndWarningsUrlPrefix', formlyErrorAndWarningsUrlPrefix);\nngModule.constant('formlyVersion', VERSION); // <-- webpack variable\n\nngModule.provider('formlyUsability', formlyUsability);\nngModule.provider('formlyConfig', formlyConfig);\n\nngModule.factory('formlyValidationMessages', formlyValidationMessages);\nngModule.factory('formlyUtil', formlyUtil);\nngModule.factory('formlyWarn', formlyWarn);\n\nngModule.directive('formlyCustomValidation', formlyCustomValidation);\nngModule.directive('formlyField', formlyField);\nngModule.directive('formlyFocus', formlyFocus);\nngModule.directive('formlyForm', formlyForm);\n\nngModule.run(formlyNgModelAttrsManipulator);\nngModule.run(formlyCustomTags);\n\n\n\n/** WEBPACK FOOTER **\n ** ../~/eslint-loader!./index.common.js\n **/","import angular from 'angular-fix';\nimport apiCheckFactory from 'api-check';\n\nconst apiCheck = apiCheckFactory({\n output: {\n prefix: 'angular-formly:',\n docsBaseUrl: require('../other/docsBaseUrl')\n }\n});\n\nfunction shapeRequiredIfNot(otherProps, propChecker) {\n if (!angular.isArray(otherProps)) {\n otherProps = [otherProps];\n }\n const type = `specified if these are not specified: \\`${otherProps.join(', ')}\\` (otherwise it's optional)`;\n\n function shapeRequiredIfNotDefinition(prop, propName, location, obj) {\n const propExists = obj && obj.hasOwnProperty(propName);\n const otherPropsExist = otherProps.some(function(otherProp) {\n return obj && obj.hasOwnProperty(otherProp);\n });\n if (!otherPropsExist && !propExists) {\n return apiCheck.utils.getError(propName, location, type);\n } else if (propExists) {\n return propChecker(prop, propName, location, obj);\n }\n }\n\n shapeRequiredIfNotDefinition.type = type;\n return apiCheck.utils.checkerHelpers.setupChecker(shapeRequiredIfNotDefinition);\n}\n\n// TODO in 7.0.0 .nullable is available on all checkers\nfunction nullable(checker) {\n return apiCheck.oneOfType([\n apiCheck.oneOf([null]), checker\n ]);\n}\n\nconst formlyExpression = apiCheck.oneOfType([apiCheck.string, apiCheck.func]);\nconst specifyWrapperType = nullable(apiCheck.typeOrArrayOf(apiCheck.string));\n\nconst apiCheckProperty = apiCheck.oneOfType([apiCheck.func, apiCheck.objectOf(apiCheck.func)]);\n\nconst apiCheckInstanceProperty = apiCheck.shape.onlyIf('apiCheck', apiCheck.func.withProperties({\n warn: apiCheck.func,\n throw: apiCheck.func,\n shape: apiCheck.func\n}));\n\nconst apiCheckFunctionProperty = apiCheck.shape.onlyIf('apiCheck', apiCheck.oneOf(['throw', 'warn']));\n\nconst formlyWrapperType = apiCheck.shape({\n name: shapeRequiredIfNot('types', apiCheck.string).optional,\n template: apiCheck.shape.ifNot('templateUrl', apiCheck.string).optional,\n templateUrl: apiCheck.shape.ifNot('template', apiCheck.string).optional,\n types: apiCheck.typeOrArrayOf(apiCheck.string).optional,\n overwriteOk: apiCheck.bool.optional,\n validateOptions: apiCheck.func.optional,\n apiCheck: apiCheckProperty.optional,\n apiCheckInstance: apiCheckInstanceProperty.optional,\n apiCheckFunction: apiCheckFunctionProperty.optional,\n apiCheckOptions: apiCheck.object.optional\n}).strict;\n\nconst expressionProperties = apiCheck.objectOf(apiCheck.oneOfType([\n formlyExpression,\n apiCheck.shape({\n expression: formlyExpression,\n message: formlyExpression.optional\n }).strict\n]));\n\nconst modelChecker = apiCheck.oneOfType([apiCheck.string, apiCheck.object]);\n\nconst templateManipulators = nullable(apiCheck.shape({\n preWrapper: nullable(apiCheck.arrayOf(apiCheck.func)).optional,\n postWrapper: nullable(apiCheck.arrayOf(apiCheck.func)).optional\n}).strict);\n\nconst validatorChecker = apiCheck.objectOf(apiCheck.oneOfType([\n formlyExpression, apiCheck.shape({\n expression: formlyExpression,\n message: formlyExpression.optional\n }).strict\n]));\n\nconst fieldOptionsApiShape = {\n $$hashKey: apiCheck.any.optional,\n type: apiCheck.shape.ifNot(['template', 'templateUrl'], apiCheck.string).optional,\n template: apiCheck.shape.ifNot(\n ['type', 'templateUrl'],\n apiCheck.oneOfType([apiCheck.string, apiCheck.func])\n ).optional,\n templateUrl: apiCheck.shape.ifNot(\n ['type', 'template'],\n apiCheck.oneOfType([apiCheck.string, apiCheck.func])\n ).optional,\n key: apiCheck.oneOfType([apiCheck.string, apiCheck.number]).optional,\n model: modelChecker.optional,\n className: apiCheck.string.optional,\n id: apiCheck.string.optional,\n name: apiCheck.string.optional,\n expressionProperties: expressionProperties.optional,\n extras: apiCheck.shape({\n validateOnModelChange: apiCheck.bool.optional,\n skipNgModelAttrsManipulator: apiCheck.oneOfType([\n apiCheck.string, apiCheck.bool\n ]).optional\n }).strict.optional,\n data: apiCheck.object.optional,\n templateOptions: apiCheck.object.optional,\n wrapper: specifyWrapperType.optional,\n modelOptions: apiCheck.shape({\n updateOn: apiCheck.string.optional,\n debounce: apiCheck.oneOfType([\n apiCheck.objectOf(apiCheck.number), apiCheck.number\n ]).optional,\n allowInvalid: apiCheck.bool.optional,\n getterSetter: apiCheck.bool.optional,\n timezone: apiCheck.string.optional\n }).optional,\n watcher: apiCheck.typeOrArrayOf(\n apiCheck.shape({\n expression: formlyExpression.optional,\n listener: formlyExpression\n })\n ).optional,\n validators: validatorChecker.optional,\n asyncValidators: validatorChecker.optional,\n parsers: apiCheck.arrayOf(formlyExpression).optional,\n formatters: apiCheck.arrayOf(formlyExpression).optional,\n noFormControl: apiCheck.bool.optional,\n hide: apiCheck.bool.optional,\n hideExpression: formlyExpression.optional,\n ngModelAttrs: apiCheck.objectOf(apiCheck.shape({\n expression: apiCheck.shape.ifNot(['value', 'attribute', 'bound'], apiCheck.any).optional,\n value: apiCheck.shape.ifNot('expression', apiCheck.any).optional,\n attribute: apiCheck.shape.ifNot('expression', apiCheck.any).optional,\n bound: apiCheck.shape.ifNot('expression', apiCheck.any).optional\n }).strict).optional,\n elementAttributes: apiCheck.objectOf(apiCheck.string).optional,\n optionsTypes: apiCheck.typeOrArrayOf(apiCheck.string).optional,\n link: apiCheck.func.optional,\n controller: apiCheck.oneOfType([\n apiCheck.string, apiCheck.func, apiCheck.array\n ]).optional,\n validation: apiCheck.shape({\n show: nullable(apiCheck.bool).optional,\n messages: apiCheck.objectOf(formlyExpression).optional,\n errorExistsAndShouldBeVisible: apiCheck.bool.optional\n }).optional,\n formControl: apiCheck.typeOrArrayOf(apiCheck.object).optional,\n value: apiCheck.func.optional,\n runExpressions: apiCheck.func.optional,\n templateManipulators: templateManipulators.optional,\n resetModel: apiCheck.func.optional,\n updateInitialValue: apiCheck.func.optional,\n initialValue: apiCheck.any.optional,\n defaultValue: apiCheck.any.optional\n};\n\n\nconst formlyFieldOptions = apiCheck.shape(fieldOptionsApiShape).strict;\n\n\nconst formOptionsApi = apiCheck.shape({\n formState: apiCheck.object.optional,\n resetModel: apiCheck.func.optional,\n updateInitialValue: apiCheck.func.optional,\n removeChromeAutoComplete: apiCheck.bool.optional,\n templateManipulators: templateManipulators.optional,\n wrapper: specifyWrapperType.optional,\n fieldTransform: apiCheck.func.optional,\n data: apiCheck.object.optional\n}).strict;\n\n\nconst fieldGroup = apiCheck.shape({\n $$hashKey: apiCheck.any.optional,\n key: apiCheck.oneOfType([apiCheck.string, apiCheck.number]).optional,\n // danger. Nested field groups wont get api-checked...\n fieldGroup: apiCheck.arrayOf(apiCheck.oneOfType([formlyFieldOptions, apiCheck.object])),\n className: apiCheck.string.optional,\n options: formOptionsApi.optional,\n hide: apiCheck.bool.optional,\n hideExpression: formlyExpression.optional,\n data: apiCheck.object.optional,\n model: modelChecker.optional,\n form: apiCheck.object.optional,\n elementAttributes: apiCheck.objectOf(apiCheck.string).optional\n}).strict;\n\nconst typeOptionsDefaultOptions = angular.copy(fieldOptionsApiShape);\ntypeOptionsDefaultOptions.key = apiCheck.string.optional;\n\nconst formlyTypeOptions = apiCheck.shape({\n name: apiCheck.string,\n template: apiCheck.shape.ifNot('templateUrl', apiCheck.oneOfType([apiCheck.string, apiCheck.func])).optional,\n templateUrl: apiCheck.shape.ifNot('template', apiCheck.oneOfType([apiCheck.string, apiCheck.func])).optional,\n controller: apiCheck.oneOfType([\n apiCheck.func, apiCheck.string, apiCheck.array\n ]).optional,\n link: apiCheck.func.optional,\n defaultOptions: apiCheck.oneOfType([\n apiCheck.func, apiCheck.shape(typeOptionsDefaultOptions)\n ]).optional,\n extends: apiCheck.string.optional,\n wrapper: specifyWrapperType.optional,\n data: apiCheck.object.optional,\n validateOptions: apiCheck.func.optional,\n apiCheck: apiCheckProperty.optional,\n apiCheckInstance: apiCheckInstanceProperty.optional,\n apiCheckFunction: apiCheckFunctionProperty.optional,\n apiCheckOptions: apiCheck.object.optional,\n overwriteOk: apiCheck.bool.optional\n}).strict;\n\nangular.extend(apiCheck, {\n formlyTypeOptions, formlyFieldOptions, formlyExpression, formlyWrapperType, fieldGroup, formOptionsApi\n});\n\nexport default apiCheck;\n\n\n\n/** WEBPACK FOOTER **\n ** ../~/eslint-loader!./providers/formlyApiCheck.js\n **/","import angular from 'angular-fix';\nimport utils from '../other/utils';\n\nexport default formlyConfig;\n\n// @ngInject\nfunction formlyConfig(formlyUsabilityProvider, formlyErrorAndWarningsUrlPrefix, formlyApiCheck) {\n\n const typeMap = {};\n const templateWrappersMap = {};\n const defaultWrapperName = 'default';\n const _this = this;\n const getError = formlyUsabilityProvider.getFormlyError;\n\n angular.extend(this, {\n setType,\n getType,\n getTypeHeritage,\n setWrapper,\n getWrapper,\n getWrapperByType,\n removeWrapperByName,\n removeWrappersForType,\n disableWarnings: false,\n extras: {\n disableNgModelAttrsManipulator: false,\n ngModelAttrsManipulatorPreferUnbound: false,\n removeChromeAutoComplete: false,\n defaultHideDirective: 'ng-if',\n getFieldId: null,\n explicitAsync: false\n },\n templateManipulators: {\n preWrapper: [],\n postWrapper: []\n },\n $get: () => this\n });\n\n function setType(options) {\n if (angular.isArray(options)) {\n const allTypes = [];\n angular.forEach(options, item => {\n allTypes.push(setType(item));\n });\n return allTypes;\n } else if (angular.isObject(options)) {\n checkType(options);\n if (options.extends) {\n extendTypeOptions(options);\n }\n typeMap[options.name] = options;\n return typeMap[options.name];\n } else {\n throw getError(`You must provide an object or array for setType. You provided: ${JSON.stringify(arguments)}`);\n }\n }\n\n function checkType(options) {\n formlyApiCheck.throw(formlyApiCheck.formlyTypeOptions, options, {\n prefix: 'formlyConfig.setType',\n url: 'settype-validation-failed'\n });\n checkApiCheck(options);\n if (!options.overwriteOk) {\n checkOverwrite(options.name, typeMap, options, 'types');\n } else {\n options.overwriteOk = undefined;\n }\n }\n\n function extendTypeOptions(options) {\n const extendsType = getType(options.extends, true, options);\n extendTypeControllerFunction(options, extendsType);\n extendTypeLinkFunction(options, extendsType);\n extendTypeValidateOptionsFunction(options, extendsType);\n extendTypeDefaultOptions(options, extendsType);\n utils.reverseDeepMerge(options, extendsType);\n extendTemplate(options, extendsType);\n }\n\n function extendTemplate(options, extendsType) {\n if (options.template && extendsType.templateUrl) {\n delete options.templateUrl;\n } else if (options.templateUrl && extendsType.template) {\n delete options.template;\n }\n }\n\n function extendTypeControllerFunction(options, extendsType) {\n const extendsCtrl = extendsType.controller;\n if (!angular.isDefined(extendsCtrl)) {\n return;\n }\n const optionsCtrl = options.controller;\n if (angular.isDefined(optionsCtrl)) {\n options.controller = function($scope, $controller) {\n $controller(extendsCtrl, {$scope});\n $controller(optionsCtrl, {$scope});\n };\n options.controller.$inject = ['$scope', '$controller'];\n } else {\n options.controller = extendsCtrl;\n }\n }\n\n function extendTypeLinkFunction(options, extendsType) {\n const extendsFn = extendsType.link;\n if (!angular.isDefined(extendsFn)) {\n return;\n }\n const optionsFn = options.link;\n if (angular.isDefined(optionsFn)) {\n options.link = function() {\n extendsFn(...arguments);\n optionsFn(...arguments);\n };\n } else {\n options.link = extendsFn;\n }\n }\n\n function extendTypeValidateOptionsFunction(options, extendsType) {\n const extendsFn = extendsType.validateOptions;\n if (!angular.isDefined(extendsFn)) {\n return;\n }\n const optionsFn = options.validateOptions;\n const originalDefaultOptions = options.defaultOptions;\n if (angular.isDefined(optionsFn)) {\n options.validateOptions = function(opts) {\n optionsFn(opts);\n const mergedOptions = angular.copy(opts);\n let defaultOptions = originalDefaultOptions;\n if (defaultOptions) {\n if (angular.isFunction(defaultOptions)) {\n defaultOptions = defaultOptions(mergedOptions);\n }\n utils.reverseDeepMerge(mergedOptions, defaultOptions);\n }\n extendsFn(mergedOptions);\n };\n } else {\n options.validateOptions = extendsFn;\n }\n }\n\n function extendTypeDefaultOptions(options, extendsType) {\n const extendsDO = extendsType.defaultOptions;\n if (!angular.isDefined(extendsDO)) {\n return;\n }\n const optionsDO = options.defaultOptions;\n const optionsDOIsFn = angular.isFunction(optionsDO);\n const extendsDOIsFn = angular.isFunction(extendsDO);\n if (extendsDOIsFn) {\n options.defaultOptions = function defaultOptions(opts) {\n const extendsDefaultOptions = extendsDO(opts);\n const mergedDefaultOptions = {};\n utils.reverseDeepMerge(mergedDefaultOptions, opts, extendsDefaultOptions);\n let extenderOptionsDefaultOptions = optionsDO;\n if (optionsDOIsFn) {\n extenderOptionsDefaultOptions = extenderOptionsDefaultOptions(mergedDefaultOptions);\n }\n utils.reverseDeepMerge(extendsDefaultOptions, extenderOptionsDefaultOptions);\n return extendsDefaultOptions;\n };\n } else if (optionsDOIsFn) {\n options.defaultOptions = function defaultOptions(opts) {\n const newDefaultOptions = {};\n utils.reverseDeepMerge(newDefaultOptions, opts, extendsDO);\n return optionsDO(newDefaultOptions);\n };\n }\n }\n\n function getType(name, throwError, errorContext) {\n if (!name) {\n return undefined;\n }\n const type = typeMap[name];\n if (!type && throwError === true) {\n throw getError(\n `There is no type by the name of \"${name}\": ${JSON.stringify(errorContext)}`\n );\n } else {\n return type;\n }\n }\n\n function getTypeHeritage(parent) {\n const heritage = [];\n let type = parent;\n if (angular.isString(type)) {\n type = getType(parent);\n }\n parent = type.extends;\n while (parent) {\n type = getType(parent);\n heritage.push(type);\n parent = type.extends;\n }\n return heritage;\n }\n\n\n function setWrapper(options, name) {\n if (angular.isArray(options)) {\n return options.map(wrapperOptions => setWrapper(wrapperOptions));\n } else if (angular.isObject(options)) {\n options.types = getOptionsTypes(options);\n options.name = getOptionsName(options, name);\n checkWrapperAPI(options);\n templateWrappersMap[options.name] = options;\n return options;\n } else if (angular.isString(options)) {\n return setWrapper({\n template: options,\n name\n });\n }\n }\n\n function getOptionsTypes(options) {\n if (angular.isString(options.types)) {\n return [options.types];\n }\n if (!angular.isDefined(options.types)) {\n return [];\n } else {\n return options.types;\n }\n }\n\n function getOptionsName(options, name) {\n return options.name || name || options.types.join(' ') || defaultWrapperName;\n }\n\n function checkWrapperAPI(options) {\n formlyUsabilityProvider.checkWrapper(options);\n if (options.template) {\n formlyUsabilityProvider.checkWrapperTemplate(options.template, options);\n }\n checkApiCheck(options);\n if (!options.overwriteOk) {\n checkOverwrite(options.name, templateWrappersMap, options, 'templateWrappers');\n } else {\n delete options.overwriteOk;\n }\n checkWrapperTypes(options);\n }\n\n function checkWrapperTypes(options) {\n const shouldThrow = !angular.isArray(options.types) || !options.types.every(angular.isString);\n if (shouldThrow) {\n throw getError(`Attempted to create a template wrapper with types that is not a string or an array of strings`);\n }\n }\n\n function checkOverwrite(property, object, newValue, objectName) {\n if (object.hasOwnProperty(property)) {\n warn('overwriting-types-or-wrappers', [\n `Attempting to overwrite ${property} on ${objectName} which is currently`,\n `${JSON.stringify(object[property])} with ${JSON.stringify(newValue)}`,\n `To supress this warning, specify the property \"overwriteOk: true\"`\n ].join(' '));\n }\n }\n\n function checkApiCheck(options) {\n if (options.apiCheck && !angular.isFunction(options.apiCheck)) {\n warn(\n 'apicheck-as-an-object-deprecated',\n 'apiCheck as an object has been deprecated',\n `Attempted for type: ${options.name}`,\n options\n );\n }\n }\n\n function getWrapper(name) {\n return templateWrappersMap[name || defaultWrapperName];\n }\n\n function getWrapperByType(type) {\n /* eslint prefer-const:0 */\n const wrappers = [];\n for (let name in templateWrappersMap) {\n if (templateWrappersMap.hasOwnProperty(name)) {\n if (templateWrappersMap[name].types && templateWrappersMap[name].types.indexOf(type) !== -1) {\n wrappers.push(templateWrappersMap[name]);\n }\n }\n }\n return wrappers;\n }\n\n function removeWrapperByName(name) {\n const wrapper = templateWrappersMap[name];\n delete templateWrappersMap[name];\n return wrapper;\n }\n\n function removeWrappersForType(type) {\n const wrappers = getWrapperByType(type);\n if (!wrappers) {\n return undefined;\n }\n if (!angular.isArray(wrappers)) {\n return removeWrapperByName(wrappers.name);\n } else {\n wrappers.forEach((wrapper) => removeWrapperByName(wrapper.name));\n return wrappers;\n }\n }\n\n\n function warn() {\n if (!_this.disableWarnings && console.warn) {\n /* eslint no-console:0 */\n const args = Array.prototype.slice.call(arguments);\n const warnInfoSlug = args.shift();\n args.unshift('Formly Warning:');\n args.push(`${formlyErrorAndWarningsUrlPrefix}${warnInfoSlug}`);\n console.warn(...args);\n }\n }\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ../~/eslint-loader!./providers/formlyConfig.js\n **/","import angular from 'angular-fix';\n\nexport default formlyUsability;\n\n// @ngInject\nfunction formlyUsability(formlyApiCheck, formlyErrorAndWarningsUrlPrefix) {\n angular.extend(this, {\n getFormlyError,\n getFieldError,\n checkWrapper,\n checkWrapperTemplate,\n getErrorMessage,\n $get: () => this\n });\n\n function getFieldError(errorInfoSlug, message, field) {\n if (arguments.length < 3) {\n field = message;\n message = errorInfoSlug;\n errorInfoSlug = null;\n }\n return new Error(getErrorMessage(errorInfoSlug, message) + ` Field definition: ${angular.toJson(field)}`);\n }\n\n function getFormlyError(errorInfoSlug, message) {\n if (!message) {\n message = errorInfoSlug;\n errorInfoSlug = null;\n }\n return new Error(getErrorMessage(errorInfoSlug, message));\n }\n\n function getErrorMessage(errorInfoSlug, message) {\n let url = '';\n if (errorInfoSlug !== null) {\n url = `${formlyErrorAndWarningsUrlPrefix}${errorInfoSlug}`;\n }\n return `Formly Error: ${message}. ${url}`;\n }\n\n function checkWrapper(wrapper) {\n formlyApiCheck.throw(formlyApiCheck.formlyWrapperType, wrapper, {\n prefix: 'formlyConfig.setWrapper',\n urlSuffix: 'setwrapper-validation-failed'\n });\n }\n\n function checkWrapperTemplate(template, additionalInfo) {\n const formlyTransclude = '';\n if (template.indexOf(formlyTransclude) === -1) {\n throw getFormlyError(\n `Template wrapper templates must use \"${formlyTransclude}\" somewhere in them. ` +\n `This one does not have \"\" in it: ${template}` + '\\n' +\n `Additional information: ${JSON.stringify(additionalInfo)}`\n );\n }\n }\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ../~/eslint-loader!./providers/formlyUsability.js\n **/","export default formlyValidationMessages;\n\n\n// @ngInject\nfunction formlyValidationMessages() {\n\n const validationMessages = {\n addTemplateOptionValueMessage,\n addStringMessage,\n messages: {}\n };\n\n return validationMessages;\n\n function addTemplateOptionValueMessage(name, prop, prefix, suffix, alternate) {\n validationMessages.messages[name] = templateOptionValue(prop, prefix, suffix, alternate);\n }\n\n function addStringMessage(name, string) {\n validationMessages.messages[name] = () => string;\n }\n\n\n function templateOptionValue(prop, prefix, suffix, alternate) {\n return function getValidationMessage(viewValue, modelValue, scope) {\n if (scope.options.templateOptions[prop]) {\n return `${prefix} ${scope.options.templateOptions[prop]} ${suffix}`;\n } else {\n return alternate;\n }\n };\n }\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ../~/eslint-loader!./providers/formlyValidationMessages.js\n **/","import angular from 'angular-fix';\nexport default addCustomTags;\n\n// @ngInject\nfunction addCustomTags($document) {\n if ($document && $document.get) {\n // IE8 check ->\n // http://stackoverflow.com/questions/10964966/detect-ie-version-prior-to-v9-in-javascript/10965203#10965203\n const document = $document.get(0);\n const div = document.createElement('div');\n div.innerHTML = '';\n const isIeLessThan9 = (div.getElementsByTagName('i').length === 1);\n\n if (isIeLessThan9) {\n // add the custom elements that we need for formly\n const customElements = [\n 'formly-field', 'formly-form', 'formly-custom-validation', 'formly-focus', 'formly-transpose'\n ];\n angular.forEach(customElements, el => {\n document.createElement(el);\n });\n }\n }\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ../~/eslint-loader!./run/formlyCustomTags.js\n **/","import angular from 'angular-fix';\n\nexport default addFormlyNgModelAttrsManipulator;\n\n// @ngInject\nfunction addFormlyNgModelAttrsManipulator(formlyConfig, $interpolate, formlyWarn) {\n if (formlyConfig.extras.disableNgModelAttrsManipulator) {\n return;\n }\n formlyConfig.templateManipulators.preWrapper.push(ngModelAttrsManipulator);\n\n\n function ngModelAttrsManipulator(template, options, scope) {\n const node = document.createElement('div');\n const skip = getSkip(options);\n if (skip === true) {\n return template;\n }\n node.innerHTML = template;\n\n const modelNodes = getNgModelNodes(node, skip);\n if (!modelNodes || !modelNodes.length) {\n return template;\n }\n\n addIfNotPresent(modelNodes, 'id', scope.id);\n addIfNotPresent(modelNodes, 'name', scope.name || scope.id);\n\n addValidation();\n addModelOptions();\n addTemplateOptionsAttrs();\n\n\n return node.innerHTML;\n\n\n function addValidation() {\n if (angular.isDefined(options.validators) || angular.isDefined(options.validation.messages)) {\n addIfNotPresent(modelNodes, 'formly-custom-validation', '');\n }\n }\n\n function addModelOptions() {\n if (angular.isDefined(options.modelOptions)) {\n addIfNotPresent(modelNodes, 'ng-model-options', 'options.modelOptions');\n if (options.modelOptions.getterSetter) {\n angular.forEach(modelNodes, modelNode => {\n modelNode.setAttribute('ng-model', 'options.value');\n });\n }\n }\n }\n\n function addTemplateOptionsAttrs() {\n if (!options.templateOptions && !options.expressionProperties) {\n // no need to run these if there are no templateOptions or expressionProperties\n return;\n }\n const to = options.templateOptions || {};\n const ep = options.expressionProperties || {};\n\n const ngModelAttributes = getBuiltInAttributes();\n\n // extend with the user's specifications winning\n angular.extend(ngModelAttributes, options.ngModelAttrs);\n\n // Feel free to make this more simple :-)\n angular.forEach(ngModelAttributes, (val, name) => {\n /* eslint complexity:[2, 14] */\n let attrVal, attrName;\n const ref = `options.templateOptions['${name}']`;\n const toVal = to[name];\n const epVal = getEpValue(ep, name);\n\n const inTo = angular.isDefined(toVal);\n const inEp = angular.isDefined(epVal);\n if (val.value) {\n // I realize this looks backwards, but it's right, trust me...\n attrName = val.value;\n attrVal = name;\n } else if (val.expression && inTo) {\n attrName = val.expression;\n if (angular.isString(to[name])) {\n attrVal = `$eval(${ref})`;\n } else if (angular.isFunction(to[name])) {\n attrVal = `${ref}(model[options.key], options, this, $event)`;\n } else {\n throw new Error(\n `options.templateOptions.${name} must be a string or function: ${JSON.stringify(options)}`\n );\n }\n } else if (val.bound && inEp) {\n attrName = val.bound;\n attrVal = ref;\n } else if ((val.attribute || val.boolean) && inEp) {\n attrName = val.attribute || val.boolean;\n attrVal = `${$interpolate.startSymbol()}${ref}${$interpolate.endSymbol()}`;\n } else if (val.attribute && inTo) {\n attrName = val.attribute;\n attrVal = toVal;\n } else if (val.boolean) {\n if (inTo && !inEp && toVal) {\n attrName = val.boolean;\n attrVal = true;\n } else {\n /* eslint no-empty:0 */\n // empty to illustrate that a boolean will not be added via val.bound\n // if you want it added via val.bound, then put it in expressionProperties\n }\n } else if (val.bound && inTo) {\n attrName = val.bound;\n attrVal = ref;\n }\n\n if (angular.isDefined(attrName) && angular.isDefined(attrVal)) {\n addIfNotPresent(modelNodes, attrName, attrVal);\n }\n });\n }\n }\n\n // Utility functions\n function getNgModelNodes(node, skip) {\n const selectorNot = angular.isString(skip) ? `:not(${skip})` : '';\n const skipNot = ':not([formly-skip-ng-model-attrs-manipulator])';\n const query = `[ng-model]${selectorNot}${skipNot}, [data-ng-model]${selectorNot}${skipNot}`;\n try {\n return node.querySelectorAll(query);\n } catch (e) {\n //this code is needed for IE8, as it does not support the CSS3 ':not' selector\n //it should be removed when IE8 support is dropped\n return getNgModelNodesFallback(node, skip);\n }\n }\n\n function getNgModelNodesFallback(node, skip) {\n const allNgModelNodes = node.querySelectorAll('[ng-model], [data-ng-model]');\n const matchingNgModelNodes = [];\n\n //make sure this array is compatible with NodeList type by adding an 'item' function\n matchingNgModelNodes.item = function(i) {\n return this[i];\n };\n\n for (let i = 0; i < allNgModelNodes.length; i++) {\n const ngModelNode = allNgModelNodes[i];\n if (!ngModelNode.hasAttribute('formly-skip-ng-model-attrs-manipulator') &&\n !(angular.isString(skip) && nodeMatches(ngModelNode, skip))) {\n matchingNgModelNodes.push(ngModelNode);\n }\n }\n\n return matchingNgModelNodes;\n }\n\n function nodeMatches(node, selector) {\n const div = document.createElement('div');\n div.innerHTML = node.outerHTML;\n return div.querySelector(selector);\n }\n\n function getSkip(options) {\n // UPDATE IN 7.0.0\n let skip = options.extras && options.extras.skipNgModelAttrsManipulator;\n if (!angular.isDefined(skip)) {\n skip = options.data && options.data.skipNgModelAttrsManipulator;\n if (angular.isDefined(skip)) {\n formlyWarn(\n 'skipngmodelattrsmanipulator-moved',\n 'The skipNgModelAttrsManipulator property has been moved from the `data` property to the `extras` property',\n options\n );\n }\n }\n return skip;\n }\n\n function getBuiltInAttributes() {\n const ngModelAttributes = {\n focus: {\n attribute: 'formly-focus'\n }\n };\n const boundOnly = [];\n const bothBooleanAndBound = ['required', 'disabled'];\n const bothAttributeAndBound = ['pattern', 'minlength'];\n const expressionOnly = ['change', 'keydown', 'keyup', 'keypress', 'click', 'focus', 'blur'];\n const attributeOnly = ['placeholder', 'min', 'max', 'tabindex', 'type'];\n if (formlyConfig.extras.ngModelAttrsManipulatorPreferUnbound) {\n bothAttributeAndBound.push('maxlength');\n } else {\n boundOnly.push('maxlength');\n }\n\n angular.forEach(boundOnly, item => {\n ngModelAttributes[item] = {bound: 'ng-' + item};\n });\n\n angular.forEach(bothBooleanAndBound, item => {\n ngModelAttributes[item] = {boolean: item, bound: 'ng-' + item};\n });\n\n angular.forEach(bothAttributeAndBound, item => {\n ngModelAttributes[item] = {attribute: item, bound: 'ng-' + item};\n });\n\n angular.forEach(expressionOnly, item => {\n const propName = 'on' + item.substr(0, 1).toUpperCase() + item.substr(1);\n ngModelAttributes[propName] = {expression: 'ng-' + item};\n });\n\n angular.forEach(attributeOnly, item => {\n ngModelAttributes[item] = {attribute: item};\n });\n return ngModelAttributes;\n }\n\n function getEpValue(ep, name) {\n return ep['templateOptions.' + name] ||\n ep[`templateOptions['${name}']`] ||\n ep[`templateOptions[\"${name}\"]`];\n }\n\n function addIfNotPresent(nodes, attr, val) {\n angular.forEach(nodes, node => {\n if (!node.getAttribute(attr)) {\n node.setAttribute(attr, val);\n }\n });\n }\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ../~/eslint-loader!./run/formlyNgModelAttrsManipulator.js\n **/","import utils from '../other/utils';\n\nexport default formlyUtil;\n\n// @ngInject\nfunction formlyUtil() {\n return utils;\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ../~/eslint-loader!./services/formlyUtil.js\n **/","export default formlyWarn;\n\n// @ngInject\nfunction formlyWarn(formlyConfig, formlyErrorAndWarningsUrlPrefix, $log) {\n return function warn() {\n if (!formlyConfig.disableWarnings) {\n const args = Array.prototype.slice.call(arguments);\n const warnInfoSlug = args.shift();\n args.unshift('Formly Warning:');\n args.push(`${formlyErrorAndWarningsUrlPrefix}${warnInfoSlug}`);\n $log.warn(...args);\n }\n };\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ../~/eslint-loader!./services/formlyWarn.js\n **/","module.exports = __WEBPACK_EXTERNAL_MODULE_18__;\n\n\n/*****************\n ** WEBPACK FOOTER\n ** external \"angular\"\n ** module id = 18\n ** module chunks = 0\n **/"],"sourceRoot":""}