(window.multistep_editor_jsonpFunction=window.multistep_editor_jsonpFunction||[]).push([[28],{936:function(t,e,n){"use strict";n.r(e),n.d(e,"AuWidgetFunctionTrigger",function(){return a}),n.d(e,"widget",function(){return a});var c=n(0),r=n(2),i=(n(200),n(1)),o=n(35),a=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.enabled=!0,e._callbackPending=!1,e._lockList=[],e._finally=function(){return Promise.resolve()},e._catch=function(){return Promise.reject()},e._callback=function(){return Promise.resolve()},e}return Object(c.d)(e,t),e.prototype._callbackPendingObserver=function(t){this._showPreloader(t)},e.prototype.updateParams=function(t){var e=o.Maybe.maybe(t);this.enabled=e.bind(function(t){return i.a.maybeGet(function(){return t.enabled})}).valueOr(this.enabled),this._lockList=e.bind(function(t){return i.a.maybeGet(function(){return t.lock})}).map(function(t){return i.a.ensureArray(t)}).valueOr(this._lockList),this._finally=i.a.functionWrapperConstructor(t.finally),this._catch=i.a.functionWrapperConstructor(t.catch),this._callback=i.a.functionWrapperConstructor(t.callback)},e.prototype.updateParamsAsync=function(e){return Object(c.b)(this,void 0,void 0,function(){var n;return Object(c.e)(this,function(r){switch(r.label){case 0:return[4,t.prototype.updateParamsAsync.call(this,e)];case 1:if(r.sent(),!this.enabled)return[2,Promise.resolve(null)];this._callbackPending=!0,r.label=2;case 2:return r.trys.push([2,4,5,6]),[4,this._callback.apply(this,Object(c.j)([],Object(c.h)(e.arguments),!1))];case 3:return r.sent(),[3,6];case 4:return n=r.sent(),console.error(n),this._catch(),[3,6];case 5:return this._finally(),this._callbackPending=!1,[7];case 6:return[2]}})})},e.prototype._showPreloader=function(t){var e=this;this._lockList.forEach(function(n){var c="main"===n?e.auWizard:e.auWizard.scope.$[n]||e.jsonParamsFetcher.scope[n]||e.jsonParamsFetcher.scope.$[n];c&&c.showPreloader(t)})},Object(c.c)([Object(r.c)(),Object(c.g)("design:type",Boolean)],e.prototype,"enabled",void 0),Object(c.c)([Object(r.c)(),Object(c.g)("design:type",Boolean)],e.prototype,"_callbackPending",void 0),Object(c.c)([Object(r.c)(),Object(c.g)("design:type",Array)],e.prototype,"_lockList",void 0),Object(c.c)([Object(r.c)(),Object(c.g)("design:type",Function)],e.prototype,"_finally",void 0),Object(c.c)([Object(r.c)(),Object(c.g)("design:type",Function)],e.prototype,"_catch",void 0),Object(c.c)([Object(r.c)(),Object(c.g)("design:type",Function)],e.prototype,"_callback",void 0),Object(c.c)([Object(r.b)("_callbackPending"),Object(c.g)("design:type",Function),Object(c.g)("design:paramtypes",[Boolean]),Object(c.g)("design:returntype",void 0)],e.prototype,"_callbackPendingObserver",null),e=Object(c.c)([Object(r.a)("au-widget-function-trigger")],e)}(n(160).a)}}]);