"use strict";angular.module("walkTheCity",["ngRoute","ngSanitize","ngAnimate","ngTouch","duScroll","angular-carousel"]).config(["$routeProvider","$locationProvider",function(n,t){n.when("/:language/about",{templateUrl:function(){return"wtc/views/en/about.html"},controller:"AboutCtrl",resolve:{page:["pages",function(n){return n.getPage("about")}]}}).when("/:language/over",{templateUrl:function(){return"wtc/views/nl/about.html"},controller:"AboutCtrl",resolve:{page:["pages",function(n){return n.getPage("about")}]}}).when("/:language/uber",{templateUrl:function(){return"wtc/views/de/about.html"},controller:"AboutCtrl",resolve:{page:["pages",function(n){return n.getPage("about")}]}}).when("/:language/sobre",{templateUrl:function(){return"wtc/views/es/about.html"},controller:"AboutCtrl",resolve:{page:["pages",function(n){return n.getPage("about")}]}}).when("/:language/download",{templateUrl:function(n){return"wtc/views/"+n.language+"/download.html"},controller:"DownloadCtrl",resolve:{page:["pages",function(n){return n.getPage("download")}],routes:["$route","routes",function(n,t){return t.getAllDownloadable()}]}}).when("/:language/descargar",{templateUrl:function(){return"wtc/views/es/download.html"},controller:"DownloadCtrl",resolve:{page:["pages",function(n){return n.getPage("download")}],routes:["$route","routes",function(n,t){return t.getAllDownloadable()}]}}).when("/descargar",{templateUrl:function(){return"wtc/views/es/download.html"},controller:"DownloadCtrl",resolve:{page:["pages",function(n){return n.getPage("download")}],routes:["$route","routes",function(n,t){return t.getAllDownloadable()}]}}).when("/:language/city-marketing",{templateUrl:function(){return"wtc/views/en/citymarketing.html"},controller:"CitymarketingCtrl",resolve:{page:["pages",function(n){return n.getPage("citymarketing")}]}}).when("/:language/citymarketing",{templateUrl:function(){return"wtc/views/nl/citymarketing.html"},controller:"CitymarketingCtrl",resolve:{page:["pages",function(n){return n.getPage("citymarketing")}]}}).when("/:language/stadtmarketing",{templateUrl:function(){return"wtc/views/de/citymarketing.html"},controller:"CitymarketingCtrl",resolve:{page:["pages",function(n){return n.getPage("citymarketing")}]}}).when("/:language/mercadeo-de-ciudad",{templateUrl:function(){return"wtc/views/es/citymarketing.html"},controller:"CitymarketingCtrl",resolve:{page:["pages",function(n){return n.getPage("citymarketing")}]}}).when("/:language/disclaimer",{templateUrl:function(n){return"wtc/views/"+n.language+"/disclaimer.html"},controller:"DisclaimerCtrl",resolve:{page:["pages",function(n){return n.getPage("disclaimer")}]}}).when("/download",{templateUrl:function(){return"wtc/views/"+config.language+"/download.html"},controller:"DownloadCtrl",resolve:{page:["pages",function(n){return n.getPage("download")}],routes:["$route","routes",function(n,t){return t.getAllDownloadable()}]}}).when("/disclaimer",{templateUrl:function(){return"wtc/views/"+config.language+"/disclaimer.html"},controller:"DisclaimerCtrl",resolve:{page:["pages",function(n){return n.getPage("disclaimer")}]}}).when("/:language/:city/:name",{templateUrl:"wtc/views/route.html",controller:"RouteCtrl",resolve:{route:["$route","routes",function(n,t){return t.getRoute(n.current.params.name)}],language:["$route",function(n){return n.current.params.language}]}}).when("/:language/:city",{templateUrl:"wtc/views/route.html",controller:"RouteCtrl",resolve:{route:["$route","routes",function(n,t){return t.getRouteByCity(n.current.params.city)}],language:["$route",function(n){return n.current.params.language}]}}).when("/nl",{templateUrl:"wtc/views/nl/home.html",controller:"HomeCtrl",resolve:{language:function(){return"nl"}}}).when("/de",{templateUrl:"wtc/views/de/home.html",controller:"HomeCtrl",resolve:{language:function(){return"de"}}}).when("/en",{templateUrl:"wtc/views/en/home.html",controller:"HomeCtrl",resolve:{language:function(){return"en"}}}).when("/es",{templateUrl:"wtc/views/es/home.html",controller:"HomeCtrl",resolve:{language:function(){return"es"}}}).when("/:city",{templateUrl:"wtc/views/route.html",controller:"RouteCtrl",resolve:{route:["$route","routes",function(n,t){return t.getRouteByCity(n.current.params.city)}],language:["configuration",function(n){return n.CurrentLanguage}]}}).when("/",{templateUrl:function(){return"wtc/views/"+config.language+"/home.html"},controller:"HomeCtrl",resolve:{language:function(){return config.language}}}).otherwise({redirectTo:"/"});t.html5Mode(!0);t.hashPrefix("!")}]).run(["$rootScope","$location","$anchorScroll","$routeParams","configuration",function(n,t,i,r,u){n.$on("$routeChangeStart",function(t,i){i.$$route&&i.$$route.resolve&&(n.loadingView=!0)});n.$on("$routeChangeSuccess",function(f,e){n.headerClassName=e.$$route&&(e.$$route.originalPath==="/"||e.$$route.originalPath==="/nl"||e.$$route.originalPath==="/en"||e.$$route.originalPath==="/de"||e.$$route.originalPath==="/es")?"header-large":e.$$route&&e.$$route.originalPath.startsWith("/routes")?"header-small header-routes":"header-small";r.l&&(t.hash(r.l),i());e.params.language&&(config.language=u.CurrentLanguage=e.params.language);n.loadingView=!1;n.productJsonld=""});n.$on("$routeChangeError",function(i,r,u,f){f.status===404&&(t.path("/"),n.loadingView=!1)})}]);angular.module("walkTheCity").controller("AboutCtrl",["$scope","$rootScope","configuration","page",function(n,t,i,r){t.viewTitle=r.data.title;t.jsonId={"@context":"http://schema.org","@type":"BreadcrumbList",itemListElement:[{"@type":"ListItem",position:1,item:{"@id":"http://www.walkthecity.eu"+r.data.languageUrls[i.CurrentLanguage],name:r.data.title}}]};t.currentPathEN=r.data.languageUrls.en;t.currentPathNL=r.data.languageUrls.nl;t.currentPathDE=r.data.languageUrls.de;t.currentPathES=r.data.languageUrls.es}]);angular.module("walkTheCity").controller("AppCtrl",["$rootScope","$scope","$location","configuration","templateLoader","countries",function(n,t,i,r,u,f){function e(){f.all().then(function(n){t.countries=n.data.countries;t.appStoreUrl=n.data.appStoreUrl;t.googlePlayUrl=n.data.googlePlayUrl;t.disclaimerPageTitle=n.data.disclaimerPageTitle})}t.currentLanguage=r.CurrentLanguage;e();t.changeLanguage=function(f){t.currentLanguage!==f&&(t.currentLanguage=r.CurrentLanguage=f,n.loadingView=!0,u.load(f).then(function(){var n=i.path();n=n.substring(3);i.path("/"+f+n)}))};t.$watch(function(){return r.CurrentLanguage},function(n,t){n&&n!==t&&e()})}]);angular.module("walkTheCity").controller("CitymarketingCtrl",["$scope","$rootScope","configuration","page",function(n,t,i,r){n.viewClass="citymarketing";t.viewTitle=r.data.title;t.jsonId={"@context":"http://schema.org","@type":"BreadcrumbList",itemListElement:[{"@type":"ListItem",position:1,item:{"@id":"http://www.walkthecity.eu"+r.data.languageUrls[i.CurrentLanguage],name:r.data.title}}]};t.currentPathEN=r.data.languageUrls.en;t.currentPathNL=r.data.languageUrls.nl;t.currentPathDE=r.data.languageUrls.de;t.currentPathES=r.data.languageUrls.es}]);angular.module("walkTheCity").controller("DisclaimerCtrl",["$scope","$rootScope","configuration","page",function(n,t,i,r){t.viewTitle=r.data.title;t.jsonId={"@context":"http://schema.org","@type":"BreadcrumbList",itemListElement:[{"@type":"ListItem",position:1,item:{"@id":"http://www.walkthecity.eu"+r.data.languageUrls[i.CurrentLanguage],name:r.data.title}}]};t.currentPathEN="/en/disclaimer";t.currentPathNL="/nl/disclaimer";t.currentPathDE="/de/disclaimer";t.currentPathES="/es/disclaimer"}]);angular.module("walkTheCity").controller("DownloadCtrl",["$scope","$rootScope","configuration","page","routes",function(n,t,i,r,u){n.viewClass="download-page";t.viewTitle=r.data.title;t.jsonId={"@context":"http://schema.org","@type":"BreadcrumbList",itemListElement:[{"@type":"ListItem",position:1,item:{"@id":"http://www.walkthecity.eu"+r.data.languageUrls[i.CurrentLanguage],name:r.data.title}}]};n.routes=u.data;t.currentPathEN=r.data.languageUrls.en;t.currentPathNL=r.data.languageUrls.nl;t.currentPathDE=r.data.languageUrls.de;t.currentPathES=r.data.languageUrls.es;n.scrollToTop=function(t){t=t.replace("!","").replace("#","");n.track(t);window.scrollTo(0,0);$location.path(t)}}]);angular.module("walkTheCity").controller("HomeCtrl",["$rootScope","$scope","language","configuration",function(n,t,i,r){t.viewClass="home";n.jsonId={"@context":"http://schema.org","@type":"WebSite",name:"Walk the City",url:"http://www.walkthecity.eu"};r.CurrentLanguage=i;n.currentPathEN="/en";n.currentPathNL="/nl";n.currentPathDE="/de";n.currentPathES="/es"}]);angular.module("walkTheCity").controller("RouteCtrl",["$scope","$rootScope","configuration","routes","route","language",function(n,t,i,r,u,f){n.viewClass="route";n.route=u.data;t.viewTitle=u.data.title;t.jsonId={"@context":"http://schema.org","@type":"BreadcrumbList",itemListElement:[{"@type":"ListItem",position:1,item:{"@id":"http://www.walkthecity.eu"+u.data.cityUrl,name:u.data.city}},{"@type":"ListItem",position:2,item:{"@id":"http://www.walkthecity.eu"+u.data.url,name:u.data.title}}]};t.productJsonld={"@context":"http://schema.org/","@type":"Product",name:u.data.title,image:"http://www.walkthecity.eu/wtc/routes/"+u.data.id+"/"+u.data.downloadImage+".jpg",offers:{"@type":"Offer",priceCurrency:"EUR",price:u.data.appStoreFree?"0":"0.99"}};i.CurrentLanguage=u.data.language?u.data.language:f?f:i.CurrentLanguage;r.getUrls(u.data.slug).then(function(n){t.currentPathEN=n.data.en;t.currentPathNL=n.data.nl;t.currentPathDE=n.data.de;t.currentPathES=n.data.es});n.slideIndex=0;n.getTemplateUrl=function(){return"wtc/routes/"+u.data.id+"/"+i.CurrentLanguage+".html"};n.scrollToTop=function(t){t=t.replace("!","").replace("#","");n.track(t);window.scrollTo(0,0);$location.path(t)};n.track=function(n){ga("send","pageview",n)}}]);angular.module("walkTheCity").directive("banner",["$interval",function(n){return{replace:!0,scope:{route:"@",images:"=",slideIndex:"@"},templateUrl:function(){return"wtc/views/banner.html"},link:function(t){function u(){return Array.isArray(t.images)?t.images.length:Object.keys(t.images).length}var i=1,r=u();n(function(){var n=parseInt(t.slideIndex);n>=r-1?i=-1:n<=0&&(i=1);n+=i;t.slideIndex=n},3e3);t.mapToHash=function(n){return Array.isArray(n)?n.reduce(function(n,t){return n[t]="",n},{}):n}}}}]);angular.module("walkTheCity").directive("contact",["configuration",function(n){return{replace:!0,templateUrl:function(){return"wtc/views/"+n.CurrentLanguage+"/contact.html"}}}]);angular.module("walkTheCity").directive("download",["configuration","$location",function(n,t){return{replace:!0,scope:{route:"=",showImage:"@"},templateUrl:function(){return"wtc/views/"+n.CurrentLanguage+"/download-buttons.html"},link:function(n){n.scrollToTop=function(i){i=i.replace("!","").replace("#","");n.track(i);window.scrollTo(0,0);t.path(i)};n.track=function(n){ga("send","pageview",n)}}}}]);angular.module("walkTheCity").directive("footer",["configuration","countries","$location",function(n,t,i){return{restrict:"E",template:'<div ng-include="footerContentUrl"><\/div>',link:function(t){t.footerContentUrl="wtc/views/"+n.CurrentLanguage+"/footer.html";t.$watch(function(){return n.CurrentLanguage},function(n,i){n&&n!==i&&(t.footerContentUrl="wtc/views/"+n+"/footer.html")});t.scrollToTop=function(n){n=n.replace("!","").replace("#","");t.track(n);window.scrollTo(0,0);i.path(n)};t.track=function(n){ga("send","pageview",n)}}}}]);angular.module("walkTheCity").directive("header",["configuration","scroller","$rootScope","$location",function(n,t,i,r){return{restrict:"E",replace:!1,template:'<div ng-include="contentUrl"><\/div>',link:function(u){u.languagesState="closed";u.menuState="normal";i.currentPathEN=i.currentPathNL=i.currentPathDE=i.currentPathES=r.path;u.contentUrl="wtc/views/"+n.CurrentLanguage+"/header.html";u.$watch(function(){return n.CurrentLanguage},function(n,t){n&&n!==t&&(u.contentUrl="wtc/views/"+n+"/header.html")});u.scrollToBottom=function(){t.scrollToElement(document.getElementById("cities"),0,1400)};u.goTo=function(n){t.scrollTo(0,0,600);u.languagesState="closed";u.menuState="normal";ga("send","pageview",n)};u.changeLanguage=function(i){t.scrollTo(0,0,600);n.CurrentLanguage=i;u.contentUrl="wtc/views/"+n.CurrentLanguage+"/header.html"};u.toggleLanguages=function(){u.languagesState=u.languagesState==="closed"?"open":"closed";u.menuState=u.languagesState==="closed"?"normal":"dimmed"};u.$on("$routeChangeStart",function(n,t,u){t!==u&&(i.currentPathEN=i.currentPathNL=i.currentPathDE=i.currentPathES=r.path())})}}}]);angular.module("walkTheCity").directive("ideas",["configuration",function(n){return{replace:!0,templateUrl:function(){return"wtc/views/"+n.CurrentLanguage+"/ideas.html"}}}]);angular.module("walkTheCity").directive("jsonld",["$filter","$sce",function(n,t){return{restrict:"E",template:function(){return'<script type="application/ld+json" ng-bind-html="jsonld()"><\/script>'},replace:!0,scope:{json:"=json"},link:function(i){i.jsonld=function(){return t.trustAsHtml(n("json")(i.json))}}}}]);angular.module("walkTheCity").directive("language",["configuration",function(n){return{link:function(t,i){i.attr("lang",n.CurrentLanguage);t.$watch(function(){return n.CurrentLanguage},function(t,r){t!==r&&i.attr("lang",n.CurrentLanguage)})}}}]);angular.module("walkTheCity").directive("consent",["configuration","privacyConsent",function(n,t){return{restrict:"E",template:'<div ng-include="privacyConsentContentUrl"><\/div>',link:function(i){i.privacyConsentContentUrl="wtc/views/"+n.CurrentLanguage+"/privacyConsent.html";i.$watch(function(){return n.CurrentLanguage},function(n,t){n&&n!==t&&(i.privacyConsentContentUrl="wtc/views/"+n+"/privacyConsent.html")});i.hide=function(){i.privacyConsentState="hidden";t.hide()};i.scrollToTop=function(n){n=n.replace("!","").replace("#","");i.track(n);window.scrollTo(0,0);$location.path(n)}}}}]);angular.module("walkTheCity").directive("routeImages",[function(){return{replace:!0,scope:{route:"@",images:"=",mapLink:"@"},templateUrl:function(){return"wtc/views/route-images.html"},link:function(n){n.mapToObjects=function(n){for(var t=0;t<n.length;t++)n[t].name||(n[t]={name:n[t],alt:"",link:""});return n};n.imageLink=function(t){return t.link?t.link:n.mapLink?n.mapLink:null}}}}]);angular.module("walkTheCity").directive("routesInTheSameCity",["routes",function(n){return{replace:!0,scope:!0,templateUrl:function(){return"wtc/views/routes-in-the-same-city.html"},link:function(t){n.getByCity(t.route.city).then(function(n){t.routes=n.data})}}}]);angular.module("walkTheCity").directive("stickyHeader",["$window",function(n){var t=angular.element(n);return{link:function(i,r,u){function e(n){var t,i={top:0,left:0},r=n&&n.ownerDocument;if(r)return t=r.documentElement,i=n.getBoundingClientRect(),{top:i.top+(window.pageYOffset||t.scrollTop)-(t.clientTop||0),left:i.left+(window.pageXOffset||t.scrollLeft)-(t.clientLeft||0)}}var f=u.stickyHeader,o=e(r[0]).top;t.on("scroll",function(){var t=280;r.hasClass("header-large")&&(t=590);n.pageYOffset>t?r.addClass(f):r.removeClass(f)})}}}]);angular.module("walkTheCity").directive("top",["configuration",function(n){return{replace:!0,template:'<div ng-include="topContentUrl"><\/div>',link:function(t){t.scrollToTop=function(){window.scrollTo(0,0)};t.topContentUrl="wtc/views/"+n.CurrentLanguage+"/top.html";t.$watch(function(){return n.CurrentLanguage},function(n,i){n!==i&&(t.topContentUrl="wtc/views/"+n+"/top.html")})}}}]);angular.module("walkTheCity").factory("configuration",[function(){return{ApiBasePath:"http://localhost:52150/",CurrentLanguage:window.config.language,save:function(n){this.SessionTimeout=n.sessionTimeout}}}]);angular.module("walkTheCity").factory("countries",["$http","configuration",function(n,t){return{all:function(){return n({method:"GET",url:"/api/countries",headers:{"WtC-Language":t.CurrentLanguage}})}}}]);angular.module("walkTheCity").factory("pages",["$http","configuration",function(n,t){return{getPage:function(i){var r="/api/pages/"+i;return n({method:"GET",url:r,headers:{"WtC-Language":t.CurrentLanguage}})}}}]);angular.module("walkTheCity").factory("privacyConsent",["$http",function(n){return{hide:function(){return n({method:"GET",url:"/PrivacyConsent"})}}}]);angular.module("walkTheCity").factory("routes",["$http","configuration",function(n,t){return{getAllDownloadable:function(){return n({method:"GET",url:"/api/routes",headers:{"WtC-Language":t.CurrentLanguage}})},getRoute:function(i){var r="/api/routes/"+i;return n({method:"GET",url:r,headers:{"WtC-Language":t.CurrentLanguage}})},getRouteByCity:function(i){var r="/api/route/city/"+i;return n({method:"GET",url:r,headers:{"WtC-Language":t.CurrentLanguage}})},getByCity:function(i){var r="/api/routes/city/"+i+"?language="+t.CurrentLanguage;return n({cache:!0,method:"GET",url:r,headers:{"WtC-Language":t.CurrentLanguage}})},getUrls:function(i){var r="/api/urls/"+i;return n({method:"GET",url:r,headers:{"WtC-Language":t.CurrentLanguage}})}}}]);angular.module("walkTheCity").factory("templateLoader",["$templateCache","$q","$timeout",function(n,t,i){return{load:function(){var r=t.defer();return i(function(){n.put("en/views/home.html",'<p class="lead">Smartphane stadswalks of Walk the City are your personal guide bij het ontdekken van een stad. Download de app van een wandeling in een stand naar keuze, kies een instappunt en je kunt beginnen.<\/p>\r\n\r\n<div class="row">\r\n    <div class="col-sm-4">\r\n        <img src="assets/img/sass-less.png" alt="Sass and Less support" class="img-responsive">\r\n        <p>In addition to vanilla CSS, Bootstrap includes support for the two most popular CSS preprocessors, <a href="../css/#less">Less<\/a> and <a href="../css/#sass">Sass<\/a>.<\/p>\r\n    <\/div>\r\n    \r\n    <div class="col-sm-4">\r\n        <img src="assets/img/sass-less.png" alt="Sass and Less support" class="img-responsive">\r\n        <p>In addition to vanilla CSS, Bootstrap includes support for the two most popular CSS preprocessors, <a href="../css/#less">Less<\/a> and <a href="../css/#sass">Sass<\/a>.<\/p>\r\n    <\/div>\r\n    \r\n    <div class="col-sm-4">\r\n        <img src="assets/img/sass-less.png" alt="Sass and Less support" class="img-responsive">\r\n        <p>In addition to vanilla CSS, Bootstrap includes support for the two most popular CSS preprocessors, <a href="../css/#less">Less<\/a> and <a href="../css/#sass">Sass<\/a>.<\/p>\r\n    <\/div>\r\n\r\n<\/div>');r.resolve()},1e3),r.promise}}}])