https://app-desktop.cdn.doxxbet.sk/scripts/sportbook-c0559dc5d592c344922b9652b89ce4c93e7532a3.min.js
1if((a=>{"function"==typeof define&&define.amd?define(["jquery"],a):"undefined"!=typeof exports?module.exports=a(require("jquery")):a(jQuery)})(function(a){var b=window.Slick||{};(b=(()=>{var b=0;return function(c,d){var e=this;e.defaults={accessibility:!0,adaptiveHeight:!1,appendArrows:a(c),appendDots:a(c),arrows:!0,asNavFor:null,prevArrow:'<button type="button" data-role="none" class="slick-prev" aria-label="Previous" tabindex="0" role="button">Previous</button>',nextArrow:'<button type="button" data-role="none" class="slick-next" aria-label="Next" tabindex="0" role="button">Next</button>',autoplay:!1,autoplaySpeed:3e3,centerMode:!1,centerPadding:"50px",cssEase:"ease",customPaging:function(b,c){return a('<button type="button" data-role="none" role="button" tabindex="0" />').text(c+1)},dots:!1,dotsClass:"slick-dots",draggable:!0,easing:"linear",edgeFriction:.35,fade:!1,focusOnSelect:!1,infinite:!0,initialSlide:0,lazyLoad:"ondemand",mobileFirst:!1,pauseOnHover:!0,pauseOnFocus:!0,pauseOnDotsHover:!1,respondTo:"window",responsive:null,rows:1,rtl:!1,slide:"",slidesPerRow:1,slidesToShow:1,slidesToScroll:1,speed:500,swipe:!0,swipeToSlide:!1,touchMove:!0,touchThreshold:5,useCSS:!0,useTransform:!0,variableWidth:!1,vertical:!1,verticalSwiping:!1,waitForAnimate:!0,zIndex:1e3},e.initials={animating:!1,dragging:!1,autoPlayTimer:null,currentDirection:0,currentLeft:null,currentSlide:0,direction:1,$dots:null,listWidth:null,listHeight:null,loadIndex:0,$nextArrow:null,$prevArrow:null,slideCount:null,slideWidth:null,$slideTrack:null,$slides:null,sliding:!1,slideOffset:0,swipeLeft:null,$list:null,touchObject:{},transformsEnabled:!1,unslicked:!1},a.extend(e,e.initials),e.activeBreakpoint=null,e.animType=null,e.animProp=null,e.breakpoints=[],e.breakpointSettings=[],e.cssTransitions=!1,e.focussed=!1,e.interrupted=!1,e.hidden="hidden",e.paused=!0,e.positionProp=null,e.respondTo=null,e.rowCount=1,e.shouldClick=!0,e.$slider=a(c),e.$slidesCache=null,e.transformType=null,e.transitionType=null,e.visibilityChange="visibilitychange",e.windowWidth=0,e.windowTimer=null,c=a(c).data("slick")||{},e.options=a.extend({},e.defaults,d,c),e.currentSlide=e.options.initialSlide,e.originalSettings=e.options,void 0!==document.mozHidden?(e.hidden="mozHidden",e.visibilityChange="mozvisibilitychange"):void 0!==document.webkitHidden&&(e.hidden="webkitHidden",e.visibilityChange="webkitvisibilitychange"),e.autoPlay=a.proxy(e.autoPlay,e),e.autoPlayClear=a.proxy(e.autoPlayClear,e),e.autoPlayIterator=a.proxy(e.autoPlayIterator,e),e.changeSlide=a.proxy(e.changeSlide,e),e.clickHandler=a.proxy(e.clickHandler,e),e.selectHandler=a.proxy(e.selectHandler,e),e.setPosition=a.proxy(e.setPosition,e),e.swipeHandler=a.proxy(e.swipeHandler,e),e.dragHandler=a.proxy(e.dragHandler,e),e.keyHandler=a.proxy(e.keyHandler,e),e.instanceUid=b++,e.htmlExpr=/^(?:\s*(<[\w\W]+>)[^>]*)$/,e.registerBreakpoints(),e.init(!0)}})()).prototype.activateADA=function(){this.$slideTrack.find(".slick-active").attr({"aria-hidden":"false"}).find("a, input, button, select").attr({tabindex:"0"})},b.prototype.addSlide=b.prototype.slickAdd=function(b,c,d){var e=this;if("boolean"==typeof c)d=c,c=null;else if(c<0||c>=e.slideCount)return!1;e.unload(),"number"==typeof c?0===c&&0===e.$slides.length?a(b).appendTo(e.$slideTrack):d?a(b).insertBefore(e.$slides.eq(c)):a(b).insertAfter(e.$slides.eq(c)):!0===d?a(b).prependTo(e.$slideTrack):a(b).appendTo(e.$slideTrack),e.$slides=e.$slideTrack.children(this.options.slide),e.$slideTrack.children(this.options.slide).detach(),e.$slideTrack.append(e.$slides),e.$slides.each(function(b,c){a(c).attr("data-slick-index",b)}),e.$slidesCache=e.$slides,e.reinit()},b.prototype.animateHeight=function(){var b,a=this;1===a.options.slidesToShow&&!0===a.options.adaptiveHeight&&!1===a.options.vertical&&(b=a.$slides.eq(a.currentSlide).outerHeight(!0),a.$list.animate({height:b},a.options.speed))},b.prototype.animateSlide=function(b,c){var d={},e=this;e.animateHeight(),!0===e.options.rtl&&!1===e.options.vertical&&(b=-b),!1===e.transformsEnabled?!1===e.options.vertical?e.$slideTrack.animate({left:b},e.options.speed,e.options.easing,c):e.$slideTrack.animate({top:b},e.options.speed,e.options.easing,c):!1===e.cssTransitions?(!0===e.options.rtl&&(e.currentLeft=-e.currentLeft),a({animStart:e.currentLeft}).animate({animStart:b},{duration:e.options.speed,easing:e.options.easing,step:function(a){a=Math.ceil(a),!1===e.options.vertical?d[e.animType]="translate("+a+"px, 0px)":d[e.animType]="translate(0px,"+a+"px)",e.$slideTrack.css(d)}
vendor: 6,159 bytes, line 1
1,complete:function(){c&&c.call()}})):(e.applyTransition(),b=Math.ceil(b),!1===e.options.vertical?d[e.animType]="translate3d("+b+"px, 0px, 0px)":d[e.animType]="translate3d(0px,"+b+"px, 0px)",e.$slideTrack.css(d),c&&setTimeout(function(){e.disableTransition(),c.call()},e.options.speed))},b.prototype.getNavTarget=function(){var c=this.options.asNavFor;return c=c&&null!==c?a(c).not(this.$slider):c},b.prototype.asNavFor=function(b){var d=this.getNavTarget();null!==d&&"object"==typeof d&&d.each(function(){var c=a(this).slick("getSlick");c.unslicked||c.slideHandler(b,!0)})},b.prototype.applyTransition=function(a){var b=this,c={};!1===b.options.fade?c[b.transitionType]=b.transformType+" "+b.options.speed+"ms "+b.options.cssEase:c[b.transitionType]="opacity "+b.options.speed+"ms "+b.options.cssEase,(!1===b.options.fade?b.$slideTrack:b.$slides.eq(a)).css(c)},b.prototype.autoPlay=function(){var a=this;a.autoPlayClear(),a.slideCount>a.options.slidesToShow&&(a.autoPlayTimer=setInterval(a.autoPlayIterator,a.options.autoplaySpeed))},b.prototype.autoPlayClear=function(){this.autoPlayTimer&&clearInterval(this.autoPlayTimer)},b.prototype.autoPlayIterator=function(){var a=this,b=a.currentSlide+a.options.slidesToScroll;a.paused||a.interrupted||a.focussed||(!1===a.options.infinite&&(1===a.direction&&a.currentSlide+1===a.slideCount-1?a.direction=0:0===a.direction&&(b=a.currentSlide-a.options.slidesToScroll,a.currentSlide-1==0)&&(a.direction=1)),a.slideHandler(b))},b.prototype.buildArrows=function(){var b=this;!0===b.options.arrows&&(b.$prevArrow=a(b.options.prevArrow).addClass("slick-arrow"),b.$nextArrow=a(b.options.nextArrow).addClass("slick-arrow"),b.slideCount>b.options.slidesToShow?(b.$prevArrow.removeClass("slick-hidden").removeAttr("aria-hidden tabindex"),b.$nextArrow.removeClass("slick-hidden").removeAttr("aria-hidden tabindex"),b.htmlExpr.test(b.options.prevArrow)&&b.$prevArrow.prependTo(b.options.appendArrows),b.htmlExpr.test(b.options.nextArrow)&&b.$nextArrow.appendTo(b.options.appendArrows),!0!==b.options.infinite&&b.$prevArrow.addClass("slick-disabled").attr("aria-disabled","true")):b.$prevArrow.add(b.$nextArrow).addClass("slick-hidden").attr({"aria-disabled":"true",tabindex:"-1"}))},b.prototype.buildDots=function(){var c,d,b=this;if(!0===b.options.dots&&b.slideCount>b.options.slidesToShow){for(b.$slider.addClass("slick-dotted"),d=a("<ul />").addClass(b.options.dotsClass),c=0;c<=b.getDotCount();c+=1)d.append(a("<li />").append(b.options.customPaging.call(this,b,c)));b.$dots=d.appendTo(b.options.appendDots),b.$dots.find("li").first().addClass("slick-active").attr("aria-hidden","false")}},b.prototype.buildOut=function(){var b=this;b.$slides=b.$slider.children(b.options.slide+":not(.slick-cloned)").addClass("slick-slide"),b.slideCount=b.$slides.length,b.$slides.each(function(b,c){a(c).attr("data-slick-index",b).data("originalStyling",a(c).attr("style")||"")}),b.$slider.addClass("slick-slider"),b.$slideTrack=0===b.slideCount?a('<div class="slick-track"/>').appendTo(b.$slider):b.$slides.wrapAll('<div class="slick-track"/>').parent(),b.$list=b.$slideTrack.wrap('<div aria-live="polite" class="slick-list"/>').parent(),b.$slideTrack.css("opacity",0),!0!==b.options.centerMode&&!0!==b.options.swipeToSlide||(b.options.slidesToScroll=1),a("img[data-lazy]",b.$slider).not("[src]").addClass("slick-loading"),b.setupInfinite(),b.buildArrows(),b.buildDots(),b.updateDots(),b.setSlideClasses("number"==typeof b.currentSlide?b.currentSlide:0),!0===b.options.draggable&&b.$list.addClass("draggable")},b.prototype.buildRows=function(){var b,f,h,a=this,e=document.createDocumentFragment(),g=a.$slider.children();if(1<a.options.rows){for(h=a.options.slidesPerRow*a.options.rows,f=Math.ceil(g.length/h),b=0;b<f;b++){for(var i=document.createElement("div"),c=0;c<a.options.rows;c++){for(var j=document.createElement("div"),d=0;d<a.options.slidesPerRow;d++){var k=b*h+(c*a.options.slidesPerRow+d);g.get(k)&&j.appendChild(g.get(k))}i.appendChild(j)}e.appendChild(i)}a.$slider.empty().append(e),a.$slider.children().children().children().css({width:100/a.options.slidesPerRow+"%",display:"inline-block"})}},b.prototype.checkResponsive=function(b,c){var e,f,g,d=this,h=!1,i=d.$slider.width(),j=window.innerWidth||a(window).width();if("window"===d.respondTo?g=j:"slider"===d.respondTo?g=i:"min"===d.respondTo&&(g=Math.min(j,i)),d.options.responsive&&d.options.responsive.length&&null!==d.options.responsive){for(e in f=null,d.breakpoints)d.breakpoints.hasOwnProperty(e)&&(!1===d.originalSettings.mobileFirst?g<d.breakpoints[e]&&(f=d.breakpoints[e]):g>d.breakpoints[e]&&(f=d.breakpoints[e]));null!==f?null!==d.activeBreakpoint&&f===d.activeBreakpoint&&!c||(d.activeBreakpoint=f,"unslick"===d.breakpointSettings[f]?d.unslick(f):(d.options=a.extend({},d.originalSettings,d.breakpointSettings[f]),!0===b&&(d.currentSlide=d.options.initialSlide),d.refresh(b)),h=f):null!==d.activeBreakpoint&&(d.activeBreakpoint=null,d.options=d.originalSettings,!0===b&&(d.currentSlide=d.options.initialSlide),d.refresh(b),h=f),b||!1===h||d.$slider.trigger("breakpoint",[d,h])}},b.prototype.changeSlide=function(b,c){var f,d=this,e=a(b.currentTarget);switch(e.is("a")&&b.preventDefault(),e.is("li")||(e=e.closest("li")),f=d.slideCount%d.options.slidesToScroll!=0?0:(d.slideCount-d.currentSlide)%d.options.slidesToScroll,b.data.message){case"previous":g=0==f?d.options.slidesToScroll:d.options.slidesToShow-f,d.slideCount>d.options.slidesToShow&&d.slideHandler(d.currentSlide-g,!1,c);break;case"next":g=0==f?d.options.slidesToScroll:f,d.slideCount>d.options.slidesToShow&&d.slideHandler(d.currentSlide+g,!1,c);break;case"index":var g=0===b.data.index?0:b.data.index||e.index()*d.options.slidesToScroll;d.slideHandler(d.checkNavigable(g),!1,c),e.children().trigger("focus");break;default:return}},b.prototype.checkNavigable=function(a){var c=this.getNavigableIndexes(),d=0;if(a>c[c.length-1])a=c[c.length-1];else for(var e in c){if(a<c[e]){a=d;break}d=c[e]}return a},b.prototype.cleanUpEvents=function(){var b=this;b.options.dots&&null!==b.$dots&&a("li",b.$dots).off("click.slick",b.changeSlide).off("mouseenter.slick",a.proxy(b.interrupt,b,!0)).off("mouseleave.
1slick",a.proxy(b.interrupt,b,!1)),b.$slider.off("focus.slick blur.slick"),!0===b.options.arrows&&b.slideCount>b.options.slidesToShow&&(b.$prevArrow&&b.$prevArrow.off("click.slick",b.changeSlide),b.$nextArrow)&&b.$nextArrow.off("click.slick",b.changeSlide),b.$list.off("touchstart.slick mousedown.slick",b.swipeHandler),b.$list.off("touchmove.slick mousemove.slick",b.swipeHandler),b.$list.off("touchend.slick mouseup.slick",b.swipeHandler),b.$list.off("touchcancel.slick mouseleave.slick",b.swipeHandler),b.$list.off("click.slick",b.clickHandler),a(document).off(b.visibilityChange,b.visibility),b.cleanUpSlideEvents(),!0===b.options.accessibility&&b.$list.off("keydown.slick",b.keyHandler),!0===b.options.focusOnSelect&&a(b.$slideTrack).children().off("click.slick",b.selectHandler),a(window).off("orientationchange.slick.slick-"+b.instanceUid,b.orientationChange),a(window).off("resize.slick.slick-"+b.instanceUid,b.resize),a("[draggable!=true]",b.$slideTrack).off("dragstart",b.preventDefault),a(window).off("load.slick.slick-"+b.instanceUid,b.setPosition),a(document).off("ready.slick.slick-"+b.instanceUid,b.setPosition)},b.prototype.cleanUpSlideEvents=function(){var b=this;b.$list.off("mouseenter.slick",a.proxy(b.interrupt,b,!0)),b.$list.off("mouseleave.slick",a.proxy(b.interrupt,b,!1))},b.prototype.cleanUpRows=function(){var b,a=this;1<a.options.rows&&((b=a.$slides.children().children()).removeAttr("style"),a.$slider.empty().append(b))},b.prototype.clickHandler=function(a){!1===this.shouldClick&&(a.stopImmediatePropagation(),a.stopPropagation(),a.preventDefault())},b.prototype.destroy=function(b){var c=this;c.autoPlayClear(),c.touchObject={},c.cleanUpEvents(),a(".slick-cloned",c.$slider).detach(),c.$dots&&c.$dots.remove(),c.$prevArrow&&c.$prevArrow.length&&(c.$prevArrow.removeClass("slick-disabled slick-arrow slick-hidden").removeAttr("aria-hidden aria-disabled tabindex").css("display",""),c.htmlExpr.test(c.options.prevArrow))&&c.$prevArrow.remove(),c.$nextArrow&&c.$nextArrow.length&&(c.$nextArrow.removeClass("slick-disabled slick-arrow slick-hidden").removeAttr("aria-hidden aria-disabled tabindex").css("display",""),c.htmlExpr.test(c.options.nextArrow))&&c.$nextArrow.remove(),c.$slides&&(c.$slides.removeClass("slick-slide slick-active slick-center slick-visible slick-current").removeAttr("aria-hidden").removeAttr("data-slick-index").each(function(){a(this).attr("style",a(this).data("originalStyling"))}),c.$slideTrack.children(this.options.slide).detach(),c.$slideTrack.detach(),c.$list.detach(),c.$slider.append(c.$slides)),c.cleanUpRows(),c.$slider.removeClass("slick-slider"),c.$slider.removeClass("slick-initialized"),c.$slider.removeClass("slick-dotted"),c.unslicked=!0,b||c.$slider.trigger("destroy",[c])},b.prototype.disableTransition=function(a){var b=this,c={};c[b.transitionType]="",(!1===b.options.fade?b.$slideTrack:b.$slides.eq(a)).css(c)},b.prototype.fadeSlide=function(a,b){var c=this;!1===c.cssTransitions?(c.$slides.eq(a).css({zIndex:c.options.zIndex}),c.$slides.eq(a).animate({opacity:1},c.options.speed,c.options.easing,b)):(c.applyTransition(a),c.$slides.eq(a).css({opacity:1,zIndex:c.options.zIndex}),b&&setTimeout(function(){c.disableTransition(a),b.call()},c.options.speed))},b.prototype.fadeSlideOut=function(a){var b=this;!1===b.cssTransitions?b.$slides.eq(a).animate({opacity:0,zIndex:b.options.zIndex-2},b.options.speed,b.options.easing):(b.applyTransition(a),b.$slides.eq(a).css({opacity:0,zIndex:b.options.zIndex-2}))},b.prototype.filterSlides=b.prototype.slickFilter=function(a){var b=this;null!==a&&(b.$slidesCache=b.$slides,b.unload(),b.$slideTrack.children(this.options.slide).detach(),b.$slidesCache.filter(a).appendTo(b.$slideTrack),b.reinit())},b.prototype.focusHandler=function(){var b=this;b.$slider.off("focus.slick blur.slick").on("focus.slick blur.slick","*:not(.slick-arrow)",function(c){c.stopImmediatePropagation();var d=a(this);setTimeout(function(){b.options.pauseOnFocus&&(b.focussed=d.is(":focus"),b.autoPlay())},0)})},b.prototype.getCurrent=b.prototype.slickCurrentSlide=function(){return this.currentSlide},b.prototype.getDotCount=function(){var a=this,b=0,c=0,d=0;if(!0===a.options.infinite)for(;b<a.slideCount;)++d,b=c+a.options.slidesToScroll,c+=a.options.slidesToScroll<=a.options.slidesToShow?a.options.slidesToScroll:a.options.slidesToShow;else if(!0===a.options.centerMode)d=a.slideCount;else if(a.options.asNavFor)for(;b<a.slideCount;)++d,b=c+a.options.slidesToScroll,c+=a.options.slidesToScroll<=a.options.slidesToShow?a.options.slidesToScroll:a.options.slidesToShow;else d=1+Math.ceil((a.slideCount-a.options.slidesToShow)/a.options.slidesToScroll);return d-1},b.prototype.getLeft=function(a){var d,b=this,e=0;return b.slideOffset=0,d=b.$slides.first().outerHeight(!0),!0===b.options.infinite?(b.slideCount>b.options.slidesToShow&&(b.slideOffset=b.slideWidth*b.options.slidesToShow*-1,e=d*b.options.slidesToShow*-1),b.slideCount%b.options.slidesToScroll!=0&&a+b.options.slidesToScroll>b.slideCount&&b.slideCount>b.options.slidesToShow&&(e=a>b.slideCount?(b.slideOffset=(b.options.slidesToShow-(a-b.slideCount))*b.slideWidth*-1,(b.options.slidesToShow-(a-b.slideCount))*d*-1):(b.slideOffset=b.slideCount%b.options.slidesToScroll*b.slideWidth*-1,b.slideCount%b.options.slidesToScroll*d*-1))):a+b.o
1ptions.slidesToShow>b.slideCount&&(b.slideOffset=(a+b.options.slidesToShow-b.slideCount)*b.slideWidth,e=(a+b.options.slidesToShow-b.slideCount)*d),b.slideCount<=b.options.slidesToShow&&(e=b.slideOffset=0),!0===b.options.centerMode&&!0===b.options.infinite?b.slideOffset+=b.slideWidth*Math.floor(b.options.slidesToShow/2)-b.slideWidth:!0===b.options.centerMode&&(b.slideOffset=0,b.slideOffset+=b.slideWidth*Math.floor(b.options.slidesToShow/2)),d=!1===b.options.vertical?a*b.slideWidth*-1+b.slideOffset:a*d*-1+e,!0===b.options.variableWidth&&(e=b.slideCount<=b.options.slidesToShow||!1===b.options.infinite?b.$slideTrack.children(".slick-slide").eq(a):b.$slideTrack.children(".slick-slide").eq(a+b.options.slidesToShow),d=!0===b.options.rtl?e[0]?-1*(b.$slideTrack.width()-e[0].offsetLeft-e.width()):0:e[0]?-1*e[0].offsetLeft:0,!0===b.options.centerMode)&&(e=b.slideCount<=b.options.slidesToShow||!1===b.options.infinite?b.$slideTrack.children(".slick-slide").eq(a):b.$slideTrack.children(".slick-slide").eq(a+b.options.slidesToShow+1),d=!0===b.options.rtl?e[0]?-1*(b.$slideTrack.width()-e[0].offsetLeft-e.width()):0:e[0]?-1*e[0].offsetLeft:0,d+=(b.$list.width()-e.outerWidth())/2),d},b.prototype.getOption=b.prototype.slickGetOption=function(a){return this.options[a]},b.prototype.getNavigableIndexes=function(){for(var a=this,b=0,c=0,d=[],e=!1===a.options.infinite?a.slideCount:(b=-1*a.options.slidesToScroll,c=-1*a.options.slidesToScroll,2*a.slideCount);b<e;)d.push(b),b=c+a.options.slidesToScroll,c+=a.options.slidesToScroll<=a.options.slidesToShow?a.options.slidesToScroll:a.options.slidesToShow;return d},b.prototype.getSlick=function(){return this},b.prototype.getSlideCount=function(){var d,b=this,e=!0===b.options.centerMode?b.slideWidth*Math.floor(b.options.slidesToShow/2):0;return!0===b.options.swipeToSlide?(b.$slideTrack.find(".slick-slide").each(function(c,f){return f.offsetLeft-e+a(f).outerWidth()/2>-1*b.swipeLeft?(d=f,!1):void 0}),Math.abs(a(d).attr("data-slick-index")-b.currentSlide)||1):b.options.slidesToScroll},b.prototype.goTo=b.prototype.slickGoTo=function(a,b){this.changeSlide({data:{message:"index",index:parseInt(a)}},b)},b.prototype.init=function(b){var c=this;a(c.$slider).hasClass("slick-initialized")||(a(c.$slider).addClass("slick-initialized"),c.buildRows(),c.buildOut(),c.setProps(),c.startLoad(),c.loadSlider(),c.initializeEvents(),c.updateArrows(),c.updateDots(),c.checkResponsive(!0),c.focusHandler()),b&&c.$slider.trigger("init",[c]),!0===c.options.accessibility&&c.initADA(),c.options.autoplay&&(c.paused=!1,c.autoPlay())},b.prototype.initADA=function(){var b=this;b.$slides.add(b.$slideTrack.find(".slick-cloned")).attr({"aria-hidden":"true",tabindex:"-1"}).find("a, input, button, select").attr({tabindex:"-1"}),b.$slideTrack.attr("role","listbox"),b.$slides.not(b.$slideTrack.find(".slick-cloned")).each(function(c){a(this).attr({role:"option","aria-describedby":"slick-slide"+b.instanceUid+c})}),null!==b.$dots&&b.$dots.attr("role","tablist").find("li").each(function(c){a(this).attr({role:"presentation","aria-selected":"false","aria-controls":"navigation"+b.instanceUid+c,id:"slick-slide"+b.instanceUid+c})}).first().attr("aria-selected","true").end().find("button").attr("role","button").end().closest("div").attr("role","toolbar"),b.activateADA()},b.prototype.initArrowEvents=function(){var a=this;!0===a.options.arrows&&a.slideCount>a.options.slidesToShow&&(a.$prevArrow.off("click.slick").on("click.slick",{message:"previous"},a.changeSlide),a.$nextArrow.off("click.slick").on("click.slick",{message:"next"},a.changeSlide))},b.prototype.initDotEvents=function(){var b=this;!0===b.options.dots&&b.slideCount>b.options.slidesToShow&&a("li",b.$dots).on("click.slick",{message:"index"},b.changeSlide),!0===b.options.dots&&!0===b.options.pauseOnDotsHover&&a("li",b.$dots).on("mouseenter.slick",a.proxy(b.interrupt,b,!0)).on("mouseleave.slick",a.proxy(b.interrupt,b,!1))},b.prototype.initSlideEvents=function(){var b=this;b.options.pauseOnHover&&(b.$list.on("mouseenter.slick",a.proxy(b.interrupt,b,!0)),b.$list.on("mouseleave.slick",a.proxy(b.interrupt,b,!1)))},b.prototype.initializeEvents=function(){var b=this;b.initArrowEvents(),b.initDotEvents(),b.initSlideEvents(),b.$list.on("touchstart.slick mousedown.slick",{action:"start"},b.swipeHandler),b.$list.on("touchmove.slick mousemove.slick",{action:"move"},b.swipeHandler),b.$list.on("touchend.slick mouseup.slick",{action:"end"}
1,b.swipeHandler),b.$list.on("touchcancel.slick mouseleave.slick",{action:"end"},b.swipeHandler),b.$list.on("click.slick",b.clickHandler),a(document).on(b.visibilityChange,a.proxy(b.visibility,b)),!0===b.options.accessibility&&b.$list.on("keydown.slick",b.keyHandler),!0===b.options.focusOnSelect&&a(b.$slideTrack).children().on("click.slick",b.selectHandler),a(window).on("orientationchange.slick.slick-"+b.instanceUid,a.proxy(b.orientationChange,b)),a(window).on("resize.slick.slick-"+b.instanceUid,a.proxy(b.resize,b)),a("[draggable!=true]",b.$slideTrack).on("dragstart",b.preventDefault),a(window).on("load.slick.slick-"+b.instanceUid,b.setPosition),a(document).on("ready.slick.slick-"+b.instanceUid,b.setPosition)},b.prototype.initUI=function(){var a=this;!0===a.options.arrows&&a.slideCount>a.options.slidesToShow&&(a.$prevArrow.show(),a.$nextArrow.show()),!0===a.options.dots&&a.slideCount>a.options.slidesToShow&&a.$dots.show()},b.prototype.keyHandler=function(a){var b=this;a.target.tagName.match("TEXTAREA|INPUT|SELECT")||(37===a.keyCode&&!0===b.options.accessibility?b.changeSlide({data:{message:!0===b.options.rtl?"next":"previous"}}):39===a.keyCode&&!0===b.options.accessibility&&b.changeSlide({data:{message:!0===b.options.rtl?"previous":"next"}}))},b.prototype.lazyLoad=function(){function g(c){a("img[data-lazy]",c).each(function(){var c=a(this),d=a(this).attr("data-lazy"),e=document.createElement("img");e.onload=function(){c.animate({opacity:0}
1,100,function(){c.attr("src",d).animate({opacity:1},200,function(){c.removeAttr("data-lazy").removeClass("slick-loading")}),b.$slider.trigger("lazyLoaded",[b,c,d])})},e.onerror=function(){c.removeAttr("data-lazy").removeClass("slick-loading").addClass("slick-lazyload-error"),b.$slider.trigger("lazyLoadError",[b,c,d])},e.src=d})}var e,f,b=this;!0===b.options.centerMode?f=!0===b.options.infinite?(e=b.currentSlide+(b.options.slidesToShow/2+1))+b.options.slidesToShow+2:(e=Math.max(0,b.currentSlide-(b.options.slidesToShow/2+1)),b.options.slidesToShow/2+1+2+b.currentSlide):(e=b.options.infinite?b.options.slidesToShow+b.currentSlide:b.currentSlide,f=Math.ceil(e+b.options.slidesToShow),!0===b.options.fade&&(0<e&&e--,f<=b.slideCount)&&f++),g(b.$slider.find(".slick-slide").slice(e,f)),b.slideCount<=b.options.slidesToShow?g(b.$slider.find(".slick-slide")):b.currentSlide>=b.slideCount-b.options.slidesToShow?g(b.$slider.find(".slick-cloned").slice(0,b.options.slidesToShow)):0===b.currentSlide&&g(b.$slider.find(".slick-cloned").slice(-1*b.options.slidesToShow))},b.prototype.loadSlider=function(){var a=this;a.setPosition(),a.$slideTrack.css({opacity:1}),a.$slider.removeClass("slick-loading"),a.initUI(),"progressive"===a.options.lazyLoad&&a.progressiveLazyLoad()},b.prototype.next=b.prototype.slickNext=function(){this.changeSlide({data:{message:"next"}})},b.prototype.orientationChange=function(){this.checkResponsive(),this.setPosition()},b.prototype.pause=b.prototype.slickPause=function(){this.autoPlayClear(),this.paused=!0},b.prototype.play=b.prototype.slickPlay=function(){var a=this;a.autoPlay(),a.options.autoplay=!0,a.paused=!1,a.focussed=!1,a.interrupted=!1},b.prototype.postSlide=function(a){var b=this;b.unslicked||(b.$slider.trigger("afterChange",[b,a]),b.animating=!1,b.setPosition(),b.swipeLeft=null,b.options.autoplay&&b.autoPlay(),!0===b.options.accessibility&&b.initADA())},b.prototype.prev=b.prototype.slickPrev=function(){this.changeSlide({data:{message:"previous"}})},b.prototype.preventDefault=function(a){a.preventDefault()},b.prototype.progressiveLazyLoad=function(b){b=b||1;var e,f,c=this,d=a("img[data-lazy]",c.$slider);d.length?(e=d.first(),f=e.attr("data-lazy"),(d=document.createElement("img")).onload=function(){e.attr("src",f).removeAttr("data-lazy").removeClass("slick-loading"),!0===c.options.adaptiveHeight&&c.setPosition(),c.$slider.trigger("lazyLoaded",[c,e,f]),c.progressiveLazyLoad()},d.onerror=function(){b<3?setTimeout(function(){c.progressiveLazyLoad(b+1)},500):(e.removeAttr("data-lazy").removeClass("slick-loading").addClass("slick-lazyload-error"),c.$slider.trigger("lazyLoadError",[c,e,f]),c.progressiveLazyLoad())},d.src=f):c.$slider.trigger("allImagesLoaded",[c])},b.prototype.refresh=function(b){var c=this,e=c.slideCount-c.options.slidesToShow;!c.options.infinite&&c.currentSlide>e&&(c.currentSlide=e),c.slideCount<=c.options.slidesToShow&&(c.currentSlide=0),e=c.currentSlide,c.destroy(!0),a.extend(c,c.initials,{currentSlide:e}),c.init(),b||c.changeSlide({data:{message:"index",index:e}},!1)},b.prototype.registerBreakpoints=function(){var c,d,e,b=this,f=b.options.responsive||null;if("array"===a.type(f)&&f.length){for(c in b.respondTo=b.options.respondTo||"window",f)if(e=b.breakpoints.length-1,d=f[c].breakpoint,f.hasOwnProperty(c)){for(;0<=e;)b.breakpoints[e]&&b.breakpoints[e]===d&&b.breakpoints.splice(e,1),e--;b.breakpoints.push(d),b.breakpointSettings[d]=f[c].settings}b.breakpoints.sort(function(a,c){return b.options.mobileFirst?a-c:c-a})}},b.prototype.reinit=function(){var b=this;b.$slides=b.$slideTrack.children(b.options.slide).addClass("slick-slide"),b.slideCount=b.$slides.length,b.currentSlide>=b.slideCount&&0!==b.currentSlide&&(b.currentSlide=b.currentSlide-b.options.slidesToScroll),b.slideCount<=b.options.slidesToShow&&(b.currentSlide=0),b.registerBreakpoints(),b.setProps(),b.setupInfinite(),b.buildArrows(),b.updateArrows(),b.initArrowEvents(),b.buildDots(),b.updateDots(),b.initDotEvents(),b.cleanUpSlideEvents(),b.initSlideEvents(),b.checkResponsive(!1,!0),!0===b.options.focusOnSelect&&a(b.$slideTrack).children().on("click.slick",b.selectHandler),b.setSlideClasses("number"==typeof b.currentSlide?b.currentSlide:0),b.setPosition(),b.focu
1sHandler(),b.paused=!b.options.autoplay,b.autoPlay(),b.$slider.trigger("reInit",[b])},b.prototype.resize=function(){var b=this;a(window).width()!==b.windowWidth&&(clearTimeout(b.windowDelay),b.windowDelay=window.setTimeout(function(){b.windowWidth=a(window).width(),b.checkResponsive(),b.unslicked||b.setPosition()},50))},b.prototype.removeSlide=b.prototype.slickRemove=function(a,b,c){var d=this;return a="boolean"==typeof a?!0===(b=a)?0:d.slideCount-1:!0===b?--a:a,!(d.slideCount<1||a<0||a>d.slideCount-1)&&(d.unload(),(!0===c?d.$slideTrack.children():d.$slideTrack.children(this.options.slide).eq(a)).remove(),d.$slides=d.$slideTrack.children(this.options.slide),d.$slideTrack.children(this.options.slide).detach(),d.$slideTrack.append(d.$slides),d.$slidesCache=d.$slides,void d.reinit())},b.prototype.setCSS=function(a){var d,e,b=this,c={};!0===b.options.rtl&&(a=-a),d="left"==b.positionProp?Math.ceil(a)+"px":"0px",e="top"==b.positionProp?Math.ceil(a)+"px":"0px",c[b.positionProp]=a,!1!==b.transformsEnabled&&(!(c={})===b.cssTransitions?c[b.animType]="translate("+d+", "+e+")":c[b.animType]="translate3d("+d+", "+e+", 0px)"),b.$slideTrack.css(c)},b.prototype.setDimensions=function(){var a=this,b=(!1===a.options.vertical?!0===a.options.centerMode&&a.$list.css({padding:"0px "+a.options.centerPadding}):(a.$list.height(a.$slides.first().outerHeight(!0)*a.options.slidesToShow),!0===a.options.centerMode&&a.$list.css({padding:a.options.centerPadding+" 0px"})),a.listWidth=a.$list.width(),a.listHeight=a.$list.height(),!1===a.options.vertical&&!1===a.options.variableWidth?(a.slideWidth=Math.ceil(a.listWidth/a.options.slidesToShow),a.$slideTrack.width(Math.ceil(a.slideWidth*a.$slideTrack.children(".slick-slide").length))):!0===a.options.variableWidth?a.$slideTrack.width(5e3*a.slideCount):(a.slideWidth=Math.ceil(a.listWidth),a.$slideTrack.height(Math.ceil(a.$slides.first().outerHeight(!0)*a.$slideTrack.children(".slick-slide").length))),a.$slides.first().outerWidth(!0)-a.$slides.first().width());!1===a.options.variableWidth&&a.$slideTrack.children(".slick-slide").width(a.slideWidth-b)},b.prototype.setFade=function(){var c,b=this;b.$slides.each(function(d,e){c=b.slideWidth*d*-1,!0===b.options.rtl?a(e).css({position:"relative",right:c,top:0,zIndex:b.options.zIndex-2,opacity:0}
1):a(e).css({position:"relative",left:c,top:0,zIndex:b.options.zIndex-2,opacity:0})}),b.$slides.eq(b.currentSlide).css({zIndex:b.options.zIndex-1,opacity:1})},b.prototype.setHeight=function(){var b,a=this;1===a.options.slidesToShow&&!0===a.options.adaptiveHeight&&!1===a.options.vertical&&(b=a.$slides.eq(a.currentSlide).outerHeight(!0),a.$list.css("height",b))},b.prototype.setOption=b.prototype.slickSetOption=function(){var c,d,e,f,h,b=this,g=!1;if("object"===a.type(arguments[0])?(e=arguments[0],g=arguments[1],h="multiple"):"string"===a.type(arguments[0])&&(e=arguments[0],f=arguments[1],g=arguments[2],"responsive"===arguments[0]&&"array"===a.type(arguments[1])?h="responsive":void 0!==arguments[1]&&(h="single")),"single"===h)b.options[e]=f;else if("multiple"===h)a.each(e,function(a,c){b.options[a]=c});else if("responsive"===h)for(d in f)if("array"!==a.type(b.options.responsive))b.options.responsive=[f[d]];else{for(c=b.options.responsive.length-1;0<=c;)b.options.responsive[c].breakpoint===f[d].breakpoint&&b.options.responsive.splice(c,1),c--;b.options.responsive.push(f[d])}g&&(b.unload(),b.reinit())},b.prototype.setPosition=function(){var a=this;a.setDimensions(),a.setHeight(),!1===a.options.fade?a.setCSS(a.getLeft(a.currentSlide)):a.setFade(),a.$slider.trigger("setPosition",[a])},b.prototype.setProps=function(){var a=this,b=document.body.style;a.positionProp=!0===a.options.vertical?"top":"left","top"===a.positionProp?a.$slider.addClass("slick-vertical"):a.$slider.removeClass("slick-vertical"),void 0===b.WebkitTransition&&void 0===b.MozTransition&&void 0===b.msTransition||!0!==a.options.useCSS||(a.cssTransitions=!0),a.options.fade&&("number"==typeof a.options.zIndex?a.options.zIndex<3&&(a.options.zIndex=3):a.options.zIndex=a.defaults.zIndex),void 0!==b.OTransform&&(a.animType="OTransform",a.transformType="-o-transform",a.transitionType="OTransition",void 0===b.perspectiveProperty)&&void 0===b.webkitPerspective&&(a.animType=!1),void 0!==b.MozTransform&&(a.animType="MozTransform",a.transformType="-moz-transform",a.transitionType="MozTransition",void 0===b.perspectiveProperty)&&void 0===b.MozPerspective&&(a.animType=!1),void 0!==b.webkitTransform&&(a.animType="webkitTransform",a.transformType="-webkit-transform",a.transitionType="webkitTransition",void 0===b.perspectiveProperty)&&void 0===b.webkitPerspective&&(a.animType=!1),void 0!==b.msTransform&&(a.animType="msTransform",a.transformType="-ms-transform",a.transitionType="msTransition",void 0===b.msTransform)&&(a.animType=!1),void 0!==b.transform&&!1!==a.animType&&(a.animType="transform",a.transformType="transform",a.transitionType="transition"),a.transformsEnabled=a.options.useTransform&&null!==a.animType&&!1!==a.animType},b.prototype.setSlideClasses=function(a){var e,c,b=this,d=b.$slider.find(".slick-slide").removeClass("slick-active slick-center slick-current").attr("aria-hidden","true");b.$slides.eq(a).addClass("slick-current"),!0===b.options.centerMode?(c=Math.floor(b.options.slidesToShow/2),!0===b.options.infinite&&((c<=a&&a<=b.slideCount-1-c?b.$slides.slice(a-c,a+c+1):(e=b.options.slidesToShow+a,d.slice(e-c+1,e+c+2))).addClass("slick-active").attr("aria-hidden","false"),0===a?d.eq(d.length-1-b.o
1ptions.slidesToShow).addClass("slick-center"):a===b.slideCount-1&&d.eq(b.options.slidesToShow).addClass("slick-center")),b.$slides.eq(a).addClass("slick-center")):(0<=a&&a<=b.slideCount-b.options.slidesToShow?b.$slides.slice(a,a+b.options.slidesToShow):d.length<=b.options.slidesToShow?d:(c=b.slideCount%b.options.slidesToShow,e=!0===b.options.infinite?b.options.slidesToShow+a:a,b.options.slidesToShow==b.options.slidesToScroll&&b.slideCount-a<b.options.slidesToShow?d.slice(e-(b.options.slidesToShow-c),e+c):d.slice(e,e+b.options.slidesToShow))).addClass("slick-active").attr("aria-hidden","false"),"ondemand"===b.options.lazyLoad&&b.lazyLoad()},b.prototype.setupInfinite=function(){var c,d,e,b=this;if(!0===b.options.fade&&(b.options.centerMode=!1),!0===b.options.infinite&&!1===b.options.fade&&(d=null,b.slideCount>b.options.slidesToShow)){for(e=!0===b.options.centerMode?b.options.slidesToShow+1:b.options.slidesToShow,c=b.slideCount;c>b.slideCount-e;--c)a(b.$slides[d=c-1]).clone(!0).attr("id","").attr("data-slick-index",d-b.slideCount).prependTo(b.$slideTrack).addClass("slick-cloned");for(c=0;c<e;c+=1)d=c,a(b.$slides[d]).clone(!0).attr("id","").attr("data-slick-index",d+b.slideCount).appendTo(b.$slideTrack).addClass("slick-cloned");
1b.$slideTrack.find(".slick-cloned").find("[id]").each(function(){a(this).attr("id","")})}},b.prototype.interrupt=function(a){a||this.autoPlay(),this.interrupted=a},b.prototype.selectHandler=function(b){var c=this,b=a(b.target).is(".slick-slide")?a(b.target):a(b.target).parents(".slick-slide"),b=(b=parseInt(b.attr("data-slick-index")))||0;return c.slideCount<=c.options.slidesToShow?(c.setSlideClasses(b),void c.asNavFor(b)):void c.slideHandler(b)},b.prototype.slideHandler=function(a,b,c){var d,e,g,i=this;return b=b||!1,!0===i.animating&&!0===i.options.waitForAnimate||!0===i.options.fade&&i.currentSlide===a||i.slideCount<=i.options.slidesToShow?void 0:(!1===b&&i.asNavFor(a),d=a,b=i.getLeft(d),g=i.getLeft(i.currentSlide),i.currentLeft=null===i.swipeLeft?g:i.swipeLeft,!1===i.options.infinite&&!1===i.options.centerMode&&(a<0||a>i.getDotCount()*i.options.slidesToScroll)||!1===i.options.infinite&&!0===i.options.centerMode&&(a<0||a>i.slideCount-i.options.slidesToScroll)?void(!1===i.options.fade&&(d=i.currentSlide,!0!==c?i.animateSlide(g,function(){i.postSlide(d)}):i.postSlide(d))):(i.options.autoplay&&clearInterval(i.autoPlayTimer),e=d<0?i.slideCount%i.options.slidesToScroll!=0?i.slideCount-i.slideCount%i.options.slidesToScroll:i.slideCount+d:d>=i.slideCount?i.slideCount%i.options.slidesToScroll!=0?0:d-i.slideCount:d,i.animating=!0,i.$slider.trigger("beforeChange",[i,i.currentSlide,e]),a=i.currentSlide,i.currentSlide=e,i.setSlideClasses(i.currentSlide),i.options.asNavFor&&(g=(g=i.getNavTarget()).slick("getSlick")).slideCount<=g.options.slidesToShow&&g.setSlideClasses(i.currentSlide),i.updateDots(),i.updateArrows(),!0===i.options.fade?(!0!==c?(i.fadeSlideOut(a),i.fadeSlide(e,function(){i.postSlide(e)})):i.postSlide(e),void i.animateHeight()):void(!0!==c?i.animateSlide(b,function(){i.postSlide(e)}):i.postSlide(e))))},b.prototype.startLoad=function(){var a=this;!0===a.options.arrows&&a.slideCount>a.options.slidesToShow&&(a.$prevArrow.hide(),a.$nextArrow.hide()),!0===a.options.dots&&a.slideCount>a.options.slidesToShow&&a.$dots.hide(),a.$slider.addClass("slick-loading")},b.prototype.swipeDirection=function(){var e=this,a=e.touchObject.startX-e.touchObject.curX,b=e.touchObject.startY-e.touchObject.curY,b=Math.atan2(b,a),a=Math.round(180*b/Math.PI);return(a=a<0?360-Math.abs(a):a)<=45&&0<=a||a<=360&&315<=a?!1===e.options.rtl?"left":"right":135<=a&&a<=225?!1===e.options.rtl?"right":"left":!0===e.options.verticalSwiping?35<=a&&a<=135?"down":"up":"vertical"},b.prototype.swipeEnd=function(a){var c,d,b=this;if(b.dragging=!1,b.interrupted=!1,b.shouldClick=!(10<b.touchObject.swipeLength),void 0===b.touchObject.curX)return!1;if(!0===b.touchObject.edgeHit&&b.$slider.trigger("edge",[b,b.swipeDirection()]),b.touchObject.swipeLength>=b.touchObject.minSwipe){switch(d=b.swipeDirection()){case"left":case"down":c=b.options.swipeToSlide?b.checkNavigable(b.currentSlide+b.getSlideCount()):b.currentSlide+b.getSlideCount(),b.currentDirection=0;break;case"right":case"up":c=b.options.swipeToSlide?b.checkNavigable(b.currentSlide-b.getSlideCount()):b.currentSlide-b.getSlideCount(),b.currentDirection=1}"vertical"!=d&&(b.slideHandler(c),b.touchObject={},b.$slider.trigger("swipe",[b,d]))}else b.touchObject.startX!==b.touchObject.curX&&(b.slideHandler(b.currentSlide),b.touchObject={})},b.prototype.swipeHandler=function(a){var b=this;if(!(!1===b.options.swipe||"ontouchend"in document&&!1===b.options.swipe||!1===b.options.draggable&&-1!==a.type.indexOf("mouse")))switch(b.touchObject.fingerCount=a.originalEvent&&void 0!==a.originalEvent.touches?a.originalEvent.touches.length:1,b.touchObject.minSwipe=b.listWidth/b.options.touchThreshold,!0===b.options.verticalSwiping&&(b.touchObject.minSwipe=b.listHeight/b.options.touchThreshold),a.data.action){case"start":b.swipeStart(a);break;case"move":b.swipeMove(a);break;case"end":b.swipeEnd(a)}},b.prototype.swipeMove=function(a){var d,f,b=this,h=void 0!==a.originalEvent?a.originalEvent.touches:null;return!(!b.dragging||h&&1!==h.length)&&(d=b.getLeft(b.currentSlide),b.touchObject.curX=void 0!==h?h[0].pageX:a.clientX,b.touchObject.curY=void 0!==h?h[0].pageY:a.clientY,b.touchObject.swipeLength=Math.round(Math.sqrt(Math.pow(b.touchObject.curX-b.touchObject.startX,2))),!0===b.options.verticalSwiping&&(b.touchObject.swipeLength=Math.round(Math.sqrt(Math.pow(b.touchObject.curY-b.touchObject.startY,2)))),"vertical"!==(h=b.swipeDirection())?(void 0!==a.originalEvent&&4<b.touchObject.swipeLength&&a.preventDefault(),a=(!1===b.options.rtl?1:-1)*(b.touchObject.curX>b.touchObject.startX?1:-1),!0===b.options.verticalSwiping&&(a=b.touchObject.curY>b.touchObject.startY?1:-1),f=b.touchObject.swipeLength,(b.touchObject.edgeHit=!1)===b.o
1ptions.infinite&&(0===b.currentSlide&&"right"===h||b.currentSlide>=b.getDotCount()&&"left"===h)&&(f=b.touchObject.swipeLength*b.options.edgeFriction,b.touchObject.edgeHit=!0),!1===b.options.vertical?b.swipeLeft=d+f*a:b.swipeLeft=d+f*(b.$list.height()/b.listWidth)*a,!0===b.options.verticalSwiping&&(b.swipeLeft=d+f*a),!0!==b.options.fade&&!1!==b.options.touchMove&&(!0===b.animating?(b.swipeLeft=null,!1):void b.setCSS(b.swipeLeft))):void 0)},b.prototype.swipeStart=function(a){var c,b=this;return b.interrupted=!0,1!==b.touchObject.fingerCount||b.slideCount<=b.options.slidesToShow?!(b.touchObject={}):(void 0!==a.originalEvent&&void 0!==a.originalEvent.touches&&(c=a.originalEvent.touches[0]),b.touchObject.startX=b.touchObject.curX=void 0!==c?c.pageX:a.clientX,b.touchObject.startY=b.touchObject.curY=void 0!==c?c.pageY:a.clientY,void(b.dragging=!0))},b.prototype.unfilterSlides=b.prototype.slickUnfilter=function(){var a=this;null!==a.$slidesCache&&(a.unload(),a.$slideTrack.children(this.options.slide).detach(),a.$slidesCache.appendTo(a.$slideTrack),a.reinit())},b.prototype.unload=function(){var b=this;a(".slick-cloned",b.$slider).remove(),b.$dots&&b.$dots.remove(),b.$prevArrow&&b.htmlExpr.test(b.options.prevArrow)&&b.$prevArrow.remove(),b.$nextArrow&&b.htmlExpr.test(b.options.nextArrow)&&b.$nextArrow.remove(),b.$slides.removeClass("slick-slide slick-active slick-visible slick-current").attr("aria-hidden","true").css("width","")},b.prototype.unslick=function(a){var b=this;b.$slider.trigger("unslick",[b,a]),b.destroy()},b.prototype.updateArrows=function(){var a=this;Math.floor(a.options.slidesToShow/2);!0===a.options.arrows&&a.slideCount>a.options.slidesToShow&&!a.options.infinite&&(a.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false"),a.$nextArrow.removeClass("slick-disabled").attr("aria-disabled","false"),0===a.currentSlide?(a.$prevArrow.addClass("slick-disabled").attr("aria-disabled","true"),a.$nextArrow.removeClass("slick-disabled").attr("aria-disabled","false")):(a.currentSlide>=a.slideCount-a.options.slidesToShow&&!1===a.options.centerMode||a.currentSlide>=a.slideCount-1&&!0===a.options.centerMode)&&(a.$nextArrow.addClass("slick-disabled").attr("aria-disabled","true"),a.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false")))},b.prototype.updateDots=function(){var a=this;null!==a.$dots&&(a.$dots.find("li").removeClass("slick-active").attr("aria-hidden","true"),a.$dots.find("li").eq(Math.floor(a.currentSlide/a.options.slidesToScroll)).addClass("slick-active").attr("aria-hidden","false"))},b.prototype.visibility=function(){var a=this;a.options.autoplay&&(document[a.hidden]?a.interrupted=!0:a.interrupted=!1)},a.fn.slick=function(){for(var g,a=this,c=arguments[0],d=Array.prototype.slice.call(arguments,1),e=a.length,f=0;f<e;f++)if("object"==typeof c||void 0===c?a[f].slick=new b(a[f],c):g=a[f].slick[c].apply(a[f].slick,d),void 0!==g)return g;return a}}),(window=>{function minErr(module,ErrorConstructor){return ErrorConstructor=ErrorConstructor||Error,function(){for(var code=arguments[0],template=arguments[1],message="["+(module?module+":":"")+code+"] ",templateArgs=sliceArgs(arguments,2).map(function(arg){return toDebugString(arg,minErrConfig.objectMaxDepth)}),message=(message+=template.replace(/\{\d+\}/g,function(match){var index=+match.slice(1,-1);return index<templateArgs.length?templateArgs[index]:match}))+("\nhttp://errors.angularjs.org/1.6.3/"+(module?module+"/":"")+code),i=0,paramPrefix="?";i<templateArgs.length;i++,paramPrefix="&")message+=paramPrefix+"p"+i+"="+encodeURIComponent(templateArgs[i]);return new ErrorConstructor(message)}}var REGEX_STRING_REGEXP=/^\/(.+)\/([a-z]*)$/,VALIDITY_STATE_PROPERTY="validity",hasOwnProperty=Object.prototype.hasOwnProperty,minErrConfig={objectMaxDepth:5};function errorHandlingConfig(config){if(!isObject(config))return minErrConfig;void 0!==config.objectMaxDepth&&(minErrConfig.objectMaxDepth=isValidObjectMaxDepth(config.objectMaxDepth)?config.objectMaxDepth:NaN)}function isValidObjectMaxDepth(maxDepth){return isNumber(maxDepth)&&0<maxDepth}var lowercase=function(string){return isString(string)?string.toLowerCase():string},uppercase=function(string){return isString(string)?string.toUpperCase():string};"i"!=="I".toLowerCase()&&(lowercase=function(s){return isString(s)?s.replace(/[A-Z]/g,function(ch){return String.fromCharCode(32|ch.charCo
1deAt(0))}):s},uppercase=function(s){return isString(s)?s.replace(/[a-z]/g,function(ch){return String.fromCharCode(-33&ch.charCodeAt(0))}):s});var jqLite,jQuery,angularModule,slice=[].slice,splice=[].splice,push=[].push,toString=Object.prototype.toString,getPrototypeOf=Object.getPrototypeOf,ngMinErr=minErr("ng"),angular=window.angular||(window.angular={}),uid=0;function isArrayLike(obj){var length;return null!=obj&&!isWindow(obj)&&(isArray(obj)||isString(obj)||jqLite&&obj instanceof jqLite||isNumber(length="length"in Object(obj)&&obj.length)&&(0<=length&&(length-1 in obj||obj instanceof Array)||"function"==typeof obj.item))}function forEach(obj,iterator,context){if(obj)if(isFunction(obj))for(key in obj)"prototype"!==key&&"length"!==key&&"name"!==key&&obj.hasOwnProperty(key)&&iterator.call(context,obj[key],key,obj);else if(isArray(obj)||isArrayLike(obj))for(var isPrimitive="object"!=typeof obj,key=0,length=obj.length;key<length;key++)(isPrimitive||key in obj)&&iterator.call(context,obj[key],key,obj);else if(obj.forEach&&obj.forEach!==forEach)obj.forEach(iterator,context,obj);else if(isBlankObject(obj))for(key in obj)iterator.call(context,obj[key],key,obj);else if("function"==typeof obj.hasOwnProperty)for(key in obj)obj.hasOwnProperty(key)&&iterator.call(context,obj[key],key,obj);else for(key in obj)hasOwnProperty.call(obj,key)&&iterator.call(context,obj[key],key,obj);return obj}function forEachSorted(obj,iterator,context){for(var keys=Object.keys(obj).sort(),i=0;i<keys.length;i++)iterator.call(context,obj[keys[i]],keys[i])}function reverseParams(iteratorFn){return function(value,key){iteratorFn(key,value)}}function nextUid(){return++uid}function setHashKey(obj,h){h?obj.$$hashKey=h:delete obj.$$hashKey}function baseExtend(dst,objs,deep){for(var h=dst.$$hashKey,i=0,ii=objs.length;i<ii;++i){var obj=objs[i];if(isObject(obj)||isFunction(obj))for(var keys=Object.keys(obj),j=0,jj=keys.length;j<jj;j++){var key=keys[j],src=obj[key];deep&&isObject(src)?isDate(src)?dst[key]=new Date(src.valueOf()):isRegExp(src)?dst[key]=new RegExp(src):src.nodeName?dst[key]=src.cloneNode(!0):isElement(src)?dst[key]=src.clone():(isObject(dst[key])||(dst[key]=isArray(src)?[]:{}),baseExtend(dst[key],[src],!0)):dst[key]=src}}return setHashKey(dst,h),dst}function extend(dst){return baseExtend(dst,slice.call(arguments,1),!1)}function merge(dst){return baseExtend(dst,slice.call(arguments,1),!0)}function toInt(str){return parseInt(str,10)}var msie=window.document.documentMode,isNumberNaN=Number.isNaN||function(num){return num!=num};function inherit(parent,extra){return extend(Object.create(parent),extra)}function noop(){}function identity($){return $}function valueFn(value){return function(){return value}}function hasCustomToString(obj){return isFunction(obj.toString)&&obj.toString!==toString}function isUndefined(value){return void 0===value}function isDefined(value){return void 0!==value}function isObject(value){return null!==value&&"object"==typeof value}function isBlankObject(value){return null!==value&&"object"==typeof value&&!getPrototypeOf(value)}function isString(value){return"string"==typeof value}function isNumber(value){return"number"==typeof value}function isDate(value){return"[object Date]"===toString.call(value)}noop.$inject=[],identity.$inject=[];var isArray=Array.isArray;function isFunction(value){return"function"==typeof value}function isRegExp(value){return"[object RegExp]"===toString.call(value)}function isWindow(obj){return obj&&obj.window===obj}function isScope(obj){return obj&&obj.$evalAsync&&obj.$watch}function isBoolean(value){return"boolean"==typeof value}function isPromiseLike(obj){return obj&&isFunction(obj.then)}var TYPED_ARRAY_REGEXP=/^\[object (?:Uint8|Uint8Clamped|Uint16|Uint32|Int8|Int16|Int32|Float32|Float64)Array]$/,trim=function(value){return isString(value)?value.trim():value},escapeForRegexp=function(s){return s.replace(/([-()[\]{}+?*.$^|,:#<!\\])/g,"\\$1").replace(/\x08/g,"\\x08")};function isElement(node){return!(!node||!(node.nodeName||node.prop&&node.attr&&node.find))}function nodeName_(element){return lowercase(element.nodeName||element[0]&&element[0].nodeName)}function includes(array,obj){return-1!==Array.prototype.indexOf.call(array,obj)}function arrayRemove(array,value){value=array.indexOf(value);return 0<=value&&array.splice(value,1),value}function copy(source,destination,maxDepth){var value,stackSource=[],stackDest=[];if(maxDepth=isValidObjectMaxDepth(maxDepth)?maxDepth:NaN,destination){if((value=destination)&&isNumber(value.length)&&TYPED_ARRAY_REGEXP.test(toString.call(value))||"[object ArrayBuffer]"===toString.call(destination))throw ngMinErr("cpta","Can't copy! TypedArray de
1stination cannot be mutated.");if(source===destination)throw ngMinErr("cpi","Can't copy! Source and destination are identical.");return isArray(destination)?destination.length=0:forEach(destination,function(value,key){"$$hashKey"!==key&&delete destination[key]}),stackSource.push(source),stackDest.push(destination),copyRecurse(source,destination,maxDepth)}return copyElement(source,maxDepth);function copyRecurse(source,destination,maxDepth){if(--maxDepth<0)return"...";var key,h=destination.$$hashKey;if(isArray(source))for(var i=0,ii=source.length;i<ii;i++)destination.push(copyElement(source[i],maxDepth));else if(isBlankObject(source))for(key in source)destination[key]=copyElement(source[key],maxDepth);else if(source&&"function"==typeof source.hasOwnProperty)for(key in source)source.hasOwnProperty(key)&&(destination[key]=copyElement(source[key],maxDepth));else for(key in source)hasOwnProperty.call(source,key)&&(destination[key]=copyElement(source[key],maxDepth));return setHashKey(destination,h),destination}function copyElement(source,maxDepth){if(!isObject(source))return source;var index=stackSource.indexOf(source);if(-1!==index)return stackDest[index];if(isWindow(source)||isScope(source))throw ngMinErr("cpws","Can't copy! Making copies of Window or Scope instances is not supported.");var index=!1,destination=(source=>{switch(toString.call(source)){case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Float32Array]":case"[object Float64Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return new source.constructor(copyElement(source.buffer),source.byteOffset,source.length);case"[object ArrayBuffer]":return source.slice?source.slice(0):(copied=new ArrayBuffer(source.byteLength),new Uint8Array(copied).set(new Uint8Array(source)),copied);case"[object Boolean]":case"[object Number]":case"[object String]":case"[object Date]":return new source.constructor(source.valueOf());case"[object RegExp]":var copied=new RegExp(source.source,source.toString().match(/[^/]*$/)[0]);return copied.lastIndex=source.lastIndex,copied;case"[object Blob]":return new source.constructor([source],{type:source.type})}if(isFunction(source.cloneNode))return source.cloneNode(!0)})(source);return void 0===destination&&(destination=isArray(source)?[]:Object.create(getPrototypeOf(source)),index=!0),stackSource.push(source),stackDest.push(destination),index?copyRecurse(source,destination,maxDepth):destination}}function equals(o1,o2){if(o1===o2)return!0;if(null!==o1&&null!==o2){if(o1!=o1&&o2!=o2)return!0;var length,key,keySet,t1=typeof o1;if(t1==typeof o2&&"object"==t1){if(!isArray(o1)){if(isDate(o1))return!!isDate(o2)&&equals(o1.getTime(),o2.getTime());if(isRegExp(o1))return!!isRegExp(o2)&&o1.toString()===o2.toString();if(isScope(o1)||isScope(o2)||isWindow(o1)||isWindow(o2)||isArray(o2)||isDate(o2)||isRegExp(o2))return!1;for(key in keySet=createMap(),o1)if("$"!==key.charAt(0)&&!isFunction(o1[key])){if(!equals(o1[key],o2[key]))return!1;keySet[key]=!0}for(key in o2)if(!(key in keySet||"$"===key.charAt(0)||void 0===o2[key]||isFunction(o2[key])))return!1;return!0}if(!isArray(o2))return!1;if((length=o1.length)===o2.length){for(key=0;key<length;key++)if(!equals(o1[key],o2[key]))return!1;return!0}}}return!1}var csp=function(){var ngCspElement;return void 0===csp.rules&&((ngCspElement=window.document.querySelector("[ng-csp]")||window.document.querySelector("[data-ng-csp]"))?(ngCspElement=ngCspElement.getAttribute("ng-csp")||ngCspElement.getAttribute("data-ng-csp"),csp.rules={noUnsafeEval:!ngCspElement||-1!==ngCspElement.indexOf("no-unsafe-eval"),noInlineStyle:!ngCspElement||-1!==ngCspElement.indexOf("no-inline-style")}):csp.rules={noUnsafeEval:(()=>{try{return new Function(""),!1}catch(e){return!0}})(),noInlineStyle:!1}),csp.rules},jq=function(){if(void 0!==jq.name_)return jq.name_;for(var el,prefix,name,ii=ngAttrPrefixes.length,i=0;i<ii;++i)if(prefix=ngAttrPrefixes[i],el=window.document.querySelector("["+prefix.replace(":","\\:")+"jq]")){name=el.getAttribute(prefix+"jq");break}return jq.name_=name};function concat(array1,array2,index){return array1.concat(slice.call(array2,index))}function sliceArgs(args,startIndex){return slice.call(args,startIndex||
10)}function bind(self,fn){var curryArgs=2<arguments.length?sliceArgs(arguments,2):[];return!isFunction(fn)||fn instanceof RegExp?fn:curryArgs.length?function(){return arguments.length?fn.apply(self,concat(curryArgs,arguments,0)):fn.apply(self,curryArgs)}:function(){return arguments.length?fn.apply(self,arguments):fn.call(self)}}function toJsonReplacer(key,value){var val=value;return"string"==typeof key&&"$"===key.charAt(0)&&"$"===key.charAt(1)?val=void 0:isWindow(value)?val="$WINDOW":value&&window.document===value?val="$DOCUMENT":isScope(value)&&(val="$SCOPE"),val}function toJson(obj,pretty){if(void 0!==obj)return isNumber(pretty)||(pretty=pretty?2:null),JSON.stringify(obj,toJsonReplacer,pretty)}function fromJson(json){return isString(json)?JSON.parse(json):json}var ALL_COLONS=/:/g;function timezoneToOffset(timezone,fallback){timezone=timezone.replace(ALL_COLONS,"");timezone=Date.parse("Jan 01, 1970 00:00:00 "+timezone)/6e4;return isNumberNaN(timezone)?fallback:timezone}function convertTimezoneToLocal(date,timezone,reverse){reverse=reverse?-1:1;var dateTimezoneOffset=date.getTimezoneOffset();return((date,minutes)=>((date=new Date(date.getTime())).setMinutes(date.getMinutes()+minutes),date))(date,reverse*(timezoneToOffset(timezone,dateTimezoneOffset)-dateTimezoneOffset))}function startingTag(element){element=jqLite(element).clone();try{element.empty()}catch(e){}var elemHtml=jqLite("<div>").append(element).html();try{return element[0].nodeType===NODE_TYPE_TEXT?lowercase(elemHtml):elemHtml.match(/^(<[^>]+>)/)[1].replace(/^<([\w-]+)/,function(match,nodeName){return"<"+lowercase(nodeName)})}catch(e){return lowercase(elemHtml)}}function tryDecodeURIComponent(value){try{return decodeURIComponent(value)}catch(e){}}function parseKeyValue(keyValue){var obj={};return forEach((keyValue||"").split("&"),function(keyValue){var splitPoint,key,val;keyValue&&(key=keyValue=keyValue.replace(/\+/g,"%20"),-1!==(splitPoint=keyValue.indexOf("="))&&(key=keyValue.substring(0,splitPoint),val=keyValue.substring(splitPoint+1)),void 0!==(key=tryDecodeURIComponent(key)))&&(val=void 0===val||tryDecodeURIComponent(val),hasOwnProperty.call(obj,key)?isArray(obj[key])?obj[key].push(val):obj[key]=[obj[key],val]:obj[key]=val)}),obj}function toKeyValue(obj){var parts=[];return forEach(obj,function(value,key){isArray(value)?forEach(value,function(arrayValue){parts.push(encodeUriQuery(key,!0)+(!0===arrayValue?"":"="+encodeUriQuery(arrayValue,!0)))}):parts.push(encodeUriQuery(key,!0)+(!0===value?"":"="+encodeUriQuery(value,!0)))}),parts.length?parts.join("&"):""}function encodeUriSegment(val){return encodeUriQuery(val,!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+")}function encodeUriQuery(val,pctEncodeSpaces){return encodeURIComponent(val).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%20/g,pctEncodeSpaces?"%20":"+")}var document,ngAttrPrefixes=["ng-","data-ng-","ng:","x-ng-"],isAutoBootstrapAllowed=!(script=(document=window.document).currentScript)||(script instanceof window.HTMLScriptElement||script instanceof window.SVGScriptElement)&&[(script=script.attributes).getNamedItem("src"),script.getNamedItem("href"),script.getNamedItem("xlink:href")].every(function(src){if(!src)return!0;if(!src.value)return!1;var link=document.createElement("a");if(link.href=src.value,document.location.origin===link.origin)return!0;switch(link.protocol){case"http:":case"https:":case"ftp:":case"blob:":case"file:":case"data:":return!0;default:return!1}});function angularInit(element,bootstrap){var appElement,module,config={};forEach(ngAttrPrefixes,function(prefix){prefix+="app";!appElement&&element.hasAttribute&&element.hasAttribute(prefix)&&(module=(appElement=element).getAttribute(prefix))}),forEach(ngAttrPrefixes,function(prefix){var candidate,prefix=prefix+"app";!appElement&&(candidate=element.querySelector("["+prefix.replace(":","\\:")+"]"))&&(module=(appElement=candidate).getAttribute(prefix))}),appElement&&(isAutoBootstrapAllowed?(config.strictDi=null!==((element,ngAttr)=>{for(var attr,ii=ngAttrPrefixes.length,i=0;i<ii;++i)if(attr=ngAttrPrefixes[i]+ngAttr,isString(attr=element.getAttribute(attr)))return attr;return null})(appElement,"strict-di"),bootstrap(appElement,module?[module]:[],config)):window.console.error("Angular: disabling automatic bootstrap. <script> protocol indicates an extension, document.location.href does not match."))}function bootstrap(element,modules,config){function doBootstrap(){
1if((element=jqLite(element)).injector())throw tag=element[0]===window.document?"document":startingTag(element),ngMinErr("btstrpd","App already bootstrapped with this element '{0}'",tag.replace(/</,"<").replace(/>/,">"));(modules=modules||[]).unshift(["$provide",function($provide){$provide.value("$rootElement",element)}]),config.debugInfoEnabled&&modules.push(["$compileProvider",function($compileProvider){$compileProvider.debugInfoEnabled(!0)}]),modules.unshift("ng");var tag=createInjector(modules,config.strictDi);return tag.invoke(["$rootScope","$rootElement","$compile","$injector",function(scope,element,compile,injector){scope.$apply(function(){element.data("$injector",injector),compile(element)(scope)})}]),tag}config=extend({strictDi:!1},config=isObject(config)?config:{});var NG_ENABLE_DEBUG_INFO=/^NG_ENABLE_DEBUG_INFO!/,NG_DEFER_BOOTSTRAP=/^NG_DEFER_BOOTSTRAP!/;if(window&&NG_ENABLE_DEBUG_INFO.test(window.name)&&(config.debugInfoEnabled=!0,window.name=window.name.replace(NG_ENABLE_DEBUG_INFO,"")),window&&!NG_DEFER_BOOTSTRAP.test(window.name))return doBootstrap();window.name=window.name.replace(NG_DEFER_BOOTSTRAP,""),angular.resumeBootstrap=function(extraModules){return forEach(extraModules,function(module){modules.push(module)}),doBootstrap()},isFunction(angular.resumeDeferredBootstrap)&&angular.resumeDeferredBootstrap()}function reloadWithDebugInfo(){window.name="NG_ENABLE_DEBUG_INFO!"+window.name,window.location.reload()}function getTestability(rootElement){rootElement=angular.element(rootElement).injector();if(rootElement)return rootElement.get("$$testability");throw ngMinErr("test","no injector found for element argument to getTestability")}var SNAKE_CASE_REGEXP=/[A-Z]/g;function snake_case(name,separator){return separator=separator||"_",name.replace(SNAKE_CASE_REGEXP,function(letter,pos){return(pos?separator:"")+letter.toLowerCase()})}var script=!1;function assertArg(arg,name,reason){if(!arg)throw ngMinErr("areq","Argument '{0}' is {1}",name||"?",reason||"required")}function assertArgFn(arg,name,acceptArrayAnnotation){assertArg(isFunction(arg=acceptArrayAnnotation&&isArray(arg)?arg[arg.length-1]:arg),name,"not a function, got "+(arg&&"object"==typeof arg?arg.constructor.name||"Object":typeof arg))}function assertNotHasOwnProperty(name,context){if("hasOwnProperty"===name)throw ngMinErr("badname","hasOwnProperty is not a valid {0} name",context)}function getter(obj,path,bindFnToScope){if(!path)return obj;for(var key,keys=path.split("."),lastInstance=obj,len=keys.length,i=0;i<len;i++)key=keys[i],obj=obj&&(lastInstance=obj)[key];return!bindFnToScope&&isFunction(obj)?bind(lastInstance,obj):obj}function getBlockNodes(nodes){for(var blockNodes,node=nodes[0],endNode=nodes[nodes.length-1],i=1;node!==endNode&&(node=node.nextSibling);i++)!blockNodes&&nodes[i]===node||(blockNodes=blockNodes||jqLite(slice.call(nodes,0,i)
1)).push(node);return blockNodes||nodes}function createMap(){return Object.create(null)}function stringify(value){if(null==value)return"";switch(typeof value){case"string":break;case"number":value=""+value;break;default:value=!hasCustomToString(value)||isArray(value)||isDate(value)?toJson(value):value.toString()}return value}var NODE_TYPE_ELEMENT=1,NODE_TYPE_TEXT=3,NODE_TYPE_COMMENT=8,NODE_TYPE_DOCUMENT=9;function setupModuleLoader(window){var $injectorMinErr=minErr("$injector"),ngMinErr=minErr("ng");function ensure(obj,name,factory){return obj[name]||(obj[name]=factory())}window=ensure(window,"angular",Object);return window.$$minErr=window.$$minErr||minErr,ensure(window,"module",function(){var modules={};return function(name,requires,configFn){var info={};return((name,context)=>{if("hasOwnProperty"===name)throw ngMinErr("badname","hasOwnProperty is not a valid {0} name",context)})(name,"module"),requires&&modules.hasOwnProperty(name)&&(modules[name]=null),ensure(modules,name,function(){var invokeQueue,configBlocks,runBlocks,config,moduleInstance;if(requires)return invokeQueue=[],config=invokeLater("$injector","invoke","push",configBlocks=[]),moduleInstance={_invokeQueue:invokeQueue,_configBlocks:configBlocks,_runBlocks:runBlocks=[],info:function(value){if(void 0===value)return info;if(isObject(value))return info=value,this;throw ngMinErr("aobj","Argument '{0}' must be an object","value")},requires:requires,name:name,provider:invokeLaterAndSetModuleName("$provide","provider"),factory:invokeLaterAndSetModuleName("$provide","factory"),service:invokeLaterAndSetModuleName("$provide","service"),value:invokeLater("$provide","value"),constant:invokeLater("$provide","constant","unshift"),decorator:invokeLaterAndSetModuleName("$provide","decorator",configBlocks),animation:invokeLaterAndSetModuleName("$animateProvider","register"),filter:invokeLaterAndSetModuleName("$filterProvider","register"),controller:invokeLaterAndSetModuleName("$controllerProvider","register"),directive:invokeLaterAndSetModuleName("$compileProvider","directive"),component:invokeLaterAndSetModuleName("$compileProvider","component"),config:config,run:function(block){return runBlocks.push(block),this}},configFn&&config(configFn),moduleInstance;throw $injectorMinErr("nomod","Module '{0}' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.",name);function invokeLater(provider,method,insertMethod,queue){return queue=queue||invokeQueue,function(){return queue[insertMethod||"push"]([provider,method,arguments]),moduleInstance}}function invokeLaterAndSetModuleName(provider,method,queue){return queue=queue||invokeQueue,function(recipeName,factoryFunction){return factoryFunction&&isFunction(factoryFunction)&&(factoryFunction.$$moduleName=name),queue.push([provider,method,arguments]),moduleInstance}}})}})}function shallowCopy(src,dst){if(isArray(src)){dst=dst||[];for(var i=0,ii=src.length;i<ii;i++)dst[i]=src[i]}else if(isObject(src))for(var key in dst=dst||{},src)"$"===key.charAt(0)&&"$"===key.charAt(1)||(dst[key]=src[key]);return dst||src}function toDebugString(obj,maxDepth){return"function"==typeof obj?obj.toString().replace(/ \{[\s\S]*$/,""):void 0===obj?"undefined":"string"!=typeof obj?((obj,maxDepth)=>{var seen=[];return isValidObjectMaxDepth(maxDepth)&&(obj=copy(obj,null,maxDepth)),JSON.stringify(obj,function(key,val){if(isObject(val=toJsonReplacer(key,val))){if(0<=seen.indexOf(val))return"...";seen.push(val)}return val})})(obj,maxDepth):obj}var version={full:"1.6.3",major:1,minor:6,dot:3,codeName:"scriptalicious-bootstrapping"},jqCache=(JQLite.expando="ng339",JQLite.cache={}),jqId=1,DASH_LOWERCASE_REGEXP=(JQLite._data=function(node){return this.cache[node[this.expando]]||{}},/-([a-z])/g),MS_HACK_REGEXP=/^-ms-/,MOUSE_EVENT_MAP={mouseleave:"mou
1seout",mouseenter:"mouseover"},jqLiteMinErr=minErr("jqLite");function fnCamelCaseReplace(all,letter){return letter.toUpperCase()}function kebabToCamel(name){return name.replace(DASH_LOWERCASE_REGEXP,fnCamelCaseReplace)}var SINGLE_TAG_REGEXP=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,HTML_REGEXP=/<|&#?\w+;/,TAG_NAME_REGEXP=/<([\w:-]+)/,XHTML_TAG_REGEXP=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,wrapMap={option:[1,'<select multiple="multiple">',"</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};function jqLiteIsTextNode(html){return!HTML_REGEXP.test(html)}function jqLiteAcceptsData(node){node=node.nodeType;return node===NODE_TYPE_ELEMENT||!node||node===NODE_TYPE_DOCUMENT}function jqLiteBuildFragment(html,context){var tmp,i,fragment=context.createDocumentFragment(),nodes=[];if(jqLiteIsTextNode(html))nodes.push(context.createTextNode(html));else{for(tmp=fragment.appendChild(context.createElement("div")),context=(TAG_NAME_REGEXP.exec(html)||["",""])[1].toLowerCase(),context=wrapMap[context]||wrapMap._default,tmp.innerHTML=context[1]+html.replace(XHTML_TAG_REGEXP,"<$1></$2>")+context[2],i=context[0];i--;)tmp=tmp.lastChild;nodes=concat(nodes,tmp.childNodes),(tmp=fragment.firstChild).textContent=""}return fragment.textContent="",fragment.innerHTML="",forEach(nodes,function(node){fragment.appendChild(node)}),fragment}wrapMap.optgroup=wrapMap.option,wrapMap.tbody=wrapMap.tfoot=wrapMap.colgroup=wrapMap.caption=wrapMap.thead,wrapMap.th=wrapMap.td;var jqLiteContains=window.Node.prototype.contains||function(arg){return!!(16&this.compareDocumentPosition(arg))};function JQLite(element){if(element instanceof JQLite)return element;var argIsString,context,parsed;if(isString(element)&&(element=trim(element),argIsString=!0),!(this instanceof JQLite)){if(argIsString&&"<"!==element.charAt(0))throw jqLiteMinErr("nosel","Looking up elements via selectors is not supported by jqLite! See: http://docs.angularjs.org/api/angular.element");return new JQLite(element)}argIsString?jqLiteAddNodes(this,(argIsString=element,context=context||window.document,(parsed=SINGLE_TAG_REGEXP.exec(argIsString))?[context.createElement(parsed[1])]:(parsed=jqLiteBuildFragment(argIsString,context))?parsed.childNodes:[])):isFunction(element)?jqLiteReady(element):jqLiteAddNodes(this,element)}function jqLiteClone(element){return element.cloneNode(!0)}function jqLiteDealoc(element,onlyDescendants){if(onlyDescendants||jqLiteRemoveData(element),element.querySelectorAll)for(var descendants=element.querySelectorAll("*"),i=0,l=descendants.length;i<l;i++)jqLiteRemoveData(descendants[i])}function jqLiteOff(element,type,fn,unsupported){if(void 0!==unsupported)throw jqLiteMinErr("offargs","jqLite#off() does not support the `selector` argument");var unsupported=jqLiteExpandoStore(element),events=unsupported&&unsupported.events,handle=unsupported&&unsupported.handle;if(handle)if(type){var removeHandler=function(type){var listenerFns=events[type];void 0!==fn&&arrayRemove(listenerFns||[],fn),void 0!==fn&&listenerFns&&0<listenerFns.length||(element.removeEventListener(type,handle),delete events[type])};forEach(type.split(" "),function(type){removeHandler(type),MOUSE_EVENT_MAP[type]&&removeHandler(MOUSE_EVENT_MAP[type])})}else for(type in events)"$destroy"!==type&&element.removeEventListener(type,handle),delete events[type]}function jqLiteRemoveData(element,name){var expandoId=element.ng339,expandoStore=expandoId&&jqCache[expandoId];expandoStore&&(name?delete expandoStore.data[name]:(expandoStore.handle&&(expandoStore.events.$destroy&&expandoStore.handle({},"$destroy"),jqLiteOff(element)),delete jqCache[expandoId],element.ng339=void 0))}function jqLiteExpandoStore(element,createIfNecessary){var expandoId=element.ng339,expandoStore=expandoId&&jqCache[expandoId];return createIfNecessary&&!expandoStore&&(element.ng339=expandoId=++jqId,expandoStore=jqCache[expandoId]={events:{},data:{},handle:void 0}),expandoStore}function jqLiteData(element,key,value){if(jqLiteAcceptsData(element)){var prop,isSimpleSetter=void 0!==value,isSimpleGetter=!isSimpleSetter&&key&&!isObject(key),massGetter=!key,element=jqLiteExpandoStore(element,!isSimpleGetter),data=element&&element.data;if(isSimpleSetter)data[kebabToCamel(key)]=value;else{if(massGetter)return data;if(isSimpleGetter)return data&&data[kebabToCamel(key)];for(prop in key)data[kebabToCamel(prop)]=key[prop]}}}function jqLiteHasClass(element,selector){return!!element.getAttribute&&-1<(" "+(element.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").indexOf(" "+selector+" ")}
1function jqLiteRemoveClass(element,cssClasses){cssClasses&&element.setAttribute&&forEach(cssClasses.split(" "),function(cssClass){element.setAttribute("class",trim((" "+(element.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").replace(" "+trim(cssClass)+" "," ")))})}function jqLiteAddClass(element,cssClasses){var existingClasses;cssClasses&&element.setAttribute&&(existingClasses=(" "+(element.getAttribute("class")||"")+" ").replace(/[\n\t]/g," "),forEach(cssClasses.split(" "),function(cssClass){cssClass=trim(cssClass),-1===existingClasses.indexOf(" "+cssClass+" ")&&(existingClasses+=cssClass+" ")}),element.setAttribute("class",trim(existingClasses)))}function jqLiteAddNodes(root,elements){if(elements)if(elements.nodeType)root[root.length++]=elements;else{var length=elements.length;if("number"==typeof length&&elements.window!==elements){if(length)for(var i=0;i<length;i++)root[root.length++]=elements[i]}else root[root.length++]=elements}}function jqLiteController(element,name){return jqLiteInheritedData(element,"$"+(name||"ngController")+"Controller")}function jqLiteInheritedData(element,name,value){element.nodeType===NODE_TYPE_DOCUMENT&&(element=element.documentElement);for(var names=isArray(name)?name:[name];element;){for(var i=0,ii=names.length;i<ii;i++)if(void 0!==(value=jqLite.data(element,names[i])))return value;element=element.parentNode||11===element.nodeType&&element.host}}function jqLiteEmpty(element){for(jqLiteDealoc(element,!0);element.firstChild;)element.removeChild(element.firstChild)}function jqLiteRemove(element,keepData){keepData||jqLiteDealoc(element);keepData=element.parentNode;keepData&&keepData.removeChild(element)}function jqLiteReady(fn){function trigger(){window.document.removeEventListener("DOMContentLoaded",trigger),window.removeEventListener("load",trigger),fn()}"complete"===window.document.readyState?window.setTimeout(fn):(window.document.addEventListener("DOMContentLoaded",trigger),window.addEventListener("load",trigger))}var JQLitePrototype=JQLite.prototype={ready:jqLiteReady,toString:function(){var value=[];return forEach(this,function(e){value.push(""+e)}),"["+value.join(", ")+"]"},eq:function(index){return jqLite(0<=index?this[index]:this[this.length+index])},length:0,push:push,sort:[].sort,splice:[].splice},BOOLEAN_ATTR={},BOOLEAN_ELEMENTS=(forEach("multiple,selected,checked,disabled,readOnly,required,open".split(","),function(value){BOOLEAN_ATTR[lowercase(value)]=value}),{}),ALIASED_ATTR=(forEach("input,select,option,textarea,button,form,details".split(","),function(value){BOOLEAN_ELEMENTS[value]=!0}),{ngMinlength:"minlength",ngMaxlength:"maxlength",ngMin:"min",ngMax:"max",ngPattern:"pattern",ngStep:"step"});function getBooleanAttrName(element,name){name=BOOLEAN_ATTR[name.toLowerCase()];return name&&BOOLEAN_ELEMENTS[nodeName_(element)]&&name}function getText(element,value){var nodeType;if(void 0===value)return(nodeType=element.nodeType)===NODE_TYPE_ELEMENT||nodeType===NODE_TYPE_TEXT?element.textContent:"";element.textContent=value}function createEventHandler(element,events){function eventHandler(event,type){event.isDefaultPrevented=function(){return event.defaultPrevented};var eventFns=events[type||event.type],eventFnsLength=eventFns?eventFns.length:0;if(eventFnsLength){void 0===event.immediatePropagationStopped&&(originalStopImmediatePropagation=event.stopImmediatePropagation,event.stopImmediatePropagation=function(){event.immediatePropagationStopped=!0,event.stopPropagation&&event.stopPropagation(),originalStopImmediatePropagation&&originalStopImmediatePropagation.call(event)}),event.isImmediatePropagationStopped=function(){return!0===event.immediatePropagationStopped};var originalStopImmediatePropagation,handlerWrapper=eventFns.specialHandlerWrapper||defaultHandlerWrapper;1<eventFnsLength&&(eventFns=shallowCopy(eventFns));for(var i=0;i<eventFnsLength;i++)event.isImmediatePropagationStopped()||handlerWrapper(element,event,eventFns[i])}}return eventHandler.elem=element,eventHandler}function defaultHandlerWrapper(element,event,handler){handler.call(element,event)}function specialMouseHandlerWrapper(target,event,handler){var related=event.relatedTarget;related&&(related===target||jqLiteContains.call(target,related))||handler.call(target,event)}function $$jqLiteProvider(){this.$get=function(){return extend(JQLite,{hasClass:function(node,classes){return jqLiteHasClass(node=node.attr?node[0]:node,classes)},addClass:function(node,classes){return jqLiteAddClass(node=node.attr?node[0]:node,classes)},removeClass:function(node,classes){return jqLiteRemoveClass(node=node.attr?node[0]:node,classes)}})}}function hashKey(obj,nextUidFn){var key=obj&&obj.$$hashKey;return key?"function"==typeof key?obj.$$hashKey():key:"function"==(key=typeof obj)||"object"==key&&null!==obj?obj.$$hashKey=key+":"+(nextUidFn||nextUid)():key+":"+obj}forEach({data:jqLiteData,removeData:jqLiteRemoveData,hasData:function(node){for(var key in jqCache[node.ng339])return!0;return!1},cleanData:function(nodes){for(var i=0,ii=nodes.length;i<ii;i++)jqLiteRemoveData(nodes[i])}},function(fn,name){JQLite[name]=fn}
1),forEach({data:jqLiteData,inheritedData:jqLiteInheritedData,scope:function(element){return jqLite.data(element,"$scope")||jqLiteInheritedData(element.parentNode||element,["$isolateScope","$scope"])},isolateScope:function(element){return jqLite.data(element,"$isolateScope")||jqLite.data(element,"$isolateScopeNoTemplate")},controller:jqLiteController,injector:function(element){return jqLiteInheritedData(element,"$injector")},removeAttr:function(element,name){element.removeAttribute(name)},hasClass:jqLiteHasClass,css:function(element,name,value){if(name=(name=>kebabToCamel(name.replace(MS_HACK_REGEXP,"ms-")))(name),void 0===value)return element.style[name];element.style[name]=value},attr:function(element,name,value){var ret,isBooleanAttr,nodeType=element.nodeType;if(nodeType!==NODE_TYPE_TEXT&&2!==nodeType&&nodeType!==NODE_TYPE_COMMENT&&element.getAttribute)return nodeType=lowercase(name),isBooleanAttr=BOOLEAN_ATTR[nodeType],void 0===value?(ret=element.getAttribute(name),null===(ret=isBooleanAttr&&null!==ret?nodeType:ret)?void 0:ret):void(null===value||!1===value&&isBooleanAttr?element.removeAttribute(name):element.setAttribute(name,isBooleanAttr?nodeType:value))},prop:function(element,name,value){if(void 0===value)return element[name];element[name]=value},text:(getText.$dv="",getText),val:function(element,value){var result;if(void 0===value)return element.multiple&&"select"===nodeName_(element)?(result=[],forEach(element.options,function(option){option.selected&&result.push(option.value||option.text)}),result):element.value;element.value=value},html:function(element,value){if(void 0===value)return element.innerHTML;jqLiteDealoc(element,!0),element.innerHTML=value},empty:jqLiteEmpty},function(fn,name){JQLite.prototype[name]=function(arg1,arg2){var i,key,nodeCount=this.length;if(fn!==jqLiteEmpty&&void 0===(2===fn.length&&fn!==jqLiteHasClass&&fn!==jqLiteController?arg1:arg2)){if(isObject(arg1)){for(i=0;i<nodeCount;i++)if(fn===jqLiteData)fn(this[i],arg1);else for(key in arg1)fn(this[i],key,arg1[key]);return this}for(var jj=void 0===(value=fn.$dv)?Math.min(nodeCount,1):nodeCount,j=0;j<jj;j++)var nodeValue=fn(this[j],arg1,arg2),value=value?value+nodeValue:nodeValue;return value}for(i=0;i<nodeCount;i++)fn(this[i],arg1,arg2);return this}}),forEach({removeData:jqLiteRemoveData,on:function(element,type,fn,unsupported){if(void 0!==unsupported)throw jqLiteMinErr("onargs","jqLite#on() does not support the `selector` or `eventData` parameters");if(jqLiteAcceptsData(element))for(var unsupported=jqLiteExpandoStore(element,!0),events=unsupported.events,handle=(handle=unsupported.handle)||(unsupported.handle=createEventHandler(element,events)),types=0<=type.indexOf(" ")?type.split(" "):[type],i=types.length,addHandler=function(type,specialHandlerWrapper,noEventListener){var eventFns=events[type];eventFns||((eventFns=events[type]=[]).specialHandlerWrapper=specialHandlerWrapper,"$destroy"===type)||noEventListener||element.addEventListener(type,handle),eventFns.push(fn)};i--;)type=types[i],MOUSE_EVENT_MAP[type]?(addHandler(MOUSE_EVENT_MAP[type],specialMouseHandlerWrapper),addHandler(type,void 0,!0)):addHandler(type)},off:jqLiteOff,one:function(element,type,fn){(element=jqLite(element)).on(type,function onFn(){element.off(type,fn),element.off(type,onFn)}),element.on(type,fn)},replaceWith:function(element,replaceNode){var index,parent=element.parentNode;jqLiteDealoc(element),forEach(new JQLite(replaceNode),function(node){index?parent.insertBefore(node,index.nextSibling):parent.replaceChild(node,element),index=node})},children:function(element){var children=[];return forEach(element.childNodes,function(element){element.nodeType===NODE_TYPE_ELEMENT&&children.push(element)}),children},contents:function(element){return element.contentDocument||element.childNodes||[]},append:function(element,node){var nodeType=element.nodeType;if(nodeType===NODE_TYPE_ELEMENT||11===nodeType)for(var i=0,ii=(node=new JQLite(node)).length;i<ii;i++){var child=node[i];element.appendChild(child)}},prepend:function(element,node){var index;element.nodeType===NODE_TYPE_ELEMENT&&(index=element.firstChild,forEach(new JQLite(node),function(child){element.insertBefore(child,index)}))},wrap:function(element,wrapNode){var parent;element=element,wrapNode=jqLite(wrapNode).eq(0).clone()[0],(parent=element.parentNode)&&parent.replaceChild(wrapNode,element),wrapNode.appendChild(element)},remove:jqLiteRemove,detach:function(element){jqLiteRemove(element,!0)},after:function(element,newElement){var index=element,parent=element.parentNode;if(parent)for(var i=0,ii=(newElement=new JQLite(newElement)).length;i<ii;i++){var node=newElement[i];parent.insertBefore(node,index.nextSibling),index=node}}
1,addClass:jqLiteAddClass,removeClass:jqLiteRemoveClass,toggleClass:function(element,selector,condition){selector&&forEach(selector.split(" "),function(className){var classCondition=condition;((classCondition=void 0===condition?!jqLiteHasClass(element,className):classCondition)?jqLiteAddClass:jqLiteRemoveClass)(element,className)})},parent:function(element){element=element.parentNode;return element&&11!==element.nodeType?element:null},next:function(element){return element.nextElementSibling},find:function(element,selector){return element.getElementsByTagName?element.getElementsByTagName(selector):[]},clone:jqLiteClone,triggerHandler:function(element,event,extraParameters){var dummyEvent,handlerArgs,eventName=event.type||event,expandoStore=jqLiteExpandoStore(element),expandoStore=expandoStore&&expandoStore.events,expandoStore=expandoStore&&expandoStore[eventName];expandoStore&&(dummyEvent={preventDefault:function(){this.defaultPrevented=!0},isDefaultPrevented:function(){return!0===this.defaultPrevented},stopImmediatePropagation:function(){this.immediatePropagationStopped=!0},isImmediatePropagationStopped:function(){return!0===this.immediatePropagationStopped},stopPropagation:noop,type:eventName,target:element},event.type&&(dummyEvent=extend(dummyEvent,event)),eventName=shallowCopy(expandoStore),handlerArgs=extraParameters?[dummyEvent].concat(extraParameters):[dummyEvent],forEach(eventName,function(fn){dummyEvent.isImmediatePropagationStopped()||fn.apply(element,handlerArgs)}))}},function(fn,name){JQLite.prototype[name]=function(arg1,arg2,arg3){for(var value,i=0,ii=this.length;i<ii;i++)void 0===value?void 0!==(value=fn(this[i],arg1,arg2,arg3))&&(value=jqLite(value)):jqLiteAddNodes(value,fn(this[i],arg1,arg2,arg3));return void 0!==value?value:this}}),JQLite.prototype.bind=JQLite.prototype.on,JQLite.prototype.unbind=JQLite.prototype.off;var nanKey=Object.create(null);function NgMapShim(){this._keys=[],this._values=[],this._lastKey=NaN,this._lastIndex=-1}NgMapShim.prototype={_idx:function(key){return key!==this._lastKey&&(this._lastKey=key,this._lastIndex=this._keys.indexOf(key)),this._lastIndex},_transformKey:function(key){return isNumberNaN(key)?nanKey:key},get:function(key){key=this._transformKey(key);key=this._idx(key);if(-1!==key)return this._values[key]},set:function(key,value){key=this._transformKey(key);var idx=this._idx(key);-1===idx&&(idx=this._lastIndex=this._keys.length),this._keys[idx]=key,this._values[idx]=value},delete:function(key){key=this._transformKey(key);key=this._idx(key);return-1!==key&&(this._keys.splice(key,1),this._values.splice(key,1),this._lastKey=NaN,this._lastIndex=-1,!0)}};var NgMap=NgMapShim,$$MapProvider=[function(){this.$get=[function(){return NgMap}]}],ARROW_ARG=/^([^(]+?)=>/,FN_ARGS=/^[^(]*\(\s*([^)]*)\)/m,FN_ARG_SPLIT=/,/,FN_ARG=/^\s*(_?)(\S+?)\1\s*$/,STRIP_COMMENTS=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm,$injectorMinErr=minErr("$injector");function stringifyFn(fn){return Function.prototype.toString.call(fn)}function extractArgs(fn){fn=stringifyFn(fn).replace(STRIP_COMMENTS,"");return fn.match(ARROW_ARG)||fn.match(FN_ARGS)}function createInjector(modulesToLoad,strictDi){strictDi=!0===strictDi;var INSTANTIATING={},path=[],loadedModules=new NgMap,providerCache={$provide:{provider:supportObject(provider),factory:supportObject(factory),service:supportObject(function(name,constructor){return factory(name,["$injector",function($injector){return $injector.instantiate(constructor)}])}),value:supportObject(function(name,val){return factory(name,valueFn(val),!1)}),constant:supportObject(function(name,value){assertNotHasOwnProperty(name,"constant"),providerCache[name]=value,instanceCache[name]=value}),decorator:function(serviceName,decorFn){var origProvider=providerInjector.get(serviceName+"Provider"),orig$get=origProvider.$get;origProvider.$get=function(){var origInstance=instanceInjector.invoke(orig$get,origProvider);return instanceInjector.invoke(decorFn,null,{$delegate:origInstance})}}}},providerInjector=providerCache.$injector=createInternalInjector(providerCache,function(serviceName,caller){throw angular.isString(caller)&&path.push(caller),$injectorMinErr("unpr","Unknown provider: {0}",path.join(" <- "))}),instanceCache={},protoInstanceInjector=createInternalInjector(instanceCache,function(serviceName,caller){caller=providerInjector.get(serviceName+"Provider",caller);return instanceInjector.invoke(caller.$get,caller,void 0,serviceName)}),instanceInjector=protoInstanceInjector,modulesToLoad=(providerCache.$injectorProvider={$get:valueFn(protoInstanceInjector)},instanceInjector.modules=providerInjector.modules=createMap(),function loadModules(modulesToLoad){assertArg(void 0===modulesToLoad||isArray(modulesToLoad),"modulesToLoad","not an array");var moduleFn,runBlocks=[];forEach(modulesToLoad,function(module){if(!loadedModules.get(module)){loadedModules.set(module,!0);try{isString(module)?(moduleFn=angularModule(module),instanceInjector.modules[module]=moduleFn,runBlocks=runBlocks.concat(loadModules(moduleFn.requires)).concat(moduleFn._runBlocks),runInvokeQueue(moduleFn._invokeQueue),runInvokeQueue(moduleFn._configBlocks)):isFunction(module)||isArray(module)?runBlocks.push(providerInjector.invoke(module)):assertArgFn(module,"module")}catch(e){throw isArray(module)&&(module=module[module.length-1]),e.message&&e.stack&&-1===e.stack.indexOf(e.message)&&(e=e.message+"\n"+e.stack),$injectorMinErr("modulerr","Failed to instantiate module {0} due to:\n{1}",module,e.stack||e.message||e)}}function runInvokeQueue(queue){var i,ii;for(i=0,ii=queue.length;i<ii;i++){var invokeArgs=queue[i],provider=providerInjector.get(invokeArgs[0]);
1provider[invokeArgs[1]].apply(provider,invokeArgs[2])}}});return runBlocks}(modulesToLoad));return(instanceInjector=protoInstanceInjector.get("$injector")).strictDi=strictDi,forEach(modulesToLoad,function(fn){fn&&instanceInjector.invoke(fn)}),instanceInjector;function supportObject(delegate){return function(key,value){if(!isObject(key))return delegate(key,value);forEach(key,reverseParams(delegate))}}function provider(name,provider_){if(assertNotHasOwnProperty(name,"service"),(provider_=isFunction(provider_)||isArray(provider_)?providerInjector.instantiate(provider_):provider_).$get)return providerCache[name+"Provider"]=provider_;throw $injectorMinErr("pget","Provider '{0}' must define $get factory method.",name)}function factory(name,factoryFn,enforce){return provider(name,{$get:!1!==enforce?((name,factory)=>function(){var result=instanceInjector.invoke(factory,this);if(void 0===result)throw $injectorMinErr("undef","Provider '{0}' must return a value from $get factory method.",name);return result})(name,factoryFn):factoryFn})}function createInternalInjector(cache,factory){function getService(serviceName,caller){if(cache.hasOwnProperty(serviceName)){if(cache[serviceName]===INSTANTIATING)throw $injectorMinErr("cdep","Circular dependency found: {0}",serviceName+" <- "+path.join(" <- "));return cache[serviceName]}try{return path.unshift(serviceName),cache[serviceName]=INSTANTIATING,cache[serviceName]=factory(serviceName,caller),cache[serviceName]}catch(err){throw cache[serviceName]===INSTANTIATING&&delete cache[serviceName],err}finally{path.shift()}}function injectionArgs(fn,locals,serviceName){for(var args=[],$inject=createInjector.$$annotate(fn,strictDi,serviceName),i=0,length=$inject.length;i<length;i++){var key=$inject[i];if("string"!=typeof key)throw $injectorMinErr("itkn","Incorrect injection token! Expected service name as string, got {0}",key);args.push(locals&&locals.hasOwnProperty(key)?locals[key]:getService(key,serviceName))}return args}return{invoke:function(fn,self,locals,serviceName){return"string"==typeof locals&&(serviceName=locals,locals=null),locals=injectionArgs(fn,locals,serviceName),(func=>{var result;return!msie&&"function"==typeof func&&(isBoolean(result=func.$$ngIsClass)?result:func.$$ngIsClass=/^(?:class\b|constructor\()/.test(stringifyFn(func)))})(fn=isArray(fn)?fn[fn.length-1]:fn)?(locals.unshift(null),new(Function.prototype.bind.apply(fn,locals))):fn.apply(self,locals)},instantiate:function(Type,locals,serviceName){var ctor=isArray(Type)?Type[Type.length-1]:Type;return(Type=injectionArgs(Type,locals,serviceName)).unshift(null),new(Function.prototype.bind.apply(ctor,Type))},get:getService,annotate:createInjector.$$annotate,has:function(name){return providerCache.hasOwnProperty(name+"Provider")||cache.hasOwnProperty(name)}}}}function $AnchorScrollProvider(){var autoScrollingEnabled=!0;this.disableAutoScrolling=function(){autoScrollingEnabled=!1},this.$get=["$window","$location","$rootScope",function($window,$location,$rootScope){var document=$window.document;function scrollTo(elem){var offset;elem?(elem.scrollIntoView(),(offset=(()=>{var elem,offset=scroll.yOffset;return isFunction(offset)?offset=offset():isElement(offset)?(elem=offset[0],offset="fixed"!==$window.getComputedStyle(elem).position?0:elem.getBoundingClientRect().bottom):isNumber(offset)||(offset=0),offset})())&&(elem=elem.getBoundingClientRect().top,$window.scrollBy(0,elem-offset))):$window.scrollTo(0,0)}function scroll(hash){var elm,result;(hash=isString(hash)?hash:isNumber(hash)?hash.toString():$location.hash())?(elm=document.getElementById(hash))?scrollTo(elm):(elm=document.getElementsByName(hash),result=null,Array.prototype.some.call(elm,function(element){if("a"===nodeName_(element))return result=element,!0}),result?scrollTo(result):"top"===hash&&scrollTo(null)):scrollTo(null)}return autoScrollingEnabled&&$rootScope.$watch(function(){return $location.hash()},function(newVal,oldVal){var win;newVal===oldVal&&""===newVal||(oldVal=function(){$rootScope.$evalAsync(scroll)},"complete"===(win=win||window).document.readyState?win.setTimeout(oldVal):jqLite(win).on("load",oldVal))}),scroll}]}createInjector.$$annotate=function(fn,strictDi,name){var $inject;if("function"==typeof fn){if(!($inject=fn.$inject)){if($inject=[],fn.length){if(strictDi)throw isString(name)&&name||(name=fn.name||(fn=>(fn=extractArgs(fn))?"function("+(fn[1]||"").replace(/[\s\r\n]+/," ")+")":"fn")(fn)),$injectorMinErr("strictdi","{0} is not using explicit annotation and cannot be invoked in strict mode",name);forEach(extractArgs(fn)[1].split(FN_ARG_SPLIT),function(arg){arg.replace(FN_ARG,function(all,underscore,name){$inject.push(name)})})}fn.$inject=$inject}}else isArray(fn)?(assertArgFn(fn[strictDi=fn.length-1],"fn"),$inject=fn.slice(0,strictDi)):assertArgFn(fn,"fn",!0);return $inject};var $animateMinErr=minErr("$animate"),ELEMENT_NODE=1;function mergeClasses(a,b){return a||b?a?b?(a=isArray(a)?a.join(" "):a)+" "+(b=isArray(b)?b.join(" "):b):a:b:""}function prepareAnimateOptions(options){return isObject(options)?options:{}}
1function $$CoreAnimateJsProvider(){this.$get=noop}function $$CoreAnimateQueueProvider(){var postDigestQueue=new NgMap,postDigestElements=[];this.$get=["$$AnimateRunner","$rootScope",function($$AnimateRunner,$rootScope){return{enabled:noop,on:noop,off:noop,pin:noop,push:function(element,event,options,domOperation){domOperation&&domOperation(),(options=options||{}).from&&element.css(options.from),options.to&&element.css(options.to),(options.addClass||options.removeClass)&&((element,add,remove)=>{var data=postDigestQueue.get(element)||{},add=updateData(data,add,!0),remove=updateData(data,remove,!1);(add||remove)&&(postDigestQueue.set(element,data),postDigestElements.push(element),1===postDigestElements.length)&&$rootScope.$$postDigest(handleCSSClassChanges)})(element,options.addClass,options.removeClass);domOperation=new $$AnimateRunner;return domOperation.complete(),domOperation}};function updateData(data,classes,value){var changed=!1;return classes&&forEach(classes=isString(classes)?classes.split(" "):isArray(classes)?classes:[],function(className){className&&(changed=!0,data[className]=value)}),changed}function handleCSSClassChanges(){forEach(postDigestElements,function(element){var existing,toAdd,toRemove,classes,obj,data=postDigestQueue.get(element);data&&(isString(classes=element.attr("class"))&&(classes=classes.split(" ")),obj=createMap(),forEach(classes,function(klass){klass.length&&(obj[klass]=!0)}),existing=obj,toRemove=toAdd="",forEach(data,function(status,className){status!==!!existing[className]&&(status?toAdd+=(toAdd.length?" ":"")+className:toRemove+=(toRemove.length?" ":"")+className)}
1),forEach(element,function(elm){toAdd&&jqLiteAddClass(elm,toAdd),toRemove&&jqLiteRemoveClass(elm,toRemove)}),postDigestQueue.delete(element))}),postDigestElements.length=0}}]}function $$AnimateAsyncRunFactoryProvider(){this.$get=["$$rAF",function($$rAF){var waitQueue=[];function waitForTick(fn){waitQueue.push(fn),1<waitQueue.length||$$rAF(function(){for(var i=0;i<waitQueue.length;i++)waitQueue[i]();waitQueue=[]})}return function(){var passed=!1;return waitForTick(function(){passed=!0}),function(callback){passed?callback():waitForTick(callback)}}}]}function $$AnimateRunnerFactoryProvider(){this.$get=["$q","$sniffer","$$animateAsyncRun","$$isDocumentHidden","$timeout",function($q,$sniffer,$$animateAsyncRun,$$isDocumentHidden,$timeout){function AnimateRunner(host){this.setHost(host);var rafTick=$$animateAsyncRun();this._doneCallbacks=[],this._tick=function(fn){($$isDocumentHidden()?fn=>{$timeout(fn,0,!1)}:rafTick)(fn)},this._state=0}return AnimateRunner.chain=function(chain,callback){var index=0;!function next(){if(index===chain.length)return void callback(!0);chain[index](function(response){!1===response?callback(!1):(index++,next())})}()},AnimateRunner.all=function(runners,callback){var count=0,status=!0;function onProgress(response){status=status&&response,++count===runners.length&&callback(status)}forEach(runners,function(runner){runner.done(onProgress)})},AnimateRunner.prototype={setHost:function(host){this.host=host||{}},done:function(fn){2===this._state?fn():this._doneCallbacks.push(fn)},progress:noop,getPromise:function(){var self;return this.promise||((self=this).promise=$q(function(resolve,reject){self.done(function(status){(!1===status?reject:resolve)()})})),this.promise},then:function(resolveHandler,rejectHandler){return this.getPromise().then(resolveHandler,rejectHandler)},catch:function(handler){return this.getPromise().catch(handler)},finally:function(handler){return this.getPromise().finally(handler)},pause:function(){this.host.pause&&this.host.pause()},resume:function(){this.host.resume&&this.host.resume()},end:function(){this.host.end&&this.host.end(),this._resolve(!0)},cancel:function(){this.host.cancel&&this.host.cancel(),this._resolve(!1)},complete:function(response){var self=this;0===self._state&&(self._state=1,self._tick(function(){self._resolve(response)}))},_resolve:function(response){2!==this._state&&(forEach(this._doneCallbacks,function(fn){fn(response)}),this._doneCallbacks.length=0,this._state=2)}},AnimateRunner}]}function $CoreAnimateCssProvider(){this.$get=["$$rAF","$q","$$AnimateRunner",function($$rAF,$q,$$AnimateRunner){return function(element,initialOptions){var options=initialOptions||{};(options=options.$$prepared?options:copy(options)).cleanupStyles&&(options.from=options.to=null),options.from&&(element.css(options.from),options.from=null);var closed,runner=new $$AnimateRunner;return{start:run,end:run};function run(){return $$rAF(function(){options.addClass&&(element.addClass(options.addClass),options.addClass=null),options.removeClass&&(element.removeClass(options.removeClass),options.removeClass=null),options.to&&(element.css(options.to),options.to=null),closed||runner.complete(),closed=!0}),runner}}}]}var $AnimateProvider=["$provide",function($provide){var provider=this,classNameFilter=null;this.$$registeredAnimations=Object.create(null),this.register=function(name,factory){if(name&&"."!==name.charAt(0))throw $animateMinErr("notcsel","Expecting class selector starting with '.' got '{0}'.",name);var key=name+"-animation";provider.$$registeredAnimations[name.substr(1)]=key,$provide.factory(key,factory)},this.classNameFilter=function(expression){if(1===arguments.length&&((classNameFilter=expression instanceof RegExp?expression:null)&&new RegExp("[(\\s|\\/)]ng-animate[(\\s|\\/)]").test(classNameFilter.toString())))throw classNameFilter=null,$animateMinErr("nongcls",'$animateProvider.classNameFilter(regex) prohibits accepting a regex value which matches/contains the "{0}" CSS class.',"ng-animate");return classNameFilter},this.$get=["$$animateQueue",function($$animateQueue){function domInsert(element,parentElement,afterElement){var afterNode;(afterElement=!afterElement||!(afterNode=(element=>{for(var i=0;i<element.length;i++){var elm=element[i];if(elm.nodeType===ELEMENT_NODE)return elm}})(afterElement))||afterNode.parentNode||afterNode.previousElementSibling?afterElement:null)?afterElement.after(element):parentElement.prepe
1nd(element)}return{on:$$animateQueue.on,off:$$animateQueue.off,pin:$$animateQueue.pin,enabled:$$animateQueue.enabled,cancel:function(runner){runner.end&&runner.end()},enter:function(element,parent,after,options){return parent=parent&&jqLite(parent),after=after&&jqLite(after),domInsert(element,parent=parent||after.parent(),after),$$animateQueue.push(element,"enter",prepareAnimateOptions(options))},move:function(element,parent,after,options){return parent=parent&&jqLite(parent),after=after&&jqLite(after),domInsert(element,parent=parent||after.parent(),after),$$animateQueue.push(element,"move",prepareAnimateOptions(options))},leave:function(element,options){return $$animateQueue.push(element,"leave",prepareAnimateOptions(options),function(){element.remove()})},addClass:function(element,className,options){return(options=prepareAnimateOptions(options)).addClass=mergeClasses(options.addclass,className),$$animateQueue.push(element,"addClass",options)},removeClass:function(element,className,options){return(options=prepareAnimateOptions(options)).removeClass=mergeClasses(options.removeClass,className),$$animateQueue.push(element,"removeClass",options)},setClass:function(element,add,remove,options){return(options=prepareAnimateOptions(options)).addClass=mergeClasses(options.addClass,add),options.removeClass=mergeClasses(options.removeClass,remove),$$animateQueue.push(element,"setClass",options)},animate:function(element,from,to,className,options){return(options=prepareAnimateOptions(options)).from=options.from?extend(options.from,from):from,options.to=options.to?extend(options.to,to):to,options.tempClasses=mergeClasses(options.tempClasses,className=className||"ng-inline-animate"),$$animateQueue.push(element,"animate",options)}}}]}];function Browser(window,document,$log,$sniffer){var self=this,location=window.location,history=window.history,setTimeout=window.setTimeout,clearTimeout=window.clearTimeout,pendingDeferIds={},outstandingRequestCount=(self.isMock=!1,0),outstandingRequestCallbacks=[];function completeOutstandingRequest(fn){try{fn.apply(null,sliceArgs(arguments,1))}finally{if(0===--outstandingRequestCount)for(;outstandingRequestCallbacks.length;)try{outstandingRequestCallbacks.pop()()}catch(e){$log.error(e)}}}self.$$completeOutstandingRequest=completeOutstandingRequest,self.$$incOutstandingRequestCount=function(){outstandingRequestCount++},self.notifyWhenNoOutstandingRequests=function(callback){0===outstandingRequestCount?callback():outstandingRequestCallbacks.push(callback)};var cachedState,lastHistoryState,lastBrowserUrl=location.href,baseElement=document.find("base"),pendingLocation=null,getCurrentState=$sniffer.history?function(){try{return history.state}catch(e){}}:noop,urlChangeListeners=(cacheState(),self.url=function(url,replace,state){var sameState,sameBase;return void 0===state&&(state=null),location!==window.location&&(location=window.location),history!==window.history&&(history=window.history),url?(sameState=lastHistoryState===state,(lastBrowserUrl!==url||$sniffer.history&&!sameState)&&(sameBase=lastBrowserUrl&&stripHash(lastBrowserUrl)===stripHash(url),lastBrowserUrl=url,lastHistoryState=state,!$sniffer.history||sameBase&&sameState?(sameBase||(pendingLocation=url),replace?location.replace(url):sameBase?location.hash=(url=>{var index=url.indexOf("#");return-1===index?"":url.substr(index)})(url):location.href=url,location.href!==url&&(pendingLocation=url)):(history[replace?"replaceState":"pushState"](state,"",url),cacheState()),pendingLocation=pendingLocation&&url),self):pendingLocation||location.href.replace(/%27/g,"'")},self.state=function(){return cachedState},[]),urlChangeInit=!1;function cacheStateAndFireUrlChange(){pendingLocation=null,fireStateOrUrlChange()}var lastCachedState=null;function cacheState(){equals(cachedState=void 0===(cachedState=getCurrentState())?null:cachedState,lastCachedState)&&(cachedState=lastCachedState),lastHistoryState=lastCachedState=cachedState}function fireStateOrUrlChange(){var prevLastHistoryState=lastHistoryState;cacheState(),lastBrowserUrl===self.url()&&prevLastHistoryState===cachedState||(lastBrowserUrl=self.url(),lastHistoryState=cachedState,forEach(urlChangeListeners,function(listener){listener(self.url(),cachedState)}))}self.onUrlChange=function(callback){return urlChangeInit||($sniffer.history&&jqLite(window).on("popstate",cacheStateAndFireUrlChange),jqLite(window).on("hashchange",cacheStateAndFireUrlChange),urlChangeInit=!0),urlChangeListeners.push(callback),callback},self.$$applicationDestroyed=function(){jqLite(window).off("hashchange popstate",cacheStateAndFireUrlChange)},self.$$checkUrlChange=fireStateOrUrlChange,self.baseHref=function(){var href=baseElement.attr("href");return href?href.replace(/^(https?:)?\/\/[^/]*/,""):""},self.defer=function(fn,delay){var timeoutId;return outstandingRequestCount++,timeoutId=setTimeout(function(){delete pe
1ndingDeferIds[timeoutId],completeOutstandingRequest(fn)},delay||0),pendingDeferIds[timeoutId]=!0,timeoutId},self.defer.cancel=function(deferId){return!!pendingDeferIds[deferId]&&(delete pendingDeferIds[deferId],clearTimeout(deferId),completeOutstandingRequest(noop),!0)}}function $BrowserProvider(){this.$get=["$window","$log","$sniffer","$document",function($window,$log,$sniffer,$document){return new Browser($window,$document,$log,$sniffer)}]}function $CacheFactoryProvider(){this.$get=function(){var caches={};function cacheFactory(cacheId,options){if(cacheId in caches)throw minErr("$cacheFactory")("iid","CacheId '{0}' is already taken!",cacheId);var size=0,stats=extend({},options,{id:cacheId}),data=createMap(),capacity=options&&options.capacity||Number.MAX_VALUE,lruHash=createMap(),freshEnd=null,staleEnd=null;return caches[cacheId]={put:function(key,value){if(void 0!==value)return capacity<Number.MAX_VALUE&&refresh(lruHash[key]||(lruHash[key]={key:key})),key in data||size++,data[key]=value,capacity<size&&this.remove(staleEnd.key),value},get:function(key){if(capacity<Number.MAX_VALUE){var lruEntry=lruHash[key];if(!lruEntry)return;refresh(lruEntry)}return data[key]},remove:function(key){if(capacity<Number.MAX_VALUE){var lruEntry=lruHash[key];if(!lruEntry)return;lruEntry===freshEnd&&(freshEnd=lruEntry.p),lruEntry===staleEnd&&(staleEnd=lruEntry.n),link(lruEntry.n,lruEntry.p),delete lruHash[key]}key in data&&(delete data[key],size--)},removeAll:function(){data=createMap(),size=0,lruHash=createMap(),freshEnd=staleEnd=null},destroy:function(){lruHash=stats=data=null,delete caches[cacheId]},info:function(){return extend({},stats,{size:size})}};function refresh(entry){entry!==freshEnd&&(staleEnd?staleEnd===entry&&(staleEnd=entry.n):staleEnd=entry,link(entry.n,entry.p),link(entry,freshEnd),(freshEnd=entry).n=null)}function link(nextEntry,prevEntry){nextEntry!==prevEntry&&(nextEntry&&(nextEntry.p=prevEntry),prevEntry)&&(prevEntry.n=nextEntry)}}return cacheFactory.info=function(){var info={};return forEach(caches,function(cache,cacheId){info[cacheId]=cache.info()}),info},cacheFactory.get=function(cacheId){return caches[cacheId]},cacheFactory}}function $TemplateCacheProvider(){this.$get=["$cacheFactory",function($cacheFactory){return $cacheFactory("templates")}]}var $compileMinErr=minErr("$compile"),_UNINITIALIZED_VALUE=new function(){};function $CompileProvider($provide,$$sanitizeUriProvider){var hasDirectives={},COMMENT_DIRECTIVE_REGEXP=/^\s*directive:\s*([\w-]+)\s+(.*)$/,CLASS_DIRECTIVE_REGEXP=/(([\w-]+)(?::([^;]+))?;?)/,ALL_OR_NOTHING_ATTRS=(str=>{for(var obj={},items=str.split(","),i=0;i<items.length;i++)obj[items[i]]=!0;return obj})("ngSrc,ngSrcset,src,srcset"),REQUIRE_PREFIX_REGEXP=/^(?:(\^\^?)?(\?)?(\^\^?)?)?/,EVENT_HANDLER_ATTR_REGEXP=/^(on[a-z]+|formaction)$/,bindingCache=createMap();function parseIsolateBindings(scope,directiveName,isController){var LOCAL_REGEXP=/^\s*([@&<]|=(\*?))(\??)\s*([\w$]*)\s*$/,bindings=createMap();return forEach(scope,function(definition,scopeName){if(definition in bindingCache)bindings[scopeName]=bindingCache[definition];else{var match=definition.match(LOCAL_REGEXP);if(!match)throw $compileMinErr("iscp","Invalid {3} for directive '{0}'. Definition: {... {1}: '{2}' ...}",directiveName,scopeName,definition,isController?"controller bindings definition":"isolate scope definition");bindings[scopeName]={mode:match[1][0],collection:"*"===match[2],optional:"?"===match[3],attrName:match[4]||scopeName},match[4]&&(bindingCache[definition]=bindings[scopeName])}}),bindings}this.directive=function registerDirective(name,directiveFactory){return assertArg(name,"name"),assertNotHasOwnProperty(name,"directive"),isString(name)?((name=>{var letter=name.charAt(0);if(!letter||letter!==lowercase(letter))throw $compileMinErr("baddir","Directive/Component name '{0}' is invalid. The first character must be a lowercase letter",name);if(name!==name.trim())throw $compileMinErr("baddir","Directive/Component name '{0}' is invalid. The name should not contain leading or trailing whitespaces",name)})(name),assertArg(directiveFactory,"directiveFactory"),hasDirectives.hasOwnProperty(name)||(hasDirectives[name]=[],$provide.factory(name+"Directive",["$injector","$exceptionHandler",function($injector,$exceptionHandler){var directives=[];return forEach(hasDirectives[name],function(directiveFactory,index){try{var directive=$injector.invoke(directiveFactory);isFunction(directive)?directive={compile:valueFn(directive)}:!directive.compile&&directive.link&&(directive.compile=valueFn(directive.link)),directive.priority=directive.priority||0,directive.index=index,directive.name=directive.name||name,directive.require=(directive=>{var require=directive.require||directive.controller&&directive.name;return!isArray(require)&&isObject(require)&&forEach(require,function(value,key){var match=value.match(REQUIRE_PREFIX_REGEXP);value.substring(match[0].length)||(require[key]=match[0]+key)}),require})(directive),directive.restrict=((restrict,name)=>{if(!restrict||isString(restrict)&&/[EACM]/.test(restrict))return restrict||"EA";
1throw $compileMinErr("badrestrict","Restrict property '{0}' of directive '{1}' is invalid",restrict,name)})(directive.restrict,name),directive.$$moduleName=directiveFactory.$$moduleName,directives.push(directive)}catch(e){$exceptionHandler(e)}}),directives}])),hasDirectives[name].push(directiveFactory)):forEach(name,reverseParams(registerDirective)),this},this.component=function(name,options){var controller=options.controller||function(){};function factory($injector){function makeInjectable(fn){return isFunction(fn)||isArray(fn)?function(tElement,tAttrs){return $injector.invoke(fn,this,{$element:tElement,$attrs:tAttrs})}:fn}var template=options.template||options.templateUrl?options.template:"",ddo={controller:controller,controllerAs:((controller,ident)=>{if(ident&&isString(ident))return ident;if(isString(controller)){ident=CNTRL_REG.exec(controller);if(ident)return ident[3]}})(options.controller)||options.controllerAs||"$ctrl",template:makeInjectable(template),templateUrl:makeInjectable(options.templateUrl),transclude:options.transclude,scope:{},bindToController:options.bindings||{},restrict:"E",require:options.require};return forEach(options,function(val,key){"$"===key.charAt(0)&&(ddo[key]=val)}),ddo}return forEach(options,function(val,key){"$"===key.charAt(0)&&(factory[key]=val,isFunction(controller))&&(controller[key]=val)}),factory.$inject=["$injector"],this.directive(name,factory)},this.aHrefSanitizationWhitelist=function(regexp){return void 0!==regexp?($$sanitizeUriProvider.aHrefSanitizationWhitelist(regexp),this):$$sanitizeUriProvider.aHrefSanitizationWhitelist()},this.imgSrcSanitizationWhitelist=function(regexp){return void 0!==regexp?($$sanitizeUriProvider.imgSrcSanitizationWhitelist(regexp),this):$$sanitizeUriProvider.imgSrcSanitizationWhitelist()};var debugInfoEnabled=!0,preAssignBindingsEnabled=!(this.debugInfoEnabled=function(enabled){return void 0!==enabled?(debugInfoEnabled=enabled,this):debugInfoEnabled}),TTL=(this.preAssignBindingsEnabled=function(enabled){return void 0!==enabled?(preAssignBindingsEnabled=enabled,this):preAssignBindingsEnabled},10),commentDirectivesEnabledConfig=(this.onChangesTtl=function(value){return arguments.length?(TTL=value,this):TTL},!0),cssClassDirectivesEnabledConfig=(this.commentDirectivesEnabled=function(value){return arguments.length?(commentDirectivesEnabledConfig=value,this):commentDirectivesEnabledConfig},!0);this.cssClassDirectivesEnabled=function(value){return arguments.length?(cssClassDirectivesEnabledConfig=value,this):cssClassDirectivesEnabledConfig},this.$get=["$injector","$interpolate","$exceptionHandler","$templateRequest","$parse","$controller","$rootScope","$sce","$animate","$$sanitizeUri",function($injector,$interpolate,$exceptionHandler,$templateRequest,$parse,$controller,$rootScope,$sce,$animate,$$sanitizeUri){var onChangesQueue,SIMPLE_ATTR_NAME=/^\w/,specialAttrHolder=window.document.createElement("div"),commentDirectivesEnabled=commentDirectivesEnabledConfig,cssClassDirectivesEnabled=cssClassDirectivesEnabledConfig,onChangesTtl=TTL;function flushOnChangesQueue(){try{if(!--onChangesTtl)throw onChangesQueue=void 0,$compileMinErr("infchng","{0} $onChanges() iterations reached. Aborting!\n",TTL);$rootScope.$apply(function(){for(var errors=[],i=0,ii=onChangesQueue.length;i<ii;++i)try{onChangesQueue[i]()}catch(e){errors.push(e)}if(onChangesQueue=void 0,errors.length)throw errors})}finally{onChangesTtl++}}function Attributes(element,attributesToCopy){if(attributesToCopy)for(var key,keys=Object.keys(attributesToCopy),i=0,l=keys.length;i<l;i++)this[key=keys[i]]=attributesToCopy[key];else this.$attr={};this.$$element=element}function safeAddClass($element,className){try{$element.addClass(className)}catch(e){}}Attributes.prototype={$normalize:directiveNormalize,$addClass:function(classVal){classVal&&0<classVal.length&&$animate.addClass(this.$$element,classVal)},$removeClass:function(classVal){classVal&&0<classVal.length&&$animate.removeClass(this.$$element,classVal)},$updateClass:function(newClasses,oldClasses){var toAdd=tokenDifference(newClasses,oldClasses),toAdd=(toAdd&&toAdd.length&&$animate.addClass(this.$$element,toAdd),tokenDifference(oldClasse
1s,newClasses));toAdd&&toAdd.length&&$animate.removeClass(this.$$element,toAdd)},$set:function(key,value,writeAttr,attrName){var booleanKey=getBooleanAttrName(this.$$element[0],key),aliasedKey=ALIASED_ATTR[key],observer=key;if(booleanKey?(this.$$element.prop(key,value),attrName=booleanKey):aliasedKey&&(this[aliasedKey]=value,observer=aliasedKey),this[key]=value,attrName?this.$attr[key]=attrName:(attrName=this.$attr[key])||(this.$attr[key]=attrName=snake_case(key,"-")),"a"===(booleanKey=nodeName_(this.$$element))&&("href"===key||"xlinkHref"===key)||"img"===booleanKey&&"src"===key)this[key]=value=$$sanitizeUri(value,"src"===key);else if("img"===booleanKey&&"srcset"===key&&void 0!==value){for(var result="",aliasedKey=trim(value),booleanKey=/\s/.test(aliasedKey)?/(\s+\d+x\s*,|\s+\d+w\s*,|\s+,|,\s+)/:/(,)/,rawUris=aliasedKey.split(booleanKey),nbrUrisWith2parts=Math.floor(rawUris.length/2),i=0;i<nbrUrisWith2parts;i++)var innerIdx=2*i,result=(result+=$$sanitizeUri(trim(rawUris[innerIdx]),!0))+(" "+trim(rawUris[1+innerIdx]));aliasedKey=trim(rawUris[2*i]).split(/\s/);result+=$$sanitizeUri(trim(aliasedKey[0]),!0),2===aliasedKey.length&&(result+=" "+trim(aliasedKey[1])),this[key]=value=result}!1!==writeAttr&&(null==value?this.$$element.removeAttr(attrName):SIMPLE_ATTR_NAME.test(attrName)?this.$$element.attr(attrName,value):((element,attrName,value)=>{specialAttrHolder.innerHTML="<span "+attrName+">";var attribute=(attrName=specialAttrHolder.firstChild.attributes)[0];attrName.removeNamedItem(attribute.name),attribute.value=value,element.attributes.setNamedItem(attribute)})(this.$$element[0],attrName,value));booleanKey=this.$$observers;booleanKey&&forEach(booleanKey[observer],function(fn){try{fn(value)}catch(e){$exceptionHandler(e)}})},$observe:function(key,fn){var attrs=this,$$observers=attrs.$$observers||(attrs.$$observers=createMap()),listeners=$$observers[key]||($$observers[key]=[]);return listeners.push(fn),$rootScope.$evalAsync(function(){!listeners.$$inter&&attrs.hasOwnProperty(key)&&void 0!==attrs[key]&&fn(attrs[key])}),function(){arrayRemove(listeners,fn)}}};var startSymbol=$interpolate.startSymbol(),endSymbol=$interpolate.endSymbol(),denormalizeTemplate="{{"===startSymbol&&"}}"===endSymbol?identity:function(template){return template.replace(/\{\{/g,startSymbol).replace(/}}/g,endSymbol)},NG_ATTR_BINDING=/^ngAttr[A-Z]/,MULTI_ELEMENT_DIR_RE=/^(.+)Start$/;return compile.$$addBindingInfo=debugInfoEnabled?function($element,binding){var bindings=$element.data("$binding")||[];isArray(binding)?bindings=bindings.concat(binding):bindings.push(binding),$element.data("$binding",bindings)}:noop,compile.$$addBindingClass=debugInfoEnabled?function($element){safeAddClass($element,"ng-binding")}:noop,compile.$$addScopeInfo=debugInfoEnabled?function($element,scope,isolated,noTemplate){$element.data(isolated?noTemplate?"$isolateScopeNoTemplate":"$isolateScope":"$scope",scope)}:noop,compile.$$addScopeClass=debugInfoEnabled?function($element,isolated){safeAddClass($element,isolated?"ng-isolate-scope":"ng-scope")}:noop,compile.$$createComment=function(directiveName,comment){var content="";return debugInfoEnabled&&(content=" "+(directiveName||"")+": ",comment)&&(content+=comment+" "),window.document.createComment(content)},compile;function compile($compileNodes,transcludeFn,maxPriority,ignoreDirective,previousCompileContext){var compositeLinkFn=compileNodes($compileNodes=$compileNodes instanceof jqLite?$compileNodes:jqLite($compileNodes),transcludeFn,$compileNodes,maxPriority,ignoreDirective,previousCompileContext),namespace=(compile.$$addScopeClass($compileNodes),null);return function(scope,cloneConnectFn,options){if(!$compileNodes)throw $compileMinErr("multilink","This element has already been linked.");assertArg(scope,"scope"),previousCompileContext&&previousCompileContext.needsNewScope&&(scope=scope.$parent.$new());var $linkNode,parentBoundTranscludeFn=(options=options||{}).parentBoundTranscludeFn,transcludeControllers=options.transcludeControllers;if(parentBoundTranscludeFn&&parentBoundTranscludeFn.$$boundTransclude&&(parentBoundTranscludeFn=parentBoundTranscludeFn.$$boundTransclude),$linkNode="html"!==(namespace=namespace||(parentElement=>(parentElement=parentElement&&parentElement[0])&&"foreignobject"!==nodeName_(parentElement)&&toString.call(parentElement).match(/SVG/)?"svg":"html")(options.futureParentElement))?jqLite(wrapTemplate(namespace,jqLite("<div>").append($compileNodes).html())):cloneConnectFn?JQLitePrototype.clone.call($
1compileNodes):$compileNodes,transcludeControllers)for(var controllerName in transcludeControllers)$linkNode.data("$"+controllerName+"Controller",transcludeControllers[controllerName].instance);return compile.$$addScopeInfo($linkNode,scope),cloneConnectFn&&cloneConnectFn($linkNode,scope),compositeLinkFn&&compositeLinkFn(scope,$linkNode,$linkNode,parentBoundTranscludeFn),cloneConnectFn||($compileNodes=compositeLinkFn=null),$linkNode}}function compileNodes(nodeList,transcludeFn,$rootElement,maxPriority,ignoreDirective,previousCompileContext){for(var directives,attrs,linkFnFound,nodeLinkFnFound,linkFns=[],notLiveList=isArray(nodeList)||nodeList instanceof jqLite,i=0;i<nodeList.length;i++)attrs=new Attributes,11===msie&&((nodeList,idx,notLiveList)=>{var sibling,node=nodeList[idx],parent=node.parentNode;if(node.nodeType===NODE_TYPE_TEXT)for(;;){if(!(sibling=parent?node.nextSibling:nodeList[idx+1])||sibling.nodeType!==NODE_TYPE_TEXT)break;node.nodeValue=node.nodeValue+sibling.nodeValue,sibling.parentNode&&sibling.parentNode.removeChild(sibling),notLiveList&&sibling===nodeList[idx+1]&&nodeList.splice(idx+1,1)}})(nodeList,i,notLiveList),(directives=(directives=collectDirectives(nodeList[i],[],attrs,0===i?maxPriority:void 0,ignoreDirective)).length?applyDirectivesToNode(directives,nodeList[i],attrs,transcludeFn,$rootElement,null,[],[],previousCompileContext):null)&&directives.scope&&compile.$$addScopeClass(attrs.$$element),attrs=directives&&directives.terminal||!(attrs=nodeList[i].childNodes)||!attrs.length?null:compileNodes(attrs,directives?(directives.transcludeOnThisElement||!directives.templateOnThisElement)&&directives.transclude:transcludeFn),(directives||attrs)&&(linkFns.push(i,directives,attrs),linkFnFound=!0,nodeLinkFnFound=nodeLinkFnFound||directives),previousCompileContext=null;return linkFnFound?function(scope,nodeList,$rootElement,parentBoundTranscludeFn){var nodeLinkFn,childLinkFn,node,childScope,i,ii,idx,childBoundTranscludeFn,stableNodeList;if(nodeLinkFnFound){var nodeListLength=nodeList.length;for(stableNodeList=new Array(nodeListLength),i=0;i<linkFns.length;i+=3)stableNodeList[idx=linkFns[i]]=nodeList[idx]}else stableNodeList=nodeList;for(i=0,ii=linkFns.length;i<ii;)node=stableNodeList[linkFns[i++]],nodeLinkFn=linkFns[i++],childLinkFn=linkFns[i++],nodeLinkFn?(nodeLinkFn.scope?(childScope=scope.$new(),compile.$$addScopeInfo(jqLite(node),childScope)):childScope=scope,childBoundTranscludeFn=nodeLinkFn.transcludeOnThisElement?createBoundTranscludeFn(scope,nodeLinkFn.transclude,parentBoundTranscludeFn):!nodeLinkFn.templateOnThisElement&&parentBoundTranscludeFn?parentBoundTranscludeFn:!parentBoundTranscludeFn&&transcludeFn?createBoundTranscludeFn(scope,transcludeFn):null,nodeLinkFn(childLinkFn,childScope,node,$rootElement,childBoundTranscludeFn)):childLinkFn&&childLinkFn(scope,node.childNodes,void 0,parentBoundTranscludeFn)}:null}function createBoundTranscludeFn(scope,transcludeFn,previousBoundTranscludeFn){function boundTranscludeFn(transcludedScope,cloneFn,controllers,futureParentElement,containingScope){return transcludedScope||((transcludedScope=scope.$new(!1,containingScope)).$$transcluded=!0),transcludeFn(transcludedScope,cloneFn,{parentBoundTranscludeFn:previousBoundTranscludeFn,transcludeControllers:controllers,futureParentElement:futureParentElement})}var slotName,boundSlots=boundTranscludeFn.$$slots=createMap();for(slotName in transcludeFn.$$slots)transcludeFn.$$slots[slotName]?boundSlots[slotName]=createBoundTranscludeFn(scope,transcludeFn.$$slots[slotName],previousBoundTranscludeFn):boundSlots[slotName]=null;return boundTranscludeFn}function collectDirectives(node,directives,attrs,maxPriority,ignoreDirective){var match,nodeName,className,nodeType=node.nodeType,attrsMap=attrs.$attr;switch(nodeType){case NODE_TYPE_ELEMENT:addDirective(directives,directiveNormalize(nodeName=nodeName_(node)),"E",maxPriority,ignoreDirective);for(var nName,nAttrs=node.attributes,j=0,jj=nAttrs&&nAttrs.length;j<jj;j++){var isNgAttr,attrStartName=!1,attrEndName=!1,name=(attr=nAttrs[j]).name,attr=attr.value,ngAttrName=directiveNormalize(name),ngAttrName=((isNgAttr=NG_ATTR_BINDING.test(ngAttrName))&&(name=name.replace(PREFIX_REGEXP,"").substr(8).replace(/_(.)/g,function(match,letter){return letter.toUpperCase()})),ngAttrName.match(MULTI_ELEMENT_DIR_RE));ngAttrName&&(name=>{if(hasDirectives.hasOwnProperty(name))for(var directives=$injector.get(name+"Directive"),i=0,ii=directives.length;i<ii;i++)if(directives[i].multiElement)return 1}
1)(ngAttrName[1])&&(attrEndName=(attrStartName=name).substr(0,name.length-5)+"end",name=name.substr(0,name.length-6)),attrsMap[nName=directiveNormalize(name.toLowerCase())]=name,!isNgAttr&&attrs.hasOwnProperty(nName)||(attrs[nName]=attr,getBooleanAttrName(node,nName)&&(attrs[nName]=!0)),((node,directives,value,name,isNgAttr)=>{var trustedContext=((node,attrNormalizedName)=>{if("srcdoc"===attrNormalizedName)return $sce.HTML;if(node=nodeName_(node),"src"===attrNormalizedName||"ngSrc"===attrNormalizedName){if(-1===["img","video","audio","source","track"].indexOf(node))return $sce.RESOURCE_URL}else if("xlinkHref"===attrNormalizedName||"form"===node&&"action"===attrNormalizedName||"link"===node&&"href"===attrNormalizedName)return $sce.RESOURCE_URL})(node,name),mustHaveExpression=!isNgAttr,allOrNothing=ALL_OR_NOTHING_ATTRS[name]||isNgAttr,interpolateFn=$interpolate(value,mustHaveExpression,trustedContext,allOrNothing);if(interpolateFn){if("multiple"===name&&"select"===nodeName_(node))throw $compileMinErr("selmulti","Binding to the 'multiple' attribute is not supported. Element: {0}",startingTag(node));if(EVENT_HANDLER_ATTR_REGEXP.test(name))throw $compileMinErr("nodomevents","Interpolations for HTML DOM event attributes are disallowed. Please use the ng- versions (such as ng-click instead of onclick) instead.");directives.push({priority:100,compile:function(){return{pre:function(scope,element,attr){var $$observers=attr.$$observers||(attr.$$observers=createMap()),newValue=attr[name];newValue!==value&&(interpolateFn=newValue&&$interpolate(newValue,!0,trustedContext,allOrNothing),value=newValue),interpolateFn&&(attr[name]=interpolateFn(scope),($$observers[name]||($$observers[name]=[])).$$inter=!0,(attr.$$observers&&attr.$$observers[name].$$scope||scope).$watch(interpolateFn,function(newValue,oldValue){"class"===name&&newValue!==oldValue?attr.$updateClass(newValue,oldValue):attr.$set(name,newValue)}))}}}})}})(node,directives,attr,nName,isNgAttr),addDirective(directives,nName,"A",maxPriority,ignoreDirective,attrStartName,attrEndName)}if("input"===nodeName&&"hidden"===node.getAttribute("type")&&node.setAttribute("autocomplete","off"),cssClassDirectivesEnabled&&(isString(className=isObject(className=node.className)?className.animVal:className)&&""!==className))for(;match=CLASS_DIRECTIVE_REGEXP.exec(className);)addDirective(directives,nName=directiveNormalize(match[2]),"C",maxPriority,ignoreDirective)&&(attrs[nName]=trim(match[3])),className=className.substr(match.index+match[0].length);break;case NODE_TYPE_TEXT:((directives,text)=>{var interpolateFn=$interpolate(text,!0);interpolateFn&&directives.push({priority:0,compile:function(templateNode){var templateNode=templateNode.parent(),hasCompileParent=!!templateNode.length;return hasCompileParent&&compile.$$addBindingClass(templateNode),function(scope,node){var parent=node.parent();hasCompileParent||compile.$$addBindingClass(parent),compile.$$addBindingInfo(parent,interpolateFn.expressions),scope.$watch(interpolateFn,function(value){node[0].nodeValue=value})}}})})(directives,node.nodeValue);break;case NODE_TYPE_COMMENT:commentDirectivesEnabled&&((node,directives,attrs,maxPriority,ignoreDirective)=>{try{var nName,match=COMMENT_DIRECTIVE_REGEXP.exec(node.nodeValue);match&&(nName=directiveNormalize(match[1]),addDirective(directives,nName,"M",maxPriority,ignoreDirective))&&(attrs[nName]=trim(match[2]))}catch(e){}})(node,directives,attrs,maxPriority,ignoreDirective)}return directives.sort(byPriority),directives}function groupScan(node,attrStart,attrEnd){var nodes=[],depth=0;if(attrStart&&node.hasAttribute&&node.hasAttribute(attrStart)){do{if(!node)throw $compileMinErr("uterdir","Unterminated attribute, found '{0}' but no matching '{1}' found.",attrStart,attrEnd)}while(node.nodeType===NODE_TYPE_ELEMENT&&(node.hasAttribute(attrStart)&&depth++,node.hasAttribute(attrEnd))&&depth--,nodes.push(node),node=node.nextSibling,0<depth)}else nodes.push(node);return jqLite(nodes)}function groupElementsLinkFnWrapper(linkFn,attrStart,attrEnd){return function(scope,element,attrs,controllers,transcludeFn){return element=groupScan(element[0],attrStart,attrEnd),linkFn(scope,element,attrs,controllers,transcludeFn)}}function compilationGenerator(eager,$compileNodes,transcludeFn,maxPriority,ignoreDirective,previousCompileContext){var compiled;return eager?compile($compileNodes,transcludeFn,maxPriority,ignoreDirective,previousCompileContext):function(){return compiled||(compiled=compile($compileNodes,transcludeFn,maxPriority,ignoreDirective,previousCompileContext),$compileNodes=transcludeFn=previousCompileContext=null),compiled.apply(this,arguments)}}function applyDirectivesToNode(directives,compileNode,templateAttrs,transcludeFn,jqCollection,originalReplaceDirective,preLinkFns,postLinkFns,previousCompileContext){previousCompileContext=previousCompileContext||{};for(var directiveName,directiveValue,terminalPriority=-Number.MAX_VALUE,newScopeDirective=previousCompileContext.newScopeDirective,controllerDirectives=previousCompileContext.controllerDirectives,newIsolateScopeDirective=previousCompileContext.newIsolateScopeDirective,templateDirective=previousCompileContext.templateDirective,nonTlbTranscludeDirective=previousCompileContext.nonTlbTranscludeDirective,hasTranscludeDirective=!1,hasTemplate=!1,hasElementTranscludeDirective=previousCompileContext.hasElementTranscludeDirective,$compileNode=templateAttrs.$$element=jqLite(compileNode),replaceDirective=originalReplaceDirective,childTranscludeFn=transcludeFn,didScanForMultipleTransclusion=!1,mightHaveMultipleTransclusionError=!1,i=0,ii=directives.length;i<ii;
1i++){var directive,attrStart=(directive=directives[i]).$$start,attrEnd=directive.$$end;if(attrStart&&($compileNode=groupScan(compileNode,attrStart,attrEnd)),$template=void 0,directive.priority<terminalPriority)break;if((directiveValue=directive.scope)&&(directive.templateUrl||(isObject(directiveValue)?(assertNoDuplicate("new/isolated scope",newIsolateScopeDirective||newScopeDirective,directive,$compileNode),newIsolateScopeDirective=directive):assertNoDuplicate("new/isolated scope",newIsolateScopeDirective,directive,$compileNode)),newScopeDirective=newScopeDirective||directive),directiveName=directive.name,!didScanForMultipleTransclusion&&(directive.replace&&(directive.templateUrl||directive.template)||directive.transclude&&!directive.$$tlb)){for(var candidateDirective,scanningIndex=i+1;candidateDirective=directives[scanningIndex++];)if(candidateDirective.transclude&&!candidateDirective.$$tlb||candidateDirective.replace&&(candidateDirective.templateUrl||candidateDirective.template)){mightHaveMultipleTransclusionError=!0;break}didScanForMultipleTransclusion=!0}if(!directive.templateUrl&&directive.controller&&(controllerDirectives=controllerDirectives||createMap(),assertNoDuplicate("'"+directiveName+"' controller",controllerDirectives[directiveName],directive,$compileNode),controllerDirectives[directiveName]=directive),directiveValue=directive.transclude)if(hasTranscludeDirective=!0,directive.$$tlb||(assertNoDuplicate("transclusion",nonTlbTranscludeDirective,directive,$compileNode),nonTlbTranscludeDirective=directive),"element"===directiveValue)hasElementTranscludeDirective=!0,terminalPriority=directive.priority,$template=$compileNode,$compileNode=templateAttrs.$$element=jqLite(compile.$$createComment(directiveName,templateAttrs[directiveName])),compileNode=$compileNode[0],replaceWith(jqCollection,sliceArgs($template),compileNode),$template[0].$$parentNode=$template[0].parentNode,childTranscludeFn=compilationGenerator(mightHaveMultipleTransclusionError,$template,transcludeFn,terminalPriority,replaceDirective&&replaceDirective.name,{nonTlbTranscludeDirective:nonTlbTranscludeDirective});else{var slots=createMap();if(isObject(directiveValue)){var slotName,$template=[],slotMap=createMap(),filledSlots=createMap();for(slotName in forEach(directiveValue,function(elementSelector,slotName){var optional="?"===elementSelector.charAt(0);elementSelector=optional?elementSelector.substring(1):elementSelector,slotMap[elementSelector]=slotName,slots[slotName]=null,filledSlots[slotName]=optional}),forEach($compileNode.contents(),function(node){var slotName=slotMap[directiveNormalize(nodeName_(node))];(slotName?(filledSlots[slotName]=!0,slots[slotName]=slots[slotName]||[],slots[slotName]):$template).push(node)}),forEach(filledSlots,function(filled,slotName){if(!filled)throw $compileMinErr("reqslot","Required transclusion slot `{0}` was not filled.",slotName)}),slots)slots[slotName]&&(slots[slotName]=compilationGenerator(mightHaveMultipleTransclusionError,slots[slotName],transcludeFn))}else $template=jqLite(jqLiteClone(compileNode)).contents();$compileNode.empty(),(childTranscludeFn=compilationGenerator(mightHaveMultipleTransclusionError,$template,transcludeFn,void 0,void 0,{needsNewScope:directive.$$isolateScope||directive.$$newScope})).$$slots=slots}if(directive.template)if(hasTemplate=!0,assertNoDuplicate("template",templateDirective,directive,$compileNode),directiveValue=isFunction((templateDirective=directive).template)?directive.template($compileNode,templateAttrs):directive.template,directiveValue=denormalizeTemplate(directiveValue),directive.replace){if(replaceDirective=directive,$template=jqLiteIsTextNode(directiveValue)?[]:removeComments(wrapTemplate(directive.templateNamespace,trim(directiveValue))),compileNode=$template[0],1!==$template.length||compileNode.nodeType!==NODE_TYPE_ELEMENT)throw $compileMinErr("tplrt","Template for directive '{0}' must have exactly one root element. {1}",directiveName,"");replaceWith(jqCollection,$compileNode,compileNode);var newTemplateAttrs={$attr:{}},templateDirectives=collectDirectives(compileNode,[],newTemplateAttrs),unprocessedDirectives=directives.splice(i+1,directives.length-(i+1));(newIsolateScopeDirective||newScopeDirective)&&markDirectiveScope(templateDirectives,newIsolateScopeDirective,newScopeDirective),directives=directives.concat(templateDirectives).concat(unprocessedDirectives),mergeTemplateAttributes(templateAttrs,newTemplateAttrs),ii=directives.length}else $compileNode.html(directiveValue);if(directive.templateUrl)hasTemplate=!0,assertNoDuplicate("template",templateDirective,directive,$compileNode),(templateDirective=directive).replace&&(replaceDirective=directive),nodeLinkFn=((directives,$compileNode,tAttrs,$rootElement,childTranscludeFn,preLinkFns,postLinkFns,previousCompileContext)=>{var afterTemplateNodeLinkFn,afterTemplateChildLinkFn,linkQueue=[],beforeTemplateCompileNode=$compileNode[0],origAsyncDirective=directives.shift(),derivedSyncDirective=inherit(origAsyncDirective,{templateUrl:null,transclude:null,replace:null,$$originalDirective:origAsyncDirective}),templateUrl=isFunction(origAsyncDirective.templateUrl)?origAsyncDirective.templateUrl($compileNode,tAttrs):origAsyncDirective.templateUrl,templateNamespace=origAsyncDirective.templateNamespace;return $compileNode.empty(),$templateRequest(templateUrl).then(function(content){var compileNode,$template;if(content=denormalizeTemplate(content),origAsyncDirective.replace){if($template=jqLiteIsTextNode(content)?[]:removeComments(wrapTemplate(templateNamespace,trim(content))),compileNode=$template[0],1!==$template.length||compileNode.nodeType!==NODE_TYPE_ELEMENT)throw $compileMinErr("tplrt","Template for directive '{0}' must have exactly one root element. {1}",origAsyncDirective.name,templateUrl);$template={$attr:{}},replaceWith($rootElement,$compileNode,compileNode);var templateDirectives=collectDirectives(compileNode,[],$template);
1isObject(origAsyncDirective.scope)&&markDirectiveScope(templateDirectives,!0),directives=templateDirectives.concat(directives),mergeTemplateAttributes(tAttrs,$template)}else compileNode=beforeTemplateCompileNode,$compileNode.html(content);for(directives.unshift(derivedSyncDirective),afterTemplateNodeLinkFn=applyDirectivesToNode(directives,compileNode,tAttrs,childTranscludeFn,$compileNode,origAsyncDirective,preLinkFns,postLinkFns,previousCompileContext),forEach($rootElement,function(node,i){node===compileNode&&($rootElement[i]=$compileNode[0])}),afterTemplateChildLinkFn=compileNodes($compileNode[0].childNodes,childTranscludeFn);linkQueue.length;){var oldClasses,scope=linkQueue.shift(),beforeTemplateLinkNode=linkQueue.shift(),linkRootElement=linkQueue.shift(),boundTranscludeFn=linkQueue.shift(),linkNode=$compileNode[0];scope.$$destroyed||(beforeTemplateLinkNode!==beforeTemplateCompileNode&&(oldClasses=beforeTemplateLinkNode.className,previousCompileContext.hasElementTranscludeDirective&&origAsyncDirective.replace||(linkNode=jqLiteClone(compileNode)),replaceWith(linkRootElement,jqLite(beforeTemplateLinkNode),linkNode),safeAddClass(jqLite(linkNode),oldClasses)),linkRootElement=afterTemplateNodeLinkFn.transcludeOnThisElement?createBoundTranscludeFn(scope,afterTemplateNodeLinkFn.transclude,boundTranscludeFn):boundTranscludeFn,afterTemplateNodeLinkFn(afterTemplateChildLinkFn,scope,linkNode,$rootElement,linkRootElement))}linkQueue=null}).catch(function(error){error instanceof Error&&$exceptionHandler(error)}),function(ignoreChildLinkFn,scope,node,rootElement,boundTranscludeFn){var childBoundTranscludeFn=boundTranscludeFn;scope.$$destroyed||(linkQueue?linkQueue.push(scope,node,rootElement,childBoundTranscludeFn):(afterTemplateNodeLinkFn.transcludeOnThisElement&&(childBoundTranscludeFn=createBoundTranscludeFn(scope,afterTemplateNodeLinkFn.transclude,boundTranscludeFn)),afterTemplateNodeLinkFn(afterTemplateChildLinkFn,scope,node,rootElement,childBoundTranscludeFn)))}})(directives.splice(i,directives.length-i),$compileNode,templateAttrs,jqCollection,hasTranscludeDirective&&childTranscludeFn,preLinkFns,postLinkFns,{controllerDirectives:controllerDirectives,newScopeDirective:newScopeDirective!==directive&&newScopeDirective,newIsolateScopeDirective:newIsolateScopeDirective,templateDirective:templateDirective,nonTlbTranscludeDirective:nonTlbTranscludeDirective}),ii=directives.length;else if(directive.compile)try{var linkFn=directive.compile($compileNode,templateAttrs,childTranscludeFn),context=directive.$$originalDirective||directive;isFunction(linkFn)?addLinkFns(null,bind(context,linkFn),attrStart,attrEnd):linkFn&&addLinkFns(bind(context,linkFn.pre),bind(context,linkFn.post),attrStart,attrEnd)}catch(e){$exceptionHandler(e,startingTag($compileNode))}directive.terminal&&(nodeLinkFn.terminal=!0,terminalPriority=Math.max(terminalPriority,directive.priority))}return nodeLinkFn.scope=newScopeDirective&&!0===newScopeDirective.scope,nodeLinkFn.transcludeOnThisElement=hasTranscludeDirective,nodeLinkFn.templateOnThisElement=hasTemplate,nodeLinkFn.transclude=childTranscludeFn,previousCompileContext.hasElementTranscludeDirective=hasElementTranscludeDirective,nodeLinkFn;function addLinkFns(pre,post,attrStart,attrEnd){pre&&((pre=attrStart?groupElementsLinkFnWrapper(pre,attrStart,attrEnd):pre).require=directive.require,pre.directiveName=directiveName,newIsolateScopeDirective!==directive&&!directive.$$isolateScope||(pre=cloneAndAnnotateFn(pre,{isolateScope:!0})),preLinkFns.push(pre)),post&&((post=attrStart?groupElementsLinkFnWrapper(post,attrStart,attrEnd):post).require=directive.require,post.directiveName=directiveName,newIsolateScopeDirective!==directive&&!directive.$$isolateScope||(post=cloneAndAnnotateFn(post,{isolateScope:!0})),postLinkFns.push(post))}function nodeLinkFn(childLinkFn,scope,linkNode,$rootElement,boundTranscludeFn){var i,ii,linkFn,isolateScope,controllerScope,elementControllers,transcludeFn,$element,attrs,scopeBindingInfo,name;for(name in compileNode===linkNode?$element=(attrs=templateAttrs).$$element:attrs=new Attributes($element=jqLite(linkNode),templateAttrs),controllerScope=scope,newIsolateScopeDirective?isolateScope=scope.$new(!0):newScopeDirective&&(controllerScope=scope.$parent),boundTranscludeFn&&((transcludeFn=function(scope,cloneAttachFn,futureParentElement,slotName){var transcludeControllers;isScope(scope)||(slotName=futureParentElement,futureParentElement=cloneAttachFn,cloneAttachFn=scope,scope=void 0);hasElementTranscludeDirective&&(transcludeControllers=elementControllers);futureParentElement=futureParentElement||(hasElementTranscludeDirective?$element.parent():$element);{if(!slotName)return boundTranscludeFn(scope,cloneAttachFn,transcludeControllers,futureParentElement,scopeToChild);var slotTranscludeFn=boundTranscludeFn.$$slots[slotName];if(slotTranscludeFn)return slotTranscludeFn(scope,cloneAttachFn,transcludeControllers,futureParentElement,scopeToChild);if(void 0===slotTranscludeFn)throw $compileMinErr("noslot",'No parent directive that requires a transclusion with slot name "{0}". Element: {1}',slotName,startingTag($element))}}
1).$$boundTransclude=boundTranscludeFn,transcludeFn.isSlotFilled=function(slotName){return!!boundTranscludeFn.$$slots[slotName]}),controllerDirectives&&(elementControllers=(($element,attrs,transcludeFn,controllerDirectives,isolateScope,scope,newIsolateScopeDirective)=>{var controllerKey,elementControllers=createMap();for(controllerKey in controllerDirectives){var directive=controllerDirectives[controllerKey],locals={$scope:directive===newIsolateScopeDirective||directive.$$isolateScope?isolateScope:scope,$element:$element,$attrs:attrs,$transclude:transcludeFn},controller=directive.controller,controller=("@"===controller&&(controller=attrs[directive.name]),$controller(controller,locals,!0,directive.controllerAs));elementControllers[directive.name]=controller,$element.data("$"+directive.name+"Controller",controller.instance)}return elementControllers})($element,attrs,transcludeFn,controllerDirectives,isolateScope,scope,newIsolateScopeDirective)),newIsolateScopeDirective&&(compile.$$addScopeInfo($element,isolateScope,!0,!(templateDirective&&(templateDirective===newIsolateScopeDirective||templateDirective===newIsolateScopeDirective.$$originalDirective))),compile.$$addScopeClass($element,!0),isolateScope.$$isolateBindings=newIsolateScopeDirective.$$isolateBindings,(scopeBindingInfo=initializeDirectiveBindings(scope,attrs,isolateScope,isolateScope.$$isolateBindings,newIsolateScopeDirective)).removeWatches)&&isolateScope.$on("$destroy",scopeBindingInfo.removeWatches),elementControllers){var controllerResult,controllerDirective=controllerDirectives[name],controller=elementControllers[name],bindings=controllerDirective.$$bindings.bindToController;preAssignBindingsEnabled?(controller.bindingInfo=bindings?initializeDirectiveBindings(controllerScope,attrs,controller.instance,bindings,controllerDirective):{},(controllerResult=controller())!==controller.instance&&(controller.instance=controllerResult,$element.data("$"+controllerDirective.name+"Controller",controllerResult),controller.bindingInfo.removeWatches&&controller.bindingInfo.removeWatches(),controller.bindingInfo=initializeDirectiveBindings(controllerScope,attrs,controller.instance,bindings,controllerDirective))):(controller.instance=controller(),$element.data("$"+controllerDirective.name+"Controller",controller.instance),controller.bindingInfo=initializeDirectiveBindings(controllerScope,attrs,controller.instance,bindings,controllerDirective))}for(forEach(controllerDirectives,function(controllerDirective,name){var require=controllerDirective.require;controllerDirective.bindToController&&!isArray(require)&&isObject(require)&&extend(elementControllers[name].instance,getControllers(name,require,$element,elementControllers))}),forEach(elementControllers,function(controller){var controllerInstance=controller.instance;if(isFunction(controllerInstance.$onChanges))try{controllerInstance.$onChanges(controller.bindingInfo.initialChanges)}catch(e){$exceptionHandler(e)}if(isFunction(controllerInstance.$onInit))try{controllerInstance.$onInit()}catch(e){$exceptionHandler(e)}isFunction(controllerInstance.$doCheck)&&(controllerScope.$watch(function(){controllerInstance.$doCheck()}),controllerInstance.$doCheck()),isFunction(controllerInstance.$onDestroy)&&controllerScope.$on("$destroy",function(){controllerInstance.$onDestroy()})}),i=0,ii=preLinkFns.length;i<ii;i++)invokeLinkFn(linkFn=preLinkFns[i],linkFn.isolateScope?isolateScope:scope,$element,attrs,linkFn.require&&getControllers(linkFn.directiveName,linkFn.require,$element,elementControllers),transcludeFn);var scopeToChild=scope;for(newIsolateScopeDirective&&(newIsolateScopeDirective.template||null===newIsolateScopeDirective.templateUrl)&&(scopeToChild=isolateScope),childLinkFn&&childLinkFn(scopeToChild,linkNode.childNodes,void 0,boundTranscludeFn),i=postLinkFns.length-1;0<=i;i--)invokeLinkFn(linkFn=postLinkFns[i],linkFn.isolateScope?isolateScope:scope,$element,attrs,linkFn.require&&getControllers(linkFn.directiveName,linkFn.require,$element,elementControllers),transcludeFn);forEach(elementControllers,function(controller){controller=controller.instance;isFunction(controller.$postLink)&&controller.$postLink()})}}function getControllers(directiveName,require,$element,elementControllers){if(isString(require)){var dataName,value,match=require.match(REQUIRE_PREFIX_REGEXP),name=require.substring(match[0].length),inheritType=match[1]||match[3],match="?"===match[2];
1if("^^"===inheritType?$element=$element.parent():value=(value=elementControllers&&elementControllers[name])&&value.instance,value||(dataName="$"+name+"Controller",value=inheritType?$element.inheritedData(dataName):$element.data(dataName)),!value&&!match)throw $compileMinErr("ctreq","Controller '{0}', required by directive '{1}', can't be found!",name,directiveName)}else if(isArray(require)){value=[];for(var i=0,ii=require.length;i<ii;i++)value[i]=getControllers(directiveName,require[i],$element,elementControllers)}else isObject(require)&&(value={},forEach(require,function(controller,property){value[property]=getControllers(directiveName,controller,$element,elementControllers)}));return value||null}function markDirectiveScope(directives,isolateScope,newScope){for(var j=0,jj=directives.length;j<jj;j++)directives[j]=inherit(directives[j],{$$isolateScope:isolateScope,$$newScope:newScope})}function addDirective(tDirectives,name,location,maxPriority,ignoreDirective,startAttrName,endAttrName){if(name!==ignoreDirective){var match=null;if(hasDirectives.hasOwnProperty(name))for(var directives=$injector.get(name+"Directive"),i=0,ii=directives.length;i<ii;i++){var bindings,directive=directives[i];(void 0===maxPriority||maxPriority>directive.priority)&&-1!==directive.restrict.indexOf(location)&&((directive=startAttrName?inherit(directive,{$$start:startAttrName,$$end:endAttrName}):directive).$$bindings||(bindings=directive.$$bindings=((directive,directiveName)=>{var bindings={isolateScope:null,bindToController:null};if(isObject(directive.scope)&&(!0===directive.bindToController?(bindings.bindToController=parseIsolateBindings(directive.scope,directiveName,!0),bindings.isolateScope={}):bindings.isolateScope=parseIsolateBindings(directive.scope,directiveName,!1)),isObject(directive.bindToController)&&(bindings.bindToController=parseIsolateBindings(directive.bindToController,directiveName,!0)),bindings.bindToController&&!directive.controller)throw $compileMinErr("noctrl","Cannot bind to controller without directive '{0}'s controller.",directiveName);return bindings})(directive,directive.name),isObject(bindings.isolateScope)&&(directive.$$isolateBindings=bindings.isolateScope)),tDirectives.push(directive),match=directive)}return match}}function mergeTemplateAttributes(dst,src){var srcAttr=src.$attr,dstAttr=dst.$attr;forEach(dst,function(value,key){"$"!==key.charAt(0)&&(src[key]&&src[key]!==value&&(value.length?value+=("style"===key?";":" ")+src[key]:value=src[key]),dst.$set(key,value,!0,srcAttr[key]))}),forEach(src,function(value,key){dst.hasOwnProperty(key)||"$"===key.charAt(0)||(dst[key]=value,"class"!==key&&"style"!==key&&(dstAttr[key]=srcAttr[key]))})}function byPriority(a,b){var diff=b.priority-a.priority;return 0!=diff?diff:a.name!==b.name?a.name<b.name?-1:1:a.index-b.index}function assertNoDuplicate(what,previousDirective,directive,element){function wrapModuleNameIfDefined(moduleName){return moduleName?" (module: "+moduleName+")":""}if(previousDirective)throw $compileMinErr("multidir","Multiple directives [{0}{1}, {2}{3}] asking for {4} on: {5}",previousDirective.name,wrapModuleNameIfDefined(previousDirective.$$moduleName),directive.name,wrapModuleNameIfDefined(directive.$$moduleName),what,startingTag(element))}function wrapTemplate(type,template){switch(type=lowercase(type||"html")){case"svg":case"math":var wrapper=window.document.createElement("div");return wrapper.innerHTML="<"+type+">"+template+"</"+type+">",wrapper.childNodes[0].childNodes;default:return template}}function replaceWith($rootElement,elementsToRemove,newNode){var ii,firstElementToRemove=elementsToRemove[0],removeCount=elementsToRemove.length,parent=firstElementToRemove.parentNode;if($rootElement)for(i=0,ii=$rootElement.length;i<ii;i++)if($rootElement[i]===firstElementToRemove){$rootElement[i++]=newNode;for(var j=i,j2=j+removeCount-1,jj=$rootElement.length;j<jj;j++,j2++)j2<jj?$rootElement[j]=$rootElement[j2]:delete $rootElement[j];$rootElement.length-=removeCount-1,$rootElement.context===firstElementToRemove&&($rootElement.context=newNode);break}parent&&parent.replaceChild(newNode,firstElementToRemove);for(var fragment=window.document.createDocumentFragment(),i=0;i<removeCount;i++)fragment.appendChild(elementsToRemove[i]);for(jqLite.hasData(firstElementToRemove)&&(jqLite.data(newNode,jqLite.data(firstElementToRemove)),jqLite(firstElementToRemove).off("$destroy")),jqLite.cleanData(fragment.querySelectorAll("*")),i=1;i<removeCount;i++)delete elementsToRemove[i];elementsToRemove[0]=newNode,elementsToRemove.length=1}function cloneAndAnnotateFn(fn,annotation){return extend(function(){return fn.apply(null,arguments)},fn,annotation)}function invokeLinkFn(linkFn,scope,$element,attrs,controllers,transcludeFn){try{linkFn(scope,$element,attrs,controllers,transcludeFn)}catch(e){$exceptionHandler(e,startingTag($element))}}function initializeDirectiveBindings(scope,attrs,destination,bindings,directive){var changes,removeWatchCollection=[],initialChanges={};function recordChanges(key,currentValue,previousValue){!isFunction(destination.$onCh
1anges)||currentValue===previousValue||currentValue!=currentValue&&previousValue!=previousValue||(onChangesQueue||(scope.$$postDigest(flushOnChangesQueue),onChangesQueue=[]),changes||(changes={},onChangesQueue.push(triggerOnChangesHook)),changes[key]&&(previousValue=changes[key].previousValue),changes[key]=new SimpleChange(previousValue,currentValue))}function triggerOnChangesHook(){destination.$onChanges(changes),changes=void 0}return forEach(bindings,function(definition,scopeName){var removeWatch,parentGet,compare,parentSet,lastValue,parentValueWatch,deepWatch,initialValue,attrName=definition.attrName,optional=definition.optional;switch(definition.mode){case"@":optional||hasOwnProperty.call(attrs,attrName)||(destination[scopeName]=attrs[attrName]=void 0),removeWatch=attrs.$observe(attrName,function(value){var oldValue;(isString(value)||isBoolean(value))&&(oldValue=destination[scopeName],recordChanges(scopeName,value,oldValue),destination[scopeName]=value)}),attrs.$$observers[attrName].$$scope=scope,isString(lastValue=attrs[attrName])?destination[scopeName]=$interpolate(lastValue)(scope):isBoolean(lastValue)&&(destination[scopeName]=lastValue),initialChanges[scopeName]=new SimpleChange(_UNINITIALIZED_VALUE,destination[scopeName]),removeWatchCollection.push(removeWatch);break;case"=":if(!hasOwnProperty.call(attrs,attrName)){if(optional)break;attrs[attrName]=void 0}optional&&!attrs[attrName]||(compare=(parentGet=$parse(attrs[attrName])).literal?equals:function(a,b){return a===b||a!=a&&b!=b},parentSet=parentGet.assign||function(){throw lastValue=destination[scopeName]=parentGet(scope),$compileMinErr("nonassign","Expression '{0}' in attribute '{1}' used with directive '{2}' is non-assignable!",attrs[attrName],attrName,directive.name)},lastValue=destination[scopeName]=parentGet(scope),(parentValueWatch=function(parentValue){return compare(parentValue,destination[scopeName])||(compare(parentValue,lastValue)?parentSet(scope,parentValue=destination[scopeName]):destination[scopeName]=parentValue),lastValue=parentValue}).$stateful=!0,removeWatch=definition.collection?scope.$watchCollection(attrs[attrName],parentValueWatch):scope.$watch($parse(attrs[attrName],parentValueWatch),null,parentGet.literal),removeWatchCollection.push(removeWatch));break;case"<":if(!hasOwnProperty.call(attrs,attrName)){if(optional)break;attrs[attrName]=void 0}optional&&!attrs[attrName]||(deepWatch=(parentGet=$parse(attrs[attrName])).literal,initialValue=destination[scopeName]=parentGet(scope),initialChanges[scopeName]=new SimpleChange(_UNINITIALIZED_VALUE,destination[scopeName]),removeWatch=scope.$watch(parentGet,function(newValue,oldValue){if(oldValue===newValue){if(oldValue===initialValue||deepWatch&&equals(oldValue,initialValue))return;oldValue=initialValue}recordChanges(scopeName,newValue,oldValue),destination[scopeName]=newValue},deepWatch),removeWatchCollection.push(removeWatch));break;case"&":(parentGet=attrs.hasOwnProperty(attrName)?$parse(attrs[attrName]):noop)===noop&&optional||(destination[scopeName]=function(locals){return parentGet(scope,locals)})}}),{initialChanges:initialChanges,removeWatches:removeWatchCollection.length&&function(){for(var i=0,ii=removeWatchCollection.length;i<ii;++i)removeWatchCollection[i]()}}}}]}function SimpleChange(previous,current){this.previousValue=previous,this.currentValue=current}$CompileProvider.$inject=["$provide","$$sanitizeUriProvider"],SimpleChange.prototype.isFirstChange=function(){return this.previousValue===_UNINITIALIZED_VALUE};var PREFIX_REGEXP=/^((?:x|data)[:\-_])/i,SPECIAL_CHARS_REGEXP=/[:\-_]+(.)/g;function directiveNormalize(name){return name.replace(PREFIX_REGEXP,"").replace(SPECIAL_CHARS_REGEXP,fnCamelCaseReplace)}function tokenDifference(str1,str2){var values="",tokens1=str1.split(/\s+/),tokens2=str2.split(/\s+/);outer:for(var i=0;i<tokens1.length;i++){for(var token=tokens1[i],j=0;j<tokens2.length;j++)if(token===tokens2[j])continue outer;values+=(0<values.length?" ":"")+token}return values}function removeComments(jqNodes){var i=(jqNodes=jqLite(jqNodes)).length;if(!(i<=1))for(;i--;){var node=jqNodes[i];(node.nodeType===NODE_TYPE_COMMENT||node.nodeType===NODE_TYPE_TEXT&&""===node.nodeValue.trim())&&splice.call(jqNodes,i,1)}return jqNodes}var $controllerMinErr=minErr("$controller"),CNTRL_REG=/^(\S+)(\s+as\s+([\w$]+))?$/;function $ControllerProvider(){var controllers={},globals=!1;this.has=function(name){return controllers.hasOwnProperty(name)},this.register=function(name,constructor){assertNotHasOwnProperty(name,"controller"),isObject(name)?extend(controllers,name):controllers[name]=constructor},this.allowGlobals=function(){globals=!0},this.$get=["$injector","$window",function($injector,$window){return function(expression,locals,later,ident){var constructor,identifier,instance;if(later=!0===later,ident&&isString(ident)&&(identifier=ident),isString(expression)){if(!(ident=expression.match(CNTRL_REG)))throw $controllerMinErr("ctrlfmt","Badly formed controller string '{0}'. Must match `__name__ as __id__` or `__name__`.",expression);if(constructor=ident[1],identifier=identifier||ident[3],!(expression=controllers.hasOwnProperty(constructor)?controllers[constructor]:getter(locals.$scope,constructor,!0)||(globals?getter($window,constructor,!0):void 0)))throw $controllerMinErr("ctrlreg","The controller with the name '{0}' is not registered.",constructor);assertArgFn(expression,constructor,!0)}return later?(ident=(isArray(expression)?expression[expression.length-1]:expression).prototype,instance=Object.create(ident||null),identifier&&addIdentifier(locals,identifier,instance,constructor||expression.name),extend(function(){var result=$injector.invoke(expression,instance,locals,constructor);return result!==instance&&(isObject(result)||isFunction(result))&&(instance=result,identifier)&&addIdentifier(locals,identifier,instance,constructor||expression.name),instance},{instance:instance,identifier:identifier})):(instance=$injector.instantiate(expression,locals,constructor),identifier&&addIdentifier(locals,identifier,instance,constructor||expression.name),instance)};function addIdentifier(locals,identifier,instance,name){if(!locals||!isObject(locals.$scope))throw minErr("$controller")("noscp","Cannot export controller '{0}' as '{1}'! No $scope object provided via `locals`.",name,identifier);locals.$scope[identifier]=instance}}]}function $DocumentProvider(){this.$get=["$window",function(window){return jqLite(window.document)}]}function $$IsDocumentHiddenProvider(){this.$get=["$document","$rootScope",function($document,$rootScope){var doc=$document[0],hidden=doc&&doc.hidden;function changeListener(){hidden=doc.hidden}return $document.on("visibilitychange",changeListener),$rootScope.$on("$destroy",function(){$document.off("visibilitychange",changeListener)}),function(){return hidden}}]}function $ExceptionHandlerProvider(){this.$get=["$log",function($log){return function(exception,cause){$log.error.apply($log,arguments)}}]}function $$ForceReflowProvider(){this.$get=["$document",function($document){return function(domNode){return domNode?!domNode.nodeType&&domNode instanceof jqLite&&(domNode=domNode[0]):domNode=$document[0].body,domNode.offsetWidth+1}}]}var APPLICATION_JSON="application/json",CONTENT_TYPE_APPLICATION_JSON={"Content-Type":APPLICATION_JSON+";charset=utf-8"},JSON_START=/^\[|^\{(?!\{)/,JSON_ENDS={"[":/]$/,"{":/}$/},JSON_PROTECTION_PREFIX=/^\)]\}',?\n/,$httpMinErr=minErr("$http");function serializeValue(v){return isObject(v)?isDate(v)?v.toISOString():toJson(v):v}function $HttpParamSerializerProvider(){this.$get=function(){return function(params){var parts;return params?(parts=[],forEachSorted(params,function(value,key){null!=value&&(isArray(value)?forEach(value,function(v){parts.push(encodeUriQuery(key)+"="+encodeUriQuery(serializeValue(v)))}):parts.push(encodeUriQuery(key)+"="+encodeUriQuery(serializeValue(value))))}),parts.join("&")):""}}}function $HttpParamSerializerJQLikeProvider(){this.$get=function(){return function(params){var parts;return params?(parts=[],function serialize(toSerialize,prefix,topLevel){if(null==toSerialize)return;isArray(toSerialize)?forEach(toSerialize,function(value,index){serialize(value,prefix+"["+(isObject(value)?index:"")+"]")}):isObject(toSerialize)&&!isDate(toSerialize)?forEachSorted(toSerialize,function(value,key){serialize(value,prefix+(topLevel?"":"[")+key+(topLevel?"":"]"))}):parts.push(encodeUriQuery(prefix)+"="+encodeUriQuery(serializeValue(toSerialize)))}(params,"",!0),parts.join("&")):""}}}function defaultHttpResponseTransform(data,headers){var tempData,jsonStart;return data=isString(data)&&(tempData=data.replace(JSON_PROTECTION_PREFIX,"").trim())&&((headers=headers("Content-Type"))&&0===headers.indexOf(APPLICATION_JSON)||(jsonStart=(headers=tempData).match(JSON_START))&&JSON_ENDS[jsonStart[0]].test(headers))?fromJson(tempData):data}function parseHeaders(headers){var i,parsed=createMap();
1function fillInParsed(key,val){key&&(parsed[key]=parsed[key]?parsed[key]+", "+val:val)}return isString(headers)?forEach(headers.split("\n"),function(line){i=line.indexOf(":"),fillInParsed(lowercase(trim(line.substr(0,i))),trim(line.substr(i+1)))}):isObject(headers)&&forEach(headers,function(headerVal,headerKey){fillInParsed(lowercase(headerKey),trim(headerVal))}),parsed}function headersGetter(headers){var headersObj;return function(name){return headersObj=headersObj||parseHeaders(headers),name?void 0===(name=headersObj[lowercase(name)])?null:name:headersObj}}function transformData(data,headers,status,fns){return isFunction(fns)?fns(data,headers,status):(forEach(fns,function(fn){data=fn(data,headers,status)}),data)}function isSuccess(status){return 200<=status&&status<300}function $HttpProvider(){var defaults=this.defaults={transformResponse:[defaultHttpResponseTransform],transformRequest:[function(d){return!isObject(d)||"[object File]"===toString.call(d)||(obj=>"[object Blob]"===toString.call(obj))(d)||(obj=>"[object FormData]"===toString.call(obj))(d)?d:toJson(d)}],headers:{common:{Accept:"application/json, text/plain, */*"},post:shallowCopy(CONTENT_TYPE_APPLICATION_JSON),put:shallowCopy(CONTENT_TYPE_APPLICATION_JSON),patch:shallowCopy(CONTENT_TYPE_APPLICATION_JSON)},xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",paramSerializer:"$httpParamSerializer",jsonpCallbackParam:"callback"},useApplyAsync=!1,interceptorFactories=(this.useApplyAsync=function(value){return void 0!==value?(useApplyAsync=!!value,this):useApplyAsync},this.interceptors=[]);this.$get=["$browser","$httpBackend","$$cookieReader","$cacheFactory","$rootScope","$q","$injector","$sce",function($browser,$httpBackend,$$cookieReader,$cacheFactory,$rootScope,$q,$injector,$sce){var defaultCache=$cacheFactory("$http"),reversedInterceptors=(defaults.paramSerializer=isString(defaults.paramSerializer)?$injector.get(defaults.paramSerializer):defaults.paramSerializer,[]);function $http(requestConfig){if(!isObject(requestConfig))throw minErr("$http")("badreq","Http request configuration must be an object. Received: {0}",requestConfig);var config,requestInterceptors,responseInterceptors,promise;if(isString($sce.valueOf(requestConfig.url)))return(config=extend({method:"get",transformRequest:defaults.transformRequest,transformResponse:defaults.transformResponse,paramSerializer:defaults.paramSerializer,jsonpCallbackParam:defaults.jsonpCallbackParam},requestConfig)).headers=(config=>{var defHeaderName,lowercaseDefHeaderName,reqHeaderName,defHeaders=defaults.headers,reqHeaders=extend({},config.headers);defaultHeadersIteration:for(defHeaderName in defHeaders=extend({},defHeaders.common,defHeaders[lowercase(config.method)])){for(reqHeaderName in lowercaseDefHeaderName=lowercase(defHeaderName),reqHeaders)if(lowercase(reqHeaderName)===lowercaseDefHeaderName)continue defaultHeadersIteration;reqHeaders[defHeaderName]=defHeaders[defHeaderName]}return((headers,config)=>{var headerContent,processedHeaders={};return forEach(headers,function(headerFn,header){isFunction(headerFn)?null!=(headerContent=headerFn(config))&&(processedHeaders[header]=headerContent):processedHeaders[header]=headerFn}),processedHeaders})(reqHeaders,shallowCopy(config))})(requestConfig),config.method=uppercase(config.method),config.paramSerializer=isString(config.paramSerializer)?$injector.get(config.paramSerializer):config.paramSerializer,$browser.$$incOutstandingRequestCount(),requestInterceptors=[],responseInterceptors=[],promise=$q.resolve(config),forEach(reversedInterceptors,function(interceptor){(interceptor.request||interceptor.requestError)&&requestInterceptors.unshift(interceptor.request,interceptor.requestError),(interceptor.response||interceptor.responseError)&&responseInterceptors.push(interceptor.response,interceptor.responseError)}),promise=chainInterceptors(promise,requestInterceptors),(promise=chainInterceptors(promise=promise.then(function(config){var headers=config.headers,reqData=transformData(config.data,headersGetter(headers),void 0,config.transformRequest);void 0===reqData&&forEach(headers,function(value,header){"content-type"===lowercase(header)&&delete headers[header]});void 0===config.withCredentials&&void 0!==defaults.withCredentials&&(config.withCredentials=defaults.withCredentials);return((config,reqData)=>{var cache,cachedResp,deferred=$q.defer(),promise=deferred.promise,reqHeaders=config.headers,isJsonp="jsonp"===lowercase(config.method),url=config.url;return isJsonp?url=$sce.getTrustedResourceUrl(url):isString(url)||(url=$sce.valueOf(url)),url=((url,serializedParams)=>(0<serializedParams.length&&(url+=(-1===url.indexOf("?")?"?":"&")+serializedParams),url))(url,config.paramSerializer(config.params)),isJsonp&&(url=((url,key)=>{if(/[&?][^=]+=JSON_CALLBACK/.test(url))throw $httpMinErr("badjsonp",'Illegal use of JSON_CALLBACK in url, "{0}"',url);if(new RegExp("[&?]"+key+"=").test(url))throw $httpMinErr("badjsonp",'Illegal use of callback param, "{0}", in url, "{1}"',key,url);return url+=(-1===url.indexOf("?")?"?":"&")+key+"=JSON_CALLBACK"})(url,config.jsonpCallbackParam)),$http.pendingRequests.push(config),promise.then(removePendingReq,removePendingReq),(cache=!config.cache&&!defaults.cache||!1===config.cache||"GET"!==config.method&&"JSONP"!==config.method?cache:isObject(config.cache)?config.cache:isObject(defaults.cache)?defaults.cache:defaultCache)&&(void 0!==(cachedResp=cache.get(url))?isPromiseLike(cachedResp)?cachedResp.then(resolvePromiseWithResult,resolvePromiseWithResult):isArray(cachedResp)?resolvePromise(cachedResp[1],cachedResp[0],shallowCopy(cachedResp[2]),cachedResp[3]):resolvePromise(cachedResp,200,{},"OK"):cache.put(url,promise)),void 0===cachedResp&&((isJsonp=urlIsSameOrigin(config.url)?$$cookieReader()[config.xsrfCookieName||defaults.xsrfCookieName]:void 0)&&(reqHeaders[config.xsrfHeaderName||defaults.xsrfHeaderName]=isJsonp),$httpBackend(config.method,url,reqData,function(status,response,headersString,statusText){cache&&(isSuccess(status)?cache.put(url,[status,response,parseHeaders(headersString),statusText]):cache.remove(url));function resolveHttpPromise(){resolvePromise(response,status,headersString,statusText)}useApplyAsync?$rootScope.$applyAsync(resolveHttpPromise):(resolveHttpPromise(),$rootScope.$$phase||$rootScope.$apply())},reqHeaders,config.timeout,config.withCredentials,config.responseType,createApplyHandlers(config.eventHandlers),createApplyHandlers(config.uploadEventHandlers))),promise;function createApplyHandlers(eventHandlers){var applyHandlers;if(eventHandlers)return applyHandlers={},forEach(eventHandlers,function(eventHandler,key){applyHandlers[key]=function(event){function callEventHandler(){eventHandler(event)}useApplyAsync?$rootScope.$applyAsync(callEventHandler):$rootScope.$$phase?callEventHandler():$rootScope.$apply(callEventHandler)}}),applyHandlers}function resolvePromise(response,status,headers,statusText){(isSuccess(status=-1<=status?status:0)?deferred.resolve:deferred.reject)({data:response,status:status,headers:headersGetter(headers),config:config,statusText:statusText})}function resolvePromiseWithResult(result){resolvePromise(result.data,result.status,shallowCopy(result.headers()),result.statusText)}function removePendingReq(){var idx=$http.pendingRequests.indexOf(config);-1!==idx&&$http.pendingRequests.splice(idx,1)}})(config,reqData).then(transformResponse,transformResponse)}),responseInterceptors)).finally(function(){$browser.$$completeOutstandingRequest(noop)});throw minErr("$http")("badreq","Http request configuration url must be a string or a $sce trusted object. Received: {0}",requestConfig.url);function chainInterceptors(promise,interceptors){for(var i=0,ii=interceptors.length;i<ii;){var thenFn=interceptors[i++],rejectFn=interceptors[i++];promise=promise.then(thenFn,rejectFn)}return interceptors.length=0,promise}function transformResponse(response){var resp=extend({},response);return resp.data=transformData(response.data,response.headers,response.status,config.transformResponse),isSuccess(response.status)?resp:$q.reject(resp)}}return forEach(interceptorFactories,function(interceptorFactory){reversedInterceptors.unshift(isString(interceptorFactory)?$injector.get(interceptorFactory):$injector.invoke(interceptorFactory)
1)}),$http.pendingRequests=[],function(){forEach(arguments,function(name){$http[name]=function(url,config){return $http(extend({},config||{},{method:name,url:url}))}})}("get","delete","head","jsonp"),function(){forEach(arguments,function(name){$http[name]=function(url,data,config){return $http(extend({},config||{},{method:name,url:url,data:data}))}})}("post","put","patch"),$http.defaults=defaults,$http}]}function $xhrFactoryProvider(){this.$get=function(){return function(){return new window.XMLHttpRequest}}}function $HttpBackendProvider(){this.$get=["$browser","$jsonpCallbacks","$document","$xhrFactory",function($browser,$jsonpCallbacks,$document,$xhrFactory){return(($browser,createXhr,$browserDefer,callbacks,rawDocument)=>function(method,url,post,callback,headers,timeout,withCredentials,responseType,eventHandlers,uploadEventHandlers){if(url=url||$browser.url(),"jsonp"===lowercase(method))var callbackPath=callbacks.createCallback(url),jsonpDone=((url,callbackPath,done)=>{url=url.replace("JSON_CALLBACK",callbackPath);var script=rawDocument.createElement("script"),callback=null;return script.type="text/javascript",script.src=url,script.async=!0,callback=function(event){script.removeEventListener("load",callback),script.removeEventListener("error",callback),rawDocument.body.removeChild(script),script=null;var status=-1,text="unknown";event&&(text=(event="load"!==event.type||callbacks.wasCalled(callbackPath)?event:{type:"error"}).type,status="error"===event.type?404:200),done&&done(status,text)},script.addEventListener("load",callback),script.addEventListener("error",callback),rawDocument.body.appendChild(script),callback})(url,callbackPath,function(status,text){var response=200===status&&callbacks.getResponse(callbackPath);completeRequest(callback,status,response,"",text),callbacks.removeCallback(callbackPath)});else{var xhr=createXhr(method,url),method=(xhr.open(method,url,!0),forEach(headers,function(value,key){void 0!==value&&xhr.setRequestHeader(key,value)}
1),xhr.onload=function(){var statusText=xhr.statusText||"",response="response"in xhr?xhr.response:xhr.responseText,status=1223===xhr.status?204:xhr.status;0===status&&(status=response?200:"file"===urlResolve(url).protocol?404:0),completeRequest(callback,status,response,xhr.getAllResponseHeaders(),statusText)},function(){completeRequest(callback,-1,null,null,"")});if(xhr.onerror=method,xhr.onabort=method,xhr.ontimeout=method,forEach(eventHandlers,function(value,key){xhr.addEventListener(key,value)}),forEach(uploadEventHandlers,function(value,key){xhr.upload.addEventListener(key,value)}),withCredentials&&(xhr.withCredentials=!0),responseType)try{xhr.responseType=responseType}catch(e){if("json"!==responseType)throw e}xhr.send(void 0===post?null:post)}var timeoutId;function timeoutRequest(){jsonpDone&&jsonpDone(),xhr&&xhr.abort()}function completeRequest(callback,status,response,headersString,statusText){void 0!==timeoutId&&$browserDefer.cancel(timeoutId),jsonpDone=xhr=null,callback(status,response,headersString,statusText)}0<timeout?timeoutId=$browserDefer(timeoutRequest,timeout):isPromiseLike(timeout)&&timeout.then(timeoutRequest)})($browser,$xhrFactory,$browser.defer,$jsonpCallbacks,$document[0])}]}var $interpolateMinErr=angular.$interpolateMinErr=minErr("$interpolate");function $InterpolateProvider(){var startSymbol="{{",endSymbol="}}";this.startSymbol=function(value){return value?(startSymbol=value,this):startSymbol},this.endSymbol=function(value){return value?(endSymbol=value,this):endSymbol},this.$get=["$parse","$exceptionHandler","$sce",function($parse,$exceptionHandler,$sce){var startSymbolLength=startSymbol.length,endSymbolLength=endSymbol.length,escapedStartRegexp=new RegExp(startSymbol.replace(/./g,escape),"g"),escapedEndRegexp=new RegExp(endSymbol.replace(/./g,escape),"g");function escape(ch){return"\\\\\\"+ch}function unescapeText(text){return text.replace(escapedStartRegexp,startSymbol).replace(escapedEndRegexp,endSymbol)}function constantWatchDelegate(scope,listener,objectEquality,constantInterp){var unwatch=scope.$watch(function(scope){return unwatch(),constantInterp(scope)},listener,objectEquality);return unwatch}function $interpolate(text,mustHaveExpression,trustedContext,allOrNothing){var constantInterp;if(!text.length||-1===text.indexOf(startSymbol))return mustHaveExpression||((constantInterp=valueFn(unescapeText(text))).exp=text,constantInterp.expressions=[],constantInterp.$$watchDelegate=constantWatchDelegate),constantInterp;allOrNothing=!!allOrNothing;for(var endIndex,startIndex,compute,getValue,index=0,expressions=[],parseFns=[],textLength=text.length,concat=[],expressionPositions=[];index<textLength;){if(-1===(startIndex=text.indexOf(startSymbol,index))||-1===(endIndex=text.indexOf(endSymbol,startIndex+startSymbolLength))){index!==textLength&&concat.push(unescapeText(text.substring(index)));break}index!==startIndex&&concat.push(unescapeText(text.substring(index,startIndex))),startIndex=text.substring(startIndex+startSymbolLength,endIndex),expressions.push(startIndex),parseFns.push($parse(startIndex,parseStringifyInterceptor)),index=endIndex+endSymbolLength,expressionPositions.push(concat.length),concat.push("")}return trustedContext&&1<concat.length&&$interpolateMinErr.throwNoconcat(text),!mustHaveExpression||expressions.length?(compute=function(values){for(var i=0,ii=expressions.length;i<ii;i++){if(allOrNothing&&void 0===values[i])return;concat[expressionPositions[i]]=values[i]}return concat.join("")},getValue=function(value){return trustedContext?$sce.getTrusted(trustedContext,value):$sce.valueOf(value)},extend(function(context){var i=0,ii=expressions.length,values=new Array(ii);try{for(;i<ii;i++)values[i]=parseFns[i](context);return compute(values)}catch(err){$exceptionHandler($interpolateMinErr.interr(text,err))}},{exp:text,expressions:expressions,$$watchDelegate:function(scope,listener){var lastValue;return scope.$watchGroup(parseFns,function(values,oldValues){var currValue=compute(values);isFunction(listener)&&listener.call(this,currValue,values!==oldValues?lastValue:currValue,scope),lastValue=currValue})}})):void 0;function parseStringifyInterceptor(value){try{return value=getValue(value),allOrNothing&&void 0===value?value:stringify(value)}catch(err){$exceptionHandler($interpolateMinErr.interr(text,err))}}}return $interpolate.startSymbol=function(){return startSymbol},$interpolate.endSymbol=function(){return endSymbol},$interpolate}]}
1function $IntervalProvider(){this.$get=["$rootScope","$window","$q","$$q","$browser",function($rootScope,$window,$q,$$q,$browser){var intervals={};function interval(fn,delay,count,invokeApply){var hasParams=4<arguments.length,args=hasParams?sliceArgs(arguments,4):[],setInterval=$window.setInterval,clearInterval=$window.clearInterval,iteration=0,skipApply=void 0!==invokeApply&&!invokeApply,deferred=(skipApply?$$q:$q).defer(),promise=deferred.promise;return count=void 0!==count?count:0,promise.$$intervalId=setInterval(function(){skipApply?$browser.defer(callback):$rootScope.$evalAsync(callback),deferred.notify(iteration++),0<count&&count<=iteration&&(deferred.resolve(iteration),clearInterval(promise.$$intervalId),delete intervals[promise.$$intervalId]),skipApply||$rootScope.$apply()},delay),intervals[promise.$$intervalId]=deferred,promise;function callback(){hasParams?fn.apply(null,args):fn(iteration)}}return interval.cancel=function(promise){return!!(promise&&promise.$$intervalId in intervals)&&(intervals[promise.$$intervalId].promise.catch(noop),intervals[promise.$$intervalId].reject("canceled"),$window.clearInterval(promise.$$intervalId),delete intervals[promise.$$intervalId],!0)},interval}]}function $jsonpCallbacksProvider(){this.$get=function(){var callbacks=angular.callbacks,callbackMap={};function createCallback(callbackId){function callback(data){callback.data=data,callback.called=!0}return callback.id=callbackId,callback}return{createCallback:function(url){var callbackId="_"+(callbacks.$$counter++).toString(36),callbackPath="angular.callbacks."+callbackId,callback=createCallback(callbackId);return callbackMap[callbackPath]=callbacks[callbackId]=callback,callbackPath},wasCalled:function(callbackPath){return callbackMap[callbackPath].called},getResponse:function(callbackPath){return callbackMap[callbackPath].data},removeCallback:function(callbackPath){delete callbacks[callbackMap[callbackPath].id],delete callbackMap[callbackPath]}}}}$interpolateMinErr.throwNoconcat=function(text){throw $interpolateMinErr("noconcat","Error while interpolating: {0}\nStrict Contextual Escaping disallows interpolations that concatenate multiple expressions when a trusted value is required. See http://docs.angularjs.org/api/ng.$sce",text)},$interpolateMinErr.interr=function(text,err){return $interpolateMinErr("interr","Can't interpolate: {0}\n{1}",text,err.toString())};var PATH_MATCH=/^([^?#]*)(\?([^#]*))?(#(.*))?$/,DEFAULT_PORTS={http:80,https:443,ftp:21},$locationMinErr=minErr("$location");function encodePath(path){for(var segments=path.split("/"),i=segments.length;i--;)segments[i]=encodeUriSegment(segments[i]);return segments.join("/")}function parseAbsoluteUrl(absoluteUrl,locationObj){absoluteUrl=urlResolve(absoluteUrl);locationObj.$$protocol=absoluteUrl.protocol,locationObj.$$host=absoluteUrl.hostname,locationObj.$$port=toInt(absoluteUrl.port)||DEFAULT_PORTS[absoluteUrl.protocol]||null}var DOUBLE_SLASH_REGEX=/^\s*[\\/]{2,}/;function parseAppUrl(url,locationObj){if(DOUBLE_SLASH_REGEX.test(url))throw $locationMinErr("badpath",'Invalid url "{0}".',url);var prefixed="/"!==url.charAt(0),url=urlResolve(url=prefixed?"/"+url:url);locationObj.$$path=decodeURIComponent(prefixed&&"/"===url.pathname.charAt(0)?url.pathname.substring(1):url.pathname),locationObj.$$search=parseKeyValue(url.search),locationObj.$$hash=decodeURIComponent(url.hash),locationObj.$$path&&"/"!==locationObj.$$path.charAt(0)&&(locationObj.$$path="/"+locationObj.$$path)}function startsWith(str,search){return str.slice(0,search.length)===search}function stripBaseUrl(base,url){if(startsWith(url,base))return url.substr(base.length)}function stripHash(url){var index=url.indexOf("#");return-1===index?url:url.substr(0,index)}function trimEmptyHash(url){return url.replace(/(#.+)|#$/,"$1")}function LocationHtml5Url(appBase,appBaseNoFile,basePrefix){this.$$html5=!0,basePrefix=basePrefix||"",parseAbsoluteUrl(appBase,this),this.$$parse=function(url){var pathUrl=stripBaseUrl(appBaseNoFile,url);if(!isString(pathUrl))throw $locationMinErr("ipthprfx",'Invalid url "{0}", missing path prefix "{1}".',url,appBaseNoFile);parseAppUrl(pathUrl,this),this.$$path||(this.$$path="/"),this.$$compose()}
1,this.$$compose=function(){var search=toKeyValue(this.$$search),hash=this.$$hash?"#"+encodeUriSegment(this.$$hash):"";this.$$url=encodePath(this.$$path)+(search?"?"+search:"")+hash,this.$$absUrl=appBaseNoFile+this.$$url.substr(1),this.$$urlUpdatedByLocation=!0},this.$$parseLinkUrl=function(url,relHref){var prevAppUrl;return relHref&&"#"===relHref[0]?(this.hash(relHref.slice(1)),!0):(void 0!==(relHref=stripBaseUrl(appBase,url))?(prevAppUrl=relHref,prevAppUrl=basePrefix&&void 0!==(relHref=stripBaseUrl(basePrefix,relHref))?appBaseNoFile+(stripBaseUrl("/",relHref)||relHref):appBase+prevAppUrl):void 0!==(relHref=stripBaseUrl(appBaseNoFile,url))?prevAppUrl=appBaseNoFile+relHref:appBaseNoFile===url+"/"&&(prevAppUrl=appBaseNoFile),prevAppUrl&&this.$$parse(prevAppUrl),!!prevAppUrl)}}function LocationHashbangUrl(appBase,appBaseNoFile,hashPrefix){parseAbsoluteUrl(appBase,this),this.$$parse=function(url){var withoutHashUrl,withoutBaseUrl=stripBaseUrl(appBase,url)||stripBaseUrl(appBaseNoFile,url);void 0!==withoutBaseUrl&&"#"===withoutBaseUrl.charAt(0)?void 0===(withoutHashUrl=stripBaseUrl(hashPrefix,withoutBaseUrl))&&(withoutHashUrl=withoutBaseUrl):this.$$html5?withoutHashUrl=withoutBaseUrl:(withoutHashUrl="",void 0===withoutBaseUrl&&(appBase=url,this.replace())),parseAppUrl(withoutHashUrl,this),this.$$path=((path,url,base)=>{var windowsFilePathExp=/^\/[A-Z]:(\/.*)/;return startsWith(url,base)&&(url=url.replace(base,"")),!windowsFilePathExp.exec(url)&&(base=windowsFilePathExp.exec(path))?base[1]:path})(this.$$path,withoutHashUrl,appBase),this.$$compose()},this.$$compose=function(){var search=toKeyValue(this.$$search),hash=this.$$hash?"#"+encodeUriSegment(this.$$hash):"";this.$$url=encodePath(this.$$path)+(search?"?"+search:"")+hash,this.$$absUrl=appBase+(this.$$url?hashPrefix+this.$$url:""),this.$$urlUpdatedByLocation=!0},this.$$parseLinkUrl=function(url,relHref){return stripHash(appBase)===stripHash(url)&&(this.$$parse(url),!0)}}function LocationHashbangInHtml5Url(appBase,appBaseNoFile,hashPrefix){this.$$html5=!0,LocationHashbangUrl.apply(this,arguments),this.$$parseLinkUrl=function(url,relHref){var rewrittenUrl;return relHref&&"#"===relHref[0]?(this.hash(relHref.slice(1)),!0):(appBase===stripHash(url)?rewrittenUrl=url:(relHref=stripBaseUrl(appBaseNoFile,url))?rewrittenUrl=appBase+hashPrefix+relHref:appBaseNoFile===url+"/"&&(rewrittenUrl=appBaseNoFile),rewrittenUrl&&this.$$parse(rewrittenUrl),!!rewrittenUrl)},this.$$compose=function(){var search=toKeyValue(this.$$search),hash=this.$$hash?"#"+encodeUriSegment(this.$$hash):"";this.$$url=encodePath(this.$$path)+(search?"?"+search:"")+hash,this.$$absUrl=appBase+hashPrefix+this.$$url,this.$$urlUpdatedByLocation=!0}}var locationPrototype={$$absUrl:"",$$html5:!1,$$replace:!1,absUrl:locationGetter("$$absUrl"),url:function(url){var match;return void 0===url?this.$$url:(!(match=PATH_MATCH.exec(url))[1]&&""!==url||this.path(decodeURIComponent(match[1])),(match[2]||match[1]||""===url)&&this.search(match[3]||""),this.hash(match[5]||""),this)},protocol:locationGetter("$$protocol"),host:locationGetter("$$host"),port:locationGetter("$$port"),path:locationGetterSetter("$$path",function(path){return"/"===(path=null!==path?path.toString():"").charAt(0)?path:"/"+path}),search:function(search,paramValue){switch(arguments.length){case 0:return this.$$search;case 1:if(isString(search)||isNumber(search))search=search.toString(),this.$$search=parseKeyValue(search);else{if(!isObject(search))throw $locationMinErr("isrcharg","The first argument of the `$location#search()` call must be a string or an object.");forEach(search=copy(search,{}),function(value,key){null==value&&delete search[key]}),this.$$search=search}break;default:null==paramValue?delete this.$$search[search]:this.$$search[search]=paramValue}return this.$$compose(),this},hash:locationGetterSetter("$$hash",function(hash){return null!==hash?hash.toString():""}),replace:function(){return this.$$replace=!0,this}};function locationGetter(property){return function(){return this[property]}}function locationGetterSetter(property,preprocess){return function(value){return void 0===value?this[property]:(this[property]=preprocess(value),this.$$compose(),this)}}function $LocationProvider(){var hashPrefix="!",html5Mode={enabled:!1,requireBase:!0,rewriteLinks:!0};this.hashPrefix=function(prefix){return void 0!==prefix?(hashPrefix=prefix,this):hashPrefix},this.html5Mode=function(mode){return isBoolean(mode)?(html5Mode.enabled=mode,this):isObject(mode)?(isBoolean(mode.enabled)&&(html5Mode.enabled=mode.enabled),isBoolean(mode.requireBase)&&(html5Mode.requireBase=mode.requireBase),(isBoolean(mode.rewriteLinks)||isString(mode.rewriteLinks))&&(html5Mode.rewriteLinks=mode.rewriteLinks),this):html5Mode},this.$get=["$rootScope","$browser","$sniffer","$rootElement","$window",function($rootScope,$browser,$sniffer,$rootElement,$window){var LocationMode,appBase,baseHref=$browser.baseHref(),initialUrl=$browser.url();if(html5Mode.enabled){if(!baseHref&&html5Mode.requireBase)throw $locationMinErr("nobase","$location in HTML5 mode requires a <base> tag to be present!");appBase=initialUrl.substring(0,initialUrl.indexOf("/",initialUrl.indexOf("//")+2))+(baseHref||"/"),LocationMode=$sniffer.history?LocationHtml5Url:LocationHashbangInHtml5Url}else appBase=stripHash(initialUrl),LocationMode=LocationHashbangUrl;var $location,appBaseNoFile=(url=>url.substr(0,stripHash(url).lastIndexOf("/")+1))(appBase),IGNORE_URI_REGEXP=(($location=new LocationMode(app
1Base,appBaseNoFile,"#"+hashPrefix)).$$parseLinkUrl(initialUrl,initialUrl),$location.$$state=$browser.state(),/^\s*(javascript|mailto):/i);function setBrowserUrlWithFallback(url,replace,state){var oldUrl=$location.url(),oldState=$location.$$state;try{$browser.url(url,replace,state),$location.$$state=$browser.state()}catch(e){throw $location.url(oldUrl),$location.$$state=oldState,e}}$rootElement.on("click",function(event){var rewriteLinks=html5Mode.rewriteLinks;if(rewriteLinks&&!event.ctrlKey&&!event.metaKey&&!event.shiftKey&&2!==event.which&&2!==event.button){for(var relHref,elm=jqLite(event.target);"a"!==nodeName_(elm[0]);)if(elm[0]===$rootElement[0]||!(elm=elm.parent())[0])return;isString(rewriteLinks)&&void 0===elm.attr(rewriteLinks)||(rewriteLinks=elm.prop("href"),relHref=elm.attr("href")||elm.attr("xlink:href"),isObject(rewriteLinks)&&"[object SVGAnimatedString]"===rewriteLinks.toString()&&(rewriteLinks=urlResolve(rewriteLinks.animVal).href),IGNORE_URI_REGEXP.test(rewriteLinks))||!rewriteLinks||elm.attr("target")||event.isDefaultPrevented()||$location.$$parseLinkUrl(rewriteLinks,relHref)&&(event.preventDefault(),$location.absUrl()!==$browser.url())&&($rootScope.$apply(),$window.angular["ff-684208-preventDefault"]=!0)}}),trimEmptyHash($location.absUrl())!==trimEmptyHash(initialUrl)&&$browser.url($location.absUrl(),!0);var initializing=!0;return $browser.onUrlChange(function(newUrl,newState){startsWith(newUrl,appBaseNoFile)?($rootScope.$evalAsync(function(){var defaultPrevented,oldUrl=$location.absUrl(),oldState=$location.$$state;newUrl=trimEmptyHash(newUrl),$location.$$parse(newUrl),$location.$$state=newState,defaultPrevented=$rootScope.$broadcast("$locationChangeStart",newUrl,oldUrl,newState,oldState).defaultPrevented,$location.absUrl()===newUrl&&(defaultPrevented?($location.$$parse(oldUrl),$location.$$state=oldState,setBrowserUrlWithFallback(oldUrl,!1,oldState)):(initializing=!1,afterLocationChange(oldUrl,oldState)))}),$rootScope.$$phase||$rootScope.$digest()):$window.location.href=newUrl}),$rootScope.$watch(function(){var oldUrl,newUrl,oldState,currentReplace,urlOrStateChanged;(initializing||$location.$$urlUpdatedByLocation)&&($location.$$urlUpdatedByLocation=!1,oldUrl=trimEmptyHash($browser.url()),newUrl=trimEmptyHash($location.absUrl()),oldState=$browser.state(),currentReplace=$location.$$replace,urlOrStateChanged=oldUrl!==newUrl||$location.$$html5&&$sniffer.history&&oldState!==$location.$$state,initializing||urlOrStateChanged)&&(initializing=!1,$rootScope.$evalAsync(function(){var newUrl=$location.absUrl(),defaultPrevented=$rootScope.$broadcast("$locationChangeStart",newUrl,oldUrl,$location.$$state,oldState).defaultPrevented;$location.absUrl()===newUrl&&(defaultPrevented?($location.$$parse(oldUrl),$location.$$state=oldState):(urlOrStateChanged&&setBrowserUrlWithFallback(newUrl,currentReplace,oldState===$location.$$state?null:$location.$$state),afterLocationChange(oldUrl,oldState)))})),$location.$$replace=!1}),$location;function afterLocationChange(oldUrl,oldState){$rootScope.$broadcast("$locationChangeSuccess",$location.absUrl(),oldUrl,$location.$$state,oldState)}}]}function $LogProvider(){var debug=!0,self=this;this.debugEnabled=function(flag){return void 0!==flag?(debug=flag,this):debug},this.$get=["$window",function($window){var fn,formatStackTrace=msie||/\bEdge\//.test($window.navigator&&$window.navigator.userAgent);return{log:consoleLog("log"),info:consoleLog("info"),warn:consoleLog("warn"),error:consoleLog("error"),debug:(fn=consoleLog("debug"),function(){debug&&fn.apply(self,arguments)})};function consoleLog(type){var console=$window.console||{},logFn=console[type]||console.log||noop,type=!1;try{type=!!logFn.apply}catch(e){}return type?function(){var args=[];return forEach(arguments,function(arg){args.push((arg=>(arg instanceof Error&&(arg.stack&&formatStackTrace?arg=arg.message&&-1===arg.stack.indexOf(arg.message)?"Error: "+arg.message+"\n"+arg.stack:arg.stack:arg.sourceURL&&(arg=arg.message+"\n"+arg.sourceURL+":"+arg.line)),arg))(arg))}),logFn.apply(console,args)}:function(arg1,arg2){logFn(arg1,null==arg2?"":arg2)}}}]}forEach([LocationHashbangInHtml5Url,LocationHashbangUrl,LocationHtml5Url],function(Location){Location.prototype=Object.create(locationPrototype),Location.prototype.state=function(state){if(!arguments.length)return this.$$state;if(Location===LocationHtml5Url&&this.$$html5)return this.$$state=void 0===state?null:state,this.$$urlUpdatedByLocation=!0,this;throw $locationMinErr("nostate","History API state support is available only in HTML5 mode and only in browsers supporting HTML5 History API")}});
1var $parseMinErr=minErr("$parse"),objectValueOf={}.constructor.prototype.valueOf;function getStringValue(name){return name+""}function AST(lexer,options){this.lexer=lexer,this.options=options}var OPERATORS=createMap(),ESCAPE=(forEach("+ - * / % === !== == != < > <= >= && || ! = |".split(" "),function(operator){OPERATORS[operator]=!0}),{n:"\n",f:"\f",r:"\r",t:"\t",v:"\v","'":"'",'"':'"'}),Lexer=function(options){this.options=options};function ifDefined(v,d){return void 0!==v?v:d}function plusFn(l,r){return void 0===l?r:void 0===r?l:l+r}function findConstantAndWatchExpressions(ast,$filter){var allConstants,argsToWatch,isStatelessFilter;switch(ast.type){case AST.Program:allConstants=!0,forEach(ast.body,function(expr){findConstantAndWatchExpressions(expr.expression,$filter),allConstants=allConstants&&expr.expression.constant}),ast.constant=allConstants;break;case AST.Literal:ast.constant=!0,ast.toWatch=[];break;case AST.UnaryExpression:findConstantAndWatchExpressions(ast.argument,$filter),ast.constant=ast.argument.constant,ast.toWatch=ast.argument.toWatch;break;case AST.BinaryExpression:findConstantAndWatchExpressions(ast.left,$filter),findConstantAndWatchExpressions(ast.right,$filter),ast.constant=ast.left.constant&&ast.right.constant,ast.toWatch=ast.left.toWatch.concat(ast.right.toWatch);break;case AST.LogicalExpression:findConstantAndWatchExpressions(ast.left,$filter),findConstantAndWatchExpressions(ast.right,$filter),ast.constant=ast.left.constant&&ast.right.constant,ast.toWatch=ast.constant?[]:[ast];break;case AST.ConditionalExpression:findConstantAndWatchExpressions(ast.test,$filter),findConstantAndWatchExpressions(ast.alternate,$filter),findConstantAndWatchExpressions(ast.consequent,$filter),ast.constant=ast.test.constant&&ast.alternate.constant&&ast.consequent.constant,ast.toWatch=ast.constant?[]:[ast];break;case AST.Identifier:ast.constant=!1,ast.toWatch=[ast];break;case AST.MemberExpression:findConstantAndWatchExpressions(ast.object,$filter),ast.computed&&findConstantAndWatchExpressions(ast.property,$filter),ast.constant=ast.object.constant&&(!ast.computed||ast.property.constant),ast.toWatch=[ast];break;case AST.CallExpression:isStatelessFilter=!!ast.filter&&(($filter,filterName)=>!$filter(filterName).$stateful)($filter,ast.callee.name),allConstants=isStatelessFilter,argsToWatch=[],forEach(ast.arguments,function(expr){findConstantAndWatchExpressions(expr,$filter),allConstants=allConstants&&expr.constant,expr.constant||argsToWatch.push.apply(argsToWatch,expr.toWatch)}),ast.constant=allConstants,ast.toWatch=isStatelessFilter?argsToWatch:[ast];break;case AST.AssignmentExpression:findConstantAndWatchExpressions(ast.left,$filter),findConstantAndWatchExpressions(ast.right,$filter),ast.constant=ast.left.constant&&ast.right.constant,ast.toWatch=[ast];break;case AST.ArrayExpression:allConstants=!0,argsToWatch=[],forEach(ast.elements,function(expr){findConstantAndWatchExpressions(expr,$filter),allConstants=allConstants&&expr.constant,expr.constant||argsToWatch.push.apply(argsToWatch,expr.toWatch)}),ast.constant=allConstants,ast.toWatch=argsToWatch;break;case AST.ObjectExpression:allConstants=!0,argsToWatch=[],forEach(ast.properties,function(property){findConstantAndWatchExpressions(property.value,$filter),allConstants=allConstants&&property.value.constant&&!property.computed,property.value.constant||argsToWatch.push.apply(argsToWatch,property.value.toWatch),property.computed&&(findConstantAndWatchExpressions(property.key,$filter),property.key.constant||argsToWatch.push.apply(argsToWatch,property.key.toWatch))}),ast.constant=allConstants,ast.toWatch=argsToWatch;break;case AST.ThisExpression:case AST.LocalsExpression:ast.constant=!1,ast.toWatch=[]}}function getInputs(body){var candidate;return 1===body.length&&(1!==(candidate=(body=body[0].expression).toWatch).length||candidate[0]!==body)?candidate:void 0}function isAssignable(ast){return ast.type===AST.Identifier||ast.type===AST.MemberExpression}function assignableAST(ast){if(1===ast.body.length&&isAssignable(ast.body[0].expression))return{type:AST.AssignmentExpression,left:ast.body[0].expression,right:{type:AST.NGValueParameter},operator:"="}}function isLiteral(ast){return 0===ast.body.length||1===ast.body.length&&(ast.body[0].expression.type===AST.Literal||ast.body[0].expression.type===AST.ArrayExpression||ast.body[0].expression.type===AST.ObjectExpression)}function ASTCompiler(astBuilder,$filter){this.astBuilder=astBuilder,this.$filter=$filter}function ASTInterpreter(astBuilder,$filter){this.astBuilder=astBuilder,this.$filter=$filter}Lexer.prototype={constructor:Lexer,lex:function(text){for(this.text=text,this.index=0,this.tokens=[];this.index<this.text.length;){var ch2,ch3,op2,op3,op1,ch=this.text.charAt(this.index);'"'===ch||"'"===ch?this.readString(ch):this.isNumber(ch)||"."===ch&&this.isNumber(this.peek())?this.readNumber():this.isIdentifierStart(this.peekMultichar())?this.readIdent():this.is(ch,"(){}[].,;:?")?(this.tokens.push({index:this.index,text:ch}),this.index++):this.isWhitespace(ch)?this.index++:(ch3=(ch2=ch+this.peek())+this.peek(2),op1=OPERATORS[ch],op2=OPERATORS[ch2],op3=OPERATORS[ch3],op1||op2||op3?(this.tokens.push({index:this.index,text:op1=op3?ch3:op2?ch2:ch,operator:!0}),this.index+=op1.length):this.throwError("Unexpected next character ",this.index,this.index+1))}return this.tokens},is:function(ch,chars){return-1!==chars.indexOf(ch)},peek:function(i){i=i||1;return this.index+i<this.text.length&&this.text.charAt(this.index+i)},isNumber:function(ch){return"0"<=ch&&ch<="9"&&"string"==typeof ch},isWhitespace:function(ch){return" "===ch||"\r"===ch||"\t"===ch||"\n"===ch||"\v"===ch||"Â "===ch},isIdentifierStart:function(ch){return this.options.isIdentifierStart?this.options.isIdentifierStart(ch,this.codePointAt(ch)):this.isValidIdentifierStart(ch)},isValidIdentifierStart:function(ch){return"a"<=ch&&ch<="z"||"A"<=ch&&ch<="Z"||"_"===ch||"$"===ch},isIdentifierContinue:function(ch){return this.options.isIdentifierContinue?this.options.isIdentifierContinue(ch,this.codePointAt(ch)):this.isValidIdentifierContinue(ch)},isValidIdentifierContinue:function(ch,cp){return this.isValidIdentifierStart(ch,cp)||this.isNumber(ch)}
1,codePointAt:function(ch){return 1===ch.length?ch.charCodeAt(0):(ch.charCodeAt(0)<<10)+ch.charCodeAt(1)-56613888},peekMultichar:function(){var cp1,cp2,ch=this.text.charAt(this.index),peek=this.peek();return peek&&(cp1=ch.charCodeAt(0),cp2=peek.charCodeAt(0),55296<=cp1)&&cp1<=56319&&56320<=cp2&&cp2<=57343?ch+peek:ch},isExpOperator:function(ch){return"-"===ch||"+"===ch||this.isNumber(ch)},throwError:function(error,start,end){end=end||this.index;start=void 0!==start?"s "+start+"-"+this.index+" ["+this.text.substring(start,end)+"]":" "+end;throw $parseMinErr("lexerr","Lexer Error: {0} at column{1} in expression [{2}].",error,start,this.text)},readNumber:function(){for(var number="",start=this.index;this.index<this.text.length;){var ch=lowercase(this.text.charAt(this.index));if("."===ch||this.isNumber(ch))number+=ch;else{var peekCh=this.peek();if("e"===ch&&this.isExpOperator(peekCh))number+=ch;else if(this.isExpOperator(ch)&&peekCh&&this.isNumber(peekCh)&&"e"===number.charAt(number.length-1))number+=ch;else{if(!this.isExpOperator(ch)||peekCh&&this.isNumber(peekCh)||"e"!==number.charAt(number.length-1))break;this.throwError("Invalid exponent")}}this.index++}this.tokens.push({index:start,text:number,constant:!0,value:Number(number)})},readIdent:function(){var start=this.index;for(this.index+=this.peekMultichar().length;this.index<this.text.length;){var ch=this.peekMultichar();if(!this.isIdentifierContinue(ch))break;this.index+=ch.length}this.tokens.push({index:start,text:this.text.slice(start,this.index),identifier:!0})},readString:function(quote){for(var start=this.index,string=(this.index++,""),rawString=quote,escape=!1;this.index<this.text.length;){var hex,ch=this.text.charAt(this.index);if(rawString+=ch,escape)"u"===ch?((hex=this.text.substring(this.index+1,this.index+5)).match(/[\da-f]{4}/i)||this.throwError("Invalid unicode escape [\\u"+hex+"]"),this.index+=4,string+=String.fromCharCode(parseInt(hex,16))):string+=ESCAPE[ch]||ch,escape=!1;else if("\\"===ch)escape=!0;else{if(ch===quote)return this.index++,void this.tokens.push({index:start,text:rawString,constant:!0,value:string});string+=ch}this.index++}this.throwError("Unterminated quote",start)}},AST.Program="Program",AST.ExpressionStatement="ExpressionStatement",AST.AssignmentExpression="AssignmentExpression",AST.ConditionalExpression="ConditionalExpression",AST.LogicalExpression="LogicalExpression",AST.BinaryExpression="BinaryExpression",AST.UnaryExpression="UnaryExpression",AST.CallExpression="CallExpression",AST.MemberExpression="MemberExpression",AST.Identifier="Identifier",AST.Literal="Literal",AST.ArrayExpression="ArrayExpression",AST.Property="Property",AST.ObjectExpression="ObjectExpression",AST.ThisExpression="ThisExpression",AST.LocalsExpression="LocalsExpression",AST.NGValueParameter="NGValueParameter",AST.prototype={ast:function(text){this.text=text,this.tokens=this.lexer.lex(text);text=this.program();return 0!==this.tokens.length&&this.throwError("is an unexpected token",this.tokens[0]),text},program:function(){for(var body=[];;)if(0<this.tokens.length&&!this.peek("}",")",";","]")&&body.push(this.expressionStatement()),!this.expect(";"))return{type:AST.Program,body:body}},expressionStatement:function(){return{type:AST.ExpressionStatement,expression:this.filterChain()}},filterChain:function(){for(var left=this.expression();this.expect("|");)left=this.filter(left);return left},expression:function(){return this.assignment()},assignment:function(){var result=this.ternary();if(this.expect("=")){if(!isAssignable(result))throw $parseMinErr("lval","Trying to assign a value to a non l-value");result={type:AST.AssignmentExpression,left:result,right:this.assignment(),operator:"="}}return result},ternary:function(){var alternate,consequent,test=this.logicalOR();return this.expect("?")&&(alternate=this.expression(),this.consume(":"))?(consequent=this.expression(),{type:AST.ConditionalExpression,test:test,alternate:alternate,consequent:consequent}):test},logicalOR:function(){for(var left=this.logicalAND();this.expect("||");)left={type:AST.LogicalExpression,operator:"||",left:left,right:this.logicalAND()};return left},logicalAND:function(){for(var left=this.equality();this.expect("&&");)left={type:AST.LogicalExpression,operator:"&&",left:left,right:this.equality()};return left},equality:function(){for(var token,left=this.relational();token=this.expect("==","!=","===","!==");)left={type:AST.BinaryExpression,operator:token.text,left:left,right:this.relational()};return left},relational:function(){for(var token,left=this.additive();token=this.expect("<",">","<=",">=");)left={type:AST.BinaryExpression,operator:token.text,left:left,right:this.additive()};return left},additive:function(){for(var token,left=this.multiplicative();token=this.expect("+","-");)left={type:AST.BinaryExpression,operator:token.text,left:left,right:this.multiplicative()};return left},multiplicative:function(){for(var token,left=this.unary();token=this.expect("*","/","%");)left={type:AST.BinaryExpression,operator:token.text,left:left,right:this.unary()};return left},unary:function(){var token;
1return(token=this.expect("+","-","!"))?{type:AST.UnaryExpression,operator:token.text,prefix:!0,argument:this.unary()}:this.primary()},primary:function(){var primary,next;for(this.expect("(")?(primary=this.filterChain(),this.consume(")")):this.expect("[")?primary=this.arrayDeclaration():this.expect("{")?primary=this.object():this.selfReferential.hasOwnProperty(this.peek().text)?primary=copy(this.selfReferential[this.consume().text]):this.options.literals.hasOwnProperty(this.peek().text)?primary={type:AST.Literal,value:this.options.literals[this.consume().text]}:this.peek().identifier?primary=this.identifier():this.peek().constant?primary=this.constant():this.throwError("not a primary expression",this.peek());next=this.expect("(","[",".");)"("===next.text?(primary={type:AST.CallExpression,callee:primary,arguments:this.parseArguments()},this.consume(")")):"["===next.text?(primary={type:AST.MemberExpression,object:primary,property:this.expression(),computed:!0},this.consume("]")):"."===next.text?primary={type:AST.MemberExpression,object:primary,property:this.identifier(),computed:!1}:this.throwError("IMPOSSIBLE");return primary},filter:function(baseExpression){for(var args=[baseExpression],baseExpression={type:AST.CallExpression,callee:this.identifier(),arguments:args,filter:!0};this.expect(":");)args.push(this.expression());return baseExpression},parseArguments:function(){var args=[];if(")"!==this.peekToken().text)for(;args.push(this.filterChain()),this.expect(","););return args},identifier:function(){var token=this.consume();return token.identifier||this.throwError("is not a valid identifier",token),{type:AST.Identifier,name:token.text}},constant:function(){return{type:AST.Literal,value:this.consume().value}},arrayDeclaration:function(){var elements=[];if("]"!==this.peekToken().text)for(;!this.peek("]")&&(elements.push(this.expression()),this.expect(",")););return this.consume("]"),{type:AST.ArrayExpression,elements:elements}},object:function(){var property,properties=[];if("}"!==this.peekToken().text)for(;!this.peek("}")&&(property={type:AST.Property,kind:"init"},this.peek().constant?(property.key=this.constant(),property.computed=!1,this.consume(":"),property.value=this.expression()):this.peek().identifier?(property.key=this.identifier(),property.computed=!1,this.peek(":")?(this.consume(":"),property.value=this.expression()):property.value=property.key):this.peek("[")?(this.consume("["),property.key=this.expression(),this.consume("]"),property.computed=!0,this.consume(":"),property.value=this.expression()):this.throwError("invalid key",this.peek()),properties.push(property),this.expect(",")););return this.consume("}"),{type:AST.ObjectExpression,properties:properties}},throwError:function(msg,token){throw $parseMinErr("syntax","Syntax Error: Token '{0}' {1} at column {2} of the expression [{3}] starting at [{4}].",token.text,msg,token.index+1,this.text,this.text.substring(token.index))},consume:function(e1){if(0===this.tokens.length)throw $parseMinErr("ueoe","Unexpected end of expression: {0}",this.text);var token=this.expect(e1);return token||this.throwError("is unexpected, expecting ["+e1+"]",this.peek()),token},peekToken:function(){if(0===this.tokens.length)throw $parseMinErr("ueoe","Unexpected end of expression: {0}",this.text);return this.tokens[0]},peek:function(e1,e2,e3,e4){return this.peekAhead(0,e1,e2,e3,e4)},peekAhead:function(i,e1,e2,e3,e4){if(this.tokens.length>i){var i=this.tokens[i],t=i.text;if(t===e1||t===e2||t===e3||t===e4||!e1&&!e2&&!e3&&!e4)return i}return!1},expect:function(e1,e2,e3,e4){e1=this.peek(e1,e2,e3,e4);return!!e1&&(this.tokens.shift(),e1)},selfReferential:{this:{type:AST.ThisExpression},$locals:{type:AST.LocalsExpression}}},ASTCompiler.prototype={compile:function(expression){var self=this,expression=this.astBuilder.ast(expression),extra=(this.state={nextId:0,filters:{},fn:{vars:[],body:[],own:{}},assign:{vars:[],body:[],own:{}},inputs:[]},findConstantAndWatchExpressions(expression,self.$filter),""),assignable=(this.stage="assign",(assignable=assignableAST(expression))&&(this.state.computing="assign",result=this.nextId(),this.recurse(assignable,result),this.return_(result),extra="fn.assign="+this.generateFunction("assign","s,v,l")),getInputs(expression.body)),result=(self.stage="inputs",forEach(assignable,function(watch,key){var fnKey="fn"+key,intoId=(self.state[fnKey]={vars:[],body:[],own:{}},self.state.computing=fnKey,self.nextId());self.recurse(watch,intoId),self.return_(intoId),self.state.inputs.push(fnKey),watch.watchId=key}),this.state.computing="fn",this.stage="main",this.recurse(expression),'"'+this.USE+" "+this.STRICT+'";\n'+this.filterPrefix()+"var fn="+this.generateFunction("fn","s,l,a,i")+extra+this.watchFns()+"return fn;"),assignable=new Function("$filter","getStringValue","ifDefined","plus",result)(this.$filter,getStringValue,ifDefined,plusFn);return this.state=this.stage=void 0,assignable.literal=isLiteral(expression),assignable.constant=ex
1pression.constant,assignable},USE:"use",STRICT:"strict",watchFns:function(){var result=[],fns=this.state.inputs,self=this;return forEach(fns,function(name){result.push("var "+name+"="+self.generateFunction(name,"s"))}),fns.length&&result.push("fn.inputs=["+fns.join(",")+"];"),result.join("")},generateFunction:function(name,params){return"function("+params+"){"+this.varsPrefix(name)+this.body(name)+"};"},filterPrefix:function(){var parts=[],self=this;return forEach(this.state.filters,function(id,filter){parts.push(id+"=$filter("+self.escape(filter)+")")}),parts.length?"var "+parts.join(",")+";":""},varsPrefix:function(section){return this.state[section].vars.length?"var "+this.state[section].vars.join(",")+";":""},body:function(section){return this.state[section].body.join("")},recurse:function(ast,intoId,nameId,recursionFn,create,skipWatchIdCheck){var left,right,args,expression,computed,self=this;if(recursionFn=recursionFn||noop,skipWatchIdCheck||void 0===ast.watchId)switch(ast.type){case AST.Program:forEach(ast.body,function(expression,pos){self.recurse(expression.expression,void 0,void 0,function(expr){right=expr}),pos!==ast.body.length-1?self.current().body.push(right,";"):self.return_(right)});break;case AST.Literal:expression=this.escape(ast.value),this.assign(intoId,expression),recursionFn(intoId||expression);break;case AST.UnaryExpression:this.recurse(ast.argument,void 0,void 0,function(expr){right=expr}),expression=ast.operator+"("+this.ifDefined(right,0)+")",this.assign(intoId,expression),recursionFn(expression);break;case AST.BinaryExpression:this.recurse(ast.left,void 0,void 0,function(expr){left=expr}),this.recurse(ast.right,void 0,void 0,function(expr){right=expr}),expression="+"===ast.operator?this.plus(left,right):"-"===ast.operator?this.ifDefined(left,0)+ast.operator+this.ifDefined(right,0):"("+left+")"+ast.operator+"("+right+")",this.assign(intoId,expression),recursionFn(expression);break;case AST.LogicalExpression:intoId=intoId||this.nextId(),self.recurse(ast.left,intoId),self.if_("&&"===ast.operator?intoId:self.not(intoId),self.lazyRecurse(ast.right,intoId)),recursionFn(intoId);break;case AST.ConditionalExpression:intoId=intoId||this.nextId(),self.recurse(ast.test,intoId),self.if_(intoId,self.lazyRecurse(ast.alternate,intoId),self.lazyRecurse(ast.consequent,intoId)),recursionFn(intoId);break;case AST.Identifier:intoId=intoId||this.nextId(),nameId&&(nameId.context="inputs"===self.stage?"s":this.assign(this.nextId(),this.getHasOwnProperty("l",ast.name)+"?l:s"),nameId.computed=!1,nameId.name=ast.name),self.if_("inputs"===self.stage||self.not(self.getHasOwnProperty("l",ast.name)),function(){self.if_("inputs"===self.stage||"s",function(){create&&1!==create&&self.if_(self.isNull(self.nonComputedMember("s",ast.name)),self.lazyAssign(self.nonComputedMember("s",ast.name),"{}")),self.assign(intoId,self.nonComputedMember("s",ast.name))})},intoId&&self.lazyAssign(intoId,self.nonComputedMember("l",ast.name))),recursionFn(intoId);break;case AST.MemberExpression:left=nameId&&(nameId.context=this.nextId())||this.nextId(),intoId=intoId||this.nextId(),self.recurse(ast.object,left,void 0,function(){self.if_(self.notNull(left),function(){ast.computed?(right=self.nextId(),self.recurse(ast.property,right),self.getStringValue(right),create&&1!==create&&self.if_(self.not(self.computedMember(left,right)),self.lazyAssign(self.computedMember(left,right),"{}")),expression=self.computedMember(left,right),self.assign(intoId,expression),nameId&&(nameId.computed=!0,nameId.name=right)):(create&&1!==create&&self.if_(self.isNull(self.nonComputedMember(left,ast.property.name)),self.lazyAssign(self.nonComputedMember(left,ast.property.name),"{}")),expression=self.nonComputedMember(left,ast.property.name),self.assign(intoId,expression),nameId&&(nameId.computed=!1,nameId.name=ast.property.name))},function(){self.assign(intoId,"undefined")}),recursionFn(intoId)},!!create);break;case AST.CallExpression:intoId=intoId||this.nextId(),ast.filter?(right=self.filter(ast.callee.name),args=[],forEach(ast.arguments,function(expr){var argument=self.nextId();self.recurse(expr,argument),args.push(argument)}),expression=right+"("+args.join(",")+")",self.assign(intoId,expression),recursionFn(intoId)):(right=self.nextId(),left={},args=[],self.recurse(ast.callee,right,left,function(){self.if_(self.notNull(right),function(){forEach(ast.arguments,function(expr){self.recurse(expr,ast.constant?void 0:self.nextId(),void 0,function(argument){args.push(argument)})}),expression=left.name?self.member(left.context,left.name,left.computed)+"("+args.join(",")+")":right+"("+args.join(",")+")",self.assign(intoId,expression)},function(){self.assign(intoId,"undefined")}),recursionFn(intoId)}));break;case AST.AssignmentExpression:right=this.nextId(),left={},this.recurse(ast.left,void 0,left,function(){self.if_(self.notNull(left.context),function(){self.recurse(ast.right,right),expression=self.member(left.context,left.name,left.computed)+ast.operator+right,self.assign(intoId,expression),recursionFn(intoId||expression)})},1);break;case AST.ArrayExpression:args=[],forEach(ast.elements,function(expr){self.recurse(expr,ast.constant?void 0:self.nextId(),void 0,function(argument){args.push(argument)})}),expression="["+args.join(",")+"]",this.assign(intoId,expression),recursionFn(intoId||expression);break;
1case AST.ObjectExpression:computed=!(args=[]),forEach(ast.properties,function(property){property.computed&&(computed=!0)}),computed?(intoId=intoId||this.nextId(),this.assign(intoId,"{}"),forEach(ast.properties,function(property){property.computed?(left=self.nextId(),self.recurse(property.key,left)):left=property.key.type===AST.Identifier?property.key.name:""+property.key.value,right=self.nextId(),self.recurse(property.value,right),self.assign(self.member(intoId,left,property.computed),right)})):(forEach(ast.properties,function(property){self.recurse(property.value,ast.constant?void 0:self.nextId(),void 0,function(expr){args.push(self.escape(property.key.type===AST.Identifier?property.key.name:""+property.key.value)+":"+expr)})}),expression="{"+args.join(",")+"}",this.assign(intoId,expression)),recursionFn(intoId||expression);break;case AST.ThisExpression:this.assign(intoId,"s"),recursionFn(intoId||"s");break;case AST.LocalsExpression:this.assign(intoId,"l"),recursionFn(intoId||"l");break;case AST.NGValueParameter:this.assign(intoId,"v"),recursionFn(intoId||"v")}else intoId=intoId||this.nextId(),this.if_("i",this.lazyAssign(intoId,this.computedMember("i",ast.watchId)),this.lazyRecurse(ast,intoId,nameId,recursionFn,create,!0))},getHasOwnProperty:function(element,property){var key=element+"."+property,own=this.current().own;return own.hasOwnProperty(key)||(own[key]=this.nextId(!1,element+"&&("+this.escape(property)+" in "+element+")")),own[key]},assign:function(id,value){if(id)return this.current().body.push(id,"=",value,";"),id},filter:function(filterName){return this.state.filters.hasOwnProperty(filterName)||(this.state.filters[filterName]=this.nextId(!0)),this.state.filters[filterName]},ifDefined:function(id,defaultValue){return"ifDefined("+id+","+this.escape(defaultValue)+")"},plus:function(left,right){return"plus("+left+","+right+")"},return_:function(id){this.current().body.push("return ",id,";")},if_:function(test,alternate,consequent){var body;!0===test?alternate():((body=this.current().body).push("if(",test,"){"),alternate(),body.push("}"),consequent&&(body.push("else{"),consequent(),body.push("}")))},not:function(expression){return"!("+expression+")"},isNull:function(expression){return expression+"==null"},notNull:function(expression){return expression+"!=null"},nonComputedMember:function(left,right){return/^[$_a-zA-Z][$_a-zA-Z0-9]*$/.test(right)?left+"."+right:left+'["'+right.replace(/[^$_a-zA-Z0-9]/g,this.stringEscapeFn)+'"]'},computedMember:function(left,right){return left+"["+right+"]"},member:function(left,right,computed){return computed?this.computedMember(left,right):this.nonComputedMember(left,right)},getStringValue:function(item){this.assign(item,"getStringValue("+item+")")},lazyRecurse:function(ast,intoId,nameId,recursionFn,create,skipWatchIdCheck){var self=this;return function(){self.recurse(ast,intoId,nameId,recursionFn,create,skipWatchIdCheck)}},lazyAssign:function(id,value){var self=this;return function(){self.assign(id,value)}},stringEscapeRegex:/[^ a-zA-Z0-9]/g,stringEscapeFn:function(c){return"\\u"+("0000"+c.charCodeAt(0).toString(16)).slice(-4)},escape:function(value){if(isString(value))return"'"+value.replace(this.stringEscapeRegex,this.stringEscapeFn)+"'";if(isNumber(value))return value.toString();if(!0===value)return"true";if(!1===value)return"false";if(null===value)return"null";if(void 0===value)return"undefined";throw $parseMinErr("esc","IMPOSSIBLE")},nextId:function(skip,init){var id="v"+this.state.nextId++;return skip||this.current().vars.push(id+(init?"="+init:"")),id},current:function(){return this.state[this.state.computing]}},ASTInterpreter.prototype={compile:function(expression){var assign,inputs,self=this,expression=this.astBuilder.ast(expression),assignable=(findConstantAndWatchExpressions(expression,self.$filter),(assignable=assignableAST(expression))&&(assign=this.recurse(assignable)),getInputs(expression.body)),expressions=(assignable&&(inputs=[],forEach(assignable,function(watch,key){var input=self.recurse(watch);watch.input=input,inputs.push(input),watch.watchId=key})),[]),assignable=(forEach(expression.body,function(expression){expressions.push(self.recurse(expression.expression))}),0===expression.body.length?noop:1===expression.body.length?expressions[0]:function(scope,locals){var lastValue;return forEach(expressions,function(exp){lastValue=exp(scope,locals)}),lastValue});return assign&&(assignable.assign=function(scope,value,locals){return assign(scope,locals,value)}),inputs&&(assignable.inputs=inputs),assignable.literal=isLiteral(expression),assignable.constant=ex
1pression.constant,assignable},recurse:function(ast,context,create){var left,right,args,self=this;if(ast.input)return this.inputs(ast.input,ast.watchId);switch(ast.type){case AST.Literal:return this.value(ast.value,context);case AST.UnaryExpression:return right=this.recurse(ast.argument),this["unary"+ast.operator](right,context);case AST.BinaryExpression:case AST.LogicalExpression:return left=this.recurse(ast.left),right=this.recurse(ast.right),this["binary"+ast.operator](left,right,context);case AST.ConditionalExpression:return this["ternary?:"](this.recurse(ast.test),this.recurse(ast.alternate),this.recurse(ast.consequent),context);case AST.Identifier:return self.identifier(ast.name,context,create);case AST.MemberExpression:return left=this.recurse(ast.object,!1,!!create),ast.computed||(right=ast.property.name),ast.computed&&(right=this.recurse(ast.property)),ast.computed?this.computedMember(left,right,context,create):this.nonComputedMember(left,right,context,create);case AST.CallExpression:return args=[],forEach(ast.arguments,function(expr){args.push(self.recurse(expr))}),ast.filter&&(right=this.$filter(ast.callee.name)),ast.filter||(right=this.recurse(ast.callee,!0)),ast.filter?function(scope,locals,assign,inputs){for(var values=[],i=0;i<args.length;++i)values.push(args[i](scope,locals,assign,inputs));var value=right.apply(void 0,values,inputs);return context?{context:void 0,name:void 0,value:value}:value}:function(scope,locals,assign,inputs){var value,rhs=right(scope,locals,assign,inputs);if(null!=rhs.value){for(var values=[],i=0;i<args.length;++i)values.push(args[i](scope,locals,assign,inputs));value=rhs.value.apply(rhs.context,values)}return context?{value:value}:value};case AST.AssignmentExpression:return left=this.recurse(ast.left,!0,1),right=this.recurse(ast.right),function(scope,locals,assign,inputs){var lhs=left(scope,locals,assign,inputs),scope=right(scope,locals,assign,inputs);return lhs.context[lhs.name]=scope,context?{value:scope}:scope};case AST.ArrayExpression:return args=[],forEach(ast.elements,function(expr){args.push(self.recurse(expr))}),function(scope,locals,assign,inputs){for(var value=[],i=0;i<args.length;++i)value.push(args[i](scope,locals,assign,inputs));return context?{value:value}:value};case AST.ObjectExpression:return args=[],forEach(ast.properties,function(property){property.computed?args.push({key:self.recurse(property.key),computed:!0,value:self.recurse(property.value)}):args.push({key:property.key.type===AST.Identifier?property.key.name:""+property.key.value,computed:!1,value:self.recurse(property.value)})}),function(scope,locals,assign,inputs){for(var value={},i=0;i<args.length;++i)args[i].computed?value[args[i].key(scope,locals,assign,inputs)]=args[i].value(scope,locals,assign,inputs):value[args[i].key]=args[i].value(scope,locals,assign,inputs);return context?{value:value}:value};case AST.ThisExpression:return function(scope){return context?{value:scope}:scope};case AST.LocalsExpression:return function(scope,locals){return context?{value:locals}:locals};case AST.NGValueParameter:return function(scope,locals,assign){return context?{value:assign}:assign}}},"unary+":function(argument,context){return function(scope,locals,assign,inputs){scope=void 0!==(scope=argument(scope,locals,assign,inputs))?+scope:0;return context?{value:scope}:scope}},"unary-":function(argument,context){return function(scope,locals,assign,inputs){scope=void 0!==(scope=argument(scope,locals,assign,inputs))?-scope:-0;return context?{value:scope}:scope}},"unary!":function(argument,context){return function(scope,locals,assign,inputs){scope=!argument(scope,locals,assign,inputs);return context?{value:scope}:scope}},"binary+":function(left,right,context){return function(scope,locals,assign,inputs){scope=plusFn(left(scope,locals,assign,inputs),right(scope,locals,assign,inputs));return context?{value:scope}:scope}},"binary-":function(left,right,context){return function(scope,locals,assign,inputs){var lhs=left(scope,locals,assign,inputs),scope=right(scope,locals,assign,inputs),locals=(void 0!==lhs?lhs:0)-(void 0!==scope?scope:0);return context?{value:locals}:locals}},"binary*":function(left,right,context){return function(scope,locals,assign,inputs){scope=left(scope,locals,assign,inputs)*right(scope,locals,assign,inputs);return context?{value:scope}:scope}},"binary/":function(left,right,context){return function(scope,locals,assign,inputs){scope=left(scope,locals,assign,inputs)/right(scope,locals,assign,inputs);return context?{value:scope}:scope}},"binary%":function(left,right,context){return function(scope,locals,assign,inputs){scope=left(scope,locals,assign,inputs)%right(scope,locals,assign,inputs);return context?{value:scope}:scope}},"binary===":function(left,right,context){return function(scope,locals,assign,inputs){scope=left(scope,locals,assign,inputs)===right(scope,locals,assign,inputs);return context?{value:scope}:scope}},"binary!==":function(left,right,context){return function(scope,locals,assign,inputs){scope=left(scope,locals,assign,inputs)!==right(scope,locals,assign,inputs);return context?{value:scope}:scope}},"binary==":function(left,right,context){return function(scope,locals,assign,inputs){scope=left(scope,locals,assign,inputs)==right(scope,locals,assign,inputs);return context?{value:scope}:scope}},"binary!=":function(left,right,context){return function(scope,locals,assign,inputs){scope=left(scope,locals,assign,inputs)!=right(scope,locals,assign,inputs);return context?{value:scope}:scope}},"binary<":function(left,right,context){return function(scope,locals,assign,inputs){scope=left(scope,locals,assign,inputs)<right(scope,locals,assign,inputs);return context?{value:scope}:scope}},"binary>":function(left,right,context){return function(scope,locals,assign,inputs){scope=left(scope,locals,assign,inputs)>right(scope,locals,assign,inputs);return context?{value:scope}:scope}},"binary<=":function(left,right,context){return function(scope,locals,assign,inputs){scope=left(scope,locals,assign,inputs)<=right(scope,locals,assign,inputs);return context?{value:scope}:scope}},"binary>=":function(left,right,context){return function(scope,locals,assign,inputs){scope=left(scope,locals,assign,inputs)>=right(scope,locals,assign,inputs);return context?{value:scope}:scope}},"binary&&":function(left,right,context){return function(scope,locals,assign,inputs){scope=left(scope,locals,assign,inputs)&&right(scope,locals,assign,inputs);return context?{value:scope}:scope}},"binary||":function(left,right,context){return function(scope,locals,assign,inputs){scope=left(scope,locals,assign,inputs)||right(scope,locals,assign,inputs);return context?{value:scope}:scope}},"ternary?:":function(test,alternate,consequent,context){return function(scope,locals,assign,inputs){scope=(test
1(scope,locals,assign,inputs)?alternate:consequent)(scope,locals,assign,inputs);return context?{value:scope}:scope}},value:function(value,context){return function(){return context?{context:void 0,name:void 0,value:value}:value}},identifier:function(name,context,create){return function(scope,locals,assign,inputs){locals=locals&&name in locals?locals:scope,create&&1!==create&&locals&&null==locals[name]&&(locals[name]={}),scope=locals?locals[name]:void 0;return context?{context:locals,name:name,value:scope}:scope}},computedMember:function(left,right,context,create){return function(scope,locals,assign,inputs){var rhs,value,lhs=left(scope,locals,assign,inputs);return null!=lhs&&(rhs=right(scope,locals,assign,inputs),rhs+="",create&&1!==create&&lhs&&!lhs[rhs]&&(lhs[rhs]={}),value=lhs[rhs]),context?{context:lhs,name:rhs,value:value}:value}},nonComputedMember:function(left,right,context,create){return function(scope,locals,assign,inputs){scope=left(scope,locals,assign,inputs),create&&1!==create&&scope&&null==scope[right]&&(scope[right]={}),locals=null!=scope?scope[right]:void 0;return context?{context:scope,name:right,value:locals}:locals}},inputs:function(input,watchId){return function(scope,value,locals,inputs){return inputs?inputs[watchId]:input(scope,value,locals)}}};var Parser=function(lexer,$filter,options){this.lexer=lexer,this.$filter=$filter,this.options=options,this.ast=new AST(lexer,options),this.astCompiler=new(options.csp?ASTInterpreter:ASTCompiler)(this.ast,$filter)};function getValueOf(value){return isFunction(value.valueOf)?value.valueOf():objectValueOf.call(value)}function $ParseProvider(){var identStart,identContinue,cache=createMap(),literals={true:!0,false:!1,null:null,undefined:void 0};this.addLiteral=function(literalName,literalValue){literals[literalName]=literalValue},this.setIdentifierFns=function(identifierStart,identifierContinue){return identStart=identifierStart,identContinue=identifierContinue,this},this.$get=["$filter",function($filter){var $parseOptions={csp:csp().noUnsafeEval,literals:copy(literals),isIdentifierStart:isFunction(identStart)&&identStart,isIdentifierContinue:isFunction(identContinue)&&identContinue};return function(exp,interceptorFn){var parsedExpression,oneTime,cacheKey;switch(typeof exp){case"string":var lexer;return exp=exp.trim(),(parsedExpression=cache[cacheKey=exp])||(":"===exp.charAt(0)&&":"===exp.charAt(1)&&(oneTime=!0,exp=exp.substring(2)),lexer=new Lexer($parseOptions),lexer=new Parser(lexer,$filter,$parseOptions),(parsedExpression=lexer.parse(exp)).constant?parsedExpression.$$watchDelegate=constantWatchDelegate:oneTime?parsedExpression.$$watchDelegate=parsedExpression.literal?oneTimeLiteralWatchDelegate:oneTimeWatchDelegate:parsedExpression.inputs&&(parsedExpression.$$watchDelegate=inputsWatchDelegate),cache[cacheKey]=parsedExpression),addInterceptor(parsedExpression,interceptorFn);case"function":return addInterceptor(exp,interceptorFn);default:return addInterceptor(noop,interceptorFn)}};function expressionInputDirtyCheck(newValue,oldValueOfValue,compareObjectIdentity){return null==newValue||null==oldValueOfValue?newValue===oldValueOfValue:!("object"==typeof newValue&&!compareObjectIdentity&&"object"==typeof(newValue=getValueOf(newValue)))&&(newValue===oldValueOfValue||newValue!=newValue&&oldValueOfValue!=oldValueOfValue)}function inputsWatchDelegate(scope,listener,objectEquality,parsedExpression,prettyPrintExpression){var lastResult,oldInputValueOf,inputExpressions=parsedExpression.inputs;if(1===inputExpressions.length)return oldInputValueOf=expressionInputDirtyCheck,inputExpressions=inputExpressions[0],scope.$watch(function(scope){var newInputValue=inputExpressions(scope);return expressionInputDirtyCheck(newInputValue,oldInputValueOf,parsedExpression.literal)||(lastResult=parsedExpression(scope,void 0,void 0,[newInputValue]),oldInputValueOf=newInputValue&&getValueOf(newInputValue)),lastResult},listener,objectEquality,prettyPrintExpression);for(var oldInputValueOfValues=[],oldInputValues=[],i=0,ii=inputExpressions.length;i<ii;i++)oldInputValueOfValues[i]=expressionInputDirtyCheck,oldInputValues[i]=null;return scope.$watch(function(scope){for(var changed=!1,i=0,ii=inputExpressions.length;i<ii;i++){var newInputValue=inputExpressions[i](scope);(changed=changed||!expressionInputDirtyCheck(newInputValue,oldInputValueOfValues[i],parsedExpression.literal))&&(oldInputValueOfValues[i]=(oldInputValues[i]=newInputValue)&&getValueOf(newInputValue))}return lastResult=changed?parsedExpression(scope,void 0,void 0,oldInputValues):lastResult},listener,objectEquality,prettyPrintExpression)}function oneTimeWatchDelegate(scope,listener,objectEquality,parsedExpression,prettyPrintExpression){var lastValue,unwatch=parsedExpression.inputs?input
1sWatchDelegate(scope,oneTimeListener,objectEquality,parsedExpression,prettyPrintExpression):scope.$watch(function(scope){return parsedExpression(scope)},oneTimeListener,objectEquality);return unwatch;function oneTimeListener(value,old,scope){lastValue=value,isFunction(listener)&&listener(value,old,scope),void 0!==value&&scope.$$postDigest(function(){void 0!==lastValue&&unwatch()})}}function oneTimeLiteralWatchDelegate(scope,listener,objectEquality,parsedExpression){var lastValue,unwatch=scope.$watch(function(scope){return parsedExpression(scope)},function(value,old,scope){lastValue=value,isFunction(listener)&&listener(value,old,scope),isAllDefined(value)&&scope.$$postDigest(function(){isAllDefined(lastValue)&&unwatch()})},objectEquality);return unwatch;function isAllDefined(value){var allDefined=!0;return forEach(value,function(val){void 0===val&&(allDefined=!1)}),allDefined}}function constantWatchDelegate(scope,listener,objectEquality,parsedExpression){var unwatch=scope.$watch(function(scope){return unwatch(),parsedExpression(scope)},listener,objectEquality);return unwatch}function addInterceptor(parsedExpression,interceptorFn){var watchDelegate,useInputs;return interceptorFn?(watchDelegate=parsedExpression.$$watchDelegate,useInputs=!1,watchDelegate=watchDelegate!==oneTimeLiteralWatchDelegate&&watchDelegate!==oneTimeWatchDelegate?function(scope,locals,assign,inputs){assign=useInputs&&inputs?inputs[0]:parsedExpression(scope,locals,assign,inputs);return interceptorFn(assign,scope,locals)}:function(scope,locals,assign,inputs){assign=parsedExpression(scope,locals,assign,inputs),inputs=interceptorFn(assign,scope,locals);return void 0!==assign?inputs:assign},useInputs=!parsedExpression.inputs,parsedExpression.$$watchDelegate&&parsedExpression.$$watchDelegate!==inputsWatchDelegate?(watchDelegate.$$watchDelegate=parsedExpression.$$watchDelegate,watchDelegate.inputs=parsedExpression.inputs):interceptorFn.$stateful||(watchDelegate.$$watchDelegate=inputsWatchDelegate,watchDelegate.inputs=parsedExpression.inputs||[parsedExpression]),watchDelegate):parsedExpression}}]}function $QProvider(){var errorOnUnhandledRejections=!0;this.$get=["$rootScope","$exceptionHandler",function($rootScope,$exceptionHandler){return qFactory(function(callback){$rootScope.$evalAsync(callback)},$exceptionHandler,errorOnUnhandledRejections)}],this.errorOnUnhandledRejections=function(value){return void 0!==value?(errorOnUnhandledRejections=value,this):errorOnUnhandledRejections}}function $$QProvider(){var errorOnUnhandledRejections=!0;this.$get=["$browser","$exceptionHandler",function($browser,$exceptionHandler){return qFactory(function(callback){$browser.defer(callback)},$exceptionHandler,errorOnUnhandledRejections)}],this.errorOnUnhandledRejections=function(value){return void 0!==value?(errorOnUnhandledRejections=value,this):errorOnUnhandledRejections}}function qFactory(nextTick,exceptionHandler,errorOnUnhandledRejections){var $qMinErr=minErr("$q",TypeError),queueSize=0,checkQueue=[];function defer(){return new Deferred}function Deferred(){var promise=this.promise=new Promise;this.resolve=function(val){resolvePromise(promise,val)},this.reject=function(reason){rejectPromise(promise,reason)},this.notify=function(progress){notifyPromise(promise,progress)}}function Promise(){this.$$state={status:0}}function processChecks(){for(;!queueSize&&checkQueue.length;){var errorMessage,toCheck=checkQueue.shift();toCheck.pur||(toCheck.pur=!0,errorMessage="Possibly unhandled rejection: "+toDebugString(toCheck.value),toCheck.value instanceof Error?exceptionHandler(toCheck.value,errorMessage):exceptionHandler(errorMessage))}}function scheduleProcessQueue(state){!errorOnUnhandledRejections||state.pending||2!==state.status||state.pur||(0===queueSize&&0===checkQueue.length&&nextTick(processChecks),checkQueue.push(state)),!state.processScheduled&&state.pending&&(state.processScheduled=!0,++queueSize,nextTick(function(){(state=>{var fn,promise,pending=state.pending;state.processScheduled=!1,state.pending=void 0;try{for(var i=0,ii=pending.length;i<ii;++i){state.pur=!0,promise=pending[i][0],fn=pending[i][state.status];try{isFunction(fn)?resolvePromise(promise,fn(state.value)):(1===state.status?resolvePromise:rejectPromise)(promise,state.value)}catch(e){rejectPromise(promise,e)}}}finally{--queueSize,errorOnUnhandledRejections&&0===queueSize&&nextTick(processChecks)}})(state)}))}function resolvePromise(promise,val){promise.$$state.status||(val===promise?$$reject(promise,$qMinErr("qcycle","Expected promise to be resolved with value other than
1itself '{0}'",val)):function $$resolve(promise,val){var then;var done=!1;try{(isObject(val)||isFunction(val))&&(then=val.then),isFunction(then)?(promise.$$state.status=-1,then.call(val,doResolve,doReject,doNotify)):(promise.$$state.value=val,promise.$$state.status=1,scheduleProcessQueue(promise.$$state))}catch(e){doReject(e)}function doResolve(val){done||(done=!0,$$resolve(promise,val))}function doReject(val){done||(done=!0,$$reject(promise,val))}function doNotify(progress){notifyPromise(promise,progress)}}(promise,val))}function rejectPromise(promise,reason){promise.$$state.status||$$reject(promise,reason)}function $$reject(promise,reason){promise.$$state.value=reason,promise.$$state.status=2,scheduleProcessQueue(promise.$$state)}function notifyPromise(promise,progress){var callbacks=promise.$$state.pending;promise.$$state.status<=0&&callbacks&&callbacks.length&&nextTick(function(){for(var callback,result,i=0,ii=callbacks.length;i<ii;i++){result=callbacks[i][0],callback=callbacks[i][3];try{notifyPromise(result,isFunction(callback)?callback(progress):progress)}catch(e){exceptionHandler(e)}}})}function reject(reason){var result=new Promise;return rejectPromise(result,reason),result}function handleCallback(value,resolver,callback){var callbackOutput=null;try{isFunction(callback)&&(callbackOutput=callback())}catch(e){return reject(e)}return isPromiseLike(callbackOutput)?callbackOutput.then(function(){return resolver(value)},reject):resolver(value)}function when(value,callback,errback,progressBack){var result=new Promise;return resolvePromise(result,value),result.then(callback,errback,progressBack)}extend(Promise.prototype,{then:function(onFulfilled,onRejected,progressBack){var result;return void 0===onFulfilled&&void 0===onRejected&&void 0===progressBack?this:(result=new Promise,this.$$state.pending=this.$$
1state.pending||[],this.$$state.pending.push([result,onFulfilled,onRejected,progressBack]),0<this.$$state.status&&scheduleProcessQueue(this.$$state),result)},catch:function(callback){return this.then(null,callback)},finally:function(callback,progressBack){return this.then(function(value){return handleCallback(value,resolve,callback)},function(error){return handleCallback(error,reject,callback)},progressBack)}});var resolve=when;function $Q(resolver){var promise;if(isFunction(resolver))return promise=new Promise,resolver(function(value){resolvePromise(promise,value)},function(reason){rejectPromise(promise,reason)}),promise;throw $qMinErr("norslvr","Expected resolverFn, got '{0}'",resolver)}return $Q.prototype=Promise.prototype,$Q.defer=defer,$Q.reject=reject,$Q.when=when,$Q.resolve=resolve,$Q.all=function(promises){var result=new Promise,counter=0,results=isArray(promises)?[]:{};return forEach(promises,function(promise,key){counter++,when(promise).then(function(value){results[key]=value,--counter||resolvePromise(result,results)},function(reason){rejectPromise(result,reason)})}),0===counter&&resolvePromise(result,results),result},$Q.race=function(promises){var deferred=defer();return forEach(promises,function(promise){when(promise).then(deferred.resolve,deferred.reject)}),deferred.promise},$Q}function $$RAFProvider(){this.$get=["$window","$timeout",function($window,$timeout){var requestAnimationFrame=$window.requestAnimationFrame||$window.webkitRequestAnimationFrame,cancelAnimationFrame=$window.cancelAnimationFrame||$window.webkitCancelAnimationFrame||$window.webkitCancelRequestAnimationFrame,$window=!!requestAnimationFrame,raf=$window?function(fn){var id=requestAnimationFrame(fn);return function(){cancelAnimationFrame(id)}}:function(fn){var timer=$timeout(fn,16.66,!1);return function(){$timeout.cancel(timer)}};return raf.supported=$window,raf}]}function $RootScopeProvider(){var TTL=10,$rootScopeMinErr=minErr("$rootScope"),lastDirtyWatch=null,applyAsyncId=null;this.digestTtl=function(value){return TTL=arguments.length?value:TTL},this.$get=["$exceptionHandler","$parse","$browser",function($exceptionHandler,$parse,$browser){function destroyChildScope($event){$event.currentScope.$$destroyed=!0}function Scope(){this.$id=nextUid(),this.$$phase=this.$parent=this.$$watchers=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=null,(this.$root=this).$$destroyed=!1,this.$$listeners={},this.$$listenerCount={},this.$$watchersCount=0,this.$$isolateBindings=null}Scope.prototype={constructor:Scope,$new:function(isolate,parent){var child;return parent=parent||this,isolate?(child=new Scope).$root=this.$root:(this.$$ChildScope||(this.$$ChildScope=(parent=>{function ChildScope(){this.$$watchers=this.$$nextSibling=this.$$childHead=this.$$childTail=null,this.$$listeners={},this.$$listenerCount={},this.$$watchersCount=0,this.$id=nextUid(),this.$$ChildScope=null}return ChildScope.prototype=parent,ChildScope})(this)),child=new this.$$ChildScope),child.$parent=parent,child.$$prevSibling=parent.$$childTail,parent.$$childHead?(parent.$$childTail.$$nextSibling=child,parent.$$childTail=child):parent.$$childHead=parent.$$childTail=child,!isolate&&parent===this||child.$on("$destroy",destroyChildScope),child},$watch:function(watchExp,listener,objectEquality,prettyPrintExpression){var scope,array,watcher,get=$parse(watchExp);return get.$$watchDelegate?get.$$watchDelegate(this,listener,objectEquality,get,watchExp):(array=(scope=this).$$watchers,watcher={fn:listener,last:initWatchVal,get:get,exp:prettyPrintExpression||watchExp,eq:!!objectEquality},lastDirtyWatch=null,isFunction(listener)||(watcher.fn=noop),array||((array=scope.$$watchers=[]).$$digestWatchIndex=-1),array.unshift(watcher),array.$$digestWatchIndex++,incrementWatchersCount(this,1),function(){var index=arrayRemove(array,watcher);0<=index&&(incrementWatchersCount(scope,-1),index<array.$$digestWatchIndex)&&array.$$digestWatchIndex--,lastDirtyWatch=null})},$watchGroup:function(watchExpressions,listener){var shouldCall,oldValues=new Array(watchExpressions.length),newValues=new Array(watchExpressions.length),deregisterFns=[],self=this,changeReactionScheduled=!1,firstRun=!0;return watchExpressions.length?1===watchExpressions.length?this.$watch(watchExpressions[0],function(value,oldValue,scope){newValues[0]=value,oldValues[0]=oldValue,listener(newValues,value===oldValue?newValues:oldValues,scope)}):(forEach(watchExpressions,function(expr,i){expr=self.$watch(expr,function(value,oldValue){newValues[i]=value,oldValues[i]=oldValue,changeReactionScheduled||(changeReactionScheduled=!0,self.$evalAsync(watchGroupAction))});deregisterFns.push(expr)}),function(){for(;deregisterFns.length;)deregisterFns.shift()()}):(shouldCall=!0,self.$evalAsync(function(){shouldCall&&listener(newValues,newValues,self)}),function(){shouldCall=!1});function watchGroupAction(){changeReactionScheduled=!1,firstRun?(firstRun=!1,listener(newValues,newValues,self)):listener(newValues,oldValues,self)}},$watchCollection:function(obj,listener){$watchCollectionInterceptor.$stateful=!0;var newValue,oldValue,veryOldValue,self=this,trackVeryOldValue=1<listener.length,changeDetected=0,obj=$parse(obj,$watchCollectionInterceptor),internalArray=[],internalObject={},initRun=!0,oldLength=0;function $watchCollectionInterceptor(_value){var newLength,key,newItem,oldItem;if(void 0!==(newValue=_value)){if(isObject(newValue))if(isArrayLike(newValue)){oldValue!==internalArray&&(oldLength=(oldValue=internalArray).length=0,changeDetected++),newLength=newValue.length,oldLength!==newLength&&(changeDetected++,oldValue.length=oldLength=newLength);for(var i=0;i<newLength;i++)oldItem=oldValue[i],newItem=newValue[i],oldItem!=oldItem&&newItem!=newItem||oldItem===newItem||(changeDetected++,oldValue[i]=newItem)}else{for(key in oldValue!==internalObject&&(oldValue=internalObject={},oldLength=0,changeDetected++),newLength=0,newValue)hasOwnProperty.call(newValue,key)&&(newLength++,newItem=newValue[key],oldItem=oldValue[key],key in oldValue?oldItem!=oldItem&&newItem!=newItem||oldItem===newItem||(changeDetected++,oldValue[key]=newItem):(oldLe
1ngth++,oldValue[key]=newItem,changeDetected++));if(newLength<oldLength)for(key in changeDetected++,oldValue)hasOwnProperty.call(newValue,key)||(oldLength--,delete oldValue[key])}else oldValue!==newValue&&(oldValue=newValue,changeDetected++);return changeDetected}}return this.$watch(obj,function(){if(initRun?(initRun=!1,listener(newValue,newValue,self)):listener(newValue,veryOldValue,self),trackVeryOldValue)if(isObject(newValue))if(isArrayLike(newValue)){veryOldValue=new Array(newValue.length);for(var i=0;i<newValue.length;i++)veryOldValue[i]=newValue[i]}else for(var key in veryOldValue={},newValue)hasOwnProperty.call(newValue,key)&&(veryOldValue[key]=newValue[key]);else veryOldValue=newValue})},$digest:function(){var watch,value,last,watchers,next,logIdx,asyncTask,ttl=TTL,watchLog=[];beginPhase("$digest"),$browser.$$checkUrlChange(),this===$rootScope&&null!==applyAsyncId&&($browser.defer.cancel(applyAsyncId),flushApplyAsync()),lastDirtyWatch=null;do{for(var dirty=!1,current=this,asyncQueuePosition=0;asyncQueuePosition<asyncQueue.length;asyncQueuePosition++){try{(0,(asyncTask=asyncQueue[asyncQueuePosition]).fn)(asyncTask.scope,asyncTask.locals)}catch(e){$exceptionHandler(e)}lastDirtyWatch=null}asyncQueue.length=0;traverseScopesLoop:do{if(watchers=current.$$watchers)for(watchers.$$digestWatchIndex=watchers.length;watchers.$$digestWatchIndex--;)try{if(watch=watchers[watchers.$$digestWatchIndex])if((value=(0,watch.get)(current))===(last=watch.last)||(watch.eq?equals(value,last):isNumberNaN(value)&&isNumberNaN(last))){if(watch===lastDirtyWatch){dirty=!1;break traverseScopesLoop}}else dirty=!0,(lastDirtyWatch=watch).last=watch.eq?copy(value,null):value,(0,watch.fn)(value,last===initWatchVal?value:last,current),ttl<5&&(watchLog[logIdx=4-ttl]||(watchLog[logIdx]=[]),watchLog[logIdx].push({msg:isFunction(watch.exp)?"fn: "+(watch.exp.name||watch.exp.toString()):watch.exp,newVal:value,oldVal:last}))}catch(e){$exceptionHandler(e)}if(!(next=current.$$watchersCount&¤t.$$childHead||current!==this&¤t.$$nextSibling))for(;current!==this&&!(next=current.$$nextSibling);)current=current.$parent}while(current=next);if((dirty||asyncQueue.length)&&!ttl--)throw clearPhase(),$rootScopeMinErr("infdig","{0} $digest() iterations reached. Aborting!\nWatchers fired in the last 5 iterations: {1}",TTL,watchLog)}while(dirty||asyncQueue.length);for(clearPhase();postDigestQueuePosition<postDigestQueue.length;)try{postDigestQueue[postDigestQueuePosition++]()}catch(e){$exceptionHandler(e)}postDigestQueue.length=postDigestQueuePosition=0,$browser.$$checkUrlChange()},$destroy:function(){if(!this.$$destroyed){var eventName,parent=this.$parent;for(eventName in this.$broadcast("$destroy"),this.$$destroyed=!0,this===$rootScope&&$browser.$$applicationDestroyed(),incrementWatchersCount(this,-this.$$watchersCount),this.$$listenerCount)decrementListenerCount(this,this.$$listenerCount[eventName],eventName);parent&&parent.$$childHead===this&&(parent.$$childHead=this.$$nextSibling),parent&&parent.$$childTail===this&&(parent.$$childTail=this.$$prevSibling),this.$$prevSibling&&(this.$$prevSibling.$$nextSibling=this.$$nextSibling),this.$$nextSibling&&(this.$$nextSibling.$$prevSibling=this.$$prevSibling),this.$destroy=this.$digest=this.$apply=this.$evalAsync=this.$applyAsync=noop,this.$on=this.$watch=this.$watchGroup=function(){return noop},this.$$listeners={},this.$$nextSibling=null,!function cleanUpScope($scope){9===msie&&($scope.$$childHead&&cleanUpScope($scope.$$childHead),$scope.$$nextSibling)&&cleanUpScope($scope.$$nextSibling),$scope.$parent=$scope.$$nextSibling=$scope.$$prevSibling=$scope.$$childHead=$scope.$$childTail=$scope.$root=$scope.$$watchers=null}(this)}},$eval:function(expr,locals){return $parse(expr)(this,locals)},$evalAsync:function(expr,locals){$rootScope.$$phase||asyncQueue.length||$browser.defer(function(){asyncQueue.length&&$rootScope.$digest()}),asyncQueue.push({scope:this,fn:$parse(expr),locals:locals})},$$postDigest:function(fn){postDigestQueue.push(fn)},$apply:function(expr){try{beginPhase("$apply");try{return this.$eval(expr)}finally{clearPhase()}}catch(e){$exceptionHandler(e)}finally{try{$rootScope.$digest()}catch(e){throw $exceptionHandler(e),e}}},$applyAsync:function(expr){var scope=this;expr&&applyAsyncQueue.push(function(){scope.$eval(expr)}),expr=$parse(expr),null===applyAsyncId&&(applyAsyncId=$browser.defer(function(){$rootScope.$apply(flushApplyAsync)}))},$on:function(name,listener){for(var namedListeners=this.$$listeners[name],current=(namedListeners||(this.$$listeners[name]=namedListeners=[]),namedListeners.push(listener),this);current.$$listenerCount[name]||(current.$$listenerCount[name]=0),current.$$listenerCount[name]++,current=current.$parent;);var self=this;return function(){var indexOfListener=namedListeners.indexOf(listener);-1!==indexOfListener&&(namedListeners[indexOfListener]=null,decrementListenerCount(self,1,name))}},$emit:function(name,args){var namedListeners,i,length,empty=[],scope=this,stopPropagation=!1,event={name:name,targetScope:scope,stopPropagation:function(){stopPropagation=!0},preventDefault:function(){event.defaultPrevented=!0},defaultPrevented:!1}
1,listenerArgs=concat([event],arguments,1);do{for(namedListeners=scope.$$listeners[name]||empty,event.currentScope=scope,i=0,length=namedListeners.length;i<length;i++)if(namedListeners[i])try{namedListeners[i].apply(null,listenerArgs)}catch(e){$exceptionHandler(e)}else namedListeners.splice(i,1),i--,length--;if(stopPropagation)return event.currentScope=null,event}while(scope=scope.$parent);return event.currentScope=null,event},$broadcast:function(name,args){var current=this,next=this,event={name:name,targetScope:this,preventDefault:function(){event.defaultPrevented=!0},defaultPrevented:!1};if(this.$$listenerCount[name]){for(var listeners,i,length,listenerArgs=concat([event],arguments,1);current=next;){for(i=0,length=(listeners=(event.currentScope=current).$$listeners[name]||[]).length;i<length;i++)if(listeners[i])try{listeners[i].apply(null,listenerArgs)}catch(e){$exceptionHandler(e)}else listeners.splice(i,1),i--,length--;if(!(next=current.$$listenerCount[name]&¤t.$$childHead||current!==this&¤t.$$nextSibling))for(;current!==this&&!(next=current.$$nextSibling);)current=current.$parent}event.currentScope=null}return event}};var $rootScope=new Scope,asyncQueue=$rootScope.$$asyncQueue=[],postDigestQueue=$rootScope.$$postDigestQueue=[],applyAsyncQueue=$rootScope.$$applyAsyncQueue=[],postDigestQueuePosition=0;return $rootScope;function beginPhase(phase){if($rootScope.$$phase)throw $rootScopeMinErr("inprog","{0} already in progress",$rootScope.$$phase);$rootScope.$$phase=phase}function clearPhase(){$rootScope.$$phase=null}function incrementWatchersCount(current,count){for(;current.$$watchersCount+=count,current=current.$parent;);}function decrementListenerCount(current,count,name){for(;current.$$listenerCount[name]-=count,0===current.$$listenerCount[name]&&delete current.$$listenerCount[name],current=current.$parent;);}function initWatchVal(){}function flushApplyAsync(){for(;applyAsyncQueue.length;)try{applyAsyncQueue.shift()()}catch(e){$exceptionHandler(e)}applyAsyncId=null}}]}function $$SanitizeUriProvider(){var aHrefSanitizationWhitelist=/^\s*(https?|ftp|mailto|tel|file):/,imgSrcSanitizationWhitelist=/^\s*((https?|ftp|file|blob):|data:image\/)/;this.aHrefSanitizationWhitelist=function(regexp){return void 0!==regexp?(aHrefSanitizationWhitelist=regexp,this):aHrefSanitizationWhitelist},this.imgSrcSanitizationWhitelist=function(regexp){return void 0!==regexp?(imgSrcSanitizationWhitelist=regexp,this):imgSrcSanitizationWhitelist},this.$get=function(){return function(uri,isImage){var isImage=isImage?imgSrcSanitizationWhitelist:aHrefSanitizationWhitelist,normalizedVal=urlResolve(uri).href;return""===normalizedVal||normalizedVal.match(isImage)?uri:"unsafe:"+normalizedVal}}}Parser.prototype={constructor:Parser,parse:function(text){return this.astCompiler.compile(text)}};var $sceMinErr=minErr("$sce"),SCE_CONTEXTS={HTML:"html",CSS:"css",URL:"url",RESOURCE_URL:"resourceUrl",JS:"js"},UNDERSCORE_LOWERCASE_REGEXP=/_([a-z])/g;function snakeToCamel(name){return name.replace(UNDERSCORE_LOWERCASE_REGEXP,fnCamelCaseReplace)}function adjustMatchers(matchers){var adjustedMatchers=[];return void 0!==matchers&&forEach(matchers,function(matcher){adjustedMatchers.push((matcher=>{if("self"===matcher)return matcher;if(isString(matcher)){if(-1<matcher.indexOf("***"))throw $sceMinErr("iwcard","Illegal sequence *** in string matcher. String: {0}",matcher);return matcher=escapeForRegexp(matcher).replace(/\\\*\\\*/g,".*").replace(/\\\*/g,"[^:/.?&;]*"),new RegExp("^"+matcher+"$")}if(isRegExp(matcher))return new RegExp("^"+matcher.source+"$");throw $sceMinErr("imatcher",'Matchers may only be "self", string patterns or RegExp objects')})(matcher))}),adjustedMatchers}function $SceDelegateProvider(){this.SCE_CONTEXTS=SCE_CONTEXTS;var resourceUrlWhitelist=["self"],resourceUrlBlacklist=[];this.resourceUrlWhitelist=function(value){return resourceUrlWhitelist=arguments.length?adjustMatchers(value):resourceUrlWhitelist},this.resourceUrlBlacklist=function(value){return resourceUrlBlacklist=arguments.length?adjustMatchers(value):resourceUrlBlacklist},this.$get=["$injector",function($injector){var htmlSanitizer=function(html){throw $sceMinErr("unsafe","Attempting to use an unsafe value in a safe context.")};function matchUrl(matcher,parsedUrl){return"self"===matcher?urlIsSameOrigin(p
1arsedUrl):matcher.exec(parsedUrl.href)}function generateHolderType(Base){function holderType(trustedValue){this.$$unwrapTrustedValue=function(){return trustedValue}}return(holderType.prototype=Base?new Base:holderType.prototype).valueOf=function(){return this.$$unwrapTrustedValue()},holderType.prototype.toString=function(){return this.$$unwrapTrustedValue().toString()},holderType}$injector.has("$sanitize")&&(htmlSanitizer=$injector.get("$sanitize"));var trustedValueHolderBase=generateHolderType(),byType={};return byType[SCE_CONTEXTS.HTML]=generateHolderType(trustedValueHolderBase),byType[SCE_CONTEXTS.CSS]=generateHolderType(trustedValueHolderBase),byType[SCE_CONTEXTS.URL]=generateHolderType(trustedValueHolderBase),byType[SCE_CONTEXTS.JS]=generateHolderType(trustedValueHolderBase),byType[SCE_CONTEXTS.RESOURCE_URL]=generateHolderType(byType[SCE_CONTEXTS.URL]),{trustAs:function(type,trustedValue){var Constructor=byType.hasOwnProperty(type)?byType[type]:null;if(!Constructor)throw $sceMinErr("icontext","Attempted to trust a value in invalid context. Context: {0}; Value: {1}",type,trustedValue);if(null==trustedValue||""===trustedValue)return trustedValue;if("string"!=typeof trustedValue)throw $sceMinErr("itype","Attempted to trust a non-string value in a content requiring a string: Context: {0}",type);return new Constructor(trustedValue)},getTrusted:function(type,maybeTrusted){if(null==maybeTrusted||""===maybeTrusted)return maybeTrusted;var constructor=byType.hasOwnProperty(type)?byType[type]:null;if(constructor&&maybeTrusted instanceof constructor)return maybeTrusted.$$unwrapTrustedValue();if(type===SCE_CONTEXTS.RESOURCE_URL){if((url=>{for(var parsedUrl=urlResolve(url.toString()),allowed=!1,i=0,n=resourceUrlWhitelist.length;i<n;i++)if(matchUrl(resourceUrlWhitelist[i],parsedUrl)){allowed=!0;break}if(allowed)for(i=0,n=resourceUrlBlacklist.length;i<n;i++)if(matchUrl(resourceUrlBlacklist[i],parsedUrl)){allowed=!1;break}return allowed})(maybeTrusted))return maybeTrusted;throw $sceMinErr("insecurl","Blocked loading resource from url not allowed by $sceDelegate policy. URL: {0}",maybeTrusted.toString())}if(type===SCE_CONTEXTS.HTML)return htmlSanitizer(maybeTrusted);throw $sceMinErr("unsafe","Attempting to use an unsafe value in a safe context.")},valueOf:function(maybeTrusted){return maybeTrusted instanceof trustedValueHolderBase?maybeTrusted.$$unwrapTrustedValue():maybeTrusted}}}]}function $SceProvider(){var enabled=!0;this.enabled=function(value){return enabled=arguments.length?!!value:enabled},this.$get=["$parse","$sceDelegate",function($parse,$sceDelegate){if(enabled&&msie<8)throw $sceMinErr("iequirks","Strict Contextual Escaping does not support Internet Explorer version < 11 in quirks mode. You can fix this by adding the text <!doctype html> to the top of your HTML document. See http://docs.angularjs.org/api/ng.$sce for more information.");var sce=shallowCopy(SCE_CONTEXTS),parse=(sce.isEnabled=function(){return enabled},sce.trustAs=$sceDelegate.trustAs,sce.getTrusted=$sceDelegate.getTrusted,sce.valueOf=$sceDelegate.valueOf,enabled||(sce.trustAs=sce.getTrusted=function(type,value){return value},sce.valueOf=identity),sce.parseAs=function(type,expr){var parsed=$parse(expr);return parsed.literal&&parsed.constant?parsed:$parse(expr,function(value){return sce.getTrusted(type,value)})},sce.parseAs),getTrusted=sce.getTrusted,trustAs=sce.trustAs;return forEach(SCE_CONTEXTS,function(enumValue,name){name=lowercase(name);sce[snakeToCamel("parse_as_"+name)]=function(expr){return parse(enumValue,expr)},sce[snakeToCamel("get_trusted_"+name)]=function(value){return getTrusted(enumValue,value)},sce[snakeToCamel("trust_as_"+name)]=function(value){return trustAs(enumValue,value)}}),sce}]}function $SnifferProvider(){this.$get=["$window","$document",function($window,$document){var eventSupport={},hasHistoryPushState=!(!($window.nw&&$window.nw.process)&&$window.chrome&&($window.chrome.app&&$window.chrome.app.runtime||!$window.chrome.app&&$window.chrome.runtime&&$window.chrome.runtime.id))&&$window.history&&$window.history.pushState,android=toInt((/android (\d+)/.exec(lowercase(($window.navigator||{}).userAgent))||[])[1]),$window=/Boxee/i.test(($window.navigator||{}).userAgent),document=$document[0]||{},$document=document.body&&document.body.style,transitions=!1,animations=!1;return $document&&(transitions=!!("transition"in $document||"webkitTransition"in $document),animations=!!("animation"in $document||"webkitAnimation"in $document)),{history:!(!hasHistoryPushState||android<4||$window),hasEvent:function(event){var divElm;return("input"!==event||!msie)&&(void 0===eventSupport[event]&&(divElm=document.createElement("div"),eventSupport[event]="on"+event in divElm),eventSupport[event])},csp:csp(),transitions:transitions,animations:animations,android:android}}]}var $templateRequestMinErr=minErr("$compile");function $TemplateRequestProvider(){var httpOptions;this.httpOptions=function(val){return val?(httpOptions=val,this):httpOptions},this.$get=["$exceptionHandler","$templateCache","$http","$q","$sce",function($exceptionHandler,$templateCache,$http,$q,$sce){function handleRequestFn(tpl,ignoreRequestError){handleRequestFn.totalPendingRequests++,isString(tpl)&&void 0!==$templateCache.get(tpl)||(tpl=$sce.getTrustedResourceUrl(tpl));var transformResponse=$http.defaults&&$http.defaults.transformResponse;return isArray(transformResponse)?transformResponse=transformResponse.filter(function(transformer){return transformer!==defaultHttpResponseTransform}):transformResponse===defaultHttpResponseTransform&&(transformResponse=null),$http.get(tpl,extend({cache:$templateCache,transformResponse:transformResponse},httpOptions)).finally(function(){handleRequestFn.totalPendingRequests--}).then(function(response){return $templateCache.put(tpl,response.data),response.data},function(resp){ignoreRequestError||(resp=$templateRequestMinErr("tpload","Failed to load template: {0} (HTTP status: {1} {2})",tpl,resp.status,resp.statusText),$exceptionHandler(resp));return $q.reject(resp)})}return handleRequestFn.totalPendingRequests=0,handleRequestFn}]}
1function $$TestabilityProvider(){this.$get=["$rootScope","$browser","$location",function($rootScope,$browser,$location){var testability={findBindings:function(element,expression,opt_exactMatch){var element=element.getElementsByClassName("ng-binding"),matches=[];return forEach(element,function(binding){var dataBinding=angular.element(binding).data("$binding");dataBinding&&forEach(dataBinding,function(bindingName){opt_exactMatch?new RegExp("(^|\\s)"+escapeForRegexp(expression)+"(\\s|\\||$)").test(bindingName)&&matches.push(binding):-1!==bindingName.indexOf(expression)&&matches.push(binding)})}),matches},findModels:function(element,expression,opt_exactMatch){for(var prefixes=["ng-","data-ng-","ng\\:"],p=0;p<prefixes.length;++p){var elements=element.querySelectorAll("["+prefixes[p]+"model"+(opt_exactMatch?"=":"*=")+'"'+expression+'"]');if(elements.length)return elements}},getLocation:function(){return $location.url()},setLocation:function(url){url!==$location.url()&&($location.url(url),$rootScope.$digest())},whenStable:function(callback){$browser.notifyWhenNoOutstandingRequests(callback)}};return testability}]}function $TimeoutProvider(){this.$get=["$rootScope","$browser","$q","$$q","$exceptionHandler",function($rootScope,$browser,$q,$$q,$exceptionHandler){var deferreds={};function timeout(fn,delay,invokeApply){isFunction(fn)||(invokeApply=delay,delay=fn,fn=noop);var args=sliceArgs(arguments,3),skipApply=void 0!==invokeApply&&!invokeApply,deferred=(skipApply?$$q:$q).defer(),promise=deferred.promise,invokeApply=$browser.defer(function(){try{deferred.resolve(fn.apply(null,args))}catch(e){deferred.reject(e),$exceptionHandler(e)}finally{delete deferreds[promise.$$timeoutId]}skipApply||$rootScope.$apply()},delay);return promise.$$timeoutId=invokeApply,deferreds[invokeApply]=deferred,promise}return timeout.cancel=function(promise){return!!(promise&&promise.$$timeoutId in deferreds)&&(deferreds[promise.$$timeoutId].promise.catch(noop),deferreds[promise.$$timeoutId].reject("canceled"),delete deferreds[promise.$$timeoutId],$browser.defer.cancel(promise.$$timeoutId))},timeout}]}var urlParsingNode=window.document.createElement("a"),originUrl=urlResolve(window.location.href);function urlResolve(url){return msie&&(urlParsingNode.setAttribute("href",url),url=urlParsingNode.href),urlParsingNode.setAttribute("href",url),{href:urlParsingNode.href,protocol:urlParsingNode.protocol?urlParsingNode.protocol.replace(/:$/,""):"",host:urlParsingNode.host,search:urlParsingNode.search?urlParsingNode.search.replace(/^\?/,""):"",hash:urlParsingNode.hash?urlParsingNode.hash.replace(/^#/,""):"",hostname:urlParsingNode.hostname,port:urlParsingNode.port,pathname:"/"===urlParsingNode.pathname.charAt(0)?urlParsingNode.pathname:"/"+urlParsingNode.pathname}}function urlIsSameOrigin(requestUrl){requestUrl=isString(requestUrl)?urlResolve(requestUrl):requestUrl;return requestUrl.protocol===originUrl.protocol&&requestUrl.host===originUrl.host}function $WindowProvider(){this.$get=valueFn(window)}function $$CookieReader($document){var rawDocument=$document[0]||{},lastCookies={},lastCookieString="";function safeDecodeURIComponent(str){try{return decodeURIComponent(str)}catch(e){return str}}return function(){var cookieArray,cookie,i,index,name,currentCookieString=(rawDocument=>{try{return rawDocument.cookie||""}catch(e){return""}})(rawDocument);if(currentCookieString!==lastCookieString)for(cookieArray=(lastCookieString=currentCookieString).split("; "),lastCookies={},i=0;i<cookieArray.length;i++)0<(index=(cookie=cookieArray[i]).indexOf("="))&&(name=safeDecodeURIComponent(cookie.substring(0,index)),void 0===lastCookies[name])&&(lastCookies[name]=safeDecodeURIComponent(cookie.substring(index+1)));return lastCookies}}function $$CookieReaderProvider(){this.$get=$$CookieReader}function $FilterProvider($provide){function register(name,factory){var filters;return isObject(name)?(filters={},forEach(name,function(filter,key){filters[key]=register(key,filter)}),filters):$provide.factory(name+"Filter",factory)}this.register=register,this.$get=["$injector",function($injector){return function(name){return $injector.get(name+"Filter")}}],register("currency",currencyFilter),register("date",dateFilter),register("filter",filterFilter),register("json",jsonFilter),register("limitTo",limitToFilter),register("lowercase",lowercaseFilter),register("number",numberFilter),register("orderBy",orderByFilter),register("uppercase",uppercaseFilter)}function filterFilter(){return function(array,expression,comparator,anyPropertyKey){if(!isArrayLike(array)){if(null==array)return array;throw minErr("filter")("notarray","Expected array but received: {0}",array)}var predicateFn,matchAgainstAnyProp;switch(anyPropertyKey=anyPropertyKey||"$",getTypeForFilter(expression)){case"function":predicateFn=expression;break;case"boolean":case"null":case"number":case"string":matchAgainstAnyProp=!0;case"object":predicateFn=((expression,comparator,anyPropertyKey,matchAgainstAnyProp)=>{var shouldMatchPrimitives=isObject(expression)&&anyPropertyKey in expression;return!0===comparator?comparator=equals:isFunction(comparator)||(comparator=function(actual,expected){return void 0!==actual&&(null===actual||null===expected?actual===expected:!(isObject(expected)||isObject(actual)&&!hasCustomToString(actual))&&(actual=lowercase(""+actual),expected=lowercase(""+expected),-1!==actual.indexOf(expected)))}),function(item){return shouldMatchPrimitives&&!isObject(item)?deepCompare(item,expression[anyPropertyKey],comparator,anyPropertyKey,!1):deepCompare(item,expression,comparator,anyPropertyKey,matchAgainstAnyProp)}})(expression,comparator,anyPropertyKey,matchAgainstAnyProp);break;default:return array}return Array.prototype.filter.call(array,predicateFn)}}function deepCompare(actual,expected,comparator,anyPropertyKey,matchAgainstAnyProp,dontMatchWholeObject){var key,actualType=getTypeForFilter(actual),expectedType=getTypeForFilter(expected);if("string"===expectedType&&"!"===expected.charAt(0))return!deepCompare(actual,expected.substring(1),comparator,anyPropertyKey,matchAgainstAnyProp);if(isArray(actual))return actual.some(function(item){return deepCompare(item,expected,comparator,anyPropertyKey,matchAgainstAnyProp)});switch(actualType){case"object":if(matchAgainstAnyProp){for(key in actual)if(key.charAt&&"$"!==key.charAt(0)&&deepCompare(actual[key],expected,comparator,anyPropertyKey,!0))return!0;return!dontMatchWholeObject&&deepCompare(actual,expected,comparator,anyPropertyKey,!1)}if("object"!==expectedType)return comparator(actual,expected);for(key in expected){var expectedVal=expected[key];if(!isFunction(expectedVal)&&void 0!==expectedVal){var matchAnyProperty=key===anyPropertyKey;if(!deepCompare(matchAnyProperty?actual:actual[key],expectedVal,comparator,anyPropertyKey,matchAnyProperty,matchAnyProperty))return!1}}return!0;case"function":return!1;default:return comparator(actual,expected)}}function getTypeForFilter(val){return null===val?"null":typeof val}$$CookieReader.$inject=["$document"],$FilterProvider.$inject=["$provide"];var MAX_DIGITS=22,DECIMAL_SEP=".",ZERO_CHAR="0";function currencyFilter($locale){var formats=$locale.NUMBER_FORMATS;return function(amount,currencySymbol,fractionSize){return void 0===currencySymbol&&(currencySymbol=formats.CURRENCY_SYM),void 0===fractionSize&&(fractionSize=formats.PATTERNS[1].maxFrac),null==amount?amount:formatNumber(amount,formats.PATTERNS[1],formats.GROUP_SEP,formats.DECIMAL_SEP,fractionSize).replace(/\u00A4/g,currencySymbol)}}function numberFilter($locale){var formats=$locale.NUMBER_FORMATS;return function(number,fractionSize){return null==number?number:formatNumber(number,formats.PATTERNS[0],formats.GROUP_SEP,formats.DECIMAL_SEP,fractionSize)}}function formatNumber(number,pattern,groupSep,decimalSep,fractionSize){if(!isString(number)&&!isNumber(number)||isNaN(number))return"";var isInfinity=!isFinite(number),isZero=!1,numStr=Math.abs(number)+"",formattedText="";if(isInfinity)formattedText="â";else{((parsedNumber,fractionSize,minFrac,maxFrac)=>{var digits=parsedNumber.d,fractionLen=digits.length-parsedNumber.i,roun
1dAt=(fractionSize=void 0===fractionSize?Math.min(Math.max(minFrac,fractionLen),maxFrac):+fractionSize)+parsedNumber.i,minFrac=digits[roundAt];if(0<roundAt){digits.splice(Math.max(parsedNumber.i,roundAt));for(var j=roundAt;j<digits.length;j++)digits[j]=0}else{fractionLen=Math.max(0,fractionLen),parsedNumber.i=1,digits.length=Math.max(1,roundAt=fractionSize+1),digits[0]=0;for(var i=1;i<roundAt;i++)digits[i]=0}if(5<=minFrac)if(roundAt-1<0){for(var k=0;roundAt<k;k--)digits.unshift(0),parsedNumber.i++;digits.unshift(1),parsedNumber.i++}else digits[roundAt-1]++;for(;fractionLen<Math.max(0,fractionSize);fractionLen++)digits.push(0);(maxFrac=digits.reduceRight(function(carry,d,i,digits){return digits[i]=(d+=carry)%10,Math.floor(d/10)},0))&&(digits.unshift(maxFrac),parsedNumber.i++)})(isInfinity=(numStr=>{var digits,numberOfIntegerDigits,i,j,zeros,exponent=0;for(0<(i=(numStr=-1<(numberOfIntegerDigits=numStr.indexOf(DECIMAL_SEP))?numStr.replace(DECIMAL_SEP,""):numStr).search(/e/i))?(numberOfIntegerDigits<0&&(numberOfIntegerDigits=i),numberOfIntegerDigits+=+numStr.slice(i+1),numStr=numStr.substring(0,i)):numberOfIntegerDigits<0&&(numberOfIntegerDigits=numStr.length),i=0;numStr.charAt(i)===ZERO_CHAR;i++);if(i===(zeros=numStr.length))digits=[0],numberOfIntegerDigits=1;else{for(zeros--;numStr.charAt(zeros)===ZERO_CHAR;)zeros--;for(numberOfIntegerDigits-=i,digits=[],j=0;i<=zeros;i++,j++)digits[j]=+numStr.charAt(i)}return MAX_DIGITS<numberOfIntegerDigits&&(digits=digits.splice(0,MAX_DIGITS-1),exponent=numberOfIntegerDigits-1,numberOfIntegerDigits=1),{d:digits,e:exponent,i:numberOfIntegerDigits}})(numStr),fractionSize,pattern.minFrac,pattern.maxFrac);for(var digits=isInfinity.d,integerLen=isInfinity.i,numStr=isInfinity.e,fractionSize=[],isZero=digits.reduce(function(isZero,d){return isZero&&!d},!0);integerLen<0;)digits.unshift(0),integerLen++;0<integerLen?fractionSize=digits.splice(integerLen,digits.length):(fractionSize=digits,digits=[0]);var groups=[];for(digits.length>=pattern.lgSize&&groups.unshift(digits.splice(-pattern.lgSize,digits.length).join(""));digits.length>pattern.gSize;)groups.unshift(digits.splice(-pattern.gSize,digits.length).join(""));digits.length&&groups.unshift(digits.join("")),formattedText=groups.join(groupSep),fractionSize.length&&(formattedText+=decimalSep+fractionSize.join("")),numStr&&(formattedText+="e+"+numStr)}return number<0&&!isZero?pattern.negPre+formattedText+pattern.negSuf:pattern.posPre+formattedText+pattern.posSuf}function padNumber(num,digits,trim,negWrap){var neg="";for((num<0||negWrap&&num<=0)&&(negWrap?num=1-num:(num=-num,neg="-")),num=""+num;num.length<digits;)num=ZERO_CHAR+num;return neg+(num=trim?num.substr(num.length-digits):num)}function dateGetter(name,size,offset,trim,negWrap){return offset=offset||0,function(date){date=date["get"+name]();return(0<offset||-offset<date)&&(date+=offset),padNumber(date=0===date&&-12===offset?12:date,size,trim,negWrap)}}function dateStrGetter(name,shortForm,standAlone){return function(date,formats){date=date["get"+name]();return formats[uppercase((standAlone?"STANDALONE":"")+(shortForm?"SHORT":"")+name)][date]}}function getFirstThursdayOfYear(year){var dayOfWeekOnFirst=new Date(year,0,1).getDay();return new Date(year,0,(dayOfWeekOnFirst<=4?5:12)-dayOfWeekOnFirst)}function weekGetter(size){return function(date){var firstThurs=getFirstThursdayOfYear(date.getFullYear()),date=(date=date,new Date(date.getFullYear(),date.getMonth(),date.getDate()+(4-date.getDay())));return padNumber(1+Math.round((+date-+firstThurs)/6048e5),size)}}function eraGetter(date,formats){return date.getFullYear()<=0?formats.ERAS[0]:formats.ERAS[1]}currencyFilter.$inject=["$locale"];var DATE_FORMATS={yyyy:dateGetter("FullYear",4,0,!(numberFilter.$inject=["$locale"]),!0),yy:dateGetter("FullYear",2,0,!0,!0),y:dateGetter("FullYear",1,0,!1,!0),MMMM:dateStrGetter("Month"),MMM:dateStrGetter("Month",!0),MM:dateGetter("Month",2,1),M:dateGetter("Month",1,1),LLLL:dateStrGetter("Month",!1,!0),dd:dateGetter("Date",2),d:dateGetter("Date",1),HH:dateGetter("Hours",2),H:dateGetter("Hours",1),hh:dateGetter("Hours",2,-12),h:dateGetter("Hours",1,-12),mm:dateGetter("Minutes",2),m:dateGetter("Minutes",1),ss:dateGetter("Seconds",2),s:dateGetter("Seconds",1),sss:dateGetter("Milliseconds",3),EEEE:dateStrGetter("Day"),EEE:dateStrGetter("Day",!0),a:function(date,formats){return date.getHours()<12?formats.AMPMS[0]:formats.AMPMS[1]},Z:function(date,formats,offset){var paddedZone=0<=(offset=-1*offset)?"+":"";return paddedZone+=padNumber(Math[0<offset?"floor":"ceil"](offset/60),2)+padNumber(Math.abs(offset%60),2)},ww:weekGetter(2),w:weekGetter(1),G:eraGetter,GG:eraGetter,GGG:eraGetter,GGGG:function(date,formats){return date.getFullYear()<=0?formats.ERANAMES[0]:formats.ERANAMES[1]}}
1,DATE_FORMATS_SPLIT=/((?:[^yMLdHhmsaZEwG']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|L+|d+|H+|h+|m+|s+|a|Z|G+|w+))(.*)/,NUMBER_STRING=/^-?\d+$/;function dateFilter($locale){var R_ISO8601_STR=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/;return function(date,format,timezone){var fn,match,text="",parts=[];if(format=$locale.DATETIME_FORMATS[format=format||"mediumDate"]||format,!isDate(date=isNumber(date=isString(date)?(NUMBER_STRING.test(date)?toInt:string=>{var date,timeSetter,dateSetter,tzHour,tzMin,match;return(match=string.match(R_ISO8601_STR))?(date=new Date(0),tzMin=tzHour=0,dateSetter=match[8]?date.setUTCFullYear:date.setFullYear,timeSetter=match[8]?date.setUTCHours:date.setHours,match[9]&&(tzHour=toInt(match[9]+match[10]),tzMin=toInt(match[9]+match[11])),dateSetter.call(date,toInt(match[1]),toInt(match[2])-1,toInt(match[3])),dateSetter=toInt(match[4]||0)-tzHour,tzHour=toInt(match[5]||0)-tzMin,tzMin=toInt(match[6]||0),match=Math.round(1e3*parseFloat("0."+(match[7]||0))),timeSetter.call(date,dateSetter,tzHour,tzMin,match),date):string})(date):date)?new Date(date):date)||!isFinite(date.getTime()))return date;for(;format;)format=(match=DATE_FORMATS_SPLIT.exec(format))?(parts=concat(parts,match,1)).pop():(parts.push(format),null);var dateTimezoneOffset=date.getTimezoneOffset();return timezone&&(dateTimezoneOffset=timezoneToOffset(timezone,dateTimezoneOffset),date=convertTimezoneToLocal(date,timezone,!0)),forEach(parts,function(value){fn=DATE_FORMATS[value],text+=fn?fn(date,$locale.DATETIME_FORMATS,dateTimezoneOffset):"''"===value?"'":value.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),text}}function jsonFilter(){return function(object,spacing){return toJson(object,spacing=void 0===spacing?2:spacing)}}dateFilter.$inject=["$locale"];var lowercaseFilter=valueFn(lowercase),uppercaseFilter=valueFn(uppercase);function limitToFilter(){return function(input,limit,begin){return limit=(Math.abs(Number(limit))===1/0?Number:toInt)(limit),!isNumberNaN(limit)&&isArrayLike(input=isNumber(input)?input.toString():input)?(begin=(begin=!begin||isNaN(begin)?0:toInt(begin))<0?Math.max(0,input.length+begin):begin,0<=limit?sliceFn(input,begin,begin+limit):0===begin?sliceFn(input,limit,input.length):sliceFn(input,Math.max(0,begin+limit),begin)):input}}function sliceFn(input,begin,end){return isString(input)?input.slice(begin,end):slice.call(input,begin,end)}function orderByFilter($parse){return function(array,sortPredicate,reverseOrder,compareFn){if(null!=array){if(!isArrayLike(array))throw minErr("orderBy")("notarray","Expected array but received: {0}",array);var predicates=(sortPredicate=0===(sortPredicate=isArray(sortPredicate)?sortPredicate:[sortPredicate]).length?["+"]:sortPredicate).map(function(predicate){var key,descending=1,get=identity;return isFunction(predicate)?get=predicate:isString(predicate)&&("+"!==predicate.charAt(0)&&"-"!==predicate.charAt(0)||(descending="-"===predicate.charAt(0)?-1:1,predicate=predicate.substring(1)),""!==predicate)&&(get=$parse(predicate)).constant&&(key=get(),get=function(value){return value[key]}),{get:get,descending:descending}}),descending=reverseOrder?-1:1,compare=isFunction(compareFn)?compareFn:defaultCompare,sortPredicate=Array.prototype.map.call(array,function(value,index){return{value:value,tieBreaker:{value:index,type:"number",index:index},predicateValues:predicates.map(function(predicate){return((value,index)=>{var type=typeof value;return null===value?(type="string",value="null"):"object"===type&&(value=(value=>(isFunction(value.valueOf)&&isPrimitive(value=value.valueOf())||hasCustomToString(value)&&isPrimitive(value=value.toString()),value))(value)),{value:value,type:type,index:index}})(predicate.get(value),index)})}});sortPredicate.sort(function(v1,v2){for(var i=0,ii=predicates.length;i<ii;i++){var result=compare(v1.predicateValues[i],v2.predicateValues[i]);if(result)return result*predicates[i].descending*descending}return compare(v1.tieBreaker,v2.tieBreaker)*descending}),array=sortPredicate.map(function(item){return item.value})}return array};function isPrimitive(value){switch(typeof value){case"number":case"boolean":case"string":return 1;default:return}}function defaultCompare(v1,v2){var value1,value2,result=0,type1=v1.type,type2=v2.type;return type1===type2?(value1=v1.value,value2=v2.value,"string"===type1?(value1=value1.toLowerCase(),value2=value2.toLowerCase()):"object"===type1&&(isObject(value1)&&(value1=v1.index),isObject(value2))&&(value2=v2.index),value1!==value2&&(result=value1<value2?-1:1)):result=type1<type2?-1:1,result}}function ngDirective(directive){return(directive=isFunction(directive)?{link:directive}:directive).restrict=directive.restrict||"AC",valueFn(directive)}orderByFilter.$inject=["$parse"];var htmlAnchorDirective=valueFn({restrict:"E",compile:function(element,attr){if(!attr.href&&!attr.xlinkHref)return function(scope,element){var href;"a"===element[0].nodeName.toLowerCase()&&(href="[object SVGAnimatedString]"===toString.call(element.prop("href"))?"xlink:href":"href",element.on("click",function(event){element.attr(href)||event.preventDefault()}))}}}),ngAttributeAliasDirectives={},nullFormCtrl=(forEach(BOOLEAN_ATTR,function(propName,attrName){var normalized,linkFn;function defaultLinkFn(scope,element,attr){scope.$watch(attr[normalized],function(value){attr.$set(attrName,!!value)})}"multiple"!==propName&&(normalized=directiveNormalize("ng-"+attrName),linkFn="checked"===propName?function(scope,element,attr){attr.ngModel!==attr[normalized]&&defaultLinkFn(scope,0,attr)}:defaultLinkFn,ngAttributeAliasDirectives[normalized]=function(){return{restrict:"A",priority:100,link:linkFn}})}
1),forEach(ALIASED_ATTR,function(htmlAttr,ngAttr){ngAttributeAliasDirectives[ngAttr]=function(){return{priority:100,link:function(scope,element,attr){if("ngPattern"===ngAttr&&"/"===attr.ngPattern.charAt(0)){var match=attr.ngPattern.match(REGEX_STRING_REGEXP);if(match)return void attr.$set("ngPattern",new RegExp(match[1],match[2]))}scope.$watch(attr[ngAttr],function(value){attr.$set(ngAttr,value)})}}}}),forEach(["src","srcset","href"],function(attrName){var normalized=directiveNormalize("ng-"+attrName);ngAttributeAliasDirectives[normalized]=function(){return{priority:99,link:function(scope,element,attr){var propName=attrName,name=attrName;"href"===attrName&&"[object SVGAnimatedString]"===toString.call(element.prop("href"))&&(name="xlinkHref",attr.$attr[name]="xlink:href",propName=null),attr.$observe(normalized,function(value){value?(attr.$set(name,value),msie&&propName&&element.prop(propName,attr[name])):"href"===attrName&&attr.$set(name,null)})}}}}),{$addControl:noop,$$renameControl:function(control,name){control.$name=name},$removeControl:noop,$setValidity:noop,$setDirty:noop,$setPristine:noop,$setSubmitted:noop});function FormController($element,$attrs,$scope,$animate,$interpolate){this.$$controls=[],this.$error={},this.$$success={},this.$pending=void 0,this.$name=$interpolate($attrs.name||$attrs.ngForm||"")($scope),this.$dirty=!1,this.$pristine=!0,this.$valid=!0,this.$invalid=!1,this.$submitted=!1,this.$$parentForm=nullFormCtrl,this.$$element=$element,this.$$animate=$animate,setupValidity(this)}function formDirectiveFactory(isNgForm){return["$timeout","$parse",function($timeout,$parse){return{name:"form",restrict:isNgForm?"EAC":"E",require:["form","^^?form"],controller:FormController,compile:function(formElement,attr){formElement.addClass(PRISTINE_CLASS).addClass(VALID_CLASS);var nameAttr=attr.name?"name":!(!isNgForm||!attr.ngForm)&&"ngForm";return{pre:function(scope,formElement,attr,ctrls){var handleFormSubmission,controller=ctrls[0];"action"in attr||(formElement[0].addEventListener("submit",handleFormSubmission=function(event){scope.$apply(function(){controller.$commitViewValue(),controller.$setSubmitted()}),event.preventDefault()}),formElement.on("$destroy",function(){$timeout(function(){formElement[0].removeEventListener("submit",handleFormSubmission)},0,!1)}));(ctrls[1]||controller.$$parentForm).$addControl(controller);var setter=nameAttr?getSetter(controller.$name):noop;nameAttr&&(setter(scope,controller),attr.$observe(nameAttr,function(newValue){controller.$name!==newValue&&(setter(scope,void 0),controller.$$parentForm.$$renameControl(controller,newValue),(setter=getSetter(controller.$name))(scope,controller))})),formElement.on("$destroy",function(){controller.$$parentForm.$removeControl(controller),setter(scope,void 0),extend(controller,nullFormCtrl)})}}}};function getSetter(expression){return""===expression?$parse('this[""]').assign:$parse(expression).assign||noop}}]}FormController.$inject=["$element","$attrs","$scope","$animate","$interpolate"],FormController.prototype={$rollbackViewValue:function(){forEach(this.$$controls,function(control){control.$rollbackViewValue()})},$commitViewValue:function(){forEach(this.$$controls,function(control){control.$commitViewValue()})},$addControl:function(control){assertNotHasOwnProperty(control.$name,"input"),this.$$controls.push(control),control.$name&&(this[control.$name]=control),control.$$parentForm=this},$$renameControl:function(control,newName){var oldName=control.$name;this[oldName]===control&&delete this[oldName],(this[newName]=control).$name=newName},$removeControl:function(control){control.$name&&this[control.$name]===control&&delete this[control.$name],forEach(this.$pending,function(value,name){this.$setValidity(name,null,control)},this),forEach(this.$error,function(value,name){this.$setValidity(name,null,control)},this),forEach(this.$$success,function(value,name){this.$setValidity(name,null,control)},this),arrayRemove(this.$$controls,control),control.$$parentForm=nullFormCtrl},$setDirty:function(){this.$$animate.removeClass(this.$$element,PRISTINE_CLASS),this.$$animate.addClass(this.$$element,DIRTY_CLASS),this.$dirty=!0,this.$pristine=!1,this.$$parentForm.$setDirty()},$setPristine:function(){this.$$animate.setClass(this.$$element,PRISTINE_CLASS,DIRTY_CLASS+" ng-submitted"),this.$dirty=!1,this.$pristine=!0,this.$submitted=!1,forEach(this.$$controls,function(control){control.$setPristine()})},$setUntouched:function(){forEach(this.$$controls,function(control){control.$setUntouched()})},$setSubmitted:function(){this.$$animate.addClass(this.$$element,"ng-submitted"),this.$submitted=!0,this.$$parentForm.$setSubmitted()}},addSetValidityMethod({clazz:FormController,set:function(object,property,controller){var list=object[property];list?-1===list.indexOf(controller)&&list.push(controller):object[property]=[controller]},unset:function(object,property,controller){var list=object[property];list&&(arrayRemove(list,controller),0===list.length)&&delete object[property]}});var formDirective=formDirectiveFactory(),ngFormDirective=formDirectiveFactory(!0);function setupValidity(instance){instance.$$classCache={},instance.$$classCache[INVALID_CLASS]=!(instance.$$classCache[VALID_CLASS]=instance.$$element.hasClass(VALID_CLASS))}function addSetValidityMethod(context){var clazz=context.clazz,set=context.set,unset=context.unset;function cachedToggleClass(ctrl,className,switchValue){switchValue&&!ctrl.$$classCache[className]?(ctrl.$$animate.addClass(ctrl.$$element,className),ctrl.$$classCache[className]=!0):!switchValue&&ctrl.$$classCache[className]&&(ctrl.$$animate.removeClass(ctrl.$$element,className),ctrl.$$classCache[className]=!1)}function toggleValidationCss(ctrl,validationErrorKey,isValid){validationErrorKey=vali
1dationErrorKey?"-"+snake_case(validationErrorKey,"-"):"",cachedToggleClass(ctrl,VALID_CLASS+validationErrorKey,!0===isValid),cachedToggleClass(ctrl,INVALID_CLASS+validationErrorKey,!1===isValid)}clazz.prototype.$setValidity=function(validationErrorKey,state,controller){(void 0===state?(ctrl,name,value,controller)=>{ctrl[name]||(ctrl[name]={}),set(ctrl[name],value,controller)}:(ctrl,name,value,controller)=>{ctrl[name]&&unset(ctrl[name],value,controller),isObjectEmpty(ctrl[name])&&(ctrl[name]=void 0)})(this,"$pending",validationErrorKey,controller),(isBoolean(state)?state?(unset(this.$error,validationErrorKey,controller),set):(set(this.$error,validationErrorKey,controller),unset):(unset(this.$error,validationErrorKey,controller),unset))(this.$$success,validationErrorKey,controller),this.$pending?(cachedToggleClass(this,"ng-pending",!0),this.$valid=this.$invalid=void 0,toggleValidationCss(this,"",null)):(cachedToggleClass(this,"ng-pending",!1),this.$valid=isObjectEmpty(this.$error),this.$invalid=!this.$valid,toggleValidationCss(this,"",this.$valid)),toggleValidationCss(this,validationErrorKey,state=this.$pending&&this.$pending[validationErrorKey]?void 0:!this.$error[validationErrorKey]&&(!!this.$$success[validationErrorKey]||null)),this.$$parentForm.$setValidity(validationErrorKey,state,this)}}
1function isObjectEmpty(obj){if(obj)for(var prop in obj)if(obj.hasOwnProperty(prop))return!1;return!0}var ISO_DATE_REGEXP=/^\d{4,}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+(?:[+-][0-2]\d:[0-5]\d|Z)$/,URL_REGEXP=/^[a-z][a-z\d.+-]*:\/*(?:[^:@]+(?::[^@]+)?@)?(?:[^\s:/?#]+|\[[a-f\d:]+])(?::\d+)?(?:\/[^?#]*)?(?:\?[^#]*)?(?:#.*)?$/i,EMAIL_REGEXP=/^(?=.{1,254}$)(?=.{1,64}@)[-!#$%&'*+/0-9=?A-Z^_`a-z{|}~]+(\.[-!#$%&'*+/0-9=?A-Z^_`a-z{|}~]+)*@[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?(\.[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?)*$/,NUMBER_REGEXP=/^\s*(-|\+)?(\d+|(\d*(\.\d*)))([eE][+-]?\d+)?\s*$/,push=/^(\d{4,})-(\d{2})-(\d{2})$/,DATETIMELOCAL_REGEXP=/^(\d{4,})-(\d\d)-(\d\d)T(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,WEEK_REGEXP=/^(\d{4,})-W(\d\d)$/,MONTH_REGEXP=/^(\d{4,})-(\d\d)$/,TIME_REGEXP=/^(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,PARTIAL_VALIDATION_EVENTS="keydown wheel mousedown",PARTIAL_VALIDATION_TYPES=createMap(),inputType=(forEach("date,datetime-local,month,time,week".split(","),function(type){PARTIAL_VALIDATION_TYPES[type]=!0}),{text:function(scope,element,attr,ctrl,$sniffer,$browser){baseInputType(0,element,attr,ctrl,$sniffer,$browser),stringBasedInputType(ctrl)},date:createDateInputType("date",push,createDateParser(push,["yyyy","MM","dd"]),"yyyy-MM-dd"),"datetime-local":createDateInputType("datetimelocal",DATETIMELOCAL_REGEXP,createDateParser(DATETIMELOCAL_REGEXP,["yyyy","MM","dd","HH","mm","ss","sss"]),"yyyy-MM-ddTHH:mm:ss.sss"),time:createDateInputType("time",TIME_REGEXP,createDateParser(TIME_REGEXP,["HH","mm","ss","sss"]),"HH:mm:ss.sss"),week:createDateInputType("week",WEEK_REGEXP,function(isoWeek,existingDate){if(isDate(isoWeek))return isoWeek;if(isString(isoWeek)){WEEK_REGEXP.lastIndex=0;var year,hours,minutes,seconds,milliseconds,firstThurs,isoWeek=WEEK_REGEXP.exec(isoWeek);if(isoWeek)return year=+isoWeek[1],isoWeek=+isoWeek[2],milliseconds=seconds=minutes=hours=0,firstThurs=getFirstThursdayOfYear(year),isoWeek=7*(isoWeek-1),existingDate&&(hours=existingDate.getHours(),minutes=existingDate.getMinutes(),seconds=existingDate.getSeconds(),milliseconds=existingDate.getMilliseconds()),new Date(year,0,firstThurs.getDate()+isoWeek,hours,minutes,seconds,milliseconds)}return NaN},"yyyy-Www"),month:createDateInputType("month",MONTH_REGEXP,createDateParser(MONTH_REGEXP,["yyyy","MM"]),"yyyy-MM"),number:function(scope,element,attr,ctrl,$sniffer,$browser){var minVal,maxVal,stepVal;badInputChecker(0,element,0,ctrl),numberFormatterParser(ctrl),baseInputType(0,element,attr,ctrl,$sniffer,$browser),void 0===attr.min&&!attr.ngMin||(ctrl.$validators.min=function(value){return ctrl.$isEmpty(value)||void 0===minVal||minVal<=value},attr.$observe("min",function(val){minVal=parseNumberAttrVal(val),ctrl.$validate()}));void 0===attr.max&&!attr.ngMax||(ctrl.$validators.max=function(value){return ctrl.$isEmpty(value)||void 0===maxVal||value<=maxVal},attr.$observe("max",function(val){maxVal=parseNumberAttrVal(val),ctrl.$validate()}));void 0===attr.step&&!attr.ngStep||(ctrl.$validators.step=function(modelValue,viewValue){return ctrl.$isEmpty(viewValue)||void 0===stepVal||isValidForStep(viewValue,minVal||0,stepVal)},attr.$observe("step",function(val){stepVal=parseNumberAttrVal(val),ctrl.$validate()}))},url:function(scope,element,attr,ctrl,$sniffer,$browser){baseInputType(0,element,attr,ctrl,$sniffer,$browser),stringBasedInputType(ctrl),ctrl.$$parserName="url",ctrl.$validators.url=function(modelValue,viewValue){modelValue=modelValue||viewValue;return ctrl.$isEmpty(modelValue)||URL_REGEXP.test(modelValue)}},email:function(scope,element,attr,ctrl,$sniffer,$browser){baseInputType(0,element,attr,ctrl,$sniffer,$browser),stringBasedInputType(ctrl),ctrl.$$parserName="email",ctrl.$validators.email=function(modelValue,viewValue){modelValue=modelValue||viewValue;return ctrl.$isEmpty(modelValue)||EMAIL_REGEXP.test(modelValue)}},radio:function(scope,element,attr,ctrl){var doTrim=!attr.ngTrim||"false"!==trim(attr.ngTrim);void 0===attr.name&&element.attr("name",nextUid());element.on("click",function(ev){var value;element[0].checked&&(value=attr.value,doTrim&&(value=trim(value)),ctrl.$setViewValue(value,ev&&ev.type))}),ctrl.$render=function(){var value=attr.value;doTrim&&(value=trim(value)),element[0].checked=value===ctrl.$viewValue},attr.$observe("value",ctrl.$render)},range:function(scope,element,attr,ctrl,$sniffer,$browser){badInputChecker(0,element,0,ctrl),numberFormatterParser(ctrl),baseInputType(0,element,attr,ctrl,$sniffer,$browser);var supportsRange=ctrl.$$hasNativeValidators&&"range"===element[0].type,minVal=supportsRange?0:void 0,maxVal=supportsRange?100:void 0,stepVal=supportsRange?1:void 0,validity=element[0].validity,scope=void 0!==attr.min,$sniffer=void 0!==attr.max,$browser=void 0!==attr.step,originalRender=ctrl.$render;ctrl.$render=supportsRange&&void 0!==validity.rangeUnderflow&&void 0!==validity.rangeOverflow?function(){originalRender(),ctrl.$setViewValue(element.val())}:originalRender,scope&&(ctrl.$validators.min=supportsRange?function(){return!0}:function(modelValue,viewValue){return ctrl.$isEmpty(viewValue)||void 0===minVal||minVal<=v
1iewValue},setInitialValueAndObserver("min",function(val){minVal=parseNumberAttrVal(val),isNumberNaN(ctrl.$modelValue)||(supportsRange?((val=element.val())<minVal&&(val=minVal,element.val(val)),ctrl.$setViewValue(val)):ctrl.$validate())}));$sniffer&&(ctrl.$validators.max=supportsRange?function(){return!0}:function(modelValue,viewValue){return ctrl.$isEmpty(viewValue)||void 0===maxVal||viewValue<=maxVal},setInitialValueAndObserver("max",function(val){maxVal=parseNumberAttrVal(val),isNumberNaN(ctrl.$modelValue)||(supportsRange?(val=element.val(),maxVal<val&&(element.val(maxVal),val=maxVal<minVal?minVal:maxVal),ctrl.$setViewValue(val)):ctrl.$validate())}));$browser&&(ctrl.$validators.step=supportsRange?function(){return!validity.stepMismatch}:function(modelValue,viewValue){return ctrl.$isEmpty(viewValue)||void 0===stepVal||isValidForStep(viewValue,minVal||0,stepVal)},setInitialValueAndObserver("step",function(val){stepVal=parseNumberAttrVal(val),isNumberNaN(ctrl.$modelValue)||(supportsRange&&ctrl.$viewValue!==element.val()?ctrl.$setViewValue(element.val()):ctrl.$validate())}));
1function setInitialValueAndObserver(htmlAttrName,changeFn){element.attr(htmlAttrName,attr[htmlAttrName]),attr.$observe(htmlAttrName,changeFn)}},checkbox:function(scope,element,attr,ctrl,$sniffer,$browser,$filter,$parse){var trueValue=parseConstantExpr($parse,scope,"ngTrueValue",attr.ngTrueValue,!0),falseValue=parseConstantExpr($parse,scope,"ngFalseValue",attr.ngFalseValue,!1);element.on("click",function(ev){ctrl.$setViewValue(element[0].checked,ev&&ev.type)}),ctrl.$render=function(){element[0].checked=ctrl.$viewValue},ctrl.$isEmpty=function(value){return!1===value},ctrl.$formatters.push(function(value){return equals(value,trueValue)}),ctrl.$parsers.push(function(value){return value?trueValue:falseValue})},hidden:noop,button:noop,submit:noop,reset:noop,file:noop});function stringBasedInputType(ctrl){ctrl.$formatters.push(function(value){return ctrl.$isEmpty(value)?value:value.toString()})}function baseInputType(scope,element,attr,ctrl,$sniffer,$browser){var composing,timeout,deferListener,type=lowercase(element[0].type),listener=($sniffer.android||(composing=!1,element.on("compositionstart",function(){composing=!0}),element.on("compositionend",function(){composing=!1,listener()})),function(ev){var value;timeout&&($browser.defer.cancel(timeout),timeout=null),!composing&&(value=element.val(),ev=ev&&ev.type,"password"===type||attr.ngTrim&&"false"===attr.ngTrim||(value=trim(value)),ctrl.$viewValue!==value||""===value&&ctrl.$$hasNativeValidators)&&ctrl.$setViewValue(value,ev)});$sniffer.hasEvent("input")?element.on("input",listener):(deferListener=function(ev,input,origValue){timeout=timeout||$browser.defer(function(){timeout=null,input&&input.value===origValue||listener(ev)})},element.on("keydown",function(event){var key=event.keyCode;91===key||15<key&&key<19||37<=key&&key<=40||deferListener(event,this,this.value)}),$sniffer.hasEvent("paste")&&element.on("paste cut",deferListener)),element.on("change",listener),PARTIAL_VALIDATION_TYPES[type]&&ctrl.$$hasNativeValidators&&type===attr.type&&element.on(PARTIAL_VALIDATION_EVENTS,function(ev){var validity,origBadInput,origTypeMismatch;timeout||(validity=this[VALIDITY_STATE_PROPERTY],origBadInput=validity.badInput,origTypeMismatch=validity.typeMismatch,timeout=$browser.defer(function(){timeout=null,validity.badInput===origBadInput&&validity.typeMismatch===origTypeMismatch||listener(ev)}))}),ctrl.$render=function(){var value=ctrl.$isEmpty(ctrl.$viewValue)?"":ctrl.$viewValue;element.val()!==value&&element.val(value)}}function createDateParser(regexp,mapping){return function(iso,date){var map;if(isDate(iso))return iso;if(isString(iso)){if('"'===iso.charAt(0)&&'"'===iso.charAt(iso.length-1)&&(iso=iso.substring(1,iso.length-1)),ISO_DATE_REGEXP.test(iso))return new Date(iso);if(regexp.lastIndex=0,iso=regexp.exec(iso))return iso.shift(),map=date?{yyyy:date.getFullYear(),MM:date.getMonth()+1,dd:date.getDate(),HH:date.getHours(),mm:date.getMinutes(),ss:date.getSeconds(),sss:date.getMilliseconds()/1e3}:{yyyy:1970,MM:1,dd:1,HH:0,mm:0,ss:0,sss:0},forEach(iso,function(part,index){index<mapping.length&&(map[mapping[index]]=+part)}),new Date(map.yyyy,map.MM-1,map.dd,map.HH,map.mm,map.ss||0,1e3*map.sss||0)}return NaN}}function createDateInputType(type,regexp,parseDate,format){return function(scope,element,attr,ctrl,$sniffer,$browser,$filter){badInputChecker(0,element,0,ctrl),baseInputType(0,element,attr,ctrl,$sniffer,$browser);var previousDate,minVal,maxVal,timezone=ctrl&&ctrl.$options.getOption("timezone");function isValidDate(value){return value&&(!value.getTime||value.getTime()===value.getTime())}function parseObservedDateValue(val){return void 0===val||isDate(val)?val:parseDate(val)||void 0}ctrl.$$parserName=type,ctrl.$parsers.push(function(value){return ctrl.$isEmpty(value)?null:regexp.test(value)?(value=parseDate(value,previousDate),timezone?convertTimezoneToLocal(value,timezone):value):void 0}),ctrl.$formatters.push(function(value){if(value&&!isDate(value))throw ngModelMinErr("datefmt","Expected `{0}` to be a date",value);return isValidDate(value)?((previousDate=value)&&timezone&&(previousDate=convertTimezoneToLocal(previousDate,timezone,!0)),$filter("date")(value,format,timezone)):(previousDate=null,"")}),void 0===attr.min&&!attr.ngMin||(ctrl.$validators.min=function(value){return!isValidDate(value)||void 0===minVal||parseDate(value)>=minVal},attr.$observe("min",function(val){minVal=parseObservedDateValue(val),ctrl.$validate()})),void 0===attr.max&&!attr.ngMax||(ctrl.$validators.max=function(value){return!isValidDate(value)||void 0===maxVal||parseDate(value)<=maxVal},attr.$observe("max",function(val){maxVal=parseObservedDateValue(val),ctrl.$validate()}))}}function badInputChecker(scope,element,attr,ctrl){var node=element[0];(ctrl.$$hasNativeValidators=isObject(node.validity))&&ctrl.$parsers.push(function(value){var validity=element.prop(VALIDITY_STATE_PROPERTY)||{};return validity.badInput||validity.typeMismatch?void 0:value})}function numberFormatterParser(ctrl){ctrl.$$parserName="number",ctrl.$parsers.push(function(value){return ctrl.$isEmpty(value)?null:NUMBER_REGEXP.test(value)?parseFloat(value):void 0}),ctrl.$formatters.push(function(value){if(!ctrl.$isEmpty(value)){if(!isNumber(value))throw ngModelMinErr("numfmt","Expected `{0}` to be a number",value);value=value.toString()}return value})}function parseNumberAttrVal(val){return void 0===val||isNumber(val)||(val=parseFloat(val)),isNumberNaN(val)?void 0:val}function isNumberInteger(num){return(0|num)===num}function countDecimals(num){var numString=num.toString(),decimalSymbolIndex=numString.indexOf(".");if(-1!==decimalSymbolIndex)return numString.length-decimalSymbolIndex-1;if(-1<num&&num<1){decimalSymbolIndex=/e-(\d+)$/.exec(numString);if(decimalSymbolIndex)return Number(decimalSymbolIndex[1])}return 0}
1function isValidForStep(viewValue,stepBase,step){var stepDecimals,valueDecimals,stepBaseDecimals,viewValue=Number(viewValue),isNonIntegerValue=!isNumberInteger(viewValue),isNonIntegerStepBase=!isNumberInteger(stepBase),isNonIntegerStep=!isNumberInteger(step);return(isNonIntegerValue||isNonIntegerStepBase||isNonIntegerStep)&&(valueDecimals=isNonIntegerValue?countDecimals(viewValue):0,stepBaseDecimals=isNonIntegerStepBase?countDecimals(stepBase):0,stepDecimals=isNonIntegerStep?countDecimals(step):0,valueDecimals=Math.max(valueDecimals,stepBaseDecimals,stepDecimals),viewValue*=stepBaseDecimals=Math.pow(10,valueDecimals),stepBase*=stepBaseDecimals,step*=stepBaseDecimals,isNonIntegerValue&&(viewValue=Math.round(viewValue)),isNonIntegerStepBase&&(stepBase=Math.round(stepBase)),isNonIntegerStep)&&(step=Math.round(step)),(viewValue-stepBase)%step==0}function parseConstantExpr($parse,context,name,expression,fallback){if(void 0===expression)return fallback;if((fallback=$parse(expression)).constant)return fallback(context);throw ngModelMinErr("constexpr","Expected constant expression for `{0}`, but saw `{1}`.",name,expression)}function ngValueDirective(){function updateElementValue(element,attr,value){var propValue=void 0!==value?value:9===msie?"":null;element.prop("value",propValue),attr.$set("value",value)}return{restrict:"A",priority:100,compile:function(tpl,tplAttr){return CONSTANT_VALUE_REGEXP.test(tplAttr.ngValue)?function(scope,elm,attr){updateElementValue(elm,attr,scope.$eval(attr.ngValue))}:function(scope,elm,attr){scope.$watch(attr.ngValue,function(value){updateElementValue(elm,attr,value)})}}}}var inputDirective=["$browser","$sniffer","$filter","$parse",function($browser,$sniffer,$filter,$parse){return{restrict:"E",require:["?ngModel"],link:{pre:function(scope,element,attr,ctrls){ctrls[0]&&(inputType[lowercase(attr.type)]||inputType.text)(scope,element,attr,ctrls[0],$sniffer,$browser,$filter,$parse)}}}}],CONSTANT_VALUE_REGEXP=/^(true|false|\d+)$/,ngBindDirective=["$compile",function($compile){return{restrict:"AC",compile:function(templateElement){return $compile.$$addBindingClass(templateElement),function(scope,element,attr){$compile.$$addBindingInfo(element,attr.ngBind),element=element[0],scope.$watch(attr.ngBind,function(value){element.textContent=stringify(value)})}}}}],ngBindTemplateDirective=["$interpolate","$compile",function($interpolate,$compile){return{compile:function(templateElement){return $compile.$$addBindingClass(templateElement),function(scope,element,attr){var interpolateFn=$interpolate(element.attr(attr.$attr.ngBindTemplate));$compile.$$addBindingInfo(element,interpolateFn.expressions),element=element[0],attr.$observe("ngBindTemplate",function(value){element.textContent=void 0===value?"":value})}}}}],ngBindHtmlDirective=["$sce","$parse","$compile",function($sce,$parse,$compile){return{restrict:"A",compile:function(tElement,tAttrs){var ngBindHtmlGetter=$parse(tAttrs.ngBindHtml),ngBindHtmlWatch=$parse(tAttrs.ngBindHtml,function(val){return $sce.valueOf(val)});return $compile.$$addBindingClass(tElement),function(scope,element,attr){$compile.$$addBindingInfo(element,attr.ngBindHtml),scope.$watch(ngBindHtmlWatch,function(){var value=ngBindHtmlGetter(scope);element.html($sce.getTrustedHtml(value)||"")})}}}}],ngChangeDirective=valueFn({restrict:"A",require:"ngModel",link:function(scope,element,attr,ctrl){ctrl.$viewChangeListeners.push(function(){scope.$eval(attr.ngChange)})}});function classDirective(name,selector){var indexWatchExpression;return name="ngClass"+name,["$parse",function($parse){return{restrict:"AC",link:function(scope,element,attr){var oldClassString,expression=attr[name].trim(),isOneTime=":"===expression.charAt(0)&&":"===expression.charAt(1),expression=$parse(expression,isOneTime?toFlatValue:toClassString),watchAction=isOneTime?function(newClassValue){newClassValue=toClassString(newClassValue);newClassValue!==oldClassString&&ngClassWatchAction(newClassValue)}:ngClassWatchAction,classCounts=element.data("$classCounts"),oldModulo=!0;function digestClassCounts(classArray,count){var classesToUpdate=[];return forEach(classArray,function(className){(0<count||classCounts[className])&&(classCounts[className]=(classCounts[className]||0)+count,classCounts[className]===+(0<count))&&classesToUpdate.push(className)}),classesToUpdate.join(" ")}function ngClassWatchAction(newClassString){oldModulo===selector&&((oldClassString,newClassString)=>{var oldClassString=split(oldClassString),newClassString=split(newClassString),toRemoveArray=arrayDifference(oldClassString,newClassString),newClassString=arrayDifference(newClassString,oldClassString),oldClassString=digestClassCounts(toRemoveArray,-1),toRemoveArray=digestClassCounts(newClassString,1);attr.$addClass(toRemoveArray),attr.$removeClass(oldClassString)})(oldClassString,newClassString),oldClassString=newClassString}classCounts||(classCounts=createMap(),element.data("$classCounts",classCounts)),"ngClass"!==name&&(indexWatchExpression=indexWatchExpression||$parse("$index",function($index){return 1&$index}),scope.$watch(indexWatchExpression,function(newModulo){(newModulo===selector?classString=>{classString=digestClassCounts(split(classString),1),attr.$addClass(classString)}:classString=>{classString=digestClassCounts(split(classString),-1),attr.$removeClass(classString)})(oldClassString);oldModulo=newModulo})),scope.$watch(expression,watchAction,isOneTime)}}}];function arrayDifference(tokens1,tokens2){if(!tokens1||!tokens1.length)return[];if(!tokens2||!tokens2.length)return tokens1;var values=[];outer:for(var i=0;i<tokens1.length;i++){for(var token=tokens1[i],j=0;j<tokens2.length;j++)if(token===tokens2[j])continue outer;values.push(token)}return values}function split(classString){return classString&&classString.split(" ")}function toClassString(classValue){var classString=classValue;return isArray(classValue)?classString=classValue.map(toClassString).join(" "):isObject(classValue)&&(classString=Object.keys(classValue).filter(function(key){return classValue[key]}).join(" ")),classString}
1function toFlatValue(classValue){var hasUndefined,flatValue=classValue;return isArray(classValue)?flatValue=classValue.map(toFlatValue):isObject(classValue)&&(hasUndefined=!1,flatValue=Object.keys(classValue).filter(function(key){key=classValue[key];return hasUndefined||void 0!==key||(hasUndefined=!0),key}),hasUndefined)&&flatValue.push(void 0),flatValue}}function ngListDirective(){return{restrict:"A",priority:100,require:"ngModel",link:function(scope,element,attr,ctrl){var ngList=attr.ngList||", ",trimValues="false"!==attr.ngTrim,separator=trimValues?trim(ngList):ngList;ctrl.$parsers.push(function(viewValue){var list;if(void 0!==viewValue)return list=[],viewValue&&forEach(viewValue.split(separator),function(value){value&&list.push(trimValues?trim(value):value)}),list}),ctrl.$formatters.push(function(value){if(isArray(value))return value.join(ngList)}),ctrl.$isEmpty=function(value){return!value||!value.length}}}}var ngClassDirective=classDirective("",!0),ngClassOddDirective=classDirective("Odd",0),ngClassEvenDirective=classDirective("Even",1),ngCloakDirective=ngDirective({compile:function(element,attr){attr.$set("ngCloak",void 0),element.removeClass("ng-cloak")}}),ngControllerDirective=[function(){return{restrict:"A",scope:!0,controller:"@",priority:500}}],ngEventDirectives={},forceAsyncEvents={blur:!0,focus:!0},ngIfDirective=(forEach("click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste".split(" "),function(eventName){var directiveName=directiveNormalize("ng-"+eventName);ngEventDirectives[directiveName]=["$parse","$rootScope",function($parse,$rootScope){return{restrict:"A",compile:function($element,attr){var fn=$parse(attr[directiveName]);return function(scope,element){element.on(eventName,function(event){function callback(){fn(scope,{$event:event})}forceAsyncEvents[eventName]&&$rootScope.$$phase?scope.$evalAsync(callback):scope.$apply(callback)})}}}}]}),["$animate","$compile",function($animate,$compile){return{multiElement:!0,transclude:"element",priority:600,terminal:!0,restrict:"A",$$tlb:!0,link:function($scope,$element,$attr,ctrl,$transclude){var block,childScope,previousElements;$scope.$watch($attr.ngIf,function(value){value?childScope||$transclude(function(clone,newScope){childScope=newScope,clone[clone.length++]=$compile.$$createComment("end ngIf",$attr.ngIf),block={clone:clone},$animate.enter(clone,$element.parent(),$element)}):(previousElements&&(previousElements.remove(),previousElements=null),childScope&&(childScope.$destroy(),childScope=null),block&&(previousElements=getBlockNodes(block.clone),$animate.leave(previousElements).done(function(response){!1!==response&&(previousElements=null)}),block=null))})}}}]),ngIncludeDirective=["$templateRequest","$anchorScroll","$animate",function($templateRequest,$anchorScroll,$animate){return{restrict:"ECA",priority:400,terminal:!0,transclude:"element",controller:angular.noop,compile:function(element,attr){var srcExp=attr.ngInclude||attr.src,onloadExp=attr.onload||"",autoScrollExp=attr.autoscroll;return function(scope,$element,$attr,ctrl,$transclude){function cleanupLastIncludeContent(){previousElement&&(previousElement.remove(),previousElement=null),currentScope&&(currentScope.$destroy(),currentScope=null),currentElement&&($animate.leave(currentElement).done(function(response){!1!==response&&(previousElement=null)}),previousElement=currentElement,currentElement=null)}var currentScope,previousElement,currentElement,changeCounter=0;scope.$watch(srcExp,function(src){function afterAnimation(response){!1===response||void 0===autoScrollExp||autoScrollExp&&!scope.$eval(autoScrollExp)||$anchorScroll()}var thisChangeId=++changeCounter;src?($templateRequest(src,!0).then(function(response){var newScope;scope.$$destroyed||thisChangeId===changeCounter&&(newScope=scope.$new(),ctrl.template=response,response=$transclude(newScope,function(clone){cleanupLastIncludeContent(),$animate.enter(clone,null,$element).done(afterAnimation)}),currentElement=response,(currentScope=newScope).$emit("$includeContentLoaded",src),scope.$eval(onloadExp))}
1,function(){scope.$$destroyed||thisChangeId===changeCounter&&(cleanupLastIncludeContent(),scope.$emit("$includeContentError",src))}),scope.$emit("$includeContentRequested",src)):(cleanupLastIncludeContent(),ctrl.template=null)})}}}}],ngIncludeFillContentDirective=["$compile",function($compile){return{restrict:"ECA",priority:-400,require:"ngInclude",link:function(scope,$element,$attr,ctrl){toString.call($element[0]).match(/SVG/)?($element.empty(),$compile(jqLiteBuildFragment(ctrl.template,window.document).childNodes)(scope,function(clone){$element.append(clone)},{futureParentElement:$element})):($element.html(ctrl.template),$compile($element.contents())(scope))}}}],ngInitDirective=ngDirective({priority:450,compile:function(){return{pre:function(scope,element,attrs){scope.$eval(attrs.ngInit)}}}}),VALID_CLASS="ng-valid",INVALID_CLASS="ng-invalid",PRISTINE_CLASS="ng-pristine",DIRTY_CLASS="ng-dirty",ngModelMinErr=minErr("ngModel");function NgModelController($scope,$exceptionHandler,$attr,$element,$parse,$animate,$timeout,$q,$interpolate){var ctrl;this.$viewValue=Number.NaN,this.$modelValue=Number.NaN,this.$$rawModelValue=void 0,this.$validators={},this.$asyncValidators={},this.$parsers=[],this.$formatters=[],this.$viewChangeListeners=[],this.$untouched=!0,this.$touched=!1,this.$pristine=!0,this.$dirty=!1,this.$valid=!0,this.$invalid=!1,this.$error={},this.$$success={},this.$pending=void 0,this.$name=$interpolate($attr.name||"",!1)($scope),this.$$parentForm=nullFormCtrl,this.$options=defaultModelOptions,this.$$parsedNgModel=$parse($attr.ngModel),this.$$parsedNgModelAssign=this.$$parsedNgModel.assign,this.$$ngModelGet=this.$$parsedNgModel,this.$$ngModelSet=this.$$parsedNgModelAssign,this.$$pendingDebounce=null,this.$$parserValid=void 0,this.$$currentValidationRunId=0,this.$$scope=$scope,this.$$attr=$attr,this.$$element=$element,this.$$animate=$animate,this.$$timeout=$timeout,this.$$parse=$parse,this.$$q=$q,this.$$exceptionHandler=$exceptionHandler,setupValidity(this),(ctrl=this).$$scope.$watch(function(){var modelValue=ctrl.$$ngModelGet(ctrl.$$scope);if(modelValue!==ctrl.$modelValue&&(ctrl.$modelValue==ctrl.$modelValue||modelValue==modelValue)){ctrl.$modelValue=ctrl.$$rawModelValue=modelValue,ctrl.$$parserValid=void 0;for(var formatters=ctrl.$formatters,idx=formatters.length,viewValue=modelValue;idx--;)viewValue=formatters[idx](viewValue);ctrl.$viewValue!==viewValue&&(ctrl.$$updateEmptyClasses(viewValue),ctrl.$viewValue=ctrl.$$lastCommittedViewValue=viewValue,ctrl.$render(),ctrl.$$runValidators(ctrl.$modelValue,ctrl.$viewValue,noop))}return modelValue})}NgModelController.$inject=["$scope","$exceptionHandler","$attrs","$element","$parse","$animate","$timeout","$q","$interpolate"],NgModelController.prototype={$$initGetterSetters:function(){if(this.$options.getOption("getterSetter")){var invokeModelGetter=this.$$parse(this.$$attr.ngModel+"()"),invokeModelSetter=this.$$parse(this.$$attr.ngModel+"($$$p)");this.$$ngModelGet=function($scope){var modelValue=this.$$parsedNgModel($scope);return modelValue=isFunction(modelValue)?invokeModelGetter($scope):modelValue},this.$$ngModelSet=function($scope,newValue){isFunction(this.$$parsedNgModel($scope))?invokeModelSetter($scope,{$$$p:newValue}):this.$$parsedNgModelAssign($scope,newValue)}}else if(!this.$$parsedNgModel.assign)throw ngModelMinErr("nonassign","Expression '{0}' is non-assignable. Element: {1}",this.$$attr.ngModel,startingTag(this.$$element))},$render:noop,$isEmpty:function(value){return void 0===value||""===value||null===value||value!=value},$$updateEmptyClasses:function(value){this.$isEmpty(value)?(this.$$animate.removeClass(this.$$element,"ng-not-empty"),this.$$animate.addClass(this.$$element,"ng-empty")):(this.$$animate.removeClass(this.$$element,"ng-empty"),this.$$animate.addClass(this.$$element,"ng-not-empty"))},$setPristine:function(){this.$dirty=!1,this.$pristine=!0,this.$$animate.removeClass(this.$$element,DIRTY_CLASS),this.$$animate.addClass(this.$$element,PRISTINE_CLASS)},$setDirty:function(){this.$dirty=!0,this.$pristine=!1,this.$$animate.removeClass(this.$$element,PRISTINE_CLASS),this.$$animate.addClass(this.$$element,DIRTY_CLASS),this.$$parentForm.$setDirty()},$setUntouched:function(){this.$touched=!1,this.$untouched=!0,this.$$animate.setClass(this.$$element,"ng-untouched","ng-touched")},$setTouched:function(){this.$touched=!0,this.$untouched=!1,this.$$animate.setClass(this.$$element,"ng-touched","ng-untouched")},$rollbackViewValue:function(){this.$$timeout.cancel(this.$$pendingDebounce),this.$viewValue=this.$$lastCommittedViewValue,this.$render()},$validate:function(){var viewValue,modelValue,prevValid,prevModelValue,allowInvalid,that;isNumberNaN(this.$modelValue)||(viewValue=this.$$lastCommittedViewValue,modelValue=this.$$rawModelValue,prevValid=this.$valid,prevModelValue=this.$modelValue,allowInvalid=this.$options.getOption("allowInvalid"),(that=this).$$runValidators(modelValue,viewValue,function(allValid){allowInvalid||prevValid===allValid||(that.$modelValue=allValid?modelValue:void 0,that.$modelValue!==prevModelValue&&that.$$writeModelToScope())}))},$$runValidators:function(modelValue,viewValue,doneCallback){this.$$currentValidationRunId++;var syncValidatorsValid,validatorPromises,allValid,localValidationRunId=this.$$currentValidationRunId,that=this;function setValidity(name,isValid){localValidationRunId===that.$$currentValidationRunId&&that.$setValidity(name,isValid)}function validationDone(allValid){localValidationRunId===that.$$currentValidationRunId&&doneCallback(allValid)}!(()=>{var errorKey=that.$$parserName||"parse";return void 0!==that.$$parserValid?(that.$$parserValid||(forEach(that.$validators,function(v,name){setValidity(name,null)}
1),forEach(that.$asyncValidators,function(v,name){setValidity(name,null)})),setValidity(errorKey,that.$$parserValid),that.$$parserValid):(setValidity(errorKey,null),1)})()||(syncValidatorsValid=!0,forEach(that.$validators,function(validator,name){validator=Boolean(validator(modelValue,viewValue));syncValidatorsValid=syncValidatorsValid&&validator,setValidity(name,validator)}),!syncValidatorsValid&&(forEach(that.$asyncValidators,function(v,name){setValidity(name,null)}),1))?validationDone(!1):(validatorPromises=[],allValid=!0,forEach(that.$asyncValidators,function(validator,name){validator=validator(modelValue,viewValue);if(!isPromiseLike(validator))throw ngModelMinErr("nopromise","Expected asynchronous validator to return a promise but got '{0}' instead.",validator);setValidity(name,void 0),validatorPromises.push(validator.then(function(){setValidity(name,!0)},function(){setValidity(name,allValid=!1)}))}),validatorPromises.length?that.$$q.all(validatorPromises).then(function(){validationDone(allValid)},noop):validationDone(!0))},$commitViewValue:function(){var viewValue=this.$viewValue;this.$$timeout.cancel(this.$$pendingDebounce),(this.$$lastCommittedViewValue!==viewValue||""===viewValue&&this.$$hasNativeValidators)&&(this.$$updateEmptyClasses(viewValue),this.$$lastCommittedViewValue=viewValue,this.$pristine&&this.$setDirty(),this.$$parseAndValidate())},$$parseAndValidate:function(){var modelValue=this.$$lastCommittedViewValue,that=this;if(this.$$parserValid=void 0!==modelValue||void 0,this.$$parserValid)for(var i=0;i<this.$parsers.length;i++)if(void 0===(modelValue=this.$parsers[i](modelValue))){this.$$parserValid=!1;break}isNumberNaN(this.$modelValue)&&(this.$modelValue=this.$$ngModelGet(this.$$scope));var prevModelValue=this.$modelValue,allowInvalid=this.$options.getOption("allowInvalid");function writeToModelIfNeeded(){that.$modelValue!==prevModelValue&&that.$$writeModelToScope()}this.$$rawModelValue=modelValue,allowInvalid&&(this.$modelValue=modelValue,writeToModelIfNeeded()),this.$$runValidators(modelValue,this.$$lastCommittedViewValue,function(allValid){allowInvalid||(that.$modelValue=allValid?modelValue:void 0,writeToModelIfNeeded())})},$$writeModelToScope:function(){this.$$ngModelSet(this.$$scope,this.$modelValue),forEach(this.$viewChangeListeners,function(listener){try{listener()}catch(e){this.$$exceptionHandler(e)}},this)},$setViewValue:function(value,trigger){this.$viewValue=value,this.$options.getOption("updateOnDefault")&&this.$$debounceViewValueCommit(trigger)},$$debounceViewValueCommit:function(trigger){var debounceDelay=this.$options.getOption("debounce"),that=(isNumber(debounceDelay[trigger])?debounceDelay=debounceDelay[trigger]:isNumber(debounceDelay.default)&&(debounceDelay=debounceDelay.default),this.$$timeout.cancel(this.$$pendingDebounce),this);0<debounceDelay?this.$$pendingDebounce=this.$$timeout(function(){that.$commitViewValue()},debounceDelay):this.$$scope.$root.$$phase?this.$commitViewValue():this.$$scope.$apply(function(){that.$commitViewValue()})},$overrideModelOptions:function(options){this.$options=this.$options.createChild(options)}},addSetValidityMethod({clazz:NgModelController,set:function(object,property){object[property]=!0},unset:function(object,property){delete object[property]}});var ngModelDirective=["$rootScope",function($rootScope){return{restrict:"A",require:["ngModel","^?form","^?ngModelOptions"],controller:NgModelController,priority:1,compile:function(element){return element.addClass(PRISTINE_CLASS).addClass("ng-untouched").addClass(VALID_CLASS),{pre:function(scope,element,attr,ctrls){var modelCtrl=ctrls[0],formCtrl=ctrls[1]||modelCtrl.$$parentForm,ctrls=ctrls[2];ctrls&&(modelCtrl.$options=ctrls.$options),modelCtrl.$$initGetterSetters(),formCtrl.$addControl(modelCtrl),attr.$observe("name",function(newValue){modelCtrl.$name!==newValue&&modelCtrl.$$parentForm.$$renameControl(modelCtrl,newValue)}),scope.$on("$destroy",function(){modelCtrl.$$parentForm.$removeControl(modelCtrl)})},post:function(scope,element,attr,ctrls){var modelCtrl=ctrls[0];function setTouched(){modelCtrl.$setTouched()}modelCtrl.$options.getOption("updateOn")&&element.on(modelCtrl.$options.getOption("updateOn"),function(ev){modelCtrl.$$debounceViewValueCommit(ev&&ev.type)}),element.on("blur",function(){modelCtrl.$touched||($rootScope.$$phase?scope.$evalAsync(setTouched):scope.$apply(setTouched))})}}}}}],DEFAULT_REGEXP=/(\s+|^)default(\s+|$)/;function ModelOptions(options){this.$$options=options}function ngModelOptionsDirective(){function NgModelOptionsController($attrs,$scope){this.$$attrs=$attrs,this.$$scope=$scope}return NgModelOptionsController.$inject=["$attrs","$scope"],NgModelOptionsController.prototype={$onInit:function(){var parentOptions=this.parentCtrl?this.parentCtrl.$options:defaultModelOptions,modelOptionsDefinition=this.$$scope.$eval(this.$$attrs.ngModelOptions);this.$options=parentOptions.createChild(modelOptionsDefinition)}},{restrict:"A",priority:10,require:{parentCtrl:"?^^ngModelOptions"},bindToController:!0,controller:NgModelOptionsController}}ModelOptions.prototype={getOption:function(name){return this.$$options[name]},createChild:function(options){var inheritAll=!1;return forEach(options=extend({},options),function(option,key){"$inherit"===option?"*"===key?inheritAll=!0:(options[key]=this.$$options[key],"updateOn"===key&&(options.updateOnDefault=this.$$options.updateOnDefault)):"updateOn"===key&&(options.updateOnDefault=!1,options[key]=trim(option.replace(DEFAULT_REGEXP,function(){return options.updateOnDefault=!0," "})))},this),inheritAll&&(delete options["*"],defaults(options,this.$$options)),defaults(options,defaultModelOptions.$$options),new ModelOptions(options)}};var defaultModelOptions=new ModelOptions({updateOn:"",updateOnDefault:!0,debounce:0,getterSetter:!1,allowInvalid:!1,timezone:null});function defaults(dst,src){forEach(src,function(value,key){void 0===dst[key]&&(dst[key]=value)})}var ngNonBindableDirective=ngDirective({terminal:!0,priority:1e3}),ngOptionsMinErr=minErr("ngOptions"),NG_OPTIONS_REGEXP=/^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+group\s+by\s+([\s\S]+?))?(?:\s+disable\s+when\s+([\s\S]+?))?\s+for\s+(?:([$\w][$\w]*)|(?:\(\s*([$\w][$\w]*)\s*,\s*([$\w][$\w]*)\s*\)))\s+in\s+([\s\S]+?)(?:\s+track\s+by\s+([\s\S]+?))?$/,ngOptionsDirective=["$compile","$document","$parse",function($compile,$document,$parse){var optionTemplate=window.document.createElement("option"),optGroupTemplate=window.document.createElement("optgroup");return{restrict:"A",terminal:!0,require:["select","ngModel"],link:{pre:function(scope,selectElement,attr,ctrls){ctrls[0].registerOption=noop},post:function(scope,selectElement,attr,ctrls){for(var selectCtrl=ctrls[0],ngModelCtrl=ctrls[1],multiple=attr.multiple,i=0,children=selectElement.children(),ii=children.length;i<ii;i++)if(""===children[i].value){selectCtrl.hasEmptyOption=!0,selectCtrl.emptyOption=children.eq(i);break}var options,providedEmptyOption=!!selectCtrl.emptyOption,ngOptions=(jqLite(optionTemplate.cloneNode(!1)).val("?"),((optionsExp,selectElement,scope)=>{var valueName,keyName,selectAs,trackBy,valueFn,viewValueFn,trackByFn,getTrackByValueFn,getTrackByValue,displayFn,groupBy
1Fn,disableWhenFn,valuesFn,locals,getLocals,match=optionsExp.match(NG_OPTIONS_REGEXP);if(match)return valueName=match[5]||match[7],keyName=match[6],selectAs=/ as /.test(match[0])&&match[1],trackBy=match[9],valueFn=$parse(match[2]?match[1]:valueName),viewValueFn=selectAs&&$parse(selectAs)||valueFn,trackByFn=trackBy&&$parse(trackBy),getTrackByValueFn=trackBy?function(value,locals){return trackByFn(scope,locals)}:function(value){return hashKey(value)},getTrackByValue=function(value,key){return getTrackByValueFn(value,getLocals(value,key))},displayFn=$parse(match[2]||match[1]),groupByFn=$parse(match[3]||""),disableWhenFn=$parse(match[4]||""),valuesFn=$parse(match[8]),locals={},getLocals=keyName?function(value,key){return locals[keyName]=key,locals[valueName]=value,locals}:function(value){return locals[valueName]=value,locals},{trackBy:trackBy,getTrackByValue:getTrackByValue,getWatchables:$parse(valuesFn,function(optionValues){for(var watchedArray=[],optionValuesKeys=getOptionValuesKeys(optionValues=optionValues||[]),optionValuesLength=optionValuesKeys.length,index=0;index<optionValuesLength;index++){var key=optionValues===optionValuesKeys?index:optionValuesKeys[index],value=optionValues[key],key=getLocals(value,key),value=getTrackByValueFn(value,key);watchedArray.push(value),(match[2]||match[1])&&(value=displayFn(scope,key),watchedArray.push(value)),match[4]&&(value=disableWhenFn(scope,key),watchedArray.push(value))}return watchedArray}),getOptions:function(){for(var optionItems=[],selectValueMap={},optionValues=valuesFn(scope)||[],optionValuesKeys=getOptionValuesKeys(optionValues),optionValuesLength=optionValuesKeys.length,index=0;index<optionValuesLength;index++){var key=optionValues===optionValuesKeys?index:optionValuesKeys[index],value=optionValues[key],value=getLocals(value,key),key=viewValueFn(scope,value),selectValue=getTrackByValueFn(key,value),key=new Option(selectValue,key,displayFn(scope,value),groupByFn(scope,value),disableWhenFn(scope,value));optionItems.push(key),selectValueMap[selectValue]=key}return{items:optionItems,selectValueMap:selectValueMap,getOptionFromViewValue:function(value){return selectValueMap[getTrackByValue(value)]},getViewValueFromOption:function(option){return trackBy?copy(option.viewValue):option.viewValue}}}};throw ngOptionsMinErr("iexp","Expected expression in form of '_select_ (as _label_)? for (_key_,)?_value_ in _collection_' but got '{0}'. Element: {1}",optionsExp,startingTag(selectElement));function Option(selectValue,viewValue,label,group,disabled){this.selectValue=selectValue,this.viewValue=viewValue,this.label=label,this.group=group,this.disabled=disabled}function getOptionValuesKeys(optionValues){var optionValuesKeys;if(!keyName&&isArrayLike(optionValues))optionValuesKeys=optionValues;else for(var itemKey in optionValuesKeys=[],optionValues)optionValues.hasOwnProperty(itemKey)&&"$"!==itemKey.charAt(0)&&optionValuesKeys.push(itemKey);return optionValuesKeys}})(attr.ngOptions,selectElement,scope)),listFragment=$document[0].createDocumentFragment();function addOptionElement(option,parent){var optionElement=optionTemplate.cloneNode(!1);parent.appendChild(optionElement),((option,element)=>{(option.element=element).disabled=option.disabled,option.label!==element.label&&(element.label=option.label,element.textContent=option.label),element.value=option.selectValue})(option,optionElement)}function getAndUpdateSelectedOption(viewValue){var viewValue=options.getOptionFromViewValue(viewValue),element=viewValue&&viewValue.element;return element&&!element.selected&&(element.selected=!0),viewValue}function updateOptions(){var previousValue=options&&selectCtrl.readValue();if(options)for(var i=options.items.length-1;0<=i;i--){var option=options.items[i];void 0!==option.group?jqLiteRemove(option.element.parentNode):jqLiteRemove(option.element)}options=ngOptions.getOptions();var nextValue,groupElementMap={};providedEmptyOption&&selectElement.prepend(selectCtrl.emptyOption),options.items.forEach(function(option){var groupElement;void 0!==option.group?((groupElement=groupElementMap[option.group])||(groupElement=optGroupTemplate.cloneNode(!1),listFragment.appendChild(groupElement),groupElement.label=null===option.group?"null":option.group,groupElementMap[option.group]=groupElement),addOptionElement(option,groupElement)):addOptionElement(option,listFragment)}),selectElement[0].appendChild(listFragment),ngModelCtrl.$render(),ngModelCtrl.$isEmpty(previousValue)||(nextValue=selectCtrl.readValue(),ngOptions.trackBy||multiple?equals(previousValue,nextValue):previousValue===nextValue)||(ngModelCtrl.$setViewValue(nextV
1alue),ngModelCtrl.$render())}selectCtrl.generateUnknownOptionValue=function(val){return"?"},multiple?(selectCtrl.writeValue=function(values){var selectedOptions=values&&values.map(getAndUpdateSelectedOption)||[];options.items.forEach(function(option){option.element.selected&&!includes(selectedOptions,option)&&(option.element.selected=!1)})},selectCtrl.readValue=function(){var selectedValues=selectElement.val()||[],selections=[];return forEach(selectedValues,function(value){value=options.selectValueMap[value];value&&!value.disabled&&selections.push(options.getViewValueFromOption(value))}),selections},ngOptions.trackBy&&scope.$watchCollection(function(){if(isArray(ngModelCtrl.$viewValue))return ngModelCtrl.$viewValue.map(function(value){return ngOptions.getTrackByValue(value)})},function(){ngModelCtrl.$render()})):(selectCtrl.writeValue=function(value){var selectedOption=options.selectValueMap[selectElement.val()],option=options.getOptionFromViewValue(value);selectedOption&&selectedOption.element.removeAttribute("selected"),option?(selectElement[0].value!==option.selectValue&&(selectCtrl.removeUnknownOption(),selectCtrl.unselectEmptyOption(),selectElement[0].value=option.selectValue,option.element.selected=!0),option.element.setAttribute("selected","selected")):providedEmptyOption?selectCtrl.selectEmptyOption():selectCtrl.unknownOption.parent().length?selectCtrl.updateUnknownOption(value):selectCtrl.renderUnknownOption(value)},selectCtrl.readValue=function(){var selectedOption=options.selectValueMap[selectElement.val()];return selectedOption&&!selectedOption.disabled?(selectCtrl.unselectEmptyOption(),selectCtrl.removeUnknownOption(),options.getViewValueFromOption(selectedOption)):null},ngOptions.trackBy&&scope.$watch(function(){return ngOptions.getTrackByValue(ngModelCtrl.$viewValue)},function(){ngModelCtrl.$render()})),providedEmptyOption&&(selectCtrl.emptyOption.remove(),$compile(selectCtrl.emptyOption)(scope),selectCtrl.emptyOption[0].nodeType===NODE_TYPE_COMMENT?(selectCtrl.hasEmptyOption=!1,selectCtrl.registerOption=function(optionScope,optionEl){""===optionEl.val()&&(selectCtrl.hasEmptyOption=!0,selectCtrl.emptyOption=optionEl,selectCtrl.emptyOption.removeClass("ng-scope"),ngModelCtrl.$render(),optionEl.on("$destroy",function(){selectCtrl.hasEmptyOption=!1,selectCtrl.emptyOption=void 0}))}):selectCtrl.emptyOption.removeClass("ng-scope")),selectElement.empty(),updateOptions(),scope.$watchCollection(ngOptions.getWatchables,updateOptions)}}}}],ngPluralizeDirective=["$locale","$interpolate","$log",function($locale,$interpolate,$log){var BRACE=/{}/g,IS_WHEN=/^when(Minus)?(.+)$/;return{link:function(scope,element,attr){var lastCount,numberExp=attr.count,whenExp=attr.$attr.when&&element.attr(attr.$attr.when),offset=attr.offset||0,whens=scope.$eval(whenExp)||{},whensExpFns={},startSymbol=$interpolate.startSymbol(),endSymbol=$interpolate.endSymbol(),braceReplacement=startSymbol+number
1Exp+"-"+offset+endSymbol,watchRemover=angular.noop;function updateElementText(newText){element.text(newText||"")}forEach(attr,function(expression,attributeName){var tmpMatch=IS_WHEN.exec(attributeName);tmpMatch&&(tmpMatch=(tmpMatch[1]?"-":"")+lowercase(tmpMatch[2]),whens[tmpMatch]=element.attr(attr.$attr[attributeName]))}),forEach(whens,function(expression,key){whensExpFns[key]=$interpolate(expression.replace(BRACE,braceReplacement))}),scope.$watch(numberExp,function(newVal){var count=parseFloat(newVal),countIsNaN=isNumberNaN(count);(count=countIsNaN||count in whens?count:$locale.pluralCat(count-offset))===lastCount||countIsNaN&&isNumberNaN(lastCount)||(watchRemover(),void 0===(countIsNaN=whensExpFns[count])?(null!=newVal&&$log.debug("ngPluralize: no rule defined for '"+count+"' in "+whenExp),watchRemover=noop,updateElementText()):watchRemover=scope.$watch(countIsNaN,updateElementText),lastCount=count)})}}}],ngRepeatDirective=["$parse","$animate","$compile",function($parse,$animate,$compile){function updateScope(scope,index,valueIdentifier,value,keyIdentifier,key,arrayLength){scope[valueIdentifier]=value,keyIdentifier&&(scope[keyIdentifier]=key),scope.$index=index,scope.$first=0===index,scope.$last=index===arrayLength-1,scope.$middle=!(scope.$first||scope.$last),scope.$odd=!(scope.$even=0==(1&index))}var ngRepeatMinErr=minErr("ngRepeat");return{restrict:"A",multiElement:!0,transclude:"element",priority:1e3,terminal:!0,$$tlb:!0,compile:function($element,$attr){var expression=$attr.ngRepeat,ngRepeatEndComment=$compile.$$createComment("end ngRepeat",expression),$attr=expression.match(/^\s*([\s\S]+?)\s+in\s+([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+track\s+by\s+([\s\S]+?))?\s*$/);if(!$attr)throw ngRepeatMinErr("iexp","Expected expression in form of '_item_ in _collection_[ track by _id_]' but got '{0}'.",expression);var lhs=$attr[1],rhs=$attr[2],aliasAs=$attr[3],trackByExp=$attr[4];if(!($attr=lhs.match(/^(?:(\s*[$\w]+)|\(\s*([$\w]+)\s*,\s*([$\w]+)\s*\))$/)))throw ngRepeatMinErr("iidexp","'_item_' in '_item_ in _collection_' should be an identifier or '(_key_, _value_)' expression, but got '{0}'.",lhs);var trackByExpGetter,trackByIdExpFn,trackByIdArrayFn,trackByIdObjFn,hashFnLocals,valueIdentifier=$attr[3]||$attr[1],keyIdentifier=$attr[2];if(!aliasAs||/^[$a-zA-Z_][$a-zA-Z0-9_]*$/.test(aliasAs)&&!/^(null|undefined|this|\$index|\$first|\$middle|\$last|\$even|\$odd|\$parent|\$root|\$id)$/.test(aliasAs))return hashFnLocals={$id:hashKey},trackByExp?trackByExpGetter=$parse(trackByExp):(trackByIdArrayFn=function(key,value){return hashKey(value)},trackByIdObjFn=function(key){return key}),function($scope,$element,$attr,ctrl,$transclude){trackByExpGetter&&(trackByIdExpFn=function(key,value,index){return keyIdentifier&&(hashFnLocals[keyIdentifier]=key),hashFnLocals[valueIdentifier]=value,hashFnLocals.$index=index,trackByExpGetter($scope,hashFnLocals)});var lastBlockMap=createMap();$scope.$watchCollection(rhs,function(collection){var index,length,nextNode,collectionLength,key,value,trackById,trackByIdFn,collectionKeys,block,nextBlockOrder,elementsToRemove,blockKey,previousNode=$element[0],nextBlockMap=createMap();if(aliasAs&&($scope[aliasAs]=collection),isArrayLike(collection))collectionKeys=collection,trackByIdFn=trackByIdExpFn||trackByIdArrayFn;else for(var itemKey in trackByIdFn=trackByIdExpFn||trackByIdObjFn,collectionKeys=[],collection)hasOwnProperty.call(collection,itemKey)&&"$"!==itemKey.charAt(0)&&collectionKeys.push(itemKey);for(collectionLength=collectionKeys.length,nextBlockOrder=new Array(collectionLength),index=0;index<collectionLength;index++)if(key=collection===collectionKeys?index:collectionKeys[index],value=collection[key],trackById=trackByIdFn(key,value,index),lastBlockMap[trackById])block=lastBlockMap[trackById],delete lastBlockMap[trackById],nextBlockMap[trackById]=block,nextBlockOrder[index]=block;else{if(nextBlockMap[trackById])throw forEach(nextBlockOrder,function(block){block&&block.scope&&(lastBlockMap[block.id]=block)}),ngRepeatMinErr("dupes","Duplicates in a repeater are not allowed. Use 'track by' expression to specify unique keys. Repeater: {0}, Duplicate key: {1}, Duplicate value: {2}",expression,trackById,value);nextBlockOrder[index]={id:trackById,scope:void 0,clone:void 0},nextBlockMap[trackById]=!0}
1for(blockKey in lastBlockMap){if(elementsToRemove=getBlockNodes((block=lastBlockMap[blockKey]).clone),$animate.leave(elementsToRemove),elementsToRemove[0].parentNode)for(index=0,length=elementsToRemove.length;index<length;index++)elementsToRemove[index].$$NG_REMOVED=!0;block.scope.$destroy()}for(index=0;index<collectionLength;index++)if(key=collection===collectionKeys?index:collectionKeys[index],value=collection[key],(block=nextBlockOrder[index]).scope){for(nextNode=previousNode;(nextNode=nextNode.nextSibling)&&nextNode.$$NG_REMOVED;);block.clone[0]!==nextNode&&$animate.move(getBlockNodes(block.clone),null,previousNode),previousNode=(block=>block.clone[block.clone.length-1])(block),updateScope(block.scope,index,valueIdentifier,value,keyIdentifier,key,collectionLength)}else $transclude(function(clone,scope){block.scope=scope;scope=ngRepeatEndComment.cloneNode(!1);clone[clone.length++]=scope,$animate.enter(clone,null,previousNode),previousNode=scope,block.clone=clone,nextBlockMap[block.id]=block,updateScope(block.scope,index,valueIdentifier,value,keyIdentifier,key,collectionLength)});lastBlockMap=nextBlockMap})};throw ngRepeatMinErr("badident","alias '{0}' is invalid --- must be a valid JS identifier which is not a reserved name.",aliasAs)}}}],ngShowDirective=["$animate",function($animate){return{restrict:"A",multiElement:!0,link:function(scope,element,attr){scope.$watch(attr.ngShow,function(value){$animate[value?"removeClass":"addClass"](element,"ng-hide",{tempClasses:"ng-hide-animate"})})}}}],ngHideDirective=["$animate",function($animate){return{restrict:"A",multiElement:!0,link:function(scope,element,attr){scope.$watch(attr.ngHide,function(value){$animate[value?"addClass":"removeClass"](element,"ng-hide",{tempClasses:"ng-hide-animate"})})}}}],ngStyleDirective=ngDirective(function(scope,element,attr){scope.$watch(attr.ngStyle,function(newStyles,oldStyles){oldStyles&&newStyles!==oldStyles&&forEach(oldStyles,function(val,style){element.css(style,"")}),newStyles&&element.css(newStyles)},!0)}),ngSwitchDirective=["$animate","$compile",function($animate,$compile){return{require:"ngSwitch",controller:["$scope",function(){this.cases={}}],link:function(scope,element,attr,ngSwitchController){var selectedTranscludes,attr=attr.ngSwitch||attr.on,selectedElements=[],previousLeaveAnimations=[],selectedScopes=[];scope.$watch(attr,function(value){for(var i,ii;previousLeaveAnimations.length;)$animate.cancel(previousLeaveAnimations.pop());for(i=0,ii=selectedScopes.length;i<ii;++i){var selected=getBlockNodes(selectedElements[i].clone);selectedScopes[i].$destroy(),(previousLeaveAnimations[i]=$animate.leave(selected)).done(((array,index)=>function(response){!1!==response&&array.splice(index,1)})(previousLeaveAnimations,i))}selectedElements.length=0,selectedScopes.length=0,(selectedTranscludes=ngSwitchController.cases["!"+value]||ngSwitchController.cases["?"])&&forEach(selectedTranscludes,function(selectedTransclude){selectedTransclude.transclude(function(caseElement,selectedScope){selectedScopes.push(selectedScope);selectedScope=selectedTransclude.element;caseElement[caseElement.length++]=$compile.$$createComment("end ngSwitchWhen"),selectedElements.push({clone:caseElement}),$animate.enter(caseElement,selectedScope.parent(),selectedScope)})})})}}}],ngSwitchWhenDirective=ngDirective({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(scope,element,attrs,ctrl,$transclude){forEach(attrs.ngSwitchWhen.split(attrs.ngSwitchWhenSeparator).sort().filter(function(element,index,array){return array[index-1]!==element}),function(whenCase){ctrl.cases["!"+whenCase]=ctrl.cases["!"+whenCase]||[],ctrl.cases["!"+whenCase].push({transclude:$transclude,element:element})})}}),ngSwitchDefaultDirective=ngDirective({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(scope,element,attr,ctrl,$transclude){ctrl.cases["?"]=ctrl.cases["?"]||[],ctrl.cases["?"].push({transclude:$transclude,element:element})}}),ngTranscludeMinErr=minErr("ngTransclude"),ngTranscludeDirective=["$compile",function($compile){return{restrict:"EAC",terminal:!0,compile:function(tElement){var fallbackLinkFn=$compile(tElement.contents());return tElement.empty(),function($scope,$element,$attrs,controller,$transclude){if(!$transclude)throw ngTranscludeMinErr("orphan","Illegal use of ngTransclude directive in the template! No parent directive that requires a transclusion found. Element: {0}",startingTag($element));$attrs.ngTransclude===$attrs.$attr.ngTransclude&&($attrs.ngTransclude="");$attrs=$attrs.ngTransclude||$attrs.ngTranscludeSlot;function useFallbackContent(){fallbackLinkFn($scope,function(clone){$element.append(clone)})}$transclude(function(clone,transcludedScope){clone.length&&(nodes=>{for(var i=0,ii=nodes.length;i<ii;i++){var node=nodes[i];if(node.nodeType!==NODE_TYPE_TEXT||node.nodeValue.trim())return 1}})(clone)?$element.append(clone):(useFallbackContent(),transcludedScope.$destroy())},null,$attrs),$attrs&&!$transclude.isSlotFilled($attrs)&&useFallbackContent()}}}}],scriptDirective=["$templateCache",function($templateCache){return{restrict:"E",terminal:!0,compile:function(element,attr){"text/ng-template"===attr.type&&(attr=attr.id,element=element[0].text,$templateCache.put(attr,element))}}}],noopNgModelController={$setViewValue:noop,$render:noop};function setOptionSelectedStatus(optionEl,value){optionEl.prop("selected",value),optionEl.attr("selected",value)}function selectDirective(){return{restrict:"E",require:["select","?ngModel"],controller:SelectController,priority:1,link:{pre:function(scope,element,attr,ctrls){var lastView,lastViewRef,selectCtrl=ctrls[0],ngModelCtrl=ctrls[1];ngModelCtrl?(selectCtrl.ngModelCtrl=ngModelCtrl,element.on("change",function(){selectCtrl.removeUnknownOption(),scope.$apply(function(){ngModelCtrl.$setViewValue(selectCtrl.readValue())})}),attr.multiple&&(selectCtrl.multiple=!0,selectCtrl.readValue=function(){var array=[];return forEach(element.find("option"),function(option){option.selected&&!option.disabled&&(option=option.value,array.push(option in selectCtrl.selectValueMap?selectCtrl.selectValueMap[option]:option))}),array},selectCtrl.writeValue=function(value){forEach(element.find("option"),function(option){var shouldBeSelected=!!value&&(includes(value,option.value)||includes(value,selectCtrl.selectValueMap[option.value]));shouldBeSelected!==option.selected&&setOptionSelectedStatus(jqLite(option),shouldBeSelected)})},lastViewRef=NaN,scope.$watch(function(){lastViewRef!==ngModelCtrl.$viewValue||equals(lastView,ngModelCtrl.$viewValue)||(lastView=shallowCopy(ngModelCtrl.$viewValue),ngModelCtrl.$render()),lastViewRef=ngModelCtrl.$viewValue}),ngModelCtrl.$isEmpty=function(value){return!value||0===value.length})):selectCtrl.registerOption=noop},post:function(scope,element,attrs,ctrls){var selectCtrl,ngModelCtrl=ctrls[1];ngModelCtrl&&(selectCtrl=ctrls[0],ngModelCtrl.$render=function(){selectCtrl.writeValue(ngModelCtrl.$viewValue)})}}}}function requiredDirective(){return{restrict:"A",require:"?ngModel",link:function(scope,elm,attr,ctrl){ctrl&&(attr.required=!0,ctrl.$validators.required=function(modelValue,viewValue){return!attr.required||!ctrl.$isEmpty(viewValue)},attr.$observe("required",function(){ctrl.$validate()}))}}}function patternDirective(){return{restrict:"A",require:"?ngModel",link:function(scope,elm,attr,ctrl){var regexp,patternExp;ctrl&&(patternExp=attr.ngPattern||attr.pattern,attr.$observe("pattern",function(regex){if((regex=isString(regex)&&0<regex.length?new RegExp("^"+regex+"$"):regex)&&!regex.test)throw minErr("ngPattern")("noregexp","Expected {0} to be a RegExp but was {1}. Element: {2}",patternExp,regex,startingTag(elm));regexp=regex||void 0,ctrl.$validate()}),ctrl.$validators.pattern=function(modelValue,viewValue){return ctrl.$isEmpty(viewValue)||void 0===regexp||regexp.test(viewValue)})}}}function maxlengthDirective(){return{restrict:"A",require:"?ngModel",link:function(scope,elm,attr,ctrl){var maxlength;ctrl&&(maxlength=-1,attr.$observe("maxlength",function(value){value=toInt(value);maxlength=isNumberNaN(value)?-1:value,ctrl.$validate()}),ctrl.$validators.maxlength=function(modelValue,viewValue){return maxlength<0||ctrl.$isEmpty(viewValue)||viewValue.length<=maxlength})}}}function minlengthDirective(){return{restrict:"A",require:"?ngModel",link:function(scope,elm,attr,ctrl){var minlength;ctrl&&(minlength=0,attr.$observe("minlength",function(value){minlength=toInt(value)||0,ctrl.$validate()}),ctrl.$validators.minlength=function(modelValue,viewValue){return ctrl.$isEmpty(viewValue)||viewValue.length>=minlength})}}}var originalCleanData,SelectController=["$element","$scope",function($element,$scope){var self=this,optionsMap=new NgMap,renderScheduled=(self.selectValueMap={},self.ngModelCtrl=noopNgModelController,self.multiple=!1,self.unknownOption=jqLite(window.document.createElement("option")),self.hasEmptyOption=!1,self.emptyOption=void 0,self.renderUnknownOption=function(val){val=self.generateUnknownOptionValue(val);
1self.unknownOption.val(val),$element.prepend(self.unknownOption),setOptionSelectedStatus(self.unknownOption,!0),$element.val(val)},self.updateUnknownOption=function(val){val=self.generateUnknownOptionValue(val);self.unknownOption.val(val),setOptionSelectedStatus(self.unknownOption,!0),$element.val(val)},self.generateUnknownOptionValue=function(val){return"? "+hashKey(val)+" ?"},self.removeUnknownOption=function(){self.unknownOption.parent()&&self.unknownOption.remove()},self.selectEmptyOption=function(){self.emptyOption&&($element.val(""),setOptionSelectedStatus(self.emptyOption,!0))},self.unselectEmptyOption=function(){self.hasEmptyOption&&self.emptyOption.removeAttr("selected")},$scope.$on("$destroy",function(){self.renderUnknownOption=noop}),self.readValue=function(){var val=$element.val(),val=val in self.selectValueMap?self.selectValueMap[val]:val;return self.hasOption(val)?val:null},self.writeValue=function(value){var currentlySelectedOption=$element[0].options[$element[0].selectedIndex];currentlySelectedOption&&setOptionSelectedStatus(jqLite(currentlySelectedOption),!1),self.hasOption(value)?(self.removeUnknownOption(),currentlySelectedOption=hashKey(value),$element.val(currentlySelectedOption in self.selectValueMap?currentlySelectedOption:value),currentlySelectedOption=$element[0].options[$element[0].selectedIndex],setOptionSelectedStatus(jqLite(currentlySelectedOption),!0)):null==value&&self.emptyOption?(self.removeUnknownOption(),self.selectEmptyOption()):self.unknownOption.parent().length?self.updateUnknownOption(value):self.renderUnknownOption(value)},self.addOption=function(value,element){element[0].nodeType!==NODE_TYPE_COMMENT&&(assertNotHasOwnProperty(value,'"option value"'),""===value&&(self.hasEmptyOption=!0,self.emptyOption=element),element=optionsMap.get(value)||0,optionsMap.set(value,element+1),scheduleRender())},self.removeOption=function(value){var count=optionsMap.get(value);count&&(1===count?(optionsMap.delete(value),""===value&&(self.hasEmptyOption=!1,self.emptyOption=void 0)):optionsMap.set(value,count-1))},!(self.hasOption=function(value){return!!optionsMap.get(value)}));function scheduleRender(){renderScheduled||(renderScheduled=!0,$scope.$$postDigest(function(){render
1Scheduled=!1,self.ngModelCtrl.$render()}))}var updateScheduled=!1;function scheduleViewValueUpdate(renderAfter){updateScheduled||(updateScheduled=!0,$scope.$$postDigest(function(){$scope.$$destroyed||(updateScheduled=!1,self.ngModelCtrl.$setViewValue(self.readValue()),renderAfter&&self.ngModelCtrl.$render())}))}self.registerOption=function(optionScope,optionElement,optionAttrs,interpolateValueFn,interpolateTextFn){var oldVal,hashedVal;optionAttrs.$attr.ngValue?(hashedVal=NaN,optionAttrs.$observe("value",function(newVal){var removal,previouslySelected=optionElement.prop("selected");void 0!==hashedVal&&(self.removeOption(oldVal),delete self.selectValueMap[hashedVal],removal=!0),hashedVal=hashKey(newVal),oldVal=newVal,self.selectValueMap[hashedVal]=newVal,self.addOption(newVal,optionElement),optionElement.attr("value",hashedVal),removal&&previouslySelected&&scheduleViewValueUpdate()})):interpolateValueFn?optionAttrs.$observe("value",function(newVal){self.readValue();var removal,previouslySelected=optionElement.prop("selected");void 0!==oldVal&&(self.removeOption(oldVal),removal=!0),oldVal=newVal,self.addOption(newVal,optionElement),removal&&previouslySelected&&scheduleViewValueUpdate()}):interpolateTextFn?optionScope.$watch(interpolateTextFn,function(newVal,oldVal){optionAttrs.$set("value",newVal);var previouslySelected=optionElement.prop("selected");oldVal!==newVal&&self.removeOption(oldVal),self.addOption(newVal,optionElement),oldVal&&previouslySelected&&scheduleViewValueUpdate()}):self.addOption(optionAttrs.value,optionElement),optionAttrs.$observe("disabled",function(newVal){("true"===newVal||newVal&&optionElement.prop("selected"))&&(self.multiple?scheduleViewValueUpdate(!0):(self.ngModelCtrl.$setViewValue(null),self.ngModelCtrl.$render()))}),optionElement.on("$destroy",function(){var currentValue=self.readValue(),removeValue=optionAttrs.value;self.removeOption(removeValue),scheduleRender(),(self.multiple&¤tValue&&-1!==currentValue.indexOf(removeValue)||currentValue===removeValue)&&scheduleViewValueUpdate(!0)})}}],optionDirective=["$interpolate",function($interpolate){return{restrict:"E",priority:100,compile:function(element,attr){var interpolateValueFn,interpolateTextFn;return void 0===attr.ngValue&&(void 0!==attr.value?interpolateValueFn=$interpolate(attr.value,!0):(interpolateTextFn=$interpolate(element.text(),!0))||attr.$set("value",element.text())),function(scope,element,attr){var parent=element.parent(),parent=parent.data("$selectController")||parent.parent().data("$selectController");parent&&parent.registerOption(scope,element,attr,interpolateValueFn,interpolateTextFn)}}}}];window.angular.bootstrap?window.console&&console.log("WARNING: Tried to load angular more than once."):(script||(push=jq(),(jQuery=void 0===push?window.jQuery:push?window[push]:void 0)&&jQuery.fn.on?(extend((jqLite=jQuery).fn,{scope:JQLitePrototype.scope,isolateScope:JQLitePrototype.isolateScope,controller:JQLitePrototype.controller,injector:JQLitePrototype.injector,inheritedData:JQLitePrototype.inheritedData}),originalCleanData=jQuery.cleanData,jQuery.cleanData=function(elems){for(var events,elem,i=0;null!=(elem=elems[i]);i++)(events=jQuery._data(elem,"events"))&&events.$destroy&&jQuery(elem).triggerHandler("$destroy");originalCleanData(elems)}):jqLite=JQLite,angular.element=jqLite,script=!0),(angular=>{extend(angular,{errorHandlingConfig:errorHandlingConfig,bootstrap:bootstrap,copy:copy,extend:extend,merge:merge,equals:equals,element:jqLite,forEach:forEach,injector:createInjector,noop:noop,bind:bind,toJson:toJson,fromJson:fromJson,identity:identity,isUndefined:isUndefined,isDefined:isDefined,isString:isString,isFunction:isFunction,isObject:isObject,isNumber:isNumber,isElement:isElement,isArray:isArray,version:version,isDate:isDate,lowercase:lowercase,uppercase:uppercase,callbacks:{$$counter:0},getTestability:getTestability,reloadWithDebugInfo:reloadWithDebugInfo,$$minErr:minErr,$$csp:csp,$$encodeUriSegment:encodeUriSegment,$$encodeUriQuery:encodeUriQuery,$$stringify:stringify}),(angularModule=setupModuleLoader(window))("ng",["ngLocale"],["$provide",function($provide){$provide.provider({$$sanitizeUri:$$SanitizeUriProvi
1der}),$provide.provider("$compile",$CompileProvider).directive({a:htmlAnchorDirective,input:inputDirective,textarea:inputDirective,form:formDirective,script:scriptDirective,select:selectDirective,option:optionDirective,ngBind:ngBindDirective,ngBindHtml:ngBindHtmlDirective,ngBindTemplate:ngBindTemplateDirective,ngClass:ngClassDirective,ngClassEven:ngClassEvenDirective,ngClassOdd:ngClassOddDirective,ngCloak:ngCloakDirective,ngController:ngControllerDirective,ngForm:ngFormDirective,ngHide:ngHideDirective,ngIf:ngIfDirective,ngInclude:ngIncludeDirective,ngInit:ngInitDirective,ngNonBindable:ngNonBindableDirective,ngPluralize:ngPluralizeDirective,ngRepeat:ngRepeatDirective,ngShow:ngShowDirective,ngStyle:ngStyleDirective,ngSwitch:ngSwitchDirective,ngSwitchWhen:ngSwitchWhenDirective,ngSwitchDefault:ngSwitchDefaultDirective,ngOptions:ngOptionsDirective,ngTransclude:ngTranscludeDirective,ngModel:ngModelDirective,ngList:ngListDirective,ngChange:ngChangeDirective,pattern:patternDirective,ngPattern:patternDirective,required:requiredDirective,ngRequired:requiredDirective,minlength:minlengthDirective,ngMinlength:minlengthDirective,maxlength:maxlengthDirective,ngMaxlength:maxlengthDirective,ngValue:ngValueDirective,ngModelOptions:ngModelOptionsDirective}).directive({ngInclude:ngIncludeFillContentDirective}).directive(ngAttributeAliasDirectives).directive(ngEventDirectives),$provide.provider({$anchorScroll:$AnchorScrollProvider,$animate:$AnimateProvider,$animateCss:$CoreAnimateCssProvider,$$animateJs:$$CoreAnimateJsProvider,$$animateQueue:$$CoreAnimateQueueProvider,$$AnimateRunner:$$AnimateRunnerFactoryProvider,$$animateAsyncRun:$$AnimateAsyncRunFactoryProvider,$browser:$BrowserProvider,$cacheFactory:$CacheFactoryProvider,$controller:$ControllerProvider,$document:$DocumentProvider,$$isDocumentHidden:$$IsDocumentHiddenProvider,$exceptionHandler:$ExceptionHandlerProvider,$filter:$FilterProvider,$$forceReflow:$$ForceReflowProvider,$interpolate:$InterpolateProvider,$interval:$IntervalProvider,$http:$HttpProvider,$httpParamSerializer:$HttpParamSerializerProvider,$httpParamSerializerJQLike:$HttpParamSerializerJQLikeProvider,$httpBackend:$HttpBackendProvider,$xhrFactory:$xhrFactoryProvider,$jsonpCallbacks:$jsonpCallbacksProvider,$location:$LocationProvider,$log:$LogProvider,$parse:$ParseProvider,$rootScope:$RootScopeProvider,$q:$QProvider,$$q:$$QProvider,$sce:$SceProvider,$sceDelegate:$SceDelegateProvider,$sniffer:$SnifferProvider,$templateCache:$TemplateCacheProvider,$templateRequest:$TemplateRequestProvider,$$testability:$$TestabilityProvider,$timeout:$TimeoutProvider,$window:$WindowProvider,$$rAF:$$RAFProvider,$$jqLite:$$jqLiteProvider,$$Map:$$MapProvider,$$cookieReader:$$CookieReaderProvider})}]).info({angularVersion:"1.6.3"})})(angular),angular.module("ngLocale",[],["$provide",function($provide){var PLURAL_CATEGORY_ONE="one",PLURAL_CATEGORY_OTHER="other";function getVF(n,opt_precision){void 0===opt_precision&&(opt_precision=Math.min((n=>{var i=(n+="").indexOf(".");return-1==i?0:n.length-i-1})(n),3));var base=Math.pow(10,opt_precision);return{v:opt_precision,f:(n*base|0)%base}}$provide.value("$locale",{DATETIME_FORMATS:{AMPMS:["AM","PM"],DAY:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],ERANAMES:["Before Christ","Anno Domini"],ERAS:["BC","AD"],FIRSTDAYOFWEEK:6,MONTH:["January","February","March","April","May","June","July","August","September","October","November","December"],SHORTDAY:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],SHORTMONTH:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],STANDALONEMONTH:["January","February","March","April","May","June","July","August","September","October","November","December"],WEEKENDRANGE:[5,6],fullDate:"EEEE, MMMM d, y",longDate:"MMMM d, y",medium:"MMM d, y h:mm:ss a",mediumDate:"MMM d, y",mediumTime:"h:mm:ss a",short:"M/d/yy h:mm a",shortDate:"M/d/yy",shortTime:"h:mm a"},NUMBER_FORMATS:{CURRENCY_SYM:"$",DECIMAL_SEP:".",GROUP_SEP:",",PATTERNS:[{gSize:3,lgSize:3,maxFrac:3,minFrac:0,minInt:1,negPre:"-",negSuf:"",posPre:"",posSuf:""},{gSize:3,lgSize:3,maxFrac:2,minFrac:2,minInt:1,negPre:"-¤",negSuf:"",posPre:"¤",posSuf:""}]},id:"en-us",localeID:"en_US",pluralCat:function(n,opt_precision){var i=0|n,n=getVF(n,opt_precision);return 1==i&&0==n.v?PLURAL_CATEGORY_ONE:PLURAL_CATEGORY_OTHER}})}]),jqLite(function(){angularInit(window.document,bootstrap)}))})(window),window.angular.$$csp().noInlineStyle||window.angular.element(document.head).prepend('<style type="text/css">@charset "UTF-8";[ng\\:cloak],[ng-cloak],[data-ng-cloak],[x-ng-cloak],.ng-cloak,.x-ng-cloak,.ng-hide:not(.ng-hide-animate){display:none !important;}ng\\:form{display:block;}.ng-animate-shim{visibility:hidden;}.ng-anchor{position:absolute;}</style>'),(angular=>{function routeToRegExp(path,opts){var keys=[],path=path.replace(/([().])/g,"\\$1").replace(/(\/)?:(\w+)(\*\?|[?*])?/g,function(_,slash,key,option){var optional="?"===option||"*?"===option,option="*"===option||"*?"===option;return keys.push({name:key,optional:optional}),slash=slash||"",(optional?"(?:"+slash:slash+"(?:")+(option?"(.+?)":"([^/]+)")+(optional?"?)?":")")}).replace(/([/$*])/g,"\\$1");return opts.ignoreTrailingSlashes&&(path=path.replace(/\/+$/,"")+"/*"),{keys:keys,regexp:new RegExp("^"+path+"(?:[?#]|$)",opts.caseInsensitiveMatch?"i":"")}}var isArray,isObject,isDefined,noop,isEagerInstantiationEnabled,ngRouteModule=angular.module("ngRoute",[]).info({angularVersion:"1.7.8"}).provider("$route",function(){function inherit(parent,extra){return angular.extend(Object.create(parent),extra)}isArray=angular.isArray,isObject=angular.isObject,isDefined=angular.isDefined,noop=angular.noop;var routes={};this.when=function(path,route){var redirectPath,route=((src,dst)=>{if(isArray(src)){dst=dst||[];for(var i=0,ii=src.length;i<ii;i++)dst[i]=src[i]}else if(isObject(src))for(var key in dst=dst||{},src)"$"===key.charAt(0)&&"$"===key.charAt(1)||(dst[key]=src[key]);return dst||src})(route);return angular.isUndefined(route.reloadOnUrl)&&(route.reloadOnUrl=!0),angular.isUndefined(route.reloadOnSearch)&&(route.reloadOnSearch=!0),angular.isUndefined(route.caseInsensitiveMatch)&&(route.caseInsensitiveMatch=this.caseInsensitiveMatch),routes[path]=angular.extend(route,{originalPath:path},path&&routeToRegExp(path,route)),path&&(redirectPath="/"===path[path.length-1]?path.substr(0,path.length-1):path+"/",routes[redirectPath]=angular.extend({originalPath:path,redirectTo:path},routeToRegExp(redirectPath,route))),this},this.caseInsensitiveMatch=!1,this.otherwise=function(params){return this.when(null,params="string"==typeof params?{redirectTo:params}:params),this},isEagerInstantiationEnabled=!0,this.eagerInstantiationEnabled=function(enabled){return isDefined(enabled)?(isEagerInstantiationEnabled=enabled,this):isEagerInstantiationEnabled}
1,this.$get=["$rootScope","$location","$routeParams","$q","$injector","$templateRequest","$sce","$browser",function($rootScope,$location,$routeParams,$q,$injector,$templateRequest,$sce,$browser){var preparedRoute,preparedRouteIsUpdateOnly,forceReload=!1,$route={routes:routes,reload:function(){var fakeLocationEvent={defaultPrevented:!(forceReload=!0),preventDefault:function(){this.defaultPrevented=!0,forceReload=!1}};$rootScope.$evalAsync(function(){prepareRoute(fakeLocationEvent),fakeLocationEvent.defaultPrevented||commitRoute()})},updateParams:function(newParams){if(!this.current||!this.current.$$route)throw $routeMinErr("norout","Tried updating route with no current route");newParams=angular.extend({},this.current.params,newParams),$location.path(interpolate(this.current.$$route.originalPath,newParams)),$location.search(newParams)}};return $rootScope.$on("$locationChangeStart",prepareRoute),$rootScope.$on("$locationChangeSuccess",commitRoute),$route;function prepareRoute($locationEvent){var params,match,newRoute,oldRoute,lastRoute=$route.current;angular.forEach(routes,function(route,path){!match&&(params=((on,route)=>{var keys=route.keys,params={};if(!route.regexp)return null;var m=route.regexp.exec(on);if(!m)return null;for(var i=1,len=m.length;i<len;++i){var key=keys[i-1],val=m[i];key&&val&&(params[key.name]=val)}return params})($location.path(),route))&&((match=inherit(route,{params:angular.extend({},$location.search(),params),pathParams:params})).$$route=route)}),preparedRoute=match||routes.null&&inherit(routes.null,{params:{},pathParams:{}}),newRoute=preparedRoute,oldRoute=lastRoute,(preparedRouteIsUpdateOnly=!forceReload&&newRoute&&oldRoute&&newRoute.$$route===oldRoute.$$route&&(!newRoute.reloadOnUrl||!newRoute.reloadOnSearch&&angular.equals(newRoute.pathParams,oldRoute.pathParams)))||!lastRoute&&!preparedRoute||$rootScope.$broadcast("$routeChangeStart",preparedRoute,lastRoute).defaultPrevented&&$locationEvent&&$locationEvent.preventDefault()}function commitRoute(){var nextRoutePromise,lastRoute=$route.current,nextRoute=preparedRoute;preparedRouteIsUpdateOnly?(lastRoute.params=nextRoute.params,angular.copy(lastRoute.params,$routeParams),$rootScope.$broadcast("$routeUpdate",lastRoute)):(nextRoute||lastRoute)&&(forceReload=!1,$route.current=nextRoute,nextRoutePromise=$q.resolve(nextRoute),$browser.$$incOutstandingRequestCount("$route"),nextRoutePromise.then(getRedirectionData).then(handlePossibleRedirection).then(function(keepProcessingRoute){return keepProcessingRoute&&nextRoutePromise.then(resolveLocals).then(function(locals){nextRoute===$route.current&&(nextRoute&&(nextRoute.locals=locals,angular.copy(nextRoute.params,$routeParams)),$rootScope.$broadcast("$routeChangeSuccess",nextRoute,lastRoute))})}).catch(function(error){nextRoute===$route.current&&$rootScope.$broadcast("$routeChangeError",nextRoute,lastRoute,error)}).finally(function(){$browser.$$completeOutstandingRequest(noop,"$route")}))}function getRedirectionData(route){var oldSearch,oldPath,data={route:route,hasRedirection:!1};if(route)if(route.redirectTo)angular.isString(route.redirectTo)?(data.path=interpolate(route.redirectTo,route.params),data.search=route.params,data.hasRedirection=!0):(oldPath=$location.path(),oldSearch=$location.search(),oldPath=route.redirectTo(route.pathParams,oldPath,oldSearch),angular.isDefined(oldPath)&&(data.url=oldPath,data.hasRedirection=!0));else if(route.resolveRedirectTo)return $q.resolve($injector.invoke(route.resolveRedirectTo)).then(function(newUrl){return angular.isDefined(newUrl)&&(data.url=newUrl,data.hasRedirection=!0),data});return data}function handlePossibleRedirection(data){var oldUrl,newUrl,keepProcessingRoute=!0;return keepProcessingRoute=data.route!==$route.current||data.hasRedirection&&(oldUrl=$location.url(),(newUrl=data.url)?$location.url(newUrl).replace():newUrl=$location.path(data.path).search(data.search).replace().url(),newUrl!==oldUrl)?!1:keepProcessingRoute}function resolveLocals(route){var locals;if(route)return locals=angular.extend({},route.resolve),angular.forEach(locals,function(value,key){locals[key]=angular.isString(value)?$injector.get(value):$injector.invoke(value,null,null,key)}),route=(route=>{var template,templateUrl;return angular.isDefined(template=route.template)?angular.isFunction(template)&&(template=template(route.params)):angular.isDefined(templateUrl=route.templateUrl)&&(angular.isFunction(templateUrl)&&(templateUrl=templateUrl(route.params)),angular.isDefined(templateUrl))&&(route.loadedTemplateUrl=$sce.valueOf(templateUrl),template=$templateRequest(templateUrl)),template})(route),angular.isDefined(route)&&(locals.$template=route),$q.all(locals)}function interpolate(string,params){var result=[];return angular.forEach((string||"").split(":"),function(segment,i){0===i?result.push(segment):(segment=(i=segment.match(/(\w+)(?:[?*])?(.*)/))[1],result.push(params[segment]),result.push(i[2]||""),delete params[segment])}),result.join("")}}]}).run(instantiateRoute),$routeMinErr=angular.$$minErr("ngRoute");function instantiateRoute($injector){isEagerInstantiationEnabled&&$injector.get("$route")}function ngViewFactory($route,$anchorScroll,$animate){return{restrict:"ECA",terminal:!0,priority:400,transclude:"element",link:function(scope,$element,attr,ctrl,$transclude){var currentScope,currentElement,previousLeaveAnimation,autoScrollExp=attr.autoscroll,onloadExp=attr.onload||"";function cleanupLastView(){previousLeaveAnimation&&($animate.cancel(previousLeaveAnimation),previousLeaveAnimation=null),currentScope&&(currentScope.$destroy(),currentScope=null),currentElement&&((previousLeaveAnimation=$animate.leave(currentElement)).done(function(response){!1!==response&&(previousLeaveAnimation=null)}),currentElement=null)}
1function update(){var current,clone,locals=$route.current&&$route.current.locals,locals=locals&&locals.$template;angular.isDefined(locals)?(locals=scope.$new(),current=$route.current,clone=$transclude(locals,function(clone){$animate.enter(clone,null,currentElement||$element).done(function(response){!1===response||!angular.isDefined(autoScrollExp)||autoScrollExp&&!scope.$eval(autoScrollExp)||$anchorScroll()}),cleanupLastView()}),currentElement=clone,(currentScope=current.scope=locals).$emit("$viewContentLoaded"),currentScope.$eval(onloadExp)):cleanupLastView()}scope.$on("$routeChangeSuccess",update),update()}}}function ngViewFillContentFactory($compile,$controller,$route){return{restrict:"ECA",priority:-400,link:function(scope,$element){var controller,current=$route.current,locals=current.locals,link=($element.html(locals.$template),$compile($element.contents()));current.controller&&(locals.$scope=scope,controller=$controller(current.controller,locals),current.controllerAs&&(scope[current.controllerAs]=controller),$element.data("$ngControllerController",controller),$element.children().data("$ngControllerController",controller)),scope[current.resolveAs||"$resolve"]=locals,link(scope)}}}instantiateRoute.$inject=["$injector"],ngRouteModule.provider("$routeParams",function(){this.$get=function(){return{}}}),ngRouteModule.directive("ngView",ngViewFactory),ngRouteModule.directive("ngView",ngViewFillContentFactory),ngViewFactory.$inject=["$route","$anchorScroll","$animate"],ngViewFillContentFactory.$inject=["$compile","$controller","$route"]})((window,window.angular)),(angular=>{var $sanitizeMinErr=angular.$$minErr("$sanitize"),START_TAG_REGEXP=/^<((?:[a-zA-Z])[\w:-]*)((?:\s+[\w:-]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)\s*(>?)/,END_TAG_REGEXP=/^<\/\s*([\w:-]+)[^>]*>/,ATTR_REGEXP=/([\w:-]+)(?:\s*=\s*(?:(?:"((?:[^"])*)")|(?:'((?:[^'])*)')|([^>\s]+)))?/g,BEGIN_TAG_REGEXP=/^</,BEGING_END_TAGE_REGEXP=/^<\//,COMMENT_REGEXP=/<!--(.*?)-->/g,DOCTYPE_REGEXP=/<!DOCTYPE([^>]*?)>/i,CDATA_REGEXP=/<!\[CDATA\[(.*?)]]>/g,SURROGATE_PAIR_REGEXP=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,NON_ALPHANUMERIC_REGEXP=/([^\#-~| |!])/g,voidElements=makeMap("area,br,col,hr,img,wbr"),optionalEndTagBlockElements=makeMap("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),optionalEndTagInlineElements=makeMap("rp,rt"),optionalEndTagElements=angular.extend({},optionalEndTagInlineElements,optionalEndTagBlockElements),blockElements=angular.extend({},optionalEndTagBlockElements,makeMap("address,article,aside,blockquote,caption,center,del,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,map,menu,nav,ol,pre,script,section,table,ul")),inlineElements=angular.extend({},optionalEndTagInlineElements,makeMap("a,abbr,acronym,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,q,ruby,rp,rt,s,samp,small,span,strike,strong,sub,sup,time,tt,u,var")),optionalEndTagBlockElements=makeMap("circle,defs,desc,ellipse,font-face,font-face-name,font-face-src,g,glyph,hkern,image,linearGradient,line,marker,metadata,missing-glyph,mpath,path,polygon,polyline,radialGradient,rect,stop,svg,switch,text,title,tspan,use"),specialElements=makeMap("script,style"),validElements=angular.extend({},voidElements,blockElements,inlineElements,optionalEndTagElements,optionalEndTagBlockElements),uriAttrs=makeMap("background,cite,href,longdesc,src,usemap,xlink:href"),optionalEndTagInlineElements=makeMap("abbr,align,alt,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,coords,dir,face,headers,height,hreflang,hspace,ismap,lang,language,nohref,nowrap,rel,rev,rows,rowspan,rules,scope,scrolling,shape,size,span,start,summary,tabindex,target,title,type,valign,value,vspace,width"),optionalEndTagBlockElements=makeMap("accent-height,accumulate,additive,alphabetic,arabic-form,ascent,baseProfile,bbox,begin,by,calcMode,cap-height,class,color,color-rendering,content,cx,cy,d,dx,dy,descent,display,dur,end,fill,fill-rule,font-family,font-size,font-stretch,font-style,font-variant,font-weight,from,fx,fy,g1,g2,glyph-name,gradientUnits,hanging,height,horiz-adv-x,horiz-origin-x,ideographic,k,keyPoints,keySplines,keyTimes,lang,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mathematical,max,min,offset,opacity,orient,origin,overline-position,overline-thickness,panose-1,path,pathLength,points,preserveAspectRatio,r,refX,refY,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,rotate,rx,ry,slope,stemh,stemv,stop-color,stop-opacity,str
1ikethrough-position,strikethrough-thickness,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,systemLanguage,target,text-anchor,to,transform,type,u1,u2,underline-position,underline-thickness,unicode,unicode-range,units-per-em,values,version,viewBox,visibility,width,widths,x,x-height,x1,x2,xlink:actuate,xlink:arcrole,xlink:role,xlink:show,xlink:title,xlink:type,xml:base,xml:lang,xml:space,xmlns,xmlns:xlink,y,y1,y2,zoomAndPan",!0),validAttrs=angular.extend({},uriAttrs,optionalEndTagBlockElements,optionalEndTagInlineElements);function makeMap(str,lowercaseKeys){for(var obj={},items=str.split(","),i=0;i<items.length;i++)obj[lowercaseKeys?angular.lowercase(items[i]):items[i]]=!0;return obj}var hiddenPre=document.createElement("pre");function decodeEntities(value){return value?(hiddenPre.innerHTML=value.replace(/</g,"<"),hiddenPre.textContent):""}function encodeEntities(value){return value.replace(/&/g,"&").replace(SURROGATE_PAIR_REGEXP,function(value){return"&#"+(1024*(value.charCodeAt(0)-55296)+(value.charCodeAt(1)-56320)+65536)+";"}).replace(NON_ALPHANUMERIC_REGEXP,function(value){return"&#"+value.charCodeAt(0)+";"}).replace(/</g,"<").replace(/>/g,">")}function htmlSanitizeWriter(buf,uriValidator){var ignore=!1,out=angular.bind(buf,buf.push);return{start:function(tag,attrs,unary){tag=angular.lowercase(tag),(ignore=!ignore&&specialElements[tag]?tag:ignore)||!0!==validElements[tag]||(out("<"),out(tag),angular.forEach(attrs,function(value,key){var lkey=angular.lowercase(key),isImage="img"===tag&&"src"===lkey||"background"===lkey;!0!==validAttrs[lkey]||!0===uriAttrs[lkey]&&!uriValidator(value,isImage)||(out(" "),out(key),out('="'),out(encodeEntities(value)),out('"'))}),out(unary?"/>":">"))},end:function(tag){tag=angular.lowercase(tag),ignore||!0!==validElements[tag]||(out("</"),out(tag),out(">")),tag==ignore&&(ignore=!1)},chars:function(chars){ignore||out(encodeEntities(chars))}}}angular.module("ngSanitize",[]).provider("$sanitize",function(){this.$get=["$$sanitizeUri",function($$sanitizeUri){return function(html){var buf=[];return((html,handler)=>{var index,chars,match,text,stack=[],last=html="string"!=typeof html?null==html?"":""+html:html;for(stack.last=function(){return stack[stack.length-1]};html;){if(chars=!(text=""),stack.last()&&specialElements[stack.last()]?(html=html.replace(new RegExp("([\\W\\w]*)<\\s*\\/\\s*"+stack.last()+"[^>]*>","i"),function(all,text){return text=text.replace(COMMENT_REGEXP,"$1").replace(CDATA_REGEXP,"$1"),handler.chars&&handler.chars(decodeEntities(text)),""}),parseEndTag(0,stack.last())):(0===html.indexOf("\x3c!--")?0<=(index=html.indexOf("--",4))&&html.lastIndexOf("--\x3e",index)===index&&(handler.comment&&handler.comment(html.substring(4,index)),html=html.substring(index+3),chars=!1):DOCTYPE_REGEXP.test(html)?(match=html.match(DOCTYPE_REGEXP))&&(html=html.replace(match[0],""),chars=!1):BEGING_END_TAGE_REGEXP.test(html)?(match=html.match(END_TAG_REGEXP))&&(html=html.substring(match[0].length),match[0].replace(END_TAG_REGEXP,parseEndTag),chars=!1):BEGIN_TAG_REGEXP.test(html)&&((match=html.match(START_TAG_REGEXP))?(match[4]&&(html=html.substring(match[0].length),match[0].replace(START_TAG_REGEXP,parseStartTag)),chars=!1):(text+="<",html=html.substring(1))),chars&&(index=html.indexOf("<"),text+=index<0?html:html.substring(0,index),html=index<0?"":html.substring(index),handler.chars)&&handler.chars(decodeEntities(text))),html==last)throw $sanitizeMinErr("badparse","The sanitizer was unable to parse the following block of html: {0}",html);last=html}function parseStartTag(tag,tagName,rest,unary){if(tagName=angular.lowercase(tagName),blockElements[tagName])for(;stack.last()&&inlineElements[stack.last()];)parseEndTag(0,stack.last());optionalEndTagElements[tagName]&&stack.last()==tagName&&parseEndTag(0,tagName),(unary=voidElements[tagName]||!!unary)||stack.push(tagName);var attrs={};rest.replace(ATTR_REGEXP,function(match,name,doubleQuotedValue,singleQuotedValue,unquotedValue){attrs[name]=decodeEntities(doubleQuotedValue||singleQuotedValue||unquotedValue||"")}),handler.start&&handler.start(tagName,attrs,unary)}function parseEndTag(tag,tagName){var i,pos=0;if(tagName=angular.lowercase(tagName))for(pos=stack.length-1;0<=pos&&stack[pos]!=tagName;pos--);if(0<=pos){for(i=stack.length-1;pos<=i;i--)handler.end&&handler.end(stack[i]);stack.length=pos}}parseEndTag()})(html,htmlSanitizeWriter(buf,function(uri,isImage){return!/^unsafe/.test($$sanitizeUri(uri,isImage))})),buf.join("")}}]}),angular.module("ngSanitize").filter("linky",["$sanitize",function($sanitize){var LINKY_URL_REGEXP=/((ftp|https?):\/\/|(www\.)|(mailto:)?[A-Za-z0-9._%+-]+@)\S*[^\s.;,(){}<>"\u201d\u2019]/i,MAILTO_REGEXP=/^mailto:/i;return function(text,target){if(!text)return text;
1for(var match,url,i,raw=text,html=[];match=raw.match(LINKY_URL_REGEXP);)url=match[0],match[2]||match[4]||(url=(match[3]?"http://":"mailto:")+url),addText(raw.substr(0,i=match.index)),((url,text)=>{html.push("<a "),angular.isDefined(target)&&html.push('target="',target,'" '),html.push('href="',url.replace(/"/g,"""),'">'),addText(text),html.push("</a>")})(url,match[0].replace(MAILTO_REGEXP,"")),raw=raw.substring(i+match[0].length);return addText(raw),$sanitize(html.join(""));function addText(text){var buf;text&&html.push((text=text,htmlSanitizeWriter(buf=[],angular.noop).chars(text),buf.join("")))}}}])})((window,window.angular)),(angular=>{var ngAriaModule=angular.module("ngAria",["ng"]).info({angularVersion:"1.8.3"}).provider("$aria",function(){var config={ariaHidden:!0,ariaChecked:!0,ariaReadonly:!0,ariaDisabled:!0,ariaRequired:!0,ariaInvalid:!0,ariaValue:!0,tabindex:!0,bindKeydown:!0,bindRoleForClick:!0};function watchExpr(attrName,ariaAttr,nativeAriaNodeNames,negate){return function(scope,elem,attr){var ariaCamelName;attr.hasOwnProperty("ngAriaDisable")||(ariaCamelName=attr.$normalize(ariaAttr),!config[ariaCamelName])||isNodeOneOf(elem,nativeAriaNodeNames)||attr[ariaCamelName]||scope.$watch(attr[attrName],function(boolVal){elem.attr(ariaAttr,boolVal=negate?!boolVal:!!boolVal)})}}this.config=function(newConfig){config=angular.extend(config,newConfig)}
1,this.$get=function(){return{config:function(key){return config[key]},$$watchExpr:watchExpr}}}),nativeAriaNodeNames=["BUTTON","A","INPUT","TEXTAREA","SELECT","DETAILS","SUMMARY"],isNodeOneOf=function(elem,nodeTypeArray){if(-1!==nodeTypeArray.indexOf(elem[0].nodeName))return!0};ngAriaModule.directive("ngShow",["$aria",function($aria){return $aria.$$watchExpr("ngShow","aria-hidden",[],!0)}]).directive("ngHide",["$aria",function($aria){return $aria.$$watchExpr("ngHide","aria-hidden",[],!1)}]).directive("ngValue",["$aria",function($aria){return $aria.$$watchExpr("ngValue","aria-checked",nativeAriaNodeNames,!1)}]).directive("ngChecked",["$aria",function($aria){return $aria.$$watchExpr("ngChecked","aria-checked",nativeAriaNodeNames,!1)}]).directive("ngReadonly",["$aria",function($aria){return $aria.$$watchExpr("ngReadonly","aria-readonly",nativeAriaNodeNames,!1)}]).directive("ngRequired",["$aria",function($aria){return $aria.$$watchExpr("ngRequired","aria-required",nativeAriaNodeNames,!1)}]).directive("ngModel",["$aria",function($aria){function shouldAttachAttr(attr,normalizedAttr,elem,allowNonAriaNodes){return $aria.config(normalizedAttr)&&!elem.attr(attr)&&(allowNonAriaNodes||!isNodeOneOf(elem,nativeAriaNodeNames))&&("hidden"!==elem.attr("type")||"INPUT"!==elem[0].nodeName)}function shouldAttachRole(role,elem){return!elem.attr("role")&&elem.attr("type")===role&&!isNodeOneOf(elem,nativeAriaNodeNames)}return{restrict:"A",require:"ngModel",priority:200,compile:function(elem,attr){var shape;if(!attr.hasOwnProperty("ngAriaDisable"))return shape=(attr=>{var type=attr.type,attr=attr.role;return"checkbox"===(type||attr)||"menuitemcheckbox"===attr?"checkbox":"radio"===(type||attr)||"menuitemradio"===attr?"radio":"range"===type||"progressbar"===attr||"slider"===attr?"range":""})(attr),{post:function(scope,elem,attr,ngModel){var needsAriaValuemin,needsAriaValuemax,needsAriaValuenow,needsTabIndex=shouldAttachAttr("tabindex","tabindex",elem,!1);function ngAriaWatchModelValue(){return ngModel.$modelValue}switch(shape){case"radio":case"checkbox":shouldAttachRole(shape,elem)&&elem.attr("role",shape),shouldAttachAttr("aria-checked","ariaChecked",elem,!1)&&scope.$watch(ngAriaWatchModelValue,"radio"===shape?function(newVal){var boolVal=attr.value==ngModel.$viewValue;elem.attr("aria-checked",boolVal)}:function(){elem.attr("aria-checked",!ngModel.$isEmpty(ngModel.$viewValue))}),needsTabIndex&&elem.attr("tabindex",0);break;case"range":shouldAttachRole(shape,elem)&&elem.attr("role","slider"),$aria.config("ariaValue")&&(needsAriaValuemin=!elem.attr("aria-valuemin")&&(attr.hasOwnProperty("min")||attr.hasOwnProperty("ngMin")),needsAriaValuemax=!elem.attr("aria-valuemax")&&(attr.hasOwnProperty("max")||attr.hasOwnProperty("ngMax")),needsAriaValuenow=!elem.attr("aria-valuenow"),needsAriaValuemin&&attr.$observe("min",function(newVal){elem.attr("aria-valuemin",newVal)}),needsAriaValuemax&&attr.$observe("max",function(newVal){elem.attr("aria-valuemax",newVal)}),needsAriaValuenow)&&scope.$watch(ngAriaWatchModelValue,function(newVal){elem.attr("aria-valuenow",newVal)}),needsTabIndex&&elem.attr("tabindex",0)}!attr.hasOwnProperty("ngRequired")&&ngModel.$validators.required&&shouldAttachAttr("aria-required","ariaRequired",elem,!1)&&attr.$observe("required",function(){elem.attr("aria-required",!!attr.required)}),shouldAttachAttr("aria-invalid","ariaInvalid",elem,!0)&&scope.$watch(function(){return ngModel.$invalid},function(newVal){elem.attr("aria-invalid",!!newVal)})}}}}}]).directive("ngDisabled",["$aria",function($aria){return $aria.$$watchExpr("ngDisabled","aria-disabled",nativeAriaNodeNames,!1)}]).directive("ngMessages",function(){return{restrict:"A",require:"?ngMessages",link:function(scope,elem,attr,ngMessages){attr.hasOwnProperty("ngAriaDisable")||elem.attr("aria-live")||elem.attr("aria-live","assertive")}}}).directive("ngClick",["$aria","$parse",function($aria,$parse){return{restrict:"A",compile:function(elem,attr){var fn;if(!attr.hasOwnProperty("ngAriaDisable"))return fn=$parse(attr.ngClick),function(scope,elem,attr){isNodeOneOf(elem,nativeAriaNodeNames)||
1($aria.config("bindRoleForClick")&&!elem.attr("role")&&elem.attr("role","button"),$aria.config("tabindex")&&!elem.attr("tabindex")&&elem.attr("tabindex",0),!$aria.config("bindKeydown"))||attr.ngKeydown||attr.ngKeypress||attr.ngKeyup||elem.on("keydown",function(event){var keyCode=event.which||event.keyCode;13!==keyCode&&32!==keyCode||(-1!==nativeAriaNodeNames.indexOf(event.target.nodeName)||event.target.isContentEditable||event.preventDefault(),scope.$apply(function(){fn(scope,{$event:event})}))})}}}}]).directive("ngDblclick",["$aria",function($aria){return function(scope,elem,attr){attr.hasOwnProperty("ngAriaDisable")||!$aria.config("tabindex")||elem.attr("tabindex")||isNodeOneOf(elem,nativeAriaNodeNames)||elem.attr("tabindex",0)}}])})((window,window.angular)),(b=>{var c=b.isDefined,d=b.isUndefined,e=b.isNumber,f=b.isObject,g=b.isArray,h=b.extend,i=b.toJson;b.module("LocalStorageModule",[]).provider("localStorageService",function(){this.prefix="ls",this.storageType="localStorage",this.cookie={expiry:30,path:"/"},this.notify={setItem:!0,removeItem:!1},this.setPrefix=function(a){return this.prefix=a,this},this.setStorageType=function(a){return this.storageType=a,this},this.setStorageCookie=function(a,b){return this.cookie.expiry=a,this.cookie.path=b,this},this.setStorageCookieDomain=function(a){return this.cookie.domain=a,this},this.setNotify=function(a,b){return this.notify={setItem:a,removeItem:b},this},this.$get=["$rootScope","$window","$document","$parse",function(a,b,j,k){var l,m=this,n=m.prefix,o=m.cookie,p=m.notify,q=m.storageType,r=(j?j[0]&&(j=j[0]):j=document,"."!==n.substr(-1)&&(n=n?n+".":""),function(a){return n+a}),s=(()=>{try{var c=q in b&&null!==b[q],d=r("__"+Math.round(1e7*Math.random()));return c&&((l=b[q]).setItem(d,""),l.removeItem(d)),c}catch(e){return q="cookie",a.$broadcast("LocalStorageModule.notification.error",e.message),!1}})(),t=function(b,c){if(c=d(c)?null:i(c),!s||"cookie"===m.storageType)return s||a.$broadcast("LocalStorageModule.notification.warning","LOCAL_STORAGE_NOT_SUPPORTED"),p.setItem&&a.$broadcast("LocalStorageModule.notification.setitem",{key:b,newvalue:c,storageType:"cookie"}),z(b,c);try{l&&l.setItem(r(b),c),p.setItem&&a.$broadcast("LocalStorageModule.notification.setitem",{key:b,newvalue:c,storageType:m.storageType})}catch(e){return a.$broadcast("LocalStorageModule.notification.error",e.message),z(b,c)}return!0},u=function(b){if(!s||"cookie"===m.storageType)return s||a.$broadcast("LocalStorageModule.notification.warning","LOCAL_STORAGE_NOT_SUPPORTED"),A(b);b=l?l.getItem(r(b)):null;if(!b||"null"===b)return null;try{return JSON.parse(b)}catch(d){return b}},v=function(){for(var c,b=0;b<arguments.length;b++)if(c=arguments[b],s&&"cookie"!==m.storageType)try{l.removeItem(r(c)),p.removeItem&&a.$broadcast("LocalStorageModule.notification.removeitem",{key:c,storageType:m.storageType})}catch(d){a.$broadcast("LocalStorageModule.notification.error",d.message),B(c)}else s||a.$broadcast("LocalStorageModule.notification.warning","LOCAL_STORAGE_NOT_SUPPORTED"),p.removeItem&&a.$broadcast("LocalStorageModule.notification.removeitem",{key:c,storageType:"cookie"}),B(c)},y=(()=>{try{return b.navigator.cookieEnabled||"cookie"in j&&(0<j.cookie.length||-1<(j.cookie="test").indexOf.call(j.cookie,"test"))}catch(c){return a.$broadcast("LocalStorageModule.notification.error",c.message),!1}})(),z=function(b,c,h){if(d(c))return!1;if((g(c)||f(c))&&(c=i(c)),!y)return a.$broadcast("LocalStorageModule.notification.error","COOKIES_NOT_SUPPORTED"),!1;try{var n,k="",l=new Date,m="";null===c?(l.setTime(l.getTime()+-864e5),k="; expires="+l.toGMTString(),c=""):e(h)&&0!==h?(l.setTime(l.getTime()+24*h*60*60*1e3),k="; expires="+l.toGMTString()):0!==o.expiry&&(l.setTime(l.getTime()+24*o.expiry*60*60*1e3),k="; expires="+l.toGMTString()),b&&(n="; path="+o.path,o.domain&&(m="; domain="+o.domain),j.cookie=r(b)+"="+encodeURIComponent(c)+k+n+m)}catch(p){return a.$broadcast("LocalStorageModule.notification.error",p.message),!1}return!0},A=function(b){if(!y)return a.$broadcast("LocalStorageModule.notification.error","COOKIES_NOT_SUPPORTED"),!1;for(var c=j.cookie&&j.cookie.split(";")||[],d=0;d<c.length;d++){for(var e=c[d];" "===e.charAt(0);)e=e.substring(1,e.length);if(0===e.indexOf(r(b)+"=")){var f=decodeURIComponent(e.substring(n.length+b.length+1,e.length));try{return JSON.parse(f)}catch(g){return f}}}return null},B=function(a){z(a,null)},C=function(){for(var a=null,b=n.length,c=j.cookie.split(";"),d=0;d<c.length;d++){for(a=c[d];" "===a.charAt(0);)a=a.substring(1,a.length);var e=a.substring(b,a.indexOf("="));B(e)}};return{isSupported:s,getStorageType:function(){return q},set:t,add:t,get:u,keys:function(){if(!s)return a.$broadcast("LocalStorageModule.notification.warning","LOCAL_STORAGE_NOT_SUPPORTED"),[];var d,b=n.length,c=[];for(d in l)if(d.substr(0,b)===n)try{c.push(d.substr(b))}catch(e){return a.$broadcast("LocalStorageModule.notification.error",e.Description),[]}return c},remove:v,clearAll:function(b){var c=n?new RegExp("^"+n):new RegExp,d=b?new RegExp(b):new RegExp;if(!s||"cookie"===m.storageType)return s||a.$broadcast("LocalStorageModule.notification.warning","LOCAL_STORAGE_NOT_SUPPORTED"),C();var f,e=n.length;for(f in l)if(c.test(f)&&d.test(f.substr(e)))try{v(f.substr(e))}catch(g){return a.$broadcast("LocalStorageModule.notification.error",g.message),C()}return!0},bind:function(a,b,d,e){var g=u(e=e||b);return null===g&&c(d)?g=d:f(g)&&f(d)&&(g=h(g,d)),k(b).assign(a,g),a.$watch(b,function(a){t(e,a)},f(a[b]))},deriveKey:r,length:function(){for(var a=0,c=b[q],d=0;d<c.length;d++)0===c.key(d).indexOf(n)&&a++;return a},cookie:{isSupported:y,set:z,add:z,get:A,remove:B,clearAll:C}}}]})})((window,window.angular)),(e=>{function m(d,k,l){var a=l.baseHref(),h=d[0];return function(f,b,c){var g=(c=c||{}).expires,d=e.isDefined(c.path)?c.path:a;e.isUndefined(b)&&(g="Thu, 01 Jan 1970 00:00:00 GMT",b=""),e.isString(g)&&(g=new Date(g)),b=(b=encodeURIComponent(f)+"="+encodeURIComponent(b))+(d?";path="+d:"")+(c.domain?";domain="+c.domain:""),4096<(c=(b=(b=(b+=g?";expires="+g.toUTCString():"")+(c.secure?";secure":""))+(c.samesite?";samesite="+c.samesite:"")).length+1)&&k.warn("Cookie '"+f+"' possibly not set or overflowed because it was too large ("+c+" > 4096 bytes)!"),h.cookie=b}}e.module("ngCookies",["ng"]).info({angularVersion:"1.8.3"}).provider("$cookies",[function(){var d=this.defaults={};this.$get=["$$cookieReader","$$cookieWriter",function(k,l){return{get:function(a){return k()[a]},getObject:function(a){return(a=this.get(a))&&e.fromJson(a)},getAll:function(){return k()},put:function(a,h,f){l(a,h,f?e.extend({},d,f):d)},putObject:function(a,d,f){this.put(a,e.toJson(d),f)},remove:function(a,h){l(a,void 0,h?e.extend({},d,h):d)}}}]}]),m.$inject=["$document","$log","$browser"],e.module("ngCookies").provider("$$cookieWriter",function(){this.$get=m})})((window,window.angular)),((b,c)=>{function d(a){return E(a)?a:Object.keys(a).map(function(b){return a[b]})}function e(a){return null===a}function f(a,b){return-1==Object.keys(a).map(function(d){return b[d]!==c&&b[d]==a[d]}).indexOf(!1)}function g(a,b){for(var d=0,e=0;e<=b.length;e++){var f=((a,b,c)=>{for(var d=0;b+d<=a.length;){if(a.charAt(b+d)==c)return d;d++}return-1})(a,d,b.charAt(e));if(-1==f)return!1;d+=f+1}return!0}function h(a,b,c){var d=0;return a.filter(function(a){a=y(c)?d<b&&c(a):d<b;return d=a?d+1:d,a})}function i(a,b){return Math.round(a*Math.pow(10,b))/Math.pow(10,b)}function k(a){return a&&a.$evalAsync&&a.$watch}function l(){return function(a,b){return b<a}}function m(){return function(a,b){return b<=a}}function n(){return function(a,b){return a<b}}function o(){return function(a,b){return a<=b}}function p(){return function(a,b){return a==b}}function q(){return function(a,b){return a!=b}}function r(){return function(a,b){return a===b}}function s(){return function(a,b){return a!==b}}function t(a){return function(b,c){return b=D(b)?d(b):b,!(!E(b)||z(c))&&b.some(function(b){return B(c)&&D(b)||A(c)?a(c)(b):b===c})}}function v(a){return function(b,c){var f,g;return b=D(b)?d(b):b,E(b)?(f=[],g=a(c),z(c)?b.filter(function(a,b,c){return c.indexOf(a)===b}):b.filter(function(a){a=g(a);return!((a,b)=>!z(b)&&a.some(function(a){return I(a,b)}))(f,a)&&(f.push(a),!0)})):b}}function x(){return function(a){return B(a)?a.split(" ").map(function(a){return a.charAt(0).toUpperCase()+a.substring(1)}).join(" "):a}}
1var y=b.isDefined,z=b.isUndefined,A=b.isFunction,B=b.isString,C=b.isNumber,D=b.isObject,E=b.isArray,F=b.forEach,G=b.extend,H=b.copy,I=b.equals;String.prototype.contains||(String.prototype.contains=function(){return-1!==String.prototype.indexOf.apply(this,arguments)}),b.module("a8m.angular",[]).filter("isUndefined",function(){return function(a){return b.isUndefined(a)}}).filter("isDefined",function(){return function(a){return b.isDefined(a)}}).filter("isFunction",function(){return function(a){return b.isFunction(a)}}).filter("isString",function(){return function(a){return b.isString(a)}}).filter("isNumber",function(){return function(a){return b.isNumber(a)}}).filter("isArray",function(){return function(a){return b.isArray(a)}}).filter("isObject",function(){return function(a){return b.isObject(a)}}).filter("isEqual",function(){return function(a,c){return b.equals(a,c)}}),b.module("a8m.conditions",[]).filter({isGreaterThan:l,">":l,isGreaterThanOrEqualTo:m,">=":m,isLessThan:n,"<":n,isLessThanOrEqualTo:o,"<=":o,isEqualTo:p,"==":p,isNotEqualTo:q,"!=":q,isIdenticalTo:r,"===":r,isNotIdenticalTo:s,"!==":s}),b.module("a8m.is-null",[]).filter("isNull",function(){return e}),b.module("a8m.after-where",[]).filter("afterWhere",function(){return function(a,b){var c;return a=D(a)?d(a):a,!E(a)||z(b)?a:(c=a.map(function(a){return f(b,a)}).indexOf(!0),a.slice(-1===c?0:c))}}),b.module("a8m.after",[]).filter("after",function(){return function(a,b){return a=D(a)?d(a):a,E(a)?a.slice(b):a}}),b.module("a8m.before-where",[]).filter("beforeWhere",function(){return function(a,b){var c;return a=D(a)?d(a):a,!E(a)||z(b)?a:(c=a.map(function(a){return f(b,a)}).indexOf(!0),a.slice(0,-1===c?a.length:++c))}}),b.module("a8m.before",[]).filter("before",function(){return function(a,b){return a=D(a)?d(a):a,E(a)?a.slice(0,b&&--b):a}}),b.module("a8m.chunk-by",["a8m.filter-watcher"]).filter("chunkBy",["filterWatcher",function(a){return function(b,c,d){return a.isMemoized("chunkBy",arguments)||a.memoize("chunkBy",arguments,this,((a,b,c)=>E(a)?a.map(function(a,d,f){return a=f.slice(d*=b,d+b),!z(c)&&a.length<b?a.concat(((a,b)=>{for(var c=[];a--;)c[a]=b;return c})(b-a.length,c)):a}).slice(0,Math.ceil(a.length/b)):a)(b,c,d))}}]),b.module("a8m.concat",[]).filter("concat",[function(){return function(a,b){var c;return z(b)?a:E(a)?D(b)?a.concat(d(b)):a.concat(b):D(a)?(c=d(a),D(b)?c.concat(d(b)):c.concat(b)):a}}]),b.module("a8m.contains",[]).filter({contains:["$parse",t],some:["$parse",t]}),b.module("a8m.count-by",[]).filter("countBy",["$parse",function(a){return function(b,c){var e,f={},g=a(c);return b=D(b)?d(b):b,!E(b)||z(c)?b:(b.forEach(function(a){e=g(a),f[e]||(f[e]=0),f[e]++}),f)}}]),b.module("a8m.defaults",[]).filter("defaults",["$parse",function(a){return function(b,c){var e;return b=D(b)?d(b):b,E(b)&&D(c)&&(e=function j(a,b,c){return b=b||[],Object.keys(a).forEach(function(d){D(a[d])&&!E(a[d])?j(a[d],b,c&&c+"."+d||d):b.push(c?c+"."+d:d)}),b}(c),b.forEach(function(b){e.forEach(function(d){var d=a(d),f=d.assign;z(d(b))&&f(b,d(c))})})),b}}]),b.module("a8m.every",[]).filter("every",["$parse",function(a){return function(b,c){return b=D(b)?d(b):b,!(E(b)&&!z(c))||b.every(function(b){return D(b)||A(c)?a(c)(b):b===c})}}]),b.module("a8m.filter-by",[]).filter("filterBy",["$parse",function(a){return function(b,e,f,g){var h;return f=B(f)||C(f)?String(f).toLowerCase():c,b=D(b)?d(b):b,!E(b)||z(f)?b:b.filter(function(b){return e.some(function(c){return h=~c.indexOf("+")?c.replace(/\s+/g,"").split("+").map(function(c){return a(c)(b)}).join(" "):a(c)(b),!(!B(h)&&!C(h))&&(h=String(h).toLowerCase(),g?h===f:h.contains(f))})})}}]),b.module("a8m.first",[]).filter("first",["$parse",function(a){return function(b){var e,f,g;return b=D(b)?d(b):b,E(b)?(g=Array.prototype.slice.call(arguments,1),e=C(g[0])?g[0]:1,f=C(g[0])?C(g[1])?c:g[1]:g[0],g.length?h(b,e,f&&a(f)):b[0]):b}}]),b.module("a8m.flatten",[]).filter("flatten",function(){return function(a,b){return b=b||!1,a=D(a)?d(a):a,E(a)?b?[].concat.apply([],a):function u(a,b){return(b=b||0)>=a.length?a:E(a[b])?u(a.slice(0,b).concat(a[b],a.slice(b+1)),b):u(a,b+1)}(a,0):a}}),b.module("a8m.fuzzy-by",[]).filter("fuzzyBy",["$parse",function(a){return function(b,c,e,f){var h,i,j=f||!1;return b=D(b)?d(b):b,!E(b)||z(c)||z(e)?b:(i=a(c),b.filter(function(a){return h=i(a),!!B(h)&&(h=j?h:h.toLowerCase(),e=j?e:e.toLowerCase(),!1!==g(h,e))}))}}]),b.module("a8m.fuzzy",[]).filter("fuzzy",function(){return function(a,b,c){var f=c||!1;return a=D(a)?d(a):a,!E(a)||z(b)?a:(b=f?b:b.toLowerCase(),a.filter(function(a){return B(a)?!1!==g(a=f?a:a.toLowerCase(),b):!!D(a)&&((a,b)=>{var c,d;return 0<Object.keys(a).filter(function(e){return c=a[e],!!d||!!B(c)&&(c=f?c:c.toLowerCase(),d=!1!==g(c,b))}).length})(a,b)}))}}),b.module("a8m.group-by",["a8m.filter-watcher"]).filter("groupBy",["$parse","filterWatcher",function(a,b){return function(c,d){return!D(c)||z(d)?c:b.isMemoized("groupBy",arguments)||b.memoize("groupBy",arguments,this,((a,b)=>{var c,d={};
1return F(a,function(a){c=b(a),d[c]||(d[c]=[]),d[c].push(a)}),d})(c,a(d)))}}]),b.module("a8m.is-empty",[]).filter("isEmpty",function(){return function(a){return D(a)?!d(a).length:!a.length}}),b.module("a8m.join",[]).filter("join",function(){return function(a,b){return z(a)||!E(a)?a:(z(b)&&(b=" "),a.join(b))}}),b.module("a8m.last",[]).filter("last",["$parse",function(a){return function(b){var e,f,g,b=H(b),b=D(b)?d(b):b;return E(b)?(g=Array.prototype.slice.call(arguments,1),e=C(g[0])?g[0]:1,f=C(g[0])?C(g[1])?c:g[1]:g[0],g.length?h(b.reverse(),e,f&&a(f)).reverse():b[b.length-1]):b}}]),b.module("a8m.map",[]).filter("map",["$parse",function(a){return function(b,c){return b=D(b)?d(b):b,!E(b)||z(c)?b:b.map(function(b){return a(c)(b)})}}]),b.module("a8m.omit",[]).filter("omit",["$parse",function(a){return function(b,c){return b=D(b)?d(b):b,!E(b)||z(c)?b:b.filter(function(b){return!a(c)(b)})}}]),b.module("a8m.pick",[]).filter("pick",["$parse",function(a){return function(b,c){return b=D(b)?d(b):b,!E(b)||z(c)?b:b.filter(function(b){return a(c)(b)})}}]),b.module("a8m.range",[]).filter("range",function(){return function(a,b,c,d,e){c=c||0,d=d||1;for(var f=0;f<parseInt(b);f++){var g=c+f*d;a.push(A(e)?e(g):g)}return a}}),b.module("a8m.remove-with",[]).filter("removeWith",function(){return function(a,b){return z(b)?a:(a=D(a)?d(a):a).filter(function(a){return!f(b,a)})}}),b.module("a8m.remove",[]).filter("remove",function(){return function(a){a=D(a)?d(a):a;var b=Array.prototype.slice.call(arguments,1);return E(a)?a.filter(function(a){return!b.some(function(b){return I(b,a)})}):a}}),b.module("a8m.reverse",[]).filter("reverse",[function(){return function(a){return a=D(a)?d(a):a,B(a)?a.split("").reverse().join(""):E(a)?a.slice().reverse():a}}]),b.module("a8m.search-field",[]).filter("searchField",["$parse",function(a){return function(b){b=D(b)?d(b):b;var e,f=Array.prototype.slice.call(arguments,1);return E(b)&&f.length?b.map(function(b){return e=f.map(function(d){return a(d)(b)}).join(" "),G(b,{searchField:e})}):b}}]),b.module("a8m.to-array",[]).filter("toArray",function(){return function(a,b){return D(a)?b?Object.keys(a).map(function(b){return G(a[b],{$key:b})}):d(a):a}}),b.module("a8m.unique",[]).filter({unique:["$parse",v],uniq:["$parse",v]}),b.module("a8m.where",[]).filter("where",function(){return function(a,b){return z(b)?a:(a=D(a)?d(a):a).filter(function(a){return f(b,a)})}}),b.module("a8m.xor",[]).filter("xor",["$parse",function(a){return function(b,c,e){function f(b,c){var d=a(e);return c.some(function(a){return e?I(d(a),d(b)):I(a,b)})}return e=e||!1,b=D(b)?d(b):b,c=D(c)?d(c):c,E(b)&&E(c)?b.concat(c).filter(function(a){return!(f(a,b)&&f(a,c))}):b}}]),b.module("a8m.math.abs",[]).filter("abs",function(){return function(a){return Math.abs(a)}}),b.module("a8m.math.byteFmt",[]).filter("byteFmt",function(){var a=[{str:"B",val:1024}];return["KB","MB","GB","TB","PB","EB","ZB","YB"].forEach(function(b,c){a.push({str:b,val:1024*a[c].val})}),function(b,c){if(C(c)&&isFinite(c)&&c%1==0&&0<=c&&C(b)&&isFinite(b)){for(var d=0;d<a.length-1&&b>=a[d].val;)d++;return i(b/=0<d?a[d-1].val:1,c)+" "+a[d].str}return"NaN"}}),b.module("a8m.math.degrees",[]).filter("degrees",function(){return function(a,b){return C(b)&&isFinite(b)&&b%1==0&&0<=b&&C(a)&&isFinite(a)?(a=180*a/Math.PI,Math.round(a*Math.pow(10,b))/Math.pow(10,b)):"NaN"}}),b.module("a8m.math.kbFmt",[]).filter("kbFmt",function(){var a=[{str:"KB",val:1024}];return["MB","GB","TB","PB","EB","ZB","YB"].forEach(function(b,c){a.push({str:b,val:1024*a[c].val})}),function(b,c){if(C(c)&&isFinite(c)&&c%1==0&&0<=c&&C(b)&&isFinite(b)){for(var d=0;d<a.length-1&&b>=a[d].val;)d++;return i(b/=0<d?a[d-1].val:1,c)+" "+a[d].str}return"NaN"}}),b.module("a8m.math.max",[]).filter("max",["$parse",function(a){function b(b,c){b=b.map(function(b){return a(c)(b)});return b.indexOf(Math.max.apply(Math,b))}return function(a,c){return E(a)?z(c)?Math.max.apply(Math,a):a[b(a,c)]:a}}]),b.module("a8m.math.min",[]).filter("min",["$parse",function(a){function b(b,c){b=b.map(function(b){return a(c)(b)});return b.indexOf(Math.min.apply(Math,b))}return function(a,c){return E(a)?z(c)?Math.min.apply(Math,a):a[b(a,c)]:a}}]),b.module("a8m.math.percent",[]).filter("percent",function(){return function(a,b,c){var d=B(a)?Number(a):a;return b=b||100,c=c||!1,!C(d)||isNaN(d)?a:c?Math.round(d/b*100):d/b*100}}),b.module("a8m.math.radians",[]).filter("radians",function(){return function(a,b){return C(b)&&isFinite(b)&&b%1==0&&0<=b&&C(a)&&isFinite(a)?Math.round(3.14159265359*a/180*Math.pow(10,b))/Math.pow(10,b):"NaN"}}),b.module("a8m.math.radix",[]).filter("radix",function(){return function(a,b){return C(a)&&/^[2-9]$|^[1-2]\d$|^3[0-6]$/.test(b)?a.toString(b).toUpperCase():a}}),b.module("a8m.math.shortFmt",[]).filter("shortFmt",function(){return function(a,b){return C(b)&&isFinite(b)&&b%1==0&&0<=b&&C(a)&&isFinite(a)?a<1e3?""+a:a<1e6?i(a/1e3,b)+" K":a<1e9?i(a/1e6,b)+" M":i(a/1e9,b)+" B":"NaN"}}),b.module("a8m.math.sum",[]).filter("sum",function(){return function(a,b){return E(a)?a.reduce(function(a,b){return a+b},b||0):a}}),b.module("a8m.ends-with",[]).filter("endsWith",function(){return function(a,b,c){var d,c=c||!1;return!B(a)||z(b)?a:(d=(a=c?a:a.toLowerCase()).length-b.length,-1!==a.indexOf(c?b:b.toLowerCase(),d))}}),b.module("a8m.latinize",[]).filter("latinize",[function(){for(var b=[{base:"A",letters:"Aâ¶ï¼¡ÃÃÃẦẤẪẨÃÄÄáº°áº®áº´áº²È¦Ç ÃÇẢÃ
ǺÇÈÈẠẬẶá¸ÄȺⱯ"},{base:"AA",letters:"ê²"},{base:"AE",letters:"ÃǼǢ"},{base:"AO",letters:"ê´"},{base:"AU",letters:"ê¶"},{base:"AV",letters:"ê¸êº"},{base:"AY",letters:"ê¼"},{base:"B",letters:"Bâ·ï¼¢á¸á¸á¸ÉÆÆ"},{base:"C",letters:"Câ¸ï¼£ÄÄÄÄÃá¸ÆÈ»ê¾"},{base:"D",letters:"Dâ¹ï¼¤á¸Äá¸á¸á¸á¸ÄÆÆÆê¹"},{base:"DZ",letters:"DZÇ"},{base:"Dz",letters:"DzÇ
"},{base:"E",letters:"Eâºï¼¥ÃÃÃá»áº¾á»á»áº¼Äá¸á¸ÄÄÃẺÄÈÈẸá»È¨á¸Äá¸á¸ÆÆ"},{base:"F",letters:"Fâ»ï¼¦á¸Æê»"},{base:"G",letters:"Gâ¼ï¼§Ç´ÄḠÄÄ Ç¦Ä¢Ç¤Æê ê½ê¾"},{base:"H",letters:"Hâ½ï¼¨Ä¤á¸¢á¸¦ÈḤḨḪĦⱧⱵê"},{base:"I",letters:"Iâ¾ï¼©ÃÃÃĨĪĬİÃḮá»ÇÈÈá»Ä®á¸¬Æ"},{base:"J",letters:"Jâ¿ï¼ªÄ´É"},{base:"K",letters:"KâKḰǨḲĶḴÆâ±©êêêê¢"},{base:"L",letters:"LâLĿĹĽḶḸĻḼḺÅȽⱢⱠêêê"},{base:"LJ",letters:"Ç"},{base:"Lj",letters:"Ç"},{base:"M",letters:"Mâï¼á¸¾á¹á¹â±®Æ"},{base:"N",letters:"NâNǸÅÃá¹Åá¹Å
á¹á¹È Æêê¤"},{base:"NJ",letters:"Ç"},{base:"Nj",letters:"Ç"},{base:"O",letters:"OâOÃÃÃá»á»á»á»Ãá¹È¬á¹Åá¹á¹ÅȮȰÃȪá»ÅÇÈÈÆ á»á»á» á»á»¢á»á»ÇªÇ¬ÃÇ¾ÆÆêê"},{base:"OI",letters:"Æ¢"},{base:"OO",letters:"ê"},{base:"OU",letters:"È¢"},{base:"OE",letters:"ÂÅ"},{base:"oe",letters:"ÂÅ"},{base:"P",letters:"Pâ
ï¼°á¹á¹Æ¤â±£êêê"},{base:"Q",letters:"Qâï¼±êêÉ"}
1,{base:"R",letters:"Râï¼²Åá¹ÅÈÈá¹á¹Åá¹ÉⱤêê¦ê"},{base:"S",letters:"Sâï¼³áºÅṤÅṠŠṦṢṨÈÅâ±¾ê¨ê"},{base:"T",letters:"TâTṪŤṬÈŢṰṮŦƬƮȾê"},{base:"TZ",letters:"ê¨"},{base:"U",letters:"Uâï¼µÃÃÃŨṸŪṺŬÃÇÇÇÇỦŮŰÇÈÈÆ¯á»ªá»¨á»®á»¬á»°á»¤á¹²Å²á¹¶á¹´É"},{base:"V",letters:"VâVṼṾƲêÉ
"},{base:"VY",letters:"ê "},{base:"W",letters:"Wâï¼·áºáºÅ´áºáºáºâ±²"},{base:"X",letters:"XâXáºáº"},{base:"Y",letters:"YâYỲÃŶỸȲáºÅ¸á»¶á»´Æ³ÉỾ"},{base:"Z",letters:"ZâZŹáºÅ»Å½áºáºÆµÈ¤â±¿â±«ê¢"},{base:"a",letters:"aâï½áºÃ áâầấẫẩãÄÄằắẵẳȧǡäÇảåǻÇÈÈạáºáº·á¸Ä
â±¥É"},{base:"aa",letters:"ê³"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"êµ"},{base:"au",letters:"ê·"},{base:"av",letters:"ê¹ê»"},{base:"ay",letters:"ê½"},{base:"b",letters:"bâï½á¸á¸
á¸ÆÆÉ"},{base:"c",letters:"câï½ÄÄÄÄÃ§á¸ÆÈ¼ê¿â"},{base:"d",letters:"dâï½á¸Äá¸á¸á¸á¸ÄÆÉÉêº"},{base:"dz",letters:"dzÇ"},{base:"e",letters:"eâï½
èéêá»áº¿á»
á»áº½Äá¸á¸ÄÄëẻÄÈ
Èẹá»È©á¸Äá¸á¸ÉÉÇ"},{base:"f",letters:"fâï½á¸Æê¼"},{base:"g",letters:"gâï½ÇµÄḡÄÄ¡Ç§Ä£Ç¥É ê¡áµ¹ê¿"},{base:"h",letters:"hâï½Ä¥á¸£á¸§ÈḥḩḫáºÄ§â±¨â±¶É¥"},{base:"hv",letters:"Æ"},{base:"i",letters:"iâï½Ã¬ÃîĩīÄïḯá»ÇÈÈá»Ä¯á¸É¨Ä±"},{base:"j",letters:"jâï½ÄµÇ°É"},{base:"k",letters:"kâï½á¸±Ç©á¸³Ä·á¸µÆâ±ªêêê
ê£"},{base:"l",letters:"lâï½ÅÄºÄ¾á¸·á¸¹Ä¼á¸½á¸»Å¿ÅÆÉ«â±¡êêê"},{base:"lj",letters:"Ç"},{base:"m",letters:"mâï½á¸¿á¹á¹É±É¯"},{base:"n",letters:"nâï½Ç¹Åñá¹
Åá¹Åá¹á¹ÆÉ²Åêê¥"},{base:"nj",letters:"Ç"},{base:"o",letters:"oâï½Ã²Ã³Ã´á»á»á»á»Ãµá¹Èá¹Åá¹á¹Åȯȱöȫá»ÅÇÈÈÆ¡á»á»á»¡á»á»£á»á»Ç«ÇøǿÉêêɵ"},{base:"oi",letters:"Æ£"},{base:"ou",letters:"È£"},{base:"oo",letters:"ê"},{base:"p",letters:"pâï½á¹á¹Æ¥áµ½êêê"},{base:"q",letters:"qâ ï½Éêê"},{base:"r",letters:"râ¡ï½Åá¹ÅÈÈá¹á¹Åá¹Éɽêê§ê"},{base:"s",letters:"sâ¢ï½ÃÅá¹¥ÅṡšṧṣṩÈÅÈ¿ê©ê
áº"},{base:"t",letters:"tâ£ï½á¹«áºÅ¥á¹ÈţṱṯŧÆÊⱦê"},{base:"tz",letters:"ê©"},{base:"u",letters:"uâ¤ï½Ã¹ÃºÃ»Å©á¹¹Å«á¹»ÅüÇÇÇÇủůűÇÈÈÆ°á»«á»©á»¯á»á»±á»¥á¹³Å³á¹·á¹µÊ"},{base:"v",letters:"vâ¥ï½á¹½á¹¿ÊêÊ"},{base:"vy",letters:"ê¡"},{base:"w",letters:"wâ¦ï½áºáºÅµáºáº
áºáºâ±³"},{base:"x",letters:"xâ§ï½áºáº"},{base:"y",letters:"yâ¨ï½á»³Ã½Å·á»¹È³áºÃ¿á»·áºá»µÆ´Éỿ"},{base:"z",letters:"zâ©ï½ÅºáºÅ¼Å¾áºáºÆ¶È¥Éⱬê£"}],c={},d=0;d<b.length;d++)for(var e=b[d].letters.split(""),f=0;f<e.length;f++)c[e[f]]=b[d].base;return function(b){return B(b)?(a=>
1a.replace(/[^\u0000-\u007E]/g,function(a){return c[a]||a}))(b):b}}]),b.module("a8m.ltrim",[]).filter("ltrim",function(){return function(a,b){b=b||"\\s";return B(a)?a.replace(new RegExp("^"+b+"+"),""):a}}),b.module("a8m.match",[]).filter("match",function(){return function(a,b,c){b=new RegExp(b,c);return B(a)?a.match(b):null}}),b.module("a8m.phoneUS",[]).filter("phoneUS",function(){return function(a){return"("+(a+="").slice(0,3)+") "+a.slice(3,6)+"-"+a.slice(6)}}),b.module("a8m.repeat",[]).filter("repeat",[function(){return function(a,b,c){var d=~~b;return B(a)&&d?function w(a,b,c){return b?a+c+w(a,--b,c):a}(a,--b,c||""):a}}]),b.module("a8m.rtrim",[]).filter("rtrim",function(){return function(a,b){b=b||"\\s";return B(a)?a.replace(new RegExp(b+"+$"),""):a}}),b.module("a8m.slugify",[]).filter("slugify",[function(){return function(a,b){b=z(b)?"-":b;return B(a)?a.toLowerCase().replace(/\s+/g,b):a}}]),b.module("a8m.split",[]).filter("split",function(){return function(b,c,d){var f;return z(b)||!B(b)?null:(z(c)&&(c=""),isNaN(d)&&(d=0),f=new RegExp(c.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),"g"),e(f=b.match(f))||d>=f.length?[b]:0===d?b.split(c):(b=(f=b.split(c)).splice(0,d+1),f.unshift(b.join(c)),f))}}),b.module("a8m.starts-with",[]).filter("startsWith",function(){return function(a,b,c){c=c||!1;return!B(a)||z(b)?a:!(a=c?a:a.toLowerCase()).indexOf(c?b:b.toLowerCase())}}),b.module("a8m.stringular",[]).filter("stringular",function(){return function(a){var b=Array.prototype.slice.call(arguments,1);return a.replace(/{(\d+)}/g,function(a,c){return z(b[c])?a:b[c]})}}),b.module("a8m.strip-tags",[]).filter("stripTags",function(){return function(a){return B(a)?a.replace(/<\S[^><]*>/g,""):a}}),b.module("a8m.test",[]).filter("test",function(){return function(a,b,c){b=new RegExp(b,c);return B(a)?b.test(a):a}}),b.module("a8m.trim",[]).filter("trim",function(){return function(a,b){b=b||"\\s";return B(a)?a.replace(new RegExp("^"+b+"+|"+b+"+$","g"),""):a}}),b.module("a8m.truncate",[]).filter("truncate",function(){return function(a,b,c,d){return b=z(b)?a.length:b,d=d||!1,c=c||"",!B(a)||a.length<=b?a:a.substring(0,d?-1===a.indexOf(" ",b)?a.length:a.indexOf(" ",b):b)+c}}),b.module("a8m.ucfirst",[]).filter({ucfirst:x,titleize:x}),b.module("a8m.uri-component-encode",[]).filter("uriComponentEncode",["$window",function(a){return function(b){return B(b)?a.encodeURIComponent(b):b}}]),b.module("a8m.uri-encode",[]).filter("uriEncode",["$window",function(a){return function(b){return B(b)?a.encodeURI(b):b}}]),b.module("a8m.wrap",[]).filter("wrap",function(){return function(a,b,c){return B(a)&&y(b)?[b,a,c||b].join(""):a}}),b.module("a8m.filter-watcher",[]).provider("filterWatcher",function(){this.$get=["$window","$rootScope",function(a,b){function c(b,c){return[b,JSON.stringify(c,(()=>{var b=[];return function(c,d){if(D(d)&&!e(d)){if(~b.indexOf(d))return"[Circular]";b.push(d)}return a==d?"$WINDOW":a.document==d?"$DOCUMENT":k(d)?"$SCOPE":d}})())].join("#").replace(/"/g,"")}function d(a){a=a.targetScope.$id;F(l[a],function(a){delete j[a]}),delete l[a]}function f(){m(function(){b.$$phase||(j={})},2e3)}function g(a,b){var c=a.$id;z(l[c])&&(a.$on("$destroy",d),l[c]=[]),l[c].push(b)}var j={},l={},m=a.setTimeout;return{isMemoized:function(a,b){return a=c(a,b),j[a]},memoize:function(a,b,d,e){return a=c(a,b),j[a]=e,k(d)?g(d,a):f(),e}}}]}),b.module("angular.filter",["a8m.ucfirst","a8m.uri-encode","a8m.uri-component-encode","a8m.slugify","a8m.latinize","a8m.strip-tags","a8m.stringular","a8m.truncate","a8m.starts-with","a8m.ends-with","a8m.wrap","a8m.trim","a8m.ltrim","a8m.rtrim","a8m.repeat","a8m.test","a8m.match","a8m.split","a8m.phoneUS","a8m.to-array","a8m.concat","a8m.contains","a8m.unique","a8m.is-empty","a8m.after","a8m.after-where","a8m.before","a8m.before-where","a8m.defaults","a8m.where","a8m.reverse","a8m.remove","a8m.remove-with","a8m.group-by","a8m.count-by","a8m.chunk-by","a8m.search-field","a8m.fuzzy-by","a8m.fuzzy","a8m.omit","a8m.pick","a8m.every","a8m.filter-by","a8m.xor","a8m.map","a8m.first","a8m.last","a8m.flatten","a8m.join","a8m.range","a8m.math.max","a8m.math.min","a8m.math.abs","a8m.math.percent","a8m.math.radix","a8m.math.sum","a8m.math.degrees","a8m.math.radians","a8m.math.byteFmt","a8m.math.kbFmt","a8m.math.shortFmt","a8m.angular","a8m.conditions","a8m.is-null","a8m.filter-watcher"])})((window,window.angular)),((a,b)=>{"function"==typeof define&&define.amd?define([],b):"object"==typeof exports?module.exports=b():a.X2JS=b()})(this,function(){return function(z){void 0===(z=z||{}).escapeMode&&(z.escapeMode=!0),z.attributePrefix=z.attributePrefix||"_",z.arrayAccessForm=z.arrayAccessForm||"none",z.emptyNodeForm=z.emptyNodeForm||"text",void 0===z.enableToStringFunc&&(z.enableToStringFunc=!0),z.arrayAccessFormPaths=z.arrayAccessFormPaths||[],void 0===z.skipEmptyTextNodesForObj&&(z.skipEmptyTextNodesForObj=!0),void 0===z.stripWhitespace
1s&&(z.stripWhitespaces=!0),z.datetimeAccessFormPaths=z.datetimeAccessFormPaths||[],void 0===z.useDoubleQuotes&&(z.useDoubleQuotes=!1),z.xmlElementsFilter=z.xmlElementsFilter||[],z.jsonPropertiesFilter=z.jsonPropertiesFilter||[],void 0===z.keepCData&&(z.keepCData=!1);var h={ELEMENT_NODE:1,TEXT_NODE:3,CDATA_SECTION_NODE:4,COMMENT_NODE:8,DOCUMENT_NODE:9};function x(B){var C=B.localName;return C=null!=(C=null==C?B.baseName:C)&&""!=C?C:B.nodeName}function s(B){return"string"==typeof B?B.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'"):B}function w(C,F,D,E){for(var B=0;B<C.length;B++){var G=C[B];if("string"==typeof G){if(G==E)break}else if(G instanceof RegExp){if(G.test(E))break}else if("function"==typeof G&&G(F,D,E))break}return B!=C.length}function n(D,B,C){"property"===z.arrayAccessForm&&(D[B]instanceof Array?D[B+"_asArray"]=D[B]:D[B+"_asArray"]=[D[B]]),!(D[B]instanceof Array)&&0<z.arrayAccessFormPaths.length&&w(z.arrayAccessFormPaths,D,B,C)&&(D[B]=[D[B]])}function a(G){var E=G.split(/[-T:+Z]/g),F=new Date(E[0],E[1]-1,E[2]),D=E[5].split(".");return F.setHours(E[3],E[4],D[0]),1<D.length&&F.setMilliseconds(D[1]),E[6]&&E[7]?(D=60*E[6]+Number(E[7]),D=0+("-"==(/\d\d-\d\d:\d\d$/.test(G)?"-":"+")?-1*D:D),F.setMinutes(F.getMinutes()-D-F.getTimezoneOffset())):-1!==G.indexOf("Z",G.length-1)&&(F=new Date(Date.UTC(F.getFullYear(),F.getMonth(),F.getDate(),F.getHours(),F.getMinutes(),F.getSeconds(),F.getMilliseconds()))),F}function A(D,J){if(D.nodeType==h.DOCUMENT_NODE){for(var K=new Object,B=D.childNodes,L=0;L<B.length;L++)(C=B.item(L)).nodeType==h.ELEMENT_NODE&&(K[I=x(C)]=A(C,I));return K}if(D.nodeType==h.ELEMENT_NODE){for(B=((K=new Object).__cnt=0,D.childNodes),L=0;L<B.length;L++){var C,H,I=x(C=B.item(L));C.nodeType!=h.COMMENT_NODE&&((E,C,B,D)=>!(C==h.ELEMENT_NODE&&0<z.xmlElementsFilter.length)||w(z.xmlElementsFilter,E,B,D))(K,C.nodeType,I,H=J+"."+I)&&(K.__cnt++,null==K[I]?(K[I]=A(C,H),n(K,I,H)):(null==K[I]||K[I]instanceof Array||(K[I]=[K[I]],n(K,I,H)),K[I][K[I].length]=A(C,H)))}for(var E=0;E<D.attributes.length;E++){var F=D.attributes.item(E);K.__cnt++,K[z.attributePrefix+F.name]=F.value}var G=D.prefix;return null!=G&&""!=G&&(K.__cnt++,K.__prefix=G),null!=K["#text"]&&(K.__text=K["#text"],K.__text instanceof Array&&(K.__text=K.__text.join("\n")),z.stripWhitespaces&&(K.__text=K.__text.trim()),delete K["#text"],"property"==z.arrayAccessForm&&delete K["#text_asArray"],K.__text=((D,B,C)=>0<z.datetimeAccessFormPaths.length&&(C=C.split(".#")[0],w(z.datetimeAccessFormPaths,D,B,C))?a(D):D)(K.__text,I,J+"."+I)),null!=K["#cdata-section"]&&(K.__cdata=K["#cdata-section"],delete K["#cdata-section"],"property"==z.arrayAccessForm)&&delete K["#cdata-section_asArray"],0==K.__cnt&&"text"==z.emptyNodeForm?K="":1==K.__cnt&&null!=K.__text?K=K.__text:1!=K.__cnt||null==K.__cdata||z.keepCData?1<K.__cnt&&null!=K.__text&&z.skipEmptyTextNodesForObj&&(z.stripWhitespaces&&""==K.__text||""==K.__text.trim())&&delete K.__text:K=K.__cdata,delete K.__cnt,!z.enableToStringFunc||null==K.__text&&null==K.__cdata||(K.toString=function(){return(null!=this.__text?this.__text:"")+(null!=this.__cdata?this.__cdata:"")}),K}if(D.nodeType==h.TEXT_NODE||D.nodeType==h.CDATA_SECTION_NODE)return D.nodeValue}function o(I,F,H,C){var E="<"+(null!=I&&null!=I.__prefix?I.__prefix+":":"")+F;if(null!=H)for(var G=0;G<H.length;G++){var D=H[G],B=I[D];z.escapeMode&&(B=s(B)),E+=" "+D.substr(z.attributePrefix.length)+"=",z.useDoubleQuotes?E+='"'+B+'"':E+="'"+B+"'"}return E+=C?"/>":">"}function j(C,B){return"</"+(null!=C.__prefix?C.__prefix+":":"")+B+">"}function y(C,B){return!!("property"==z.arrayAccessForm&&((C,B)=>-1!==C.indexOf(B,C.length-B.length))(B.toString(),"_asArray")||0==B.toString().indexOf(z.attributePrefix)||0==B.toString().indexOf("__")||C[B]instanceof Function)}function m(D){var C=0;if(D instanceof Object)for(var B in D)y(D,B)||C++;return C}function c(D){var C=[];if(D instanceof Object)for(var B in D)-1==B.toString().indexOf("__")&&0==B.toString().indexOf(z.attributePrefix)&&C.push(B);return C}function d(C){var B="";return C instanceof Object?B+=(C=>{var B="";return null!=C.__cdata&&(B+="<![CDATA["+C.__cdata+"]]>"),null!=C.__text&&(z.escapeMode?B+=s(C.__text):B+=C.__text),B})(C):null!=C&&(z.escapeMode?B+=s(C):B+=C),B}function p(C,B){return""===C?B:C+"."+B}function e(I,H){var D,G,B="";if(0<m(I))for(var E in I)y(I,E)||""!=H&&!((D,B,C)=>0==z.jsonPropertiesFilter.length||""==C||w(z.jsonPropertiesFilter,D,B,C
1))(I,E,p(H,E))||(G=c(D=I[E]),null==D?B+=o(D,E,G,!0):D instanceof Object?D instanceof Array?B+=((D,G,F,E)=>{var B="";if(0==D.length)B+=o(D,G,F,!0);else for(var C=0;C<D.length;C++)B=(B=(B+=o(D[C],G,c(D[C]),!1))+e(D[C],p(E,G)))+j(D[C],G);return B})(D,E,G,H):D instanceof Date?B=(B=(B+=o(D,E,G,!1))+D.toISOString())+j(D,E):0<m(D)||null!=D.__text||null!=D.__cdata?B=(B=(B+=o(D,E,G,!1))+e(D,p(H,E)))+j(D,E):B+=o(D,E,G,!0):B=(B=(B+=o(D,E,G,!1))+d(D))+j(D,E));return B+=d(I)}this.parseXmlString=function(D){var E,F=window.ActiveXObject||"ActiveXObject"in window;if(void 0===D)return null;if(window.DOMParser){var G=new window.DOMParser,B=null;if(!F)try{B=G.parseFromString("INVALID","text/xml").getElementsByTagName("parsererror")[0].namespaceURI}catch(C){B=null}try{E=G.parseFromString(D,"text/xml"),null!=B&&0<E.getElementsByTagNameNS(B,"parsererror").length&&(E=null)}catch(C){E=null}}else 0==D.indexOf("<?")&&(D=D.substr(D.indexOf("?>")+2)),(E=new ActiveXObject("Microsoft.XMLDOM")).async="false",E.loadXML(D);return E},this.asArray=function(B){return void 0===B||null==B?[]:B instanceof Array?B:[B]},this.toXmlDateTime=function(B){return B instanceof Date?B.toISOString():"number"==typeof B?new Date(B).toISOString():null},this.asDateTime=function(B){return"string"==typeof B?a(B):B},this.xml2json=function(B){return A(B)},this.xml_str2json=function(B){B=this.parseXmlString(B);return null!=B?this.xml2json(B):null},this.json2xml_str=function(B){return e(B,"")},this.json2xml=function(C){C=this.json2xml_str(C);return this.parseXmlString(C)},this.getVersion=function(){return"1.2.0"}}}),!X2JS)throw new Error("You're required to include the X2JS library to use the xml module.");function initUI(){function setHeight(){var sliderH=$(window).height()-124;$(".right__slide").css("height",sliderH)}$("body").on("click",".main__left",function(e){$("html").click(function(){$(".main__left").removeClass("active")}),e.stopPropagation()}),$("body").on("click",".ticket__item",function(){}),$("body").on("click",".offcanvas__close",function(){UIkit.offcanvas.hide([force=!1])}),$(".uk-offcanvas").on("hide.uk.offcanvas",function(data){$(".uk-datepicker").hide();data=data.currentTarget.classList.value;-1!=data.indexOf("news")?"function"==typeof resetAnalysisSelection&&resetAnalysisSelection():-1!=data.indexOf("chat-container")&&"function"==typeof closeChat&&closeChat()}),$(".modal--search").on({"show.uk.modal":function(){$(this).find(".search__input").focus()}}),$(".main__left .scrollable").mCustomScrollbar({axis:"y",theme:"dark",documentTouchScroll:!0,mouseWheel:{scrollAmount:"500",preventDefault:!0}}),$(".main__right").mCustomScrollbar({axis:"y",theme:"dark",documentTouchScroll:!0,advanced:{autoScrollOnFocus:!1},mouseWheel:{scrollAmount:"300",preventDefault:!1}}),$(".notifications__content, .matches__content").mCustomScrollbar({axis:"y",theme:"light",documentTouchScroll:!0,mouseWheel:{scrollAmount:"160",preventDefault:!0}}),$(".chat__inner").mCustomScrollbar({axis:"y",theme:"dark",documentTouchScroll:!0,mouseWheel:{scrollAmount:"160",preventDefault:!0}}),$(".modal--league .modal__content").mCustomScrollbar({axis:"y",theme:"dark",documentTouchScroll:!0,mouseWheel:{scrollAmount:"160",preventDefault:!0}}),$(".right__banner").slick({arrows:!1,autoplay:!0,autoplaySpeed:3e3,dots:!0,useTransform:!0,speed:600,cssEase:"cubic-bezier(0.86, 0, 0.07, 1)"}),$(".search__dropdown .uk-dropdown .offer__table").mCustomScrollbar({axis:"y",theme:"dark",documentTouchScroll:!0,mouseWheel:{scrollAmount:"100"}}),setHeight(),$(window).on("resize",function(){setHeight()}),$(".islider1").ionRangeSlider({grid:!0,min:1,max:7,from:4,grid_snap:!0}),$(".islider2").ionRangeSlider({grid:!0,min:1,max:3,from:2,grid_snap:!0}),$(".filter-slider").ionRangeSlider({grid:!1,type:"double",min:0,max:200,from:10,to:120,grid_snap:!0}),$(".td--heading h3, .league--dropdown, .offer__tools--modals").click(function(e){e.stopPropagation()}),$("body").on("click",".offer__detail--open",function(){$(this).closest(".offer__row").removeClass("detail-is-open")}),$(".offer__entry .offer__content").animate({height:"toggle"},300),$(".offer__entry:first-of-type .offer__content").animate({height:"toggle"},300),$(".offer__entry:first-of-type .offer__handler").toggleClass("uk-active"),$("body").on("click",".offer__handler",function(){$(this).next(".offer__content").animate({height:"toggle"},300),$(this).toggleClass("uk-active")})}((ng,X2JS)=>{function responseIsXml(response){response=response.headers("content-type");return response&&-1<response.search(/\Wxml/i)}function xmlHttpInterceptorFactory($q,x2js){return{response:function(response){return response&&responseIsXml(response)?(response.data=x2js.xml_str2json(response.data),response):$q.when(response)},responseError:function(response){return response&&responseIsXml(response)&&(response.data=x2js.xml_str2json(response.data)),$q.reject(response)}}}ng&&ng.module("xml",[]).config(["$provide",function($provide){$provide.factory("xmlHttpInterceptor",["$q","x2js",xmlHttpInterceptorFactory])}]).provider("x2js",function(){this.config={},this.$get=["X2JS",function(X2JS){return new X2JS(this.config)}]}).value("X2JS",X2JS)})(angular,X2JS),angular.module("ngEmoticons",["ngSanitize"]).filter("emoticons",["$sce",function(a){var b=[{text:":)",class:"smiley",code:"e60a"},{text:":D",class:"happy",code:"e608"},{text:":d",class:"happy",code:"e608"},{text:":(",class:"sad",code:"e60e"},{text:":/",class:"wondering",code:"e620"},{text:":P",class:"tongue",code:"e60c"},{text:":p",class:"tongue",code:"e60c"},{text:"3:)",class:"evil",code:"e618"},{text:"(^)",class:"thumbsup2",code:"e607"},{text:";)",class:"wink",code:"e610"},{text:":o",class:"shocked",code:"e61a"},{text:"-_-",class:"neutral",code:"e61e"},{text:"(y)",class:"thumbs-up",code:"e606"},{text:":*",class:"heart",code:"e604"},{text:"<3",class:"heart",code:"e604"},{text:"<3",class:"heart",code:"e604"},{text:"</3",class:"heart-broken",code:"e605"},{text:"</3",class:"heart-broken",code:"e605"},{text:"^_^",class:"grin",code:"e612"},{text:"8-)",class:"cool",code:"e614"},{text:"8|",class:"cool",code:"e614"},{text:":S",class:"confused",code:"e61c"},{text:":s",class:"confused",code:"e61c"}],c=["bowtie","smile","laughing","blush","smiley","relaxed","smirk","heart_eyes","kissing_heart","kissing_closed_eyes","flushed","relieved","satisfied","grin","wink","stuck_out_tongue_winking_eye","stuck_out_tongue_closed_eyes","grinning","kissing","winky_face","kissing_smiling_eyes","stuck_out_tongue","sleeping","worried","frowning","anguished","open_mouth","grimacing","confused","hushed","expressionless","unamused","sweat_smile","sweat","wow","disappointed_relieved","weary","pensive","disappointed","confounded","fearful","cold_sweat","persevere","cry","sob","joy","astonished","scream","neckbeard","tired_face","angry","rage","triumph","sleepy","yum","mask","sunglasses","dizzy_face","imp","smiling_imp","neutral_face","no_mouth","innocent","alien","yellow_heart","blue_heart","purple_heart","heart","green_heart","broken_heart","heartbeat","heartpulse","two_hearts","revolving_hearts","cupid","sparkling_heart","sparkles","star","star2","dizzy","boom","collision","anger","exclamation","question","grey_exclamation","grey_question","zzz","dash","sweat_drops","notes","musical_note","fire","hankey","poop","shit","\\+1","thumbsup","-1","thumbsdown","ok_hand","punch","facepunch","fist","v","wave","hand","raised_hand","open_hands","point_up","point_down","point_left","point_right","raised_hands","pray","point_up_2","clap","muscle","metal","fu","walking","runner","running","couple","family","two_men_holding_hands","two_women_holding_hands","dancer","dancers","ok_woman","no_good","information_desk_person","raising_hand","bride_with_veil","person_with_pouting_face","person_frowning","bow","couplekiss","couple_with_heart","massage","haircut","nail_care","boy","girl","woman","man","baby","older_woman","older_man","person_with_blond_hair","man_with_gua_pi_mao","man_with_turban","construction_worker","cop","angel","princess","
1smiley_cat","smile_cat","heart_eyes_cat","kissing_cat","smirk_cat","scream_cat","crying_cat_face","joy_cat","pouting_cat","japanese_ogre","japanese_goblin","see_no_evil","hear_no_evil","speak_no_evil","guardsman","skull","feet","lips","kiss","droplet","ear","eyes","nose","tongue","love_letter","bust_in_silhouette","busts_in_silhouette","speech_balloon","thought_balloon","feelsgood","finnadie","goberserk","godmode","hurtrealbad","rage1","rage2","rage3","rage4","suspect","trollface","sunny","umbrella","cloud","snowflake","snowman","zap","cyclone","foggy","ocean","cat","dog","mouse","hamster","rabbit","wolf","frog","tiger","koala","bear","pig","pig_nose","cow","boar","monkey_face","monkey","horse","racehorse","camel","sheep","elephant","panda_face","snake","bird","baby_chick","hatched_chick","hatching_chick","chicken","penguin","turtle","bug","honeybee","ant","beetle","snail","octopus","tropical_fish","fish","whale","whale2","dolphin","cow2","ram","rat","water_buffalo","tiger2","rabbit2","dragon","goat","rooster","dog2","pig2","mouse2","ox","dragon_face","blowfish","crocodile","dromedary_camel","leopard","cat2","poodle","paw_prints","bouquet","cherry_blossom","tulip","four_leaf_clover","rose","sunflower","hibiscus","maple_leaf","leaves","fallen_leaf","herb","mushroom","cactus","palm_tree","evergreen_tree","deciduous_tree","chestnut","seedling","blossom","ear_of_rice","shell","globe_with_meridians","sun_with_face","full_moon_with_face","new_moon_with_face","new_moon","waxing_crescent_moon","first_quarter_moon","waxing_gibbous_moon","full_moon","waning_gibbous_moon","last_quarter_moon","waning_crescent_moon","last_quarter_moon_with_face","first_quarter_moon_with_face","moon","earth_africa","earth_americas","earth_asia","volcano","milky_way","partly_sunny","octocat","squirrel","bamboo","gift_heart","dolls","school_satchel","mortar_board","flags","fireworks","sparkler","wind_chime","rice_scene","jack_o_lantern","ghost","santa","christmas_tree","gift","bell","no_bell","tanabata_tree","tada","confetti_ball","balloon","crystal_ball","cd","dvd","floppy_disk","camera","video_camera","movie_camera","computer","tv","iphone","phone","telephone","telephone_receiver","pager","fax","minidisc","vhs","sound","speaker","mute","loudspeaker","mega","hourglass","hourglass_flowing_sand","alarm_clock","wat
1ch","radio","satellite","loop","mag","mag_right","unlock","lock","lock_with_ink_pen","closed_lock_with_key","key","bulb","flashlight","high_brightness","low_brightness","electric_plug","battery","calling","email","mailbox","postbox","bath","bathtub","shower","toilet","wrench","nut_and_bolt","hammer","seat","moneybag","yen","dollar","pound","euro","credit_card","money_with_wings","e-mail","inbox_tray","outbox_tray","envelope","incoming_envelope","postal_horn","mailbox_closed","mailbox_with_mail","mailbox_with_no_mail","door","smoking","bomb","gun","hocho","pill","syringe","page_facing_up","page_with_curl","bookmark_tabs","bar_chart","chart_with_upwards_trend","chart_with_downwards_trend","scroll","clipboard","calendar","date","card_index","file_folder","open_file_folder","scissors","pushpin","paperclip","black_nib","pencil2","straight_ruler","triangular_ruler","closed_book","green_book","blue_book","orange_book","notebook","notebook_with_decorative_cover","ledger","books","bookmark","name_badge","microscope","telescope","newspaper","football","basketball","soccer","baseball","tennis","8ball","rugby_football","bowling","golf","mountain_bicyclist","bicyclist","horse_racing","snowboarder","swimmer","surfer","ski","spades","hearts","clubs","diamonds","gem","ring","trophy","musical_score","musical_keyboard","violin","space_invader","video_game","black_joker","flower_playing_cards","game_die","dart","mahjong","clapper","memo","pencil","book","art","microphone","headphones","trumpet","saxophone","guitar","shoe","sandal","high_heel","lipstick","boot","shirt","tshirt","necktie","womans_clothes","dress","running_shirt_with_sash","jeans","kimono","bikini","ribbon","tophat","crown","womans_hat","mans_shoe","closed_umbrella","briefcase","handbag","pouch","purse","eyeglasses","fishing_pole_and_fish","coffee","tea","sake","baby_bottle","beer","beers","cocktail","tropical_drink","wine_glass","fork_and_knife","pizza","hamburger","fries","poultry_leg","meat_on_bone","spaghetti","curry","fried_shrimp","bento","sushi","fish_cake","rice_ball","rice_cracker","rice","ramen","stew","oden","dango","egg","bread","doughnut","custard","icecream","ice_cream","shaved_ice","birthday","cake","cookie","chocolate_bar","candy","lollipop","honey_pot","apple","green_apple","tangerine","lemon","cherries","grapes","watermelon","strawberry","peach","melon","banana","pear","pineapple","sweet_potato","eggplant","tomato","corn","house","house_with_garden","school","office","post_office","hospital","bank","convenience_store","love_hotel","hotel","wedding","church","department_store","european_post_office","city_sunrise","city_sunset","japanese_castle","european_castle","tent","factory","tokyo_tower","japan","mount_fuji","sunrise_over_mountains","sunrise","stars","themoreyouknow","tmyk","statue_of_liberty","bridge_at_night","carousel_horse","rainbow","ferris_wheel","fountain","roller_coaster","ship","speedboat","boat","sailboat","rowboat","anchor","rocket","airplane","helicopter","steam_locomotive","tram","mountain_railway","bike","aerial_tramway","suspension_railway","mountain_cableway","tractor","blue_car","oncoming_automobile","car","red_car","taxi","oncoming_taxi","articulated_lorry","bus","oncoming_bus","rotating_light","police_car","oncoming_police_car","fire_engine","ambulance","minibus","truck","train","station","train2","bullettrain_front","bullettrain_side","light_rail","monorail","railway_car","trolleybus","ticket","fuelpump","vertical_traffic_light","traffic_light","warning","construction","beginner","atm","slot_machine","busstop","barber","hotsprings","checkered_flag","crossed_flags","izakaya_lantern","moyai","circus_tent","performing_arts","round_pushpin","triangular_flag_on_post","jp","kr","cn","us","fr","es","it","ru","gb","uk","de","one","two","three","four","five","six","seven","eight","nine","keycap_ten","1234","zero","hash","symbols","arrow_backward","arrow_down","arrow_forward","arrow_left","capital_abcd","abcd","abc","arrow_lower_left","arrow_lower_right","arrow_right","arrow_up","arrow_upper_left","arrow_upper_right","arrow_double_down","arrow_double_up","arrow_down_small","arrow_heading_down","arrow_heading_up","leftwards_arrow_with_hook","arrow_right_hook","left_r
1ight_arrow","arrow_up_down","arrow_up_small","arrows_clockwise","arrows_counterclockwise","rewind","fast_forward","information_source","ok","twisted_rightwards_arrows","repeat","repeat_one","new","top","up","cool","free","ng","cinema","koko","signal_strength","u5272","u5408","u55b6","u6307","u6708","u6709","u6e80","u7121","u7533","u7a7a","u7981","sa","restroom","mens","womens","baby_symbol","no_smoking","parking","wheelchair","metro","baggage_claim","accept","wc","potable_water","put_litter_in_its_place","secret","congratulations","m","passport_control","left_luggage","customs","ideograph_advantage","cl","sos","id","no_entry_sign","underage","no_mobile_phones","do_not_litter","non-potable_water","no_bicycles","no_pedestrians","children_crossing","no_entry","eight_spoked_asterisk","eight_pointed_black_star","heart_decoration","vs","vibration_mode","mobile_phone_off","chart","currency_exchange","aries","taurus","gemini","cancer","leo","virgo","libra","scorpius","sagittarius","capricorn","aquarius","pisces","ophiuchus","six_pointed_star","negative_squared_cross_mark","a","b","ab","o2","diamond_shape_with_a_dot_inside","recycle","end","on","soon","clock1","clock130","clock10","clock1030","clock11","clock1130","clock12","clock1230","clock2","clock230","clock3","clock330","clock4","clock430","clock5","clock530","clock6","clock630","clock7","clock730","clock8","clock830","clock9","clock930","heavy_dollar_sign","copyright","registered","tm","x","heavy_exclamation_mark","bangbang","interrobang","o","heavy_multiplication_x","heavy_plus_sign","heavy_minus_sign","heavy_division_sign","white_flower","100","heavy_check_mark","ballot_box_with_check","radio_button","link","curly_loop","wavy_dash","part_alternation_mark","trident","black_square","white_square","white_check_mark","black_square_button","white_square_button","black_circle","white_circle","red_circle","large_blue_circle","large_blue_diamond","large_orange_diamond","small_blue_diamond","small_orange_diamond","small_red_triangle","small_red_triangle_down","shipit"];return function(d,e){var j={link:!0,linkTarget:"_self"};return function f(a){angular.forEach(arguments,function(b){b!==a&&angular.forEach(b,function(b,c){a[c]&&a[c].constructor&&a[c].constructor===Object?f(a[c],b):a[c]=b})})}(j,e),null!=d?"object"==typeof d?d:(d=(a=>{var b=new RegExp(":("+c.join("|")+"):","g");return a.replace(b,function(a,b){return"<i class='emoticon emoticon-"+b+"' title=':"+b+":'></i>"})})(d=(a=>{var c=a.split(" ");return angular.forEach(b,function(a){for(var b=0;b<c.length;b++)c[b]===a.text&&(c[b]='<i class="icon-emoticon" title="'+a.text+'">&#x'+a.code+"</i>")}),c.join(" ")})(d)),j.link&&(d=(a=>a.replace(/((href|src)=["']|)(\b(https?|ftp|file):\/\/[-A-Z0-9+()&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/gi,function(a){return'<a href="'+a+'" target="'+j.linkTarget+'">'+a+"</a>"}))(d)),a.trustAsHtml(d)):void 0}}]).directive("ngEmoticons",["$filter","$sce","$http","$timeout","$templateCache",function(a,b,c,d,e){return e.put("",'<div ng-bind-html="neText" ne-hljs></div><div class="ne-video" ng-if="video.host" class="fade"> <div class="ne-video-preview" ng-hide="nePlayVideo || !(options.video.details)"> <div class="ne-video-thumb" ng-click="nePlayVideo=!nePlayVideo"> <img ng-src="{{video.thumbnail}}" alt=""/> <i class="fa fa-play-circle-o"></i> </div> <div class="ne-video-detail"> <div class="ne-video-title"> <a ng-href="{{video.url}}">{{video.title}}</a> </div> <div class="ne-video-desc"> {{video.description}} </div> <div class="ne-video-stats"> <span><i class="fa fa-eye"></i> {{video.views}}</span> <span><i class="fa fa-heart"></i> {{video.likes}}</span> </div> </div> </div> <div class="ne-video-player" ng-if="nePlayVideo || !(options.video.details)"> <iframe ng-src="{{video.embedSrc}}" frameBorder="0" width="{{video.width}}" height="{{video.height}}" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe> </div></div><div class="ne-video" ng-if="video.basic"> <div class="ne-video-player"> <div class="player"> <video ng-src="{{video.basic}}" controls></video> </div> </div></div>
1<div ng-init="neImageLong=false" ng-class="{false:\'ne-image\', true:\'ne-image ne-image-long\'}[neImageLong]" ng-if="image.url"> <div class="ne-image-wrapper"> <img ng-src="{{image.url}}" ng-click="neImageLong=!neImageLong" alt=""/> </div></div><div class="ne-pdf" ng-if="pdf.url"> <div class="ne-pdf-preview" ng-hide="neShowPdf"> <div class="ne-pdf-icon"> <i class="fa fa-file-pdf-o"></i> </div> <div class="ne-pdf-detail" > <div class="ne-pdf-title"> <a href="">{{pdf.url}}</a> </div> <div class="ne-pdf-view"> <button><i class="fa fa-download"></i> <a ng-href="{{pdf.url}}" target="_blank">Download</a></button> <button ng-click="neShowPdf=!neShowPdf"><i class="fa fa-eye"></i> View PDF</button> </div> </div> </div> <div class="ne-pdf-viewer" ng-if="neShowPdf" ng-show="neShowPdf"> <iframe ng-src="{{pdf.url}}" frameBorder="0"></iframe> </div></div><div class="ne-audio" ng-if="audio.url"> <audio ng-src="{{audio.url}}" controls></audio></div>'),{restrict:"AE",scope:!0,templateUrl:function(a,b){return b.emoticonsTemplateUrl||""},link:function(e,f,g){var i=e.$eval(g.emoticonsData),g=e.$eval(g.emoticonsOptions),k=(e.video={},e.image={},e.pdf={},{link:!0,linkTarget:"_self",pdf:{embed:!0},image:{embed:!(e.audio={})},audio:{embed:!0},code:{highlight:!0,lineNumbers:!1},basicVideo:!1,video:{embed:!1,width:null,height:null,ytTheme:"dark",details:!1,thumbnailQuality:"medium",ytAuthKey:null}}),g=(function h(a){angular.forEach(arguments,function(b){b!==a&&angular.forEach(b,function(b,c){a[c]&&a[c].constructor&&a[c].constructor===Object?h(a[c],b):a[c]=b})})}(k,g),String.prototype.trunc=function(a,b){var c=this.length>a,a=c?this.substr(0,a-1):this,a=b&&c?a.substr(0,a.lastIndexOf(" ")):a;return c?a+"...":a},{calcDimensions:function(a){var b={width:null,height:null};return b.width=a.video.width,b.height=a.video.height,a.video.height&&a.video.width||(a.video.height?b.width=a.video.height/390*640:a.video.width?b.height=b.width/640*390:(b.width=640,b.height=390)),b},embed:function(a,d){var g,i;
1return a.match(/https?:\/\/(?:[0-9A-Z-]+\.)?(?:youtu\.be\/|youtube\.com(?:\/embed\/|\/v\/|\/watch\?v=|\/ytscreeningroom\?v=|\/feeds\/api\/videos\/|\/user\S*[^\w\-\s]|\S*[^\w\-\s]))([\w\-]{11})[?=&+%\w-]*/gi)?(g=this.calcDimensions(d),e.video.id=RegExp.$1,d.video.details?c.get("https://www.googleapis.com/youtube/v3/videos?id="+RegExp.$1+"&key="+d.video.ytAuthKey+"&part=snippet,statistics").success(function(a){a=a.items[0];e.video.host="youtube",e.video.title=a.snippet.title,e.video.thumbnail=a.snippet.thumbnails.medium.url,e.video.description=a.snippet.description.trunc(250,!0).replace(/\n/g," ").replace(/ /g," "),e.video.rawDescription=a.snippet.description,e.video.views=a.statistics.viewCount,e.video.likes=a.statistics.likeCount,e.video.uploader=a.snippet.channelTitle,e.video.uploaderPage="https://www.youtube.com/channel/"+a.snippet.channelId,e.video.uploadDate=a.snippet.publishedAt,e.video.url=b.trustAsResourceUrl("https://www.youtube.com/watch?v="+a.id),e.video.embedSrc=b.trustAsResourceUrl("https://www.youtube.com/embed/"+e.video.id+"?autoplay=1"),e.video.width=g.width,e.video.height=g.height}):(e.video.width=g.width,e.video.height=g.height,e.video.host="youtube",e.video.embedSrc=b.trustAsResourceUrl("https://www.youtube.com/embed/"+RegExp.$1+"?autoplay=0"))):a.match(/https?:\/\/(?:www\.)?vimeo.com\/(?:channels\/(?:\w+\/)?|groups\/([^\/]*)\/videos\/|album\/(\d+)\/video\/|)(\d+)(?:$|\/|\?)*/gi)&&(i=this.calcDimensions(d),e.video.id=RegExp.$3,d.video.details?c.get("https://vimeo.com/api/v2/video/"+RegExp.$3+".json").success(function(a){e.video.host="vimeo",e.video.title=a[0].title,e.video.rawDescription=a[0].description.replace(/\n/g,"<br/>").replace(/ /g,"<br/>"),e.video.description=a[0].description.replace(/((<|<)br\s*\/*(>|>)\r\n)/g," ").trunc(250,!0),e.video.thumbnail=a[0].thumbnail_medium,e.video.views=a[0].stats_number_of_plays,e.video.likes=a[0].stats_number_of_likes,e.video.uploader=a[0].user_name,e.video.uploaderPage=a[0].user_url,e.video.uploadDate=a[0].uploadDate,e.video.url=a[0].url,e.video.embedSrc=b.trustAsResourceUrl("//player.vimeo.com/video/"+a[0].id+"?title=0&byline=0&portrait=0&autoplay=1"),e.video.width=i.width,e.video.height=i.height}):(e.video.width=i.width,e.video.height=i.height,e.video.host="vimeo",e.video.embedSrc=b.trustAsResourceUrl("//player.vimeo.com/video/"+RegExp.$3+"?title=0&byline=0&portrait=0&autoplay=0"))),a},embedBasic:function(a){return a.match(/((?:https?):\/\/\S*\.(?:ogv|webm|mp4))/gi)&&(e.video.basic=b.trustAsResourceUrl(RegExp.$1)),a}}),m_embed=function(a){return a.match(/((?:https?):\/\/\S*\.(?:wav|mp3|ogg))/gi)&&(e.audio.url=b.trustAsResourceUrl(RegExp.$1)),a},n_embed=function(a){return a.match(/((?:https?):\/\/\S*\.(?:gif|jpg|jpeg|tiff|png|svg|webp))/gi)&&(e.image.url=RegExp.$1),a},p_embed=function(a){return a.match(/((?:https?):\/\/\S*\.(?:pdf|PDF))/gi)&&(e.pdf.url=b.trustAsResourceUrl(RegExp.$1)),a};if(k.code.highlight){if(!window.hljs)throw"hlsj (Highlight JS is not defined.";i={encodeCode:function(a){return(a=(a=a.replace(/\&/gm,"&")).replace(/</gm,"<")).replace(/>/gm,">")},getCode:function(a){var b=this;return a.replace(/(`+)(\s|[a-z]+)\s*([\s\S]*?[^`])\s*\1(?!`)/gm,function(a,c,d,e){return e=(e=e.replace(/^([ \t]*)/g,"")).replace(/[ \t]*$/g,""),'<pre><code class="ne-code '+d+'">'+(e=(e=b.encodeCode(e)).replace(/:\/\//g,"~P"))+"</code></pre>"})}}.getCode(i),d(function(){hljs.initHighlighting(),k.code.lineNumbers&&angular.element(".ne-code").each(function(){var a=1,b=$(this).text().split("\n").length,c=$("<ul/>").addClass("pre-numbering");for(angular.element(this).addClass("has-numbering").parent().append(c);a<=b;a++)c.append(angular.element("<li/>").text(a))})},0)}i=a("emoticons")(i,k).$$unwrapTrustedValue();if(k.video.embed){if(!k.video.ytAuthKey)throw"Youtube authentication key is required to get data from youtube.";i=g.embed(i,k)}k.basicVideo&&(i=g.embedBasic(i)),k.audio.embed&&(i=m_embed(i)),k.image.embed&&(i=n_embed(i)),k.pdf.embed&&(i=p_embed(i)),e.neText=b.trustAsHtml(i)}}}]).directive("neHljs",["$timeout",function(a){return{restrict:"AE",link:function(b,c){a(function(){c.find(".ne-code").each(function(){hljs.highlightBlock(this)})},0)}}}]),((R,y)=>{function Ea(a,b,c){if(!a)throw Oa("areq",b||"?",c||"required")}function Fa(a,b){return a||b?a?b?(a=W(a)?a.join(" "):a)+" "+(b=W(b)?b.j
1oin(" "):b):a:b:""}function X(a,b,c){var d="";return a=W(a)?a:a&&F(a)&&a.length?a.split(/\s+/):[],s(a,function(a,e){a&&0<a.length&&(d=d+(0<e?" ":"")+(c?b+a:a+b))}),d}function Ga(a){if(a instanceof E)switch(a.length){case 0:return a;case 1:if(1===a[0].nodeType)return a;break;default:return E(ua(a))}if(1===a.nodeType)return E(a)}function ua(a){if(!a[0])return a;for(var b=0;b<a.length;b++){var c=a[b];if(1===c.nodeType)return c}}function Y(a){return function(b,c){c.addClass&&(((a,b,c)=>{s(b,function(b){a.addClass(b,c)})})(a,b,c.addClass),c.addClass=null),c.removeClass&&(((a,b,c)=>{s(b,function(b){a.removeClass(b,c)})})(a,b,c.removeClass),c.removeClass=null)}}function na(a){var b;return(a=a||{}).$$prepared||(b=a.domOperation||P,a.domOperation=function(){a.$$domOperationFired=!0,b(),b=P},a.$$prepared=!0),a}function ha(a,b){Ha(a,b),Ia(a,b)}function Ha(a,b){b.from&&(a.css(b.from),b.from=null)}function Ia(a,b){b.to&&(a.css(b.to),b.to=null)}function U(a,b,c){var d=b.options||{},f=(c=c.options||{},(d.addClass||"")+" "+(c.addClass||"")),e=(d.removeClass||"")+" "+(c.removeClass||"");return a=((a,b,c)=>{function d(a){F(a)&&(a=a.split(" "));var b={};return s(a,function(a){a.length&&(b[a]=!0)}),b}var f={},e=(a=d(a),b=d(b),s(b,function(a,b){f[b]=1}),c=d(c),s(c,function(a,b){f[b]=1===f[b]?null:-1}),{addClass:"",removeClass:""});return s(f,function(b,c){var d,f;1===b?(d="addClass",f=!a[c]||a[c+"-remove"]):-1===b&&(d="removeClass",f=a[c]||a[c+"-add"]),f&&(e[d].length&&(e[d]+=" "),e[d]+=c)}),e})(a.attr("class"),f,e),c.preparationClasses&&(d.preparationClasses=Z(c.preparationClasses,d.preparationClasses),delete c.preparationClasses),f=d.domOperation!==P?d.domOperation:null,va(d,c),f&&(d.domOperation=f),d.addClass=a.addClass||null,d.removeClass=a.removeClass||null,b.addClass=d.addClass,b.removeClass=d.removeClass,d}function Q(a){return a instanceof E?a[0]:a}function oa(a,b){b=b?"-"+b+"s":"";ka(a,[la,b])}function wa(a,b){var b=b?"paused":"",d=$+"PlayState";return ka(a,[d,b]),[d,b]}function ka(a,b){a.style[b[0]]=b[1]}function Z(a,b){return a?b?a+" "+b:a:b}function Ja(a,b,c){var d=Object.create(null),f=a.getComputedStyle(b)||{};return s(c,function(a,b){var G,a=f[a];a&&(("-"===(G=a.charAt(0))||"+"===G||0<=G)&&(a=(a=>{var b=0;return a=a.split(/\s*,\s*/),s(a,function(a){"s"===a.charAt(a.length-1)&&(a=a.substring(0,a.length-1)),a=parseFloat(a)||0,b=b?Math.max(a,b):a}),b})(a)),d[b]=a=0===a?null:a)}),d}function xa(a){return 0===a||null!=a}function Ka(a,b){var c=S,a=a+"s";return b?c+="Duration":a+=" linear all",[c,a]}function La(){var a=Object.create(null);return{flush:function(){a=Object.create(null)},count:function(b){return(b=a[b])?b.total:0},get:function(b){return(b=a[b])&&b.value},put:function(b,c){a[b]?a[b].total++:a[b]={total:1,value:c}}}}function Ma(a,b,c){s(c,function(c){a[c]=ya(a[c])?a[c]:b.style.getPropertyValue(c)})}var S,$,Ca,va,s,W,ya,da,Da,aa,F,N,E,P,za=void 0===R.ontransitionend&&void 0!==R.onwebkittransitionend?(S="WebkitTransition","webkitTransitionEnd transitionend"):(S="transition","transitionend"),Aa=void 0===R.onanimationend&&void 0!==R.onwebkitanimationend?($="WebkitAnimation","webkitAnimationEnd animationend"):($="animation","animationend"),pa=$+"Delay",Ba=$+"Duration",la=S+"Delay",Na=S+"Duration",Oa=y.$$minErr("ng"),Va={transitionDuration:Na,transitionDelay:la,transitionProperty:S+"Property",animationDuration:Ba,animationDelay:pa,animationIterationCount:$+"IterationCount"},Wa={transitionDuration:Na,transitionDelay:la,animationDuration:Ba,animationDelay:pa};y.module("ngAnimate",[],function(){P=y.noop,Ca=y.copy,va=y.extend,E=y.element,s=y.forEach,W=y.isArray,F=y.isString,aa=y.isObject,N=y.isUndefined,ya=y.isDefined,Da=y.isFunction,da=y.isElement}).info({angularVersion:"1.6.4"}).directive("ngAnimateSwap",["$animate","$rootScope",function(a,b){return{restrict:"A",transclude:"element",terminal:!0,priority:600,link:function(b,d,f,e,p){var K,G;b.$watchCollection(f.ngAnimateSwap||f.for,function(f){K&&a.leave(K),G&&(G.$destroy(),G=null),!f&&0!==f||(G=b.$new(),p(G,function(b){K=b,a.enter(b,null,d)}))})}}}]).directive("ngAnimateChildren",["$interpolate",function(a){return{link:function(b,c,d){function f(a){c.data("$$ngAnimateChildren","on"===a||"true"===a)}var e=d.ngAnimateChildren;F(e)&&0===e.length?c.data("$$ngAnimateChildren",!0):(f(a(e)(b)),d.$observe("ngAnimateChildren",f))}}}]).factory("$$rAFScheduler",["$$rAF",function(a){function b(a){d=d.concat(a),c()}function c(){if(d.length){for(var b=d.shift(),p=0;p<b.length;p++)b[p]();f||a(function(){f||c()})}}var f,d=b.queue=[];return b.waitUntilQuiet=function(b){f&&f(),f=a(function(){f=null,b(),c()})},b}]).provider("$$animateQueue",["$animateProvider",function(a){function c(a,c){var d;if(a&&c)return d=(a=>
1{if(!a)return null;a=a.split(" ");var b=Object.create(null);return s(a,function(a){b[a]=!0}),b})(c),a.split(" ").some(function(a){return d[a]})}function d(a,b,c){return e[a].some(function(a){return a(b,c)})}function f(a,b){var c=0<(a.addClass||"").length,a=0<(a.removeClass||"").length;return b?c&&a:c||a}var e=this.rules={skip:[],cancel:[],join:[]};e.join.push(function(a,b){return!a.structural&&f(a)}),e.skip.push(function(a,b){return!a.structural&&!f(a)}),e.skip.push(function(a,b){return"leave"===b.event&&a.structural}),e.skip.push(function(a,b){return b.structural&&2===b.state&&!a.structural}),e.cancel.push(function(a,b){return b.structural&&a.structural}),e.cancel.push(function(a,b){return 2===b.state&&a.structural}),e.cancel.push(function(a,b){var d,e;return!(b.structural||(d=a.addClass,a=a.removeClass,e=b.addClass,b=b.removeClass,N(d)&&N(a))||N(e)&&N(b))&&(c(d,b)||c(a,e))}),this.$get=["$$rAF","$rootScope","$rootElement","$document","$$Map","$$animation","$$AnimateRunner","$templateRequest","$$jqLite","$$forceReflow","$$isDocumentHidden",function(b,c,e,n,z,qa,J,u,H,k,O){function A(a,b,c){var g=[],d=h[c];return d&&s(d,function(d){(w.call(d.node,b)||"leave"===c&&w.call(d.node,a))&&g.push(d.callback)}),g}function B(a,b,c){var g=ua(b);return a.filter(function(a){return!(a.node===g&&(!c||a.callback===c))})}function q(a,h,v){function q(a,c,g,d){G(function(){var a=A(ta,k,c);a.length?b(function(){s(a,function(a){a(e,g,d)}),"close"!==g||k.parentNode||ra.off(k)}):"close"!==g||k.parentNode||ra.off(k)}),a.progress(c,g,d)}function B(a){var b=e,c=m;c.preparationClasses&&(b.removeClass(c.preparationClasses),c.preparationClasses=null),c.activeClasses&&(b.removeClass(c.activeClasses),c.activeClasses=null),D(e,m),ha(e,m),m.domOperation(),t.complete(!a)}var m=Ca(v),e=Ga(a),k=Q(e),ta=k&&k.parentNode,m=na(m),t=new J,G=(()=>{var a=!1;return function(b){a?b():c.$$postDigest(function(){a=!0,b()})}})();if(W(m.addClass)&&(m.addClass=m.addClass.join(" ")),m.addClass&&!F(m.addClass)&&(m.addClass=null),W(m.removeClass)&&(m.removeClass=m.removeClass.join(" ")),m.removeClass&&!F(m.removeClass)&&(m.removeClass=null),m.from&&!aa(m.from)&&(m.from=null),m.to&&!aa(m.to)&&(m.to=null),k)if(v=[k.getAttribute("class"),m.addClass,m.removeClass].join(" "),Xa(v)){var z,n=0<=["enter","move","leave"].indexOf(h),w=O(),u=!g||w||ga.get(k),H=!!(v=!u&&x.get(k)||{}).state;if(u=u||H&&1===v.state?u:!M(k,ta))w&&q(t,h,"start"),B(),w&&q(t,h,"close");else{if(n&&(a=>{a=a.querySelectorAll("[data-ng-animate]"),s(a,function(a){var b=parseInt(a.getAttribute("data-ng-animate"),10),c=x.get(a);if(c)switch(b){case 2:c.runner.end();case 1:x.delete(a)}})})(k),w={structural:n,element:e,event:h,addClass:m.addClass,removeClass:m.removeClass,close:B,options:m,runner:t},H){if(d("skip",w,v))return 2===v.state?(B(),t):(U(e,v,w),v.runner);if(d("cancel",w,v))if(2===v.state)v.runner.end();else{if(!v.structural)return U(e,v,w),v.runner;v.close()}else if(d("join",w,v)){if(2!==v.state)return((a,b,c)=>{var d="";b&&(d=X(b,"ng-",!0)),c.addClass&&(d=Z(d,X(c.addClass,"-add"))),(d=c.removeClass?Z(d,X(c.removeClass,"-remove")):d).length&&(c.preparationClasses=d,a.addClass(d))})(e,n?h:null,m),h=w.event=v.event,m=U(e,v,w),v.runner;U(e,w,{})}}else U(e,w,{});(H=(H=w.structural)||"animate"===w.event&&0<Object.keys(w.options.to||{}).length||f(w))?(w.counter=z=(v.counter||0)+1,I(k,1,w),c.$$postDigest(function(){e=Ga(a);var c=!(b=x.get(k)),b=b||{},g=0<(e.parent()||[]).length&&("animate"===b.event||b.structural||f(b));c||b.counter!==z||!g?(c&&(D(e,m),ha(e,m)),(c||n&&b.event!==h)&&(m.domOperation(),t.end()),g||l(k)):(h=!b.structural&&f(b,!0)?"setClass":b.event,I(k,2),b=qa(e,h,b.options),t.setHost(b),q(t,h,"start",{}),b.done(function(a){B(!a),(a=x.get(k))&&a.counter===z&&l(k),q(t,h,"close",{})}))})):(B(),l(k))}}else B();else B();return t}function l(a){a.removeAttribute("data-ng-animate"),x.delete(a)}function M(a,b,c){c=n[0].body;var A,g=Q(e),d=a===c||"HTML"===a.nodeName,h=a===g,f=!1,k=ga.get(a);for((a=E.data(a,"$ngAnimatePin"))&&(b=Q(a));b&&(h=h||b===g,1===b.nodeType);){if(a=x.get(b)||{},!f){var q=ga.get(b);if(!0===q&&!1!==k){k=!0;break}!1===q&&(k=!1),f=a.structural}if((N(A)||!0===A)&&(a=E.data(b,"$$ngAnimateChildren"),ya(a))&&(A=a),f&&!1===A)break;if((d=d||b===c)&&h)break;b=!h&&(a=E.data(b,"$ngAnimatePin"))?Q(a):b.parentNode}return(!f||A)&&!0!==k&&h&&d}function I(a,b,c){(c=c||{}).state=b,a.setAttribute("data-ng-animate",b),c=(b=x.get(a))?va(b,c):c,x.set(a,c)}var x=new z,ga=new z,g=null,ta=c.$watch(function(){return 0===u.totalPendingRequests},function(a){a&&(ta(),c.$$postDigest(function(){c.$$postDigest(function(){null===g&&(g=!0)})}))}),h=Object.create(null),t=a.classNameFilter(),Xa=t?function(a){return t.test(a)}:function(){return!0},D=Y(H),w=R.Node.prototype.contains||function(a){return this===a||!!(16&this.compareDocumentPosition(a))},ra={on:function(a,b,c){var g=ua(b);h[a]=h[a]||[],h[a].push({node:g,callback:c}),E(b).on("$destroy",function(){x.get(g)||ra.off(a,b,c)})},off:function(a,b,c){if(1!==arguments.length||F(a)){var g=h[a];g&&(h[a]=1===arguments.length?null:B(g,b,c))}else for(g in b=a,h)h[g]=B(h[g],b)},pin:function(a,b){Ea(da(a),"element","not an element"),Ea(da(b),"parentElement","not an element"),a.data("$ngAnimatePin",b)},push:function(a,b,c,g){return(c=c||{}).domOperation=g,q(a,b,c)},enabled:function(a,b){var d,c=arguments.length;
1return 0===c?b=!!g:da(a)?(d=Q(a),1===c?b=!ga.get(d):ga.set(d,!b)):b=g=!!a,b}};return ra}]}]).provider("$$animation",["$animateProvider",function(a){var b=this.drivers=[];this.$get=["$$jqLite","$rootScope","$injector","$$AnimateRunner","$$Map","$$rAFScheduler",function(a,d,f,e,p,K){function G(a){for(var c={children:[]},f=new p,d=0;d<a.length;d++){var e=a[d];f.set(e.domNode,a[d]={domNode:e.domNode,fn:e.fn,children:[]})}for(d=0;d<a.length;d++)!function b(a){if(!a.processed){a.processed=!0;var q,d=a.domNode,e=d.parentNode;for(f.set(d,a);e;){if(q=f.get(e)){q.processed||(q=b(q));break}e=e.parentNode}(q||c).children.push(a)}return a}(a[d]);return(a=>{for(var b=[],c=[],d=0;d<a.children.length;d++)c.push(a.children[d]);a=c.length;var f=0,e=[];for(d=0;d<c.length;d++){var k=c[d];a<=0&&(a=f,f=0,b.push(e),e=[]),e.push(k.fn),k.children.forEach(function(a){f++,c.push(a)}),a--}return e.length&&b.push(e),b})(c)}var n=[],z=Y(a);return function(p,J,u){function k(a){var b=[],c={},d=(s(a,function(a,d){var e,h=Q(a.element),f=0<=["enter","move"].indexOf(a.event);(h=a.structural?(a=>{a=a.hasAttribute("ng-animate-ref")?[a]:a.querySelectorAll("[ng-animate-ref]");var b=[];return s(a,function(a){var c=a.getAttribute("ng-animate-ref");c&&c.length&&b.push(a)}),b})(h):[]).length?(e=f?"to":"from",s(h,function(a){var b=a.getAttribute("ng-animate-ref");c[b]=c[b]||{},c[b][e]={animationID:d,element:E(a)}})):b.push(a)}),{}),f={};return s(c,function(c,e){var q,x,l,B,k=c.from,c=c.to;k&&c?(q=a[k.animationID],x=a[c.animationID],l=k.animationID.toString(),f[l]||((B=f[l]={structural:!0,beforeStart:function(){q.beforeStart(),x.beforeStart()},close:function(){q.close(),x.close()},classes:((a,b)=>
1{a=a.split(" "),b=b.split(" ");for(var c=[],d=0;d<a.length;d++){var f=a[d];if("ng-"!==f.substring(0,3))for(var e=0;e<b.length;e++)if(f===b[e]){c.push(f);break}}return c.join(" ")})(q.classes,x.classes),from:q,to:x,anchors:[]}).classes.length?b.push(B):(b.push(q),b.push(x))),f[l].anchors.push({out:k.element,in:c.element})):(c=(k=(k||c).animationID).toString(),d[c]||(d[c]=!0,b.push(a[k])))}),b}function L(a){for(var c=b.length-1;0<=c;c--){var d=f.get(b[c])(a);if(d)return d}}function B(){var a=p.data("$$animationRunner");!a||"leave"===J&&u.$$domOperationFired||a.end()}function q(b){p.off("$destroy",B),p.removeData("$$animationRunner"),z(p,u),ha(p,u),u.domOperation(),I&&a.removeClass(p,I),p.removeClass("ng-animate"),l.complete(!b)}u=na(u);var M,I,x,sa=0<=["enter","move","leave"].indexOf(J),l=new e({end:function(){q()},cancel:function(){q(!0)}});return b.length?(p.data("$$animationRunner",l),M=Fa(p.attr("class"),Fa(u.addClass,u.removeClass)),(I=u.tempClasses)&&(M+=" "+I,u.tempClasses=null),sa&&(x="ng-"+J+"-prepare",a.addClass(p,x)),n.push({element:p,classes:M,event:J,structural:sa,options:u,beforeStart:function(){p.addClass("ng-animate"),I&&a.addClass(p,I),x&&(a.removeClass(p,x),x=null)},close:q}),p.on("$destroy",B),1<n.length||d.$$postDigest(function(){var a=[],b=(s(n,function(b){b.element.data("$$animationRunner")?a.push(b):b.close()}),n.length=0,k(a)),c=[];s(b,function(a){c.push({domNode:Q((a.from||a).element),fn:function(){a.beforeStart();var b,d,c=a.close;(b=(a.anchors?a.from.element||a.to.element:a.element).data("$$animationRunner")&&(d=L(a))?d.start:b)?((b=b()).done(function(a){c(!a)}),((a,b)=>{function c(a){(a=a.data("$$animationRunner"))&&a.setHost(b)}a.from&&a.to?(c(a.from.element),c(a.to.element)):c(a.element)})(a,b)):c()}})}),K(G(c))})):q(),l}}]}]).provider("$animateCss",["$animateProvider",function(a){var b=La(),c=La();this.$get=["$window","$$jqLite","$$AnimateRunner","$timeout","$$forceReflow","$sniffer","$$rAFScheduler","$$animateQueue",function(a,f,e,p,K,G,n,z){function y(a,b){var c=a.parentNode;return(c.$$ngAnimateParentKey||(c.$$ngAnimateParentKey=++O))+"-"+a.getAttribute("class")+"-"+b}function J(e,k,q,p){var l;return 0<b.count(q)&&((l=c.get(q))||(k=X(k,"-stagger"),f.addClass(e,k),(l=Ja(a,e,p)).animationDuration=Math.max(l.animationDuration,0),l.transitionDuration=Math.max(l.transitionDuration,0),f.removeClass(e,k),c.put(q,l))),l||{}}function u(a){L.push(a),n.waitUntilQuiet(function(){b.flush(),c.flush();for(var a=K(),d=0;d<L.length;d++)L[d](a);L.length=0})}function H(c,f,e){return(f=b.get(e))||"infinite"===(f=Ja(a,c,Va)).animationIterationCount&&(f.animationIterationCount=1),b.put(e,f),e=(c=f).animationDelay,f=c.transitionDelay,c.maxDelay=e&&f?Math.max(e,f):e||f,c.maxDuration=Math.max(c.animationDuration*c.animationIterationCount,c.transitionDuration),c}var k=Y(f),O=0,L=[];return function(a,c){function d(){l()}function n(){l(!0)}function l(b){var c;w||E&&O||(O=!(w=!0),g.$$skipPreparationClasses||f.removeClass(a,fa),f.removeClass(a,da),wa(h,!1),oa(h,!1),s(t,function(a){h.style[a[0]]=""}),k(a,g),ha(a,g),Object.keys(L).length&&s(L,function(a,b){a?h.style.setProperty(b,a):h.style.removeProperty(b)}),g.onDone&&g.onDone(),ea&&ea.length&&a.off(ea.join(" "),x),(c=a.data("$$animateCss"))&&(p.cancel(c[0].timer),a.removeData("$$animateCss")),F&&F.complete(!b))}function M(a){r.blockTransition&&oa(h,a),r.blockKeyframeAnimation&&wa(h,!!a)}function I(){return F=new e({end:d,cancel:n}),u(P),l(),{$$willAnimate:!1,start:function(){return F},end:d}}function x(a){a.stopPropagation();var b=a.originalEvent||a;a=b.$manualTimeStamp||Date.now(),b=parseFloat(b.elapsedTime.toFixed(3)),Math.max(a-Y,0)>=R&&m<=b&&(E=!0,l())}function ga(){function b(){if(!w){if(M(!1),s(t,function(a){h.style[a[0]]=a[1]}),k(a,g),f.addClass(a,da),r.recalculateTimingStyles){if(ma=h.getAttribute("class")+" "+fa,ja=y(h,ma),C=H(h,ma,ja),ba=C.maxDelay,N=Math.max(ba,0),0===(m=C.maxDuration))return void l();r.hasTransitions=0<C.transitionDuration,r.hasAnimations=0<C.animationDuration}r.applyAnimationDelay&&(ba="boolean"!=typeof g.delay&&xa(g.delay)?parseFloat(g.delay):ba,N=Math.max(ba,0),C.animationDelay=ba,ca=[pa,ba+"s"],t.pu
1sh(ca),h.style[ca[0]]=ca[1]),R=1e3*N,U=1e3*m,g.easing&&(e=g.easing,r.hasTransitions&&(d=S+"TimingFunction",t.push([d,e]),h.style[d]=e),r.hasAnimations)&&(d=$+"TimingFunction",t.push([d,e]),h.style[d]=e),C.transitionDuration&&ea.push(za),C.animationDuration&&ea.push(Aa),Y=Date.now();var I,n=R+1.5*U,d=Y+n,e=a.data("$$animateCss")||[],q=!0;e.length&&((q=d>(I=e[0]).expectedEndTime)?p.cancel(I.timer):e.push(l)),q&&(n=p(c,n,!1),e[0]={timer:n,expectedEndTime:d},e.push(l),a.data("$$animateCss",e)),ea.length&&a.on(ea.join(" "),x),g.to&&(g.cleanupStyles&&Ma(L,h,Object.keys(g.to)),Ia(a,g))}}function c(){var b=a.data("$$animateCss");if(b){for(var d=1;d<b.length;d++)b[d]();a.removeData("$$animateCss")}}var d,e;w||(h.parentNode?(d=function(a){var b,c;E?O&&a&&(O=!1,l()):(O=!a,C.animationDuration&&(a=wa(h,O),O?t.push(a):(c=(b=t).indexOf(a),0<=a&&b.splice(c,1))))},(e=0<aa&&(C.transitionDuration&&0===V.transitionDuration||C.animationDuration&&0===V.animationDuration)&&Math.max(V.animationDelay,V.transitionDelay))?p(b,Math.floor(e*aa*1e3),!1):b(),v.resume=function(){d(!0)},v.pause=function(){d(!1)}):l())}var g=c||{},L=(g.$$prepared||(g=na(Ca(g))),{}),h=Q(a);if(!h||!h.parentNode||!z.enabled())return I();var w,O,E,F,v,R,U,Y,t=[],c=a.attr("class"),D=(a=>{var b={};return a&&(a.to||a.from)&&(b.to=a.to,b.from=a.from),b})(g),ea=[];if(0===g.duration||!G.animations&&!G.transitions)return I();var ja,V,ia=g.event&&W(g.event)?g.event.join(" "):g.event,Z="",T="",fa=(ia&&g.structural?Z=X(ia,"ng-",!0):ia&&(Z=ia),g.addClass&&(T+=X(g.addClass,"-add")),g.removeClass&&(T.length&&(T+=" "),T+=X(g.removeClass,"-remove")),g.applyClassesEarly&&T.length&&k(a,g),[Z,T].join(" ").trim()),ma=c+" "+fa,da=X(fa,"-active"),c=D.to&&0<Object.keys(D.to).length;if(!(0<(g.keyframeStyle||"").length||c||fa))return I();V=0<g.stagger?{transitionDelay:D=parseFloat(g.stagger),animationDelay:D,transitionDuration:0,animationDuration:0}:(ja=y(h,ma),J(h,fa,ja,Wa)),g.$$skipPreparationClasses||f.addClass(a,fa),g.transitionStyle&&(D=[S,g.transitionStyle],ka(h,D),t.push(D)),0<=g.duration&&(D=0<h.style[S].length,D=Ka(g.duration,D),ka(h,D),t.push(D)),g.keyframeStyle&&(D=[$,g.keyframeStyle],ka(h,D),t.push(D));var ca,aa=V?0<=g.staggerIndex?g.staggerIndex:b.count(ja):0,C=((ia=0===aa)&&!g.skipBlocking&&oa(h,9999),H(h,ma,ja)),ba=C.maxDelay,N=Math.max(ba,0),m=C.maxDuration,r={};return r.hasTransitions=0<C.transitionDuration,r.hasAnimations=0<C.animationDuration,r.hasTransitionAll=r.hasTransitions&&"all"===C.transitionProperty,r.applyTransitionDuration=c&&(r.hasTransitions&&!r.hasTransitionAll||r.hasAnimations&&!r.hasTransitions),r.applyAnimationDuration=g.duration&&r.hasAnimations,r.applyTransitionDelay=xa(g.delay)&&(r.applyTransitionDuration||r.hasTransitions),r.applyAnimationDelay=xa(g.delay)&&r.hasAnimations,r.recalculateTimingStyles=0<T.length,(r.applyTransitionDuration||r.applyAnimationDuration)&&(m=g.duration?parseFloat(g.duration):m,r.applyTransitionDuration&&(r.hasTransitions=!0,C.transitionDuration=m,D=0<h.style[S+"Property"].length,t.push(Ka(m,D))),r.applyAnimationDuration)&&(r.hasAnimations=!0,C.animationDuration=m,t.push([Ba,m+"s"])),0!==m||r.recalculateTimingStyles?(null!=g.delay&&("boolean"!=typeof g.delay&&(ca=parseFloat(g.delay),N=Math.max(ca,0)),r.applyTransitionDelay&&t.push([la,ca+"s"]),r.applyAnimationDelay)&&t.push([pa,ca+"s"]),null==g.duration&&0<C.transitionDuration&&(r.recalculateTimingStyles=r.recalculateTimingStyles||ia),R=1e3*N,U=1e3*m,g.skipBlocking||(r.blockTransition=0<C.transitionDuration,r.blockKeyframeAnimation=0<C.animationDuration&&0<V.animationDelay&&0===V.animationDuration),g.from&&(g.cleanupStyles&&Ma(L,h,Object.keys(g.from)),Ha(a,g)),r.blockTransition||r.blockKeyframeAnimation?M(m):g.skipBlocking||oa(h,!1),{$$willAnimate:!0,end:d,start:function(){if(!w)return F=new e(v={end:d,cancel:n,resume:null,pause:null}),u(ga),F}}):I()}}]}]).provider("$$animateCssDriver",["$$animationProvider",function(a){a.drivers.push("$$animateCssDriver"),this.$get=["$animateCss","$rootScope","$$AnimateRunner","$rootElement","$sniffer","$$jqLite","$document",function(a,c,d,f,e,p,K){function G(a){return a.replace(/\bng-\S+\b/g,"")}function n(a,b){return F(a)&&(a=a.split(" ")),F(b)&&(b=b.split(" ")),a.filter(function(a){return-1===b.indexOf(a)}).join(" ")}function z(c,e,f){function p(a){var b={},c=Q(a).getBoundingClientRect();return s(["width","height","top","left"],function(a){var d=c[a];switch(a){case"top":d+=u.scrollTop;break;case"left":d+=u.scrollLeft}b[a]=Math.floor(d)+"px"}),b}function K(){var d=n(c=G(f.attr("class")||""),l),c=n(l,c);return(d=a(z,{to:p(f),addClass:"ng-anchor-in "+d,removeClass:"ng-anchor-out "+c,delay:!0})).$$willAnimate?d:null}function q(){z.remove(),e.removeClass("ng-animate-shim"),f.removeClass("ng-animate-shim")}var M,I,z=E(Q(e).cloneNode(!0)),l=G(z.attr("class")||"");return e.addClass("ng-animate-shim"),f.addClass("ng-animate-shim"),z.addClass("ng-anchor"),H.append(z),(c=(()=>{var c=a(z,{addClass:"ng-anchor-out",delay:!0,from:p(e)});return c.$$willAnimate?c:null})())||(M=K())?(I=c||M,{start:function(){function a(){c&&c.end()}var b,c=I.start();return c.done(function(){if(c=null,!M&&(M=K()))return(c=M.start()).done(function(){c=null,q(),b.complete()}),c;q(),b.complete()}),b=new d({end:a,cancel:a})}}):q()}function J(c){var d=c.element,e=c.options||{};return c.structural&&(e.event=c.event,e.structural=!0,e.applyClassesEarly=!0,"leave"===c.event)&&(e.onDone=e.domOperation),e.preparationClasses&&(e.event=Z(e.event,e.preparationClasses)),(c=a(d,e)).$$willAnimate?c:null}var u,H;return e.animations||e.transitions?(u=K[0].body,c=Q(f),H=E(c.parentNode&&11===c.parentNode.nodeType||u.contains(c)?c:u),function(a){return a.from&&a.to?((a,b,e)=>{var f=J(a),p=J(b),n=[];if(s(e,function(a){(a=z(0,a.out,a.in))&&n.push(a)}),f||p||0!==n.length)return{start:function(){function a(){s(b,function(a){a.end()})}
1var b=[],c=(f&&b.push(f.start()),p&&b.push(p.start()),s(n,function(a){b.push(a.start())}),new d({end:a,cancel:a}));return d.all(b,function(a){c.complete(a)}),c}}})(a.from,a.to,a.anchors):J(a)}):P}]}]).provider("$$animateJs",["$animateProvider",function(a){this.$get=["$injector","$$AnimateRunner","$$jqLite",function(b,c,d){function f(c){c=W(c)?c:c.split(" ");for(var d=[],e={},f=0;f<c.length;f++){var s=c[f],y=a.$$registeredAnimations[s];y&&!e[s]&&(d.push(b.get(y)),e[s]=!0)}return d}var e=Y(d);return function(a,b,d,n){function z(){n.domOperation(),e(a,n)}function y(a,b,d,e,f){switch(d){case"animate":b=[b,e.from,e.to,f];break;case"setClass":b=[b,k,F,f];break;case"addClass":b=[b,k,f];break;case"removeClass":b=[b,F,f];break;default:b=[b,f]}if(b.push(e),a=a.apply(a,b))if((a=Da(a.start)?a.start():a)instanceof c)a.done(f);else if(Da(a))return a;return P}function J(a,b,d,e,f){var k=[];return s(e,function(e){var l=e[f];l&&k.push(function(){function h(a){g||(g=!0,(f||P)(a),e.complete(!a))}var g=!1,e=new c({end:function(){h()},cancel:function(){h(!0)}}),f=y(l,a,b,d,function(a){h(!1===a)});return e})}),k}function u(a,b,d,e,f){var h,l,k=J(a,b,d,e,f);if(0!==(k=0===k.length&&("beforeSetClass"===f?(h=J(a,"removeClass",d,e,"beforeRemoveClass"),l=J(a,"addClass",d,e,"beforeAddClass")):"setClass"===f&&(h=J(a,"removeClass",d,e,"removeClass"),l=J(a,"addClass",d,e,"addClass")),h&&(k=k.concat(h)),l)?k.concat(l):k).length)return function(a){var b=[];return k.length&&s(k,function(a){b.push(a())}),b.length?c.all(b,a):a(),function(a){s(b,function(b){a?b.cancel():b.end()})}}}var A,B,E,q,l,H=!1,k=(3===arguments.length&&aa(d)&&(n=d,d=null),n=na(n),d||(d=a.attr("class")||"",n.addClass&&(d+=" "+n.addClass),n.removeClass&&(d+=" "+n.removeClass)),n.addClass),F=n.removeClass,d=f(d);if(d.length&&(q="leave"===b?(E="leave","afterLeave"):(E="before"+b.charAt(0).toUpperCase()+b.substr(1),b),"enter"!==b&&"move"!==b&&(A=u(a,b,n,d,E)),B=u(a,b,n,d,q)),A||B)return{$$willAnimate:!0,end:function(){return l?l.end():(H=!0,z(),ha(a,n),(l=new c).complete(!0)),l},start:function(){function b(c){H=!0,z(),ha(a,n),l.complete(c)}var d,e;return l||(l=new c,e=[],A&&e.push(function(a){d=A(a)}),e.length?e.push(function(a){z(),a(!0)}):z(),B&&e.push(function(a){d=B(a)}),l.setHost({end:function(){H||((d||P)(void 0),b(void 0))},cancel:function(){H||((d||P)(!0),b(!0))}}),c.chain(e,b)),l}}}}]}]).provider("$$animateJsDriver",["$$animationProvider",function(a){a.drivers.push("$$animateJsDriver"),this.$get=["$$animateJs","$$AnimateRunner",function(a,c){function d(c){return a(c.element,c.event,c.classes,c.options)}return function(a){var b,p;return a.from&&a.to?(b=d(a.from),p=d(a.to),b||p?{start:function(){function a(){return function(){s(d,function(a){a.end()})}}var d=[],f=(b&&d.push(b.start()),p&&d.push(p.start()),c.all(d,function(a){f.complete(a)}),new c({end:a(),cancel:a()}));return f}}:void 0):d(a)}}]}])})(window,window.angular),((n,r)=>{var t,e;"object"==typeof exports&&"undefined"!=typeof module?module.exports=r():"function"==typeof define&&define.amd?define("underscore",r):(n="undefined"!=typeof globalThis?globalThis:n||self,t=n._,(e=n._=r()).noConflict=function(){return n._=t,e})})(this,function(){var n="1.13.8",r="object"==typeof self&&self.self===self&&self||"object"==typeof global&&global.global===global&&global||Function("return this")()||{},t=Array.prototype,e=Object.prototype,u="undefined"!=typeof Symbol?Symbol.prototype:null,i=t.push,o=t.slice,a=e.toString,f=e.hasOwnProperty,c="undefined"!=typeof ArrayBuffer,l="undefined"!=typeof DataView,s=Array.isArray,p=Object.keys,v=Object.create,h=c&&ArrayBuffer.isView,y=isNaN,d=isFinite,g=!{toString:null}.propertyIsEnumerable("toString"),b=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],m=Math.pow(2,53)-1;function j(n,r){return r=null==r?n.length-1:+r,function(){for(var t=Math.max(arguments.length-r,0),e=Array(t),u=0;u<t;u++)e[u]=arguments[u+r];switch(r){case 0:return n.call(this,e);case 1:return n.call(this,arguments[0],e);case 2:return n.call(this,arguments[0],arguments[1],e)}for(var i=Array(r+1),u=0;u<r;u++)i[u]=arguments[u];return i[r]=e,n.apply(this,i)}}function w(n){var r=typeof n;return"function"==r||"object"==r&&!!n}function _(n){return void 0===n}function A(n){return!0===n||!1===n||"[object Boolean]"===a.call(n)}function x(n){var r="[object "+n+"]";return function(n){return a.call(n)===r}}var S=x("String"),O=x("Number"),M=x("Date"),E=x("RegExp"),B=x("Error"),N=x("Symbol"),k=x("ArrayBuffer"),I=x("Function"),r=r.document&&r.document.childNodes,D=I="function"!=typeof/./&&"object"!=typeof Int8Array&&"function"!=typeof r?function(n){return"function"==typeof n||!1}:I,r=x("Object"),V=l&&(!/\[native code\]/.test(String(DataView))||r(new DataView(new ArrayBuffer(8)))
vendor: 7,437 bytes, line 1
1),I="undefined"!=typeof Map&&r(new Map),l=x("DataView"),q=V?function(n){return null!=n&&D(n.getInt8)&&k(n.buffer)}:l,U=s||x("Array");function W(n,r){return null!=n&&f.call(n,r)}var z=x("Arguments"),L=(!function(){z(arguments)||(z=function(n){return W(n,"callee")})}(),z);function $(n){return O(n)&&y(n)}function C(n){return function(){return n}}function K(n){return function(r){r=n(r);return"number"==typeof r&&0<=r&&r<=m}}function J(n){return function(r){return null==r?void 0:r[n]}}var G=J("byteLength"),H=K(G),Q=/\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/,X=c?function(n){return h?h(n)&&!q(n):H(n)&&Q.test(a.call(n))}:C(!1),Y=J("length");function Z(n,r){r=(n=>{for(var r={},t=n.length,e=0;e<t;++e)r[n[e]]=!0;return{contains:function(n){return!0===r[n]},push:function(t){return r[t]=!0,n.push(t)}}})(r);var t=b.length,u=n.constructor,i=D(u)&&u.prototype||e,o="constructor";for(W(n,o)&&!r.contains(o)&&r.push(o);t--;)(o=b[t])in n&&n[o]!==i[o]&&!r.contains(o)&&r.push(o)}function nn(n){if(!w(n))return[];if(p)return p(n);var t,r=[];for(t in n)W(n,t)&&r.push(t);return g&&Z(n,r),r}function rn(n,r){var t=nn(r),e=t.length;if(null==n)return!e;for(var u=Object(n),i=0;i<e;i++){var o=t[i];if(r[o]!==u[o]||!(o in u))return!1}return!0}function tn(n){return n instanceof tn?n:this instanceof tn?void(this._wrapped=n):new tn(n)}function en(n){return new Uint8Array(n.buffer||n,n.byteOffset||0,G(n))}tn.VERSION=n,tn.prototype.valueOf=tn.prototype.toJSON=tn.prototype.value=function(){return this._wrapped},tn.prototype.toString=function(){return String(this._wrapped)};var un="[object DataView]";function on(n){if(!w(n))return[];var t,r=[];for(t in n)r.push(t);return g&&Z(n,r),r}function an(n){var r=Y(n);return function(t){if(null==t)return!1;var e=on(t);if(Y(e))return!1;for(var u=0;u<r;u++)if(!D(t[n[u]]))return!1;return n!==vn||!D(t[fn])}}var fn="forEach",r=["clear","delete"],l=["get","has","set"],s=r.concat(fn,l),vn=r.concat(l),c=["add"].concat(r,fn,"has"),l=I?an(s):x("Map"),r=I?an(vn):x("WeakMap"),s=I?an(c):x("Set"),I=x("WeakSet");function mn(n){for(var r=nn(n),t=r.length,e=Array(t),u=0;u<t;u++)e[u]=n[r[u]];return e}function jn(n){for(var r={},t=nn(n),e=0,u=t.length;e<u;e++)r[n[t[e]]]=t[e];return r}function wn(n){var t,r=[];for(t in n)D(n[t])&&r.push(t);return r.sort()}function _n(n,r){return function(t){var e=arguments.length;if(r&&(t=Object(t)),!(e<2||null==t))for(var u=1;u<e;u++)for(var i=arguments[u],o=n(i),a=o.length,f=0;f<a;f++){var c=o[f];r&&void 0!==t[c]||(t[c]=i[c])}return t}}var An=_n(on),xn=_n(nn),Sn=_n(on,!0);function On(n){var r;return w(n)?v?v(n):((r=function(){}).prototype=n,n=new r,r.prototype=null,n):{}}function Mn(n){return U(n)?n:[n]}function En(n){return tn.toPath(n)}function Bn(n,r){for(var t=r.length,e=0;e<t;e++){if(null==n)return;n=n[r[e]]}return t?n:void 0}function Nn(n,r,t){n=Bn(n,En(r));return _(n)?t:n}function kn(n){return n}function In(n){return n=xn({},n),function(r){return rn(r,n)}}function Tn(n){return n=En(n),function(r){return Bn(r,n)}}function Dn(n,r,t){if(void 0===r)return n;switch(null==t?3:t){case 1:return function(t){return n.call(r,t)};case 3:return function(t,e,u){return n.call(r,t,e,u)};case 4:return function(t,e,u,i){return n.call(r,t,e,u,i)}}return function(){return n.apply(r,arguments)}}function Rn(n,r,t){return null==n?kn:D(n)?Dn(n,r,t):(w(n)&&!U(n)?In:Tn)(n)}function Vn(n,r){return Rn(n,r,1/0)}function Fn(n,r,t){return tn.iteratee!==Vn?tn.iteratee(n,r):Rn(n,r,t)}function Pn(){}function qn(n,r){return null==r&&(r=n,n=0),n+Math.floor(Math.random()*(r-n+1))}tn.toPath=Mn,tn.iteratee=Vn;var Un=Date.now||function(){return(new Date).getTime()};function Wn(n){function r(r){return n[r]}var t="(?:"+nn(n).join("|")+")",e=RegExp(t),u=RegExp(t,"g");return function(n){return e.test(n=null==n?"":""+n)?n.replace(u,r):n}}var c={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},Ln=Wn(c),c=Wn(jn(c)),Cn=tn.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g},Kn=/(.)^/,Jn={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},Gn=/\\|'|\r|\n|\u2028|\u2029/g;function Hn(n){return"\\"+Jn[n]}var Qn=/^\s*(\w|\$)+\s*$/,Xn=0;function Yn(n,r,t,e,u){return e instanceof r?(e=On(n.prototype),w(r=n.apply(e,u))?r:e):n.apply(t,u)}var Zn=j(function(n,r){function e(){for(var u=0,i=r.length,o=Array(i),a=0;a<i;a++)o[a]=r[a]===t?arguments[u++]:r[a];for(;u<arguments.length;)o.push(arguments[u++]);return Yn(n,e,this,this,o)}var t=Zn.placeholder;return e}),nr=(Zn.placeholder=tn,j(function(n,r,t){var e;if(D(n))return e=j(function(u){return Yn(n,e,r,this,t.concat(u))});throw new TypeError("Bind must be called on a function")})),rr=K(Y);function tr(n,r,t){r||0===r||(r=1/0);for(var e=[],u=0,i=0,o=Y(n)||0,a=[];;){1;if(o<=i){if(!a.length)break;var f=a.pop(),i=f.i,o=Y(n=f.v)}else{f=n[i++];r<=a.length?e[u++]=f:rr(f)&&(U(f)||L(f))?(a.push({i:i,v:n}),i=0,o=Y(n=f)):t||(e[u++]=f)}}return e}var er=j(function(n,r){var t=(r=tr(r,!1,!1)).length;if(t<1)throw new Error("bindAll must be passed function names");for(;t--;){var e=r[t];n[e]=nr(n[e],n)}return n}),ur=j(function(n,r,t){return setTimeout(function(){return n.apply(null,t)},r)}),ir=Zn(ur,tn,1);function or(n){return function(){return!n.apply(this,arguments)}}function ar(n,r){var t;return function(){return 0<--n&&(t=r.apply(this,arguments)),n<=1&&(r=null),t}}var fr=Zn(ar,2);function cr(n,r,t){r=Fn(r,t);for(var e,u=nn(n),i=0,o=u.length;i<o;i++)if(r(n[e=u[i]],e,n))return e}function lr(n){return function(r,t,e){t=Fn(t,e);for(var u=Y(r),i=0<n?0:u-1;0<=i&&i<u;i+=n)if(t(r[i],i,r))return i;return-1}}var sr=lr(1),pr=lr(-1);function vr(n,r,t,e){for(var u=(t=Fn(t,e,1))(r),i=0,o=Y(n);i<o;){var a=Math.floor((i+o)/2);t(n[a])<u?i=a+1:o=a}return i}function hr(n,r,t){return function(e,u,i){var a=0,f=Y(e);if("number"==typeof i)0<n?a=0<=i?i:Math.max(i+f,a):f=0<=i?Math.min(i+1,f):i+f+1;else if(t&&i&&f)return e[i=t(e,u)]===u?i:-1;if(u!=u)return 0<=(i=r(o.call(e,a,f),$))?i+a:-1;for(i=0<n?a:f-1;0<=i&&i<f;i+=n)if(e[i]===u)return i;return-1}}var yr=hr(1,sr,vr),dr=hr(-1,pr);function gr(n,r,t){r=(rr(n)?sr:cr)(n,r,t);if(void 0!==r&&-1!==r)return n[r]}function br(n,r,t){if(r=Dn(r,t),rr(n))for(e=0,u=n.length;e<u;e++)r(n[e],e,n);else for(var i=nn(n),e=0,u=i.length;e<u;e++)r(n[i[e]],i[e],n);return n}function mr(n,r,t){r=Fn(r,t);for(var e=!rr(n)&&nn(n),u=(e||n).length,i=Array(u),o=0;o<u;o++){var a=e?e[o]:o;i[o]=r(n[a],a,n)}return i}function jr(n){function r(r,t,e,u){var i=!rr(r)&&nn(r),o=(i||r).length,a=0<n?0:o-1;for(u||(e=r[i?i[a]:a],a+=n);0<=a&&a<o;a+=n){var f=i?i[a]:a;e=t(e,r[f],f,r)}return e}return function(n,t,e,u){var i=3<=arguments.length;return r(n,Dn(t,u,4),e,i)}}var wr=jr(1),_r=jr(-1);function Ar(n,r,t){var e=[];return r=Fn(r,t),br(n,function(n,t,u){r(n,t,u)&&e.push(n)}),e}function xr(n,r,t){r=Fn(r,t);for(var e=!rr(n)&&nn(n),u=(e||n).length,i=0;i<u;i++){var o=e?e[i]:i;if(!r(n[o],o,n))return!1}return!0}function Sr(n,r,t){r=Fn(r,t);for(var e=!rr(n)&&nn(n),u=(e||n).length,i=0;i<u;i++){var o=e?e[i]:i;if(r(n[o],o,n))return!0}return!1}function Or(n,r,t,e){return rr(n)||(n=mn(n)),0<=yr(n,r,t="number"==typeof t&&!e?t:0)}var Mr=j(function(n,r,t){var e,u;return D(r)?u=r:(r=En(r),e=r.slice(0,-1),r=r[r.length-1]),mr(n,function(n){var i=u;if(!i){if(null==(n=e&&e.length?Bn(n,e):n))return;i=n[r]}return null==i?i:i.apply(n,t)})});function Er(n,r){return mr(n,Tn(r))}function Br(n,r,t){var e,u,i=-1/0,o=-1/0;
1if(null==r||"number"==typeof r&&"object"!=typeof n[0]&&null!=n)for(var a=0,f=(n=rr(n)?n:mn(n)).length;a<f;a++)null!=(e=n[a])&&i<e&&(i=e);else r=Fn(r,t),br(n,function(n,t,e){((u=r(n,t,e))>o||u===-1/0&&i===-1/0)&&(i=n,o=u)});return i}var Nr=/[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g;function kr(n){return n?U(n)?o.call(n):S(n)?n.match(Nr):rr(n)?mr(n,kn):mn(n):[]}function Ir(n,r,t){if(null==r||t)return(n=rr(n)?n:mn(n))[qn(n.length-1)];var e=kr(n),t=Y(e);r=Math.max(Math.min(r,t),0);for(var i=t-1,o=0;o<r;o++){var a=qn(o,i),f=e[o];e[o]=e[a],e[a]=f}return e.slice(0,r)}function Tr(n,r){return function(t,e,u){var i=r?[[],[]]:{};return e=Fn(e,u),br(t,function(r,u){u=e(r,u,t);n(i,r,u)}),i}}var Dr=Tr(function(n,r,t){W(n,t)?n[t].push(r):n[t]=[r]}),Rr=Tr(function(n,r,t){n[t]=r}),Vr=Tr(function(n,r,t){W(n,t)?n[t]++:n[t]=1}),Fr=Tr(function(n,r,t){n[t?0:1].push(r)},!0);function Pr(n,r,t){return r in t}var qr=j(function(n,r){var t={},e=r[0];if(null!=n){D(e)?(1<r.length&&(e=Dn(e,r[1])),r=on(n)):(e=Pr,r=tr(r,!1,!1),n=Object(n));for(var u=0,i=r.length;u<i;u++){var o=r[u],a=n[o];e(a,o,n)&&(t[o]=a)}}return t}),Ur=j(function(n,r){var t,e=r[0];return D(e)?(e=or(e),1<r.length&&(t=r[1])):(r=mr(tr(r,!1,!1),String),e=function(n,t){return!Or(r,t)}),qr(n,e,t)});function Wr(n,r,t){return o.call(n,0,Math.max(0,n.length-(null==r||t?1:r)))}function zr(n,r,t){return null==n||n.length<1?null==r||t?void 0:[]:null==r||t?n[0]:Wr(n,n.length-r)}function Lr(n,r,t){return o.call(n,null==r||t?1:r)}var $r=j(function(n,r){return r=tr(r,!0,!0),Ar(n,function(n){return!Or(r,n)})}),Cr=j(function(n,r){return $r(n,r)});function Kr(n,r,t,e){A(r)||(e=t,t=r,r=!1),null!=t&&(t=Fn(t,e));for(var u=[],i=[],o=0,a=Y(n);o<a;o++){var f=n[o],c=t?t(f,o,n):f;r&&!t?(o&&i===c||u.push(f),i=c):t?Or(i,c)||(i.push(c),u.push(f)):Or(u,f)||u.push(f)}return u}var Jr=j(function(n){return Kr(tr(n,!0,!0))});function Gr(n){for(var r=n&&Br(n,Y).length||0,t=Array(r),e=0;e<r;e++)t[e]=Er(n,e);return t}var Hr=j(Gr);function Qr(n,r){return n._chain?tn(r).chain():r}function Xr(n){return br(wn(n),function(r){var t=tn[r]=n[r];tn.prototype[r]=function(){var n=[this._wrapped];return i.apply(n,arguments),Qr(this,t.apply(tn,n))}}),tn}br(["pop","push","reverse","shift","sort","splice","unshift"],function(n){var r=t[n];tn.prototype[n]=function(){var t=this._wrapped;return null!=t&&(r.apply(t,arguments),"shift"!==n&&"splice"!==n||0!==t.length||delete t[0]),Qr(this,t)}}),br(["concat","join","slice"],function(n){var r=t[n];tn.prototype[n]=function(){var n=this._wrapped;return Qr(this,n=null!=n?r.apply(n,arguments):n)}});n=Xr({__proto__:null,VERSION:n,restArguments:j,isObject:w,isNull:function(n){return null===n},isUndefined:_,isBoolean:A,isElement:function(n){return!(!n||1!==n.nodeType)},isString:S,isNumber:O,isDate:M,isRegExp:E,isError:B,isSymbol:N,isArrayBuffer:k,isDataView:q,isArray:U,isFunction:D,isArguments:L,isFinite:function(n){return!N(n)&&d(n)&&!isNaN(parseFloat(n))},isNaN:$,isTypedArray:X,isEmpty:function(n){var r;return null==n||("number"==typeof(r=Y(n))&&(U(n)||S(n)||L(n))?0===r:0===Y(nn(n)))},isMatch:rn,isEqual:function(n,r){for(var t=[{a:n,b:r}],e=[],i=[];t.length;){var o=t.pop();if(!0!==o){if((n=o.a)===(r=o.b)){if(0!==n||1/n==1/r)continue;return!1}if(null==n||null==r)return!1;if(n!=n){if(r!=r)continue;return!1}o=typeof n;if("function"!=o&&"object"!=o&&"object"!=typeof r)return!1;n instanceof tn&&(n=n._wrapped),r instanceof tn&&(r=r._wrapped);o=a.call(n);if(o!==a.call(r))return!1;if(V&&"[object Object]"==o&&q(n)){if(!q(r))return!1;o=un}switch(o){case"[object RegExp]":case"[object String]":if(""+n==""+r)continue;return!1;case"[object Number]":t.push({a:+n,b:+r});continue;case"[object Date]":case"[object Boolean]":if(+n==+r)continue;return!1;case"[object Symbol]":if(u.valueOf.call(n)===u.valueOf.call(r))continue;return!1;case"[object ArrayBuffer]":case un:t.push({a:en(n),b:en(r)});continue}o="[object Array]"===o;if(!o&&X(n)){if(G(n)!==G(r))return!1;if(n.buffer===r.buffer&&n.byteOffset===r.byteOffset)continue;o=!0}if(!o){if("object"!=typeof n||"object"!=typeof r)return!1;var s=n.constructor,p=r.constructor;if(s!==p&&!(D(s)&&s instanceof s&&D(p)&&p instanceof p)&&"constructor"in n&&"constructor"in r)return!1}for(var v=e.length;v--;)if(e[v]===n){if(i[v]===r)break;return!1}if(!(0<=v))if(e.push(n),i.push(r),t.push(!0),o){if((v=n.length)!==r.length)return!1;for(;v--;)t.push({a:n[v],b:r[v]})}else{var h,y=nn(n),v=y.length;if(nn(r).length!==v)return!1;for(;v--;){if(!W(r,h=y[v]))return!1;t.push({a:n[h],b:r[h]})}}}else e.pop(),i.pop()}return!0},isMap:l,isWeakMap:r,isSet:s,isWeakSet:I,keys:nn,allKeys:on,values:mn,pairs:function(n){for(var r=nn(n),t=r.length,e=Array(t),u=0;u<t;u++)e[u]=[r[u],n[r[u]]];return e},invert:jn,functions:wn,methods:wn,extend:An,extendOwn:xn,assign:xn,defaults:Sn,create:function(n,r){n=On(n);return r&&xn(n,r),n},clone:function(n){return w(n)?U(n)?n.slice():An({},n):n},tap:function(n,r){return r(n),n},get:Nn,has:function(n,r){for(var t=(r=En(r)).length,e=0;e<t;e++){var u=r[e];if(!W(n,u))return!1;n=n[u]}return!!t},mapObject:function(n,r,t){r=Fn(r,t);for(var e=nn(n),u=e.length,i={},o=0;o<u;o++){var a=e[o];i[a]=r(n[a],a,n)}return i},identity:kn,constant:C,noop:Pn,toPath:Mn,property:Tn,propertyOf:function(n){return null==n?Pn:function(r){return Nn(n,r)}},matcher:In,matches:In,times:function(n,r,t){var e=Array(Math.max(0,n));r=Dn(r,t,1);for(var u=0;u<n;u++)e[u]=r(u);return e},random:qn,now:Un,escape:Ln,unescape:c,templateSettings:Cn,template:function(n,r,t){r=Sn({},r=!r&&t?t:r,tn.templateSettings);var t=RegExp([(r.escape||Kn).source,(r.interpolate||Kn).source,(r.evaluate||Kn).source].join("|")+"|$","g"),u=0,i="__p+='";n.replace(t,function(r,t,e,o,a){return i+=n.slice(u,a).replace(Gn,Hn),u=a+r.length,t?i+="'+\n((__t=("+t+"))==null?'':_.escape(__t))+\n'":e?i+="'+\n((__t=("+e+"))==null?'':__t)+\n'":o&&(i+="';\n"+o+"\n__p+='"),r}),i+="';\n";var o,t=r.variable;if(t){if(!Qn.test(t))throw new Error("variable is not a bare identifier: "+t)}else i="with(obj||{}){\n"+i+"}\n",t="obj";i="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+i+"return __p;\n";try{o=new Function(t,"_",i)}catch(n){throw n.source=i,n}function f(n){return o.call(this,n,tn)}return f.source="function("+t+"){\n"+i+"}",f},result:function(n,r,t){var e=(r=En(r)).length;if(!e)return D(t)?t.call(n):t;for(var u=0;u<e;u++){var i=null==n?void 0:n[r[u]];void 0===i&&(i=t,u=e),n=D(i)?i.call(n):i}return n},uniqueId:function(n){var r=++Xn+"";return n?n+r:r},chain:function(n){n=tn(n);return n._chain=!0,n},iteratee:Vn,partial:Zn,bind:nr,bindAll:er,memoize:function(n,r){function t(e){var u=t.cache,e=""+(r?r.apply(this,arguments):e);return W(u,e)||(u[e]=n.apply(this,arguments)),u[e]}return t.cache={},t},delay:ur,defer:ir,throttle:function(n,r,t){function f(){a=!1===t.leading?0:Un(),e=null,o=n.apply(u,i),e||(u=i=null)}function c(){var c=Un(),l=(a||!1!==t.leading||(a=c),r-(c-a));return u=this,i=arguments,l<=0||r<l?(e&&(clearTimeout(e),e=null),a=c,o=n.apply(u,i),e||(u=i=null)):e||!1===t.trailing||(e=setTimeout(f,l)),o}var e,u,i,o,a=0;t=t||{};return c.cancel=function(){clearTimeout(e),a=0,e=u=i=null},c},debounce:function(n,r,t){function f(){var c=Un()-u;c<r?e=setTimeout(f,r-c):(e=null,t||(o=n.apply(a,i)),e||(i=a=null))}var e,u,i,o,a,c=j(function(c){return a=this,i=c,u=Un(),e||(e=setTimeout(f,r),t&&(o=n.apply(a,i))),o});return c.cancel=function(){clearTimeout(e),e=i=a=null},c},wrap:function(n,r){return Zn(r,n)},negate:or,compose:function(){var n=arguments,r=n.length-1;return function(){for(var t=r,e=n[r].apply(this,arguments);t--;)e=n[t].call(this,e);return e}},after:function(n,r){return function(){if(--n<1)return r.apply(this,arguments)}},before:ar,once:fr,findKey:cr,findIndex:sr,findLastIndex:pr,sortedIndex:vr,indexOf:yr,lastIndexOf:dr,find:gr,detect:gr,findWhere:function(n,r){return gr(n,In(r))},each:br,forEach:br,map:mr,collect:mr,reduce:wr,foldl:wr,inject:wr,reduceRight:_r,foldr:_r,filter:Ar,select:Ar,reject:function(n,r,t){return Ar(n,or(Fn(r)),t)},every:xr,all:xr,some:Sr,any:Sr,contains:Or,includes:Or,include:Or,invoke:Mr,pluck:Er,where:function(n,r){return Ar(n,In(r))},max:Br,min:function(n,r,t){var e,u,i=1/0,o=1/0;
vendor: 7,658 bytes, line 1
1if(null==r||"number"==typeof r&&"object"!=typeof n[0]&&null!=n)for(var a=0,f=(n=rr(n)?n:mn(n)).length;a<f;a++)null!=(e=n[a])&&e<i&&(i=e);else r=Fn(r,t),br(n,function(n,t,e){((u=r(n,t,e))<o||u===1/0&&i===1/0)&&(i=n,o=u)});return i},shuffle:function(n){return Ir(n,1/0)},sample:Ir,sortBy:function(n,r,t){var e=0;return r=Fn(r,t),Er(mr(n,function(n,t,u){return{value:n,index:e++,criteria:r(n,t,u)}}).sort(function(n,r){var t=n.criteria,e=r.criteria;if(t!==e){if(e<t||void 0===t)return 1;if(t<e||void 0===e)return-1}return n.index-r.index}),"value")},groupBy:Dr,indexBy:Rr,countBy:Vr,partition:Fr,toArray:kr,size:function(n){return null==n?0:(rr(n)?n:nn(n)).length},pick:qr,omit:Ur,first:zr,head:zr,take:zr,initial:Wr,last:function(n,r,t){return null==n||n.length<1?null==r||t?void 0:[]:null==r||t?n[n.length-1]:Lr(n,Math.max(0,n.length-r))},rest:Lr,tail:Lr,drop:Lr,compact:function(n){return Ar(n,Boolean)},flatten:function(n,r){return tr(n,r,!1)},without:Cr,uniq:Kr,unique:Kr,union:Jr,intersection:function(n){for(var r=[],t=arguments.length,e=0,u=Y(n);e<u;e++){var i=n[e];if(!Or(r,i)){for(var o=1;o<t&&Or(arguments[o],i);o++);o===t&&r.push(i)}}return r},difference:$r,unzip:Gr,transpose:Gr,zip:Hr,object:function(n,r){for(var t={},e=0,u=Y(n);e<u;e++)r?t[n[e]]=r[e]:t[n[e][0]]=n[e][1];return t},range:function(n,r,t){null==r&&(r=n||0,n=0),t=t||(r<n?-1:1);for(var e=Math.max(Math.ceil((r-n)/t),0),u=Array(e),i=0;i<e;i++,n+=t)u[i]=n;return u},chunk:function(n,r){if(null==r||r<1)return[];for(var t=[],e=0,u=n.length;e<u;)t.push(o.call(n,e,e+=r));return t},mixin:Xr,default:tn});return n._=n}),angular.module("environment",[]).constant("Environment",{name:"prod",siteURL:"https://www.doxxbet.sk/",staticURL:"https://static.doxxbet.sk/",golden:"true",xxlBonus:"false",matchTracker:"true",trackerTimezone:"Europe:Berlin",betBuilderCulture:"sk-SK",enableCasino:"true",routes:{sk:{offer:"sportove-tipovanie-online/kurzy",live:"sportove-tipovanie-online/live",nolive:"nedostupne-live-zapasy",novirtual:"nedostupne-virtualne-hry",noprematch:"nedostupne-zapasy-na-vybrany-den",noresults:"nedostupne-vysledky-na-vybrany-den",results:"vysledky",virtual:"virtualne-hry",respvirtual:"sportove-tipovanie/virtualne-hry",respvirtualdetail:"sportove-tipovanie-online/virtualne-hry",dynamic:"sportove-tipovanie-online/bonusy-a-akcie",dynamicCasino:"kasino/kasino-online/bonusy-a-akcie",sportnews:"sportove-novinky",aboutus:"o-nas",subpages:"podstranky",ticketoftheday:"tiper-dna",analyses:"analyzy",analysis:"analyza",actualities:"novinky",casino:"kasino/kasino-online",rio:"kasino/rio-online",faq:"faq",betforum:"betforum",agent:"agent",affiliate:"affiliate-program",club:"vernostny-program",career:"kariera"},en:{offer:"sports-betting-online/offer",live:"sports-betting-online/live",nolive:"unavailable-live-matches",novirtual:"unavailable-virtual-games",noprematch:"no-prematch-for-selected-day",noresults:"no-results-for-selected-day",results:"results",virtual:"virtual-games",respvirtual:"sports-betting/virtual-games",respvirtualdetail:"sports-betting-online/virtual-games",dynamic:"sports-betting-online/bonuses-and-promotions",dynamicCasino:"casino/online-casino/bonuses-and-promotions",sportnews:"sports-news",aboutus:"about-us",subpages:"subpages",ticketoftheday:"tipper-of-the-day",actualities:"news",analyses:"analyses",analysis:"analysis",casino:"casino/online-casino",rio:"casino/rio-online",faq:"faq",betforum:"betforum",agent:"agent",affiliate:"affiliate-program",club:"vernostny-program",career:"career"}},routesOld:{sk:{offer:"sportove-tipovanie",live:"live-tipovanie",dynamic:"bonusy-a-akcie",actualities:"aktuality"},en:{offer:"sports-betting",live:"live-betting",dynamic:"bonuses-and-promotions"}},ticket:{requireTwoStep:"true",fee:{enabled:"false",amount:"0"}},offer:{hub:"https://offer-signalr-web-svk.doxxbet.sk/signalr/"},loyalty:{url:"https://loyality-ws-svk.doxxbet.sk/Loyality.svc/"},version:"c0559dc5d592c344922b9652b89ce4c93e7532a3"}),angular.module("dictionary",[]).constant("Dictionary",{SportMapping:{999999:"favorites",0:"golden_league",5:"olympics",13:"olympics",18:"soccer",37:"e_sport",48:"bandy",49:"baseball",50:"basketball",51:"floorball",52:"handball",53:"ice_hockey",54:"soccer",55:"volleyball",56:"motosport",57:"winter_sports",58:"tennis",60:"darts",61:"football",62:"golf",63:"futsal",64:"snooker",65:"boxing",66:"rugby",67:"bowls",68:"aussie_rules",69:"cycling",70:"cricket",71:"field_hockey",72:"athletics",73:"bedminton",74:"beach_volleyball",75:"chess",76:"curling",77:"swimming",78:"indoor_soccer",79:"olympics",80:"pool",81:"softball",82:"table_tennis",83:"water_polo",85:"cyclocross",86:"beach_soccer",87:"lacrosse",88:"gaelic_sports",89:"netball",90:"roller_hockey",91:"presidential_election",92:"street_hockey",93:"squash",94:"beach_handball",95:"inline_hockey",96:"martial_arts",97:"rowing",98:"triathlon",99:"gymnastics",100:"modern_pentathlon",101:"archery",102:"diving",103:"judo",105:"fencing",106:"shooting",107:"equestrian",108:"kanoe_kayak",109:"weightlifitng",110:"wrestling",111:"politics",112:"winter_olympics",114:"freestyle_skiing",115:"short_track",116:"nordic_combined",117:"ski_jumping",118:"skeleton",119:"figure_skating",120:"snowboard",121:"speed_skating",122:"luge",123:"bobsleigh",124:"alpine_ski",125:"biathlon",126:"cross_country",130:"pesapallo",131:"taekwondo",132:"long_term_stakes",138:"bikes",143:"other_stakes",151:"horse_racing",152:"greyhounds",153:"virtual_sports",158:"trotting",158:"trotting",161:"sumo",161:"sumo",162:"synchro_swimming",168:"rugby",183:"motosport",135:"f1",166:"poker",167:"rugby",171:"mma",178:"e_sport",188:"mythical_sports",194:"rugby",195:"winter_sports",1235:"greyhounds",1236:"equestrian",1237:"tennis",1238:"basketball",1239:"soccer",default:"default"},BetradarSportMapping:{48:15,49:3,50:2,51:7,52:6,53:4,54:1,55:23,58:5,68:16,60:22,61:16,63:29,64:19,69:17,70:21,73:31,74:34,82:20,83:26,86:60,130:61,167:12,183:11},RegionMapping:{164:"Norway",165:"Sweden",166:"Japan",167:"USA",168:"Austria",169:"Italy",170:"Australia",171:"France",172:"Germany",173:"Greece",174:"International",175:"Italy",176:"Smart Beach Tour",177:"Kickboxing",178:"Slovakia",179:"Summer Olympics",180:"Spain",181:"WCH - FIRS",182:"USA",183:"Czech",184:"Finland",185:"Sweden",186:"Switzerland",187:"Austria",188:"Champions League",189:"France",190:"Summer Olympics",191:"Summer Olympics",192:"Denmark",193:"Youth Women",194:"Germany",195:"Euro Cup",196:"Summer Olympics",197:"Summer Olympics",198:"International",199:"xxx",200:"Summer Olympics",202:"WCH Bobsleigh",203:"WCH Ski Flying",204:"Norway",205:"Summer Olympics",206:"WCH Skeleton",207:"Russia",208:"Luge - Men",209:"Slovakia",210:"Summer Olympics",211:"Spain",212:"Sweden",213:"Switzerland",214:"Summer Olympics",215:"TransTasman",216:"Austria",217:"Czech",218:"Denmark",219:"England",220:"Finland",221:"Germany",223:"US Open 2013",224:"Norway",225:"France",226:"Russia",227:"Slovakia",228:"xxx",229:"Sweden",230:"Switzerland",231:"USA",232:"Montenegro",233:"Argentina",234:"Australia",235:"Austria",236:"Horse Racing",237:"Belarus",238:"Belgium",239:"Bolivia",240:"Bosnia Herzegovina",241:"Brazil",242:"Bulgaria",243:"Macedonia",244:"Canada",245:"Chile",246:"Colombia",247:"Croatia",248:"Czech",249:"Denmark",250:"Ecuador",251:"England",252:"Friendlies - One Day",253:"Estonia",254:"Finland",255:"France",256:"Germany",257:"Phase",258:"Greece",259:"Netherlands",260:"Hungary",261:"Iceland",262:"International Men",263:"International Clubs",264:"Youth Men",265:"Ireland",266:"Italy",267:"Jamaica",268:"Japan",269:"Latvia",270:"Lithuania",271:"Albania",272:"Mexico",273:"Vietnam",274:"Georgia",275:"Norway",276:"Paraguay",277:"Peru",278
1:"Poland",279:"Portugal",280:"Romania",281:"Russia",282:"El Salvador",283:"Scotland",284:"Serbia",285:"Slovakia",286:"Slovenia",287:"South Africa",288:"Spain",289:"Sweden",290:"Switzerland",291:"Moldova",292:"Tunisia",293:"Turkey",294:"European Games",295:"Ukraine",296:"USA",297:"Summer Olympics",298:"Venezuela",299:"Wales",300:"Sweden",301:"Austria",302:"Brazil",303:"International Men",304:"Netherlands",305:"Belgium",306:"Bikes",308:"Formula 1",309:"Alpine - Men",310:"Alpine - Women",311:"Biathlon - Men",312:"Biathlon - Women",313:"Bobsleigh - Men",314:"International",315:"Cross Count.- Men",316:"Cross Count.- Women",317:"Figure Skating",318:"xxx",319:"Luge - Women",320:"Freestyle - Men",321:"Freestyle - Women",322:"Luge - Men",323:"Skeleton - Women",324:"Nordic Comb.-Men",325:"Short Track - Men",326:"Short Track - Women",327:"Skeleton - Men",328:"Bobsleigh - Women",329:"Ski Jumping - Men",330:"Snowboard - Men",331:"Snowboard - Women",332:"Speed Skat.- Men",333:"Speed Skat.- Women",335:"Israel",336:"Tournaments",338:"USA",339:"Italy",340:"Canada",341:"Czech",342:"Ryder Cup 2016",343:"xxx",344:"Italy",345:"Russia",346:"Spain",347:"Portugal",348:"International",349:"Norway",350:"Summer Olympics",351:"Tournaments",352:"xxx",354:"WCH-Field Lacrosse",355:"Poland",356:"Turkey",357:"International - One Day",358:"World Championship",359:"PSA World Series",360:"Euro Tour",361:"Parlament El. (SVK)",367:"Poland",368:"Greece",369:"Northern Ireland",370:"ATP",371:"WTA",372:"Challenger",373:"ITF Women",374:"Davis Cup",375:"Hopman Cup",377:"WCH-Indoor Lacrosse",378:"Coop Beachtour",379:"International",380:"xxx",381:"International",382:"World Championship",383:"Pre-Tournaments",384:"ExhibÃcia",385:"xxx",386:"Australia",388:"Sweden",389:"Giro dâItalia",390:"Rally",392:"Speedway",393:"Nascar",394:"France",395:"ITTF World Tour",396:"Tour de France",397:"Euro Championship",398:"World Championship",399:"England",400:"Biathlon - Mixed",401:"Superbike",402:"World Cup",404:"Spain",405:"World Cup",406:"Summer Olympics",407:"Gent - Wevelgem ",408:"Indycar",409:"World Championship",410:"Milano - San Remo",411:"Paris - Nice",412:"Tirreno - Adriatico",413:"China",414:"Summer Olympics",415:"xxx",416:"World Championship",417:"Summer Olympics",418:"Slovakia",420:"Croatia",421:"Paris - Roubaix",422:"Euro Championship",423:"Faroe Islands",424:"Czech",425:"Brazil",426:"European Games",427:"xxx",428:"Fed Cup",429:"Amstel Gold Race",430:"Slovakia",431:"Uruguay",432:"La Fleche Wallonne",433:"Russia",434:"World League",435:"Super Series Premier",436:"Czech",437:"Summer Olympics",438:"SuperStar",439:"Tournaments",440:"World Team Cup",441:"World Championship",442:"International",443:"EHF Cup",444:"Juniors",445:"La Vuelta a Espana",446:"Switzerland",447:"Tour de Suisse",449:"Vattenfall Cyclassics",451:"Tour de Pologne",452:"Liege-Bastogne-Liege",453:"Il Lombardia ",454:"Rapid match",455:"Serbia",456:"World Cup",457:"World Cup",458:"Euro Championship",459:"Tour de Romandie",460:"National Championships",461:"CC San Sebastian",462:"World Championship",463:"India",465:"xxx",466:"World Tour",467:"World Challenge",468:"xxx",469:"xxx",470:"xxx",471:"Youth Tournaments",472:"EuroHockey Champ.",473:"xxx",474:"World Championship",475:"Special Bets",476:"England",477:"Champions League",478:"World Championship",479:"World Championship",480:"Euro Championship",481:"Adriatic League",482:"xxx",483:"xxx",484:"xxx",485:"Euro Championship",486:"Finland",487:"Bangladesh - One Day",488:"World Championship",489:"Euro Championship",490:"China",491:"xxx",492:"xxx",493:"Luge - Women",494:"Euro Championship",495:"World Championship",497:"Cup Winners",498:"Challenge Cup",499:"World Championship",500:"World Cup",501:"Soccer",502:"xxx",503:"xxx",504:"Malta",505:"Tournaments - Q",506:"International",507:"World Championship",508:"Summer Olympics",509:"Euro Championship",510:"World Championship",511:"European Tour",512:"PGA Tour",513:"xxx",514:"Denmark",515:"International",516:"Germany",517:"International",519:"England",520:"Hurling",521:"Football",522:"Cyprus",523:"Netherlands",524:"Germany",525:"Russia",526:"International",527:"England",528:"International",529:"India",530:"Olympic Qual.",531:"Sudirman Cup",532:"Russia",533:"Centrobasket Champ.",534:"Hungary",535:"Ice Hockey",537:"Super Series",538:"Champions Trophy",539:"South American Cham.",540:"USA",541:"Italy",542:"International",543:"World Cup",544:"xxx",545:"Winter Olympics",546:"World Championship",547:"World Championships",548:"International",549:"xxx",550:"Spain",551:"Grand Prix",552:"President El. (SVK)",553:"Singapore",554:"Portugal",555:"Mexico",556:"Presidents Cup",557:"Germany",558:"xxx",559:"Euro Championship",560:"South Korea",561:"British Open 2011",562:"China",563:"European Athletics Indoor Championships (Pra
1ha)",564:"World Championships",565:"Euro Championship",566:"Belarus",567:"Poland",568:"Italy",569:"England",570:"Oscar Academy Awards",571:"Egypt",572:"US Masters 2012",573:"Communal El. (SVK)",574:"xxx",575:"World Championship",576:"England",577:"Oman",578:"Iran",579:"UCI World Cup",580:"Czech",581:"Marathon",582:"Rwanda",583:"xxx",584:"Candidates Matches 2014",585:"xxx",586:"xxx",596:"Poland",597:"Africa Championship",598:"Americas Champ.",599:"World Cup",600:"Asia Championship",601:"Slovenia",602:"Sweden",603:"MMA",604:"Algeria",605:"Saudi Arabia",606:"South Korea",607:"Finland",608:"Costa Rica",609:"Youth Olympics",610:"Africa Championship",611:"Azerbaijan",612:"United Arab Emirates",613:"Qatar",614:"Indonesia",615:"Summer Olympics",616:"Summer Olympics",617:"Summer Olympics",618:"Summer Olympics",620:"Summer Olympics",621:"Summer Olympics",622:"Summer Olympics",623:"Summer Olympics",624:"Summer Olympics",625:"Summer Olympics",630:"Summer Olympics",631:"Malaysia",632:"European Games",633:"Summer Olympics",634:"Summer Olympics",636:"Summer Olympics",637:"Summer Olympics",638:"Summer Olympics",639:"Summer Olympics",640:"Summer Olympics",642:"Ice Hockey - Men",643:"Biathlon - Women",644:"Biathlon - Men",645:"Winter Olympics",646:"Alpine - Women",647:"Alpine - Men",648:"Cross Count.- Women",649:"Cross Count.- Men",650:"Nordic Comb.-Men",651:"Ski Jumping - Women",652:"Ski Jumping - Men",653:"Bobsleigh - Women",654:"Bobsleigh - Men",655:"Skeleton - Women",656:"Skeleton - Men",657:"Cr.Country - Men",658:"Cr.Country - Women",659:"Nord.Combined - Men",660:"Ski Jumping - Men",661:"Ski Jumping - Women",662:"Summer Universiade",663:"Summer Universiade",665:"Biathlon - Mixed",667:"Finland",668:"WCH Alpine Skiing",669:"Russia",670:"Canada",671:"Soccer",672:"Ice Hockey",673:"CEV Cup",674:"xxx",675:"Basketball",676:"xxx",679:"Motor Sport - F1",680:"WCH Biathlon",681:"WCH Luge",682:"Euro Championship",683:"E3 Harelbeke ",684:"World Championship",685:"WTA 125s",686:"Tennis",687:"Venezuela",688:"European Tour",689:"Euro Championship",690:"Ski Jumping - Mixed",692:"PSA International",693:"World Championship",694:"Oceania Championship",695:"Turkey",696:"South Korea",697:"Denmark",698:"Tour of Flanders ",699:"GP Ouest France - Plouay",700:"GP Cycliste de Québec ",701:"GP Cycliste de Montréal ",703:"Singles Doubles",704:"World Series",705:"Special Bets",706:"Mediterranean Games",707:"Mediterranean Games",708:"Mediterranean Games",709:"Mediterranean Games",710:"Mediterranean Games",711:"Mediterranean Games",712:"Mediterranean Games",713:"Mediterranean Games",716:"Critérium du Dauphiné",717:"Slovakia",719:"SVK/CZE National Championships",720:"Kazakhstan",721:"Summer Universiade",722:"Summer Universiade",723:"Summer Universiade",724:"Australia",725:"Puerto Rico",726:"Eneco Tour",727:"World Grand Prix",728:"England",729:"Belgium",730:"Estonia",731:"Lithuania",732:"Israel",733:"Latvia",734:"Norway",735:"Netherlands",736:"Switzerland",737:"Iceland",738:"Ukraine",739:"Portugal",740:"Ireland",741:"Romania",742:"Bulgaria",743:"Philippines",744:"Hungary",745:"Japan",746:"Belarus",747:"Canada",748:"International Women",749:"Macedonia",750:"Montenegro",751:"Bosnia Herzegovina",752:"Group Stage",753:"Kazakhstan",755:"Cyprus",756:"International",757:"Luge - Mixed",758:"Indonesia",759:"xxx",760:"New Zealand",761:"Ice Hockey - Women",762:"Hungary",763:"Brazil",764:"Romania",765:"Argentina",766:"ITF Men",767:"Morocco",768:"World Championship",770:"Hungary",771:"Dwars door Vlaanderen",772:"Scheldeprijs",773:"xxx",774:"xxx",775:"Euro Championship",776:"Serbia",777:"FIFA Club World Cup",778:"Croatia",779:"Peru",780:"Grand Prix Gold",783:"WCH - IIHF",784:"Commonwealth Games",785:"Commonwealth Games",786:"Commonwealth Games",787:"Commonwealth Games",788:"Commonwealth Games",789:"Commonwealth Games",790:"
1Commonwealth Games",791:"World Championship",794:"Commonwealth Games",795:"xxx",796:"Copa Libertadores",797:"xxx",798:"Summer Universiade",799:"Sweden",800:"Summer Universiade",801:"European Games",802:"xxx",804:"Turkey",806:"Jordan",807:"World Chess Olympiad",812:"Summer Youth OG",818:"Summer Youth OG",819:"Summer Youth OG",820:"Summer Youth OG",827:"Denmark",828:"Uruguay",829:"Champions League",830:"Kazakhstan",831:"Israel",832:"World League",833:"Champions Challenge",834:"Africa Cup of Nat.",835:"Copa America",837:"Beauty Contests",838:"Champions League",839:"Europa League",840:"Knockout Stage",841:"Tournament",842:"Standing",843:"Placement",844:"xxx",845:"League",846:"Cup",847:"Tennis",848:"Bahrain",849:"Philippines",850:"Ice Hockey",851:"Honduras",852:"Finland",853:"Mexico",854:"India",855:"Friendlies",856:"Denmark",857:"Belgium",858:"Bulgaria",859:"Challenge Cup",860:"World League",861:"Champions League",862:"European League",863:"World Cup",864:"IPTL",865:"Basketball",866:"Handball",867:"Volleyball",868:"Slovakia",869:"Euro Hockey League",870:"xxx",871:"Nations Trophy",872:"AFC Asian Cup",873:"Italy",874:"Formula E",875:"Compass",876:"Serbia",877:"NHL All-Star",878:"CONCACAF Gold Cup",879:"FIFA U20 World Cup",880:"FIFA U17 World Cup",881:"UEFA U21 Euro",882:"UEFA U19 Euro",883:"UEFA U17 Euro",884:"Asian Games",885:"Asian Games",886:"Asian Games",887:"Asian Games",888:"Asian Games",889:"Asian Games",890:"Asian Games",891:"Asian Games",892:"Asian Games",893:"Asian Games",894:"Pan American Games",895:"Pan American Games",896:"Pan American Games",897:"Pan American Games",898:"Pan American Games",899:"Pan American Games",900:"Pan American Games",901:"Pan American Games",902:"Pan American Games",903:"Pan American Games",904:"Pan American Games",905:"Pan American Games",906:"Denmark",907:"European Games",908:"European Games",909:"European Games",910:"Greece",911:"Finland",913:"Summer Olympics",914:"European Games",915:"European Games",916:"European Games",917:"European Games",918:"European Games",919:"Hungary",920:"Thailand",921:"FIFA WCH - W",922
1:"xxx",923:"WCH 2016",924:"Summer Universiade",925:"Asian Games",926:"Armenia",927:"Israel",928:"Uganda",929:"Georgia",930:"San Marino",931:"Panama",932:"Guatemala",933:"Hong Kong",934:"Philippines",935:"Germany",936:"Austria",937:"Qatar",938:"South Korea",939:"European Games",940:"Summer Universiade",941:"Summer Universiade",942:"International",943:"Ukraine",944:"European Games",945:"Summer Olympics",946:"Gibraltar",947:"Syria",948:"Portugal",949:"Slovenia",950:"FIFA WCH - M",951:"Kuwait",952:"Ghana",953:"Croatia",954:"Macau",955:"Portugal",956:"Africa Championship",957:"Asia Championship",958:"World Series",959:"Hong Kong",960:"Cameroon",962:"Australia",963:"Euroleague",964:"Eurocup",965:"EuroChallenge",966:"ABA League",967:"Baltic League",968:"VTB United League",969:"World Cup",970:"World Cup",971:"France",972:"England",973:"Scotland",974:"Georgia",975:"Australia",976:"Italy",977:"South Africa",978:"Wales",979:"International",980:"New Zealand",981:"Romania",982:"Japan",983:"Argentina",984:"Ireland",985:"Australia",986:"England",987:"International",988:"Satellites",989:"International",990:"World Cup",991:"Japan",992:"International Clubs",993:"xxx",994:"USA",995:"Counter-Strike",996:"Dota 2",997:"Starcraft 2",998:"League of Legends",999:"Maldives",1e3:"Uzbekistan",1001:"BBC Sports Personality of the Year",1002:"World Cup 2018, Qualification UEFA",1003:"Euro 2020, Qualification",1004:"Italy",1005:"Germany",1006:"Asia Championship",1007:"Uruguay",1008:"International",1009:"Winter Olympics",1016:"xxx",1017:"Russia",1018:"US Open",1019:"xxx",1020:"USA",1021:"xxx",1022:"Australian Open",1023:"xxx",1024:"Wimbledon",1025:"xxx",1026:"French Open",1027:"NBA",1028:"Puerto Rico",1029:"xxx",1030:"xxx",1031:"Colours",1032:"xxx",1033:"xxx",1034:"xxx",1035:"xxx",1037:"UEFA Futsal Cup",1038:"Georgia",1043:"NFL",1044:"Tour de Ski",1045:"xxx",1046:"xxx",1047:"xxx",1048:"South Africa",1049:"New Zealand",1050:"Ukraine",1052:"Iceland",1053:"Iran",1054:"Iceland",1055:"Argentina",1056:"Kazakhstan",1057:"France",1058:"xxx",1059:"Japan",1060:"Qatar",1061:"Saudi Arabia",1062:"Algeria",1063:"Iran",1064:"USA",1065:"Ukraine",1066:"Nigeria",1067:"Senegal",1068:"International",1069:"Peru",1070:"Ivory Coast",1071:"Draw Euro 2020",1074:"Spain",1075:"BWF Series",1076:"Turkey",1077:"Kuwait",1078:"China",1079:"United Arab Emirates",1080:"Jordan",1081:"Kuwait",1083:"Bahrain",1084:"Saudi Arabia",1085:"Algeria",1086:"United Arab Emirates",1087:"Lebanon",1088:"Azerbaijan",1089:"Belarus",1090:"Bahrain",1091:"Algeria",1092:"Qatar",1093:"Colombia",1094:"Macedonia",1095:"Bosnia and Herzegovina",1096:"Cyprus",1097:"Moldova",1099:"Tunisia",1100:"Bahrain",1101:"Tanzania",1102:"Zambia",1103:"Kenya",1104:"Angola",1105:"Lebanon",1106:"Andorra",1107:"Pakistan",1108:"Palestine",1109:"United Arab Emirates",1110:"Liechtenstein",1111:"Luxembourg",1112:"Belarus",1113:"Estonia",1114:"International Women",1115:"Latvia",1116:"International Women",1117:"International Women",1118:"International Women",1119:"xxx",1120:"xxx",1121:"Croatia",1122:"WCH",1123:"International Women",1124:"World Cup",1125:"TransTasman",1126:"WCH (Field Lacrosse)",1127:"Clubs Women",1128:"Slovakia",1129:"International",1130:"Czech",1131:"International Men",1132:"Canada",1133:"ECH",1134:"WCH",1135:"Italy",1136:"Spain",1137:"International",1138:"ECH",1139:"World Cup",1140:"Tournaments",1141:"England",1143:"Rally",1144:"World Cup",1145:"England",1146:"Belgium",1147:"Netherlands",1148:"International Women",1149:"International Men",1150:"ECH",1151:"Champions Challenge",1152:"World League",1153:"Kuwait",1154:"xxx",1155:"Speedway",1156:"Youth Women",1157:"Youth Men",1158:"Summer Olympics",1159:"South American Championship",1160:"xxx",1161:"xxx",1162:"xxx",1163:"xxx",1164:"xxx",1165:"Summer Olympics",1166:"Asia Championship",1167:"World Cup",1168:"ECH",1169:"Youth Women",1170:"Youth Men",1171:"Germany",1172:"International Men",1173:"Challenger Series",1174:"ECH 2017 (Luxembourg)",1175:"Summer Olympics",1176:"WCH 2017 (Germany)",1177:"WCH Teams 2018 (Sweden)",1178:"France",1179:"ITTF World Tour",1180:"Euro 2020",1181:"Euro 2017 (Netherlands)",1182:"Summer Olympics",1183:"Smart Beach Tour",1184:"FIVB World Tour",1185:"CEV ECH",1186:"WCH",1187:"Satellites",1188:"International Women",1189:"International Men",1190:"Youth Women",1191:"Youth Men",1192:"International Women",1193:"Jordan",1194:"Winter Youth Olympics",1195:"IPTL",1196:"Summer Olympics",1197:"Davis Cup",1198:"Fed Cup",1199:"Hopman Cup",1200:"Summer Olympics",1201:"Youth Women",1202:"Youth Men",1203:"xxx",1204:"Africa Championship",1205:"Ireland",1206:"EHF Cup",1207:"Champions League",1208:"Estonia",1209:"Next President",1210:"Romania",1211:"SuperStar",1212:"Winter Olympics",1213:"Summer Olympics",1214:"NHL Draft",1215:"Oscar 2017",1216:"World Cup",1217:"xxx",1218:"World Cup",1219:"Ireland",1220:"Bosnia and Herzegovina",1221:"XXX",1222:"World Cup",1223:"xxx",1224:"xxx",1225:"World Cup",1226:"Grammy 2017",1227:"Eurovision 2017",1228:"Czech",1229:"xxx",1230:"xxx",1231:"World Cup",1232:"xxx",1233:"xxx",1234:"xxx",1235:"Greyhound Racing",1236:"Horse Racing",1237:"Tennis",1238:"Basketball",1239:"Soccer",1240:"xxx",1241:"xxx",1242:"xxx",1243:"WCH 2019 (Sweden)",1244:"Indonesia",1245:"Kazakhstan",1246:"Clasica de San Sebastian",1247:"xxx",1248:"xxx",1249:"International",1250:"Morocco",1251:"Mayor of London",1252:"UK Referendum",1253:"xxx",1254:"xxx",1255:"xxx",1256:"xxx",1257:"xxx",1258:"xxx",1260:"xxx",1261:"Summer Olympics",1262:"Summer Olympics",1263:"Twenty20 World Cup",1264:"Diamond League",1265:"Marathon",1266:"Slovenia",12
167:"Milan-San Remo",1268:"Tour Down Under",1269:"Paris-Roubaix",1270:"E3 Harelbeke",1271:"Gent-Wevelgem",1272:"Tour of Flanders",1273:"Volta a Catalunya",1274:"Amstel Gold Race",1275:"Tour of the Basque Country",1276:"Paris-Nice",1277:"Tirreno-Adriatico",1278:"Lithuania",1279:"Slovenia",1280:"Criterium du Dauphine",1281:"La Fleche Wallonne",1282:"Tour de Suisse",1283:"Tour de Pologne",1284:"Liege-Bastogne-Liege",1285:"EuroEyes Cyclassics",1286:"GP Ouest-France",1287:"GP de Quebec",1288:"GP de Montreal",1289:"Tour de Romandie",1290:"Eneco Tour",1291:"Il Lombardia",1292:"Scheldeprijs",1293:"WCH 2017 (Norway)",1294:"Tour de France",1295:"Giro dItalia",1296:"Vuelta a Espana",1297:"Tournaments",1298:"International Men",1299:"xxx",1300:"South Korea",1301:"xxx",1302:"xxx",1303:"Canada",1304:"Cyprus",1305:"Lebanon",1306:"xxx",1307:"xxx",1308:"xxx",1309:"xxx",1311:"International Women",1312:"International Men",1313:"WCH",1314:"Winter Olympics",1315:"WCH",1317:"World Cup",1318:"Winter Olympics",1319:"xxx",1320:"World Cup",1321:"WCH",1322:"xxx",1323:"World Cup",1324:"WCH",1325:"xxx",1326:"xxx",1327:"Winter Olympics",1328:"Winter Olympics",1329:"Winter Olympics",1330:"Winter Olympics",1331:"xxx",1332:"Asia Championship",1333:"xxx",1334:"xxx",1335:"Latvia",1336:"Macedonia",1337:"Montenegro",1338:"Confederations Cup 2017",1339:"xxx",1340:"Hong Kong",1341:"xxx",1342:"xxx",1343:"xxx",1344:"Pan American Championship",1345:"Weight Categories",1346:"xxx",1347:"World Cup",1348:"Morocco",1349:"Morocco",1350:"CEV Continental Cup",1351:"Sudan",1352:"Call of Duty",1353:"Counter-Strike",1354:"Dota",1355:"Hearthstone",1356:"Heroes of the Storm",1357:"League of Legends",1358:"Overwatch",1359:"Smite",1360:"StarCraft",1361:"Vainglory",1362:"WarCraft III",1363:"World of Tanks",1364:"Syria",1365:"Vietnam",1366:"England",1367:"xxx",1368:"Malawi",1369:"Kosovo",1370:"Vietnam",1371:"Champions League",1372:"Venezuela",1373:"Halo",1374:"Crossfire",1375:"Hungary",1376:"xxx",1377:"Four Hills Tournament",1378:"xxx",1379:"Nicaragua",1380:"DTM",1381:"Rainbow Six",1382:"Chile",1383:"xxx",1384:"xxx",1385:"xxx",1386:"xxx",1387:"xxx",1388:"AAA",1389:"xxx",1390:"xxx",1391:"xxx",1392:"Romania",1393:"xxx",1394:"xxx",1395:"Default",1396:"",1397:"",1398:"",1399:"",1400:"",1401:"",1402:"Syria",1403:"Venezuela",1404:"",1405:"",1406:"Australia",1407:"xxx",1408:"Colombia",1409:"Cuba",1410:"Czech",1411:"Dominican Republic",1412:"Finland",1413:"France",1414:"Netherlands",1415:"Nicaragua",1416:"Panama",1417:"Puerto Rico",1418:"Russia",1419:"Spain",1420:"Chinese Taipei",1421:"Belgium",1422:"Bulgaria",1423:"Estonia",1424:"Iceland",1425:"Ireland",1426:"Netherlands",1427:"North America",1428:"",1429:"xxx",1430:"Belarus",1431:"Albania",1432:"Australia",1433:"Champions League",1434:"ETTU Cup",1435:"Bosnia and Herzegovina",1436:"Canada",1437:"Chile",1438:"Dominican Republic",1439:"Egypt",1440:"England",1441:"Iceland",1442:"Latvia",1443:"Lithuania",1444:"Luxembourg",1445:"Macau",1446:"Macedonia",1447:"Malta",1448:"Moldova",1449:"Montenegro",1450:"Norway",1451:"Thailand",1452:"Yemen",1453:"Argentina",1454:"Azerbaijan",1455:"Belgium",1456:"Brazil",1457:"Bulgaria",1458:"Cyprus",1459:"Egypt",1460:"England",1461:"xxx",1462:"Georgia",1463:"Iran",1464:"Ireland",1465:"Japan",1466:"Jordan",1467:"Kazakhstan",1468:"Kosovo",1469:"Lebanon",1470:"Lithuania",1471:"Luxembourg",1472:"Malta",1473:"Moldova",1474:"Montenegro",1475:"Netherlands",1476:"Paraguay",1477:"Yemen",1478:"Tunisia",1479:"Albania",1480:"Anguilla",1481:"Barbados",1482:"Chinese Taipei",1483:"Cuba",1484:"World Baseball Classic",1485:"Euro Beach Soccer Cup",1486:"World Cup",1487:"Dominican Republic",1488:"Ecuador",1489:"Egypt",1490:"El Salvador",1491:"Macau",1492:"Madagascar",1493:"Malaysia",1494:"New Zealand",1495:"Nicaragua",1496:"Panama",1497:"Paraguay",1498:"Saudi Arabia",1499:"Scotland",1500:"Singapore",1501:"South Africa",1502:"Tour of Turkey",1503:"Thailand",1504:"Tunisia",1505:"Yemen",1506:"Dwars door Vlaanderen",1507:"London-Surrey Classic",1508:"Great Ocean Road Race",1509:"Tour of Qatar",1510:"Abu Dhabi Tour",1511:"Eschborn-Frankfurt City Loop",1512:"Omloop Het Nieuwsblad",1513:"Strade Bianche",1514:"Tour of California",1515:"xxx",1516:"xxx",1517:"Albania",1518:"Andorra",1519:"Argentina",1520:"Armenia",1521:"Austria",1522:"Azerbaijan",1523:"Belarus",1524:"Belgium",1525:"Bosnia and Herzegovina",1526:"Bulgaria",1527:"China",1528:"Colombia",1529:"Croatia",1530:"Cyprus",1531:"Denmark",1532:"England",1533:"Estonia",1534:"Finland",1535:"France",1536:"Georgia",1537:"Germany",1538:"Gibraltar",1539:"Greece",1540:"Netherlands",1541:"Iceland",1542:"India",1543:"Ireland",1544:"Israel",1545:"Iran",1546:"Kazakhstan",1547:"Latvia",1548:"Lithuania",1549:"Macedonia",1550:"Malta",1551:"Moldova",1552:"Montenegro",1553:"Norway",1554:"Peru",1555:"Poland",1556:"Romania",1557:"Scotland",1558:"Serbia",1559:"Slovakia",1560:"Slovenia",1561:"Sweden",1562:"Switzerland",1563:"Thailand",1564:"Turkey",1565:"Ukraine",1566:"Uruguay",1567:"Vietnam",1568:"Wales",1569:"International Women",1570:"Clubs Women",1571:"International Women",1572:"Gabon",1573:"xxx",1574:"xxx",1575:"Flying",1576:"WCH Juniors 2017 (Italy)",1578:"test33",1579:"BAFTA Awards 2017",1580:"Golden Raspberry 2017",1581:"FIFA Awards 2017",1582:"xxx",1583:"Czech",1584:"Golden Globe",1585:"Asia Mixed Team Championship",1586:"WCH Juniors",1587:"Pan American Championship",1588:"Africa Championship",1589:"ECH Juniors 2017 (Portugal)",1590:"U21 ECH 2017 (Russia)",1591:"",1592:"Default",1593:"International Challenge",1594:"International Series",1595:"Future Series",1596:"Burundi",1597:"xxx",1598:"Syria",1599:"Australia",1600:"Winter Universiade",1601:"Pakistan (One Day)",1602:"Europa Mixed Team Championship",1603:"xxx",1604:"Barbados",1605:"Hong Kong",1606:"Driedaagse De Panne",1607:"xxx",1608:"Youth Women",1609:"Youth Men",1610:"Tajikistan",1611:"International",1612:"Street Fighter"},Emojis:[{reg:new RegExp(/\:\)/g),shortcut:":)",sign:"smile"},{reg:new RegExp(/\:D/g),shortcut:":D",sign:"smiley"},{reg:new RegExp(/\:X/g),shortcut:":X",sign:"no_mouth"},{reg:new RegExp(/\;\)/g),shortcut:";)",sign:"wink"},{reg:new RegExp(/\:O/g),shortcut:":O",sign:"open_mouth"},{reg:new RegExp(/[\:][\(]/g),shortcut:":(",sign:"pensive"},{reg:new RegExp(/\:P/g),shortcut:":P",sign:"stuck_out_tongue"},{reg:new RegExp(/[\:][\/](?!\/)/g),shortcut:":/",sign:"confused"},{reg:new RegExp(/8\)/g),shortcut:"8)",sign:"sunglasses"}]}),(factory=>{"function"==typeof define&&define.amd?define(["jquery"],factory):"object"==typeof module&&module.exports?module.exports=function(root,jQuery){return void 0===jQuery&&(jQuery="undefined"!=typeof window?require("jquery"):require("jquery")(root)),factory(jQuery),jQuery}:factory(jQuery)})(function($){function CircleProgress(config){this.init(config)}
1CircleProgress.prototype={value:0,size:100,startAngle:-Math.PI,thickness:"auto",fill:{gradient:["#3aeabb","#fdd250"]},emptyFill:"rgba(0, 0, 0, .1)",animation:{duration:1200,easing:"circleProgressEasing"},animationStartValue:0,reverse:!1,lineCap:"butt",insertMode:"prepend",constructor:CircleProgress,el:null,canvas:null,ctx:null,radius:0,arcFill:null,lastFrameValue:0,init:function(config){$.extend(this,config),this.radius=this.size/2,this.initWidget(),this.initFill(),this.draw(),this.el.trigger("circle-inited")},initWidget:function(){this.canvas||(this.canvas=$("<canvas>")["prepend"==this.insertMode?"prependTo":"appendTo"](this.el)[0]);var scaleBy,canvas=this.canvas;canvas.width=this.size,canvas.height=this.size,this.ctx=canvas.getContext("2d"),1<window.devicePixelRatio&&(scaleBy=window.devicePixelRatio,canvas.style.width=canvas.style.height=this.size+"px",canvas.width=canvas.height=this.size*scaleBy,this.ctx.scale(scaleBy,scaleBy))},initFill:function(){var img,self=this,fill=this.fill,ctx=this.ctx,size=this.size;if(!fill)throw Error("The fill is not specified!");if((fill="string"==typeof fill?{color:fill}:fill).color&&(this.arcFill=fill.color),fill.gradient){var gr=fill.gradient;if(1==gr.length)this.arcFill=gr[0];else if(1<gr.length){for(var ga=fill.gradientAngle||0,ga=fill.gradientDirection||[size/2*(1-Math.cos(ga)),size/2*(1+Math.sin(ga)),size/2*(1+Math.cos(ga)),size/2*(1-Math.sin(ga))],lg=ctx.createLinearGradient.apply(ctx,ga),i=0;i<gr.length;i++){var color=gr[i],pos=i/(gr.length-1);$.isArray(color)&&(pos=color[1],color=color[0]),lg.addColorStop(pos,color)}this.arcFill=lg}}function setImageFill(){var bg=$("<canvas>")[0];bg.width=self.size,bg.height=self.size,bg.getContext("2d").drawImage(img,0,0,size,size),self.arcFill=self.ctx.createPattern(bg,"no-repeat"),self.drawFrame(self.lastFrameValue)}fill.image&&(fill.image instanceof Image?img=fill.image:(img=new Image).src=fill.image,img.complete?setImageFill():img.onload=setImageFill)},draw:function(){this.animation?this.drawAnimated(this.value):this.drawFrame(this.value)},drawFrame:function(v){this.lastFrameValue=v,this.ctx.clearRect(0,0,this.size,this.size),this.drawEmptyArc(v),this.drawArc(v)},drawArc:function(v){var ctx,r,t,a;0!==v&&(ctx=this.ctx,r=this.radius,t=this.getThickness(),a=this.startAngle,ctx.save(),ctx.beginPath(),this.reverse?ctx.arc(r,r,r-t/2,a-2*Math.PI*v,a):ctx.arc(r,r,r-t/2,a,a+2*Math.PI*v),ctx.lineWidth=t,ctx.lineCap=this.lineCap,ctx.strokeStyle=this.arcFill,ctx.stroke(),ctx.restore())},drawEmptyArc:function(v){var ctx=this.ctx,r=this.radius,t=this.getThickness(),a=this.startAngle;v<1&&(ctx.save(),ctx.beginPath(),v<=0?ctx.arc(r,r,r-t/2,0,2*Math.PI):this.reverse?ctx.arc(r,r,r-t/2,a,a-2*Math.PI*v):ctx.arc(r,r,r-t/2,a+2*Math.PI*v,a),ctx.lineWidth=t,ctx.strokeStyle=this.emptyFill,ctx.stroke(),ctx.restore())},drawAnimated:function(v){var self=this,el=this.el,canvas=$(this.canvas);canvas.stop(!0,!1),el.trigger("circle-animation-start"),canvas.css({animationProgress:0}).animate({animationProgress:1},$.extend({},this.animation,{step:function(animationProgress){var stepValue=self.animationStartValue*(1-animationProgress)+v*animationProgress;self.drawFrame(stepValue),el.trigger("circle-animation-progress",[animationProgress,stepValue])}})).promise().always(function(){el.trigger("circle-animation-end")})},getThickness:function(){return $.isNumeric(this.thickness)?this.thickness:this.size/14},getValue:function(){return this.value},setValue:function(newValue){this.animation&&(this.animationStartValue=this.lastFrameValue),this.value=newValue,this.draw()}},$.circleProgress={defaults:CircleProgress.prototype},$.easing.circleProgressEasing=function(x,t,b,c,d){return(t/=d/2)<1?c/2*t*t*t+b:c/2*((t-=2)*t*t+2)+b},$.fn.circleProgress=function(configOrCommand,commandArgument){var newValue,dataName="circle-progress",firstInstance=this.data(dataName);if("widget"==configOrCommand){if(firstInstance)return firstInstance.canvas;throw Error('Calling "widget" method on not initialized instance is forbidden')}if("value"!=configOrCommand)return this.each(function(){var initialConfig,el=$(this),instance=el.data(dataName),config=$.isPlainObject(configOrCommand)?configOrCommand:{};instance?instance.init(config):("string"==typeof(initialConfig=$.extend({},el.data())).fill&&(initialConfig.fill=JSON.parse(initialConfig.fill)),"string"==typeof initialConfig.animation&&(initialConfig.animation=JSON.parse(initialConfig.animation)),(config=$.extend(initialConfig,config)).el=el,instance=new CircleProgress(config),el.data(dataName,instance))});if(firstInstance)return void 0===commandArgument?firstInstance.getValue():(newValue=commandArgument,this.each(function(){$(this).data(dataName).setValue(newValue)}));throw Error('Calling "value" method on not initialized instance is forbidden')}}),angular.module("sportbookApp",["environment","angular.filter","ngSanitize","LocalStorageModule","ngCookies","ngAnimate","ngRoute","ngEmoticons","xml","dictionary","sportbookApp.service","sportbookApp.filters","sportbookApp.directives","external","landing","offer","offerWrapper","virtual","dynamic","sidebar","ticket","results","analysis","search","news","banner","nolive","analysisHistory","bonuses","stream"]).provider("routes",function($routeProvider,Environment){var routes=Environment.routes;this.$get=function($http){return{initialize:function(){var routesOld;return routesOld=Environment.routesOld,recreateSearch=function(searchObj,addObj){var ret="";
1return searchObj&&_.keys(searchObj).forEach(function(key){ret+=(0===ret.length?"?":"&")+key+"="+searchObj[key]}),addObj&&_.keys(addObj).forEach(function(key){ret+=(0===ret.length?"?":"&")+key+"="+addObj[key]}),ret},_.mapObject(routes,function(singleRoutes,key){$routeProvider.when("/"+key,{templateUrl:"landing.html",controller:"LandingController",reloadOnSearch:!1,resolve:{langRedirect:function(){return!1},resolveFunction:function(){return!1}}}).when("/"+key+"/"+singleRoutes.club,{templateUrl:"landing.html",controller:"LandingController",reloadOnSearch:!1,resolve:{langRedirect:function(){return!0},resolveFunction:function(){return"club"}}}).when("/"+key+"/"+singleRoutes.respvirtual+"/:sport/:region",{redirectTo:function(routeParams,path,search){return"/"+key+"/"+singleRoutes.virtual+"/"+routeParams.sport+"/"+routeParams.region+recreateSearch(search)}}).when("/"+key+"/"+singleRoutes.offer+"/"+singleRoutes.virtual+"/:sport/:region",{redirectTo:function(routeParams,path,search){return"/"+key+"/"+singleRoutes.virtual+"/"+routeParams.sport+"/"+routeParams.region+recreateSearch(search)}}).when("/"+key+"/"+singleRoutes.respvirtualdetail+"/:sport/:region/:eventid/:eventname",{redirectTo:function(routeParams,path,search){return"/"+key+"/"+singleRoutes.virtual+"/"+routeParams.sport+"/"+routeParams.region+recreateSearch(search,{event:routeParams.eventid})}}).when("/"+key+"/"+singleRoutes.offer+"/:sport?/:region?/:league?",{templateUrl:"offerWrapper.html",controller:"OfferWrapperController",reloadOnSearch:!1,resolve:{routeLive:function(){return!1},routeName:function(){return singleRoutes.offer}}}).when("/"+key+"/"+singleRoutes.live+"/:sport?/:region?/:league?",{templateUrl:"offerWrapper.html",controller:"OfferWrapperController",reloadOnSearch:!1,resolve:{routeLive:function(){return!0},routeName:function(){return singleRoutes.live}}}).when("/"+key+"/event/:sport/:region/:league/:event",{redirectTo:function(routeParams,path,search){return"/"+key+"/"+("sk"===key?"sportove-tipovanie":"sports-betting")+"/"+routeParams.sport+"/"+routeParams.region+"/"+routeParams.league+"/?event="+routeParams.event}}).when("/"+key+"/:type/:sport/:region/:league/:event/:eventname",{redirectTo:function(routeParams,path,search){return"/"+key+"/"+routeParams.type+"/"+routeParams.sport+"/"+routeParams.region+"/"+routeParams.league+"/?event="+routeParams.event+"&name="+routeParams.name+(search.date?"&date="+search.date:"")}}).when("/"+key+"/:type/:sport/:region/:event/:eventname",{redirectTo:function(routeParams,path,search){return"/"+key+"/"+routeParams.type+"/"+routeParams.sport+"/"+routeParams.region+"/?event="+routeParams.event+"&name="+routeParams.name}}).when("/"+key+"/event/:event",{redirectTo:function(routeParams,path,search){return"/"+key+"/"+("sk"===key?"sportove-tipovanie":"sports-betting")+"?event="+routeParams.event}}).when("/"+key+"/"+singleRoutes.nolive,{templateUrl:"nolive.html",controller:"NoLiveController",reloadOnSearch:!1,resolve:{routeName:function(){return singleRoutes.nolive},errorType:function(){return"live"}}}).when("/"+key+"/"+singleRoutes.noprematch,{templateUrl:"nolive.html",controller:"NoLiveController",reloadOnSearch:!1,resolve:{routeName:function(){return singleRoutes.noprematch},errorType:function(){return"prematch"}}}).when("/"+key+"/"+singleRoutes.noresults,{templateUrl:"nolive.html",controller:"NoLiveController",reloadOnSearch:!1,resolve:{routeName:function(){return singleRoutes.noresults},errorType:function(){return"results"}}}).when("/"+key+"/"+singleRoutes.novirtual,{templateUrl:"nolive.html",controller:"NoLiveController",reloadOnSearch:!1,resolve:{routeName:function(){return singleRoutes.novirtual},errorType:function(){return"virtual"}}}).when("/"+key+"/"+singleRoutes.virtual+"/:sport?/:region?",{templateUrl:"virtual.html",controller:"VirtualController",reloadOnSearch:!1,resolve:{routeName:function(){return singleRoutes.virtual}}}).when("/"+key+"/"+singleRoutes.results+"/:sport?/:region?/:league?",{templateUrl:"results.html",controller:"ResultsController",reloadOnSearch:!1,resolve:{routeName:function(){return singleRoutes.results}}}).when("/"+key+"/"+singleRoutes.dynamic,{templateUrl:"bonuses.html",controller:"BonusesController",reloadOnSearch:!1,resolve:{routeName:function(){return singleRoutes.dynamic},menuTitle:function(){return"Betting_Bonusy"},bonusType:function(){return"betting"}}}).when("/"+key+"/kasino/kasino-online/bonusy-a-akcie",{templateUrl:"bonuses.html",controller:"BonusesController",reloadOnSearch:!1,resolve:{routeName:function(){return"special-offers"},menuTitle:function(){return"Casino_Bonuses"},bonusType:function(){return"casino"}}}).when("/"+key+"/casino/casino-online/special-offers",{templateUrl:"bonuses.html",controller:"BonusesController",reloadOnSearch:!1,resolve:{routeName:function(){return"special-offers"},menuTitle:function(){return"Casino_Bonuses"},bonusType:function(){return"casino"}}}).when("/"+key+"/"+singleRoutes.dynamic+"/:name",{templateUrl:"dynamic.html",controller:"DynamicController",reloadOnSearch:!1,resolve:{routeName:function(){return singleRoutes.dynamic},menuTitle:function(){return"Betting_Bonusy"}}}).when("/"+key+"/"+singleRoutes.subpages+"/:name",{templateUrl:"dynamic.html",controller:"DynamicController",reloadOnSearch:!1,resolve:{routeName:function(){return singleRoutes.subpages},menuTitle:function(){return!1}}}).when("/"+key+"/"+singleRoutes.sportnews+"/:name?",{templateUrl:"dynamic.html",controller:"DynamicController",reloadOnSearch:!1,resolve:{routeName:function(){return singleRoutes.sportnews},menuTitle:function(){return"News"}}}).when("/"+key+"/"+singleRoutes.actualities,{templateUrl:"actualities.html",controller:"NewsController",reloadOnSearch:!1,resolve:{routeName:function(){return singleRoutes.actualities},menuTitle:function(){return"News"}}}).when("/"+key+"/"+singleRoutes.actualities+"/:name",{templateUrl:"dynamic.html",controller:"DynamicController",reloadOnSearch:!1,resolve:{routeName:function(){return singleRoutes.actualities},menuTitle:function(){return"News"}}}).when("/"+key+"/"+singleRoutes.faq+"/:name?",{templateUrl:"dynamic.html",controller:"DynamicController",reloadOnSearch:!1,resolve:{routeName:function(){return singleRoutes.faq},menuTitle:function(){return"faq"}}}).when("/"+key+"/"+singleRoutes.aboutus+"/:name?",{templateUrl:"dynamic.html",controller:"DynamicController",reloadOnSearch:!1,resolve:{routeName:function(){return singleRoutes.aboutus},menuTitle:function(){return"AboutUs"}}}).when("/"+key+"/"+singleRoutes.agent,{templateUrl:"dynamic.html",controller:"DynamicController",reloadOnSearch:!1,resolve:{routeName:function(){return singleRoutes.agent},menuTitle:function(){return"agent"}}}).when("/"+key+"/"+singleRoutes.career,{templateUrl:"dynamic.html",controller:"DynamicController",reloadOnSearch:!1,resolve:{routeName:function(){return singleRoutes.career},menuTitle:function(){return"Career"}}}).when("/"+key+"/"+singleRoutes.betforum+"/:postid?",{templateUrl:"dynamic.html",controller:"DynamicController",reloadOnSearch:!0,resolve:{routeName:function(){return singleRoutes.betforum},menuTitle:function(){return"Betting_Betforum"}}}).when("/"+key+"/"+singleRoutes.affiliate,{templateUrl:"dynamic.html",controller:"DynamicController",reloadOnSearch:!0,resolve:{routeName:function(){return singleRoutes.affiliate},menuTitle:function(){return"Affiliate"}}}).when("/"+key+"/"+singleRoutes.ticketoftheday+"/:ticketcode?",{templateUrl:"dynamic.html",controller:"DynamicController",reloadOnSearch:!1,resolve:{routeName:function(){return singleRoutes.ticketoftheday},menuTitle:function(){return!1}}}).when("/"+key+"/"+singleRoutes.analyses+"/:date?/:page?",{templateUrl:"analysisHistory.html",controller:"AnalysisHistoryController",reloadOnSearch:!1,resolve:{routeName:function(){return singleRoutes.analyses},showSingle:function(){return!1}}}).when("/"+key+"/"+singleRoutes.analysis+"/:id",{templateUrl:"analysisHistory.html",controller:"AnalysisHistoryController",reloadOnSearch:!1,resolve:{routeName:function(){return singleRoutes.analysis},showSingle:function(){return!0}}}).when("/"+key+"/kasino/:casinoParams*?",{redirectTo:function(routeParam
1s){window.location=window.location.origin+"/"+key+"/kasino/"+routeParams.casinoParams+window.location.search}}).when("/"+key+"/casino/:casinoParams*?",{redirectTo:function(routeParams){window.location=window.location.origin+"/"+key+"/casino/"+routeParams.casinoParams+window.location.search}}).when("/"+key+"/live-casino",{redirectTo:function(routeParams){window.location=window.location.origin+"/"+key+"/live-casino"+window.location.search}}).when("/"+key+"/"+routesOld[key].offer+"/:sport?/:region?/:league?",{redirectTo:function(routeParams,path,search){return path.replace(routesOld[key].offer,routes[key].offer)+recreateSearch(search)}}).when("/"+key+"/"+routesOld[key].live+"/:sport?/:region?/:league?",{redirectTo:function(routeParams,path,search){return path.replace(routesOld[key].live,routes[key].live)+recreateSearch(search)}}).when("/"+key+"/"+routesOld[key].results+"/:sport?/:region?/:league?",{redirectTo:function(routeParams,path,search){return path.replace(routesOld[key].results,routes[key].results)+recreateSearch(search)}}).when("/"+key+"/"+routesOld[key].virtual+"/:sport?/:region?",{redirectTo:function(routeParams,path,search){return path.replace(routesOld[key].virtual,routes[key].virtual)+recreateSearch(search)}}).when("/"+key+"/"+routesOld[key].dynamic+"/:name?",{redirectTo:function(routeParams,path,search){return path.replace(routesOld[key].dynamic,routes[key].dynamic)+recreateSearch(search)}}).when("/"+key+"/"+routesOld[key].actualities+"/:name?",{redirectTo:function(routeParams,path,search){return path.replace(routesOld[key].actualities,routes[key].actualities)+recreateSearch(search)}}).when("/"+key+"/"+routesOld[key].ticketoftheday+"/:ticketcode?",{redirectTo:function(routeParams,path,search){return path.replace(routesOld[key].ticketoftheday,routes[key].ticketoftheday)+recreateSearch(search)}}).when("/"+key+"/"+routesOld[key].analyses+"/:date?/:page?",{redirectTo:function(routeParams,path,search){return path.replace(routesOld[key].analyses,routes[key].analyses)+recreateSearch(search)}}).when("/"+key+"/"+routesOld[key].analysis+"/:id",{redirectTo:function(routeParams,path,search){return path.replace(routesOld[key].analysis,routes[key].analysis)+recreateSearch(search)}}).when("/"+key+"/"+routesOld[key].betforum+"/:postid?",{redirectTo:function(routeParams,path,search){return path.replace(routesOld[key].betforum,routes[key].betforum)+recreateSearch(search)}}).when("/"+key+"/"+routesOld[key].club,{redirectTo:function(routeParams,path,search){return path.replace(routesOld[key].club,routes[key].club)+recreateSearch(search)}}).otherwise({templateUrl:"landing.html",controller:"LandingController",resolve:{langRedirect:function(){return!0},resolveFunction:function(){return!1}}})}),new Promise(function(){})}}}}).config(function(localStorageServiceProvider,$httpProvider,$locationProvider,$animateProvider,Environment){localStorageServiceProvider.setPrefix("doxxbet").setStorageType("localStorage"),$httpProvider.interceptors.push("requestInterceptor"),$httpProvider.interceptors.push("xmlHttpInterceptor"),$locationProvider.html5Mode({enabled:!0});Environment.routes;$animateProvider.classNameFilter(/enable_animation/)}).factory("requestInterceptor",["$q","$injector","$rootScope","$timeout","$interval","$sce","$filter",function($q,$injector,$rootScope,$timeout,$interval,$sce,$filter){return{request:function(config){return config},response:function(response){return response},requestError:function(requestError){return requestError},responseError:function(responseError){throw responseError.status&&404==responseError.status&&($rootScope.Ticket&&$rootScope.Ticket.strErrors?1==$rootScope.Ticket.strErrors.length&&$rootScope.Ticket.strErrors[0]===$rootScope.Lang.App.network_error||(UIkit.notify({message:$rootScope.Lang.App.network_error,status:"danger",timeout:3e3,pos:"top-center"}),$rootScope.Ticket.strErrors=[$rootScope.Lang.App.network_error],$timeout(function(){1==$rootScope.Ticket.strErrors.length&&$rootScope.Ticket.strErrors[0]===$rootScope.Lang.App.network_error&&($rootScope.Ticket.strErrors=[])}
1,3e3)):UIkit.notify({message:$rootScope.Lang.App.network_error,status:"danger",timeout:3e3,pos:"top-center"})),responseError}}}]).run(function($rootScope,$q,Dictionary,Environment,AppService,BonusesService,MyAccountService,localStorageService,$cookies,$templateCache,$sce,$timeout,$interval,$location,$window,$filter,routes,$route){function loadRetarget34655(){var scr=document.createElement("script");scr.setAttribute("async","true"),scr.type="text/javascript",scr.src="//sk.search.etargetnet.com/j/?h=cec9f30794b27224",((document.getElementsByTagName("head")||[null])[0]||document.getElementsByTagName("script")[0].parentNode).appendChild(scr)}routes.initialize().then(function(){$route.reload()}),window.addEventListener?window.addEventListener("load",loadRetarget34655):window.attachEvent&&window.attachEvent("onload",loadRetarget34655),$rootScope.Dictionary=Dictionary,$rootScope.goldenJackpot=0,$rootScope.tcConfig={ticket:{acceptedRateChange:{all:!1,none:!1,up:!1},errorsTimeout:5e3},fee:{accepted:!0},delta:{intervals:{live:5e3,prematch:3e4}}},$rootScope.isWinCurrencyTicket=!1,$rootScope.goldenLabel="",$rootScope.OpenedArticle=null,$rootScope.DynamicPage=null,$rootScope.AnalysisArray=[],$rootScope.CommentsEnabled=!1,$rootScope.LabelsLoaded=!1,$rootScope.FooterHeight=0,$rootScope.GreedyLoaded=!1,$rootScope.toLoadSport=null,$rootScope.toLoadRegion=null,$rootScope.toLoadLeague=null,$rootScope.toLoadEvent=null,$rootScope.promoBanner=null,$rootScope.hideFooter=!1,$rootScope.StatKeys={},$rootScope.buybackSignalrViews=[],$rootScope.tcConfig={ticket:{acceptedRateChange:{all:!1,none:!1,up:!1},errorsTimeout:5e3},fee:{accepted:!0},delta:{intervals:{live:5e3,prematch:3e4}}},$rootScope.visibility={HIDE:0,LOCK:1,SHOW:2},$rootScope.ectStatusMatrix={active:{active:{active:$rootScope.visibility.SHOW,suspended:$rootScope.visibility.LOCK,closed:$rootScope.visibility.HIDE},suspended:{active:$rootScope.visibility.SHOW,suspended:$rootScope.visibility.HIDE,closed:$rootScope.visibility.HIDE},closed:{active:$rootScope.visibility.SHOW,suspended:$rootScope.visibility.HIDE,closed:$rootScope.visibility.HIDE}},all:{active:{active:$rootScope.visibility.SHOW,suspended:$rootScope.visibility.LOCK,closed:$rootScope.visibility.HIDE},suspended:{active:$rootScope.visibility.SHOW,suspended:$rootScope.visibility.LOCK,closed:$rootScope.visibility.HIDE},closed:{active:$rootScope.visibility.SHOW,suspended:$rootScope.visibility.HIDE,closed:$rootScope.visibility.HIDE}},other:{active:{active:$rootScope.visibility.SHOW,suspended:$rootScope.visibility.LOCK,closed:$rootScope.visibility.HIDE},suspended:{active:$rootScope.visibility.SHOW,suspended:$rootScope.visibility.HIDE,closed:$rootScope.visibility.HIDE},closed:{active:$rootScope.visibility.SHOW,suspended:$rootScope.visibility.HIDE,closed:$rootScope.visibility.HIDE}},locked:{active:{active:$rootScope.visibility.LOCK,suspended:$rootScope.visibility.LOCK,closed:$rootScope.visibility.HIDE},suspended:{active:$rootScope.visibility.LOCK,suspended:$rootScope.visibility.LOCK,closed:$rootScope.visibility.HIDE},closed:{active:$rootScope.visibility.LOCK,suspended:$rootScope.visibility.LOCK,closed:$rootScope.visibility.HIDE}}},$rootScope.oddStatusMatrix={active:{active:{active:$rootScope.visibility.SHOW,suspended:$rootScope.visibility.LOCK,closed:$rootScope.visibility.HIDE,inactive:$rootScope.visibility.HIDE,canceled:$rootScope.visibility.HIDE},suspended:{active:$rootScope.visibility.SHOW,suspended:$rootScope.visibility.HIDE,closed:$rootScope.visibility.HIDE,inactive:$rootScope.visibility.HIDE,canceled:$rootScope.visibility.HIDE},closed:{active:$rootScope.visibility.SHOW,suspended:$rootScope.visibility.HIDE,closed:$rootScope.visibility.HIDE,inactive:$rootScope.visibility.HIDE,canceled:$rootScope.visibility.HIDE},inactive:{active:$rootScope.visibility.SHOW,suspended:$rootScope.visibility.HIDE,closed:$rootScope.visibility.HIDE,inactive:$rootScope.visibility.HIDE,canceled:$rootScope.visibility.HIDE},canceled:{active:$rootScope.visibility.SHOW,suspended:$rootScope.visibility.HIDE,closed:$rootScope.visibility.HIDE,inactive:$rootScope.visibility.HIDE,canceled:$rootScope.visibility.HIDE}},all:{active:{active:$rootScope.visibility.SHOW,suspended:$rootScope.visibility.LOCK,closed:$rootScope.visibility.HIDE,inactive:$rootScope.visibility.HIDE,canceled:$rootScope.visibility.HIDE},suspended:{active:$rootScope.visibility.SHOW,suspended:$rootScope.visibility.LOCK,closed:$rootScope.visibility.HIDE,inactive:$rootScope.visibility.HIDE,canceled:$rootScope.visibility.HIDE},closed:{active:$rootScope.visibility.SHOW,suspended:$rootScope.visibility.HIDE,closed:$rootScope.visibility.HIDE,inactive:$rootScope.visibility.HIDE,canceled:$rootScope.visibility.HIDE},inactive:{active:$rootScope.visibility.SHOW,suspended:$rootScope.visibility.HIDE,closed:$rootScope.visibility.HIDE,inactive:$rootScope.visibility.HIDE,canceled:$rootScope.visibility.HIDE},canceled:{active:$rootScope.visibility.SHOW,suspended:$rootScope.visibility.HIDE,closed:$rootScope.visibility.HIDE,inactive:$rootScope.visibility.HIDE,canceled:$rootScope.visibility.HIDE}},other:{active:{active:$rootScope.visibility.SHOW,suspended:$rootScope.visibility.LOCK,closed:$rootScope.visibility.HIDE,inactive:$rootScope.visibility.HIDE,canceled:$rootScope.visibility.HIDE},suspended:{active:$rootScope.visibility.SHOW,suspended:$rootScope.visibility.HIDE,closed:$rootScope.visibility.HIDE,inactive:$rootScope.visibility.HIDE,canceled:$rootScope.visibility.HIDE},closed:{active:$rootScope.visibility.SHOW,suspended:$rootScope.visibility.HIDE,closed:$rootScope.visibility.HIDE,inactive:$rootScope.visibility.HIDE,canceled:$rootScope.visibility.HIDE},inactive:{active:$rootScope.visibility.SHOW,suspended:$rootScope.visibility.HIDE,closed:$rootScope.visibility.HIDE,inactive:$rootScope.visibility.HIDE,canceled:$rootScope.visibility.HIDE},canceled:{active:$rootScope.visibility.SHOW,suspended:$rootScope.visibility.HIDE,closed:$rootScope.visibility.HIDE,inactive:$rootScope.visibility.HIDE,canceled:$rootScope.visibility.HIDE}},locked:{active:{active:$rootScope.visibility.HIDE,suspended:$rootScope.visibility.LOCK,closed:$rootScope.visibility.LOCK,inactive:$rootScope.visibility.HIDE,canceled:$rootScope.visibility.HIDE},suspended:{active:$rootScope.visibility.HIDE,suspended:$rootScope.visibility.LOCK,closed:$rootScope.visibility.LOCK,inactive:$rootScope.visibility.HIDE,canceled:$rootScope.visibility.HIDE},closed:{active:$rootScope.visibility.HIDE,suspended:$rootScope.visibility.LOCK,closed:$rootScope.visibility.LOCK,inactive:$rootScope.visibility.HIDE,canceled:$rootScope.visibility.HIDE},inactive:{active:$rootScope.visibility.HIDE,suspended:$rootScope.visibility.LOCK,closed:$rootScope.visibility.LOCK,inactive:$rootScope.visibility.HIDE,canceled:$rootScope.visibility.HIDE},canceled:{active:$rootScope.visibility.HIDE,suspended:$rootScope.visibility.LOCK,closed:$rootScope.visibility.LOCK,inactive:$rootScope.visibility.HIDE,canceled:$rootScope.visibility.HIDE}}},$rootScope.getEctVisibility=function(groupID,oldStatus,newStatus,isEventLocked){return-1===["all","active","locked"].indexOf(groupID)&&(groupID="other"),void 0===$rootScope.ectStatusMatrix[groupID]||void 0===$rootScope.ectStatusMatrix[groupID][oldStatus]||void 0===$rootScope.ectStatusMatrix[groupID][oldStatus][newStatus]?$rootScope.visibility.HIDE:(groupID=$rootScope.ectStatusMatrix[isEventLocked&&"locked"===groupID?"all":groupID][oldStatus][newStatus],isEventLocked&&groupID===$rootScope.visibility.SHOW&&groupID--,groupID)},$rootScope.getOddVisibility=function(groupID,oldStatus,newStatus,isEventLocked){return newStatus=newStatus||"active",oldStatus=oldStatus||newStatus,-1===["all","active","locked"].indexOf(groupID)&&(groupID="other"),void 0===$rootScope.oddStatusMatrix[groupID]||void 0===$rootScope.oddStatusMatrix[groupID][oldStatus]||void 0===$rootScope.oddStatusMatrix[groupID][oldStatus][newStatus]?$rootScope.visibility.HIDE:(groupID=$rootScope.oddStatusMatrix[isEventLocked&&"locked"===groupID?"all":groupID][oldStatus][newStatus],isEventLocked&&groupID===$rootScope.visibility.SHOW&&groupID--,groupID)},$rootScope.correctingRedirect=!1,$rootScope.ENV=Environment,$rootScope.IsClientLoggedIn=!1,$rootScope.RegistrationDate=null,$rootScope.RegistrationDuration=null,0<window.navigator.userAgent.indexOf("MSIE ")||navigator.userAgent.match(/Trident.*rv\:11\./)?$rootScope.isIE=!0:$rootScope.isIE=!1,$rootScope.availableLanguages=[],_.mapObject($rootScope.ENV.routes,function(route,key){$rootScope.availableLanguages.push(key)}),$rootScope.viewsRaw=[],$rootScope.previousSignalRView=[],$rootScope.initSignalR=function(){$rootScope.signalRConnection=(new signalR.HubConnectionBuilder).withUrl($rootScope.ENV.offer.hub,"localhost"==$rootScope.ENV.name?{skipNegotiation:!0,transport:signalR.HttpTransportType.WebSockets}:{}).withAutomaticReconnect().withKeepAliveInterval(15e3).build(),$rootScope.signalRConnection.onreconnected(function(connectionId){$rootScope.signalRConnection.invoke("ChangeView",$rootScope.previousSignalRView,[])}),$rootScope.signalRConnection.on("OddsChanged",function(oddsID,oddsRate,oddStatus){$rootScope.$broadcast("signalr_OddsChanged",{oddsID:oddsID,oddsRate:oddsRate,status:oddStatus})}),$rootScope.signalRConnection.on("EventChanceTypeChanged",function(eventChanceTypeID,status,eventID){$rootScope.$broadcast("signalr_EventChanceTypeChanged",{eventChanceTypeID:eventChanceTypeID,status:status,eventID:eventID})}),$rootScope.signalRConnection.on("EventChanged",function(eventID,actualGamePartID,actualGamePartTime,score,liveBettingView,eventDate){$rootScope.$broadcast("signalr_EventChanged",{eventID:eventID,actualGamePartID:actualGamePartID,actualGamePartTime:actualGamePartTime,score:score,liveBettingView:liveBettingView,eventDate:eventDate})}),$rootScope.signalRConnection.on("EventChangedJson",function(ecj){$rootScope.$broadcast("signalr_EventChanged",{eventID:ecj.EventID,actualGamePartID:ecj.ActualGamePartID,actualGamePartTime:ecj.ActualGamePartTime,score:ecj.Score,liveBettingView:ecj.LiveBettingView,eventDate:ecj.EventDate})}),$rootScope.signalRConnection.on("JackpotChanged",function(provider,amount){$rootScope.$broadcast("signalr_JackpotChanged",{provider:provider,amount:amount})}),$rootScope.signalRConnection.on("StreamAdded",function(raceId,streamUrl){$rootScope.$broadcast("signalr_StreamAdded",{raceId:raceId,streamUrl:streamUrl})}),$rootScope.signalRConnection.on("RefreshView",function(view){$rootScope.$broadcast("signalr_RefreshView",{view:view})}),$rootScope.signalRConnection.on("BuyBackChanged",function(ticketCode,buyBackValue){$rootScope.$broadcast("signalr_BuyBackChanged",{ticketCode:ticketCode,buybackValue:buyBackValue})}),$rootScope.signalRConnection.on("OddsBuyBackChanged",function(OddsID,Value,BuybackValue,RemoveOkFlag){$rootScope.$broadcast("signalr_OddBuyBackChanged",{OddsID:OddsID,BuybackValue:BuybackValue,Value:Value,RemoveOkFlag:RemoveOkFlag})}),$rootScope.signalRConnection.on("BbMultiOddChanged",function(SubOddsIDs,OddsRate,Status){$rootScope.$broadcast("signalr_BbMultiOddChanged",{SubOddsIDs:SubOddsIDs,OddsRate:OddsRate,Status:Status})}),$rootScope.signalRConnection.start(function(){$rootScope.signalRReady=!1}).then(function(){$rootScope.signalRReady=!0,$rootScope.signalRWaitingView&&($rootScope.signalRConnection.invoke("ChangeView",$rootScope.signalRWaitingView,$rootScope.previousSignalRView),$rootScope.previousSignalRView=$rootScope.signalRWaitingView)})},$rootScope.initSignalR(),$rootScope.$on("signalr_changeView",function(event,data){data.oldViews&&data.oldViews.forEach(function(oldView){var wasFound=!1;$rootScope.viewsRaw=_.filter($rootScope.viewsRaw,function(originalView){return!(!wasFound&&originalView.str===$rootScope.getStrView(oldView)&&(wasFound=!0))})}),data.newViews&&data.newViews.forEach(function(view){view.str=$rootScope.getStrView(view),$rootScope.viewsRaw.push(view)});data=_.pluck($rootScope.viewsRaw,"str").sort();$rootScope.signalRReady?data.join()!==$rootScope.previousSignalRView.join()&&($rootScope.signalRConnection.invoke("ChangeView",data,$rootScope.previousSignalRView),$rootScope.previousSignalRView=data):$rootScope.signalRWaitingView=data}),$rootScope.startBuybackSignalr=function(){$rootScope.IsClientLoggedIn&&$rootScope.buybackSignalrViews.length<1&&($rootScope.buybackSignalrViews.push({buyback:!0}),$rootScope.$emit("signalr_changeView",{newViews:$rootScope.buybackSignalrViews,oldViews:[]}))},$rootScope.stopBuybackSignalr=function(){$rootScope.IsClientLoggedIn&&0<$rootScope.buybackSignalrViews.length&&($rootScope.$emit("signalr_changeView",{newViews:[],oldViews:$rootScope.buybackSignalrViews}),$rootScope.buybackSignalrViews=[])},$rootScope.getOriginalViews=function(allViews){return _.uniq(allViews,!1,function(elem){return JSON.stringify(elem)})},$rootScope.getSignalRViews=function(rawViews){var viewsArr=[];return uniqueViews=$rootScope.getOriginalViews(rawViews),topLevelIDs={live:{sport:[],sportEvent:[],region:[],league:[]},prematch:{sport:[],sportEvent:[],region:[],league:[]}},uniqueViews.forEach(function(view){var topLevelType="",topLevelID=null,topLevelLive=!1;viewStr="",(view.sportID||view.sportEventID)&&(topLevelType=view.sportID?"sport":"sportEvent",topLevelID=view.sportID,viewStr+=view.sportID?"S_"+view.sportID:"SE_"+view.sportEventID,view.regionID)&&(topLevelType="region",topLevelID=view.regionID,viewStr+="_R_"+view.regionID,view.leagueID)&&(topLevelType="league",topLevelID=view.leagueID,viewStr+="_L_"+view.leagueID),view.live?(viewStr+="_LIVE",topLevelLive=!0):view.sportID&&153===view.sportID&&(viewStr+="_VG"),topLevelType&&topLevelIDs[topLevelLive?"live":"prematch"][topLevelType].push(topLevelID),view.eventID&&(viewStr="E_"+view.eventID),viewsArr.push(viewStr)}),viewsArr},$rootScope.getStrView=function(viewObj){return viewStr="",(viewObj.sportID||viewObj.sportEventID)&&(viewStr+=viewObj.sportID?"S_"+viewObj.sportID:"SE_"+viewObj.sportEventID,viewObj.regionID)&&(viewStr+="_R_"+viewObj.regionID,viewObj.leagueID)&&(viewStr+="_L_"+viewObj.leagueID),viewObj.live?(viewStr+="_LIVE",topLevelLive=!0):viewObj.sportID&&153===viewObj.sportID&&(viewStr+="_VG"),viewObj.eventID&&(viewStr="E_"+viewObj.eventID),viewObj.sportEventID&&(viewStr="ES_"+viewObj.sportEventID),viewObj.virtualJackpot&&(viewStr="Jackpot"),viewObj.betxVG&&(viewStr="Stream"),viewObj.buyback&&(viewStr="bb_"+$rootScope.playerID),viewStr=viewObj.betbuilderOdds&&0<viewObj.betbuilderOdds.length?"BBMULTIODD_"+viewObj.betbuilderOdds.join("|"):viewStr},$rootScope.$on("$routeChangeSuccess",function(event,currentRoute,previousRoute){$rootScope.loadTooltips(),$(".ticket__top").click()}),$rootScope.OddsViewMode=parseInt($cookies.get("OfferLayout")),($rootScope.OddsViewMode<1||5<$rootScope.OddsViewMode)&&($rootScope.OddsViewMode=1),-1<[1,2,4].indexOf($rootScope.OddsViewMode)?$rootScope.OddsViewMode=1:$rootScope.OddsViewMode=5,$rootScope.ShowTicket=function(code){ShowTicket(code)},$rootScope.searchParams=Object.assign({},$location.search()),$rootScope.resolveDynamicActionsByQueryParams=function(){$rootScope.searchParams.ticket_show?ShowTicket($rootScope.searchParams.ticket_show):$rootScope.searchParams.ticket_show_user?$rootScope.IsClientLoggedIn?ShowTicket($rootScope.searchParams.ticket_show_user):LoginModalOpen():"1"===$rootScope.searchParams.casino_bonus?($rootScope.IsClientLoggedIn?OpenCasinoBonus:LoginModalOpen)():"1"===$rootScope.searchParams.freebets?($rootScope.IsClientLoggedIn?OpenFreebetSection:LoginModalOpen)():"1"===$rootScope.searchParams.cashier?showDepositSection():$rootScope.searchParams.ticket_internal?ShowTicketInternal($rootScope.searchParams.ticket_internal):1==$rootScope.searchParams.register?LoginRegistrationOpen():"true"==$rootScope.searchParams.login||1==$rootScope.searchParams.login?LoginModalOpen():1==$rootScope.searchParams.card_verify?showCreditCardVerification():1==$rootScope.searchParams.game_account_verify?showVerificationForm():1==$rootScope.searchParams.game_plan?showGamePlan():1==$rootScope.searchParams.gdpr?$timeout(function(){$('a[href="#offcanvas-gdpr"]').trigger("click")},200,!1):1==$rootScope.searchParams.doxxbet_club?$timeout(function(){openDoxxClubSectionClick($rootScope.searchParams.section||null,$rootScope.searchParams.category||null,$rootScope.searchParams.product||null)},0,!1):$rootScope.searchParams.ticket_archived?ShowTicketAchived($rootScope.searchParams.ticket_archived):1==$rootScope.
1searchParams.prevention?$timeout(function(){$rootScope.openDynamic("ResponsibleGambling")},0,!1):1==$rootScope.searchParams.limits?showLimitsSection():1==$rootScope.searchParams.history?showHistorySection():$rootScope.searchParams.stored_ticket_show?"undefined"!=typeof ShowStoredTicket&&ShowStoredTicket($rootScope.searchParams.stored_ticket_show):1==$rootScope.searchParams.help?HelpCanvasOpen():1==$rootScope.searchParams.faq?FaqSectionOpen():1==$rootScope.searchParams.resetpass&&openResetPasswordModal()},$rootScope.openBonuses=function(){($rootScope.IsClientLoggedIn?openBonusDetail:LoginModalOpen)()},$rootScope.$on("$routeChangeSuccess",function(){$("#sportbook-main-container").scrollTop(0)}),$rootScope.favoritedEvents=[],$rootScope.favoritedLeagues=[],$rootScope.favoritedSports=[],$rootScope.favoritedChancetypes=[],$rootScope.recentFavoriteSportLeagueTimeout=null,$rootScope.loadFavoritedEvents=function(){$rootScope.favoritedEvents=$cookies.get("FavoritedEvents"),!$rootScope.favoritedEvents||$rootScope.favoritedEvents.length<1?$rootScope.favoritedEvents=[]:($rootScope.favoritedEvents=$rootScope.favoritedEvents.split("+"),$rootScope.favoritedEvents=_.uniq($rootScope.favoritedEvents)),$rootScope.favoritedEvents=_.map($rootScope.favoritedEvents,function(el){return parseFloat(el)})},$rootScope.writeFavoritedEvents=function(){$cookies.put("FavoritedEvents",$rootScope.favoritedEvents.join("+"))},$rootScope.loadFavoritedEvents(),$rootScope.removeFavoriteEventID=function(eventID,ignoreLogin,skipWriting){$rootScope.IsClientLoggedIn||ignoreLogin?($rootScope.favoritedEvents=_.without($rootScope.favoritedEvents,eventID),skipWriting||$rootScope.writeFavoritedEvents(),$rootScope.$broadcast("removing_fav_event",eventID)):UIkit.modal("#favourites_only_for_signin_user_modal").show()},$rootScope.addFavoriteEventID=function(eventID){$rootScope.IsClientLoggedIn?($rootScope.favoritedEvents.push(eventID),$rootScope.writeFavoritedEvents(),$rootScope.$broadcast("adding_fav_event",eventID)):UIkit.modal("#favourites_only_for_signin_user_modal").show()},$rootScope.toggleFavoriteEventID=function(eventID){-1<$rootScope.favoritedEvents.indexOf(eventID)?$rootScope.removeFavoriteEventID(eventID):$rootScope.addFavoriteEventID(eventID)},$rootScope.showFavoriteSportLeagueAnim=function(){$rootScope.recentFavoriteSportLeagueTimeout&&($timeout.cancel($rootScope.recentFavoriteSportLeagueTimeout),$rootScope.recentFavoriteSportLeagueTimeout=null),$rootScope.recentFavoriteSportLeague=!0,$rootScope.recentFavoriteSportLeagueTimeout=$timeout(function(){$rootScope.recentFavoriteSportLeague=!1},1e3)},$rootScope.updateFavoritesFromResponse=function(res){res=res.data.Favourites;res.FavouriteChanceTypes&&($rootScope.favoritedChancetypes=res.FavouriteChanceTypes),res.FavouriteLeagues&&($rootScope.favoritedLeagues=res.FavouriteLeagues),res.FavouriteLeagues&&($rootScope.favoritedSports=res.FavouriteSports)},$rootScope.addFavoriteLeagueID=function(leagueID){$rootScope.IsClientLoggedIn?AppService.addFavLeague(leagueID).then($rootScope.updateFavoritesFromResponse,function(err){}):UIkit.modal("#favourites_only_for_signin_user_modal").show()},$rootScope.removeFavoriteLeagueID=function(leagueID){$rootScope.IsClientLoggedIn?AppService.removeFavLeague(leagueID).then($rootScope.updateFavoritesFromResponse,function(err){}):UIkit.modal("#favourites_only_for_signin_user_modal").show()},$rootScope.addFavoriteSportID=function(sportID){$rootScope.IsClientLoggedIn?AppService.addFavSport(sportID).then($rootScope.updateFavoritesFromResponse,function(err){}):UIkit.modal("#favourites_only_for_signin_user_modal").show()},$rootScope.removeFavoriteSportID=function(sportID){$rootScope.IsClientLoggedIn?AppService.removeFavSport(sportID).then($rootScope.updateFavoritesFromResponse,function(err){}):UIkit.modal("#favourites_only_for_signin_user_modal").show()},$rootScope.addFavoriteChancetype=function(ChanceTypeId,LiveBetting,SportId){$rootScope.IsClientLoggedIn?AppService.addFavChanceType(ChanceTypeId,SportId,LiveBetting).then($rootScope.updateFavoritesFromResponse,function(err){}):UIkit.modal("#favourites_only_for_signin_user_modal").show()},$rootScope.removeFavoriteChancetype=function(ChanceTypeId,LiveBetting,SportId){$rootScope.IsClientLoggedIn?AppService.removeFavChanceType(ChanceTypeId,SportId,LiveBetting).then($rootScope.updateFavoritesFromResponse,function(err){}):UIkit.modal("#favourites_only_for_signin_user_modal").show()},$rootScope.setPageTitle=function(keys,sport,region,league,defaultMeta){if($rootScope.L
1abelsLoaded){Array.isArray(keys)||(keys=[keys]);for(var i=0;i<keys.length;i++){var key=keys[i],key=$rootScope.pagesMetadata[key];if(key)return document.title=key.WebSiteTitle.replace("$SportName$",sport).replace("$RegionName$",region).replace("$LeagueName$",league),$rootScope.setPageDescription(key.Description.replace("$SportName$",sport).replace("$RegionName$",region).replace("$LeagueName$",league),key.Keywords),void(key.SeoText?$rootScope.customFootElement=$sce.trustAsHtml(key.SeoText):$rootScope.customFootElement=null)}"default-meta"!==keys[0]&&$rootScope.pagesMetadata["default-meta"]&&(defaultMeta&&$rootScope.pagesMetadata[defaultMeta]?$rootScope.setPageTitle(defaultMeta,sport,region,league):$rootScope.setPageTitle("default-meta",sport,region,league))}else $timeout(function(){$rootScope.setPageTitle(keys,sport,region,league,defaultMeta)},200,!1)},$rootScope.setPageDescription=function(desc,keywords){for(var meta=document.getElementsByTagName("meta"),i=0;i<meta.length;i++)"description"==meta[i].name.toLowerCase()?meta[i].content=desc:"keywords"==meta[i].name.toLowerCase()&&(meta[i].content=keywords)},$rootScope.setPageKeywords=function(keywords){},$rootScope.removeInvalidSearch=function(allowedArr){(allowedArr=allowedArr||[]).push("a_aid","a_bid","chan","campaign");var search=_.keys($location.search());search&&search.forEach(function(ele){-1===allowedArr.indexOf(ele)&&$location.search(ele,null)})},$rootScope.removeAffiliate=function(){["a_aid","a_bid","chan"].forEach(function(ele){$location.search(ele,null)})},$rootScope.$on("remove_affiliate",function(){$rootScope.removeAffiliate()}
1),$rootScope.resetRequestParams=function(){$rootScope.requestParams.sportEventID=!1,$rootScope.requestParams.sportID=!1,$rootScope.requestParams.regionID=!1,$rootScope.requestParams.leagueCupID=!1,$rootScope.requestParams.live=!1,$rootScope.requestParams.date=!1},$rootScope.forgetClosed=function(){$rootScope.rememberClosed={Sport:[],League:[]}},$rootScope.forgetClosed(),$rootScope.getEventName=function(odds,oddID){for(var i=0;i<odds.length;i++){var odd=odds[i];if(odd.OddID==oddID)return odd.Team1+" vs. "+odd.Team2}return null},$rootScope.slugify=function(str){return str=(str=str||"").toString().toLowerCase().replace(/\s/g,"-").replace(/á|ä/g,"a").replace(/Ä/g,"c").replace(/Ä/g,"d").replace(/Ä|é/g,"e").replace(/Ã/g,"i").replace(/ľ|ĺ/g,"l").replace(/Å/g,"n").replace(/ó|ô/g,"o").replace(/Å|Å/g,"r").replace(/Å¡/g,"s").replace(/Å¥/g,"t").replace(/ú/g,"u").replace(/ý/g,"y").replace(/ž/g,"z").replace(/[^\w\-]+/g,"").replace(/-+/g,"-")},$rootScope.openURL=function(url,forceReload){url&&""!==url&&("http"===url.substring(0,4)?window.location=url:$timeout(function(){$location.url(url),forceReload&&$route.reload()}))},$rootScope.scrollToOffset=function(el){return $(el).offset().top-$("#sportbook-main-container .mCSB_container").offset().top-100},$rootScope.scrollToOffsetLive=function(el){if($(".new_live .mCSB_container").offset())return $(el).offset().top-$(".new_live .mCSB_container").offset().top-100},$rootScope.openSportboxTicket=function(){$('a[href="#modal_sb_ticket_check"]').trigger("click"),$timeout(function(){$("#sb-ticket-code1").trigger("click")},300)},$rootScope.switchLanguage=function(lang){$cookies.put("LanguageID",lang,{path:"/"}),$location.url("/"+lang),$route.reload()},$rootScope.LanguageID=$cookies.get("LanguageID"),(!$rootScope.LanguageID||$rootScope.availableLanguages.indexOf($rootScope.LanguageID)<0)&&($rootScope.LanguageID=$rootScope.ENV.defaultLanguage),moment.locale($rootScope.LanguageID.toLowerCase()),$rootScope.parseParams=function(search){search=search.substr(1).split("&");var result=[];return search.forEach(function(ele){ele=ele.split("=");ele[0]&&ele[1]&&result.push([ele[0],ele[1]])}),result},$rootScope.routeParams=$rootScope.parseParams(window.location.search),$rootScope.openGamePlan=function(section){$timeout(function(){$('a[href="#offcanvas-howtoplay"]').trigger("click"),$("#offcanvas-howtoplay .offcanvas__content").mCustomScrollbar("scrollTo",$("#offcanvas-howtoplay ."+section))})},$rootScope.openDiscussionPost=function(postID){AppService.getDiscussionPost(postID).then(function(res){res=res.data;$("#sportbook-main-container").mCustomScrollbar("scrollTo","top",{scrollInertia:0}),$rootScope.DynamicPage=$sce.trustAsHtml(res.Content),$rootScope.changeView("discussion"),$rootScope.activateMenu("discussion"),$rootScope.resetRequestParam
1s(),$rootScope.$broadcast("init_sidebar",{skipLoadingVirtual:!0}),$timeout(function(){$rootScope.showApp()},0,!1)},function(err){console.error(err)})},$rootScope.mainWhileScrolling=function(){$(".select2-container--open").prev(".input--select").select2("close"),$(".select2-container--open").prev(".input--select").select2("update")},$rootScope.initScrollMain=function(){$("#sportbook-main-container").on("scroll",$rootScope.onScrollMain)},$rootScope.initScrollMain(),$rootScope.removeScrollMain=function(){$("#sportbook-main-container").off("scroll",$rootScope.onScrollMain)},$rootScope.onScrollMain=function(){_.throttle($rootScope.mainWhileScrolling,100,{trailing:!1})},$rootScope.initScrollLive=function(){$(".new_live").hasClass("mCustomScrollbar")||(document.getElementById("sportbook-main-container").removeEventListener("scroll",$rootScope.onScrollMain),$(".new_live").mCustomScrollbar({axis:"y",theme:"dark",documentTouchScroll:!0,mouseWheel:{scrollAmount:"260",preventDefault:!1}}),$("#new_live_detail").mCustomScrollbar({axis:"y",theme:"dark",documentTouchScroll:!0,mouseWheel:{scrollAmount:"260",preventDefault:!1},callbacks:{}}))},$rootScope.Lang={App:{},Ticket:{}},$rootScope.testOffer=!1,$rootScope.showResults=!1,$rootScope.baseURL=window.location.origin||window.location.protocol+"//"+window.location.hostname+(window.location.port?":"+window.location.port:""),"localhost"===$rootScope.ENV.name&&($rootScope.baseURL="https://staging.doxxbet.sk"),-1==$rootScope.baseURL.indexOf("staging")?$rootScope.LOCATION=_.last(window.location.hostname.match(/\.([^.\\]+)$/)):$rootScope.LOCATION="com",setTimeout(function(){"undefined"!=typeof setBettingSubmenu&&setBettingSubmenu(),void 0!==initUI&&initUI()},0),$rootScope.failedLandings=0,$rootScope.showApp=function(){$rootScope.LabelsLoaded?($(".preloader").hide(),"undefined"==typeof loadGreedy||$rootScope.GreedyLoaded||($rootScope.GreedyLoaded=!0,$timeout(loadGreedy,100,!1)),$("div.main__submenu").removeClass("vissibility-hidden"),$("#sportbook-main-container").removeClass("vissibility-hidden"),$("footer.main__footer").removeClass("vissibility-hidden"),$("body").removeClass("loading-background-color"),$(".preloader").hide(),$("div.main__submenu").removeClass("vissibility-hidden"),$("#sportbook-main-container").removeClass("vissibility-hidden"),$("footer.main__footer").removeClass("vissibility-hidden"),$("body").removeClass("loading-background-color")):$rootScope.showAppAfterLabels=!0},$templateCache.put("landing"),$templateCache.put("sidebar"),$templateCache.put("ticket"),$templateCache.put("oddContent"),$templateCache.put("leagueHeader"),$templateCache.put("events"),$templateCache.put("results"),$templateCache.put("analysis"),$templateCache.put("news"),$rootScope.TicketOfTheDay={Show:!1},moment.locale($rootScope.LanguageID),$rootScope.requestParams={live:!1,date:!1,sportEvent:!1,zone:null,top:!0,languageID:$rootScope.LanguageID},$rootScope.showCircleProgress=function(selector,duration){$timeout(function(){$(selector).css({top:($(selector).parent().height()-70)/2}),$(selector).circleProgress({startAngle:-190,value:1,size:70,thickness:4,animationStartValue:0,fill:"#f40034",emptyFill:"#f8f8f8",lineCap:"round",animation:{duration:duration}}).on("circle-animation-progress",function(event,progress){$(this).find("strong").html(Math.round(duration*(1-progress)/1e3))})})},$rootScope.calendarOfferOptions={language:$rootScope.LanguageID,startDate:new Date,dateFormat:"yyyymmdd",autoClose:!0,minDate:new Date,prevHtml:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path fill="#777D83" d="M14.2.3c.5.4.7 1.3.3 2L10.2 10l4.3 7.7c.4.7.3 1.6-.3 2-.5.4-1.5.3-1.9-.3l-6.7-8.5c-.1-.3-.3-.5-.3-.9 0-.3.1-.7.3-.9L12.3.6c.5-.6 1.3-.7 1.9-.3z"/></svg>',nextHtml:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path fill="#777D83" d="M6.34 19.7c-.45-.4-.62-1.3-.27-2L9.9 10 6.08 2.3c-.35-.7-.26-1.6.27-2C6.8-.1 7.6 0 7.95.5l6 8.5c.07.3.25.5.25.9 0 .3-.1.7-.27.9l-5.98 8.5c-.45.7-1.16.8-1.6.4z"/></svg>',navTitles:{days:"MM yyyy",months:"yyyy",years:"yyyy1 - yyyy2"},onSelect:function(formattedDate,date,inst){(formattedDate=moment(date)).isValid()&&$rootScope.$broadcast("set_date",formattedDate.format("YYYYMMDD"))}}
1,$rootScope.calendarResultsOptions={language:$rootScope.LanguageID,startDate:new Date,dateFormat:"yyyymmdd",autoClose:!0,maxDate:new Date,minDate:new Date(moment().subtract(1,"months").valueOf()),prevHtml:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path fill="#777D83" d="M14.2.3c.5.4.7 1.3.3 2L10.2 10l4.3 7.7c.4.7.3 1.6-.3 2-.5.4-1.5.3-1.9-.3l-6.7-8.5c-.1-.3-.3-.5-.3-.9 0-.3.1-.7.3-.9L12.3.6c.5-.6 1.3-.7 1.9-.3z"/></svg>',nextHtml:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path fill="#777D83" d="M6.34 19.7c-.45-.4-.62-1.3-.27-2L9.9 10 6.08 2.3c-.35-.7-.26-1.6.27-2C6.8-.1 7.6 0 7.95.5l6 8.5c.07.3.25.5.25.9 0 .3-.1.7-.27.9l-5.98 8.5c-.45.7-1.16.8-1.6.4z"/></svg>',navTitles:{days:"MM yyyy",months:"yyyy",years:"yyyy1 - yyyy2"},onSelect:function(formattedDate,date,inst){(formattedDate=moment(date)).isValid()&&$rootScope.$broadcast("set_date",formattedDate.format("YYYYMMDD"))}},$rootScope.initCalendarsSidebar=function(){$rootScope.offerCalendarSidebar=$("input#offerFilterDateSidebar").datepicker($rootScope.calendarOfferOptions).data("datepicker"),$rootScope.resultsCalendarSidebar=$("input#resultsFilterDateSidebar").datepicker($rootScope.calendarResultsOptions).data("datepicker")},$rootScope.dateFromString=function(date){if("td"===date.toLowerCase())date=moment();else if("tm"===date.toLowerCase())date=moment().add(1,"days");else if("yt"===date.toLowerCase())date=moment().subtract(1,"days");else if("by"===date.toLowerCase())date=moment().subtract(2,"days");else{if(-1<["l3h","l6h","l12h"].indexOf(date.toLowerCase()))return!1;date=moment(date,"YYYYMMDD")}return new Date(date.valueOf())},$rootScope.nextKeepAlive=new Date,$rootScope.nextKeepAlive.setMinutes($rootScope.nextKeepAlive.getMinutes()+5),$rootScope.keepAlive=function(){var now=new Date;now>$rootScope.nextKeepAlive&&(AppService.keepAlive(),$rootScope.nextKeepAlive=now,$rootScope.nextKeepAlive.setMinutes($rootScope.nextKeepAlive.getMinutes()+5))},$rootScope.activateMenu=function(type){$rootScope.deactivateMenu();var classesToActivate=[];"Offer"===type?(classesToActivate.push("hyperlink-BurgerBetting"),classesToActivate.push("hyperlink-Betting")):(classesToActivate.push("hyperlink-Burger"+type),classesToActivate.push("hyperlink-"+type)),classesToActivate.forEach(function(cl){$(".main__header .uk-navbar-nav li ."+cl).parent().addClass("uk-active")})},$rootScope.deactivateMenu=function(){$(".main__header .uk-navbar-nav li").removeClass("uk-active")},$rootScope.labelsLoaded=!1,$rootScope.gamepartsLoaded=!1,$rootScope.enableSportFav=!1,$rootScope.enableLeagueFav=!1,$rootScope.enableEventFav=!1,$rootScope.enableChanceTypeFav=!1,AppService.loadLabels(Environment.name).then(function(res){res=res.data;$rootScope.IsClientLoggedIn=res.IsClientLoggedIn,$rootScope.clientCode=res.ClientCode,$rootScope.clientStatus=res.ClientStatus,res.IsClientLoggedIn&&res.RegistrationDate&&($rootScope.RegistrationDate=res.RegistrationDate,$rootScope.RegistrationDuration=moment().diff(moment(new Date(+res.RegistrationDate.match(/\d+/)[0])),"days"),$rootScope.$broadcast("registrationduration_computed")),$rootScope.playerID=res.PlayerId,$rootScope.InformationMessage=$sce.trustAsHtml(res.translation.sportbook_main_page_information_about_verification),$rootScope.InformationAboutVerification=$sce.trustAsHtml(res.translation.sportbook_main_page_information_message),$rootScope.LiveFooter=$sce.trustAsHtml(res.translation.sportbook_footer_view),$rootScope.promoBanner=$sce.trustAsHtml(res.translation.sportbook_main_right_promo_banner),$rootScope.descriptionView=$sce.trustAsHtml(res.translation.sportbook_description_view),$rootScope.liveDescriptionView=$sce.trustAsHtml(res.translation.sportbook_live_description_view),$rootScope.virtualDescriptionView=$sce.trustAsHtml(res.translation.sportbook_virtual_description_view),$rootScope.matchTrackerURL=res.MatchTrackerUrl,$rootScope.betBuilderUrl=res.DoxxbetBetbuilderUrl,$rootScope.winCurrencyEnabled=res.IsWinCurrencyEnabled,$rootScope.winCurrencySymbol=res.WinCurrencySymbol,$rootScope.winCurrencyMultiplier=res.WinCurrencyMultiplier,$rootScope.winsNewsUrl=res.WinsNewsUrl,res.translation.sportbook_landing_banner&&($rootScope.bannerLanding=$sce.trustAsHtml(res.translation.sportbook_landing_banner)),res.translation.sportbook_live_betting_banner&&($rootScope.bannerLive=$sce.trustAsHtml(res.translation.sportbook_live_betting_banner)),res.translation.sportbook_table_tenis_banner&&($rootScope.bannerLiveTableTennis=$sce.trustAsHtml(res.translation.sportbook_table_tenis_banner)),$rootScope.betgeniusStreamUrl=res.BetGeniusStreamPlayerUrl,$rootScope.IsClientLoggedIn?($rootScope.enableSportFav=!res.IsOfferFavouritesDisabled,$rootScope.enableLeagueFav=!res.IsOfferFavouritesDisabled,$rootScope.enableEventFav=!res.IsOfferFavouritesDisabled,$rootScope.enableChanceTypeFav=!res.IsChanceTypeFavouritesDisabled,$rootScope.IsClientLoggedIn&&res.ClientFavourites&&($rootScope.favoritedLeagues=res.ClientFavourites.FavouriteLeagues||[],$rootScope.favoritedSports=res.ClientFavourites.FavouriteSports||[],$rootScope.favoritedChancetypes=res.ClientFavourites.FavouriteChanceTypes||[])):($rootScope.enableSportFav=!0,$rootScope.enableLeagueFav=!0,$rootScope.enableEventFav=!0,$rootScope.enableChanceTypeFav=!0),res.QuickbetSettings?$rootScope.quickbet={allowed:"true"===res.Qu
1ickbetSettings.Allowed,url:res.QuickbetSettings.Url,landing:{allowed:"true"===res.QuickbetSettings.Allowed,icon:res.QuickbetSettings.Icon,image:res.QuickbetSettings.Image,isNew:"true"===res.QuickbetSettings.IsNew},live:{allowed:"true"===res.QuickbetSettings.Allowed,quickbetLink:{none:{icon:res.QuickbetSettings.Icon,image:res.QuickbetSettings.Image,isNew:"true"===res.QuickbetSettings.IsNew,sportID:-1},82:{icon:res.QuickbetSettings.Icon,image:res.QuickbetSettings.Image,isNew:"true"===res.QuickbetSettings.IsNew,sportID:82}}}}:$rootScope.quickbet={allowed:!1},$rootScope.enableBetbuilder=res.IsBetbuilderEnabled,$timeout(function(){$rootScope.FooterHeight=$("#main-footer").height()},0),$rootScope.Lang.App=$rootScope.modifyPrefix("sportbook_trans_",res.translation),$rootScope.Lang.Dayticket=$rootScope.modifyPrefix("sportbook_dayticket_",res.translation),$rootScope.Lang.Svg=$rootScope.modifyPrefix("svg_title_",res.translation),$rootScope.Lang.TicketDetail=$rootScope.modifyPrefix("ticket_detail_",res.translation),$rootScope.CommentsEnabled=!!res.CommentsEnabled,$rootScope.hasActiveBonuses=res.HasActiveBonuses,$rootScope.smsCodeNumber=res.SmsBetPhoneNumber||null,$rootScope.smsBettingPrefix="XX ",$rootScope.webPagesUrl=res.webPagesUrl,$rootScope.pagesMetadata=res.pagesMetadata,$rootScope.LabelsLoaded=!0,res.TicketOfTheDay&&($rootScope.TicketOfTheDay=res.TicketOfTheDay,$rootScope.TicketOfTheDay.URL=$rootScope.LanguageID+"/"+$rootScope.ENV.routes[$rootScope.LanguageID].ticketoftheday+"/"+res.TicketOfTheDay.TicketCode,$rootScope.TicketOfTheDay.AmountMoneyWon)&&($rootScope.TicketOfTheDay.Show=!0),$rootScope.labelsLoaded=!0,$rootScope.IsClientLoggedIn&&$rootScope.playerID&&res.IsGoogleAnalyticsEnabled&&"function"==typeof eventAfterLoadApp&&eventAfterLoadApp($rootScope.playerID),$timeout(function(){$rootScope.initCalendarsSidebar(),$rootScope.loadTooltips()})},function(err){console.error(err)}).finally(function(){$rootScope.showAppAfterLabels&&($rootScope.showAppAfterLabels=!1,$rootScope.showApp()),$rootScope.isAppLoaded()&&$rootScope.$broadcast("app_loaded"),$rootScope.resolveDynamicActionsByQueryParams()}),$rootScope.saveGameparts=function(){$rootScope.GameParts=gameParts,$rootScope.gamepartsLoaded=!0,$rootScope.isAppLoaded()&&$rootScope.$broadcast("app_loaded")},"undefined"!=typeof gameParts&&gameParts&&$rootScope.saveGameparts(),$rootScope.$on("gameparts_loaded",function(){$rootScope.saveGameparts()}),$timeout(function(){"undefined"!=typeof gameParts&&gameParts?$rootScope.saveGameparts():AppService.getGameParts().then(function(res){res=res.data;$rootScope.GameParts=res,$rootScope.gamepartsLoaded=!0},function(err){console.error(err)}).finally(function(){$rootScope.isAppLoaded()&&$rootScope.$broadcast("app_loaded")})},1e3),$rootScope.isAppLoaded=function(){return $rootScope.labelsLoaded&&$rootScope.gamepartsLoaded},$rootScope.Translate=function(env,id){$window.open(window.location.protocol+"//"+window.location.hostname+(window.location.port?":"+window.location.port:"")+"/base/EditLblContent?id="+id)},$rootScope.timeBoxScore_Exception=[58],$rootScope.parseScore=function(score,sportID){if(!score)return!1;var penalty,parsedScore={Home:{points:null,game:null,partials:[],overtime:[]},Away:{points:null,game:null,partials:[],overtime:[]},overtime:!1,penalties:!1},helper={},matches=(score.match("H")&&(helper.Serving="H"),score.match("A")&&(helper.Serving="A"),score.match(/Y\(\d+(\.\d+)*:\d+(\.\d+)*/));if(matches&&(matches=matches[0].split("(")[1].split(":"),parsedScore.Home.yellowCards=matches[0],parsedScore.Away.yellowCards=matches[1]),(matches=score.match(/R\(\d+(\.\d+)*:\d+(\.\d+)*/))&&(matches=matches[0].split("(")[1].split(":"),parsedScore.Home.redCards=matches[0],parsedScore.Away.redCards=matches[1]),(matches=score.match(/gamescore=\w+:\w+/))&&(matches=matches[0].split("=")[1].split(":"),parsedScore.Home.game=matches[0],parsedScore.Away.game=matches[1]),score.match("overtime")){parsedScore.overtime=!0;for(var match,regExp=/(overtime.{0,2}?=(\w+):(\w+))/g;null!==(match=regExp.exec(score));)parsedScore.Home.overtime.push(match[2]),parsedScore.Away.overt
1ime.push(match[3]);score=score.replace(regExp,"").replace(/\([,|\s]{0,}?\)/,"")}if(score.match("penalties")&&(parsedScore.penalty=!0,penalty=score.split("(penalties=")[1].split(")")[0].split(":"),parsedScore.Home.penalty=penalty[0],parsedScore.Away.penalty=penalty[1],score=score.replace("(penalties="+penalty[0]+":"+penalty[1]+")","")),(matches=score.match(/(res|inning|frame|map|game)\w+=\d+(\.\d+)*:\d+(\.\d+)*/g))&&matches.forEach(function(ele){"restot"==(matches=ele.split("="))[0]?(matches=matches[1].split(":"),parsedScore.Home.points=matches[0],parsedScore.Away.points=matches[1]):(matches=matches[1].split(":"),parsedScore.Home.partials.push(matches[0]),parsedScore.Away.partials.push(matches[1]))}),"H"==helper.Serving?(parsedScore.Home.serving=!0,parsedScore.Away.serving=!1):"A"==helper.Serving?(parsedScore.Home.serving=!1,parsedScore.Away.serving=!0):(parsedScore.Home.serving=!1,parsedScore.Away.serving=!1),49===sportID)for(;parsedScore.Home.partials.length<10;)parsedScore.Home.partials.push(""),parsedScore.Away.partials.push("");return parsedScore},$rootScope.parseScoreFull=function(event){return event.DisplayScore={MainHome:null,MainAway:null},event.Score&&("string"==typeof event.Score&&(event.Score=$rootScope.parseScore(event.Score)),event.Score.IsSpecial=-1<$rootScope.timeBoxScore_Exception.indexOf(event.SportID),event.DisplayScore={},event.Score.IsSpecial?(event.DisplayScore.MainHome=_.last(event.Score.Home.partials)||0,event.DisplayScore.MainAway=_.last(event.Score.Away.partials)||0,event.DisplayScore.SideHome=50==event.Score.Home.game?"A":event.Score.Home.game,event.DisplayScore.SideAway=50==event.Score.Away.game?"A":event.Score.Away.game):(event.DisplayScore.MainHome=event.Score.Home.points,event.DisplayScore.MainAway=event.Score.Away.points)),event},$rootScope.openPopUp=function(url){url&&(width=1004,height=700,windowprops="left=50,top=50,width="+width+",height="+height+"toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no",window.open(url,"preview",windowprops))},$rootScope.OpenLogoutInformation=function(){"function"==typeof OpenLogoutInformationWindow&&OpenLogoutInformationWindow()},$rootScope.openDynamicCounter=0,$rootScope.openDynamic=function(dynamicName){30<$rootScope.openDynamicCounter||($rootScope.labelsLoaded?$timeout(function(){sportbookURL($rootScope.LanguageID+"/"+$rootScope.ENV.routes[$rootScope.LanguageID].subpages+"/"+$rootScope.webPagesUrl[dynamicName].Url)},0):($rootScope.openDynamicCounter++,$timeout(function(){$rootScope.openDynamic(dynamicName)},500,!1)))},$rootScope.showEdit=!1,1==$location.search().browseedit&&($rootScope.showEdit=!0),$rootScope.searchParams=Object.assign({},$location.search()),$rootScope.searchParams.OddsID&&($rootScope.UrlOddToAdd=$rootScope.searchParams.OddsID),$rootScope.searchParams.analysis?$rootScope.analysisToOpen=parseInt($rootScope.searchParams.analysis):$rootScope.analysisToOpen=!1,1==$rootScope.searchParams.virtual?($rootScope.requestParams.sportID=153,$rootScope.isVirtual=!0,1==$rootScope.searchParams.worldcup?$rootScope.loadWorldCup=!0:$rootScope.loadWorldCup=!1):$rootScope.isVirtual=!1,"1"===$rootScope.searchParams.live?($rootScope.requestParams.live=!0,$rootScope.requestParams.date=!1):"1"===$rootScope.searchParams.today&&($rootScope.requestParams.date="TD"),$rootScope.searchParams.sport&&("0"!==$rootScope.searchParams.sport||$rootScope.ENV.golden)&&($rootScope.toLoadSport=parseInt($rootScope.searchParams.sport),$rootScope.searchParams.region)&&($rootScope.toLoadRegion=parseInt($rootScope.searchParams.region),$rootScope.searchParams.league)&&($rootScope.toLoadLeague=parseInt($rootScope.searchParams.league)),$rootScope.openLoginWindow=function(){LoginModalOpen()},$rootScope.IsLoggedOnUI=function(){return 1===$("#profile-section-visible").length},$rootScope.copyToClipboard=function(textToCopy){var dummy=document.createElement("textarea");document.body.appendChild(dummy),dummy.value=textToCopy,dummy.select(),document.execCommand("copy"),document.body.removeChild(dummy)},$rootScope.modifyPrefix=function(value,obj){var key,returnObj={};for(key in obj){var replacedkey=key.replace(value,"");replacedkey!=key&&(returnObj[replacedkey]=obj[key],delete obj[key])}return returnObj},$rootScope.localeStorageSet=function(key,data,expiration,remove){return $q(function(resolve,reject){null==expiration&&(expiration=365),$rootScope.localeStorageGet().then(function(sportbookCookie){var idx;
1sportbookCookie?(idx=_.findIndex(sportbookCookie[key],data),sportbookCookie[key]&&-1==idx?sportbookCookie[key].push(data):sportbookCookie[key].splice(idx,1)):(sportbookCookie={favorites:[]})[key].push(data),sportbookCookie=$rootScope.JSON_stringify(sportbookCookie),localStorageService.cookie.set("sportbook",sportbookCookie,expiration)?resolve("Saved"):reject("Error saving data!")},function(err){console.error(err)})})},$rootScope.toggleAccord=function(Accord,eleClass,remember){$timeout(function(){Accord.opened=!Accord.opened,remember&&($rootScope.rememberClosed[remember]||($rootScope.rememberClosed[remember]=[]),Accord.opened?$rootScope.rememberClosed[remember]=_.without($rootScope.rememberClosed[remember],Accord.ID):$rootScope.rememberClosed[remember].push(Accord.ID)),$timeout(function(){$("#sportbook-main-container").scroll()},500,!1)})},$rootScope.parseScores=function(scoreString,sportID){var retScore={};if(scoreString){retScore.showMain=!0;var penalty,retScore={home:{points:null,game:null,partials:[],overtime:[]},away:{points:null,game:null,partials:[],overtime:[]}},matches=(scoreString.match("H")?(retScore.home.serving=!0,retScore.away.serving=!1):scoreString.match("A")?(retScore.home.serving=!1,retScore.away.serving=!0):(retScore.home.serving=!1,retScore.away.serving=!1),scoreString.match(/Y\(\d+(\.\d+)*:\d+(\.\d+)*/));if(matches&&(matches=matches[0].split("(")[1].split(":"),retScore.home.yellowCards=matches[0],retScore.away.yellowCards=matches[1]),(matches=scoreString.match(/R\(\d+(\.\d+)*:\d+(\.\d+)*/))&&(matches=matches[0].split("(")[1].split(":"),retScore.home.redCards=matches[0],retScore.away.redCards=matches[1]),(matches=scoreString.match(/C\(\d+(\.\d+)*:\d+(\.\d+)*/))&&(matches=matches[0].split("(")[1].split(":"),retScore.home.corners=matches[0],retScore.away.corners=matches[1],retScore.showCorners=!0),(matches=scoreString.match(/gamescore=\w+:\w+/))&&(scoreString=scoreString.replace(matches[0],""),matches=matches[0].split("=")[1].split(":"),retScore.home.game=matches[0],retScore.away.game=matches[1]),scoreString.match("overtime")){retScore.overtime=!0;for(var match,regExp=/(overtime.{0,2}?=(\w+):(\w+))/g;null!==(match=regExp.exec(scoreString));)retScore.home.overtime.push(match[2]),retScore.away.overtime.push(match[3]);scoreString=scoreString.replace(regExp,"").replace(/\([,|\s]{0,}?\)/,"")}switch(scoreString.match("penalties")&&(retScore.penalty=!0,penalty=scoreString.split("(penalties=")[1].split(")")[0].split(":"),retScore.home.penalty=penalty[0],retScore.away.penalty=penalty[1],scoreString=scoreString.replace("(penalties="+penalty[0]+":"+penalty[1]+")","")),(matches=scoreString.match(/(res|inning|frame|map|game)\w+=\d+(\.\d+)*:\d+(\.\d+)*/g))&&matches.forEach(function(ele){"restot"==(matches=ele.split("="))[0]?(matches=matches[1].split(":"),retScore.home.points=matches[0],retScore.away.points=matches[1]):(matches=matches[1].split(":"),retScore.home.partials.push(matches[0]),retScore.away.partials.push(matches[1]))}),sportID){case 54:retScore.home.yellowCards&&"0"!==retScore.home.yellowCards||(retScore.home.yellowCards="-"),retScore.away.yellowCards&&"0"!==retScore.away.yellowCards||(retScore.away.yellowCards="-"),retScore.home.redCards&&"0"!==retScore.home.redCards||(retScore.home.redCards="-"),retScore.away.redCards&&"0"!==retScore.away.redCards||(retScore.away.redCards="-");break;case 49:for(;retScore.home.partials.length<10;)retScore.home.partials.push(""),retScore.away.partials.push("")}-1<$rootScope.timeBoxScore_Exception.indexOf(sportID)?(retScore.home.mainPoints=_.last(retScore.home.partials)||0,retScore.away.mainPoints=_.last(retScore.away.partials)||0,retScore.home.sidePoints=50==retScore.home.game?"A":retScore.home.game,retScore.away.sidePoints=50==retScore.away.game?"A":retScore.away.game,retScore.showSide=!!retScore.home.sidePoints):(retScore.home.mainPoints=retScore.home.points,retScore.away.mainPoints=retScore.away.points,retScore.home.partials&&0<retScore.home.partials.length&&(retScore.home.sidePoints=_.reduce(retScore.home.partials,function(final,current){return""!==current?current:final}),retScore.away.sidePoints=_.reduce(retScore.away.partials,function(final,current){return""!==current?current:final}),retScore.showSide=retScore.home.serving||retScore.away.serving)),retScore.showMain=!0}else retScore.showMain=!1;return retScore},$rootScope.localeStorageGet=function(key){return $q(function(resolve,reject){var storedData=localStorageService.cookie.get("sportbook");resolve(null!=storedData?key?storedData[key]:storedData:null)})},$rootScope.JSON_stringify=function(data){var cache=[],data=JSON.stringify(data,function(key,value){if("object"==typeof value&&null!==value){if(-1!==cache.indexOf(value))return;cache.push(value)}return value}),cache=null;return data},$rootScope.initOfferTooltips=function(){$timeout(function(){var options={interactive:!0,delay:50,theme:"labeled"};["next-live","match-stats"].forEach(function(selector){$("."+selector).hasClass("tooltipstered")||$("."+selector).tooltipster(options)})},200)}
1,$rootScope.resizeDetail=function(){!$rootScope.requestParams.live||$window.innerWidth<1365||1515<$window.innerWidth&&$window.innerWidth},$rootScope.alwaysOnResize=function(){},$rootScope.resizeLayout=function(){$(".live-scrolling-detail-container").removeClass("left-aside"),$(".new_live-scrolling-detail-container").removeClass("left-aside"),$(".live-scrolling-detail-container").addClass("left-aside-big"),$(".new_live-scrolling-detail-container").addClass("left-aside-big"),$rootScope.forceSmallSidebar?($(".main__left").removeClass("is--active"),$("body.offer").addClass("left-aside"),$("body.offer").removeClass("left-aside-big"),$(".main__left").removeClass("is--sticked")):($window.innerWidth<1920?$(".main__left").removeClass("is--active"):$(".main__left").addClass("is--active"),$window.innerWidth<1365?($("body.offer").addClass("left-aside"),$("body.offer").removeClass("left-aside-big")):($("body.offer").removeClass("left-aside"),$("body.offer").addClass("left-aside-big")),$(".main__left").addClass("is--sticked")),$(".ticket__top").click(),$rootScope.alwaysOnResize()},$rootScope.$on("show_results",function(){$rootScope.changeView("results")}),$rootScope.$on("load_bonuses",function(){$rootScope.portalBonuses||(BonusesService.getPortalBonuses().then(function(res){res&&res.data&&($rootScope.portalBonuses=[],res.data.forEach(function(bonus){bonus={title:bonus.BonusTitle,text:bonus.BonusHeader,image:bonus.BonusImageUrl,startDate:moment(bonus.StartDate),endDate:moment(bonus.EndDate),guestOrder:bonus.RecordOrder,loggedInOrder:bonus.LoggedClientRecordOrder,path:bonus.Param,order:$rootScope.RegistrationDuration&&14<$rootScope.RegistrationDuration?bonus.LoggedClientRecordOrder:bonus.RecordOrder,bonusName:bonus.BonusName,imageTitle:bonus.BonusImageTitle,imageAlt:bonus.Bonu
1sImageAlt};bonus.isActive=0<bonus.endDate.diff(moment()),$rootScope.portalBonuses.push(bonus)}),$rootScope.$broadcast("portalbonuses_loaded"))},function(err){}),$rootScope.ENV.enableCasino&&BonusesService.getCasinoBonuses().then(function(res){res&&res.data&&($rootScope.casinoBonuses=[],res.data.forEach(function(bonus){bonus={title:bonus.BonusTitle,text:bonus.BonusHeader,image:bonus.BonusImageUrl,startDate:moment(bonus.StartDate),endDate:moment(bonus.EndDate),guestOrder:bonus.RecordOrder,loggedInOrder:bonus.LoggedClientRecordOrder,path:bonus.Param,order:$rootScope.RegistrationDuration&&14<$rootScope.RegistrationDuration?bonus.LoggedClientRecordOrder:bonus.RecordOrder,bonusName:bonus.BonusName,imageTitle:bonus.BonusImageTitle,imageAlt:bonus.BonusImageAlt};bonus.isActive=0<bonus.endDate.diff(moment()),$rootScope.casinoBonuses.push(bonus)}),$rootScope.$broadcast("casinobonuses_loaded"))},function(err){}))}),$rootScope.$on("registrationduration_computed",function(){$rootScope.portalBonuses&&0<$rootScope.portalBonuses.length&&$rootScope.portalBonuses.forEach(function(iBonus){iBonus.order=$rootScope.RegistrationDuration&&14<$rootScope.RegistrationDuration?iBonus.loggedInOrder:iBonus.guestOrder}),$rootScope.ENV.enableCasino&&$rootScope.casinoBonuses&&0<$rootScope.casinoBonuses.length&&$rootScope.casinoBonuses.forEach(function(iBonus){iBonus.order=$rootScope.RegistrationDuration&&14<$rootScope.RegistrationDuration?iBonus.loggedInOrder:iBonus.guestOrder})}),$rootScope.loadTooltips=function(){$timeout(function(){var options={interactive:!0,delay:50,theme:"labeled"},optionsLeft={interactive:!0,delay:50,theme:"labeled",side:"left"};$(".tooltip").each(function(index){!$(this).hasClass("tooltipstered")&&($(this).attr("title")&&$(this).attr("title").length||$(this).attr("data-tooltip-content"))&&($(this).tooltipster($(this).hasClass("tooltip-left")?optionsLeft:options),$(this).removeClass("tooltip"))})},100,!1)},$rootScope.resizeLayoutDebounced=_.debounce($rootScope.resizeLayout,400),$(window).on("resize",$rootScope.resizeLayoutDebounced),"undefined"!=typeof testMenu&&$timeout(function(){testMenu()}),$rootScope.groupVisible=function(group){for(iGroup=0;iGroup<group.eventChanceTypes.length;iGroup++)if(group.eventChanceTypes[iGroup].visibility>$rootScope.visibility.HIDE&&$rootScope.chanceTypeVisible(group.eventChanceTypes[iGroup]))return!(group.isEmpty=!1);return!(group.isEmpty=!0)},$rootScope.chanceTypeVisible=function(echt){for(jEcht=0;jEcht<echt.odds.length;jEcht++)if(echt.odds[jEcht].visibility>$rootScope.visibility.HIDE)return!(echt.isEmpty=!1);return!(echt.isEmpty=!0)},$rootScope.showRiskInfo=function(skipClosing){$rootScope.riskInfoPreventClosing||AppService.getClientWinsAndBets().then(function(res){var res=res.data,element=$rootScope.Lang.App.responsible_gambling,element=$sce.trustAsHtml(element.replace("##OnlineActualMonthWin##",res.OnlineActualMonthWin).replace("##OnlineActualMonthBet##",res.OnlineActualMonthBet).replace("##OnlineTotalWin##",res.OnlineTotalWin).replace("##OnlineTotalBet##",res.OnlineTotalBet).replace("##CasinoActualMonthWin##",res.CasinoActualMonthWin).replace("##CasinoActualMonthBet##",res.CasinoActualMonthBet).replace("##CasinoTotalWin##",res.CasinoTotalWin).replace("##CasinoTotalBet##",res.CasinoTotalBet).replace("casino timer",skipClosing?"casino":"casino timer"));$rootScope.riskInfoElementSidebar=element,skipClosing||($rootScope.riskInfoPreventClosing=!0,$timeout(function(){$rootScope.riskInfoElementSidebar=null,$rootScope.riskInfoPreventClosing=!1},6200,!0))})},$rootScope.hideSidebarRiskInfo=function(){$timeout(function(){$rootScope.riskInfoElementSidebar=null},0)},$rootScope.openBetRadarStatistics=function(betradarID){betradarID="https://s5.sir.sportradar.com/doxxbet/"+$rootScope.LanguageID+"/"+betradarID;$rootScope.openPopUp(betradarID)},$rootScope.openPopUp=function(url){url&&(width=1004,height=700,windowprops="left=50,top=50,width="+width+",height="+height+"toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no",window.open(url,"preview",windowprops))},$rootScope.$on("signalr_BuyBackChanged",function(ev,data){data.buybackValue<=0&&$rootScope.loadAndBroadcastBuyback(data.ticketCode)}),$rootScope.loadAndBroadcastBuyback=function(ticketCode){MyAccountService.getBuybackInfo(ticketCode).then(function(res){$rootScope.$broadcast("buyback_values_arr
1ived",{res:res,ticketCode:ticketCode}),-1===res.data.BuyBackValue&&$rootScope.$broadcast("refresh_ticket_history")},function(err){})},$rootScope.areQuickbetsEnabled=!0,$rootScope.areQuickbetsOpened=!1,$rootScope.openQuickbets=function(){$rootScope.IsClientLoggedIn?AppService.getQuickbetToken().then(function(res){$rootScope.openQuickbetsIframe(res.data.Token)},function(err){}):$timeout(function(){$rootScope.openQuickbetsIframe()})},$rootScope.openQuickbetsIframe=function(token){$rootScope.quickbetsIframe=token?$sce.trustAsResourceUrl($rootScope.quickbet.url+"?platform=web&language="+$rootScope.LanguageID+"&sessionToken="+token):$sce.trustAsResourceUrl($rootScope.quickbet.url+"?platform=web&language="+$rootScope.LanguageID),$rootScope.areQuickbetsOpened=!0,$timeout(function(){$(".quickbet_element").addClass("draggable").draggable({containment:"body"}),$(".quickbet_element").css("bottom","50%"),$(".quickbet_element").css("right","50%"),$(".quickbet_element").css("left","auto"),$(".quickbet_element").css("top","auto"),$(".quickbet_element").css("margin-right","-535px"),$(".quickbet_element").css("margin-bottom","-255px"),$(".quickbet_element").css("width","1000px"),$(".quickbet_element").css("height","700px"),$(".quickbet_element .draggerArea").simulate("drag")})},$rootScope.closeQuickbets=function(){$rootScope.areQuickbetsOpened=!1},$rootScope.$on("request_buyback_load",function(ev,data){$rootScope.loadAndBroadcastBuyback(data.ticketCode)}),$rootScope.$on("load_approved_tickets",function(event,data){$rootScope.eventsWithTickets&&!data.force||($rootScope.IsClientLoggedIn?AppService.getApprovedTicketEvents().then(function(res){res.data.Response.Tickets&&0<res.data.Response.Tickets.length?($rootScope.eventsWithTickets={},$rootScope.buybackTickets||($rootScope.buybackTickets={}),res.data.Response.Tickets.forEach(function(ticket){"JT"!==ticket.TicketType||ticket.IsFreebetTicket||($rootScope.eventsWithTickets[ticket.EventId]||($rootScope.eventsWithTickets[ticket.EventId]={tickets:[]}),$rootScope.eventsWithTickets[ticket.EventId].tickets.push(ticket.TicketCode),$rootScope.buybackTickets[ticket.TicketCode])||($rootScope.buybackTickets[ticket.TicketCode]={code:ticket.TicketCode,win:ticket.AmountMoneyWin,bet:ticket.AmountMoney,acceptBuybackChanges:!0})})):$rootScope.eventsWithTickets=!1},function(err){$rootScope.eventsWithTickets=!1}).finally(function(){$rootScope.eventsWithTickets?$rootScope.startBuybackSignalr():$rootScope.stopBuybackSignalr()}):($rootScope.eventsWithTickets=!1,$rootScope.stopBuybackSignalr()))})}),angular.module("sportbookApp").controller("AppController",["$rootScope","$interval","$timeout","$cookies","AppService",function($rootScope,AppService){}]),(()=>{var directives=angular.module("sportbookApp.directives",[]);directives.directive("rateTrendVisualiser",function($timeout){return function(scope,element,attr){scope.$watch(attr.rateTrendVisualiser,function(newValue,oldValue){var css_class;element.hasClass("locked")||element.hasClass("suspended")||element.hasClass("disable-rate-animation")||newValue!=oldValue&&(element.addClass(css_class=oldValue<newValue?"rate-changed-up":"rate-changed-down"),$timeout(function(){element.removeClass(css_class)},4e3))})}}),directives.directive("bindHtmlCompile",["$compile",function($compile){return{restrict:"A",link:function(scope,element,attrs){scope.$watch(function(){return scope.$eval(attrs.bindHtmlCompile)},function(value){element.html(value&&value.toString());value=scope;attrs.bindHtmlScope&&(value=scope.$eval(attrs.bindHtmlScope)),$compile(element.contents())(value)})}}}]),directives.directive("img",function($rootScope){return{restrict:"E",link:function(scope,element,attrs){element.error(function(){var fallbackElement=!1;try{fallbackElement=element.parent().find(".fallback-img")[0]}catch(error){fallbackElement=!1}fallbackElement?((fallbackElement=angular.element(fallbackElement).removeClass("fallback-img")).removeClass("fallback-img"),element.remove()):element.prop("src")===$rootScope.ENV.staticURL+"images/blank.gif"?element.remove():element.prop("src",$rootScope.ENV.staticURL+"images/blank.gif")})}}}),directives.directive("landingSectionContainer",[function(){return{restrict:"E",scope:!0,controller:["$scope",function($scope){(this.$scope=$scope).__lscDir={tabs:[],selectedTab:null,activeTabSelected:!1},this.registerTab=function(tab){$scope.__lscDir.tabs.push(tab),$scope.__lscDir.activeTabSelected||$scope.__lscDir.selectTab($scope.__lscDir.tabs[0])},$scope.__lscDir.selectTab=function(tab){$scope.__lscDir.selectedTab!=tab&&($scope.$broadcast("selectedTabChanged"+$scope.$id,{oldValue:$scope.__lscDir.selectedTab,newValue:tab}),$scope.__lscDir.selectedTab=tab)},this.selectActiveTab=function(tab){$scope.SelectTab(tab),$scope.activeTabSelected=!0}}]}}]),directives.directive("tabSwitchButton",[function(){return{restrict:"A",require:"^landingSectionContainer",scope:{selectedClass:"@"},link:function(scope,element,attrs,sectionController){var value=attrs.tabSwitchButton;sectionController.registerTab(value),element.bind("click",function(){sectionController.$scope.__lscDir.selectTab(value)}),scope.$on("selectedTabChanged"+sectionController.$scope.$id,function(event,data){data.oldValue===value&&element.removeClass(scope.selectedClass||"selected"),data.newValue===value&&element.addClass(scope.selectedClass||"selected")}),sectionController.$scope.__lscDir.selectedTab===value&&element.addClass(scope.selectedClass||"selected")}}}]),directives.directive("tabBodyOutlet",[function(){return{restrict:"A",scope:{animation:"@"},controller:["$scope",function($scope){this.$scope=$scope}]}}]),directives.directive("tabBodyTarget",["$timeout",function($timeout){return{restrict:"A",require:["^landingSectionContainer","^tabBodyOutlet"],scope:{active:"@",viewLeave:"&",viewEnter:"&"},link:function(scope,element,attrs,ctrls){scope.target=attrs.tabBodyTarget,scope.setClasses=function(selectedTabID,prevSelectedTabID){element.removeClass("left right visible animation-fade animation-opacity"),prevSelectedTabID===scope.target&&scope.viewLeave
1(),selectedTabID===scope.target?(element.addClass("visible"),scope.viewEnter()):(prevSelectedTabID=ctrls[0].$scope.__lscDir.tabs.indexOf(selectedTabID),selectedTabID=ctrls[0].$scope.__lscDir.tabs.indexOf(scope.target),element.addClass(selectedTabID<prevSelectedTabID?"left":"right")),"opacity"===ctrls[1].$scope.animation?element.addClass("animation-opacity"):element.addClass("animation-fade")},scope.setClasses(ctrls[0].$scope.__lscDir.selectedTab),scope.$on("selectedTabChanged"+ctrls[0].$scope.$id,function(event,data){scope.setClasses(data.newValue,data.oldValue)}),scope.active&&"false"!==scope.active&&"undefined"!==scope.active&&"null"!==scope.active&&$timeout(function(){ctrls[0].selectActiveTab(scope.target)},100)}}}]),directives.directive("iframeOnload",[function($timeout){return{scope:{callBack:"&iframeOnload"},link:function(scope,element,attrs){element.on("load",function(event){return scope.callBack({event:event})})}}}]),directives.directive("onError",function($timeout){return{link:function(scope,element,attrs){element.bind("error",function(){attrs.src!=attrs.onError&&$timeout(function(){attrs.$set("src",attrs.onError)},0)})}}}),directives.directive("iframeSetDimensionsOnload",[function(){return{restrict:"A",link:function(scope,element,attrs){element.on("load",function(){var iFrameHeight=element[0].contentWindow.document.body.scrollHeight+"px";element.css("width","100%"),element.css("height",iFrameHeight)})}}}])})(),(()=>{let filters=angular.module("sportbookApp.filters",[]),NoTimeParts=["notstarted","nonstarted","interrupt","penalties","paused","ended"];filters.filter("sportMapper",function($rootScope){return function(sportID,prefix,removePrefix){return prefix=prefix||"",removePrefix&&(sportID=sportID.replace(removePrefix,"")),prefix+($rootScope.Dictionary.SportMapping[sportID]||"default")}}),filters.filter("isOddInFilter",function(){return function(odd,oddIds){if(!angular.isArray(oddIds))return!0;for(var iOddId=0;iOddId<oddIds.length;iOddId++)if(odd.ID==oddIds[iOddId]||odd.OddsID==oddIds[iOddId])return!0;return!1}}),filters.filter("ectVisible",function($rootScope,isOddInFilterFilter){return function(ect,oddIds){if(!(-1===ect.order||ect.visibility<$rootScope.visibility.LOCK))for(var iOdd=0;iOdd<ect.odds.length;iOdd++)if(isOddInFilterFilter(ect.odds[iOdd],oddIds)&&ect.odds[iOdd].visibility>$rootScope.visibility.HIDE)return!0;return!1}}),filters.filter("groupVisible",function($rootScope,ectVisibleFilter){return function(group,oddIds){if(-1!==group.order)for(var iEct=0;iEct<group.eventChanceTypes.length;iEct++)if(group.eventChanceTypes[iEct].visibility>$rootScope.visibility.HIDE&&ectVisibleFilter(group.eventChanceTypes[iEct],oddIds))return!0;return!1}}),filters.filter("hasNoVisibleOdds",function(groupVisibleFilter){return function(chanceTypeGroup,oddIds){if(chanceTypeGroup&&chanceTypeGroup.paramGroups&&0<chanceTypeGroup.paramGroups.length)for(var iCtg=0;iCtg<chanceTypeGroup.paramGroups.length;iCtg++)if(groupVisibleFilter(chanceTypeGroup.paramGroups[iCtg],oddIds))return!1;return!0}}),filters.filter("regionMapper",function($rootScope){return function(regionID,prefix){regionID=$rootScope.Dictionary.RegionMapping[regionID];return(prefix=prefix||"")+((regionID=regionID&®ionID.replace(".","").replace("/","-").replace("'","-").replace(" - ","-").replace(/\s+/g,"-").toLowerCase())||"default")}}),filters.filter("rate",function(){return function(rate,overrideLowValues){return!rate||rate<0||rate<1.01&&!overrideLowValues?" - ":void 0!==rate.toFixed?rate.toLocaleString("sk-SK",{minimumFractionDigits:2,maximumFractionDigits:2}).replace(",","."):void 0===rate.toFixed?Number(rate).toLocaleString("sk-SK",{minimumFractionDigits:2,maximumFractionDigits:2}).replace(",","."):rate}}),filters.filter("currency",function(){return function(value,currencyID,skipFormatting){currencyID=currencyID||"eur";var res=null;switch(skipFormatting||(value=Number(value).toLocaleString("sk-SK",{minimumFractionDigits:2,maximumFractionDigits:2})),currencyID.toLowerCase()){case"eur":res=value+" â¬";break;case"czk":res=value+" KÄ";break;case"gbp":res="£"+value;break;case"usd":res="$"+value;break;case"ngn":res="⦠"+value;break;default:res=value+" "+currencyID}return res.replace(".",",")}}),filters.filter("capitalize",function(){return function(input){return input?input.charAt(0).toUpperCase()+in
1put.substr(1).toLowerCase():""}}),filters.filter("eventDateTime",function($sce,$rootScope){return function(Event,requiredPart){var time,format,eventDate=moment(Event.EventDate),content=null,GP=$rootScope.GameParts;if("Y"==Event.LiveBetting){if(!(GP&&GP[Event.ActualGamePartID]||$rootScope.isVirtual))return!1;switch(requiredPart){case"timeOnly":content=$rootScope.isVirtual?eventDate.format("HH:mm"):-1!=Event.ActualGamePartTime?Event.ActualGamePartTime+" '":"";break;case"gamePartOnly":case"gamePartOnlyNoBr":content=$rootScope.isVirtual?eventDate.format("HH:mm"):GP[Event.ActualGamePartID].Name;break;default:content=$rootScope.isVirtual?eventDate.format("HH:mm"):-1!=_.indexOf(NoTimeParts,Event.ActualGamePartID)?(content=Event.ActualGamePartTime,GP[Event.ActualGamePartID].Name):-1!=Event.ActualGamePartTime&&void 0!==Event.ActualGamePartTime?(time="<br />"+Event.ActualGamePartTime+" '",GP[Event.ActualGamePartID].Name+time):-1<$rootScope.timeBoxScore_Exception.indexOf(Event.SportID)?(time="",(time=Event.Score?Event.Score.Home.points+":"+Event.Score.Away.points+"<br />":time)+GP[Event.ActualGamePartID].Name):GP[Event.ActualGamePartID].Name}}else content=eventDate.isSame(moment(),"day")&&"forceDate"!==requiredPart?eventDate.format("HH:mm"):(format="DD.MM.[<br />]HH:mm",-1==moment().diff(Event.EventDate,"days")&&"forceDate"!==requiredPart&&(format="dddd[<br />]HH:mm"),eventDate.format(format));return"gamePartOnlyNoBr"!=requiredPart&&(content=content.replace(" - ","<br/>")),$sce.trustAsHtml(content)}}),filters.filter("timeDisplay",function($rootScope){return function(Event){var eventDate=moment(Event.EventDate),eventDateMorning=moment(Event.EventDate).set({hour:0,minute:0,second:0,millisecond:0}),returnDateTime={time:eventDate.format("HH:mm"),timeDetail:eventDate.format("HH:mm"),showTime:!1,gamePart:null,showGamePart:!1,gamePartTime:null,showGamePartTime:!1,date:null,dateDetail:null,showDate:!1,showScore:!1,detailShowTime:!0,liveStarted:"Y"===Event.LiveBetting&&"notstarted"!==Event.ActualGamePartID},today=moment().set({hour:0,minute:0,second:0,millisecond:0});return returnDateTime.liveStarted&&(returnDateTime.detailShowTime=!1),eventDate.isSame(moment(),"day")?(returnDateTime.date=$rootScope.Lang.App.today,returnDateTime.dateDetail=$rootScope.Lang.App.today):(eventDateMorning.diff(today,"weeks")<1?(returnDateTime.date=eventDate.format("dddd"),returnDateTime.timeDetail=eventDate.format("dddd")+" "+returnDateTime.timeDetail):returnDateTime.date=eventDate.format("DD.MM."),returnDateTime.dateDetail=eventDate.format("DD.MM.")),"Y"==Event.LiveBetting&&153!=Event.SportID?(-1!=Event.ActualGamePartTime&&(returnDateTime.gamePartTime=Event.ActualGamePartTime+" '",returnDateTime.showGamePartTime=-1==_.indexOf(NoTimeParts,Event.ActualGamePartID)),$rootScope.GameParts[Event.ActualGamePartID]&&$rootScope.GameParts[Event.ActualGamePartID].Name&&(returnDateTime.gamePart=$rootScope.GameParts[Event.ActualGamePartID].Name,returnDateTime.showGamePart=!0),returnDateTime.showScore=-1<$rootScope.timeBoxScore_Exception.indexOf(Event.SportID)):(returnDateTime.showTime=!0,eventDate.isSame(moment(),"day")||(returnDateTime.showDate=!0)),returnDateTime}}),filters.filter("competitor",function(){return function(event,type){switch(event=event.split(" vs. "),type){case"home":return event[0];case"away":return event[1]}return null}}),filters.filter("filterDate",function(){return function(date){return(date="BY"===date?moment().subtract(2,"days"):moment(date,"YYYYMMDD")).format("D.M.")}}),filters.filter("numberTranslation",function($rootScope){return function(number,translation){return translation.replace("%s%",Number.parseFloat(number).toFixed(2).toString().replace(".",","))}}),filters.filter("roundDown",function($rootScope){return function(number,spaces){return Math.floor(number*Math.pow(10,spaces))/Math.pow(10,spaces)}}),filters.filter("xxlHint",function($rootScope){return function(potWin,inputStr,inputStrAlt){var value=$rootScope.Ticket.BoosterBonusHint.match(/\d*\.*\d*(?=%)/);return returnStr=(inputStrAlt&&1<parseInt($rootScope.Ticket.BoosterBonusHint.match(/\d*(?=x)/))?inputStrAlt:inputStr).replace("%s",value)}}),filters.filter("replace",function(){return function(string,searchValue,replaceValue){return string.split(searchValue).join(replaceValue)}}),filters.filter("log",function(){return function(object){return console.log(object),""}}),filters.filter("removeBrackets",function(){return function(input){if(void 0!==input)return input.split(/\(.+\)/g).join("")}}),filters.filter("hasQueryParams",function(){return function(input){return!!(input&&0<input.length)&&null!==input.match(/\?.+=.*/)}}),filters.filter("values",function(){return function(input){return input&&Object.values(in
1put)}}),filters.filter("oddCount",function(){return function(ticket,type){if(ticket.OddsStats){statArr=ticket.OddsStats.split(", ");for(var ret,i=0;i<statArr.length;i++)if(statArr[i].charAt(0)===type)return ret=statArr[i].split("=")[1],NaN!==(ret=parseInt(ret))?ret:0}return 0}}),filters.filter("keys",function(){return function(input){return input&&Object.keys(input)}}),filters.filter("sortBy",function(){return function(input,property,direction){var chain,sorted;return input&&property?(sorted=[],sorted=Array.isArray(property)?(chain=_.chain(input),_.forEach(property,function(prop){chain=chain.sortBy(prop)}),chain.value()):_.sortBy(input,property),"desc"===direction?sorted.reverse():sorted):input}}),filters.filter("safe",function($sce){return function(input,type){if(!input||!type)return input;switch(type){case"url":return $sce.trustAsResourceUrl(input);case"html":return $sce.trustAsHtml(input)}}}),filters.filter("extractContentFromHtml",function($sce){return function(input){return input&&(new DOMParser).parseFromString(input,"text/html").documentElement.textContent}}),filters.filter("showFreebets",function(){return function(ticket){return ticket.FreeBets&&0<ticket.FreeBets.length}}),filters.filter("hasApplicableFreebets",function(){return function(ticket){if(ticket.FreeBets&&0<ticket.FreeBets.length)for(var i=0;i<ticket.FreeBets.length;i++)if(ticket.FreeBets[i]&&ticket.FreeBets[i].IsApplicable)return!0;return!1}}),filters.filter("selectedFreebetName",function(){return function(freebets){if(freebets&&0<freebets.length)for(var i=0;i<freebets.length;i++)if(freebets[i]&&freebets[i].IsActive)return freebets[i].FreebetName;return!1}}),filters.filter("showBonifications",function(){return function(ticket){return!ticket.IsEdited&&ticket.Bonifications&&0<ticket.Bonifications.length}}),filters.filter("hasApplicableBonifications",function(){return function(ticket){if(ticket.Bonifications&&0<ticket.Bonifications.length)for(var i=0;i<ticket.Bonifications.length;i++)if(ticket.Bonifications[i]&&ticket.Bonifications[i].Applicable)return!0;return!1}}),filters.filter("hasSelectedBonification",function(){return function(bonifications){if(bonifications&&0<bonifications.length)for(var i=0;i<bonifications.length;i++)if(bonifications[i]&&bonifications[i].Selected)return!0;return!1}}),filters.filter("hasApprovedTicket",function($rootScope){return function(eventID){return $rootScope.eventsWithTickets&&$rootScope.eventsWithTickets[eventID]&&0<$rootScope.eventsWithTickets[eventID].tickets.length}}),filters.filter("isVideoUrl",function(){return function(url){return".mp4"===url.substring(url.length-4)}}),filters.filter("bonusHref",function($rootScope){return function(bonus){if(bonus.ScreenLink){var split=bonus.ScreenLink.split("/");if(1<split.length){var found=null;if("BonusDetail"===split[0]?found=_.findWhere($rootScope.portalBonuses,{bonusName:split[1]}):"BonusDetailCasino"===split[0]&&(found=_.findWhere($rootScope.casinoBonuses,{bonusName:split[1]})),found&&found.path)return found.path}}return bonus.__params&&bonus.__params.baseHref?bonus.__params.baseHref+"/"+(bonus.ParamStr||bonus.__params.defaultParam):void 0}}),filters.filter("childrenForParent",function(){return function(parent,kindergarten){var found=[];return kindergarten.forEach(function(child){child.ParentID===parent.ID&&found.push(child)}),found}}),filters.filter("hasFavorite",function(){return function(testArr,favArr){return _.find(testArr,function(testEle){return _.find(favArr,function(favEle){return testEle.ID===favEle})})}})})(),angular.module("sportbookApp.service",[]).factory("AppService",function($http,$rootScope,$sce){return{loadLabels:function(env){return"localhost"!==env?$http.post($sce.trustAsResourceUrl($rootScope.baseURL+"/Betting/GetSportbookTranslations"),{}):$http.get("data/translations.json")},keepAlive:function(){return $http.post($sce.trustAsResourceUrl($rootScope.baseURL+"/"+$rootScope.ENV.ticket.prefix+"/ChangeLanguage"),{})},loadDynamic:function(code){return"localhost"===$rootScope.ENV.name?$http.get("data/dynamic.json"):$http.get($sce.trustAsResourceUrl($rootScope.baseURL+"/base/GetDynamicPageContent"),{params:{webPageCode:code}}
1)},getDiscussionPost:function(postID){return"localhost"===$rootScope.ENV.name?$http.get("data/dynamic.json"):$http.post($sce.trustAsResourceUrl($rootScope.baseURL+"/discusion/GetPost"),{postId:postID})},getGameParts:function(){return $http.post($sce.trustAsResourceUrl($rootScope.baseURL+"/offer/GetGameParts"),{})},getClientWinsAndBets:function(){return"localhost"==$rootScope.ENV.name?$http.get("data/wins_and_bets.json"):$http.get($sce.trustAsResourceUrl("client/GetClientWinsAndBets"))},getApprovedTicketEvents:function(){return"localhost"==$rootScope.ENV.name?$http.get("data/approvedticketeventsfalse.json"):$http.post($sce.trustAsResourceUrl("ticket/GetApprovedTicketsEvents"))},addFavSport:function(sportId){return"localhost"==$rootScope.ENV.name?$http.get("data/approvedticketevents.json"):$http.post($sce.trustAsResourceUrl($rootScope.baseURL+"/betting/AddClientFavouriteSport"),{sportId:sportId})},removeFavSport:function(sportId){return"localhost"==$rootScope.ENV.name?$http.get("data/approvedticketevents.json"):$http.post($sce.trustAsResourceUrl($rootScope.baseURL+"/betting/DeleteClientFavouriteSport"),{sportId:sportId})},addFavLeague:function(leagueCupId){return"localhost"==$rootScope.ENV.name?$http.get("data/approvedticketevents.json"):$http.post($sce.trustAsResourceUrl($rootScope.baseURL+"/betting/AddClientFavouriteLeague"),{leagueCupId:leagueCupId})},removeFavLeague:function(leagueCupId){return"localhost"==$rootScope.ENV.name?$http.get("data/approvedticketevents.json"):$http.post($sce.trustAsResourceUrl($rootScope.baseURL+"/betting/DeleteClientFavouriteLeague"),{leagueCupId:leagueCupId})},addFavChanceType:function(chanceTypeId,sportId,liveBetting){return"localhost"==$rootScope.ENV.name?$http.get("data/approvedticketevents.json"):$http.post($sce.trustAsResourceUrl($rootScope.baseURL+"/betting/AddClientFavouriteChanceType"),{sportId:sportId,chanceTypeId:chanceTypeId,liveBetting:liveBetting})},getQuickbetToken:function(){return"localhost"==$rootScope.ENV.name?$http.get($sce.trustAsResourceUrl("data/quickbetToken.json")):$http.get($sce.trustAsResourceUrl($rootScope.baseURL+"/betting/GetQuickbetToken"))},removeFavChanceType:function(chanceTypeId,sportId,liveBetting){return"localhost"==$rootScope.ENV.name?$http.get("data/approvedticketevents.json"):$http.post($sce.trustAsResourceUrl($rootScope.baseURL+"/betting/DeleteClientFavouriteChanceType"),{sportId:sportId,chanceTypeId:chanceTypeId,liveBetting:liveBetting})}}}),angular.module("analysis",[]),angular.module("analysis").controller("AnalysisController",["$scope","$rootScope","$q","$timeout","AnalysisService","$sce","$filter","$location","OfferService",function($scope,$rootScope,$q,$timeout,AnalysisService,$sce,$filter,$location,OfferService){var self=this;function getAnalyses(){$scope.getAnalysesPromise=AnalysisService.getAnalyses().then(function(res){$scope.getAnalysesPromise=null;var analyses=($scope.analysesRes=res).data,offer=res.data.OfferList?JSON.parse(res.data.OfferList):null,temp=[];analyses.Analyzes=_.sortBy(analyses.Analyzes,"EndDate"),analyses.EventAnalyzeMembers.forEach(function(analysis,index){offer&&(foundCht=_.findWhere(offer.EventChanceTypes,{EventID:analysis.EventID}))&&(analysis.OddCount=0,analysis.Odds={},["1","2","X"].forEach(function(oddType){var Odd=offer.Odds[foundCht.EventChanceTypeID+"_"+oddType];Odd&&(analysis.OddCount++,analysis.Odds[oddType]=Odd)}),date=moment(foundCht.EventDate),analysis.EventDateFormatted=date.format("DD.MM."),analysis.EventTimeFormatted=date.format("H:mm"),analysis.BetradarID=foundCht.BetradarStatisticsUrl,analysis.hasStatistics=foundCht.HasBetradarHostedStatistics),analysis.SportURL=$rootScope.LanguageID+"/"+$rootScope.ENV.routes[$rootScope.LanguageID].offer+"/"+$rootScope.slugify(analysis.SportName),analysis.RegionURL=analysis.SportURL+"/"+$rootScope.slugify(analysis.RegionName),analysis.LeagueURL=analysis.RegionURL+"/"+$rootScope.slugify(analysis.LeagueCupName),analysis.EventURL=analysis.LeagueURL+"?event="+analysis.EventID,analysis.EndDate=moment(analysis.EventDate),analysis.Stats=_.findWhere(analyses.Stats,{EventID:analysis.EventID}),analysis.EventID&&$rootScope.AnalysisArray.push(analysis.EventID),analysis.StartDateString=analysis.EndDate.format("L"),analysis.StartTimeString=analysis.EndDate.format("LT"),analysis.StartDateTimeString=analysis.EndDate.format("DD.MM.YYYY HH:mm");var foundCht,date=_.findWhere(analyses.Stats,{EventID:analysis.EventID});
1analysis.total=date.Tip1+date.TipX+date.Tip2,0!=analysis.total&&(date.Tip1=date.Tip1/analysis.total*100,date.Tip1=Math.round(date.Tip1),date.TipX=date.TipX/analysis.total*100,date.TipX=Math.round(date.TipX),date.Tip2=date.Tip2/analysis.total*100,date.Tip2=Math.round(date.Tip2)),$rootScope.analysisToOpen&&$rootScope.analysisToOpen==analysis.EventID&&$timeout(function(){$rootScope.openAnalysis(analysis)},0),0==temp.length||analysis.StartDateString!=temp[temp.length-1].DateString?temp.push({Date:analysis.EndDate,DateString:analysis.StartDateString,Analyses:[analysis]}):temp[temp.length-1].Analyses.push(analysis)}),$rootScope.Analyses=temp,$(".analysis__archive").mCustomScrollbar({axis:"y",theme:"dark",documentTouchScroll:!0,mouseWheel:{scrollAmount:"160",preventDefault:!0}})},function(err){console.error(err)})}function resetIsActive(){$rootScope.Analyses.forEach(function(item,index,analysisArray){item.Analyses.forEach(function(inceptionItem,inceptionIndex,inceptionArray){inceptionItem.isActive&&(inceptionArray[inceptionIndex].isActive=!1,0)})})}$scope.$on("reset_AnalysisList",function(){$rootScope.AnalysisDetail.isActive=!1,self.resetSelection()}),self.showList=!1,$rootScope.AnalysisDetail={isActive:!1},$rootScope.Previews=[],$rootScope._Analysis=[],$rootScope.Analyses=[],self.previewsToDelete=[],self.i18n={actual:"Aktuálne",today:"Dnes",tommorow:"Zajtra",later:"Neskôr"},$scope.analysesRes=null,$scope.sendAnalyses=function(){$scope.getAnalysesPromise?$scope.getAnalysesPromise.then(function(){$scope.analysesRes?$rootScope.$broadcast("send_analyses",$scope.analysesRes):$rootScope.$broadcast("error_sending_analyses")}):$scope.analysesRes?$rootScope.$broadcast("send_analyses",$scope.analysesRes):getAnalyses()},$scope.$on("request_analyses",$scope.sendAnalyses),getAnalyses(),$rootScope.closeAnalysis=function(){UIkit.offcanvas.hide("#offcanvas-analyse"),$rootScope.AnalysisDetail&&($rootScope.AnalysisDetail.isActive=!1)},$rootScope.findAndOpenAnalysis=function(EventID){var keepGoing=!0;angular.forEach($rootScope.Analyses,function(Analyses){keepGoing&&angular.forEach(Analyses.Analyses,function(Analysis){keepGoing&&Analysis.EventID==EventID&&(keepGoing=!1,$rootScope.openAnalysis(Analysis))})})},self.openAnalysisThrottled=_.throttle(function(Analysis){self.openAnalysisUnthrottled(Analysis)},100,{trailing:!1}),$rootScope.openAnalysis=function(Analysis){self.openAnalysisThrottled(Analysis)},$rootScope.closeAnalysisOffcanvas=function(){$timeout(function(){$("#offcanvas-analyse").click()},0)},self.openAnalysisUnthrottled=function(Analysis){$timeout(function(){$("#analysisOpener").click()},0),self.temp={},resetIsActive(),Analysis.isActive=!0,$rootScope.AnalysisDetail=Analysis,"undefined"!=typeof ShowComments&&$rootScope.CommentsEnabled?ShowComments("A"+Analysis.EventID,"analysis-comments"):"undefined"!=typeof ShowAnalysisComments&&$rootScope.CommentsEnabled&&ShowAnalysisComments(Analysis.EventID),$timeout(function(){$(".progressbar__analysis").each(function(){var progressbar=$(this),fill=progressbar.attr("data-fill");$(progressbar).animate({width:[fill+"%","easeOutBounce"]},1e3)}),$("#offcanvas__content").mCustomScrollbar("scrollTo","top"),$location.hash(null)},100),$rootScope.$broadcast("request_odd_broadcast")},$scope.$on("sync_on_ticket",function(event,oddIDs){$scope.changeOnTicket(_.difference($scope.lastTicketOdds,oddIDs),!1),$scope.changeOnTicket(oddIDs,!0),$scope.lastTicketOdds=oddIDs}),$scope.lastTicketOdds=[],$scope.changeOnTicket=function(oddIDs,status){$rootScope.AnalysisDetail&&$rootScope.AnalysisDetail.Odds&&angular.forEach(["1","2","X"],function(uselessVariable){uselessVariable=$rootScope.AnalysisDetail.Odds[uselessVariable];uselessVariable&&-1!==oddIDs.indexOf(uselessVariable.OddsID)&&(uselessVariable.onTicket=status)})},self.resetSelection=function(){resetIsActive()},$rootScope.listInPreviews=function(direction){var newIndex,length,move,actIndex;"prev"!=direction&&"next"!=direction||(newIndex=null,length=$rootScope.Previews.length,move="next"==direction?1:-1,void 0!==(actIndex=_.findIndex($rootScope.Previews,{isActive:!0}))&&(newIndex=0==actIndex&&"prev"==direction?length-1:actIndex==length-1&&"next"==direction?0:actIndex+move,$rootScope.Previews[actIndex].isActive=!1,$rootScope.Previews[newIndex].isActive=!0,$rootScope.openPreview($rootScope.Previews[newIndex])))},$scope.getDayLabel=function(key){var label=null;switch(key){case"actual":label=self.i18n.actual;break;case"today":label=self.i18n.today;break;case"tomorrow":label=self.i18n.tommorow;break;case"dat":label=moment().add(2,"days").format("DD.MM. (dddd)");break;case"dat1":label=moment().add(3,"days").format("DD.MM. (dddd)");break;default:label=self.i18n.later}return label},_cleanDate=function(datetime){return regex=new RegExp("'","g"),datetime.replace(regex,"")}
1,_cleanJsonStr=function(jsonstring){return jsonstring.replaceAll("};{",",")},String.prototype.replaceAll=function(str1,str2,ignore){return this.replace(new RegExp(str1.replace(/([\/\,\!\\\^\$\{\}\[\]\(\)\.\*\+\?\|\<\>\-\&])/g,"\\$&"),ignore?"gi":"g"),"string"==typeof str2?str2.replace(/\$/g,"$$$$"):str2)},$rootScope.toggleAnalysisOdd=function(oddID){$rootScope.toggleOdd(oddID)}}]),angular.module("analysis").filter("analysisTime",function($sce){return function(Preview){var content;return Preview?(content="",content="other"===Preview.day?moment(Preview.EventStart,"YYYY-MM-DD HH:mm:ss").format("DD.MM. HH:mm"):Preview.Time,$sce.trustAsHtml(content)):null}}),angular.module("analysis").service("AnalysisService",["$http","$rootScope","$sce",function($http,$rootScope,$sce){let StatsURL=$rootScope.baseURL+"/Base/GetEventTipStats";return{getAnalyses:function(){return $http.post($sce.trustAsResourceUrl($rootScope.baseURL+"/base/GetEventAnalyzes"),{sendTipStats:1})},getEventInfo:function(previewID){var request=null,request="localhost"===$rootScope.ENV.name?"data/analysis/"+previewID+".json":"https://live-cf.doxxbet.sk/data/chances/"+previewID+".json?lang=sk";return $http.get($sce.trustAsResourceUrl(request))},getStats:function(EventID){return $http.post($sce.trustAsResourceUrl(StatsURL),{eventId:EventID})},loadChanceTypes:function(EventID){return $http.post($sce.trustAsResourceUrl($rootScope.baseURL+"/offer/GetOfferEventMasterChanceType"),{eventId:EventID})}}}]),angular.module("analysisHistory",[]),angular.module("analysisHistory").controller("AnalysisHistoryController",["$scope","$rootScope","routeName","showSingle","$routeParams","$timeout","AnalysisHistoryService",function($scope,$rootScope,routeName,showSingle,$routeParams,$timeout,AnalysisHistoryService){$scope.$on("$routeChangeSuccess",function(){$rootScope.keepAlive(),$rootScope.removeInvalidSearch([]),$rootScope.deactivateMenu(),$scope.pages=[],$scope.dateLinks=[],$scope.pageSize=10,$scope.showPrevious=!1,$scope.showNext=!1,$scope.listURL=null,$scope.showSingle=showSingle,$scope.analysis=null,$scope.highlightCalendar=!1,$scope.isLoadingFinished=!1,$scope.lastTicketOdds=[],$scope.showSingle?$scope.loadAnalysis($routeParams.id):($scope.analyses=[],$routeParams.date?$routeParams.page?($scope.date=$routeParams.date,$scope.currentPage=parseInt($routeParams.page)):/\d+\-\d+\-\d+/.test($routeParams.date)?($scope.date=$routeParams.date,$scope.currentPage=1):($scope.date=null,$scope.currentPage=parseInt($routeParams.date)):($scope.date=null,$scope.currentPage=1),$timeout(function(){var parsedDate;$scope.analysisDatepicker&&$scope.analysisDatepicker.destroy(),$scope.analysisDatepicker=$("input#analysesFilterDate").datepicker({language:$rootScope.LanguageID,startDate:new Date,dateFormat:"YYYY-MM-DD",autoClose:!0,onSelect:function(formattedDate,date){(formattedDate=moment(date)).isValid()&&$timeout(function(){$rootScope.openURL($scope.analysesURLNoDate+formattedDate.format("YYYY-MM-DD"))})}}).data("datepicker"),$scope.date&&((parsedDate=$rootScope.dateFromString($scope.date))?$scope.analysisDatepicker.selectDateNoUpdate(parsedDate):$scope.analysisDatepicker.clear())},0,!1),$scope.analysesURLNoPage=$rootScope.LanguageID+"/"+$rootScope.ENV.routes[$rootScope.LanguageID].analyses+"/"+($scope.date?$scope.date+"/":""),$scope.analysesURLNoDate=$rootScope.LanguageID+"/"+$rootScope.ENV.routes[$rootScope.LanguageID].analyses+"/",$scope.analysisURLNoID=$rootScope.LanguageID+"/"+$rootScope.ENV.routes[$rootScope.LanguageID].analysis+"/",$scope.loadAnalyses($scope.date,$scope.currentPage)),$rootScope.$broadcast("load_sidebar",{type:"landing",params:{live:!1,date:!1,streamOnly:!1},routeName:routeName}),$timeout(function(){$rootScope.removeScrollMain()},0,!1)}),$scope.$on("$destroy",function(){}),$scope.dateSelectAnalysis=function(){var filterDate=$("input#analysesFilterDate").val();filterDate&&$timeout(function(){$rootScope.openURL($scope.analysesURLNoDate+filterDate)},0)},$scope.createPageNumbers=function(){$scope.pages=[],$scope.totalPages=Math.ceil($scope.totalCount/$scope.pageSize),1===$scope.currentPage?$scope.showPrevious=!1:$scope.showPrevious=!0,$scope.showNext=$scope.currentPage!==$scope.totalPages,$scope.showPrevious?$scope.showNext?$scope.pages=[$scope.currentPage-1,$scope.currentPage,$scope.currentPage+1]:(0<$scope.currentPage-2&&$scope.pages.push($scope.currentPage-2),$scope.pages.push($scope.currentPage-1,$scope.currentPage)):$scope.showNext?($scope.pages=[$scope.currentPage,$scope.currentPage+1],$scope.currentPage+2<=$scope.totalPages&&$scope.pages.push($scope.currentPage+2)):$scope.pages=[$scope.currentPage]},$scope.createDateLinks=function(){$scope.dateLinks=[],$scope.dateLinks.push({label:$rootScope.L
1ang.App.yesterday,url:$scope.analysesURLNoDate+moment().subtract(1,"days").format("YYYY-MM-DD"),dateString:moment().subtract(1,"days").format("YYYY-MM-DD")},{label:$rootScope.Lang.App.today,url:$scope.analysesURLNoDate+moment().format("YYYY-MM-DD"),dateString:moment().format("YYYY-MM-DD")},{label:$rootScope.Lang.App.tomorrow,url:$scope.analysesURLNoDate+moment().add(1,"days").format("YYYY-MM-DD"),dateString:moment().add(1,"days").format("YYYY-MM-DD")},{label:moment().add(2,"days").format("dddd"),url:$scope.analysesURLNoDate+moment().add(2,"days").format("YYYY-MM-DD"),dateString:moment().add(2,"days").format("YYYY-MM-DD")},{label:$rootScope.Lang.App.all,url:$scope.analysesURLNoDate,dateString:null}),$scope.highlightCalendar=!0,$scope.dateLinks.forEach(function(dateLink){$scope.highlightCalendar=$scope.highlightCalendar&&$scope.date!==dateLink.dateString})},$scope.loadAnalyses=function(date,page){var startIndex;$rootScope.isAppLoaded()?(startIndex=(page-1)*$scope.pageSize,AnalysisHistoryService.getAnalysesByDate(date,startIndex,$scope.pageSize).then(function(res){var dataAnalyses;res.data.Response.Analyzes&&(dataAnalyses=res.data.Response.Analyzes,$scope.totalCount=res.data.Response.Count,dataAnalyses.forEach(function(dataAnalysis){var analysisToPush={ID:dataAnalysis.EventID,URL:$scope.analysisURLNoID+dataAnalysis.EventID,article:dataAnalysis.Article,teamHome:dataAnalysis.TeamHome,teamAway:dataAnalysis.TeamAway,date:moment(dataAnalysis.EndDate),sportName:dataAnalysis.SportName,regionName:dataAnalysis.RegionName,leagueName:dataAnalysis.LeagueCupName,sportID:dataAnalysis.SportID,imageAlt:dataAnalysis.BannerImageAlt,imageTitle:dataAnalysis.BannerImageTitle};analysisToPush.sportURL=$rootScope.LanguageID+"/"+$rootScope.ENV.routes[$rootScope.LanguageID].offer+"/"+$rootScope.slugify(dataAnalysis.SportName),analysisToPush.regionURL=analysisToPush.sportURL+"/"+$rootScope.slugify(dataAnalysis.RegionName),analysisToPush.leagueURL=analysisToPush.regionURL+"/"+$rootScope.slugify(dataAnalysis.LeagueCupName),analysisToPush.dateString=analysisToPush.date.format("DD.MM.YYYY"),$scope.analyses.push(analysisToPush)}),$scope.createPageNumbers(),$scope.createDateLinks())},function(err){}).finally(function(){$scope.isLoadingFinished=!0})):$timeout(function(){$scope.loadAnalyses(date,page)},200,!1)},$scope.loadAnalysis=function(ID){AnalysisHistoryService.getAnalysisByID(ID).then(function(res){var dataAnalysis;res.data.Response.EventAnalyse&&(dataAnalysis=res.data.Response.EventAnalyse,$scope.analysis={ID:dataAnalysis.EventID,image:dataAnalysis.Banner,article:dataAnalysis.Article,teamHome:dataAnalysis.TeamHome,teamAway:dataAnalysis.TeamAway,date:moment(dataAnalysis.EndDate),sportName:dataAnalysis.SportName,regionName:dataAnalysis.RegionName,leagueName:dataAnalysis.LeagueCupName,sportID:dataAnalysis.SportID,showStats:dataAnalysis.ShowStats,imageAlt:dataAnalysis.BannerImageAlt,imageTitle:dataAnalysis.BannerImageTitle},$scope.analysis.dateString=$scope.analysis.date.format("DD.MM.YYYY"),$scope.analysis.shortDateString=$scope.analysis.date.format("DD.MM. H:mm"),$scope.analysis.eventURL=$rootScope.LanguageID+"/"+$rootScope.ENV.routes[$rootScope.LanguageID].offer+"/"+$rootScope.slugify(dataAnalysis.SportName)+"/"+$rootScope.slugify(dataAnalysis.RegionName)+"/"+$rootScope.slugify(dataAnalysis.LeagueCupName)+"?event="+dataAnalysis.EventID,$scope.analysis.showStats&&(dataAnalysis=res.data.Stats,$scope.analysis.totalBets=dataAnalysis.Tip1+dataAnalysis.TipX+dataAnalysis.Tip2,0!=$scope.analysis.totalBets)&&($scope.analysis.tip1=dataAnalysis.Tip1/$scope.analysis.totalBets*100,$scope.analysis.tip1=Math.round($scope.analysis.tip1),$scope.analysis.tipX=dataAnalysis.TipX/$scope.analysis.totalBets*100,$scope.analysis.tipX=Math.round($scope.analysis.tipX),$scope.analysis.tip2=dataAnalysis.Tip2/$scope.analysis.totalBets*100,$scope.analysis.tip2=Math.round($scope.analysis.tip2)),$timeout(function(){$(".progressbar__analysis").each(function(){var progressbar=$(this),fill=progressbar.attr("data-fill");$(progressbar).animate({width:[fill+"%","easeOutBounce"]},1e3)}),"undefined"!=typeof ShowComments&&$rootScope.CommentsEnabled?ShowComments("A"+$scope.anal
1ysis.ID,"analysis-comments"):"undefined"!=typeof ShowAnalysisComments&&$rootScope.CommentsEnabled&&ShowAnalysisComments($scope.analysis.ID)},100),moment()<$scope.analysis.date)&&$scope.loadMasterCht()},function(err){}).finally(function(){$scope.isLoadingFinished=!0})},$scope.loadMasterCht=function(){AnalysisHistoryService.loadChanceTypes($scope.analysis.ID).then(function(res){var chanceTypes=res.data;if($scope.analysis.odds={},$scope.analysis.oddCount=0,chanceTypes.Event)for(var key in $scope.analysis.Event=chanceTypes.Event,chanceTypes.Odds)chanceTypes.Odds.hasOwnProperty(key)&&($scope.analysis.odds[chanceTypes.Odds[key].TipType]=chanceTypes.Odds[key]);angular.forEach(["1","2","X"],function(type){$scope.analysis.odds[type]&&$scope.analysis.oddCount++}),$rootScope.$broadcast("request_odd_broadcast")},function(err){})},$scope.$on("sync_on_ticket",function(event,oddIDs){$scope.changeOnTicket(_.difference($scope.lastTicketOdds,oddIDs),!1),$scope.changeOnTicket(oddIDs,!0),$scope.lastTicketOdds=oddIDs}),$scope.changeOnTicket=function(oddIDs,status){$scope.analysis&&$scope.analysis.odds&&angular.forEach(["1","2","X"],function(type){type=$scope.analysis.odds[type];type&&-1!==oddIDs.indexOf(type.OddsID)&&(type.onTicket=status)})}}]),angular.module("analysisHistory").service("AnalysisHistoryService",["$http","$rootScope","$sce",function($http,$rootScope,$sce){return{getAnalysesByDate:function(date,startIndex,pageSize){return"localhost"!==$rootScope.ENV.name?$http.post($sce.trustAsResourceUrl($rootScope.baseURL+"/base/GetEventAnalyzesFilter"),{date:date||"",startIndex:startIndex,pageSize:pageSize}):$http.get("data/analysisHistory.json")},getAnalysisByID:function(ID){return"localhost"!==$rootScope.ENV.name?$http.post($sce.trustAsResourceUrl($rootScope.baseURL+"/base/GetEventAnalyze"),{sendTipStats:"true",eventId:ID}):$http.get("data/analysisHistorySingle.json")},loadChanceTypes:function(EventID){return $http.post($sce.trustAsResourceUrl($rootScope.baseURL+"/offer/GetOfferEventMasterChanceType"),{eventId:EventID})}}}]),angular.module("banner",[]).run(["$rootScope","$timeout","$sce","BannerService",function($rootScope,$timeout,$sce,BannerService){var unwatch=$rootScope.$watch("ENV",function(oldValue,newValue){newValue.name&&BannerService.loadBanners().then(function(res){res=res.data;res&&0<res.length&&($rootScope.Banners=[],res.forEach(function(ele,index){ele.BannerText=$sce.trustAsHtml(ele.BannerText),ele.StartDate=new Date(parseInt(ele.StartDate.substr(6))),ele.trueSlideNum=index,(!ele.BannerType||["casino","betting","neutral"].indexOf(ele.BannerType)<0)&&(ele.BannerType="neutral"),ele.BannerTitle&&20<ele.BannerTitle.length?ele.ShowSmallHeading=!0:ele.ShowSmallHeading=!1,$rootScope.Banners.push(ele)}))},function(err){console.error(err)}).finally(function(){$rootScope.showApp(),unwatch()})})}]),angular.module("banner").controller("BannerController",["$scope","$rootScope","$element","$timeout",function($scope,$rootScope,$element,$timeout){$scope.isSliderInited=!1,$element=angular.element(".main__slider"),$scope.banner=$element.find("#landing-banner"),$scope.bannerPreview=$element.find("#landing-banner-preview"),$scope.banners=[],$scope.PREVIEW_HEIGHT=75,$scope.PREVIEW_WIDTH=122,$scope.onResize=function(){var newWidth=Math.min($element[0].clientWidth,1320);$scope.bannerPreview.closest(".preview").css("transform","scale("+newWidth/1e3+")"),$scope.banner.find(".slide-inner").css("transform","scale("+newWidth/1e3+")")},$(window).on("resize",$scope.onResize),$scope.initSlider=function(){$scope.onResize(),$scope.isSliderInited&&($scope.banner.slick("unslick"),$scope.bannerPreview.slick("unslick"),$scope.stopBannerAnimation(),$element.find(".progressAnimation").off("animationend",$scope._onAnimationEnd),$scope.banner.off("beforeChange",$scope._onBeforeChange)),$scope.banner.slick({dots:!0,infinite:!0,slidesToShow:1,slidesToScroll:1,accessibility:!1,arrows:!1,lazyLoad:"ondemand",nextArrow:$element.find(".next-slide-button")}),$scope.bannerPreview.slick({dots:!1,infinite:!0,slidesToShow:1,slidesToScroll:1,accessibility:!1,arrows:!1,lazyLoad:"ondemand",initialSlide:1}),$scope.banner.on("beforeChange",$scope._onBeforeChange),$element.find(".progressAnimation").on("animationend",$scope._onAnimationEnd),$scope.animate(null,0)},$scope.animate=function(currentSlide,nextSlide){$element.find(".progressAnimation").removeClass("progress"),$element.find(".progressAnimation").replaceWith($element.find(".progressAnimation").clone(!0)),$scope.banners[nextSlide].Timing?$element.find(".progressAnimation").css("animation-duration",$scope.banners[nextSlide].Timing+"ms"):$element.find(".progressAnimation").css("animation-duration","6000ms"),$element.find(".progressAnimation").addClass("progress")},$scope._onBeforeChange=function(event,slick,currentSlide,nextSlide){currentSlide!==nextSlide&&($scope.bannerPreview.slick("slickGoTo",nextSlide+1),$scope.animate(currentSlide,nextSlide))},$scope._onAnimationEnd=function(){$element.find(".progressAnimation").removeClass("progress"),$scope.nextSlide()},$scope.stopBannerAnimation=function(){$element.find(".progressAnimation").removeClass("paused progress"),$element.find(".progressAnimation").css("animation-duration","unset")},$scope.pauseBannerAnimation=function(){$element.find(".progressAnimation").addClass("paused")},$scope.resumeBannerAnimation=function(){$element.find(".progressAnimation").removeClass("paused")},$scope.nextSlide=function(){$scope.banner.slick("slickNext")},$scope.bannerSortFnLogged=function(a,b){return b.LoggedClientRecordOrder-a.LoggedClientRecordOrder},$scope.bannerSortFn=function(a,b){return b.RecordOrder-a.RecordOrder},$rootScope.$watchGroup(["RegistrationDuration","::Banners"],function(newValues,oldValues){!isNaN(newValues[0])&&14<newValues[0]?$scope.banners=newValues[1].sort($scope.bannerSortFnLogged):$scope.banners=newValues[1].sort($scope.bannerSortFn),$timeout(function(){$scope.initSlider(),$scope.isSliderInited=!0},0)})}]),angular.module("banner").service("BannerService",["$http","$rootScope","$sce",function($http,$rootScope,$sce){return{loadBanners:function(){return"localhost"!==$rootScope.ENV.name?$http.post($sce.trustAsResourceUrl($rootScope.baseURL+"/base/GetPortalBanners"),{}):$http.get("data/banners.json")}}}]),angular.module("bonuses",[]),angular.module("bonuses").controller("BonusesController",["$scope","$rootScope","bonusType","menuTitle",function($scope,$rootScope,bonusType,menuTitle){$scope.$on("$routeChangeSuccess",function(){$scope.$emit("load_bonuses"),$rootScope.keepAlive(),$rootScope.activateMenu(menuTitle),$rootScope.removeInvalidSearch([]),$scope.bonusType=bonusType}),$rootScope.$broadcast("load_sidebar",{type:"landing",params:{live:!1,date:!1,streamOnly:!1},routeName:"bonusy-a-akcie"}),$scope.$on("$destroy",function(){})}]),angular.module("bonuses").service("BonusesService",["$http","$rootScope","$sce",function($http,$rootScope,$sce){return{getPortalBonuses:function(){return"localhost"==$rootScope.ENV.name?$http.get("data/portalBonuses.json"):$http.get($sce.trustAsResourceUrl($rootScope.baseURL+"/base/GetPortalBonuses"),{})},getCasinoBonuses:function(){return"localhost"==$rootScope.ENV.name?$http.get("data/casinoBonuses.json"):$http.get($sce.trustAsResourceUrl($rootScope.baseURL+"/casino/GetCasinoBonuses"),{})}}}]),angular.module("dynamic",[]),angular.module("dynamic").controller("DynamicController",["$scope","$rootScope","$sce","DynamicService","routeName","menuTitle","$routeParam
1s","$location","$timeout",function($scope,$rootScope,$sce,DynamicService,routeName,menuTitle,$routeParams,$location,$timeout){var routeParam="CompetitionEnd";$scope.bonusName=null,$scope.showBonusButton=!1,$scope.$on("$routeChangeSuccess",function(){$rootScope.keepAlive(),menuTitle&&$rootScope.activateMenu(menuTitle),$scope.initDynamic(),$rootScope.removeInvalidSearch(["ticketCode"]),$scope.$emit("load_bonuses")}),$scope.$on("$destroy",function(){$rootScope.hideFooter=!1,$rootScope.deactivateMenu()}),$scope.initDynamic=function(){if($rootScope.isAppLoaded()){if($scope.bonusName=null,"AboutUs"===menuTitle)$scope.openDynamic("AboutUs");else if($routeParams.name)Object.keys($rootScope.webPagesUrl).forEach(function(key){$rootScope.webPagesUrl[key].Url==$routeParams.name&&(routeParam=key,$scope.bonusName=$rootScope.webPagesUrl[key].BonusName)}),$scope.openDynamic(routeParam,$scope.bonusName);else switch(routeName){case $rootScope.ENV.routes[$rootScope.LanguageID].betforum:$routeParams.postid?$scope.openPost($routeParams.postid):$scope.openDynamic("betforum");break;case $rootScope.ENV.routes[$rootScope.LanguageID].sportnews:$scope.openDynamic("SportsNews");break;case $rootScope.ENV.routes[$rootScope.LanguageID].ticketoftheday:$scope.openDynamic("ticket-of-the-day");break;case $rootScope.ENV.routes[$rootScope.LanguageID].agent:$scope.openDynamic("agencyForm");break;case $rootScope.ENV.routes[$rootScope.LanguageID].career:$scope.openDynamic("Career");break;case $rootScope.ENV.routes[$rootScope.LanguageID].affiliate:$scope.openDynamic("Affiliate");break;default:$scope.openDynamic("SpecialOffers")}$rootScope.$broadcast("regular_ticket")}else $timeout(function(){$scope.initDynamic()},200,!1)};$scope.$on("request_ticket_identity_change",function(){$rootScope.$broadcast("regular_ticket")}),$rootScope.$broadcast("load_sidebar",{type:"landing",params:{live:!1,date:!1,streamOnly:!1},routeName:routeName}),$scope.$on("$destroy",function(){$("#sportbook-main-container").off("scroll",$scope.playerOfTheDayOnScroll)}),$rootScope.$on("ticket_loaded",function(){$rootScope.$broadcast("regular_ticket")}),$rootScope.playerOfTheDayOnScroll=function(){var scrollElement=document.getElementById("sportbook-main-container");scrollElement.scrollTop+scrollElement.offsetHeight+$("#main-footer").height()>scrollElement.scrollHeight&&onTotalScrollHistoryTipOfTheDay()},$scope.openDynamic=function(pageName,bonusName){var paramToSend=null;switch(routeName){case $rootScope.ENV.routes[$rootScope.LanguageID].betforum:paramToSend=$location.search().ticketCode;break;case $rootScope.ENV.routes[$rootScope.LanguageID].ticketoftheday:if(!$routeParams.ticketcode)return void $location.url($rootScope.TicketOfTheDay.URL);paramToSend=$routeParams.ticketcode}DynamicService.loadDynamic(pageName,paramToSend,bonusName).then(function(res){if($rootScope.setPageTitle(pageName),"sportnews"!==routeName)switch(pageName){case $rootScope.ENV.routes[$rootScope.LanguageID].ticketoftheday:$("#sportbook-main-container").on("scroll",$scope.playerOfTheDayOnScroll);break;case $rootScope.ENV.routes[$rootScope.LanguageID].betforum:$rootScope.hideFooter=!0}$rootScope.showApp();res=res.data;$scope.DynamicPage=$sce.trustAsHtml(res.Content),$scope.showBonusButton=res.HasDetail,$rootScope.portalBonuses&&$scope.checkForBonus($rootScope.portalBonuses),$rootScope.casinoBonuses&&$scope.checkForBonus($rootScope.casinoBonuses)},function(err){console.warn(err),$location.url("/"+$rootScope.LanguageID)}).finally(function(){$timeout(function(){$scope.$broadcast("load_offer",{sport:54,region:838,live:!1,forceAll:!0})})})},$scope.openBonusDetail=function(bonusName){openBonusDetail(bonusName)},$scope.checkForBonus=function(bonusArr){bonusArr.forEach(function(bonus){bonus.isActive=0<bonus.endDate.diff(moment()),"/"+bonus.path!==window.location.pathname||bonus.isActive||$scope.markAsFinished(bonus)})},$scope.$on("portalbonuses_loaded",function(){$scope.checkForBonus($rootScope.portalBonuses)}),$scope.$on("casinobonuses_loaded",function(){$scope.checkForBonus($rootScope.casinoBonuses)}),$scope.markAsFinished=function(bonus){$timeout(function(){var closedElement="<div class='alert alert--warning font--12 uk-flex uk-flex-middle'><div class='notification__icon'><svg class='icon icon-alert'><use xlink:href='#icon-alert'></use></svg></div><div class='uk-flex-item-auto'><h5 class='font--14'>
1"+$rootScope.Lang.App.promotion_has_ended+"</h5><div class='color-descr'>"+$rootScope.Lang.App.promotion_was_active_between.replace("#STARTDATE#",bonus.startDate.format("DD. MM. YYYY")).replace("#ENDDATE#",bonus.endDate.format("DD. MM. YYYY"))+"</div></div></div>";$("article.page-standart").addClass("closed").prepend(closedElement)},0,!1)},$scope.openPost=function(postID){DynamicService.getDiscussionPost(postID).then(function(res){$rootScope.hideFooter=!0,$rootScope.showApp();res=res.data;$scope.DynamicPage=$sce.trustAsHtml(res.Content)},function(err){console.warn(err),$location.url("/"+$rootScope.LanguageID)})}}]),angular.module("dynamic").service("DynamicService",["$http","$rootScope","$q","$sce",function($http,$rootScope,$q,$sce){return{loadDynamic:function(code,extraparam,bonusName){switch(code){case"betforum":return $http.get($sce.trustAsResourceUrl($rootScope.baseURL+"/base/GetDynamicPageForBetForum"),{params:{ticketCode:extraparam}});case"ticket-of-the-day":return $http.get($sce.trustAsResourceUrl($rootScope.baseURL+"/base/GetTicketOfTheDay"),{params:{ticketCode:extraparam}});default:return $http.get($sce.trustAsResourceUrl($rootScope.baseURL+"/base/GetDynamicPageContent"),{params:{webPageCode:code,bonusName:bonusName}})}},getDiscussionPost:function(postID){return"localhost"==$rootScope.ENV.name?$http.get("data/dynamic.json"):$http.post($sce.trustAsResourceUrl($rootScope.baseURL+"/discusion/GetPost"),{postId:postID})}}}]),angular.module("external",[]),sportbookControll=function(event,params){switch(event){case"loadHome":angular.element($("#externalController")).scope().loadHome();break;case"loadToday":angular.element($("#externalController")).scope().loadToday();break;case"loadLive":angular.element($("#externalController")).scope().loadLive();break;case"loadOffer":angular.element($("#externalController")).scope().loadOffer(params);break;case"openSearchModal":angular.element($("#externalController")).scope().openSearchModal();break;case"openNews":UIkit.offcanvas.show("#offcanvas-news");break;case"openResults":angular.element($("#externalController")).scope().openResults();break;case"getDynamicPage":angular.element($("#externalController")).scope().openDynamic(params);break;case"openDiscussionPost":angular.element($("#externalController")).scope().openDiscussionPost(params);break;case"reloadTicket":angular.element($("#externalController")).scope().reloadTicket();break;case"openAnalysis":angular.element($("#externalController")).scope().openAnalysis(params);break;case"openEvent":angular.element($("#externalController")).scope().openEvent(params);break;case"toggleVirtual":angular.element($("#externalController")).scope().toggleVirtual()}},sportbookURL=function(url){angular.element($("#externalController")).scope().loadUrl(url)},setOfferDate=function(date){angular.element($("#externalController")).scope().setOfferDate(date)},setResultsDate=function(date){angular.element($("#externalController")).scope().setResultsDate(date)},resetAnalysisSelection=function(){angular.element($("#externalController")).scope().resetAnalysis()},closeChat=function(){angular.element($("#externalController")).scope().closeChat()},parseScoreTest=function(score,sportID){angular.element($("#externalController")).scope().parseScoreTest(score,sportID)},restoreTicketExternal=function(code){angular.element($("#externalController")).scope().restoreTicket(code)},setVflMatchday=function(params){angular.element($("#externalController")).scope().virtualIframeCall("setVflMatchday",params)},setVfMatches=function(params){angular.element($("#externalController")).scope().virtualIframeCall("setVfMatches",params)},setVfecMatches=function(params){angular.element($("#externalController")).scope().virtualIframeCall("setVfecMatches",params)},setVblMatchday=function(params){angular.element($("#externalController")).scope().virtualIframeCall("setVblMatchday",params)},switchEvents=function(params){angular.element($("#externalController")).scope().virtualIframeCall("switchEvents",params)},setVtoRound=function(params){angular.element($("#externalController")).scope().virtualIframeCall("setVtoRound",params)}
1,setVhkRace=function(params){angular.element($("#externalController")).scope().virtualIframeCall("setVhkRace",params)},setVdrRace=function(params){angular.element($("#externalController")).scope().virtualIframeCall("setVdrRace",params)},Number.isInteger=Number.isInteger||function(value){return"number"==typeof value&&isFinite(value)&&Math.floor(value)===value},updateTicketHistoryAngular=function(){angular.element($("#externalController")).scope().updateTicketHistory()},removeAffiliate=function(){angular.element($("#externalController")).scope().removeAffiliate()},extOpenSidebarRiskInfo=function(){angular.element($("#externalController")).scope().openSidebarRiskInfo()},extCloseSidebarRiskInfo=function(){angular.element($("#externalController")).scope().closeSidebarRiskInfo()},openBettingLimits=function(){angular.element($("#externalController")).scope().openBettingLimits()},openSearchModal=function(){angular.element($("#externalController")).scope().openSearchModal()},forceTicketBuybackUpdate=function(ticketCode){angular.element($("#externalController")).scope().updateTicketBuyback(ticketCode)},startTicketEdit=function(ticketCode){angular.element($("#externalController")).scope().callEditTicket(ticketCode)},gamePartsLoaded=function(){angular.element($("#externalController")).scope().gamePartsLoaded()},window.addEventListener("message",function(event){angular.element($("#externalController")).scope().actOnMessage(event)}),openTicketSection=function(){angular.element($("#externalController")).scope().openTicketSection()},sportbookOpenQuickbets=function(){angular.element($("#externalController")).scope().sportbookOpenQuickbets()},angular.module("external").controller("ExternalController",["$scope","$rootScope","$q","$location","$timeout","$route","SidebarService",function($scope,$rootScope,$q,$location,$timeout,$route,SidebarService){$scope.loadHome=function(){$rootScope.changeView("landing")},$scope.loadLive=function(){$rootScope.requestParams.live||$rootScope.$broadcast("load_live_offer")},$scope.loadUrl=function(url){$timeout(function(){var currentPath=$location.path();$location.url(url),currentPath===$location.path()&&$route.reload()})},$scope.openResults=function(){"results"===$rootScope.currentView?$rootScope.$broadcast("reset_offer"):$rootScope.$broadcast("init_sidebar",{forceLoadView:"results"})},$scope.openDynamic=function(params){$rootScope.isVirtual&&$rootScope.toggleVirtual(),$rootScope.openDynamic(params)},$scope.openDiscussionPost=function(params){$rootScope.openDiscussionPost(params)},$scope.reloadTicket=function(){$rootScope.$broadcast("reload_ticket")},$scope.virtualIframeCall=function(name,params){$rootScope.$broadcast("virtual_round_change",{name:name,data:params})},$scope.restoreTicket=function(code){$rootScope.$broadcast("restore_ticket",code)},$scope.setOfferDate=function(date,type){if($rootScope.isVirtual&&$rootScope.toggleVirtual(),"today"==$rootScope.currentView&&"TD"==date&&"day"==type)$rootScope.$broadcast("reset_offer");else{if(!date)return!1;"day"!=type&&(date=moment(date,"DD.MM.YYYY").format("YYYYMMDD")),$rootScope.$broadcast("set_OfferDateTime",{date:date,type:type})}},$scope.setResultsDate=function(date,type){if(!date)return!1;"day"!=type&&(date=moment(date,"DD.MM.YYYY").format("YYYYMMDD")),$rootScope.$broadcast("set_ResultsDateTime",{date:date,type:type})},$scope.openSearchModal=function(){var modal=UIkit.modal("#modal-search");modal.isActive()||modal.show()},$scope.resetAnalysis=function(){$rootScope.$broadcast("reset_AnalysisList")},$scope.closeChat=function(){$rootScope.$broadcast("disable_Chat")},$rootScope.toggleVirtual=function(){},$scope.parseScoreTest=function(score,sportID){console.log($rootScope.parseScore(score,sportID))},$scope.openAnalysis=function(EventID){$rootScope.findAndOpenAnalysis(EventID)},$scope.updateTicketHistory=function(){$rootScope.$broadcast("refresh_ticket_history")},$scope.removeAffiliate=function(){$scope.$emit("remove_affiliate")},$scope.openSidebarRiskInfo=function(){$rootScope.showRiskInfo(!0)},$scope.closeSidebarRiskInfo=function(){$rootScope.hideSidebarRiskInfo()},$scope.openBettingLimits=function(){setTimeout(function(){$("#li_responsible_gaming").trigger("click"),$(".radiobuttons-display-type-content input[display-type=sport-betting-content]").trigger("click"),$('a[href="#offcanvas-account"]').trigger("click")},10)},$scope.updateTicketBuyback=function(ticketCode){$rootScope.$broadcast("request_buyback_load",{ticketCode:ticketCode})},$scope.gamePartsLoaded=function(){$rootScope.$broadcast("gameparts_loaded")},$scope.$on("sync_on_ticket",function(){window.postMessage({type:"[Odd] set odds on betslip",data:{odds:$rootScope.Ticket.Odds}},"*")}),$scope.openTicketSection=function(){$rootScope.$broadcast("open_ticket_section")},$scope.actOnMessage=function(event){switch(event.data.type){case"[Offer] initialized":$rootScope.$broadcast("request_odd_broadcast");break;case"[Odd] click":$rootScope.toggleOdd(event.data.data.odd.OddsID);break;case"[League] click":var data=event.data.data.league;
1$rootScope.openURL("/"+$rootScope.LanguageID+"/"+$rootScope.ENV.routes[$rootScope.LanguageID].offer+"/"+$rootScope.slugify(data.SportName)+"/"+$rootScope.slugify(data.RegionName)+"/"+$rootScope.slugify(data.LeagueName));break;case"[Event] click":var data=event.data.data.event,urlToOpen="/"+$rootScope.LanguageID+"/"+("Y"===data.LiveBetting?$rootScope.ENV.routes[$rootScope.LanguageID].live:$rootScope.ENV.routes[$rootScope.LanguageID].offer)+"/"+$rootScope.slugify(data.SportName)+"/"+$rootScope.slugify(data.RegionName)+"/"+$rootScope.slugify(data.LeagueName)+"?event="+data.EventID;switch(event.data.data.section){case"bet-builder":urlToOpen+="&group=betbuilder";break;case"analysis":$rootScope.findAndOpenAnalysis(data.EventID);break;case"stats":$timeout(function(){$rootScope.openBetRadarStatistics(data.BetradarStatisticsUrl)})}$rootScope.openURL(urlToOpen)}},$scope.callEditTicket=function(ticketCode){$rootScope.$broadcast("start_ticket_edit",ticketCode)},$scope.sportbookOpenQuickbets=function(){$rootScope.openQuickbets()},window.addEventListener("geniussportsmessagebus",function(ev){"player_ready"===ev.detail.type&&$rootScope.$broadcast("betgenius_stream_player_ready")}),window.addEventListener("message",function(ev){ev.data.trackerHeight&&$rootScope.$broadcast("set_matchtracker_height",ev.data.trackerHeight),!ev.data.event_id||"result_bet_event"!==ev.data.event_id&&"place_bet_event"!==ev.data.event_id||updateBalance(!1)})}]),angular.module("landing",[]),angular.module("landing").directive("adaptiveGamesWidth",[function(){return{restrict:"A",scope:{adaptiveGamesWidth:"="},link:function(scope,element,attrs){$(window).resize(function(){scope.onResize()}),scope.onResize=function(){var firsRowCount;scope.adaptiveGamesWidth&&(firsRowCount=Math.ceil(scope.adaptiveGamesWidth.length/2),2919<document.body.clientWidth?element.css("maxWidth",275*firsRowCount):1919<document.body.clientWidth?element.css("maxWidth",236*firsRowCount):element.css("maxWidth",175*firsRowCount))};var unwatch=scope.$watch("adaptiveGamesWidth",function(newValue){newValue&&(scope.onResize(),unwatch())})}}}]),angular.module("landing").controller("LandingController",["$scope","$rootScope","$location","$sce","langRedirect","LandingService","resolveFunction",function($scope,$rootScope,$location,$sce,langRedirect,LandingService,resolveFunction){$scope.queryFunction={club:function(){openDoxxClubSectionClick()}},$scope.$on("$routeChangeSuccess",function(){$rootScope.keepAlive(),resolveFunction&&$scope.queryFunction[resolveFunction]&&$scope.queryFunction[resolveFunction](),langRedirect?$location.url("/"+$rootScope.LanguageID):($rootScope.$broadcast("regular_ticket"),$rootScope.deactivateMenu(),$rootScope.removeInvalidSearch(),$rootScope.$broadcast("load_sidebar",{type:"landing",params:{live:!1,date:!1,streamOnly:!1}}),$rootScope.setPageTitle("default-meta"),$rootScope.ENV.enableCasino&&($scope.loadCasinoGames("casino"),$scope.loadCasinoGames("rio")),$rootScope.showDescriptionView=!0)}),$scope.$on("$destroy",function(){$rootScope.deactivateMenu(),$rootScope.showDescriptionView=!1}),$rootScope.$on("ticket_loaded",function(){$rootScope.$broadcast("regular_ticket")}),$scope.$on("request_ticket_identity_change",function(){$rootScope.$broadcast("regular_ticket")}),$scope.$on("store_StatKeys",function(event,args){$scope.StatKeys=args.types}),$scope.$on("sync_on_ticket",function(event,oddIDs){$scope.markOnTicket()}),$scope.markOnTicket=function(){var $element=$(".main__landing");$element.find(".odd:not(.offer__detail--open)").removeClass("on-ticket"),"Ticket"in $rootScope&&"Odds"in $rootScope.Ticket&&angular.forEach($rootScope.Ticket.Odds,function(Odd){$element.find(".Odd_"+Odd.OddID).addClass("on-ticket"),0==$element.find(".odd-top-level.Odd_"+Odd.OddID).length&&$element.find(".Event_"+Odd.EVT+"-detail").addClass("on-ticket")})},$scope.loadCasinoGames=function(type){LandingService.getCasinoGames(type,30).then(function(res){res=res.data;res.Categories.forEach(function(cat){switch(cat.CategoryID){case-10:"casino"===type?($scope.casinoPop={name:cat.CategoryName,games:[]},$scope.casinoPop.name=cat.CategoryName):($scope.rioPop={name:cat.CategoryName,games:[]}
1,$scope.rioPop.name=cat.CategoryName),cat.Games.forEach(function(game){game={ID:game.GameID,name:game.DisplayName,order:game.GameOrder,systemName:game.SystemName,version:game.GameVersionName,categoryID:game.CategoryID,class:game.CustomCssClass||!1,hasFreespin:game.HasClientFreespin,img:game.GameImage};("casino"===type?$scope.casinoPop:$scope.rioPop).games.push(game)});break;case-20:"casino"===type?($scope.casinoNew={name:cat.CategoryName,games:[]},$scope.casinoNew.name=cat.CategoryName):($scope.rioNew={name:cat.CategoryName,games:[]},$scope.rioNew.name=cat.CategoryName),cat.Games.forEach(function(game){game={ID:game.GameID,name:game.DisplayName,order:game.GameOrder,systemName:game.SystemName,version:game.GameVersionName,categoryID:game.CategoryID,class:game.CustomCssClass||!1,hasFreespin:game.HasClientFreespin,img:game.GameImage};("casino"===type?$scope.casinoNew:$scope.rioNew).games.push(game)})}}),res.Banners&&res.Banners[0]&&res.Banners.forEach(function(banner){switch(banner.Category){case"casino":$scope.casinoBanner={text:$sce.trustAsHtml(banner.SideBannerHeader),image:banner.SideBannerImageUrl,url:banner.SideBannerUrl};break;case"rio":$scope.rioBanner={text:$sce.trustAsHtml(banner.SideBannerHeader),image:banner.SideBannerImageUrl,url:banner.SideBannerUrl}}})},function(err){}).finally(function(){$scope.maxVisibleGames=Math.min($scope.casinoNew?$scope.casinoNew.length:Number.MAX_VALUE,$scope.casinoPop?$scope.casinoPop.length:Number.MAX_VALUE,$scope.rioNew?$scope.rioNew.length:Number.MAX_VALUE,$scope.rioPop?$scope.rioPop.length:Number.MIN_VALUE)})},$scope.scrollTop=function(){$("#sportbook-main-container")[0].scroll({top:0,behavior:"smooth"})}}]),angular.module("landing").controller("TopLeaguesController",["$scope","$rootScope","$timeout","LandingService",function($scope,$rootScope,$timeout,LandingService){$scope.topLeagues=[],$scope.init=function(){$scope.loadTopLeagues()},$scope.loadTopLeagues=function(){LandingService.getTopLeagues().then(function(res){var res=res.data,leagueOrder=($scope.topLeagues=[],$scope.topLeagueCount=0);res.forEach(function(responseLeague){var leagueToPush={name:responseLeague.LeagueCupName,regionName:responseLeague.RegionName,sportName:responseLeague.SportName,order:leagueOrder++,sportID:responseLeague.SportID,regionID:responseLeague.RegionID,leagueID:responseLeague.LeagueCupID};leagueToPush.sportURL="/"+$rootScope.LanguageID+"/"+$rootScope.ENV.routes[$rootScope.LanguageID].offer+"/"+$rootScope.slugify(responseLeague.SportName),leagueToPush.regionURL=leagueToPush.sportURL+"/"+$rootScope.slugify(responseLeague.RegionName),leagueToPush.leagueURL=leagueToPush.regionURL+"/"+$rootScope.slugify(responseLeague.LeagueCupName),$scope.topLeagues.push(leagueToPush)}
1),$timeout(function(){$scope.topLeagues.forEach(function(topLeague){var sport=$rootScope.Dictionary.SportMapping[topLeague.sportID],sport={content:$('<a class="label '+sport+'" href="'+topLeague.sportURL+'" onclick="return sportbookURL(\''+topLeague.sportURL+"')\">"+topLeague.sportName+'</a> <a class="label '+sport+'" href="'+topLeague.regionURL+'" onclick="return sportbookURL(\''+topLeague.regionURL+"')\">"+topLeague.regionName+'</a> <a class="label '+sport+'" href="'+topLeague.leagueURL+'" onclick="return sportbookURL(\''+topLeague.leagueURL+"')\">"+topLeague.name+"</a>"),interactive:!0,delay:50,theme:"labeled"};$("#topleague_landing_button_"+topLeague.leagueID).hasClass("tooltipstered")||$("#topleague_landing_button_"+topLeague.leagueID).tooltipster(sport)})},0,!1)})},$scope.init()}]),angular.module("landing").controller("TopBettingController",["$scope","$rootScope","$timeout","$filter","OfferService",function($scope,$rootScope,$timeout,$filter,OfferService){$scope.TopMatches={TD:{events:[],topEventsRate:0,topEventsCount:5,loading:!0},LIVE:{events:[],topEventsRate:0,topEventsCount:5,loading:!0},ALL:{events:[],topEventsRate:0,topEventsCount:5,loading:!0}},$scope.selectedDate="TD",$scope.currentViews=[],$scope.$on("$destroy",function(){$scope.$emit("signalr_changeView",{newViews:[],oldViews:$scope.currentViews})}),$scope.createTopTicket=function(date){var IDsToAdd=[];$scope.TopMatches[date].events.forEach(function(topMatch){IDsToAdd.push(topMatch["ID_"+topMatch.TopTip])}),$rootScope.$broadcast("create_top_ticket",IDsToAdd)},$scope.showTopEvents=function(count,date){clearInterval($scope.reloadInterval),"LIVE"===date&&($scope.reloadInterval=setInterval(function(){$scope.loadTopMatches(count,date)},6e4)),$scope.loadTopMatches(count,date),$scope.selectedDate=date},$scope.loadTopMatches=function(count,date){$rootScope.LabelsLoaded?($scope.TopMatches[date].topEventsCount=count,$scope.TopMatches[date].loading=!0,OfferService.getTopBetting({date:date,count:count}).then(function(res){var newSignalrViews,res=res.data;res&&res.TopEvents&&(newSignalrViews=[],$scope.TopMatches[date].events=res.TopEvents,$scope.TopMatches[date].events.map(function(event){return event.eventDateTime=new Date(parseInt(event.EventDate.substr(6))),event.eventDateTimeTimeOnly=event.eventDateTime.getHours()+":"+("0"+event.eventDateTime.getMinutes()).slice(-2),event.Score=$rootScope.parseScore(event.Score,event.SportID),event.eventDateTimeReg=$filter("eventDateTime")(event,"forceDate"),event.sportURL=$rootScope.LanguageID+"/"+("Y"===event.LiveBetting?$rootScope.ENV.routes[$rootScope.LanguageID].live:$rootScope.ENV.routes[$rootScope.LanguageID].offer)+"/"+$rootScope.slugify(event.SportName),event.regionURL=event.sportURL+"/"+$rootScope.slugify(event.RegionName),event.leagueURL=event.regionURL+"/"+$rootScope.slugify(event.LeagueCupName),event.eventURL=event.leagueURL+"?event="+event.EventID,event.betradarID=event.BetradarStatisticsUrl,event.Odds={},_.forEach(["1","X","2","1X","X2","12"],function(tipType){event.Odds[tipType]={tipType:tipType,oddsID:event["ID_"+tipType],rate:event["Rate_"+tipType]}}),newSignalrViews.push({sportEventID:event.EventID}),event}),$scope.TopMatches[date].topEventsRate=res.TopRateSum,$scope.$emit("signalr_changeView",{newViews:newSignalrViews,oldViews:$scope.currentViews}),$scope.$on("signalr_OddsChanged",function(event,data){$timeout(function(){$scope.TopMatches[$scope.selectedDate].topEventsRate=1,_.forEach($scope.TopMatches[$scope.selectedDate].events,function(event){for(var key in event.Odds)if(Object.hasOwnProperty.call(event.Odds,key)){key=event.Odds[key];if(key.oddsID===data.oddsID)return void(key.rate=data.oddsRate)}$scope.TopMatches[$scope.selectedDate].topEventsRate*=event.Odds[event.TopTip].rate})})}),$scope.$on("signalr_EventChanged",function(event,data){(event=_.findWhere($scope.TopMatches[$scope.selectedDate].events,{EventID:data.eventID}))&&(data.actualGamePartID&&(event.ActualGamePartID=data.actualGamePartID),event.ActualGamePartTime=data.actualGamePartTime,event.EventDate=data.eventDate,event.eventDateTime=new Date(parseInt(event.EventDate.substr(6))),event.eventDateTimeTimeOnly=event.eventDateTime.getHours()+":"+("0"+event.eventDateTime.getMinutes()).slice(-2),event.eventDateTimeReg=$filter("eventDateTime")(event,"forceDate"),event.LiveBettingView=data.liveBettingView,event.Score=$rootScope.parseScore(data.score,event.SportID))}),$scope.currentViews=newSignalrViews)}).finally(function(){$rootScope.loadTooltips(),$scope.TopMatches[date].loading=!1,$timeout(function(){$scope.markOnTicket()},0)})):$timeout(function(){$scope.loadTopMatches(count,date)},300,!1)}}]),angular.module("landing").controller("VirtualGamesConroller",["$scope","$rootScope","OfferService",function($scope,$rootScope,OfferService){$scope.regions=[],OfferService.getRegionLeagueCupMenu({sportID:153}).then(function(data){var regions={},leagues=[];_.forEach(data.data,function(label){"RE"===label.Typ&&(label.leagues=[],regions[label.ID]=label),"LC"===label.Typ&&leagues.push(label)}),leagues=_.sortBy(leagues,["Order"]),_.forEach(leagues,function(league){league.url="/"+$rootScope.L
1anguageID+"/"+$rootScope.ENV.routes[$rootScope.LanguageID].virtual+"/"+$rootScope.slugify(regions[league.RegionID].Name)+"/"+$rootScope.slugify(league.Name),regions[league.RegionID].leagues.push(league)}),$scope.regions=_.sortBy(regions,["Order"])})}]),angular.module("landing").controller("LandingAnalysesController",["$scope","$rootScope","AnalysisService","OfferService",function($scope,$rootScope,AnalysisService,OfferService){$scope.analyses=[],$scope.odds={},$scope.oddsOnTicket=[],$rootScope.$broadcast("request_analyses"),$scope.$on("send_analyses",function(event,data){$scope.analyses=data.data.EventAnalyzeMembers,$scope.analyses=_.map($scope.analyses,function(analysis){return analysis.EventDate=new Date(parseInt(analysis.EventDate.substr(6))),analysis.sportURL="/"+$rootScope.LanguageID+"/"+$rootScope.ENV.routes[$rootScope.LanguageID].offer+"/"+$rootScope.slugify(analysis.SportName),analysis.regionURL=analysis.sportURL+"/"+$rootScope.slugify(analysis.RegionName),analysis.leagueURL=analysis.regionURL+"/"+$rootScope.slugify(analysis.LeagueCupName),analysis.eventURL=analysis.leagueURL+"?event="+analysis.EventID,analysis}),OfferService.getOddsByEventIDs(_.map($scope.analyses,"EventID")).then(function(data){data.data.EventChanceTypes.forEach(function(e){$scope.odds[e.EventID]={1:data.data.Odds[e.EventChanceTypeID+"_1"],X:data.data.Odds[e.EventChanceTypeID+"_X"],2:data.data.Odds[e.EventChanceTypeID+"_2"]}})})})}]),angular.module("landing").controller("LandingBonusesController",["$scope",function($scope){$scope.$emit("load_bonuses"),$scope.$on("$routeChangeSuccess",function(){$scope.bonusType="betting"}),$scope.changeBonusType=function(type){$scope.bonusType=type}}]),angular.module("landing").service("LandingService",["$http","$rootScope","$sce",function($http,$rootScope,$sce){return{getLiveMatches:function(){return $http.post($sce.trustAsResourceUrl($rootScope.baseURL+"/offer/GetOfferList"),{sportEvent:-1,sport:-1,region:-1,leaugeCup:-1,live:1,date:-1,top:1})},getTopMatches:function(count){return $http.post($sce.trustAsResourceUrl($rootScope.baseURL+"/offer/GetTopEvents"),{top:count})},getTopLeagues:function(){return"localhost"==$rootScope.ENV.name?$http.get("data/topleagues.json"):$http.post($sce.trustAsResourceUrl($rootScope.baseURL+"/offer/GetTopLeagueCups"),{})},getCasinoGames:function(type,count){return"localhost"==$rootScope.ENV.name?$http.get("data/casino-games.json"):$http.post($sce.trustAsResourceUrl("/"+type+"/GetCategoriesWithBanner"),{gamesCount:count})},getPortalBonuses:function(){return"localhost"==$rootScope.ENV.name?$http.get("data/portalBonuses.json"):$http.get($sce.trustAsResourceUrl($rootScope.baseURL+"/base/GetPortalBonuses"),{})},getCasinoBonuses:function(){return"localhost"==$rootScope.ENV.name?$http.get("data/casinoBonuses.json"):$http.get($sce.trustAsResourceUrl($rootScope.baseURL+"/casino/GetCasinoBonuses"),{})}}}]),angular.module("news",[]),angular.module("news").controller("NewsController",["$scope","$rootScope","$http","NewsService",function($scope,$rootScope,$http,NewsService){$scope.news=[],$rootScope.$broadcast("load_sidebar",{type:"landing",params:{live:!1,date:!1,streamOnly:!1},routeName:"bonusy-a-akcie"}),$scope.loadNews=function(){NewsService.loadNews().then(function(data){$scope.news=[].concat(data[0].data,data[1].data),_.forEach($scope.news,function(item){item.StartDate=new Date(parseInt(item.StartDate.substr(6)))})})},$scope.loadNews()}]),angular.module("banner").service("NewsService",["$http","$rootScope","$sce","$q",function($http,$rootScope,$sce,$q){return{loadNews:function(){return"localhost"==$rootScope.ENV.name?$q.all([$http.get("data/news.json"),$rootScope.ENV.enableCasino?$http.get("data/casinoNews.json"):$q.resolve({data:[]})]):$q.all([$http.get("base/GetPortalNews"),$rootScope.ENV.enableCasino?$http.get("casino/GetCasinoNews"):$q.resolve({data:[]})])}}}]),angular.module("nolive",[]),angular.module("nolive").controller("NoLiveController",["$scope","$rootScope","$timeout","$location","errorType",function($scope,$rootScope,$timeout,$location,errorType){$scope.$on("$routeChangeSuccess",function(){$scope.errorType=errorType,$rootScope.forceSmallSidebar="virtual"===$scope.errorType,$rootScope.resizeLayout(),"virtual"!==$scope.errorType&&"live"!==$scope.errorType||$rootScope.$broadcast("load_sidebar",{type:"virtual"===$scope.errorType?"virtual":"landing",params:{live:"live"===$scope.errorType,date:!1,streamOnly:!1}})}),$scope.$on("loaded_sports",function(){switch($scope.errorType){case"live":$location.url($rootScope.L
1anguageID+"/"+$rootScope.ENV.routes[$rootScope.LanguageID].live);break;case"virtual":$location.url($rootScope.LanguageID+"/"+$rootScope.ENV.routes[$rootScope.LanguageID].virtual)}}),$scope.$on("$destroy",function(){$rootScope.forceSmallSidebar=!1,$rootScope.resizeLayout()})}]),angular.module("offer",[]),angular.module("offer").controller("OfferController",["$scope","$rootScope","OfferService","MyAccountService","$timeout","$interval","$routeParams","$location","$window","$filter","$sce",function($scope,$rootScope,OfferService,MyAccountService,$timeout,$interval,$routeParams,$location,$window,$filter,$sce){var betbuilderMaxSelectedOddsNoticeTimeout=null;$scope.masterOdds={},$scope.betbuilderMaxSelectedOdds=10,$scope.selectedBetbuilderOdds=[],$scope.selectedBetbuilderOddIDs={},$scope.BetbuilderOddsRate=null,$scope.betbuilderConflictOdds=[],$scope.betbuilderConflictOddIDs={},$scope.betbuilderMaxSelectedOddsNoticeVisible=!1,$scope.betbuilderSelectedOddsNoticeLangKey="betbuilder_max_odds_error",this.$onInit=function(){$scope.sports=[],$scope.openedEvent=null,$scope.events={},$scope.currentlyLoadingDetail=!1,$scope.pageSize=50,$scope.readyForNewPage=!0,$scope.lastShownRegion=null,$scope.lastShownSport=null,$scope.lastShownRegionFav=null,$scope.lastShownSportFav=null,$scope.currentViews=[],$scope.currentBetbuilderSignalrViews=[],$scope.showingAll=!1,$scope.currentQuickbet=null,$scope.missingOffer=null,$scope.clearSelectedBetbuilderOdds(),$scope.batchChangesInterval=$interval($scope.applyAllBatchChanges,300,!1),$scope.$emit("load_approved_tickets",{force:!1}),$scope.timerIntervals=[],$scope.favoriteSport={ID:999999,opened:!0,regions:[],show:!0,showWhole:!0,nextSport:null,name:"Obľúbené zápasy"},$scope.favoriteSportArr=[$scope.favoriteSport]},$scope.$on("$destroy",function(){$rootScope.showHeader=!1,$rootScope.showDual=!1,$(window).off("resize",$scope.callAdjustResDebounced),$scope.isDual=!1,$rootScope.showLiveDescriptionView=!1,$rootScope.resizeLayout(),$scope.closeDetail($scope.openedEvent),$rootScope.hideFooter=!1,$scope.currentQuickbet=null,$scope.$emit("signalr_changeView",{newViews:[],oldViews:$scope.currentViews}),$scope.changeBetbuilderSignalrView([]),$scope.sports=[],$scope.getOfferTimeout&&$timeout.cancel($scope.getOfferTimeout),betbuilderMaxSelectedOddsNoticeTimeout&&$timeout.cancel(betbuilderMaxSelectedOddsNoticeTimeout),$interval.cancel($scope.batchChangesInterval),$scope.offerCalendar&&$scope.offerCalendar.destroy(),$timeout(function(){$rootScope.initScrollMain()},0,!1),$scope.timerIntervals.forEach(function(interval){$interval.cancel(interval)}),$scope.timerIntervals=[]}),$rootScope.$on("ticket_loaded",function(){$rootScope.$broadcast("regular_ticket")}),$scope.$on("request_ticket_identity_change",function(){$rootScope.$broadcast("regular_ticket")}),$scope.getMissingOfferInfo=function(){function getRouteParamValue(value){return 0===value?0:value||-1}return $scope.missingOffer={sport:null,region:null,league:null},OfferService.getSportRegionLeagueInfo(getRouteParamValue($scope.currentParams.sport),getRouteParamValue($scope.currentParams.region),getRouteParamValue($scope.currentParams.league)).then(function(response){_.each(response.data||[],function(item){"SP"===item.Typ?$scope.missingOffer.sport={ID:item.ID,name:item.Name}:"RE"===item.Typ?$scope.missingOffer.region={ID:item.ID,name:item.Name}:"LC"===item.Typ&&($scope.missingOffer.league={ID:item.ID,name:item.Name})})})},$scope.$on("load_offer",function(event,params){params.routeSelectionMissing?($scope.currentParams=params,$scope.getMissingOfferInfo()):($scope.missingOffer=null,($rootScope.eventIDToOpen||params.forceAll)&&(params.top=!1),$scope.getOfferTimeout&&$timeout.cancel($scope.getOfferTimeout),params.favoritesOnly?$scope.favOnly=!0:$scope.favOnly=!1,$scope.currentParams=params,$scope.getOffer()),$(window).on("resize",$scope.callAdjustResDebounced)}),$scope.$on("open_stream_event",function(ev,params){$scope.events[params.ID]?$scope.events[params.ID].opened||$scope.toggleDetail($scope.events[params.ID]):$location.url(params.url)}),$scope.callAdjustRes=function(){$rootScope.alwaysOnResize(),$scope.$emit("adjust_offer_res",$scope.currentParam
1s.live)},$scope.callAdjustResDebounced=_.debounce($scope.callAdjustRes,400),$scope.setDate=function(date){$rootScope.$broadcast("set_date",date)},$scope.loadNextPage=function(){var lastShownSport,lastShownRegion;if($scope.lastShownSport&&$scope.readyForNewPage&&$scope.lastShownRegion)if(lastShownRegion=$scope.favOnly?($scope.lastShownSportFav&&$scope.lastShownRegionFav||($scope.lastShownSportFav=$scope.lastShownSport,$scope.lastShownRegionFav=$scope.lastShownRegion),lastShownSport=$scope.lastShownSportFav,$scope.lastShownRegionFav):(lastShownSport=$scope.lastShownSport,$scope.lastShownRegion),$scope.currentParams.top)$scope.readyForNewPage=!1,$scope.loadCompleteOffer();else{for(var addedCount=0;lastShownRegion.nextRegion&&addedCount<$scope.pageSize;)(lastShownRegion=lastShownRegion.nextRegion).isFirst&&(lastShownSport=lastShownSport.nextSport,$scope.favOnly?lastShownSport.showFav=!0:lastShownSport.show=!0),$scope.lastShownSport.opened&&($scope.favOnly?addedCount+=lastShownRegion.eventCountFav||0:addedCount+=lastShownRegion.eventCount),$scope.favOnly?lastShownRegion.showFav=!0:lastShownRegion.show=!0;$scope.favOnly?($scope.lastShownSportFav=lastShownSport,$scope.lastShownRegionFav=lastShownRegion):($scope.lastShownSport=lastShownSport,$scope.lastShownRegion=lastShownRegion),lastShownRegion.nextRegion||($scope.favOnly?$scope.showingAllFav=!0:$scope.showingAll=!0),$rootScope.loadTooltips()}},$scope.$on("load_next_page",function(){$scope.loadNextPage()}),$scope.loadCompleteOffer=function(){$scope.currentParams.top=!1,$scope.getOffer(!0)},$scope.updateOfferThrottled=_.throttle(function(){$scope.getOffer(!0)},3e3,{leading:!1,trailing:!0}),$scope.getOffer=function(justUpdate){$scope.getOfferTimeout&&$timeout.cancel($scope.getOfferTimeout),$scope.getOfferTimeout=null,$scope.getOfferTimeout=$timeout(function(){$scope.loadOffer(justUpdate)})},$scope.loadOffer=function(justUpdate){justUpdate&&!$rootScope.showHeader||(0===$scope.currentParams.sport&&0==$rootScope.goldenJackp
1ot&&$rootScope.ENV.golden&&OfferService.getLoyalty().then(function(res){res=res.data;$rootScope.goldenJackpot=Math.ceil(res.PriceMoney)}),justUpdate||($scope.callAdjustRes(),$scope.sports=[],$scope.openedEvent=null,$scope.events={},$scope.currentlyLoadingDetail=!1,$scope.showingAll=!1),OfferService.getOffer($scope.currentParams).then(function(res){var loadedSports,lastSport,lastRegion,lastLeague,lastLeagueDate,sportIndex,regionIndex,leagueIndex,leagueDateIndex,eventToOpen,waitingForEvent,toDeleteSports,toAddSports,newSportIDs,response=res.data;response.EventChanceTypes&&0!==response.EventChanceTypes.length?(loadedSports=[],res=eventToOpen=lastLeagueDate=lastLeague=lastRegion=lastSport=null,waitingForEvent=!(leagueDateIndex=leagueIndex=regionIndex=sportIndex=-1),justUpdate?$rootScope.eventIDToOpen=null:($rootScope.showHeader=!$scope.currentParams.forceAll,$rootScope.showLiveDescriptionView=!!$scope.currentParams.live,$scope.showingAll=!1,$scope.events={},$scope.masterOdds={},$scope.masterChanceTypes={},(res=$rootScope.eventIDToOpen?_.findWhere(response.EventChanceTypes,{EventID:$rootScope.eventIDToOpen}):res)?waitingForEvent=!0:($rootScope.eventIDToOpen=null,justUpdate||$location.search("event",null))),response.EventChanceTypes.forEach(function(event){var pushedSport;event.RegionID=$scope.currentParams.sportEvent?event.SportID:event.RegionID,event.SportID=$scope.currentParams.sportEvent?event.SportEventID:event.SportID,event.SportID!=lastSport&&((pushedSport={ID:0===$scope.currentParams.sport?0:event.SportID,opened:!0,regions:[],show:$scope.currentParams.top||waitingForEvent,showWhole:!!$scope.currentParams.forceAll,nextSport:null,name:response.Labels[($scope.currentParams.sportEvent?"SE_":"SP_")+event.SportID].Name}).slug=$rootScope.slugify(pushedSport.name),pushedSport.URL=$rootScope.LanguageID+"/"+$rootScope.ENV.routes[$rootScope.LanguageID][$scope.currentParams.live?"live":"offer"]+"/"+pushedSport.slug,!justUpdate&&pushedSport.show&&($scope.lastShownSport=pushedSport),loadedSports.push(pushedSport),lastSport=event.SportID,sportIndex++,regionIndex=-1),event.RegionID!=lastRegion&&((pushedSport={ID:event.RegionID,opened:!0,leagues:[],sport:loadedSports[sportIndex],show:$scope.currentParams.top||waitingForEvent,eventCount:0,nextRegion:null,isFirst:-1===regionIndex,name:response.Labels[($scope.currentParams.sportEvent?"SP_":"RE_")+event.RegionID].Name}).slug=$rootScope.slugify(pushedSport.name),pushedSport.URL=loadedSports[sportIndex].URL+"/"+pushedSport.slug,!justUpdate&&pushedSport.show&&($scope.lastShownRegion=pushedSport),loadedSports[sportIndex].regions.push(pushedSport),lastRegion=event.RegionID,regionIndex++,leagueIndex=-1),event.LeagueCupID!=lastLeague&&((pushedSport={ID:event.LeagueCupID,opened:!0,events:[],dates:[],region:loadedSports[sportIndex].regions[regionIndex],displayedCht:{1:!1,X:!1,2:!1,"1X":!1,X2:!1,12:!1},name:response.Labels["LC_"+event.LeagueCupID].Name}).slug=$rootScope.slugify(pushedSport.name),pushedSport.URL=loadedSports[sportIndex].regions[regionIndex].URL+"/"+pushedSport.slug,loadedSports[sportIndex].regions[regionIndex].leagues.push(pushedSport),lastLeague=event.LeagueCupID,leagueIndex++,leagueDateIndex=-1),(event=$scope.refactorEvent(event,response.Odds)).seasonID&&!loadedSports[sportIndex].regions[regionIndex].leagues[leagueIndex].leagueTableURL&&(loadedSports[sportIndex].regions[regionIndex].leagues[leagueIndex].leagueTableURL="https://s5.sir.sportradar.com/doxxbet/"+$rootScope.LanguageID+"/"+$rootScope.Dictionary.BetradarSportMapping[loadedSports[sportIndex].ID]+"/season/"+event.seasonID),(leagueDateIndex<0||lastLeagueDate!==event.dateStr)&&(loadedSports[sportIndex].regions[regionIndex].leagues[leagueIndex].dates.push({dateStr:event.dateStr,league:loadedSports[sportIndex].regions[regionIndex].leagues[leagueIndex],events:[]}),leagueDateIndex++,lastLeagueDate=event.dateStr),loadedSports[sportIndex].regions[regionIndex].leagues[leagueIndex].dates[leagueDateIndex].events.push(event),event.date=loadedSports[sportIndex].regions[regionIndex].leagues[leagueIndex].dates[leagueDateIndex],event.ID===$rootScope.eventIDToOpen&&(eventToOpen=event,waitingForEvent=!1),event.teamIDs={home:response.BetradarTeams[event.ID+"_10"]?response.BetradarTeams[event.ID+"_10"]:0,away:response.BetradarTeams[event.ID+"_20"]?response.BetradarTeams[event.ID+"_20"]:0},event.URL=loadedSports[sportIndex].regions[regionIndex].leagues[leagueIndex].URL+"?event="+event.ID+"&name="+$rootScope.slugify(event.name),loadedSports[sportIndex].regions[regionIndex].leagues[leagueIndex].events.push(event),$scope.events[event.ID]||($scope.events[event.ID]=event),loadedSports[sportIndex].regions[regionIndex].eventCount++,loadedSports[sportIndex].regions[regionIndex].leagues[leagueIndex].displayedCht=$scope.adjustDisplayedCht(loadedSports[sportIndex].regions[regionIndex].leagues[leagueIndex].displayedCht,event.masterChanceType.odds)}
1),loadedSports&&$scope.currentParams.top&&loadedSports[sportIndex]&&(loadedSports[sportIndex].showWhole=!1),justUpdate?(res=_.pluck($scope.sports,"ID"),newSportIDs=_.pluck(loadedSports,"ID"),res.length===newSportIDs.length&&_.intersection(res,newSportIDs).length===res.length||((toDeleteSports=_.difference(res,newSportIDs))&&0<toDeleteSports.length&&($scope.sports=_.reject($scope.sports,function(sport){return _.contains(toDeleteSports,sport.ID)})),toAddSports=_.difference(newSportIDs,res),loadedSports.forEach(function(addSport){_.contains(toAddSports,addSport.ID)&&$scope.sports.push(addSport)})),loadedSports.forEach(function(loadedSport){var originalSport,newRegionIDs,toDeleteRegions,toAddRegions,originalSportIndex=_.findIndex($scope.sports,{ID:loadedSport.ID});-1!==originalSportIndex&&(originalSport=$scope.sports[originalSportIndex],originalSportIndex=_.pluck(originalSport.regions,"ID"),newRegionIDs=_.pluck(loadedSport.regions,"ID"),originalSportIndex.length===newRegionIDs.length&&_.intersection(originalSportIndex,newRegionIDs).length===originalSportIndex.length||((toDeleteRegions=_.difference(originalSportIndex,newRegionIDs))&&0<toDeleteRegions.length&&(originalSport.regions=_.reject(originalSport.regions,function(region){return _.contains(toDeleteRegions,region.ID)})),toAddRegions=_.difference(newRegionIDs,originalSportIndex),loadedSport.regions.forEach(function(addRegion){_.contains(toAddRegions,addRegion.ID)&&originalSport.regions.push(addRegion)})),loadedSport.regions.forEach(function(loadedRegion){var originalRegion,newLeagueIDs,toDeleteLeagues,toAddLeagues,originalRegionIndex=_.findIndex(originalSport.regions,{ID:loadedRegion.ID});-1!==originalRegionIndex&&(originalRegion=originalSport.regions[originalRegionIndex],originalRegionIndex=_.pluck(originalRegion.leagues,"ID"),newLeagueIDs=_.pluck(loadedRegion.leagues,"ID"),originalRegionIndex.length===newLeagueIDs.length&&_.intersection(originalRegionIndex,newLeagueIDs).length===originalRegionIndex.length||((toDeleteLeagues=_.difference(originalRegionIndex,newLeagueIDs))&&0<toDeleteLeagues.length&&(originalRegion.leagues=_.reject(originalRegion.leagues,function(league){return _.contains(toDeleteLeagues,league.ID)})),toAddLeagues=_.difference(newLeagueIDs,originalRegionIndex),loadedRegion.leagues.forEac
1h(function(addLeague){_.contains(toAddLeagues,addLeague.ID)&&originalRegion.leagues.push(addLeague)})),loadedRegion.leagues.forEach(function(loadedLeague){var originalLeague,newEventIDs,toDeleteEvents,toAddEvents,originalLeagueIndex=_.findIndex(originalRegion.leagues,{ID:loadedLeague.ID});-1!==originalLeagueIndex&&(originalLeague=originalRegion.leagues[originalLeagueIndex],originalLeagueIndex=_.pluck(originalLeague.events,"ID"),newEventIDs=_.pluck(loadedLeague.events,"ID"),originalLeagueIndex.length!==newEventIDs.length||_.intersection(originalLeagueIndex,newEventIDs).length!==originalLeagueIndex.length)&&((toDeleteEvents=_.difference(originalLeagueIndex,newEventIDs))&&0<toDeleteEvents.length&&(originalLeague.events=_.reject(originalLeague.events,function(event){return _.contains(toDeleteEvents,event.ID)})),toAddEvents=_.difference(newEventIDs,originalLeagueIndex),loadedLeague.events.forEach(function(addEvent){var foundDate;_.contains(toAddEvents,addEvent.ID)&&(originalLeague.events.push(addEvent),(foundDate=_.findWhere(originalLeague.dates,{dateStr:addEvent.dateStr}))?foundDate.events.push(addEvent):((foundDate={dateStr:addEvent.dateStr,events:[]}).events.push(addEvent),originalLeague.dates.push(foundDate)))}))}))}))})):($scope.sports=loadedSports,eventToOpen&&$scope.openDetail(eventToOpen)),$scope.createRegionChain(),justUpdate||$scope.changeClientView($scope.currentParams.sportEvent,$scope.currentParams.sport,$scope.currentParams.region,$scope.currentParams.league),response.EventChanceTypes.length<50&&($scope.showingAll=!0,$scope.currentParams.top=!1),$scope.lastShownRegion||($scope.lastShownSport=$scope.sports[0],$scope.lastShownSport.show=!0,$scope.lastShownRegion=$scope.lastShownSport.regions[0],$scope.lastShownRegion.show=!0,$scope.loadNextPage()),newSportIDs=$scope.currentParams.live?"default-live":"default-offer",$scope.currentParams.forceAll||($scope.currentParams.live?$rootScope.activateMenu("Live"):$rootScope.activateMenu("Offer"),res=[],$scope.currentParams.league&&res.push("sportove-tipovanie/"+$rootScope.slugify($scope.sports[0].name)+"/"+$rootScope.slugify($scope.sports[0].regions[0].name)+"/"+$rootScope.slugify($scope.sports[0].regions[0].leagues[0].name)),$scope.currentParams.region&&res.push("sportove-tipovanie/"+$rootScope.slugify($scope.sports[0].name)+"/"+$rootScope.slugify($scope.sports[0].regions[0].name)),$scope.currentParams.sport&&res.push("sportove-tipovanie/"+$rootScope.slugify($scope.sports[0].name)),$scope.currentParams.league&&res.push(newSportIDs+"-league"),$scope.currentParams.region&&res.push(newSportIDs+"-region"),$scope.currentParams.sport&&res.push(newSportIDs+"-sport"),res.push(newSportIDs),$rootScope.setPageTitle(res,$scope.sports[0].name,$scope.sports[0].regions[0].name,$scope.sports[0].regions[0].leagues[0].name)),$rootScope.loadTooltips(),$scope.requestOddsBroadcast(),$timeout(function(){var calendarOptions;$scope.showingAll,$scope.currentParams.top||($scope.readyForNewPage=!0),$scope.callAdjustRes(),justUpdate||($scope.offerCalendar&&$scope.offerCalendar.destroy(),calendarOptions=angular.copy($rootScope.calendarOfferOptions),$scope.offerCalendar=$("input#offerFilterDate").datepicker(calendarOptions).data("datepicker"),$scope.currentParams.date&&((calendarOptions=$rootScope.dateFromString($scope.currentParams.date))?($scope.offerCalendar.selectDateNoUpdate(calendarOptions),$rootScope.offerCalendarSidebar.selectDateNoUpdate(calendarOptions)):($scope.offerCalendar.clear(),$scope.offerCalendarSidebar.clear())))},0)):$location.url($rootScope.LanguageID)}).finally(function(){var quickbetSettings,foundRemovedEvent;$rootScope.quickbet.allowed&&$scope.currentParams.live&&$rootScope.quickbet.live.allowed?(quickbetSettings=$rootScope.quickbet.live.quickbetLink[$scope.currentParams.sport||"none"],$scope.currentQuickbet=quickbetSettings||null):$scope.currentQuickbet=null,$scope.readyForNewPage=!0,justUpdate&&$scope.loadNextPage(),!$rootScope.showHeader&&$scope.currentParams.league&&$timeout(function(){$scope.loadLeagueTopTips($scope.currentParams.league)}),$timeout(function(){$scope.openedEvent||$scope.currentlyLoadingDetail||$rootScope.$broadcast("open_stream_if_unopened")}
1,100),$scope.currentParams.favoritesOnly&&$scope.figureOutFavorites(),$scope.currentParams.live&&$rootScope.favoritedEvents&&0<$rootScope.favoritedEvents.length&&(foundRemovedEvent=!1,$rootScope.favoritedEvents.forEach(function(favEvID){$scope.events[favEvID]?$scope.addEventToFavoriteSport($scope.events[favEvID]):$scope.currentParams.sport||(foundRemovedEvent=!0,$rootScope.removeFavoriteEventID(favEvID,!0,!0))}),foundRemovedEvent)&&$rootScope.writeFavoritedEvents(),!$rootScope.showDual||$scope.openedEvent||$scope.currentlyLoadingDetail||$scope.openFirstAvailableEvent()}))},$scope.loadLeagueTopTips=function(leagueID){OfferService.GetTopTipsForLeague(leagueID).then(function(res){res=res.data;$scope.events&&res.forEach(function(eventTip){$scope.events[eventTip.EventID]&&($scope.events[eventTip.EventID].topTip=eventTip.TopTip)})},function(err){})},$scope.getBetbuilderCulture=function(){switch($rootScope.LanguageID.toLowerCase()){case"sk":return"sk-SK";case"en":return"en-GB";default:return"sk-SK"}},$scope.createRegionChain=function(){var lastSport=null,lastRegion=null;$scope.sports.forEach(function(sport,sIndex){sport.regions.forEach(function(region,rIndex){lastRegion&&((lastRegion.nextRegion=region).nextRegion=null),lastRegion=region}),lastSport&&((lastSport.nextSport=sport).nextSport=null),lastSport=sport})},$scope.adjustDisplayedCht=function(oldCht,newCht){return["1","X","2","1X","X2","12"].forEach(function(key){oldCht[key]=oldCht[key]||0!==newCht[key].ID}),oldCht},$scope.refactorEvent=function(event,odds){$rootScope.enableBetbuilder||(event.HasBetbuilder=null);var eventMoment=moment(event.EventDate),eventMoment={name:event.EventName,teams:event.EventName.split(" vs. "),ID:event.EventID,sportID:event.SportID,regionID:event.RegionID,leagueID:event.LeagueCupID,hasMatchTracker:event.HasMatchTracker,isLive:"Y"===event.LiveBetting,lockedWhole:-1===event.LiveBettingView,masterChanceType:{},opened:!1,showGroups:"special"!==event.EventType,streamID:event.Stream||event.ProviderStreamID||null,streamProvider:event.StreamProvider||null,eventChanceTypes:{},odds:{},paramGroups:[],scoreString:event.Score,moment:eventMoment,datetime:$scope.parseDatetime(event.EventDate),dateStr:eventMoment.format("DD.MM.YYYY")+" - "+eventMoment.format("dddd").toUpperCase(),gamePart:$rootScope.GameParts&&$rootScope.GameParts[event.ActualGamePartID]&&$rootScope.GameParts[event.ActualGamePartID].Name?$rootScope.GameParts[event.ActualGamePartID].Name:"",gamePartID:event.ActualGamePartID,gamePartTime:event.ActualGamePartTime&&-1!==event.ActualGamePartTime?event.ActualGamePartTime+" '":null,preparedLive:"N"==event.LiveBetting&&-1!=event.LiveFeedReference,sideBet:event.SideBet,seasonID:event.SeasonID,isPlacement:/VICTORIA/.test(event.BetType),hasBetbuilder:event.HasBetbuilder,betbuilderOdds:[],showStats:event.HasBetradarHostedStatistics,prematchEventID:event.PrematchEventID,hasAnalysis:!!event.EventAnalyseID,isSpecialEvent:"special"===event.EventType,betradarID:event.BetradarStatisticsUrl},tooltipArr=[];return event.EventComment&&tooltipArr.push(event.EventComment),event.EventResultComment&&tooltipArr.push(event.EventResultComment),event.AggregateScore&&tooltipArr.push($rootScope.Lang.App.aggregate_score_tooltip+" <strong>"+event.AggregateScore+"</strong>"),event.SeriesResult&&tooltipArr.push($rootScope.Lang.App.series_result_tooltip+" <strong>"+event.SeriesResult+"</strong>"),0<tooltipArr.length&&(eventMoment.tooltipHTML=$sce.trustAsHtml(tooltipArr.join("<br>"))),1235===event.RegionID||1236===event.RegionID?eventMoment.competitorDetail=!0:eventMoment.competitorDetail=!1,"notstarted"!==event.ActualGamePartID?(eventMoment.displayedTime=$rootScope.GameParts[event.ActualGamePartID].Name,"ended"!==event.ActualGamePartID&&(eventMoment.running=!0)):eventMoment.displayedTime=moment(event.EventDate).format("H:mm"),$scope.createTimeTo(eventMoment),$scope.masterChanceTypes[event.EventChanceTypeID]?eventMoment.masterChanceType=$scope.masterChanceTypes[event.EventChanceTypeID]:(eventMoment.masterChanceType={ID:event.EventChanceTypeID,odds:{},oldStatus:event.EventChanceTypeStatus,newStatus:event.EventChanceTypeStatus,visibility:$rootScope.getEctVisibility("other",event.EventChanceTypeStatus,event.EventChanceTypeStatus,eventMoment.lockedWhole)},eventMoment.masterChanceType.locked=eventMoment.masterChanceType.visibility<$rootScope.visibility.SHOW,eventMoment.masterChanceType.hidden=eventMoment.masterChanceType.visibility<$rootScope.visibility.LOCK,$scope.masterChanceTypes[event.EventChanceTypeID]=eventMoment.masterChanceType,eventMoment.masterChanceType.odds={1:{ID:0,rate:0},X:{ID:0,rate:0},2:{ID:0,rate:0},"1X":{ID:0,rate:0},X2:{ID:0,rate:0},12:{ID:0,rate:0}},odds[event.EventChanceTypeID+"_1"]&&!$scope.masterOdds[odds[event.EventChanceTypeID+"_1"].OddsID]&&($scope.masterOdds[odds[event.EventChanceTypeID+"_1"].OddsID]=$scope.refactorMasterCht(odds[event.EventChanceTypeID+"_1"],eventMoment.lockedWhole),eventMoment.masterChanceType.odds[1]=$scope.masterOdds[$scope.masterOdds[odds[event.EventChanceTypeID+"_1"].OddsID].ID],$scope.masterOdds[odds[event.EventChanceTypeID+"_1"].OddsID].eventID=eventMoment.ID),odds[event.EventChanceTypeID+"_X"]&&!$scope.masterOdds[odds[event.EventChanceTypeID+"_X"].OddsID]&&($scope.masterOdds[odds[event.EventChanceTypeID+"_X"].OddsID]=$scope.refactorMasterCht(odds[event.EventChanceTypeID+"_X"],eventMoment.lockedWhole),eventMoment.masterChanceType.odds.X=$scope.masterOdds[$scope.masterOdds[odds[event.EventChanceTypeID+"_X"].OddsID].ID],$scope.masterOdds[odds[event.EventChanceTypeID+"_X"].OddsID].eventID=eventMoment.ID),odds[event.EventChanceTypeID+"_2"]&&!$scope.masterOdds[odds[event.EventChanceTypeID+"_2"].OddsID]&&($scope.masterOdds[odds[event.EventChanceTypeID+"_2"].OddsID]=$scope.refactorMasterCht(odds[event.EventChanceTypeID+"_2"],eventMoment.lockedWhole),eventMoment.masterChanceType.odds[2]=$scope.masterOdds[$scope.masterOdds[odds[event.EventChanceTypeID+"_2"].OddsID].ID],$scope.masterOdds[odds[event.EventChanceTypeID+"_2"].OddsID].eventID=eventMoment.ID),odds[event.EventChanceTypeID+"_1X"]&&!$scope.masterOdds[odds[event.EventChanceTypeID+"_1X"].OddsID]&&($scope.masterOdds[odds[event.EventChanceTypeID+"_1X"].OddsID]=$scope.refactorMasterCht(odds[event.EventChanceTypeID+"_1X"],eventMoment.lockedWhole),eventMoment.masterChanceType.odds["1X"]=$scope.masterOdds[$scope.masterOdds[odds[event.EventChanceTypeID+"_1X"].OddsID].ID],$scope.masterOdds[odds[event.EventChanceTypeID+"_1X"].OddsID].eventID=eventMoment.ID),odds[event.EventChanceTypeID+"_X2"]&&!$scope.masterOdds[odds[event.EventChanceTypeID+"_X2"].OddsID]&&($scope.masterOdds[odds[event.EventChanceTypeID+"_X2"].OddsID]=$scope.refactorMasterCht(odds[event.EventChanceTypeID+"_X2"],eventMoment.lockedWhole),eventMoment.masterChanceType.odds.X2=$scope.masterOdds[$scope.masterOdds[odds[event.EventChanceTypeID+"_X2"].OddsID].ID],$scope.masterOdds[odds[event.EventChanceTypeID+"_X2"].OddsID].eventID=eventMoment.ID),odds[event.EventChanceTypeID+"_12"]&&!$scope.masterOdds[odds[event.EventChanceTypeID+"_12"].OddsID]&&($scope.masterOdds[odds[event.EventChanceTypeID+"_12"].OddsID]=$scope.refactorMasterCht(odds[event.EventChanceTypeID+"_12"],eventMoment.lockedWhole),eventMoment.masterChanceType.odds[12]=$scope.masterOdds[$scope.masterOdds[odds[event.EventChanceTypeID+"_12"].OddsID].ID],$scope.masterOdds[odds[event.EventChanceTypeID+"_12"].OddsID].eventID=eventMoment.ID)),eventMoment.
1score=$rootScope.parseScores(eventMoment.scoreString,eventMoment.sportID),eventMoment.locked=$scope.isEventLocked(eventMoment),eventMoment},$scope.getBetbuilderOdds=function(event){OfferService.getBetbuilderAvailableOdds(event.ID).then(function(res){res=res.data;res&&res.OddsIDs&&(event.betbuilderOdds=res.OddsIDs)},function(err){})},$scope.addBetbuilderOddsToTicket=function(){var betbuilderOddIDs=$scope.getSelectedBetbuilderOddIDs();0===betbuilderOddIDs.length?$scope.handleBetbuilderAddToTicketFailure("empty_selection"):OfferService.getBetbuilderMultiOddID(betbuilderOddIDs).then(function(res){var modal,res=res.data;res&&res.OddsID?($rootScope.toggleOdd(res.OddsID,!0),(modal=UIkit.modal("#modal-betbuilder-add-to-ticket")).isActive()&&modal.hide()):$scope.handleBetbuilderAddToTicketFailure("missing_odd_id",res)},function(err){$scope.handleBetbuilderAddToTicketFailure("request_failed",err)})},$scope.handleBetbuilderAddToTicketFailure=function(reason,data){},$scope.showBetbuilderSelectedOddsNotice=function(langKey){$scope.betbuilderSelectedOddsNoticeLangKey=langKey,$scope.betbuilderMaxSelectedOddsNoticeVisible=!0,betbuilderMaxSelectedOddsNoticeTimeout&&$timeout.cancel(betbuilderMaxSelectedOddsNoticeTimeout),betbuilderMaxSelectedOddsNoticeTimeout=$timeout(function(){$scope.betbuilderMaxSelectedOddsNoticeVisible=!1,betbuilderMaxSelectedOddsNoticeTimeout=null},2e3)},$scope.showBetbuilderMaxSelectedOddsNotice=function(){$scope.showBetbuilderSelectedOddsNotice("betbuilder_max_odds_error")},$scope.showBetbuilderCombinationNotPossibleNotice=function(){$scope.showBetbuilderSelectedOddsNotice("betbuilder_combination_not_possible_title")},$scope.recalculateSelectedBetbuilderOdds=function(lastAddedOdd){var betbuilderOddIDs=$scope.getSelectedBetbuilderOddIDs();0===betbuilderOddIDs.length?($scope.clearBetbuilderRecalculation(),$scope.changeBetbuilderSignalrView([])):($scope.betbuilderRecalculateInProgress=!0,OfferService.recalculateBetbuilderOdds(betbuilderOddIDs).then(function(res){$scope.isBetbuilderRecalculationError(res.data)?$scope.handleBetbuilderRecalculationFailure("invalid_combination",res.data,lastAddedOdd):($scope.applyBetbuilderRecalculation(res.data),$scope.changeBetbuilderSignalrView(betbuilderOddIDs))},function(err){$scope.handleBetbuilderRecalculationFailure("request_failed",err)}).finally(function(){$scope.betbuilderRecalculateInProgress=!1}))},$scope.isBetbuilderRecalculationError=function(response){return response&&(void 0!==response.ErrorCode||void 0!==response.ErrorMessage||void 0!==response.ErrorKey)},$scope.handleBetbuilderRecalculationFailure=function(reason,data,lastAddedOdd){lastAddedOdd&&$scope.removeLastAddedBetbuilderOdd(lastAddedOdd),$scope.showBetbuilderCombinationNotPossibleNotice()},$scope.removeLastAddedBetbuilderOdd=function(lastAddedOdd){lastAddedOdd=lastAddedOdd||$scope.selectedBetbuilderOdds[$scope.selectedBetbuilderOdds.length-1];lastAddedOdd&&$scope.removeSelectedBetbuilderOdd(lastAddedOdd)},$scope.clearBetbuilderRecalculation=function(){$scope.BetbuilderOddsRate=null,$scope.betbuilderConflictOdds=[],$scope.betbuilderConflictOddIDs={}},$scope.applyBetbuilderRecalculation=function(response){response?($scope.BetbuilderOddsRate=response.OddsRate,$scope.betbuilderConflictOdds=[],$scope.betbuilderConflictOddIDs={},(angular.isArray(response.Events)?response.Events:[response.Events]).forEach(function(event){event&&angular.isArray(event.OddsRestricted)&&event.OddsRestricted.forEach(function(oddRestriction){oddRestriction&&oddRestriction.IsConflict&&null!=oddRestriction.OddsID&&($scope.betbuilderConflictOdds.push(oddRestriction.OddsID),$scope.betbuilderConflictOddIDs[oddRestriction.OddsID]=!0)})}),$scope.betbuilderConflictOdds=_.uniq($scope.betbuilderConflictOdds)):$scope.clearBetbuilderRecalculation()},$scope.updateMasterOdd=function(ID,rate,status,lockedWhole){$scope.masterOdds&&$scope.masterOdds[ID]&&($scope.masterOdds[ID].rate=rate,$scope.masterOdds[ID].oldStatus=status,$scope.masterOdds[ID].newStatus=status,$scope.masterOdds[ID].visibility=$rootScope.getOddVisibility("other",status,status,lockedWhole),$scope.masterOdds[ID].locked=$scope.masterOdds[ID].visibility<$rootScope.visibility.SHOW,$scope.masterOdds[ID].hidden=$scope.masterOdds[ID].visibility<$rootScope.visibility.LOCK)},$scope.updateMasterChanceType=function(ID,status,lockedWhole){$scope.masterChanceTypes&&$scope.masterChanceTypes[ID]&&($scope.masterChanceTypes[ID].oldStatus=status,$scope.masterChanceTypes[ID].newStatus=status,$scope.masterChanceTypes[ID].visibility=$rootScope.getEctVisibility("other",status,status,lockedWhole),$scope.masterChanceTypes[ID].locked=$scope.masterChanceTypes[ID].visibility<$rootScope.visibility.SHOW,$scope.masterChanceTypes[ID].hidden=$scope.masterChanceTypes[ID].visibility<$rootScope.visibility.LOCK)},$scope.isEventLocked=function(){return!1},$scope.refactorMasterCht=function(odd,lockedWhole){return(retOdd={ID:odd.OddsID,chanceTypeID:odd.EventChanceTypeID,rate:odd.OddsRate,oldStatus:odd.Status,newStatus:odd.Status,visibility:$rootScope.getOddVisibility("other",odd.Status,odd.Status,lockedWhole)}).locked=retOdd.visibility<$rootScope.visibility.SHOW,retOdd.hidden=retOdd.visibility<$rootScope.visibility.LOCK,retOdd},$scope.toggleDetail=function(event,silentOpen,groupIDToOpen,isInFav){isInFav=!!isInFav,$rootScope.keepAlive(),event.opened?$rootScope.showDual||isInFav===$scope.openedEventIsInFav?$scope.closeDetail(event):$scope.openedEventIsInFav=isInFav:$scope.openDetail(event,silentOpen,groupIDToOpen,isInFav)}
1,$scope.toggleDetailWithStream=function(event,isInFav){$scope.currentParams.live?$scope.toggleDetail(event,null,null,isInFav):$location.url(event.URL.replace($rootScope.ENV.routes[$rootScope.LanguageID].offer,$rootScope.ENV.routes[$rootScope.LanguageID].live))},$scope.redirectToStream=function(event){$scope.currentParams.live||$location.url(event.URL.replace($rootScope.ENV.routes[$rootScope.LanguageID].offer,$rootScope.ENV.routes[$rootScope.LanguageID].live))},$scope.openDetail=function(event,silentOpen,groupIDToOpen,isInFav){groupIDToOpen&&($rootScope.groupIDToOpen=groupIDToOpen),0===$scope.sports[0].ID?$location.search("event",null):($scope.currentlyLoadingDetail=!0,OfferService.getEventDetail(event.ID).then(function(response){(detailData=response.data).BetradarTeamsScrubbed={},_.mapObject(detailData.BetradarTeams,function(val,key){return-1<key.indexOf("_")&&(detailData.BetradarTeamsScrubbed[key.split("_")[0]]=val),val}),event.showStats&&angular.forEach(detailData.BetradarTeams,function(value,key){value="https://s5.sir.sportradar.com/doxxbet/"+$rootScope.LanguageID+"/"+$rootScope.Dictionary.BetradarSportMapping[event.sportID]+"/team/"+value;-1<key.indexOf("_10")?event.homeStatsURL=value:-1<key.indexOf("_20")&&(event.awayStatsURL=value)}),silentOpen||($location.search("event",event.ID),$location.search("name",$rootScope.slugify(detailData.Event.EventName))),event.opened=!0,event.eventChanceTypes={},event.paramGroups={},event.groups=[],event.openedGroup=null,event.prematchEventID=detailData.Event.PrematchEventID;var groupToOpen=null,foundPopGroup=(event.activeGroup={ID:"active",name:$rootScope.Lang.App.active,paramGroups:[],onlyActive:!0,skipAdd:!0,order:-999},event.allGroup={ID:"all",name:$rootScope.Lang.App.all,paramGroups:[],onlyActive:!1,skipAdd:!0,order:999},event.lockedGroup={ID:"locked",name:$rootScope.Lang.App.locked,paramGroups:[],onlyActive:!1,skipAdd:!0,order:999},event.hasBetbuilder&&(event.betBuilderGroup={ID:"betbuilder",name:"BetBuilder",paramGroups:[],betBuilderGroup:!0,onlyActive:!0,skipAdd:!0,order:-1e3},event.groups.push(event.betBuilderGroup)),event.isLive?event.groups.push(event.activeGroup):event.groups.push(event.allGroup),null),groupIDToOpen=(detailData.ChanceTypeGroups.forEach(function(chanceTypeGroup){chanceTypeGroup={ID:chanceTypeGroup.ChanceTypeGroupID,name:chanceTypeGroup.ChanceTypeGroupName,paramGroups:[],onlyActive:!0,order:chanceTypeGroup.RecordOrder,groupChanceTypesString:"&"+chanceTypeGroup.ChanceTypes.join("&")+"&"};2===chanceTypeGroup.order&&(foundPopGroup=chanceTypeGroup),event.groups.push(chanceTypeGroup)}),event.isLive&&event.groups.push(event.lockedGroup),$rootScope.groupIDToOpen);null!==(groupIDToOpen=-3==groupIDToOpen?"betbuilder":groupIDToOpen)&&event.groups.forEach(function(grp){grp.ID==groupIDToOpen&&(groupToOpen=grp)}),$rootScope.groupIDToOpen=null,groupToOpen=groupToOpen||$scope.getDefaultGroupToOpen(event,foundPopGroup),detailData.Odds.forEach(function(odd){detailData.EventChanceTypes[odd.EventChanceTypeID].Odds||(detailData.EventChanceTypes[odd.EventChanceTypeID].Odds=[]);var mappedSport,pushedOdd={ID:odd.OddsID,rate:odd.OddsRate,order:parseFloat(odd.TipOrder),type:detailData.EventChanceTypes[odd.EventChanceTypeID].ChanceTypeID,onTicket:!1,playerID:null,newStatus:odd.Status,oldStatus:odd.Status,paramLimitMark:odd.ParamLimitMark,betType:detailData.EventChanceTypes[odd.EventChanceTypeID].BetType};$scope.updateMasterOdd(pushedOdd.ID,pushedOdd.rate,pushedOdd.newStatus,event.lockedWhole),"VICTORIA_PLAYER"===detailData.EventChanceTypes[odd.EventChanceTypeID].BetType?(detailData.BetradarTeams[odd.CompetitorID+"_10"]?(pushedOdd.playerID=detailData.BetradarTeams[odd.CompetitorID+"_10"],pushedOdd.playerFallback="("+detailData.LocalizedTips[1]+")"):detailData.BetradarTeams[odd.CompetitorID+"_20"]&&(pushedOdd.playerID=detailData.BetradarTeams[odd.CompetitorID+"_20"],pushedOdd.playerFallback="("+detailData.LocalizedTips[2]+")"),(mappedSport=$rootScope.Dictionary.BetradarSportMapping[event.sportID])&&pushedOdd.playerID&&odd.BetradarPlayerID&&(pushedOdd.playerStatsURL="https://s5.sir.sportradar.com/doxxbet/"+$rootScope.L
1anguageID+"/"+mappedSport+"/season/"+detailData.Event.SeasonID+"/team/"+pushedOdd.playerID+"/player/"+odd.BetradarPlayerID)):detailData.BetradarTeamsScrubbed[odd.CompetitorID]&&(pushedOdd.playerID=detailData.BetradarTeamsScrubbed[odd.CompetitorID],pushedOdd.playerFallback=""),pushedOdd.name=$scope.getOddName(odd,$rootScope.OddsViewMode,detailData.LocalizedTips,event.teams,detailData.Labels,detailData.EventChanceTypes[odd.EventChanceTypeID]),detailData.EventChanceTypes[odd.EventChanceTypeID].Odds.push(pushedOdd),event.odds[pushedOdd.ID]=pushedOdd}),detailData.EventChanceTypes=_.sortBy(detailData.EventChanceTypes,"Order"),_.mapObject(detailData.EventChanceTypes,function(originalECT){var newECT={ID:originalECT.EventChanceTypeID,name:originalECT.ChanceTypeName,order:originalECT.Order,odds:originalECT.Odds,oddsCount:originalECT.Odds?originalECT.Odds.length:1,oldStatus:originalECT.EventChanceTypeStatus,newStatus:originalECT.EventChanceTypeStatus,isPlayer:"VICTORIA_PLAYER"===originalECT.BetType},addGroup=($scope.updateMasterChanceType(newECT.ID,newECT.newStatus,event.lockedWhole),newECT.odds.forEach(function(odd){odd.eventChanceType=newECT}),event.eventChanceTypes[originalECT.EventChanceTypeID]=newECT,!1);originalECT.ParamGroupID?(paramGroup=event.paramGroups["G_"+originalECT.ParamGroupID])||(addGroup=!0,originalParamGroup=_.findWhere(detailData.ChanceTypeParamGroups,{ParamGroupID:originalECT.ParamGroupID}),paramGroup={ID:"G_"+originalParamGroup.ParamGroupID,name:originalParamGroup.ParamGroupName,eventChanceTypes:[],tooltip:originalParamGroup.ParamGroupToolTip,isDuo:"DUO"==originalECT.BetType,columnCount:"DUO"===originalECT.BetType?2:3,tipClutch:originalParamGroup.TipClutch,order:originalECT.Order,locked:!0,handicapMarker:originalParamGroup.HandicapMarker}):paramGroup={ID:"E_"+event.eventChanceTypes[originalECT.EventChanceTypeID].ID,name:event.eventChanceTypes[originalECT.EventChanceTypeID].name,eventChanceTypes:[],locked:addGroup=!0,order:originalECT.Order,tooltip:originalECT.ToolTip,columnCount:1===event.eventChanceTypes[originalECT.EventChanceTypeID].oddsCount?1:"DUO"===originalECT.BetType||2===event.eventChanceTypes[originalECT.EventChanceTypeID].oddsCount?2:3,isDuo:"DUO"===originalECT.BetType},(event.eventChanceTypes[originalECT.EventChanceTypeID].paramGroup=paramGroup).eventChanceTypes.push(event.eventChanceTypes[originalECT.EventChanceTypeID]),(event.eventChanceTypes[originalECT.EventChanceTypeID].paramGroup=paramGroup).locked=paramGroup.locked&&event.eventChanceTypes[originalECT.EventChanceTypeID].locked,addGroup&&(paramGroup.chanceTypeID=originalECT.ChanceTypeID,event.paramGroups[paramGroup.ID]=paramGroup,event.allGroup.paramGroups.push(paramGroup),event.betBuilderGroup&&event.betBuilderGroup.paramGroups.push(paramGroup),event.activeGroup.paramGroups.push(paramGroup),event.lockedGroup.paramGroups.push(paramGroup),event.groups.forEach(function(group){group.skipAdd||-1===group.groupChanceTypesString.indexOf("&"+paramGroup.chanceTypeID+"&")||group.paramGroups.push(paramGroup)})),"G"===paramGroup.ID[0]&&event.eventChanceTypes[originalECT.EventChanceTypeID].odds.forEach(function(odd){var paramLimit;odd.paramLimitMark?odd.name+=" "+odd.paramLimitMark:(paramLimit=originalECT.ParamLimit,paramGroup.tipClutch?odd.name+=" "+paramGroup.tipClutch+" ":"-"===paramGroup.handicapMarker||"+"===paramGroup.handicapMarker?(odd.name+=" "+paramGroup.handicapMarker,paramGroup.handicapMarker="-"===paramGroup.handicapMarker?"+":"-"):"Y"===paramGroup.handicapMarker?(paramLimit="-"!==paramLimit.charAt(0)?" +"+paramLimit:" "+paramLimit,paramGroup.handicapMarker="N"):"N"===paramGroup.handicapMarker?(paramLimit="-"!==paramLimit.charAt(0)?" -"+paramLimit:" +"+paramLimit.substring(1),paramGroup.handicapMarker="Y"):odd.name+=" ",odd.name+=paramLimit)})}),$scope.openedEvent&&$scope.openedEvent.ID!==event.ID&&$scope.clearSelectedBetbuilderOdds(),$scope.openedEvent&&($scope.openedEvent.opened=!1),$scope.openedEvent=event,$scope.openedEventIsInFav=!!isInFav,groupToOpen=groupToOpen||$scope.openedEvent.groups[0],event.opened=!0,$scope.changeClientView($scope.currentParam
1s.sportEvent,$scope.currentParams.sport,$scope.currentParams.region,$scope.currentParams.league,event.ID),$scope.currentlyLoadingDetail=!1,$rootScope.loadTooltips(),$timeout(function(){var scrollToElement;$scope.openGroup(groupToOpen),silentOpen||($rootScope.showDual?((scrollToElement=$("#new_live_offer").scrollTop()+$("#event-live-"+event.ID+"-"+(isInFav?"fav":"nonfav")).offset().top-200)<0&&(scrollToElement=0),$("#new_live_offer")):((scrollToElement=$("#sportbook-main-container").scrollTop()+$("#event-regular-"+event.ID).offset().top-200)<0&&(scrollToElement=0),$("#sportbook-main-container"))).scrollTop(scrollToElement),loadGreedy()},0)}).finally(function(){$scope.requestOddsBroadcast();var matchTrackerID=null;$rootScope.ENV.matchTracker&&event.hasMatchTracker&&(matchTrackerID=detailData.Event.BetradarStatisticsUrn),$rootScope.$broadcast("event_opened",{ID:event.ID,matchTrackerID:matchTrackerID,streamID:event.streamID||null,streamProvider:event.streamProvider||null,isLive:event.isLive,isLiveOffer:$scope.currentParam
1s.live,isSpecialEvent:event.isSpecialEvent})}))},$scope.updateDetail=function(event){OfferService.getEventDetail(event.ID).then(function(response){(detailData=response.data).ChanceTypeGroups.forEach(function(chanceTypeGroup){var oldGroup=_.findWhere(event.groups,{ID:chanceTypeGroup.ChanceTypeGroupID});oldGroup&&(oldGroup.groupChanceTypesString="&"+chanceTypeGroup.ChanceTypes.join("&")+"&")}),_.mapObject(event.eventChanceTypes,function(chanceType){return chanceType.order=-1,chanceType}),_.mapObject(event.paramGroups,function(paramGroup){return paramGroup.order=-1,paramGroup}),_.mapObject(detailData.EventChanceTypes,function(chanceType){return event.eventChanceTypes[chanceType.EventChanceTypeID]&&(event.eventChanceTypes[chanceType.EventChanceTypeID].order=chanceType.Order,event.eventChanceTypes[chanceType.EventChanceTypeID].paramGroup.order=chanceType.Order),chanceType}),detailData.Odds.forEach(function(odd){var chanceType,paramGroup,addGroup,originalECT;event.odds[odd.OddsID]?(event.odds[odd.OddsID].rate=odd.OddsRate,event.odds[odd.OddsID].newStatus=odd.Status,event.odds[odd.OddsID].oldStatus=odd.Status,event.odds[odd.OddsID].visibility=$rootScope.getOddVisibility($scope.openedGroup?$scope.openedGroup.ID:null,odd.Status,odd.Status,event.lockedWhole),event.odds[odd.OddsID].locked=event.odds[odd.OddsID].visibility<$rootScope.visibility.SHOW,event.odds[odd.OddsID].hidden=event.odds[odd.OddsID].visibility<$rootScope.visibility.LOCK):(originalECT=detailData.EventChanceTypes[odd.EventChanceTypeID],(chanceType=event.eventChanceTypes[odd.EventChanceTypeID])?(chanceType.oldStatus=originalECT.EventChanceTypeStatus,chanceType.newStatus=originalECT.EventChanceTypeStatus,chanceType.visibility=$rootScope.getEctVisibility($scope.openedGroup?$scope.openedGroup.ID:null,chanceType.oldStatus,chanceType.newStatus,event.lockedWhole),chanceType.locked=chanceType.visibility<$rootScope.visibility.SHOW,chanceType.hidden=chanceType.visibility<$rootScope.visibility.LOCK,paramGroup=chanceType.paramGroup):(_.where(detailData.Odds,{EventChanceTypeID:originalECT.EventChanceTypeID}).length,(chanceType={ID:originalECT.EventChanceTypeID,name:originalECT.ChanceTypeName,order:originalECT.Order,odds:[],oddsCount:_.where(detailData.Odds,{EventChanceTypeID:originalECT.EventChanceTypeID}).length,oldStatus:originalECT.EventChanceTypeStatus,newStatus:originalECT.EventChanceTypeStatus,visibility:$rootScope.getEctVisibility($scope.openedGroup?$scope.openedGroup.ID:null,originalECT.EventChanceTypeStatus,originalECT.EventChanceTypeStatus,event.lockedWhole)}).locked=chanceType.visibility<$rootScope.visibility.SHOW,chanceType.hidden=chanceType.visibility<$rootScope.visibility.LOCK,event.eventChanceTypes[odd.EventChanceTypeID]=chanceType,$scope.updateMasterChanceType(chanceType.ID,chanceType.newStatus,event.lockedWhole),addGroup=!1,originalECT.ParamGroupID?(paramGroup=event.paramGroups["G_"+originalECT.ParamGroupID])||(addGroup=!0,originalParamGroup=_.findWhere(detailData.ChanceTypeParamGroups,{ParamGroupID:originalECT.ParamGroupID}),paramGroup={ID:"G_"+originalParamGroup.ParamGroupID,name:originalParamGroup.ParamGroupName,eventChanceTypes:[],tooltip:originalParamGroup.ParamGroupToolTip,isDuo:"DUO"==originalECT.BetType,columnCount:"DUO"===originalECT.BetType?2:3,locked:!0,order:originalECT.Order,tipClutch:originalParamGroup.TipClutch,handicapMarker:originalParamGroup.HandicapMarker}):paramGroup={ID:"E_"+chanceType.ID,name:chanceType.name,eventChanceTypes:[],tooltip:originalECT.ToolTip,locked:addGroup=!0,order:originalECT.Order,columnCount:1===chanceType.oddsCount?1:"DUO"===originalECT.BetType||2===chanceType.oddsCount?2:3,isDuo:"DUO"===originalECT.BetType},(chanceType.paramGroup=paramGroup).eventChanceTypes.push(chanceType),(chanceType.paramGroup=paramGroup).locked=paramGroup.locked&&chanceType.locked,addGroup&&(paramGroup.chanceTypeID=originalECT.ChanceTypeID,event.paramGroups[paramGroup.ID]=paramGroup,event.allGroup.paramGroups.push(paramGroup),event.betBuilderGroup&&event.betBuilderGroup.paramGroups.push(paramGroup),event.activeGroup.paramGroups.push(paramGroup),event.lockedGroup.paramGroups.push(paramGroup),event.groups.forEach(function(group){group.skipAdd||-1===group.groupChanceTypesString.indexOf("&"+paramGroup.chanceTypeID+"&")||(group.paramGroups.push(paramGroup),group.paramGroups=_.sortBy(group.paramGroups,"order"))}))),addGroup={ID:odd.OddsID,name:$scope.getOddName(odd,$rootScope.OddsViewMode,detailData.LocalizedTips,event.teams,detailData.Labels,detailData.EventChanceTypes[odd.EventChanceTypeID]),rate:odd.OddsRate,order:parseFloat(odd.TipOrder),type:detailData.EventChanceTypes[odd.EventChanceTypeID].ChanceTypeID,onTicket:!1,paramLimitMark:odd.ParamLimitMark,eventChanceType:chanceType,oldStatus:odd.Status,newStatus:odd.Status,visibility:$rootScope.getOddVisibility($scope.openedGroup?$scope.openedGroup.ID:null,odd.Status,odd.Status,event.lockedWhole)},$scope.updateMasterOdd(addGroup.ID,addGroup.rate,addGroup.newStatus,event.lockedWhole),addGroup.locked=addGroup.visibility<$rootScope.visibility.SHOW,addGroup.hidden=addGroup.visibility<$rootScope.visibility.LOCK,"G"===paramGroup.ID[0]&&(addGroup.paramLimitMark?addGroup.name+=" "+addGroup.paramLimitMark:(originalECT=originalECT.ParamLimit,paramGroup.tipClutch?addGroup.name+=" "+paramGroup.tipClutch+" ":"-"===paramGroup.handicapMarker||"+"===paramGroup.handicapMarker?(addGroup.name+=" "+paramGroup.handicapMarker,paramGroup.handicapMarker="-"===paramGroup.handicapMarker?"+":"-"):"Y"===paramGroup.handicapMarker?(originalECT="-"!==originalECT.charAt(0)?" +"+originalECT:" "+originalECT,paramGroup.handicapMarker="N"):"N"===paramGroup.handicapMarker?(originalECT="-"!==originalECT.charAt(0)?" -"+originalECT:" +"+originalECT.substring(1),paramGroup.handicapMarker="Y"):addGroup.name+=" ",addGroup.name+=originalECT)),event.odds[odd.OddsID]=addGroup,chanceType.odds.push(event.odds[odd.OddsID]),chanceType.columnCount=2===chanceType.odds.length||4===chanceType.odds.length?2:3)})}).finally(function(){$scope.requestOddsBroadcast()})},$scope.oddNameGaps=["<span class='truncater'>","</span><span style='flex-shrink: 0;padding-right: 5px;'>","</span><span class='truncater'>","</span>"],$scope.getOddName=function(originalOdd,viewMode,localizedTips,teams,labels,chanceType){var retName="";switch(chanceType&&(retName=("VICTORIA_PLAYER"==chanceType.BetType&&labels["PL_"+originalOdd.PlayerID]?labels["PL_"+originalOdd.PlayerID]:"VICTORIA_COMPETITOR"==chanceType.BetType&&labels["CP_"+originalOdd.CompetitorID]?labels["CP_"+originalOdd.CompetitorID]:labels["TP_"+originalOdd.TipID]).Name),viewMode){case 1:break;
1case 2:switch(retName){case"1X":retName=localizedTips[1]+" "+localizedTips.OR+" "+localizedTips.X;break;case"X2":retName=localizedTips.X+" "+localizedTips.OR+" "+localizedTips[2];break;case"12":retName=localizedTips[1]+" "+localizedTips.OR+" "+localizedTips[2]}case 4:"1"!=retName&&"X"!=retName&&"2"!=retName||(retName=localizedTips[retName]);break;case 3:switch(retName){case"1X":retName=$scope.oddNameGaps[0]+teams[0]+$scope.oddNameGaps[1]+" "+localizedTips.OR+" "+$scope.oddNameGaps[2]+localizedTips.X+$scope.oddNameGaps[3];break;case"X2":retName=$scope.oddNameGaps[0]+localizedTips.X+$scope.oddNameGaps[1]+" "+localizedTips.OR+" "+$scope.oddNameGaps[2]+teams[1]+$scope.oddNameGaps[3];break;case"12":retName=$scope.oddNameGaps[0]+teams[0]+$scope.oddNameGaps[1]+" "+localizedTips.OR+" "+$scope.oddNameGaps[2]+teams[1]+$scope.oddNameGaps[3]}case 5:switch(retName){case"1":retName=teams[0];break;case"X":retName=localizedTips.X;break;case"2":retName=teams[1]}}return retName},$scope.closeDetail=function(event,skipChangeView){$scope.clearSelectedBetbuilderOdds(),$scope.openedEvent=null,$location.search("event",null),$location.search("name",null),event&&(event.opened=!1,event.paramGroups=[],event.eventChanceTypes={},event.odds={}),skipChangeView||$scope.changeClientView($scope.currentParams.sportEvent,$scope.currentParams.sport,$scope.currentParams.region,$scope.currentParams.league)},$scope.assignBetbuilderOnMessage=function(){$rootScope.iframeApi.onMessage=function(message){"addToBetslip"===message.command&&$rootScope.toggleOdd(message.sportsbookMarketContext,!0)}},$scope.loadBetbuilder=function(){$rootScope.iframeApi?$scope.assignBetbuilderOnMessage():document.getElementById("betbuilder-iframe")?"undefined"!=typeof IFrameApi?($scope.betbuilderBlocked=!1,$rootScope.iframeApi=new IFrameApi("betbuilder-iframe"),$timeout($scope.assignBetbuilderOnMessage,200,!1)):$scope.betbuilderBlocked=!0:($scope.bbRetries?$scope.bbRetries++:$scope.bbRetries=1,5<$scope.bbRetries?$scope.bbRetries=null:$timeout($scope.loadBetbuilder,500*$scope.bbRetries))},$scope.toggleOddOffer=function(odd,isBetbuilderOdd){isBetbuilderOdd?null!==(isBetbuilderOdd=$scope.getBetbuilderOddID(odd))&&($scope.selectedBetbuilderOddIDs[isBetbuilderOdd]?($scope.removeSelectedBetbuilderOdd(odd),$scope.recalculateSelectedBetbuilderOdds()):$scope.betbuilderConflictOddIDs[odd.ID]?$scope.showBetbuilderCombinationNotPossibleNotice():10<=$scope.selectedBetbuilderOdds.length?$scope.showBetbuilderMaxSelectedOddsNotice():($scope.selectedBetbuilderOdds.push(odd),$scope.selectedBetbuilderOddIDs[isBetbuilderOdd]=!0,$scope.recalculateSelectedBetbuilderOdds(odd))):$rootScope.toggleOdd(odd.ID)},$scope.removeSelectedBetbuilderOdd=function(odd){var oddID=$scope.getBetbuilderOddID(odd);null!==oddID&&($scope.selectedBetbuilderOdds=_.reject($scope.selectedBetbuilderOdds,function(selectedOdd){return $scope.getBetbuilderOddID(selectedOdd)==oddID}),$scope.selectedBetbuilderOddIDs=_.omit($scope.selectedBetbuilderOddIDs,oddID))},$scope.getBetbuilderOddID=function(odd){return odd?null!=odd.ID?odd.ID:null!=odd.OddsID?odd.OddsID:null:null},$scope.getSelectedBetbuilderOddIDs=function(){var betbuilderOddIDs=[];return $scope.selectedBetbuilderOdds.forEach(function(odd){odd=$scope.getBetbuilderOddID(odd);null!==odd&&betbuilderOddIDs.push(odd)}),_.uniq(betbuilderOddIDs)},$scope.isBetbuilderOddSelected=function(odd){odd=$scope.getBetbuilderOddID(odd);return null!==odd&&!!$scope.selectedBetbuilderOddIDs[odd]},$scope.clearSelectedBetbuilderOdds=function(){$scope.selectedBetbuilderOdds=[],$scope.selectedBetbuilderOddIDs={},$scope.changeBetbuilderSignalrView([]),$scope.clearBetbuilderRecalculation()},$scope.$on("odd_toggled",function(){$scope.openedEvent?.openedGroup?.betBuilderGroup&&$scope.closeBetbuilder()}),$scope.changeBetbuilderSignalrView=function(betbuilderOddIDs){betbuilderOddIDs=0<(betbuilderOddIDs=void 0===betbuilderOddIDs?$scope.getSelectedBetbuilderOddIDs():betbuilderOddIDs).length?[{betbuilderOdds:betbuilderOddIDs.sort(function(a,b){return a-b})}]:[];$scope.$emit("signalr_changeView",{newViews:betbuilderOddIDs,oldViews:$scope.currentBetbuilderSignalrViews}),$scope.currentBetbuilderSignalrViews=betbuilderOddIDs},$rootScope.openBetbuilderLoginModal=function(){var modal=UIkit.modal("#modal
1-betbuilder-login");modal.isActive()||modal.show()},$rootScope.openBetbuilderClosedModal=function(){var modal=UIkit.modal("#modal-betbuilder-closed");modal.isActive()||modal.show()},$rootScope.openBetbuilderEmptySelectionModal=function(){var modal=UIkit.modal("#modal-betbuilder-empty-selection");modal.isActive()||modal.show()},$rootScope.openBetbuilderAddToTicketModal=function(){var modal;1<$scope.selectedBetbuilderOdds.length&&((modal=UIkit.modal("#modal-betbuilder-add-to-ticket")).isActive()||modal.show())},$scope.getDefaultGroupToOpen=function(event,foundPopGroup){if(!event||!event.groups||0===event.groups.length)return null;if(foundPopGroup&&!event.isLive)return foundPopGroup;if(!event.isLive){foundPopGroup=_.find(event.groups,function(group){return 2===group.order&&!group.skipAdd});if(foundPopGroup)return foundPopGroup}return _.find(event.groups,function(group){return"betbuilder"!==group.ID})},$scope.closeBetbuilder=function(){var defaultGroup;$scope.openedEvent&&$scope.openedEvent.openedGroup&&$scope.openedEvent.openedGroup.betBuilderGroup&&(defaultGroup=$scope.getDefaultGroupToOpen($scope.openedEvent))&&$scope.openGroup(defaultGroup)},$scope.openGroup=function(group){var defaultGroup;group.betBuilderGroup&&!$rootScope.IsClientLoggedIn?((defaultGroup=$scope.getDefaultGroupToOpen($scope.openedEvent))&&$scope.openGroup(defaultGroup),$rootScope.openBetbuilderLoginModal()):$scope.openedEvent.openedGroup!==group&&$timeout(function(){$scope.openedEvent?.openedGroup?.betBuilderGroup&&$scope.clearSelectedBetbuilderOdds(),($scope.openedEvent.openedGroup=group).betBuilderGroup&&$scope.getBetbuilderOdds($scope.openedEvent),$scope.openedEvent.openedGroup.paramGroups.forEach(function(pGroug){pGroug.eventChanceTypes.forEach(function(iect){iect.odds.forEach(function(iodd){iodd.oldStatus=iodd.newStatus,iodd.visibility=$rootScope.getOddVisibility(group.ID,iodd.oldStatus,iodd.newStatus,$scope.openedEvent.lockedWhole)}),iect.oldStatus=iect.newStatus,iect.visibility=$rootScope.getEctVisibility(group.ID,iect.oldStatus,iect.newStatus,$scope.openedEvent.lockedWhole)})}),$timeout(function(){$(".tooltip").not(".tooltipstered").tooltipster({interactive:!0,delay:50,theme:"labeled"}),loadGreedy(),$timeout($scope.scrollToEventHeader,0,!1)},100,!1),$(".ticket__top").click()})},$scope.openGroupByID=function(id){for(var i=0;i<$scope.openedEvent.groups.length;i++)if($scope.openedEvent.groups[i].ID===id)return void $scope.openGroup($scope.openedEvent.groups[i])},$scope.scrollToEventHeader=function(){$scope.openedEvent&&$scope.openedEvent.opened&&(0<$(".offer__detail--content").length?($("#new_live_detail").scrollTop(0),$("#sportbook-main-container").scrollTop($(".offer__detail--content").offset().top-$("#sportbook-main-container").position().top+$("#sportbook-main-container").scrollTop()-10)):$timeout(function(){$scope.scrollToEventHeader()},500,!1))},$scope.toggleFavoriteEvent=function(event){$rootScope.toggleFavoriteEventID(event.ID)},$scope.createTimeTo=function(ev){var timeDiff;"notstarted"===ev.gamePartID&&ev.isLive?0<(timeDiff=ev.moment.diff(moment(),"minutes"))?(ev.gamePart=$rootScope.Lang.App.starts_in,ev.timeToStart=timeDiff+" min.",ev.timeToInterval||(ev.timeToInterval=$interval(function(){$scope.createTimeTo(ev)},6e4),$scope.timerIntervals.push(ev.timeToInterval))):($scope.timerIntervals=_.without($scope.timerIntervals,ev.timeToInterval),$interval.cancel(ev.timeToInterval),ev.timeToInterval=null,ev.gamePart=$rootScope.GameParts[ev.gamePartID].Name,ev.timeToStart=null):ev.timeToInterval&&($scope.timerIntervals=_.without($scope.timerIntervals,ev.timeToInterval),$interval.cancel(ev.timeToInterval),ev.timeToInterval=null,ev.gamePart=$rootScope.GameParts[ev.gamePartID].Name,ev.timeToStart=null)},$scope.delayedOddChanges=[],$scope.delayedEchtChanges=[],$scope.delayedEventChanges=[],$scope.$on("signalr_EventChanged",function(event,data){$scope.delayedEventChanges.push({eventID:data.eventID,actualGamePartID:data.actualGamePartID,actualGamePartTime:data.actualGamePartTime,score:data.score,liveBettingView:data.liveBettingView,eventDate:data.eventDate}),$timeout(function(){$scope.eventChanged(data.eventID,data.actualGamePartID,data.actualGamePartTime,data.score,data.liveBettingView,data.eventDate)})}),$rootScope.betBuilderLoadedCallback=function(){$timeout(function(){$rootScope.isBetbuilderLoaded=!0},0)},$scope.$on("signalr_OddsChanged",function(event,data){$scope.delayedOddChanges.push({oddsID:data.oddsID,oddsRate:data.oddsRate,status:data.status})}),$scope.$on("signalr_BbMultiOddChanged",function(event,data){"active"!==data.Status&&($scope.closeBetbuilder(),$rootScope.openBetbuilderClosedModal()),$timeout(function(){$scope.BetbuilderOddsRate=data.OddsRate})}),$scope.$on("signalr_EventChanceTypeChanged",function(event,data){$scope.delayedEchtChanges.push({eventChanceTypeID:data.eventChanceTypeID,status:data.status,eventID:data.eventID})}),$scope.oddChangedBatch=function(){for(var stop=!1;!stop;){var oddChange=$scope.delayedOddChanges.shift();oddChange?$scope.oddChanged(oddChange.oddsID,oddChange.oddsRate,oddChange.status):stop=!0}},$scope.echtChangedBatch=function(){for(var stop=!1;!stop;){var echtChange=$scope.delayedEchtChanges.shift();echtChange?$scope.eventChanceTypeChanged(echtChange.eventChanceTypeID,echtChange.status,echtChange.eventID):stop=!0}},$scope.eventChangedBatch=function(){for(var stop=!1;!stop;){var eventChange=$scope.delayedEventChanges.shift();eventChange?$scope.eventChanged(eventChange.eventID,eventChange.actualGamePartID,eventChange.actualGamePartTime,eventChange.score,eventChange.liveBettingView,eventChange.eventDate):stop=!0}},$scope.applyAllBatchChanges=function(){($scope.delayedOddChanges[0]||$scope.delayedEchtChanges[0]||$scope.delayedEventChanges[0])&&$timeout(function(){$scope.oddChangedBatch(),$scope.echtChangedBatch(),$scope.eventChangedBatch()},0,!0)},$scope.changeClientView=function(sportEventID,sportID,regionID,leagueCupID,eventID){var views=[],viewToPush={};(sportEventID||sportID)&&(sportEventID?viewToPush.sportEventID=sportEventID:viewToPush.sportID=sportID,regionID)&&(viewToPush.regionID=regionID,leagueCupID)&&(viewToPush.leagueID=leagueCupID),($scope.currentParam
1s.live||"TD"===$scope.currentParams.date&&!sportID)&&(viewToPush.live=!0),views.push(viewToPush),eventID&&views.push({eventID:eventID}),$scope.$emit("signalr_changeView",{newViews:views,oldViews:$scope.currentViews}),$scope.currentViews=views},$scope.$on("signalr_RefreshView",function(event,data){if($scope.currentViews)for(var viewIndex=0;viewIndex<$scope.currentViews.length;viewIndex++)$scope.currentViews[viewIndex].str===data.view&&("E_"===data.view.substring(0,2)?$scope.events[$scope.currentViews[viewIndex].eventID]&&$scope.events[$scope.currentViews[viewIndex].eventID].opened&&$scope.updateDetail($scope.events[$scope.currentViews[viewIndex].eventID]):$scope.updateOfferThrottled())}),$scope.eventChanceTypeChanged=function(eventChanceTypeID,status,eventID){$scope.events[eventID]&&($scope.updateMasterChanceType(eventChanceTypeID,status,$scope.events[eventID].lockedWhole),chanceType=$scope.events[eventID].eventChanceTypes[eventChanceTypeID])&&chanceType.newStatus!==status&&(chanceType.oldStatus=chanceType.newStatus,chanceType.newStatus=status,chanceType.visibility=$rootScope.getEctVisibility($scope.openedGroup&&$scope.openedGroup.ID?$scope.openedGroup.ID:"other",chanceType.oldStatus,chanceType.newStatus,$scope.events[eventID].lockedWhole),chanceType.locked=chanceType.visibility<$rootScope.visibility.SHOW,chanceType.hidden=chanceType.visibility<$rootScope.visibility.LOCK)},$scope.oddChanged=function(oddsID,oddsRate,status){$scope.masterOdds&&$scope.masterOdds[oddsID]&&$scope.events[$scope.masterOdds[oddsID].eventID]&&($scope.masterOdds[oddsID].rate=oddsRate,$scope.masterOdds[oddsID].newStatus!==status)&&($scope.masterOdds[oddsID].oldStatus=$scope.masterOdds[oddsID].newStatus,$scope.masterOdds[oddsID].newStatus=status,$scope.masterOdds[oddsID].visibility=$rootScope.getOddVisibility($scope.openedGroup&&$scope.openedGroup.ID?$scope.openedGroup.ID:"other",$scope.masterOdds[oddsID].oldStatus,$scope.masterOdds[oddsID].newStatus,$scope.events[$scope.masterOdds[oddsID].eventID].lockedWhole),$scope.masterOdds[oddsID].locked=$scope.masterOdds[oddsID].visibility<$rootScope.visibility.SHOW,$scope.masterOdds[oddsID].hidden=$scope.masterOdds[oddsID].visibility<$rootScope.visibility.LOCK),$scope.openedEvent&&$scope.openedEvent.odds[oddsID]&&($scope.openedEvent.odds[oddsID].rate=oddsRate,$scope.openedEvent.odds[oddsID].newStatus!==status)&&($scope.openedEvent.odds[oddsID].oldStatus=$scope.openedEvent.odds[oddsID].newStatus,$scope.openedEvent.odds[oddsID].newStatus=status,$scope.openedEvent.odds[oddsID].visibility=$rootScope.getOddVisibility($scope.openedGroup&&$scope.openedGroup.ID?$scope.openedGroup.ID:"other",$scope.openedEvent.odds[oddsID].oldStatus,$scope.openedEvent.odds[oddsID].newStatus,$scope.openedEvent.lockedWhole),$scope.openedEvent.odds[oddsID].locked=$scope.openedEvent.odds[oddsID].visibility<$rootScope.visibility.SHOW,$scope.openedEvent.odds[oddsID].hidden=$scope.openedEvent.odds[oddsID].visibility<$rootScope.visibility.LOCK)},$scope.eventChanged=function(eventID,actualGamePartID,actualGamePartTime,score,liveBettingView,eventDate){var newLockedWhole;$scope.events&&($scope.events[eventID]?(score&&"-1"!==score&&score!==$scope.events[eventID].scoreString&&($scope.events[eventID].scoreString=score,$scope.events[eventID].score=$rootScope.parseScores($scope.events[eventID].scoreString,$scope.events[eventID].sportID)),$scope.events[eventID].gamePart=$rootScope.GameParts[actualGamePartID].Name,$scope.events[eventID].gamePartTime=actualGamePartTime&&-1!==actualGamePartTime?actualGamePartTime+" '":null,$scope.events[eventID].gamePartID!==actualGamePartID&&($scope.events[eventID].gamePartID=actualGamePartID),$scope.createTimeTo($scope.events[eventID]),$scope.events[eventID].lockedWhole!==(newLockedWhole=-1===liveBettingView)&&($scope.events[eventID].lockedWhole=newLockedWhole,$scope.events[eventID].opened)&&$scope.events[eventID].openedGroup.paramGroups.forEach(function(grpi){grpi.eventChanceTypes.forEach(function(ecti){ecti.visibility=$rootScope.getEctVisibility($scope.events[eventID].openedGroup.ID,ecti.oldStatus,ecti.newStatus,newLockedWhole),ecti.locked=ecti.visibility<$rootScope.visibility.SHOW,ecti.hidden=ecti.visibility<$rootScope.visibility.LOCK,ecti.odds.forEach(function(oddi){oddi.visibility=$rootScope.getOddVisibility($scope.events[eventID].openedGroup.ID,oddi.oldStatus,oddi.newStatus,newLockedWhole),oddi.locked=oddi.visibility<$rootScope.visibility.SHOW,oddi.hidden=oddi.visibility<$rootScope.visibility.LOCK})})}),$scope.events[eventID].masterChanceType.visibility=$rootScope.getEctVisibility("other",$scope.events[eventID].masterChanceType.oldStatus,$scope.events[eventID].masterChanceType.newStatus,newLockedWhole),$scope.events[eventID].masterChanceType.locked=$scope.events[eventID].masterChanceType.visibility<$rootScope.visibility.SHOW,$scope.events[eventID].masterChanceType.hidden=$scope.events[eventID].masterChanceType.visibility<$rootScope.visibility.LOCK,["1","2","12","1X","X","X2"].forEach(function(mark){$scope.events[eventID].masterChanceType.odds[mark].visibility=$rootScope.getOddVisibility($scope.events[eventID].openedGroup?$scope.events[eventID].openedGroup.ID:null,$scope.events[eventID].masterChanceType.odds[mark].newStatus,$scope.events[eventID].masterChanceType.odds[mark].newStatus,newLockedWhole),$scope.events[eventID].masterChanceType.odds[mark].locked=$scope.events[eventID].masterChanceType.odds[mark].visibility<$rootScope.visibility.SHOW,$scope.events[eventID].masterChanceType.odds[mark].hidden=$scope.events[eventID].masterChanceType.odds[mark].visibility<$rootScope.visibility.LOCK}),"ended"===actualGamePartID&&$timeout(function(){$scope.events&&$scope.events[eventID]&&$scope.events[eventID].opened&&$scope.closeDetail($scope.events[eventID]),$scope.removeEvent(eventID)}
1,5e3)):$scope.currentParams.top||"staging"!==$rootScope.ENV.name&&$scope.updateOfferThrottled())},$scope.removeEvent=function(eventID){$timeout(function(){var event;$scope.events[eventID]&&((event=$scope.events[eventID]).date.events=_.reject(event.date.events,function(ev){return ev.ID===eventID}),0===event.date.events.length)&&(event.date.league.dates=_.reject(event.date.league.dates,function(date){return date.dateStr===event.date.dateStr}),0===event.date.league.dates.length)&&(event.date.league.region.leagues=_.reject(event.date.league.region.leagues,function(league){return league.ID===event.date.league.ID}),0===event.date.league.region.leagues.length)&&(event.date.league.region.sport.regions=_.reject(event.date.league.region.sport.regions,function(region){return region.ID===event.date.league.region.ID}),0===event.date.league.region.sport.regions.length)&&($scope.sports=_.reject($scope.sports,function(sport){return sport.ID===event.date.league.region.sport.ID})),$scope.events[eventID]=null},0)},$scope.openFirstAvailableEvent=function(){var alreadyOpened=!1;$scope.getOfferSports().forEach(function(sport){alreadyOpened||sport.regions.forEach(function(region){alreadyOpened||region.leagues.forEac
1h(function(league){alreadyOpened||league.events.forEach(function(event){alreadyOpened||event.locked||(event.opened||$scope.toggleDetail(event,!0,null,999999===sport.ID),alreadyOpened=!0)})})})})},$scope.parseDatetime=function(eventDate){var datetime={},eventDate=moment(eventDate),today=moment();return datetime.time=eventDate.format("HH:mm"),(eventDate=eventDate.set({hour:0,minute:0,second:0,millisecond:0})).isSame(today,"day")?(datetime.isToday=!0,datetime.date=$rootScope.Lang.App.today):(datetime.isToday=!1,eventDate.diff(today,"weeks")<1?datetime.date=eventDate.format("dddd"):datetime.date=eventDate.format("DD.MM.")),datetime},$scope.$on("reset_offer",function(){$rootScope.changeView("landing")}),$scope.$on("sync_on_ticket",function(event,oddIDs){$scope.changeOnTicket(_.difference($scope.lastTicketOdds,oddIDs),!1),$scope.changeOnTicket(oddIDs,!0),$scope.lastTicketOdds=oddIDs}),$scope.lastTicketOdds=[],$scope.changeOnTicket=function(oddIDs,status){oddIDs&&0<oddIDs.length&&$scope.masterOdds&&oddIDs.forEach(function(oddID){$scope.masterOdds&&$scope.masterOdds[oddID]&&($scope.masterOdds[oddID].onTicket=status),$scope.openedEvent&&$scope.openedEvent.odds[oddID]&&($scope.openedEvent.odds[oddID].onTicket=status)})},$scope.requestOddsBroadcast=function(){$rootScope.$broadcast("request_odd_broadcast")},$scope.$on("open_event",function(event,eventID){$scope.openDetail($scope.events[eventID])}),$scope.$on("app_loaded",function(){$scope.$emit("load_approved_tickets",{force:!1})}),$scope.toggleBuybackList=function(event,isInFav){event.buybackListOpen&&!isInFav||event.buybackListOpenInFav&&isInFav?isInFav?event.buybackListOpenInFav=!1:event.buybackListOpen=!1:(isInFav?event.buybackListOpenInFav=!0:event.buybackListOpen=!0,$rootScope.eventsWithTickets[event.ID].tickets.forEach(function(buybackTicketCode){$rootScope.buybackTickets[buybackTicketCode].autoBuybackMax||$scope.$emit("request_buyback_load",{ticketCode:buybackTicketCode})})),$timeout(function(){$rootScope.loadTooltips()},0,!1)},$scope.processBuybackInfo=function(res,ticket){res=res.data;res.BuyBackValue&&-1!==res.BuyBackValue?(ticket.buybackValue=res.BuyBackValue,ticket.autoBuybackMin=res.BuyBackValue):(ticket.buybackValue=null,ticket.autoBuybackMin=ticket.bet),ticket.buybackDelay=res.BuyBackDelayMs||0,ticket.autoBuybackMax=ticket.win,0===res.AutoBuyBackValue?(ticket.autoBuybackValue=ticket.buybackValue||0,ticket.autoBuybackSet=!1):res.AutoBuyBackValue&&(ticket.autoBuybackSet=!0,ticket.autoBuybackValue=res.AutoBuyBackValue),ticket.showBuyback=0<res.BuyBackValue,ticket.showAutoBuyback=-1<res.BuyBackValue,$scope.lastOpenedAutoBuyback&&$scope.lastOpenedAutoBuyback.ticketCode===ticket.code&&($scope.initRangeSlider($scope.lastOpenedAutoBuyback.eventID,$rootScope.buybackTickets[$scope.lastOpenedAutoBuyback.ticketCode],$scope.lastOpenedAutoBuyback.isLive,$scope.lastOpenedAutoBuyback.isFav),$scope.autoBuybackRangeChange($rootScope.buybackTickets[$scope.lastOpenedAutoBuyback.ticketCode]))},$scope.startBuyback=function(ticket,buybackElementID){ticket.buybackInProgress=!0,ticket.buybackDelay&&0<ticket.buybackDelay&&buybackElementID&&$rootScope.showCircleProgress("#"+buybackElementID,ticket.buybackDelay),MyAccountService.buybackTicket(ticket.acceptBuybackChanges,ticket.code,ticket.buybackValue,$rootScope.Ticket.CurrencyID).then(function(res){updateAfterReedem(res.data,!0)},function(err){}).finally(function(){ticket.buybackInProgress=!1,$timeout(function(){$rootScope.$broadcast("refresh_ticket_history"),$scope.$emit("load_approved_tickets",{force:!0})},200,!0)})},$scope.loadTicketOdds=function(ticket,eventID,isFav){ticket.odds?$scope.reInitBuybackTooltips():MyAccountService.getHistoryTicketOdds(ticket.code).then(function(res){res=res.data.Response;ticket.odds=[],res.Odds&&0<res.Odds.length&&res.Odds.forEach(function(odd){var nameArr=odd.EventName.split(" vs. "),eventTime=moment(odd.EventDate),pushedOdd={ID:odd.EventID,nameHome:nameArr[0],nameAway:nameArr[1]||!1,chanceTypeName:odd.IsBetbuilder?odd.ChanceTypeName.replace(/ \&\&\ /g,"<br>"):odd.ChanceTypeName,oddName:odd.TipName,rate:ticket.isBuyBack?odd.OddRateSold:odd.OddRate,date:eventTime.format("D.M."),time:eventTime.format("H:mm"),isLive:odd.LiveBet,stringScore:odd.EventScore,isWinning:"Y"===odd.OddWinningTicket,isClosed:"closed"===odd.OddStatus,isCanceled:"canceled"===odd.OddStatus,gamePart:null,isBetbuilder:odd.IsBetbuilder,url:""};switch(("closed"!==odd.OddStatus||-1<eventTime.diff(moment(),"months",!0))&&odd.Sport
1Name&&odd.RegionName&&odd.LeagueCupName&&(pushedOdd.url=$rootScope.LanguageID+"/"+("closed"===odd.OddStatus?$rootScope.ENV.routes[$rootScope.LanguageID].results:$rootScope.ENV.routes[$rootScope.LanguageID].offer)+"/"+$rootScope.slugify(odd.SportName)+"/"+$rootScope.slugify(odd.RegionName)+"/"+$rootScope.slugify(odd.LeagueCupName)+"?event="+odd.EventID+"&name="+$rootScope.slugify(odd.EventName)+("closed"===odd.OddStatus?"&date="+eventTime.format("YYYYMMDD"):"")),$rootScope.OddsViewMode){case 1:break;case 2:switch(pushedOdd.oddName){case"1X":pushedOdd.oddName=$rootScope.Lang.App.tip_1+" "+$rootScope.Lang.App.tip_or+" "+$rootScope.Lang.App.tip_x;break;case"X2":pushedOdd.oddName=$rootScope.Lang.App.tip_x+" "+$rootScope.Lang.App.tip_or+" "+$rootScope.Lang.App.tip_2;break;case"12":pushedOdd.oddName=$rootScope.Lang.App.tip_1+" "+$rootScope.Lang.App.tip_or+" "+$rootScope.Lang.App.tip_2}case 4:"1"!=pushedOdd.oddName&&"X"!=pushedOdd.oddName&&"2"!=pushedOdd.oddName||(pushedOdd.oddName=$rootScope.Lang.App["tip_"+pushedOdd.oddName.toLowerCase()]);break;case 3:switch(pushedOdd.oddName){case"1X":pushedOdd.oddName=pushedOdd.nameHome+" "+$rootScope.Lang.App.tip_or+" "+$rootScope.Lang.App.tip_x;break;case"X2":pushedOdd.oddName=$rootScope.Lang.App.tip_x+" "+$rootScope.Lang.App.tip_or+" "+pushedOdd.nameAway;break;case"12":pushedOdd.oddName=pushedOdd.nameHome+" "+$rootScope.Lang.App.tip_or+" "+pushedOdd.nameAway}case 5:switch(pushedOdd.oddName){case"1":pushedOdd.oddName=pushedOdd.nameHome;break;case"X":pushedOdd.oddName=$rootScope.Lang.App.tip_x;break;case"2":pushedOdd.oddName=pushedOdd.nameAway}}odd.EventScore&&(pushedOdd.parsedScore=$rootScope.parseScores(odd.EventScore)),"notstarted"!==odd.ActualGamePartID&&"ended"!==odd.ActualGamePartID||(odd.ActualGamePartID=null),odd.ActualGamePartID&&(pushedOdd.gamePart=$rootScope.GameParts[odd.ActualGamePartID].Name),odd.ActualGamePartTime&&-1!=odd.ActualGamePartTime&&(pushedOdd.gamePartTime=odd.ActualGamePartTime+" '"),ticket.odds.push(pushedOdd)})},function(err){}).finally(function(){$timeout(function(){$scope.initBuybackTooltip(eventID,ticket.code,isFav).tooltipster("open")},0,!1)})},$scope.autoBuybackFocus=function(ticket){ticket.autoBuybackValueFormatted="",$scope.editingAutoBuyback=!0},$scope.autoBuybackBlur=function(ticket){$scope.editingAutoBuyback=!1,isNaN(parseFloat(ticket.autoBuybackValueFormatted.replace(",",".")))&&(ticket.autoBuybackValueFormatted=ticket.autoBuybackMin+""),ticket.autoBuybackValueFormatted=$filter("currency")(parseFloat(ticket.autoBuybackValueFormatted.replace(",","."))),ticket.autoBuybackValue>ticket.autoBuybackMax?(ticket.autoBuybackValue=ticket.autoBuybackMax,$scope.autoBuybackRangeChange(ticket)):ticket.autoBuybackValue<ticket.autoBuybackMin&&(ticket.autoBuybackValue=ticket.autoBuybackMin,$scope.autoBuybackRangeChange(ticket))},$scope.autoBuybackChange=function(ticket,eventID){var result=parseFloat(ticket.autoBuybackValueFormatted.replace(",","."));isNaN(result)&&(result=0),ticket.autoBuybackValue=result,$("#buyback_range_"+($rootScope.showDual?"l":"p")+"_"+eventID+"_"+ticket.code).data("ionRangeSlider").update({from:ticket.autoBuybackValue})},$scope.setAutoBuybackTo=function(ticket,value){ticket.autoBuybackInProgress=!0,MyAccountService.setAutoBuyback(ticket.code,value).then(function(res){$rootScope.$broadcast("buyback_values_arrived",{res:res,ticketCode:ticket.code})},function(err){}).finally(function(){ticket.autoBuybackInProgress=!1})},$scope.setAutoBuyback=function(ticket,eventID){ticket.autoBuybackValue>=ticket.autoBuybackMin&&ticket.autoBuybackValue<=ticket.autoBuybackMax&&$scope.setAutoBuybackTo(ticket,ticket.autoBuybackValue,eventID)},$scope.removeAutoBuyback=function(ticket,eventID){$scope.setAutoBuybackTo(ticket,0,eventID)},$scope.closeBuybackTooltip=function(eventID,ticketCode){$("#buybackbutton_"+($rootScope.showDual?"l":"p")+"_"+eventID+"_"+ticketCode).tooltipster("close")},$scope.closeAutoBuybackTooltip=function(eventID,ticketCode){$("#event_autobuyback_"+($rootScope.showDual?"l":"p")+"_"+eventID+"_"+ticketCode).tooltipster("close")},$scope.reInitBuybackTooltips=function(){$timeout(function(){$(".event_autobuyback_"+($rootScope.showDual?"l":"p")+"_tooltipsterable").each(function(){var splitId=$(this).attr("id").split("_");$(this).hasClass("tooltipstered")||$scope.initAutoBuybackTooltip(splitId[3],splitId[4],!1,"fav"===splitId[5])}),$(".event_buyback_"+($rootScope.showDual?"l":"p")+"_tooltipsterable:not(.tooltipstered)").each(function(){var splitId=$(this).attr("id").split("_");$scope.initBuybackTooltip(splitId[2],splitId[3],"fav"===splitId[4])})},0,!1)},$scope.initBuybackTooltip=function(eventID,ticketCode,isFav){return $("#buybackbutton_"+($rootScope.showDual?"l":"p")+"_"+eventID+"_"+ticketCode+"_"+(isFav?"fav"
1:"nonfav")).tooltipster({trigger:"click",side:"left",interactive:!0,triggerClose:"click",theme:["tooltipster-paddingless"]})},$scope.initAutoBuybackTooltip=function(eventID,ticketCode,forceOpen,isFav){eventID?$("#event_autobuyback_"+($rootScope.showDual?"l":"p")+"_"+eventID+"_"+ticketCode+"_"+(isFav?"fav":"nonfav")).hasClass("tooltipstered")||($("#event_autobuyback_"+($rootScope.showDual?"l":"p")+"_"+eventID+"_"+ticketCode+"_"+(isFav?"fav":"nonfav")).tooltipster({trigger:"click",side:"left",interactive:!0,triggerClose:"click",theme:["tooltipster-paddingless"]}),forceOpen&&$("#event_autobuyback_"+($rootScope.showDual?"l":"p")+"_"+eventID+"_"+ticketCode+"_"+(isFav?"fav":"nonfav")).tooltipster("open")):$(".event_autobuyback_"+($rootScope.showDual?"l":"p")+"_tooltipsterable").each(function(){var splitId=$(this).attr("id").split("_");$(this).hasClass("tooltipstered")||$scope.initAutoBuybackTooltip(splitId[3],splitId[4],!1,"fav"===splitId[5])})},$scope.$on("signalr_BuyBackChanged",function(ev,data){$rootScope.buybackTickets&&$rootScope.buybackTickets[data.ticketCode]&&($rootScope.buybackTickets[data.ticketCode].showBuyback=0<data.buybackValue,$rootScope.buybackTickets[data.ticketCode].showAutoBuyback=-1<data.buybackValue,0<data.buybackValue)&&($rootScope.buybackTickets[data.ticketCode].autoBuybackMin=data.buybackValue,$rootScope.buybackTickets[data.ticketCode].buybackValue=data.buybackValue,$scope.lastOpenedAutoBuyback)&&$scope.lastOpenedAutoBuyback.ticketCode==data.ticketCode&&($scope.initRangeSlider($scope.lastOpenedAutoBuyback.eventID,$rootScope.buybackTickets[data.ticketCode],$rootScope.showDual,$scope.lastOpenedAutoBuyback.isFav),!$scope.editingAutoBuyback)&&$rootScope.buybackTickets[data.ticketCode].autoBuybackMin>$rootScope.buybackTickets[data.ticketCode].autoBuybackValue&&($rootScope.buybackTickets[data.ticketCode].autoBuybackValue=$rootScope.buybackTickets[data.ticketCode].autoBuybackMin,$scope.autoBuybackRangeChange($rootScope.buybackTickets[data.ticketCode]))}),$scope.$on("buyback_values_arrived",function(ev,data){$rootScope.buybackTickets[data.ticketCode]&&($scope.processBuybackInfo(data.res,$rootScope.buybackTickets[data.ticketCode]),$timeout(function(){$scope.initAutoBuybackTooltip()}))}),$scope.initRangeSlider=function(eventID,ticket,isLive,isFav){!$scope.editingAutoBuyback&&ticket.autoBuybackMin>ticket.autoBuybackValue&&(ticket.autoBuybackValue=ticket.autoBuybackMin,$scope.autoBuybackRangeChange(ticket));isLive=$("#buyback_range_"+(isLive?"l":"p")+"_"+eventID+"_"+ticket.code+"_"+(isFav?"fav":"nonfav")).data("ionRangeSlider");isLive?isLive.update({min:ticket.autoBuybackMin,max:ticket.autoBuybackMax,from:ticket.autoBuybackValue<ticket.autoBuybackMin?ticket.autoBuybackMin:ticket.autoBuybackValue,from_fixed:ticket.autoBuybackSet}):$("#buyback_range_"+($rootScope.showDual?"l":"p")+"_"+eventID+"_"+ticket.code+"_"+(isFav?"fav":"nonfav")).ionRangeSlider({grid:!1,min:ticket.autoBuybackMin,max:ticket.autoBuybackMax,from:ticket.autoBuybackValue<ticket.autoBuybackMin?ticket.autoBuybackMin:ticket.autoBuybackValue,from_fixed:ticket.autoBuybackSet,grid_snap:!1,step:.01,onStart:function(context){$scope.autoBuybackRangeChange(ticket,context)},onChange:function(context){$scope.autoBuybackRangeChange(ticket,context)}})},$scope.autoBuybackRangeChange=function(ticket,slider){slider&&(ticket.autoBuybackValue=slider.from),ticket.autoBuybackValueFormatted=$filter("currency")(ticket.autoBuybackValue)},$scope.autoBuybackOnOpen=function(eventID,ticketCode,isLive,isFav){$timeout(function(){$scope.initRangeSlider(eventID,$rootScope.buybackTickets[ticketCode],isLive,isFav),$scope.initAutoBuybackTooltip(eventID,ticketCode,!0,isFav)}),$scope.lastOpenedAutoBuyback={eventID:eventID,ticketCode:ticketCode,isLive:isLive,isFav:isFav}},$scope.$on("single_view_init",$scope.reInitBuybackTooltips),$scope.$on("dual_view_init",$scope.reInitBuybackTooltips),$scope.$on("show_favorites",function(){$scope.foundFavs=!1,$scope.currentParams.favoritesOnly=!0,$scope.currentParams.top?$scope.loadCompleteOffer():$scope.figureOutFavorites()}),$scope.figureOutFavorites=function(){$scope.foundFavs=!1,$scope.sports.forEac
1h(function(sp){sp.showWholeInFav=$filter("isFavoritedSport")(sp),sp.showInFav=sp.showWholeInFav,$scope.foundFavs=$scope.foundFavs||sp.showWholeInFav,sp.showWholeInFav||$rootScope.favoritedLeagues&&0<$rootScope.favoritedLeagues.length?sp.regions.forEach(function(re){re.showInFav=!1,re.eventCountFav=0,re.leagues.forEach(function(le){le.showInFav=sp.showWholeInFav||$filter("isFavoritedLeague")(le),le.showInFav&&(re.showInFav=!0,sp.showInFav=!0,$scope.foundFavs=!0,re.eventCountFav++)})}):sp.showInFav=sp.showInFav||!1}),$scope.foundFavs?$timeout(function(){$("#sportbook-main-container").scrollTop(0),$scope.favOnly=!0,$scope.loadNextPage()}):$scope.currentParams.sport?$location.url($rootScope.LanguageID+"/"+$rootScope.ENV.routes[$rootScope.LanguageID].offer+"?favorites=1"):$rootScope.$broadcast("hide_favorites")},$scope.$on("hide_favorites",function(){$("#sportbook-main-container").scrollTop(0),$timeout(function(){$scope.favOnly=!1,$location.search("favorites",null),$scope.currentParams.favoritesOnly=!1,$scope.loadNextPage()})}),$scope.getSortedParamGroups=function(paramGroups,ev){return _.sortBy(paramGroups,function(pg){return $filter("isFavoritedParamGroup")(pg,ev)?0:1})},$scope.getOfferSports=function(){return $rootScope.favoritedEvents&&0<$rootScope.favoritedEvents.length&&$scope.favoriteSport&&0<$scope.favoriteSport.regions.length?$scope.favoriteSportArr.concat($scope.sports):$scope.sports},$scope.$on("adding_fav_event",function(ev,eventID){$scope.events[eventID]&&$scope.addEventToFavoriteSport($scope.events[eventID])}),$scope.$on("removing_fav_event",function(ev,eventID){$scope.removeEventFromFavoriteSport(eventID)}),$scope.removeEventFromFavoriteSport=function(eventID){var foundEvent=null;if($scope.favoriteSport.regions&&0<$scope.favoriteSport.regions.length)for(var regi=0;regi<$scope.favoriteSport.regions.length&&!foundEvent;regi++)for(var reg=$scope.favoriteSport.regions[regi],leagi=0;leagi<reg.leagues.length&&!foundEvent;leagi++)for(var leag=reg.leagues[leagi],dati=0;dati<leag.dates.length&&!foundEvent;dati++){for(var dat=leag.dates[dati],evi=0;evi<dat.events.length&&!foundEvent;evi++){var ev=dat.events[evi];ev.ID===eventID&&(foundEvent=ev)}foundEvent&&(dat.events=_.filter(dat.events,function(el){return el.ID!==eventID}),dat.events.length<1)&&(leag.dates=_.filter(leag.dates,function(el){return el.dateStr!==dat.dateStr}),leag.dates.length<1)&&(reg.leagues=_.filter(reg.leagues,function(el){return el.ID!==leag.ID}),reg.leagues.length<1)&&($scope.favoriteSport.regions=_.filter($scope.favoriteSport.regions,function(el){return el.ID!==reg.ID}))}},$scope.addEventToFavoriteSport=function(event){var foundRegion=null;if($scope.favoriteSport.regions&&0<$scope.favoriteSport.regions.length)for(var i=0;i<$scope.favoriteSport.regions.length&&!foundRegion;i++)$scope.favoriteSport.regions[i].ID===event.regionID&&(foundRegion=$scope.favoriteSport.regions[i]);foundRegion||((foundRegion=angular.copy(event.date.league.region)).leagues=[],$scope.favoriteSport.regions.push(foundRegion));var foundLeague=null;if(foundRegion.leagues&&0<foundRegion.leagues.length)for(i=0;i<foundRegion.leagues.length&&!foundLeague;i++)foundRegion.leagues[i].ID===event.leagueID&&(foundLeague=foundRegion.leagues[i]);foundLeague||((foundLeague=angular.copy(event.date.league)).dates=[],foundRegion.leagues.push(foundLeague));var foundDate=null;if(foundLeague.dates&&0<foundLeague.dates.length)for(i=0;i<foundLeague.dates.length&&!foundDate;i++)foundLeague.dates[i].dateStr===event.dateStr&&(foundDate=foundLeague.dates[i]);foundDate||((foundDate=angular.copy(event.date)).events=[],foundLeague.dates.push(foundDate));for(var foundEvent=null,i=0;i<foundDate.events.length&&!foundEvent;i++)foundDate.events[i].ID===event.ID&&(foundEvent=foundDate.events[i]);foundEvent||foundDate.events.push(event)}}]),angular.module("offer").directive("testDirective",function(){return{restrict:"A",link:function(scope,el,attrs){el.html(scope.$eval(attrs.testDirective))}}}),(()=>{function PointsParser(points,sportID){return 58==sportID&&50==points?"A":points||"0"}angular.module("offer").filter("event",function($sce,$rootScope){return function(Event,isResult){try{var points,content=("Y"==Event.LiveBetting||"ended"==Event.ActualGamePartID||isResult)&&Event.Score?("string"==typeof Event.Score&&(Event.Score=$rootScope.parseScore(Event.Score)),isResult?points=Event.Score.Home.points+":"+Event.Score.Away.points:-1<$rootScope.timeBoxScore_Exception.indexOf(Event.SportID)?(points=(_.last(Event.Score.Home.partials)||0)+":"+(_.last(Event.Score.Away.partials)||0),"points"in Event.Score.Home&&"points"in Event.Score.Away&&!isResult&&(points=(points+=" (")+PointsParser(Event.Score.Home.game,Event.SportID)+" - "+PointsParser(Event.Score.Away.game,Event.SportID)+") ")):points=Event.Score.Home.points&&Event.Score.Away.points?Event.Score.Home.points+" : "+Event.Score.Away.points:"",points='<span class="match__score">'+points+"</span>",Event.EventName.replace("vs.",points)):Event.EventName.replace("vs.",'<span class="divider">vs.</span>')}catch(e){}return $sce.trustAsHtml(content)}}).filter("hasRapidBets",function(){return function(groups){if(groups&&0<groups.length)for(var i=0;i<groups.length;i++)if("rapidbets"===groups[i].ID)return!0;return!1}}).filter("isFavoritedEvent",function($rootScope){return function(event){return event.isLive&&-1<$rootScope.favoritedEvents.indexOf(event.ID)}}).filter("isFavoritedLeague",function($rootScope){return function(league){return-1<$rootScope.favoritedLeagues.indexOf(league.ID)}}).filter("isFavoritedSport",function($rootScope){return function(sport){return-1<$rootScope.favoritedSports.indexOf(sport.ID)}}).filter("isFavoritedParamGroup",function($rootScope){return function(paramGroup,event){for(var i=0;i<$rootScope.favoritedChancetypes.length;i++){var cht=$rootScope.favoritedChancetypes[i];if(cht.LiveBetting===event.isLive&&cht.SportId===event.sportID&&cht.ChanceTypeId===paramGroup.chanceTypeID)return!0}return!1}}).filter("showSport",function(){return function(sport,favOnly){return favOnly?sport.showInFav&&(sport.showFav||sport.show||sport.showWhole):sport.show||sport.showWhole}}).filter("showRegion",function(){return function(region,sport,favOnly){return favOnly?region.showInFav&&(sport.showWhole||region.show||region.showFav):sport.showWhole||region.show}}).filter("showLeague",function(){return function(league,region,sport,favOnly){return!favOnly||league.showInFav}}).filter("hasBuybackTicket",function($rootScope){return function(tickets){if(tickets&&0<tickets.length)for(var i=0;i<tickets.length;i++)if(!1!==$rootScope.buybackTickets[tickets[i]].showBuyback||!1!==$rootScope.buybackTickets[tickets[i]].showAutoBuyback)return!0;return!1}})})(),angular.module("offer").service("OfferService",["$http","$rootScope","$q","$sce",function($http,$rootScope,$q,$sce){let BASEURL_LOYALTY=$rootScope.ENV.loyalty.url;var canceler=$q.defer(),resolved=!1;
1return{getOffer:function(currentParams){return resolved&&canceler.resolve("http call aborted"),canceler=$q.defer(),resolved=!0,0===currentParams.sport?$http.post($sce.trustAsResourceUrl($rootScope.baseURL+"/offer/GetOfferGoldenLeagueList"),{leaugeCup:currentParams.region||-1,date:-1,streamOnly:currentParams.streamOnly?1:-1}):$http.post($sce.trustAsResourceUrl($rootScope.baseURL+"/offer/GetOfferList"),{sportEvent:currentParams.sportEvent||-1,sport:currentParams.sport||-1,region:currentParams.region||-1,leaugeCup:currentParams.league||-1,live:currentParams.live?1:-1,date:currentParams.date||-1,top:currentParams.top?1:-1,streamOnly:currentParams.streamOnly?1:-1})},getEventDetail:function(EventDetailID){return $http.post($sce.trustAsResourceUrl($rootScope.baseURL+"/offer/GetOfferEventDetail"),{eventId:EventDetailID})},getLoyalty:function(){var requestURL=BASEURL_LOYALTY+"Competition-Expert/Player/-1/Zone/-1";return $http.jsonp($sce.trustAsResourceUrl(requestURL),{params:{nocache:(new Date).getTime()}})},GetTopTipsForLeague:function(leagueID){return"localhost"==$rootScope.ENV.name?$http.get("data/toptipsleague.json"):$http.post($sce.trustAsResourceUrl($rootScope.baseURL+"/offer/GetTopTipsForLeagueCup"),{leagueCupId:leagueID})},getTopBetting:function(options){return"ALL"===options.date&&(options.date="-1"),$http.post($sce.trustAsResourceUrl($rootScope.baseURL+"/offer/GetTopBetting"),{top:options.count,date:options.date})},getRegionLeagueCupMenu:function(options){return $http.post($sce.trustAsResourceUrl($rootScope.baseURL+"/offer/RegionLeagueCupMenu"),{sportEvent:options.sportEvent||"-1",sport:options.sportID,live:options.live?"1":"-1",date:options.date})},getBetbuilderAvailableOdds:function(eventId){return $http.get($sce.trustAsResourceUrl($rootScope.baseURL+"/offer/BetbuilderAvailableOdds"),{params:{eventId:eventId}})},recalculateBetbuilderOdds:function(availableOdds){return $http.post($sce.trustAsResourceUrl($rootScope.baseURL+"/offer/BetbuilderCalculationFilterOdds"),{OddsIDs:availableOdds})},getBetbuilderMultiOddID:function(availableOdds){return $http.post($sce.trustAsResourceUrl($rootScope.baseURL+"/offer/BetbuilderMultiOdd"),{OddsIDs:availableOdds})},getOddsByEventIDs:function(eventIDs){return $http.post($rootScope.baseURL+"/offer/GetOfferListByEvents",{eventsId:eventIDs.join(",")})},getScreenInfo:function(sport,region,league){return $http.get($rootScope.baseURL+"/offer/GetScreenLink",{params:{sport:sport,region:region,league:league}}
1)},getSportRegionLeagueInfo:function(sportID,regionID,leagueID){return $http.get($rootScope.baseURL+"/offer/GetSportRegionLeagueCupDefinition",{params:{sportID:sportID,regionID:regionID,leagueID:leagueID}})}}}]),angular.module("offerWrapper",[]),angular.module("offerWrapper").controller("OfferWrapperController",["$scope","$rootScope","$timeout","$routeParams","$location","$window","routeName","routeLive",function($scope,$rootScope,$timeout,$routeParams,$location,$window,routeName,routeLive){$scope.routeName=routeName,$scope.$on("$routeChangeSuccess",function(event,currentRoute,previousRoute){$location.search().name&&!$location.search().event&&$location.search("name",null),$timeout(function(){$rootScope.showApp()},0,!1),$rootScope.keepAlive(),$rootScope.$broadcast("regular_ticket"),$scope.baseRoute=$rootScope.LanguageID+"/"+$scope.routeName,$scope.showingAll=$rootScope.correctingRedirect=!1,$scope.currentResBracket=null,$scope.currentResType=null;var params={live:routeLive},dateSearch=($routeParams.sport&&(params.sport=$routeParams.sport),$routeParams.region&&(params.region=$routeParams.region),$routeParams.league&&(params.league=$routeParams.league),$routeParams.event&&($rootScope.eventIDToOpen=parseInt($routeParams.event)),$routeParams.group&&($rootScope.groupIDToOpen=$routeParams.group),$location.search().date),streamSearch=$location.search().streamOnly,favoritesOnly=$location.search().favorites;params.date=dateSearch||!1,params.streamOnly="1"===streamSearch,params.live=routeLive,params.favoritesOnly="1"===favoritesOnly,$scope.currentParams={live:params.live},$rootScope.$broadcast("load_sidebar",{type:"offer",params:params,routeName:$scope.routeName}),$rootScope.removeInvalidSearch(["date","event","name","streamOnly","favorites"]),$(window).off("resize",$rootScope.resizeLayoutDebounced),$timeout(function(){$rootScope.removeScrollMain()},0,!1)}),$scope.$on("request_ticket_identity_change",function(){$rootScope.$broadcast("regular_ticket")}),$scope.$on("$destroy",function(){$rootScope.deactivateMenu(),$(window).on("resize",$rootScope.resizeLayoutDebounced),$("#sportbook-main-container").off("scroll",$scope.onScrollSingle)}),$scope.$on("load",function(){$rootScope.deactivateMenu()}),$scope.startNextPageLoad=function(){$scope.$broadcast("load_next_page")},$scope.loadNextPageThrottled=_.throttle($scope.startNextPageLoad,1e3),$scope.onScrollSingle=function(){var scrollElement=document.getElementById("sportbook-main-container");scrollElement.scrollTop+scrollElement.offsetHeight+1e3>scrollElement.scrollHeight&&$scope.loadNextPageThrottled(),!$rootScope.isIE&&$(".offer__detail--content")[0]&&($(".live_offer__detail--content").hasClass("scrolled")&&0<$(".offer__detail--content").offset().top-$("#sportbook-main-container").position().top?($(".live_offer__detail--content").removeClass("scrolled"),$("#sportbook-main-container").removeClass("scrolled")):!$(".live_offer__detail--content").hasClass("scrolled")&&$(".offer__detail--content").offset().top-$("#sportbook-main-container").position().top<-1&&($(".live_offer__detail--content").addClass("scrolled"),$("#sportbook-main-container").addClass("scrolled")))},$scope.onScrollSingleThrottled=_.throttle($scope.onScrollSingle,200),$scope.onScrollDualDetail=function(){!$rootScope.isIE&&$(".offer__detail--content")[0]&&($(".live-match__container").hasClass("scrolled")&&-20<$(".offer__detail--content").position().top-$("#sportbook-main-container").position().top?($(".live-match__container").removeClass("scrolled"),$("#new_live_detail").removeClass("scrolled")):!$(".live-match__container").hasClass("scrolled")&&$(".offer__detail--content").position().top-$("#sportbook-main-container").position().top<-21&&($(".live-match__container").addClass("scrolled"),$("#new_live_detail").addClass("scrolled")))},$scope.onScrollDualDetailThrottled=_.throttle($scope.onScrollDualDetail,200),$scope.onScrollDualOffer=function(){var scrollElement=document.getElementById("new_live_offer");scrollElement.scrollTop+scrollElement.offsetHeight+document.getElementById("description_view_dual").offsetHeight+document.getElementById("footer_dual").offsetHeight>scrollElement.scrollHeight&&$scope.loadNextPageThrottled()},$scope.onScrollDualOfferThrottled=_.throttle($scope.onScrollDualOffer,200),$scope.initScrollSingle=function(){$rootScope.showDual=!1,$rootScope.hideFooter=!1,$("#sportbook-main-container").off("scroll",$scope.onScrollSingleThrottled),$("#sportbook-main-container").on("scroll",$scope.onScrollSingleThrottled),$rootScope.$broadcast("single_view_init")},$scope.initScrollDual=function(){$rootScope.showDual=!0,$timeout(function(){$("#new_live_detail").off("scroll",$scope.onScrollDualDetailThrottled),$("#new_live_detail").on("scroll",$scope.onScrollDualDetailThrottled),$("#new_live_offer").off("scroll",$scope.onScrollDualOfferThrottled),$("#new_live_offer").on("scroll",$scope.onScrollDualOfferThrottled)},0,!($rootScope.hideFooter=!0)),$rootScope.$broadcast("dual_view_init")},$scope.resBrackets={live:[{limit:1365,dual:!1,f:function(){$("body.offer").addClass("left-aside"),$("body.offer").removeClass("left-aside-big"),$(".main__left").removeClass("is--sticked")}},{limit:1516,dual:!1,f:function(){$("body.offer").removeClass("left-aside"),$("body.offer").addClass("left-aside-big"),$(".main__left").addClass("is--sticked")}},{limit:1900,dual:!0,f:function(){$("body.offer").addClass("left-aside"),$("body.offer").removeClass("left-aside-big"),$(".main__left").removeClass("is--sticked")}},{limit:!1,dual:!0,f:function(){$("body.offer").removeClass("left-aside"),$("body.offer").addClass("left-aside-big"),$(".main__left").addClass("is--sticked")}}],prematch:[{limit:1365,dual:!1,f:function(){$(".main__left").addClass("is--sticked"),$(".main__left").removeClass("is--active"),$("body.offer").addClass("left-aside"),$("body.offer").removeClass("left-aside-big")}},{limit:1900,dual:!1,f:function(){$(".main__left").addClass("is--sticked"),$(".main__left").removeClass("is--active"),$("body.offer").removeClass("left-aside"),$("body.offer").addClass("left-aside-big")}},{limit:!1,dual:!1,f:function(){$(".main__left").addClass("is--sticked"),$(".main__left").addClass("is--active"),$("body.offer").removeClass("left-aside"),$("body.offer").addClass("left-aside-big")}}]}
1,$scope.$on("adjust_offer_res",function(event,isLive){$scope.adjustResolution(isLive)}),$scope.adjustResolution=function(isLive){for(var type=isLive?"live":"prematch",winWidth=$window.innerWidth,index=0;$scope.resBrackets[type][index]&&!1!==$scope.resBrackets[type][index].limit&&winWidth>=$scope.resBrackets[type][index].limit;)index++;$scope.currentResBracket!==index&&($scope.resBrackets[type][index].f(),null!==$scope.currentResBracket&&null!==$scope.currentResType&&$scope.currentResType===type&&$scope.resBrackets[type][index].dual===$scope.resBrackets[type][$scope.currentResBracket].dual||($scope.resBrackets[type][index].dual?$timeout($scope.initScrollDual,0):$timeout($scope.initScrollSingle,0)),$(".ticket__top").click()),$scope.currentResBracket=index,$scope.currentResType=type,$timeout(function(){loadGreedy()},100,!1)},$scope.adjustResolutionDebounced=_.debounce($scope.adjustResolution,400)}]),angular.module("results",[]),angular.module("results").controller("ResultsController",["$scope","$rootScope","$q","ResultsService","$timeout","$filter","$routeParams","$location","$sce","routeName",function($scope,$rootScope,$q,ResultsService,$timeout,$filter,$routeParams,$location,$sce,routeName){$scope.$on("$routeChangeSuccess",function(event,currentRoute,previousRoute){$scope.Results=[],$rootScope.keepAlive(),$scope.getResultsTimeout=null,$scope.GroupFilter={},$scope.Detail={Opened:!1,EventID:null,BetradarTeams:{},Event:{},EventChanceTypes:{},FilteredChanceTypes:{},Labels:{},Odds:[],ChanceTypeGroups:[]},$scope.showingAll=!1,$scope.baseRoute=$rootScope.LanguageID+"/"+routeName;var params={live:!1},dateSearch=($routeParams.sport&&(params.sport=$routeParams.sport),$routeParams.region&&(params.region=$routeParams.region),$routeParams.league&&(params.league=$routeParams.league),$routeParams.event&&($scope.eventIDToOpen=parseInt($routeParams.event)),$routeParams.name&&($scope.eventNameToOpen=$routeParams.name),$location.search().date);params.date=dateSearch||!1,params.streamOnly=!1,params.date||(dateSearch=new Date,params.date=dateSearch.getHours()<10?"YT":"TD",$location.url($rootScope.LanguageID+"/"+$rootScope.ENV.routes[$rootScope.LanguageID].results+"?date="+params.date)),$scope.currentParams={},$rootScope.$broadcast("load_sidebar",{type:"results",params:params,routeName:routeName}),$rootScope.removeInvalidSearch(["date","event","name"]),$rootScope.activateMenu("Betting_Results")}),$scope.dateSelectEvent=function(){var filterDate=$("input#resultsFilterDate").val();filterDate&&$scope.setDate(filterDate)},$scope.$on("$destroy",function(){$rootScope.deactivateMenu(),$scope.getResultsTimeout&&$timeout.cancel($scope.getResultsTimeout),$scope.resultsCalendar.destroy()}),$rootScope.$on("ticket_loaded",function(){$rootScope.$broadcast("regular_ticket")}),$scope.$on("request_ticket_identity_change",function(){$rootScope.$broadcast("regular_ticket")}),$scope.setDate=function(date){$rootScope.$broadcast("set_date",date)},$scope.$on("load_offer",function(event,params){params.top=!1,$scope.currentParams=params,$scope.getResults()}),$scope.$on("open_event",function(event,eventID){if($scope.results&&$scope.results.Sports&&($scope.Detail.EventID!==eventID||!$scope.Detail.Opened))for(1==$scope.Detail.Opened&&$scope.closeDetail(),sportI=0;sportI<$scope.results.Sports.length;sportI++)for(regionI=0;regionI<$scope.results.Sports[sportI].Regions.length;regionI++)for(leagueI=0;leagueI<$scope.results.Sports[sportI].Regions[regionI].Leagues.length;leagueI++)for(eventI=0;eventI<$scope.results.Sports[sportI].Regions[regionI].Leagues[leagueI].Events.length;eventI++)if($scope.results.Sports[sportI].Regions[regionI].Leagues[leagueI].Events[eventI].EventID===eventID)return void $scope.openResultDetail($scope.results.Sports[sportI].Regions[regionI].Leagues[leagueI].Events[eventI],!0)}),$scope.reinitPage=function(){$scope.pageSize=30,$scope.lastLoadedSport=0,$scope.lastLoadedRegion=0,$scope.sportSize=$scope.results.Sports.length-1,$scope.lastRegionSize=$scope.results.Sports[$scope.lastLoadedSport].Regions.length-1},$scope.loadNextPage=function(eventIDToopen){var wasFound=!eventIDToopen;$timeout(function(){if($scope.lastLoadedSport<$scope.sportSize||$scope.lastLoadedRegion<$scope.lastRegionSize){if($scope.results.Sports[$scope.lastLoadedSport]){var addedCount;for(0==$scope.lastLoadedSport&&0==$scope.lastLoadedRegion?(addedCount=$scope.results.Sports[0].Regions[0].Leagues[0].Events.length,$scope.pageSize<=addedCount&&(addedCount=$scope.pageSize-1),wasFound||$scope.results.Sports[0].Regions[0].Leagues.forEac
1h(function(iLeague){iLeague.Events.forEach(function(iEvent){iEvent.EventID!==eventIDToopen&&iEvent.LiveEventID!==eventIDToopen||($scope.openResultDetail(iEvent),wasFound=!0)})})):addedCount=0;!$scope.results.Sports[$scope.lastLoadedSport].opened&&$scope.lastLoadedSport<$scope.sportSize;)$scope.lastLoadedSport++,$scope.lastRegionSize=$scope.results.Sports[$scope.lastLoadedSport].Regions.length-1,$scope.lastLoadedRegion=$scope.lastRegionSize;for($scope.lastRegionSize=$scope.results.Sports[$scope.lastLoadedSport].Regions.length-1;!(addedCount>=$scope.pageSize&&wasFound||$scope.lastLoadedSport==$scope.sportSize&&$scope.lastLoadedRegion==$scope.lastRegionSize);)$scope.lastLoadedRegion==$scope.lastRegionSize?($scope.lastLoadedSport++,$scope.lastLoadedRegion=0,$scope.lastRegionSize=$scope.results.Sports[$scope.lastLoadedSport].Regions.length-1):$scope.lastLoadedRegion++,addedCount+=$scope.results.Sports[$scope.lastLoadedSport].Regions[$scope.lastLoadedRegion].EventCount,!wasFound&&eventIDToopen&&$scope.results.Sports[$scope.lastLoadedSport].Regions[$scope.lastLoadedRegion].Leagues.forEac
1h(function(iLeague){iLeague.Events.forEach(function(iEvent){iEvent.EventID===eventIDToopen&&($scope.openResultDetail(iEvent),wasFound=!0)})});addedCount<$scope.pageSize&&($scope.showingAll=!0,$("#sportbook-main-container").off("scroll",$scope.onScrollSingle))}}else $scope.showingAll=!0,wasFound||$scope.results.Sports[0].Regions[0].Leagues.forEach(function(iLeague){iLeague.Events.forEach(function(iEvent){iEvent.EventID===eventIDToopen&&($scope.openResultDetail(iEvent),wasFound=!0)})}),$("#sportbook-main-container").off("scroll",$scope.onScrollSingle)})},$scope.onScrollSingle=function(){var scrollElement=document.getElementById("sportbook-main-container");scrollElement.scrollTop+scrollElement.offsetHeight+1e3>scrollElement.scrollHeight&&$scope.loadNextPageThrottled()},$scope.loadNextPageThrottled=_.throttle($scope.loadNextPage,1e3),$scope.clearResults=function(){(new Date).getHours()<10?$scope.currentParams.date="YT":$scope.currentParams.date="TD",$scope.currentParams.top=!0,$scope.currentParams.sportEventID=!1,$scope.currentParams.sportID=!1,$scope.currentParams.regionID=!1,$scope.currentParams.leagueCupID=!1,$scope.currentParams.matchID=!1,$scope.Results=[]},$scope.loadNextSport=function(){$scope.lastLoadedSport<$scope.sportSize?($scope.lastLoadedSport++,$scope.lastLoadedLeague=0,$scope.loadNextPage()):($scope.lastLoadedLeague=lastLeagueSize,$timeout(function(){$scope.showingAll=!0},100))},$scope.getResults=function(){$scope.getResultsTimeout&&$timeout.cancel($scope.getResultsTimeout),$scope.getResultsTimeout=$timeout(function(){$scope.loadResults()})},$scope.loadResults=function(){ResultsService.getResults($scope.currentParams).then(function(res){$rootScope.showApp();var response=res.data,todayMoment=moment().startOf("day"),lastSport=(response.Results.map(function(event){event.Score=$rootScope.parseScore(event.Score,event.SportID),event.eventDateTime=$filter("eventDateTime")(event),event.eventDateTimeTimeOnly=$filter("eventDateTime")(event,"timeOnly"),event.nameFiltered=$filter("event")(event,!0),event.Competitors=event.EventName.split(" vs. "),event.nameSlug=$rootScope.slugify(event.EventName),event.showStats=todayMoment.diff(moment(event.EventDate),"days")<6,event.betradarID=event.BetradarStatisticsUrl;var tooltipArr=[];return event.EventComment&&tooltipArr.push(event.EventComment),event.EventResultComment&&tooltipArr.push(event.EventResultComment),event.AggregateScore&&tooltipArr.push($rootScope.Lang.App.aggregate_score_tooltip+" <strong>"+event.AggregateScore+"</strong>"),event.SeriesResult&&tooltipArr.push($rootScope.Lang.App.series_result_tooltip+" <strong>"+event.SeriesResult+"</strong>"),0<tooltipArr.length&&(event.tooltipHTML=$sce.trustAsHtml(tooltipArr.join("<br>"))),event}),null),lastRegion=null,lastLeague=null,sportIndex=-1,regionIndex=-1,leagueIndex=-1,tempResults=[];response.Results.forEach(function(event){var SportID=event.SportID;SportID!=lastSport&&(tempResults.push({ID:SportID,Name:response.Labels["SP_"+SportID].Name,opened:!0,EventCount:0,Regions:[]}),lastSport=SportID,sportIndex++,leagueIndex=regionIndex=-1),event.TeamIDs={Home:response.BetradarTeams[event.EventID+"_10"]||0,Away:response.BetradarTeams[event.EventID+"_20"]||0},event.RegionID!=lastRegion&&(tempResults[sportIndex].Regions.push({ID:event.RegionID,Name:response.Labels["RE_"+event.RegionID].Name,opened:!0,EventCount:0,Leagues:[]}),lastRegion=event.RegionID,leagueIndex=-1,regionIndex++),event.LeagueCupID!=lastLeague&&(tempResults[sportIndex].Regions[regionIndex].Leagues.push({ID:event.LeagueCupID,Name:response.Labels["LC_"+event.LeagueCupID].Name,opened:!0,EventCount:0,Events:[]}),lastLeague=event.LeagueCupID,leagueIndex++),tempResults[sportIndex].Regions[regionIndex].Leagues[leagueIndex].Events.push(event),tempResults[sportIndex].Regions[regionIndex].Leagues[leagueIndex].EventCount++,tempResults[sportIndex].Regions[regionIndex].EventCount++,tempResults[sportIndex].EventCount++}),$scope.results=response,$scope.results.Sports=tempResults,$scope.reinitPage(),$scope.loadNextPage($location.search().event?parseFloat($location.search().event):null),$("#sportbook-main-container").on("scroll",$scope.onScrollSingle),$scope.currentParam
1s.league?$rootScope.setPageTitle("default-results-league",$scope.results.Sports[0].Name,$scope.results.Sports[0].Regions[0].Name,$scope.results.Sports[0].Regions[0].Leagues[0].Name):$scope.currentParams.region?$rootScope.setPageTitle("default-results-region",$scope.results.Sports[0].Name,$scope.results.Sports[0].Regions[0].Name):$scope.currentParams.sport?$rootScope.setPageTitle("default-results-sport",$scope.results.Sports[0].Name):$rootScope.setPageTitle("default-results"),$timeout(function(){var parsedDate;$scope.resultsCalendar=$("input#resultsFilterDate").datepicker($rootScope.calendarResultsOptions).data("datepicker"),$scope.currentParams.date&&((parsedDate=$rootScope.dateFromString($scope.currentParams.date))?($scope.resultsCalendar.selectDateNoUpdate(parsedDate),$rootScope.resultsCalendarSidebar.selectDateNoUpdate(parsedDate)):($scope.resultsCalendar.clear(),$scope.resultsCalendarSidebar.clear())),$rootScope.loadTooltips()},0)}).finally(function(){})},$scope.openResultDetail=function(Event,onlyOpen){$rootScope.keepAlive(),onlyOpen||1!=$scope.Detail.Opened||$scope.Detail.EventID!=Event.EventID?Event.ShowDetail?Event.ShowDetail=!1:($scope.closeDetails(),ResultsService.getResultDetail(Event.EventID).then(function(res){res=res.data;(res=$scope.refactorDetailData(res)).Event.Score=$rootScope.parseScore(res.Event.Score,res.Event.SportID),$scope.Detail.EventID=Event.EventID,$scope.Detail.TeamIDs=Event.TeamIDs,res.Event.Competitors=Event.Competitors,$scope.Detail.Opened=!0,$scope.Detail.BetradarTeams=res.BetradarTeams,$scope.Detail.Event=res.Event,$scope.Detail.EventChanceTypes=res.EventChanceTypes,$scope.Detail.FilteredChanceTypes=res.EventChanceTypes,$scope.Detail.Labels=res.Labels,$scope.Detail.Odds=res.Odds,$scope.Detail.ChanceTypeGroups=res.ChanceTypeGroups,$location.search("event",Event.EventID),$location.search("name",$rootScope.slugify(Event.EventName)),$timeout(function(){var scrollToElement=$("#sportbook-main-container").scrollTop()+$("#event-results-"+Event.EventID).offset().top-200;scrollToElement<0&&(scrollToElement=0),$("#sportbook-main-container").scrollTop(scrollToElement)},0,!0)},function(err){$rootScope.loadTooltips(),console.error(err),$scope.closeDetail()}).finally(function(){$rootScope.loadTooltips(),$timeout(function(){loadGreedy()},1e3)})):$scope.closeDetail()},$scope.closeDetails=function(){$rootScope.keepAlive();var openedDetails=_.where($scope.results,{ShowDetail:!0});openedDetails&&openedDetails.map(function(detail){return detail.ShowDetail=!1})},$scope.refactorDetailData=function(detailData){return detailData.Odds.forEach(function(Odd){var Event=detailData.EventChanceTypes[Odd.EventChanceTypeID];Event.Odds||(Event.Odds=[]),Event.Odds.push(Odd)}),angular.forEach(detailData.EventChanceTypes,function(ect){var oddLen;ect.Show=!0,ect.Odds&&(oddLen=ect.Odds.length,ect.Breakoff=oddLen-(0<(oddLen=oddLen%("DUO"==ect.BetType?2:3))?oddLen:"DUO"==ect.BetType?2:3)-1)}),detailData},$scope.closeDetail=function(){$scope.Detail.opened=!1,$scope.Detail.EventID=null},$scope.setGroupFilter=function(Group){if($scope.GroupFilter==Group)return $scope.Detail.FilteredChanceTypes=$scope.Detail.EventChanceTypes,$scope.GroupFilter={},null;$scope.GroupFilter=Group,$scope.Detail.FilteredChanceTypes=[],angular.forEach($scope.Detail.EventChanceTypes,function(ChanceType){-1!=$scope.GroupFilter.ChanceTypes.indexOf(ChanceType.ChanceTypeID)&&$scope.Detail.FilteredChanceTypes.push(ChanceType)})},$scope.getChanceTypesColumns=function(league){var allAvailableChanceTypes=["_1","_X","_2","_1X","_X2","_12"],leagueChanceTypes={};return _.forEach(league.Events,function(event){_.forEach(allAvailableChanceTypes,function(chanceType){$scope.results.Odds[event.EventID+chanceType]&&delete allAvailableChanceTypes[leagueChanceTypes[chanceType]=chanceType]})}),_.map(Object.values(leagueChanceTypes),function(chanceType){return chanceType.replace("_","")})}}]),angular.module("results").service("ResultsService",["$http","$rootScope","$q","$sce",function($http,$rootScope,$q,$sce){var canceler=$q.defer(),resolved=!1;
1return{getResults:function(currentParams){return resolved&&canceler.resolve("http call aborted"),canceler=$q.defer(),resolved=!0,$http.post($sce.trustAsResourceUrl($rootScope.baseURL+"/offer/GetResultsList"),{SportEvent:currentParams.sportEvent||-1,Sport:currentParams.sport||-1,Region:currentParams.region||-1,LeagueCup:currentParams.league||-1,Date:0==currentParams.date?-1:currentParams.date,Top:-1})},getResultDetail:function(EventDetailID){return $http.post($sce.trustAsResourceUrl($rootScope.baseURL+"/offer/GetResultsEventDetail"),{eventId:EventDetailID})}}}]),angular.module("search",[]),angular.module("search").controller("SearchController",["$scope","$rootScope","SearchService","$timeout",function($scope,$rootScope,SearchService,$timeout){var self=this;$scope.SportbookResults=[],$scope.ContentResults=[],this.Labels={},this.SportMapping={},this.search=function(value){!value||value.length<3?$scope.resetResults():SearchService.search(value).then(function(res){var sportbookResults=res[0].data;$scope.ContentResults=res[1].data.Content,$scope.CasinoResults=_.sortBy([].concat(_.map(res[1].data.RioGames,function(cat){return cat.casinoCategory="RIO",cat}),_.map(res[1].data.CasinoGames,function(cat){return cat.casinoCategory="CASINO",cat})),["CategoryID"]),angular.forEach(sportbookResults.Items,function(result){result.RegionID_OrderKey="RE_"+result.RegionID,self.SportMapping["RE_"+result.RegionID]=result.SportID,result.URL=$rootScope.LanguageID+"/"+$rootScope.ENV.routes[$rootScope.LanguageID].offer+"/",result.URL+=-1!==result.SportEventID?$rootScope.slugify(sportbookResults.Labels["SE_"+result.SportEventID].Name)+"/"+$rootScope.slugify(sportbookResults.Labels["SP_"+result.SportID].Name):$rootScope.slugify(sportbookResults.Labels["SP_"+result.SportID].Name)+"/"+$rootScope.slugify(sportbookResults.Labels["RE_"+result.RegionID].Name),"L"!==result.Typ&&"E"!==result.Typ||(result.URL+="/"+$rootScope.slugify(sportbookResults.Labels["LC_"+result.LeagueCupID].Name),"E"===result.Typ&&(result.URL+="?event="+result.EventID))}),$scope.SportbookResults=sportbookResults.Items,self.Labels=sportbookResults.Labels})},$scope.resetResults=function(){$scope.SportbookResults=[],$scope.ContentResults=[],$scope.CasinoResults=[]},this.openResult=function(eventID,SportID,RegionID,LeagueID){$scope.hideModal(),$rootScope.$broadcast("load_events",{eventID:-1!=parseInt(eventID)&&parseInt(eventID),sportID:SportID,regionID:RegionID,leagueCupID:LeagueID,matchID:!1,date:!1})},this.openSearchedEvent=function(event){$rootScope.$broadcast("open_event",event.EventID)},$scope.hideModal=function(){var modal=UIkit.modal("#modal-search");modal&&modal.isActive()&&modal.hide()},UIkit.modal("#modal-search").on("hide.uk.modal",function(){$timeout(function(){$scope.searchValue=null,$scope.resetResults()},0)})}]),angular.module("search").filter("searchResult",function($sce){return function(Event,value){var vsRes,result;return Event&&value?(result=Event.Name,value=_.first(result.match(new RegExp("("+value+")","gi"))),vsRes=new RegExp("( vs. )","gi"),result=(result=result.replace(value,'<span class="search__higlight">'+value+"</span>")).replace(vsRes,'<span class="divider">vs.</span>'),Event.ParentSportName&&(result+=" - "+Event.ParentSportName),$sce.trustAsHtml(result)):null}}).filter("searchDateTime",function($sce){return function(Event){var eventDate,content;return Event?(eventDate=moment(Event.EventDate),content=null,content="Y"==Event.LiveBetting&&"notstarted"!==Event.ActualGamePartID?"LIVE":eventDate.isSame(moment(),"day")?eventDate.format("HH:mm"):eventDate.format("DD.MM. HH:mm"),$sce.trustAsHtml(content)):null}}).filter("highlight",function($sce){return function(text,phrase,className){return className=className||"highlighted",phrase&&(text=text.replace(new RegExp("("+phrase+")","gi"),'<span class="'+className+'">$1</span>')),$sce.trustAsHtml(text)}}),angular.module("search").service("SearchService",["$http","$rootScope","$sce","$q",function($http,$rootScope,$sce,$q){return{search:function(value){return $q.all([$http.post($sce.trustAsResourceUrl($rootScope.baseURL+"/offer/GetOfferFullSearch"),{searchString:value}),$http.get("/base/SearchContent",{params:{searchString:value}})])}}}]),angular.module("myAccount",[]).service("myAccountConstants",["$rootScope",function($rootScope){var SPORTSBETTING_BONUSES_URL=$rootScope.L
1anguageID+"/"+$rootScope.ENV.routes[$rootScope.LanguageID].dynamic,$rootScope=$rootScope.LanguageID+"/"+$rootScope.ENV.routes[$rootScope.LanguageID].casino+"/"+$rootScope.ENV.routes[$rootScope.LanguageID].dynamic;return{ticketHistory:{tab:"TICKET_HISTORY",pageSize:5,ticketStatus:{winning:{icon:"icon-thumbs-up-b",color:"color-green",tooltip:"state_winning"},lost:{icon:"icon-thumbs-down-b",color:"color-red",tooltip:"state_loosing"},approved:{icon:"icon-accepted",color:"is--blue",tooltip:"state_approved"},refused:{icon:"icon-alert",color:"color-warning",tooltip:"state_refused"},canceled:{icon:"icon-cancelled-s",color:"color-descr",tooltip:"state_canceled"},submitted:{icon:"icon-submited",color:"color-gray",tooltip:"state_submited"},buyback:{icon:"icon-hand-money",color:"color-green",tooltip:"state_selled"},compensation:{icon:"icon-compensation",color:"color-green",tooltip:"state_compensation"},norisk:{icon:"icon-norisk",color:"is--aquablue",tooltip:"state_norisk"},waiting_approval:{icon:"icon-submited",color:"color-descr",tooltip:"state_waiting_to_approval"}}},casinoWins:{tab:"CASINO_WINS",pageSize:5},availableBonuses:{tab:"AVAILABLE_BONUSES",params:{1:{icon:"icon-euro",translation:"bonuses_freebet",onclick:function(){openBonusesSectionClick("bonuses-menu-freebet"),$("#rad-bonuses-1").click()}},2:{icon:"icon-freespin",translation:"bonuses_freespin",onclick:function(){openBonusesSectionClick("casino-bonuses-active-freespins"),$("#rad-bonuses-2").click()}},3:{icon:"icon-norisk",translation:"bonuses_norisk",baseHref:SPORTSBETTING_BONUSES_URL,defaultParam:""},4:{icon:"icon-deposit",translation:"bonuses_deposit",baseHref:SPORTSBETTING_BONUSES_URL,defaultParam:""},5:{icon:"icon-gift-hand",translation:"bonuses_welcome",baseHref:$rootScope,defaultParam:""},6:{icon:"icon-reload",translation:"bonuses_reload",baseHref:$rootScope,defaultParam:""},7:{icon:"icon-cards",translation:"bonuses_game",baseHref:$rootScope,defaultParam:""},8:{icon:"icon-golden-league",translation:"bonuses_goldenleague",baseHref:SPORTSBETTING_BONUSES_URL,defaultParam:""},9:{icon:"icon-compensation-s",translation:"bonuses_compensation",baseHref:SPORTSBETTING_BONUSES_URL,defaultParam:""},10:{icon:"icon-scout",translation:"bonuses_scout",baseHref:SPORTSBETTING_BONUSES_URL,defaultParam:""},11:{icon:"icon-tiket",translation:"bonuses_bettingcompetition",baseHref:SPORTSBETTING_BONUSES_URL,defaultParam:""},12:{icon:"icon-casino-circle",translation:"bonuses_casinocometition",baseHref:$rootScope,defaultParam:""},13:{icon:"icon-vip",translation:"bonuses_casionovip",baseHref:$rootScope,defaultParam:""},14:{icon:"icon-vip-special",translation:"bonuses_casionovipspecial",baseHref:$rootScope,defaultParam:""},15:{icon:"icon-tiket",baseHref:SPORTSBETTING_BONUSES_URL,defaultParam:""}}},savedTickets:{tab:"SAVED_TICKETS"}}}]),angular.module("myAccount").controller("MyAccountController",["$scope","$rootScope","$timeout","myAccountConstants",function($scope,$rootScope,$timeout,constants){$scope.myAccountConstants=constants,$scope.currentViewsMap={},($scope.$parent.childrens.MyAccountController=$scope).isInitialized=!1,$scope.openMyAccount=function(){$scope.isInitialized||($scope.isInitialized=!0,$rootScope.IsClientLoggedIn?$scope.showTicketHistory():$scope.showSavedTickets()),$rootScope.$broadcast("refresh_ticket_history")},$scope.showTicketHistory=function(){$scope.selectTab(constants.ticketHistory.tab)},$scope.showCasinoWins=function(){$scope.selectTab(constants.casinoWins.tab)},$scope.showBonuses=function(){$scope.selectTab(constants.availableBonuses.tab)},$scope.showSavedTickets=function(){$scope.selectTab(constants.savedTickets.tab)},$scope.onVisibleOddsChanged=function(eventIDs){$scope.changeClientView(eventIDs)},$scope.changeClientView=function(eventIDs){var newViews=Object.assign($scope.currentViewsMap,eventIDs),newViews=_.map(_.filter(newViews,"visible"),function(event){return{eventID:event.ID}}),currentViewsArray=_.map(_.filter($scope.currentViewsMap,"visible"),function(event){return{eventID:event.ID}});$scope.$emit("signalr_changeView",{newViews:newViews,oldViews:currentViewsArray}),$scope.currentViewsMap=Object.assign($scope.currentViewsMap,eventIDs)},$scope.selectTab=function(tab){$scope.__lscDir.selectedTab!==tab&&$scope.__lscDir.selectTab(tab)}}]),angular.module("myAccount").controller("MyAccountTicketHistoryController",["$scope","$rootScope","$timeout","MyAccountService","myAccountConstants",function($scope,$rootScope,$timeout,MyAccountService,constants){$scope.initState=function(){$scope.state={isInitialized:!1,loading:!1,tickets:{},noMoreData:!1,error:null,newlyLoadedCount:0}},$scope.initState(),console.log($rootScope),$scope.onEnter=function(){console.log($rootScope.winCurrencySymbol),$rootScope.IsClientLoggedIn&&($scope.state.isInitialized?$scope.refreshState():($scope.state.isInitialized=!0,$scope.loadMoreHistoryTickets()))},$scope.onLeave=function(){},$scope.fullRefresh=function(){$scope.initState(),$scope.loadMoreHistoryTickets()},$scope.$on("refresh_ticket_history",function(event,forceRefresh){forceRefresh?$scope.fullRefresh():$scope.refreshState()}),$scope.refreshState=function(onlyActive){var newTicketsPromise,lastActiveTicketIndex;
1onlyActive?(onlyActive=_.findIndex(Object.values($scope.state.tickets),function(ticket){return!["refused","canceled","closed"].includes(ticket.Status)}),lastActiveTicketIndex=_.findLastIndex(Object.values($scope.state.tickets),function(ticket){return!["refused","canceled","closed"].includes(ticket.Status)}),-1!==onlyActive&&0<lastActiveTicketIndex+1-onlyActive&&(newTicketsPromise=MyAccountService.getHistory(onlyActive,lastActiveTicketIndex+1-onlyActive,"all"))):newTicketsPromise=MyAccountService.getHistory(0,1,"all"),newTicketsPromise.then(function(res){$scope.state.tickets=Object.assign($scope.state.tickets,_.chain(res.data.Response.Tickets).indexBy("TicketCode").value())})},$scope.isLoading=function(){return $scope.state.loading},$scope.loadMoreHistoryTickets=function(){$scope.state.noMoreTickets||($scope.state.loading=!0,$scope.state.newlyLoadedCount=0,MyAccountService.getHistory(Math.floor(Object.keys($scope.state.tickets).length/5)+1,constants.ticketHistory.pageSize,"all").then(function(res){$scope.state.newlyLoadedCount=res.data.Response.Tickets.length,$timeout(function(){$scope.state.tickets=Object.assign($scope.state.tickets,_.chain(res.data.Response.Tickets).indexBy("TicketCode").value()),$scope.state.loading=!1,$scope.state.noMoreData=res.data.Response.NoMoreData},210)}).catch(function(error){$scope.state.loading=!1,$scope.state.error=error}))},$scope.openMainHistory=function(){openBettingHistoryClick(),$("#rad-history-1").click()}}]),angular.module("myAccount").controller("MyAccountStoredTicketsController",["$scope","$rootScope","$timeout","$rootScope","TicketService","MyAccountService",function($scope,$rootScope,$timeout,$rootScope,TicketService,MyAccountService){$scope.TicketWrapperController=$scope.$parent.$parent,$scope.state={isInitialized:!1,loading:!1,error:null,tickets:[],loaders:0},$scope.onEnter=function(options){$scope.state.isInitialized||$scope.loadStoredTickets()},$scope.onLeave=function(){},$scope.loadStoredTickets=function(){$scope.state.isInitialized=!0;var savedTicketIDs=[];if("localhost"===$rootScope.ENV.name)savedTicketIDs=["F21312"];else try{savedTicketIDs=(savedTicketIDs=JSON.parse(localStorage.getItem("doxxbetsavedticketstest")))||[]}catch(error){savedTicketIDs=[]}$scope.state.loading=!0,$scope.state.loaders=savedTicketIDs.length-$scope.state.tickets.length,$scope.state.error=null,MyAccountService.getHistory(null,null,"saved",savedTicketIDs).then(function(res){$timeout(function(){$scope.state.loading=!1,$scope.state.tickets=res.data.Response.Tickets},200)}).catch(function(error){$scope.state.error=error,$scope.state.loading=!1,$scope.state.isInitialized=!1})},$scope.openSavedTicketInput=function(){openFormForEnterStoredTicketCode()},$scope.onRestoreTicket=function(event){$scope.restoreTicket(event)},$scope.$on("restore_ticket",function(event,code){$scope.restoreTicket(code)}),$scope.$on("refresh_stored_tickets",function(){$scope.loadStoredTickets()}),$scope.restoreTicket=function(code){TicketService.restoreTicket(code).then(function(res){res=res.data;$scope.TicketWrapperController.childrens.TicketController.syncTicket(res),$scope.TicketWrapperController.openTicket()},function(err){console.error(err)}).finally(function(){})}}]),angular.module("myAccount").controller("MyAccountCasinoWinsController",["$scope","$rootScope","$timeout","MyAccountService","myAccountConstants",function($scope,$rootScope,$timeout,MyAccountService,constants){$scope.state={isInitialized:!1,loading:!1,wins:[],newlyLoadedCount:0,noMoreData:!1},$scope.onEnter=function(){!$scope.state.isInitialized&&$rootScope.IsClientLoggedIn&&($scope.state.isInitialized=!0,$scope.state.loading=!0,$scope.loadMoreWins())},$scope.loadMoreWins=function(){$scope.state.loading=!0,$scope.state.newlyLoadedCount=0,MyAccountService.getCasinoWins($scope.state.wins.length/constants.casinoWins.pageSize+1,constants.casinoWins.pageSize).then(function(res){$scope.state.newlyLoadedCount=res.data.length,$scope.state.noMoreData=$scope.state.newlyLoadedCount<constants.casinoWins.pageSize,$timeout(function(){var data=_.map(res.data,function(win){return win.Created=new Date(parseInt(win.Created.substr(6))),win});$scope.state.wins=[].concat($scope.state.wins,data),$scope.state.loading=!1},200)}).catch(function(){$scope.state.noMoreData=!0,$scope.state.loading=!1})},$scope.openCasinoHistory=function(){openBettingHistoryClick(),$("#rad-history-2").click()}}]),angular.module("myAccount").directive("myAccountTicketListItem",["$rootScope","$timeout","$q","$filter","myAccountConstants","MyAccountService",function($rootScope,$timeout,$q,$filter,constants,MyAccountService){return{templateUrl:"my-account-ticket-list-item.html",restrict:"E",scope:{ticket:"=",visibleOddsChanged:"&",restoreTicket:"&"},link:function($scope,element,atts){$scope.constants=constants,$scope.odds=null,$scope.acceptBuybackChanges=!0,$scope.Lang=$rootScope.L
1ang,$scope.winCurrencySymbol=$rootScope.winCurrencySymbol;$rootScope.$watch("winCurrencySymbol",function(val){$scope.winCurrencySymbol=val});$scope.unwatchTicket,$scope.autoBuybackValue=0,$scope.autoBuybackMin=0,$scope.autoBuybackMax=0,$scope.autoBuybackSet=!1,$scope.autoBuybackSlider=null,$scope.$watch("ticket",function(oldValue,newValue){$scope.calculateValues()},!0),$scope.showTicket=function(code,isSaved){(isSaved?ShowStoredTicket:ShowTicket)(code)},$scope.getStatus=function(ticket){if(ticket.IsCompensationTicket)return"compensation";if("closed"===ticket.Status){if("winning"===ticket.WinningStatus)return ticket.IsBuyBackTicket?"buyback":"winning";if("nonwinning"===ticket.WinningStatus)return ticket.IsNoRiskTicket?"norisk":"lost"}return ticket.Status},$scope.calculateValues=function(){"stored"===$scope.ticket.Status?($scope.ticket.__win=$scope.ticket.AmountMoneyWin,$scope.ticket.__isStored=!0):($scope.ticket.__win="closed"===$scope.ticket.Status&&"winning"===$scope.ticket.WinningStatus?$scope.ticket.AmountMoneyWonWithBonus:$scope.ticket.AmountMoneyWinWithBonus,$scope.ticket.__isStored=!1),$scope.ticket.FiscalOverallPotWin&&($scope.ticket.__win=$scope.ticket.FiscalOverallPotWin),$scope.ticket.__status=$scope.getStatus($scope.ticket)},$scope.isOpened=!1,$scope.toggleHistoryTicket=function(){$scope.isOpened?($scope.isOpened=!1,$scope.emitVisibleOdds()):($scope.isOpened=!0,$scope.odds?$scope.emitVisibleOdds():$scope.openHistoryTicket().then($scope.emitVisibleOdds,$scope.emitVisibleOdds))},$scope.emitVisibleOdds=function(){var odds={};$scope.isOpened?_.forEach($scope.odds,function(odd){"ended"!==odd.gamePart&&odd.isLive?odds[odd.ID]={ID:odd.ID,visible:!0}:odds[odd.ID]={ID:odd.ID,visible:!1}}):_.forEach($scope.odds,function(odd){odds[odd.ID]={ID:odd.ID,visible:!1}}),$scope.visibleOddsChanged({$event:odds})},$scope.openHistoryTicket=function(){return $q(function(resolve,reject){MyAccountService.getHistoryTicketOdds($scope.ticket.TicketCode,$scope.ticket.__isStored).then(function(res){res=res.data.Response;$scope.odds=[],res.Odds&&0<res.Odds.length&&(res.Odds.forEach(function(odd){var nameArr=odd.EventName.split(" vs. "),eventTime=moment(odd.EventDate),pushedOdd={ID:odd.EventId,nameHome:nameArr[0],nameAway:nameArr[1]||!1,chanceTypeName:odd.IsBetbuilder?odd.ChanceTypeName.replace(/ \&\&\ /g,"<br>"):odd.ChanceTypeName,oddName:odd.TipName,rate:ticket.isBuyBack?odd.OddRateSold:odd.OddRate,date:eventTime.format("D.M."),time:eventTime.format("H:mm"),isLive:odd.LiveBet,stringScore:odd.EventScore,isWinning:"Y"===odd.OddWinningTicket&&"buyback"!==odd.CommentCode,isClosed:"closed"===odd.OddStatus,isCanceled:"canceled"===odd.OddStatus,isBuyback:"buyback"===odd.CommentCode,gamePart:null,isBetbuilder:odd.IsBetbuilder,url:""};switch(("closed"!==odd.OddStatus||-1<eventTime.diff(moment(),"months",!0))&&odd.SportName&&odd.RegionName&&odd.LeagueCupName&&(pushedOdd.url=$rootScope.LanguageID+"/"+("closed"===odd.OddStatus?$rootScope.ENV.routes[$rootScope.LanguageID].results:$rootScope.ENV.routes[$rootScope.LanguageID].offer)+"/"+$rootScope.slugify(odd.SportName)+"/"+$rootScope.slugify(odd.RegionName)+"/"+$rootScope.slugify(odd.LeagueCupName)+"?event="+odd.EventId+"&name="+$rootScope.slugify(odd.EventName)+("closed"===odd.OddStatus?"&date="+eventTime.format("YYYYMMDD"):"")),$rootScope.OddsViewMode){case 1:break;case 2:switch(pushedOdd.oddName){case"1X":pushedOdd.oddName=$rootScope.Lang.App.tip_1+" "+$rootScope.Lang.App.tip_or+" "+$rootScope.Lang.App.tip_x;break;case"X2":pushedOdd.oddName=$rootScope.Lang.App.tip_x+" "+$rootScope.Lang.App.tip_or+" "+$rootScope.Lang.App.tip_2;break;case"12":pushedOdd.oddName=$rootScope.Lang.App.tip_1+" "+$rootScope.Lang.App.tip_or+" "+$rootScope.Lang.App.tip_2}case 4:"1"!=pushedOdd.oddName&&"X"!=pushedOdd.oddName&&"2"!=pushedOdd.oddName||(pushedOdd.oddName=$rootScope.Lang.App["tip_"+pushedOdd.oddName.toLowerCase()]);break;case 3:switch(pushedOdd.oddName){case"1X":pushedOdd.oddName=pushedOdd.nameHome+" "+$rootScope.Lang.App.tip_or+" "+$rootScope.Lang.App.tip_x;break;case"X2":pushedOdd.oddName=$rootScope.Lang.App.tip_x+" "+$rootScope.L
1ang.App.tip_or+" "+pushedOdd.nameAway;break;case"12":pushedOdd.oddName=pushedOdd.nameHome+" "+$rootScope.Lang.App.tip_or+" "+pushedOdd.nameAway}case 5:switch(pushedOdd.oddName){case"1":pushedOdd.oddName=pushedOdd.nameHome;break;case"X":pushedOdd.oddName=$rootScope.Lang.App.tip_x;break;case"2":pushedOdd.oddName=pushedOdd.nameAway}}odd.EventScore&&(pushedOdd.parsedScore=$rootScope.parseScores(odd.EventScore)),"notstarted"!==odd.ActualGamePartID&&"ended"!==odd.ActualGamePartID||(odd.ActualGamePartID=null),odd.ActualGamePartID&&(pushedOdd.gamePart=$rootScope.GameParts[odd.ActualGamePartID].Name),odd.ActualGamePartTime&&-1!=odd.ActualGamePartTime&&(pushedOdd.gamePartTime=odd.ActualGamePartTime+" '"),$scope.odds.push(pushedOdd)}),$scope.openedHistoryTicket=ticket),resolve()},function(err){console.error(err),reject()}).finally(function(){"approved"===$scope.ticket.Status&&($rootScope.startBuybackSignalr(),$scope.$emit("request_buyback_load",{ticketCode:$scope.ticket.TicketCode}))})})},$scope.updateBuybackRangeValue=function(){$scope.autoBuybackSlider||($("#buyback_range_"+$scope.ticket.TicketCode).ionRangeSlider({grid:!1,grid_snap:!1,step:.01,onStart:function(context){$scope.autoBuybackRangeChange(context)},onChange:function(context){$scope.autoBuybackRangeChange(context)}}),$scope.autoBuybackSlider=$("#buyback_range_"+$scope.ticket.TicketCode).data("ionRangeSlider")),!$scope.editingAutoBuyback&&$scope.autoBuybackMin>$scope.autoBuybackValue&&($scope.autoBuybackValue=$scope.autoBuybackMin,$scope.autoBuybackRangeChange()),$scope.autoBuybackSlider.update({min:$scope.autoBuybackMin,max:$scope.autoBuybackMax,from:$scope.autoBuybackValue,from_fixed:$scope.autoBuybackSet})},$scope.autobuybackButtonOnClick=function(){$timeout(function(){$scope.updateBuybackRangeValue(),$("#autobuyback_info_"+$scope.ticket.TicketCode).hasClass("tooltipstered")&&$("#autobuyback_info_"+$scope.ticket.TicketCode).tooltipster("destroy"),$("#autobuyback_info_"+$scope.ticket.TicketCode).tooltipster({interactive:!0,delay:50,theme:"labeled",restoration:"previous"})},100)},$scope.copyStoredTicketToClipboard=function(code){$rootScope.copyToClipboard($rootScope.baseURL+"?stored_ticket_show="+code),options={interactive:!0,delay:0,theme:"labeled",content:$rootScope.Lang.Ticket.copy_link_tooltip,trigger:"custom"},element.find("#ticket-copy-clipboard").hasClass("tooltipstered")||(element.find("#ticket-copy-clipboard").tooltipster(options),element.find("#ticket-copy-clipboard").tooltipster("show"),$timeout(function(){element.find("#ticket-copy-clipboard").tooltipster("destroy")},2e3,!1))},$scope.sendSavedViaEmail=function(code){openFormSendStoredTicketViaEmail(code)},$scope.emitRestoreTicket=function(){$scope.restoreTicket({$event:$scope.ticket.TicketCode})},$scope.$on("signalr_EventChanged",function(event,data){var foundEvent=_.find($scope.odds,{ID:data.eventID});foundEvent&&(data.actualGamePartID&&("ended"===data.actualGamePartID?(foundEvent.gamePart=null,foundEvent.gamePartTime=null):foundEvent.gamePart=$rootScope.GameParts[data.actualGamePartID].Name,data.score)&&(foundEvent.parsedScore=$rootScope.parseScores(data.score)),data.actualGamePartTime)&&-1!=data.actualGamePartTime&&(foundEvent.gamePartTime=data.actualGamePartTime+" '")}),$scope.openEventDetail=function(odd){0<odd.url.length&&($rootScope.eventIDToOpen=odd.ID,$rootScope.openURL(odd.url,!0))},$scope.processBuybackInfo=function(res){res=res.data;res.BuyBackValue&&-1!==res.BuyBackValue?($scope.buybackValue=res.BuyBackValue,$scope.autoBuybackMin=res.BuyBackValue):($scope.buybackValue=null,$scope.autoBuybackMin=$scope.ticket.AmountMoneyOverall),$scope.buybackDelay=res.BuyBackDelayMs||0,$scope.autoBuybackMax=$scope.ticket.AmountMoneyWinWithBonus,0===res.AutoBuyBackValue?($scope.autoBuybackValue=$scope.buybackValue||0,$scope.autoBuybackSet=!1):res.AutoBuyBackValue&&($scope.autoBuybackSet=!0,$scope.autoBuybackValue=res.AutoBuyBackValue),$scope.showBuyback=0<res.BuyBackValue,$scope.showAutoBuyback=-1<res.BuyBackValue,$scope.updateBuybackRangeValue(),$scope.autoBuybackRangeChange(),$scope.autoBuybackTooltip||$timeout(function(){$scope.autoBuybackTooltip=$("#autobuyback_"+$scope.ticket.TicketCode).tooltipster({trigger:"click",
1side:"left",interactive:!0,triggerClose:"click",theme:["tooltipster-paddingless"]})})},$scope.$on("buyback_values_arrived",function(ev,data){$scope.ticket.TicketCode==data.ticketCode&&$scope.processBuybackInfo(data.res)}),$scope.startBuyback=function(){$scope.buybackInProgress=!0,$scope.buybackDelay&&0<$scope.buybackDelay&&$rootScope.showCircleProgress("#tooltip_buyback_loader_history_"+$scope.ticket.TicketCode,$scope.buybackDelay),MyAccountService.buybackTicket($scope.acceptBuybackChanges,$scope.ticket.TicketCode,$scope.buybackValue,$scope.ticket.CurrencyID).then(function(res){updateAfterReedem(res.data,!0)},function(err){}).finally(function(){$scope.buybackInProgress=!1,$timeout(function(){$rootScope.$broadcast("refresh_ticket_history"),$scope.$emit("load_approved_tickets",{force:!0}),$scope.calculateValues()},200,!0)})},$scope.autoBuybackFocus=function(){$scope.autoBuybackValueFormatted="",$scope.editingAutoBuyback=!0},$scope.autoBuybackBlur=function(){$scope.editingAutoBuyback=!1,isNaN(parseFloat($scope.autoBuybackValueFormatted.replace(",",".")))&&($scope.autoBuybackValueFormatted=$scope.autoBuybackMin+""),$scope.autoBuybackValueFormatted=$filter("currency")(parseFloat($scope.autoBuybackValueFormatted.replace(",","."))),$scope.autoBuybackValue>$scope.autoBuybackMax?($scope.autoBuybackValue=$scope.autoBuybackMax,$scope.autoBuybackRangeChange()):$scope.autoBuybackValue<$scope.autoBuybackMin&&($scope.autoBuybackValue=$scope.autoBuybackMin,$scope.autoBuybackRangeChange())},$scope.autoBuybackChange=function(){var result=parseFloat($scope.autoBuybackValueFormatted.replace(",","."));isNaN(result)&&(result=0),$scope.autoBuybackValue=result,$scope.autoBuybackSlider.update({from:$scope.autoBuybackValue})},$scope.autoBuybackRangeChange=function(slider){$timeout(function(){slider&&($scope.autoBuybackValue=slider.from),$scope.autoBuybackValueFormatted=$filter("currency")($scope.autoBuybackValue)})},$scope.setAutoBuybackTo=function(value){$scope.autoBuybackInProgress=!0,MyAccountService.setAutoBuyback($scope.ticket.TicketCode,value).then(function(res){$rootScope.$broadcast("buyback_values_arrived",{res:res,ticketCode:$scope.ticket.TicketCode})},function(err){}).finally(function(){$scope.autoBuybackInProgress=!1,$timeout(function(){$rootScope.$broadcast("refresh_ticket_history"),$scope.$emit("load_approved_tickets",{force:!0}),$scope.calculateValues()},200,!0)})},$scope.setAutoBuyback=function(){$scope.autoBuybackValue>=$scope.autoBuybackMin&&$scope.autoBuybackValue<=$scope.autoBuybackMax&&$scope.setAutoBuybackTo($scope.autoBuybackValue)},$scope.removeAutoBuyback=function(){$scope.setAutoBuybackTo(0)},$scope.closeAutoBuybackTooltip=function(){$("#autobuyback_"+$scope.ticket.TicketCode).tooltipster("close")},$scope.$on("signalr_BuyBackChanged",function(ev,data){$scope.ticket.TicketCode===data.ticketCode&&($scope.showBuyback=0<data.buybackValue,$scope.showAutoBuyback=-1<data.buybackValue,0<data.buybackValue)&&($scope.buybackValue=data.buybackValue,$scope.autoBuybackMin=$scope.buybackValue,$scope.updateBuybackRangeValue())}),$timeout(function(){element.find(".tooltip").tooltipster({interactive:!1,delay:10,theme:"labeled"})},1e3)}}}]),angular.module("myAccount").directive("myAccountItemSkeleton",[function(){return{scope:{type:"="},templateUrl:"my-account-item-skeleton.html",restrict:"E"}}]),angular.module("myAccount").service("MyAccountService",["$http","$rootScope","$sce",function($http,$rootScope,$sce){return{getHistory:function(skip,pageSize,type,ticketCodes){if("localhost"===$rootScope.ENV.name)return"saved"===type?$http.get("data/tickethistorysaved.json"):"approved"===type?$http.get("data/approvedtickethistory.json"):$http.get("data/tickethistory1.json",{transformResponse:function(response){return JSON.parse(response)}});var url="";switch(type){case"approved":url="/ticket/GetApprovedTicketsJson";break;case"closed":url="/ticket/GetClosedTicketsJson";break;case"buyback":url="/ticket/GetBuyBackTicketsJson";break;case"saved":url="/betting/GetStoredTicketsJson";break;case"all":url="/ticket/GetAllTicketsJson"}return postObj="saved"===type?{ticketCodes:ticketCodes}:{skip:skip,pageSize:pageSize},$http.post($sce.trustAsResourceUrl($rootScope.baseURL+url),postObj)},getHistoryTicketOdds:function(code,isSaved){return"localhost"!==$rootScope.ENV.name?$http.post($sce.trustAsResourceUrl($rootScope.baseURL+(isSaved?"/betting/GetStoredTicketOddsJson":"/ticket/GetTicketOddsJson")),{ticketCode:code}):$http.get("data/ticketsingle.json")},getCasinoWins:function(pageNumber,pageSize){return"localhost"!==$rootScope.ENV.name?$http.get("casino/GetClientWinTransactions",{params:{pageNumber:pageNumber,pageSize:pageSize}}):$http.get("data/casinoWins.json")},getBuybackInfo:function(ticketCode){return"localhost"!==$rootScope.ENV.name?$http.post("ticket/GetBuyBackValueExt",{ticketCode:ticketCode}):$http.get("data/buybackvalue.json")},buybackTicket:function(acceptChanges,ticketCode,ticketPrice,currencyID){return"localhost"!==$rootScope.ENV.name?$http.post("/betting/ReedemTicketExt",{acceptSoldPrice:acceptChanges,ticketCode:ticketCode,ticketPrice:String(ticketPrice),currency:currencyID},{headers:{RequestVerificationToken:$rootScope.TicketToken}}):$http.get("data/buybackvalue.json")},setAutoBuyback:function(ticketCode,sellValue){return"localhost"!==$rootScope.ENV.name?$http.post("ticket/SetAutoBuyBack",{ticketCode:ticketCode,sellValue:sellValue},{}):$http.get("data/autobuybackset.json")}}}]),angular.module("sidebar",[]),angular.module("sidebar").controller("SidebarController",["$scope","$rootScope","$q","$interval","$t
1imeout","$location","$route","SidebarService","AppService","OfferService",function($scope,$rootScope,$q,$interval,$timeout,$location,$route,SidebarService,AppService,OfferService){var self=this;$scope.advancedSearch=!1,this.Favourites=[],this.Sports={},this.sidebarCnf={oneAtTime:!0},self.filterOpened=!1,self.filterActive=!1,self.oldTimeFilter=null,$rootScope.currentSports={},$rootScope.currentSportsArr=[],$rootScope.currentRegions={},$rootScope.currentRegionsArr=[],$rootScope.currentLeagues={},$rootScope.currentLeaguesArr=[],$scope.openedSportID=null,$scope.openedRegionID=null;$scope.openedLeagueID=null;function resolveMissingRouteSelection(offerParams){var routeParams={sport:$scope.currentParams.sport,region:$scope.currentParams.region,league:$scope.currentParams.league};return OfferService.getScreenInfo(routeParams.sport,routeParams.region,routeParams.league).then(function(response){var response=response.data&&response.data[0],parameters=response&&response.ParametersAlias;return _.each([{paramName:"sportID",slug:routeParams.sport,offerParam:"sport"},{paramName:"regionID",slug:routeParams.region,offerParam:"region"},{paramName:"leagueID",slug:routeParams.league,offerParam:"league"}],function(parameter){if(parameter.slug){var value=function findRouteParameter(parameters,paramName,slug){var value;return _.some(parameters||[],function(parameter){return parameter.ParamName!==paramName||slug&¶meter.Link!==slug?void 0!==(value=findRouteParameter(parameter.Regions,paramName,slug))||void 0!==(value=findRouteParameter(parameter.Leagues,paramName,slug)):(value=parameter.Value,!0)}),value}(parameters,parameter.paramName,parameter.slug);if(null==value)throw new Error("Could not resolve "+parameter.paramName+" from route");offerParams[parameter.offerParam]=Number(value)}}),offerParams.sportEvent=!1,offerParams.routeSelectionMissing=!0,offerParams})}function queueOrBroadcastOffer(offerParams){$rootScope.isAppLoaded()?$rootScope.$broadcast("load_offer",offerParams):$scope.paramsToLoad=offerParams}$scope.currentDate=new Date,$scope.minDate=new Date((new Date).getFullYear(),(new Date).getMonth(),(new Date).getDate()),this.today=moment().format("D. MMMM"),this.tommorow=moment().add(1,"days").format("D. MMMM"),$scope.currentType=null,$scope.openedSport=null,$scope.openedRegion=null,$scope.openedLeague=null,$scope.routeName=null,$scope.isLive=!1,$scope.streamOnly=!1,$scope.dateFilter=!1,$scope.oldDateFilter="TD",$scope.liveRoute=$rootScope.LanguageID+"/"+$rootScope.ENV.routes[$rootScope.LanguageID].live,$scope.filterRoutes={td:$rootScope.LanguageID+"/"+$rootScope.ENV.routes[$rootScope.LanguageID].offer+"?date=TD",tm:$rootScope.LanguageID+"/"+$rootScope.ENV.routes[$rootScope.LanguageID].offer+"?date=TM",l3h:$rootScope.LanguageID+"/"+$rootScope.ENV.routes[$rootScope.LanguageID].offer+"?date=L3H",l6h:$rootScope.LanguageID+"/"+$rootScope.ENV.routes[$rootScope.LanguageID].offer+"?date=L6H",l12h:$rootScope.LanguageID+"/"+$rootScope.ENV.routes[$rootScope.LanguageID].offer+"?date=L12H"},$scope.createSearch=function(){var returnString="";return $scope.dateFilter?returnString+="?date="+$scope.dateFilter+($scope.streamOnly?"&streamOnly=1":""):$scope.streamOnly&&(returnString+="?streamOnly=1"),returnString},$scope.$on("load_sidebar",function(event,args){$scope.checkAndLoad(args.type,args.params)}),$scope.loadWholeMenuPromise=function(shouldLoadOffer,live,date,streamOnly,sportID){return SidebarService.getWholeMenu(live,date,streamOnly,sportID,"results"===$scope.currentType).then(function(res){$rootScope.currentSportsArr=[],$rootScope.currentRegionsArr=[],$rootScope.currentLeaguesArr=[],res&&res.data&&res.data.forEach(function(ele){switch(ele.Slug=$rootScope.slugify(ele.Name),ele.Typ){case"LC":case"LX":$rootScope.currentLeagues[ele.Typ+ele.ID]=ele,$rootScope.currentLeaguesArr.push($rootScope.currentLeagues[ele.Typ+ele.ID]);break;case"RE":case"SX":$rootScope.currentRegions[ele.Typ+ele.ID]=ele,$rootScope.currentRegionsArr.push($rootScope.currentRegions[ele.Typ+ele.ID]),"virtual"===$scope.currentType&&(ele.URL=$rootScope.LanguageID+"/"+$scope.routeName+"/"+ele.Slug+$scope.createSearch());break;case"SP":case"SE":switch(($rootScope.currentSports[ele.Typ+ele.ID]=ele).URL=$rootScope.L
1anguageID+"/"+$scope.routeName+"/"+ele.Slug+$scope.createSearch(),$scope.currentType){case"offer":case"landing":ele.OpenedURL=$rootScope.LanguageID+"/"+$scope.routeName+$scope.createSearch();break;case"virtual":ele.OpenedURL="";break;case"results":ele.OpenedURL=$rootScope.LanguageID+"/"+$scope.routeName+$scope.createSearch()}$rootScope.currentSportsArr.push($rootScope.currentSports[ele.Typ+ele.ID])}}),$rootScope.currentSports={};var offerParams,foundSport=null,foundRegion=($rootScope.currentSportsArr.forEach(function(ele){$rootScope.currentSports[ele.Typ+ele.ID]=ele,"virtual"!==$scope.currentType&&$scope.currentParams.sport&&$scope.currentParams.sport===ele.Slug&&(foundSport=ele)}),$rootScope.currentRegions={},null),foundLeague=($rootScope.currentRegionsArr.forEach(function(ele){$rootScope.currentRegions[ele.Typ+ele.ID]=ele,"virtual"!==$scope.currentType?(ele.URL=$rootScope.currentSports[("SX"===ele.Typ?"SE":"SP")+ele.ParentID].URL.split("?")[0]+"/"+ele.Slug+$scope.createSearch(),ele.OpenedURL=$rootScope.currentSports[("SX"===ele.Typ?"SE":"SP")+ele.ParentID].URL,$scope.currentParams.region&&$scope.currentParams.region===ele.Slug&&foundSport&&ele.ParentID===foundSport.ID&&(foundRegion=ele)):!foundSport&&$scope.currentParams.sport&&$scope.currentParams.sport===ele.Slug&&(foundSport=ele)}),$rootScope.currentLeagues={},null);if($rootScope.currentLeaguesArr.forEach(function(ele){($rootScope.currentLeagues[ele.Typ+ele.ID]=ele).URL=$rootScope.currentRegions[("LX"===ele.Typ?"SX":"RE")+ele.ParentID].URL.split("?")[0]+"/"+ele.Slug+$scope.createSearch(),ele.OpenedURL=$rootScope.currentRegions[("LX"===ele.Typ?"SX":"RE")+ele.ParentID].URL,"virtual"!==$scope.currentType?$scope.currentParams.league&&$scope.currentParams.league===ele.Slug&&foundRegion&&ele.ParentID===foundRegion.ID&&(foundLeague=ele):!foundRegion&&$scope.currentParams.region&&$scope.currentParams.region===ele.Slug&&ele.ParentID===foundSport.ID&&(foundRegion=ele)}),0===$rootScope.currentSportsArr.length){var noOfferRedirect=null;switch($scope.currentType){case"offer":noOfferRedirect=$scope.isLive?"nolive":"noprematch";break;case"virtual":noOfferRedirect="novirtual";break;case"results":noOfferRedirect="noresults"}noOfferRedirect&&$scope.navigateToCorrection($rootScope.LanguageID+"/"+$rootScope.ENV.routes[$rootScope.LanguageID][noOfferRedirect])}"virtual"===$scope.currentType&&$scope.currentParams.sport&&!foundSport?$scope.navigateToCorrection($rootScope.LanguageID+"/"+$scope.routeName+$scope.createSearch()):"virtual"!==$scope.currentType||foundRegion?(res="virtual"!==$scope.currentType&&($scope.currentParams.sport&&!foundSport||$scope.currentParams.region&&!foundRegion||$scope.currentParams.league&&!foundLeague),$scope.openedSportID=!!foundSport&&foundSport.ID,$scope.openedRegionID=!!foundRegion&&foundRegion.ID,$scope.openedLeagueID=!!foundLeague&&foundLeague.ID,offerParams={sport:!(!foundSport||"SP"!==foundSport.Typ)&&$scope.openedSportID,sportEvent:!(!foundSport||"SE"!==foundSport.Typ)&&$scope.openedSportID,region:(!foundSport||"SE"!==foundSport.Typ)&&$scope.openedRegionID,league:$scope.openedLeagueID,top:!($scope.favoritesOnly||$scope.isLive&&$rootScope.favoritedEvents&&0<$rootScope.favoritedEvents.length),date:$scope.dateFilter,live:$scope.isLive,streamOnly:$scope.streamOnly,favoritesOnly:$scope.favoritesOnly,routeSelectionMissing:res},"virtual"!==$scope.currentType?(offerParams.sport=!(!foundSport||"SP"!==foundSport.Typ)&&$scope.openedSportID,offerParams.sportEvent=!(!foundSport||"SE"!==foundSport.Typ)&&$scope.openedSportID,offerParams.region=(!foundSport||"SE"!==foundSport.Typ)&&$scope.openedRegionID,offerParams.league=$scope.openedLeagueID):(offerParams.sport=!(!foundSport||"RE"!==foundSport.Typ)&&$scope.openedSportID,offerParams.region=(!foundSport||"LE"!==foundSport.Typ)&&$scope.openedRegionID),shouldLoadOffer&&(res?resolveMissingRouteSelection(offerParams).then(queueOrBroadcastOffer).catch(function(error){console.error("Failed to resolve offer route selection",error)}):queueOrBroadcastOffer(offerParams)),$scope.refreshSidebarTimeout&&$timeout.cancel($scope.refreshSidebarTimeout),$scope.refreshSidebarTimeout=$timeout($scope.refreshSidebar,12e4)):$scope.navigateToCorrection($rootScope.L
1anguageID+"/"+$scope.routeName+"/"+(foundSport||$rootScope.currentRegionsArr[0]).Slug+"/"+_.find($rootScope.currentLeaguesArr,function(iter){return iter.ParentID===(foundSport||$rootScope.currentRegionsArr[0]).ID}).Slug)})},$scope.$on("app_loaded",function(){$scope.paramsToLoad&&($rootScope.$broadcast("load_offer",$scope.paramsToLoad),$scope.paramsToLoad=null)}),$scope.refreshSidebar=function(){$scope.loadWholeMenuPromise(!1,$scope.isLive,$scope.dateFilter,$scope.streamOnly,"virtual"===$scope.currentType?153:null)},$scope.checkAndLoad=function(type,params){if("landing"!==$scope.currentType||"landing"!==type){switch(params.live?($scope.isLive=!0,$scope.dateFilter=!1):($scope.favoritesOnly=params.favoritesOnly,$scope.isLive=!1,$scope.dateFilter=params.date||!1),$scope.streamOnly=!!params.streamOnly,"offer"===type&&$scope.isLive&&$rootScope.$broadcast("load_streams"),$scope.currentType=type,$scope.currentParams=params,type){case"offer":case"landing":$scope.routeName=params.live?$rootScope.ENV.routes[$rootScope.LanguageID].live:$rootScope.ENV.routes[$rootScope.LanguageID].offer,$scope.filterDates=[{name:$scope.capitalizeFirstLetter(moment().add(2,"days").format("dddd")),value:moment().add(2,"days").format("YYYYMMDD")},{name:$scope.capitalizeFirstLetter(moment().add(3,"days").format("dddd")),value:moment().add(3,"days").format("YYYYMMDD")},{name:$scope.capitalizeFirstLetter(moment().add(4,"days").format("dddd")),value:moment().add(4,"days").format("YYYYMMDD")}];break;case"virtual":$scope.routeName=$rootScope.ENV.routes[$rootScope.LanguageID].virtual;break;case"results":$scope.routeName=$rootScope.ENV.routes[$rootScope.LanguageID].results}$scope.loadWholeMenuPromise(!0,$scope.isLive,$scope.dateFilter,$scope.streamOnly,"virtual"===$scope.currentType?153:null).then(function(){})}},$scope.getSportsFromType=function(type){return"virtual"!==type?$scope.currentSportsArr:$scope.currentRegionsArr},$scope.getRegionsFromType=function(type){return"virtual"!==type?$scope.currentRegionsArr:$scope.currentLeaguesArr},$scope.navigateToCorrection=function(path){$rootScope.correctingRedirect=!0,$location.url(path)},$scope.setDate=function(date){$timeout(function(){var currentPath=$location.path();"offer"===$scope.currentType||"results"===$scope.currentType?$scope.isLive?$location.url(currentPath.replace($rootScope.ENV.routes[$rootScope.LanguageID].live,$rootScope.ENV.routes[$rootScope.LanguageID].offer)+"?date="+date):$location.search().date===date?$location.search("date",null):$location.search("date",date):$location.url($rootScope.LanguageID+"/"+$rootScope.ENV.routes[$rootScope.LanguageID].offer+"?date="+date),currentPath===$location.path()&&$route.reload()},0,!0)},$scope.toggleFavorites=function(){var currentPath=$location.path(),favSearch=$location.search().favorites;favSearch&&"1"===favSearch?$location.search("favorites",null):$location.url($rootScope.LanguageID+"/"+$rootScope.ENV.routes[$rootScope.LanguageID].offer+"?favorites=1"),currentPath===$location.path()&&$route.reload()},$scope.toggleStreamOnly=function(){"offer"===$scope.currentType?"1"===$location.search().streamOnly?$location.search("streamOnly",null):$scope.isLive?$location.search("streamOnly","1"):$location.url($location.path().replace($rootScope.ENV.routes[$rootScope.LanguageID].offer,$rootScope.ENV.routes[$rootScope.LanguageID].live)+"?streamOnly=1"):$location.url($rootScope.LanguageID+"/"+$rootScope.ENV.routes[$rootScope.LanguageID].live+"?streamOnly=1"),$route.reload()},$scope.$on("set_date",function(event,date){$scope.setDate(date)}),$scope.startOfferLoading=function(selectedSport,selectedRegion,selectedLeague){var offerParams;$rootScope.isAppLoaded()?(offerParams={sport:!1,sportEvent:!1,region:!1,league:!1,top:!($scope.favoritesOnly||$scope.isLive&&$rootScope.favoritedEvents&&0<$rootScope.favoritedEvents.length),date:$scope.dateFilter,live:$scope.isLive,streamOnly:$scope.streamOnly,favoritesOnly:$scope.favoritesOnly},selectedSport?($scope.openedSport&&selectedSport.ID!==$scope.openedSport.ID&&($scope.openedSport.Opened=!1,$scope.openedSport.Regions=null),"SE"===($scope.openedSport=selectedSport).Typ?offerParams.sportEvent=selectedSport.ID:offerParams.sport=selectedSport.ID,selectedRegion?($scope.openedRegion&&selectedRegion.ID!==$scope.openedRegion.ID&&($scope.openedRegion.Opened=!1,$scope.openedRegion.Regions=null),$scope.openedRegion=selectedRegion,"SE"===selectedSport.Typ?offerParams.sport=selectedRegion.ID:offerParams.region=selectedRegion.ID,selectedLeague?($scope.openedLeague&&selectedLeague.ID!==$scope.openedLeague.ID&&($scope.openedLeague.Opened=!1,$scope.openedLeague.Regions=null),offerParams.league=($scope.openedLeague=selectedLeague).ID):$scope.openedLeague&&($scope.openedLeague.Opened=!1,$scope.openedLeague.Leagues=null,$scope.openedLeague=null)):$scope.openedRegion&&($scope.openedRegion.Opened=!1,$scope.openedRegion.Leagues=null,$scope.openedRegion=null)):$scope.openedSport&&($scope.openedSport.Opened=!1,$scope.openedSport.Regions=null,$scope.openedSport=null),$timeout(function(){$rootScope.$broadcast("load_offer",offerParams)},0,!1)):$timeout(function(){$scope.startOfferLoading(selectedSport,selectedRegion,selectedLeague)},200,!1)},$scope.capitalizeFirstLetter=function(string){return string.charAt(0).toUpperCase()+string.slice(1)},self.toggleFilterMenu=function(){self.filterOpened?(self.filterOpened=!1,self.filterActive=!0):self.filterOpened=!0},self.toggleFilter=function(){"offer"!==$scope.currentType&&"landing"!==$scope.currentType||($scope.dateFilter?($scope.oldDateFilter=$scope.dateFilter,$scope.setDate($scope.dateFilter)):$scope.setDate($scope.oldDateFilter))},$scope.toggleLive=function(){$scope.isLive?$location.url($location.path().replace($rootScope.ENV.routes[$rootScope.L
1anguageID].live,$rootScope.ENV.routes[$rootScope.LanguageID].offer)):"offer"!==$scope.currentType?$location.url($scope.liveRoute):$location.url($location.path().replace($rootScope.ENV.routes[$rootScope.LanguageID].offer,$rootScope.ENV.routes[$rootScope.LanguageID].live))}}]),angular.module("sidebar").controller("TicketVerifyController",["$scope","$element","$timeout",function($scope,$element,$timeout){$scope.ticketCodes=["","","",""],$scope.errors=null,$scope.change=function(boxIndex){var nextInput;$scope.errors=null,$scope.ticketCodes[boxIndex]&&4<=$scope.ticketCodes[boxIndex].length?($scope.ticketCodes[boxIndex]=$scope.ticketCodes[boxIndex].substring(0,4),(nextInput=$element.find("input")[boxIndex+1])&&nextInput.focus()):$scope.ticketCodes[boxIndex]&&0!==$scope.ticketCodes[boxIndex].length||(nextInput=$element.find("input")[boxIndex-1],$scope.ticketCodes[boxIndex]="",nextInput&&nextInput.focus()),/[^a-zA-Z0-9]/g.test($scope.ticketCodes[boxIndex])&&($scope.errors=Object.assign($scope.errors||{},{regex:!0})),$scope.ticketCodes[boxIndex]=$scope.ticketCodes[boxIndex].normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/[^a-zA-Z0-9]/g,"")},$scope.paste=function(boxIndex,event){var text=event.originalEvent.clipboardData.getData("text");event.stopPropagation(),text&&0<text.length&&(text=text.normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/[^a-zA-Z0-9]/g,""),$timeout(function(){var regex=new RegExp("(.{0,4})(.{0,4})(.{0,4})(.{0,4})","g"),values=(values=text.split(regex)).splice(1);$scope.ticketCodes[boxIndex]=$scope.ticketCodes[boxIndex]+values[0],_.forEach(new Array($scope.ticketCodes.length-boxIndex),function(value,index){values[index]&&0<values[index].length&&($scope.ticketCodes[boxIndex+index]=values[index],index=$element.find("input")[index+1])&&index.focus()})},20))},$scope.submitSportBoxCode=function(){$scope.validate(),$scope.errors||($("#sb-ticket-code1").val($scope.ticketCodes[0]),$("#sb-ticket-code2").val($scope.ticketCodes[1]),$("#sb-ticket-code3").val($scope.ticketCodes[2]),$("#sb-ticket-code4").val($scope.ticketCodes[3]),$("#sbTicketCheckForm").submit(),this.ticketCodes=["","","",""])},$scope.validate=function(){0===$scope.ticketCodes.join("").length&&($scope.errors=Object.assign($scope.errors||{},{required:!0})),_.forEach($scope.ticketCodes,function(ticketCode){Boolean(ticketCode)&&/^[a-zA-Z0-9]{4}$/.test(ticketCode)||($scope.errors=Object.assign($scope.errors||{},{regex:!0}))})},$scope.isFilled=function(){return _.reduce($scope.ticketCodes,function(prev,current){return prev&&4<=current.length},!0)}}]),angular.module("sidebar").controller("WinnersOfTheDayConroller",["$scope","$rootScope","SidebarService",function($scope,$rootScope,SidebarService){$scope.ticketOfTheDay,$rootScope.$watch("TicketOfTheDay",function(ticketOfTheDay){$scope.ticketOfTheDay=ticketOfTheDay}),$scope.selectCasino=function(){$scope.winnerOfTheDay||$scope.loadWinnerOfTheDay()},$scope.loadWinnerOfTheDay=function(){SidebarService.getCasinoWinnerOfLastDay().then(function(data){$scope.winnerOfTheDay=data.data,$scope.winnerOfTheDay&&($scope.winnerOfTheDay.URL="/"+$rootScope.LanguageID+"/"+("casino"==$scope.winnerOfTheDay.GameCategoryVariant?$rootScope.ENV.routes[$rootScope.LanguageID].casino:$rootScope.ENV.routes[$rootScope.LanguageID].rio)+($rootScope.IsClientLoggedIn?"?game_open_real=":"?game_open_fun=")+data.data.GameSystemName)})}}]),angular.module("sidebar").directive("template",function(){return{template:"..."}}),angular.module("sidebar").service("SidebarService",["$http","$rootScope","$sce",function($http,$rootScope,$sce){return{getMainMenu:function(type,isLive,date,streamOnly){switch(type){case"results":return $http.post($sce.trustAsResourceUrl($rootScope.baseURL+"/offer/GetResultsMainMenu"),{live:-1,date:date||-1});case"offer":case"landing":return $http.post($sce.trustAsResourceUrl($rootScope.baseURL+"/offer/GetMainMenu"),{live:isLive?1:-1,date:date||-1,streamOnly:streamOnly?1:-1});case"virtual":return $http.post($sce.trustAsResourceUrl($rootScope.baseURL+"/offer/GetRegionMenu"),{sportEvent:-1,sport:153,live:-1,date:-1})}}
1,getRegionMenu:function(type,sportID,isSportEvent,isLive,date,streamOnly){switch(type){case"results":return $http.post($sce.trustAsResourceUrl($rootScope.baseURL+"/offer/GetResultsRegionMenu"),{sportEvent:isSportEvent?sportID:-1,sport:isSportEvent?-1:sportID,live:isLive?1:-1,date:date||-1});case"offer":case"landing":return $http.post($sce.trustAsResourceUrl($rootScope.baseURL+"/offer/GetRegionMenu"),{sportEvent:isSportEvent?sportID:-1,sport:isSportEvent?-1:sportID,live:isLive?1:-1,date:date||-1,streamOnly:streamOnly?1:-1});case"virtual":return $http.post($sce.trustAsResourceUrl($rootScope.baseURL+"/offer/GetLeagueCupMenu"),{sportEvent:-1,sport:153,region:sportID,live:-1,date:-1})}},getLeagueCupMenu:function(type,sportID,regionID,isSportEvent,isLive,date,streamOnly){return $http.post($sce.trustAsResourceUrl($rootScope.baseURL+"/offer/Get"+("results"===type?"Results":"")+"LeagueCupMenu"),{sportEvent:isSportEvent?sportID:-1,sport:isSportEvent?regionID:sportID,region:isSportEvent?-1:regionID,live:isLive?1:-1,date:date||-1,streamOnly:streamOnly?1:-1})},getCasinoWinnerOfLastDay:function(){return"localhost"==$rootScope.ENV.name?$http.jsonp($sce.trustAsResourceUrl("https://portal-client-staging.doxxbet.sk/Client.svc/Casino/PlayerOfLastDay"),{params:{nocache:(new Date).getTime()},transformResponse:function(data){return data.Result}}):$http.post($sce.trustAsResourceUrl($rootScope.baseURL+"/casino/GetPlayerOfLastDay"))},getWholeMenu:function(live,date,streamOnly,sport,isResults){return $http.post($sce.trustAsResourceUrl($rootScope.baseURL+"/offer/Get"+(isResults?"Results":"")+"WholeMenu"),{live:live?"1":"-1",date:date,streamOnly:streamOnly?"1":"-1",sport:sport||"-1",isGoldenLeagueEnabled:!0})}}}]),angular.module("stream",[]),angular.module("stream").controller("StreamController",["$scope","$rootScope","$sce","$timeout","$filter","$location","StreamService",function($scope,$rootScope,$sce,$timeout,$filter,$location,StreamService){$rootScope.matchTrackerElement=null,$rootScope.matchTrackerCurrentlyOpened=null,$rootScope.matchTrackerIsFloating=!1,$rootScope.matchTrackerShow=!1,$rootScope.matchTrackerIsBig=!1,$rootScope.streamData=null,$rootScope.blockedScoreID=null,$rootScope.currentEventData=null,$rootScope.selectedStream=null,$rootScope.currentTab=null,$rootScope.streamListOpened=!1,$scope.currentViews=[],$rootScope.streamEventsByID={},$scope.$on("$destroy",function(){$scope.stopSignalR()}),$scope.toggleStreamList=function(){$rootScope.streamListOpened=!$rootScope.streamListOpened},$scope.$on("load_streams",function(){$scope.startSignalR(),$rootScope.streamEvents&&0<$rootScope.streamEvents.length&&$rootScope.streamEvents[0].isLive?$rootScope.showStreamElement=!0:$scope.loadStreamEvents(!1)}),$scope.$on("stop_streams",function(){$rootScope.showStreamElement=!1,$scope.stopSignalR()}),$scope.$on("open_stream_if_unopened",function(){$timeout(function(){$scope.openFirstAvailableStream(!1)})}),$scope.$on("signalr_EventChanged",function(event,data){$rootScope.streamEventsByID[data.eventID]&&$timeout(function(){"notstarted"!==data.actualGamePartID&&"ended"!==data.actualGamePartID&&($rootScope.streamEventsByID[data.eventID].isLive=!0),data.score&&($rootScope.streamEventsByID[data.eventID].score=$rootScope.parseScores(data.score,$rootScope.streamEventsByID[data.eventID].sportID),$rootScope.selectedStream)&&$rootScope.selectedStream.ID===$rootScope.streamEventsByID[data.eventID].ID&&($rootScope.selectedStream.score=$rootScope.streamEventsByID[data.eventID].score)})}),$scope.$on("signalr_RefreshView",function(event,data){"_LIVE"===data.view&&$scope.loadStreamEvents(!0)}),$scope.startSignalR=function(){$scope.currentViews.length<1&&($scope.currentViews=[{live:!0}],$scope.$emit("signalr_changeView",{newViews:[{live:!0}],oldViews:[]}))},$scope.stopSignalR=function(){0<$scope.currentViews.length&&($scope.currentViews=[],$scope.$emit("signalr_changeView",{newViews:[],oldViews:[{live:!0}]}))},$scope.loadStreamEvents=function(force){!force&&$rootScope.streamEvents||StreamService.getStreamEvents().then(function(res){var data=res.data;
1$rootScope.streamEvents=[],data.Events&&data.Events.forEach(function(ev){ev={ID:ev.EventID,sportID:ev.SportID,name:ev.EventName,teams:ev.EventName.split(" vs. "),streamID:ev.ProviderStreamID,streamProvider:ev.StreamProvider,streamURL:ev.Stream,streamEventID:ev.StreamProviderEventID,score:ev.Score?$rootScope.parseScores(ev.Score,ev.SportID):null,isLive:"Y"===ev.LiveBetting,gamePartTime:ev.ActualGamePartTime&&-1!==ev.ActualGamePartTime?ev.ActualGamePartTime+" '":null,dateMoment:moment(ev.EventDate),eventUrl:$rootScope.LanguageID+"/"+("Y"===ev.LiveBetting?$rootScope.ENV.routes[$rootScope.LanguageID].live:$rootScope.ENV.routes[$rootScope.LanguageID].offer+"/"+$rootScope.slugify(data.Labels["SP_"+ev.SportID].Name)+"/"+$rootScope.slugify(data.Labels["RE_"+ev.RegionID].Name)+"/"+$rootScope.slugify(data.Labels["LC_"+ev.LeagueCupID].Name))+"?event="+ev.EventID};ev.isLive||(moment().isSame(ev.dateMoment,"day")?(ev.isToday=!0,ev.isTom=!1):moment().add(1,"days").isSame(ev.dateMoment,"day")?(ev.isToday=!1,ev.isTom=!0):(ev.isToday=!1,ev.isTom=!1),ev.date=(ev.isToday||ev.isTom?"":ev.dateMoment.format("D.M."))+ev.dateMoment.format(" H:mm")),$rootScope.streamEvents.push(ev),$rootScope.streamEvents=_.sortBy($rootScope.streamEvents,function(srtbl){return srtbl.isLive?-1:srtbl.dateMoment.unix()}),$rootScope.streamEventsByID[ev.ID]=ev})},function(err){}).finally(function(){$rootScope.streamEvents&&0<$rootScope.streamEvents.length&&$rootScope.streamEvents[0].isLive&&($rootScope.showStreamElement=!0),$scope.streamLoadFinished=!0,$scope.openFirstStream&&($scope.openFirstStream=!1,$scope.openFirstAvailableStream())})},$scope.matchTrackerOpen=function(eventID,isSpecial){$rootScope.closeStream(),$rootScope.matchTrackerCurrentlyOpened!==eventID&&($rootScope.matchTrackerCurrentlyOpened=eventID,$rootScope.matchTrackerIsSpecial=isSpecial,$rootScope.currentTab=null,$rootScope.matchTrackerIFrame=$sce.trustAsResourceUrl($rootScope.matchTrackerURL+"?language="+$rootScope.LanguageID+"&matchId="+eventID+"&platform=web"),$scope.matchTrackerOpenTracker(eventID))},$scope.matchTrackerUnhide=function(){$rootScope.matchTrackerShow=!0},$scope.$on("set_matchtracker_height",function(e,height){$rootScope.matchTrackerHeight=height+2}),$scope.matchTrackerClose=function(preserveEvent){preserveEvent||($rootScope.matchTrackerShow=!1,$rootScope.matchTrackerIsBig&&$rootScope.matchTrackerResize(!0),$rootScope.matchTrackerCurrentlyOpened=null,$rootScope.matchTrackerIsSpecial=!1,$rootScope.matchTrackerIsBig=!1,$rootScope.matchTrackerIsFloating=!1),null!==$rootScope.matchTrackerElement&&($rootScope.matchTrackerElement=null)},$scope.matchTrackerOpenTracker=function(forceLoad){"tracker"===$rootScope.currentTab&&!forceLoad||($rootScope.currentTab="tracker",$timeout(function(){$scope.matchTrackerUnhide(),$scope.matchTrackerClose(!0),$rootScope.matchTrackerElement=".live-stream__player-"+($rootScope.matchTrackerIsFloating?"aside":"ticket")}))},$rootScope.matchTrackerResize=function(skipLoading){$rootScope.matchTrackerIsBig=!$rootScope.matchTrackerIsBig,$rootScope.matchTrackerIsFloating=!$rootScope.matchTrackerIsFloating,$timeout(function(){$('button[data-live-tab="resize"]').toggleClass("enlarge"),$(".live-stream").addClass("draggable").draggable({}),$rootScope.matchTrackerIsFloating?($(".live-stream").addClass("big"),$(".live-stream").removeClass("collapsed"),$('button[data-live-tab="collapse"]').removeClass("slim"),$(".live-stream").css("bottom","50%"),$(".live-stream").css("right","50%"),$(".live-stream").css("left","auto"),$(".live-stream").css("top","auto"),$(".live-stream").css("margin-right","-535px"),$(".live-stream").css("margin-bottom","-255px")):($(".live-stream").removeClass("collapsed"),$('button[data-live-tab="collapse"]').removeClass("slim"),$(".live-stream").removeClass("draggable"),$(".live-stream").css("margin-right","0px"),$(".live-stream").css("margin-bottom","0px"),$(".live-stream").removeClass("big"),$('button[data-live-tab="resize"]').removeClass("enlarge"),$(".live-stream").css("top","20px"),$(".live-stream").css("left","auto"),$(".live-stream").css("bottom","auto"),$(".live-stream").css("right","20px")),skipLoading||$timeout(function(){switch($rootScope.currentTab){case"tracker":$scope.matchTrackerOpenTracker(!0);break;case"stream":switch($rootScope.streamProvider){case"StatsPerform":StreamService.getStreamUrl($rootScope.selectedStream).then(function(res){res=res.data;$rootScope.streamType="video",$rootScope.SPStream={ID:$rootScope.selectedStream.streamID,uuid:res.uuid,token:res.access_token,eventID:$rootScope.selectedStream.streamEventID},$timeout(function(){$scope.createSPStream($rootScope.SPStream,$rootScope.matchTrackerIsFloating)},0,!1)},function(err){});break;case"UOF":$scope.playerInstance=new avvpl.setupPlayer({id:"betradar_stream_player",mute:!0,allowFullScreen:!1});break;case"BETGENIUS":"undefined"!=typeof GeniusLivePlayer&&GeniusLivePlayer.player.close(),$scope.createBetgeniusStream($rootScope.betgeniusData,$rootScope.selectedStream.streamID);break;case"IMG":StreamService.getStreamUrl($rootScope.selectedStream).then(function(res){res=res.data;$rootScope.embedStreamIMG=res.url,$rootScope.streamType="video",$scope.startPlayingImgStream($rootScope.embedStreamIMG)},function(err){});break;case"BYS":$scope.createBayesStream($rootScope.embedStreamBYS);case"iGameMedia":StreamService.getStreamUrl($rootScope.selectedStream).then(function(res){res=res.data;
1$rootScope.embedStreamIframe=$sce.trustAsResourceUrl(res.hlsUrl),$rootScope.streamType="video"},function(err){})}}})},0)},$rootScope.matchTrackerCollapse=function(){$(".live-stream").toggleClass("collapsed"),$('button[data-live-tab="collapse"]').toggleClass("slim")},$rootScope.openStreamOrRedirect=function(ev){ev.isLive?$rootScope.$broadcast("open_stream_event",{ID:ev.ID,url:ev.eventUrl}):$location.url(ev.eventUrl)},$rootScope.openStream=function(ev){$rootScope.streamData=null,!ev||!ev.isLive||$rootScope.selectedStream&&ev.ID===$rootScope.selectedStream.ID||($scope.unblockScore(),$rootScope.streamListOpened=!1,$scope.matchTrackerClose(),$rootScope.currentTab="stream",$rootScope.selectedStream=ev,$rootScope.streamType=null,$rootScope.streamProvider=null,ev.streamID&&($rootScope.IsClientLoggedIn?$timeout(function(){StreamService.canWatchStream().then(function(response){var sUrl,response=response.data;response.CanWatch?($scope.streamConditions=!1,$scope.streamOpened=!0,ev.streamProvider?($rootScope.streamProvider=ev.streamProvider,"UOF"===$rootScope.streamProvider||"StatsPerform"===$rootScope.streamProvider||"BETGENIUS"===$rootScope.streamProvider||"IMG"===$rootScope.streamProvider||"BYS"===$rootScope.streamProvider||"iGameMedia"===$rootScope.streamProvider?StreamService.getStreamUrl(ev).then(function(res){var data=res.data;switch($rootScope.streamProvider){case"UOF":$rootScope.embedStreamUOF=$sce.trustAsResourceUrl(data.url),$rootScope.streamType="video",$timeout(function(){$scope.playerInstance=new avvpl.setupPlayer({id:"betradar_stream_player",mute:!0,allowFullScreen:!1})},100);break;case"StatsPerform":$rootScope.streamType="video",$rootScope.SPStream={ID:ev.streamID,uuid:data.uuid,token:data.access_token,eventID:ev.streamEventID},$timeout(function(){$scope.createSPStream($rootScope.SPStream)},0,!1);break;case"BETGENIUS":$scope.createBetgeniusStream(data,ev.streamID);break;case"IMG":$rootScope.embedStreamIMG=data.url,$rootScope.streamType="video",$scope.startPlayingImgStream($rootScope.embedStreamIMG);break;case"BYS":$rootScope.embedStreamBYS=data.url,$scope.createBayesStream($rootScope.embedStreamBYS);break;case"iGameMedia":$rootScope.embedStreamIframe=$sce.trustAsResourceUrl(data.hlsUrl),$rootScope.streamType="video"}},function(err){}):"MTX"===$rootScope.streamProvider&&($rootScope.embedStreamIframe=$sce.trustAsResourceUrl(ev.streamURL),$rootScope.streamType="video")):($rootScope.streamType=null,sUrl="https://drop-and-play.betstream.betgenius.com/widgetLoader?containerId=stream-container-sidebar&source=7772&fixtureId="+ev.streamID+"&controls=controls",$timeout(function(){$rootScope.makeStreamScript(sUrl)}))):($scope.streamConditions={amount:response.Amount,currency:response.Currency,days:response.DaysCount}
1,$scope.streamConditions.text=$rootScope.Lang.App.min_to_watch.replace("%s",$filter("currency")($scope.streamConditions.amount,$scope.streamConditions.currency)).replace(".00 ","").replace(",00 ","").replace("%s",$scope.streamConditions.days),$scope.streamOpened=!0)}).finally(function(){})}):$scope.streamOpened=!0))},$scope.startPlayingImgStream=function(url){$timeout(function(){var hls,video=document.getElementById("img-stream-element"),videoSrc=url;Hls.isSupported()?((hls=new Hls).loadSource(videoSrc),hls.attachMedia(video)):video.canPlayType("application/vnd.apple.mpegurl")&&(video.src=videoSrc),video.play()},0,!1)},$scope.createKhlStream=function(url){$timeout(function(){var hls,video=document.getElementById("khl_stream_player"),videoSrc=url;Hls.isSupported()?((hls=new Hls).loadSource(videoSrc),hls.attachMedia(video)):video.canPlayType("application/vnd.apple.mpegurl")&&(video.src=videoSrc),video.play()},0,!1)},$scope.createBayesStream=function(url){$timeout(function(){var hls,video=document.getElementById("bys_stream_player"),videoSrc=url;Hls.isSupported()?((hls=new Hls).loadSource(videoSrc),hls.attachMedia(video)):video.canPlayType("application/vnd.apple.mpegurl")&&(video.src=videoSrc),video.play()},0,!1)},$scope.createBetgeniusStream=function(data,streamID){$rootScope.fixtureID=streamID,$rootScope.betgeniusData=data,"undefined"!=typeof GeniusLivePlayer&&GeniusLivePlayer.player.close(),$rootScope.betgeniusData.url&&$rootScope.makeStreamScript($rootScope.betgeniusStreamUrl+"&fixtureId="+streamID+"&containerId=geniusLivePlayer&width="+($rootScope.matchTrackerIsFloating?890:310)+"px&height="+($rootScope.matchTrackerIsFloating?500:174)+"px&autoplayEnabled=true")},$scope.$on("betgenius_stream_player_ready",function(){GeniusLivePlayer.player.start($rootScope.betgeniusData)}),$rootScope.makeStreamScript=function(url){var script=document.createElement("script");script.setAttribute("src",url),script.setAttribute("type","text/javascript"),document.head.appendChild(script)},$rootScope.closeStream=function(){$scope.streamOpened=!1,$rootScope.embedStream=null,$rootScope.embedStreamBYS=null,$rootScope.embedStreamIMG=null,$rootScope.embedStreamUOF=null,$rootScope.embedStreamIframe=null,$rootScope.selectedStream=null},$rootScope.toggleStream=function(event){$scope.streamOpened?$rootScope.closeStream():$rootScope.openStream(event)},$scope.$on("event_opened",function(ev,data){($rootScope.currentEventData=data).isLive&&data.isLiveOffer&&(data.streamID||data.streamURL?($rootScope.matchTrackerShow=!1,$scope.findAndOpenStreamEvent($rootScope.currentEventData.ID,!0)):data.matchTrackerID?$scope.matchTrackerOpen(data.matchTrackerID,data.isSpecialEvent):($rootScope.matchTrackerShow=!1,$scope.openFirstAvailableStream(!0)))}),$scope.findAndOpenStreamEvent=function(eventID,forceLoad){var found=!1;if($rootScope.streamEvents&&0<$rootScope.streamEvents.length){for(var i=0;i<$rootScope.streamEvents.length;i++)$rootScope.streamEvents[i].ID===eventID&&(found=!0,$rootScope.openStream($rootScope.streamEvents[i]));!forceLoad&&found||($scope.waitingEventID=eventID,$scope.loadStreamEvents(!0))}return null},$rootScope.switchToStream=function(){$rootScope.currentEventData&&$rootScope.currentEventData.streamID?$scope.findAndOpenStreamEvent($rootScope.currentEventData.ID):$scope.openFirstAvailableStream(!1)},$rootScope.switchToMatchTracker=function(){$rootScope.currentEventData&&$rootScope.currentEventData.matchTrackerID&&$scope.matchTrackerOpen($rootScope.currentEventData.matchTrackerID,$rootScope.currentEventData.isSpecialEvent)},$scope.openFirstAvailableStream=function(force){$scope.streamLoadFinished?$rootScope.streamEvents&&0<$rootScope.streamEvents.length&&(force||!$rootScope.selectedStream)&&$rootScope.openStream($rootScope.streamEvents[0]):$scope.openFirstStream=!0},$scope.createSPStream=function(streamData,isFloating){streamData&&($rootScope.streamData=streamData);streamData=document.createElement("script");streamData.setAttribute("src","//player.performgroup.com/csb.js"),streamData.setAttribute("data-uuid",$rootScope.streamData.eventID),streamData.setAttribute("data-outletkey","ygpv3ydgu65f1o8s2k3yskivb"),streamData.setAttribute("data-apptype","csb"),streamData.setAttribute("data-streamuuid",$rootScope.streamData.ID),streamData.setAttribute("data-streamuser",$rootScope.streamData.uuid),streamData.setAttribute("data-oauthtoken",$rootScope.streamData.token),streamData.setAttribute("data-env","betting"),streamData.setAttribute("data-width",isFloating?850:310),document.getElementById("spstream-"+(isFloating?"floating":"sidebar")).appendChild(streamData)},$rootScope.blockScore=function(eventID){$rootScope.blockedScoreID=eventID},$rootScope.unblockScore=function(){$rootScope.blockedScoreID=null}}]),angular.module("stream").service("StreamService",["$http","$rootScope","$sce",function($http,$rootScope,$sce){return{canWatchStream:function(){return"localhost"==$rootScope.ENV.name?$http.get("data/canwatchstream.json"):$http.post($sce.trustAsResourceUrl($rootScope.baseURL+"/client/CanWatchStream"),{})},getStreamEvents:function(){return $http.get($sce.trustAsResourceUrl($rootScope.baseURL+"/offer/StreamList"),{})},getStreamUrl:function(ev){if("localhost"==$rootScope.ENV.name)switch(ev.streamProvider){case"StatsPerform":return $http.get("data/streamstatsperform.json");case"UOF":return $http.get("data/streamurl.json");case"BETGENIUS":return $http.get("data/streambetradar.json");case"BYS":return $http.get("data/bayesstream.json");case"iGameMedia":return $http.get("data/streamkhl.json");default:return}switch(ev.streamProvider){case"StatsPerform":return $http.get($sce.trustAsResourceUrl($rootScope.baseURL+"/offer/GetStatsPerformStream"),{params:{streamId:ev.streamID}});case"UOF":return $http.get($sce.trustAsResourceUrl($rootScope.baseURL+"/offer/GetBetradarStream"),{params:{streamId:ev.streamID}});case"BETGENIUS":return $http.get($sce.trustAsResourceUrl($rootScope.baseURL+"/offer/GetBetGeniusStream"),{params:{url:ev.streamURL}});case"IMG":return $http.get($sce.trustAsResourceUrl($rootScope.baseURL+"/offer/GetImgStream"),{params:{streamId:ev.streamID}});case"BYS":return $http.get($sce.trustAsResourceUrl($rootScope.baseURL+"/offer/GetBayesStream"),{params:{streamId:ev.streamID}});case"iGameMedia":return $http.get($sce.trustAsResourceUrl($rootScope.baseURL+"/offer/GetEventStreamInfo"),{params:{eventId:ev.ID}});default:return}}}}]),angular.module("ticket",["myAccount"]).factory("__Ticket",function(){var Ticket=new(TicketInstance=function(){this.IsClientLoggedIn=!1,this.AmountMoneyWon=0,this.Bet=0,this.CurrencyID=null,this.Errors=[],this.Fee=0,this.ID=null,this.MaxBet=0,this.MinBet=0,this.Odds=[],this.OddsCombi=[],this.Combi=[],this.OkBet=0,this.OverallBet=0,this.OverallFee=0,this.OverallRate=0,this.OverallTotalBet=0,this.OverallPotWin=0,this.PlaceBetDate=null,this.PlaceBetState=null,this.Status=null,this.TYPE=null,this.TotalBet=0,this.FreeBets=[],this.AllowedRateChangeDesc=null,this.ClientBalance=0,this.FeeRate=0,this.MaxBetReason=null,this.LanguageId=null,this.PlacebetBonusPoints=0,this.PlacebetBalance=0,this.BonusPoints=0,this.Identity=1,this.Fix=0,this.Combination=0});return{create:function(){return Ticket},update:function(dataSet,skipBetZero){return angular.forEach(dataSet,function(value,key){"TotalBet"!==key&&"Bet"!==key||skipBetZero&&1!==skipBetZero||value%1&&(value=1===skipBetZero?value.toFixed(1):value.toFixed(2)),Ticket[key]=value}),Ticket},getSelectedOdds:function(){var selectedOdds=[];return angular.forEach(Ticket.Odds,function(odd){odd.selected&&!_.contains(selectedOdds,odd.OddID)&&selectedOdds.push(odd.OddID)}),selectedOdds.join()||!1},getOddsByGroup:function(group){var oddIDs=[],group=_.where(Ticket.Odds,{Group:group});return angular.forEach(group,function(odd){oddIDs.push(odd.OddID)}),oddIDs.join()||!1}}}),angular.module("ticket").controller("TicketWrapperController",["$scope","$rootScope",function($scope,$rootScope){$scope.ticketLoaded=!1,$scope.childrens={TicketController:null,MyAccountController:null},$scope.init=function(){$rootScope.IsClientLoggedIn&&0==$rootScope.Ticket.Odds.length?$scope.openMyAccount():$scope.openTicket()},$scope.$on("open_ticket_section",function(){$scope.openTicket()}),$scope.openMyAccount=function(){$scope.childrens.MyAccountController.openMyAccount(),$scope.selectTab("MY_ACCOUNT")},$scope.openTicket=function(){$scope.selectTab("TICKET")},$scope.selectTab=function(tab){$scope.__lscDir.selectedTab!==tab&&$scope.__lscDir.selectTab(tab)},$scope.$on("ticket_loaded",function(){$scope.ticketLoaded=!0}),$scope.unwatch=$scope.$watchGroup(["childrens","ticketLoaded","labelsLoaded"],function(oldValues,newValues){newValues[0].TicketController&&newValues[0].MyAccountController&&$scope.ticketLoaded&&$rootScope.labelsLoaded&&($scope.init(),$scope.unwatch())},!0)}]),angular.module("ticket").controller("TicketController",["$scope","$rootScope","$interval","$t
1imeout","$location","$cookies","__Ticket","TicketService","AppService","$filter","$sce",function($scope,$rootScope,$interval,$timeout,$location,$cookies,__Ticket,TicketService,AppService,$filter,$sce){var TicketWrapperController=$scope.$parent,self=(TicketWrapperController.childrens.TicketController=$scope,this);self.selectedFreebet=null,self.isFreebet=!1,self.freeBetAccordion=null,self.lastApprovedBet=null,self.lastSetBetErrors=null,self.submitWaiting=!1,self.runningSetBet=null,self.setBetRepeats=0,self.setBetAllowedRepeats=5,self.showAddMore=!0,$scope.freebetsOpened=!1,$scope.bonificationsOpened=!1,$scope.showHistory=!1,$scope.keepTicket=!1,$scope.showLoader=!1,$scope.combiType="group",$scope.combiBuffer=void 0,$scope.spellBuffer=void 0,self.maxBetErrorTimeout=!1,$scope.oddScores={},$scope.oddScoresAwaitingRefresh=!1,$scope.areOddsLitUp=!1;let editTicketErrorOverrides=["DBMAXBET","ERR_MAXBET"];function _handleErrors(Ticket,afterSubmit){return afterSubmit||$scope.removeAllErrors(),Ticket.ExceptionType&&Ticket.ExceptionType.match("Ticket ERROR")&&afterSubmit&&$rootScope.refreshTicket(),errResult=Ticket.Errors&&Ticket.Errors.length?(Ticket.Errors[0].split(";").forEach(function(rawError){var newEvent,errorCode,errValue,isMaxBet,rawError=rawError.split(":");rawError&&rawError[0]&&(newEvent=null,isMaxBet=!1,"DBMAXBET"===rawError[0]&&($scope.addError("MAXBET_"+Ticket.MaxBetReason.split(".").join("_").split(" ")[0]),isMaxBet=!0),errorCode=rawError.shift(),"UP"===$rootScope.Ticket.AllowedRateChangeDesc&&"ERR_RATEX"===errorCode&&(errorCode+="_DOWN"),Ticket.IsEdited&&-1<editTicketErrorOverrides.indexOf(errorCode)&&(errorCode+="_EDIT"),(errorCode=$rootScope.TicketErrors["newticket_"+errorCode])&&0<=errorCode.indexOf("%s")&&(errValue=rawError.pop(),isMaxBet&&((isMaxBet=Ticket.MaxBetReason.split("@")[1])&&rawError.push(isMaxBet),"-"===errValue.charAt(0))&&(errValue="0"),errorCode=errorCode.replace("%s",errValue)),0<rawError.length&&rawError.forEach(function(eventID){eventID=_.findWhere($rootScope.Ticket.Odds,{OddID:parseInt(eventID)});eventID&&(eventID.HasError=!0,newEvent={ID:eventID.OddID,name:eventID.EventName})}),(isMaxBet=_.findWhere($rootScope.Ticket.DisplayErrors,{message:errorCode}))||$rootScope.Ticket.DisplayErrors.push(isMaxBet={message:errorCode,events:[]}),newEvent)&&!_.findWhere(isMaxBet.events,{ID:parseInt(newEvent.ID)})&&isMaxBet.events.push(newEvent)}),!0):null!=Ticket.ExceptionType&&(Ticket.ExceptionType.match("Ticket ERROR")&&afterSubmit&&$rootScope.refreshTicket(),!0)}$scope.currentSignalrViews=[],$scope.lightUpTimeout=null,$scope.allowedSMSBets=[.5,1,1.5,2,2.5,3,3.5,4,4.5,5,10,15,20],$scope.lightUpOdds=function(){$scope.lightUpTimeout&&($timeout.cancel($scope.lightUpTimeout),$scope.lightUpTimeout=null),$scope.areOddsLitUp=!0,$scope.lightUpTimeout=$timeout(function(){$scope.areOddsLitUp=!1},1e3)},$scope.startTicketSignalr=function(){var newView;0===$scope.currentSignalrViews.length&&($scope.$emit("signalr_changeView",{newViews:newView=[{live:!0}],oldViews:$scope.currentSignalrViews}),$scope.currentSignalrViews=newView)},$scope.stopTicketSignalr=function(){0<$scope.currentSignalrViews.length&&$scope.$emit("signalr_changeView",{newViews:[],oldViews:$scope.currentSignalrViews})},$scope.$on("signalr_EventChanged",function(event,data){var odd;data.score&&(odd=_.find($rootScope.Ticket.Odds,{EVT:data.eventID}))&&($scope.oddScores[odd.EVT]=$rootScope.parseScores(data.score,odd.SportID))}),$rootScope.localeStorageGet("feeAccepted").then(function(fee){!$rootScope.ENV.ticket.fee.enabled&&fee&&($rootScope.tcConfig.fee.accepted=!0)}),$scope.changeCombiType=function(changeTo){$scope.combiType=changeTo},$scope.onFocusCombi=function(combi,isParcial){isParcial?($scope.combiBuffer=combi.ParcialBet,combi.ParcialBet=""):($scope.combiBuffer=combi.Bet,combi.Bet="")},$scope.changeCombiBet=function(combi,isParcial){$timeout(function(){var val;(isParcial?combi.ParcialBet:combi.Bet)?(val=isParcial?combi.ParcialBet:combi.Bet,TicketService.changeCombiBet(val,combi.ID,isParcial).then(function(res){res=res.data;_handleErrors(res),self.syncTicket(res)},function(err){}).finally(function(){}
1)):void 0!==$scope.combiBuffer&&(isParcial?combi.ParcialBet=$scope.combiBuffer:combi.Bet=$scope.combiBuffer),$scope.combiBuffer=void 0})},$rootScope.changeSpellBet=function(oddCombi){$timeout(function(){oddCombi.Bet?TicketService.changeSpellBet(oddCombi.Bet,oddCombi.ID).then(function(res){res=res.data;if(_handleErrors(res))return void 0!==$scope.spellBuffer&&(oddCombi.Bet=$scope.spellBuffer),!1;self.syncTicket(res)},function(err){}):void 0!==$scope.spellBuffer&&(oddCombi.Bet=$scope.spellBuffer),$scope.combiBuffer=void 0})},$scope.toggleKeepTicket=function(){$scope.keepTicket=!$scope.keepTicket},$rootScope.ticketSyncing=!1,$rootScope.Ticket=__Ticket.create(),$rootScope.TicketErrors={},$rootScope.Lang.Ticket={},self.intervals={delta:{}},$rootScope.TicketToken=null,$scope.$on("reload_ticket",function(event){$timeout(self.loadTicket())}),self.loadTicketRetries=0,self.loadTicket=function(){TicketService.loadTicket().then(function(res){self.loadTicketRetries=0;var clientLang,res=res.data;res.ticket&&(res.ticket.Errors=[],res.ticket.Token&&($rootScope.TicketToken=res.ticket.Token),self.lastApprovedBet=$rootScope.tcConfig.fee.accepted?res.ticket.OverallTotalBet:res.ticket.OverallBet,$rootScope.TicketErrors=res.errors,$rootScope.Lang.Ticket=$rootScope.modifyPrefix("newticket_trans_",res.translation),$rootScope.combiTooltipHTML=$sce.trustAsHtml($rootScope.Lang.Ticket.tooltip_combi),self.syncTicket(res.ticket),_handleErrors(res.ticket),res=res.ticket.LanguageId,(clientLang=$cookies.get("LanguageID"))&&clientLang.toLowerCase(),res&&res.toLowerCase(),clientLang&&res&&clientLang!=res&&TicketService.setLanguage().then(function(res){res=res.data;if(_handleErrors(res))return!1;self.syncTicket(res)},function(err){console.error(err)}),!(clientLang=$cookies.get("SetTicketAcceptation"))||-1<["all","none","up"].indexOf(clientLang.toLowerCase())&&!$rootScope.tcConfig.ticket.acceptedRateChange[clientLang.toLowerCase()])&&self.setRateAcceptation("ALL")},function(err){self.loadTicketRetries<3&&(self.loadTicketRetries++,TicketService.refreshTicket().then(function(res){self.loadTicket()}))}).finally(function(){var foundScoreOdd;$rootScope.Ticket.FreeBets||(self.freeBetAccordion=null),$rootScope.$broadcast("ticket_loaded"),$rootScope.UrlOddToAdd&&$rootScope.toggleOdd($rootScope.UrlOddToAdd,!0),$rootScope.Ticket.IsEdited&&(foundScoreOdd=!1,$rootScope.Ticket.Odds.forEach(function(odd){odd.SCORENEW&&(foundScoreOdd=!0)}),foundScoreOdd)&&($scope.oddScoresAwaitingRefresh=!0,$scope.refreshTicket(!0))})},self.loadTicket(),self.switchTicket=function(identity){-1!==[1,2,3,4,5].indexOf(identity)&&TicketService.switchTicket(identity).then(function(res){res=res.data;if(self.lastApprovedBet=$rootScope.tcConfig.fee.accepted?res.OverallTotalBet:res.OverallBet,_handleErrors(res))return!1;self.syncTicket(res)},function(err){console.error(err)})},$scope.toggleFreebets=function(){$scope.bonificationsOpened&&$scope.closeBonifications(),$scope.freebetsOpened?$scope.closeFreebets():$scope.openFreebets()},$scope.closeFreebets=function(){$scope.freebetsOpened=!1},$scope.openFreebets=function(){$scope.freebetsOpened=!0},$scope.toggleBonifications=function(){$scope.freebetsOpened&&$scope.closeFreebets(),$scope.bonificationsOpened?$scope.closeBonifications():$scope.openBonifications()},$scope.closeBonifications=function(){$scope.bonificationsOpened=!1},$scope.openBonifications=function(){$scope.bonificationsOpened=!0},$scope.showBonificationInfo=function(bonificationID){ShowBonificationRatesConditionsFromTicket(bonificationID,$rootScope.Ticket.OverallRate,$rootScope.Ticket.OverallBet,$rootScope.Ticket.Odds.length,$rootScope.Ticket.IsGoldenLeagueTicket)},$scope.defaultTicketSuccessCallback=function(res){res=res.data;if(self.lastApprovedBet=$rootScope.tcConfig.fee.accepted?res.OverallTotalBet:res.OverallBet,_handleErrors(res))return!1;self.syncTicket(res)},$scope.defaultTicketFailureCallback=function(err){console.error(err)},$scope.toggleBonification=function(bonification){var oldBoni;if(bonification.Applicable)return oldBoni=null,$rootScope.Ticket.Bonifications.map(function(bon){return bon.BonificationID!==bonification.BonificationID&&!0===bon.Selected&&(bon.Selected=!1,oldBoni=bon),bon}),bonification.Selected?TicketService.activateBonification(bonification.BonificationID).then($scope.defaultTicketSuccessCallback,function(err){$scope.defaultTicketFailureCallback(err),bonification.Selected=!1,oldBoni&&(oldBoni.Selected=!0)}):TicketService.deactivateBonification(bonification.BonificationID).then($scope.defaultTicketSuccessCallback,function(err){$scope.defaultTicketFailureCallback(err),bonification.Selected=!0})},$scope.$on("virtual_ticket",function(event){$rootScope.Ticket.Identity<5&&self.switchTicket(5)}),$scope.$on("regular_ticket",function(event){5==$rootScope.Ticket.Identity&&self.switchTicket(1)}),$rootScope.$broadcast("request_ticket_identity_change"),$scope.$on("start_ticket_edit",function(event,ticketCode){$scope.startTicketEdit(ticketCode)}),$scope.startTicketEdit=function(ticketCode){$scope.preEditTicketIdentity=$rootScope.Ticket.Identity<6?$rootScope.Ticket.Identity:1,TicketService.switchTicket(6).then(function(res){6===res.data.Identity&&TicketService.startTicketEdit(ticketCode).then(function(res){res=res.data;
1res&&(_handleErrors(res),UIkit.modal("#modal-ticket").hide(),UIkit.offcanvas.hide("#offcanvas-betting-history"),self.syncTicket(res),$scope.openTicket(),$scope.lightUpOdds())})},function(err){})},$scope.deltaRunning=!1,self.enableDelta=function(liveTicket){self.disableDelta();var deltaCnf=$rootScope.tcConfig.delta;intervalTime=liveTicket?deltaCnf.intervals.live:deltaCnf.intervals.prematch,self.intervals.delta=$interval(self.loadTicketChanges,intervalTime)},self.disableDelta=function(){$interval.cancel(self.intervals.delta)},$scope.earlyDelta=function(){self.loadTicketChanges()},$scope.refreshTicket=function(keepErrors){TicketService.refreshTicket().then(function(res){res=res.data;if(!keepErrors&&_handleErrors(res))return!1;self.syncTicket(res)})},$scope.$on("signalr_OddsChanged",function(event,params){var foundOdd=_.findWhere($rootScope.Ticket.Odds,{OddID:parseInt(params.oddsID)});foundOdd&&(!$rootScope.Ticket.IsEdited||!foundOdd.IsEditedOdd||foundOdd.IsEditedOdd&&"BB"===foundOdd.IsWinning)&&$timeout(function(){"BB"===foundOdd.IsWinning?$scope.refreshTicket(!0):(foundOdd.Rate=params.oddsRate,$scope.earlyDelta())})}),$scope.$on("signalr_OddBuyBackChanged",function(event,params){var foundOdd;$rootScope.Ticket.IsEdited&&(foundOdd=_.findWhere($rootScope.Ticket.Odds,{OddID:parseInt(params.OddsID)}))&&($scope.earlyDelta(),$timeout(function(){foundOdd.BuyBackValue=params.BuybackValue,foundOdd.IsRemoveable=params.RemoveOkFlag}))}),$rootScope.$on("signalr_BuyBackChanged",function(ev,data){data.ticketCode===$rootScope.Ticket.TicketCode&&$scope.earlyDelta()}),self.loadTicketChanges=function(){$scope.deltaRunning||($scope.deltaRunning=!0,TicketService.delta().then(function(res){res=res.data;res&&(res.Odds&&(res.Odds.forEach(function(deltaOdd){var odd=_.find($rootScope.Ticket.Odds,{OddID:deltaOdd.OddID});odd&&(odd.IsActive=deltaOdd.IsActive,odd.Rate=deltaOdd.Rate)}),$scope.displayRemoveFromTicket=!$rootScope.Ticket.IsEdited&&_.findWhere($rootScope.Ticket.Odds,{IsActive:!1})),res.OddsCombi&&res.OddsCombi.forEach(function(deltaCombi){var combination=_.find($rootScope.Ticket.OddsCombi,{ID:deltaCombi.ID});combination.PotWin=deltaCombi.PotWin,combination.Rate=deltaCombi.Rate}),res.OverallPotWin&&($rootScope.Ticket.OverallPotWin=res.OverallPotWin),res.FiscalOverallPotWin&&($rootScope.Ticket.FiscalOverallPotWin=res.FiscalOverallPotWin),res.OverallRate&&($rootScope.Ticket.OverallRate=res.OverallRate),res.OverallRateRaw&&($rootScope.Ticket.OverallRateRaw=res.OverallRateRaw),-1!=res.BoosterBonusValue&&($rootScope.Ticket.BoosterBonusValue=res.BoosterBonusValue),-1!=res.BoosterBonusValueTeaser)&&($rootScope.Ticket.BoosterBonusValueTeaser=res.BoosterBonusValueTeaser)},function(err){console.error(err)}).finally(function(){$scope.deltaRunning=!1}))},self.removeInactiveOdds=function(){self.removeOdds(_.pluck(_.filter($rootScope.Ticket.Odds,{IsActive:!1}),"OddID"))},self.removeOdds=function(OddIDs){OddIDs.length<1||TicketService.removeOdds(OddIDs).then(function(res){res=res.data;if(res.Errors=_.reject(res.Errors,function(erri){return-1<erri.indexOf("ODD not on ticket")}),_handleErrors(res))return!1;self.syncTicket(res)})},self.toggleOdds=function(OddIDs){OddIDs.length<1||TicketService.addRemoveOdds(OddIDs).then(function(res){res=res.data;if(_handleErrors(res))return!1;self.syncTicket(res)})},$scope.$on("create_top_ticket",function(event,oddIDs){TicketWrapperController.openTicket(),0<(oddIDs=_.filter(oddIDs,function(oddID){return!_.findWhere($rootScope.Ticket.Odds,{OddID:oddID})})).length&&self.toggleOdds(oddIDs)}),$rootScope.oddsCombiOnClick=function(combi){$scope.spellBuffer=combi.Bet,combi.Bet=""},$rootScope.unpinIfPinned=function(combi){combi.Pinned&&TicketService.unpinCombi(null,combi.ID).then(function(res){res=res.data;if(_handleErrors(res))return!1;self.syncTicket(res)},function(err){})},$scope.unpinAllCombi=function(){TicketService.unpinCombi().then(function(res){res=res.data;if(_handleErrors(res))return!1;self.syncTicket(res)},function(err){})},$rootScope.unpinAllCombiIfHasPinned=function(){$rootScope.Ticket.hasPinnedCombi&&$scope.unpinAllCombi()},self.syncTicket=function(Ticket,skipBetZero){if(!Ticket)return!1;$scope.displayRemoveFromTicket=!1,self.lastApprovedBet=$rootScope.tcConfig.fee.accepted?Ticket.OverallTotalBet:Ticket.OverallBet,Ticket.hasPinnedCombi=!1,Ticket.OddsCombi&&Ticket.OddsCombi.forEac
1h(function(oddCombi){oddCombi.BetGS=function(newVal){if(arguments.length)oddCombi.Bet=newVal;else if(""===oddCombi.Bet)return"";return $filter("currency")(oddCombi.Bet,Ticket.CurrencyID)},oddCombi.Pinned&&(Ticket.hasPinnedCombi=!0)}),Ticket.Combi&&0<Ticket.Combi.length&&Ticket.Combi.forEach(function(combi){combi.DescSep=combi.Desc.split("("),combi.DescSep[1]=combi.DescSep[1].split(")")[0],combi.On&&0===combi.Bet&&(combi.Bet=null),combi.On&&0===combi.ParcialBet&&(combi.ParcialBet=null),combi.BetGS=function(newVal){if(arguments.length)combi.Bet=newVal;else{if(""===combi.Bet)return"";if(null===combi.Bet)return null}return $filter("currency")(combi.Bet,Ticket.CurrencyID)},combi.ParcialBetGS=function(newVal){if(arguments.length)combi.ParcialBet=newVal;else{if(""===combi.ParcialBet)return"";if(null===combi.ParcialBet)return null}return $filter("currency")(combi.ParcialBet,Ticket.CurrencyID)}}),$rootScope.Ticket=__Ticket.update(Ticket,skipBetZero),$rootScope.Ticket.overallRateCombi=$rootScope.Ticket.overallRateRaw/(0<$rootScope.Ticket.OddsCombi.length?$rootScope.Ticket.OddsCombi.length:1),$rootScope.Ticket.overallRateCombi=Math.floor(100*$rootScope.Ticket.overallRateCombi)/100,_.findWhere(Ticket.Odds,{LiveBet:!0})?self.enableDelta(!0):Ticket.Odds&&Ticket.Odds.length?self.enableDelta(!1):self.disableDelta(),Ticket.Odds&&0<Ticket.Odds.length&&(Ticket.Odds=Ticket.Odds.map(function(Odd){switch($rootScope.OddsViewMode){case 1:break;case 2:switch(Odd.Tip){case"1X":Odd.Tip=$rootScope.Lang.App.tip_1+" "+$rootScope.Lang.App.tip_or+" "+$rootScope.Lang.App.tip_x;break;case"X2":Odd.Tip=$rootScope.Lang.App.tip_x+" "+$rootScope.Lang.App.tip_or+" "+$rootScope.Lang.App.tip_2;break;case"12":Odd.Tip=$rootScope.Lang.App.tip_1+" "+$rootScope.Lang.App.tip_or+" "+$rootScope.Lang.App.tip_2}case 4:"1"!=Odd.Tip&&"X"!=Odd.Tip&&"2"!=Odd.Tip||(Odd.Tip=$rootScope.Lang.App["tip_"+Odd.Tip.toLowerCase()]);break;case 3:switch(Odd.Tip){case"1X":Odd.Tip=Odd.Team1+" "+$rootScope.Lang.App.tip_or+" "+$rootScope.Lang.App.tip_x;break;case"X2":Odd.Tip=$rootScope.Lang.App.tip_x+" "+$rootScope.Lang.App.tip_or+" "+Odd.Team2;break;case"12":Odd.Tip=Odd.Team1+" "+$rootScope.Lang.App.tip_or+" "+Odd.Team2}case 5:switch(Odd.Tip){case"1":Odd.Tip=Odd.Team1;break;case"X":Odd.Tip=$rootScope.Lang.App.tip_x;break;case"2":Odd.Tip=Odd.Team2}}var chanceType;return Ticket.IsEdited&&Odd.SCORENEW&&(!$scope.oddScores[Odd.EVT]||$scope.oddScoresAwaitingRefresh)&&($scope.oddScores[Odd.EVT]=$rootScope.parseScores(Odd.SCORENEW,Odd.SportID),$scope.oddScoresAwaitingRefresh=!1),Odd.IsBetbuilder&&(Odd.ChanceType=(chanceType=Odd.ChanceType)&&(-1===chanceType.indexOf("|")?chanceType.replace(/\s*(?:&&|\\u0026\\u0026)\s*/g,"<br>"):chanceType.split(/\s*(?:&&|\\u0026\\u0026)\s*/g).map(function(chanceTypePart){var chanceTypeParts=chanceTypePart.split(/\s*\|\s*/g),tip=chanceTypeParts.pop();return tip&&0!==chanceTypeParts.length?chanceTypeParts.join("<br>")+'<br><span class="ticket__item__tip">'+tip+"</span>":chanceTypePart}).join("<br>"))),Odd}),Ticket.IsEdited?$scope.startTicketSignalr():$scope.stopTicketSignalr());skipBetZero=$rootScope.tcConfig.ticket.acceptedRateChange,skipBetZero.all=skipBetZero.up=skipBetZero.none=!1,Ticket.AllowedRateChangeDesc&&(skipBetZero[Ticket.AllowedRateChangeDesc.toLowerCase()]=!0),skipBetZero=$(".ticket .tabs--tickets li").eq(0);1!=$rootScope.Ticket.Identity||skipBetZero.hasClass("uk-active")||skipBetZero.addClass("uk-active"),$timeout(function(){var tooltipContent;angular.forEach(Ticket.Odds,function(Odd){var regionURL=(sportURL=153===Odd.SportID?"/"+$rootScope.LanguageID+"/"+$rootScope.ENV.routes[$rootScope.LanguageID].virtual:Odd.LiveBet?"/"+$rootScope.LanguageID+"/"+$rootScope.ENV.routes[$rootScope.LanguageID].live+"/"+$rootScope.slugify(Odd.SportName):"/"+$rootScope.LanguageID+"/"+$rootScope.ENV.routes[$rootScope.LanguageID].offer+"/"+$rootScope.slugify(Odd.SportName))+"/"+$rootScope.slugify(Odd.RegionName),leagueURL=regionURL+"/"+$rootScope.slugify(Odd.LeagueCupName),sport=(Odd.EventURL=leagueURL+"?event="+Odd.EVT,$rootScope.Dictionary.SportMapping[Odd.SportID]),sportURL={content:$('<a class="label '+sport+'" href="'+sportURL+'" onclick="return sportbookURL(\''+sportURL+"')\">
1"+Odd.SportName+'</a> <a class="label '+sport+'" href="'+regionURL+'" onclick="return sportbookURL(\''+regionURL+"')\">"+Odd.RegionName+'</a> <a class="label '+sport+'" href="'+leagueURL+'" onclick="return sportbookURL(\''+leagueURL+"')\">"+Odd.LeagueCupName+"</a>"),interactive:!0,position:"left",delay:50,theme:"labeled"};$(".ticket-odd-"+Odd.OddID).hasClass("tooltipstered")||$(".ticket-odd-"+Odd.OddID).tooltipster(sportURL)}),$("#xxl-info-tooltip").length&&($("#xxl-info-tooltip").hasClass("tooltipstered")&&$("#xxl-info-tooltip").tooltipster("destroy"),$rootScope.Ticket.IsGoldenLeagueTicket||"MAX"===$rootScope.Ticket.BoosterBonusHint||(tooltipContent='<span><a onclick="showVerificationForm();">'+$rootScope.Lang.App.xxl_verify_acct+"</a> "+$filter("xxlHint")($rootScope.Ticket.OverallPotWin,$rootScope.Lang.App.xxl_verify_bonus+"</span>"),$("#xxl-info-tooltip").tooltipster({content:$(tooltipContent),interactive:!0,position:"top",delay:50,theme:"labeled"})))},0),"SRT"!==$rootScope.Ticket.TYPE&&0==$rootScope.Ticket.TotalBet&&$rootScope.Ticket.MinBet&&self.setBetRepeats<self.setBetAllowedRepeats&&0<$rootScope.Ticket.Odds.length?(self.updateBetAmount(2*$rootScope.Ticket.MinBet),self.setBetRepeats++):self.setBetRepeats=0,$scope.displayRemoveFromTicket=!!_.findWhere(Ticket.Odds,{IsActive:!1}),$rootScope.Ticket.FreeBets?($timeout(function(){self.freeBetAccordion?self.freeBetAccordion.update():self.freeBetAccordion=UIkit.accordion($("#ticketfreebet"),{})},0),_.findWhere($rootScope.Ticket.FreeBets,{IsActive:!0,IsApplicable:!0})?$rootScope.Ticket.IsFreebetActive=!0:$rootScope.Ticket.IsFreebetActive=!1):(self.freeBetAccordion=null,$rootScope.Ticket.IsFreebetActive=!1),!$rootScope.ENV.ticket.requireTwoStep||!$rootScope.Ticket.IsClientLoggedIn||$rootScope.Ticket.IsClientVerified&&$rootScope.Ticket.IsIdentificationNumberFilled&&$rootScope.Ticket.IsClientIdentificationNumberVerified&&!$rootScope.Ticket.IsClientGamblingProhibited?$rootScope.Ticket.showDisabledWarning=!1:($rootScope.Ticket.showDisabledWarning=!0,$scope.disabledMessageType="",$rootScope.Ticket.IsClientGamblingProhibited&&($scope.disabledMessageType="gambling"),$rootScope.Ticket.IsClientIdentificationNumberVerified&&$rootScope.Ticket.IsClientVerified||($scope.disabledMessageType="unverified"),!$rootScope.Ticket.IsIdentificationNumberFilled&&$rootScope.Ticket.IsClientVerified&&($scope.disabledMessageType="noid")),self.setGroupTooltips(),$scope.broadcastTicketOdds(),$timeout($rootScope.loadTooltips,0,!1),$rootScope.Ticket.IsEdited?$scope.subscribeEditTicket($rootScope.Ticket.TicketCode):$scope.unsubscribeEditTicket($scope.editSubscribeTicketCode),6===$rootScope.Ticket.Identity&&(!$rootScope.Ticket.Odds||$rootScope.Ticket.Odds.length<1)&&(this.switchTicket($scope.preEditTicketIdentity||1),$scope.preEditTicketIdentity=null),$rootScope.Ticket.Identity<6&&($scope.preEditTicketIdentity=null)},$scope.syncTicket=self.syncTicket,$scope.subscribeEditTicketCall=function(ticketCode){return TicketService.changeTicketSubscription(!0,ticketCode).then(function(res){},function(err){$scope.editSubscribeTicketCode=null})},$scope.unsubscribeEditTicketCall=function(ticketCode){return TicketService.changeTicketSubscription(!1,ticketCode).then(function(res){},function(err){$scope.editSubscribeTicketCode=ticketCode})},$scope.subscribeEditTicket=function(ticketCode){var oldTicketCode;ticketCode&&(oldTicketCode=$scope.editSubscribeTicketCode,$scope.editSubscribeTicketCode=ticketCode,oldTicketCode?oldTicketCode!==ticketCode&&$scope.unsubscribeEditTicketCall(oldTicketCode).then(function(){$scope.subscribeEditTicketCall(ticketCode)}):$scope.subscribeEditTicketCall(ticketCode))},$scope.unsubscribeEditTicket=function(ticketCode){ticketCode&&($scope.editSubscribeTicketCode=null,$scope.unsubscribeEditTicketCall(ticketCode))},$scope.broadcastTicketOdds=function(adding){$rootScope.Ticket.Odds&&$rootScope.Ticket.Odds.length?$rootScope.$broadcast("sync_on_ticket",_.pluck($rootScope.Ticket.Odds,"OddID")):$rootScope.$broadcast("sync_on_ticket",[])},$scope.$on("request_odd_broadcast",function(){$scope.broadcastTicketOdds()}),self.setGroupTooltips=function(){var createTooltips,tempOddArr;"SRT"==$rootScope.Ticket.TYPE&&(createTooltips=!0,_.find($rootScope.Ticket.Odds,function(Odd){return"1"===Odd.Group||Odd.selected})?createTooltips=!1:(tempOddArr=_.groupBy($rootScope.Ticket.Odds,function(Odd){return Odd.Group}),_.each(tempOddArr,function(Group){1<Group.length&&(createTooltips=!1)})),$timeout(function(){createTooltips?($("#ticket-group-btn").hasClass("tooltipstered")||$("#ticket-group-btn").tooltipster({content:$rootScope.L
1ang.App.tooltip_group,interactive:!0,position:"top",delay:1e3,theme:"labeled"}),$("#ticket-bankers-btn").hasClass("tooltipstered")||$("#ticket-bankers-btn").tooltipster({content:$rootScope.Lang.App.tooltip_bankers,interactive:!0,position:"top",delay:1e3,theme:"labeled"})):($("#ticket-group-btn").hasClass("tooltipstered")&&$("#ticket-group-btn").tooltipster("destroy"),$("#ticket-bankers-btn").hasClass("tooltipstered")&&$("#ticket-bankers-btn").tooltipster("destroy"))}))},self.toggleSelected=function(Odd){Odd.selected=!Odd.selected,self.setGroupTooltips()},self.clearTicket=function(ticketCodeToCopy){$rootScope.Ticket=__Ticket.create(),TicketService.clearTicket().then(function(res){res=res.data;self.syncTicket(res),self.disableDelta(),ticketCodeToCopy&&CopyTicketWithoutClose(ticketCodeToCopy)},function(err){console.error(err)})},self.fixTicket=function(){return 1==$rootScope.TicketFix?$rootScope.TicketFix=0:$rootScope.TicketFix=1},self.TicketComb=function(){return 1==$rootScope.TicketCombination?$rootScope.TicketCombination=0:$rootScope.TicketCombination=1},self.deselectAllOdds=function(){$rootScope.Ticket.Odds=$rootScope.Ticket.Odds.map(function(Odd){return Odd.selected=!1,Odd})},$rootScope.openTicketCombination=function(){var modal=UIkit.modal("#modal-ticket-combination");modal.isActive()||modal.show(),$timeout(function(){$("#combi-modal").mCustomScrollbar({axis:"y",theme:"dark",documentTouchScroll:!0,mouseWheel:{scrollAmount:"260",preventDefault:!0}}),$rootScope.loadTooltips()},100,!1)},$rootScope.openWinsTooltipModal=function(){var modal=UIkit.modal("#modal-wins-tooltip");modal.isActive()||modal.show()},$rootScope.winsModalOpenMoreInfo=function(){$location.url($rootScope.winsNewsUrl);var modal=UIkit.modal("#modal-wins-tooltip");modal&&modal.isActive()&&modal.hide()},$rootScope.winCurrencyCheckLoginStatus=function(){$rootScope.IsClientLoggedIn||LoginModalOpen()},$rootScope.changeIsWinCurrencyTicket=function(){$rootScope.IsClientLoggedIn?($rootScope.isWinCurrencyTicket=!$rootScope.isWinCurrencyTicket,$rootScope.isWinCurrencyTicket&&($rootScope.Ticket.Bonifications&&$rootScope.Ticket.Bonifications.forEach(function(boni){boni.Selected&&$scope.toggleBonification(boni)}),$rootScope.Ticket.Freebets)&&$rootScope.Ticket.Freebets.forEach(function(freebet){freebet.Selected&&$scope.toggleFreebet(freebet)})):LoginModalOpen()},$rootScope.openSmsBettingModal=function(){var modal=UIkit.modal("#modal-sms-betting");modal.isActive()||modal.show()},$rootScope.closeSmsBettingModal=function(){$scope.refreshTicket(!0)},self.openEventTicket=function(EventID,LeagueID,RegionID,SportID,live){"SRT"!==$rootScope.Ticket.TYPE&&$rootScope.openEvent(EventID,LeagueID,RegionID,SportID,live)},self.setType=function(type){TicketService.changeTicketType(type).then(function(res){res=res.data;if(_handleErrors(res))return!1;self.syncTicket(res)},function(err){console.error(err)})},$rootScope.toggleBetbuilderOdd=function(oddID){},$rootScope.toggleOdd=function(OddID,forceAdd){if(!OddID||isNaN(OddID))return!1;if(forceAdd){var skipAdding=!1;if($rootScope.Ticket.Odds.forEach(function(Odd){Odd.OddID==OddID&&(skipAdding=!0)}),skipAdding)return}TicketWrapperController.openTicket(),TicketService.addRemoveOdd(OddID).then(function(res){res=res.data;if(_handleErrors(res))return!1;self.syncTicket(res),$timeout(function(){var scrolldistance;$rootScope.$broadcast("odd_toggled"),"JT"==$rootScope.Ticket.TYPE?$("#ticket-odd-simple-"+OddID).position()&&($("#ticket-odd-simple-"+OddID).is(":last-child")?0<(scrolldistance=$("#scrollToDiv").position().top-$(".main__right").height()+20)&&$(".main__right").mCustomScrollbar("scrollTo",scrolldistance):$(".main__right").mCustomScrollbar("scrollTo",$("#ticket-odd-simple-"+OddID).position().top+50)):$("#ticket-odd-combo-"+OddID).position()&&($("#ticket-odd-combo-"+OddID).is(":last-child")?0<(scrolldistance=$("#scrollToDiv").position().top-$(".main__right").height()+20)&&$(".main__right").mCustomScrollbar("scrollTo",scrolldistance):$(".main__right").mCustomScrollbar("scrollTo",$("#ticket-odd-combo-"+OddID).position().top+50))})})},$rootScope.hasOddOnTicket=function(eventID){return!!_.find($rootScope.Ticket.Odds,function(odd){return odd.EVT===eventID})},$scope.$on("toggle_odd",function(event,oddID){$rootScope.toggleOdd(oddID)}),self.createGroup=function(){var oddIDs=__Ticket.getSelectedOdds();if(0==oddIDs||!oddIDs.includes(","))return!1;self.createGroupCall(oddIDs),self.deselectAllOdds()},self.createGroupCall=function(oddIDs){TicketService.oddTag(oddIDs).then(function(res){res=res.data;if(_handleErrors(res))return!1;self.syncTicket(res)})},$scope.resetTicket=function(){TicketService.resetTicket().then(function(res){res=res.data;if(_handleErrors(res))return!1;self.syncTicket(res)})},self.createSafebetGroup=function(){var oddIDs=__Ticket.getSelectedOdds();if(0==oddIDs)return!1;self.createSafebetGroupCall(oddIDs)},self.createSafebetGroupCall=function(oddIDs){TicketService.oddTop(oddIDs).then(function(res){res=res.data;if(_handleErrors(res))return!1;self.syncTicket(res)})},self.removeFromGroup=function(OddID,Group){var OddArr;"1"===Group?self.createGroupCall([OddID].join()):(OddArr=[],$rootScope.Ticket.Odds.forEach(function(Odd){Odd.Group===Group&&Odd.OddID!=OddID&&OddArr.push(Odd.OddID)}),1<OddArr.length?self.createGroupCall(OddArr.join()):self.cancelGroup(!0,Group))},self.cancelGroup=function(cancelSubmitted,groupName){return cancelSubmitted?0!=(cancelSubmitted=__Ticket.getOddsByGroup(groupName))&&void TicketService.oddUntag(cancelSubmitted).then(function(res){res=res.data;if(_handleErrors(res))return!1;self.syncTicket(res)}):null},self.toggleCombination=function(combi){combi.On?self.activateCombi(combi.ID):self.deactivateCombi(combi.ID)},self.activateCombi=function(CID){TicketService.activateCombi(CID).then(function(res){res=res.data;if(_handleErrors(res))return!1;self.syncTicket(res)},function(err){console.error(err)})},self.deactivateCombi=function(CID){TicketService.deactivateCombi(CID).then(function(res){res=res.data;if(_handleErrors(res))return!1;self.syncTicket(res)},function(err){console.error(err)})},$rootScope.updateTotalBet=function(){$timeout(function(){self.updateBetAmount()})},$rootScope.OverallBetOnClick=function(){$rootScope.Ticket.OverallBet=""},$rootScope.OverallTotalBetOnClick=function(){$rootScope.Ticket.OverallTotalBet=""},$rootScope.OverallBetGS=function(newVal){if(arguments.length)$rootScope.Ticket.OverallBet=newVal;else if(""===$rootScope.Ticket.OverallBet)return"";return $filter("currency")($rootScope.Ticket.OverallBet,$rootScope.Ticket.CurrencyID)},$rootScope.OverallTotalBetGS=function(newVal){if(arguments.length)$rootScope.Ticket.OverallTotalBet=newVal;else if(""===$rootScope.Ticket.OverallTotalBet)return"";return $filter("currency")($rootScope.Ticket.OverallTotalBet,$rootScope.Ticket.CurrencyID)},self.updateBetAmount=function(forcedAmount,skipBetZero,showMaxBetError){var amount=$rootScope.tcConfig.fee.accepted?$rootScope.Ticket.OverallTotalBet:$rootScope.Ticket.OverallBet;switch(amount=(amount=amount||0).toString().replace(",","."),$rootScope.Ticket.TYPE){case"JT":self.runningSetBet=TicketService.setBetAmount(forcedAmount||amount).then(function(res){self.processSetBet(res,skipBetZero)}).finally(function(){self.runningSetBet=null,showMaxBetError&&$scope.addSingleError("ERR_MAXBET",$rootScope.Ticket.MaxBet)});break;case"SRT":TicketService.changeCombiBet(forcedAmount||amount,"all",!1).then(function(res){self.processSetBet(res,skipBetZero)}).finally(function(){self.runningSetBet=null,showMaxBetError&&$scope.addSingleError("ERR_MAXBET",$rootScope.Ticket.MaxBet)})}},self.processSetBet=function(res,skipBetZero){res=res.data;self.lastApprovedBet=$rootScope.tcConfig.fee.accepted?res.OverallTotalBet:res.OverallBet,self.lastSetBetErrors=_handleErrors(res),$timeout(function(){self.lastSetBetErrors=null},200),self.syncTicket(res,skipBetZero),!self.lastSetBetErrors&&self.submitWaiting&&(self.submitWaiting=!1,self.submitTicket())},self.updateBetAmountOnChange=function(){var decimals,amount=(amount=$rootScope.tcConfig.fee.accepted?$rootScope.Ticket.OverallTotalBet:$rootScope.Ticket.OverallBet).toString().replace(",",".");","!==amount.slice(-1)&&"."!==amount.slice(-1)&&(floatAmount=parseFloat(amount),"JT"===$rootScope.Ticket.TYPE&&floatAmount>=$rootScope.Ticket.MinBet||"SRT"===$rootScope.Ticket.TYPE&&0<$rootScope.Ticket.OddsCombi.length&&floatAmount>=$rootScope.Ticket.MinBet)&&(floatAmount>$rootScope.Ticket.MaxBet&&"JT"===$rootScope.Ticket.TYPE?(self.updateBetAmount($rootScope.Ticket.MaxBet,!0,!0),self.maxBetErrorTimeout&&($timeout.cancel(self.maxBetErrorTimeout),self.maxBetErrorTimeout=!1),self.maxBetErrorTimeout=$timeout(function(){self.maxBetError=!1},3e3)):(decimals=!0,amount.match(/\d+\.\d/)&&(decimals=!amount.match(/\d+\.\d{2,}/)&&1),self.updateBetAmount(amount,decimals)))},self.updateBetAmountOnBlur=function(){self.updateBetAmount()},self.setFeeAcceptation=function(){$rootScope.localeStorageSet("feeAccepted",$rootScope.tcConfig.fee.accepted)},self.setRateAcceptation=function(type){$rootScope.Ticket.AllowedRateChangeDesc===type?$rootScope.tcConfig.ticket.acceptedRateChange[type.toLowerCase()]=!0:TicketService.changeRateAccept(type).then(function(res){res=res.data;if(_handleErrors(res))return!1;
1self.syncTicket(res),$cookies.put("SetTicketAcceptation",type)},function(err){console.error(err)})},self.preSubmitTicket=function(){$rootScope.Ticket.IsEdited?self.finishEditingTicket():$timeout(function(){var comparison=$rootScope.tcConfig.fee.accepted?$rootScope.Ticket.OverallTotalBet:$rootScope.Ticket.OverallBet;self.runningSetBet||comparison!=self.lastApprovedBet||self.lastSetBetErrors?self.lastSetBetErrors||(self.submitWaiting=!0):self.submitTicket()},0)},$scope.buybackOdd=function(odd){TicketService.oddBuyBack(odd.OddID).then(function(res){res=res.data;if(_handleErrors(res))return!1;self.syncTicket(res)},function(err){console.error(err)})},$scope.resetBuybackOdd=function(odd){TicketService.OddBuyBackReset(odd.OddID).then(function(res){res=res.data;if(_handleErrors(res))return!1;self.syncTicket(res)},function(err){console.error(err)})},$scope.toggleOddBuyback=function(odd){"BB"===odd.IsWinning?$scope.resetBuybackOdd(odd):$scope.buybackOdd(odd)},self.finishEditingTicket=function(){self.submitTicket()},self.submitTicket=function(){if($rootScope.ticketSyncing)return!1;$rootScope.ticketSyncing=!0;var Ticket=$rootScope.Ticket;Ticket.Bet;return Ticket.IsClientLoggedIn?0==Ticket.Bet?($rootScope.ticketSyncing=!1,$scope.addSingleError("ERR_NOSTAKE"),!1):(self.disableDelta(),$rootScope.Ticket.LiveBetDelayMs&&0<$rootScope.Ticket.LiveBetDelayMs&&$rootScope.showCircleProgress("#ticket-submit-circle",$rootScope.Ticket.LiveBetDelayMs),void TicketService.placeBet($rootScope.isWinCurrencyTicket).then(function(res){$rootScope.isWinCurrencyTicket=!1;res=res.data;if(res.Token&&($rootScope.TicketToken=res.Token),self.syncTicket(res),_handleErrors(res,!0))return null;var pointsForBet=res.PlacebetBonusPoints||0;switch("number"==typeof res.ClientBalance?uClientBalance(res.ClientBalance):uClientBalance(null),$rootScope.winCurrencyEnabled?"number"==typeof res.WinCurrencyClientBalance?uClientLoyalPoints(res.WinCurrencyClientBalance):uClientLoyalPoints(null):"number"==typeof res.BonusPoints?uClientLoyalPoints(res.BonusPoints):uClientLoyalPoints(null),self.clearTicket($scope.keepTicket?res.TicketCode:null),res.PlaceBetState){case"approved":$rootScope.Lang.Ticket.Submitted.replace("%s",pointsForBet);break;case"waiting_approval":$rootScope.Lang.Ticket.ticketWaitingAppr.replace("%s",pointsForBet)}GetTicketLastUserTicket(JSON.stringify(res))},function(err){console.error(err)}).finally(function(){$rootScope.ticketSyncing=!1,$rootScope.$broadcast("refresh_ticket_history",!0),$scope.$emit("load_approved_tickets",{force:!0})})):($rootScope.ticketSyncing=!1,$scope.addSingleError("ERR_NOCLIENT"),$rootScope.OpenLogoutInformation(),!1)},$scope.minBetMultipliers=[1,2,3,4,5,6,10,20,30,40,50,60,100,150,200,400,600,1e3,2e3,4e3,6e3,8e3,1e4,12e3,14e3,16e3,18e3,2e4,22e3,24e3],$scope.setLowerBet=function(){for(var amount=parseFloat($rootScope.tcConfig.fee.accepted?$rootScope.Ticket.OverallTotalBet:$rootScope.Ticket.OverallBet),i=0,newAmount=$rootScope.Ticket.MinBetOverall*$scope.minBetMultipliers[i],lastSafeAmount=newAmount;newAmount&&newAmount<amount;)(newAmount=$rootScope.Ticket.MinBetOverall*$scope.minBetMultipliers[++i])&&newAmount<amount&&(lastSafeAmount=newAmount);lastSafeAmount<amount&&($rootScope.tcConfig.fee.accepted?$rootScope.Ticket.OverallTotalBet=lastSafeAmount:$rootScope.Ticket.OverallBet=lastSafeAmount,self.updateBetAmountOnBlur())},$scope.setHigherBet=function(){for(var amount=parseFloat($rootScope.tcConfig.fee.accepted?$rootScope.Ticket.OverallTotalBet:$rootScope.Ticket.OverallBet),i=0,newAmount=$rootScope.Ticket.MinBetOverall*$scope.minBetMultipliers[i],lastSafeAmount=newAmount;newAmount&&newAmount<=amount;)(newAmount=$rootScope.Ticket.MinBetOverall*$scope.minBetMultipliers[++i])&&(lastSafeAmount=newAmount);amount<lastSafeAmount&&($rootScope.tcConfig.fee.accepted?$rootScope.Ticket.OverallTotalBet=lastSafeAmount:$rootScope.Ticket.OverallBet=lastSafeAmount,self.updateBetAmountOnBlur())},self.toggleFreebet=function(Freebet){var activeFreebet;Freebet.IsApplicable?(Freebet.IsActive||TicketService.deactivateFreebet().then(function(res){res=res.data;if(_handleErrors(res))return!1;self.syncTicket(res)},function(err){Freebet.IsActive=!0,console.error(err)}),(activeFreebet=_.find($rootScope.Ticket.FreeBets,{IsActive:!0}))&&(activeFreebet.IsActive=!1),Freebet.IsActive=!0,TicketService.activateFreebet(Freebet.FreebetID).then(function(res){res=res.data;if(self.lastApprovedBet=$rootScope.tcConfig.fee.accepted?res.OverallTotalBet:res.OverallBet,_handleErrors(res))return Freebet.IsActive=!1;self.syncTicket(res)},function(err){console.error(err),Freebet.IsActive=!1})):Freebet.IsActive=!1},self.deactivateFreebet=function(){var activeFreebet=_.find($rootScope.Ticket.FreeBets,{IsActive:!0});activeFreebet&&(activeFreebet.IsActive=!1,TicketService.deactivateFreebet().then(function(res){res=res.data;if(_handleErrors(res))return!1;self.syncTicket(res)},function(err){activeFreebet.IsActive=!0,console.error(err)}))},this.loadOffer=function(sportID){$rootScope.$broadcast("manual_offer_load",{sport:sportID})},$scope.addSingleError=function(errorCode,replaceValue){$scope.removeAllErrors(),$scope.addError(errorCode,replaceValue)},$scope.removeAllErrors=function(){$rootScope.Ticket.DisplayErrors=[],$rootScope.Ticket.Odds.forEach(function(ticketOdd){ticketOdd.HasError=!1})},$scope.addError=function(errorCode,replaceValue){newError={message:$rootScope.TicketErrors["newticket_"+errorCode].replace("%s",replaceValue=replaceValue||""),events:[]},_.findWhere($rootScope.Ticket.DisplayErrors,{message:newError.message})||$rootScope.Ticket.DisplayErrors.push(newError)},$scope.openEventURL=function(eventURL){"JT"===$rootScope.Ticket.TYPE&&$rootScope.openURL(eventURL)},Array.prototype.getUnique=function(){for(var u={},a=[],i=0,l=this.length;i<l;++i)u.hasOwnProperty(this[i])||(a.push(this[i]),u[this[i]]=1);return a},self.showFreebetInfo=function(id){ShowFreebetConditionsFromTicket(id,$rootScope.Ticket.Odds,$rootScope.Ticket.OverallRate)},$scope.$on("mark_odds",function(){}),$scope.addAndFixStoredTickets=function(ticketCode){try{localStorage.setItem("doxxbetsavedticketstest",JSON.stringify(_.uniq([].concat(JSON.parse(localStorage.getItem("doxxbetsavedticketstest"))||[],ticketCode))))}catch(ignored){localStorage.setItem("doxxbetsavedticketstest",JSON.stringify([ticketCode]))}$rootScope.$broadcast("refresh_stored_tickets")},$scope.storeTicket=function(){TicketService.storeTicket().then(function(res){$scope.addAndFixStoredTickets(res.data.TicketCode),options={interactive:!0,delay:0,theme:"labeled",content:$rootScope.L
1ang.Ticket.save_ticket_tooltip.replace("%s",'<span class="color-purple">').replace("%s","</span>"),contentAsHTML:!0,trigger:"custom"},$(".main__right").mCustomScrollbar("scrollTo","top",{scrollInertia:0}),$timeout(function(){$("#my-account-button").hasClass("tooltipstered")||($("#my-account-button").tooltipster(options),$("#my-account-button").tooltipster("show"),$timeout(function(){$("#my-account-button").tooltipster("destroy")},2e3,!1)),self.clearTicket()},100,!1)},function(err){console.error(err)}).finally(function(){})}}]),angular.module("ticket").filter("ticketError",function($rootScope,$filter){return function(error){var errorKey,errorValue,separatorsLength,evtName;return $rootScope.TicketErrors?(errorValue=errorKey="",1<(separatorsLength=error.split(":").length-1)&&(error=error.split(":"),evtName=$rootScope.getEventName($rootScope.Ticket.Odds,error[1]),error.splice(1,1),error=error.join(":"),separatorsLength--),errorKey=(error=error.split(":"))[0],(errorValue=error[1])&&!errorValue.match("#")&&"INACTIVE"!=errorKey?errorValue=errorValue.replace(";","").replace(",","."):errorKey=errorKey.replace(";",""),error=$rootScope.TicketErrors["newticket_"+errorKey],"INACTIVE"==errorKey?error+=" ("+$rootScope.getEventName($rootScope.Ticket.Odds,errorValue)+")":error&&error.match("%s")&&1==separatorsLength?(separatorsLength=errorValue,-1<["ERR_MINOVERALLBET","ERR_MINBET","ERR_DBMAXBET","ERR_DBMAXOKBET"].indexOf(errorKey)&&(separatorsLength=$filter("currency")(separatorsLength)),error=error.replace("%s",separatorsLength)):errorValue&&errorValue.match("#")?error+=" "+errorValue.replace("#",""):errorValue&&(evtName=$rootScope.getEventName($rootScope.Ticket.Odds,errorValue)),evtName&&(error+=" ("+evtName+")"),error||$rootScope.TicketErrors.newticket_ERR_COMMON):null}}).filter("showOddBuyback",function(){return function(odd){return"BB"===odd.IsWinning&&!odd.IsEditedEvaluated||odd.BuyBackValue&&-1<odd.BuyBackValue&&("BB"===odd.IsWinning||!odd.IsRemoveForbiden&&odd.BuyBackValue&&0<odd.BuyBackValue&&!odd.IsRemoveable)}}).filter("isOddAlreadyBoughtBack",function(){return function(odd){return"BB"===odd.IsWinning&&odd.IsEditedEvaluated}}),angular.module("ticket").service("TicketService",["$http","$rootScope","$sce",function($http,$rootScope,$sce){var baseURL=$rootScope.baseURL+"/ticket/",env=$rootScope.ENV.name;return parseNumberInput=function(val){return"string"==typeof val?val=val.length<1?0:val.replace(/,/g,"."):null==val&&(val=0),"NaN"===(val=parseFloat(val).toString())?"0":val},{loadTicket:function(){return"localhost"!==env?$http.post($sce.trustAsResourceUrl(baseURL+"LoadTicket"),{}):$http.get("data/ticket-init.json")},switchTicket:function(identity){return $http.post($sce.trustAsResourceUrl(baseURL+"SwitchTicket"),{identity:identity})},setLanguage:function(){return"localhost"!==env?$http.post($sce.trustAsResourceUrl(baseURL+"ChangeLanguage"),{}):$http.get("")},recreateTicket:function(){return"localhost"!==env?$http.post($sce.trustAsResourceUrl(baseURL+"ReCreateTicket"),{}):$http.get("")},refreshTicket:function(type){return"localhost"!==env?$http.post($sce.trustAsResourceUrl(baseURL+"RefreshTicket"),{}):$http.get("")},clearTicket:function(){return"localhost"!==env?$http.post($sce.trustAsResourceUrl(baseURL+"ClearTicket"),{}):$http.get("")},delta:function(){return"localhost"!==env?$http.post($sce.trustAsResourceUrl(baseURL+"DeltaTicket"),{}):$http.get("")},changeTicketType:function(type){return"localhost"!==env?$http.post($sce.trustAsResourceUrl(baseURL+"ChangeTicketType"),{ticketType:type}):$http.get("")},activateCombi:function(ID){return"localhost"!==env?$http.post($sce.trustAsResourceUrl(baseURL+"ActivateCombi"),{combiId:ID.toString()}):$http.get("")},deactivateCombi:function(ID){return"localhost"!==env?$http.post($sce.trustAsResourceUrl(baseURL+"DeactivateCombi"),{combiId:ID.toString()}):$http.get("")},addRemoveOdd:function(oddID){return"localhost"!==env?$http.post($sce.trustAsResourceUrl(baseURL+"AddRemoveOdd"),{oddId:oddID.toString()}):$http.get("")},addRemoveOdds:function(oddIDs){return"localhost"!==env?$http.post($sce.trustAsResourceUrl(baseURL+"AddRemoveOdds"),{oddsIds:oddIDs}):$http.get("")},removeOdds:function(oddIDs){return"localhost"!==env?$http.post($sce.trustAsResourceUrl(baseURL+"RemoveOdds"),{oddsIds:oddIDs}):$http.get("")},oddTag:function(IDs){return"localhost"!==env?$http.post($sce.trustAsResourceUrl(baseURL+"OddTag"),{oddIds:IDs}):$http.get("")},oddUntag:function(IDs){return"localhost"!==env?$http.post($sce.trustAsResourceUrl(baseURL+"OddUnTag"),{oddIds:IDs}):$http.get("")},oddTop:function(IDs){return"localhost"!==env?$http.post($sce.trustAsResourceUrl(baseURL+"OddTop"),{oddIds:IDs}):$http.get("")},oddUnTop:function(IDs){return"localhost"!==env?$http.post($sce.trustAsResourceUrl(baseURL+"OddUnTop"),{oddIds:IDs}):$http.get("")},activateFreebet:function(freebetId){return"localhost"!==env?$http.post($sce.trustAsResourceUrl(baseURL+"ActivateFreebet"),{freebetClientId:freebetId.toString()}):$http.get("")},deactivateFreebet:function(){return"localhost"!==env?$http.post($sce.trustAsResourceUrl(baseURL+"DeactivateFreebet"),{}):$http.get("")},activateBonification:function(bonificationId){return"localhost"!==env?$http.post($sce.trustAsResourceUrl(baseURL+"SetBonification"),{bonificationId:bonificationId.toString()}):$http.get("")},deactivateBonification:function(bonificationId){return"localhost"!==env?$http.post($sce.trustAsResourceUrl(baseURL+"RemoveBonification"),{bonificationId:bonificationId.toString()}):$http.get("")},changeRateAccept:function(acceptType){return"localhost"!==env?$http.post($sce.trustAsResourceUrl(baseURL+"AcceptRateChange"),{change:acceptType.toUpperCase()}):$http.get("")},setBetAmount:function(bet){return"localhost"!==env?(bet=parseNumberInput(bet),$http.post($sce.trustAsResourceUrl(baseURL+"SetTotalBet"),{amount:bet})):$http.get("data/ticket-init.json")},placeBet:function(isFundedWithWin){return"localhost"!==env?$http.post($sce.trustAsResourceUrl(baseURL+"PlaceBet"+(isFundedWithWin?"Win":"")),{},{headers:{RequestVerificationToken:$rootScope.TicketToken}}):$http.get("")},restoreTicket:function(code){return"localhost"!==env?$http.post($sce.trustAsResourceUrl(baseURL+"RestoreTicket"),{ticketCode:code}):$http.get("data/ticket-init.json")},storeTicket:function(){return"localhost"!==env?$http.post($sce.trustAsResourceUrl(baseURL+"StoreTicket"),{}):$http.get("data/ticketsingle.json")},changeCombiBet:function(bet,combiID,isParcial){return"localhost"!==env?$http.post($sce.trustAsResourceUrl(baseURL+"SetCombinationStake"),{combinationStake:parseNumberInput(bet),isTotal:!1,combinationId:combiID,isParcial:isPar
1cial}):$http.get("data/ticket-init.json")},changeSpellBet:function(bet,spell){return"localhost"!==env?$http.post($sce.trustAsResourceUrl(baseURL+"SetSpellStake"),{spellStake:parseNumberInput(bet),isTotal:!1,spell:spell}):$http.get("data/ticket-init.json")},unpinCombi:function(id,spell){return"localhost"!==env?$http.post($sce.trustAsResourceUrl(baseURL+"UnpinCombination"),{combinationId:id||"all",spell:spell||"all"}):$http.get("data/ticket-init.json")},oddBuyBack:function(oddId){return"localhost"!==env?$http.post($sce.trustAsResourceUrl(baseURL+"OddBuyBack"),{oddId:oddId}):$http.get("data/ticket-init.json")},OddBuyBackReset:function(oddId){return"localhost"!==env?$http.post($sce.trustAsResourceUrl(baseURL+"OddBuyBackReset"),{oddId:oddId}):$http.get("data/ticket-init.json")},resetTicket:function(){return"localhost"!==env?$http.post($sce.trustAsResourceUrl(baseURL+"ResetTicket")):$http.get("data/ticket-init.json")},changeTicketSubscription:function(subscribe,ticketCode){return $http.post($sce.trustAsResourceUrl(baseURL+"TicketSubscription"),{ticketCode:ticketCode,operation:subscribe?"ADD":"REM"})},startTicketEdit:function(ticketCode){return $http.post($sce.trustAsResourceUrl(baseURL+"EditTicket"),{ticketCode:ticketCode})}}}]),angular.module("virtual",[]),angular.module("virtual").controller("VirtualController",["$scope","$rootScope","$timeout","$sce","$routeParams","routeName","VirtualService",function($scope,$rootScope,$timeout,$sce,$routeParams,routeName,VirtualService){$scope.currentViews=[],$scope.eventChanceTypes={},$scope.onScrollLiveVirtual=function(){$scope.isLive&&(200<document.getElementById("sportbook-main-container").scrollTop?$rootScope.ticketVirtualIframe||$timeout(function(){$rootScope.ticketVirtualIframe=$scope.virtualFrame}):$timeout(function(){$rootScope.ticketVirtualIframe=null}))},$scope.$on("$routeChangeSuccess",function(event,currentRoute,previousRoute){$rootScope.keepAlive(),$rootScope.$broadcast("virtual_ticket"),$scope.virtualFrame=null,$scope.virtualHeight=0,$scope.virtualWidth=0,$scope.virtualContainerHeight=500,$rootScope.virtualDescView=!0,$scope.openFirst=!($rootScope.showDescriptionView=!0),$scope.hasMasterCht=!1,$scope.localizedTips={},$scope.sports=[];var params={live:!($scope.openedEventsIDs=[]),date:!1};$routeParams.sport&&(params.sport=$routeParams.sport),$routeParams.region&&(params.region=$routeParams.region),$routeParams.event&&($rootScope.eventIDToOpen=parseInt($routeParams.event)),console.log("eventid",$rootScope.eventIDToOpen),params.streamOnly=!1,$rootScope.activateMenu("VirtualGames"),$scope.currentParams={},$rootScope.$broadcast("load_sidebar",{type:"virtual",params:params,routeName:routeName}),$rootScope.removeInvalidSearch([])}),$scope.$on("load_offer",function(event,params){$scope.currentParams=params,1239===$scope.currentParams.sport?$scope.virtualMarkets=!0:$scope.virtualMarkets=!1,$scope.getOffer()}),$rootScope.$on("ticket_loaded",function(){$rootScope.$broadcast("virtual_ticket")}),$scope.$on("request_ticket_identity_change",function(){$rootScope.$broadcast("virtual_ticket")}),$scope.$on("$destroy",function(){$rootScope.showDescriptionView=!1,$rootScope.virtualDescView=!1,$scope.sports=[],$scope.openedEventsIDs=[],$scope.$emit("signalr_changeView",{newViews:[],oldViews:$scope.currentViews}),$scope.currentViews=[],$rootScope.ticketVirtualIframe=null,$scope.getOfferTimeout&&$timeout.cancel($scope.getOfferTimeout),$scope.virtualOnScrollActive&&($("#sportbook-main-container").off("scroll",$scope.onScrollLiveVirtual),$scope.virtualOnScrollActive=!1)}),$scope.$on("load_events",function(event,data){$scope.currentParams.top=!0,$scope.getOffer()}),$scope.updateOfferThrottled=_.throttle(function(){$scope.getOffer(!0)},3e3,{leading:!1,trailing:!0}),$scope.getOffer=function(justUpdate){$scope.getOfferTimeout&&$timeout.cancel($scope.getOfferTimeout),$scope.getOfferTimeout=null,$scope.getOfferTimeout=$timeout(function(){$scope.loadOffer(justUpdate)})},$scope.loadOffer=function(justUpdate){justUpdate||($scope.openedEventsIDs=[],$scope.odds={},$scope.events={}
1),VirtualService.getOffer($scope.currentParams,$scope.virtualMarkets).then(function(res){$rootScope.setPageTitle($routeParams.sport+"/"+$routeParams.region,!1,!1,!1,"default-virtual-games"),$timeout(function(){$rootScope.showApp()},0,!1);var newLeagues,toDeleteLeagues,toAddLeagues,response=res.data,loadedSports=($scope.localizedTips=response.LocalizedTips,[]),lastSport=null,lastLeague=null,sportIndex=-1,leagueIndex=-1,lastLeagueDate=null,leagueDateIndex=-1;switch($scope.showMasterCht={1:!1,X:!1,2:!1,"1X":!1,X2:!1,12:!1},$scope.virtualHeight=355,$scope.competitorsName="",$scope.openFirst=!1,$scope.hasMasterCht=!1,$scope.betxGame=!1,$scope.competitorDetail=!1,$scope.showCompetitorImg=!1,$scope.virtualFrame=null,$scope.virtualFrameBig=null,$scope.virtualVideo=null,response.EventChanceTypes[0].RegionID){case 2672:606998===response.EventChanceTypes[0].LeagueCupID&&($scope.virtualVideo=$sce.trustAsResourceUrl("https://st3.net4media.net:8082/Hockey-HLS/345/playlist.m3u8"),$scope.virtualHeight=450,$scope.competitorsName="",$scope.openFirst=!0,$scope.hasMasterCht=!1,$scope.betxGame=!1,$scope.competitorDetail=!1,$scope.showCompetitorImg=!0);break;case 1235:switch(response.EventChanceTypes[0].LeagueCupID){case 607002:$scope.virtualFrame=$sce.trustAsResourceUrl("https://iframe.net4media.net/streams/0199dd30-7efc-710a-af63-98a449708d53"),$scope.virtualFrameBig=$sce.trustAsResourceUrl("https://iframe.net4media.net/streams/0199dd30-7efc-710a-af63-98a449708d53"),$scope.virtualHeight=590,$scope.competitorsName="",$scope.openFirst=!0,$scope.hasMasterCht=!1,$scope.betxGame=!1,$scope.competitorDetail=!1,$scope.showCompetitorImg=!0;break;case 600205:case 600243:$scope.virtualHeight=355,$scope.competitorsName="",$scope.openFirst=!1,$scope.hasMasterCht=!1,$scope.betxGame=!0,$scope.competitorDetail=!1,$scope.showCompetitorImg=!1;break;case 602578:$scope.virtualFrame=$sce.trustAsResourceUrl("https://vdrlive.aitcloud.de/vdr/vdr/index/clientid:2003/lang:"+$rootScope.LanguageID+"/style:doxxbdef"),$scope.virtualFrameBig=$sce.trustAsResourceUrl("https://vdrlive.aitcloud.de/vdr/vdr/index/clientid:2003/lang:"+$rootScope.LanguageID+"/style:doxxbdef"),$scope.virtualHeight=370,$scope.competitorsName="",$scope.openFirst=!0,$scope.hasMasterCht=!1,$scope.betxGame=!1,$scope.competitorDetail=!0,$scope.showCompetitorImg=!0;break;case 590539:$scope.virtualFrame=$sce.trustAsResourceUrl("https://vdrlive.aitcloud.de/vdr/vdr/index/clientid:2003/lang:"+$rootScope.LanguageID+"/style:doxxbdef"),$scope.virtualFrameBig=$sce.trustAsResourceUrl("https://vdrlive.aitcloud.de/vdr/vdr/index/clientid:2003/lang:"+$rootScope.LanguageID+"/style:doxxbdef"),$scope.virtualHeight=370,$scope.virtualName="vdr_iframe",$scope.competitorsName=$rootScope.Lang.App.dog,$scope.openFirst=!0,$scope.hasMasterCht=!1,$scope.competitorDetail=!0,$scope.showCompetitorImg=!0,$scope.setDateFromEvent=!0}break;case 1236:switch(response.EventChanceTypes[0].LeagueCupID){case 607003:$scope.virtualFrame=$sce.trustAsResourceUrl("https://iframe.net4media.net/streams/0199dd32-c564-705d-b5a2-356445049d1d"),$scope.virtualFrameBig=$sce.trustAsResourceUrl("https://iframe.net4media.net/streams/0199dd32-c564-705d-b5a2-356445049d1d"),$scope.virtualHeight=590,$scope.virtualName="vhc_iframe",$scope.openFirst=!1,$scope.hasMasterCht=!0,$scope.competitorDetail=!1,$scope.showCompetitorImg=!0,$scope.setDateFromEvent=!1;break;case 600206:$scope.virtualHeight=355,$scope.competitorsName="",$scope.openFirst=!1,$scope.hasMasterCht=!1,$scope.betxGame=!0,$scope.competitorDetail=!1,$scope.showCompetitorImg=!1;break;case 590540:$scope.virtualFrame=$sce.trustAsResourceUrl("https://vhc20live.aitcloud.de/vhc/vhc/index/clientid:2003/lang:"+$rootScope.LanguageID+"/style:doxxbdef"),$scope.virtualFrameBig=$sce.trustAsResourceUrl("https://vhc20live.aitcloud.de/vhc/vhc/index/clientid:2003/lang:"+$rootScope.LanguageID+"/style:doxxbdef"),$scope.virtualHeight=370,$scope.virtualName="vhc_iframe",$scope.competitorsName=$rootScope.Lang.App.horse,$scope.openFirst=!0,$scope.hasMasterCht=!1,$scope.competitorDetail=!0,$scope.showCompetitorImg=!0,$scope.setDateFromEvent=!0;break;case 602577:$scope.virtualFrame=$sce.trustAsResourceUrl("https://vhc20live.aitcloud.de/vhc/vhc/index/clientid:2003/lang:"+$rootScope.L
1anguageID+"/style:doxxbdef"),$scope.virtualFrameBig=$sce.trustAsResourceUrl("https://vhc20live.aitcloud.de/vhc/vhc/index/clientid:2003/lang:"+$rootScope.LanguageID+"/style:doxxbdef"),$scope.virtualHeight=370,$scope.virtualName="vhc_iframe",$scope.competitorsName=$rootScope.Lang.App.horse,$scope.openFirst=!0,$scope.hasMasterCht=!1,$scope.competitorDetail=!0,$scope.showCompetitorImg=!0,$scope.setDateFromEvent=!1}break;case 1237:switch(response.EventChanceTypes[0].LeagueCupID){case 590541:case 590542:$scope.virtualFrame=$sce.trustAsResourceUrl($rootScope.ENV.siteURL+"vtodxb/vto/index/clientid:2003/lang:"+$rootScope.LanguageID),$scope.virtualFrameBig=$sce.trustAsResourceUrl($rootScope.ENV.siteURL+"vtodxb/vto/terminal/clientid:2003/lang:"+$rootScope.LanguageID),$scope.virtualHeight=413,$scope.virtualName="vto_iframe",$scope.competitorsName="",$scope.openFirst=!1,$scope.hasMasterCht=!0,$scope.competitorDetail=!1,$scope.showCompetitorImg=!1;break;case 598830:$scope.virtualFrame=$sce.trustAsResourceUrl("https://vtilive.aitcloud.de/vti/vti/index?clientid=2003&style=doxxbdef&pathprefix=off&lang="+$rootScope.LanguageID),$scope.virtualFrameBig=$sce.trustAsResourceUrl("https://vtilive.aitcloud.de/vti/vti/index?clientid=2003&style=doxxbdef&pathprefix=off&lang="+$rootScope.LanguageID),$scope.virtualHeight=340,$scope.virtualName="vti_iframe",$scope.competitorsName="",$scope.openFirst=!1,$scope.hasMasterCht=!0,$scope.competitorDetail=!1,$scope.showCompetitorImg=!1,$scope.dynamicMarkets=!0,$scope.isLive=!0}break;case 1238:$scope.virtualFrame=$sce.trustAsResourceUrl("https://vbllive.aitcloud.de/vbl/vbl/index?clientid=2003&style=doxxbdef&lang="+$rootScope.LanguageID),$scope.virtualFrameBig=$sce.trustAsResourceUrl($rootScope.ENV.siteURL+"https://vbllive.aitcloud.de/vbl/vbl/index?clientid=2003&style=doxxbdef&lang="+$rootScope.LanguageID),$scope.virtualHeight=665,$scope.virtualName="vbl_iframe",$scope.competitorsName="",$scope.openFirst=!1,$scope.hasMasterCht=!0,$scope.competitorDetail=!1,$scope.showCompetitorImg=!1;break;case 1239:switch(response.EventChanceTypes[0].LeagueCupID){case 607007:$scope.virtualFrame=$sce.trustAsResourceUrl("https://iframe.net4media.net/streams/0199dd34-3908-732a-9f8d-fb53e5f86ba1"),$scope.virtualFrameBig=$sce.trustAsResourceUrl("https://iframe.net4media.net/streams/0199dd34-3908-732a-9f8d-fb53e5f86ba1"),$scope.virtualHeight=590,$scope.virtualName="vflive",$scope.competitorsName="",$scope.openFirst=!1,$scope.hasMasterCht=!1,$scope.competitorDetail=!1,$scope.showCompetitorImg=!1;break;case 607008:$scope.virtualFrame=$sce.trustAsResourceUrl("https://iframe.net4media.net/streams/0199dd34-bf2c-7322-9b6a-664e5442486f"),$scope.virtualFrameBig=$sce.trustAsResourceUrl("https://iframe.net4media.net/streams/0199dd34-bf2c-7322-9b6a-664e5442486f"),$scope.virtualHeight=590,$scope.virtualName="vflive",$scope.competitorsName="",$scope.openFirst=!1,$scope.hasMasterCht=!1,$scope.competitorDetail=!1,$scope.showCompetitorImg=!1;break;case 607009:$scope.virtualFrame=$sce.trustAsResourceUrl("https://iframe.net4media.net/streams/0199dd09-75bc-72f0-9d07-4dd077efec97"),$scope.virtualFrameBig=$sce.trustAsResourceUrl("https://iframe.net4media.net/streams/0199dd09-75bc-72f0-9d07-4dd077efec97"),$scope.virtualHeight=590,$scope.virtualName="vflive",$scope.competitorsName="",$scope.openFirst=!1,$scope.hasMasterCht=!1,$scope.competitorDetail=!1,$scope.showCompetitorImg=!1;break;case 629326:case 610559:$scope.virtualFrame=$sce.trustAsResourceUrl("https://vflive.aitcloud.de/vflm/vflm/index?clientid=2003&lang=sk&style=doxxbdef"),$scope.virtualFrameBig=$sce.trustAsResourceUrl("https://vflive.aitcloud.de/vflm/vflm/index?clientid=2003&lang=sk&style=doxxbdef"),$scope.virtualHeight=590,$scope.virtualName="vflive",$scope.competitorsName="",$scope.openFirst=!1,$scope.hasMasterCht=!1,$scope.competitorDetail=!1,$scope.showCompetitorImg=!1;break;case 607010:$scope.virtualFrame=$sce.trustAsResourceUrl("https://iframe.net4media.net/streams/0199dd0a-cbfc-72d2-9c2b-b6e5a8f8cc03"),$scope.virtualFrameBig=$sce.trustAsResourceUrl("https://iframe.net4media.net/streams/0199dd0a-cbfc-72d2-9c2b-b6e5a8f8cc03"),$scope.virtualHeight=590,$scope.virtualName="villive",$scope.competitorsName="",$scope.openFirst=!1,$scope.hasMasterCht=!1,$scope.competitorDetail=!1,$scope.showCompetitorImg=!1;break;case 590544:$scope.virtualFrame=$sce.trustAsResourceUrl($rootScope.ENV.siteURL+"vfl30dxb/vleague.php?clientid=2003&lang="+$rootScope.L
1anguageID),$scope.virtualFrameBig=$sce.trustAsResourceUrl($rootScope.ENV.siteURL+"vfl30shopdxb/vleague_entertainment.php?clientid=2003&lang="+$rootScope.LanguageID),$scope.virtualHeight=520,$scope.virtualName="vf_iframe",$scope.competitorsName="",$scope.openFirst=!1,$scope.hasMasterCht=!1,$scope.competitorDetail=!1,$scope.showCompetitorImg=!1;break;case 600322:$scope.virtualFrame=$sce.trustAsResourceUrl("https://vflive.aitcloud.de/vflm/vflm/index?clientid=2003&style=doxxbdef&lang="+$rootScope.LanguageID),$scope.virtualFrameBig=$sce.trustAsResourceUrl("https://vflive.aitcloud.de/vflm/vflm/index?clientid=2003&style=doxxbdef&lang="+$rootScope.LanguageID),$scope.virtualHeight=620,$scope.virtualName="vflm_iframe",$scope.competitorsName="",$scope.openFirst=!1,$scope.hasMasterCht=!1,$scope.competitorDetail=!1,$scope.showCompetitorImg=!1;break;case 602075:case 602502:$scope.virtualFrame=$sce.trustAsResourceUrl("https://vflive.aitcloud.de/vfcc/vfcc/index?clientid=2003&style=doxxbdef&lang="+$rootScope.LanguageID),$scope.virtualFrameBig=$sce.trustAsResourceUrl("https://vflive.aitcloud.de/vfcc/vfcc/index?clientid=2003&style=doxxbdef&lang="+$rootScope.LanguageID),$scope.virtualHeight=580,$scope.virtualName="vfcc_iframe",$scope.competitorsName="",$scope.openFirst=!1,$scope.hasMasterCht=!1,$scope.competitorDetail=!1,$scope.showCompetitorImg=!1;break;case 597794:case 602501:$scope.virtualFrame=$sce.trustAsResourceUrl("https://vflive.aitcloud.de/vfwc/vfwc/index?clientid=2003&style=doxxbdef&lang="+$rootScope.LanguageID),$scope.virtualFrameBig=$sce.trustAsResourceUrl($rootScope.ENV.siteURL+"https://vflive.aitcloud.de/vfwc/vfwc/index?clientid=2003&style=doxxbdef&lang="+$rootScope.LanguageID),$scope.virtualHeight=571,$scope.virtualName="vfwc_iframe",$scope.competitorsName="",$scope.openFirst=!1,$scope.hasMasterCht=!1,$scope.competitorDetail=!1,$scope.showCompetitorImg=!1;break;case 602500:$scope.virtualFrame=$sce.trustAsResourceUrl("https://vflive-vs001.akamaized.net/vfb/desktop/index?clientid=2003&style=doxxbdef&layout=Vfb1&lang="+$rootScope.LanguageID),$scope.virtualFrameBig=$sce.trustAsResourceUrl("https://vflive-vs001.akamaized.net/vfb/desktop/index?clientid=2003&style=doxxbdef&layout=Vfb1&lang="+$rootScope.LanguageID),$scope.virtualHeight=620,$scope.virtualName="vflm_iframe",$scope.competitorsName="",$scope.openFirst=!1,$scope.hasMasterCht=!1,$scope.competitorDetail=!1,$scope.showCompetitorImg=!1;break;case 602501:$scope.virtualFrame=$sce.trustAsResourceUrl($rootScope.ENV.siteURL+"vfwcdxb/vfwc/index?clientid=2003&lang="+$rootScope.LanguageID),$scope.virtualFrameBig=$sce.trustAsResourceUrl($rootScope.ENV.siteURL+"vfwcdxb/vfwc/index?clientid=2003&lang="+$rootScope.LanguageID),$scope.virtualHeight=571,$scope.virtualName="vfwc_iframe",$scope.competitorsName="",$scope.openFirst=!1,$scope.hasMasterCht=!1,$scope.competitorDetail=!1,$scope.showCompetitorImg=!1}break;case 2139:$scope.virtualHeight=355,$scope.competitorsName="",$scope.openFirst=!1,$scope.hasMasterCht=!1,$scope.betxGame=!0,$scope.competitorDetail=!1,$scope.showCompetitorImg=!1}$scope.virtualWidth=777,$scope.virtualContainerHeight=$scope.virtualHeight,response.EventChanceTypes.forEach(function(event){$scope.virtualMarkets&&"vg3way"!==event.ChanceTypeID&&"uf:1"!==event.ChanceTypeID||(event.RegionID!=lastSport&&(loadedSports.push({ID:event.RegionID,opened:!0,leagues:[],competitorsName:$scope.competitorsName,name:response.Labels["RE_"+event.RegionID].Name}),lastSport=event.RegionID,sportIndex++,leagueIndex=-1),event.LeagueCupID!=lastLeague&&(loadedSports[sportIndex].leagues.push({ID:event.LeagueCupID,opened:!0,events:[],dates:[],name:response.Labels["LC_"+event.LeagueCupID].Name}),lastLeague=event.LeagueCupID,leagueIndex++),event=$scope.refactorEvent(event,$scope.hasMasterCht||$scope.virtualMarkets?response.Odds:null,$scope.virtualMarkets?_.where(response.EventChanceTypes,{EventID:event.EventID}):null,response.Labels),$scope.events[event.ID]?event.locked&&$scope.lockEvent($scope.events[event.ID]):$scope.events[event.ID]=event,loadedSports[sportIndex].leagues[leagueIndex].events.push($scope.events[event.ID]),(leagueDateIndex<0||lastLeagueDate!==event.dateStr)&&(loadedSports[sportIndex].leagues[leagueIndex].dates.push({dateStr:event.dateStr,events:[],sampleMarkets:[],tournamentPhase:(response.Labels["PH_"+event.tournamentPhaseID]||{Name:null}).Name}),leagueDateIndex++,lastLeagueDate=event.dateStr),loadedSports[sportIndex].leagues[leagueIndex].dates[leagueDateIndex].events.push(event),$scope.virtualMarkets&&!loadedSports[sportIndex].leagues[leagueIndex].dates[leagueDateIndex].sampleMarkets.length<event.markets.length&&(loadedSports[sportIndex].leagues[leagueIndex].dates[leagueDateIndex].sampleMarkets=event.markets),$scope.setDateFromEvent&&(loadedSports[sportIndex].leagues[leagueIndex].dates[leagueDateIndex].name=loadedSports[sportIndex].leagues[leagueIndex].dates[leagueDateIndex].dateStr+" - "+$rootScope.L
1ang.App.virtual_season+" "+event.name.match(/\d+ - \d+/)[0].replace(" - ","/")+". "+$rootScope.Lang.App.virtual_round))}),justUpdate?(res=_.pluck($scope.sports[0].leagues,"ID"),newLeagues=_.pluck(loadedSports[0].leagues,"ID"),_.intersection(res,newLeagues).length!==res.length&&((toDeleteLeagues=_.difference(res,newleagues))&&0<toDeleteLeagues.length&&($scope.sports[0].leagues=_.reject($scope.sports[0].leagues,function(League){return _.contains(toDeleteLeagues,League.ID)})),toAddLeagues=_.difference(newleagues,res),loadedSports[0].leagues.forEach(function(addLeague,addIndex){_.contains(toAddLeagues,addLeague.ID)&&$scope.sports[0].leagues.push(addLeague)})),loadedSports.forEach(function(loadedSport){loadedSport.leagues.forEach(function(loadedLeague){var originalEventIDs,newEventIDs,toDeleteEvents,toAddEvents,originalIndex=_.findIndex($scope.sports[0].leagues,{ID:loadedLeague.ID});-1!==originalIndex&&(originalEventIDs=_.pluck($scope.sports[0].leagues[originalIndex].events,"ID"),newEventIDs=_.pluck(loadedLeague.events,"ID"),_.intersection(originalEventIDs,newEventIDs).length!==originalEventIDs.length)&&((toDeleteEvents=_.difference(originalEventIDs,newEventIDs))&&0<toDeleteEvents.length&&($scope.sports[0].leagues[originalIndex].events=_.reject($scope.sports[0].leagues[originalIndex].events,function(Event){return _.contains(toDeleteEvents,Event.ID)})),toAddEvents=_.difference(newEventIDs,originalEventIDs),loadedLeague.events.forEach(function(addEvent,addIndex){var foundDate;_.contains(toAddEvents,addEvent.ID)&&($scope.sports[0].leagues[originalIndex].events.push(addEvent),(foundDate=_.findWhere($scope.sports[0].leagues[originalIndex].dates,{dateStr:addEvent.dateStr}))?(foundDate.events.push(addEvent),$scope.virtualMarkets&&!foundDate.sampleMarkets.length<addEvent.markets.length&&(foundDate.sampleMarkets=addEvent.markets)):(fou
1ndDate={dateStr:addEvent.dateStr,events:[]},(foundDate=$scope.setDateFromEvent?addEvent.dateStr+" - "+$rootScope.Lang.App.virtual_season+" "+addEvent.name.match(/\d+ - \d+/)[0].replace(" - ","/")+". "+$rootScope.Lang.App.virtual_round:foundDate).events.push(addEvent),foundDate.sampleMarkets=addEvent.markets,$scope.sports[0].leagues[originalIndex].dates.push(foundDate)))}))})})):($scope.sports=loadedSports,$rootScope.eventIDToOpen&&$scope.events[$rootScope.eventIDToOpen]?($scope.toggleDetail($scope.events[$rootScope.eventIDToOpen]),$rootScope.eventIDToOpen=null):$scope.openFirstAvailableEvent()),$scope.changeClientView($scope.currentParams.sport,$scope.currentParams.region,$scope.openedEventsIDs),$scope.sports[0].leagues[0].events=_.sortBy($scope.sports[0].leagues[0].events,"originalDate"),$scope.requestOddsBroadcast()}).finally(function(){$scope.isLive&&!$scope.virtualOnScrollActive?($("#sportbook-main-container").on("scroll",$scope.onScrollLiveVirtual),$scope.virtualOnScrollActive=!0):$scope.virtualOnScrollActive&&!$scope.isLive&&($("#sportbook-main-container").off("scroll",$scope.onScrollLiveVirtual),$scope.virtualOnScrollActive=!1)})},$scope.refactorEvent=function(event,odds,chanceTypes,labels){var validCount,marketIndex,retEvent={name:event.EventName,teams:event.EventName.split(" vs. "),ID:event.EventID,sportID:event.RegionID,leagueID:event.LeagueCupID,running:!1,opened:!1,eventChanceTypes:[],competitors:[],hide:!1,liveBettingView:event.LiveBettingView,locked:!1,originalDate:event.EventDate,showCompetitorImg:1235===event.RegionID||1236===event.RegionID,dateStr:moment(event.EventDate).format("HH:mm"),markets:[],marketIDs:[],liveFeedReference:event.LiveFeedReference,tournamentPhaseID:event.TournamentPhaseID,prematchEventID:event.PrematchEventID};return $scope.isLive&&(retEvent.score=$rootScope.parseScores(event.Score)),"notstarted"!==event.ActualGamePartID&&"inprogr"!==event.ActualGamePartID?(retEvent.displayedTime=$rootScope.GameParts[event.ActualGamePartID].Name,"ended"!==event.ActualGamePartID&&(retEvent.running=!0),$scope.isLive||(retEvent.locked=!0,$timeout(function(){retEvent.hide=!0},5e3))):retEvent.displayedTime=moment(event.EventDate).format("H:mm"),$scope.hasMasterCht?(retEvent.eventChanceType={ID:event.EventChanceTypeID,name:event.ChanceTypeName,odds:[],chanceTypeID:event.ChanceTypeID,oldStatus:event.EventChanceTypeStatus,newStatus:event.EventChanceTypeStatus},retEvent.eventChanceType.visibility=$rootScope.getEctVisibility("other",retEvent.eventChanceType.oldStatus,retEvent.eventChanceType.newStatus,!1),retEvent.eventChanceType.visibility.locked=retEvent.eventChanceType.visibility.visibility<$rootScope.visibility.SHOW,retEvent.eventChanceType.visibility.hidden=retEvent.eventChanceType.visibility.visibility<$rootScope.visibility.LOCK,retEvent.odds={1:{ID:0,rate:0},X:{ID:0,rate:0},2:{ID:0,rate:0},"1X":{ID:0,rate:0},X2:{ID:0,rate:0},12:{ID:0,rate:0}},validCount=0,odds[event.EventChanceTypeID+"_1"]&&(validCount++,$scope.showMasterCht[1]=!0,retEvent.odds[1]=$scope.refactorOdd(odds[event.EventChanceTypeID+"_1"],labels,event.EventID)),odds[event.EventChanceTypeID+"_X"]&&(validCount++,$scope.showMasterCht.X=!0,retEvent.odds.X=$scope.refactorOdd(odds[event.EventChanceTypeID+"_X"],labels,event.EventID)),odds[event.EventChanceTypeID+"_2"]&&(validCount++,$scope.showMasterCht[2]=!0,retEvent.odds[2]=$scope.refactorOdd(odds[event.EventChanceTypeID+"_2"],labels,event.EventID)),odds[event.EventChanceTypeID+"_1X"]&&(validCount++,$scope.showMasterCht["1X"]=!0,retEvent.odds["1X"]=$scope.refactorOdd(odds[event.EventChanceTypeID+"_1X"],labels,event.EventID)),odds[event.EventChanceTypeID+"_X2"]&&(validCount++,$scope.showMasterCht.X2=!0,retEvent.odds.X2=$scope.refactorOdd(odds[event.EventChanceTypeID+"_X2"],labels,event.EventID)),odds[event.EventChanceTypeID+"_12"]&&(validCount++,$scope.showMasterCht[12]=!0,retEvent.odds[12]=$scope.refactorOdd(odds[event.EventChanceTypeID+"_12"],labels,event.EventID)),retEvent.eventChanceType.columnCount=2===validCount||4===validCount?2:3):$scope.virtualMarkets&&(retEvent.odds={},retEvent.markets=[{title:"",eventChanceType:null,odds:[{ID:0,rate:0},{ID:0,rate:0},{ID:0,rate:0}],shownOdds:[]},{title:"",eventChanceType:null,odds:[{ID:0,rate:0},{ID:0,rate:0},{ID:0,rate:0}],shownOdds:[]},{title:"",eventChanceType:null,odds:[{ID:0,rate:0},{ID:0,rate:0},{ID:0,rate:0}],shownOdds:[]}
1],marketIndex=-1,chanceTypes.forEach(function(chanceType){marketIndex++,retEvent.markets[marketIndex].odds=[],retEvent.markets[marketIndex].eventChanceType={ID:chanceType.EventChanceTypeID,name:chanceType.ChanceTypeName,odds:[],chanceTypeID:chanceType.ChanceTypeID,oldStatus:chanceType.EventChanceTypeStatus,newStatus:chanceType.EventChanceTypeStatus};var oddIndex=-1;["1","X","2"].forEach(function(mark){var odd=odds[chanceType.EventChanceTypeID+"_"+mark];odd&&(oddIndex++,retEvent.odds[chanceType.ChanceTypeID+"_"+mark]=$scope.refactorOdd(odd,labels,event.EventID),$scope.odds[retEvent.odds[chanceType.ChanceTypeID+"_"+mark].ID]?retEvent.odds[chanceType.ChanceTypeID+"_"+mark]=$scope.odds[retEvent.odds[chanceType.ChanceTypeID+"_"+mark].ID]:$scope.odds[retEvent.odds[chanceType.ChanceTypeID+"_"+mark].ID]=retEvent.odds[chanceType.ChanceTypeID+"_"+mark],retEvent.markets[marketIndex].odds[oddIndex]=retEvent.odds[chanceType.ChanceTypeID+"_"+mark],retEvent.markets[marketIndex].eventChanceType.odds.push(retEvent.odds[chanceType.ChanceTypeID+"_"+mark]),retEvent.markets[marketIndex].shownOdds.push(labels["TP_"+odd.TipID].Name),retEvent.markets[marketIndex].title=chanceType.ChanceTypeName)})})),retEvent},$scope.refactorOdd=function(odd,labels,eventID,isLockedEvent){return $scope.odds[odd.OddsID]||($scope.odds[odd.OddsID]={ID:odd.OddsID,name:labels["TP_"+odd.TipID].Name||"",chanceTypeID:odd.EventChanceTypeID,rate:odd.OddsRate,oldStatus:odd.Status||"active",newStatus:odd.Status||"active",paramLimitMark:odd.ParamLimitMark,eventID:eventID},$scope.odds[odd.OddsID].visibility=$rootScope.getOddVisibility($scope.openedGroup&&$scope.openedGroup.ID?$scope.openedGroup.ID:"other",$scope.odds[odd.OddsID].oldStatus,$scope.odds[odd.OddsID].newStatus,!1),$scope.odds[odd.OddsID].locked=$scope.odds[odd.OddsID].visibility<$rootScope.visibility.SHOW,$scope.odds[odd.OddsID].hidden=$scope.odds[odd.OddsID].visibility<$rootScope.visibility.LOCK),$scope.odds[odd.OddsID]},$scope.refactorECT=function(ect){return $scope.eventChanceTypes[ect.EventChanceTypeID]||($scope.eventChanceTypes[ect.EventChanceTypeID]={ID:ect.EventChanceTypeID,name:ect.ChanceTypeName,odds:ect.Odds,chanceTypeID:ect.ChanceTypeID,oldStatus:odd.EventChanceTypeStatus,newStatus:odd.EventChanceTypeStatus,locked:"active"!==ect.EventChanceTypeStatus}),$scope.eventChanceTypes[ect.EventChanceTypeID]},$scope.toggleDetail=function(event){$rootScope.keepAlive(),event.locked||event.opened?(event.opened=!1,$scope.openedEventsIDs=_.without($scope.openedEventsIDs,event.ID),$scope.changeClientView($scope.currentParams.sport,$scope.currentParams.region,$scope.openedEventsIDs)):$scope.openDetail(event)},$scope.openDetail=function(event,justUpdate,groupIDToOpen){VirtualService.getEventDetail(event.ID).then(function(response){event.groups=[],event.paramGroups={};var groupToOpen=null;if(detailData=response.data,event.displayedTime=$rootScope.GameParts[detailData.Event.ActualGamePartID].Name,"notstarted"===detailData.Event.ActualGamePartID||"inprogr"===detailData.Event.ActualGamePartID||$scope.isLive){if(justUpdate||(event.opened=!0,$scope.openedEventsIDs.push(event.ID),$scope.changeClientView($scope.currentParams.sport,$scope.currentParams.region,$scope.openedEventsIDs)),$scope.competitorDetail){var competitorChtIDs=null;switch(event.leagueID){case 602578:event.ShowCompetitorImg=!0,event.columnLabels=["1","1 - 2"],competitorChtIDs=["uf:866","uf:868"],$scope.competitorByPlayerID=!0;break;case 590539:event.ShowCompetitorImg=!0,event.columnLabels=["1","1 - 2","1 - 3"],competitorChtIDs=["lvgWin","lvgPlace","lvgShow"],$scope.competitorByPlayerID=!1;break;case 590540:event.ShowCompetitorImg=!0,competitorChtIDs=["lvgWin","lvgPlac2","lvgLayWinn","lvgLayPlac"],$scope.competitorByPlayerID=!1;break;case 602577:event.columnLabels=["1","1 - 3"],competitorChtIDs=["uf:866","uf:868"],$scope.competitorByPlayerID=!0}event.competitors=[],$scope.columns=[];var echtWithoutComp={},hasOtherCht=!(detailData.competitorChanceTypes={}),competitorOrder=0,lastCompetitor=(angular.forEach(detailData.EventChanceTypes,function(value,key){-1===competitorChtIDs.indexOf(value.ChanceTypeID)?(echtWithoutComp[key]=value,hasOtherCht=!0):(detailData.competitorChanceTypes[key]=value,detailData.competitorChanceTypes[key].Order=compet
1itorOrder++)}),detailData.EventChanceTypes=echtWithoutComp,_.mapObject(detailData.competitorChanceTypes,function(ect){$scope.columns.push({ID:ect.EventChanceTypeID,name:ect.ChanceTypeName,order:ect.Order})}),$scope.columns=_.sortBy($scope.columns,"order"),detailData.Odds=_.sortBy(detailData.Odds,function(Odd){return parseInt(Odd.TipType)}),""),lastIndex=-1;detailData.Odds.forEach(function(Odd){if(detailData.competitorChanceTypes[Odd.EventChanceTypeID]){var playerID=$scope.competitorByPlayerID?Odd.PlayerID:Odd.TipType;if(playerID!==lastCompetitor){var competitorToPush={name:($scope.competitorByPlayerID?"#"+Odd.TipType+" ":"")+detailData.Labels[$scope.competitorByPlayerID?"PL_"+playerID:"TP_"+Odd.TipID].Name,ID:parseInt(playerID),img:1236===event.sportID?"http://vhc20dev.aitcloud.de/vhcstaging/jersey/2003/"+Odd.JockeyID+".png":$rootScope.ENV.staticURL+"doxxbetPortal/assets/images/virtual-games/greyhound-"+parseInt(Odd.TipType)+".png",odds:[]};for(i=0;i<competitorChtIDs.length;i++)competitorToPush.odds.push({ID:null,rate:null,Order:i});event.competitors.push(competitorToPush),lastIndex++,lastCompetitor=playerID}playerID={ID:Odd.OddsID,rate:Odd.OddsRate,locked:"active"!==detailData.competitorChanceTypes[Odd.EventChanceTypeID].EventChanceTypeStatus,order:detailData.competitorChanceTypes[Odd.EventChanceTypeID].Order,chanceTypeID:detailData.competitorChanceTypes[Odd.EventChanceTypeID].EventChanceTypeID,onTicket:!!_.findWhere($rootScope.Ticket.Odds,{OddID:Odd.OddsID})};event.competitors[lastIndex].odds[detailData.competitorChanceTypes[Odd.EventChanceTypeID].Order]=playerID,$scope.odds[playerID.ID]=playerID}}),event.competitors[lastIndex].Odds=_.sortBy(event.competitors[lastIndex].Odds,"order"),event.showCompetitors=!0}590540===event.leagueID&&(response=event.competitors.length,event.columnLabels=["1","1 - 3","2 - "+response,"4 - "+response]),$scope.competitorDetail&&!hasOtherCht||($scope.competitorDetail&&(event.competitorsGroup={ID:"competitor",name:$rootScope.Lang.App.standings,paramGroups:[],onlyActive:!1,addAll:!0,order:999,competitorGroup:!0},event.groups.push(event.competitorsGroup)),detailData.ChanceTypeGroups=_.sortBy(detailData.ChanceTypeGroups,"RecordOrder"),event.allGroup={ID:"all",name:$scope.competitorDetail?$rootScope.Lang.App.other:$rootScope.Lang.App.all,paramGroups:[],onlyActive:!1,addAll:!0,order:999},event.activeGroup={ID:"active",name:$rootScope.Lang.App.active,paramGroups:[],onlyActive:!0,addAll:!0,order:-999},event.lockedGroup={ID:"locked",name:$rootScope.Lang.App.locked,paramGroups:[],onlyActive:!1,addAll:!0,order:999},event.groups.push(event.activeGroup),groupIDToOpen&&-1===groupIDToOpen&&(groupToOpen=event.activeGroup),detailData.ChanceTypeGroups.forEach(function(chanceTypeGroup){chanceTypeGroup={ID:chanceTypeGroup.ChanceTypeGroupID,name:chanceTypeGroup.ChanceTypeGroupName,paramGroups:[],onlyActive:!0,order:chanceTypeGroup.RecordOrder,groupChanceTypesString:chanceTypeGroup.ChanceTypes.join("&")};groupIDToOpen&&chanceTypeGroup.ID===groupIDToOpen&&(groupToOpen=chanceTypeGroup),2===chanceTypeGroup.order&&0,event.groups.push(chanceTypeGroup)}),event.groups.push(event.lockedGroup),groupIDToOpen&&-2===groupIDToOpen&&(groupToOpen=event.lockedGroup),detailData.Odds.forEach(function(odd){if(detailData.EventChanceTypes[odd.EventChanceTypeID]){detailData.EventChanceTypes[odd.EventChanceTypeID].Odds||(detailData.EventChanceTypes[odd.EventChanceTypeID].Odds=[]);var oddToPush=$scope.refactorOdd(odd,detailData.Labels,event.ID);switch(event.competitors&&event.competitors.length&&oddToPush.name.split("-").forEach(function(racer,index){event.competitors[racer-1]&&(oddToPush.name=oddToPush.name.replace(racer,(1===index?" ":"")+event.competitors[racer-1].name+(0===index?" ":"")))}),odd.PlayerID&&(oddToPush.name+=(oddToPush.name?" ":"")+detailData.Labels["PL_"+odd.PlayerID].Name),$rootScope.OddsViewMode){case 1:break;case 2:switch(oddToPush.name){case"1X":oddToPush.name=$scope.localizedTips[1]+" "+$scope.localizedTips.OR+" "+$scope.localizedTips.X;break;case"X2":oddToPush.name=$scope.localizedTips.X+" "+$scope.localizedTips.OR+" "+$scope.localizedTips[2];break;case"12":oddToPush.name=$scope.localizedTips[1]+" "+$scope.localizedTips.OR+" "+$scope.localizedTips[2]}case 4:"1"!=oddToPush.name&&"X"!=oddToPush.name&&"2"!=oddToPush.name||(oddToPush.name=$scope.localizedTips[oddToPush.name]);break;case 3:switch(oddToPush.name){case"1X":oddToPush.name=event.teams[0]+" "+$scope.localizedTips.OR+" "+$scope.localizedTips.X;break;case"X2":oddToPush.name=$scope.localizedTips.X+" "+$scope.localizedTips.OR+" "+event.teams[1];break;case"12":oddToPush.name=event.teams[0]+" "+$scope.localizedTips.OR+" "+event.teams[1]}case 5:switch(oddToPush.name){case"1":oddToPush.name=event.teams[0];break;case"X":oddToPush.name=$scope.localizedTips.X;break;case"2":oddToPush.name=event.teams[1]}}detailData.EventChanceTypes[odd.EventChanceTypeID].Odds.push(oddToPush),$scope.odds[oddToPush.ID]=oddToPush}}),_.mapObject(detailData.EventChanceTypes,function(originalECT){$scope.eventChanceTypes[originalECT.EventChanceTypeID]?newECT=$scope.eventChanceTypes[originalECT.EventChanceTypeID]:(newECT={ID:originalECT.EventChanceTypeID,name:originalECT.ChanceTypeName,odds:originalECT.Odds,chanceTypeID:originalECT.ChanceTypeID,oldStatus:originalECT.EventChanceTypeStatus,newStatus:originalECT.EventChanceTypeStatus},$scope.eventChanceTypes[newECT.ID]=newECT);var newECT,addGroup=!1;originalECT.ParamGroupID?(paramGroup=event.paramGroups["G_"+originalECT.ParamGroupID])||
1(addGroup=!0,originalParamGroup=_.findWhere(detailData.ChanceTypeParamGroups,{ParamGroupID:originalECT.ParamGroupID}),paramGroup={ID:"G_"+originalParamGroup.ParamGroupID,name:originalParamGroup.ParamGroupName,eventChanceTypes:[],tooltip:originalParamGroup.ParamGroupToolTip,isDuo:"DUO"==originalECT.BetType,columnCount:"DUO"===originalECT.BetType?2:3,tipClutch:originalParamGroup.TipClutch,order:originalECT.Order,locked:!0,handicapMarker:originalParamGroup.HandicapMarker}):paramGroup={ID:"E_"+newECT.ID,name:newECT.name,eventChanceTypes:[],locked:addGroup=!0,order:originalECT.Order,tooltip:originalECT.ToolTip,columnCount:1===newECT.oddsCount?1:"DUO"===originalECT.BetType||2===newECT.oddsCount?2:3,isDuo:"DUO"===originalECT.BetType},paramGroup.locked=paramGroup.locked&&newECT.locked,paramGroup.eventChanceTypes.push(newECT),addGroup&&(event.groups.forEach(function(group){!group.addAll&&-1===group.groupChanceTypesString.indexOf(newECT.chanceTypeID)||group.paramGroups.push(paramGroup)}),paramGroup.chanceTypeID=originalECT.ChanceTypeID,event.paramGroups[paramGroup.ID]=paramGroup),"G"===paramGroup.ID[0]&&newECT.odds.forEach(function(odd){var paramLimit;odd.hasParamName||(odd.paramLimitMark?odd.name+=" "+odd.paramLimitMark:(paramLimit=originalECT.ParamLimit,paramGroup.tipClutch?odd.name+=" "+paramGroup.tipClutch+" ":"-"===paramGroup.handicapMarker||"+"===paramGroup.handicapMarker?(odd.name+=" "+paramGroup.handicapMarker,paramGroup.handicapMarker="-"===paramGroup.handicapMarker?"+":"-"):"Y"===paramGroup.handicapMarker?(paramLimit="-"!==paramLimit.charAt(0)?" +"+paramLimit:" "+paramLimit,paramGroup.handicapMarker="N"):"N"===paramGroup.handicapMarker?(paramLimit="-"!==paramLimit.charAt(0)?" -"+paramLimit:" +"+paramLimit.substring(1),paramGroup.handicapMarker="Y"):odd.name+=" ",odd.name+=paramLimit),odd.hasParamName=!0)})}),justUpdate&&groupToOpen?$scope.openGroup(event,groupToOpen,!0):event.competitorsGroup?$scope.openGroup(event,event.competitorsGroup):$scope.openGroup(event,event.activeGroup))}else event.locked=!0,event.displayedTime=$rootScope.GameParts[detailData.Event.ActualGamePartID].Name,"ended"!==detailData.Event.ActualGamePartID&&(event.running=!0)}).finally(function(){$rootScope.loadTooltips(),$scope.requestOddsBroadcast(),$timeout(function(){loadGreedy()},100,!1)})},$scope.updateDetail=function(event){$scope.openDetail(event,!0,event.openedGroup.ID)},$scope.changeClientView=function(sportID,leagueCupID,eventIDs){var views=[],viewToPush={sportID:153};sportID&&(viewToPush.regionID=sportID,leagueCupID)&&(viewToPush.leagueID=leagueCupID),$scope.betxGame&&(views.push({virtualJackpot:!0}),views.push({betxVG:!0})),views.push(viewToPush),eventIDs&&eventIDs.forEach(function(eventID){views.push({eventID:eventID})}),$scope.$emit("signalr_changeView",{newViews:views,oldViews:$scope.currentViews}),$scope.currentViews=views},$scope.$on("signalr_EventChanceTypeChanged",function(event,data){$timeout(function(){$scope.eventChanceTypeChanged(data.eventChanceTypeID,data.status,data.eventID)})}),$scope.hasActiveChancetype=function(group){var count=0;return group.eventChanceTypes.forEach(function(echt){echt.locked||count++}),0<count},$scope.eventChanceTypeChanged=function(eventChanceTypeID,status,eventID){var chanceType;$scope.events[eventID]&&($scope.competitorDetail?$scope.events[eventID].competitors.forEach(function(competitor){competitor.odds.forEach(function(odd){odd.chanceTypeID===eventChanceTypeID&&(odd.locked="active"!==status)})}):(chanceType=$scope.eventChanceTypes[eventChanceTypeID])?(chanceType.oldStatus=chanceType.newStatus,chanceType.newStatus=status,chanceType.visibility=$rootScope.getEctVisibility($scope.events[eventID].openedGroup.ID||"other",chanceType.oldStatus,chanceType.newStatus,!1)):$scope.events[eventID].opened&&$scope.updateDetail($scope.events[eventID]))},$scope.$on("signalr_OddsChanged",function(event,data){$timeout(function(){$scope.odds&&$scope.odds[data.oddsID]&&($scope.odds[data.oddsID].rate=data.oddsRate,$scope.odds[data.oddsID].newStatus!==data.status)&&($scope.odds[data.oddsID].oldStatus=$scope.odds[data.oddsID].newStatus,$scope.odds[data.oddsID].newStatus=data.status,$scope.odds[data.oddsID].visibility=$rootScope.getOddVisibility($scope.openedGroup&&$scope.openedGroup.ID?$scope.openedGroup.ID:"other",$scope.odds[data.oddsID].oldStatus,$scope.odds[data.oddsID].newStatus,$scope.events[$scope.odds[data.oddsID].eventID].locked),$scope.odds[data.oddsID].locked=$scope.odds[data.oddsID].visibility<$rootScope.visibility.SHOW,$scope.odds[data.oddsID].hidden=$scope.odds[data.oddsID].visibility<$rootScope.visibility.LOCK)})}),$scope.openGroup=function(event,group,force){!force&&event.openedGroup&&event.openedGroup.ID===group.ID||(group.competitorGroup?event.showCompetitors=!0:event.showCompetitors=!1,event.openedGroup=group,event.openedGroup.paramGroups.forEach(function(pGroup){pGroup.eventChanceTypes.forEac
1h(function(pEct){pEct.oldStatus=pEct.newStatus,pEct.visibility=$rootScope.getEctVisibility(group.ID,pEct.oldStatus,pEct.newStatus,!1),pEct.odds.forEach(function(pOdd){pOdd.oldStatus=pOdd.newStatus,pOdd.visibility=$rootScope.getOddVisibility(group.ID,pOdd.oldStatus,pOdd.newStatus,!1)})})}),$timeout(function(){$(".tooltip").not(".tooltipstered").tooltipster({interactive:!0,delay:50,theme:"labeled"})},100,!1))},$scope.lockEvent=function(event){event.locked=!0,$timeout(function(){event.hide=!0,$scope.toggleDetail(event)},5e3)},$scope.$on("signalr_EventChanged",function(event,data){$timeout(function(){$scope.eventChanged(data.eventID,data.actualGamePartID,data.actualGamePartTime,data.score,data.liveBettingView,data.eventDate)})}),$scope.$on("signalr_JackpotChanged",function(event,data){}),$scope.$on("signalr_StreamAdded",function(event,data){$scope.startVideo(data.raceId,data.streamUrl)}),$scope.startVideo=function(ID,videoURL){$timeout(function(){$scope.sports[0].leagues[0].events.forEach(function(ev){ev.liveFeedReference===ID&&(ev.videoURL=videoURL,$scope.currentVideo=videoURL,$timeout(function(){$("#betx-video-virtual")[0].play()},1e4,!1))})},0)},$scope.eventChanged=function(eventID,actualGamePartID,actualGamePartTime,score,liveBettingView,eventDate){$scope.events&&($scope.events[eventID]?($scope.events[eventID],$scope.isLive&&($scope.events[eventID].score=$rootScope.parseScores(score)),$scope.isLive||$scope.lockEvent($scope.events[eventID]),$scope.events[eventID].displayedTime=$rootScope.GameParts[actualGamePartID].Name,$scope.events[eventID].liveBettingView=liveBettingView,$scope.events[eventID].running="ended"!==actualGamePartID,alreadyFoundEvent=!0,$scope.openFirstAvailableEvent()):$scope.updateOfferThrottled())},$scope.openFirstAvailableEvent=function(){var alreadyOpened;$scope.openFirst&&(alreadyOpened=!1,$scope.sports.forEach(function(sport){alreadyOpened||sport.leagues.forEac
1h(function(league){alreadyOpened||league.events.forEach(function(event){alreadyOpened||event.locked||(event.opened||event.onceAutoOpened||($scope.toggleDetail(event),event.onceAutoOpened=!0),alreadyOpened=!0)})})}))},$scope.$on("sync_on_ticket",function(event,oddIDs){$scope.changeOnTicket(_.difference($scope.lastTicketOdds,oddIDs),!1),$scope.changeOnTicket(oddIDs,!0),$scope.lastTicketOdds=oddIDs}),$rootScope.$on("virtual_round_change",function(event,params){if(params.data.Event_start&&(params.data.event_start=params.data.Event_start),params.data.event_start){var startDateStr=moment(params.data.event_start).format("HH:mm");if($scope.sports[0]&&$scope.sports[0].leagues[0]){var foundDate=_.findWhere($scope.sports[0].leagues[0].dates,{dateStr:startDateStr});if(foundDate&&!foundDate.name)switch(foundDate.name=foundDate.dateStr+" - ",params.name){case"setVfMatches":foundDate.name+=$rootScope.Lang.App.virtual_season+" "+params.data.season_nr+"/"+params.data.match_day+". "+$rootScope.Lang.App.virtual_round;break;case"setVblMatchday":foundDate.name+=$rootScope.Lang.App.virtual_season+" "+params.data.season_name+"/"+params.data.match_day+". "+$rootScope.Lang.App.virtual_round;break;case"setVtoRound":foundDate.name+=$rootScope.Lang.App.virtual_season+" "+params.data.Tournament+"/"+params.data.Round+". "+$rootScope.Lang.App.virtual_round;break;case"setVdrRace":foundDate.name+=params.data.Race_number+". "+$rootScope.Lang.App.race}}}}),$scope.lastTicketOdds=[],$scope.changeOnTicket=function(oddIDs,status){oddIDs&&0<oddIDs.length&&($scope.odds||$scope.openedEventsIDs&&$scope.openedEventsIDs[0])&&oddIDs.forEach(function(oddID){$scope.odds&&$scope.odds[oddID]&&($scope.odds[oddID].onTicket=status)})},$scope.requestOddsBroadcast=function(){$rootScope.$broadcast("request_odd_broadcast")},$scope.hasRoundLiveEvents=function(round){return!!_.find(round.events,function(event){return 1===event.liveBettingView})}}]),angular.module("virtual").service("VirtualService",["$http","$rootScope","$q","$sce",function($http,$rootScope,$q,$sce){var canceler=$q.defer(),resolved=!1;return{getOffer:function(currentParams,hasVirtualMarkets){return resolved&&canceler.resolve("http call aborted"),canceler=$q.defer(),resolved=!0,$http.post($sce.trustAsResourceUrl($rootScope.baseURL+"/offer/GetOfferList"+(hasVirtualMarkets?"VG":"")),{sportEvent:-1,sport:153,region:currentParams.sport,leaugeCup:currentParams.region,live:-1,date:-1,top:currentParams.top?1:-1})},getEventDetail:function(EventDetailID){return $http.post($sce.trustAsResourceUrl($rootScope.baseURL+"/offer/GetOfferEventDetail"),{eventId:EventDetailID})}}}]),(()=>{var cache,tid,debouncedCheck,unobserveChanges,createRequest,xlinkNS,checkUseElems;window&&window.addEventListener&&(cache=Object.create(null),debouncedCheck=function(){clearTimeout(tid),tid=setTimeout(checkUseElems,100)},unobserveChanges=function(){},createRequest=function(url){var Request,a,hname=location.hostname;return window.XMLHttpRequest&&(Request=new XMLHttpRequest,url=url,(a=document.createElement("a")).href=url,url=a.hostname,Request=void 0===Request.withCredentials&&""!==url&&url!==hname?XDomainRequest||void 0:XMLHttpRequest),Request},xlinkNS="http://www.w3.org/1999/xlink",checkUseElems=function(){var base,bcr,i,isHidden,Request,url,uses,xhr,inProgressCount=0;function observeIfDone(){var observer;0===--inProgressCount&&(unobserveChanges(),window.addEventListener("resize",debouncedCheck,!1),window.addEventListener("orientationchange",debouncedCheck,!1),unobserveChanges=window.MutationObserver?((observer=new MutationObserver(debouncedCheck)).observe(document.documentElement,{childList:!0,subtree:!0,attributes:!0}),function(){try{observer.disconnect(),window.removeEventListener("resize",debouncedCheck,!1),window.removeEventListener("orientationchange",debouncedCheck,!1)}catch(ignore){}}):(document.documentElement.addEventListener("DOMSubtreeModified",debouncedCheck,!1),function(){document.documentElement.removeEventListener("DOMSubtreeModified",debouncedCheck,!1),window.removeEventListener("resize",debouncedCheck,!1),window.removeEventListener("orientationchange",debouncedCheck,!1)}))}function attrUpdateFunc(spec){return function(){!0!==cache[spec.base]&&spec.useEl.setAttributeNS(xlinkNS,"xlink:href","#"+spec.hash)}}function onErrorTimeout(xhr){return function(){xhr.onerror=null,xhr.ontimeout=null,observeIfDone()}}for(unobserveChanges(),uses=document.getElementsByTagName("use"),i=0;i<uses.length;i+=1){try{bcr=uses[i].getBoundingClientRect()}catch(ignore){bcr=!1}base=(url=uses[i].getAttributeNS(xlinkNS,"href").split("#"))[0],url=url[1],isHidden=bcr&&0===bcr.left&&0===bcr.right&&0===bcr.top&&0===bcr.bottom,bcr&&0===bcr.width&&0===bcr.height&&!isHidden?base.length&&(!0!==(xhr=cache[base])&&setTimeout(attrUpdateFunc({useEl:uses[i],base:base,hash:url}),0),void 0===xhr)&&void 0!==(Request=createRequest(base))&&(xhr=new Request,(cache[base]=xhr).onload=(xhr=>function(){var body=document.body,x=document.createElement("x");xhr.onload=null,x.innerHTML=xhr.responseText,(x=x.getElementsByTagName("svg")[0])&&(x.setAttribute("aria-hidden","true"),x.style.position="absolute",x.style.width=0,x.style.height=0,x.style.overflow="hidden",body.insertBefore(x,body.firstChild)),observeIfDone()})(xhr),xhr.onerror=onErrorTimeout(xhr),xhr.ontimeout=onErrorTimeout(xhr),xhr.open("GET",base),xhr.send(),inProgressCount+=1):isHidden?base.length&&cache[base]&&attrUpd
1ateFunc({useEl:uses[i],base:base,hash:url})():void 0===cache[base]?cache[base]=!0:cache[base].onload&&(cache[base].abort(),delete cache[base].onload,cache[base]=!0)}uses="",inProgressCount+=1,observeIfDone()},window.addEventListener("load",function winLoad(){window.removeEventListener("load",winLoad,!1),tid=setTimeout(checkUseElems,0)},!1))})(),(addon=>{var component;window.UIkit&&(component=addon(UIkit)),"function"==typeof define&&define.amd&&define("uikit-accordion",["uikit"],function(){return component||addon(UIkit)})})(function(UI){return UI.component("accordion",{defaults:{showfirst:!0,collapse:!0,animate:!0,easing:"swing",duration:300,toggle:".uk-accordion-title",containers:".uk-accordion-content",clsactive:"uk-active"},boot:function(){UI.ready(function(context){setTimeout(function(){UI.$("[data-uk-accordion]",context).each(function(){var ele=UI.$(this);ele.data("accordion")||UI.accordion(ele,UI.Utils.options(ele.attr("data-uk-accordion")))})},0)})},init:function(){var $this=this;this.element.on("click.uk.accordion",this.options.toggle,function(e){e.preventDefault(),$this.toggleItem(UI.$(this).data("wrapper"),$this.options.animate,$this.options.collapse)}),this.update(!0),UI.domObserve(this.element,function(e){$this.element.children($this.options.containers).length&&$this.update()})},toggleItem:function(wrapper,animated,collapse){var $this=this;if(!wrapper)return!1;wrapper.data("toggle").toggleClass(this.options.clsactive),wrapper.data("content").toggleClass(this.options.clsactive);var active=wrapper.data("toggle").hasClass(this.options.clsactive);collapse&&(this.toggle.not(wrapper.data("toggle")).removeClass(this.options.clsactive),this.content.not(wrapper.data("content")).removeClass(this.options.clsactive).parent().stop().css("overflow","hidden").animate({height:0},{easing:this.options.easing,duration:animated?this.options.duration:0}).attr("aria-expanded","false")),wrapper.stop().css("overflow","hidden"),animated?wrapper.animate({height:active?(ele=>{var tmp,ele=UI.$(ele),height="auto";return ele.is(":visible")?height=ele.outerHeight():(tmp={position:ele.css("position"),visibility:ele.css("visibility"),display:ele.css("display")},height=ele.css({position:"absolute",visibility:"hidden",display:"block"}).outerHeight(),ele.css(tmp)),height})(wrapper.data("content")):0},{easing:this.options.easing,duration:this.options.duration,complete:function(){active&&(wrapper.css({overflow:"",height:"auto"}),UI.Utils.checkDisplay(wrapper.data("content"))),$this.trigger("display.uk.check")}}):(wrapper.height(active?"auto":0),active&&(wrapper.css({overflow:""}),UI.Utils.checkDisplay(wrapper.data("content"))),this.trigger("display.uk.check")),wrapper.attr("aria-expanded",active),this.element.trigger("toggle.uk.accordion",[active,wrapper.data("toggle"),wrapper.data("content")])},update:function(init){var $content,$wrapper,$toggle,$this=this;this.toggle=this.find(this.options.toggle),this.content=this.find(this.options.containers),this.content.each(function(index){($content=UI.$(this)).parent().data("wrapper")?$wrapper=$content.parent():($wrapper=UI.$(this).wrap('<div data-wrapper="true" style="overflow:hidden;height:0;position:relative;"></div>').parent()).attr("aria-expanded","false"),$toggle=$this.toggle.eq(index),$wrapper.data("toggle",$toggle),$wrapper.data("content",$content),$toggle.data("wrapper",$wrapper),$content.data("wrapper",$wrapper)}),this.element.trigger("update.uk.accordion",[this]),init&&this.options.showfirst&&this.toggleItem(this.toggle.eq(0).data("wrapper"),!1,!1)}}),UI.accordion});
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.