PageSourceSearch

https://assets.signup.com/assets/common-router-6dddaa78d4033d710ee…ed1b6312fb8d478563d61c05e07c01d2c16ccc2f.js

js signup.com collected 2026-09-24 08:42:52 UTC 135,558 bytes, 5 lines download raw bytes

1/*! For license information please see common-router.js.LICENSE.txt */
2(self.webpackChunkstationops_desktop=self.webpackChunkstationops_desktop||[]).push([[642],{4451(t,e,r){"use strict";r(6633),r(428);var n=r(8192),i=r.n(n),o=(r(943),r(2190),r(843),r(5660),r(2207),r(9677),r(7569),i().module("signup.upgradePrompt",["vspot","localization","vspot.services","ui.bootstrap","signup.stripeForm","ui.router","generic-confirm"]));o.controller("modalController",["$uibModalInstance","feature","user","usersPlan","tiers","groups","type","$timeout","services.Utilities","services.Login","services.Charges","$log","$stateParams","localize","services.Tracking","$rootScope",function(t,e,r,n,o,a,s,u,c,l,p,f,h,d,m,v){var g=this;g.featureName=e,g.userFeatureEnabled=!1,g.userFeatureCount=0,g.user=r,g.alreadyPremium=r&&r.loggedIn&&r.premium,g.usersPlan=n,g.tiers=o,g.groups=a,g.type=s,g.modalTitle="_UpgradeModalTitle_",g.modalErrorStr=null,g.modalBody=null,g.formData={promoCode:null,adFree:!0,adFreeOnly:!1,selectedPlan:null,selectedFreq:null},g.show={loading:!0,picker:!1,checkout:!1,complete:!1},g.error=null,g.promoEnabled=!0,g.promoCodeErrorCode=null,g.submitting=!1,g.activityId=void 0!==h.id?h.id:"",g.pubKey=null,g.subscriptionAmount=null,g.subscriptionDesc=null,g.subscriptionData=null,g.getLocalizedString=d.getLocalizedString,g.getFeatureData=function(t,e){for(var r={enabled:!1,count:0},n=0,i=t.length;n<i;n++)t[n].name===e&&(r.enabled=t[n].enabled,r.enabled&&(r.count=-1===t[n].count?1/0:t[n].count));return r};var y=g.getFeatureData(g.user.premiumData.features,g.featureName);g.userFeatureEnabled=y.enabled,g.userFeatureCount=y.count,g.tierAvailable=function(t){if(!t)return!1;var e=!1;if("PROFILE"===g.featureName)(g.user.premiumData.tier_level>3||t.tier_level>=g.user.premiumData.tier_level)&&(e=!0);else{var r=g.getFeatureData(t.features,g.featureName);r.enabled&&r.count>g.userFeatureCount&&(e=!0)}return e};for(var _=null,w=0,b=g.tiers.length;w<b;w++)g.tiers[w].tier_level>0&&g.tierAvailable(g.tiers[w])&&(_?g.tiers[w].tier_level<_.selectedTier&&(_=g.tiers[w]):_=g.tiers[w]);g.groups["level_"+_.tier_level]&&g.groups["level_"+_.tier_level].plans&&(g.groups["level_"+_.tier_level].plans.monthly?g.formData.selectedPlan=g.groups["level_"+_.tier_level].plans.monthly.premiumplan_id:g.groups["level_"+_.tier_level].plans.annual?g.formData.selectedPlan=g.groups["level_"+_.tier_level].plans.annual.premiumplan_id:f.error("Error! No selectable plans for:","level_"+_.tier_level)),g.featureData={EXTRA_FIELDS:{title:"_custom_fields_name_",description:"_custom_fields_description_",imgSource:"/imgs/elements/premium-icons/Add-Custom-Fields-icon.png",redirect:g.activityId?"/Activities?scrollTo=EXTRA_FIELDS#/"+g.activityId+"/details/edit":"/Dashboard",reload:!1,gaPageView:"custom_fields"},GROUP_PAGES:{title:"_group_pages_name_",description:"_group_pages_description_",imgSource:"/imgs/elements/premium-icons/Add-Group-Pages-icon.png",redirect:g.activityId?"/Dashboard?unlock="+g.activityId+"#/my-group-pages":"/Dashboard#/my-group-pages",reload:!1,gaPageView:"group_pages"},HOURS_TRACKING:{title:"_hours_tracking_name_",description:"_hours_tracking_description_",imgSource:"/imgs/elements/premium-icons/Hours-icon.png",redirect:g.activityId?"/Activities#/"+g.activityId+"/reports":"/Dashboard",reload:!0,gaPageView:"hours_tracking"},ADVANCED_REPORTING:{title:"_admin_reporting_name_",description:"_admin_reporting_description_",imgSource:"/imgs/elements/premium-icons/Reporting-icon.png",redirect:g.activityId?"/Dashboard?unlock="+g.activityId+"#/my-reports":"/Dashboard#/my-reports",reload:!1,gaPageView:"admin_reporting"},WAIVER:{title:"_waiver_name_",description:"_waiver_description_",imgSource:"/imgs/elements/premium-icons/Add-Waiver-icon.png",redirect:g.activityId?"/Activities#/"+g.activityId+"/waiver":"/Dashboard",reload:!0,gaPageView:"waiver"},ASST_ORGANIZER:{title:"_assistant_organizers_name_",description:"_assistant_organizers_description_",imgSource:"/imgs/elements/premium-icons/Add-Assitant-Organizer-icon.png",redirect:g.activityId?"/Activities?scrollTo=ASST_ORGANIZER#/"+g.activityId+"/details/edit":"/Dashboard",reload:!1,gaPageView:"assistant_organizers"},SIGNUP_LOCK:{title:"_premium_upgrade_signup_locking_title_",description:"_premium_upgrade_signup_locking_description_",imgSource:"/imgs/elements/premium-icons/Add-Scheduled-Locking.png",redirect:g.activityId?"/Activities#/"+g.activityId+"/locking":"/Dashboard",reload:!0,gaPageView:"signup_locking"},CHECKIN:{title:"_check_in_name_",description:"_check_in_description_",imgSource:"/imgs/elements/premium-icons/Add-Check-in-icon.png",redirect:"/checkin-landing",reload:!1,gaPageView:"check_in"},PROFILE:{title:"_UpgradeHeader_",description:"_premium_upgrade_form_upgrade_description_",imgSource:"/imgs/elements/premium-icons/Add-Profile-Upgrade-icon.png",redirect:g.activityId?"/Dashboard?unlock="+g.activityId:"/Dashboard",reload:!1,gaPageView:"profilePage"},LIMIT_SPOTS:{title:"_UpgradeHeader_",description:"_premium_upgrade_form_upgrade_description_",imgSource:"/imgs/elements/premium-icons/Add-Profile-Upgrade-icon.png",redirect:g.activityId?"/Activities#/"+g.activityId+"/details/edit":"/Dashboard",reload:!1,gaPageView:"limit_spots"},WAITLISTS:{title:"_UpgradeHeader_",description:"_premium_upgrade_form_upgrade_description_",imgSource:"/imgs/elements/premium-icons/Add-Profile-Upgrade-icon.png",redirect:g.activityId?"/Activities#/"+g.activityId+"/details/edit":"/Dashboard",reload:!1,gaPageView:"waitlist"}},g.updateSubscription=function(){var t=null,e=null;
2g.formData.selectedPlan&&(i().forEach(g.groups,function(r,n){t&&e||i().forEach(r.plans,function(r,n){r&&r.premiumplan_id===g.formData.selectedPlan&&(t=r.tier_level,e=n)}),t&&e||i().forEach(r.adFree,function(r,n){r&&r.premiumplan_id===g.formData.selectedPlan&&(t=r.tier_level,e=n)})}),t&&e&&(g.formData.adFree||g.formData.adFreeOnly?(g.formData.selectedPlan=g.groups["level_"+t].adFree[e].premiumplan_id,g.promoEnabled=g.groups["level_"+t].adFree[e].promos_allowed&&!g.alreadyPremium):null!==g.groups["level_"+t].plans[e]?(g.formData.selectedPlan=g.groups["level_"+t].plans[e].premiumplan_id,g.promoEnabled=g.groups["level_"+t].plans[e].promos_allowed&&!g.alreadyPremium):(g.formData.selectedPlan="",g.promoEnabled=""))),g.formData.selectedFreq=e},g.close=function(){t.close()},g.submit=function(t,e){g.submitting=!0,g.error=null,g.promoCodeErrorCode=null,u(function(){global_helper.blank(g.formData.promoCode)?S():c.validatePromoCode(g.formData.promoCode).$promise.then(function(t){t.status?"_UtilitiesIsPromoValidPromoIsOrganization_"===t.organization_message?v.ynConfirm({header:"_PremiumModalConfirmationTitle_",content:"_PremiumModalConfirmationBody_"}).result.then(function(t){t?S():g.close()}):S():(g.promoCodeErrorCode=t.code,g.submitting=!1)})})};var S=function(){m.trackPageview("/Upgrade/started/"+g.featureData[g.featureName].gaPageView,P)},P=function(){m.trackPageview("/Upgrade/"+g.formData.selectedFreq,E)},E=function(){var t={premium_level:g.formData.selectedPlan,promocode:g.formData.promoCode};l.stripePremiumReg(t).$promise.then(function(t){t.status?void 0===t.stripe_checkout_data&&void 0===t.stripe_subscription_data?g.subscriptionComplete(t):g.subscriptionSelected(t.stripe_checkout_data,t.stripe_subscription_data):g.error=t.message,g.submitting=!1})};g.subscriptionSelected=function(t,e){g.pubKey=t.key,g.subscriptionAmount=parseFloat(t.amount)/100,g.subscriptionDesc=t.description,g.subscriptionData=e,u(function(){g.show.loading=!1,g.show.picker=!1,g.show.checkout=!0,g.show.complete=!1})};var T=function(){g.modalTitle="_FormSuccess_",g.formData.promoCode?g.modalBody="_PremiumModalSuccessPromoMessage_":g.alreadyPremium?g.modalBody="_PremiumModalSuccessMessageExistingUser_":g.modalBody="_PremiumModalSuccessMessageNewUser_",g.nextPlace=null,g.show.loading=!1,g.show.picker=!1,g.show.checkout=!1,g.show.complete=!0};g.subscriptionComplete=function(t,e){void 0===e&&(e="checkout"),t.status?m.trackPageview("/login/premiumsuccess",T):(g.modalTitle="_Error_",g.modalBody="_PremiumModalErrorMessage_",g.nextPlace=e,t.message&&(g.modalErrorStr=t.message),u(function(){g.show.loading=!1,g.show.picker=!1,g.show.checkout=!1,g.show.complete=!0}))},g.goNext=function(){"checkout"===g.nextPlace||"picker"===g.nextPlace?u(function(){g.modalTitle="_UpgradeModalTitle_",g.show.loading=!1,g.show.picker="picker"===g.nextPlace,g.show.checkout="checkout"===g.nextPlace,g.show.complete=!1}):"icon"===g.type||"PROFILE"===g.featureName?(window.location=g.featureData[g.featureName].redirect,g.featureData[g.featureName].reload&&window.location.reload()):t.close(!0)},m.trackPageview("/premium_features/"+g.featureData[g.featureName].gaPageView,function(){g.show.loading=!1,g.show.picker=!0,g.show.checkout=!1,g.show.complete=!1,g.updateSubscription()})}]),o.filter("filterTier",function(){return function(t){for(var e=[],r=0;r<t.length;r++){var n=t[r];0!==n.tier_level&&n.tier_level<4&&e.push(n)}return e}}),o.component("upgradePrompt",{templateUrl:"/script/vspot-angular/components/premium/upgrade-prompt/upgrade-prompt.html",controller:["services.Utilities","$uibModal","$timeout","localize",function(t,e,r,n){var i=this;switch(i.getLocalizedString=n.getLocalizedString,i.showPrompt=!1,i.plans=null,i.groups=null,i.tiers=null,i.usersPlan=null,i.maxTier=0,void 0===i.type&&(i.type="button"),t.pricingPlans().$promise.then(function(t){if(t.status){var e;i.plans=t.plan_data,i.groups=t.groups,i.tiers=t.feature_tier_data,i.maxTier=t.maxTier,i.maxExtraFields=0;for(var n=0,o=i.tiers[i.maxTier].features.length;n<o;n++)if("EXTRA_FIELDS"===(e=i.tiers[i.maxTier].features[n]).name){i.maxExtraFields=e.count;break}if(i.user&&i.plans)for(var a=0,s=i.plans.length;a<s;a++)if(i.plans[a].premiumplan_id===i.user.premiumData.premiumplan_id){i.usersPlan=i.plans[a];break}var u=!1;i.user?(i.user.premiumData.tier_level>3||i.user.premiumData.tier_level<i.maxTier)&&(u=!0):u=!0,r(function(t){i.showPrompt=t},0,!0,u)}}),i.buttonText=null,i.buttonHelpText=null,i.iconText=null,i.iconImg=null,i.feature){case"GROUP_PAGES":i.buttonText="_GroupPagesPremiumPrompt_",i.buttonHelpText="_GroupPagesPremiumPromptInfo_",i.iconText="_GroupPagesIconText_",i.iconImg="/imgs/buttons/multiple-group-pages-btn-hover.png";break;case"EXTRA_FIELDS":i.buttonText="_AddFieldPrompt_",i.buttonHelpText="_AddFieldPremiumPrompt_",i.iconText="_AddFieldIconText_",i.iconImg="/imgs/buttons/custom-fields-btn-hover.png";break;case"ASST_ORGANIZER":i.buttonText="_AddCoOrganizerPrompt_",i.buttonHelpText="_AddCoOrganizerPromptInfo_",i.iconText="_AddCoOrganizerIconText_",i.iconImg="/imgs/buttons/add-organizer-btn-hover.png";break;case"HOURS_TRACKING":i.buttonText="_HoursPremiumPrompt_",i.buttonHelpText="_HoursPremiumPromptInfo_",i.iconText="_HoursIconText_",i.iconImg="/imgs/buttons/participant-hours-tracking-btn-hover.png";break;case"CHECKIN":i.buttonText="_CheckInPremiumPrompt_",i.buttonHelpText="_CheckInPremiumPromptInfo_",i.iconText="_CheckInIconText_",i.iconImg="/imgs/buttons/checkin-btn-hover.png";break;case"WAIVER":i.buttonText="_WaiverPremiumPrompt_",i.buttonHelpText="_WaiverPremiumPromptInfo_",i.iconText="_WaiverIconText_",i.iconImg="/imgs/buttons/add-waiver-btn-hover.png";break;case"SIGNUP_LOCK":i.buttonText="_SignUpLockingPremiumPromptInfo_",i.buttonHelpText="_SignUpLockingPremiumPrompt_",i.iconText="_SignUpLockingIconText_",i.iconImg="/imgs/buttons/lock-unlock-btn-hover.png";break;case"ADVANCED_REPORTING":i.buttonText="_SuperUserReportsPremiumPrompt_",i.buttonHelpText="_SuperUserReportsPremiumPromptInfo_",i.iconText="_SuperUserReportsIconText_",i.iconImg="/imgs/buttons/advanced-reporting-btn-hover.png";break;case"PROFILE":i.buttonText="_UpgradeBtnFromProfile_",i.buttonHelpText="_UpgradeProfileHelpText_";break;case"LIMIT_SPOTS":i.buttonText="_LimitSpotsPremiumPrompt_",i.buttonHelpText="_LimitSpotsPremiumPromptInfo_";break;case"WAITLISTS":i.buttonText="_WaitlistPremiumPrompt_",i.buttonHelpText="_WaitlistPremiumPromptInfo_"}i.showModal=function(){e.open({templateUrl:"/script/vspot-angular/components/premium/upgrade-prompt/upgrade-prompt-modal.html",controller:"modalController",controllerAs:"mod",backdrop:"static",keyboard:!1,windowClass:"upgrade-prompt-modal",resolve:{feature:function(){return i.feature},user:function(){return i.user},usersPlan:function(){return i.usersPlan},tiers:function(){return i.tiers},groups:function(){return i.groups},type:function(){return i.type}}}).result.then(function(t){t&&location.reload(!1)})}}],bindings:{user:"=",feature:"@",type:"@"}}),r(1861)},6633(t,e,r){!function(t,e){"use strict";var n=angular,i=e&&e.module?e:n;function o(t){var e=[].slice.apply(arguments,[1]),r=t.length;return function e(n){return n.length>=r?t.apply(null,n):function(){return e(n.concat([].slice.apply(arguments)))}}(e)}function a(){var t=arguments,e=t.length-1;return function(){for(var r=e,n=t[e].apply(this,arguments);r--;)n=t[r].call(this,n);return n}}function s(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return a.apply(null,[].slice.call(arguments).reverse())}var u=function(t){return function(e){return e&&e[t]}},c=o(function(t,e,r){return r&&r[t]===e}),l=function(t){return s.apply(null,t.split(".").map(u))},p=function(t){return function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return!t.apply(null,e)}};function f(t,e){return function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return t.apply(null,r)&&e.apply(null,r)}}function h(t,e){return function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];
2return t.apply(null,r)||e.apply(null,r)}}var d=function(t){return function(e){return e.reduce(function(e,r){return e&&!!t(r)},!0)}},m=function(t){return function(e){return e.reduce(function(e,r){return e||!!t(r)},!1)}},v=function(t){return function(e){return null!=e&&e.constructor===t||e instanceof t}},g=function(t){return function(e){return t===e}},y=function(t){return function(){return t}};function _(t,e){return function(r){return r[t].apply(r,e)}}function w(t){return function(e){for(var r=0;r<t.length;r++)if(t[r][0](e))return t[r][1](e)}}var b=function(){function t(t){this.text=t,this.glob=t.split(".");var e=this.text.split(".").map(function(t){return"**"===t?"(?:|(?:\\.[^.]*)*)":"*"===t?"\\.[^.]*":"\\."+t}).join("");this.regexp=new RegExp("^"+e+"$")}return t.prototype.matches=function(t){return this.regexp.test("."+t)},t.is=function(t){return!!/[!,*]+/.exec(t)},t.fromString=function(e){return t.is(e)?new t(e):null},t}(),S=function(){function t(e){return t.create(e||{})}return t.create=function(e){e=t.isStateClass(e)?new e:e;var r=Z(Z(e,t.prototype));return e.$$state=function(){return r},r.self=e,r.__stateObjectCache={nameGlob:b.fromString(r.name)},r},t.prototype.is=function(t){return this===t||this.self===t||this.fqn()===t},t.prototype.fqn=function(){if(!(this.parent&&this.parent instanceof this.constructor))return this.name;var t=this.parent.fqn();return t?t+"."+this.name:this.name},t.prototype.root=function(){return this.parent&&this.parent.root()||this},t.prototype.parameters=function(t){return((t=ot(t,{inherit:!0,matchingKeys:null})).inherit&&this.parent&&this.parent.parameters()||[]).concat(mt(this.params)).filter(function(e){return!t.matchingKeys||t.matchingKeys.hasOwnProperty(e.id)})},t.prototype.parameter=function(t,e){return void 0===e&&(e={}),this.url&&this.url.parameter(t,e)||ft(mt(this.params),c("id",t))||e.inherit&&this.parent&&this.parent.parameter(t)},t.prototype.toString=function(){return this.fqn()},t.isStateClass=function(t){return C(t)&&!0===t.__uiRouterState},t.isState=function(t){return A(t.__stateObjectCache)},t}(),P=Object.prototype.toString,E=function(t){return function(e){return typeof e===t}},T=E("undefined"),R=p(T),$=function(t){return null===t},k=h($,T),C=E("function"),I=E("number"),x=E("string"),A=function(t){return null!==t&&"object"==typeof t},O=Array.isArray,D=function(t){return"[object Date]"===P.call(t)},H=function(t){return"[object RegExp]"===P.call(t)},V=S.isState;function F(t){if(O(t)&&t.length){var e=t.slice(0,-1),r=t.slice(-1);return!(e.filter(p(x)).length||r.filter(p(C)).length)}return C(t)}var U=f(A,s(u("then"),C)),N=function(t){return function(){throw new Error(t+"(): No coreservices implementation for UI-Router is loaded.")}},j={$q:void 0,$injector:void 0},L="object"==typeof self&&self.self===self&&self||"object"==typeof r.g&&r.g.global===r.g&&r.g||void 0,q=L.angular||{},M=q.fromJson||JSON.parse.bind(JSON),G=q.toJson||JSON.stringify.bind(JSON),z=q.forEach||function(t,e,r){if(O(t))return t.forEach(e,r);Object.keys(t).forEach(function(r){return e(t[r],r)})},B=Object.assign||At,W=q.equals||Ot;function K(t){return t}function J(){}function Q(t,e,r,n,i){void 0===i&&(i=!1);var o=function(e){return t()[e].bind(r())};return(n=n||Object.keys(t())).reduce(function(t,r){return t[r]=i?(n=r,function(){return e[n]=o(n),e[n].apply(null,arguments)}):o(r),t;var n},e)}var Z=function(t,e){return B(Object.create(t),e)},X=o(Y);function Y(t,e){return-1!==t.indexOf(e)}var tt=o(et);function et(t,e){var r=t.indexOf(e);return r>=0&&t.splice(r,1),t}var rt=o(nt);function nt(t,e){return t.push(e),e}var it=function(t){return t.slice().forEach(function(e){"function"==typeof e&&e(),tt(t,e)})};function ot(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];var n=e.concat({}).reverse(),i=B.apply(null,n);return B({},i,ut(t||{},Object.keys(i)))}var at=function(t,e){return B(t,e)};function st(t,e){var r=[];for(var n in t.path){if(t.path[n]!==e.path[n])break;r.push(t.path[n])}return r}function ut(t,e){var r={};for(var n in t)-1!==e.indexOf(n)&&(r[n]=t[n]);return r}function ct(t,e){return Object.keys(t).filter(p(X(e))).reduce(function(e,r){return e[r]=t[r],e},{})}function lt(t,e){return dt(t,u(e))}function pt(t,e){var r=O(t),n=r?[]:{},i=r?function(t){return n.push(t)}:function(t,e){return n[e]=t};return z(t,function(t,r){e(t,r)&&i(t,r)}),n}function ft(t,e){var r;return z(t,function(t,n){r||e(t,n)&&(r=t)}),r}var ht=dt;function dt(t,e){var r=O(t)?[]:{};return z(t,function(t,n){return r[n]=e(t,n)}),r}var mt=function(t){return Object.keys(t).map(function(e){return t[e]})},vt=function(t,e){return t&&e},gt=function(t,e){return t||e},yt=function(t,e){return t.concat(e)},_t=function(t,e){return O(e)?t.concat(e.reduce(_t,[])):wt(t,e)};function wt(t,e){return t.push(e),t}var bt=function(t,e){return X(t,e)?t:wt(t,e)},St=function(t){return t.reduce(yt,[])},Pt=function(t){return t.reduce(_t,[])},Et=Rt,Tt=Rt;function Rt(t,e){return void 0===e&&(e="assert failure"),function(r){var n=t(r);if(!n)throw new Error(C(e)?e(r):e);return n}}var $t=function(t){return Object.keys(t).map(function(e){return[e,t[e]
2]})};function kt(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(0===t.length)return[];var r,n=t.reduce(function(t,e){return Math.min(e.length,t)},9007199254740991),i=[];for(r=0;r<n;r++)switch(t.length){case 1:i.push([t[0][r]]);break;case 2:i.push([t[0][r],t[1][r]]);break;case 3:i.push([t[0][r],t[1][r],t[2][r]]);break;case 4:i.push([t[0][r],t[1][r],t[2][r],t[3][r]]);break;default:i.push(t.map(function(t){return t[r]}))}return i}function Ct(t,e){var r,n;if(O(e)&&(r=e[0],n=e[1]),!x(r))throw new Error("invalid parameters to applyPairs");return t[r]=n,t}function It(t){return t.length&&t[t.length-1]||void 0}function xt(t,e){return e&&Object.keys(e).forEach(function(t){return delete e[t]}),e||(e={}),B(e,t)}function At(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];if(r)for(var n=Object.keys(r),i=0;i<n.length;i++)t[n[i]]=r[n[i]]}return t}function Ot(t,e){if(t===e)return!0;if(null===t||null===e)return!1;if(t!=t&&e!=e)return!0;var r=typeof t;if(r!==typeof e||"object"!==r)return!1;var n,i,o=[t,e];if(d(O)(o))return i=e,(n=t).length===i.length&&kt(n,i).reduce(function(t,e){return t&&Ot(e[0],e[1])},!0);if(d(D)(o))return t.getTime()===e.getTime();if(d(H)(o))return t.toString()===e.toString();if(d(C)(o))return!0;if([C,O,D,H].map(m).reduce(function(t,e){return t||!!e(o)},!1))return!1;var a,s={};for(a in t){if(!Ot(t[a],e[a]))return!1;s[a]=!0}for(a in e)if(!s[a])return!1;return!0}var Dt,Ht=function(t){return t.catch(function(t){return 0})&&t},Vt=function(t){return Ht(j.$q.reject(t))},Ft=function(){function t(t,e){void 0===t&&(t=[]),void 0===e&&(e=null),this._items=t,this._limit=e}return t.prototype.enqueue=function(t){var e=this._items;return e.push(t),this._limit&&e.length>this._limit&&e.shift(),t},t.prototype.dequeue=function(){if(this.size())return this._items.splice(0,1)[0]},t.prototype.clear=function(){var t=this._items;return this._items=[],t},t.prototype.size=function(){return this._items.length},t.prototype.remove=function(t){var e=this._items.indexOf(t);return e>-1&&this._items.splice(e,1)[0]},t.prototype.peekTail=function(){return this._items[this._items.length-1]},t.prototype.peekHead=function(){if(this.size())return this._items[0]},t}();(Dt=t.RejectType||(t.RejectType={}))[Dt.SUPERSEDED=2]="SUPERSEDED",Dt[Dt.ABORTED=3]="ABORTED",Dt[Dt.INVALID=4]="INVALID",Dt[Dt.IGNORED=5]="IGNORED",Dt[Dt.ERROR=6]="ERROR";var Ut=0,Nt=function(){function e(t,e,r){this.$id=Ut++,this.type=t,this.message=e,this.detail=r}return e.prototype.toString=function(){var t,e=(t=this.detail)&&t.toString!==Object.prototype.toString?t.toString():Ie(t),r=this;return"Transition Rejection($id: "+r.$id+" type: "+r.type+", message: "+r.message+", detail: "+e+")"},e.prototype.toPromise=function(){return B(Vt(this),{_transitionRejection:this})},e.isRejectionPromise=function(t){return t&&"function"==typeof t.then&&v(e)(t._transitionRejection)},e.superseded=function(r,n){var i=new e(t.RejectType.SUPERSEDED,"The transition has been superseded by a different transition",r);return n&&n.redirected&&(i.redirected=!0),i},e.redirected=function(t){return e.superseded(t,{redirected:!0})},e.invalid=function(r){return new e(t.RejectType.INVALID,"This transition is invalid",r)},e.ignored=function(r){return new e(t.RejectType.IGNORED,"The transition was ignored",r)},e.aborted=function(r){return new e(t.RejectType.ABORTED,"The transition has been aborted",r)},e.errored=function(r){return new e(t.RejectType.ERROR,"The transition errored",r)},e.normalize=function(t){return v(e)(t)?t:e.errored(t)},e}();function jt(t){if(!t)return"ui-view (defunct)";var e=t.creationContext?t.creationContext.name||"(root)":"(none)";return"[ui-view#"+t.id+" "+t.$type+":"+t.fqn+" ("+t.name+"@"+e+")]"}function Lt(e){return I(e)?t.Category[e]:t.Category[t.Category[e]]}var qt,Mt=C(console.table)?console.table.bind(console):console.log.bind(console);(qt=t.Category||(t.Category={}))[qt.RESOLVE=0]="RESOLVE",qt[qt.TRANSITION=1]="TRANSITION",qt[qt.HOOK=2]="HOOK",qt[qt.UIVIEW=3]="UIVIEW",qt[qt.VIEWCONFIG=4]="VIEWCONFIG";var Gt,zt,Bt=l("$id"),Wt=l("router.$id"),Kt=function(t){return"Transition #"+Bt(t)+"-"+Wt(t)},Jt=function(){function e(){this._enabled={},this.approximateDigests=0}return e.prototype._set=function(e,r){var n=this;r.length||(r=Object.keys(t.Category).map(function(t){return parseInt(t,10)}).filter(function(t){return!isNaN(t)}).map(function(e){return t.Category[e]})),r.map(Lt).forEach(function(t){return n._enabled[t]=e})},e.prototype.enable=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._set(!0,t)},e.prototype.disable=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._set(!1,t)},e.prototype.enabled=function(t){return!!this._enabled[Lt(t)]},e.prototype.traceTransitionStart=function(e){this.enabled(t.Category.TRANSITION)&&console.log(Kt(e)+": Started  -> "+Ie(e))},e.prototype.traceTransitionIgnored=function(e){this.enabled(t.Category.TRANSITION)&&console.log(Kt(e)+": Ignored  <> "+Ie(e))},e.prototype.traceHookInvocation=function(e,r,n){if(this.enabled(t.Category.HOOK)){var i=l("traceData.hookType")(n)||"internal",o=l("traceData.context.state.name")(n)||l("traceData.context")(n)||"unknown",a=Re(e.registeredHook.callback);console.log(Kt(r)+":   Hook -> "+i+" context: "+o+", "+Pe(200,a))}},e.prototype.traceHookResult=function(e,r,n){this.enabled(t.Category.HOOK)&&console.log(Kt(r)+":   <- Hook returned: "+Pe(200,Ie(e)))},e.prototype.traceResolvePath=function(e,r,n){this.enabled(t.Category.RESOLVE)&&console.log(Kt(n)+":         Resolving "+e+" ("+r+")")},e.prototype.traceResolvableResolved=function(e,r){this.enabled(t.Category.RESOLVE)&&console.log(Kt(r)+":               <- Resolved  "+e+" to: "+Pe(200,Ie(e.data)))},e.prototype.traceError=function(e,r){this.enabled(t.Category.TRANSITION)&&console.log(Kt(r)+": <- Rejected "+Ie(r)+", reason: "+e)},e.prototype.traceSuccess=function(e,r){this.enabled(t.Category.TRANSITION)&&console.log(Kt(r)+": <- Success  "+Ie(r)+", final state: "+e.name)}
2,e.prototype.traceUIViewEvent=function(e,r,n){void 0===n&&(n=""),this.enabled(t.Category.UIVIEW)&&console.log("ui-view: "+Ee(30,e)+" "+jt(r)+n)},e.prototype.traceUIViewConfigUpdated=function(e,r){this.enabled(t.Category.UIVIEW)&&this.traceUIViewEvent("Updating",e," with ViewConfig from context='"+r+"'")},e.prototype.traceUIViewFill=function(e,r){this.enabled(t.Category.UIVIEW)&&this.traceUIViewEvent("Fill",e," with: "+Pe(200,r))},e.prototype.traceViewSync=function(e){if(this.enabled(t.Category.VIEWCONFIG)){var r=e.map(function(t){var e=t[0],r=t[1];return{"ui-view fqn":e.$type+":"+e.fqn,"state: view name":r&&r.viewDecl.$context.name+": "+r.viewDecl.$name+" ("+r.viewDecl.$type+")"}}).sort(function(t,e){return t["ui-view fqn"].localeCompare(e["ui-view fqn"])});Mt(r)}},e.prototype.traceViewServiceEvent=function(e,r){this.enabled(t.Category.VIEWCONFIG)&&console.log("VIEWCONFIG: "+e+" "+function(t){var e=t.viewDecl,r=e.$context.name||"(root)";return"[View#"+t.$id+" from '"+r+"' state]: target ui-view: '"+e.$uiViewName+"@"+e.$uiViewContextAnchor+"'"}(r))},e.prototype.traceViewServiceUIViewEvent=function(e,r){this.enabled(t.Category.VIEWCONFIG)&&console.log("VIEWCONFIG: "+e+" "+jt(r))},e}(),Qt=new Jt;(zt=t.TransitionHookPhase||(t.TransitionHookPhase={}))[zt.CREATE=0]="CREATE",zt[zt.BEFORE=1]="BEFORE",zt[zt.RUN=2]="RUN",zt[zt.SUCCESS=3]="SUCCESS",zt[zt.ERROR=4]="ERROR",(Gt=t.TransitionHookScope||(t.TransitionHookScope={}))[Gt.TRANSITION=0]="TRANSITION",Gt[Gt.STATE=1]="STATE";var Zt=function(){function t(t,e,r,n){this._stateRegistry=t,this._identifier=e,this._identifier=e,this._params=B({},r||{}),this._options=B({},n||{}),this._definition=t.matcher.find(e,this._options.relative)}return t.prototype.name=function(){return this._definition&&this._definition.name||this._identifier},t.prototype.identifier=function(){return this._identifier},t.prototype.params=function(){return this._params},t.prototype.$state=function(){return this._definition},t.prototype.state=function(){return this._definition&&this._definition.self},t.prototype.options=function(){return this._options},t.prototype.exists=function(){return!(!this._definition||!this._definition.self)},t.prototype.valid=function(){return!this.error()},t.prototype.error=function(){var t=this.options().relative;if(!this._definition&&t){var e=t.name?t.name:t;return"Could not resolve '"+this.name()+"' from state '"+e+"'"}return this._definition?this._definition.self?void 0:"State '"+this.name()+"' has an invalid definition":"No such state '"+this.name()+"'"},t.prototype.toString=function(){return"'"+this.name()+"'"+Ie(this.params())},t.prototype.withState=function(e){return new t(this._stateRegistry,e,this._params,this._options)},t.prototype.withParams=function(e,r){void 0===r&&(r=!1);var n=r?e:B({},this._params,e);return new t(this._stateRegistry,this._identifier,n,this._options)},t.prototype.withOptions=function(e,r){void 0===r&&(r=!1);var n=r?e:B({},this._options,e);return new t(this._stateRegistry,this._identifier,this._params,n)},t.isDef=function(t){return t&&t.state&&(x(t.state)||x(t.state.name))},t}(),Xt={current:J,transition:null,traceData:{},bind:null},Yt=function(){function e(e,r,n,i){var o=this;this.transition=e,this.stateContext=r,this.registeredHook=n,this.options=i,this.isSuperseded=function(){return o.type.hookPhase===t.TransitionHookPhase.RUN&&!o.options.transition.isActive()},this.options=ot(i,Xt),this.type=n.eventType}return e.prototype.logError=function(t){this.transition.router.stateService.defaultErrorHandler()(t)},e.prototype.invokeHook=function(){var t=this,e=this.registeredHook;if(!e._deregistered){var r=this.getNotCurrentRejection();if(r)return r;var n=this.options;Qt.traceHookInvocation(this,this.transition,n);var i=function(r){return e.eventType.getErrorHandler(t)(r)},o=function(r){return e.eventType.getResultHandler(t)(r)};try{var a=e.callback.call(n.bind,t.transition,t.stateContext);return!this.type.synchronous&&U(a)?a.catch(function(t){return Nt.normalize(t).toPromise()}).then(o,i):o(a)}catch(t){return i(Nt.normalize(t))}finally{e.invokeLimit&&++e.invokeCount>=e.invokeLimit&&e.deregister()}}},e.prototype.handleHookResult=function(t){var e=this;return this.getNotCurrentRejection()||(U(t)?t.then(function(t){return e.handleHookResult(t)}):(Qt.traceHookResult(t,this.transition,this.options),!1===t?Nt.aborted("Hook aborted transition").toProm
2ise():v(Zt)(t)?Nt.redirected(t).toPromise():void 0))},e.prototype.getNotCurrentRejection=function(){var t=this.transition.router;return t._disposed?Nt.aborted("UIRouter instance #"+t.$id+" has been stopped (disposed)").toPromise():this.transition._aborted?Nt.aborted().toPromise():this.isSuperseded()?Nt.superseded(this.options.current()).toPromise():void 0},e.prototype.toString=function(){var t=this.options,e=this.registeredHook;return(l("traceData.hookType")(t)||"internal")+" context: "+(l("traceData.context.state.name")(t)||l("traceData.context")(t)||"unknown")+", "+Pe(200,$e(e.callback))},e.chain=function(t,e){return t.reduce(function(t,e){return t.then(function(){return e.invokeHook()})},e||j.$q.when())},e.invokeHooks=function(t,r){for(var n=0;n<t.length;n++){var i=t[n].invokeHook();if(U(i)){var o=t.slice(n+1);return e.chain(o,i).then(r)}}return r()},e.runAllHooks=function(t){t.forEach(function(t){return t.invokeHook()})},e.HANDLE_RESULT=function(t){return function(e){return t.handleHookResult(e)}},e.LOG_REJECTED_RESULT=function(t){return function(e){U(e)&&e.catch(function(e){return t.logError(Nt.normalize(e))})}},e.LOG_ERROR=function(t){return function(e){return t.logError(e)}},e.REJECT_ERROR=function(t){return function(t){return Vt(t)}},e.THROW_ERROR=function(t){return function(t){throw t}},e}();function te(t,e){var r=x(e)?[e]:e;return!!(C(r)?r:function(t){for(var e=r,n=0;n<e.length;n++){var i=new b(e[n]);if(i&&i.matches(t.name)||!i&&e[n]===t.name)return!0}return!1})(t)}var ee=function(){function e(t,e,r,n,i,o){void 0===o&&(o={}),this.tranSvc=t,this.eventType=e,this.callback=r,this.matchCriteria=n,this.removeHookFromRegistry=i,this.invokeCount=0,this._deregistered=!1,this.priority=o.priority||0,this.bind=o.bind||null,this.invokeLimit=o.invokeLimit}return e.prototype._matchingNodes=function(t,e){if(!0===e)return t;var r=t.filter(function(t){return te(t.state,e)});return r.length?r:null},e.prototype._getDefaultMatchCriteria=function(){return dt(this.tranSvc._pluginapi._getPathTypes(),function(){return!0})},e.prototype._getMatchingNodes=function(e){var r=this,n=B(this._getDefaultMatchCriteria(),this.matchCriteria);return mt(this.tranSvc._pluginapi._getPathTypes()).reduce(function(i,o){var a=o.scope===t.TransitionHookScope.STATE,s=e[o.name]||[],u=a?s:[It(s)];return i[o.name]=r._matchingNodes(u,n[o.name]),i},{})},e.prototype.matches=function(t){var e=this._getMatchingNodes(t);return mt(e).every(K)?e:null},e.prototype.deregister=function(){this.removeHookFromRegistry(this),this._deregistered=!0},e}();function re(t,e,r){var n=(t._registeredHooks=t._registeredHooks||{})[r.name]=[],i=tt(n);function o(t,o,a){void 0===a&&(a={});var s=new ee(e,r,o,t,i,a);return n.push(s),s.deregister.bind(s)}return t[r.name]=o,o}var ne=function(){function e(t){this.transition=t}return e.prototype.buildHooksForPhase=function(t){var e=this;return this.transition.router.transitionService._pluginapi._getEvents(t).map(function(t){return e.buildHooks(t)}).reduce(yt,[]).filter(K)},e.prototype.buildHooks=function(e){var r=this.transition,n=r.treeChanges(),i=this.getMatchingHooks(e,n);if(!i)return[];var o,a={transition:r,current:r.options().current};return i.map(function(i){return i.matches(n)[e.criteriaMatchPath.name].map(function(n){var o=B({bind:i.bind,traceData:{hookType:e.name,context:n}},a),s=e.criteriaMatchPath.scope===t.TransitionHookScope.STATE?n.state.self:null,u=new Yt(r,s,i,o);return{hook:i,node:n,transitionHook:u}})}).reduce(yt,[]).sort((o=e.reverseSort,void 0===o&&(o=!1),function(t,e){var r=o?-1:1,n=(t.node.state.path.length-e.node.state.path.length)*r;return 0!==n?n:e.hook.priority-t.hook.priority})).map(function(t){return t.transitionHook})},e.prototype.getMatchingHooks=function(e,r){var n=e.hookPhase===t.TransitionHookPhase.CREATE,i=this.transition.router.transitionService;return(n?[i]:[this.transition,i]).map(function(t){return t.getHooks(e.name)}).filter(Et(O,"broken event named: "+e.name)).reduce(yt,[]).filter(function(t){return t.matches(r)})},e}();var ie=function(){function t(t){this.pattern=/.*/,this.inherit=!0,B(this,t)}return t.prototype.is=function(t,e){return!0},t.prototype.encode=function(t,e){return t},t.prototype.decode=function(t,e){return t},t.prototype.equals=function(t,e){return t==e},t.prototype.$subPattern=function(){var t=this.pattern.toString();return t.substr(1,t.length-2)},t.prototype.toString=function(){return"{ParamType:"+this.name+"}"},t.prototype.$normalize=function(t){return this.is(t)?t:this.decode(t)},t.prototype.$asArray=function(t,e){if(!t)return this;if("auto"===t&&!e)throw new Error("'auto' array mode is for query parameters only");return new oe(this,t)},t}();function oe(t,e){var r=this;function n(t){return O(t)?t:R(t)?[t]:[]}function i(t,r){return function(i){if(O(i)&&0===i.length)return i;var o=dt(n(i),t);return!0===r?0===pt(o,function(t){return!t}).length:function(t){switch(t.length){case 0:return;case 1:return"auto"===e?t[0]:t;default:return t}}(o)}}function o(t){return function(e,r){var i=n(e),o=n(r);if(i.length!==o.length)return!1;for(var a=0;a<i.length;a++)if(!t(i[a],o[a]))return!1;return!0}}["encode","decode","equals","$normalize"].forEach(function(e){var n=t[e].bind(t),a="equals"===e?o:i;r[e]=a(n)}),B(this,{dynamic:t.dynamic,name:t.name,pattern:t.pattern,inherit:t.inherit,is:i(t.is.bind(t),!0),$arrayMode:e})}var ae,se=Object.prototype.hasOwnProperty;function ue(t){function e(){return t.value}return t=function(t){return 0===["value","type","squash","array","dynamic"].filter(se.bind(t||{})).length}(t)&&{value:t}||t,e.__cacheable=!0,B(t,{$$fn:F(t.value)?t.value:e})}(ae=t.DefType||(t.DefType={}))[ae.PATH=0]="PATH",ae[ae.SEARCH=1]="SEARCH",ae[ae.CONFIG=2]="CONFIG";var ce=function(){function e(e,r,n,i,o){r=function(e,r,n,i,o){if(e.type&&r&&"string"!==r.name)throw new Error("Param '"+i+"' has two type configurations.");if(e.type&&r&&"string"===r.name&&o.type(e.type))return o.type(e.type);if(r)return r;if(!e.type){var a=n===t.DefType.CONFIG?"any":n===t.DefType.PATH?"path":n===t.DefType.SEARCH?"query":"string";return o.type(a)}return e.type instanceof ie?e.type:o.type(e.type)}(n=ue(n),r,i,e,o.paramTypes);var a,s,c=(a={array:i===t.DefType.SEARCH&&"auto"},s=e.match(/\[\]$/)?{array:!0}:{},B(a,s,n).array);r=c?r.$asArray(c,i===t.DefType.SEARCH):r;var l=void 0!==n.value||i===t.DefType.SEARCH,p=R(n.dynamic)?!!n.dynamic:!!r.dynamic,f=R(n.raw)?!!n.raw:!!r.raw,h=function(t,e,r){var n=t.squash;if(!e||!1===n)return!1;if(!R(n)||null==n)return r;if(!0===n||x(n))return n;throw new Error("Invalid squash policy: '"+n+"'. Valid policies: false, true, or arbitrary string")}(n,l,o.defaultSquashPolicy()),d=function(t,e,r,n){var i,o,a=[{from:"",to:r||e?void 0:""},{from:null,to:r||e?void 0:""}];return i=O(t.replace)?t.replace:[],x(n)&&i.push({from:n,to:void 0}),o=dt(i,u("from")),pt(a,function(t){return-1===o.indexOf(t.from)}).concat(i)}(n,c,l,h),m=R(n.inherit)?!!n.inherit:!!r.inherit;
2B(this,{id:e,type:r,location:i,isOptional:l,dynamic:p,raw:f,squash:h,replace:d,inherit:m,array:c,config:n})}return e.prototype.isDefaultValue=function(t){return this.isOptional&&this.type.equals(this.value(),t)},e.prototype.value=function(t){var e=this;return t=function(t){for(var r=0,n=e.replace;r<n.length;r++){var i=n[r];if(i.from===t)return i.to}return t}(t),T(t)?function(){if(e._defaultValueCache)return e._defaultValueCache.defaultValue;if(!j.$injector)throw new Error("Injectable functions cannot be called at configuration time");var t=j.$injector.invoke(e.config.$$fn);if(null!=t&&!e.type.is(t))throw new Error("Default value ("+t+") for parameter '"+e.id+"' is not an instance of ParamType ("+e.type.name+")");return e.config.$$fn.__cacheable&&(e._defaultValueCache={defaultValue:t}),t}():this.type.$normalize(t)},e.prototype.isSearch=function(){return this.location===t.DefType.SEARCH},e.prototype.validates=function(t){if((T(t)||null===t)&&this.isOptional)return!0;var e=this.type.$normalize(t);if(!this.type.is(e))return!1;var r=this.type.encode(e);return!(x(r)&&!this.type.pattern.exec(r))},e.prototype.toString=function(){return"{Param:"+this.id+" "+this.type+" squash: '"+this.squash+"' optional: "+this.isOptional+"}"},e.values=function(t,e){void 0===e&&(e={});for(var r={},n=0,i=t;n<i.length;n++){var o=i[n];r[o.id]=o.value(e[o.id])}return r},e.changed=function(t,e,r){return void 0===e&&(e={}),void 0===r&&(r={}),t.filter(function(t){return!t.type.equals(e[t.id],r[t.id])})},e.equals=function(t,r,n){return void 0===r&&(r={}),void 0===n&&(n={}),0===e.changed(t,r,n).length},e.validates=function(t,e){return void 0===e&&(e={}),t.map(function(t){return t.validates(e[t.id])}).reduce(vt,!0)},e}(),le=function(){function t(e){if(e instanceof t){var r=e;this.state=r.state,this.paramSchema=r.paramSchema.slice(),this.paramValues=B({},r.paramValues),this.resolvables=r.resolvables.slice(),this.views=r.views&&r.views.slice()}else{var n=e;this.state=n,this.paramSchema=n.parameters({inherit:!1}),this.paramValues={},this.resolvables=n.resolvables.map(function(t){return t.clone()})}}return t.prototype.applyRawParams=function(t){return this.paramValues=this.paramSchema.reduce(function(e,r){return Ct(e,[(n=r).id,n.value(t[n.id])]);var n},{}),this},t.prototype.parameter=function(t){return ft(this.paramSchema,c("id",t))},t.prototype.equals=function(t,e){var r=this.diff(t,e);return r&&0===r.length},t.prototype.diff=function(t,e){if(this.state!==t.state)return!1;var r=e?e(this):this.paramSchema;return ce.changed(r,this.paramValues,t.paramValues)},t.clone=function(e){return new t(e)},t}(),pe=function(){function t(){}return t.makeTargetState=function(t,e){var r=It(e).state;return new Zt(t,r,e.map(u("paramValues")).reduce(at,{}),{})},t.buildPath=function(t){var e=t.params();return t.$state().path.map(function(t){return new le(t).applyRawParams(e)})},t.buildToPath=function(e,r){var n=t.buildPath(r);return r.options().inherit?t.inheritParams(e,n,Object.keys(r.params())):n},t.applyViewConfigs=function(e,r,n){r.filter(function(t){return X(n,t.state)}).forEach(function(n){var i=mt(n.state.views||{}),o=t.subPath(r,function(t){return t===n}),a=i.map(function(t){return e.createViewConfig(o,t)});n.views=a.reduce(yt,[])})},t.inheritParams=function(t,e,r){void 0===r&&(r=[]);var n=t.map(function(t){return t.paramSchema}).reduce(yt,[]).filter(function(t){return!t.inherit}).map(u("id"));return e.map(function(e){var i=B({},e&&e.paramValues),o=ut(i,r);i=ct(i,r);var a,s,u,l=ct((a=t,s=e.state,u=ft(a,c("state",s)),B({},u&&u.paramValues)||{}),n),p=B(i,l,o);return new le(e.state).applyRawParams(p)})},t.treeChanges=function(e,r,n){for(var i,o,a,s,u=0,c=Math.min(e.length,r.length),l=function(e,r){return e.equals(r,t.nonDynamicParams)};u<c&&e[u].state!==n&&l(e[u],r[u]);)u++;o=(i=e).slice(0,u),a=i.slice(u);var p=o.map(function(t,e){var n=le.clone(t);return n.paramValues=r[e].paramValues,n});return s=r.slice(u),{from:i,to:p.concat(s),retained:o,exiting:a,entering:s}},t.matching=function(t,e,r){var n=!1;return kt(t,e).reduce(function(t,e){var i=e[0],o=e[1];return(n=n||!i.equals(o,r))?t:t.concat(i)},[])},t.equals=function(e,r,n){return e.length===r.length&&t.matching(e,r,n).length===e.length},t.subPath=function(t,e){var r=ft(t,e),n=t.indexOf(r);return-1===n?void 0:t.slice(0,n+1)},t.nonDynamicParams=function(t){return t.state.parameters({inherit:!1}).filter(function(t){return!t.dynamic})},t.paramValues=function(t){return t.reduce(function(t,e){return B(t,e.paramValues)},{})},t}(),fe={when:"LAZY",async:"WAIT"},he=function(){function t(e,r,n,i,o){if(this.resolved=!1,this.promise=void 0,e instanceof t)B(this,e);else if(C(r)){if(k(e))throw new Error("new Resolvable(): token argument is required");if(!C(r))throw new Error("new Resolvable(): resolveFn argument must be a function");this.token=e,this.policy=i,this.resolveFn=r,this.deps=n||[],this.data=o,this.resolved=void 0!==o,this.promise=this.resolved?j.$q.when(this.data):void 0}else if(A(e)&&e.token&&C(e.resolveFn)){var a=e;return new t(a.token,a.resolveFn,a.deps,a.policy,a.data)}}return t.prototype.getPolicy=function(t){var e=this.policy||{},r=t&&t.resolvePolicy||{};return{when:e.when||r.when||fe.when,async:e.async||r.async||fe.async}},t.prototype.resolve=function(t,e){var r=this,n=j.$q,i=t.findNode(this),o=i&&i.state,a="RXWAIT"===this.getPolicy(o).async?function(t){var e=t.cache(1);return e.take(1).toPromise().then(function(){return e})}:K;return this.promise=n.when().then(function(){return n.all(t.getDependencies(r).map(function(r){return r.get(t,e)}))}).then(function(t){return r.resolveFn.apply(null,t)}).then(a).then(function(t){return r.data=t,r.resolved=!0,Qt.traceResolvableResolved(r,e),r.data})},t.prototype.get=function(t,e){return this.promise||this.resolve(t,e)},t.prototype.toString=function(){return"Resolvable(token: "+Ie(this.token)+", requires: ["+this.deps.map(Ie)+"])"},t.prototype.clone=function(){return new t(this)},t.fromData=function(e,r){return new t(e,function(){return r}
2,null,null,r)},t}(),de={when:{LAZY:"LAZY",EAGER:"EAGER"},async:{WAIT:"WAIT",NOWAIT:"NOWAIT",RXWAIT:"RXWAIT"}},me=de.when,ve=[me.EAGER,me.LAZY],ge=[me.EAGER],ye="Native Injector",_e=function(){function t(t){this._path=t}return t.prototype.getTokens=function(){return this._path.reduce(function(t,e){return t.concat(e.resolvables.map(function(t){return t.token}))},[]).reduce(bt,[])},t.prototype.getResolvable=function(t){return It(this._path.map(function(t){return t.resolvables}).reduce(yt,[]).filter(function(e){return e.token===t}))},t.prototype.getPolicy=function(t){var e=this.findNode(t);return t.getPolicy(e.state)},t.prototype.subContext=function(e){return new t(pe.subPath(this._path,function(t){return t.state===e}))},t.prototype.addResolvables=function(t,e){var r=ft(this._path,c("state",e)),n=t.map(function(t){return t.token});r.resolvables=r.resolvables.filter(function(t){return-1===n.indexOf(t.token)}).concat(t)},t.prototype.resolvePath=function(t,e){var r=this;void 0===t&&(t="LAZY");var n=(X(ve,t)?t:"LAZY")===de.when.EAGER?ge:ve;Qt.traceResolvePath(this._path,t,e);var i=function(t,e){return function(n){return X(t,r.getPolicy(n)[e])}},o=this._path.reduce(function(t,o){var a=o.resolvables.filter(i(n,"when")),s=a.filter(i(["NOWAIT"],"async")),u=a.filter(p(i(["NOWAIT"],"async"))),c=r.subContext(o.state),l=function(t){return t.get(c,e).then(function(e){return{token:t.token,value:e}})};return s.forEach(l),t.concat(u.map(l))},[]);return j.$q.all(o)},t.prototype.injector=function(){return this._injector||(this._injector=new we(this))},t.prototype.findNode=function(t){return ft(this._path,function(e){return X(e.resolvables,t)})},t.prototype.getDependencies=function(t){var e=this,r=this.findNode(t),n=(pe.subPath(this._path,function(t){return t===r})||this._path).reduce(function(t,e){return t.concat(e.resolvables)},[]).filter(function(e){return e!==t});return t.deps.map(function(t){var r=n.filter(function(e){return e.token===t});if(r.length)return It(r);var i=e.injector().getNative(t);if(T(i))throw new Error("Could not find Dependency Injection token: "+Ie(t));return new he(t,function(){return i},[],i)})},t}(),we=function(){function t(t){this.context=t,this.native=this.get(ye)||j.$injector}return t.prototype.get=function(t){var e=this.context.getResolvable(t);if(e){if("NOWAIT"===this.context.getPolicy(e).async)return e.get(this.context);if(!e.resolved)throw new Error("Resolvable async .get() not complete:"+Ie(e.token));return e.data}return this.getNative(t)},t.prototype.getAsync=function(t){var e=this.context.getResolvable(t);return e?e.get(this.context):j.$q.when(this.native.get(t))},t.prototype.getNative=function(t){return this.native&&this.native.get(t)},t}(),be=u("self"),Se=function(){function e(e,r,n){var i=this;if(this._deferred=j.$q.defer(),this.promise=this._deferred.promise,this._registeredHooks={},this._hookBuilder=new ne(this),this.isActive=function(){return i.router.globals.transition===i},this.router=n,this._targetState=r,!r.valid())throw new Error(r.error());this._options=B({current:y(this)},r.options()),this.$id=n.transitionService._transitionCount++;var o=pe.buildToPath(e,r);this._treeChanges=pe.treeChanges(e,o,this._options.reloadState),this.createTransitionHookRegFns();var a=this._hookBuilder.buildHooksForPhase(t.TransitionHookPhase.CREATE);Yt.invokeHooks(a,function(){return null}),this.applyViewConfigs(n)}return e.prototype.onBefore=function(t,e,r){},e.prototype.onStart=function(t,e,r){},e.prototype.onExit=function(t,e,r){},e.prototype.onRetain=function(t,e,r){},e.prototype.onEnter=function(t,e,r){},e.prototype.onFinish=function(t,e,r){},e.prototype.onSuccess=function(t,e,r){},e.prototype.onError=function(t,e,r){},e.prototype.createTransitionHookRegFns=function(){var e=this;this.router.transitionService._pluginapi._getEvents().filter(function(e){return e.hookPhase!==t.TransitionHookPhase.CREATE}).forEach(function(t){return re(e,e.router.transitionService,t)})},e.prototype.getHooks=function(t){return this._registeredHooks[t]},e.prototype.applyViewConfigs=function(t){var e=this._treeChanges.entering.map(function(t){return t.state});pe.applyViewConfigs(t.transitionService.$view,this._treeChanges.to,e)},e.prototype.$from=function(){return It(this._treeChanges.from).state},e.prototype.$to=function(){return It(this._treeChanges.to).state},e.prototype.from=function(){return this.$from().self},e.prototype.to=function(){return this.$to().self},e.prototype.targetState=function(){return this._targetState},e.prototype.is=function(t){return t instanceof e?this.is({to:t.$to().name,from:t.$from().name}):!(t.to&&!te(this.$to(),t.to)||t.from&&!te(this.$from(),t.from))},e.prototype.params=function(t){return void 0===t&&(t="to"),Object.freeze(this._treeChanges[t].map(u("paramValues")).reduce(at,{}))},e.prototype.injector=function(t,e){void 0===e&&(e="to");var r=this._treeChanges[e];return t&&(r=pe.subPath(r,function(e){return e.state===t||e.state.name===t})),new _e(r).injector()},e.prototype.getResolveTokens=function(t){return void 0===t&&(t="to"),new _e(this._treeChanges[t]).getTokens()},e.prototype.addResolvable=function(t,e){void 0===e&&(e=""),t=v(he)(t)?t:new he(t);var r="string"==typeof e?e:e.name,n=this._treeChanges.to,i=ft(n,function(t){return t.state.name===r});new _e(n).addResolvables([t],i.state)},e.prototype.redirectedFrom=function(){return this._options.redirectedFrom||null},e.prototype.originalTransition=function(){var t=this.redirectedFrom();return t&&t.originalTransition()||this},e.prototype.options=function(){return this._options},e.prototype.entering=function(){return dt(this._treeChanges.entering,u("state")).map(be)},e.prototype.exiting=function(){return dt(this._treeChanges.exiting,u("state")).map(be).reverse()},e.prototype.retained=function(){return dt(this._treeChanges.retained,u("state")).map(be)},e.prototype.views=function(t,e){void 0===t&&(t="entering");var r=this._treeChanges[t];return(r=e?r.filter(c("state",e)):r).map(u("views")).filter(K).reduce(yt,[])},e.prototype.treeChanges=function(t){return t?this._treeChanges[t]:this._treeChanges},e.prototype.redirect=function(t){for(var e=1,r=this;null!=(r=r.redirectedFrom());)if(++e>20)throw new Error("Too many consecutive Transition redirects (20+)");var n={redirectedFrom:this,source:"redirect"};"url"===this.options().source&&!1!==t.options().location&&(n.location="replace");var i=B({},this.options(),t.options(),n);t=t.withOptions(i,!0);var o,a=this.router.transitionService.create(this._treeChanges.from,t),s=this._treeChanges.entering,u=a._treeChanges.entering;return pe.matching(u,s,pe.nonDynamicParams).filter(p((o=t.options().reloadState,function(t){return o&&t.state.includes[o.name]}
2))).forEach(function(t,e){t.resolvables=s[e].resolvables}),a},e.prototype._changedParams=function(){var t=this._treeChanges;if(!(this._options.reload||t.exiting.length||t.entering.length||t.to.length!==t.from.length||kt(t.to,t.from).map(function(t){return t[0].state!==t[1].state}).reduce(gt,!1))){var e=t.to.map(function(t){return t.paramSchema}),r=[t.to,t.from].map(function(t){return t.map(function(t){return t.paramValues})});return kt(e,r[0],r[1]).map(function(t){var e=t[0],r=t[1],n=t[2];return ce.changed(e,r,n)}).reduce(yt,[])}},e.prototype.dynamic=function(){var t=this._changedParams();return!!t&&t.map(function(t){return t.dynamic}).reduce(gt,!1)},e.prototype.ignored=function(){return!!this._ignoredReason()},e.prototype._ignoredReason=function(){var t=this.router.globals.transition,e=this._options.reloadState,r=function(t,r){if(t.length!==r.length)return!1;var n=pe.matching(t,r);return t.length===n.filter(function(t){return!e||!t.state.includes[e.name]}).length},n=this.treeChanges(),i=t&&t.treeChanges();return i&&r(i.to,n.to)&&r(i.exiting,n.exiting)?"SameAsPending":0===n.exiting.length&&0===n.entering.length&&r(n.from,n.to)?"SameAsCurrent":void 0},e.prototype.run=function(){var e=this,r=Yt.runAllHooks,n=function(t){return e._hookBuilder.buildHooksForPhase(t)},i=n(t.TransitionHookPhase.BEFORE);return Yt.invokeHooks(i,function(){var t=e.router.globals;return t.lastStartedTransitionId=e.$id,t.transition=e,t.transitionHistory.enqueue(e),Qt.traceTransitionStart(e),j.$q.when(void 0)}).then(function(){var e=n(t.TransitionHookPhase.RUN);return Yt.invokeHooks(e,function(){return j.$q.when(void 0)})}).then(function(){Qt.traceSuccess(e.$to(),e),e.success=!0,e._deferred.resolve(e.to()),r(n(t.TransitionHookPhase.SUCCESS))},function(i){Qt.traceError(i,e),e.success=!1,e._deferred.reject(i),e._error=i,r(n(t.TransitionHookPhase.ERROR))}),this.promise},e.prototype.valid=function(){return!this.error()||void 0!==this.success},e.prototype.abort=function(){T(this.success)&&(this._aborted=!0)},e.prototype.error=function(){var t=this.$to();if(t.self.abstract)return"Cannot transition to abstract state '"+t.name+"'";var e=t.parameters(),r=this.params(),n=e.filter(function(t){return!t.validates(r[t.id])});return n.length?"Param values not valid for state '"+t.name+"'. Invalid params: [ "+n.map(function(t){return t.id}).join(", ")+" ]":!1===this.success?this._error:void 0},e.prototype.toString=function(){var t=this.from(),e=this.to(),r=function(t){return null!==t["#"]&&void 0!==t["#"]?t:ct(t,["#"])};return"Transition#"+this.$id+"( '"+(A(t)?t.name:t)+"'"+Ie(r(this._treeChanges.from.map(u("paramValues")).reduce(at,{})))+" -> "+(this.valid()?"":"(X) ")+"'"+(A(e)?e.name:e)+"'"+Ie(r(this.params()))+" )"},e.diToken=e,e}();function Pe(t,e){return e.length<=t?e:e.substr(0,t-3)+"..."}function Ee(t,e){for(;e.length<t;)e+=" ";return e}function Te(t){return t.replace(/^([A-Z])/,function(t){return t.toLowerCase()}).replace(/([A-Z])/g,function(t){return"-"+t.toLowerCase()})}function Re(t){var e=$e(t),r=e.match(/^(function [^ ]+\([^)]*\))/),n=r?r[1]:e,i=t.name||"";return i&&n.match(/function \(/)?"function "+i+n.substr(9):n}function $e(t){var e=O(t)?t.slice(-1)[0]:t;return e&&e.toString()||"undefined"}var ke=null,Ce=function(t){var e=Nt.isRejectionPromise;return(ke=ke||w([[p(R),y("undefined")],[$,y("null")],[U,y("[Promise]")],[e,function(t){return t._transitionRejection.toString()}],[v(Nt),_("toString")],[v(Se),_("toString")],[v(he),_("toString")],[F,Re],[y(!0),K]]))(t)};function Ie(t){var e=[];return JSON.stringify(t,function(t,r){return function(t){if(A(t)){if(-1!==e.indexOf(t))return"[circular ref]";e.push(t)}return Ce(t)}(r)}).replace(/\\"/g,'"')}var xe=function(t){return function(e){if(!e)return["",""];var r=e.indexOf(t);return-1===r?[e,""]:[e.substr(0,r),e.substr(r+1)]}},Ae=new RegExp("^(?:[a-z]+:)?//[^/]+/"),Oe=function(t){return t.replace(/\/[^/]*$/,"")},De=xe("#"),He=xe("?"),Ve=xe("="),Fe=function(t){return t?t.replace(/^#/,""):""};function Ue(t){var e=new RegExp("("+t+")","g");return function(t){return t.split(e).filter(K)}}function Ne(t,e){return x(It(t))&&x(e)?t.slice(0,-1).concat(It(t)+e):wt(t,e)}var je,Le=function(){function t(){this.enqueue=!0,this.typeQueue=[],this.defaultTypes=ut(t.prototype,["hash","string","query","path","int","bool","date","json","any"]);this.types=Z(dt(this.defaultTypes,function(t,e){return new ie(B({name:e},t))}),{})}return t.prototype.dispose=function(){this.types={}},t.prototype.type=function(t,e,r){if(!R(e))return this.types[t];
2if(this.types.hasOwnProperty(t))throw new Error("A type named '"+t+"' has already been defined.");return this.types[t]=new ie(B({name:t},e)),r&&(this.typeQueue.push({name:t,def:r}),this.enqueue||this._flushTypeQueue()),this},t.prototype._flushTypeQueue=function(){for(;this.typeQueue.length;){var t=this.typeQueue.shift();if(t.pattern)throw new Error("You cannot override a type's .pattern at runtime.");B(this.types[t.name],j.$injector.invoke(t.def))}},t}();je=function(t){var e=function(t){return null!=t?t.toString():t},r={encode:e,decode:e,is:v(String),pattern:/.*/,equals:function(t,e){return t==e}};return B({},r,t)},B(Le.prototype,{string:je({}),path:je({pattern:/[^/]*/}),query:je({}),hash:je({inherit:!1}),int:je({decode:function(t){return parseInt(t,10)},is:function(t){return!k(t)&&this.decode(t.toString())===t},pattern:/-?\d+/}),bool:je({encode:function(t){return t?1:0},decode:function(t){return 0!==parseInt(t,10)},is:v(Boolean),pattern:/0|1/}),date:je({encode:function(t){return this.is(t)?[t.getFullYear(),("0"+(t.getMonth()+1)).slice(-2),("0"+t.getDate()).slice(-2)].join("-"):void 0},decode:function(t){if(this.is(t))return t;var e=this.capture.exec(t);return e?new Date(e[1],e[2]-1,e[3]):void 0},is:function(t){return t instanceof Date&&!isNaN(t.valueOf())},equals:function(t,e){return["getFullYear","getMonth","getDate"].reduce(function(r,n){return r&&t[n]()===e[n]()},!0)},pattern:/[0-9]{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])/,capture:/([0-9]{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])/}),json:je({encode:G,decode:M,is:v(Object),equals:W,pattern:/[^/]*/}),any:je({encode:K,decode:K,is:function(){return!0},equals:W})});var qe=function(){function t(t){void 0===t&&(t={}),B(this,t)}return t.prototype.$inherit=function(t,e,r){var n,i=st(e,r),o={},a=[];for(var s in i)if(i[s]&&i[s].params&&(n=Object.keys(i[s].params)).length)for(var u in n)a.indexOf(n[u])>=0||(a.push(n[u]),o[n[u]]=this[n[u]]);return B({},o,t)},t}();function Me(t){return t.name}function Ge(t){return t.self.$$state=function(){return t},t.self}function ze(t){return t.parent&&t.parent.data&&(t.data=t.self.data=Z(t.parent.data,t.data)),t.data}var Be=function(t,e){return function(r){var n=r;n&&n.url&&n.name&&n.name.match(/\.\*\*$/)&&(n.url+="{remainder:any}");var i=function(t){if(!x(t))return!1;var e="^"===t.charAt(0);return{val:e?t.substring(1):t,root:e}}(n.url),o=r.parent,a=i?t.compile(i.val,{params:r.params||{},paramMap:function(t,e){return!1===n.reloadOnSearch&&e&&(t=B(t||{},{dynamic:!0})),t}}):n.url;if(!a)return null;if(!t.isMatcher(a))throw new Error("Invalid url '"+a+"' in state '"+r+"'");return i&&i.root?a:(o&&o.navigable||e()).url.append(a)}},We=function(t){return function(e){return!t(e)&&e.url?e:e.parent?e.parent.navigable:null}};function Ke(t){return t.parent?t.parent.path.concat(t):[t]}function Je(t){var e=t.parent?B({},t.parent.includes):{};return e[t.name]=!0,e}function Qe(t){var e=function(t){return t.provide||t.token},r=w([[u("resolveFn"),function(t){return new he(e(t),t.resolveFn,t.deps,t.policy)}],[u("useFactory"),function(t){return new he(e(t),t.useFactory,t.deps||t.dependencies,t.policy)}],[u("useClass"),function(t){return new he(e(t),function(){return new t.useClass},[],t.policy)}],[u("useValue"),function(t){return new he(e(t),function(){return t.useValue},[],t.policy,t.useValue)}],[u("useExisting"),function(t){return new he(e(t),K,[t.useExisting],t.policy)}]]),n=w([[s(u("val"),x),function(t){return new he(t.token,K,[t.val],t.policy)}],[s(u("val"),O),function(t){return new he(t.token,It(t.val),t.val.slice(0,-1),t.policy)}],[s(u("val"),C),function(t){return new he(t.token,t.val,function(t){var e=j.$injector;return t.$inject||e&&e.annotate(t,e.strictDi)||"deferred"}(t.val),t.policy)}]]),i=w([[v(he),function(t){return t}],[function(t){return!(!t.token||!t.resolveFn)},r],[function(t){return!(!t.provide&&!t.token||!(t.useValue||t.useFactory||t.useExisting||t.useClass))},r],[function(t){return!!(t&&t.val&&(x(t.val)||O(t.val)||C(t.val)))},n],[y(!0),function(t){throw new Error("Invalid resolve value: "+Ie(t))}]]),o=t.resolve;return(O(o)?o:function(t,e){return Object.keys(t||{}).map(function(r){return{token:r,val:t[r],deps:void 0,policy:e[r]}})}(o,t.resolvePolicy||{})).map(i)}var Ze=function(){function t(t,e){this.matcher=t;var r,n=this,i=function(){return t.find("")},o=function(t){return""===t.name};this.builders={name:[Me],self:[Ge],parent:[function(e){return o(e)?null:t.find(n.parentName(e))||i()}],data:[ze],url:[Be(e,i)],navigable:[We(o)],params:[(r=e.paramFactory,function(t){var e=t.url&&t.url.parameters({inherit:!1})||[],n=mt(ht(ct(t.params||{},e.map(u("id"))),function(t,e){return r.fromConfig(e,null,t)}));return e.concat(n).map(function(t){return[t.id,t]}).reduce(Ct,{})})],views:[],path:[Ke],includes:[Je],resolvables:[Qe]}}return t.prototype.builder=function(t,e){var r=this.builders,n=r[t]||[];return x(t)&&!R(e)?n.length>1?n:n[0]:x(t)&&C(e)?(r[t]=n,r[t].push(e),function(){return r[t].splice(r[t].indexOf(e,1))&&null}):void 0},t.prototype.build=function(t){var e=this.matcher,r=this.builders,n=this.parentName(t);if(n&&!e.find(n,void 0,!1))return null;for(var i in r)if(r.hasOwnProperty(i)){var o=r[i].reduce(function(t,e){return function(r){return e(r,t)}},J);t[i]=o(t)}return t},t.prototype.parentName=function(t){var e=t.name||"",r=e.split(".");if("**"===r.pop()&&r.pop(),r.length){if(t.parent)throw new Error("States that specify the 'parent:' property should not have a '.' in their name ("+e+")");return r.join(".")}return t.parent?x(t.parent)?t.parent:t.parent.name:""},t.prototype.name=function(t){var e=t.name;if(-1!==e.indexOf(".")||!t.parent)return e;var r=x(t.parent)?t.parent:t.parent.name;return r?r+"."+e:e},t}(),Xe=function(){function t(t){this._states=t}return t.prototype.isRelative=function(t){return 0===(t=t||"").indexOf(".")||0===t.indexOf("^")},t.prototype.find=function(t,e,r){if(void 0===r&&(r=!0),t||""===t){var n=x(t),i=n?t:t.name;this.isRelative(i)&&(i=this.resolvePath(i,e));var o=this._states[i];if(o&&(n||!(n||o!==t&&o.self!==t)))return o;if(n&&r){var a=mt(this._states).filter(function(t){return t.__stateObjectCache.nameGlob&&t.__stateObjectCache.nameGlob.matches(i)});return a.length>1&&console.log("stateMatcher.find: Found multiple matches for "+i+" using glob: ",a.map(function(t){return t.name})),a[0]}}},t.prototype.resolvePath=function(t,e){if(!e)throw new Error("No reference point given for path '"+t+"'");for(var r=this.find(e),n=t.split("."),i=0,o=n.length,a=r;i<o;i++)if(""!==n[i]||0!==i){if("^"!==n[i])break;if(!a.parent)throw new Error("Path '"+t+"' not valid for state '"+r.name+"'");a=a.parent}else a=r;var s=n.slice(i).join(".");return a.name+(a.name&&s?".":"")+s},t}(),Ye=function(){function t(t,e,r,n,i){this.$registry=t,this.$urlRouter=e,this.states=r,this.builder=n,this.listeners=i,this.queue=[],this.matcher=t.matcher}return t.prototype.dispose=function(){this.queue=[]},t.prototype.register=function(t){var e=this.queue,r=S.create(t),n=r.name;if(!x(n))throw new Error("State must have a valid name");if(this.states.hasOwnProperty(n)||X(e.map(u("name")),n))throw new Error("State '"+n+"' is already defined");return e.push(r),this.flush(),r},t.prototype.flush=function(){for(var t=this,e=this,r=e.queue,n=e.states,i=e.builder,o=[],a=[],s={},u=function(e){return t.states.hasOwnProperty(e)&&t.states[e]};r.length>0;){var c=r.shift(),l=c.name,p=i.build(c),f=a.indexOf(c);if(p){var h=u(l);if(h&&h.name===l)throw new Error("State '"+l+"' is already defined");var d=u(l+".**");d&&this.$registry.deregister(d),n[l]=c,this.attachRoute(c),f>=0&&a.splice(f,1),o.push(c)}else{var m=s[l];if(s[l]=r.length,f>=0&&m===r.length)return r.push(c),n;f<0&&a.push(c),r.push(c)}}
2return o.length&&this.listeners.forEach(function(t){return t("registered",o.map(function(t){return t.self}))}),n},t.prototype.attachRoute=function(t){!t.abstract&&t.url&&this.$urlRouter.rule(this.$urlRouter.urlRuleFactory.create(t))},t}(),tr=function(){function t(t){this._router=t,this.states={},this.listeners=[],this.matcher=new Xe(this.states),this.builder=new Ze(this.matcher,t.urlMatcherFactory),this.stateQueue=new Ye(this,t.urlRouter,this.states,this.builder,this.listeners),this._registerRoot()}return t.prototype._registerRoot=function(){(this._root=this.stateQueue.register({name:"",url:"^",views:null,params:{"#":{value:null,type:"hash",dynamic:!0}},abstract:!0})).navigable=null},t.prototype.dispose=function(){var t=this;this.stateQueue.dispose(),this.listeners=[],this.get().forEach(function(e){return t.get(e)&&t.deregister(e)})},t.prototype.onStatesChanged=function(t){return this.listeners.push(t),function(){tt(this.listeners)(t)}.bind(this)},t.prototype.root=function(){return this._root},t.prototype.register=function(t){return this.stateQueue.register(t)},t.prototype._deregisterTree=function(t){var e=this,r=this.get().map(function(t){return t.$$state()}),n=function(t){var e=r.filter(function(e){return-1!==t.indexOf(e.parent)});return 0===e.length?e:e.concat(n(e))},i=n([t]),o=[t].concat(i).reverse();return o.forEach(function(t){var r=e._router.urlRouter;r.rules().filter(c("state",t)).forEach(r.removeRule.bind(r)),delete e.states[t.name]}),o},t.prototype.deregister=function(t){var e=this.get(t);if(!e)throw new Error("Can't deregister state; not found: "+t);var r=this._deregisterTree(e.$$state());return this.listeners.forEach(function(t){return t("deregistered",r.map(function(t){return t.self}))}),r},t.prototype.get=function(t,e){var r=this;if(0===arguments.length)return Object.keys(this.states).map(function(t){return r.states[t].self});var n=this.matcher.find(t,e);return n&&n.self||null},t.prototype.decorator=function(t,e){return this.builder.builder(t,e)},t}();function er(t,e){var r=["",""],n=t.replace(/[\\\[\]\^$*+?.()|{}]/g,"\\$&");if(!e)return n;switch(e.squash){case!1:r=["(",")"+(e.isOptional?"?":"")];break;case!0:n=n.replace(/\/$/,""),r=["(?:/(",")|/)?"];break;default:r=["("+e.squash+"|",")?"]}return n+r[0]+e.type.pattern.source+r[1]}var rr=Ue("/"),nr=function(){function e(t,r,n,i){var o=this;this.config=i,this._cache={path:[this]},this._children=[],this._params=[],this._segments=[],this._compiled=[],this.pattern=t,this.config=ot(this.config,{params:{},strict:!0,caseInsensitive:!1,paramMap:K});for(var a,s,u,l=/([:*])([\w\[\]]+)|\{([\w\[\]]+)(?:\:\s*((?:[^{}\\]+|\\.|\{(?:[^{}\\]+|\\.)*\})+))?\}/g,p=/([:]?)([\w\[\].-]+)|\{([\w\[\].-]+)(?:\:\s*((?:[^{}\\]+|\\.|\{(?:[^{}\\]+|\\.)*\})+))?\}/g,f=0,h=[],d=function(r){if(!e.nameValidator.test(r))throw new Error("Invalid parameter name '"+r+"' in pattern '"+t+"'");if(ft(o._params,c("id",r)))throw new Error("Duplicate parameter name '"+r+"' in pattern '"+t+"'")},m=function(e,n){var i=e[2]||e[3],a=n?e[4]:e[4]||("*"===e[1]?"[\\s\\S]*":null);return{id:i,regexp:a,cfg:o.config.params[i],segment:t.substring(f,e.index),type:a?r.type(a)||function(t){return Z(r.type(n?"query":"path"),{pattern:new RegExp(t,o.config.caseInsensitive?"i":void 0)})}(a):null}};(a=l.exec(t))&&!((s=m(a,!1)).segment.indexOf("?")>=0);)d(s.id),this._params.push(n.fromPath(s.id,s.type,this.config.paramMap(s.cfg,!1))),this._segments.push(s.segment),h.push([s.segment,It(this._params)]),f=l.lastIndex;var v=(u=t.substring(f)).indexOf("?");if(v>=0){var g=u.substring(v);if(u=u.substring(0,v),g.length>0)for(f=0;a=p.exec(g);)d((s=m(a,!0)).id),this._params.push(n.fromSearch(s.id,s.type,this.config.paramMap(s.cfg,!0))),f=l.lastIndex}this._segments.push(u),this._compiled=h.map(function(t){return er.apply(null,t)}).concat(er(u))}return e.prototype.append=function(t){return this._children.push(t),t._cache={path:this._cache.path.concat(t),parent:this,pattern:null},t},e.prototype.isRoot=function(){return this._cache.path[0]===this},e.prototype.toString=function(){return this.pattern},e.prototype.exec=function(t,e,r,n){var i=this;void 0===e&&(e={}),void 0===n&&(n={});var o,a,s,c=(o=this._cache,a="pattern",s=function(){return new RegExp(["^",St(i._cache.path.map(u("_compiled"))).join(""),!1===i.config.strict?"/?":"","$"].join(""),i.config.caseInsensitive?"i":void 0)},o[a]=o[a]||s()).exec(t);if(!c)return null;var l=this.parameters(),p=l.filter(function(t){return!t.isSearch()}),f=l.filter(function(t){return t.isSearch()}),h=this._cache.path.map(function(t){return t._segments.length-1}).reduce(function(t,e){return t+e}),d={};if(h!==c.length-1)throw new Error("Unbalanced capture group in route '"+this.pattern+"'");function m(t){var e=function(t){return t.split("").reverse().join("")},r=dt(e(t).split(/-(?!\\)/),e);return dt(r,function(t){return t.replace(/\\-/g,"-")}).reverse()}for(var v=0;v<h;v++){for(var g=p[v],y=c[v+1],_=0;_<g.replace.length;_++)g.replace[_].from===y&&(y=g.replace[_].to);y&&!0===g.array&&(y=m(y)),R(y)&&(y=g.type.decode(y)),d[g.id]=g.value(y)}return f.forEach(function(t){for(var r=e[t.id],n=0;n<t.replace.length;n++)t.replace[n].from===r&&(r=t.replace[n].to);R(r)&&(r=t.type.decode(r)),d[t.id]=t.value(r)}),r&&(d["#"]=r),d},e.prototype.parameters=function(t){return void 0===t&&(t={}),!1===t.inherit?this._params:St(this._cache.path.map(function(t){return t._params}))},e.prototype.parameter=function(t,e){var r=this;void 0===e&&(e={});var n=this._cache.parent;return function(){for(var e=0,n=r._params;e<n.length;e++){var i=n[e];if(i.id===t)return i}}()||!1!==e.inherit&&n&&n.parameter(t,e)||null},e.prototype.validates=function(t){return t=t||{},this.parameters().filter(function(e){return t.hasOwnProperty(e.id)}).map(function(e){return r=e,n=t[e.id],!r||r.validates(n);var r,n}).reduce(vt,!0)},e.prototype.format=function(t){void 0===t&&(t={});var r=this._cache.path,n=r.map(e.pathSegmentsAndParams).reduce(yt,[]).map(function(t){return x(t)?t:o(t)}),i=r.map(e.queryParams).reduce(yt,[]).map(o);if(n.concat(i).filter(function(t){return!1===t.isValid}).length)return null;function o(e){var r=e.value(t[e.id]),n=e.validates(r),i=e.isDefaultValue(r),o=!!i&&e.squash,a=e.type.encode(r);return{param:e,value:r,isValid:n,isDefaultValue:i,squash:o,encoded:a}}var a=n.reduce(function(t,r){if(x(r))return t+r;var n=r.squash,i=r.encoded,o=r.param;return!0===n?t.match(/\/$/)?t.slice(0,-1):t:x(n)?t+n:!1!==n||null==i?t:O(i)?t+dt(i,e.encodeDashes
2).join("-"):o.raw?t+i:t+encodeURIComponent(i)},""),s=i.map(function(t){var e=t.param,r=t.squash,n=t.encoded,i=t.isDefaultValue;if(!(null==n||i&&!1!==r)&&(O(n)||(n=[n]),0!==n.length))return e.raw||(n=dt(n,encodeURIComponent)),n.map(function(t){return e.id+"="+t})}).filter(K).reduce(yt,[]).join("&");return a+(s?"?"+s:"")+(t["#"]?"#"+t["#"]:"")},e.encodeDashes=function(t){return encodeURIComponent(t).replace(/-/g,function(t){return"%5C%"+t.charCodeAt(0).toString(16).toUpperCase()})},e.pathSegmentsAndParams=function(e){return kt(e._segments,e._params.filter(function(e){return e.location===t.DefType.PATH}).concat(void 0)).reduce(yt,[]).filter(function(t){return""!==t&&R(t)})},e.queryParams=function(e){return e._params.filter(function(e){return e.location===t.DefType.SEARCH})},e.compare=function(t,r){var n=function(t){return t._cache.weights=t._cache.weights||function(t){return t._cache.segments=t._cache.segments||t._cache.path.map(e.pathSegmentsAndParams).reduce(yt,[]).reduce(Ne,[]).map(function(t){return x(t)?rr(t):t}).reduce(yt,[])}(t).map(function(t){return"/"===t?1:x(t)?2:t instanceof ce?3:void 0})},i=n(t),o=n(r);!function(t,e,r){for(var n=Math.max(t.length,e.length);t.length<n;)t.push(r);for(;e.length<n;)e.push(r)}(i,o,0);var a,s,u=kt(i,o);for(s=0;s<u.length;s++)if(0!==(a=u[s][0]-u[s][1]))return a;return 0},e.nameValidator=/^\w+([-.]+\w+)*(?:\[\])?$/,e}(),ir=function(){function e(){var e=this;this.paramTypes=new Le,this._isCaseInsensitive=!1,this._isStrictMode=!0,this._defaultSquashPolicy=!1,this._getConfig=function(t){return B({strict:e._isStrictMode,caseInsensitive:e._isCaseInsensitive},t)},this.paramFactory={fromConfig:function(r,n,i){return new ce(r,n,i,t.DefType.CONFIG,e)},fromPath:function(r,n,i){return new ce(r,n,i,t.DefType.PATH,e)},fromSearch:function(r,n,i){return new ce(r,n,i,t.DefType.SEARCH,e)}},B(this,{UrlMatcher:nr,Param:ce})}return e.prototype.caseInsensitive=function(t){return this._isCaseInsensitive=R(t)?t:this._isCaseInsensitive},e.prototype.strictMode=function(t){return this._isStrictMode=R(t)?t:this._isStrictMode},e.prototype.defaultSquashPolicy=function(t){if(R(t)&&!0!==t&&!1!==t&&!x(t))throw new Error("Invalid squash policy: "+t+". Valid policies: false, true, arbitrary-string");return this._defaultSquashPolicy=R(t)?t:this._defaultSquashPolicy},e.prototype.compile=function(t,e){return new nr(t,this.paramTypes,this.paramFactory,this._getConfig(e))},e.prototype.isMatcher=function(t){if(!A(t))return!1;var e=!0;return z(nr.prototype,function(r,n){C(r)&&(e=e&&R(t[n])&&C(t[n]))}),e},e.prototype.type=function(t,e,r){var n=this.paramTypes.type(t,e,r);return R(e)?this:n},e.prototype.$get=function(){return this.paramTypes.enqueue=!1,this.paramTypes._flushTypeQueue(),this},e.prototype.dispose=function(){this.paramTypes.dispose()},e}(),or=function(){function t(t){this.router=t}return t.prototype.compile=function(t){return this.router.urlMatcherFactory.compile(t)},t.prototype.create=function(t,e){var r=this,n=w([[x,function(t){return n(r.compile(t))}],[v(nr),function(t){return r.fromUrlMatcher(t,e)}],[V,function(t){return r.fromState(t,r.router)}],[v(RegExp),function(t){return r.fromRegExp(t,e)}],[C,function(t){return new ar(t,e)}]]),i=n(t);if(!i)throw new Error("invalid 'what' in when()");return i},t.prototype.fromUrlMatcher=function(t,e){var r=e;x(e)&&(e=this.router.urlMatcherFactory.compile(e)),v(nr)(e)&&(r=function(t){return e.format(t)});var n={urlMatcher:t,matchPriority:function(e){var r=t.parameters().filter(function(t){return t.isOptional});return r.length?r.filter(function(t){return e[t.id]}).length/r.length:1e-6},type:"URLMATCHER"};return B(new ar(function(e){var r=t.exec(e.path,e.search,e.hash);return t.validates(r)&&r},r),n)},t.prototype.fromState=function(t,e){var r={state:t,type:"STATE"};return B(this.fromUrlMatcher(t.url,function(r){var n=e.stateService,i=e.globals;n.href(t,r)!==n.href(i.current,i.params)&&n.transitionTo(t,r,{inherit:!0,source:"url"})}),r)},t.prototype.fromRegExp=function(t,e){if(t.global||t.sticky)throw new Error("Rule RegExp must not be global or sticky");var r=x(e)?function(t){return e.replace(/\$(\$|\d{1,2})/,function(e,r){return t["$"===r?0:Number(r)]})}:e,n={regexp:t,type:"REGEXP"};return B(new ar(function(e){return t.exec(e.path)},r),n)},t.isUrlRule=function(t){return t&&["type","match","handler"].every(function(e){return R(t[e])})},t}(),ar=function(t,e){var r=this;this.match=t,this.type="RAW",this.matchPriority=function(t){return 0-r.$id},this.handler=e||K};var sr;sr=function(t,e){var r=function(t,e){return(e.priority||0)-(t.priority||0)}(t,e);return 0!==r||0!==(r=function(t,e){var r={STATE:4,URLMATCHER:4,REGEXP:3,RAW:2,OTHER:1};return(r[t.type]||0)-(r[e.type]||0)}(t,e))||0!==(r=function(t,e){return t.urlMatcher&&e.urlMatcher?nr.compare(t.urlMatcher,e.urlMatcher):0}(t,e))?r:function(t,e){var r={STATE:!0,URLMATCHER:!0};return r[t.type]&&r[e.type]?0:(t.$id||0)-(e.$id||0)}(t,e)};var ur=function(){function t(e){this._sortFn=sr,this._rules=[],this.interceptDeferred=!1,this._id=0,this._sorted=!1,this._router=e,this.urlRuleFactory=new or(e),Q(y(t.prototype),this,y(this))}return t.prototype.dispose=function(){this.listen(!1),this._rules=[],delete this._otherwiseFn},t.prototype.sort=function(t){this._rules=this.stableSort(this._rules,this._sortFn=t||this._sortFn),this._sorted=!0}
2,t.prototype.ensureSorted=function(){this._sorted||this.sort()},t.prototype.stableSort=function(t,e){var r=t.map(function(t,e){return{elem:t,idx:e}});return r.sort(function(t,r){var n=e(t.elem,r.elem);return 0===n?t.idx-r.idx:n}),r.map(function(t){return t.elem})},t.prototype.match=function(t){var e=this;this.ensureSorted(),t=B({path:"",search:{},hash:""},t);var r=this.rules();this._otherwiseFn&&r.push(this._otherwiseFn);for(var n,i=function(r){var n=r.match(t,e._router);return n&&{match:n,rule:r,weight:r.matchPriority(n)}},o=0;o<r.length&&(!n||0===this._sortFn(r[o],n.rule));o++){var a=i(r[o]);n=!n||a&&a.weight>n.weight?a:n}return n},t.prototype.sync=function(t){if(!t||!t.defaultPrevented){var e=this._router,r=e.urlService,n=e.stateService,i={path:r.path(),search:r.search(),hash:r.hash()},o=this.match(i);w([[x,function(t){return r.url(t,!0)}],[Zt.isDef,function(t){return n.go(t.state,t.params,t.options)}],[v(Zt),function(t){return n.go(t.state(),t.params(),t.options())}]])(o&&o.rule.handler(o.match,i,e))}},t.prototype.listen=function(t){var e=this;if(!1!==t)return this._stopFn=this._stopFn||this._router.urlService.onChange(function(t){return e.sync(t)});this._stopFn&&this._stopFn(),delete this._stopFn},t.prototype.update=function(t){var e=this._router.locationService;t?this.location=e.path():e.path()!==this.location&&e.url(this.location,!0)},t.prototype.push=function(t,e,r){var n=r&&!!r.replace;this._router.urlService.url(t.format(e||{}),n)},t.prototype.href=function(t,e,r){var n=t.format(e);if(null==n)return null;r=r||{absolute:!1};var i=this._router.urlService.config,o=i.html5Mode();if(o||null===n||(n="#"+i.hashPrefix()+n),n=function(t,e,r,n){return"/"===n?t:e?Oe(n)+t:r?n.slice(1)+t:t}(n,o,r.absolute,i.baseHref()),!r.absolute||!n)return n;var a=!o&&n?"/":"",s=i.port();return s=80===s||443===s?"":":"+s,[i.protocol(),"://",i.host(),s,a,n].join("")},t.prototype.rule=function(t){var e=this;if(!or.isUrlRule(t))throw new Error("invalid rule");return t.$id=this._id++,t.priority=t.priority||0,this._rules.push(t),this._sorted=!1,function(){return e.removeRule(t)}},t.prototype.removeRule=function(t){tt(this._rules,t)},t.prototype.rules=function(){return this.ensureSorted(),this._rules.slice()},t.prototype.otherwise=function(t){var e=cr(t);this._otherwiseFn=this.urlRuleFactory.create(y(!0),e),this._sorted=!1},t.prototype.initial=function(t){var e=cr(t);this.rule(this.urlRuleFactory.create(function(t,e){return 0===e.globals.transitionHistory.size()&&!!/^\/?$/.exec(t.path)},e))},t.prototype.when=function(t,e,r){var n=this.urlRuleFactory.create(t,e);return R(r&&r.priority)&&(n.priority=r.priority),this.rule(n),n},t.prototype.deferIntercept=function(t){void 0===t&&(t=!0),this.interceptDeferred=t},t}();function cr(t){if(!(C(t)||x(t)||v(Zt)(t)||Zt.isDef(t)))throw new Error("'handler' must be a string, function, TargetState, or have a state: 'newtarget' property");return C(t)?t:y(t)}var lr=function(){function t(){var t=this;this._uiViews=[],this._viewConfigs=[],this._viewConfigFactories={},this._pluginapi={_rootViewContext:this._rootViewContext.bind(this),_viewConfigFactory:this._viewConfigFactory.bind(this),_registeredUIViews:function(){return t._uiViews},_activeViewConfigs:function(){return t._viewConfigs}}}return t.prototype._rootViewContext=function(t){return this._rootContext=t||this._rootContext},t.prototype._viewConfigFactory=function(t,e){this._viewConfigFactories[t]=e},t.prototype.createViewConfig=function(t,e){var r=this._viewConfigFactories[e.$type];if(!r)throw new Error("ViewService: No view config factory registered for type "+e.$type);var n=r(t,e);return O(n)?n:[n]},t.prototype.deactivateViewConfig=function(t){Qt.traceViewServiceEvent("<- Removing",t),tt(this._viewConfigs,t)},t.prototype.activateViewConfig=function(t){Qt.traceViewServiceEvent("-> Registering",t),this._viewConfigs.push(t)},t.prototype.sync=function(){var e=this,r=this._uiViews.map(function(t){return[t.fqn,t]}).reduce(Ct,{});function n(t){for(var e=t.viewDecl.$context,r=0;++r&&e.parent;)e=e.parent;return r}var i=o(function(t,e,r,n){return e*(t(r)-t(n))}),a=this._uiViews.sort(i(function(t){var e=function(t){return t&&t.parent?e(t.parent)+1:1};return 1e4*t.fqn.split(".").length+e(t.creationContext)},1)).map(function(o){var a=e._viewConfigs.filter(t.matches(r,o));return a.length>1&&a.sort(i(n,-1)),[o,a[0]]});Qt.traceViewSync(a),a.forEach(function(t){var r=t[0],n=t[1];-1!==e._uiViews.indexOf(r)&&r.configUpdated(n)})},t.prototype.registerUIView=function(t){Qt.traceViewServiceUIViewEvent("-> Registering",t);var e=this._uiViews;return e.filter(function(e){return e.fqn===t.fqn&&e.$type===t.$type}).length&&Qt.traceViewServiceUIViewEvent("!!!! duplicate uiView named:",t),e.push(t),this.sync(),function(){-1!==e.indexOf(t)?(Qt.traceViewServiceUIViewEvent("<- Deregistering",t),tt(e)(t)):Qt.traceViewServiceUIViewEvent("Tried removing non-registered uiView",t)}},t.prototype.available=function(){return this._uiViews.map(u("fqn"))},t.prototype.active=function(){return this._uiViews.filter(u("$config")).map(u("name"))},t.normalizeUIViewTarget=function(t,e){void 0===e&&(e="");var r=e.split("@"),n=r[0]||"$default",i=x(r[1])?r[1]:"^",o=/^(\^(?:\.\^)*)\.(.*$)/.exec(n);if(o&&(i=o[1],n=o[2]),"!"===n.charAt(0)&&(n=n.substr(1),i=""),/^(\^(?:\.\^)*)$/.exec(i)){var a=i.split(".").reduce(function(t,e){return t.parent},t);i=a.name}else"."===i&&(i=t.name);return{uiViewName:n,uiViewContextAnchor:i}},t.matches=function(t,e){return function(r){if(e.$type!==r.viewDecl.$type)return!1;var n=r.viewDecl,i=n.$uiViewName.split("."),o=e.fqn.split(".");if(!W(i,o.slice(0-i.length)))return!1;var a=1-i.length||void 0,s=o.slice(0,a).join("."),u=t[s].creationContext;return n.$uiViewContextAnchor===(u&&u.name)}},t}(),pr=function(){function t(){this.params=new qe,this.lastStartedTransitionId=-1,this.transitionHistory=new Ft([],1),this.successfulTransitions=new Ft([],1)}return t.prototype.dispose=function(){this.transitionHistory.clear(),this.successfulTransitions.clear(),this.transition=null},t}(),fr=function(t){return t.reduce(function(t,e){return t[e]=N(e),t},{dispose:J})},hr=["url","path","search","hash","onChange"],dr=["port","protocol","host","baseHref","html5Mode","hashPrefix"],mr=["type","caseInsensitive","strictMode","defaultSquashPolicy"],vr=["sort","when","initial","otherwise","rules","rule","removeRule"],gr=["deferIntercept","listen","sync","match"],yr=function(){function t(t,e){void 0===e&&(e=!0),this.router=t,this.rules={},this.config={};var r=function(){return t.locationService};Q(r,this,r,hr,e);var n=function(){return t.locationConfig};Q(n,this.config,n,dr,e);var i=function(){return t.urlMatcherFactory};Q(i,this.config,i,mr);var o=function(){return t.urlRouter};Q(o,this.rules,o,vr),Q(o,this,o,gr)}return t.prototype.url=function(t,e,r){},t.prototype.path=function(){},t.prototype.search=function(){},t.prototype.hash=function(){},t.prototype.onChange=function(t){},t.prototype.parts=function(){return{path:this.path(),search:this.search(),hash:this.hash()}},t.prototype.dispose=function(){},t.prototype.sync=function(t){},t.prototype.listen=function(t){},t.prototype.deferIntercept=function(t){},t.prototype.match=function(t){},t.locationServiceStub=fr(hr),t.locationConfigStub=fr(dr),t}(),_r=0,wr=function(){function t(t,e){void 0===t&&(t=yr.locationServiceStub),void 0===e&&(e=yr.locationConfigStub),this.locationService=t,this.locationConfig=e,this.$id=_r++,this._disposed=!1,this._disposables=[],this.trace=Qt,this.viewService=new lr,this.transitionService=new Nr(this),this.globals=new pr,this.urlMatcherFactory=new ir,this.urlRouter=new ur(this),this.stateRegistry=new tr(this),this.stateService=new jr(this),this.urlService=new yr(this),this._plugins={},this.viewService._pluginapi._rootViewContext(this.stateRegistry.root()),this.globals.$current=this.stateRegistry.root(),this.globals.current=this.globals.$current.self,this.disposable(this.globals),this.disposable(this.stateService),this.disposable(this.stateRegistry),this.disposable(this.transitionService),this.disposable(this.urlRouter),this.disposable(t),this.disposable(e)}return t.prototype.disposable=function(t){this._disposables.push(t)},t.prototype.dispose=function(t){var e=this;t&&C(t.dispose)?t.dispose(this):(this._disposed=!0,this._disposables.slice().forEac
2h(function(t){try{"function"==typeof t.dispose&&t.dispose(e),tt(e._disposables,t)}catch(t){}}))},t.prototype.plugin=function(t,e){void 0===e&&(e={});var r=new t(this,e);if(!r.name)throw new Error("Required property `name` missing on plugin: "+r);return this._disposables.push(r),this._plugins[r.name]=r},t.prototype.getPlugin=function(t){return t?this._plugins[t]:mt(this._plugins)},t}();function br(t){t.addResolvable({token:wr,deps:[],resolveFn:function(){return t.router},data:t.router},""),t.addResolvable({token:Se,deps:[],resolveFn:function(){return t},data:t},""),t.addResolvable({token:"$transition$",deps:[],resolveFn:function(){return t},data:t},""),t.addResolvable({token:"$stateParams",deps:[],resolveFn:function(){return t.params()},data:t.params()},""),t.entering().forEach(function(e){t.addResolvable({token:"$state$",deps:[],resolveFn:function(){return e},data:e},e)})}var Sr=function(t){var e=t.to().redirectTo;if(e){var r=t.router.stateService;return C(e)?j.$q.when(e(t)).then(n):n(e)}function n(e){if(e)return e instanceof Zt?e:x(e)?r.target(e,t.params(),t.options()):e.state||e.params?r.target(e.state||t.to(),e.params||t.params(),t.options()):void 0}};function Pr(t){return function(e,r){return(0,r.$$state()[t])(e,r)}}var Er=Pr("onExit"),Tr=Pr("onRetain"),Rr=Pr("onEnter"),$r=function(t){return new _e(t.treeChanges().to).resolvePath("EAGER",t).then(J)},kr=function(t,e){return new _e(t.treeChanges().to).subContext(e.$$state()).resolvePath("LAZY",t).then(J)},Cr=function(t){var e=j.$q,r=t.views("entering");if(r.length)return e.all(r.map(function(t){return e.when(t.load())})).then(J)},Ir=function(t){var e=t.views("entering"),r=t.views("exiting");if(e.length||r.length){var n=t.router.viewService;r.forEach(function(t){return n.deactivateViewConfig(t)}),e.forEach(function(t){return n.activateViewConfig(t)}),n.sync()}},xr=function(t){var e=t.router.globals,r=function(){e.transition===t&&(e.transition=null)};t.onSuccess({},function(){e.successfulTransitions.enqueue(t),e.$current=t.$to(),e.current=e.$current.self,xt(t.params(),e.params)},{priority:1e4}),t.promise.then(r,r)},Ar=function(t){var e=t.options(),r=t.router.stateService,n=t.router.urlRouter;if("url"!==e.source&&e.location&&r.$current.navigable){var i={replace:"replace"===e.location};n.push(r.$current.navigable.url,r.params,i)}n.update(!0)},Or=function(t){var e=t.router;var r=t.entering().filter(function(t){return!!t.$$state().lazyLoad}).map(function(e){return Dr(t,e)});return j.$q.all(r).then(function(){if("url"!==t.originalTransition().options().source){var r=t.targetState();return e.stateService.target(r.identifier(),r.params(),r.options())}var n=e.urlService,i=n.match(n.parts()),o=i&&i.rule;if(o&&"STATE"===o.type){var a=o.state,s=i.match;return e.stateService.target(a,s,t.options())}e.urlService.sync()})};function Dr(t,e){var r=e.$$state().lazyLoad,n=r._promise;if(!n){n=r._promise=j.$q.when(r(t,e)).then(function(e){return e&&Array.isArray(e.states)&&e.states.forEach(function(e){return t.router.stateRegistry.register(e)}),e}).then(function(t){return delete e.lazyLoad,delete e.$$state().lazyLoad,delete r._promise,t},function(t){return delete r._promise,j.$q.reject(t)})}return n}var Hr=function(t,e,r,n,i,o,a,s){void 0===i&&(i=!1),void 0===o&&(o=Yt.HANDLE_RESULT),void 0===a&&(a=Yt.REJECT_ERROR),void 0===s&&(s=!1),this.name=t,this.hookPhase=e,this.hookOrder=r,this.criteriaMatchPath=n,this.reverseSort=i,this.getResultHandler=o,this.getErrorHandler=a,this.synchronous=s};function Vr(t){var e=t._ignoredReason();if(e){Qt.traceTransitionIgnored(t);var r=t.router.globals.transition;return"SameAsCurrent"===e&&r&&r.abort(),Nt.ignored().toPromise()}}function Fr(t){if(!t.valid())throw new Error(t.error())}var Ur={location:!0,relative:null,inherit:!1,notify:!0,reload:!1,custom:{},current:function(){return null},source:"unknown"},Nr=function(){function e(t){this._transitionCount=0,this._eventTypes=[],this._registeredHooks={},this._criteriaPaths={},this._router=t,this.$view=t.viewService,this._deregisterHookFns={},this._pluginapi=Q(y(this),{},y(this),["_definePathType","_defineEvent","_getPathTypes","_getEvents","getHooks"]),this._defineCorePaths(),this._defineCoreEvents(),this._registerCoreTransitionHooks()}return e.prototype.onCreate=function(t,e,r){},e.prototype.onBefore=function(t,e,r){},e.prototype.onStart=function(t,e,r){},e.prototype.onExit=function(t,e,r){},e.prototype.onRetain=function(t,e,r){},e.prototype.onEnter=function(t,e,r){},e.prototype.onFinish=function(t,e,r){},e.prototype.onSuccess=function(t,e,r){},e.prototype.onError=function(t,e,r){},e.prototype.dispose=function(t){mt(this._registeredHooks).forEac
2h(function(t){return t.forEach(function(e){e._deregistered=!0,tt(t,e)})})},e.prototype.create=function(t,e){return new Se(t,e,this._router)},e.prototype._defineCoreEvents=function(){var e=t.TransitionHookPhase,r=Yt,n=this._criteriaPaths,i=!1,o=!0;this._defineEvent("onCreate",e.CREATE,0,n.to,i,r.LOG_REJECTED_RESULT,r.THROW_ERROR,o),this._defineEvent("onBefore",e.BEFORE,0,n.to),this._defineEvent("onStart",e.RUN,0,n.to),this._defineEvent("onExit",e.RUN,100,n.exiting,!0),this._defineEvent("onRetain",e.RUN,200,n.retained),this._defineEvent("onEnter",e.RUN,300,n.entering),this._defineEvent("onFinish",e.RUN,400,n.to),this._defineEvent("onSuccess",e.SUCCESS,0,n.to,i,r.LOG_REJECTED_RESULT,r.LOG_ERROR,o),this._defineEvent("onError",e.ERROR,0,n.to,i,r.LOG_REJECTED_RESULT,r.LOG_ERROR,o)},e.prototype._defineCorePaths=function(){var e=t.TransitionHookScope.STATE,r=t.TransitionHookScope.TRANSITION;this._definePathType("to",r),this._definePathType("from",r),this._definePathType("exiting",e),this._definePathType("retained",e),this._definePathType("entering",e)},e.prototype._defineEvent=function(t,e,r,n,i,o,a,s){void 0===i&&(i=!1),void 0===o&&(o=Yt.HANDLE_RESULT),void 0===a&&(a=Yt.REJECT_ERROR),void 0===s&&(s=!1);var u=new Hr(t,e,r,n,i,o,a,s);this._eventTypes.push(u),re(this,this,u)},e.prototype._getEvents=function(t){return(R(t)?this._eventTypes.filter(function(e){return e.hookPhase===t}):this._eventTypes.slice()).sort(function(t,e){var r=t.hookPhase-e.hookPhase;return 0===r?t.hookOrder-e.hookOrder:r})},e.prototype._definePathType=function(t,e){this._criteriaPaths[t]={name:t,scope:e}},e.prototype._getPathTypes=function(){return this._criteriaPaths},e.prototype.getHooks=function(t){return this._registeredHooks[t]},e.prototype._registerCoreTransitionHooks=function(){var t=this._deregisterHookFns;t.addCoreResolves=this.onCreate({},br),t.ignored=function(t){return t.onBefore({},Vr,{priority:-9999})}(this),t.invalid=function(t){return t.onBefore({},Fr,{priority:-1e4})}(this),t.redirectTo=function(t){return t.onStart({to:function(t){return!!t.redirectTo}},Sr)}(this),t.onExit=function(t){return t.onExit({exiting:function(t){return!!t.onExit}},Er)}(this),t.onRetain=function(t){return t.onRetain({retained:function(t){return!!t.onRetain}},Tr)}(this),t.onEnter=function(t){return t.onEnter({entering:function(t){return!!t.onEnter}},Rr)}(this),t.eagerResolve=function(t){return t.onStart({},$r,{priority:1e3})}(this),t.lazyResolve=function(t){return t.onEnter({entering:y(!0)},kr,{priority:1e3})}(this),t.loadViews=function(t){return t.onFinish({},Cr)}(this),t.activateViews=function(t){return t.onSuccess({},Ir)}(this),t.updateGlobals=function(t){return t.onCreate({},xr)}(this),t.updateUrl=function(t){return t.onSuccess({},Ar,{priority:9999})}(this),t.lazyLoad=function(t){return t.onBefore({entering:function(t){return!!t.lazyLoad}},Or)}(this)},e}(),jr=function(){function e(t){this.router=t,this.invalidCallbacks=[],this._defaultErrorHandler=function(t){t instanceof Error&&t.stack?(console.error(t),console.error(t.stack)):t instanceof Nt?(console.error(t.toString()),t.detail&&t.detail.stack&&console.error(t.detail.stack)):console.error(t)};var r=Object.keys(e.prototype).filter(p(X(["current","$current","params","transition"])));Q(y(e.prototype),this,y(this),r)}return Object.defineProperty(e.prototype,"transition",{get:function(){return this.router.globals.transition},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"params",{get:function(){return this.router.globals.params},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"current",{get:function(){return this.router.globals.current},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"$current",{get:function(){return this.router.globals.$current},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){this.defaultErrorHandler(J),this.invalidCallbacks=[]},e.prototype._handleInvalidTargetState=function(t,e){var r=this,n=pe.makeTargetState(this.router.stateRegistry,t),i=this.router.globals,o=function(){return i.transitionHistory.peekTail()},a=o(),s=new Ft(this.invalidCallbacks.slice()),u=new _e(t).injector(),c=function(t){if(t instanceof Zt){var e=t;return(e=r.target(e.identifier(),e.params(),e.options())).valid()?o()!==a?Nt.superseded().toPromise():r.transitionTo(e.identifier(),e.params(),e.options()):Nt.invali
2d(e.error()).toPromise()}};return function t(){var r=s.dequeue();return void 0===r?Nt.invalid(e.error()).toPromise():j.$q.when(r(e,n,u)).then(c).then(function(e){return e||t()})}()},e.prototype.onInvalid=function(t){return this.invalidCallbacks.push(t),function(){tt(this.invalidCallbacks)(t)}.bind(this)},e.prototype.reload=function(t){return this.transitionTo(this.current,this.params,{reload:!R(t)||t,inherit:!1,notify:!1})},e.prototype.go=function(t,e,r){var n=ot(r,{relative:this.$current,inherit:!0},Ur);return this.transitionTo(t,e,n)},e.prototype.target=function(t,e,r){if(void 0===r&&(r={}),A(r.reload)&&!r.reload.name)throw new Error("Invalid reload state object");var n=this.router.stateRegistry;if(r.reloadState=!0===r.reload?n.root():n.matcher.find(r.reload,r.relative),r.reload&&!r.reloadState)throw new Error("No such reload state '"+(x(r.reload)?r.reload:r.reload.name)+"'");return new Zt(this.router.stateRegistry,t,e,r)},e.prototype.getCurrentPath=function(){var t=this,e=this.router.globals.successfulTransitions.peekTail();return e?e.treeChanges().to:[new le(t.router.stateRegistry.root())]},e.prototype.transitionTo=function(e,r,n){var i=this;void 0===r&&(r={}),void 0===n&&(n={});var o=this.router,a=o.globals;n=ot(n,Ur),n=B(n,{current:function(){return a.transition}});var s=this.target(e,r,n),u=this.getCurrentPath();if(!s.exists())return this._handleInvalidTargetState(u,s);if(!s.valid())return Vt(s.error());var c=function(e){return function(r){if(r instanceof Nt){var n=o.globals.lastStartedTransitionId===e.$id;
2if(r.type===t.RejectType.IGNORED)return n&&o.urlRouter.update(),j.$q.when(a.current);var s=r.detail;if(r.type===t.RejectType.SUPERSEDED&&r.redirected&&s instanceof Zt){var u=e.redirect(s);return u.run().catch(c(u))}if(r.type===t.RejectType.ABORTED)return n&&o.urlRouter.update(),j.$q.reject(r)}return i.defaultErrorHandler()(r),j.$q.reject(r)}},l=this.router.transitionService.create(u,s),p=l.run().catch(c(l));return Ht(p),B(p,{transition:l})},e.prototype.is=function(t,e,r){r=ot(r,{relative:this.$current});var n=this.router.stateRegistry.matcher.find(t,r.relative);if(R(n)){if(this.$current!==n)return!1;if(!e)return!0;var i=n.parameters({inherit:!0,matchingKeys:e});return ce.equals(i,ce.values(i,e),this.params)}},e.prototype.includes=function(t,e,r){r=ot(r,{relative:this.$current});var n=x(t)&&b.fromString(t);if(n){if(!n.matches(this.$current.name))return!1;t=this.$current.name}var i=this.router.stateRegistry.matcher.find(t,r.relative),o=this.$current.includes;if(R(i)){if(!R(o[i.name]))return!1;if(!e)return!0;var a=i.parameters({inherit:!0,matchingKeys:e});return ce.equals(a,ce.values(a,e),this.params)}},e.prototype.href=function(t,e,r){r=ot(r,{lossy:!0,inherit:!0,absolute:!1,relative:this.$current}),e=e||{};var n=this.router.stateRegistry.matcher.find(t,r.relative);if(!R(n))return null;r.inherit&&(e=this.params.$inherit(e,this.$current,n));var i=n&&r.lossy?n.navigable:n;return i&&void 0!==i.url&&null!==i.url?this.router.urlRouter.href(i.url,e,{absolute:r.absolute}):null},e.prototype.defaultErrorHandler=function(t){return this._defaultErrorHandler=t||this._defaultErrorHandler},e.prototype.get=function(t,e){var r=this.router.stateRegistry;return 0===arguments.length?r.get():r.get(t,e||this.$current)},e.prototype.lazyLoad=function(t,e){var r=this.get(t);if(!r||!r.lazyLoad)throw new Error("Can not lazy load "+t);var n=this.getCurrentPath(),i=pe.makeTargetState(this.router.stateRegistry,n);return Dr(e=e||this.router.transitionService.create(n,i),r)},e}(),Lr={when:function(t){return new Promise(function(e,r){return e(t)})},reject:function(t){return new Promise(function(e,r){r(t)})},defer:function(){var t={};return t.promise=new Promise(function(e,r){t.resolve=e,t.reject=r}),t},all:function(t){if(O(t))return Promise.all(t);if(A(t)){var e=Object.keys(t).map(function(e){return t[e].then(function(t){return{key:e,val:t}})});return Lr.all(e).then(function(t){return t.reduce(function(t,e){return t[e.key]=e.val,t},{})})}}},qr={},Mr=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm,Gr=/([^\s,]+)/g,zr={get:function(t){return qr[t]},has:function(t){return null!=zr.get(t)},invoke:function(t,e,r){var n=B({},qr,r||{}),i=zr.annotate(t),o=Et(function(t){return n.hasOwnProperty(t)},function(t){return"DI can't find injectable: '"+t+"'"}),a=i.filter(o).map(function(t){return n[t]});return C(t)?t.apply(e,a):t.slice(-1)[0].apply(e,a)},annotate:function(t){if(!F(t))throw new Error("Not an injectable function: "+t);if(t&&t.$inject)return t.$inject;if(O(t))return t.slice(0,-1);var e=t.toString().replace(Mr,"");return e.slice(e.indexOf("(")+1,e.indexOf(")")).match(Gr)||[]}},Br=function(t,e){var r=e[0],n=e[1];return t.hasOwnProperty(r)?O(t[r])?t[r].push(n):t[r]=[t[r],n]:t[r]=n,t},Wr=function(t){return t.split("&").filter(K).map(Ve).reduce(Br,{})};function Kr(t){var e=function(t){return t||""},r=De(t).map(e),n=r[0],i=r[1],o=He(n).map(e);return{path:o[0],search:o[1],hash:i,url:t}}var Jr=function(t){var e=t.path(),r=t.search(),n=t.hash(),i=Object.keys(r).map(function(t){var e=r[t];return(O(e)?e:[e]).map(function(e){return t+"="+e})}).reduce(yt,[]).join("&");return e+(i?"?"+i:"")+(n?"#"+n:"")};function Qr(t,e,r,n){return function(i){var o=i.locationService=new r(i),a=i.locationConfig=new n(i,e);return{name:t,service:o,configuration:a,dispose:function(t){t.dispose(o),t.dispose(a)}}}}var Zr,Xr=function(){function t(t,e){var r=this;this.fireAfterUpdate=e,this._listener=function(t){return r._listeners.forEach(function(e){return e(t)})},this._listeners=[],this.hash=function(){return Kr(r._get()).hash},this.path=function(){return Kr(r._get()).path},this.search=function(){return Wr(Kr(r._get()).search)},this._location=L.location,this._history=L.history}return t.prototype.url=function(t,e){return void 0===e&&(e=!0),R(t)&&t!==this._get()&&(this._set(null,null,t,e),this.fireAfterUpdate&&this._listeners.forEac
2h(function(e){return e({url:t})})),Jr(this)},t.prototype.onChange=function(t){var e=this;return this._listeners.push(t),function(){return tt(e._listeners,t)}},t.prototype.dispose=function(t){it(this._listeners)},t}(),Yr=(Zr=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},function(t,e){function r(){this.constructor=t}Zr(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),tn=function(t){function e(e){var r=t.call(this,e,!1)||this;return L.addEventListener("hashchange",r._listener,!1),r}return Yr(e,t),e.prototype._get=function(){return Fe(this._location.hash)},e.prototype._set=function(t,e,r,n){this._location.hash=r},e.prototype.dispose=function(e){t.prototype.dispose.call(this,e),L.removeEventListener("hashchange",this._listener)},e}(Xr),en=function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),rn=function(t){function e(e){return t.call(this,e,!0)||this}return en(e,t),e.prototype._get=function(){return this._url},e.prototype._set=function(t,e,r,n){this._url=r},e}(Xr),nn=function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),on=function(t){function e(e){var r=t.call(this,e,!0)||this;return r._config=e.urlService.config,L.addEventListener("popstate",r._listener,!1),r}return nn(e,t),e.prototype._getBasePrefix=function(){return Oe(this._config.baseHref())},e.prototype._get=function(){var t=this._location,e=t.pathname,r=t.hash,n=t.search;n=He(n)[1],r=De(r)[1];var i=this._getBasePrefix(),o=e===this._config.baseHref(),a=e.startsWith(i);return(e=o?"/":a?e.substring(i.length):e)+(n?"?"+n:"")+(r?"#"+r:"")},e.prototype._set=function(t,e,r,n){var i=this._getBasePrefix()+r;n?this._history.replaceState(t,e,i):this._history.pushState(t,e,i)},e.prototype.dispose=function(e){t.prototype.dispose.call(this,e),L.removeEventListener("popstate",this._listener)},e}(Xr),an=function(){var t=this;this._baseHref="",this._port=80,this._protocol="http",this._host="localhost",this._hashPrefix="",this.port=function(){return t._port},this.protocol=function(){return t._protocol},this.host=function(){return t._host},this.baseHref=function(){return t._baseHref},this.html5Mode=function(){return!1},this.hashPrefix=function(e){return R(e)?t._hashPrefix=e:t._hashPrefix},this.dispose=J},sn=function(){function t(t,e){void 0===e&&(e=!1),this._isHtml5=e,this._baseHref=void 0,this._hashPrefix=""}return t.prototype.port=function(){return location.port?Number(location.port):"https"===this.protocol()?443:80},t.prototype.protocol=function(){return location.protocol.replace(/:/g,"")},t.prototype.host=function(){return location.hostname},t.prototype.html5Mode=function(){return this._isHtml5},t.prototype.hashPrefix=function(t){return R(t)?this._hashPrefix=t:this._hashPrefix},t.prototype.baseHref=function(t){return R(t)?this._baseHref=t:R(this._baseHref)?this._baseHref:this.applyDocumentBaseHref()},t.prototype.applyDocumentBaseHref=function(){var t=document.getElementsByTagName("base")[0];return this._baseHref=t?t.href.substr(location.origin.length):""},t.prototype.dispose=function(){},t}();function un(t){return j.$injector=zr,j.$q=Lr,{name:"vanilla.services",$q:Lr,$injector:zr,dis
vendor: 8,145 bytes, line 2
2pose:function(){return null}}}var cn=Qr("vanilla.hashBangLocation",!1,tn,sn),ln=Qr("vanilla.pushStateLocation",!0,on,sn),pn=Qr("vanilla.memoryLocation",!1,rn,an),fn=function(){function t(){}return t.prototype.dispose=function(t){},t}(),hn=Object.freeze({root:L,fromJson:M,toJson:G,forEach:z,extend:B,equals:W,identity:K,noop:J,createProxyFunctions:Q,inherit:Z,inArray:X,_inArray:Y,removeFrom:tt,_removeFrom:et,pushTo:rt,_pushTo:nt,deregAll:it,defaults:ot,mergeR:at,ancestors:st,pick:ut,omit:ct,pluck:lt,filter:pt,find:ft,mapObj:ht,map:dt,values:mt,allTrueR:vt,anyTrueR:gt,unnestR:yt,flattenR:_t,pushR:wt,uniqR:bt,unnest:St,flatten:Pt,assertPredicate:Et,assertMap:Tt,assertFn:Rt,pairs:$t,arrayTuples:kt,applyPairs:Ct,tail:It,copy:xt,_extend:At,silenceUncaughtInPromise:Ht,silentRejection:Vt,notImplemented:N,services:j,Glob:b,curry:o,compose:a,pipe:s,prop:u,propEq:c,parse:l,not:p,and:f,or:h,all:d,any:m,is:v,eq:g,val:y,invoke:_,pattern:w,isUndefined:T,isDefined:R,isNull:$,isNullOrUndefined:k,isFunction:C,isNumber:I,isString:x,isObject:A,isArray:O,isDate:D,isRegExp:H,isState:V,isInjectable:F,isPromise:U,Queue:Ft,maxLength:Pe,padString:Ee,kebobString:Te,functionToString:Re,fnToString:$e,stringify:Ie,beforeAfterSubstr:xe,hostRegex:Ae,stripFile:Oe,splitHash:De,splitQuery:He,splitEqual:Ve,trimHashVal:Fe,splitOnDelim:Ue,joinNeighborsR:Ne,get Category(){return t.Category},Trace:Jt,trace:Qt,get DefType(){return t.DefType},Param:ce,ParamTypes:Le,StateParams:qe,ParamType:ie,PathNode:le,PathUtils:pe,resolvePolicies:de,defaultResolvePolicy:fe,Resolvable:he,NATIVE_INJECTOR_TOKEN:ye,ResolveContext:_e,resolvablesBuilder:Qe,StateBuilder:Ze,StateObject:S,StateMatcher:Xe,StateQueueManager:Ye,StateRegistry:tr,StateService:jr,TargetState:Zt,get TransitionHookPhase(){return t.TransitionHookPhase},get TransitionHookScope(){return t.TransitionHookScope},HookBuilder:ne,matchState:te,RegisteredHook:ee,makeEvent:re,get RejectType(){return t.RejectType},Rejection:Nt,Transition:Se,TransitionHook:Yt,TransitionEventType:Hr,defaultTransOpts:Ur,TransitionService:Nr,UrlMatcher:nr,UrlMatcherFactory:ir,UrlRouter:ur,UrlRuleFactory:or,BaseUrlRule:ar,UrlService:yr,ViewService:lr,UIRouterGlobals:pr,UIRouter:wr,$q:Lr,$injector:zr,BaseLocationServices:Xr,HashLocationService:tn,MemoryLocationService:rn,PushStateLocationService:on,MemoryLocationConfig:an,BrowserLocationConfig:sn,keyValsToObjectR:Br,getParams:Wr,parseUrl:Kr,buildUrl:Jr,locationPluginFactory:Qr,servicesPlugin:un,hashLocationPlugin:cn,pushStateLocationPlugin:ln,memoryLocationPlugin:pn,UIRouterPluginBase:fn});function dn(){var t=null;return function(e,r){return t=t||j.$injector.get("$templateFactory"),[new yn(e,r,t)]}}var mn=function(t,e){return t.reduce(function(t,r){return t||R(e[r])},!1)};function vn(t){if(!t.parent)return{};var e=["component","bindings","componentProvider"],r=["templateProvider","templateUrl","template","notify","async"].concat(["controller","controllerProvider","controllerAs","resolveAs"]),n=e.concat(r);if(R(t.views)&&mn(n,t))throw new Error("State '"+t.name+"' has a 'views' object. It cannot also have \"view properties\" at the state level.  Move the following properties into a view (in the 'views' object):  "+n.filter(function(e){return R(t[e])}).join(", "));var i={},o=t.views||{$default:ut(t,n)};return z(o,function(n,o){if(o=o||"$default",x(n)&&(n={component:n}),n=B({},n),mn(e,n)&&mn(r,n))throw new Error("Cannot combine: "+e.join("|")+" with: "+r.join("|")+" in stateview: '"+o+"@"+t.name+"'");n.resolveAs=n.resolveAs||"$resolve",n.$type="ng1",n.$context=t,n.$name=o;var a=lr.normalizeUIViewTarget(n.$context,n.$name);n.$uiViewName=a.uiViewName,n.$uiViewContextAnchor=a.uiViewContextAnchor,i[o]=n}),i}var gn=0,yn=function(){function t(t,e,r){var n=this;this.path=t,this.viewDecl=e,this.factory=r,this.$id=gn++,this.loaded=!1,this.getTemplate=function(t,e){return n.component?n.factory.makeComponentTemplate(t,e,n.component,n.viewDecl.bindings):n.template}}return t.prototype.load=function(){var t=this,e=j.$q,r=new _e(this.path),n=this.path.reduce(function(t,e){return B(t,e.paramValues)},{}),i={template:e.when(this.factory.fromConfig(this.viewDecl,n,r)),controller:e.when(this.getController(r))};return e.all(i).then(function(e){return Qt.traceViewServiceEvent("Loaded",t),t.controller=e.controller,B(t,e.template),t})},t.prototype.getController=function(t){var e=this.viewDecl.controllerProvider;if(!F(e))return this.viewDecl.controller;var r=j.$injector.annotate(e),n=O(e)?It(e):e;return new he("",n,r).get(t)},t}(),_n=function(){function t(){var t=this;this._useHttp=i.version.minor<3,this.$get=["$http","$templateCache","$injector",function(e,r,n){return t.$templateRequest=n.has&&n.has("$templateRequest")&&n.get("$templateRequest"),t.$http=e,t.$templateCache=r,t}]}return t.prototype.useHttpService=function(t){this._useHttp=t},t.prototype.fromConfig=function(t,e,r){var n=function(t){return j.$q.when(t).then(function(t){return{template:t}})},i=function(t){return j.$q.when(t).then(function(t){return{component:t}})};return R(t.template)?n(this.fromString(t.template,e)):R(t.templateUrl)?n(this.fromUrl(t.templateUrl,e)):R(t.templateProvider)?n(this.fromProvider(t.templateProvider,e,r)):R(t.component)?i(t.component):R(t.componentProvider)?i(this.fromComponentProvider(t.componentProvider,e,r)):n("<ui-view></ui-view>")},t.prototype.fromString=function(t,e){return C(t)?t(e):t},t.prototype.fromUrl=function(t,e){return C(t)&&(t=t(e)),null==t?null:this._useHttp?this.$http.get(t,{cache:this.$templateCache,headers:{Accept:"text/html"}}).then(function(t){return t.data}):this.$templateRequest(t)},t.prototype.fromProvider=function(t,e,r){var n=j.$injector.annotate(t),i=O(t)?It(t):t;return new he("",i,n).get(r)},t.prototype.fromComponentProvider=function(t,e,r){var n=j.$injector.annotate(t),i=O(t)?It(t):t;return new he("",i,n).get(r)},t.prototype.makeComponentTemplate=function(t,e,r,n){n=n||{};var o=i.version.minor>=3?"::":"",a=function(t){var e=Te(t);return/^(x|data)-/.exec(e)?"x-"+e:e},s=function(t){var e=j.$injector.get(t+"Directive");if(!e||!e.length)throw new Error("Unable to find component named '"+t+"'");return e.map(wn).reduce(yt,[])}(r).map(function(r){var i=r.name,s=r.type,u=a(i);if(t.attr(u)&&!n[i])return u+"='"+t.attr(u)+"'";var c=n[i]||i;if("@"===s)return u+"='{{"+o+"$resolve."+c+"}}'";if("&"===s){var l=e.getResolvable(c),p=l&&l.data,f=p&&j.$injector.annotate(p)||[];return u+"='$resolve."+c+(O(p)?"["+(p.length-1)+"]":"")+"("+f.join(",")+")'"}return u+"='"+o+"$resolve."+c+"'"}).join(" "),u=a(r);return"<"+u+" "+s+"></"+u+">"},t}();var wn=function(t){return A(t.bindToController)?bn(t.bindToController):bn(t.scope)},bn=function(t){return Object.keys(t||{}).map(function(e){return[e,/^([=<@&])[?]?(.*)/.exec(t[e])]}).filter(function(t){return R(t)&&O(t[1])}).map(function(t){return{name:t[1][2]||t[0],type:t[1][1]}})},Sn=function(){function t(e,r){this.stateRegistry=e,this.stateService=r,Q(y(t.prototype),this,y(this))}return t.prototype.decorator=function(t,e){return this.stateRegistry.decorator(t,e)||this},t.prototype.state=function(t,e){return A(t)?e=t:e.name=t,this.stateRegistry.register(e),this},t.prototype.onInvalid=function(t){return this.stateService.onInvalid(t)},t}(),Pn=function(t){return function(e,r){var n=e[t],i="onExit"===t?"from":"to";return n?function(t,e){var r=new _e(t.treeChanges(i)),o=B(jn(r),{$state$:e,$transition$:t});return j.$injector.invoke(n,this,o)}:void 0}},En=function(){function t(t){this._urlListeners=[],this.$locationProvider=t;var e=y(t);Q(e,this,e,["hashPrefix"])}return t.prototype.dispose=function(){},t.prototype.onChange=function(t){var e=this;return this._urlListeners.push(t),function(){return tt(e._urlListeners)(t)}},t.prototype.html5Mode=function(){var t=this.$locationProvider.html5Mode();return(t=A(t)?t.enabled:t)&&this.$sniffer.history},t.prototype.url=function(t,e,r){return void 0===e&&(e=!1),t&&this.$location.url(t),e&&this.$location.replace(),r&&this.$location.state(r),this.$location.url()},t.prototype._runtimeServices=function(t,e,r,n){var i=this;this.$location=e,this.$sniffer=r,t.$on("$locationChangeSuccess",function(t){return i._urlListeners.forEac
2h(function(e){return e(t)})});var o=y(e),a=y(n);Q(o,this,o,["replace","path","search","hash"]),Q(o,this,o,["port","protocol","host"]),Q(a,this,a,["baseHref"])},t.monkeyPatchPathParameterType=function(t){var e=t.urlMatcherFactory.type("path");e.encode=function(t){return null!=t?t.toString().replace(/(~|\/)/g,function(t){return{"~":"~~","/":"~2F"}[t]}):t},e.decode=function(t){return null!=t?t.toString().replace(/(~~|~2F)/g,function(t){return{"~~":"~","~2F":"/"}[t]}):t}},t}(),Tn=function(){function t(t){this._router=t,this._urlRouter=t.urlRouter}return t.prototype.$get=function(){var t=this._urlRouter;return t.update(!0),t.interceptDeferred||t.listen(),t},t.prototype.rule=function(t){var e=this;if(!C(t))throw new Error("'rule' must be a function");var r=new ar(function(){return t(j.$injector,e._router.locationService)},K);return this._urlRouter.rule(r),this},t.prototype.otherwise=function(t){var e=this,r=this._urlRouter;if(x(t))r.otherwise(t);else{if(!C(t))throw new Error("'rule' must be a string or function");r.otherwise(function(){return t(j.$injector,e._router.locationService)})}return this},t.prototype.when=function(e,r){return(O(r)||C(r))&&(r=t.injectableHandler(this._router,r)),this._urlRouter.when(e,r),this},t.injectableHandler=function(t,e){return function(r){return j.$injector.invoke(e,null,{$match:r,$stateParams:t.globals.params})}},t.prototype.deferIntercept=function(t){this._urlRouter.deferIntercept(t)},t}();i.module("ui.router.angular1",[]);var Rn=i.module("ui.router.init",[]),$n=i.module("ui.router.util",["ng","ui.router.init"]),kn=i.module("ui.router.router",["ui.router.util"]),Cn=i.module("ui.router.state",["ui.router.router","ui.router.util","ui.router.angular1"]),In=i.module("ui.router",["ui.router.init","ui.router.state","ui.router.angular1"]),xn=(i.module("ui.router.compat",["ui.router"]),null);function An(t){(xn=this.router=new wr).stateProvider=new Sn(xn.stateRegistry,xn.stateService),xn.stateRegistry.decorator("views",vn),xn.stateRegistry.decorator("onExit",Pn("onExit")),xn.stateRegistry.decorator("onRetain",Pn("onRetain")),xn.stateRegistry.decorator("onEnter",Pn("onEnter")),xn.viewService._pluginapi._viewConfigFactory("ng1",dn());var e=xn.locationService=xn.locationConfig=new En(t);function r(t,r,n,i,o,a){return e._runtimeServices(i,t,n,r),delete xn.router,delete xn.$get,xn}return En.monkeyPatchPathParameterType(xn),xn.router=xn,xn.$get=r,r.$inject=["$location","$browser","$sniffer","$rootScope","$http","$templateCache"],xn}An.$inject=["$locationProvider"];var On=function(t){return["$uiRouterProvider",function(e){var r=e.router[t];return r.$get=function(){return r},r}]};function Dn(t,e,r){j.$injector=t,j.$q=e,r.stateRegistry.get().map(function(t){return t.$$state().resolvables}).reduce(yt,[]).filter(function(t){return"deferred"===t.deps}).forEach(function(e){return e.deps=t.annotate(e.resolveFn,t.strictDi)})}Dn.$inject=["$injector","$q","$uiRouter"];function Hn(t){t.$watch(function(){Qt.approximateDigests++})}Hn.$inject=["$rootScope"],Rn.provider("$uiRouter",An),kn.provider("$urlRouter",["$uiRouterProvider",function(t){return t.urlRouterProvider=new Tn(t)}]),$n.provider("$urlService",On("urlService")),$n.provider("$urlMatcherFactory",["$uiRouterProvider",function(){return xn.urlMatcherFactory}]),$n.provider("$templateFactory",function(){return new _n}),Cn.provider("$stateRegistry",On("stateRegistry")),Cn.provider("$uiRouterGlobals",On("globals")),Cn.provider("$transitions",On("transitionService")),Cn.provider("$state",["$uiRouterProvider",function(){return B(xn.stateProvider,{$get:function(){return xn.stateService}})}]),Cn.factory("$stateParams",["$uiRouter",function(t){return t.globals.params}]),In.factory("$view",function(){return xn.viewService}),In.service("$trace",function(){return Qt}),In.run(Hn),$n.run(["$urlMatcherFactory",function(t){}]),Cn.run(["$state",function(t){}]),kn.run(["$urlRouter",function(t){}]),Rn.run(Dn);var Vn,Fn,Un,Nn,jn=function(t){return t.getTokens().filter(x).map(function(e){var r=t.getResolvable(e);return[e,"NOWAIT"===t.getPolicy(r).async?r.promise:r.data]}).reduce(Ct,{})};function Ln(t){var e,r=t.match(/^\s*({[^}]*})\s*$/);if(r&&(t="("+r[1]+")"),!(e=t.replace(/\n/g," ").match(/^\s*([^(]*?)\s*(\((.*)\))?\s*$/))||4!==e.length)throw new Error("Invalid state ref '"+t+"'");return{state:e[1]||null,paramExpr:e[3]||null}}function qn(t){var e=t.parent().inheritedData("$uiView"),r=l("$cfg.path")(e);return r?It(r).state.name:void 0}function Mn(t,e,r){var n=r.uiState||t.current.name,i=B(function(t,e){return{relative:qn(t)||e.$current,inherit:!0,source:"sref"}}(e,t),r.uiStateOpts||{}),o=t.href(n,r.uiStateParams,i);return{uiState:n,uiStateParams:r.uiStateParams,uiStateOpts:i,href:o}}function Gn(t){var e="[object SVGAnimatedString]"===Object.prototype.toString.call(t.prop("href")),r="FORM"===t[0].nodeName;return{attr:r?"action":e?"xlink:href":"href",isAnchor:"A"===t.prop("tagName").toUpperCase(),clickable:!r}}function zn(t,e,r,n,i){return function(o){var a=o.which||o.button,s=i();if(!(a>1||o.ctrlKey||o.metaKey||o.shiftKey||t.attr("target"))){var u=r(function(){e.go(s.uiState,s.uiStateParams,s.uiStateOpts)});o.preventDefault();var c=n.isAnchor&&!s.href?1:0;o.preventDefault=function(){c--<=0&&r.cancel(u)}}}}function Bn(t,e,r,n){var i;n&&(i=n.events),O(i)||(i=["click"]);for(var o=t.on?"on":"bind",a=0,s=i;a<s.length;a++){var u=s[a];t[o](u,r)}e.$on("$destroy",function(){for(var e=t.off?"off":"unbind",n=0,o=i;n<o.length;n++){var a=o[n];t[e](a,r)}})}function Wn(t){var e=function(e,r,n){return t.is(e,r,n)};return e.$stateful=!0,e}function Kn(t){var e=function(e,r,n){return t.includes(e,r,n)};return e.$stateful=!0,e}function Jn(t,r,n,o,a,s){var u=l("viewDecl.controllerAs"),c=l("viewDecl.resolveAs");return{restrict:"ECA",priority:-400,compile:function(o){var s=o.html();return o.empty(),function(o,l){var p=l.data("$uiView");if(!p)return l.html(s),void t(l.contents())(o);var f=p.$cfg||{viewDecl:{},getTemplate:e.noop},h=f.path&&new _e(f.path);l.html(f.getTemplate(l,h)||s),Qt.traceUIViewFill(p.$uiView,l.html());var d=t(l.contents()),m=f.controller,v=u(f),g=c(f),y=h&&jn(h);if(o[g]=y,m){var _=r(m,B({},y,{$scope:o,$element:l}));v&&(o[v]=_,o[v][g]=y),l.data("$ngControllerController",_),l.children().data("$ngControllerController",_),Xn(a,n,_,o,f)}if(x(f.viewDecl.component))var w=f.viewDecl.component,b=Te(w),S=new RegExp("^(x-|data-)?"+b+"$","i"),P=o.$watch(function(){var t=[].slice.call(l[0].children).filter(function(t){return t&&t.tagName&&S.exec(t.tagName)});
2return t&&i.element(t).data("$"+w+"Controller")},function(t){t&&(Xn(a,n,t,o,f),P())});d(o)}}}}Vn=["$uiRouter","$timeout",function(t,e){var r=t.stateService;return{restrict:"A",require:["?^uiSrefActive","?^uiSrefActiveEq"],link:function(n,i,o,a){var s,u=Gn(i),c=a[1]||a[0],l=null,p={},f=function(){return Mn(r,i,p)},h=Ln(o.uiSref);function d(){var t=f();l&&l(),c&&(l=c.$$addStateInfo(t.uiState,t.uiStateParams)),null!=t.href&&o.$set(u.attr,t.href)}p.uiState=h.state,p.uiStateOpts=o.uiSrefOpts?n.$eval(o.uiSrefOpts):{},h.paramExpr&&(n.$watch(h.paramExpr,function(t){p.uiStateParams=B({},t),d()},!0),p.uiStateParams=B({},n.$eval(h.paramExpr))),d(),n.$on("$destroy",t.stateRegistry.onStatesChanged(d)),n.$on("$destroy",t.transitionService.onSuccess({},d)),u.clickable&&(s=zn(i,r,e,u,f),Bn(i,n,s,p.uiStateOpts))}}}],Fn=["$uiRouter","$timeout",function(t,e){var r=t.stateService;return{restrict:"A",require:["?^uiSrefActive","?^uiSrefActiveEq"],link:function(n,i,o,a){var s,u=Gn(i),c=a[1]||a[0],l=null,p={},f=function(){return Mn(r,i,p)},h=["uiState","uiStateParams","uiStateOpts"],d=h.reduce(function(t,e){return t[e]=J,t},{});function m(){var t=f();l&&l(),c&&(l=c.$$addStateInfo(t.uiState,t.uiStateParams)),null!=t.href&&o.$set(u.attr,t.href)}h.forEach(function(t){p[t]=o[t]?n.$eval(o[t]):null,o.$observe(t,function(e){d[t](),d[t]=n.$watch(e,function(e){p[t]=e,m()},!0)})}),m(),n.$on("$destroy",t.stateRegistry.onStatesChanged(m)),n.$on("$destroy",t.transitionService.onSuccess({},m)),u.clickable&&(s=zn(i,r,e,u,f),Bn(i,n,s,p.uiStateOpts))}}}],Un=["$state","$stateParams","$interpolate","$uiRouter",function(t,e,r,n){return{restrict:"A",controller:["$scope","$element","$attrs",function(e,i,o){var a,s,u=[];a=r(o.uiSrefActiveEq||"",!1)(e);try{s=e.$eval(o.uiSrefActive)}catch(t){}function c(t){t.promise.then(p,J)}function l(e,r,n){var o={state:t.get(e,qn(i))||{name:e},params:r,activeClass:n};return u.push(o),function(){tt(u)(o)}}function p(){var r=function(t){return t.split(/\s/).filter(K)},n=function(t){return t.map(function(t){return t.activeClass}).map(r).reduce(yt,[])},o=n(u).concat(r(a)).reduce(bt,[]),s=n(u.filter(function(e){return t.includes(e.state.name,e.params)})),c=u.filter(function(e){return t.is(e.state.name,e.params)}).length?r(a):[],l=s.concat(c).reduce(bt,[]),p=o.filter(function(t){return!X(l,t)});e.$evalAsync(function(){l.forEach(function(t){return i.addClass(t)}),p.forEach(function(t){return i.removeClass(t)})})}s=s||r(o.uiSrefActive||"",!1)(e),A(s)&&z(s,function(t,r){if(x(t)){var n=Ln(t);l(n.state,e.$eval(n.paramExpr),r)}}),this.$$addStateInfo=function(t,e){if(!(A(s)&&u.length>0)){var r=l(t,e,s);return p(),r}},e.$on("$stateChangeSuccess",p),e.$on("$destroy",n.transitionService.onStart({},c)),n.globals.transition&&c(n.globals.transition),p()}]}}],i.module("ui.router.state").directive("uiSref",Vn).directive("uiSrefActive",Un).directive("uiSrefActiveEq",Un).directive("uiState",Fn),Wn.$inject=["$state"],Kn.$inject=["$state"],i.module("ui.router.state").filter("isState",Wn).filter("includedByState",Kn),Nn=["$view","$animate","$uiViewScroll","$interpolate","$q",function(t,e,r,n,o){var a={$cfg:{viewDecl:{$context:t._pluginapi._rootViewContext()}},$uiView:{}},s={count:0,restrict:"ECA",terminal:!0,priority:400,transclude:"element",compile:function(u,c,p){return function(u,c,f){var h,d,m,v,g=f.onload||"",y=f.autoscroll,_={enter:function(t,r,n){i.version.minor>2?e.enter(t,null,r).then(n):e.enter(t,null,r,n)},leave:function(t,r){i.version.minor>2?e.leave(t).then(r):e.leave(t,r)}},w=void 0,b=c.inheritedData("$uiView")||a,S=n(f.uiView||f.name||"")(u)||"$default",P={$type:"ng1",id:s.count++,name:S,fqn:b.$uiView.fqn?b.$uiView.fqn+"."+S:S,config:null,configUpdated:function(t){(!t||t instanceof yn)&&(e=w,r=t,e===r||(Qt.traceUIViewConfigUpdated(P,t&&t.viewDecl&&t.viewDecl.$context),w=t,E(t)));var e,r},get creationContext(){var t=l("$cfg.viewDecl.$context")(b),e=l("$uiView.creationContext")(b);return t||e}};function E(t){var e=u.$new(),n=o.defer(),i=o.defer(),a={$cfg:t,$uiView:P},s={$animEnter:n.promise,$animLeave:i.promise,$$animLeave:i};e.$emit("$viewContentLoading",S);
2var l=p(e,function(t){t.data("$uiViewAnim",s),t.data("$uiView",a),_.enter(t,c,function(){n.resolve(),m&&m.$emit("$viewContentAnimationEnded"),(R(y)&&!y||u.$eval(y))&&r(t)}),function(){if(h&&(Qt.traceUIViewEvent("Removing (previous) el",h.data("$uiView")),h.remove(),h=null),m&&(Qt.traceUIViewEvent("Destroying scope",P),m.$destroy(),m=null),d){var t=d.data("$uiViewAnim");Qt.traceUIViewEvent("Animate out",t),_.leave(d,function(){t.$$animLeave.resolve(),h=null}),h=d,d=null}}()});d=l,(m=e).$emit("$viewContentLoaded",t||w),m.$eval(g)}Qt.traceUIViewEvent("Linking",P),c.data("$uiView",{$uiView:P}),E(),v=t.registerUIView(P),u.$on("$destroy",function(){Qt.traceUIViewEvent("Destroying/Unregistering",P),v()})}}};return s}],Jn.$inject=["$compile","$controller","$transitions","$view","$q","$timeout"];var Qn="function"==typeof i.module("ui.router").component,Zn=0;function Xn(t,e,r,n,i){!C(r.$onInit)||i.viewDecl.component&&Qn||r.$onInit();var o=It(i.path).state.self,a={bind:r};if(C(r.uiOnParamsChanged)){var s=new _e(i.path).getResolvable("$transition$").data;n.$on("$destroy",e.onSuccess({},function(t){if(t!==s&&-1===t.exiting().indexOf(o)){var e=t.params("to"),n=t.params("from"),i=t.treeChanges().to.map(function(t){return t.paramSchema}
2).reduce(yt,[]),a=t.treeChanges().from.map(function(t){return t.paramSchema}).reduce(yt,[]),u=i.filter(function(t){var r=a.indexOf(t);return-1===r||!a[r].type.equals(e[t.id],n[t.id])});if(u.length){var c=u.map(function(t){return t.id}),l=pt(e,function(t,e){return-1!==c.indexOf(e)});r.uiOnParamsChanged(l,t)}}},a))}if(C(r.uiCanExit)){var u=Zn++,c="_uiCanExitIds",l=function(t){return!!t&&(t[c]&&!0===t[c][u]||l(t.redirectedFrom()))},p={exiting:o.name};n.$on("$destroy",e.onBefore(p,function(e){var n,i=e[c]=e[c]||{};return l(e)||(n=t.when(r.uiCanExit(e))).then(function(t){return i[u]=!1!==t}),n},a))}}i.module("ui.router.state").directive("uiView",Nn),i.module("ui.router.state").directive("uiView",Jn),i.module("ui.router.state").provider("$uiViewScroll",function(){var t=!1;this.useAnchorScroll=function(){t=!0},this.$get=["$anchorScroll","$timeout",function(e,r){return t?e:function(t){return r(function(){t[0].scrollIntoView()},0,!1)}}]});t.default="ui.router",t.core=hn,t.watchDigests=Hn,t.getLocals=jn,t.getNg1ViewConfigFactory=dn,t.ng1ViewsBuilder=vn,t.Ng1ViewConfig=yn,t.StateProvider=Sn,t.UrlRouterProvider=Tn,t.root=L,t.fromJson=M,t.toJson=G,t.forEach=z,t.extend=B,t.equals=W,t.identity=K,t.noop=J,t.createProxyFunctions=Q,t.inherit=Z,t.inArray=X,t._inArray=Y,t.removeFrom=tt,t._removeFrom=et,t.pushTo=rt,t._pushTo=nt,t.deregAll=it,t.defaults=ot,t.mergeR=at,t.ancestors=st,t.pick=ut,t.omit=ct,t.pluck=lt,t.filter=pt,t.find=ft,t.mapObj=ht,t.map=dt,t.values=mt,t.allTrueR=vt,t.anyTrueR=gt,t.unnestR=yt,t.flattenR=_t,t.pushR=wt,t.uniqR=bt,t.unnest=St,t.flatten=Pt,t.assertPredicate=Et,t.assertMap=Tt,t.assertFn=Rt,t.pairs=$t,t.arrayTuples=kt,t.applyPairs=Ct,t.tail=It,t.copy=xt,t._extend=At,t.silenceUncaughtInPromise=Ht,t.silentRejection=Vt,t.notImplemented=N,t.services=j,t.Glob=b,t.curry=o,t.compose=a,t.pipe=s,t.prop=u,t.propEq=c,t.parse=l,t.not=p,t.and=f,t.or=h,t.all=d,t.any=m,t.is=v,t.eq=g,t.val=y,t.invoke=_,t.pattern=w,t.isUndefined=T,t.isDefined=R,t.isNull=$,t.isNullOrUndefined=k,t.isFunction=C,t.isNumber=I,t.isString=x,t.isObject=A,t.isArray=O,t.isDate=D,t.isRegExp=H,t.isState=V,t.isInjectable=F,t.isPromise=U,t.Queue=Ft,t.maxLength=Pe,t.padString=Ee,t.kebobString=Te,t.functionToString=Re,t.fnToString=$e,t.stringify=Ie,t.beforeAfterSubstr=xe,t.hostRegex=Ae,t.stripFile=Oe,t.splitHash=De,t.splitQuery=He,t.splitEqual=Ve,t.trimHashVal=Fe,t.splitOnDelim=Ue,t.joinNeighborsR=Ne,t.Trace=Jt,t.trace=Qt,t.Param=ce,t.ParamTypes=Le,t.StateParams=qe,t.ParamType=ie,t.PathNode=le,t.PathUtils=pe,t.resolvePolicies=de,t.defaultResolvePolicy=fe,t.Resolvable=he,t.NATIVE_INJECTOR_TOKEN=ye,t.ResolveContext=_e,t.resolvablesBuilder=Qe,t.StateBuilder=Ze,t.StateObject=S,t.StateMatcher=Xe,t.StateQueueManager=Ye,t.StateRegistry=tr,t.StateService=jr,t.TargetState=Zt,t.HookBuilder=ne,t.matchState=te,t.RegisteredHook=ee,t.makeEvent=re,t.Rejection=Nt,t.Transition=Se,t.TransitionHook=Yt,t.TransitionEventType=Hr,t.defaultTransOpts=Ur,t.TransitionService=Nr,t.UrlMatcher=nr,t.UrlMatcherFactory=ir,t.UrlRouter=ur,t.UrlRuleFactory=or,t.BaseUrlRule=ar,t.UrlService=yr,t.ViewService=lr,t.UIRouterGlobals=pr,t.UIRouter=wr,t.$q=Lr,t.$injector=zr,t.BaseLocationServices=Xr,t.HashLocationService=tn,t.MemoryLocationService=rn,t.PushStateLocationService=on,t.MemoryLocationConfig=an,t.BrowserLocationConfig=sn,t.keyValsToObjectR=Br,t.getParams=Wr,t.parseUrl=Kr,t.buildUrl=Jr,t.locationPluginFactory=Qr,t.servicesPlugin=un,t.hashLocationPlugin=cn,t.pushStateLocationPlugin=ln,t.memoryLocationPlugin=pn,t.UIRouterPluginBase=fn,Object.defineProperty(t,"__esModule",{value:!0})}(e,r(8192))},1861(t,e,r){"use strict";r(428);var n=r(8192),i=r.n(n),o=(r(943),r(2190),r(843),r(5660),r(2207),r(9677),r(6633),r(7569),i().module("signup.upgradePromptLink",["vspot","localization","vspot.services","ui.bootstrap","signup.stripeForm","ui.router","generic-confirm"]));o.controller("modalController",["$uibModalInstance","feature","user","usersPlan","tiers","groups","type","$timeout","services.Utilities","services.Login","services.Charges","$log","$stateParams","localize","services.Tracking","$rootScope",function(t,e,r,n,o,a,s,u,c,l,p,f,h,d,m,v){var g=this;g.featureName=e,g.userFeatureEnabled=!1,g.userFeatureCount=0,g.user=r,g.alreadyPremium=r&&r.loggedIn&&r.premium,g.usersPlan=n,g.tiers=o,g.groups=a,g.type=s,g.modalTitle="_UpgradeModalTitle_",g.modalErrorStr=null,g.modalBody=null,g.formData={promoCode:null,adFree:!0,adFreeOnly:!1,selectedPlan:null,selectedFreq:null},g.show={loading:!0,picker:!1,checkout:!1,complete:!1},g.error=null,g.promoEnabled=!0,g.promoCodeErrorCode=null,g.submitting=!1,g.activityId=void 0!==h.id?h.id:"",g.pubKey=null,g.subscriptionAmount=null,g.subscriptionDesc=null,g.subscriptionData=null,g.getLocalizedString=d.getLocalizedString,g.getFeatureData=function(t,e){for(var r={enabled:!1,count:0},n=0,i=t.length;n<i;n++)t[n].name===e&&(r.enabled=t[n].enabled,r.enabled&&(r.count=-1===t[n].count?1/0:t[n].count));return r};var y=g.getFeatureData(g.user.premiumData.features,g.featureName);g.userFeatureEnabled=y.enabled,g.userFeatureCount=y.count,g.tierAvailable=function(t){if(!t)return!1;var e=!1;if("PROFILE"===g.featureName)(g.user.premiumData.tier_level>3||t.tier_level>=g.user.premiumData.tier_level)&&(e=!0);else{var r=g.getFeatureData(t.features,g.featureName);r.enabled&&r.count>g.userFeatureCount&&(e=!0)}return e};for(var _=null,w=0,b=g.tiers.length;w<b;w++)g.tiers[w].tier_level>0&&g.tierAvailable(g.tiers[w])&&(_?g.tiers[w].tier_level<_.selectedTier&&(_=g.tiers[w]):_=g.tiers[w]);g.groups["level_"+_.tier_level]&&g.groups["level_"+_.tier_level].plans&&(g.groups["level_"+_.tier_level].plans.monthly?g.formData.selectedPlan=g.groups["level_"+_.tier_level].plans.monthly.premiumplan_id:g.groups["level_"+_.tier_level].plans.annual?g.formData.selectedPlan=g.groups["level_"+_.tier_level].plans.annual.premiumplan_id:f.error("Error! No selectable plans for:","level_"+_.tier_level)),g.featureData={EXTRA_FIELDS:{title:"_custom_fields_name_",description:"_custom_fields_description_",imgSource:"/imgs/elements/premium-icons/Add-Custom-Fields-icon.png",redirect:g.activityId?"/Activities?scrollTo=EXTRA_FIELDS#/"+g.activityId+"/details/edit":"/Dashboard",reload:!1,gaPageView:"custom_fields"},GROUP_PAGES:{title:"_group_pages_name_",description:"_group_pages_description_",imgSource:"/imgs/elements/premium-icons/Add-Group-Pages-icon.png",redirect:g.activityId?"/Dashboard?unlock="+g.activityId+"#/my-group-pages":"/Dashboard#/my-group-pages",reload:!1,gaPageView:"group_pages"},HOURS_TRACKING:{title:"_hours_tracking_name_",description:"_hours_tracking_description_",imgSource:"/imgs/elements/premium-icons/Hours-icon.png",redirect:g.activityId?"/Activities#/"+g.activityId+"/reports":"/Dashboard",reload:!0,gaPageView:"hours_tracking"},ADVANCED_REPORTING:{title:"_admin_reporting_name_",description:"_admin_reporting_description_",imgSource:"/imgs/elements/premium-icons/Reporting-icon.png",redirect:g.activityId?"/Dashboard?unlock="+g.activityId+"#/my-reports":"/Dashboard#/my-reports",reload:!1,gaPageView:"admin_reporting"},WAIVER:{title:"_waiver_name_",description:"_waiver_description_",imgSource:"/imgs/elements/premium-icons/Add-Waiver-icon.png",redirect:g.activityId?"/Activities#/"+g.activityId+"/waiver":"/Dashboard",reload:!0,gaPageView:"waiver"},ASST_ORGANIZER:{title:"_assistant_organizers_name_",description:"_assistant_organizers_description_",imgSource:"/imgs/elements/premium-icons/Add-Assitant-Organizer-icon.png",redirect:g.activityId?"/Activities?scrollTo=ASST_ORGANIZER#/"+g.activityId+"/details/edit":"/Dashboard",reload:!1,gaPageView:"assistant_organizers"},SIGNUP_LOCK:{title:"_premium_upgrade_signup_locking_title_",description:"_premium_upgrade_signup_locking_description_",imgSource:"/imgs/elements/premium-icons/Add-Scheduled-Locking.png",redirect:g.activityId?"/Activities#/"+g.activityId+"/locking":"/Dashboard",reload:!0,gaPageView:"signup_locking"},CHECKIN:{title:"_check_in_name_",description:"_check_in_description_",imgSource:"/imgs/elements/premium-icons/Add-Check-in-icon.png",redirect:"/checkin-landing",reload:!1,gaPageView:"check_in"},PROFILE:{title:"_UpgradeHeader_",description:"_premium_upgrade_form_upgrade_description_",imgSource:"/imgs/elements/premium-icons/Add-Profile-Upgrade-icon.png",redirect:g.activityId?"/Dashboard?unlock="+g.activityId:"/Dashboard",reload:!1,gaPageView:"profilePage"},LIMIT_SPOTS:{title:"_UpgradeHeader_",description:"_premium_upgrade_form_upgrade_description_",imgSource:"/imgs/elements/premium-icons/Add-Profile-Upgrade-icon.png",redirect:g.activityId?"/Activities#/"+g.activityId+"/details/edit":"/Dashboard",reload:!1,gaPageView:"limit_spots"},WAITLISTS:{title:"_UpgradeHeader_",description:"_premium_upgrade_form_upgrade_description_",imgSource:"/imgs/elements/premium-icons/Add-Profile-Upgrade-icon.png",redirect:g.activityId?"/Activities#/"+g.activityId+"/details/edit":"/Dashboard",reload:!1,gaPageView:"waitlist"}},g.updateSubscription=function(){var t=null,e=null;
2g.formData.selectedPlan&&(i().forEach(g.groups,function(r,n){t&&e||i().forEach(r.plans,function(r,n){r&&r.premiumplan_id===g.formData.selectedPlan&&(t=r.tier_level,e=n)}),t&&e||i().forEach(r.adFree,function(r,n){r&&r.premiumplan_id===g.formData.selectedPlan&&(t=r.tier_level,e=n)})}),t&&e&&(g.formData.adFree||g.formData.adFreeOnly?(g.formData.selectedPlan=g.groups["level_"+t].adFree[e].premiumplan_id,g.promoEnabled=g.groups["level_"+t].adFree[e].promos_allowed&&!g.alreadyPremium):null!==g.groups["level_"+t].plans[e]?(g.formData.selectedPlan=g.groups["level_"+t].plans[e].premiumplan_id,g.promoEnabled=g.groups["level_"+t].plans[e].promos_allowed&&!g.alreadyPremium):(g.formData.selectedPlan="",g.promoEnabled=""))),g.formData.selectedFreq=e},g.close=function(){t.close()},g.submit=function(t,e){g.submitting=!0,g.error=null,g.promoCodeErrorCode=null,u(function(){global_helper.blank(g.formData.promoCode)?S():c.validatePromoCode(g.formData.promoCode).$promise.then(function(t){t.status?"_UtilitiesIsPromoValidPromoIsOrganization_"===t.organization_message?v.ynConfirm({header:"_PremiumModalConfirmationTitle_",content:"_PremiumModalConfirmationBody_"}).result.then(function(t){t?S():g.close()}):S():(g.promoCodeErrorCode=t.code,g.submitting=!1)})})};var S=function(){m.trackPageview("/Upgrade/started/"+g.featureData[g.featureName].gaPageView,P)},P=function(){m.trackPageview("/Upgrade/"+g.formData.selectedFreq,E)},E=function(){var t={premium_level:g.formData.selectedPlan,promocode:g.formData.promoCode};l.stripePremiumReg(t).$promise.then(function(t){t.status?void 0===t.stripe_checkout_data&&void 0===t.stripe_subscription_data?g.subscriptionComplete(t):g.subscriptionSelected(t.stripe_checkout_data,t.stripe_subscription_data):g.error=t.message,g.submitting=!1})};g.subscriptionSelected=function(t,e){g.pubKey=t.key,g.subscriptionAmount=parseFloat(t.amount)/100,g.subscriptionDesc=t.description,g.subscriptionData=e,u(function(){g.show.loading=!1,g.show.picker=!1,g.show.checkout=!0,g.show.complete=!1})};var T=function(){g.modalTitle="_FormSuccess_",g.formData.promoCode?g.modalBody="_PremiumModalSuccessPromoMessage_":g.alreadyPremium?g.modalBody="_PremiumModalSuccessMessageExistingUser_":g.modalBody="_PremiumModalSuccessMessageNewUser_",g.nextPlace=null,g.show.loading=!1,g.show.picker=!1,g.show.checkout=!1,g.show.complete=!0};g.subscriptionComplete=function(t,e){void 0===e&&(e="checkout"),t.status?m.trackPageview("/login/premiumsuccess",T):(g.modalTitle="_Error_",g.modalBody="_PremiumModalErrorMessage_",g.nextPlace=e,t.message&&(g.modalErrorStr=t.message),u(function(){g.show.loading=!1,g.show.picker=!1,g.show.checkout=!1,g.show.complete=!0}))},g.goNext=function(){"checkout"===g.nextPlace||"picker"===g.nextPlace?u(function(){g.modalTitle="_UpgradeModalTitle_",g.show.loading=!1,g.show.picker="picker"===g.nextPlace,g.show.checkout="checkout"===g.nextPlace,g.show.complete=!1}):"icon"===g.type||"PROFILE"===g.featureName?(window.location=g.featureData[g.featureName].redirect,g.featureData[g.featureName].reload&&window.location.reload()):t.close(!0)},m.trackPageview("/premium_features/"+g.featureData[g.featureName].gaPageView,function(){g.show.loading=!1,g.show.picker=!0,g.show.checkout=!1,g.show.complete=!1,g.updateSubscription()})}]),o.filter("filterTier",function(){return function(t){for(var e=[],r=0;r<t.length;r++){var n=t[r];0!==n.tier_level&&n.tier_level<4&&e.push(n)}return e}}),o.component("upgradePromptLink",{templateUrl:"/script/vspot-angular/components/premium/upgrade-prompt-link/upgrade-prompt-link.html",controller:["services.Utilities","$uibModal","$timeout","localize",function(t,e,r,n){var i=this;switch(i.getLocalizedString=n.getLocalizedString,i.showPrompt=!1,i.plans=null,i.groups=null,i.tiers=null,i.usersPlan=null,i.maxTier=0,void 0===i.type&&(i.type="button"),t.pricingPlans().$promise.then(function(t){if(t.status){var e;i.plans=t.plan_data,i.groups=t.groups,i.tiers=t.feature_tier_data,i.maxTier=t.maxTier,i.maxExtraFields=0;for(var n=0,o=i.tiers[i.maxTier].features.length;n<o;n++)if("EXTRA_FIELDS"===(e=i.tiers[i.maxTier].features[n]).name){i.maxExtraFields=e.count;break}if(i.user&&i.plans)for(var a=0,s=i.plans.length;a<s;a++)if(i.plans[a].premiumplan_id===i.user.premiumData.premiumplan_id){i.usersPlan=i.plans[a];break}var u=!1;i.user?(i.user.premiumData.tier_level>3||i.user.premiumData.tier_level<i.maxTier)&&(u=!0):u=!0,r(function(t){i.showPrompt=t},0,!0,u)}}),i.buttonText=null,i.buttonHelpText=null,i.iconText=null,i.iconImg=null,i.feature){case"GROUP_PAGES":i.buttonText="_GroupPagesPremiumPrompt_",i.buttonHelpText="_GroupPagesPremiumPromptInfo_",i.iconText="_GroupPagesIconText_",i.iconImg="/imgs/buttons/multiple-group-pages-btn-hover.png";break;case"EXTRA_FIELDS":i.buttonText="_AddFieldPrompt_",i.buttonHelpText="_AddFieldPremiumPrompt_",i.iconText="_AddFieldIconText_",i.iconImg="/imgs/buttons/custom-fields-btn-hover.png";break;case"ASST_ORGANIZER":i.buttonText="_AddCoOrganizerPrompt_",i.buttonHelpText="_AddCoOrganizerPromptInfo_",i.iconText="_AddCoOrganizerIconText_",i.iconImg="/imgs/buttons/add-organizer-btn-hover.png";break;case"HOURS_TRACKING":i.buttonText="_HoursPremiumPrompt_",i.buttonHelpText="_HoursPremiumPromptInfo_",i.iconText="_HoursIconText_",i.iconImg="/imgs/buttons/participant-hours-tracking-btn-hover.png";break;case"CHECKIN":i.buttonText="_CheckInPremiumPrompt_",i.buttonHelpText="_CheckInPremiumPromptInfo_",i.iconText="_CheckInIconText_",i.iconImg="/imgs/buttons/checkin-btn-hover.png";break;case"WAIVER":i.buttonText="_WaiverPremiumPrompt_",i.buttonHelpText="_WaiverPremiumPromptInfo_",i.iconText="_WaiverIconText_",i.iconImg="/imgs/buttons/add-waiver-btn-hover.png";break;case"SIGNUP_LOCK":i.buttonText="_SignUpLockingPremiumPromptInfo_",i.buttonHelpText="_SignUpLockingPremiumPrompt_",i.iconText="_SignUpLockingIconText_",i.iconImg="/imgs/buttons/lock-unlock-btn-hover.png";break;case"ADVANCED_REPORTING":i.buttonText="_SuperUserReportsPremiumPrompt_",i.buttonHelpText="_SuperUserReportsPremiumPromptInfo_",i.iconText="_SuperUserReportsIconText_",i.iconImg="/imgs/buttons/advanced-reporting-btn-hover.png";break;case"PROFILE":i.buttonText="_UpgradeBtnFromProfile_",i.buttonHelpText="_UpgradeProfileHelpText_";break;case"LIMIT_SPOTS":i.buttonText="_LimitSpotsPremiumPrompt_",i.buttonHelpText="_LimitSpotsPremiumPromptInfo_";break;case"WAITLISTS":i.buttonText="_WaitlistPremiumPrompt_",i.buttonHelpText="_WaitlistPremiumPromptInfo_"}i.showModal=function(){e.open({templateUrl:"/script/vspot-angular/components/premium/upgrade-prompt-link/upgrade-prompt-link-modal.html",controller:"modalController",controllerAs:"mod",backdrop:"static",keyboard:!1,windowClass:"upgrade-prompt-modal",resolve:{feature:function(){return i.feature},user:function(){return i.user},usersPlan:function(){return i.usersPlan},tiers:function(){return i.tiers},groups:function(){return i.groups},type:function(){return i.type}}}).result.then(function(t){t&&location.reload(!1)})}}],bindings:{user:"=",feature:"@",type:"@"}})},2207(t){"use strict";
2t.exports=window.Stripe}},t=>{t.O(0,[76],()=>t(t.s=4451)),t.O()}]);
3//# sourceMappingURL=/assets/common-router.js-bbc116a678a55835bb49c3476c69561bb1aa30b64e89fd79e02f2425243a3a2a.map
4//!
5;

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.